commit 83cbfaf03fe353da84dce8b7d75efb8b124c11c0 Author: admin <362324317@qq.com> Date: Sun May 17 02:22:18 2026 +0800 v0.2.7: 修复Redis连接 + 启动管理后台 - 修复Redis认证 (配置密码) - 启动Python管理后台 (端口9531, 15个功能开关) - 统一版本号 0.2.7 - 更新docker-compose.yml (镜像版本/Redis URL/Admin服务) diff --git a/.env.template b/.env.template new file mode 100644 index 0000000..55876ae --- /dev/null +++ b/.env.template @@ -0,0 +1,35 @@ +# CloudSearch v2.1.0 — 功能开关 +# true=启用 false=禁用 改完重启生效 + +# ===== 核心开关 ===== +FEATURE_QUARK_PID=true +FEATURE_SEO=true +FEATURE_LINK_MONITOR=true + +# ===== 增强功能 ===== +FEATURE_TMDB=true +FEATURE_TELEGRAM_BOT=false +FEATURE_SUBSCRIPTION=false +FEATURE_ALIST=false + +# ===== 转存平台 ===== +FEATURE_TRANSFER_QUARK=true +FEATURE_TRANSFER_BAIDU=false +FEATURE_TRANSFER_ALIYUN=false +FEATURE_TRANSFER_UC=false +FEATURE_TRANSFER_XUNLEI=false +FEATURE_TRANSFER_PAN115=false +FEATURE_TRANSFER_PAN123=false +FEATURE_TRANSFER_CLOUD189=false + +# ===== 转存凭证 (仅启用的平台需要填) ===== +QUARK_COOKIE= +BAIDU_COOKIE= +ALIYUN_REFRESH_TOKEN= +UC_COOKIE= +XUNLEI_REFRESH_TOKEN= + +# ===== TMDB / Bot ===== +TMDB_API_KEY= +TG_BOT_TOKEN= +FEISHU_WEBHOOK= diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..700e012 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +.env +*.sqlite +*.sqlite-shm +*.sqlite-wal +uploads/ +__pycache__/ +*.pyc +.DS_Store +node_modules/ +dist/ +*.tar.gz +*.zip diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..b003284 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.2.7 diff --git a/cloudsearch_admin/Dockerfile b/cloudsearch_admin/Dockerfile new file mode 100644 index 0000000..f5466d3 --- /dev/null +++ b/cloudsearch_admin/Dockerfile @@ -0,0 +1,18 @@ +FROM python:3.11-slim + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY server.py . +COPY templates/ templates/ + +RUN mkdir -p /data + +EXPOSE 9531 + +HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \ + CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:9531/health')" + +CMD ["python", "server.py"] diff --git a/cloudsearch_admin/features.html b/cloudsearch_admin/features.html new file mode 100644 index 0000000..515bf11 --- /dev/null +++ b/cloudsearch_admin/features.html @@ -0,0 +1,196 @@ + + + + + +功能开关 - CloudSearch + + + + +
+
加载中…
+
+
+ + + + diff --git a/cloudsearch_admin/requirements.txt b/cloudsearch_admin/requirements.txt new file mode 100644 index 0000000..d5c6c91 --- /dev/null +++ b/cloudsearch_admin/requirements.txt @@ -0,0 +1,3 @@ +flask>=3.0 +waitress>=2.1 +pymysql>=1.1 diff --git a/cloudsearch_admin/server.py b/cloudsearch_admin/server.py new file mode 100644 index 0000000..7c2970b --- /dev/null +++ b/cloudsearch_admin/server.py @@ -0,0 +1,206 @@ +#!/usr/bin/env python3 +""" +CloudSearch 管理后台 v2.2.0 +功能开关一键管理 — 支持本地 SQLite + MySQL 双向同步 +""" + +import os +import json +import sqlite3 +import logging +from datetime import datetime +from typing import Dict, Optional + +from flask import Flask, render_template, request, jsonify + +# ── 日志 ────────────────────────────────────────────────── +logging.basicConfig(level=logging.INFO, format="%(asctime)s [%(levelname)s] %(message)s") +log = logging.getLogger("admin") + +app = Flask(__name__) + +# ── 配置 ────────────────────────────────────────────────── +ADMIN_PORT = int(os.getenv("ADMIN_PORT", "9531")) +ADMIN_PASSWORD = os.getenv("ADMIN_PASSWORD", "admin123") +DB_PATH = os.getenv("ADMIN_DB_PATH", "/data/admin_flags.sqlite") + +# MySQL(主应用 system_configs 表,可选) +MYSQL_HOST = os.getenv("MYSQL_HOST", "") +MYSQL_PORT = int(os.getenv("MYSQL_PORT", "3306")) +MYSQL_USER = os.getenv("MYSQL_USER", "") +MYSQL_PASS = os.getenv("MYSQL_PASS", "") +MYSQL_DB = os.getenv("MYSQL_DB", "cloudsearch") + +# ── 功能开关定义 ────────────────────────────────────────── +FEATURES: Dict[str, dict] = { + "feature_quark_pid": {"name": "夸克推广PID", "group": "核心", "default": True}, + "feature_seo": {"name": "SEO / Sitemap", "group": "核心", "default": True}, + "feature_link_monitor": {"name": "失效链接监控", "group": "核心", "default": True}, + "feature_tmdb": {"name": "TMDB影视刮削", "group": "增强", "default": True}, + "feature_telegram_bot": {"name": "Telegram Bot", "group": "增强", "default": False}, + "feature_subscription": {"name": "关键词订阅通知", "group": "增强", "default": False}, + "feature_alist": {"name": "AList打通", "group": "增强", "default": False}, + "feature_transfer_quark": {"name": "夸克转存", "group": "转存", "default": True}, + "feature_transfer_baidu": {"name": "百度转存", "group": "转存", "default": False}, + "feature_transfer_aliyun": {"name": "阿里转存", "group": "转存", "default": False}, + "feature_transfer_uc": {"name": "UC转存", "group": "转存", "default": False}, + "feature_transfer_xunlei": {"name": "迅雷转存", "group": "转存", "default": False}, + "feature_transfer_115": {"name": "115转存", "group": "转存", "default": False}, + "feature_transfer_123": {"name": "123转存", "group": "转存", "default": False}, + "feature_transfer_cloud189":{"name": "天翼转存", "group": "转存", "default": False}, +} + +# ── SQLite ──────────────────────────────────────────────── +def get_db(): + conn = sqlite3.connect(DB_PATH) + conn.row_factory = sqlite3.Row + conn.execute("PRAGMA journal_mode=WAL") + conn.execute(""" + CREATE TABLE IF NOT EXISTS flags ( + key TEXT PRIMARY KEY, + value INTEGER NOT NULL DEFAULT 0, + updated_at TEXT NOT NULL DEFAULT (datetime('now')) + ) + """) + # 初始化默认值 + for key in FEATURES: + conn.execute( + "INSERT OR IGNORE INTO flags(key, value) VALUES(?, ?)", + (key, int(FEATURES[key]["default"])) + ) + conn.commit() + return conn + +def read_flags_sqlite() -> Dict[str, bool]: + conn = get_db() + rows = conn.execute("SELECT key, value, updated_at FROM flags ORDER BY key").fetchall() + conn.close() + return {r["key"]: bool(r["value"]) for r in rows}, {r["key"]: r["updated_at"] for r in rows} + +def write_flag_sqlite(key: str, value: bool): + conn = get_db() + conn.execute( + "INSERT INTO flags(key, value, updated_at) VALUES(?, ?, datetime('now')) " + "ON CONFLICT(key) DO UPDATE SET value=excluded.value, updated_at=datetime('now')", + (key, int(value)) + ) + conn.commit() + conn.close() + +# ── MySQL 同步 ──────────────────────────────────────────── +def sync_to_mysql(key: str, value: bool): + """将开关状态同步到主应用的 system_configs 表""" + if not MYSQL_HOST: + return # MySQL 未配置,跳过 + try: + import pymysql + conn = pymysql.connect( + host=MYSQL_HOST, port=MYSQL_PORT, + user=MYSQL_USER, password=MYSQL_PASS, + database=MYSQL_DB, charset="utf8mb4", + connect_timeout=5 + ) + with conn.cursor() as cur: + cur.execute(""" + INSERT INTO system_configs (config_key, config_value, updated_at) + VALUES (%s, %s, NOW()) + ON DUPLICATE KEY UPDATE config_value=VALUES(config_value), updated_at=NOW() + """, (key, "true" if value else "false")) + conn.commit() + conn.close() + log.info(f"MySQL 同步成功: {key} = {value}") + except Exception as e: + log.warning(f"MySQL 同步失败 ({key}): {e}") + +def read_flags_mysql() -> Optional[Dict[str, bool]]: + if not MYSQL_HOST: + return None + try: + import pymysql + conn = pymysql.connect( + host=MYSQL_HOST, port=MYSQL_PORT, + user=MYSQL_USER, password=MYSQL_PASS, + database=MYSQL_DB, charset="utf8mb4", + connect_timeout=5 + ) + with conn.cursor(pymysql.cursors.DictCursor) as cur: + cur.execute("SELECT config_key, config_value FROM system_configs WHERE config_key LIKE 'feature_%'") + rows = cur.fetchall() + conn.close() + return {r["config_key"]: r["config_value"].lower() == "true" for r in rows} + except Exception as e: + log.warning(f"MySQL 读取失败: {e}") + return None + +# ── 路由 ────────────────────────────────────────────────── +@app.route("/") +def index(): + """管理后台首页""" + return render_template("admin.html", features=FEATURES) + +@app.route("/health") +def health(): + return jsonify({"status": "ok", "service": "cloudsearch-admin"}) + +@app.route("/api/flags", methods=["GET"]) +def api_list_flags(): + """列出所有开关""" + flags_sqlite, updated = read_flags_sqlite() + flags_mysql = read_flags_mysql() + + result = {} + for key, meta in FEATURES.items(): + result[key] = { + "name": meta["name"], + "group": meta["group"], + "value": flags_sqlite.get(key, meta["default"]), + "mysql_value": flags_mysql.get(key) if flags_mysql else None, + "synced": (flags_mysql is None) or (flags_sqlite.get(key) == flags_mysql.get(key)), + "updated_at": updated.get(key, ""), + } + return jsonify(result) + +@app.route("/api/flags/", methods=["PUT"]) +def api_set_flag(key): + """设置单个开关""" + if key not in FEATURES: + return jsonify({"error": f"未知开关: {key}"}), 404 + + data = request.get_json(force=True) + value = bool(data.get("value", False)) + + # 写本地 SQLite + write_flag_sqlite(key, value) + + # 同步到 MySQL + sync_to_mysql(key, value) + + log.info(f"开关切换: {key} = {value}") + return jsonify({"ok": True, "key": key, "value": value}) + +@app.route("/api/flags/batch", methods=["PUT"]) +def api_batch_set_flags(): + """批量设置开关""" + data = request.get_json(force=True) + if not isinstance(data, dict): + return jsonify({"error": "请求体需为 {key: value} 字典"}), 400 + + results = {} + for key, value in data.items(): + if key not in FEATURES: + results[key] = {"error": "未知"} + continue + val = bool(value) + write_flag_sqlite(key, val) + sync_to_mysql(key, val) + results[key] = val + log.info(f"批量切换: {key} = {val}") + + return jsonify({"ok": True, "results": results}) + + +if __name__ == "__main__": + from waitress import serve + log.info(f"管理后台启动: http://0.0.0.0:{ADMIN_PORT}") + log.info(f"MySQL 同步: {'已配置' if MYSQL_HOST else '未配置 (仅使用本地 SQLite)'}") + serve(app, host="0.0.0.0", port=ADMIN_PORT, threads=4) diff --git a/cloudsearch_admin/templates/admin.html b/cloudsearch_admin/templates/admin.html new file mode 100644 index 0000000..016b454 --- /dev/null +++ b/cloudsearch_admin/templates/admin.html @@ -0,0 +1,149 @@ + + + + + +CloudSearch 管理后台 v2.2 + + + + +
+
+

🔧 CloudSearch 管理后台

+
v2.2 · 功能开关一键管理
+
+
+ + +
+
+ +
+
加载中...
+
+ +
+ + + + diff --git a/cloudsearch_enrich/Dockerfile b/cloudsearch_enrich/Dockerfile new file mode 100644 index 0000000..117283e --- /dev/null +++ b/cloudsearch_enrich/Dockerfile @@ -0,0 +1,8 @@ +FROM python:3.12-slim +WORKDIR /app +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt +COPY *.py . +EXPOSE 9530 9532 +HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:9530/health')" +CMD ["sh", "-c", "python search_enricher.py & python feishu_bot.py & python subscription_monitor.py & wait"] diff --git a/cloudsearch_enrich/feishu_bot.py b/cloudsearch_enrich/feishu_bot.py new file mode 100644 index 0000000..de4fd97 --- /dev/null +++ b/cloudsearch_enrich/feishu_bot.py @@ -0,0 +1,319 @@ +""" +CloudSearch 飞书 Bot v1.0.0 +替代 Telegram Bot,支持 /search /subscribe 命令 + Webhook 推送 +通过飞书开放平台事件订阅接收消息 +""" +import os +import json +import time +import hmac +import hashlib +import logging +import sqlite3 +from typing import Optional +from flask import Flask, request, jsonify + +import requests + +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger("feishubot") + +# ── 飞书配置 ────────────────────────────────── +APP_ID = os.environ.get("FEISHU_APP_ID", "") +APP_SECRET = os.environ.get("FEISHU_APP_SECRET", "") +VERIFY_TOKEN = os.environ.get("FEISHU_VERIFY_TOKEN", "") +WEBHOOK_URL = os.environ.get("FEISHU_WEBHOOK_URL", "") +CLOUDSEARCH_API = os.environ.get("CLOUDSEARCH_API", "http://app:9527") +DB_PATH = os.environ.get("BOT_DB_PATH", "/data/bot.db") + +# ── 飞书API ─────────────────────────────────── +FEISHU_TOKEN_URL = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" +FEISHU_SEND_URL = "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id" + +_tenant_token = None +_token_expire = 0 + +def get_tenant_token() -> str: + """获取飞书 tenant_access_token(缓存2h)""" + global _tenant_token, _token_expire + if _tenant_token and time.time() < _token_expire: + return _tenant_token + resp = requests.post(FEISHU_TOKEN_URL, json={ + "app_id": APP_ID, "app_secret": APP_SECRET + }, timeout=10) + data = resp.json() + if data.get("code") != 0: + raise Exception(f"获取飞书Token失败: {data}") + _tenant_token = data["tenant_access_token"] + _token_expire = time.time() + data.get("expire", 7200) - 300 + logger.info("飞书 tenant_token 已刷新") + return _tenant_token + +def send_feishu_msg(open_id: str, content: str, msg_type: str = "text"): + """发送飞书消息""" + body = { + "receive_id": open_id, + "msg_type": msg_type, + "content": json.dumps({"text": content}) if msg_type == "text" else content + } + resp = requests.post( + FEISHU_SEND_URL, + headers={"Authorization": f"Bearer {get_tenant_token()}"}, + json=body, timeout=10 + ) + data = resp.json() + if data.get("code") != 0: + logger.error(f"发送飞书消息失败: {data}") + return data.get("code") == 0 + +def send_feishu_card(open_id: str, card: dict): + """发送飞书卡片消息""" + body = { + "receive_id": open_id, + "msg_type": "interactive", + "content": json.dumps(card) + } + resp = requests.post( + FEISHU_SEND_URL, + headers={"Authorization": f"Bearer {get_tenant_token()}"}, + json=body, timeout=10 + ) + return resp.json().get("code") == 0 + +def send_webhook(text: str): + """通过 Webhook 推送通知(用于订阅变更)""" + if not WEBHOOK_URL: + return + try: + requests.post(WEBHOOK_URL, json={ + "msg_type": "text", + "content": {"text": text} + }, timeout=10) + except Exception as e: + logger.error(f"Webhook推送失败: {e}") + +# ── Bot 核心逻辑 ──────────────────────────────── +class FeishuBot: + def __init__(self): + self.db = sqlite3.connect(DB_PATH, check_same_thread=False) + self._init_db() + + def _init_db(self): + self.db.execute(""" + CREATE TABLE IF NOT EXISTS subscriptions ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + open_id TEXT NOT NULL, + keyword TEXT NOT NULL, + last_check TEXT, + created_at TEXT DEFAULT (datetime('now','localtime')), + UNIQUE(open_id, keyword) + ) + """) + self.db.commit() + logger.info("订阅数据库就绪") + + def handle_text(self, open_id: str, text: str): + """处理文本消息""" + text = text.strip() + if text.startswith("/search"): + keyword = text.replace("/search", "", 1).strip() + return self._cmd_search(open_id, keyword) + elif text.startswith("/subscribe"): + keyword = text.replace("/subscribe", "", 1).strip() + return self._cmd_subscribe(open_id, keyword) + elif text.startswith("/unsub"): + keyword = text.replace("/unsub", "", 1).strip() + return self._cmd_unsub(open_id, keyword) + elif text.startswith("/mysubs"): + return self._cmd_mysubs(open_id) + elif text.startswith("/help") or text.lower() == "help": + return self._cmd_help(open_id) + else: + return self._cmd_search(open_id, text) # 默认搜索 + + def _cmd_help(self, open_id: str): + help_text = ( + "🔍 CloudSearch Bot\n\n" + "命令:\n" + "/search 关键词 — 搜索网盘资源\n" + "直接输入关键词也可以搜索\n" + "/subscribe 关键词 — 订阅关键词\n" + "/unsub 关键词 — 取消订阅\n" + "/mysubs — 查看我的订阅\n" + "/help — 帮助" + ) + send_feishu_msg(open_id, help_text) + + def _cmd_search(self, open_id: str, keyword: str): + if not keyword: + send_feishu_msg(open_id, "用法: /search 流浪地球2\n或直接输入关键词") + return + + try: + resp = requests.post( + f"{CLOUDSEARCH_API}/api/query", + json={"q": keyword}, timeout=15 + ) + results = [] + for line in resp.text.strip().split("\n"): + try: + d = json.loads(line) + if d.get("type") == "result": + results.append(d) + except json.JSONDecodeError: + continue + + if not results: + send_feishu_msg(open_id, f"😞 未找到「{keyword}」的相关资源") + return + + # 构建飞书卡片 + elements = [] + for i, r in enumerate(results[:5]): + title = (r.get("title") or r.get("content", ""))[:50] + cloud = r.get("cloud_type", "?").upper() + pwd = r.get("password", "") + pwd_str = f" 🔑{pwd}" if pwd else "" + elements.append({ + "tag": "div", + "text": {"tag": "lark_md", "content": f"**{i+1}.** [{cloud}] {title}{pwd_str}"} + }) + + card = { + "header": { + "title": {"tag": "plain_text", "content": f"🔎 {keyword} — {len(results)}个结果"}, + "template": "blue" + }, + "elements": elements + [{ + "tag": "action", + "actions": [{ + "tag": "button", + "text": {"tag": "plain_text", "content": "🌐 查看更多"}, + "type": "primary", + "url": f"{CLOUDSEARCH_API}/?q={keyword}" + }] + }] + } + send_feishu_card(open_id, card) + + except Exception as e: + send_feishu_msg(open_id, f"❌ 搜索失败: {e}") + + def _cmd_subscribe(self, open_id: str, keyword: str): + if not keyword: + send_feishu_msg(open_id, "用法: /subscribe 流浪地球") + return + try: + self.db.execute( + "INSERT OR IGNORE INTO subscriptions (open_id, keyword) VALUES (?, ?)", + (open_id, keyword) + ) + self.db.commit() + send_feishu_msg(open_id, f"✅ 已订阅「{keyword}」,有新结果会通知你") + except Exception as e: + send_feishu_msg(open_id, f"❌ 订阅失败: {e}") + + def _cmd_unsub(self, open_id: str, keyword: str): + if not keyword: + send_feishu_msg(open_id, "用法: /unsub 流浪地球") + return + cur = self.db.execute( + "DELETE FROM subscriptions WHERE open_id=? AND keyword=?", + (open_id, keyword) + ) + self.db.commit() + if cur.rowcount > 0: + send_feishu_msg(open_id, f"✅ 已取消订阅「{keyword}」") + else: + send_feishu_msg(open_id, f"未找到「{keyword}」的订阅") + + def _cmd_mysubs(self, open_id: str): + rows = self.db.execute( + "SELECT keyword, created_at FROM subscriptions WHERE open_id=? ORDER BY created_at DESC", + (open_id,) + ).fetchall() + if not rows: + send_feishu_msg(open_id, "你还没有订阅任何关键词") + return + text = "📋 我的订阅:\n" + for kw, dt in rows: + text += f"• {kw} ({dt[:10]})\n" + send_feishu_msg(open_id, text) + + def check_subscriptions(self): + """检查所有订阅,有新结果时推送通知""" + subs = self.db.execute("SELECT DISTINCT keyword FROM subscriptions").fetchall() + for (kw,) in subs: + try: + resp = requests.post( + f"{CLOUDSEARCH_API}/api/query", + json={"q": kw}, timeout=10 + ) + count = sum(1 for line in resp.text.split("\n") + if '"type":"result"' in line) + if count > 0: + # 通知所有订阅此关键词的用户 + users = self.db.execute( + "SELECT open_id FROM subscriptions WHERE keyword=?", + (kw,) + ).fetchall() + for (uid,) in users: + send_feishu_msg(uid, f"🔔「{kw}」有新资源({count}个)!\n/search {kw}") + # Webhook 也推送 + send_webhook(f"🔔 关键词「{kw}」发现 {count} 个新资源") + except Exception as e: + logger.error(f"检查订阅[{kw}]失败: {e}") + +# ── Flask Web 服务 ───────────────────────────── +bot = FeishuBot() +app = Flask(__name__) + +@app.route("/health") +def health(): + return jsonify({"status": "ok", "bot": "feishu"}) + +@app.route("/feishu/event", methods=["POST"]) +def feishu_event(): + """飞书事件订阅回调""" + body = request.get_json() + logger.info(f"飞书事件: {json.dumps(body, ensure_ascii=False)[:300]}") + + # Token 验证(首次配置URL时) + if body.get("type") == "url_verification": + token = body.get("token", "") + if token == VERIFY_TOKEN: + return jsonify({"challenge": body.get("challenge", "")}) + return jsonify({"error": "invalid token"}), 403 + + # 事件回调验证 + if "header" in body: + # 收到消息事件 + event = body.get("event", {}) + msg_type = event.get("message", {}).get("message_type", "") + if msg_type == "text": + content = event["message"].get("content", "{}") + try: + text = json.loads(content).get("text", "") + except json.JSONDecodeError: + text = content + open_id = event.get("sender", {}).get("sender_id", {}).get("open_id", "") + if text and open_id: + bot.handle_text(open_id, text) + + return jsonify({"code": 0}) + +@app.route("/feishu/check", methods=["POST"]) +def trigger_check(): + """手动触发订阅检查""" + bot.check_subscriptions() + return jsonify({"ok": True}) + +# ── 启动入口 ─────────────────────────────────── +def main(): + if not APP_ID: + logger.warning("FEISHU_APP_ID 未设置,Bot 无法接收消息(仅 Webhook 可用)") + logger.info("飞书 Bot 启动,端口9531") + app.run(host="0.0.0.0", port=9532) + +if __name__ == "__main__": + main() diff --git a/cloudsearch_enrich/feishu_bot_tmp.py b/cloudsearch_enrich/feishu_bot_tmp.py new file mode 100644 index 0000000..358e644 --- /dev/null +++ b/cloudsearch_enrich/feishu_bot_tmp.py @@ -0,0 +1,319 @@ +""" +CloudSearch 飞书 Bot v1.0.0 +替代 Telegram Bot,支持 /search /subscribe 命令 + Webhook 推送 +通过飞书开放平台事件订阅接收消息 +""" +import os +import json +import time +import hmac +import hashlib +import logging +import sqlite3 +from typing import Optional +from flask import Flask, request, jsonify + +import requests + +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger("feishubot") + +# ── 飞书配置 ────────────────────────────────── +APP_ID = os.environ.get("FEISHU_APP_ID", "") +APP_SECRET = os.environ.get("FEISHU_APP_SECRET", "") +VERIFY_TOKEN = os.environ.get("FEISHU_VERIFY_TOKEN", "") +WEBHOOK_URL = os.environ.get("FEISHU_WEBHOOK_URL", "") +CLOUDSEARCH_API = os.environ.get("CLOUDSEARCH_API", "http://app:9527") +DB_PATH = os.environ.get("BOT_DB_PATH", "/data/bot.db") + +# ── 飞书API ─────────────────────────────────── +FEISHU_TOKEN_URL = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" +FEISHU_SEND_URL = "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id" + +_tenant_token = None +_token_expire = 0 + +def get_tenant_token() -> str: + """获取飞书 tenant_access_token(缓存2h)""" + global _tenant_token, _token_expire + if _tenant_token and time.time() < _token_expire: + return _tenant_token + resp = requests.post(FEISHU_TOKEN_URL, json={ + "app_id": APP_ID, "app_secret": APP_SECRET + }, timeout=10) + data = resp.json() + if data.get("code") != 0: + raise Exception(f"获取飞书Token失败: {data}") + _tenant_token = data["tenant_access_token"] + _token_expire = time.time() + data.get("expire", 7200) - 300 + logger.info("飞书 tenant_token 已刷新") + return _tenant_token + +def send_feishu_msg(open_id: str, content: str, msg_type: str = "text"): + """发送飞书消息""" + body = { + "receive_id": open_id, + "msg_type": msg_type, + "content": json.dumps({"text": content}) if msg_type == "text" else content + } + resp = requests.post( + FEISHU_SEND_URL, + headers={"Authorization": f"Bearer {get_tenant_token()}"}, + json=body, timeout=10 + ) + data = resp.json() + if data.get("code") != 0: + logger.error(f"发送飞书消息失败: {data}") + return data.get("code") == 0 + +def send_feishu_card(open_id: str, card: dict): + """发送飞书卡片消息""" + body = { + "receive_id": open_id, + "msg_type": "interactive", + "content": json.dumps(card) + } + resp = requests.post( + FEISHU_SEND_URL, + headers={"Authorization": f"Bearer {get_tenant_token()}"}, + json=body, timeout=10 + ) + return resp.json().get("code") == 0 + +def send_webhook(text: str): + """通过 Webhook 推送通知(用于订阅变更)""" + if not WEBHOOK_URL: + return + try: + requests.post(WEBHOOK_URL, json={ + "msg_type": "text", + "content": {"text": text} + }, timeout=10) + except Exception as e: + logger.error(f"Webhook推送失败: {e}") + +# ── Bot 核心逻辑 ──────────────────────────────── +class FeishuBot: + def __init__(self): + self.db = sqlite3.connect(DB_PATH, check_same_thread=False) + self._init_db() + + def _init_db(self): + self.db.execute(""" + CREATE TABLE IF NOT EXISTS subscriptions ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + open_id TEXT NOT NULL, + keyword TEXT NOT NULL, + last_check TEXT, + created_at TEXT DEFAULT (datetime('now','localtime')), + UNIQUE(open_id, keyword) + ) + """) + self.db.commit() + logger.info("订阅数据库就绪") + + def handle_text(self, open_id: str, text: str): + """处理文本消息""" + text = text.strip() + if text.startswith("/search"): + keyword = text.replace("/search", "", 1).strip() + return self._cmd_search(open_id, keyword) + elif text.startswith("/subscribe"): + keyword = text.replace("/subscribe", "", 1).strip() + return self._cmd_subscribe(open_id, keyword) + elif text.startswith("/unsub"): + keyword = text.replace("/unsub", "", 1).strip() + return self._cmd_unsub(open_id, keyword) + elif text.startswith("/mysubs"): + return self._cmd_mysubs(open_id) + elif text.startswith("/help") or text.lower() == "help": + return self._cmd_help(open_id) + else: + return self._cmd_search(open_id, text) # 默认搜索 + + def _cmd_help(self, open_id: str): + help_text = ( + "🔍 CloudSearch Bot\n\n" + "命令:\n" + "/search 关键词 — 搜索网盘资源\n" + "直接输入关键词也可以搜索\n" + "/subscribe 关键词 — 订阅关键词\n" + "/unsub 关键词 — 取消订阅\n" + "/mysubs — 查看我的订阅\n" + "/help — 帮助" + ) + send_feishu_msg(open_id, help_text) + + def _cmd_search(self, open_id: str, keyword: str): + if not keyword: + send_feishu_msg(open_id, "用法: /search 流浪地球2\n或直接输入关键词") + return + + try: + resp = requests.post( + f"{CLOUDSEARCH_API}/api/query", + json={"q": keyword}, timeout=15 + ) + results = [] + for line in resp.text.strip().split("\n"): + try: + d = json.loads(line) + if d.get("type") == "result": + results.append(d) + except json.JSONDecodeError: + continue + + if not results: + send_feishu_msg(open_id, f"😞 未找到「{keyword}」的相关资源") + return + + # 构建飞书卡片 + elements = [] + for i, r in enumerate(results[:5]): + title = (r.get("title") or r.get("content", ""))[:50] + cloud = r.get("cloud_type", "?").upper() + pwd = r.get("password", "") + pwd_str = f" 🔑{pwd}" if pwd else "" + elements.append({ + "tag": "div", + "text": {"tag": "lark_md", "content": f"**{i+1}.** [{cloud}] {title}{pwd_str}"} + }) + + card = { + "header": { + "title": {"tag": "plain_text", "content": f"🔎 {keyword} — {len(results)}个结果"}, + "template": "blue" + }, + "elements": elements + [{ + "tag": "action", + "actions": [{ + "tag": "button", + "text": {"tag": "plain_text", "content": "🌐 查看更多"}, + "type": "primary", + "url": f"{CLOUDSEARCH_API}/?q={keyword}" + }] + }] + } + send_feishu_card(open_id, card) + + except Exception as e: + send_feishu_msg(open_id, f"❌ 搜索失败: {e}") + + def _cmd_subscribe(self, open_id: str, keyword: str): + if not keyword: + send_feishu_msg(open_id, "用法: /subscribe 流浪地球") + return + try: + self.db.execute( + "INSERT OR IGNORE INTO subscriptions (open_id, keyword) VALUES (?, ?)", + (open_id, keyword) + ) + self.db.commit() + send_feishu_msg(open_id, f"✅ 已订阅「{keyword}」,有新结果会通知你") + except Exception as e: + send_feishu_msg(open_id, f"❌ 订阅失败: {e}") + + def _cmd_unsub(self, open_id: str, keyword: str): + if not keyword: + send_feishu_msg(open_id, "用法: /unsub 流浪地球") + return + cur = self.db.execute( + "DELETE FROM subscriptions WHERE open_id=? AND keyword=?", + (open_id, keyword) + ) + self.db.commit() + if cur.rowcount > 0: + send_feishu_msg(open_id, f"✅ 已取消订阅「{keyword}」") + else: + send_feishu_msg(open_id, f"未找到「{keyword}」的订阅") + + def _cmd_mysubs(self, open_id: str): + rows = self.db.execute( + "SELECT keyword, created_at FROM subscriptions WHERE open_id=? ORDER BY created_at DESC", + (open_id,) + ).fetchall() + if not rows: + send_feishu_msg(open_id, "你还没有订阅任何关键词") + return + text = "📋 我的订阅:\n" + for kw, dt in rows: + text += f"• {kw} ({dt[:10]})\n" + send_feishu_msg(open_id, text) + + def check_subscriptions(self): + """检查所有订阅,有新结果时推送通知""" + subs = self.db.execute("SELECT DISTINCT keyword FROM subscriptions").fetchall() + for (kw,) in subs: + try: + resp = requests.post( + f"{CLOUDSEARCH_API}/api/query", + json={"q": kw}, timeout=10 + ) + count = sum(1 for line in resp.text.split("\n") + if '"type":"result"' in line) + if count > 0: + # 通知所有订阅此关键词的用户 + users = self.db.execute( + "SELECT open_id FROM subscriptions WHERE keyword=?", + (kw,) + ).fetchall() + for (uid,) in users: + send_feishu_msg(uid, f"🔔「{kw}」有新资源({count}个)!\n/search {kw}") + # Webhook 也推送 + send_webhook(f"🔔 关键词「{kw}」发现 {count} 个新资源") + except Exception as e: + logger.error(f"检查订阅[{kw}]失败: {e}") + +# ── Flask Web 服务 ───────────────────────────── +bot = FeishuBot() +app = Flask(__name__) + +@app.route("/health") +def health(): + return jsonify({"status": "ok", "bot": "feishu"}) + +@app.route("/feishu/event", methods=["POST"]) +def feishu_event(): + """飞书事件订阅回调""" + body = request.get_json() + logger.info(f"飞书事件: {json.dumps(body, ensure_ascii=False)[:300]}") + + # Token 验证(首次配置URL时) + if body.get("type") == "url_verification": + token = body.get("token", "") + if token == VERIFY_TOKEN: + return jsonify({"challenge": body.get("challenge", "")}) + return jsonify({"error": "invalid token"}), 403 + + # 事件回调验证 + if "header" in body: + # 收到消息事件 + event = body.get("event", {}) + msg_type = event.get("message", {}).get("message_type", "") + if msg_type == "text": + content = event["message"].get("content", "{}") + try: + text = json.loads(content).get("text", "") + except json.JSONDecodeError: + text = content + open_id = event.get("sender", {}).get("sender_id", {}).get("open_id", "") + if text and open_id: + bot.handle_text(open_id, text) + + return jsonify({"code": 0}) + +@app.route("/feishu/check", methods=["POST"]) +def trigger_check(): + """手动触发订阅检查""" + bot.check_subscriptions() + return jsonify({"ok": True}) + +# ── 启动入口 ─────────────────────────────────── +def main(): + if not APP_ID: + logger.warning("FEISHU_APP_ID 未设置,Bot 无法接收消息(仅 Webhook 可用)") + logger.info("飞书 Bot 启动,端口9531") + app.run(host="0.0.0.0", port=9531) + +if __name__ == "__main__": + main() diff --git a/cloudsearch_enrich/requirements.txt b/cloudsearch_enrich/requirements.txt new file mode 100644 index 0000000..6f879f5 --- /dev/null +++ b/cloudsearch_enrich/requirements.txt @@ -0,0 +1,3 @@ +flask>=3.0 +requests>=2.28 +python-telegram-bot>=20.0 diff --git a/cloudsearch_enrich/search_enricher.py b/cloudsearch_enrich/search_enricher.py new file mode 100644 index 0000000..125a0c1 --- /dev/null +++ b/cloudsearch_enrich/search_enricher.py @@ -0,0 +1,132 @@ +""" +CloudSearch Search Enricher v1.0.0 +搜索结果增强:TMDB匹配 + 过期检测 + 内容去重 +""" + +import time +import logging +from typing import List, Dict, Any, Optional +from tmdb_enricher import TMDBEnricher + +logger = logging.getLogger("enricher") + + +class SearchEnricher: + """搜索结果增强器""" + + def __init__(self, tmdb_api_key: str = "", cache_ttl: int = 86400): + self.tmdb = TMDBEnricher(tmdb_api_key, cache_ttl=cache_ttl) if tmdb_api_key else None + + def enrich_results(self, results: List[Dict], keyword: str = "") -> List[Dict]: + """批量增强搜索结果""" + if not results: + return results + + enriched = [] + titles_to_lookup = [] + + # 收集需要查 TMDB 的标题 + for r in results: + title = r.get("title", "") + if title and self.tmdb: + titles_to_lookup.append(title) + + # 批量查询 TMDB + tmdb_results = {} + if titles_to_lookup and self.tmdb: + tmdb_results = self.tmdb.enrich_batch(titles_to_lookup[:20], max_concurrent=5) + + # 应用增强 + for r in results: + title = r.get("title", "") + media = tmdb_results.get(title) + + enriched_item = dict(r) + if media: + enriched_item.update({ + "tmdb_id": media.tmdb_id, + "tmdb_url": media.tmdb_url, + "poster": media.poster_url, + "backdrop": media.backdrop_url, + "rating": media.rating, + "rating_count": media.rating_count, + "year": media.year, + "genres": media.genres, + "description": media.description, + "media_type": media.media_type, + "directors": media.directors, + "actors": media.actors[:5], + "enriched": True, + }) + + # 自动生成更好的标题 + if media.year and media.rating: + enriched_item["display_title"] = ( + f"{title} ({media.year}) ⭐{media.rating}" + ) + + enriched.append(enriched_item) + + return enriched + + def enrich_single(self, title: str, keyword: str = "") -> Optional[Dict]: + """增强单个标题""" + if not self.tmdb: + return None + media = self.tmdb.enrich(title) + if not media: + return None + return { + "title": title, + "tmdb_id": media.tmdb_id, + "poster": media.poster_url, + "rating": media.rating, + "year": media.year, + "genres": media.genres, + "description": media.description, + "media_type": media.media_type, + } + + +# Flask API wrapper +def create_enricher_api(tmdb_key: str = ""): + from flask import Flask, request, jsonify + app = Flask(__name__) + enricher = SearchEnricher(tmdb_key) + + @app.route("/health", methods=["GET"]) + def health(): + return jsonify({"status": "ok", "version": "1.0.0"}) + + @app.route("/enrich", methods=["POST"]) + def enrich(): + data = request.get_json() or {} + results = data.get("results", []) + keyword = data.get("keyword", "") + + if not results: + return jsonify({"error": "results required"}), 400 + + enriched = enricher.enrich_results(results, keyword) + return jsonify({"results": enriched, "count": len(enriched)}) + + @app.route("/lookup", methods=["POST"]) + def lookup(): + data = request.get_json() or {} + title = data.get("title", "") + if not title: + return jsonify({"error": "title required"}), 400 + + info = enricher.enrich_single(title) + return jsonify(info or {}) + + return app + + +if __name__ == "__main__": + import os + api_key = os.getenv("TMDB_API_KEY", "") + port = int(os.getenv("PORT", "9530")) + app = create_enricher_api(api_key) + logger.info(f"Enricher API on port {port}") + app.run(host="0.0.0.0", port=port) diff --git a/cloudsearch_enrich/subscription_monitor.py b/cloudsearch_enrich/subscription_monitor.py new file mode 100644 index 0000000..8bf5a18 --- /dev/null +++ b/cloudsearch_enrich/subscription_monitor.py @@ -0,0 +1,204 @@ +""" +CloudSearch Subscription Monitor v1.0.0 +关键词订阅 + 新资源检测 + 多渠道通知 +""" + +import os +import json +import time +import sqlite3 +import logging +import requests +from typing import List, Dict, Optional +from dataclasses import dataclass + +logger = logging.getLogger("subscription") + + +@dataclass +class Notification: + chat_id: int + keyword: str + new_count: int + results: List[dict] + channel: str = "telegram" # telegram / feishu / dingtalk + + +class SubscriptionMonitor: + """订阅监控:定时搜索关键词,发现新资源后推送通知""" + + def __init__(self, api_base: str, db_path: str = "/data/subscriptions.db", + tg_bot_token: str = None): + self.api_base = api_base.rstrip("/") + self.tg_token = tg_bot_token + self.db = sqlite3.connect(db_path, check_same_thread=False) + self._init_db() + + def _init_db(self): + self.db.executescript(""" + CREATE TABLE IF NOT EXISTS subscriptions ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + chat_id INTEGER NOT NULL, + keyword TEXT NOT NULL, + last_result_hash TEXT, + last_check TEXT, + created_at TEXT DEFAULT (datetime('now','localtime')), + UNIQUE(chat_id, keyword) + ); + CREATE TABLE IF NOT EXISTS sent_notifications ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + subscription_id INTEGER, + result_hash TEXT, + sent_at TEXT DEFAULT (datetime('now','localtime')), + FOREIGN KEY(subscription_id) REFERENCES subscriptions(id) + ); + """) + self.db.commit() + + def check_all(self, batch_size: int = 10) -> List[Notification]: + """检查所有订阅,返回需要通知的列表""" + subs = self.db.execute( + "SELECT id, chat_id, keyword, last_result_hash FROM subscriptions ORDER BY last_check ASC LIMIT ?", + (batch_size,) + ).fetchall() + + notifications = [] + for sub_id, chat_id, keyword, last_hash in subs: + try: + result = self._search(keyword) + new_hash = self._hash_results(result) + + if new_hash and new_hash != last_hash: + new_results = self._filter_new(sub_id, result, last_hash) + if new_results: + notifications.append(Notification( + chat_id=chat_id, + keyword=keyword, + new_count=len(new_results), + results=new_results[:5], + )) + + # 更新状态 + self.db.execute( + "UPDATE subscriptions SET last_result_hash=?, last_check=datetime('now','localtime') WHERE id=?", + (new_hash, sub_id) + ) + + except Exception as e: + logger.error(f"Check failed: {keyword} - {e}") + + self.db.commit() + return notifications + + def _search(self, keyword: str) -> list: + """搜索关键词""" + try: + resp = requests.post( + f"{self.api_base}/api/query", + json={"q": keyword}, + timeout=20 + ) + results = [] + for line in resp.text.strip().split("\n"): + try: + d = json.loads(line) + if d.get("type") == "result": + results.append({ + "title": d.get("title", ""), + "url": d.get("share_url", ""), + "cloud": d.get("cloud_type", ""), + "source": d.get("source", ""), + }) + except json.JSONDecodeError: + continue + return results + except Exception as e: + logger.error(f"Search error: {e}") + return [] + + def _hash_results(self, results: list) -> str: + """计算结果哈希""" + import hashlib + key = "|".join( + r.get("url", "")[:50] for r in sorted( + results, key=lambda x: x.get("url", "") + ) + ) + return hashlib.md5(key.encode()).hexdigest() + + def _filter_new(self, sub_id: int, results: list, last_hash: str) -> list: + """过滤出新结果""" + new = [] + for r in results: + rhash = str(hash(r.get("url", ""))) + existing = self.db.execute( + "SELECT id FROM sent_notifications WHERE subscription_id=? AND result_hash=?", + (sub_id, rhash) + ).fetchone() + if not existing: + new.append(r) + self.db.execute( + "INSERT OR IGNORE INTO sent_notifications (subscription_id, result_hash) VALUES (?,?)", + (sub_id, rhash) + ) + return new + + def notify_telegram(self, notif: Notification): + """通过 Telegram 发送通知""" + if not self.tg_token: + return + text = f"🔔 *{notif.keyword}* 有新资源!({notif.new_count}个)\n\n" + for i, r in enumerate(notif.results[:5]): + title = r.get("title", "")[:40] + url = r.get("url", "") + cloud = r.get("cloud", "?").upper() + text += f"{i+1}. [{cloud}] [{title}]({url})\n" + + try: + requests.post( + f"https://api.telegram.org/bot{self.tg_token}/sendMessage", + json={ + "chat_id": notif.chat_id, + "text": text, + "parse_mode": "Markdown", + "disable_web_page_preview": True, + }, + timeout=10 + ) + except Exception as e: + logger.error(f"TG notify failed: {e}") + + def notify_feishu(self, notif: Notification, webhook_url: str): + """通过飞书发送通知""" + text = f"🔔 {notif.keyword} 有新资源!({notif.new_count}个)\n" + for r in notif.results[:5]: + text += f"• [{r.get('cloud','?').upper()}] {r.get('title','')[:40]} {r.get('url','')}\n" + try: + requests.post(webhook_url, json={ + "msg_type": "text", + "content": {"text": text} + }, timeout=10) + except Exception as e: + logger.error(f"Feishu notify failed: {e}") + + def run_loop(self, interval_minutes: int = 15): + """循环运行""" + logger.info(f"Subscription monitor started (interval={interval_minutes}min)") + while True: + try: + notifs = self.check_all() + for n in notifs: + self.notify_telegram(n) + if notifs: + logger.info(f"Sent {len(notifs)} notifications") + except Exception as e: + logger.error(f"Monitor error: {e}") + time.sleep(interval_minutes * 60) + + +if __name__ == "__main__": + api = os.getenv("CLOUDSEARCH_API", "http://127.0.0.1:9527") + token = os.getenv("TG_BOT_TOKEN", "") + interval = int(os.getenv("CHECK_INTERVAL", "15")) + monitor = SubscriptionMonitor(api, tg_bot_token=token) + monitor.run_loop(interval) diff --git a/cloudsearch_enrich/tg_bot.py b/cloudsearch_enrich/tg_bot.py new file mode 100644 index 0000000..7df91ce --- /dev/null +++ b/cloudsearch_enrich/tg_bot.py @@ -0,0 +1,183 @@ +""" +CloudSearch Telegram Bot v1.0.0 +提供: /search /subscribe /hot /help +""" + +import os +import json +import time +import logging +import sqlite3 +from typing import Optional + +import requests +from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup +from telegram.ext import ( + Application, CommandHandler, MessageHandler, + CallbackQueryHandler, ContextTypes, filters +) + +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger("tgbot") + + +class CloudSearchBot: + def __init__(self, token: str, api_base: str, db_path: str = "/data/bot.db"): + self.token = token + self.api_base = api_base.rstrip("/") + self.db = sqlite3.connect(db_path, check_same_thread=False) + self._init_db() + + def _init_db(self): + self.db.execute(""" + CREATE TABLE IF NOT EXISTS subscriptions ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + chat_id INTEGER NOT NULL, + keyword TEXT NOT NULL, + last_check TEXT, + created_at TEXT DEFAULT (datetime('now', 'localtime')), + UNIQUE(chat_id, keyword) + ) + """) + self.db.commit() + + async def start(self, update: Update, context: ContextTypes.DEFAULT_TYPE): + await update.message.reply_text( + "🔍 *CloudSearch Bot* v1.0\n\n" + "命令:\n" + "/search 关键词 — 搜索网盘资源\n" + "/hot — 热门搜索\n" + "/subscribe 关键词 — 订阅关键词\n" + "/unsub 关键词 — 取消订阅\n" + "/mysubs — 我的订阅\n" + "/help — 帮助", + parse_mode="Markdown" + ) + + async def search(self, update: Update, context: ContextTypes.DEFAULT_TYPE): + keyword = " ".join(context.args) if context.args else "" + if not keyword: + await update.message.reply_text("用法: /search 流浪地球2") + return + + msg = await update.message.reply_text(f"🔎 搜索中: *{keyword}*...", parse_mode="Markdown") + + try: + resp = requests.post( + f"{self.api_base}/api/query", + json={"q": keyword}, + timeout=15 + ) + + # Parse NDJSON response + results = [] + content_info = None + for line in resp.text.strip().split("\n"): + try: + data = json.loads(line) + if data.get("type") == "result": + results.append(data) + elif data.get("type") == "stats": + content_info = data.get("content_info") + except json.JSONDecodeError: + continue + + if not results: + await msg.edit_text(f"😞 未找到「{keyword}」的相关资源") + return + + # Format top 5 results + text = f"🔎 *{keyword}* — {len(results)} 个结果\n\n" + for i, r in enumerate(results[:5]): + title = (r.get("title") or r.get("content", ""))[:40] + cloud = r.get("cloud_type", "?").upper() + url = r.get("share_url", "") + pwd = r.get("password", "") + pwd_str = f" 🔑`{pwd}`" if pwd else "" + text += f"{i+1}. [{cloud}] [{title}]({url}){pwd_str}\n" + + keyboard = [[ + InlineKeyboardButton("🌐 查看更多", url=f"{self.api_base}/?q={keyword}") + ]] + await msg.edit_text( + text, + parse_mode="Markdown", + disable_web_page_preview=True, + reply_markup=InlineKeyboardMarkup(keyboard) + ) + + except Exception as e: + await msg.edit_text(f"❌ 搜索失败: {e}") + + async def subscribe(self, update: Update, context: ContextTypes.DEFAULT_TYPE): + keyword = " ".join(context.args) if context.args else "" + if not keyword: + await update.message.reply_text("用法: /subscribe 流浪地球") + return + + try: + self.db.execute( + "INSERT OR IGNORE INTO subscriptions (chat_id, keyword) VALUES (?, ?)", + (update.effective_chat.id, keyword) + ) + self.db.commit() + await update.message.reply_text(f"✅ 已订阅: *{keyword}*", parse_mode="Markdown") + except Exception as e: + await update.message.reply_text(f"❌ 订阅失败: {e}") + + async def unsub(self, update: Update, context: ContextTypes.DEFAULT_TYPE): + keyword = " ".join(context.args) if context.args else "" + self.db.execute( + "DELETE FROM subscriptions WHERE chat_id=? AND keyword=?", + (update.effective_chat.id, keyword) + ) + self.db.commit() + await update.message.reply_text(f"🗑 已取消: *{keyword}*", parse_mode="Markdown") + + async def mysubs(self, update: Update, context: ContextTypes.DEFAULT_TYPE): + subs = self.db.execute( + "SELECT keyword, created_at FROM subscriptions WHERE chat_id=? ORDER BY created_at DESC LIMIT 20", + (update.effective_chat.id,) + ).fetchall() + if not subs: + await update.message.reply_text("📭 暂无订阅") + return + text = "📋 *我的订阅*\n" + "\n".join(f"• {s[0]}" for s in subs) + await update.message.reply_text(text, parse_mode="Markdown") + + async def hot(self, update: Update, context: ContextTypes.DEFAULT_TYPE): + try: + resp = requests.get(f"{self.api_base}/api/rankings/hot?limit=10", timeout=10) + data = resp.json() + keywords = data if isinstance(data, list) else data.get("keywords", []) + text = "🔥 *热门搜索*\n" + "\n".join( + f"{i+1}. {kw.get('keyword', str(kw))}" for i, kw in enumerate(keywords[:10]) + ) + except: + text = "🔥 获取热门失败,请稍后重试" + await update.message.reply_text(text, parse_mode="Markdown") + + async def help_cmd(self, update: Update, context: ContextTypes.DEFAULT_TYPE): + await self.start(update, context) + + def run(self): + app = Application.builder().token(self.token).build() + app.add_handler(CommandHandler("start", self.start)) + app.add_handler(CommandHandler("search", self.search)) + app.add_handler(CommandHandler("s", self.search)) + app.add_handler(CommandHandler("hot", self.hot)) + app.add_handler(CommandHandler("subscribe", self.subscribe)) + app.add_handler(CommandHandler("sub", self.subscribe)) + app.add_handler(CommandHandler("unsub", self.unsub)) + app.add_handler(CommandHandler("mysubs", self.mysubs)) + app.add_handler(CommandHandler("help", self.help_cmd)) + + logger.info("Bot starting...") + app.run_polling() + + +if __name__ == "__main__": + token = os.getenv("TG_BOT_TOKEN", "") + api = os.getenv("CLOUDSEARCH_API", "http://127.0.0.1:9527") + bot = CloudSearchBot(token, api) + bot.run() diff --git a/cloudsearch_enrich/tmdb_enricher.py b/cloudsearch_enrich/tmdb_enricher.py new file mode 100644 index 0000000..dd739da --- /dev/null +++ b/cloudsearch_enrich/tmdb_enricher.py @@ -0,0 +1,179 @@ +""" +CloudSearch TMDB Enricher v1.0.0 +自动匹配影视元数据:海报、评分、简介、年份、类型 +""" + +import time +import logging +from typing import Optional, Dict, Any, List +from dataclasses import dataclass, field +import requests + +logger = logging.getLogger(__name__) + +TMDB_API_BASE = "https://api.themoviedb.org/3" +TMDB_IMAGE_BASE = "https://image.tmdb.org/t/p/w500" + + +@dataclass +class MediaInfo: + """影视元数据""" + title: str = "" + original_title: str = "" + year: str = "" + poster_url: str = "" + backdrop_url: str = "" + rating: str = "" + rating_count: int = 0 + description: str = "" + genres: List[str] = field(default_factory=list) + media_type: str = "" # movie / tv + tmdb_id: int = 0 + directors: List[str] = field(default_factory=list) + actors: List[str] = field(default_factory=list) + region: str = "" + duration: str = "" + seasons: int = 0 + episodes: int = 0 + source: str = "tmdb" + tmdb_url: str = "" + + +class TMDBEnricher: + """TMDB 影视信息增强器""" + + # 常见网盘文件名模式 → 影视标题提取 + TITLE_PATTERNS = [ + # [4K] 流浪地球2 (2023) + (r'\[.*?\]\s*(.+?)\s*[\((](\d{4})[\))]', 2), + # 流浪地球2.2023.4K + (r'(.+?)\.(\d{4})\.(?:4K|1080[Pp]|2160[Pp]|HD)', 2), + # 流浪地球2 2023 + (r'(.+?)\s+(\d{4})\s', 2), + # S01E01 格式 + (r'(.+?)[\.\s][Ss](\d{2})[Ee](\d{2})', 1), + ] + + def __init__(self, api_key: str, language: str = "zh-CN", + cache_ttl: int = 86400): + self.api_key = api_key + self.language = language + self.cache_ttl = cache_ttl + self._cache: Dict[str, tuple] = {} # key → (data, timestamp) + + def enrich(self, title: str, media_type: str = None) -> Optional[MediaInfo]: + """根据标题查询 TMDB 元数据""" + clean_title, year = self._extract_title_year(title) + + cache_key = f"{clean_title}:{year}:{media_type}" + if cache_key in self._cache: + data, ts = self._cache[cache_key] + if time.time() - ts < self.cache_ttl: + return data + + # 智能判断类型 + if not media_type: + media_type = self._guess_type(clean_title) + + info = self._search(clean_title, year, media_type) + if info: + self._cache[cache_key] = (info, time.time()) + return info + + def enrich_batch(self, titles: List[str], max_concurrent: int = 5) -> Dict[str, MediaInfo]: + """批量查询""" + from concurrent.futures import ThreadPoolExecutor, as_completed + results = {} + with ThreadPoolExecutor(max_workers=max_concurrent) as ex: + futures = {ex.submit(self.enrich, t): t for t in titles} + for f in as_completed(futures): + try: + results[futures[f]] = f.result() + except Exception as e: + logger.warning(f"TMDB enrich failed: {futures[f]} - {e}") + return results + + def _extract_title_year(self, title: str) -> tuple: + """从文件名提取标题和年份""" + import re + for pattern, year_group in self.TITLE_PATTERNS: + m = re.search(pattern, title, re.IGNORECASE) + if m: + name = m.group(1).strip() + year = m.group(year_group) if year_group <= len(m.groups()) else "" + # 去掉常见的后缀 + name = re.sub(r'\s*[\[((].*?(?:完结|全\d+集|更新).*?[\]))]', '', name) + return name.strip(), year + return title.strip(), "" + + def _guess_type(self, title: str) -> str: + """根据标题特征判断电影/电视剧""" + import re + tv_patterns = [ + r'[Ss]\d{2}[Ee]\d{2}', r'第[一二三四五六七八九十\d]+季', + r'[Ss]eason\s*\d+', r'全\d+集', r'更新至\d+', + ] + for p in tv_patterns: + if re.search(p, title): + return "tv" + return "movie" + + def _search(self, title: str, year: str = "", media_type: str = "movie") -> Optional[MediaInfo]: + """搜索 TMDB""" + try: + # 搜索 + search_type = "tv" if media_type == "tv" else "movie" + params = { + "api_key": self.api_key, + "query": title, + "language": self.language, + "page": 1, + } + if year: + params["year" if search_type == "movie" else "first_air_date_year"] = year + + resp = requests.get( + f"{TMDB_API_BASE}/search/{search_type}", + params=params, timeout=10 + ) + data = resp.json() + results = data.get("results", []) + + if not results and search_type == "movie": + # 电视剧也试一下 + resp2 = requests.get( + f"{TMDB_API_BASE}/search/tv", + params=params, timeout=10 + ) + data2 = resp2.json() + results = data2.get("results", []) + + if not results: + return None + + item = results[0] + return self._parse_result(item, media_type) + + except Exception as e: + logger.error(f"TMDB search error: {title} - {e}") + return None + + def _parse_result(self, item: dict, media_type: str) -> MediaInfo: + """解析 TMDB 返回""" + mid = item.get("id", 0) + is_tv = media_type == "tv" or item.get("media_type") == "tv" + + return MediaInfo( + title=item.get("title") or item.get("name", ""), + original_title=item.get("original_title") or item.get("original_name", ""), + year=str(item.get("release_date", item.get("first_air_date", ""))[:4]), + poster_url=f"{TMDB_IMAGE_BASE}{item['poster_path']}" if item.get("poster_path") else "", + backdrop_url=f"{TMDB_IMAGE_BASE}{item['backdrop_path']}" if item.get("backdrop_path") else "", + rating=str(round(item.get("vote_average", 0), 1)), + rating_count=item.get("vote_count", 0), + description=(item.get("overview") or "")[:500], + genres=[g.get("name", "") for g in item.get("genre_ids", [])], + media_type="tv" if is_tv else "movie", + tmdb_id=mid, + tmdb_url=f"https://www.themoviedb.org/{'tv' if is_tv else 'movie'}/{mid}", + ) diff --git a/cloudsearch_transfer/Dockerfile b/cloudsearch_transfer/Dockerfile new file mode 100644 index 0000000..7aee082 --- /dev/null +++ b/cloudsearch_transfer/Dockerfile @@ -0,0 +1,18 @@ +FROM python:3.12-slim + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +ENV PORT=9528 +ENV TRANSFER_CONFIG_PATH=/data/transfer_config.json + +EXPOSE 9528 + +HEALTHCHECK --interval=30s --timeout=5s --retries=3 \ + CMD ["python", "server.py"] + +CMD ["python", "server.py"] diff --git a/cloudsearch_transfer/__init__.py b/cloudsearch_transfer/__init__.py new file mode 100644 index 0000000..03464b7 --- /dev/null +++ b/cloudsearch_transfer/__init__.py @@ -0,0 +1,32 @@ +"""CloudSearch Transfer v1.0.0 — 多网盘转存模块化服务 + +支持平台: quark, baidu, aliyun, uc, xunlei (+ 115/123/cloud189 扩展) + +架构: + cloudsearch_transfer/ + ├── adapter/ # 网盘适配器(每平台独立子包) + │ ├── base.py # 抽象基类 + │ ├── factory.py # 工厂+缓存 + │ ├── quark/ # 夸克网盘 (credential/transfer/cleanup) + │ ├── baidu/ # 百度网盘 + │ ├── aliyun/ # 阿里云盘 + │ ├── uc/ # UC网盘 + │ └── xunlei/ # 迅雷网盘 + ├── credential/ # 统一凭证管理 + │ └── manager.py + ├── orchestration/ # 转存编排 + │ └── transfer.py + ├── config.py # 配置管理 + ├── errors.py # 错误码 + └── server.py # HTTP API 服务 + +使用: + from cloudsearch_transfer import TransferOrchestrator, ConfigManager + + cm = ConfigManager() + orch = TransferOrchestrator(cm) + result = orch.transfer("https://pan.quark.cn/s/xxxx") + print(result.share_url) +""" + +__version__ = "1.0.0" diff --git a/cloudsearch_transfer/adapter/__init__.py b/cloudsearch_transfer/adapter/__init__.py new file mode 100644 index 0000000..59e8061 --- /dev/null +++ b/cloudsearch_transfer/adapter/__init__.py @@ -0,0 +1 @@ +"""CloudSearch Transfer — 适配器包""" diff --git a/cloudsearch_transfer/adapter/aliyun/__init__.py b/cloudsearch_transfer/adapter/aliyun/__init__.py new file mode 100644 index 0000000..3a6e5be --- /dev/null +++ b/cloudsearch_transfer/adapter/aliyun/__init__.py @@ -0,0 +1,297 @@ +""" +阿里云盘适配器 v1.0.0 +AliyunAdapter — 继承 BaseCloudDriveAdapter,实现阿里云盘全部转存能力。 + +组件: +- AliyunCredentialManager: refresh_token 刷新 + 缓存 +- AliyunTransfer: 4 步批量转存 +- AliyunCleanup: 回收站清理 + +URL 匹配: aliyundrive.com/s/ +""" + +import re +import logging +from typing import List, Dict, Tuple, Optional + +from ..base import BaseCloudDriveAdapter, FileInfo, match_url +from ..config import PlatformConfig, TransferConfig +from ..errors import TransferError, TransferErrorCode + +from .credential import AliyunCredentialManager +from .transfer import AliyunTransfer +from .cleanup import AliyunCleanup + +logger = logging.getLogger(__name__) + + +class AliyunAdapter(BaseCloudDriveAdapter): + """阿里云盘适配器""" + + PLATFORM_NAME = "阿里云盘" + PLATFORM_KEY = "aliyun" + + URL_PATTERNS = [ + r'aliyundrive\.com/s/([a-zA-Z0-9]+)', + r'alipan\.com/s/([a-zA-Z0-9]+)', + ] + + DEFAULT_HEADERS = { + "User-Agent": ( + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " + "AppleWebKit/537.36 (KHTML, like Gecko) " + "Chrome/135.0.0.0 Safari/537.36" + ), + "Accept": "application/json, text/plain, */*", + "Content-Type": "application/json", + "Referer": "https://aliyundrive.com", + } + + def __init__(self, config: PlatformConfig, transfer_config: TransferConfig): + super().__init__(config, transfer_config) + + # 创建凭证管理器(AliyunCredentialManager) + refresh_token = config.refresh_token or config.cookie or "" + self._credential = AliyunCredentialManager(refresh_token=refresh_token) + + # 初始化 drive_id + self._drive_id = "" + + # 创建子模块 + self._transfer: Optional[AliyunTransfer] = None + self._cleanup: Optional[AliyunCleanup] = None + + def _setup_session(self): + """初始化 session 和凭证""" + if self._credential.refresh_token: + # 验证 refresh_token 并获取 drive_id + if self._credential.validate(): + self._drive_id = self._credential.get_drive_id() + logger.info( + f"[AliyunAdapter] 凭证验证成功, drive_id={self._drive_id[:8]}..." + ) + else: + logger.warning("[AliyunAdapter] 凭证验证失败,转存功能可能不可用") + else: + logger.warning("[AliyunAdapter] 未配置 refresh_token") + + # ─── 核心抽象方法实现 ────────────────────────────────── + + def _get_share_detail(self, pwd_id: str, passcode: str = "") -> dict: + """ + 获取分享详情。 + 步骤①②: 先获取匿名分享信息,再获取 share_token。 + + Returns: + { + "title": "分享标题", + "share_id": "...", + "share_token": "...", + "files": [{"file_id": "...", "name": "...", "size": 0, "type": "file"}, ...], + } + """ + try: + transfer = self._get_transfer() + + # ① 获取分享信息(匿名) + share_info = transfer._get_share_info(pwd_id) + if not share_info: + raise TransferError( + TransferErrorCode.SHARE_NOT_EXIST, + platform=self.PLATFORM_KEY, + ) + + # ② 获取分享令牌(Auth) + share_token = transfer._get_share_token(pwd_id, passcode) + if not share_token: + raise TransferError( + TransferErrorCode.PASSCODE_WRONG if passcode else TransferErrorCode.SHARE_NOT_EXIST, + platform=self.PLATFORM_KEY, + message="获取分享令牌失败(可能需要提取码)", + ) + + return { + "title": share_info.get("share_name", share_info.get("share_title", "")), + "share_id": pwd_id, + "share_token": share_token, + "files": share_info.get("file_infos", []), + "creator_name": share_info.get("creator_name", ""), + } + + except TransferError: + raise + except Exception as e: + logger.exception(f"[AliyunAdapter] 获取分享详情失败: {e}") + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=str(e), + platform=self.PLATFORM_KEY, + ) + + def _save_files(self, pwd_id: str, detail: dict, save_dir: str) -> List[str]: + """ + 步骤③: 批量复制文件到自己的网盘。 + + Args: + pwd_id: 分享 ID + detail: _get_share_detail 的返回值 + save_dir: 目标目录(根目录用 "root") + + Returns: + 新文件 ID 列表 + """ + share_token = detail.get("share_token", "") + files = detail.get("files", []) + + if not share_token: + raise TransferError( + TransferErrorCode.SHARE_NOT_EXIST, + message="缺少 share_token", + platform=self.PLATFORM_KEY, + ) + + if not files: + raise TransferError( + TransferErrorCode.RESOURCE_EMPTY, + platform=self.PLATFORM_KEY, + ) + + file_ids = [f.get("file_id", "") for f in files if f.get("file_id")] + if not file_ids: + raise TransferError( + TransferErrorCode.RESOURCE_EMPTY, + message="无法提取文件 ID", + platform=self.PLATFORM_KEY, + ) + + # 确定目标目录 + to_parent = save_dir if save_dir and save_dir != "/" else "root" + + transfer = self._get_transfer() + new_ids = transfer._batch_copy(pwd_id, share_token, file_ids, to_parent) + + if not new_ids: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message="批量转存失败,所有文件复制均失败", + platform=self.PLATFORM_KEY, + ) + + return new_ids + + def _create_share( + self, file_ids: List[str], title: str, password: str = "" + ) -> Tuple[str, str]: + """ + 步骤④: 创建新分享链接。 + + Returns: + (share_url, share_password) + """ + if not file_ids: + raise TransferError( + TransferErrorCode.RESOURCE_EMPTY, + platform=self.PLATFORM_KEY, + ) + + transfer = self._get_transfer() + result = transfer._create_share(file_ids, password) + + share_url = result.get("share_url", "") + share_pwd = result.get("share_pwd", password) + + if not share_url: + raise TransferError( + TransferErrorCode.SHARE_LINK_FAIL, + message="创建分享链接失败", + platform=self.PLATFORM_KEY, + ) + + return share_url, share_pwd + + def get_files(self, parent_fid: str = "0") -> List[FileInfo]: + """ + 列出网盘目录下的文件。 + + NOTE: 当前实现为占位。如需完整功能,请调用阿里云盘 /adrive/v3/file/list API。 + """ + logger.warning("[AliyunAdapter] get_files() 未完整实现,返回空列表") + return [] + + def delete(self, file_ids: List[str]) -> bool: + """ + 删除文件(移入回收站)。 + + Args: + file_ids: 要删除的文件 ID 列表 + + Returns: + 是否全部删除成功 + """ + if not file_ids: + return True + + cleanup = self._get_cleanup() + result = cleanup.delete_files(file_ids) + return result.get("success", False) + + # ─── 扩展功能 ────────────────────────────────────────── + + def cleanup_files(self, file_ids: List[str]) -> Dict: + """ + 清理文件(移入回收站),返回详细结果。 + + Returns: + AliyunCleanup.delete_files() 的返回字典 + """ + cleanup = self._get_cleanup() + return cleanup.delete_files(file_ids) + + def force_refresh_token(self) -> bool: + """强制刷新 access_token""" + return self._credential.refresh() + + def get_credential_status(self) -> Dict: + """获取当前凭证状态""" + return self._credential.to_dict() + + # ─── 文件列表提取 ────────────────────────────────────── + + def _extract_file_list(self, detail: dict) -> List[FileInfo]: + """从分享详情中提取 FileInfo 列表""" + files = detail.get("files", []) + result = [] + for f in files: + result.append(FileInfo( + fid=f.get("file_id", ""), + name=f.get("name", ""), + size=int(f.get("size", 0)), + is_dir=f.get("type", "") == "folder", + ext=f.get("file_extension", ""), + )) + return result + + # ─── 内部辅助方法 ────────────────────────────────────── + + def _get_transfer(self) -> AliyunTransfer: + """懒加载获取 AliyunTransfer 实例""" + if self._transfer is None: + drive_id = self._drive_id or self._credential.get_drive_id() + self._transfer = AliyunTransfer( + credential=self._credential, + drive_id=drive_id, + to_parent_file_id=self.config.save_dir or "root", + request_timeout=self.transfer_config.request_timeout, + ) + return self._transfer + + def _get_cleanup(self) -> AliyunCleanup: + """懒加载获取 AliyunCleanup 实例""" + if self._cleanup is None: + drive_id = self._drive_id or self._credential.get_drive_id() + self._cleanup = AliyunCleanup( + credential=self._credential, + drive_id=drive_id, + request_timeout=self.transfer_config.request_timeout, + ) + return self._cleanup diff --git a/cloudsearch_transfer/adapter/aliyun/cleanup.py b/cloudsearch_transfer/adapter/aliyun/cleanup.py new file mode 100644 index 0000000..b70b930 --- /dev/null +++ b/cloudsearch_transfer/adapter/aliyun/cleanup.py @@ -0,0 +1,203 @@ +""" +阿里云盘回收站清理模块 v1.0.0 +将文件移入回收站(非直接删除),支持批量操作。 +""" + +import logging +from typing import List, Dict + +import requests + +from .credential import AliyunCredentialManager, API_HOST + +logger = logging.getLogger(__name__) + +# ─── API 端点 ────────────────────────────────────────────── + +# 批量操作(v4) +BATCH_URL = f"{API_HOST}/adrive/v4/batch" + +# 默认请求头 +DEFAULT_HEADERS = { + "User-Agent": ( + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " + "AppleWebKit/537.36 (KHTML, like Gecko) " + "Chrome/135.0.0.0 Safari/537.36" + ), + "Accept": "application/json, text/plain, */*", + "Content-Type": "application/json", + "Referer": "https://aliyundrive.com", +} + + +class AliyunCleanup: + """ + 阿里云盘回收站清理 + + 将文件移入回收站(放入回收站,非永久删除)。 + 使用 v4 批量接口,支持一次清理多个文件。 + + 用法: + credential = AliyunCredentialManager(refresh_token="xxx") + cleanup = AliyunCleanup(credential, drive_id="12345") + result = cleanup.delete_files(["file_id_1", "file_id_2"]) + """ + + def __init__( + self, + credential: AliyunCredentialManager, + drive_id: str = "", + request_timeout: int = 30, + ): + self.credential = credential + self.drive_id = drive_id or credential.get_drive_id() + self.request_timeout = request_timeout + self._session = requests.Session() + self._session.headers.update(DEFAULT_HEADERS) + + # ─── 公开 API ────────────────────────────────────────── + + def delete_files(self, file_ids: List[str]) -> Dict: + """ + 将指定文件移入回收站(批量)。 + + Args: + file_ids: 要删除的文件 ID 列表 + + Returns: + { + "success": True/False, + "deleted_count": 成功删除数量, + "total_count": 总文件数, + "failed_ids": 失败的文件 ID 列表, + "error": None or "错误信息", + } + + 实现: + POST /adrive/v4/batch + { + "requests": [ + { + "url": "/recyclebin/trash", + "body": {"file_id": "...", "drive_id": "..."}, + "headers": {"Content-Type": "application/json"}, + "id": "...", + "method": "POST" + } + ], + "resource": "file" + } + """ + if not file_ids: + return self._error("文件 ID 列表为空") + + drive_id = self.drive_id + if not drive_id: + drive_id = self.credential.get_drive_id() + if not drive_id: + return self._error("缺少 drive_id,无法执行删除操作") + + # 构建批量请求体 + requests_list = [] + for fid in file_ids: + requests_list.append({ + "url": "/recyclebin/trash", + "body": { + "drive_id": drive_id, + "file_id": fid, + }, + "headers": {"Content-Type": "application/json"}, + "id": fid, + "method": "POST", + }) + + try: + headers = self.credential.get_headers() + + resp = self._session.post( + BATCH_URL, + json={"requests": requests_list, "resource": "file"}, + headers=headers, + timeout=self.request_timeout, + ) + data = resp.json() + + if resp.status_code != 200: + logger.error( + f"[AliyunCleanup] 批量删除失败: " + f"HTTP {resp.status_code}, {data}" + ) + return self._error(f"HTTP {resp.status_code}") + + code = data.get("code", "") + if code: + logger.error( + f"[AliyunCleanup] 批量删除 API 错误: " + f"code={code}, message={data.get('message', '')}" + ) + return self._error(data.get("message", f"API code={code}")) + + # 统计结果 + responses = data.get("responses", []) + success_ids = [] + failed_ids = [] + + for item in responses: + status = item.get("status", 0) + fid = item.get("id", "") + if status in (200, 201, 202): + success_ids.append(fid) + else: + logger.warning( + f"[AliyunCleanup] 删除文件失败: " + f"id={fid}, status={status}, body={item.get('body', {})}" + ) + failed_ids.append(fid) + + logger.info( + f"[AliyunCleanup] 删除完成: " + f"成功={len(success_ids)}, 失败={len(failed_ids)}, 总计={len(file_ids)}" + ) + + return { + "success": len(failed_ids) == 0, + "deleted_count": len(success_ids), + "total_count": len(file_ids), + "success_ids": success_ids, + "failed_ids": failed_ids, + "error": None, + } + + except requests.RequestException as e: + logger.error(f"[AliyunCleanup] 批量删除网络异常: {e}") + return self._error(str(e)) + except Exception as e: + logger.exception(f"[AliyunCleanup] 批量删除异常: {e}") + return self._error(str(e)) + + def empty_recycle_bin(self) -> Dict: + """ + 清空回收站(永久删除回收站中的所有文件)。 + + NOTE: 阿里云盘 API 目前不直接支持清空回收站, + 此方法作为占位,需要逐个文件 ID 调用 delete_files。 + 实际使用请先 list 回收站内容再调用 delete_files。 + + Returns: + {"success": False, "error": "清空回收站需要通过 list + delete 两步完成"} + """ + logger.warning("[AliyunCleanup] 清空回收站 API 暂未实现,需要 list+delete 两步") + return self._error("清空回收站需要通过列出回收站内容 + 逐个删除两步完成,尚未实现") + + # ─── 工具方法 ────────────────────────────────────────── + + def _error(self, message: str) -> Dict: + """构造错误返回""" + return { + "success": False, + "deleted_count": 0, + "total_count": 0, + "success_ids": [], + "failed_ids": [], + "error": message, + } diff --git a/cloudsearch_transfer/adapter/aliyun/credential.py b/cloudsearch_transfer/adapter/aliyun/credential.py new file mode 100644 index 0000000..3e3fbf6 --- /dev/null +++ b/cloudsearch_transfer/adapter/aliyun/credential.py @@ -0,0 +1,216 @@ +""" +阿里云盘凭证管理器 v1.0.0 +refresh_token → access_token 刷新 + 自动缓存 + 过期前自动刷新 +""" + +import time +import logging +import threading +from typing import Dict, Optional +from dataclasses import dataclass, field + +import requests + +logger = logging.getLogger(__name__) + +# ─── 常量 ────────────────────────────────────────────────── + +API_HOST = "https://api.aliyundrive.com" +TOKEN_REFRESH_URL = f"{API_HOST}/token/refresh" + +DEFAULT_HEADERS = { + "User-Agent": ( + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " + "AppleWebKit/537.36 (KHTML, like Gecko) " + "Chrome/135.0.0.0 Safari/537.36" + ), + "Accept": "application/json, text/plain, */*", + "Content-Type": "application/json", +} + + +@dataclass +class TokenInfo: + """缓存的 Token 信息""" + access_token: str = "" + refresh_token: str = "" + expires_at: float = 0.0 # Unix 时间戳 + drive_id: str = "" + user_id: str = "" + nick_name: str = "" + default_sbox_drive_id: str = "" + + @property + def is_expired(self) -> bool: + """检查 access_token 是否已过期(提前 60s 视为过期)""" + return time.time() >= (self.expires_at - 60) + + @property + def is_valid(self) -> bool: + return bool(self.access_token) and not self.is_expired + + +class AliyunCredentialManager: + """ + 阿里云盘凭证管理器 + + 职责: + - 使用 refresh_token 换取 access_token + - 缓存 access_token / expires_at / drive_id + - 过期前自动刷新(提前 60s) + - 线程安全 + + 用法: + mgr = AliyunCredentialManager(refresh_token="xxx") + mgr.refresh() # 强制刷新 + headers = mgr.get_headers() # 获取带 Auth 的请求头 + is_ok = mgr.validate() # 验证 refresh_token 有效性 + """ + + def __init__(self, refresh_token: str = ""): + self._refresh_token = refresh_token.strip() + self._token: Optional[TokenInfo] = None + self._lock = threading.Lock() + self._session = requests.Session() + self._session.headers.update(DEFAULT_HEADERS) + + # ─── 公开 API ────────────────────────────────────────── + + def refresh(self) -> bool: + """ + 使用 refresh_token 换取 access_token。 + 返回 True 表示成功,False 表示失败。 + """ + with self._lock: + return self._do_refresh() + + def get_headers(self) -> Dict[str, str]: + """ + 获取带 Authorization 的请求头。 + 自动检查 token 有效性,必要时自动刷新。 + + Returns: + {"Authorization": "Bearer ", ...} + """ + self._ensure_token_valid() + headers = {} + if self._token and self._token.access_token: + headers["Authorization"] = f"Bearer {self._token.access_token}" + return headers + + def get_access_token(self) -> str: + """获取当前有效的 access_token(必要时自动刷新)""" + self._ensure_token_valid() + return self._token.access_token if self._token else "" + + def get_drive_id(self) -> str: + """获取默认 drive_id""" + self._ensure_token_valid() + return self._token.drive_id if self._token else "" + + def get_sbox_drive_id(self) -> str: + """获取保险箱 drive_id""" + self._ensure_token_valid() + return self._token.default_sbox_drive_id if self._token else "" + + def validate(self) -> bool: + """ + 验证 refresh_token 是否有效。 + 要求 refresh_token 长度 >= 20,且能成功换取 access_token。 + """ + if not self._refresh_token or len(self._refresh_token) < 20: + logger.warning("[AliyunCredential] refresh_token 长度不足 20,验证失败") + return False + return self.refresh() + + @property + def refresh_token(self) -> str: + return self._refresh_token + + @refresh_token.setter + def refresh_token(self, value: str): + """更新 refresh_token(通常在 API 返回新 refresh_token 后调用)""" + self._refresh_token = value.strip() + # 清除旧缓存,下次请求自动刷新 + with self._lock: + self._token = None + + # ─── 内部方法 ────────────────────────────────────────── + + def _ensure_token_valid(self): + """确保 token 有效(过期则自动刷新)""" + if self._token is None or self._token.is_expired: + self.refresh() + + def _do_refresh(self) -> bool: + """实际执行 token 刷新""" + if not self._refresh_token: + logger.error("[AliyunCredential] 没有 refresh_token,无法刷新") + return False + + try: + resp = self._session.post( + TOKEN_REFRESH_URL, + json={"refresh_token": self._refresh_token}, + timeout=30, + ) + data = resp.json() + + if resp.status_code != 200 or "access_token" not in data: + code = data.get("code", "Unknown") + message = data.get("message", "") + logger.error( + f"[AliyunCredential] 刷新 token 失败: " + f"HTTP {resp.status_code} code={code} msg={message}" + ) + return False + + # 解析响应 + access_token = data.get("access_token", "") + expires_in = int(data.get("expires_in", 7200)) + new_refresh = data.get("refresh_token", self._refresh_token) + + self._token = TokenInfo( + access_token=access_token, + refresh_token=new_refresh, + expires_at=time.time() + expires_in, + drive_id=str(data.get("default_drive_id", "")), + user_id=str(data.get("user_id", "")), + nick_name=str(data.get("nick_name", "")), + default_sbox_drive_id=str(data.get("default_sbox_drive_id", "")), + ) + + # 更新 refresh_token(服务端可能下发新的) + if new_refresh != self._refresh_token: + logger.info( + "[AliyunCredential] refresh_token 已轮换,新旧前缀: " + f"{self._refresh_token[:8]}... → {new_refresh[:8]}..." + ) + self._refresh_token = new_refresh + + logger.info( + f"[AliyunCredential] Token 刷新成功 " + f"(user={self._token.nick_name}, " + f"expires_in={expires_in}s, " + f"drive_id={self._token.drive_id[:8]}...)" + ) + return True + + except requests.RequestException as e: + logger.error(f"[AliyunCredential] 刷新 token 网络异常: {e}") + return False + except Exception as e: + logger.exception(f"[AliyunCredential] 刷新 token 未知异常: {e}") + return False + + def to_dict(self) -> dict: + """导出当前状态(用于持久化)""" + self._ensure_token_valid() + return { + "refresh_token": self._refresh_token, + "access_token": self._token.access_token if self._token else "", + "expires_at": self._token.expires_at if self._token else 0, + "drive_id": self._token.drive_id if self._token else "", + "user_id": self._token.user_id if self._token else "", + "nick_name": self._token.nick_name if self._token else "", + } diff --git a/cloudsearch_transfer/adapter/aliyun/transfer.py b/cloudsearch_transfer/adapter/aliyun/transfer.py new file mode 100644 index 0000000..cb90a08 --- /dev/null +++ b/cloudsearch_transfer/adapter/aliyun/transfer.py @@ -0,0 +1,493 @@ +""" +阿里云盘转存模块 v1.0.0 +实现 4 步批量转存流程:获取分享详情 → 获取分享令牌 → 批量复制文件 → 创建新分享 +""" + +import re +import time +import logging +from typing import List, Dict, Tuple, Optional + +import requests + +from .credential import AliyunCredentialManager, API_HOST + +logger = logging.getLogger(__name__) + +# ─── API 端点 ────────────────────────────────────────────── + +# ① 获取分享详情(匿名) +SHARE_INFO_URL = f"{API_HOST}/adrive/v3/share_link/get_share_by_anonymous" + +# ② 获取分享令牌(需 Auth) +SHARE_TOKEN_URL = f"{API_HOST}/v2/share_link/get_share_token" + +# ③ 批量操作(复制文件) +BATCH_URL = f"{API_HOST}/adrive/v4/batch" + +# ④ 创建分享 +CREATE_SHARE_URL = f"{API_HOST}/adrive/v2/share_link/create" + +# ─── URL 模式 ────────────────────────────────────────────── + +# 匹配 aliyundrive.com/s/ +URL_PATTERN = re.compile(r'aliyundrive\.com/s/([a-zA-Z0-9]+)') + +# ─── 默认请求头 ──────────────────────────────────────────── + +DEFAULT_HEADERS = { + "User-Agent": ( + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " + "AppleWebKit/537.36 (KHTML, like Gecko) " + "Chrome/135.0.0.0 Safari/537.36" + ), + "Accept": "application/json, text/plain, */*", + "Content-Type": "application/json", + "Referer": "https://aliyundrive.com", +} + + +class AliyunTransfer: + """ + 阿里云盘批量转存 + + 四步流程: + ① 获取分享详情(匿名):POST /adrive/v3/share_link/get_share_by_anonymous + ② 获取分享令牌(Auth):POST /v2/share_link/get_share_token + ③ 批量复制文件:POST /adrive/v4/batch (X-Share-Token 头) + ④ 创建新分享:POST /adrive/v2/share_link/create + + 用法: + credential = AliyunCredentialManager(refresh_token="xxx") + transfer = AliyunTransfer(credential, drive_id="12345") + result = transfer.transfer( + share_url="https://www.aliyundrive.com/s/abc123", + share_password="", + to_parent_file_id="root", + ) + """ + + def __init__( + self, + credential: AliyunCredentialManager, + drive_id: str = "", + to_parent_file_id: str = "root", + request_timeout: int = 30, + ): + self.credential = credential + self.drive_id = drive_id or credential.get_drive_id() + self.to_parent_file_id = to_parent_file_id + self.request_timeout = request_timeout + self._session = requests.Session() + self._session.headers.update(DEFAULT_HEADERS) + + # ─── 公开 API ────────────────────────────────────────── + + def transfer( + self, + share_url: str, + share_password: str = "", + to_parent_file_id: str = None, + new_share_password: str = "", + expiration: str = "", + ) -> Dict: + """ + 执行完整的转存流程。 + + Args: + share_url: 阿里云盘分享链接(如 https://www.aliyundrive.com/s/abc123) + share_password: 分享提取码(如有) + to_parent_file_id: 转存目标目录 file_id,默认用初始化时的值 + new_share_password: 新分享的密码(空=无密码) + expiration: 分享有效期,空=永久 + + Returns: + { + "success": True/False, + "share_name": "...", + "new_file_ids": ["id1", "id2"], + "new_share_url": "https://...", + "new_share_password": "...", + "error": None or "...", + } + """ + parent_id = to_parent_file_id or self.to_parent_file_id + + try: + # ① 获取分享详情 + share_id = self._extract_share_id(share_url) + if not share_id: + return self._error("无法从 URL 提取分享 ID") + + share_info = self._get_share_info(share_id) + if not share_info: + return self._error("分享不存在或已失效") + + share_name = share_info.get("share_name", "") + file_infos = share_info.get("file_infos", []) + if not file_infos: + return self._error("分享内容为空") + + logger.info( + f"[AliyunTransfer] 分享详情获取成功: " + f"name={share_name}, files={len(file_infos)}" + ) + + # ② 获取分享令牌 + share_token = self._get_share_token(share_id, share_password) + if not share_token: + return self._error("获取分享令牌失败(可能需要提取码)") + + logger.info(f"[AliyunTransfer] 分享令牌获取成功") + + # ③ 批量复制文件 + file_ids = [fi.get("file_id", "") for fi in file_infos if fi.get("file_id")] + if not file_ids: + return self._error("无法提取文件 ID") + + new_file_ids = self._batch_copy(share_id, share_token, file_ids, parent_id) + if not new_file_ids: + return self._error("批量转存失败,请检查权限或容量") + + logger.info(f"[AliyunTransfer] 批量转存成功: {len(new_file_ids)} 个文件") + + # ④ 创建新分享 + share_result = self._create_share( + new_file_ids, + share_password=new_share_password, + expiration=expiration, + ) + + new_share_url = share_result.get("share_url", "") + new_share_pwd = share_result.get("share_pwd", new_share_password) + + logger.info(f"[AliyunTransfer] 新分享创建成功: {new_share_url}") + + return { + "success": True, + "share_name": share_name, + "share_id": share_id, + "new_file_ids": new_file_ids, + "new_share_url": new_share_url, + "new_share_password": new_share_pwd, + "error": None, + } + + except Exception as e: + logger.exception(f"[AliyunTransfer] 转存异常: {e}") + return self._error(str(e)) + + def get_share_info(self, share_url: str) -> Optional[Dict]: + """ + 仅获取分享详情(不转存)。 + + Returns: + {"share_name": "...", "file_infos": [...]} or None + """ + share_id = self._extract_share_id(share_url) + if not share_id: + logger.error(f"[AliyunTransfer] 无法从 URL 提取 share_id: {share_url}") + return None + return self._get_share_info(share_id) + + # ─── 步骤 ①:获取分享详情 ─────────────────────────────── + + def _get_share_info(self, share_id: str) -> Optional[Dict]: + """ + POST /adrive/v3/share_link/get_share_by_anonymous + 请求体: {"share_id": "..."} + 响应: {"share_name": "...", "file_infos": [{"file_id": "...", "name": "...", ...}]} + """ + try: + resp = self._session.post( + SHARE_INFO_URL, + json={"share_id": share_id}, + timeout=self.request_timeout, + ) + data = resp.json() + + if resp.status_code != 200: + logger.error( + f"[AliyunTransfer] 获取分享详情失败: " + f"HTTP {resp.status_code}, {data}" + ) + return None + + # 检查业务错误码 + code = data.get("code", "") + if code: + logger.error( + f"[AliyunTransfer] 获取分享详情 API 错误: " + f"code={code}, message={data.get('message', '')}" + ) + return None + + return { + "share_name": data.get("share_name", ""), + "share_title": data.get("share_title", data.get("share_name", "")), + "file_infos": data.get("file_infos", []), + "expiration": data.get("expiration", ""), + "creator_name": data.get("creator_name", ""), + "creator_id": data.get("creator_id", ""), + } + + except requests.RequestException as e: + logger.error(f"[AliyunTransfer] 获取分享详情网络异常: {e}") + return None + except Exception as e: + logger.exception(f"[AliyunTransfer] 获取分享详情异常: {e}") + return None + + # ─── 步骤 ②:获取分享令牌 ──────────────────────────────── + + def _get_share_token(self, share_id: str, share_password: str = "") -> Optional[str]: + """ + POST /v2/share_link/get_share_token + 请求体: {"share_id": "..."} + 需要 Auth 头 + 响应: {"share_token": "..."} + """ + try: + headers = self.credential.get_headers() + resp = self._session.post( + SHARE_TOKEN_URL, + json={ + "share_id": share_id, + "share_pwd": share_password, + }, + headers=headers, + timeout=self.request_timeout, + ) + data = resp.json() + + if resp.status_code != 200: + logger.error( + f"[AliyunTransfer] 获取分享令牌失败: " + f"HTTP {resp.status_code}, {data}" + ) + return None + + code = data.get("code", "") + if code: + logger.error( + f"[AliyunTransfer] 获取分享令牌 API 错误: " + f"code={code}, message={data.get('message', '')}" + ) + return None + + share_token = data.get("share_token", "") + if not share_token: + logger.error("[AliyunTransfer] 响应中缺少 share_token") + return None + + return share_token + + except requests.RequestException as e: + logger.error(f"[AliyunTransfer] 获取分享令牌网络异常: {e}") + return None + except Exception as e: + logger.exception(f"[AliyunTransfer] 获取分享令牌异常: {e}") + return None + + # ─── 步骤 ③:批量复制文件 ──────────────────────────────── + + def _batch_copy( + self, + share_id: str, + share_token: str, + file_ids: List[str], + to_parent_file_id: str = "root", + ) -> List[str]: + """ + POST /adrive/v4/batch + 头: X-Share-Token: + 请求体: + { + "requests": [ + { + "url": "/file/copy", + "body": { + "file_id": "...", + "share_id": "...", + "to_drive_id": "...", + "to_parent_file_id": "..." + } + } + ] + } + 响应: {"responses": [{"status": 200, "body": {"file_id": "new_id"}}, ...]} + 返回新的 file_id 列表 + """ + drive_id = self.drive_id + if not drive_id: + drive_id = self.credential.get_drive_id() + if not drive_id: + logger.error("[AliyunTransfer] 缺少 drive_id,无法转存") + return [] + + # 构建批量请求体 + requests_list = [] + for fid in file_ids: + requests_list.append({ + "url": "/file/copy", + "body": { + "file_id": fid, + "share_id": share_id, + "to_drive_id": drive_id, + "to_parent_file_id": to_parent_file_id, + }, + "headers": {"Content-Type": "application/json"}, + "id": fid, + "method": "POST", + }) + + try: + headers = self.credential.get_headers() + headers["X-Share-Token"] = share_token + + resp = self._session.post( + BATCH_URL, + json={"requests": requests_list, "resource": "file"}, + headers=headers, + timeout=self.request_timeout * 2, # 批量操作可能较慢 + ) + data = resp.json() + + if resp.status_code != 200: + logger.error( + f"[AliyunTransfer] 批量复制失败: " + f"HTTP {resp.status_code}, {data}" + ) + return [] + + code = data.get("code", "") + if code: + logger.error( + f"[AliyunTransfer] 批量复制 API 错误: " + f"code={code}, message={data.get('message', '')}" + ) + return [] + + # 提取新 file_id + new_ids = [] + responses = data.get("responses", []) + for item in responses: + status = item.get("status", 0) + body = item.get("body", {}) + if status in (200, 201, 202): + new_fid = body.get("file_id", "") + if new_fid: + new_ids.append(new_fid) + else: + logger.warning( + f"[AliyunTransfer] 单个文件复制失败: " + f"id={item.get('id')}, status={status}, body={body}" + ) + + if not new_ids: + logger.error("[AliyunTransfer] 所有文件复制均失败") + elif len(new_ids) < len(file_ids): + logger.warning( + f"[AliyunTransfer] 部分文件复制成功: " + f"{len(new_ids)}/{len(file_ids)}" + ) + + return new_ids + + except requests.RequestException as e: + logger.error(f"[AliyunTransfer] 批量复制网络异常: {e}") + return [] + except Exception as e: + logger.exception(f"[AliyunTransfer] 批量复制异常: {e}") + return [] + + # ─── 步骤 ④:创建新分享 ────────────────────────────────── + + def _create_share( + self, + file_ids: List[str], + share_password: str = "", + expiration: str = "", + ) -> Dict: + """ + POST /adrive/v2/share_link/create + 请求体: {"drive_id": "...", "file_id_list": [...], "share_pwd": "...", "expiration": "..."} + 响应: {"share_url": "...", "share_id": "..."} + """ + drive_id = self.drive_id or self.credential.get_drive_id() + if not drive_id: + logger.error("[AliyunTransfer] 缺少 drive_id,无法创建分享") + return {"share_url": "", "share_pwd": ""} + + body = { + "drive_id": drive_id, + "file_id_list": file_ids, + "share_pwd": share_password or "", + "expiration": expiration or "", + } + + try: + headers = self.credential.get_headers() + resp = self._session.post( + CREATE_SHARE_URL, + json=body, + headers=headers, + timeout=self.request_timeout, + ) + data = resp.json() + + if resp.status_code != 200: + logger.error( + f"[AliyunTransfer] 创建分享失败: " + f"HTTP {resp.status_code}, {data}" + ) + return {"share_url": "", "share_pwd": share_password} + + code = data.get("code", "") + if code: + logger.error( + f"[AliyunTransfer] 创建分享 API 错误: " + f"code={code}, message={data.get('message', '')}" + ) + return {"share_url": "", "share_pwd": share_password} + + share_url = data.get("share_url", "") + share_pwd = data.get("share_pwd", share_password) + + return {"share_url": share_url, "share_pwd": share_pwd} + + except requests.RequestException as e: + logger.error(f"[AliyunTransfer] 创建分享网络异常: {e}") + return {"share_url": "", "share_pwd": share_password} + except Exception as e: + logger.exception(f"[AliyunTransfer] 创建分享异常: {e}") + return {"share_url": "", "share_pwd": share_password} + + # ─── URL 解析 ────────────────────────────────────────── + + @staticmethod + def _extract_share_id(url: str) -> Optional[str]: + """从阿里云盘分享 URL 中提取 share_id""" + m = URL_PATTERN.search(url) + if m: + return m.group(1) + return None + + @staticmethod + def extract_share_id_static(url: str) -> Optional[str]: + """静态方法:提取 share_id""" + return AliyunTransfer._extract_share_id(url) + + # ─── 工具方法 ────────────────────────────────────────── + + def _error(self, message: str) -> Dict: + """构造错误返回""" + return { + "success": False, + "share_name": "", + "share_id": "", + "new_file_ids": [], + "new_share_url": "", + "new_share_password": "", + "error": message, + } diff --git a/cloudsearch_transfer/adapter/baidu/__init__.py b/cloudsearch_transfer/adapter/baidu/__init__.py new file mode 100644 index 0000000..5e20d45 --- /dev/null +++ b/cloudsearch_transfer/adapter/baidu/__init__.py @@ -0,0 +1,253 @@ +""" +百度网盘适配器 — CloudSearch Transfer v1.0.0 +参考 cloud-auto-save 的 BaiduNetDisk + netdisk 的 PanbaiduSave + +完整的 5 步转存流程 + bdstoken 管理 + 路径删除 + 广告过滤 +""" + +import logging +from typing import List, Tuple + +from ..base import BaseCloudDriveAdapter, FileInfo +from ...config import PlatformConfig, TransferConfig +from ...errors import TransferError, TransferErrorCode + +from .credential import BaiduCredentialManager +from .transfer import BaiduTransfer +from .cleanup import BaiduCleanup + +logger = logging.getLogger(__name__) + + +class BaiduAdapter(BaseCloudDriveAdapter): + """百度网盘适配器 + + 完整的 Cookie + bdstoken 机制,支持: + - 验证分享链接 + 提取码 + - 5 步转存到自己的网盘 + - 创建新分享 + - 按文件名删除文件 + - 广告文件过滤 + """ + + PLATFORM_NAME = "百度网盘" + PLATFORM_KEY = "baidu" + URL_PATTERNS = [ + r'pan\.baidu\.com/s/1([A-Za-z0-9_-]+)', + ] + + def __init__(self, config: PlatformConfig, transfer_config: TransferConfig): + super().__init__(config, transfer_config) + + # 凭证管理器 + self.credential = BaiduCredentialManager( + cookie=config.cookie, + session=self.session, + ) + + if not self.credential.validate(): + raise TransferError( + TransferErrorCode.NOT_LOGIN, + message="百度网盘 Cookie 无效或太短 (需 >= 50 字符)", + platform=self.PLATFORM_KEY, + ) + + # 预热 bdstoken + try: + self.credential.get_bdstoken() + except TransferError as e: + logger.warning(f"预取 bdstoken 失败: {e},将在首次使用时重试") + + # 转存执行器 & 清理器 + self._transfer = BaiduTransfer(self.session, self.credential) + self._cleanup = BaiduCleanup( + self.session, self.credential, + ad_keywords=config.banned_keywords or None, + ) + + # 暂存最近一次转存的文件信息(供 _filter_ads 使用) + self._last_transfer_files: List[dict] = [] + + # ─── session 初始化 ───────────────────────────────────── + + def _setup_session(self): + """设置 session 级别的 Cookie""" + if self.config.cookie: + self.session.headers["Cookie"] = self.config.cookie + self.session.headers["Referer"] = "https://pan.baidu.com/" + + # ─── 核心抽象方法实现 ────────────────────────────────── + + def _get_share_detail(self, pwd_id: str, passcode: str = "") -> dict: + """获取百度分享详情(步骤 ①+②) + + Args: + pwd_id: URL 中的 surl (s/1 后面的部分) + passcode: 提取码(可选) + + Returns: + {"title": str, "fs_ids": [str], "filenames": [str], ...} + """ + bdstoken = self.credential.get_bdstoken() + + # ① 验证提取码(如果有) + if passcode: + self._transfer._verify_password(pwd_id, passcode, bdstoken) + + # ② 解析分享页 + share_info = self._transfer._parse_share_page(pwd_id) + + return { + "title": share_info.get("title", ""), + "shareid": share_info["shareid"], + "uk": share_info["uk"], + "fs_ids": share_info["fs_ids"], + "filenames": share_info["filenames"], + } + + def _save_files(self, pwd_id: str, detail: dict, + save_dir: str) -> List[str]: + """转存文件到自己的百度网盘(步骤 ③+④) + + Args: + pwd_id: surl + detail: _get_share_detail 返回的 dict + save_dir: 目标目录 + + Returns: + 转存后的新 fs_id 列表 + """ + bdstoken = self.credential.get_bdstoken() + shareid = detail["shareid"] + uk = detail["uk"] + fs_ids = detail["fs_ids"] + filenames = detail.get("filenames", []) + + # ③ 转存 + self._transfer._transfer_files(shareid, uk, fs_ids, save_dir, bdstoken) + + # ④ 列出目录匹配新 fs_id + new_fs_ids = self._transfer._list_and_match(save_dir, filenames, bdstoken) + + # 暂存文件信息供 _filter_ads + _create_share 使用 + self._last_transfer_files = [ + {"fs_id": fid, "name": name} + for fid, name in zip(new_fs_ids, filenames) + if fid + ] + + return new_fs_ids + + def _create_share(self, file_ids: List[str], title: str, + password: str = "") -> Tuple[str, str]: + """创建百度分享(步骤 ⑤) + + Args: + file_ids: 转存后的新 fs_id 列表 + title: 原标题 + password: 分享密码 + + Returns: + (new_share_url, share_password) + """ + # 如果 file_ids 中包含非数字,尝试从暂存信息中查找 + numeric_ids = [] + for fid in file_ids: + try: + int(fid) + numeric_ids.append(fid) + except ValueError: + logger.warning(f"忽略非数字 fs_id: {fid}") + + return self._transfer.create_share( + fids=[int(x) for x in numeric_ids] if numeric_ids else [int(x) for x in file_ids], + password=password, + period=0, # 永久 + ) + + # ─── 文件列表 & 删除 ──────────────────────────────────── + + def get_files(self, parent_fid: str = "0") -> List[FileInfo]: + """列出百度网盘目录下的文件 + + GET /api/list?dir={parent_fid} + + Args: + parent_fid: 目录路径 (默认 "0" = 根目录) + + 注意: parent_fid 对百度网盘而言是目录路径而非数字 ID。 + 根目录传 "/" 或 "0"。 + """ + bdstoken = self.credential.get_bdstoken() + dir_path = parent_fid if parent_fid != "0" else "/" + + url = "https://pan.baidu.com/api/list" + params = {"dir": dir_path, "bdstoken": bdstoken} + headers = self.credential.get_headers() + + try: + resp = self._get(url, params=params, headers=headers) + data = resp.json() + except Exception as e: + logger.error(f"百度列出目录失败: {e}") + return [] + + errno = data.get("errno", -1) + if errno != 0: + logger.error(f"百度列出目录 errno={errno}: {data}") + return [] + + files = [] + for item in data.get("list", []): + fid = str(item.get("fs_id", "")) + name = item.get("server_filename", "") + size = item.get("size", 0) + is_dir = item.get("isdir", 0) == 1 + ext = "" + if not is_dir and "." in name: + ext = name.rsplit(".", 1)[-1] + + files.append(FileInfo( + fid=fid, + name=name, + size=size, + is_dir=is_dir, + ext=ext, + )) + + return files + + def delete(self, file_ids: List[str]) -> bool: + """删除百度网盘文件(按路径) + + file_ids 应为网盘中的完整路径,如 ["/dir/file.txt", "/dir/file2.zip"] + + Args: + file_ids: 网盘路径列表 + + Returns: + True 删除成功(或文件不存在) + """ + return self._cleanup.delete_files(file_ids) + + # ─── 广告过滤 ──────────────────────────────────────────── + + def _filter_ads(self, file_ids: List[str]) -> List[str]: + """广告过滤 — 基于最近一次转存暂存的文件名""" + if not self._last_transfer_files: + return file_ids + + names = [] + for f in self._last_transfer_files: + if f["fs_id"] in file_ids: + names.append(f["name"]) + else: + names.append("") + + return self._cleanup.filter_ad_ids(file_ids, names) + + # ─── 扩展方法 ──────────────────────────────────────────── + + def delete_paths(self, paths: List[str]) -> bool: + """便捷删除方法(直接调用 cleanup)""" + return self._cleanup.delete_files(paths) diff --git a/cloudsearch_transfer/adapter/baidu/cleanup.py b/cloudsearch_transfer/adapter/baidu/cleanup.py new file mode 100644 index 0000000..3dc176a --- /dev/null +++ b/cloudsearch_transfer/adapter/baidu/cleanup.py @@ -0,0 +1,154 @@ +""" +百度网盘文件清理 — 删除文件 & 广告过滤 +参考 cloud-auto-save 的 filter_ads + netdisk 的 delete +""" + +import json +import logging +from typing import List + +import requests + +from ...errors import TransferError, TransferErrorCode +from .credential import BaiduCredentialManager, BAIDU_PAN_API + +logger = logging.getLogger(__name__) + +# 默认广告关键词 +DEFAULT_AD_KEYWORDS = [ + "公众号", "微信", "扫码", "加群", "QQ群", "广告", + "关注", "免费领取", "点击领取", "全网", "最全", + "防走丢", "防迷路", "备用", "务必下载", "必看", + "解压密码", "压缩密码", +] + + +class BaiduCleanup: + """百度网盘文件清理 & 广告过滤""" + + def __init__(self, session: requests.Session, + credential: BaiduCredentialManager, + ad_keywords: List[str] = None): + self.session = session + self.credential = credential + self.ad_keywords = ad_keywords or DEFAULT_AD_KEYWORDS + + # ─── 删除文件 ──────────────────────────────────────────── + + def delete_files(self, paths: List[str]) -> bool: + """批量删除文件(按网盘路径) + + POST /api/filemanager?opera=delete&bdstoken={bdstoken} + Body: filelist=["/path/to/file1","/path/to/file2"] + + Args: + paths: 文件在网盘中的完整路径列表,如 ["/dir/file.txt"] + + Returns: + True 全部成功(包括文件不存在的 errno=2) + + Raises: + TransferError: 删除失败 + """ + if not paths: + logger.info("删除列表为空,跳过") + return True + + bdstoken = self.credential.get_bdstoken() + url = f"{BAIDU_PAN_API}/api/filemanager" + params = { + "opera": "delete", + "bdstoken": bdstoken, + } + data = { + "filelist": json.dumps(paths, ensure_ascii=False), + } + headers = self.credential.get_headers() + headers["Content-Type"] = "application/x-www-form-urlencoded" + + try: + resp = self.session.post( + url, params=params, data=data, headers=headers, timeout=30 + ) + resp.raise_for_status() + result = resp.json() + except Exception as e: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=f"百度删除请求失败: {e}", + platform="baidu", + ) + + errno = result.get("errno", -1) + + # errno=0 成功; errno=2 文件不存在(视为成功) + if errno in (0, 2): + logger.info(f"百度删除完成: {len(paths)} 个路径 (errno={errno})") + return True + + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=f"百度删除失败 (errno={errno})", + platform="baidu", + details=result, + ) + + # ─── 广告过滤 ──────────────────────────────────────────── + + def filter_ads(self, files: List[dict]) -> List[dict]: + """根据文件名过滤广告文件 + + Args: + files: [{"fs_id": "xxx", "name": "xxx"}, ...] + + Returns: + 过滤后的文件列表,仅保留非广告文件 + """ + if not self.ad_keywords: + return files + + retained = [] + removed = [] + for f in files: + name = f.get("name", "") + if self._is_ad(name): + removed.append(name) + else: + retained.append(f) + + if removed: + logger.info(f"广告过滤: 移除 {len(removed)} 个文件: {removed}") + return retained + + def filter_ad_ids(self, file_ids: List[str], + file_names: List[str]) -> List[str]: + """根据文件名过滤广告,返回保留的 file_ids + + Args: + file_ids: 文件 ID 列表 + file_names: 对应的文件名列表(与 file_ids 一一对应) + + Returns: + 过滤后的 file_ids + """ + if not self.ad_keywords: + return file_ids + + retained = [] + for fid, name in zip(file_ids, file_names): + if not self._is_ad(name): + retained.append(fid) + else: + logger.info(f"广告过滤: 移除 {name}") + + return retained + + def _is_ad(self, filename: str) -> bool: + """判断文件名是否为广告""" + if not filename: + return False + name_lower = filename.lower() + for kw in self.ad_keywords: + if kw.lower() in name_lower: + return True + return False diff --git a/cloudsearch_transfer/adapter/baidu/credential.py b/cloudsearch_transfer/adapter/baidu/credential.py new file mode 100644 index 0000000..6e8cf49 --- /dev/null +++ b/cloudsearch_transfer/adapter/baidu/credential.py @@ -0,0 +1,101 @@ +""" +百度网盘凭证管理器 — bdstoken 获取与校验 +参考 cloud-auto-save 的 BaiduNetDisk.cookie 机制 +""" + +import logging +import requests + +from ...errors import TransferError, TransferErrorCode + +logger = logging.getLogger(__name__) + +# 百度网盘 API 基础 URL +BAIDU_PAN_API = "https://pan.baidu.com" + + +class BaiduCredentialManager: + """百度网盘 Cookie 凭证 + bdstoken 管理 + + 百度网盘的大多数受保护 API 都需要 bdstoken 参数, + 该 token 通过 API 获取并缓存在实例中。 + """ + + def __init__(self, cookie: str, session: requests.Session): + """ + Args: + cookie: 完整的百度 Cookie 字符串 + session: 共享的 requests.Session(继承 User-Agent 等 headers) + """ + self.cookie = cookie + self.session = session + self._bdstoken: str = "" + + # ─── 公开方法 ────────────────────────────────────────── + + def validate(self) -> bool: + """校验 Cookie 是否有效:长度 >= 50 视为合格""" + return bool(self.cookie and len(self.cookie.strip()) >= 50) + + def get_bdstoken(self, force_refresh: bool = False) -> str: + """ + 获取 bdstoken,首次调用会请求 API 获取并缓存。 + + API: GET /api/gettemplatevariable?fields=["bdstoken"] + + Raises: + TransferError: 获取失败 (BAIDU_BDSTOKEN_FAIL) + """ + if self._bdstoken and not force_refresh: + return self._bdstoken + + url = f"{BAIDU_PAN_API}/api/gettemplatevariable" + params = {"fields": '["bdstoken"]'} + headers = self.get_headers() + + try: + resp = self.session.get(url, params=params, headers=headers, timeout=15) + resp.raise_for_status() + data = resp.json() + except Exception as e: + logger.error(f"获取 bdstoken 网络异常: {e}") + raise TransferError( + TransferErrorCode.BAIDU_BDSTOKEN_FAIL, + message=f"百度 bdstoken 请求失败: {e}", + platform="baidu", + ) + + errno = data.get("errno", -1) + if errno != 0: + logger.error(f"获取 bdstoken API 返回 errno={errno}: {data}") + raise TransferError( + TransferErrorCode.BAIDU_BDSTOKEN_FAIL, + message=f"百度 bdstoken 获取失败 (errno={errno})", + platform="baidu", + details={"response": data}, + ) + + self._bdstoken = data.get("result", {}).get("bdstoken", "") + if not self._bdstoken: + raise TransferError( + TransferErrorCode.BAIDU_BDSTOKEN_FAIL, + message="百度 bdstoken 为空", + platform="baidu", + ) + + logger.info("bdstoken 获取成功") + return self._bdstoken + + def get_headers(self) -> dict: + """构建携带 Cookie 的请求头(继承 session 默认 headers 外的额外字段)""" + headers = { + "Cookie": self.cookie, + "Referer": "https://pan.baidu.com/", + "Origin": "https://pan.baidu.com", + } + return headers + + def invalidate_bdstoken(self): + """使缓存失效,下次调用 get_bdstoken 会重新获取""" + self._bdstoken = "" + logger.info("bdstoken 缓存已失效") diff --git a/cloudsearch_transfer/adapter/baidu/transfer.py b/cloudsearch_transfer/adapter/baidu/transfer.py new file mode 100644 index 0000000..865e21b --- /dev/null +++ b/cloudsearch_transfer/adapter/baidu/transfer.py @@ -0,0 +1,448 @@ +""" +百度网盘转存核心 — 5 步转存流程 +参考 netdisk 的 PanbaiduSave + cloud-auto-save 的 BaiduNetDisk.transfer + +流程: + ① 验证提取码 → POST /share/verify + ② 解析分享页 → GET /s/1{surl} + ③ 转存文件 → POST /share/transfer + ④ 列出目录 → GET /api/list + ⑤ 创建分享 → POST /share/set +""" + +import re +import json +import logging +from typing import List, Tuple + +import requests + +from ...errors import TransferError, TransferErrorCode +from .credential import BaiduCredentialManager, BAIDU_PAN_API + +logger = logging.getLogger(__name__) + +# ─── 正则 ────────────────────────────────────────────────── + +# 从 HTML 中提取 shareid +RE_SHAREID = re.compile(r"""shareid["\s:=]+(\d+)""") +# 从 HTML 中提取 uk +RE_UK = re.compile(r"""uk["\s:=]+(\d+)""") +# 从 HTML 中提取 fs_id +RE_FS_ID = re.compile(r'"fs_id"\s*:\s*(\d+)') +# 从 HTML 中提取 server_filename +RE_FILENAME = re.compile(r'"server_filename"\s*:\s*"([^"]*)"') +# 从 HTML/JSON 中提取标题 +RE_TITLE = re.compile(r'"title"\s*:\s*"([^"]*)"') +# 从 HTML 中提取文件列表 JSON 块 (file_list 对象) — 标记位置 +RE_FILE_LIST_MARK = re.compile(r'"file_list"\s*:\s*(\{)', re.DOTALL) +# 提取单个文件条目 (fallback) +RE_FILE_ENTRY = re.compile(r'\{"fs_id":(\d+),"server_filename":"([^"]+)"') + + +class BaiduTransfer: + """百度网盘 5 步转存执行器 + + 每个实例绑定一个 Session + Cookie + bdstoken, + 执行完整的「验证→解析→转存→查目录→创建分享」流程。 + """ + + def __init__(self, session: requests.Session, + credential: BaiduCredentialManager): + self.session = session + self.credential = credential + self.cookie = credential.cookie + + # ─── 5 步主流程 ──────────────────────────────────────── + + def execute(self, surl: str, password: str, + save_dir: str = "/") -> Tuple[List[str], dict]: + """执行完整的 5 步转存流程 + + Args: + surl: 分享短码 (s/1 后面的部分) + password: 提取码 + save_dir: 转存目标目录 + + Returns: + (new_fs_ids, file_info_dict) + new_fs_ids: 转存后的文件 fs_id 列表 + file_info_dict: {fs_id: name} 映射 + + Raises: + TransferError: 任何一步失败 + """ + bdstoken = self.credential.get_bdstoken() + + # ① 验证提取码 + logger.info(f"[百度转存] ① 验证提取码 surl={surl}") + self._verify_password(surl, password, bdstoken) + + # ② 解析分享页 + logger.info(f"[百度转存] ② 解析分享页 surl={surl}") + share_info = self._parse_share_page(surl) + shareid = share_info["shareid"] + uk = share_info["uk"] + fs_ids = share_info["fs_ids"] + filenames = share_info["filenames"] + title = share_info.get("title", "") + + if not fs_ids: + raise TransferError( + TransferErrorCode.RESOURCE_EMPTY, + message="分享中没有找到可转存的文件", + platform="baidu", + ) + + # ③ 转存到自己的网盘 + logger.info(f"[百度转存] ③ 转存 {len(fs_ids)} 个文件到 {save_dir}") + self._transfer_files(shareid, uk, fs_ids, save_dir, bdstoken) + + # ④ 列出目标目录,按文件名匹配新的 fs_id + logger.info(f"[百度转存] ④ 列出目录 {save_dir} 匹配新 fs_id") + new_fs_ids = self._list_and_match(save_dir, filenames, bdstoken) + + if not new_fs_ids: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message="转存后无法匹配到新文件 ID", + platform="baidu", + ) + + # 构建返回的 info dict + file_info = {} + for name, fid in zip(filenames, new_fs_ids) if len(filenames) == len(new_fs_ids) else []: + file_info[fid] = name + if not file_info: + for fid in new_fs_ids: + file_info[fid] = title or fid + + return new_fs_ids, file_info + + def create_share(self, fids: List[int], password: str = "", + period: int = 0) -> Tuple[str, str]: + """⑤ 创建新分享 + + Args: + fids: 转存后的文件 fs_id 列表 + password: 分享密码(空 = 无密码) + period: 分享有效期 (0=永久) + + Returns: + (share_url, share_password) + """ + bdstoken = self.credential.get_bdstoken() + url = f"{BAIDU_PAN_API}/share/set" + params = { + "channel": "chunlei", + "clienttype": "0", + "web": "1", + "bdstoken": bdstoken, + } + data = { + "fid_list": json.dumps(fids), + "period": period, + "pwd": password, + } + headers = self.credential.get_headers() + + try: + resp = self.session.post( + url, params=params, data=data, headers=headers, timeout=30 + ) + resp.raise_for_status() + except Exception as e: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=f"创建分享请求失败: {e}", + platform="baidu", + ) + + result = resp.json() + errno = result.get("errno", -1) + + if errno == 9219: + raise TransferError( + TransferErrorCode.SHARE_LIMIT, + message="百度今日分享次数过多", + platform="baidu", + ) + if errno != 0: + raise TransferError( + TransferErrorCode.SHARE_LINK_FAIL, + message=f"创建分享失败 (errno={errno})", + platform="baidu", + details=result, + ) + + share_url = result.get("link", "") + share_password = result.get("pwd", password) or password + + logger.info(f"[百度转存] ⑤ 分享创建成功: {share_url}") + return share_url, share_password + + # ─── 5 步内部方法 ────────────────────────────────────── + + def _verify_password(self, surl: str, password: str, bdstoken: str): + """① 验证提取码 + + POST /share/verify?surl={surl}&bdstoken={bdstoken} + Body: {"pwd": "xxxx"} + + errno=0 表示通过;errno=-9 表示提取码错误;errno=2 表示分享不存在 + """ + url = f"{BAIDU_PAN_API}/share/verify" + params = { + "surl": surl, + "bdstoken": bdstoken, + } + data = {"pwd": password} + headers = self.credential.get_headers() + headers["Content-Type"] = "application/x-www-form-urlencoded" + + try: + resp = self.session.post( + url, params=params, data=data, headers=headers, timeout=15 + ) + resp.raise_for_status() + except Exception as e: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=f"验证提取码请求失败: {e}", + platform="baidu", + ) + + result = resp.json() + errno = result.get("errno", -1) + + if errno == 0: + logger.info("提取码验证通过") + return + + if errno == -9 or errno == -62: + raise TransferError( + TransferErrorCode.PASSCODE_WRONG, + message="百度提取码错误", + platform="baidu", + ) + if errno == 2 or errno == 118: + raise TransferError( + TransferErrorCode.SHARE_NOT_EXIST, + message="百度分享不存在或已失效", + platform="baidu", + ) + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=f"验证提取码失败 (errno={errno})", + platform="baidu", + details=result, + ) + + def _parse_share_page(self, surl: str) -> dict: + """② 解析分享页面 HTML + + GET /s/1{surl} + 从 HTML 中正则提取 shareid, uk, fs_id[], server_filename[] + """ + url = f"{BAIDU_PAN_API}/s/1{surl}" + headers = self.credential.get_headers() + + try: + resp = self.session.get(url, headers=headers, timeout=20) + resp.raise_for_status() + html = resp.text + except Exception as e: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=f"打开分享页面失败: {e}", + platform="baidu", + ) + + # 提取 shareid + m_shareid = RE_SHAREID.search(html) + if not m_shareid: + raise TransferError( + TransferErrorCode.SHARE_NOT_EXIST, + message="无法从页面中提取 shareid,分享可能已失效", + platform="baidu", + ) + shareid = m_shareid.group(1) + + # 提取 uk + m_uk = RE_UK.search(html) + uk = m_uk.group(1) if m_uk else "" + + # 提取标题 + m_title = RE_TITLE.search(html) + title = m_title.group(1) if m_title else "" + + # 提取文件列表 — 优先从 file_list JSON 块中提取 + fs_ids = [] + filenames = [] + + # 方法1:查找 file_list JSON 块(使用括号计数提取平衡 JSON) + m_fl = RE_FILE_LIST_MARK.search(html) + if m_fl: + start = m_fl.start(1) # { 的位置 + depth = 1 + end = start + 1 + while end < len(html) and depth > 0: + if html[end] == '{': + depth += 1 + elif html[end] == '}': + depth -= 1 + end += 1 + file_list_json = html[start:end] + try: + file_list = json.loads(file_list_json) + for entry in file_list.get("list", []): + fs_ids.append(str(entry.get("fs_id", ""))) + filenames.append(entry.get("server_filename", "")) + except json.JSONDecodeError: + pass + + # 方法2:退化为正则提取所有 fs_id + server_filename + if not fs_ids: + for m in RE_FILE_ENTRY.finditer(html): + fs_ids.append(m.group(1)) + filenames.append(m.group(2)) + + if not fs_ids: + # 可能只有一个文件,尝试单个提取 + m_fsid = RE_FS_ID.search(html) + m_name = RE_FILENAME.search(html) + if m_fsid: + fs_ids.append(m_fsid.group(1)) + filenames.append(m_name.group(1) if m_name else "") + + logger.info( + f"解析分享页: shareid={shareid}, uk={uk}, " + f"文件数={len(fs_ids)}, title={title[:30]}" + ) + return { + "shareid": shareid, + "uk": uk, + "fs_ids": fs_ids, + "filenames": filenames, + "title": title, + } + + def _transfer_files(self, shareid: str, uk: str, + fs_ids: List[str], save_dir: str, bdstoken: str): + """③ 转存文件到自己的网盘 + + POST /share/transfer?shareid={shareid}&from={uk}&bdstoken={bdstoken} + Body: fsidlist=[1,2,3]&path=/dir + """ + url = f"{BAIDU_PAN_API}/share/transfer" + params = { + "shareid": shareid, + "from": uk, + "bdstoken": bdstoken, + } + data = { + "fsidlist": json.dumps([int(x) for x in fs_ids]), + "path": save_dir, + } + headers = self.credential.get_headers() + headers["Content-Type"] = "application/x-www-form-urlencoded" + + try: + resp = self.session.post( + url, params=params, data=data, headers=headers, timeout=30 + ) + resp.raise_for_status() + except Exception as e: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=f"转存请求失败: {e}", + platform="baidu", + ) + + result = resp.json() + errno = result.get("errno", -1) + + if errno == 0: + logger.info(f"转存成功: {len(fs_ids)} 个文件 → {save_dir}") + return + + if errno == 12: + raise TransferError( + TransferErrorCode.CAPACITY_FULL, + message="百度网盘空间不足", + platform="baidu", + ) + if errno == 9013: + raise TransferError( + TransferErrorCode.SENSITIVE_RESOURCE, + message="文件包含违规内容,无法转存", + platform="baidu", + ) + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=f"转存失败 (errno={errno})", + platform="baidu", + details=result, + ) + + def _list_and_match(self, save_dir: str, filenames: List[str], + bdstoken: str) -> List[str]: + """④ 列出目标目录,按文件名匹配新的 fs_id + + GET /api/list?dir={dir}&bdstoken={bdstoken} + 从返回的 list 中按 server_filename 匹配,返回按原顺序排列的 fs_id 列表 + """ + url = f"{BAIDU_PAN_API}/api/list" + params = { + "dir": save_dir, + "bdstoken": bdstoken, + } + headers = self.credential.get_headers() + + try: + resp = self.session.get(url, params=params, headers=headers, timeout=15) + resp.raise_for_status() + data = resp.json() + except Exception as e: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=f"列出目录失败: {e}", + platform="baidu", + ) + + errno = data.get("errno", -1) + if errno == -12: + raise TransferError( + TransferErrorCode.DIR_NOT_EXIST, + message=f"百度目录不存在: {save_dir}", + platform="baidu", + ) + if errno != 0: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=f"列出目录失败 (errno={errno})", + platform="baidu", + details=data, + ) + + file_list = data.get("list", []) + # 构建文件名 → fs_id 映射 + name_to_fid = {} + for item in file_list: + name = item.get("server_filename", "") + fid = str(item.get("fs_id", "")) + if name and fid: + name_to_fid[name] = fid + + # 按原文件名顺序匹配 + new_fs_ids = [] + for fname in filenames: + if fname in name_to_fid: + new_fs_ids.append(name_to_fid[fname]) + else: + logger.warning(f"目录中未找到文件: {fname}") + + logger.info( + f"目录匹配: 期望 {len(filenames)} 个, 匹配到 {len(new_fs_ids)} 个" + ) + return new_fs_ids diff --git a/cloudsearch_transfer/adapter/base.py b/cloudsearch_transfer/adapter/base.py new file mode 100644 index 0000000..08bac8a --- /dev/null +++ b/cloudsearch_transfer/adapter/base.py @@ -0,0 +1,330 @@ +""" +CloudSearch Transfer — 适配器抽象基类 v1.0.0 +参考 cloud-auto-save 的 BaseCloudDriveAdapter + netdisk 的 Pan 接口 +""" + +import time +import re +import logging +from abc import ABC, abstractmethod +from dataclasses import dataclass +from typing import Optional, List, Tuple, Dict, Any +from urllib.parse import urlparse, parse_qs + +import requests + +from ..config import PlatformConfig, TransferConfig +from ..errors import TransferError, TransferErrorCode + +logger = logging.getLogger(__name__) + + +@dataclass +class FileInfo: + """文件信息""" + fid: str # 文件ID + name: str # 文件名 + size: int = 0 # 文件大小 + is_dir: bool = False + ext: str = "" # 扩展名 + + +@dataclass +class TransferResult: + """转存结果""" + success: bool + platform: str + new_file_id: str = "" # 转存后的文件ID + file_name: str = "" # 文件名 + share_url: str = "" # 新的分享链接 + share_password: str = "" # 分享密码 + original_url: str = "" # 原始分享链接 + elapsed_ms: int = 0 # 耗时 + error: Optional[TransferError] = None + + +@dataclass +class VerifyResult: + """链接验证结果""" + valid: bool + platform: str + title: str = "" + file_count: int = 0 + files: List[FileInfo] = None + error: Optional[TransferError] = None + + def __post_init__(self): + if self.files is None: + self.files = [] + + +class BaseCloudDriveAdapter(ABC): + """ + 网盘适配器抽象基类 + + 每个网盘平台实现此基类,统一接口: + - transfer(): 转存分享到自己网盘 → 创建新分享 + - verify(): 验证分享链接有效性 + - get_files(): 列出目录文件 + - delete(): 删除文件 + """ + + # 子类必须覆盖 + PLATFORM_NAME: str = "" + PLATFORM_KEY: str = "" # quark/baidu/aliyun/uc/xunlei/pan123/cloud189 + + # URL匹配正则(子类覆盖) + URL_PATTERNS: List[str] = [] + + # 默认请求头 + DEFAULT_HEADERS: Dict[str, str] = { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " + "AppleWebKit/537.36 (KHTML, like Gecko) " + "Chrome/135.0.0.0 Safari/537.36", + "Accept": "application/json, text/plain, */*", + "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8", + } + + def __init__(self, config: PlatformConfig, transfer_config: TransferConfig): + self.config = config + self.transfer_config = transfer_config + self.session = requests.Session() + self.session.headers.update(self.DEFAULT_HEADERS) + self._setup_session() + + def _setup_session(self): + """子类可覆盖,初始化session特有的headers/cookies""" + pass + + # ─── 公开接口 ────────────────────────────────────────── + + def transfer(self, share_url: str, save_dir: str = "", + share_password: str = "") -> TransferResult: + """ + 转存分享到自己网盘 → 创建新分享 + + Args: + share_url: 原始分享链接 + save_dir: 转存到的目录(空=使用配置的默认目录) + share_password: 新分享的密码(空=使用配置的密码) + """ + start = time.time() + try: + # 1. 解析URL提取pwd_id + pwd_id, passcode = self._parse_share_url(share_url) + + # 2. 获取分享详情 + detail = self._get_share_detail(pwd_id, passcode) + if not detail: + raise TransferError(TransferErrorCode.SHARE_NOT_EXIST, + platform=self.PLATFORM_KEY) + + # 3. 执行转存 + save_dir = save_dir or self.config.save_dir or "/" + new_fids = self._save_files(pwd_id, detail, save_dir) + if not new_fids: + raise TransferError(TransferErrorCode.RESOURCE_EMPTY, + platform=self.PLATFORM_KEY) + + # 4. 广告过滤 + if self.transfer_config.ad_filter_enabled: + new_fids = self._filter_ads(new_fids) + if not new_fids: + raise TransferError(TransferErrorCode.RESOURCE_EMPTY, + platform=self.PLATFORM_KEY) + + # 5. 创建新分享 + pwd = share_password or self.config.share_password + share_url_new, share_pwd = self._create_share(new_fids, detail.get("title", ""), pwd) + + elapsed = int((time.time() - start) * 1000) + return TransferResult( + success=True, + platform=self.PLATFORM_KEY, + new_file_id=",".join(new_fids), + file_name=detail.get("title", ""), + share_url=share_url_new, + share_password=share_pwd, + original_url=share_url, + elapsed_ms=elapsed, + ) + + except TransferError: + raise + except Exception as e: + logger.exception(f"[{self.PLATFORM_KEY}] transfer failed: {share_url}") + raise TransferError(TransferErrorCode.NETWORK_ERROR, + message=str(e), platform=self.PLATFORM_KEY) + + def verify(self, share_url: str) -> VerifyResult: + """验证分享链接有效性""" + try: + pwd_id, passcode = self._parse_share_url(share_url) + detail = self._get_share_detail(pwd_id, passcode) + files = self._extract_file_list(detail) + return VerifyResult( + valid=True, + platform=self.PLATFORM_KEY, + title=detail.get("title", ""), + file_count=len(files), + files=files, + ) + except TransferError as e: + return VerifyResult(valid=False, platform=self.PLATFORM_KEY, error=e) + except Exception as e: + return VerifyResult( + valid=False, + platform=self.PLATFORM_KEY, + error=TransferError(TransferErrorCode.NETWORK_ERROR, message=str(e)), + ) + + @abstractmethod + def get_files(self, parent_fid: str = "0") -> List[FileInfo]: + """列出目录下的文件""" + ... + + @abstractmethod + def delete(self, file_ids: List[str]) -> bool: + """删除文件""" + ... + + # ─── URL解析 ────────────────────────────────────────── + + def _parse_share_url(self, url: str) -> Tuple[str, str]: + """ + 解析分享URL → (pwd_id, passcode) + 子类可覆盖 + """ + for pattern in self.URL_PATTERNS: + m = re.search(pattern, url) + if m: + pwd_id = m.group(1) + passcode = "" + # 尝试从URL参数提取密码 + parsed = urlparse(url) + params = parse_qs(parsed.query) + passcode = params.get("pwd", params.get("code", [""]))[0] + return pwd_id, passcode + + raise TransferError(TransferErrorCode.URL_INVALID, + message=f"无法解析{self.PLATFORM_NAME}链接: {url}") + + # ─── 核心抽象方法(子类必须实现)──────────────────────── + + @abstractmethod + def _get_share_detail(self, pwd_id: str, passcode: str = "") -> dict: + """获取分享详情 → {title, fid/fs_id, ...}""" + ... + + @abstractmethod + def _save_files(self, pwd_id: str, detail: dict, save_dir: str) -> List[str]: + """转存文件 → 返回新文件ID列表""" + ... + + @abstractmethod + def _create_share(self, file_ids: List[str], title: str, + password: str = "") -> Tuple[str, str]: + """创建分享 → (share_url, share_password)""" + ... + + def _extract_file_list(self, detail: dict) -> List[FileInfo]: + """从分享详情提取文件列表(默认实现,子类可覆盖)""" + return [] + + def _filter_ads(self, file_ids: List[str]) -> List[str]: + """广告过滤(默认不实现,子类可覆盖)""" + return file_ids + + # ─── HTTP 工具方法 ───────────────────────────────────── + + def _get(self, url: str, params: dict = None, headers: dict = None, + retry: int = None) -> requests.Response: + return self._request("GET", url, params=params, headers=headers, retry=retry) + + def _post(self, url: str, json_data: dict = None, data: dict = None, + params: dict = None, headers: dict = None, retry: int = None) -> requests.Response: + return self._request("POST", url, json=json_data, data=data, + params=params, headers=headers, retry=retry) + + def _request(self, method: str, url: str, **kwargs) -> requests.Response: + """统一HTTP请求,带重试""" + retry = kwargs.pop("retry", None) + max_retries = retry if retry is not None else self.transfer_config.max_retries + + last_exc = None + for attempt in range(max_retries + 1): + try: + resp = self.session.request( + method, url, + timeout=self.transfer_config.request_timeout, + **kwargs + ) + return resp + except requests.RequestException as e: + last_exc = e + if attempt < max_retries: + delay = self.transfer_config.retry_delay * (2 ** attempt) + logger.warning(f"[{self.PLATFORM_KEY}] HTTP retry {attempt+1}/{max_retries} " + f"after {delay:.1f}s: {url}") + time.sleep(delay) + + raise TransferError(TransferErrorCode.NETWORK_ERROR, + message=str(last_exc), platform=self.PLATFORM_KEY) + + def _poll_task(self, task_url: str, task_id: str, + status_field: str = "status", + success_value: Any = 2, + result_path: str = None, + query_params: dict = None) -> dict: + """ + 轮询异步任务直到完成 + 参考 netdisk 的任务轮询机制 + """ + interval = self.transfer_config.task_poll_interval + max_attempts = self.transfer_config.task_poll_max_attempts + max_wait = self.transfer_config.task_poll_max_wait + started = time.time() + + for attempt in range(max_attempts): + if time.time() - started > max_wait: + raise TransferError(TransferErrorCode.TIMEOUT, + platform=self.PLATFORM_KEY, + details={"task_id": task_id}) + + try: + params = query_params or {} + params["task_id"] = task_id + resp = self._get(task_url, params=params, retry=1) + data = resp.json().get("data", resp.json()) + + current_status = data.get(status_field) + if current_status == success_value: + if result_path: + # 支持点号路径如 "save_as.save_as_top_fids" + for key in result_path.split("."): + data = data.get(key, {}) if isinstance(data, dict) else data + return data + + if current_status is False or current_status == -1: + raise TransferError(TransferErrorCode.NETWORK_ERROR, + message=f"任务失败: {data}", + platform=self.PLATFORM_KEY) + + except (requests.RequestException, ValueError): + pass + + time.sleep(interval) + + raise TransferError(TransferErrorCode.TIMEOUT, + platform=self.PLATFORM_KEY, + details={"task_id": task_id, "attempts": max_attempts}) + + +# ─── 工厂函数(adapter/factory.py 使用)─────────────────── + +def match_url(url: str, adapter_cls: type) -> bool: + """URL是否匹配某个适配器""" + for pattern in adapter_cls.URL_PATTERNS: + if re.search(pattern, url): + return True + return False diff --git a/cloudsearch_transfer/adapter/cloud189/__init__.py b/cloudsearch_transfer/adapter/cloud189/__init__.py new file mode 100644 index 0000000..577bc3e --- /dev/null +++ b/cloudsearch_transfer/adapter/cloud189/__init__.py @@ -0,0 +1,45 @@ +"""天翼云盘适配器 v1.0.0""" + +from ..base import BaseCloudDriveAdapter, FileInfo, TransferResult, VerifyResult +from ...errors import TransferError, TransferErrorCode +from .credential import Cloud189CredentialManager +from .transfer import Cloud189Transfer +from .cleanup import Cloud189Cleanup + + +class Cloud189Adapter(BaseCloudDriveAdapter): + PLATFORM_NAME = "天翼云盘" + PLATFORM_KEY = "cloud189" + URL_PATTERNS = [r"cloud\.189\.cn/t/([A-Za-z0-9]+)"] + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self._cred = Cloud189CredentialManager(self.config) + self._transfer_engine = None + self._cln = Cloud189Cleanup() + + def _setup_session(self): + if self._cred: + self._cred.login_if_needed(self.session) + + @property + def _transfer(self): + if self._transfer_engine is None: + self._transfer_engine = Cloud189Transfer( + self.session, self._cred, self.config, self.transfer_config) + return self._transfer_engine + + def _get_share_detail(self, pwd_id, passcode=""): + return self._transfer.get_share_info(pwd_id, passcode) + + def _save_files(self, pwd_id, detail, save_dir): + return self._transfer.save_files(pwd_id, detail, save_dir) + + def _create_share(self, file_ids, title, password=""): + return self._transfer.create_share(file_ids, title, password) + + def get_files(self, parent_fid="-11"): + return self._transfer.list_files(parent_fid) + + def delete(self, file_ids): + return self._cln.delete_files(self.session, self._cred, file_ids) diff --git a/cloudsearch_transfer/adapter/cloud189/cleanup.py b/cloudsearch_transfer/adapter/cloud189/cleanup.py new file mode 100644 index 0000000..093b168 --- /dev/null +++ b/cloudsearch_transfer/adapter/cloud189/cleanup.py @@ -0,0 +1,26 @@ +"""天翼云盘数据清理 v1.0.0""" + +import logging +from typing import List + +logger = logging.getLogger(__name__) + + +class Cloud189Cleanup: + API_BASE = "https://cloud.189.cn/api/open/file" + + def delete_files(self, session, credential_mgr, file_ids: List[str]) -> bool: + try: + resp = session.post( + f"{self.API_BASE}/deleteFiles.action", + data={"fileIdList": ",".join(file_ids)}, + timeout=30, + ) + return resp.json().get("res_code") == 0 + except Exception as e: + logger.error(f"189 delete failed: {e}") + return False + + def filter_ad_ids(self, file_ids: List[str], file_names: List[str], + banned_keywords: List[str]) -> List[str]: + return file_ids diff --git a/cloudsearch_transfer/adapter/cloud189/credential.py b/cloudsearch_transfer/adapter/cloud189/credential.py new file mode 100644 index 0000000..2a7f8c2 --- /dev/null +++ b/cloudsearch_transfer/adapter/cloud189/credential.py @@ -0,0 +1,64 @@ +"""天翼云盘凭证管理 v1.0.0 — Cookie + 账号密码双模式""" + +import re +import base64 +import logging +from typing import Optional + +logger = logging.getLogger(__name__) + + +class Cloud189CredentialManager: + LOGIN_URL = "https://cloud.189.cn/api/portal/loginUrl.action" + SSO_URL = "https://open.e.189.cn/api/logbox/oauth2/ssoLogin.action" + + def __init__(self, config): + self.config = config + self._cookie: Optional[str] = None + + def validate(self) -> bool: + if self.config.cookie: + return len(self.config.cookie) >= 30 + extra = self.config.extra or {} + return bool(extra.get("username") and extra.get("password")) + + def get_headers(self) -> dict: + return { + "Cookie": self._cookie or self.config.cookie, + "Referer": "https://cloud.189.cn/", + } + + def login_if_needed(self, session) -> bool: + """如需账号密码登录,在此执行""" + if self.config.cookie: + self._cookie = self.config.cookie + return True + extra = self.config.extra or {} + username = extra.get("username", "") + password = extra.get("password", "") + if not username or not password: + return False + try: + logger.info("Attempting 189 cloud login...") + resp = session.get(self.LOGIN_URL, timeout=30) + data = resp.json() + login_url = data.get("toUrl", "") + session.cookies.clear() + sso_resp = session.post( + self.SSO_URL, + data={"account": username, "password": password, + "appKey": "cloud", "returnUrl": login_url}, + timeout=30, + ) + sso_data = sso_resp.json() + redirect_url = sso_data.get("toUrl", "") + if redirect_url: + session.get(redirect_url, timeout=30) + self._cookie = "; ".join( + f"{c.name}={c.value}" for c in session.cookies + ) + logger.info("189 cloud login successful") + return bool(self._cookie) + except Exception as e: + logger.error(f"189 cloud login failed: {e}") + return False diff --git a/cloudsearch_transfer/adapter/cloud189/transfer.py b/cloudsearch_transfer/adapter/cloud189/transfer.py new file mode 100644 index 0000000..b98c7a1 --- /dev/null +++ b/cloudsearch_transfer/adapter/cloud189/transfer.py @@ -0,0 +1,68 @@ +"""天翼云盘转存逻辑 v1.0.0""" + +import re +import logging +from typing import List, Tuple + +logger = logging.getLogger(__name__) + + +class Cloud189Transfer: + API_BASE = "https://cloud.189.cn/api/open/share" + + def __init__(self, session, credential_mgr, config, transfer_config): + self.session = session + self.credential = credential_mgr + self.config = config + self.transfer_config = transfer_config + self._last_file_names = [] + + @staticmethod + def parse_share_url(url: str) -> Tuple[str, str]: + m = re.search(r"cloud\.189\.cn/t/([A-Za-z0-9]+)", url) + if not m: + raise ValueError("Invalid 189 cloud share URL") + return m.group(1), "" + + def get_share_info(self, share_code: str, password: str = "") -> dict: + params = {"shareCode": share_code} + if password: + params["accessCode"] = password + resp = self.session.get( + f"{self.API_BASE}/getShareInfoByShareId.action", + params=params, + timeout=self.transfer_config.request_timeout, + ) + data = resp.json() + if not data.get("res_code") == 0: + raise Exception(f"189 share info failed: {data}") + info = data.get("data", {}) + files = info.get("fileList", []) + return { + "title": info.get("shareName", ""), + "files": [{"id": f.get("fileId", ""), "name": f.get("fileName", ""), + "size": int(f.get("fileSize", 0))} for f in files], + "share_id": info.get("shareId", ""), + } + + def save_files(self, share_code: str, detail: dict, save_dir: str) -> List[str]: + payload = { + "shareId": detail.get("share_id", ""), + "parentId": save_dir or "-11", + } + resp = self.session.post( + f"{self.API_BASE}/shareToMe.action", + data=payload, + timeout=self.transfer_config.request_timeout, + ) + data = resp.json() + if not data.get("res_code") == 0: + raise Exception(f"189 save failed: {data}") + return ["0"] + + def create_share(self, file_ids: List[str], title: str, + password: str = "") -> Tuple[str, str]: + return "", "" + + def list_files(self, parent_id: str = "-11") -> list: + return [] diff --git a/cloudsearch_transfer/adapter/factory.py b/cloudsearch_transfer/adapter/factory.py new file mode 100644 index 0000000..13f6203 --- /dev/null +++ b/cloudsearch_transfer/adapter/factory.py @@ -0,0 +1,112 @@ +""" +CloudSearch Transfer — 适配器工厂 v1.0.0 +参考 cloud-auto-save 的 AdapterFactory + AccountManager +""" + +import hashlib +import logging +from typing import Optional, Dict, Type + +from .base import BaseCloudDriveAdapter, match_url +from ..config import ConfigManager +from ..errors import TransferError, TransferErrorCode + +logger = logging.getLogger(__name__) + + +class AdapterFactory: + """ + 适配器工厂 + - URL正则自动识别网盘类型 + - 实例缓存:同平台+同Cookie单例 + - 多账号路由 + """ + + # 平台注册表(延迟导入避免循环引用) + _registry: Dict[str, Type[BaseCloudDriveAdapter]] = {} + + # 实例缓存 key: "platform:cookie_hash[:16]" + _cache: Dict[str, BaseCloudDriveAdapter] = {} + + def __init__(self, config_manager: ConfigManager): + self.config_manager = config_manager + self._register_all() + + def _register_all(self): + """注册所有平台适配器""" + from .quark import QuarkAdapter + from .baidu import BaiduAdapter + from .aliyun import AliyunAdapter + from .uc import UcAdapter + from .xunlei import XunleiAdapter + from .pan115 import Pan115Adapter + from .pan123 import Pan123Adapter + from .cloud189 import Cloud189Adapter + + self._registry = { + "quark": QuarkAdapter, + "baidu": BaiduAdapter, + "aliyun": AliyunAdapter, + "uc": UcAdapter, + "xunlei": XunleiAdapter, + "pan115": Pan115Adapter, + "pan123": Pan123Adapter, + "cloud189": Cloud189Adapter, + } + + def detect_platform(self, url: str) -> Optional[str]: + """根据URL自动识别网盘平台""" + for platform_key, adapter_cls in self._registry.items(): + if match_url(url, adapter_cls): + return platform_key + return None + + def get_adapter(self, platform_key: str) -> Optional[BaseCloudDriveAdapter]: + """获取适配器实例(带缓存)""" + config = self.config_manager.get_platform(platform_key) + if not config: + return None + + adapter_cls = self._registry.get(platform_key) + if not adapter_cls: + return None + + # 构建缓存键 + cache_key = self._cache_key(platform_key, config) + if cache_key in self._cache: + return self._cache[cache_key] + + # 创建新实例 + adapter = adapter_cls(config, self.config_manager.transfer) + self._cache[cache_key] = adapter + logger.info(f"[Factory] Created adapter: {platform_key} " + f"(cache_key={cache_key})") + return adapter + + def get_adapter_for_url(self, url: str) -> Optional[BaseCloudDriveAdapter]: + """根据URL自动获取适配器""" + platform = self.detect_platform(url) + if not platform: + raise TransferError(TransferErrorCode.URL_INVALID, + message=f"无法识别链接平台: {url}") + adapter = self.get_adapter(platform) + if not adapter: + raise TransferError(TransferErrorCode.NO_CONFIG, + message=f"平台 {platform} 未配置凭证", + platform=platform) + return adapter + + def invalidate_cache(self, platform_key: str = None): + """清除缓存""" + if platform_key: + keys = [k for k in self._cache if k.startswith(platform_key)] + for k in keys: + del self._cache[k] + else: + self._cache.clear() + + def _cache_key(self, platform: str, config) -> str: + """构建缓存键""" + credential = config.cookie or config.refresh_token or "" + token_hash = hashlib.md5(credential.encode()).hexdigest()[:16] + return f"{platform}:{config.account_name}:{token_hash}" diff --git a/cloudsearch_transfer/adapter/pan115/__init__.py b/cloudsearch_transfer/adapter/pan115/__init__.py new file mode 100644 index 0000000..b50f024 --- /dev/null +++ b/cloudsearch_transfer/adapter/pan115/__init__.py @@ -0,0 +1,41 @@ +"""115网盘适配器 v1.0.0""" + +from ..base import BaseCloudDriveAdapter, FileInfo, TransferResult, VerifyResult +from ...errors import TransferError, TransferErrorCode +from .credential import Pan115CredentialManager +from .transfer import Pan115Transfer, parse_share_url +from .cleanup import Pan115Cleanup + + +class Pan115Adapter(BaseCloudDriveAdapter): + PLATFORM_NAME = "115网盘" + PLATFORM_KEY = "pan115" + URL_PATTERNS = [r"115\.com/s/([a-z0-9]+)"] + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self._cred = Pan115CredentialManager(self.config) + self._transfer_engine = None + self._cln = Pan115Cleanup() + + @property + def _transfer(self): + if self._transfer_engine is None: + self._transfer_engine = Pan115Transfer( + self.session, self._cred, self.config, self.transfer_config) + return self._transfer_engine + + def _get_share_detail(self, pwd_id, passcode=""): + return self._transfer.get_share_info(pwd_id, passcode) + + def _save_files(self, pwd_id, detail, save_dir): + return self._transfer.save_files(pwd_id, detail, save_dir) + + def _create_share(self, file_ids, title, password=""): + return self._transfer.create_share(file_ids, title, password) + + def get_files(self, parent_fid="0"): + return self._transfer.list_files(parent_fid) + + def delete(self, file_ids): + return self._cln.delete_files(self.session, self._cred, file_ids) diff --git a/cloudsearch_transfer/adapter/pan115/cleanup.py b/cloudsearch_transfer/adapter/pan115/cleanup.py new file mode 100644 index 0000000..ff8ea5a --- /dev/null +++ b/cloudsearch_transfer/adapter/pan115/cleanup.py @@ -0,0 +1,24 @@ +"""115网盘数据清理 v1.0.0""" + +import logging +from typing import List + +logger = logging.getLogger(__name__) + + +class Pan115Cleanup: + def delete_files(self, session, credential_mgr, file_ids: List[str]) -> bool: + try: + resp = session.post( + "https://webapi.115.com/rb/delete", + json={"fid": file_ids}, + timeout=30, + ) + return resp.json().get("state", False) + except Exception as e: + logger.error(f"115 delete failed: {e}") + return False + + def filter_ad_ids(self, file_ids: List[str], file_names: List[str], + banned_keywords: List[str]) -> List[str]: + return file_ids diff --git a/cloudsearch_transfer/adapter/pan115/credential.py b/cloudsearch_transfer/adapter/pan115/credential.py new file mode 100644 index 0000000..d56e054 --- /dev/null +++ b/cloudsearch_transfer/adapter/pan115/credential.py @@ -0,0 +1,11 @@ +"""115网盘凭证管理 v1.0.0 — Cookie直传""" + +class Pan115CredentialManager: + def __init__(self, config): + self.config = config + + def validate(self) -> bool: + return bool(self.config.cookie and len(self.config.cookie) >= 30) + + def get_headers(self) -> dict: + return {"Cookie": self.config.cookie, "Referer": "https://115.com/"} diff --git a/cloudsearch_transfer/adapter/pan115/transfer.py b/cloudsearch_transfer/adapter/pan115/transfer.py new file mode 100644 index 0000000..b541dd9 --- /dev/null +++ b/cloudsearch_transfer/adapter/pan115/transfer.py @@ -0,0 +1,69 @@ +"""115网盘转存逻辑 v1.0.0""" + +import re +import logging +from typing import List, Tuple + +logger = logging.getLogger(__name__) + + +class Pan115Transfer: + def __init__(self, session, credential_mgr, config, transfer_config): + self.session = session + self.credential = credential_mgr + self.config = config + self.transfer_config = transfer_config + self._last_file_names = [] + + def parse_share_url(url: str) -> Tuple[str, str]: + m = re.search(r"115\.com/s/([a-z0-9]+)", url) + if not m: + raise ValueError("Invalid 115 share URL") + code = m.group(1) + m2 = re.search(r"password[=:](\w+)", url) + return code, m2.group(1) if m2 else "" + + def get_share_info(self, code: str, password: str = "") -> dict: + params = {"share_code": code} + if password: + params["receive_code"] = password + resp = self.session.get( + "https://webapi.115.com/share/snap", + params=params, + timeout=self.transfer_config.request_timeout, + ) + data = resp.json() + if not data.get("state"): + raise Exception(f"115 share info failed: {data}") + snap = data.get("data", {}) + files = snap.get("list", []) + return { + "title": snap.get("shareinfo", {}).get("share_title", ""), + "files": [{"id": f.get("fid", ""), "name": f.get("n", ""), + "size": int(f.get("s", 0))} for f in files], + "cid": files[0].get("cid", "") if files else "", + } + + def save_files(self, share_code: str, detail: dict, save_dir: str) -> List[str]: + cid = detail.get("cid", "0") + payload = {"share_code": share_code, "receive_code": "", + "cid": cid, "pick_code": ""} + resp = self.session.post( + "https://webapi.115.com/share/receive", + json=payload, + timeout=self.transfer_config.request_timeout, + ) + data = resp.json() + if not data.get("state"): + raise Exception(f"115 save failed: {data}") + return [str(data.get("data", {}).get("cid", ""))] + + def create_share(self, file_ids: List[str], title: str, + password: str = "") -> Tuple[str, str]: + return "", "" + + def list_files(self, cid: str = "0") -> list: + return [] + + +parse_share_url = staticmethod(Pan115Transfer.parse_share_url) diff --git a/cloudsearch_transfer/adapter/pan123/__init__.py b/cloudsearch_transfer/adapter/pan123/__init__.py new file mode 100644 index 0000000..a276bdc --- /dev/null +++ b/cloudsearch_transfer/adapter/pan123/__init__.py @@ -0,0 +1,41 @@ +"""123云盘适配器 v1.0.0""" + +from ..base import BaseCloudDriveAdapter, FileInfo, TransferResult, VerifyResult +from ...errors import TransferError, TransferErrorCode +from .credential import Pan123CredentialManager +from .transfer import Pan123Transfer +from .cleanup import Pan123Cleanup + + +class Pan123Adapter(BaseCloudDriveAdapter): + PLATFORM_NAME = "123云盘" + PLATFORM_KEY = "pan123" + URL_PATTERNS = [r"123pan\.com/s/([A-Za-z0-9]+)"] + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self._cred = Pan123CredentialManager(self.config) + self._transfer_engine = None + self._cln = Pan123Cleanup() + + @property + def _transfer(self): + if self._transfer_engine is None: + self._transfer_engine = Pan123Transfer( + self.session, self._cred, self.config, self.transfer_config) + return self._transfer_engine + + def _get_share_detail(self, pwd_id, passcode=""): + return self._transfer.get_share_info(pwd_id, passcode) + + def _save_files(self, pwd_id, detail, save_dir): + return self._transfer.save_files(pwd_id, detail, save_dir) + + def _create_share(self, file_ids, title, password=""): + return self._transfer.create_share(file_ids, title, password) + + def get_files(self, parent_fid="0"): + return self._transfer.list_files(parent_fid) + + def delete(self, file_ids): + return self._cln.delete_files(self.session, self._cred, file_ids) diff --git a/cloudsearch_transfer/adapter/pan123/cleanup.py b/cloudsearch_transfer/adapter/pan123/cleanup.py new file mode 100644 index 0000000..1ba6cc3 --- /dev/null +++ b/cloudsearch_transfer/adapter/pan123/cleanup.py @@ -0,0 +1,26 @@ +"""123云盘数据清理 v1.0.0""" + +import logging +from typing import List + +logger = logging.getLogger(__name__) + + +class Pan123Cleanup: + API_BASE = "https://www.123pan.com/api" + + def delete_files(self, session, credential_mgr, file_ids: List[str]) -> bool: + try: + resp = session.post( + f"{self.API_BASE}/file/delete", + json={"fileIds": file_ids}, + timeout=30, + ) + return resp.json().get("code") == 0 + except Exception as e: + logger.error(f"123 delete failed: {e}") + return False + + def filter_ad_ids(self, file_ids: List[str], file_names: List[str], + banned_keywords: List[str]) -> List[str]: + return file_ids diff --git a/cloudsearch_transfer/adapter/pan123/credential.py b/cloudsearch_transfer/adapter/pan123/credential.py new file mode 100644 index 0000000..6c9f743 --- /dev/null +++ b/cloudsearch_transfer/adapter/pan123/credential.py @@ -0,0 +1,16 @@ +"""123云盘凭证管理 v1.0.0 — Cookie直传""" + + +class Pan123CredentialManager: + def __init__(self, config): + self.config = config + + def validate(self) -> bool: + return bool(self.config.cookie and len(self.config.cookie) >= 30) + + def get_headers(self) -> dict: + return { + "Cookie": self.config.cookie, + "Referer": "https://www.123pan.com/", + "Origin": "https://www.123pan.com", + } diff --git a/cloudsearch_transfer/adapter/pan123/transfer.py b/cloudsearch_transfer/adapter/pan123/transfer.py new file mode 100644 index 0000000..ebae64b --- /dev/null +++ b/cloudsearch_transfer/adapter/pan123/transfer.py @@ -0,0 +1,71 @@ +"""123云盘转存逻辑 v1.0.0""" + +import re +import logging +from typing import List, Tuple + +logger = logging.getLogger(__name__) + + +class Pan123Transfer: + API_BASE = "https://www.123pan.com/api" + + def __init__(self, session, credential_mgr, config, transfer_config): + self.session = session + self.credential = credential_mgr + self.config = config + self.transfer_config = transfer_config + self._last_file_names = [] + + @staticmethod + def parse_share_url(url: str) -> Tuple[str, str]: + m = re.search(r"123pan\.com/s/([A-Za-z0-9]+)", url) + if not m: + raise ValueError("Invalid 123pan share URL") + code = m.group(1) + m2 = re.search(r"[?&]pwd=(\w+)", url) + return code, m2.group(1) if m2 else "" + + def get_share_info(self, share_key: str, password: str = "") -> dict: + payload = {"shareKey": share_key} + if password: + payload["sharePwd"] = password + resp = self.session.post( + f"{self.API_BASE}/share/info", + json=payload, + timeout=self.transfer_config.request_timeout, + ) + data = resp.json() + if data.get("code") != 0: + raise Exception(f"123 share info failed: {data}") + info = data.get("data", {}) + files = info.get("fileList", []) + return { + "title": info.get("shareName", ""), + "files": [{"id": f.get("fileId", ""), "name": f.get("fileName", ""), + "size": f.get("fileSize", 0)} for f in files], + "share_id": info.get("shareId", ""), + } + + def save_files(self, share_key: str, detail: dict, save_dir: str) -> List[str]: + payload = { + "shareKey": share_key, + "shareId": detail.get("share_id", ""), + "parentFileId": save_dir or "0", + } + resp = self.session.post( + f"{self.API_BASE}/share/save", + json=payload, + timeout=self.transfer_config.request_timeout, + ) + data = resp.json() + if data.get("code") != 0: + raise Exception(f"123 save failed: {data}") + return [str(data.get("data", {}).get("fileId", ""))] + + def create_share(self, file_ids: List[str], title: str, + password: str = "") -> Tuple[str, str]: + return "", "" + + def list_files(self, parent_id: str = "0") -> list: + return [] diff --git a/cloudsearch_transfer/adapter/quark/__init__.py b/cloudsearch_transfer/adapter/quark/__init__.py new file mode 100644 index 0000000..55d8d93 --- /dev/null +++ b/cloudsearch_transfer/adapter/quark/__init__.py @@ -0,0 +1,509 @@ +""" +CloudSearch Transfer — 夸克网盘适配器 v1.0.0 + +将 QuarkCredentialManager、QuarkTransfer、QuarkCleanup 组合为 +BaseCloudDriveAdapter 的完整实现。 + +夸克网盘 7 步 API 转存流程: + ① POST .../share/sharepage/token → stoken + ② GET .../share/sharepage/detail → fid, share_fid_token, title + ③ POST .../share/sharepage/save → task_id (转存) + ④ 轮询 GET .../task → save_as_top_fids + ⑤ POST .../share → task_id (创建分享) + ⑥ 轮询 GET .../task → share_id + ⑦ POST .../share/password → share_url, passcode + +参考 cloud-auto-save 的 quark 实现 + netdisk 的 Pan 接口约定。 +""" + +from __future__ import annotations + +import logging +import time +from typing import Any, Dict, List, Optional, Tuple + +from ..base import BaseCloudDriveAdapter, FileInfo, TransferResult, VerifyResult +from ...config import PlatformConfig, TransferConfig +from ...errors import TransferError, TransferErrorCode + +from .credential import QuarkCredentialManager +from .transfer import QuarkTransfer, SHARE_URL_PATTERN +from .cleanup import QuarkCleanup + +logger = logging.getLogger(__name__) + + +class QuarkAdapter(BaseCloudDriveAdapter): + """夸克网盘适配器。 + + 组合 credential / transfer / cleanup 三个模块, + 实现 BaseCloudDriveAdapter 定义的所有抽象方法。 + + Attributes: + PLATFORM_NAME: 展示用平台名称。 + PLATFORM_KEY: 内部平台标识。 + URL_PATTERNS: 夸克分享链接匹配正则列表。 + """ + + # ─── 平台标识 ────────────────────────────────────────────── + PLATFORM_NAME: str = "夸克网盘" + PLATFORM_KEY: str = "quark" + + # ─── URL 匹配 ────────────────────────────────────────────── + # 支持 pan.quark.cn/s/ + URL_PATTERNS: List[str] = [ + r"pan\.quark\.cn/s/(\w+)", + ] + + def __init__(self, config: PlatformConfig, transfer_config: TransferConfig) -> None: + """初始化夸克适配器。 + + Args: + config: 平台配置(含 Cookie 等)。 + transfer_config: 全局转存配置(超时、重试、轮询参数等)。 + """ + super().__init__(config, transfer_config) + + # 初始化三个子模块 + self._credential: QuarkCredentialManager = QuarkCredentialManager( + cookie=config.cookie + ) + self._transfer_engine: QuarkTransfer = QuarkTransfer( + credential=self._credential, + timeout=transfer_config.request_timeout, + poll_interval=transfer_config.task_poll_interval, + poll_max_attempts=transfer_config.task_poll_max_attempts, + ) + self._cleanup: QuarkCleanup = QuarkCleanup( + credential=self._credential, + timeout=transfer_config.request_timeout, + ) + + # ═══════════════════════════════════════════════════════════════ + # 公开接口实现 + # ═══════════════════════════════════════════════════════════════ + + def _setup_session(self) -> None: + """将夸克 Cookie 注入 session 的默认 headers。""" + headers = self._credential.get_headers() + if headers: + self.session.headers.update(headers) + logger.debug("[QuarkAdapter] Session headers updated with Cookie") + + # ─── transfer() 使用基类模板,子类实现 _transfer ────────── + + def _transfer(self, share_url: str, save_dir: str = "", + share_password: str = "") -> TransferResult: + """执行转存的核心逻辑(被基类 transfer() 调用)。 + + 通过 QuarkTransfer 引擎执行完整的 7 步流程。 + + Args: + share_url: 夸克分享链接。 + save_dir: 目标目录,空则使用配置的默认目录。 + share_password: 新分享的密码。 + + Returns: + TransferResult 包含转存结果。 + """ + start: float = time.time() + + # 凭证检查 + if not self._credential.validate(): + raise TransferError( + TransferErrorCode.NOT_LOGIN, + message="夸克 Cookie 无效或长度不足", + platform=self.PLATFORM_KEY, + ) + + # 目标目录:默认根目录 "0" + target_dir: str = save_dir or self.config.save_dir or "0" + + # 分享密码 + pwd: str = share_password or self.config.share_password or "" + + try: + result: Dict[str, Any] = self._transfer_engine.transfer( + share_url=share_url, + save_dir=target_dir, + share_password=pwd, + ) + except ValueError as exc: + raise TransferError( + TransferErrorCode.URL_INVALID, + message=str(exc), + platform=self.PLATFORM_KEY, + ) from exc + except RuntimeError as exc: + msg: str = str(exc) + if "stoken" in msg or "status" in msg: + raise TransferError( + TransferErrorCode.SHARE_NOT_EXIST, + message=msg, + platform=self.PLATFORM_KEY, + ) from exc + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=msg, + platform=self.PLATFORM_KEY, + ) from exc + + elapsed: int = int((time.time() - start) * 1000) + + # 广告过滤:在转存完成后对 new_file_ids 进行过滤 + new_fids: List[str] = result.get("new_file_ids", []) + if self.transfer_config.ad_filter_enabled and new_fids: + new_fids = self._filter_ads(new_fids) + if not new_fids: + raise TransferError( + TransferErrorCode.RESOURCE_EMPTY, + platform=self.PLATFORM_KEY, + ) + + return TransferResult( + success=True, + platform=self.PLATFORM_KEY, + new_file_id=",".join(new_fids), + file_name=result.get("file_name", ""), + share_url=result.get("share_url", ""), + share_password=result.get("passcode", pwd), + original_url=share_url, + elapsed_ms=elapsed, + ) + + # ─── verify() 使用基类模板,子类实现 _verify ─────────────── + + def _verify(self, share_url: str) -> VerifyResult: + """验证夸克分享链接有效性。 + + 通过获取 stoken → 获取详情来验证链接。 + + Args: + share_url: 夸克分享链接。 + + Returns: + VerifyResult 包含验证结果。 + """ + try: + pwd_id, passcode = self._parse_share_url(share_url) + + if not self._credential.validate(): + return VerifyResult( + valid=False, + platform=self.PLATFORM_KEY, + error=TransferError( + TransferErrorCode.NOT_LOGIN, + platform=self.PLATFORM_KEY, + ), + ) + + stoken: str = self._transfer_engine._get_stoken(pwd_id, passcode) + detail: Dict[str, Any] = self._transfer_engine._get_detail(pwd_id, stoken) + files: List[FileInfo] = self._extract_file_list(detail) + + return VerifyResult( + valid=True, + platform=self.PLATFORM_KEY, + title=detail.get("title", ""), + file_count=len(files), + files=files, + ) + + except TransferError: + raise + except (ValueError, RuntimeError) as exc: + return VerifyResult( + valid=False, + platform=self.PLATFORM_KEY, + error=TransferError( + TransferErrorCode.SHARE_NOT_EXIST, + message=str(exc), + platform=self.PLATFORM_KEY, + ), + ) + except Exception as exc: + return VerifyResult( + valid=False, + platform=self.PLATFORM_KEY, + error=TransferError( + TransferErrorCode.NETWORK_ERROR, + message=str(exc), + platform=self.PLATFORM_KEY, + ), + ) + + # ─── 核心抽象方法 ───────────────────────────────────────── + + def _get_share_detail(self, pwd_id: str, passcode: str = "") -> dict: + """获取夸克分享详情(基类 transfer() 流程中的步骤②)。 + + Args: + pwd_id: 分享 ID。 + passcode: 提取码。 + + Returns: + 分享详情字典,包含 title, fid, share_fid_token 等字段。 + """ + stoken: str = self._transfer_engine._get_stoken(pwd_id, passcode) + return self._transfer_engine._get_detail(pwd_id, stoken) + + def _save_files(self, pwd_id: str, detail: dict, save_dir: str) -> List[str]: + """转存文件到自己的夸克网盘(基类 transfer() 流程中的步骤③④)。 + + Args: + pwd_id: 分享 ID。 + detail: 分享详情(来自 _get_share_detail)。 + save_dir: 目标目录 ID。 + + Returns: + 转存后的新文件 ID 列表。 + """ + # 需要 stoken,从 detail 间接获取(重新请求) + stoken: str = self._transfer_engine._get_stoken(pwd_id) + task_id: str = self._transfer_engine._init_save( + pwd_id, stoken, detail, to_pdir_fid=save_dir + ) + return self._transfer_engine._poll_save_task(task_id) + + def _create_share(self, file_ids: List[str], title: str, + password: str = "") -> Tuple[str, str]: + """创建夸克分享链接(基类 transfer() 流程中的步骤⑤⑥⑦)。 + + Args: + file_ids: 要分享的文件 ID 列表。 + title: 分享标题。 + password: 分享密码。 + + Returns: + (share_url, share_password) 元组。 + """ + task_id: str = self._transfer_engine._init_share(file_ids, title) + share_id: str = self._transfer_engine._poll_share_task(task_id) + return self._transfer_engine._set_password(share_id, password) + + def _extract_file_list(self, detail: dict) -> List[FileInfo]: + """从夸克分享详情中提取文件列表。 + + 夸克的 sharepage/detail 返回格式: + { + "files": [ + {"fid": "...", "file_name": "...", "size": 123, "dir": false, ...}, + ] + } + + Args: + detail: 分享详情字典。 + + Returns: + FileInfo 对象列表。 + """ + files_data: List[Dict[str, Any]] = detail.get("files", []) + result: List[FileInfo] = [] + + for f in files_data: + file_info = FileInfo( + fid=str(f.get("fid", f.get("file_id", ""))), + name=str(f.get("file_name", f.get("name", ""))), + size=int(f.get("size", 0)), + is_dir=bool(f.get("dir", f.get("is_dir", False))), + ext=str(f.get("ext", f.get("file_extension", ""))), + ) + result.append(file_info) + + # 如果 files 为空,尝试用 detail 顶层字段构造单个文件信息 + if not result and detail.get("fid"): + result.append(FileInfo( + fid=str(detail.get("fid", "")), + name=str(detail.get("title", detail.get("file_name", ""))), + size=0, + is_dir=False, + )) + + return result + + def _filter_ads(self, file_ids: List[str]) -> List[str]: + """过滤广告文件。 + + 合并配置层和平台层的 banned_keywords,调用 QuarkCleanup 执行过滤。 + 当前实现基于 file_ids 列表过滤(无文件名信息时保持原样)。 + + Args: + file_ids: 文件 ID 列表。 + + Returns: + 过滤后的文件 ID 列表。 + """ + keywords: List[str] = list( + set(self.config.banned_keywords) + | set(self.transfer_config.default_banned_keywords) + ) + if not keywords: + return file_ids + + # 获取文件信息以进行名称匹配 + # 在基类 transfer() 流程中,此处 file_ids 已为转存后的新 IDs + try: + files: List[FileInfo] = self.get_files() + file_names: List[str] = [f.name for f in files] + return QuarkCleanup.filter_ad_ids(file_ids, file_names, keywords) + except Exception: + # 如果无法获取文件名列表,跳过广告过滤 + logger.warning("[QuarkAdapter] Cannot fetch file list for ad filtering, skipping") + return file_ids + + # ─── get_files / delete ──────────────────────────────────── + + def get_files(self, parent_fid: str = "0") -> List[FileInfo]: + """列出夸克网盘指定目录下的文件。 + + GET /1/clouddrive/file/sort?pdir_fid=&_page=1&_size=100&_sort=updated_at:desc + + Args: + parent_fid: 父目录 ID,默认 "0" 即根目录。 + + Returns: + FileInfo 列表。 + """ + url: str = "https://drive-pc.quark.cn/1/clouddrive/file/sort" + params: Dict[str, str] = { + "pdir_fid": parent_fid, + "_page": "1", + "_size": "100", + "_sort": "updated_at:desc", + } + headers: Dict[str, str] = self._credential.get_headers() + + try: + resp = self._get(url, params=params, headers=headers) + except Exception as exc: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=f"获取文件列表失败: {exc}", + platform=self.PLATFORM_KEY, + ) from exc + + data: Dict[str, Any] = resp.json() + status: int = data.get("status", -1) + if status != 0 and data.get("code") not in (0, None): + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=f"获取文件列表失败: {data.get('message')}", + platform=self.PLATFORM_KEY, + ) + + files_data: List[Dict[str, Any]] = data.get("data", {}).get("list", []) + result: List[FileInfo] = [] + for f in files_data: + result.append(FileInfo( + fid=str(f.get("fid", "")), + name=str(f.get("file_name", f.get("name", ""))), + size=int(f.get("size", 0)), + is_dir=bool(f.get("dir", f.get("is_dir", False))), + ext=str(f.get("file_extension", f.get("ext", ""))), + )) + + logger.debug("[QuarkAdapter] Listed %d files in dir=%s", len(result), parent_fid) + return result + + def delete(self, file_ids: List[str]) -> bool: + """删除夸克网盘文件(移到回收站)。 + + Args: + file_ids: 要删除的文件 ID 列表。 + + Returns: + True 表示删除成功。 + """ + if not self._credential.validate(): + raise TransferError( + TransferErrorCode.NOT_LOGIN, + platform=self.PLATFORM_KEY, + ) + + try: + return self._cleanup.delete_files(file_ids) + except RuntimeError as exc: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=str(exc), + platform=self.PLATFORM_KEY, + ) from exc + + def delete_permanent(self, file_ids: List[str]) -> bool: + """彻底删除夸克网盘文件(不可恢复)。 + + Args: + file_ids: 要彻底删除的文件 ID 列表。 + + Returns: + True 表示删除成功。 + """ + if not self._credential.validate(): + raise TransferError( + TransferErrorCode.NOT_LOGIN, + platform=self.PLATFORM_KEY, + ) + + try: + return self._cleanup.delete_files_permanent(file_ids) + except RuntimeError as exc: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=str(exc), + platform=self.PLATFORM_KEY, + ) from exc + + # ─── 工具方法 ───────────────────────────────────────────── + + def _parse_share_url(self, url: str) -> Tuple[str, str]: + """解析夸克分享 URL 提取 (pwd_id, passcode)。 + + 夸克链接格式:https://pan.quark.cn/s/ 或带 ?pwd=xxxx + + Args: + url: 夸克分享链接。 + + Returns: + (pwd_id, passcode) 元组。 + + Raises: + TransferError: URL 格式无法识别。 + """ + pwd_id: Optional[str] = QuarkTransfer.parse_share_url(url) + if not pwd_id: + raise TransferError( + TransferErrorCode.URL_INVALID, + message=f"无法解析夸克链接: {url}", + platform=self.PLATFORM_KEY, + ) + + # 提取密码参数 + from urllib.parse import urlparse, parse_qs + parsed = urlparse(url) + params = parse_qs(parsed.query) + passcode: str = params.get("pwd", params.get("code", [""]))[0] + + return pwd_id, passcode + + def update_cookie(self, cookie: str) -> None: + """动态更新 Cookie 并同步到 session headers。 + + Args: + cookie: 新的 Cookie 字符串。 + """ + self._credential.update_cookie(cookie) + self._setup_session() + logger.info("[QuarkAdapter] Cookie updated, new length=%d", len(cookie)) + + def close(self) -> None: + """关闭所有子模块的 HTTP 会话。""" + self._transfer_engine.close() + self._cleanup.close() + self.session.close() + + def __repr__(self) -> str: + return ( + f"QuarkAdapter(name={self.PLATFORM_NAME}, " + f"account={self.config.account_name}, " + f"credential_valid={self._credential.validate()})" + ) diff --git a/cloudsearch_transfer/adapter/quark/cleanup.py b/cloudsearch_transfer/adapter/quark/cleanup.py new file mode 100644 index 0000000..687356b --- /dev/null +++ b/cloudsearch_transfer/adapter/quark/cleanup.py @@ -0,0 +1,209 @@ +""" +CloudSearch Transfer — 夸克网盘清理模块 v1.0.0 + +提供文件删除和广告过滤功能。 +""" + +from __future__ import annotations + +import logging +from typing import Any, Dict, List + +import requests + +from .credential import QuarkCredentialManager + +logger = logging.getLogger(__name__) + +# ─── 夸克 API ───────────────────────────────────────────────────── +QUARK_API_BASE = "https://drive-pc.quark.cn" +QUARK_FILE_API = f"{QUARK_API_BASE}/1/clouddrive/file" + + +class QuarkCleanup: + """夸克网盘文件清理器。 + + 提供批量删除文件和广告文件过滤功能。 + + Attributes: + credential: 夸克凭证管理器。 + session: 复用的 requests.Session。 + timeout: HTTP 请求超时秒数。 + """ + + def __init__( + self, + credential: QuarkCredentialManager, + timeout: int = 30, + ) -> None: + """初始化清理器。 + + Args: + credential: 有效的夸克凭证管理器。 + timeout: HTTP 请求超时秒数。 + """ + self.credential: QuarkCredentialManager = credential + self.timeout: int = timeout + self.session: requests.Session = requests.Session() + + def delete_files(self, file_ids: List[str]) -> bool: + """批量删除文件(回收站方式)。 + + POST /1/clouddrive/file/delete + Body: { + "action_type": 2, + "filelist": ["", "", ...] + } + + action_type=1 表示彻底删除,action_type=2 表示移入回收站。 + + Args: + file_ids: 要删除的文件 ID 列表。 + + Returns: + True 表示删除请求已提交成功,False 表示失败。 + + Raises: + RuntimeError: HTTP 请求错误。 + """ + if not file_ids: + logger.warning("[QuarkCleanup] delete_files called with empty list") + return True + + url: str = f"{QUARK_FILE_API}/delete" + body: Dict[str, Any] = { + "action_type": 2, # 2=回收站, 1=彻底删除 + "filelist": file_ids, + } + headers = self.credential.get_headers() + headers.setdefault("Content-Type", "application/json") + + logger.info("[QuarkCleanup] Deleting %d files: %s", len(file_ids), file_ids) + + try: + resp = self.session.post(url, json=body, headers=headers, timeout=self.timeout) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"删除文件失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + status: int = data.get("status", -1) + if status != 0 and data.get("code") not in (0, None): + logger.error("[QuarkCleanup] Delete returned error: status=%s, message=%s", + status, data.get("message")) + return False + + logger.info("[QuarkCleanup] Delete succeeded for %d files", len(file_ids)) + return True + + def delete_files_permanent(self, file_ids: List[str]) -> bool: + """彻底删除文件(不从回收站恢复)。 + + 与 delete_files 类似,但 action_type=1。 + + Args: + file_ids: 要彻底删除的文件 ID 列表。 + + Returns: + True 表示删除请求已提交成功。 + """ + if not file_ids: + return True + + url: str = f"{QUARK_FILE_API}/delete" + body: Dict[str, Any] = { + "action_type": 1, # 1=彻底删除 + "filelist": file_ids, + } + headers = self.credential.get_headers() + headers.setdefault("Content-Type", "application/json") + + logger.info("[QuarkCleanup] Permanently deleting %d files", len(file_ids)) + + try: + resp = self.session.post(url, json=body, headers=headers, timeout=self.timeout) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"彻底删除失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + return data.get("status") == 0 or data.get("code") in (0, None) + + @staticmethod + def filter_ads( + files: List[Dict[str, Any]], + banned_keywords: List[str], + ) -> List[Dict[str, Any]]: + """按关键词过滤文件列表中的广告文件。 + + 遍历文件列表,剔除文件名中包含任一 banned_keywords 的文件。 + 匹配方式:不区分大小写的子串匹配。 + + Args: + files: 文件信息字典列表,每个字典需包含 "name" 字段。 + banned_keywords: 被禁关键词列表(匹配不区分大小写)。 + + Returns: + 过滤后的文件信息列表。 + """ + if not banned_keywords: + return files + + filtered: List[Dict[str, Any]] = [] + removed_count: int = 0 + + for f in files: + name: str = f.get("name", "") + name_lower: str = str(name).lower() + + if any(keyword.lower() in name_lower for keyword in banned_keywords): + logger.info("[QuarkCleanup] Filtered ad file: '%s'", name) + removed_count += 1 + continue + + filtered.append(f) + + if removed_count > 0: + logger.info("[QuarkCleanup] Ad filter removed %d/%d files", removed_count, len(files)) + return filtered + + @staticmethod + def filter_ad_ids( + file_ids: List[str], + file_names: List[str], + banned_keywords: List[str], + ) -> List[str]: + """按关键词过滤文件 ID 列表。 + + 根据 file_names 判断是否为广告,返回对应的 file_ids。 + + Args: + file_ids: 文件 ID 列表。 + file_names: 与 file_ids 一一对应的 文件名列表。 + banned_keywords: 被禁关键词列表。 + + Returns: + 过滤后的 file_ids 列表。 + """ + if not banned_keywords or len(file_ids) != len(file_names): + return file_ids + + filtered_ids: List[str] = [] + for fid, name in zip(file_ids, file_names): + name_lower: str = str(name).lower() + if any(kw.lower() in name_lower for kw in banned_keywords): + logger.info("[QuarkCleanup] Filtered ad file: '%s' (id=%s)", name, fid) + continue + filtered_ids.append(fid) + + return filtered_ids + + def close(self) -> None: + """关闭 HTTP 会话。""" + self.session.close() + + def __enter__(self) -> "QuarkCleanup": + return self + + def __exit__(self, *args: Any) -> None: + self.close() diff --git a/cloudsearch_transfer/adapter/quark/credential.py b/cloudsearch_transfer/adapter/quark/credential.py new file mode 100644 index 0000000..77dcc03 --- /dev/null +++ b/cloudsearch_transfer/adapter/quark/credential.py @@ -0,0 +1,89 @@ +""" +CloudSearch Transfer — 夸克网盘凭证管理 v1.0.0 + +夸克网盘使用 Cookie 直传,无需 token 刷新机制。 +验证方式:检查 Cookie 字符串长度是否 >= 50。 +""" + +from __future__ import annotations + +import logging +from typing import Dict + +logger = logging.getLogger(__name__) + + +class QuarkCredentialManager: + """夸克网盘凭证管理器。 + + 夸克网盘的上传/转存 API 直接从 Cookie 中读取认证信息, + 无需 OAuth 或 refresh_token 刷新流程。 + + Attributes: + cookie: 存储的夸克 Cookie 字符串。 + """ + + # 夸克 Cookie 最小长度阈值(经验值,正常 Cookie 远超此长度) + MIN_COOKIE_LENGTH: int = 50 + + def __init__(self, cookie: str = "") -> None: + """初始化凭证管理器。 + + Args: + cookie: 夸克网盘的 Cookie 字符串。 + """ + self.cookie: str = cookie + + def validate(self) -> bool: + """验证 Cookie 是否满足最小长度要求。 + + Returns: + True 表示 Cookie 长度 >= MIN_COOKIE_LENGTH,否则为 False。 + """ + if not self.cookie: + logger.warning("[QuarkCredential] Cookie is empty") + return False + + valid = len(self.cookie) >= self.MIN_COOKIE_LENGTH + if not valid: + logger.warning( + "[QuarkCredential] Cookie too short: len=%d, min=%d", + len(self.cookie), + self.MIN_COOKIE_LENGTH, + ) + return valid + + def is_valid(self) -> bool: + """validate() 的别名,便于适配器层调用。""" + return self.validate() + + def get_headers(self) -> Dict[str, str]: + """构建带 Cookie 认证的 HTTP 请求头。 + + 夸克 API 需要在每次请求头中携带完整的 Cookie 字符串。 + + Returns: + 包含 Cookie 字段的请求头字典。Cookie 无效时仍返回空字典。 + """ + if not self.validate(): + logger.warning("[QuarkCredential] Cannot build headers: cookie invalid") + return {} + + return { + "Cookie": self.cookie, + } + + def update_cookie(self, cookie: str) -> None: + """更新 Cookie 字符串(用于手动刷新场景)。 + + Args: + cookie: 新的 Cookie 字符串。 + """ + self.cookie = cookie + logger.info("[QuarkCredential] Cookie updated, new length=%d", len(cookie)) + + def __repr__(self) -> str: + return ( + f"QuarkCredentialManager(cookie_len={len(self.cookie) if self.cookie else 0}, " + f"valid={self.validate()})" + ) diff --git a/cloudsearch_transfer/adapter/quark/transfer.py b/cloudsearch_transfer/adapter/quark/transfer.py new file mode 100644 index 0000000..9138e4e --- /dev/null +++ b/cloudsearch_transfer/adapter/quark/transfer.py @@ -0,0 +1,554 @@ +""" +CloudSearch Transfer — 夸克网盘转存核心 v1.0.0 + +夸克网盘 7 步转存流程: + + ① POST .../share/sharepage/token → stoken + ② GET .../share/sharepage/detail → fid, share_fid_token, title + ③ POST .../share/sharepage/save → task_id (转存任务) + ④ 轮询 GET .../task → save_as_top_fids (status==2 完成) + ⑤ POST .../share → task_id (创建分享任务) + ⑥ 轮询 GET .../task → share_id + ⑦ POST .../share/password → share_url, passcode + +参考 cloud-auto-save 的 quark.py 实现。 +""" + +from __future__ import annotations + +import logging +import re +import time +from typing import Any, Dict, List, Optional, Tuple + +import requests + +from .credential import QuarkCredentialManager + +logger = logging.getLogger(__name__) + +# ─── 夸克 API 基础地址 ────────────────────────────────────────────── +QUARK_API_BASE = "https://drive-pc.quark.cn" +QUARK_SHARE_API = f"{QUARK_API_BASE}/1/clouddrive/share" + +# ─── URL 解析正则 ─────────────────────────────────────────────────── +# 匹配 pan.quark.cn/s/ +SHARE_URL_PATTERN = re.compile(r"pan\.quark\.cn/s/(\w+)") + + +class QuarkTransfer: + """夸克网盘转存引擎。 + + 封装完整的 7 步 API 流程:获取 stoken → 获取详情 → 保存文件 → + 创建分享 → 设置密码。 + + Attributes: + credential: 夸克凭证管理器实例。 + session: 复用的 requests.Session。 + timeout: 请求超时(秒)。 + poll_interval: 轮询间隔(秒)。 + poll_max_attempts: 最大轮询次数。 + """ + + def __init__( + self, + credential: QuarkCredentialManager, + timeout: int = 30, + poll_interval: float = 0.5, + poll_max_attempts: int = 50, + ) -> None: + """初始化转存引擎。 + + Args: + credential: 有效的夸克凭证管理器。 + timeout: HTTP 请求超时秒数。 + poll_interval: 异步任务轮询间隔秒数。 + poll_max_attempts: 异步任务最大轮询次数(默认 50,同 base 层配置)。 + """ + self.credential: QuarkCredentialManager = credential + self.timeout: int = timeout + self.poll_interval: float = poll_interval + self.poll_max_attempts: int = poll_max_attempts + self.session: requests.Session = requests.Session() + + # ─── 步骤 ①:获取 stoken ─────────────────────────────────────── + + def _get_stoken(self, pwd_id: str, passcode: str = "") -> str: + """步骤①:向夸克交换 stoken。 + + POST /1/clouddrive/share/sharepage/token + Body: {"passcode": "", "pwd_id": ""} + + Args: + pwd_id: 分享 ID(从 URL 解析)。 + passcode: 分享提取码,无密码时为空字符串。 + + Returns: + stoken 字符串。 + + Raises: + RuntimeError: API 返回错误或 stoken 缺失。 + """ + url = f"{QUARK_SHARE_API}/sharepage/token" + body: Dict[str, str] = { + "passcode": passcode, + "pwd_id": pwd_id, + } + headers = self.credential.get_headers() + headers.setdefault("Content-Type", "application/json") + + logger.info("[QuarkTransfer] ① Getting stoken for pwd_id=%s", pwd_id) + + try: + resp = self.session.post(url, json=body, headers=headers, timeout=self.timeout) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"获取 stoken 失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + stoken: Optional[str] = data.get("data", {}).get("stoken") + if not stoken: + raise RuntimeError(f"stoken 缺失, response: {data}") + + logger.info("[QuarkTransfer] ① stoken obtained") + return stoken + + # ─── 步骤 ②:获取分享详情 ───────────────────────────────────── + + def _get_detail(self, pwd_id: str, stoken: str) -> Dict[str, Any]: + """步骤②:获取分享详情。 + + GET /1/clouddrive/share/sharepage/detail?pwd_id=xx&stoken=xx&_fetch_share=1 + + 返回字段包含:title, fid, share_fid_token 等。 + + Args: + pwd_id: 分享 ID。 + stoken: 步骤①获取的 stoken。 + + Returns: + 分享详情字典。 + + Raises: + RuntimeError: API 返回错误。 + """ + url = f"{QUARK_SHARE_API}/sharepage/detail" + params: Dict[str, str] = { + "pwd_id": pwd_id, + "stoken": stoken, + "_fetch_share": "1", + } + headers = self.credential.get_headers() + + logger.info("[QuarkTransfer] ② Fetching share detail for pwd_id=%s", pwd_id) + + try: + resp = self.session.get(url, params=params, headers=headers, timeout=self.timeout) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"获取分享详情失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + status: int = data.get("status", -1) + if status != 0 and data.get("code") not in (0, None): + raise RuntimeError(f"分享详情API返回错误: status={status}, message={data.get('message')}") + + detail: Optional[Dict[str, Any]] = data.get("data") + if not detail: + raise RuntimeError(f"分享详情数据为空, response: {data}") + + # 提取关键字段供后续使用 + logger.info( + "[QuarkTransfer] ② Detail: title=%s, fid=%s", + detail.get("title"), + detail.get("fid"), + ) + return detail + + # ─── 步骤 ③:发起转存 ───────────────────────────────────────── + + def _init_save(self, pwd_id: str, stoken: str, detail: Dict[str, Any], + to_pdir_fid: str = "0") -> str: + """步骤③:发起转存请求。 + + POST /1/clouddrive/share/sharepage/save + Body: { + "fid_list": [, ...], + "fid_token_list": [, ...], + "to_pdir_fid": "0", + "pwd_id": "", + "stoken": "", + "pdir_fid": "0", + "scene": "link" + } + + Args: + pwd_id: 分享 ID。 + stoken: stoken。 + detail: 步骤②的分享详情。 + to_pdir_fid: 目标目录 ID,默认 "0" 即根目录。 + + Returns: + task_id 字符串,用于步骤④轮询。 + + Raises: + RuntimeError: API 返回错误。 + """ + url = f"{QUARK_SHARE_API}/sharepage/save" + fid_list: List[str] = detail.get("fid_list", [detail.get("fid", [])]) + fid_token_list: List[str] = detail.get("fid_token_list", [detail.get("share_fid_token", [])]) + + # 如果 detail 的 fid/fid_token 是单值而非列表,则包装为列表 + if not isinstance(fid_list, list): + fid_list = [fid_list] if fid_list else [] + if not isinstance(fid_token_list, list): + fid_token_list = [fid_token_list] if fid_token_list else [] + + body: Dict[str, Any] = { + "fid_list": fid_list, + "fid_token_list": fid_token_list, + "to_pdir_fid": to_pdir_fid, + "pwd_id": pwd_id, + "stoken": stoken, + "pdir_fid": "0", + "scene": "link", + } + headers = self.credential.get_headers() + headers.setdefault("Content-Type", "application/json") + + logger.info("[QuarkTransfer] ③ Initiating save: %d files to dir=%s", len(fid_list), to_pdir_fid) + + try: + resp = self.session.post(url, json=body, headers=headers, timeout=self.timeout) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"发起转存失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + status: int = data.get("status", -1) + if status != 0: + raise RuntimeError(f"转存请求失败: status={status}, message={data.get('message')}") + + task_id: Optional[str] = data.get("data", {}).get("task_id") + if not task_id: + raise RuntimeError(f"转存 task_id 缺失, response: {data}") + + logger.info("[QuarkTransfer] ③ Save task created: task_id=%s", task_id) + return task_id + + # ─── 步骤 ④:轮询转存任务 ───────────────────────────────────── + + def _poll_save_task(self, task_id: str) -> List[str]: + """步骤④:轮询转存任务直到完成。 + + GET /1/clouddrive/task?task_id=&retry_index=0 + + 轮询最多 poll_max_attempts 次, + 当 status==2 时表示任务成功完成, + status==-1 表示失败。 + + Args: + task_id: 步骤③返回的 task_id。 + + Returns: + save_as_top_fids 列表(转存后的文件 ID)。 + + Raises: + RuntimeError: 任务失败或超时。 + """ + url = f"{QUARK_API_BASE}/1/clouddrive/task" + headers = self.credential.get_headers() + + for attempt in range(1, self.poll_max_attempts + 1): + params: Dict[str, str] = { + "task_id": task_id, + "retry_index": "0", + } + + try: + resp = self.session.get(url, params=params, headers=headers, timeout=self.timeout) + resp.raise_for_status() + except requests.RequestException: + logger.warning("[QuarkTransfer] ④ Poll attempt %d/%d failed, retrying...", + attempt, self.poll_max_attempts) + time.sleep(self.poll_interval) + continue + + data: Dict[str, Any] = resp.json() + task_status: int = data.get("data", {}).get("status", -1) + + logger.debug("[QuarkTransfer] ④ Poll %d/%d: status=%d", attempt, self.poll_max_attempts, task_status) + + if task_status == 2: # 成功 + save_as_top_fids: List[str] = ( + data.get("data", {}).get("save_as", {}).get("save_as_top_fids", []) + ) + logger.info("[QuarkTransfer] ④ Save completed: %d files saved", len(save_as_top_fids)) + return save_as_top_fids + + if task_status == -1: + raise RuntimeError(f"转存任务失败: task_id={task_id}, response={data}") + + time.sleep(self.poll_interval) + + raise RuntimeError( + f"转存任务超时: task_id={task_id}, 已轮询 {self.poll_max_attempts} 次" + ) + + # ─── 步骤 ⑤:发起创建分享 ───────────────────────────────────── + + def _init_share(self, fid_list: List[str], title: str, + expired_type: int = 1) -> str: + """步骤⑤:创建分享链接。 + + POST /1/clouddrive/share + Body: { + "fid_list": [, ...], + "title": "", + "expired_type": 1 + } + + Args: + fid_list: 要分享的文件 ID 列表。 + title: 分享标题。 + expired_type: 过期类型,1=永久有效(默认)。 + + Returns: + task_id 字符串,用于步骤⑥轮询。 + + Raises: + RuntimeError: API 返回错误。 + """ + url = f"{QUARK_SHARE_API}" + body: Dict[str, Any] = { + "fid_list": fid_list, + "title": title or "分享", + "expired_type": expired_type, + } + headers = self.credential.get_headers() + headers.setdefault("Content-Type", "application/json") + + logger.info("[QuarkTransfer] ⑤ Creating share: %d files, title='%s'", len(fid_list), title) + + try: + resp = self.session.post(url, json=body, headers=headers, timeout=self.timeout) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"创建分享失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + status: int = data.get("status", -1) + if status != 0 and data.get("code") not in (0, None): + raise RuntimeError(f"创建分享请求失败: status={status}, message={data.get('message')}") + + task_id: Optional[str] = data.get("data", {}).get("task_id") + if not task_id: + raise RuntimeError(f"分享 task_id 缺失, response: {data}") + + logger.info("[QuarkTransfer] ⑤ Share task created: task_id=%s", task_id) + return task_id + + # ─── 步骤 ⑥:轮询分享任务 ───────────────────────────────────── + + def _poll_share_task(self, task_id: str) -> str: + """步骤⑥:轮询分享任务直到完成。 + + GET /1/clouddrive/task?task_id=<task_id>&retry_index=0 + + 轮询最多 poll_max_attempts 次,status==2 完成, + 返回 share_id。 + + Args: + task_id: 步骤⑤返回的 task_id。 + + Returns: + share_id 字符串。 + + Raises: + RuntimeError: 任务失败或超时。 + """ + url = f"{QUARK_API_BASE}/1/clouddrive/task" + headers = self.credential.get_headers() + + for attempt in range(1, self.poll_max_attempts + 1): + params: Dict[str, str] = { + "task_id": task_id, + "retry_index": "0", + } + + try: + resp = self.session.get(url, params=params, headers=headers, timeout=self.timeout) + resp.raise_for_status() + except requests.RequestException: + logger.warning("[QuarkTransfer] ⑥ Poll attempt %d/%d failed, retrying...", + attempt, self.poll_max_attempts) + time.sleep(self.poll_interval) + continue + + data: Dict[str, Any] = resp.json() + task_status: int = data.get("data", {}).get("status", -1) + + logger.debug("[QuarkTransfer] ⑥ Poll %d/%d: status=%d", attempt, self.poll_max_attempts, task_status) + + if task_status == 2: # 成功 + share_id: Optional[str] = data.get("data", {}).get("share_id") + if not share_id: + # 有时 share_id 在嵌套位置 + share_id = data.get("data", {}).get("result", {}).get("share_id", "") + if not share_id: + raise RuntimeError(f"分享完成但 share_id 缺失: {data}") + logger.info("[QuarkTransfer] ⑥ Share completed: share_id=%s", share_id) + return share_id + + if task_status == -1: + raise RuntimeError(f"分享任务失败: task_id={task_id}, response={data}") + + time.sleep(self.poll_interval) + + raise RuntimeError( + f"分享任务超时: task_id={task_id}, 已轮询 {self.poll_max_attempts} 次" + ) + + # ─── 步骤 ⑦:设置分享密码 ───────────────────────────────────── + + def _set_password(self, share_id: str, password: str = "") -> Tuple[str, str]: + """步骤⑦:设置分享密码并获取分享链接。 + + POST /1/clouddrive/share/password + Body: {"share_id": "<share_id>"} + + 即使不设密码也要调用此 API 以获取正式的 share_url。 + + Args: + share_id: 步骤⑥返回的 share_id。 + password: 分享密码,空字符串表示无密码。 + + Returns: + (share_url, passcode) 元组。 + + Raises: + RuntimeError: API 返回错误。 + """ + url = f"{QUARK_SHARE_API}/password" + body: Dict[str, str] = { + "share_id": share_id, + } + headers = self.credential.get_headers() + headers.setdefault("Content-Type", "application/json") + + logger.info("[QuarkTransfer] ⑦ Setting password for share_id=%s", share_id) + + try: + resp = self.session.post(url, json=body, headers=headers, timeout=self.timeout) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"设置分享密码失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + status: int = data.get("status", -1) + if status != 0 and data.get("code") not in (0, None): + raise RuntimeError(f"设置密码失败: status={status}, message={data.get('message')}") + + share_url: str = data.get("data", {}).get("share_url", "") + passcode: str = data.get("data", {}).get("passcode", password) + + if not share_url: + # 用 share_id 构造默认分享链接 + share_url = f"https://pan.quark.cn/s/{share_id}" + + logger.info("[QuarkTransfer] ⑦ Password set: share_url=%s, passcode=%s", share_url, passcode) + return share_url, passcode + + # ─── 公开入口 ───────────────────────────────────────────────── + + def transfer( + self, + share_url: str, + save_dir: str = "0", + share_password: str = "", + ) -> Dict[str, Any]: + """执行完整的 7 步转存流程。 + + 从原始夸克分享链接开始,将文件转存到自己网盘,再创建新分享。 + + Args: + share_url: 原始夸克分享链接,如 https://pan.quark.cn/s/xxxxx。 + save_dir: 转存目标目录 ID,默认 "0"(根目录)。 + share_password: 新分享的密码,空字符串表示无密码。 + + Returns: + 包含以下字段的字典: + - success: bool + - new_file_ids: List[str] — 转存后的文件ID列表 + - file_name: str — 分享标题 + - share_url: str — 新分享链接 + - passcode: str — 新分享密码 + + Raises: + RuntimeError: 任一步骤失败。 + ValueError: URL 解析失败。 + """ + # 0. 解析 URL 提取 pwd_id + match = SHARE_URL_PATTERN.search(share_url) + if not match: + raise ValueError(f"无法从URL中提取夸克分享ID: {share_url}") + pwd_id: str = match.group(1) + + logger.info("[QuarkTransfer] Starting 7-step transfer for pwd_id=%s", pwd_id) + + # ① 获取 stoken + stoken: str = self._get_stoken(pwd_id) + + # ② 获取分享详情 + detail: Dict[str, Any] = self._get_detail(pwd_id, stoken) + + # ③ 发起转存 + save_task_id: str = self._init_save(pwd_id, stoken, detail, to_pdir_fid=save_dir) + + # ④ 轮询转存任务 + new_fids: List[str] = self._poll_save_task(save_task_id) + if not new_fids: + raise RuntimeError("转存完成但未获取到文件ID") + + # ⑤ 发起创建分享 + title: str = detail.get("title", "分享") + share_task_id: str = self._init_share(new_fids, title) + + # ⑥ 轮询分享任务 + share_id: str = self._poll_share_task(share_task_id) + + # ⑦ 设置密码 + new_share_url, passcode = self._set_password(share_id, share_password) + + result: Dict[str, Any] = { + "success": True, + "new_file_ids": new_fids, + "file_name": title, + "share_url": new_share_url, + "passcode": passcode, + } + logger.info("[QuarkTransfer] 7-step transfer complete: %s", result) + return result + + @staticmethod + def parse_share_url(url: str) -> Optional[str]: + """从夸克分享链接中提取 pwd_id。 + + Args: + url: 夸克分享链接。 + + Returns: + pwd_id 字符串,解析失败返回 None。 + """ + match = SHARE_URL_PATTERN.search(url) + return match.group(1) if match else None + + def close(self) -> None: + """关闭 HTTP 会话。""" + self.session.close() + + def __enter__(self) -> "QuarkTransfer": + return self + + def __exit__(self, *args: Any) -> None: + self.close() diff --git a/cloudsearch_transfer/adapter/uc/__init__.py b/cloudsearch_transfer/adapter/uc/__init__.py new file mode 100644 index 0000000..3e87e09 --- /dev/null +++ b/cloudsearch_transfer/adapter/uc/__init__.py @@ -0,0 +1,493 @@ +""" +CloudSearch Transfer — UC网盘适配器 v1.0.0 + +将 UcCredentialManager、UcTransfer、UcCleanup 组合为 +BaseCloudDriveAdapter 的完整实现。 + +UC网盘 7 步 API 转存流程(与夸克高度相似,API 域名不同): + ① POST .../share/sharepage/v2/detail?pr=UCBrowser&fr=pc → stoken + ② GET .../share/sharepage/detail → fid, share_fid_token, title + ③ POST .../share/sharepage/save → task_id (转存) + ④ 轮询 GET .../task → save_as_top_fids + ⑤ POST .../share → task_id (创建分享) + ⑥ 轮询 GET .../task → share_id + ⑦ POST .../share/password → share_url, passcode + +参考 cloud-auto-save 的 quark 实现,域名从 drive-pc.quark.cn 改为 pc-api.uc.cn。 +""" + +from __future__ import annotations + +import logging +import time +from typing import Any, Dict, List, Optional, Tuple +from urllib.parse import urlparse, parse_qs + +from ..base import BaseCloudDriveAdapter, FileInfo, TransferResult, VerifyResult +from ...config import PlatformConfig, TransferConfig +from ...errors import TransferError, TransferErrorCode + +from .credential import UcCredentialManager +from .transfer import UcTransfer, SHARE_URL_PATTERN +from .cleanup import UcCleanup + +logger = logging.getLogger(__name__) + + +class UcAdapter(BaseCloudDriveAdapter): + """UC网盘适配器。 + + 组合 credential / transfer / cleanup 三个模块, + 实现 BaseCloudDriveAdapter 定义的所有抽象方法。 + + Attributes: + PLATFORM_NAME: 展示用平台名称。 + PLATFORM_KEY: 内部平台标识。 + URL_PATTERNS: UC 分享链接匹配正则列表。 + """ + + # ─── 平台标识 ────────────────────────────────────────────── + PLATFORM_NAME: str = "UC网盘" + PLATFORM_KEY: str = "uc" + + # ─── URL 匹配 ────────────────────────────────────────────── + # 支持 drive.uc.cn/s/<share_id> + URL_PATTERNS: List[str] = [ + r"drive\.uc\.cn/s/(\w+)", + ] + + def __init__(self, config: PlatformConfig, transfer_config: TransferConfig) -> None: + """初始化 UC 适配器。 + + Args: + config: 平台配置(含 Cookie 等)。 + transfer_config: 全局转存配置(超时、重试、轮询参数等)。 + """ + super().__init__(config, transfer_config) + + # 初始化三个子模块 + self._credential: UcCredentialManager = UcCredentialManager( + cookie=config.cookie + ) + self._transfer_engine: UcTransfer = UcTransfer( + credential=self._credential, + timeout=transfer_config.request_timeout, + poll_interval=transfer_config.task_poll_interval, + poll_max_attempts=transfer_config.task_poll_max_attempts, + ) + self._cleanup: UcCleanup = UcCleanup( + credential=self._credential, + timeout=transfer_config.request_timeout, + ) + + # ═══════════════════════════════════════════════════════════════ + # 公开接口实现 + # ═══════════════════════════════════════════════════════════════ + + def _setup_session(self) -> None: + """将 UC Cookie 注入 session 的默认 headers。""" + headers = self._credential.get_headers() + if headers: + self.session.headers.update(headers) + logger.debug("[UcAdapter] Session headers updated with Cookie") + + def transfer(self, share_url: str, save_dir: str = "", + share_password: str = "") -> TransferResult: + """执行转存的核心逻辑(覆盖基类实现 UC 专用流程)。 + + 通过 UcTransfer 引擎执行完整的 7 步流程。 + + Args: + share_url: UC 分享链接。 + save_dir: 目标目录,空则使用配置的默认目录。 + share_password: 新分享的密码。 + + Returns: + TransferResult 包含转存结果。 + """ + start: float = time.time() + + # 凭证检查 + if not self._credential.validate(): + raise TransferError( + TransferErrorCode.NOT_LOGIN, + message="UC Cookie 无效或长度不足", + platform=self.PLATFORM_KEY, + ) + + # 目标目录:默认根目录 "0" + target_dir: str = save_dir or self.config.save_dir or "0" + + # 分享密码 + pwd: str = share_password or self.config.share_password or "" + + try: + result: Dict[str, Any] = self._transfer_engine.transfer( + share_url=share_url, + save_dir=target_dir, + share_password=pwd, + ) + except ValueError as exc: + raise TransferError( + TransferErrorCode.URL_INVALID, + message=str(exc), + platform=self.PLATFORM_KEY, + ) from exc + except RuntimeError as exc: + msg: str = str(exc) + if "stoken" in msg or "status" in msg: + raise TransferError( + TransferErrorCode.SHARE_NOT_EXIST, + message=msg, + platform=self.PLATFORM_KEY, + ) from exc + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=msg, + platform=self.PLATFORM_KEY, + ) from exc + + elapsed: int = int((time.time() - start) * 1000) + + # 广告过滤 + new_fids: List[str] = result.get("new_file_ids", []) + if self.transfer_config.ad_filter_enabled and new_fids: + new_fids = self._filter_ads(new_fids) + if not new_fids: + raise TransferError( + TransferErrorCode.RESOURCE_EMPTY, + platform=self.PLATFORM_KEY, + ) + + return TransferResult( + success=True, + platform=self.PLATFORM_KEY, + new_file_id=",".join(new_fids), + file_name=result.get("file_name", ""), + share_url=result.get("share_url", ""), + share_password=result.get("passcode", pwd), + original_url=share_url, + elapsed_ms=elapsed, + ) + + def verify(self, share_url: str) -> VerifyResult: + """验证 UC 分享链接有效性。 + + Args: + share_url: UC 分享链接。 + + Returns: + VerifyResult 包含验证结果。 + """ + try: + pwd_id, passcode = self._parse_share_url(share_url) + + if not self._credential.validate(): + return VerifyResult( + valid=False, + platform=self.PLATFORM_KEY, + error=TransferError( + TransferErrorCode.NOT_LOGIN, + platform=self.PLATFORM_KEY, + ), + ) + + stoken: str = self._transfer_engine._get_stoken(pwd_id, passcode) + detail: Dict[str, Any] = self._transfer_engine._get_detail(pwd_id, stoken) + files: List[FileInfo] = self._extract_file_list(detail) + + return VerifyResult( + valid=True, + platform=self.PLATFORM_KEY, + title=detail.get("title", ""), + file_count=len(files), + files=files, + ) + + except TransferError: + raise + except (ValueError, RuntimeError) as exc: + return VerifyResult( + valid=False, + platform=self.PLATFORM_KEY, + error=TransferError( + TransferErrorCode.SHARE_NOT_EXIST, + message=str(exc), + platform=self.PLATFORM_KEY, + ), + ) + except Exception as exc: + return VerifyResult( + valid=False, + platform=self.PLATFORM_KEY, + error=TransferError( + TransferErrorCode.NETWORK_ERROR, + message=str(exc), + platform=self.PLATFORM_KEY, + ), + ) + + # ─── 核心抽象方法 ───────────────────────────────────────── + + def _get_share_detail(self, pwd_id: str, passcode: str = "") -> dict: + """获取 UC 分享详情。 + + Args: + pwd_id: 分享 ID。 + passcode: 提取码。 + + Returns: + 分享详情字典,包含 title, fid, share_fid_token 等字段。 + """ + stoken: str = self._transfer_engine._get_stoken(pwd_id, passcode) + return self._transfer_engine._get_detail(pwd_id, stoken) + + def _save_files(self, pwd_id: str, detail: dict, save_dir: str) -> List[str]: + """转存文件到自己的 UC 网盘。 + + Args: + pwd_id: 分享 ID。 + detail: 分享详情(来自 _get_share_detail)。 + save_dir: 目标目录 ID。 + + Returns: + 转存后的新文件 ID 列表。 + """ + stoken: str = self._transfer_engine._get_stoken(pwd_id) + task_id: str = self._transfer_engine._init_save( + pwd_id, stoken, detail, to_pdir_fid=save_dir + ) + return self._transfer_engine._poll_save_task(task_id) + + def _create_share( + self, file_ids: List[str], title: str, password: str = "" + ) -> Tuple[str, str]: + """创建 UC 分享链接。 + + Args: + file_ids: 要分享的文件 ID 列表。 + title: 分享标题。 + password: 分享密码。 + + Returns: + (share_url, share_password) 元组。 + """ + task_id: str = self._transfer_engine._init_share(file_ids, title) + share_id: str = self._transfer_engine._poll_share_task(task_id) + return self._transfer_engine._set_password(share_id, password) + + def _extract_file_list(self, detail: dict) -> List[FileInfo]: + """从 UC 分享详情中提取文件列表。 + + UC 的 sharepage/detail 返回格式与夸克一致: + { + "files": [ + {"fid": "...", "file_name": "...", "size": 123, "dir": false, ...}, + ] + } + + Args: + detail: 分享详情字典。 + + Returns: + FileInfo 对象列表。 + """ + files_data: List[Dict[str, Any]] = detail.get("files", []) + result: List[FileInfo] = [] + + for f in files_data: + file_info = FileInfo( + fid=str(f.get("fid", f.get("file_id", ""))), + name=str(f.get("file_name", f.get("name", ""))), + size=int(f.get("size", 0)), + is_dir=bool(f.get("dir", f.get("is_dir", False))), + ext=str(f.get("ext", f.get("file_extension", ""))), + ) + result.append(file_info) + + # 如果 files 为空,尝试用 detail 顶层字段构造单个文件信息 + if not result and detail.get("fid"): + result.append( + FileInfo( + fid=str(detail.get("fid", "")), + name=str(detail.get("title", detail.get("file_name", ""))), + size=0, + is_dir=False, + ) + ) + + return result + + def _filter_ads(self, file_ids: List[str]) -> List[str]: + """过滤广告文件。 + + Args: + file_ids: 文件 ID 列表。 + + Returns: + 过滤后的文件 ID 列表。 + """ + keywords: List[str] = list( + set(self.config.banned_keywords) + | set(self.transfer_config.default_banned_keywords) + ) + if not keywords: + return file_ids + + try: + files: List[FileInfo] = self.get_files() + file_names: List[str] = [f.name for f in files] + return UcCleanup.filter_ad_ids(file_ids, file_names, keywords) + except Exception: + logger.warning( + "[UcAdapter] Cannot fetch file list for ad filtering, skipping" + ) + return file_ids + + # ─── get_files / delete ──────────────────────────────────── + + def get_files(self, parent_fid: str = "0") -> List[FileInfo]: + """列出 UC 网盘指定目录下的文件。 + + GET /1/clouddrive/file/sort?pdir_fid=<parent_fid>&_page=1&_size=100&_sort=updated_at:desc + + Args: + parent_fid: 父目录 ID,默认 "0" 即根目录。 + + Returns: + FileInfo 列表。 + """ + url: str = f"https://pc-api.uc.cn/1/clouddrive/file/sort" + params: Dict[str, str] = { + "pdir_fid": parent_fid, + "_page": "1", + "_size": "100", + "_sort": "updated_at:desc", + } + headers: Dict[str, str] = self._credential.get_headers() + + try: + resp = self._get(url, params=params, headers=headers) + except Exception as exc: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=f"获取文件列表失败: {exc}", + platform=self.PLATFORM_KEY, + ) from exc + + data: Dict[str, Any] = resp.json() + status: int = data.get("status", -1) + if status != 0 and data.get("code") not in (0, None): + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=f"获取文件列表失败: {data.get('message')}", + platform=self.PLATFORM_KEY, + ) + + files_data: List[Dict[str, Any]] = data.get("data", {}).get("list", []) + result: List[FileInfo] = [] + for f in files_data: + result.append( + FileInfo( + fid=str(f.get("fid", "")), + name=str(f.get("file_name", f.get("name", ""))), + size=int(f.get("size", 0)), + is_dir=bool(f.get("dir", f.get("is_dir", False))), + ext=str(f.get("file_extension", f.get("ext", ""))), + ) + ) + + logger.debug("[UcAdapter] Listed %d files in dir=%s", len(result), parent_fid) + return result + + def delete(self, file_ids: List[str]) -> bool: + """删除 UC 网盘文件(移到回收站)。 + + Args: + file_ids: 要删除的文件 ID 列表。 + + Returns: + True 表示删除成功。 + """ + if not self._credential.validate(): + raise TransferError( + TransferErrorCode.NOT_LOGIN, + platform=self.PLATFORM_KEY, + ) + + try: + return self._cleanup.delete_files(file_ids) + except RuntimeError as exc: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=str(exc), + platform=self.PLATFORM_KEY, + ) from exc + + def delete_permanent(self, file_ids: List[str]) -> bool: + """彻底删除 UC 网盘文件(不可恢复)。 + + Args: + file_ids: 要彻底删除的文件 ID 列表。 + + Returns: + True 表示删除成功。 + """ + if not self._credential.validate(): + raise TransferError( + TransferErrorCode.NOT_LOGIN, + platform=self.PLATFORM_KEY, + ) + + try: + return self._cleanup.delete_files_permanent(file_ids) + except RuntimeError as exc: + raise TransferError( + TransferErrorCode.NETWORK_ERROR, + message=str(exc), + platform=self.PLATFORM_KEY, + ) from exc + + # ─── 工具方法 ───────────────────────────────────────────── + + def _parse_share_url(self, url: str) -> Tuple[str, str]: + """解析 UC 分享 URL 提取 (pwd_id, passcode)。 + + UC 链接格式:https://drive.uc.cn/s/<pwd_id> 或带 ?pwd=xxxx + + Args: + url: UC 分享链接。 + + Returns: + (pwd_id, passcode) 元组。 + + Raises: + TransferError: URL 格式无法识别。 + """ + pwd_id: Optional[str] = UcTransfer.parse_share_url(url) + if not pwd_id: + raise TransferError( + TransferErrorCode.URL_INVALID, + message=f"无法解析UC链接: {url}", + platform=self.PLATFORM_KEY, + ) + + parsed = urlparse(url) + params = parse_qs(parsed.query) + passcode: str = params.get("pwd", params.get("code", [""]))[0] + + return pwd_id, passcode + + def update_cookie(self, cookie: str) -> None: + """动态更新 Cookie 并同步到 session headers。 + + Args: + cookie: 新的 Cookie 字符串。 + """ + self._credential.update_cookie(cookie) + self._setup_session() + logger.info("[UcAdapter] Cookie updated, new length=%d", len(cookie)) + + def close(self) -> None: + """关闭所有子模块的 HTTP 会话。""" + self._transfer_engine.close() diff --git a/cloudsearch_transfer/adapter/uc/cleanup.py b/cloudsearch_transfer/adapter/uc/cleanup.py new file mode 100644 index 0000000..3511cb8 --- /dev/null +++ b/cloudsearch_transfer/adapter/uc/cleanup.py @@ -0,0 +1,218 @@ +""" +CloudSearch Transfer — UC网盘清理模块 v1.0.0 + +提供文件删除和广告过滤功能。API 与夸克相同,仅域名不同。 +""" + +from __future__ import annotations + +import logging +from typing import Any, Dict, List + +import requests + +from .credential import UcCredentialManager + +logger = logging.getLogger(__name__) + +# ─── UC API ───────────────────────────────────────────────────────── +UC_API_BASE = "https://pc-api.uc.cn" +UC_FILE_API = f"{UC_API_BASE}/1/clouddrive/file" + + +class UcCleanup: + """UC 网盘文件清理器。 + + 提供批量删除文件和广告文件过滤功能。 + + Attributes: + credential: UC 凭证管理器。 + session: 复用的 requests.Session。 + timeout: HTTP 请求超时秒数。 + """ + + def __init__( + self, + credential: UcCredentialManager, + timeout: int = 30, + ) -> None: + """初始化清理器。 + + Args: + credential: 有效的 UC 凭证管理器。 + timeout: HTTP 请求超时秒数。 + """ + self.credential: UcCredentialManager = credential + self.timeout: int = timeout + self.session: requests.Session = requests.Session() + + def delete_files(self, file_ids: List[str]) -> bool: + """批量删除文件(回收站方式)。 + + POST /1/clouddrive/file/delete + Body: { + "action_type": 2, + "filelist": ["<fid1>", "<fid2>", ...] + } + + action_type=1 表示彻底删除,action_type=2 表示移入回收站。 + + Args: + file_ids: 要删除的文件 ID 列表。 + + Returns: + True 表示删除请求已提交成功,False 表示失败。 + + Raises: + RuntimeError: HTTP 请求错误。 + """ + if not file_ids: + logger.warning("[UcCleanup] delete_files called with empty list") + return True + + url: str = f"{UC_FILE_API}/delete" + body: Dict[str, Any] = { + "action_type": 2, # 2=回收站, 1=彻底删除 + "filelist": file_ids, + } + headers = self.credential.get_headers() + headers.setdefault("Content-Type", "application/json") + + logger.info("[UcCleanup] Deleting %d files: %s", len(file_ids), file_ids) + + try: + resp = self.session.post( + url, json=body, headers=headers, timeout=self.timeout + ) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"删除文件失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + status: int = data.get("status", -1) + if status != 0 and data.get("code") not in (0, None): + logger.error( + "[UcCleanup] Delete returned error: status=%s, message=%s", + status, + data.get("message"), + ) + return False + + logger.info("[UcCleanup] Delete succeeded for %d files", len(file_ids)) + return True + + def delete_files_permanent(self, file_ids: List[str]) -> bool: + """彻底删除文件(不从回收站恢复)。 + + 与 delete_files 类似,但 action_type=1。 + + Args: + file_ids: 要彻底删除的文件 ID 列表。 + + Returns: + True 表示删除请求已提交成功。 + """ + if not file_ids: + return True + + url: str = f"{UC_FILE_API}/delete" + body: Dict[str, Any] = { + "action_type": 1, # 1=彻底删除 + "filelist": file_ids, + } + headers = self.credential.get_headers() + headers.setdefault("Content-Type", "application/json") + + logger.info("[UcCleanup] Permanently deleting %d files", len(file_ids)) + + try: + resp = self.session.post( + url, json=body, headers=headers, timeout=self.timeout + ) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"彻底删除失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + return data.get("status") == 0 or data.get("code") in (0, None) + + @staticmethod + def filter_ads( + files: List[Dict[str, Any]], + banned_keywords: List[str], + ) -> List[Dict[str, Any]]: + """按关键词过滤文件列表中的广告文件。 + + 遍历文件列表,剔除文件名中包含任一 banned_keywords 的文件。 + 匹配方式:不区分大小写的子串匹配。 + + Args: + files: 文件信息字典列表,每个字典需包含 "name" 字段。 + banned_keywords: 被禁关键词列表(匹配不区分大小写)。 + + Returns: + 过滤后的文件信息列表。 + """ + if not banned_keywords: + return files + + filtered: List[Dict[str, Any]] = [] + removed_count: int = 0 + + for f in files: + name: str = f.get("name", "") + name_lower: str = str(name).lower() + + if any(keyword.lower() in name_lower for keyword in banned_keywords): + logger.info("[UcCleanup] Filtered ad file: '%s'", name) + removed_count += 1 + continue + + filtered.append(f) + + if removed_count > 0: + logger.info( + "[UcCleanup] Ad filter removed %d/%d files", removed_count, len(files) + ) + return filtered + + @staticmethod + def filter_ad_ids( + file_ids: List[str], + file_names: List[str], + banned_keywords: List[str], + ) -> List[str]: + """按关键词过滤文件 ID 列表。 + + 根据 file_names 判断是否为广告,返回对应的 file_ids。 + + Args: + file_ids: 文件 ID 列表。 + file_names: 与 file_ids 一一对应的文件名列表。 + banned_keywords: 被禁关键词列表。 + + Returns: + 过滤后的 file_ids 列表。 + """ + if not banned_keywords or len(file_ids) != len(file_names): + return file_ids + + filtered_ids: List[str] = [] + for fid, name in zip(file_ids, file_names): + name_lower: str = str(name).lower() + if any(kw.lower() in name_lower for kw in banned_keywords): + logger.info("[UcCleanup] Filtered ad file: '%s' (id=%s)", name, fid) + continue + filtered_ids.append(fid) + + return filtered_ids + + def close(self) -> None: + """关闭 HTTP 会话。""" + self.session.close() + + def __enter__(self) -> "UcCleanup": + return self + + def __exit__(self, *args: Any) -> None: + self.close() diff --git a/cloudsearch_transfer/adapter/uc/credential.py b/cloudsearch_transfer/adapter/uc/credential.py new file mode 100644 index 0000000..0df5b23 --- /dev/null +++ b/cloudsearch_transfer/adapter/uc/credential.py @@ -0,0 +1,95 @@ +""" +CloudSearch Transfer — UC网盘凭证管理 v1.0.0 + +UC网盘使用 Cookie 直传(与夸克高度相似),无需 token 刷新机制。 +验证方式:检查 Cookie 字符串长度是否 >= 50。 +""" + +from __future__ import annotations + +import logging +from typing import Dict + +logger = logging.getLogger(__name__) + + +class UcCredentialManager: + """UC 网盘凭证管理器。 + + UC 网盘的转存 API 直接从 Cookie 中读取认证信息, + 与夸克网盘机制完全一致,只是 API 域名不同(pc-api.uc.cn)。 + + Attributes: + cookie: 存储的 UC Cookie 字符串。 + """ + + # UC Cookie 最小长度阈值(与夸克一致) + MIN_COOKIE_LENGTH: int = 50 + + # UC 网盘 Referer + REFERER: str = "https://drive.uc.cn/" + + def __init__(self, cookie: str = "") -> None: + """初始化凭证管理器。 + + Args: + cookie: UC 网盘的 Cookie 字符串。 + """ + self.cookie: str = cookie + + def validate(self) -> bool: + """验证 Cookie 是否满足最小长度要求。 + + Returns: + True 表示 Cookie 长度 >= MIN_COOKIE_LENGTH,否则为 False。 + """ + if not self.cookie: + logger.warning("[UcCredential] Cookie is empty") + return False + + valid = len(self.cookie) >= self.MIN_COOKIE_LENGTH + if not valid: + logger.warning( + "[UcCredential] Cookie too short: len=%d, min=%d", + len(self.cookie), + self.MIN_COOKIE_LENGTH, + ) + return valid + + def is_valid(self) -> bool: + """validate() 的别名,便于适配器层调用。""" + return self.validate() + + def get_headers(self) -> Dict[str, str]: + """构建带 Cookie 认证的 HTTP 请求头。 + + UC API 需要在每次请求头中携带完整的 Cookie 字符串, + 以及 Referer: https://drive.uc.cn/。 + + Returns: + 包含 Cookie 和 Referer 字段的请求头字典。 + Cookie 无效时仍返回空字典。 + """ + if not self.validate(): + logger.warning("[UcCredential] Cannot build headers: cookie invalid") + return {} + + return { + "Cookie": self.cookie, + "Referer": self.REFERER, + } + + def update_cookie(self, cookie: str) -> None: + """更新 Cookie 字符串(用于手动刷新场景)。 + + Args: + cookie: 新的 Cookie 字符串。 + """ + self.cookie = cookie + logger.info("[UcCredential] Cookie updated, new length=%d", len(cookie)) + + def __repr__(self) -> str: + return ( + f"UcCredentialManager(cookie_len={len(self.cookie) if self.cookie else 0}, " + f"valid={self.validate()})" + ) diff --git a/cloudsearch_transfer/adapter/uc/transfer.py b/cloudsearch_transfer/adapter/uc/transfer.py new file mode 100644 index 0000000..f0b5b78 --- /dev/null +++ b/cloudsearch_transfer/adapter/uc/transfer.py @@ -0,0 +1,619 @@ +""" +CloudSearch Transfer — UC网盘转存核心 v1.0.0 + +UC网盘 7 步转存流程(与夸克高度相似,API 域名不同): + + ① POST .../share/sharepage/v2/detail?pr=UCBrowser&fr=pc → stoken + ② GET .../share/sharepage/detail → fid, share_fid_token, title + ③ POST .../share/sharepage/save → task_id (转存) + ④ 轮询 GET .../task → save_as_top_fids (status==2 完成) + ⑤ POST .../share → task_id (创建分享) + ⑥ 轮询 GET .../task → share_id + ⑦ POST .../share/password → share_url, passcode + +参考 cloud-auto-save 的 quark 实现,域名从 drive-pc.quark.cn 改为 pc-api.uc.cn。 +""" + +from __future__ import annotations + +import logging +import re +import time +from typing import Any, Dict, List, Optional, Tuple + +import requests + +from .credential import UcCredentialManager + +logger = logging.getLogger(__name__) + +# ─── UC API 基础地址 ──────────────────────────────────────────────── +UC_API_BASE = "https://pc-api.uc.cn" +UC_SHARE_API = f"{UC_API_BASE}/1/clouddrive/share" + +# ─── URL 解析正则 ─────────────────────────────────────────────────── +# 匹配 drive.uc.cn/s/<share_id> +SHARE_URL_PATTERN = re.compile(r"drive\.uc\.cn/s/(\w+)") + + +class UcTransfer: + """UC 网盘转存引擎。 + + 封装完整的 7 步 API 流程:获取 stoken → 获取详情 → 保存文件 → + 创建分享 → 设置密码。 + + Attributes: + credential: UC 凭证管理器实例。 + session: 复用的 requests.Session。 + timeout: 请求超时(秒)。 + poll_interval: 轮询间隔(秒)。 + poll_max_attempts: 最大轮询次数。 + """ + + def __init__( + self, + credential: UcCredentialManager, + timeout: int = 30, + poll_interval: float = 0.5, + poll_max_attempts: int = 50, + ) -> None: + """初始化转存引擎。 + + Args: + credential: 有效的 UC 凭证管理器。 + timeout: HTTP 请求超时秒数。 + poll_interval: 异步任务轮询间隔秒数。 + poll_max_attempts: 异步任务最大轮询次数。 + """ + self.credential: UcCredentialManager = credential + self.timeout: int = timeout + self.poll_interval: float = poll_interval + self.poll_max_attempts: int = poll_max_attempts + self.session: requests.Session = requests.Session() + + # ─── 步骤 ①:获取 stoken ─────────────────────────────────────── + + def _get_stoken(self, pwd_id: str, passcode: str = "") -> str: + """步骤①:向 UC 交换 stoken。 + + POST /1/clouddrive/share/sharepage/v2/detail?pr=UCBrowser&fr=pc + Body: {"passcode": "", "pwd_id": "<share_id>"} + 响应: data.token_info.stoken + + UC 使用 v2/detail 接口获取 stoken,与夸克的 sharepage/token 不同。 + + Args: + pwd_id: 分享 ID(从 URL 解析)。 + passcode: 分享提取码,无密码时为空字符串。 + + Returns: + stoken 字符串。 + + Raises: + RuntimeError: API 返回错误或 stoken 缺失。 + """ + url = f"{UC_SHARE_API}/sharepage/v2/detail" + params: Dict[str, str] = { + "pr": "UCBrowser", + "fr": "pc", + } + body: Dict[str, str] = { + "passcode": passcode, + "pwd_id": pwd_id, + } + headers = self.credential.get_headers() + headers.setdefault("Content-Type", "application/json") + + logger.info("[UcTransfer] ① Getting stoken for pwd_id=%s", pwd_id) + + try: + resp = self.session.post( + url, json=body, params=params, headers=headers, timeout=self.timeout + ) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"获取 stoken 失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + # UC 的 stoken 在 data.token_info.stoken + stoken: Optional[str] = data.get("data", {}).get("token_info", {}).get("stoken") + if not stoken: + raise RuntimeError(f"stoken 缺失, response: {data}") + + logger.info("[UcTransfer] ① stoken obtained") + return stoken + + # ─── 步骤 ②:获取分享详情 ───────────────────────────────────── + + def _get_detail(self, pwd_id: str, stoken: str) -> Dict[str, Any]: + """步骤②:获取分享详情。 + + GET /1/clouddrive/share/sharepage/detail?pwd_id=xx&stoken=xx&_fetch_share=1 + + 返回字段包含:title, fid, share_fid_token 等。 + + Args: + pwd_id: 分享 ID。 + stoken: 步骤①获取的 stoken。 + + Returns: + 分享详情字典。 + + Raises: + RuntimeError: API 返回错误。 + """ + url = f"{UC_SHARE_API}/sharepage/detail" + params: Dict[str, str] = { + "pwd_id": pwd_id, + "stoken": stoken, + "_fetch_share": "1", + } + headers = self.credential.get_headers() + + logger.info("[UcTransfer] ② Fetching share detail for pwd_id=%s", pwd_id) + + try: + resp = self.session.get( + url, params=params, headers=headers, timeout=self.timeout + ) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"获取分享详情失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + status: int = data.get("status", -1) + if status != 0 and data.get("code") not in (0, None): + raise RuntimeError( + f"分享详情API返回错误: status={status}, message={data.get('message')}" + ) + + detail: Optional[Dict[str, Any]] = data.get("data") + if not detail: + raise RuntimeError(f"分享详情数据为空, response: {data}") + + logger.info( + "[UcTransfer] ② Detail: title=%s, fid=%s", + detail.get("title"), + detail.get("fid"), + ) + return detail + + # ─── 步骤 ③:发起转存 ───────────────────────────────────────── + + def _init_save( + self, + pwd_id: str, + stoken: str, + detail: Dict[str, Any], + to_pdir_fid: str = "0", + ) -> str: + """步骤③:发起转存请求。 + + POST /1/clouddrive/share/sharepage/save + Body: { + "fid_list": [<fid>, ...], + "fid_token_list": [<share_fid_token>, ...], + "to_pdir_fid": "0", + "pwd_id": "<pwd_id>", + "stoken": "<stoken>", + "pdir_fid": "0", + "scene": "link" + } + + Args: + pwd_id: 分享 ID。 + stoken: stoken。 + detail: 步骤②的分享详情。 + to_pdir_fid: 目标目录 ID,默认 "0" 即根目录。 + + Returns: + task_id 字符串,用于步骤④轮询。 + + Raises: + RuntimeError: API 返回错误。 + """ + url = f"{UC_SHARE_API}/sharepage/save" + fid_list: List[str] = detail.get("fid_list", [detail.get("fid", [])]) + fid_token_list: List[str] = detail.get( + "fid_token_list", [detail.get("share_fid_token", [])] + ) + + # 如果 detail 的 fid/fid_token 是单值而非列表,则包装为列表 + if not isinstance(fid_list, list): + fid_list = [fid_list] if fid_list else [] + if not isinstance(fid_token_list, list): + fid_token_list = [fid_token_list] if fid_token_list else [] + + body: Dict[str, Any] = { + "fid_list": fid_list, + "fid_token_list": fid_token_list, + "to_pdir_fid": to_pdir_fid, + "pwd_id": pwd_id, + "stoken": stoken, + "pdir_fid": "0", + "scene": "link", + } + headers = self.credential.get_headers() + headers.setdefault("Content-Type", "application/json") + + logger.info( + "[UcTransfer] ③ Initiating save: %d files to dir=%s", + len(fid_list), + to_pdir_fid, + ) + + try: + resp = self.session.post( + url, json=body, headers=headers, timeout=self.timeout + ) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"发起转存失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + status: int = data.get("status", -1) + if status != 0: + raise RuntimeError( + f"转存请求失败: status={status}, message={data.get('message')}" + ) + + task_id: Optional[str] = data.get("data", {}).get("task_id") + if not task_id: + raise RuntimeError(f"转存 task_id 缺失, response: {data}") + + logger.info("[UcTransfer] ③ Save task created: task_id=%s", task_id) + return task_id + + # ─── 步骤 ④:轮询转存任务 ───────────────────────────────────── + + def _poll_save_task(self, task_id: str) -> List[str]: + """步骤④:轮询转存任务直到完成。 + + GET /1/clouddrive/task?task_id=<task_id>&retry_index=0 + + 当 status==2 时表示任务成功完成,status==-1 表示失败。 + + Args: + task_id: 步骤③返回的 task_id。 + + Returns: + save_as_top_fids 列表(转存后的文件 ID)。 + + Raises: + RuntimeError: 任务失败或超时。 + """ + url = f"{UC_API_BASE}/1/clouddrive/task" + headers = self.credential.get_headers() + + for attempt in range(1, self.poll_max_attempts + 1): + params: Dict[str, str] = { + "task_id": task_id, + "retry_index": "0", + } + + try: + resp = self.session.get( + url, params=params, headers=headers, timeout=self.timeout + ) + resp.raise_for_status() + except requests.RequestException: + logger.warning( + "[UcTransfer] ④ Poll attempt %d/%d failed, retrying...", + attempt, + self.poll_max_attempts, + ) + time.sleep(self.poll_interval) + continue + + data: Dict[str, Any] = resp.json() + task_status: int = data.get("data", {}).get("status", -1) + + logger.debug( + "[UcTransfer] ④ Poll %d/%d: status=%d", + attempt, + self.poll_max_attempts, + task_status, + ) + + if task_status == 2: # 成功 + save_as_top_fids: List[str] = ( + data.get("data", {}) + .get("save_as", {}) + .get("save_as_top_fids", []) + ) + logger.info( + "[UcTransfer] ④ Save completed: %d files saved", + len(save_as_top_fids), + ) + return save_as_top_fids + + if task_status == -1: + raise RuntimeError( + f"转存任务失败: task_id={task_id}, response={data}" + ) + + time.sleep(self.poll_interval) + + raise RuntimeError( + f"转存任务超时: task_id={task_id}, 已轮询 {self.poll_max_attempts} 次" + ) + + # ─── 步骤 ⑤:发起创建分享 ───────────────────────────────────── + + def _init_share( + self, fid_list: List[str], title: str, expired_type: int = 1 + ) -> str: + """步骤⑤:创建分享链接。 + + POST /1/clouddrive/share + Body: {"fid_list": [<fid>, ...], "title": "<title>", "expired_type": 1} + + Args: + fid_list: 要分享的文件 ID 列表。 + title: 分享标题。 + expired_type: 过期类型,1=永久有效(默认)。 + + Returns: + task_id 字符串,用于步骤⑥轮询。 + + Raises: + RuntimeError: API 返回错误。 + """ + url = f"{UC_SHARE_API}" + body: Dict[str, Any] = { + "fid_list": fid_list, + "title": title or "分享", + "expired_type": expired_type, + } + headers = self.credential.get_headers() + headers.setdefault("Content-Type", "application/json") + + logger.info( + "[UcTransfer] ⑤ Creating share: %d files, title='%s'", len(fid_list), title + ) + + try: + resp = self.session.post( + url, json=body, headers=headers, timeout=self.timeout + ) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"创建分享失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + status: int = data.get("status", -1) + if status != 0 and data.get("code") not in (0, None): + raise RuntimeError( + f"创建分享请求失败: status={status}, message={data.get('message')}" + ) + + task_id: Optional[str] = data.get("data", {}).get("task_id") + if not task_id: + raise RuntimeError(f"分享 task_id 缺失, response: {data}") + + logger.info("[UcTransfer] ⑤ Share task created: task_id=%s", task_id) + return task_id + + # ─── 步骤 ⑥:轮询分享任务 ───────────────────────────────────── + + def _poll_share_task(self, task_id: str) -> str: + """步骤⑥:轮询分享任务直到完成。 + + GET /1/clouddrive/task?task_id=<task_id>&retry_index=0 + + status==2 完成,返回 share_id。 + + Args: + task_id: 步骤⑤返回的 task_id。 + + Returns: + share_id 字符串。 + + Raises: + RuntimeError: 任务失败或超时。 + """ + url = f"{UC_API_BASE}/1/clouddrive/task" + headers = self.credential.get_headers() + + for attempt in range(1, self.poll_max_attempts + 1): + params: Dict[str, str] = { + "task_id": task_id, + "retry_index": "0", + } + + try: + resp = self.session.get( + url, params=params, headers=headers, timeout=self.timeout + ) + resp.raise_for_status() + except requests.RequestException: + logger.warning( + "[UcTransfer] ⑥ Poll attempt %d/%d failed, retrying...", + attempt, + self.poll_max_attempts, + ) + time.sleep(self.poll_interval) + continue + + data: Dict[str, Any] = resp.json() + task_status: int = data.get("data", {}).get("status", -1) + + logger.debug( + "[UcTransfer] ⑥ Poll %d/%d: status=%d", + attempt, + self.poll_max_attempts, + task_status, + ) + + if task_status == 2: # 成功 + share_id: Optional[str] = data.get("data", {}).get("share_id") + if not share_id: + share_id = ( + data.get("data", {}).get("result", {}).get("share_id", "") + ) + if not share_id: + raise RuntimeError(f"分享完成但 share_id 缺失: {data}") + logger.info("[UcTransfer] ⑥ Share completed: share_id=%s", share_id) + return share_id + + if task_status == -1: + raise RuntimeError( + f"分享任务失败: task_id={task_id}, response={data}" + ) + + time.sleep(self.poll_interval) + + raise RuntimeError( + f"分享任务超时: task_id={task_id}, 已轮询 {self.poll_max_attempts} 次" + ) + + # ─── 步骤 ⑦:设置分享密码 ───────────────────────────────────── + + def _set_password(self, share_id: str, password: str = "") -> Tuple[str, str]: + """步骤⑦:设置分享密码并获取分享链接。 + + POST /1/clouddrive/share/password + Body: {"share_id": "<share_id>"} + + Args: + share_id: 步骤⑥返回的 share_id。 + password: 分享密码,空字符串表示无密码。 + + Returns: + (share_url, passcode) 元组。 + + Raises: + RuntimeError: API 返回错误。 + """ + url = f"{UC_SHARE_API}/password" + body: Dict[str, str] = { + "share_id": share_id, + } + headers = self.credential.get_headers() + headers.setdefault("Content-Type", "application/json") + + logger.info("[UcTransfer] ⑦ Setting password for share_id=%s", share_id) + + try: + resp = self.session.post( + url, json=body, headers=headers, timeout=self.timeout + ) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"设置分享密码失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + status: int = data.get("status", -1) + if status != 0 and data.get("code") not in (0, None): + raise RuntimeError( + f"设置密码失败: status={status}, message={data.get('message')}" + ) + + share_url: str = data.get("data", {}).get("share_url", "") + passcode: str = data.get("data", {}).get("passcode", password) + + if not share_url: + # 用 share_id 构造默认分享链接 + share_url = f"https://drive.uc.cn/s/{share_id}" + + logger.info( + "[UcTransfer] ⑦ Password set: share_url=%s, passcode=%s", + share_url, + passcode, + ) + return share_url, passcode + + # ─── 公开入口 ───────────────────────────────────────────────── + + def transfer( + self, + share_url: str, + save_dir: str = "0", + share_password: str = "", + ) -> Dict[str, Any]: + """执行完整的 7 步转存流程。 + + 从原始 UC 分享链接开始,将文件转存到自己网盘,再创建新分享。 + + Args: + share_url: 原始 UC 分享链接,如 https://drive.uc.cn/s/xxxxx。 + save_dir: 转存目标目录 ID,默认 "0"(根目录)。 + share_password: 新分享的密码,空字符串表示无密码。 + + Returns: + 包含以下字段的字典: + - success: bool + - new_file_ids: List[str] — 转存后的文件ID列表 + - file_name: str — 分享标题 + - share_url: str — 新分享链接 + - passcode: str — 新分享密码 + + Raises: + RuntimeError: 任一步骤失败。 + ValueError: URL 解析失败。 + """ + # 0. 解析 URL 提取 pwd_id + match = SHARE_URL_PATTERN.search(share_url) + if not match: + raise ValueError(f"无法从URL中提取UC分享ID: {share_url}") + pwd_id: str = match.group(1) + + logger.info("[UcTransfer] Starting 7-step transfer for pwd_id=%s", pwd_id) + + # ① 获取 stoken + stoken: str = self._get_stoken(pwd_id) + + # ② 获取分享详情 + detail: Dict[str, Any] = self._get_detail(pwd_id, stoken) + + # ③ 发起转存 → ④ 轮询 + task_id: str = self._init_save(pwd_id, stoken, detail, to_pdir_fid=save_dir) + new_file_ids: List[str] = self._poll_save_task(task_id) + + if not new_file_ids: + raise RuntimeError("转存完成但未获取到文件ID") + + # ⑤ 创建分享 → ⑥ 轮询 + title: str = detail.get("title", "分享") + share_task_id: str = self._init_share(new_file_ids, title) + share_id: str = self._poll_share_task(share_task_id) + + # ⑦ 设置密码 + share_url_new, passcode = self._set_password(share_id, share_password) + + logger.info( + "[UcTransfer] Transfer complete: %d files, new_share=%s", + len(new_file_ids), + share_url_new, + ) + + return { + "success": True, + "new_file_ids": new_file_ids, + "file_name": title, + "share_url": share_url_new, + "passcode": passcode, + } + + @staticmethod + def parse_share_url(url: str) -> Optional[str]: + """从 UC 分享 URL 中提取 pwd_id。 + + Args: + url: UC 分享链接。 + + Returns: + pwd_id 字符串,解析失败返回 None。 + """ + match = SHARE_URL_PATTERN.search(url) + return match.group(1) if match else None + + def close(self) -> None: + """关闭 HTTP 会话。""" + self.session.close() + + def __enter__(self) -> "UcTransfer": + return self + + def __exit__(self, *args: Any) -> None: + self.close() diff --git a/cloudsearch_transfer/adapter/xunlei/__init__.py b/cloudsearch_transfer/adapter/xunlei/__init__.py new file mode 100644 index 0000000..13307e3 --- /dev/null +++ b/cloudsearch_transfer/adapter/xunlei/__init__.py @@ -0,0 +1,112 @@ +""" +CloudSearch Transfer — 迅雷网盘适配器 v1.0.0 + +PLATFORM_KEY = 'xunlei' +迅雷网盘使用 refresh_token + captcha_token 双重认证。 +""" + +from __future__ import annotations + +import logging +from typing import List, Optional, Tuple + +from ..base import ( + BaseCloudDriveAdapter, + FileInfo, + TransferResult, + VerifyResult, +) +from ...config import PlatformConfig, TransferConfig +from ...errors import TransferError, TransferErrorCode +from .credential import XunleiCredentialManager +from .transfer import XunleiTransfer +from .cleanup import XunleiCleanup + +logger = logging.getLogger(__name__) + + +class XunleiAdapter(BaseCloudDriveAdapter): + """迅雷网盘适配器""" + + PLATFORM_NAME = "迅雷网盘" + PLATFORM_KEY = "xunlei" + URL_PATTERNS = [r"pan\.xunlei\.com/s/([A-Za-z0-9]+)"] + + def __init__(self, config: PlatformConfig, transfer_config: TransferConfig): + super().__init__(config, transfer_config) + self._credential = XunleiCredentialManager(config) + self._transfer_engine: Optional[XunleiTransfer] = None + self._cleanup = XunleiCleanup() + + def _setup_session(self): + """初始化 session 认证头""" + headers = self._credential.get_auth_headers() + if headers: + self.session.headers.update(headers) + + def _ensure_auth(self): + """确保认证头是最新的""" + headers = self._credential.get_auth_headers() + self.session.headers.update(headers) + + @property + def _transfer(self) -> XunleiTransfer: + """懒加载转存引擎""" + if self._transfer_engine is None: + self._transfer_engine = XunleiTransfer( + self.session, + self._credential, + self.config, + self.transfer_config, + ) + return self._transfer_engine + + # ─── 抽象方法实现 ────────────────────────────── + + def _get_share_detail(self, pwd_id: str, passcode: str = "") -> dict: + self._ensure_auth() + return self._transfer.get_share_info(pwd_id, passcode) + + def _save_files(self, pwd_id: str, detail: dict, save_dir: str) -> List[str]: + self._ensure_auth() + return self._transfer.save_files(pwd_id, detail, save_dir) + + def _create_share(self, file_ids: List[str], title: str, + password: str = "") -> Tuple[str, str]: + self._ensure_auth() + return self._transfer.create_share(file_ids, title, password) + + def _extract_file_list(self, detail: dict) -> List[FileInfo]: + files = detail.get("files", []) + return [ + FileInfo(fid=f.get("id", ""), name=f.get("name", ""), + size=f.get("size", 0), is_dir=f.get("is_dir", False)) + for f in files + ] + + def _filter_ads(self, file_ids: List[str]) -> List[str]: + banned = self._get_banned_keywords() + return self._cleanup.filter_ad_ids( + file_ids, + getattr(self._transfer, "_last_file_names", []), + banned, + ) + + def get_files(self, parent_fid: str = "0") -> List[FileInfo]: + self._ensure_auth() + return self._transfer.list_files(parent_fid) + + def delete(self, file_ids: List[str]) -> bool: + self._ensure_auth() + return self._cleanup.delete_files( + self.session, self._credential, file_ids + ) + + def _get_banned_keywords(self) -> List[str]: + return self.config.banned_keywords or self.transfer_config.default_banned_keywords + + def close(self): + self.session.close() + + def __repr__(self): + return f"<XunleiAdapter account={self.config.account_name}>" diff --git a/cloudsearch_transfer/adapter/xunlei/cleanup.py b/cloudsearch_transfer/adapter/xunlei/cleanup.py new file mode 100644 index 0000000..aa0be00 --- /dev/null +++ b/cloudsearch_transfer/adapter/xunlei/cleanup.py @@ -0,0 +1,198 @@ +""" +CloudSearch Transfer — 迅雷网盘清理模块 v1.0.0 + +提供文件删除和广告过滤功能。 +""" + +from __future__ import annotations + +import logging +from typing import Any, Dict, List + +import requests + +from .credential import XunleiCredentialManager + +logger = logging.getLogger(__name__) + +# ─── 迅雷 API ───────────────────────────────────────────────────────── +XUNLEI_PAN_API = "https://api-pan.xunlei.com" + + +class XunleiCleanup: + """迅雷网盘文件清理器。 + + 提供批量删除文件和广告文件过滤功能。 + + Attributes: + credential: 迅雷凭证管理器。 + session: 复用的 requests.Session。 + timeout: HTTP 请求超时秒数。 + """ + + def __init__( + self, + credential: XunleiCredentialManager, + timeout: int = 30, + ) -> None: + """初始化清理器。 + + Args: + credential: 有效的迅雷凭证管理器。 + timeout: HTTP 请求超时秒数。 + """ + self.credential: XunleiCredentialManager = credential + self.timeout: int = timeout + self.session: requests.Session = requests.Session() + + def delete_files(self, file_ids: List[str]) -> bool: + """批量删除文件。 + + POST /drive/v1/files:batchDelete + Body: { + "ids": ["<fid1>", "<fid2>", ...], + "space": "" + } + + Args: + file_ids: 要删除的文件 ID 列表。 + + Returns: + True 表示删除请求已提交成功,False 表示失败。 + + Raises: + RuntimeError: HTTP 请求错误。 + """ + if not file_ids: + logger.warning("[XunleiCleanup] delete_files called with empty list") + return True + + url: str = f"{XUNLEI_PAN_API}/drive/v1/files:batchDelete" + body: Dict[str, Any] = { + "ids": file_ids, + "space": "", + } + headers = self.credential.get_headers() + headers.setdefault("Content-Type", "application/json") + + logger.info("[XunleiCleanup] Deleting %d files: %s", len(file_ids), file_ids) + + try: + resp = self.session.post( + url, json=body, headers=headers, timeout=self.timeout + ) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"删除文件失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + errcode = data.get("errcode", data.get("error_code", 0)) + if errcode != 0: + logger.error( + "[XunleiCleanup] Delete returned error: errcode=%s, message=%s", + errcode, + data.get("message", data.get("error", "")), + ) + return False + + logger.info("[XunleiCleanup] Delete succeeded for %d files", len(file_ids)) + return True + + def delete_files_permanent(self, file_ids: List[str]) -> bool: + """彻底删除文件。 + + 迅雷的 batchDelete 默认为彻底删除(与回收站不同), + 此方法与 delete_files 行为一致。 + + Args: + file_ids: 要彻底删除的文件 ID 列表。 + + Returns: + True 表示删除请求已提交成功。 + """ + return self.delete_files(file_ids) + + @staticmethod + def filter_ads( + files: List[Dict[str, Any]], + banned_keywords: List[str], + ) -> List[Dict[str, Any]]: + """按关键词过滤文件列表中的广告文件。 + + 遍历文件列表,剔除文件名中包含任一 banned_keywords 的文件。 + 匹配方式:不区分大小写的子串匹配。 + + Args: + files: 文件信息字典列表,每个字典需包含 "name" 或 "file_name" 字段。 + banned_keywords: 被禁关键词列表(匹配不区分大小写)。 + + Returns: + 过滤后的文件信息列表。 + """ + if not banned_keywords: + return files + + filtered: List[Dict[str, Any]] = [] + removed_count: int = 0 + + for f in files: + name: str = f.get("name", f.get("file_name", "")) + name_lower: str = str(name).lower() + + if any(keyword.lower() in name_lower for keyword in banned_keywords): + logger.info("[XunleiCleanup] Filtered ad file: '%s'", name) + removed_count += 1 + continue + + filtered.append(f) + + if removed_count > 0: + logger.info( + "[XunleiCleanup] Ad filter removed %d/%d files", + removed_count, + len(files), + ) + return filtered + + @staticmethod + def filter_ad_ids( + file_ids: List[str], + file_names: List[str], + banned_keywords: List[str], + ) -> List[str]: + """按关键词过滤文件 ID 列表。 + + 根据 file_names 判断是否为广告,返回对应的 file_ids。 + + Args: + file_ids: 文件 ID 列表。 + file_names: 与 file_ids 一一对应的文件名列表。 + banned_keywords: 被禁关键词列表。 + + Returns: + 过滤后的 file_ids 列表。 + """ + if not banned_keywords or len(file_ids) != len(file_names): + return file_ids + + filtered_ids: List[str] = [] + for fid, name in zip(file_ids, file_names): + name_lower: str = str(name).lower() + if any(kw.lower() in name_lower for kw in banned_keywords): + logger.info( + "[XunleiCleanup] Filtered ad file: '%s' (id=%s)", name, fid + ) + continue + filtered_ids.append(fid) + + return filtered_ids + + def close(self) -> None: + """关闭 HTTP 会话。""" + self.session.close() + + def __enter__(self) -> "XunleiCleanup": + return self + + def __exit__(self, *args: Any) -> None: + self.close() diff --git a/cloudsearch_transfer/adapter/xunlei/credential.py b/cloudsearch_transfer/adapter/xunlei/credential.py new file mode 100644 index 0000000..32864c7 --- /dev/null +++ b/cloudsearch_transfer/adapter/xunlei/credential.py @@ -0,0 +1,339 @@ +""" +CloudSearch Transfer — 迅雷网盘凭证管理器 v1.0.0 + +迅雷网盘使用 refresh_token + captcha_token 双重认证机制: + +1. refresh_token → access_token (OAuth) + POST https://xluser-ssl.xunlei.com/v1/auth/token + Body: {"grant_type": "refresh_token", "refresh_token": "...", "client_id": "..."} + +2. captcha_token 获取(某些操作需要) + POST /v1/shield/captcha/init + Body: {"client_id": "...", "action": "...", "device_id": "...", "meta": {"captcha_sign": "..."}} + +3. get_headers() 返回所有需要的认证头: + Authorization: Bearer <access_token> + x-captcha-token: <captcha_token> + x-client-id: <client_id> + x-device-id: <device_id> +""" + +from __future__ import annotations + +import logging +import time +import threading +from typing import Dict, Optional + +import requests + +logger = logging.getLogger(__name__) + +# ─── 常量 ─────────────────────────────────────────────────────────── +# 迅雷网盘 OAuth 认证端点 +XUNLEI_AUTH_API = "https://xluser-ssl.xunlei.com" + +# 迅雷网盘客户端标识(固定值) +CLIENT_ID = "Xqp0kJBXWhwaTpB6" +DEVICE_ID = "925b7631473a13716b791d7f28289cad" + +# ─── 默认请求头 ───────────────────────────────────────────────────── +DEFAULT_HEADERS: Dict[str, str] = { + "User-Agent": ( + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " + "AppleWebKit/537.36 (KHTML, like Gecko) " + "Chrome/135.0.0.0 Safari/537.36" + ), + "Accept": "application/json, text/plain, */*", + "Content-Type": "application/json", +} + + +class XunleiCredentialManager: + """迅雷网盘凭证管理器。 + + 职责: + - 使用 refresh_token 换取 access_token + - 获取 captcha_token(特定 action 需要) + - 构建包含所有认证头的请求头字典 + - 访问令牌过期前自动刷新(提前 60s) + + 用法: + mgr = XunleiCredentialManager(refresh_token="xxx") + mgr.refresh_access_token() # 刷新 access_token + captcha = mgr.get_captcha_token("restore") # 获取验证码令牌 + headers = mgr.get_headers() # 获取完整的认证请求头 + is_ok = mgr.validate() # 验证凭证有效性 + + Attributes: + CLIENT_ID: 迅雷客户端 ID。 + DEVICE_ID: 设备标识。 + """ + + # ─── 类常量 ──────────────────────────────────────────────── + CLIENT_ID: str = CLIENT_ID + DEVICE_ID: str = DEVICE_ID + + def __init__(self, refresh_token: str = "") -> None: + """初始化迅雷凭证管理器。 + + Args: + refresh_token: 迅雷网盘的 refresh_token。 + """ + self._refresh_token: str = refresh_token.strip() + self._access_token: str = "" + self._expires_at: float = 0.0 + self._captcha_tokens: Dict[str, str] = {} # action → captcha_token + self._lock: threading.Lock = threading.Lock() + self._session: requests.Session = requests.Session() + self._session.headers.update(DEFAULT_HEADERS) + + # ─── 公开 API ────────────────────────────────────────────── + + def validate(self) -> bool: + """验证 refresh_token 是否有效。 + + 要求 refresh_token 长度 >= 20,且能成功换取 access_token。 + + Returns: + True 表示凭证有效。 + """ + if not self._refresh_token or len(self._refresh_token) < 20: + logger.warning( + "[XunleiCredential] refresh_token 长度不足 20,验证失败" + ) + return False + return self.refresh_access_token() + + def is_valid(self) -> bool: + """validate() 的别名。""" + return self.validate() + + def refresh_access_token(self) -> bool: + """使用 refresh_token 换取 access_token。 + + POST /v1/auth/token + Body: {"grant_type": "refresh_token", "refresh_token": "...", "client_id": "..."} + + 返回 True 表示成功,False 表示失败。 + """ + with self._lock: + return self._do_refresh() + + def get_captcha_token(self, action: str) -> str: + """获取指定 action 的 captcha_token。 + + POST /v1/shield/captcha/init + Body: { + "client_id": "...", + "action": "...", + "device_id": "...", + "meta": {"captcha_sign": "..."} + } + + captcha_token 会按 action 缓存,避免重复获取。 + + Args: + action: 操作类型,如 "restore"、"share" 等。 + + Returns: + captcha_token 字符串,获取失败返回空字符串。 + """ + with self._lock: + # 检查缓存 + if action in self._captcha_tokens: + return self._captcha_tokens[action] + return self._do_get_captcha(action) + + def get_headers(self) -> Dict[str, str]: + """构建包含所有认证头的请求头字典。 + + 返回: + - Authorization: Bearer <access_token> + - x-captcha-token: <captcha_token> (如有) + - x-client-id: <client_id> + - x-device-id: <device_id> + + Returns: + 认证请求头字典。 + """ + self._ensure_token_valid() + + headers: Dict[str, str] = { + "x-client-id": self.CLIENT_ID, + "x-device-id": self.DEVICE_ID, + } + + if self._access_token: + headers["Authorization"] = f"Bearer {self._access_token}" + + return headers + + def get_headers_with_captcha(self, action: str = "") -> Dict[str, str]: + """获取带 captcha_token 的完整认证头。 + + Args: + action: captcha 操作类型,空字符串表示不需要 captcha。 + + Returns: + 包含 Authorization + x-captcha-token 的请求头字典。 + """ + headers = self.get_headers() + + if action: + captcha = self.get_captcha_token(action) + if captcha: + headers["x-captcha-token"] = captcha + + return headers + + def get_access_token(self) -> str: + """获取当前有效的 access_token(必要时自动刷新)。""" + self._ensure_token_valid() + return self._access_token + + @property + def refresh_token(self) -> str: + """返回当前 refresh_token。""" + return self._refresh_token + + @refresh_token.setter + def refresh_token(self, value: str) -> None: + """更新 refresh_token。""" + self._refresh_token = value.strip() + with self._lock: + self._access_token = "" + self._expires_at = 0.0 + self._captcha_tokens.clear() + + # ─── 内部方法 ────────────────────────────────────────────── + + def _ensure_token_valid(self) -> None: + """确保 access_token 有效(过期则自动刷新)。""" + if not self._access_token or time.time() >= (self._expires_at - 60): + self.refresh_access_token() + + def _do_refresh(self) -> bool: + """实际执行 token 刷新。 + + POST https://xluser-ssl.xunlei.com/v1/auth/token + """ + if not self._refresh_token: + logger.error("[XunleiCredential] 没有 refresh_token,无法刷新") + return False + + url = f"{XUNLEI_AUTH_API}/v1/auth/token" + body: Dict[str, str] = { + "grant_type": "refresh_token", + "refresh_token": self._refresh_token, + "client_id": self.CLIENT_ID, + } + + try: + resp = self._session.post(url, json=body, timeout=30) + data = resp.json() + + if resp.status_code != 200: + logger.error( + "[XunleiCredential] 刷新 token 失败: HTTP %d, %s", + resp.status_code, + data, + ) + return False + + access_token = data.get("access_token", "") + if not access_token: + logger.error( + "[XunleiCredential] 响应中缺少 access_token: %s", data + ) + return False + + expires_in = int(data.get("expires_in", 7200)) + new_refresh = data.get("refresh_token", self._refresh_token) + + self._access_token = access_token + self._expires_at = time.time() + expires_in + + # 更新 refresh_token(服务端可能下发新的) + if new_refresh != self._refresh_token: + logger.info( + "[XunleiCredential] refresh_token 已轮换: " + f"{self._refresh_token[:8]}... → {new_refresh[:8]}..." + ) + self._refresh_token = new_refresh + + # 清除 captcha 缓存(token 变了,captcha 可能也失效了) + self._captcha_tokens.clear() + + logger.info( + "[XunleiCredential] Token 刷新成功 (expires_in=%ds)", expires_in + ) + return True + + except requests.RequestException as e: + logger.error(f"[XunleiCredential] 刷新 token 网络异常: {e}") + return False + except Exception as e: + logger.exception(f"[XunleiCredential] 刷新 token 未知异常: {e}") + return False + + def _do_get_captcha(self, action: str) -> str: + """获取 captcha_token。 + + POST /v1/shield/captcha/init + """ + url = f"{XUNLEI_AUTH_API}/v1/shield/captcha/init" + body: Dict[str, Any] = { + "client_id": self.CLIENT_ID, + "action": action, + "device_id": self.DEVICE_ID, + "meta": { + "captcha_sign": "", + }, + } + + # 需要 Authorization 头 + if not self._access_token: + if not self._do_refresh(): + logger.error("[XunleiCredential] 无法获取 access_token,跳过 captcha") + return "" + + headers: Dict[str, str] = { + "Authorization": f"Bearer {self._access_token}", + "Content-Type": "application/json", + } + + try: + resp = self._session.post(url, json=body, headers=headers, timeout=15) + data = resp.json() + + captcha_token = data.get("captcha_token", "") + if captcha_token: + self._captcha_tokens[action] = captcha_token + logger.info( + "[XunleiCredential] captcha_token 获取成功 for action=%s", + action, + ) + else: + logger.warning( + "[XunleiCredential] captcha_token 为空 for action=%s: %s", + action, + data, + ) + + return captcha_token + + except requests.RequestException as e: + logger.error(f"[XunleiCredential] 获取 captcha_token 网络异常: {e}") + return "" + except Exception as e: + logger.exception(f"[XunleiCredential] 获取 captcha_token 异常: {e}") + return "" + + def __repr__(self) -> str: + return ( + f"XunleiCredentialManager(" + f"refresh_token={'***' if self._refresh_token else 'None'}, " + f"has_access_token={bool(self._access_token)}, " + f"captcha_actions={list(self._captcha_tokens.keys())})" + ) diff --git a/cloudsearch_transfer/adapter/xunlei/transfer.py b/cloudsearch_transfer/adapter/xunlei/transfer.py new file mode 100644 index 0000000..2b763e8 --- /dev/null +++ b/cloudsearch_transfer/adapter/xunlei/transfer.py @@ -0,0 +1,518 @@ +""" +CloudSearch Transfer — 迅雷网盘转存核心 v1.0.0 + +迅雷网盘 4 步转存流程: + + ① GET .../drive/v1/share?share_id=xx → pass_code_token, files[], title + ② POST .../share/restore → restore_task_id (转存) + ③ 轮询 GET .../tasks/{task_id} → progress==100, trace_file_ids → oldId→newId映射 + ④ POST .../share → share_url + pass_code + +迅雷网盘需要 refresh_token + captcha_token 双重认证。 +""" + +from __future__ import annotations + +import json +import logging +import re +import time +from typing import Any, Dict, List, Optional, Tuple + +import requests + +from .credential import XunleiCredentialManager + +logger = logging.getLogger(__name__) + +# ─── 迅雷 API 基础地址 ────────────────────────────────────────────── +XUNLEI_PAN_API = "https://api-pan.xunlei.com" + +# ─── URL 解析正则 ─────────────────────────────────────────────────── +# 匹配 pan.xunlei.com/s/<share_id> +SHARE_URL_PATTERN = re.compile(r"pan\.xunlei\.com/s/([A-Za-z0-9]+)") + + +class XunleiTransfer: + """迅雷网盘转存引擎。 + + 封装完整的 4 步 API 流程:获取分享详情 → 转存文件 → + 轮询转存任务 → 创建新分享。 + + Attributes: + credential: 迅雷凭证管理器实例。 + session: 复用的 requests.Session。 + timeout: 请求超时(秒)。 + poll_interval: 轮询间隔(秒)。 + poll_max_attempts: 最大轮询次数。 + """ + + def __init__( + self, + credential: XunleiCredentialManager, + timeout: int = 30, + poll_interval: float = 1.0, + poll_max_attempts: int = 60, + ) -> None: + """初始化转存引擎。 + + Args: + credential: 有效的迅雷凭证管理器。 + timeout: HTTP 请求超时秒数。 + poll_interval: 异步任务轮询间隔秒数。 + poll_max_attempts: 异步任务最大轮询次数。 + """ + self.credential: XunleiCredentialManager = credential + self.timeout: int = timeout + self.poll_interval: float = poll_interval + self.poll_max_attempts: int = poll_max_attempts + self.session: requests.Session = requests.Session() + + # ─── 步骤 ①:获取分享详情 ───────────────────────────────────── + + def _get_share_info(self, share_id: str) -> Dict[str, Any]: + """步骤①:获取分享详情。 + + GET /drive/v1/share?share_id=<share_id> + + 返回字段包含:pass_code_token, files[], title 等。 + + Args: + share_id: 分享 ID(从 URL 解析)。 + + Returns: + 分享信息字典,包含 files, title, pass_code_token。 + + Raises: + RuntimeError: API 返回错误。 + """ + url = f"{XUNLEI_PAN_API}/drive/v1/share" + params: Dict[str, str] = {"share_id": share_id} + headers = self.credential.get_headers() + + logger.info("[XunleiTransfer] ① Fetching share info for share_id=%s", share_id) + + try: + resp = self.session.get( + url, params=params, headers=headers, timeout=self.timeout + ) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"获取分享详情失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + + # 检查业务错误 + errcode = data.get("errcode", data.get("error_code", 0)) + if errcode != 0: + raise RuntimeError( + f"分享详情API返回错误: errcode={errcode}, message={data.get('message', data.get('error', ''))}" + ) + + # 提取关键字段 + pass_code_token: str = data.get("pass_code_token", "") + files: List[Dict[str, Any]] = data.get("files", []) + title: str = data.get("title", data.get("share_name", "")) + + if not files: + raise RuntimeError("分享内容为空") + + logger.info( + "[XunleiTransfer] ① Share info: title=%s, files=%d, has_pass_code_token=%s", + title, + len(files), + bool(pass_code_token), + ) + + return { + "pass_code_token": pass_code_token, + "files": files, + "title": title, + "share_id": share_id, + } + + # ─── 步骤 ②:转存文件 ───────────────────────────────────────── + + def _restore_files( + self, + share_id: str, + pass_code_token: str, + file_ids: List[str], + parent_id: str = "", + ) -> str: + """步骤②:转存文件到自己的迅雷网盘。 + + POST /drive/v1/share/restore + Body: { + "file_ids": ["<fid1>", ...], + "pass_code_token": "<token>", + "share_id": "<share_id>", + "parent_id": "", + "specify_parent_id": true + } + + Args: + share_id: 分享 ID。 + pass_code_token: 步骤①获取的 pass_code_token。 + file_ids: 要转存的文件 ID 列表。 + parent_id: 目标父目录 ID,空字符串表示根目录。 + + Returns: + restore_task_id 字符串,用于步骤③轮询。 + + Raises: + RuntimeError: API 返回错误。 + """ + url = f"{XUNLEI_PAN_API}/drive/v1/share/restore" + + body: Dict[str, Any] = { + "file_ids": file_ids, + "pass_code_token": pass_code_token, + "share_id": share_id, + "parent_id": parent_id or "", + "specify_parent_id": True, + } + # restore 操作可能需要 captcha_token + headers = self.credential.get_headers_with_captcha(action="restore") + headers.setdefault("Content-Type", "application/json") + + logger.info( + "[XunleiTransfer] ② Restoring %d files from share_id=%s", + len(file_ids), + share_id, + ) + + try: + resp = self.session.post( + url, json=body, headers=headers, timeout=self.timeout + ) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"转存请求失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + errcode = data.get("errcode", data.get("error_code", 0)) + if errcode != 0: + raise RuntimeError( + f"转存请求失败: errcode={errcode}, message={data.get('message', data.get('error', ''))}" + ) + + task_id: Optional[str] = data.get("restore_task_id", data.get("task_id")) + if not task_id: + raise RuntimeError(f"转存 task_id 缺失, response: {data}") + + logger.info("[XunleiTransfer] ② Restore task created: task_id=%s", task_id) + return task_id + + # ─── 步骤 ③:轮询转存任务 ───────────────────────────────────── + + def _poll_restore_task(self, task_id: str) -> Dict[str, str]: + """步骤③:轮询转存任务直到完成。 + + GET /drive/v1/tasks/{task_id} + + 当 progress==100 时表示完成,返回 oldId→newId 映射。 + 从 params.trace_file_ids 解析 JSON 字符串获取映射关系。 + + Args: + task_id: 步骤②返回的 restore_task_id。 + + Returns: + {"oldId": "newId", ...} 文件 ID 映射字典。 + + Raises: + RuntimeError: 任务失败或超时。 + """ + url = f"{XUNLEI_PAN_API}/drive/v1/tasks/{task_id}" + headers = self.credential.get_headers() + + for attempt in range(1, self.poll_max_attempts + 1): + try: + resp = self.session.get(url, headers=headers, timeout=self.timeout) + resp.raise_for_status() + except requests.RequestException: + logger.warning( + "[XunleiTransfer] ③ Poll attempt %d/%d failed, retrying...", + attempt, + self.poll_max_attempts, + ) + time.sleep(self.poll_interval) + continue + + data: Dict[str, Any] = resp.json() + progress: int = data.get("progress", 0) + status: str = data.get("status", "") + + logger.debug( + "[XunleiTransfer] ③ Poll %d/%d: progress=%d, status=%s", + attempt, + self.poll_max_attempts, + progress, + status, + ) + + if status == "failed" or status == "error": + raise RuntimeError( + f"转存任务失败: task_id={task_id}, status={status}" + ) + + if progress == 100: + # 从 params.trace_file_ids 解析 oldId→newId 映射 + params: Dict[str, Any] = data.get("params", {}) + trace_file_ids: str = params.get("trace_file_ids", "") + + if trace_file_ids: + try: + id_mapping: Dict[str, str] = json.loads(trace_file_ids) + logger.info( + "[XunleiTransfer] ③ Restore completed: %d files mapped", + len(id_mapping), + ) + return id_mapping + except json.JSONDecodeError: + logger.warning( + "[XunleiTransfer] ③ Failed to parse trace_file_ids: %s", + trace_file_ids, + ) + + # fallback: 检查 result 字段 + result = data.get("result", {}) + if result: + logger.info("[XunleiTransfer] ③ Restore completed via result field") + return result + + # 最后的 fallback: 返回空映射 + logger.warning( + "[XunleiTransfer] ③ Restore completed but no file mapping found" + ) + return {} + + if progress < 0: + raise RuntimeError( + f"转存任务异常: task_id={task_id}, progress={progress}" + ) + + time.sleep(self.poll_interval) + + raise RuntimeError( + f"转存任务超时: task_id={task_id}, 已轮询 {self.poll_max_attempts} 次" + ) + + # ─── 步骤 ④:创建新分享 ───────────────────────────────────── + + def _create_share( + self, + file_ids: List[str], + expiration_days: str = "-1", + ) -> Tuple[str, str]: + """步骤④:创建新分享链接。 + + POST /drive/v1/share + Body: { + "file_ids": ["<fid1>", ...], + "expiration_days": "-1" + } + + expiration_days: "-1" 表示永久有效。 + + Args: + file_ids: 要分享的文件 ID 列表。 + expiration_days: 过期天数,"-1" 表示永久。 + + Returns: + (share_url, pass_code) 元组。 + + Raises: + RuntimeError: API 返回错误。 + """ + url = f"{XUNLEI_PAN_API}/drive/v1/share" + + body: Dict[str, Any] = { + "file_ids": file_ids, + "expiration_days": expiration_days, + } + # share 操作可能需要 captcha_token + headers = self.credential.get_headers_with_captcha(action="share") + headers.setdefault("Content-Type", "application/json") + + logger.info( + "[XunleiTransfer] ④ Creating share: %d files", len(file_ids) + ) + + try: + resp = self.session.post( + url, json=body, headers=headers, timeout=self.timeout + ) + resp.raise_for_status() + except requests.RequestException as exc: + raise RuntimeError(f"创建分享失败: {exc}") from exc + + data: Dict[str, Any] = resp.json() + errcode = data.get("errcode", data.get("error_code", 0)) + if errcode != 0: + raise RuntimeError( + f"创建分享失败: errcode={errcode}, message={data.get('message', data.get('error', ''))}" + ) + + share_url: str = data.get("share_url", data.get("link", "")) + pass_code: str = data.get("pass_code", data.get("code", "")) + + if not share_url: + share_id = data.get("share_id", "") + if share_id: + share_url = f"https://pan.xunlei.com/s/{share_id}" + + logger.info( + "[XunleiTransfer] ④ Share created: url=%s, pass_code=%s", + share_url, + pass_code, + ) + return share_url, pass_code + + # ─── 公开入口 ───────────────────────────────────────────────── + + def transfer( + self, + share_url: str, + save_dir: str = "", + share_password: str = "", + ) -> Dict[str, Any]: + """执行完整的 4 步转存流程。 + + 从原始迅雷分享链接开始,将文件转存到自己网盘,再创建新分享。 + + Args: + share_url: 原始迅雷分享链接,如 https://pan.xunlei.com/s/xxxxx。 + save_dir: 转存目标目录 ID,空字符串表示根目录。 + share_password: 新分享的密码(迅雷使用 pass_code)。 + + Returns: + 包含以下字段的字典: + - success: bool + - new_file_ids: List[str] — 转存后的文件ID列表(newId) + - file_name: str — 分享标题 + - share_url: str — 新分享链接 + - passcode: str — 新分享 pass_code + + Raises: + RuntimeError: 任一步骤失败。 + ValueError: URL 解析失败。 + """ + # 0. 解析 URL 提取 share_id + match = SHARE_URL_PATTERN.search(share_url) + if not match: + raise ValueError(f"无法从URL中提取迅雷分享ID: {share_url}") + share_id: str = match.group(1) + + logger.info( + "[XunleiTransfer] Starting 4-step transfer for share_id=%s", share_id + ) + + # ① 获取分享详情 + share_info: Dict[str, Any] = self._get_share_info(share_id) + files: List[Dict[str, Any]] = share_info.get("files", []) + title: str = share_info.get("title", "分享") + pass_code_token: str = share_info.get("pass_code_token", "") + + # 提取原始文件 ID + file_ids: List[str] = [ + f.get("file_id", f.get("fid", f.get("id", ""))) + for f in files + if f.get("file_id") or f.get("fid") or f.get("id") + ] + + if not file_ids: + raise RuntimeError("无法从分享中提取文件ID") + + # ② 发起转存 + task_id: str = self._restore_files( + share_id, pass_code_token, file_ids, parent_id=save_dir + ) + + # ③ 轮询转存任务 → 获取 oldId→newId 映射 + id_mapping: Dict[str, str] = self._poll_restore_task(task_id) + + # 从映射中提取新的文件 ID + new_file_ids: List[str] = [] + for old_fid in file_ids: + new_fid = id_mapping.get(old_fid, "") + if new_fid: + new_file_ids.append(new_fid) + else: + logger.warning( + "[XunleiTransfer] No newId mapped for old_fid=%s", old_fid + ) + + if not new_file_ids: + raise RuntimeError("转存完成但未获取到新文件ID") + + # ④ 创建新分享 + share_url_new, pass_code = self._create_share(new_file_ids) + + logger.info( + "[XunleiTransfer] Transfer complete: %d files, new_share=%s", + len(new_file_ids), + share_url_new, + ) + + return { + "success": True, + "new_file_ids": new_file_ids, + "file_name": title, + "share_url": share_url_new, + "passcode": pass_code or share_password, + } + + @staticmethod + def parse_share_url(url: str) -> Optional[str]: + """从迅雷分享 URL 中提取 share_id。 + + Args: + url: 迅雷分享链接。 + + Returns: + share_id 字符串,解析失败返回 None。 + """ + match = SHARE_URL_PATTERN.search(url) + return match.group(1) if match else None + + @staticmethod + def extract_file_ids(files: List[Dict[str, Any]]) -> List[str]: + """从文件列表中提取 file_id。 + + Args: + files: 文件信息字典列表。 + + Returns: + file_id 字符串列表。 + """ + return [ + f.get("file_id", f.get("fid", f.get("id", ""))) + for f in files + if f.get("file_id") or f.get("fid") or f.get("id") + ] + + @staticmethod + def parse_trace_file_ids(trace: str) -> Dict[str, str]: + """解析 trace_file_ids JSON 字符串为 oldId→newId 映射。 + + Args: + trace: trace_file_ids JSON 字符串,如 '{"oldId":"newId"}'. + + Returns: + {"oldId": "newId", ...} 映射字典。 + """ + try: + return json.loads(trace) + except (json.JSONDecodeError, TypeError): + return {} + + def close(self) -> None: + """关闭 HTTP 会话。""" + self.session.close() + + def __enter__(self) -> "XunleiTransfer": + return self + + def __exit__(self, *args: Any) -> None: + self.close() diff --git a/cloudsearch_transfer/config.py b/cloudsearch_transfer/config.py new file mode 100644 index 0000000..0f6bd6e --- /dev/null +++ b/cloudsearch_transfer/config.py @@ -0,0 +1,172 @@ +""" +CloudSearch Transfer — 配置管理 v1.0.0 +支持环境变量 + JSON文件 + 数据库多级配置源 +""" + +import os +import json +from pathlib import Path +from typing import Optional, Dict, Any +from dataclasses import dataclass, field + + +@dataclass +class PlatformConfig: + """单个网盘平台的配置""" + enabled: bool = False + cookie: str = "" # Cookie字符串(夸克/百度/UC/123) + refresh_token: str = "" # OAuth RefreshToken(阿里/迅雷) + access_token: str = "" # 运行时AccessToken(自动刷新) + account_name: str = "" # 账号名(多账号路由) + save_dir: str = "/" # 默认转存目录 + share_password: str = "" # 分享密码 + banned_keywords: list = field(default_factory=list) # 广告过滤关键词 + extra: Dict[str, Any] = field(default_factory=dict) # 扩展字段 + + +@dataclass +class TransferConfig: + """转存服务配置""" + # HTTP + request_timeout: int = 30 # 请求超时(秒) + max_retries: int = 3 # 最大重试次数 + retry_delay: float = 1.0 # 重试延迟(秒) + + # 任务轮询 + task_poll_interval: float = 0.5 # 轮询间隔(秒) + task_poll_max_attempts: int = 50 # 最大轮询次数 + task_poll_max_wait: int = 60 # 最大等待时间(秒) + + # 并发控制 + max_concurrent_transfers: int = 5 # 最大并发转存数 + transfer_queue_size: int = 100 # 转存队列大小 + + # 广告过滤 + ad_filter_enabled: bool = True # 是否启用广告过滤 + default_banned_keywords: list = field(default_factory=lambda: [ + "公众号", "微信", "扫码", "加群", "QQ群", "广告", + "关注", "免费领取", "点击领取", "全网", "最全", + ]) + + # 分享设置 + default_share_period: str = "permanent" # 永久/7d/30d + auto_generate_password: bool = False # 自动生成分享密码 + + +class ConfigManager: + """统一配置管理器""" + + def __init__(self, config_path: Optional[str] = None): + self._config_path = config_path or os.getenv( + "TRANSFER_CONFIG_PATH", + "/data/transfer_config.json" + ) + self.platforms: Dict[str, PlatformConfig] = {} + self.transfer: TransferConfig = TransferConfig() + self._load() + + def _load(self): + """加载配置:环境变量 → JSON文件 → 默认值""" + # 1. 从JSON文件加载 + if Path(self._config_path).exists(): + with open(self._config_path) as f: + data = json.load(f) + self._parse_json(data) + + # 2. 环境变量覆盖 + self._apply_env_overrides() + + def _parse_json(self, data: dict): + """解析JSON配置""" + # 平台配置 + platforms_data = data.get("platforms", {}) + for name, cfg in platforms_data.items(): + self.platforms[name] = PlatformConfig( + enabled=cfg.get("enabled", False), + cookie=cfg.get("cookie", ""), + refresh_token=cfg.get("refresh_token", ""), + access_token=cfg.get("access_token", ""), + account_name=cfg.get("account_name", name), + save_dir=cfg.get("save_dir", "/"), + share_password=cfg.get("share_password", ""), + banned_keywords=cfg.get("banned_keywords", []), + extra=cfg.get("extra", {}), + ) + + # 传输配置 + transfer_data = data.get("transfer", {}) + if transfer_data: + self.transfer = TransferConfig( + request_timeout=transfer_data.get("request_timeout", 30), + max_retries=transfer_data.get("max_retries", 3), + retry_delay=transfer_data.get("retry_delay", 1.0), + task_poll_interval=transfer_data.get("task_poll_interval", 0.5), + task_poll_max_attempts=transfer_data.get("task_poll_max_attempts", 50), + max_concurrent_transfers=transfer_data.get("max_concurrent_transfers", 5), + ad_filter_enabled=transfer_data.get("ad_filter_enabled", True), + ) + + def _apply_env_overrides(self): + """环境变量覆盖:TRANSFER_<PLATFORM>_COOKIE 等""" + env_map = { + "quark": "QUARK", + "baidu": "BAIDU", + "aliyun": "ALIYUN", + "uc": "UC", + "xunlei": "XUNLEI", + "pan123": "PAN123", + "cloud189": "CLOUD189", + } + + for platform, prefix in env_map.items(): + cookie = os.getenv(f"TRANSFER_{prefix}_COOKIE") + if cookie: + if platform not in self.platforms: + self.platforms[platform] = PlatformConfig() + self.platforms[platform].cookie = cookie + self.platforms[platform].enabled = True + + token = os.getenv(f"TRANSFER_{prefix}_REFRESH_TOKEN") + if token: + if platform not in self.platforms: + self.platforms[platform] = PlatformConfig() + self.platforms[platform].refresh_token = token + self.platforms[platform].enabled = True + + def get_platform(self, name: str) -> Optional[PlatformConfig]: + """获取平台配置""" + config = self.platforms.get(name) + if config and config.enabled: + return config + return None + + def get_enabled_platforms(self) -> list: + """获取所有已启用的平台名""" + return [name for name, cfg in self.platforms.items() if cfg.enabled] + + def save(self): + """保存配置到文件""" + data = { + "platforms": { + name: { + "enabled": cfg.enabled, + "cookie": cfg.cookie[:20] + "..." if cfg.cookie else "", + "refresh_token": cfg.refresh_token[:20] + "..." if cfg.refresh_token else "", + "account_name": cfg.account_name, + "save_dir": cfg.save_dir, + "share_password": cfg.share_password, + "banned_keywords": cfg.banned_keywords, + "extra": cfg.extra, + } + for name, cfg in self.platforms.items() + }, + "transfer": { + "request_timeout": self.transfer.request_timeout, + "max_retries": self.transfer.max_retries, + "max_concurrent_transfers": self.transfer.max_concurrent_transfers, + "ad_filter_enabled": self.transfer.ad_filter_enabled, + } + } + Path(self._config_path).parent.mkdir(parents=True, exist_ok=True) + with open(self._config_path, "w") as f: + json.dump(data, f, indent=2, ensure_ascii=False) diff --git a/cloudsearch_transfer/credential/__init__.py b/cloudsearch_transfer/credential/__init__.py new file mode 100644 index 0000000..343b0d3 --- /dev/null +++ b/cloudsearch_transfer/credential/__init__.py @@ -0,0 +1 @@ +"""CloudSearch Transfer — 凭证管理包""" diff --git a/cloudsearch_transfer/credential/manager.py b/cloudsearch_transfer/credential/manager.py new file mode 100644 index 0000000..243b683 --- /dev/null +++ b/cloudsearch_transfer/credential/manager.py @@ -0,0 +1,130 @@ +""" +CloudSearch Transfer — 凭证管理器 v1.0.0 +参考 search-ucmao 的 get_and_validate_credential + cloud-auto-save 的 Token回写 +""" + +import time +import logging +from typing import Optional, Dict, Any +from dataclasses import dataclass, field + +from ..config import PlatformConfig + +logger = logging.getLogger(__name__) + + +@dataclass +class CredentialStatus: + """凭证状态""" + valid: bool + platform: str + last_check: float = 0.0 + last_error: str = "" + checks_count: int = 0 + fail_count: int = 0 + + +class CredentialManager: + """ + 凭证管理器 + - 凭证校验(各平台最小长度要求不同) + - Token自动刷新(阿里云/迅雷) + - 健康检测 + """ + + # 各平台最小凭证长度 + MIN_LENGTH_MAP = { + "quark": 50, # Cookie ≥ 50字符 + "baidu": 50, # Cookie ≥ 50字符 + "uc": 50, # Cookie ≥ 50字符 + "aliyun": 20, # refresh_token ≥ 20字符 + "xunlei": 30, # refresh_token ≥ 30字符 + "pan123": 30, + "cloud189": 30, + } + + # 凭证类型:cookie / refresh_token + CREDENTIAL_TYPE = { + "quark": "cookie", + "baidu": "cookie", + "uc": "cookie", + "aliyun": "refresh_token", + "xunlei": "refresh_token", + "pan123": "cookie", + "cloud189": "cookie", + } + + def __init__(self): + self._status: Dict[str, CredentialStatus] = {} + self._token_cache: Dict[str, Dict[str, Any]] = {} + + def validate(self, platform: str, config: PlatformConfig) -> bool: + """ + 校验凭证有效性 + 参考 search-ucmao 的 get_and_validate_credential 逻辑 + """ + min_len = self.MIN_LENGTH_MAP.get(platform, 20) + + if self.CREDENTIAL_TYPE.get(platform) == "refresh_token": + token = config.refresh_token + valid = bool(token and len(token) >= min_len) + else: + cookie = config.cookie + valid = bool(cookie and len(cookie) >= min_len) + + # 记录状态 + status = self._status.get(platform, CredentialStatus(valid=False, platform=platform)) + status.last_check = time.time() + status.checks_count += 1 + if not valid: + status.fail_count += 1 + status.last_error = f"凭证长度不足 (需要≥{min_len})" + else: + status.valid = True + self._status[platform] = status + + return valid + + def get_credential(self, platform: str, config: PlatformConfig) -> str: + """ + 获取有效凭证 + 对于Token类型会自动刷新 + """ + if not self.validate(platform, config): + return "" + + cred_type = self.CREDENTIAL_TYPE.get(platform, "cookie") + if cred_type == "refresh_token": + # 优先使用缓存的access_token + cached = self._token_cache.get(platform, {}) + if cached.get("access_token") and cached.get("expires_at", 0) > time.time() + 60: + return cached["access_token"] + return config.refresh_token + else: + return config.cookie + + def update_access_token(self, platform: str, access_token: str, + expires_in: int = 3600): + """更新缓存的access_token""" + self._token_cache[platform] = { + "access_token": access_token, + "expires_at": time.time() + expires_in, + } + + def get_status(self, platform: str) -> Optional[CredentialStatus]: + """获取凭证状态""" + return self._status.get(platform) + + def get_all_status(self) -> Dict[str, CredentialStatus]: + """获取所有平台凭证状态""" + return dict(self._status) + + def mark_invalid(self, platform: str, reason: str = ""): + """标记凭证失效""" + status = self._status.get(platform, CredentialStatus(valid=False, platform=platform)) + status.valid = False + status.last_error = reason + status.fail_count += 1 + status.last_check = time.time() + self._status[platform] = status + logger.warning(f"[Credential] {platform} marked invalid: {reason}") diff --git a/cloudsearch_transfer/errors.py b/cloudsearch_transfer/errors.py new file mode 100644 index 0000000..914f6f1 --- /dev/null +++ b/cloudsearch_transfer/errors.py @@ -0,0 +1,68 @@ +""" +CloudSearch Transfer — 错误码定义 v1.0.0 +参考 netdisk Go SDK 的错误码设计 + 各项目实践 +""" + +from enum import IntEnum + + +class TransferErrorCode(IntEnum): + """统一错误码""" + # 通用错误 (40xxx) + URL_INVALID = 40001 # URL格式错误或无法识别平台 + NOT_LOGIN = 40002 # 未登录或凭证已失效 + CAPACITY_FULL = 40003 # 存储空间容量不足 + SHARE_NOT_EXIST = 40004 # 分享不存在或已失效 + PASSCODE_WRONG = 40005 # 提取码错误 + RESOURCE_EMPTY = 40006 # 资源内容为空或全为广告文件 + NETWORK_ERROR = 40007 # 网络请求失败 + TIMEOUT = 40008 # 操作超时 + NO_CONFIG = 40009 # 该平台未配置凭证 + SHARE_LINK_FAIL = 40010 # 分享创建失败 + SHARE_LIMIT = 40011 # 今日分享次数过多 + DIR_NOT_EXIST = 40012 # 目标存储目录不存在 + SENSITIVE_RESOURCE = 40013 # 资源内容违规 + + # 平台特有错误 (41xxx) + BAIDU_BDSTOKEN_FAIL = 41001 # 百度bdstoken获取失败 + ALIYUN_TOKEN_EXPIRED = 41002 # 阿里Token过期 + XUNLEI_CAPTCHA_FAIL = 41003 # 迅雷验证码失败 + QUARK_LOGIN_REQUIRED = 41004 # 夸克需要重新登录 + + +class TransferError(Exception): + """转存异常""" + def __init__(self, code: TransferErrorCode, message: str = None, + platform: str = None, details: dict = None): + self.code = code + self.message = message or self._default_message(code) + self.platform = platform + self.details = details or {} + super().__init__(self.message) + + @staticmethod + def _default_message(code: TransferErrorCode) -> str: + messages = { + TransferErrorCode.URL_INVALID: "URL格式错误或无法识别平台", + TransferErrorCode.NOT_LOGIN: "未登录或凭证已失效", + TransferErrorCode.CAPACITY_FULL: "存储空间容量不足", + TransferErrorCode.SHARE_NOT_EXIST: "分享不存在或已失效", + TransferErrorCode.PASSCODE_WRONG: "提取码错误", + TransferErrorCode.RESOURCE_EMPTY: "资源内容为空或全为广告文件", + TransferErrorCode.NETWORK_ERROR: "网络请求失败", + TransferErrorCode.TIMEOUT: "操作超时", + TransferErrorCode.NO_CONFIG: "该平台未配置凭证", + TransferErrorCode.SHARE_LINK_FAIL: "分享创建失败", + TransferErrorCode.SHARE_LIMIT: "今日分享次数过多", + TransferErrorCode.DIR_NOT_EXIST: "目标存储目录不存在", + TransferErrorCode.SENSITIVE_RESOURCE: "资源内容违规", + } + return messages.get(code, f"未知错误 (code={code})") + + def to_dict(self) -> dict: + return { + "code": self.code.value, + "message": self.message, + "platform": self.platform, + "details": self.details, + } diff --git a/cloudsearch_transfer/feature_flags.py b/cloudsearch_transfer/feature_flags.py new file mode 100644 index 0000000..ca51199 --- /dev/null +++ b/cloudsearch_transfer/feature_flags.py @@ -0,0 +1,68 @@ +""" +Feature Flags 统一管理 v2.1.0 +环境变量 + 配置文件双层控制 +""" + +import os +from typing import Dict + + +class FeatureFlags: + """功能开关管理器""" + + # 所有功能及其默认值 + DEFAULTS: Dict[str, bool] = { + # 核心功能 + "quark_pid": True, + "seo": True, + "link_monitor": True, + + # 增强功能 + "tmdb": True, + "telegram_bot": False, + "subscription": False, + "alist": False, + + # 转存平台 + "transfer_quark": True, + "transfer_baidu": False, + "transfer_aliyun": False, + "transfer_uc": False, + "transfer_xunlei": False, + "transfer_pan115": False, + "transfer_pan123": False, + "transfer_cloud189": False, + } + + def __init__(self): + self._flags: Dict[str, bool] = {} + self._load() + + def _load(self): + for key, default in self.DEFAULTS.items(): + env_key = f"FEATURE_{key.upper()}" + val = os.getenv(env_key, str(default)).lower() + self._flags[key] = val in ("true", "1", "yes", "on") + + def is_enabled(self, feature: str) -> bool: + return self._flags.get(feature, False) + + def enable(self, feature: str): + self._flags[feature] = True + + def disable(self, feature: str): + self._flags[feature] = False + + def list_all(self) -> Dict[str, bool]: + return dict(self._flags) + + def get_enabled_platforms(self) -> list: + return [ + k.replace("transfer_", "") + for k, v in self._flags.items() + if k.startswith("transfer_") and v + ] + + +# 全局单例 +features = FeatureFlags() diff --git a/cloudsearch_transfer/orchestration/__init__.py b/cloudsearch_transfer/orchestration/__init__.py new file mode 100644 index 0000000..b08eea7 --- /dev/null +++ b/cloudsearch_transfer/orchestration/__init__.py @@ -0,0 +1 @@ +"""CloudSearch Transfer — 编排包""" diff --git a/cloudsearch_transfer/orchestration/transfer.py b/cloudsearch_transfer/orchestration/transfer.py new file mode 100644 index 0000000..93cc4c9 --- /dev/null +++ b/cloudsearch_transfer/orchestration/transfer.py @@ -0,0 +1,214 @@ +""" +CloudSearch Transfer — 转存编排器 v1.0.0 +参考 search-ucmao 的 pan_operator.create_share + cloud-auto-save 的任务调度 +""" + +import time +import logging +import threading +from concurrent.futures import ThreadPoolExecutor, as_completed +from dataclasses import dataclass, field +from typing import Optional, List, Dict, Any, Callable + +from ..adapter.base import TransferResult, VerifyResult, BaseCloudDriveAdapter +from ..adapter.factory import AdapterFactory +from ..config import ConfigManager +from ..credential.manager import CredentialManager +from ..errors import TransferError, TransferErrorCode + +logger = logging.getLogger(__name__) + + +@dataclass +class TransferTask: + """转存任务""" + task_id: str + share_url: str + platform: str = "" + status: str = "pending" # pending/running/completed/failed + result: Optional[TransferResult] = None + error: Optional[str] = None + created_at: float = field(default_factory=time.time) + completed_at: Optional[float] = None + callback: Optional[Callable] = None + + +class TransferOrchestrator: + """ + 转存编排器 + - 统一入口:接受分享链接 → 自动识别平台 → 转存 + - 并发控制:ThreadPoolExecutor + - 任务追踪:内存队列 + 回调通知 + - 凭证健康检测 + - 重试机制 + """ + + def __init__(self, config_manager: ConfigManager = None): + self.config = config_manager or ConfigManager() + self.credential_mgr = CredentialManager() + self.factory = AdapterFactory(self.config) + self._executor = ThreadPoolExecutor( + max_workers=self.config.transfer.max_concurrent_transfers, + thread_name_prefix="transfer-", + ) + self._tasks: Dict[str, TransferTask] = {} + self._task_lock = threading.Lock() + self._seq = 0 + + def transfer(self, share_url: str, save_dir: str = "", + share_password: str = "", + callback: Callable = None) -> TransferResult: + """ + 转存单个分享链接(同步) + + Args: + share_url: 分享链接 + save_dir: 目标目录 + share_password: 新分享密码 + callback: 完成回调 callback(TransferResult) + + Returns: + TransferResult + """ + start = time.time() + try: + adapter = self.factory.get_adapter_for_url(share_url) + if not adapter: + raise TransferError(TransferErrorCode.URL_INVALID) + + result = adapter.transfer( + share_url=share_url, + save_dir=save_dir, + share_password=share_password, + ) + + if callback: + callback(result) + + return result + + except TransferError: + raise + except Exception as e: + logger.exception(f"Transfer failed: {share_url}") + raise TransferError(TransferErrorCode.NETWORK_ERROR, message=str(e)) + + def transfer_async(self, share_url: str, save_dir: str = "", + share_password: str = "", + callback: Callable = None) -> str: + """ + 异步转存 → 返回task_id + + Returns: + task_id (str) + """ + with self._task_lock: + self._seq += 1 + task_id = f"transfer_{int(time.time())}_{self._seq}" + + task = TransferTask( + task_id=task_id, + share_url=share_url, + status="pending", + callback=callback, + ) + self._tasks[task_id] = task + + future = self._executor.submit( + self._run_transfer, task, save_dir, share_password + ) + future.add_done_callback(lambda f: self._on_task_done(task, f)) + + return task_id + + def _run_transfer(self, task: TransferTask, save_dir: str, share_password: str): + """在线程池中执行转存""" + with self._task_lock: + task.status = "running" + + try: + result = self.transfer(task.share_url, save_dir, share_password) + with self._task_lock: + task.result = result + task.status = "completed" + task.completed_at = time.time() + except TransferError as e: + with self._task_lock: + task.error = str(e) + task.status = "failed" + task.completed_at = time.time() + raise + + def _on_task_done(self, task: TransferTask, future): + """任务完成回调""" + try: + future.result() # 触发异常传播 + except Exception: + pass + if task.callback: + try: + task.callback(task.result) + except Exception: + logger.exception("Callback error") + + def verify(self, share_url: str) -> VerifyResult: + """验证分享链接有效性""" + try: + adapter = self.factory.get_adapter_for_url(share_url) + return adapter.verify(share_url) + except TransferError as e: + return VerifyResult(valid=False, platform="", error=e) + + def get_task(self, task_id: str) -> Optional[TransferTask]: + """获取任务状态""" + return self._tasks.get(task_id) + + def list_tasks(self, status: str = None, limit: int = 50) -> List[TransferTask]: + """列出任务""" + tasks = list(self._tasks.values()) + if status: + tasks = [t for t in tasks if t.status == status] + tasks.sort(key=lambda t: t.created_at, reverse=True) + return tasks[:limit] + + def get_stats(self) -> Dict[str, Any]: + """获取统计信息""" + enabled = self.config.get_enabled_platforms() + credentials = {} + for p in enabled: + status = self.credential_mgr.get_status(p) + credentials[p] = { + "valid": status.valid if status else False, + "last_check": status.last_check if status else 0, + "fail_count": status.fail_count if status else 0, + } if status else {} + + tasks = self._tasks.values() + return { + "enabled_platforms": enabled, + "credentials": credentials, + "total_tasks": len(tasks), + "pending": sum(1 for t in tasks if t.status == "pending"), + "running": sum(1 for t in tasks if t.status == "running"), + "completed": sum(1 for t in tasks if t.status == "completed"), + "failed": sum(1 for t in tasks if t.status == "failed"), + } + + def check_health(self) -> Dict[str, Any]: + """健康检查""" + results = {} + for platform in self.config.get_enabled_platforms(): + try: + adapter = self.factory.get_adapter(platform) + if adapter: + results[platform] = "ok" + else: + results[platform] = "no_adapter" + except Exception as e: + results[platform] = f"error: {e}" + return results + + def shutdown(self): + """关闭编排器""" + self._executor.shutdown(wait=True, cancel_futures=False) + logger.info("TransferOrchestrator shutdown complete") diff --git a/cloudsearch_transfer/requirements.txt b/cloudsearch_transfer/requirements.txt new file mode 100644 index 0000000..c70f770 --- /dev/null +++ b/cloudsearch_transfer/requirements.txt @@ -0,0 +1,2 @@ +flask>=3.0 +requests>=2.28 diff --git a/cloudsearch_transfer/server.py b/cloudsearch_transfer/server.py new file mode 100644 index 0000000..0f74547 --- /dev/null +++ b/cloudsearch_transfer/server.py @@ -0,0 +1,200 @@ +""" +CloudSearch Transfer — HTTP API 服务 v1.0.0 +以 Flask 微服务形式运行,与 CloudSearch 主应用通过 HTTP 通信 +""" + +import os +import uuid +import logging +from flask import Flask, request, jsonify +from config import ConfigManager +from orchestration.transfer import TransferOrchestrator + +# ─── 初始化 ──────────────────────────────────────────── + +app = Flask(__name__) +config = ConfigManager() +orchestrator = TransferOrchestrator(config) + +logging.basicConfig( + level=logging.INFO, + format="%(asctime)s [%(levelname)s] %(name)s: %(message)s", +) +logger = logging.getLogger("transfer_api") + + +# ─── 健康检查 ────────────────────────────────────────── + +@app.route("/health", methods=["GET"]) +def health(): + return jsonify({ + "status": "ok", + "version": "1.0.0", + "platforms": orchestrator.get_stats(), + }) + + +# ─── 转存接口 ────────────────────────────────────────── + +@app.route("/api/transfer", methods=["POST"]) +def transfer(): + """转存分享链接""" + data = request.get_json() or {} + share_url = data.get("share_url", "").strip() + if not share_url: + return jsonify({"error": "share_url is required"}), 400 + + save_dir = data.get("save_dir", "") + share_password = data.get("share_password", "") + async_mode = data.get("async", False) + + try: + if async_mode: + task_id = orchestrator.transfer_async(share_url, save_dir, share_password) + return jsonify({"task_id": task_id, "status": "pending"}) + else: + result = orchestrator.transfer(share_url, save_dir, share_password) + return jsonify({ + "success": result.success, + "platform": result.platform, + "new_file_id": result.new_file_id, + "file_name": result.file_name, + "share_url": result.share_url, + "share_password": result.share_password, + "elapsed_ms": result.elapsed_ms, + }) + except Exception as e: + logger.exception("Transfer failed") + return jsonify({"error": str(e), "code": getattr(e, "code", 500)}), 500 + + +# ─── 验证接口 ────────────────────────────────────────── + +@app.route("/api/verify", methods=["POST"]) +def verify(): + """验证分享链接有效性""" + data = request.get_json() or {} + share_url = data.get("share_url", "").strip() + if not share_url: + return jsonify({"error": "share_url is required"}), 400 + + result = orchestrator.verify(share_url) + return jsonify({ + "valid": result.valid, + "platform": result.platform, + "title": result.title, + "file_count": result.file_count, + "files": [{"fid": f.fid, "name": f.name, "size": f.size} + for f in (result.files or [])], + "error": result.error.to_dict() if result.error else None, + }) + + +# ─── 任务查询 ────────────────────────────────────────── + +@app.route("/api/task/<task_id>", methods=["GET"]) +def get_task(task_id): + """查询异步任务状态""" + task = orchestrator.get_task(task_id) + if not task: + return jsonify({"error": "task not found"}), 404 + + result = { + "task_id": task.task_id, + "status": task.status, + "share_url": task.share_url, + "platform": task.platform, + "created_at": task.created_at, + "completed_at": task.completed_at, + } + if task.result: + result["result"] = { + "success": task.result.success, + "share_url": task.result.share_url, + "file_name": task.result.file_name, + "elapsed_ms": task.result.elapsed_ms, + } + if task.error: + result["error"] = task.error + + return jsonify(result) + + +@app.route("/api/tasks", methods=["GET"]) +def list_tasks(): + """列出任务""" + status = request.args.get("status") + limit = int(request.args.get("limit", 50)) + tasks = orchestrator.list_tasks(status=status, limit=limit) + return jsonify({ + "tasks": [ + { + "task_id": t.task_id, + "status": t.status, + "share_url": t.share_url[:80], + "platform": t.platform, + "created_at": t.created_at, + } + for t in tasks + ], + "total": len(tasks), + }) + + +# ─── 统计 ────────────────────────────────────────────── + +@app.route("/api/stats", methods=["GET"]) +def stats(): + """获取统计信息""" + return jsonify(orchestrator.get_stats()) + + +# ─── 配置管理 ────────────────────────────────────────── + +@app.route("/api/config/platforms", methods=["GET"]) +def get_platforms(): + """获取平台配置列表""" + platforms = {} + for name, cfg in config.platforms.items(): + platforms[name] = { + "enabled": cfg.enabled, + "account_name": cfg.account_name, + "save_dir": cfg.save_dir, + "has_cookie": bool(cfg.cookie), + "has_refresh_token": bool(cfg.refresh_token), + } + return jsonify({"platforms": platforms}) + + +@app.route("/api/config/platforms/<name>", methods=["PUT"]) +def update_platform(name): + """更新平台配置""" + data = request.get_json() or {} + if name not in config.platforms: + from config import PlatformConfig + config.platforms[name] = PlatformConfig() + + cfg = config.platforms[name] + if "enabled" in data: + cfg.enabled = data["enabled"] + if "cookie" in data: + cfg.cookie = data["cookie"] + if "refresh_token" in data: + cfg.refresh_token = data["refresh_token"] + if "save_dir" in data: + cfg.save_dir = data["save_dir"] + if "share_password" in data: + cfg.share_password = data["share_password"] + + config.save() + orchestrator.factory.invalidate_cache(name) + return jsonify({"status": "ok", "platform": name}) + + +# ─── 启动 ────────────────────────────────────────────── + +if __name__ == "__main__": + port = int(os.getenv("PORT", 9528)) + debug = os.getenv("FLASK_DEBUG", "0") == "1" + logger.info(f"Starting transfer service on port {port}") + app.run(host="0.0.0.0", port=port, debug=debug) diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9b02473 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,119 @@ +# CloudSearch v2.3.0 — 单容器部署(全功能集成) +networks: + cloudsearch-net: + driver: bridge + +volumes: + admin-data: + app-data: + pansou-data: + redis-data: + +x-logging: &default-logging + driver: json-file + options: + max-size: "50m" + max-file: "10" + +services: + # ============ Redis ============ + redis: + container_name: CloudSearch_Redis + image: redis:7-alpine + command: redis-server --save 60 1 --appendonly yes + volumes: + - redis-data:/data + restart: always + networks: + - cloudsearch-net + logging: *default-logging + + # ============ 全功能主应用 ============ + app: + container_name: CloudSearch_App + image: cloudsearch-app:v0.2.6 + ports: + - "9527:9527" + environment: + - NODE_ENV=production + - CORS_ORIGIN=http://jp-cs.timaa.cn + - JWT_SECRET=u-_1wBd1IlQNYwZ9l5P1838x2fdsp0DI-BUhMouJeIg + - ADMIN_PASSWORD=0nL5kLhMIJ1121PYmQb25A + - PANSOU_URL=http://pansou:80 + - DB_PATH=/data/database.sqlite + - REDIS_URL=redis://:redis_GbR7XZ@1Panel-redis-aDp3:6379 + - CLOUDSEARCH_API=http://localhost:9527 + - TRANSFER_CONFIG_PATH=/data/transfer_config.json + - TZ=Asia/Shanghai + - APP_VERSION_FILE=/data/VERSION + - FEISHU_APP_ID=${FEISHU_APP_ID:-} + - FEISHU_APP_SECRET=${FEISHU_APP_SECRET:-} + - FEISHU_VERIFY_TOKEN=${FEISHU_VERIFY_TOKEN:-} + - FEISHU_WEBHOOK_URL=${FEISHU_WEBHOOK_URL:-} + - TMDB_API_KEY=${TMDB_API_KEY:-} + volumes: + - app-data:/data + - ./uploads:/app/uploads + - ./icons:/app/dist/frontend/admin/icons + - ./VERSION:/data/VERSION + depends_on: + + # ============ 管理后台 (功能开关) ============ + admin: + container_name: CloudSearch_Admin + image: cloudsearch-admin:v0.1.0 + ports: + - "127.0.0.1:9531:9531" + environment: + - ADMIN_PORT=9531 + - ADMIN_PASSWORD=0nL5kLhMIJ1121PYmQb25A + - ADMIN_DB_PATH=/data/admin_flags.sqlite + volumes: + - admin-data:/data + restart: always + networks: + - cloudsearch-net + logging: *default-logging + + pansou: + condition: service_started + redis: + condition: service_started + restart: always + networks: + - cloudsearch-net + logging: *default-logging + + + # ============ 管理后台 (功能开关) ============ + admin: + container_name: CloudSearch_Admin + image: cloudsearch-admin:v0.1.0 + ports: + - "127.0.0.1:9531:9531" + environment: + - ADMIN_PORT=9531 + - ADMIN_PASSWORD=0nL5kLhMIJ1121PYmQb25A + - ADMIN_DB_PATH=/data/admin_flags.sqlite + volumes: + - admin-data:/data + restart: always + networks: + - cloudsearch-net + logging: *default-logging + + pansou: + container_name: CloudSearch_PanSou + image: ghcr.io/fish2018/pansou-web:latest + expose: + - "80" + environment: + - DOMAIN=${DOMAIN:-localhost} + - CACHE_TTL=60 + volumes: + - pansou-data:/app/data + restart: always + networks: + - cloudsearch-net + logging: *default-logging + diff --git a/icons/115.png b/icons/115.png new file mode 100644 index 0000000..5157653 Binary files /dev/null and b/icons/115.png differ diff --git a/icons/123pan.png b/icons/123pan.png new file mode 100644 index 0000000..acac41e Binary files /dev/null and b/icons/123pan.png differ diff --git a/icons/aliyun.png b/icons/aliyun.png new file mode 100644 index 0000000..70f841e Binary files /dev/null and b/icons/aliyun.png differ diff --git a/icons/baidu.png b/icons/baidu.png new file mode 100644 index 0000000..0013c7e Binary files /dev/null and b/icons/baidu.png differ diff --git a/icons/pikpak.png b/icons/pikpak.png new file mode 100644 index 0000000..a13400b Binary files /dev/null and b/icons/pikpak.png differ diff --git a/icons/quark.png b/icons/quark.png new file mode 100644 index 0000000..6751c3c Binary files /dev/null and b/icons/quark.png differ diff --git a/icons/tianyi.png b/icons/tianyi.png new file mode 100644 index 0000000..00d1361 Binary files /dev/null and b/icons/tianyi.png differ diff --git a/icons/uc.png b/icons/uc.png new file mode 100644 index 0000000..245733f Binary files /dev/null and b/icons/uc.png differ diff --git a/icons/xunlei.png b/icons/xunlei.png new file mode 100644 index 0000000..0e92f39 Binary files /dev/null and b/icons/xunlei.png differ diff --git a/source_clean/Dockerfile b/source_clean/Dockerfile new file mode 100644 index 0000000..9e9812a --- /dev/null +++ b/source_clean/Dockerfile @@ -0,0 +1,29 @@ +# Stage 1: Build +FROM node:20-alpine AS builder +WORKDIR /app +COPY package.json package-lock.json ./ +RUN npm ci +COPY tsconfig.json ./ +COPY src/ ./src/ +RUN npm run build + +# Stage 2: Runner +FROM node:20-alpine +RUN apk add --no-cache \ + chromium \ + nss \ + freetype \ + harfbuzz \ + ca-certificates \ + ttf-freefont \ + dumb-init +ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser +ENV NODE_ENV=production +WORKDIR /app +COPY --from=builder /app/node_modules ./node_modules +COPY --from=builder /app/dist ./dist +COPY --from=builder /app/package.json ./ +COPY frontend/ ./dist/frontend/ +EXPOSE 9527 +ENTRYPOINT ["dumb-init", "--"] +CMD ["node", "dist/main.js"] diff --git a/source_clean/frontend/admin.html b/source_clean/frontend/admin.html new file mode 100644 index 0000000..1c080c9 --- /dev/null +++ b/source_clean/frontend/admin.html @@ -0,0 +1,79 @@ +<!DOCTYPE html> +<html lang="zh-CN"> +<head> +<meta charset="UTF-8"> +<meta name="viewport" content="width=device-width,initial-scale=1.0"> +<title>CloudSearch 管理后台 + + + +
+ +
+
仪表盘v-
+
+
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source_clean/frontend/admin/js/admin-boot.js b/source_clean/frontend/admin/js/admin-boot.js new file mode 100644 index 0000000..df6efc8 --- /dev/null +++ b/source_clean/frontend/admin/js/admin-boot.js @@ -0,0 +1,15 @@ + +// Fetch app version +fetch('/api/version').then(r => r.json()).then(d => { + var el = document.getElementById('appVersion'); + if (el && d.version) el.textContent = 'v' + d.version; +}).catch(function(){}); + +(function(){ + if(!TOKEN){ + document.getElementById('app').innerHTML = ''; + page_login(document.getElementById('content')); + } else { + nav('dashboard'); + } +})(); diff --git a/source_clean/frontend/admin/js/admin-cleanup.js b/source_clean/frontend/admin/js/admin-cleanup.js new file mode 100644 index 0000000..9001095 --- /dev/null +++ b/source_clean/frontend/admin/js/admin-cleanup.js @@ -0,0 +1,155 @@ +function page_cleanup(c){ + c.innerHTML = '

Loading...

'; + loadCleanupPage(); +} + +function loadCleanupPage(){ + Promise.all([ + api('/api/admin/cloud-configs').catch(function(){ return []; }), + api('/api/admin/verify/status').catch(function(){ return {}; }), + api('/api/admin/system-configs').catch(function(){ return {}; }) + ]).then(function(res){ + var accounts = res[0] || []; + var vStatus = res[1] || {}; + var configs = res[2] || {}; + renderCleanupPage(accounts, vStatus, configs); + }); +} + +function renderCleanupPage(accounts, vStatus, configs){ + var lastVerify = vStatus.last_run ? new Date(vStatus.last_run).toLocaleString() : 'never'; + var lastCleanup = configs.cleanup_last_run || 'never'; + var h = ''; + + h += '
Storage Cleanup & Management
'; + h += '

Cloud verification, space refresh, scheduled cleanup

'; + + // Quick Actions + h += '
Quick Actions
'; + h += '
'; + h += ''; + h += ''; + h += ''; + h += ''; + h += '
'; + h += '
'; + h += '
Last verify: ' + lastVerify + ' | Last cleanup: ' + lastCleanup + '
'; + + // Account Table + h += '
Account Verification
'; + h += '
'; + h += ''; + h += ''; + h += ''; + h += ''; + + accounts.forEach(function(cfg){ + var v = cfg.verification_status; + var vIcon = v==='valid'?'OK':(v==='invalid'?'FAIL':'PENDING'); + var space = cfg.storage_used ? (cfg.storage_used + ' / ' + (cfg.storage_total||'?')) : '-'; + h += ''; + h += ''; + h += ''; + h += ''; + h += ''; + h += ''; + }); + + if(accounts.length===0){ + h += ''; + } + h += '
TypeNicknameStatusSpaceAction
' + (cfg.cloud_type||'?') + '' + (cfg.nickname||'-') + '' + vIcon + '' + space + '
No accounts found
'; + + // Cleanup Config + h += '
Cleanup Config
'; + h += '
'; + h += cfgRow('Cleanup Enabled', 'cleanup_enabled', configs, 'checkbox'); + h += cfgRow('File Retention (days)', 'cleanup_file_retention_days', configs, 'number', '7'); + h += cfgRow('Log Retention (days)', 'cleanup_log_retention_days', configs, 'number', '30'); + h += cfgRow('Empty Trash After', 'cleanup_empty_trash', configs, 'checkbox'); + h += cfgRow('Space Threshold Cleanup', 'cleanup_space_threshold_enabled', configs, 'checkbox'); + h += cfgRow('Threshold %', 'cleanup_space_threshold_percent', configs, 'number', '90'); + h += cfgRow('Delete %', 'cleanup_space_threshold_delete_percent', configs, 'number', '10'); + h += '
'; + h += '
'; + + document.getElementById('cleanupRoot').innerHTML = h; +} + +function cfgRow(label, key, configs, type, placeholder){ + var val = configs[key] || ''; + if(type==='checkbox'){ + var chk = val==='true'?'checked':''; + return '
'; + } + return '
'; +} + +function runVerifyAll(){ + var el = document.getElementById('actionStatus'); + el.innerHTML = 'Verifying all accounts...'; + api('/api/admin/verify/run', {method:'POST'}).then(function(r){ + el.innerHTML = 'Done: '+(r.ok||0)+'/'+r.total+' OK, '+r.failed+' failed'; + setTimeout(loadCleanupPage, 2000); + }).catch(function(e){ + el.innerHTML = 'Verify failed: '+(e.message||'network error'); + }); +} + +function runSingleVerify(id, btn){ + btn.disabled = true; btn.textContent = '...'; + api('/api/admin/verify/single/'+id, {method:'POST'}).then(function(r){ + btn.textContent = r.success ? 'OK' : 'FAIL'; + }).catch(function(){ btn.textContent = 'ERR'; }) + .finally(function(){ setTimeout(loadCleanupPage, 1500); }); +} + +function runStorageRefresh(){ + var el = document.getElementById('actionStatus'); + el.innerHTML = 'Refreshing space info...'; + api('/api/admin/storage/refresh', {method:'POST'}).then(function(){ + el.innerHTML = 'Space refreshed'; + setTimeout(loadCleanupPage, 2000); + }).catch(function(e){ + el.innerHTML = 'Refresh failed: '+(e.message||'network error'); + }); +} + +function runFullCleanup(){ + var el = document.getElementById('actionStatus'); + el.innerHTML = 'Running full cleanup...'; + api('/api/admin/cleanup/run', {method:'POST'}).then(function(r){ + el.innerHTML = (r.message||'Cleanup done'); + setTimeout(loadCleanupPage, 2000); + }).catch(function(e){ + el.innerHTML = 'Cleanup failed: '+(e.message||'network error'); + }); +} + +function runEmptyTrash(){ + var el = document.getElementById('actionStatus'); + if(!confirm('Empty all trash? This cannot be undone.')) return; + el.innerHTML = 'Emptying trash...'; + api('/api/admin/cleanup/empty-trash', {method:'POST'}).then(function(r){ + el.innerHTML = r.emptied ? 'Trash emptied' : (r.message||'Done'); + }).catch(function(e){ + el.innerHTML = 'Failed: '+(e.message||'network error'); + }); +} + +function saveCleanupConfig(){ + var entries = []; + document.querySelectorAll('.cleanupCfg').forEach(function(el){ + var key = el.dataset.key; + var val = el.type==='checkbox' ? (el.checked?'true':'false') : el.value.trim(); + entries.push({key:key, value:val}); + }); + api('/api/admin/system-configs', { + method:'PUT', headers:{'Content-Type':'application/json'}, + body:JSON.stringify({entries:entries}) + }).then(function(){ + toast('Config saved'); + }).catch(function(e){ + toast('Save failed: '+(e.message||'')); + }); +} diff --git a/source_clean/frontend/admin/js/admin-core.js b/source_clean/frontend/admin/js/admin-core.js new file mode 100644 index 0000000..fbba555 --- /dev/null +++ b/source_clean/frontend/admin/js/admin-core.js @@ -0,0 +1,39 @@ +var TOKEN = localStorage.getItem('admin_token') || ''; +var TITLES = {dashboard:'仪表盘','sys-site':'网站设置','sys-services':'外部服务','sys-manage':'服务管理','sys-strategy':'性能配置','sys-password':'修改密码','cloud-config':'网盘设置',cleanup:'存储清理'}; + +function api(path, opts){ + opts = opts || {}; + opts.headers = opts.headers || {}; + if(TOKEN) opts.headers['Authorization'] = 'Bearer ' + TOKEN; + return fetch(path, opts).then(function(r){ + if(r.status === 401){ localStorage.removeItem('admin_token'); location.reload(); throw new Error('unauth'); } + return r.json(); + }); +} + +function toast(msg, type){ + type = type || 'success'; + var t = document.createElement('div'); t.className = 'toast toast-'+type; t.textContent = msg; + document.body.appendChild(t); + setTimeout(function(){ t.remove(); }, 2500); +} + +document.querySelectorAll('.nav-item').forEach(function(el){ + el.onclick = function(){ nav(this.dataset.page); }; +}); + +function nav(page){ + document.querySelectorAll('.nav-item').forEach(function(e){ e.classList.remove('active'); }); + var target = document.querySelector('[data-page="'+page+'"]'); + if(target) target.classList.add('active'); + document.getElementById('pageTitle').textContent = TITLES[page] || page; + var c = document.getElementById('content'); + c.innerHTML = '
加载中...
'; + try{ window['page_'+page.replace(/-/g,'_')](c); } + catch(e){ c.innerHTML = '

加载出错: '+e.message+'

'; } +} + +function logout(){ + localStorage.removeItem('admin_token'); + location.reload(); +} diff --git a/source_clean/frontend/admin/js/admin-dashboard.js b/source_clean/frontend/admin/js/admin-dashboard.js new file mode 100644 index 0000000..8ab2c18 --- /dev/null +++ b/source_clean/frontend/admin/js/admin-dashboard.js @@ -0,0 +1,9 @@ +function page_dashboard(c){ + api('/api/admin/services').then(function(d){ + var h = '
系统概览
'+ + '
'+ + '
'+(d.length||0)+'
服务数
'+ + '
'; + c.innerHTML = h; + }).catch(function(){ c.innerHTML = '
加载失败
'; }); +} diff --git a/source_clean/frontend/admin/js/admin-helpers.js b/source_clean/frontend/admin/js/admin-helpers.js new file mode 100644 index 0000000..e7a7955 --- /dev/null +++ b/source_clean/frontend/admin/js/admin-helpers.js @@ -0,0 +1 @@ +// Helper utilities diff --git a/source_clean/frontend/admin/js/admin-login.js b/source_clean/frontend/admin/js/admin-login.js new file mode 100644 index 0000000..57c3b38 --- /dev/null +++ b/source_clean/frontend/admin/js/admin-login.js @@ -0,0 +1,14 @@ +function page_login(c){ + c.innerHTML = '
管理后台登录
'+ + '
'+ + '
'; +} + +function doLogin(){ + var pwd = document.getElementById('pwd').value; + api('/api/admin/login', {method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({password:pwd})}) + .then(function(d){ + if(d.token){ localStorage.setItem('admin_token', d.token); TOKEN = d.token; nav('dashboard'); } + else{ toast(d.error||'密码错误','error'); } + }); +} diff --git a/source_clean/frontend/admin/js/admin-password.js b/source_clean/frontend/admin/js/admin-password.js new file mode 100644 index 0000000..b95f349 --- /dev/null +++ b/source_clean/frontend/admin/js/admin-password.js @@ -0,0 +1,13 @@ +function page_sys_password(c){ + c.innerHTML = '
修改密码
'+ + '
'+ + '
'+ + '
'; +} +function changePwd(){ + api('/api/admin/change-password', {method:'POST',headers:{'Content-Type':'application/json'}, + body:JSON.stringify({old:document.getElementById('oldPwd').value,new:document.getElementById('newPwd').value})}) + .then(function(d){ toast(d.error||'密码修改成功', d.error?'error':'success'); }); +} +function page_sys_manage(c){ page_sys_services(c); } +function page_sys_strategy(c){ c.innerHTML = '
性能配置页面
'; } diff --git a/source_clean/frontend/admin/js/admin-services.js b/source_clean/frontend/admin/js/admin-services.js new file mode 100644 index 0000000..c4d8922 --- /dev/null +++ b/source_clean/frontend/admin/js/admin-services.js @@ -0,0 +1,10 @@ +function page_sys_services(c){ + api('/api/admin/services').then(function(d){ + var h = '
外部服务
'; + (d||[]).forEach(function(s){ + h += '
'+s.name+''+s.url+'
'+ + '
'+(s.enabled?'运行中':'已停止')+'
'; + }); + c.innerHTML = h+'
'; + }); +} diff --git a/source_clean/frontend/admin/js/admin-site.js b/source_clean/frontend/admin/js/admin-site.js new file mode 100644 index 0000000..b80c536 --- /dev/null +++ b/source_clean/frontend/admin/js/admin-site.js @@ -0,0 +1,14 @@ +function page_sys_site(c){ + api('/api/admin/system-configs').then(function(d){ + var h = '
网站设置
'; + h += '
'; + h += '
'; + c.innerHTML = h; + }); +} +function saveSite(){ + var name = document.getElementById('site_name').value; + api('/api/admin/system-configs', {method:'PUT',headers:{'Content-Type':'application/json'}, + body:JSON.stringify({entries:[{key:'site_name',value:name}]})}) + .then(function(d){ toast(d.error||'保存成功', d.error?'error':'success'); }); +} diff --git a/source_clean/frontend/admin/js/cloud/cloud-actions.js b/source_clean/frontend/admin/js/cloud/cloud-actions.js new file mode 100644 index 0000000..f56549f --- /dev/null +++ b/source_clean/frontend/admin/js/cloud/cloud-actions.js @@ -0,0 +1,80 @@ +function togCloudType(type, cb){ + __cloudToggles[type] = cb.checked; + api('/api/admin/system-configs', { + method:'PUT', headers:{'Content-Type':'application/json'}, + body:JSON.stringify({entries:[{key:'cloud_type_'+type+'_enabled', value:cb.checked?'true':'false'}]}) + }); +} + +function togCloudAcc(id, cb){ + api('/api/admin/cloud-configs/'+id, {method:'PUT',headers:{'Content-Type':'application/json'},body:JSON.stringify({is_active:cb.checked})}) + .then(function(d){ if(d.error){ cb.checked=!cb.checked; toast(d.error,'error'); } }); +} +function delCloudAcc(id){ var name = '账号#'+id; + if(!confirm('确定删除 '+name+' 吗?')) return; + api('/api/admin/cloud-configs/'+id, {method:'DELETE'}).then(function(d){ + toast(d.error?d.error:'已删除 '+name, d.error?'error':'success'); + nav('cloud-config'); + }); +} +function doSaveAccount(){ + var body = { + cloud_type: document.getElementById('dlg_type').value, + // default off, will be set by manual toggle + }; + var cookie = document.getElementById('dlg_cookie').value.trim(); + if(!cookie){ toast('请先输入或扫码获取 Cookie','error'); return; } + body.cookie = cookie; + body.promotion_account = document.getElementById('dlg_promo').value.trim() || ''; + body.nickname = document.getElementById('dlg_nick').value.trim() || ''; + body.storage_used = __qrStorageUsed || ''; + body.storage_total = __qrStorageTotal || ''; + toast('⏳ 正在保存...'); + api('/api/admin/cloud-configs', { + method:'POST', headers:{'Content-Type':'application/json'}, body:JSON.stringify(body) + }).then(function(d){ + if(d && d.error){ toast(d.error,'error'); return; } + var savedId = d.id; + toast('⏳ 正在验证 Cookie 并查询空间...'); + return api('/api/admin/cloud-configs/'+body.cloud_type+'/test', { + method:'POST', headers:{'Content-Type':'application/json'}, + body:JSON.stringify({id: savedId}) + }); + }).then(function(r){ + if(r && r.success){ + toast('✅ 验证通过!空间: '+(r.storage_used||'?')+'/'+(r.storage_total||'?')); + } else { + toast('⚠️ 已保存但验证失败: '+(r?r.message:'未知错误'),'error'); + } + closeDialog(); + nav('cloud-config'); + }).catch(function(e){ + toast('保存失败: '+(e.message||'网络错误'),'error'); + console.error('doSaveAccount error:', e); + }); +} + +function doSaveAccount_OLD(){ + var body = { + cloud_type: document.getElementById('dlg_type').value, + // default off, will be set by verification + }; + var cookie = document.getElementById('dlg_cookie').value.trim(); + if(!cookie){ toast('请先输入或扫码获取 Cookie','error'); return; } + body.cookie = cookie; + console.log("SAVE promo raw:", document.getElementById("dlg_promo").value); body.promotion_account = document.getElementById('dlg_promo').value.trim() || ''; + body.nickname = document.getElementById('dlg_nick').value.trim() || ''; + body.storage_used = __qrStorageUsed || ''; + body.storage_total = __qrStorageTotal || ''; + api('/api/admin/cloud-configs', { + method:'POST', headers:{'Content-Type':'application/json'}, body:JSON.stringify(body) + }).then(function(d){ + if(d && d.error){ toast(d.error,'error'); return; } + toast('✅ 网盘配置更新成功'); + closeDialog(); + nav('cloud-config'); + }).catch(function(e){ + toast('保存失败: '+(e.message||'网络错误'),'error'); + console.error('doSaveAccount error:', e); + }); +} diff --git a/source_clean/frontend/admin/js/cloud/cloud-actions.js.bak b/source_clean/frontend/admin/js/cloud/cloud-actions.js.bak new file mode 100644 index 0000000..3dbf869 --- /dev/null +++ b/source_clean/frontend/admin/js/cloud/cloud-actions.js.bak @@ -0,0 +1,43 @@ +function togCloudType(type, cb){ + __cloudToggles[type] = cb.checked; + api('/api/admin/system-configs', { + method:'PUT', headers:{'Content-Type':'application/json'}, + body:JSON.stringify({entries:[{key:'cloud_type_'+type+'_enabled', value:cb.checked?'true':'false'}]}) + }); +} + +function togCloudAcc(id, cb){ + api('/api/admin/cloud-configs/'+id, {method:'PUT',headers:{'Content-Type':'application/json'},body:JSON.stringify({is_active:cb.checked})}) + .then(function(d){ if(d.error){ cb.checked=!cb.checked; toast(d.error,'error'); } }); +} +function delCloudAcc(id){ var name = '账号#'+id; + if(!confirm('确定删除 '+name+' 吗?')) return; + api('/api/admin/cloud-configs/'+id, {method:'DELETE'}).then(function(d){ + toast(d.error?d.error:'已删除 '+name, d.error?'error':'success'); + nav('cloud-config'); + }); +} +function doSaveAccount(){ + var body = { + cloud_type: document.getElementById('dlg_type').value, + is_active: true + }; + var cookie = document.getElementById('dlg_cookie').value.trim(); + if(!cookie){ toast('请先输入或扫码获取 Cookie','error'); return; } + body.cookie = cookie; + console.log("SAVE promo raw:", document.getElementById("dlg_promo").value); body.promotion_account = document.getElementById('dlg_promo').value.trim() || ''; + body.nickname = document.getElementById('dlg_nick').value.trim() || ''; + body.storage_used = __qrStorageUsed || ''; + body.storage_total = __qrStorageTotal || ''; + api('/api/admin/cloud-configs', { + method:'POST', headers:{'Content-Type':'application/json'}, body:JSON.stringify(body) + }).then(function(d){ + if(d && d.error){ toast(d.error,'error'); return; } + toast('✅ 网盘配置更新成功'); + closeDialog(); + nav('cloud-config'); + }).catch(function(e){ + toast('保存失败: '+(e.message||'网络错误'),'error'); + console.error('doSaveAccount error:', e); + }); +} diff --git a/source_clean/frontend/admin/js/cloud/cloud-actions.js.bak3 b/source_clean/frontend/admin/js/cloud/cloud-actions.js.bak3 new file mode 100644 index 0000000..aff7e4d --- /dev/null +++ b/source_clean/frontend/admin/js/cloud/cloud-actions.js.bak3 @@ -0,0 +1,43 @@ +function togCloudType(type, cb){ + __cloudToggles[type] = cb.checked; + api('/api/admin/system-configs', { + method:'PUT', headers:{'Content-Type':'application/json'}, + body:JSON.stringify({entries:[{key:'cloud_type_'+type+'_enabled', value:cb.checked?'true':'false'}]}) + }); +} + +function togCloudAcc(id, cb){ + api('/api/admin/cloud-configs/'+id, {method:'PUT',headers:{'Content-Type':'application/json'},body:JSON.stringify({is_active:cb.checked})}) + .then(function(d){ if(d.error){ cb.checked=!cb.checked; toast(d.error,'error'); } }); +} +function delCloudAcc(id){ var name = '账号#'+id; + if(!confirm('确定删除 '+name+' 吗?')) return; + api('/api/admin/cloud-configs/'+id, {method:'DELETE'}).then(function(d){ + toast(d.error?d.error:'已删除 '+name, d.error?'error':'success'); + nav('cloud-config'); + }); +} +function doSaveAccount(){ + var body = { + cloud_type: document.getElementById('dlg_type').value, + // default off, will be set by verification + }; + var cookie = document.getElementById('dlg_cookie').value.trim(); + if(!cookie){ toast('请先输入或扫码获取 Cookie','error'); return; } + body.cookie = cookie; + console.log("SAVE promo raw:", document.getElementById("dlg_promo").value); body.promotion_account = document.getElementById('dlg_promo').value.trim() || ''; + body.nickname = document.getElementById('dlg_nick').value.trim() || ''; + body.storage_used = __qrStorageUsed || ''; + body.storage_total = __qrStorageTotal || ''; + api('/api/admin/cloud-configs', { + method:'POST', headers:{'Content-Type':'application/json'}, body:JSON.stringify(body) + }).then(function(d){ + if(d && d.error){ toast(d.error,'error'); return; } + toast('✅ 网盘配置更新成功'); + closeDialog(); + nav('cloud-config'); + }).catch(function(e){ + toast('保存失败: '+(e.message||'网络错误'),'error'); + console.error('doSaveAccount error:', e); + }); +} diff --git a/source_clean/frontend/admin/js/cloud/cloud-core.js b/source_clean/frontend/admin/js/cloud/cloud-core.js new file mode 100644 index 0000000..1cc199e --- /dev/null +++ b/source_clean/frontend/admin/js/cloud/cloud-core.js @@ -0,0 +1,38 @@ + +// --- Cloud Config --- +var CLOUD_TYPES = [ + {type:'quark',label:'夸克网盘',icon:'/admin/icons/quark.png'}, + {type:'baidu',label:'百度网盘',icon:'/admin/icons/baidu.png'}, + {type:'aliyun',label:'阿里云盘',icon:'/admin/icons/aliyun.png'}, + {type:'115',label:'115网盘',icon:'/admin/icons/115.png'}, + {type:'tianyi',label:'天翼云盘',icon:'/admin/icons/tianyi.png'}, + {type:'123pan',label:'123云盘',icon:'/admin/icons/123pan.png'}, + {type:'uc',label:'UC网盘',icon:'/admin/icons/uc.png'}, + {type:'xunlei',label:'迅雷网盘',icon:'/admin/icons/xunlei.png'}, + {type:'pikpak',label:'PikPak',icon:'/admin/icons/pikpak.png'}, + {type:'magnet',label:'磁力链接',icon:'🧲'}, + {type:'ed2k',label:'电驴链接',icon:'🔗'}, + {type:'others',label:'其他',icon:'⬜'} +]; +var QR_TYPES = ['quark','baidu']; +var __cloudToggles = {}; +var __qrType = '', __qrSession = '', __qrCookie = '', __qrTimer = null; + +function page_cloud_config(c){ + c.innerHTML = '
加载中...
'; + Promise.all([ + api('/api/admin/system-configs').catch(function(e){ console.error(e); return {}; }), + api('/api/admin/cloud-configs').catch(function(e){ console.error(e); return []; }) + ]).then(function(res){ + var d = res[0]||{}, accounts = res[1]||[]; + __cloudToggles = {}; + CLOUD_TYPES.forEach(function(ct){ + var v = d['cloud_type_'+ct.type+'_enabled']; + __cloudToggles[ct.type] = v===undefined ? (ct.type!=='others') : (v==='true'||v==='1'); + }); + renderCloudPage(c, accounts); + }).catch(function(e){ + c.innerHTML = '

加载失败: '+e.message+'

'; + }); +} + diff --git a/source_clean/frontend/admin/js/cloud/cloud-dialog.js b/source_clean/frontend/admin/js/cloud/cloud-dialog.js new file mode 100644 index 0000000..a55ecfe --- /dev/null +++ b/source_clean/frontend/admin/js/cloud/cloud-dialog.js @@ -0,0 +1,107 @@ +var __qrSession = ''; +var __qrCookie = ''; +var __qrType = ''; +var __qrTimer = null; +var __qrNickname = ''; +var __qrStorageUsed = ''; +var __qrStorageTotal = ''; +var QR_TYPES = ['quark','baidu']; + +function openAddDialog(){ + document.getElementById('dlg_type').value = 'quark'; + document.getElementById('dlg_cookie').value = ''; + document.getElementById('dlg_promo').value = ''; + document.getElementById('dlg_nick').value = ''; + document.getElementById('dlg_storage_info').textContent = '扫码后自动获取'; + resetQR(); + onDlgTypeChange(); + document.getElementById('modalBg').style.display = 'flex'; +} + +function closeDialog(){ + cancelQRPoll(); + document.getElementById('modalBg').style.display = 'none'; +} + +function onDlgTypeChange(){ + var t = document.getElementById('dlg_type').value; + document.getElementById('dlg_qr_section').style.display = (QR_TYPES.indexOf(t)!==-1) ? 'block' : 'none'; +} + +function resetQR(){ + cancelQRPoll(); + __qrSession = ''; __qrCookie = ''; __qrNickname = ''; __qrStorageUsed = ''; __qrStorageTotal = ''; + document.getElementById('dlg_qr_status').textContent = '点击下方按钮生成扫码链接'; + document.getElementById('dlg_qr_btn').disabled = false; + document.getElementById('dlg_qr_btn').textContent = '生成扫码链接'; + document.getElementById('dlg_qr_btn').style.display = ''; + document.getElementById('dlg_qr_hint').textContent = ''; +} + +function doStartQR(){ + __qrType = document.getElementById('dlg_type').value; + document.getElementById('dlg_qr_btn').disabled = true; + document.getElementById('dlg_qr_btn').textContent = '生成中...'; + document.getElementById('dlg_qr_status').textContent = '正在生成二维码...'; + api('/api/admin/'+__qrType+'/qr-login/start', {method:'POST'}).then(function(d){ + if(d.error){ + document.getElementById('dlg_qr_status').innerHTML = '❌ '+d.error+''; + document.getElementById('dlg_qr_btn').disabled=false; + document.getElementById('dlg_qr_btn').textContent='重试'; + return; + } + __qrSession = d.sessionId; + var url = d.qrUrl||d.url||''; + if(url){ + var qrSrc = 'https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=' + encodeURIComponent(url); + document.getElementById('dlg_qr_status').innerHTML = '

用对应 App 扫码并在手机上确认登录

'; + } + document.getElementById('dlg_qr_hint').textContent = '等待扫码确认...'; + document.getElementById('dlg_qr_btn').textContent = '重新生成'; + document.getElementById('dlg_qr_btn').disabled = false; + pollQR(); + }); +} + +function pollQR(){ + if(!__qrSession) return; + __qrTimer = setTimeout(function(){ + api('/api/admin/'+__qrType+'/qr-login/'+__qrSession+'/status').then(function(d){ + if(d.status==='logged_in'){ + __qrCookie = d.cookie||''; + __qrNickname = d.nickname||''; + __qrStorageUsed = d.storage_used||''; + __qrStorageTotal = d.storage_total||''; + if(__qrNickname){ var n = document.getElementById('dlg_nick'); if(!n.value.trim()) n.value = __qrNickname; } + if(d.promotion_account){ var p = document.getElementById('dlg_promo'); if(!p.value.trim()) p.value = d.promotion_account; } + var si = document.getElementById('dlg_storage_info'); + if(__qrStorageTotal){ + si.textContent = '💾 ' + (__qrStorageUsed||'?') + ' / ' + __qrStorageTotal; + si.style.color = 'var(--success)'; + } else { si.textContent = '空间信息未获取'; si.style.color = 'var(--sub)'; } + if(d.autoUpdated){ + document.getElementById('dlg_qr_status').innerHTML = '✅ 扫码成功!已自动更新现有账号 #'+d.updatedConfigId+''; + cancelQRPoll(); + toast('✅ 已自动更新账号','success'); + setTimeout(function(){ closeDialog(); nav('cloud-config'); }, 1000); + return; + } + document.getElementById('dlg_qr_hint').textContent = '✅ 登录成功!'; + document.getElementById('dlg_qr_status').innerHTML = '✅ 扫码成功!已自动填入'; + document.getElementById('dlg_cookie').value = __qrCookie; + document.getElementById('dlg_qr_btn').style.display = 'none'; + cancelQRPoll(); + }else if(d.status==='expired'){ + cancelQRPoll(); + setTimeout(function(){ doStartQR(); }, 500); + }else{ + pollQR(); + } + }).catch(function(){ pollQR(); }); + }, 3000); +} + +function cancelQRPoll(){ + if(__qrTimer){ clearTimeout(__qrTimer); __qrTimer = null; } + if(__qrSession){ api('/api/admin/'+__qrType+'/qr-login/'+__qrSession+'/cancel', {method:'POST'}).catch(function(){}); __qrSession=''; } +} diff --git a/source_clean/frontend/admin/js/cloud/cloud-render.js b/source_clean/frontend/admin/js/cloud/cloud-render.js new file mode 100644 index 0000000..8fb0aef --- /dev/null +++ b/source_clean/frontend/admin/js/cloud/cloud-render.js @@ -0,0 +1,92 @@ +function renderCloudPage(c, accounts){ + accounts = accounts || []; + var h = ''; + + // Render icon: URL → , emoji/text → plain text + function iconHtml(icon, size){ + if(!icon) return ''; + if(icon.indexOf('/')===0 || icon.indexOf('http')===0){ + return ''; + } + return ''+icon+''; + } + + // Toggle grid + h += '
⚡ 搜索网盘类型控制
'+ + '

控制搜索引擎检索哪些网盘类型的资源

'+ + '
'; + CLOUD_TYPES.forEach(function(ct){ + var on = __cloudToggles[ct.type]; + h += '
'+ + ''+iconHtml(ct.icon,20)+' '+ct.label+''+ + ''+ + '
'; + }); + h += '
'; + + // Account list — table style + if(accounts.length > 0){ + h += '
📋 已有账号 ('+accounts.length+')
'; + h += '
'; + h += ''+ + ''+ + ''+ + ''+''+ + ''+ + ''+ + ''+ + ''+ + ''; + accounts.forEach(function(cfg){ + var label = CLOUD_TYPES.find(function(ct){ return ct.type===cfg.cloud_type; }); + var icon = (label||{}).icon||'⬜'; + var active = cfg.is_active===1||cfg.is_active===true; + var ck = cfg.verification_status==='valid'?'✅':(cfg.verification_status==='invalid'?'❌':'⏳'); + h += ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''; + }); + h += '
📱推广平台推广平台账号网盘昵称网盘UID验证空间转存操作
'+iconHtml(icon,18)+(label||{}).label+''+(cfg.promotion_account||'—')+''+(cfg.nickname||cfg.cloud_type)+''+(cfg.cookie_uid||cfg.cloud_type)+''+ck+''+(cfg.storage_used||cfg.storage_total?'💾 '+(cfg.storage_used||'?')+'/'+(cfg.storage_total||'?'):'—')+''+(cfg.total_saves?'转存'+cfg.total_saves+'次':'—')+''+ + ''+ + ''+ + '
'; + } + // No accounts yet — show add button + if(accounts.length === 0){ + h += '
📋 已有账号 (0)

还没有添加任何网盘账号

'; + } + + // Modal dialog + h += ''; + + c.innerHTML = h; +} + diff --git a/source_clean/frontend/admin/js/cloud/cloud-render.js.bak3 b/source_clean/frontend/admin/js/cloud/cloud-render.js.bak3 new file mode 100644 index 0000000..614e944 --- /dev/null +++ b/source_clean/frontend/admin/js/cloud/cloud-render.js.bak3 @@ -0,0 +1,92 @@ +function renderCloudPage(c, accounts){ + accounts = accounts || []; + var h = ''; + + // Render icon: URL → , emoji/text → plain text + function iconHtml(icon, size){ + if(!icon) return ''; + if(icon.indexOf('/')===0 || icon.indexOf('http')===0){ + return ''; + } + return ''+icon+''; + } + + // Toggle grid + h += '
⚡ 搜索网盘类型控制
'+ + '

控制搜索引擎检索哪些网盘类型的资源

'+ + '
'; + CLOUD_TYPES.forEach(function(ct){ + var on = __cloudToggles[ct.type]; + h += '
'+ + ''+iconHtml(ct.icon,20)+' '+ct.label+''+ + ''+ + '
'; + }); + h += '
'; + + // Account list — table style + if(accounts.length > 0){ + h += '
📋 已有账号 ('+accounts.length+')
'; + h += '
'; + h += ''+ + ''+ + ''+ + ''+''+ + ''+ + ''+ + ''+ + ''+ + ''; + accounts.forEach(function(cfg){ + var label = CLOUD_TYPES.find(function(ct){ return ct.type===cfg.cloud_type; }); + var icon = (label||{}).icon||'⬜'; + var active = cfg.is_active===1||cfg.is_active===true; + var ck = cfg.verification_status==='valid'?'✅':(cfg.verification_status==='invalid'?'❌':'—'); + h += ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''+ + ''; + }); + h += '
📱推广平台推广平台账号网盘昵称网盘UID验证空间转存操作
'+iconHtml(icon,18)+(label||{}).label+''+(cfg.promotion_account||'—')+''+(cfg.nickname||cfg.cloud_type)+''+(cfg.cookie_uid||cfg.cloud_type)+''+ck+''+(cfg.storage_used||cfg.storage_total?'💾 '+(cfg.storage_used||'?')+'/'+(cfg.storage_total||'?'):'—')+''+(cfg.total_saves?'转存'+cfg.total_saves+'次':'—')+''+ + ''+ + ''+ + '
'; + } + // No accounts yet — show add button + if(accounts.length === 0){ + h += '
📋 已有账号 (0)

还没有添加任何网盘账号

'; + } + + // Modal dialog + h += ''; + + c.innerHTML = h; +} + diff --git a/source_clean/frontend/assets/AdminDashboard-CYT9FxBx.js b/source_clean/frontend/assets/AdminDashboard-CYT9FxBx.js new file mode 100644 index 0000000..af7416a --- /dev/null +++ b/source_clean/frontend/assets/AdminDashboard-CYT9FxBx.js @@ -0,0 +1,39 @@ +import{x as qu,m as $_,h as Ce,B as Hg,d as q_,o as K_,a as Tt,c as Nt,J as ml,K as _l,b as Q,F as Vr,r as Gr,f as $t,w as qt,e as Oe,v as Ka,j as Hr,i as Q_,t as wt,n as Nc,y as Ei,l as zc,p as J_,E as j_,u as t1}from"./index-C5b4pIQL.js";import{a as e1,h as r1,c as i1,i as n1,t as a1,_ as o1}from"./_plugin-vue_export-helper-CzL5NdOX.js";import s1 from"./CloudConfig-VN8uR29R.js";import l1 from"./SystemConfig-DRttMhxK.js";import u1 from"./SaveRecords-AwnaSQhs.js";import"./index-Bz21yOih.js";import"./CloudBadge-sfzDTvGE.js";import"./browser-JP79f-a9.js";/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var Ku=function(r,t){return Ku=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])},Ku(r,t)};function F(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ku(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var f1=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),h1=function(){function r(){this.browser=new f1,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),et=new h1;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(et.wxa=!0,et.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?et.worker=!0:!et.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(et.node=!0,et.svgSupported=!0):c1(navigator.userAgent,et);function c1(r,t){var e=t.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(e.firefox=!0,e.version=i[1]),n&&(e.ie=!0,e.version=n[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in l||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}}var gh=12,v1="sans-serif",Rr=gh+"px "+v1,d1=20,p1=100,g1="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function y1(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e=0)s=o*e.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return t.clearMarkers=function(){T(e,function(f){f.parentNode&&f.parentNode.removeChild(f)})},e}function H1(r,t,e){for(var i=e?"invTrans":"trans",n=t[i],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),h=2*u,c=f.left,v=f.top;o.push(c,v),l=l&&a&&c===a[h]&&v===a[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(t.srcCoords=o,t[i]=e?Hc(s,o):Hc(o,s))}function Kg(r){return r.nodeName.toUpperCase()==="CANVAS"}var W1=/([&<>"'])/g,U1={"&":"&","<":"<",">":">",'"':""","'":"'"};function Qt(r){return r==null?"":(r+"").replace(W1,function(t,e){return U1[e]})}var Y1=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,wl=[],X1=et.browser.firefox&&+et.browser.version.split(".")[0]<39;function rf(r,t,e,i){return e=e||{},i?Wc(r,t,e):X1&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):Wc(r,t,e),e}function Wc(r,t,e){if(et.domSupported&&r.getBoundingClientRect){var i=t.clientX,n=t.clientY;if(Kg(r)){var a=r.getBoundingClientRect();e.zrX=i-a.left,e.zrY=n-a.top;return}else if(ef(wl,r,i,n)){e.zrX=wl[0],e.zrY=wl[1];return}}e.zrX=e.zrY=0}function xh(r){return r||window.event}function ce(r,t,e){if(t=xh(t),t.zrX!=null)return t;var i=t.type,n=i&&i.indexOf("touch")>=0;if(n){var o=i!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&rf(r,o,t,e)}else{rf(r,t,t,e);var a=Z1(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&Y1.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function Z1(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,i=r.deltaY;if(e==null||i==null)return t;var n=Math.abs(i!==0?i:e),a=i>0?-1:i<0?1:e>0?-1:1;return 3*n*a}function $1(r,t,e,i){r.addEventListener(t,e,i)}function q1(r,t,e,i){r.removeEventListener(t,e,i)}var fs=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0},K1=function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,s=n.length;o1&&i&&i.length>1){var a=Uc(i)/Uc(n);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Q1(i);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function ur(){return[1,0,0,1,0,0]}function Th(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Qg(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function ra(r,t,e){var i=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],a=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=i,r[1]=n,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function nf(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Ch(r,t,e,i){i===void 0&&(i=[0,0]);var n=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],f=Math.sin(e),h=Math.cos(e);return r[0]=n*h+s*f,r[1]=-n*f+s*h,r[2]=a*h+l*f,r[3]=-a*f+h*l,r[4]=h*(o-i[0])+f*(u-i[1])+i[0],r[5]=h*(u-i[1])-f*(o-i[0])+i[1],r}function J1(r,t,e){var i=e[0],n=e[1];return r[0]=t[0]*i,r[1]=t[1]*n,r[2]=t[2]*i,r[3]=t[3]*n,r[4]=t[4]*i,r[5]=t[5]*n,r}function Na(r,t){var e=t[0],i=t[2],n=t[4],a=t[1],o=t[3],s=t[5],l=e*o-a*i;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-i*l,r[3]=e*l,r[4]=(i*s-o*n)*l,r[5]=(a*n-e*s)*l,r):null}var dt=function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,i=this.y;return this.x=t[0]*e+t[2]*i+t[4],this.y=t[1]*e+t[3]*i+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,i){t.x=e,t.y=i},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},r.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},r.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},r.scaleAndAdd=function(t,e,i,n){t.x=e.x+i.x*n,t.y=e.y+i.y*n},r.lerp=function(t,e,i,n){var a=1-n;t.x=a*e.x+n*i.x,t.y=a*e.y+n*i.y},r}(),pi=Math.min,an=Math.max,af=Math.abs,Yc=["x","y"],j1=["width","height"],Wr=new dt,Ur=new dt,Yr=new dt,Xr=new dt,ae=Jg(),Zn=ae.minTv,of=ae.maxTv,ia=[0,0],it=function(){function r(t,e,i,n){r.set(this,t,e,i,n)}return r.set=function(t,e,i,n,a){return n<0&&(e=e+n,n=-n),a<0&&(i=i+a,a=-a),t.x=e,t.y=i,t.width=n,t.height=a,t},r.prototype.union=function(t){var e=pi(t.x,this.x),i=pi(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=an(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=an(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,i=t.width/e.width,n=t.height/e.height,a=ur();return nf(a,a,[-e.x,-e.y]),J1(a,a,[i,n]),nf(a,a,[t.x,t.y]),a},r.prototype.intersect=function(t,e,i){return r.intersect(this,t,e,i)},r.intersect=function(t,e,i,n){i&&dt.set(i,0,0);var a=n&&n.outIntersectRect||null,o=n&&n.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!e)return!1;t instanceof r||(t=r.set(tS,t.x,t.y,t.width,t.height)),e instanceof r||(e=r.set(eS,e.x,e.y,e.width,e.height));var s=!!i;ae.reset(n,s);var l=ae.touchThreshold,u=t.x+l,f=t.x+t.width-l,h=t.y+l,c=t.y+t.height-l,v=e.x+l,d=e.x+e.width-l,p=e.y+l,y=e.y+e.height-l;if(u>f||h>c||v>d||p>y)return!1;var g=!(f=t.x&&e<=t.x+t.width&&i>=t.y&&i<=t.y+t.height},r.prototype.contain=function(t,e){return r.contain(this,t,e)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},r.applyTransform=function(t,e,i){if(!i){t!==e&&r.copy(t,e);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],o=i[4],s=i[5];t.x=e.x*n+o,t.y=e.y*a+s,t.width=e.width*n,t.height=e.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Wr.x=Yr.x=e.x,Wr.y=Xr.y=e.y,Ur.x=Xr.x=e.x+e.width,Ur.y=Yr.y=e.y+e.height,Wr.transform(i),Xr.transform(i),Ur.transform(i),Yr.transform(i),t.x=pi(Wr.x,Ur.x,Yr.x,Xr.x),t.y=pi(Wr.y,Ur.y,Yr.y,Xr.y);var l=an(Wr.x,Ur.x,Yr.x,Xr.x),u=an(Wr.y,Ur.y,Yr.y,Xr.y);t.width=l-t.x,t.height=u-t.y},r}(),tS=new it(0,0,0,0),eS=new it(0,0,0,0);function Xc(r,t,e,i,n,a,o,s){var l=af(t-e),u=af(i-r),f=pi(l,u),h=Yc[n],c=Yc[1-n],v=j1[n];t=u||!ae.bidirectional)&&(Zn[h]=-u,Zn[c]=0,ae.useDir&&ae.calcDirMTV())))}function Jg(){var r=0,t=new dt,e=new dt,i={minTv:new dt,maxTv:new dt,useDir:!1,dirMinTv:new dt,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){i.touchThreshold=0,a&&a.touchThreshold!=null&&(i.touchThreshold=an(0,a.touchThreshold)),i.negativeSize=!1,o&&(i.minTv.set(1/0,1/0),i.maxTv.set(0,0),i.useDir=!1,a&&a.direction!=null&&(i.useDir=!0,i.dirMinTv.copy(i.minTv),e.copy(i.minTv),r=a.direction,i.bidirectional=a.bidirectional==null||!!a.bidirectional,i.bidirectional||t.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var a=i.minTv,o=i.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(r),u=Math.cos(r),f=l*a.y+u*a.x;if(n(f)){n(a.x)&&n(a.y)&&o.set(0,0);return}if(e.x=s*u/f,e.y=s*l/f,n(e.x)&&n(e.y)){o.set(0,0);return}(i.bidirectional||t.dot(e)>0)&&e.len()=0;h--){var c=a[h];c!==n&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(Tl.copy(c.getBoundingRect()),c.transform&&Tl.applyTransform(c.transform),Tl.intersect(f)&&s.push(c))}if(s.length)for(var v=4,d=Math.PI/12,p=Math.PI*2,y=0;y4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function oS(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var i=r,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(t,e))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s?i.ignoreHostSilent?null:s:i.parent}return n?jg:!0}return!1}function Zc(r,t,e,i,n){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==n&&!o.ignore&&(s=oS(o,e,i))&&(!t.topTarget&&(t.topTarget=o),s!==jg)){t.target=o;break}}}function ey(r,t,e){var i=r.painter;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}var ry=32,An=7;function sS(r){for(var t=0;r>=ry;)t|=r&1,r>>=1;return r+t}function $c(r,t,e,i){var n=t+1;if(n===e)return 1;if(i(r[n++],r[t])<0){for(;n=0;)n++;return n-t}function lS(r,t,e){for(e--;t>>1,n(a,r[l])<0?s=l:o=l+1;var u=i-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function Cl(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])>0){for(s=i-n;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o>>1);a(r,t[e+f])>0?o=f+1:l=f}return l}function Ml(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])<0){for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=i-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o>>1);a(r,t[e+f])<0?l=f:o=f+1}return l}function uS(r,t){var e=An,i,n,a=0,o=[];i=[],n=[];function s(v,d){i[a]=v,n[a]=d,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&n[v-1]<=n[v]+n[v+1]||v>=2&&n[v-2]<=n[v]+n[v-1])n[v-1]n[v+1])break;f(v)}}function u(){for(;a>1;){var v=a-2;v>0&&n[v-1]=An||x>=An);if(C)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),d===1){for(g=0;g=0;g--)r[w+g]=r[b+g];r[S]=o[_];return}for(var x=e;;){var C=0,D=0,A=!1;do if(t(o[_],r[m])<0){if(r[S--]=r[m--],C++,D=0,--d===0){A=!0;break}}else if(r[S--]=o[_--],D++,C=0,--y===1){A=!0;break}while((C|D)=0;g--)r[w+g]=r[b+g];if(d===0){A=!0;break}}if(r[S--]=o[_--],--y===1){A=!0;break}if(D=y-Cl(r[m],o,0,y,y-1,t),D!==0){for(S-=D,_-=D,y-=D,w=S+1,b=_+1,g=0;g=An||D>=An);if(A)break;x<0&&(x=0),x+=2}if(e=x,e<1&&(e=1),y===1){for(S-=d,m-=d,w=S+1,b=m+1,g=d-1;g>=0;g--)r[w+g]=r[b+g];r[S]=o[_]}else{if(y===0)throw new Error;for(b=S-(y-1),g=0;gs&&(l=s),qc(r,e,e+l,e+a,t),a=l}o.pushRun(e,a),o.mergeRuns(),n-=a,e+=a}while(n!==0);o.forceMergeRuns()}}var oe=1,$n=2,tn=4,Kc=!1;function Dl(){Kc||(Kc=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Qc(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var fS=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Qc}return r.prototype.traverse=function(t,e){for(var i=0;i=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),hs;hs=et.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var na={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)))},elasticOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-na.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?na.bounceIn(r*2)*.5:na.bounceOut(r*2-1)*.5+.5}},Ja=Math.pow,Lr=Math.sqrt,cs=1e-8,iy=1e-4,Jc=Lr(3),ja=1/3,Ge=wn(),pe=wn(),hn=wn();function Mr(r){return r>-cs&&rcs||r<-cs}function zt(r,t,e,i,n){var a=1-n;return a*a*(a*r+3*n*t)+n*n*(n*i+3*a*e)}function jc(r,t,e,i,n){var a=1-n;return 3*(((t-r)*a+2*(e-t)*n)*a+(i-e)*n*n)}function vs(r,t,e,i,n,a){var o=i+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-n,f=s*s-3*o*l,h=s*l-9*o*u,c=l*l-3*s*u,v=0;if(Mr(f)&&Mr(h))if(Mr(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[v++]=d)}else{var p=h*h-4*f*c;if(Mr(p)){var y=h/f,d=-s/o+y,g=-y/2;d>=0&&d<=1&&(a[v++]=d),g>=0&&g<=1&&(a[v++]=g)}else if(p>0){var m=Lr(p),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-Ja(-_,ja):_=Ja(_,ja),S<0?S=-Ja(-S,ja):S=Ja(S,ja);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(a[v++]=d)}else{var b=(2*f*s-3*o*h)/(2*Lr(f*f*f)),w=Math.acos(b)/3,x=Lr(f),C=Math.cos(w),d=(-s-2*x*C)/(3*o),g=(-s+x*(C+Jc*Math.sin(w)))/(3*o),D=(-s+x*(C-Jc*Math.sin(w)))/(3*o);d>=0&&d<=1&&(a[v++]=d),g>=0&&g<=1&&(a[v++]=g),D>=0&&D<=1&&(a[v++]=D)}}return v}function ay(r,t,e,i,n){var a=6*e-12*t+6*r,o=9*t+3*i-3*r-9*e,s=3*t-3*r,l=0;if(Mr(o)){if(ny(a)){var u=-s/a;u>=0&&u<=1&&(n[l++]=u)}}else{var f=a*a-4*o*s;if(Mr(f))n[0]=-a/(2*o);else if(f>0){var h=Lr(f),u=(-a+h)/(2*o),c=(-a-h)/(2*o);u>=0&&u<=1&&(n[l++]=u),c>=0&&c<=1&&(n[l++]=c)}}return l}function ds(r,t,e,i,n,a){var o=(t-r)*n+r,s=(e-t)*n+t,l=(i-e)*n+e,u=(s-o)*n+o,f=(l-s)*n+s,h=(f-u)*n+u;a[0]=r,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=f,a[6]=l,a[7]=i}function hS(r,t,e,i,n,a,o,s,l,u,f){var h,c=.005,v=1/0,d,p,y,g;Ge[0]=l,Ge[1]=u;for(var m=0;m<1;m+=.05)pe[0]=zt(r,e,n,o,m),pe[1]=zt(t,i,a,s,m),y=fn(Ge,pe),y=0&&y=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*a*s;if(Mr(f)){var u=-o/(2*a);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var h=Lr(f),u=(-o+h)/(2*a),c=(-o-h)/(2*a);u>=0&&u<=1&&(n[l++]=u),c>=0&&c<=1&&(n[l++]=c)}}return l}function oy(r,t,e){var i=r+e-2*t;return i===0?.5:(r-t)/i}function ps(r,t,e,i,n){var a=(t-r)*i+r,o=(e-t)*i+t,s=(o-a)*i+a;n[0]=r,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=e}function dS(r,t,e,i,n,a,o,s,l){var u,f=.005,h=1/0;Ge[0]=o,Ge[1]=s;for(var c=0;c<1;c+=.05){pe[0]=Jt(r,e,n,c),pe[1]=Jt(t,i,a,c);var v=fn(Ge,pe);v=0&&v=1?1:vs(0,i,a,1,l,s)&&zt(0,n,o,1,s[0])}}}var yS=function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||ee,this.ondestroy=t.ondestroy||ee,this.onrestart=t.onrestart||ee,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var i=this._life,n=t-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=n%i;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=tt(t)?t:na[t]||sy(t)},r}(),ly=function(){function r(t){this.value=t}return r}(),mS=function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new ly(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),dn=function(){function r(t){this._list=new mS,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var i=this._list,n=this._map,a=null;if(n[t]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new ly(e),s.key=t,i.insertEntry(s),n[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],i=this._list;if(e!=null)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),ev={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ir(r){return r=Math.round(r),r<0?0:r>255?255:r}function sf(r){return r<0?0:r>1?1:r}function Al(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Ir(parseFloat(t)/100*255):Ir(parseInt(t,10))}function _i(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?sf(parseFloat(t)/100):sf(parseFloat(t))}function Ll(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function to(r,t,e){return r+(t-r)*e}function he(r,t,e,i,n){return r[0]=t,r[1]=e,r[2]=i,r[3]=n,r}function lf(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var uy=new dn(20),eo=null;function Bi(r,t){eo&&lf(eo,t),eo=uy.put(r,eo||t.slice())}function Xe(r,t){if(r){t=t||[];var e=uy.get(r);if(e)return lf(t,e);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in ev)return lf(t,ev[i]),Bi(r,t),t;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){he(t,0,0,0,1);return}return he(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),Bi(r,t),t}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){he(t,0,0,0,1);return}return he(t,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),Bi(r,t),t}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===n){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?he(t,+u[0],+u[1],+u[2],1):he(t,0,0,0,1);f=_i(u.pop());case"rgb":if(u.length>=3)return he(t,Al(u[0]),Al(u[1]),Al(u[2]),u.length===3?f:_i(u[3])),Bi(r,t),t;he(t,0,0,0,1);return;case"hsla":if(u.length!==4){he(t,0,0,0,1);return}return u[3]=_i(u[3]),uf(u,t),Bi(r,t),t;case"hsl":if(u.length!==3){he(t,0,0,0,1);return}return uf(u,t),Bi(r,t),t;default:return}}he(t,0,0,0,1)}}function uf(r,t){var e=(parseFloat(r[0])%360+360)%360/360,i=_i(r[1]),n=_i(r[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return t=t||[],he(t,Ir(Ll(o,a,e+1/3)*255),Ir(Ll(o,a,e)*255),Ir(Ll(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function _S(r){if(r){var t=r[0]/255,e=r[1]/255,i=r[2]/255,n=Math.min(t,e,i),a=Math.max(t,e,i),o=a-n,s=(a+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+n):u=o/(2-a-n);var f=((a-t)/6+o/2)/o,h=((a-e)/6+o/2)/o,c=((a-i)/6+o/2)/o;t===a?l=c-h:e===a?l=1/3+f-c:i===a&&(l=2/3+h-f),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return r[3]!=null&&v.push(r[3]),v}}function rv(r,t){var e=Xe(r);if(e){for(var i=0;i<3;i++)e[i]=e[i]*(1-t)|0,e[i]>255?e[i]=255:e[i]<0&&(e[i]=0);return za(e,e.length===4?"rgba":"rgb")}}function SS(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=Xe(t[n]),s=Xe(t[a]),l=i-n,u=za([Ir(to(o[0],s[0],l)),Ir(to(o[1],s[1],l)),Ir(to(o[2],s[2],l)),sf(to(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:n,rightIndex:a,value:i}:u}}function ff(r,t,e,i){var n=Xe(r);if(r)return n=_S(n),e!=null&&(n[1]=_i(tt(e)?e(n[1]):e)),i!=null&&(n[2]=_i(tt(i)?i(n[2]):i)),za(uf(n),"rgba")}function za(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function gs(r,t){var e=Xe(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var iv=new dn(100);function nv(r){if(Y(r)){var t=iv.get(r);return t||(t=rv(r,-.1),iv.put(r,t)),t}else if(Zs(r)){var e=z({},r);return e.colorStops=Z(r.colorStops,function(i){return{offset:i.offset,color:rv(i.color,-.1)}}),e}return r}function bS(r){return r.type==="linear"}function wS(r){return r.type==="radial"}(function(){return et.hasGlobalWindow&&tt(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})();var hf=Array.prototype.slice;function ar(r,t,e){return(t-r)*e+r}function Il(r,t,e,i){for(var n=t.length,a=0;ai?t:r,a=Math.min(e,i),o=n[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)i.length=o;else for(var l=a;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,i){this._needsSort=!0;var n=this.keyframes,a=n.length,o=!1,s=ov,l=e;if(re(e)){var u=MS(e);s=u,(u===1&&!pt(e[0])||u===2&&!pt(e[0][0]))&&(o=!0)}else if(pt(e)&&!pa(e))s=io;else if(Y(e))if(!isNaN(+e))s=io;else{var f=Xe(e);f&&(l=f,s=qn)}else if(Zs(e)){var h=z({},l);h.colorStops=Z(e.colorStops,function(v){return{offset:v.offset,color:Xe(v.color)}}),bS(e)?s=cf:wS(e)&&(s=vf),l=h}a===0?this.valType=s:(s!==this.valType||s===ov)&&(o=!0),this.discrete=this.discrete||o;var c={time:t,value:l,rawValue:e,percent:0};return i&&(c.easing=i,c.easingFunc=tt(i)?i:na[i]||sy(i)),n.push(c),c},r.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort(function(p,y){return p.time-y.time});for(var n=this.valType,a=i.length,o=i[a-1],s=this.discrete,l=no(n),u=sv(n),f=0;f=0&&!(o[f].percent<=e);f--);f=c(f,s-2)}else{for(f=h;fe);f++);f=c(f-1,s-2)}d=o[f+1],v=o[f]}if(v&&d){this._lastFr=f,this._lastFrP=e;var y=d.percent-v.percent,g=y===0?1:c((e-v.percent)/y,1);d.easingFunc&&(g=d.easingFunc(g));var m=i?this._additiveValue:u?Ln:t[l];if((no(a)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=g<1?v.rawValue:d.rawValue;else if(no(a))a===Qo?Il(m,v[n],d[n],g):xS(m,v[n],d[n],g);else if(sv(a)){var _=v[n],S=d[n],b=a===cf;t[l]={type:b?"linear":"radial",x:ar(_.x,S.x,g),y:ar(_.y,S.y,g),colorStops:Z(_.colorStops,function(x,C){var D=S.colorStops[C];return{offset:ar(x.offset,D.offset,g),color:Ko(Il([],x.color,D.color,g))}}),global:S.global},b?(t[l].x2=ar(_.x2,S.x2,g),t[l].y2=ar(_.y2,S.y2,g)):t[l].r=ar(_.r,S.r,g)}else if(u)Il(m,v[n],d[n],g),i||(t[l]=Ko(m));else{var w=ar(v[n],d[n],g);i?this._additiveValue=w:t[l]=w}i&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,i=this.propName,n=this._additiveValue;e===io?t[i]=t[i]+n:e===qn?(Xe(t[i],Ln),ro(Ln,Ln,n,1),t[i]=Ko(Ln)):e===Qo?ro(t[i],t[i],n,1):e===fy&&av(t[i],t[i],n,1)},r}(),Mh=function(){function r(t,e,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n){_h("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,i){return this.whenWithKeys(t,e,xt(e),i)},r.prototype.whenWithKeys=function(t,e,i,n){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,qo(u),n),this._trackKeys.push(s)}l.addKeyframe(t,qo(e[s]),n)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,i=0;i0)){this._started=1;for(var e=this,i=[],n=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,t[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}();function on(){return new Date().getTime()}var AS=function(r){F(t,r);function t(e){var i=r.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,e=e||{},i.stage=e.stage||{},i}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var i=e.getClip();i&&this.addClip(i)},t.prototype.removeClip=function(e){if(e.animation){var i=e.prev,n=e.next;i?i.next=n:this._head=n,n?n.prev=i:this._tail=i,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var i=e.getClip();i&&this.removeClip(i),e.animation=null},t.prototype.update=function(e){for(var i=on()-this._pausedTime,n=i-this._time,a=this._head;a;){var o=a.next,s=a.step(i,n);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=i,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function i(){e._running&&(hs(i),!e._paused&&e.update())}hs(i)},t.prototype.start=function(){this._running||(this._time=on(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=on(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=on()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var i=e.next;e.prev=e.next=e.animation=null,e=i}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,i){i=i||{},this.start();var n=new Mh(e,i.loop);return this.addAnimator(n),n},t}(je),LS=300,Pl=et.domSupported,kl=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=Z(r,function(n){var a=n.replace("mouse","pointer");return e.hasOwnProperty(a)?a:n});return{mouse:r,touch:t,pointer:i}}(),lv={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},uv=!1;function df(r){var t=r.pointerType;return t==="pen"||t==="touch"}function IS(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Rl(r){r&&(r.zrByTouch=!0)}function PS(r,t){return ce(r.dom,new kS(r,t),!0)}function hy(r,t){for(var e=t,i=!1;e&&e.nodeType!==9&&!(i=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return i}var kS=function(){function r(t,e){this.stopPropagation=ee,this.stopImmediatePropagation=ee,this.preventDefault=ee,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r}(),De={mousedown:function(r){r=ce(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=ce(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=ce(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=ce(this.dom,r);var t=r.toElement||r.relatedTarget;hy(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){uv=!0,r=ce(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){uv||(r=ce(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=ce(this.dom,r),Rl(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),De.mousemove.call(this,r),De.mousedown.call(this,r)},touchmove:function(r){r=ce(this.dom,r),Rl(r),this.handler.processGesture(r,"change"),De.mousemove.call(this,r)},touchend:function(r){r=ce(this.dom,r),Rl(r),this.handler.processGesture(r,"end"),De.mouseup.call(this,r),+new Date-+this.__lastTouchMomentcv||r<-cv}var $r=[],Ni=[],Ol=ur(),Bl=Math.abs,Dh=function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return Zr(this.rotation)||Zr(this.x)||Zr(this.y)||Zr(this.scaleX-1)||Zr(this.scaleY-1)||Zr(this.skewX)||Zr(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;if(!(e||t)){i&&(hv(i),this.invTransform=null);return}i=i||ur(),e?this.getLocalTransform(i):hv(i),t&&(e?ra(i,t,i):Qg(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale($r);var i=$r[0]<0?-1:1,n=$r[1]<0?-1:1,a=(($r[0]-i)*e+i)/$r[0]||0,o=(($r[1]-n)*e+n)/$r[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||ur(),Na(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),a=Math.PI/2+n-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(a),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||ur(),ra(Ni,t.invTransform,e),e=Ni);var i=this.originX,n=this.originY;(i||n)&&(Ol[4]=i,Ol[5]=n,ra(Ni,e,Ol),Ni[4]-=i,Ni[5]-=n,e=Ni),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&_e(i,i,n),i},r.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&_e(i,i,n),i},r.prototype.getLineScale=function(){var t=this.transform;return t&&Bl(t[0]-1)>1e-10&&Bl(t[3]-1)>1e-10?Math.sqrt(Bl(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){_f(this,t)},r.getLocalTransform=function(t,e){e=e||[];var i=t.originX||0,n=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,v=t.skewY?Math.tan(-t.skewY):0;if(i||n||s||l){var d=i+s,p=n+l;e[4]=-d*a-c*p*o,e[5]=-p*o-v*d*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=v*a,e[2]=c*o,u&&Ch(e,e,u),e[4]+=i+f,e[5]+=n+h,e},r.initDefaultProps=function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),r}(),ya=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function _f(r,t){for(var e=0;e=vv)){r=r||Rr;for(var t=[],e=+new Date,i=0;i<=127;i++)t[i]=fr.measureText(String.fromCharCode(i),r).width;var n=+new Date-e;return n>16?Nl=vv:n>2&&Nl++,t}}var Nl=0,vv=5;function vy(r,t){return r.asciiWidthMapTried||(r.asciiWidthMap=NS(r.font),r.asciiWidthMapTried=!0),0<=t&&t<=127?r.asciiWidthMap!=null?r.asciiWidthMap[t]:r.asciiCharWidth:r.stWideCharWidth}function $e(r,t){var e=r.strWidthCache,i=e.get(t);return i==null&&(i=fr.measureText(t,r.font).width,e.put(t,i)),i}function dv(r,t,e,i){var n=$e(Ze(t),r),a=qs(t),o=pn(0,n,e),s=Si(0,a,i),l=new it(o,s,n,a);return l}function dy(r,t,e,i){var n=((r||"")+"").split(` +`),a=n.length;if(a===1)return dv(n[0],t,e,i);for(var o=new it(0,0,0,0),s=0;s=0?parseFloat(r)/100*t:parseFloat(r):r}function ms(r,t,e){var i=t.position||"inside",n=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,l=e.x,u=e.y,f="left",h="top";if(i instanceof Array)l+=Er(i[0],e.width),u+=Er(i[1],e.height),f=null,h=null;else switch(i){case"left":l-=n,u+=s,f="right",h="middle";break;case"right":l+=n+o,u+=s,h="middle";break;case"top":l+=o/2,u-=n,f="center",h="bottom";break;case"bottom":l+=o/2,u+=a+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=n,u+=s,h="middle";break;case"insideRight":l+=o-n,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=a-n,f="center",h="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=a-n,h="bottom";break;case"insideBottomRight":l+=o-n,u+=a-n,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var zl="__zr_normal__",Fl=ya.concat(["ignore"]),zS=bn(ya,function(r,t){return r[t]=!0,r},{ignore:!1}),zi={},FS=new it(0,0,0,0),oo=[],Ks=function(){function r(t){this.id=Yg(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=e.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=n?this:null;var u=!1;a.copyTransform(e);var f=i.position!=null,h=i.autoOverflowArea,c=void 0;if((h||f)&&(c=FS,i.layoutRect?c.copy(i.layoutRect):c.copy(this.getBoundingRect()),n||c.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(zi,i,c):ms(zi,i,c),a.x=zi.x,a.y=zi.y,o=zi.align,s=zi.verticalAlign;var v=i.origin;if(v&&i.rotation!=null){var d=void 0,p=void 0;v==="center"?(d=c.width*.5,p=c.height*.5):(d=Er(v[0],c.width),p=Er(v[1],c.height)),u=!0,a.originX=-a.x+d+(n?0:c.x),a.originY=-a.y+p+(n?0:c.y)}}i.rotation!=null&&(a.rotation=i.rotation);var y=i.offset;y&&(a.x+=y[0],a.y+=y[1],u||(a.originX=-y[0],a.originY=-y[1]));var g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(h){var m=g.overflowRect=g.overflowRect||new it(0,0,0,0);a.getLocalTransform(oo),Na(oo,oo),it.copy(m,c),m.applyTransform(oo)}else g.overflowRect=null;var _=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,S=void 0,b=void 0,w=void 0;_&&this.canBeInsideText()?(S=i.insideFill,b=i.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(S),w=!0)):(S=i.outsideFill,b=i.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(S),w=!0)),S=S||"#000",(S!==g.fill||b!==g.stroke||w!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=S,g.stroke=b,g.autoStroke=w,g.align=o,g.verticalAlign=s,e.setDefaultTextStyle(g)),e.__dirty|=oe,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?mf:yf},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i=typeof e=="string"&&Xe(e);i||(i=[255,255,255,1]);for(var n=i[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*n+(a?0:255)*(1-n);return i[3]=1,za(i,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},z(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(q(t))for(var i=t,n=xt(i),a=0;a0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(zl,!1,t)},r.prototype.useState=function(t,e,i,n){var a=t===zl,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(ot(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){_h("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!i&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,c=this._textGuide;return h&&h.useState(t,e,i,f),c&&c.useState(t,e,i,f),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~oe),u}}},r.prototype.useStates=function(t,e,i){if(!t.length)this.clearStates();else{var n=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l0,d);var p=this._textContent,y=this._textGuide;p&&p.useStates(t,e,c),y&&y.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~oe)}},r.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var e=t.__hostTarget;t=e?t.ignoreHostSilent?null:e:t.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},r.prototype.replaceState=function(t,e,i){var n=this.currentStates.slice(),a=ot(n,t),o=ot(n,e)>=0;a>=0?o?n.splice(a,1):n[a]=e:i&&!o&&n.push(e),this.useStates(n)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},i,n=0;n=0&&a.splice(o,1)}),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var i=this.animators,n=i.length,a=[],o=0;o0&&e.during&&a[0].during(function(d,p){e.during(p)});for(var c=0;c0||n.force&&!o.length){var C=void 0,D=void 0,A=void 0;if(s){D={},c&&(C={});for(var S=0;S<_;S++){var g=p[S];D[g]=e[g],c?C[g]=i[g]:e[g]=i[g]}}else if(c){A={};for(var S=0;S<_;S++){var g=p[S];A[g]=qo(e[g]),GS(e,i,g)}}var b=new Mh(e,!1,!1,h?It(d,function(I){return I.targetName===t}):null);b.targetName=t,n.scope&&(b.scope=n.scope),c&&C&&b.whenWithKeys(0,C,p),A&&b.whenWithKeys(0,A,p),b.whenWithKeys(u??500,s?D:i,p).delay(f||0),r.addAnimator(b,t),o.push(b)}}var Mt=function(r){F(t,r);function t(e){var i=r.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var i=this._children,n=0;n=0&&(n.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,i){var n=ot(this._children,e);return n>=0&&this.replaceAt(i,n),this},t.prototype.replaceAt=function(e,i){var n=this._children,a=n[i];if(e&&e!==this&&e.parent!==this&&e!==a){n[i]=e,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var i=this.__zr;i&&i!==e.__zr&&e.addSelfToZr(i),i&&i.refresh()},t.prototype.remove=function(e){var i=this.__zr,n=this._children,a=ot(n,e);return a<0?this:(n.splice(a,1),e.parent=null,i&&e.removeSelfFromZr(i),i&&i.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,i=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,i){return this._disposed||this.handler.on(t,e,i),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(r<=n)return o;if(r>=a)return s}else{if(r>=n)return o;if(r<=a)return s}else{if(r===n)return o;if(r===a)return s}return(r-n)/l*u+o}var Pt=qS;function qS(r,t,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Sf(r,t,e)}function Sf(r,t,e){return Y(r)?$S(r).match(/%$/)?parseFloat(r)/100*t+(e||0):parseFloat(r):r==null?NaN:+r}function Ot(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),yy),r=(+r).toFixed(t),e?r:+r}function Kn(r){return r.sort(function(t,e){return t-e}),r}function Ue(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return KS(r)}function KS(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),i=e>0?+t.slice(e+1):0,n=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:n-1-a;return Math.max(0,o-i)}function my(r,t){var e=Math.log,i=Math.LN10,n=Math.floor(e(r[1]-r[0])/i),a=Math.round(e(We(t[1]-t[0]))/i),o=Math.min(Math.max(-n+a,0),20);return isFinite(o)?o:20}function QS(r,t){var e=Math.max(Ue(r),Ue(t)),i=r+t;return e>yy?i:Ot(i,e)}function _y(r){var t=Math.PI*2;return(r%t+t)%t}function _s(r){return r>-gv&&r=10&&t++,t}function Sy(r,t){var e=Ah(r),i=Math.pow(10,e),n=r/i,a;return n<1.5?a=1:n<2.5?a=2:n<4?a=3:n<7?a=5:a=10,r=a*i,e>=-20?+r.toFixed(e<0?-e:0):r}function Ss(r){var t=parseFloat(r);return t==r&&(t!==0||!Y(r)||r.indexOf("x")<=0)?t:NaN}function tb(r){return!isNaN(Ss(r))}function by(){return Math.round(Math.random()*9)}function wy(r,t){return t===0?r:wy(t,r%t)}function yv(r,t){return r==null?t:t==null?r:r*t/wy(r,t)}var eb="[ECharts] ",rb=typeof console<"u"&&console.warn&&console.log;function ib(r,t,e){rb&&console[r](eb+t)}function xy(r,t){ib("error",r)}function jt(r){throw new Error(r)}function mv(r,t,e){return(t-r)*e+r}var Ty="series\0",nb="\0_ec_\0";function Xt(r){return r instanceof Array?r:r==null?[]:[r]}function bf(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var i=0,n=e.length;i=0||a&&ot(a,l)<0)){var u=i.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var Ab=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Lb=Sa(Ab),Ib=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return Lb(this,t,e)},r}(),wf=new dn(50);function Pb(r){if(typeof r=="string"){var t=wf.get(r);return t&&t.image}else return r}function Ly(r,t,e,i,n){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=wf.get(r),o={hostEl:e,cb:i,cbPayload:n};return a?(t=a.image,!Js(t)&&a.pending.push(o)):(t=fr.loadImage(r,Sv,Sv),t.__zrImageSrc=r,wf.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function Sv(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;u++)l-=s;var f=$e(o,e);return f>l&&(e="",f=0),l=r-f,n.ellipsis=e,n.ellipsisWidth=f,n.contentWidth=l,n.containerWidth=r,n}function Py(r,t,e){var i=e.containerWidth,n=e.contentWidth,a=e.fontMeasureInfo;if(!i){r.textLine="",r.isTruncated=!1;return}var o=$e(a,t);if(o<=i){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=n||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?Rb(t,n,a):o>0?Math.floor(t.length*n/o):0;t=t.substr(0,l),o=$e(a,t)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function Rb(r,t,e){for(var i=0,n=0,a=r.length;ny&&v){var _=Math.floor(y/c);d=d||g.length>_,g=g.slice(0,_),m=g.length*c}if(n&&f&&p!=null)for(var S=Iy(p,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),b={},w=0;wd&&Ul(a,o.substring(d,y),t,v),Ul(a,p[2],t,v,p[1]),d=Wl.lastIndex}dh){var H=a.lines.length;I>0?(D.tokens=D.tokens.slice(0,I),x(D,M,A),a.lines=a.lines.slice(0,C+1)):a.lines=a.lines.slice(0,C),a.isTruncated=a.isTruncated||a.lines.length0&&d+i.accumWidth>i.width&&(f=t.split(` +`),u=!0),i.accumWidth=d}else{var p=ky(t,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=p.accumWidth+v,h=p.linesWidths,f=p.lines}}f||(f=t.split(` +`));for(var y=Ze(l),g=0;g=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Fb=bn(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function Vb(r){return zb(r)?!!Fb[r]:!0}function ky(r,t,e,i,n){for(var a=[],o=[],s="",l="",u=0,f=0,h=Ze(t),c=0;ce:n+f+d>e){f?(s||l)&&(p?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=v,u+=d,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=v,f=d)):p?(a.push(l),o.push(u),l=v,u=d):(a.push(v),o.push(d));continue}f+=d,p?(l+=v,u+=d):(l&&(s+=l,l="",u=0),s+=v)}return l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=n),{accumWidth:f,lines:a,linesWidths:o}}function wv(r,t,e,i,n,a){if(r.baseX=e,r.baseY=i,r.outerWidth=r.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;it.set(xv,pn(e,o,n),Si(i,s,a),o,s),it.intersect(t,xv,null,Tv);var l=Tv.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=pn(l.x,l.width,n,!0),r.baseY=Si(l.y,l.height,a,!0)}}var xv=new it(0,0,0,0),Tv={outIntersectRect:{},clamp:!0};function kh(r){return r!=null?r+="":r=""}function Gb(r){var t=kh(r.text),e=r.font,i=$e(Ze(e),t),n=qs(e);return xf(r,i,n,null)}function xf(r,t,e,i){var n=new it(pn(r.x||0,t,r.textAlign),Si(r.y||0,e,r.textBaseline),t,e),a=i??(Ry(r)?r.lineWidth:0);return a>0&&(n.x-=a/2,n.y-=a/2,n.width+=a,n.height+=a),n}function Ry(r){var t=r.stroke;return t!=null&&t!=="none"&&r.lineWidth>0}var Tf="__zr_style_"+Math.round(Math.random()*10),bi={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},js={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};bi[Tf]=!0;var Cv=["z","z2","invisible"],Hb=["invisible"],Ga=function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var i=xt(e),n=0;n1e-4){s[0]=r-e,s[1]=t-i,l[0]=r+e,l[1]=t+i;return}if(so[0]=$l(n)*e+r,so[1]=Zl(n)*i+t,lo[0]=$l(a)*e+r,lo[1]=Zl(a)*i+t,u(s,so,lo),f(l,so,lo),n=n%Kr,n<0&&(n=n+Kr),a=a%Kr,a<0&&(a=a+Kr),n>a&&!o?a+=Kr:nn&&(uo[0]=$l(v)*e+r,uo[1]=Zl(v)*i+t,u(s,uo,s),f(l,uo,l))}var ht={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Qr=[],Jr=[],Be=[],pr=[],Ne=[],ze=[],ql=Math.min,Kl=Math.max,jr=Math.cos,ti=Math.sin,er=Math.abs,Cf=Math.PI,Tr=Cf*2,Ql=typeof Float32Array<"u",In=[];function Jl(r){var t=Math.round(r/Cf*1e8)/1e8;return t%2*Cf}function Zb(r,t){var e=Jl(r[0]);e<0&&(e+=Tr);var i=e-r[0],n=r[1];n+=i,!t&&n-e>=Tr?n=e+Tr:t&&e-n>=Tr?n=e-Tr:!t&&e>n?n=e+(Tr-Jl(e-n)):t&&e0&&(this._ux=er(i/ys/t)||0,this._uy=er(i/ys/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(ht.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var i=er(t-this._xi),n=er(e-this._yi),a=i>this._ux||n>this._uy;if(this.addData(ht.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=i*i+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,i,n,a,o){return this._drawPendingPt(),this.addData(ht.C,t,e,i,n,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,i,n,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,i,n){return this._drawPendingPt(),this.addData(ht.Q,t,e,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,n),this._xi=i,this._yi=n,this},r.prototype.arc=function(t,e,i,n,a,o){this._drawPendingPt(),In[0]=n,In[1]=a,Zb(In,o),n=In[0],a=In[1];var s=a-n;return this.addData(ht.A,t,e,i,i,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=jr(a)*i+t,this._yi=ti(a)*i+e,this},r.prototype.arcTo=function(t,e,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},r.prototype.rect=function(t,e,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,i,n),this.addData(ht.R,t,e,i,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(ht.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&t.closePath(),this._xi=e,this._yi=i,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){if(this._saveData){var e=t.length;!(this.data&&this.data.length===e)&&Ql&&(this.data=new Float32Array(e));for(var i=0;i0&&o))for(var s=0;sf.length&&(this._expandData(),f=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){Be[0]=Be[1]=Ne[0]=Ne[1]=Number.MAX_VALUE,pr[0]=pr[1]=ze[0]=ze[1]=-Number.MAX_VALUE;var t=this.data,e=0,i=0,n=0,a=0,o;for(o=0;oi||er(_)>n||c===e-1)&&(p=Math.sqrt(m*m+_*_),a=y,o=g);break}case ht.C:{var S=t[c++],b=t[c++],y=t[c++],g=t[c++],w=t[c++],x=t[c++];p=cS(a,o,S,b,y,g,w,x,10),a=w,o=x;break}case ht.Q:{var S=t[c++],b=t[c++],y=t[c++],g=t[c++];p=pS(a,o,S,b,y,g,10),a=y,o=g;break}case ht.A:var C=t[c++],D=t[c++],A=t[c++],M=t[c++],I=t[c++],L=t[c++],P=L+I;c+=1,d&&(s=jr(I)*A+C,l=ti(I)*M+D),p=Kl(A,M)*ql(Tr,Math.abs(L)),a=jr(P)*A+C,o=ti(P)*M+D;break;case ht.R:{s=a=t[c++],l=o=t[c++];var k=t[c++],B=t[c++];p=k*2+B*2;break}case ht.Z:{var m=s-a,_=l-o;p=Math.sqrt(m*m+_*_),a=s,o=l;break}}p>=0&&(u[h++]=p,f+=p)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var i=this.data,n=this._ux,a=this._uy,o=this._len,s,l,u,f,h,c,v=e<1,d,p,y=0,g=0,m,_=0,S,b;if(!(v&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,m=e*p,!m)))t:for(var w=0;w0&&(t.lineTo(S,b),_=0),x){case ht.M:s=u=i[w++],l=f=i[w++],t.moveTo(u,f);break;case ht.L:{h=i[w++],c=i[w++];var D=er(h-u),A=er(c-f);if(D>n||A>a){if(v){var M=d[g++];if(y+M>m){var I=(m-y)/M;t.lineTo(u*(1-I)+h*I,f*(1-I)+c*I);break t}y+=M}t.lineTo(h,c),u=h,f=c,_=0}else{var L=D*D+A*A;L>_&&(S=h,b=c,_=L)}break}case ht.C:{var P=i[w++],k=i[w++],B=i[w++],U=i[w++],O=i[w++],H=i[w++];if(v){var M=d[g++];if(y+M>m){var I=(m-y)/M;ds(u,P,B,O,I,Qr),ds(f,k,U,H,I,Jr),t.bezierCurveTo(Qr[1],Jr[1],Qr[2],Jr[2],Qr[3],Jr[3]);break t}y+=M}t.bezierCurveTo(P,k,B,U,O,H),u=O,f=H;break}case ht.Q:{var P=i[w++],k=i[w++],B=i[w++],U=i[w++];if(v){var M=d[g++];if(y+M>m){var I=(m-y)/M;ps(u,P,B,I,Qr),ps(f,k,U,I,Jr),t.quadraticCurveTo(Qr[1],Jr[1],Qr[2],Jr[2]);break t}y+=M}t.quadraticCurveTo(P,k,B,U),u=B,f=U;break}case ht.A:var R=i[w++],E=i[w++],N=i[w++],X=i[w++],J=i[w++],yt=i[w++],Bt=i[w++],ue=!i[w++],xe=N>X?N:X,K=er(N-X)>.001,ut=J+yt,j=!1;if(v){var M=d[g++];y+M>m&&(ut=J+yt*(m-y)/M,j=!0),y+=M}if(K&&t.ellipse?t.ellipse(R,E,N,X,Bt,J,ut,ue):t.arc(R,E,xe,J,ut,ue),j)break t;C&&(s=jr(J)*N+R,l=ti(J)*X+E),u=jr(ut)*N+R,f=ti(ut)*X+E;break;case ht.R:s=u=i[w],l=f=i[w+1],h=i[w++],c=i[w++];var st=i[w++],Fr=i[w++];if(v){var M=d[g++];if(y+M>m){var Wt=m-y;t.moveTo(h,c),t.lineTo(h+ql(Wt,st),c),Wt-=st,Wt>0&&t.lineTo(h+st,c+ql(Wt,Fr)),Wt-=Fr,Wt>0&&t.lineTo(h+Kl(st-Wt,0),c+Fr),Wt-=st,Wt>0&&t.lineTo(h,c+Kl(Fr-Wt,0));break t}y+=M}t.rect(h,c,st,Fr);break;case ht.Z:if(v){var M=d[g++];if(y+M>m){var I=(m-y)/M;t.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break t}y+=M}t.closePath(),u=s,f=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.prototype.canSave=function(){return!!this._saveData},r.CMD=ht,r.initDefaultProps=function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),r}();function Fi(r,t,e,i,n,a,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>t+s&&o>i+s||or+s&&a>e+s||at+h&&f>i+h&&f>a+h&&f>s+h||fr+h&&u>e+h&&u>n+h&&u>o+h||ut+u&&l>i+u&&l>a+u||lr+u&&s>e+u&&s>n+u||se||f+un&&(n+=Pn);var c=Math.atan2(l,s);return c<0&&(c+=Pn),c>=i&&c<=n||c+Pn>=i&&c+Pn<=n}function ei(r,t,e,i,n,a){if(a>t&&a>i||an?s:0}var gr=Mi.CMD,ri=Math.PI*2,Qb=1e-4;function Jb(r,t){return Math.abs(r-t)t&&u>i&&u>a&&u>s||u1&&jb(),v=zt(t,i,a,s,de[0]),c>1&&(d=zt(t,i,a,s,de[1]))),c===2?yt&&s>i&&s>a||s=0&&u<=1){for(var f=0,h=Jt(t,i,a,u),c=0;ce||s<-e)return 0;var l=Math.sqrt(e*e-s*s);Ut[0]=-l,Ut[1]=l;var u=Math.abs(i-n);if(u<1e-4)return 0;if(u>=ri-1e-4){i=0,n=ri;var f=a?1:-1;return o>=Ut[0]+r&&o<=Ut[1]+r?f:0}if(i>n){var h=i;i=n,n=h}i<0&&(i+=ri,n+=ri);for(var c=0,v=0;v<2;v++){var d=Ut[v];if(d+r>o){var p=Math.atan2(s,d),f=a?1:-1;p<0&&(p=ri+p),(p>=i&&p<=n||p+ri>=i&&p+ri<=n)&&(p>Math.PI/2&&p1&&(e||(s+=ei(l,u,f,h,i,n))),y&&(l=a[d],u=a[d+1],f=l,h=u),p){case gr.M:f=a[d++],h=a[d++],l=f,u=h;break;case gr.L:if(e){if(Fi(l,u,a[d],a[d+1],t,i,n))return!0}else s+=ei(l,u,a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case gr.C:if(e){if($b(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,i,n))return!0}else s+=tw(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case gr.Q:if(e){if(qb(l,u,a[d++],a[d++],a[d],a[d+1],t,i,n))return!0}else s+=ew(l,u,a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case gr.A:var g=a[d++],m=a[d++],_=a[d++],S=a[d++],b=a[d++],w=a[d++];d+=1;var x=!!(1-a[d++]);c=Math.cos(b)*_+g,v=Math.sin(b)*S+m,y?(f=c,h=v):s+=ei(l,u,c,v,i,n);var C=(i-g)*S/_+g;if(e){if(Kb(g,m,S,b,b+w,x,t,C,n))return!0}else s+=rw(g,m,S,b,b+w,x,C,n);l=Math.cos(b+w)*_+g,u=Math.sin(b+w)*S+m;break;case gr.R:f=l=a[d++],h=u=a[d++];var D=a[d++],A=a[d++];if(c=f+D,v=h+A,e){if(Fi(f,h,c,h,t,i,n)||Fi(c,h,c,v,t,i,n)||Fi(c,v,f,v,t,i,n)||Fi(f,v,f,h,t,i,n))return!0}else s+=ei(c,h,c,v,i,n),s+=ei(f,v,f,h,i,n);break;case gr.Z:if(e){if(Fi(l,u,f,h,t,i,n))return!0}else s+=ei(l,u,f,h,i,n);l=f,u=h;break}}return!e&&!Jb(u,h)&&(s+=ei(l,u,f,h,i,n)||0),s!==0}function iw(r,t,e){return Ey(r,0,!1,t,e)}function nw(r,t,e,i){return Ey(r,t,!0,e,i)}var Oy=gt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},bi),aw={style:gt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},js.style)},jl=ya.concat(["invisible","culling","z","z2","zlevel","parent"]),vt=function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(l){e.buildPath(l,e.shape)}),n.silent=!0;var a=n.style;for(var o in i)a[o]!==i[o]&&(a[o]=i[o]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var s=0;s.5?yf:i>.2?BS:mf}else if(e)return mf}return yf},t.prototype.getInsideTextStroke=function(e){var i=this.style.fill;if(Y(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),o=gs(e,0)0))},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,i=this.style,n=!e;if(n){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&tn)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){s.copy(e);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect(),o=this.style;if(e=n[0],i=n[1],a.contain(e,i)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),nw(s,l/u,e,i)))return!0}if(this.hasFill())return iw(s,e,i)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=tn,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,i){e==="shape"?this.setShape(i):r.prototype.attrKV.call(this,e,i)},t.prototype.setShape=function(e,i){var n=this.shape;return n||(n=this.shape={}),typeof e=="string"?n[e]=i:z(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&tn)},t.prototype.createStyle=function(e){return $s(Oy,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.shape&&!i.shape&&(i.shape=z({},this.shape))},t.prototype._applyStateObj=function(e,i,n,a,o,s){r.prototype._applyStateObj.call(this,e,i,n,a,o,s);var l=!(i&&a),u;if(i&&i.shape?o?a?u=i.shape:(u=z({},n.shape),z(u,i.shape)):(u=z({},a?this.shape:n.shape),z(u,i.shape)):l&&(u=n.shape),u)if(o){this.shape=z({},this.shape);for(var f={},h=xt(u),c=0;cn&&(h=s+l,s*=n/h,l*=n/h),u+f>n&&(h=u+f,u*=n/h,f*=n/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+f>a&&(h=s+f,s*=a/h,f*=a/h),r.moveTo(e+s,i),r.lineTo(e+n-l,i),l!==0&&r.arc(e+n-l,i+l,l,-Math.PI/2,0),r.lineTo(e+n,i+a-u),u!==0&&r.arc(e+n-u,i+a-u,u,0,Math.PI/2),r.lineTo(e+f,i+a),f!==0&&r.arc(e+f,i+a-f,f,Math.PI/2,Math.PI),r.lineTo(e,i+s),s!==0&&r.arc(e+s,i+s,s,Math.PI,Math.PI*1.5)}var sn=Math.round;function By(r,t,e){if(t){var i=t.x1,n=t.x2,a=t.y1,o=t.y2;r.x1=i,r.x2=n,r.y1=a,r.y2=o;var s=e&&e.lineWidth;return s&&(sn(i*2)===sn(n*2)&&(r.x1=r.x2=gi(i,s,!0)),sn(a*2)===sn(o*2)&&(r.y1=r.y2=gi(a,s,!0))),r}}function Ny(r,t,e){if(t){var i=t.x,n=t.y,a=t.width,o=t.height;r.x=i,r.y=n,r.width=a,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=gi(i,s,!0),r.y=gi(n,s,!0),r.width=Math.max(gi(i+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(gi(n+o,s,!1)-r.y,o===0?0:1)),r}}function gi(r,t,e){if(!t)return r;var i=sn(r*2);return(i+sn(t))%2===0?i/2:(i+(e?1:-1))/2}var hw=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),cw={},_t=function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new hw},t.prototype.buildPath=function(e,i){var n,a,o,s;if(this.subPixelOptimize){var l=Ny(cw,i,this.style);n=l.x,a=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else n=i.x,a=i.y,o=i.width,s=i.height;i.r?fw(e,i):e.rect(n,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(vt);_t.prototype.type="rect";var Iv={fill:"#000"},Pv=2,Fe={},vw={style:gt({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},js.style)},Gt=function(r){F(t,r);function t(e){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=Iv,i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,I=0;I=0&&(P=w[L],P.align==="right");)this._placeToken(P,e,C,g,I,"right",_),D-=P.width,I-=P.width,L--;for(M+=(f-(M-y)-(m-I)-D)/2;A<=L;)P=w[A],this._placeToken(P,e,C,g,M+P.width/2,"center",_),M+=P.width,A++;g+=C}},t.prototype._placeToken=function(e,i,n,a,o,s,l){var u=i.rich[e.styleName]||{};u.text=e.text;var f=e.verticalAlign,h=a+n/2;f==="top"?h=a+e.height/2:f==="bottom"&&(h=a+n-e.height/2);var c=!e.isLineHolder&&tu(u);c&&this._renderBackground(u,i,s==="right"?o-e.width:s==="center"?o-e.width/2:o,h-e.height/2,e.width,e.height);var v=!!u.backgroundColor,d=e.textPadding;d&&(o=Nv(o,s,d),h-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(bs),y=p.createStyle();p.useStyle(y);var g=this._defaultStyle,m=!1,_=0,S=!1,b=Bv("fill"in u?u.fill:"fill"in i?i.fill:(m=!0,g.fill)),w=Ov("stroke"in u?u.stroke:"stroke"in i?i.stroke:!v&&!l&&(!g.autoStroke||m)?(_=Pv,S=!0,g.stroke):null),x=u.textShadowBlur>0||i.textShadowBlur>0;y.text=e.text,y.x=o,y.y=h,x&&(y.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,y.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",y.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,y.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),y.textAlign=s,y.textBaseline="middle",y.font=e.font||Rr,y.opacity=un(u.opacity,i.opacity,1),Rv(y,u),w&&(y.lineWidth=un(u.lineWidth,i.lineWidth,_),y.lineDash=$(u.lineDash,i.lineDash),y.lineDashOffset=i.lineDashOffset||0,y.stroke=w),b&&(y.fill=b),p.setBoundingRect(xf(y,e.contentWidth,e.contentHeight,S?0:null))},t.prototype._renderBackground=function(e,i,n,a,o,s){var l=e.backgroundColor,u=e.borderWidth,f=e.borderColor,h=l&&l.image,c=l&&!h,v=e.borderRadius,d=this,p,y;if(c||e.lineHeight||u&&f){p=this._getOrCreateChild(_t),p.useStyle(p.createStyle()),p.style.fill=null;var g=p.shape;g.x=n,g.y=a,g.width=o,g.height=s,g.r=v,p.dirtyShape()}if(c){var m=p.style;m.fill=l||null,m.fillOpacity=$(e.fillOpacity,1)}else if(h){y=this._getOrCreateChild(vr),y.onload=function(){d.dirtyStyle()};var _=y.style;_.image=l.image,_.x=n,_.y=a,_.width=o,_.height=s}if(u&&f){var m=p.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=$(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(p||y).style;S.shadowBlur=e.shadowBlur||0,S.shadowColor=e.shadowColor||"transparent",S.shadowOffsetX=e.shadowOffsetX||0,S.shadowOffsetY=e.shadowOffsetY||0,S.opacity=un(e.opacity,i.opacity,1)},t.makeFont=function(e){var i="";return yw(e)&&(i=[e.fontStyle,e.fontWeight,gw(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),i&&He(i)||e.textFont||e.font},t}(Ga),dw={left:!0,right:1,center:1},pw={top:1,bottom:1,middle:1},kv=["fontStyle","fontWeight","fontSize","fontFamily"];function gw(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?gh+"px":r+"px"}function Rv(r,t){for(var e=0;e=0,a=!1;if(r instanceof vt){var o=zy(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(Vi(s)||Vi(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=z({},i),u=z({},u),u.fill=s):!Vi(u.fill)&&Vi(s)?(a=!0,i=z({},i),u=z({},u),u.fill=nv(s)):!Vi(u.stroke)&&Vi(l)&&(a||(i=z({},i),u=z({},u)),u.stroke=nv(l)),i.style=u}}if(i&&i.z2==null){a||(i=z({},i));var f=r.z2EmphasisLift;i.z2=r.z2+(f??Sw)}return i}function Mw(r,t,e){if(e&&e.z2==null){e=z({},e);var i=r.z2SelectLift;e.z2=r.z2+(i??bw)}return e}function Dw(r,t,e){var i=ot(r.currentStates,t)>=0,n=r.style.opacity,a=i?null:Tw(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=z({},e),o=z({opacity:i?n:a.opacity*.1},o),e.style=o),e}function eu(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return Cw(this,r,t,e);if(r==="blur")return Dw(this,r,e);if(r==="select")return Mw(this,r,e)}return e}function Aw(r){r.stateProxy=eu;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=eu),e&&(e.stateProxy=eu)}function Uv(r,t){!Yy(r,t)&&!r.__highByOuter&&dr(r,Fy)}function Yv(r,t){!Yy(r,t)&&!r.__highByOuter&&dr(r,Vy)}function ba(r,t){r.__highByOuter|=1<<(t||0),dr(r,Fy)}function wa(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&dr(r,Vy)}function Hy(r){dr(r,Bh)}function Nh(r){dr(r,Gy)}function Wy(r){dr(r,ww)}function Uy(r){dr(r,xw)}function Yy(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function Xy(r){var t=r.getModel(),e=[],i=[];t.eachComponent(function(n,a){var o=Rh(a),s=n==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&i.push(l),o.isBlured&&(l.group.traverse(function(u){Gy(u)}),s&&e.push(a)),o.isBlured=!1}),T(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(e,!1,t)})}function Df(r,t,e,i){var n=i.getModel();e=e||"coordinateSystem";function a(u,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:e.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function Ts(r,t,e){Zy(r,!0),dr(r,Aw),Ow(r,t,e)}function Ew(r){Zy(r,!1)}function xa(r,t,e,i){i?Ew(r):Ts(r,t,e)}function Ow(r,t,e){var i=ft(r);t!=null?(i.focus=t,i.blurScope=e):i.focus&&(i.focus=null)}var Zv=["emphasis","blur","select"],Bw={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Lf(r,t,e,i){e=e||"itemStyle";for(var n=0;n1&&(o*=ru(d),s*=ru(d));var p=(n===a?-1:1)*ru((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,y=p*o*v/s,g=p*-s*c/o,m=(r+e)/2+co(h)*y-ho(h)*g,_=(t+i)/2+ho(h)*y+co(h)*g,S=Qv([1,0],[(c-y)/o,(v-g)/s]),b=[(c-y)/o,(v-g)/s],w=[(-1*c-y)/o,(-1*v-g)/s],x=Qv(b,w);if(kf(b,w)<=-1&&(x=kn),kf(b,w)>=1&&(x=0),x<0){var C=Math.round(x/kn*1e6)/1e6;x=kn*2+C%2*kn}f.addData(u,m,_,o,s,S,x,h,a)}var Hw=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Ww=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Uw(r){var t=new Mi;if(!r)return t;var e=0,i=0,n=e,a=i,o,s=Mi.CMD,l=r.match(Hw);if(!l)return t;for(var u=0;uP*P+k*k&&(C=A,D=M),{cx:C,cy:D,x0:-f,y0:-h,x1:C*(n/b-1),y1:D*(n/b-1)}}function Jw(r){var t;if(V(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function jw(r,t){var e,i=Qn(t.r,0),n=Qn(t.r0||0,0),a=i>0,o=n>0;if(!(!a&&!o)){if(a||(i=n,n=0),n>i){var s=i;i=n,n=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,h=t.cy,c=!!t.clockwise,v=jv(u-l),d=v>iu&&v%iu;if(d>Me&&(v=d),!(i>Me))r.moveTo(f,h);else if(v>iu-Me)r.moveTo(f+i*Hi(l),h+i*ii(l)),r.arc(f,h,i,l,u,!c),n>Me&&(r.moveTo(f+n*Hi(u),h+n*ii(u)),r.arc(f,h,n,u,l,c));else{var p=void 0,y=void 0,g=void 0,m=void 0,_=void 0,S=void 0,b=void 0,w=void 0,x=void 0,C=void 0,D=void 0,A=void 0,M=void 0,I=void 0,L=void 0,P=void 0,k=i*Hi(l),B=i*ii(l),U=n*Hi(u),O=n*ii(u),H=v>Me;if(H){var R=t.cornerRadius;R&&(e=Jw(R),p=e[0],y=e[1],g=e[2],m=e[3]);var E=jv(i-n)/2;if(_=Ve(E,g),S=Ve(E,m),b=Ve(E,p),w=Ve(E,y),D=x=Qn(_,S),A=C=Qn(b,w),(x>Me||C>Me)&&(M=i*Hi(u),I=i*ii(u),L=n*Hi(l),P=n*ii(l),vMe){var K=Ve(g,D),ut=Ve(m,D),j=vo(L,P,k,B,i,K,c),st=vo(M,I,U,O,i,ut,c);r.moveTo(f+j.cx+j.x0,h+j.cy+j.y0),D0&&r.arc(f+j.cx,h+j.cy,K,Ft(j.y0,j.x0),Ft(j.y1,j.x1),!c),r.arc(f,h,i,Ft(j.cy+j.y1,j.cx+j.x1),Ft(st.cy+st.y1,st.cx+st.x1),!c),ut>0&&r.arc(f+st.cx,h+st.cy,ut,Ft(st.y1,st.x1),Ft(st.y0,st.x0),!c))}else r.moveTo(f+k,h+B),r.arc(f,h,i,l,u,!c);if(!(n>Me)||!H)r.lineTo(f+U,h+O);else if(A>Me){var K=Ve(p,A),ut=Ve(y,A),j=vo(U,O,M,I,n,-ut,c),st=vo(k,B,L,P,n,-K,c);r.lineTo(f+j.cx+j.x0,h+j.cy+j.y0),A0&&r.arc(f+j.cx,h+j.cy,ut,Ft(j.y0,j.x0),Ft(j.y1,j.x1),!c),r.arc(f,h,n,Ft(j.cy+j.y1,j.cx+j.x1),Ft(st.cy+st.y1,st.cx+st.x1),c),K>0&&r.arc(f+st.cx,h+st.cy,K,Ft(st.y1,st.x1),Ft(st.y0,st.x0),!c))}else r.lineTo(f+U,h+O),r.arc(f,h,n,u,l,c)}r.closePath()}}}var tx=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}(),Pi=function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new tx},t.prototype.buildPath=function(e,i){jw(e,i)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(vt);Pi.prototype.type="sector";var ex=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),nl=function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new ex},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.PI*2;e.moveTo(n+i.r,a),e.arc(n,a,i.r,0,o,!1),e.moveTo(n+i.r0,a),e.arc(n,a,i.r0,0,o,!0)},t}(vt);nl.prototype.type="ring";function rx(r,t,e,i){var n=[],a=[],o=[],s=[],l,u,f,h;if(i){f=[1/0,1/0],h=[-1/0,-1/0];for(var c=0,v=r.length;c=2){if(i){var a=rx(n,i,e,t.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(e?o:o-1);s++){var l=a[s*2],u=a[s*2+1],f=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,h=n.length;sai[1]){if(a=!1,Rt.negativeSize||i)return a;var l=po(ai[0]-ni[1]),u=po(ni[0]-ai[1]);nu(l,u)>yo.len()&&(l=u||!Rt.bidirectional)&&(dt.scale(go,s,-u*n),Rt.useDir&&Rt.calcDirMTV()))}}return a},r.prototype._getProjMinMaxOnAxis=function(t,e,i){for(var n=this._axes[t],a=this._origin,o=e[0].dot(n)+a[t],s=o,l=o,u=1;u0){var h=f.duration,c=f.delay,v=f.easing,d={duration:h,delay:c||0,easing:v,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),a&&a()}function Zt(r,t,e,i,n,a){Vh("update",r,t,e,i,n,a)}function Pe(r,t,e,i,n,a){Vh("enter",r,t,e,i,n,a)}function sa(r){if(!r.__zr)return!0;for(var t=0;tWe(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function rd(r){return!r.isGroup}function gx(r){return r.shape!=null}function hm(r,t,e){if(!r||!t)return;function i(o){var s={};return o.traverse(function(l){rd(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return gx(o)&&(s.shape=at(o.shape)),s}var a=i(r);t.traverse(function(o){if(rd(o)&&o.anid){var s=a[o.anid];if(s){var l=n(o);o.attr(n(s)),Zt(o,l,e,ft(o).dataIndex)}}})}function cm(r,t){return Z(r,function(e){var i=e[0];i=se(i,t.x),i=ma(i,t.x+t.width);var n=e[1];return n=se(n,t.y),n=ma(n,t.y+t.height),[i,n]})}function vm(r,t){var e=se(r.x,t.x),i=ma(r.x+r.width,t.x+t.width),n=se(r.y,t.y),a=ma(r.y+r.height,t.y+t.height);if(i>=e&&a>=n)return{x:e,y:n,width:i-e,height:a-n}}function ol(r,t,e){var i=z({rectHover:!0},t),n=i.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),gt(n,e),new vr(i)):al(r.replace("path://",""),i,e,"center")}function yx(r,t,e,i,n){for(var a=0,o=n[n.length-1];a1)return!1;var y=au(v,d,f,h)/c;return!(y<0||y>1)}function au(r,t,e,i){return r*i-e*t}function mx(r){return r<=1e-6&&r>=-1e-6}function Ms(r,t,e,i,n){return t==null||(pt(t)?mt[0]=mt[1]=mt[2]=mt[3]=t:(mt[0]=t[0],mt[1]=t[1],mt[2]=t[2],mt[3]=t[3]),i&&(mt[0]=se(0,mt[0]),mt[1]=se(0,mt[1]),mt[2]=se(0,mt[2]),mt[3]=se(0,mt[3])),e&&(mt[0]=-mt[0],mt[1]=-mt[1],mt[2]=-mt[2],mt[3]=-mt[3]),id(r,mt,"x","width",3,1,n&&n[0]||0),id(r,mt,"y","height",0,2,n&&n[1]||0)),r}var mt=[0,0,0,0];function id(r,t,e,i,n,a,o){var s=t[a]+t[n],l=r[i];r[i]+=s,o=se(0,ma(o,l)),r[i]=0?-t[n]:t[a]>=0?l+t[a]:We(s)>1e-8?(l-o)*t[n]/s:0):r[e]-=t[n]}function sl(r){var t=r.itemTooltipOption,e=r.componentModel,i=r.itemName,n=Y(t)?{formatter:t}:t,a=e.mainType,o=e.componentIndex,s={componentType:a,name:i,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&T(xt(l),function(f){Le(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=ft(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:i,option:gt({content:i,encodeHTMLContent:!0,formatterParams:s},n)}}function Ef(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function Za(r,t){if(r)if(V(r))for(var e=0;et&&(t=o),ot&&(e=t=0),{min:e,max:t}}function Zh(r,t,e){pm(r,t,e,-1/0)}function pm(r,t,e,i){if(r.ignoreModelZ)return i;var n=r.getTextContent(),a=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l=0&&s.push(l)}),s}}function $h(r,t){return lt(lt({},r,!0),t,!0)}const Bx={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},Nx={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Ds="ZH",qh="EN",cn=qh,rs={},Kh={},mm=et.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||cn).toUpperCase();return r.indexOf(Ds)>-1?Ds:cn}():cn;function _m(r,t){r=r.toUpperCase(),Kh[r]=new Ct(t),rs[r]=t}function zx(r){if(Y(r)){var t=rs[r.toUpperCase()]||{};return r===Ds||r===qh?at(t):lt(at(t),at(rs[cn]),!1)}else return lt(at(r),at(rs[cn]),!1)}function Fx(r){return Kh[r]}function Vx(){return Kh[cn]}_m(qh,Bx);_m(Ds,Nx);var Gx=null;function As(){return Gx}var Qh=1e3,Jh=Qh*60,la=Jh*60,me=la*24,fd=me*365,Hx={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},is={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},Wx="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",_o="{yyyy}-{MM}-{dd}",hd={year:"{yyyy}",month:"{yyyy}-{MM}",day:_o,hour:_o+" "+is.hour,minute:_o+" "+is.minute,second:_o+" "+is.second,millisecond:Wx},xi=["year","month","day","hour","minute","second","millisecond"],Ux=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Yx(r){return!Y(r)&&!tt(r)?Xx(r):r}function Xx(r){r=r||{};var t={},e=!0;return T(xi,function(i){e&&(e=r[i]==null)}),T(xi,function(i,n){var a=r[i];t[i]={};for(var o=null,s=n;s>=0;s--){var l=xi[s],u=q(a)&&!V(a)?a[l]:a,f=void 0;V(u)?(f=u.slice(),o=f[0]||""):Y(u)?(o=u,f=[o]):(o==null?o=is[i]:Hx[l].test(o)||(o=t[l][l][0]+" "+o),f=[o],e&&(f[1]="{primary|"+o+"}")),t[i][l]=f}}),t}function yr(r,t){return r+="","0000".substr(0,t-r.length)+r}function ua(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function Zx(r){return r===ua(r)}function $x(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function hl(r,t,e,i){var n=xn(r),a=n[Sm(e)](),o=n[jh(e)]()+1,s=Math.floor((o-1)/3)+1,l=n[tc(e)](),u=n["get"+(e?"UTC":"")+"Day"](),f=n[ec(e)](),h=(f-1)%12+1,c=n[rc(e)](),v=n[ic(e)](),d=n[nc(e)](),p=f>=12?"pm":"am",y=p.toUpperCase(),g=i instanceof Ct?i:Fx(i||mm)||Vx(),m=g.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),b=m.get("dayOfWeek"),w=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,p+"").replace(/{A}/g,y+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,yr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,yr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,yr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,w[u]).replace(/{e}/g,u+"").replace(/{HH}/g,yr(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,yr(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,yr(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,yr(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,yr(d,3)).replace(/{S}/g,d+"")}function qx(r,t,e,i,n){var a=null;if(Y(e))a=e;else if(tt(e)){var o={time:r.time,level:r.time.level},s=As();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),a=e(r.value,t,o)}else{var l=r.time;if(l){var u=e[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var f=Ls(r.value,n);a=e[f][f][0]}}return hl(new Date(r.value),a,n,i)}function Ls(r,t){var e=xn(r),i=e[jh(t)]()+1,n=e[tc(t)](),a=e[ec(t)](),o=e[rc(t)](),s=e[ic(t)](),l=e[nc(t)](),u=l===0,f=u&&s===0,h=f&&o===0,c=h&&a===0,v=c&&n===1,d=v&&i===1;return d?"year":v?"month":c?"day":h?"hour":f?"minute":u?"second":"millisecond"}function Of(r,t,e){switch(t){case"year":r[bm(e)](0);case"month":r[wm(e)](1);case"day":r[xm(e)](0);case"hour":r[Tm(e)](0);case"minute":r[Cm(e)](0);case"second":r[Mm(e)](0)}return r}function Sm(r){return r?"getUTCFullYear":"getFullYear"}function jh(r){return r?"getUTCMonth":"getMonth"}function tc(r){return r?"getUTCDate":"getDate"}function ec(r){return r?"getUTCHours":"getHours"}function rc(r){return r?"getUTCMinutes":"getMinutes"}function ic(r){return r?"getUTCSeconds":"getSeconds"}function nc(r){return r?"getUTCMilliseconds":"getMilliseconds"}function Kx(r){return r?"setUTCFullYear":"setFullYear"}function bm(r){return r?"setUTCMonth":"setMonth"}function wm(r){return r?"setUTCDate":"setDate"}function xm(r){return r?"setUTCHours":"setHours"}function Tm(r){return r?"setUTCMinutes":"setMinutes"}function Cm(r){return r?"setUTCSeconds":"setSeconds"}function Mm(r){return r?"setUTCMilliseconds":"setMilliseconds"}function Dm(r){if(!tb(r))return Y(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Am(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,i){return i.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var cl=bh;function Bf(r,t,e){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&He(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?xn(r):r;if(isNaN(+l)){if(s)return"-"}else return hl(l,i,e)}if(t==="ordinal")return Qu(r)?n(r):pt(r)&&a(r)?r+"":"-";var u=Ss(r);return a(u)?Dm(u):Qu(r)?n(r):typeof r=="boolean"?r+"":"-"}var cd=["a","b","c","d","e","f","g"],lu=function(r,t){return"{"+r+(t??"")+"}"};function Lm(r,t,e){V(t)||(t=[t]);var i=t.length;if(!i)return"";for(var n=t[0].$vars||[],a=0;a':'';var o=e.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function Ai(r,t){return t=t||"transparent",Y(r)?r:q(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}var ns={},uu={},ac=function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(t,e){this._nonSeriesBoxMasterList=i(ns),this._normalMasterList=i(uu);function i(n,a){var o=[];return T(n,function(s,l){var u=s.create(t,e);o=o.concat(u||[])}),o}},r.prototype.update=function(t,e){T(this._normalMasterList,function(i){i.update&&i.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(t,e){if(t==="matrix"||t==="calendar"){ns[t]=e;return}uu[t]=e},r.get=function(t){return uu[t]||ns[t]},r}();function Jx(r){return!!ns[r]}var vd={coord:1,coord2:2},jx=rt();function tT(r){var t=r.getShallow("coord",!0),e=vd.coord;if(t==null){var i=jx.get(r.type);i&&i.getCoord2&&(e=vd.coord2,t=i.getCoord2(r))}return{coord:t,from:e}}var or={none:0,dataCoordSys:1,boxCoordSys:2};function eT(r,t){var e=r.getShallow("coordinateSystem"),i=r.getShallow("coordinateSystemUsage",!0),n=or.none;if(e){var a=r.mainType==="series";i==null&&(i=a?"data":"box"),i==="data"?(n=or.dataCoordSys,a||(n=or.none)):i==="box"&&(n=or.boxCoordSys,!a&&!Jx(e)&&(n=or.none))}return{coordSysType:e,kind:n}}function rT(r){var t=r.targetModel,e=r.coordSysType,i=r.coordSysProvider,n=r.isDefaultDataCoordSys,a=eT(t),o=a.kind,s=a.coordSysType;if(n&&o!==or.dataCoordSys&&(o=or.dataCoordSys,s=e),o===or.none||s!==e)return!1;var l=i(e,t);return l?(o===or.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l,!0):!1}var as=T,iT=["left","right","top","bottom","width","height"],So=[["width","left","right"],["height","top","bottom"]];function oc(r,t,e,i,n){var a=0,o=0;i==null&&(i=1/0),n==null&&(n=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),h=t.childAt(u+1),c=h&&h.getBoundingRect(),v,d;if(r==="horizontal"){var p=f.width+(c?-c.x+f.x:0);v=a+p,v>i||l.newline?(a=0,v=p,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var y=f.height+(c?-c.y+f.y:0);d=o+y,d>n||l.newline?(a+=s+e,o=0,d=y,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=v+e:o=d+e)})}var fa=oc;St(oc,"vertical");St(oc,"horizontal");function nT(r,t){return{left:r.getShallow("left",t),top:r.getShallow("top",t),right:r.getShallow("right",t),bottom:r.getShallow("bottom",t),width:r.getShallow("width",t),height:r.getShallow("height",t)}}function gn(r,t,e){e=cl(e||0);var i=t.width,n=t.height,a=Pt(r.left,i),o=Pt(r.top,n),s=Pt(r.right,i),l=Pt(r.bottom,n),u=Pt(r.width,i),f=Pt(r.height,n),h=e[2]+e[0],c=e[1]+e[3],v=r.aspect;switch(isNaN(u)&&(u=i-s-c-a),isNaN(f)&&(f=n-l-h-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>i/n?u=i*.8:f=n*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(a)&&(a=i-s-u-c),isNaN(o)&&(o=n-l-f-h),r.left||r.right){case"center":a=i/2-u/2-e[3];break;case"right":a=i-u-c;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-f/2-e[0];break;case"bottom":o=n-f-h;break}a=a||0,o=o||0,isNaN(u)&&(u=i-c-a-(s||0)),isNaN(f)&&(f=n-h-o-(l||0));var d=new it((t.x||0)+a+e[3],(t.y||0)+o+e[0],u,f);return d.margin=e,d}var fu={rect:1};function sc(r,t,e){var i,n,a,o=r.boxCoordinateSystem,s;if(o){var l=tT(r),u=l.coord,f=l.from;if(o.dataToLayout){a=fu.rect,s=f;var h=o.dataToLayout(u);i=h.contentRect||h.rect}}return a==null&&(a=fu.rect),a===fu.rect&&(i||(i={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),n=[i.x+i.width/2,i.y+i.height/2]),{type:a,refContainer:i,refPoint:n,boxCoordFrom:s}}function Aa(r){var t=r.layoutMode||r.constructor.layoutMode;return q(t)?t:t?{type:t}:null}function Or(r,t,e){var i=e&&e.ignoreSize;!V(i)&&(i=[i,i]);var n=o(So[0],0),a=o(So[1],1);l(So[0],r,n),l(So[1],r,a);function o(u,f){var h={},c=0,v={},d=0,p=2;if(as(u,function(m){v[m]=r[m]}),as(u,function(m){Le(t,m)&&(h[m]=v[m]=t[m]),s(h,m)&&c++,s(v,m)&&d++}),i[f])return s(t,u[1])?v[u[2]]=null:s(t,u[2])&&(v[u[1]]=null),v;if(d===p||!c)return v;if(c>=p)return h;for(var y=0;y=0;l--)s=lt(s,n[l],!0);i.defaultOption=s}return i.defaultOption},t.prototype.getReferringComponents=function(e,i){var n=e+"Index",a=e+"Id";return Va(this.ecModel,e,{index:this.get(n,!0),id:this.get(a,!0)},i)},t.prototype.getBoxLayoutParams=function(){return nT(this,!1)},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(Ct);Ay(ct,Ct);Qs(ct);Ex(ct);Ox(ct,sT);function sT(r){var t=[];return T(ct.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=Z(t,function(e){return Ye(e).main}),r!=="dataset"&&ot(t,"dataset")<=0&&t.unshift("dataset"),t}var W={color:{},darkColor:{},size:{}},Dt=W.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};z(Dt,{primary:Dt.neutral80,secondary:Dt.neutral70,tertiary:Dt.neutral60,quaternary:Dt.neutral50,disabled:Dt.neutral20,border:Dt.neutral30,borderTint:Dt.neutral20,borderShade:Dt.neutral40,background:Dt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Dt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Dt.neutral70,axisLineTint:Dt.neutral40,axisTick:Dt.neutral70,axisTickMinor:Dt.neutral60,axisLabel:Dt.neutral70,axisSplitLine:Dt.neutral15,axisMinorSplitLine:Dt.neutral05});for(var oi in Dt)if(Dt.hasOwnProperty(oi)){var dd=Dt[oi];oi==="theme"?W.darkColor.theme=Dt.theme.slice():oi==="highlight"?W.darkColor.highlight="rgba(255,231,130,0.4)":oi.indexOf("accent")===0?W.darkColor[oi]=ff(dd,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):W.darkColor[oi]=ff(dd,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}W.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Im="";typeof navigator<"u"&&(Im=navigator.platform||"");var Wi="rgba(0, 0, 0, 0.2)",Pm=W.color.theme[0],lT=ff(Pm,null,null,.9);const uT={darkMode:"auto",colorBy:"series",color:W.color.theme,gradientColor:[lT,Pm],aria:{decal:{decals:[{color:Wi,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Wi,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Wi,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Wi,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Wi,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Wi,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Im.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var km=rt(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),le="original",Ht="arrayRows",Ee="objectRows",tr="keyedColumns",Pr="typedArray",Rm="unknown",Ke="column",ki="row",ne={Must:1,Might:2,Not:3},Em=bt();function fT(r){Em(r).datasetMap=rt()}function hT(r,t,e){var i={},n=Om(t);if(!n||!r)return i;var a=[],o=[],s=t.ecModel,l=Em(s).datasetMap,u=n.uid+"_"+e.seriesLayoutBy,f,h;r=r.slice(),T(r,function(p,y){var g=q(p)?p:r[y]={name:p};g.type==="ordinal"&&f==null&&(f=y,h=d(g)),i[g.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});T(r,function(p,y){var g=p.name,m=d(p);if(f==null){var _=c.valueWayDim;v(i[g],_,m),v(o,_,m),c.valueWayDim+=m}else if(f===y)v(i[g],0,m),v(a,0,m);else{var _=c.categoryWayDim;v(i[g],_,m),v(o,_,m),c.categoryWayDim+=m}});function v(p,y,g){for(var m=0;mt)return r[i];return r[e-1]}function yT(r,t,e,i,n,a,o){a=a||r;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var f=o==null||!i?e:gT(i,o);if(f=f||e,!(!f||!f.length)){var h=f[l];return n&&(u[n]=h),s.paletteIdx=(l+1)%f.length,h}}function mT(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var bo,Rn,gd,yd="\0_ec_inner",_T=1,uc=function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,i,n,a,o,s){a=a||{},this.option=null,this._theme=new Ct(a),this._locale=new Ct(o),this._optionManager=s},t.prototype.setOption=function(e,i,n){var a=Sd(i);this._optionManager.setOption(e,n,a),this._resetOption(null,a)},t.prototype.resetOption=function(e,i){return this._resetOption(e,Sd(i))},t.prototype._resetOption=function(e,i){var n=!1,a=this._optionManager;if(!e||e==="recreate"){var o=a.mountOption(e==="recreate");!this.option||e==="recreate"?gd(this,o):(this.restoreData(),this._mergeOption(o,i)),n=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=a.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,i))}if(!e||e==="recreate"||e==="media"){var l=a.getMediaOption(this);l.length&&T(l,function(u){n=!0,this._mergeOption(u,i)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,i){var n=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=rt(),u=i&&i.replaceMergeMainTypeMap;fT(this),T(e,function(h,c){h!=null&&(ct.hasClass(c)?c&&(s.push(c),l.set(c,!0)):n[c]=n[c]==null?at(h):lt(n[c],h,!0))}),u&&u.each(function(h,c){ct.hasClass(c)&&!l.get(c)&&(s.push(c),l.set(c,!0))}),ct.topologicalTravel(s,ct.getAllClassMainTypes(),f,this);function f(h){var c=pT(this,h,Xt(e[h])),v=a.get(h),d=v?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",p=ob(v,c,d);vb(p,h,ct),n[h]=null,a.set(h,null),o.set(h,0);var y=[],g=[],m=0,_;T(p,function(S,b){var w=S.existing,x=S.newOption;if(!x)w&&(w.mergeOption({},this),w.optionUpdated({},!1));else{var C=h==="series",D=ct.getClass(h,S.keyInfo.subType,!C);if(!D)return;if(h==="tooltip"){if(_)return;_=!0}if(w&&w.constructor===D)w.name=S.keyInfo.name,w.mergeOption(x,this),w.optionUpdated(x,!1);else{var A=z({componentIndex:b},S.keyInfo);w=new D(x,this,this,A),z(w,A),S.brandNew&&(w.__requireNewView=!0),w.init(x,this,this),w.optionUpdated(null,!0)}}w?(y.push(w.option),g.push(w),m++):(y.push(void 0),g.push(void 0))},this),n[h]=y,a.set(h,g),o.set(h,m),h==="series"&&bo(this)}this._seriesIndices||bo(this)},t.prototype.getOption=function(){var e=at(this.option);return T(e,function(i,n){if(ct.hasClass(n)){for(var a=Xt(i),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!_a(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,e[n]=a}}),delete e[yd],e},t.prototype.setTheme=function(e){this._theme=new Ct(e),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,i){var n=this._componentsMap.get(e);if(n){var a=n[i||0];if(a)return a;if(i==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function AT(r,t){return r.join(",")===t.join(",")}var Te=T,La=q,bd=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function hu(r){var t=r&&r.itemStyle;if(t)for(var e=0,i=bd.length;e0?e[o-1].seriesModel:null)}),NT(e)}})}function NT(r){T(r,function(t,e){var i=[],n=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,f,h){var c=o.get(t.stackedDimension,h);if(isNaN(c))return n;var v,d;s?d=o.getRawIndex(h):v=o.get(t.stackedByDimension,h);for(var p=NaN,y=e-1;y>=0;y--){var g=r[y];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,v)),d>=0){var m=g.data.getByRawIndex(g.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&c>=0&&m>0||l==="samesign"&&c<=0&&m<0){c=QS(c,m),p=m;break}}}return i[0]=c,i[1]=p,i})})}var vl=function(){function r(t){this.data=t.data||(t.sourceFormat===tr?{}:[]),this.sourceFormat=t.sourceFormat||Rm,this.seriesLayoutBy=t.seriesLayoutBy||Ke,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var i=0;ip&&(p=_)}v[0]=d,v[1]=p}},n=function(){return this._data?this._data.length/this._dimSize:0};Ad=(t={},t[Ht+"_"+Ke]={pure:!0,appendData:a},t[Ht+"_"+ki]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Ee]={pure:!0,appendData:a},t[tr]={pure:!0,appendData:function(o){var s=this._data;T(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},t[le]={appendData:a},t[Pr]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s=0&&(p=o.interpolatedValue[y])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return yn(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,i){},r}();function kd(r){var t,e;return q(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function ha(r){return new YT(r)}var YT=function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,i=t&&t.skip;if(this._dirty&&e){var n=this.context;n.data=n.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function f(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,d=Math.min(c!=null?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(h||v1&&i>0?s:o}};return a;function o(){return t=r?null:ln?-this._resultLT:0},r}(),ZT=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return vn(t,e)},r}();function $T(r,t){var e=new ZT,i=r.data,n=e.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==Ke&&jt(o);var s=[],l={},u=r.dimensionsDefine;if(u)T(u,function(p,y){var g=p.name,m={index:y,name:g,displayName:p.displayName};if(s.push(m),g!=null){var _="";Le(l,g)&&jt(_),l[g]=m}});else for(var f=0;f65535?rC:iC}function Yi(){return[1/0,-1/0]}function nC(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function Od(r,t,e,i,n){var a=qm[e||"float"];if(n){var o=r[t],s=o&&o.length;if(s!==i){for(var l=new a(i),u=0;uy[1]&&(y[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,i){for(var n=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Z(o,function(m){return m.property}),f=0;fg[1]&&(g[1]=y)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(i!=null&&it)a=o-1;else return o}return-1},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var a=0;a=h&&m<=c||isNaN(m))&&(l[u++]=p),p++}d=!0}else if(a===2){for(var y=v[n[0]],_=v[n[1]],S=t[n[1]][0],b=t[n[1]][1],g=0;g=h&&m<=c||isNaN(m))&&(w>=S&&w<=b||isNaN(w))&&(l[u++]=p),p++}d=!0}}if(!d)if(a===1)for(var g=0;g=h&&m<=c||isNaN(m))&&(l[u++]=x)}else for(var g=0;gt[A][1])&&(C=!1)}C&&(l[u++]=e.getRawIndex(g))}return ug[1]&&(g[1]=y)}}}},r.prototype.lttbDownSample=function(t,e){var i=this.clone([t],!0),n=i._chunks,a=n[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,h,c,v=new(Ui(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;df&&(f=h,c=S)}M>0&&Ms&&(p=s-f);for(var y=0;yd&&(d=m,v=f+y)}var _=this.getRawIndex(h),S=this.getRawIndex(v);hf-d&&(l=f-d,s.length=l);for(var p=0;ph[1]&&(h[1]=g),c[v++]=m}return a._count=v,a._indices=c,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){if(this._count)for(var i=t.length,n=this._chunks,a=0,o=this.count();al&&(l=h)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var i=[],n=this._chunks,a=0;a=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function t(e,i,n,a){return vn(e[a],this._dimensions[a])}du={arrayRows:t,objectRows:function(e,i,n,a){return vn(e[i],this._dimensions[a])},keyedColumns:t,original:function(e,i,n,a){var o=e&&(e.value==null?e:e.value);return vn(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,i,n,a){return e[a]}}}(),r}(),aC=function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),i=!!e.length,n,a;if(xo(t)){var o=t,s=void 0,l=void 0,u=void 0;if(i){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=ie(s)?Pr:le,a=[];var h=this._getSourceMetaRawOption()||{},c=u&&u.metaRawOption||{},v=$(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=$(h.sourceHeader,c.sourceHeader),p=$(h.dimensions,c.dimensions),y=v!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||p;n=y?[Nf(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:p},l)]:[]}else{var g=t;if(i){var m=this._applyTransform(e);n=m.sourceList,a=m.upstreamSignList}else{var _=g.get("source",!0);n=[Nf(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(n,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,i=e.get("transform",!0),n=e.get("fromTransformResult",!0);if(n!=null){var a="";t.length!==1&&Bd(a)}var o,s=[],l=[];return T(t,function(u){u.prepareSource();var f=u.getSource(n||0),h="";n!=null&&!f&&Bd(h),s.push(f),l.push(u._getVersionSign())}),i?o=tC(i,s,{datasetIndex:e.componentIndex}):n!=null&&(o=[zT(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e1||e>0&&!r.noHeader;return T(r.blocks,function(n){var a=jm(n);a>=t&&(t=a+ +(i&&(!a||Ff(n)&&!n.noHeader)))}),t}return 0}function uC(r,t,e,i){var n=t.noHeader,a=hC(jm(t)),o=[],s=t.blocks||[];hr(!s||V(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Le(u,l)){var f=new XT(u[l],null);s.sort(function(p,y){return f.evaluate(p.sortParam,y.sortParam)})}else l==="seriesDesc"&&s.reverse()}T(s,function(p,y){var g=t.valueFormatter,m=Jm(p)(g?z(z({},r),{valueFormatter:g}):r,p,y>0?a.html:0,i);m!=null&&o.push(m)});var h=r.renderMode==="richText"?o.join(a.richText):Vf(i,o.join(""),n?e:a.html);if(n)return h;var c=Bf(t.header,"ordinal",r.useUTC),v=Qm(i,r.renderMode).nameStyle,d=Km(i);return r.renderMode==="richText"?t0(r,c,v)+a.richText+h:Vf(i,'
'+Qt(c)+"
"+h,e)}function fC(r,t,e,i){var n=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=V(S)?S:[S],Z(S,function(b,w){return Bf(b,V(v)?v[w]:v,u)})};if(!(a&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||W.color.secondary,n),c=a?"":Bf(l,"ordinal",u),v=t.valueType,d=o?[]:f(t.value,t.dataIndex),p=!s||!a,y=!s&&a,g=Qm(i,n),m=g.nameStyle,_=g.valueStyle;return n==="richText"?(s?"":h)+(a?"":t0(r,c,m))+(o?"":dC(r,d,p,y,_)):Vf(i,(s?"":h)+(a?"":cC(c,!s,m))+(o?"":vC(d,p,y,_)),e)}}function Nd(r,t,e,i,n,a){if(r){var o=Jm(r),s={useUTC:n,renderMode:e,orderMode:i,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function hC(r){return{html:sC[r],richText:lC[r]}}function Vf(r,t,e){var i='
',n="margin: "+e+"px 0 0",a=Km(r);return'
'+t+i+"
"}function cC(r,t,e){var i=t?"margin-left:2px":"";return''+Qt(r)+""}function vC(r,t,e,i){var n=e?"10px":"20px",a=t?"float:right;margin-left:"+n:"";return r=V(r)?r:[r],''+Z(r,function(o){return Qt(o)}).join("  ")+""}function t0(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function dC(r,t,e,i,n){var a=[n],o=i?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(V(t)?t.join(" "):t,a)}function pC(r,t){var e=r.getData().getItemVisual(t,"style"),i=e[r.visualDrawType];return Ai(i)}function e0(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var pu=function(){function r(){this.richTextStyles={},this._nextStyleNameId=by()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,i){var n=i==="richText"?this._generateStyleName():null,a=Qx({color:e,type:t,renderMode:i,markerId:n});return Y(a)?a:(this.richTextStyles[n]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var i={};V(e)?T(e,function(a){return z(i,a)}):z(i,e);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+t+"}"},r}();function gC(r){var t=r.series,e=r.dataIndex,i=r.multipleSeries,n=t.getData(),a=n.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=V(s),u=pC(t,e),f,h,c,v;if(o>1||l&&!o){var d=yC(s,t,e,a,u);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var p=n.getDimensionInfo(a[0]);v=f=yn(n,e,a[0]),h=p.type}else v=f=l?s[0]:s;var y=Lh(t),g=y&&t.name||"",m=n.getName(e),_=i?g:m;return Li("section",{header:g,noHeader:i||!y,sortParam:v,blocks:[Li("nameValue",{markerType:"item",markerColor:u,name:_,noName:!He(_),value:f,valueType:h,dataIndex:e})].concat(c||[])})}function yC(r,t,e,i,n){var a=t.getData(),o=bn(r,function(h,c,v){var d=a.getDimensionInfo(v);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];i.length?T(i,function(h){f(yn(a,e,h),h)}):T(r,f);function f(h,c){var v=a.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?u.push(Li("nameValue",{markerType:"subItem",markerColor:n,name:v.displayName,value:h,valueType:v.type})):(s.push(h),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var mr=bt();function To(r,t){return r.getName(t)||r.getId(t)}var mC="__universalTransitionEnabled",Je=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=ha({count:SC,reset:bC}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var a=mr(this).sourceManager=new aC(this);a.prepareSource();var o=this.getInitialData(e,n);Fd(o,this),this.dataTask.context.data=o,mr(this).dataBeforeProcessed=o,zd(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,i){var n=Aa(this),a=n?Cn(e):{},o=this.subType;ct.hasClass(o)&&(o+="Series"),lt(e,i.getTheme().get(this.subType)),lt(e,this.getDefaultOption()),bf(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Or(e,a,n)},t.prototype.mergeOption=function(e,i){e=lt(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Aa(this);n&&Or(this.option,e,n);var a=mr(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,i);Fd(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,mr(this).dataBeforeProcessed=o,zd(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!ie(e))for(var i=["show"],n=0;n=0&&c<0)&&(h=m,c=g,v=0),g===c&&(f[v++]=p))}),f.length=v,f},t.prototype.formatTooltip=function(e,i,n){return gC({series:this,dataIndex:e,multipleSeries:i})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(et.node&&!(e&&e.ssr))return!1;var i=this.getShallow("animation");return i&&this.getData().count()>this.getShallow("animationThreshold")&&(i=!1),!!i},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,i,n){var a=this.ecModel,o=lc.prototype.getColorFromPalette.call(this,e,i,n);return o||(o=a.getColorFromPalette(e,i,n)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,i){this._innerSelect(this.getData(i),e)},t.prototype.unselect=function(e,i){var n=this.option.selectedMap;if(n){var a=this.option.selectedMode,o=this.getData(i);if(a==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},t.prototype.isSelected=function(e,i){var n=this.option.selectedMap;if(!n)return!1;var a=this.getData(i);return(n==="all"||n[To(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[mC])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,i){var n,a,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){q(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(e,i)}},t.registerClass=function(e){return ct.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(ct);Re(Je,cc);Re(Je,lc);Ay(Je,ct);function zd(r){var t=r.name;Lh(r)||(r.name=_C(r)||t)}function _C(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),i=[];return T(e,function(n){var a=t.getDimensionInfo(n);a.displayName&&i.push(a.displayName)}),i.join(" ")}function SC(r){return r.model.getRawData().count()}function bC(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),wC}function wC(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Fd(r,t){T(I1(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,St(xC,t))})}function xC(r,t){var e=Gf(r);return e&&e.setOutputEnd((t||this).count()),t}function Gf(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var i=e.currentTask;if(i){var n=i.agentStubMap;n&&(i=n.get(r.uid))}return i}}var be=function(){function r(){this.group=new Mt,this.uid=fl("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){},r.prototype.updateLayout=function(t,e,i,n){},r.prototype.updateVisual=function(t,e,i,n){},r.prototype.toggleBlurSeries=function(t,e,i){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();Ph(be);Qs(be);function dc(){var r=bt();return function(t){var e=r(t),i=t.pipelineContext,n=!!e.large,a=!!e.progressiveRender,o=e.large=!!(i&&i.large),s=e.progressiveRender=!!(i&&i.progressiveRender);return(n!==o||a!==s)&&"reset"}}var r0=bt(),TC=dc(),Ie=function(){function r(){this.group=new Mt,this.uid=fl("viewChart"),this.renderTask=ha({plan:CC,reset:MC}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.highlight=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&Gd(a,n,"emphasis")},r.prototype.downplay=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&Gd(a,n,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.updateLayout=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.eachRendered=function(t){Za(this.group,t)},r.markUpdateMethod=function(t,e){r0(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function Vd(r,t,e){r&&If(r)&&(t==="emphasis"?ba:wa)(r,e)}function Gd(r,t,e){var i=Ci(r,t),n=t&&t.highlightKey!=null?Nw(t.highlightKey):null;i!=null?T(Xt(i),function(a){Vd(r.getItemGraphicEl(a),e,n)}):r.eachItemGraphicEl(function(a){Vd(a,e,n)})}Ph(Ie);Qs(Ie);function CC(r){return TC(r.model)}function MC(r){var t=r.model,e=r.ecModel,i=r.api,n=r.payload,a=t.pipelineContext.progressiveRender,o=r.view,s=n&&r0(n).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,i,n),DC[l]}var DC={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Is="\0__throttleOriginMethod",Hd="\0__throttleRate",Wd="\0__throttleType";function pc(r,t,e){var i,n=0,a=0,o=null,s,l,u,f;t=t||0;function h(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var c=function(){for(var v=[],d=0;d=0?h():o=setTimeout(h,-s),n=i};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){f=v},c}function gc(r,t,e,i){var n=r[t];if(n){var a=n[Is]||n,o=n[Wd],s=n[Hd];if(s!==e||o!==i){if(e==null||!i)return r[t]=a;n=r[t]=pc(a,e,i==="debounce"),n[Is]=a,n[Wd]=i,n[Hd]=e}return n}}function Ps(r,t){var e=r[t];e&&e[Is]&&(e.clear&&e.clear(),r[t]=e[Is])}var Ud=bt(),Yd={itemStyle:Sa(ym,!0),lineStyle:Sa(gm,!0)},AC={lineStyle:"stroke",itemStyle:"fill"};function i0(r,t){var e=r.visualStyleMapper||Yd[t];return e||(console.warn("Unknown style type '"+t+"'."),Yd.itemStyle)}function n0(r,t){var e=r.visualDrawType||AC[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var LC={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r.getModel(i),a=i0(r,i),o=a(n),s=n.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=n0(r,i),u=o[l],f=tt(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var c=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=c,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||tt(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||tt(o.stroke)?c:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=r.getDataParams(d),y=z({},o);y[l]=f(p),v.setItemVisual(d,"style",y)}}}},On=new Ct,IC={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=i0(r,i),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){On.option=l[i];var u=n(On),f=o.ensureUniqueItemVisual(s,"style");z(f,u),On.option.decal&&(o.setItemVisual(s,"decal",On.option.decal),On.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},PC={performRawSeries:!0,overallReset:function(r){var t=rt();r.eachSeries(function(e){var i=e.getColorBy();if(!e.isColorBySeries()){var n=e.type+"-"+i,a=t.get(n);a||(a={},t.set(n,a)),Ud(e).scope=a}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var i=e.getRawData(),n={},a=e.getData(),o=Ud(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=n0(e,s);a.each(function(u){var f=a.getRawIndex(u);n[f]=u}),i.each(function(u){var f=n[u],h=a.getItemVisual(f,"colorFromPalette");if(h){var c=a.ensureUniqueItemVisual(f,"style"),v=i.getName(u)||u+"",d=i.count();c[l]=e.getColorFromPalette(v,o,d)}})}})}},Co=Math.PI;function kC(r,t){t=t||{},gt(t,{text:"loading",textColor:W.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:W.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var e=new Mt,i=new _t({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(i);var n=new Gt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new _t({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new Xa({shape:{startAngle:-Co/2,endAngle:-Co/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Co*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Co*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=n.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),a.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var a0=function(){function r(t,e,i,n){this._stageTaskMap=rt(),this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(i){var n=i.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,a=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,o=a?i.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData(),a=n.count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&a>=i.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,i=e._pipelineMap=rt();t.eachSeries(function(n){var a=n.getProgressive(),o=n.uid;i.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:a&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),e._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),i=this.api;T(this._allHandlers,function(n){var a=t.get(n.uid)||t.set(n.uid,{}),o="";hr(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,a,e,i),n.overallReset&&this._createOverallStageTask(n,a,e,i)},this)},r.prototype.prepareView=function(t,e,i,n){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=i,o.api=n,a.__block=!t.incrementalPrepareRender,this._pipe(e,a)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,i){this._performStageTasks(this._visualHandlers,t,e,i)},r.prototype._performStageTasks=function(t,e,i,n){n=n||{};var a=!1,o=this;T(t,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,c=f.overallTask;if(c){var v,d=c.agentStubMap;d.each(function(y){s(n,y)&&(y.dirty(),v=!0)}),v&&c.dirty(),o.updatePayload(c,i);var p=o.getPerformArgs(c,n.block);d.each(function(y){y.perform(p)}),c.perform(p)&&(a=!0)}else h&&h.each(function(y,g){s(n,y)&&y.dirty();var m=o.getPerformArgs(y,n.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(y.context.model),o.updatePayload(y,i),y.perform(m)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(i){e=i.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,i,n){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=rt(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?i.eachRawSeries(f):l?i.eachRawSeriesByType(l,f):u&&u(i,n).each(f);function f(h){var c=h.uid,v=s.set(c,o&&o.get(c)||ha({plan:NC,reset:zC,count:VC}));v.context={model:h,ecModel:i,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(h,v)}},r.prototype._createOverallStageTask=function(t,e,i,n){var a=this,o=e.overallTask=e.overallTask||ha({reset:RC});o.context={ecModel:i,api:n,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=rt(),u=t.seriesType,f=t.getTargetSeries,h=!0,c=!1,v="";hr(!t.createOnAllSeries,v),u?i.eachRawSeriesByType(u,d):f?f(i,n).each(d):(h=!1,T(i.getSeries(),d));function d(p){var y=p.uid,g=l.set(y,s&&s.get(y)||(c=!0,ha({reset:EC,onDirty:BC})));g.context={model:p,overallProgress:h},g.agent=o,g.__block=h,a._pipe(p,g)}c&&o.dirty()},r.prototype._pipe=function(t,e){var i=t.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},r.wrapStageHandler=function(t,e){return tt(t)&&(t={overallReset:t,seriesType:GC(t)}),t.uid=fl("stageHandler"),e&&(t.visualType=e),t},r}();function RC(r){r.overallReset(r.ecModel,r.api,r.payload)}function EC(r){return r.overallProgress&&OC}function OC(){this.agent.dirty(),this.getDownstream().dirty()}function BC(){this.agent&&this.agent.dirty()}function NC(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function zC(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Xt(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?Z(t,function(e,i){return o0(i)}):FC}var FC=o0(0);function o0(r){return function(t,e){var i=e.data,n=e.resetDefines[r];if(n&&n.dataEach)for(var a=t.start;a0&&v===u.length-c.length){var d=u.slice(0,v);d!=="data"&&(e.mainType=d,e[c.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(i[u]=l,f=!0),f||(n[u]=l)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},r.prototype.filter=function(t,e){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,a,"name")&&f(u,a,"dataIndex")&&f(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,a));function f(h,c,v,d){return h[v]==null||c[d||v]===h[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),Hf=["symbol","symbolSize","symbolRotate","symbolOffset"],Zd=Hf.concat(["symbolKeepAspect"]),UC={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},n={},a=!1,o=0;o=0&&yi(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function Wf(r,t,e){for(var i=t.type==="radial"?oM(r,t,e):aM(r,t,e),n=t.colorStops,a=0;a0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:pt(r)?[r]:V(r)?r:null}function h0(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&lM(t.lineDash,t.lineWidth),i=t.lineDashOffset;if(e){var n=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(e=Z(e,function(a){return a/n}),i/=n)}return[e,i]}var uM=new Mi(!0);function Es(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function $d(r){return typeof r=="string"&&r!=="none"}function Os(r){var t=r.fill;return t!=null&&t!=="none"}function qd(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function Kd(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function Uf(r,t,e){var i=Ly(t.image,t.__image,e);if(Js(i)){var n=r.createPattern(i,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*P1),a.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(a)}return n}}function fM(r,t,e,i){var n,a=Es(e),o=Os(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||uM,h=t.__dirty;if(!i){var c=e.fill,v=e.stroke,d=o&&!!c.colorStops,p=a&&!!v.colorStops,y=o&&!!c.image,g=a&&!!v.image,m=void 0,_=void 0,S=void 0,b=void 0,w=void 0;(d||p)&&(w=t.getBoundingRect()),d&&(m=h?Wf(r,c,w):t.__canvasFillGradient,t.__canvasFillGradient=m),p&&(_=h?Wf(r,v,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),y&&(S=h||!t.__canvasFillPattern?Uf(r,c,t):t.__canvasFillPattern,t.__canvasFillPattern=S),g&&(b=h||!t.__canvasStrokePattern?Uf(r,v,t):t.__canvasStrokePattern,t.__canvasStrokePattern=b),d?r.fillStyle=m:y&&(S?r.fillStyle=S:o=!1),p?r.strokeStyle=_:g&&(b?r.strokeStyle=b:a=!1)}var x=t.getGlobalScale();f.setScale(x[0],x[1],t.segmentIgnoreThreshold);var C,D;r.setLineDash&&e.lineDash&&(n=h0(t),C=n[0],D=n[1]);var A=!0;(u||h&tn)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),A=!1),f.reset(),t.buildPath(f,t.shape,i),f.toStatic(),t.pathUpdated()),A&&f.rebuildPath(r,l?s:1),C&&(r.setLineDash(C),r.lineDashOffset=D),i||(e.strokeFirst?(a&&Kd(r,e),o&&qd(r,e)):(o&&qd(r,e),a&&Kd(r,e))),C&&r.setLineDash([])}function hM(r,t,e){var i=t.__image=Ly(e.image,t.__image,t,t.onload);if(!(!i||!Js(i))){var n=e.x||0,a=e.y||0,o=t.getWidth(),s=t.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),e.sWidth&&e.sHeight){var u=e.sx||0,f=e.sy||0;r.drawImage(i,u,f,e.sWidth,e.sHeight,n,a,o,s)}else if(e.sx&&e.sy){var u=e.sx,f=e.sy,h=o-u,c=s-f;r.drawImage(i,u,f,h,c,n,a,o,s)}else r.drawImage(i,n,a,o,s)}}function cM(r,t,e){var i,n=e.text;if(n!=null&&(n+=""),n){r.font=e.font||Rr,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(i=h0(t),a=i[0],o=i[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(Es(e)&&r.strokeText(n,e.x,e.y),Os(e)&&r.fillText(n,e.x,e.y)):(Os(e)&&r.fillText(n,e.x,e.y),Es(e)&&r.strokeText(n,e.x,e.y)),a&&r.setLineDash([])}}var Qd=["shadowBlur","shadowOffsetX","shadowOffsetY"],Jd=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function c0(r,t,e,i,n){var a=!1;if(!i&&(e=e||{},t===e))return!1;if(i||t.opacity!==e.opacity){te(r,n),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?bi.opacity:o}(i||t.blend!==e.blend)&&(a||(te(r,n),a=!0),r.globalCompositeOperation=t.blend||bi.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,i,n){if(!this[Lt]){if(this._disposed){this.id;return}var a,o,s;if(q(i)&&(n=i.lazyUpdate,a=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[Lt]=!0,qi(this),!this._model||i){var l=new TT(this._api),u=this._theme,f=this._model=new uc;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},qf);var h={seriesTransition:s,optionChanged:!0};if(n)this[kt]={silent:a,updateParams:h},this[Lt]=!1,this.getZr().wakeUp();else{try{hi(this),ir.update.call(this,null,h)}catch(c){throw this[kt]=null,this[Lt]=!1,c}this._ssr||this._zr.flush(),this[kt]=null,this[Lt]=!1,Zi.call(this,a),$i.call(this,a)}}},t.prototype.setTheme=function(e,i){if(!this[Lt]){if(this._disposed){this.id;return}var n=this._model;if(n){var a=i&&i.silent,o=null;this[kt]&&(a==null&&(a=this[kt].silent),o=this[kt].updateParams,this[kt]=null),this[Lt]=!0,qi(this);try{this._updateTheme(e),n.setTheme(this._theme),hi(this),ir.update.call(this,{type:"setTheme"},o)}catch(s){throw this[Lt]=!1,s}this[Lt]=!1,Zi.call(this,a),$i.call(this,a)}}},t.prototype._updateTheme=function(e){Y(e)&&(e=L0[e]),e&&(e=at(e),e&&Fm(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||et.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var i=this._zr.painter;return i.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr,i=e.storage.getDisplayList();return T(i,function(n){n.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var i=e.excludeComponents,n=this._model,a=[],o=this;T(i,function(l){n.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return T(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var i=e.type==="svg",n=this.group,a=Math.min,o=Math.max,s=1/0;if(vp[n]){var l=s,u=s,f=-s,h=-s,c=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();T(ca,function(_,S){if(_.group===n){var b=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(at(e)),w=_.getDom().getBoundingClientRect();l=a(w.left,l),u=a(w.top,u),f=o(w.right,f),h=o(w.bottom,h),c.push({dom:b,left:w.left,top:w.top})}}),l*=v,u*=v,f*=v,h*=v;var d=f-l,p=h-u,y=fr.createCanvas(),g=pv(y,{renderer:i?"svg":"canvas"});if(g.resize({width:d,height:p}),i){var m="";return T(c,function(_){var S=_.left-l,b=_.top-u;m+=''+_.dom+""}),g.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return e.connectedBackgroundColor&&g.add(new _t({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),T(c,function(_){var S=new vr({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});g.add(S)}),g.refreshImmediately(),y.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,i,n){return Io(this,"convertToPixel",e,i,n)},t.prototype.convertToLayout=function(e,i,n){return Io(this,"convertToLayout",e,i,n)},t.prototype.convertFromPixel=function(e,i,n){return Io(this,"convertFromPixel",e,i,n)},t.prototype.containPixel=function(e,i){if(this._disposed){this.id;return}var n=this._model,a,o=Hl(n,e);return T(o,function(s,l){l.indexOf("Models")>=0&&T(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(i);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(a=a||h.containPoint(i,u))}},this)},this),!!a},t.prototype.getVisual=function(e,i){var n=this._model,a=Hl(n,e,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?XC(s,l,i):f0(s,i)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;T(NM,function(n){var a=function(o){var s=e.getModel(),l=o.target,u,f=n==="globalout";if(f?u={}:l&&jn(l,function(p){var y=ft(p);if(y&&y.dataIndex!=null){var g=y.dataModel||s.getSeriesByIndex(y.seriesIndex);return u=g&&g.getDataParams(y.dataIndex,y.dataType,l)||{},!0}else if(y.eventData)return u=z({},y.eventData),!0},!0),u){var h=u.componentType,c=u.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",c=u.seriesIndex);var v=h&&c!=null&&s.getComponent(h,c),d=v&&e[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];u.event=o,u.type=n,e._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:v,view:d},e.trigger(n,u)}};a.zrEventfulCallAtLast=!0,e._zr.on(n,a,e)});var i=this._messageCenter;T(Zf,function(n,a){i.on(a,function(o){e.trigger(a,o)})}),ZC(i,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&My(this.getDom(),Sc,"");var i=this,n=i._api,a=i._model;T(i._componentsViews,function(o){o.dispose(a,n)}),T(i._chartsViews,function(o){o.dispose(a,n)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete ca[i.id]},t.prototype.resize=function(e){if(!this[Lt]){if(this._disposed){this.id;return}this._zr.resize(e);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var n=i.resetOption("media"),a=e&&e.silent;this[kt]&&(a==null&&(a=this[kt].silent),n=!0,this[kt]=null),this[Lt]=!0,qi(this);try{n&&hi(this),ir.update.call(this,{type:"resize",animation:z({duration:0},e&&e.animation)})}catch(o){throw this[Lt]=!1,o}this[Lt]=!1,Zi.call(this,a),$i.call(this,a)}}},t.prototype.showLoading=function(e,i){if(this._disposed){this.id;return}if(q(e)&&(i=e,e=""),e=e||"default",this.hideLoading(),!!Kf[e]){var n=Kf[e](this._api,i),a=this._zr;this._loadingFX=n,a.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var i=z({},e);return i.type=Xf[e.type],i},t.prototype.dispatchAction=function(e,i){if(this._disposed){this.id;return}if(q(i)||(i={silent:!!i}),!!Bs[e.type]&&this._model){if(this[Lt]){this._pendingActions.push(e);return}var n=i.silent;bu.call(this,e,n);var a=i.flush;a?this._zr.flush():a!==!1&&et.browser.weChat&&this._throttledZrFlush(),Zi.call(this,n),$i.call(this,n)}},t.prototype.updateLabelLayout=function(){Ae.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var i=e.seriesIndex,n=this.getModel(),a=n.getSeriesByIndex(i);a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){hi=function(h){var c=h._scheduler;c.restorePipelines(h._model),c.prepareStageTasks(),_u(h,!0),_u(h,!1),c.plan()},_u=function(h,c){for(var v=h._model,d=h._scheduler,p=c?h._componentsViews:h._chartsViews,y=c?h._componentsMap:h._chartsMap,g=h._zr,m=h._api,_=0;_c.get("hoverLayerThreshold")&&!et.node&&!et.worker&&c.eachSeries(function(y){if(!y.preventUsingHoverLayer){var g=h._chartsMap[y.__viewId];g.__alive&&g.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function s(h,c){var v=h.get("blendMode")||null;c.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function l(h,c){if(!h.preventAutoZ){var v=Xh(h);c.eachRendered(function(d){return Zh(d,v.z,v.zlevel),!0})}}function u(h,c){c.eachRendered(function(v){if(!sa(v)){var d=v.getTextContent(),p=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function f(h,c){var v=h.getModel("stateAnimation"),d=h.isAnimationEnabled(),p=v.get("duration"),y=p>0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;c.eachRendered(function(g){if(g.states&&g.states.emphasis){if(sa(g))return;if(g instanceof vt&&zw(g),g.__dirty){var m=g.prevStates;m&&g.useStates(m)}if(d){g.stateTransition=y;var _=g.getTextContent(),S=g.getTextGuideLine();_&&(_.stateTransition=y),S&&(S.stateTransition=y)}g.__dirty&&a(g)}})}hp=function(h){return new(function(c){F(v,c);function v(){return c!==null&&c.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return h._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){ba(d,p),fe(h)},v.prototype.leaveEmphasis=function(d,p){wa(d,p),fe(h)},v.prototype.enterBlur=function(d){Hy(d),fe(h)},v.prototype.leaveBlur=function(d){Nh(d),fe(h)},v.prototype.enterSelect=function(d){Wy(d),fe(h)},v.prototype.leaveSelect=function(d){Uy(d),fe(h)},v.prototype.getModel=function(){return h.getModel()},v.prototype.getViewOfComponentModel=function(d){return h.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return h.getViewOfSeriesModel(d)},v.prototype.getMainProcessVersion=function(){return h[Ao]},v}(Nm))(h)},D0=function(h){function c(v,d){for(var p=0;p=0)){dp.push(e);var a=a0.wrapStageHandler(e,n);a.__prio=t,a.__raw=e,r.push(a)}}function R0(r,t){Kf[r]=t}function YM(r,t,e){var i=wM("registerMap");i&&i(r,t,e)}var XM=jT;Ri(mc,LC);Ri(gl,IC);Ri(gl,PC);Ri(mc,UC);Ri(gl,YC);Ri(b0,SM);P0(Fm);k0(CM,BT);R0("default",kC);Mn({type:wi,event:wi,update:wi},ee);Mn({type:ts,event:ts,update:ts},ee);Mn({type:ws,event:Oh,update:ws,action:ee,refineEvent:xc,publishNonRefinedEvent:!0});Mn({type:Mf,event:Oh,update:Mf,action:ee,refineEvent:xc,publishNonRefinedEvent:!0});Mn({type:xs,event:Oh,update:xs,action:ee,refineEvent:xc,publishNonRefinedEvent:!0});function xc(r,t,e,i){return{eventContent:{selected:Rw(e),isFromClick:t.isFromClick||!1}}}I0("default",{});I0("dark",u0);function Nn(r){return r==null?0:r.length||1}function pp(r){return r}var ZM=function(){function r(t,e,i,n,a,o){this._old=t,this._new=e,this._oldKeyGetter=i||pp,this._newKeyGetter=n||pp,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,i={},n=new Array(t.length),a=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,i,a,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(f,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,i)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,i={},n={},a=[],o=[];this._initIndexMap(t,i,a,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var s=0;s1&&c===1)this._updateManyToOne&&this._updateManyToOne(f,u),n[l]=null;else if(h===1&&c>1)this._updateOneToMany&&this._updateOneToMany(f,u),n[l]=null;else if(h===1&&c===1)this._update&&this._update(f,u),n[l]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(f,u),n[l]=null;else if(h>1)for(var v=0;v1)for(var s=0;s30}var zn=q,_r=Z,tD=typeof Int32Array>"u"?Array:Int32Array,eD="e\0\0",gp=-1,rD=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],iD=["_approximateExtent"],yp,ko,Fn,Vn,Tu,Gn,Cu,ss=function(){function r(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var i,n=!1;O0(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,i=t),i=i||["x","y"];for(var a={},o=[],s={},l=!1,u={},f=0;f=e)){var i=this._store,n=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===le;if(l&&!n.pure)for(var u=[],f=t;f0},r.prototype.ensureUniqueItemVisual=function(t,e){var i=this._itemVisuals,n=i[t];n||(n=i[t]={});var a=n[e];return a==null&&(a=this.getVisual(e),V(a)?a=a.slice():zn(a)&&(a=z({},a)),n[e]=a),a},r.prototype.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,zn(e)?z(n,e):n[e]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){zn(t)?z(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?z(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var i=this.hostModel&&this.hostModel.seriesIndex;_w(i,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){T(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:_r(this.dimensions,this._getDimInfo,this),this.hostModel)),Tu(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var i=this[t];tt(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=i.apply(this,arguments);return e.apply(this,[n].concat(Sh(arguments)))})},r.internalField=function(){yp=function(t){var e=t._invertedIndicesMap;T(e,function(i,n){var a=t._dimInfos[n],o=a.ordinalMeta,s=t._store;if(o){i=e[n]=new tD(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),n[e]=l}}}(),r}();function nD(r,t){fc(r)||(r=Vm(r)),t=t||{};var e=t.coordDimensions||[],i=t.dimensionsDefine||r.dimensionsDefine||[],n=rt(),a=[],o=oD(r,e,i,t.dimensionsCount),s=t.canOmitUnusedDimensions&&z0(o),l=i===r.dimensionsDefine,u=l?N0(r):B0(i),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var h=rt(f),c=new $m(o),v=0;v0&&(i.name=n+(a-1)),a++,t.set(n,a)}}function oD(r,t,e,i){var n=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,i||0);return T(t,function(a){var o;q(a)&&(o=a.dimsDef)&&(n=Math.max(n,o.length))}),n}function sD(r,t,e){if(e||t.hasKey(r)){for(var i=0;t.hasKey(r+i);)i++;r+=i}return t.set(r,!0),r}var lD=function(){function r(t){this.coordSysDims=[],this.axisMap=rt(),this.categoryAxisMap=rt(),this.coordSysName=t}return r}();function uD(r){var t=r.get("coordinateSystem"),e=new lD(t),i=fD[t];if(i)return i(r,e,e.axisMap,e.categoryAxisMap),e}var fD={cartesian2d:function(r,t,e,i){var n=r.getReferringComponents("xAxis",Yt).models[0],a=r.getReferringComponents("yAxis",Yt).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",a),Ki(n)&&(i.set("x",n),t.firstCategoryDimIndex=0),Ki(a)&&(i.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,i){var n=r.getReferringComponents("singleAxis",Yt).models[0];t.coordSysDims=["single"],e.set("single",n),Ki(n)&&(i.set("single",n),t.firstCategoryDimIndex=0)},polar:function(r,t,e,i){var n=r.getReferringComponents("polar",Yt).models[0],a=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),Ki(a)&&(i.set("radius",a),t.firstCategoryDimIndex=0),Ki(o)&&(i.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,i){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,i){var n=r.ecModel,a=n.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();T(a.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=o[l];e.set(f,u),Ki(u)&&(i.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(r,t,e,i){var n=r.getReferringComponents("matrix",Yt).models[0];t.coordSysDims=["x","y"];var a=n.getDimensionModel("x"),o=n.getDimensionModel("y");e.set("x",a),e.set("y",o),i.set("x",a),i.set("y",o)}};function Ki(r){return r.get("type")==="category"}function hD(r,t,e){e=e||{};var i=e.byIndex,n=e.stackedCoordDimension,a,o,s;cD(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,h,c;if(T(a,function(m,_){Y(m)&&(a[_]=m={name:m}),l&&!m.isExtraCoord&&(!i&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(f=m))}),f&&!i&&!u&&(i=!0),f){h="__\0ecstackresult_"+r.id,c="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=f.coordDim,d=f.type,p=0;T(a,function(m){m.coordDim===v&&p++});var y={name:h,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},g={name:c,coordDim:c,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(y.storeDimIndex=s.ensureCalculationDimension(c,d),g.storeDimIndex=s.ensureCalculationDimension(h,d)),o.appendCalculationDimension(y),o.appendCalculationDimension(g)):(a.push(y),a.push(g))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:c,stackResultDimension:h}}function cD(r){return!O0(r.schema)}function Ii(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function F0(r,t){return Ii(r,t)?r.getCalculationInfo("stackResultDimension"):t}function vD(r,t){var e=r.get("coordinateSystem"),i=ac.get(e),n;return t&&t.coordSysDims&&(n=Z(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=KM(l)}return o})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function dD(r,t,e){var i,n;return e&&T(r,function(a,o){var s=a.coordDim,l=e.categoryAxisMap.get(s);l&&(i==null&&(i=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(n=!0)}),!n&&i!=null&&(r[i].otherDims.itemName=0),i}function Tc(r,t,e){e=e||{};var i=t.getSourceManager(),n,a=!1;n=i.getSource(),a=n.sourceFormat===le;var o=uD(t),s=vD(t,o),l=e.useEncodeDefaulter,u=tt(l)?l:l?St(hT,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=nD(n,f),c=dD(h.dimensions,e.createInvertedIndices,o),v=a?null:i.getSharedDataStore(h),d=hD(t,{schema:h,store:v}),p=new ss(h,t);p.setCalculationInfo(d);var y=c!=null&&pD(n)?function(g,m,_,S){return S===c?_:this.defaultDimValueGetter(g,m,_,S)}:null;return p.hasItemOption=!1,p.initData(a?n:v,null,y),p}function pD(r){if(r.sourceFormat===le){var t=gD(r.data||[]);return!V(Fa(t))}}function gD(r){for(var t=0;tn&&(o=a.interval=n);var s=a.intervalPrecision=ka(o),l=a.niceTickExtent=[Ot(Math.ceil(r[0]/o)*o,s),Ot(Math.floor(r[1]/o)*o,s)];return mD(l,r),a}function Mu(r){var t=Math.pow(10,Ah(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Ot(e*t)}function ka(r){return Ue(r)+2}function mp(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function mD(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),mp(r,0,t),mp(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function Cc(r,t){return r>=t[0]&&r<=t[1]}var _D=function(){function r(){this.normalize=_p,this.scale=Sp}return r.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=nt(t.normalize,t),this.scale=nt(t.scale,t)):(this.normalize=_p,this.scale=Sp)},r}();function _p(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function Sp(r,t){return r*(t[1]-t[0])+t[0]}function Jf(r,t,e){var i=Math.log(r);return[Math.log(e?t[0]:Math.max(0,t[0]))/i,Math.log(e?t[1]:Math.max(0,t[1]))/i]}var zr=function(){function r(t){this._calculator=new _D,this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype._innerUnionExtent=function(t){var e=this._extent;this._innerSetExtent(t[0]e[1]?t[1]:e[1])},r.prototype.unionExtentFromData=function(t,e){this._innerUnionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){this._innerSetExtent(t,e)},r.prototype._innerSetExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e),this._brkCtx&&this._brkCtx.update(i)},r.prototype.setBreaksFromOption=function(t){},r.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r}();Qs(zr);var SD=0,jf=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++SD,this._onCollect=t.onCollect}return r.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&Z(i,bD);return new r({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,i=this._needCollect;if(!Y(t)&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,this._onCollect&&this._onCollect(t,e),e;var n=this._getOrCreateMap();return e=n.get(t),e==null&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e),this._onCollect&&this._onCollect(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=rt(this.categories))},r}();function bD(r){return q(r)&&r.value!=null?r.value:r+""}var V0=function(r){F(t,r);function t(e){var i=r.call(this,e)||this;i.type="ordinal";var n=i.getSetting("ordinalMeta");return n||(n=new jf({})),V(n)&&(n=new jf({categories:Z(n,function(a){return q(a)?a.value:a})})),i._ordinalMeta=n,i._extent=i.getSetting("extent")||[0,n.categories.length-1],i}return t.prototype.parse=function(e){return e==null?NaN:Y(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return Cc(e,this._extent)&&e>=0&&e=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(zr);zr.registerClass(V0);var Sr=Ot,mn=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e==null||e===""?NaN:Number(e)},t.prototype.contain=function(e){return Cc(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=ka(e)},t.prototype.getTicks=function(e){e=e||{};var i=this._interval,n=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=As(),l=[];if(!i)return l;e.breakTicks;var u=1e4;n[0]=0&&(h=Sr(h+c*i,o))}if(l.length>0&&h===l[l.length-1].value)break;if(l.length>u)return[]}var v=l.length?l[l.length-1].value:a[1];return n[1]>v&&(e.expandToNicedExtent?l.push({value:Sr(v+i,o)}):l.push({value:n[1]})),e.breakTicks,l},t.prototype.getMinorTicks=function(e){for(var i=this.getTicks({expandToNicedExtent:!0}),n=[],a=this.getExtent(),o=1;oa[0]&&d0&&(a=a===null?s:Math.min(a,s))}e[i]=a}}return e}function U0(r){var t=TD(r),e=[];return T(r,function(i){var n=i.coordinateSystem,a=n.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],f=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),c=Math.abs(h[1]-h[0]);s=u?f/c*u:f}else{var v=i.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=Pt(i.get("barWidth"),s),p=Pt(i.get("barMaxWidth"),s),y=Pt(i.get("barMinWidth")||(X0(i)?.5:1),s),g=i.get("barGap"),m=i.get("barCategoryGap"),_=i.get("defaultBarGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:y,barGap:g,barCategoryGap:m,defaultBarGap:_,axisKey:Mc(a),stackId:H0(i)})}),CD(e)}function CD(r){var t={};T(r,function(i,n){var a=i.axisKey,o=i.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:i.defaultBarGap||0,stacks:{}},l=s.stacks;t[a]=s;var u=i.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=i.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=i.barMaxWidth;h&&(l[u].maxWidth=h);var c=i.barMinWidth;c&&(l[u].minWidth=c);var v=i.barGap;v!=null&&(s.gap=v);var d=i.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return T(t,function(i,n){e[n]={};var a=i.stacks,o=i.bandWidth,s=i.categoryGap;if(s==null){var l=xt(a).length;s=Math.max(35-l*4,15)+"%"}var u=Pt(s,o),f=Pt(i.gap,1),h=i.remainedWidth,c=i.autoWidthCount,v=(h-u)/(c+(c-1)*f);v=Math.max(v,0),T(a,function(g){var m=g.maxWidth,_=g.minWidth;if(g.width){var S=g.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),g.width=S,h-=S+f*S,c--}else{var S=v;m&&mS&&(S=_),S!==v&&(g.width=S,h-=S+f*S,c--)}}),v=(h-u)/(c+(c-1)*f),v=Math.max(v,0);var d=0,p;T(a,function(g,m){g.width||(g.width=v),p=g,d+=g.width*(1+f)}),p&&(d-=p.width*f);var y=-d/2;T(a,function(g,m){e[n][m]=e[n][m]||{bandWidth:o,offset:y,width:g.width},y+=g.width*(1+f)})}),e}function MD(r,t,e){if(r&&t){var i=r[Mc(t)];return i}}function DD(r,t){var e=W0(r,t),i=U0(e);T(e,function(n){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=H0(n),u=i[Mc(s)][l],f=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function AD(r){return{seriesType:r,plan:dc(),reset:function(t){if(Y0(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),a=i.getOtherAxis(n),o=e.getDimensionIndex(e.mapDimension(a.dim)),s=e.getDimensionIndex(e.mapDimension(n.dim)),l=t.get("showBackground",!0),u=e.mapDimension(a.dim),f=e.getCalculationInfo("stackResultDimension"),h=Ii(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),c=a.isHorizontal(),v=LD(n,a),d=X0(t),p=t.get("barMinHeight")||0,y=f&&e.getDimensionIndex(f),g=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,S){for(var b=_.count,w=d&&sr(b*3),x=d&&l&&sr(b*3),C=d&&sr(b),D=i.master.getRect(),A=c?D.width:D.height,M,I=S.getStore(),L=0;(M=_.next())!=null;){var P=I.get(h?y:o,M),k=I.get(s,M),B=v,U=void 0;h&&(U=+P-I.get(o,M));var O=void 0,H=void 0,R=void 0,E=void 0;if(c){var N=i.dataToPoint([P,k]);if(h){var X=i.dataToPoint([U,k]);B=X[0]}O=B,H=N[1]+m,R=N[0]-B,E=g,Math.abs(R)0?e:1:e))}var ID=function(r,t,e,i){for(;e>>1;r[n][1]n&&(this._approxInterval=n);var o=Ro.length,s=Math.min(ID(Ro,this._approxInterval,0,o),o-1);this._interval=Ro[s][1],this._intervalPrecision=ka(this._interval),this._minLevelUnit=Ro[Math.max(s-1,0)][0]},t.prototype.parse=function(e){return pt(e)?e:+xn(e)},t.prototype.contain=function(e){return Cc(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.type="time",t}(mn),Ro=[["second",Qh],["minute",Jh],["hour",la],["quarter-day",la*6],["half-day",la*12],["day",me*1.2],["half-week",me*3.5],["week",me*7],["month",me*31],["quarter",me*95],["half-year",fd/2],["year",fd]];function PD(r,t,e,i){return Of(new Date(t),r,i).getTime()===Of(new Date(e),r,i).getTime()}function kD(r,t){return r/=me,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function RD(r){var t=30*me;return r/=t,r>6?6:r>3?3:r>2?2:1}function ED(r){return r/=la,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function bp(r,t){return r/=t?Jh:Qh,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function OD(r){return Sy(r)}function BD(r,t,e){var i=Math.max(0,ot(xi,t)-1);return Of(new Date(r),xi[i],e).getTime()}function ND(r,t){var e=new Date(0);e[r](1);var i=e.getTime();e[r](1+t);var n=e.getTime()-i;return function(a,o){return Math.max(0,Math.round((o-a)/n))}}function zD(r,t,e,i,n,a){var o=1e4,s=Ux,l=0;function u(L,P,k,B,U,O,H){for(var R=ND(U,L),E=P,N=new Date(E);Eo));)if(N[U](N[B]()+L),E=N.getTime(),a){var X=a.calcNiceTickMultiple(E,R);X>0&&(N[U](N[B]()+X*L),E=N.getTime())}H.push({value:E,notAdd:!0})}function f(L,P,k){var B=[],U=!P.length;if(!PD(ua(L),i[0],i[1],e)){U&&(P=[{value:BD(i[0],L,e)},{value:i[1]}]);for(var O=0;O=i[0]&&H<=i[1]&&u(E,H,R,N,X,J,B),L==="year"&&k.length>1&&O===0&&k.unshift({value:k[0].value-E})}}for(var O=0;O=i[0]&&S<=i[1]&&v++)}var b=n/t;if(v>b*1.5&&d>b/1.5||(h.push(m),v>b||r===s[p]))break}c=[]}}}for(var w=It(Z(h,function(L){return It(L,function(P){return P.value>=i[0]&&P.value<=i[1]&&!P.notAdd})}),function(L){return L.length>0}),x=[],C=w.length-1,p=0;p0;)a*=10;var s=[th(VD(i[0]/a)*a),th(FD(i[1]/a)*a)];this._interval=a,this._intervalPrecision=ka(a),this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){r.prototype.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.contain=function(e){return e=Oo(e)/Oo(this.base),r.prototype.contain.call(this,e)},t.prototype.normalize=function(e){return e=Oo(e)/Oo(this.base),r.prototype.normalize.call(this,e)},t.prototype.scale=function(e){return e=r.prototype.scale.call(this,e),Eo(this.base,e)},t.prototype.setBreaksFromOption=function(e){},t.type="log",t}(mn);function Du(r,t){return th(r,Ue(t))}zr.registerClass($0);var GD=function(){function r(t,e,i){this._prepareParams(t,e,i)}return r.prototype._prepareParams=function(t,e,i){i[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var c=this._determinedMin,v=this._determinedMax;return c!=null&&(s=c,u=!0),v!=null&&(l=v,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:h}},r.prototype.modifyDataMinMax=function(t,e){this[WD[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var i=HD[t];this[i]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),HD={min:"_determinedMin",max:"_determinedMax"},WD={min:"_dataMin",max:"_dataMax"};function q0(r,t,e){var i=r.rawExtentInfo;return i||(i=new GD(r,t,e),r.rawExtentInfo=i,i)}function Bo(r,t){return t==null?null:pa(t)?NaN:r.parse(t)}function K0(r,t){var e=r.type,i=q0(r,t,r.getExtent()).calculate();r.setBlank(i.isBlank);var n=i.min,a=i.max,o=t.ecModel;if(o&&e==="time"){var s=W0("bar",o),l=!1;if(T(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=U0(s),f=UD(n,a,t,u);n=f.min,a=f.max}}return{extent:[n,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function UD(r,t,e,i){var n=e.axis.getExtent(),a=Math.abs(n[1]-n[0]),o=MD(i,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;T(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;T(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-r,h=1-(s+l)/a,c=f/h-f;return t+=c*(l/u),r-=c*(s/u),{min:r,max:t}}function wp(r,t){var e=t,i=K0(r,e),n=i.extent,a=e.get("splitNumber");r instanceof $0&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(j0(e)),r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function YD(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new V0({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new Z0({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(zr.getClass(t)||mn)}}function XD(r){var t=r.scale.getExtent(),e=t[0],i=t[1];return!(e>0&&i>0||e<0&&i<0)}function qa(r){var t=r.getLabelModel().get("formatter");if(r.type==="time"){var e=Yx(t);return function(n,a){return r.scale.getFormattedLabel(n,a,e)}}else{if(Y(t))return function(n){var a=r.scale.getLabel(n),o=t.replace("{value}",a??"");return o};if(tt(t)){if(r.type==="category")return function(n,a){return t(zs(r,n),n.value-r.scale.getExtent()[0],null)};var i=As();return function(n,a){var o=null;return i&&(o=i.makeAxisLabelFormatterParamBreak(o,n.break)),t(zs(r,n),a,o)}}else return function(n){return r.scale.getLabel(n)}}}function zs(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function Dc(r){var t=r.get("interval");return t??"auto"}function Q0(r){return r.type==="category"&&Dc(r.getLabelModel())===0}function J0(r,t){var e={};return T(r.mapDimensionsAll(t),function(i){e[F0(r,i)]=!0}),xt(e)}function ZD(r,t,e){t&&T(J0(t,e),function(i){var n=t.getApproximateExtent(i);n[0]r[1]&&(r[1]=n[1])})}function _n(r){return r==="middle"||r==="center"}function Ra(r){return r.getShallow("show")}function j0(r){var t=r.get("breaks",!0);t==null}var $D=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}(),xp=[],qD={registerPreprocessor:P0,registerProcessor:k0,registerPostInit:GM,registerPostUpdate:HM,registerUpdateLifecycle:bc,registerAction:Mn,registerCoordinateSystem:WM,registerLayout:UM,registerVisual:Ri,registerTransform:XM,registerLoading:R0,registerMap:YM,registerImpl:bM,PRIORITY:EM,ComponentModel:ct,ComponentView:be,SeriesModel:Je,ChartView:Ie,registerComponentModel:function(r){ct.registerClass(r)},registerComponentView:function(r){be.registerClass(r)},registerSeriesModel:function(r){Je.registerClass(r)},registerChartView:function(r){Ie.registerClass(r)},registerCustomSeries:function(r,t){},registerSubTypeDefaulter:function(r,t){ct.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){ZS(r,t)}};function Br(r){if(V(r)){T(r,function(t){Br(t)});return}ot(xp,r)>=0||(xp.push(r),tt(r)&&(r={install:r}),r.install(qD))}const KD=Object.freeze(Object.defineProperty({__proto__:null,Arc:Xa,BezierCurve:Ya,BoundingRect:it,Circle:Ha,CompoundPath:jy,Ellipse:il,Group:Mt,Image:vr,IncrementalDisplayable:im,Line:Qe,LinearGradient:Fh,Polygon:Wa,Polyline:Ua,RadialGradient:em,Rect:_t,Ring:nl,Sector:Pi,Text:Gt,clipPointsByRect:cm,clipRectByRect:vm,createIcon:ol,extendPath:om,extendShape:am,getShapeClass:sm,getTransform:Wh,initProps:Pe,makeImage:Gh,makePath:al,mergePath:um,registerShape:we,resizePath:Hh,updateProps:Zt},Symbol.toStringTag,{value:"Module"}));var QD=bt(),va=bt(),ke={estimate:1,determine:2};function Fs(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function t_(r,t){var e=Z(t,function(i){return r.scale.parse(i)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function JD(r,t){var e=r.getLabelModel().get("customValues");if(e){var i=qa(r),n=r.scale.getExtent(),a=t_(r,e),o=It(a,function(s){return s>=n[0]&&s<=n[1]});return{labels:Z(o,function(s){var l={value:s};return{formattedLabel:i(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?tA(r,t):rA(r)}function jD(r,t,e){var i=r.getTickModel().get("customValues");if(i){var n=r.scale.getExtent(),a=t_(r,i);return{ticks:It(a,function(o){return o>=n[0]&&o<=n[1]})}}return r.type==="category"?eA(r,t):{ticks:Z(r.scale.getTicks(e),function(o){return o.value})}}function tA(r,t){var e=r.getLabelModel(),i=e_(r,e,t);return!e.get("show")||r.scale.isBlank()?{labels:[]}:i}function e_(r,t,e){var i=nA(r),n=Dc(t),a=e.kind===ke.estimate;if(!a){var o=i_(i,n);if(o)return o}var s,l;tt(n)?s=o_(r,n):(l=n==="auto"?aA(r,e):n,s=a_(r,l));var u={labels:s,labelCategoryInterval:l};return a?e.out.noPxChangeTryDetermine.push(function(){return eh(i,n,u),!0}):eh(i,n,u),u}function eA(r,t){var e=iA(r),i=Dc(t),n=i_(e,i);if(n)return n;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),tt(i))a=o_(r,i,!0);else if(i==="auto"){var s=e_(r,r.getLabelModel(),Fs(ke.determine));o=s.labelCategoryInterval,a=Z(s.labels,function(l){return l.tickValue})}else o=i,a=a_(r,o,!0);return eh(e,i,{ticks:a,tickCategoryInterval:o})}function rA(r){var t=r.scale.getTicks(),e=qa(r);return{labels:Z(t,function(i,n){return{formattedLabel:e(i,n),rawLabel:r.scale.getLabel(i),tickValue:i.value,time:i.time,break:i.break}})}}var iA=r_("axisTick"),nA=r_("axisLabel");function r_(r){return function(e){return va(e)[r]||(va(e)[r]={list:[]})}}function i_(r,t){for(var e=0;ef&&(u=Math.max(1,Math.floor(l/f)));for(var h=s[0],c=r.dataToCoord(h+1)-r.dataToCoord(h),v=Math.abs(c*Math.cos(a)),d=Math.abs(c*Math.sin(a)),p=0,y=0;h<=s[1];h+=u){var g=0,m=0,_=dy(n({value:h}),i.font,"center","top");g=_.width*1.3,m=_.height*1.3,p=Math.max(p,g,7),y=Math.max(y,m,7)}var S=p/v,b=y/d;isNaN(S)&&(S=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(S,b)));if(e===ke.estimate)return t.out.noPxChangeTryDetermine.push(nt(sA,null,r,w,l)),w;var x=n_(r,w,l);return x??w}function sA(r,t,e){return n_(r,t,e)==null}function n_(r,t,e){var i=QD(r.model),n=r.getExtent(),a=i.lastAutoInterval,o=i.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-e)<=1&&a>t&&i.axisExtent0===n[0]&&i.axisExtent1===n[1])return a;i.lastTickCount=e,i.lastAutoInterval=t,i.axisExtent0=n[0],i.axisExtent1=n[1]}function lA(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function a_(r,t,e){var i=qa(r),n=r.scale,a=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],f=n.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=Q0(r),c=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;c&&u!==a[0]&&p(a[0]);for(var d=u;d<=a[1];d+=l)p(d);v&&d-l!==a[1]&&p(a[1]);function p(y){var g={value:y};s.push(e?y:{formattedLabel:i(g),rawLabel:n.getLabel(g),tickValue:y,time:void 0,break:void 0})}return s}function o_(r,t,e){var i=r.scale,n=qa(r),a=[];return T(i.getTicks(),function(o){var s=i.getLabel(o),l=o.value;t(o.value,s)&&a.push(e?l:{formattedLabel:n(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var Tp=[0,1],uA=function(){function r(t,e,i){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=i||[0,0]}return r.prototype.contain=function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},r.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return my(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var i=this._extent;i[0]=t,i[1]=e},r.prototype.dataToCoord=function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(n.parse(t)),this.onBand&&n.type==="ordinal"&&(i=i.slice(),Cp(i,n.count())),Et(t,Tp,i,e)},r.prototype.coordToData=function(t,e){var i=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(i=i.slice(),Cp(i,n.count()));var a=Et(t,i,Tp,e);return this.scale.scale(a)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=jD(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),n=i.ticks,a=Z(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return fA(this,a,o,t.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var i=this.scale.getMinorTicks(e),n=Z(i,function(a){return Z(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(t){return t=t||Fs(ke.determine),JD(this,t).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);i===0&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},r.prototype.calculateCategoryInterval=function(t){return t=t||Fs(ke.determine),oA(this,t)},r}();function Cp(r,t){var e=r[1]-r[0],i=t,n=e/i/2;r[0]+=n,r[1]-=n}function fA(r,t,e,i){var n=t.length;if(!r.onBand||e||!n)return;var a=r.getExtent(),o,s;if(n===1)t[0].coord=a[0],t[0].onBand=!0,o=t[1]={coord:a[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[n-1].tickValue-t[0].tickValue,u=(t[n-1].coord-t[0].coord)/l;T(t,function(v){v.coord-=u/2,v.onBand=!0});var f=r.scale.getExtent();s=1+f[1]-t[n-1].tickValue,o={coord:t[n-1].coord+u*s,tickValue:f[1]+1,onBand:!0},t.push(o)}var h=a[0]>a[1];c(t[0].coord,a[0])&&(i?t[0].coord=a[0]:t.shift()),i&&c(a[0],t[0].coord)&&t.unshift({coord:a[0],onBand:!0}),c(a[1],o.coord)&&(i?o.coord=a[1]:t.pop()),i&&c(o.coord,a[1])&&t.push({coord:a[1],onBand:!0});function c(v,d){return v=Ot(v),d=Ot(d),h?v>d:v-1&&(u.style.stroke=u.style.fill,u.style.fill=W.color.neutral00,u.style.lineWidth=2),i},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(Je);function Lc(r,t){var e=r.mapDimensionsAll("defaultedLabel"),i=e.length;if(i===1){var n=yn(r,t,e[0]);return n!=null?n+"":null}else if(i){for(var a=[],o=0;o=0&&i.push(t[a])}return i.join(" ")}var Ic=function(r){F(t,r);function t(e,i,n,a){var o=r.call(this)||this;return o.updateData(e,i,n,a),o}return t.prototype._createSymbol=function(e,i,n,a,o,s){this.removeAll();var l=cr(e,-1,-1,2,2,null,s);l.attr({z2:$(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=yA,this._symbolType=e,this.add(l)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){ba(this.childAt(0))},t.prototype.downplay=function(){wa(this.childAt(0))},t.prototype.setZ=function(e,i){var n=this.childAt(0);n.zlevel=e,n.z=i},t.prototype.setDraggable=function(e,i){var n=this.childAt(0);n.draggable=e,n.cursor=!i&&e?"move":n.cursor},t.prototype.updateData=function(e,i,n,a){this.silent=!1;var o=e.getItemVisual(i,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,i),u=t.getSymbolZ2(e,i),f=o!==this._symbolType,h=a&&a.disableAnimation;if(f){var c=e.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,e,i,l,u,c)}else{var v=this.childAt(0);v.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};h?v.attr(d):Zt(v,d,s,i),nm(v)}if(this._updateCommon(e,i,l,n,a),f){var v=this.childAt(0);if(!h){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,Pe(v,d,s,i)}}h&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,i,n,a,o){var s=this.childAt(0),l=e.hostModel,u,f,h,c,v,d,p,y,g;if(a&&(u=a.emphasisItemStyle,f=a.blurItemStyle,h=a.selectItemStyle,c=a.focus,v=a.blurScope,p=a.labelStatesModels,y=a.hoverScale,g=a.cursorStyle,d=a.emphasisDisabled),!a||e.hasItemOption){var m=a&&a.itemModel?a.itemModel:e.getItemModel(i),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),c=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),p=Tn(m),y=_.getShallow("scale"),g=m.getShallow("cursor")}var S=e.getItemVisual(i,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=pl(e.getItemVisual(i,"symbolOffset"),n);b&&(s.x=b[0],s.y=b[1]),g&&s.attr("cursor",g);var w=e.getItemVisual(i,"style"),x=w.fill;if(s instanceof vr){var C=s.style;s.useStyle(z({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},w))}else s.__isEmptyBrush?s.useStyle(z({},w)):s.useStyle(w),s.style.decal=null,s.setColor(x,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var D=e.getItemVisual(i,"liftZ"),A=this._z2;D!=null?A==null&&(this._z2=s.z2,s.z2+=D):A!=null&&(s.z2=A,this._z2=null);var M=o&&o.useNameLabel;$a(s,p,{labelFetcher:l,labelDataIndex:i,defaultText:I,inheritColor:x,defaultOpacity:w.opacity});function I(k){return M?e.getName(k):Lc(e,k)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;var P=y==null||y===!0?Math.max(1.1,3/this._sizeY):isFinite(y)&&y>0?+y:1;L.scaleX=this._sizeX*P,L.scaleY=this._sizeY*P,this.setSymbolScale(1),xa(this,c,v,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,i,n){var a=this.childAt(0),o=ft(this).dataIndex,s=n&&n.animation;if(this.silent=a.silent=!0,n&&n.fadeLabel){var l=a.getTextContent();l&&Cs(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Cs(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,i){return yc(e.getItemVisual(i,"symbolSize"))},t.getSymbolZ2=function(e,i){return e.getItemVisual(i,"z2")},t}(Mt);function yA(r,t){this.parent.drift(r,t)}function Lu(r,t,e,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i.isIgnore&&i.isIgnore(e))&&!(i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function Lp(r){return r!=null&&!q(r)&&(r={isIgnore:r}),r||{}}function Ip(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:Tn(t),cursorStyle:t.get("cursor")}}var mA=function(){function r(t){this.group=new Mt,this._SymbolCtor=t||Ic}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=Lp(e);var i=this.group,n=t.hostModel,a=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=Ip(t),u={disableAnimation:s},f=e.getSymbolPoint||function(h){return t.getItemLayout(h)};a||i.removeAll(),t.diff(a).add(function(h){var c=f(h);if(Lu(t,c,h,e)){var v=new o(t,h,l,u);v.setPosition(c),t.setItemGraphicEl(h,v),i.add(v)}}).update(function(h,c){var v=a.getItemGraphicEl(c),d=f(h);if(!Lu(t,d,h,e)){i.remove(v);return}var p=t.getItemVisual(h,"symbol")||"circle",y=v&&v.getSymbolType&&v.getSymbolType();if(!v||y&&y!==p)i.remove(v),v=new o(t,h,l,u),v.setPosition(d);else{v.updateData(t,h,l,u);var g={x:d[0],y:d[1]};s?v.attr(g):Zt(v,g,n)}i.add(v),t.setItemGraphicEl(h,v)}).remove(function(h){var c=a.getItemGraphicEl(h);c&&c.fadeOut(function(){i.remove(c)},n)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(i,n){var a=t._getSymbolPoint(n);i.setPosition(a),i.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Ip(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,i){this._progressiveEls=[],i=Lp(i);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a0?e=i[0]:i[1]<0&&(e=i[1]),e}function h_(r,t,e,i){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),i)),isNaN(n)&&(n=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=e.get(r.baseDim,i),o[1-a]=n,t.dataToPoint(o)}function SA(r,t){var e=[];return t.diff(r).add(function(i){e.push({cmd:"+",idx:i})}).update(function(i,n){e.push({cmd:"=",idx:n,idx1:i})}).remove(function(i){e.push({cmd:"-",idx:i})}).execute(),e}function bA(r,t,e,i,n,a,o,s){for(var l=SA(r,t),u=[],f=[],h=[],c=[],v=[],d=[],p=[],y=f_(n,t,o),g=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_=n||p<0)break;if(Ti(g,m)){if(l){p+=a;continue}break}if(p===e)r[a>0?"moveTo":"lineTo"](g,m),h=g,c=m;else{var _=g-u,S=m-f;if(_*_+S*S<.5){p+=a;continue}if(o>0){for(var b=p+a,w=t[b*2],x=t[b*2+1];w===g&&x===m&&y=i||Ti(w,x))v=g,d=m;else{A=w-u,M=x-f;var P=g-u,k=w-g,B=m-f,U=x-m,O=void 0,H=void 0;if(s==="x"){O=Math.abs(P),H=Math.abs(k);var R=A>0?1:-1;v=g-R*O*o,d=m,I=g+R*H*o,L=m}else if(s==="y"){O=Math.abs(B),H=Math.abs(U);var E=M>0?1:-1;v=g,d=m-E*O*o,I=g,L=m+E*H*o}else O=Math.sqrt(P*P+B*B),H=Math.sqrt(k*k+U*U),D=H/(H+O),v=g-A*o*(1-D),d=m-M*o*(1-D),I=g+A*o*D,L=m+M*o*D,I=br(I,wr(w,g)),L=br(L,wr(x,m)),I=wr(I,br(w,g)),L=wr(L,br(x,m)),A=I-g,M=L-m,v=g-A*O/H,d=m-M*O/H,v=br(v,wr(u,g)),d=br(d,wr(f,m)),v=wr(v,br(u,g)),d=wr(d,br(f,m)),A=g-v,M=m-d,I=g+A*H/O,L=m+M*H/O}r.bezierCurveTo(h,c,v,d,g,m),h=I,c=L}else r.lineTo(g,m)}u=g,f=m,p+=a}return y}var c_=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),wA=function(r){F(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polyline",i}return t.prototype.getDefaultStyle=function(){return{stroke:W.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new c_},t.prototype.buildPath=function(e,i){var n=i.points,a=0,o=n.length/2;if(i.connectNulls){for(;o>0&&Ti(n[o*2-2],n[o*2-1]);o--);for(;a=0){var S=u?(d-l)*_+l:(v-s)*_+s;return u?[e,S]:[S,e]}s=v,l=d;break;case o.C:v=a[h++],d=a[h++],p=a[h++],y=a[h++],g=a[h++],m=a[h++];var b=u?vs(s,v,p,g,e,f):vs(l,d,y,m,e,f);if(b>0)for(var w=0;w=0){var S=u?zt(l,d,y,m,x):zt(s,v,p,g,x);return u?[e,S]:[S,e]}}s=g,l=m;break}}},t}(vt),xA=function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(c_),TA=function(r){F(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polygon",i}return t.prototype.getDefaultShape=function(){return new xA},t.prototype.buildPath=function(e,i){var n=i.points,a=i.stackedOnPoints,o=0,s=n.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&Ti(n[s*2-2],n[s*2-1]);s--);for(;ot){a?e.push(o(a,l,t)):n&&e.push(o(n,l,0),o(n,l,t));break}else n&&(e.push(o(n,l,0)),n=null),e.push(l),a=l}return e}function AA(r,t,e){var i=r.getVisual("visualMeta");if(!(!i||!i.length||!r.count())&&t.type==="cartesian2d"){for(var n,a,o=i.length-1;o>=0;o--){var s=r.getDimensionInfo(i[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){a=i[o];break}}if(a){var l=t.getAxis(n),u=Z(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=a.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var c=DA(u,n==="x"?e.getWidth():e.getHeight()),v=c.length;if(!v&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var d=10,p=c[0].coord-d,y=c[v-1].coord+d,g=y-p;if(g<.001)return"transparent";T(c,function(_){_.offset=(_.coord-p)/g}),c.push({offset:v?c[v-1].offset:.5,color:h[1]||"transparent"}),c.unshift({offset:v?c[0].offset:.5,color:h[0]||"transparent"});var m=new Fh(0,0,0,0,c,!0);return m[n]=p,m[n+"2"]=y,m}}}function LA(r,t,e){var i=r.get("showAllSymbol"),n=i==="auto";if(!(i&&!n)){var a=e.getAxesByScale("ordinal")[0];if(a&&!(n&&IA(a,t))){var o=t.mapDimension(a.dim),s={};return T(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function IA(r,t){var e=r.getExtent(),i=Math.abs(e[1]-e[0])/r.scale.count();isNaN(i)&&(i=0);for(var n=t.count(),a=Math.max(1,Math.round(n/5)),o=0;oi)return!1;return!0}function PA(r,t){return isNaN(r)||isNaN(t)}function kA(r){for(var t=r.length/2;t>0&&PA(r[t*2-2],r[t*2-1]);t--);return t-1}function Op(r,t){return[r[t*2],r[t*2+1]]}function RA(r,t,e){for(var i=r.length/2,n=e==="x"?0:1,a,o,s=0,l=-1,u=0;u=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function p_(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var H=d.getState("emphasis").style;H.lineWidth=+d.style.lineWidth+1}ft(d).seriesIndex=e.seriesIndex,xa(d,B,U,O);var R=Ep(e.get("smooth")),E=e.get("smoothMonotone");if(d.setShape({smooth:R,smoothMonotone:E,connectNulls:x}),p){var N=s.getCalculationInfo("stackedOnSeries"),X=0;p.useStyle(gt(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),N&&(X=Ep(N.get("smooth"))),p.setShape({smooth:R,stackedOnSmooth:X,smoothMonotone:E,connectNulls:x}),Lf(p,e,"areaStyle"),ft(p).seriesIndex=e.seriesIndex,xa(p,B,U,O)}var J=this._changePolyState;s.eachItemGraphicEl(function(yt){yt&&(yt.onHoverStateChange=J)}),this._polyline.onHoverStateChange=J,this._data=s,this._coordSys=a,this._stackedOnPoints=b,this._points=f,this._step=A,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,d),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,i){ft(i).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,i,n,a){var o=e.getData(),s=Ci(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var c=e.get("zlevel")||0,v=e.get("z")||0;u=new Ic(o,s),u.x=f,u.y=h,u.setZ(c,v);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=v,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Ie.prototype.highlight.call(this,e,i,n,a)},t.prototype.downplay=function(e,i,n,a){var o=e.getData(),s=Ci(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Ie.prototype.downplay.call(this,e,i,n,a)},t.prototype._changePolyState=function(e){var i=this._polygon;Wv(this._polyline,e),i&&Wv(i,e)},t.prototype._newPolyline=function(e){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new wA({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},t.prototype._newPolygon=function(e,i){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new TA({shape:{points:e,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,i,n){var a,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):i.type==="polar"&&(a=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");tt(f)&&(f=f(null));var h=u.get("animationDelay")||0,c=tt(h)?h(null):h;e.eachItemGraphicEl(function(v,d){var p=v;if(p){var y=[v.x,v.y],g=void 0,m=void 0,_=void 0;if(n)if(o){var S=n,b=i.pointToCoord(y);a?(g=S.startAngle,m=S.endAngle,_=-b[1]/180*Math.PI):(g=S.r0,m=S.r,_=b[0])}else{var w=n;a?(g=w.x,m=w.x+w.width,_=v.x):(g=w.y+w.height,m=w.y,_=v.y)}var x=m===g?0:(_-g)/(m-g);l&&(x=1-x);var C=tt(h)?h(d):f*x+c,D=p.getSymbolPath(),A=D.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:C}),D.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,i,n){var a=e.getModel("endLabel");if(p_(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Gt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=kA(l);f>=0&&($a(s,Tn(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:f,defaultText:function(h,c,v){return v!=null?u_(o,v):Lc(o,h)},enableTextSetter:!0},EA(a,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,i,n,a,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=n.getLayout("points"),c=n.hostModel,v=c.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,y=l.getBaseAxis(),g=y.isHorizontal(),m=y.inverse,_=i.shape,S=m?g?_.x:_.y+_.height:g?_.x+_.width:_.y,b=(g?p:0)*(m?-1:1),w=(g?0:-p)*(m?-1:1),x=g?"x":"y",C=RA(h,S,x),D=C.range,A=D[1]-D[0],M=void 0;if(A>=1){if(A>1&&!v){var I=Op(h,D[0]);u.attr({x:I[0]+b,y:I[1]+w}),o&&(M=c.getRawValue(D[0]))}else{var I=f.getPointOn(S,x);I&&u.attr({x:I[0]+b,y:I[1]+w});var L=c.getRawValue(D[0]),P=c.getRawValue(D[1]);o&&(M=_b(n,d,L,P,C.t))}a.lastFrameIndex=D[0]}else{var k=e===1||a.lastFrameIndex>0?D[0]:0,I=Op(h,k);o&&(M=c.getRawValue(k)),u.attr({x:I[0]+b,y:I[1]+w})}if(o){var B=ul(u);typeof B.setLabelText=="function"&&B.setLabelText(M)}}},t.prototype._doUpdateAnimation=function(e,i,n,a,o,s,l){var u=this._polyline,f=this._polygon,h=e.hostModel,c=bA(this._data,e,this._stackedOnPoints,i,this._coordSys,n,this._valueOrigin),v=c.current,d=c.stackedOnCurrent,p=c.next,y=c.stackedOnNext;if(o&&(d=xr(c.stackedOnCurrent,c.current,n,o,l),v=xr(c.current,null,n,o,l),y=xr(c.stackedOnNext,c.next,n,o,l),p=xr(c.next,null,n,o,l)),Rp(v,p)>3e3||f&&Rp(d,y)>3e3){u.stopAnimation(),u.setShape({points:p}),f&&(f.stopAnimation(),f.setShape({points:p,stackedOnPoints:y}));return}u.shape.__points=c.current,u.shape.points=v;var g={shape:{points:p}};c.current!==v&&(g.shape.__points=c.next),u.stopAnimation(),Zt(u,g,h),f&&(f.setShape({points:v,stackedOnPoints:d}),f.stopAnimation(),Zt(f,{shape:{stackedOnPoints:y}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=c.status,S=0;S<_.length;S++){var b=_[S].cmd;if(b==="="){var w=e.getItemGraphicEl(_[S].idx1);w&&m.push({el:w,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var x=u.shape.__points,C=0;Ct&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=i.getDevicePixelRatio(),c=Math.abs(f[1]-f[0])*(h||1),v=Math.round(s/c);if(isFinite(v)&&v>1){a==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/v)):a==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/v));var d=void 0;Y(a)?d=NA[a]:tt(a)&&(d=a),d&&t.setData(n.downSample(n.mapDimension(u.dim),1/v,d,zA))}}}}}function FA(r){r.registerChartView(OA),r.registerSeriesModel(gA),r.registerLayout(BA("line")),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),i=t.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",i)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,g_("line"))}var ih=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,i){return Tc(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,i,n){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(e),s=a.dataToPoint(o);if(n)T(a.getAxes(),function(c,v){if(c.type==="category"&&i!=null){var d=c.getTicksCoords(),p=c.getTickModel().get("alignWithLabel"),y=o[v],g=i[v]==="x1"||i[v]==="y1";if(g&&!p&&(y+=1),d.length<2)return;if(d.length===2){s[v]=c.toGlobalCoord(c.getExtent()[g?1:0]);return}for(var m=void 0,_=void 0,S=1,b=0;by){_=(w+m)/2;break}b===1&&(S=x-d[0].tickValue)}_==null&&(m?m&&(_=d[d.length-1].coord):_=d[0].coord),s[v]=c.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t}(Je);Je.registerClass(ih);var VA=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Tc(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),i=this.get("largeThreshold");return i>e&&(e=i),e},t.prototype.brushSelector=function(e,i,n){return n.rect(i.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=$h(ih.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:W.color.primary,borderWidth:2}},realtimeSort:!1}),t}(ih),GA=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),Bp=function(r){F(t,r);function t(e){var i=r.call(this,e)||this;return i.type="sausage",i}return t.prototype.getDefaultShape=function(){return new GA},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=(s-o)*.5,u=o+l,f=i.startAngle,h=i.endAngle,c=i.clockwise,v=Math.PI*2,d=c?h-fMath.PI/2&&fs)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(e,i){for(var n=i.scale,a=n.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,i,n,a){if(this._isOrderChangedWithinSameData(e,i,n)){var o=this._dataSort(e,n,i);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,i,n){var a=i.baseAxis,o=this._dataSort(e,a,function(s){return e.get(e.mapDimension(i.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(e,i){this._clear(this._model),this._removeOnRenderedListener(i)},t.prototype.dispose=function(e,i){this._removeOnRenderedListener(i)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var i=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(a){es(a,e,ft(a).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Ie),Np={cartesian2d:function(r,t){var e=t.width<0?-1:1,i=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var n=r.x+r.width,a=r.y+r.height,o=Pu(t.x,r.x),s=ku(t.x+t.width,n),l=Pu(t.y,r.y),u=ku(t.y+t.height,a),f=sn?s:o,t.y=h&&l>a?u:l,t.width=f?0:s-o,t.height=h?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),f||h},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}var n=ku(t.r,r.r),a=Pu(t.r0,r.r0);t.r=n,t.r0=a;var o=n-a<0;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}return o}},zp={cartesian2d:function(r,t,e,i,n,a,o,s,l){var u=new _t({shape:z({},i),z2:1});if(u.__dataIndex=e,u.name="item",a){var f=u.shape,h=n?"height":"width";f[h]=0}return u},polar:function(r,t,e,i,n,a,o,s,l){var u=!n&&l?Bp:Pi,f=new u({shape:i,z2:1});f.name="item";var h=y_(n);if(f.calculateTextPosition=HA(h,{isRoundCap:u===Bp}),a){var c=f.shape,v=n?"r":"endAngle",d={};c[v]=n?i.r0:i.startAngle,d[v]=i[v],(s?Zt:Pe)(f,{shape:d},a)}return f}};function ZA(r,t){var e=r.get("realtimeSort",!0),i=t.getBaseAxis();if(e&&i.type==="category"&&t.type==="cartesian2d")return{baseAxis:i,otherAxis:t.getOtherAxis(i)}}function Fp(r,t,e,i,n,a,o,s){var l,u;a?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(o?Zt:Pe)(e,{shape:l},t,n,null);var f=t?r.baseAxis.model:null;(o?Zt:Pe)(e,{shape:u},f,n)}function Vp(r,t){for(var e=0;e0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*n/2,y:i.y+o*n/2,width:i.width-a*n,height:i.height-o*n}},polar:function(r,t,e){var i=r.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function KA(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function y_(r){return function(t){var e=t?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+e;default:return i}}}(r)}function Hp(r,t,e,i,n,a,o,s){var l=t.getItemVisual(e,"style");if(s){if(!a.get("roundCap")){var f=r.shape,h=UA(i.getModel("itemStyle"),f);z(f,h),r.setShape(f)}}else{var u=i.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var c=i.getShallow("cursor");c&&r.attr("cursor",c);var v=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",d=Tn(i);$a(r,d,{labelFetcher:a,labelDataIndex:e,defaultText:Lc(a.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var p=r.getTextContent();if(s&&p){var y=i.get(["label","position"]);r.textConfig.inside=y==="middle"?!0:null,WA(r,y==="outside"?v:y,y_(o),i.get(["label","rotate"]))}Mx(p,d,a.getRawValue(e),function(m){return u_(t,m)});var g=i.getModel(["emphasis"]);xa(r,g.get("focus"),g.get("blurScope"),g.get("disabled")),Lf(r,i),KA(n)&&(r.style.fill="none",r.style.stroke="none",T(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function QA(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var i=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(i,n,a)}var JA=function(){function r(){}return r}(),Wp=function(r){F(t,r);function t(e){var i=r.call(this,e)||this;return i.type="largeBar",i}return t.prototype.getDefaultShape=function(){return new JA},t.prototype.buildPath=function(e,i){for(var n=i.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?e:null},30,!1);function jA(r,t,e){for(var i=r.baseDimIdx,n=1-i,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=a.length/3;f=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function m_(r,t,e){if(yl(e,"cartesian2d")){var i=t,n=e.getArea();return{x:r?i.x:n.x,y:r?n.y:i.y,width:r?i.width:n.width,height:r?n.height:i.height}}else{var n=e.getArea(),a=t;return{cx:n.cx,cy:n.cy,r0:r?n.r0:a.r0,r:r?n.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function tL(r,t,e){var i=r.type==="polar"?Pi:_t;return new i({shape:m_(t,e,r),silent:!0,z2:0})}function eL(r){r.registerChartView(XA),r.registerSeriesModel(VA),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,St(DD,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,AD("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,g_("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})})}var __={left:0,right:0,top:0,bottom:0},Hs=["25%","25%"],rL=function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(e,i){var n=Cn(e.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&e.outerBounds&&Or(e.outerBounds,n)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&Or(this.option.outerBounds,e.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:__,outerBoundsContain:"all",outerBoundsClampWidth:Hs[0],outerBoundsClampHeight:Hs[1],backgroundColor:W.color.transparent,borderWidth:1,borderColor:W.color.neutral30},t}(ct),nh=function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Yt).models[0]},t.type="cartesian2dAxis",t}(ct);Re(nh,$D);var S_={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:W.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:W.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:W.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[W.color.backgroundTint,W.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:W.color.neutral00,borderColor:W.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},iL=lt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},S_),Pc=lt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:W.color.axisMinorSplitLine,width:1}}},S_),nL=lt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Pc),aL=gt({logBase:10},Pc);const oL={category:iL,value:Pc,time:nL,log:aL};var sL={value:1,category:1,time:1,log:1},lL=null;function uL(){return lL}function Xp(r,t,e,i){T(sL,function(n,a){var o=lt(lt({},oL[a],!0),i,!0),s=function(l){F(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+a,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var c=Aa(this),v=c?Cn(f):{},d=h.getTheme();lt(f,d.get(a+"Axis")),lt(f,this.getDefaultOption()),f.type=Zp(f),c&&Or(f,v,c)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=jf.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(f){return{breaks:[]}},u.type=t+"Axis."+a,u.defaultOption=o,u}(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",Zp)}function Zp(r){return r.type||(r.data?"category":"value")}var fL=function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return Z(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),It(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r}(),ah=["x","y"];function $p(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var hL=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=ah,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!$p(e)||!$p(i))){var n=e.getExtent(),a=i.getExtent(),o=this.dataToPoint([n[0],a[0]]),s=this.dataToPoint([n[1],a[1]]),l=n[1]-n[0],u=a[1]-a[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,c=o[0]-n[0]*f,v=o[1]-a[0]*h,d=this._transform=[f,0,0,h,c,v];this._invTransform=Na([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var i=this.getAxis("x"),n=this.getAxis("y");return i.contain(i.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,i){var n=this.dataToPoint(e),a=this.dataToPoint(i),o=this.getArea(),s=new it(n[0],n[1],a[0]-n[0],a[1]-n[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,i,n){n=n||[];var a=e[0],o=e[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return _e(n,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(a,i)),n[1]=l.toGlobalCoord(l.dataToCoord(o,i)),n},t.prototype.clampData=function(e,i){var n=this.getAxis("x").scale,a=this.getAxis("y").scale,o=n.getExtent(),s=a.getExtent(),l=n.parse(e[0]),u=a.parse(e[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},t.prototype.pointToData=function(e,i,n){if(n=n||[],this._invTransform)return _e(n,e,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return n[0]=a.coordToData(a.toLocalCoord(e[0]),i),n[1]=o.coordToData(o.toLocalCoord(e[1]),i),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var i=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-e,o=Math.min(n[0],n[1])-e,s=Math.max(i[0],i[1])-a+e,l=Math.max(n[0],n[1])-o+e;return new it(a,o,s,l)},t}(fL),cL=function(r){F(t,r);function t(e,i,n,a,o){var s=r.call(this,e,i,n)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),e&&i[0]>i[1]&&i.reverse(),i},t.prototype.pointToData=function(e,i){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),i)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(uA),vL="expandAxisBreak",Dr=Math.PI,dL=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],pL=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Ea=bt(),b_=bt(),w_=function(){function r(t){this.recordMap={},this.resolveAxisNameOverlap=t}return r.prototype.ensureRecord=function(t){var e=t.axis.dim,i=t.componentIndex,n=this.recordMap,a=n[e]||(n[e]=[]);return a[i]||(a[i]={ready:{}})},r}();function gL(r,t,e,i){var n=e.axis,a=t.ensureRecord(e),o=[],s,l=kc(r.axisName)&&_n(r.nameLocation);T(i,function(d){var p=Nr(d);if(!(!p||p.label.ignore)){o.push(p);var y=a.transGroup;l&&(y.transform?Na(Hn,y.transform):Th(Hn),p.transform&&ra(Hn,Hn,p.transform),it.copy(Vo,p.localRect),Vo.applyTransform(Hn),s?s.union(Vo):it.copy(s=new it(0,0,0,0),Vo))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",f=a.transGroup[u];if(o.sort(function(d,p){return Math.abs(d.label[u]-f)-Math.abs(p.label[u]-f)}),l&&s){var h=n.getExtent(),c=Math.min(h[0],h[1]),v=Math.max(h[0],h[1])-c;s.union(new it(c,0,v,1))}a.stOccupiedRect=s,a.labelInfoList=o}var Hn=ur(),Vo=new it(0,0,0,0),x_=function(r,t,e,i,n,a){if(_n(r.nameLocation)){var o=a.stOccupiedRect;o&&T_(vA({},o,a.transGroup.transform),i,n)}else C_(a.labelInfoList,a.dirVec,i,n)};function T_(r,t,e){var i=new dt;Ac(r,t,i,{direction:Math.atan2(e.y,e.x),bidirectional:!1,touchThreshold:.05})&&dA(t,i)}function C_(r,t,e,i){for(var n=dt.dot(i,t)>=0,a=0,o=r.length;a0?"top":"bottom",a="center"):_s(n-Dr)?(o=i>0?"bottom":"top",a="center"):(o="middle",n>0&&n0?"right":"left":a=i>0?"left":"right"),{rotation:n,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r}(),yL=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],mL={axisLine:function(r,t,e,i,n,a,o){var s=i.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=i.axis.getExtent(),u=a.transform,f=[l[0],0],h=[l[1],0],c=f[0]>h[0];u&&(_e(f,f,u),_e(h,h,u));var v=z({lineCap:"round"},i.getModel(["axisLine","lineStyle"]).getLineStyle()),d={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(i.get(["axisLine","breakLine"])&&i.axis.scale.hasBreaks())uL().buildAxisBreakLine(i,n,a,d);else{var p=new Qe(z({shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]}},d));Ca(p.shape,p.style.lineWidth),p.anid="line",n.add(p)}var y=i.get(["axisLine","symbol"]);if(y!=null){var g=i.get(["axisLine","symbolSize"]);Y(y)&&(y=[y,y]),(Y(g)||pt(g))&&(g=[g,g]);var m=pl(i.get(["axisLine","symbolOffset"])||0,g),_=g[0],S=g[1];T([{rotate:r.rotation+Math.PI/2,offset:m[0],r:0},{rotate:r.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((f[0]-h[0])*(f[0]-h[0])+(f[1]-h[1])*(f[1]-h[1]))}],function(b,w){if(y[w]!=="none"&&y[w]!=null){var x=cr(y[w],-_/2,-S/2,_,S,v.stroke,!0),C=b.r+b.offset,D=c?h:f;x.attr({rotation:b.rotate,x:D[0]+C*Math.cos(r.rotation),y:D[1]-C*Math.sin(r.rotation),silent:!0,z2:11}),n.add(x)}})}}},axisTickLabelEstimate:function(r,t,e,i,n,a,o,s){var l=Kp(t,n,s);l&&qp(r,t,e,i,n,a,o,ke.estimate)},axisTickLabelDetermine:function(r,t,e,i,n,a,o,s){var l=Kp(t,n,s);l&&qp(r,t,e,i,n,a,o,ke.determine);var u=wL(r,n,a,i);bL(r,t.labelLayoutList,u),xL(r,n,a,i,r.tickDirection)},axisName:function(r,t,e,i,n,a,o,s){var l=e.ensureRecord(i);t.nameEl&&(n.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(kc(u)){var f=r.nameLocation,h=r.nameDirection,c=i.getModel("nameTextStyle"),v=i.get("nameGap")||0,d=i.axis.getExtent(),p=i.axis.inverse?-1:1,y=new dt(0,0),g=new dt(0,0);f==="start"?(y.x=d[0]-p*v,g.x=-p):f==="end"?(y.x=d[1]+p*v,g.x=p):(y.x=(d[0]+d[1])/2,y.y=r.labelOffset+h*v,g.y=h);var m=ur();g.transform(Ch(m,m,r.rotation));var _=i.get("nameRotate");_!=null&&(_=_*Dr/180);var S,b;_n(f)?S=kr.innerTextLayout(r.rotation,_??r.rotation,h):(S=_L(r.rotation,f,_||0,d),b=r.raw.axisNameAvailableWidth,b!=null&&(b=Math.abs(b/Math.sin(S.rotation)),!isFinite(b)&&(b=null)));var w=c.getFont(),x=i.get("nameTruncate",!0)||{},C=x.ellipsis,D=ga(r.raw.nameTruncateMaxWidth,x.maxWidth,b),A=s.nameMarginLevel||0,M=new Gt({x:y.x,y:y.y,rotation:S.rotation,silent:kr.isLabelSilent(i),style:Di(c,{text:u,font:w,overflow:"truncate",width:D,ellipsis:C,fill:c.getTextColor()||i.get(["axisLine","lineStyle","color"]),align:c.get("align")||S.textAlign,verticalAlign:c.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(sl({el:M,componentModel:i,itemName:u}),M.__fullText=u,M.anid="name",i.get("triggerEvent")){var I=kr.makeAxisEventDataBase(i);I.targetType="axisName",I.name=u,ft(M).eventData=I}a.add(M),M.updateTransform(),t.nameEl=M;var L=l.nameLayout=Nr({label:M,priority:M.z2,defaultAttr:{ignore:M.ignore},marginDefault:_n(f)?dL[A]:pL[A]});if(l.nameLocation=f,n.add(M),M.decomposeTransform(),r.shouldNameMoveOverlap&&L){var P=e.ensureRecord(i);e.resolveAxisNameOverlap(r,e,i,L,g,P)}}}};function qp(r,t,e,i,n,a,o,s){D_(t)||TL(r,t,n,s,i,o);var l=t.labelLayoutList;CL(r,i,l,a),r.rotation;var u=r.optionHideOverlap;SL(i,l,u),u&&pA(It(l,function(f){return f&&!f.label.ignore})),gL(r,e,i,l)}function _L(r,t,e,i){var n=_y(e-r),a,o,s=i[0]>i[1],l=t==="start"&&!s||t!=="start"&&s;return _s(n-Dr/2)?(o=l?"bottom":"top",a="center"):_s(n-Dr*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",nDr/2?a=l?"left":"right":a=l?"right":"left"),{rotation:n,textAlign:a,textVerticalAlign:o}}function SL(r,t,e){if(Q0(r.axis))return;function i(s,l,u){var f=Nr(t[l]),h=Nr(t[u]);if(!(!f||!h)){if(s===!1||f.suggestIgnore){ta(f.label);return}if(h.suggestIgnore){ta(h.label);return}var c=.1;if(!e){var v=[0,0,0,0];f=Dp({marginForce:v},f),h=Dp({marginForce:v},h)}Ac(f,h,null,{touchThreshold:c})&&ta(s?h.label:f.label)}}var n=r.get(["axisLabel","showMinLabel"]),a=r.get(["axisLabel","showMaxLabel"]),o=t.length;i(n,0,1),i(a,o-1,o-2)}function bL(r,t,e){r.showMinorTicks||T(t,function(i){if(i&&i.label.ignore)for(var n=0;nu[0]&&isFinite(d)&&isFinite(u[0]);)v=Mu(v),d=u[1]-v*o;else{var y=r.getTicks().length-1;y>o&&(v=Mu(v));var g=v*o;p=Math.ceil(u[1]/v)*v,d=Ot(p-g),d<0&&u[0]>=0?(d=0,p=Ot(g)):p>0&&u[1]<=0&&(p=0,d=-Ot(g))}var m=(n[0].value-a[0].value)/s,_=(n[o].value-a[o].value)/s;i.setExtent.call(r,d+v*m,p+v*_),i.setInterval.call(r,v),(m||_)&&i.setNiceExtent.call(r,d+v,p-v)}var Jp=[[3,1],[0,2]],kL=function(){function r(t,e,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ah,this._initCartesian(t,e,i),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model);function n(o){var s,l=xt(o),u=l.length;if(u){for(var f=[],h=u-1;h>=0;h--){var c=+l[h],v=o[c],d=v.model,p=v.scale;Qf(p)&&d.get("alignTicks")&&d.get("interval")==null?f.push(v):(wp(p,d),Qf(p)&&(s=v))}f.length&&(s||(s=f.pop(),wp(s.scale,s.model)),T(f,function(y){PL(y.scale,y.model,s.scale)}))}}n(i.x),n(i.y);var a={};T(i.x,function(o){jp(i,"y",o,a)}),T(i.y,function(o){jp(i,"x",o,a)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,i){var n=sc(t,e),a=this._rect=gn(t.getBoxLayoutParams(),n.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(A_(o,a),!i){var u=EL(a,s,o,l,e),f=void 0;if(l)f=rg(a.clone(),"axisLabel",null,a,o,u,n);else{var h=OL(t,a,n),c=h.outerBoundsRect,v=h.parsedOuterBoundsContain,d=h.outerBoundsClamp;c&&(f=rg(c,v,d,a,o,u,n))}L_(a,o,ke.determine,null,f,n)}T(this._coordsList,function(p){p.calcAffineTransform()})},r.prototype.getAxis=function(t,e){var i=this._axesMap[t];if(i!=null)return i[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var i="x"+t+"y"+e;return this._coordsMap[i]}q(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,a=this._coordsList;n0})==null;return Ms(i,s,!0,!0,e),A_(n,i),l;function u(c){T(n[vi[c]],function(v){if(Ra(v.model)){var d=a.ensureRecord(v.model),p=d.labelInfoList;if(p)for(var y=0;y0&&!pa(v)&&v>1e-4&&(c/=v),c}}function EL(r,t,e,i,n){var a=new w_(BL);return T(e,function(o){return T(o,function(s){if(Ra(s.model)){var l=!i;s.axisBuilder=LL(r,t,s.model,n,a,l)}})}),a}function L_(r,t,e,i,n,a){var o=e===ke.determine;T(t,function(u){return T(u,function(f){Ra(f.model)&&(IL(f.axisBuilder,r,f.model),f.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:n}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[vi[1-u]]=r[Ta[u]]<=a.refContainer[Ta[u]]*.5?0:1-u===1?2:1}T(t,function(u,f){return T(u,function(h){Ra(h.model)&&((i==="all"||o)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:s[f]}),o&&h.axisBuilder.build({axisLine:!0}))})})}function OL(r,t,e){var i,n=r.get("outerBoundsMode",!0);n==="same"?i=t.clone():(n==null||n==="auto")&&(i=gn(r.get("outerBounds",!0)||__,e.refContainer));var a=r.get("outerBoundsContain",!0),o;a==null||a==="auto"||ot(["all","axisLabel"],a)<0?o="all":o=a;var s=[Sf($(r.get("outerBoundsClampWidth",!0),Hs[0]),t.width),Sf($(r.get("outerBoundsClampHeight",!0),Hs[1]),t.height)];return{outerBoundsRect:i,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var BL=function(r,t,e,i,n,a){var o=e.axis.dim==="x"?"y":"x";x_(r,t,e,i,n,a),_n(r.nameLocation)||T(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&C_(s.labelInfoList,s.dirVec,i,n)})};function NL(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return zL(e,r,t),e.seriesInvolved&&VL(e,r),e}function zL(r,t,e){var i=t.getComponent("tooltip"),n=t.getComponent("axisPointer"),a=n.get("link",!0)||[],o=[];T(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Oa(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,h=f.getModel("tooltip",i);if(T(s.getAxes(),St(p,!1,null)),s.getTooltipAxes&&i&&h.get("show")){var c=h.get("trigger")==="axis",v=h.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(h.get(["axisPointer","axis"]));(c||v)&&T(d.baseAxes,St(p,v?"cross":!0,c)),v&&T(d.otherAxes,St(p,"cross",!1))}function p(y,g,m){var _=m.model.getModel("axisPointer",n),S=_.get("show");if(!(!S||S==="auto"&&!y&&!sh(_))){g==null&&(g=_.get("triggerTooltip")),_=y?FL(m,h,n,t,y,g):_;var b=_.get("snap"),w=_.get("triggerEmphasis"),x=Oa(m.model),C=g||b||m.type==="category",D=r.axesInfo[x]={key:x,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:g,triggerEmphasis:w,involveSeries:C,snap:b,useHandle:sh(_),seriesModels:[],linkGroup:null};u[x]=D,r.seriesInvolved=r.seriesInvolved||C;var A=GL(a,m);if(A!=null){var M=o[A]||(o[A]={axesInfo:{}});M.axesInfo[x]=D,M.mapper=a[A].mapper,D.linkGroup=M}}}})}function FL(r,t,e,i,n,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};T(s,function(c){l[c]=at(o.get(c))}),l.snap=r.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!a){var h=l.lineStyle=o.get("crossStyle");h&>(u,h.textStyle)}}return r.model.getModel("axisPointer",new Ct(l,e,i))}function VL(r,t){t.eachSeries(function(e){var i=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),a=e.get(["tooltip","show"],!0);!i||!i.model||n==="none"||n===!1||n==="item"||a===!1||e.get(["axisPointer","show"],!0)===!1||T(r.coordSysAxesInfo[Oa(i.model)],function(o){var s=o.axis;i.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function GL(r,t){for(var e=t.model,i=t.dim,n=0;n=0||r===t}function HL(r){var t=Rc(r);if(t){var e=t.axisPointerModel,i=t.axis.scale,n=e.option,a=e.get("status"),o=e.get("value");o!=null&&(o=i.parse(o));var s=sh(e);a==null&&(n.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&(b[0]=-b[0],b[1]=-b[1]);var x=S[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var C=-Math.atan2(S[1],S[0]);h[0].8?"left":c[0]<-.8?"right":"center",p=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":a.x=-c[0]*g+f[0],a.y=-c[1]*m+f[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",p=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=g*x+f[0],a.y=f[1]+D,d=S[0]<0?"right":"left",a.originX=-g*x,a.originY=-D;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=w[0],a.y=w[1]+D,d="center",a.originY=-D;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-g*x+h[0],a.y=h[1]+D,d=S[0]>=0?"right":"left",a.originX=g*x,a.originY=-D;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||p,align:a.__align||d})}},t}(Mt),t2=function(){function r(t){this.group=new Mt,this._LineCtor=t||jL}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var i=this,n=i.group,a=i._lineData;i._lineData=t,a||n.removeAll();var o=ug(t);t.diff(a).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(a,t,l,s,o)}).remove(function(s){n.remove(a.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=ug(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function i(s){!s.isGroup&&!e2(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=t.start;n0}function ug(r){var t=r.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:Tn(t)}}function fg(r){return isNaN(r[0])||isNaN(r[1])}function zu(r){return r&&!fg(r[0])&&!fg(r[1])}function fh(r,t,e,i,n,a){r=r||0;var o=e[1]-e[0];if(n!=null&&(n=Qi(n,[0,o])),a!=null&&(a=Math.max(a,n??0)),i==="all"){var s=Math.abs(t[1]-t[0]);s=Qi(s,[0,o]),n=a=Qi(s,[n,a]),i=0}t[0]=Qi(t[0],e),t[1]=Qi(t[1],e);var l=Fu(t,i);t[i]+=r;var u=n||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[i]=Qi(t[i],f);var h;return h=Fu(t,i),n!=null&&(h.sign!==l.sign||h.spana&&(t[1-i]=t[i]+h.sign*a),t}function Fu(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function Qi(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var di=bt(),hg=at,Vu=nt,r2=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,!(!n&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,e,i);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new Mt,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),i.getZr().add(s);else{var c=St(cg,e,h);this.updatePointerEl(s,u,c),this.updateLabelEl(s,u,c,e)}dg(s,e,!0),this._renderHandle(a)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var i=e.get("animation"),n=t.axis,a=n.type==="category",o=e.get("snap");if(!o&&!a)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(a&&n.getBandWidth()>s)return!0;if(o){var l=Rc(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},r.prototype.makeElOption=function(t,e,i,n,a){},r.prototype.createPointerEl=function(t,e,i,n){var a=e.pointer;if(a){var o=di(t).pointerEl=new Sx[a.type](hg(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,i,n){if(e.label){var a=di(t).labelEl=new Gt(hg(e.label));t.add(a),vg(a,n)}},r.prototype.updatePointerEl=function(t,e,i){var n=di(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,i,n){var a=di(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{x:e.label.x,y:e.label.y}),vg(a,n))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||o==="hide"){n&&i.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=ol(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){fs(u.event)},onmousedown:Vu(this._onHandleDragMove,this,0,0),drift:Vu(this._onHandleDragMove,this),ondragend:Vu(this._onHandleDragEnd,this)}),i.add(n)),dg(n,e,!1),n.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");V(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,gc(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){cg(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Gu(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(Gu(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(Gu(n)),di(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Ps(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}},r}();function cg(r,t,e,i){E_(di(e).lastProp,i)||(di(e).lastProp=i,t?Zt(e,i,r):(e.stopAnimation(),e.attr(i)))}function E_(r,t){if(q(r)&&q(t)){var e=!0;return T(t,function(i,n){e=e&&E_(r[n],i)}),!!e}else return r===t}function vg(r,t){r[t.get(["label","show"])?"show":"hide"]()}function Gu(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function dg(r,t,e){var i=t.get("z"),n=t.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),n!=null&&(a.zlevel=n),a.silent=e)})}function i2(r){var t=r.get("type"),e=r.getModel(t+"Style"),i;return t==="line"?(i=e.getLineStyle(),i.fill=null):t==="shadow"&&(i=e.getAreaStyle(),i.stroke=null),i}function n2(r,t,e,i,n){var a=e.get("value"),o=O_(a,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=cl(s.get("padding")||0),u=s.getFont(),f=dy(o,u),h=n.position,c=f.width+l[1]+l[3],v=f.height+l[0]+l[2],d=n.align;d==="right"&&(h[0]-=c),d==="center"&&(h[0]-=c/2);var p=n.verticalAlign;p==="bottom"&&(h[1]-=v),p==="middle"&&(h[1]-=v/2),a2(h,c,v,i);var y=s.get("backgroundColor");(!y||y==="auto")&&(y=t.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:Di(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:y}),z2:10}}function a2(r,t,e,i){var n=i.getWidth(),a=i.getHeight();r[0]=Math.min(r[0]+t,n)-t,r[1]=Math.min(r[1]+e,a)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function O_(r,t,e,i,n){r=t.scale.parse(r);var a=t.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:zs(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};T(i,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),Y(o)?a=o.replace("{value}",a):tt(o)&&(a=o(s))}return a}function B_(r,t,e){var i=ur();return Ch(i,i,e.rotation),nf(i,i,e.position),Ma([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],i)}function o2(r,t,e,i,n,a){var o=kr.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),n2(t,i,n,a,{position:B_(i.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function s2(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function l2(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}var u2=function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,i,n,a,o){var s=n.axis,l=s.grid,u=a.get("type"),f=pg(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var c=i2(a),v=f2[u](s,h,f);v.style=c,e.graphicKey=v.type,e.pointer=v}var d=Ws(l.getRect(),n);o2(i,e,d,n,a,o)},t.prototype.getHandleTransform=function(e,i,n){var a=Ws(i.axis.grid.getRect(),i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=B_(i.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,i,n,a){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=pg(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[e.x,e.y];h[f]+=i[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var c=(u[1]+u[0])/2,v=[c,c];v[f]=h[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:e.rotation,cursorPoint:v,tooltipOption:d[f]}},t}(r2);function pg(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var f2={line:function(r,t,e){var i=s2([t,e[0]],[t,e[1]],gg(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,t,e){var i=Math.max(1,r.getBandWidth()),n=e[1]-e[0];return{type:"Rect",shape:l2([t-i/2,e[0]],[i,n],gg(r))}}};function gg(r){return r.dim==="x"?0:1}var h2=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:W.color.border,width:1,type:"dashed"},shadowStyle:{color:W.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:W.color.neutral00,padding:[5,7,5,7],backgroundColor:W.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:W.color.accent40,throttle:40}},t}(ct),lr=bt(),c2=T;function N_(r,t,e){if(!et.node){var i=t.getZr();lr(i).records||(lr(i).records={}),v2(i,t);var n=lr(i).records[r]||(lr(i).records[r]={});n.handler=e}}function v2(r,t){if(lr(r).initialized)return;lr(r).initialized=!0,e("click",St(yg,"click")),e("mousemove",St(yg,"mousemove")),e("globalout",p2);function e(i,n){r.on(i,function(a){var o=g2(t);c2(lr(r).records,function(s){s&&n(s,a,o.dispatchAction)}),d2(o.pendings,t)})}}function d2(r,t){var e=r.showTip.length,i=r.hideTip.length,n;e?n=r.showTip[e-1]:i&&(n=r.hideTip[i-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function p2(r,t,e){r.handler("leave",null,e)}function yg(r,t,e,i){t.handler(r,e,i)}function g2(r){var t={showTip:[],hideTip:[]},e=function(i){var n=t[i.type];n?n.push(i):(i.dispatchAction=e,r.dispatchAction(i))};return{dispatchAction:e,pendings:t}}function hh(r,t){if(!et.node){var e=t.getZr(),i=(lr(e).records||{})[r];i&&(lr(e).records[r]=null)}}var y2=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=i.getComponent("tooltip"),o=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";N_("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,i){hh("axisPointer",i)},t.prototype.dispose=function(e,i){hh("axisPointer",i)},t.type="axisPointer",t}(be);function z_(r,t){var e=[],i=r.seriesIndex,n;if(i==null||!(n=t.getSeriesByIndex(i)))return{point:[]};var a=n.getData(),o=Ci(a,r);if(o==null||o<0||V(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),h=f.dim,c=u.dim,v=h==="x"||h==="radius"?1:0,d=a.mapDimension(c),p=[];p[v]=a.get(d,o),p[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(a.getValues(Z(l.dimensions,function(g){return a.mapDimension(g)}),o))||[];else if(s){var y=s.getBoundingRect().clone();y.applyTransform(s.transform),e=[y.x+y.width/2,y.y+y.height/2]}return{point:e,el:s}}var mg=bt();function m2(r,t,e){var i=r.currTrigger,n=[r.x,r.y],a=r,o=r.dispatchAction||nt(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){ls(n)&&(n=z_({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=ls(n),u=a.axesInfo,f=s.axesInfo,h=i==="leave"||ls(n),c={},v={},d={list:[],map:{}},p={showPointer:St(S2,v),showTooltip:St(b2,d)};T(s.coordSysMap,function(g,m){var _=l||g.containPoint(n);T(s.coordSysAxesInfo[m],function(S,b){var w=S.axis,x=C2(u,S);if(!h&&_&&(!u||x)){var C=x&&x.value;C==null&&!l&&(C=w.pointToData(n)),C!=null&&_g(S,C,p,!1,c)}})});var y={};return T(f,function(g,m){var _=g.linkGroup;_&&!v[m]&&T(_.axesInfo,function(S,b){var w=v[b];if(S!==g&&w){var x=w.value;_.mapper&&(x=g.axis.scale.parse(_.mapper(x,Sg(S),Sg(g)))),y[g.key]=x}})}),T(y,function(g,m){_g(f[m],g,p,!0,c)}),w2(v,f,c),x2(d,n,r,o),T2(f,o,e),c}}function _g(r,t,e,i,n){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=_2(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&z(n,s[0]),!i&&r.snap&&a.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function _2(r,t){var e=t.axis,i=e.dim,n=r,a=[],o=Number.MAX_VALUE,s=-1;return T(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(i),h,c;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,r,e);c=v.dataIndices,h=v.nestestValue}else{if(c=l.indicesOfNearest(i,f[0],r,e.type==="category"?.5:null),!c.length)return;h=l.getData().get(f[0],c[0])}if(!(h==null||!isFinite(h))){var d=r-h,p=Math.abs(d);p<=o&&((p=0&&s<0)&&(o=p,s=d,n=h,a.length=0),T(c,function(y){a.push({seriesIndex:l.seriesIndex,dataIndexInside:y,dataIndex:l.getData().getRawIndex(y)})}))}}),{payloadBatch:a,snapToValue:n}}function S2(r,t,e,i){r[t.key]={value:e,payloadBatch:i}}function b2(r,t,e,i){var n=e.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=Oa(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function w2(r,t,e){var i=e.axesInfo=[];T(t,function(n,a){var o=n.axisPointerModel.option,s=r[a];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function x2(r,t,e,i){if(ls(t)||!r.list.length){i({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function T2(r,t,e){var i=e.getZr(),n="axisPointerLastHighlights",a=mg(i)[n]||{},o=mg(i)[n]={};T(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&T(h.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];T(a,function(u,f){!o[f]&&l.push(u)}),T(o,function(u,f){!a[f]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function C2(r,t){for(var e=0;e<(r||[]).length;e++){var i=r[e];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}function Sg(r){var t=r.axis.model,e={},i=e.axisDim=r.axis.dim;return e.axisIndex=e[i+"AxisIndex"]=t.componentIndex,e.axisName=e[i+"AxisName"]=t.name,e.axisId=e[i+"AxisId"]=t.id,e}function ls(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function F_(r){I_.registerAxisPointerClass("CartesianAxisPointer",u2),r.registerComponentModel(h2),r.registerComponentView(y2),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!V(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=NL(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},m2)}function M2(r){Br(KL),Br(F_)}var bg=["x","y","radius","angle","single"],D2=["cartesian2d","polar","singleAxis"];function A2(r){var t=r.get("coordinateSystem");return ot(D2,t)>=0}function Ar(r){return r+"Axis"}function L2(r,t){var e=rt(),i=[],n=rt();r.eachComponent({mainType:"dataZoom",query:t},function(f){n.get(f.uid)||s(f)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(f){!n.get(f.uid)&&l(f)&&(s(f),a=!0)}function s(f){n.set(f.uid,!0),i.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(c,v){var d=e.get(c);d&&d[v]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,c){(e.get(h)||e.set(h,[]))[c]=!0})}return i}function I2(r){var t=r.ecModel,e={infoList:[],infoMap:rt()};return r.eachTargetAxis(function(i,n){var a=t.getComponent(Ar(i),n);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(a)}}}),e}var Hu=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r}(),wg=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,i,n){var a=xg(e);this.settledOption=a,this.mergeDefaultAndTheme(e,n),this._doInit(a)},t.prototype.mergeOption=function(e){var i=xg(e);lt(this.option,e,!0),lt(this.settledOption,i,!0),this._doInit(i)},t.prototype._doInit=function(e){var i=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;T([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(i[a[0]]=n[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),i=this._targetAxisInfoMap=rt(),n=this._fillSpecifiedTargetAxis(i);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var i=!1;return T(bg,function(n){var a=this.getReferringComponents(Ar(n),gb);if(a.specified){i=!0;var o=new Hu;T(a.models,function(s){o.add(s.componentIndex)}),e.set(n,o)}},this),i},t.prototype._fillAutoTargetAxisByOrient=function(e,i){var n=this.ecModel,a=!0;if(a){var o=i==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=n.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===i}});l(s,"single")}function l(u,f){var h=u[0];if(h){var c=new Hu;if(c.add(h.componentIndex),e.set(f,c),a=!1,f==="x"||f==="y"){var v=h.getReferringComponents("grid",Yt).models[0];v&&T(u,function(d){h.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",Yt).models[0]&&c.add(d.componentIndex)})}}}a&&T(bg,function(u){if(a){var f=n.findComponents({mainType:Ar(u),filter:function(c){return c.get("type",!0)==="category"}});if(f[0]){var h=new Hu;h.add(f[0].componentIndex),e.set(u,h),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(i){!e&&(e=i)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var i=this._rangePropMode,n=this.get("rangeMode");T([["start","startValue"],["end","endValue"]],function(a,o){var s=e[a[0]]!=null,l=e[a[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":n?i[o]=n[o]:s&&(i[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(i,n){e==null&&(e=this.ecModel.getComponent(Ar(i),n))},this),e},t.prototype.eachTargetAxis=function(e,i){this._targetAxisInfoMap.each(function(n,a){T(n.indexList,function(o){e.call(i,a,o)})})},t.prototype.getAxisProxy=function(e,i){var n=this.getAxisModel(e,i);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,i){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[i])return this.ecModel.getComponent(Ar(e),i)},t.prototype.setRawRange=function(e){var i=this.option,n=this.settledOption;T([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(i[a[0]]=n[a[0]]=e[a[0]],i[a[1]]=n[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var i=this.option;T(["start","startValue","end","endValue"],function(n){i[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,i){if(e==null&&i==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(e,i).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var i,n=this._targetAxisInfoMap.keys(),a=0;ao[1];if(_&&!S&&!b)return!0;_&&(y=!0),S&&(d=!0),b&&(p=!0)}return y&&d&&p})}else en(f,function(v){if(a==="empty")l.setData(u=u.map(v,function(p){return s(p)?p:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});en(f,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,i=this._dataExtent;en(["min","max"],function(n){var a=e.get(n+"Span"),o=e.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=Et(i[0]+o,i,[0,100],!0):a!=null&&(o=Et(a,[0,100],i,!0)-i[0]),t[n+"Span"]=a,t[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,i=this._valueWindow;if(e){var n=my(i,[0,500]);n=Math.min(n,20);var a=t.axis.scale.rawExtentInfo;e[0]!==0&&a.setDeterminedMinMax("min",+i[0].toFixed(n)),e[1]!==100&&a.setDeterminedMinMax("max",+i[1].toFixed(n)),a.freeze()}},r}();function R2(r,t,e){var i=[1/0,-1/0];en(e,function(o){ZD(i,o.getData(),t)});var n=r.getAxisModel(),a=q0(n.axis.scale,n,i).calculate();return[a.min,a.max]}var E2={getTargetSeries:function(r){function t(n){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(Ar(o),s);n(o,s,l,a)})})}t(function(n,a,o,s){o.__dzAxisProxy=null});var e=[];t(function(n,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new k2(n,a,s,r),e.push(o.__dzAxisProxy))});var i=rt();return T(e,function(n){T(n.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(i,n){e.getAxisProxy(i,n).reset(e)}),e.eachTargetAxis(function(i,n){e.getAxisProxy(i,n).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var i=e.findRepresentativeAxisProxy();if(i){var n=i.getDataPercentWindow(),a=i.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:a[0],endValue:a[1]})}})}};function O2(r){r.registerAction("dataZoom",function(t,e){var i=L2(e,t);T(i,function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var Cg=!1;function B2(r){Cg||(Cg=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,E2),O2(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function N2(r,t){var e=cl(t.get("padding")),i=t.getItemStyle(["color","opacity"]);i.fill=t.get("backgroundColor");var n=new _t({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1});return n}var z2=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:W.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:W.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:W.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:W.color.tertiary,fontSize:14}},t}(ct);function V_(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function G_(r){if(et.domSupported){for(var t=document.documentElement.style,e=0,i=r.length;e-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var f=u*Math.PI/180,h=o+n,c=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),v=Math.round(((c-Math.SQRT2*n)/2+Math.SQRT2*n-(c-h)/2)*100)/100;s+=";"+a+":-"+v+"px";var d=t+" solid "+n+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+i+";"];return'
'}function Y2(r,t,e){var i="cubic-bezier(0.23,1,0.32,1)",n="",a="";return e&&(n=" "+r/2+"s "+i,a="opacity"+n+",visibility"+n),t||(n=" "+r+"s "+i,a+=(a.length?",":"")+(et.transformSupported?""+Ec+n:",left"+n+",top"+n)),G2+":"+a}function Mg(r,t,e){var i=r.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!et.transformSupported)return e?"top:"+n+";left:"+i+";":[["top",n],["left",i]];var a=et.transform3dSupported,o="translate"+(a?"3d":"")+"("+i+","+n+(a?",0":"")+")";return e?"top:0;left:0;"+Ec+":"+o+";":[["top",0],["left",0],[H_,o]]}function X2(r){var t=[],e=r.get("fontSize"),i=r.getTextColor();i&&t.push("color:"+i),t.push("font:"+r.getFont());var n=$(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+n+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),T(["decoration","align"],function(u){var f=r.get(u);f&&t.push("text-"+u+":"+f)}),t.join(";")}function Z2(r,t,e,i){var n=[],a=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),f=r.get("shadowOffsetY"),h=r.getModel("textStyle"),c=e0(r,"html"),v=u+"px "+f+"px "+s+"px "+l;return n.push("box-shadow:"+v),t&&a>0&&n.push(Y2(a,e,i)),o&&n.push("background-color:"+o),T(["width","color","radius"],function(d){var p="border-"+d,y=Am(p),g=r.get(y);g!=null&&n.push(p+":"+g+(d==="color"?"":"px"))}),n.push(X2(h)),c!=null&&n.push("padding:"+cl(c).join("px ")+"px"),n.join(";")+";"}function Dg(r,t,e,i,n){var a=t&&t.painter;if(e){var o=a&&a.getViewportRoot();o&&F1(r,o,e,i,n)}else{r[0]=i,r[1]=n;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var $2=function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,et.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=t.getZr(),a=e.appendTo,o=a&&(Y(a)?document.querySelector(a):da(a)?a:tt(a)&&a(t.getDom()));Dg(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(i),this._api=t,this._container=o;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,f=n.painter.getViewportRoot();ce(f,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),i=V2(e,"position"),n=e.style;n.position!=="absolute"&&i!=="absolute"&&(n.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,a=this._styleCoord;i.innerHTML?n.cssText=H2+Z2(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+Mg(a[0],a[1],!0)+("border-color:"+Ai(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,i,n,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(Y(a)&&i.get("trigger")==="item"&&!V_(i)&&(s=U2(i,n,a)),Y(t))o.innerHTML=t+s;else if(t){o.innerHTML="",V(t)||(t=[t]);for(var l=0;l=0?this._tryShow(a,o):n==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,i=this._ecModel,n=this._api,a=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(e,i,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,i,n,a){if(!(a.from===this.uid||et.node||!n.getDom())){var o=Ig(a,n);this._ticket="";var s=a.dataByCoordSys,l=eI(a,i,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=K2;f.x=a.x,f.y=a.y,f.update(),ft(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(e,i,n,a))return;var h=z_(a,i),c=h.point[0],v=h.point[1];c!=null&&v!=null&&this._tryShow({offsetX:c,offsetY:v,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:n.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(e,i,n,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(Ig(a,n))},t.prototype._manuallyAxisShowTip=function(e,i,n,a){var o=a.seriesIndex,s=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(u){var f=u.getData(),h=Wn([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(e,i){var n=e.target,a=this._tooltipModel;if(a){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){var s=ft(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;jn(n,function(f){if(f.tooltipDisabled)return l=u=null,!0;l||u||(ft(f).dataIndex!=null?l=f:ft(f).tooltipConfig!=null&&(u=f))},!0),l?this._showSeriesItemTooltip(e,l,i):u?this._showComponentItemTooltip(e,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},t.prototype._showOrMove=function(e,i){var n=e.get("showDelay");i=nt(i,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(i,n):i()},t.prototype._showAxisTooltip=function(e,i){var n=this._ecModel,a=this._tooltipModel,o=[i.offsetX,i.offsetY],s=Wn([i.tooltipOption],a),l=this._renderMode,u=[],f=Li("section",{blocks:[],noHeader:!0}),h=[],c=new pu;T(e,function(m){T(m.dataByAxis,function(_){var S=n.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!S||b==null)){var w=O_(b,S.axis,n,_.seriesDataIndices,_.valueLabelOpt),x=Li("section",{header:w,noHeader:!He(w),sortBlocks:!0,blocks:[]});f.blocks.push(x),T(_.seriesDataIndices,function(C){var D=n.getSeriesByIndex(C.seriesIndex),A=C.dataIndexInside,M=D.getDataParams(A);if(!(M.dataIndex<0)){M.axisDim=_.axisDim,M.axisIndex=_.axisIndex,M.axisType=_.axisType,M.axisId=_.axisId,M.axisValue=zs(S.axis,{value:b}),M.axisValueLabel=w,M.marker=c.makeTooltipMarker("item",Ai(M.color),l);var I=kd(D.formatTooltip(A,!0,null)),L=I.frag;if(L){var P=Wn([D],a).get("valueFormatter");x.blocks.push(P?z({valueFormatter:P},L):L)}I.text&&h.push(I.text),u.push(M)}})}})}),f.blocks.reverse(),h.reverse();var v=i.position,d=s.get("order"),p=Nd(f,c,l,d,n.get("useUTC"),s.get("textStyle"));p&&h.unshift(p);var y=l==="richText"?` + +`:"
",g=h.join(y);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,g,u,Math.random()+"",o[0],o[1],v,null,c)})},t.prototype._showSeriesItemTooltip=function(e,i,n){var a=this._ecModel,o=ft(i),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,c=u.getData(h),v=this._renderMode,d=e.positionDefault,p=Wn([c.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),y=p.get("trigger");if(!(y!=null&&y!=="item")){var g=u.getDataParams(f,h),m=new pu;g.marker=m.makeTooltipMarker("item",Ai(g.color),v);var _=kd(u.formatTooltip(f,!1,h)),S=p.get("order"),b=p.get("valueFormatter"),w=_.frag,x=w?Nd(b?z({valueFormatter:b},w):w,m,v,S,a.get("useUTC"),p.get("textStyle")):_.text,C="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,x,g,C,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,i,n){var a=this._renderMode==="html",o=ft(i),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(Y(l)){var f=l;l={content:f,formatter:f},u=!0}u&&a&&l.content&&(l=at(l),l.content=Qt(l.content));var h=[l],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&h.push(c),h.push({formatter:l.content});var v=e.positionDefault,d=Wn(h,this._tooltipModel,v?{position:v}:null),p=d.get("content"),y=Math.random()+"",g=new pu;this._showOrMove(d,function(){var m=at(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,y,e.offsetX,e.offsetY,e.position,i,g)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,i,n,a,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var c=e.get("formatter");l=l||e.get("position");var v=i,d=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),p=d.color;if(c)if(Y(c)){var y=e.ecModel.get("useUTC"),g=V(n)?n[0]:n,m=g&&g.axisType&&g.axisType.indexOf("time")>=0;v=c,m&&(v=hl(g.axisValue,v,y)),v=Lm(v,n,!0)}else if(tt(c)){var _=nt(function(S,b){S===this._ticket&&(h.setContent(b,f,e,p,l),this._updatePosition(e,l,o,s,h,n,u))},this);this._ticket=a,v=c(n,a,_)}else v=c;h.setContent(v,f,e,p,l),h.show(e,p),this._updatePosition(e,l,o,s,h,n,u)}},t.prototype._getNearestPoint=function(e,i,n,a,o){if(n==="axis"||V(i))return{color:a||o};if(!V(i))return{color:a||i.color||i.borderColor}},t.prototype._updatePosition=function(e,i,n,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();i=i||e.get("position");var h=o.getSize(),c=e.get("align"),v=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),tt(i)&&(i=i([n,a],s,o.el,d,{viewSize:[u,f],contentSize:h.slice()})),V(i))n=Pt(i[0],u),a=Pt(i[1],f);else if(q(i)){var p=i;p.width=h[0],p.height=h[1];var y=gn(p,{width:u,height:f});n=y.x,a=y.y,c=null,v=null}else if(Y(i)&&l){var g=tI(i,d,h,e.get("borderWidth"));n=g[0],a=g[1]}else{var g=J2(n,a,o,u,f,c?null:20,v?null:20);n=g[0],a=g[1]}if(c&&(n-=Pg(c)?h[0]/2:c==="right"?h[0]:0),v&&(a-=Pg(v)?h[1]/2:v==="bottom"?h[1]:0),V_(e)){var g=j2(n,a,o,u,f);n=g[0],a=g[1]}o.moveTo(n,a)},t.prototype._updateContentNotChangedOnAxis=function(e,i){var n=this._lastDataByCoordSys,a=this._cbParamsList,o=!!n&&n.length===e.length;return o&&T(n,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&T(u,function(c,v){var d=h[v]||{},p=c.seriesDataIndices||[],y=d.seriesDataIndices||[];o=o&&c.value===d.value&&c.axisType===d.axisType&&c.axisId===d.axisId&&p.length===y.length,o&&T(p,function(g,m){var _=y[m];o=o&&g.seriesIndex===_.seriesIndex&&g.dataIndex===_.dataIndex}),a&&T(c.seriesDataIndices,function(g){var m=g.seriesIndex,_=i[m],S=a[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=i,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,i){et.node||!i.getDom()||(Ps(this,"_updatePosition"),this._tooltipContent.dispose(),hh("itemTooltip",i))},t.type="tooltip",t}(be);function Wn(r,t,e){var i=t.ecModel,n;e?(n=new Ct(e,i,i),n=new Ct(t.option,n,i)):n=t;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof Ct&&(o=o.get("tooltip",!0)),Y(o)&&(o={formatter:o}),o&&(n=new Ct(o,n,i)))}return n}function Ig(r,t){return r.dispatchAction||nt(t.dispatchAction,t)}function J2(r,t,e,i,n,a,o){var s=e.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>i?r-=l+a:r+=a),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function j2(r,t,e,i,n){var a=e.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,i)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function tI(r,t,e,i){var n=e[0],a=e[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+f/2-a/2;break;case"top":s=t.x+u/2-n/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+f+o;break;case"left":s=t.x-n-o,l=t.y+f/2-a/2;break;case"right":s=t.x+u+o,l=t.y+f/2-a/2}return[s,l]}function Pg(r){return r==="center"||r==="middle"}function eI(r,t,e){var i=Ih(r).queryOptionMap,n=i.keys()[0];if(!(!n||n==="series")){var a=Va(t,n,i.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=ft(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function rI(r){Br(F_),r.registerComponentModel(z2),r.registerComponentView(Q2),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ee),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ee)}function iI(r,t){if(!r)return!1;for(var e=V(r)?r:[r],i=0;i=0&&(s[o]=+s[o].toFixed(d)),[s,v]}var Uo={min:St(Wo,"min"),max:St(Wo,"max"),average:St(Wo,"average"),median:St(Wo,"median")};function kg(r,t){if(t){var e=r.getData(),i=r.coordinateSystem,n=i&&i.dimensions;if(!aI(t)&&!V(t.coord)&&V(n)){var a=U_(t,e,i,r);if(t=at(t),t.type&&Uo[t.type]&&a.baseAxis&&a.valueAxis){var o=ot(n,a.baseAxis.dim),s=ot(n,a.valueAxis.dim),l=Uo[t.type](e,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!V(n)){t.coord=[];var u=r.getBaseAxis();if(u&&t.type&&Uo[t.type]){var f=i.getOtherAxis(u);f&&(t.value=Us(e,e.mapDimension(f.dim),t.type))}}else for(var h=t.coord,c=0;c<2;c++)Uo[h[c]]&&(h[c]=Us(e,e.mapDimension(n[c]),h[c]));return t}}function U_(r,t,e,i){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,n.valueAxis=e.getAxis(oI(i,n.valueDataDim)),n.baseAxis=e.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=i.getBaseAxis(),n.valueAxis=e.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function oI(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function Rg(r,t){return r&&r.containData&&t.coord&&!nI(t)?r.containData(t.coord):!0}function sI(r,t){return r?function(e,i,n,a){var o=a<2?e.coord&&e.coord[a]:e.value;return vn(o,t[a])}:function(e,i,n,a){return vn(e.value,t[a])}}function Us(r,t,e){if(e==="average"){var i=0,n=0;return r.each(t,function(a,o){isNaN(a)||(i+=a,n++)}),i/n}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var Wu=bt(),lI=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=rt()},t.prototype.render=function(e,i,n){var a=this,o=this.markerGroupMap;o.each(function(s){Wu(s).keep=!1}),i.eachSeries(function(s){var l=Sn.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,i,n)}),o.each(function(s){!Wu(s).keep&&a.group.remove(s.group)}),uI(i,o,this.type)},t.prototype.markKeep=function(e){Wu(e).keep=!0},t.prototype.toggleBlurSeries=function(e,i){var n=this;T(e,function(a){var o=Sn.getMarkerModelFromSeries(a,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(i?Hy(l):Nh(l))})}})},t.type="marker",t}(be);function uI(r,t,e){r.eachSeries(function(i){var n=Sn.getMarkerModelFromSeries(i,e),a=t.get(i.id);if(n&&a&&a.group){var o=Xh(n),s=o.z,l=o.zlevel;Zh(a.group,s,l)}})}var fI=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,i,n){return new t(e,i,n)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(Sn),Yo=bt(),hI=function(r,t,e,i){var n=r.getData(),a;if(V(i))a=i;else{var o=i.type;if(o==="min"||o==="max"||o==="average"||o==="median"||i.xAxis!=null||i.yAxis!=null){var s=void 0,l=void 0;if(i.yAxis!=null||i.xAxis!=null)s=t.getAxis(i.yAxis!=null?"y":"x"),l=ga(i.yAxis,i.xAxis);else{var u=U_(i,n,t,r);s=u.valueAxis;var f=F0(n,u.valueDataDim);l=Us(n,f,o)}var h=s.dim==="x"?0:1,c=1-h,v=at(i),d={coord:[]};v.type=null,v.coord=[],v.coord[c]=-1/0,d.coord[c]=1/0;var p=e.get("precision");p>=0&&pt(l)&&(l=+l.toFixed(Math.min(p,20))),v.coord[h]=d.coord[h]=l,a=[v,d,{type:o,valueIndex:i.valueIndex,value:l}]}else a=[]}var y=[kg(r,a[0]),kg(r,a[1]),z({},a[2])];return y[2].type=y[2].type||null,lt(y[2],y[0]),lt(y[2],y[1]),y};function Ys(r){return!isNaN(r)&&!isFinite(r)}function Eg(r,t,e,i){var n=1-r,a=i.dimensions[r];return Ys(t[n])&&Ys(e[n])&&t[r]===e[r]&&i.getAxis(a).containData(t[r])}function cI(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,i=t[1].coord;if(e&&i&&(Eg(1,e,i,r)||Eg(0,e,i,r)))return!0}return Rg(r,t[0])&&Rg(r,t[1])}function Uu(r,t,e,i,n){var a=i.coordinateSystem,o=r.getItemModel(t),s,l=Pt(o.get("x"),n.getWidth()),u=Pt(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition)s=i.getMarkerPosition(r.getValues(r.dimensions,t));else{var f=a.dimensions,h=r.get(f[0],t),c=r.get(f[1],t);s=a.dataToPoint([h,c])}if(yl(a,"cartesian2d")){var v=a.getAxis("x"),d=a.getAxis("y"),f=a.dimensions;Ys(r.get(f[0],t))?s[0]=v.toGlobalCoord(v.getExtent()[e?0:1]):Ys(r.get(f[1],t))&&(s[1]=d.toGlobalCoord(d.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var vI=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,i,n){i.eachSeries(function(a){var o=Sn.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Yo(o).from,u=Yo(o).to;l.each(function(f){Uu(l,f,!0,a,n),Uu(u,f,!1,a,n)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,i,n,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new t2);this.group.add(f.group);var h=dI(o,e,i),c=h.from,v=h.to,d=h.line;Yo(i).from=c,Yo(i).to=v,i.setData(d);var p=i.get("symbol"),y=i.get("symbolSize"),g=i.get("symbolRotate"),m=i.get("symbolOffset");V(p)||(p=[p,p]),V(y)||(y=[y,y]),V(g)||(g=[g,g]),V(m)||(m=[m,m]),h.from.each(function(S){_(c,S,!0),_(v,S,!1)}),d.each(function(S){var b=d.getItemModel(S),w=b.getModel("lineStyle").getLineStyle();d.setItemLayout(S,[c.getItemLayout(S),v.getItemLayout(S)]);var x=b.get("z2");w.stroke==null&&(w.stroke=c.getItemVisual(S,"style").fill),d.setItemVisual(S,{z2:$(x,0),fromSymbolKeepAspect:c.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(S,"symbolOffset"),fromSymbolRotate:c.getItemVisual(S,"symbolRotate"),fromSymbolSize:c.getItemVisual(S,"symbolSize"),fromSymbol:c.getItemVisual(S,"symbol"),toSymbolKeepAspect:v.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(S,"symbolOffset"),toSymbolRotate:v.getItemVisual(S,"symbolRotate"),toSymbolSize:v.getItemVisual(S,"symbolSize"),toSymbol:v.getItemVisual(S,"symbol"),style:w})}),f.updateData(d),h.line.eachItemGraphicEl(function(S){ft(S).dataModel=i,S.traverse(function(b){ft(b).dataModel=i})});function _(S,b,w){var x=S.getItemModel(b);Uu(S,b,w,e,a);var C=x.getModel("itemStyle").getItemStyle();C.fill==null&&(C.fill=f0(l,"color")),S.setItemVisual(b,{symbolKeepAspect:x.get("symbolKeepAspect"),symbolOffset:$(x.get("symbolOffset",!0),m[w?0:1]),symbolRotate:$(x.get("symbolRotate",!0),g[w?0:1]),symbolSize:$(x.get("symbolSize"),y[w?0:1]),symbol:$(x.get("symbol",!0),p[w?0:1]),style:C})}this.markKeep(f),f.group.silent=i.get("silent")||e.get("silent")},t.type="markLine",t}(lI);function dI(r,t,e){var i;r?i=Z(r&&r.dimensions,function(u){var f=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return z(z({},f),{name:u,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new ss(i,e),a=new ss(i,e),o=new ss([],e),s=Z(e.get("data"),St(hI,t,r,e));r&&(s=It(s,St(cI,r)));var l=sI(!!r,i);return n.initData(Z(s,function(u){return u[0]}),null,l),a.initData(Z(s,function(u){return u[1]}),null,l),o.initData(Z(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:a,line:o}}function pI(r){r.registerComponentModel(fI),r.registerComponentView(vI),r.registerPreprocessor(function(t){iI(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var gI=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},ch=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.call(this,e,i),this._updateSelector(e)},t.prototype._updateSelector=function(e){var i=e.selector,n=this.ecModel;i===!0&&(i=e.selector=["all","inverse"]),V(i)&&T(i,function(a,o){Y(a)&&(a={type:a}),i[o]=lt(a,gI(n,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var i=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:W.size.m,align:"auto",backgroundColor:W.color.transparent,borderColor:W.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:W.color.disabled,inactiveBorderColor:W.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:W.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:W.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:W.color.tertiary,borderWidth:1,borderColor:W.color.border},emphasis:{selectorLabel:{show:!0,color:W.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(ct),Ji=St,vh=T,Xo=Mt,Y_=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new Xo),this.group.add(this._selectorGroup=new Xo),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,i,n){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,i,n,l,s,u);var f=sc(e,n).refContainer,h=e.getBoxLayoutParams(),c=e.get("padding"),v=gn(h,f,c),d=this.layoutInner(e,o,v,a,l,u),p=gn(gt({width:d.width,height:d.height},h),f,c);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=N2(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,i,n,a,o,s,l){var u=this.getContentGroup(),f=rt(),h=i.get("selectedMode"),c=i.get("triggerEvent"),v=[];n.eachRawSeries(function(d){!d.get("legendHoverLink")&&v.push(d.id)}),vh(i.getData(),function(d,p){var y=this,g=d.get("name");if(!this.newlineDisabled&&(g===""||g===` +`)){var m=new Xo;m.newline=!0,u.add(m);return}var _=n.getSeriesByName(g)[0];if(!f.get(g))if(_){var S=_.getData(),b=S.getVisual("legendLineStyle")||{},w=S.getVisual("legendIcon"),x=S.getVisual("style"),C=this._createItem(_,g,p,d,i,e,b,x,w,h,a);C.on("click",Ji(Og,g,null,a,v)).on("mouseover",Ji(dh,_.name,null,a,v)).on("mouseout",Ji(ph,_.name,null,a,v)),n.ssr&&C.eachChild(function(D){var A=ft(D);A.seriesIndex=_.seriesIndex,A.dataIndex=p,A.ssrType="legend"}),c&&C.eachChild(function(D){y.packEventData(D,i,_,p,g)}),f.set(g,!0)}else n.eachRawSeries(function(D){var A=this;if(!f.get(g)&&D.legendVisualProvider){var M=D.legendVisualProvider;if(!M.containName(g))return;var I=M.indexOfName(g),L=M.getItemVisual(I,"style"),P=M.getItemVisual(I,"legendIcon"),k=Xe(L.fill);k&&k[3]===0&&(k[3]=.2,L=z(z({},L),{fill:za(k,"rgba")}));var B=this._createItem(D,g,p,d,i,e,{},L,P,h,a);B.on("click",Ji(Og,null,g,a,v)).on("mouseover",Ji(dh,null,g,a,v)).on("mouseout",Ji(ph,null,g,a,v)),n.ssr&&B.eachChild(function(U){var O=ft(U);O.seriesIndex=D.seriesIndex,O.dataIndex=p,O.ssrType="legend"}),c&&B.eachChild(function(U){A.packEventData(U,i,D,p,g)}),f.set(g,!0)}},this)},this),o&&this._createSelector(o,i,a,s,l)},t.prototype.packEventData=function(e,i,n,a,o){var s={componentType:"legend",componentIndex:i.componentIndex,dataIndex:a,value:o,seriesIndex:n.seriesIndex};ft(e).eventData=s},t.prototype._createSelector=function(e,i,n,a,o){var s=this.getSelectorGroup();vh(e,function(u){var f=u.type,h=new Gt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:i.id})}});s.add(h);var c=i.getModel("selectorLabel"),v=i.getModel(["emphasis","selectorLabel"]);$a(h,{normal:c,emphasis:v},{defaultText:u.title}),Ts(h)})},t.prototype._createItem=function(e,i,n,a,o,s,l,u,f,h,c){var v=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),y=o.isSelected(i),g=a.get("symbolRotate"),m=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var S=yI(f,a,l,u,v,y,c),b=new Xo,w=a.getModel("textStyle");if(tt(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:g,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var x=_==="inherit"&&e.getData().getVisual("symbol")?g==="inherit"?e.getData().getVisual("symbolRotate"):g:0;b.add(mI({itemWidth:d,itemHeight:p,icon:f,iconRotate:x,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var C=s==="left"?d+5:-5,D=s,A=o.get("formatter"),M=i;Y(A)&&A?M=A.replace("{name}",i??""):tt(A)&&(M=A(i));var I=y?w.getTextColor():a.get("inactiveColor");b.add(new Gt({style:Di(w,{text:M,x:C,y:p/2,fill:I,align:D,verticalAlign:"middle"},{inheritColor:I})}));var L=new _t({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=a.getModel("tooltip");return P.get("show")&&sl({el:L,componentModel:o,itemName:i,itemTooltipOption:P.option}),b.add(L),b.eachChild(function(k){k.silent=!0}),L.silent=!h,this.getContentGroup().add(b),Ts(b),b.__legendDataIndex=n,b},t.prototype.layoutInner=function(e,i,n,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();fa(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){fa("horizontal",u,e.get("selectorItemGap",!0));var c=u.getBoundingRect(),v=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,y=p===0?"width":"height",g=p===0?"height":"width",m=p===0?"y":"x";s==="end"?v[p]+=f[y]+d:h[p]+=c[y]+d,v[1-p]+=f[g]/2-c[g]/2,u.x=v[0],u.y=v[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[y]=f[y]+d+c[y],_[g]=Math.max(f[g],c[g]),_[m]=Math.min(0,c[m]+v[1-p]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(be);function yI(r,t,e,i,n,a,o){function s(y,g){y.lineWidth==="auto"&&(y.lineWidth=g.lineWidth>0?2:0),vh(y,function(m,_){y[_]==="inherit"&&(y[_]=g[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?i.decal:Yf(h,o),u.fill==="inherit"&&(u.fill=i[n]),u.stroke==="inherit"&&(u.stroke=i[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?i:e).opacity),s(u,i);var c=t.getModel("lineStyle"),v=c.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),v.stroke==="auto"&&(v.stroke=i.fill),!a){var d=t.get("inactiveBorderWidth"),p=u[f];u.lineWidth=d==="auto"?i.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function mI(r){var t=r.icon||"roundRect",e=cr(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill=W.color.neutral00,e.style.lineWidth=2),e}function Og(r,t,e,i){ph(r,t,e,i),e.dispatchAction({type:"legendToggleSelect",name:r??t}),dh(r,t,e,i)}function X_(r){for(var t=r.getZr().storage.getDisplayList(),e,i=0,n=t.length;in[o],y=[-v.x,-v.y];i||(y[a]=f[u]);var g=[0,0],m=[-d.x,-d.y],_=$(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?m[a]+=n[o]-d[o]:g[a]+=d[o]+_}m[1-a]+=v[s]/2-d[s]/2,f.setPosition(y),h.setPosition(g),c.setPosition(m);var b={x:0,y:0};if(b[o]=p?n[o]:v[o],b[s]=Math.max(v[s],d[s]),b[l]=Math.min(0,d[l]+m[1-a]),h.__rectSize=n[o],p){var w={x:0,y:0};w[o]=Math.max(n[o]-d[o]-_,0),w[s]=b[s],h.setClipPath(new _t({shape:w})),h.__rectSize=w[o]}else c.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(e);return x.pageIndex!=null&&Zt(f,{x:x.contentPosition[0],y:x.contentPosition[1]},p?e:null),this._updatePageInfoView(e,x),b},t.prototype._pageGo=function(e,i,n){var a=this._getPageInfo(i)[e];a!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:i.id})},t.prototype._updatePageInfoView=function(e,i){var n=this._controllerGroup;T(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",c=i[h]!=null,v=n.childOfName(f);v&&(v.setStyle("fill",c?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var a=n.childOfName("pageText"),o=e.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;a&&o&&a.setStyle("text",Y(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var i=e.get("scrollDataIndex",!0),n=this.getContentGroup(),a=this._containerGroup.__rectSize,o=e.getOrient().index,s=Yu[o],l=Xu[o],u=this._findTargetItemIndex(i),f=n.children(),h=f[u],c=f.length,v=c?1:0,d={contentPosition:[n.x,n.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var p=S(h);d.contentPosition[o]=-p.s;for(var y=u+1,g=p,m=p,_=null;y<=c;++y)_=S(f[y]),(!_&&m.e>g.s+a||_&&!b(_,g.s))&&(m.i>g.i?g=m:g=_,g&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=g.i),++d.pageCount)),m=_;for(var y=u-1,g=p,m=p,_=null;y>=-1;--y)_=S(f[y]),(!_||!b(m,_.s))&&g.i=x&&w.s<=x+a}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var i,n=this.getContentGroup(),a;return n.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===e&&(i=s)}),i??a},t.type="legend.scroll",t}(Y_);function xI(r){r.registerAction("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;i!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(i)})})}function TI(r){Br(Z_),r.registerComponentModel(bI),r.registerComponentView(wI),xI(r)}function CI(r){Br(Z_),Br(TI)}var MI=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=$h(wg.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:W.color.accent10,borderRadius:0,backgroundColor:W.color.transparent,dataBackground:{lineStyle:{color:W.color.accent30,width:.5},areaStyle:{color:W.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:W.color.accent40,width:.5},areaStyle:{color:W.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:W.color.neutral00,borderColor:W.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:W.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:W.color.tertiary},brushSelect:!0,brushStyle:{color:W.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:W.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(wg),Yn=_t,DI=1,Zu=30,AI=7,Xn="horizontal",Fg="vertical",LI=5,II=["line","bar","candlestick","scatter"],PI={easing:"cubicOut",duration:100,delay:0},kI=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,i){this.api=i,this._onBrush=nt(this._onBrush,this),this._onBrushEnd=nt(this._onBrushEnd,this)},t.prototype.render=function(e,i,n,a){if(r.prototype.render.apply(this,arguments),gc(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Ps(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var i=this._displayables.sliderGroup=new Mt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(i),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,i=this.api,n=e.get("brushSelect"),a=n?AI:0,o=sc(e,i).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Xn?{right:o.width-s.x-s.width,top:o.height-Zu-l-a,width:s.width,height:Zu}:{right:l,top:s.y,width:Zu,height:s.height},f=Cn(e.option);T(["right","top","width","height"],function(c){f[c]==="ph"&&(f[c]=u[c])});var h=gn(f,o);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===Fg&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,i=this._location,n=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===Xn&&!o?{scaleY:l?1:-1,scaleX:1}:n===Xn&&o?{scaleY:l?1:-1,scaleX:-1}:n===Fg&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=i.x-u.x,e.y=i.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,i=this._size,n=this._displayables.sliderGroup,a=e.get("brushSelect");n.add(new Yn({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new Yn({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:nt(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var i=this._size,n=this._shadowSize||[],a=e.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||i[0]!==n[0]||i[1]!==n[1]){var h=o.getDataExtent(e.thisDim),c=o.getDataExtent(l),v=(c[1]-c[0])*.3;c=[c[0]-v,c[1]+v];var d=[0,i[1]],p=[0,i[0]],y=[[i[0],0],[0,0]],g=[],m=p[1]/Math.max(1,o.count()-1),_=i[0]/(h[1]-h[0]),S=e.thisAxis.type==="time",b=-m,w=Math.round(o.count()/i[0]),x;o.each([e.thisDim,l],function(I,L,P){if(w>0&&P%w){S||(b+=m);return}b=S?(+I-h[0])*_:b+m;var k=L==null||isNaN(L)||L==="",B=k?0:Et(L,c,d,!0);k&&!x&&P?(y.push([y[y.length-1][0],0]),g.push([g[g.length-1][0],0])):!k&&x&&(y.push([b,0]),g.push([b,0])),k||(y.push([b,B]),g.push([b,B])),x=k}),u=this._shadowPolygonPts=y,f=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var C=this.dataZoomModel;function D(I){var L=C.getModel(I?"selectedDataBackground":"dataBackground"),P=new Mt,k=new Wa({shape:{points:u},segmentIgnoreThreshold:1,style:L.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),B=new Ua({shape:{points:f},segmentIgnoreThreshold:1,style:L.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(k),P.add(B),P}for(var A=0;A<3;A++){var M=D(A===1);this._displayables.sliderGroup.add(M),this._displayables.dataShadowSegs.push(M)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,i=e.get("showDataShadow");if(i!==!1){var n,a=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();T(l,function(u){if(!n&&!(i!==!0&&ot(II,u.get("type"))<0)){var f=a.getComponent(Ar(o),s).axis,h=RI(o),c,v=u.coordinateSystem;h!=null&&v.getOtherAxis&&(c=v.getOtherAxis(f).inverse),h=u.getData().mapDimension(h);var d=u.getData().mapDimension(o);n={thisAxis:f,series:u,thisDim:d,otherDim:h,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,i=this._displayables,n=i.handles=[null,null],a=i.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,h=l.get("brushSelect"),c=i.filler=new Yn({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new Yn({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:DI,fill:W.color.transparent}})),T([0,1],function(_){var S=l.get("handleIcon");!Rs[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var b=cr(S,-1,0,2,2,null,!0);b.attr({cursor:EI(this._orient),draggable:!0,drift:nt(this._onDragMove,this,_),ondragend:nt(this._onDragEnd,this),onmouseover:nt(this._showDataInfo,this,!0),onmouseout:nt(this._showDataInfo,this,!1),z2:5});var w=b.getBoundingRect(),x=l.get("handleSize");this._handleHeight=Pt(x,this._size[1]),this._handleWidth=w.width/w.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Ts(b);var C=l.get("handleColor");C!=null&&(b.style.fill=C),o.add(n[_]=b);var D=l.getModel("textStyle"),A=l.get("handleLabel")||{},M=A.show||!1;e.add(a[_]=new Gt({silent:!0,invisible:!M,style:Di(D,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:D.getTextColor(),font:D.getFont()}),z2:10}))},this);var v=c;if(h){var d=Pt(l.get("moveHandleSize"),s[1]),p=i.moveHandle=new _t({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),y=d*.8,g=i.moveHandleIcon=cr(l.get("moveHandleIcon"),-y/2,-y/2,y,y,W.color.neutral00,!0);g.silent=!0,g.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));v=i.moveZone=new _t({invisible:!0,shape:{y:s[1]-m,height:d+m}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(g),o.add(v)}v.attr({draggable:!0,cursor:"default",drift:nt(this._onDragMove,this,"all"),ondragstart:nt(this._showDataInfo,this,!0),ondragend:nt(this._onDragEnd,this),onmouseover:nt(this._showDataInfo,this,!0),onmouseout:nt(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[Et(e[0],[0,100],i,!0),Et(e[1],[0,100],i,!0)]},t.prototype._updateInterval=function(e,i){var n=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];fh(i,a,o,n.get("zoomLock")?"all":e,s.minSpan!=null?Et(s.minSpan,l,o,!0):null,s.maxSpan!=null?Et(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Kn([Et(a[0],o,l,!0),Et(a[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var i=this._displayables,n=this._handleEnds,a=Kn(n.slice()),o=this._size;T([0,1],function(v){var d=i.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:n[v]+(v?-1:1),y:o[1]/2-p/2})},this),i.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};i.moveHandle&&(i.moveHandle.setShape(s),i.moveZone.setShape(s),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=i.dataShadowSegs,u=[0,a[0],a[1],o[0]],f=0;fi[0]||n[1]<0||n[1]>i[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var i=e.offsetX,n=e.offsetY;this._brushStart=new dt(i,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var n=i.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();fh(0,l,o,0,u.minSpan!=null?Et(u.minSpan,s,o,!0):null,u.maxSpan!=null?Et(u.maxSpan,s,o,!0):null),this._range=Kn([Et(l[0],o,s,!0),Et(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(fs(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,i){var n=this._displayables,a=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new Yn({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,i),f=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:h[1]})},t.prototype._dispatchZoomAction=function(e){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?PI:null,start:i[0],end:i[1]})},t.prototype._findCoordRect=function(){var e,i=I2(this.dataZoomModel).infoList;if(!e&&i.length){var n=i[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var a=this.api.getWidth(),o=this.api.getHeight();e={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return e},t.type="dataZoom.slider",t}(P2);function RI(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function EI(r){return r==="vertical"?"ns-resize":"ew-resize"}function OI(r){r.registerComponentModel(MI),r.registerComponentView(kI),B2(r)}function Vg(r,t,e){var i=fr.createCanvas(),n=t.getWidth(),a=t.getHeight(),o=i.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=n+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",r)),i.width=n*e,i.height=a*e,i}var $u=function(r){F(t,r);function t(e,i,n){var a=r.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;n=n||ys,typeof e=="string"?o=Vg(e,i,n):q(e)&&(o=e,e=o.id),a.id=e,a.dom=o;var s=o.style;return s&&($g(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=i,a.dpr=n,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=Vg("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,i,n,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new it(0,0,0,0);function f(m){if(!(!m.isFinite()||m.isZero()))if(o.length===0){var _=new it(0,0,0,0);_.copy(m),o.push(_)}else{for(var S=!1,b=1/0,w=0,x=0;x=s)}}for(var h=this.__startIndex;h15)break}}P.prevElClipPaths&&g.restore()};if(m)if(m.length===0)C=y.__endIndex;else for(var A=v.dpr,M=0;M0&&t>n[0]){for(l=0;lt);l++);s=i[n[l]]}if(n.splice(l+1,0,t),i[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},r.prototype.eachLayer=function(t,e){for(var i=this._zlevelList,n=0;n0?Zo:0),this._needsManuallyCompositing),f.__builtin__||_h("ZLevel "+u+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,e(l),a=f),n.__dirty&oe&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(h,c){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,T(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var i=this._layerConfig;i[t]?lt(i[t],e,!0):i[t]=e;for(var n=0;nS+b.searches,0),c=f.reduce((S,b)=>S+b.saves,0),v=f.length||1;let d=0,p=0;return f.forEach((S,b)=>{const w=S.searches+S.saves;w>p&&(p=w,d=b)}),{totalSearches:h,totalSaves:c,avgSearches:Math.round(h/v),avgSaves:Math.round(c/v),peakDay:((g=(y=f[d])==null?void 0:y.date)==null?void 0:g.slice(5))||"—",peakSearches:((m=f[d])==null?void 0:m.searches)||0,peakSaves:((_=f[d])==null?void 0:_.saves)||0,dayCount:v}}function l(){const f=e.value,h=r.value;if(!f)return;const c=s(h);if(typeof t=="function"?t(c):t&&(t.value=c),!h.length){i&&(i.dispose(),i=null),f.innerHTML='
暂无使用数据
';return}(!i||i.getDom()!==f)&&(i&&i.dispose(),i=FM(f),u());const v=h.map(S=>S.date.slice(5)),d=h.length,p=Math.max(...h.map(S=>Math.max(S.searches,S.saves)),1),y=Math.ceil(p*1.35)||1,g=Math.round(c.totalSearches/d),m=d>=30,_={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(255,255,255,0.97)",borderColor:"#e8e8e8",borderWidth:1,borderRadius:8,padding:[10,14],textStyle:{fontSize:12,color:"#303133"},formatter:S=>{var M,I;const b=((M=S[0])==null?void 0:M.dataIndex)??0,w=((I=h[b])==null?void 0:I.date)||"",x=h[b],C=new Set,D=S.filter(L=>{const P=L.seriesName;return C.has(P)?!1:(C.add(P),!0)});let A=`
${w}
`;return D.forEach(L=>{const P=L.value,k=Array.isArray(P)?P[1]:P,B=L.seriesType==="bar",O=L.seriesName==="搜索"?x==null?void 0:x.searchDelta:x==null?void 0:x.saveDelta,H=O!==void 0&&O!==0?`${O>0?"↑":"↓"}${Math.abs(O)}`:O===0?'→0':"",R=B?``:``;A+=`
${R}${L.seriesName}:${k} 次${H}
`}),A}},legend:{data:["搜索","保存"],bottom:m?30:0,left:"center",itemWidth:14,itemHeight:10,textStyle:{fontSize:11,color:"#666"}},grid:{left:8,right:12,top:28,bottom:m?70:42,containLabel:!0},xAxis:{type:"category",data:v,axisLabel:{interval:0,fontSize:11,color:"#909399",rotate:d>15?45:0},axisLine:{lineStyle:{color:"#e8e8e8"}},splitLine:{show:!1},axisTick:{show:!1}},yAxis:{type:"value",name:"次",nameTextStyle:{fontSize:10,color:"#909399"},min:0,max:y,splitNumber:4,axisLabel:{fontSize:10,color:"#909399"},splitLine:{lineStyle:{color:"#f5f5f5",type:"dashed"}}},series:[{name:"搜索",type:"bar",data:h.map(S=>S.searches),barWidth:a,barGap:o,itemStyle:{color:new ji(0,0,0,1,[{offset:0,color:"#6366f1"},{offset:1,color:"#a5b4fc"}]),borderRadius:[4,4,0,0]},emphasis:{itemStyle:{color:new ji(0,0,0,1,[{offset:0,color:"#4f46e5"},{offset:1,color:"#818cf8"}])}},animationDuration:500,animationEasing:"cubicOut"},{name:"保存",type:"bar",data:h.map(S=>S.saves),barWidth:a,barGap:o,itemStyle:{color:new ji(0,0,0,1,[{offset:0,color:"#10b981"},{offset:1,color:"#6ee7b7"}]),borderRadius:[4,4,0,0]},emphasis:{itemStyle:{color:new ji(0,0,0,1,[{offset:0,color:"#059669"},{offset:1,color:"#34d399"}])}},animationDuration:500,animationEasing:"cubicOut"},{name:"搜索",type:"line",smooth:!0,symbol:"circle",symbolSize:5,data:h.map(S=>S.searches),lineStyle:{width:2.5,color:"#4f46e5"},itemStyle:{color:"#4f46e5",borderColor:"#fff",borderWidth:2},areaStyle:{color:new ji(0,0,0,1,[{offset:0,color:"rgba(99,102,241,0.12)"},{offset:1,color:"rgba(99,102,241,0.01)"}])},label:{show:!1},connectNulls:!0,animationDuration:700,animationEasing:"cubicOut",z:3,markLine:g>0?{silent:!0,symbol:"none",lineStyle:{color:"#6366f1",type:"dashed",width:1,opacity:.5},label:{formatter:`均 ${g}`,position:"insideEndTop",fontSize:10,color:"#6366f1"},data:[{yAxis:g,name:"日均搜索"}]}:void 0},{name:"保存",type:"line",smooth:!0,symbol:"circle",symbolSize:5,data:h.map(S=>S.saves),lineStyle:{width:2.5,color:"#059669"},itemStyle:{color:"#059669",borderColor:"#fff",borderWidth:2},areaStyle:{color:new ji(0,0,0,1,[{offset:0,color:"rgba(16,185,129,0.12)"},{offset:1,color:"rgba(16,185,129,0.01)"}])},label:{show:!1},connectNulls:!0,animationDuration:700,animationEasing:"cubicOut",z:3,markLine:g>0?{silent:!0,symbol:"none",lineStyle:{color:"#10b981",type:"dashed",width:1,opacity:.5},label:{formatter:`均 ${Math.round(c.totalSaves/d)}`,position:"insideEndTop",fontSize:10,color:"#10b981"},data:[{yAxis:Math.round(c.totalSaves/d),name:"日均保存"}]}:void 0}],...m?{dataZoom:[{type:"slider",bottom:6,height:20,start:0,end:100,borderColor:"#e8e8e8",fillerColor:"rgba(99,102,241,0.08)",handleStyle:{color:"#6366f1",borderColor:"#6366f1"},textStyle:{fontSize:10,color:"#909399"}}]}:{}};i.setOption(_,!0)}qu(r,()=>{Hg(()=>l())},{deep:!0});function u(){e.value&&(n&&(n.disconnect(),n=null),n=new ResizeObserver(()=>{i==null||i.resize()}),n.observe(e.value))}return $_(()=>{n==null||n.disconnect(),n=null,i==null||i.dispose(),i=null}),{chartRef:e,render:l,initResize:u}}const HI={class:"section-content"},WI={class:"dash-row dash-row-stats"},UI={class:"stt-label"},YI={class:"stt-value"},XI={class:"dash-row"},ZI={class:"storage-grid"},$I={class:"drive-header"},qI=["src"],KI={class:"drive-name"},QI={class:"drive-space"},JI={class:"drive-used"},jI={class:"drive-total"},tP={class:"dash-row dash-row-cols-3"},eP={class:"insight-header"},rP={class:"trend-day-btns"},iP=["onClick"],nP={key:0,class:"trend-summary-row"},aP={class:"trend-summary-item"},oP={class:"trend-summary-num"},sP={class:"trend-summary-item"},lP={class:"trend-summary-num"},uP={class:"trend-summary-item"},fP={class:"trend-summary-num"},hP={class:"trend-summary-item"},cP={class:"trend-summary-num"},vP={class:"trend-summary-desc"},dP={class:"keyword-list"},pP={class:"kw-count"},gP={class:"ip-list"},yP={class:"ip-rank"},mP={class:"ip-addr"},_P={key:0,class:"ip-loc"},SP={class:"ip-count"},bP={class:"province-list"},wP={class:"province-rank"},xP={class:"province-bar-wrap"},TP={class:"province-name"},CP={class:"province-count"},MP={key:0,class:"section-content"},DP={class:"cloud-toggle-grid"},AP=["src"],LP={class:"cloud-label"},IP={key:1,class:"section-content"},PP={key:2,class:"section-content"},kP=q_({__name:"AdminDashboard",setup(r){t1();const t=Ce(""),e=Ce({todaySearches:0,todaySaves:0,monthSearches:0,monthSaves:0,totalSearches:0,totalSaves:0,hotKeywords:[],trendTrend:[],cloudUsage:[],topIps:[],provinceRankings:[]}),i=Ce(""),n=Ce([]),{chartRef:a,render:o,initResize:s}=GI(Ka(()=>e.value.trendTrend),R=>{b.value=R}),l=a;qu(()=>e.value.trendTrend,()=>{o()},{deep:!0}),qu(()=>x.value,(R,E)=>{R==="dashboard"&&E!=="dashboard"&&Hg(()=>{const N=document.querySelector(".trend-chart-echarts");N&&N.childElementCount===0?(o(),s()):N&&s()})});const u=[{key:"todaySearches",label:"今日搜索"},{key:"todaySaves",label:"今日保存"},{key:"monthSearches",label:"本月搜索"},{key:"monthSaves",label:"本月保存"},{key:"totalSearches",label:"总搜索量"},{key:"totalSaves",label:"总保存量"}];function f(R){return R===0?"danger":R<3?"warning":R<8?"":"info"}function h(R){return R?R.replace(/^(中国|China)\s*/i,"").trim():""}const c=Ka(()=>{const R=e.value.provinceRankings;return R.length>0?Math.max(...R.map(E=>E.count)):1}),v=["#409eff","#67c23a","#e6a23c","#f56c6c","#909399","#b37feb","#36cfc9","#ff85c0"];function d(R){return v[R%v.length]}const p=Ce("ip");function y(){}const g="data:image/svg+xml,"+encodeURIComponent('');function m(R){var E;return((E=n.value.find(N=>N.type===R))==null?void 0:E.icon)||g}const _=[7,15,30,60],S=Ce(7),b=Ce(null);async function w(R){S.value=R,await U()}const x=Ce("dashboard"),C=Ce(""),D=Ce([]),A=Q_({uptime:"--",memory:"--",version:"--",dbOk:!1,redisOk:!1,pansouOk:!1});async function M(){try{const E=await(await fetch("/api/admin/save-records?pageSize=5&page=1")).json();D.value=E.records||E.data||[]}catch{D.value=[]}}async function I(){var R,E,N;try{const J=await(await fetch("/health")).json();A.uptime=L(J.uptime||0),A.memory=P(J.memory||0),A.version=J.version||"--",A.dbOk=((R=J.components)==null?void 0:R.db)==="connected",A.redisOk=((E=J.components)==null?void 0:E.redis)==="connected",A.pansouOk=((N=J.components)==null?void 0:N.pansou)==="ok"}catch{}}function L(R){const E=Math.floor(R/86400),N=Math.floor(R%86400/3600),X=Math.floor(R%3600/60),J=[];return E>0&&J.push(E+"天"),N>0&&J.push(N+"时"),J.push(X+"分"),J.join(" ")}function P(R){return R>=1073741824?(R/1073741824).toFixed(1)+" GB":R>=1048576?(R/1048576).toFixed(0)+" MB":(R/1024).toFixed(0)+" KB"}const k=Ka(()=>x.value==="cloud-configs-toggle"),B=Ka(()=>x.value.startsWith("sys-"));K_(async()=>{try{const R=await e1();R.site_name&&(i.value=R.site_name,document.title=R.site_name+" - 管理后台")}catch{}try{const[R,E]=await Promise.all([r1(),i1()]);n.value=E.types,await U(),await M(),await I(),s()}catch(R){console.error("加载数据失败",R)}});async function U(){try{e.value=await n1(S.value);try{const E=await(await fetch("/health")).json();t.value=E.version}catch{}}catch(R){console.error("加载统计数据失败",R)}}function O(R){if(!R.storageUsed||!R.storageTotal)return 0;const E=parseFloat(R.storageUsed),N=parseFloat(R.storageTotal);return N<=0?0:Math.round(E/N*100)}async function H(R,E){const N=n.value.find(X=>X.type===R);if(N)try{await a1(R,E),N.enabled=E}catch(X){j_.error(X.message||"切换失败"),N.enabled=!E}}return(R,E)=>{const N=Hr("el-card"),X=Hr("el-progress"),J=Hr("el-empty"),yt=Hr("el-tag"),Bt=Hr("el-tab-pane"),ue=Hr("el-tabs"),xe=Hr("el-switch");return Tt(),Nt("div",null,[ml(Q("div",HI,[Q("div",WI,[(Tt(),Nt(Vr,null,Gr(u,K=>$t(N,{key:K.key,class:"stat-card stt-card"},{default:qt(()=>[Q("div",UI,wt(K.label),1),Q("div",YI,wt(e.value[K.key]??0),1)]),_:2},1024)),64))]),Q("div",XI,[$t(N,{class:"storage-section-card"},{header:qt(()=>[...E[1]||(E[1]=[Q("span",null,"💾 网盘使用空间",-1)])]),default:qt(()=>[Q("div",ZI,[(Tt(!0),Nt(Vr,null,Gr(e.value.cloudUsage,K=>(Tt(),Nt("div",{key:K.cloudType+"-"+(K.nickname||""),class:"storage-drive-card"},[Q("div",$I,[Q("img",{src:m(K.cloudType),class:"drive-icon"},null,8,qI),Q("span",KI,wt(K.nickname||K.cloudType),1),Q("span",{class:Nc(["drive-status",K.isActive?"active":"inactive"])},wt(K.isActive?"正常":"停用"),3)]),Q("div",QI,[Q("span",JI,wt(K.storageUsed||"--"),1),E[2]||(E[2]=Q("span",{class:"drive-sep"},"/",-1)),Q("span",jI,wt(K.storageTotal||"--"),1)]),$t(X,{percentage:O(K),"stroke-width":12,color:O(K)>80?"#f56c6c":O(K)>60?"#e6a23c":"#67c23a"},null,8,["percentage","color"])]))),128)),e.value.cloudUsage.length===0?(Tt(),Ei(J,{key:0,description:"暂无网盘数据","image-size":80})):Oe("",!0)])]),_:1})]),Q("div",tP,[$t(N,{class:"insight-card trend-card"},{header:qt(()=>[Q("div",eP,[E[3]||(E[3]=Q("span",null,"📈 网站使用趋势图",-1)),Q("div",rP,[(Tt(),Nt(Vr,null,Gr(_,K=>Q("button",{key:K,class:Nc(["trend-day-btn",{active:S.value===K}]),onClick:ut=>w(K)},wt(K)+"天",11,iP)),64))])])]),default:qt(()=>[b.value?(Tt(),Nt("div",nP,[Q("div",aP,[Q("span",oP,wt(b.value.totalSearches),1),E[4]||(E[4]=Q("span",{class:"trend-summary-desc"},"总搜索",-1))]),Q("div",sP,[Q("span",lP,wt(b.value.totalSaves),1),E[5]||(E[5]=Q("span",{class:"trend-summary-desc"},"总保存",-1))]),Q("div",uP,[Q("span",fP,wt(b.value.avgSearches)+"/"+wt(b.value.avgSaves),1),E[6]||(E[6]=Q("span",{class:"trend-summary-desc"},"日均搜索/保存",-1))]),Q("div",hP,[Q("span",cP,wt(b.value.peakDay),1),Q("span",vP,"峰值日 "+wt(b.value.peakSearches)+"+"+wt(b.value.peakSaves),1)])])):Oe("",!0),Q("div",{ref_key:"chartRef",ref:l,class:"trend-chart-echarts"},null,512)]),_:1}),$t(N,{class:"insight-card"},{header:qt(()=>[...E[7]||(E[7]=[Q("span",null,"🔍 热门搜索关键词 Top 20",-1)])]),default:qt(()=>[Q("div",dP,[(Tt(!0),Nt(Vr,null,Gr(e.value.hotKeywords,(K,ut)=>(Tt(),Ei(yt,{key:K.keyword,type:f(ut),size:"small",class:"keyword-tag"},{default:qt(()=>[zc(wt(K.keyword),1),Q("sup",pP,wt(K.count),1)]),_:2},1032,["type"]))),128)),e.value.hotKeywords.length===0?(Tt(),Ei(J,{key:0,description:"暂无搜索数据","image-size":60})):Oe("",!0)])]),_:1}),$t(N,{class:"insight-card"},{header:qt(()=>[$t(ue,{modelValue:p.value,"onUpdate:modelValue":E[0]||(E[0]=K=>p.value=K),class:"card-tabs",onTabClick:y},{default:qt(()=>[$t(Bt,{label:"🌐 IP Top 10",name:"ip"}),$t(Bt,{label:"🗺️ 地域 Top 10",name:"province"})]),_:1},8,["modelValue"])]),default:qt(()=>{var K;return[ml(Q("div",gP,[(Tt(!0),Nt(Vr,null,Gr(e.value.topIps,(ut,j)=>(Tt(),Nt("div",{key:ut.ip,class:"ip-row"},[Q("span",yP,wt(j+1),1),Q("span",mP,wt(ut.ip),1),ut.ip_location?(Tt(),Nt("span",_P,wt(h(ut.ip_location)),1)):Oe("",!0),Q("span",SP,wt(ut.count)+" 次",1)]))),128)),e.value.topIps.length===0?(Tt(),Ei(J,{key:0,description:"暂无数据","image-size":60})):Oe("",!0)],512),[[_l,p.value==="ip"]]),ml(Q("div",bP,[(Tt(!0),Nt(Vr,null,Gr(e.value.provinceRankings.slice(0,10),(ut,j)=>(Tt(),Nt("div",{key:ut.province,class:"province-row"},[Q("span",wP,wt(j+1),1),Q("span",xP,[Q("span",{class:"province-bar",style:J_({width:ut.count/c.value*100+"%",background:d(j)})},null,4)]),Q("span",TP,wt(ut.province),1),Q("span",CP,wt(ut.count)+" 次",1)]))),128)),(K=e.value.provinceRankings)!=null&&K.length?Oe("",!0):(Tt(),Ei(J,{key:0,description:"暂无数据","image-size":60}))],512),[[_l,p.value==="province"]])]}),_:1})])],512),[[_l,x.value==="dashboard"]]),k.value?(Tt(),Nt("div",MP,[$t(N,{class:"config-card"},{header:qt(()=>[...E[8]||(E[8]=[Q("span",null,"📂 网盘设置及授权",-1)])]),default:qt(()=>[Q("div",DP,[(Tt(!0),Nt(Vr,null,Gr(n.value,K=>(Tt(),Nt("div",{key:K.type,class:"cloud-toggle-chip"},[Q("img",{src:K.icon,class:"cloud-icon-img"},null,8,AP),Q("span",LP,wt(K.label),1),K.type==="others"?(Tt(),Ei(yt,{key:0,size:"small",type:"info"},{default:qt(()=>[...E[9]||(E[9]=[zc("关",-1)])]),_:1})):Oe("",!0),$t(xe,{"model-value":K.enabled,size:"small",onChange:ut=>H(K.type,ut)},null,8,["model-value","onChange"])]))),128))]),E[10]||(E[10]=Q("div",{class:"form-tip",style:{"margin-top":"12px"}}," 关闭的网盘类型在搜索结果中不会展示。修改后立即生效,无需点击保存。 ",-1))]),_:1}),$t(s1)])):Oe("",!0),B.value?(Tt(),Nt("div",IP,[$t(l1,{section:C.value},null,8,["section"])])):Oe("",!0),x.value==="save-records"?(Tt(),Nt("div",PP,[$t(u1)])):Oe("",!0)])}}}),GP=o1(kP,[["__scopeId","data-v-64f399c4"]]);export{GP as default}; diff --git a/source_clean/frontend/assets/AdminDashboard-CxAY_FWD.css b/source_clean/frontend/assets/AdminDashboard-CxAY_FWD.css new file mode 100644 index 0000000..c00c944 --- /dev/null +++ b/source_clean/frontend/assets/AdminDashboard-CxAY_FWD.css @@ -0,0 +1 @@ +.admin-layout[data-v-64f399c4]{display:flex;min-height:100vh}.admin-menu[data-v-64f399c4]{width:220px;min-height:100vh;background:linear-gradient(180deg,#1a1a2e,#16213e);border-right:none;flex-shrink:0;transition:box-shadow .3s ease}.admin-menu[data-v-64f399c4] .el-menu-item{color:#a2a3b7;transition:all .3s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.admin-menu[data-v-64f399c4] .el-menu-item:after{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:linear-gradient(180deg,#409eff,#7c3aed);transform:scaleY(0);transition:transform .3s cubic-bezier(.4,0,.2,1);border-radius:0 2px 2px 0}.admin-menu[data-v-64f399c4] .el-menu-item.is-active{color:#409eff;background:linear-gradient(90deg,#409eff26,#7c3aed14)}.admin-menu[data-v-64f399c4] .el-menu-item.is-active:after{transform:scaleY(1)}.admin-menu[data-v-64f399c4] .el-menu-item:hover{background:linear-gradient(90deg,#ffffff14,#ffffff05);color:#e0e0e0}.admin-menu[data-v-64f399c4] .el-sub-menu__title{color:#a2a3b7;transition:all .3s ease}.admin-menu[data-v-64f399c4] .el-sub-menu__title:hover{background:linear-gradient(90deg,#ffffff14,#ffffff05);color:#e0e0e0}.admin-menu[data-v-64f399c4] .el-sub-menu.is-active .el-sub-menu__title{color:#409eff}.admin-menu[data-v-64f399c4] .el-sub-menu .el-menu{background:#00000026}.admin-menu[data-v-64f399c4] .el-sub-menu .el-menu .el-menu-item{padding-left:56px!important;font-size:13px}.menu-header[data-v-64f399c4]{padding:24px 20px 16px;color:#fff;border-bottom:1px solid rgba(255,255,255,.06);margin-bottom:8px}.menu-header h2[data-v-64f399c4]{font-size:20px;font-weight:700;margin-bottom:4px;background:linear-gradient(90deg,#fff,#90caf9);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.menu-header p[data-v-64f399c4]{font-size:12px;color:#ffffff80}.version-footer[data-v-64f399c4]{position:fixed;bottom:12px;left:0;width:220px;text-align:center;font-size:12px;color:#ffffff59;letter-spacing:.5px;padding:8px 0;pointer-events:none}.admin-content[data-v-64f399c4]{flex:1;display:flex;flex-direction:column;overflow:auto}.content-header[data-v-64f399c4]{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:none;background:linear-gradient(135deg,#f5f7fa,#eef1f5);box-shadow:0 2px 8px #0000000f;position:relative;z-index:1}.content-header h2[data-v-64f399c4]{font-size:20px;font-weight:600;color:#303133}.content-body[data-v-64f399c4]{padding:24px;flex:1}.config-card[data-v-64f399c4]{margin-bottom:24px;border-radius:14px;border:1px solid rgba(0,0,0,.06)!important;box-shadow:0 2px 12px #0000000a;overflow:hidden}.config-card[data-v-64f399c4] .el-card__header{border-bottom:1px solid rgba(0,0,0,.04);padding:16px 20px;font-weight:600;background:linear-gradient(135deg,#fafafa,#f5f5f5)}.config-card[data-v-64f399c4] .el-card__body{padding:20px}.cloud-toggle-grid[data-v-64f399c4]{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}.cloud-toggle-chip[data-v-64f399c4]{display:flex;align-items:center;gap:6px;padding:8px 10px;border-radius:10px;background:#f8f9fa;border:1px solid #eee;transition:background .2s,box-shadow .15s}.cloud-toggle-chip[data-v-64f399c4]:hover{background:#f0f2f5;box-shadow:0 2px 6px #0000000a}.cloud-icon-img[data-v-64f399c4]{width:20px;height:20px;border-radius:4px;flex-shrink:0;object-fit:contain}.cloud-label[data-v-64f399c4]{font-size:13px;font-weight:500;flex:1}.form-tip[data-v-64f399c4]{font-size:12px;color:#909399;line-height:1.5}.dash-row[data-v-64f399c4]{margin-bottom:24px}.dash-row-stats[data-v-64f399c4]{display:grid;grid-template-columns:repeat(6,1fr);gap:16px}@media (max-width: 1200px){.dash-row-stats[data-v-64f399c4]{grid-template-columns:repeat(3,1fr)}}@media (max-width: 700px){.dash-row-stats[data-v-64f399c4]{grid-template-columns:repeat(2,1fr)}}.stt-card[data-v-64f399c4]{text-align:center;border:none!important;background:linear-gradient(135deg,#f0f5ff,#e8f0fe);border-radius:14px;transition:transform .25s ease,box-shadow .25s ease}.stt-card[data-v-64f399c4]:hover{transform:translateY(-4px);box-shadow:0 8px 24px #409eff26}.stt-card[data-v-64f399c4] .el-card__body{padding:20px 12px 16px}.stt-label[data-v-64f399c4]{font-size:13px;color:#909399;font-weight:500;margin-bottom:6px}.stt-value[data-v-64f399c4]{font-size:32px;font-weight:800;background:linear-gradient(135deg,#409eff,#7c3aed);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;letter-spacing:-1px;line-height:1.2}.dash-row-cols-3[data-v-64f399c4]{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px}@media (max-width: 1100px){.dash-row-cols-3[data-v-64f399c4]{grid-template-columns:1fr 1fr}}@media (max-width: 700px){.dash-row-cols-3[data-v-64f399c4]{grid-template-columns:1fr}}.insight-card[data-v-64f399c4]{border-radius:14px;border:1px solid rgba(0,0,0,.06)!important;box-shadow:0 2px 12px #0000000a}.insight-card[data-v-64f399c4] .el-card__header{border-bottom:1px solid rgba(0,0,0,.04);padding:14px 18px;font-weight:600;font-size:14px;background:linear-gradient(135deg,#fafafa,#f5f5f5)}.insight-header[data-v-64f399c4]{display:flex;align-items:center;justify-content:space-between}.trend-day-btns[data-v-64f399c4]{display:flex;gap:4px}.trend-day-btn[data-v-64f399c4]{padding:2px 10px;border-radius:6px;border:1px solid #dcdfe6;background:#fff;font-size:11px;color:#909399;cursor:pointer;transition:all .2s;font-family:inherit}.trend-day-btn[data-v-64f399c4]:hover{border-color:#409eff;color:#409eff}.trend-day-btn.active[data-v-64f399c4]{background:#409eff;border-color:#409eff;color:#fff}.insight-card[data-v-64f399c4] .el-card__body{padding:0}.insight-card.trend-card[data-v-64f399c4] .el-card__body{padding:8px 6px 0;height:380px;overflow:hidden}.insight-card[data-v-64f399c4]:not(.trend-card) .el-card__body{padding:14px 18px;max-height:380px;overflow-y:auto}.trend-chart-echarts[data-v-64f399c4]{width:100%;height:100%;min-height:310px}.trend-summary-row[data-v-64f399c4]{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:10px 12px 4px;border-bottom:1px solid #f0f0f0}.trend-summary-item[data-v-64f399c4]{text-align:center}.trend-summary-num[data-v-64f399c4]{display:block;font-size:18px;font-weight:700;color:#303133;line-height:1.3}.trend-summary-desc[data-v-64f399c4]{display:block;font-size:11px;color:#909399;margin-top:2px}.keyword-list[data-v-64f399c4]{display:flex;flex-wrap:wrap;gap:6px;align-content:flex-start}.keyword-tag[data-v-64f399c4]{cursor:default}.kw-count[data-v-64f399c4]{font-size:9px;margin-left:2px;opacity:.7;font-weight:400}.ip-list[data-v-64f399c4]{display:flex;flex-direction:column;gap:6px}.ip-row[data-v-64f399c4]{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:8px;background:#f8f9fa;transition:background .2s}.ip-row[data-v-64f399c4]:hover{background:#f0f2f5}.ip-rank[data-v-64f399c4]{width:20px;height:20px;border-radius:50%;background:linear-gradient(135deg,#409eff,#7c3aed);color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}.ip-addr[data-v-64f399c4]{font-family:SF Mono,Fira Code,monospace;font-size:13px;color:#303133;font-weight:500;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ip-loc[data-v-64f399c4]{font-size:11px;padding:1px 6px;border-radius:4px;background:#409eff1a;color:#409eff;white-space:nowrap;flex-shrink:0}.ip-count[data-v-64f399c4]{font-size:12px;color:#909399;white-space:nowrap;flex-shrink:0}.province-list[data-v-64f399c4]{display:flex;flex-direction:column;gap:5px}.province-row[data-v-64f399c4]{display:flex;align-items:center;gap:8px;padding:5px 8px;border-radius:6px;background:#f8f9fa}.province-row[data-v-64f399c4]:hover{background:#f0f2f5}.province-rank[data-v-64f399c4]{width:20px;height:20px;border-radius:50%;background:linear-gradient(135deg,#409eff,#7c3aed);color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}.province-bar-wrap[data-v-64f399c4]{flex:1;height:16px;background:#e8e8e8;border-radius:8px;overflow:hidden;min-width:0}.province-bar[data-v-64f399c4]{display:block;height:100%;border-radius:8px;transition:width .4s ease;min-width:4px}.province-name[data-v-64f399c4]{font-size:13px;color:#303133;font-weight:500;white-space:nowrap;width:90px;text-align:right;flex-shrink:0}.province-count[data-v-64f399c4]{font-size:12px;color:#909399;white-space:nowrap;width:50px;text-align:right;flex-shrink:0}.storage-section-card[data-v-64f399c4]{border-radius:14px;border:1px solid rgba(0,0,0,.06)!important;box-shadow:0 2px 12px #0000000a}.storage-section-card[data-v-64f399c4] .el-card__header{border-bottom:1px solid rgba(0,0,0,.04);padding:14px 20px;font-weight:600;font-size:14px;background:linear-gradient(135deg,#fafafa,#f5f5f5)}.storage-section-card[data-v-64f399c4] .el-card__body{padding:16px 20px}.storage-grid[data-v-64f399c4]{display:flex;flex-wrap:wrap;gap:16px}.storage-drive-card[data-v-64f399c4]{flex:1 1 280px;min-width:260px;border:1px solid #ebeef5;border-radius:12px;padding:16px;background:#fafbfc;transition:box-shadow .2s}.storage-drive-card[data-v-64f399c4]:hover{box-shadow:0 4px 16px #0000000f}.drive-header[data-v-64f399c4]{display:flex;align-items:center;gap:8px;margin-bottom:10px}.drive-icon[data-v-64f399c4]{width:24px;height:24px;border-radius:5px;flex-shrink:0;object-fit:contain}.drive-name[data-v-64f399c4]{font-size:14px;font-weight:600;color:#303133;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.drive-status[data-v-64f399c4]{font-size:11px;padding:2px 8px;border-radius:4px;flex-shrink:0}.drive-status.active[data-v-64f399c4]{background:#f0f9eb;color:#67c23a}.drive-status.inactive[data-v-64f399c4]{background:#fef0f0;color:#f56c6c}.drive-space[data-v-64f399c4]{display:flex;align-items:baseline;gap:4px;margin-bottom:8px;font-size:14px}.drive-used[data-v-64f399c4]{font-weight:600;color:#303133}.drive-sep[data-v-64f399c4]{color:#c0c4cc}.drive-total[data-v-64f399c4]{color:#909399}.section-content[data-v-64f399c4]{min-height:400px}.insight-card[data-v-64f399c4] .card-tabs{margin-top:-10px}.insight-card[data-v-64f399c4] .card-tabs .el-tabs__header{margin:0}.insight-card[data-v-64f399c4] .card-tabs .el-tabs__nav-wrap:after{height:0}.insight-card[data-v-64f399c4] .card-tabs .el-tabs__item{height:36px;line-height:36px;font-size:13px;padding:0 12px}.insight-card[data-v-64f399c4] .card-tabs .el-tabs__active-bar{height:2px}.province-list .province-row[data-v-64f399c4]{gap:4px;padding:3px 0}.province-list .province-rank[data-v-64f399c4]{width:20px;height:20px;font-size:10px}.province-list .province-bar-wrap[data-v-64f399c4]{height:12px}.province-list .province-name[data-v-64f399c4]{width:60px;font-size:12px}.province-list .province-count[data-v-64f399c4]{width:42px;font-size:11px}.admin-tabs[data-v-64f399c4] .el-tabs__header{display:none} diff --git a/source_clean/frontend/assets/AdminLayout-BX867Wt6.css b/source_clean/frontend/assets/AdminLayout-BX867Wt6.css new file mode 100644 index 0000000..b235550 --- /dev/null +++ b/source_clean/frontend/assets/AdminLayout-BX867Wt6.css @@ -0,0 +1 @@ +.admin-menu .menu-header[data-v-529b614b]{padding:16px 20px 8px;text-align:center;border-bottom:1px solid var(--el-border-color-light)}.admin-menu .menu-header h2[data-v-529b614b]{margin:0;font-size:16px;color:var(--el-color-primary)}.admin-menu .menu-header p[data-v-529b614b]{margin:4px 0 0;font-size:12px;color:var(--el-text-color-secondary)}.version-footer[data-v-529b614b]{padding:8px;text-align:center;font-size:11px;color:var(--el-text-color-placeholder);border-top:1px solid var(--el-border-color-light);margin-top:auto}.admin-layout[data-v-529b614b]{display:flex;height:100vh}.admin-menu[data-v-529b614b]{width:220px;flex-shrink:0;display:flex;flex-direction:column}.admin-content[data-v-529b614b]{flex:1;display:flex;flex-direction:column;overflow:hidden}.content-header[data-v-529b614b]{display:flex;align-items:center;justify-content:space-between;padding:12px 24px;border-bottom:1px solid var(--el-border-color-light);background:var(--el-bg-color)}.content-header h2[data-v-529b614b]{margin:0;font-size:18px}.content-body[data-v-529b614b]{flex:1;overflow-y:auto;padding:20px 24px;background:var(--el-bg-color-page)} diff --git a/source_clean/frontend/assets/AdminLayout-CxD2j-KS.js b/source_clean/frontend/assets/AdminLayout-CxD2j-KS.js new file mode 100644 index 0000000..212e900 --- /dev/null +++ b/source_clean/frontend/assets/AdminLayout-CxD2j-KS.js @@ -0,0 +1 @@ +import{d as B,o as N,a as T,c as V,f as s,w as t,b as o,t as c,h as v,v as y,j as d,k as r,C as I,l as u,D as M,G as j,H as q,I as A,u as D,z as H}from"./index-C5b4pIQL.js";import{a as L,_ as R}from"./_plugin-vue_export-helper-CzL5NdOX.js";const z={class:"admin-layout"},E={class:"menu-header"},G={class:"version-footer"},W={class:"admin-content"},F={class:"content-header"},J={class:"content-body"},K=B({__name:"AdminLayout",setup(O){const l=D(),f=H(),m=v(""),_=v(""),b={dashboard:"仪表盘","cloud-configs-toggle":"网盘设置及授权","cloud-configs-cleanup":"存储清理","sys-site":"网站设置","sys-services":"外部服务 & 缓存","sys-strategy":"性能配置","sys-password":"修改管理员密码","save-records":"转存日志"},p=y(()=>{const n=f.name;return n==="admin-cloud-configs"?"cloud-configs-toggle":n==="admin-cleanup"?"cloud-configs-cleanup":n==="admin-system"?f.query.section||"sys-site":n==="admin-save-records"?"save-records":"dashboard"}),h=y(()=>b[p.value]||"仪表盘");function x(n){n==="dashboard"?l.push("/admin/dashboard"):n==="cloud-configs-toggle"?l.push("/admin/cloud-configs"):n==="cloud-configs-cleanup"?l.push("/admin/cleanup"):n.startsWith("sys-")?l.push({path:"/admin/system",query:{section:n}}):n==="save-records"?l.push("/admin/save-records"):n==="logout"&&(localStorage.removeItem("admin_token"),l.push("/admin/login"))}function w(){l.push("/")}return N(async()=>{try{const n=await L();m.value=n.site_name||""}catch{}try{const e=await(await fetch("/health")).json();_.value=e.version}catch{}}),(n,e)=>{const i=d("el-icon"),a=d("el-menu-item"),g=d("el-sub-menu"),C=d("el-menu"),k=d("el-button"),S=d("router-view");return T(),V("div",z,[s(C,{"default-active":p.value,class:"admin-menu",onSelect:x},{default:t(()=>[o("div",E,[o("h2",null,c(m.value||"CloudSearch"),1),e[0]||(e[0]=o("p",null,"管理后台",-1))]),s(a,{index:"dashboard"},{default:t(()=>[s(i,null,{default:t(()=>[s(r(I))]),_:1}),e[1]||(e[1]=o("span",null,"仪表盘",-1))]),_:1}),s(g,{index:"cloud-configs"},{title:t(()=>[s(i,null,{default:t(()=>[s(r(M))]),_:1}),e[2]||(e[2]=o("span",null,"网盘配置",-1))]),default:t(()=>[s(a,{index:"cloud-configs-toggle"},{default:t(()=>[...e[3]||(e[3]=[u("网盘设置及授权",-1)])]),_:1}),s(a,{index:"cloud-configs-cleanup"},{default:t(()=>[...e[4]||(e[4]=[u("存储清理",-1)])]),_:1})]),_:1}),s(g,{index:"system"},{title:t(()=>[s(i,null,{default:t(()=>[s(r(j))]),_:1}),e[5]||(e[5]=o("span",null,"系统配置",-1))]),default:t(()=>[s(a,{index:"sys-site"},{default:t(()=>[...e[6]||(e[6]=[u("网站设置",-1)])]),_:1}),s(a,{index:"sys-services"},{default:t(()=>[...e[7]||(e[7]=[u("外部服务和缓存",-1)])]),_:1}),s(a,{index:"sys-strategy"},{default:t(()=>[...e[8]||(e[8]=[u("性能配置",-1)])]),_:1}),s(a,{index:"sys-password"},{default:t(()=>[...e[9]||(e[9]=[u("修改管理员密码",-1)])]),_:1})]),_:1}),s(a,{index:"save-records"},{default:t(()=>[s(i,null,{default:t(()=>[s(r(q))]),_:1}),e[10]||(e[10]=o("span",null,"转存日志",-1))]),_:1}),o("div",G,"T "+c(_.value),1),s(a,{index:"logout"},{default:t(()=>[s(i,null,{default:t(()=>[s(r(A))]),_:1}),e[11]||(e[11]=o("span",null,"退出登录",-1))]),_:1})]),_:1},8,["default-active"]),o("div",W,[o("div",F,[o("h2",null,c(h.value),1),s(k,{text:"",onClick:w},{default:t(()=>[...e[12]||(e[12]=[u("返回前台",-1)])]),_:1})]),o("div",J,[s(S)])])])}}}),U=R(K,[["__scopeId","data-v-529b614b"]]);export{U as default}; diff --git a/source_clean/frontend/assets/AdminLogin-Dydh9B_2.css b/source_clean/frontend/assets/AdminLogin-Dydh9B_2.css new file mode 100644 index 0000000..9cfc609 --- /dev/null +++ b/source_clean/frontend/assets/AdminLogin-Dydh9B_2.css @@ -0,0 +1 @@ +.admin-login-page[data-v-513ea931]{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#667eea,#764ba2)}.login-card[data-v-513ea931]{width:400px;padding:40px;background:var(--bg-white);border-radius:16px;box-shadow:0 8px 32px #00000026}.login-title[data-v-513ea931]{text-align:center;font-size:24px;font-weight:700;color:#303133;margin-bottom:32px}.login-btn[data-v-513ea931]{width:100%}.error-msg[data-v-513ea931]{text-align:center;color:#f56c6c;font-size:14px;margin-top:12px} diff --git a/source_clean/frontend/assets/AdminLogin-xBXneZTD.js b/source_clean/frontend/assets/AdminLogin-xBXneZTD.js new file mode 100644 index 0000000..bd6500d --- /dev/null +++ b/source_clean/frontend/assets/AdminLogin-xBXneZTD.js @@ -0,0 +1 @@ +import{d as k,a as g,c as v,b as w,t as h,f as s,w as l,g as b,e as x,h as d,j as m,l as C,i as L,E as N}from"./index-C5b4pIQL.js";import{a as S,d as B,_ as E}from"./_plugin-vue_export-helper-CzL5NdOX.js";const U={class:"admin-login-page"},q={class:"login-card"},A={class:"login-title"},I={key:0,class:"error-msg"},K=k({__name:"AdminLogin",setup(M){const p=d(),u=d(!1),r=d(""),_=d("");S().then(i=>{i.site_name&&(_.value=i.site_name)}).catch(()=>{});const o=L({username:"",password:""}),y={username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]};async function f(){var a,n,t;if(await((a=p.value)==null?void 0:a.validate().catch(()=>!1))){u.value=!0,r.value="";try{const e=await B(o.username,o.password);localStorage.setItem("admin_token",e.token),N.success("登录成功"),window.location.href="/admin"}catch(e){r.value=((t=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:t.message)||(e==null?void 0:e.message)||"登录失败"}finally{u.value=!1}}}return(i,a)=>{const n=m("el-input"),t=m("el-form-item"),e=m("el-button"),V=m("el-form");return g(),v("div",U,[w("div",q,[w("h1",A,h(_.value||"CloudSearch")+" 管理后台",1),s(V,{ref_key:"formRef",ref:p,model:o,rules:y,"label-width":"0",size:"large",onKeyup:b(f,["enter"])},{default:l(()=>[s(t,{prop:"username"},{default:l(()=>[s(n,{modelValue:o.username,"onUpdate:modelValue":a[0]||(a[0]=c=>o.username=c),placeholder:"用户名","prefix-icon":"User"},null,8,["modelValue"])]),_:1}),s(t,{prop:"password"},{default:l(()=>[s(n,{modelValue:o.password,"onUpdate:modelValue":a[1]||(a[1]=c=>o.password=c),type:"password",placeholder:"密码","prefix-icon":"Lock","show-password":""},null,8,["modelValue"])]),_:1}),s(t,null,{default:l(()=>[s(e,{type:"primary",loading:u.value,class:"login-btn",onClick:f},{default:l(()=>[...a[2]||(a[2]=[C(" 登录 ",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"]),r.value?(g(),v("p",I,h(r.value),1)):x("",!0)])])}}}),z=E(K,[["__scopeId","data-v-513ea931"]]);export{z as default}; diff --git a/source_clean/frontend/assets/Cleanup-GlGrtKk0.js b/source_clean/frontend/assets/Cleanup-GlGrtKk0.js new file mode 100644 index 0000000..10f6cf3 --- /dev/null +++ b/source_clean/frontend/assets/Cleanup-GlGrtKk0.js @@ -0,0 +1 @@ +import{d as I,o as J,a as f,c as h,f as a,w as s,j as p,i as L,b as u,l as m,y as j,e as y,t as x,h as C,v as i,E as d}from"./index-C5b4pIQL.js";import{m as O,n as q,r as H,o as K,_ as Q}from"./_plugin-vue_export-helper-CzL5NdOX.js";const W={class:"cleanup-section"},X={style:{display:"flex",gap:"10px","flex-wrap":"wrap"}},Y={key:0,class:"cleanup-info",style:{"margin-top":"10px"}},Z={key:0,style:{"margin-left":"16px"}},ee=I({__name:"Cleanup",setup(le){const n=L({}),_=C(!1),v=C(!1),b=C(!1),S=i(()=>String(n.cleanup_last_run||"")),k=i(()=>{const l=String(n.cleanup_last_stats||"");if(!l)return"";try{const e=JSON.parse(l),t=[];return e.filesTrashed>0&&t.push(`移入回收站 ${e.filesTrashed} 个文件夹`),e.logsDeleted>0&&t.push(`删除 ${e.logsDeleted} 条日志`),e.trashEmptied&&t.push("已清空回收站"),e.errors>0&&t.push(`⚠️ ${e.errors} 个错误`),t.join(" / ")||"无操作"}catch{return""}}),T=i({get:()=>String(n.cleanup_enabled)==="true",set:l=>{n.cleanup_enabled=l?"true":"false"}}),E=i({get:()=>String(n.cleanup_empty_trash)!=="false",set:l=>{n.cleanup_empty_trash=l?"true":"false"}}),N=i({get:()=>Number(n.cleanup_file_retention_days??7),set:l=>{n.cleanup_file_retention_days=l}}),U=i({get:()=>Number(n.cleanup_log_retention_days??30),set:l=>{n.cleanup_log_retention_days=l}}),g=i({get:()=>String(n.cleanup_space_threshold_enabled)==="true",set:l=>{n.cleanup_space_threshold_enabled=l?"true":"false"}}),B=i({get:()=>Number(n.cleanup_space_threshold_percent??90),set:l=>{n.cleanup_space_threshold_percent=l}}),D=i({get:()=>Number(n.cleanup_space_threshold_delete_percent??10),set:l=>{n.cleanup_space_threshold_delete_percent=l}}),R=i({get:()=>String(n.save_reuse_enabled)!=="false",set:l=>{n.save_reuse_enabled=l?"true":"false"}});async function z(){try{const l=await O();for(const e of l)n[e.key]=e.value}catch(l){console.error("加载清理配置失败",l)}}async function M(){var l,e;b.value=!0;try{const r=["cleanup_enabled","cleanup_file_retention_days","cleanup_log_retention_days","cleanup_empty_trash","cleanup_space_threshold_enabled","cleanup_space_threshold_percent","cleanup_space_threshold_delete_percent","save_reuse_enabled"].map(c=>({key:c,value:String(n[c]??"")}));await q(r),d.success("清理配置已保存")}catch(t){d.error(((e=(l=t.response)==null?void 0:l.data)==null?void 0:e.error)||"保存失败")}finally{b.value=!1}}async function P(){var l,e;_.value=!0;try{const t=await H();t.success?d.success(t.message):d.warning(t.message),await z()}catch(t){d.error(((e=(l=t.response)==null?void 0:l.data)==null?void 0:e.error)||"清理失败")}finally{_.value=!1}}async function A(){var l,e;v.value=!0;try{const t=await K();t.success?d.success(t.message):d.warning(t.message)}catch(t){d.error(((e=(l=t.response)==null?void 0:l.data)==null?void 0:e.error)||"清空回收站失败")}finally{v.value=!1}}return J(()=>{z()}),(l,e)=>{const t=p("el-switch"),r=p("el-form-item"),c=p("el-input-number"),V=p("el-divider"),$=p("el-slider"),F=p("el-form"),w=p("el-button"),G=p("el-card");return f(),h("div",W,[a(G,{class:"config-card"},{header:s(()=>[...e[8]||(e[8]=[u("span",null,"🧹 存储清理",-1)])]),default:s(()=>[a(F,{"label-width":"160px","label-position":"left",size:"small"},{default:s(()=>[a(r,{label:"启用自动清理"},{default:s(()=>[a(t,{modelValue:T.value,"onUpdate:modelValue":e[0]||(e[0]=o=>T.value=o),"active-text":"启用","inactive-text":"关闭"},null,8,["modelValue"]),e[9]||(e[9]=u("div",{class:"form-tip",style:{"margin-left":"8px"}}," 每天自动检查一次,将过期文件移入回收站、删除旧日志、清空回收站释放空间 ",-1))]),_:1}),a(r,{label:"云盘文件保留天数"},{default:s(()=>[a(c,{modelValue:N.value,"onUpdate:modelValue":e[1]||(e[1]=o=>N.value=o),min:1,max:365,style:{width:"140px"}},null,8,["modelValue"]),e[10]||(e[10]=u("div",{class:"form-tip",style:{"margin-left":"8px"}},"超过此天数的日期文件夹将被移入回收站",-1))]),_:1}),a(r,{label:"转存日志保留天数"},{default:s(()=>[a(c,{modelValue:U.value,"onUpdate:modelValue":e[2]||(e[2]=o=>U.value=o),min:1,max:365,style:{width:"140px"}},null,8,["modelValue"]),e[11]||(e[11]=u("div",{class:"form-tip",style:{"margin-left":"8px"}},"超过此天数的转存记录将被删除",-1))]),_:1}),a(r,{label:"清空回收站"},{default:s(()=>[a(t,{modelValue:E.value,"onUpdate:modelValue":e[3]||(e[3]=o=>E.value=o),"active-text":"启用","inactive-text":"关闭"},null,8,["modelValue"]),e[12]||(e[12]=u("div",{class:"form-tip",style:{"margin-left":"8px"}},"移入回收站后自动清空,永久删除文件以释放存储空间",-1))]),_:1}),a(V,{"content-position":"left"},{default:s(()=>[...e[13]||(e[13]=[m("空间阈值自动清理",-1)])]),_:1}),a(r,{label:"启用空间阈值清理"},{default:s(()=>[a(t,{modelValue:g.value,"onUpdate:modelValue":e[4]||(e[4]=o=>g.value=o),"active-text":"启用","inactive-text":"关闭"},null,8,["modelValue"]),e[14]||(e[14]=u("div",{class:"form-tip",style:{"margin-left":"8px"}},"已用空间超过阈值时,按比例删除最旧的转存文件(优先级高于保留天数)",-1))]),_:1}),g.value?(f(),j(r,{key:0,label:"使用阈值"},{default:s(()=>[a($,{modelValue:B.value,"onUpdate:modelValue":e[5]||(e[5]=o=>B.value=o),min:50,max:99,style:{width:"200px"},"show-input":""},null,8,["modelValue"]),e[15]||(e[15]=u("div",{class:"form-tip",style:{"margin-left":"8px"}},"已用空间超过此百分比时触发强制清理",-1))]),_:1})):y("",!0),g.value?(f(),j(r,{key:1,label:"删除比例"},{default:s(()=>[a($,{modelValue:D.value,"onUpdate:modelValue":e[6]||(e[6]=o=>D.value=o),min:5,max:50,step:5,style:{width:"200px"},"show-input":""},null,8,["modelValue"]),e[16]||(e[16]=u("div",{class:"form-tip",style:{"margin-left":"8px"}},"触发清理时释放总空间的百分比(如 10% 表示累计删除最旧文件直到达到总空间的 10%,6TB 总空间 → 释放 ~600GB)",-1))]),_:1})):y("",!0),a(V,{"content-position":"left"},{default:s(()=>[...e[17]||(e[17]=[m("分享链接复用",-1)])]),_:1}),a(r,{label:"复用已有分享链接"},{default:s(()=>[a(t,{modelValue:R.value,"onUpdate:modelValue":e[7]||(e[7]=o=>R.value=o),"active-text":"启用","inactive-text":"关闭"},null,8,["modelValue"]),e[18]||(e[18]=u("div",{class:"form-tip",style:{"margin-left":"8px"}},"相同原始链接不再重复转存,复用已有分享链接(会验证原链接有效性;60秒内重复请求直接返回已有链接)",-1))]),_:1})]),_:1}),a(V,{"content-position":"left"},{default:s(()=>[...e[19]||(e[19]=[m("手动操作",-1)])]),_:1}),u("div",X,[a(w,{type:"primary",size:"small",loading:b.value,onClick:M},{default:s(()=>[...e[20]||(e[20]=[m("💾 保存清理配置",-1)])]),_:1},8,["loading"]),a(w,{type:"danger",size:"small",loading:_.value,onClick:P},{default:s(()=>[m(x(_.value?"清理中...":"🗑️ 立即清理"),1)]),_:1},8,["loading"]),a(w,{type:"warning",size:"small",loading:v.value,onClick:A},{default:s(()=>[m(x(v.value?"清空中...":"🧹 立即清空回收站"),1)]),_:1},8,["loading"])]),S.value?(f(),h("div",Y,[u("span",null,"⏰ 上次清理:"+x(S.value),1),k.value?(f(),h("span",Z,"📊 "+x(k.value),1)):y("",!0)])):y("",!0)]),_:1})])}}}),ne=Q(ee,[["__scopeId","data-v-96d69897"]]);export{ne as default}; diff --git a/source_clean/frontend/assets/Cleanup-xBIb8eSW.css b/source_clean/frontend/assets/Cleanup-xBIb8eSW.css new file mode 100644 index 0000000..b34d0b7 --- /dev/null +++ b/source_clean/frontend/assets/Cleanup-xBIb8eSW.css @@ -0,0 +1 @@ +.cleanup-section .config-card[data-v-96d69897]{max-width:800px}.form-tip[data-v-96d69897]{font-size:12px;color:var(--el-text-color-secondary)}.cleanup-info[data-v-96d69897]{font-size:13px;color:var(--el-text-color-secondary)} diff --git a/source_clean/frontend/assets/CloudBadge-JtUrWwGU.css b/source_clean/frontend/assets/CloudBadge-JtUrWwGU.css new file mode 100644 index 0000000..e7fe77d --- /dev/null +++ b/source_clean/frontend/assets/CloudBadge-JtUrWwGU.css @@ -0,0 +1 @@ +.cloud-badge[data-v-5857e8ce]{display:inline-block;padding:2px 8px;border-radius:4px;color:#fff;font-size:12px;line-height:1.5;white-space:nowrap} diff --git a/source_clean/frontend/assets/CloudBadge-sfzDTvGE.js b/source_clean/frontend/assets/CloudBadge-sfzDTvGE.js new file mode 100644 index 0000000..618c1c6 --- /dev/null +++ b/source_clean/frontend/assets/CloudBadge-sfzDTvGE.js @@ -0,0 +1 @@ +import{C as o,a as t}from"./index-Bz21yOih.js";import{d as s,a as c,c as r,p as n,k as a,t as p}from"./index-C5b4pIQL.js";import{_ as d}from"./_plugin-vue_export-helper-CzL5NdOX.js";const l=s({__name:"CloudBadge",props:{cloud_type:{}},setup(e){return(_,m)=>(c(),r("span",{class:"cloud-badge",style:n({background:a(o)[e.cloud_type]})},p(a(t)[e.cloud_type]),5))}}),f=d(l,[["__scopeId","data-v-5857e8ce"]]);export{f as C}; diff --git a/source_clean/frontend/assets/CloudConfig-DjBo6Nx5.css b/source_clean/frontend/assets/CloudConfig-DjBo6Nx5.css new file mode 100644 index 0000000..e49b87c --- /dev/null +++ b/source_clean/frontend/assets/CloudConfig-DjBo6Nx5.css @@ -0,0 +1 @@ +.cloud-config[data-v-d5c0f4b4]{background:var(--bg-white);border-radius:var(--radius-card);padding:24px}.cloud-toggle-grid[data-v-d5c0f4b4]{display:flex;flex-wrap:wrap;gap:12px}.cloud-toggle-chip[data-v-d5c0f4b4]{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--el-border-color-light);border-radius:8px;background:var(--el-bg-color)}.cloud-toggle-chip[data-v-d5c0f4b4]:hover{border-color:var(--el-color-primary-light-5)}.cloud-icon-img[data-v-d5c0f4b4]{width:20px;height:20px;object-fit:contain}.cloud-label[data-v-d5c0f4b4]{font-size:13px;font-weight:500}.form-tip[data-v-d5c0f4b4]{font-size:12px;color:var(--el-text-color-secondary)}.toolbar[data-v-d5c0f4b4]{margin-bottom:16px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.sign-summary-tag[data-v-d5c0f4b4]{margin-left:4px}.nickname-text[data-v-d5c0f4b4]{font-weight:600;color:#303133}.storage-cell[data-v-d5c0f4b4]{display:flex;flex-direction:column;gap:3px;padding:2px 0}.storage-bar-wrap[data-v-d5c0f4b4]{height:4px;background:#f0f2f5;border-radius:2px;overflow:hidden}.storage-bar-fill[data-v-d5c0f4b4]{height:100%;border-radius:2px;transition:width .3s}.storage-bar-fill.bar-normal[data-v-d5c0f4b4]{background:#67c23a}.storage-bar-fill.bar-warning[data-v-d5c0f4b4]{background:#e6a23c}.storage-bar-fill.bar-danger[data-v-d5c0f4b4]{background:#f56c6c}.storage-text[data-v-d5c0f4b4]{font-size:11px;color:#909399;display:flex;align-items:center;gap:3px}.storage-used[data-v-d5c0f4b4]{color:#606266;font-weight:600}.storage-total[data-v-d5c0f4b4]{color:#303133;font-weight:600}.storage-free[data-v-d5c0f4b4]{color:#909399}.save-count[data-v-d5c0f4b4]{font-size:12px;color:#909399}.verifying[data-v-d5c0f4b4]{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:#909399}[data-v-d5c0f4b4] .el-input-group__append{padding:0}[data-v-d5c0f4b4] .el-input-group__append .el-button{border-radius:0}.cookie-help[data-v-d5c0f4b4]{background:#f8faff;border:1px solid #e8f0fe;border-radius:8px;padding:12px 14px;font-size:12px;line-height:1.6;color:#606266}.cookie-help-header[data-v-d5c0f4b4]{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.cookie-help-title[data-v-d5c0f4b4]{font-weight:700;color:#409eff;margin-bottom:0;font-size:13px}.cookie-help-steps[data-v-d5c0f4b4]{margin:0;padding-left:20px}.cookie-help-steps li[data-v-d5c0f4b4]{margin-bottom:2px}.cookie-help-steps code[data-v-d5c0f4b4]{background:#ecf5ff;padding:1px 4px;border-radius:3px;font-size:11px}.cookie-help-format[data-v-d5c0f4b4]{margin-top:6px;padding-top:6px;border-top:1px dashed #e8f0fe}.cookie-help-format code[data-v-d5c0f4b4]{background:#ecf5ff;padding:1px 6px;border-radius:3px;font-size:11px;word-break:break-all}.qr-login-body[data-v-d5c0f4b4]{display:flex;gap:28px;align-items:flex-start;padding:6px 0}.qr-login-qr-wrap[data-v-d5c0f4b4]{flex-shrink:0;width:200px;display:flex;align-items:center;justify-content:center}.qr-loading[data-v-d5c0f4b4]{width:200px;height:200px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#f8f9fa;border:1px solid #e4e7ed;border-radius:12px;gap:10px;color:#909399;font-size:13px}.qr-canvas[data-v-d5c0f4b4]{width:200px;height:200px;border-radius:12px;border:1px solid #e4e7ed}.qr-login-right[data-v-d5c0f4b4]{flex:1;display:flex;flex-direction:column;gap:20px;min-height:200px}.qr-login-steps[data-v-d5c0f4b4]{display:flex;flex-direction:column;gap:14px}.qr-step[data-v-d5c0f4b4]{display:flex;align-items:flex-start;gap:10px;font-size:14px;line-height:1.6;color:#303133}.qr-step-num[data-v-d5c0f4b4]{flex-shrink:0;width:24px;height:24px;border-radius:50%;background:#409eff;color:#fff;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;margin-top:1px}.qr-login-status-area[data-v-d5c0f4b4]{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:12px;background:#f8faff;border:1px solid #e8f0fe;border-radius:8px}.qr-status-icon[data-v-d5c0f4b4]{font-size:16px;margin-right:4px}.qr-status-tip[data-v-d5c0f4b4]{font-size:13px;color:#606266;line-height:1.5}.qr-status-warn[data-v-d5c0f4b4]{color:#f56c6c}.qr-refresh-btn[data-v-d5c0f4b4]{margin-top:2px} diff --git a/source_clean/frontend/assets/CloudConfig-VN8uR29R.js b/source_clean/frontend/assets/CloudConfig-VN8uR29R.js new file mode 100644 index 0000000..184c902 --- /dev/null +++ b/source_clean/frontend/assets/CloudConfig-VN8uR29R.js @@ -0,0 +1 @@ +import{d as xe,o as X,m as Y,E as d,a as u,c as _,f as i,w as l,b as n,h as g,j as p,i as Be,F as x,r as Z,t as C,y,l as c,e as L,k as ee,L as te,p as we,n as Te,J as $e,K as Ve,v as ae,B as ze}from"./index-C5b4pIQL.js";import{a as S}from"./index-Bz21yOih.js";import{c as Ie,h as Ue,j as D,t as Pe,u as Le,k as Se,l as Ae,_ as Fe}from"./_plugin-vue_export-helper-CzL5NdOX.js";import{C as he}from"./CloudBadge-sfzDTvGE.js";import{b as Me}from"./browser-JP79f-a9.js";const Ee={class:"cloud-config"},Oe={class:"cloud-toggle-grid"},Re=["src"],je={class:"cloud-label"},De={class:"toolbar"},Ke={key:0,class:"nickname-text"},Ne={key:0,class:"verifying"},Qe={key:0,class:"storage-cell"},Ge={class:"storage-bar-wrap"},Je={class:"storage-text"},He={class:"storage-used"},We={class:"storage-total"},Xe={class:"storage-free"},Ye={key:0,class:"save-count"},Ze={class:"cookie-help"},et={class:"cookie-help-header"},tt={class:"qr-login-body"},at={class:"qr-login-qr-wrap"},st={key:0,class:"qr-loading"},ot={class:"qr-login-right"},lt={class:"qr-login-steps"},nt={class:"qr-step"},it={class:"qr-login-status-area"},rt={class:"qr-status-tip qr-status-warn"},ut=xe({__name:"CloudConfig",setup(dt){const A=g([]),K=g(),V=g([]),B=g(!1),F=g(!1),k=g(null),s=Be({cloud_type:"",nickname:"",cookie:"",_verifying:!1,_storageUsed:"",_storageTotal:""}),se=ae(()=>({cloud_type:[{required:!0,message:"请选择网盘类型",trigger:"change"}],nickname:[{required:!0,message:"请填写昵称(区分多个同类型网盘)",trigger:"blur"}]})),oe=ae(()=>Object.entries(S));X(async()=>{await z(),await le()});let h=null;X(()=>{h=setInterval(()=>{ie()},30*60*1e3)}),Y(()=>{h&&clearInterval(h)});async function le(){try{const t=await Ie();A.value=t.types}catch(t){console.error("加载网盘类型失败",t)}}async function ne(t,e){const a=A.value.find(r=>r.type===t);if(a)try{await Pe(t,e),a.enabled=e}catch(r){d.error(r.message||"切换失败"),a.enabled=!e}}async function z(){try{V.value=await Ue()}catch(t){console.error("加载网盘配置失败",t)}}async function ie(){for(const t of V.value)(t.cookie_preview||t.nickname)&&await M(t,!0)}async function re(){for(const t of V.value)(t.cookie_preview||t.nickname)&&!t._verifying&&await M(t,!1);d.success("全部验证完成")}async function M(t,e=!1){if(!t.cookie_preview&&!t.nickname){e||d.warning("该配置没有 Cookie,请先编辑保存后再验证");return}t._verifying=!0;try{const a=await D(t.cloud_type,void 0,t.id);t.verification_status=a.success?"valid":"invalid",a.success?(a.nickname&&!t.nickname&&(t.nickname=a.nickname),a.storage_used&&(t.storage_used=a.storage_used),a.storage_total&&(t.storage_total=a.storage_total),e||d.success(`${S[t.cloud_type]}:${a.message}`)):e||d.error(`${S[t.cloud_type]}:${a.message}`)}catch{t.verification_status="invalid",e||d.error(`${S[t.cloud_type]}:验证失败`)}finally{t._verifying=!1}}async function ue(){var t,e;if(!s.cookie){d.warning("请先输入 Cookie");return}if(!s.cloud_type){d.warning("请先选择网盘类型");return}s._verifying=!0;try{const a=await D(s.cloud_type,s.cookie);a.success?(a.nickname&&(s.nickname=a.nickname),a.storage_used&&(s._storageUsed=a.storage_used),a.storage_total&&(s._storageTotal=a.storage_total),d.success(`昵称:${a.nickname||"获取成功"}`)):d.warning(a.message||"验证失败,请检查 Cookie")}catch(a){d.error(((e=(t=a.response)==null?void 0:t.data)==null?void 0:e.error)||"验证失败,请检查 Cookie")}finally{s._verifying=!1}}function N(t){t?(k.value=t.id??null,s.cloud_type=t.cloud_type,s.nickname=t.nickname||"",s.cookie=t.cookie||"",s._verifying=!1):(k.value=null,s.cloud_type="",s.nickname="",s.cookie="",s._verifying=!1),B.value=!0}async function de(){var e,a,r;if(await((e=K.value)==null?void 0:e.validate().catch(()=>!1))){F.value=!0;try{if(k.value)await Le({id:k.value,cloud_type:s.cloud_type,nickname:s.nickname,cookie:s.cookie||void 0,is_active:!0,storage_used:s._storageUsed||void 0,storage_total:s._storageTotal||void 0}),d.success("配置更新成功");else{const $=await Se({cloud_type:s.cloud_type,nickname:s.nickname,cookie:s.cookie,is_active:!0,storage_used:s._storageUsed||void 0,storage_total:s._storageTotal||void 0});if(d.success("配置保存成功"),!s._storageTotal){const f=await D(s.cloud_type,void 0,$.id);f.success||d.warning(`配置已保存,但连接验证失败:${f.message}`)}}B.value=!1,k.value=null,await z()}catch($){d.error(((r=(a=$.response)==null?void 0:a.data)==null?void 0:r.error)||"保存失败")}finally{F.value=!1}}}async function ce(t){try{await Ae(t.id),d.success("删除成功"),await z()}catch{d.error("删除失败")}}const w=g(!1),E=g(""),v=g("idle"),O=g(""),T=g("quark"),Q=g(""),R=g(null),m=g(null);function fe(){T.value=s.cloud_type||"quark",v.value="loading",w.value=!0,O.value="",Q.value="",I()}async function pe(t){if(await ze(),!!R.value)try{await Me.toCanvas(R.value,t,{width:200,margin:2,color:{dark:"#000000",light:"#ffffff"}})}catch(e){console.error("二维码渲染失败",e)}}async function I(){v.value="loading",m.value&&(clearInterval(m.value),m.value=null);try{const t=localStorage.getItem("admin_token"),a=await(await fetch(`/api/admin/${T.value}/qr-login/start`,{method:"POST",headers:t?{Authorization:`Bearer ${t}`}:{}})).json();if(!a.ok)throw new Error(a.error||"启动失败");E.value=a.sessionId,Q.value=a.qrUrl,v.value="pending",await pe(a.qrUrl),ge(a.sessionId)}catch(t){v.value="error",O.value=t.message||"启动扫码登录失败"}}function ge(t){m.value=setInterval(async()=>{try{const e=localStorage.getItem("admin_token"),r=await(await fetch(`/api/admin/${T.value}/qr-login/${t}/status`,{headers:e?{Authorization:`Bearer ${e}`}:{}})).json();if(!r.ok)return;r.status==="logged_in"&&r.cookie?(clearInterval(m.value),m.value=null,v.value="logged_in",r.autoUpdated&&r.updatedConfigId?(d.success(`✅ 已更新配置 #${r.updatedConfigId}「${r.nickname||""}」的 Cookie`),await z()):r.nickname?(s.cookie=r.cookie,s.nickname=r.nickname,s._storageUsed=r.storage_used||"",s._storageTotal=r.storage_total||"",d.success("✅ 登录成功,容量已获取,点击「保存」完成")):(s.cookie=r.cookie,d.success("✅ 登录成功,Cookie 已填入")),setTimeout(()=>{w.value=!1},1e3)):r.status==="expired"&&(clearInterval(m.value),m.value=null,v.value="expired")}catch{}},5e3)}function ve(){if(m.value&&(clearInterval(m.value),m.value=null),E.value){const t=localStorage.getItem("admin_token");fetch(`/api/admin/${T.value}/qr-login/${E.value}/cancel`,{method:"POST",headers:t?{Authorization:`Bearer ${t}`}:{}}).catch(()=>{})}w.value=!1}Y(()=>{m.value&&clearInterval(m.value)});function U(t){const e=t.match(/^([\d.]+)\s*(B|KB|MB|GB|TB)$/i);if(!e)return 0;const a=parseFloat(e[1]),r={B:1,KB:1024,MB:1024**2,GB:1024**3,TB:1024**4};return a*(r[e[2].toUpperCase()]||1)}function G(t){if(!t.storage_total||!t.storage_used)return 0;const e=U(t.storage_total),a=U(t.storage_used);return e===0?0:Math.min(100,Math.round(a/e*100))}function me(t){const e=G(t);return e>=90?"bar-danger":e>=70?"bar-warning":"bar-normal"}function _e(t){if(!t.storage_total||!t.storage_used)return"?";const e=U(t.storage_total),a=U(t.storage_used);if(e===0)return"?";const r=e-a;return r<1024?"小于 1 KB":r<1024*1024?(r/1024).toFixed(1)+" KB":r<1024*1024*1024?(r/(1024*1024)).toFixed(1)+" MB":r<1024*1024*1024*1024?(r/(1024*1024*1024)).toFixed(1)+" GB":(r/(1024*1024*1024*1024)).toFixed(1)+" TB"}return(t,e)=>{const a=p("el-tag"),r=p("el-switch"),$=p("el-card"),f=p("el-button"),q=p("el-table-column"),j=p("el-text"),J=p("el-icon"),ye=p("el-popconfirm"),ke=p("el-table"),Ce=p("el-option"),qe=p("el-select"),P=p("el-form-item"),H=p("el-input"),be=p("el-form"),W=p("el-dialog");return u(),_("div",Ee,[i($,{class:"toggle-card",style:{"margin-bottom":"20px"}},{header:l(()=>[...e[7]||(e[7]=[n("span",null,"📂 网盘设置及授权",-1)])]),default:l(()=>[n("div",Oe,[(u(!0),_(x,null,Z(A.value,o=>(u(),_("div",{key:o.type,class:"cloud-toggle-chip"},[n("img",{src:o.icon,class:"cloud-icon-img"},null,8,Re),n("span",je,C(o.label),1),o.type==="others"?(u(),y(a,{key:0,size:"small",type:"info"},{default:l(()=>[...e[8]||(e[8]=[c("关",-1)])]),_:1})):L("",!0),i(r,{"model-value":o.enabled,size:"small",onChange:b=>ne(o.type,b)},null,8,["model-value","onChange"])]))),128))]),e[9]||(e[9]=n("div",{class:"form-tip",style:{"margin-top":"12px"}}," 关闭的网盘类型在搜索结果中不会展示。修改后立即生效,无需点击保存。 ",-1))]),_:1}),n("div",De,[i(f,{type:"primary",onClick:e[0]||(e[0]=o=>N(null))},{default:l(()=>[...e[10]||(e[10]=[c("新增配置",-1)])]),_:1}),i(f,{onClick:re},{default:l(()=>[...e[11]||(e[11]=[c("全部重新验证",-1)])]),_:1})]),i(ke,{data:V.value,stripe:"",style:{width:"100%"}},{default:l(()=>[i(q,{label:"网盘类型",width:"110"},{default:l(({row:o})=>[i(he,{cloud_type:o.cloud_type},null,8,["cloud_type"])]),_:1}),i(q,{prop:"nickname",label:"昵称",width:"140"},{default:l(({row:o})=>[o.nickname?(u(),_("span",Ke,C(o.nickname),1)):(u(),y(j,{key:1,type:"info",size:"small"},{default:l(()=>[...e[12]||(e[12]=[c("未设置",-1)])]),_:1}))]),_:1}),i(q,{label:"验证",width:"100",align:"center"},{default:l(({row:o})=>[o._verifying?(u(),_("span",Ne,[i(J,{class:"is-loading"},{default:l(()=>[i(ee(te))]),_:1})])):o.verification_status==="valid"?(u(),y(a,{key:1,type:"success",size:"small"},{default:l(()=>[...e[13]||(e[13]=[c("有效",-1)])]),_:1})):o.verification_status==="invalid"?(u(),y(a,{key:2,type:"danger",size:"small"},{default:l(()=>[...e[14]||(e[14]=[c("无效",-1)])]),_:1})):(u(),y(a,{key:3,type:"info",size:"small"},{default:l(()=>[...e[15]||(e[15]=[c("未验证",-1)])]),_:1}))]),_:1}),i(q,{label:"空间",width:"200"},{default:l(({row:o})=>[o.storage_total?(u(),_("div",Qe,[n("div",Ge,[n("div",{class:Te(["storage-bar-fill",me(o)]),style:we({width:G(o)+"%"})},null,6)]),n("div",Je,[n("span",He,C(o.storage_used||"?"),1),e[16]||(e[16]=n("span",{class:"storage-sep"},"/",-1)),n("span",We,C(o.storage_total),1),n("span",Xe,"(可用 "+C(_e(o))+")",1)])])):(u(),y(j,{key:1,type:"info",size:"small"},{default:l(()=>[...e[17]||(e[17]=[c("—",-1)])]),_:1}))]),_:1}),i(q,{label:"转存",width:"80",align:"center"},{default:l(({row:o})=>[o.total_saves>0?(u(),_("span",Ye,C(o.total_saves)+"次",1)):(u(),y(j,{key:1,type:"info",size:"small"},{default:l(()=>[...e[18]||(e[18]=[c("-",-1)])]),_:1}))]),_:1}),i(q,{label:"操作",width:"390",align:"center"},{default:l(({row:o})=>[i(f,{text:"",type:"primary",onClick:b=>N(o)},{default:l(()=>[...e[19]||(e[19]=[c("编辑",-1)])]),_:1},8,["onClick"]),i(f,{text:"",type:"primary",onClick:b=>M(o)},{default:l(()=>[...e[20]||(e[20]=[c("验证",-1)])]),_:1},8,["onClick"]),i(ye,{title:"确定删除该配置?",onConfirm:b=>ce(o)},{reference:l(()=>[i(f,{text:"",type:"danger"},{default:l(()=>[...e[21]||(e[21]=[c("删除",-1)])]),_:1})]),_:1},8,["onConfirm"])]),_:1})]),_:1},8,["data"]),i(W,{modelValue:B.value,"onUpdate:modelValue":e[5]||(e[5]=o=>B.value=o),title:k.value?"编辑配置":"新增配置",width:"560px"},{footer:l(()=>[i(f,{onClick:e[4]||(e[4]=o=>B.value=!1)},{default:l(()=>[...e[25]||(e[25]=[c("取消",-1)])]),_:1}),i(f,{type:"primary",loading:F.value,onClick:de},{default:l(()=>[...e[26]||(e[26]=[c("保存",-1)])]),_:1},8,["loading"])]),default:l(()=>[i(be,{ref_key:"formRef",ref:K,model:s,rules:se.value,"label-width":"100px"},{default:l(()=>[i(P,{label:"网盘类型",prop:"cloud_type"},{default:l(()=>[i(qe,{modelValue:s.cloud_type,"onUpdate:modelValue":e[1]||(e[1]=o=>s.cloud_type=o),style:{width:"100%"},disabled:!!k.value},{default:l(()=>[(u(!0),_(x,null,Z(oe.value,([o,b])=>(u(),y(Ce,{key:o,label:b,value:o},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1}),i(P,{label:"昵称",prop:"nickname"},{default:l(()=>[i(H,{modelValue:s.nickname,"onUpdate:modelValue":e[2]||(e[2]=o=>s.nickname=o),placeholder:"必填,用于区分多个同类型网盘"},{append:l(()=>[i(f,{loading:s._verifying,onClick:ue},{default:l(()=>[...e[22]||(e[22]=[c("自动获取",-1)])]),_:1},8,["loading"])]),_:1},8,["modelValue"])]),_:1}),i(P,{label:"Cookie",prop:"cookie"},{default:l(()=>[i(H,{modelValue:s.cookie,"onUpdate:modelValue":e[3]||(e[3]=o=>s.cookie=o),type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:s.cloud_type==="quark"?"夸克网盘可用扫码登录,无需填写Cookie":s.cloud_type==="baidu"?"百度网盘可用扫码登录":k.value?"留空则保持原有":"输入完整 Cookie(含 kps/sign/vcode)","input-style":"font-family: monospace; font-size: 12px;"},null,8,["modelValue","placeholder"])]),_:1}),s.cloud_type==="quark"||s.cloud_type==="baidu"?(u(),y(P,{key:0,label:" "},{default:l(()=>[n("div",Ze,[n("div",et,[i(f,{size:"small",type:"success",onClick:fe},{default:l(()=>[...e[23]||(e[23]=[c("📱 扫码登录(推荐)",-1)])]),_:1}),e[24]||(e[24]=n("span",{style:{"font-size":"12px",color:"#909399","margin-left":"8px"}},"夸克APP扫码即可,无需手动填Cookie",-1))])])]),_:1})):L("",!0)]),_:1},8,["model","rules"])]),_:1},8,["modelValue","title"]),i(W,{modelValue:w.value,"onUpdate:modelValue":e[6]||(e[6]=o=>w.value=o),title:"📱 请使用手机 夸克APP 扫码登录",width:"480px","close-on-click-modal":!1,"destroy-on-close":"",onClosed:ve},{default:l(()=>[n("div",tt,[n("div",at,[v.value==="loading"?(u(),_("div",st,[i(J,{class:"is-loading",size:36},{default:l(()=>[i(ee(te))]),_:1}),e[27]||(e[27]=n("p",null,"正在生成二维码...",-1))])):L("",!0),$e(n("canvas",{ref_key:"qrCanvasRef",ref:R,class:"qr-canvas"},null,512),[[Ve,v.value==="pending"||v.value==="expired"]])]),n("div",ot,[n("div",lt,[n("div",nt,[e[28]||(e[28]=n("span",{class:"qr-step-num"},"1",-1)),n("span",null,C(T.value==="baidu"?"打开百度网盘APP":"打开夸克APP"),1)]),e[29]||(e[29]=n("div",{class:"qr-step"},[n("span",{class:"qr-step-num"},"2"),n("span",null,"扫描二维码")],-1)),e[30]||(e[30]=n("div",{class:"qr-step"},[n("span",{class:"qr-step-num"},"3"),n("span",null,"手机确认后自动获取 Cookie")],-1))]),n("div",it,[v.value==="pending"?(u(),_(x,{key:0},[e[32]||(e[32]=n("span",{class:"qr-status-icon"},"⏳",-1)),e[33]||(e[33]=n("span",{class:"qr-status-tip"},"请用夸克APP扫码",-1)),i(f,{class:"qr-refresh-btn",size:"small",type:"primary",plain:"",onClick:I},{default:l(()=>[...e[31]||(e[31]=[c("刷新登录二维码",-1)])]),_:1})],64)):v.value==="expired"?(u(),_(x,{key:1},[e[35]||(e[35]=n("span",{class:"qr-status-icon"},"⏰",-1)),e[36]||(e[36]=n("span",{class:"qr-status-tip qr-status-warn"},"二维码已过期",-1)),i(f,{class:"qr-refresh-btn",size:"small",type:"primary",onClick:I},{default:l(()=>[...e[34]||(e[34]=[c("重新生成",-1)])]),_:1})],64)):v.value==="error"?(u(),_(x,{key:2},[e[38]||(e[38]=n("span",{class:"qr-status-icon"},"❌",-1)),n("span",rt,C(O.value),1),i(f,{class:"qr-refresh-btn",size:"small",type:"primary",onClick:I},{default:l(()=>[...e[37]||(e[37]=[c("重试",-1)])]),_:1})],64)):v.value==="logged_in"?(u(),_(x,{key:3},[e[39]||(e[39]=n("span",{class:"qr-status-icon"},"✅",-1)),e[40]||(e[40]=n("span",{class:"qr-status-tip",style:{color:"#67c23a"}},"登录成功,Cookie 已自动填入",-1))],64)):L("",!0)])])])]),_:1},8,["modelValue"])])}}}),_t=Fe(ut,[["__scopeId","data-v-d5c0f4b4"]]);export{_t as default}; diff --git a/source_clean/frontend/assets/HomePage-6khP6FBC.js b/source_clean/frontend/assets/HomePage-6khP6FBC.js new file mode 100644 index 0000000..eb5276a --- /dev/null +++ b/source_clean/frontend/assets/HomePage-6khP6FBC.js @@ -0,0 +1 @@ +import{d as K,o as G,a as n,c as a,b as o,F as w,t as c,e as h,f as v,w as f,g as Q,r as z,h as l,i as B,j as x,u as W,k as Y,s as J,l as D,n as I}from"./index-C5b4pIQL.js";import{g as X,a as Z,_ as ee}from"./_plugin-vue_export-helper-CzL5NdOX.js";const te={class:"home-page"},se={class:"hero-section"},oe=["src","alt"],ne={key:1,class:"logo-text"},ae={class:"search-box"},ie={key:1,class:"quote-section"},ce={class:"quote-text"},le={class:"quote-author"},re={class:"content-section"},ue={key:0,class:"rankings-grid"},de={class:"panel-header"},_e={class:"panel-title"},he={class:"panel-tabs"},ve=["onClick"],pe=["onClick"],ge={class:"panel-body"},fe=["onClick"],me={class:"rank-name"},ye={class:"rank-cnt"},ke=["onClick"],Ce={class:"panel-footer"},be={key:0},we={key:1},xe={key:2},Ie={key:3},qe={class:"footer-time"},Ae={key:0,class:"site-footer"},Se={class:"footer-inner"},Ne={class:"footer-actions"},R=8,Te=K({__name:"HomePage",setup(Ve){const q=W(),m=l(""),u=l([]),d=B({}),_=B({}),p=l(""),y=l(""),k=l(""),A=l(!1),g=l(""),C=l(""),S=l(""),F={movie:"🎬",western_movie:"🎥",western_tv:"🌍",donghua:"🐉",global_anime:"🌐",tv:"📺",niche:"💎",hotsite:"🏆"};function L(e){return F[e]||"📋"}function j(e){const t=[];if(e.rating&&t.push(`⭐${e.rating}`),e.searchCount>0){const i=e.searchCount;i>=1e8?t.push(`${(i/1e8).toFixed(1)}亿`):i>=1e4?t.push(`${(i/1e4).toFixed(0)}万`):t.push(String(i))}return t.join(" ")||""}function N(e){return(_[e.category]||"hot")==="hot"?e.hot||[]:e.newest||[]}function E(e){const t=N(e);return d[e.category]?t:t.slice(0,R)}function H(e){return N(e).length>R&&!d[e.category]}function M(e){d[e]=!0}function T(e,t){_[e]=t,d[e]=!1}function O(){window.open("/disclaimer/","_blank")}G(async()=>{try{const t=await(await fetch("https://v1.hitokoto.cn/")).json();g.value=t.hitokoto||"",C.value=t.from_who||t.from||""}catch{g.value="学而时习之,不亦说乎。",C.value="孔子"}try{const[e,t]=await Promise.all([X(),Z()]);e.fetchedAt?(S.value=e.fetchedAt,u.value=e.categories||[]):u.value=Array.isArray(e)?e:[];for(const i of u.value)_[i.category]="hot",d[i.category]=!1;t.site_logo&&(p.value=t.site_logo),t.site_name&&(y.value=t.site_name),t.site_disclaimer&&(k.value=t.site_disclaimer),A.value=!0}catch(e){console.error("加载首页数据失败",e)}});function V(){const e=m.value.trim();e&&q.push("/search?q="+encodeURIComponent(e))}function P(e){q.push("/search?q="+encodeURIComponent(e))}return(e,t)=>{const i=x("el-icon"),U=x("el-input"),$=x("el-button");return n(),a("div",te,[o("div",se,[A.value?(n(),a(w,{key:0},[p.value?(n(),a("img",{key:0,src:p.value,alt:y.value||"CloudSearch",class:"logo-img",onError:t[0]||(t[0]=s=>{s.target.style.display="none",p.value=""})},null,40,oe)):(n(),a("div",ne,c(y.value||"CloudSearch"),1))],64)):h("",!0),o("div",ae,[v(U,{modelValue:m.value,"onUpdate:modelValue":t[1]||(t[1]=s=>m.value=s),placeholder:"搜索网盘资源,或粘贴视频/网盘链接...",size:"large",clearable:"",onKeyup:Q(V,["enter"])},{prefix:f(()=>[v(i,null,{default:f(()=>[v(Y(J))]),_:1})]),_:1},8,["modelValue"]),v($,{type:"primary",size:"large",onClick:V,class:"search-btn"},{default:f(()=>[...t[2]||(t[2]=[D(" 搜 索 ",-1)])]),_:1})]),g.value?(n(),a("div",ie,[o("span",ce,"「 "+c(g.value)+" 」",1),o("span",le,"---"+c(C.value),1)])):h("",!0)]),o("div",re,[u.value.length>0?(n(),a("div",ue,[(n(!0),a(w,null,z(u.value,s=>(n(),a("div",{key:s.category,class:"rank-panel"},[o("div",de,[o("span",_e,c(L(s.category))+" "+c(s.label),1),o("div",he,[o("span",{class:I(["panel-tab",{active:_[s.category]==="hot"}]),onClick:r=>T(s.category,"hot")},"热榜",10,ve),o("span",{class:I(["panel-tab",{active:_[s.category]==="newest"}]),onClick:r=>T(s.category,"newest")},"最新",10,pe)])]),o("div",ge,[(n(!0),a(w,null,z(E(s),(r,b)=>(n(),a("div",{key:s.category+"-"+b,class:"rank-item",onClick:$e=>P(r.keyword)},[o("span",{class:I(["rank-idx",{"top-three":b<3}])},c(b+1),3),o("span",me,c(r.keyword),1),o("span",ye,c(j(r)),1)],8,fe))),128)),H(s)?(n(),a("div",{key:0,class:"rank-expand",onClick:r=>M(s.category)}," 展开全部 ▼ ",8,ke)):h("",!0)]),o("div",Ce,[s.category==="hotsite"?(n(),a("span",be,"基于本站搜索数据")):s.category==="donghua"||s.category==="global_anime"?(n(),a("span",we,"数据来源:Bilibili")):s.category==="movie"||s.category==="tv"?(n(),a("span",xe,"数据来源:百度")):(n(),a("span",Ie,"数据来源:TMDB")),o("span",qe,c(S.value),1)])]))),128))])):h("",!0)]),k.value?(n(),a("div",Ae,[o("div",Se,c(k.value),1),o("div",Ne,[v($,{class:"footer-disclaimer-btn",size:"small",onClick:O},{default:f(()=>[...t[3]||(t[3]=[D("📜 免责声明",-1)])]),_:1})])])):h("",!0)])}}}),De=ee(Te,[["__scopeId","data-v-1f536d99"]]);export{De as default}; diff --git a/source_clean/frontend/assets/HomePage-BVcQlSvu.css b/source_clean/frontend/assets/HomePage-BVcQlSvu.css new file mode 100644 index 0000000..9f62b4b --- /dev/null +++ b/source_clean/frontend/assets/HomePage-BVcQlSvu.css @@ -0,0 +1 @@ +.home-page[data-v-1f536d99]{min-height:100vh;display:flex;flex-direction:column}.hero-section[data-v-1f536d99]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 24px 40px}.logo-text[data-v-1f536d99]{font-size:64px;font-weight:700;color:var(--primary-color);margin-bottom:32px;letter-spacing:-2px}.logo-img[data-v-1f536d99]{max-width:500px;max-height:120px;width:auto;height:auto;object-fit:contain;margin-bottom:32px}.search-box[data-v-1f536d99]{display:flex;align-items:center;width:100%;max-width:640px;border:1px solid #dfe1e5;border-radius:24px;background:#fff;box-shadow:none;transition:box-shadow .2s,border-color .2s;overflow:hidden}.search-box[data-v-1f536d99]:focus-within{box-shadow:0 1px 6px #20212447;border-color:#dfe1e500}.search-box[data-v-1f536d99] .el-input__wrapper{border:none;box-shadow:none;background:transparent;padding:4px 20px;border-radius:0}.search-box[data-v-1f536d99] .el-input__inner{font-size:15px}.search-btn[data-v-1f536d99]{flex-shrink:0;border:none;border-radius:999px;padding:0 24px;height:38px;line-height:38px;margin:4px;font-size:14px;font-weight:600;background:var(--primary-color);color:#fff;cursor:pointer;transition:all .2s;letter-spacing:1px}.search-btn[data-v-1f536d99]:hover{background:#3a7be0}.search-btn[data-v-1f536d99]:active{background:#2d6ccf}.quote-section[data-v-1f536d99]{margin-top:18px;max-width:640px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quote-text[data-v-1f536d99]{font-size:14px;color:#aab0b8;font-style:italic;letter-spacing:.5px}.quote-author[data-v-1f536d99]{font-size:12px;color:#c0c4cc;display:inline-block;margin-left:4px}.content-section[data-v-1f536d99]{max-width:1500px;width:100%;margin:0 auto;padding:0 16px 60px}.rankings-grid[data-v-1f536d99]{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px;margin-top:8px}.rank-panel[data-v-1f536d99]{background:var(--bg-white,#fff);border-radius:12px;padding:14px;border:1px solid #ebeef5;box-shadow:0 1px 4px #0000000a;display:flex;flex-direction:column}.panel-header[data-v-1f536d99]{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:2px solid #f0f0f0;margin-bottom:4px}.panel-title[data-v-1f536d99]{font-size:15px;font-weight:700;color:#303133;white-space:nowrap}.panel-tabs[data-v-1f536d99]{display:flex;gap:2px;background:#f0f2f5;border-radius:6px;padding:2px}.panel-tab[data-v-1f536d99]{font-size:11px;padding:3px 10px;border-radius:5px;cursor:pointer;color:#909399;font-weight:500;transition:all .2s;-webkit-user-select:none;user-select:none}.panel-tab.active[data-v-1f536d99]{background:#fff;color:var(--primary-color);font-weight:600;box-shadow:0 1px 3px #0000000f}.panel-body[data-v-1f536d99]{flex:1;display:flex;flex-direction:column;gap:1px}.rank-item[data-v-1f536d99]{display:flex;align-items:center;gap:8px;padding:5px 6px;border-radius:6px;cursor:pointer;transition:background .15s}.rank-item[data-v-1f536d99]:hover{background:#f0f5ff}.rank-item[data-v-1f536d99]:active{background:#e6f0ff}.rank-idx[data-v-1f536d99]{width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:#909399;background:#f0f0f0;flex-shrink:0}.rank-idx.top-three[data-v-1f536d99]{background:var(--primary-color);color:#fff}.rank-name[data-v-1f536d99]{flex:1;min-width:0;font-size:13px;font-weight:500;color:#303133;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rank-cnt[data-v-1f536d99]{font-size:11px;color:#c0c4cc;white-space:nowrap;flex-shrink:0}.rank-expand[data-v-1f536d99]{text-align:center;padding:6px;margin-top:2px;font-size:12px;color:var(--primary-color);cursor:pointer;border-radius:6px;transition:background .15s;-webkit-user-select:none;user-select:none}.rank-expand[data-v-1f536d99]:hover{background:#ecf5ff}.panel-footer[data-v-1f536d99]{margin-top:8px;padding-top:8px;border-top:1px solid #f0f0f0;display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#c0c4cc}.footer-time[data-v-1f536d99]{font-family:monospace;font-size:10px}@media (max-width: 900px){.hero-section[data-v-1f536d99]{padding:36px 16px 24px}.logo-text[data-v-1f536d99]{font-size:36px;margin-bottom:20px}.logo-img[data-v-1f536d99]{max-width:360px;max-height:100px;margin-bottom:20px}.rankings-scroll[data-v-1f536d99]{gap:12px}}.site-footer[data-v-1f536d99]{margin-top:auto;padding:20px 16px 32px;background:#f9fafb;border-top:1px solid #ebeef5}.footer-inner[data-v-1f536d99]{max-width:800px;margin:0 auto;font-size:12px;line-height:1.8;color:#909399;text-align:center;white-space:pre-line}.footer-actions[data-v-1f536d99]{display:flex;justify-content:center;align-items:center;gap:12px;margin-top:12px}.footer-disclaimer-btn[data-v-1f536d99]{font-size:12px!important;color:#909399!important}.footer-disclaimer-btn[data-v-1f536d99]:hover{color:#409eff!important} diff --git a/source_clean/frontend/assets/ResultDetail-CVwsv2ff.css b/source_clean/frontend/assets/ResultDetail-CVwsv2ff.css new file mode 100644 index 0000000..d8b72e0 --- /dev/null +++ b/source_clean/frontend/assets/ResultDetail-CVwsv2ff.css @@ -0,0 +1 @@ +.cloud-select[data-v-098423df]{width:100%}.result-detail-page[data-v-755e2105]{min-height:100vh;background:#f5f7fa;padding:40px 24px}.detail-container[data-v-755e2105]{max-width:1080px;margin:0 auto}.detail-card[data-v-755e2105]{background:var(--bg-white);border-radius:var(--radius-card);box-shadow:var(--shadow-card);padding:32px}.detail-header[data-v-755e2105]{display:flex;gap:24px;margin-bottom:24px}.detail-cover[data-v-755e2105]{position:relative;flex-shrink:0;width:240px;height:180px;border-radius:12px;overflow:hidden}.detail-cover img[data-v-755e2105]{width:100%;height:100%;object-fit:cover}.detail-info[data-v-755e2105]{flex:1}.detail-info h1[data-v-755e2105]{font-size:24px;font-weight:700;color:#303133;margin-bottom:12px;line-height:1.4}.detail-meta[data-v-755e2105]{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.detail-desc[data-v-755e2105]{font-size:15px;color:#606266;line-height:1.6}.detail-actions[data-v-755e2105]{border-top:1px solid var(--border-color);padding-top:20px}.detail-video[data-v-755e2105]{margin-bottom:24px}.video-preview[data-v-755e2105]{position:relative;width:100%;border-radius:12px;overflow:hidden;margin-bottom:20px}.video-preview img[data-v-755e2105]{width:100%;max-height:400px;object-fit:cover;display:block}.play-overlay[data-v-755e2105]{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background:#0000004d;cursor:pointer;transition:background .2s}.play-overlay[data-v-755e2105]:hover{background:#0006}.play-btn[data-v-755e2105]{padding:12px 32px;background:#ffffffe6;border-radius:24px;font-size:18px;font-weight:600;color:#303133}.video-info h1[data-v-755e2105]{font-size:24px;font-weight:700;color:#303133;margin-bottom:12px}.video-author[data-v-755e2105],.video-platform[data-v-755e2105]{font-size:15px;color:var(--text-secondary);margin-bottom:6px}.video-player-wrapper[data-v-755e2105]{margin-top:24px;border-top:1px solid var(--border-color);padding-top:24px}.video-player[data-v-755e2105]{width:100%;border-radius:8px}.loading-state[data-v-755e2105]{padding:40px 0}.save-dialog-content[data-v-755e2105]{display:flex;flex-direction:column;gap:16px}.save-file-name[data-v-755e2105]{font-size:15px;font-weight:500;color:#303133}.result-dialog-content[data-v-755e2105]{display:flex;flex-direction:column;gap:16px}.share-link-box[data-v-755e2105]{display:flex;flex-direction:column;gap:8px}.share-label[data-v-755e2105]{font-size:14px;color:#606266}.share-link-row[data-v-755e2105]{display:flex;gap:8px} diff --git a/source_clean/frontend/assets/ResultDetail-CbQPmE-g.js b/source_clean/frontend/assets/ResultDetail-CbQPmE-g.js new file mode 100644 index 0000000..2ce87d3 --- /dev/null +++ b/source_clean/frontend/assets/ResultDetail-CbQPmE-g.js @@ -0,0 +1 @@ +import{d as U,h as i,o as N,a,c,f as o,w as n,F as j,r as H,y as w,k as G,j as f,b as l,t as r,e as g,z as J,l as p,E as D}from"./index-C5b4pIQL.js";import{C as K}from"./CloudBadge-sfzDTvGE.js";import{a as Q}from"./index-Bz21yOih.js";import{h as W,_ as T,q as X,f as Y,e as Z}from"./_plugin-vue_export-helper-CzL5NdOX.js";const ee={class:"cloud-select"},le=U({__name:"CloudSelect",props:{modelValue:{}},emits:["select","update:modelValue"],setup(R,{emit:E}){const V=R,t=E,s=i(V.modelValue),C=i([]);N(async()=>{try{C.value=await W()}catch(v){console.error("获取网盘配置失败",v)}});function m(v){t("select",v),t("update:modelValue",v)}return(v,y)=>{const b=f("el-option"),h=f("el-select");return a(),c("div",ee,[o(h,{modelValue:s.value,"onUpdate:modelValue":y[0]||(y[0]=_=>s.value=_),placeholder:"选择目标网盘",onChange:m},{default:n(()=>[(a(!0),c(j,null,H(C.value,_=>(a(),w(b,{key:_.cloud_type,label:_.nickname||G(Q)[_.cloud_type],value:_.cloud_type},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])}}}),te=T(le,[["__scopeId","data-v-098423df"]]),se={class:"result-detail-page"},ae={class:"detail-container"},oe={key:0,class:"loading-state"},ne={key:1,class:"detail-card"},ie={class:"detail-header"},ue={class:"detail-cover"},de=["src","alt"],re={class:"detail-info"},ce={class:"detail-meta"},ve={key:0,class:"detail-desc"},_e={class:"detail-actions"},pe={key:2,class:"detail-card"},fe={class:"detail-video"},me={class:"video-preview"},ye=["src","alt"],ge={class:"video-info"},he={key:0,class:"video-author"},ke={class:"video-platform"},Ve={key:1,class:"detail-desc"},Ce={class:"detail-actions"},we={key:0,class:"video-player-wrapper"},be=["src"],Se={class:"save-dialog-content"},xe={class:"save-file-name"},De={class:"result-dialog-content"},Ee={class:"share-link-box"},Le={class:"share-link-row"},Re=U({__name:"ResultDetail",setup(R){const E=J(),V=i(!1),t=i(null),s=i(null),C=i(!1),m=i(!1),v=i(!1),y=i(""),b=i(!1),h=i(!1),_=i(null),S=i("");N(async()=>{const u=E.params.id;if(u){V.value=!0;try{const e=await X(u);e.intent==="SEARCH"&&e.results.length>0?t.value=e.results[0]:e.intent==="VIDEO_PARSE"&&e.results.length>0&&(s.value=e.results[0])}catch(e){console.error("获取详情失败",e)}finally{V.value=!1}}});function B(){b.value=!!s.value,m.value=!0}function $(){C.value=!0}function A(u){y.value=u}async function I(){if(!y.value){D.warning("请选择目标网盘");return}v.value=!0;try{let u;if(b.value&&s.value)u=await Y({video_url:s.value.video_url,title:s.value.title,target_cloud:y.value});else if(t.value)u=await Z({type:"search",source:t.value,target_cloud:y.value});else return;_.value=u,S.value=u.share_url,m.value=!1,h.value=!0}catch(u){console.error("保存失败",u),D.error("保存失败")}finally{v.value=!1}}async function q(){try{await navigator.clipboard.writeText(S.value),D.success("链接已复制到剪贴板")}catch{D.warning("复制失败,请手动复制")}}return(u,e)=>{const F=f("el-skeleton"),L=f("el-tag"),k=f("el-button"),M=f("el-empty"),z=f("el-dialog"),O=f("el-alert"),P=f("el-input");return a(),c("div",se,[l("div",ae,[V.value?(a(),c("div",oe,[o(F,{rows:6,animated:""})])):t.value?(a(),c("div",ne,[l("div",ie,[l("div",ue,[l("img",{src:t.value.cover,alt:t.value.title},null,8,de),o(K,{cloud_type:t.value.cloud_type},null,8,["cloud_type"])]),l("div",re,[l("h1",null,r(t.value.title),1),l("div",ce,[t.value.file_size?(a(),w(L,{key:0},{default:n(()=>[p("📦 "+r(t.value.file_size),1)]),_:1})):g("",!0),t.value.update_time?(a(),w(L,{key:1},{default:n(()=>[p("🕐 "+r(t.value.update_time),1)]),_:1})):g("",!0),t.value.source?(a(),w(L,{key:2},{default:n(()=>[p("📂 "+r(t.value.source),1)]),_:1})):g("",!0)]),t.value.description?(a(),c("p",ve,r(t.value.description),1)):g("",!0)])]),l("div",_e,[o(k,{type:"primary",size:"large",onClick:B},{default:n(()=>[...e[5]||(e[5]=[p(" 📥 保存到网盘 ",-1)])]),_:1})])])):s.value?(a(),c("div",pe,[l("div",fe,[l("div",me,[l("img",{src:s.value.cover,alt:s.value.title},null,8,ye),l("div",{class:"play-overlay",onClick:$},[...e[6]||(e[6]=[l("div",{class:"play-btn"},"▶ 播放",-1)])])]),l("div",ge,[l("h1",null,r(s.value.title),1),s.value.author?(a(),c("p",he,"👤 "+r(s.value.author),1)):g("",!0),l("p",ke,"📺 "+r(s.value.platform),1),s.value.description?(a(),c("p",Ve,r(s.value.description),1)):g("",!0)])]),l("div",Ce,[o(k,{type:"primary",size:"large",onClick:B},{default:n(()=>[...e[7]||(e[7]=[p(" 📥 保存到云盘 ",-1)])]),_:1})]),C.value?(a(),c("div",we,[l("video",{src:s.value.video_url,controls:"",autoplay:"",class:"video-player"},null,8,be)])):g("",!0)])):(a(),w(M,{key:3,description:"未找到该资源"}))]),o(z,{modelValue:m.value,"onUpdate:modelValue":e[1]||(e[1]=d=>m.value=d),title:"保存到网盘",width:"420px"},{footer:n(()=>[o(k,{onClick:e[0]||(e[0]=d=>m.value=!1)},{default:n(()=>[...e[8]||(e[8]=[p("取消",-1)])]),_:1}),o(k,{type:"primary",loading:v.value,onClick:I},{default:n(()=>[...e[9]||(e[9]=[p("确认保存",-1)])]),_:1},8,["loading"])]),default:n(()=>{var d,x;return[l("div",Se,[l("p",xe,"📄 "+r(((d=t.value)==null?void 0:d.title)||((x=s.value)==null?void 0:x.title)),1),o(te,{onSelect:A})])]}),_:1},8,["modelValue"]),o(z,{modelValue:h.value,"onUpdate:modelValue":e[4]||(e[4]=d=>h.value=d),title:"保存成功",width:"420px"},{footer:n(()=>[o(k,{type:"primary",onClick:e[3]||(e[3]=d=>h.value=!1)},{default:n(()=>[...e[12]||(e[12]=[p("关闭",-1)])]),_:1})]),default:n(()=>{var d;return[l("div",De,[o(O,{type:"success",title:((d=_.value)==null?void 0:d.message)||"保存成功","show-icon":"",closable:!1},null,8,["title"]),l("div",Ee,[e[11]||(e[11]=l("p",{class:"share-label"},"分享链接:",-1)),l("div",Le,[o(P,{modelValue:S.value,"onUpdate:modelValue":e[2]||(e[2]=x=>S.value=x),readonly:""},null,8,["modelValue"]),o(k,{onClick:q},{default:n(()=>[...e[10]||(e[10]=[p("复制",-1)])]),_:1})])])])]}),_:1},8,["modelValue"])])}}}),Te=T(Re,[["__scopeId","data-v-755e2105"]]);export{Te as default}; diff --git a/source_clean/frontend/assets/SaveRecords-AwnaSQhs.js b/source_clean/frontend/assets/SaveRecords-AwnaSQhs.js new file mode 100644 index 0000000..7435ae9 --- /dev/null +++ b/source_clean/frontend/assets/SaveRecords-AwnaSQhs.js @@ -0,0 +1 @@ +import{d as fe,o as he,a as d,c as r,b as l,f as s,w as u,F as K,r as P,g as ye,t as i,l as m,e as p,J as be,y as J,h as _,j as v,N as ke,n as L,k as I,s as Ce,O as xe,P as we,E as O}from"./index-C5b4pIQL.js";import{c as De,A as Se,_ as Ne}from"./_plugin-vue_export-helper-CzL5NdOX.js";const ze={class:"save-records"},Te={class:"toolbar"},$e={class:"toolbar-row"},Me={class:"filter-group"},Ve={style:{display:"inline-flex",alignItems:"center",gap:"6px"}},Ee=["src"],Be={class:"time-btns"},Fe=["onClick"],He={class:"toolbar-actions"},je={class:"record-count"},Ae={key:0,class:"save-summary"},Le={class:"summary-item summary-all"},Ie={class:"summary-item summary-success"},Ye={class:"summary-item summary-reused"},Ge={class:"summary-item summary-failed"},Re={key:0,class:"summary-item summary-rate"},Ue={class:"el-table-wrap"},Ke={class:"expand-detail"},Pe={class:"detail-row"},Je={class:"detail-cell"},Oe=["href"],Xe={key:0,class:"detail-cell"},Qe={class:"detail-code"},We={key:1,class:"detail-cell"},Ze={key:2,class:"detail-cell"},qe={key:3,class:"detail-cell"},et={class:"detail-row"},tt={key:0,class:"detail-cell"},at=["href"],lt={key:1,class:"detail-cell"},st={key:2,class:"detail-cell"},nt={class:"detail-code"},ot={key:0,class:"detail-row"},it={class:"detail-cell"},ut={class:"detail-code"},dt={key:0,class:"detail-cell"},rt={class:"detail-code"},ct={key:1,class:"detail-row"},_t={class:"detail-cell detail-full"},pt={class:"detail-error"},gt=["title"],mt=["src"],vt=["title"],ft={key:0,class:"loc-badge"},ht={key:1,class:"no-data"},yt=["title"],bt={key:1,class:"err-msg"},kt={key:2,class:"reuse-msg"},Ct={key:3,class:"no-data"},xt={class:"action-cell"},wt={key:1,class:"pagination-wrap"},Dt={class:"pagination-info"},St='',Nt=fe({__name:"SaveRecords",setup(zt){const Y=_([]),b=_(0),k=_(1),C=_(20),$=_(!1),w=_(""),D=_(""),S=_(""),M=_("today"),V=_(""),E=_(""),N=_(null),B=_([]),f=_(null),X=[{key:"today",label:"今日"},{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"lastMonth",label:"上月"}],F=_({});async function Q(){try{const a=await De(),e={};for(const n of a.types)e[n.type]={label:n.label,icon:n.icon};F.value=e}catch{}}function H(a){var e;return((e=F.value[a])==null?void 0:e.label)||a}function G(a){var e;return((e=F.value[a])==null?void 0:e.icon)||St}function W(a){const e=new Set;a.forEach(o=>{o.source_type&&e.add(o.source_type)});const n=new Set(B.value);e.forEach(o=>{n.has(o)||B.value.push(o)})}function j(a){const e=a.getFullYear(),n=String(a.getMonth()+1).padStart(2,"0"),o=String(a.getDate()).padStart(2,"0");return`${e}-${n}-${o}`}function Z(a){if(!a)return"-";let e=a;/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e)&&(e=e.replace(" ","T")+"+08:00");const n=new Date(e);if(isNaN(n.getTime()))return a;const o=c=>String(c).padStart(2,"0");return`${o(n.getMonth()+1)}-${o(n.getDate())} ${o(n.getHours())}:${o(n.getMinutes())}:${o(n.getSeconds())}`}function q(a){return a?a<1e3?`${a}ms`:`${(a/1e3).toFixed(1)}s`:"-"}function ee(a){return a?a>3e4?"dur-slow":a>1e4?"dur-warn":"dur-fast":""}function te(a){return a.length>50?a.slice(0,50)+"…":a}function ae(a){return a==="success"?"转存成功":a==="reused"?"♻️ 复用已有分享链接":"转存失败"}function le(a){return a==="success"?"status-ok":a==="reused"?"status-reuse":"status-fail"}function se(a){return a==="success"?"✓":a==="reused"?"♻️":"✗"}const ne={Anhui:"安徽",Beijing:"北京",Chongqing:"重庆",Fujian:"福建",Gansu:"甘肃",Guangdong:"广东",Guangxi:"广西",Guizhou:"贵州",Hainan:"海南",Hebei:"河北",Henan:"河南",Heilongjiang:"黑龙江",Hubei:"湖北",Hunan:"湖南","Inner Mongolia":"内蒙古",Jiangsu:"江苏",Jiangxi:"江西",Jilin:"吉林",Liaoning:"辽宁",Ningxia:"宁夏",Qinghai:"青海",Shaanxi:"陕西",Shandong:"山东",Shanghai:"上海",Shanxi:"山西",Sichuan:"四川",Tianjin:"天津",Tibet:"西藏",Xinjiang:"新疆",Yunnan:"云南",Zhejiang:"浙江","Hong Kong":"香港",Macau:"澳门",Taiwan:"台湾",Changsha:"长沙",Hefei:"合肥",Fuzhou:"福州",Lanzhou:"兰州",Guangzhou:"广州",Nanning:"南宁",Guiyang:"贵阳",Haikou:"海口",Shijiazhuang:"石家庄",Zhengzhou:"郑州",Harbin:"哈尔滨",Wuhan:"武汉",Nanjing:"南京",Nanchang:"南昌",Changchun:"长春",Shenyang:"沈阳",Yinchuan:"银川",Xining:"西宁","Xi'an":"西安",Jinan:"济南",Taiyuan:"太原",Chengdu:"成都",Shenzhen:"深圳",Hangzhou:"杭州",Suzhou:"苏州",Wuxi:"无锡",Ningbo:"宁波",Dongguan:"东莞",Foshan:"佛山",Zhuhai:"珠海",Qingdao:"青岛",Dalian:"大连",Xiamen:"厦门",Kunming:"昆明",Lhasa:"拉萨",Urumqi:"乌鲁木齐",Linyi:"临沂",Wenzhou:"温州",Quanzhou:"泉州"},oe={"China Telecom":"中国电信","China Mobile":"中国移动","China Unicom":"中国联通",Chinanet:"中国电信",ChinaNet:"中国电信",CMNET:"中国移动","CNC Group":"中国联通",unicom:"中国联通",telecom:"中国电信",mobile:"中国移动","China Education and Research Network":"教育网",CERNET:"教育网","China Networks":"中国网络",China163:"中国电信","CHINANET BACKBONE":"中国电信","Tencent Cloud":"腾讯云","Alibaba Cloud":"阿里云",Aliyun:"阿里云","Huawei Cloud":"华为云",Baidu:"百度","Beijing Baidu":"百度"};function R(a){return a.replace(/^(中国|China)\s*/i,"").split(/\s+/).filter(Boolean).map(o=>ne[o]||oe[o]||o).join(" ")}function ie({row:a}){return a.status==="failed"?"row-failed":""}async function ue(a){try{await navigator.clipboard.writeText(a),O.success("已复制到剪贴板")}catch{const e=document.createElement("textarea");e.value=a,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),O.success("已复制到剪贴板")}}function de(a){window.open(a,"_blank")}function re(a,e){}function z(a){M.value=a,N.value=null;const e=new Date,n=e.getFullYear(),o=e.getMonth();let c,g;switch(a){case"today":c=new Date(n,o,e.getDate()),g=c;break;case"week":{const x=e.getDay();c=new Date(n,o,e.getDate()+(x===0?-6:1-x)),g=e;break}case"month":c=new Date(n,o,1),g=e;break;case"lastMonth":c=new Date(n,o-1,1),g=new Date(n,o,0);break;default:c=new Date(n,o,e.getDate()),g=c}V.value=j(c);const A=new Date(g.getFullYear(),g.getMonth(),g.getDate()+1);E.value=j(A),y(1)}function ce(a){if(a&&a.length===2){M.value="",V.value=a[0];const e=new Date(a[1]);e.setDate(e.getDate()+1),E.value=j(e),y(1)}else z("today")}function _e(){w.value="",D.value="",S.value="",N.value=null,z("today")}async function y(a=1){$.value=!0;try{k.value=a;const e=w.value||void 0,n=D.value||void 0,o=S.value||void 0,c=await Se(a,C.value,V.value,E.value,e,n,o);Y.value=c.records,b.value=c.total,f.value=c.summary||null,W(c.records)}catch(e){console.error("加载转存记录失败",e)}finally{$.value=!1}}return he(()=>{z("today"),Q()}),(a,e)=>{const n=v("el-option"),o=v("el-select"),c=v("el-date-picker"),g=v("el-icon"),A=v("el-input"),x=v("el-button"),pe=v("el-tag"),h=v("el-table-column"),T=v("el-tooltip"),ge=v("el-table"),me=v("el-pagination"),ve=ke("loading");return d(),r("div",ze,[l("div",Te,[l("div",$e,[l("div",Me,[s(o,{modelValue:w.value,"onUpdate:modelValue":e[0]||(e[0]=t=>w.value=t),placeholder:"状态",clearable:"",style:{width:"100px"},onChange:e[1]||(e[1]=t=>y(1))},{default:u(()=>[s(n,{label:"全部状态",value:""}),s(n,{label:"✓ 成功",value:"success"}),s(n,{label:"♻️ 复用",value:"reused"}),s(n,{label:"✗ 失败",value:"failed"})]),_:1},8,["modelValue"]),s(o,{modelValue:D.value,"onUpdate:modelValue":e[2]||(e[2]=t=>D.value=t),placeholder:"网盘",clearable:"",style:{width:"100px"},onChange:e[3]||(e[3]=t=>y(1))},{default:u(()=>[s(n,{label:"全部网盘",value:""}),(d(!0),r(K,null,P(B.value,t=>(d(),J(n,{key:t,label:H(t),value:t},{default:u(()=>[l("span",Ve,[l("img",{src:G(t),style:{width:"16px",height:"16px"}},null,8,Ee),m(" "+i(H(t)),1)])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"]),l("div",Be,[(d(),r(K,null,P(X,t=>l("button",{key:t.key,class:L(["time-btn",{active:M.value===t.key}]),onClick:U=>z(t.key)},i(t.label),11,Fe)),64))]),s(c,{modelValue:N.value,"onUpdate:modelValue":e[4]||(e[4]=t=>N.value=t),type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"YYYY-MM-DD",style:{width:"220px"},onChange:ce},null,8,["modelValue"]),s(A,{modelValue:S.value,"onUpdate:modelValue":e[5]||(e[5]=t=>S.value=t),placeholder:"搜索资源名称…",clearable:"",style:{width:"180px"},onClear:e[6]||(e[6]=t=>y(1)),onKeyup:e[7]||(e[7]=ye(t=>y(1),["enter"]))},{prefix:u(()=>[s(g,null,{default:u(()=>[s(I(Ce))]),_:1})]),_:1},8,["modelValue"])]),l("div",He,[s(x,{size:"small",onClick:_e},{default:u(()=>[...e[11]||(e[11]=[m("重置筛选",-1)])]),_:1}),l("span",je,"共 "+i(b.value)+" 条",1)])])]),f.value?(d(),r("div",Ae,[l("span",Le,[e[12]||(e[12]=m("📊 共 ",-1)),l("strong",null,i(f.value.total),1),e[13]||(e[13]=m(" 条",-1))]),e[18]||(e[18]=l("span",{class:"summary-divider"},"|",-1)),l("span",Ie,[e[14]||(e[14]=m("✅ 成功 ",-1)),l("strong",null,i(f.value.success),1)]),l("span",Ye,[e[15]||(e[15]=m("♻️ 复用 ",-1)),l("strong",null,i(f.value.reused),1)]),l("span",Ge,[e[16]||(e[16]=m("❌ 失败 ",-1)),l("strong",null,i(f.value.failed),1)]),f.value.total>0?(d(),r("span",Re,[e[17]||(e[17]=m(" 成功率 ",-1)),l("strong",null,i(((f.value.success+f.value.reused)/f.value.total*100).toFixed(1))+"%",1)])):p("",!0)])):p("",!0),l("div",Ue,[be((d(),J(ge,{data:Y.value,stripe:"",style:{width:"100%"},"empty-text":"暂无转存记录",onExpandChange:re,"row-class-name":ie},{default:u(()=>[s(h,{type:"expand",width:"36"},{default:u(({row:t})=>[l("div",Ke,[l("div",Pe,[l("div",Je,[e[19]||(e[19]=l("span",{class:"detail-label"},"原始链接",-1)),l("a",{href:t.source_url,target:"_blank",class:"detail-link"},i(t.source_url),9,Oe)]),t.original_folder_name?(d(),r("div",Xe,[e[20]||(e[20]=l("span",{class:"detail-label"},"原始文件夹名",-1)),l("code",Qe,i(t.original_folder_name),1)])):p("",!0),t.status!=="reused"&&(t.folder_count>0||t.file_count>0)?(d(),r("div",We,[e[22]||(e[22]=l("span",{class:"detail-label"},"文件夹",-1)),l("span",null,[l("strong",null,i(t.folder_count||0),1),e[21]||(e[21]=m(" 个",-1))])])):p("",!0),t.status!=="reused"&&(t.folder_count>0||t.file_count>0)?(d(),r("div",Ze,[e[24]||(e[24]=l("span",{class:"detail-label"},"文件",-1)),l("span",null,[l("strong",null,i(t.file_count||0),1),e[23]||(e[23]=m(" 个",-1))])])):p("",!0),t.status==="reused"?(d(),r("div",qe,[...e[25]||(e[25]=[l("span",{class:"detail-label"},"复用方式",-1),l("span",{class:"reuse-msg"},"♻️ 直接使用已有分享链接,无需实际转存",-1)])])):p("",!0)]),l("div",et,[t.share_url?(d(),r("div",tt,[e[26]||(e[26]=l("span",{class:"detail-label"},"分享链接",-1)),l("a",{href:t.share_url,target:"_blank",class:"detail-link"},i(t.share_url),9,at)])):p("",!0),t.share_pwd?(d(),r("div",lt,[e[27]||(e[27]=l("span",{class:"detail-label"},"分享密码",-1)),s(pe,{size:"small",type:"warning"},{default:u(()=>[m(i(t.share_pwd),1)]),_:2},1024)])):p("",!0),t.folder_name?(d(),r("div",st,[e[28]||(e[28]=l("span",{class:"detail-label"},"转存文件夹",-1)),l("code",nt,i(t.folder_name),1)])):p("",!0)]),t.ip_address?(d(),r("div",ot,[l("div",it,[e[29]||(e[29]=l("span",{class:"detail-label"},"IP 地址",-1)),l("code",ut,i(t.ip_address),1)]),t.ip_location?(d(),r("div",dt,[e[30]||(e[30]=l("span",{class:"detail-label"},"归属地",-1)),l("code",rt,i(R(t.ip_location)),1)])):p("",!0)])):p("",!0),t.status==="failed"&&t.error_message?(d(),r("div",ct,[l("div",_t,[e[31]||(e[31]=l("span",{class:"detail-label"},"错误信息",-1)),l("pre",pt,i(t.error_message),1)])])):p("",!0)])]),_:1}),s(h,{label:"序号",width:"68",align:"center"},{default:u(({$index:t})=>[m(i((k.value-1)*C.value+t+1),1)]),_:1}),s(h,{label:"时间",width:"140"},{default:u(({row:t})=>[l("span",{title:t.created_at},i(Z(t.created_at)),9,gt)]),_:1}),s(h,{label:"网盘",width:"70",align:"center"},{default:u(({row:t})=>[s(T,{content:H(t.source_type),placement:"top"},{default:u(()=>[l("img",{src:G(t.source_type),style:{width:"22px",height:"22px",cursor:"default"}},null,8,mt)]),_:2},1032,["content"])]),_:1}),s(h,{label:"状态",width:"72",align:"center"},{default:u(({row:t})=>[s(T,{content:ae(t.status),placement:"top"},{default:u(()=>[l("span",{class:L(["status-badge",le(t.status)])},i(se(t.status)),3)]),_:2},1032,["content"])]),_:1}),s(h,{label:"资源名称","min-width":"160","show-overflow-tooltip":""},{default:u(({row:t})=>[l("span",{title:t.source_title||""},i(t.source_title||"-"),9,vt)]),_:1}),s(h,{label:"耗时",width:"85",align:"center"},{default:u(({row:t})=>[l("span",{class:L(["duration",ee(t.duration_ms)])},i(q(t.duration_ms)),3)]),_:1}),s(h,{label:"归属地","min-width":"130","show-overflow-tooltip":""},{default:u(({row:t})=>[t.ip_location?(d(),r("span",ft,i(R(t.ip_location)),1)):(d(),r("span",ht,"-"))]),_:1}),s(h,{label:"备注","min-width":"200","show-overflow-tooltip":""},{default:u(({row:t})=>[t.status==="failed"&&t.error_message?(d(),r("span",{key:0,class:"err-msg",title:t.error_message},i(te(t.error_message)),9,yt)):t.status==="failed"?(d(),r("span",bt,"失败")):t.status==="reused"?(d(),r("span",kt,"♻️ 复用已有链接")):(d(),r("span",Ct,"-"))]),_:1}),s(h,{label:"操作",width:"80",fixed:"right",align:"center"},{default:u(({row:t})=>[l("div",xt,[s(T,{content:"复制分享链接",placement:"top"},{default:u(()=>[s(x,{size:"small",circle:"",text:"",disabled:!t.share_url,onClick:U=>ue(t.share_url)},{default:u(()=>[s(g,null,{default:u(()=>[s(I(xe))]),_:1})]),_:1},8,["disabled","onClick"])]),_:2},1024),s(T,{content:"打开分享链接",placement:"top"},{default:u(()=>[s(x,{size:"small",circle:"",text:"",disabled:!t.share_url,onClick:U=>de(t.share_url)},{default:u(()=>[s(g,null,{default:u(()=>[s(I(we))]),_:1})]),_:1},8,["disabled","onClick"])]),_:2},1024)])]),_:1})]),_:1},8,["data"])),[[ve,$.value]])]),b.value>0?(d(),r("div",wt,[l("div",Dt," 第 "+i((k.value-1)*C.value+1)+"-"+i(Math.min(k.value*C.value,b.value))+" 条,共 "+i(b.value)+" 条 ",1),s(me,{"current-page":k.value,"onUpdate:currentPage":e[8]||(e[8]=t=>k.value=t),"page-size":C.value,"onUpdate:pageSize":e[9]||(e[9]=t=>C.value=t),total:b.value,"page-sizes":[15,20,30,50,100],layout:"sizes, prev, pager, next, jumper",onCurrentChange:y,onSizeChange:e[10]||(e[10]=t=>y(1))},null,8,["current-page","page-size","total"])])):p("",!0)])}}}),Mt=Ne(Nt,[["__scopeId","data-v-a4822062"]]);export{Mt as default}; diff --git a/source_clean/frontend/assets/SaveRecords-DU_-iTm4.css b/source_clean/frontend/assets/SaveRecords-DU_-iTm4.css new file mode 100644 index 0000000..930609d --- /dev/null +++ b/source_clean/frontend/assets/SaveRecords-DU_-iTm4.css @@ -0,0 +1 @@ +.save-records[data-v-a4822062]{padding:0}.toolbar-row[data-v-a4822062]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px;padding-bottom:16px;flex-wrap:wrap;border-bottom:1px solid var(--el-border-color-light, #ebeef5)}.filter-group[data-v-a4822062]{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.toolbar-actions[data-v-a4822062]{display:flex;align-items:center;gap:12px}.record-count[data-v-a4822062]{font-size:13px;color:var(--text-secondary, #909399);white-space:nowrap}.time-btns[data-v-a4822062]{display:flex;gap:2px;background:var(--el-fill-color-light, #f0f2f5);border-radius:8px;padding:3px}.time-btn[data-v-a4822062]{border:none;background:transparent;padding:6px 14px;border-radius:6px;font-size:13px;color:#606266;cursor:pointer;transition:all .25s ease}.time-btn[data-v-a4822062]:hover{color:var(--el-color-primary);background:#409eff0f}.time-btn.active[data-v-a4822062]{background:linear-gradient(135deg,var(--el-color-primary),var(--el-color-primary-light-3, #79bbff));color:#fff;font-weight:600;box-shadow:0 2px 6px #409eff4d}.save-records[data-v-a4822062] .el-table{border:1px solid var(--el-border-color-light, #ebeef5);border-radius:8px}.save-records .el-table-wrap[data-v-a4822062]{overflow-x:auto}.save-records[data-v-a4822062] .el-table th.el-table__cell{background-color:var(--el-fill-color-light, #f5f7fa);font-weight:600;color:var(--el-text-color-primary, #303133);white-space:nowrap}.save-records[data-v-a4822062] .el-table .el-table__cell{padding:8px;white-space:nowrap!important}.save-records[data-v-a4822062] .el-table .el-table__cell .cell{white-space:nowrap!important}.cell-nowrap[data-v-a4822062]{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.save-records[data-v-a4822062] .el-table__row:hover>.el-table__cell{background-color:var(--el-color-primary-light-9, #ecf5ff)}.save-records[data-v-a4822062] .row-failed>.el-table__cell{background-color:#f56c6c0a}.status-badge[data-v-a4822062]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;font-size:13px;font-weight:700}.status-ok[data-v-a4822062]{background:#67c23a26;color:#67c23a}.status-reuse[data-v-a4822062]{background:#409eff26;color:#409eff}.status-fail[data-v-a4822062]{background:#f56c6c26;color:#f56c6c}.ip-text[data-v-a4822062]{font-family:monospace;font-size:12px}.loc-badge[data-v-a4822062]{display:inline-block;background:linear-gradient(135deg,#e8f4ff,#f0f8ff);color:#1a6ea0;font-size:12px;padding:2px 10px;border-radius:4px;border:1px solid #b8d9f0;white-space:nowrap}.err-msg[data-v-a4822062]{color:var(--el-color-danger);font-size:12px}.reuse-msg[data-v-a4822062]{color:var(--el-color-primary);font-size:12px}.no-data[data-v-a4822062]{color:var(--text-secondary, #c0c4cc)}.duration[data-v-a4822062]{font-size:12px;font-family:monospace}.dur-fast[data-v-a4822062]{color:#67c23a}.dur-warn[data-v-a4822062]{color:#e6a23c}.dur-slow[data-v-a4822062]{color:#f56c6c;font-weight:600}.expand-detail[data-v-a4822062]{padding:16px 24px;background:var(--el-fill-color-lighter, #fafafa);border-radius:6px;display:flex;flex-direction:column;gap:12px}.detail-row[data-v-a4822062]{display:flex;align-items:flex-start;gap:16px 24px;flex-wrap:wrap}.detail-cell[data-v-a4822062]{display:flex;flex-direction:column;gap:4px;flex:none}.detail-cell.detail-full[data-v-a4822062]{flex:1 1 100%}.detail-label[data-v-a4822062]{font-size:12px;color:#909399;font-weight:500}.detail-link[data-v-a4822062]{color:var(--el-color-primary);font-size:13px;word-break:break-all;text-decoration:none}.detail-link[data-v-a4822062]:hover{text-decoration:underline}.detail-code[data-v-a4822062]{font-size:12px;background:#f0f0f0;padding:4px 8px;border-radius:4px;word-break:break-all}.detail-error[data-v-a4822062]{margin:0;font-size:12px;color:#f56c6c;background:#f56c6c14;padding:8px 12px;border-radius:4px;white-space:pre-wrap;word-break:break-word;max-height:120px;overflow-y:auto}.action-cell[data-v-a4822062]{display:flex;align-items:center;justify-content:center;gap:2px}.pagination-wrap[data-v-a4822062]{display:flex;align-items:center;justify-content:space-between;margin-top:20px;padding:12px 16px;background:var(--el-fill-color-light, #f5f7fa);border-radius:8px;flex-wrap:wrap;gap:12px}.pagination-info[data-v-a4822062]{font-size:13px;color:var(--text-secondary, #909399);white-space:nowrap}.save-summary[data-v-a4822062]{display:flex;align-items:center;gap:8px;padding:10px 16px;margin-bottom:8px;background:var(--el-fill-color-light, #f5f7fa);border-radius:8px;font-size:13px;flex-wrap:wrap}.summary-item[data-v-a4822062]{white-space:nowrap}.summary-success strong[data-v-a4822062]{color:#67c23a}.summary-failed strong[data-v-a4822062]{color:#f56c6c}.summary-reused strong[data-v-a4822062]{color:#e6a23c}.summary-rate[data-v-a4822062]{color:#909399}.summary-rate strong[data-v-a4822062]{color:#409eff}.summary-divider[data-v-a4822062]{color:#dcdfe6;font-size:12px;-webkit-user-select:none;user-select:none} diff --git a/source_clean/frontend/assets/SearchResult-An38JvmS.js b/source_clean/frontend/assets/SearchResult-An38JvmS.js new file mode 100644 index 0000000..32ff470 --- /dev/null +++ b/source_clean/frontend/assets/SearchResult-An38JvmS.js @@ -0,0 +1 @@ +import{d as He,o as ys,m as Hs,a as t,c as a,n as fe,b as l,p as Be,t as o,k as Ee,e as u,F as D,r as U,q as ms,h as i,v as C,x as hs,f as h,w as g,g as _s,y as ge,l as x,z as Ws,j as Y,s as zs,A as Us,i as Ns,E as ye,u as Fs,B as Os}from"./index-C5b4pIQL.js";import{b as Ks}from"./browser-JP79f-a9.js";import{C as ks,a as ke}from"./index-Bz21yOih.js";import{_ as We,b as js,s as Gs,c as Xs,d as Ys,q as Zs,e as Js,f as Qs}from"./_plugin-vue_export-helper-CzL5NdOX.js";const et={class:"card-cover"},st=["src","alt"],tt=["src"],at={class:"placeholder-icon"},lt=["src"],nt={key:1},ot={class:"card-body"},it=["title"],ut={class:"card-time"},rt={key:0,class:"meta-size"},ct={key:0,class:"card-tags"},dt={class:"card-bottom-row"},vt={class:"bottom-left"},pt=["title"],ft={class:"bottom-right"},mt=1e4,ht=He({__name:"ResultCard",props:{data:{},fallbackTags:{},fallbackImage:{},loggedIn:{type:Boolean},cloudTypeMap:{}},emits:["save"],setup(m,{emit:ie}){const k=m,R=ie,b=i(!1),G=i(!1),E=i(!1);let I=null;ys(()=>{if(k.data.cover&&!b.value){E.value=!0;const d=new Image;let f=!1;I=setTimeout(()=>{f||(f=!0,E.value=!1)},mt),d.onload=()=>{f||(f=!0,b.value=!0,E.value=!1,I&&clearTimeout(I))},d.onerror=()=>{f||(f=!0,E.value=!1,I&&clearTimeout(I))},d.src=k.data.cover}}),Hs(()=>{I&&clearTimeout(I)});function be(){b.value=!1}function ue(){G.value=!0}const B=C(()=>{var f,M;return((M=(f=k.cloudTypeMap)==null?void 0:f[k.data.cloud_type])==null?void 0:M.icon)||"📁"}),ne=C(()=>({quark:"linear-gradient(135deg, #e8f5e9, #c8e6c9)",baidu:"linear-gradient(135deg, #e3f2fd, #bbdefb)",aliyun:"linear-gradient(135deg, #fff3e0, #ffe0b2)",115:"linear-gradient(135deg, #f3e5f5, #e1bee7)",xunlei:"linear-gradient(135deg, #e8f5e9, #a5d6a7)",magnet:"linear-gradient(135deg, #e8eaf6, #c5cae9)"})[k.data.cloud_type]||"linear-gradient(135deg, #f5f5f5, #e0e0e0)");function re(d){if(!d)return"";const f=Date.now(),M=new Date(d);if(isNaN(M.getTime()))return d.slice(0,10);const K=f-M.getTime();if(K<0)return d.slice(0,10);const S=Math.floor(K/1e3);if(S<60)return"刚刚";const z=Math.floor(S/60);if(z<60)return`${z} 分钟前`;const P=Math.floor(z/60);if(P<24)return`${P} 小时前`;const $=Math.floor(P/24);return $<30?`${$} 天前`:$<365?`${Math.floor($/30)} 个月前`:`${Math.floor($/365)} 年前`}const se=C(()=>re(k.data.update_time||k.data.datetime)),te=C(()=>{const d=k.data.source||"";return d?d.startsWith("tg:")?"@"+d.slice(3):d.startsWith("plugin:")?d.slice(7):d:""}),N=C(()=>{const d=k.data.source||"";return d.startsWith("tg:")?"📢":d.startsWith("plugin:")?"🔌":"📎"}),F=[/^\[夸克网盘\][::]?\s*/,/^【#电影名称:】\s*/,/^【#电影名称[::]】\s*/,/^【[^】]*[网盘|分享|电影|下载|资源]】[::]?\s*/,/^\[[^\]]*[网盘|分享|电影|下载|资源]\]\s*/,/^[##]电影名称[::]?\s*/,/^[##]资源名称[::]?\s*/,/^[##]标题[::]?\s*/,/^【[^】]*资源名称[^】]*】\s*/,/^【影片名称】\s*/,/^【资源名称】\s*/,/^【标题】\s*/],W=C(()=>{let d=k.data.title||"";for(const f of F)d=d.replace(f,"");return d=d.replace(/【[^】]+】/g,"").trim(),d||k.data.title}),L=new Set(["4K","1080P","2160P","720P","480P","HDR","HDR10","HDR10+","DV","杜比视界","杜比全景声","高码率","BluRay","REMUX","HEVC","x264","x265","AVC","内封简繁英字幕","内嵌中英字幕","内封简繁","内嵌字幕","字幕","中文字幕","简繁字幕","中英字幕","内封字幕","臻彩","高清","WEB-DL","WEBRip","蓝光"]),X=[/\b(4K)\b/,/\b(1080[Pp])\b/,/\b(2160[Pp])\b/,/\b(720[Pp])\b/,/\b(HDR10?\+?)\b/i,/\b(DV)\b/i,/\b(BluRay|蓝光)\b/i,/\b(REMUX)\b/i,/\b(HEVC)\b/i,/\b(x264)\b/i,/\b(x265)\b/i,/\b(WEB-DL)\b/i,/\b(WEBRip)\b/i],oe=C(()=>{const d=k.data.title||"",f=[],M=d.matchAll(/【([^】]+)】/g);for(const S of M){const P=S[1].split(/[.·、,,\/\\|]/);for(const $ of P){const Z=$.trim();Z&&L.has(Z)&&!f.includes(Z)&&f.push(Z)}}for(const S of X){const z=d.match(S);if(z){const P=z[1];f.includes(P)||f.push(P)}}const K=["杜比视界","杜比全景声","高码率","内封简繁英字幕","内嵌中英字幕","内封简繁","内嵌字幕","中文字幕","简繁字幕","中英字幕","内封字幕","臻彩"];for(const S of K)d.includes(S)&&!f.includes(S)&&f.push(S);return f.length===0&&k.fallbackTags&&k.fallbackTags.length>0?k.fallbackTags.slice(0,6):f.slice(0,10)});function me(d){return["4K","1080P","2160P","720P","480P","HDR","HDR10","HDR10+","DV","杜比视界","BluRay","REMUX","HEVC","x264","x265","臻彩","高清","WEB-DL","WEBRip"].includes(d)?"quality":d.includes("字幕")||d==="杜比全景声"||d==="高码率"?"subtitle":"default"}function y(){R("save",k.data)}function O(){k.data.share_url&&window.open(k.data.share_url,"_blank")}return(d,f)=>(t(),a("div",{class:fe(["result-card",{clickable:m.loggedIn}]),onClick:f[0]||(f[0]=M=>m.loggedIn&&O())},[l("div",et,[b.value?(t(),a("img",{key:0,src:m.data.cover,alt:m.data.title,onError:be,loading:"lazy",fetchpriority:"low"},null,40,st)):m.fallbackImage&&!G.value?(t(),a("img",{key:1,src:m.fallbackImage,alt:"cover",class:"fallback-img",onError:ue},null,40,tt)):(t(),a("div",{key:2,class:"cover-placeholder",style:Be({background:ne.value})},[l("span",at,[B.value.startsWith("data:")||B.value.startsWith("http")?(t(),a("img",{key:0,src:B.value,style:{width:"36px",height:"36px"}},null,8,lt)):(t(),a("span",nt,o(B.value),1))])],4)),l("span",{class:"cover-tag",style:Be({background:Ee(ks)[m.data.cloud_type]})},o(Ee(ke)[m.data.cloud_type]),5)]),l("div",ot,[l("div",{class:"card-title",title:m.data.title},o(W.value),9,it),l("div",ut,[l("span",null,"🕐 "+o(se.value),1),m.data.file_size?(t(),a("span",rt,"📦 "+o(m.data.file_size),1)):u("",!0)]),oe.value.length>0?(t(),a("div",ct,[(t(!0),a(D,null,U(oe.value,(M,K)=>(t(),a("span",{key:K,class:fe(["tag","tag-"+me(M)])},o(M),3))),128))])):u("",!0),l("div",dt,[l("div",vt,[te.value?(t(),a("span",{key:0,class:"meta-source",title:m.data.source},o(N.value)+" "+o(te.value),9,pt)):u("",!0)]),l("div",ft,[m.data.share_url&&!m.loggedIn?(t(),a("button",{key:0,class:"action-btn get-link-btn",onClick:ms(y,["stop"])}," 🔗 获取分享链接 ")):u("",!0),m.data.share_url&&m.loggedIn?(t(),a("button",{key:1,class:"action-btn open-link-btn",onClick:ms(O,["stop"])}," 🔗 打开链接 ")):u("",!0)])])])],2))}}),gs=We(ht,[["__scopeId","data-v-f6a62a8e"]]),_t={class:"video-card"},gt={class:"video-cover"},yt=["src","alt"],kt={class:"platform-tag"},bt={class:"video-info"},wt={key:0,class:"video-author"},Ct={key:1,class:"video-desc"},Tt=He({__name:"VideoResultCard",props:{data:{}},emits:["save"],setup(m,{emit:ie}){const k=m,R=ie;function b(){R("save",k.data)}return(G,E)=>(t(),a("div",_t,[l("div",gt,[l("img",{src:m.data.cover,alt:m.data.title},null,8,yt),E[0]||(E[0]=l("div",{class:"play-icon"},"▶",-1)),l("span",kt,o(m.data.platform),1)]),l("div",bt,[l("h4",null,o(m.data.title),1),m.data.author?(t(),a("p",wt,"👤 "+o(m.data.author),1)):u("",!0),m.data.description?(t(),a("p",Ct,o(m.data.description),1)):u("",!0)]),l("div",{class:"video-actions"},[l("button",{class:"save-btn",onClick:b},"📥 保存到云盘并获取下载链接")])]))}}),Rt=We(Tt,[["__scopeId","data-v-c6df203e"]]),It={class:"search-result-page"},Mt={class:"top-search-bar"},xt={class:"search-bar-inner"},Et=["src","alt"],$t={key:1,class:"logo-text-only"},qt={key:2,class:"logo-icon"},Vt={class:"search-box-inner"},Dt={class:"top-right-user"},Lt={class:"user-badge"},St={key:0,class:"marquee-bar"},Pt={class:"marquee-track"},At={class:"marquee-text"},Bt={class:"result-content"},Ht={key:0,class:"result-info-bar"},Wt={class:"info-left"},zt={key:0,class:"info-item info-count"},Ut={key:1,class:"info-item info-type"},Nt={key:2,class:"filter-badge"},Ft={key:3,class:"skip-badge"},Ot={class:"info-right"},Kt={key:0,class:"info-item info-time"},jt={key:1,class:"info-hasmore"},Gt={key:1,class:"loading-section"},Xt={class:"progress-track"},Yt={class:"progress-label"},Zt={key:0},Jt={key:1},Qt={key:0,class:"validate-count"},ea={key:2},sa={class:"progress-time"},ta={key:2,class:"cloud-tabs"},aa=["onClick"],la=["src"],na={key:1,class:"tab-icon"},oa={key:2,class:"tab-count"},ia={key:3,class:"media-strip"},ua=["href"],ra={key:0,class:"strip-thumb"},ca=["src"],da={key:1,class:"strip-thumb strip-thumb-fallback"},va={class:"strip-title"},pa={key:2,class:"strip-year"},fa={key:3,class:"strip-rating"},ma={key:4,class:"strip-genres"},ha={key:5,class:"strip-tags"},_a={key:1,class:"media-strip-inner"},ga={key:0,class:"strip-thumb"},ya=["src"],ka={key:1,class:"strip-thumb strip-thumb-fallback"},ba={class:"strip-title"},wa={key:2,class:"strip-year"},Ca={key:3,class:"strip-rating"},Ta={key:4,class:"strip-genres"},Ra={key:5,class:"strip-tags"},Ia={key:0,class:"result-list flat-list"},Ma={key:0,class:"load-more-inline"},xa={key:1,class:"result-list channel-list"},Ea={class:"channel-header"},$a=["src"],qa={key:1,class:"channel-icon"},Va={class:"channel-label"},Da={class:"channel-total-badge"},La={key:2,class:"channel-time"},Sa=["onClick"],Pa={class:"channel-load-more-text"},Aa={key:2,class:"no-match-tip"},Ba={key:5,class:"result-list"},Ha={key:6,class:"empty-wrapper"},Wa={class:"empty-hint"},za={key:0,class:"empty-tips"},Ua={key:7,class:"load-more"},Na={class:"dialog-title-bold"},Fa={class:"result-dialog-content"},Oa={key:0,class:"progress-flow"},Ka={class:"step-dot"},ja={key:0,class:"step-check"},Ga={key:1,class:"step-num"},Xa={class:"step-body"},Ya={class:"step-title"},Za={key:0,class:"step-status loading"},Ja={key:1,class:"step-status done"},Qa={class:"step-dot"},el={key:0,class:"step-check"},sl={key:1,class:"step-num"},tl={class:"step-body"},al={key:0,class:"step-status loading"},ll={key:1,class:"step-status done"},nl={key:2,class:"step-status pending"},ol={class:"step-dot"},il={key:0,class:"step-check"},ul={key:1,class:"step-num"},rl={class:"step-body"},cl={key:0,class:"step-status loading"},dl={key:1,class:"step-status done"},vl={key:2,class:"step-status pending"},pl={key:1,class:"save-error"},fl={key:2,class:"rename-info-bar"},ml={style:{"font-size":"13px"}},hl={key:3,class:"share-result"},_l={class:"share-layout"},gl={class:"qr-left"},yl={class:"qr-hint"},kl={class:"link-right"},bl={class:"success-header"},wl={class:"success-text"},Cl={class:"link-row"},Tl={key:0,class:"share-pwd-row"},Rl={class:"share-tip"},Il={class:"share-tip-text"},Ml={class:"dialog-actions"},xl={key:0,class:"login-error"},El={key:0,class:"site-footer"},$l={class:"footer-inner"},ql={class:"footer-actions"},Ae=30,xe=20,Vl=He({__name:"SearchResult",setup(m){const ie=Ws(),k=Fs(),R=i(""),b=i(!1),G=i(!1),E=i(null),I=i([]),be=i([]),ue=i([]),B=i([]),ne=i(0),re=i(0),se=i(!1),te=i(1),N=i(0),F=i(0),W=i(""),L=i(0),X=i("search"),oe=i(0),me=i(0),y=i(null),O=i([]),d=C(()=>f.value||M.value||""),f=i(""),M=i(""),K=i(""),S=i(""),z=i(""),P=i(!1),$=i(null),Z=i(!1),ze=i(),J=Ns({username:"",password:""}),$e=i(!1),we=i(""),bs={username:[{required:!0,message:"请输入用户名",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]},qe=i(new Map),Ve=i([]),he=i(Ae),ce=i({}),Ce=i({});function Ue(s){var e;return((e=Ce.value[s])==null?void 0:e.icon)||"📁"}async function ws(){try{const s=await Xs(),e={};for(const v of s.types)e[v.type]={label:v.label,icon:v.icon};Ce.value=e}catch{}}ys(async()=>{const s=ie.query.q||"";s&&(R.value=s,Me(s));const e=await js().catch(()=>({loggedIn:!1}));e.loggedIn&&e.username&&($.value={username:e.username}),ws()});async function Ne(){var e,v,c;if(await((e=ze.value)==null?void 0:e.validate().catch(()=>!1))){$e.value=!0,we.value="";try{const r=await Ys(J.username,J.password);localStorage.setItem("admin_token",r.token),$.value={username:J.username},Z.value=!1,J.password="",ye.success("登录成功")}catch(r){we.value=((c=(v=r==null?void 0:r.response)==null?void 0:v.data)==null?void 0:c.error)||(r==null?void 0:r.message)||"登录失败"}finally{$e.value=!1}}}function Cs(){localStorage.removeItem("admin_token"),$.value=null,ye.success("已退出")}const De=C(()=>{const s={};for(const _ of I.value){const H=_.cloud_type||"others";s[H]=(s[H]||0)+1}const e=[];e.push({type:"",label:"全部",count:I.value.length,icon:"📋"});const v={quark:1,baidu:2,aliyun:3,115:4,tianyi:5,"123pan":6,uc:7,xunlei:8,pikpak:9,magnet:10,ed2k:11,others:12},r=Object.keys(ke).sort((_,H)=>(v[_]??99)-(v[H]??99));for(const _ of r)e.push({type:_,label:ke[_],count:s[_]||0,icon:Ue(_)});return e}),Fe=C(()=>De.value.filter(s=>s.count>0));function Ts(){const s=De.value.find(e=>e.type===W.value);return(s==null?void 0:s.label)||W.value||""}const Le=C(()=>{const s=[];for(const e of B.value)s.push(...e.items);return s.sort((e,v)=>{const c=e.update_time||e.datetime||"",r=v.update_time||v.datetime||"";return!c&&!r?0:c?r?r.localeCompare(c):-1:1})}),Oe=C(()=>Le.value.slice(0,he.value)),Rs=C(()=>he.value{const s=R.value.trim();return s?s.length<2?`「${s}」太短了,试试输入更完整的关键词`:s.length>30?"关键词太长啦,试试用几个核心词代替整句话":(s.match(/[\u4e00-\u9fff]/g)||[]).length===0?"网盘资源通常以中文命名,试试用中文搜索":`「${s}」暂时没找到匹配的资源`:"请输入关键词进行搜索"}),Ke=C(()=>{const s=R.value.trim();if(!s)return["输入电视剧/电影/文件名称试试"];const e=[];s.length<2&&e.push("输入至少 2 个字符,试试完整的资源名称"),s.length>30&&e.push("缩短到 2-10 个字,用核心关键词搜索更精准");const v=(s.match(/[\u4e00-\u9fff]/g)||[]).length;return v===0&&e.push("国内网盘资源标题大多是中文,试试转换为中文名称"),v>0&&v=2&&e.push("混合了太多非中文字符,提取核心中文关键词试试"),(s.includes(" ")||s.includes(" "))&&e.push("搜索词中包含了空格,试试去掉空格连续输入"),["的","了","是","在","有","我","他","她","它","这","那","和","与","及","或","但","而","且"].filter(H=>s.includes(H)).length>=2&&s.length>6&&e.push("看起来像是一句话,试着只保留资源核心名称(去掉「的」「了」「我」等词)"),(s.match(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~`《》【】!@#¥%……&*()——+|]/g)||[]).length>2&&e.push("特殊符号过多,试试只用中英文和数字"),s.length===1&&v===1&&e.push("单个汉字过于宽泛,试试完整的剧名或文件名"),e.length===0&&(e.push("试试更换关键词或减短搜索词"),e.push("检查一下是否输入了正确的资源名称")),e.slice(0,4)});function Ms(){he.value+=Ae}function je(s){const e=ce.value[s.cloud_type]||xe;return(s.items||[]).slice(0,e)}function xs(s){const e=ce.value[s.cloud_type]||xe;return(s.items||[]).length>e}function Es(s){ce.value={...ce.value,[s]:(ce.value[s]||xe)+xe}}function $s(){ce.value={}}const Ge=C(()=>{let s=B.value;return W.value&&(s=s.filter(e=>e.cloud_type===W.value)),s}),qs=C(()=>N.value<=0?1:Math.ceil(N.value/20)),Xe=C(()=>De.value.filter(s=>s.type!==""&&s.count>0).length);function Vs(){R.value.trim()&&Me(R.value.trim())}function Ds(){L.value=0,X.value="search";const s=Date.now();F.value=0;const e=setInterval(()=>{if(!b.value){L.value=100,clearInterval(e);return}F.value=Date.now()-s,L.value<60?L.value+=1+Math.random()*3:L.value<85?(X.value="validate",L.value+=.5+Math.random()*1):L.value<98&&(L.value+=.2+Math.random()*.5)},200);return e}function Se(s){const e=s.map(v=>v.update_time||v.datetime||"").filter(Boolean).sort().reverse();return e.length===0?"":Ls(e[0])}function Ls(s){if(!s)return"";const e=Date.now(),v=new Date(s);if(isNaN(v.getTime()))return s.slice(0,10);const c=e-v.getTime();if(c<0)return s.slice(0,10);const r=Math.floor(c/6e4);if(r<60)return r<=1?"刚刚":`${r} 分钟前`;const _=Math.floor(r/60);if(_<24)return`${_} 小时前`;const H=Math.floor(_/24);return H<30?`${H} 天前`:`${Math.floor(H/30)} 个月前`}function Te(s){return Ue(s)}hs(()=>ie.query.q,s=>{s&&s!==R.value&&(R.value=s,Me(s))});const de=i(!1),Re=i(null),ve=i(!1),Q=i(!1),ae=i(null),j=i(""),_e=i(""),pe=i([]),Pe=i(null),T=i(0),Ie=C(()=>{var e;const s=((e=Re.value)==null?void 0:e.cloud_type)||"quark";return ke[s]||"夸克网盘"}),Ss=C(()=>{var v;const s=((v=Re.value)==null?void 0:v.title)||"";return s.replace(/【[^】]+】/g,"").trim()||s||"资源"});async function Me(s){b.value=!0;const e=Date.now();he.value=Ae,te.value=1,I.value=[],be.value=[],ue.value=[],B.value=[],Ve.value=[],qe.value=new Map,ne.value=0,re.value=0,se.value=!1,W.value="",F.value=0,P.value=!1,z.value="",$s();const v=Ds();try{E.value="SEARCH";let c=0,r=0;const _=new Map;let H=!1;await Gs(s,{onStats:p=>{if(F.value=Date.now()-e,N.value=p.total,y.value=p.content_info||null,O.value=p.content_tags||[],p.fallback_image){f.value=p.fallback_image;const q=new Image;q.onload=()=>{},q.onerror=()=>{f.value=""},q.src=p.fallback_image}if(p.site_logo&&(M.value=p.site_logo),p.site_name&&(K.value=p.site_name),p.site_disclaimer&&(S.value=p.site_disclaimer),p.site_marquee&&(z.value=p.site_marquee),X.value="validate",p.channels){const q=new Map,A=[];for(const w of p.channels)for(const ee of w.items||[])q.set(ee.id,ee),A.push(ee);qe.value=q,ue.value=A}p.link_validation&&(oe.value=p.total)},onResult:(p,q)=>{if(c++,me.value=c,F.value=Date.now()-e,q){const A=qe.value.get(p);A&&(Ve.value.push(A),I.value=[...Ve.value],B.value=Ye(I.value).map(w=>({...w,newestTime:Se(w.items)})))}},onComplete:p=>{F.value=Date.now()-e;const q=p.results||[];N.value=q.length,ne.value=p.filtered||0,re.value=p.skipped||0,se.value=!1,me.value=oe.value,I.value=q,B.value=(p.channels||[]).map(w=>({...w,newestTime:Se(w.items)}));const A={};for(const w of q){const ee=w.cloud_type||"others";A[ee]||(A[ee]=[]),A[ee].push(w)}B.value=B.value.map(w=>({...w,count:(A[w.cloud_type]||[]).length,items:A[w.cloud_type]||[]})).filter(w=>w.count>0),ue.value=q,b.value=!1,X.value="done",L.value=100,clearInterval(v)},onError:p=>{console.error("搜索失败",p),b.value=!1,X.value="done",L.value=100,clearInterval(v)}})}catch(c){console.error("搜索异常",c),b.value=!1,X.value="done",L.value=100,clearInterval(v)}}function Ye(s){const e={},v={quark:1,baidu:2,aliyun:3,115:4,tianyi:5,"123pan":6,uc:7,xunlei:8,pikpak:9,magnet:10,ed2k:11,others:12};for(const c of s){const r=c.cloud_type||"others";e[r]||(e[r]=[]),e[r].push(c)}return Object.entries(e).sort((c,r)=>(v[c[0]]??99)-(v[r[0]]??99)).map(([c,r])=>({cloud_type:c,label:ke[c]||c,color:ks[c]||"#95a5a6",count:r.length,items:r,newestTime:Se(r)}))}async function Ze(){G.value=!0,te.value++;try{const s=await Zs(R.value,te.value),e=s.results;I.value.push(...e),N.value=s.total,se.value=s.total>I.value.length,ne.value+=s.filtered||0,B.value=Ye(I.value)}catch(s){console.error("加载更多失败",s)}finally{G.value=!1}}function Je(){const s=R.value.trim();s&&(k.replace("/search?q="+encodeURIComponent(s)),Me(s))}async function Qe(s){var v;Re.value=s,Q.value=!1,ae.value=null,j.value="",_e.value="",pe.value=[],de.value=!0,ve.value=!0,T.value=1;const e=s.cloud_type||"quark";try{const c=await Js({type:"search",source:s,target_cloud:e});ae.value=c,Q.value=c.success,c.success&&(((v=c.renamed)==null?void 0:v.length)>0&&(pe.value=c.renamed),T.value=2,await new Promise(r=>setTimeout(r,600)),T.value=3,await new Promise(r=>setTimeout(r,400)),c.share_url&&(j.value=c.share_url,_e.value=c.share_pwd||c.sharePwd||"",await new Promise(r=>setTimeout(r,300))),T.value=4)}catch(c){ae.value={success:!1,share_url:"",file_name:"",file_size:"",message:c.message||"保存请求失败"},Q.value=!1}finally{de.value=!1}}async function Ps(s){Re.value=s,Q.value=!1,ae.value=null,j.value="",_e.value="",pe.value=[],de.value=!0,ve.value=!0;try{const e=await Qs({video_url:s.video_url,title:s.title,target_cloud:"quark"});ae.value=e,Q.value=e.success,e.success&&e.share_url&&(j.value=e.share_url)}catch(e){ae.value={success:!1,share_url:"",file_name:"",file_size:"",message:e.message||"保存请求失败"},Q.value=!1}finally{de.value=!1}}hs([j,de],async([s,e])=>{s&&!e&&ve.value&&(await Os(),Pe.value&&Ks.toCanvas(Pe.value,s,{width:180,margin:1}))});function As(){if(!j.value)return;const s=j.value;navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(s).then(()=>{ye.success("链接已复制")}).catch(()=>{ss(s)}):ss(s)}function es(){window.open("/disclaimer/","_blank")}function ss(s){const e=document.createElement("textarea");e.value=s,e.style.position="fixed",e.style.left="-9999px",e.style.top="-9999px",e.style.opacity="0",document.body.appendChild(e),e.select();try{document.execCommand("copy"),ye.success("链接已复制")}catch{ye.warning("复制失败,请手动复制链接")}document.body.removeChild(e)}return(s,e)=>{var ts,as,ls,ns,os,is,us,rs,cs,ds,vs,ps,fs;const v=Y("router-link"),c=Y("el-icon"),r=Y("el-input"),_=Y("el-button"),H=Y("el-skeleton"),p=Y("el-alert"),q=Y("el-tag"),A=Y("el-dialog"),w=Y("el-form-item"),ee=Y("el-form");return t(),a(D,null,[l("div",It,[l("div",Mt,[l("div",xt,[h(v,{to:"/",class:"logo-link",title:"返回首页"},{default:g(()=>[M.value?(t(),a("img",{key:0,src:M.value,alt:K.value||"首页",class:"logo-img",onError:e[0]||(e[0]=n=>n.target.style.display="none")},null,40,Et)):K.value?(t(),a("div",$t,o(K.value),1)):(t(),a("div",qt,[...e[11]||(e[11]=[l("svg",{viewBox:"0 0 28 28",width:"28",height:"28",fill:"none"},[l("circle",{cx:"14",cy:"14",r:"13",stroke:"var(--primary-color)","stroke-width":"2"}),l("path",{d:"M8 14l4 4 8-8",stroke:"var(--primary-color)","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]))]),_:1}),l("div",Vt,[h(r,{modelValue:R.value,"onUpdate:modelValue":e[1]||(e[1]=n=>R.value=n),placeholder:"搜索网盘资源,或粘贴视频/网盘链接...",size:"large",clearable:"",onKeyup:_s(Je,["enter"])},{prefix:g(()=>[h(c,null,{default:g(()=>[h(Ee(zs))]),_:1})]),_:1},8,["modelValue"]),h(_,{type:"primary",size:"large",onClick:Je,class:"result-search-btn"},{default:g(()=>[...e[12]||(e[12]=[x("搜 索",-1)])]),_:1})])]),l("div",Dt,[$.value?(t(),a(D,{key:0},[l("span",Lt,o($.value.username),1),h(_,{size:"small",text:"",onClick:Cs},{default:g(()=>[...e[13]||(e[13]=[x("退出",-1)])]),_:1})],64)):(t(),ge(_,{key:1,size:"small",onClick:e[2]||(e[2]=n=>Z.value=!0)},{default:g(()=>[...e[14]||(e[14]=[x("登录",-1)])]),_:1}))])]),z.value?(t(),a("div",St,[e[15]||(e[15]=l("span",{class:"marquee-icon marquee-icon-left"},"📢",-1)),l("div",Pt,[l("span",At,o(z.value),1)]),e[16]||(e[16]=l("span",{class:"marquee-icon marquee-icon-right"},"📢",-1))])):u("",!0),l("div",Bt,[E.value==="SEARCH"&&!b.value?(t(),a("div",Ht,[l("div",Wt,[N.value>0?(t(),a("span",zt,"已为您挑选到最符合 "+o(N.value)+" 条结果",1)):u("",!0),Xe.value>0?(t(),a("span",Ut,"📂 "+o(Xe.value)+" 个网盘",1)):u("",!0),ne.value>0?(t(),a("span",Nt,"❌ 失效 "+o(ne.value),1)):u("",!0),re.value>0?(t(),a("span",Ft,"⏭ 跳过 "+o(re.value),1)):u("",!0)]),l("div",Ot,[F.value>0?(t(),a("span",Kt,"⏱ "+o(F.value)+"ms",1)):u("",!0),se.value?(t(),a("span",jt,"📄 第 "+o(te.value)+" 页",1)):u("",!0),l("button",{class:"refresh-btn",onClick:Vs,title:"强制刷新"},"🔄 刷新")])])):u("",!0),b.value?(t(),a("div",Gt,[l("div",Xt,[l("div",{class:"progress-bar",style:Be({width:L.value+"%"})},null,4)]),l("div",Yt,[X.value==="search"?(t(),a("span",Zt,"🔍 正在搜索中...")):X.value==="validate"?(t(),a("span",Jt,[e[17]||(e[17]=x(" ✅ 正在验证链接有效性 ",-1)),oe.value>0?(t(),a("span",Qt," ("+o(me.value)+" / "+o(oe.value)+") ",1)):u("",!0)])):(t(),a("span",ea,"⏳ 加载中...")),l("span",sa,"⏱ "+o(F.value)+"ms",1)]),h(H,{rows:3,animated:"",class:"loading-skeleton"})])):u("",!0),E.value==="SEARCH"&&Fe.value.length>0&&!b.value?(t(),a("div",ta,[(t(!0),a(D,null,U(Fe.value,n=>(t(),a("div",{key:n.type||"all",class:fe(["cloud-tab",{active:W.value===(n.type||"")}]),onClick:V=>W.value=n.type||""},[n.icon&&(n.icon.startsWith("data:")||n.icon.startsWith("http"))?(t(),a("img",{key:0,src:n.icon,class:"tab-icon-img"},null,8,la)):n.icon?(t(),a("span",na,o(n.icon),1)):u("",!0),x(" "+o(n.label)+" ",1),n.count>0?(t(),a("span",oa,o(n.count),1)):u("",!0)],10,aa))),128))])):u("",!0),!b.value&&(y.value||O.value.length>0)&&E.value==="SEARCH"?(t(),a("div",ia,[(ts=y.value)!=null&&ts.tmdb_url?(t(),a("a",{key:0,href:y.value.tmdb_url,target:"_blank",class:"media-strip-inner",rel:"noopener"},[(as=y.value)!=null&&as.cover&&!P.value?(t(),a("span",ra,[l("img",{src:y.value.cover,onError:e[3]||(e[3]=n=>P.value=!0)},null,40,ca)])):(t(),a("span",da,"🎬")),l("span",va,o(((ls=y.value)==null?void 0:ls.title)||R.value),1),(ns=y.value)!=null&&ns.year?(t(),a("span",pa,o(y.value.year),1)):u("",!0),(os=y.value)!=null&&os.rating?(t(),a("span",fa,"⭐ "+o(y.value.rating),1)):u("",!0),(us=(is=y.value)==null?void 0:is.genres)!=null&&us.length?(t(),a("span",ma,[(t(!0),a(D,null,U(y.value.genres.slice(0,3),(n,V)=>(t(),a("span",{key:V,class:"strip-genre"},o(n),1))),128))])):u("",!0),O.value.length>0?(t(),a("span",ha,[(t(!0),a(D,null,U(O.value.slice(0,3),n=>(t(),a("span",{key:n,class:"strip-tag"},o(n),1))),128))])):u("",!0),e[18]||(e[18]=l("span",{class:"strip-right"},"信息来源 TMDB · 更多详情 →",-1))],8,ua)):(t(),a("div",_a,[(rs=y.value)!=null&&rs.cover&&!P.value?(t(),a("span",ga,[l("img",{src:y.value.cover,onError:e[4]||(e[4]=n=>P.value=!0)},null,40,ya)])):(t(),a("span",ka,"🎬")),l("span",ba,o(((cs=y.value)==null?void 0:cs.title)||R.value),1),(ds=y.value)!=null&&ds.year?(t(),a("span",wa,o(y.value.year),1)):u("",!0),(vs=y.value)!=null&&vs.rating?(t(),a("span",Ca,"⭐ "+o(y.value.rating),1)):u("",!0),(fs=(ps=y.value)==null?void 0:ps.genres)!=null&&fs.length?(t(),a("span",Ta,[(t(!0),a(D,null,U(y.value.genres.slice(0,3),(n,V)=>(t(),a("span",{key:V,class:"strip-genre"},o(n),1))),128))])):u("",!0),O.value.length>0?(t(),a("span",Ra,[(t(!0),a(D,null,U(O.value.slice(0,3),n=>(t(),a("span",{key:n,class:"strip-tag"},o(n),1))),128))])):u("",!0),e[19]||(e[19]=l("span",{class:"strip-right"},"信息来源 TMDB · 更多详情 →",-1))]))])):u("",!0),!b.value&&E.value==="SEARCH"?(t(),a(D,{key:4},[!W.value&&Oe.value.length>0?(t(),a("div",Ia,[(t(!0),a(D,null,U(Oe.value,(n,V)=>(t(),ge(gs,{key:"flat-"+V,data:n,fallbackTags:O.value,fallbackImage:d.value,loggedIn:$.value!==null,cloudTypeMap:Ce.value,onSave:Qe},null,8,["data","fallbackTags","fallbackImage","loggedIn","cloudTypeMap"]))),128)),Rs.value?(t(),a("div",Ma,[h(_,{onClick:Ms,loading:G.value,class:"load-more-btn"},{default:g(()=>[x(" 加载更多 (已显示 "+o(he.value)+" / "+o(Le.value.length)+") ",1)]),_:1},8,["loading"])])):u("",!0)])):W.value&&Ge.value.length>0?(t(),a("div",xa,[(t(!0),a(D,null,U(Ge.value,(n,V)=>(t(),a("div",{key:"ch-"+n.cloud_type,class:"channel-section"},[l("span",Ea,[Te(n.cloud_type).startsWith("data:")||Te(n.cloud_type).startsWith("http")?(t(),a("img",{key:0,src:Te(n.cloud_type),class:"channel-icon-img"},null,8,$a)):(t(),a("span",qa,o(Te(n.cloud_type)),1)),l("span",Va,o(n.label),1),l("span",Da,o(n.count)+" 条资源",1),n.newestTime?(t(),a("span",La,"🕐 "+o(n.newestTime),1)):u("",!0)]),(t(!0),a(D,null,U(je(n),(le,Bs)=>(t(),ge(gs,{key:"ch-"+V+"-"+Bs,data:le,fallbackTags:O.value,fallbackImage:d.value,loggedIn:$.value!==null,cloudTypeMap:Ce.value,onSave:Qe},null,8,["data","fallbackTags","fallbackImage","loggedIn","cloudTypeMap"]))),128)),xs(n)?(t(),a("div",{key:0,class:"channel-load-more",onClick:le=>Es(n.cloud_type)},[l("span",Pa," 展开更多 (已显示 "+o(je(n).length)+" / "+o(n.count)+") ",1)],8,Sa)):u("",!0)]))),128))])):N.value>0&&W.value?(t(),a("div",Aa,[l("span",null,"当前页暂无「"+o(Ts())+"」资源",1),se.value?(t(),ge(_,{key:0,size:"small",onClick:Ze,loading:G.value},{default:g(()=>[...e[20]||(e[20]=[x(" 加载更多试试 ",-1)])]),_:1},8,["loading"])):u("",!0)])):u("",!0)],64)):!b.value&&E.value==="VIDEO_PARSE"?(t(),a("div",Ba,[(t(!0),a(D,null,U(be.value,(n,V)=>(t(),ge(Rt,{key:V,data:n,onSave:Ps},null,8,["data"]))),128))])):u("",!0),!b.value&&!G.value&&N.value===0&&ue.value.length===0?(t(),a("div",Ha,[e[21]||(e[21]=l("div",{class:"empty-icon"},"🔍",-1)),e[22]||(e[22]=l("div",{class:"empty-title"},"没有找到相关资源",-1)),l("div",Wa,o(Is.value),1),Ke.value.length>0?(t(),a("div",za,[(t(!0),a(D,null,U(Ke.value,(n,V)=>(t(),a("div",{key:V,class:"empty-tip-item"},"💡 "+o(n),1))),128))])):u("",!0)])):u("",!0),se.value&&E.value==="SEARCH"&&!b.value?(t(),a("div",Ua,[h(_,{loading:G.value,onClick:Ze},{default:g(()=>[x("加载更多 ("+o(te.value)+"/"+o(qs.value)+")",1)]),_:1},8,["loading"])])):u("",!0)]),h(A,{modelValue:ve.value,"onUpdate:modelValue":e[7]||(e[7]=n=>ve.value=n),width:"650px","close-on-click-modal":!1,class:"save-dialog"},{header:g(()=>[l("strong",Na,o(Ss.value),1)]),default:g(()=>{var n,V;return[l("div",Fa,[de.value?(t(),a("div",Oa,[l("div",{class:fe(["progress-step",{active:T.value>=1,done:T.value>1}])},[l("div",Ka,[T.value>1?(t(),a("span",ja,"✓")):(t(),a("span",Ga,"1"))]),l("div",Xa,[l("span",Ya,"正在转存到"+o(Ie.value)+"...",1),T.value===1?(t(),a("span",Za,"进行中")):(t(),a("span",Ja,"已完成"))])],2),l("div",{class:fe(["progress-step",{active:T.value>=2,done:T.value>2}])},[l("div",Qa,[T.value>2?(t(),a("span",el,"✓")):(t(),a("span",sl,"2"))]),l("div",tl,[e[23]||(e[23]=l("span",{class:"step-title"},"正在重命名文件(防和谐)...",-1)),T.value===2?(t(),a("span",al,"进行中")):T.value>2?(t(),a("span",ll,"已完成")):(t(),a("span",nl,"等待中"))])],2),l("div",{class:fe(["progress-step",{active:T.value>=3,done:T.value>3}])},[l("div",ol,[T.value>3?(t(),a("span",il,"✓")):(t(),a("span",ul,"3"))]),l("div",rl,[e[24]||(e[24]=l("span",{class:"step-title"},"正在生成分享链接...",-1)),T.value===3?(t(),a("span",cl,"进行中")):T.value>3?(t(),a("span",dl,"已完成")):(t(),a("span",vl,"等待中"))])],2)])):Q.value?u("",!0):(t(),a("div",pl,[h(p,{type:"error",title:((n=ae.value)==null?void 0:n.message)||((V=ae.value)==null?void 0:V.error)||"保存失败","show-icon":"",closable:!1},null,8,["title"])])),Q.value&&pe.value.length>0&&j.value?(t(),a("div",fl,[h(p,{type:"warning",closable:!1,"show-icon":""},{title:g(()=>[l("span",ml,"已对 "+o(pe.value.length)+" 个文件执行防和谐重命名",1)]),default:g(()=>[(t(!0),a(D,null,U(pe.value,le=>(t(),a("div",{key:le,class:"rename-item"},o(le),1))),128))]),_:1})])):u("",!0),Q.value&&j.value?(t(),a("div",hl,[l("div",_l,[l("div",gl,[l("canvas",{ref_key:"qrCanvasRef",ref:Pe,class:"qr-canvas"},null,512),l("p",yl,o(Ie.value)+"APP扫码转存",1),e[25]||(e[25]=l("p",{class:"qr-subhint"},"保存到你自己网盘",-1)),e[26]||(e[26]=l("div",{class:"qr-disclaimer-short"},[l("span",null,"⚠️ 本站资源仅供学习交流,请于24h内删除")],-1))]),l("div",kl,[l("div",bl,[h(c,{class:"success-icon",size:20,color:"#67c23a"},{default:g(()=>[h(Ee(Us))]),_:1}),l("span",wl,[x("【"+o(Ie.value)+"】",1),e[27]||(e[27]=l("strong",null,"分享链接已生成!",-1))])]),l("div",Cl,[h(r,{modelValue:j.value,"onUpdate:modelValue":e[5]||(e[5]=le=>j.value=le),readonly:"",class:"share-input"},null,8,["modelValue"])]),_e.value?(t(),a("div",Tl,[e[28]||(e[28]=l("span",{class:"pwd-label"},"🔑 提取密码:",-1)),h(q,{type:"warning"},{default:g(()=>[x(o(_e.value),1)]),_:1}),e[29]||(e[29]=l("span",{class:"pwd-hint"},"打开链接后需输入密码",-1))])):u("",!0),l("div",Rl,[e[34]||(e[34]=l("span",{class:"share-tip-warn"},"⚠️",-1)),l("div",Il,[e[30]||(e[30]=l("strong",null,"请尽快复制链接到浏览器打开",-1)),e[31]||(e[31]=x(" 或 ",-1)),l("strong",null,"用"+o(Ie.value)+"APP扫码",1),e[32]||(e[32]=l("br",null,null,-1)),e[33]||(e[33]=l("strong",null,"转存至您的网盘,以免资源被官方和谐",-1))])]),e[38]||(e[38]=l("div",{class:"warnings-box"},[l("p",{class:"warning-item"},"郑重警告一:网盘内除您所需资源外,不要打开任何不相关内容。"),l("p",{class:"warning-item"},"郑重警告二:网盘内除您所需资源外,不要打开任何不相关内容。"),l("p",{class:"warning-item"},"郑重警告三:网盘内除您所需资源外,不要打开任何不相关内容。"),l("p",{class:"warning-item"},"郑重警告四:以上警告说三遍,你还要明知故犯吗?")],-1)),l("div",Ml,[h(_,{class:"disclaimer-btn",onClick:es},{default:g(()=>[...e[35]||(e[35]=[x("📜 免责声明",-1)])]),_:1}),h(_,{onClick:e[6]||(e[6]=le=>ve.value=!1)},{default:g(()=>[...e[36]||(e[36]=[x("关闭",-1)])]),_:1}),h(_,{type:"primary",onClick:As},{default:g(()=>[...e[37]||(e[37]=[x("一键复制链接",-1)])]),_:1})])])])])):u("",!0)])]}),_:1},8,["modelValue"])]),h(A,{modelValue:Z.value,"onUpdate:modelValue":e[10]||(e[10]=n=>Z.value=n),title:"登录",width:"380px","close-on-click-modal":!1,top:"25vh"},{default:g(()=>[h(ee,{ref_key:"loginFormRef",ref:ze,model:J,rules:bs,"label-width":"0",onKeyup:_s(Ne,["enter"])},{default:g(()=>[h(w,{prop:"username"},{default:g(()=>[h(r,{modelValue:J.username,"onUpdate:modelValue":e[8]||(e[8]=n=>J.username=n),placeholder:"用户名","prefix-icon":"User"},null,8,["modelValue"])]),_:1}),h(w,{prop:"password"},{default:g(()=>[h(r,{modelValue:J.password,"onUpdate:modelValue":e[9]||(e[9]=n=>J.password=n),type:"password",placeholder:"密码","prefix-icon":"Lock","show-password":""},null,8,["modelValue"])]),_:1}),h(w,null,{default:g(()=>[h(_,{type:"primary",loading:$e.value,style:{width:"100%"},onClick:Ne},{default:g(()=>[...e[39]||(e[39]=[x("登录",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"]),we.value?(t(),a("p",xl,o(we.value),1)):u("",!0)]),_:1},8,["modelValue"]),S.value?(t(),a("div",El,[l("div",$l,o(S.value),1),l("div",ql,[h(_,{class:"footer-disclaimer-btn",size:"small",onClick:es},{default:g(()=>[...e[40]||(e[40]=[x("📜 免责声明",-1)])]),_:1})])])):u("",!0)],64)}}}),Al=We(Vl,[["__scopeId","data-v-4034e75b"]]);export{Al as default}; diff --git a/source_clean/frontend/assets/SearchResult-Ck_Ddgrj.css b/source_clean/frontend/assets/SearchResult-Ck_Ddgrj.css new file mode 100644 index 0000000..dff471d --- /dev/null +++ b/source_clean/frontend/assets/SearchResult-Ck_Ddgrj.css @@ -0,0 +1 @@ +.result-card[data-v-f6a62a8e]{display:flex;background:#fff;border-radius:10px;padding:12px;gap:14px;border:1px solid #ebeef5;transition:all .2s ease;content-visibility:auto;contain-intrinsic-size:130px 120px;min-width:0}.result-card[data-v-f6a62a8e]:hover{border-color:#c0c4cc;box-shadow:0 2px 12px #0000000f}.result-card.clickable[data-v-f6a62a8e]{cursor:pointer}.result-card.clickable[data-v-f6a62a8e]:hover{border-color:#409eff;box-shadow:0 2px 12px #409eff1f}.card-cover[data-v-f6a62a8e]{position:relative;flex:0 0 100px;max-width:130px;border-radius:8px;overflow:hidden;background:#f0f2f5;display:flex;align-items:center;justify-content:center;align-self:stretch;min-height:100%}.card-cover img[data-v-f6a62a8e]{width:100%;height:100%;object-fit:cover;transition:transform .3s ease;position:absolute;top:0;left:0}.card-cover img.fallback-img[data-v-f6a62a8e]{object-fit:contain;background:#f0f2f5;loading:eager}.result-card:hover .card-cover img[data-v-f6a62a8e]{transform:scale(1.05)}.cover-placeholder[data-v-f6a62a8e]{width:100%;height:100%;display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0}.placeholder-icon[data-v-f6a62a8e]{font-size:30px;opacity:.5;filter:grayscale(.2)}.cover-tag[data-v-f6a62a8e]{position:absolute;bottom:5px;left:5px;padding:1px 7px;border-radius:4px;color:#fff;font-size:11px;font-weight:600;line-height:1.5;letter-spacing:.3px;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:1}.card-body[data-v-f6a62a8e]{flex:1;min-width:0;display:flex;flex-direction:column;gap:5px}.card-title[data-v-f6a62a8e]{font-size:15px;font-weight:700;color:#1a1a2e;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.card-time[data-v-f6a62a8e]{font-size:12px;color:#909399;display:flex;align-items:center;gap:10px}.meta-size[data-v-f6a62a8e]{color:#67c23a;white-space:nowrap;font-size:11px}.card-tags[data-v-f6a62a8e]{display:flex;flex-wrap:wrap;gap:4px}.tag[data-v-f6a62a8e]{display:inline-block;padding:1px 7px;border-radius:4px;font-size:11px;line-height:1.8;white-space:nowrap;transition:opacity .2s}.tag-quality[data-v-f6a62a8e]{background:#fef0f0;color:#e74c3c}.tag-subtitle[data-v-f6a62a8e]{background:#f0f9eb;color:#67c23a}.tag-default[data-v-f6a62a8e]{background:#ecf5ff;color:#409eff}.card-bottom-row[data-v-f6a62a8e]{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto}.bottom-left[data-v-f6a62a8e]{display:flex;align-items:center;gap:6px;min-width:0}.bottom-right[data-v-f6a62a8e]{display:flex;align-items:center;gap:6px;flex-shrink:0}.meta-source[data-v-f6a62a8e]{color:#909399;background:#f4f4f5;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600;white-space:nowrap;max-width:140px;overflow:hidden;text-overflow:ellipsis}.action-btn[data-v-f6a62a8e]{padding:5px 12px;border:none;border-radius:6px;cursor:pointer;font-size:13px;font-weight:600;transition:all .2s;white-space:nowrap;display:inline-flex;align-items:center;gap:3px}.get-link-btn[data-v-f6a62a8e]{background:var(--primary-color);color:#fff}.get-link-btn[data-v-f6a62a8e]:hover{background:var(--primary-dark);transform:scale(1.05)}.open-link-btn[data-v-f6a62a8e]{background:#67c23a;color:#fff}.open-link-btn[data-v-f6a62a8e]:hover{background:#5daf34;transform:scale(1.05)}@media (max-width: 640px){.result-card[data-v-f6a62a8e]{flex-direction:column;gap:10px}.card-cover[data-v-f6a62a8e]{width:100%;height:160px;align-self:auto}.card-cover img[data-v-f6a62a8e]{position:static;height:160px}.card-cover img.fallback-img[data-v-f6a62a8e],.cover-placeholder[data-v-f6a62a8e]{position:static}.card-bottom-row[data-v-f6a62a8e]{flex-wrap:wrap}}.video-card[data-v-c6df203e]{display:flex;background:var(--bg-white);border-radius:var(--radius-card);box-shadow:var(--shadow-card);padding:16px;gap:16px;transition:transform .2s ease,box-shadow .2s ease}.video-card[data-v-c6df203e]:hover{transform:translateY(-2px);box-shadow:0 4px 20px #0000001f}.video-cover[data-v-c6df203e]{position:relative;flex-shrink:0;width:200px;height:120px;border-radius:8px;overflow:hidden}.video-cover img[data-v-c6df203e]{width:100%;height:100%;object-fit:cover}.play-icon[data-v-c6df203e]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:48px;height:48px;background:#0009;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:20px}.platform-tag[data-v-c6df203e]{position:absolute;top:8px;right:8px;padding:2px 8px;background:#000000b3;color:#fff;font-size:12px;border-radius:4px}.video-info[data-v-c6df203e]{flex:1;min-width:0}.video-info h4[data-v-c6df203e]{font-size:16px;font-weight:600;color:#303133;margin-bottom:8px}.video-author[data-v-c6df203e]{font-size:14px;color:var(--text-secondary);margin-bottom:6px}.video-desc[data-v-c6df203e]{font-size:14px;color:#606266;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.video-actions[data-v-c6df203e]{display:flex;align-items:flex-end;flex-shrink:0}.save-btn[data-v-c6df203e]{padding:10px 20px;background:var(--primary-color);color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:14px;white-space:nowrap;transition:background .2s}.save-btn[data-v-c6df203e]:hover{background:var(--primary-dark)}.search-result-page[data-v-4034e75b]{min-height:100vh;background:var(--bg-color, #f5f5f5)}.top-search-bar[data-v-4034e75b]{position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid #e8e8e8;padding:12px 24px}.search-bar-inner[data-v-4034e75b]{max-width:800px;margin:0 auto;display:flex;align-items:center;gap:12px}.search-box-inner[data-v-4034e75b]{display:flex;align-items:center;flex:1;border:1px solid #dfe1e5;border-radius:24px;background:#fff;box-shadow:none;transition:box-shadow .2s,border-color .2s;overflow:hidden}.search-box-inner[data-v-4034e75b]:focus-within{box-shadow:0 1px 6px #20212447;border-color:#dfe1e500}.marquee-bar[data-v-4034e75b]{max-width:680px;margin:0 auto;padding:6px 12px;display:flex;align-items:center;gap:8px;overflow:hidden}.marquee-icon[data-v-4034e75b]{flex-shrink:0;font-size:15px;line-height:1}.marquee-track[data-v-4034e75b]{flex:1;overflow:hidden;white-space:nowrap}.marquee-text[data-v-4034e75b]{display:inline-block;font-size:13px;color:#e6a23c;animation:marquee-scroll-4034e75b 20s linear infinite;padding-left:100%}@keyframes marquee-scroll-4034e75b{0%{transform:translate(0)}to{transform:translate(-100%)}}.search-box-inner[data-v-4034e75b] .el-input__wrapper{border:none;box-shadow:none;background:transparent;padding:4px 20px;border-radius:0}.search-box-inner[data-v-4034e75b] .el-input__inner{font-size:15px}.top-right-user[data-v-4034e75b]{position:absolute;top:12px;right:20px;display:flex;align-items:center;gap:8px;z-index:100;flex-shrink:0}.user-badge[data-v-4034e75b]{font-size:13px;color:var(--primary-color, #409eff);font-weight:600;white-space:nowrap}.login-error[data-v-4034e75b]{color:#f56c6c;font-size:13px;text-align:center;margin:0}.logo-link[data-v-4034e75b]{text-decoration:none;flex-shrink:0}.logo-icon[data-v-4034e75b]{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:8px;background:#409eff14;transition:background .2s}.logo-icon[data-v-4034e75b]:hover{background:#409eff26}.logo-text-only[data-v-4034e75b]{font-size:18px;font-weight:700;color:var(--primary-color);white-space:nowrap;flex-shrink:0}.logo-img[data-v-4034e75b]{width:auto;height:40px;max-width:160px;object-fit:contain;flex-shrink:0}.result-search-btn[data-v-4034e75b]{height:38px!important;padding:0 22px!important;border:none!important;border-radius:999px!important;margin:4px;font-size:14px!important;font-weight:600!important;letter-spacing:.5px;flex-shrink:0;background:var(--primary-color);color:#fff;transition:all .2s}.result-search-btn[data-v-4034e75b]:hover{background:#3a7be0}.result-search-btn[data-v-4034e75b]:active{background:#2d6ccf}.share-input[data-v-4034e75b]{flex:1}.share-pwd-row[data-v-4034e75b]{display:flex;align-items:center;gap:8px;margin-top:8px}.pwd-label[data-v-4034e75b]{font-size:13px;color:var(--text-secondary, #909399)}.pwd-hint[data-v-4034e75b]{font-size:12px;color:var(--text-secondary, #909399)}.result-info-bar[data-v-4034e75b]{max-width:800px;margin:16px auto 0;padding:0 24px;display:flex;align-items:center;justify-content:space-between;font-size:13px;color:#909399}.info-left[data-v-4034e75b],.info-right[data-v-4034e75b]{display:flex;align-items:center;gap:10px}.info-item[data-v-4034e75b]{white-space:nowrap}.info-count[data-v-4034e75b]{font-weight:600;color:#303133}.info-type[data-v-4034e75b]{color:#909399;font-size:12px;background:#f4f4f5;padding:1px 7px;border-radius:4px}.info-time[data-v-4034e75b]{font-family:monospace;background:#f4f4f5;padding:1px 7px;border-radius:4px;color:#909399}.info-hasmore[data-v-4034e75b]{color:#c0c4cc}.filter-badge[data-v-4034e75b]{background:#fef0f0;color:#f56c6c;padding:2px 8px;border-radius:4px;font-size:12px}.skip-badge[data-v-4034e75b]{background:#fdf6ec;color:#e6a23c;padding:2px 8px;border-radius:4px;font-size:12px}.refresh-btn[data-v-4034e75b]{background:none;border:1px solid #e4e7ed;border-radius:6px;padding:2px 10px;font-size:12px;color:#909399;cursor:pointer;transition:all .2s}.refresh-btn[data-v-4034e75b]:hover{color:#409eff;border-color:#409eff;background:#409eff0d}.intent-badge[data-v-4034e75b]{max-width:800px;margin:12px auto 0;padding:0 24px}.intent-tag[data-v-4034e75b]{font-size:13px;color:#909399;background:#f0f2f5;padding:2px 10px;border-radius:4px}.loading-section[data-v-4034e75b]{max-width:800px;margin:24px auto;padding:0 24px}.progress-track[data-v-4034e75b]{width:100%;height:4px;background:#e8e8e8;border-radius:2px;overflow:hidden}.progress-bar[data-v-4034e75b]{height:100%;background:linear-gradient(90deg,#409eff,#67c23a);border-radius:2px;transition:width .3s ease}.progress-label[data-v-4034e75b]{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:13px;color:#909399}.progress-time[data-v-4034e75b]{margin-left:auto;font-family:monospace;color:#c0c4cc}.validate-count[data-v-4034e75b]{font-family:monospace;color:#409eff;font-weight:600}.loading-skeleton[data-v-4034e75b]{margin-top:16px}.cloud-tabs[data-v-4034e75b]{margin:16px auto 0;display:flex;flex-wrap:wrap;gap:6px}.cloud-tab[data-v-4034e75b]{display:flex;align-items:center;gap:4px;padding:6px 14px;border-radius:20px;font-size:13px;font-weight:700;letter-spacing:.5px;color:#606266;background:#f0f2f5;cursor:pointer;transition:all .2s;-webkit-user-select:none;user-select:none}.cloud-tab[data-v-4034e75b]:hover{background:#e4e7ed;color:#303133}.cloud-tab.active[data-v-4034e75b]{background:#409eff1a;color:#409eff;font-weight:600}.tab-icon[data-v-4034e75b]{font-size:15px;line-height:1}.tab-icon-img[data-v-4034e75b]{width:16px;height:16px;vertical-align:middle;margin-right:2px}.tab-count[data-v-4034e75b]{font-size:11px;color:#c0c4cc;margin-left:2px}.result-content[data-v-4034e75b]{max-width:1080px;margin:0 auto;padding:0 24px 48px}@media (min-width: 1280px){.result-content[data-v-4034e75b]{max-width:1080px}.search-bar-inner[data-v-4034e75b]{max-width:800px}}.result-list[data-v-4034e75b]{display:flex;flex-direction:column;gap:16px;margin-top:16px}.no-match-tip[data-v-4034e75b]{margin-top:32px;text-align:center;color:#909399;font-size:14px;display:flex;flex-direction:column;align-items:center;gap:12px}.channel-section[data-v-4034e75b]{background:#fff;border-radius:12px;padding:14px 16px;box-shadow:0 1px 4px #0000000a;border:1px solid #ebeef5}.channel-header[data-v-4034e75b]{display:flex;align-items:center;gap:8px;margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid #f0f0f0}.channel-icon[data-v-4034e75b]{font-size:16px;line-height:1}.channel-icon-img[data-v-4034e75b]{width:18px;height:18px;vertical-align:middle;margin-right:4px}.channel-label[data-v-4034e75b]{font-size:15px;font-weight:600;color:#303133}.channel-total-badge[data-v-4034e75b]{font-size:12px;color:#909399;background:#f4f4f5;padding:1px 8px;border-radius:10px;margin-left:2px}.channel-time[data-v-4034e75b]{margin-left:auto;font-size:12px;color:#b8860b;white-space:nowrap}.flat-list[data-v-4034e75b]{display:grid!important;grid-template-columns:repeat(3,1fr);gap:14px}@media (max-width: 720px){.flat-list[data-v-4034e75b],.channel-section[data-v-4034e75b]{grid-template-columns:1fr}}@media (min-width: 721px) and (max-width: 1079px){.flat-list[data-v-4034e75b],.channel-section[data-v-4034e75b]{grid-template-columns:repeat(2,1fr)}}.channel-list[data-v-4034e75b]{gap:14px}.channel-section[data-v-4034e75b]{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:24px}.channel-section .channel-header[data-v-4034e75b],.channel-section .channel-load-more[data-v-4034e75b]{grid-column:1 / -1}.channel-load-more[data-v-4034e75b]{margin-top:8px;text-align:center;padding:8px;border:1px dashed #dcdfe6;border-radius:8px;cursor:pointer;transition:all .2s;background:#fafafa}.channel-load-more[data-v-4034e75b]:hover{background:#f0f2f5;border-color:#c0c4cc}.channel-load-more-text[data-v-4034e75b]{font-size:13px;color:#909399}.load-more[data-v-4034e75b]{text-align:center;margin-top:24px}.load-more-inline[data-v-4034e75b]{text-align:center;margin-top:8px}.load-more-btn[data-v-4034e75b]{width:100%;border-radius:8px;padding:10px;border:1px dashed #dcdfe6;background:#fafafa;color:#909399;font-size:13px;transition:all .2s}.load-more-btn[data-v-4034e75b]:hover{background:#f0f2f5;border-color:#c0c4cc;color:#606266}.save-dialog[data-v-4034e75b] .el-dialog__title{font-weight:700;font-size:16px}.save-dialog[data-v-4034e75b]{width:650px!important}.save-dialog[data-v-4034e75b] .el-dialog{--el-dialog-width: 650px !important}.dialog-title-bold[data-v-4034e75b]{font-size:16px;font-weight:700;color:#303133;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.result-dialog-content[data-v-4034e75b]{min-height:80px}.progress-flow[data-v-4034e75b]{display:flex;flex-direction:column;gap:12px;padding:8px 0}.progress-step[data-v-4034e75b]{display:flex;align-items:flex-start;gap:12px;opacity:.4;transition:all .3s ease}.progress-step.active[data-v-4034e75b]{opacity:1}.progress-step.done[data-v-4034e75b]{opacity:.7}.step-dot[data-v-4034e75b]{flex-shrink:0;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;background:#e4e7ed;color:#909399;transition:all .3s}.progress-step.active .step-dot[data-v-4034e75b]{background:#409eff;color:#fff;box-shadow:0 0 0 4px #409eff33}.progress-step.done .step-dot[data-v-4034e75b]{background:#67c23a;color:#fff}.step-check[data-v-4034e75b]{font-size:14px}.step-body[data-v-4034e75b]{flex:1;padding-top:3px;display:flex;align-items:center;gap:10px}.step-title[data-v-4034e75b]{font-size:14px;color:#303133;font-weight:500}.step-status[data-v-4034e75b]{font-size:12px;padding:1px 8px;border-radius:10px;white-space:nowrap}.step-status.loading[data-v-4034e75b]{background:#ecf5ff;color:#409eff}.step-status.done[data-v-4034e75b]{background:#f0f9eb;color:#67c23a}.step-status.pending[data-v-4034e75b]{background:#f4f4f5;color:#c0c4cc}.share-result[data-v-4034e75b]{padding:8px 0}.share-layout[data-v-4034e75b]{display:flex;gap:24px;align-items:stretch}.qr-left[data-v-4034e75b]{flex-shrink:0;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px;background:#fafafa;border-radius:12px;border:1px solid #ebeef5;align-self:stretch}.qr-canvas[data-v-4034e75b]{border-radius:8px}.qr-hint[data-v-4034e75b]{margin:4px 0 0;font-size:12px;color:#409eff;font-weight:600}.qr-subhint[data-v-4034e75b]{margin:0;font-size:11px;color:#c0c4cc}.qr-disclaimer-short[data-v-4034e75b]{margin-top:8px;padding:4px 8px;background:#fff7e6;border:1px solid #ffe7ba;border-radius:4px;font-size:10px;color:#d46b08;text-align:center;line-height:1.4}.link-right[data-v-4034e75b]{flex:1;min-width:0;display:flex;flex-direction:column;gap:12px}.success-header[data-v-4034e75b]{display:flex;align-items:center;gap:6px}.success-text[data-v-4034e75b]{font-size:15px;font-weight:700;color:#303133}.link-row[data-v-4034e75b]{display:flex;gap:8px}.share-input[data-v-4034e75b] .el-input__wrapper{background:#f5f7fa}.share-tip[data-v-4034e75b]{margin:0;font-size:12px;line-height:1.5;background:#fdf6ec;padding:8px 10px;border-radius:6px;text-align:left;display:flex;gap:6px;align-items:flex-start}.share-tip strong[data-v-4034e75b]{color:#d46b08;font-weight:700}.share-tip-warn[data-v-4034e75b]{font-size:18px;line-height:1.5;flex-shrink:0;display:inline-flex;align-items:flex-start;padding-top:1px}.share-tip-text[data-v-4034e75b]{flex:1;min-width:0;line-height:1.6}.dialog-actions[data-v-4034e75b]{display:flex;justify-content:flex-end;gap:8px;margin-top:auto;padding-top:8px}.disclaimer-btn[data-v-4034e75b]{margin-right:auto!important;font-size:12px!important;color:#909399!important}.disclaimer-btn[data-v-4034e75b]:hover{color:#409eff!important}.warnings-box[data-v-4034e75b]{display:flex;flex-direction:column;gap:4px;background:#fff2f0;border:1px solid #ffccc7;border-radius:8px;padding:8px 10px}.warning-item[data-v-4034e75b]{margin:0;font-size:12px;line-height:1.8;font-weight:700;white-space:nowrap}.warning-item[data-v-4034e75b]:nth-child(odd){color:#cf1322}.warning-item[data-v-4034e75b]:nth-child(2n){color:#d46b08}.warning-item[data-v-4034e75b]:last-child{color:#b71c1c;font-size:13px}.save-error[data-v-4034e75b]{padding:8px 0}.media-strip[data-v-4034e75b]{margin:10px auto 0;width:100%}.media-strip-inner[data-v-4034e75b]{display:flex;align-items:center;gap:10px;padding:8px 14px;background:linear-gradient(135deg,#f8faff,#f0f5ff);border:1px solid #e8f0fe;border-radius:10px;text-decoration:none;color:inherit;font-size:13px;line-height:1.4;transition:all .2s}.media-strip-inner[data-v-4034e75b]:hover{border-color:#c0d9ff;background:linear-gradient(135deg,#f0f7ff,#e6f0ff)}.strip-thumb[data-v-4034e75b]{flex-shrink:0;width:32px;height:44px;border-radius:4px;overflow:hidden;background:#e8ecf1;display:flex;align-items:center;justify-content:center}.strip-thumb img[data-v-4034e75b]{width:100%;height:100%;object-fit:cover}.strip-thumb-fallback[data-v-4034e75b]{font-size:18px;opacity:.5}.strip-title[data-v-4034e75b]{font-weight:700;color:#1a1a2e;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px}.strip-year[data-v-4034e75b]{color:#909399;font-size:12px;flex-shrink:0}.strip-rating[data-v-4034e75b]{color:#e6a23c;font-size:12px;font-weight:600;flex-shrink:0}.strip-genres[data-v-4034e75b]{display:flex;gap:2px;flex-wrap:wrap}.strip-genre[data-v-4034e75b]{font-size:11px;color:#67c23a;background:#f0f9eb;padding:1px 7px;border-radius:4px}.strip-tags[data-v-4034e75b]{display:flex;gap:3px;flex-wrap:wrap}.strip-tag[data-v-4034e75b]{font-size:11px;color:#409eff;background:#ecf5ff;padding:1px 7px;border-radius:4px}.strip-right[data-v-4034e75b]{font-size:12px;color:#909399;margin-left:auto;flex-shrink:0;white-space:nowrap;display:inline-flex;align-items:center;gap:2px}.rename-info-bar[data-v-4034e75b]{margin-bottom:12px}.rename-item[data-v-4034e75b]{font-size:11px;color:#909399;margin-top:4px;word-break:break-all;line-height:1.4}@media (max-width: 768px){.save-dialog[data-v-4034e75b]{width:96vw!important}.save-dialog[data-v-4034e75b] .el-dialog{--el-dialog-width: 96vw !important;margin:5vh auto!important}.save-dialog[data-v-4034e75b] .el-dialog__body{padding:12px}.share-layout[data-v-4034e75b]{flex-direction:column;align-items:center}.qr-left[data-v-4034e75b]{width:100%;align-self:auto}.link-right[data-v-4034e75b]{width:100%}.warnings-box[data-v-4034e75b]{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media (max-width: 640px){.top-search-bar[data-v-4034e75b]{flex-direction:column;gap:8px}.top-search-bar .search-bar-inner[data-v-4034e75b]{width:100%}.top-search-bar .search-bar-inner .el-input[data-v-4034e75b]{min-width:0}.top-right-user[data-v-4034e75b]{position:static;align-self:flex-end}.result-info-bar[data-v-4034e75b]{flex-direction:column;gap:6px}.info-left[data-v-4034e75b],.info-right[data-v-4034e75b]{flex-wrap:wrap}.cloud-tabs[data-v-4034e75b]{overflow-x:auto;-webkit-overflow-scrolling:touch;gap:4px}.cloud-tab[data-v-4034e75b]{flex-shrink:0;font-size:12px;padding:4px 10px}}.empty-wrapper[data-v-4034e75b]{display:flex;flex-direction:column;align-items:center;padding:60px 20px 40px;text-align:center}.empty-icon[data-v-4034e75b]{font-size:48px;margin-bottom:16px}.empty-title[data-v-4034e75b]{font-size:18px;font-weight:700;color:#1a1a2e;margin-bottom:8px}.empty-hint[data-v-4034e75b]{font-size:14px;color:#909399;margin-bottom:20px;max-width:360px;line-height:1.5}.empty-tips[data-v-4034e75b]{display:flex;flex-direction:column;gap:8px}.empty-tip-item[data-v-4034e75b]{font-size:13px;color:#606266;background:#f4f8ff;padding:8px 16px;border-radius:8px;border:1px solid #e8f0fe;line-height:1.4;max-width:400px}.site-footer[data-v-4034e75b]{margin-top:40px;padding:20px 16px 32px;background:#f9fafb;border-top:1px solid #ebeef5}.footer-inner[data-v-4034e75b]{max-width:800px;margin:0 auto;font-size:12px;line-height:1.8;color:#909399;text-align:center;white-space:pre-line}.footer-actions[data-v-4034e75b]{display:flex;justify-content:center;align-items:center;gap:12px;margin-top:12px}.footer-disclaimer-btn[data-v-4034e75b]{font-size:12px!important;color:#909399!important}.footer-disclaimer-btn[data-v-4034e75b]:hover{color:#409eff!important} diff --git a/source_clean/frontend/assets/SystemConfig-Bz24k5XV.css b/source_clean/frontend/assets/SystemConfig-Bz24k5XV.css new file mode 100644 index 0000000..7341011 --- /dev/null +++ b/source_clean/frontend/assets/SystemConfig-Bz24k5XV.css @@ -0,0 +1 @@ +.el-card[data-v-79a959cf]{margin-bottom:20px}.el-card[data-v-79a959cf] .el-card__header{font-weight:600;font-size:15px}[data-v-79a959cf] .el-divider__text.is-left{left:0;padding-left:0}.form-tip[data-v-79a959cf]{font-size:12px;color:#909399;margin-top:4px}.fallback-upload-wrap[data-v-79a959cf]{display:flex;flex-direction:column;gap:12px}.fallback-upload-row[data-v-79a959cf]{display:flex;align-items:center;flex-wrap:wrap}.fallback-preview[data-v-79a959cf]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.fallback-preview img[data-v-79a959cf]{max-width:100%;height:auto;max-height:120px;border-radius:8px;border:1px solid var(--border-color);background:#f0f0f0;object-fit:contain}.save-bar[data-v-79a959cf]{position:sticky;bottom:0;background:var(--bg-white);padding:16px 24px 16px 0;border-top:1px solid var(--border-color);margin-top:24px;display:flex;justify-content:flex-end;gap:12px}.strategy-grid[data-v-79a959cf]{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px 16px}.grid-cell[data-v-79a959cf]{display:flex;flex-direction:column;gap:4px}.strategy-section[data-v-79a959cf]{padding:0 4px}.field-block[data-v-79a959cf]{margin:12px 0}.field-label-row[data-v-79a959cf]{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.field-label[data-v-79a959cf]{font-size:14px;font-weight:500;color:#303133;white-space:nowrap}.field-desc[data-v-79a959cf]{font-size:12px;color:#909399;margin:3px 0 0;line-height:1.5}.keyword-input-row[data-v-79a959cf]{display:flex;gap:8px;flex:1;min-width:200px}.tag-list[data-v-79a959cf]{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.tag-empty[data-v-79a959cf]{font-size:13px;color:#c0c4cc;margin-top:8px}.filter-rule-help[data-v-79a959cf]{margin-top:8px;padding:10px 12px;background:#f8f9fa;border-radius:8px;border:1px solid #e8e8e8}.filter-rule-help .help-title[data-v-79a959cf]{font-weight:600;font-size:13px;margin:8px 0 4px;color:#333}.filter-rule-help .help-title[data-v-79a959cf]:first-child{margin-top:0}.filter-rule-help .help-row[data-v-79a959cf]{font-size:12px;color:#555;margin:3px 0;line-height:1.6}.filter-rule-help .help-row code[data-v-79a959cf]{background:#eef1f5;padding:1px 5px;border-radius:3px;font-size:11px;font-family:monospace}.filter-rules-help[data-v-79a959cf]{margin-top:8px;padding:12px;background:#f8f9fa;border-radius:8px;border:1px solid #e8e8e8}.help-title[data-v-79a959cf]{font-weight:600;font-size:13px;margin:10px 0 6px;color:#333}.help-title[data-v-79a959cf]:first-child{margin-top:0}.help-row[data-v-79a959cf]{font-size:12px;color:#555;margin:3px 0;line-height:1.6}.help-row code[data-v-79a959cf]{background:#eef1f5;padding:1px 5px;border-radius:3px;font-size:11px;font-family:monospace}.help-sample[data-v-79a959cf]{background:#1e1e1e;color:#d4d4d4;padding:10px 14px;border-radius:6px;font-size:12px;line-height:1.6;overflow-x:auto;white-space:pre;margin:6px 0 0;font-family:monospace}.help-preview-row[data-v-79a959cf]{font-size:13px;margin:4px 0;display:flex;align-items:center;gap:6px}.help-preview-label[data-v-79a959cf]{color:#888;min-width:70px;font-size:12px}.help-preview-original[data-v-79a959cf]{color:#e74c3c}.help-preview-filtered[data-v-79a959cf]{color:#27ae60;font-weight:500}.filter-input-row[data-v-79a959cf]{display:flex;gap:8px;width:100%;margin-bottom:8px}.filter-tag-list[data-v-79a959cf]{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.filter-empty[data-v-79a959cf]{font-size:13px;color:#c0c4cc;padding:8px 0;margin-bottom:8px}.db-status-grid[data-v-79a959cf]{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin-top:8px}.db-stat-item[data-v-79a959cf]{background:#f8f9fa;border-radius:10px;padding:16px 12px;text-align:center;border:1px solid #eee;transition:transform .15s,box-shadow .15s}.db-stat-item[data-v-79a959cf]:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000000f}.db-stat-value[data-v-79a959cf]{white-space:nowrap;font-size:24px;font-weight:700;color:#303133;margin-bottom:4px}.db-stat-value.text-success[data-v-79a959cf]{color:#67c23a}.db-stat-value.text-warning[data-v-79a959cf]{color:#e6a23c}.db-stat-label[data-v-79a959cf]{font-size:12px;color:#909399}@media (max-width: 900px){.strategy-grid[data-v-79a959cf]{grid-template-columns:1fr 1fr}}@media (max-width: 600px){.strategy-grid[data-v-79a959cf]{grid-template-columns:1fr}}.pansou-status-grid[data-v-79a959cf]{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin-top:8px}.status-dot[data-v-79a959cf]{width:8px;height:8px;border-radius:50%;display:inline-block}.dot-ok[data-v-79a959cf]{background:#67c23a}.dot-err[data-v-79a959cf]{background:#f56c6c} diff --git a/source_clean/frontend/assets/SystemConfig-DRttMhxK.js b/source_clean/frontend/assets/SystemConfig-DRttMhxK.js new file mode 100644 index 0000000..5330470 --- /dev/null +++ b/source_clean/frontend/assets/SystemConfig-DRttMhxK.js @@ -0,0 +1,7 @@ +import{d as De,o as Fe,E as u,a as c,c as _,J as R,K as L,f as t,w as i,b as l,v as B,h as f,i as Q,j as w,l as r,k as ce,M as Ke,e as X,t as p,n as ye,y as Z,L as Ne,F as ge,r as we,u as qe,z as He}from"./index-C5b4pIQL.js";import{m as Je,p as Ye,n as Qe,v as Xe,w as O,x as Ze,y as el,z as ll,_ as sl}from"./_plugin-vue_export-helper-CzL5NdOX.js";const tl={class:"system-config"},al={class:"fallback-upload-wrap"},ol={class:"fallback-upload-row"},il={key:0,class:"fallback-preview"},nl=["src"],dl={style:{display:"flex",gap:"8px","align-items":"center",width:"100%"}},rl={key:0,style:{"font-size":"11px",color:"#e6a23c","white-space":"nowrap"}},ul={class:"pansou-status-grid"},pl={class:"db-stat-item"},fl={class:"db-stat-item"},vl={class:"db-stat-value"},ml={class:"db-stat-item"},cl={class:"db-stat-value"},yl={class:"db-stat-item"},gl={class:"db-stat-value"},wl={class:"db-stat-item"},_l={class:"db-stat-value"},bl={style:{display:"flex",gap:"8px","align-items":"center",width:"100%"}},xl={style:{display:"flex",gap:"8px","align-items":"center",width:"100%"}},Vl={style:{display:"flex",gap:"8px","align-items":"center",width:"100%"}},kl={style:{display:"flex",gap:"8px","align-items":"center",width:"100%"}},Pl={style:{display:"flex",gap:"8px","align-items":"center",width:"100%"}},Sl={key:0,style:{"text-align":"center",padding:"16px"}},hl={key:1,class:"db-status-grid"},Cl={class:"db-stat-item"},Ul={class:"db-stat-item"},Tl={class:"db-stat-value"},zl={class:"db-stat-item"},Il={class:"db-stat-value"},Rl={class:"db-stat-item"},Ll={class:"db-stat-value"},Bl={class:"db-stat-item"},Ol={class:"db-stat-value"},$l={class:"db-stat-item"},El={class:"db-stat-value"},Gl={class:"strategy-section"},Al={class:"field-block"},Ml={class:"field-label-row"},Wl={class:"field-block"},jl={class:"field-label-row"},Dl={class:"strategy-grid"},Fl={class:"grid-cell"},Kl={class:"field-label-row"},Nl={class:"grid-cell"},ql={class:"field-label-row"},Hl={class:"grid-cell"},Jl={class:"field-label-row"},Yl={class:"grid-cell"},Ql={class:"field-label-row"},Xl={class:"grid-cell"},Zl={class:"field-label-row"},es={class:"grid-cell"},ls={class:"field-label-row"},ss={class:"field-block"},ts={style:{display:"flex",gap:"8px","align-items":"stretch"}},as={key:0,class:"tag-list"},os={key:1,class:"tag-empty"},is={class:"field-block"},ns={style:{display:"flex",gap:"8px","align-items":"stretch"}},ds={key:0,class:"tag-list"},rs={key:1,class:"tag-empty"},us={class:"save-bar"},ps=De({__name:"SystemConfig",props:{section:{}},setup(_e){const be=_e,xe=He(),Ve=qe(),b=B(()=>be.section||xe.query.section||""),ee=f(),N=f([]),o=Q({}),S=f([]),C=f(""),h=f([]),U=f(""),q=f(!1),H=f(!1),k=Q({db_size:"-",save_records:0,search_stats:0,cloud_configs:0,content_cache:0,redis_status:"未连接"}),le=f(!0),$=f(!1),E=f(!1),G=f(!1),A=f(!1),M=f(!1),W=f(!1),y=f(null),se=f(!0),j=f(!1),J=B({get:()=>String(o.search_proxy_enabled)==="true",set:a=>{o.search_proxy_enabled=a?"true":"false"}}),te=B({get:()=>String(o.pansou_web_enabled)==="true",set:a=>{o.pansou_web_enabled=a?"true":"false"}}),ae=B({get:()=>String(o.search_all_channels)==="true",set:a=>{o.search_all_channels=a?"true":"false"}}),oe=B({get:()=>String(o.auto_update_enabled)==="true",set:a=>{o.auto_update_enabled=a?"true":"false"}}),g=Q({oldPassword:"",newPassword:"",confirmPassword:""}),ke={oldPassword:[{required:!0,message:"请输入原密码",trigger:"blur"}],newPassword:[{required:!0,message:"请输入新密码",trigger:"blur"},{min:6,message:"新密码至少需要6个字符",trigger:"blur"}],confirmPassword:[{required:!0,message:"请确认新密码",trigger:"blur"},{validator:(a,e,s)=>{e!==g.newPassword?s(new Error("两次输入的密码不一致")):s()},trigger:"blur"}]};Fe(async()=>{try{N.value=await Je();for(const s of N.value)o[s.key]=s.value;const a=String(o.title_filter_rules||"");S.value=a.split(` +`).filter(s=>s.trim());const e=String(o.link_invalid_keywords||"");h.value=e.split(` +`).filter(s=>s.trim())}catch{u.error("加载系统配置失败")}try{const a=await Ye();Object.assign(k,a)}catch{k.db_size="无法读取"}finally{le.value=!1}Y()});async function Pe(){var e,s;const a=String(o.redis_url||"redis://redis:6379");$.value=!0;try{const n=await Xe(a);n.ok?u.success(`✅ Redis 连接成功 — ${n.info}`):u.error(`❌ Redis 连接失败 — ${n.info}`)}catch(n){u.error(((s=(e=n.response)==null?void 0:e.data)==null?void 0:s.error)||"测试请求失败")}finally{$.value=!1}}async function Y(){se.value=!0;try{const a=localStorage.getItem("admin_token"),e={};a&&(e.Authorization="Bearer "+a);const s=await fetch("/api/admin/pansou-info",{headers:e});if(!s.ok)throw new Error("HTTP "+s.status);const n=await s.json();y.value=n}catch{y.value={status:"disconnected",version:"-",channelCount:0,pluginCount:0,diskCount:0}}finally{se.value=!1}}async function Se(){j.value=!0;try{const a=localStorage.getItem("admin_token"),e={"Content-Type":"application/json"};a&&(e.Authorization="Bearer "+a);const n=await(await fetch("/api/admin/update-pansou",{method:"POST",headers:e})).json();n.ok?(u.success("✅ PanSou 已更新并重启"),setTimeout(()=>Y(),3e3)):u.error("❌ 更新失败 — "+(n.error||"未知错误"))}catch(a){u.error(a.message||"更新请求失败")}finally{j.value=!1}}async function he(){var a,e;E.value=!0;try{const s=await O({type:"pansou",url:String(o.pansou_url||"")});s.ok?(Y(),u.success(`✅ PanSou 连接成功 — ${s.info}`)):u.error(`❌ PanSou 连接失败 — ${s.info}`)}catch(s){u.error(((e=(a=s.response)==null?void 0:a.data)==null?void 0:e.error)||"测试请求失败")}finally{E.value=!1}}async function Ce(){var a,e;G.value=!0;try{const s=await O({type:"video_parser",url:String(o.video_parser_url||"")});s.ok?u.success(`✅ 视频解析服务连接成功 — ${s.info}`):u.error(`❌ 视频解析服务连接失败 — ${s.info}`)}catch(s){u.error(((e=(a=s.response)==null?void 0:a.data)==null?void 0:e.error)||"测试请求失败")}finally{G.value=!1}}async function Ue(){var a,e;A.value=!0;try{const s=await O({type:"tmdb",token:String(o.tmdb_api_token||"")});s.ok?u.success(`✅ TMDB 令牌有效 — ${s.info}`):u.error(`❌ TMDB 连接失败 — ${s.info}`)}catch(s){u.error(((e=(a=s.response)==null?void 0:a.data)==null?void 0:e.error)||"测试请求失败")}finally{A.value=!1}}async function Te(){var a,e;M.value=!0;try{const s=await O({type:"proxy",url:String(o.search_proxy_url||"")});s.ok?u.success(`✅ 搜索代理可用 — ${s.info}`):u.error(`❌ 搜索代理不可用 — ${s.info}`)}catch(s){u.error(((e=(a=s.response)==null?void 0:a.data)==null?void 0:e.error)||"测试请求失败")}finally{M.value=!1}}async function ze(){var a,e;W.value=!0;try{const s=String(o.ip_geo_api_url||"");if(!s){u.warning("请先输入 IP 归属地查询 API 地址");return}const n=await O({type:"ip_geo",url:s});n.ok?u.success("✅ IP 归属地接口可用 — "+n.info):u.error("❌ IP 归属地接口不可用 — "+n.info)}catch(s){u.error(((e=(a=s.response)==null?void 0:a.data)==null?void 0:e.error)||"测试请求失败")}finally{W.value=!1}}function Ie(){const a=C.value.trim();if(!a)return;const e=a.split(` +`).map(n=>n.trim()).filter(n=>n);let s=0;for(const n of e)S.value.includes(n)||(S.value.push(n),s++);C.value="",ie(),s>0?u.success(`已添加 ${s} 条规则`):u.info("所有规则已存在")}function Re(a){S.value.splice(a,1),ie()}function Le(a){return a.startsWith("#")?"info":a.startsWith("/")&&(a.endsWith("/")||a.endsWith("/g")||a.endsWith("/i")||a.endsWith("/gi"))?"warning":""}function ie(){o.title_filter_rules=S.value.join(` +`)}function Be(){const a=U.value.trim();if(!a)return;const e=a.split(` +`).map(n=>n.trim()).filter(n=>n);let s=0;for(const n of e)h.value.includes(n)||(h.value.push(n),s++);U.value="",ne(),s>0?u.success(`已添加 ${s} 个关键词`):u.info("所有关键词已存在")}function Oe(a){h.value.splice(a,1),ne()}function ne(){o.link_invalid_keywords=h.value.join(` +`)}function $e(){localStorage.removeItem("admin_token"),Ve.push("/admin/login")}async function Ee(){var a,e;q.value=!0;try{const s=N.value.map(n=>({key:n.key,value:String(o[n.key]??n.value)}));await Qe(s),u.success("配置已保存")}catch(s){u.error(((e=(a=s.response)==null?void 0:a.data)==null?void 0:e.error)||"保存失败")}finally{q.value=!1}}async function Ge(){var e,s,n;if(await((e=ee.value)==null?void 0:e.validate().catch(()=>!1))){H.value=!0;try{const x=await Ze(g.oldPassword,g.newPassword);x.success?(u.success("✅ 密码修改成功,下次登录请使用新密码"),g.oldPassword="",g.newPassword="",g.confirmPassword=""):u.error(x.message)}catch(x){u.error(((n=(s=x.response)==null?void 0:s.data)==null?void 0:n.error)||"密码修改失败")}finally{H.value=!1}}}const de=f();function Ae(){var a;(a=de.value)==null||a.click()}async function Me(a){var n,x,v;const e=a.target,s=(n=e.files)==null?void 0:n[0];if(s){if(!s.type.startsWith("image/")){u.error("仅支持图片文件(JPEG/PNG/WebP)"),e.value="";return}if(s.size>2*1024*1024){u.error("图片大小不能超过 2MB"),e.value="";return}try{const V=await el(s);V.success?(o.site_logo=V.url,u.success("✅ LOGO 已上传并生效")):u.error(V.message)}catch(V){u.error(((v=(x=V.response)==null?void 0:x.data)==null?void 0:v.error)||"上传失败")}e.value=""}}async function We(){try{o.site_logo="",await ll("site_logo",""),u.success("已移除 LOGO")}catch{u.error("移除失败")}}return(a,e)=>{const s=w("el-input"),n=w("el-form-item"),x=w("el-icon"),v=w("el-button"),V=w("el-form"),T=w("el-card"),z=w("el-switch"),D=w("el-divider"),re=w("el-radio"),je=w("el-radio-group"),I=w("el-input-number"),ue=w("el-tag");return c(),_("div",tl,[R(t(T,{id:"section-sys-site"},{header:i(()=>[...e[27]||(e[27]=[l("span",null,"🌐 网站设置",-1)])]),default:i(()=>[t(V,{"label-width":"180px","label-position":"left"},{default:i(()=>[t(n,{label:"网站名称"},{default:i(()=>[t(s,{modelValue:o.site_name,"onUpdate:modelValue":e[0]||(e[0]=d=>o.site_name=d),placeholder:"CloudSearch",style:{"max-width":"300px"}},null,8,["modelValue"]),e[28]||(e[28]=l("div",{class:"form-tip"},"显示在网站标题和页脚",-1))]),_:1}),t(n,{label:"网站 LOGO"},{default:i(()=>[l("div",al,[l("div",ol,[t(v,{type:"primary",onClick:Ae},{icon:i(()=>[t(x,null,{default:i(()=>[t(ce(Ke))]),_:1})]),default:i(()=>[e[29]||(e[29]=r(" 选择LOGO图片并上传 ",-1))]),_:1}),l("input",{ref_key:"logoInputRef",ref:de,type:"file",accept:".jpg,.jpeg,.png,.webp",hidden:"",onChange:Me},null,544),e[30]||(e[30]=l("div",{class:"form-tip",style:{"margin-left":"12px"}},[r(" 推荐 "),l("strong",null,"320×60"),r(" 或宽比例(如 4:1),JPEG/PNG/WebP,最大 2MB。"),l("br"),r(" LOGO 同时也作为搜索结果无封面图时的兜底图使用。 ")],-1))]),o.site_logo?(c(),_("div",il,[l("img",{src:String(o.site_logo),alt:"LOGO预览",onError:e[1]||(e[1]=d=>d.target.style.display="none")},null,40,nl),t(v,{size:"small",type:"danger",plain:"",onClick:We},{default:i(()=>[...e[31]||(e[31]=[r("移除",-1)])]),_:1})])):X("",!0)])]),_:1}),t(n,{label:"底部免责声明"},{default:i(()=>[t(s,{modelValue:o.site_disclaimer,"onUpdate:modelValue":e[2]||(e[2]=d=>o.site_disclaimer=d),type:"textarea",rows:4,placeholder:"输入免责声明内容"},null,8,["modelValue"]),e[32]||(e[32]=l("div",{class:"form-tip"},"显示在网站底部,留空则不显示",-1))]),_:1}),t(n,{label:"滚动通知文字"},{default:i(()=>[t(s,{modelValue:o.site_marquee,"onUpdate:modelValue":e[3]||(e[3]=d=>o.site_marquee=d),placeholder:"📢 欢迎使用CloudSearch",style:{"max-width":"500px"}},null,8,["modelValue"]),e[33]||(e[33]=l("div",{class:"form-tip"},"搜索栏下方滚动的通知条(从右往左滚动),留空则不显示",-1))]),_:1}),t(n,{label:"系统时区"},{default:i(()=>[t(s,{modelValue:o.timezone,"onUpdate:modelValue":e[4]||(e[4]=d=>o.timezone=d),placeholder:"Asia/Shanghai",style:{"max-width":"300px"}},null,8,["modelValue"]),e[34]||(e[34]=l("div",{class:"form-tip"},"例如 Asia/Shanghai、America/New_York、UTC,修改后保存配置即可生效",-1))]),_:1})]),_:1})]),_:1},512),[[L,!b.value||b.value==="sys-site"]]),R(t(T,{id:"section-sys-services"},{header:i(()=>[...e[35]||(e[35]=[l("span",null,"🔗 外部服务 & 缓存",-1)])]),default:i(()=>[t(V,{"label-width":"180px","label-position":"left"},{default:i(()=>{var d,P,F,pe,fe,ve;return[t(n,{label:"PanSou 搜索引擎地址"},{default:i(()=>{var m,me;return[l("div",dl,[t(s,{modelValue:o.pansou_url,"onUpdate:modelValue":e[5]||(e[5]=K=>o.pansou_url=K),placeholder:"http://pansou:8888",style:{"max-width":"360px"}},null,8,["modelValue"]),t(v,{type:"primary",loading:E.value,onClick:he,size:"default",style:{width:"100px"}},{default:i(()=>[r(p(E.value?"测试中...":"验证连接"),1)]),_:1},8,["loading"]),t(v,{type:"warning",loading:j.value,onClick:Se,size:"default",style:{width:"130px"},disabled:!((m=y.value)!=null&&m.hasUpdate)},{default:i(()=>{var K;return[r(p(j.value?"更新中...":(K=y.value)!=null&&K.hasUpdate?"🔄 有新版本":"无更新"),1)]}),_:1},8,["loading","disabled"]),(me=y.value)!=null&&me.latestVersion?(c(),_("span",rl,p(y.value.latestVersion),1)):X("",!0)]),e[36]||(e[36]=l("div",{class:"form-tip",style:{"margin-top":"4px"}},"盘搜搜索引擎的地址",-1))]}),_:1}),l("div",ul,[l("div",pl,[l("div",{class:ye(["db-stat-value",((d=y.value)==null?void 0:d.status)==="connected"?"text-success":"text-warning"])},p(((P=y.value)==null?void 0:P.status)==="connected"?"已连接":y.value?"未连接":"-"),3),e[37]||(e[37]=l("div",{class:"db-stat-label"},"PanSou 状态",-1))]),l("div",fl,[l("div",vl,p(((F=y.value)==null?void 0:F.channelCount)??"-"),1),e[38]||(e[38]=l("div",{class:"db-stat-label"},"频道数量",-1))]),l("div",ml,[l("div",cl,p(((pe=y.value)==null?void 0:pe.pluginCount)??"-"),1),e[39]||(e[39]=l("div",{class:"db-stat-label"},"插件数量",-1))]),l("div",yl,[l("div",gl,p(((fe=y.value)==null?void 0:fe.diskCount)??"-"),1),e[40]||(e[40]=l("div",{class:"db-stat-label"},"网盘数量",-1))]),l("div",wl,[l("div",_l,p(((ve=y.value)==null?void 0:ve.version)||"-"),1),e[41]||(e[41]=l("div",{class:"db-stat-label"},"版本",-1))])]),t(n,{label:"PanSou Web 端访问"},{default:i(()=>[t(z,{modelValue:te.value,"onUpdate:modelValue":e[6]||(e[6]=m=>te.value=m),"active-text":"启用","inactive-text":"关闭"},null,8,["modelValue"]),e[42]||(e[42]=l("div",{class:"form-tip",style:{"margin-left":"12px"}},[r(" 开启后可通过 "),l("code",null,"/pansou/"),r(" 路径访问 PanSou 搜索引擎管理界面 ")],-1))]),_:1}),t(n,{label:"启用代理"},{default:i(()=>[t(z,{modelValue:J.value,"onUpdate:modelValue":e[7]||(e[7]=m=>J.value=m),"active-text":"启用","inactive-text":"关闭"},null,8,["modelValue"]),e[43]||(e[43]=l("div",{class:"form-tip",style:{"margin-left":"8px"}}," 仅 PanSou 需要此配置,开启后搜索请求将经过代理转发 ",-1))]),_:1}),J.value?(c(),Z(n,{key:0,label:"代理地址",style:{"margin-top":"-12px"}},{default:i(()=>[l("div",bl,[t(s,{modelValue:o.search_proxy_url,"onUpdate:modelValue":e[8]||(e[8]=m=>o.search_proxy_url=m),placeholder:"http://127.0.0.1:7890",style:{"max-width":"360px"}},null,8,["modelValue"]),t(v,{type:"primary",loading:M.value,onClick:Te,size:"default",style:{width:"100px"}},{default:i(()=>[r(p(M.value?"测试中...":"测试代理"),1)]),_:1},8,["loading"])]),e[44]||(e[44]=l("div",{class:"form-tip",style:{"margin-top":"4px"}},"HTTP 或 SOCKS5 协议地址",-1))]),_:1})):X("",!0),t(n,{label:"视频解析服务地址"},{default:i(()=>[l("div",xl,[t(s,{modelValue:o.video_parser_url,"onUpdate:modelValue":e[9]||(e[9]=m=>o.video_parser_url=m),placeholder:"http://video-parser:3001",style:{"max-width":"360px"}},null,8,["modelValue"]),t(v,{type:"primary",loading:G.value,onClick:Ce,size:"default",style:{width:"100px"}},{default:i(()=>[r(p(G.value?"测试中...":"验证连接"),1)]),_:1},8,["loading"])]),e[45]||(e[45]=l("div",{class:"form-tip",style:{"margin-top":"4px"}},"视频链接解析服务地址",-1))]),_:1}),t(n,{label:"TMDB 读取令牌"},{default:i(()=>[l("div",Vl,[t(s,{modelValue:o.tmdb_api_token,"onUpdate:modelValue":e[10]||(e[10]=m=>o.tmdb_api_token=m),type:"password","show-password":"",placeholder:"输入 TMDB API 读取令牌(Bearer Token)",style:{"max-width":"360px"}},null,8,["modelValue"]),t(v,{type:"primary",loading:A.value,onClick:Ue,size:"default",style:{width:"100px"}},{default:i(()=>[r(p(A.value?"测试中...":"验证令牌"),1)]),_:1},8,["loading"])]),e[46]||(e[46]=l("div",{class:"form-tip",style:{"margin-top":"4px"}},[r(" 用于搜索 TMDB 获取评分、导演、演员等完整内容信息。 "),l("a",{href:"https://www.themoviedb.org/settings/api",target:"_blank",rel:"noopener",style:{color:"var(--primary-color)"}},"获取令牌 →")],-1))]),_:1}),t(n,{label:"IP 归属地查询"},{default:i(()=>[l("div",kl,[t(s,{modelValue:o.ip_geo_api_url,"onUpdate:modelValue":e[11]||(e[11]=m=>o.ip_geo_api_url=m),placeholder:"https://cn.apihz.cn/api/ip/chaapi.php?id=xxx&key=***&ip={ip}&td=0",style:{"max-width":"360px"}},null,8,["modelValue"]),t(v,{type:"primary",loading:W.value,onClick:ze,size:"default",style:{width:"100px"}},{default:i(()=>[r(p(W.value?"测试中...":"验证接口"),1)]),_:1},8,["loading"])]),e[47]||(e[47]=l("div",{class:"form-tip",style:{"margin-top":"4px"}},[r(" IP 归属地查询 API 地址,"),l("code",null,"{ip}"),r(" 会被替换为实际 IP。 ")],-1)),e[48]||(e[48]=l("div",{style:{color:"var(--el-color-warning)","font-size":"13px","margin-top":"2px",width:"100%"}}," ⚠ 当前仅支持 接口盒子(apihz.cn) 格式 ",-1))]),_:1}),t(D,{"content-position":"left"},{default:i(()=>[...e[49]||(e[49]=[r("Redis 缓存",-1)])]),_:1}),t(n,{label:"Redis 连接地址"},{default:i(()=>[l("div",Pl,[t(s,{modelValue:o.redis_url,"onUpdate:modelValue":e[12]||(e[12]=m=>o.redis_url=m),placeholder:"redis://:***@172.17.0.1:6379",style:{"max-width":"360px"}},null,8,["modelValue"]),t(v,{type:"primary",size:"default",loading:$.value,onClick:Pe,style:{width:"100px"}},{default:i(()=>[r(p($.value?"测试中...":"验证连接"),1)]),_:1},8,["loading"])]),e[50]||(e[50]=l("div",{class:"form-tip",style:{"margin-top":"4px"}},[r(" Redis 用于缓存搜索验证结果,提升响应速度。"),l("br"),l("strong",null,"带密码格式:"),l("code",null,"redis://:你的密码@地址:6379"),l("br"),r(" 修改后保存配置即可生效,无需重启。"),l("strong",null,"切换 Redis 只会清空缓存,不影响任何重要数据。")],-1))]),_:1})]}),_:1}),le.value?(c(),_("div",Sl,[t(x,{class:"is-loading",size:20},{default:i(()=>[t(ce(Ne))]),_:1}),e[51]||(e[51]=l("span",{style:{"margin-left":"8px",color:"#909399"}},"加载中...",-1))])):(c(),_("div",hl,[l("div",Cl,[l("div",{class:ye(["db-stat-value",k.redis_status==="已连接"?"text-success":"text-warning"])},p(k.redis_status),3),e[52]||(e[52]=l("div",{class:"db-stat-label"},"Redis 状态",-1))]),l("div",Ul,[l("div",Tl,p(k.db_size),1),e[53]||(e[53]=l("div",{class:"db-stat-label"},"数据库大小",-1))]),l("div",zl,[l("div",Il,p(k.save_records),1),e[54]||(e[54]=l("div",{class:"db-stat-label"},"转存记录",-1))]),l("div",Rl,[l("div",Ll,p(k.search_stats),1),e[55]||(e[55]=l("div",{class:"db-stat-label"},"搜索记录",-1))]),l("div",Bl,[l("div",Ol,p(k.cloud_configs),1),e[56]||(e[56]=l("div",{class:"db-stat-label"},"网盘配置",-1))]),l("div",$l,[l("div",El,p(k.content_cache),1),e[57]||(e[57]=l("div",{class:"db-stat-label"},"内容缓存",-1))])]))]),_:1},512),[[L,!b.value||b.value==="sys-services"]]),R(t(T,{id:"section-sys-strategy"},{header:i(()=>[...e[58]||(e[58]=[l("span",null,"🔧 性能配置",-1)])]),default:i(()=>[l("div",Gl,[t(D,{"content-position":"left"},{default:i(()=>[...e[59]||(e[59]=[r("搜索结果返回方式",-1)])]),_:1}),l("div",Al,[l("div",Ml,[e[60]||(e[60]=l("span",{class:"field-label"},"开启资源链接有效性监测",-1)),t(z,{modelValue:o.link_validation_enabled,"onUpdate:modelValue":e[13]||(e[13]=d=>o.link_validation_enabled=d),"active-value":"true","inactive-value":"false","active-text":"开启","inactive-text":"关闭"},null,8,["modelValue"])]),e[61]||(e[61]=l("div",{class:"field-desc"},"开启后搜索时会自动检测链接是否有效,过滤失效链接。关闭则直接返回所有结果(更快)",-1))]),l("div",Wl,[l("div",jl,[e[64]||(e[64]=l("span",{class:"field-label"},"搜索结果方式",-1)),t(je,{modelValue:o.search_strategy,"onUpdate:modelValue":e[14]||(e[14]=d=>o.search_strategy=d)},{default:i(()=>[t(re,{value:"wait_all"},{default:i(()=>[...e[62]||(e[62]=[r("等待全部结果后展示",-1)])]),_:1}),t(re,{value:"stream_channel"},{default:i(()=>[...e[63]||(e[63]=[r("频道结果逐步展示",-1)])]),_:1})]),_:1},8,["modelValue"])]),e[65]||(e[65]=l("div",{class:"field-desc"},"逐步展示会分频道并发请求并优先展示先返回的频道;该模式下频道顺序按返回先后,不按配置顺序。",-1))]),t(D,{"content-position":"left"},{default:i(()=>[...e[66]||(e[66]=[r("搜索策略",-1)])]),_:1}),l("div",Dl,[l("div",Fl,[l("div",Kl,[e[67]||(e[67]=l("span",{class:"field-label"},"使用所有频道参与搜索",-1)),t(z,{modelValue:ae.value,"onUpdate:modelValue":e[15]||(e[15]=d=>ae.value=d),"active-text":"开启","inactive-text":"关闭"},null,8,["modelValue"])]),e[68]||(e[68]=l("div",{class:"field-desc"},"包含未启用频道,命中更广但请求压力更高。",-1))]),l("div",Nl,[l("div",ql,[e[69]||(e[69]=l("span",{class:"field-label"},"每类网盘有效结果数",-1)),t(I,{modelValue:o.search_result_limit,"onUpdate:modelValue":e[16]||(e[16]=d=>o.search_result_limit=d),min:1,max:100},null,8,["modelValue"])]),e[70]||(e[70]=l("div",{class:"field-desc"},"每个网盘类型最多展示的有效链接数量",-1))]),l("div",Hl,[l("div",Jl,[e[71]||(e[71]=l("span",{class:"field-label"},"验证并发数",-1)),t(I,{modelValue:o.validation_concurrency,"onUpdate:modelValue":e[17]||(e[17]=d=>o.validation_concurrency=d),min:1,max:50},null,8,["modelValue"])]),e[72]||(e[72]=l("div",{class:"field-desc"},"同时验证的链接数量",-1))]),l("div",Yl,[l("div",Ql,[e[73]||(e[73]=l("span",{class:"field-label"},"有效链接缓存 (s)",-1)),t(I,{modelValue:o.validation_cache_ttl_valid,"onUpdate:modelValue":e[18]||(e[18]=d=>o.validation_cache_ttl_valid=d),min:60,max:86400,step:60},null,8,["modelValue"])]),e[74]||(e[74]=l("div",{class:"field-desc"},"有效验证结果的缓存时间",-1))]),l("div",Xl,[l("div",Zl,[e[75]||(e[75]=l("span",{class:"field-label"},"无效链接缓存 (s)",-1)),t(I,{modelValue:o.validation_cache_ttl_invalid,"onUpdate:modelValue":e[19]||(e[19]=d=>o.validation_cache_ttl_invalid=d),min:60,max:86400,step:60},null,8,["modelValue"])]),e[76]||(e[76]=l("div",{class:"field-desc"},"无效验证结果的缓存时间",-1))]),l("div",es,[l("div",ls,[e[77]||(e[77]=l("span",{class:"field-label"},"验证超时 (ms)",-1)),t(I,{modelValue:o.validation_timeout,"onUpdate:modelValue":e[20]||(e[20]=d=>o.validation_timeout=d),min:1e3,max:3e4,step:500},null,8,["modelValue"])]),e[78]||(e[78]=l("div",{class:"field-desc"},"单个链接验证超时毫秒数",-1))])]),t(D,{"content-position":"left"},{default:i(()=>[...e[79]||(e[79]=[r("链接检测配置",-1)])]),_:1}),l("div",ss,[e[81]||(e[81]=l("div",{class:"field-label-row"},[l("span",{class:"field-label"},"搜索标题过滤规则")],-1)),l("div",ts,[t(s,{modelValue:C.value,"onUpdate:modelValue":e[21]||(e[21]=d=>C.value=d),type:"textarea",rows:1,placeholder:"每行一条规则,回车分隔",style:{"max-width":"420px","font-family":"monospace","font-size":"12px"}},null,8,["modelValue"]),t(v,{type:"primary",onClick:Ie,disabled:!C.value.trim()},{default:i(()=>[...e[80]||(e[80]=[r(" 确认添加 ",-1)])]),_:1},8,["disabled"])]),S.value.length>0?(c(),_("div",as,[(c(!0),_(ge,null,we(S.value,(d,P)=>(c(),Z(ue,{key:P,closable:"",type:Le(d),"disable-transitions":!1,onClose:F=>Re(P)},{default:i(()=>[r(p(d),1)]),_:2},1032,["type","onClose"]))),128))])):(c(),_("div",os,"暂无过滤规则")),e[82]||(e[82]=l("div",{class:"filter-rule-help"},[l("div",{class:"help-title"},"📖 规则说明"),l("div",{class:"help-row"},[l("code",null,"# 注释内容"),r(" — "),l("code",null,"#"),r(" 后必须跟"),l("strong",null,"空格"),r("才会被识别为注释,单纯的 "),l("code",null,"#动漫"),r(" 会被当作要移除的文本")]),l("div",{class:"help-row"},[l("code",null,"/正则表达式/标志"),r(" — 正则匹配,匹配到的内容会被删除。如 "),l("code",null,"/^\\\\d+[、,.\\\\s]/"),r(" 去掉开头的序号")]),l("div",{class:"help-row"},[l("code",null,"纯文本"),r(" — 直接写要移除的文字(支持 emoji),凡是标题中含有的都会被删除")])],-1))]),l("div",is,[e[84]||(e[84]=l("div",{class:"field-label-row"},[l("span",{class:"field-label"},"失效关键词")],-1)),l("div",ns,[t(s,{modelValue:U.value,"onUpdate:modelValue":e[22]||(e[22]=d=>U.value=d),type:"textarea",rows:1,placeholder:"每行一个关键词,回车分隔",style:{"max-width":"420px","font-family":"monospace","font-size":"12px"}},null,8,["modelValue"]),t(v,{type:"danger",onClick:Be,disabled:!U.value.trim()},{default:i(()=>[...e[83]||(e[83]=[r(" 确认添加 ",-1)])]),_:1},8,["disabled"])]),e[85]||(e[85]=l("div",{class:"field-desc"},"自定义失效关键词,PanSou 检测 summary 或 HTML 页面内容包含即判为失效。",-1)),h.value.length>0?(c(),_("div",ds,[(c(!0),_(ge,null,we(h.value,(d,P)=>(c(),Z(ue,{key:P,closable:"",type:"danger","disable-transitions":!1,onClose:F=>Oe(P)},{default:i(()=>[r(p(d),1)]),_:2},1032,["onClose"]))),128))])):(c(),_("div",rs,"暂无失效关键词,所有链接将默认判为有效"))])])]),_:1},512),[[L,!b.value||b.value==="sys-strategy"]]),R(t(T,{id:"section-sys-password"},{header:i(()=>[...e[86]||(e[86]=[l("span",null,"🔑 修改管理员密码",-1)])]),default:i(()=>[t(V,{ref_key:"passwordFormRef",ref:ee,model:g,rules:ke,"label-width":"120px","label-position":"left"},{default:i(()=>[t(n,{label:"原密码",prop:"oldPassword"},{default:i(()=>[t(s,{modelValue:g.oldPassword,"onUpdate:modelValue":e[23]||(e[23]=d=>g.oldPassword=d),type:"password","show-password":"",placeholder:"输入原密码",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1}),t(n,{label:"新密码",prop:"newPassword"},{default:i(()=>[t(s,{modelValue:g.newPassword,"onUpdate:modelValue":e[24]||(e[24]=d=>g.newPassword=d),type:"password","show-password":"",placeholder:"输入新密码(至少6位)",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1}),t(n,{label:"确认新密码",prop:"confirmPassword"},{default:i(()=>[t(s,{modelValue:g.confirmPassword,"onUpdate:modelValue":e[25]||(e[25]=d=>g.confirmPassword=d),type:"password","show-password":"",placeholder:"再次输入新密码",style:{"max-width":"300px"}},null,8,["modelValue"])]),_:1}),t(n,null,{default:i(()=>[t(v,{type:"primary",loading:H.value,onClick:Ge},{default:i(()=>[...e[87]||(e[87]=[r("修改密码",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"])]),_:1},512),[[L,!b.value||b.value==="sys-password"]]),R(t(T,{id:"section-sys-maintenance"},{header:i(()=>[...e[88]||(e[88]=[l("span",null,"🔄 系统维护",-1)])]),default:i(()=>[e[93]||(e[93]=r()),t(V,{"label-width":"180px","label-position":"left"},{default:i(()=>[t(n,{label:"自动更新镜像"},{default:i(()=>[t(z,{modelValue:oe.value,"onUpdate:modelValue":e[26]||(e[26]=d=>oe.value=d),"active-text":"启用","inactive-text":"禁用"},null,8,["modelValue"]),e[89]||(e[89]=r()),e[90]||(e[90]=l("div",{class:"form-tip"},"启用后 CloudSearch 将自动检测并更新到最新镜像版本",-1)),e[91]||(e[91]=r()),e[92]||(e[92]=l("div",{class:"form-tip",style:{color:"var(--(--el-color-warning,#e6a23c))"}}," 当前需手动在服务器执行:docker-compose -f /opt/CloudSearch/docker-compose.yml pull && docker-compose -f /opt/CloudSearch/docker-compose.yml up -d ",-1))]),_:1})]),_:1})]),_:1},512),[[L,!b.value||b.value==="sys-maintenance"]]),l("div",us,[t(v,{type:"primary",size:"large",loading:q.value,onClick:Ee},{default:i(()=>[...e[94]||(e[94]=[r(" 保存配置 ",-1)])]),_:1},8,["loading"]),t(v,{size:"large",onClick:$e},{default:i(()=>[...e[95]||(e[95]=[r("退出登录",-1)])]),_:1})])])}}}),ms=sl(ps,[["__scopeId","data-v-79a959cf"]]);export{ms as default}; diff --git a/source_clean/frontend/assets/_plugin-vue_export-helper-CzL5NdOX.js b/source_clean/frontend/assets/_plugin-vue_export-helper-CzL5NdOX.js new file mode 100644 index 0000000..98a7150 --- /dev/null +++ b/source_clean/frontend/assets/_plugin-vue_export-helper-CzL5NdOX.js @@ -0,0 +1,10 @@ +function Ke(e,t){return function(){return e.apply(t,arguments)}}const{toString:wt}=Object.prototype,{getPrototypeOf:ie}=Object,{iterator:ae,toStringTag:Xe}=Symbol,ce=(e=>t=>{const n=wt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),F=e=>(e=e.toLowerCase(),t=>ce(t)===e),ue=e=>t=>typeof t===e,{isArray:z}=Array,$=ue("undefined");function W(e){return e!==null&&!$(e)&&e.constructor!==null&&!$(e.constructor)&&x(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ge=F("ArrayBuffer");function gt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ge(e.buffer),t}const bt=ue("string"),x=ue("function"),Qe=ue("number"),K=e=>e!==null&&typeof e=="object",Et=e=>e===!0||e===!1,ne=e=>{if(ce(e)!=="object")return!1;const t=ie(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Xe in e)&&!(ae in e)},Rt=e=>{if(!K(e)||W(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},St=F("Date"),Ot=F("File"),Tt=e=>!!(e&&typeof e.uri<"u"),At=e=>e&&typeof e.getParts<"u",Ct=F("Blob"),xt=F("FileList"),_t=e=>K(e)&&x(e.pipe);function Pt(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const De=Pt(),Fe=typeof De.FormData<"u"?De.FormData:void 0,Nt=e=>{if(!e)return!1;if(Fe&&e instanceof Fe)return!0;const t=ie(e);if(!t||t===Object.prototype||!x(e.append))return!1;const n=ce(e);return n==="formdata"||n==="object"&&x(e.toString)&&e.toString()==="[object FormData]"},Dt=F("URLSearchParams"),[Ft,Ut,Lt,Bt]=["ReadableStream","Request","Response","Headers"].map(F),kt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function X(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),z(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const j=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ye=e=>!$(e)&&e!==j;function we(){const{caseless:e,skipUndefined:t}=Ye(this)&&this||{},n={},r=(s,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const i=e&&Ze(n,o)||o;ne(n[i])&&ne(s)?n[i]=we(n[i],s):ne(s)?n[i]=we({},s):z(s)?n[i]=s.slice():(!t||!$(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s(X(t,(s,o)=>{n&&x(s)?Object.defineProperty(e,o,{value:Ke(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),It=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),qt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Ht=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&ie(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Mt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},$t=e=>{if(!e)return null;if(z(e))return e;let t=e.length;if(!Qe(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},zt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ie(Uint8Array)),vt=(e,t)=>{const r=(e&&e[ae]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Jt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Vt=F("HTMLFormElement"),Wt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ue=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Kt=F("RegExp"),et=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};X(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Xt=e=>{et(e,(t,n)=>{if(x(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(x(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Gt=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return z(e)?r(e):r(String(e).split(t)),n},Qt=()=>{},Zt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yt(e){return!!(e&&x(e.append)&&e[Xe]==="FormData"&&e[ae])}const en=e=>{const t=new Array(10),n=(r,s)=>{if(K(r)){if(t.indexOf(r)>=0)return;if(W(r))return r;if(!("toJSON"in r)){t[s]=r;const o=z(r)?[]:{};return X(r,(i,c)=>{const d=n(i,s+1);!$(d)&&(o[c]=d)}),t[s]=void 0,o}}return r};return n(e,0)},tn=F("AsyncFunction"),nn=e=>e&&(K(e)||x(e))&&x(e.then)&&x(e.catch),tt=((e,t)=>e?setImmediate:t?((n,r)=>(j.addEventListener("message",({source:s,data:o})=>{s===j&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),j.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",x(j.postMessage)),rn=typeof queueMicrotask<"u"?queueMicrotask.bind(j):typeof process<"u"&&process.nextTick||tt,sn=e=>e!=null&&x(e[ae]),a={isArray:z,isArrayBuffer:Ge,isBuffer:W,isFormData:Nt,isArrayBufferView:gt,isString:bt,isNumber:Qe,isBoolean:Et,isObject:K,isPlainObject:ne,isEmptyObject:Rt,isReadableStream:Ft,isRequest:Ut,isResponse:Lt,isHeaders:Bt,isUndefined:$,isDate:St,isFile:Ot,isReactNativeBlob:Tt,isReactNative:At,isBlob:Ct,isRegExp:Kt,isFunction:x,isStream:_t,isURLSearchParams:Dt,isTypedArray:zt,isFileList:xt,forEach:X,merge:we,extend:jt,trim:kt,stripBOM:It,inherits:qt,toFlatObject:Ht,kindOf:ce,kindOfTest:F,endsWith:Mt,toArray:$t,forEachEntry:vt,matchAll:Jt,isHTMLForm:Vt,hasOwnProperty:Ue,hasOwnProp:Ue,reduceDescriptors:et,freezeMethods:Xt,toObjectSet:Gt,toCamelCase:Wt,noop:Qt,toFiniteNumber:Zt,findKey:Ze,global:j,isContextDefined:Ye,isSpecCompliantForm:Yt,toJSONObject:en,isAsyncFn:tn,isThenable:nn,setImmediate:tt,asap:rn,isIterable:sn};let y=class nt extends Error{static from(t,n,r,s,o,i){const c=new nt(t.message,n||t.code,r,s,o);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),i&&Object.assign(c,i),c}constructor(t,n,r,s,o){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}};y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";y.ERR_BAD_OPTION="ERR_BAD_OPTION";y.ECONNABORTED="ECONNABORTED";y.ETIMEDOUT="ETIMEDOUT";y.ERR_NETWORK="ERR_NETWORK";y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";y.ERR_DEPRECATED="ERR_DEPRECATED";y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";y.ERR_BAD_REQUEST="ERR_BAD_REQUEST";y.ERR_CANCELED="ERR_CANCELED";y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";y.ERR_INVALID_URL="ERR_INVALID_URL";y.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const on=null;function ge(e){return a.isPlainObject(e)||a.isArray(e)}function rt(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function pe(e,t,n){return e?e.concat(t).map(function(s,o){return s=rt(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function an(e){return a.isArray(e)&&!e.some(ge)}const cn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function le(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,E){return!a.isUndefined(E[f])});const r=n.metaTokens,s=n.visitor||m,o=n.dots,i=n.indexes,c=n.Blob||typeof Blob<"u"&&Blob,d=n.maxDepth===void 0?100:n.maxDepth,l=c&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(a.isBoolean(p))return p.toString();if(!l&&a.isBlob(p))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function m(p,f,E){let U=p;if(a.isReactNative(t)&&a.isReactNativeBlob(p))return t.append(pe(E,f,o),u(p)),!1;if(p&&!E&&typeof p=="object"){if(a.endsWith(f,"{}"))f=r?f:f.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&an(p)||(a.isFileList(p)||a.endsWith(f,"[]"))&&(U=a.toArray(p)))return f=rt(f),U.forEach(function(R,A){!(a.isUndefined(R)||R===null)&&t.append(i===!0?pe([f],A,o):i===null?f:f+"[]",u(R))}),!1}return ge(p)?!0:(t.append(pe(E,f,o),u(p)),!1)}const w=[],b=Object.assign(cn,{defaultVisitor:m,convertValue:u,isVisitable:ge});function h(p,f,E=0){if(!a.isUndefined(p)){if(E>d)throw new y("Object is too deeply nested ("+E+" levels). Max depth: "+d,y.ERR_FORM_DATA_DEPTH_EXCEEDED);if(w.indexOf(p)!==-1)throw Error("Circular reference detected in "+f.join("."));w.push(p),a.forEach(p,function(O,R){(!(a.isUndefined(O)||O===null)&&s.call(t,O,a.isString(R)?R.trim():R,f,b))===!0&&h(O,f?f.concat(R):[R],E+1)}),w.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return h(e),t}function Le(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Re(e,t){this._pairs=[],e&&le(e,this,t)}const st=Re.prototype;st.append=function(t,n){this._pairs.push([t,n])};st.toString=function(t){const n=t?function(r){return t.call(this,r,Le)}:Le;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function un(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ot(e,t,n){if(!t)return e;const r=n&&n.encode||un,s=a.isFunction(n)?{serialize:n}:n,o=s&&s.serialize;let i;if(o?i=o(t,s):i=a.isURLSearchParams(t)?t.toString():new Re(t,s).toString(r),i){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Be{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Se={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ln=typeof URLSearchParams<"u"?URLSearchParams:Re,fn=typeof FormData<"u"?FormData:null,dn=typeof Blob<"u"?Blob:null,pn={isBrowser:!0,classes:{URLSearchParams:ln,FormData:fn,Blob:dn},protocols:["http","https","file","blob","url","data"]},Oe=typeof window<"u"&&typeof document<"u",be=typeof navigator=="object"&&navigator||void 0,hn=Oe&&(!be||["ReactNative","NativeScript","NS"].indexOf(be.product)<0),mn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yn=Oe&&window.location.href||"http://localhost",wn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Oe,hasStandardBrowserEnv:hn,hasStandardBrowserWebWorkerEnv:mn,navigator:be,origin:yn},Symbol.toStringTag,{value:"Module"})),T={...wn,...pn};function gn(e,t){return le(e,new T.classes.URLSearchParams,{visitor:function(n,r,s,o){return T.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function bn(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function En(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=n.length;return i=!i&&a.isArray(s)?s.length:i,d?(a.hasOwnProp(s,i)?s[i]=a.isArray(s[i])?s[i].concat(r):[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=En(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(bn(r),s,n,0)}),n}return null}const M=(e,t)=>e!=null&&a.hasOwnProp(e,t)?e[t]:void 0;function Rn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const G={transitional:Se,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(it(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){const d=M(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return gn(t,d).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=M(this,"env"),u=l&&l.FormData;return le(c?{"files[]":t}:t,u&&new u,d)}}return o||s?(n.setContentType("application/json",!1),Rn(t)):t}],transformResponse:[function(t){const n=M(this,"transitional")||G.transitional,r=n&&n.forcedJSONParsing,s=M(this,"responseType"),o=s==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!s||o)){const c=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,M(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?y.from(d,y.ERR_BAD_RESPONSE,this,null,M(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T.classes.FormData,Blob:T.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{G.headers[e]={}});const Sn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),On=e=>{const t={};let n,r,s;return e&&e.split(` +`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Sn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ke=Symbol("internals"),Tn=/[^\x09\x20-\x7E\x80-\xFF]/g;function An(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function V(e){return e&&String(e).trim().toLowerCase()}function Cn(e){return An(e.replace(Tn,""))}function re(e){return e===!1||e==null?e:a.isArray(e)?e.map(re):Cn(String(e))}function xn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const _n=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function he(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function Pn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Nn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let _=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,d,l){const u=V(d);if(!u)throw new Error("header name must be a non-empty string");const m=a.findKey(s,u);(!m||s[m]===void 0||l===!0||l===void 0&&s[m]!==!1)&&(s[m||d]=re(c))}const i=(c,d)=>a.forEach(c,(l,u)=>o(l,u,d));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!_n(t))i(On(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},d,l;for(const u of t){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[l=u[0]]=(d=c[l])?a.isArray(d)?[...d,u[1]]:[d,u[1]]:u[1]}i(c,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=V(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return xn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=V(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||he(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=V(i),i){const c=a.findKey(r,i);c&&(!n||he(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||he(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=re(s),delete n[o];return}const c=t?Pn(o):String(o).trim();c!==o&&delete n[o],n[c]=re(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[ke]=this[ke]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=V(i);r[c]||(Nn(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}};_.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(_.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(_);function me(e,t){const n=this||G,r=t||n,s=_.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function at(e){return!!(e&&e.__CANCEL__)}let Q=class extends y{constructor(t,n,r){super(t??"canceled",y.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function ct(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Dn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Fn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(d){const l=Date.now(),u=r[o];i||(i=l),n[s]=d,r[s]=l;let m=o,w=0;for(;m!==s;)w+=n[m++],m=m%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),l-i{n=u,s=null,o&&(clearTimeout(o),o=null),e(...l)};return[(...l)=>{const u=Date.now(),m=u-n;m>=r?i(l,u):(s=l,o||(o=setTimeout(()=>{o=null,i(s)},r-m)))},()=>s&&i(s)]}const oe=(e,t,n=3)=>{let r=0;const s=Fn(50,250);return Un(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,d=c!=null?Math.min(i,c):i,l=Math.max(0,d-r),u=s(l);r=Math.max(r,d);const m={loaded:d,total:c,progress:c?d/c:void 0,bytes:l,rate:u||void 0,estimated:u&&c?(c-d)/u:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},n)},je=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ie=e=>(...t)=>a.asap(()=>e(...t)),Ln=T.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,T.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(T.origin),T.navigator&&/(msie|trident)/i.test(T.navigator.userAgent)):()=>!0,Bn=T.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),a.isString(r)&&c.push(`path=${r}`),a.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),a.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function kn(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function jn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ut(e,t,n){let r=!kn(t);return e&&(r||n===!1)?jn(e,t):t}const qe=e=>e instanceof _?{...e}:e;function q(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(l,u,m,w){return a.isPlainObject(l)&&a.isPlainObject(u)?a.merge.call({caseless:w},l,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function s(l,u,m,w){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l,m,w)}else return r(l,u,m,w)}function o(l,u){if(!a.isUndefined(u))return r(void 0,u)}function i(l,u){if(a.isUndefined(u)){if(!a.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function c(l,u,m){if(a.hasOwnProp(t,m))return r(l,u);if(a.hasOwnProp(e,m))return r(void 0,l)}const d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:c,headers:(l,u,m)=>s(qe(l),qe(u),m,!0)};return a.forEach(Object.keys({...e,...t}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const m=a.hasOwnProp(d,u)?d[u]:s,w=a.hasOwnProp(e,u)?e[u]:void 0,b=a.hasOwnProp(t,u)?t[u]:void 0,h=m(w,b,u);a.isUndefined(h)&&m!==c||(n[u]=h)}),n}const lt=e=>{const t=q({},e),n=w=>a.hasOwnProp(t,w)?t[w]:void 0,r=n("data");let s=n("withXSRFToken");const o=n("xsrfHeaderName"),i=n("xsrfCookieName");let c=n("headers");const d=n("auth"),l=n("baseURL"),u=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=_.from(c),t.url=ot(ut(l,m,u),e.params,e.paramsSerializer),d&&c.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):""))),a.isFormData(r)){if(T.hasStandardBrowserEnv||T.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if(a.isFunction(r.getHeaders)){const w=r.getHeaders(),b=["content-type","content-length"];Object.entries(w).forEach(([h,p])=>{b.includes(h.toLowerCase())&&c.set(h,p)})}}if(T.hasStandardBrowserEnv&&(a.isFunction(s)&&(s=s(t)),s===!0||s==null&&Ln(t.url))){const b=o&&i&&Bn.read(i);b&&c.set(o,b)}return t},In=typeof XMLHttpRequest<"u",qn=In&&function(e){return new Promise(function(n,r){const s=lt(e);let o=s.data;const i=_.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:l}=s,u,m,w,b,h;function p(){b&&b(),h&&h(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(s.method.toUpperCase(),s.url,!0),f.timeout=s.timeout;function E(){if(!f)return;const O=_.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),A={data:!c||c==="text"||c==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:O,config:e,request:f};ct(function(P){n(P),p()},function(P){r(P),p()},A),f=null}"onloadend"in f?f.onloadend=E:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(E)},f.onabort=function(){f&&(r(new y("Request aborted",y.ECONNABORTED,e,f)),f=null)},f.onerror=function(R){const A=R&&R.message?R.message:"Network Error",B=new y(A,y.ERR_NETWORK,e,f);B.event=R||null,r(B),f=null},f.ontimeout=function(){let R=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const A=s.transitional||Se;s.timeoutErrorMessage&&(R=s.timeoutErrorMessage),r(new y(R,A.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,f)),f=null},o===void 0&&i.setContentType(null),"setRequestHeader"in f&&a.forEach(i.toJSON(),function(R,A){f.setRequestHeader(A,R)}),a.isUndefined(s.withCredentials)||(f.withCredentials=!!s.withCredentials),c&&c!=="json"&&(f.responseType=s.responseType),l&&([w,h]=oe(l,!0),f.addEventListener("progress",w)),d&&f.upload&&([m,b]=oe(d),f.upload.addEventListener("progress",m),f.upload.addEventListener("loadend",b)),(s.cancelToken||s.signal)&&(u=O=>{f&&(r(!O||O.type?new Q(null,e,f):O),f.abort(),f=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const U=Dn(s.url);if(U&&T.protocols.indexOf(U)===-1){r(new y("Unsupported protocol "+U+":",y.ERR_BAD_REQUEST,e));return}f.send(o||null)})},Hn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(l){if(!s){s=!0,c();const u=l instanceof Error?l:this.reason;r.abort(u instanceof y?u:new Q(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,o(new y(`timeout of ${t}ms exceeded`,y.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:d}=r;return d.unsubscribe=()=>a.asap(c),d}},Mn=function*(e,t){let n=e.byteLength;if(n{const s=$n(e,t);let o=0,i,c=d=>{i||(i=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:l,value:u}=await s.next();if(l){c(),d.close();return}let m=u.byteLength;if(n){let w=o+=m;n(w)}d.enqueue(new Uint8Array(u))}catch(l){throw c(l),l}},cancel(d){return c(d),s.return()}},{highWaterMark:2})},Me=64*1024,{isFunction:te}=a,vn=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:$e,TextEncoder:ze}=a.global,ve=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Jn=e=>{e=a.merge.call({skipUndefined:!0},vn,e);const{fetch:t,Request:n,Response:r}=e,s=t?te(t):typeof fetch=="function",o=te(n),i=te(r);if(!s)return!1;const c=s&&te($e),d=s&&(typeof ze=="function"?(h=>p=>h.encode(p))(new ze):async h=>new Uint8Array(await new n(h).arrayBuffer())),l=o&&c&&ve(()=>{let h=!1;const p=new n(T.origin,{body:new $e,method:"POST",get duplex(){return h=!0,"half"}}),f=p.headers.has("Content-Type");return p.body!=null&&p.body.cancel(),h&&!f}),u=i&&c&&ve(()=>a.isReadableStream(new r("").body)),m={stream:u&&(h=>h.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!m[h]&&(m[h]=(p,f)=>{let E=p&&p[h];if(E)return E.call(p);throw new y(`Response type '${h}' is not supported`,y.ERR_NOT_SUPPORT,f)})});const w=async h=>{if(h==null)return 0;if(a.isBlob(h))return h.size;if(a.isSpecCompliantForm(h))return(await new n(T.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(a.isArrayBufferView(h)||a.isArrayBuffer(h))return h.byteLength;if(a.isURLSearchParams(h)&&(h=h+""),a.isString(h))return(await d(h)).byteLength},b=async(h,p)=>{const f=a.toFiniteNumber(h.getContentLength());return f??w(p)};return async h=>{let{url:p,method:f,data:E,signal:U,cancelToken:O,timeout:R,onDownloadProgress:A,onUploadProgress:B,responseType:P,headers:v,withCredentials:Z="same-origin",fetchOptions:Ae}=lt(h),Ce=t||fetch;P=P?(P+"").toLowerCase():"text";let Y=Hn([U,O&&O.toAbortSignal()],R),J=null;const k=Y&&Y.unsubscribe&&(()=>{Y.unsubscribe()});let xe;try{if(B&&l&&f!=="get"&&f!=="head"&&(xe=await b(v,E))!==0){let N=new n(p,{method:"POST",body:E,duplex:"half"}),H;if(a.isFormData(E)&&(H=N.headers.get("content-type"))&&v.setContentType(H),N.body){const[de,ee]=je(xe,oe(Ie(B)));E=He(N.body,Me,de,ee)}}a.isString(Z)||(Z=Z?"include":"omit");const C=o&&"credentials"in n.prototype;if(a.isFormData(E)){const N=v.getContentType();N&&/^multipart\/form-data/i.test(N)&&!/boundary=/i.test(N)&&v.delete("content-type")}const _e={...Ae,signal:Y,method:f.toUpperCase(),headers:v.normalize().toJSON(),body:E,duplex:"half",credentials:C?Z:void 0};J=o&&new n(p,_e);let L=await(o?Ce(J,Ae):Ce(p,_e));const Pe=u&&(P==="stream"||P==="response");if(u&&(A||Pe&&k)){const N={};["status","statusText","headers"].forEach(Ne=>{N[Ne]=L[Ne]});const H=a.toFiniteNumber(L.headers.get("content-length")),[de,ee]=A&&je(H,oe(Ie(A),!0))||[];L=new r(He(L.body,Me,de,()=>{ee&&ee(),k&&k()}),N)}P=P||"text";let yt=await m[a.findKey(m,P)||"text"](L,h);return!Pe&&k&&k(),await new Promise((N,H)=>{ct(N,H,{data:yt,headers:_.from(L.headers),status:L.status,statusText:L.statusText,config:h,request:J})})}catch(C){throw k&&k(),C&&C.name==="TypeError"&&/Load failed|fetch/i.test(C.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,h,J,C&&C.response),{cause:C.cause||C}):y.from(C,C&&C.code,h,J,C&&C.response)}}},Vn=new Map,ft=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,c=i,d,l,u=Vn;for(;c--;)d=o[c],l=u.get(d),l===void 0&&u.set(d,l=c?new Map:Jn(t)),u=l;return l};ft();const Te={http:on,xhr:qn,fetch:{get:ft}};a.forEach(Te,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Je=e=>`- ${e}`,Wn=e=>a.isFunction(e)||e===null||e===!1;function Kn(e,t){e=a.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i`adapter ${d} `+(l===!1?"is not supported by the environment":"is not available in the build"));let c=n?i.length>1?`since : +`+i.map(Je).join(` +`):" "+Je(i[0]):"as no adapter specified";throw new y("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const dt={getAdapter:Kn,adapters:Te};function ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Q(null,e)}function Ve(e){return ye(e),e.headers=_.from(e.headers),e.data=me.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),dt.getAdapter(e.adapter||G.adapter,e)(e).then(function(r){return ye(e),r.data=me.call(e,e.transformResponse,r),r.headers=_.from(r.headers),r},function(r){return at(r)||(ye(e),r&&r.response&&(r.response.data=me.call(e,e.transformResponse,r.response),r.response.headers=_.from(r.response.headers))),Promise.reject(r)})}const pt="1.15.2",fe={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fe[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const We={};fe.transitional=function(t,n,r){function s(o,i){return"[Axios v"+pt+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new y(s(i," has been removed"+(n?" in "+n:"")),y.ERR_DEPRECATED);return n&&!We[i]&&(We[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};fe.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Xn(e,t,n){if(typeof e!="object")throw new y("options must be an object",y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const c=e[o],d=c===void 0||i(c,o,e);if(d!==!0)throw new y("option "+o+" must be "+d,y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new y("Unknown option "+o,y.ERR_BAD_OPTION)}}const se={assertOptions:Xn,validators:fe},D=se.validators;let I=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Be,response:new Be}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=(()=>{if(!s.stack)return"";const i=s.stack.indexOf(` +`);return i===-1?"":s.stack.slice(i+1)})();try{if(!r.stack)r.stack=o;else if(o){const i=o.indexOf(` +`),c=i===-1?-1:o.indexOf(` +`,i+1),d=c===-1?"":o.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=` +`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=q(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&se.assertOptions(r,{silentJSONParsing:D.transitional(D.boolean),forcedJSONParsing:D.transitional(D.boolean),clarifyTimeoutError:D.transitional(D.boolean),legacyInterceptorReqResOrdering:D.transitional(D.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:se.assertOptions(s,{encode:D.function,serialize:D.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),se.assertOptions(n,{baseUrl:D.spelling("baseURL"),withXsrfToken:D.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=_.concat(i,o);const c=[];let d=!0;this.interceptors.request.forEach(function(p){if(typeof p.runWhen=="function"&&p.runWhen(n)===!1)return;d=d&&p.synchronous;const f=n.transitional||Se;f&&f.legacyInterceptorReqResOrdering?c.unshift(p.fulfilled,p.rejected):c.push(p.fulfilled,p.rejected)});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let u,m=0,w;if(!d){const h=[Ve.bind(this),void 0];for(h.unshift(...c),h.push(...l),w=h.length,u=Promise.resolve(n);m{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new Q(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ht(function(s){t=s}),cancel:t}}};function Qn(e){return function(n){return e.apply(null,n)}}function Zn(e){return a.isObject(e)&&e.isAxiosError===!0}const Ee={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ee).forEach(([e,t])=>{Ee[t]=e});function mt(e){const t=new I(e),n=Ke(I.prototype.request,t);return a.extend(n,I.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return mt(q(e,s))},n}const S=mt(G);S.Axios=I;S.CanceledError=Q;S.CancelToken=Gn;S.isCancel=at;S.VERSION=pt;S.toFormData=le;S.AxiosError=y;S.Cancel=S.CanceledError;S.all=function(t){return Promise.all(t)};S.spread=Qn;S.isAxiosError=Zn;S.mergeConfig=q;S.AxiosHeaders=_;S.formToJSON=e=>it(a.isHTMLForm(e)?new FormData(e):e);S.getAdapter=dt.getAdapter;S.HttpStatusCode=Ee;S.default=S;const{Axios:nr,AxiosError:rr,CanceledError:sr,isCancel:or,CancelToken:ir,VERSION:ar,all:cr,Cancel:ur,isAxiosError:lr,spread:fr,toFormData:dr,AxiosHeaders:pr,HttpStatusCode:hr,formToJSON:mr,getAdapter:yr,mergeConfig:wr}=S,g=S.create({baseURL:"/api",timeout:3e4});g.interceptors.request.use(e=>{const t=localStorage.getItem("admin_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});g.interceptors.response.use(e=>e,e=>{var t,n,r;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem("admin_token"),!window.location.pathname.startsWith("/admin/login")&&!((r=(n=e.config)==null?void 0:n.url)!=null&&r.includes("/admin/login"))&&(window.location.href="/admin/login")),Promise.reject(e)});async function gr(e,t=1){const{data:n}=await g.post("/query",{q:e,page:t});return n}async function br(e,t){var s,o,i;const n=localStorage.getItem("admin_token"),r={"Content-Type":"application/json"};n&&(r.Authorization=`Bearer ${n}`);try{const c=await fetch("/api/query",{method:"POST",headers:r,body:JSON.stringify({q:e})});if(!c.ok)throw new Error(`HTTP ${c.status}`);const d=c.body.getReader(),l=new TextDecoder;let u="";for(;;){const{done:m,value:w}=await d.read();if(m)break;u+=l.decode(w,{stream:!0});const b=u.split(` +`);u=b.pop()||"";for(const h of b)if(h.trim())try{const p=JSON.parse(h);switch(p.type){case"searching":(s=t.onSearching)==null||s.call(t);break;case"saved":(o=t.onSaved)==null||o.call(t,p);break;case"stats":t.onStats(p);break;case"result":t.onResult(p.id,p.valid,p.message);break;case"complete":t.onComplete(p);break}}catch{}}}catch(c){(i=t.onError)==null||i.call(t,c)}}async function Er(e){const{data:t}=await g.post("/save",e);return t}async function Rr(e){const{data:t}=await g.post("/video/save-to-cloud",e);return t}async function Sr(){const{data:e}=await g.get("/rankings/categorized");return e}async function Or(e,t){const{data:n}=await g.post("/admin/login",{username:e,password:t});return n}async function Tr(){const{data:e}=await g.get("/me");return e}async function Ar(){const{data:e}=await g.get("/admin/cloud-configs");return e}async function Cr(e){const{data:t}=await g.post("/admin/cloud-configs",e);return t}async function xr(e){const{data:t}=await g.put(`/admin/cloud-configs/${e.id}`,e);return t}async function _r(e,t,n){const{data:r}=await g.post(`/admin/cloud-configs/${e}/test`,{cookie:t,id:n});return r}async function Pr(e){await g.delete(`/admin/cloud-configs/${e}`)}async function Nr(e){const t={};e&&(t.days=e);const{data:n}=await g.get("/admin/stats",{params:t});return n}async function Dr(e=1,t=20,n,r,s,o,i){const c={page:e,pageSize:t};n&&(c.startDate=n),r&&(c.endDate=r),s&&(c.status=s),o&&(c.sourceType=o),i&&(c.keyword=i);const{data:d}=await g.get("/admin/save-records",{params:c});return d}async function Fr(){const{data:e}=await g.get("/admin/system-configs");return e}async function Ur(e){await g.put("/admin/system-configs",{entries:e})}async function Lr(){const{data:e}=await g.get("/admin/cloud-types");return e}async function Br(e,t){await g.put("/admin/cloud-types",{type:e,enabled:t})}async function kr(e,t){const{data:n}=await g.post("/admin/change-password",{oldPassword:e,newPassword:t});return n}async function jr(e,t){await g.put("/admin/system-configs",{entries:[{key:e,value:t}]})}async function Ir(e){const t=new FormData;t.append("image",e);const{data:n}=await g.post("/admin/upload-logo",t,{headers:{"Content-Type":"multipart/form-data"}});return n}async function qr(){const{data:e}=await g.get("/site-config");return e}async function Hr(e){const{data:t}=await g.post("/admin/test-redis",{url:e});return t}async function Mr(e){const{data:t}=await g.post("/admin/test-external-service",e);return t}async function $r(){const{data:e}=await g.get("/admin/db-status");return e}async function zr(){const{data:e}=await g.post("/admin/cleanup/run");return e}async function vr(){const{data:e}=await g.post("/admin/cleanup/empty-trash");return e}const Jr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n};export{Dr as A,Jr as _,qr as a,Tr as b,Lr as c,Or as d,Er as e,Rr as f,Sr as g,Ar as h,Nr as i,_r as j,Cr as k,Pr as l,Fr as m,Ur as n,vr as o,$r as p,gr as q,zr as r,br as s,Br as t,xr as u,Hr as v,Mr as w,kr as x,Ir as y,jr as z}; diff --git a/source_clean/frontend/assets/browser-JP79f-a9.js b/source_clean/frontend/assets/browser-JP79f-a9.js new file mode 100644 index 0000000..6332d0b --- /dev/null +++ b/source_clean/frontend/assets/browser-JP79f-a9.js @@ -0,0 +1,8 @@ +var O={},bt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},dt={},I={};let it;const Rt=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];I.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};I.getSymbolTotalCodewords=function(t){return Rt[t]};I.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};I.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');it=t};I.isKanjiModeEnabled=function(){return typeof it<"u"};I.toSJIS=function(t){return it(t)};var j={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+i)}}e.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},e.from=function(o,n){if(e.isValid(o))return o;try{return t(o)}catch{return n}}})(j);function ht(){this.buffer=[],this.length=0}ht.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let i=0;i>>t-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var Lt=ht;function V(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}V.prototype.set=function(e,t,i,o){const n=e*this.size+t;this.data[n]=i,o&&(this.reservedBit[n]=!0)};V.prototype.get=function(e,t){return this.data[e*this.size+t]};V.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i};V.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var _t=V,wt={};(function(e){const t=I.getSymbolSize;e.getRowColCoords=function(o){if(o===1)return[];const n=Math.floor(o/7)+2,r=t(o),s=r===145?26:Math.ceil((r-13)/(2*n-2))*2,c=[r-7];for(let u=1;u=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const r=n.size;let s=0,c=0,u=0,a=null,l=null;for(let p=0;p=5&&(s+=t.N1+(c-5)),a=f,c=1),f=n.get(w,p),f===l?u++:(u>=5&&(s+=t.N1+(u-5)),l=f,u=1)}c>=5&&(s+=t.N1+(c-5)),u>=5&&(s+=t.N1+(u-5))}return s},e.getPenaltyN2=function(n){const r=n.size;let s=0;for(let c=0;c=10&&(c===1488||c===93)&&s++,u=u<<1&2047|n.get(l,a),l>=10&&(u===1488||u===93)&&s++}return s*t.N3},e.getPenaltyN4=function(n){let r=0;const s=n.data.length;for(let u=0;u=0;){const s=r[0];for(let u=0;u0){const r=new Uint8Array(this.degree);return r.set(o,n),r}return o};var Ut=st,pt={},L={},ut={};ut.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var P={};const Bt="[0-9]+",Ft="[A-Z $%*+\\-./:]+";let v="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";v=v.replace(/u/g,"\\u");const kt="(?:(?![A-Z0-9 $%*+\\-./:]|"+v+`)(?:.|[\r +]))+`;P.KANJI=new RegExp(v,"g");P.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");P.BYTE=new RegExp(kt,"g");P.NUMERIC=new RegExp(Bt,"g");P.ALPHANUMERIC=new RegExp(Ft,"g");const zt=new RegExp("^"+v+"$"),vt=new RegExp("^"+Bt+"$"),Vt=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");P.testKanji=function(t){return zt.test(t)};P.testNumeric=function(t){return vt.test(t)};P.testAlphanumeric=function(t){return Vt.test(t)};(function(e){const t=ut,i=P;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(r,s){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?r.ccBits[0]:s<27?r.ccBits[1]:r.ccBits[2]},e.getBestModeForData=function(r){return i.testNumeric(r)?e.NUMERIC:i.testAlphanumeric(r)?e.ALPHANUMERIC:i.testKanji(r)?e.KANJI:e.BYTE},e.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},e.isValid=function(r){return r&&r.bit&&r.ccBits};function o(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}e.from=function(r,s){if(e.isValid(r))return r;try{return o(r)}catch{return s}}})(L);(function(e){const t=I,i=G,o=j,n=L,r=ut,s=7973,c=t.getBCHDigit(s);function u(w,f,m){for(let y=1;y<=40;y++)if(f<=e.getCapacity(y,m,w))return y}function a(w,f){return n.getCharCountIndicator(w,f)+4}function l(w,f){let m=0;return w.forEach(function(y){const T=a(y.mode,f);m+=T+y.getBitsLength()}),m}function p(w,f){for(let m=1;m<=40;m++)if(l(w,m)<=e.getCapacity(m,f,n.MIXED))return m}e.from=function(f,m){return r.isValid(f)?parseInt(f,10):m},e.getCapacity=function(f,m,y){if(!r.isValid(f))throw new Error("Invalid QR Code version");typeof y>"u"&&(y=n.BYTE);const T=t.getSymbolTotalCodewords(f),h=i.getTotalCodewordsCount(f,m),E=(T-h)*8;if(y===n.MIXED)return E;const d=E-a(y,f);switch(y){case n.NUMERIC:return Math.floor(d/10*3);case n.ALPHANUMERIC:return Math.floor(d/11*2);case n.KANJI:return Math.floor(d/13);case n.BYTE:default:return Math.floor(d/8)}},e.getBestVersionForData=function(f,m){let y;const T=o.from(m,o.M);if(Array.isArray(f)){if(f.length>1)return p(f,T);if(f.length===0)return 1;y=f[0]}else y=f;return u(y.mode,y.getLength(),T)},e.getEncodedBits=function(f){if(!r.isValid(f)||f<7)throw new Error("Invalid QR Code version");let m=f<<12;for(;t.getBCHDigit(m)-c>=0;)m^=s<=0;)n^=Tt<0&&(o=this.data.substr(i),n=parseInt(o,10),t.put(n,r*3+1))};var Jt=_;const Yt=L,Z=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function D(e){this.mode=Yt.ALPHANUMERIC,this.data=e}D.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(t){let i;for(i=0;i+2<=this.data.length;i+=2){let o=Z.indexOf(this.data[i])*45;o+=Z.indexOf(this.data[i+1]),t.put(o,11)}this.data.length%2&&t.put(Z.indexOf(this.data[i]),6)};var Ot=D;const jt=L;function U(e){this.mode=jt.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}U.getBitsLength=function(t){return t*8};U.prototype.getLength=function(){return this.data.length};U.prototype.getBitsLength=function(){return U.getBitsLength(this.data.length)};U.prototype.write=function(e){for(let t=0,i=this.data.length;t=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+` +Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),e.put(i,13)}};var Wt=F,Nt={exports:{}};(function(e){var t={single_source_shortest_paths:function(i,o,n){var r={},s={};s[o]=0;var c=t.PriorityQueue.make();c.push(o,0);for(var u,a,l,p,w,f,m,y,T;!c.empty();){u=c.pop(),a=u.value,p=u.cost,w=i[a]||{};for(l in w)w.hasOwnProperty(l)&&(f=w[l],m=p+f,y=s[l],T=typeof s[l]>"u",(T||y>m)&&(s[l]=m,c.push(l,m),r[l]=a))}if(typeof n<"u"&&typeof s[n]>"u"){var h=["Could not find a path from ",o," to ",n,"."].join("");throw new Error(h)}return r},extract_shortest_path_from_predecessor_list:function(i,o){for(var n=[],r=o;r;)n.push(r),i[r],r=i[r];return n.reverse(),n},find_path:function(i,o,n){var r=t.single_source_shortest_paths(i,o,n);return t.extract_shortest_path_from_predecessor_list(r,n)},PriorityQueue:{make:function(i){var o=t.PriorityQueue,n={},r;i=i||{};for(r in o)o.hasOwnProperty(r)&&(n[r]=o[r]);return n.queue=[],n.sorter=i.sorter||o.default_sorter,n},default_sorter:function(i,o){return i.cost-o.cost},push:function(i,o){var n={value:i,cost:o};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Nt);var Zt=Nt.exports;(function(e){const t=L,i=Jt,o=Ot,n=Gt,r=Wt,s=P,c=I,u=Zt;function a(h){return unescape(encodeURIComponent(h)).length}function l(h,E,d){const g=[];let C;for(;(C=h.exec(d))!==null;)g.push({data:C[0],index:C.index,mode:E,length:C[0].length});return g}function p(h){const E=l(s.NUMERIC,t.NUMERIC,h),d=l(s.ALPHANUMERIC,t.ALPHANUMERIC,h);let g,C;return c.isKanjiModeEnabled()?(g=l(s.BYTE,t.BYTE,h),C=l(s.KANJI,t.KANJI,h)):(g=l(s.BYTE_KANJI,t.BYTE,h),C=[]),E.concat(d,g,C).sort(function(A,N){return A.index-N.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function w(h,E){switch(E){case t.NUMERIC:return i.getBitsLength(h);case t.ALPHANUMERIC:return o.getBitsLength(h);case t.KANJI:return r.getBitsLength(h);case t.BYTE:return n.getBitsLength(h)}}function f(h){return h.reduce(function(E,d){const g=E.length-1>=0?E[E.length-1]:null;return g&&g.mode===d.mode?(E[E.length-1].data+=d.data,E):(E.push(d),E)},[])}function m(h){const E=[];for(let d=0;d=0&&c<=6&&(u===0||u===6)||u>=0&&u<=6&&(c===0||c===6)||c>=2&&c<=4&&u>=2&&u<=4?e.set(r+c,s+u,!0,!0):e.set(r+c,s+u,!1,!0))}}function ie(e){const t=e.size;for(let i=8;i>c&1)===1,e.set(n,r,s,!0),e.set(r,n,s,!0)}function $(e,t,i){const o=e.size,n=ne.getEncodedBits(t,i);let r,s;for(r=0;r<15;r++)s=(n>>r&1)===1,r<6?e.set(r,8,s,!0):r<8?e.set(r+1,8,s,!0):e.set(o-15+r,8,s,!0),r<8?e.set(8,o-r-1,s,!0):r<9?e.set(8,15-r-1+1,s,!0):e.set(8,15-r-1,s,!0);e.set(o-8,8,1,!0)}function ce(e,t){const i=e.size;let o=-1,n=i-1,r=7,s=0;for(let c=i-1;c>0;c-=2)for(c===6&&c--;;){for(let u=0;u<2;u++)if(!e.isReserved(n,c-u)){let a=!1;s>>r&1)===1),e.set(n,c-u,a),r--,r===-1&&(s++,r=7)}if(n+=o,n<0||i<=n){n-=o,o=-o;break}}}function ae(e,t,i){const o=new Xt;i.forEach(function(u){o.put(u.mode.bit,4),o.put(u.getLength(),oe.getCharCountIndicator(u.mode,e)),u.write(o)});const n=q.getSymbolTotalCodewords(e),r=ot.getTotalCodewordsCount(e,t),s=(n-r)*8;for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const c=(s-o.getLengthInBits())/8;for(let u=0;u=7&&ue(u,t),ce(u,s),isNaN(o)&&(o=nt.getBestMask(u,$.bind(null,u,i))),nt.applyMask(o,u),$(u,i,o),{modules:u,version:t,errorCorrectionLevel:i,maskPattern:o,segments:n}}dt.create=function(t,i){if(typeof t>"u"||t==="")throw new Error("No input text");let o=X.M,n,r;return typeof i<"u"&&(o=X.from(i.errorCorrectionLevel,X.M),n=Y.from(i.version),r=nt.from(i.maskPattern),i.toSJISFunc&&q.setToSJISFunction(i.toSJISFunc)),fe(t,n,o,r)};var Mt={},ct={};(function(e){function t(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let o=i.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+i);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(r){return[r,r]}))),o.length===6&&o.push("F","F");const n=parseInt(o.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+o.slice(0,6).join("")}}e.getOptions=function(o){o||(o={}),o.color||(o.color={});const n=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,r=o.width&&o.width>=21?o.width:void 0,s=o.scale||4;return{width:r,scale:r?4:s,margin:n,color:{dark:t(o.color.dark||"#000000ff"),light:t(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},e.getScale=function(o,n){return n.width&&n.width>=o+n.margin*2?n.width/(o+n.margin*2):n.scale},e.getImageWidth=function(o,n){const r=e.getScale(o,n);return Math.floor((o+n.margin*2)*r)},e.qrToImageData=function(o,n,r){const s=n.modules.size,c=n.modules.data,u=e.getScale(s,r),a=Math.floor((s+r.margin*2)*u),l=r.margin*u,p=[r.color.light,r.color.dark];for(let w=0;w=l&&f>=l&&w"u"&&(!s||!s.getContext)&&(u=s,s=void 0),s||(a=o()),u=t.getOptions(u);const l=t.getImageWidth(r.modules.size,u),p=a.getContext("2d"),w=p.createImageData(l,l);return t.qrToImageData(w.data,r,u),i(p,a,l),p.putImageData(w,0,0),a},e.renderToDataURL=function(r,s,c){let u=c;typeof u>"u"&&(!s||!s.getContext)&&(u=s,s=void 0),u||(u={});const a=e.render(r,s,u),l=u.type||"image/png",p=u.rendererOpts||{};return a.toDataURL(l,p.quality)}})(Mt);var Pt={};const ge=ct;function gt(e,t){const i=e.a/255,o=t+'="'+e.hex+'"';return i<1?o+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':o}function tt(e,t,i){let o=e+t;return typeof i<"u"&&(o+=" "+i),o}function de(e,t,i){let o="",n=0,r=!1,s=0;for(let c=0;c0&&u>0&&e[c-1]||(o+=r?tt("M",u+i,.5+a+i):tt("m",n,0),n=0,r=!1),u+1':"",a="',l='viewBox="0 0 '+c+" "+c+'"',w=''+u+a+` +`;return typeof o=="function"&&o(null,w),w};const he=bt,rt=dt,St=Mt,we=Pt;function at(e,t,i,o,n){const r=[].slice.call(arguments,1),s=r.length,c=typeof r[s-1]=="function";if(!c&&!he())throw new Error("Callback required as last argument");if(c){if(s<2)throw new Error("Too few arguments provided");s===2?(n=i,i=t,t=o=void 0):s===3&&(t.getContext&&typeof n>"u"?(n=o,o=void 0):(n=o,o=i,i=t,t=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(i=t,t=o=void 0):s===2&&!t.getContext&&(o=i,i=t,t=void 0),new Promise(function(u,a){try{const l=rt.create(i,o);u(e(l,t,o))}catch(l){a(l)}})}try{const u=rt.create(i,o);n(null,e(u,t,o))}catch(u){n(u)}}O.create=rt.create;O.toCanvas=at.bind(null,St.render);O.toDataURL=at.bind(null,St.renderToDataURL);O.toString=at.bind(null,function(e,t,i){return we.render(e,i)});export{O as b}; diff --git a/source_clean/frontend/assets/index-Bz21yOih.js b/source_clean/frontend/assets/index-Bz21yOih.js new file mode 100644 index 0000000..3049304 --- /dev/null +++ b/source_clean/frontend/assets/index-Bz21yOih.js @@ -0,0 +1 @@ +const a={quark:"夸克网盘",baidu:"百度网盘",aliyun:"阿里云盘",115:"115网盘",tianyi:"天翼云盘","123pan":"123云盘",uc:"UC网盘",xunlei:"迅雷云盘",pikpak:"PikPak",magnet:"磁力链接",ed2k:"电驴链接",others:"其他"},e={quark:"#07c160",baidu:"#4e6ef2",aliyun:"#ff6a00",115:"#9b59b6",tianyi:"#00a1d6","123pan":"#e74c3c",uc:"#f39c12",xunlei:"#2ecc71",pikpak:"#8e44ad",magnet:"#95a5a6",ed2k:"#7f8c8d",others:"#95a5a6"};export{e as C,a}; diff --git a/source_clean/frontend/assets/index-C5b4pIQL.js b/source_clean/frontend/assets/index-C5b4pIQL.js new file mode 100644 index 0000000..70fd8f9 --- /dev/null +++ b/source_clean/frontend/assets/index-C5b4pIQL.js @@ -0,0 +1,92 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomePage-6khP6FBC.js","assets/_plugin-vue_export-helper-CzL5NdOX.js","assets/HomePage-BVcQlSvu.css","assets/SearchResult-An38JvmS.js","assets/browser-JP79f-a9.js","assets/index-Bz21yOih.js","assets/SearchResult-Ck_Ddgrj.css","assets/ResultDetail-CbQPmE-g.js","assets/CloudBadge-sfzDTvGE.js","assets/CloudBadge-JtUrWwGU.css","assets/ResultDetail-CVwsv2ff.css","assets/AdminLogin-xBXneZTD.js","assets/AdminLogin-Dydh9B_2.css","assets/AdminLayout-CxD2j-KS.js","assets/AdminLayout-BX867Wt6.css","assets/AdminDashboard-CYT9FxBx.js","assets/CloudConfig-VN8uR29R.js","assets/CloudConfig-DjBo6Nx5.css","assets/SystemConfig-DRttMhxK.js","assets/SystemConfig-Bz24k5XV.css","assets/SaveRecords-AwnaSQhs.js","assets/SaveRecords-DU_-iTm4.css","assets/AdminDashboard-CxAY_FWD.css","assets/Cleanup-GlGrtKk0.js","assets/Cleanup-xBIb8eSW.css"])))=>i.map(i=>d[i]); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();/** +* @vue/shared v3.5.33 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function bv(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const sn={},Xs=[],_t=()=>{},M0=()=>!1,ed=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),td=e=>e.startsWith("onUpdate:"),On=Object.assign,wv=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},qE=Object.prototype.hasOwnProperty,$t=(e,t)=>qE.call(e,t),be=Array.isArray,Zs=e=>Gi(e)==="[object Map]",nd=e=>Gi(e)==="[object Set]",_l=e=>Gi(e)==="[object Date]",ze=e=>typeof e=="function",De=e=>typeof e=="string",Ea=e=>typeof e=="symbol",ot=e=>e!==null&&typeof e=="object",Pl=e=>(ot(e)||ze(e))&&ze(e.then)&&ze(e.catch),R0=Object.prototype.toString,Gi=e=>R0.call(e),GE=e=>Gi(e).slice(8,-1),bi=e=>Gi(e)==="[object Object]",ad=e=>De(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ai=bv(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),od=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},XE=/-\w/g,Vn=od(e=>e.replace(XE,t=>t.slice(1).toUpperCase())),ZE=/\B([A-Z])/g,ll=od(e=>e.replace(ZE,"-$1").toLowerCase()),Xi=od(e=>e.charAt(0).toUpperCase()+e.slice(1)),oi=od(e=>e?`on${Xi(e)}`:""),ho=(e,t)=>!Object.is(e,t),Zu=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:a,value:n})},Cv=e=>{const t=parseFloat(e);return isNaN(t)?e:t},JE=e=>{const t=De(e)?Number(e):NaN;return isNaN(t)?e:t};let Rm;const ld=()=>Rm||(Rm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function je(e){if(be(e)){const t={};for(let n=0;n{if(n){const a=n.split(ex);a.length>1&&(t[a[0].trim()]=a[1].trim())}}),t}function M(e){let t="";if(De(e))t=e;else if(be(e))for(let n=0;nhs(n,t))}const A0=e=>!!(e&&e.__v_isRef===!0),ke=e=>De(e)?e:e==null?"":be(e)||ot(e)&&(e.toString===R0||!ze(e.toString))?A0(e)?ke(e.value):JSON.stringify(e,L0,2):String(e),L0=(e,t)=>A0(t)?L0(e,t.value):Zs(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[a,o],l)=>(n[tf(a,l)+" =>"]=o,n),{})}:nd(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>tf(n))}:Ea(t)?tf(t):ot(t)&&!be(t)&&!bi(t)?String(t):t,tf=(e,t="")=>{var n;return Ea(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.33 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Ln;class D0{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Ln,!t&&Ln&&(this.index=(Ln.scopes||(Ln.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0){if(Ln===this)Ln=this.prevScope;else{let t=Ln;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,a;for(n=0,a=this.effects.length;n0)return;if(si){let t=si;for(si=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;li;){let t=li;for(li=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(a){e||(e=a)}t=n}}if(e)throw e}function W0(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function j0(e){let t,n=e.depsTail,a=n;for(;a;){const o=a.prevDep;a.version===-1?(a===n&&(n=o),Ev(a),sx(a)):t=a,a.dep.activeLink=a.prevActiveLink,a.prevActiveLink=void 0,a=o}e.deps=t,e.depsTail=n}function Xf(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(U0(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function U0(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===wi)||(e.globalVersion=wi,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Xf(e))))return;e.flags|=2;const t=e.dep,n=dn,a=Fa;dn=e,Fa=!0;try{W0(e);const o=e.fn(e._value);(t.version===0||ho(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{dn=n,Fa=a,j0(e),e.flags&=-3}}function Ev(e,t=!1){const{dep:n,prevSub:a,nextSub:o}=e;if(a&&(a.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=a,e.nextSub=void 0),n.subs===e&&(n.subs=a,!a&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)Ev(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function sx(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Fa=!0;const Y0=[];function Zo(){Y0.push(Fa),Fa=!1}function Jo(){const e=Y0.pop();Fa=e===void 0?!0:e}function Im(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=dn;dn=void 0;try{t()}finally{dn=n}}}let wi=0;class rx{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class xv{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!dn||!Fa||dn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==dn)n=this.activeLink=new rx(dn,this),dn.deps?(n.prevDep=dn.depsTail,dn.depsTail.nextDep=n,dn.depsTail=n):dn.deps=dn.depsTail=n,q0(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const a=n.nextDep;a.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=a),n.prevDep=dn.depsTail,n.nextDep=void 0,dn.depsTail.nextDep=n,dn.depsTail=n,dn.deps===n&&(dn.deps=a)}return n}trigger(t){this.version++,wi++,this.notify(t)}notify(t){Sv();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{kv()}}}function q0(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let a=t.deps;a;a=a.nextDep)q0(a)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const mc=new WeakMap,cs=Symbol(""),Zf=Symbol(""),Ci=Symbol("");function qn(e,t,n){if(Fa&&dn){let a=mc.get(e);a||mc.set(e,a=new Map);let o=a.get(n);o||(a.set(n,o=new xv),o.map=a,o.key=n),o.track()}}function zo(e,t,n,a,o,l){const s=mc.get(e);if(!s){wi++;return}const r=u=>{u&&u.trigger()};if(Sv(),t==="clear")s.forEach(r);else{const u=be(e),c=u&&ad(n);if(u&&n==="length"){const d=Number(a);s.forEach((f,p)=>{(p==="length"||p===Ci||!Ea(p)&&p>=d)&&r(f)})}else switch((n!==void 0||s.has(void 0))&&r(s.get(n)),c&&r(s.get(Ci)),t){case"add":u?c&&r(s.get("length")):(r(s.get(cs)),Zs(e)&&r(s.get(Zf)));break;case"delete":u||(r(s.get(cs)),Zs(e)&&r(s.get(Zf)));break;case"set":Zs(e)&&r(s.get(cs));break}}kv()}function ix(e,t){const n=mc.get(e);return n&&n.get(t)}function As(e){const t=Kt(e);return t===e?t:(qn(t,"iterate",Ci),Sa(e)?t:t.map(ja))}function sd(e){return qn(e=Kt(e),"iterate",Ci),e}function po(e,t){return Qo(e)?ir(ds(e)?ja(t):t):ja(t)}const ux={__proto__:null,[Symbol.iterator](){return af(this,Symbol.iterator,e=>po(this,e))},concat(...e){return As(this).concat(...e.map(t=>be(t)?As(t):t))},entries(){return af(this,"entries",e=>(e[1]=po(this,e[1]),e))},every(e,t){return Lo(this,"every",e,t,void 0,arguments)},filter(e,t){return Lo(this,"filter",e,t,n=>n.map(a=>po(this,a)),arguments)},find(e,t){return Lo(this,"find",e,t,n=>po(this,n),arguments)},findIndex(e,t){return Lo(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Lo(this,"findLast",e,t,n=>po(this,n),arguments)},findLastIndex(e,t){return Lo(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Lo(this,"forEach",e,t,void 0,arguments)},includes(...e){return of(this,"includes",e)},indexOf(...e){return of(this,"indexOf",e)},join(e){return As(this).join(e)},lastIndexOf(...e){return of(this,"lastIndexOf",e)},map(e,t){return Lo(this,"map",e,t,void 0,arguments)},pop(){return Fr(this,"pop")},push(...e){return Fr(this,"push",e)},reduce(e,...t){return _m(this,"reduce",e,t)},reduceRight(e,...t){return _m(this,"reduceRight",e,t)},shift(){return Fr(this,"shift")},some(e,t){return Lo(this,"some",e,t,void 0,arguments)},splice(...e){return Fr(this,"splice",e)},toReversed(){return As(this).toReversed()},toSorted(e){return As(this).toSorted(e)},toSpliced(...e){return As(this).toSpliced(...e)},unshift(...e){return Fr(this,"unshift",e)},values(){return af(this,"values",e=>po(this,e))}};function af(e,t,n){const a=sd(e),o=a[t]();return a!==e&&!Sa(e)&&(o._next=o.next,o.next=()=>{const l=o._next();return l.done||(l.value=n(l.value)),l}),o}const cx=Array.prototype;function Lo(e,t,n,a,o,l){const s=sd(e),r=s!==e&&!Sa(e),u=s[t];if(u!==cx[t]){const f=u.apply(e,l);return r?ja(f):f}let c=n;s!==e&&(r?c=function(f,p){return n.call(this,po(e,f),p,e)}:n.length>2&&(c=function(f,p){return n.call(this,f,p,e)}));const d=u.call(s,c,a);return r&&o?o(d):d}function _m(e,t,n,a){const o=sd(e),l=o!==e&&!Sa(e);let s=n,r=!1;o!==e&&(l?(r=a.length===0,s=function(c,d,f){return r&&(r=!1,c=po(e,c)),n.call(this,c,po(e,d),f,e)}):n.length>3&&(s=function(c,d,f){return n.call(this,c,d,f,e)}));const u=o[t](s,...a);return r?po(e,u):u}function of(e,t,n){const a=Kt(e);qn(a,"iterate",Ci);const o=a[t](...n);return(o===-1||o===!1)&&id(n[0])?(n[0]=Kt(n[0]),a[t](...n)):o}function Fr(e,t,n=[]){Zo(),Sv();const a=Kt(e)[t].apply(e,n);return kv(),Jo(),a}const dx=bv("__proto__,__v_isRef,__isVue"),G0=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ea));function fx(e){Ea(e)||(e=String(e));const t=Kt(this);return qn(t,"has",e),t.hasOwnProperty(e)}class X0{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,a){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return l;if(n==="__v_raw")return a===(o?l?Sx:e1:l?Q0:J0).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(a)?t:void 0;const s=be(t);if(!o){let u;if(s&&(u=ux[n]))return u;if(n==="hasOwnProperty")return fx}const r=Reflect.get(t,n,Ut(t)?t:a);if((Ea(n)?G0.has(n):dx(n))||(o||qn(t,"get",n),l))return r;if(Ut(r)){const u=s&&ad(n)?r:r.value;return o&&ot(u)?ms(u):u}return ot(r)?o?ms(r):Rt(r):r}}class Z0 extends X0{constructor(t=!1){super(!1,t)}set(t,n,a,o){let l=t[n];const s=be(t)&&ad(n);if(!this._isShallow){const c=Qo(l);if(!Sa(a)&&!Qo(a)&&(l=Kt(l),a=Kt(a)),!s&&Ut(l)&&!Ut(a))return c||(l.value=a),!0}const r=s?Number(n)e,$u=e=>Reflect.getPrototypeOf(e);function gx(e,t,n){return function(...a){const o=this.__v_raw,l=Kt(o),s=Zs(l),r=e==="entries"||e===Symbol.iterator&&s,u=e==="keys"&&s,c=o[e](...a),d=n?Jf:t?ir:ja;return!t&&qn(l,"iterate",u?Zf:cs),On(Object.create(c),{next(){const{value:f,done:p}=c.next();return p?{value:f,done:p}:{value:r?[d(f[0]),d(f[1])]:d(f),done:p}}})}}function Ou(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function yx(e,t){const n={get(o){const l=this.__v_raw,s=Kt(l),r=Kt(o);e||(ho(o,r)&&qn(s,"get",o),qn(s,"get",r));const{has:u}=$u(s),c=t?Jf:e?ir:ja;if(u.call(s,o))return c(l.get(o));if(u.call(s,r))return c(l.get(r));l!==s&&l.get(o)},get size(){const o=this.__v_raw;return!e&&qn(Kt(o),"iterate",cs),o.size},has(o){const l=this.__v_raw,s=Kt(l),r=Kt(o);return e||(ho(o,r)&&qn(s,"has",o),qn(s,"has",r)),o===r?l.has(o):l.has(o)||l.has(r)},forEach(o,l){const s=this,r=s.__v_raw,u=Kt(r),c=t?Jf:e?ir:ja;return!e&&qn(u,"iterate",cs),r.forEach((d,f)=>o.call(l,c(d),c(f),s))}};return On(n,e?{add:Ou("add"),set:Ou("set"),delete:Ou("delete"),clear:Ou("clear")}:{add(o){const l=Kt(this),s=$u(l),r=Kt(o),u=!t&&!Sa(o)&&!Qo(o)?r:o;return s.has.call(l,u)||ho(o,u)&&s.has.call(l,o)||ho(r,u)&&s.has.call(l,r)||(l.add(u),zo(l,"add",u,u)),this},set(o,l){!t&&!Sa(l)&&!Qo(l)&&(l=Kt(l));const s=Kt(this),{has:r,get:u}=$u(s);let c=r.call(s,o);c||(o=Kt(o),c=r.call(s,o));const d=u.call(s,o);return s.set(o,l),c?ho(l,d)&&zo(s,"set",o,l):zo(s,"add",o,l),this},delete(o){const l=Kt(this),{has:s,get:r}=$u(l);let u=s.call(l,o);u||(o=Kt(o),u=s.call(l,o)),r&&r.call(l,o);const c=l.delete(o);return u&&zo(l,"delete",o,void 0),c},clear(){const o=Kt(this),l=o.size!==0,s=o.clear();return l&&zo(o,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=gx(o,e,t)}),n}function Tv(e,t){const n=yx(e,t);return(a,o,l)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?a:Reflect.get($t(n,o)&&o in a?n:a,o,l)}const bx={get:Tv(!1,!1)},wx={get:Tv(!1,!0)},Cx={get:Tv(!0,!1)};const J0=new WeakMap,Q0=new WeakMap,e1=new WeakMap,Sx=new WeakMap;function kx(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ex(e){return e.__v_skip||!Object.isExtensible(e)?0:kx(GE(e))}function Rt(e){return Qo(e)?e:$v(e,!1,vx,bx,J0)}function rd(e){return $v(e,!1,mx,wx,Q0)}function ms(e){return $v(e,!0,hx,Cx,e1)}function $v(e,t,n,a,o){if(!ot(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const l=Ex(e);if(l===0)return e;const s=o.get(e);if(s)return s;const r=new Proxy(e,l===2?a:n);return o.set(e,r),r}function ds(e){return Qo(e)?ds(e.__v_raw):!!(e&&e.__v_isReactive)}function Qo(e){return!!(e&&e.__v_isReadonly)}function Sa(e){return!!(e&&e.__v_isShallow)}function id(e){return e?!!e.__v_raw:!1}function Kt(e){const t=e&&e.__v_raw;return t?Kt(t):e}function za(e){return!$t(e,"__v_skip")&&Object.isExtensible(e)&&I0(e,"__v_skip",!0),e}const ja=e=>ot(e)?Rt(e):e,ir=e=>ot(e)?ms(e):e;function Ut(e){return e?e.__v_isRef===!0:!1}function A(e){return t1(e,!1)}function Wt(e){return t1(e,!0)}function t1(e,t){return Ut(e)?e:new xx(e,t)}class xx{constructor(t,n){this.dep=new xv,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Kt(t),this._value=n?t:ja(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,a=this.__v_isShallow||Sa(t)||Qo(t);t=a?t:Kt(t),ho(t,n)&&(this._rawValue=t,this._value=a?t:ja(t),this.dep.trigger())}}function Ju(e){e.dep&&e.dep.trigger()}function i(e){return Ut(e)?e.value:e}function Pm(e){return ze(e)?e():i(e)}const Tx={get:(e,t,n)=>t==="__v_raw"?e:i(Reflect.get(e,t,n)),set:(e,t,n,a)=>{const o=e[t];return Ut(o)&&!Ut(n)?(o.value=n,!0):Reflect.set(e,t,n,a)}};function n1(e){return ds(e)?e:new Proxy(e,Tx)}function Nn(e){const t=be(e)?new Array(e.length):{};for(const n in e)t[n]=a1(e,n);return t}class $x{constructor(t,n,a){this._object=t,this._defaultValue=a,this.__v_isRef=!0,this._value=void 0,this._key=Ea(n)?n:String(n),this._raw=Kt(t);let o=!0,l=t;if(!be(t)||Ea(this._key)||!ad(this._key))do o=!id(l)||Sa(l);while(o&&(l=l.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=i(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Ut(this._raw[this._key])){const n=this._object[this._key];if(Ut(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return ix(this._raw,this._key)}}class Ox{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Lt(e,t,n){return Ut(e)?e:ze(e)?new Ox(e):ot(e)&&arguments.length>1?a1(e,t,n):A(e)}function a1(e,t,n){return new $x(e,t,n)}class Nx{constructor(t,n,a){this.fn=t,this.setter=n,this._value=void 0,this.dep=new xv(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=wi-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=a}notify(){if(this.flags|=16,!(this.flags&8)&&dn!==this)return K0(this,!0),!0}get value(){const t=this.dep.track();return U0(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Mx(e,t,n=!1){let a,o;return ze(e)?a=e:(a=e.get,o=e.set),new Nx(a,o,n)}const Nu={},gc=new WeakMap;let Xl;function Rx(e,t=!1,n=Xl){if(n){let a=gc.get(n);a||gc.set(n,a=[]),a.push(e)}}function Ix(e,t,n=sn){const{immediate:a,deep:o,once:l,scheduler:s,augmentJob:r,call:u}=n,c=C=>o?C:Sa(C)||o===!1||o===0?Ho(C,1):Ho(C);let d,f,p,g,v=!1,h=!1;if(Ut(e)?(f=()=>e.value,v=Sa(e)):ds(e)?(f=()=>c(e),v=!0):be(e)?(h=!0,v=e.some(C=>ds(C)||Sa(C)),f=()=>e.map(C=>{if(Ut(C))return C.value;if(ds(C))return c(C);if(ze(C))return u?u(C,2):C()})):ze(e)?t?f=u?()=>u(e,2):e:f=()=>{if(p){Zo();try{p()}finally{Jo()}}const C=Xl;Xl=d;try{return u?u(e,3,[g]):e(g)}finally{Xl=C}}:f=_t,t&&o){const C=f,k=o===!0?1/0:o;f=()=>Ho(C(),k)}const m=B0(),y=()=>{d.stop(),m&&m.active&&wv(m.effects,d)};if(l&&t){const C=t;t=(...k)=>{C(...k),y()}}let b=h?new Array(e.length).fill(Nu):Nu;const w=C=>{if(!(!(d.flags&1)||!d.dirty&&!C))if(t){const k=d.run();if(o||v||(h?k.some((E,T)=>ho(E,b[T])):ho(k,b))){p&&p();const E=Xl;Xl=d;try{const T=[k,b===Nu?void 0:h&&b[0]===Nu?[]:b,g];b=k,u?u(t,3,T):t(...T)}finally{Xl=E}}}else d.run()};return r&&r(w),d=new z0(f),d.scheduler=s?()=>s(w,!1):w,g=C=>Rx(C,!1,d),p=d.onStop=()=>{const C=gc.get(d);if(C){if(u)u(C,4);else for(const k of C)k();gc.delete(d)}},t?a?w(!0):b=d.run():s?s(w.bind(null,!0),!0):d.run(),y.pause=d.pause.bind(d),y.resume=d.resume.bind(d),y.stop=y,y}function Ho(e,t=1/0,n){if(t<=0||!ot(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ut(e))Ho(e.value,t,n);else if(be(e))for(let a=0;a{Ho(a,t,n)});else if(bi(e)){for(const a in e)Ho(e[a],t,n);for(const a of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,a)&&Ho(e[a],t,n)}return e}/** +* @vue/runtime-core v3.5.33 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Zi(e,t,n,a){try{return a?e(...a):e()}catch(o){ud(o,t,n)}}function Ua(e,t,n,a){if(ze(e)){const o=Zi(e,t,n,a);return o&&Pl(o)&&o.catch(l=>{ud(l,t,n)}),o}if(be(e)){const o=[];for(let l=0;l>>1,o=oa[a],l=Si(o);l=Si(n)?oa.push(e):oa.splice(Px(t),0,e),e.flags|=1,l1()}}function l1(){yc||(yc=o1.then(r1))}function Ax(e){be(e)?Js.push(...e):kl&&e.id===-1?kl.splice(Ks+1,0,e):e.flags&1||(Js.push(e),e.flags|=1),l1()}function Am(e,t,n=co+1){for(;nSi(n)-Si(a));if(Js.length=0,kl){kl.push(...t);return}for(kl=t,Ks=0;Kse.id==null?e.flags&2?-1:1/0:e.id;function r1(e){try{for(co=0;co{a._d&&Sc(-1);const l=bc(t);let s;try{s=e(...o)}finally{bc(l),a._d&&Sc(1)}return s};return a._n=!0,a._c=!0,a._d=!0,a}function dt(e,t){if(Hn===null)return e;const n=vd(Hn),a=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&ze(t)?t.call(a&&a.proxy):t}}const Lx=Symbol.for("v-scx"),Dx=()=>_e(Lx);function sa(e,t){return Nv(e,null,t)}function fe(e,t,n){return Nv(e,t,n)}function Nv(e,t,n=sn){const{immediate:a,deep:o,flush:l,once:s}=n,r=On({},n),u=t&&a||!t&&l!=="post";let c;if(xi){if(l==="sync"){const g=Dx();c=g.__watcherHandles||(g.__watcherHandles=[])}else if(!u){const g=()=>{};return g.stop=_t,g.resume=_t,g.pause=_t,g}}const d=Gn;r.call=(g,v,h)=>Ua(g,d,v,h);let f=!1;l==="post"?r.scheduler=g=>{na(g,d&&d.suspense)}:l!=="sync"&&(f=!0,r.scheduler=(g,v)=>{v?g():Ov(g)}),r.augmentJob=g=>{t&&(g.flags|=4),f&&(g.flags|=2,d&&(g.id=d.uid,g.i=d))};const p=Ix(e,t,r);return xi&&(c?c.push(p):u&&p()),p}function Vx(e,t,n){const a=this.proxy,o=De(e)?e.includes(".")?u1(a,e):()=>a[e]:e.bind(a,a);let l;ze(t)?l=t:(l=t.handler,n=t);const s=Qi(this),r=Nv(o,l.bind(a),n);return s(),r}function u1(e,t){const n=t.split(".");return()=>{let a=e;for(let o=0;oe.__isTeleport,Jl=e=>e&&(e.disabled||e.disabled===""),Bx=e=>e&&(e.defer||e.defer===""),Lm=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Dm=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Qf=(e,t)=>{const n=e&&e.to;return De(n)?t?t(n):null:n},Fx={name:"Teleport",__isTeleport:!0,process(e,t,n,a,o,l,s,r,u,c){const{mc:d,pc:f,pbc:p,o:{insert:g,querySelector:v,createText:h,createComment:m,parentNode:y}}=c,b=Jl(t.props);let{dynamicChildren:w}=t;const C=(T,$,N)=>{T.shapeFlag&16&&d(T.children,$,N,o,l,s,r,u)},k=(T=t)=>{const $=Jl(T.props),N=T.target=Qf(T.props,v),O=ep(N,T,h,g);N&&(s!=="svg"&&Lm(N)?s="svg":s!=="mathml"&&Dm(N)&&(s="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(N),$||(C(T,N,O),Zr(T,!1)))},E=T=>{const $=()=>{if(yl.get(T)===$){if(yl.delete(T),Jl(T.props)){const N=y(T.el)||n;C(T,N,T.anchor),Zr(T,!0)}k(T)}};yl.set(T,$),na($,l)};if(e==null){const T=t.el=h(""),$=t.anchor=h("");if(g(T,n,a),g($,n,a),Bx(t.props)||l&&l.pendingBranch){E(t);return}b&&(C(t,n,$),Zr(t,!0)),k()}else{t.el=e.el;const T=t.anchor=e.anchor,$=yl.get(e);if($){$.flags|=8,yl.delete(e),E(t);return}t.targetStart=e.targetStart;const N=t.target=e.target,O=t.targetAnchor=e.targetAnchor,_=Jl(e.props),P=_?n:N,D=_?T:O;if(s==="svg"||Lm(N)?s="svg":(s==="mathml"||Dm(N))&&(s="mathml"),w?(p(e.dynamicChildren,w,P,o,l,s,r),Vv(e,t,!0)):u||f(e,t,P,D,o,l,s,r,!1),b)_?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Mu(t,n,T,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const W=t.target=Qf(t.props,v);W&&Mu(t,W,null,c,0)}else _&&Mu(t,N,O,c,1);Zr(t,b)}},remove(e,t,n,{um:a,o:{remove:o}},l){const{shapeFlag:s,children:r,anchor:u,targetStart:c,targetAnchor:d,target:f,props:p}=e;let g=l||!Jl(p);const v=yl.get(e);if(v&&(v.flags|=8,yl.delete(e),g=!1),f&&(o(c),o(d)),l&&o(u),s&16)for(let h=0;h{e.isMounted=!0}),Pt(()=>{e.isUnmounting=!0}),e}const $a=[Function,Array],p1={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:$a,onEnter:$a,onAfterEnter:$a,onEnterCancelled:$a,onBeforeLeave:$a,onLeave:$a,onAfterLeave:$a,onLeaveCancelled:$a,onBeforeAppear:$a,onAppear:$a,onAfterAppear:$a,onAppearCancelled:$a},v1=e=>{const t=e.subTree;return t.component?v1(t.component):t},Kx={name:"BaseTransition",props:p1,setup(e,{slots:t}){const n=vt(),a=f1();return()=>{const o=t.default&&Mv(t.default(),!0),l=o&&o.length?h1(o):n.subTree?le():void 0;if(!l)return;const s=Kt(e),{mode:r}=s;if(a.isLeaving)return lf(l);const u=Vm(l);if(!u)return lf(l);let c=ki(u,s,a,n,f=>c=f);u.type!==vn&&gs(u,c);let d=n.subTree&&Vm(n.subTree);if(d&&d.type!==vn&&!Ql(d,u)&&v1(n).type!==vn){let f=ki(d,s,a,n);if(gs(d,f),r==="out-in"&&u.type!==vn)return a.isLeaving=!0,f.afterLeave=()=>{a.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,d=void 0},lf(l);r==="in-out"&&u.type!==vn?f.delayLeave=(p,g,v)=>{const h=m1(a,d);h[String(d.key)]=d,p[fo]=()=>{g(),p[fo]=void 0,delete c.delayedLeave,d=void 0},c.delayedLeave=()=>{v(),delete c.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return l}}};function h1(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==vn){t=n;break}}return t}const Wx=Kx;function m1(e,t){const{leavingVNodes:n}=e;let a=n.get(t.type);return a||(a=Object.create(null),n.set(t.type,a)),a}function ki(e,t,n,a,o){const{appear:l,mode:s,persisted:r=!1,onBeforeEnter:u,onEnter:c,onAfterEnter:d,onEnterCancelled:f,onBeforeLeave:p,onLeave:g,onAfterLeave:v,onLeaveCancelled:h,onBeforeAppear:m,onAppear:y,onAfterAppear:b,onAppearCancelled:w}=t,C=String(e.key),k=m1(n,e),E=(N,O)=>{N&&Ua(N,a,9,O)},T=(N,O)=>{const _=O[1];E(N,O),be(N)?N.every(P=>P.length<=1)&&_():N.length<=1&&_()},$={mode:s,persisted:r,beforeEnter(N){let O=u;if(!n.isMounted)if(l)O=m||u;else return;N[fo]&&N[fo](!0);const _=k[C];_&&Ql(e,_)&&_.el[fo]&&_.el[fo](),E(O,[N])},enter(N){if(k[C]===e)return;let O=c,_=d,P=f;if(!n.isMounted)if(l)O=y||c,_=b||d,P=w||f;else return;let D=!1;N[zr]=U=>{D||(D=!0,U?E(P,[N]):E(_,[N]),$.delayedLeave&&$.delayedLeave(),N[zr]=void 0)};const W=N[zr].bind(null,!1);O?T(O,[N,W]):W()},leave(N,O){const _=String(e.key);if(N[zr]&&N[zr](!0),n.isUnmounting)return O();E(p,[N]);let P=!1;N[fo]=W=>{P||(P=!0,O(),W?E(h,[N]):E(v,[N]),N[fo]=void 0,k[_]===e&&delete k[_])};const D=N[fo].bind(null,!1);k[_]=e,g?T(g,[N,D]):D()},clone(N){const O=ki(N,t,n,a,o);return o&&o(O),O}};return $}function lf(e){if(cd(e))return e=Eo(e),e.children=null,e}function Vm(e){if(!cd(e))return d1(e.type)&&e.children?h1(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ze(n.default))return n.default()}}function gs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,gs(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Mv(e,t=!1,n){let a=[],o=0;for(let l=0;l1)for(let l=0;lri(h,t&&(be(t)?t[m]:t),n,a,o));return}if(Qs(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&ri(e,t,n,a.component.subTree);return}const l=a.shapeFlag&4?vd(a.component):a.el,s=o?null:l,{i:r,r:u}=e,c=t&&t.r,d=r.refs===sn?r.refs={}:r.refs,f=r.setupState,p=Kt(f),g=f===sn?M0:h=>Bm(d,h)?!1:$t(p,h),v=(h,m)=>!(m&&Bm(d,m));if(c!=null&&c!==u){if(Fm(t),De(c))d[c]=null,g(c)&&(f[c]=null);else if(Ut(c)){const h=t;v(c,h.k)&&(c.value=null),h.k&&(d[h.k]=null)}}if(ze(u))Zi(u,r,12,[s,d]);else{const h=De(u),m=Ut(u);if(h||m){const y=()=>{if(e.f){const b=h?g(u)?f[u]:d[u]:v()||!e.k?u.value:d[e.k];if(o)be(b)&&wv(b,l);else if(be(b))b.includes(l)||b.push(l);else if(h)d[u]=[l],g(u)&&(f[u]=d[u]);else{const w=[l];v(u,e.k)&&(u.value=w),e.k&&(d[e.k]=w)}}else h?(d[u]=s,g(u)&&(f[u]=s)):m&&(v(u,e.k)&&(u.value=s),e.k&&(d[e.k]=s))};if(s){const b=()=>{y(),wc.delete(e)};b.id=-1,wc.set(e,b),na(b,n)}else Fm(e),y()}}}function Fm(e){const t=wc.get(e);t&&(t.flags|=8,wc.delete(e))}ld().requestIdleCallback;ld().cancelIdleCallback;const Qs=e=>!!e.type.__asyncLoader,cd=e=>e.type.__isKeepAlive;function Ji(e,t){y1(e,"a",t)}function Rv(e,t){y1(e,"da",t)}function y1(e,t,n=Gn){const a=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(dd(t,a,n),n){let o=n.parent;for(;o&&o.parent;)cd(o.parent.vnode)&&jx(a,t,n,o),o=o.parent}}function jx(e,t,n,a){const o=dd(t,e,a,!0);$r(()=>{wv(a[t],o)},n)}function dd(e,t,n=Gn,a=!1){if(n){const o=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...s)=>{Zo();const r=Qi(n),u=Ua(t,n,e,s);return r(),Jo(),u});return a?o.unshift(l):o.push(l),l}}const sl=e=>(t,n=Gn)=>{(!xi||e==="sp")&&dd(e,(...a)=>t(...a),n)},fd=sl("bm"),mt=sl("m"),Iv=sl("bu"),Qa=sl("u"),Pt=sl("bum"),$r=sl("um"),Ux=sl("sp"),Yx=sl("rtg"),qx=sl("rtc");function Gx(e,t=Gn){dd("ec",e,t)}const _v="components",Xx="directives";function Ot(e,t){return Av(_v,e,!0,t)||e}const b1=Symbol.for("v-ndc");function ct(e){return De(e)?Av(_v,e,!1)||e:e||b1}function Pv(e){return Av(Xx,e)}function Av(e,t,n=!0,a=!1){const o=Hn||Gn;if(o){const l=o.type;if(e===_v){const r=IT(l,!1);if(r&&(r===t||r===Vn(t)||r===Xi(Vn(t))))return l}const s=zm(o[e]||l[e],t)||zm(o.appContext[e],t);return!s&&a?l:s}}function zm(e,t){return e&&(e[t]||e[Vn(t)]||e[Xi(Vn(t))])}function Ct(e,t,n,a){let o;const l=n,s=be(e);if(s||De(e)){const r=s&&ds(e);let u=!1,c=!1;r&&(u=!Sa(e),c=Qo(e),e=sd(e)),o=new Array(e.length);for(let d=0,f=e.length;dt(r,u,void 0,l));else{const r=Object.keys(e);o=new Array(r.length);for(let u=0,c=r.length;u{const l=a.fn(...o);return l&&(l.key=a.key),l}:a.fn)}return e}function ae(e,t,n={},a,o){if(Hn.ce||Hn.parent&&Qs(Hn.parent)&&Hn.parent.ce){const c=Object.keys(n).length>0;return t!=="default"&&(n.name=t),x(),re(He,null,[J("slot",n,a&&a())],c?-2:64)}let l=e[t];l&&l._c&&(l._d=!1),x();const s=l&&w1(l(n)),r=n.key||s&&s.key,u=re(He,{key:(r&&!Ea(r)?r:`_${t}`)+(!s&&a?"_fb":"")},s||(a?a():[]),s&&e._===1?64:-2);return u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),l&&l._c&&(l._d=!0),u}function w1(e){return e.some(t=>Ht(t)?!(t.type===vn||t.type===He&&!w1(t.children)):!0)?e:null}function Zx(e,t){const n={};for(const a in e)n[oi(a)]=e[a];return n}const tp=e=>e?F1(e)?vd(e):tp(e.parent):null,ii=On(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>tp(e.parent),$root:e=>tp(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>k1(e),$forceUpdate:e=>e.f||(e.f=()=>{Ov(e.update)}),$nextTick:e=>e.n||(e.n=Ae.bind(e.proxy)),$watch:e=>Vx.bind(e)}),sf=(e,t)=>e!==sn&&!e.__isScriptSetup&&$t(e,t),Jx={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:a,data:o,props:l,accessCache:s,type:r,appContext:u}=e;if(t[0]!=="$"){const p=s[t];if(p!==void 0)switch(p){case 1:return a[t];case 2:return o[t];case 4:return n[t];case 3:return l[t]}else{if(sf(a,t))return s[t]=1,a[t];if(o!==sn&&$t(o,t))return s[t]=2,o[t];if($t(l,t))return s[t]=3,l[t];if(n!==sn&&$t(n,t))return s[t]=4,n[t];np&&(s[t]=0)}}const c=ii[t];let d,f;if(c)return t==="$attrs"&&qn(e.attrs,"get",""),c(e);if((d=r.__cssModules)&&(d=d[t]))return d;if(n!==sn&&$t(n,t))return s[t]=4,n[t];if(f=u.config.globalProperties,$t(f,t))return f[t]},set({_:e},t,n){const{data:a,setupState:o,ctx:l}=e;return sf(o,t)?(o[t]=n,!0):a!==sn&&$t(a,t)?(a[t]=n,!0):$t(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:a,appContext:o,props:l,type:s}},r){let u;return!!(n[r]||e!==sn&&r[0]!=="$"&&$t(e,r)||sf(t,r)||$t(l,r)||$t(a,r)||$t(ii,r)||$t(o.config.globalProperties,r)||(u=s.__cssModules)&&u[r])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:$t(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function fn(){return C1().slots}function rl(){return C1().attrs}function C1(e){const t=vt();return t.setupContext||(t.setupContext=H1(t))}function Hm(e){return be(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let np=!0;function Qx(e){const t=k1(e),n=e.proxy,a=e.ctx;np=!1,t.beforeCreate&&Km(t.beforeCreate,e,"bc");const{data:o,computed:l,methods:s,watch:r,provide:u,inject:c,created:d,beforeMount:f,mounted:p,beforeUpdate:g,updated:v,activated:h,deactivated:m,beforeDestroy:y,beforeUnmount:b,destroyed:w,unmounted:C,render:k,renderTracked:E,renderTriggered:T,errorCaptured:$,serverPrefetch:N,expose:O,inheritAttrs:_,components:P,directives:D,filters:W}=t;if(c&&eT(c,a,null),s)for(const R in s){const I=s[R];ze(I)&&(a[R]=I.bind(n))}if(o){const R=o.call(n,n);ot(R)&&(e.data=Rt(R))}if(np=!0,l)for(const R in l){const I=l[R],L=ze(I)?I.bind(n,n):ze(I.get)?I.get.bind(n,n):_t,z=!ze(I)&&ze(I.set)?I.set.bind(n):_t,H=S({get:L,set:z});Object.defineProperty(a,R,{enumerable:!0,configurable:!0,get:()=>H.value,set:K=>H.value=K})}if(r)for(const R in r)S1(r[R],a,n,R);if(u){const R=ze(u)?u.call(n):u;Reflect.ownKeys(R).forEach(I=>{bt(I,R[I])})}d&&Km(d,e,"c");function F(R,I){be(I)?I.forEach(L=>R(L.bind(n))):I&&R(I.bind(n))}if(F(fd,f),F(mt,p),F(Iv,g),F(Qa,v),F(Ji,h),F(Rv,m),F(Gx,$),F(qx,E),F(Yx,T),F(Pt,b),F($r,C),F(Ux,N),be(O))if(O.length){const R=e.exposed||(e.exposed={});O.forEach(I=>{Object.defineProperty(R,I,{get:()=>n[I],set:L=>n[I]=L,enumerable:!0})})}else e.exposed||(e.exposed={});k&&e.render===_t&&(e.render=k),_!=null&&(e.inheritAttrs=_),P&&(e.components=P),D&&(e.directives=D),N&&g1(e)}function eT(e,t,n=_t){be(e)&&(e=ap(e));for(const a in e){const o=e[a];let l;ot(o)?"default"in o?l=_e(o.from||a,o.default,!0):l=_e(o.from||a):l=_e(o),Ut(l)?Object.defineProperty(t,a,{enumerable:!0,configurable:!0,get:()=>l.value,set:s=>l.value=s}):t[a]=l}}function Km(e,t,n){Ua(be(e)?e.map(a=>a.bind(t.proxy)):e.bind(t.proxy),t,n)}function S1(e,t,n,a){let o=a.includes(".")?u1(n,a):()=>n[a];if(De(e)){const l=t[e];ze(l)&&fe(o,l)}else if(ze(e))fe(o,e.bind(n));else if(ot(e))if(be(e))e.forEach(l=>S1(l,t,n,a));else{const l=ze(e.handler)?e.handler.bind(n):t[e.handler];ze(l)&&fe(o,l,e)}}function k1(e){const t=e.type,{mixins:n,extends:a}=t,{mixins:o,optionsCache:l,config:{optionMergeStrategies:s}}=e.appContext,r=l.get(t);let u;return r?u=r:!o.length&&!n&&!a?u=t:(u={},o.length&&o.forEach(c=>Cc(u,c,s,!0)),Cc(u,t,s)),ot(t)&&l.set(t,u),u}function Cc(e,t,n,a=!1){const{mixins:o,extends:l}=t;l&&Cc(e,l,n,!0),o&&o.forEach(s=>Cc(e,s,n,!0));for(const s in t)if(!(a&&s==="expose")){const r=tT[s]||n&&n[s];e[s]=r?r(e[s],t[s]):t[s]}return e}const tT={data:Wm,props:jm,emits:jm,methods:Jr,computed:Jr,beforeCreate:ta,created:ta,beforeMount:ta,mounted:ta,beforeUpdate:ta,updated:ta,beforeDestroy:ta,beforeUnmount:ta,destroyed:ta,unmounted:ta,activated:ta,deactivated:ta,errorCaptured:ta,serverPrefetch:ta,components:Jr,directives:Jr,watch:aT,provide:Wm,inject:nT};function Wm(e,t){return t?e?function(){return On(ze(e)?e.call(this,this):e,ze(t)?t.call(this,this):t)}:t:e}function nT(e,t){return Jr(ap(e),ap(t))}function ap(e){if(be(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Vn(t)}Modifiers`]||e[`${ll(t)}Modifiers`];function rT(e,t,...n){if(e.isUnmounted)return;const a=e.vnode.props||sn;let o=n;const l=t.startsWith("update:"),s=l&&sT(a,t.slice(7));s&&(s.trim&&(o=n.map(d=>De(d)?d.trim():d)),s.number&&(o=n.map(Cv)));let r,u=a[r=oi(t)]||a[r=oi(Vn(t))];!u&&l&&(u=a[r=oi(ll(t))]),u&&Ua(u,e,6,o);const c=a[r+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,Ua(c,e,6,o)}}const iT=new WeakMap;function x1(e,t,n=!1){const a=n?iT:t.emitsCache,o=a.get(e);if(o!==void 0)return o;const l=e.emits;let s={},r=!1;if(!ze(e)){const u=c=>{const d=x1(c,t,!0);d&&(r=!0,On(s,d))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!l&&!r?(ot(e)&&a.set(e,null),null):(be(l)?l.forEach(u=>s[u]=null):On(s,l),ot(e)&&a.set(e,s),s)}function pd(e,t){return!e||!ed(t)?!1:(t=t.slice(2).replace(/Once$/,""),$t(e,t[0].toLowerCase()+t.slice(1))||$t(e,ll(t))||$t(e,t))}function Um(e){const{type:t,vnode:n,proxy:a,withProxy:o,propsOptions:[l],slots:s,attrs:r,emit:u,render:c,renderCache:d,props:f,data:p,setupState:g,ctx:v,inheritAttrs:h}=e,m=bc(e);let y,b;try{if(n.shapeFlag&4){const C=o||a,k=C;y=vo(c.call(k,C,d,f,g,p,v)),b=r}else{const C=t;y=vo(C.length>1?C(f,{attrs:r,slots:s,emit:u}):C(f,null)),b=t.props?r:uT(r)}}catch(C){ui.length=0,ud(C,e,1),y=J(vn)}let w=y;if(b&&h!==!1){const C=Object.keys(b),{shapeFlag:k}=w;C.length&&k&7&&(l&&C.some(td)&&(b=cT(b,l)),w=Eo(w,b,!1,!0))}return n.dirs&&(w=Eo(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&gs(w,n.transition),y=w,bc(m),y}const uT=e=>{let t;for(const n in e)(n==="class"||n==="style"||ed(n))&&((t||(t={}))[n]=e[n]);return t},cT=(e,t)=>{const n={};for(const a in e)(!td(a)||!(a.slice(9)in t))&&(n[a]=e[a]);return n};function dT(e,t,n){const{props:a,children:o,component:l}=e,{props:s,children:r,patchFlag:u}=t,c=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return a?Ym(a,s,c):!!s;if(u&8){const d=t.dynamicProps;for(let f=0;fObject.create($1),N1=e=>Object.getPrototypeOf(e)===$1;function pT(e,t,n,a=!1){const o={},l=O1();e.propsDefaults=Object.create(null),M1(e,t,o,l);for(const s in e.propsOptions[0])s in o||(o[s]=void 0);n?e.props=a?o:rd(o):e.type.props?e.props=o:e.props=l,e.attrs=l}function vT(e,t,n,a){const{props:o,attrs:l,vnode:{patchFlag:s}}=e,r=Kt(o),[u]=e.propsOptions;let c=!1;if((a||s>0)&&!(s&16)){if(s&8){const d=e.vnode.dynamicProps;for(let f=0;f{u=!0;const[p,g]=R1(f,t,!0);On(s,p),g&&r.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!l&&!u)return ot(e)&&a.set(e,Xs),Xs;if(be(l))for(let d=0;de==="_"||e==="_ctx"||e==="$stable",Dv=e=>be(e)?e.map(vo):[vo(e)],mT=(e,t,n)=>{if(t._n)return t;const a=ne((...o)=>Dv(t(...o)),n);return a._c=!1,a},I1=(e,t,n)=>{const a=e._ctx;for(const o in e){if(Lv(o))continue;const l=e[o];if(ze(l))t[o]=mT(o,l,a);else if(l!=null){const s=Dv(l);t[o]=()=>s}}},_1=(e,t)=>{const n=Dv(t);e.slots.default=()=>n},P1=(e,t,n)=>{for(const a in t)(n||!Lv(a))&&(e[a]=t[a])},gT=(e,t,n)=>{const a=e.slots=O1();if(e.vnode.shapeFlag&32){const o=t._;o?(P1(a,t,n),n&&I0(a,"_",o,!0)):I1(t,a)}else t&&_1(e,t)},yT=(e,t,n)=>{const{vnode:a,slots:o}=e;let l=!0,s=sn;if(a.shapeFlag&32){const r=t._;r?n&&r===1?l=!1:P1(o,t,n):(l=!t.$stable,I1(t,o)),s=t}else t&&(_1(e,t),s={default:1});if(l)for(const r in o)!Lv(r)&&s[r]==null&&delete o[r]},na=kT;function bT(e){return wT(e)}function wT(e,t){const n=ld();n.__VUE__=!0;const{insert:a,remove:o,patchProp:l,createElement:s,createText:r,createComment:u,setText:c,setElementText:d,parentNode:f,nextSibling:p,setScopeId:g=_t,insertStaticContent:v}=e,h=(V,Z,oe,ce=null,ge=null,me=null,Me=void 0,Ie=null,Re=!!Z.dynamicChildren)=>{if(V===Z)return;V&&!Ql(V,Z)&&(ce=te(V),K(V,ge,me,!0),V=null),Z.patchFlag===-2&&(Re=!1,Z.dynamicChildren=null);const{type:ye,ref:Te,shapeFlag:we}=Z;switch(ye){case Or:m(V,Z,oe,ce);break;case vn:y(V,Z,oe,ce);break;case uf:V==null&&b(Z,oe,ce,Me);break;case He:P(V,Z,oe,ce,ge,me,Me,Ie,Re);break;default:we&1?k(V,Z,oe,ce,ge,me,Me,Ie,Re):we&6?D(V,Z,oe,ce,ge,me,Me,Ie,Re):(we&64||we&128)&&ye.process(V,Z,oe,ce,ge,me,Me,Ie,Re,Y)}Te!=null&&ge?ri(Te,V&&V.ref,me,Z||V,!Z):Te==null&&V&&V.ref!=null&&ri(V.ref,null,me,V,!0)},m=(V,Z,oe,ce)=>{if(V==null)a(Z.el=r(Z.children),oe,ce);else{const ge=Z.el=V.el;Z.children!==V.children&&c(ge,Z.children)}},y=(V,Z,oe,ce)=>{V==null?a(Z.el=u(Z.children||""),oe,ce):Z.el=V.el},b=(V,Z,oe,ce)=>{[V.el,V.anchor]=v(V.children,Z,oe,ce,V.el,V.anchor)},w=({el:V,anchor:Z},oe,ce)=>{let ge;for(;V&&V!==Z;)ge=p(V),a(V,oe,ce),V=ge;a(Z,oe,ce)},C=({el:V,anchor:Z})=>{let oe;for(;V&&V!==Z;)oe=p(V),o(V),V=oe;o(Z)},k=(V,Z,oe,ce,ge,me,Me,Ie,Re)=>{if(Z.type==="svg"?Me="svg":Z.type==="math"&&(Me="mathml"),V==null)E(Z,oe,ce,ge,me,Me,Ie,Re);else{const ye=V.el&&V.el._isVueCE?V.el:null;try{ye&&ye._beginPatch(),N(V,Z,ge,me,Me,Ie,Re)}finally{ye&&ye._endPatch()}}},E=(V,Z,oe,ce,ge,me,Me,Ie)=>{let Re,ye;const{props:Te,shapeFlag:we,transition:Pe,dirs:Ve}=V;if(Re=V.el=s(V.type,me,Te&&Te.is,Te),we&8?d(Re,V.children):we&16&&$(V.children,Re,null,ce,ge,rf(V,me),Me,Ie),Ve&&jl(V,null,ce,"created"),T(Re,V,V.scopeId,Me,ce),Te){for(const tt in Te)tt!=="value"&&!ai(tt)&&l(Re,tt,null,Te[tt],me,ce);"value"in Te&&l(Re,"value",null,Te.value,me),(ye=Te.onVnodeBeforeMount)&&so(ye,ce,V)}Ve&&jl(V,null,ce,"beforeMount");const Qe=CT(ge,Pe);Qe&&Pe.beforeEnter(Re),a(Re,Z,oe),((ye=Te&&Te.onVnodeMounted)||Qe||Ve)&&na(()=>{try{ye&&so(ye,ce,V),Qe&&Pe.enter(Re),Ve&&jl(V,null,ce,"mounted")}finally{}},ge)},T=(V,Z,oe,ce,ge)=>{if(oe&&g(V,oe),ce)for(let me=0;me{for(let ye=Re;ye{const Ie=Z.el=V.el;let{patchFlag:Re,dynamicChildren:ye,dirs:Te}=Z;Re|=V.patchFlag&16;const we=V.props||sn,Pe=Z.props||sn;let Ve;if(oe&&Ul(oe,!1),(Ve=Pe.onVnodeBeforeUpdate)&&so(Ve,oe,Z,V),Te&&jl(Z,V,oe,"beforeUpdate"),oe&&Ul(oe,!0),(we.innerHTML&&Pe.innerHTML==null||we.textContent&&Pe.textContent==null)&&d(Ie,""),ye?O(V.dynamicChildren,ye,Ie,oe,ce,rf(Z,ge),me):Me||I(V,Z,Ie,null,oe,ce,rf(Z,ge),me,!1),Re>0){if(Re&16)_(Ie,we,Pe,oe,ge);else if(Re&2&&we.class!==Pe.class&&l(Ie,"class",null,Pe.class,ge),Re&4&&l(Ie,"style",we.style,Pe.style,ge),Re&8){const Qe=Z.dynamicProps;for(let tt=0;tt{Ve&&so(Ve,oe,Z,V),Te&&jl(Z,V,oe,"updated")},ce)},O=(V,Z,oe,ce,ge,me,Me)=>{for(let Ie=0;Ie{if(Z!==oe){if(Z!==sn)for(const me in Z)!ai(me)&&!(me in oe)&&l(V,me,Z[me],null,ge,ce);for(const me in oe){if(ai(me))continue;const Me=oe[me],Ie=Z[me];Me!==Ie&&me!=="value"&&l(V,me,Ie,Me,ge,ce)}"value"in oe&&l(V,"value",Z.value,oe.value,ge)}},P=(V,Z,oe,ce,ge,me,Me,Ie,Re)=>{const ye=Z.el=V?V.el:r(""),Te=Z.anchor=V?V.anchor:r("");let{patchFlag:we,dynamicChildren:Pe,slotScopeIds:Ve}=Z;Ve&&(Ie=Ie?Ie.concat(Ve):Ve),V==null?(a(ye,oe,ce),a(Te,oe,ce),$(Z.children||[],oe,Te,ge,me,Me,Ie,Re)):we>0&&we&64&&Pe&&V.dynamicChildren&&V.dynamicChildren.length===Pe.length?(O(V.dynamicChildren,Pe,oe,ge,me,Me,Ie),(Z.key!=null||ge&&Z===ge.subTree)&&Vv(V,Z,!0)):I(V,Z,oe,Te,ge,me,Me,Ie,Re)},D=(V,Z,oe,ce,ge,me,Me,Ie,Re)=>{Z.slotScopeIds=Ie,V==null?Z.shapeFlag&512?ge.ctx.activate(Z,oe,ce,Me,Re):W(Z,oe,ce,ge,me,Me,Re):U(V,Z,Re)},W=(V,Z,oe,ce,ge,me,Me)=>{const Ie=V.component=OT(V,ce,ge);if(cd(V)&&(Ie.ctx.renderer=Y),NT(Ie,!1,Me),Ie.asyncDep){if(ge&&ge.registerDep(Ie,F,Me),!V.el){const Re=Ie.subTree=J(vn);y(null,Re,Z,oe),V.placeholder=Re.el}}else F(Ie,V,Z,oe,ge,me,Me)},U=(V,Z,oe)=>{const ce=Z.component=V.component;if(dT(V,Z,oe))if(ce.asyncDep&&!ce.asyncResolved){R(ce,Z,oe);return}else ce.next=Z,ce.update();else Z.el=V.el,ce.vnode=Z},F=(V,Z,oe,ce,ge,me,Me)=>{const Ie=()=>{if(V.isMounted){let{next:we,bu:Pe,u:Ve,parent:Qe,vnode:tt}=V;{const We=A1(V);if(We){we&&(we.el=tt.el,R(V,we,Me)),We.asyncDep.then(()=>{na(()=>{V.isUnmounted||ye()},ge)});return}}let nt=we,Oe;Ul(V,!1),we?(we.el=tt.el,R(V,we,Me)):we=tt,Pe&&Zu(Pe),(Oe=we.props&&we.props.onVnodeBeforeUpdate)&&so(Oe,Qe,we,tt),Ul(V,!0);const qe=Um(V),it=V.subTree;V.subTree=qe,h(it,qe,f(it.el),te(it),V,ge,me),we.el=qe.el,nt===null&&fT(V,qe.el),Ve&&na(Ve,ge),(Oe=we.props&&we.props.onVnodeUpdated)&&na(()=>so(Oe,Qe,we,tt),ge)}else{let we;const{el:Pe,props:Ve}=Z,{bm:Qe,m:tt,parent:nt,root:Oe,type:qe}=V,it=Qs(Z);Ul(V,!1),Qe&&Zu(Qe),!it&&(we=Ve&&Ve.onVnodeBeforeMount)&&so(we,nt,Z),Ul(V,!0);{Oe.ce&&Oe.ce._hasShadowRoot()&&Oe.ce._injectChildStyle(qe,V.parent?V.parent.type:void 0);const We=V.subTree=Um(V);h(null,We,oe,ce,V,ge,me),Z.el=We.el}if(tt&&na(tt,ge),!it&&(we=Ve&&Ve.onVnodeMounted)){const We=Z;na(()=>so(we,nt,We),ge)}(Z.shapeFlag&256||nt&&Qs(nt.vnode)&&nt.vnode.shapeFlag&256)&&V.a&&na(V.a,ge),V.isMounted=!0,Z=oe=ce=null}};V.scope.on();const Re=V.effect=new z0(Ie);V.scope.off();const ye=V.update=Re.run.bind(Re),Te=V.job=Re.runIfDirty.bind(Re);Te.i=V,Te.id=V.uid,Re.scheduler=()=>Ov(Te),Ul(V,!0),ye()},R=(V,Z,oe)=>{Z.component=V;const ce=V.vnode.props;V.vnode=Z,V.next=null,vT(V,Z.props,ce,oe),yT(V,Z.children,oe),Zo(),Am(V),Jo()},I=(V,Z,oe,ce,ge,me,Me,Ie,Re=!1)=>{const ye=V&&V.children,Te=V?V.shapeFlag:0,we=Z.children,{patchFlag:Pe,shapeFlag:Ve}=Z;if(Pe>0){if(Pe&128){z(ye,we,oe,ce,ge,me,Me,Ie,Re);return}else if(Pe&256){L(ye,we,oe,ce,ge,me,Me,Ie,Re);return}}Ve&8?(Te&16&&ue(ye,ge,me),we!==ye&&d(oe,we)):Te&16?Ve&16?z(ye,we,oe,ce,ge,me,Me,Ie,Re):ue(ye,ge,me,!0):(Te&8&&d(oe,""),Ve&16&&$(we,oe,ce,ge,me,Me,Ie,Re))},L=(V,Z,oe,ce,ge,me,Me,Ie,Re)=>{V=V||Xs,Z=Z||Xs;const ye=V.length,Te=Z.length,we=Math.min(ye,Te);let Pe;for(Pe=0;PeTe?ue(V,ge,me,!0,!1,we):$(Z,oe,ce,ge,me,Me,Ie,Re,we)},z=(V,Z,oe,ce,ge,me,Me,Ie,Re)=>{let ye=0;const Te=Z.length;let we=V.length-1,Pe=Te-1;for(;ye<=we&&ye<=Pe;){const Ve=V[ye],Qe=Z[ye]=Re?Bo(Z[ye]):vo(Z[ye]);if(Ql(Ve,Qe))h(Ve,Qe,oe,null,ge,me,Me,Ie,Re);else break;ye++}for(;ye<=we&&ye<=Pe;){const Ve=V[we],Qe=Z[Pe]=Re?Bo(Z[Pe]):vo(Z[Pe]);if(Ql(Ve,Qe))h(Ve,Qe,oe,null,ge,me,Me,Ie,Re);else break;we--,Pe--}if(ye>we){if(ye<=Pe){const Ve=Pe+1,Qe=VePe)for(;ye<=we;)K(V[ye],ge,me,!0),ye++;else{const Ve=ye,Qe=ye,tt=new Map;for(ye=Qe;ye<=Pe;ye++){const ve=Z[ye]=Re?Bo(Z[ye]):vo(Z[ye]);ve.key!=null&&tt.set(ve.key,ye)}let nt,Oe=0;const qe=Pe-Qe+1;let it=!1,We=0;const et=new Array(qe);for(ye=0;ye=qe){K(ve,ge,me,!0);continue}let Le;if(ve.key!=null)Le=tt.get(ve.key);else for(nt=Qe;nt<=Pe;nt++)if(et[nt-Qe]===0&&Ql(ve,Z[nt])){Le=nt;break}Le===void 0?K(ve,ge,me,!0):(et[Le-Qe]=ye+1,Le>=We?We=Le:it=!0,h(ve,Z[Le],oe,null,ge,me,Me,Ie,Re),Oe++)}const gt=it?ST(et):Xs;for(nt=gt.length-1,ye=qe-1;ye>=0;ye--){const ve=Qe+ye,Le=Z[ve],pe=Z[ve+1],$e=ve+1{const{el:me,type:Me,transition:Ie,children:Re,shapeFlag:ye}=V;if(ye&6){H(V.component.subTree,Z,oe,ce);return}if(ye&128){V.suspense.move(Z,oe,ce);return}if(ye&64){Me.move(V,Z,oe,Y);return}if(Me===He){a(me,Z,oe);for(let we=0;weIe.enter(me),ge);else{const{leave:we,delayLeave:Pe,afterLeave:Ve}=Ie,Qe=()=>{V.ctx.isUnmounted?o(me):a(me,Z,oe)},tt=()=>{me._isLeaving&&me[fo](!0),we(me,()=>{Qe(),Ve&&Ve()})};Pe?Pe(me,Qe,tt):tt()}else a(me,Z,oe)},K=(V,Z,oe,ce=!1,ge=!1)=>{const{type:me,props:Me,ref:Ie,children:Re,dynamicChildren:ye,shapeFlag:Te,patchFlag:we,dirs:Pe,cacheIndex:Ve,memo:Qe}=V;if(we===-2&&(ge=!1),Ie!=null&&(Zo(),ri(Ie,null,oe,V,!0),Jo()),Ve!=null&&(Z.renderCache[Ve]=void 0),Te&256){Z.ctx.deactivate(V);return}const tt=Te&1&&Pe,nt=!Qs(V);let Oe;if(nt&&(Oe=Me&&Me.onVnodeBeforeUnmount)&&so(Oe,Z,V),Te&6)ee(V.component,oe,ce);else{if(Te&128){V.suspense.unmount(oe,ce);return}tt&&jl(V,null,Z,"beforeUnmount"),Te&64?V.type.remove(V,Z,oe,Y,ce):ye&&!ye.hasOnce&&(me!==He||we>0&&we&64)?ue(ye,Z,oe,!1,!0):(me===He&&we&384||!ge&&Te&16)&&ue(Re,Z,oe),ce&&q(V)}const qe=Qe!=null&&Ve==null;(nt&&(Oe=Me&&Me.onVnodeUnmounted)||tt||qe)&&na(()=>{Oe&&so(Oe,Z,V),tt&&jl(V,null,Z,"unmounted"),qe&&(V.el=null)},oe)},q=V=>{const{type:Z,el:oe,anchor:ce,transition:ge}=V;if(Z===He){Q(oe,ce);return}if(Z===uf){C(V);return}const me=()=>{o(oe),ge&&!ge.persisted&&ge.afterLeave&&ge.afterLeave()};if(V.shapeFlag&1&&ge&&!ge.persisted){const{leave:Me,delayLeave:Ie}=ge,Re=()=>Me(oe,me);Ie?Ie(V.el,me,Re):Re()}else me()},Q=(V,Z)=>{let oe;for(;V!==Z;)oe=p(V),o(V),V=oe;o(Z)},ee=(V,Z,oe)=>{const{bum:ce,scope:ge,job:me,subTree:Me,um:Ie,m:Re,a:ye}=V;Gm(Re),Gm(ye),ce&&Zu(ce),ge.stop(),me&&(me.flags|=8,K(Me,V,Z,oe)),Ie&&na(Ie,Z),na(()=>{V.isUnmounted=!0},Z)},ue=(V,Z,oe,ce=!1,ge=!1,me=0)=>{for(let Me=me;Me{if(V.shapeFlag&6)return te(V.component.subTree);if(V.shapeFlag&128)return V.suspense.next();const Z=p(V.anchor||V.el),oe=Z&&Z[c1];return oe?p(oe):Z};let de=!1;const se=(V,Z,oe)=>{let ce;V==null?Z._vnode&&(K(Z._vnode,null,null,!0),ce=Z._vnode.component):h(Z._vnode||null,V,Z,null,null,null,oe),Z._vnode=V,de||(de=!0,Am(ce),s1(),de=!1)},Y={p:h,um:K,m:H,r:q,mt:W,mc:$,pc:I,pbc:O,n:te,o:e};return{render:se,hydrate:void 0,createApp:lT(se)}}function rf({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ul({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function CT(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Vv(e,t,n=!1){const a=e.children,o=t.children;if(be(a)&&be(o))for(let l=0;l>1,e[n[r]]0&&(t[a]=n[l-1]),n[l]=a)}}for(l=n.length,s=n[l-1];l-- >0;)n[l]=s,s=t[s];return n}function A1(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:A1(t)}function Gm(e){if(e)for(let t=0;te.__isSuspense;function kT(e,t){t&&t.pendingBranch?be(e)?t.effects.push(...e):t.effects.push(e):Ax(e)}const He=Symbol.for("v-fgt"),Or=Symbol.for("v-txt"),vn=Symbol.for("v-cmt"),uf=Symbol.for("v-stc"),ui=[];let ba=null;function x(e=!1){ui.push(ba=e?null:[])}function ET(){ui.pop(),ba=ui[ui.length-1]||null}let Ei=1;function Sc(e,t=!1){Ei+=e,e<0&&ba&&t&&(ba.hasOnce=!0)}function V1(e){return e.dynamicChildren=Ei>0?ba||Xs:null,ET(),Ei>0&&ba&&ba.push(e),e}function B(e,t,n,a,o,l){return V1(j(e,t,n,a,o,l,!0))}function re(e,t,n,a,o){return V1(J(e,t,n,a,o,!0))}function Ht(e){return e?e.__v_isVNode===!0:!1}function Ql(e,t){return e.type===t.type&&e.key===t.key}const B1=({key:e})=>e??null,Qu=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?De(e)||Ut(e)||ze(e)?{i:Hn,r:e,k:t,f:!!n}:e:null);function j(e,t=null,n=null,a=0,o=null,l=e===He?0:1,s=!1,r=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&B1(t),ref:t&&Qu(t),scopeId:i1,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:a,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Hn};return r?(Bv(u,n),l&128&&e.normalize(u)):n&&(u.shapeFlag|=De(n)?8:16),Ei>0&&!s&&ba&&(u.patchFlag>0||l&6)&&u.patchFlag!==32&&ba.push(u),u}const J=xT;function xT(e,t=null,n=null,a=0,o=null,l=!1){if((!e||e===b1)&&(e=vn),Ht(e)){const r=Eo(e,t,!0);return n&&Bv(r,n),Ei>0&&!l&&ba&&(r.shapeFlag&6?ba[ba.indexOf(e)]=r:ba.push(r)),r.patchFlag=-2,r}if(_T(e)&&(e=e.__vccOpts),t){t=qo(t);let{class:r,style:u}=t;r&&!De(r)&&(t.class=M(r)),ot(u)&&(id(u)&&!be(u)&&(u=On({},u)),t.style=je(u))}const s=De(e)?1:D1(e)?128:d1(e)?64:ot(e)?4:ze(e)?2:0;return j(e,t,n,a,o,s,l,!0)}function qo(e){return e?id(e)||N1(e)?On({},e):e:null}function Eo(e,t,n=!1,a=!1){const{props:o,ref:l,patchFlag:s,children:r,transition:u}=e,c=t?pt(o||{},t):o,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&B1(c),ref:t&&t.ref?n&&l?be(l)?l.concat(Qu(t)):[l,Qu(t)]:Qu(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==He?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Eo(e.ssContent),ssFallback:e.ssFallback&&Eo(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&a&&gs(d,u.clone(d)),d}function St(e=" ",t=0){return J(Or,null,e,t)}function le(e="",t=!1){return t?(x(),re(vn,null,e)):J(vn,null,e)}function vo(e){return e==null||typeof e=="boolean"?J(vn):be(e)?J(He,null,e.slice()):Ht(e)?Bo(e):J(Or,null,String(e))}function Bo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Eo(e)}function Bv(e,t){let n=0;const{shapeFlag:a}=e;if(t==null)t=null;else if(be(t))n=16;else if(typeof t=="object")if(a&65){const o=t.default;o&&(o._c&&(o._d=!1),Bv(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!N1(t)?t._ctx=Hn:o===3&&Hn&&(Hn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ze(t)?(t={default:t,_ctx:Hn},n=32):(t=String(t),a&64?(n=16,t=[St(t)]):n=8);e.children=t,e.shapeFlag|=n}function pt(...e){const t={};for(let n=0;nGn||Hn;let kc,lp;{const e=ld(),t=(n,a)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(a),l=>{o.length>1?o.forEach(s=>s(l)):o[0](l)}};kc=t("__VUE_INSTANCE_SETTERS__",n=>Gn=n),lp=t("__VUE_SSR_SETTERS__",n=>xi=n)}const Qi=e=>{const t=Gn;return kc(e),e.scope.on(),()=>{e.scope.off(),kc(t)}},Xm=()=>{Gn&&Gn.scope.off(),kc(null)};function F1(e){return e.vnode.shapeFlag&4}let xi=!1;function NT(e,t=!1,n=!1){t&&lp(t);const{props:a,children:o}=e.vnode,l=F1(e);pT(e,a,l,t),gT(e,o,n||t);const s=l?MT(e,t):void 0;return t&&lp(!1),s}function MT(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Jx);const{setup:a}=n;if(a){Zo();const o=e.setupContext=a.length>1?H1(e):null,l=Qi(e),s=Zi(a,e,0,[e.props,o]),r=Pl(s);if(Jo(),l(),(r||e.sp)&&!Qs(e)&&g1(e),r){if(s.then(Xm,Xm),t)return s.then(u=>{Zm(e,u)}).catch(u=>{ud(u,e,0)});e.asyncDep=s}else Zm(e,s)}else z1(e)}function Zm(e,t,n){ze(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ot(t)&&(e.setupState=n1(t)),z1(e)}function z1(e,t,n){const a=e.type;e.render||(e.render=a.render||_t);{const o=Qi(e);Zo();try{Qx(e)}finally{Jo(),o()}}}const RT={get(e,t){return qn(e,"get",""),e[t]}};function H1(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,RT),slots:e.slots,emit:e.emit,expose:t}}function vd(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(n1(za(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ii)return ii[n](e)},has(t,n){return n in t||n in ii}})):e.proxy}function IT(e,t=!0){return ze(e)?e.displayName||e.name:e.name||t&&e.__name}function _T(e){return ze(e)&&"__vccOpts"in e}const S=(e,t)=>Mx(e,t,xi);function Ye(e,t,n){try{Sc(-1);const a=arguments.length;return a===2?ot(t)&&!be(t)?Ht(t)?J(e,null,[t]):J(e,t):J(e,null,t):(a>3?n=Array.prototype.slice.call(arguments,2):a===3&&Ht(n)&&(n=[n]),J(e,t,n))}finally{Sc(1)}}const PT="3.5.33",AT=_t;/** +* @vue/runtime-dom v3.5.33 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let sp;const Jm=typeof window<"u"&&window.trustedTypes;if(Jm)try{sp=Jm.createPolicy("vue",{createHTML:e=>e})}catch{}const K1=sp?e=>sp.createHTML(e):e=>e,LT="http://www.w3.org/2000/svg",DT="http://www.w3.org/1998/Math/MathML",Vo=typeof document<"u"?document:null,Qm=Vo&&Vo.createElement("template"),VT={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,a)=>{const o=t==="svg"?Vo.createElementNS(LT,e):t==="mathml"?Vo.createElementNS(DT,e):n?Vo.createElement(e,{is:n}):Vo.createElement(e);return e==="select"&&a&&a.multiple!=null&&o.setAttribute("multiple",a.multiple),o},createText:e=>Vo.createTextNode(e),createComment:e=>Vo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Vo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,a,o,l){const s=n?n.previousSibling:t.lastChild;if(o&&(o===l||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===l||!(o=o.nextSibling)););else{Qm.innerHTML=K1(a==="svg"?`${e}`:a==="mathml"?`${e}`:e);const r=Qm.content;if(a==="svg"||a==="mathml"){const u=r.firstChild;for(;u.firstChild;)r.appendChild(u.firstChild);r.removeChild(u)}t.insertBefore(r,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ml="transition",Hr="animation",ur=Symbol("_vtc"),W1={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},j1=On({},p1,W1),BT=e=>(e.displayName="Transition",e.props=j1,e),Bn=BT((e,{slots:t})=>Ye(Wx,U1(e),t)),Yl=(e,t=[])=>{be(e)?e.forEach(n=>n(...t)):e&&e(...t)},eg=e=>e?be(e)?e.some(t=>t.length>1):e.length>1:!1;function U1(e){const t={};for(const P in e)P in W1||(t[P]=e[P]);if(e.css===!1)return t;const{name:n="v",type:a,duration:o,enterFromClass:l=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:r=`${n}-enter-to`,appearFromClass:u=l,appearActiveClass:c=s,appearToClass:d=r,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=e,v=FT(o),h=v&&v[0],m=v&&v[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:w,onLeave:C,onLeaveCancelled:k,onBeforeAppear:E=y,onAppear:T=b,onAppearCancelled:$=w}=t,N=(P,D,W,U)=>{P._enterCancelled=U,bl(P,D?d:r),bl(P,D?c:s),W&&W()},O=(P,D)=>{P._isLeaving=!1,bl(P,f),bl(P,g),bl(P,p),D&&D()},_=P=>(D,W)=>{const U=P?T:b,F=()=>N(D,P,W);Yl(U,[D,F]),tg(()=>{bl(D,P?u:l),uo(D,P?d:r),eg(U)||ng(D,a,h,F)})};return On(t,{onBeforeEnter(P){Yl(y,[P]),uo(P,l),uo(P,s)},onBeforeAppear(P){Yl(E,[P]),uo(P,u),uo(P,c)},onEnter:_(!1),onAppear:_(!0),onLeave(P,D){P._isLeaving=!0;const W=()=>O(P,D);uo(P,f),P._enterCancelled?(uo(P,p),rp(P)):(rp(P),uo(P,p)),tg(()=>{P._isLeaving&&(bl(P,f),uo(P,g),eg(C)||ng(P,a,m,W))}),Yl(C,[P,W])},onEnterCancelled(P){N(P,!1,void 0,!0),Yl(w,[P])},onAppearCancelled(P){N(P,!0,void 0,!0),Yl($,[P])},onLeaveCancelled(P){O(P),Yl(k,[P])}})}function FT(e){if(e==null)return null;if(ot(e))return[cf(e.enter),cf(e.leave)];{const t=cf(e);return[t,t]}}function cf(e){return JE(e)}function uo(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[ur]||(e[ur]=new Set)).add(t)}function bl(e,t){t.split(/\s+/).forEach(a=>a&&e.classList.remove(a));const n=e[ur];n&&(n.delete(t),n.size||(e[ur]=void 0))}function tg(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let zT=0;function ng(e,t,n,a){const o=e._endId=++zT,l=()=>{o===e._endId&&a()};if(n!=null)return setTimeout(l,n);const{type:s,timeout:r,propCount:u}=Y1(e,t);if(!s)return a();const c=s+"end";let d=0;const f=()=>{e.removeEventListener(c,p),l()},p=g=>{g.target===e&&++d>=u&&f()};setTimeout(()=>{d(n[v]||"").split(", "),o=a(`${ml}Delay`),l=a(`${ml}Duration`),s=ag(o,l),r=a(`${Hr}Delay`),u=a(`${Hr}Duration`),c=ag(r,u);let d=null,f=0,p=0;t===ml?s>0&&(d=ml,f=s,p=l.length):t===Hr?c>0&&(d=Hr,f=c,p=u.length):(f=Math.max(s,c),d=f>0?s>c?ml:Hr:null,p=d?d===ml?l.length:u.length:0);const g=d===ml&&/\b(?:transform|all)(?:,|$)/.test(a(`${ml}Property`).toString());return{type:d,timeout:f,propCount:p,hasTransform:g}}function ag(e,t){for(;e.lengthog(n)+og(e[a])))}function og(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function rp(e){return(e?e.ownerDocument:document).body.offsetHeight}function HT(e,t,n){const a=e[ur];a&&(t=(t?[t,...a]:[...a]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ec=Symbol("_vod"),q1=Symbol("_vsh"),Nt={name:"show",beforeMount(e,{value:t},{transition:n}){e[Ec]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Kr(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:a}){!t!=!n&&(a?t?(a.beforeEnter(e),Kr(e,!0),a.enter(e)):a.leave(e,()=>{Kr(e,!1)}):Kr(e,t))},beforeUnmount(e,{value:t}){Kr(e,t)}};function Kr(e,t){e.style.display=t?e[Ec]:"none",e[q1]=!t}const KT=Symbol(""),WT=/(?:^|;)\s*display\s*:/;function jT(e,t,n){const a=e.style,o=De(n);let l=!1;if(n&&!o){if(t)if(De(t))for(const s of t.split(";")){const r=s.slice(0,s.indexOf(":")).trim();n[r]==null&&Qr(a,r,"")}else for(const s in t)n[s]==null&&Qr(a,s,"");for(const s in n){s==="display"&&(l=!0);const r=n[s];r!=null?YT(e,s,!De(t)&&t?t[s]:void 0,r)||Qr(a,s,r):Qr(a,s,"")}}else if(o){if(t!==n){const s=a[KT];s&&(n+=";"+s),a.cssText=n,l=WT.test(n)}}else t&&e.removeAttribute("style");Ec in e&&(e[Ec]=l?a.display:"",e[q1]&&(a.display="none"))}const lg=/\s*!important$/;function Qr(e,t,n){if(be(n))n.forEach(a=>Qr(e,t,a));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const a=UT(e,t);lg.test(n)?e.setProperty(ll(a),n.replace(lg,""),"important"):e[a]=n}}const sg=["Webkit","Moz","ms"],df={};function UT(e,t){const n=df[t];if(n)return n;let a=Vn(t);if(a!=="filter"&&a in e)return df[t]=a;a=Xi(a);for(let o=0;off||(ZT.then(()=>ff=0),ff=Date.now());function QT(e,t){const n=a=>{if(!a._vts)a._vts=Date.now();else if(a._vts<=n.attached)return;Ua(e$(a,n.value),t,5,[a])};return n.value=e,n.attached=JT(),n}function e$(e,t){if(be(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(a=>o=>!o._stopped&&a&&a(o))}else return t}const fg=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,t$=(e,t,n,a,o,l)=>{const s=o==="svg";t==="class"?HT(e,a,s):t==="style"?jT(e,n,a):ed(t)?td(t)||GT(e,t,n,a,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):n$(e,t,a,s))?(ug(e,t,a),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ig(e,t,a,s,l,t!=="value")):e._isVueCE&&(a$(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!De(a)))?ug(e,Vn(t),a,l,t):(t==="true-value"?e._trueValue=a:t==="false-value"&&(e._falseValue=a),ig(e,t,a,s))};function n$(e,t,n,a){if(a)return!!(t==="innerHTML"||t==="textContent"||t in e&&fg(t)&&ze(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return fg(t)&&De(n)?!1:t in e}function a$(e,t){const n=e._def.props;if(!n)return!1;const a=Vn(t);return Array.isArray(n)?n.some(o=>Vn(o)===a):Object.keys(n).some(o=>Vn(o)===a)}const G1=new WeakMap,X1=new WeakMap,xc=Symbol("_moveCb"),pg=Symbol("_enterCb"),o$=e=>(delete e.props.mode,e),l$=o$({name:"TransitionGroup",props:On({},j1,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=vt(),a=f1();let o,l;return Qa(()=>{if(!o.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!u$(o[0].el,n.vnode.el,s)){o=[];return}o.forEach(s$),o.forEach(r$);const r=o.filter(i$);rp(n.vnode.el),r.forEach(u=>{const c=u.el,d=c.style;uo(c,s),d.transform=d.webkitTransform=d.transitionDuration="";const f=c[xc]=p=>{p&&p.target!==c||(!p||p.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",f),c[xc]=null,bl(c,s))};c.addEventListener("transitionend",f)}),o=[]}),()=>{const s=Kt(e),r=U1(s);let u=s.tag||He;if(o=[],l)for(let c=0;c{r.split(/\s+/).forEach(u=>u&&a.classList.remove(u))}),n.split(/\s+/).forEach(r=>r&&a.classList.add(r)),a.style.display="none";const l=t.nodeType===1?t:t.parentNode;l.appendChild(a);const{hasTransform:s}=Y1(a);return l.removeChild(a),s}const cr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return be(t)?n=>Zu(t,n):t};function c$(e){e.target.composing=!0}function vg(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Go=Symbol("_assign");function hg(e,t,n){return t&&(e=e.trim()),n&&(e=Cv(e)),e}const Q1={created(e,{modifiers:{lazy:t,trim:n,number:a}},o){e[Go]=cr(o);const l=a||o.props&&o.props.type==="number";xl(e,t?"change":"input",s=>{s.target.composing||e[Go](hg(e.value,n,l))}),(n||l)&&xl(e,"change",()=>{e.value=hg(e.value,n,l)}),t||(xl(e,"compositionstart",c$),xl(e,"compositionend",vg),xl(e,"change",vg))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:a,trim:o,number:l}},s){if(e[Go]=cr(s),e.composing)return;const r=(l||e.type==="number")&&!/^0\d/.test(e.value)?Cv(e.value):e.value,u=t??"";if(r===u)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(a&&t===n||o&&e.value.trim()===u)||(e.value=u)}},ew={deep:!0,created(e,t,n){e[Go]=cr(n),xl(e,"change",()=>{const a=e._modelValue,o=nw(e),l=e.checked,s=e[Go];if(be(a)){const r=P0(a,o),u=r!==-1;if(l&&!u)s(a.concat(o));else if(!l&&u){const c=[...a];c.splice(r,1),s(c)}}else if(nd(a)){const r=new Set(a);l?r.add(o):r.delete(o),s(r)}else s(aw(e,l))})},mounted:mg,beforeUpdate(e,t,n){e[Go]=cr(n),mg(e,t,n)}};function mg(e,{value:t,oldValue:n},a){e._modelValue=t;let o;if(be(t))o=P0(t,a.props.value)>-1;else if(nd(t))o=t.has(a.props.value);else{if(t===n)return;o=hs(t,aw(e,!0))}e.checked!==o&&(e.checked=o)}const tw={created(e,{value:t},n){e.checked=hs(t,n.props.value),e[Go]=cr(n),xl(e,"change",()=>{e[Go](nw(e))})},beforeUpdate(e,{value:t,oldValue:n},a){e[Go]=cr(a),t!==n&&(e.checked=hs(t,a.props.value))}};function nw(e){return"_value"in e?e._value:e.value}function aw(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const d$=["ctrl","shift","alt","meta"],f$={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>d$.some(n=>e[`${n}Key`]&&!t.includes(n))},Xe=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),a=t.join(".");return n[a]||(n[a]=(o,...l)=>{for(let s=0;s{const n=e._withKeys||(e._withKeys={}),a=t.join(".");return n[a]||(n[a]=o=>{if(!("key"in o))return;const l=ll(o.key);if(t.some(s=>s===l||p$[s]===l))return e(o)})},v$=On({patchProp:t$},VT);let gg;function ow(){return gg||(gg=bT(v$))}const Al=(...e)=>{ow().render(...e)},lw=(...e)=>{const t=ow().createApp(...e),{mount:n}=t;return t.mount=a=>{const o=m$(a);if(!o)return;const l=t._component;!ze(l)&&!l.render&&!l.template&&(l.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const s=n(o,!1,h$(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t};function h$(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function m$(e){return De(e)?document.querySelector(e):e}/*! + * pinia v2.3.1 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */const g$=Symbol();var yg;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(yg||(yg={}));function y$(){const e=V0(!0),t=e.run(()=>A({}));let n=[],a=[];const o=za({install(l){o._a=l,l.provide(g$,o),l.config.globalProperties.$pinia=o,a.forEach(s=>n.push(s)),a=[]},use(l){return this._a?n.push(l):a.push(l),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const Ce={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},bg=["left","center","right"],b$=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],pf=["sun","mon","tue","wed","thu","fri","sat"],at="update:modelValue",yt="change",gn="input",hd=11,sw=2,wg=Symbol("INSTALLED_KEY"),eo=["","default","small","large"];function rw(e,t){var n;const a=Wt();return sa(()=>{a.value=e()},{...t,flush:(n=void 0)!=null?n:"sync"}),ms(a)}function Os(e){return B0()?(F0(e),!0):!1}function Kn(e){return typeof e=="function"?e():i(e)}function w$(e){if(!Ut(e))return Rt(e);const t=new Proxy({},{get(n,a,o){return i(Reflect.get(e.value,a,o))},set(n,a,o){return Ut(e.value[a])&&!Ut(o)?e.value[a].value=o:e.value[a]=o,!0},deleteProperty(n,a){return Reflect.deleteProperty(e.value,a)},has(n,a){return Reflect.has(e.value,a)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return Rt(t)}function C$(e){return w$(S(e))}const Mt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const S$=e=>typeof e<"u",iw=e=>e!=null,k$=Object.prototype.toString,E$=e=>k$.call(e)==="[object Object]",uw=(e,t,n)=>Math.min(n,Math.max(t,e)),Ha=()=>{},Tc=x$();function x$(){var e,t;return Mt&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function cw(e,t){function n(...a){return new Promise((o,l)=>{Promise.resolve(e(()=>t.apply(this,a),{fn:t,thisArg:this,args:a})).then(o).catch(l)})}return n}function T$(e,t={}){let n,a,o=Ha;const l=r=>{clearTimeout(r),o(),o=Ha};return r=>{const u=Kn(e),c=Kn(t.maxWait);return n&&l(n),u<=0||c!==void 0&&c<=0?(a&&(l(a),a=null),Promise.resolve(r())):new Promise((d,f)=>{o=t.rejectOnCancel?f:d,c&&!a&&(a=setTimeout(()=>{n&&l(n),a=null,d(r())},c)),n=setTimeout(()=>{a&&l(a),a=null,d(r())},u)})}}function $$(...e){let t=0,n,a=!0,o=Ha,l,s,r,u,c;!Ut(e[0])&&typeof e[0]=="object"?{delay:s,trailing:r=!0,leading:u=!0,rejectOnCancel:c=!1}=e[0]:[s,r=!0,u=!0,c=!1]=e;const d=()=>{n&&(clearTimeout(n),n=void 0,o(),o=Ha)};return p=>{const g=Kn(s),v=Date.now()-t,h=()=>l=p();return d(),g<=0?(t=Date.now(),h()):(v>g&&(u||!a)?(t=Date.now(),h()):r&&(l=new Promise((m,y)=>{o=c?y:m,n=setTimeout(()=>{t=Date.now(),a=!0,m(h()),d()},Math.max(0,g-v))})),!u&&!n&&(n=setTimeout(()=>a=!0,g)),a=!1,l)}}function O$(e){return vt()}function eu(e,t=200,n={}){return cw(T$(t,n),e)}function N$(e,t=200,n={}){const a=A(e.value),o=eu(()=>{a.value=e.value},t,n);return fe(e,()=>o()),a}function dw(e,t=200,n=!1,a=!0,o=!1){return cw($$(t,n,a,o),e)}function Fv(e,t=!0,n){O$()?mt(e,n):t?e():Ae(e)}function dr(e,t,n={}){const{immediate:a=!0}=n,o=A(!1);let l=null;function s(){l&&(clearTimeout(l),l=null)}function r(){o.value=!1,s()}function u(...c){s(),o.value=!0,l=setTimeout(()=>{o.value=!1,l=null,e(...c)},Kn(t))}return a&&(o.value=!0,Mt&&u()),Os(r),{isPending:ms(o),start:u,stop:r}}const to=Mt?window:void 0,M$=Mt?window.document:void 0;function Cn(e){var t;const n=Kn(e);return(t=n==null?void 0:n.$el)!=null?t:n}function At(...e){let t,n,a,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,a,o]=e,t=to):[t,n,a,o]=e,!t)return Ha;Array.isArray(n)||(n=[n]),Array.isArray(a)||(a=[a]);const l=[],s=()=>{l.forEach(d=>d()),l.length=0},r=(d,f,p,g)=>(d.addEventListener(f,p,g),()=>d.removeEventListener(f,p,g)),u=fe(()=>[Cn(t),Kn(o)],([d,f])=>{if(s(),!d)return;const p=E$(f)?{...f}:f;l.push(...n.flatMap(g=>a.map(v=>r(d,g,v,p))))},{immediate:!0,flush:"post"}),c=()=>{u(),s()};return Os(c),c}let Cg=!1;function zv(e,t,n={}){const{window:a=to,ignore:o=[],capture:l=!0,detectIframe:s=!1}=n;if(!a)return Ha;Tc&&!Cg&&(Cg=!0,Array.from(a.document.body.children).forEach(h=>h.addEventListener("click",Ha)),a.document.documentElement.addEventListener("click",Ha));let r=!0;const u=h=>Kn(o).some(m=>{if(typeof m=="string")return Array.from(a.document.querySelectorAll(m)).some(y=>y===h.target||h.composedPath().includes(y));{const y=Cn(m);return y&&(h.target===y||h.composedPath().includes(y))}});function c(h){const m=Kn(h);return m&&m.$.subTree.shapeFlag===16}function d(h,m){const y=Kn(h),b=y.$.subTree&&y.$.subTree.children;return b==null||!Array.isArray(b)?!1:b.some(w=>w.el===m.target||m.composedPath().includes(w.el))}const f=h=>{const m=Cn(e);if(h.target!=null&&!(!(m instanceof Element)&&c(e)&&d(e,h))&&!(!m||m===h.target||h.composedPath().includes(m))){if(h.detail===0&&(r=!u(h)),!r){r=!0;return}t(h)}};let p=!1;const g=[At(a,"click",h=>{p||(p=!0,setTimeout(()=>{p=!1},0),f(h))},{passive:!0,capture:l}),At(a,"pointerdown",h=>{const m=Cn(e);r=!u(h)&&!!(m&&!h.composedPath().includes(m))},{passive:!0}),s&&At(a,"blur",h=>{setTimeout(()=>{var m;const y=Cn(e);((m=a.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!(y!=null&&y.contains(a.document.activeElement))&&t(h)},0)})].filter(Boolean);return()=>g.forEach(h=>h())}function R$(){const e=A(!1),t=vt();return t&&mt(()=>{e.value=!0},t),e}function md(e){const t=R$();return S(()=>(t.value,!!e()))}function tu(e,t,n={}){const{window:a=to,...o}=n;let l;const s=md(()=>a&&"MutationObserver"in a),r=()=>{l&&(l.disconnect(),l=void 0)},u=S(()=>{const p=Kn(e),g=(Array.isArray(p)?p:[p]).map(Cn).filter(iw);return new Set(g)}),c=fe(()=>u.value,p=>{r(),s.value&&p.size&&(l=new MutationObserver(t),p.forEach(g=>l.observe(g,o)))},{immediate:!0,flush:"post"}),d=()=>l==null?void 0:l.takeRecords(),f=()=>{c(),r()};return Os(f),{isSupported:s,stop:f,takeRecords:d}}function I$(e={}){var t;const{window:n=to,deep:a=!0,triggerOnRemoval:o=!1}=e,l=(t=e.document)!=null?t:n==null?void 0:n.document,s=()=>{var c;let d=l==null?void 0:l.activeElement;if(a)for(;d!=null&&d.shadowRoot;)d=(c=d==null?void 0:d.shadowRoot)==null?void 0:c.activeElement;return d},r=A(),u=()=>{r.value=s()};return n&&(At(n,"blur",c=>{c.relatedTarget===null&&u()},!0),At(n,"focus",u,!0)),o&&tu(l,c=>{c.filter(d=>d.removedNodes.length).map(d=>Array.from(d.removedNodes)).flat().forEach(d=>{d===r.value&&u()})},{childList:!0,subtree:!0}),u(),r}function _$(e,t={}){const{window:n=to}=t,a=md(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let o;const l=A(!1),s=c=>{l.value=c.matches},r=()=>{o&&("removeEventListener"in o?o.removeEventListener("change",s):o.removeListener(s))},u=sa(()=>{a.value&&(r(),o=n.matchMedia(Kn(e)),"addEventListener"in o?o.addEventListener("change",s):o.addListener(s),l.value=o.matches)});return Os(()=>{u(),r(),o=void 0}),l}function P$(e){return JSON.parse(JSON.stringify(e))}function A$(e,t,n={}){const{window:a=to,initialValue:o,observe:l=!1}=n,s=A(o),r=S(()=>{var c;return Cn(t)||((c=a==null?void 0:a.document)==null?void 0:c.documentElement)});function u(){var c;const d=Kn(e),f=Kn(r);if(f&&a&&d){const p=(c=a.getComputedStyle(f).getPropertyValue(d))==null?void 0:c.trim();s.value=p||o}}return l&&tu(r,u,{attributeFilter:["style","class"],window:a}),fe([r,()=>Kn(e)],(c,d)=>{d[0]&&d[1]&&d[0].style.removeProperty(d[1]),u()},{immediate:!0}),fe(s,c=>{var d;const f=Kn(e);(d=r.value)!=null&&d.style&&f&&(c==null?r.value.style.removeProperty(f):r.value.style.setProperty(f,c))}),s}function L$(e={}){const{document:t=M$}=e;if(!t)return A("visible");const n=A(t.visibilityState);return At(t,"visibilitychange",()=>{n.value=t.visibilityState}),n}function Xt(e,t,n={}){const{window:a=to,...o}=n;let l;const s=md(()=>a&&"ResizeObserver"in a),r=()=>{l&&(l.disconnect(),l=void 0)},u=S(()=>{const f=Kn(e);return Array.isArray(f)?f.map(p=>Cn(p)):[Cn(f)]}),c=fe(u,f=>{if(r(),s.value&&a){l=new ResizeObserver(t);for(const p of f)p&&l.observe(p,o)}},{immediate:!0,flush:"post"}),d=()=>{r(),c()};return Os(d),{isSupported:s,stop:d}}function Sg(e,t={}){const{reset:n=!0,windowResize:a=!0,windowScroll:o=!0,immediate:l=!0,updateTiming:s="sync"}=t,r=A(0),u=A(0),c=A(0),d=A(0),f=A(0),p=A(0),g=A(0),v=A(0);function h(){const y=Cn(e);if(!y){n&&(r.value=0,u.value=0,c.value=0,d.value=0,f.value=0,p.value=0,g.value=0,v.value=0);return}const b=y.getBoundingClientRect();r.value=b.height,u.value=b.bottom,c.value=b.left,d.value=b.right,f.value=b.top,p.value=b.width,g.value=b.x,v.value=b.y}function m(){s==="sync"?h():s==="next-frame"&&requestAnimationFrame(()=>h())}return Xt(e,m),fe(()=>Cn(e),y=>!y&&m()),tu(e,m,{attributeFilter:["style","class"]}),o&&At("scroll",m,{capture:!0,passive:!0}),a&&At("resize",m,{passive:!0}),Fv(()=>{l&&m()}),{height:r,bottom:u,left:c,right:d,top:f,width:p,x:g,y:v,update:m}}function ip(e,t={width:0,height:0},n={}){const{window:a=to,box:o="content-box"}=n,l=S(()=>{var f,p;return(p=(f=Cn(e))==null?void 0:f.namespaceURI)==null?void 0:p.includes("svg")}),s=A(t.width),r=A(t.height),{stop:u}=Xt(e,([f])=>{const p=o==="border-box"?f.borderBoxSize:o==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(a&&l.value){const g=Cn(e);if(g){const v=g.getBoundingClientRect();s.value=v.width,r.value=v.height}}else if(p){const g=Array.isArray(p)?p:[p];s.value=g.reduce((v,{inlineSize:h})=>v+h,0),r.value=g.reduce((v,{blockSize:h})=>v+h,0)}else s.value=f.contentRect.width,r.value=f.contentRect.height},n);Fv(()=>{const f=Cn(e);f&&(s.value="offsetWidth"in f?f.offsetWidth:t.width,r.value="offsetHeight"in f?f.offsetHeight:t.height)});const c=fe(()=>Cn(e),f=>{s.value=f?t.width:0,r.value=f?t.height:0});function d(){u(),c()}return{width:s,height:r,stop:d}}function D$(e,t,n={}){const{root:a,rootMargin:o="0px",threshold:l=0,window:s=to,immediate:r=!0}=n,u=md(()=>s&&"IntersectionObserver"in s),c=S(()=>{const v=Kn(e);return(Array.isArray(v)?v:[v]).map(Cn).filter(iw)});let d=Ha;const f=A(r),p=u.value?fe(()=>[c.value,Cn(a),f.value],([v,h])=>{if(d(),!f.value||!v.length)return;const m=new IntersectionObserver(t,{root:Cn(h),rootMargin:o,threshold:l});v.forEach(y=>y&&m.observe(y)),d=()=>{m.disconnect(),d=Ha}},{immediate:r,flush:"post"}):Ha,g=()=>{d(),p(),f.value=!1};return Os(g),{isSupported:u,isActive:f,pause(){d(),f.value=!1},resume(){f.value=!0},stop:g}}function fw(e,t,n,a={}){var o,l,s;const{clone:r=!1,passive:u=!1,eventName:c,deep:d=!1,defaultValue:f,shouldEmit:p}=a,g=vt(),v=n||(g==null?void 0:g.emit)||((o=g==null?void 0:g.$emit)==null?void 0:o.bind(g))||((s=(l=g==null?void 0:g.proxy)==null?void 0:l.$emit)==null?void 0:s.bind(g==null?void 0:g.proxy));let h=c;t||(t="modelValue"),h=h||`update:${t.toString()}`;const m=w=>r?typeof r=="function"?r(w):P$(w):w,y=()=>S$(e[t])?m(e[t]):f,b=w=>{p?p(w)&&v(h,w):v(h,w)};if(u){const w=y(),C=A(w);let k=!1;return fe(()=>e[t],E=>{k||(k=!0,C.value=m(E),Ae(()=>k=!1))}),fe(C,E=>{!k&&(E!==e[t]||d)&&b(E)},{deep:d}),C}else return S({get(){return y()},set(w){b(w)}})}function V$(e={}){const{window:t=to}=e;if(!t)return A(!1);const n=A(t.document.hasFocus());return At(t,"blur",()=>{n.value=!1}),At(t,"focus",()=>{n.value=!0}),n}function Hv(e={}){const{window:t=to,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:a=Number.POSITIVE_INFINITY,listenOrientation:o=!0,includeScrollbar:l=!0,type:s="inner"}=e,r=A(n),u=A(a),c=()=>{t&&(s==="outer"?(r.value=t.outerWidth,u.value=t.outerHeight):l?(r.value=t.innerWidth,u.value=t.innerHeight):(r.value=t.document.documentElement.clientWidth,u.value=t.document.documentElement.clientHeight))};if(c(),Fv(c),At("resize",c,{passive:!0}),o){const d=_$("(orientation: portrait)");fe(d,()=>c())}return{width:r,height:u}}const gd=()=>Mt&&/firefox/i.test(window.navigator.userAgent),pw=()=>Mt&&/android/i.test(window.navigator.userAgent);var vw=typeof global=="object"&&global&&global.Object===Object&&global,B$=typeof self=="object"&&self&&self.Object===Object&&self,no=vw||B$||Function("return this")(),Ia=no.Symbol,hw=Object.prototype,F$=hw.hasOwnProperty,z$=hw.toString,Wr=Ia?Ia.toStringTag:void 0;function H$(e){var t=F$.call(e,Wr),n=e[Wr];try{e[Wr]=void 0;var a=!0}catch{}var o=z$.call(e);return a&&(t?e[Wr]=n:delete e[Wr]),o}var K$=Object.prototype,W$=K$.toString;function j$(e){return W$.call(e)}var U$="[object Null]",Y$="[object Undefined]",kg=Ia?Ia.toStringTag:void 0;function Ns(e){return e==null?e===void 0?Y$:U$:kg&&kg in Object(e)?H$(e):j$(e)}function xo(e){return e!=null&&typeof e=="object"}var q$="[object Symbol]";function yd(e){return typeof e=="symbol"||xo(e)&&Ns(e)==q$}function Kv(e,t){for(var n=-1,a=e==null?0:e.length,o=Array(a);++n0){if(++t>=SO)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function TO(e){return function(){return e}}var $c=function(){try{var e=Rs(Object,"defineProperty");return e({},"",{}),e}catch{}}(),$O=$c?function(e,t){return $c(e,"toString",{configurable:!0,enumerable:!1,value:TO(t),writable:!0})}:Wv,yw=xO($O);function OO(e,t){for(var n=-1,a=e==null?0:e.length;++n-1}var _O=9007199254740991,PO=/^(?:0|[1-9]\d*)$/;function bd(e,t){var n=typeof e;return t=t??_O,!!t&&(n=="number"||n!="symbol"&&PO.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=DO}function Mr(e){return e!=null&&Yv(e.length)&&!jv(e)}function VO(e,t,n){if(!ua(n))return!1;var a=typeof t;return(a=="number"?Mr(n)&&bd(t,n.length):a=="string"&&t in n)?nu(n[t],e):!1}function BO(e){return Cw(function(t,n){var a=-1,o=n.length,l=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(l=e.length>3&&typeof l=="function"?(o--,l):void 0,s&&VO(n[0],n[1],s)&&(l=o<3?void 0:l,o=1),t=Object(t);++a-1}function GN(e,t){var n=this.__data__,a=Cd(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this}function il(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(r)?t>1?lu(r,t-1,n,a,o):Jv(o,r):a||(o[o.length]=r)}return o}function Oc(e){var t=e==null?0:e.length;return t?lu(e,1):[]}function $w(e){return yw(ww(e,void 0,Oc),e+"")}var Qv=Tw(Object.getPrototypeOf,Object),cM="[object Object]",dM=Function.prototype,fM=Object.prototype,Ow=dM.toString,pM=fM.hasOwnProperty,vM=Ow.call(Object);function eh(e){if(!xo(e)||Ns(e)!=cM)return!1;var t=Qv(e);if(t===null)return!0;var n=pM.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ow.call(n)==vM}function hM(e,t,n){var a=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var l=Array(o);++a=t?e:t)),e}function as(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=ci(n),n=n===n?n:0),t!==void 0&&(t=ci(t),t=t===t?t:0),mM(ci(e),t,n)}function gM(){this.__data__=new il,this.size=0}function yM(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function bM(e){return this.__data__.get(e)}function wM(e){return this.__data__.has(e)}var CM=200;function SM(e,t){var n=this.__data__;if(n instanceof il){var a=n.__data__;if(!Ni||a.lengthr))return!1;var c=l.get(e),d=l.get(t);if(c&&d)return c==t&&d==e;var f=-1,p=!0,g=n&X4?new Mi:void 0;for(l.set(e,t),l.set(t,e);++f=t||T<0||f&&$>=l}function y(){var E=gf();if(m(E))return b(E);r=setTimeout(y,h(E))}function b(E){return r=void 0,p&&a?g(E):(a=o=void 0,s)}function w(){r!==void 0&&clearTimeout(r),c=0,a=u=o=r=void 0}function C(){return r===void 0?s:b(gf())}function k(){var E=gf(),T=m(E);if(a=arguments,o=this,u=E,T){if(r===void 0)return v(u);if(f)return clearTimeout(r),r=setTimeout(y,t),g(u)}return r===void 0&&(r=setTimeout(y,t)),s}return k.cancel=w,k.flush=C,k}function pp(e,t,n){(n!==void 0&&!nu(e[t],n)||n===void 0&&!(t in e))&&wd(e,t,n)}function Yw(e){return xo(e)&&Mr(e)}function vp(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function BR(e){return Nr(e,ou(e))}function FR(e,t,n,a,o,l,s){var r=vp(e,n),u=vp(t,n),c=s.get(u);if(c){pp(e,n,c);return}var d=l?l(r,u,n+"",e,t,s):void 0,f=d===void 0;if(f){var p=ia(u),g=!p&&$i(u),v=!p&&!g&&Xv(u);d=u,p||g||v?ia(r)?d=r:Yw(r)?d=gw(r):g?(f=!1,d=Mw(u,!0)):v?(f=!1,d=Aw(u,!0)):d=[]:eh(u)||Ti(u)?(d=r,Ti(r)?d=BR(r):(!ua(r)||jv(r))&&(d=Lw(u))):f=!1}f&&(s.set(u,d),o(d,u,a,l,s),s.delete(u)),pp(e,n,d)}function qw(e,t,n,a,o){e!==t&&Uw(t,function(l,s){if(o||(o=new Ka),ua(l))FR(e,t,s,n,qw,a,o);else{var r=a?a(vp(e,s),l,s+"",e,t,o):void 0;r===void 0&&(r=l),pp(e,s,r)}},ou)}function zR(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Gw(e,t,n){var a=e==null?0:e.length;if(!a)return-1;var o=a-1;return bw(e,jw(t),o,!0)}function HR(e,t){var n=-1,a=Mr(e)?Array(e.length):[];return AR(e,function(o,l,s){a[++n]=t(o,l,s)}),a}function KR(e,t){var n=ia(e)?Kv:HR;return n(e,jw(t))}function Xw(e,t){return lu(KR(e,t),1)}var WR=1/0;function jR(e){var t=e==null?0:e.length;return t?lu(e,WR):[]}function pr(e){for(var t=-1,n=e==null?0:e.length,a={};++t1),l}),Nr(e,Pw(e),n),a&&(n=fi(n,JR|QR|e3,ZR));for(var o=t.length;o--;)XR(n,t[o]);return n});function Jw(e,t,n,a){if(!ua(e))return e;t=Rr(t,e);for(var o=-1,l=t.length,s=l-1,r=e;r!=null&&++o=r3){var c=s3(e);if(c)return ah(c);s=!1,o=Fw,u=new Mi}else u=r;e:for(;++ae===void 0,Vt=e=>typeof e=="boolean",Fe=e=>typeof e=="number",la=e=>!e&&e!==0||be(e)&&e.length===0||ot(e)&&!Object.keys(e).length,fa=e=>typeof Element>"u"?!1:e instanceof Element,pa=e=>hn(e),u3=e=>De(e)?!Number.isNaN(Number(e)):!1,ru=e=>e===window,wl=new Map;if(Mt){let e;document.addEventListener("mousedown",t=>e=t),document.addEventListener("mouseup",t=>{if(e){for(const n of wl.values())for(const{documentHandler:a}of n)a(t,e);e=void 0}})}function Jg(e,t){let n=[];return be(t.arg)?n=t.arg:fa(t.arg)&&n.push(t.arg),function(a,o){const l=t.instance.popperRef,s=a.target,r=o==null?void 0:o.target,u=!t||!t.instance,c=!s||!r,d=e.contains(s)||e.contains(r),f=e===s,p=n.length&&n.some(v=>v==null?void 0:v.contains(s))||n.length&&n.includes(r),g=l&&(l.contains(s)||l.contains(r));u||c||d||f||p||g||t.value(a,o)}}const Ll={beforeMount(e,t){wl.has(e)||wl.set(e,[]),wl.get(e).push({documentHandler:Jg(e,t),bindingFn:t.value})},updated(e,t){wl.has(e)||wl.set(e,[]);const n=wl.get(e),a=n.findIndex(l=>l.bindingFn===t.oldValue),o={documentHandler:Jg(e,t),bindingFn:t.value};a>=0?n.splice(a,1,o):n.push(o)},unmounted(e){wl.delete(e)}},c3=100,d3=600,Iu="_RepeatClick",Mc={beforeMount(e,t){const n=t.value,{interval:a=c3,delay:o=d3}=ze(n)?{}:n;let l,s;const r=()=>ze(n)?n():n.handler(),u=()=>{s&&(clearTimeout(s),s=void 0),l&&(clearInterval(l),l=void 0)},c=d=>{d.button===0&&(u(),r(),document.addEventListener("mouseup",u,{once:!0}),s=setTimeout(()=>{l=setInterval(()=>{r()},a)},o))};e[Iu]={start:c,clear:u},e.addEventListener("mousedown",c)},unmounted(e){if(!e[Iu])return;const{start:t,clear:n}=e[Iu];t&&e.removeEventListener("mousedown",t),n&&(n(),document.removeEventListener("mouseup",n)),e[Iu]=null}},f3='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',Qw=e=>typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot,Qg=e=>typeof Element>"u"?!1:e instanceof Element,p3=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,ey=e=>Array.from(e.querySelectorAll(f3)).filter(t=>ws(t)&&p3(t)),ws=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},ec=function(e,t,...n){let a;t.includes("mouse")||t.includes("click")?a="MouseEvents":t.includes("key")?a="KeyboardEvent":a="HTMLEvents";const o=document.createEvent(a);return o.initEvent(t,...n),e.dispatchEvent(o),e},eC=e=>!e.getAttribute("aria-owns"),tC=(e,t,n)=>{const{parentNode:a}=e;if(!a)return null;const o=a.querySelectorAll(n);return o[Array.prototype.indexOf.call(o,e)+t]||null},iu=(e,t)=>{if(!e||!e.focus)return;let n=!1;Qg(e)&&!ws(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),n=!0),e.focus(t),Qg(e)&&n&&e.removeAttribute("tabindex")},tc=e=>{e&&(iu(e),!eC(e)&&e.click())},xn=(e,t,{checkForDefaultPrevented:n=!0}={})=>o=>{const l=e==null?void 0:e(o);if(n===!1||!l)return t==null?void 0:t(o)},ty=e=>t=>t.pointerType==="mouse"?e(t):void 0,zt=e=>{if(e.code&&e.code!=="Unidentified")return e.code;const t=nC(e);if(t){if(Object.values(Ce).includes(t))return t;switch(t){case" ":return Ce.space;default:return""}}return""},nC=e=>{let t=e.key&&e.key!=="Unidentified"?e.key:"";if(!t&&e.type==="keyup"&&pw()){const n=e.target;t=n.value.charAt(n.selectionStart-1)}return t},hp="_trap-focus-children",os=[],ny=e=>{if(os.length===0)return;const t=zt(e),n=os[os.length-1][hp];if(n.length>0&&t===Ce.tab){if(n.length===1){e.preventDefault(),document.activeElement!==n[0]&&n[0].focus();return}const a=e.shiftKey,o=e.target===n[0],l=e.target===n[n.length-1];o&&a&&(e.preventDefault(),n[n.length-1].focus()),l&&!a&&(e.preventDefault(),n[0].focus())}},v3={beforeMount(e){e[hp]=ey(e),os.push(e),os.length<=1&&document.addEventListener("keydown",ny)},updated(e){Ae(()=>{e[hp]=ey(e)})},unmounted(){os.shift(),os.length===0&&document.removeEventListener("keydown",ny)}};var ay=!1,es,mp,gp,nc,ac,aC,oc,yp,bp,wp,oC,Cp,Sp,lC,sC;function da(){if(!ay){ay=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(Cp=/\b(iPhone|iP[ao]d)/.exec(e),Sp=/\b(iP[ao]d)/.exec(e),wp=/Android/i.exec(e),lC=/FBAN\/\w+;/i.exec(e),sC=/Mobile/i.exec(e),oC=!!/Win64/.exec(e),t){es=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,es&&document&&document.documentMode&&(es=document.documentMode);var a=/(?:Trident\/(\d+.\d+))/.exec(e);aC=a?parseFloat(a[1])+4:es,mp=t[2]?parseFloat(t[2]):NaN,gp=t[3]?parseFloat(t[3]):NaN,nc=t[4]?parseFloat(t[4]):NaN,nc?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),ac=t&&t[1]?parseFloat(t[1]):NaN):ac=NaN}else es=mp=gp=ac=nc=NaN;if(n){if(n[1]){var o=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);oc=o?parseFloat(o[1].replace("_",".")):!0}else oc=!1;yp=!!n[2],bp=!!n[3]}else oc=yp=bp=!1}}var kp={ie:function(){return da()||es},ieCompatibilityMode:function(){return da()||aC>es},ie64:function(){return kp.ie()&&oC},firefox:function(){return da()||mp},opera:function(){return da()||gp},webkit:function(){return da()||nc},safari:function(){return kp.webkit()},chrome:function(){return da()||ac},windows:function(){return da()||yp},osx:function(){return da()||oc},linux:function(){return da()||bp},iphone:function(){return da()||Cp},mobile:function(){return da()||Cp||Sp||wp||sC},nativeApp:function(){return da()||lC},android:function(){return da()||wp},ipad:function(){return da()||Sp}},h3=kp,m3=!!(typeof window<"u"&&window.document&&window.document.createElement),g3={canUseDOM:m3},rC=g3,iC;rC.canUseDOM&&(iC=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function y3(e,t){if(!rC.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,a=n in document;if(!a){var o=document.createElement("div");o.setAttribute(n,"return;"),a=typeof o[n]=="function"}return!a&&iC&&e==="wheel"&&(a=document.implementation.hasFeature("Events.wheel","3.0")),a}var b3=y3,oy=10,ly=40,sy=800;function uC(e){var t=0,n=0,a=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),a=t*oy,o=n*oy,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(a=e.deltaX),(a||o)&&e.deltaMode&&(e.deltaMode==1?(a*=ly,o*=ly):(a*=sy,o*=sy)),a&&!t&&(t=a<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:a,pixelY:o}}uC.getEventType=function(){return h3.firefox()?"DOMMouseScroll":b3("wheel")?"wheel":"mousewheel"};var w3=uC;/** +* Checks if an event is supported in the current execution environment. +* +* NOTE: This will not work correctly for non-generic events such as `change`, +* `reset`, `load`, `error`, and `select`. +* +* Borrows from Modernizr. +* +* @param {string} eventNameSuffix Event name, e.g. "click". +* @param {?boolean} capture Check if the capture phase is supported. +* @return {boolean} True if the event is supported. +* @internal +* @license Modernizr 3.0.0pre (Custom Build) | MIT +*/const lc="_Mousewheel",ry=function(e,t){if(e&&e.addEventListener){cC(e);const n=function(a){const o=w3(a);t&&Reflect.apply(t,this,[a,o])};e[lc]={wheelHandler:n},e.addEventListener("wheel",n,{passive:!0})}},cC=e=>{var t;(t=e[lc])!=null&&t.wheelHandler&&(e.removeEventListener("wheel",e[lc].wheelHandler),e[lc]=null)},C3={beforeMount(e,t){ry(e,t.value)},unmounted(e){cC(e)},updated(e,t){t.value!==t.oldValue&&ry(e,t.value)}},Ri=e=>Object.keys(e),dC=e=>Object.entries(e),Ml=(e,t,n)=>({get value(){return mn(e,t,n)},set value(a){a3(e,t,a)}}),fC="__epPropKey",X=e=>e,S3=e=>ot(e)&&!!e[fC],ao=(e,t)=>{if(!ot(e)||S3(e))return e;const{values:n,required:a,default:o,type:l,validator:s}=e,r={type:l,required:!!a,validator:n||s?u=>{let c=!1,d=[];if(n&&(d=Array.from(n),$t(e,"default")&&d.push(o),c||(c=d.includes(u))),s&&(c||(c=s(u))),!c&&d.length>0){const f=[...new Set(d)].map(p=>JSON.stringify(p)).join(", ");AT(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[fC]:!0};return $t(e,"default")&&(r.default=o),r},Se=e=>pr(Object.entries(e).map(([t,n])=>[t,ao(n,t)])),uu=Se({to:{type:X([String,Object]),required:!0},disabled:Boolean}),k3=Se({zIndex:{type:X([Number,String]),default:100},target:{type:String,default:""},offset:{type:Number,default:0},position:{type:String,values:["top","bottom"],default:"top"},teleported:Boolean,appendTo:{type:uu.to.type,default:"body"}}),E3={scroll:({scrollTop:e,fixed:t})=>Fe(e)&&Vt(t),[yt]:e=>Vt(e)};var pC=class extends Error{constructor(e){super(e),this.name="ElementPlusError"}};function Jt(e,t){throw new pC(`[${e}] ${t}`)}function ft(e,t){{const n=De(e)?new pC(`[${e}] ${t}`):e;console.warn(n)}}const x3=["class","style"],T3=/^on[A-Z]/,$d=(e={})=>{const{excludeListeners:t=!1,excludeKeys:n}=e,a=S(()=>((n==null?void 0:n.value)||[]).concat(x3)),o=vt();return o?S(()=>{var l;return pr(Object.entries((l=o.proxy)==null?void 0:l.$attrs).filter(([s])=>!a.value.includes(s)&&!(t&&T3.test(s))))}):(ft("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),S(()=>({})))};function oh(){const e=Wt(),t=A(0),n=S(()=>({minWidth:`${Math.max(t.value,hd)}px`}));return Xt(e,()=>{var o;t.value=((o=e.value)==null?void 0:o.getBoundingClientRect().width)??0}),{calculatorRef:e,calculatorWidth:t,inputStyle:n}}const bo=({from:e,replacement:t,scope:n,version:a,ref:o,type:l="API"},s)=>{fe(()=>i(s),r=>{r&&ft(n,`[${l}] ${e} is about to be deprecated in version ${a}, please use ${t} instead. +For more detail, please visit: ${o} +`)},{immediate:!0})},lh=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),bf=e=>Xi(e),$3="utils/dom/style",vC=(e="")=>e.split(" ").filter(t=>!!t.trim()),wo=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},Na=(e,t)=>{!e||!t.trim()||e.classList.add(...vC(t))},Zn=(e,t)=>{!e||!t.trim()||e.classList.remove(...vC(t))},Ko=(e,t)=>{var a;if(!Mt||!e||!t||Qw(e))return"";let n=Vn(t);n==="float"&&(n="cssFloat");try{const o=e.style[n];if(o)return o;const l=(a=document.defaultView)==null?void 0:a.getComputedStyle(e,"");return l?l[n]:""}catch{return e.style[n]}},hC=(e,t,n)=>{if(!(!e||!t))if(ot(t))dC(t).forEach(([a,o])=>hC(e,a,o));else{const a=Vn(t);e.style[a]=n}};function an(e,t="px"){if(!e&&e!==0)return"";if(Fe(e)||u3(e))return`${e}${t}`;if(De(e))return e;ft($3,"binding value must be a string or number")}const mC=(e,t,n,a)=>{const o={offsetX:0,offsetY:0},l=A(!1),s=(p,g)=>{if(e.value){const{offsetX:v,offsetY:h}=o,m=e.value.getBoundingClientRect(),y=m.left,b=m.top,w=m.width,C=m.height,k=document.documentElement.clientWidth,E=document.documentElement.clientHeight,T=-y+v,$=-b+h,N=k-y-w+v,O=E-b-(C{const g=p.clientX,v=p.clientY,{offsetX:h,offsetY:m}=o,y=w=>{l.value||(l.value=!0),s(h+w.clientX-g,m+w.clientY-v)},b=()=>{l.value=!1,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",b)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",b)},u=()=>{t.value&&e.value&&(t.value.addEventListener("mousedown",r),window.addEventListener("resize",f))},c=()=>{t.value&&e.value&&(t.value.removeEventListener("mousedown",r),window.removeEventListener("resize",f))},d=()=>{o.offsetX=0,o.offsetY=0,e.value&&(e.value.style.transform="")},f=()=>{const{offsetX:p,offsetY:g}=o;s(p,g)};return mt(()=>{sa(()=>{n.value?u():c()})}),Pt(()=>{c()}),{isDragging:l,resetPosition:d,updatePosition:f}};var O3={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const N3=e=>(t,n)=>M3(t,n,i(e)),M3=(e,t,n)=>mn(n,e,e).replace(/\{(\w+)\}/g,(a,o)=>`${(t==null?void 0:t[o])??`{${o}}`}`),R3=e=>({lang:S(()=>i(e).name),locale:Ut(e)?e:A(e),t:N3(e)}),gC=Symbol("localeContextKey"),Et=e=>{const t=e||_e(gC,A());return R3(S(()=>t.value||O3))},pi="el",I3="is-",ql=(e,t,n,a,o)=>{let l=`${e}-${t}`;return n&&(l+=`-${n}`),a&&(l+=`__${a}`),o&&(l+=`--${o}`),l},yC=Symbol("namespaceContextKey"),sh=e=>{const t=e||(vt()?_e(yC,A(pi)):A(pi));return S(()=>i(t)||pi)},he=(e,t)=>{const n=sh(t);return{namespace:n,b:(h="")=>ql(n.value,e,h,"",""),e:h=>h?ql(n.value,e,"",h,""):"",m:h=>h?ql(n.value,e,"","",h):"",be:(h,m)=>h&&m?ql(n.value,e,h,m,""):"",em:(h,m)=>h&&m?ql(n.value,e,"",h,m):"",bm:(h,m)=>h&&m?ql(n.value,e,h,"",m):"",bem:(h,m,y)=>h&&m&&y?ql(n.value,e,h,m,y):"",is:(h,...m)=>{const y=m.length>=1?m[0]:!0;return h&&y?`${I3}${h}`:""},cssVar:h=>{const m={};for(const y in h)h[y]&&(m[`--${n.value}-${y}`]=h[y]);return m},cssVarName:h=>`--${n.value}-${h}`,cssVarBlock:h=>{const m={};for(const y in h)h[y]&&(m[`--${n.value}-${e}-${y}`]=h[y]);return m},cssVarBlockName:h=>`--${n.value}-${e}-${h}`}};function _3(e,t,n,a){const o=n-t;return e/=a/2,e<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}const _a=e=>Mt?window.requestAnimationFrame(e):setTimeout(e,16),tl=e=>Mt?window.cancelAnimationFrame(e):clearTimeout(e),P3=(e,t)=>{if(!Mt)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(t)],a=Ko(e,n);return["scroll","auto","overlay"].some(o=>a.includes(o))},rh=(e,t)=>{if(!Mt)return;let n=e;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(P3(n,t))return n;Qw(n)?n=n.host:n=n.parentNode}return n};let _u;const bC=e=>{var l;if(!Mt)return 0;if(_u!==void 0)return _u;const t=document.createElement("div");t.className=`${e}-scrollbar__wrap`,t.style.visibility="hidden",t.style.width="100px",t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t);const n=t.offsetWidth;t.style.overflow="scroll";const a=document.createElement("div");a.style.width="100%",t.appendChild(a);const o=a.offsetWidth;return(l=t.parentNode)==null||l.removeChild(t),_u=n-o,_u};function ih(e,t){if(!Mt)return;if(!t){e.scrollTop=0;return}const n=[];let a=t.offsetParent;for(;a!==null&&e!==a&&e.contains(a);)n.push(a),a=a.offsetParent;const o=t.offsetTop+n.reduce((u,c)=>u+c.offsetTop,0),l=o+t.offsetHeight,s=e.scrollTop,r=s+e.clientHeight;or&&(e.scrollTop=l-e.clientHeight)}function A3(e,t,n,a,o){const l=Date.now();let s;const r=()=>{const u=Date.now()-l,c=_3(u>a?a:u,t,n,a);ru(e)?e.scrollTo(window.pageXOffset,c):e.scrollTop=c,u{s&&tl(s)}}const iy=(e,t)=>ru(t)?e.ownerDocument.documentElement:t,uy=e=>ru(e)?window.scrollY:e.scrollTop,Od=(e,t={})=>{Ut(e)||Jt("[useLockscreen]","You need to pass a ref param to this function");const n=t.ns||he("popup"),a=S(()=>n.bm("parent","hidden"));let o=0,l=!1,s="0",r=!1;const u=()=>{r||(r=!0,setTimeout(()=>{typeof document>"u"||l&&document&&(document.body.style.width=s,Zn(document.body,a.value))},200))};fe(e,c=>{if(!c){u();return}r=!1,l=!wo(document.body,a.value),l&&(s=document.body.style.width,Na(document.body,a.value)),o=bC(n.namespace.value);const d=document.documentElement.clientHeight0&&(d||f==="scroll")&&l&&(document.body.style.width=`calc(100% - ${o}px)`)}),F0(()=>u())},L3=ao({type:X(Boolean),default:null}),D3=ao({type:X(Function)}),V3=e=>{const t=`update:${e}`,n=`onUpdate:${e}`,a=[t],o={[e]:L3,[n]:D3};return{useModelToggle:({indicator:s,toggleReason:r,shouldHideWhenRouteChanges:u,shouldProceed:c,onShow:d,onHide:f})=>{const p=vt(),{emit:g}=p,v=p.props,h=S(()=>ze(v[n])),m=S(()=>v[e]===null),y=T=>{s.value!==!0&&(s.value=!0,r&&(r.value=T),ze(d)&&d(T))},b=T=>{s.value!==!1&&(s.value=!1,r&&(r.value=T),ze(f)&&f(T))},w=T=>{if(v.disabled===!0||ze(c)&&!c())return;const $=h.value&&Mt;$&&g(t,!0),(m.value||!$)&&y(T)},C=T=>{if(v.disabled===!0||!Mt)return;const $=h.value&&Mt;$&&g(t,!1),(m.value||!$)&&b(T)},k=T=>{Vt(T)&&(v.disabled&&T?h.value&&g(t,!1):s.value!==T&&(T?y():b()))},E=()=>{s.value?C():w()};return fe(()=>v[e],k),u&&p.appContext.config.globalProperties.$route!==void 0&&fe(()=>({...p.proxy.$route}),()=>{u.value&&s.value&&C()}),mt(()=>{k(v[e])}),{hide:C,show:w,toggle:E,hasUpdateHandler:h}},useModelToggleProps:o,useModelToggleEmits:a}},wC=e=>{const t=vt();return S(()=>{var n,a;return(a=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:a[e]})};var va="top",Pa="bottom",Aa="right",ha="left",uh="auto",cu=[va,Pa,Aa,ha],vr="start",Ii="end",B3="clippingParents",CC="viewport",jr="popper",F3="reference",cy=cu.reduce(function(e,t){return e.concat([t+"-"+vr,t+"-"+Ii])},[]),Mo=[].concat(cu,[uh]).reduce(function(e,t){return e.concat([t,t+"-"+vr,t+"-"+Ii])},[]),z3="beforeRead",H3="read",K3="afterRead",W3="beforeMain",j3="main",U3="afterMain",Y3="beforeWrite",q3="write",G3="afterWrite",X3=[z3,H3,K3,W3,j3,U3,Y3,q3,G3];function $o(e){return e?(e.nodeName||"").toLowerCase():null}function xa(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Cs(e){var t=xa(e).Element;return e instanceof t||e instanceof Element}function Ra(e){var t=xa(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ch(e){if(typeof ShadowRoot>"u")return!1;var t=xa(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Z3(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var a=t.styles[n]||{},o=t.attributes[n]||{},l=t.elements[n];!Ra(l)||!$o(l)||(Object.assign(l.style,a),Object.keys(o).forEach(function(s){var r=o[s];r===!1?l.removeAttribute(s):l.setAttribute(s,r===!0?"":r)}))})}function J3(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(a){var o=t.elements[a],l=t.attributes[a]||{},s=Object.keys(t.styles.hasOwnProperty(a)?t.styles[a]:n[a]),r=s.reduce(function(u,c){return u[c]="",u},{});!Ra(o)||!$o(o)||(Object.assign(o.style,r),Object.keys(l).forEach(function(u){o.removeAttribute(u)}))})}}var SC={name:"applyStyles",enabled:!0,phase:"write",fn:Z3,effect:J3,requires:["computeStyles"]};function Co(e){return e.split("-")[0]}var fs=Math.max,Rc=Math.min,hr=Math.round;function Ep(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function kC(){return!/^((?!chrome|android).)*safari/i.test(Ep())}function mr(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var a=e.getBoundingClientRect(),o=1,l=1;t&&Ra(e)&&(o=e.offsetWidth>0&&hr(a.width)/e.offsetWidth||1,l=e.offsetHeight>0&&hr(a.height)/e.offsetHeight||1);var s=Cs(e)?xa(e):window,r=s.visualViewport,u=!kC()&&n,c=(a.left+(u&&r?r.offsetLeft:0))/o,d=(a.top+(u&&r?r.offsetTop:0))/l,f=a.width/o,p=a.height/l;return{width:f,height:p,top:d,right:c+f,bottom:d+p,left:c,x:c,y:d}}function dh(e){var t=mr(e),n=e.offsetWidth,a=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-a)<=1&&(a=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:a}}function EC(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ch(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function nl(e){return xa(e).getComputedStyle(e)}function Q3(e){return["table","td","th"].indexOf($o(e))>=0}function Hl(e){return((Cs(e)?e.ownerDocument:e.document)||window.document).documentElement}function Nd(e){return $o(e)==="html"?e:e.assignedSlot||e.parentNode||(ch(e)?e.host:null)||Hl(e)}function dy(e){return!Ra(e)||nl(e).position==="fixed"?null:e.offsetParent}function eI(e){var t=/firefox/i.test(Ep()),n=/Trident/i.test(Ep());if(n&&Ra(e)){var a=nl(e);if(a.position==="fixed")return null}var o=Nd(e);for(ch(o)&&(o=o.host);Ra(o)&&["html","body"].indexOf($o(o))<0;){var l=nl(o);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||t&&l.willChange==="filter"||t&&l.filter&&l.filter!=="none")return o;o=o.parentNode}return null}function du(e){for(var t=xa(e),n=dy(e);n&&Q3(n)&&nl(n).position==="static";)n=dy(n);return n&&($o(n)==="html"||$o(n)==="body"&&nl(n).position==="static")?t:n||eI(e)||t}function fh(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function vi(e,t,n){return fs(e,Rc(t,n))}function tI(e,t,n){var a=vi(e,t,n);return a>n?n:a}function xC(){return{top:0,right:0,bottom:0,left:0}}function TC(e){return Object.assign({},xC(),e)}function $C(e,t){return t.reduce(function(n,a){return n[a]=e,n},{})}var nI=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,TC(typeof e!="number"?e:$C(e,cu))};function aI(e){var t,n=e.state,a=e.name,o=e.options,l=n.elements.arrow,s=n.modifiersData.popperOffsets,r=Co(n.placement),u=fh(r),c=[ha,Aa].indexOf(r)>=0,d=c?"height":"width";if(!(!l||!s)){var f=nI(o.padding,n),p=dh(l),g=u==="y"?va:ha,v=u==="y"?Pa:Aa,h=n.rects.reference[d]+n.rects.reference[u]-s[u]-n.rects.popper[d],m=s[u]-n.rects.reference[u],y=du(l),b=y?u==="y"?y.clientHeight||0:y.clientWidth||0:0,w=h/2-m/2,C=f[g],k=b-p[d]-f[v],E=b/2-p[d]/2+w,T=vi(C,E,k),$=u;n.modifiersData[a]=(t={},t[$]=T,t.centerOffset=T-E,t)}}function oI(e){var t=e.state,n=e.options,a=n.element,o=a===void 0?"[data-popper-arrow]":a;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||EC(t.elements.popper,o)&&(t.elements.arrow=o))}var lI={name:"arrow",enabled:!0,phase:"main",fn:aI,effect:oI,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function gr(e){return e.split("-")[1]}var sI={top:"auto",right:"auto",bottom:"auto",left:"auto"};function rI(e,t){var n=e.x,a=e.y,o=t.devicePixelRatio||1;return{x:hr(n*o)/o||0,y:hr(a*o)/o||0}}function fy(e){var t,n=e.popper,a=e.popperRect,o=e.placement,l=e.variation,s=e.offsets,r=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=s.x,g=p===void 0?0:p,v=s.y,h=v===void 0?0:v,m=typeof d=="function"?d({x:g,y:h}):{x:g,y:h};g=m.x,h=m.y;var y=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),w=ha,C=va,k=window;if(c){var E=du(n),T="clientHeight",$="clientWidth";if(E===xa(n)&&(E=Hl(n),nl(E).position!=="static"&&r==="absolute"&&(T="scrollHeight",$="scrollWidth")),E=E,o===va||(o===ha||o===Aa)&&l===Ii){C=Pa;var N=f&&E===k&&k.visualViewport?k.visualViewport.height:E[T];h-=N-a.height,h*=u?1:-1}if(o===ha||(o===va||o===Pa)&&l===Ii){w=Aa;var O=f&&E===k&&k.visualViewport?k.visualViewport.width:E[$];g-=O-a.width,g*=u?1:-1}}var _=Object.assign({position:r},c&&sI),P=d===!0?rI({x:g,y:h},xa(n)):{x:g,y:h};if(g=P.x,h=P.y,u){var D;return Object.assign({},_,(D={},D[C]=b?"0":"",D[w]=y?"0":"",D.transform=(k.devicePixelRatio||1)<=1?"translate("+g+"px, "+h+"px)":"translate3d("+g+"px, "+h+"px, 0)",D))}return Object.assign({},_,(t={},t[C]=b?h+"px":"",t[w]=y?g+"px":"",t.transform="",t))}function iI(e){var t=e.state,n=e.options,a=n.gpuAcceleration,o=a===void 0?!0:a,l=n.adaptive,s=l===void 0?!0:l,r=n.roundOffsets,u=r===void 0?!0:r,c={placement:Co(t.placement),variation:gr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,fy(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,fy(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var OC={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:iI,data:{}},Pu={passive:!0};function uI(e){var t=e.state,n=e.instance,a=e.options,o=a.scroll,l=o===void 0?!0:o,s=a.resize,r=s===void 0?!0:s,u=xa(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return l&&c.forEach(function(d){d.addEventListener("scroll",n.update,Pu)}),r&&u.addEventListener("resize",n.update,Pu),function(){l&&c.forEach(function(d){d.removeEventListener("scroll",n.update,Pu)}),r&&u.removeEventListener("resize",n.update,Pu)}}var NC={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:uI,data:{}},cI={left:"right",right:"left",bottom:"top",top:"bottom"};function sc(e){return e.replace(/left|right|bottom|top/g,function(t){return cI[t]})}var dI={start:"end",end:"start"};function py(e){return e.replace(/start|end/g,function(t){return dI[t]})}function ph(e){var t=xa(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function vh(e){return mr(Hl(e)).left+ph(e).scrollLeft}function fI(e,t){var n=xa(e),a=Hl(e),o=n.visualViewport,l=a.clientWidth,s=a.clientHeight,r=0,u=0;if(o){l=o.width,s=o.height;var c=kC();(c||!c&&t==="fixed")&&(r=o.offsetLeft,u=o.offsetTop)}return{width:l,height:s,x:r+vh(e),y:u}}function pI(e){var t,n=Hl(e),a=ph(e),o=(t=e.ownerDocument)==null?void 0:t.body,l=fs(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=fs(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),r=-a.scrollLeft+vh(e),u=-a.scrollTop;return nl(o||n).direction==="rtl"&&(r+=fs(n.clientWidth,o?o.clientWidth:0)-l),{width:l,height:s,x:r,y:u}}function hh(e){var t=nl(e),n=t.overflow,a=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+a)}function MC(e){return["html","body","#document"].indexOf($o(e))>=0?e.ownerDocument.body:Ra(e)&&hh(e)?e:MC(Nd(e))}function hi(e,t){var n;t===void 0&&(t=[]);var a=MC(e),o=a===((n=e.ownerDocument)==null?void 0:n.body),l=xa(a),s=o?[l].concat(l.visualViewport||[],hh(a)?a:[]):a,r=t.concat(s);return o?r:r.concat(hi(Nd(s)))}function xp(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function vI(e,t){var n=mr(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function vy(e,t,n){return t===CC?xp(fI(e,n)):Cs(t)?vI(t,n):xp(pI(Hl(e)))}function hI(e){var t=hi(Nd(e)),n=["absolute","fixed"].indexOf(nl(e).position)>=0,a=n&&Ra(e)?du(e):e;return Cs(a)?t.filter(function(o){return Cs(o)&&EC(o,a)&&$o(o)!=="body"}):[]}function mI(e,t,n,a){var o=t==="clippingParents"?hI(e):[].concat(t),l=[].concat(o,[n]),s=l[0],r=l.reduce(function(u,c){var d=vy(e,c,a);return u.top=fs(d.top,u.top),u.right=Rc(d.right,u.right),u.bottom=Rc(d.bottom,u.bottom),u.left=fs(d.left,u.left),u},vy(e,s,a));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function RC(e){var t=e.reference,n=e.element,a=e.placement,o=a?Co(a):null,l=a?gr(a):null,s=t.x+t.width/2-n.width/2,r=t.y+t.height/2-n.height/2,u;switch(o){case va:u={x:s,y:t.y-n.height};break;case Pa:u={x:s,y:t.y+t.height};break;case Aa:u={x:t.x+t.width,y:r};break;case ha:u={x:t.x-n.width,y:r};break;default:u={x:t.x,y:t.y}}var c=o?fh(o):null;if(c!=null){var d=c==="y"?"height":"width";switch(l){case vr:u[c]=u[c]-(t[d]/2-n[d]/2);break;case Ii:u[c]=u[c]+(t[d]/2-n[d]/2);break}}return u}function _i(e,t){t===void 0&&(t={});var n=t,a=n.placement,o=a===void 0?e.placement:a,l=n.strategy,s=l===void 0?e.strategy:l,r=n.boundary,u=r===void 0?B3:r,c=n.rootBoundary,d=c===void 0?CC:c,f=n.elementContext,p=f===void 0?jr:f,g=n.altBoundary,v=g===void 0?!1:g,h=n.padding,m=h===void 0?0:h,y=TC(typeof m!="number"?m:$C(m,cu)),b=p===jr?F3:jr,w=e.rects.popper,C=e.elements[v?b:p],k=mI(Cs(C)?C:C.contextElement||Hl(e.elements.popper),u,d,s),E=mr(e.elements.reference),T=RC({reference:E,element:w,placement:o}),$=xp(Object.assign({},w,T)),N=p===jr?$:E,O={top:k.top-N.top+y.top,bottom:N.bottom-k.bottom+y.bottom,left:k.left-N.left+y.left,right:N.right-k.right+y.right},_=e.modifiersData.offset;if(p===jr&&_){var P=_[o];Object.keys(O).forEach(function(D){var W=[Aa,Pa].indexOf(D)>=0?1:-1,U=[va,Pa].indexOf(D)>=0?"y":"x";O[D]+=P[U]*W})}return O}function gI(e,t){t===void 0&&(t={});var n=t,a=n.placement,o=n.boundary,l=n.rootBoundary,s=n.padding,r=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?Mo:u,d=gr(a),f=d?r?cy:cy.filter(function(v){return gr(v)===d}):cu,p=f.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=f);var g=p.reduce(function(v,h){return v[h]=_i(e,{placement:h,boundary:o,rootBoundary:l,padding:s})[Co(h)],v},{});return Object.keys(g).sort(function(v,h){return g[v]-g[h]})}function yI(e){if(Co(e)===uh)return[];var t=sc(e);return[py(e),t,py(t)]}function bI(e){var t=e.state,n=e.options,a=e.name;if(!t.modifiersData[a]._skip){for(var o=n.mainAxis,l=o===void 0?!0:o,s=n.altAxis,r=s===void 0?!0:s,u=n.fallbackPlacements,c=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,g=n.flipVariations,v=g===void 0?!0:g,h=n.allowedAutoPlacements,m=t.options.placement,y=Co(m),b=y===m,w=u||(b||!v?[sc(m)]:yI(m)),C=[m].concat(w).reduce(function(Q,ee){return Q.concat(Co(ee)===uh?gI(t,{placement:ee,boundary:d,rootBoundary:f,padding:c,flipVariations:v,allowedAutoPlacements:h}):ee)},[]),k=t.rects.reference,E=t.rects.popper,T=new Map,$=!0,N=C[0],O=0;O=0,U=W?"width":"height",F=_i(t,{placement:_,boundary:d,rootBoundary:f,altBoundary:p,padding:c}),R=W?D?Aa:ha:D?Pa:va;k[U]>E[U]&&(R=sc(R));var I=sc(R),L=[];if(l&&L.push(F[P]<=0),r&&L.push(F[R]<=0,F[I]<=0),L.every(function(Q){return Q})){N=_,$=!1;break}T.set(_,L)}if($)for(var z=v?3:1,H=function(Q){var ee=C.find(function(ue){var te=T.get(ue);if(te)return te.slice(0,Q).every(function(de){return de})});if(ee)return N=ee,"break"},K=z;K>0;K--){var q=H(K);if(q==="break")break}t.placement!==N&&(t.modifiersData[a]._skip=!0,t.placement=N,t.reset=!0)}}var wI={name:"flip",enabled:!0,phase:"main",fn:bI,requiresIfExists:["offset"],data:{_skip:!1}};function hy(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function my(e){return[va,Aa,Pa,ha].some(function(t){return e[t]>=0})}function CI(e){var t=e.state,n=e.name,a=t.rects.reference,o=t.rects.popper,l=t.modifiersData.preventOverflow,s=_i(t,{elementContext:"reference"}),r=_i(t,{altBoundary:!0}),u=hy(s,a),c=hy(r,o,l),d=my(u),f=my(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}var SI={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:CI};function kI(e,t,n){var a=Co(e),o=[ha,va].indexOf(a)>=0?-1:1,l=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=l[0],r=l[1];return s=s||0,r=(r||0)*o,[ha,Aa].indexOf(a)>=0?{x:r,y:s}:{x:s,y:r}}function EI(e){var t=e.state,n=e.options,a=e.name,o=n.offset,l=o===void 0?[0,0]:o,s=Mo.reduce(function(d,f){return d[f]=kI(f,t.rects,l),d},{}),r=s[t.placement],u=r.x,c=r.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[a]=s}var xI={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:EI};function TI(e){var t=e.state,n=e.name;t.modifiersData[n]=RC({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var IC={name:"popperOffsets",enabled:!0,phase:"read",fn:TI,data:{}};function $I(e){return e==="x"?"y":"x"}function OI(e){var t=e.state,n=e.options,a=e.name,o=n.mainAxis,l=o===void 0?!0:o,s=n.altAxis,r=s===void 0?!1:s,u=n.boundary,c=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,g=p===void 0?!0:p,v=n.tetherOffset,h=v===void 0?0:v,m=_i(t,{boundary:u,rootBoundary:c,padding:f,altBoundary:d}),y=Co(t.placement),b=gr(t.placement),w=!b,C=fh(y),k=$I(C),E=t.modifiersData.popperOffsets,T=t.rects.reference,$=t.rects.popper,N=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,O=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(E){if(l){var D,W=C==="y"?va:ha,U=C==="y"?Pa:Aa,F=C==="y"?"height":"width",R=E[C],I=R+m[W],L=R-m[U],z=g?-$[F]/2:0,H=b===vr?T[F]:$[F],K=b===vr?-$[F]:-T[F],q=t.elements.arrow,Q=g&&q?dh(q):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:xC(),ue=ee[W],te=ee[U],de=vi(0,T[F],Q[F]),se=w?T[F]/2-z-de-ue-O.mainAxis:H-de-ue-O.mainAxis,Y=w?-T[F]/2+z+de+te+O.mainAxis:K+de+te+O.mainAxis,G=t.elements.arrow&&du(t.elements.arrow),V=G?C==="y"?G.clientTop||0:G.clientLeft||0:0,Z=(D=_==null?void 0:_[C])!=null?D:0,oe=R+se-Z-V,ce=R+Y-Z,ge=vi(g?Rc(I,oe):I,R,g?fs(L,ce):L);E[C]=ge,P[C]=ge-R}if(r){var me,Me=C==="x"?va:ha,Ie=C==="x"?Pa:Aa,Re=E[k],ye=k==="y"?"height":"width",Te=Re+m[Me],we=Re-m[Ie],Pe=[va,ha].indexOf(y)!==-1,Ve=(me=_==null?void 0:_[k])!=null?me:0,Qe=Pe?Te:Re-T[ye]-$[ye]-Ve+O.altAxis,tt=Pe?Re+T[ye]+$[ye]-Ve-O.altAxis:we,nt=g&&Pe?tI(Qe,Re,tt):vi(g?Qe:Te,Re,g?tt:we);E[k]=nt,P[k]=nt-Re}t.modifiersData[a]=P}}var NI={name:"preventOverflow",enabled:!0,phase:"main",fn:OI,requiresIfExists:["offset"]};function MI(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function RI(e){return e===xa(e)||!Ra(e)?ph(e):MI(e)}function II(e){var t=e.getBoundingClientRect(),n=hr(t.width)/e.offsetWidth||1,a=hr(t.height)/e.offsetHeight||1;return n!==1||a!==1}function _I(e,t,n){n===void 0&&(n=!1);var a=Ra(t),o=Ra(t)&&II(t),l=Hl(t),s=mr(e,o,n),r={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(a||!a&&!n)&&(($o(t)!=="body"||hh(l))&&(r=RI(t)),Ra(t)?(u=mr(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):l&&(u.x=vh(l))),{x:s.left+r.scrollLeft-u.x,y:s.top+r.scrollTop-u.y,width:s.width,height:s.height}}function PI(e){var t=new Map,n=new Set,a=[];e.forEach(function(l){t.set(l.name,l)});function o(l){n.add(l.name);var s=[].concat(l.requires||[],l.requiresIfExists||[]);s.forEach(function(r){if(!n.has(r)){var u=t.get(r);u&&o(u)}}),a.push(l)}return e.forEach(function(l){n.has(l.name)||o(l)}),a}function AI(e){var t=PI(e);return X3.reduce(function(n,a){return n.concat(t.filter(function(o){return o.phase===a}))},[])}function LI(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function DI(e){var t=e.reduce(function(n,a){var o=n[a.name];return n[a.name]=o?Object.assign({},o,a,{options:Object.assign({},o.options,a.options),data:Object.assign({},o.data,a.data)}):a,n},{});return Object.keys(t).map(function(n){return t[n]})}var gy={placement:"bottom",modifiers:[],strategy:"absolute"};function yy(){for(var e=arguments.length,t=new Array(e),n=0;n{const a={name:"updateState",enabled:!0,phase:"write",fn:({state:u})=>{const c=HI(u);Object.assign(s.value,c)},requires:["computeStyles"]},o=S(()=>{const{onFirstUpdate:u,placement:c,strategy:d,modifiers:f}=i(n);return{onFirstUpdate:u,placement:c||"bottom",strategy:d||"absolute",modifiers:[...f||[],a,{name:"applyStyles",enabled:!1}]}}),l=Wt(),s=A({styles:{popper:{position:i(o).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),r=()=>{l.value&&(l.value.destroy(),l.value=void 0)};return fe(o,u=>{const c=i(l);c&&c.setOptions(u)},{deep:!0}),fe([e,t],([u,c])=>{r(),!(!u||!c)&&(l.value=FI(u,c,i(o)))}),Pt(()=>{r()}),{state:S(()=>{var u;return{...((u=i(l))==null?void 0:u.state)||{}}}),styles:S(()=>i(s).styles),attributes:S(()=>i(s).attributes),update:()=>{var u;return(u=i(l))==null?void 0:u.update()},forceUpdate:()=>{var u;return(u=i(l))==null?void 0:u.forceUpdate()},instanceRef:S(()=>i(l))}};function HI(e){const t=Object.keys(e.elements);return{styles:pr(t.map(n=>[n,e.styles[n]||{}])),attributes:pr(t.map(n=>[n,e.attributes[n]]))}}const gh=e=>{if(!e)return{onClick:_t,onMousedown:_t,onMouseup:_t};let t=!1,n=!1;return{onClick:s=>{t&&n&&e(s),t=n=!1},onMousedown:s=>{t=s.target===s.currentTarget},onMouseup:s=>{n=s.target===s.currentTarget}}},KI=(e,t=0)=>{if(t===0)return e;const n=A(ot(t)&&!!t.initVal);let a=null;const o=s=>{if(xt(s)){n.value=e.value;return}a&&clearTimeout(a),a=setTimeout(()=>{n.value=e.value},s)},l=s=>{s==="leading"?Fe(t)?o(t):o(t.leading):ot(t)?o(t.trailing):n.value=!1};return mt(()=>l("leading")),fe(()=>e.value,s=>{l(s?"leading":"trailing")}),n};function by(){let e;const t=(a,o)=>{n(),e=globalThis.setTimeout(a,o)},n=()=>{e!==void 0&&(globalThis.clearTimeout(e),e=void 0)};return Os(()=>n()),{registerTimeout:t,cancelTimeout:n}}const Tp={prefix:Math.floor(Math.random()*1e4),current:0},WI=Symbol("elIdInjection"),yh=()=>vt()?_e(WI,Tp):Tp,Fn=e=>{const t=yh();!Mt&&t===Tp&&ft("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed +usage: app.provide(ID_INJECTION_KEY, { + prefix: number, + current: number, +})`);const n=sh();return rw(()=>i(e)||`${n.value}-id-${t.prefix}-${t.current++}`)};let Ws=[];const wy=e=>{zt(e)===Ce.esc&&Ws.forEach(t=>t(e))},jI=e=>{mt(()=>{Ws.length===0&&document.addEventListener("keydown",wy),Mt&&Ws.push(e)}),Pt(()=>{Ws=Ws.filter(t=>t!==e),Ws.length===0&&Mt&&document.removeEventListener("keydown",wy)})},_C=()=>{const e=sh(),t=yh(),n=S(()=>`${e.value}-popper-container-${t.prefix}`);return{id:n,selector:S(()=>`#${n.value}`)}},UI=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},YI=()=>{const{id:e,selector:t}=_C();return fd(()=>{Mt&&(document.body.querySelector(t.value)||UI(e.value))}),{id:e,selector:t}},qI=Se({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),GI=({showAfter:e,hideAfter:t,autoClose:n,open:a,close:o})=>{const{registerTimeout:l}=by(),{registerTimeout:s,cancelTimeout:r}=by();return{onOpen:(d,f=i(e))=>{l(()=>{a(d);const p=i(n);Fe(p)&&p>0&&s(()=>{o(d)},p)},f)},onClose:(d,f=i(t))=>{r(),l(()=>{o(d)},f)}}},PC=Symbol("elForwardRef"),XI=e=>{bt(PC,{setForwardRef:n=>{e.value=n}})},ZI=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),Cy={current:0},Sy=A(0),AC=2e3,ky=Symbol("elZIndexContextKey"),LC=Symbol("zIndexContextKey"),fu=e=>{const t=vt()?_e(ky,Cy):Cy,n=e||(vt()?_e(LC,void 0):void 0),a=S(()=>{const s=i(n);return Fe(s)?s:AC}),o=S(()=>a.value+Sy.value),l=()=>(t.current++,Sy.value=t.current,o.value);return!Mt&&!_e(ky)&&ft("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed +usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:a,currentZIndex:o,nextZIndex:l}},yr=Math.min,ps=Math.max,Ic=Math.round,Au=Math.floor,So=e=>({x:e,y:e}),JI={left:"right",right:"left",bottom:"top",top:"bottom"};function $p(e,t,n){return ps(e,yr(t,n))}function pu(e,t){return typeof e=="function"?e(t):e}function Ss(e){return e.split("-")[0]}function vu(e){return e.split("-")[1]}function DC(e){return e==="x"?"y":"x"}function bh(e){return e==="y"?"height":"width"}function $l(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function wh(e){return DC($l(e))}function QI(e,t,n){n===void 0&&(n=!1);const a=vu(e),o=wh(e),l=bh(o);let s=o==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(s=_c(s)),[s,_c(s)]}function e_(e){const t=_c(e);return[Op(e),t,Op(t)]}function Op(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ey=["left","right"],xy=["right","left"],t_=["top","bottom"],n_=["bottom","top"];function a_(e,t,n){switch(e){case"top":case"bottom":return n?t?xy:Ey:t?Ey:xy;case"left":case"right":return t?t_:n_;default:return[]}}function o_(e,t,n,a){const o=vu(e);let l=a_(Ss(e),n==="start",a);return o&&(l=l.map(s=>s+"-"+o),t&&(l=l.concat(l.map(Op)))),l}function _c(e){const t=Ss(e);return JI[t]+e.slice(t.length)}function l_(e){return{top:0,right:0,bottom:0,left:0,...e}}function VC(e){return typeof e!="number"?l_(e):{top:e,right:e,bottom:e,left:e}}function Pc(e){const{x:t,y:n,width:a,height:o}=e;return{width:a,height:o,top:n,left:t,right:t+a,bottom:n+o,x:t,y:n}}function Ty(e,t,n){let{reference:a,floating:o}=e;const l=$l(t),s=wh(t),r=bh(s),u=Ss(t),c=l==="y",d=a.x+a.width/2-o.width/2,f=a.y+a.height/2-o.height/2,p=a[r]/2-o[r]/2;let g;switch(u){case"top":g={x:d,y:a.y-o.height};break;case"bottom":g={x:d,y:a.y+a.height};break;case"right":g={x:a.x+a.width,y:f};break;case"left":g={x:a.x-o.width,y:f};break;default:g={x:a.x,y:a.y}}switch(vu(t)){case"start":g[s]-=p*(n&&c?-1:1);break;case"end":g[s]+=p*(n&&c?-1:1);break}return g}async function BC(e,t){var n;t===void 0&&(t={});const{x:a,y:o,platform:l,rects:s,elements:r,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:g=0}=pu(t,e),v=VC(g),m=r[p?f==="floating"?"reference":"floating":f],y=Pc(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(m)))==null||n?m:m.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(r.floating)),boundary:c,rootBoundary:d,strategy:u})),b=f==="floating"?{x:a,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r.floating)),C=await(l.isElement==null?void 0:l.isElement(w))?await(l.getScale==null?void 0:l.getScale(w))||{x:1,y:1}:{x:1,y:1},k=Pc(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:b,offsetParent:w,strategy:u}):b);return{top:(y.top-k.top+v.top)/C.y,bottom:(k.bottom-y.bottom+v.bottom)/C.y,left:(y.left-k.left+v.left)/C.x,right:(k.right-y.right+v.right)/C.x}}const s_=50,r_=async(e,t,n)=>{const{placement:a="bottom",strategy:o="absolute",middleware:l=[],platform:s}=n,r=s.detectOverflow?s:{...s,detectOverflow:BC},u=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=Ty(c,a,u),p=a,g=0;const v={};for(let h=0;h({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:o,rects:l,platform:s,elements:r,middlewareData:u}=t,{element:c,padding:d=0}=pu(e,t)||{};if(c==null)return{};const f=VC(d),p={x:n,y:a},g=wh(o),v=bh(g),h=await s.getDimensions(c),m=g==="y",y=m?"top":"left",b=m?"bottom":"right",w=m?"clientHeight":"clientWidth",C=l.reference[v]+l.reference[g]-p[g]-l.floating[v],k=p[g]-l.reference[g],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let T=E?E[w]:0;(!T||!await(s.isElement==null?void 0:s.isElement(E)))&&(T=r.floating[w]||l.floating[v]);const $=C/2-k/2,N=T/2-h[v]/2-1,O=yr(f[y],N),_=yr(f[b],N),P=O,D=T-h[v]-_,W=T/2-h[v]/2+$,U=$p(P,W,D),F=!u.arrow&&vu(o)!=null&&W!==U&&l.reference[v]/2-(WW<=0)){var _,P;const W=(((_=l.flip)==null?void 0:_.index)||0)+1,U=T[W];if(U&&(!(f==="alignment"?b!==$l(U):!1)||O.every(I=>$l(I.placement)===b?I.overflows[0]>0:!0)))return{data:{index:W,overflows:O},reset:{placement:U}};let F=(P=O.filter(R=>R.overflows[0]<=0).sort((R,I)=>R.overflows[1]-I.overflows[1])[0])==null?void 0:P.placement;if(!F)switch(g){case"bestFit":{var D;const R=(D=O.filter(I=>{if(E){const L=$l(I.placement);return L===b||L==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(L=>L>0).reduce((L,z)=>L+z,0)]).sort((I,L)=>I[1]-L[1])[0])==null?void 0:D[0];R&&(F=R);break}case"initialPlacement":F=r;break}if(o!==F)return{reset:{placement:F}}}return{}}}},c_=new Set(["left","top"]);async function d_(e,t){const{placement:n,platform:a,elements:o}=e,l=await(a.isRTL==null?void 0:a.isRTL(o.floating)),s=Ss(n),r=vu(n),u=$l(n)==="y",c=c_.has(s)?-1:1,d=l&&u?-1:1,f=pu(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return r&&typeof v=="number"&&(g=r==="end"?v*-1:v),u?{x:g*d,y:p*c}:{x:p*c,y:g*d}}const f_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:o,y:l,placement:s,middlewareData:r}=t,u=await d_(t,e);return s===((n=r.offset)==null?void 0:n.placement)&&(a=r.arrow)!=null&&a.alignmentOffset?{}:{x:o+u.x,y:l+u.y,data:{...u,placement:s}}}}},p_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:o,platform:l}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:u={fn:y=>{let{x:b,y:w}=y;return{x:b,y:w}}},...c}=pu(e,t),d={x:n,y:a},f=await l.detectOverflow(t,c),p=$l(Ss(o)),g=DC(p);let v=d[g],h=d[p];if(s){const y=g==="y"?"top":"left",b=g==="y"?"bottom":"right",w=v+f[y],C=v-f[b];v=$p(w,v,C)}if(r){const y=p==="y"?"top":"left",b=p==="y"?"bottom":"right",w=h+f[y],C=h-f[b];h=$p(w,h,C)}const m=u.fn({...t,[g]:v,[p]:h});return{...m,data:{x:m.x-n,y:m.y-a,enabled:{[g]:s,[p]:r}}}}}};function Md(){return typeof window<"u"}function Ir(e){return FC(e)?(e.nodeName||"").toLowerCase():"#document"}function ka(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ro(e){var t;return(t=(FC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function FC(e){return Md()?e instanceof Node||e instanceof ka(e).Node:!1}function Ya(e){return Md()?e instanceof Element||e instanceof ka(e).Element:!1}function cl(e){return Md()?e instanceof HTMLElement||e instanceof ka(e).HTMLElement:!1}function $y(e){return!Md()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ka(e).ShadowRoot}function hu(e){const{overflow:t,overflowX:n,overflowY:a,display:o}=qa(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&o!=="inline"&&o!=="contents"}function v_(e){return/^(table|td|th)$/.test(Ir(e))}function Rd(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const h_=/transform|translate|scale|rotate|perspective|filter/,m_=/paint|layout|strict|content/,Gl=e=>!!e&&e!=="none";let wf;function Ch(e){const t=Ya(e)?qa(e):e;return Gl(t.transform)||Gl(t.translate)||Gl(t.scale)||Gl(t.rotate)||Gl(t.perspective)||!Sh()&&(Gl(t.backdropFilter)||Gl(t.filter))||h_.test(t.willChange||"")||m_.test(t.contain||"")}function g_(e){let t=Dl(e);for(;cl(t)&&!br(t);){if(Ch(t))return t;if(Rd(t))return null;t=Dl(t)}return null}function Sh(){return wf==null&&(wf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wf}function br(e){return/^(html|body|#document)$/.test(Ir(e))}function qa(e){return ka(e).getComputedStyle(e)}function Id(e){return Ya(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Dl(e){if(Ir(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$y(e)&&e.host||Ro(e);return $y(t)?t.host:t}function zC(e){const t=Dl(e);return br(t)?e.ownerDocument?e.ownerDocument.body:e.body:cl(t)&&hu(t)?t:zC(t)}function Pi(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=zC(e),l=o===((a=e.ownerDocument)==null?void 0:a.body),s=ka(o);if(l){const r=Np(s);return t.concat(s,s.visualViewport||[],hu(o)?o:[],r&&n?Pi(r):[])}else return t.concat(o,Pi(o,[],n))}function Np(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function HC(e){const t=qa(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const o=cl(e),l=o?e.offsetWidth:n,s=o?e.offsetHeight:a,r=Ic(n)!==l||Ic(a)!==s;return r&&(n=l,a=s),{width:n,height:a,$:r}}function kh(e){return Ya(e)?e:e.contextElement}function nr(e){const t=kh(e);if(!cl(t))return So(1);const n=t.getBoundingClientRect(),{width:a,height:o,$:l}=HC(t);let s=(l?Ic(n.width):n.width)/a,r=(l?Ic(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!r||!Number.isFinite(r))&&(r=1),{x:s,y:r}}const y_=So(0);function KC(e){const t=ka(e);return!Sh()||!t.visualViewport?y_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function b_(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ka(e)?!1:t}function ks(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),l=kh(e);let s=So(1);t&&(a?Ya(a)&&(s=nr(a)):s=nr(e));const r=b_(l,n,a)?KC(l):So(0);let u=(o.left+r.x)/s.x,c=(o.top+r.y)/s.y,d=o.width/s.x,f=o.height/s.y;if(l){const p=ka(l),g=a&&Ya(a)?ka(a):a;let v=p,h=Np(v);for(;h&&a&&g!==v;){const m=nr(h),y=h.getBoundingClientRect(),b=qa(h),w=y.left+(h.clientLeft+parseFloat(b.paddingLeft))*m.x,C=y.top+(h.clientTop+parseFloat(b.paddingTop))*m.y;u*=m.x,c*=m.y,d*=m.x,f*=m.y,u+=w,c+=C,v=ka(h),h=Np(v)}}return Pc({width:d,height:f,x:u,y:c})}function _d(e,t){const n=Id(e).scrollLeft;return t?t.left+n:ks(Ro(e)).left+n}function WC(e,t){const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-_d(e,n),o=n.top+t.scrollTop;return{x:a,y:o}}function w_(e){let{elements:t,rect:n,offsetParent:a,strategy:o}=e;const l=o==="fixed",s=Ro(a),r=t?Rd(t.floating):!1;if(a===s||r&&l)return n;let u={scrollLeft:0,scrollTop:0},c=So(1);const d=So(0),f=cl(a);if((f||!f&&!l)&&((Ir(a)!=="body"||hu(s))&&(u=Id(a)),f)){const g=ks(a);c=nr(a),d.x=g.x+a.clientLeft,d.y=g.y+a.clientTop}const p=s&&!f&&!l?WC(s,u):So(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-u.scrollTop*c.y+d.y+p.y}}function C_(e){return Array.from(e.getClientRects())}function S_(e){const t=Ro(e),n=Id(e),a=e.ownerDocument.body,o=ps(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=ps(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let s=-n.scrollLeft+_d(e);const r=-n.scrollTop;return qa(a).direction==="rtl"&&(s+=ps(t.clientWidth,a.clientWidth)-o),{width:o,height:l,x:s,y:r}}const Oy=25;function k_(e,t){const n=ka(e),a=Ro(e),o=n.visualViewport;let l=a.clientWidth,s=a.clientHeight,r=0,u=0;if(o){l=o.width,s=o.height;const d=Sh();(!d||d&&t==="fixed")&&(r=o.offsetLeft,u=o.offsetTop)}const c=_d(a);if(c<=0){const d=a.ownerDocument,f=d.body,p=getComputedStyle(f),g=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(a.clientWidth-f.clientWidth-g);v<=Oy&&(l-=v)}else c<=Oy&&(l+=c);return{width:l,height:s,x:r,y:u}}function E_(e,t){const n=ks(e,!0,t==="fixed"),a=n.top+e.clientTop,o=n.left+e.clientLeft,l=cl(e)?nr(e):So(1),s=e.clientWidth*l.x,r=e.clientHeight*l.y,u=o*l.x,c=a*l.y;return{width:s,height:r,x:u,y:c}}function Ny(e,t,n){let a;if(t==="viewport")a=k_(e,n);else if(t==="document")a=S_(Ro(e));else if(Ya(t))a=E_(t,n);else{const o=KC(e);a={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Pc(a)}function jC(e,t){const n=Dl(e);return n===t||!Ya(n)||br(n)?!1:qa(n).position==="fixed"||jC(n,t)}function x_(e,t){const n=t.get(e);if(n)return n;let a=Pi(e,[],!1).filter(r=>Ya(r)&&Ir(r)!=="body"),o=null;const l=qa(e).position==="fixed";let s=l?Dl(e):e;for(;Ya(s)&&!br(s);){const r=qa(s),u=Ch(s);!u&&r.position==="fixed"&&(o=null),(l?!u&&!o:!u&&r.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||hu(s)&&!u&&jC(e,s))?a=a.filter(d=>d!==s):o=r,s=Dl(s)}return t.set(e,a),a}function T_(e){let{element:t,boundary:n,rootBoundary:a,strategy:o}=e;const s=[...n==="clippingAncestors"?Rd(t)?[]:x_(t,this._c):[].concat(n),a],r=Ny(t,s[0],o);let u=r.top,c=r.right,d=r.bottom,f=r.left;for(let p=1;p{s(!1,1e-7)},1e3)}T===1&&!YC(c,e.getBoundingClientRect())&&s(),C=!1}try{n=new IntersectionObserver(k,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,w)}n.observe(e)}return s(!0),l}function __(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:r=typeof IntersectionObserver=="function",animationFrame:u=!1}=a,c=kh(e),d=o||l?[...c?Pi(c):[],...t?Pi(t):[]]:[];d.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),l&&y.addEventListener("resize",n)});const f=c&&r?I_(c,n):null;let p=-1,g=null;s&&(g=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&g&&t&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),n()}),c&&!u&&g.observe(c),t&&g.observe(t));let v,h=u?ks(e):null;u&&m();function m(){const y=ks(e);h&&!YC(h,y)&&n(),h=y,v=requestAnimationFrame(m)}return n(),()=>{var y;d.forEach(b=>{o&&b.removeEventListener("scroll",n),l&&b.removeEventListener("resize",n)}),f==null||f(),(y=g)==null||y.disconnect(),g=null,u&&cancelAnimationFrame(v)}}const P_=BC,A_=f_,L_=p_,D_=u_,V_=i_,B_=(e,t,n)=>{const a=new Map,o={platform:R_,...n},l={...o.platform,_c:a};return r_(e,t,{...o,platform:l})};function F_(e){let t;function n(){if(e.value==null)return;const{selectionStart:o,selectionEnd:l,value:s}=e.value;o==null||l==null||(t={selectionStart:o,selectionEnd:l,value:s,beforeTxt:s.slice(0,Math.max(0,o)),afterTxt:s.slice(Math.max(0,l))})}function a(){if(e.value==null||t==null)return;const{value:o}=e.value,{beforeTxt:l,afterTxt:s,selectionStart:r}=t;if(l==null||s==null||r==null)return;let u=o.length;if(o.endsWith(s))u=o.length-s.length;else if(o.startsWith(l))u=l.length;else{const c=l[r-1],d=o.indexOf(c,r-1);d!==-1&&(u=d+1)}e.value.setSelectionRange(u,u)}return[n,a]}const z_="utils/vue/vnode";let Va=function(e){return e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e}({});function Mp(e){return Ht(e)&&e.type===He}function qC(e){return Ht(e)&&e.type===vn}function H_(e){return Ht(e)&&!Mp(e)&&!qC(e)}const K_=e=>{if(!Ht(e))return ft(z_,"[getNormalizedProps] must be a VNode"),{};const t=e.props||{},n=(Ht(e.type)?e.type.props:void 0)||{},a={};return Object.keys(n).forEach(o=>{$t(n[o],"default")&&(a[o]=n[o].default)}),Object.keys(t).forEach(o=>{a[Vn(o)]=t[o]}),a},wa=e=>{const t=be(e)?e:[e],n=[];return t.forEach(a=>{var o;be(a)?n.push(...wa(a)):Ht(a)&&((o=a.component)!=null&&o.subTree)?n.push(a,...wa(a.component.subTree)):Ht(a)&&be(a.children)?n.push(...wa(a.children)):Ht(a)&&a.shapeFlag===2?n.push(...wa(a.type())):n.push(a)}),n},W_=(e,t,n)=>wa(e.subTree).filter(a=>{var o;return Ht(a)&&((o=a.type)==null?void 0:o.name)===t&&!!a.component}).map(a=>a.component.uid).map(a=>n[a]).filter(a=>!!a),Pd=(e,t)=>{const n=Wt({}),a=Wt([]),o=new WeakMap,l=c=>{n.value[c.uid]=c,Ju(n),mt(()=>{const d=c.getVnode().el,f=d.parentNode;if(!o.has(f)){o.set(f,[]);const p=f.insertBefore.bind(f);f.insertBefore=(g,v)=>(o.get(f).some(h=>g===h||v===h)&&Ju(n),p(g,v))}o.get(f).push(d)})},s=c=>{delete n.value[c.uid],Ju(n);const d=c.getVnode().el,f=d.parentNode,p=o.get(f),g=p.indexOf(d);p.splice(g,1)},r=()=>{a.value=W_(e,t,n.value)},u=c=>c.render();return{children:a,addChild:l,removeChild:s,ChildrenSorter:ie({setup(c,{slots:d}){return()=>(r(),d.default?Ye(u,{render:d.default}):null)}})}},Sn=ao({type:String,values:eo,required:!1}),GC=Symbol("size"),XC=()=>{const e=_e(GC,{});return S(()=>i(e.size)||"")};function dl(e,{disabled:t,beforeFocus:n,afterFocus:a,beforeBlur:o,afterBlur:l}={}){const{emit:s}=vt(),r=Wt(),u=A(!1),c=p=>{const g=ze(n)?n(p):!1;i(t)||u.value||g||(u.value=!0,s("focus",p),a==null||a())},d=p=>{var v;const g=ze(o)?o(p):!1;i(t)||p.relatedTarget&&((v=r.value)!=null&&v.contains(p.relatedTarget))||g||(u.value=!1,s("blur",p),l==null||l())},f=p=>{var g,v;i(t)||ws(p.target)||(g=r.value)!=null&&g.contains(document.activeElement)&&r.value!==document.activeElement||(v=e.value)==null||v.focus()};return fe([r,()=>i(t)],([p,g])=>{p&&(g?p.removeAttribute("tabindex"):p.setAttribute("tabindex","-1"))}),At(r,"focus",c,!0),At(r,"blur",d,!0),At(r,"click",f,!0),{isFocused:u,wrapperRef:r,handleFocus:c,handleBlur:d}}function mu({afterComposition:e,emit:t}){const n=A(!1),a=r=>{t==null||t("compositionstart",r),n.value=!0},o=r=>{t==null||t("compositionupdate",r),n.value=!0},l=r=>{t==null||t("compositionend",r),n.value&&(n.value=!1,Ae(()=>e(r)))};return{isComposing:n,handleComposition:r=>{r.type==="compositionend"?l(r):o(r)},handleCompositionStart:a,handleCompositionUpdate:o,handleCompositionEnd:l}}const ZC=Symbol("emptyValuesContextKey"),j_="use-empty-values",U_=["",void 0,null],Y_=void 0,Is=Se({emptyValues:Array,valueOnClear:{type:X([String,Number,Boolean,Function]),default:void 0,validator:e=>(e=ze(e)?e():e,be(e)?e.every(t=>!t):!e)}}),gu=(e,t)=>{const n=vt()?_e(ZC,A({})):A({}),a=S(()=>e.emptyValues||n.value.emptyValues||U_),o=S(()=>ze(e.valueOnClear)?e.valueOnClear():e.valueOnClear!==void 0?e.valueOnClear:ze(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:t!==void 0?t:Y_),l=s=>{let r=!0;return be(s)?r=a.value.some(u=>tn(s,u)):r=a.value.includes(s),r};return l(o.value)||ft(j_,"value-on-clear should be a value of empty-values"),{emptyValues:a,valueOnClear:o,isEmptyValue:l}},q_=Se({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Qn=e=>el(q_,e),JC=e=>{const t=e.props,n=be(t)?pr(t.map(a=>[a,{}])):t;e.setPropsDefaults=a=>{if(n){for(const[o,l]of Object.entries(a)){const s=n[o];if($t(n,o)){if(eh(s)){n[o]={...s,default:l};continue}n[o]={type:s,default:l}}}e.props=n}}},rt=(e,t)=>{if(e.install=n=>{for(const a of[e,...Object.values(t??{})])n.component(a.name,a)},t)for(const[n,a]of Object.entries(t))e[n]=a;return JC(e),e},QC=(e,t)=>(e.install=n=>{e._context=n._context,n.config.globalProperties[t]=e},e),G_=(e,t)=>(e.install=n=>{n.directive(t,e)},e),Qt=e=>(e.install=_t,JC(e),e);var X_=ie({__name:"teleport",props:uu,setup(e){return(t,n)=>t.disabled?ae(t.$slots,"default",{key:0}):(x(),re(Hx,{key:1,to:t.to},[ae(t.$slots,"default")],8,["to"]))}}),Z_=X_;const _r=rt(Z_),Ry="ElAffix";var J_=ie({name:Ry,__name:"affix",props:k3,emits:E3,setup(e,{expose:t,emit:n}){const a=e,o=n,l=he("affix"),s=Wt(),r=Wt(),u=Wt(),{height:c}=Hv(),{height:d,width:f,top:p,bottom:g,left:v,update:h}=Sg(r,{windowScroll:!1}),m=Sg(s),y=A(!1),b=A(0),w=A(0),C=S(()=>!a.teleported||!y.value),k=S(()=>({display:"flow-root",height:y.value?`${d.value}px`:"",width:y.value?`${f.value}px`:""})),E=S(()=>{if(!y.value)return{};const O=an(a.offset);return{height:`${d.value}px`,width:`${f.value}px`,top:a.position==="top"?O:"",bottom:a.position==="bottom"?O:"",left:a.teleported?`${v.value}px`:"",transform:w.value?`translateY(${w.value}px)`:"",zIndex:a.zIndex}}),T=()=>{if(!u.value)return;b.value=u.value instanceof Window?document.documentElement.scrollTop:u.value.scrollTop||0;const{position:O,target:_,offset:P}=a,D=P+d.value;if(O==="top")if(_){const W=m.bottom.value-D;y.value=P>p.value&&m.bottom.value>0,w.value=W<0?W:0}else y.value=P>p.value;else if(_){const W=c.value-m.top.value-D;y.value=c.value-Pm.top.value,w.value=W<0?-W:0}else y.value=c.value-P{if(!y.value){h();return}y.value=!1,await Ae(),h(),y.value=!0},N=async()=>{h(),await Ae(),o("scroll",{scrollTop:b.value,fixed:y.value})};return fe(y,O=>o(yt,O)),mt(()=>{a.target?(s.value=document.querySelector(a.target)??void 0,s.value||Jt(Ry,`Target does not exist: ${a.target}`)):s.value=document.documentElement,u.value=rh(r.value,!0),h()}),Ji(()=>{Ae($)}),Rv(()=>{y.value=!1}),At(u,"scroll",N),sa(T),t({update:T,updateRoot:$}),(O,_)=>(x(),B("div",{ref_key:"root",ref:r,class:M(i(l).b()),style:je(k.value)},[J(i(_r),{disabled:C.value,to:e.appendTo},{default:ne(()=>[j("div",{class:M({[i(l).m("fixed")]:y.value}),style:je(E.value)},[ae(O.$slots,"default")],6)]),_:3},8,["disabled","to"])],6))}}),Q_=J_;const eP=rt(Q_);/*! Element Plus Icons Vue v2.3.2 */var tP=ie({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),Io=tP,nP=ie({name:"ArrowLeft",__name:"arrow-left",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"})]))}}),al=nP,aP=ie({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),Jn=aP,oP=ie({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),Ad=oP,lP=ie({name:"Back",__name:"back",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),j("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),sP=lP,rP=ie({name:"Calendar",__name:"calendar",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),iP=rP,uP=ie({name:"CaretRight",__name:"caret-right",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}}),eS=uP,cP=ie({name:"CaretTop",__name:"caret-top",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M512 320 192 704h639.936z"})]))}}),dP=cP,fP=ie({name:"Check",__name:"check",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),yu=fP,pP=ie({name:"CircleCheckFilled",__name:"circle-check-filled",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),vP=pP,hP=ie({name:"CircleCheck",__name:"circle-check",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),j("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"})]))}}),Eh=hP,mP=ie({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),xh=mP,gP=ie({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),j("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),_o=gP,yP=ie({name:"Clock",__name:"clock",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),j("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),j("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),tS=yP,bP=ie({name:"Close",__name:"close",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),La=bP,wP=ie({name:"Connection",__name:"connection",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M640 384v64H448a128 128 0 0 0-128 128v128a128 128 0 0 0 128 128h320a128 128 0 0 0 128-128V576a128 128 0 0 0-64-110.848V394.88c74.56 26.368 128 97.472 128 181.056v128a192 192 0 0 1-192 192H448a192 192 0 0 1-192-192V576a192 192 0 0 1 192-192z"}),j("path",{fill:"currentColor",d:"M384 640v-64h192a128 128 0 0 0 128-128V320a128 128 0 0 0-128-128H256a128 128 0 0 0-128 128v128a128 128 0 0 0 64 110.848v70.272A192.06 192.06 0 0 1 64 448V320a192 192 0 0 1 192-192h320a192 192 0 0 1 192 192v128a192 192 0 0 1-192 192z"})]))}}),XJ=wP,CP=ie({name:"DArrowLeft",__name:"d-arrow-left",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672zm256 0a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672z"})]))}}),Vl=CP,SP=ie({name:"DArrowRight",__name:"d-arrow-right",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L764.736 512 452.864 192a30.59 30.59 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L508.736 512 196.864 192a30.59 30.59 0 0 1 0-42.688"})]))}}),Bl=SP,kP=ie({name:"DataBoard",__name:"data-board",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M32 128h960v64H32z"}),j("path",{fill:"currentColor",d:"M192 192v512h640V192zm-64-64h768v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32z"}),j("path",{fill:"currentColor",d:"M322.176 960H248.32l144.64-250.56 55.424 32zm453.888 0h-73.856L576 741.44l55.424-32z"})]))}}),ZJ=kP,EP=ie({name:"Delete",__name:"delete",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),xP=EP,TP=ie({name:"DocumentCopy",__name:"document-copy",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M128 320v576h576V320zm-32-64h640a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32M960 96v704a32 32 0 0 1-32 32h-96v-64h64V128H384v64h-64V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32M256 672h320v64H256zm0-192h320v64H256z"})]))}}),JJ=TP,$P=ie({name:"Document",__name:"document",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),OP=$P,NP=ie({name:"FullScreen",__name:"full-screen",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),MP=NP,RP=ie({name:"Hide",__name:"hide",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176"}),j("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"})]))}}),IP=RP,_P=ie({name:"InfoFilled",__name:"info-filled",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Ai=_P,PP=ie({name:"Link",__name:"link",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M715.648 625.152 670.4 579.904l90.496-90.56c75.008-74.944 85.12-186.368 22.656-248.896-62.528-62.464-173.952-52.352-248.96 22.656L444.16 353.6l-45.248-45.248 90.496-90.496c100.032-99.968 251.968-110.08 339.456-22.656 87.488 87.488 77.312 239.424-22.656 339.456l-90.496 90.496zm-90.496 90.496-90.496 90.496C434.624 906.112 282.688 916.224 195.2 828.8c-87.488-87.488-77.312-239.424 22.656-339.456l90.496-90.496 45.248 45.248-90.496 90.56c-75.008 74.944-85.12 186.368-22.656 248.896 62.528 62.464 173.952 52.352 248.96-22.656l90.496-90.496zm0-362.048 45.248 45.248L398.848 670.4 353.6 625.152z"})]))}}),QJ=PP,AP=ie({name:"Loading",__name:"loading",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),Oo=AP,LP=ie({name:"Minus",__name:"minus",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),DP=LP,VP=ie({name:"MoreFilled",__name:"more-filled",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),Iy=VP,BP=ie({name:"More",__name:"more",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),FP=BP,zP=ie({name:"PictureFilled",__name:"picture-filled",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),HP=zP,KP=ie({name:"Plus",__name:"plus",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),nS=KP,WP=ie({name:"QuestionFilled",__name:"question-filled",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784 49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.97 51.97 0 0 0-15.488-38.016 55.94 55.94 0 0 0-39.424-14.784"})]))}}),jP=WP,UP=ie({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),YP=UP,qP=ie({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88"})]))}}),GP=qP,XP=ie({name:"ScaleToOriginal",__name:"scale-to-original",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118m-361.412 0a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118M512 361.412a30.12 30.12 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.12 30.12 0 0 0 512 361.412M512 512a30.12 30.12 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.12 30.12 0 0 0 512 512"})]))}}),ZP=XP,JP=ie({name:"Search",__name:"search",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),QP=JP,eA=ie({name:"Setting",__name:"setting",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357 357 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a352 352 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357 357 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294 294 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293 293 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294 294 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288 288 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293 293 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a288 288 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}}),eQ=eA,tA=ie({name:"SortDown",__name:"sort-down",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M576 96v709.568L333.312 562.816A32 32 0 1 0 288 608l297.408 297.344A32 32 0 0 0 640 882.688V96a32 32 0 0 0-64 0"})]))}}),nA=tA,aA=ie({name:"SortUp",__name:"sort-up",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M384 141.248V928a32 32 0 1 0 64 0V218.56l242.688 242.688A32 32 0 1 0 736 416L438.592 118.656A32 32 0 0 0 384 141.248"})]))}}),oA=aA,lA=ie({name:"StarFilled",__name:"star-filled",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M313.6 924.48a70.4 70.4 0 0 1-74.152-5.365 70.4 70.4 0 0 1-27.992-68.875l37.888-220.928L88.96 472.96a70.4 70.4 0 0 1 3.788-104.225A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 100.246-28.595 70.4 70.4 0 0 1 25.962 28.595l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),Lu=lA,sA=ie({name:"Star",__name:"star",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),rA=sA,iA=ie({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),aS=iA,uA=ie({name:"SwitchButton",__name:"switch-button",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M352 159.872V230.4a352 352 0 1 0 320 0v-70.528A416.128 416.128 0 0 1 512 960a416 416 0 0 1-160-800.128"}),j("path",{fill:"currentColor",d:"M512 64q32 0 32 32v320q0 32-32 32t-32-32V96q0-32 32-32"})]))}}),tQ=uA,cA=ie({name:"TopRight",__name:"top-right",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M768 256H353.6a32 32 0 1 1 0-64H800a32 32 0 0 1 32 32v448a32 32 0 0 1-64 0z"}),j("path",{fill:"currentColor",d:"M777.344 201.344a32 32 0 0 1 45.312 45.312l-544 544a32 32 0 0 1-45.312-45.312z"})]))}}),nQ=cA,dA=ie({name:"Upload",__name:"upload",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248z"})]))}}),aQ=dA,fA=ie({name:"View",__name:"view",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),pA=fA,vA=ie({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),Ld=vA,hA=ie({name:"ZoomIn",__name:"zoom-in",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),oS=hA,mA=ie({name:"ZoomOut",__name:"zoom-out",setup(e){return(t,n)=>(x(),B("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[j("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),gA=mA;const Ft=X([String,Object,Function]),lS={Close:La},Th={Close:La,SuccessFilled:aS,InfoFilled:Ai,WarningFilled:Ld,CircleCloseFilled:xh},Fl={primary:Ai,success:aS,warning:Ld,error:xh,info:Ai},Dd={validating:Oo,success:Eh,error:_o},yA=["light","dark"],bA=Se({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:Ri(Fl),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:yA,default:"light"}}),wA={close:e=>e instanceof MouseEvent},CA=Se({size:{type:X([Number,String])},color:{type:String}});var SA=ie({name:"ElIcon",inheritAttrs:!1,__name:"icon",props:CA,setup(e){const t=e,n=he("icon"),a=S(()=>{const{size:o,color:l}=t,s=an(o);return!s&&!l?{}:{fontSize:s,"--color":l}});return(o,l)=>(x(),B("i",pt({class:i(n).b(),style:a.value},o.$attrs),[ae(o.$slots,"default")],16))}}),kA=SA;const Be=rt(kA);var EA=ie({name:"ElAlert",__name:"alert",props:bA,emits:wA,setup(e,{emit:t}){const{Close:n}=Th,a=e,o=t,l=fn(),s=he("alert"),r=A(!0),u=S(()=>Fl[a.type]),c=S(()=>{var p;if(a.description)return!0;const f=(p=l.default)==null?void 0:p.call(l);return f?wa(f).some(g=>!qC(g)):!1}),d=f=>{r.value=!1,o("close",f)};return(f,p)=>(x(),re(Bn,{name:i(s).b("fade"),persisted:""},{default:ne(()=>[dt(j("div",{class:M([i(s).b(),i(s).m(e.type),i(s).is("center",e.center),i(s).is(e.effect)]),role:"alert"},[e.showIcon&&(f.$slots.icon||u.value)?(x(),re(i(Be),{key:0,class:M([i(s).e("icon"),i(s).is("big",c.value)])},{default:ne(()=>[ae(f.$slots,"icon",{},()=>[(x(),re(ct(u.value)))])]),_:3},8,["class"])):le("v-if",!0),j("div",{class:M(i(s).e("content"))},[e.title||f.$slots.title?(x(),B("span",{key:0,class:M([i(s).e("title"),{"with-description":c.value}])},[ae(f.$slots,"title",{},()=>[St(ke(e.title),1)])],2)):le("v-if",!0),c.value?(x(),B("p",{key:1,class:M(i(s).e("description"))},[ae(f.$slots,"default",{},()=>[St(ke(e.description),1)])],2)):le("v-if",!0),e.closable?(x(),B(He,{key:2},[e.closeText?(x(),B("div",{key:0,class:M([i(s).e("close-btn"),i(s).is("customed")]),onClick:d},ke(e.closeText),3)):(x(),re(i(Be),{key:1,class:M(i(s).e("close-btn")),onClick:d},{default:ne(()=>[J(i(n))]),_:1},8,["class"]))],64)):le("v-if",!0)],2)],2),[[Nt,r.value]])]),_:3},8,["name"]))}}),xA=EA;const TA=rt(xA),sS=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],rS=Se({role:{type:String,values:sS,default:"tooltip"}}),$h=Symbol("popper"),iS=Symbol("popperContent");var $A=ie({name:"ElPopperArrow",inheritAttrs:!1,__name:"arrow",setup(e,{expose:t}){const n=he("popper"),{arrowRef:a,arrowStyle:o}=_e(iS,void 0);return Pt(()=>{a.value=void 0}),t({arrowRef:a}),(l,s)=>(x(),B("span",{ref_key:"arrowRef",ref:a,class:M(i(n).e("arrow")),style:je(i(o)),"data-popper-arrow":""},null,6))}}),OA=$A;const uS=Se({virtualRef:{type:X(Object)},virtualTriggering:Boolean,onMouseenter:{type:X(Function)},onMouseleave:{type:X(Function)},onClick:{type:X(Function)},onKeydown:{type:X(Function)},onFocus:{type:X(Function)},onBlur:{type:X(Function)},onContextmenu:{type:X(Function)},id:String,open:Boolean}),Sf="ElOnlyChild",cS=ie({name:Sf,setup(e,{slots:t,attrs:n}){var o;const a=ZI(((o=_e(PC))==null?void 0:o.setForwardRef)??_t);return()=>{var u;const l=(u=t.default)==null?void 0:u.call(t,n);if(!l)return null;const[s,r]=dS(l);return s?(r>1&&ft(Sf,"requires exact only one valid child."),dt(Eo(s,n),[[a]])):(ft(Sf,"no valid child node found"),null)}}});function dS(e){if(!e)return[null,0];const t=e,n=t.filter(a=>a.type!==vn).length;for(const a of t){if(ot(a))switch(a.type){case vn:continue;case Or:case"svg":return[_y(a),n];case He:return dS(a.children);default:return[a,n]}return[_y(a),n]}return[null,0]}function _y(e){const t=he("only-child");return J("span",{class:t.e("content")},[e])}var NA=ie({name:"ElPopperTrigger",inheritAttrs:!1,__name:"trigger",props:uS,setup(e,{expose:t}){const n=e,{role:a,triggerRef:o}=_e($h,void 0);XI(o);const l=S(()=>r.value?n.id:void 0),s=S(()=>{if(a&&a.value==="tooltip")return n.open&&n.id?n.id:void 0}),r=S(()=>{if(a&&a.value!=="tooltip")return a.value}),u=S(()=>r.value?`${n.open}`:void 0);let c;const d=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return mt(()=>{fe(()=>n.virtualRef,f=>{f&&(o.value=Cn(f))},{immediate:!0}),fe(o,(f,p)=>{c==null||c(),c=void 0,fa(p)&&d.forEach(g=>{const v=n[g];v&&p.removeEventListener(g.slice(2).toLowerCase(),v,["onFocus","onBlur"].includes(g))}),fa(f)&&(d.forEach(g=>{const v=n[g];v&&f.addEventListener(g.slice(2).toLowerCase(),v,["onFocus","onBlur"].includes(g))}),ws(f)&&(c=fe([l,s,r,u],g=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((v,h)=>{hn(g[h])?f.removeAttribute(v):f.setAttribute(v,g[h])})},{immediate:!0}))),fa(p)&&ws(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(g=>p.removeAttribute(g))},{immediate:!0})}),Pt(()=>{if(c==null||c(),c=void 0,o.value&&fa(o.value)){const f=o.value;d.forEach(p=>{const g=n[p];g&&f.removeEventListener(p.slice(2).toLowerCase(),g,["onFocus","onBlur"].includes(p))}),o.value=void 0}}),t({triggerRef:o}),(f,p)=>e.virtualTriggering?le("v-if",!0):(x(),re(i(cS),pt({key:0},f.$attrs,{"aria-controls":l.value,"aria-describedby":s.value,"aria-expanded":u.value,"aria-haspopup":r.value}),{default:ne(()=>[ae(f.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}}),MA=NA;const fS=Se({arrowOffset:{type:Number,default:5}}),RA=["fixed","absolute"],IA=Se({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:X(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Mo,default:"bottom"},popperOptions:{type:X(Object),default:()=>({})},strategy:{type:String,values:RA,default:"absolute"}}),pS=Se({...IA,...fS,id:String,style:{type:X([String,Array,Object])},className:{type:X([String,Array,Object])},effect:{type:X(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:Boolean,trapping:Boolean,popperClass:{type:X([String,Array,Object])},popperStyle:{type:X([String,Array,Object])},referenceEl:{type:X(Object)},triggerTargetEl:{type:X(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...Qn(["ariaLabel"]),loop:Boolean}),_A={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},PA=Se({size:{type:String,values:eo},disabled:Boolean}),AA=Se({...PA,model:Object,rules:{type:X(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:X([Object,Boolean]),default:!0}}),LA={validate:(e,t,n)=>(be(e)||De(e))&&Vt(t)&&De(n)},_s=Symbol("formContextKey"),No=Symbol("formItemContextKey"),bn=(e,t={})=>{const n=A(void 0),a=t.prop?n:wC("size"),o=t.global?n:XC(),l=t.form?{size:void 0}:_e(_s,void 0),s=t.formItem?{size:void 0}:_e(No,void 0);return S(()=>a.value||i(e)||(s==null?void 0:s.size)||(l==null?void 0:l.size)||o.value||"")},on=e=>{const t=wC("disabled"),n=_e(_s,void 0);return S(()=>t.value??i(e)??(n==null?void 0:n.disabled)??!1)},Pn=()=>({form:_e(_s,void 0),formItem:_e(No,void 0)}),Ta=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:a})=>{n||(n=A(!1)),a||(a=A(!1));const o=vt(),l=()=>{let c=o==null?void 0:o.parent;for(;c;){if(c.type.name==="ElFormItem")return!1;if(c.type.name==="ElLabelWrap")return!0;c=c.parent}return!1},s=A();let r;const u=S(()=>{var c;return!!(!(e.label||e.ariaLabel)&&t&&t.inputIds&&((c=t.inputIds)==null?void 0:c.length)<=1)});return mt(()=>{r=fe([Lt(e,"id"),n],([c,d])=>{const f=c??(d?void 0:Fn().value);f!==s.value&&(t!=null&&t.removeInputId&&!l()&&(s.value&&t.removeInputId(s.value),!(a!=null&&a.value)&&!d&&f&&t.addInputId(f)),s.value=f)},{immediate:!0})}),$r(()=>{r&&r(),t!=null&&t.removeInputId&&s.value&&t.removeInputId(s.value)}),{isLabeledByFormItem:u,inputId:s}},DA=["","error","validating","success"],VA=Se({label:String,labelWidth:{type:[String,Number]},labelPosition:{type:String,values:["left","right","top",""],default:""},prop:{type:X([String,Array])},required:{type:Boolean,default:void 0},rules:{type:X([Object,Array])},error:String,validateStatus:{type:String,values:DA},for:String,inlineMessage:{type:Boolean,default:void 0},showMessage:{type:Boolean,default:!0},size:{type:String,values:eo}}),Py=e=>[...new Set(e)],Ur=e=>be(e)?e[0]:e,Xn=e=>!e&&e!==0?[]:be(e)?e:[e],BA="ElForm";function FA(){const e=A([]),t=S(()=>{if(!e.value.length)return"0";const l=Math.max(...e.value);return l?`${l}px`:""});function n(l){const s=e.value.indexOf(l);return s===-1&&t.value==="0"&&ft(BA,`unexpected width ${l}`),s}function a(l,s){if(l&&s){const r=n(s);e.value.splice(r,1,l)}else l&&e.value.push(l)}function o(l){const s=n(l);s>-1&&e.value.splice(s,1)}return{autoLabelWidth:t,registerLabelWidth:a,deregisterLabelWidth:o}}const Du=(e,t)=>{const n=Tn(t).map(a=>be(a)?a.join("."):a);return n.length>0?e.filter(a=>a.propString&&n.includes(a.propString)):e},Ls="ElForm";var zA=ie({name:Ls,__name:"form",props:AA,emits:LA,setup(e,{expose:t,emit:n}){const a=e,o=n,l=A(),s=Rt([]),r=new Map,u=bn(),c=he("form"),d=S(()=>{const{labelPosition:T,inline:$}=a;return[c.b(),c.m(u.value||"default"),{[c.m(`label-${T}`)]:T,[c.m("inline")]:$}]}),f=T=>Du(s,[T])[0],p=T=>{s.includes(T)||s.push(T),T.propString&&(r.has(T.propString)?T.setInitialValue(r.get(T.propString)):r.set(T.propString,mo(T.fieldValue)))},g=(T,$)=>{if($){r.delete($);return}const N=s.indexOf(T);N>-1&&(s.splice(N,1),T.propString&&r.set(T.propString,mo(T.getInitialValue())))},v=T=>{if(!a.model){ft(Ls,"model is required for setInitialValues to work.");return}if(!T){ft(Ls,"initModel is required for setInitialValues to work.");return}for(const $ of r.keys())r.set($,mo(Ml(T,$).value));s.forEach($=>{$.prop&&$.setInitialValue(Ml(T,$.prop).value)})},h=(T=[])=>{if(!a.model){ft(Ls,"model is required for resetFields to work.");return}Du(s,T).forEach(O=>O.resetField());const $=new Set(s.map(O=>O.propString).filter(Boolean)),N=T.length>0?Tn(T).map(O=>be(O)?O.join("."):O):[...r.keys()];for(const O of N)!$.has(O)&&r.has(O)&&(Ml(a.model,O).value=mo(r.get(O)))},m=(T=[])=>{Du(s,T).forEach($=>$.clearValidate())},y=S(()=>{const T=!!a.model;return T||ft(Ls,"model is required for validate to work."),T}),b=T=>{if(s.length===0)return[];const $=Du(s,T);return $.length?$:(ft(Ls,"please pass correct props!"),[])},w=async T=>k(void 0,T),C=async(T=[])=>{if(!y.value)return!1;const $=b(T);if($.length===0)return!0;let N={};for(const O of $)try{await O.validate(""),O.validateState==="error"&&!O.error&&O.resetField()}catch(_){N={...N,..._}}return Object.keys(N).length===0?!0:Promise.reject(N)},k=async(T=[],$)=>{var _;let N=!1;const O=!ze($);try{return N=await C(T),N===!0&&await($==null?void 0:$(N)),N}catch(P){if(P instanceof Error)throw P;const D=P;return a.scrollToError&&l.value&&((_=l.value.querySelector(`.${c.b()}-item.is-error`))==null||_.scrollIntoView(a.scrollIntoViewOptions)),!N&&await($==null?void 0:$(!1,D)),O&&Promise.reject(D)}},E=T=>{var N;const $=f(T);$&&((N=$.$el)==null||N.scrollIntoView(a.scrollIntoViewOptions))};return fe(()=>a.rules,()=>{a.validateOnRuleChange&&w().catch(T=>ft(T))},{deep:!0,flush:"post"}),bt(_s,Rt({...Nn(a),emit:o,resetFields:h,clearValidate:m,validateField:k,getField:f,addField:p,removeField:g,setInitialValues:v,...FA()})),t({validate:w,validateField:k,resetFields:h,clearValidate:m,scrollToField:E,getField:f,fields:s,setInitialValues:v}),(T,$)=>(x(),B("form",{ref_key:"formRef",ref:l,class:M(d.value)},[ae(T.$slots,"default")],2))}}),HA=zA;const Ay="ElLabelWrap";var KA=ie({name:Ay,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(e,{slots:t}){const n=_e(_s,void 0),a=_e(No);a||Jt(Ay,"usage: ");const o=he("form"),l=A(),s=A(0),r=()=>{var d;if((d=l.value)!=null&&d.firstElementChild){const f=window.getComputedStyle(l.value.firstElementChild).width;return Math.ceil(Number.parseFloat(f))}else return 0},u=(d="update")=>{Ae(()=>{t.default&&e.isAutoWidth&&(d==="update"?s.value=r():d==="remove"&&(n==null||n.deregisterLabelWidth(s.value)))})},c=()=>u("update");return mt(()=>{c()}),Pt(()=>{u("remove")}),Qa(()=>c()),fe(s,(d,f)=>{e.updateAll&&(n==null||n.registerLabelWidth(d,f))}),Xt(S(()=>{var d;return((d=l.value)==null?void 0:d.firstElementChild)??null}),c),()=>{var f,p;if(!t)return null;const{isAutoWidth:d}=e;if(d){const g=n==null?void 0:n.autoLabelWidth,v=a==null?void 0:a.hasLabel,h={};if(v&&g&&g!=="auto"){const m=Math.max(0,Number.parseInt(g,10)-s.value),y=(a.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";m&&(h[y]=`${m}px`)}return J("div",{ref:l,class:[o.be("item","label-wrap")],style:h},[(f=t.default)==null?void 0:f.call(t)])}else return J(He,{ref:l},[(p=t.default)==null?void 0:p.call(t)])}}});function ls(){return ls=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function rc(e,t,n){return jA()?rc=Reflect.construct.bind():rc=function(o,l,s){var r=[null];r.push.apply(r,l);var u=Function.bind.apply(o,r),c=new u;return s&&Li(c,s.prototype),c},rc.apply(null,arguments)}function UA(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Ip(e){var t=typeof Map=="function"?new Map:void 0;return Ip=function(a){if(a===null||!UA(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(a))return t.get(a);t.set(a,o)}function o(){return rc(a,arguments,Rp(this).constructor)}return o.prototype=Object.create(a.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Li(o,a)},Ip(e)}var YA=/%[sdj%]/g,qA=function(){};function _p(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var a=n.field;t[a]=t[a]||[],t[a].push(n)}),t}function Ca(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a=l)return r;switch(r){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch{return"[Circular]"}break;default:return r}});return s}return e}function GA(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function In(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||GA(t)&&typeof e=="string"&&!e)}function XA(e,t,n){var a=[],o=0,l=e.length;function s(r){a.push.apply(a,r||[]),o++,o===l&&n(a)}e.forEach(function(r){t(r,s)})}function Ly(e,t,n){var a=0,o=e.length;function l(s){if(s&&s.length){n(s);return}var r=a;a=a+1,r()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},ei={integer:function(t){return ei.number(t)&&parseInt(t,10)===t},float:function(t){return ei.number(t)&&!ei.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!ei.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(Fy.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(n8())},hex:function(t){return typeof t=="string"&&!!t.match(Fy.hex)}},a8=function(t,n,a,o,l){if(t.required&&n===void 0){vS(t,n,a,o,l);return}var s=["integer","float","array","regexp","object","method","email","number","date","url","hex"],r=t.type;s.indexOf(r)>-1?ei[r](n)||o.push(Ca(l.messages.types[r],t.fullField,t.type)):r&&typeof n!==t.type&&o.push(Ca(l.messages.types[r],t.fullField,t.type))},o8=function(t,n,a,o,l){var s=typeof t.len=="number",r=typeof t.min=="number",u=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d=n,f=null,p=typeof n=="number",g=typeof n=="string",v=Array.isArray(n);if(p?f="number":g?f="string":v&&(f="array"),!f)return!1;v&&(d=n.length),g&&(d=n.replace(c,"_").length),s?d!==t.len&&o.push(Ca(l.messages[f].len,t.fullField,t.len)):r&&!u&&dt.max?o.push(Ca(l.messages[f].max,t.fullField,t.max)):r&&u&&(dt.max)&&o.push(Ca(l.messages[f].range,t.fullField,t.min,t.max))},Ds="enum",l8=function(t,n,a,o,l){t[Ds]=Array.isArray(t[Ds])?t[Ds]:[],t[Ds].indexOf(n)===-1&&o.push(Ca(l.messages[Ds],t.fullField,t[Ds].join(", ")))},s8=function(t,n,a,o,l){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||o.push(Ca(l.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var s=new RegExp(t.pattern);s.test(n)||o.push(Ca(l.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},jt={required:vS,whitespace:t8,type:a8,range:o8,enum:l8,pattern:s8},r8=function(t,n,a,o,l){var s=[],r=t.required||!t.required&&o.hasOwnProperty(t.field);if(r){if(In(n,"string")&&!t.required)return a();jt.required(t,n,o,s,l,"string"),In(n,"string")||(jt.type(t,n,o,s,l),jt.range(t,n,o,s,l),jt.pattern(t,n,o,s,l),t.whitespace===!0&&jt.whitespace(t,n,o,s,l))}a(s)},i8=function(t,n,a,o,l){var s=[],r=t.required||!t.required&&o.hasOwnProperty(t.field);if(r){if(In(n)&&!t.required)return a();jt.required(t,n,o,s,l),n!==void 0&&jt.type(t,n,o,s,l)}a(s)},u8=function(t,n,a,o,l){var s=[],r=t.required||!t.required&&o.hasOwnProperty(t.field);if(r){if(n===""&&(n=void 0),In(n)&&!t.required)return a();jt.required(t,n,o,s,l),n!==void 0&&(jt.type(t,n,o,s,l),jt.range(t,n,o,s,l))}a(s)},c8=function(t,n,a,o,l){var s=[],r=t.required||!t.required&&o.hasOwnProperty(t.field);if(r){if(In(n)&&!t.required)return a();jt.required(t,n,o,s,l),n!==void 0&&jt.type(t,n,o,s,l)}a(s)},d8=function(t,n,a,o,l){var s=[],r=t.required||!t.required&&o.hasOwnProperty(t.field);if(r){if(In(n)&&!t.required)return a();jt.required(t,n,o,s,l),In(n)||jt.type(t,n,o,s,l)}a(s)},f8=function(t,n,a,o,l){var s=[],r=t.required||!t.required&&o.hasOwnProperty(t.field);if(r){if(In(n)&&!t.required)return a();jt.required(t,n,o,s,l),n!==void 0&&(jt.type(t,n,o,s,l),jt.range(t,n,o,s,l))}a(s)},p8=function(t,n,a,o,l){var s=[],r=t.required||!t.required&&o.hasOwnProperty(t.field);if(r){if(In(n)&&!t.required)return a();jt.required(t,n,o,s,l),n!==void 0&&(jt.type(t,n,o,s,l),jt.range(t,n,o,s,l))}a(s)},v8=function(t,n,a,o,l){var s=[],r=t.required||!t.required&&o.hasOwnProperty(t.field);if(r){if(n==null&&!t.required)return a();jt.required(t,n,o,s,l,"array"),n!=null&&(jt.type(t,n,o,s,l),jt.range(t,n,o,s,l))}a(s)},h8=function(t,n,a,o,l){var s=[],r=t.required||!t.required&&o.hasOwnProperty(t.field);if(r){if(In(n)&&!t.required)return a();jt.required(t,n,o,s,l),n!==void 0&&jt.type(t,n,o,s,l)}a(s)},m8="enum",g8=function(t,n,a,o,l){var s=[],r=t.required||!t.required&&o.hasOwnProperty(t.field);if(r){if(In(n)&&!t.required)return a();jt.required(t,n,o,s,l),n!==void 0&&jt[m8](t,n,o,s,l)}a(s)},y8=function(t,n,a,o,l){var s=[],r=t.required||!t.required&&o.hasOwnProperty(t.field);if(r){if(In(n,"string")&&!t.required)return a();jt.required(t,n,o,s,l),In(n,"string")||jt.pattern(t,n,o,s,l)}a(s)},b8=function(t,n,a,o,l){var s=[],r=t.required||!t.required&&o.hasOwnProperty(t.field);if(r){if(In(n,"date")&&!t.required)return a();if(jt.required(t,n,o,s,l),!In(n,"date")){var u;n instanceof Date?u=n:u=new Date(n),jt.type(t,u,o,s,l),u&&jt.range(t,u.getTime(),o,s,l)}}a(s)},w8=function(t,n,a,o,l){var s=[],r=Array.isArray(n)?"array":typeof n;jt.required(t,n,o,s,l,r),a(s)},kf=function(t,n,a,o,l){var s=t.type,r=[],u=t.required||!t.required&&o.hasOwnProperty(t.field);if(u){if(In(n,s)&&!t.required)return a();jt.required(t,n,o,r,l,s),In(n,s)||jt.type(t,n,o,r,l)}a(r)},C8=function(t,n,a,o,l){var s=[],r=t.required||!t.required&&o.hasOwnProperty(t.field);if(r){if(In(n)&&!t.required)return a();jt.required(t,n,o,s,l)}a(s)},mi={string:r8,method:i8,number:u8,boolean:c8,regexp:d8,integer:f8,float:p8,array:v8,object:h8,enum:g8,pattern:y8,date:b8,url:kf,hex:kf,email:kf,required:w8,any:C8};function Pp(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var Ap=Pp(),bu=function(){function e(n){this.rules=null,this._messages=Ap,this.define(n)}var t=e.prototype;return t.define=function(a){var o=this;if(!a)throw new Error("Cannot configure a schema with no rules");if(typeof a!="object"||Array.isArray(a))throw new Error("Rules must be an object");this.rules={},Object.keys(a).forEach(function(l){var s=a[l];o.rules[l]=Array.isArray(s)?s:[s]})},t.messages=function(a){return a&&(this._messages=By(Pp(),a)),this._messages},t.validate=function(a,o,l){var s=this;o===void 0&&(o={}),l===void 0&&(l=function(){});var r=a,u=o,c=l;if(typeof u=="function"&&(c=u,u={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,r),Promise.resolve(r);function d(h){var m=[],y={};function b(C){if(Array.isArray(C)){var k;m=(k=m).concat.apply(k,C)}else m.push(C)}for(var w=0;wn.labelPosition||(o==null?void 0:o.labelPosition)),y=S(()=>m.value==="top"?{}:{width:an(n.labelWidth??(o==null?void 0:o.labelWidth))}),b=S(()=>{if(m.value==="top"||o!=null&&o.inline)return{};if(!n.label&&!n.labelWidth&&O)return{};const Y=an(n.labelWidth??(o==null?void 0:o.labelWidth));return!n.label&&!a.label?{marginLeft:Y}:{}}),w=S(()=>[r.b(),r.m(s.value),r.is("error",d.value==="error"),r.is("validating",d.value==="validating"),r.is("success",d.value==="success"),r.is("required",U.value||n.required),r.is("no-asterisk",o==null?void 0:o.hideRequiredAsterisk),(o==null?void 0:o.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[r.m("feedback")]:o==null?void 0:o.statusIcon,[r.m(`label-${m.value}`)]:m.value}]),C=S(()=>Vt(n.inlineMessage)?n.inlineMessage:(o==null?void 0:o.inlineMessage)||!1),k=S(()=>[r.e("error"),{[r.em("error","inline")]:C.value}]),E=S(()=>n.prop?be(n.prop)?n.prop.join("."):n.prop:""),T=S(()=>!!(n.label||a.label)),$=S(()=>n.for??(c.value.length===1?c.value[0]:void 0)),N=S(()=>!$.value&&T.value),O=!!l,_=S(()=>{const Y=o==null?void 0:o.model;if(!(!Y||!n.prop))return Ml(Y,n.prop).value}),P=S(()=>{const{required:Y}=n,G=[];n.rules&&G.push(...Tn(n.rules));const V=o==null?void 0:o.rules;if(V&&n.prop){const Z=Ml(V,n.prop).value;Z&&G.push(...Tn(Z))}if(Y!==void 0){const Z=G.map((oe,ce)=>[oe,ce]).filter(([oe])=>"required"in oe);if(Z.length>0)for(const[oe,ce]of Z)oe.required!==Y&&(G[ce]={...oe,required:Y});else G.push({required:Y})}return G}),D=S(()=>P.value.length>0),W=Y=>P.value.filter(G=>!G.trigger||!Y?!0:be(G.trigger)?G.trigger.includes(Y):G.trigger===Y).map(({trigger:G,...V})=>V),U=S(()=>P.value.some(Y=>Y.required)),F=S(()=>f.value==="error"&&n.showMessage&&((o==null?void 0:o.showMessage)??!0)),R=S(()=>`${n.label||""}${(o==null?void 0:o.labelSuffix)||""}`),I=Y=>{d.value=Y},L=Y=>{var Z;const{errors:G,fields:V}=Y;(!G||!V)&&console.error(Y),I("error"),p.value=G?((Z=G==null?void 0:G[0])==null?void 0:Z.message)??`${n.prop} is required`:"",o==null||o.emit("validate",n.prop,!1,p.value)},z=()=>{I("success"),o==null||o.emit("validate",n.prop,!0,"")},H=async Y=>{const G=E.value;return new bu({[G]:Y}).validate({[G]:_.value},{firstFields:!0}).then(()=>(z(),!0)).catch(V=>(L(V),Promise.reject(V)))},K=async(Y,G)=>{if(h||!n.prop)return!1;const V=ze(G);if(!D.value)return G==null||G(!1),!1;const Z=W(Y);return Z.length===0?(G==null||G(!0),!0):(I("validating"),H(Z).then(()=>(G==null||G(!0),!0)).catch(oe=>{const{fields:ce}=oe;return G==null||G(!1,ce),V?!1:Promise.reject(ce)}))},q=()=>{I(""),p.value="",h=!1},Q=async()=>{const Y=o==null?void 0:o.model;if(!Y||!n.prop)return;const G=Ml(Y,n.prop);h=!0,G.value=mo(v),await Ae(),q(),h=!1},ee=Y=>{c.value.includes(Y)||c.value.push(Y)},ue=Y=>{c.value=c.value.filter(G=>G!==Y)},te=Y=>{v=mo(Y)},de=()=>v;fe(()=>n.error,Y=>{p.value=Y||"",I(Y?"error":"")},{immediate:!0}),fe(()=>n.validateStatus,Y=>I(Y||""));const se=Rt({...Nn(n),$el:g,size:s,validateMessage:p,validateState:d,labelId:u,inputIds:c,isGroup:N,hasLabel:T,fieldValue:_,addInputId:ee,removeInputId:ue,resetField:Q,clearValidate:q,validate:K,propString:E,setInitialValue:te,getInitialValue:de});return bt(No,se),fe(E,(Y,G)=>{!o||!G||(o.removeField(se,G),Y&&(te(_.value),o.addField(se)))}),mt(()=>{n.prop&&(te(_.value),o==null||o.addField(se))}),Pt(()=>{o==null||o.removeField(se)}),t({size:s,validateMessage:p,validateState:d,validate:K,clearValidate:q,resetField:Q,setInitialValue:te}),(Y,G)=>{var V;return x(),B("div",{ref_key:"formItemRef",ref:g,class:M(w.value),role:N.value?"group":void 0,"aria-labelledby":N.value?i(u):void 0},[J(i(KA),{"is-auto-width":y.value.width==="auto","update-all":((V=i(o))==null?void 0:V.labelWidth)==="auto"},{default:ne(()=>[e.label||Y.$slots.label?(x(),re(ct($.value?"label":"div"),{key:0,id:i(u),for:$.value,class:M(i(r).e("label")),style:je(y.value)},{default:ne(()=>[ae(Y.$slots,"label",{label:R.value},()=>[St(ke(R.value),1)])]),_:3},8,["id","for","class","style"])):le("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),j("div",{class:M(i(r).e("content")),style:je(b.value)},[ae(Y.$slots,"default"),J(Z1,{name:`${i(r).namespace.value}-zoom-in-top`},{default:ne(()=>[F.value?ae(Y.$slots,"error",{key:0,error:p.value},()=>[j("div",{class:M(k.value)},ke(p.value),3)]):le("v-if",!0)]),_:3},8,["name"])],6)],10,S8)}}}),hS=k8;const E8=rt(HA,{FormItem:hS}),x8=Qt(hS),Ef="focus-trap.focus-after-trapped",xf="focus-trap.focus-after-released",T8="focus-trap.focusout-prevented",zy={cancelable:!0,bubbles:!1},$8={cancelable:!0,bubbles:!1},Hy="focusAfterTrapped",Ky="focusAfterReleased",mS=Symbol("elFocusTrap"),Oh=A(),Vd=A(0),Nh=A(0);let Bu=0;const gS=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0||a===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},Wy=(e,t)=>{for(const n of e)if(!O8(n,t))return n},O8=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},N8=e=>{const t=gS(e);return[Wy(t,e),Wy(t.reverse(),e)]},M8=e=>e instanceof HTMLInputElement&&"select"in e,Cl=(e,t)=>{if(e){const n=document.activeElement;iu(e,{preventScroll:!0}),Nh.value=window.performance.now(),e!==n&&M8(e)&&t&&e.select()}};function jy(e,t){const n=[...e],a=e.indexOf(t);return a!==-1&&n.splice(a,1),n}const R8=()=>{let e=[];return{push:a=>{const o=e[0];o&&a!==o&&o.pause(),e=jy(e,a),e.unshift(a)},remove:a=>{var o,l;e=jy(e,a),(l=(o=e[0])==null?void 0:o.resume)==null||l.call(o)}}},I8=(e,t=!1)=>{const n=document.activeElement;for(const a of e)if(Cl(a,t),document.activeElement!==n)return},Uy=R8(),_8=()=>Vd.value>Nh.value,Fu=()=>{Oh.value="pointer",Vd.value=window.performance.now()},Yy=()=>{Oh.value="keyboard",Vd.value=window.performance.now()},P8=()=>(mt(()=>{Bu===0&&(document.addEventListener("mousedown",Fu),document.addEventListener("touchstart",Fu),document.addEventListener("keydown",Yy)),Bu++}),Pt(()=>{Bu--,Bu<=0&&(document.removeEventListener("mousedown",Fu),document.removeEventListener("touchstart",Fu),document.removeEventListener("keydown",Yy))}),{focusReason:Oh,lastUserFocusTimestamp:Vd,lastAutomatedFocusTimestamp:Nh}),zu=e=>new CustomEvent(T8,{...$8,detail:e});var A8=ie({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Hy,Ky,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=A();let a,o;const{focusReason:l}=P8();jI(v=>{e.trapped&&!s.paused&&t("release-requested",v)});const s={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},r=v=>{if(!e.loop&&!e.trapped||s.paused)return;const{altKey:h,ctrlKey:m,metaKey:y,currentTarget:b,shiftKey:w}=v,{loop:C}=e,k=zt(v)===Ce.tab&&!h&&!m&&!y,E=document.activeElement;if(k&&E){const T=b,[$,N]=N8(T);if($&&N){if(!w&&E===N){const O=zu({focusReason:l.value});t("focusout-prevented",O),O.defaultPrevented||(v.preventDefault(),C&&Cl($,!0))}else if(w&&[$,T].includes(E)){const O=zu({focusReason:l.value});t("focusout-prevented",O),O.defaultPrevented||(v.preventDefault(),C&&Cl(N,!0))}}else if(E===T){const O=zu({focusReason:l.value});t("focusout-prevented",O),O.defaultPrevented||v.preventDefault()}}};bt(mS,{focusTrapRef:n,onKeydown:r}),fe(()=>e.focusTrapEl,v=>{v&&(n.value=v)},{immediate:!0}),fe([n],([v],[h])=>{v&&(v.addEventListener("keydown",r),v.addEventListener("focusin",d),v.addEventListener("focusout",f)),h&&(h.removeEventListener("keydown",r),h.removeEventListener("focusin",d),h.removeEventListener("focusout",f))});const u=v=>{t(Hy,v)},c=v=>t(Ky,v),d=v=>{const h=i(n);if(!h)return;const m=v.target,y=v.relatedTarget,b=m&&h.contains(m);e.trapped||y&&h.contains(y)||(a=y),b&&t("focusin",v),!s.paused&&e.trapped&&(b?o=m:Cl(o,!0))},f=v=>{const h=i(n);if(!(s.paused||!h))if(e.trapped){const m=v.relatedTarget;!hn(m)&&!h.contains(m)&&setTimeout(()=>{if(!s.paused&&e.trapped){const y=zu({focusReason:l.value});t("focusout-prevented",y),y.defaultPrevented||Cl(o,!0)}},0)}else{const m=v.target;m&&h.contains(m)||t("focusout",v)}};async function p(){await Ae();const v=i(n);if(v){Uy.push(s);const h=v.contains(document.activeElement)?a:document.activeElement;if(a=h,!v.contains(h)){const m=new Event(Ef,zy);v.addEventListener(Ef,u),v.dispatchEvent(m),m.defaultPrevented||Ae(()=>{let y=e.focusStartEl;De(y)||(Cl(y),document.activeElement!==y&&(y="first")),y==="first"&&I8(gS(v),!0),(document.activeElement===h||y==="container")&&Cl(v)})}}}function g(){const v=i(n);if(v){v.removeEventListener(Ef,u);const h=new CustomEvent(xf,{...zy,detail:{focusReason:l.value}});v.addEventListener(xf,c),v.dispatchEvent(h),!h.defaultPrevented&&(l.value=="keyboard"||!_8()||v.contains(document.activeElement))&&Cl(a??document.body),v.removeEventListener(xf,c),Uy.remove(s),a=null,o=null}}return mt(()=>{e.trapped&&p(),fe(()=>e.trapped,v=>{v?p():g()})}),Pt(()=>{e.trapped&&g(),n.value&&(n.value.removeEventListener("keydown",r),n.value.removeEventListener("focusin",d),n.value.removeEventListener("focusout",f),n.value=void 0),a=null,o=null}),{onKeydown:r}}}),kn=(e,t)=>{const n=e.__vccOpts||e;for(const[a,o]of t)n[a]=o;return n};function L8(e,t,n,a,o,l){return ae(e.$slots,"default",{handleKeydown:e.onKeydown})}var D8=kn(A8,[["render",L8]]),Pr=D8;const V8=(e,t=[])=>{const{placement:n,strategy:a,popperOptions:o}=e,l={placement:n,strategy:a,...o,modifiers:[...F8(e),...t]};return z8(l,o==null?void 0:o.modifiers),l},B8=e=>{if(Mt)return Cn(e)};function F8(e){const{offset:t,gpuAcceleration:n,fallbackPlacements:a}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:0,bottom:0,left:0,right:0}}},{name:"flip",options:{padding:5,fallbackPlacements:a}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function z8(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const H8=0,K8=e=>{const{popperInstanceRef:t,contentRef:n,triggerRef:a,role:o}=_e($h,void 0),l=A(),s=S(()=>e.arrowOffset),r=S(()=>({name:"eventListeners",enabled:!!e.visible})),u=S(()=>{const b=i(l),w=i(s)??H8;return{name:"arrow",enabled:!YR(b),options:{element:b,padding:w}}}),c=S(()=>({onFirstUpdate:()=>{v()},...V8(e,[i(u),i(r)])})),d=S(()=>B8(e.referenceEl)||i(a)),{attributes:f,state:p,styles:g,update:v,forceUpdate:h,instanceRef:m}=zI(d,n,c);fe(m,b=>t.value=b,{flush:"sync"}),mt(()=>{fe(()=>{var b,w;return(w=(b=i(d))==null?void 0:b.getBoundingClientRect)==null?void 0:w.call(b)},()=>{v()})});let y;return fe(()=>e.visible,b=>{y==null||y(),y=void 0,b&&(y=Xt(n,v).stop)}),Pt(()=>{t.value=void 0,y==null||y(),y=void 0}),{attributes:f,arrowRef:l,contentRef:n,instanceRef:m,state:p,styles:g,role:o,forceUpdate:h,update:v}},W8=(e,{attributes:t,styles:n,role:a})=>{const{nextZIndex:o}=fu(),l=he("popper"),s=S(()=>i(t).popper),r=A(Fe(e.zIndex)?e.zIndex:o()),u=S(()=>[l.b(),l.is("pure",e.pure),l.is(e.effect),e.popperClass]),c=S(()=>[{zIndex:i(r)},i(n).popper,e.popperStyle||{}]),d=S(()=>a.value==="dialog"?"false":void 0),f=S(()=>i(n).arrow||{});return{ariaModal:d,arrowStyle:f,contentAttrs:s,contentClass:u,contentStyle:c,contentZIndex:r,updateZIndex:()=>{r.value=Fe(e.zIndex)?e.zIndex:o()}}},j8=(e,t)=>{const n=A(!1),a=A(),o=()=>{t("focus")},l=c=>{var d;((d=c.detail)==null?void 0:d.focusReason)!=="pointer"&&(a.value="first",t("blur"))},s=c=>{e.visible&&!n.value&&(c.target&&(a.value=c.target),n.value=!0)},r=c=>{e.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),n.value=!1)},u=()=>{n.value=!1,t("close")};return Pt(()=>{a.value=void 0}),{focusStartRef:a,trapped:n,onFocusAfterReleased:l,onFocusAfterTrapped:o,onFocusInTrap:s,onFocusoutPrevented:r,onReleaseRequested:u}};var U8=ie({name:"ElPopperContent",__name:"content",props:pS,emits:_A,setup(e,{expose:t,emit:n}){const a=n,o=e,{focusStartRef:l,trapped:s,onFocusAfterReleased:r,onFocusAfterTrapped:u,onFocusInTrap:c,onFocusoutPrevented:d,onReleaseRequested:f}=j8(o,a),{attributes:p,arrowRef:g,contentRef:v,styles:h,instanceRef:m,role:y,update:b}=K8(o),{ariaModal:w,arrowStyle:C,contentAttrs:k,contentClass:E,contentStyle:T,updateZIndex:$}=W8(o,{styles:h,attributes:p,role:y}),N=_e(No,void 0);bt(iS,{arrowStyle:C,arrowRef:g}),N&&bt(No,{...N,addInputId:_t,removeInputId:_t});let O;const _=(D=!0)=>{b(),D&&$()},P=()=>{_(!1),o.visible&&o.focusOnShow?s.value=!0:o.visible===!1&&(s.value=!1)};return mt(()=>{fe(()=>o.triggerTargetEl,(D,W)=>{O==null||O(),O=void 0;const U=i(D||v.value),F=i(W||v.value);fa(U)&&(O=fe([y,()=>o.ariaLabel,w,()=>o.id],R=>{["role","aria-label","aria-modal","id"].forEach((I,L)=>{hn(R[L])?U.removeAttribute(I):U.setAttribute(I,R[L])})},{immediate:!0})),F!==U&&fa(F)&&["role","aria-label","aria-modal","id"].forEach(R=>{F.removeAttribute(R)})},{immediate:!0}),fe(()=>o.visible,P,{immediate:!0})}),Pt(()=>{O==null||O(),O=void 0,v.value=void 0}),t({popperContentRef:v,popperInstanceRef:m,updatePopper:_,contentStyle:T}),(D,W)=>(x(),B("div",pt({ref_key:"contentRef",ref:v},i(k),{style:i(T),class:i(E),tabindex:"-1",onMouseenter:W[0]||(W[0]=U=>D.$emit("mouseenter",U)),onMouseleave:W[1]||(W[1]=U=>D.$emit("mouseleave",U))}),[J(i(Pr),{loop:e.loop,trapped:i(s),"trap-on-focus-in":!0,"focus-trap-el":i(v),"focus-start-el":i(l),onFocusAfterTrapped:i(u),onFocusAfterReleased:i(r),onFocusin:i(c),onFocusoutPrevented:i(d),onReleaseRequested:i(f)},{default:ne(()=>[ae(D.$slots,"default")]),_:3},8,["loop","trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}}),Y8=U8,q8=ie({name:"ElPopper",inheritAttrs:!1,__name:"popper",props:rS,setup(e,{expose:t}){const n=e,a={triggerRef:A(),popperInstanceRef:A(),contentRef:A(),referenceRef:A(),role:S(()=>n.role)};return t(a),bt($h,a),(o,l)=>ae(o.$slots,"default")}}),G8=q8;const yS=rt(G8),Bt=Se({...qI,...pS,appendTo:{type:uu.to.type},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:X(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...Qn(["ariaLabel"])}),ko=Se({...uS,disabled:Boolean,trigger:{type:X([String,Array]),default:"hover"},triggerKeys:{type:X(Array),default:()=>[Ce.enter,Ce.numpadEnter,Ce.space]},focusOnTarget:Boolean}),{useModelToggleProps:X8,useModelToggleEmits:Z8,useModelToggle:J8}=V3("visible"),Q8=Se({...rS,...X8,...Bt,...ko,...fS,showArrow:{type:Boolean,default:!0}}),eL=[...Z8,"before-show","before-hide","show","hide","open","close"],Mh=Symbol("elTooltip"),Lp=(e,t)=>be(e)?e.includes(t):e===t,Vs=(e,t,n)=>a=>{Lp(i(e),t)&&n(a)};var tL=ie({name:"ElTooltipTrigger",__name:"trigger",props:ko,setup(e,{expose:t}){const n=e,a=he("tooltip"),{controlled:o,id:l,open:s,onOpen:r,onClose:u,onToggle:c}=_e(Mh,void 0),d=A(null),f=()=>{if(i(o)||n.disabled)return!0},p=Lt(n,"trigger"),g=xn(f,Vs(p,"hover",C=>{r(C),n.focusOnTarget&&C.target&&Ae(()=>{iu(C.target,{preventScroll:!0})})})),v=xn(f,Vs(p,"hover",u)),h=xn(f,Vs(p,"click",C=>{C.button===0&&c(C)})),m=xn(f,Vs(p,"focus",r)),y=xn(f,Vs(p,"focus",u)),b=xn(f,Vs(p,"contextmenu",C=>{C.preventDefault(),c(C)})),w=xn(f,C=>{const k=zt(C);n.triggerKeys.includes(k)&&(C.preventDefault(),c(C))});return t({triggerRef:d}),(C,k)=>(x(),re(i(MA),{id:i(l),"virtual-ref":e.virtualRef,open:i(s),"virtual-triggering":e.virtualTriggering,class:M(i(a).e("trigger")),onBlur:i(y),onClick:i(h),onContextmenu:i(b),onFocus:i(m),onMouseenter:i(g),onMouseleave:i(v),onKeydown:i(w)},{default:ne(()=>[ae(C.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}}),nL=tL,aL=ie({name:"ElTooltipContent",inheritAttrs:!1,__name:"content",props:Bt,setup(e,{expose:t}){const n=e,{selector:a}=_C(),o=he("tooltip"),l=A(),s=rw(()=>{var I;return(I=l.value)==null?void 0:I.popperContentRef});let r;const{controlled:u,id:c,open:d,trigger:f,onClose:p,onOpen:g,onShow:v,onHide:h,onBeforeShow:m,onBeforeHide:y}=_e(Mh,void 0),b=S(()=>n.transition||`${o.namespace.value}-fade-in-linear`),w=S(()=>n.persistent);Pt(()=>{r==null||r()});const C=S(()=>i(w)?!0:i(d)),k=S(()=>n.disabled?!1:i(d)),E=S(()=>n.appendTo||a.value),T=S(()=>n.style??{}),$=A(!0),N=()=>{h(),R()&&iu(document.body,{preventScroll:!0}),$.value=!0},O=()=>{if(i(u))return!0},_=xn(O,()=>{n.enterable&&Lp(i(f),"hover")&&g()}),P=xn(O,()=>{Lp(i(f),"hover")&&p()}),D=()=>{var I,L;(L=(I=l.value)==null?void 0:I.updatePopper)==null||L.call(I),m==null||m()},W=()=>{y==null||y()},U=()=>{v()},F=()=>{n.virtualTriggering||p()},R=I=>{var H;const L=(H=l.value)==null?void 0:H.popperContentRef,z=(I==null?void 0:I.relatedTarget)||document.activeElement;return L==null?void 0:L.contains(z)};return fe(()=>i(d),I=>{I?($.value=!1,r=zv(s,()=>{i(u)||Xn(i(f)).every(L=>L!=="hover"&&L!=="focus")&&p()},{detectIframe:!0})):r==null||r()},{flush:"post"}),t({contentRef:l,isFocusInsideContent:R}),(I,L)=>(x(),re(i(_r),{disabled:!e.teleported,to:E.value},{default:ne(()=>[C.value||!$.value?(x(),re(Bn,{key:0,name:b.value,appear:!w.value,onAfterLeave:N,onBeforeEnter:D,onAfterEnter:U,onBeforeLeave:W,persisted:""},{default:ne(()=>[dt(J(i(Y8),pt({id:i(c),ref_key:"contentRef",ref:l},I.$attrs,{"aria-label":e.ariaLabel,"aria-hidden":$.value,"boundaries-padding":e.boundariesPadding,"fallback-placements":e.fallbackPlacements,"gpu-acceleration":e.gpuAcceleration,offset:e.offset,placement:e.placement,"popper-options":e.popperOptions,"arrow-offset":e.arrowOffset,strategy:e.strategy,effect:e.effect,enterable:e.enterable,pure:e.pure,"popper-class":e.popperClass,"popper-style":[e.popperStyle,T.value],"reference-el":e.referenceEl,"trigger-target-el":e.triggerTargetEl,visible:k.value,"z-index":e.zIndex,loop:e.loop,onMouseenter:i(_),onMouseleave:i(P),onBlur:F,onClose:i(p)}),{default:ne(()=>[ae(I.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","arrow-offset","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","loop","onMouseenter","onMouseleave","onClose"]),[[Nt,k.value]])]),_:3},8,["name","appear"])):le("v-if",!0)]),_:3},8,["disabled","to"]))}}),oL=aL;const lL=["innerHTML"],sL={key:1};var rL=ie({name:"ElTooltip",__name:"tooltip",props:Q8,emits:eL,setup(e,{expose:t,emit:n}){const a=e,o=n;YI();const l=he("tooltip"),s=Fn(),r=A(),u=A(),c=()=>{var k;const C=i(r);C&&((k=C.popperInstanceRef)==null||k.update())},d=A(!1),f=A(),{show:p,hide:g,hasUpdateHandler:v}=J8({indicator:d,toggleReason:f}),{onOpen:h,onClose:m}=GI({showAfter:Lt(a,"showAfter"),hideAfter:Lt(a,"hideAfter"),autoClose:Lt(a,"autoClose"),open:p,close:g}),y=S(()=>Vt(a.visible)&&!v.value),b=S(()=>[l.b(),a.popperClass]);bt(Mh,{controlled:y,id:s,open:ms(d),trigger:Lt(a,"trigger"),onOpen:h,onClose:m,onToggle:C=>{i(d)?m(C):h(C)},onShow:()=>{o("show",f.value)},onHide:()=>{o("hide",f.value)},onBeforeShow:()=>{o("before-show",f.value)},onBeforeHide:()=>{o("before-hide",f.value)},updatePopper:c}),fe(()=>a.disabled,C=>{C&&d.value&&(d.value=!1),!C&&Vt(a.visible)&&(d.value=a.visible)});const w=C=>{var k;return(k=u.value)==null?void 0:k.isFocusInsideContent(C)};return Rv(()=>d.value&&g()),Pt(()=>{f.value=void 0}),t({popperRef:r,contentRef:u,isFocusInsideContent:w,updatePopper:c,onOpen:h,onClose:m,hide:g}),(C,k)=>(x(),re(i(yS),{ref_key:"popperRef",ref:r,role:e.role},{default:ne(()=>[J(nL,{disabled:e.disabled,trigger:e.trigger,"trigger-keys":e.triggerKeys,"virtual-ref":e.virtualRef,"virtual-triggering":e.virtualTriggering,"focus-on-target":e.focusOnTarget},{default:ne(()=>[C.$slots.default?ae(C.$slots,"default",{key:0}):le("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering","focus-on-target"]),J(oL,{ref_key:"contentRef",ref:u,"aria-label":e.ariaLabel,"boundaries-padding":e.boundariesPadding,content:e.content,disabled:e.disabled,effect:e.effect,enterable:e.enterable,"fallback-placements":e.fallbackPlacements,"hide-after":e.hideAfter,"gpu-acceleration":e.gpuAcceleration,offset:e.offset,persistent:e.persistent,"popper-class":b.value,"popper-style":e.popperStyle,placement:e.placement,"popper-options":e.popperOptions,"arrow-offset":e.arrowOffset,pure:e.pure,"raw-content":e.rawContent,"reference-el":e.referenceEl,"trigger-target-el":e.triggerTargetEl,"show-after":e.showAfter,strategy:e.strategy,teleported:e.teleported,transition:e.transition,"virtual-triggering":e.virtualTriggering,"z-index":e.zIndex,"append-to":e.appendTo,loop:e.loop},{default:ne(()=>[ae(C.$slots,"content",{},()=>[e.rawContent?(x(),B("span",{key:0,innerHTML:e.content},null,8,lL)):(x(),B("span",sL,ke(e.content),1))]),e.showArrow?(x(),re(i(OA),{key:0})):le("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","arrow-offset","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to","loop"])]),_:3},8,["role"]))}}),iL=rL;const _n=rt(iL),nn=e=>e,Rh=Se({id:{type:String,default:void 0},size:Sn,disabled:{type:Boolean,default:void 0},modelValue:{type:X([String,Number,Object]),default:""},modelModifiers:{type:X(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:X(String),default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:X([Boolean,Object]),default:!1},autocomplete:{type:X(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:Ft,default:_o},showPassword:Boolean,showWordLimit:Boolean,wordLimitPosition:{type:String,values:["inside","outside"],default:"inside"},suffixIcon:{type:Ft},prefixIcon:{type:Ft},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:X([Object,Array,String]),default:()=>nn({})},countGraphemes:{type:X(Function)},autofocus:Boolean,rows:{type:Number,default:2},...Qn(["ariaLabel"]),inputmode:{type:X(String),default:void 0},name:String}),uL={[at]:e=>De(e),input:e=>De(e),change:(e,t)=>De(e)&&(t instanceof Event||t===void 0),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:e=>e===void 0||e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent};za(_o);let jn;const cL={height:"0",visibility:"hidden",overflow:gd()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},dL=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],qy=e=>{const t=Number.parseFloat(e);return Number.isNaN(t)?e:t};function fL(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),a=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),o=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:dL.map(l=>[l,t.getPropertyValue(l)]),paddingSize:a,borderSize:o,boxSizing:n}}function Gy(e,t=1,n){var d;if(!jn){jn=document.createElement("textarea");let f=document.body;!gd()&&e.parentNode&&(f=e.parentNode),f.appendChild(jn)}const{paddingSize:a,borderSize:o,boxSizing:l,contextStyle:s}=fL(e);s.forEach(([f,p])=>jn==null?void 0:jn.style.setProperty(f,p)),Object.entries(cL).forEach(([f,p])=>jn==null?void 0:jn.style.setProperty(f,p,"important")),jn.value=e.value||e.placeholder||"";let r=jn.scrollHeight;const u={};l==="border-box"?r=r+o:l==="content-box"&&(r=r-a),jn.value="";const c=jn.scrollHeight-a;if(Fe(t)){let f=c*t;l==="border-box"&&(f=f+a+o),r=Math.max(f,r),u.minHeight=`${f}px`}if(Fe(n)){let f=c*n;l==="border-box"&&(f=f+a+o),r=Math.min(f,r)}return u.height=`${r}px`,(d=jn.parentNode)==null||d.removeChild(jn),jn=void 0,u}const pL=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],vL=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","inputmode"],Xy="ElInput";var hL=ie({name:Xy,inheritAttrs:!1,__name:"input",props:Rh,emits:uL,setup(e,{expose:t,emit:n}){const a=e,o=n,l=rl(),s=fn(),r=S(()=>[a.type==="textarea"?y.b():m.b(),m.m(v.value),m.is("disabled",h.value),m.is("exceed",ee.value),{[m.b("group")]:s.prepend||s.append,[m.m("prefix")]:s.prefix||a.prefixIcon,[m.m("suffix")]:s.suffix||a.suffixIcon||a.clearable||a.showPassword,[m.bm("suffix","password-clear")]:H.value&&K.value,[m.b("hidden")]:a.type==="hidden"},l.class]),u=S(()=>[m.e("wrapper"),m.is("focus",_.value)]),c=$d(),d=S(()=>{var Oe;return(Oe=a.maxlength)==null?void 0:Oe.toString()}),{form:f,formItem:p}=Pn(),{inputId:g}=Ta(a,{formItemContext:p}),v=bn(),h=on(),m=he("input"),y=he("textarea"),b=Wt(),w=Wt(),C=A(!1),k=A(!1),E=A(),T=Wt(a.inputStyle),$=A(""),N=S(()=>b.value||w.value),{wrapperRef:O,isFocused:_,handleFocus:P,handleBlur:D}=dl(N,{disabled:h,afterBlur(){var Oe;a.validateEvent&&((Oe=p==null?void 0:p.validate)==null||Oe.call(p,"blur").catch(qe=>ft(qe)))}}),W=S(()=>(f==null?void 0:f.statusIcon)??!1),U=S(()=>(p==null?void 0:p.validateState)||""),F=S(()=>U.value&&Dd[U.value]),R=S(()=>k.value?pA:IP),I=S(()=>[l.style]),L=S(()=>[a.inputStyle,T.value,{resize:a.resize}]),z=S(()=>hn(a.modelValue)?"":String(a.modelValue)),H=S(()=>a.clearable&&!h.value&&!a.readonly&&!!z.value&&(_.value||C.value)),K=S(()=>a.showPassword&&!h.value&&!!z.value),q=S(()=>a.showWordLimit&&!!d.value&&(a.type==="text"||a.type==="textarea")&&!h.value&&!a.readonly&&!a.showPassword),Q=S(()=>a.countGraphemes&&a.showWordLimit?a.countGraphemes(z.value):z.value.length),ee=S(()=>!!q.value&&Q.value>Number(d.value)),ue=S(()=>!!s.suffix||!!a.suffixIcon||H.value||a.showPassword||q.value||!!U.value&&W.value),te=S(()=>!!Object.keys(a.modelModifiers).length),[de,se]=F_(b);Xt(w,Oe=>{if(V(),!q.value||a.resize!=="both"&&a.resize!=="horizontal")return;const{width:qe}=Oe[0].contentRect;E.value={right:`calc(100% - ${qe+22-10}px)`}});const Y=()=>{const{type:Oe,autosize:qe}=a;if(!(!Mt||Oe!=="textarea"||!w.value))if(qe){const it=ot(qe)?qe.minRows:void 0,We=ot(qe)?qe.maxRows:void 0,et=Gy(w.value,it,We);T.value={overflowY:"hidden",...et},Ae(()=>{w.value.offsetHeight,T.value=et})}else T.value={minHeight:Gy(w.value).minHeight}},V=(Oe=>{let qe=!1;return()=>{var it;qe||!a.autosize||((it=w.value)==null?void 0:it.offsetParent)!==null&&(setTimeout(Oe),qe=!0)}})(Y),Z=()=>{const Oe=N.value,qe=a.formatter?a.formatter(z.value):z.value;!Oe||Oe.value===qe||a.type==="file"||(Oe.value=qe)},oe=Oe=>{const{trim:qe,number:it}=a.modelModifiers;return qe&&(Oe=Oe.trim()),it&&(Oe=`${qy(Oe)}`),a.formatter&&a.parser&&(Oe=a.parser(Oe)),Oe},ce=async Oe=>{if(me.value)return;const{lazy:qe}=a.modelModifiers;let{value:it}=Oe.target,We=!1;if(qe){o(gn,it);return}if(it=oe(it),a.countGraphemes&&d.value!=null){const et=Number(d.value),gt=a.countGraphemes(it),ve=a.countGraphemes($.value);if(gt>et&>>ve)if(ve>et)it=$.value,We=!0;else{const Le=$.value,pe=it;let $e=0;for(;$e$e&&It>$e&&Le[ut-1]===pe[It-1];)ut--,It--;const Yt=pe.slice(0,$e),Ne=Le.slice($e,ut),Ke=pe.slice($e,It),Ze=pe.slice(It),rn=ve-a.countGraphemes(Ne),Dt=Math.max(0,et-rn);let qt="";if(Dt>0)if(typeof Intl<"u"&&"Segmenter"in Intl){const Ue=new Intl.Segmenter(void 0,{granularity:"grapheme"});for(const{segment:Ge}of Ue.segment(Ke)){const ht=qt+Ge;if(a.countGraphemes(ht)>Dt)break;qt=ht}}else for(const Ue of Array.from(Ke)){const Ge=qt+Ue;if(a.countGraphemes(Ge)>Dt)break;qt=Ge}it=Yt+qt+Ze,We=!0}}if(String(it)===z.value){if(a.formatter||We){const et=Oe.target,gt=et.value,ve=et.selectionStart,Le=et.selectionEnd;if(Z(),We&&N.value&&ve!=null&&Le!=null){const pe=N.value.value,$e=gt.slice(Math.max(0,Le));let ut=Math.min(ve,pe.length);$e&&pe.endsWith($e)&&(ut=pe.length-$e.length),N.value.setSelectionRange(ut,ut)}}return}$.value=it,de(),o(at,it),o(gn,it),await Ae(),(a.formatter&&a.parser||!te.value)&&Z(),se()},ge=async Oe=>{let{value:qe}=Oe.target;qe=oe(qe),a.modelModifiers.lazy&&o(at,qe),o(yt,qe,Oe),await Ae(),Z()},{isComposing:me,handleCompositionStart:Me,handleCompositionUpdate:Ie,handleCompositionEnd:Re}=mu({emit:o,afterComposition:ce}),ye=()=>{k.value=!k.value},Te=()=>{var Oe;return(Oe=N.value)==null?void 0:Oe.focus()},we=()=>{var Oe;return(Oe=N.value)==null?void 0:Oe.blur()},Pe=Oe=>{C.value=!1,o("mouseleave",Oe)},Ve=Oe=>{C.value=!0,o("mouseenter",Oe)},Qe=Oe=>{o("keydown",Oe)},tt=()=>{var Oe;(Oe=N.value)==null||Oe.select()},nt=Oe=>{o(at,""),o(yt,""),o("clear",Oe),o(gn,"")};return fe(()=>a.modelValue,()=>{var Oe;Ae(()=>Y()),a.validateEvent&&((Oe=p==null?void 0:p.validate)==null||Oe.call(p,"change").catch(qe=>ft(qe)))}),fe(()=>z.value,Oe=>{$.value=Oe},{immediate:!0}),fe(z,Oe=>{if(!N.value)return;const{trim:qe,number:it}=a.modelModifiers,We=N.value.value,et=(it||a.type==="number")&&!/^0\d/.test(We)?`${qy(We)}`:We;et!==Oe&&(document.activeElement===N.value&&N.value.type!=="range"&&qe&&et.trim()===Oe||Z())}),fe(()=>a.type,async()=>{await Ae(),Z(),Y()}),mt(()=>{!a.formatter&&a.parser&&ft(Xy,"If you set the parser, you also need to set the formatter."),Z(),Ae(Y)}),t({input:b,textarea:w,ref:N,textareaStyle:L,autosize:Lt(a,"autosize"),isComposing:me,passwordVisible:k,focus:Te,blur:we,select:tt,clear:nt,resizeTextarea:Y}),(Oe,qe)=>(x(),B("div",{class:M([r.value,{[i(m).bm("group","append")]:Oe.$slots.append,[i(m).bm("group","prepend")]:Oe.$slots.prepend}]),style:je(I.value),onMouseenter:Ve,onMouseleave:Pe},[le(" input "),e.type!=="textarea"?(x(),B(He,{key:0},[le(" prepend slot "),Oe.$slots.prepend?(x(),B("div",{key:0,class:M(i(m).be("group","prepend"))},[ae(Oe.$slots,"prepend")],2)):le("v-if",!0),j("div",{ref_key:"wrapperRef",ref:O,class:M(u.value)},[le(" prefix slot "),Oe.$slots.prefix||e.prefixIcon?(x(),B("span",{key:0,class:M(i(m).e("prefix"))},[j("span",{class:M(i(m).e("prefix-inner"))},[ae(Oe.$slots,"prefix"),e.prefixIcon?(x(),re(i(Be),{key:0,class:M(i(m).e("icon"))},{default:ne(()=>[(x(),re(ct(e.prefixIcon)))]),_:1},8,["class"])):le("v-if",!0)],2)],2)):le("v-if",!0),j("input",pt({id:i(g),ref_key:"input",ref:b,class:i(m).e("inner")},i(c),{name:e.name,minlength:e.countGraphemes?void 0:e.minlength,maxlength:e.countGraphemes?void 0:d.value,type:e.showPassword?k.value?"text":"password":e.type,disabled:i(h),readonly:e.readonly,autocomplete:e.autocomplete,tabindex:e.tabindex,"aria-label":e.ariaLabel,placeholder:e.placeholder,style:e.inputStyle,form:e.form,autofocus:e.autofocus,role:e.containerRole,inputmode:e.inputmode,onCompositionstart:qe[0]||(qe[0]=(...it)=>i(Me)&&i(Me)(...it)),onCompositionupdate:qe[1]||(qe[1]=(...it)=>i(Ie)&&i(Ie)(...it)),onCompositionend:qe[2]||(qe[2]=(...it)=>i(Re)&&i(Re)(...it)),onInput:ce,onChange:ge,onKeydown:Qe}),null,16,pL),le(" suffix slot "),ue.value?(x(),B("span",{key:1,class:M(i(m).e("suffix"))},[j("span",{class:M(i(m).e("suffix-inner"))},[!H.value||!K.value||!q.value?(x(),B(He,{key:0},[ae(Oe.$slots,"suffix"),e.suffixIcon?(x(),re(i(Be),{key:0,class:M(i(m).e("icon"))},{default:ne(()=>[(x(),re(ct(e.suffixIcon)))]),_:1},8,["class"])):le("v-if",!0)],64)):le("v-if",!0),H.value?(x(),re(i(Be),{key:1,class:M([i(m).e("icon"),i(m).e("clear")]),onMousedown:Xe(i(_t),["prevent"]),onClick:nt},{default:ne(()=>[(x(),re(ct(e.clearIcon)))]),_:1},8,["class","onMousedown"])):le("v-if",!0),K.value?(x(),re(i(Be),{key:2,class:M([i(m).e("icon"),i(m).e("password")]),onClick:ye,onMousedown:Xe(i(_t),["prevent"]),onMouseup:Xe(i(_t),["prevent"])},{default:ne(()=>[ae(Oe.$slots,"password-icon",{visible:k.value},()=>[(x(),re(ct(R.value)))])]),_:3},8,["class","onMousedown","onMouseup"])):le("v-if",!0),q.value?(x(),B("span",{key:3,class:M([i(m).e("count"),i(m).is("outside",e.wordLimitPosition==="outside")])},[j("span",{class:M(i(m).e("count-inner"))},ke(Q.value)+" / "+ke(d.value),3)],2)):le("v-if",!0),U.value&&F.value&&W.value?(x(),re(i(Be),{key:4,class:M([i(m).e("icon"),i(m).e("validateIcon"),i(m).is("loading",U.value==="validating")])},{default:ne(()=>[(x(),re(ct(F.value)))]),_:1},8,["class"])):le("v-if",!0)],2)],2)):le("v-if",!0)],2),le(" append slot "),Oe.$slots.append?(x(),B("div",{key:1,class:M(i(m).be("group","append"))},[ae(Oe.$slots,"append")],2)):le("v-if",!0)],64)):(x(),B(He,{key:1},[le(" textarea "),j("textarea",pt({id:i(g),ref_key:"textarea",ref:w,class:[i(y).e("inner"),i(m).is("focus",i(_)),i(y).is("clearable",e.clearable)]},i(c),{name:e.name,minlength:e.countGraphemes?void 0:e.minlength,maxlength:e.countGraphemes?void 0:d.value,tabindex:e.tabindex,disabled:i(h),readonly:e.readonly,autocomplete:e.autocomplete,style:L.value,"aria-label":e.ariaLabel,placeholder:e.placeholder,form:e.form,autofocus:e.autofocus,rows:e.rows,role:e.containerRole,inputmode:e.inputmode,onCompositionstart:qe[3]||(qe[3]=(...it)=>i(Me)&&i(Me)(...it)),onCompositionupdate:qe[4]||(qe[4]=(...it)=>i(Ie)&&i(Ie)(...it)),onCompositionend:qe[5]||(qe[5]=(...it)=>i(Re)&&i(Re)(...it)),onInput:ce,onFocus:qe[6]||(qe[6]=(...it)=>i(P)&&i(P)(...it)),onBlur:qe[7]||(qe[7]=(...it)=>i(D)&&i(D)(...it)),onChange:ge,onKeydown:Qe}),null,16,vL),H.value?(x(),re(i(Be),{key:0,class:M([i(y).e("icon"),i(y).e("clear")]),onMousedown:Xe(i(_t),["prevent"]),onClick:nt},{default:ne(()=>[(x(),re(ct(e.clearIcon)))]),_:1},8,["class","onMousedown"])):le("v-if",!0),q.value?(x(),B("span",{key:1,style:je(E.value),class:M([i(m).e("count"),i(m).is("outside",e.wordLimitPosition==="outside")])},ke(Q.value)+" / "+ke(d.value),7)):le("v-if",!0)],64))],38))}}),mL=hL;const Dn=rt(mL),gL=Se({...Rh,valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:X(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:X([Function,Array]),default:_t},popperClass:Bt.popperClass,popperStyle:Bt.popperStyle,triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:Boolean,hideLoading:Boolean,teleported:Bt.teleported,appendTo:Bt.appendTo,highlightFirstItem:Boolean,fitInputWidth:Boolean,loopNavigation:{type:Boolean,default:!0}}),yL={[at]:e=>De(e)||Fe(e),[gn]:e=>De(e)||Fe(e),[yt]:e=>De(e)||Fe(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,select:e=>ot(e)},bL=Se({distance:{type:Number,default:0},height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:X([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...Qn(["ariaLabel","ariaOrientation"])}),bS={"end-reached":e=>["left","right","top","bottom"].includes(e),scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(Fe)},Bs=4,wS={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},wL=({move:e,size:t,bar:n})=>({[n.size]:t,transform:`translate${n.axis}(${e}%)`}),CL=Se({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),Ih=Symbol("scrollbarContextKey");function Rl(e,t,n=.03){return e-t>n}const SL=Se({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),kL="Thumb";var EL=ie({__name:"thumb",props:CL,setup(e){const t=e,n=_e(Ih),a=he("scrollbar");n||Jt(kL,"can not inject scrollbar context");const o=A(),l=A(),s=A({}),r=A(!1);let u=!1,c=!1,d=0,f=0,p=Mt?document.onselectstart:null;const g=S(()=>wS[t.vertical?"vertical":"horizontal"]),v=S(()=>wL({size:t.size,move:t.move,bar:g.value})),h=S(()=>o.value[g.value.offset]**2/n.wrapElement[g.value.scrollSize]/t.ratio/l.value[g.value.offset]),m=$=>{var O;if($.stopPropagation(),$.ctrlKey||[1,2].includes($.button))return;(O=window.getSelection())==null||O.removeAllRanges(),b($);const N=$.currentTarget;N&&(s.value[g.value.axis]=N[g.value.offset]-($[g.value.client]-N.getBoundingClientRect()[g.value.direction]))},y=$=>{if(!l.value||!o.value||!n.wrapElement)return;const N=(Math.abs($.target.getBoundingClientRect()[g.value.direction]-$[g.value.client])-l.value[g.value.offset]/2)*100*h.value/o.value[g.value.offset];n.wrapElement[g.value.scroll]=N*n.wrapElement[g.value.scrollSize]/100},b=$=>{$.stopImmediatePropagation(),u=!0,d=n.wrapElement.scrollHeight,f=n.wrapElement.scrollWidth,document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),p=document.onselectstart,document.onselectstart=()=>!1},w=$=>{if(!o.value||!l.value||u===!1)return;const N=s.value[g.value.axis];if(!N)return;const O=((o.value.getBoundingClientRect()[g.value.direction]-$[g.value.client])*-1-(l.value[g.value.offset]-N))*100*h.value/o.value[g.value.offset];g.value.scroll==="scrollLeft"?n.wrapElement[g.value.scroll]=O*f/100:n.wrapElement[g.value.scroll]=O*d/100},C=()=>{u=!1,s.value[g.value.axis]=0,document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C),T(),c&&(r.value=!1)},k=()=>{c=!1,r.value=!!t.size},E=()=>{c=!0,r.value=u};Pt(()=>{T(),document.removeEventListener("mouseup",C)});const T=()=>{document.onselectstart!==p&&(document.onselectstart=p)};return At(Lt(n,"scrollbarElement"),"mousemove",k),At(Lt(n,"scrollbarElement"),"mouseleave",E),($,N)=>(x(),re(Bn,{name:i(a).b("fade"),persisted:""},{default:ne(()=>[dt(j("div",{ref_key:"instance",ref:o,class:M([i(a).e("bar"),i(a).is(g.value.key)]),onMousedown:y,onClick:N[0]||(N[0]=Xe(()=>{},["stop"]))},[j("div",{ref_key:"thumb",ref:l,class:M(i(a).e("thumb")),style:je(v.value),onMousedown:m},null,38)],34),[[Nt,e.always||r.value]])]),_:1},8,["name"]))}}),Zy=EL,xL=ie({__name:"bar",props:SL,setup(e,{expose:t}){const n=e,a=_e(Ih),o=A(0),l=A(0),s=A(""),r=A(""),u=A(1),c=A(1);return t({handleScroll:p=>{if(p){const g=p.offsetHeight-Bs,v=p.offsetWidth-Bs;l.value=p.scrollTop*100/g*u.value,o.value=p.scrollLeft*100/v*c.value}},update:()=>{const p=a==null?void 0:a.wrapElement;if(!p)return;const g=p.offsetHeight-Bs,v=p.offsetWidth-Bs,h=g**2/p.scrollHeight,m=v**2/p.scrollWidth,y=Math.max(h,n.minSize),b=Math.max(m,n.minSize);u.value=h/(g-h)/(y/(g-y)),c.value=m/(v-m)/(b/(v-b)),r.value=y+Bs(x(),B(He,null,[J(Zy,{move:o.value,ratio:c.value,size:s.value,always:e.always},null,8,["move","ratio","size","always"]),J(Zy,{move:l.value,ratio:u.value,size:r.value,vertical:"",always:e.always},null,8,["move","ratio","size","always"])],64))}}),TL=xL;const $L=["tabindex"],Tf="ElScrollbar";var OL=ie({name:Tf,__name:"scrollbar",props:bL,emits:bS,setup(e,{expose:t,emit:n}){const a=e,o=n,l=he("scrollbar");let s,r,u,c=0,d=0,f="";const p={bottom:!1,top:!1,right:!1,left:!1},g=A(),v=A(),h=A(),m=A(),y=S(()=>{const P={},D=an(a.height),W=an(a.maxHeight);return D&&(P.height=D),W&&(P.maxHeight=W),[a.wrapStyle,P]}),b=S(()=>[a.wrapClass,l.e("wrap"),{[l.em("wrap","hidden-default")]:!a.native}]),w=S(()=>[l.e("view"),a.viewClass]),C=P=>p[P]??!1,k={top:"bottom",bottom:"top",left:"right",right:"left"},E=P=>{const D=k[f];if(!D)return;const W=P[f],U=P[D];W&&!p[f]&&(p[f]=!0),!U&&p[D]&&(p[D]=!1)},T=()=>{var P;if(v.value){(P=m.value)==null||P.handleScroll(v.value);const D=c,W=d;c=v.value.scrollTop,d=v.value.scrollLeft;const U={bottom:!Rl(v.value.scrollHeight-a.distance,v.value.clientHeight+c),top:c<=a.distance&&D!==0,right:!Rl(v.value.scrollWidth-a.distance,v.value.clientWidth+d)&&W!==d,left:d<=a.distance&&W!==0};if(o("scroll",{scrollTop:c,scrollLeft:d}),D!==c&&(f=c>D?"bottom":"top"),W!==d&&(f=d>W?"right":"left"),a.distance>0){if(C(f))return;E(U)}U[f]&&o("end-reached",f)}};function $(P,D){ot(P)?v.value.scrollTo(P):Fe(P)&&Fe(D)&&v.value.scrollTo(P,D)}const N=P=>{if(!Fe(P)){ft(Tf,"value must be a number");return}v.value.scrollTop=P},O=P=>{if(!Fe(P)){ft(Tf,"value must be a number");return}v.value.scrollLeft=P},_=()=>{var P,D;(P=m.value)==null||P.update(),p[f]=!1,v.value&&((D=m.value)==null||D.handleScroll(v.value))};return fe(()=>a.noresize,P=>{P?(s==null||s(),r==null||r(),u==null||u()):({stop:s}=Xt(h,_),{stop:r}=Xt(v,_),u=At("resize",_))},{immediate:!0}),fe(()=>[a.maxHeight,a.height],()=>{a.native||Ae(()=>{_()})}),bt(Ih,Rt({scrollbarElement:g,wrapElement:v})),Ji(()=>{v.value&&(v.value.scrollTop=c,v.value.scrollLeft=d)}),mt(()=>{a.native||Ae(()=>{_()})}),Qa(()=>_()),t({wrapRef:v,update:_,scrollTo:$,setScrollTop:N,setScrollLeft:O,handleScroll:T}),(P,D)=>(x(),B("div",{ref_key:"scrollbarRef",ref:g,class:M(i(l).b())},[j("div",{ref_key:"wrapRef",ref:v,class:M(b.value),style:je(y.value),tabindex:e.tabindex,onScroll:T},[(x(),re(ct(e.tag),{id:e.id,ref_key:"resizeRef",ref:h,class:M(w.value),style:je(e.viewStyle),role:e.role,"aria-label":e.ariaLabel,"aria-orientation":e.ariaOrientation},{default:ne(()=>[ae(P.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,$L),e.native?le("v-if",!0):(x(),re(TL,{key:0,ref_key:"barRef",ref:m,always:e.always,"min-size":e.minSize},null,8,["always","min-size"]))],2))}}),NL=OL;const Ga=rt(NL),ML=["aria-expanded","aria-owns"],RL={key:0},IL=["id","aria-selected","onClick"],Jy="ElAutocomplete";var _L=ie({name:Jy,inheritAttrs:!1,__name:"autocomplete",props:gL,emits:yL,setup(e,{expose:t,emit:n}){const a=e,o=n,l=S(()=>{const Y=Dn.props??[];return el(a,be(Y)?Y:Object.keys(Y))}),s=rl(),r=on(),u=he("autocomplete"),c=A(),d=A(),f=A(),p=A();let g=!1,v=!1;const h=A([]),m=A(-1),y=A(""),b=A(!1),w=A(!1),C=A(!1),k=Fn(),E=S(()=>s.style),T=S(()=>(h.value.length>0||C.value)&&b.value),$=S(()=>!a.hideLoading&&C.value),N=S(()=>c.value?Array.from(c.value.$el.querySelectorAll("input")):[]),O=()=>{T.value&&(y.value=`${c.value.$el.offsetWidth}px`)},_=()=>{m.value=-1},P=async Y=>{if(w.value)return;const G=V=>{C.value=!1,!w.value&&(be(V)?(h.value=V,m.value=a.highlightFirstItem?0:-1):Jt(Jy,"autocomplete suggestions must be an array"))};if(C.value=!0,be(a.fetchSuggestions))G(a.fetchSuggestions);else{const V=await a.fetchSuggestions(Y,G);be(V)&&G(V)}},D=eu(P,S(()=>a.debounce)),W=Y=>{const G=!!Y;if(o(gn,Y),o(at,Y),w.value=!1,b.value||(b.value=G),!a.triggerOnFocus&&!Y){w.value=!0,h.value=[];return}D(Y)},U=Y=>{var G;r.value||(((G=Y.target)==null?void 0:G.tagName)!=="INPUT"||N.value.includes(document.activeElement))&&(b.value=!0)},F=Y=>{o(yt,Y)},R=Y=>{if(v)v=!1;else{b.value=!0,o("focus",Y);const G=a.modelValue??"";a.triggerOnFocus&&!g&&D(String(G))}},I=Y=>{setTimeout(()=>{var G;if((G=f.value)!=null&&G.isFocusInsideContent()){v=!0;return}b.value&&K(),o("blur",Y)})},L=()=>{b.value=!1,o(at,""),o("clear")},z=async()=>{var Y;(Y=c.value)!=null&&Y.isComposing||(T.value&&m.value>=0&&m.value{T.value&&(Y.preventDefault(),Y.stopPropagation(),K())},K=()=>{b.value=!1},q=()=>{var Y;(Y=c.value)==null||Y.focus()},Q=()=>{var Y;(Y=c.value)==null||Y.blur()},ee=async Y=>{o(gn,Y[a.valueKey]),o(at,Y[a.valueKey]),o("select",Y),h.value=[],m.value=-1},ue=Y=>{var me,Me;if(!T.value||C.value)return;if(Y<0){if(!a.loopNavigation){m.value=-1;return}Y=h.value.length-1}Y>=h.value.length&&(Y=a.loopNavigation?0:h.value.length-1);const[G,V]=te(),Z=V[Y],oe=G.scrollTop,{offsetTop:ce,scrollHeight:ge}=Z;ce+ge>oe+G.clientHeight&&(G.scrollTop=ce+ge-G.clientHeight),ce{const Y=d.value.querySelector(`.${u.be("suggestion","wrap")}`);return[Y,Y.querySelectorAll(`.${u.be("suggestion","list")} li`)]},de=zv(p,Y=>{var V;if((V=f.value)!=null&&V.isFocusInsideContent())return;const G=v;v=!1,T.value&&(G?I(new FocusEvent("blur",Y)):K())}),se=Y=>{switch(zt(Y)){case Ce.up:Y.preventDefault(),ue(m.value-1);break;case Ce.down:Y.preventDefault(),ue(m.value+1);break;case Ce.enter:case Ce.numpadEnter:Y.preventDefault(),z();break;case Ce.tab:K();break;case Ce.esc:H(Y);break;case Ce.home:Y.preventDefault(),ue(0);break;case Ce.end:Y.preventDefault(),ue(h.value.length-1);break;case Ce.pageUp:Y.preventDefault(),ue(Math.max(0,m.value-10));break;case Ce.pageDown:Y.preventDefault(),ue(Math.min(h.value.length-1,m.value+10));break}};return Pt(()=>{de==null||de()}),mt(()=>{var G;const Y=(G=c.value)==null?void 0:G.ref;Y&&([{key:"role",value:"textbox"},{key:"aria-autocomplete",value:"list"},{key:"aria-controls",value:k.value},{key:"aria-activedescendant",value:`${k.value}-item-${m.value}`}].forEach(({key:V,value:Z})=>Y.setAttribute(V,Z)),g=Y.hasAttribute("readonly"))}),t({highlightedIndex:m,activated:b,loading:C,inputRef:c,popperRef:f,suggestions:h,handleSelect:ee,handleKeyEnter:z,focus:q,blur:Q,close:K,highlight:ue,getData:P}),(Y,G)=>(x(),re(i(_n),{ref_key:"popperRef",ref:f,visible:T.value,placement:e.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[i(u).e("popper"),e.popperClass],"popper-style":e.popperStyle,teleported:e.teleported,"append-to":e.appendTo,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${i(u).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:O,onHide:_},{content:ne(()=>[j("div",{ref_key:"regionRef",ref:d,class:M([i(u).b("suggestion"),i(u).is("loading",$.value)]),style:je({[e.fitInputWidth?"width":"minWidth"]:y.value,outline:"none"}),role:"region"},[Y.$slots.header?(x(),B("div",{key:0,class:M(i(u).be("suggestion","header")),onClick:G[0]||(G[0]=Xe(()=>{},["stop"]))},[ae(Y.$slots,"header")],2)):le("v-if",!0),J(i(Ga),{id:i(k),tag:"ul","wrap-class":i(u).be("suggestion","wrap"),"view-class":i(u).be("suggestion","list"),role:"listbox"},{default:ne(()=>[$.value?(x(),B("li",RL,[ae(Y.$slots,"loading",{},()=>[J(i(Be),{class:M(i(u).is("loading"))},{default:ne(()=>[J(i(Oo))]),_:1},8,["class"])])])):(x(!0),B(He,{key:1},Ct(h.value,(V,Z)=>(x(),B("li",{id:`${i(k)}-item-${Z}`,key:Z,class:M({highlighted:m.value===Z}),role:"option","aria-selected":m.value===Z,onClick:oe=>ee(V)},[ae(Y.$slots,"default",{item:V},()=>[St(ke(V[e.valueKey]),1)])],10,IL))),128))]),_:3},8,["id","wrap-class","view-class"]),Y.$slots.footer?(x(),B("div",{key:1,class:M(i(u).be("suggestion","footer")),onClick:G[1]||(G[1]=Xe(()=>{},["stop"]))},[ae(Y.$slots,"footer")],2)):le("v-if",!0)],6)]),default:ne(()=>[j("div",{ref_key:"listboxRef",ref:p,class:M([i(u).b(),Y.$attrs.class]),style:je(E.value),role:"combobox","aria-haspopup":"listbox","aria-expanded":T.value,"aria-owns":i(k)},[J(i(Dn),pt({ref_key:"inputRef",ref:c},pt(l.value,Y.$attrs),{"model-value":e.modelValue,disabled:i(r),onInput:W,onChange:F,onFocus:R,onBlur:I,onClear:L,onKeydown:se,onMousedown:U}),ra({_:2},[Y.$slots.prepend?{name:"prepend",fn:ne(()=>[ae(Y.$slots,"prepend")]),key:"0"}:void 0,Y.$slots.append?{name:"append",fn:ne(()=>[ae(Y.$slots,"append")]),key:"1"}:void 0,Y.$slots.prefix?{name:"prefix",fn:ne(()=>[ae(Y.$slots,"prefix")]),key:"2"}:void 0,Y.$slots.suffix?{name:"suffix",fn:ne(()=>[ae(Y.$slots,"suffix")]),key:"3"}:void 0]),1040,["model-value","disabled"])],14,ML)]),_:3},8,["visible","placement","popper-class","popper-style","teleported","append-to","transition"]))}}),PL=_L;const AL=rt(PL),LL=Se({size:{type:[Number,String],values:eo,validator:e=>Fe(e)},shape:{type:String,values:["circle","square"]},icon:{type:Ft},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:X(String),default:"cover"}}),DL={error:e=>e instanceof Event},CS=Symbol("avatarGroupContextKey"),VL={size:{type:X([Number,String]),values:eo,validator:e=>Fe(e)},shape:{type:X(String),values:["circle","square"]},collapseAvatars:Boolean,collapseAvatarsTooltip:Boolean,maxCollapseAvatars:{type:Number,default:1},effect:{type:X(String),default:"light"},placement:{type:X(String),values:Mo,default:"top"},popperClass:Bt.popperClass,popperStyle:Bt.popperStyle,collapseClass:String,collapseStyle:{type:X([String,Array,Object])}},BL=["src","alt","srcset"];var FL=ie({name:"ElAvatar",__name:"avatar",props:LL,emits:DL,setup(e,{emit:t}){const n=e,a=t,o=_e(CS,void 0),l=he("avatar"),s=A(!1),r=S(()=>n.size??(o==null?void 0:o.size)),u=S(()=>n.shape??(o==null?void 0:o.shape)??"circle"),c=S(()=>{const{icon:g}=n,v=[l.b()];return De(r.value)&&v.push(l.m(r.value)),g&&v.push(l.m("icon")),u.value&&v.push(l.m(u.value)),v}),d=S(()=>Fe(r.value)?l.cssVarBlock({size:an(r.value)}):void 0),f=S(()=>({objectFit:n.fit}));fe(()=>[n.src,n.srcSet],()=>s.value=!1);function p(g){s.value=!0,a("error",g)}return(g,v)=>(x(),B("span",{class:M(c.value),style:je(d.value)},[(e.src||e.srcSet)&&!s.value?(x(),B("img",{key:0,src:e.src,alt:e.alt,srcset:e.srcSet,style:je(f.value),onError:p},null,44,BL)):e.icon?(x(),re(i(Be),{key:1},{default:ne(()=>[(x(),re(ct(e.icon)))]),_:1})):ae(g.$slots,"default",{key:2})],6))}}),SS=FL,kS=ie({name:"ElAvatarGroup",props:VL,setup(e,{slots:t}){const n=he("avatar-group");return bt(CS,Rt({size:Lt(e,"size"),shape:Lt(e,"shape")})),()=>{var l;const a=wa(((l=t.default)==null?void 0:l.call(t))??[]);let o=a;if(e.collapseAvatars&&a.length>e.maxCollapseAvatars){o=a.slice(0,e.maxCollapseAvatars);const s=a.slice(e.maxCollapseAvatars);o.push(J(_n,{popperClass:e.popperClass,popperStyle:e.popperStyle,placement:e.placement,effect:e.effect,disabled:!e.collapseAvatarsTooltip},{default:()=>J(SS,{size:e.size,shape:e.shape,class:e.collapseClass,style:e.collapseStyle},{default:()=>[St("+ "),s.length]}),content:()=>J("div",{class:n.e("collapse-avatars")},[s.map((r,u)=>Ht(r)?Eo(r,{key:r.key??u}):r)])}))}return J("div",{class:n.b()},[o])}}});const zL=rt(SS,{AvatarGroup:kS}),HL=Qt(kS),KL={visibilityHeight:{type:Number,default:200},target:{type:String,default:""},right:{type:Number,default:40},bottom:{type:Number,default:40}},WL={click:e=>e instanceof MouseEvent},jL=(e,t,n)=>{const a=Wt(),o=Wt(),l=A(!1),s=()=>{a.value&&(l.value=a.value.scrollTop>=e.visibilityHeight)},r=u=>{var c;(c=a.value)==null||c.scrollTo({top:0,behavior:"smooth"}),t("click",u)};return At(o,"scroll",dw(s,300,!0)),mt(()=>{o.value=document,a.value=document.documentElement,e.target&&(a.value=document.querySelector(e.target)??void 0,a.value||Jt(n,`target does not exist: ${e.target}`),o.value=a.value),s()}),{visible:l,handleClick:r}},Qy="ElBacktop";var UL=ie({name:Qy,__name:"backtop",props:KL,emits:WL,setup(e,{emit:t}){const n=e,a=t,o=he("backtop"),{handleClick:l,visible:s}=jL(n,a,Qy),r=S(()=>({right:`${n.right}px`,bottom:`${n.bottom}px`}));return(u,c)=>(x(),re(Bn,{name:`${i(o).namespace.value}-fade-in`},{default:ne(()=>[i(s)?(x(),B("div",{key:0,style:je(r.value),class:M(i(o).b()),onClick:c[0]||(c[0]=Xe((...d)=>i(l)&&i(l)(...d),["stop"]))},[ae(u.$slots,"default",{},()=>[J(i(Be),{class:M(i(o).e("icon"))},{default:ne(()=>[J(i(dP))]),_:1},8,["class"])])],6)):le("v-if",!0)]),_:3},8,["name"]))}}),YL=UL;const qL=rt(YL),GL=Se({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:X([String,Object,Array])},offset:{type:X(Array),default:()=>[0,0]},badgeClass:{type:String}});var XL=ie({name:"ElBadge",__name:"badge",props:GL,setup(e,{expose:t}){const n=e,a=he("badge"),o=S(()=>n.isDot?"":Fe(n.value)&&Fe(n.max)?n.max[{backgroundColor:n.color,marginRight:an(-n.offset[0]),marginTop:an(n.offset[1])},n.badgeStyle??{}]);return t({content:o}),(s,r)=>(x(),B("div",{class:M(i(a).b())},[ae(s.$slots,"default"),J(Bn,{name:`${i(a).namespace.value}-zoom-in-center`},{default:ne(()=>[!e.hidden&&(o.value||e.isDot||s.$slots.content)?(x(),B("sup",{key:0,class:M([i(a).e("content"),i(a).em("content",e.type),i(a).is("fixed",!!s.$slots.default),i(a).is("dot",e.isDot),i(a).is("hide-zero",!e.showZero&&e.value===0),e.badgeClass]),style:je(l.value)},[ae(s.$slots,"content",{value:o.value},()=>[St(ke(o.value),1)])],6)):le("v-if",!0)]),_:3},8,["name"])],2))}}),ZL=XL;const ES=rt(ZL),JL=Se({separator:{type:String,default:"/"},separatorIcon:{type:Ft}}),xS=Symbol("breadcrumbKey"),QL=Se({to:{type:X([String,Object]),default:""},replace:Boolean}),e6=["aria-label"];var t6=ie({name:"ElBreadcrumb",__name:"breadcrumb",props:JL,setup(e){const{t}=Et(),n=e,a=he("breadcrumb"),o=A();return bt(xS,n),mt(()=>{const l=o.value.querySelectorAll(`.${a.e("item")}`);l.length&&l[l.length-1].setAttribute("aria-current","page")}),(l,s)=>(x(),B("div",{ref_key:"breadcrumb",ref:o,class:M(i(a).b()),"aria-label":i(t)("el.breadcrumb.label"),role:"navigation"},[ae(l.$slots,"default")],10,e6))}}),n6=t6,a6=ie({name:"ElBreadcrumbItem",__name:"breadcrumb-item",props:QL,setup(e){const t=e,n=vt(),a=_e(xS,void 0),o=he("breadcrumb"),l=n.appContext.config.globalProperties.$router,s=()=>{!t.to||!l||(t.replace?l.replace(t.to):l.push(t.to))};return(r,u)=>{var c,d;return x(),B("span",{class:M(i(o).e("item"))},[j("span",{class:M([i(o).e("inner"),i(o).is("link",!!e.to)]),role:"link",onClick:s},[ae(r.$slots,"default")],2),(c=i(a))!=null&&c.separatorIcon?(x(),re(i(Be),{key:0,class:M(i(o).e("separator"))},{default:ne(()=>[(x(),re(ct(i(a).separatorIcon)))]),_:1},8,["class"])):(x(),B("span",{key:1,class:M(i(o).e("separator")),role:"presentation"},ke((d=i(a))==null?void 0:d.separator),3))],2)}}}),TS=a6;const o6=rt(n6,{BreadcrumbItem:TS}),l6=Qt(TS),Dp=["default","primary","success","warning","info","danger","text",""],s6=["button","submit","reset"],Vp=Se({size:Sn,disabled:{type:Boolean,default:void 0},type:{type:String,values:Dp,default:""},icon:{type:Ft},nativeType:{type:String,values:s6,default:"button"},loading:Boolean,loadingIcon:{type:Ft,default:()=>Oo},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,dashed:{type:Boolean,default:void 0},color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:X([String,Object]),default:"button"}}),r6={click:e=>e instanceof MouseEvent},$S=Symbol(),Ac=A();function fl(e,t=void 0){const n=vt()?_e($S,Ac):Ac;return e?S(()=>{var a;return((a=n.value)==null?void 0:a[e])??t}):n}function Bd(e,t){const n=fl(),a=he(e,S(()=>{var r;return((r=n.value)==null?void 0:r.namespace)||pi})),o=Et(S(()=>{var r;return(r=n.value)==null?void 0:r.locale})),l=fu(S(()=>{var r;return((r=n.value)==null?void 0:r.zIndex)||AC})),s=S(()=>{var r;return i(t)||((r=n.value)==null?void 0:r.size)||""});return _h(S(()=>i(n)||{})),{ns:a,locale:o,zIndex:l,size:s}}const _h=(e,t,n=!1)=>{const a=!!vt(),o=a?fl():void 0,l=(t==null?void 0:t.provide)??(a?bt:void 0);if(!l){ft("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const s=S(()=>{const r=i(e);return o!=null&&o.value?i6(o.value,r):r});return l($S,s),l(gC,S(()=>s.value.locale)),l(yC,S(()=>s.value.namespace)),l(LC,S(()=>s.value.zIndex)),l(GC,{size:S(()=>s.value.size||"")}),l(ZC,S(()=>({emptyValues:s.value.emptyValues,valueOnClear:s.value.valueOnClear}))),(n||!Ac.value)&&(Ac.value=s.value),s},i6=(e,t)=>{const n=[...new Set([...Ri(e),...Ri(t)])],a={};for(const o of n)a[o]=t[o]!==void 0?t[o]:e[o];return a},u6=Se({a11y:{type:Boolean,default:!0},locale:{type:X(Object)},size:Sn,button:{type:X(Object)},card:{type:X(Object)},dialog:{type:X(Object)},link:{type:X(Object)},experimentalFeatures:{type:X(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:X(Object)},zIndex:Number,namespace:{type:String,default:"el"},table:{type:X(Object)},...Is}),Yn={placement:"top"},c6=ie({name:"ElConfigProvider",props:u6,setup(e,{slots:t}){const n=_h(e);return fe(()=>e.message,a=>{var o;Object.assign(Yn,((o=n==null?void 0:n.value)==null?void 0:o.message)??{},a??{})},{immediate:!0,deep:!0}),()=>ae(t,"default",{config:n==null?void 0:n.value})}}),d6=rt(c6),OS=Symbol("buttonGroupContextKey"),f6=(e,t)=>{bo({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},S(()=>e.type==="text"));const n=_e(OS,void 0),a=fl("button"),{form:o}=Pn(),l=bn(S(()=>n==null?void 0:n.size)),s=on(),r=A(),u=fn(),c=S(()=>{var b;return e.type||(n==null?void 0:n.type)||((b=a.value)==null?void 0:b.type)||""}),d=S(()=>{var b;return e.autoInsertSpace??((b=a.value)==null?void 0:b.autoInsertSpace)??!1}),f=S(()=>{var b;return e.plain??((b=a.value)==null?void 0:b.plain)??!1}),p=S(()=>{var b;return e.round??((b=a.value)==null?void 0:b.round)??!1}),g=S(()=>{var b;return e.text??((b=a.value)==null?void 0:b.text)??!1}),v=S(()=>{var b;return e.dashed??((b=a.value)==null?void 0:b.dashed)??!1}),h=S(()=>e.tag==="button"?{ariaDisabled:s.value||e.loading,disabled:s.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),m=S(()=>{var w;const b=(w=u.default)==null?void 0:w.call(u);if(d.value&&(b==null?void 0:b.length)===1){const C=b[0];if((C==null?void 0:C.type)===Or){const k=C.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(k.trim())}}return!1});return{_disabled:s,_size:l,_type:c,_ref:r,_props:h,_plain:f,_round:p,_text:g,_dashed:v,shouldAddSpace:m,handleClick:b=>{if(s.value||e.loading){b.stopPropagation();return}e.nativeType==="reset"&&(o==null||o.resetFields()),t("click",b)}}};function Wn(e,t){p6(e)&&(e="100%");const n=v6(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Hu(e){return Math.min(1,Math.max(0,e))}function p6(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function v6(e){return typeof e=="string"&&e.indexOf("%")!==-1}function NS(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ku(e){return Number(e)<=1?`${Number(e)*100}%`:e}function ss(e){return e.length===1?"0"+e:String(e)}function h6(e,t,n){return{r:Wn(e,255)*255,g:Wn(t,255)*255,b:Wn(n,255)*255}}function eb(e,t,n){e=Wn(e,255),t=Wn(t,255),n=Wn(n,255);const a=Math.max(e,t,n),o=Math.min(e,t,n);let l=0,s=0;const r=(a+o)/2;if(a===o)s=0,l=0;else{const u=a-o;switch(s=r>.5?u/(2-a-o):u/(a+o),a){case e:l=(t-n)/u+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function m6(e,t,n){let a,o,l;if(e=Wn(e,360),t=Wn(t,100),n=Wn(n,100),t===0)o=n,l=n,a=n;else{const s=n<.5?n*(1+t):n+t-n*t,r=2*n-s;a=$f(r,s,e+1/3),o=$f(r,s,e),l=$f(r,s,e-1/3)}return{r:a*255,g:o*255,b:l*255}}function tb(e,t,n){e=Wn(e,255),t=Wn(t,255),n=Wn(n,255);const a=Math.max(e,t,n),o=Math.min(e,t,n);let l=0;const s=a,r=a-o,u=a===0?0:r/a;if(a===o)l=0;else{switch(a){case e:l=(t-n)/r+(t>16,g:(e&65280)>>8,b:e&255}}const Bp={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function S6(e){let t={r:0,g:0,b:0},n=1,a=null,o=null,l=null,s=!1,r=!1;return typeof e=="string"&&(e=x6(e)),typeof e=="object"&&(ma(e.r)&&ma(e.g)&&ma(e.b)?(t=h6(e.r,e.g,e.b),s=!0,r=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ma(e.h)&&ma(e.s)&&ma(e.v)?(a=Ku(e.s),o=Ku(e.v),t=g6(e.h,a,o),s=!0,r="hsv"):ma(e.h)&&ma(e.s)&&ma(e.l)?(a=Ku(e.s),l=Ku(e.l),t=m6(e.h,a,l),s=!0,r="hsl"):ma(e.c)&&ma(e.m)&&ma(e.y)&&ma(e.k)&&(t=b6(e.c,e.m,e.y,e.k),s=!0,r="cmyk"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=NS(n),{ok:s,format:e.format||r,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}const k6="[-\\+]?\\d+%?",E6="[-\\+]?\\d*\\.\\d+%?",Ol="(?:"+E6+")|(?:"+k6+")",Of="[\\s|\\(]+("+Ol+")[,|\\s]+("+Ol+")[,|\\s]+("+Ol+")\\s*\\)?",Wu="[\\s|\\(]+("+Ol+")[,|\\s]+("+Ol+")[,|\\s]+("+Ol+")[,|\\s]+("+Ol+")\\s*\\)?",Oa={CSS_UNIT:new RegExp(Ol),rgb:new RegExp("rgb"+Of),rgba:new RegExp("rgba"+Wu),hsl:new RegExp("hsl"+Of),hsla:new RegExp("hsla"+Wu),hsv:new RegExp("hsv"+Of),hsva:new RegExp("hsva"+Wu),cmyk:new RegExp("cmyk"+Wu),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function x6(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;let t=!1;if(Bp[e])e=Bp[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=Oa.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Oa.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Oa.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Oa.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Oa.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Oa.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Oa.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=Oa.hex8.exec(e),n?{r:ga(n[1]),g:ga(n[2]),b:ga(n[3]),a:ob(n[4]),format:t?"name":"hex8"}:(n=Oa.hex6.exec(e),n?{r:ga(n[1]),g:ga(n[2]),b:ga(n[3]),format:t?"name":"hex"}:(n=Oa.hex4.exec(e),n?{r:ga(n[1]+n[1]),g:ga(n[2]+n[2]),b:ga(n[3]+n[3]),a:ob(n[4]+n[4]),format:t?"name":"hex8"}:(n=Oa.hex3.exec(e),n?{r:ga(n[1]+n[1]),g:ga(n[2]+n[2]),b:ga(n[3]+n[3]),format:t?"name":"hex"}:!1))))))))))}function ma(e){return typeof e=="number"?!Number.isNaN(e):Oa.CSS_UNIT.test(e)}class cn{constructor(t="",n={}){if(t instanceof cn)return t;typeof t=="number"&&(t=C6(t)),this.originalInput=t;const a=S6(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??a.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3}getLuminance(){const t=this.toRgb();let n,a,o;const l=t.r/255,s=t.g/255,r=t.b/255;return l<=.03928?n=l/12.92:n=Math.pow((l+.055)/1.055,2.4),s<=.03928?a=s/12.92:a=Math.pow((s+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),.2126*n+.7152*a+.0722*o}getAlpha(){return this.a}setAlpha(t){return this.a=NS(t),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:t}=this.toHsl();return t===0}toHsv(){const t=tb(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}}toHsvString(){const t=tb(this.r,this.g,this.b),n=Math.round(t.h*360),a=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?`hsv(${n}, ${a}%, ${o}%)`:`hsva(${n}, ${a}%, ${o}%, ${this.roundA})`}toHsl(){const t=eb(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}}toHslString(){const t=eb(this.r,this.g,this.b),n=Math.round(t.h*360),a=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?`hsl(${n}, ${a}%, ${o}%)`:`hsla(${n}, ${a}%, ${o}%, ${this.roundA})`}toHex(t=!1){return nb(this.r,this.g,this.b,t)}toHexString(t=!1){return"#"+this.toHex(t)}toHex8(t=!1){return y6(this.r,this.g,this.b,this.a,t)}toHex8String(t=!1){return"#"+this.toHex8(t)}toHexShortString(t=!1){return this.a===1?this.toHexString(t):this.toHex8String(t)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const t=Math.round(this.r),n=Math.round(this.g),a=Math.round(this.b);return this.a===1?`rgb(${t}, ${n}, ${a})`:`rgba(${t}, ${n}, ${a}, ${this.roundA})`}toPercentageRgb(){const t=n=>`${Math.round(Wn(n,255)*100)}%`;return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}}toPercentageRgbString(){const t=n=>Math.round(Wn(n,255)*100);return this.a===1?`rgb(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%)`:`rgba(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%, ${this.roundA})`}toCmyk(){return{...ab(this.r,this.g,this.b)}}toCmykString(){const{c:t,m:n,y:a,k:o}=ab(this.r,this.g,this.b);return`cmyk(${t}, ${n}, ${a}, ${o})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const t="#"+nb(this.r,this.g,this.b,!1);for(const[n,a]of Object.entries(Bp))if(t===a)return n;return!1}toString(t){const n=!!t;t=t??this.format;let a=!1;const o=this.a<1&&this.a>=0;return!n&&o&&(t.startsWith("hex")||t==="name")?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(a=this.toRgbString()),t==="prgb"&&(a=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(a=this.toHexString()),t==="hex3"&&(a=this.toHexString(!0)),t==="hex4"&&(a=this.toHex8String(!0)),t==="hex8"&&(a=this.toHex8String()),t==="name"&&(a=this.toName()),t==="hsl"&&(a=this.toHslString()),t==="hsv"&&(a=this.toHsvString()),t==="cmyk"&&(a=this.toCmykString()),a||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new cn(this.toString())}lighten(t=10){const n=this.toHsl();return n.l+=t/100,n.l=Hu(n.l),new cn(n)}brighten(t=10){const n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new cn(n)}darken(t=10){const n=this.toHsl();return n.l-=t/100,n.l=Hu(n.l),new cn(n)}tint(t=10){return this.mix("white",t)}shade(t=10){return this.mix("black",t)}desaturate(t=10){const n=this.toHsl();return n.s-=t/100,n.s=Hu(n.s),new cn(n)}saturate(t=10){const n=this.toHsl();return n.s+=t/100,n.s=Hu(n.s),new cn(n)}greyscale(){return this.desaturate(100)}spin(t){const n=this.toHsl(),a=(n.h+t)%360;return n.h=a<0?360+a:a,new cn(n)}mix(t,n=50){const a=this.toRgb(),o=new cn(t).toRgb(),l=n/100,s={r:(o.r-a.r)*l+a.r,g:(o.g-a.g)*l+a.g,b:(o.b-a.b)*l+a.b,a:(o.a-a.a)*l+a.a};return new cn(s)}analogous(t=6,n=30){const a=this.toHsl(),o=360/n,l=[this];for(a.h=(a.h-(o*t>>1)+720)%360;--t;)a.h=(a.h+o)%360,l.push(new cn(a));return l}complement(){const t=this.toHsl();return t.h=(t.h+180)%360,new cn(t)}monochromatic(t=6){const n=this.toHsv(),{h:a}=n,{s:o}=n;let{v:l}=n;const s=[],r=1/t;for(;t--;)s.push(new cn({h:a,s:o,v:l})),l=(l+r)%1;return s}splitcomplement(){const t=this.toHsl(),{h:n}=t;return[this,new cn({h:(n+72)%360,s:t.s,l:t.l}),new cn({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){const n=this.toRgb(),a=new cn(t).toRgb(),o=n.a+a.a*(1-n.a);return new cn({r:(n.r*n.a+a.r*a.a*(1-n.a))/o,g:(n.g*n.a+a.g*a.a*(1-n.a))/o,b:(n.b*n.a+a.b*a.a*(1-n.a))/o,a:o})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){const n=this.toHsl(),{h:a}=n,o=[this],l=360/t;for(let s=1;s{let a={},o=e.color;if(o){const l=o.match(/var\((.*?)\)/);l&&(o=window.getComputedStyle(window.document.documentElement).getPropertyValue(l[1]));const s=new cn(o),r=e.dark?s.tint(20).toString():ro(s,20);if(e.plain)a=n.cssVarBlock({"bg-color":e.dark?ro(s,90):s.tint(90).toString(),"text-color":o,"border-color":e.dark?ro(s,50):s.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":o,"hover-border-color":o,"active-bg-color":r,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":r}),t.value&&(a[n.cssVarBlockName("disabled-bg-color")]=e.dark?ro(s,90):s.tint(90).toString(),a[n.cssVarBlockName("disabled-text-color")]=e.dark?ro(s,50):s.tint(50).toString(),a[n.cssVarBlockName("disabled-border-color")]=e.dark?ro(s,80):s.tint(80).toString());else if(e.link||e.text){const u=e.dark?ro(s,30):s.tint(30).toString();if(a=n.cssVarBlock({"text-color":o,"hover-text-color":u,"active-text-color":r}),e.link&&(a[n.cssVarBlockName("hover-link-text-color")]=u,a[n.cssVarBlockName("active-color")]=r),t.value){const c=e.dark?ro(s,50):s.tint(50).toString();a[n.cssVarBlockName("disabled-bg-color")]="transparent",a[n.cssVarBlockName("disabled-text-color")]=c,a[n.cssVarBlockName("disabled-border-color")]="transparent"}}else{const u=e.dark?ro(s,30):s.tint(30).toString(),c=s.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(a=n.cssVarBlock({"bg-color":o,"text-color":c,"border-color":o,"hover-bg-color":u,"hover-text-color":c,"hover-border-color":u,"active-bg-color":r,"active-border-color":r}),t.value){const d=e.dark?ro(s,50):s.tint(50).toString();a[n.cssVarBlockName("disabled-bg-color")]=d,a[n.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,a[n.cssVarBlockName("disabled-border-color")]=d}}}return a})}var $6=ie({name:"ElButton",__name:"button",props:Vp,emits:r6,setup(e,{expose:t,emit:n}){const a=e,o=n,l=T6(a),s=he("button"),{_ref:r,_size:u,_type:c,_disabled:d,_props:f,_plain:p,_round:g,_text:v,_dashed:h,shouldAddSpace:m,handleClick:y}=f6(a,o),b=S(()=>[s.b(),s.m(c.value),s.m(u.value),s.is("disabled",d.value),s.is("loading",a.loading),s.is("plain",p.value),s.is("round",g.value),s.is("circle",a.circle),s.is("text",v.value),s.is("dashed",h.value),s.is("link",a.link),s.is("has-bg",a.bg)]);return t({ref:r,size:u,type:c,disabled:d,shouldAddSpace:m}),(w,C)=>(x(),re(ct(e.tag),pt({ref_key:"_ref",ref:r},i(f),{class:b.value,style:i(l),onClick:i(y)}),{default:ne(()=>[e.loading?(x(),B(He,{key:0},[w.$slots.loading?ae(w.$slots,"loading",{key:0}):(x(),re(i(Be),{key:1,class:M(i(s).is("loading"))},{default:ne(()=>[(x(),re(ct(e.loadingIcon)))]),_:1},8,["class"]))],64)):e.icon||w.$slots.icon?(x(),re(i(Be),{key:1},{default:ne(()=>[e.icon?(x(),re(ct(e.icon),{key:0})):ae(w.$slots,"icon",{key:1})]),_:3})):le("v-if",!0),w.$slots.default?(x(),B("span",{key:2,class:M({[i(s).em("text","expand")]:i(m)})},[ae(w.$slots,"default")],2)):le("v-if",!0)]),_:3},16,["class","style","onClick"]))}}),O6=$6;const N6={size:Vp.size,type:Vp.type,direction:{type:X(String),values:["horizontal","vertical"],default:"horizontal"}};var M6=ie({name:"ElButtonGroup",__name:"button-group",props:N6,setup(e){const t=e;bt(OS,Rt({size:Lt(t,"size"),type:Lt(t,"type")}));const n=he("button");return(a,o)=>(x(),B("div",{class:M([i(n).b("group"),i(n).bm("group",t.direction)])},[ae(a.$slots,"default")],2))}}),MS=M6;const $n=rt(O6,{ButtonGroup:MS}),RS=Qt(MS),R6=e=>be(e)&&e.length===2&&e.every(t=>_l(t)),I6=Se({modelValue:{type:Date},range:{type:X(Array),validator:R6},controllerType:{type:String,values:["button","select"],default:"button"},formatter:{type:X(Function)}}),_6={[at]:e=>_l(e),[gn]:e=>_l(e)},lb=["hours","minutes","seconds"],Xa="EP_PICKER_BASE",Ph="ElPopperOptions",IS=Symbol("commonPickerContextKey"),Es="HH:mm:ss",Wo="YYYY-MM-DD",P6={date:Wo,dates:Wo,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${Wo} ${Es}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:Wo,datetimerange:`${Wo} ${Es}`};var pl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _S={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(pl,function(){var n=1e3,a=6e4,o=36e5,l="millisecond",s="second",r="minute",u="hour",c="day",d="week",f="month",p="quarter",g="year",v="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(W){var U=["th","st","nd","rd"],F=W%100;return"["+W+(U[(F-20)%10]||U[F]||U[0])+"]"}},w=function(W,U,F){var R=String(W);return!R||R.length>=U?W:""+Array(U+1-R.length).join(F)+W},C={s:w,z:function(W){var U=-W.utcOffset(),F=Math.abs(U),R=Math.floor(F/60),I=F%60;return(U<=0?"+":"-")+w(R,2,"0")+":"+w(I,2,"0")},m:function W(U,F){if(U.date()1)return W(z[0])}else{var H=U.name;E[H]=U,I=H}return!R&&I&&(k=I),I||!R&&k},O=function(W,U){if($(W))return W.clone();var F=typeof U=="object"?U:{};return F.date=W,F.args=arguments,new P(F)},_=C;_.l=N,_.i=$,_.w=function(W,U){return O(W,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var P=function(){function W(F){this.$L=N(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[T]=!0}var U=W.prototype;return U.parse=function(F){this.$d=function(R){var I=R.date,L=R.utc;if(I===null)return new Date(NaN);if(_.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var z=I.match(m);if(z){var H=z[2]-1||0,K=(z[7]||"0").substring(0,3);return L?new Date(Date.UTC(z[1],H,z[3]||1,z[4]||0,z[5]||0,z[6]||0,K)):new Date(z[1],H,z[3]||1,z[4]||0,z[5]||0,z[6]||0,K)}}return new Date(I)}(F),this.init()},U.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},U.$utils=function(){return _},U.isValid=function(){return this.$d.toString()!==h},U.isSame=function(F,R){var I=O(F);return this.startOf(R)<=I&&I<=this.endOf(R)},U.isAfter=function(F,R){return O(F)[e>0?e-1:void 0,e,eArray.from(Array.from({length:e}).keys()),PS=e=>e.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),AS=e=>e.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),sb=function(e,t){const n=_l(e),a=_l(t);return n&&a?e.getTime()===t.getTime():!n&&!a?e===t:!1},LS=function(e,t){const n=be(e),a=be(t);return n&&a?e.length!==t.length?!1:e.every((o,l)=>sb(o,t[l])):!n&&!a?sb(e,t):!1},rb=function(e,t,n){const a=la(t)||t==="x"?st(e).locale(n):st(e,t).locale(n);return a.isValid()?a:void 0},ib=function(e,t,n){return la(t)?e:t==="x"?+e:st(e).locale(n).format(t)},Mf=(e,t)=>{const n=[],a=t==null?void 0:t();for(let o=0;obe(e)?e.map(t=>t.toDate()):e.toDate(),Ah=Se({disabledHours:{type:X(Function)},disabledMinutes:{type:X(Function)},disabledSeconds:{type:X(Function)}}),DS=Se({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),Lh=Se({automaticDropdown:{type:Boolean,default:!0},id:{type:X([Array,String])},name:{type:X([Array,String])},popperClass:Bt.popperClass,popperStyle:Bt.popperStyle,format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:X([String,Object]),default:_o},editable:{type:Boolean,default:!0},saveOnBlur:{type:Boolean,default:!0},prefixIcon:{type:X([String,Object]),default:""},size:Sn,readonly:Boolean,disabled:{type:Boolean,default:void 0},placeholder:{type:String,default:""},popperOptions:{type:X(Object),default:()=>({})},modelValue:{type:X([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:X([Date,Array])},defaultTime:{type:X([Date,Array])},isRange:Boolean,...Ah,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:X([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:X(String),values:Mo,default:"bottom"},fallbackPlacements:{type:X(Array),default:["bottom","top","right","left"]},...Is,...Qn(["ariaLabel"]),showNow:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean}),L6=Se({id:{type:X(Array)},name:{type:X(Array)},modelValue:{type:X([Array,String])},startPlaceholder:String,endPlaceholder:String,disabled:Boolean}),VS=(e,t)=>{const{lang:n}=Et(),a=A(!1),o=A(!1),l=A(null),s=S(()=>{const{modelValue:v}=e;return!v||be(v)&&!v.filter(Boolean).length}),r=v=>{if(!LS(e.modelValue,v)){let h;be(v)?h=v.map(m=>ib(m,e.valueFormat,n.value)):v&&(h=ib(v,e.valueFormat,n.value)),t(at,v&&h,n.value)}},u=S(()=>{let v;if(s.value?c.value.getDefaultValue&&(v=c.value.getDefaultValue()):be(e.modelValue)?v=e.modelValue.map(h=>rb(h,e.valueFormat,n.value)):v=rb(e.modelValue??"",e.valueFormat,n.value),c.value.getRangeAvailableTime){const h=c.value.getRangeAvailableTime(v);tn(h,v)||(v=h,s.value||r(ic(v)))}return be(v)&&v.some(h=>!h)&&(v=[]),v}),c=A({});return{parsedValue:u,pickerActualVisible:o,pickerOptions:c,pickerVisible:a,userInput:l,valueIsEmpty:s,emitInput:r,onCalendarChange:v=>{t("calendar-change",v)},onPanelChange:(v,h,m)=>{t("panel-change",v,h,m)},onPick:(v="",h=!1)=>{a.value=h;let m;be(v)?m=v.map(y=>y.toDate()):m=v&&v.toDate(),l.value=null,r(m)},onSetPickerOption:v=>{c.value[v[0]]=v[1],c.value.panelReady=!0}}},D6=["id","name","placeholder","value","disabled"],V6=["id","name","placeholder","value","disabled"];var B6=ie({name:"PickerRangeTrigger",inheritAttrs:!1,__name:"picker-range-trigger",props:L6,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(e,{expose:t,emit:n}){const a=e,o=n,{formItem:l}=Pn(),{inputId:s}=Ta(Rt({id:S(()=>{var $;return($=a.id)==null?void 0:$[0]})}),{formItemContext:l}),r=$d(),u=he("date"),c=he("range"),d=A(),f=A(),{wrapperRef:p,isFocused:g}=dl(d,{disabled:S(()=>a.disabled)}),v=$=>{o("click",$)},h=$=>{o("mouseenter",$)},m=$=>{o("mouseleave",$)},y=$=>{o("touchstart",$)},b=$=>{o("startInput",$)},w=$=>{o("endInput",$)},C=$=>{o("startChange",$)},k=$=>{o("endChange",$)};return t({focus:()=>{var $;($=d.value)==null||$.focus()},blur:()=>{var $,N;($=d.value)==null||$.blur(),(N=f.value)==null||N.blur()}}),($,N)=>(x(),B("div",{ref_key:"wrapperRef",ref:p,class:M([i(u).is("active",i(g)),$.$attrs.class]),style:je($.$attrs.style),onClick:v,onMouseenter:h,onMouseleave:m,onTouchstartPassive:y},[ae($.$slots,"prefix"),j("input",pt(i(r),{id:i(s),ref_key:"inputRef",ref:d,name:$.name&&$.name[0],placeholder:$.startPlaceholder,value:$.modelValue&&$.modelValue[0],class:i(c).b("input"),disabled:$.disabled,onInput:b,onChange:C}),null,16,D6),ae($.$slots,"range-separator"),j("input",pt(i(r),{id:$.id&&$.id[1],ref_key:"endInputRef",ref:f,name:$.name&&$.name[1],placeholder:$.endPlaceholder,value:$.modelValue&&$.modelValue[1],class:i(c).b("input"),disabled:$.disabled,onInput:w,onChange:k}),null,16,V6),ae($.$slots,"suffix")],38))}}),F6=B6,z6=ie({name:"Picker",__name:"picker",props:Lh,emits:[at,yt,"focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(e,{expose:t,emit:n}){const a=e,o=n,l=rl(),s=he("date"),r=he("input"),u=he("range"),{formItem:c}=Pn(),d=_e(Ph,{}),f=gu(a,null),p=A(),g=A(),v=A(null);let h=!1;const m=on(),y=VS(a,o),{parsedValue:b,pickerActualVisible:w,userInput:C,pickerVisible:k,pickerOptions:E,valueIsEmpty:T,emitInput:$,onPick:N,onSetPickerOption:O,onCalendarChange:_,onPanelChange:P}=y,{isFocused:D,handleFocus:W,handleBlur:U}=dl(g,{disabled:m,beforeFocus(){return a.readonly},afterFocus(){a.automaticDropdown&&(k.value=!0)},beforeBlur(pe){var $e;return!h&&(($e=p.value)==null?void 0:$e.isFocusInsideContent(pe))},afterBlur(){var pe,$e;Y.value&&!a.saveOnBlur?T.value||($e=(pe=E.value).handleCancel)==null||$e.call(pe):Ve(),k.value=!1,h=!1,a.validateEvent&&(c==null||c.validate("blur").catch(ut=>ft(ut)))}}),F=A(!1),R=S(()=>[s.b("editor"),s.bm("editor",a.type),r.e("wrapper"),s.is("disabled",m.value),s.is("active",k.value),u.b("editor"),Te?u.bm("editor",Te.value):"",l.class]),I=S(()=>[r.e("icon"),u.e("close-icon"),ce.value?"":u.em("close-icon","hidden")]);fe(k,pe=>{pe?Ae(()=>{pe&&(v.value=a.modelValue)}):(C.value=null,Ae(()=>{L(a.modelValue)}))});const L=(pe,$e)=>{($e||!LS(pe,v.value))&&(o(yt,pe),$e&&(v.value=pe),a.validateEvent&&(c==null||c.validate("change").catch(ut=>ft(ut))))},z=pe=>{o("keydown",pe)},H=S(()=>g.value?Array.from(g.value.$el.querySelectorAll("input")):[]),K=(pe,$e,ut)=>{const It=H.value;It.length&&(!ut||ut==="min"?(It[0].setSelectionRange(pe,$e),It[0].focus()):ut==="max"&&(It[1].setSelectionRange(pe,$e),It[1].focus()))},q=()=>{w.value=!0},Q=()=>{o("visible-change",!0)},ee=()=>{w.value=!1,k.value=!1,o("visible-change",!1)},ue=()=>{k.value=!0},te=()=>{k.value=!1},de=S(()=>{const pe=tt(b.value);return be(C.value)?[C.value[0]??(pe&&pe[0])??"",C.value[1]??(pe&&pe[1])??""]:C.value!==null?C.value:Y.value&&T.value&&!a.saveOnBlur||!Y.value&&T.value||!k.value&&T.value?"":pe?G.value||V.value||Z.value?pe.join(", "):pe:""}),se=S(()=>a.type.includes("time")),Y=S(()=>a.type.startsWith("time")),G=S(()=>a.type==="dates"),V=S(()=>a.type==="months"),Z=S(()=>a.type==="years"),oe=S(()=>a.prefixIcon||(se.value?tS:iP)),ce=S(()=>a.clearable&&!m.value&&!a.readonly&&!T.value&&(F.value||D.value)),ge=pe=>{a.readonly||m.value||(ce.value&&(pe==null||pe.stopPropagation(),E.value.handleClear?E.value.handleClear():$(f.valueOnClear.value),L(f.valueOnClear.value,!0),ee()),o("clear"))},me=async pe=>{var $e;a.readonly||m.value||((($e=pe.target)==null?void 0:$e.tagName)!=="INPUT"||D.value||!a.automaticDropdown)&&(k.value=!0)},Me=()=>{a.readonly||m.value||!T.value&&a.clearable&&(F.value=!0)},Ie=()=>{F.value=!1},Re=pe=>{var $e;a.readonly||m.value||((($e=pe.touches[0].target)==null?void 0:$e.tagName)!=="INPUT"||D.value||!a.automaticDropdown)&&(k.value=!0)},ye=S(()=>a.type.includes("range")),Te=bn(),we=S(()=>{var pe,$e;return($e=(pe=i(p))==null?void 0:pe.popperRef)==null?void 0:$e.contentRef}),Pe=zv(g,pe=>{const $e=i(we),ut=Cn(g);$e&&(pe.target===$e||pe.composedPath().includes($e))||pe.target===ut||ut&&pe.composedPath().includes(ut)||(k.value=!1)});Pt(()=>{Pe==null||Pe()});const Ve=()=>{if(Y.value&&!a.saveOnBlur)return;const pe=be(C.value)&&C.value.every($e=>$e==="");if(C.value&&!pe){const $e=Qe(de.value);$e&&(nt($e)&&$(ic($e)),C.value=null)}(C.value===""||pe)&&($(f.valueOnClear.value),L(f.valueOnClear.value,!0),C.value=null)},Qe=pe=>pe?E.value.parseUserInput(pe):null,tt=pe=>pe?be(pe)?pe.map($e=>$e.format(a.format)):pe.format(a.format):null,nt=pe=>E.value.isValidValue(pe),Oe=async pe=>{if(a.readonly||m.value)return;const $e=zt(pe);if(z(pe),$e===Ce.esc){k.value===!0&&(k.value=!1,pe.preventDefault(),pe.stopPropagation());return}if($e===Ce.down&&(E.value.handleFocusPicker&&(pe.preventDefault(),pe.stopPropagation()),k.value===!1&&(k.value=!0,await Ae()),E.value.handleFocusPicker)){E.value.handleFocusPicker();return}if($e===Ce.tab){h=!0;return}if($e===Ce.enter||$e===Ce.numpadEnter){k.value?(C.value===null||C.value===""||nt(Qe(de.value)))&&(Ve(),k.value=!1):k.value=!0,pe.preventDefault(),pe.stopPropagation();return}if(C.value){pe.stopPropagation();return}E.value.handleKeydownInput&&E.value.handleKeydownInput(pe)},qe=pe=>{C.value=pe,k.value||(k.value=!0)},it=pe=>{const $e=pe.target;C.value?C.value=[$e.value,C.value[1]]:C.value=[$e.value,null]},We=pe=>{const $e=pe.target;C.value?C.value=[C.value[0],$e.value]:C.value=[null,$e.value]},et=()=>{var It;const pe=C.value,$e=Qe(pe&&pe[0]),ut=i(b);if($e&&$e.isValid()){C.value=[tt($e),((It=de.value)==null?void 0:It[1])||null];const Yt=[$e,ut&&(ut[1]||null)];nt(Yt)&&($(ic(Yt)),C.value=null)}},gt=()=>{var It;const pe=i(C),$e=Qe(pe&&pe[1]),ut=i(b);if($e&&$e.isValid()){C.value=[((It=i(de))==null?void 0:It[0])||null,tt($e)];const Yt=[ut&&ut[0],$e];nt(Yt)&&($(ic(Yt)),C.value=null)}},ve=()=>{var pe;(pe=g.value)==null||pe.focus()},Le=()=>{var pe;(pe=g.value)==null||pe.blur()};return bt(Xa,{props:a,emptyValues:f}),bt(IS,y),t({focus:ve,blur:Le,handleOpen:ue,handleClose:te,onPick:N}),(pe,$e)=>(x(),re(i(_n),pt({ref_key:"refPopper",ref:p,visible:i(k),effect:"light",pure:"",trigger:"click"},pe.$attrs,{role:"dialog",teleported:"",transition:`${i(s).namespace.value}-zoom-in-top`,"popper-class":[`${i(s).namespace.value}-picker__popper`,pe.popperClass],"popper-style":pe.popperStyle,"popper-options":i(d),"fallback-placements":pe.fallbackPlacements,"gpu-acceleration":!1,placement:pe.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:q,onShow:Q,onHide:ee}),{default:ne(()=>[ye.value?(x(),re(F6,{key:1,id:pe.id,ref_key:"inputRef",ref:g,"model-value":de.value,name:pe.name,disabled:i(m),readonly:!pe.editable||pe.readonly,"start-placeholder":pe.startPlaceholder,"end-placeholder":pe.endPlaceholder,class:M(R.value),style:je(pe.$attrs.style),"aria-label":pe.ariaLabel,tabindex:pe.tabindex,autocomplete:"off",role:"combobox",onClick:me,onFocus:i(W),onBlur:i(U),onStartInput:it,onStartChange:et,onEndInput:We,onEndChange:gt,onMousedown:me,onMouseenter:Me,onMouseleave:Ie,onTouchstartPassive:Re,onKeydown:Oe},{prefix:ne(()=>[oe.value?(x(),re(i(Be),{key:0,class:M([i(r).e("icon"),i(u).e("icon")])},{default:ne(()=>[(x(),re(ct(oe.value)))]),_:1},8,["class"])):le("v-if",!0)]),"range-separator":ne(()=>[ae(pe.$slots,"range-separator",{},()=>[j("span",{class:M(i(u).b("separator"))},ke(pe.rangeSeparator),3)])]),suffix:ne(()=>[pe.clearIcon?(x(),re(i(Be),{key:0,class:M(I.value),onMousedown:Xe(i(_t),["prevent"]),onClick:ge},{default:ne(()=>[(x(),re(ct(pe.clearIcon)))]),_:1},8,["class","onMousedown"])):le("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(x(),re(i(Dn),{key:0,id:pe.id,ref_key:"inputRef",ref:g,"container-role":"combobox","model-value":de.value,name:pe.name,size:i(Te),disabled:i(m),placeholder:pe.placeholder,class:M([i(s).b("editor"),i(s).bm("editor",pe.type),i(s).is("focus",i(k)),pe.$attrs.class]),style:je(pe.$attrs.style),readonly:!pe.editable||pe.readonly||G.value||V.value||Z.value||pe.type==="week","aria-label":pe.ariaLabel,tabindex:pe.tabindex,"validate-event":!1,onInput:qe,onFocus:i(W),onBlur:i(U),onKeydown:Oe,onChange:Ve,onMousedown:me,onMouseenter:Me,onMouseleave:Ie,onTouchstartPassive:Re,onClick:$e[0]||($e[0]=Xe(()=>{},["stop"]))},{prefix:ne(()=>[oe.value?(x(),re(i(Be),{key:0,class:M(i(r).e("icon")),onMousedown:Xe(me,["prevent"]),onTouchstartPassive:Re},{default:ne(()=>[(x(),re(ct(oe.value)))]),_:1},8,["class"])):le("v-if",!0)]),suffix:ne(()=>[ce.value&&pe.clearIcon?(x(),re(i(Be),{key:0,class:M(`${i(r).e("icon")} clear-icon`),onMousedown:Xe(i(_t),["prevent"]),onClick:ge},{default:ne(()=>[(x(),re(ct(pe.clearIcon)))]),_:1},8,["class","onMousedown"])):le("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur"]))]),content:ne(()=>[ae(pe.$slots,"default",{visible:i(k),actualVisible:i(w),parsedValue:i(b),format:pe.format,dateFormat:pe.dateFormat,timeFormat:pe.timeFormat,unlinkPanels:pe.unlinkPanels,type:pe.type,defaultValue:pe.defaultValue,showNow:pe.showNow,showConfirm:pe.showConfirm,showFooter:pe.showFooter,showWeekNumber:pe.showWeekNumber,onPick:$e[1]||($e[1]=(...ut)=>i(N)&&i(N)(...ut)),onSelectRange:K,onSetPickerOption:$e[2]||($e[2]=(...ut)=>i(O)&&i(O)(...ut)),onCalendarChange:$e[3]||($e[3]=(...ut)=>i(_)&&i(_)(...ut)),onClear:ge,onPanelChange:$e[4]||($e[4]=(...ut)=>i(P)&&i(P)(...ut)),onMousedown:$e[5]||($e[5]=Xe(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-style","popper-options","fallback-placements","placement"]))}}),BS=z6;const H6=Se({...DS,datetimeRole:String,parsedValue:{type:X(Object)}}),FS=({getAvailableHours:e,getAvailableMinutes:t,getAvailableSeconds:n})=>{const a=(s,r,u,c)=>{const d={hour:e,minute:t,second:n};let f=s;return["hour","minute","second"].forEach(p=>{if(d[p]){let g;const v=d[p];switch(p){case"minute":g=v(f.hour(),r,c);break;case"second":g=v(f.hour(),f.minute(),r,c);break;default:g=v(r,c);break}if(g!=null&&g.length&&!g.includes(f[p]())){const h=u?0:g.length-1;f=f[p](g[h])}}}),f},o={};return{timePickerOptions:o,getAvailableTime:a,onSetOption:([s,r])=>{o[s]=r}}},Rf=e=>{const t=(a,o)=>a||o,n=a=>a!==!0;return e.map(t).filter(n)},zS=(e,t,n)=>({getHoursList:(s,r)=>Mf(24,e&&(()=>e==null?void 0:e(s,r))),getMinutesList:(s,r,u)=>Mf(60,t&&(()=>t==null?void 0:t(s,r,u))),getSecondsList:(s,r,u,c)=>Mf(60,n&&(()=>n==null?void 0:n(s,r,u,c)))}),HS=(e,t,n)=>{const{getHoursList:a,getMinutesList:o,getSecondsList:l}=zS(e,t,n);return{getAvailableHours:(c,d)=>Rf(a(c,d)),getAvailableMinutes:(c,d,f)=>Rf(o(c,d,f)),getAvailableSeconds:(c,d,f,p)=>Rf(l(c,d,f,p))}},KS=(e,t)=>{const n=A(e.parsedValue);return fe(()=>e.visible,a=>{const o=Pm(t.modelValue),l=Pm(t.valueOnClear);if(a&&o===l){n.value=l;return}a||(n.value=e.parsedValue)}),n},K6=Se({role:{type:String,required:!0},spinnerDate:{type:X(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:X(String),default:""},...Ah}),W6=["onClick"],j6=["onMouseenter"];var U6=ie({__name:"basic-time-spinner",props:K6,emits:[yt,"select-range","set-option"],setup(e,{emit:t}){const n=e,{isRange:a,format:o,saveOnBlur:l}=_e(Xa).props,s=t,r=he("time"),{getHoursList:u,getMinutesList:c,getSecondsList:d}=zS(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let f=!1;const p={hours:!1,minutes:!1,seconds:!1},g=A(),v={hours:A(),minutes:A(),seconds:A()},h=S(()=>n.showSeconds?lb:lb.slice(0,2)),m=S(()=>{const{spinnerDate:H}=n;return{hours:H.hour(),minutes:H.minute(),seconds:H.second()}}),y=S(()=>{const{hours:H,minutes:K}=i(m),{role:q,spinnerDate:Q}=n,ee=a?void 0:Q;return{hours:u(q,ee),minutes:c(H,q,ee),seconds:d(H,K,q,ee)}}),b=S(()=>{const{hours:H,minutes:K,seconds:q}=i(m);return{hours:Nf(H,23),minutes:Nf(K,59),seconds:Nf(q,59)}}),w=To(H=>{f=!1,E(H)},200),C=H=>{if(!n.amPmMode)return"";const K=n.amPmMode==="A";let q=H<12?" am":" pm";return K&&(q=q.toUpperCase()),q},k=H=>{let K=[0,0];const q=o||Es,Q=q.indexOf("HH"),ee=q.indexOf("mm"),ue=q.indexOf("ss");switch(H){case"hours":Q!==-1&&(K=[Q,Q+2]);break;case"minutes":ee!==-1&&(K=[ee,ee+2]);break;case"seconds":ue!==-1&&(K=[ue,ue+2]);break}const[te,de]=K;s("select-range",te,de),g.value=H},E=H=>{N(H,i(m)[H])},T=()=>{E("hours"),E("minutes"),E("seconds")},$=H=>H.querySelector(`.${r.namespace.value}-scrollbar__wrap`),N=(H,K)=>{if(n.arrowControl)return;const q=i(v[H]);q&&q.$el&&(l||(p[H]=!0,_a(()=>{p[H]=!1})),$(q.$el).scrollTop=Math.max(0,K*O(H)))},O=H=>{var q;const K=(q=i(v[H]))==null?void 0:q.$el.querySelector("li");return K&&Number.parseFloat(Ko(K,"height"))||0},_=()=>{D(1)},P=()=>{D(-1)},D=H=>{g.value||k("hours");const K=g.value,q=i(m)[K],Q=W(K,q,H,g.value==="hours"?24:60);U(K,Q),N(K,Q),Ae(()=>k(K))},W=(H,K,q,Q)=>{let ee=(K+q+Q)%Q;const ue=i(y)[H];for(;ue[ee]&&ee!==K;)ee=(ee+q+Q)%Q;return ee},U=(H,K)=>{if(i(y)[H][K])return;const{hours:q,minutes:Q,seconds:ee}=i(m);let ue;switch(H){case"hours":ue=n.spinnerDate.hour(K).minute(Q).second(ee);break;case"minutes":ue=n.spinnerDate.hour(q).minute(K).second(ee);break;case"seconds":ue=n.spinnerDate.hour(q).minute(Q).second(K);break}s(yt,ue)},F=(H,{value:K,disabled:q})=>{q||(U(H,K),k(H),N(H,K))},R=H=>{if(!l&&p[H])return;const K=i(v[H]);K&&(f=!0,w(H),U(H,Math.min(Math.round(($(K.$el).scrollTop-(I(H)*.5-10)/O(H)+3)/O(H)),H==="hours"?23:59)))},I=H=>i(v[H]).$el.offsetHeight,L=()=>{const H=K=>{const q=i(v[K]);q&&q.$el&&($(q.$el).onscroll=()=>{R(K)})};H("hours"),H("minutes"),H("seconds")};mt(()=>{Ae(()=>{!n.arrowControl&&L(),T(),n.role==="start"&&k("hours")})});const z=(H,K)=>{v[K].value=H??void 0};return s("set-option",[`${n.role}_scrollDown`,D]),s("set-option",[`${n.role}_emitSelectRange`,k]),fe(()=>n.spinnerDate,()=>{f||T()}),(H,K)=>(x(),B("div",{class:M([i(r).b("spinner"),{"has-seconds":H.showSeconds}])},[H.arrowControl?le("v-if",!0):(x(!0),B(He,{key:0},Ct(h.value,q=>(x(),re(i(Ga),{key:q,ref_for:!0,ref:Q=>z(Q,q),class:M(i(r).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":i(r).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:Q=>k(q),onMousemove:Q=>E(q)},{default:ne(()=>[(x(!0),B(He,null,Ct(y.value[q],(Q,ee)=>(x(),B("li",{key:ee,class:M([i(r).be("spinner","item"),i(r).is("active",ee===m.value[q]),i(r).is("disabled",Q)]),onClick:ue=>F(q,{value:ee,disabled:Q})},[q==="hours"?(x(),B(He,{key:0},[St(ke(("0"+(H.amPmMode?ee%12||12:ee)).slice(-2))+ke(C(ee)),1)],64)):(x(),B(He,{key:1},[St(ke(("0"+ee).slice(-2)),1)],64))],10,W6))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),H.arrowControl?(x(!0),B(He,{key:1},Ct(h.value,q=>(x(),B("div",{key:q,class:M([i(r).be("spinner","wrapper"),i(r).is("arrow")]),onMouseenter:Q=>k(q)},[dt((x(),re(i(Be),{class:M(["arrow-up",i(r).be("spinner","arrow")])},{default:ne(()=>[J(i(Ad))]),_:1},8,["class"])),[[i(Mc),P]]),dt((x(),re(i(Be),{class:M(["arrow-down",i(r).be("spinner","arrow")])},{default:ne(()=>[J(i(Io))]),_:1},8,["class"])),[[i(Mc),_]]),j("ul",{class:M(i(r).be("spinner","list"))},[(x(!0),B(He,null,Ct(b.value[q],(Q,ee)=>(x(),B("li",{key:ee,class:M([i(r).be("spinner","item"),i(r).is("active",Q===m.value[q]),i(r).is("disabled",y.value[q][Q])])},[i(Fe)(Q)?(x(),B(He,{key:0},[q==="hours"?(x(),B(He,{key:0},[St(ke(("0"+(H.amPmMode?Q%12||12:Q)).slice(-2))+ke(C(Q)),1)],64)):(x(),B(He,{key:1},[St(ke(("0"+Q).slice(-2)),1)],64))],64)):le("v-if",!0)],2))),128))],2)],42,j6))),128)):le("v-if",!0)],2))}}),Fp=U6,Y6=ie({__name:"panel-time-pick",props:H6,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const n=e,a=t,o=_e(Xa),{arrowControl:l,disabledHours:s,disabledMinutes:r,disabledSeconds:u,defaultValue:c}=o.props,{getAvailableHours:d,getAvailableMinutes:f,getAvailableSeconds:p}=HS(s,r,u),g=he("time"),{t:v,lang:h}=Et(),m=A([0,2]),y=KS(n,{modelValue:S(()=>o.props.modelValue),valueOnClear:S(()=>o!=null&&o.emptyValues?o.emptyValues.valueOnClear.value:null)}),b=S(()=>xt(n.actualVisible)?`${g.namespace.value}-zoom-in-top`:""),w=S(()=>n.format.includes("ss")),C=S(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),k=I=>{const L=st(I).locale(h.value),z=U(L);return L.isSame(z)},E=()=>{const I=y.value;a("pick",I,!1),Ae(()=>{y.value=I})},T=(I=!1,L=!1)=>{L||a("pick",n.parsedValue,I)},$=I=>{n.visible&&a("pick",U(I).millisecond(0),!0)},N=(I,L)=>{a("select-range",I,L),m.value=[I,L]},O=I=>{const L=n.format,z=L.indexOf("HH"),H=L.indexOf("mm"),K=L.indexOf("ss"),q=[],Q=[];z!==-1&&(q.push(z),Q.push("hours")),H!==-1&&(q.push(H),Q.push("minutes")),K!==-1&&w.value&&(q.push(K),Q.push("seconds"));const ee=(q.indexOf(m.value[0])+I+q.length)%q.length;P.start_emitSelectRange(Q[ee])},_=I=>{const L=zt(I),{left:z,right:H,up:K,down:q}=Ce;if([z,H].includes(L)){O(L===z?-1:1),I.preventDefault();return}if([K,q].includes(L)){const Q=L===K?-1:1;P.start_scrollDown(Q),I.preventDefault();return}},{timePickerOptions:P,onSetOption:D,getAvailableTime:W}=FS({getAvailableHours:d,getAvailableMinutes:f,getAvailableSeconds:p}),U=I=>W(I,n.datetimeRole||"",!0),F=I=>I?st(I,n.format).locale(h.value):null,R=()=>st(c).locale(h.value);return a("set-picker-option",["isValidValue",k]),a("set-picker-option",["parseUserInput",F]),a("set-picker-option",["handleKeydownInput",_]),a("set-picker-option",["getRangeAvailableTime",U]),a("set-picker-option",["getDefaultValue",R]),a("set-picker-option",["handleCancel",E]),(I,L)=>(x(),re(Bn,{name:b.value},{default:ne(()=>[I.actualVisible||I.visible?(x(),B("div",{key:0,class:M(i(g).b("panel"))},[j("div",{class:M([i(g).be("panel","content"),{"has-seconds":w.value}])},[J(Fp,{ref:"spinner",role:I.datetimeRole||"start","arrow-control":i(l),"show-seconds":w.value,"am-pm-mode":C.value,"spinner-date":I.parsedValue,"disabled-hours":i(s),"disabled-minutes":i(r),"disabled-seconds":i(u),onChange:$,onSetOption:i(D),onSelectRange:N},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),j("div",{class:M(i(g).be("panel","footer"))},[j("button",{type:"button",class:M([i(g).be("panel","btn"),"cancel"]),onClick:E},ke(i(v)("el.datepicker.cancel")),3),j("button",{type:"button",class:M([i(g).be("panel","btn"),"confirm"]),onClick:L[0]||(L[0]=z=>T())},ke(i(v)("el.datepicker.confirm")),3)],2)],2)):le("v-if",!0)]),_:1},8,["name"]))}}),Lc=Y6;const q6=Se({...DS,parsedValue:{type:X(Array)}}),G6=["disabled"];var X6=ie({__name:"panel-time-range",props:q6,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const n=e,a=t,o=(G,V)=>{const Z=[];for(let oe=G;oe<=V;oe++)Z.push(oe);return Z},{t:l,lang:s}=Et(),r=he("time"),u=he("picker"),c=_e(Xa),{arrowControl:d,disabledHours:f,disabledMinutes:p,disabledSeconds:g,defaultValue:v}=c.props,h=S(()=>[r.be("range-picker","body"),r.be("panel","content"),r.is("arrow",d),k.value?"has-seconds":""]),m=S(()=>[r.be("range-picker","body"),r.be("panel","content"),r.is("arrow",d),k.value?"has-seconds":""]),y=S(()=>n.parsedValue[0]),b=S(()=>n.parsedValue[1]),w=KS(n,{modelValue:S(()=>c.props.modelValue),valueOnClear:S(()=>c!=null&&c.emptyValues?c.emptyValues.valueOnClear.value:null)}),C=()=>{const G=w.value;a("pick",G,!1),Ae(()=>{w.value=G})},k=S(()=>n.format.includes("ss")),E=S(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),T=(G=!1)=>{a("pick",[y.value,b.value],G)},$=G=>{_(G.millisecond(0),b.value)},N=G=>{_(y.value,G.millisecond(0))},O=G=>{const V=G.map(oe=>st(oe).locale(s.value)),Z=K(V);return V[0].isSame(Z[0])&&V[1].isSame(Z[1])},_=(G,V)=>{n.visible&&a("pick",[G,V],!0)},P=S(()=>y.value>b.value),D=A([0,2]),W=(G,V)=>{a("select-range",G,V,"min"),D.value=[G,V]},U=S(()=>k.value?11:8),F=(G,V)=>{a("select-range",G,V,"max");const Z=i(U);D.value=[G+Z,V+Z]},R=G=>{const V=k.value?[0,3,6,11,14,17]:[0,3,8,11],Z=["hours","minutes"].concat(k.value?["seconds"]:[]),oe=(V.indexOf(D.value[0])+G+V.length)%V.length,ce=V.length/2;oe{const V=zt(G),{left:Z,right:oe,up:ce,down:ge}=Ce;if([Z,oe].includes(V)){R(V===Z?-1:1),G.preventDefault();return}if([ce,ge].includes(V)){const me=V===ce?-1:1;ue[`${D.value[0]{const Z=f?f(G):[],oe=G==="start",ce=(V||(oe?b.value:y.value)).hour();return yf(Z,oe?o(ce+1,23):o(0,ce-1))},z=(G,V,Z)=>{const oe=p?p(G,V):[],ce=V==="start",ge=Z||(ce?b.value:y.value);if(G!==ge.hour())return oe;const me=ge.minute();return yf(oe,ce?o(me+1,59):o(0,me-1))},H=(G,V,Z,oe)=>{const ce=g?g(G,V,Z):[],ge=Z==="start",me=oe||(ge?b.value:y.value),Me=me.hour(),Ie=me.minute();if(G!==Me||V!==Ie)return ce;const Re=me.second();return yf(ce,ge?o(Re+1,59):o(0,Re-1))},K=([G,V])=>[te(G,"start",!0,V),te(V,"end",!1,G)],{getAvailableHours:q,getAvailableMinutes:Q,getAvailableSeconds:ee}=HS(L,z,H),{timePickerOptions:ue,getAvailableTime:te,onSetOption:de}=FS({getAvailableHours:q,getAvailableMinutes:Q,getAvailableSeconds:ee}),se=G=>G?be(G)?G.map(V=>st(V,n.format).locale(s.value)):st(G,n.format).locale(s.value):null,Y=()=>{if(be(v))return v.map(V=>st(V).locale(s.value));const G=st(v).locale(s.value);return[G,G.add(60,"m")]};return a("set-picker-option",["parseUserInput",se]),a("set-picker-option",["isValidValue",O]),a("set-picker-option",["handleKeydownInput",I]),a("set-picker-option",["getDefaultValue",Y]),a("set-picker-option",["getRangeAvailableTime",K]),a("set-picker-option",["handleCancel",C]),(G,V)=>G.actualVisible?(x(),B("div",{key:0,class:M([i(r).b("range-picker"),i(u).b("panel")])},[j("div",{class:M(i(r).be("range-picker","content"))},[j("div",{class:M(i(r).be("range-picker","cell"))},[j("div",{class:M(i(r).be("range-picker","header"))},ke(i(l)("el.datepicker.startTime")),3),j("div",{class:M(h.value)},[J(Fp,{ref:"minSpinner",role:"start","show-seconds":k.value,"am-pm-mode":E.value,"arrow-control":i(d),"spinner-date":y.value,"disabled-hours":L,"disabled-minutes":z,"disabled-seconds":H,onChange:$,onSetOption:i(de),onSelectRange:W},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2),j("div",{class:M(i(r).be("range-picker","cell"))},[j("div",{class:M(i(r).be("range-picker","header"))},ke(i(l)("el.datepicker.endTime")),3),j("div",{class:M(m.value)},[J(Fp,{ref:"maxSpinner",role:"end","show-seconds":k.value,"am-pm-mode":E.value,"arrow-control":i(d),"spinner-date":b.value,"disabled-hours":L,"disabled-minutes":z,"disabled-seconds":H,onChange:N,onSetOption:i(de),onSelectRange:F},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2)],2),j("div",{class:M(i(r).be("panel","footer"))},[j("button",{type:"button",class:M([i(r).be("panel","btn"),"cancel"]),onClick:V[0]||(V[0]=Z=>C())},ke(i(l)("el.datepicker.cancel")),3),j("button",{type:"button",class:M([i(r).be("panel","btn"),"confirm"]),disabled:P.value,onClick:V[1]||(V[1]=Z=>T())},ke(i(l)("el.datepicker.confirm")),11,G6)],2)],2)):le("v-if",!0)}}),Z6=X6,WS={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(pl,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},a=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,l=/\d\d/,s=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,u={},c=function(m){return(m=+m)+(m>68?1900:2e3)},d=function(m){return function(y){this[m]=+y}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var b=y.match(/([+-]|\d\d)/g),w=60*b[1]+(+b[2]||0);return w===0?0:b[0]==="+"?-w:w}(m)}],p=function(m){var y=u[m];return y&&(y.indexOf?y:y.s.concat(y.f))},g=function(m,y){var b,w=u.meridiem;if(w){for(var C=1;C<=24;C+=1)if(m.indexOf(w(C,0,y))>-1){b=C>12;break}}else b=m===(y?"pm":"PM");return b},v={A:[r,function(m){this.afternoon=g(m,!1)}],a:[r,function(m){this.afternoon=g(m,!0)}],Q:[o,function(m){this.month=3*(m-1)+1}],S:[o,function(m){this.milliseconds=100*+m}],SS:[l,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[s,d("seconds")],ss:[s,d("seconds")],m:[s,d("minutes")],mm:[s,d("minutes")],H:[s,d("hours")],h:[s,d("hours")],HH:[s,d("hours")],hh:[s,d("hours")],D:[s,d("day")],DD:[l,d("day")],Do:[r,function(m){var y=u.ordinal,b=m.match(/\d+/);if(this.day=b[0],y)for(var w=1;w<=31;w+=1)y(w).replace(/\[|\]/g,"")===m&&(this.day=w)}],w:[s,d("week")],ww:[l,d("week")],M:[s,d("month")],MM:[l,d("month")],MMM:[r,function(m){var y=p("months"),b=(p("monthsShort")||y.map(function(w){return w.slice(0,3)})).indexOf(m)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[r,function(m){var y=p("months").indexOf(m)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,d("year")],YY:[l,function(m){this.year=c(m)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function h(m){var y,b;y=m,b=u&&u.formats;for(var w=(m=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(O,_,P){var D=P&&P.toUpperCase();return _||b[P]||n[P]||b[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(W,U,F){return U||F.slice(1)})})).match(a),C=w.length,k=0;k-1)return new Date((I==="X"?1e3:1)*R);var H=h(I)(R),K=H.year,q=H.month,Q=H.day,ee=H.hours,ue=H.minutes,te=H.seconds,de=H.milliseconds,se=H.zone,Y=H.week,G=new Date,V=Q||(K||q?1:G.getDate()),Z=K||G.getFullYear(),oe=0;K&&!q||(oe=q>0?q-1:G.getMonth());var ce,ge=ee||0,me=ue||0,Me=te||0,Ie=de||0;return se?new Date(Date.UTC(Z,oe,V,ge,me,Me,Ie+60*se.offset*1e3)):L?new Date(Date.UTC(Z,oe,V,ge,me,Me,Ie)):(ce=new Date(Z,oe,V,ge,me,Me,Ie),Y&&(ce=z(ce).week(Y).toDate()),ce)}catch{return new Date("")}}(E,N,T,b),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),P&&E!=this.format(N)&&(this.$d=new Date("")),u={}}else if(N instanceof Array)for(var W=N.length,U=1;U<=W;U+=1){$[1]=N[U-1];var F=b.apply(this,$);if(F.isValid()){this.$d=F.$d,this.$L=F.$L,this.init();break}U===W&&(this.$d=new Date(""))}else C.call(this,k)}}})})(WS);var J6=WS.exports;const Dh=vl(J6);st.extend(Dh);var Q6=ie({name:"ElTimePicker",install:null,props:{...Lh,isRange:Boolean},emits:[at],setup(e,t){const n=A(),[a,o]=e.isRange?["timerange",Z6]:["time",Lc],l=s=>t.emit(at,s);return bt(Ph,e.popperOptions),t.expose({focus:()=>{var s;(s=n.value)==null||s.focus()},blur:()=>{var s;(s=n.value)==null||s.blur()},handleOpen:()=>{var s;(s=n.value)==null||s.handleOpen()},handleClose:()=>{var s;(s=n.value)==null||s.handleClose()}}),()=>{const s=e.format??Es;return J(BS,pt(e,{ref:n,type:a,format:s,"onUpdate:modelValue":l}),{default:r=>J(o,r,null)})}}});const eD=rt(Q6),ol=Se({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:eo},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),tD={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},nD=["aria-label"],aD=["aria-label"];var oD=ie({name:"ElTag",__name:"tag",props:ol,emits:tD,setup(e,{emit:t}){const n=e,a=t,o=bn(),{t:l}=Et(),s=he("tag"),r=S(()=>{const{type:f,hit:p,effect:g,closable:v,round:h}=n;return[s.b(),s.is("closable",v),s.m(f||"primary"),s.m(o.value),s.m(g),s.is("hit",p),s.is("round",h)]}),u=f=>{a("close",f)},c=f=>{a("click",f)},d=f=>{var p,g,v;(v=(g=(p=f==null?void 0:f.component)==null?void 0:p.subTree)==null?void 0:g.component)!=null&&v.bum&&(f.component.subTree.component.bum=null)};return(f,p)=>e.disableTransitions?(x(),B("span",{key:0,class:M(r.value),style:je({backgroundColor:e.color}),onClick:c},[j("span",{class:M(i(s).e("content"))},[ae(f.$slots,"default")],2),e.closable?(x(),B("button",{key:0,"aria-label":i(l)("el.tag.close"),class:M(i(s).e("close")),type:"button",onClick:Xe(u,["stop"])},[J(i(Be),null,{default:ne(()=>[J(i(La))]),_:1})],10,nD)):le("v-if",!0)],6)):(x(),re(Bn,{key:1,name:`${i(s).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:d},{default:ne(()=>[j("span",{class:M(r.value),style:je({backgroundColor:e.color}),onClick:c},[j("span",{class:M(i(s).e("content"))},[ae(f.$slots,"default")],2),e.closable?(x(),B("button",{key:0,"aria-label":i(l)("el.tag.close"),class:M(i(s).e("close")),type:"button",onClick:Xe(u,["stop"])},[J(i(Be),null,{default:ne(()=>[J(i(La))]),_:1})],10,aD)):le("v-if",!0)],6)]),_:3},8,["name"]))}}),lD=oD;const Xo=rt(lD),jS=Symbol("ElSelectGroup"),wu=Symbol("ElSelect"),Dc={label:"label",value:"value",disabled:"disabled",options:"options"};function Cu(e){const t=A({...Dc,...e.props});let n={...e.props};return fe(()=>e.props,r=>{tn(r,n)||(t.value={...Dc,...r},n={...r})},{deep:!0}),{aliasProps:t,getLabel:r=>mn(r,t.value.label),getValue:r=>mn(r,t.value.value),getDisabled:r=>mn(r,t.value.disabled),getOptions:r=>mn(r,t.value.options)}}const US=Se({name:String,id:String,modelValue:{type:X([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Sn,effect:{type:X(String),default:"light"},disabled:{type:Boolean,default:void 0},clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperStyle:{type:X([String,Object])},popperOptions:{type:X(Object),default:()=>({})},remote:Boolean,debounce:{type:Number,default:300},loadingText:String,noMatchText:String,noDataText:String,remoteMethod:{type:X(Function)},filterMethod:{type:X(Function)},multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,tagTooltip:{type:X(Object),default:()=>({})},maxCollapseTags:{type:Number,default:1},teleported:Bt.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:Ft,default:_o},fitInputWidth:Boolean,suffixIcon:{type:Ft,default:Io},tagType:{...ol.type,default:"info"},tagEffect:{...ol.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:X(String),values:Mo,default:"bottom-start"},fallbackPlacements:{type:X(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:Bt.appendTo,options:{type:X(Array)},props:{type:X(Object),default:()=>Dc},...Is,...Qn(["ariaLabel"])});bS.scroll;const zp="ElOption",sD=Se({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function rD(e,t){const n=_e(wu);n||Jt(zp,"usage: ");const a=_e(jS,{disabled:!1}),o=S(()=>d(Tn(n.props.modelValue),e.value)),l=S(()=>{if(n.props.multiple){const g=Tn(n.props.modelValue??[]);return!o.value&&g.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),s=S(()=>e.label??(ot(e.value)?"":e.value)),r=S(()=>e.value||e.label||""),u=S(()=>e.disabled||t.groupDisabled||l.value),c=vt(),d=(g=[],v)=>{if(ot(e.value)){const h=n.props.valueKey;return g&&g.some(m=>Kt(mn(m,h))===mn(v,h))}else return g&&g.includes(v)},f=()=>{u.value||(n.states.hoveringIndex=n.optionsArray.indexOf(c.proxy))},p=g=>{t.visible=new RegExp(lh(g),"i").test(String(s.value))||e.created};return fe(()=>s.value,()=>{!e.created&&!n.props.remote&&n.setSelected()}),fe(()=>e.value,(g,v)=>{const{remote:h,valueKey:m}=n.props;if((h?g!==v:!tn(g,v))&&(n.onOptionDestroy(v,c.proxy),n.onOptionCreate(c.proxy)),!e.created&&!h){if(m&&ot(g)&&ot(v)&&g[m]===v[m])return;n.setSelected()}}),fe(()=>a.disabled,()=>{t.groupDisabled=a.disabled},{immediate:!0}),{select:n,currentLabel:s,currentValue:r,itemSelected:o,isDisabled:u,hoverItem:f,updateOption:p}}var iD=ie({name:zp,componentName:zp,props:sD,setup(e){const t=he("select"),n=Fn(),a=S(()=>[t.be("dropdown","item"),t.is("disabled",i(r)),t.is("selected",i(s)),t.is("hovering",i(p))]),o=Rt({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:l,itemSelected:s,isDisabled:r,select:u,hoverItem:c,updateOption:d}=rD(e,o),{visible:f,hover:p}=Nn(o),g=vt().proxy;u.onOptionCreate(g),Pt(()=>{const m=g.value;Ae(()=>{const{selected:y}=u.states,b=y.some(w=>w.value===g.value);u.states.cachedOptions.get(m)===g&&!b&&u.states.cachedOptions.delete(m)}),u.onOptionDestroy(m,g)});function v(){r.value||u.handleOptionSelect(g)}return{ns:t,id:n,containerKls:a,currentLabel:l,itemSelected:s,isDisabled:r,select:u,visible:f,hover:p,states:o,hoverItem:c,handleMousedown:m=>{let y=m.target;const b=m.currentTarget;for(;y&&y!==b;){if(ws(y))return;y=y.parentElement}m.preventDefault()},updateOption:d,selectOptionClick:v}}});const uD=["id","aria-disabled","aria-selected"];function cD(e,t,n,a,o,l){return dt((x(),B("li",{id:e.id,class:M(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMousemove:t[0]||(t[0]=(...s)=>e.hoverItem&&e.hoverItem(...s)),onMousedown:t[1]||(t[1]=(...s)=>e.handleMousedown&&e.handleMousedown(...s)),onClick:t[2]||(t[2]=Xe((...s)=>e.selectOptionClick&&e.selectOptionClick(...s),["stop"]))},[ae(e.$slots,"default",{},()=>[j("span",null,ke(e.currentLabel),1)])],42,uD)),[[Nt,e.visible]])}var Vh=kn(iD,[["render",cD]]),dD=ie({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=he("select"),n=A(),a=vt(),o=A([]);bt(jS,Rt({...Nn(e)}));const l=S(()=>o.value.some(c=>c.visible===!0)),s=c=>{var d;return c.type.name==="ElOption"&&!!((d=c.component)!=null&&d.proxy)},r=c=>{const d=Tn(c),f=[];return d.forEach(p=>{var g;Ht(p)&&(s(p)?f.push(p.component.proxy):be(p.children)&&p.children.length?f.push(...r(p.children)):(g=p.component)!=null&&g.subTree&&f.push(...r(p.component.subTree)))}),f},u=()=>{o.value=r(a.subTree)};return mt(()=>{u()}),tu(n,u,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:l,ns:t}}});function fD(e,t,n,a,o,l){return dt((x(),B("ul",{ref:"groupRef",class:M(e.ns.be("group","wrap"))},[j("li",{class:M(e.ns.be("group","title"))},ke(e.label),3),j("li",null,[j("ul",{class:M(e.ns.b("group"))},[ae(e.$slots,"default")],2)])],2)),[[Nt,e.visible]])}var Bh=kn(dD,[["render",fD]]),pD=ie({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=_e(wu),t=he("select"),n=S(()=>e.props.popperClass),a=S(()=>e.props.multiple),o=S(()=>e.props.fitInputWidth),l=A("");function s(){var u;const r=(u=e.selectRef)==null?void 0:u.offsetWidth;r?l.value=`${r-sw}px`:l.value=""}return mt(()=>{s(),Xt(e.selectRef,s)}),{ns:t,minWidth:l,popperClass:n,isMultiple:a,isFitInputWidth:o}}});function vD(e,t,n,a,o,l){return x(),B("div",{class:M([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:je({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(x(),B("div",{key:0,class:M(e.ns.be("dropdown","header"))},[ae(e.$slots,"header")],2)):le("v-if",!0),ae(e.$slots,"default"),e.$slots.footer?(x(),B("div",{key:1,class:M(e.ns.be("dropdown","footer"))},[ae(e.$slots,"footer")],2)):le("v-if",!0)],6)}var hD=kn(pD,[["render",vD]]);const mD=(e,t)=>{const{t:n}=Et(),a=fn(),o=Fn(),l=he("select"),s=he("input"),r=Rt({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),u=A(),c=A(),d=A(),f=A(),p=A(),g=A(),v=A(),h=A(),m=A(),y=A(),b=A(),w=A(!1),C=A(),k=A(!1),{form:E,formItem:T}=Pn(),{inputId:$}=Ta(e,{formItemContext:T}),{valueOnClear:N,isEmptyValue:O}=gu(e),{isComposing:_,handleCompositionStart:P,handleCompositionUpdate:D,handleCompositionEnd:W}=mu({afterComposition:Ee=>qe(Ee)}),U=on(),{wrapperRef:F,isFocused:R,handleBlur:I}=dl(p,{disabled:U,afterFocus(){e.automaticDropdown&&!w.value&&(w.value=!0,r.menuVisibleOnFocus=!0)},beforeBlur(Ee){var Je,Tt;return((Je=d.value)==null?void 0:Je.isFocusInsideContent(Ee))||((Tt=f.value)==null?void 0:Tt.isFocusInsideContent(Ee))},afterBlur(){var Ee;w.value=!1,r.menuVisibleOnFocus=!1,e.validateEvent&&((Ee=T==null?void 0:T.validate)==null||Ee.call(T,"blur").catch(Je=>ft(Je)))}}),L=S(()=>be(e.modelValue)?e.modelValue.length>0:!O(e.modelValue)),z=S(()=>(E==null?void 0:E.statusIcon)??!1),H=S(()=>e.clearable&&!U.value&&L.value&&(R.value||r.inputHovering)),K=S(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),q=S(()=>l.is("reverse",!!(K.value&&w.value))),Q=S(()=>(T==null?void 0:T.validateState)||""),ee=S(()=>Q.value&&Dd[Q.value]),ue=S(()=>e.remote?e.debounce:0),te=S(()=>e.remote&&!r.inputValue&&r.options.size===0),de=S(()=>e.loading?e.loadingText||n("el.select.loading"):e.filterable&&r.inputValue&&r.options.size>0&&se.value===0?e.noMatchText||n("el.select.noMatch"):r.options.size===0?e.noDataText||n("el.select.noData"):null),se=S(()=>Y.value.filter(Ee=>Ee.visible).length),Y=S(()=>{const Ee=Array.from(r.options.values()),Je=[];return r.optionValues.forEach(Tt=>{const Gt=Ee.findIndex(yn=>yn.value===Tt);Gt>-1&&Je.push(Ee[Gt])}),Je.length>=Ee.length?Je:Ee}),G=S(()=>Array.from(r.cachedOptions.values())),V=S(()=>{const Ee=Y.value.filter(Je=>!Je.created).some(Je=>Je.currentLabel===r.inputValue);return e.filterable&&e.allowCreate&&r.inputValue!==""&&!Ee}),Z=()=>{e.filterable&&ze(e.filterMethod)||e.filterable&&e.remote&&ze(e.remoteMethod)||Y.value.forEach(Ee=>{var Je;(Je=Ee.updateOption)==null||Je.call(Ee,r.inputValue)})},oe=bn(),ce=S(()=>["small"].includes(oe.value)?"small":"default"),ge=S({get(){return w.value&&(e.loading||!te.value||e.remote&&!!a.empty)&&(!k.value||!la(r.previousQuery)||r.options.size>0)},set(Ee){w.value=Ee}}),me=S(()=>{if(e.multiple&&!xt(e.modelValue))return Tn(e.modelValue).length===0&&!r.inputValue;const Ee=be(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||xt(Ee)?!r.inputValue:!0}),Me=S(()=>{const Ee=e.placeholder??n("el.select.placeholder");return e.multiple||!L.value?Ee:r.selectedLabel}),Ie=S(()=>Tc?null:"mouseenter");fe(()=>e.modelValue,(Ee,Je)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(r.inputValue="",Re("")),Te(),!tn(Ee,Je)&&e.validateEvent&&(T==null||T.validate("change").catch(Tt=>ft(Tt)))},{flush:"post",deep:!0}),fe(()=>w.value,Ee=>{Ee?Re(r.inputValue):(r.inputValue="",r.previousQuery=null,r.isBeforeHide=!0,r.menuVisibleOnFocus=!1)}),fe(()=>r.options.entries(),()=>{Mt&&(Te(),e.defaultFirstOption&&(e.filterable||e.remote)&&se.value&&ye())},{flush:"post"}),fe([()=>r.hoveringIndex,Y],([Ee])=>{Fe(Ee)&&Ee>-1?C.value=Y.value[Ee]||{}:C.value={},Y.value.forEach(Je=>{Je.hover=C.value===Je})}),sa(()=>{r.isBeforeHide||Z()});const Re=Ee=>{r.previousQuery===Ee||_.value||(r.previousQuery=Ee,e.filterable&&ze(e.filterMethod)?e.filterMethod(Ee):e.filterable&&e.remote&&ze(e.remoteMethod)&&e.remoteMethod(Ee),e.defaultFirstOption&&(e.filterable||e.remote)&&se.value?Ae(ye):Ae(Pe))},ye=()=>{const Ee=Y.value.filter(Gt=>Gt.visible&&!Gt.disabled&&!Gt.states.groupDisabled),Je=Ee.find(Gt=>Gt.created),Tt=Ee[0];r.hoveringIndex=$e(Y.value.map(Gt=>Gt.value),Je||Tt)},Te=()=>{if(e.multiple)r.selectedLabel="";else{const Je=we(be(e.modelValue)?e.modelValue[0]:e.modelValue);r.selectedLabel=Je.currentLabel,r.selected=[Je];return}const Ee=[];xt(e.modelValue)||Tn(e.modelValue).forEach(Je=>{Ee.push(we(Je))}),r.selected=Ee},we=Ee=>{let Je;const Tt=bi(Ee);for(let Gt=r.cachedOptions.size-1;Gt>=0;Gt--){const yn=G.value[Gt];if(Tt?mn(yn.value,e.valueKey)===mn(Ee,e.valueKey):yn.value===Ee){Je={index:Y.value.filter(Mn=>!Mn.created).indexOf(yn),value:Ee,currentLabel:yn.currentLabel,get isDisabled(){return yn.isDisabled}};break}}return Je||{index:-1,value:Ee,currentLabel:Tt?Ee.label:Ee??""}},Pe=()=>{const Ee=r.selected.length;if(Ee>0){const Je=r.selected[Ee-1];r.hoveringIndex=Y.value.findIndex(Tt=>En(Je)===En(Tt))}else r.hoveringIndex=-1},Ve=()=>{r.selectionWidth=Number.parseFloat(window.getComputedStyle(c.value).width)},Qe=()=>{r.collapseItemWidth=y.value.getBoundingClientRect().width},tt=()=>{var Ee,Je;(Je=(Ee=d.value)==null?void 0:Ee.updatePopper)==null||Je.call(Ee)},nt=()=>{var Ee,Je;(Je=(Ee=f.value)==null?void 0:Ee.updatePopper)==null||Je.call(Ee)},Oe=()=>{r.inputValue.length>0&&!w.value&&(w.value=!0),Re(r.inputValue)},qe=Ee=>{if(r.inputValue=Ee.target.value,e.remote)k.value=!0,it();else return Oe()},it=eu(()=>{Oe(),k.value=!1},ue),We=Ee=>{tn(e.modelValue,Ee)||t(yt,Ee)},et=Ee=>Gw(Ee,Je=>{const Tt=r.cachedOptions.get(Je);return!(Tt!=null&&Tt.disabled)&&!(Tt!=null&&Tt.states.groupDisabled)}),gt=Ee=>{const Je=zt(Ee);if(e.multiple&&Je!==Ce.delete&&Ee.target.value.length<=0){const Tt=Tn(e.modelValue).slice(),Gt=et(Tt);if(Gt<0)return;const yn=Tt[Gt];Tt.splice(Gt,1),t(at,Tt),We(Tt),t("remove-tag",yn)}},ve=(Ee,Je)=>{const Tt=r.selected.indexOf(Je);if(Tt>-1&&!U.value){const Gt=Tn(e.modelValue).slice();Gt.splice(Tt,1),t(at,Gt),We(Gt),t("remove-tag",Je.value)}Ee.stopPropagation(),Ze()},Le=Ee=>{Ee.stopPropagation();const Je=e.multiple?[]:N.value;if(e.multiple)for(const Tt of r.selected)Tt.isDisabled&&Je.push(Tt.value);t(at,Je),We(Je),r.hoveringIndex=-1,w.value=!1,t("clear"),Ze()},pe=Ee=>{if(e.multiple){const Je=Tn(e.modelValue??[]).slice(),Tt=$e(Je,Ee);Tt>-1?Je.splice(Tt,1):(e.multipleLimit<=0||Je.length{ut(Ee)})},$e=(Ee,Je)=>xt(Je)?-1:ot(Je.value)?Ee.findIndex(Tt=>tn(mn(Tt,e.valueKey),En(Je))):Ee.indexOf(Je.value),ut=Ee=>{var Gt,yn,Mn,Ao,Dr;const Je=be(Ee)?Ee[Ee.length-1]:Ee;let Tt=null;if(!hn(Je==null?void 0:Je.value)){const Wl=Y.value.filter(Ps=>Ps.value===Je.value);Wl.length>0&&(Tt=Wl[0].$el)}if(d.value&&Tt){const Wl=(Ao=(Mn=(yn=(Gt=d.value)==null?void 0:Gt.popperRef)==null?void 0:yn.contentRef)==null?void 0:Mn.querySelector)==null?void 0:Ao.call(Mn,`.${l.be("dropdown","wrap")}`);Wl&&ih(Wl,Tt)}(Dr=b.value)==null||Dr.handleScroll()},It=Ee=>{r.options.set(Ee.value,Ee),r.cachedOptions.set(Ee.value,Ee)},Yt=(Ee,Je)=>{r.options.get(Ee)===Je&&r.options.delete(Ee)},Ne=S(()=>{var Ee,Je;return(Je=(Ee=d.value)==null?void 0:Ee.popperRef)==null?void 0:Je.contentRef}),Ke=()=>{r.isBeforeHide=!1,Ae(()=>{var Ee;(Ee=b.value)==null||Ee.update(),ut(r.selected)})},Ze=()=>{var Ee;(Ee=p.value)==null||Ee.focus()},rn=()=>{var Ee;if(w.value){w.value=!1,Ae(()=>{var Je;return(Je=p.value)==null?void 0:Je.blur()});return}(Ee=p.value)==null||Ee.blur()},Dt=Ee=>{Le(Ee)},qt=Ee=>{if(w.value=!1,R.value){const Je=new FocusEvent("blur",Ee);Ae(()=>I(Je))}},Ue=()=>{r.inputValue.length>0?r.inputValue="":w.value=!1},Ge=Ee=>{var Je;U.value||e.filterable&&w.value&&Ee&&!((Je=v.value)!=null&&Je.contains(Ee.target))||(Tc&&(r.inputHovering=!0),r.menuVisibleOnFocus?r.menuVisibleOnFocus=!1:w.value=!w.value)},ht=()=>{if(!w.value)Ge();else{const Ee=Y.value[r.hoveringIndex];Ee&&!Ee.isDisabled&&pe(Ee)}},En=Ee=>ot(Ee.value)?mn(Ee.value,e.valueKey):Ee.value,lo=S(()=>Y.value.filter(Ee=>Ee.visible).every(Ee=>Ee.isDisabled)),Da=S(()=>e.multiple?e.collapseTags?r.selected.slice(0,e.maxCollapseTags):r.selected:[]),xu=S(()=>e.multiple?e.collapseTags?r.selected.slice(e.maxCollapseTags):[]:[]),Kl=Ee=>{if(!w.value){w.value=!0;return}if(!(r.options.size===0||se.value===0||_.value)&&!lo.value){Ee==="next"?(r.hoveringIndex++,r.hoveringIndex===r.options.size&&(r.hoveringIndex=0)):Ee==="prev"&&(r.hoveringIndex--,r.hoveringIndex<0&&(r.hoveringIndex=r.options.size-1));const Je=Y.value[r.hoveringIndex];(Je.isDisabled||!Je.visible)&&Kl(Ee),Ae(()=>ut(C.value))}},Tu=(Ee,Je,Tt,Gt)=>{for(let yn=Je;yn>=0&&yn{const Tt=r.options.size;if(Tt===0)return;const Gt=as(Ee,0,Tt-1),yn=Y.value,Mn=Je==="up"?-1:1,Ao=Tu(yn,Gt,Mn,Tt)??Tu(yn,Gt-Mn,-Mn,Tt);Ao!=null&&(r.hoveringIndex=Ao,Ae(()=>ut(C.value)))},Xd=Ee=>{const Je=zt(Ee);let Tt=!0;switch(Je){case Ce.up:Kl("prev");break;case Ce.down:Kl("next");break;case Ce.enter:case Ce.numpadEnter:_.value||ht();break;case Ce.esc:Ue();break;case Ce.backspace:Tt=!1,gt(Ee);return;case Ce.home:if(!w.value)return;Po(0,"down");break;case Ce.end:if(!w.value)return;Po(r.options.size-1,"up");break;case Ce.pageUp:if(!w.value)return;Po(r.hoveringIndex-10,"up");break;case Ce.pageDown:if(!w.value)return;Po(r.hoveringIndex+10,"down");break;default:Tt=!1;break}Tt&&(Ee.preventDefault(),Ee.stopPropagation())},Zd=()=>{if(!c.value)return 0;const Ee=window.getComputedStyle(c.value);return Number.parseFloat(Ee.gap||"6px")},Jd=S(()=>{const Ee=Zd(),Je=e.filterable?Ee+hd:0;return{maxWidth:`${y.value&&e.maxCollapseTags===1?r.selectionWidth-r.collapseItemWidth-Ee-Je:r.selectionWidth-Je}px`}}),Qd=S(()=>({maxWidth:`${r.selectionWidth}px`})),ef=Ee=>{t("popup-scroll",Ee)};Xt(c,Ve),Xt(F,tt),Xt(m,nt),Xt(y,Qe);let hl;return fe(()=>ge.value,Ee=>{Ee?hl=Xt(h,tt).stop:(hl==null||hl(),hl=void 0),t("visible-change",Ee)}),mt(()=>{Te()}),{inputId:$,contentId:o,nsSelect:l,nsInput:s,states:r,isFocused:R,expanded:w,optionsArray:Y,hoverOption:C,selectSize:oe,filteredOptionsCount:se,updateTooltip:tt,updateTagTooltip:nt,debouncedOnInputChange:it,onInput:qe,deletePrevTag:gt,deleteTag:ve,deleteSelected:Le,handleOptionSelect:pe,scrollToOption:ut,hasModelValue:L,shouldShowPlaceholder:me,currentPlaceholder:Me,mouseEnterEventName:Ie,needStatusIcon:z,showClearBtn:H,iconComponent:K,iconReverse:q,validateState:Q,validateIcon:ee,showNewOption:V,updateOptions:Z,collapseTagSize:ce,setSelected:Te,selectDisabled:U,emptyText:de,handleCompositionStart:P,handleCompositionUpdate:D,handleCompositionEnd:W,handleKeydown:Xd,onOptionCreate:It,onOptionDestroy:Yt,handleMenuEnter:Ke,focus:Ze,blur:rn,handleClearClick:Dt,handleClickOutside:qt,handleEsc:Ue,toggleMenu:Ge,selectOption:ht,getValueKey:En,navigateOptions:Kl,dropdownMenuVisible:ge,showTagList:Da,collapseTagList:xu,popupScroll:ef,getOption:we,tagStyle:Jd,collapseTagStyle:Qd,popperRef:Ne,inputRef:p,tooltipRef:d,tagTooltipRef:f,prefixRef:g,suffixRef:v,selectRef:u,wrapperRef:F,selectionRef:c,scrollbarRef:b,menuRef:h,tagMenuRef:m,collapseItemRef:y}};var gD=ie({name:"ElOptions",setup(e,{slots:t}){const n=_e(wu);let a=[];return()=>{var r,u;const o=(r=t.default)==null?void 0:r.call(t),l=[];function s(c){be(c)&&c.forEach(d=>{var p,g,v,h;const f=(p=(d==null?void 0:d.type)||{})==null?void 0:p.name;f==="ElOptionGroup"?s(!De(d.children)&&!be(d.children)&&ze((g=d.children)==null?void 0:g.default)?(v=d.children)==null?void 0:v.default():d.children):f==="ElOption"?l.push((h=d.props)==null?void 0:h.value):be(d.children)&&s(d.children)})}return o.length&&s((u=o[0])==null?void 0:u.children),tn(l,a)||(a=l,n&&(n.states.optionValues=l)),o}}});const ub="ElSelect",Di=new WeakMap,yD=e=>(...t)=>{var o,l;const n=t[0];if(!n||n.includes('Slot "default" invoked outside of the render function')&&((o=t[2])!=null&&o.includes("ElTreeSelect")))return;const a=(l=Di.get(e))==null?void 0:l.originalWarnHandler;if(a){a(...t);return}console.warn(...t)},bD=e=>{let t=Di.get(e);return t||(t={originalWarnHandler:e.config.warnHandler,handler:yD(e),count:0},Di.set(e,t)),t};var wD=ie({name:ub,componentName:ub,components:{ElSelectMenu:hD,ElOption:Vh,ElOptions:gD,ElOptionGroup:Bh,ElTag:Xo,ElScrollbar:Ga,ElTooltip:_n,ElIcon:Be},directives:{ClickOutside:Ll},props:US,emits:[at,yt,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(e,{emit:t,slots:n}){const a=vt(),o=bD(a.appContext);o.count+=1,a.appContext.config.warnHandler=o.handler;const l=S(()=>{const{modelValue:b,multiple:w}=e,C=w?[]:void 0;return be(b)?w?b:C:w?C:b}),s=Rt({...Nn(e),modelValue:l}),r=mD(s,t),{calculatorRef:u,inputStyle:c}=oh(),{getLabel:d,getValue:f,getOptions:p,getDisabled:g}=Cu(e),v=b=>({label:d(b),value:f(b),disabled:g(b)}),h=b=>b.reduce((w,C)=>(w.push(C),C.children&&C.children.length>0&&w.push(...h(C.children)),w),[]),m=b=>{wa(b||[]).forEach(w=>{var C;if(ot(w)&&(w.type.name==="ElOption"||w.type.name==="ElTree")){const k=w.type.name;if(k==="ElTree")h(((C=w.props)==null?void 0:C.data)||[]).forEach(E=>{E.currentLabel=E.label??(ot(E.value)?"":E.value),r.onOptionCreate(E)});else if(k==="ElOption"){const E={...w.props};E.currentLabel=E.label??(ot(E.value)?"":E.value),r.onOptionCreate(E)}}})};fe(()=>{var b;return[e.persistent||r.expanded.value||!n.default||(b=n.default)==null?void 0:b.call(n),l.value]},()=>{var b;e.persistent||r.expanded.value||n.default&&(r.states.options.clear(),m((b=n.default)==null?void 0:b.call(n)))},{immediate:!0}),bt(wu,Rt({props:s,states:r.states,selectRef:r.selectRef,optionsArray:r.optionsArray,setSelected:r.setSelected,handleOptionSelect:r.handleOptionSelect,onOptionCreate:r.onOptionCreate,onOptionDestroy:r.onOptionDestroy}));const y=S(()=>e.multiple?r.states.selected.map(b=>b.currentLabel):r.states.selectedLabel);return Pt(()=>{const b=Di.get(a.appContext);b&&(b.count-=1,b.count<=0&&(a.appContext.config.warnHandler=b.originalWarnHandler,Di.delete(a.appContext)))}),{...r,modelValue:l,selectedLabel:y,calculatorRef:u,inputStyle:c,getLabel:d,getValue:f,getOptions:p,getDisabled:g,getOptionProps:v}}});const CD=["id","value","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],SD=["textContent"],kD={key:1};function ED(e,t,n,a,o,l){const s=Ot("el-tag"),r=Ot("el-tooltip"),u=Ot("el-icon"),c=Ot("el-option"),d=Ot("el-option-group"),f=Ot("el-options"),p=Ot("el-scrollbar"),g=Ot("el-select-menu"),v=Pv("click-outside");return dt((x(),B("div",pt({ref:"selectRef",class:[e.nsSelect.b(),e.nsSelect.m(e.selectSize)]},{[oi(e.mouseEnterEventName)]:t[11]||(t[11]=h=>e.states.inputHovering=!0)},{onMouseleave:t[12]||(t[12]=h=>e.states.inputHovering=!1)}),[J(r,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-style":e.popperStyle,"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:t[10]||(t[10]=h=>e.states.isBeforeHide=!1)},{default:ne(()=>{var h;return[j("div",{ref:"wrapperRef",class:M([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:t[7]||(t[7]=Xe((...m)=>e.toggleMenu&&e.toggleMenu(...m),["prevent"]))},[e.$slots.prefix?(x(),B("div",{key:0,ref:"prefixRef",class:M(e.nsSelect.e("prefix"))},[ae(e.$slots,"prefix")],2)):le("v-if",!0),j("div",{ref:"selectionRef",class:M([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?ae(e.$slots,"tag",{key:0,data:e.states.selected,deleteTag:e.deleteTag,selectDisabled:e.selectDisabled},()=>{var m,y,b,w,C,k,E,T,$,N,O,_,P;return[(x(!0),B(He,null,Ct(e.showTagList,D=>(x(),B("div",{key:e.getValueKey(D),class:M(e.nsSelect.e("selected-item"))},[J(s,{closable:!e.selectDisabled&&!D.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:je(e.tagStyle),onClose:W=>e.deleteTag(W,D)},{default:ne(()=>[j("span",{class:M(e.nsSelect.e("tags-text"))},[ae(e.$slots,"label",{index:D.index,label:D.currentLabel,value:D.value},()=>[St(ke(D.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(x(),re(r,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":((m=e.tagTooltip)==null?void 0:m.fallbackPlacements)??["bottom","top","right","left"],effect:((y=e.tagTooltip)==null?void 0:y.effect)??e.effect,placement:((b=e.tagTooltip)==null?void 0:b.placement)??"bottom","popper-class":((w=e.tagTooltip)==null?void 0:w.popperClass)??e.popperClass,"popper-style":((C=e.tagTooltip)==null?void 0:C.popperStyle)??e.popperStyle,teleported:((k=e.tagTooltip)==null?void 0:k.teleported)??e.teleported,"append-to":((E=e.tagTooltip)==null?void 0:E.appendTo)??e.appendTo,"popper-options":((T=e.tagTooltip)==null?void 0:T.popperOptions)??e.popperOptions,transition:($=e.tagTooltip)==null?void 0:$.transition,"show-after":(N=e.tagTooltip)==null?void 0:N.showAfter,"hide-after":(O=e.tagTooltip)==null?void 0:O.hideAfter,"auto-close":(_=e.tagTooltip)==null?void 0:_.autoClose,offset:(P=e.tagTooltip)==null?void 0:P.offset},{default:ne(()=>[j("div",{ref:"collapseItemRef",class:M(e.nsSelect.e("selected-item"))},[J(s,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:je(e.collapseTagStyle)},{default:ne(()=>[j("span",{class:M(e.nsSelect.e("tags-text"))}," + "+ke(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:ne(()=>[j("div",{ref:"tagMenuRef",class:M(e.nsSelect.e("selection"))},[(x(!0),B(He,null,Ct(e.collapseTagList,D=>(x(),B("div",{key:e.getValueKey(D),class:M(e.nsSelect.e("selected-item"))},[J(s,{class:"in-tooltip",closable:!e.selectDisabled&&!D.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:W=>e.deleteTag(W,D)},{default:ne(()=>[j("span",{class:M(e.nsSelect.e("tags-text"))},[ae(e.$slots,"label",{index:D.index,label:D.currentLabel,value:D.value},()=>[St(ke(D.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","fallback-placements","effect","placement","popper-class","popper-style","teleported","append-to","popper-options","transition","show-after","hide-after","auto-close","offset"])):le("v-if",!0)]}):le("v-if",!0),j("div",{class:M([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable||e.selectDisabled||!e.states.inputValue&&!e.isFocused)])},[j("input",{id:e.inputId,ref:"inputRef",value:e.states.inputValue,type:"text",name:e.name,class:M([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:je(e.inputStyle),tabindex:e.tabindex,role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((h=e.hoverOption)==null?void 0:h.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:t[0]||(t[0]=(...m)=>e.handleKeydown&&e.handleKeydown(...m)),onCompositionstart:t[1]||(t[1]=(...m)=>e.handleCompositionStart&&e.handleCompositionStart(...m)),onCompositionupdate:t[2]||(t[2]=(...m)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...m)),onCompositionend:t[3]||(t[3]=(...m)=>e.handleCompositionEnd&&e.handleCompositionEnd(...m)),onInput:t[4]||(t[4]=(...m)=>e.onInput&&e.onInput(...m)),onChange:t[5]||(t[5]=Xe(()=>{},["stop"])),onClick:t[6]||(t[6]=Xe((...m)=>e.toggleMenu&&e.toggleMenu(...m),["stop"]))},null,46,CD),e.filterable?(x(),B("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:M(e.nsSelect.e("input-calculator")),textContent:ke(e.states.inputValue)},null,10,SD)):le("v-if",!0)],2),e.shouldShowPlaceholder?(x(),B("div",{key:1,class:M([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?ae(e.$slots,"label",{key:0,index:e.getOption(e.modelValue).index,label:e.currentPlaceholder,value:e.modelValue},()=>[j("span",null,ke(e.currentPlaceholder),1)]):(x(),B("span",kD,ke(e.currentPlaceholder),1))],2)):le("v-if",!0)],2),j("div",{ref:"suffixRef",class:M(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClearBtn?(x(),re(u,{key:0,class:M([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:ne(()=>[(x(),re(ct(e.iconComponent)))]),_:1},8,["class"])):le("v-if",!0),e.showClearBtn&&e.clearIcon?(x(),re(u,{key:1,class:M([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:ne(()=>[(x(),re(ct(e.clearIcon)))]),_:1},8,["class","onClick"])):le("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(x(),re(u,{key:2,class:M([e.nsInput.e("icon"),e.nsInput.e("validateIcon"),e.nsInput.is("loading",e.validateState==="validating")])},{default:ne(()=>[(x(),re(ct(e.validateIcon)))]),_:1},8,["class"])):le("v-if",!0)],2)],2)]}),content:ne(()=>[J(g,{ref:"menuRef"},{default:ne(()=>[e.$slots.header?(x(),B("div",{key:0,class:M(e.nsSelect.be("dropdown","header")),onClick:t[8]||(t[8]=Xe(()=>{},["stop"]))},[ae(e.$slots,"header")],2)):le("v-if",!0),dt(J(p,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:M([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical",onScroll:e.popupScroll},{default:ne(()=>[e.showNewOption?(x(),re(c,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):le("v-if",!0),J(f,null,{default:ne(()=>[ae(e.$slots,"default",{},()=>[(x(!0),B(He,null,Ct(e.options,(h,m)=>{var y;return x(),B(He,{key:m},[(y=e.getOptions(h))!=null&&y.length?(x(),re(d,{key:0,label:e.getLabel(h),disabled:e.getDisabled(h)},{default:ne(()=>[(x(!0),B(He,null,Ct(e.getOptions(h),b=>(x(),re(c,pt({key:e.getValue(b)},{ref_for:!0},e.getOptionProps(b)),null,16))),128))]),_:2},1032,["label","disabled"])):(x(),re(c,pt({key:1,ref_for:!0},e.getOptionProps(h)),null,16))],64)}),128))])]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[Nt,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(x(),B("div",{key:1,class:M(e.nsSelect.be("dropdown","loading"))},[ae(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(x(),B("div",{key:2,class:M(e.nsSelect.be("dropdown","empty"))},[ae(e.$slots,"empty",{},()=>[j("span",null,ke(e.emptyText),1)])],2)):le("v-if",!0),e.$slots.footer?(x(),B("div",{key:3,class:M(e.nsSelect.be("dropdown","footer")),onClick:t[9]||(t[9]=Xe(()=>{},["stop"]))},[ae(e.$slots,"footer")],2)):le("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-style","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow"])],16)),[[v,e.handleClickOutside,e.popperRef]])}var xD=kn(wD,[["render",ED]]);const zl=rt(xD,{Option:Vh,OptionGroup:Bh}),Vc=Qt(Vh),TD=Qt(Bh),$D=(e,t)=>{const n=e.subtract(1,"month").endOf("month").date();return Il(t).map((a,o)=>n-(t-o-1))},OD=e=>Il(e.daysInMonth()).map((t,n)=>n+1),ND=e=>Il(e.length/7).map(t=>{const n=t*7;return e.slice(n,n+7)}),MD=Se({selectedDay:{type:X(Object)},range:{type:X(Array)},date:{type:X(Object),required:!0},hideHeader:{type:Boolean}}),RD={pick:e=>ot(e)};var YS={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(pl,function(){return function(n,a,o){var l=a.prototype,s=function(f){return f&&(f.indexOf?f:f.s)},r=function(f,p,g,v,h){var m=f.name?f:f.$locale(),y=s(m[p]),b=s(m[g]),w=y||b.map(function(k){return k.slice(0,v)});if(!h)return w;var C=m.weekStart;return w.map(function(k,E){return w[(E+(C||0))%7]})},u=function(){return o.Ls[o.locale()]},c=function(f,p){return f.formats[p]||function(g){return g.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(v,h,m){return h||m.slice(1)})}(f.formats[p.toUpperCase()])},d=function(){var f=this;return{months:function(p){return p?p.format("MMMM"):r(f,"months")},monthsShort:function(p){return p?p.format("MMM"):r(f,"monthsShort","months",3)},firstDayOfWeek:function(){return f.$locale().weekStart||0},weekdays:function(p){return p?p.format("dddd"):r(f,"weekdays")},weekdaysMin:function(p){return p?p.format("dd"):r(f,"weekdaysMin","weekdays",2)},weekdaysShort:function(p){return p?p.format("ddd"):r(f,"weekdaysShort","weekdays",3)},longDateFormat:function(p){return c(f.$locale(),p)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};l.localeData=function(){return d.bind(this)()},o.localeData=function(){var f=u();return{firstDayOfWeek:function(){return f.weekStart||0},weekdays:function(){return o.weekdays()},weekdaysShort:function(){return o.weekdaysShort()},weekdaysMin:function(){return o.weekdaysMin()},months:function(){return o.months()},monthsShort:function(){return o.monthsShort()},longDateFormat:function(p){return c(f,p)},meridiem:f.meridiem,ordinal:f.ordinal}},o.months=function(){return r(u(),"months")},o.monthsShort=function(){return r(u(),"monthsShort","months",3)},o.weekdays=function(f){return r(u(),"weekdays",null,null,f)},o.weekdaysShort=function(f){return r(u(),"weekdaysShort","weekdays",3,f)},o.weekdaysMin=function(f){return r(u(),"weekdaysMin","weekdays",2,f)}}})})(YS);var ID=YS.exports;const qS=vl(ID),_D=(e,t)=>{st.extend(qS);const n=st.localeData().firstDayOfWeek(),{t:a,lang:o}=Et(),l=st().locale(o.value),s=S(()=>!!e.range&&!!e.range.length),r=S(()=>{let p=[];if(s.value){const[g,v]=e.range,h=Il(v.date()-g.date()+1).map(b=>({text:g.date()+b,type:"current"}));let m=h.length%7;m=m===0?0:7-m;const y=Il(m).map((b,w)=>({text:w+1,type:"next"}));p=h.concat(y)}else{const g=e.date.startOf("month").day(),v=$D(e.date,(g-n+7)%7).map(y=>({text:y,type:"prev"})),h=OD(e.date).map(y=>({text:y,type:"current"}));p=[...v,...h];const m=Il(7-(p.length%7||7)).map((y,b)=>({text:b+1,type:"next"}));p=p.concat(m)}return ND(p)}),u=S(()=>{const p=n;return p===0?pf.map(g=>a(`el.datepicker.weeks.${g}`)):pf.slice(p).concat(pf.slice(0,p)).map(g=>a(`el.datepicker.weeks.${g}`))}),c=(p,g)=>{switch(g){case"prev":return e.date.startOf("month").subtract(1,"month").date(p);case"next":return e.date.startOf("month").add(1,"month").date(p);case"current":return e.date.date(p)}};return{now:l,isInRange:s,rows:r,weekDays:u,getFormattedDate:c,handlePickDay:({text:p,type:g})=>{t("pick",c(p,g))},getSlotData:({text:p,type:g})=>{const v=c(p,g);return{isSelected:v.isSame(e.selectedDay),type:`${g}-month`,day:v.format(Wo),date:v.toDate()}}}},PD={key:0},AD=["onClick"];var LD=ie({name:"DateTable",__name:"date-table",props:MD,emits:RD,setup(e,{expose:t,emit:n}){const a=e,{isInRange:o,now:l,rows:s,weekDays:r,getFormattedDate:u,handlePickDay:c,getSlotData:d}=_D(a,n),f=he("calendar-table"),p=he("calendar-day"),g=({text:v,type:h})=>{const m=[h];if(h==="current"){const y=u(v,h);y.isSame(a.selectedDay,"day")&&m.push(p.is("selected")),y.isSame(l,"day")&&m.push(p.is("today"))}return m};return t({getFormattedDate:u}),(v,h)=>(x(),B("table",{class:M([i(f).b(),i(f).is("range",i(o))]),cellspacing:"0",cellpadding:"0"},[e.hideHeader?le("v-if",!0):(x(),B("thead",PD,[j("tr",null,[(x(!0),B(He,null,Ct(i(r),m=>(x(),B("th",{key:m,scope:"col"},ke(m),1))),128))])])),j("tbody",null,[(x(!0),B(He,null,Ct(i(s),(m,y)=>(x(),B("tr",{key:y,class:M({[i(f).e("row")]:!0,[i(f).em("row","hide-border")]:y===0&&e.hideHeader})},[(x(!0),B(He,null,Ct(m,(b,w)=>(x(),B("td",{key:w,class:M(g(b)),onClick:C=>i(c)(b)},[j("div",{class:M(i(p).b())},[ae(v.$slots,"date-cell",{data:i(d)(b)},()=>[j("span",null,ke(b.text),1)])],2)],10,AD))),128))],2))),128))])],2))}}),cb=LD;const DD=(e,t)=>{const n=e.endOf("month"),a=t.startOf("month"),o=n.isSame(a,"week")?a.add(1,"week"):a;return[[e,n],[o.startOf("week"),t]]},VD=(e,t)=>{const n=e.endOf("month"),a=e.add(1,"month").startOf("month"),o=n.isSame(a,"week")?a.add(1,"week"):a,l=o.endOf("month"),s=t.startOf("month"),r=l.isSame(s,"week")?s.add(1,"week"):s;return[[e,n],[o.startOf("week"),l],[r.startOf("week"),t]]},BD=(e,t,n)=>{const{lang:a}=Et(),o=A(),l=st().locale(a.value),s=S({get(){return e.modelValue?u.value:o.value},set(y){if(!y)return;o.value=y;const b=y.toDate();t(gn,b),t(at,b)}}),r=S(()=>{if(!e.range||!be(e.range)||e.range.length!==2||e.range.some(w=>!_l(w)))return[];const[y,b]=e.range.map(w=>st(w).locale(a.value));return y.isAfter(b)?(ft(n,"end time should be greater than start time"),[]):y.isSame(b,"month")?g(y,b):y.add(1,"month").month()!==b.month()?(ft(n,"start time and end time interval must not exceed two months"),[]):g(y,b)}),u=S(()=>e.modelValue?st(e.modelValue).locale(a.value):s.value||(r.value.length?r.value[0][0]:l)),c=S(()=>u.value.subtract(1,"month").date(1)),d=S(()=>u.value.add(1,"month").date(1)),f=S(()=>u.value.subtract(1,"year").date(1)),p=S(()=>u.value.add(1,"year").date(1)),g=(y,b)=>{const w=y.startOf("week"),C=b.endOf("week"),k=w.get("month"),E=C.get("month");return k===E?[[w,C]]:(k+1)%12===E?DD(w,C):k+2===E||(k+1)%11===E?VD(w,C):(ft(n,"start time and end time interval must not exceed two months"),[])},v=y=>{s.value=y},h=y=>{const b={"prev-month":c.value,"next-month":d.value,"prev-year":f.value,"next-year":p.value,today:l}[y];b.isSame(u.value,"day")||v(b)};return{calculateValidatedDateRange:g,date:u,realSelectedDay:s,pickDay:v,selectDate:h,validatedRange:r,handleDateChange:y=>{y==="today"?h("today"):v(y)}}},FD=Se({date:{type:X(Object),required:!0},formatter:{type:X(Function)}}),zD={"date-change":e=>ot(e)||De(e)};var HD=ie({name:"SelectController",__name:"select-controller",props:FD,emits:zD,setup(e,{emit:t}){const n=e,a=t,o=he("calendar-select"),{t:l,lang:s}=Et(),r=Array.from({length:12},(v,h)=>{const m=h+1;return{value:m,label:ze(n.formatter)?n.formatter(m,"month"):m}}),u=S(()=>n.date.year()),c=S(()=>n.date.month()+1),d=S(()=>{const v=[];for(let h=-10;h<10;h++){const m=u.value+h;if(m>0){const y=ze(n.formatter)?n.formatter(m,"year"):m;v.push({value:m,label:y})}}return v}),f=v=>{a("date-change",st(new Date(v,c.value-1,1)).locale(s.value))},p=v=>{a("date-change",st(new Date(u.value,v-1,1)).locale(s.value))},g=()=>{a("date-change","today")};return(v,h)=>(x(),B(He,null,[J(i(zl),{"model-value":u.value,size:"small",class:M(i(o).e("year")),"validate-event":!1,options:d.value,onChange:f},null,8,["model-value","class","options"]),J(i(zl),{"model-value":c.value,size:"small",class:M(i(o).e("month")),"validate-event":!1,options:i(r),onChange:p},null,8,["model-value","class","options"]),J(i($n),{size:"small",onClick:g},{default:ne(()=>[St(ke(i(l)("el.datepicker.today")),1)]),_:1})],64))}}),KD=HD;const db="ElCalendar";var WD=ie({name:db,__name:"calendar",props:I6,emits:_6,setup(e,{expose:t,emit:n}){const a=he("calendar"),{calculateValidatedDateRange:o,date:l,pickDay:s,realSelectedDay:r,selectDate:u,validatedRange:c,handleDateChange:d}=BD(e,n,db),{t:f}=Et(),p=S(()=>{const g=`el.datepicker.month${l.value.format("M")}`;return`${l.value.year()} ${f("el.datepicker.year")} ${f(g)}`});return t({selectedDay:r,pickDay:s,selectDate:u,calculateValidatedDateRange:o}),(g,v)=>(x(),B("div",{class:M(i(a).b())},[j("div",{class:M(i(a).e("header"))},[ae(g.$slots,"header",{date:p.value},()=>[j("div",{class:M(i(a).e("title"))},ke(p.value),3),i(c).length===0&&e.controllerType==="button"?(x(),B("div",{key:0,class:M(i(a).e("button-group"))},[J(i(RS),null,{default:ne(()=>[J(i($n),{size:"small",onClick:v[0]||(v[0]=h=>i(u)("prev-month"))},{default:ne(()=>[St(ke(i(f)("el.datepicker.prevMonth")),1)]),_:1}),J(i($n),{size:"small",onClick:v[1]||(v[1]=h=>i(u)("today"))},{default:ne(()=>[St(ke(i(f)("el.datepicker.today")),1)]),_:1}),J(i($n),{size:"small",onClick:v[2]||(v[2]=h=>i(u)("next-month"))},{default:ne(()=>[St(ke(i(f)("el.datepicker.nextMonth")),1)]),_:1})]),_:1})],2)):i(c).length===0&&e.controllerType==="select"?(x(),B("div",{key:1,class:M(i(a).e("select-controller"))},[J(KD,{date:i(l),formatter:e.formatter,onDateChange:i(d)},null,8,["date","formatter","onDateChange"])],2)):le("v-if",!0)])],2),i(c).length===0?(x(),B("div",{key:0,class:M(i(a).e("body"))},[J(cb,{date:i(l),"selected-day":i(r),onPick:i(s)},ra({_:2},[g.$slots["date-cell"]?{name:"date-cell",fn:ne(h=>[ae(g.$slots,"date-cell",Yo(qo(h)))]),key:"0"}:void 0]),1032,["date","selected-day","onPick"])],2)):(x(),B("div",{key:1,class:M(i(a).e("body"))},[(x(!0),B(He,null,Ct(i(c),(h,m)=>(x(),re(cb,{key:m,date:h[0],"selected-day":i(r),range:h,"hide-header":m!==0,onPick:i(s)},ra({_:2},[g.$slots["date-cell"]?{name:"date-cell",fn:ne(y=>[ae(g.$slots,"date-cell",pt({ref_for:!0},y))]),key:"0"}:void 0]),1032,["date","selected-day","range","hide-header","onPick"]))),128))],2))],2))}}),jD=WD;const UD=rt(jD),YD=Se({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:X([String,Object,Array]),default:""},headerClass:String,bodyClass:String,footerClass:String,shadow:{type:String,values:["always","hover","never"],default:void 0}});var qD=ie({name:"ElCard",__name:"card",props:YD,setup(e){const t=fl("card"),n=he("card");return(a,o)=>{var l;return x(),B("div",{class:M([i(n).b(),i(n).is(`${e.shadow||((l=i(t))==null?void 0:l.shadow)||"always"}-shadow`)])},[a.$slots.header||e.header?(x(),B("div",{key:0,class:M([i(n).e("header"),e.headerClass])},[ae(a.$slots,"header",{},()=>[St(ke(e.header),1)])],2)):le("v-if",!0),j("div",{class:M([i(n).e("body"),e.bodyClass]),style:je(e.bodyStyle)},[ae(a.$slots,"default")],6),a.$slots.footer||e.footer?(x(),B("div",{key:1,class:M([i(n).e("footer"),e.footerClass])},[ae(a.$slots,"footer",{},()=>[St(ke(e.footer),1)])],2)):le("v-if",!0)],2)}}}),GD=qD;const XD=rt(GD),ZD=Se({initialIndex:{type:Number,default:0},height:{type:String,default:""},trigger:{type:String,values:["hover","click"],default:"hover"},autoplay:{type:Boolean,default:!0},interval:{type:Number,default:3e3},indicatorPosition:{type:String,values:["","none","outside"],default:""},arrow:{type:String,values:["always","hover","never"],default:"hover"},type:{type:String,values:["","card"],default:""},cardScale:{type:Number,default:.83},loop:{type:Boolean,default:!0},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},pauseOnHover:{type:Boolean,default:!0},motionBlur:Boolean}),JD={change:(e,t)=>[e,t].every(Fe)},GS=Symbol("carouselContextKey"),Vi="ElCarouselItem",QD=Se({name:{type:String,default:""},label:{type:[String,Number],default:""}}),fb=300,eV=(e,t,n)=>{const{children:a,addChild:o,removeChild:l,ChildrenSorter:s}=Pd(vt(),Vi),r=fn(),u=A(-1),c=A(null),d=A(!1),f=A(),p=A(0),g=A(!0),v=S(()=>e.arrow!=="never"&&!i(y)),h=S(()=>a.value.some(ee=>ee.props.label.toString().length>0)),m=S(()=>e.type==="card"),y=S(()=>e.direction==="vertical"),b=S(()=>e.height!=="auto"?{height:e.height}:{height:`${p.value}px`,overflow:"hidden"}),w=Tl(ee=>{N(ee)},fb,{trailing:!0}),C=Tl(ee=>{R(ee)},fb),k=ee=>g.value?u.value<=1?ee<=1:ee>1:!0;function E(){c.value&&(clearInterval(c.value),c.value=null)}function T(){e.interval<=0||!e.autoplay||c.value||(c.value=setInterval(()=>$(),e.interval))}const $=()=>{u.valuese.props.name===ee);de.length>0&&(ee=a.value.indexOf(de[0]))}if(ee=Number(ee),Number.isNaN(ee)||ee!==Math.floor(ee)){ft(n,"index must be integer.");return}const ue=a.value.length,te=u.value;ee<0?u.value=e.loop?ue-1:0:ee>=ue?u.value=e.loop?0:ue-1:u.value=ee,te===u.value&&O(te),z()}function O(ee){a.value.forEach((ue,te)=>{ue.translateItem(te,u.value,ee)})}function _(ee,ue){var ge,me,Me,Ie;const te=i(a),de=te.length;if(de===0||!ee.states.inStage)return!1;const se=ue+1,Y=ue-1,G=de-1,V=te[G].states.active,Z=te[0].states.active,oe=(me=(ge=te[se])==null?void 0:ge.states)==null?void 0:me.active,ce=(Ie=(Me=te[Y])==null?void 0:Me.states)==null?void 0:Ie.active;return ue===G&&Z||oe?"left":ue===0&&V||ce?"right":!1}function P(){d.value=!0,e.pauseOnHover&&E()}function D(){d.value=!1,T()}function W(ee){i(y)||a.value.forEach((ue,te)=>{ee===_(ue,te)&&(ue.states.hover=!0)})}function U(){i(y)||a.value.forEach(ee=>{ee.states.hover=!1})}function F(ee){u.value=ee}function R(ee){e.trigger==="hover"&&ee!==u.value&&(u.value=ee)}function I(){N(u.value-1)}function L(){N(u.value+1)}function z(){E(),(!e.pauseOnHover||!d.value)&&T()}function H(ee){e.height==="auto"&&(p.value=ee)}function K(){var te;const ee=(te=r.default)==null?void 0:te.call(r);if(!ee)return null;const ue=wa(ee).filter(de=>Ht(de)&&de.type.name===Vi);return(ue==null?void 0:ue.length)===2&&e.loop&&!m.value?(g.value=!0,ue):(g.value=!1,null)}fe(()=>u.value,(ee,ue)=>{O(ue),g.value&&(ee=ee%2,ue=ue%2),ue>-1&&t(yt,ee,ue)});const q=S({get:()=>g.value?u.value%2:u.value,set:ee=>u.value=ee});fe(()=>e.autoplay,ee=>{ee?T():E()}),fe(()=>e.loop,()=>{N(u.value)}),fe(()=>e.interval,()=>{z()});const Q=Wt();return mt(()=>{fe(()=>a.value,()=>{a.value.length>0&&N(e.initialIndex)},{immediate:!0}),Q.value=Xt(f.value,()=>{O()}),T()}),Pt(()=>{E(),f.value&&Q.value&&Q.value.stop()}),bt(GS,{root:f,isCardType:m,isVertical:y,items:a,loop:e.loop,cardScale:e.cardScale,addItem:o,removeItem:l,setActiveItem:N,setContainerHeight:H}),{root:f,activeIndex:u,exposeActiveIndex:q,arrowDisplay:v,hasLabel:h,hover:d,isCardType:m,items:a,isVertical:y,containerStyle:b,isItemsTwoLength:g,handleButtonEnter:W,handleButtonLeave:U,handleIndicatorClick:F,handleMouseEnter:P,handleMouseLeave:D,setActiveItem:N,prev:I,next:L,PlaceholderItem:K,isTwoLengthShow:k,ItemsSorter:s,throttledArrowClick:w,throttledIndicatorHover:C}},tV=["aria-label"],nV=["aria-label"],aV=["onMouseenter","onClick"],oV=["aria-label"],lV={key:0},sV={key:2,xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{display:"none"}},pb="ElCarousel";var rV=ie({name:pb,__name:"carousel",props:ZD,emits:JD,setup(e,{expose:t,emit:n}){const a=e,{root:o,activeIndex:l,exposeActiveIndex:s,arrowDisplay:r,hasLabel:u,hover:c,isCardType:d,items:f,isVertical:p,containerStyle:g,handleButtonEnter:v,handleButtonLeave:h,handleIndicatorClick:m,handleMouseEnter:y,handleMouseLeave:b,setActiveItem:w,prev:C,next:k,PlaceholderItem:E,isTwoLengthShow:T,ItemsSorter:$,throttledArrowClick:N,throttledIndicatorHover:O}=eV(a,n,pb),_=he("carousel"),{t:P}=Et(),D=S(()=>{const R=[_.b(),_.m(a.direction)];return i(d)&&R.push(_.m("card")),R.push(_.is("vertical-outside",i(p)&&a.indicatorPosition==="outside")),R}),W=S(()=>{const R=[_.e("indicators"),_.em("indicators",a.direction)];return i(u)&&R.push(_.em("indicators","labels")),a.indicatorPosition==="outside"&&R.push(_.em("indicators","outside")),i(p)&&R.push(_.em("indicators","right")),R});function U(R){if(!a.motionBlur)return;const I=i(p)?`${_.namespace.value}-transitioning-vertical`:`${_.namespace.value}-transitioning`;R.currentTarget.classList.add(I)}function F(R){if(!a.motionBlur)return;const I=i(p)?`${_.namespace.value}-transitioning-vertical`:`${_.namespace.value}-transitioning`;R.currentTarget.classList.remove(I)}return t({activeIndex:s,setActiveItem:w,prev:C,next:k}),(R,I)=>(x(),B("div",{ref_key:"root",ref:o,class:M(D.value),onMouseenter:I[6]||(I[6]=Xe((...L)=>i(y)&&i(y)(...L),["stop"])),onMouseleave:I[7]||(I[7]=Xe((...L)=>i(b)&&i(b)(...L),["stop"]))},[i(r)?(x(),re(Bn,{key:0,name:"carousel-arrow-left",persisted:""},{default:ne(()=>[dt(j("button",{type:"button",class:M([i(_).e("arrow"),i(_).em("arrow","left")]),"aria-label":i(P)("el.carousel.leftArrow"),onMouseenter:I[0]||(I[0]=L=>i(v)("left")),onMouseleave:I[1]||(I[1]=(...L)=>i(h)&&i(h)(...L)),onClick:I[2]||(I[2]=Xe(L=>i(N)(i(l)-1),["stop"]))},[J(i(Be),null,{default:ne(()=>[J(i(al))]),_:1})],42,tV),[[Nt,(e.arrow==="always"||i(c))&&(e.loop||i(l)>0)]])]),_:1})):le("v-if",!0),i(r)?(x(),re(Bn,{key:1,name:"carousel-arrow-right",persisted:""},{default:ne(()=>[dt(j("button",{type:"button",class:M([i(_).e("arrow"),i(_).em("arrow","right")]),"aria-label":i(P)("el.carousel.rightArrow"),onMouseenter:I[3]||(I[3]=L=>i(v)("right")),onMouseleave:I[4]||(I[4]=(...L)=>i(h)&&i(h)(...L)),onClick:I[5]||(I[5]=Xe(L=>i(N)(i(l)+1),["stop"]))},[J(i(Be),null,{default:ne(()=>[J(i(Jn))]),_:1})],42,nV),[[Nt,(e.arrow==="always"||i(c))&&(e.loop||i(l)[e.indicatorPosition!=="none"?(x(),B("ul",{key:0,class:M(W.value)},[(x(!0),B(He,null,Ct(i(f),(L,z)=>dt((x(),B("li",{key:z,class:M([i(_).e("indicator"),i(_).em("indicator",e.direction),i(_).is("active",z===i(l))]),onMouseenter:H=>i(O)(z),onClick:Xe(H=>i(m)(z),["stop"])},[j("button",{class:M(i(_).e("button")),"aria-label":i(P)("el.carousel.indicator",{index:z+1})},[i(u)?(x(),B("span",lV,ke(L.props.label),1)):le("v-if",!0)],10,oV)],42,aV)),[[Nt,i(T)(z)]])),128))],2)):le("v-if",!0)]),_:1}),e.motionBlur?(x(),B("svg",sV,[...I[8]||(I[8]=[j("defs",null,[j("filter",{id:"elCarouselHorizontal"},[j("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"12,0"})]),j("filter",{id:"elCarouselVertical"},[j("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"0,10"})])],-1)])])):le("v-if",!0)],34))}}),iV=rV;const uV=e=>{const t=_e(GS),n=vt();t||ft(Vi,"usage: "),n||ft(Vi,"compositional hook can only be invoked inside setups");const a=A(),o=A(!1),l=A(0),s=A(1),r=A(!1),u=A(!1),c=A(!1),d=A(!1),{isCardType:f,isVertical:p,cardScale:g}=t;function v(C,k,E){const T=E-1,$=k-1,N=k+1,O=E/2;return k===0&&C===T?-1:k===T&&C===0?E:C<$&&k-C>=O?E+1:C>N&&C-k>=O?-2:C}function h(C,k){var T,$;const E=i(p)?((T=t.root.value)==null?void 0:T.offsetHeight)||0:(($=t.root.value)==null?void 0:$.offsetWidth)||0;return c.value?E*((2-g)*(C-k)+1)/4:C{const T=i(f),$=t.items.value.length??NaN,N=C===k;!T&&!xt(E)&&(d.value=N||C===E),!N&&$>2&&t.loop&&(C=v(C,k,$));const O=i(p);r.value=N,T?(c.value=Math.round(Math.abs(C-k))<=1,l.value=h(C,k),s.value=i(r)?1:g):l.value=m(C,k,O),u.value=!0,N&&a.value&&t.setContainerHeight(a.value.offsetHeight)};function b(){if(t&&i(f)){const C=t.items.value.findIndex(({uid:k})=>k===n.uid);t.setActiveItem(C)}}const w={props:e,states:Rt({hover:o,translate:l,scale:s,active:r,ready:u,inStage:c,animating:d}),uid:n.uid,getVnode:()=>n.vnode,translateItem:y};return t.addItem(w),Pt(()=>{t.removeItem(w)}),{carouselItemRef:a,active:r,animating:d,hover:o,inStage:c,isVertical:p,translate:l,isCardType:f,scale:s,ready:u,handleItemClick:b}};var cV=ie({name:Vi,__name:"carousel-item",props:QD,setup(e){const t=e,n=he("carousel"),{carouselItemRef:a,active:o,animating:l,hover:s,inStage:r,isVertical:u,translate:c,isCardType:d,scale:f,ready:p,handleItemClick:g}=uV(t),v=S(()=>[n.e("item"),n.is("active",o.value),n.is("in-stage",r.value),n.is("hover",s.value),n.is("animating",l.value),{[n.em("item","card")]:d.value,[n.em("item","card-vertical")]:d.value&&u.value}]),h=S(()=>({transform:[`${`translate${i(u)?"Y":"X"}`}(${i(c)}px)`,`scale(${i(f)})`].join(" ")}));return(m,y)=>dt((x(),B("div",{ref_key:"carouselItemRef",ref:a,class:M(v.value),style:je(h.value),onClick:y[0]||(y[0]=(...b)=>i(g)&&i(g)(...b))},[i(d)?dt((x(),B("div",{key:0,class:M(i(n).e("mask"))},null,2)),[[Nt,!i(o)]]):le("v-if",!0),ae(m.$slots,"default")],6)),[[Nt,i(p)]])}}),XS=cV;const dV=rt(iV,{CarouselItem:XS}),fV=Qt(XS),ZS=Se({modelValue:{type:X([Number,String,Array,Object])},options:{type:X(Array),default:()=>[]},props:{type:X(Object),default:()=>({})}}),pV={expandTrigger:"click",multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:_t,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500,checkOnClickNode:!1,checkOnClickLeaf:!0,showPrefix:!0},vV=Se({...ZS,border:{type:Boolean,default:!0},renderLabel:{type:Function}}),vb=e=>!0,hV={[at]:vb,[yt]:vb,close:()=>!0,"expand-change":e=>e},mV=e=>S(()=>({...pV,...e.props})),JS={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:{type:Boolean,default:void 0},checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:Sn,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},ariaLabel:String,...Qn(["ariaControls"])},QS={[at]:e=>De(e)||Fe(e)||Vt(e),change:e=>De(e)||Fe(e)||Vt(e)},Ar=Symbol("checkboxGroupContextKey"),gV=Se({modelValue:{type:X(Array),default:()=>[]},disabled:{type:Boolean,default:void 0},min:Number,max:Number,size:Sn,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:X(Array)},props:{type:X(Object),default:()=>e2},type:{type:String,values:["checkbox","button"],default:"checkbox"},...Qn(["ariaLabel"])}),yV={[at]:e=>be(e),change:e=>be(e)},e2={label:"label",value:"value",disabled:"disabled"},bV=({model:e,isChecked:t})=>{const n=_e(Ar,void 0),a=_e(_s,void 0),o=S(()=>{var r,u;const l=(r=n==null?void 0:n.max)==null?void 0:r.value,s=(u=n==null?void 0:n.min)==null?void 0:u.value;return!xt(l)&&e.value.length>=l&&!t.value||!xt(s)&&e.value.length<=s&&t.value});return{isDisabled:on(S(()=>{var l;return n===void 0?(a==null?void 0:a.disabled)??o.value:((l=n.disabled)==null?void 0:l.value)||o.value})),isLimitDisabled:o}},wV=(e,{model:t,isLimitExceeded:n,hasOwnLabel:a,isDisabled:o,isLabeledByFormItem:l})=>{const s=_e(Ar,void 0),{formItem:r}=Pn(),{emit:u}=vt();function c(v){return[!0,e.trueValue,e.trueLabel].includes(v)?e.trueValue??e.trueLabel??!0:e.falseValue??e.falseLabel??!1}function d(v,h){u(yt,c(v),h)}function f(v){if(n.value)return;const h=v.target;u(yt,c(h.checked),v)}async function p(v){n.value||!a.value&&!o.value&&l.value&&(v.composedPath().some(h=>h.tagName==="LABEL")||(t.value=c([!1,e.falseValue,e.falseLabel].includes(t.value)),await Ae(),d(t.value,v)))}const g=S(()=>(s==null?void 0:s.validateEvent)||e.validateEvent);return fe(()=>e.modelValue,()=>{g.value&&(r==null||r.validate("change").catch(v=>ft(v)))}),{handleChange:f,onClickRoot:p}},CV=e=>{const t=A(!1),{emit:n,vnode:a}=vt(),o=_e(Ar,void 0),l=S(()=>xt(o)===!1),s=A(!1),r=S(()=>{const c=a.props??{};return"modelValue"in c||"model-value"in c}),u=S({get(){var c;return l.value?(c=o==null?void 0:o.modelValue)==null?void 0:c.value:r.value?e.modelValue:t.value},set(c){var d,f;l.value&&be(c)?(s.value=((d=o==null?void 0:o.max)==null?void 0:d.value)!==void 0&&c.length>(o==null?void 0:o.max.value)&&c.length>u.value.length,s.value===!1&&((f=o==null?void 0:o.changeEvent)==null||f.call(o,c))):(n(at,c),t.value=c)}});return{model:u,isGroup:l,isLimitExceeded:s}},SV=(e,t,{model:n})=>{const a=_e(Ar,void 0),o=A(!1),l=S(()=>pa(e.value)?e.label:e.value),s=S(()=>{const r=n.value;return Vt(r)?r:be(r)?ot(l.value)?r.map(Kt).some(u=>tn(u,l.value)):r.map(Kt).includes(l.value):r!=null?r===e.trueValue||r===e.trueLabel:!!r});return{checkboxButtonSize:bn(S(()=>{var r;return(r=a==null?void 0:a.size)==null?void 0:r.value}),{prop:!0}),isChecked:s,isFocused:o,checkboxSize:bn(S(()=>{var r;return(r=a==null?void 0:a.size)==null?void 0:r.value})),hasOwnLabel:S(()=>!!t.default||!pa(l.value)),actualValue:l}},t2=(e,t)=>{const{formItem:n}=Pn(),{model:a,isGroup:o,isLimitExceeded:l}=CV(e),{isFocused:s,isChecked:r,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,actualValue:f}=SV(e,t,{model:a}),{isDisabled:p}=bV({model:a,isChecked:r}),{inputId:g,isLabeledByFormItem:v}=Ta(e,{formItemContext:n,disableIdGeneration:d,disableIdManagement:o}),{handleChange:h,onClickRoot:m}=wV(e,{model:a,isLimitExceeded:l,hasOwnLabel:d,isDisabled:p,isLabeledByFormItem:v});return(()=>{function b(){be(a.value)&&!a.value.includes(f.value)?a.value.push(f.value):a.value=e.trueValue??e.trueLabel??!0}e.checked&&b()})(),bo({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},S(()=>o.value&&pa(e.value))),bo({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},S(()=>!!e.trueLabel)),bo({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},S(()=>!!e.falseLabel)),{inputId:g,isLabeledByFormItem:v,isChecked:r,isDisabled:p,isFocused:s,checkboxButtonSize:u,checkboxSize:c,hasOwnLabel:d,model:a,actualValue:f,handleChange:h,onClickRoot:m}},kV=["id","indeterminate","name","tabindex","disabled"];var EV=ie({name:"ElCheckbox",__name:"checkbox",props:JS,emits:QS,setup(e){const t=e,{inputId:n,isLabeledByFormItem:a,isChecked:o,isDisabled:l,isFocused:s,checkboxSize:r,hasOwnLabel:u,model:c,actualValue:d,handleChange:f,onClickRoot:p}=t2(t,fn()),g=S(()=>t.trueValue||t.falseValue||t.trueLabel||t.falseLabel?{"true-value":t.trueValue??t.trueLabel??!0,"false-value":t.falseValue??t.falseLabel??!1}:{value:d.value}),v=he("checkbox"),h=S(()=>[v.b(),v.m(r.value),v.is("disabled",l.value),v.is("bordered",t.border),v.is("checked",o.value)]),m=S(()=>[v.e("input"),v.is("disabled",l.value),v.is("checked",o.value),v.is("indeterminate",t.indeterminate),v.is("focus",s.value)]);return(y,b)=>(x(),re(ct(!i(u)&&i(a)?"span":"label"),{for:!i(u)&&i(a)?null:i(n),class:M(h.value),"aria-controls":e.indeterminate?e.ariaControls:null,"aria-checked":e.indeterminate?"mixed":void 0,"aria-label":e.ariaLabel,onClick:i(p)},{default:ne(()=>[j("span",{class:M(m.value)},[dt(j("input",pt({id:i(n),"onUpdate:modelValue":b[0]||(b[0]=w=>Ut(c)?c.value=w:null),class:i(v).e("original"),type:"checkbox",indeterminate:e.indeterminate,name:e.name,tabindex:e.tabindex,disabled:i(l)},g.value,{onChange:b[1]||(b[1]=(...w)=>i(f)&&i(f)(...w)),onFocus:b[2]||(b[2]=w=>s.value=!0),onBlur:b[3]||(b[3]=w=>s.value=!1),onClick:b[4]||(b[4]=Xe(()=>{},["stop"]))}),null,16,kV),[[ew,i(c)]]),j("span",{class:M(i(v).e("inner"))},null,2)],2),i(u)?(x(),B("span",{key:0,class:M(i(v).e("label"))},[ae(y.$slots,"default"),y.$slots.default?le("v-if",!0):(x(),B(He,{key:0},[St(ke(e.label),1)],64))],2)):le("v-if",!0)]),_:3},8,["for","class","aria-controls","aria-checked","aria-label","onClick"]))}}),n2=EV;const xV=["name","tabindex","disabled"];var TV=ie({name:"ElCheckboxButton",__name:"checkbox-button",props:JS,emits:QS,setup(e){const t=e,{isFocused:n,isChecked:a,isDisabled:o,checkboxButtonSize:l,model:s,actualValue:r,handleChange:u}=t2(t,fn()),c=S(()=>t.trueValue||t.falseValue||t.trueLabel||t.falseLabel?{"true-value":t.trueValue??t.trueLabel??!0,"false-value":t.falseValue??t.falseLabel??!1}:{value:r.value}),d=_e(Ar,void 0),f=he("checkbox"),p=S(()=>{var h,m;const v=((h=d==null?void 0:d.fill)==null?void 0:h.value)??"";return{backgroundColor:v,borderColor:v,color:((m=d==null?void 0:d.textColor)==null?void 0:m.value)??"",boxShadow:v?`-1px 0 0 0 ${v}`:void 0}}),g=S(()=>[f.b("button"),f.bm("button",l.value),f.is("disabled",o.value),f.is("checked",a.value),f.is("focus",n.value)]);return(v,h)=>(x(),B("label",{class:M(g.value)},[dt(j("input",pt({"onUpdate:modelValue":h[0]||(h[0]=m=>Ut(s)?s.value=m:null),class:i(f).be("button","original"),type:"checkbox",name:e.name,tabindex:e.tabindex,disabled:i(o)},c.value,{onChange:h[1]||(h[1]=(...m)=>i(u)&&i(u)(...m)),onFocus:h[2]||(h[2]=m=>n.value=!0),onBlur:h[3]||(h[3]=m=>n.value=!1),onClick:h[4]||(h[4]=Xe(()=>{},["stop"]))}),null,16,xV),[[ew,i(s)]]),v.$slots.default||e.label?(x(),B("span",{key:0,class:M(i(f).be("button","inner")),style:je(i(a)?p.value:void 0)},[ae(v.$slots,"default",{},()=>[St(ke(e.label),1)])],6)):le("v-if",!0)],2))}}),Fh=TV,$V=ie({name:"ElCheckboxGroup",__name:"checkbox-group",props:gV,emits:yV,setup(e,{emit:t}){const n=e,a=t,o=he("checkbox"),l=on(),{formItem:s}=Pn(),{inputId:r,isLabeledByFormItem:u}=Ta(n,{formItemContext:s}),c=async v=>{a(at,v),await Ae(),a(yt,v)},d=S({get(){return n.modelValue},set(v){c(v)}}),f=S(()=>({...e2,...n.props})),p=v=>{const{label:h,value:m,disabled:y}=f.value,b={label:v[h],value:v[m],disabled:v[y]};return{...su(v,[h,m,y]),...b}},g=S(()=>n.type==="button"?Fh:n2);return bt(Ar,{...el(Nn(n),["size","min","max","validateEvent","fill","textColor"]),disabled:l,modelValue:d,changeEvent:c}),fe(()=>n.modelValue,(v,h)=>{n.validateEvent&&!tn(v,h)&&(s==null||s.validate("change").catch(m=>ft(m)))}),(v,h)=>{var m;return x(),re(ct(e.tag),{id:i(r),class:M(i(o).b("group")),role:"group","aria-label":i(u)?void 0:e.ariaLabel||"checkbox-group","aria-labelledby":i(u)?(m=i(s))==null?void 0:m.labelId:void 0},{default:ne(()=>[ae(v.$slots,"default",{},()=>[(x(!0),B(He,null,Ct(e.options,(y,b)=>(x(),re(ct(g.value),pt({key:b},{ref_for:!0},p(y)),null,16))),128))])]),_:3},8,["id","class","aria-label","aria-labelledby"])}}}),a2=$V;const Za=rt(n2,{CheckboxButton:Fh,CheckboxGroup:a2}),OV=Qt(Fh),zh=Qt(a2),o2=Se({modelValue:{type:[String,Number,Boolean],default:void 0},size:Sn,disabled:{type:Boolean,default:void 0},label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),NV=Se({...o2,border:Boolean}),l2={[at]:e=>De(e)||Fe(e)||Vt(e),[yt]:e=>De(e)||Fe(e)||Vt(e)},s2=Symbol("radioGroupKey"),MV=Se({...o2}),r2={label:"label",value:"value",disabled:"disabled"},RV=Se({id:{type:String,default:void 0},size:Sn,disabled:{type:Boolean,default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},options:{type:X(Array)},props:{type:X(Object),default:()=>r2},type:{type:String,values:["radio","button"],default:"radio"},...Qn(["ariaLabel"])}),IV=l2,i2=(e,t)=>{const n=A(),a=_e(s2,void 0),o=S(()=>!!a),l=S(()=>pa(e.value)?e.label:e.value),s=S({get(){return o.value?a.modelValue:e.modelValue},set(f){o.value?a.changeEvent(f):t&&t(at,f),n.value.checked=e.modelValue===l.value}}),r=bn(S(()=>a==null?void 0:a.size)),u=on(S(()=>a==null?void 0:a.disabled)),c=A(!1),d=S(()=>u.value||o.value&&s.value!==l.value?-1:0);return bo({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},S(()=>o.value&&pa(e.value))),{radioRef:n,isGroup:o,radioGroup:a,focus:c,size:r,disabled:u,tabIndex:d,modelValue:s,actualValue:l}},_V=["value","name","disabled","checked"];var PV=ie({name:"ElRadio",__name:"radio",props:NV,emits:l2,setup(e,{emit:t}){const n=e,a=t,o=he("radio"),{radioRef:l,radioGroup:s,focus:r,size:u,disabled:c,modelValue:d,actualValue:f}=i2(n,a);function p(){Ae(()=>a(yt,d.value))}return(g,v)=>{var h;return x(),B("label",{class:M([i(o).b(),i(o).is("disabled",i(c)),i(o).is("focus",i(r)),i(o).is("bordered",e.border),i(o).is("checked",i(d)===i(f)),i(o).m(i(u))])},[j("span",{class:M([i(o).e("input"),i(o).is("disabled",i(c)),i(o).is("checked",i(d)===i(f))])},[dt(j("input",{ref_key:"radioRef",ref:l,"onUpdate:modelValue":v[0]||(v[0]=m=>Ut(d)?d.value=m:null),class:M(i(o).e("original")),value:i(f),name:e.name||((h=i(s))==null?void 0:h.name),disabled:i(c),checked:i(d)===i(f),type:"radio",onFocus:v[1]||(v[1]=m=>r.value=!0),onBlur:v[2]||(v[2]=m=>r.value=!1),onChange:p,onClick:v[3]||(v[3]=Xe(()=>{},["stop"]))},null,42,_V),[[tw,i(d)]]),j("span",{class:M(i(o).e("inner"))},null,2)],2),j("span",{class:M(i(o).e("label")),onKeydown:v[4]||(v[4]=Xe(()=>{},["stop"]))},[ae(g.$slots,"default",{},()=>[St(ke(e.label),1)])],34)],2)}}}),u2=PV;const AV=["value","name","disabled"];var LV=ie({name:"ElRadioButton",__name:"radio-button",props:MV,setup(e){const t=e,n=he("radio"),{radioRef:a,focus:o,size:l,disabled:s,modelValue:r,radioGroup:u,actualValue:c}=i2(t),d=S(()=>({backgroundColor:(u==null?void 0:u.fill)||"",borderColor:(u==null?void 0:u.fill)||"",boxShadow:u!=null&&u.fill?`-1px 0 0 0 ${u.fill}`:"",color:(u==null?void 0:u.textColor)||""}));return(f,p)=>{var g;return x(),B("label",{class:M([i(n).b("button"),i(n).is("active",i(r)===i(c)),i(n).is("disabled",i(s)),i(n).is("focus",i(o)),i(n).bm("button",i(l))])},[dt(j("input",{ref_key:"radioRef",ref:a,"onUpdate:modelValue":p[0]||(p[0]=v=>Ut(r)?r.value=v:null),class:M(i(n).be("button","original-radio")),value:i(c),type:"radio",name:e.name||((g=i(u))==null?void 0:g.name),disabled:i(s),onFocus:p[1]||(p[1]=v=>o.value=!0),onBlur:p[2]||(p[2]=v=>o.value=!1),onClick:p[3]||(p[3]=Xe(()=>{},["stop"]))},null,42,AV),[[tw,i(r)]]),j("span",{class:M(i(n).be("button","inner")),style:je(i(r)===i(c)?d.value:{}),onKeydown:p[4]||(p[4]=Xe(()=>{},["stop"]))},[ae(f.$slots,"default",{},()=>[St(ke(e.label),1)])],38)],2)}}}),Hh=LV;const DV=["id","aria-label","aria-labelledby"];var VV=ie({name:"ElRadioGroup",__name:"radio-group",props:RV,emits:IV,setup(e,{emit:t}){const n=e,a=t,o=he("radio"),l=Fn(),s=A(),{formItem:r}=Pn(),{inputId:u,isLabeledByFormItem:c}=Ta(n,{formItemContext:r}),d=h=>{a(at,h),Ae(()=>a(yt,h))};mt(()=>{const h=s.value.querySelectorAll("[type=radio]"),m=h[0];!Array.from(h).some(y=>y.checked)&&m&&(m.tabIndex=0)});const f=S(()=>n.name||l.value),p=S(()=>({...r2,...n.props})),g=h=>{const{label:m,value:y,disabled:b}=p.value,w={label:h[m],value:h[y],disabled:h[b]};return{...su(h,[m,y,b]),...w}},v=S(()=>n.type==="button"?Hh:u2);return bt(s2,Rt({...Nn(n),changeEvent:d,name:f})),fe(()=>n.modelValue,(h,m)=>{n.validateEvent&&!tn(h,m)&&(r==null||r.validate("change").catch(y=>ft(y)))}),(h,m)=>(x(),B("div",{id:i(u),ref_key:"radioGroupRef",ref:s,class:M(i(o).b("group")),role:"radiogroup","aria-label":i(c)?void 0:e.ariaLabel||"radio-group","aria-labelledby":i(c)?i(r).labelId:void 0},[ae(h.$slots,"default",{},()=>[(x(!0),B(He,null,Ct(e.options,(y,b)=>(x(),re(ct(v.value),pt({key:b},{ref_for:!0},g(y)),null,16))),128))])],10,DV))}}),c2=VV;const d2=rt(u2,{RadioButton:Hh,RadioGroup:c2}),BV=Qt(c2),FV=Qt(Hh),Fd=Symbol();function zV(e){return!!(be(e)?e.every(({type:t})=>t===vn):(e==null?void 0:e.type)===vn)}var HV=ie({name:"NodeContent",props:{node:{type:Object,required:!0}},setup(e){const t=he("cascader-node"),{renderLabelFn:n}=_e(Fd),{node:a}=e,{data:o,label:l}=a,s=()=>{const r=n==null?void 0:n({node:a,data:o});return zV(r)?l:r??l};return()=>J("span",{class:t.e("label")},[s()])}});const KV=["id","aria-haspopup","aria-owns","aria-expanded","tabindex"];var WV=ie({name:"ElCascaderNode",__name:"node",props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(e,{emit:t}){const n=e,a=t,o=_e(Fd),l=he("cascader-node"),s=S(()=>o.isHoverMenu),r=S(()=>o.config.multiple),u=S(()=>o.config.checkStrictly),c=S(()=>o.config.showPrefix),d=S(()=>{var N;return(N=o.checkedNodes[0])==null?void 0:N.uid}),f=S(()=>n.node.isDisabled),p=S(()=>n.node.isLeaf),g=S(()=>u.value&&!p.value||!f.value),v=S(()=>m(o.expandingNode)),h=S(()=>u.value&&o.checkedNodes.some(m)),m=N=>{var P;const{level:O,uid:_}=n.node;return((P=N==null?void 0:N.pathNodes[O-1])==null?void 0:P.uid)===_},y=()=>{v.value||o.expandNode(n.node)},b=N=>{const{node:O}=n;N!==O.checked&&o.handleCheckChange(O,N)},w=()=>{o.lazyLoad(n.node,()=>{p.value||y()})},C=N=>{s.value&&(k(),!p.value&&a("expand",N))},k=()=>{const{node:N}=n;!g.value||N.loading||(N.loaded?y():w())},E=()=>{p.value&&!f.value&&!u.value&&!r.value?$(!0):(o.config.checkOnClickNode&&(r.value||u.value)||p.value&&o.config.checkOnClickLeaf)&&!f.value?T(!n.node.checked):s.value||k()},T=N=>{u.value?(b(N),n.node.loaded&&y()):$(N)},$=N=>{n.node.loaded?(b(N),!u.value&&y()):w()};return(N,O)=>(x(),B("li",{id:`${e.menuId}-${e.node.uid}`,role:"menuitem","aria-haspopup":!p.value,"aria-owns":p.value?void 0:e.menuId,"aria-expanded":v.value,tabindex:g.value?-1:void 0,class:M([i(l).b(),i(l).is("selectable",u.value),i(l).is("active",e.node.checked),i(l).is("disabled",!g.value),v.value&&"in-active-path",h.value&&"in-checked-path"]),onMouseenter:C,onFocus:C,onClick:E},[le(" prefix "),r.value&&c.value?(x(),re(i(Za),{key:0,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:f.value,onClick:O[0]||(O[0]=Xe(()=>{},["stop"])),"onUpdate:modelValue":T},null,8,["model-value","indeterminate","disabled"])):u.value&&c.value?(x(),re(i(d2),{key:1,"model-value":d.value,label:e.node.uid,disabled:f.value,"onUpdate:modelValue":T,onClick:O[1]||(O[1]=Xe(()=>{},["stop"]))},{default:ne(()=>[le(` + Add an empty element to avoid render label, + do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485 + `),O[2]||(O[2]=j("span",null,null,-1))]),_:1},8,["model-value","label","disabled"])):p.value&&e.node.checked?(x(),re(i(Be),{key:2,class:M(i(l).e("prefix"))},{default:ne(()=>[J(i(yu))]),_:1},8,["class"])):le("v-if",!0),le(" content "),J(i(HV),{node:e.node},null,8,["node"]),le(" postfix "),p.value?le("v-if",!0):(x(),B(He,{key:3},[e.node.loading?(x(),re(i(Be),{key:0,class:M([i(l).is("loading"),i(l).e("postfix")])},{default:ne(()=>[J(i(Oo))]),_:1},8,["class"])):(x(),re(i(Be),{key:1,class:M(["arrow-right",i(l).e("postfix")])},{default:ne(()=>[J(i(Jn))]),_:1},8,["class"]))],64))],42,KV))}}),jV=WV,UV=ie({name:"ElCascaderMenu",__name:"menu",props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(e){const t=e,n=vt(),a=he("cascader-menu"),{t:o}=Et(),l=Fn();let s,r;const u=_e(Fd),c=A(),d=S(()=>!t.nodes.length),f=S(()=>!u.initialLoaded),p=S(()=>`${l.value}-${t.index}`),g=y=>{s=y.target},v=y=>{var b;if(!(!u.isHoverMenu||!s||!c.value))if(s.contains(y.target)){h();const w=n.vnode.el,{left:C}=w.getBoundingClientRect(),{offsetWidth:k,offsetHeight:E}=w,T=y.clientX-C,$=s.offsetTop,N=$+s.offsetHeight,O=((b=w.querySelector(`.${a.e("wrap")}`))==null?void 0:b.scrollTop)||0;c.value.innerHTML=` + + + `}else r||(r=window.setTimeout(m,u.config.hoverThreshold))},h=()=>{r&&(clearTimeout(r),r=void 0)},m=()=>{c.value&&(c.value.innerHTML="",h())};return(y,b)=>(x(),re(i(Ga),{key:p.value,tag:"ul",role:"menu",class:M(i(a).b()),"wrap-class":i(a).e("wrap"),"view-class":[i(a).e("list"),i(a).is("empty",d.value)],onMousemove:v,onMouseleave:m},{default:ne(()=>{var w;return[(x(!0),B(He,null,Ct(e.nodes,C=>(x(),re(jV,{key:C.uid,node:C,"menu-id":p.value,onExpand:g},null,8,["node","menu-id"]))),128)),f.value?(x(),B("div",{key:0,class:M(i(a).e("empty-text"))},[J(i(Be),{size:"14",class:M(i(a).is("loading"))},{default:ne(()=>[J(i(Oo))]),_:1},8,["class"]),St(" "+ke(i(o)("el.cascader.loading")),1)],2)):d.value?(x(),B("div",{key:1,class:M(i(a).e("empty-text"))},[ae(y.$slots,"empty",{},()=>[St(ke(i(o)("el.cascader.noData")),1)])],2)):(w=i(u))!=null&&w.isHoverMenu?(x(),B(He,{key:2},[le(" eslint-disable vue/html-self-closing "),(x(),B("svg",{ref_key:"hoverZone",ref:c,class:M(i(a).e("hover-zone"))},null,2))],2112)):le("v-if",!0),le(" eslint-enable vue/html-self-closing ")]}),_:3},8,["class","wrap-class","view-class"]))}}),YV=UV;let qV=0;const GV=e=>{const t=[e];let{parent:n}=e;for(;n;)t.unshift(n),n=n.parent;return t};var Hp=class Kp{constructor(t,n,a,o=!1){this.data=t,this.config=n,this.parent=a,this.root=o,this.uid=qV++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:l,label:s,children:r}=n,u=t[r],c=GV(this);this.level=o?0:a?a.level+1:1,this.value=t[l],this.label=t[s],this.pathNodes=c,this.pathValues=c.map(d=>d.value),this.pathLabels=c.map(d=>d.label),this.childrenData=u,this.children=(u||[]).map(d=>new Kp(d,n,this)),this.loaded=!n.lazy||this.isLeaf||!la(u),this.text=""}get isDisabled(){const{data:t,parent:n,config:a}=this,{disabled:o,checkStrictly:l}=a;return(ze(o)?o(t,this):!!t[o])||!l&&!!(n!=null&&n.isDisabled)}get isLeaf(){const{data:t,config:n,childrenData:a,loaded:o}=this,{lazy:l,leaf:s}=n,r=ze(s)?s(t,this):t[s];return xt(r)?l&&!o?!1:!(be(a)&&a.length):!!r}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(t){const{childrenData:n,children:a}=this,o=new Kp(t,this.config,this);return be(n)?n.push(t):this.childrenData=[t],a.push(o),o}calcText(t,n){const a=t?this.pathLabels.join(n):this.label;return this.text=a,a}broadcast(t){this.children.forEach(n=>{var a;n&&(n.broadcast(t),(a=n.onParentCheck)==null||a.call(n,t))})}emit(){var n;const{parent:t}=this;t&&((n=t.onChildCheck)==null||n.call(t),t.emit())}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(o=>!o.isDisabled),a=n.length?n.every(o=>o.checked):!1;this.setCheckState(a)}setCheckState(t){const n=this.children.length,a=this.children.reduce((o,l)=>o+(l.checked?1:l.indeterminate?.5:0),0);this.checked=this.loaded&&this.children.filter(o=>!o.isDisabled).every(o=>o.loaded&&o.checked)&&t,this.indeterminate=this.loaded&&a!==n&&a>0}doCheck(t){if(this.checked===t)return;const{checkStrictly:n,multiple:a}=this.config;n||!a?this.checked=t:(this.broadcast(t),this.setCheckState(t),this.emit())}};const Wp=(e,t)=>e.reduce((n,a)=>(a.isLeaf?n.push(a):(!t&&n.push(a),n=n.concat(Wp(a.children,t))),n),[]);var hb=class{constructor(e,t){this.config=t;const n=(e||[]).map(a=>new Hp(a,this.config));this.nodes=n,this.allNodes=Wp(n,!1),this.leafNodes=Wp(n,!0)}getNodes(){return this.nodes}getFlattedNodes(e){return e?this.leafNodes:this.allNodes}appendNode(e,t){const n=t?t.appendChild(e):new Hp(e,this.config);t||this.nodes.push(n),this.appendAllNodesAndLeafNodes(n)}appendNodes(e,t){e.length>0?e.forEach(n=>this.appendNode(n,t)):t&&t.isLeaf&&this.leafNodes.push(t)}appendAllNodesAndLeafNodes(e){this.allNodes.push(e),e.isLeaf&&this.leafNodes.push(e),e.children&&e.children.forEach(t=>{this.appendAllNodesAndLeafNodes(t)})}getNodeByValue(e,t=!1){return pa(e)?null:this.getFlattedNodes(t).find(n=>tn(n.value,e)||tn(n.pathValues,e))||null}getSameNode(e){return e&&this.getFlattedNodes(!1).find(({value:t,level:n})=>tn(e.value,t)&&e.level===n)||null}};const mb=e=>{if(!e)return 0;const t=e.id.split("-");return Number(t[t.length-2])},XV=e=>{if(!e)return;const t=e.querySelector("input");t?t.click():eC(e)&&e.click()},ZV=(e,t)=>{const n=t.slice(0),a=n.map(l=>l.uid),o=e.reduce((l,s)=>{const r=a.indexOf(s.uid);return r>-1&&(l.push(s),n.splice(r,1),a.splice(r,1)),l},[]);return o.push(...n),o};var JV=ie({name:"ElCascaderPanel",__name:"index",props:vV,emits:hV,setup(e,{expose:t,emit:n}){const a=e,o=n;let l=!1;const s=he("cascader"),r=mV(a),u=fn();let c;const d=A(!0),f=A(!1),p=A([]),g=A(),v=A([]),h=A(),m=A([]),y=S(()=>r.value.expandTrigger==="hover"),b=S(()=>a.renderLabel||u.default),w=()=>{const{options:R}=a,I=r.value;l=!1,c=new hb(R,I),v.value=[c.getNodes()],I.lazy&&la(a.options)?(d.value=!1,C(void 0,L=>{L&&(c=new hb(L,I),v.value=[c.getNodes()]),d.value=!0,P(!1,!0)})):P(!1,!0)},C=(R,I)=>{const L=r.value;R=R||new Hp({},L,void 0,!0),R.loading=!0;const z=K=>{const q=R,Q=q.root?null:q;q.loading=!1,q.loaded=!0,q.childrenData=q.childrenData||[],K&&(c==null||c.appendNodes(K,Q)),K&&(I==null||I(K)),R.level===0&&(f.value=!0)},H=()=>{R.loading=!1,R.loaded=!1,R.level===0&&(d.value=!0)};L.lazyLoad(R,z,H)},k=(R,I)=>{var K;const{level:L}=R,z=v.value.slice(0,L);let H;R.isLeaf?H=R.pathNodes[L-2]:(H=R,z.push(R.children)),((K=h.value)==null?void 0:K.uid)!==(H==null?void 0:H.uid)&&(h.value=R,v.value=z,!I&&o("expand-change",(R==null?void 0:R.pathValues)||[]))},E=(R,I,L=!0)=>{const{checkStrictly:z,multiple:H}=r.value,K=m.value[0];l=!0,!H&&(K==null||K.doCheck(!1)),R.doCheck(I),_(),L&&!H&&!z&&o("close"),!L&&!H&&T(R)},T=R=>{R&&(R=R.parent,T(R),R&&k(R))},$=R=>c==null?void 0:c.getFlattedNodes(R),N=R=>{var I;return(I=$(R))==null?void 0:I.filter(({checked:L})=>L!==!1)},O=()=>{m.value.forEach(R=>R.doCheck(!1)),_(),v.value=v.value.slice(0,1),h.value=void 0,o("expand-change",[])},_=()=>{const{checkStrictly:R,multiple:I}=r.value,L=m.value,z=ZV(L,N(!R)),H=z.map(K=>K.valueByOption);m.value=z,g.value=I?H:H[0]??null},P=(R=!1,I=!1)=>{const{modelValue:L}=a,{lazy:z,multiple:H,checkStrictly:K}=r.value,q=!K;if(!(!d.value||l||!I&&tn(L,g.value)))if(z&&!R){const Q=Py(jR(Xn(L))).map(ee=>c==null?void 0:c.getNodeByValue(ee)).filter(ee=>!!ee&&!ee.loaded&&!ee.loading);Q.length?Q.forEach(ee=>{C(ee,()=>P(!1,I))}):P(!0,I)}else D(Py((H?Xn(L):[L]).map(Q=>c==null?void 0:c.getNodeByValue(Q,q))),I),g.value=mo(L??void 0)},D=(R,I=!0)=>{const{checkStrictly:L}=r.value,z=m.value,H=R.filter(Q=>!!Q&&(L||Q.isLeaf)),K=c==null?void 0:c.getSameNode(h.value),q=I&&K||H[0];q?q.pathNodes.forEach(Q=>k(Q,!0)):h.value=void 0,z.forEach(Q=>Q.doCheck(!1)),Rt(H).forEach(Q=>Q.doCheck(!0)),m.value=H,Ae(W)},W=()=>{Mt&&p.value.forEach(R=>{const I=R==null?void 0:R.$el;if(I){const L=I.querySelector(`.${s.namespace.value}-scrollbar__wrap`);let z=I.querySelector(`.${s.b("node")}.in-active-path`);if(!z){const H=I.querySelectorAll(`.${s.b("node")}.${s.is("active")}`);z=H[H.length-1]}ih(L,z)}})},U=R=>{var z,H;const I=R.target,L=zt(R);switch(L){case Ce.up:case Ce.down:R.preventDefault(),tc(tC(I,L===Ce.up?-1:1,`.${s.b("node")}[tabindex="-1"]`));break;case Ce.left:{R.preventDefault();const K=(z=p.value[mb(I)-1])==null?void 0:z.$el.querySelector(`.${s.b("node")}[aria-expanded="true"]`);tc(K);break}case Ce.right:{R.preventDefault();const K=(H=p.value[mb(I)+1])==null?void 0:H.$el.querySelector(`.${s.b("node")}[tabindex="-1"]`);tc(K);break}case Ce.enter:case Ce.numpadEnter:XV(I);break}};bt(Fd,Rt({config:r,expandingNode:h,checkedNodes:m,isHoverMenu:y,initialLoaded:d,renderLabelFn:b,lazyLoad:C,expandNode:k,handleCheckChange:E})),fe(r,(R,I)=>{tn(R,I)||w()},{immediate:!0}),fe(()=>a.options,w,{deep:!0}),fe(()=>a.modelValue,()=>{l=!1,P()},{deep:!0}),fe(()=>g.value,R=>{tn(R,a.modelValue)||(o(at,R),o(yt,R))});const F=()=>{f.value||w()};return Iv(()=>p.value=[]),mt(()=>!la(a.modelValue)&&P()),t({menuList:p,menus:v,checkedNodes:m,handleKeyDown:U,handleCheckChange:E,getFlattedNodes:$,getCheckedNodes:N,clearCheckedNodes:O,calculateCheckedValue:_,scrollToExpandingNode:W,loadLazyRootNodes:F}),(R,I)=>(x(),B("div",{class:M([i(s).b("panel"),i(s).is("bordered",e.border)]),onKeydown:U},[(x(!0),B(He,null,Ct(v.value,(L,z)=>(x(),re(YV,{key:z,ref_for:!0,ref:H=>p.value[z]=H,index:z,nodes:[...L]},{empty:ne(()=>[ae(R.$slots,"empty")]),_:3},8,["index","nodes"]))),128))],34))}}),QV=JV;const f2=rt(QV),eB=Se({...ZS,size:Sn,placeholder:String,disabled:{type:Boolean,default:void 0},clearable:Boolean,clearIcon:{type:Ft,default:_o},filterable:Boolean,filterMethod:{type:X(Function),default:(e,t)=>e.text.includes(t)},separator:{type:String,default:" / "},showAllLevels:{type:Boolean,default:!0},collapseTags:Boolean,maxCollapseTags:{type:Number,default:1},collapseTagsTooltip:Boolean,maxCollapseTagsTooltipHeight:{type:[String,Number]},debounce:{type:Number,default:300},beforeFilter:{type:X(Function),default:()=>!0},placement:{type:X(String),values:Mo,default:"bottom-start"},fallbackPlacements:{type:X(Array),default:["bottom-start","bottom","top-start","top","right","left"]},popperClass:Bt.popperClass,popperStyle:Bt.popperStyle,teleported:Bt.teleported,effect:{type:X(String),default:"light"},tagType:{...ol.type,default:"info"},tagEffect:{...ol.effect,default:"light"},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},showCheckedStrategy:{type:String,values:["parent","child"],default:"child"},checkOnClickNode:Boolean,showPrefix:{type:Boolean,default:!0},...Is}),gb=e=>!0,tB={[at]:gb,[yt]:gb,focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,visibleChange:e=>Vt(e),expandChange:e=>!!e,removeTag:e=>!!e},nB=["placeholder"],aB=["onClick"];var oB=ie({name:"ElCascader",__name:"cascader",props:eB,emits:tB,setup(e,{expose:t,emit:n}){const a={modifiers:[{name:"arrowPosition",enabled:!0,phase:"main",fn:({state:Ne})=>{const{modifiersData:Ke,placement:Ze}=Ne;["right","left","bottom","top"].includes(Ze)||Ke.arrow&&(Ke.arrow.x=35)},requires:["arrow"]}]},o=e,l=n,s=rl(),r=fn();let u=0,c=0;const d=he("cascader"),f=he("input"),p={small:7,default:11,large:15},{t:g}=Et(),{formItem:v}=Pn(),h=on(),{valueOnClear:m}=gu(o),{isComposing:y,handleComposition:b}=mu({afterComposition(Ne){var Ze;const Ke=(Ze=Ne.target)==null?void 0:Ze.value;$e(Ke)}}),w=A(),C=A(),k=A(),E=A(),T=A(),$=A(),N=A(!1),O=A(!1),_=A(!1),P=A(""),D=A(""),W=A([]),U=A([]),F=S(()=>o.props.multiple?o.collapseTags?W.value.slice(0,o.maxCollapseTags):W.value:[]),R=S(()=>o.props.multiple?o.collapseTags?W.value.slice(o.maxCollapseTags):[]:[]),I=S(()=>s.style),L=S(()=>o.placeholder??g("el.cascader.placeholder")),z=S(()=>D.value||W.value.length>0||y.value?"":L.value),H=bn(),K=S(()=>H.value==="small"?"small":"default"),q=S(()=>!!o.props.multiple),Q=S(()=>!o.filterable||q.value),ee=S(()=>q.value?D.value:P.value),ue=S(()=>{var Ne;return((Ne=T.value)==null?void 0:Ne.checkedNodes)||[]}),{wrapperRef:te,isFocused:de,handleBlur:se}=dl(k,{disabled:h,beforeBlur(Ne){var Ke,Ze;return((Ke=w.value)==null?void 0:Ke.isFocusInsideContent(Ne))||((Ze=C.value)==null?void 0:Ze.isFocusInsideContent(Ne))},afterBlur(){var Ne;o.validateEvent&&((Ne=v==null?void 0:v.validate)==null||Ne.call(v,"blur").catch(Ke=>ft(Ke)))}}),Y=S(()=>!o.clearable||h.value||_.value||!O.value&&!de.value?!1:!!ue.value.length),G=S(()=>{const{showAllLevels:Ne,separator:Ke}=o,Ze=ue.value;return Ze.length?q.value?"":Ze[0].calcText(Ne,Ke):""}),V=S(()=>(v==null?void 0:v.validateState)||""),Z=S({get(){return mo(o.modelValue)},set(Ne){const Ke=Ne??m.value;l(at,Ke),l(yt,Ke),o.validateEvent&&(v==null||v.validate("change").catch(Ze=>ft(Ze)))}}),oe=S(()=>[d.b(),d.m(H.value),d.is("disabled",h.value),s.class]),ce=S(()=>[f.e("icon"),"icon-arrow-down",d.is("reverse",N.value)]),ge=S(()=>d.is("focus",de.value)),me=S(()=>{var Ne,Ke;return(Ke=(Ne=w.value)==null?void 0:Ne.popperRef)==null?void 0:Ke.contentRef}),Me=Ne=>{de.value&&se(new FocusEvent("blur",Ne)),Ie(!1)},Ie=Ne=>{var Ke,Ze;h.value||(Ne=Ne??!N.value,Ne!==N.value&&(N.value=Ne,(Ze=(Ke=k.value)==null?void 0:Ke.input)==null||Ze.setAttribute("aria-expanded",`${Ne}`),Ne?(Re(),T.value&&Ae(T.value.scrollToExpandingNode)):o.filterable&&et(),l("visibleChange",Ne)))},Re=()=>{Ae(()=>{var Ne;(Ne=w.value)==null||Ne.updatePopper()})},ye=()=>{_.value=!1},Te=Ne=>{const{showAllLevels:Ke,separator:Ze}=o;return{node:Ne,key:Ne.uid,text:Ne.calcText(Ke,Ze),hitState:!1,closable:!h.value&&!Ne.isDisabled}},we=Ne=>{var Ze;const Ke=Ne.node;Ke.doCheck(!1),(Ze=T.value)==null||Ze.calculateCheckedValue(),l("removeTag",Ke.valueByOption)},Pe=()=>{switch(o.showCheckedStrategy){case"child":return ue.value;case"parent":{const Ne=Oe(!1),Ke=Ne.map(Ze=>Ze.value);return Ne.filter(Ze=>!Ze.parent||!Ke.includes(Ze.parent.value))}default:return[]}},Ve=()=>{if(!q.value)return;const Ne=Pe(),Ke=[];Ne.forEach(Ze=>Ke.push(Te(Ze))),W.value=Ke},Qe=()=>{var Dt,qt;const{filterMethod:Ne,showAllLevels:Ke,separator:Ze}=o,rn=(qt=(Dt=T.value)==null?void 0:Dt.getFlattedNodes(!o.props.checkStrictly))==null?void 0:qt.filter(Ue=>Ue.isDisabled?!1:(Ue.calcText(Ke,Ze),Ne(Ue,ee.value)));q.value&&W.value.forEach(Ue=>{Ue.hitState=!1}),_.value=!0,U.value=rn,Re()},tt=()=>{var Ke;let Ne;_.value&&$.value?Ne=$.value.$el.querySelector(`.${d.e("suggestion-item")}`):Ne=(Ke=T.value)==null?void 0:Ke.$el.querySelector(`.${d.b("node")}[tabindex="-1"]`),Ne&&(Ne.focus(),!_.value&&Ne.getAttribute("aria-haspopup")==="true"&&Ne.click())},nt=()=>{var rn,Dt,qt;const Ne=(rn=k.value)==null?void 0:rn.input,Ke=E.value,Ze=(Dt=$.value)==null?void 0:Dt.$el;if(!(!Mt||!Ne)){if(Ze){const Ue=Ze.querySelector(`.${d.e("suggestion-list")}`);Ue.style.minWidth=`${Ne.offsetWidth}px`}if(Ke){const{offsetHeight:Ue}=Ke,Ge=W.value.length>0?`${Math.max(Ue,u)-2}px`:`${u}px`;if(Ne.style.height=Ge,r.prefix){const ht=(qt=k.value)==null?void 0:qt.$el.querySelector(`.${f.e("prefix")}`);let En=0;ht&&(En=ht.offsetWidth,En>0&&(En+=p[H.value||"default"])),Ke.style.left=`${En}px`}else Ke.style.left="0";Re()}}},Oe=Ne=>{var Ke;return(Ke=T.value)==null?void 0:Ke.getCheckedNodes(Ne)},qe=Ne=>{Re(),l("expandChange",Ne)},it=Ne=>{if(!y.value)switch(zt(Ne)){case Ce.enter:case Ce.numpadEnter:Ie();break;case Ce.down:Ie(!0),Ae(tt),Ne.preventDefault();break;case Ce.esc:N.value===!0&&(Ne.preventDefault(),Ne.stopPropagation(),Ie(!1));break;case Ce.tab:Ie(!1);break}},We=()=>{var Ne;(Ne=T.value)==null||Ne.clearCheckedNodes(),!N.value&&o.filterable&&et(),Ie(!1),l("clear")},et=()=>{const{value:Ne}=G;P.value=Ne,D.value=Ne},gt=Ne=>{var Ze,rn;const{checked:Ke}=Ne;q.value?(Ze=T.value)==null||Ze.handleCheckChange(Ne,!Ke,!1):(!Ke&&((rn=T.value)==null||rn.handleCheckChange(Ne,!0,!1)),Ie(!1))},ve=Ne=>{const Ke=Ne.target,Ze=zt(Ne);switch(Ze){case Ce.up:case Ce.down:Ne.preventDefault(),tc(tC(Ke,Ze===Ce.up?-1:1,`.${d.e("suggestion-item")}[tabindex="-1"]`));break;case Ce.enter:case Ce.numpadEnter:Ke.click();break}},Le=()=>{const Ne=W.value[W.value.length-1];c=D.value?0:c+1,!(!Ne||!c||o.collapseTags&&W.value.length>1)&&(Ne.hitState?we(Ne):Ne.hitState=!0)},pe=eu(()=>{const{value:Ne}=ee;if(!Ne)return;const Ke=o.beforeFilter(Ne);Pl(Ke)?Ke.then(Qe).catch(()=>{}):Ke!==!1?Qe():ye()},S(()=>o.debounce)),$e=(Ne,Ke)=>{if(!N.value&&Ie(!0),!(Ke!=null&&Ke.isComposing))if(Ne)pe();else{const Ze=o.beforeFilter("");Pl(Ze)&&Ze.catch(()=>{}),ye()}},ut=Ne=>Number.parseFloat(A$(f.cssVarName("input-height"),Ne).value)-2,It=()=>{var Ne;(Ne=k.value)==null||Ne.focus()},Yt=()=>{var Ne;(Ne=k.value)==null||Ne.blur()};return fe(_,Re),fe([ue,h,()=>o.collapseTags,()=>o.maxCollapseTags],Ve),fe(W,()=>{Ae(()=>nt())}),fe(H,async()=>{await Ae();const Ne=k.value.input;u=ut(Ne)||u,nt()}),fe(G,et,{immediate:!0}),fe(()=>N.value,Ne=>{var Ke;Ne&&o.props.lazy&&o.props.lazyLoad&&((Ke=T.value)==null||Ke.loadLazyRootNodes())}),mt(()=>{const Ne=k.value.input,Ke=ut(Ne);u=Ne.offsetHeight||Ke,Xt(Ne,nt)}),t({getCheckedNodes:Oe,cascaderPanelRef:T,togglePopperVisible:Ie,contentRef:me,presentText:G,focus:It,blur:Yt}),(Ne,Ke)=>(x(),re(i(_n),{ref_key:"tooltipRef",ref:w,visible:N.value,teleported:e.teleported,"popper-class":[i(d).e("dropdown"),e.popperClass],"popper-style":e.popperStyle,"popper-options":a,"fallback-placements":e.fallbackPlacements,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,placement:e.placement,transition:`${i(d).namespace.value}-zoom-in-top`,effect:e.effect,pure:"",persistent:e.persistent,onHide:ye},{default:ne(()=>[dt((x(),B("div",{ref_key:"wrapperRef",ref:te,class:M(oe.value),style:je(I.value),onClick:Ke[8]||(Ke[8]=()=>Ie(Q.value?void 0:!0)),onKeydown:it,onMouseenter:Ke[9]||(Ke[9]=Ze=>O.value=!0),onMouseleave:Ke[10]||(Ke[10]=Ze=>O.value=!1)},[J(i(Dn),{ref_key:"inputRef",ref:k,modelValue:P.value,"onUpdate:modelValue":Ke[1]||(Ke[1]=Ze=>P.value=Ze),placeholder:z.value,readonly:Q.value,disabled:i(h),"validate-event":!1,size:i(H),class:M(ge.value),tabindex:q.value&&e.filterable&&!i(h)?-1:void 0,onCompositionstart:i(b),onCompositionupdate:i(b),onCompositionend:i(b),onInput:$e},ra({suffix:ne(()=>[Y.value?(x(),re(i(Be),{key:"clear",class:M([i(f).e("icon"),"icon-circle-close"]),onClick:Xe(We,["stop"])},{default:ne(()=>[(x(),re(ct(e.clearIcon)))]),_:1},8,["class"])):(x(),re(i(Be),{key:"arrow-down",class:M(ce.value),onClick:Ke[0]||(Ke[0]=Xe(Ze=>Ie(),["stop"]))},{default:ne(()=>[J(i(Io))]),_:1},8,["class"]))]),_:2},[Ne.$slots.prefix?{name:"prefix",fn:ne(()=>[ae(Ne.$slots,"prefix")]),key:"0"}:void 0]),1032,["modelValue","placeholder","readonly","disabled","size","class","tabindex","onCompositionstart","onCompositionupdate","onCompositionend"]),q.value?(x(),B("div",{key:0,ref_key:"tagWrapper",ref:E,class:M([i(d).e("tags"),i(d).is("validate",!!V.value)])},[ae(Ne.$slots,"tag",{data:W.value,deleteTag:we},()=>[(x(!0),B(He,null,Ct(F.value,Ze=>(x(),re(i(Xo),{key:Ze.key,type:e.tagType,size:K.value,effect:e.tagEffect,hit:Ze.hitState,closable:Ze.closable,"disable-transitions":"",onClose:rn=>we(Ze)},{default:ne(()=>[j("span",null,ke(Ze.text),1)]),_:2},1032,["type","size","effect","hit","closable","onClose"]))),128))]),e.collapseTags&&W.value.length>e.maxCollapseTags?(x(),re(i(_n),{key:0,ref_key:"tagTooltipRef",ref:C,disabled:N.value||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],placement:"bottom","popper-class":e.popperClass,"popper-style":e.popperStyle,effect:e.effect,persistent:e.persistent},{default:ne(()=>[J(i(Xo),{closable:!1,size:K.value,type:e.tagType,effect:e.tagEffect,"disable-transitions":""},{default:ne(()=>[j("span",{class:M(i(d).e("tags-text"))}," + "+ke(W.value.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect"])]),content:ne(()=>[J(i(Ga),{"max-height":e.maxCollapseTagsTooltipHeight},{default:ne(()=>[j("div",{class:M(i(d).e("collapse-tags"))},[(x(!0),B(He,null,Ct(R.value,(Ze,rn)=>(x(),B("div",{key:rn,class:M(i(d).e("collapse-tag"))},[(x(),re(i(Xo),{key:Ze.key,class:"in-tooltip",type:e.tagType,size:K.value,effect:e.tagEffect,hit:Ze.hitState,closable:Ze.closable,"disable-transitions":"",onClose:Dt=>we(Ze)},{default:ne(()=>[j("span",null,ke(Ze.text),1)]),_:2},1032,["type","size","effect","hit","closable","onClose"]))],2))),128))],2)]),_:1},8,["max-height"])]),_:1},8,["disabled","popper-class","popper-style","effect","persistent"])):le("v-if",!0),e.filterable&&!i(h)?dt((x(),B("input",{key:1,"onUpdate:modelValue":Ke[2]||(Ke[2]=Ze=>D.value=Ze),type:"text",class:M(i(d).e("search-input")),placeholder:G.value?"":L.value,onInput:Ke[3]||(Ke[3]=Ze=>$e(D.value,Ze)),onClick:Ke[4]||(Ke[4]=Xe(Ze=>Ie(!0),["stop"])),onKeydown:en(Le,["delete"]),onCompositionstart:Ke[5]||(Ke[5]=(...Ze)=>i(b)&&i(b)(...Ze)),onCompositionupdate:Ke[6]||(Ke[6]=(...Ze)=>i(b)&&i(b)(...Ze)),onCompositionend:Ke[7]||(Ke[7]=(...Ze)=>i(b)&&i(b)(...Ze))},null,42,nB)),[[Q1,D.value]]):le("v-if",!0)],2)):le("v-if",!0)],38)),[[i(Ll),Me,me.value]])]),content:ne(()=>[Ne.$slots.header?(x(),B("div",{key:0,class:M(i(d).e("header")),onClick:Ke[11]||(Ke[11]=Xe(()=>{},["stop"]))},[ae(Ne.$slots,"header")],2)):le("v-if",!0),dt(J(i(f2),{ref_key:"cascaderPanelRef",ref:T,modelValue:Z.value,"onUpdate:modelValue":Ke[12]||(Ke[12]=Ze=>Z.value=Ze),options:e.options,props:o.props,border:!1,"render-label":Ne.$slots.default,onExpandChange:qe,onClose:Ke[13]||(Ke[13]=Ze=>Ne.$nextTick(()=>Ie(!1)))},{empty:ne(()=>[ae(Ne.$slots,"empty")]),_:3},8,["modelValue","options","props","render-label"]),[[Nt,!_.value]]),e.filterable?dt((x(),re(i(Ga),{key:1,ref_key:"suggestionPanel",ref:$,tag:"ul",class:M(i(d).e("suggestion-panel")),"view-class":i(d).e("suggestion-list"),onKeydown:ve},{default:ne(()=>[U.value.length?(x(!0),B(He,{key:0},Ct(U.value,Ze=>(x(),B("li",{key:Ze.uid,class:M([i(d).e("suggestion-item"),i(d).is("checked",Ze.checked)]),tabindex:-1,onClick:rn=>gt(Ze)},[ae(Ne.$slots,"suggestion-item",{item:Ze},()=>[j("span",null,ke(Ze.text),1),Ze.checked?(x(),re(i(Be),{key:0},{default:ne(()=>[J(i(yu))]),_:1})):le("v-if",!0)])],10,aB))),128)):ae(Ne.$slots,"empty",{key:1},()=>[j("li",{class:M(i(d).e("empty-text"))},ke(i(g)("el.cascader.noMatch")),3)])]),_:3},8,["class","view-class"])),[[Nt,_.value]]):le("v-if",!0),Ne.$slots.footer?(x(),B("div",{key:2,class:M(i(d).e("footer")),onClick:Ke[14]||(Ke[14]=Xe(()=>{},["stop"]))},[ae(Ne.$slots,"footer")],2)):le("v-if",!0)]),_:3},8,["visible","teleported","popper-class","popper-style","fallback-placements","placement","transition","effect","persistent"]))}}),lB=oB;const sB=rt(lB),rB=Se({checked:Boolean,disabled:Boolean,type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"}}),iB={"update:checked":e=>Vt(e),[yt]:e=>Vt(e)};var uB=ie({name:"ElCheckTag",__name:"check-tag",props:rB,emits:iB,setup(e,{emit:t}){const n=e,a=t,o=he("check-tag"),l=S(()=>[o.b(),o.is("checked",n.checked),o.is("disabled",n.disabled),o.m(n.type||"primary")]),s=()=>{if(n.disabled)return;const r=!n.checked;a(yt,r),a("update:checked",r)};return(r,u)=>(x(),B("span",{class:M(l.value),onClick:s},[ae(r.$slots,"default")],2))}}),cB=uB;const dB=rt(cB),fB=Se({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:X([Number,Object]),default:()=>nn({})},sm:{type:X([Number,Object]),default:()=>nn({})},md:{type:X([Number,Object]),default:()=>nn({})},lg:{type:X([Number,Object]),default:()=>nn({})},xl:{type:X([Number,Object]),default:()=>nn({})}}),pB=["start","center","end","space-around","space-between","space-evenly"],vB=["top","middle","bottom"],hB=Se({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:pB,default:"start"},align:{type:String,values:vB}}),p2=Symbol("rowContextKey");var mB=ie({name:"ElRow",__name:"row",props:hB,setup(e){const t=e,n=he("row");bt(p2,{gutter:S(()=>t.gutter)});const a=S(()=>{const l={};return t.gutter&&(l.marginRight=l.marginLeft=`-${t.gutter/2}px`),l}),o=S(()=>[n.b(),n.is(`justify-${t.justify}`,t.justify!=="start"),n.is(`align-${t.align}`,!!t.align)]);return(l,s)=>(x(),re(ct(e.tag),{class:M(o.value),style:je(a.value)},{default:ne(()=>[ae(l.$slots,"default")]),_:3},8,["class","style"]))}}),gB=mB;const yB=rt(gB);var bB=ie({name:"ElCol",__name:"col",props:fB,setup(e){const t=e,{gutter:n}=_e(p2,{gutter:S(()=>0)}),a=he("col"),o=S(()=>{const s={};return n.value&&(s.paddingLeft=s.paddingRight=`${n.value/2}px`),s}),l=S(()=>{const s=[];return["span","offset","pull","push"].forEach(r=>{const u=t[r];Fe(u)&&(r==="span"?s.push(a.b(`${t[r]}`)):u>0&&s.push(a.b(`${r}-${t[r]}`)))}),["xs","sm","md","lg","xl"].forEach(r=>{Fe(t[r])?s.push(a.b(`${r}-${t[r]}`)):ot(t[r])&&Object.entries(t[r]).forEach(([u,c])=>{s.push(u!=="span"?a.b(`${r}-${u}-${c}`):a.b(`${r}-${c}`))})}),n.value&&s.push(a.is("guttered")),[a.b(),s]});return(s,r)=>(x(),re(ct(e.tag),{class:M(l.value),style:je(o.value)},{default:ne(()=>[ae(s.$slots,"default")]),_:3},8,["class","style"]))}}),wB=bB;const CB=rt(wB),yb=e=>Fe(e)||De(e)||be(e),SB=Se({accordion:Boolean,modelValue:{type:X([Array,String,Number]),default:()=>nn([])},expandIconPosition:{type:X([String]),default:"right"},beforeCollapse:{type:X(Function)}}),kB={[at]:yb,[yt]:yb},v2=Symbol("collapseContextKey"),EB=Se({title:{type:String,default:""},name:{type:X([String,Number]),default:void 0},icon:{type:Ft,default:Jn},disabled:Boolean});var xB=ie({name:"ElCollapseTransition",__name:"collapse-transition",setup(e){const t=he("collapse-transition"),n=o=>{o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom},a={beforeEnter(o){o.dataset||(o.dataset={}),o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.style.height&&(o.dataset.elExistsHeight=o.style.height),o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0},enter(o){requestAnimationFrame(()=>{o.dataset.oldOverflow=o.style.overflow,o.dataset.elExistsHeight?o.style.maxHeight=o.dataset.elExistsHeight:o.scrollHeight!==0?o.style.maxHeight=`${o.scrollHeight}px`:o.style.maxHeight=0,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom,o.style.overflow="hidden"})},afterEnter(o){o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow},enterCancelled(o){n(o)},beforeLeave(o){o.dataset||(o.dataset={}),o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.dataset.oldOverflow=o.style.overflow,o.style.maxHeight=`${o.scrollHeight}px`,o.style.overflow="hidden"},leave(o){o.scrollHeight!==0&&(o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0)},afterLeave(o){n(o)},leaveCancelled(o){n(o)}};return(o,l)=>(x(),re(Bn,pt({name:i(t).b()},Zx(a)),{default:ne(()=>[ae(o.$slots,"default")]),_:3},16,["name"]))}}),TB=xB;const zd=rt(TB),bb="ElCollapse",$B=(e,t)=>{const n=A(Tn(e.modelValue)),a=s=>{n.value=s;const r=e.accordion?n.value[0]:n.value;t(at,r),t(yt,r)},o=s=>{if(e.accordion)a([n.value[0]===s?"":s]);else{const r=[...n.value],u=r.indexOf(s);u>-1?r.splice(u,1):r.push(s),a(r)}},l=async s=>{const{beforeCollapse:r}=e;if(!r){o(s);return}const u=r(s);[Pl(u),Vt(u)].includes(!0)||Jt(bb,"beforeCollapse must return type `Promise` or `boolean`"),Pl(u)?u.then(c=>{c!==!1&&o(s)}).catch(c=>{ft(bb,`some error occurred: ${c}`)}):u&&o(s)};return fe(()=>e.modelValue,()=>n.value=Tn(e.modelValue),{deep:!0}),bt(v2,{activeNames:n,handleItemClick:l}),{activeNames:n,setActiveNames:a}},OB=e=>{const t=he("collapse");return{rootKls:S(()=>[t.b(),t.b(`icon-position-${e.expandIconPosition}`)])}};var NB=ie({name:"ElCollapse",__name:"collapse",props:SB,emits:kB,setup(e,{expose:t,emit:n}){const a=e,{activeNames:o,setActiveNames:l}=$B(a,n),{rootKls:s}=OB(a);return t({activeNames:o,setActiveNames:l}),(r,u)=>(x(),B("div",{class:M(i(s))},[ae(r.$slots,"default")],2))}}),MB=NB;const RB=e=>{const t=_e(v2),{namespace:n}=he("collapse"),a=A(!1),o=A(!1),l=yh(),s=S(()=>l.current++),r=S(()=>e.name??`${n.value}-id-${l.prefix}-${i(s)}`),u=S(()=>t==null?void 0:t.activeNames.value.includes(i(r)));return{focusing:a,id:s,isActive:u,handleFocus:()=>{setTimeout(()=>{o.value?o.value=!1:a.value=!0},50)},handleHeaderClick:p=>{var g;e.disabled||(g=p.target)!=null&&g.closest("input, textarea, select")||(t==null||t.handleItemClick(i(r)),a.value=!1,o.value=!0)},handleEnterClick:p=>{var g;(g=p.target)!=null&&g.closest("input, textarea, select")||(p.preventDefault(),t==null||t.handleItemClick(i(r)))}}},IB=(e,{focusing:t,isActive:n,id:a})=>{const o=he("collapse"),l=S(()=>[o.b("item"),o.is("active",i(n)),o.is("disabled",e.disabled)]),s=S(()=>[o.be("item","header"),o.is("active",i(n)),{focusing:i(t)&&!e.disabled}]),r=S(()=>[o.be("item","arrow"),o.is("active",i(n))]);return{itemTitleKls:S(()=>[o.be("item","title")]),arrowKls:r,headKls:s,rootKls:l,itemWrapperKls:S(()=>o.be("item","wrap")),itemContentKls:S(()=>o.be("item","content")),scopedContentId:S(()=>o.b(`content-${i(a)}`)),scopedHeadId:S(()=>o.b(`head-${i(a)}`))}},_B=["id","aria-expanded","aria-controls","aria-describedby","tabindex","aria-disabled"],PB=["id","aria-hidden","aria-labelledby"];var AB=ie({name:"ElCollapseItem",__name:"collapse-item",props:EB,setup(e,{expose:t}){const n=e,{focusing:a,id:o,isActive:l,handleFocus:s,handleHeaderClick:r,handleEnterClick:u}=RB(n),{arrowKls:c,headKls:d,rootKls:f,itemTitleKls:p,itemWrapperKls:g,itemContentKls:v,scopedContentId:h,scopedHeadId:m}=IB(n,{focusing:a,isActive:l,id:o});return t({isActive:l}),(y,b)=>(x(),B("div",{class:M(i(f))},[j("div",{id:i(m),class:M(i(d)),"aria-expanded":i(l),"aria-controls":i(h),"aria-describedby":i(h),tabindex:e.disabled?void 0:0,"aria-disabled":e.disabled,role:"button",onClick:b[0]||(b[0]=(...w)=>i(r)&&i(r)(...w)),onKeydown:b[1]||(b[1]=en(Xe((...w)=>i(u)&&i(u)(...w),["stop"]),["space","enter"])),onFocus:b[2]||(b[2]=(...w)=>i(s)&&i(s)(...w)),onBlur:b[3]||(b[3]=w=>a.value=!1)},[j("span",{class:M(i(p))},[ae(y.$slots,"title",{isActive:i(l)},()=>[St(ke(e.title),1)])],2),ae(y.$slots,"icon",{isActive:i(l)},()=>[J(i(Be),{class:M(i(c))},{default:ne(()=>[(x(),re(ct(e.icon)))]),_:1},8,["class"])])],42,_B),J(i(zd),null,{default:ne(()=>[dt(j("div",{id:i(h),role:"region",class:M(i(g)),"aria-hidden":!i(l),"aria-labelledby":i(m)},[j("div",{class:M(i(v))},[ae(y.$slots,"default")],2)],10,PB),[[Nt,i(l)]])]),_:3})],2))}}),h2=AB;const LB=rt(MB,{CollapseItem:h2}),DB=Qt(h2),m2=Se({modelValue:{type:X(String),default:void 0},border:{type:Boolean,default:!0},showAlpha:Boolean,colorFormat:{type:X(String)},disabled:Boolean,predefine:{type:X(Array)},validateEvent:{type:Boolean,default:!0},hueSliderClass:{type:X([String,Array,Object])},hueSliderStyle:{type:X([String,Array,Object])}}),VB={[at]:e=>De(e)||hn(e)},g2=Symbol("colorCommonPickerKey"),y2=Symbol("colorPickerPanelContextKey"),b2=Se({color:{type:X(Object),required:!0},vertical:Boolean,disabled:Boolean}),BB=b2,wb=e=>{let t=0,n=e;for(;n;)t+=n.offsetTop,n=n.offsetParent;return t},jp=(e,t)=>Math.abs(wb(e)-wb(t)),w2=e=>{let t,n;return e.type==="touchend"?(n=e.changedTouches[0].clientY,t=e.changedTouches[0].clientX):e.type.startsWith("touch")?(n=e.touches[0].clientY,t=e.touches[0].clientX):(n=e.clientY,t=e.clientX),{clientX:t,clientY:n}};let If=!1;function Up(e,t){if(!Mt)return;const n=function(l){var s;(s=t.drag)==null||s.call(t,l)},a=function(l){var s;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",a),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",a),document.onselectstart=null,document.ondragstart=null,If=!1,(s=t.end)==null||s.call(t,l)},o=function(l){var s;If||(document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",a),document.addEventListener("touchmove",n),document.addEventListener("touchend",a),If=!0,(s=t.start)==null||s.call(t,l))};e.addEventListener("mousedown",o),e.addEventListener("touchstart",o,{passive:!1})}const C2=(e,{key:t,minValue:n,maxValue:a})=>{const o=vt(),l=Wt(),s=Wt(),r=S(()=>e.color.get(t));function u(p){var g;e.disabled||(p.target!==l.value&&c(p),(g=l.value)==null||g.focus())}function c(p){if(!s.value||!l.value||e.disabled)return;const g=o.vnode.el.getBoundingClientRect(),{clientX:v,clientY:h}=w2(p);let m;if(e.vertical){let y=h-g.top;y=Math.max(l.value.offsetHeight/2,y),y=Math.min(y,g.height-l.value.offsetHeight/2),m=Math.round((y-l.value.offsetHeight/2)/(g.height-l.value.offsetHeight)*a)}else{let y=v-g.left;y=Math.max(l.value.offsetWidth/2,y),y=Math.min(y,g.width-l.value.offsetWidth/2),m=Math.round((y-l.value.offsetWidth/2)/(g.width-l.value.offsetWidth)*a)}e.color.set(t,m)}function d(p){if(e.disabled)return;const{shiftKey:g}=p,v=zt(p),h=g?10:1,m=t==="hue"?-1:1;let y=!0;switch(v){case Ce.left:case Ce.down:f(-h*m);break;case Ce.right:case Ce.up:f(h*m);break;case Ce.home:e.color.set(t,t==="hue"?a:n);break;case Ce.end:e.color.set(t,t==="hue"?n:a);break;case Ce.pageDown:f(-4*m);break;case Ce.pageUp:f(4*m);break;default:y=!1;break}y&&p.preventDefault()}function f(p){let g=r.value+p;g=ga?a:g,e.color.set(t,g)}return{thumb:l,bar:s,currentValue:r,handleDrag:c,handleClick:u,handleKeydown:d}},S2=(e,{namespace:t,maxValue:n,bar:a,thumb:o,currentValue:l,handleDrag:s,getBackground:r})=>{const u=vt(),c=he(t),d=A(0),f=A(0),p=A();function g(){if(!o.value||e.vertical)return 0;const w=u.vnode.el,C=l.value;return w?Math.round(C*(w.offsetWidth-o.value.offsetWidth/2)/n):0}function v(){if(!o.value)return 0;const w=u.vnode.el;if(!e.vertical)return 0;const C=l.value;return w?Math.round(C*(w.offsetHeight-o.value.offsetHeight/2)/n):0}function h(){d.value=g(),f.value=v(),p.value=r==null?void 0:r()}mt(()=>{if(!a.value||!o.value)return;const w={drag:C=>{s(C)},end:C=>{s(C)}};Up(a.value,w),Up(o.value,w),h()}),fe(l,()=>h()),fe(()=>e.color.value,()=>h());const m=S(()=>[c.b(),c.is("vertical",e.vertical),c.is("disabled",e.disabled)]),y=S(()=>c.e("bar")),b=S(()=>c.e("thumb"));return{rootKls:m,barKls:y,barStyle:S(()=>({background:p.value})),thumbKls:b,thumbStyle:S(()=>({left:an(d.value),top:an(f.value)})),thumbLeft:d,thumbTop:f,update:h}},FB=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],Cb=0,_f=100;var zB=ie({name:"ElColorAlphaSlider",__name:"alpha-slider",props:b2,setup(e,{expose:t}){const n=e,{currentValue:a,bar:o,thumb:l,handleDrag:s,handleClick:r,handleKeydown:u}=C2(n,{key:"alpha",minValue:Cb,maxValue:_f}),{rootKls:c,barKls:d,barStyle:f,thumbKls:p,thumbStyle:g,update:v}=S2(n,{namespace:"color-alpha-slider",maxValue:_f,currentValue:a,bar:o,thumb:l,handleDrag:s,getBackground:b}),{t:h}=Et(),m=S(()=>h("el.colorpicker.alphaLabel")),y=S(()=>h("el.colorpicker.alphaDescription",{alpha:a.value,color:n.color.value}));function b(){if(n.color&&n.color.value){const{r:w,g:C,b:k}=n.color.toRgb();return`linear-gradient(to right, rgba(${w}, ${C}, ${k}, 0) 0%, rgba(${w}, ${C}, ${k}, 1) 100%)`}return""}return t({update:v,bar:o,thumb:l}),(w,C)=>(x(),B("div",{class:M(i(c))},[j("div",{ref_key:"bar",ref:o,class:M(i(d)),style:je(i(f)),onClick:C[0]||(C[0]=(...k)=>i(r)&&i(r)(...k))},null,6),j("div",{ref_key:"thumb",ref:l,class:M(i(p)),style:je(i(g)),"aria-label":m.value,"aria-valuenow":i(a),"aria-valuetext":y.value,"aria-orientation":e.vertical?"vertical":"horizontal","aria-valuemin":Cb,"aria-valuemax":_f,role:"slider",tabindex:e.disabled?void 0:0,"aria-disabled":e.disabled,onKeydown:C[1]||(C[1]=(...k)=>i(u)&&i(u)(...k))},null,46,FB)],2))}}),HB=zB;const KB=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],Sb=0,Pf=360;var WB=ie({name:"ElColorHueSlider",__name:"hue-slider",props:BB,setup(e,{expose:t}){const n=e,{currentValue:a,bar:o,thumb:l,handleDrag:s,handleClick:r,handleKeydown:u}=C2(n,{key:"hue",minValue:Sb,maxValue:Pf}),{rootKls:c,barKls:d,thumbKls:f,thumbStyle:p,thumbTop:g,update:v}=S2(n,{namespace:"color-hue-slider",maxValue:Pf,currentValue:a,bar:o,thumb:l,handleDrag:s}),{t:h}=Et(),m=S(()=>h("el.colorpicker.hueLabel")),y=S(()=>h("el.colorpicker.hueDescription",{hue:a.value,color:n.color.value}));return t({bar:o,thumb:l,thumbTop:g,update:v}),(b,w)=>(x(),B("div",{class:M(i(c))},[j("div",{ref_key:"bar",ref:o,class:M(i(d)),onClick:w[0]||(w[0]=(...C)=>i(r)&&i(r)(...C))},null,2),j("div",{ref_key:"thumb",ref:l,class:M(i(f)),style:je(i(p)),"aria-label":m.value,"aria-valuenow":i(a),"aria-valuetext":y.value,"aria-orientation":e.vertical?"vertical":"horizontal","aria-valuemin":Sb,"aria-valuemax":Pf,role:"slider",tabindex:e.disabled?void 0:0,"aria-disabled":e.disabled,onKeydown:w[1]||(w[1]=(...C)=>i(u)&&i(u)(...C))},null,46,KB)],2))}}),jB=WB;const UB=Se({colors:{type:X(Array),required:!0},color:{type:X(Object),required:!0},enableAlpha:{type:Boolean,required:!0},disabled:Boolean});var Bc=class{constructor(e={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this._tiny=new cn,this._isValid=!1,this.enableAlpha=!1,this.format="",this.value="";for(const t in e)$t(e,t)&&(this[t]=e[t]);e.value?this.fromString(e.value):this.doOnChange()}set(e,t){if(arguments.length===1&&typeof e=="object"){for(const n in e)$t(e,n)&&this.set(n,e[n]);return}this[`_${e}`]=t,this._isValid=!0,this.doOnChange()}get(e){return["hue","saturation","value","alpha"].includes(e)?Math.round(this[`_${e}`]):this[`_${e}`]}toRgb(){return this._isValid?this._tiny.toRgb():{r:255,g:255,b:255,a:0}}fromString(e){const t=new cn(e);if(this._isValid=t.isValid,t.isValid){const{h:n,s:a,v:o,a:l}=t.toHsv();this._hue=n,this._saturation=a*100,this._value=o*100,this._alpha=l*100}else this._hue=0,this._saturation=100,this._value=100,this._alpha=100;this.doOnChange()}clear(){this._isValid=!1,this.value="",this._hue=0,this._saturation=100,this._value=100,this._alpha=100}compare(e){const t=new cn({h:e._hue,s:e._saturation/100,v:e._value/100,a:e._alpha/100});return this._tiny.equals(t)}doOnChange(){const{_hue:e,_saturation:t,_value:n,_alpha:a,format:o,enableAlpha:l}=this;let s=o||(l?"rgb":"hex");o==="hex"&&l&&(s="hex8"),this._tiny=new cn({h:e,s:t/100,v:n/100,a:a/100}),this.value=this._isValid?this._tiny.toString(s):""}};const YB=e=>{const{currentColor:t}=_e(y2),n=A(o(e.colors,e.color));fe(()=>t.value,l=>{const s=new Bc({value:l,enableAlpha:e.enableAlpha});n.value.forEach(r=>{r.selected=s.compare(r)})}),sa(()=>{n.value=o(e.colors,e.color)});function a(l){e.color.fromString(e.colors[l])}function o(l,s){return l.map(r=>{const u=new Bc({value:r,enableAlpha:e.enableAlpha});return u.selected=u.compare(s),u})}return{rgbaColors:n,handleSelect:a}},qB=e=>{const t=he("color-predefine"),n=S(()=>[t.b(),t.is("disabled",e.disabled)]),a=S(()=>t.e("colors"));function o(l){return[t.e("color-selector"),t.is("alpha",l.get("alpha")<100),{selected:l.selected}]}return{rootKls:n,colorsKls:a,colorSelectorKls:o}},GB=["disabled","aria-label","onClick"];var XB=ie({name:"ElColorPredefine",__name:"predefine",props:UB,setup(e){const t=e,{rgbaColors:n,handleSelect:a}=YB(t),{rootKls:o,colorsKls:l,colorSelectorKls:s}=qB(t),{t:r}=Et(),u=c=>r("el.colorpicker.predefineDescription",{value:c});return(c,d)=>(x(),B("div",{class:M(i(o))},[j("div",{class:M(i(l))},[(x(!0),B(He,null,Ct(i(n),(f,p)=>(x(),B("button",{key:e.colors[p],type:"button",disabled:e.disabled,"aria-label":u(f.value),class:M(i(s)(f)),onClick:g=>i(a)(p)},[j("div",{style:je({backgroundColor:f.value})},null,4)],10,GB))),128))],2)],2))}}),ZB=XB;const JB=Se({color:{type:X(Object),required:!0},disabled:Boolean}),QB=e=>{const t=vt(),n=A(),a=A(0),o=A(0),l=A("hsl(0, 100%, 50%)"),s=S(()=>e.color.get("saturation")),r=S(()=>e.color.get("value")),u=S(()=>e.color.get("hue"));function c(v){var h;e.disabled||(v.target!==n.value&&d(v),(h=n.value)==null||h.focus({preventScroll:!0}))}function d(v){if(e.disabled)return;const h=t.vnode.el.getBoundingClientRect(),{clientX:m,clientY:y}=w2(v);let b=m-h.left,w=y-h.top;b=Math.max(0,b),b=Math.min(b,h.width),w=Math.max(0,w),w=Math.min(w,h.height),o.value=b,a.value=w,e.color.set({saturation:b/h.width*100,value:100-w/h.height*100})}function f(v){if(e.disabled)return;const{shiftKey:h}=v,m=zt(v),y=h?10:1;let b=!0;switch(m){case Ce.left:p(-y);break;case Ce.right:p(y);break;case Ce.up:g(y);break;case Ce.down:g(-y);break;default:b=!1;break}b&&v.preventDefault()}function p(v){let h=s.value+v;h=h<0?0:h>100?100:h,e.color.set("saturation",h)}function g(v){let h=r.value+v;h=h<0?0:h>100?100:h,e.color.set("value",h)}return{cursorRef:n,cursorTop:a,cursorLeft:o,background:l,saturation:s,brightness:r,hue:u,handleClick:c,handleDrag:d,handleKeydown:f}},eF=(e,{cursorTop:t,cursorLeft:n,background:a,handleDrag:o})=>{const l=vt(),s=he("color-svpanel");function r(){const u=e.color.get("saturation"),c=e.color.get("value"),{clientWidth:d,clientHeight:f}=l.vnode.el;n.value=u*d/100,t.value=(100-c)*f/100,a.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}return mt(()=>{Up(l.vnode.el,{drag:u=>{o(u)},end:u=>{o(u)}}),r()}),fe([()=>e.color.get("hue"),()=>e.color.get("value"),()=>e.color.value],()=>r()),{rootKls:S(()=>s.b()),cursorKls:S(()=>s.e("cursor")),rootStyle:S(()=>({backgroundColor:a.value})),cursorStyle:S(()=>({top:an(t.value),left:an(n.value)})),update:r}},tF=["tabindex","aria-disabled","aria-label","aria-valuenow","aria-valuetext"];var nF=ie({name:"ElSvPanel",__name:"sv-panel",props:JB,setup(e,{expose:t}){const n=e,{cursorRef:a,cursorTop:o,cursorLeft:l,background:s,saturation:r,brightness:u,handleClick:c,handleDrag:d,handleKeydown:f}=QB(n),{rootKls:p,cursorKls:g,rootStyle:v,cursorStyle:h,update:m}=eF(n,{cursorTop:o,cursorLeft:l,background:s,handleDrag:d}),{t:y}=Et(),b=S(()=>y("el.colorpicker.svLabel")),w=S(()=>y("el.colorpicker.svDescription",{saturation:r.value,brightness:u.value,color:n.color.value}));return t({update:m}),(C,k)=>(x(),B("div",{class:M(i(p)),style:je(i(v)),onClick:k[1]||(k[1]=(...E)=>i(c)&&i(c)(...E))},[j("div",{ref_key:"cursorRef",ref:a,class:M(i(g)),style:je(i(h)),tabindex:e.disabled?void 0:0,"aria-disabled":e.disabled,role:"slider","aria-valuemin":"0,0","aria-valuemax":"100,100","aria-label":b.value,"aria-valuenow":`${i(r)},${i(u)}`,"aria-valuetext":w.value,onKeydown:k[0]||(k[0]=(...E)=>i(f)&&i(f)(...E))},null,46,tF)],6))}}),aF=nF;const k2=(e,t)=>{const n=Rt(new Bc({enableAlpha:e.showAlpha,format:e.colorFormat||"",value:e.modelValue}));return fe(()=>[e.colorFormat,e.showAlpha],()=>{n.enableAlpha=e.showAlpha,n.format=e.colorFormat||n.format,n.doOnChange(),t(at,n.value)}),{color:n}};var oF=ie({name:"ElColorPickerPanel",__name:"color-picker-panel",props:m2,emits:VB,setup(e,{expose:t,emit:n}){const a=e,o=n,l=he("color-picker-panel"),{formItem:s}=Pn(),r=on(),u=A(),c=A(),d=A(),f=A(),p=A(""),{color:g}=_e(g2,()=>k2(a,o),!0);function v(){g.fromString(p.value),g.value!==p.value&&(p.value=g.value)}function h(){var y;a.validateEvent&&((y=s==null?void 0:s.validate)==null||y.call(s,"blur").catch(b=>ft(b)))}function m(){var y,b,w;(y=u.value)==null||y.update(),(b=c.value)==null||b.update(),(w=d.value)==null||w.update()}return mt(()=>{a.modelValue&&(p.value=g.value),Ae(m)}),fe(()=>a.modelValue,y=>{y!==g.value&&(y?g.fromString(y):g.clear())}),fe(()=>g.value,y=>{o(at,y),p.value=y,a.validateEvent&&(s==null||s.validate("change").catch(b=>ft(b)))}),bt(y2,{currentColor:S(()=>g.value)}),t({color:g,inputRef:f,update:m}),(y,b)=>(x(),B("div",{class:M([i(l).b(),i(l).is("disabled",i(r)),i(l).is("border",e.border)]),onFocusout:h},[j("div",{class:M(i(l).e("wrapper"))},[J(jB,{ref_key:"hueRef",ref:u,color:i(g),vertical:"",disabled:i(r),class:M(["hue-slider",e.hueSliderClass]),style:je(e.hueSliderStyle)},null,8,["color","disabled","class","style"]),J(aF,{ref_key:"svRef",ref:c,color:i(g),disabled:i(r)},null,8,["color","disabled"])],2),e.showAlpha?(x(),re(HB,{key:0,ref_key:"alphaRef",ref:d,color:i(g),disabled:i(r)},null,8,["color","disabled"])):le("v-if",!0),e.predefine?(x(),re(ZB,{key:1,ref:"predefine","enable-alpha":e.showAlpha,color:i(g),colors:e.predefine,disabled:i(r)},null,8,["enable-alpha","color","colors","disabled"])):le("v-if",!0),j("div",{class:M(i(l).e("footer"))},[J(i(Dn),{ref_key:"inputRef",ref:f,modelValue:p.value,"onUpdate:modelValue":b[0]||(b[0]=w=>p.value=w),"validate-event":!1,size:"small",disabled:i(r),onChange:v},null,8,["modelValue","disabled"]),ae(y.$slots,"footer")],2)],34))}}),lF=oF;const E2=rt(lF),sF=Se({persistent:{type:Boolean,default:!0},modelValue:{type:X(String),default:void 0},id:String,showAlpha:Boolean,colorFormat:{type:X(String)},disabled:{type:Boolean,default:void 0},clearable:{type:Boolean,default:!0},size:Sn,popperClass:Bt.popperClass,popperStyle:Bt.popperStyle,tabindex:{type:[String,Number],default:0},teleported:Bt.teleported,appendTo:Bt.appendTo,predefine:{type:X(Array)},validateEvent:{type:Boolean,default:!0},...Is,...Qn(["ariaLabel"])}),rF={[at]:e=>De(e)||hn(e),[yt]:e=>De(e)||hn(e),activeChange:e=>De(e)||hn(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0},iF=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"];var uF=ie({name:"ElColorPicker",__name:"color-picker",props:sF,emits:rF,setup(e,{expose:t,emit:n}){const a=e,o=n,{t:l}=Et(),s=he("color"),{formItem:r}=Pn(),u=bn(),c=on(),{valueOnClear:d,isEmptyValue:f}=gu(a,null),p=k2(a,o),{inputId:g,isLabeledByFormItem:v}=Ta(a,{formItemContext:r}),h=A(),m=A(),y=A(),b=A(!1),w=A(!1);let C=!0;const{isFocused:k,handleFocus:E,handleBlur:T}=dl(m,{disabled:c,beforeBlur(Y){var G;return(G=h.value)==null?void 0:G.isFocusInsideContent(Y)},afterBlur(){var Y;F(!1),z(),a.validateEvent&&((Y=r==null?void 0:r.validate)==null||Y.call(r,"blur").catch(G=>ft(G)))}}),$=C$(()=>{var Y;return((Y=y.value)==null?void 0:Y.color)??p.color}),N=S(()=>el(a,Object.keys(m2))),O=S(()=>!a.modelValue&&!w.value?"transparent":U($,a.showAlpha)),_=S(()=>!a.modelValue&&!w.value?"":$.value),P=S(()=>v.value?void 0:a.ariaLabel||l("el.colorpicker.defaultLabel")),D=S(()=>v.value?r==null?void 0:r.labelId:void 0),W=S(()=>[s.b("picker"),s.is("disabled",c.value),s.bm("picker",u.value),s.is("focused",k.value)]);function U(Y,G){const{r:V,g:Z,b:oe,a:ce}=Y.toRgb();return G?`rgba(${V}, ${Z}, ${oe}, ${ce})`:`rgb(${V}, ${Z}, ${oe})`}function F(Y){b.value=Y}const R=To(F,100,{leading:!0});function I(){c.value||F(!0)}function L(){R(!1),z()}function z(){Ae(()=>{a.modelValue?$.fromString(a.modelValue):($.value="",Ae(()=>{w.value=!1}))})}function H(){c.value||(b.value&&z(),R(!b.value))}function K(){const Y=f($.value)?d.value:$.value;o(at,Y),o(yt,Y),a.validateEvent&&(r==null||r.validate("change").catch(G=>ft(G))),R(!1),Ae(()=>{const G=new Bc({enableAlpha:a.showAlpha,format:a.colorFormat||"",value:a.modelValue});$.compare(G)||z()})}function q(){R(!1),o(at,d.value),o(yt,d.value),a.modelValue!==d.value&&a.validateEvent&&(r==null||r.validate("change").catch(Y=>ft(Y))),z(),o("clear")}function Q(){var Y,G;(G=(Y=y==null?void 0:y.value)==null?void 0:Y.inputRef)==null||G.focus()}function ee(){b.value&&(L(),k.value&&de())}function ue(Y){Y.preventDefault(),Y.stopPropagation(),F(!1),z()}function te(Y){switch(zt(Y)){case Ce.enter:case Ce.numpadEnter:case Ce.space:Y.preventDefault(),Y.stopPropagation(),I();break;case Ce.esc:ue(Y);break}}function de(){m.value.focus()}function se(){m.value.blur()}return fe(()=>_.value,Y=>{C&&o("activeChange",Y),C=!0}),fe(()=>$.value,()=>{!a.modelValue&&!w.value&&(w.value=!0)}),fe(()=>a.modelValue,Y=>{Y?Y&&Y!==$.value&&(C=!1,$.fromString(Y)):w.value=!1}),fe(()=>b.value,()=>{y.value&&Ae(y.value.update)}),bt(g2,p),t({color:$,show:I,hide:L,focus:de,blur:se}),(Y,G)=>(x(),re(i(_n),{ref_key:"popper",ref:h,visible:b.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[i(s).be("picker","panel"),e.popperClass],"popper-style":e.popperStyle,"stop-popper-mouse-event":!1,pure:"",loop:"",role:"dialog",effect:"light",trigger:"click",teleported:e.teleported,transition:`${i(s).namespace.value}-zoom-in-top`,persistent:e.persistent,"append-to":e.appendTo,onShow:Q,onHide:G[2]||(G[2]=V=>F(!1))},{content:ne(()=>[dt((x(),re(i(E2),pt({ref_key:"pickerPanelRef",ref:y},N.value,{border:!1,"validate-event":!1,onKeydown:en(ue,["esc"])}),{footer:ne(()=>[j("div",null,[e.clearable?(x(),re(i($n),{key:0,class:M(i(s).be("footer","link-btn")),text:"",size:"small",onClick:q},{default:ne(()=>[St(ke(i(l)("el.colorpicker.clear")),1)]),_:1},8,["class"])):le("v-if",!0),J(i($n),{plain:"",size:"small",class:M(i(s).be("footer","btn")),onClick:K},{default:ne(()=>[St(ke(i(l)("el.colorpicker.confirm")),1)]),_:1},8,["class"])])]),_:1},16)),[[i(Ll),ee,m.value]])]),default:ne(()=>[j("div",pt({id:i(g),ref_key:"triggerRef",ref:m},Y.$attrs,{class:W.value,role:"button","aria-label":P.value,"aria-labelledby":D.value,"aria-description":i(l)("el.colorpicker.description",{color:e.modelValue||""}),"aria-disabled":i(c),tabindex:i(c)?void 0:e.tabindex,onKeydown:te,onFocus:G[0]||(G[0]=(...V)=>i(E)&&i(E)(...V)),onBlur:G[1]||(G[1]=(...V)=>i(T)&&i(T)(...V))}),[j("div",{class:M(i(s).be("picker","trigger")),onClick:H},[j("span",{class:M([i(s).be("picker","color"),i(s).is("alpha",e.showAlpha)])},[j("span",{class:M(i(s).be("picker","color-inner")),style:je({backgroundColor:O.value})},[dt(J(i(Be),{class:M([i(s).be("picker","icon"),i(s).is("icon-arrow-down")])},{default:ne(()=>[J(i(Io))]),_:1},8,["class"]),[[Nt,e.modelValue||w.value]]),dt(J(i(Be),{class:M([i(s).be("picker","empty"),i(s).is("icon-close")])},{default:ne(()=>[J(i(La))]),_:1},8,["class"]),[[Nt,!e.modelValue&&!w.value]])],6)],2)],2)],16,iF)]),_:1},8,["visible","popper-class","popper-style","teleported","transition","persistent","append-to"]))}}),cF=uF;const dF=rt(cF);var fF=ie({name:"ElContainer",__name:"container",props:{direction:{type:String,required:!1}},setup(e){const t=e,n=fn(),a=he("container"),o=S(()=>t.direction==="vertical"?!0:t.direction==="horizontal"?!1:n&&n.default?n.default().some(l=>{const s=l.type.name;return s==="ElHeader"||s==="ElFooter"}):!1);return(l,s)=>(x(),B("section",{class:M([i(a).b(),i(a).is("vertical",o.value)])},[ae(l.$slots,"default")],2))}}),pF=fF,vF=ie({name:"ElAside",__name:"aside",props:{width:{type:[String,null],required:!1,default:null}},setup(e){const t=e,n=he("aside"),a=S(()=>t.width?n.cssVarBlock({width:t.width}):{});return(o,l)=>(x(),B("aside",{class:M(i(n).b()),style:je(a.value)},[ae(o.$slots,"default")],6))}}),x2=vF,hF=ie({name:"ElFooter",__name:"footer",props:{height:{type:[String,null],required:!1,default:null}},setup(e){const t=e,n=he("footer"),a=S(()=>t.height?n.cssVarBlock({height:t.height}):{});return(o,l)=>(x(),B("footer",{class:M(i(n).b()),style:je(a.value)},[ae(o.$slots,"default")],6))}}),T2=hF,mF=ie({name:"ElHeader",__name:"header",props:{height:{type:[String,null],required:!1,default:null}},setup(e){const t=e,n=he("header"),a=S(()=>t.height?n.cssVarBlock({height:t.height}):{});return(o,l)=>(x(),B("header",{class:M(i(n).b()),style:je(a.value)},[ae(o.$slots,"default")],6))}}),$2=mF,gF=ie({name:"ElMain",__name:"main",setup(e){const t=he("main");return(n,a)=>(x(),B("main",{class:M(i(t).b())},[ae(n.$slots,"default")],2))}}),O2=gF;const yF=rt(pF,{Aside:x2,Footer:T2,Header:$2,Main:O2}),bF=Qt(x2),wF=Qt(T2),CF=Qt($2),SF=Qt(O2),kF=Se({valueFormat:String,dateFormat:String,timeFormat:String,disabled:{type:Boolean,default:void 0},modelValue:{type:X([Date,Array,String,Number]),default:""},defaultValue:{type:X([Date,Array])},defaultTime:{type:X([Date,Array])},isRange:Boolean,...Ah,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,unlinkPanels:Boolean,showNow:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:Boolean,showWeekNumber:Boolean,type:{type:X(String),default:"date"},clearable:{type:Boolean,default:!0},border:{type:Boolean,default:!0},editable:{type:Boolean,default:!0}}),Kh=Symbol("rootPickerContextKey"),Su="ElIsDefaultFormat",EF=["date","dates","year","years","month","months","week","range"],Wh=Se({cellClassName:{type:X(Function)},disabledDate:{type:X(Function)},date:{type:X(Object),required:!0},minDate:{type:X(Object)},maxDate:{type:X(Object)},parsedValue:{type:X([Object,Array])},rangeState:{type:X(Object),default:()=>({endDate:null,selecting:!1})},disabled:Boolean}),N2=Se({type:{type:X(String),required:!0,values:b$},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean,border:Boolean,disabled:Boolean,editable:{type:Boolean,default:!0}}),jh=Se({unlinkPanels:Boolean,visible:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},border:Boolean,disabled:Boolean,parsedValue:{type:X(Array)}}),Uh=e=>({type:String,values:EF,default:e}),xF=Se({...N2,parsedValue:{type:X([Object,Array])},visible:{type:Boolean,default:!0},format:{type:String,default:""}}),Bi=e=>{if(!be(e))return!1;const[t,n]=e;return st.isDayjs(t)&&st.isDayjs(n)&&st(t).isValid()&&st(n).isValid()&&t.isSameOrBefore(n)},Hd=(e,{lang:t,step:n=1,unit:a,unlinkPanels:o})=>{let l;if(be(e)){let[s,r]=e.map(u=>st(u).locale(t));return o||(r=s.add(n,a)),[s,r]}else e?l=st(e):l=st();return l=l.locale(t),[l,l.add(n,a)]},TF=(e,t,{columnIndexOffset:n,startDate:a,nextEndDate:o,now:l,unit:s,relativeDateGetter:r,setCellMetadata:u,setRowMetadata:c})=>{for(let d=0;d{const o=st().locale(a).startOf("month").month(n).year(t).hour(e.hour()).minute(e.minute()).second(e.second());return Il(o.daysInMonth()).map(l=>o.add(l,"day").toDate())},wr=(e,t,n,a,o)=>{const l=st().year(t).month(n).startOf("month").hour(e.hour()).minute(e.minute()).second(e.second()),s=Fc(e,t,n,a).find(r=>!(o!=null&&o(r)));return s?st(s).locale(a):l.locale(a)},zc=(e,t,n)=>{const a=e.year();if(!(n!=null&&n(e.toDate())))return e.locale(t);const o=e.month();if(!Fc(e,a,o,t).every(n))return wr(e,a,o,t,n);for(let l=0;l<12;l++)if(!Fc(e,a,l,t).every(n))return wr(e,a,l,t,n);return e},Cr=(e,t,n,a)=>{if(be(e))return e.map(o=>Cr(o,t,n,a));if(De(e)){const o=a!=null&&a.value?st(e):st(e,t);if(!o.isValid())return o}return st(e,t).locale(n)},$F=Se({...Wh,showWeekNumber:Boolean,selectionMode:Uh("date")}),OF=["changerange","pick","select"],Hc=(e="")=>["normal","today"].includes(e),NF=(e,t)=>{const{lang:n}=Et(),a=A(),o=A(),l=A(),s=A(),r=A([[],[],[],[],[],[]]);let u=!1;const c=e.date.$locale().weekStart||7,d=e.date.locale("en").localeData().weekdaysShort().map(L=>L.toLowerCase()),f=S(()=>c>3?7-c:-c),p=S(()=>{const L=e.date.startOf("month");return L.subtract(L.day()||7,"day")}),g=S(()=>d.concat(d).slice(c,c+7)),v=S(()=>Oc(i(C)).some(L=>L.isCurrent)),h=S(()=>{const L=e.date.startOf("month");return{startOfMonthDay:L.day()||7,dateCountOfMonth:L.daysInMonth(),dateCountOfLastMonth:L.subtract(1,"month").daysInMonth()}}),m=S(()=>e.selectionMode==="dates"?Xn(e.parsedValue):[]),y=(L,{count:z,rowIndex:H,columnIndex:K})=>{const{startOfMonthDay:q,dateCountOfMonth:Q,dateCountOfLastMonth:ee}=i(h),ue=i(f);if(H>=0&&H<=1){const te=q+ue<0?7+q+ue:q+ue;if(K+H*7>=te)return L.text=z,!0;L.text=ee-(te-K%7)+1+H*7,L.type="prev-month"}else return z<=Q?L.text=z:(L.text=z-Q,L.type="next-month"),!0;return!1},b=(L,{columnIndex:z,rowIndex:H},K)=>{const{disabledDate:q,cellClassName:Q}=e,ee=i(m),ue=y(L,{count:K,rowIndex:H,columnIndex:z}),te=L.dayjs.toDate();return L.selected=ee.find(de=>de.isSame(L.dayjs,"day")),L.isSelected=!!L.selected,L.isCurrent=E(L),L.disabled=q==null?void 0:q(te),L.customClass=Q==null?void 0:Q(te),ue},w=L=>{if(e.selectionMode==="week"){const[z,H]=e.showWeekNumber?[1,7]:[0,6],K=I(L[z+1]);L[z].inRange=K,L[z].start=K,L[H].inRange=K,L[H].end=K}},C=S(()=>{const{minDate:L,maxDate:z,rangeState:H,showWeekNumber:K}=e,q=i(f),Q=i(r),ee="day";let ue=1;if(TF({row:6,column:7},Q,{startDate:L,columnIndexOffset:K?1:0,nextEndDate:H.endDate||z||H.selecting&&L||null,now:st().locale(i(n)).startOf(ee),unit:ee,relativeDateGetter:te=>i(p).add(te-q,ee),setCellMetadata:(...te)=>{b(...te,ue)&&(ue+=1)},setRowMetadata:w}),K)for(let te=0;te<6;te++)Q[te][1].dayjs&&(Q[te][0]={type:"week",text:Q[te][1].dayjs.week()});return Q});fe(()=>e.date,async()=>{var L;(L=i(a))!=null&&L.contains(document.activeElement)&&(await Ae(),await k())});const k=async()=>{var L;return(L=i(o))==null?void 0:L.focus()},E=L=>e.selectionMode==="date"&&Hc(L.type)&&T(L,e.parsedValue),T=(L,z)=>z?st(z).locale(i(n)).isSame(e.date.date(Number(L.text)),"day"):!1,$=(L,z)=>{const H=i(h).startOfMonthDay,K=i(f),q=H+K<0?7+H+K:H+K,Q=L*7+(z-(e.showWeekNumber?1:0));return e.date.startOf("month").subtract(q,"day").add(Q,"day")},N=L=>{var q;if(!e.rangeState.selecting)return;let z=L.target;if(z.tagName==="SPAN"&&(z=(q=z.parentNode)==null?void 0:q.parentNode),z.tagName==="DIV"&&(z=z.parentNode),z.tagName!=="TD")return;const H=z.parentNode.rowIndex-1,K=z.cellIndex;i(C)[H][K].disabled||(H!==i(l)||K!==i(s))&&(l.value=H,s.value=K,t("changerange",{selecting:!0,endDate:$(H,K)}))},O=L=>!i(v)&&(L==null?void 0:L.text)===1&&Hc(L.type)||L.isCurrent,_=L=>{u||i(v)||e.selectionMode!=="date"||R(L,!0)},P=L=>{L.target.closest("td")&&(u=!0)},D=L=>{L.target.closest("td")&&(u=!1)},W=L=>{!e.rangeState.selecting||!e.minDate?(t("pick",{minDate:L,maxDate:null}),t("select",!0)):(L>=e.minDate?t("pick",{minDate:e.minDate,maxDate:L}):t("pick",{minDate:L,maxDate:e.minDate}),t("select",!1))},U=L=>{const z=L.week(),H=`${L.year()}w${z}`;t("pick",{year:L.year(),week:z,value:H,date:L.startOf("week")})},F=(L,z)=>{t("pick",z?Xn(e.parsedValue).filter(H=>(H==null?void 0:H.valueOf())!==L.valueOf()):Xn(e.parsedValue).concat([L]))},R=(L,z=!1)=>{if(e.disabled)return;const H=L.target.closest("td");if(!H)return;const K=H.parentNode.rowIndex-1,q=H.cellIndex,Q=i(C)[K][q];if(Q.disabled||Q.type==="week")return;const ee=$(K,q);switch(e.selectionMode){case"range":W(ee);break;case"date":t("pick",ee,z);break;case"week":U(ee);break;case"dates":F(ee,!!Q.selected);break}},I=L=>{if(e.selectionMode!=="week")return!1;let z=e.date.startOf("day");if(L.type==="prev-month"&&(z=z.subtract(1,"month")),L.type==="next-month"&&(z=z.add(1,"month")),z=z.date(Number.parseInt(L.text,10)),e.parsedValue&&!be(e.parsedValue)){const H=(e.parsedValue.day()-c+7)%7-1;return e.parsedValue.subtract(H,"day").isSame(z,"day")}return!1};return{WEEKS:g,rows:C,tbodyRef:a,currentCellRef:o,focus:k,isCurrent:E,isWeekActive:I,isSelectedCell:O,handlePickDate:R,handleMouseUp:D,handleMouseDown:P,handleMouseMove:N,handleFocus:_}},MF=(e,{isCurrent:t,isWeekActive:n})=>{const a=he("date-table"),{t:o}=Et(),l=S(()=>[a.b(),a.is("week-mode",e.selectionMode==="week"&&!e.disabled)]),s=S(()=>o("el.datepicker.dateTablePrompt")),r=c=>{const d=[];return Hc(c.type)&&!c.disabled?(d.push("available"),c.type==="today"&&d.push("today")):d.push(c.type),t(c)&&d.push("current"),c.inRange&&(Hc(c.type)||e.selectionMode==="week")&&(d.push("in-range"),c.start&&d.push("start-date"),c.end&&d.push("end-date")),(c.disabled||e.disabled)&&d.push("disabled"),c.selected&&d.push("selected"),c.customClass&&d.push(c.customClass),d.join(" ")},u=c=>[a.e("row"),{current:n(c)}];return{tableKls:l,tableLabel:s,weekHeaderClass:a.e("week-header"),getCellClasses:r,getRowKls:u,t:o}},RF=Se({cell:{type:X(Object)}});var Yh=ie({name:"ElDatePickerCell",props:RF,setup(e){const t=he("date-table-cell"),{slots:n}=_e(Kh);return()=>{const{cell:a}=e;return ae(n,"default",{...a},()=>[J("div",{class:t.b()},[J("span",{class:t.e("text")},[(a==null?void 0:a.renderText)??(a==null?void 0:a.text)])])])}}});const IF=["aria-label"],_F=["aria-label"],PF=["aria-current","aria-selected","tabindex","aria-disabled"];var AF=ie({__name:"basic-date-table",props:$F,emits:OF,setup(e,{expose:t,emit:n}){const a=e,{WEEKS:o,rows:l,tbodyRef:s,currentCellRef:r,focus:u,isCurrent:c,isWeekActive:d,isSelectedCell:f,handlePickDate:p,handleMouseUp:g,handleMouseDown:v,handleMouseMove:h,handleFocus:m}=NF(a,n),{tableLabel:y,tableKls:b,getCellClasses:w,getRowKls:C,weekHeaderClass:k,t:E}=MF(a,{isCurrent:c,isWeekActive:d});let T=!1;return Pt(()=>{T=!0}),t({focus:u}),($,N)=>(x(),B("table",{"aria-label":i(y),class:M(i(b)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:N[1]||(N[1]=(...O)=>i(p)&&i(p)(...O)),onMousemove:N[2]||(N[2]=(...O)=>i(h)&&i(h)(...O)),onMousedown:N[3]||(N[3]=(...O)=>i(v)&&i(v)(...O)),onMouseup:N[4]||(N[4]=(...O)=>i(g)&&i(g)(...O))},[j("tbody",{ref_key:"tbodyRef",ref:s},[j("tr",null,[$.showWeekNumber?(x(),B("th",{key:0,scope:"col",class:M(i(k))},null,2)):le("v-if",!0),(x(!0),B(He,null,Ct(i(o),(O,_)=>(x(),B("th",{key:_,"aria-label":i(E)("el.datepicker.weeksFull."+O),scope:"col"},ke(i(E)("el.datepicker.weeks."+O)),9,_F))),128))]),(x(!0),B(He,null,Ct(i(l),(O,_)=>(x(),B("tr",{key:_,class:M(i(C)($.showWeekNumber?O[2]:O[1]))},[(x(!0),B(He,null,Ct(O,(P,D)=>(x(),B("td",{key:`${_}.${D}`,ref_for:!0,ref:W=>!i(T)&&i(f)(P)&&(r.value=W),class:M(i(w)(P)),"aria-current":P.isCurrent?"date":void 0,"aria-selected":P.isCurrent,tabindex:$.disabled?void 0:i(f)(P)?0:-1,"aria-disabled":$.disabled,onFocus:N[0]||(N[0]=(...W)=>i(m)&&i(m)(...W))},[J(i(Yh),{cell:P},null,8,["cell"])],42,PF))),128))],2))),128))],512)],42,IF))}}),Yp=AF;const LF=Se({...Wh,selectionMode:Uh("month")}),DF=["aria-label"],VF=["aria-selected","aria-label","tabindex","onKeydown"];var BF=ie({__name:"basic-month-table",props:LF,emits:["changerange","pick","select"],setup(e,{expose:t,emit:n}){const a=e,o=n,l=he("month-table"),{t:s,lang:r}=Et(),u=A(),c=A(),d=A(a.date.locale("en").localeData().monthsShort().map(C=>C.toLowerCase())),f=A([[],[],[]]),p=A(),g=A(),v=S(()=>{var E,T,$;const C=f.value,k=st().locale(r.value).startOf("month");for(let N=0;N<3;N++){const O=C[N];for(let _=0;_<4;_++){const P=O[_]||(O[_]={row:N,column:_,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1,isSelected:!1,customClass:void 0,date:void 0,dayjs:void 0,isCurrent:void 0,selected:void 0,renderText:void 0,timestamp:void 0});P.type="normal";const D=N*4+_,W=a.date.startOf("year").month(D),U=a.rangeState.endDate||a.maxDate||a.rangeState.selecting&&a.minDate||null;P.inRange=!!(a.minDate&&W.isSameOrAfter(a.minDate,"month")&&U&&W.isSameOrBefore(U,"month"))||!!(a.minDate&&W.isSameOrBefore(a.minDate,"month")&&U&&W.isSameOrAfter(U,"month")),(E=a.minDate)!=null&&E.isSameOrAfter(U)?(P.start=!!(U&&W.isSame(U,"month")),P.end=a.minDate&&W.isSame(a.minDate,"month")):(P.start=!!(a.minDate&&W.isSame(a.minDate,"month")),P.end=!!(U&&W.isSame(U,"month"))),k.isSame(W)&&(P.type="today");const F=W.toDate();P.text=D,P.disabled=((T=a.disabledDate)==null?void 0:T.call(a,F))||!1,P.date=F,P.customClass=($=a.cellClassName)==null?void 0:$.call(a,F),P.dayjs=W,P.timestamp=W.valueOf(),P.isSelected=y(P)}}return C}),h=()=>{var C;(C=c.value)==null||C.focus()},m=C=>{const k={},E=a.date.year(),T=new Date,$=C.text;return k.disabled=a.disabled||(a.disabledDate?Fc(a.date,E,$,r.value).every(a.disabledDate):!1),k.current=Xn(a.parsedValue).some(N=>st.isDayjs(N)&&N.year()===E&&N.month()===$),k.today=T.getFullYear()===E&&T.getMonth()===$,C.customClass&&(k[C.customClass]=!0),C.inRange&&(k["in-range"]=!0,C.start&&(k["start-date"]=!0),C.end&&(k["end-date"]=!0)),k},y=C=>{const k=a.date.year(),E=C.text;return Xn(a.date).some(T=>T.year()===k&&T.month()===E)},b=C=>{var $;if(!a.rangeState.selecting)return;let k=C.target;if(k.tagName==="SPAN"&&(k=($=k.parentNode)==null?void 0:$.parentNode),k.tagName==="DIV"&&(k=k.parentNode),k.tagName!=="TD")return;const E=k.parentNode.rowIndex,T=k.cellIndex;v.value[E][T].disabled||(E!==p.value||T!==g.value)&&(p.value=E,g.value=T,o("changerange",{selecting:!0,endDate:a.date.startOf("year").month(E*4+T)}))},w=C=>{var N;if(a.disabled)return;const k=(N=C.target)==null?void 0:N.closest("td");if((k==null?void 0:k.tagName)!=="TD"||wo(k,"disabled"))return;const E=k.cellIndex,T=k.parentNode.rowIndex*4+E,$=a.date.startOf("year").month(T);if(a.selectionMode==="months"){if(C.type==="keydown"){o("pick",Xn(a.parsedValue),!1);return}const O=wr(a.date,a.date.year(),T,r.value,a.disabledDate);o("pick",wo(k,"current")?Xn(a.parsedValue).filter(_=>(_==null?void 0:_.year())!==O.year()||(_==null?void 0:_.month())!==O.month()):Xn(a.parsedValue).concat([st(O)]))}else a.selectionMode==="range"?a.rangeState.selecting?(a.minDate&&$>=a.minDate?o("pick",{minDate:a.minDate,maxDate:$}):o("pick",{minDate:$,maxDate:a.minDate}),o("select",!1)):(o("pick",{minDate:$,maxDate:null}),o("select",!0)):o("pick",T)};return fe(()=>a.date,async()=>{var C,k;(C=u.value)!=null&&C.contains(document.activeElement)&&(await Ae(),(k=c.value)==null||k.focus())}),t({focus:h}),(C,k)=>(x(),B("table",{role:"grid","aria-label":i(s)("el.datepicker.monthTablePrompt"),class:M(i(l).b()),onClick:w,onMousemove:b},[j("tbody",{ref_key:"tbodyRef",ref:u},[(x(!0),B(He,null,Ct(v.value,(E,T)=>(x(),B("tr",{key:T},[(x(!0),B(He,null,Ct(E,($,N)=>(x(),B("td",{key:N,ref_for:!0,ref:O=>$.isSelected&&(c.value=O),class:M(m($)),"aria-selected":!!$.isSelected,"aria-label":i(s)(`el.datepicker.month${+$.text+1}`),tabindex:$.isSelected?0:-1,onKeydown:[en(Xe(w,["prevent","stop"]),["space"]),en(Xe(w,["prevent","stop"]),["enter"])]},[J(i(Yh),{cell:{...$,renderText:i(s)("el.datepicker.months."+d.value[$.text])}},null,8,["cell"])],42,VF))),128))]))),128))],512)],42,DF))}}),Fi=BF;const FF=Se({...Wh,selectionMode:Uh("year")}),zF=["aria-label"],HF=["aria-selected","aria-label","tabindex","onKeydown"];var KF=ie({__name:"basic-year-table",props:FF,emits:["changerange","pick","select"],setup(e,{expose:t,emit:n}){const a=(k,E)=>{const T=st(String(k)).locale(E).startOf("year");return Il(T.endOf("year").dayOfYear()).map($=>T.add($,"day").toDate())},o=e,l=n,s=he("year-table"),{t:r,lang:u}=Et(),c=A(),d=A(),f=S(()=>Math.floor(o.date.year()/10)*10),p=A([[],[],[]]),g=A(),v=A(),h=S(()=>{var T,$,N;const k=p.value,E=st().locale(u.value).startOf("year");for(let O=0;O<3;O++){const _=k[O];for(let P=0;P<4&&!(O*4+P>=10);P++){let D=_[P];D||(D={row:O,column:P,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1,isSelected:!1,customClass:void 0,date:void 0,dayjs:void 0,isCurrent:void 0,selected:void 0,renderText:void 0,timestamp:void 0}),D.type="normal";const W=O*4+P+f.value,U=st().year(W),F=o.rangeState.endDate||o.maxDate||o.rangeState.selecting&&o.minDate||null;D.inRange=!!(o.minDate&&U.isSameOrAfter(o.minDate,"year")&&F&&U.isSameOrBefore(F,"year"))||!!(o.minDate&&U.isSameOrBefore(o.minDate,"year")&&F&&U.isSameOrAfter(F,"year")),(T=o.minDate)!=null&&T.isSameOrAfter(F)?(D.start=!!(F&&U.isSame(F,"year")),D.end=!!(o.minDate&&U.isSame(o.minDate,"year"))):(D.start=!!(o.minDate&&U.isSame(o.minDate,"year")),D.end=!!(F&&U.isSame(F,"year"))),E.isSame(U)&&(D.type="today"),D.text=W;const R=U.toDate();D.disabled=(($=o.disabledDate)==null?void 0:$.call(o,R))||!1,D.date=R,D.customClass=(N=o.cellClassName)==null?void 0:N.call(o,R),D.dayjs=U,D.timestamp=U.valueOf(),D.isSelected=b(D),_[P]=D}}return k}),m=()=>{var k;(k=d.value)==null||k.focus()},y=k=>{const E={},T=st().locale(u.value),$=k.text;return E.disabled=o.disabled||(o.disabledDate?a($,u.value).every(o.disabledDate):!1),E.today=T.year()===$,E.current=Xn(o.parsedValue).some(N=>N.year()===$),k.customClass&&(E[k.customClass]=!0),k.inRange&&(E["in-range"]=!0,k.start&&(E["start-date"]=!0),k.end&&(E["end-date"]=!0)),E},b=k=>{const E=k.text;return Xn(o.date).some(T=>T.year()===E)},w=k=>{var O;if(o.disabled)return;const E=(O=k.target)==null?void 0:O.closest("td");if(!E||!E.textContent||wo(E,"disabled"))return;const T=E.cellIndex,$=E.parentNode.rowIndex*4+T+f.value,N=st().year($);if(o.selectionMode==="range")o.rangeState.selecting?(o.minDate&&N>=o.minDate?l("pick",{minDate:o.minDate,maxDate:N}):l("pick",{minDate:N,maxDate:o.minDate}),l("select",!1)):(l("pick",{minDate:N,maxDate:null}),l("select",!0));else if(o.selectionMode==="years"){if(k.type==="keydown"){l("pick",Xn(o.parsedValue),!1);return}const _=zc(N.startOf("year"),u.value,o.disabledDate);l("pick",wo(E,"current")?Xn(o.parsedValue).filter(P=>(P==null?void 0:P.year())!==$):Xn(o.parsedValue).concat([_]))}else l("pick",$)},C=k=>{var N;if(!o.rangeState.selecting)return;const E=(N=k.target)==null?void 0:N.closest("td");if(!E)return;const T=E.parentNode.rowIndex,$=E.cellIndex;h.value[T][$].disabled||(T!==g.value||$!==v.value)&&(g.value=T,v.value=$,l("changerange",{selecting:!0,endDate:st().year(f.value).add(T*4+$,"year")}))};return fe(()=>o.date,async()=>{var k,E;(k=c.value)!=null&&k.contains(document.activeElement)&&(await Ae(),(E=d.value)==null||E.focus())}),t({focus:m}),(k,E)=>(x(),B("table",{role:"grid","aria-label":i(r)("el.datepicker.yearTablePrompt"),class:M(i(s).b()),onClick:w,onMousemove:C},[j("tbody",{ref_key:"tbodyRef",ref:c},[(x(!0),B(He,null,Ct(h.value,(T,$)=>(x(),B("tr",{key:$},[(x(!0),B(He,null,Ct(T,(N,O)=>(x(),B("td",{key:`${$}_${O}`,ref_for:!0,ref:_=>N.isSelected&&(d.value=_),class:M(["available",y(N)]),"aria-selected":N.isSelected,"aria-label":String(N.text),tabindex:N.isSelected?0:-1,onKeydown:[en(Xe(w,["prevent","stop"]),["space"]),en(Xe(w,["prevent","stop"]),["enter"])]},[J(i(Yh),{cell:N},null,8,["cell"])],42,HF))),128))]))),128))],512)],42,zF))}}),zi=KF;const WF=["disabled","onClick"],jF=["aria-label","disabled"],UF=["aria-label","disabled"],YF=["tabindex","aria-disabled"],qF=["tabindex","aria-disabled"],GF=["aria-label","disabled"],XF=["aria-label","disabled"];var ZF=ie({__name:"panel-date-pick",props:xF,emits:["pick","set-picker-option","panel-change"],setup(e,{emit:t}){const n=(ve,Le,pe)=>!0,a=e,o=t,l=he("picker-panel"),s=he("date-picker"),r=rl(),u=fn(),{t:c,lang:d}=Et(),f=_e(Xa),p=_e(Su,void 0),{shortcuts:g,disabledDate:v,cellClassName:h,defaultTime:m}=f.props,y=Lt(f.props,"defaultValue"),b=A(),w=A(st().locale(d.value)),C=A(!1);let k=!1;const E=S(()=>st(m).locale(d.value)),T=S(()=>w.value.month()),$=S(()=>w.value.year()),N=A([]),O=A(null),_=A(null),P=ve=>N.value.length>0?n(ve,N.value,a.format||Es):!0,D=ve=>m&&!Me.value&&!C.value&&!k?E.value.year(ve.year()).month(ve.month()).date(ve.date()):se.value?ve.millisecond(0):ve.startOf("day"),W=(ve,...Le)=>{ve?be(ve)?o("pick",ve.map(D),...Le):o("pick",D(ve),...Le):o("pick",ve,...Le),O.value=null,_.value=null,C.value=!1,k=!1},U=async(ve,Le)=>{if(H.value==="date"&&st.isDayjs(ve)){const pe=Ur(a.parsedValue);let $e=pe?pe.year(ve.year()).month(ve.month()).date(ve.date()):ve;P($e),w.value=$e,W($e,se.value||Le)}else H.value==="week"?W(ve.date):H.value==="dates"&&W(ve,!0)},F=ve=>{const Le=ve?"add":"subtract";w.value=w.value[Le](1,"month"),gt("month")},R=ve=>{const Le=w.value,pe=ve?"add":"subtract";w.value=I.value==="year"?Le[pe](10,"year"):Le[pe](1,"year"),gt("year")},I=A("date"),L=S(()=>{const ve=c("el.datepicker.year");if(I.value==="year"){const Le=Math.floor($.value/10)*10;return ve?`${Le} ${ve} - ${Le+9} ${ve}`:`${Le} - ${Le+9}`}return`${$.value} ${ve}`}),z=ve=>{const Le=ze(ve.value)?ve.value():ve.value;if(Le){k=!0,W(st(Le).locale(d.value));return}ve.onClick&&ve.onClick({attrs:r,slots:u,emit:o})},H=S(()=>{const{type:ve}=a;return["week","month","months","year","years","dates"].includes(ve)?ve:"date"}),K=S(()=>H.value==="dates"||H.value==="months"||H.value==="years"),q=S(()=>H.value==="date"?I.value:H.value),Q=S(()=>!!g.length),ee=async(ve,Le)=>{H.value==="month"?(w.value=wr(w.value,w.value.year(),ve,d.value,v),W(w.value,!1)):H.value==="months"?W(ve,Le??!0):(w.value=wr(w.value,w.value.year(),ve,d.value,v),I.value="date",["month","year","date","week"].includes(H.value)&&(W(w.value,!0),await Ae(),qe())),gt("month")},ue=async(ve,Le)=>{H.value==="year"?(w.value=zc(w.value.startOf("year").year(ve),d.value,v),W(w.value,!1)):H.value==="years"?W(ve,Le??!0):(w.value=zc(w.value.year(ve),d.value,v),I.value="month",["month","year","date","week"].includes(H.value)&&(W(w.value,!0),await Ae(),qe())),gt("year")},te=on(),de=async ve=>{te.value||(I.value=ve,await Ae(),qe())},se=S(()=>a.type==="datetime"||a.type==="datetimerange"),Y=S(()=>{const ve=se.value||H.value==="dates",Le=H.value==="years",pe=H.value==="months",$e=I.value==="date",ut=I.value==="year",It=I.value==="month";return ve&&$e||Le&&ut||pe&&It}),G=S(()=>!K.value&&a.showNow||a.showConfirm),V=S(()=>v?a.parsedValue?be(a.parsedValue)?v(a.parsedValue[0].toDate()):v(a.parsedValue.toDate()):!0:!1),Z=()=>{if(K.value)W(a.parsedValue);else{let ve=Ur(a.parsedValue);if(!ve){const Le=st(m).locale(d.value),pe=Oe();ve=Le.year(pe.year()).month(pe.month()).date(pe.date())}w.value=ve,W(ve)}},oe=S(()=>v?v(st().locale(d.value).toDate()):!1),ce=()=>{const ve=st().locale(d.value).toDate();C.value=!0,(!v||!v(ve))&&P(ve)&&(w.value=st().locale(d.value),W(w.value))},ge=S(()=>a.timeFormat||AS(a.format)||Es),me=S(()=>a.dateFormat||PS(a.format)||Wo),Me=S(()=>{if(_.value)return _.value;if(!(!a.parsedValue&&!y.value))return(Ur(a.parsedValue)||w.value).format(ge.value)}),Ie=S(()=>{if(O.value)return O.value;if(!(!a.parsedValue&&!y.value))return(Ur(a.parsedValue)||w.value).format(me.value)}),Re=A(!1),ye=()=>{Re.value=!0},Te=()=>{Re.value=!1},we=ve=>({hour:ve.hour(),minute:ve.minute(),second:ve.second(),year:ve.year(),month:ve.month(),date:ve.date()}),Pe=(ve,Le,pe)=>{const{hour:$e,minute:ut,second:It}=we(ve),Yt=Ur(a.parsedValue);w.value=Yt?Yt.hour($e).minute(ut).second(It):ve,W(w.value,!0),pe||(Re.value=Le)},Ve=ve=>{const Le=st(ve,ge.value).locale(d.value);if(Le.isValid()&&P(Le)){const{year:pe,month:$e,date:ut}=we(w.value);w.value=Le.year(pe).month($e).date(ut),_.value=null,Re.value=!1,W(w.value,!0)}},Qe=ve=>{const Le=Cr(ve,me.value,d.value,p);if(Le.isValid()){if(v&&v(Le.toDate()))return;const{hour:pe,minute:$e,second:ut}=we(w.value);w.value=Le.hour(pe).minute($e).second(ut),O.value=null,W(w.value,!0)}},tt=ve=>st.isDayjs(ve)&&ve.isValid()&&(v?!v(ve.toDate()):!0),nt=ve=>Cr(ve,a.format,d.value,p),Oe=()=>{const ve=st(y.value).locale(d.value);if(!y.value){const Le=E.value;return st().hour(Le.hour()).minute(Le.minute()).second(Le.second()).locale(d.value)}return ve},qe=()=>{var ve;["week","month","year","date"].includes(H.value)&&((ve=b.value)==null||ve.focus())},it=()=>{qe(),H.value==="week"&&et(Ce.down)},We=ve=>{const Le=zt(ve);[Ce.up,Ce.down,Ce.left,Ce.right,Ce.home,Ce.end,Ce.pageUp,Ce.pageDown].includes(Le)&&(et(Le),ve.stopPropagation(),ve.preventDefault()),[Ce.enter,Ce.space,Ce.numpadEnter].includes(Le)&&O.value===null&&_.value===null&&(ve.preventDefault(),W(w.value,!1))},et=ve=>{const{up:Le,down:pe,left:$e,right:ut,home:It,end:Yt,pageUp:Ne,pageDown:Ke}=Ce,Ze={year:{[Le]:-4,[pe]:4,[$e]:-1,[ut]:1,offset:(Dt,qt)=>Dt.setFullYear(Dt.getFullYear()+qt)},month:{[Le]:-4,[pe]:4,[$e]:-1,[ut]:1,offset:(Dt,qt)=>Dt.setMonth(Dt.getMonth()+qt)},week:{[Le]:-1,[pe]:1,[$e]:-1,[ut]:1,offset:(Dt,qt)=>Dt.setDate(Dt.getDate()+qt*7)},date:{[Le]:-7,[pe]:7,[$e]:-1,[ut]:1,[It]:Dt=>-Dt.getDay(),[Yt]:Dt=>-Dt.getDay()+6,[Ne]:Dt=>-new Date(Dt.getFullYear(),Dt.getMonth(),0).getDate(),[Ke]:Dt=>new Date(Dt.getFullYear(),Dt.getMonth()+1,0).getDate(),offset:(Dt,qt)=>Dt.setDate(Dt.getDate()+qt)}},rn=w.value.toDate();for(;Math.abs(w.value.diff(rn,"year",!0))<1;){const Dt=Ze[q.value];if(!Dt)return;if(Dt.offset(rn,ze(Dt[ve])?Dt[ve](rn):Dt[ve]??0),v&&v(rn))break;const qt=st(rn).locale(d.value);w.value=qt,o("pick",qt,!0);break}},gt=ve=>{o("panel-change",w.value.toDate(),ve,I.value)};return fe(()=>H.value,ve=>{if(["month","year"].includes(ve)){I.value=ve;return}else if(ve==="years"){I.value="year";return}else if(ve==="months"){I.value="month";return}I.value="date"},{immediate:!0}),fe(()=>y.value,ve=>{ve&&(w.value=Oe())},{immediate:!0}),fe(()=>a.parsedValue,ve=>{if(ve){if(K.value||be(ve))return;w.value=ve}else w.value=Oe()},{immediate:!0}),o("set-picker-option",["isValidValue",tt]),o("set-picker-option",["parseUserInput",nt]),o("set-picker-option",["handleFocusPicker",it]),(ve,Le)=>(x(),B("div",{class:M([i(l).b(),i(s).b(),i(l).is("border",ve.border),i(l).is("disabled",i(te)),{"has-sidebar":ve.$slots.sidebar||Q.value,"has-time":se.value}])},[j("div",{class:M(i(l).e("body-wrapper"))},[ae(ve.$slots,"sidebar",{class:M(i(l).e("sidebar"))}),Q.value?(x(),B("div",{key:0,class:M(i(l).e("sidebar"))},[(x(!0),B(He,null,Ct(i(g),(pe,$e)=>(x(),B("button",{key:$e,type:"button",disabled:i(te),class:M(i(l).e("shortcut")),onClick:ut=>z(pe)},ke(pe.text),11,WF))),128))],2)):le("v-if",!0),j("div",{class:M(i(l).e("body"))},[se.value?(x(),B("div",{key:0,class:M(i(s).e("time-header"))},[j("span",{class:M(i(s).e("editor-wrap"))},[J(i(Dn),{placeholder:i(c)("el.datepicker.selectDate"),"model-value":Ie.value,size:"small","validate-event":!1,disabled:i(te),readonly:!ve.editable,onInput:Le[0]||(Le[0]=pe=>O.value=pe),onChange:Qe},null,8,["placeholder","model-value","disabled","readonly"])],2),dt((x(),B("span",{class:M(i(s).e("editor-wrap"))},[J(i(Dn),{placeholder:i(c)("el.datepicker.selectTime"),"model-value":Me.value,size:"small","validate-event":!1,disabled:i(te),readonly:!ve.editable,onFocus:ye,onInput:Le[1]||(Le[1]=pe=>_.value=pe),onChange:Ve},null,8,["placeholder","model-value","disabled","readonly"]),J(i(Lc),{visible:Re.value,format:ge.value,"parsed-value":w.value,onPick:Pe},null,8,["visible","format","parsed-value"])],2)),[[i(Ll),Te]])],2)):le("v-if",!0),dt(j("div",{class:M([i(s).e("header"),(I.value==="year"||I.value==="month")&&i(s).em("header","bordered")])},[j("span",{class:M(i(s).e("prev-btn"))},[j("button",{type:"button","aria-label":i(c)("el.datepicker.prevYear"),class:M(["d-arrow-left",i(l).e("icon-btn")]),disabled:i(te),onClick:Le[2]||(Le[2]=pe=>R(!1))},[ae(ve.$slots,"prev-year",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Vl))]),_:1})])],10,jF),dt(j("button",{type:"button","aria-label":i(c)("el.datepicker.prevMonth"),class:M([i(l).e("icon-btn"),"arrow-left"]),disabled:i(te),onClick:Le[3]||(Le[3]=pe=>F(!1))},[ae(ve.$slots,"prev-month",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(al))]),_:1})])],10,UF),[[Nt,I.value==="date"]])],2),j("span",{role:"button",class:M(i(s).e("header-label")),"aria-live":"polite",tabindex:ve.disabled?void 0:0,"aria-disabled":ve.disabled,onKeydown:Le[4]||(Le[4]=en(pe=>de("year"),["enter"])),onClick:Le[5]||(Le[5]=pe=>de("year"))},ke(L.value),43,YF),dt(j("span",{role:"button","aria-live":"polite",tabindex:ve.disabled?void 0:0,"aria-disabled":ve.disabled,class:M([i(s).e("header-label"),{active:I.value==="month"}]),onKeydown:Le[6]||(Le[6]=en(pe=>de("month"),["enter"])),onClick:Le[7]||(Le[7]=pe=>de("month"))},ke(i(c)(`el.datepicker.month${T.value+1}`)),43,qF),[[Nt,I.value==="date"]]),j("span",{class:M(i(s).e("next-btn"))},[dt(j("button",{type:"button","aria-label":i(c)("el.datepicker.nextMonth"),class:M([i(l).e("icon-btn"),"arrow-right"]),disabled:i(te),onClick:Le[8]||(Le[8]=pe=>F(!0))},[ae(ve.$slots,"next-month",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Jn))]),_:1})])],10,GF),[[Nt,I.value==="date"]]),j("button",{type:"button","aria-label":i(c)("el.datepicker.nextYear"),class:M([i(l).e("icon-btn"),"d-arrow-right"]),disabled:i(te),onClick:Le[9]||(Le[9]=pe=>R(!0))},[ae(ve.$slots,"next-year",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Bl))]),_:1})])],10,XF)],2)],2),[[Nt,I.value!=="time"]]),j("div",{class:M(i(l).e("content")),onKeydown:We},[I.value==="date"?(x(),re(Yp,{key:0,ref_key:"currentViewRef",ref:b,"selection-mode":H.value,date:w.value,"parsed-value":ve.parsedValue,"disabled-date":i(v),disabled:i(te),"cell-class-name":i(h),"show-week-number":ve.showWeekNumber,onPick:U},null,8,["selection-mode","date","parsed-value","disabled-date","disabled","cell-class-name","show-week-number"])):le("v-if",!0),I.value==="year"?(x(),re(zi,{key:1,ref_key:"currentViewRef",ref:b,"selection-mode":H.value,date:w.value,"disabled-date":i(v),disabled:i(te),"parsed-value":ve.parsedValue,"cell-class-name":i(h),onPick:ue},null,8,["selection-mode","date","disabled-date","disabled","parsed-value","cell-class-name"])):le("v-if",!0),I.value==="month"?(x(),re(Fi,{key:2,ref_key:"currentViewRef",ref:b,"selection-mode":H.value,date:w.value,"parsed-value":ve.parsedValue,"disabled-date":i(v),disabled:i(te),"cell-class-name":i(h),onPick:ee},null,8,["selection-mode","date","parsed-value","disabled-date","disabled","cell-class-name"])):le("v-if",!0)],34)],2)],2),ve.showFooter&&Y.value&&G.value?(x(),B("div",{key:0,class:M(i(l).e("footer"))},[dt(J(i($n),{text:"",size:"small",class:M(i(l).e("link-btn")),disabled:oe.value,onClick:ce},{default:ne(()=>[St(ke(i(c)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[Nt,!K.value&&ve.showNow]]),ve.showConfirm?(x(),re(i($n),{key:0,plain:"",size:"small",class:M(i(l).e("link-btn")),disabled:V.value,onClick:Z},{default:ne(()=>[St(ke(i(c)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):le("v-if",!0)],2)):le("v-if",!0)],2))}}),JF=ZF;const QF=Se({...N2,...jh}),e5=e=>{const{emit:t}=vt(),n=rl(),a=fn();return l=>{const s=ze(l.value)?l.value():l.value;if(s){t("pick",[st(s[0]).locale(e.value),st(s[1]).locale(e.value)]);return}l.onClick&&l.onClick({attrs:n,slots:a,emit:t})}},qh=(e,{defaultValue:t,defaultTime:n,leftDate:a,rightDate:o,step:l,unit:s,sortDates:r})=>{const{emit:u}=vt(),{pickerNs:c}=_e(Kh),d=he("date-range-picker"),{t:f,lang:p}=Et(),g=e5(p),v=A(),h=A(),m=A({endDate:null,selecting:!1}),y=E=>{m.value=E},b=(E=!1)=>{const T=i(v),$=i(h);Bi([T,$])&&u("pick",[T,$],E)},w=E=>{m.value.selecting=E,E||(m.value.endDate=null)},C=E=>{if(be(E)&&E.length===2){const[T,$]=E;v.value=T,a.value=T,h.value=$,r(i(v),i(h))}else k()},k=()=>{let[E,T]=Hd(i(t),{lang:i(p),step:l,unit:s,unlinkPanels:e.unlinkPanels});const $=O=>O.diff(O.startOf("d"),"ms"),N=i(n);if(N){let O=0,_=0;if(be(N)){const[P,D]=N.map(st);O=$(P),_=$(D)}else{const P=$(st(N));O=P,_=P}E=E.startOf("d").add(O,"ms"),T=T.startOf("d").add(_,"ms")}v.value=void 0,h.value=void 0,a.value=E,o.value=T};return fe(t,E=>{E&&k()},{immediate:!0}),fe(()=>e.parsedValue,E=>{(!(E!=null&&E.length)||!tn(E,[v.value,h.value]))&&C(E)},{immediate:!0}),fe(()=>e.visible,()=>{e.visible&&C(e.parsedValue)},{immediate:!0}),{minDate:v,maxDate:h,rangeState:m,lang:p,ppNs:c,drpNs:d,handleChangeRange:y,handleRangeConfirm:b,handleShortcutClick:g,onSelect:w,parseValue:C,t:f}},t5=(e,t,n,a)=>{const o=A("date"),l=A(),s=A("date"),r=A(),{disabledDate:u}=_e(Xa).props,{t:c,lang:d}=Et(),f=S(()=>n.value.year()),p=S(()=>n.value.month()),g=S(()=>a.value.year()),v=S(()=>a.value.month());function h(k,E){const T=c("el.datepicker.year");if(k.value==="year"){const $=Math.floor(E.value/10)*10;return T?`${$} ${T} - ${$+9} ${T}`:`${$} - ${$+9}`}return`${E.value} ${T}`}function m(k){k==null||k.focus()}async function y(k,E){if(e.disabled)return;const T=k==="left"?o:s,$=k==="left"?l:r;T.value=E,await Ae(),m($.value)}async function b(k,E,T){if(e.disabled)return;const $=E==="left",N=$?n:a,O=$?a:n,_=$?o:s,P=$?l:r;k==="year"&&(N.value=zc(N.value.year(T),d.value,u)),k==="month"&&(N.value=wr(N.value,N.value.year(),T,d.value,u)),e.unlinkPanels||(O.value=E==="left"?N.value.add(1,"month"):N.value.subtract(1,"month")),_.value=k==="year"?"month":"date",await Ae(),m(P.value),w(k)}function w(k){t("panel-change",[n.value.toDate(),a.value.toDate()],k)}function C(k,E,T){const $=T?"add":"subtract";return k==="year"?E[$](10,"year"):E[$](1,"year")}return{leftCurrentView:o,rightCurrentView:s,leftCurrentViewRef:l,rightCurrentViewRef:r,leftYear:f,rightYear:g,leftMonth:p,rightMonth:v,leftYearLabel:S(()=>h(o,f)),rightYearLabel:S(()=>h(s,g)),showLeftPicker:k=>y("left",k),showRightPicker:k=>y("right",k),handleLeftYearPick:k=>b("year","left",k),handleRightYearPick:k=>b("year","right",k),handleLeftMonthPick:k=>b("month","left",k),handleRightMonthPick:k=>b("month","right",k),handlePanelChange:w,adjustDateByView:C}},n5=["disabled","onClick"],a5=["aria-label","disabled"],o5=["aria-label","disabled"],l5=["disabled","aria-label"],s5=["disabled","aria-label"],r5=["tabindex","aria-disabled"],i5=["tabindex","aria-disabled"],u5=["disabled","aria-label"],c5=["disabled","aria-label"],d5=["aria-label","disabled"],f5=["disabled","aria-label"],p5=["tabindex","aria-disabled"],v5=["tabindex","aria-disabled"],ju="month";var h5=ie({__name:"panel-date-range",props:QF,emits:["pick","set-picker-option","calendar-change","panel-change","clear"],setup(e,{emit:t}){const n=e,a=t,o=_e(Xa),l=_e(Su,void 0),{disabledDate:s,cellClassName:r,defaultTime:u,clearable:c}=o.props,d=Lt(o.props,"format"),f=Lt(o.props,"shortcuts"),p=Lt(o.props,"defaultValue"),{lang:g}=Et(),v=A(st().locale(g.value)),h=A(st().locale(g.value).add(1,ju)),{minDate:m,maxDate:y,rangeState:b,ppNs:w,drpNs:C,handleChangeRange:k,handleRangeConfirm:E,handleShortcutClick:T,onSelect:$,parseValue:N,t:O}=qh(n,{defaultValue:p,defaultTime:u,leftDate:v,rightDate:h,unit:ju,sortDates:qt});fe(()=>n.visible,Ue=>{!Ue&&b.value.selecting&&(N(n.parsedValue),$(!1))});const _=A({min:null,max:null}),P=A({min:null,max:null}),{leftCurrentView:D,rightCurrentView:W,leftCurrentViewRef:U,rightCurrentViewRef:F,leftYear:R,rightYear:I,leftMonth:L,rightMonth:z,leftYearLabel:H,rightYearLabel:K,showLeftPicker:q,showRightPicker:Q,handleLeftYearPick:ee,handleRightYearPick:ue,handleLeftMonthPick:te,handleRightMonthPick:de,handlePanelChange:se,adjustDateByView:Y}=t5(n,a,v,h),G=S(()=>!!f.value.length),V=S(()=>_.value.min!==null?_.value.min:m.value?m.value.format(me.value):""),Z=S(()=>_.value.max!==null?_.value.max:y.value||m.value?(y.value||m.value).format(me.value):""),oe=S(()=>P.value.min!==null?P.value.min:m.value?m.value.format(ge.value):""),ce=S(()=>P.value.max!==null?P.value.max:y.value||m.value?(y.value||m.value).format(ge.value):""),ge=S(()=>n.timeFormat||AS(d.value||"")||Es),me=S(()=>n.dateFormat||PS(d.value||"")||Wo),Me=Ue=>Bi(Ue)&&(s?!s(Ue[0].toDate())&&!s(Ue[1].toDate()):!0),Ie=()=>{v.value=Y(D.value,v.value,!1),n.unlinkPanels||(h.value=v.value.add(1,"month")),se("year")},Re=()=>{v.value=v.value.subtract(1,"month"),n.unlinkPanels||(h.value=v.value.add(1,"month")),se("month")},ye=()=>{n.unlinkPanels?h.value=Y(W.value,h.value,!0):(v.value=Y(W.value,v.value,!0),h.value=v.value.add(1,"month")),se("year")},Te=()=>{n.unlinkPanels?h.value=h.value.add(1,"month"):(v.value=v.value.add(1,"month"),h.value=v.value.add(1,"month")),se("month")},we=()=>{v.value=Y(D.value,v.value,!0),se("year")},Pe=()=>{v.value=v.value.add(1,"month"),se("month")},Ve=()=>{h.value=Y(W.value,h.value,!1),se("year")},Qe=()=>{h.value=h.value.subtract(1,"month"),se("month")},tt=S(()=>{const Ue=(L.value+1)%12,Ge=L.value+1>=12?1:0;return n.unlinkPanels&&new Date(R.value+Ge,Ue)n.unlinkPanels&&I.value*12+z.value-(R.value*12+L.value+1)>=12),Oe=on(),qe=S(()=>!(m.value&&y.value&&!b.value.selecting&&Bi([m.value,y.value])&&!Oe.value)),it=S(()=>n.type==="datetime"||n.type==="datetimerange"),We=(Ue,Ge)=>{if(Ue)return u?st(u[Ge]||u).locale(g.value).year(Ue.year()).month(Ue.month()).date(Ue.date()):Ue},et=(Ue,Ge=!0)=>{const ht=Ue.minDate,En=Ue.maxDate,lo=We(ht,0),Da=We(En,1);y.value===Da&&m.value===lo||(a("calendar-change",[ht.toDate(),En&&En.toDate()]),y.value=Da,m.value=lo,!it.value&&Ge&&(Ge=!lo||!Da),E(Ge))},gt=A(!1),ve=A(!1),Le=()=>{gt.value=!1},pe=()=>{ve.value=!1},$e=(Ue,Ge)=>{_.value[Ge]=Ue;const ht=st(Ue,me.value).locale(g.value);if(ht.isValid()){if(s&&s(ht.toDate()))return;Ge==="min"?(v.value=ht,m.value=(m.value||v.value).year(ht.year()).month(ht.month()).date(ht.date()),!n.unlinkPanels&&(!y.value||y.value.isBefore(m.value))&&(h.value=ht.add(1,"month"),y.value=m.value.add(1,"month"))):(h.value=ht,y.value=(y.value||h.value).year(ht.year()).month(ht.month()).date(ht.date()),!n.unlinkPanels&&(!m.value||m.value.isAfter(y.value))&&(v.value=ht.subtract(1,"month"),m.value=y.value.subtract(1,"month"))),qt(m.value,y.value),E(!0)}},ut=(Ue,Ge)=>{_.value[Ge]=null},It=(Ue,Ge)=>{P.value[Ge]=Ue;const ht=st(Ue,ge.value).locale(g.value);ht.isValid()&&(Ge==="min"?(gt.value=!0,m.value=(m.value||v.value).hour(ht.hour()).minute(ht.minute()).second(ht.second()),v.value=m.value):(ve.value=!0,y.value=(y.value||h.value).hour(ht.hour()).minute(ht.minute()).second(ht.second()),h.value=y.value))},Yt=(Ue,Ge)=>{P.value[Ge]=null,Ge==="min"?(v.value=m.value,gt.value=!1,(!y.value||y.value.isBefore(m.value))&&(y.value=m.value)):(h.value=y.value,ve.value=!1,y.value&&y.value.isBefore(m.value)&&(m.value=y.value)),E(!0)},Ne=(Ue,Ge,ht)=>{P.value.min||(Ue&&(m.value=(m.value||v.value).hour(Ue.hour()).minute(Ue.minute()).second(Ue.second())),ht||(gt.value=Ge),(!y.value||y.value.isBefore(m.value))&&(y.value=m.value,h.value=Ue,Ae(()=>{N(n.parsedValue)})),E(!0))},Ke=(Ue,Ge,ht)=>{P.value.max||(Ue&&(y.value=(y.value||h.value).hour(Ue.hour()).minute(Ue.minute()).second(Ue.second())),ht||(ve.value=Ge),y.value&&y.value.isBefore(m.value)&&(m.value=y.value),E(!0))},Ze=()=>{rn(),a("clear")},rn=()=>{let Ue=null;o!=null&&o.emptyValues&&(Ue=o.emptyValues.valueOnClear.value),v.value=Hd(i(p),{lang:i(g),unit:"month",unlinkPanels:n.unlinkPanels})[0],h.value=v.value.add(1,"month"),y.value=void 0,m.value=void 0,E(!0),a("pick",Ue)},Dt=Ue=>Cr(Ue,d.value||"",g.value,l);function qt(Ue,Ge){if(n.unlinkPanels&&Ge){const ht=(Ue==null?void 0:Ue.year())||0,En=(Ue==null?void 0:Ue.month())||0,lo=Ge.year(),Da=Ge.month();h.value=ht===lo&&En===Da?Ge.add(1,ju):Ge}else h.value=v.value.add(1,ju),Ge&&(h.value=h.value.hour(Ge.hour()).minute(Ge.minute()).second(Ge.second()))}return a("set-picker-option",["isValidValue",Me]),a("set-picker-option",["parseUserInput",Dt]),a("set-picker-option",["handleClear",rn]),(Ue,Ge)=>(x(),B("div",{class:M([i(w).b(),i(C).b(),i(w).is("border",Ue.border),i(w).is("disabled",i(Oe)),{"has-sidebar":Ue.$slots.sidebar||G.value,"has-time":it.value}])},[j("div",{class:M(i(w).e("body-wrapper"))},[ae(Ue.$slots,"sidebar",{class:M(i(w).e("sidebar"))}),G.value?(x(),B("div",{key:0,class:M(i(w).e("sidebar"))},[(x(!0),B(He,null,Ct(f.value,(ht,En)=>(x(),B("button",{key:En,type:"button",disabled:i(Oe),class:M(i(w).e("shortcut")),onClick:lo=>i(T)(ht)},ke(ht.text),11,n5))),128))],2)):le("v-if",!0),j("div",{class:M(i(w).e("body"))},[it.value?(x(),B("div",{key:0,class:M(i(C).e("time-header"))},[j("span",{class:M(i(C).e("editors-wrap"))},[j("span",{class:M(i(C).e("time-picker-wrap"))},[J(i(Dn),{size:"small",disabled:i(b).selecting||i(Oe),placeholder:i(O)("el.datepicker.startDate"),class:M(i(C).e("editor")),"model-value":V.value,"validate-event":!1,readonly:!Ue.editable,onInput:Ge[0]||(Ge[0]=ht=>$e(ht,"min")),onChange:Ge[1]||(Ge[1]=ht=>ut(ht,"min"))},null,8,["disabled","placeholder","class","model-value","readonly"])],2),dt((x(),B("span",{class:M(i(C).e("time-picker-wrap"))},[J(i(Dn),{size:"small",class:M(i(C).e("editor")),disabled:i(b).selecting||i(Oe),placeholder:i(O)("el.datepicker.startTime"),"model-value":oe.value,"validate-event":!1,readonly:!Ue.editable,onFocus:Ge[2]||(Ge[2]=ht=>gt.value=!0),onInput:Ge[3]||(Ge[3]=ht=>It(ht,"min")),onChange:Ge[4]||(Ge[4]=ht=>Yt(ht,"min"))},null,8,["class","disabled","placeholder","model-value","readonly"]),J(i(Lc),{visible:gt.value,format:ge.value,"datetime-role":"start","parsed-value":i(m)||v.value,onPick:Ne},null,8,["visible","format","parsed-value"])],2)),[[i(Ll),Le]])],2),j("span",null,[J(i(Be),null,{default:ne(()=>[J(i(Jn))]),_:1})]),j("span",{class:M([i(C).e("editors-wrap"),"is-right"])},[j("span",{class:M(i(C).e("time-picker-wrap"))},[J(i(Dn),{size:"small",class:M(i(C).e("editor")),disabled:i(b).selecting||i(Oe),placeholder:i(O)("el.datepicker.endDate"),"model-value":Z.value,readonly:!i(m)||!Ue.editable,"validate-event":!1,onInput:Ge[5]||(Ge[5]=ht=>$e(ht,"max")),onChange:Ge[6]||(Ge[6]=ht=>ut(ht,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"])],2),dt((x(),B("span",{class:M(i(C).e("time-picker-wrap"))},[J(i(Dn),{size:"small",class:M(i(C).e("editor")),disabled:i(b).selecting||i(Oe),placeholder:i(O)("el.datepicker.endTime"),"model-value":ce.value,readonly:!i(m)||!Ue.editable,"validate-event":!1,onFocus:Ge[7]||(Ge[7]=ht=>i(m)&&(ve.value=!0)),onInput:Ge[8]||(Ge[8]=ht=>It(ht,"max")),onChange:Ge[9]||(Ge[9]=ht=>Yt(ht,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"]),J(i(Lc),{"datetime-role":"end",visible:ve.value,format:ge.value,"parsed-value":i(y)||h.value,onPick:Ke},null,8,["visible","format","parsed-value"])],2)),[[i(Ll),pe]])],2)],2)):le("v-if",!0),j("div",{class:M([[i(w).e("content"),i(C).e("content")],"is-left"])},[j("div",{class:M(i(C).e("header"))},[j("button",{type:"button",class:M([i(w).e("icon-btn"),"d-arrow-left"]),"aria-label":i(O)("el.datepicker.prevYear"),disabled:i(Oe),onClick:Ie},[ae(Ue.$slots,"prev-year",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Vl))]),_:1})])],10,a5),dt(j("button",{type:"button",class:M([i(w).e("icon-btn"),"arrow-left"]),"aria-label":i(O)("el.datepicker.prevMonth"),disabled:i(Oe),onClick:Re},[ae(Ue.$slots,"prev-month",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(al))]),_:1})])],10,o5),[[Nt,i(D)==="date"]]),Ue.unlinkPanels?(x(),B("button",{key:0,type:"button",disabled:!nt.value||i(Oe),class:M([[i(w).e("icon-btn"),i(w).is("disabled",!nt.value||i(Oe))],"d-arrow-right"]),"aria-label":i(O)("el.datepicker.nextYear"),onClick:we},[ae(Ue.$slots,"next-year",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Bl))]),_:1})])],10,l5)):le("v-if",!0),Ue.unlinkPanels&&i(D)==="date"?(x(),B("button",{key:1,type:"button",disabled:!tt.value||i(Oe),class:M([[i(w).e("icon-btn"),i(w).is("disabled",!tt.value||i(Oe))],"arrow-right"]),"aria-label":i(O)("el.datepicker.nextMonth"),onClick:Pe},[ae(Ue.$slots,"next-month",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Jn))]),_:1})])],10,s5)):le("v-if",!0),j("div",null,[j("span",{role:"button",class:M(i(C).e("header-label")),"aria-live":"polite",tabindex:Ue.disabled?void 0:0,"aria-disabled":Ue.disabled,onKeydown:Ge[10]||(Ge[10]=en(ht=>i(q)("year"),["enter"])),onClick:Ge[11]||(Ge[11]=ht=>i(q)("year"))},ke(i(H)),43,r5),dt(j("span",{role:"button","aria-live":"polite",tabindex:Ue.disabled?void 0:0,"aria-disabled":Ue.disabled,class:M([i(C).e("header-label"),{active:i(D)==="month"}]),onKeydown:Ge[12]||(Ge[12]=en(ht=>i(q)("month"),["enter"])),onClick:Ge[13]||(Ge[13]=ht=>i(q)("month"))},ke(i(O)(`el.datepicker.month${v.value.month()+1}`)),43,i5),[[Nt,i(D)==="date"]])])],2),i(D)==="date"?(x(),re(Yp,{key:0,ref_key:"leftCurrentViewRef",ref:U,"selection-mode":"range",date:v.value,"min-date":i(m),"max-date":i(y),"range-state":i(b),"disabled-date":i(s),"cell-class-name":i(r),"show-week-number":Ue.showWeekNumber,disabled:i(Oe),onChangerange:i(k),onPick:et,onSelect:i($)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","show-week-number","disabled","onChangerange","onSelect"])):le("v-if",!0),i(D)==="year"?(x(),re(zi,{key:1,ref_key:"leftCurrentViewRef",ref:U,"selection-mode":"year",date:v.value,"disabled-date":i(s),"parsed-value":Ue.parsedValue,disabled:i(Oe),onPick:i(ee)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):le("v-if",!0),i(D)==="month"?(x(),re(Fi,{key:2,ref_key:"leftCurrentViewRef",ref:U,"selection-mode":"month",date:v.value,"parsed-value":Ue.parsedValue,"disabled-date":i(s),disabled:i(Oe),onPick:i(te)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):le("v-if",!0)],2),j("div",{class:M([[i(w).e("content"),i(C).e("content")],"is-right"])},[j("div",{class:M(i(C).e("header"))},[Ue.unlinkPanels?(x(),B("button",{key:0,type:"button",disabled:!nt.value||i(Oe),class:M([[i(w).e("icon-btn"),i(w).is("disabled",!nt.value||i(Oe))],"d-arrow-left"]),"aria-label":i(O)("el.datepicker.prevYear"),onClick:Ve},[ae(Ue.$slots,"prev-year",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Vl))]),_:1})])],10,u5)):le("v-if",!0),Ue.unlinkPanels&&i(W)==="date"?(x(),B("button",{key:1,type:"button",disabled:!tt.value||i(Oe),class:M([[i(w).e("icon-btn"),i(w).is("disabled",!tt.value||i(Oe))],"arrow-left"]),"aria-label":i(O)("el.datepicker.prevMonth"),onClick:Qe},[ae(Ue.$slots,"prev-month",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(al))]),_:1})])],10,c5)):le("v-if",!0),j("button",{type:"button","aria-label":i(O)("el.datepicker.nextYear"),class:M([i(w).e("icon-btn"),"d-arrow-right"]),disabled:i(Oe),onClick:ye},[ae(Ue.$slots,"next-year",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Bl))]),_:1})])],10,d5),dt(j("button",{type:"button",class:M([i(w).e("icon-btn"),"arrow-right"]),disabled:i(Oe),"aria-label":i(O)("el.datepicker.nextMonth"),onClick:Te},[ae(Ue.$slots,"next-month",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Jn))]),_:1})])],10,f5),[[Nt,i(W)==="date"]]),j("div",null,[j("span",{role:"button",class:M(i(C).e("header-label")),"aria-live":"polite",tabindex:Ue.disabled?void 0:0,"aria-disabled":Ue.disabled,onKeydown:Ge[14]||(Ge[14]=en(ht=>i(Q)("year"),["enter"])),onClick:Ge[15]||(Ge[15]=ht=>i(Q)("year"))},ke(i(K)),43,p5),dt(j("span",{role:"button","aria-live":"polite",tabindex:Ue.disabled?void 0:0,"aria-disabled":Ue.disabled,class:M([i(C).e("header-label"),{active:i(W)==="month"}]),onKeydown:Ge[16]||(Ge[16]=en(ht=>i(Q)("month"),["enter"])),onClick:Ge[17]||(Ge[17]=ht=>i(Q)("month"))},ke(i(O)(`el.datepicker.month${h.value.month()+1}`)),43,v5),[[Nt,i(W)==="date"]])])],2),i(W)==="date"?(x(),re(Yp,{key:0,ref_key:"rightCurrentViewRef",ref:F,"selection-mode":"range",date:h.value,"min-date":i(m),"max-date":i(y),"range-state":i(b),"disabled-date":i(s),"cell-class-name":i(r),"show-week-number":Ue.showWeekNumber,disabled:i(Oe),onChangerange:i(k),onPick:et,onSelect:i($)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","show-week-number","disabled","onChangerange","onSelect"])):le("v-if",!0),i(W)==="year"?(x(),re(zi,{key:1,ref_key:"rightCurrentViewRef",ref:F,"selection-mode":"year",date:h.value,"disabled-date":i(s),"parsed-value":Ue.parsedValue,disabled:i(Oe),onPick:i(ue)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):le("v-if",!0),i(W)==="month"?(x(),re(Fi,{key:2,ref_key:"rightCurrentViewRef",ref:F,"selection-mode":"month",date:h.value,"parsed-value":Ue.parsedValue,"disabled-date":i(s),disabled:i(Oe),onPick:i(de)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):le("v-if",!0)],2)],2)],2),Ue.showFooter&&it.value&&(Ue.showConfirm||i(c))?(x(),B("div",{key:0,class:M(i(w).e("footer"))},[i(c)?(x(),re(i($n),{key:0,text:"",size:"small",class:M(i(w).e("link-btn")),onClick:Ze},{default:ne(()=>[St(ke(i(O)("el.datepicker.clear")),1)]),_:1},8,["class"])):le("v-if",!0),Ue.showConfirm?(x(),re(i($n),{key:1,plain:"",size:"small",class:M(i(w).e("link-btn")),disabled:qe.value,onClick:Ge[18]||(Ge[18]=ht=>i(E)(!1))},{default:ne(()=>[St(ke(i(O)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):le("v-if",!0)],2)):le("v-if",!0)],2))}}),m5=h5;const g5=Se({...jh}),y5=["pick","set-picker-option","calendar-change"],b5=({unlinkPanels:e,leftDate:t,rightDate:n})=>{const{t:a}=Et();return{leftPrevYear:()=>{t.value=t.value.subtract(1,"year"),e.value||(n.value=n.value.subtract(1,"year"))},rightNextYear:()=>{e.value||(t.value=t.value.add(1,"year")),n.value=n.value.add(1,"year")},leftNextYear:()=>{t.value=t.value.add(1,"year")},rightPrevYear:()=>{n.value=n.value.subtract(1,"year")},leftLabel:S(()=>`${t.value.year()} ${a("el.datepicker.year")}`),rightLabel:S(()=>`${n.value.year()} ${a("el.datepicker.year")}`),leftYear:S(()=>t.value.year()),rightYear:S(()=>n.value.year()===t.value.year()?t.value.year()+1:n.value.year())}},w5=["disabled","onClick"],C5=["disabled"],S5=["disabled"],k5=["disabled"],E5=["disabled"],Uu="year";var x5=ie({name:"DatePickerMonthRange",__name:"panel-month-range",props:g5,emits:y5,setup(e,{emit:t}){const n=e,a=t,{lang:o}=Et(),l=_e(Xa),s=_e(Su,void 0),{shortcuts:r,disabledDate:u,cellClassName:c}=l.props,d=Lt(l.props,"format"),f=Lt(l.props,"defaultValue"),p=A(st().locale(o.value)),g=A(st().locale(o.value).add(1,Uu)),{minDate:v,maxDate:h,rangeState:m,ppNs:y,drpNs:b,handleChangeRange:w,handleRangeConfirm:C,handleShortcutClick:k,onSelect:E,parseValue:T}=qh(n,{defaultValue:f,leftDate:p,rightDate:g,unit:Uu,sortDates:H}),$=S(()=>!!r.length),{leftPrevYear:N,rightNextYear:O,leftNextYear:_,rightPrevYear:P,leftLabel:D,rightLabel:W,leftYear:U,rightYear:F}=b5({unlinkPanels:Lt(n,"unlinkPanels"),leftDate:p,rightDate:g}),R=S(()=>n.unlinkPanels&&F.value>U.value+1),I=(q,Q=!0)=>{const ee=q.minDate,ue=q.maxDate;h.value===ue&&v.value===ee||(a("calendar-change",[ee.toDate(),ue&&ue.toDate()]),h.value=ue,v.value=ee,Q&&C())},L=()=>{let q=null;l!=null&&l.emptyValues&&(q=l.emptyValues.valueOnClear.value),p.value=Hd(i(f),{lang:i(o),unit:"year",unlinkPanels:n.unlinkPanels})[0],g.value=p.value.add(1,"year"),a("pick",q)},z=q=>Cr(q,d.value,o.value,s);function H(q,Q){n.unlinkPanels&&Q?g.value=((q==null?void 0:q.year())||0)===Q.year()?Q.add(1,Uu):Q:g.value=p.value.add(1,Uu)}const K=on();return fe(()=>n.visible,q=>{!q&&m.value.selecting&&(T(n.parsedValue),E(!1))}),a("set-picker-option",["isValidValue",Bi]),a("set-picker-option",["parseUserInput",z]),a("set-picker-option",["handleClear",L]),(q,Q)=>(x(),B("div",{class:M([i(y).b(),i(b).b(),i(y).is("border",q.border),i(y).is("disabled",i(K)),{"has-sidebar":!!q.$slots.sidebar||$.value}])},[j("div",{class:M(i(y).e("body-wrapper"))},[ae(q.$slots,"sidebar",{class:M(i(y).e("sidebar"))}),$.value?(x(),B("div",{key:0,class:M(i(y).e("sidebar"))},[(x(!0),B(He,null,Ct(i(r),(ee,ue)=>(x(),B("button",{key:ue,type:"button",class:M(i(y).e("shortcut")),disabled:i(K),onClick:te=>i(k)(ee)},ke(ee.text),11,w5))),128))],2)):le("v-if",!0),j("div",{class:M(i(y).e("body"))},[j("div",{class:M([[i(y).e("content"),i(b).e("content")],"is-left"])},[j("div",{class:M(i(b).e("header"))},[j("button",{type:"button",class:M([i(y).e("icon-btn"),"d-arrow-left"]),disabled:i(K),onClick:Q[0]||(Q[0]=(...ee)=>i(N)&&i(N)(...ee))},[ae(q.$slots,"prev-year",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Vl))]),_:1})])],10,C5),q.unlinkPanels?(x(),B("button",{key:0,type:"button",disabled:!R.value||i(K),class:M([[i(y).e("icon-btn"),i(y).is("disabled",!R.value||i(K))],"d-arrow-right"]),onClick:Q[1]||(Q[1]=(...ee)=>i(_)&&i(_)(...ee))},[ae(q.$slots,"next-year",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Bl))]),_:1})])],10,S5)):le("v-if",!0),j("div",null,ke(i(D)),1)],2),J(Fi,{"selection-mode":"range",date:p.value,"min-date":i(v),"max-date":i(h),"range-state":i(m),"disabled-date":i(u),disabled:i(K),"cell-class-name":i(c),onChangerange:i(w),onPick:I,onSelect:i(E)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2),j("div",{class:M([[i(y).e("content"),i(b).e("content")],"is-right"])},[j("div",{class:M(i(b).e("header"))},[q.unlinkPanels?(x(),B("button",{key:0,type:"button",disabled:!R.value||i(K),class:M([[i(y).e("icon-btn"),i(y).is("disabled",!R.value||i(K))],"d-arrow-left"]),onClick:Q[2]||(Q[2]=(...ee)=>i(P)&&i(P)(...ee))},[ae(q.$slots,"prev-year",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Vl))]),_:1})])],10,k5)):le("v-if",!0),j("button",{type:"button",class:M([i(y).e("icon-btn"),"d-arrow-right"]),disabled:i(K),onClick:Q[3]||(Q[3]=(...ee)=>i(O)&&i(O)(...ee))},[ae(q.$slots,"next-year",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Bl))]),_:1})])],10,E5),j("div",null,ke(i(W)),1)],2),J(Fi,{"selection-mode":"range",date:g.value,"min-date":i(v),"max-date":i(h),"range-state":i(m),"disabled-date":i(u),disabled:i(K),"cell-class-name":i(c),onChangerange:i(w),onPick:I,onSelect:i(E)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}}),T5=x5;const $5=Se({...jh}),O5=["pick","set-picker-option","calendar-change"],N5=({unlinkPanels:e,leftDate:t,rightDate:n})=>({leftPrevYear:()=>{t.value=t.value.subtract(10,"year"),e.value||(n.value=n.value.subtract(10,"year"))},rightNextYear:()=>{e.value||(t.value=t.value.add(10,"year")),n.value=n.value.add(10,"year")},leftNextYear:()=>{t.value=t.value.add(10,"year")},rightPrevYear:()=>{n.value=n.value.subtract(10,"year")},leftLabel:S(()=>{const r=Math.floor(t.value.year()/10)*10;return`${r}-${r+9}`}),rightLabel:S(()=>{const r=Math.floor(n.value.year()/10)*10;return`${r}-${r+9}`}),leftYear:S(()=>Math.floor(t.value.year()/10)*10+9),rightYear:S(()=>Math.floor(n.value.year()/10)*10)}),M5=["disabled","onClick"],R5=["disabled"],I5=["disabled"],_5=["disabled"],P5=["disabled"],Fs=10,Yr="year";var A5=ie({name:"DatePickerYearRange",__name:"panel-year-range",props:$5,emits:O5,setup(e,{emit:t}){const n=e,a=t,{lang:o}=Et(),l=A(st().locale(o.value)),s=A(st().locale(o.value).add(Fs,Yr)),r=_e(Su,void 0),u=_e(Xa),{shortcuts:c,disabledDate:d,cellClassName:f}=u.props,p=Lt(u.props,"format"),g=Lt(u.props,"defaultValue"),{minDate:v,maxDate:h,rangeState:m,ppNs:y,drpNs:b,handleChangeRange:w,handleRangeConfirm:C,handleShortcutClick:k,onSelect:E,parseValue:T}=qh(n,{defaultValue:g,leftDate:l,rightDate:s,step:Fs,unit:Yr,sortDates:ue}),{leftPrevYear:$,rightNextYear:N,leftNextYear:O,rightPrevYear:_,leftLabel:P,rightLabel:D,leftYear:W,rightYear:U}=N5({unlinkPanels:Lt(n,"unlinkPanels"),leftDate:l,rightDate:s}),F=on(),R=S(()=>!!c.length),I=S(()=>[y.b(),b.b(),y.is("border",n.border),y.is("disabled",F.value),{"has-sidebar":!!fn().sidebar||R.value}]),L=S(()=>({content:[y.e("content"),b.e("content"),"is-left"],arrowLeftBtn:[y.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[y.e("icon-btn"),y.is("disabled",!H.value||F.value),"d-arrow-right"]})),z=S(()=>({content:[y.e("content"),b.e("content"),"is-right"],arrowLeftBtn:[y.e("icon-btn"),y.is("disabled",!H.value||F.value),"d-arrow-left"],arrowRightBtn:[y.e("icon-btn"),"d-arrow-right"]})),H=S(()=>n.unlinkPanels&&U.value>W.value+1),K=(te,de=!0)=>{const se=te.minDate,Y=te.maxDate;h.value===Y&&v.value===se||(a("calendar-change",[se.toDate(),Y&&Y.toDate()]),h.value=Y,v.value=se,de&&C())},q=te=>Cr(te,p.value,o.value,r),Q=te=>Bi(te)&&(d?!d(te[0].toDate())&&!d(te[1].toDate()):!0),ee=()=>{let te=null;u!=null&&u.emptyValues&&(te=u.emptyValues.valueOnClear.value);const de=Hd(i(g),{lang:i(o),step:Fs,unit:Yr,unlinkPanels:n.unlinkPanels});l.value=de[0],s.value=de[1],a("pick",te)};function ue(te,de){if(n.unlinkPanels&&de){const se=(te==null?void 0:te.year())||0,Y=de.year();s.value=se+Fs>Y?de.add(Fs,Yr):de}else s.value=l.value.add(Fs,Yr)}return fe(()=>n.visible,te=>{!te&&m.value.selecting&&(T(n.parsedValue),E(!1))}),a("set-picker-option",["isValidValue",Q]),a("set-picker-option",["parseUserInput",q]),a("set-picker-option",["handleClear",ee]),(te,de)=>(x(),B("div",{class:M(I.value)},[j("div",{class:M(i(y).e("body-wrapper"))},[ae(te.$slots,"sidebar",{class:M(i(y).e("sidebar"))}),R.value?(x(),B("div",{key:0,class:M(i(y).e("sidebar"))},[(x(!0),B(He,null,Ct(i(c),(se,Y)=>(x(),B("button",{key:Y,type:"button",class:M(i(y).e("shortcut")),disabled:i(F),onClick:G=>i(k)(se)},ke(se.text),11,M5))),128))],2)):le("v-if",!0),j("div",{class:M(i(y).e("body"))},[j("div",{class:M(L.value.content)},[j("div",{class:M(i(b).e("header"))},[j("button",{type:"button",class:M(L.value.arrowLeftBtn),disabled:i(F),onClick:de[0]||(de[0]=(...se)=>i($)&&i($)(...se))},[ae(te.$slots,"prev-year",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Vl))]),_:1})])],10,R5),te.unlinkPanels?(x(),B("button",{key:0,type:"button",disabled:!H.value||i(F),class:M(L.value.arrowRightBtn),onClick:de[1]||(de[1]=(...se)=>i(O)&&i(O)(...se))},[ae(te.$slots,"next-year",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Bl))]),_:1})])],10,I5)):le("v-if",!0),j("div",null,ke(i(P)),1)],2),J(zi,{"selection-mode":"range",date:l.value,"min-date":i(v),"max-date":i(h),"range-state":i(m),"disabled-date":i(d),disabled:i(F),"cell-class-name":i(f),onChangerange:i(w),onPick:K,onSelect:i(E)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2),j("div",{class:M(z.value.content)},[j("div",{class:M(i(b).e("header"))},[te.unlinkPanels?(x(),B("button",{key:0,type:"button",disabled:!H.value||i(F),class:M(z.value.arrowLeftBtn),onClick:de[2]||(de[2]=(...se)=>i(_)&&i(_)(...se))},[ae(te.$slots,"prev-year",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Vl))]),_:1})])],10,_5)):le("v-if",!0),j("button",{type:"button",class:M(z.value.arrowRightBtn),disabled:i(F),onClick:de[3]||(de[3]=(...se)=>i(N)&&i(N)(...se))},[ae(te.$slots,"next-year",{},()=>[J(i(Be),null,{default:ne(()=>[J(i(Bl))]),_:1})])],10,P5),j("div",null,ke(i(D)),1)],2),J(zi,{"selection-mode":"range",date:s.value,"min-date":i(v),"max-date":i(h),"range-state":i(m),"disabled-date":i(d),disabled:i(F),"cell-class-name":i(f),onChangerange:i(w),onPick:K,onSelect:i(E)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}}),L5=A5;const D5=function(e){switch(e){case"daterange":case"datetimerange":return m5;case"monthrange":return T5;case"yearrange":return L5;default:return JF}};var M2={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(pl,function(){return function(n,a){var o=a.prototype,l=o.format;o.format=function(s){var r=this,u=this.$locale();if(!this.isValid())return l.bind(this)(s);var c=this.$utils(),d=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(f){switch(f){case"Q":return Math.ceil((r.$M+1)/3);case"Do":return u.ordinal(r.$D);case"gggg":return r.weekYear();case"GGGG":return r.isoWeekYear();case"wo":return u.ordinal(r.week(),"W");case"w":case"ww":return c.s(r.week(),f==="w"?1:2,"0");case"W":case"WW":return c.s(r.isoWeek(),f==="W"?1:2,"0");case"k":case"kk":return c.s(String(r.$H===0?24:r.$H),f==="k"?1:2,"0");case"X":return Math.floor(r.$d.getTime()/1e3);case"x":return r.$d.getTime();case"z":return"["+r.offsetName()+"]";case"zzz":return"["+r.offsetName("long")+"]";default:return f}});return l.bind(this)(d)}}})})(M2);var V5=M2.exports;const B5=vl(V5);var R2={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(pl,function(){var n="week",a="year";return function(o,l,s){var r=l.prototype;r.week=function(u){if(u===void 0&&(u=null),u!==null)return this.add(7*(u-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var d=s(this).startOf(a).add(1,a).date(c),f=s(this).endOf(n);if(d.isBefore(f))return 1}var p=s(this).startOf(a).date(c).startOf(n).subtract(1,"millisecond"),g=this.diff(p,n,!0);return g<0?s(this).startOf("week").week():Math.ceil(g)},r.weeks=function(u){return u===void 0&&(u=null),this.week(u)}}})})(R2);var F5=R2.exports;const z5=vl(F5);var I2={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(pl,function(){return function(n,a){a.prototype.weekYear=function(){var o=this.month(),l=this.week(),s=this.year();return l===1&&o===11?s+1:o===0&&l>=52?s-1:s}}})})(I2);var H5=I2.exports;const K5=vl(H5);var _2={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(pl,function(){return function(n,a,o){a.prototype.dayOfYear=function(l){var s=Math.round((o(this).startOf("day")-o(this).startOf("year"))/864e5)+1;return l==null?s:this.add(l-s,"day")}}})})(_2);var W5=_2.exports;const j5=vl(W5);var P2={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(pl,function(){return function(n,a){a.prototype.isSameOrAfter=function(o,l){return this.isSame(o,l)||this.isAfter(o,l)}}})})(P2);var U5=P2.exports;const Y5=vl(U5);var A2={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(pl,function(){return function(n,a){a.prototype.isSameOrBefore=function(o,l){return this.isSame(o,l)||this.isBefore(o,l)}}})})(A2);var q5=A2.exports;const G5=vl(q5);function X5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ht(e)}st.extend(qS);st.extend(B5);st.extend(Dh);st.extend(z5);st.extend(K5);st.extend(j5);st.extend(Y5);st.extend(G5);var Z5=ie({name:"ElDatePickerPanel",install:null,inheritAttrs:!1,props:kF,emits:[at,"calendar-change","panel-change","visible-change","clear"],setup(e,{slots:t,emit:n,attrs:a}){const o=he("picker-panel");xt(_e(Xa,void 0))&&bt(Xa,{props:Rt({...Nn(e)})}),bt(Kh,{slots:t,pickerNs:o});const{parsedValue:l,onCalendarChange:s,onPanelChange:r,onSetPickerOption:u,onPick:c}=_e(IS,()=>VS(e,n),!0);return()=>J(D5(e.type),pt(su(a,"onPick"),e,{parsedValue:l.value,"onSet-picker-option":u,"onCalendar-change":s,"onPanel-change":r,onClear:()=>n("clear"),onPick:c}),X5(t)?t:{default:()=>[t]})}});const L2=rt(Z5),J5=Se({...Lh,type:{type:X(String),default:"date"}});function Q5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ht(e)}var ez=ie({name:"ElDatePicker",install:null,props:J5,emits:[at],setup(e,{expose:t,emit:n,slots:a}){bt(Su,S(()=>!e.format)),bt(Ph,Rt(Lt(e,"popperOptions")));const o=A();t({focus:()=>{var s;(s=o.value)==null||s.focus()},blur:()=>{var s;(s=o.value)==null||s.blur()},handleOpen:()=>{var s;(s=o.value)==null||s.handleOpen()},handleClose:()=>{var s;(s=o.value)==null||s.handleClose()}});const l=s=>{n(at,s)};return()=>{const s=e.format??(P6[e.type]||Wo);return J(BS,pt(e,{format:s,type:e.type,ref:o,"onUpdate:modelValue":l}),{default:r=>J(L2,pt({disabled:e.disabled,editable:e.editable,border:!1},r),Q5(a)?a:{default:()=>[a]}),"range-separator":a["range-separator"]})}}});const tz=rt(ez),nz=Se({border:Boolean,column:{type:Number,default:3},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},size:Sn,title:{type:String,default:""},extra:{type:String,default:""},labelWidth:{type:[String,Number]}}),D2="ElDescriptionsItem",az=Se({label:{type:String,default:""},span:{type:Number,default:1},rowspan:{type:Number,default:1},width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},labelWidth:{type:[String,Number]},align:{type:String,values:bg,default:"left"},labelAlign:{type:String,values:bg},className:{type:String,default:""},labelClassName:{type:String,default:""}}),V2=ie({name:D2,props:az}),Gh=Symbol("elDescriptions"),oz=Se({row:{type:X(Array),default:()=>[]}});var qr=ie({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup(){return{descriptions:_e(Gh,{})}},render(){var h;const e=K_(this.cell),t=(((h=this.cell)==null?void 0:h.dirs)||[]).map(m=>{const{dir:y,arg:b,modifiers:w,value:C}=m;return[y,C,b,w]}),{border:n,direction:a}=this.descriptions,o=a==="vertical",l=()=>{var m,y,b;return((b=(y=(m=this.cell)==null?void 0:m.children)==null?void 0:y.label)==null?void 0:b.call(y))||e.label},s=()=>{var m,y,b;return(b=(y=(m=this.cell)==null?void 0:m.children)==null?void 0:y.default)==null?void 0:b.call(y)},r=e.span,u=e.rowspan,c=e.align?`is-${e.align}`:"",d=e.labelAlign?`is-${e.labelAlign}`:c,f=e.className,p=e.labelClassName,g={width:an(this.type==="label"?e.labelWidth??this.descriptions.labelWidth??e.width:e.width),minWidth:an(e.minWidth)},v=he("descriptions");switch(this.type){case"label":return dt(Ye(this.tag,{style:g,class:[v.e("cell"),v.e("label"),v.is("bordered-label",n),v.is("vertical-label",o),d,p],colSpan:o?r:1,rowspan:o?1:u},l()),t);case"content":return dt(Ye(this.tag,{style:g,class:[v.e("cell"),v.e("content"),v.is("bordered-content",n),v.is("vertical-content",o),c,f],colSpan:o?r:r*2-1,rowspan:o?u*2-1:u},s()),t);default:{const m=l(),y={},b=an(e.labelWidth??this.descriptions.labelWidth);return b&&(y.width=b,y.display="inline-block"),dt(Ye("td",{style:g,class:[v.e("cell"),c],colSpan:r,rowspan:u},[hn(m)?void 0:Ye("span",{style:y,class:[v.e("label"),p]},m),Ye("span",{class:[v.e("content"),f]},s())]),t)}}}});const lz={key:1};var sz=ie({name:"ElDescriptionsRow",__name:"descriptions-row",props:oz,setup(e){const t=_e(Gh,{});return(n,a)=>i(t).direction==="vertical"?(x(),B(He,{key:0},[j("tr",null,[(x(!0),B(He,null,Ct(e.row,(o,l)=>(x(),re(i(qr),{key:`tr1-${l}`,cell:o,tag:"th",type:"label"},null,8,["cell"]))),128))]),j("tr",null,[(x(!0),B(He,null,Ct(e.row,(o,l)=>(x(),re(i(qr),{key:`tr2-${l}`,cell:o,tag:"td",type:"content"},null,8,["cell"]))),128))])],64)):(x(),B("tr",lz,[(x(!0),B(He,null,Ct(e.row,(o,l)=>(x(),B(He,{key:`tr3-${l}`},[i(t).border?(x(),B(He,{key:0},[J(i(qr),{cell:o,tag:"td",type:"label"},null,8,["cell"]),J(i(qr),{cell:o,tag:"td",type:"content"},null,8,["cell"])],64)):(x(),re(i(qr),{key:1,cell:o,tag:"td",type:"both"},null,8,["cell"]))],64))),128))]))}}),rz=sz,iz=ie({name:"ElDescriptions",__name:"description",props:nz,setup(e){const t=e,n=he("descriptions"),a=bn(),o=fn();bt(Gh,t);const l=S(()=>[n.b(),n.m(a.value)]),s=(u,c,d,f=!1)=>(u.props||(u.props={}),c>d&&(u.props.span=d),f&&(u.props.span=c),u),r=()=>{if(!o.default)return[];const u=wa(o.default()).filter(v=>{var h;return((h=v==null?void 0:v.type)==null?void 0:h.name)===D2}),c=[];let d=[],f=t.column,p=0;const g=[];return u.forEach((v,h)=>{var w,C,k;const m=((w=v.props)==null?void 0:w.span)||1,y=((C=v.props)==null?void 0:C.rowspan)||1,b=c.length;if(g[b]||(g[b]=0),y>1)for(let E=1;E0&&(f-=g[b],g[b]=0),hf?f:m),h===u.length-1){const E=t.column-p%t.column;d.push(s(v,E,f,!0)),c.push(d);return}m(x(),B("div",{class:M(l.value)},[e.title||e.extra||u.$slots.title||u.$slots.extra?(x(),B("div",{key:0,class:M(i(n).e("header"))},[j("div",{class:M(i(n).e("title"))},[ae(u.$slots,"title",{},()=>[St(ke(e.title),1)])],2),j("div",{class:M(i(n).e("extra"))},[ae(u.$slots,"extra",{},()=>[St(ke(e.extra),1)])],2)],2)):le("v-if",!0),j("div",{class:M(i(n).e("body"))},[j("table",{class:M([i(n).e("table"),i(n).is("bordered",e.border)])},[j("tbody",null,[(x(!0),B(He,null,Ct(r(),(d,f)=>(x(),re(rz,{key:f,row:d},null,8,["row"]))),128))])],2)],2)],2))}}),uz=iz;const cz=rt(uz,{DescriptionsItem:V2}),dz=Qt(V2),B2=Se({center:Boolean,alignCenter:{type:Boolean,default:void 0},closeIcon:{type:Ft},draggable:{type:Boolean,default:void 0},overflow:{type:Boolean,default:void 0},fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),fz={close:()=>!0},F2=Se({...B2,appendToBody:Boolean,appendTo:{type:uu.to.type,default:"body"},beforeClose:{type:X(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},modalPenetrable:Boolean,openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"},transition:{type:X([String,Object]),default:void 0}}),z2={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[at]:e=>Vt(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},pz=Se({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:X([String,Array,Object])},zIndex:{type:X([String,Number])}}),vz={click:e=>e instanceof MouseEvent},hz="overlay";var mz=ie({name:"ElOverlay",props:pz,emits:vz,setup(e,{slots:t,emit:n}){const a=he(hz),o=u=>{n("click",u)},{onClick:l,onMousedown:s,onMouseup:r}=gh(e.customMaskEvent?void 0:o);return()=>e.mask?J("div",{class:[a.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:l,onMousedown:s,onMouseup:r},[ae(t,"default")],Va.STYLE|Va.CLASS|Va.PROPS,["onClick","onMouseup","onMousedown"]):Ye("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[ae(t,"default")])}});const Xh=mz,H2=Symbol("dialogInjectionKey"),Af="dialog-fade",gz="ElDialog",K2=(e,t)=>{const n=vt().emit,{nextZIndex:a}=fu();let o="";const l=Fn(),s=Fn(),r=A(!1),u=A(!1),c=A(!1),d=A(e.zIndex??a()),f=A(!1);let p,g;const v=fl(),h=S(()=>{var K;return((K=v.value)==null?void 0:K.namespace)??pi}),m=S(()=>{var K;return(K=v.value)==null?void 0:K.dialog}),y=S(()=>{const K={},q=`--${h.value}-dialog`;if(!e.fullscreen){e.top&&(K[`${q}-margin-top`]=e.top);const Q=an(e.width);Q&&(K[`${q}-width`]=Q)}return K}),b=S(()=>{var K;return(e.draggable??((K=m.value)==null?void 0:K.draggable)??!1)&&!e.fullscreen}),w=S(()=>{var K;return e.alignCenter??((K=m.value)==null?void 0:K.alignCenter)??!1}),C=S(()=>{var K;return e.overflow??((K=m.value)==null?void 0:K.overflow)??!1}),k=S(()=>e.modalPenetrable&&!e.modal&&!e.fullscreen),E=S(()=>w.value?{display:"flex"}:{}),T=S(()=>{var Q;const K=e.transition??((Q=m.value)==null?void 0:Q.transition)??Af,q={name:K,onAfterEnter:$,onBeforeLeave:O,onAfterLeave:N};if(ot(K)){const ee={...K},ue=(te,de)=>se=>{be(te)?te.forEach(Y=>{ze(Y)&&Y(se)}):ze(te)&&te(se),de()};return ee.onAfterEnter=ue(ee.onAfterEnter,$),ee.onBeforeLeave=ue(ee.onBeforeLeave,O),ee.onAfterLeave=ue(ee.onAfterLeave,N),ee.name||(ee.name=Af,ft(gz,`transition.name is missing when using object syntax, fallback to '${Af}'`)),ee}return q});function $(){n("opened")}function N(){n("closed"),n(at,!1),e.destroyOnClose&&(c.value=!1),f.value=!1}function O(){f.value=!0,n("close")}function _(){g==null||g(),p==null||p(),e.openDelay&&e.openDelay>0?{stop:p}=dr(()=>U(),e.openDelay):U()}function P(){p==null||p(),g==null||g(),e.closeDelay&&e.closeDelay>0?{stop:g}=dr(()=>F(),e.closeDelay):F()}function D(){function K(q){q||(u.value=!0,r.value=!1)}e.beforeClose?e.beforeClose(K):P()}function W(){e.closeOnClickModal&&D()}function U(){Mt&&(r.value=!0)}function F(){r.value=!1}function R(){n("openAutoFocus")}function I(){n("closeAutoFocus")}function L(K){var q;((q=K.detail)==null?void 0:q.focusReason)==="pointer"&&K.preventDefault()}e.lockScroll&&Od(r);function z(){e.closeOnPressEscape&&D()}function H(){!r.value||!k.value||e.zIndex!==void 0||(d.value=a())}return fe(()=>e.zIndex,()=>{d.value=e.zIndex??a()}),fe(()=>e.modelValue,K=>{K?(u.value=!1,f.value=!1,_(),c.value=!0,d.value=e.zIndex??a(),Ae(()=>{n("open"),t.value&&(t.value.parentElement.scrollTop=0,t.value.parentElement.scrollLeft=0,t.value.scrollTop=0)})):r.value&&P()}),fe(()=>e.fullscreen,K=>{t.value&&(K?(o=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=o)}),mt(()=>{e.modelValue&&(r.value=!0,c.value=!0,_())}),{afterEnter:$,afterLeave:N,beforeLeave:O,handleClose:D,onModalClick:W,close:P,doClose:F,onOpenAutoFocus:R,onCloseAutoFocus:I,onCloseRequested:z,onFocusoutPrevented:L,bringToFront:H,titleId:l,bodyId:s,closed:u,style:y,overlayDialogStyle:E,rendered:c,visible:r,zIndex:d,transitionConfig:T,_draggable:b,_alignCenter:w,_overflow:C,closing:f,penetrable:k}},Zh=(...e)=>t=>{e.forEach(n=>{n.value=t})},yz=["aria-level"],bz=["aria-label"],wz=["id"];var Cz=ie({name:"ElDialogContent",__name:"dialog-content",props:B2,emits:fz,setup(e,{expose:t}){const{t:n}=Et(),{Close:a}=lS,o=e,{dialogRef:l,headerRef:s,bodyId:r,ns:u,style:c}=_e(H2),{focusTrapRef:d}=_e(mS),f=Zh(d,l),p=S(()=>!!o.draggable),{resetPosition:g,updatePosition:v,isDragging:h}=mC(l,s,p,S(()=>!!o.overflow)),m=S(()=>[u.b(),u.is("fullscreen",o.fullscreen),u.is("draggable",p.value),u.is("dragging",h.value),u.is("align-center",!!o.alignCenter),{[u.m("center")]:o.center}]);return t({resetPosition:g,updatePosition:v}),(y,b)=>(x(),B("div",{ref:i(f),class:M(m.value),style:je(i(c)),tabindex:"-1"},[j("header",{ref_key:"headerRef",ref:s,class:M([i(u).e("header"),e.headerClass,{"show-close":e.showClose}])},[ae(y.$slots,"header",{},()=>[j("span",{role:"heading","aria-level":e.ariaLevel,class:M(i(u).e("title"))},ke(e.title),11,yz)]),e.showClose?(x(),B("button",{key:0,"aria-label":i(n)("el.dialog.close"),class:M(i(u).e("headerbtn")),type:"button",onClick:b[0]||(b[0]=w=>y.$emit("close"))},[J(i(Be),{class:M(i(u).e("close"))},{default:ne(()=>[(x(),re(ct(e.closeIcon||i(a))))]),_:1},8,["class"])],10,bz)):le("v-if",!0)],2),j("div",{id:i(r),class:M([i(u).e("body"),e.bodyClass])},[ae(y.$slots,"default")],10,wz),y.$slots.footer?(x(),B("footer",{key:0,class:M([i(u).e("footer"),e.footerClass])},[ae(y.$slots,"footer")],2)):le("v-if",!0)],6))}}),Sz=Cz;const kz=["aria-label","aria-labelledby","aria-describedby"];var Ez=ie({name:"ElDialog",inheritAttrs:!1,__name:"dialog",props:F2,emits:z2,setup(e,{expose:t}){const n=e,a=fn();bo({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},S(()=>!!a.title));const o=he("dialog"),l=A(),s=A(),r=A(),{visible:u,titleId:c,bodyId:d,style:f,overlayDialogStyle:p,rendered:g,transitionConfig:v,zIndex:h,_draggable:m,_alignCenter:y,_overflow:b,penetrable:w,handleClose:C,onModalClick:k,onOpenAutoFocus:E,onCloseAutoFocus:T,onCloseRequested:$,onFocusoutPrevented:N,bringToFront:O,closing:_}=K2(n,l);bt(H2,{dialogRef:l,headerRef:s,bodyId:d,ns:o,rendered:g,style:f});const P=gh(k);return t({visible:u,dialogContentRef:r,resetPosition:()=>{var W;(W=r.value)==null||W.resetPosition()},handleClose:C}),(W,U)=>(x(),re(i(_r),{to:e.appendTo,disabled:e.appendTo!=="body"?!1:!e.appendToBody},{default:ne(()=>[J(Bn,pt(i(v),{persisted:""}),{default:ne(()=>[dt(J(i(Xh),{"custom-mask-event":"",mask:e.modal,"overlay-class":[e.modalClass??"",`${i(o).namespace.value}-modal-dialog`,i(o).is("penetrable",i(w))],"z-index":i(h)},{default:ne(()=>[j("div",{role:"dialog","aria-modal":"true","aria-label":e.title||void 0,"aria-labelledby":e.title?void 0:i(c),"aria-describedby":i(d),class:M([`${i(o).namespace.value}-overlay-dialog`,i(o).is("closing",i(_))]),style:je(i(p)),onClick:U[0]||(U[0]=(...F)=>i(P).onClick&&i(P).onClick(...F)),onMousedown:U[1]||(U[1]=(...F)=>i(P).onMousedown&&i(P).onMousedown(...F)),onMouseup:U[2]||(U[2]=(...F)=>i(P).onMouseup&&i(P).onMouseup(...F))},[J(i(Pr),{loop:"",trapped:i(u),"focus-start-el":"container",onFocusAfterTrapped:i(E),onFocusAfterReleased:i(T),onFocusoutPrevented:i(N),onReleaseRequested:i($)},{default:ne(()=>[i(g)?(x(),re(Sz,pt({key:0,ref_key:"dialogContentRef",ref:r},W.$attrs,{center:e.center,"align-center":i(y),"close-icon":e.closeIcon,draggable:i(m),overflow:i(b),fullscreen:e.fullscreen,"header-class":e.headerClass,"body-class":e.bodyClass,"footer-class":e.footerClass,"show-close":e.showClose,title:e.title,"aria-level":e.headerAriaLevel,onClose:i(C),onMousedown:i(O)}),ra({header:ne(()=>[W.$slots.title?ae(W.$slots,"title",{key:1}):ae(W.$slots,"header",{key:0,close:i(C),titleId:i(c),titleClass:i(o).e("title")})]),default:ne(()=>[ae(W.$slots,"default")]),_:2},[W.$slots.footer?{name:"footer",fn:ne(()=>[ae(W.$slots,"footer")]),key:"0"}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose","onMousedown"])):le("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,kz)]),_:3},8,["mask","overlay-class","z-index"]),[[Nt,i(u)]])]),_:3},16)]),_:3},8,["to","disabled"]))}}),xz=Ez;const Tz=rt(xz),$z=Se({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:X(String),default:"solid"}});var Oz=ie({name:"ElDivider",__name:"divider",props:$z,setup(e){const t=e,n=he("divider"),a=S(()=>n.cssVar({"border-style":t.borderStyle}));return(o,l)=>(x(),B("div",{class:M([i(n).b(),i(n).m(e.direction)]),style:je(a.value),role:"separator"},[o.$slots.default&&e.direction!=="vertical"?(x(),B("div",{key:0,class:M([i(n).e("text"),i(n).is(e.contentPosition)])},[ae(o.$slots,"default")],2)):le("v-if",!0)],6))}}),Nz=Oz;const W2=rt(Nz),Mz=Se({...F2,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},resizable:Boolean,size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),Rz={...z2,"resize-start":(e,t)=>e instanceof MouseEvent&&typeof t=="number",resize:(e,t)=>e instanceof MouseEvent&&typeof t=="number","resize-end":(e,t)=>e instanceof MouseEvent&&typeof t=="number"};function Iz(e,t,n){const{width:a,height:o}=Hv(),l=S(()=>["ltr","rtl"].includes(e.direction)),s=S(()=>["ltr","ttb"].includes(e.direction)?1:-1),r=S(()=>l.value?a.value:o.value),u=S(()=>uw(c.value+s.value*d.value,4,r.value)),c=A(0),d=A(0),f=A(!1),p=A(!1);let g=[],v=[];const h=()=>{var k;const C=(k=t.value)==null?void 0:k.closest('[aria-modal="true"]');return C?l.value?C.offsetWidth:C.offsetHeight:100};fe(()=>[e.size,e.resizable],()=>{p.value=!1,c.value=0,d.value=0,b()});const m=C=>{e.resizable&&(p.value||(c.value=h(),p.value=!0),g=[C.pageX,C.pageY],f.value=!0,n("resize-start",C,c.value),v.push(At(window,"mouseup",b),At(window,"mousemove",y)))},y=C=>{const{pageX:k,pageY:E}=C,T=k-g[0],$=E-g[1];d.value=l.value?T:$,n("resize",C,u.value)},b=C=>{f.value&&(g=[],c.value=u.value,d.value=0,f.value=!1,v.forEach(k=>k==null?void 0:k()),v=[],C&&n("resize-end",C,c.value))},w=At(t,"mousedown",m);return Pt(()=>{w(),b()}),{size:S(()=>p.value?`${u.value}px`:an(e.size)),isResizing:f,isHorizontal:l}}const _z=["aria-label","aria-labelledby","aria-describedby"],Pz=["id","aria-level"],Az=["aria-label"],Lz=["id"];var Dz=ie({name:"ElDrawer",inheritAttrs:!1,__name:"drawer",props:Mz,emits:Rz,setup(e,{expose:t,emit:n}){const a=e,o=n,l=fn();bo({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},S(()=>!!l.title));const s=A(),r=A(),u=A(),c=he("drawer"),{t:d}=Et(),{afterEnter:f,afterLeave:p,beforeLeave:g,visible:v,rendered:h,titleId:m,bodyId:y,zIndex:b,onModalClick:w,onOpenAutoFocus:C,onCloseAutoFocus:k,onFocusoutPrevented:E,onCloseRequested:T,handleClose:$}=K2(a,s),{isHorizontal:N,size:O,isResizing:_}=Iz(a,u,o),P=S(()=>a.modalPenetrable&&!a.modal);return t({handleClose:$,afterEnter:f,afterLeave:p}),(D,W)=>(x(),re(i(_r),{to:e.appendTo,disabled:e.appendTo!=="body"?!1:!e.appendToBody},{default:ne(()=>[J(Bn,{name:i(c).b("fade"),onAfterEnter:i(f),onAfterLeave:i(p),onBeforeLeave:i(g),persisted:""},{default:ne(()=>[dt(J(i(Xh),{mask:e.modal,"overlay-class":[i(c).is("drawer"),e.modalClass??"",`${i(c).namespace.value}-modal-drawer`,i(c).is("penetrable",P.value)],"z-index":i(b),onClick:i(w)},{default:ne(()=>[J(i(Pr),{loop:"",trapped:i(v),"focus-trap-el":s.value,"focus-start-el":r.value,onFocusAfterTrapped:i(C),onFocusAfterReleased:i(k),onFocusoutPrevented:i(E),onReleaseRequested:i(T)},{default:ne(()=>[j("div",pt({ref_key:"drawerRef",ref:s,"aria-modal":"true","aria-label":e.title||void 0,"aria-labelledby":e.title?void 0:i(m),"aria-describedby":i(y)},D.$attrs,{class:[i(c).b(),e.direction,i(v)&&"open",i(c).is("dragging",i(_))],style:{[i(N)?"width":"height"]:i(O)},role:"dialog",onClick:W[1]||(W[1]=Xe(()=>{},["stop"]))}),[j("span",{ref_key:"focusStartRef",ref:r,class:M(i(c).e("sr-focus")),tabindex:"-1"},null,2),e.withHeader?(x(),B("header",{key:0,class:M([i(c).e("header"),e.headerClass])},[D.$slots.title?ae(D.$slots,"title",{key:1},()=>[le(" DEPRECATED SLOT ")]):ae(D.$slots,"header",{key:0,close:i($),titleId:i(m),titleClass:i(c).e("title")},()=>[j("span",{id:i(m),role:"heading","aria-level":e.headerAriaLevel,class:M(i(c).e("title"))},ke(e.title),11,Pz)]),e.showClose?(x(),B("button",{key:2,"aria-label":i(d)("el.drawer.close"),class:M(i(c).e("close-btn")),type:"button",onClick:W[0]||(W[0]=(...U)=>i($)&&i($)(...U))},[J(i(Be),{class:M(i(c).e("close"))},{default:ne(()=>[J(i(La))]),_:1},8,["class"])],10,Az)):le("v-if",!0)],2)):le("v-if",!0),i(h)?(x(),B("div",{key:1,id:i(y),class:M([i(c).e("body"),e.bodyClass])},[ae(D.$slots,"default")],10,Lz)):le("v-if",!0),D.$slots.footer?(x(),B("div",{key:2,class:M([i(c).e("footer"),e.footerClass])},[ae(D.$slots,"footer")],2)):le("v-if",!0),e.resizable?(x(),B("div",{key:3,ref_key:"draggerRef",ref:u,style:je({zIndex:i(b)}),class:M(i(c).e("dragger"))},null,6)):le("v-if",!0)],16,_z)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[Nt,i(v)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}}),Vz=Dz;const Bz=rt(Vz),uc=Se({trigger:{...ko.trigger,type:X([String,Array])},triggerKeys:{type:X(Array),default:()=>[Ce.enter,Ce.numpadEnter,Ce.space,Ce.down]},virtualTriggering:ko.virtualTriggering,virtualRef:ko.virtualRef,effect:{...Bt.effect,default:"light"},type:{type:X(String)},placement:{type:X(String),default:"bottom"},popperOptions:{type:X(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:X([Number,String]),default:0},maxHeight:{type:X([Number,String]),default:""},popperClass:Bt.popperClass,popperStyle:Bt.popperStyle,disabled:Boolean,role:{type:String,values:sS,default:"menu"},buttonProps:{type:X(Object)},teleported:Bt.teleported,appendTo:Bt.appendTo,persistent:{type:Boolean,default:!0}}),j2=Se({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Ft}}),Fz=Se({onKeydown:{type:X(Function)}}),Kd=Symbol("elDropdown"),U2="elDropdown";var zz=ie({inheritAttrs:!1});function Hz(e,t,n,a,o,l){return ae(e.$slots,"default")}var Kz=kn(zz,[["render",Hz]]),Wz=ie({name:"ElCollectionItem",inheritAttrs:!1});function jz(e,t,n,a,o,l){return ae(e.$slots,"default")}var Uz=kn(Wz,[["render",jz]]);const Y2="data-el-collection-item",Yz=e=>{const t=`El${e}Collection`,n=`${t}Item`,a=Symbol(t),o=Symbol(n);return{COLLECTION_INJECTION_KEY:a,COLLECTION_ITEM_INJECTION_KEY:o,ElCollection:Object.assign({},Kz,{name:t,setup(){const l=A(),s=new Map;bt(a,{itemMap:s,getItems:()=>{const u=i(l);if(!u)return[];const c=Array.from(u.querySelectorAll(`[${Y2}]`));return[...s.values()].sort((d,f)=>c.indexOf(d.ref)-c.indexOf(f.ref))},collectionRef:l})}}),ElCollectionItem:Object.assign({},Uz,{name:n,setup(l,{attrs:s}){const r=A(),u=_e(a,void 0);bt(o,{collectionItemRef:r}),mt(()=>{const c=i(r);c&&u.itemMap.set(c,{ref:c,...s})}),Pt(()=>{const c=i(r);u.itemMap.delete(c)})}})}},qz=Se({style:{type:X([String,Array,Object])},currentTabId:{type:X(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:X(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:Gz,ElCollectionItem:Xz,COLLECTION_INJECTION_KEY:q2,COLLECTION_ITEM_INJECTION_KEY:Zz}=Yz("RovingFocusGroup"),Jh=Symbol("elRovingFocusGroup"),G2=Symbol("elRovingFocusGroupItem"),Jz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},Qz=(e,t)=>e,eH=(e,t,n)=>{const a=Qz(zt(e));return Jz[a]},tH=(e,t)=>e.map((n,a)=>e[(a+t)%e.length]),kb=e=>{const{activeElement:t}=document;for(const n of e)if(n===t||(n.focus(),t!==document.activeElement))return},Eb="currentTabIdChange",xb="rovingFocusGroup.entryFocus",nH={bubbles:!1,cancelable:!0};var aH=ie({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:qz,emits:[Eb,"entryFocus"],setup(e,{emit:t}){const n=A((e.currentTabId||e.defaultCurrentTabId)??null),a=A(!1),o=A(!1),l=A(),{getItems:s}=_e(q2,void 0),r=S(()=>[{outline:"none"},e.style]),u=h=>{t(Eb,h)},c=()=>{a.value=!0},d=xn(h=>{var m;(m=e.onMousedown)==null||m.call(e,h)},()=>{o.value=!0}),f=xn(h=>{var m;(m=e.onFocus)==null||m.call(e,h)},h=>{const m=!i(o),{target:y,currentTarget:b}=h;if(y===b&&m&&!i(a)){const w=new Event(xb,nH);if(b==null||b.dispatchEvent(w),!w.defaultPrevented){const C=s().filter(k=>k.focusable);kb([C.find(k=>k.active),C.find(k=>k.id===i(n)),...C].filter(Boolean).map(k=>k.ref))}}o.value=!1}),p=xn(h=>{var m;(m=e.onBlur)==null||m.call(e,h)},()=>{a.value=!1}),g=(...h)=>{t("entryFocus",...h)},v=h=>{const m=eH(h);if(m){h.preventDefault();let y=s().filter(b=>b.focusable).map(b=>b.ref);switch(m){case"last":y.reverse();break;case"prev":case"next":{m==="prev"&&y.reverse();const b=y.indexOf(h.currentTarget);y=e.loop?tH(y,b+1):y.slice(b+1);break}}Ae(()=>{kb(y)})}};bt(Jh,{currentTabbedId:ms(n),loop:Lt(e,"loop"),tabIndex:S(()=>i(a)?-1:0),rovingFocusGroupRef:l,rovingFocusGroupRootStyle:r,orientation:Lt(e,"orientation"),dir:Lt(e,"dir"),onItemFocus:u,onItemShiftTab:c,onBlur:p,onFocus:f,onMousedown:d,onKeydown:v}),fe(()=>e.currentTabId,h=>{n.value=h??null}),At(l,xb,g)}});function oH(e,t,n,a,o,l){return ae(e.$slots,"default")}var lH=kn(aH,[["render",oH]]),sH=ie({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:Gz,ElRovingFocusGroupImpl:lH}});function rH(e,t,n,a,o,l){const s=Ot("el-roving-focus-group-impl"),r=Ot("el-focus-group-collection");return x(),re(r,null,{default:ne(()=>[J(s,Yo(qo(e.$attrs)),{default:ne(()=>[ae(e.$slots,"default")]),_:3},16)]),_:3})}var iH=kn(sH,[["render",rH]]),uH=ie({components:{ElRovingFocusCollectionItem:Xz},props:{focusable:{type:Boolean,default:!0},active:Boolean},emits:["mousedown","focus","keydown"],setup(e,{emit:t}){const{currentTabbedId:n,onItemFocus:a,onItemShiftTab:o,onKeydown:l}=_e(Jh,void 0),s=Fn(),r=A(),u=xn(p=>{t("mousedown",p)},p=>{e.focusable?a(i(s)):p.preventDefault()}),c=xn(p=>{t("focus",p)},()=>{a(i(s))}),d=xn(p=>{t("keydown",p)},p=>{const{shiftKey:g,target:v,currentTarget:h}=p;if(zt(p)===Ce.tab&&g){o();return}v===h&&l(p)}),f=S(()=>n.value===i(s));return bt(G2,{rovingFocusGroupItemRef:r,tabIndex:S(()=>i(f)?0:-1),handleMousedown:u,handleFocus:c,handleKeydown:d}),{id:s,handleKeydown:d,handleFocus:c,handleMousedown:u}}});function cH(e,t,n,a,o,l){const s=Ot("el-roving-focus-collection-item");return x(),re(s,{id:e.id,focusable:e.focusable,active:e.active},{default:ne(()=>[ae(e.$slots,"default")]),_:3},8,["id","focusable","active"])}var dH=kn(uH,[["render",cH]]),fH=iH;const{ButtonGroup:pH}=$n;var vH=ie({name:"ElDropdown",components:{ElButton:$n,ElButtonGroup:pH,ElScrollbar:Ga,ElTooltip:_n,ElRovingFocusGroup:fH,ElOnlyChild:cS,ElIcon:Be,ArrowDown:Io},props:uc,emits:["visible-change","click","command"],setup(e,{emit:t}){const n=vt(),a=he("dropdown"),{t:o}=Et(),l=A(),s=A(),r=A(),u=A(),c=A(null),d=A(null),f=A(!1),p=S(()=>({maxHeight:an(e.maxHeight)})),g=S(()=>[a.m(C.value)]),v=S(()=>Tn(e.trigger)),h=Fn().value,m=S(()=>e.id||h);function y(){var D;(D=r.value)==null||D.onClose(void 0,0)}function b(){var D;(D=r.value)==null||D.onClose()}function w(){var D;(D=r.value)==null||D.onOpen()}const C=bn();function k(...D){t("command",...D)}function E(){}function T(){const D=i(u);v.value.includes("hover")&&(D==null||D.focus({preventScroll:!0})),d.value=null}function $(D){d.value=D}function N(){t("visible-change",!0)}function O(D){var W;f.value=(D==null?void 0:D.type)==="keydown",(W=u.value)==null||W.focus()}function _(){t("visible-change",!1)}return bt(Kd,{contentRef:u,role:S(()=>e.role),triggerId:m,isUsingKeyboard:f,onItemEnter:E,onItemLeave:T,handleClose:b}),bt(U2,{instance:n,dropdownSize:C,handleClick:y,commandHandler:k,trigger:Lt(e,"trigger"),hideOnClick:Lt(e,"hideOnClick")}),{t:o,ns:a,scrollbar:c,wrapStyle:p,dropdownTriggerKls:g,dropdownSize:C,triggerId:m,currentTabId:d,handleCurrentTabIdChange:$,handlerMainButtonClick:D=>{t("click",D)},handleClose:b,handleOpen:w,handleBeforeShowTooltip:N,handleShowTooltip:O,handleBeforeHideTooltip:_,popperRef:r,contentRef:u,triggeringElementRef:l,referenceElementRef:s}}});function hH(e,t,n,a,o,l){const s=Ot("el-roving-focus-group"),r=Ot("el-scrollbar"),u=Ot("el-only-child"),c=Ot("el-tooltip"),d=Ot("el-button"),f=Ot("arrow-down"),p=Ot("el-icon"),g=Ot("el-button-group");return x(),B("div",{class:M([e.ns.b(),e.ns.is("disabled",e.disabled)])},[J(c,{ref:"popperRef",role:e.role,effect:e.effect,"fallback-placements":["bottom","top"],"popper-options":e.popperOptions,"gpu-acceleration":!1,placement:e.placement,"popper-class":[e.ns.e("popper"),e.popperClass],"popper-style":e.popperStyle,trigger:e.trigger,"trigger-keys":e.triggerKeys,"trigger-target-el":e.contentRef,"show-arrow":e.showArrow,"show-after":e.trigger==="hover"?e.showTimeout:0,"hide-after":e.trigger==="hover"?e.hideTimeout:0,"virtual-ref":e.virtualRef??e.triggeringElementRef,"virtual-triggering":e.virtualTriggering||e.splitButton,disabled:e.disabled,transition:`${e.ns.namespace.value}-zoom-in-top`,teleported:e.teleported,"append-to":e.appendTo,pure:"","focus-on-target":"",persistent:e.persistent,onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onBeforeHide:e.handleBeforeHideTooltip},ra({content:ne(()=>[J(r,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:ne(()=>[J(s,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange},{default:ne(()=>[ae(e.$slots,"dropdown")]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange"])]),_:3},8,["wrap-style","view-class"])]),_:2},[e.splitButton?void 0:{name:"default",fn:ne(()=>[J(u,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:ne(()=>[ae(e.$slots,"default")]),_:3},8,["id","tabindex"])]),key:"0"}]),1032,["role","effect","popper-options","placement","popper-class","popper-style","trigger","trigger-keys","trigger-target-el","show-arrow","show-after","hide-after","virtual-ref","virtual-triggering","disabled","transition","teleported","append-to","persistent","onBeforeShow","onShow","onBeforeHide"]),e.splitButton?(x(),re(g,{key:0},{default:ne(()=>[J(d,pt({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:ne(()=>[ae(e.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),J(d,pt({id:e.triggerId,ref:"triggeringElementRef"},e.buttonProps,{role:"button",size:e.dropdownSize,type:e.type,class:e.ns.e("caret-button"),disabled:e.disabled,tabindex:e.tabindex,"aria-label":e.t("el.dropdown.toggleDropdown")}),{default:ne(()=>[J(p,{class:M(e.ns.e("icon"))},{default:ne(()=>[J(f)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):le("v-if",!0)],2)}var mH=kn(vH,[["render",hH]]),gH=ie({name:"DropdownItemImpl",components:{ElIcon:Be},props:j2,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:t}){const n=he("dropdown"),{role:a}=_e(Kd,void 0),{collectionItemRef:o}=_e(Zz,void 0),{rovingFocusGroupItemRef:l,tabIndex:s,handleFocus:r,handleKeydown:u,handleMousedown:c}=_e(G2,void 0),d=Zh(o,l),f=S(()=>a.value==="menu"?"menuitem":a.value==="navigation"?"link":"button"),p=xn(g=>{const v=zt(g);if([Ce.enter,Ce.numpadEnter,Ce.space].includes(v))return g.preventDefault(),g.stopImmediatePropagation(),t("clickimpl",g),!0},u);return{ns:n,itemRef:d,dataset:{[Y2]:""},role:f,tabIndex:s,handleFocus:r,handleKeydown:p,handleMousedown:c}}});const yH=["aria-disabled","tabindex","role"];function bH(e,t,n,a,o,l){const s=Ot("el-icon");return x(),B(He,null,[e.divided?(x(),B("li",{key:0,role:"separator",class:M(e.ns.bem("menu","item","divided"))},null,2)):le("v-if",!0),j("li",pt({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:t[0]||(t[0]=r=>e.$emit("clickimpl",r)),onFocus:t[1]||(t[1]=(...r)=>e.handleFocus&&e.handleFocus(...r)),onKeydown:t[2]||(t[2]=Xe((...r)=>e.handleKeydown&&e.handleKeydown(...r),["self"])),onMousedown:t[3]||(t[3]=(...r)=>e.handleMousedown&&e.handleMousedown(...r)),onPointermove:t[4]||(t[4]=r=>e.$emit("pointermove",r)),onPointerleave:t[5]||(t[5]=r=>e.$emit("pointerleave",r))}),[e.icon||e.$slots.icon?(x(),re(s,{key:0},{default:ne(()=>[ae(e.$slots,"icon",{},()=>[(x(),re(ct(e.icon)))])]),_:3})):le("v-if",!0),ae(e.$slots,"default")],16,yH)],64)}var wH=kn(gH,[["render",bH]]);const X2=()=>{const e=_e(U2,{});return{elDropdown:e,_elDropdownSize:S(()=>e==null?void 0:e.dropdownSize)}};var CH=ie({name:"ElDropdownItem",components:{ElRovingFocusItem:dH,ElDropdownItemImpl:wH},inheritAttrs:!1,props:j2,emits:["pointermove","pointerleave","click"],setup(e,{emit:t,attrs:n}){const{elDropdown:a}=X2(),o=vt(),{onItemEnter:l,onItemLeave:s}=_e(Kd,void 0),r=xn(c=>(t("pointermove",c),c.defaultPrevented),ty(c=>{if(e.disabled){s(c);return}const d=c.currentTarget;d===document.activeElement||d.contains(document.activeElement)||(l(c),c.defaultPrevented||d==null||d.focus({preventScroll:!0}))})),u=xn(c=>(t("pointerleave",c),c.defaultPrevented),ty(s));return{handleClick:xn(c=>{if(!e.disabled)return t("click",c),c.type!=="keydown"&&c.defaultPrevented},c=>{var d,f,p;if(e.disabled){c.stopImmediatePropagation();return}(d=a==null?void 0:a.hideOnClick)!=null&&d.value&&((f=a.handleClick)==null||f.call(a)),(p=a.commandHandler)==null||p.call(a,e.command,o,c)}),handlePointerMove:r,handlePointerLeave:u,propsAndAttrs:S(()=>({...e,...n}))}}});function SH(e,t,n,a,o,l){const s=Ot("el-dropdown-item-impl"),r=Ot("el-roving-focus-item");return x(),re(r,{focusable:!e.disabled},{default:ne(()=>[J(s,pt(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),ra({default:ne(()=>[ae(e.$slots,"default")]),_:2},[e.$slots.icon?{name:"icon",fn:ne(()=>[ae(e.$slots,"icon")]),key:"0"}:void 0]),1040,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])}var Z2=kn(CH,[["render",SH]]),kH=ie({name:"ElDropdownMenu",props:Fz,setup(e){const t=he("dropdown"),{_elDropdownSize:n}=X2(),a=n.value,{contentRef:o,role:l,triggerId:s,isUsingKeyboard:r,handleClose:u}=_e(Kd,void 0),{rovingFocusGroupRef:c,rovingFocusGroupRootStyle:d,onBlur:f,onFocus:p,onKeydown:g,onMousedown:v}=_e(Jh,void 0),{collectionRef:h}=_e(q2,void 0),m=S(()=>[t.b("menu"),t.bm("menu",a==null?void 0:a.value)]),y=Zh(o,c,h),b=xn(C=>{var k;(k=e.onKeydown)==null||k.call(e,C)},C=>{const{currentTarget:k,target:E}=C,T=zt(C);if(k.contains(E),Ce.tab===T)return u();g(C)});function w(C){r.value&&p(C)}return{size:a,rovingFocusGroupRootStyle:d,dropdownKls:m,role:l,triggerId:s,dropdownListWrapperRef:y,handleKeydown:b,onBlur:f,handleFocus:w,onMousedown:v}}});const EH=["role","aria-labelledby"];function xH(e,t,n,a,o,l){return x(),B("ul",{ref:e.dropdownListWrapperRef,class:M(e.dropdownKls),style:je(e.rovingFocusGroupRootStyle),tabindex:-1,role:e.role,"aria-labelledby":e.triggerId,onFocusin:t[0]||(t[0]=(...s)=>e.handleFocus&&e.handleFocus(...s)),onFocusout:t[1]||(t[1]=(...s)=>e.onBlur&&e.onBlur(...s)),onKeydown:t[2]||(t[2]=Xe((...s)=>e.handleKeydown&&e.handleKeydown(...s),["self"])),onMousedown:t[3]||(t[3]=Xe((...s)=>e.onMousedown&&e.onMousedown(...s),["self"]))},[ae(e.$slots,"default")],46,EH)}var J2=kn(kH,[["render",xH]]);const TH=rt(mH,{DropdownItem:Z2,DropdownMenu:J2}),$H=Qt(Z2),OH=Qt(J2),NH=Se({image:{type:String,default:""},imageSize:Number,description:{type:String,default:""}}),MH={viewBox:"0 0 79 86",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},RH=["id"],IH=["stop-color"],_H=["stop-color"],PH=["id"],AH=["stop-color"],LH=["stop-color"],DH=["id"],VH={stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},BH={transform:"translate(-1268.000000, -535.000000)"},FH={transform:"translate(1268.000000, 535.000000)"},zH=["fill"],HH=["fill"],KH={transform:"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"},WH=["fill"],jH=["fill"],UH=["fill"],YH=["fill"],qH=["fill"],GH={transform:"translate(53.000000, 45.000000)"},XH=["fill","xlink:href"],ZH=["fill","mask"],JH=["fill"];var QH=ie({name:"ImgEmpty",__name:"img-empty",setup(e){const t=he("empty"),n=Fn();return(a,o)=>(x(),B("svg",MH,[j("defs",null,[j("linearGradient",{id:`linearGradient-1-${i(n)}`,x1:"38.8503086%",y1:"0%",x2:"61.1496914%",y2:"100%"},[j("stop",{"stop-color":`var(${i(t).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,IH),j("stop",{"stop-color":`var(${i(t).cssVarBlockName("fill-color-4")})`,offset:"100%"},null,8,_H)],8,RH),j("linearGradient",{id:`linearGradient-2-${i(n)}`,x1:"0%",y1:"9.5%",x2:"100%",y2:"90.5%"},[j("stop",{"stop-color":`var(${i(t).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,AH),j("stop",{"stop-color":`var(${i(t).cssVarBlockName("fill-color-6")})`,offset:"100%"},null,8,LH)],8,PH),j("rect",{id:`path-3-${i(n)}`,x:"0",y:"0",width:"17",height:"36"},null,8,DH)]),j("g",VH,[j("g",BH,[j("g",FH,[j("path",{d:"M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",fill:`var(${i(t).cssVarBlockName("fill-color-3")})`},null,8,zH),j("polygon",{fill:`var(${i(t).cssVarBlockName("fill-color-7")})`,transform:"translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",points:"13 58 53 58 42 45 2 45"},null,8,HH),j("g",KH,[j("polygon",{fill:`var(${i(t).cssVarBlockName("fill-color-7")})`,transform:"translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",points:"2.84078316e-14 3 18 3 23 7 5 7"},null,8,WH),j("polygon",{fill:`var(${i(t).cssVarBlockName("fill-color-5")})`,points:"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"},null,8,jH),j("rect",{fill:`url(#linearGradient-1-${i(n)})`,transform:"translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",x:"38",y:"7",width:"17",height:"36"},null,8,UH),j("polygon",{fill:`var(${i(t).cssVarBlockName("fill-color-2")})`,transform:"translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",points:"24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"},null,8,YH)]),j("rect",{fill:`url(#linearGradient-2-${i(n)})`,x:"13",y:"45",width:"40",height:"36"},null,8,qH),j("g",GH,[j("use",{fill:`var(${i(t).cssVarBlockName("fill-color-8")})`,transform:"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ","xlink:href":`#path-3-${i(n)}`},null,8,XH),j("polygon",{fill:`var(${i(t).cssVarBlockName("fill-color-9")})`,mask:`url(#mask-4-${i(n)})`,transform:"translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",points:"7 0 24 0 20 18 7 16.5"},null,8,ZH)]),j("polygon",{fill:`var(${i(t).cssVarBlockName("fill-color-2")})`,transform:"translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",points:"62 45 79 45 70 58 53 58"},null,8,JH)])])])]))}}),e9=QH;const t9=["src"],n9={key:1};var a9=ie({name:"ElEmpty",__name:"empty",props:NH,setup(e){const t=e,{t:n}=Et(),a=he("empty"),o=S(()=>t.description||n("el.table.emptyText")),l=S(()=>({width:an(t.imageSize)}));return(s,r)=>(x(),B("div",{class:M(i(a).b())},[j("div",{class:M(i(a).e("image")),style:je(l.value)},[e.image?(x(),B("img",{key:0,src:e.image,ondragstart:"return false"},null,8,t9)):ae(s.$slots,"image",{key:1},()=>[J(e9)])],6),j("div",{class:M(i(a).e("description"))},[s.$slots.description?ae(s.$slots,"description",{key:0}):(x(),B("p",n9,ke(o.value),1))],2),s.$slots.default?(x(),B("div",{key:0,class:M(i(a).e("bottom"))},[ae(s.$slots,"default")],2)):le("v-if",!0)],2))}}),o9=a9;const Q2=rt(o9),l9=Se({hideOnClickModal:Boolean,src:{type:String,default:""},fit:{type:String,values:["","contain","cover","fill","none","scale-down"],default:""},loading:{type:String,values:["eager","lazy"]},lazy:Boolean,scrollContainer:{type:X([String,Object])},previewSrcList:{type:X(Array),default:()=>nn([])},previewTeleported:Boolean,zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},scale:{type:Number,default:1},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},showProgress:Boolean,crossorigin:{type:X(String)}}),s9={load:e=>e instanceof Event,error:e=>e instanceof Event,switch:e=>Fe(e),close:()=>!0,show:()=>!0},r9=Se({urlList:{type:X(Array),default:()=>nn([])},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},scale:{type:Number,default:1},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},showProgress:Boolean,crossorigin:{type:X(String)}}),i9={close:()=>!0,error:e=>e instanceof Event,switch:e=>Fe(e),rotate:e=>Fe(e)},u9=["src","crossorigin"];var c9=ie({name:"ElImageViewer",__name:"image-viewer",props:r9,emits:i9,setup(e,{expose:t,emit:n}){const a={CONTAIN:{name:"contain",icon:za(MP)},ORIGINAL:{name:"original",icon:za(ZP)}},o=e,l=n;let s;const{t:r}=Et(),u=he("image-viewer"),{nextZIndex:c}=fu(),d=A(),f=A(),p=V0(),g=S(()=>{const{scale:se,minScale:Y,maxScale:G}=o;return uw(se,Y,G)}),v=A(!0),h=A(!1),m=A(!1),y=A(o.initialIndex),b=Wt(a.CONTAIN),w=A({scale:g.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),C=A(o.zIndex??c());Od(m,{ns:u});const k=S(()=>{const{urlList:se}=o;return se.length<=1}),E=S(()=>y.value===0),T=S(()=>y.value===o.urlList.length-1),$=S(()=>o.urlList[y.value]),N=S(()=>[u.e("btn"),u.e("prev"),u.is("disabled",!o.infinite&&E.value)]),O=S(()=>[u.e("btn"),u.e("next"),u.is("disabled",!o.infinite&&T.value)]),_=S(()=>{const{scale:se,deg:Y,offsetX:G,offsetY:V,enableTransition:Z}=w.value;let oe=G/se,ce=V/se;const ge=Y*Math.PI/180,me=Math.cos(ge),Me=Math.sin(ge);oe=oe*me+ce*Me,ce=ce*me-G/se*Me;const Ie={transform:`scale(${se}) rotate(${Y}deg) translate(${oe}px, ${ce}px)`,transition:Z?"transform .3s":""};return b.value.name===a.CONTAIN.name&&(Ie.maxWidth=Ie.maxHeight="100%"),Ie}),P=S(()=>`${y.value+1} / ${o.urlList.length}`);function D(){U(),s==null||s(),m.value=!1,l("close")}function W(){const se=Tl(G=>{switch(zt(G)){case Ce.esc:o.closeOnPressEscape&&D();break;case Ce.space:H();break;case Ce.left:q();break;case Ce.up:ee("zoomIn");break;case Ce.right:Q();break;case Ce.down:ee("zoomOut");break}}),Y=Tl(G=>{ee((G.deltaY||G.deltaX)<0?"zoomIn":"zoomOut",{zoomRate:o.zoomRate,enableTransition:!1})});p.run(()=>{At(document,"keydown",se),At(d,"wheel",Y)})}function U(){p.stop()}function F(){v.value=!1}function R(se){h.value=!0,v.value=!1,l("error",se),se.target.alt=r("el.image.error")}function I(se){if(v.value||se.button!==0||!d.value)return;w.value.enableTransition=!1;const{offsetX:Y,offsetY:G}=w.value,V=se.pageX,Z=se.pageY,oe=Tl(me=>{w.value={...w.value,offsetX:Y+me.pageX-V,offsetY:G+me.pageY-Z}}),ce=At(document,"mousemove",oe),ge=At(document,"mouseup",()=>{ce(),ge()});se.preventDefault()}function L(se){if(v.value||!d.value||se.touches.length!==1)return;w.value.enableTransition=!1;const{offsetX:Y,offsetY:G}=w.value,{pageX:V,pageY:Z}=se.touches[0],oe=Tl(me=>{const Me=me.touches[0];w.value={...w.value,offsetX:Y+Me.pageX-V,offsetY:G+Me.pageY-Z}}),ce=At(document,"touchmove",oe),ge=At(document,"touchend",()=>{ce(),ge()});se.preventDefault()}function z(){w.value={scale:g.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function H(){if(v.value||h.value)return;const se=Ri(a),Y=Object.values(a),G=b.value.name;b.value=a[se[(Y.findIndex(V=>V.name===G)+1)%se.length]],z()}function K(se){h.value=!1;const Y=o.urlList.length;y.value=(se+Y)%Y}function q(){E.value&&!o.infinite||K(y.value-1)}function Q(){T.value&&!o.infinite||K(y.value+1)}function ee(se,Y={}){if(v.value||h.value)return;const{minScale:G,maxScale:V}=o,{zoomRate:Z,rotateDeg:oe,enableTransition:ce}={zoomRate:o.zoomRate,rotateDeg:90,enableTransition:!0,...Y};switch(se){case"zoomOut":w.value.scale>G&&(w.value.scale=Number.parseFloat((w.value.scale/Z).toFixed(3)));break;case"zoomIn":w.value.scale0)return se.preventDefault(),!1}}return fe(()=>g.value,se=>{w.value.scale=se}),fe($,()=>{Ae(()=>{var se;(se=f.value)!=null&&se.complete||(v.value=!0)})}),fe(y,se=>{z(),l("switch",se)}),mt(()=>{m.value=!0,W(),s=At("wheel",de,{passive:!1})}),t({setActiveItem:K}),(se,Y)=>(x(),re(i(_r),{to:"body",disabled:!e.teleported},{default:ne(()=>[J(Bn,{name:"viewer-fade",appear:""},{default:ne(()=>[j("div",{ref_key:"wrapper",ref:d,tabindex:-1,class:M(i(u).e("wrapper")),style:je({zIndex:C.value})},[J(i(Pr),{loop:"",trapped:"","focus-trap-el":d.value,"focus-start-el":"container",onFocusoutPrevented:ue,onReleaseRequested:te},{default:ne(()=>[j("div",{class:M(i(u).e("mask")),onClick:Y[0]||(Y[0]=Xe(G=>e.hideOnClickModal&&D(),["self"]))},null,2),le(" CLOSE "),j("span",{class:M([i(u).e("btn"),i(u).e("close")]),onClick:D},[J(i(Be),null,{default:ne(()=>[J(i(La))]),_:1})],2),le(" ARROW "),k.value?le("v-if",!0):(x(),B(He,{key:0},[j("span",{class:M(N.value),onClick:q},[J(i(Be),null,{default:ne(()=>[J(i(al))]),_:1})],2),j("span",{class:M(O.value),onClick:Q},[J(i(Be),null,{default:ne(()=>[J(i(Jn))]),_:1})],2)],64)),se.$slots.progress||e.showProgress?(x(),B("div",{key:1,class:M([i(u).e("btn"),i(u).e("progress")])},[ae(se.$slots,"progress",{activeIndex:y.value,total:e.urlList.length},()=>[St(ke(P.value),1)])],2)):le("v-if",!0),le(" ACTIONS "),j("div",{class:M([i(u).e("btn"),i(u).e("actions")])},[j("div",{class:M(i(u).e("actions__inner"))},[ae(se.$slots,"toolbar",{actions:ee,prev:q,next:Q,reset:H,activeIndex:y.value,setActiveItem:K},()=>[J(i(Be),{onClick:Y[1]||(Y[1]=G=>ee("zoomOut"))},{default:ne(()=>[J(i(gA))]),_:1}),J(i(Be),{onClick:Y[2]||(Y[2]=G=>ee("zoomIn"))},{default:ne(()=>[J(i(oS))]),_:1}),j("i",{class:M(i(u).e("actions__divider"))},null,2),J(i(Be),{onClick:H},{default:ne(()=>[(x(),re(ct(b.value.icon)))]),_:1}),j("i",{class:M(i(u).e("actions__divider"))},null,2),J(i(Be),{onClick:Y[3]||(Y[3]=G=>ee("anticlockwise"))},{default:ne(()=>[J(i(YP))]),_:1}),J(i(Be),{onClick:Y[4]||(Y[4]=G=>ee("clockwise"))},{default:ne(()=>[J(i(GP))]),_:1})])],2)],2),le(" CANVAS "),j("div",{class:M(i(u).e("canvas"))},[h.value&&se.$slots["viewer-error"]?ae(se.$slots,"viewer-error",{key:0,activeIndex:y.value,src:$.value}):(x(),B("img",{ref_key:"imgRef",ref:f,key:$.value,src:$.value,style:je(_.value),class:M(i(u).e("img")),crossorigin:e.crossorigin,onLoad:F,onError:R,onMousedown:I,onTouchstart:L},null,46,u9))],2),ae(se.$slots,"default")]),_:3},8,["focus-trap-el"])],6)]),_:3})]),_:3},8,["disabled"]))}}),d9=c9;const ek=rt(d9),f9=["src","loading","crossorigin"],p9={key:0};var v9=ie({name:"ElImage",inheritAttrs:!1,__name:"image",props:l9,emits:s9,setup(e,{expose:t,emit:n}){const a=e,o=n,{t:l}=Et(),s=he("image"),r=rl(),u=S(()=>pr(Object.entries(r).filter(([R])=>/^(data-|on[A-Z])/i.test(R)||["id","style"].includes(R)))),c=$d({excludeListeners:!0,excludeKeys:S(()=>Object.keys(u.value))}),d=A(),f=A(!1),p=A(!0),g=A(!1),v=A(),h=A(),m=Mt&&"loading"in HTMLImageElement.prototype;let y;const b=S(()=>[s.e("inner"),C.value&&s.e("preview"),p.value&&s.is("loading")]),w=S(()=>{const{fit:R}=a;return Mt&&R?{objectFit:R}:{}}),C=S(()=>{const{previewSrcList:R}=a;return be(R)&&R.length>0}),k=S(()=>{const{previewSrcList:R,initialIndex:I}=a;let L=I;return I>R.length-1&&(L=0),L}),E=S(()=>a.loading==="eager"?!1:!m&&a.loading==="lazy"||a.lazy),T=()=>{Mt&&(p.value=!0,f.value=!1,d.value=a.src)};function $(R){p.value=!1,f.value=!1,o("load",R)}function N(R){p.value=!1,f.value=!0,o("error",R)}function O(R){R&&(T(),D())}const _=dw(O,200,!0);async function P(){if(!Mt)return;await Ae();const{scrollContainer:R}=a;if(fa(R))h.value=R;else if(De(R)&&R!=="")h.value=document.querySelector(R)??void 0;else if(v.value){const L=rh(v.value);h.value=ru(L)?void 0:L}const{stop:I}=D$(v,([L])=>{_(L.isIntersecting)},{root:h});y=I}function D(){!Mt||!_||(y==null||y(),h.value=void 0,y=void 0)}function W(){C.value&&(g.value=!0,o("show"))}function U(){g.value=!1,o("close")}function F(R){o("switch",R)}return fe(()=>a.src,()=>{E.value?(p.value=!0,f.value=!1,D(),P()):T()}),mt(()=>{E.value?P():T()}),t({showPreview:W}),(R,I)=>(x(),B("div",pt({ref_key:"container",ref:v},u.value,{class:[i(s).b(),R.$attrs.class]}),[f.value?ae(R.$slots,"error",{key:0},()=>[j("div",{class:M(i(s).e("error"))},ke(i(l)("el.image.error")),3)]):(x(),B(He,{key:1},[d.value!==void 0?(x(),B("img",pt({key:0},i(c),{src:d.value,loading:e.loading,style:w.value,class:b.value,crossorigin:e.crossorigin,onClick:W,onLoad:$,onError:N}),null,16,f9)):le("v-if",!0),p.value?(x(),B("div",{key:1,class:M(i(s).e("wrapper"))},[ae(R.$slots,"placeholder",{},()=>[j("div",{class:M(i(s).e("placeholder"))},null,2)])],2)):le("v-if",!0)],64)),C.value?(x(),B(He,{key:2},[g.value?(x(),re(i(ek),{key:0,"z-index":e.zIndex,"initial-index":k.value,infinite:e.infinite,"zoom-rate":e.zoomRate,"min-scale":e.minScale,"max-scale":e.maxScale,"show-progress":e.showProgress,"url-list":e.previewSrcList,scale:e.scale,crossorigin:e.crossorigin,"hide-on-click-modal":e.hideOnClickModal,teleported:e.previewTeleported,"close-on-press-escape":e.closeOnPressEscape,onClose:U,onSwitch:F},ra({toolbar:ne(L=>[ae(R.$slots,"toolbar",Yo(qo(L)))]),default:ne(()=>[R.$slots.viewer?(x(),B("div",p9,[ae(R.$slots,"viewer")])):le("v-if",!0)]),_:2},[R.$slots.progress?{name:"progress",fn:ne(L=>[ae(R.$slots,"progress",Yo(qo(L)))]),key:"0"}:void 0,R.$slots["viewer-error"]?{name:"viewer-error",fn:ne(L=>[ae(R.$slots,"viewer-error",Yo(qo(L)))]),key:"1"}:void 0]),1032,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","show-progress","url-list","scale","crossorigin","hide-on-click-modal","teleported","close-on-press-escape"])):le("v-if",!0)],64)):le("v-if",!0)],16))}}),h9=v9;const m9=rt(h9),g9=Se({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.MAX_SAFE_INTEGER},min:{type:Number,default:Number.MIN_SAFE_INTEGER},modelValue:{type:[Number,null]},readonly:Boolean,disabled:{type:Boolean,default:void 0},size:Sn,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:X([String,Number,null]),validator:e=>e===null||Fe(e)||["min","max"].includes(e),default:null},name:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0},...Qn(["ariaLabel"]),inputmode:{type:X(String),default:void 0},align:{type:X(String),default:"center"},disabledScientific:Boolean}),y9={[yt]:(e,t)=>t!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[gn]:e=>Fe(e)||hn(e),[at]:e=>Fe(e)||hn(e)},b9=["aria-label"],w9=["aria-label"];var C9=ie({name:"ElInputNumber",__name:"input-number",props:g9,emits:y9,setup(e,{expose:t,emit:n}){const a=e,o=n,{t:l}=Et(),s=he("input-number"),r=A(),u=Rt({currentValue:a.modelValue,userInput:null}),{formItem:c}=Pn(),d=S(()=>Fe(a.modelValue)&&a.modelValue<=a.min),f=S(()=>Fe(a.modelValue)&&a.modelValue>=a.max),p=S(()=>{const R=b(a.step);return xt(a.precision)?Math.max(b(a.modelValue),R):(R>a.precision&&ft("InputNumber","precision should not be less than the decimal places of step"),a.precision)}),g=S(()=>a.controls&&a.controlsPosition==="right"),v=bn(),h=on(),m=S(()=>{if(u.userInput!==null)return u.userInput;let R=u.currentValue;if(hn(R))return"";if(Fe(R)){if(Number.isNaN(R))return"";xt(a.precision)||(R=R.toFixed(a.precision))}return R}),y=(R,I)=>{if(xt(I)&&(I=p.value),I===0)return Math.round(R);let L=String(R);const z=L.indexOf(".");if(z===-1||!L.replace(".","").split("")[z+I])return R;const H=L.length;return L.charAt(H-1)==="5"&&(L=`${L.slice(0,Math.max(0,H-1))}6`),Number.parseFloat(Number(L).toFixed(I))},b=R=>{if(hn(R))return 0;const I=R.toString(),L=I.indexOf(".");let z=0;return L!==-1&&(z=I.length-L-1),z},w=(R,I=1)=>Fe(R)?R>=Number.MAX_SAFE_INTEGER&&I===1?(ft("InputNumber","The value has reached the maximum safe integer limit."),R):R<=Number.MIN_SAFE_INTEGER&&I===-1?(ft("InputNumber","The value has reached the minimum safe integer limit."),R):y(R+a.step*I):u.currentValue,C=R=>{const I=zt(R),L=nC(R);if(a.disabledScientific&&["e","E"].includes(L)){R.preventDefault();return}switch(I){case Ce.up:R.preventDefault(),k();break;case Ce.down:R.preventDefault(),E();break}},k=()=>{a.readonly||h.value||f.value||($(w(Number(m.value)||0)),o(gn,u.currentValue),U())},E=()=>{a.readonly||h.value||d.value||($(w(Number(m.value)||0,-1)),o(gn,u.currentValue),U())},T=(R,I)=>{const{max:L,min:z,step:H,precision:K,stepStrictly:q,valueOnClear:Q}=a;LL||eeL?L:z,I&&o(at,ee)),ee},$=(R,I=!0)=>{var H;const L=u.currentValue,z=T(R);if(!I){o(at,z);return}u.userInput=null,!(L===z&&R)&&(o(at,z),L!==z&&o(yt,z,L),a.validateEvent&&((H=c==null?void 0:c.validate)==null||H.call(c,"change").catch(K=>ft(K))),u.currentValue=z)},N=R=>{u.userInput=R;const I=R===""?null:Number(R);o(gn,I),$(I,!1)},O=R=>{const I=R!==""?Number(R):"";(Fe(I)&&!Number.isNaN(I)||R==="")&&$(I),U(),u.userInput=null},_=()=>{var R,I;(I=(R=r.value)==null?void 0:R.focus)==null||I.call(R)},P=()=>{var R,I;(I=(R=r.value)==null?void 0:R.blur)==null||I.call(R)},D=R=>{o("focus",R)},W=R=>{var I,L;u.userInput=null,u.currentValue===null&&((I=r.value)!=null&&I.input)&&(r.value.input.value=""),o("blur",R),a.validateEvent&&((L=c==null?void 0:c.validate)==null||L.call(c,"blur").catch(z=>ft(z)))},U=()=>{u.currentValue!==a.modelValue&&(u.currentValue=a.modelValue)},F=R=>{document.activeElement===R.target&&R.preventDefault()};return fe(()=>a.modelValue,(R,I)=>{const L=T(R,!0);u.userInput===null&&L!==I&&(u.currentValue=L)},{immediate:!0}),fe(()=>a.precision,()=>{u.currentValue=T(a.modelValue)}),mt(()=>{var H;const{min:R,max:I,modelValue:L}=a,z=(H=r.value)==null?void 0:H.input;if(z.setAttribute("role","spinbutton"),Number.isFinite(I)?z.setAttribute("aria-valuemax",String(I)):z.removeAttribute("aria-valuemax"),Number.isFinite(R)?z.setAttribute("aria-valuemin",String(R)):z.removeAttribute("aria-valuemin"),z.setAttribute("aria-valuenow",u.currentValue||u.currentValue===0?String(u.currentValue):""),z.setAttribute("aria-disabled",String(h.value)),!Fe(L)&&L!=null){let K=Number(L);Number.isNaN(K)&&(K=null),o(at,K)}z.addEventListener("wheel",F,{passive:!1})}),Qa(()=>{var R,I;(I=(R=r.value)==null?void 0:R.input)==null||I.setAttribute("aria-valuenow",`${u.currentValue??""}`)}),t({focus:_,blur:P}),(R,I)=>(x(),B("div",{class:M([i(s).b(),i(s).m(i(v)),i(s).is("disabled",i(h)),i(s).is("without-controls",!e.controls),i(s).is("controls-right",g.value),i(s).is(e.align,!!e.align)]),onDragstart:I[0]||(I[0]=Xe(()=>{},["prevent"]))},[e.controls?dt((x(),B("span",{key:0,role:"button","aria-label":i(l)("el.inputNumber.decrease"),class:M([i(s).e("decrease"),i(s).is("disabled",d.value)]),onKeydown:en(E,["enter"])},[ae(R.$slots,"decrease-icon",{},()=>[J(i(Be),null,{default:ne(()=>[g.value?(x(),re(i(Io),{key:0})):(x(),re(i(DP),{key:1}))]),_:1})])],42,b9)),[[i(Mc),E]]):le("v-if",!0),e.controls?dt((x(),B("span",{key:1,role:"button","aria-label":i(l)("el.inputNumber.increase"),class:M([i(s).e("increase"),i(s).is("disabled",f.value)]),onKeydown:en(k,["enter"])},[ae(R.$slots,"increase-icon",{},()=>[J(i(Be),null,{default:ne(()=>[g.value?(x(),re(i(Ad),{key:0})):(x(),re(i(nS),{key:1}))]),_:1})])],42,w9)),[[i(Mc),k]]):le("v-if",!0),J(i(Dn),{id:e.id,ref_key:"input",ref:r,type:"number",step:e.step,"model-value":m.value,placeholder:e.placeholder,readonly:e.readonly,disabled:i(h),size:i(v),max:e.max,min:e.min,name:e.name,"aria-label":e.ariaLabel,"validate-event":!1,inputmode:e.inputmode,onKeydown:C,onBlur:W,onFocus:D,onInput:N,onChange:O},ra({_:2},[R.$slots.prefix?{name:"prefix",fn:ne(()=>[ae(R.$slots,"prefix")]),key:"0"}:void 0,R.$slots.suffix?{name:"suffix",fn:ne(()=>[ae(R.$slots,"suffix")]),key:"1"}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode"])],34))}}),S9=C9;const tk=rt(S9),k9=Se({modelValue:{type:X(Array)},max:Number,tagType:{...ol.type,default:"info"},tagEffect:ol.effect,effect:{type:X(String),default:"light"},trigger:{type:X(String),default:Ce.enter},draggable:Boolean,delimiter:{type:[String,RegExp],default:""},size:Sn,clearable:Boolean,clearIcon:{type:Ft,default:_o},disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},readonly:Boolean,autofocus:Boolean,id:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},placeholder:String,autocomplete:{type:X(String),default:"off"},saveOnBlur:{type:Boolean,default:!0},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},ariaLabel:String}),E9={[at]:e=>be(e)||xt(e),[yt]:e=>be(e)||xt(e),[gn]:e=>De(e),"add-tag":e=>De(e)||be(e),"remove-tag":(e,t)=>De(e)&&Fe(t),"drag-tag":(e,t,n)=>Fe(e)&&Fe(t)&&De(n),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0};function x9({wrapperRef:e,handleDragged:t,afterDragged:n}){const a=he("input-tag"),o=Wt(),l=A(!1);let s,r,u,c;function d(v){return`.${a.e("inner")} .${a.namespace.value}-tag:nth-child(${v+1})`}function f(v,h){s=h,r=e.value.querySelector(d(h)),r&&(r.style.opacity="0.5"),v.dataTransfer.effectAllowed="move"}function p(v,h){if(u=h,v.preventDefault(),v.dataTransfer.dropEffect="move",xt(s)||s===h){l.value=!1;return}const m=e.value.querySelector(d(h)).getBoundingClientRect(),y=s+1!==h,b=s-1!==h,w=v.clientX-m.left,C=y?b?.5:1:-1,k=b?y?.5:0:1;w<=m.width*C?c="before":w>m.width*k?c="after":c=void 0;const E=e.value.querySelector(`.${a.e("inner")}`),T=E.getBoundingClientRect(),$=Number.parseFloat(Ko(E,"gap"))/2,N=m.top-T.top;let O=-9999;if(c==="before")O=Math.max(m.left-T.left-$,Math.floor(-$/2));else if(c==="after"){const _=m.right-T.left;O=_+(T.width===_?Math.floor($/2):$)}hC(o.value,{top:`${N}px`,left:`${O}px`}),l.value=!!c}function g(v){v.preventDefault(),r&&(r.style.opacity=""),c&&!xt(s)&&!xt(u)&&s!==u&&t(s,u,c),l.value=!1,s=void 0,r=null,u=void 0,c=void 0,n==null||n()}return{dropIndicatorRef:o,showDropIndicator:l,handleDragStart:f,handleDragOver:p,handleDragEnd:g}}function T9(){const e=A(!1);return{hovering:e,handleMouseEnter:()=>{e.value=!0},handleMouseLeave:()=>{e.value=!1}}}function $9({props:e,emit:t,formItem:n}){const a=on(),o=bn(),l=Wt(),s=A(),r=A(),u=S(()=>["small"].includes(o.value)?"small":"default"),c=S(()=>{var F;return(F=e.modelValue)!=null&&F.length?void 0:e.placeholder}),d=S(()=>!(e.readonly||a.value)),f=S(()=>{var F;return xt(e.max)?!1:(((F=e.modelValue)==null?void 0:F.length)??0)>=e.max}),p=S(()=>{var F;return e.collapseTags?(F=e.modelValue)==null?void 0:F.slice(0,e.maxCollapseTags):e.modelValue}),g=S(()=>{var F;return e.collapseTags?(F=e.modelValue)==null?void 0:F.slice(e.maxCollapseTags):[]}),v=F=>{const R=[...e.modelValue??[],...Tn(F)];t(at,R),t(yt,R),t("add-tag",F),s.value=void 0},h=F=>{var L;const R=F.split(e.delimiter),I=R.length>1?R.map(z=>z.trim()).filter(Boolean):[];if(e.max){const z=e.max-(((L=e.modelValue)==null?void 0:L.length)??0);I.splice(z)}return I.length===1?I[0]:I},m=F=>{var q;const R=(q=F.clipboardData)==null?void 0:q.getData("text");if(e.readonly||f.value||!e.delimiter||!R)return;const{selectionStart:I=0,selectionEnd:L=0,value:z}=F.target,H=z.slice(0,I)+R+z.slice(L),K=h(H);K.length&&(v(K),t(gn,H),F.preventDefault())},y=F=>{if(f.value){s.value=void 0;return}if(!P.value){if(e.delimiter&&s.value){const R=h(s.value);R.length&&v(R)}t(gn,F.target.value)}},b=F=>{var R;if(!P.value)switch(zt(F)){case e.trigger:F.preventDefault(),F.stopPropagation(),C();break;case Ce.numpadEnter:e.trigger===Ce.enter&&(F.preventDefault(),F.stopPropagation(),C());break;case Ce.backspace:!s.value&&((R=e.modelValue)!=null&&R.length)&&(F.preventDefault(),F.stopPropagation(),k(e.modelValue.length-1));break}},w=F=>{if(!(P.value||!pw()))switch(zt(F)){case Ce.space:e.trigger===Ce.space&&(F.preventDefault(),F.stopPropagation(),C());break}},C=()=>{var R;const F=(R=s.value)==null?void 0:R.trim();!F||f.value||v(F)},k=F=>{const R=(e.modelValue??[]).slice(),[I]=R.splice(F,1);t(at,R),t(yt,R),t("remove-tag",I,F)},E=()=>{s.value=void 0,t(at,void 0),t(yt,void 0),t("clear")},T=(F,R,I)=>{const L=(e.modelValue??[]).slice(),[z]=L.splice(F,1),H=R>F&&I==="before"?-1:R{var F;(F=l.value)==null||F.focus()},N=()=>{var F;(F=l.value)==null||F.blur()},{wrapperRef:O,isFocused:_}=dl(l,{disabled:a,beforeBlur(F){var R;return(R=r.value)==null?void 0:R.isFocusInsideContent(F)},afterBlur(){var F;e.saveOnBlur?C():s.value=void 0,e.validateEvent&&((F=n==null?void 0:n.validate)==null||F.call(n,"blur").catch(R=>ft(R)))}}),{isComposing:P,handleCompositionStart:D,handleCompositionUpdate:W,handleCompositionEnd:U}=mu({afterComposition:y});return fe(()=>e.modelValue,()=>{var F;e.validateEvent&&((F=n==null?void 0:n.validate)==null||F.call(n,yt).catch(R=>ft(R)))}),{inputRef:l,wrapperRef:O,tagTooltipRef:r,isFocused:_,isComposing:P,inputValue:s,size:o,tagSize:u,placeholder:c,closable:d,disabled:a,inputLimit:f,showTagList:p,collapseTagList:g,handleDragged:T,handlePaste:m,handleInput:y,handleKeydown:b,handleKeyup:w,handleAddTag:C,handleRemoveTag:k,handleClear:E,handleCompositionStart:D,handleCompositionUpdate:W,handleCompositionEnd:U,focus:$,blur:N}}function O9({props:e,isFocused:t,hovering:n,disabled:a,inputValue:o,size:l,validateState:s,validateIcon:r,needStatusIcon:u}){const c=rl(),d=fn(),f=he("input-tag"),p=he("input"),g=A(),v=A(),h=S(()=>[f.b(),f.is("focused",t.value),f.is("hovering",n.value),f.is("disabled",a.value),f.m(l.value),f.e("wrapper"),c.class]),m=S(()=>[c.style]),y=S(()=>{var N,O;return[f.e("inner"),f.is("draggable",e.draggable),f.is("left-space",!((N=e.modelValue)!=null&&N.length)&&!d.prefix),f.is("right-space",!((O=e.modelValue)!=null&&O.length)&&!w.value)]}),b=S(()=>{var N;return e.clearable&&!a.value&&!e.readonly&&(((N=e.modelValue)==null?void 0:N.length)||o.value)&&(t.value||n.value)}),w=S(()=>d.suffix||b.value||s.value&&r.value&&u.value),C=Rt({innerWidth:0,collapseItemWidth:0}),k=()=>{if(!v.value)return 0;const N=window.getComputedStyle(v.value);return Number.parseFloat(N.gap||"6px")},E=()=>{C.innerWidth=Number.parseFloat(window.getComputedStyle(v.value).width)},T=()=>{C.collapseItemWidth=g.value.getBoundingClientRect().width},$=S(()=>{if(!e.collapseTags)return{};const N=k(),O=N+hd,_=g.value&&e.maxCollapseTags===1?C.innerWidth-C.collapseItemWidth-N-O:C.innerWidth-O;return{maxWidth:`${Math.max(_,0)}px`}});return Xt(v,E),Xt(g,T),{ns:f,nsInput:p,containerKls:h,containerStyle:m,innerKls:y,showClear:b,showSuffix:w,tagStyle:$,collapseItemRef:g,innerRef:v}}const N9=["id","minlength","maxlength","disabled","readonly","autocomplete","tabindex","placeholder","autofocus","ariaLabel"],M9=["textContent"];var R9=ie({name:"ElInputTag",inheritAttrs:!1,__name:"input-tag",props:k9,emits:E9,setup(e,{expose:t,emit:n}){const a=e,o=n,l=$d(),s=fn(),{form:r,formItem:u}=Pn(),{inputId:c}=Ta(a,{formItemContext:u}),d=S(()=>(r==null?void 0:r.statusIcon)??!1),f=S(()=>(u==null?void 0:u.validateState)||""),p=S(()=>f.value&&Dd[f.value]),{inputRef:g,wrapperRef:v,tagTooltipRef:h,isFocused:m,inputValue:y,size:b,tagSize:w,placeholder:C,closable:k,disabled:E,showTagList:T,collapseTagList:$,handleDragged:N,handlePaste:O,handleInput:_,handleKeydown:P,handleKeyup:D,handleRemoveTag:W,handleClear:U,handleCompositionStart:F,handleCompositionUpdate:R,handleCompositionEnd:I,focus:L,blur:z}=$9({props:a,emit:o,formItem:u}),{hovering:H,handleMouseEnter:K,handleMouseLeave:q}=T9(),{calculatorRef:Q,inputStyle:ee}=oh(),{dropIndicatorRef:ue,showDropIndicator:te,handleDragStart:de,handleDragOver:se,handleDragEnd:Y}=x9({wrapperRef:v,handleDragged:N,afterDragged:L}),{ns:G,nsInput:V,containerKls:Z,containerStyle:oe,innerKls:ce,showClear:ge,showSuffix:me,tagStyle:Me,collapseItemRef:Ie,innerRef:Re}=O9({props:a,hovering:H,isFocused:m,inputValue:y,disabled:E,size:b,validateState:f,validateIcon:p,needStatusIcon:d});return t({focus:L,blur:z}),(ye,Te)=>(x(),B("div",{ref_key:"wrapperRef",ref:v,class:M(i(Z)),style:je(i(oe)),onMouseenter:Te[9]||(Te[9]=(...we)=>i(K)&&i(K)(...we)),onMouseleave:Te[10]||(Te[10]=(...we)=>i(q)&&i(q)(...we))},[i(s).prefix?(x(),B("div",{key:0,class:M(i(G).e("prefix"))},[ae(ye.$slots,"prefix")],2)):le("v-if",!0),j("div",{ref_key:"innerRef",ref:Re,class:M(i(ce))},[(x(!0),B(He,null,Ct(i(T),(we,Pe)=>(x(),re(i(Xo),{key:Pe,size:i(w),closable:i(k),type:e.tagType,effect:e.tagEffect,draggable:i(k)&&e.draggable,style:je(i(Me)),"disable-transitions":"",onClose:Ve=>i(W)(Pe),onDragstart:Ve=>i(de)(Ve,Pe),onDragover:Ve=>i(se)(Ve,Pe),onDragend:i(Y),onDrop:Te[0]||(Te[0]=Xe(()=>{},["stop"]))},{default:ne(()=>[ae(ye.$slots,"tag",{value:we,index:Pe},()=>[St(ke(we),1)])]),_:2},1032,["size","closable","type","effect","draggable","style","onClose","onDragstart","onDragover","onDragend"]))),128)),e.collapseTags&&e.modelValue&&e.modelValue.length>e.maxCollapseTags?(x(),re(i(_n),{key:0,ref_key:"tagTooltipRef",ref:h,disabled:!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom"},{default:ne(()=>[j("div",{ref_key:"collapseItemRef",ref:Ie,class:M(i(G).e("collapse-tag"))},[J(i(Xo),{closable:!1,size:i(w),type:e.tagType,effect:e.tagEffect,"disable-transitions":""},{default:ne(()=>[St(" + "+ke(e.modelValue.length-e.maxCollapseTags),1)]),_:1},8,["size","type","effect"])],2)]),content:ne(()=>[j("div",{class:M(i(G).e("input-tag-list"))},[(x(!0),B(He,null,Ct(i($),(we,Pe)=>(x(),re(i(Xo),{key:Pe,size:i(w),closable:i(k),type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:Ve=>i(W)(Pe+e.maxCollapseTags)},{default:ne(()=>[ae(ye.$slots,"tag",{value:we,index:Pe+e.maxCollapseTags},()=>[St(ke(we),1)])]),_:2},1032,["size","closable","type","effect","onClose"]))),128))],2)]),_:3},8,["disabled","effect"])):le("v-if",!0),j("div",{class:M(i(G).e("input-wrapper"))},[dt(j("input",pt({id:i(c),ref_key:"inputRef",ref:g,"onUpdate:modelValue":Te[1]||(Te[1]=we=>Ut(y)?y.value=we:null)},i(l),{type:"text",minlength:e.minlength,maxlength:e.maxlength,disabled:i(E),readonly:e.readonly,autocomplete:e.autocomplete,tabindex:e.tabindex,placeholder:i(C),autofocus:e.autofocus,ariaLabel:e.ariaLabel,class:i(G).e("input"),style:i(ee),onCompositionstart:Te[2]||(Te[2]=(...we)=>i(F)&&i(F)(...we)),onCompositionupdate:Te[3]||(Te[3]=(...we)=>i(R)&&i(R)(...we)),onCompositionend:Te[4]||(Te[4]=(...we)=>i(I)&&i(I)(...we)),onPaste:Te[5]||(Te[5]=(...we)=>i(O)&&i(O)(...we)),onInput:Te[6]||(Te[6]=(...we)=>i(_)&&i(_)(...we)),onKeydown:Te[7]||(Te[7]=(...we)=>i(P)&&i(P)(...we)),onKeyup:Te[8]||(Te[8]=(...we)=>i(D)&&i(D)(...we))}),null,16,N9),[[Q1,i(y)]]),j("span",{ref_key:"calculatorRef",ref:Q,"aria-hidden":"true",class:M(i(G).e("input-calculator")),textContent:ke(i(y))},null,10,M9)],2),dt(j("div",{ref_key:"dropIndicatorRef",ref:ue,class:M(i(G).e("drop-indicator"))},null,2),[[Nt,i(te)]])],2),i(me)?(x(),B("div",{key:1,class:M(i(G).e("suffix"))},[ae(ye.$slots,"suffix"),i(ge)?(x(),re(i(Be),{key:0,class:M([i(G).e("icon"),i(G).e("clear")]),onMousedown:Xe(i(_t),["prevent"]),onClick:i(U)},{default:ne(()=>[(x(),re(ct(e.clearIcon)))]),_:1},8,["class","onMousedown","onClick"])):le("v-if",!0),f.value&&p.value&&d.value?(x(),re(i(Be),{key:1,class:M([i(V).e("icon"),i(V).e("validateIcon"),i(V).is("loading",f.value==="validating")])},{default:ne(()=>[(x(),re(ct(p.value)))]),_:1},8,["class"])):le("v-if",!0)],2)):le("v-if",!0)],38))}}),I9=R9;const _9=rt(I9),P9=Se({type:{type:String,values:["primary","success","warning","info","danger","default"],default:void 0},underline:{type:[Boolean,String],values:[!0,!1,"always","never","hover"],default:void 0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:Ft}}),A9={click:e=>e instanceof MouseEvent},L9=["href","target"];var D9=ie({name:"ElLink",__name:"link",props:P9,emits:A9,setup(e,{emit:t}){const n=e,a=t,o=fl("link");bo({scope:"el-link",from:"The underline option (boolean)",replacement:"'always' | 'hover' | 'never'",version:"3.0.0",ref:"https://element-plus.org/en-US/component/link.html#underline"},S(()=>Vt(n.underline)));const l=he("link"),s=S(()=>{var c;return[l.b(),l.m(n.type??((c=o.value)==null?void 0:c.type)??"default"),l.is("disabled",n.disabled),l.is("underline",r.value==="always"),l.is("hover-underline",r.value==="hover"&&!n.disabled)]}),r=S(()=>{var c;return Vt(n.underline)?n.underline?"hover":"never":n.underline??((c=o.value)==null?void 0:c.underline)??"hover"});function u(c){n.disabled||a("click",c)}return(c,d)=>(x(),B("a",{class:M(s.value),href:e.disabled||!e.href?void 0:e.href,target:e.disabled||!e.href?void 0:e.target,onClick:u},[e.icon?(x(),re(i(Be),{key:0},{default:ne(()=>[(x(),re(ct(e.icon)))]),_:1})):le("v-if",!0),c.$slots.default?(x(),B("span",{key:1,class:M(i(l).e("inner"))},[ae(c.$slots,"default")],2)):le("v-if",!0),c.$slots.icon?ae(c.$slots,"icon",{key:2}):le("v-if",!0)],10,L9))}}),V9=D9;const B9=rt(V9),Qh="rootMenu",Kc="subMenu:";function nk(e,t){const n=S(()=>{let a=e.parent;const o=[t.value];for(;a.type.name!=="ElMenu";)a.props.index&&o.unshift(a.props.index),a=a.parent;return o});return{parentMenu:S(()=>{let a=e.parent;for(;a&&!["ElMenu","ElSubMenu"].includes(a.type.name);)a=a.parent;return a}),indexPath:n}}function F9(e){return S(()=>{const t=e.backgroundColor;return t?new cn(t).shade(20).toString():""})}const ak=(e,t)=>{const n=he("menu");return S(()=>n.cssVarBlock({"text-color":e.textColor||"","hover-text-color":e.textColor||"","bg-color":e.backgroundColor||"","hover-bg-color":F9(e).value||"","active-color":e.activeTextColor||"",level:`${t}`}))},z9=Se({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,popperStyle:{type:X([String,Object])},disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:Ft},expandOpenIcon:{type:Ft},collapseCloseIcon:{type:Ft},collapseOpenIcon:{type:Ft}}),Lf="ElSubMenu";var em=ie({name:Lf,props:z9,setup(e,{slots:t,expose:n}){const a=vt(),{indexPath:o,parentMenu:l}=nk(a,S(()=>e.index)),s=he("menu"),r=he("sub-menu"),u=_e(Qh);u||Jt(Lf,"can not inject root menu");const c=_e(`${Kc}${l.value.uid}`);c||Jt(Lf,"can not inject sub menu");const d=A({}),f=A({});let p;const g=A(!1),v=A(),h=A(),m=S(()=>c.level===0),y=S(()=>$.value==="horizontal"&&m.value?"bottom-start":"right-start"),b=S(()=>$.value==="horizontal"&&m.value||$.value==="vertical"&&!u.props.collapse?e.expandCloseIcon&&e.expandOpenIcon?E.value?e.expandOpenIcon:e.expandCloseIcon:Io:e.collapseCloseIcon&&e.collapseOpenIcon?E.value?e.collapseOpenIcon:e.collapseCloseIcon:Jn),w=S(()=>{const K=e.teleported;return xt(K)?m.value:K}),C=S(()=>u.props.collapse?`${s.namespace.value}-zoom-in-left`:`${s.namespace.value}-zoom-in-top`),k=S(()=>$.value==="horizontal"&&m.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),E=S(()=>u.openedMenus.includes(e.index)),T=S(()=>[...Object.values(d.value),...Object.values(f.value)].some(({active:K})=>K)),$=S(()=>u.props.mode),N=S(()=>u.props.persistent),O=Rt({index:e.index,indexPath:o,active:T}),_=ak(u.props,c.level+1),P=S(()=>e.popperOffset??u.props.popperOffset),D=S(()=>e.popperClass??u.props.popperClass),W=S(()=>e.popperStyle??u.props.popperStyle),U=S(()=>e.showTimeout??u.props.showTimeout),F=S(()=>e.hideTimeout??u.props.hideTimeout),R=()=>{var K,q,Q;return(Q=(q=(K=h.value)==null?void 0:K.popperRef)==null?void 0:q.popperInstanceRef)==null?void 0:Q.destroy()},I=K=>{K||R()},L=()=>{u.props.menuTrigger==="hover"&&u.props.mode==="horizontal"||u.props.collapse&&u.props.mode==="vertical"||e.disabled||u.handleSubMenuClick({index:e.index,indexPath:o.value,active:T.value})},z=(K,q=U.value)=>{var Q;if(K.type!=="focus"){if(u.props.menuTrigger==="click"&&u.props.mode==="horizontal"||!u.props.collapse&&u.props.mode==="vertical"||e.disabled){c.mouseInChild.value=!0;return}c.mouseInChild.value=!0,p==null||p(),{stop:p}=dr(()=>{u.openMenu(e.index,o.value)},q),w.value&&((Q=l.value.vnode.el)==null||Q.dispatchEvent(new MouseEvent("mouseenter"))),K.type==="mouseenter"&&K.target&&Ae(()=>{iu(K.target,{preventScroll:!0})})}},H=(K=!1)=>{var q;if(u.props.menuTrigger==="click"&&u.props.mode==="horizontal"||!u.props.collapse&&u.props.mode==="vertical"){c.mouseInChild.value=!1;return}p==null||p(),c.mouseInChild.value=!1,{stop:p}=dr(()=>!g.value&&u.closeMenu(e.index,o.value),F.value),w.value&&K&&((q=c.handleMouseleave)==null||q.call(c,!0))};fe(()=>u.props.collapse,K=>I(!!K));{const K=Q=>{f.value[Q.index]=Q},q=Q=>{delete f.value[Q.index]};bt(`${Kc}${a.uid}`,{addSubMenu:K,removeSubMenu:q,handleMouseleave:H,mouseInChild:g,level:c.level+1})}return n({opened:E}),mt(()=>{u.addSubMenu(O),c.addSubMenu(O)}),Pt(()=>{c.removeSubMenu(O),u.removeSubMenu(O)}),()=>{var Q;const K=[(Q=t.title)==null?void 0:Q.call(t),Ye(Be,{class:r.e("icon-arrow"),style:{transform:E.value?e.expandCloseIcon&&e.expandOpenIcon||e.collapseCloseIcon&&e.collapseOpenIcon&&u.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>De(b.value)?Ye(a.appContext.components[b.value]):Ye(b.value)})],q=u.isMenuPopup?Ye(_n,{ref:h,visible:E.value,effect:"light",pure:!0,offset:P.value,showArrow:!1,persistent:N.value,popperClass:D.value,popperStyle:W.value,placement:y.value,teleported:w.value,fallbackPlacements:k.value,transition:C.value,gpuAcceleration:!1},{content:()=>{var ee;return Ye("div",{class:[s.m($.value),s.m("popup-container"),D.value],onMouseenter:ue=>z(ue,100),onMouseleave:()=>H(!0),onFocus:ue=>z(ue,100)},[Ye("ul",{class:[s.b(),s.m("popup"),s.m(`popup-${y.value}`)],style:_.value},[(ee=t.default)==null?void 0:ee.call(t)])])},default:()=>Ye("div",{class:r.e("title"),onClick:L},K)}):Ye(He,{},[Ye("div",{class:r.e("title"),ref:v,onClick:L},K),Ye(zd,{},{default:()=>{var ee;return dt(Ye("ul",{role:"menu",class:[s.b(),s.m("inline")],style:_.value},[(ee=t.default)==null?void 0:ee.call(t)]),[[Nt,E.value]])}})]);return Ye("li",{class:[r.b(),r.is("active",T.value),r.is("opened",E.value),r.is("disabled",e.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:E.value,onMouseenter:z,onMouseleave:()=>H(),onFocus:z},[q])}}}),H9=class{constructor(e,t){this.parent=e,this.domNode=t,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(e){e===this.subMenuItems.length?e=0:e<0&&(e=this.subMenuItems.length-1),this.subMenuItems[e].focus(),this.subIndex=e}addListeners(){const e=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,t=>{t.addEventListener("keydown",n=>{const a=zt(n);let o=!1;switch(a){case Ce.down:this.gotoSubIndex(this.subIndex+1),o=!0;break;case Ce.up:this.gotoSubIndex(this.subIndex-1),o=!0;break;case Ce.tab:ec(e,"mouseleave");break;case Ce.enter:case Ce.numpadEnter:case Ce.space:o=!0,n.currentTarget.click();break}return o&&(n.preventDefault(),n.stopPropagation()),!1})})}},K9=class{constructor(e,t){this.domNode=e,this.submenu=null,this.submenu=null,this.init(t)}init(e){this.domNode.setAttribute("tabindex","0");const t=this.domNode.querySelector(`.${e}-menu`);t&&(this.submenu=new H9(this,t)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",e=>{const t=zt(e);let n=!1;switch(t){case Ce.down:ec(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),n=!0;break;case Ce.up:ec(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),n=!0;break;case Ce.tab:ec(e.currentTarget,"mouseleave");break;case Ce.enter:case Ce.numpadEnter:case Ce.space:n=!0,e.currentTarget.click();break}n&&e.preventDefault()})}},W9=class{constructor(e,t){this.domNode=e,this.init(t)}init(e){const t=this.domNode.childNodes;Array.from(t).forEach(n=>{n.nodeType===1&&new K9(n,e)})}},j9=ie({name:"ElMenuCollapseTransition",__name:"menu-collapse-transition",setup(e){const t=he("menu"),n={onBeforeEnter:a=>a.style.opacity="0.2",onEnter(a,o){Na(a,`${t.namespace.value}-opacity-transition`),a.style.opacity="1",o()},onAfterEnter(a){Zn(a,`${t.namespace.value}-opacity-transition`),a.style.opacity=""},onBeforeLeave(a){a.dataset||(a.dataset={}),wo(a,t.m("collapse"))?(Zn(a,t.m("collapse")),a.dataset.oldOverflow=a.style.overflow,a.dataset.scrollWidth=a.clientWidth.toString(),Na(a,t.m("collapse"))):(Na(a,t.m("collapse")),a.dataset.oldOverflow=a.style.overflow,a.dataset.scrollWidth=a.clientWidth.toString(),Zn(a,t.m("collapse"))),a.style.width=`${a.scrollWidth}px`,a.style.overflow="hidden"},onLeave(a){Na(a,"horizontal-collapse-transition"),a.style.width=`${a.dataset.scrollWidth}px`}};return(a,o)=>(x(),re(Bn,pt({mode:"out-in"},n),{default:ne(()=>[ae(a.$slots,"default")]),_:3},16))}}),U9=j9;const Y9=Se({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:X(Array),default:()=>nn([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:Ft,default:()=>FP},popperEffect:{type:X(String),default:"dark"},popperClass:String,popperStyle:{type:X([String,Object])},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),Df=e=>be(e)&&e.every(t=>De(t)),q9={close:(e,t)=>De(e)&&Df(t),open:(e,t)=>De(e)&&Df(t),select:(e,t,n,a)=>De(e)&&Df(t)&&ot(n)&&(xt(a)||a instanceof Promise)},Tb=64;var G9=ie({name:"ElMenu",props:Y9,emits:q9,setup(e,{emit:t,slots:n,expose:a}){const o=vt(),l=o.appContext.config.globalProperties.$router,s=A(),r=A(),u=he("menu"),c=he("sub-menu");let d=Tb;const f=A(-1),p=A(e.defaultOpeneds&&!e.collapse?e.defaultOpeneds.slice(0):[]),g=A(e.defaultActive),v=A({}),h=A({}),m=S(()=>e.mode==="horizontal"||e.mode==="vertical"&&e.collapse),y=()=>{const R=g.value&&v.value[g.value];!R||e.mode==="horizontal"||e.collapse||R.indexPath.forEach(I=>{const L=h.value[I];L&&b(I,L.indexPath)})},b=(R,I)=>{p.value.includes(R)||(e.uniqueOpened&&(p.value=p.value.filter(L=>I.includes(L))),p.value.push(R),t("open",R,I))},w=R=>{const I=p.value.indexOf(R);I!==-1&&p.value.splice(I,1)},C=(R,I)=>{w(R),t("close",R,I)},k=({index:R,indexPath:I})=>{p.value.includes(R)?C(R,I):b(R,I)},E=R=>{(e.mode==="horizontal"||e.collapse)&&(p.value=[]);const{index:I,indexPath:L}=R;if(!(hn(I)||hn(L)))if(e.router&&l){const z=R.route||I,H=l.push(z).then(K=>(K||(g.value=I),K));t("select",I,L,{index:I,indexPath:L,route:z},H)}else g.value=I,t("select",I,L,{index:I,indexPath:L})},T=R=>{var L;const I=v.value;g.value=((L=I[R]||g.value&&I[g.value]||I[e.defaultActive])==null?void 0:L.index)??R},$=R=>{const I=getComputedStyle(R),L=Number.parseInt(I.marginLeft,10),z=Number.parseInt(I.marginRight,10);return R.offsetWidth+L+z||0},N=()=>{if(!s.value)return-1;const R=Array.from(s.value.childNodes).filter(Q=>Q.nodeName!=="#comment"&&(Q.nodeName!=="#text"||Q.nodeValue)),I=getComputedStyle(s.value),L=Number.parseInt(I.paddingLeft,10),z=Number.parseInt(I.paddingRight,10),H=s.value.clientWidth-L-z;let K=0,q=0;return R.forEach((Q,ee)=>{K+=$(Q),K<=H-d&&(q=ee+1)}),q===R.length?-1:q},O=R=>h.value[R].indexPath,_=(R,I=33.34)=>{let L;return()=>{L&&clearTimeout(L),L=setTimeout(()=>{R()},I)}};let P=!0;const D=()=>{const R=Cn(r);if(R&&(d=$(R)||Tb),f.value===N())return;const I=()=>{f.value=-1,Ae(()=>{f.value=N()})};P?I():_(I)(),P=!1};fe(()=>e.defaultActive,R=>{v.value[R]||(g.value=""),T(R)}),fe(()=>e.collapse,R=>{R&&(p.value=[])}),fe(v.value,y);let W;sa(()=>{e.mode==="horizontal"&&e.ellipsis?W=Xt(s,D).stop:W==null||W()});const U=A(!1);{const R=H=>{h.value[H.index]=H},I=H=>{delete h.value[H.index]};bt(Qh,Rt({props:e,openedMenus:p,items:v,subMenus:h,activeIndex:g,isMenuPopup:m,addMenuItem:H=>{v.value[H.index]=H},removeMenuItem:H=>{delete v.value[H.index]},addSubMenu:R,removeSubMenu:I,openMenu:b,closeMenu:C,handleMenuItemClick:E,handleSubMenuClick:k})),bt(`${Kc}${o.uid}`,{addSubMenu:R,removeSubMenu:I,mouseInChild:U,level:0})}mt(()=>{e.mode==="horizontal"&&new W9(o.vnode.el,u.namespace.value)}),a({open:I=>{const{indexPath:L}=h.value[I];L.forEach(z=>b(z,L))},close:w,updateActiveIndex:T,handleResize:D});const F=ak(e,0);return()=>{var H;let R=((H=n.default)==null?void 0:H.call(n))??[];const I=[];if(e.mode==="horizontal"&&s.value){const K=wa(R).filter(ee=>(ee==null?void 0:ee.shapeFlag)!==8),q=f.value===-1?K:K.slice(0,f.value),Q=f.value===-1?[]:K.slice(f.value);Q!=null&&Q.length&&e.ellipsis&&(R=q,I.push(Ye(em,{ref:r,index:"sub-menu-more",class:c.e("hide-arrow"),popperOffset:e.popperOffset},{title:()=>Ye(Be,{class:c.e("icon-more")},{default:()=>Ye(e.ellipsisIcon)}),default:()=>Q})))}const L=e.closeOnClickOutside?[[Ll,()=>{p.value.length&&(U.value||(p.value.forEach(K=>t("close",K,O(K))),p.value=[]))}]]:[],z=dt(Ye("ul",{key:String(e.collapse),role:"menubar",ref:s,style:F.value,class:{[u.b()]:!0,[u.m(e.mode)]:!0,[u.m("collapse")]:e.collapse}},[...R,...I]),L);return e.collapseTransition&&e.mode==="vertical"?Ye(U9,()=>z):z}}});const X9=Se({index:{type:X([String,null]),default:null},route:{type:X([String,Object])},disabled:Boolean}),Z9={click:e=>De(e.index)&&be(e.indexPath)},J9={title:String},Yu="ElMenuItem";var Q9=ie({name:Yu,__name:"menu-item",props:X9,emits:Z9,setup(e,{expose:t,emit:n}){const a=e,o=n;pa(a.index)&&ft(Yu,'Missing required prop: "index"');const l=vt(),s=_e(Qh),r=he("menu"),u=he("menu-item");s||Jt(Yu,"can not inject root menu");const{parentMenu:c,indexPath:d}=nk(l,Lt(a,"index")),f=_e(`${Kc}${c.value.uid}`);f||Jt(Yu,"can not inject sub menu");const p=S(()=>a.index===s.activeIndex),g=Rt({index:a.index,indexPath:d,active:p}),v=()=>{a.disabled||(s.handleMenuItemClick({index:a.index,indexPath:d.value,route:a.route}),o("click",g))};return mt(()=>{f.addSubMenu(g),s.addMenuItem(g)}),Pt(()=>{f.removeSubMenu(g),s.removeMenuItem(g)}),t({parentMenu:c,rootMenu:s,active:p,nsMenu:r,nsMenuItem:u,handleClick:v}),(h,m)=>(x(),B("li",{class:M([i(u).b(),i(u).is("active",p.value),i(u).is("disabled",e.disabled)]),role:"menuitem",tabindex:"-1",onClick:v},[i(c).type.name==="ElMenu"&&i(s).props.collapse&&h.$slots.title?(x(),re(i(_n),{key:0,effect:i(s).props.popperEffect,placement:"right","fallback-placements":["left"],"popper-class":i(s).props.popperClass,"popper-style":i(s).props.popperStyle,persistent:i(s).props.persistent,"focus-on-target":""},{content:ne(()=>[ae(h.$slots,"title")]),default:ne(()=>[j("div",{class:M(i(r).be("tooltip","trigger"))},[ae(h.$slots,"default")],2)]),_:3},8,["effect","popper-class","popper-style","persistent"])):(x(),B(He,{key:1},[ae(h.$slots,"default"),ae(h.$slots,"title")],64))],2))}}),ok=Q9,eK=ie({name:"ElMenuItemGroup",__name:"menu-item-group",props:J9,setup(e){const t=he("menu-item-group");return(n,a)=>(x(),B("li",{class:M(i(t).b())},[j("div",{class:M(i(t).e("title"))},[n.$slots.title?ae(n.$slots,"title",{key:1}):(x(),B(He,{key:0},[St(ke(e.title),1)],64))],2),j("ul",null,[ae(n.$slots,"default")])],2))}}),lk=eK;const tK=rt(G9,{MenuItem:ok,MenuItemGroup:lk,SubMenu:em}),nK=Qt(ok),aK=Qt(lk),oK=Qt(em),lK=Se({icon:{type:Ft,default:()=>sP},title:String,content:{type:String,default:""}}),sK={back:()=>!0},rK=["aria-label"];var iK=ie({name:"ElPageHeader",__name:"page-header",props:lK,emits:sK,setup(e,{emit:t}){const n=t,{t:a}=Et(),o=he("page-header");function l(){n("back")}return(s,r)=>(x(),B("div",{class:M([i(o).b(),i(o).is("contentful",!!s.$slots.default),{[i(o).m("has-breadcrumb")]:!!s.$slots.breadcrumb,[i(o).m("has-extra")]:!!s.$slots.extra}])},[s.$slots.breadcrumb?(x(),B("div",{key:0,class:M(i(o).e("breadcrumb"))},[ae(s.$slots,"breadcrumb")],2)):le("v-if",!0),j("div",{class:M(i(o).e("header"))},[j("div",{class:M(i(o).e("left"))},[j("div",{class:M(i(o).e("back")),role:"button",tabindex:"0",onClick:l},[e.icon||s.$slots.icon?(x(),B("div",{key:0,"aria-label":e.title||i(a)("el.pageHeader.title"),class:M(i(o).e("icon"))},[ae(s.$slots,"icon",{},()=>[e.icon?(x(),re(i(Be),{key:0},{default:ne(()=>[(x(),re(ct(e.icon)))]),_:1})):le("v-if",!0)])],10,rK)):le("v-if",!0),j("div",{class:M(i(o).e("title"))},[ae(s.$slots,"title",{},()=>[St(ke(e.title||i(a)("el.pageHeader.title")),1)])],2)],2),J(i(W2),{direction:"vertical"}),j("div",{class:M(i(o).e("content"))},[ae(s.$slots,"content",{},()=>[St(ke(e.content),1)])],2)],2),s.$slots.extra?(x(),B("div",{key:0,class:M(i(o).e("extra"))},[ae(s.$slots,"extra")],2)):le("v-if",!0)],2),s.$slots.default?(x(),B("div",{key:1,class:M(i(o).e("main"))},[ae(s.$slots,"default")],2)):le("v-if",!0)],2))}}),uK=iK;const cK=rt(uK),sk=Symbol("elPaginationKey"),dK=Se({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:Ft}}),fK={click:e=>e instanceof MouseEvent},pK=["disabled","aria-label","aria-disabled"],vK={key:0};var hK=ie({name:"ElPaginationPrev",__name:"prev",props:dK,emits:fK,setup(e){const t=e,{t:n}=Et(),a=S(()=>t.disabled||t.currentPage<=1);return(o,l)=>(x(),B("button",{type:"button",class:"btn-prev",disabled:a.value,"aria-label":o.prevText||i(n)("el.pagination.prev"),"aria-disabled":a.value,onClick:l[0]||(l[0]=s=>o.$emit("click",s))},[o.prevText?(x(),B("span",vK,ke(o.prevText),1)):(x(),re(i(Be),{key:1},{default:ne(()=>[(x(),re(ct(o.prevIcon)))]),_:1}))],8,pK))}}),mK=hK;const gK=Se({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:Ft}}),yK=["disabled","aria-label","aria-disabled"],bK={key:0};var wK=ie({name:"ElPaginationNext",__name:"next",props:gK,emits:["click"],setup(e){const t=e,{t:n}=Et(),a=S(()=>t.disabled||t.currentPage===t.pageCount||t.pageCount===0);return(o,l)=>(x(),B("button",{type:"button",class:"btn-next",disabled:a.value,"aria-label":o.nextText||i(n)("el.pagination.next"),"aria-disabled":a.value,onClick:l[0]||(l[0]=s=>o.$emit("click",s))},[o.nextText?(x(),B("span",bK,ke(o.nextText),1)):(x(),re(i(Be),{key:1},{default:ne(()=>[(x(),re(ct(o.nextIcon)))]),_:1}))],8,yK))}}),CK=wK;const tm=()=>_e(sk,{}),SK=Se({pageSize:{type:Number,required:!0},pageSizes:{type:X(Array),default:()=>nn([10,20,30,40,50,100])},popperClass:{type:String},popperStyle:{type:X([String,Object])},disabled:Boolean,teleported:Boolean,size:{type:String,values:eo},appendSizeTo:String});var kK=ie({name:"ElPaginationSizes",__name:"sizes",props:SK,emits:["page-size-change"],setup(e,{emit:t}){const n=e,a=t,{t:o}=Et(),l=he("pagination"),s=tm(),r=A(n.pageSize);fe(()=>n.pageSizes,(d,f)=>{tn(d,f)||be(d)&&a("page-size-change",d.includes(n.pageSize)?n.pageSize:n.pageSizes[0])}),fe(()=>n.pageSize,d=>{r.value=d});const u=S(()=>n.pageSizes);function c(d){var f;d!==r.value&&(r.value=d,(f=s.handleSizeChange)==null||f.call(s,Number(d)))}return(d,f)=>(x(),B("span",{class:M(i(l).e("sizes"))},[J(i(zl),{"model-value":r.value,disabled:d.disabled,"popper-class":d.popperClass,"popper-style":d.popperStyle,size:d.size,teleported:d.teleported,"validate-event":!1,"append-to":d.appendSizeTo,onChange:c},{default:ne(()=>[(x(!0),B(He,null,Ct(u.value,p=>(x(),re(i(Vc),{key:p,value:p,label:p+i(o)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","popper-style","size","teleported","append-to"])],2))}}),EK=kK;const xK=Se({size:{type:String,values:eo}}),TK=["disabled"];var $K=ie({name:"ElPaginationJumper",__name:"jumper",props:xK,setup(e){const{t}=Et(),n=he("pagination"),{pageCount:a,disabled:o,currentPage:l,changeEvent:s}=tm(),r=A(),u=S(()=>r.value??(l==null?void 0:l.value));function c(f){r.value=f?+f:""}function d(f){f=Math.trunc(+f),s==null||s(f),r.value=void 0}return(f,p)=>(x(),B("span",{class:M(i(n).e("jump")),disabled:i(o)},[j("span",{class:M([i(n).e("goto")])},ke(i(t)("el.pagination.goto")),3),J(i(Dn),{size:f.size,class:M([i(n).e("editor"),i(n).is("in-pagination")]),min:1,max:i(a),disabled:i(o),"model-value":u.value,"validate-event":!1,"aria-label":i(t)("el.pagination.page"),type:"number","onUpdate:modelValue":c,onChange:d},null,8,["size","class","max","disabled","model-value","aria-label"]),j("span",{class:M([i(n).e("classifier")])},ke(i(t)("el.pagination.pageClassifier")),3)],10,TK))}}),OK=$K;const NK=Se({total:{type:Number,default:1e3}}),MK=["disabled"];var RK=ie({name:"ElPaginationTotal",__name:"total",props:NK,setup(e){const{t}=Et(),n=he("pagination"),{disabled:a}=tm();return(o,l)=>(x(),B("span",{class:M(i(n).e("total")),disabled:i(a)},ke(i(t)("el.pagination.total",{total:o.total})),11,MK))}}),IK=RK;const _K=Se({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),PK=["aria-current","aria-label","tabindex"],AK=["tabindex","aria-label"],LK=["aria-current","aria-label","tabindex"],DK=["tabindex","aria-label"],VK=["aria-current","aria-label","tabindex"];var BK=ie({name:"ElPaginationPager",__name:"pager",props:_K,emits:[yt],setup(e,{emit:t}){const n=e,a=t,o=he("pager"),l=he("icon"),{t:s}=Et(),r=A(!1),u=A(!1),c=A(!1),d=A(!1),f=A(!1),p=A(!1),g=S(()=>{const k=n.pagerCount,E=(k-1)/2,T=Number(n.currentPage),$=Number(n.pageCount);let N=!1,O=!1;$>k&&(T>k-E&&(N=!0),T<$-E&&(O=!0));const _=[];if(N&&!O){const P=$-(k-2);for(let D=P;D<$;D++)_.push(D)}else if(!N&&O)for(let P=2;P["more","btn-quickprev",l.b(),o.is("disabled",n.disabled)]),h=S(()=>["more","btn-quicknext",l.b(),o.is("disabled",n.disabled)]),m=S(()=>n.disabled?-1:0);fe(()=>[n.pageCount,n.pagerCount,n.currentPage],([k,E,T])=>{const $=(E-1)/2;let N=!1,O=!1;k>E&&(N=T>E-$,O=T$&&(T=$)),T!==N&&a(yt,T)}return(k,E)=>(x(),B("ul",{class:M(i(o).b()),onClick:C,onKeyup:en(w,["enter"])},[k.pageCount>0?(x(),B("li",{key:0,class:M([[i(o).is("active",k.currentPage===1),i(o).is("disabled",k.disabled)],"number"]),"aria-current":k.currentPage===1,"aria-label":i(s)("el.pagination.currentPage",{pager:1}),tabindex:m.value}," 1 ",10,PK)):le("v-if",!0),r.value?(x(),B("li",{key:1,class:M(v.value),tabindex:m.value,"aria-label":i(s)("el.pagination.prevPages",{pager:k.pagerCount-2}),onMouseenter:E[0]||(E[0]=T=>y(!0)),onMouseleave:E[1]||(E[1]=T=>c.value=!1),onFocus:E[2]||(E[2]=T=>b(!0)),onBlur:E[3]||(E[3]=T=>f.value=!1)},[(c.value||f.value)&&!k.disabled?(x(),re(i(Vl),{key:0})):(x(),re(i(Iy),{key:1}))],42,AK)):le("v-if",!0),(x(!0),B(He,null,Ct(g.value,T=>(x(),B("li",{key:T,class:M([[i(o).is("active",k.currentPage===T),i(o).is("disabled",k.disabled)],"number"]),"aria-current":k.currentPage===T,"aria-label":i(s)("el.pagination.currentPage",{pager:T}),tabindex:m.value},ke(T),11,LK))),128)),u.value?(x(),B("li",{key:2,class:M(h.value),tabindex:m.value,"aria-label":i(s)("el.pagination.nextPages",{pager:k.pagerCount-2}),onMouseenter:E[4]||(E[4]=T=>y()),onMouseleave:E[5]||(E[5]=T=>d.value=!1),onFocus:E[6]||(E[6]=T=>b()),onBlur:E[7]||(E[7]=T=>p.value=!1)},[(d.value||p.value)&&!k.disabled?(x(),re(i(Bl),{key:0})):(x(),re(i(Iy),{key:1}))],42,DK)):le("v-if",!0),k.pageCount>1?(x(),B("li",{key:3,class:M([[i(o).is("active",k.currentPage===k.pageCount),i(o).is("disabled",k.disabled)],"number"]),"aria-current":k.currentPage===k.pageCount,"aria-label":i(s)("el.pagination.currentPage",{pager:k.pageCount}),tabindex:m.value},ke(k.pageCount),11,VK)):le("v-if",!0)],34))}}),FK=BK;const ea=e=>typeof e!="number",zK=Se({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:e=>Fe(e)&&Math.trunc(e)===e&&e>4&&e<22&&e%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:X(Array),default:()=>nn([10,20,30,40,50,100])},popperClass:{type:String,default:""},popperStyle:{type:X([String,Object])},prevText:{type:String,default:""},prevIcon:{type:Ft,default:()=>al},nextText:{type:String,default:""},nextIcon:{type:Ft,default:()=>Jn},teleported:{type:Boolean,default:!0},small:Boolean,size:Sn,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),HK={"update:current-page":e=>Fe(e),"update:page-size":e=>Fe(e),"size-change":e=>Fe(e),change:(e,t)=>Fe(e)&&Fe(t),"current-change":e=>Fe(e),"prev-click":e=>Fe(e),"next-click":e=>Fe(e)},$b="ElPagination";var KK=ie({name:$b,props:zK,emits:HK,setup(e,{emit:t,slots:n}){const{t:a}=Et(),o=he("pagination"),l=vt().vnode.props||{},s=XC(),r=S(()=>e.small?"small":e.size??s.value);bo({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},S(()=>!!e.small));const u="onUpdate:currentPage"in l||"onUpdate:current-page"in l||"onCurrentChange"in l,c="onUpdate:pageSize"in l||"onUpdate:page-size"in l||"onSizeChange"in l,d=S(()=>{if(ea(e.total)&&ea(e.pageCount)||!ea(e.currentPage)&&!u)return!1;if(e.layout.includes("sizes")){if(ea(e.pageCount)){if(!ea(e.total)&&!ea(e.pageSize)&&!c)return!1}else if(!c)return!1}return!0}),f=A(ea(e.defaultPageSize)?10:e.defaultPageSize),p=A(ea(e.defaultCurrentPage)?1:e.defaultCurrentPage),g=S({get(){return ea(e.pageSize)?f.value:e.pageSize},set(k){ea(e.pageSize)&&(f.value=k),c&&(t("update:page-size",k),t("size-change",k))}}),v=S(()=>{let k=0;return ea(e.pageCount)?ea(e.total)||(k=Math.max(1,Math.ceil(e.total/g.value))):k=e.pageCount,k}),h=S({get(){return ea(e.currentPage)?p.value:e.currentPage},set(k){let E=k;k<1?E=1:k>v.value&&(E=v.value),ea(e.currentPage)&&(p.value=E),u&&(t("update:current-page",E),t("current-change",E))}});fe(v,k=>{h.value>k&&(h.value=k)}),fe([h,g],k=>{t(yt,...k)},{flush:"post"});function m(k){h.value=k}function y(k){g.value=k;const E=v.value;h.value>E&&(h.value=E)}function b(){e.disabled||(h.value-=1,t("prev-click",h.value))}function w(){e.disabled||(h.value+=1,t("next-click",h.value))}function C(k,E){k&&(k.props||(k.props={}),k.props.class=[k.props.class,E].join(" "))}return bt(sk,{pageCount:v,disabled:S(()=>e.disabled),currentPage:h,changeEvent:m,handleSizeChange:y}),()=>{var _;if(!d.value)return ft($b,a("el.pagination.deprecationWarning")),null;if(!e.layout||e.hideOnSinglePage&&v.value<=1)return null;const k=[],E=[],T=Ye("div",{class:o.e("rightwrapper")},E),$={prev:Ye(mK,{disabled:e.disabled,currentPage:h.value,prevText:e.prevText,prevIcon:e.prevIcon,onClick:b}),jumper:Ye(OK,{size:r.value}),pager:Ye(FK,{currentPage:h.value,pageCount:v.value,pagerCount:e.pagerCount,onChange:m,disabled:e.disabled}),next:Ye(CK,{disabled:e.disabled,currentPage:h.value,pageCount:v.value,nextText:e.nextText,nextIcon:e.nextIcon,onClick:w}),sizes:Ye(EK,{pageSize:g.value,pageSizes:e.pageSizes,popperClass:e.popperClass,popperStyle:e.popperStyle,disabled:e.disabled,teleported:e.teleported,size:r.value,appendSizeTo:e.appendSizeTo}),slot:((_=n==null?void 0:n.default)==null?void 0:_.call(n))??null,total:Ye(IK,{total:ea(e.total)?0:e.total})},N=e.layout.split(",").map(P=>P.trim());let O=!1;return N.forEach(P=>{if(P==="->"){O=!0;return}O?E.push($[P]):k.push($[P])}),C(k[0],o.is("first")),C(k[k.length-1],o.is("last")),O&&E.length>0&&(C(E[0],o.is("first")),C(E[E.length-1],o.is("last")),k.push(T)),Ye("div",{class:[o.b(),o.is("background",e.background),o.m(r.value)]},k)}}});const WK=rt(KK),jK=Se({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:Dp,default:"primary"},cancelButtonType:{type:String,values:Dp,default:"text"},icon:{type:Ft,default:()=>jP},iconColor:{type:String,default:"#f90"},hideIcon:Boolean,hideAfter:{type:Number,default:200},effect:{...Bt.effect,default:"light"},teleported:Bt.teleported,persistent:Bt.persistent,width:{type:[String,Number],default:150},virtualTriggering:ko.virtualTriggering,virtualRef:ko.virtualRef}),UK={confirm:e=>e instanceof MouseEvent,cancel:e=>e instanceof MouseEvent};var YK=ie({name:"ElPopconfirm",__name:"popconfirm",props:jK,emits:UK,setup(e,{expose:t,emit:n}){const a=e,o=n,{t:l}=Et(),s=he("popconfirm"),r=A(),u=A(),c=S(()=>{var y;return(y=i(r))==null?void 0:y.popperRef}),d=()=>{var y,b;(b=(y=u.value)==null?void 0:y.focus)==null||b.call(y)},f=()=>{var y,b;(b=(y=r.value)==null?void 0:y.onClose)==null||b.call(y)},p=S(()=>({width:an(a.width)})),g=y=>{o("confirm",y),f()},v=y=>{o("cancel",y),f()},h=S(()=>a.confirmButtonText||l("el.popconfirm.confirmButtonText")),m=S(()=>a.cancelButtonText||l("el.popconfirm.cancelButtonText"));return t({popperRef:c,hide:f}),(y,b)=>(x(),re(i(_n),pt({ref_key:"tooltipRef",ref:r,trigger:"click",effect:e.effect},y.$attrs,{"virtual-triggering":e.virtualTriggering,"virtual-ref":e.virtualRef,"popper-class":`${i(s).namespace.value}-popover`,"popper-style":p.value,teleported:e.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":e.hideAfter,persistent:e.persistent,loop:"",onShow:d}),{content:ne(()=>[j("div",{ref_key:"rootRef",ref:u,tabindex:"-1",class:M(i(s).b())},[j("div",{class:M(i(s).e("main"))},[!e.hideIcon&&e.icon?(x(),re(i(Be),{key:0,class:M(i(s).e("icon")),style:je({color:e.iconColor})},{default:ne(()=>[(x(),re(ct(e.icon)))]),_:1},8,["class","style"])):le("v-if",!0),St(" "+ke(e.title),1)],2),j("div",{class:M(i(s).e("action"))},[ae(y.$slots,"actions",{confirm:g,cancel:v},()=>[J(i($n),{size:"small",type:e.cancelButtonType==="text"?"":e.cancelButtonType,text:e.cancelButtonType==="text",onClick:v},{default:ne(()=>[St(ke(m.value),1)]),_:1},8,["type","text"]),J(i($n),{size:"small",type:e.confirmButtonType==="text"?"":e.confirmButtonType,text:e.confirmButtonType==="text",onClick:g},{default:ne(()=>[St(ke(h.value),1)]),_:1},8,["type","text"])])],2)],2)]),default:ne(()=>[y.$slots.reference?ae(y.$slots,"reference",{key:0}):le("v-if",!0)]),_:3},16,["effect","virtual-triggering","virtual-ref","popper-class","popper-style","teleported","hide-after","persistent"]))}}),qK=YK;const GK=rt(qK),XK=Se({trigger:ko.trigger,triggerKeys:ko.triggerKeys,placement:uc.placement,disabled:ko.disabled,visible:Bt.visible,transition:Bt.transition,popperOptions:uc.popperOptions,tabindex:uc.tabindex,content:Bt.content,popperStyle:Bt.popperStyle,popperClass:Bt.popperClass,enterable:{...Bt.enterable,default:!0},effect:{...Bt.effect,default:"light"},teleported:Bt.teleported,appendTo:Bt.appendTo,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),ZK={"update:visible":e=>Vt(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},JK="onUpdate:visible";var QK=ie({name:"ElPopover",__name:"popover",props:XK,emits:ZK,setup(e,{expose:t,emit:n}){const a=e,o=n,l=S(()=>a[JK]),s=he("popover"),r=A(),u=S(()=>{var y;return(y=i(r))==null?void 0:y.popperRef}),c=S(()=>[{width:an(a.width)},a.popperStyle]),d=S(()=>[s.b(),a.popperClass,{[s.m("plain")]:!!a.content}]),f=S(()=>a.transition===`${s.namespace.value}-fade-in-linear`),p=()=>{var y;(y=r.value)==null||y.hide()},g=()=>{o("before-enter")},v=()=>{o("before-leave")},h=()=>{o("after-enter")},m=()=>{o("update:visible",!1),o("after-leave")};return t({popperRef:u,hide:p}),(y,b)=>(x(),re(i(_n),pt({ref_key:"tooltipRef",ref:r},y.$attrs,{trigger:e.trigger,"trigger-keys":e.triggerKeys,placement:e.placement,disabled:e.disabled,visible:e.visible,transition:e.transition,"popper-options":e.popperOptions,tabindex:e.tabindex,content:e.content,offset:e.offset,"show-after":e.showAfter,"hide-after":e.hideAfter,"auto-close":e.autoClose,"show-arrow":e.showArrow,"aria-label":e.title,effect:e.effect,enterable:e.enterable,"popper-class":d.value,"popper-style":c.value,teleported:e.teleported,"append-to":e.appendTo,persistent:e.persistent,"gpu-acceleration":f.value,"onUpdate:visible":l.value,onBeforeShow:g,onBeforeHide:v,onShow:h,onHide:m}),{content:ne(()=>[e.title?(x(),B("div",{key:0,class:M(i(s).e("title")),role:"title"},ke(e.title),3)):le("v-if",!0),ae(y.$slots,"default",{hide:p},()=>[St(ke(e.content),1)])]),default:ne(()=>[y.$slots.reference?ae(y.$slots,"reference",{key:0}):le("v-if",!0)]),_:3},16,["trigger","trigger-keys","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","append-to","persistent","gpu-acceleration","onUpdate:visible"]))}}),eW=QK;const Ob=(e,t)=>{var a;const n=(a=t.arg||t.value)==null?void 0:a.popperRef;n&&(n.triggerRef=e)};var tW={mounted(e,t){Ob(e,t)},updated(e,t){Ob(e,t)}};const nW="popover",rk=G_(tW,nW),aW=rt(eW,{directive:rk}),oW=Se({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:e=>e>=0&&e<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:X(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:X([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:X(Function),default:e=>`${e}%`}}),lW=["aria-valuenow"],sW={viewBox:"0 0 100 100"},rW=["d","stroke","stroke-linecap","stroke-width"],iW=["d","stroke","opacity","stroke-linecap","stroke-width"],uW={key:0};var cW=ie({name:"ElProgress",__name:"progress",props:oW,setup(e){const t={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},n=e,a=he("progress"),o=S(()=>{const w={width:`${n.percentage}%`,animationDuration:`${n.duration}s`},C=b(n.percentage);return C.includes("gradient")?w.background=C:w.backgroundColor=C,w}),l=S(()=>(n.strokeWidth/n.width*100).toFixed(1)),s=S(()=>["circle","dashboard"].includes(n.type)?Number.parseInt(`${50-Number.parseFloat(l.value)/2}`,10):0),r=S(()=>{const w=s.value,C=n.type==="dashboard";return` + M 50 50 + m 0 ${C?"":"-"}${w} + a ${w} ${w} 0 1 1 0 ${C?"-":""}${w*2} + a ${w} ${w} 0 1 1 0 ${C?"":"-"}${w*2} + `}),u=S(()=>2*Math.PI*s.value),c=S(()=>n.type==="dashboard"?.75:1),d=S(()=>`${-1*u.value*(1-c.value)/2}px`),f=S(()=>({strokeDasharray:`${u.value*c.value}px, ${u.value}px`,strokeDashoffset:d.value})),p=S(()=>({strokeDasharray:`${u.value*c.value*(n.percentage/100)}px, ${u.value}px`,strokeDashoffset:d.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),g=S(()=>{let w;return n.color?w=b(n.percentage):w=t[n.status]||t.default,w}),v=S(()=>n.status==="warning"?Ld:n.type==="line"?n.status==="success"?Eh:_o:n.status==="success"?yu:La),h=S(()=>n.type==="line"?12+n.strokeWidth*.4:n.width*.111111+2),m=S(()=>n.format(n.percentage));function y(w){const C=100/w.length;return w.map((k,E)=>De(k)?{color:k,percentage:(E+1)*C}:k).sort((k,E)=>k.percentage-E.percentage)}const b=w=>{var k;const{color:C}=n;if(ze(C))return C(w);if(De(C))return C;{const E=y(C);for(const T of E)if(T.percentage>w)return T.color;return(k=E[E.length-1])==null?void 0:k.color}};return(w,C)=>(x(),B("div",{class:M([i(a).b(),i(a).m(e.type),i(a).is(e.status),{[i(a).m("without-text")]:!e.showText,[i(a).m("text-inside")]:e.textInside}]),role:"progressbar","aria-valuenow":e.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[e.type==="line"?(x(),B("div",{key:0,class:M(i(a).b("bar"))},[j("div",{class:M(i(a).be("bar","outer")),style:je({height:`${e.strokeWidth}px`})},[j("div",{class:M([i(a).be("bar","inner"),{[i(a).bem("bar","inner","indeterminate")]:e.indeterminate},{[i(a).bem("bar","inner","striped")]:e.striped},{[i(a).bem("bar","inner","striped-flow")]:e.stripedFlow}]),style:je(o.value)},[(e.showText||w.$slots.default)&&e.textInside?(x(),B("div",{key:0,class:M(i(a).be("bar","innerText"))},[ae(w.$slots,"default",{percentage:e.percentage},()=>[j("span",null,ke(m.value),1)])],2)):le("v-if",!0)],6)],6)],2)):(x(),B("div",{key:1,class:M(i(a).b("circle")),style:je({height:`${e.width}px`,width:`${e.width}px`})},[(x(),B("svg",sW,[j("path",{class:M(i(a).be("circle","track")),d:r.value,stroke:`var(${i(a).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":e.strokeLinecap,"stroke-width":l.value,fill:"none",style:je(f.value)},null,14,rW),j("path",{class:M(i(a).be("circle","path")),d:r.value,stroke:g.value,fill:"none",opacity:e.percentage?1:0,"stroke-linecap":e.strokeLinecap,"stroke-width":l.value,style:je(p.value)},null,14,iW)]))],6)),(e.showText||w.$slots.default)&&!e.textInside?(x(),B("div",{key:2,class:M(i(a).e("text")),style:je({fontSize:`${h.value}px`})},[ae(w.$slots,"default",{percentage:e.percentage},()=>[e.status?(x(),re(i(Be),{key:1},{default:ne(()=>[(x(),re(ct(v.value)))]),_:1})):(x(),B("span",uW,ke(m.value),1))])],6)):le("v-if",!0)],10,lW))}}),dW=cW;const ik=rt(dW),fW=Se({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:X([Array,Object]),default:()=>nn(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:X([Array,Object]),default:()=>[Lu,Lu,Lu]},voidIcon:{type:Ft,default:()=>rA},disabledVoidIcon:{type:Ft,default:()=>Lu},disabled:{type:Boolean,default:void 0},allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:X(Array),default:()=>nn(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:Sn,clearable:Boolean,...Qn(["ariaLabel"])}),pW={[yt]:e=>Fe(e),[at]:e=>Fe(e)},vW=["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax","tabindex","aria-disabled"],hW=["onMousemove","onClick"];var mW=ie({name:"ElRate",__name:"rate",props:fW,emits:pW,setup(e,{expose:t,emit:n}){function a(I,L){const z=K=>ot(K),H=L[Object.keys(L).map(K=>+K).filter(K=>{const q=L[K];return z(q)&&q.excluded?IK-q)[0]];return z(H)&&H.value||H}const o=e,l=n,s=_e(No,void 0),r=bn(),u=he("rate"),{inputId:c,isLabeledByFormItem:d}=Ta(o,{formItemContext:s}),f=A(as(o.modelValue,0,o.max)),p=A(-1),g=A(!0),v=A([]),h=S(()=>v.value.map(I=>I.$el.clientWidth)),m=S(()=>[u.b(),u.m(r.value)]),y=on(),b=S(()=>u.cssVarBlock({"void-color":o.voidColor,"disabled-void-color":o.disabledVoidColor,"fill-color":E.value})),w=S(()=>{let I="";return o.showScore?I=o.scoreTemplate.replace(/\{\s*value\s*\}/,y.value?`${o.modelValue}`:`${f.value}`):o.showText&&(I=o.texts[Math.ceil(f.value)-1]),I}),C=S(()=>o.modelValue*100-Math.floor(o.modelValue)*100),k=S(()=>be(o.colors)?{[o.lowThreshold]:o.colors[0],[o.highThreshold]:{value:o.colors[1],excluded:!0},[o.max]:o.colors[2]}:o.colors),E=S(()=>{const I=a(f.value,k.value);return ot(I)?"":I}),T=S(()=>{let I="";return y.value?I=`${C.value}%`:o.allowHalf&&(I="50%"),{color:E.value,width:I}}),$=S(()=>{let I=be(o.icons)?[...o.icons]:{...o.icons};return I=za(I),be(I)?{[o.lowThreshold]:I[0],[o.highThreshold]:{value:I[1],excluded:!0},[o.max]:I[2]}:I}),N=S(()=>a(o.modelValue,$.value)),O=S(()=>y.value?De(o.disabledVoidIcon)?o.disabledVoidIcon:za(o.disabledVoidIcon):De(o.voidIcon)?o.voidIcon:za(o.voidIcon)),_=S(()=>a(f.value,$.value));function P(I){const L=y.value&&C.value>0&&I-1o.modelValue,z=o.allowHalf&&g.value&&I-.5<=f.value&&I>f.value;return L||z}function D(I){o.clearable&&I===o.modelValue&&(I=0),l(at,I),o.modelValue!==I&&l(yt,I)}function W(I){y.value||(o.allowHalf&&g.value?D(f.value):D(I))}function U(I){if(y.value)return;const L=zt(I),z=o.allowHalf?.5:1;let H=f.value;switch(L){case Ce.up:case Ce.right:H+=z;break;case Ce.left:case Ce.down:H-=z;break}if(H=as(H,0,o.max),H!==f.value)return I.stopPropagation(),I.preventDefault(),l(at,H),l(yt,H),H}function F(I,L){y.value||(o.allowHalf&&L?(g.value=L.offsetX*2<=h.value[I-1],f.value=g.value?I-.5:I):f.value=I,p.value=I)}function R(){y.value||(o.allowHalf&&(g.value=o.modelValue!==Math.floor(o.modelValue)),f.value=as(o.modelValue,0,o.max),p.value=-1)}return fe(()=>o.modelValue,I=>{f.value=as(I,0,o.max),g.value=o.modelValue!==Math.floor(o.modelValue)}),o.modelValue||l(at,0),t({setCurrentValue:F,resetCurrentValue:R}),(I,L)=>{var z;return x(),B("div",{id:i(c),class:M([m.value,i(u).is("disabled",i(y))]),role:"slider","aria-label":i(d)?void 0:e.ariaLabel||"rating","aria-labelledby":i(d)?(z=i(s))==null?void 0:z.labelId:void 0,"aria-valuenow":f.value,"aria-valuetext":w.value||void 0,"aria-valuemin":"0","aria-valuemax":e.max,style:je(b.value),tabindex:i(y)?void 0:0,"aria-disabled":i(y),onKeydown:U},[(x(!0),B(He,null,Ct(e.max,(H,K)=>(x(),B("span",{key:K,class:M(i(u).e("item")),onMousemove:q=>F(H,q),onMouseleave:R,onClick:q=>W(H)},[J(i(Be),{ref_for:!0,ref_key:"iconRefs",ref:v,class:M([i(u).e("icon"),{hover:p.value===H},i(u).is("active",H<=f.value),i(u).is("focus-visible",H===Math.ceil(f.value||1))])},{default:ne(()=>[dt((x(),re(ct(_.value),null,null,512)),[[Nt,!P(H)&&H<=f.value]]),dt((x(),re(ct(O.value),null,null,512)),[[Nt,!P(H)&&H>f.value]]),dt((x(),re(ct(O.value),{class:M([i(u).em("decimal","box")])},null,8,["class"])),[[Nt,P(H)]]),dt(J(i(Be),{style:je(T.value),class:M([i(u).e("icon"),i(u).e("decimal")])},{default:ne(()=>[(x(),re(ct(N.value)))]),_:1},8,["style","class"]),[[Nt,P(H)]])]),_:2},1032,["class"])],42,hW))),128)),e.showText||e.showScore?(x(),B("span",{key:0,class:M(i(u).e("text")),style:je({color:e.textColor})},ke(w.value),7)):le("v-if",!0)],46,vW)}}}),gW=mW;const yW=rt(gW),ts={primary:"icon-primary",success:"icon-success",warning:"icon-warning",error:"icon-error",info:"icon-info"},Nb={[ts.primary]:Ai,[ts.success]:vP,[ts.warning]:Ld,[ts.error]:xh,[ts.info]:Ai},bW=Se({title:{type:String,default:""},subTitle:{type:String,default:""},icon:{type:String,values:["primary","success","warning","info","error"],default:"info"}});var wW=ie({name:"ElResult",__name:"result",props:bW,setup(e){const t=e,n=he("result"),a=S(()=>{const o=t.icon,l=o&&ts[o]?ts[o]:"icon-info";return{class:l,component:Nb[l]||Nb["icon-info"]}});return(o,l)=>(x(),B("div",{class:M(i(n).b())},[j("div",{class:M(i(n).e("icon"))},[ae(o.$slots,"icon",{},()=>[a.value.component?(x(),re(ct(a.value.component),{key:0,class:M(a.value.class)},null,8,["class"])):le("v-if",!0)])],2),e.title||o.$slots.title?(x(),B("div",{key:0,class:M(i(n).e("title"))},[ae(o.$slots,"title",{},()=>[j("p",null,ke(e.title),1)])],2)):le("v-if",!0),e.subTitle||o.$slots["sub-title"]?(x(),B("div",{key:1,class:M(i(n).e("subtitle"))},[ae(o.$slots,"sub-title",{},()=>[j("p",null,ke(e.subTitle),1)])],2)):le("v-if",!0),o.$slots.extra?(x(),B("div",{key:2,class:M(i(n).e("extra"))},[ae(o.$slots,"extra")],2)):le("v-if",!0)],2))}}),CW=wW;const SW=rt(CW),qp=50,Wc="itemRendered",jc="scroll",qs="forward",Uc="backward",Ma="auto",Wd="smart",Hi="start",go="center",Ki="end",Sr="horizontal",uk="vertical",kW="ltr",ar="rtl",Wi="negative",nm="positive-ascending",am="positive-descending",EW={[Sr]:"left",[uk]:"top"},xW=20,Gp=ao({type:X([Number,Function]),required:!0}),Xp=ao({type:Number}),Zp=ao({type:Number,default:2}),TW=ao({type:String,values:["ltr","rtl"],default:"ltr"}),Jp=ao({type:Number,default:0}),Yc=ao({type:Number,required:!0}),ck=ao({type:String,values:["horizontal","vertical"],default:uk}),dk=Se({className:{type:String,default:""},containerElement:{type:X([String,Object]),default:"div"},data:{type:X(Array),default:()=>nn([])},direction:TW,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},innerProps:{type:X(Object),default:()=>({})},style:{type:X([Object,String,Array])},useIsScrolling:Boolean,width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:Boolean}),fk=Se({cache:Zp,estimatedItemSize:Xp,layout:ck,initScrollOffset:Jp,total:Yc,itemSize:Gp,...dk}),Qp={type:Number,default:6},pk={type:Number,default:0},vk={type:Number,default:2},vs=Se({columnCache:Zp,columnWidth:Gp,estimatedColumnWidth:Xp,estimatedRowHeight:Xp,initScrollLeft:Jp,initScrollTop:Jp,itemKey:{type:X(Function),default:({columnIndex:e,rowIndex:t})=>`${t}:${e}`},rowCache:Zp,rowHeight:Gp,totalColumn:Yc,totalRow:Yc,hScrollbarSize:Qp,vScrollbarSize:Qp,scrollbarStartGap:pk,scrollbarEndGap:vk,role:String,...dk}),hk=Se({alwaysOn:Boolean,class:String,layout:ck,total:Yc,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:Qp,startGap:pk,endGap:vk,visible:Boolean}),rs=(e,t)=>ee===kW||e===ar||e===Sr,Mb=e=>e===ar;let zs=null;function qc(e=!1){if(zs===null||e){const t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";const a=document.createElement("div"),o=a.style;return o.width="100px",o.height="100px",t.appendChild(a),document.body.appendChild(t),t.scrollLeft>0?zs=am:(t.scrollLeft=1,t.scrollLeft===0?zs=Wi:zs=nm),document.body.removeChild(t),zs}return zs}function $W({move:e,size:t,bar:n},a){const o={},l=`translate${n.axis}(${e}px)`;return o[n.size]=t,o.transform=l,a==="horizontal"?o.height="100%":o.width="100%",o}var Rb=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function OW(e,t){return!!(e===t||Rb(e)&&Rb(t))}function NW(e,t){if(e.length!==t.length)return!1;for(var n=0;n{const e=vt().proxy.$props;return S(()=>{const t=(n,a,o)=>({});return e.perfMode?kd(t):MW(t)})},gk=({atEndEdge:e,atStartEdge:t,layout:n},a)=>{let o,l=0;const s=u=>u<0&&t.value||u>0&&e.value;return{hasReachedEdge:s,onWheel:u=>{tl(o);let{deltaX:c,deltaY:d}=u;u.shiftKey&&d!==0&&(c=d,d=0);const f=n.value===Sr?c:d;s(f)||(l+=f,!gd()&&f!==0&&u.preventDefault(),o=_a(()=>{a(l),l=0}))}}},ev=ie({name:"ElVirtualScrollBar",props:hk,emits:["scroll","start-move","stop-move"],setup(e,{emit:t}){const n=S(()=>e.startGap+e.endGap),a=he("virtual-scrollbar"),o=he("scrollbar"),l=A(),s=A();let r=null,u=null;const c=Rt({isDragging:!1,traveled:0}),d=S(()=>wS[e.layout]),f=S(()=>e.clientSize-i(n)),p=S(()=>({position:"absolute",width:`${Sr===e.layout?f.value:e.scrollbarSize}px`,height:`${Sr===e.layout?e.scrollbarSize:f.value}px`,[EW[e.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"})),g=S(()=>{const E=e.ratio;if(E>=100)return Number.POSITIVE_INFINITY;if(E>=50)return E*f.value/100;const T=f.value/3;return Math.floor(Math.min(Math.max(E*f.value/100,xW),T))}),v=S(()=>{if(!Number.isFinite(g.value))return{display:"none"};const E=`${g.value}px`;return $W({bar:d.value,size:E,move:c.traveled},e.layout)}),h=S(()=>Math.ceil(e.clientSize-g.value-i(n))),m=()=>{window.addEventListener("mousemove",C),window.addEventListener("mouseup",w);const E=i(s);E&&(u=document.onselectstart,document.onselectstart=()=>!1,E.addEventListener("touchmove",C,{passive:!0}),E.addEventListener("touchend",w))},y=()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",w),document.onselectstart=u,u=null;const E=i(s);E&&(E.removeEventListener("touchmove",C),E.removeEventListener("touchend",w))},b=E=>{E.stopImmediatePropagation(),!(E.ctrlKey||[1,2].includes(E.button))&&(c.isDragging=!0,c[d.value.axis]=E.currentTarget[d.value.offset]-(E[d.value.client]-E.currentTarget.getBoundingClientRect()[d.value.direction]),t("start-move"),m())},w=()=>{c.isDragging=!1,c[d.value.axis]=0,t("stop-move"),y()},C=E=>{const{isDragging:T}=c;if(!T||!s.value||!l.value)return;const $=c[d.value.axis];if(!$)return;tl(r);const N=(l.value.getBoundingClientRect()[d.value.direction]-E[d.value.client])*-1-(s.value[d.value.offset]-$);r=_a(()=>{c.traveled=Math.max(0,Math.min(N,h.value)),t("scroll",N,h.value)})},k=E=>{const T=Math.abs(E.target.getBoundingClientRect()[d.value.direction]-E[d.value.client])-s.value[d.value.offset]/2;c.traveled=Math.max(0,Math.min(T,h.value)),t("scroll",T,h.value)};return fe(()=>e.scrollFrom,E=>{c.isDragging||(c.traveled=Math.ceil(E*h.value))}),Pt(()=>{y()}),()=>Ye("div",{role:"presentation",ref:l,class:[a.b(),e.class,(e.alwaysOn||c.isDragging)&&"always-on"],style:p.value,onMousedown:Xe(k,["stop","prevent"]),onTouchstartPrevent:b},Ye("div",{ref:s,class:o.e("thumb"),style:v.value,onMousedown:b},[]))}}),yk=({name:e,getOffset:t,getItemSize:n,getItemOffset:a,getEstimatedTotalSize:o,getStartIndexForOffset:l,getStopIndexForStartIndex:s,initCache:r,clearCache:u,validateProps:c})=>ie({name:e??"ElVirtualList",props:fk,emits:[Wc,jc],setup(d,{emit:f,expose:p}){c(d);const g=vt(),v=he("vl"),h=A(r(d,g)),m=mk(),y=A(),b=A(),w=A(),C=A({isScrolling:!1,scrollDir:"forward",scrollOffset:Fe(d.initScrollOffset)?d.initScrollOffset:0,updateRequested:!1,isScrollbarDragging:!1,scrollbarAlwaysOn:d.scrollbarAlwaysOn}),k=S(()=>{const{total:q,cache:Q}=d,{isScrolling:ee,scrollDir:ue,scrollOffset:te}=i(C);if(q===0)return[0,0,0,0];const de=l(d,te,i(h)),se=s(d,de,te,i(h)),Y=!ee||ue===Uc?Math.max(1,Q):1,G=!ee||ue===qs?Math.max(1,Q):1;return[Math.max(0,de-Y),Math.max(0,Math.min(q-1,se+G)),de,se]}),E=S(()=>o(d,i(h))),T=S(()=>ji(d.layout)),$=S(()=>[{position:"relative",[`overflow-${T.value?"x":"y"}`]:"scroll",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:d.direction,height:Fe(d.height)?`${d.height}px`:d.height,width:Fe(d.width)?`${d.width}px`:d.width},d.style]),N=S(()=>{const q=i(E),Q=i(T);return{height:Q?"100%":`${q}px`,pointerEvents:i(C).isScrolling?"none":void 0,width:Q?`${q}px`:"100%",margin:0,boxSizing:"border-box"}}),O=S(()=>T.value?d.width:d.height),{onWheel:_}=gk({atStartEdge:S(()=>C.value.scrollOffset<=0),atEndEdge:S(()=>C.value.scrollOffset>=E.value),layout:S(()=>d.layout)},q=>{var Q,ee;(ee=(Q=w.value).onMouseUp)==null||ee.call(Q),R(Math.min(C.value.scrollOffset+q,E.value-O.value))});At(y,"wheel",_,{passive:!1});const P=()=>{const{total:q}=d;if(q>0){const[te,de,se,Y]=i(k);f(Wc,te,de,se,Y)}const{scrollDir:Q,scrollOffset:ee,updateRequested:ue}=i(C);f(jc,Q,ee,ue)},D=q=>{const{clientHeight:Q,scrollHeight:ee,scrollTop:ue}=q.currentTarget,te=i(C);if(te.scrollOffset===ue)return;const de=Math.max(0,Math.min(ue,ee-Q));C.value={...te,isScrolling:!0,scrollDir:rs(te.scrollOffset,de),scrollOffset:de,updateRequested:!1},Ae(z)},W=q=>{const{clientWidth:Q,scrollLeft:ee,scrollWidth:ue}=q.currentTarget,te=i(C);if(te.scrollOffset===ee)return;const{direction:de}=d;let se=ee;if(de===ar)switch(qc()){case Wi:se=-ee;break;case am:se=ue-Q-ee;break}se=Math.max(0,Math.min(se,ue-Q)),C.value={...te,isScrolling:!0,scrollDir:rs(te.scrollOffset,se),scrollOffset:se,updateRequested:!1},Ae(z)},U=q=>{i(T)?W(q):D(q),P()},F=(q,Q)=>{const ee=(E.value-O.value)/Q*q;R(Math.min(E.value-O.value,ee))},R=q=>{q=Math.max(q,0),q!==i(C).scrollOffset&&(C.value={...i(C),scrollOffset:q,scrollDir:rs(i(C).scrollOffset,q),updateRequested:!0},Ae(z))},I=(q,Q=Ma)=>{const{scrollOffset:ee}=i(C);q=Math.max(0,Math.min(q,d.total-1)),R(t(d,q,Q,ee,i(h)))},L=q=>{const{direction:Q,itemSize:ee,layout:ue}=d,te=m.value(u&&ee,u&&ue,u&&Q);let de;if($t(te,String(q)))de=te[q];else{const se=a(d,q,i(h)),Y=n(d,q,i(h)),G=i(T),V=Q===ar,Z=G?se:0;te[q]=de={position:"absolute",left:V?void 0:`${Z}px`,right:V?`${Z}px`:void 0,top:G?0:`${se}px`,height:G?"100%":`${Y}px`,width:G?`${Y}px`:"100%"}}return de},z=()=>{C.value.isScrolling=!1,Ae(()=>{m.value(-1,null,null)})},H=()=>{const q=y.value;q&&(q.scrollTop=0)};mt(()=>{if(!Mt)return;const{initScrollOffset:q}=d,Q=i(y);Fe(q)&&Q&&(i(T)?Q.scrollLeft=q:Q.scrollTop=q),P()}),Qa(()=>{const{direction:q,layout:Q}=d,{scrollOffset:ee,updateRequested:ue}=i(C),te=i(y);if(ue&&te)if(Q===Sr)if(q===ar)switch(qc()){case Wi:te.scrollLeft=-ee;break;case nm:te.scrollLeft=ee;break;default:{const{clientWidth:de,scrollWidth:se}=te;te.scrollLeft=se-de-ee;break}}else te.scrollLeft=ee;else te.scrollTop=ee}),Ji(()=>{i(y).scrollTop=i(C).scrollOffset});const K={ns:v,clientSize:O,estimatedTotalSize:E,windowStyle:$,windowRef:y,innerRef:b,innerStyle:N,itemsToRender:k,scrollbarRef:w,states:C,getItemStyle:L,onScroll:U,onScrollbarScroll:F,onWheel:_,scrollTo:R,scrollToItem:I,resetScrollTop:H};return p({windowRef:y,innerRef:b,getItemStyleCache:m,scrollTo:R,scrollToItem:I,resetScrollTop:H,states:C}),K},render(d){var z;const{$slots:f,className:p,clientSize:g,containerElement:v,data:h,getItemStyle:m,innerElement:y,itemsToRender:b,innerStyle:w,layout:C,total:k,onScroll:E,onScrollbarScroll:T,states:$,useIsScrolling:N,windowStyle:O,ns:_}=d,[P,D]=b,W=ct(v),U=ct(y),F=[];if(k>0)for(let H=P;H<=D;H++)F.push(Ye(He,{key:H},(z=f.default)==null?void 0:z.call(f,{data:h,index:H,isScrolling:N?$.isScrolling:void 0,style:m(H)})));const R=[Ye(U,pt(d.innerProps,{style:w,ref:"innerRef"}),De(U)?F:{default:()=>F})],I=Ye(ev,{ref:"scrollbarRef",clientSize:g,layout:C,onScroll:T,ratio:g*100/this.estimatedTotalSize,scrollFrom:$.scrollOffset/(this.estimatedTotalSize-g),total:k,alwaysOn:$.scrollbarAlwaysOn}),L=Ye(W,{class:[_.e("window"),p],style:O,onScroll:E,ref:"windowRef",key:0},De(W)?[R]:{default:()=>[R]});return Ye("div",{key:0,class:[_.e("wrapper"),$.scrollbarAlwaysOn?"always-on":""]},[L,I])}}),bk=yk({name:"ElFixedSizeList",getItemOffset:({itemSize:e},t)=>t*e,getItemSize:({itemSize:e})=>e,getEstimatedTotalSize:({total:e,itemSize:t})=>t*e,getOffset:({height:e,total:t,itemSize:n,layout:a,width:o},l,s,r)=>{const u=ji(a)?o:e;De(u)&&Jt("[ElVirtualList]",` + You should set + width/height + to number when your layout is + horizontal/vertical + `);const c=Math.max(0,t*n-u),d=Math.min(c,l*n),f=Math.max(0,(l+1)*n-u);switch(s===Wd&&(r>=f-u&&r<=d+u?s=Ma:s=go),s){case Hi:return d;case Ki:return f;case go:{const p=Math.round(f+(d-f)/2);return pc+Math.floor(u/2)?c:p}case Ma:default:return r>=f&&r<=d?r:rMath.max(0,Math.min(e-1,Math.floor(n/t))),getStopIndexForStartIndex:({height:e,total:t,itemSize:n,layout:a,width:o},l,s)=>{const r=l*n,u=ji(a)?o:e,c=Math.ceil((u+s-r)/n);return Math.max(0,Math.min(t-1,l+c-1))},initCache(){},clearCache:!0,validateProps(){}}),RW="ElDynamicSizeList",Gs=(e,t,n)=>{const{itemSize:a}=e,{items:o,lastVisitedIndex:l}=n;if(t>l){let s=0;if(l>=0){const r=o[l];s=r.offset+r.size}for(let r=l+1;r<=t;r++){const u=a(r);o[r]={offset:s,size:u},s+=u}n.lastVisitedIndex=t}return o[t]},IW=(e,t,n)=>{const{items:a,lastVisitedIndex:o}=t;return(o>0?a[o].offset:0)>=n?wk(e,t,0,o,n):_W(e,t,Math.max(0,o),n)},wk=(e,t,n,a,o)=>{for(;n<=a;){const l=n+Math.floor((a-n)/2),s=Gs(e,l,t).offset;if(s===o)return l;so&&(a=l-1)}return Math.max(0,n-1)},_W=(e,t,n,a)=>{const{total:o}=e;let l=1;for(;n{let o=0;if(a>=e&&(a=e-1),a>=0){const s=t[a];o=s.offset+s.size}const l=(e-a-1)*n;return o+l},PW=yk({name:"ElDynamicSizeList",getItemOffset:(e,t,n)=>Gs(e,t,n).offset,getItemSize:(e,t,{items:n})=>n[t].size,getEstimatedTotalSize:Ib,getOffset:(e,t,n,a,o)=>{const{height:l,layout:s,width:r}=e,u=ji(s)?r:l,c=Gs(e,t,o),d=Ib(e,o),f=Math.max(0,Math.min(d-u,c.offset)),p=Math.max(0,c.offset-u+c.size);switch(n===Wd&&(a>=p-u&&a<=f+u?n=Ma:n=go),n){case Hi:return f;case Ki:return p;case go:return Math.round(p+(f-p)/2);case Ma:default:return a>=p&&a<=f?a:aIW(e,n,t),getStopIndexForStartIndex:(e,t,n,a)=>{const{height:o,total:l,layout:s,width:r}=e,u=ji(s)?r:o,c=Gs(e,t,a),d=n+u;let f=c.offset+c.size,p=t;for(;p{var l,s;n.lastVisitedIndex=Math.min(n.lastVisitedIndex,a-1),(l=t.exposed)==null||l.getItemStyleCache(-1),o&&((s=t.proxy)==null||s.$forceUpdate())},n},clearCache:!1,validateProps:({itemSize:e})=>{typeof e!="function"&&Jt(RW,` + itemSize is required as function, but the given value was ${typeof e} + `)}}),AW=({atXEndEdge:e,atXStartEdge:t,atYEndEdge:n,atYStartEdge:a},o)=>{let l=null,s=0,r=0;const u=(d,f)=>{const p=d<0&&t.value||d>0&&e.value,g=f<0&&a.value||f>0&&n.value;return p||g};return{hasReachedEdge:u,onWheel:d=>{tl(l);let f=d.deltaX,p=d.deltaY;if(Math.abs(f)>Math.abs(p)?p=0:f=0,d.shiftKey&&p!==0&&(f=p,p=0),u(f,p)){d.deltaX!==0&&f===0&&d.preventDefault();return}s+=f,r+=p,d.preventDefault(),l=_a(()=>{o(s,r),s=0,r=0})}}},LW=(e,t,n,a,o,l,s)=>{const r=A(0),u=A(0);let c,d=0,f=0;const p=v=>{tl(c),r.value=v.touches[0].clientX,u.value=v.touches[0].clientY,d=0,f=0},g=v=>{v.preventDefault(),tl(c),d+=r.value-v.touches[0].clientX,f+=u.value-v.touches[0].clientY,r.value=v.touches[0].clientX,u.value=v.touches[0].clientY,c=_a(()=>{const h=a.value-i(l),m=o.value-i(s);n({scrollLeft:Math.min(t.value.scrollLeft+d,h),scrollTop:Math.min(t.value.scrollTop+f,m)}),d=0,f=0})};return At(e,"touchstart",p,{passive:!0}),At(e,"touchmove",g,{passive:!1}),{touchStartX:r,touchStartY:u,handleTouchStart:p,handleTouchMove:g}},Ck=({name:e,clearCache:t,getColumnPosition:n,getColumnStartIndexForOffset:a,getColumnStopIndexForStartIndex:o,getEstimatedTotalHeight:l,getEstimatedTotalWidth:s,getColumnOffset:r,getRowOffset:u,getRowPosition:c,getRowStartIndexForOffset:d,getRowStopIndexForStartIndex:f,initCache:p,injectToInstance:g,validateProps:v})=>ie({name:e??"ElVirtualList",props:vs,emits:[Wc,jc],setup(h,{emit:m,expose:y,slots:b}){const w=he("vl");v(h);const C=vt(),k=A(p(h,C));g==null||g(C,k);const E=A(),T=A(),$=A(),N=A(),O=A({isScrolling:!1,scrollLeft:Fe(h.initScrollLeft)?h.initScrollLeft:0,scrollTop:Fe(h.initScrollTop)?h.initScrollTop:0,updateRequested:!1,xAxisScrollDir:qs,yAxisScrollDir:qs}),_=mk(),P=S(()=>Number.parseInt(`${h.height}`,10)),D=S(()=>Number.parseInt(`${h.width}`,10)),W=S(()=>{const{totalColumn:ye,totalRow:Te,columnCache:we}=h,{isScrolling:Pe,xAxisScrollDir:Ve,scrollLeft:Qe}=i(O);if(ye===0||Te===0)return[0,0,0,0];const tt=a(h,Qe,i(k)),nt=o(h,tt,Qe,i(k)),Oe=!Pe||Ve===Uc?Math.max(1,we):1,qe=!Pe||Ve===qs?Math.max(1,we):1;return[Math.max(0,tt-Oe),Math.max(0,Math.min(ye-1,nt+qe)),tt,nt]}),U=S(()=>{const{totalColumn:ye,totalRow:Te,rowCache:we}=h,{isScrolling:Pe,yAxisScrollDir:Ve,scrollTop:Qe}=i(O);if(ye===0||Te===0)return[0,0,0,0];const tt=d(h,Qe,i(k)),nt=f(h,tt,Qe,i(k)),Oe=!Pe||Ve===Uc?Math.max(1,we):1,qe=!Pe||Ve===qs?Math.max(1,we):1;return[Math.max(0,tt-Oe),Math.max(0,Math.min(Te-1,nt+qe)),tt,nt]}),F=S(()=>l(h,i(k))),R=S(()=>s(h,i(k))),I=S(()=>[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:h.direction,height:Fe(h.height)?`${h.height}px`:h.height,width:Fe(h.width)?`${h.width}px`:h.width},h.style??{}]),L=S(()=>{const ye=`${i(R)}px`;return{height:`${i(F)}px`,pointerEvents:i(O).isScrolling?"none":void 0,width:ye,margin:0,boxSizing:"border-box"}}),z=()=>{const{totalColumn:ye,totalRow:Te}=h;if(ye>0&&Te>0){const[nt,Oe,qe,it]=i(W),[We,et,gt,ve]=i(U);m(Wc,{columnCacheStart:nt,columnCacheEnd:Oe,rowCacheStart:We,rowCacheEnd:et,columnVisibleStart:qe,columnVisibleEnd:it,rowVisibleStart:gt,rowVisibleEnd:ve})}const{scrollLeft:we,scrollTop:Pe,updateRequested:Ve,xAxisScrollDir:Qe,yAxisScrollDir:tt}=i(O);m(jc,{xAxisScrollDir:Qe,scrollLeft:we,yAxisScrollDir:tt,scrollTop:Pe,updateRequested:Ve})},H=ye=>{const{clientHeight:Te,clientWidth:we,scrollHeight:Pe,scrollLeft:Ve,scrollTop:Qe,scrollWidth:tt}=ye.currentTarget,nt=i(O);if(nt.scrollTop===Qe&&nt.scrollLeft===Ve)return;let Oe=Ve;if(Mb(h.direction))switch(qc()){case Wi:Oe=-Ve;break;case am:Oe=tt-we-Ve;break}O.value={...nt,isScrolling:!0,scrollLeft:Oe,scrollTop:Math.max(0,Math.min(Qe,Pe-Te)),updateRequested:!0,xAxisScrollDir:rs(nt.scrollLeft,Oe),yAxisScrollDir:rs(nt.scrollTop,Qe)},Ae(()=>V()),Z(),z()},K=(ye,Te)=>{const we=i(P),Pe=(F.value-we)/Te*ye;ee({scrollTop:Math.min(F.value-we,Pe)})},q=(ye,Te)=>{const we=i(D),Pe=(R.value-we)/Te*ye;ee({scrollLeft:Math.min(R.value-we,Pe)})},{onWheel:Q}=AW({atXStartEdge:S(()=>O.value.scrollLeft<=0),atXEndEdge:S(()=>O.value.scrollLeft>=R.value-i(D)),atYStartEdge:S(()=>O.value.scrollTop<=0),atYEndEdge:S(()=>O.value.scrollTop>=F.value-i(P))},(ye,Te)=>{var Ve,Qe,tt,nt;(Qe=(Ve=T.value)==null?void 0:Ve.onMouseUp)==null||Qe.call(Ve),(nt=(tt=$.value)==null?void 0:tt.onMouseUp)==null||nt.call(tt);const we=i(D),Pe=i(P);ee({scrollLeft:Math.min(O.value.scrollLeft+ye,R.value-we),scrollTop:Math.min(O.value.scrollTop+Te,F.value-Pe)})});At(E,"wheel",Q,{passive:!1});const ee=({scrollLeft:ye=O.value.scrollLeft,scrollTop:Te=O.value.scrollTop})=>{ye=Math.max(ye,0),Te=Math.max(Te,0);const we=i(O);Te===we.scrollTop&&ye===we.scrollLeft||(O.value={...we,xAxisScrollDir:rs(we.scrollLeft,ye),yAxisScrollDir:rs(we.scrollTop,Te),scrollLeft:ye,scrollTop:Te,updateRequested:!0},Ae(()=>V()),Z(),z())},{touchStartX:ue,touchStartY:te,handleTouchStart:de,handleTouchMove:se}=LW(E,O,ee,R,F,D,P),Y=(ye=0,Te=0,we=Ma)=>{const Pe=i(O);Te=Math.max(0,Math.min(Te,h.totalColumn-1)),ye=Math.max(0,Math.min(ye,h.totalRow-1));const Ve=bC(w.namespace.value),Qe=i(k),tt=l(h,Qe),nt=s(h,Qe);ee({scrollLeft:r(h,Te,we,Pe.scrollLeft,Qe,nt>h.width?Ve:0),scrollTop:u(h,ye,we,Pe.scrollTop,Qe,tt>h.height?Ve:0)})},G=(ye,Te)=>{const{columnWidth:we,direction:Pe,rowHeight:Ve}=h,Qe=_.value(t&&we,t&&Ve,t&&Pe),tt=`${ye},${Te}`;if($t(Qe,tt))return Qe[tt];{const[,nt]=n(h,Te,i(k)),Oe=i(k),qe=Mb(Pe),[it,We]=c(h,ye,Oe),[et]=n(h,Te,Oe);return Qe[tt]={position:"absolute",left:qe?void 0:`${nt}px`,right:qe?`${nt}px`:void 0,top:`${We}px`,height:`${it}px`,width:`${et}px`},Qe[tt]}},V=()=>{O.value.isScrolling=!1,Ae(()=>{_.value(-1,null,null)})};mt(()=>{if(!Mt)return;const{initScrollLeft:ye,initScrollTop:Te}=h,we=i(E);we&&(Fe(ye)&&(we.scrollLeft=ye),Fe(Te)&&(we.scrollTop=Te)),z()});const Z=()=>{const{direction:ye}=h,{scrollLeft:Te,scrollTop:we,updateRequested:Pe}=i(O),Ve=i(E);if(Pe&&Ve){if(ye===ar)switch(qc()){case Wi:Ve.scrollLeft=-Te;break;case nm:Ve.scrollLeft=Te;break;default:{const{clientWidth:Qe,scrollWidth:tt}=Ve;Ve.scrollLeft=tt-Qe-Te;break}}else Ve.scrollLeft=Math.max(0,Te);Ve.scrollTop=Math.max(0,we)}},{resetAfterColumnIndex:oe,resetAfterRowIndex:ce,resetAfter:ge}=C.proxy;y({windowRef:E,innerRef:N,getItemStyleCache:_,touchStartX:ue,touchStartY:te,handleTouchStart:de,handleTouchMove:se,scrollTo:ee,scrollToItem:Y,states:O,resetAfterColumnIndex:oe,resetAfterRowIndex:ce,resetAfter:ge});const me=()=>{const{scrollbarAlwaysOn:ye,scrollbarStartGap:Te,scrollbarEndGap:we,totalColumn:Pe,totalRow:Ve}=h,Qe=i(D),tt=i(P),nt=i(R),Oe=i(F),{scrollLeft:qe,scrollTop:it}=i(O);return{horizontalScrollbar:Ye(ev,{ref:T,alwaysOn:ye,startGap:Te,endGap:we,class:w.e("horizontal"),clientSize:Qe,layout:"horizontal",onScroll:q,ratio:Qe*100/nt,scrollFrom:qe/(nt-Qe),total:Ve,visible:!0}),verticalScrollbar:Ye(ev,{ref:$,alwaysOn:ye,startGap:Te,endGap:we,class:w.e("vertical"),clientSize:tt,layout:"vertical",onScroll:K,ratio:tt*100/Oe,scrollFrom:it/(Oe-tt),total:Pe,visible:!0})}},Me=()=>{var it;const[ye,Te]=i(W),[we,Pe]=i(U),{data:Ve,totalColumn:Qe,totalRow:tt,useIsScrolling:nt,itemKey:Oe}=h,qe=[];if(tt>0&&Qe>0)for(let We=we;We<=Pe;We++)for(let et=ye;et<=Te;et++){const gt=Oe({columnIndex:et,data:Ve,rowIndex:We});qe.push(Ye(He,{key:gt},(it=b.default)==null?void 0:it.call(b,{columnIndex:et,data:Ve,isScrolling:nt?i(O).isScrolling:void 0,style:G(We,et),rowIndex:We})))}return qe},Ie=()=>{const ye=ct(h.innerElement),Te=Me();return[Ye(ye,pt(h.innerProps,{style:i(L),ref:N}),De(ye)?Te:{default:()=>Te})]};return()=>{const ye=ct(h.containerElement),{horizontalScrollbar:Te,verticalScrollbar:we}=me(),Pe=Ie();return Ye("div",{key:0,class:w.e("wrapper"),role:h.role},[Ye(ye,{class:h.className,style:i(I),onScroll:H,ref:E},De(ye)?Pe:{default:()=>Pe}),Te,we])}}}),_b="ElFixedSizeGrid",DW=Ck({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:e},t)=>[e,t*e],getRowPosition:({rowHeight:e},t)=>[e,t*e],getEstimatedTotalHeight:({totalRow:e,rowHeight:t})=>t*e,getEstimatedTotalWidth:({totalColumn:e,columnWidth:t})=>t*e,getColumnOffset:({totalColumn:e,columnWidth:t,width:n},a,o,l,s,r)=>{n=Number(n);const u=Math.max(0,e*t-n),c=Math.min(u,a*t),d=Math.max(0,a*t-n+r+t);switch(o==="smart"&&(l>=d-n&&l<=c+n?o=Ma:o=go),o){case Hi:return c;case Ki:return d;case go:{const f=Math.round(d+(c-d)/2);return fu+Math.floor(n/2)?u:f}case Ma:default:return l>=d&&l<=c?l:d>c||l{t=Number(t);const u=Math.max(0,n*e-t),c=Math.min(u,a*e),d=Math.max(0,a*e-t+r+e);switch(o===Wd&&(l>=d-t&&l<=c+t?o=Ma:o=go),o){case Hi:return c;case Ki:return d;case go:{const f=Math.round(d+(c-d)/2);return fu+Math.floor(t/2)?u:f}case Ma:default:return l>=d&&l<=c?l:d>c||lMath.max(0,Math.min(t-1,Math.floor(n/e))),getColumnStopIndexForStartIndex:({columnWidth:e,totalColumn:t,width:n},a,o)=>{const l=a*e,s=Math.ceil((n+o-l)/e);return Math.max(0,Math.min(t-1,a+s-1))},getRowStartIndexForOffset:({rowHeight:e,totalRow:t},n)=>Math.max(0,Math.min(t-1,Math.floor(n/e))),getRowStopIndexForStartIndex:({rowHeight:e,totalRow:t,height:n},a,o)=>{const l=a*e,s=Math.ceil((n+o-l)/e);return Math.max(0,Math.min(t-1,a+s-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:e,rowHeight:t})=>{Fe(e)||Jt(_b,` + "columnWidth" must be passed as number, + instead ${typeof e} was given. + `),Fe(t)||Jt(_b,` + "columnWidth" must be passed as number, + instead ${typeof t} was given. + `)}}),{max:Gc,min:Sk,floor:kk}=Math,Pb="ElDynamicSizeGrid",VW={column:"columnWidth",row:"rowHeight"},tv={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},Fo=(e,t,n,a)=>{const[o,l,s]=[n[a],e[VW[a]],n[tv[a]]];if(t>s){let r=0;if(s>=0){const u=o[s];r=u.offset+u.size}for(let u=s+1;u<=t;u++){const c=l(u);o[u]={offset:r,size:c},r+=c}n[tv[a]]=t}return o[t]},Ek=(e,t,n,a,o,l)=>{for(;n<=a;){const s=n+kk((a-n)/2),r=Fo(e,s,t,l).offset;if(r===o)return s;r{const l=o==="column"?e.totalColumn:e.totalRow;let s=1;for(;n{const[o,l]=[t[a],t[tv[a]]];return(l>0?o[l].offset:0)>=n?Ek(e,t,0,l,n,a):BW(e,t,Gc(0,l),n,a)},xk=({totalRow:e},{estimatedRowHeight:t,lastVisitedRowIndex:n,row:a})=>{let o=0;if(n>=e&&(n=e-1),n>=0){const s=a[n];o=s.offset+s.size}const l=(e-n-1)*t;return o+l},Tk=({totalColumn:e},{column:t,estimatedColumnWidth:n,lastVisitedColumnIndex:a})=>{let o=0;if(a>e&&(a=e-1),a>=0){const s=t[a];o=s.offset+s.size}const l=(e-a-1)*n;return o+l},FW={column:Tk,row:xk},Lb=(e,t,n,a,o,l,s)=>{const[r,u]=[l==="row"?e.height:e.width,FW[l]],c=Fo(e,t,o,l),d=Gc(0,Sk(u(e,o)-r,c.offset)),f=Gc(0,c.offset-r+s+c.size);switch(n===Wd&&(a>=f-r&&a<=d+r?n=Ma:n=go),n){case Hi:return d;case Ki:return f;case go:return Math.round(f+(d-f)/2);case Ma:default:return a>=f&&a<=d?a:f>d||a{const a=Fo(e,t,n,"column");return[a.size,a.offset]},getRowPosition:(e,t,n)=>{const a=Fo(e,t,n,"row");return[a.size,a.offset]},getColumnOffset:(e,t,n,a,o,l)=>Lb(e,t,n,a,o,"column",l),getRowOffset:(e,t,n,a,o,l)=>Lb(e,t,n,a,o,"row",l),getColumnStartIndexForOffset:(e,t,n)=>Ab(e,n,t,"column"),getColumnStopIndexForStartIndex:(e,t,n,a)=>{const o=Fo(e,t,a,"column"),l=n+e.width;let s=o.offset+o.size,r=t;for(;rAb(e,n,t,"row"),getRowStopIndexForStartIndex:(e,t,n,a)=>{const{totalRow:o,height:l}=e,s=Fo(e,t,a,"row"),r=n+l;let u=s.size+s.offset,c=t;for(;c{const n=({columnIndex:l,rowIndex:s},r)=>{var u,c;r=xt(r)?!0:r,Fe(l)&&(t.value.lastVisitedColumnIndex=Math.min(t.value.lastVisitedColumnIndex,l-1)),Fe(s)&&(t.value.lastVisitedRowIndex=Math.min(t.value.lastVisitedRowIndex,s-1)),(u=e.exposed)==null||u.getItemStyleCache.value(-1,null,null),r&&((c=e.proxy)==null||c.$forceUpdate())},a=(l,s)=>{n({columnIndex:l},s)},o=(l,s)=>{n({rowIndex:l},s)};Object.assign(e.proxy,{resetAfterColumnIndex:a,resetAfterRowIndex:o,resetAfter:n})},initCache:({estimatedColumnWidth:e=qp,estimatedRowHeight:t=qp})=>({column:{},estimatedColumnWidth:e,estimatedRowHeight:t,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:e,rowHeight:t})=>{ze(e)||Jt(Pb,` + "columnWidth" must be passed as function, + instead ${typeof e} was given. + `),ze(t)||Jt(Pb,` + "rowHeight" must be passed as function, + instead ${typeof t} was given. + `)}}),om=Symbol("ElSelectV2Injection"),HW=Se({allowCreate:Boolean,autocomplete:{type:X(String),default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:Ft,default:_o},effect:{type:X(String),default:"light"},collapseTags:Boolean,collapseTagsTooltip:Boolean,tagTooltip:{type:X(Object),default:()=>({})},maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:{type:Boolean,default:void 0},estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:{type:X(Function)},height:{type:Number,default:274},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,modelValue:{type:X([Array,String,Number,Boolean,Object]),default:void 0},multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:{type:X(Function)},reserveKeyword:{type:Boolean,default:!0},options:{type:X(Array),required:!0},placeholder:{type:String},teleported:Bt.teleported,persistent:{type:Boolean,default:!0},popperClass:Bt.popperClass,popperStyle:Bt.popperStyle,popperOptions:{type:X(Object),default:()=>({})},remote:Boolean,debounce:{type:Number,default:300},size:Sn,props:{type:X(Object),default:()=>Dc},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:Boolean,validateEvent:{type:Boolean,default:!0},offset:{type:Number,default:12},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},placement:{type:X(String),values:Mo,default:"bottom-start"},fallbackPlacements:{type:X(Array),default:["bottom-start","top-start","right","left"]},tagType:{...ol.type,default:"info"},tagEffect:{...ol.effect,default:"light"},tabindex:{type:[String,Number],default:0},appendTo:Bt.appendTo,fitInputWidth:{type:[Boolean,Number],default:!0,validator(e){return Vt(e)||Fe(e)}},suffixIcon:{type:Ft,default:Io},...Is,...Qn(["ariaLabel"])}),KW=Se({data:Array,disabled:Boolean,hovering:Boolean,item:{type:X(Object),required:!0},index:Number,style:Object,selected:Boolean,created:Boolean}),WW={[at]:e=>!0,[yt]:e=>!0,"remove-tag":e=>!0,"visible-change":e=>!0,focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0},jW={hover:e=>Fe(e),select:(e,t)=>!0};var UW=ie({props:{item:{type:Object,required:!0},style:{type:Object},height:Number},setup(){return{ns:he("select")}}});function YW(e,t,n,a,o,l){return x(),B("div",{class:M(e.ns.be("group","title")),style:je({...e.style,lineHeight:`${e.height}px`})},ke(e.item.label),7)}var qW=kn(UW,[["render",YW]]);function GW(e,{emit:t}){return{hoverItem:()=>{e.disabled||t("hover",e.index)},selectOptionClick:()=>{e.disabled||t("select",e.item,e.index)}}}var XW=ie({props:KW,emits:jW,setup(e,{emit:t}){const n=_e(om),a=he("select"),{hoverItem:o,selectOptionClick:l}=GW(e,{emit:t}),{getLabel:s}=Cu(n.props),r=n.contentId;return{ns:a,contentId:r,hoverItem:o,handleMousedown:c=>{let d=c.target;const f=c.currentTarget;for(;d&&d!==f;){if(ws(d))return;d=d.parentElement}c.preventDefault()},selectOptionClick:l,getLabel:s}}});const ZW=["id","aria-selected","aria-disabled"];function JW(e,t,n,a,o,l){return x(),B("li",{id:`${e.contentId}-${e.index}`,role:"option","aria-selected":e.selected,"aria-disabled":e.disabled||void 0,style:je(e.style),class:M([e.ns.be("dropdown","item"),e.ns.is("selected",e.selected),e.ns.is("disabled",e.disabled),e.ns.is("created",e.created),e.ns.is("hovering",e.hovering)]),onMousemove:t[0]||(t[0]=(...s)=>e.hoverItem&&e.hoverItem(...s)),onMousedown:t[1]||(t[1]=(...s)=>e.handleMousedown&&e.handleMousedown(...s)),onClick:t[2]||(t[2]=Xe((...s)=>e.selectOptionClick&&e.selectOptionClick(...s),["stop"]))},[ae(e.$slots,"default",{item:e.item,index:e.index,disabled:e.disabled},()=>[j("span",null,ke(e.getLabel(e.item)),1)])],46,ZW)}var QW=kn(XW,[["render",JW]]);const e7={loading:Boolean,data:{type:Array,required:!0},hoveringIndex:Number,width:Number,id:String,ariaLabel:String};var t7=ie({name:"ElSelectDropdown",props:e7,setup(e,{slots:t,expose:n}){const a=_e(om),o=he("select"),{getLabel:l,getValue:s,getDisabled:r}=Cu(a.props),u=A([]),c=A(),d=S(()=>e.data.length);fe(()=>d.value,()=>{var O,_;(_=(O=a.tooltipRef.value)==null?void 0:O.updatePopper)==null||_.call(O)});const f=S(()=>xt(a.props.estimatedOptionHeight)),p=S(()=>f.value?{itemSize:a.props.itemHeight}:{estimatedSize:a.props.estimatedOptionHeight,itemSize:O=>u.value[O]}),g=(O=[],_)=>{const{props:{valueKey:P}}=a;return ot(_)?O&&O.some(D=>Kt(mn(D,P))===mn(_,P)):O.includes(_)},v=(O,_)=>{if(ot(_)){const{valueKey:P}=a.props;return mn(O,P)===mn(_,P)}else return O===_},h=(O,_)=>a.props.multiple?g(O,s(_)):v(O,s(_)),m=(O,_)=>{const{disabled:P,multiple:D,multipleLimit:W}=a.props;return P||!_&&(D?W>0&&O.length>=W:!1)},y=O=>e.hoveringIndex===O;n({listRef:c,isSized:f,isItemDisabled:m,isItemHovering:y,isItemSelected:h,scrollToItem:O=>{const _=c.value;_&&_.scrollToItem(O)},resetScrollTop:()=>{const O=c.value;O&&O.resetScrollTop()}});const C=O=>{const{index:_,data:P,style:D}=O,W=i(f),{itemSize:U,estimatedSize:F}=i(p),{modelValue:R}=a.props,{onSelect:I,onHover:L}=a,z=P[_];if(z.type==="Group")return J(qW,{item:z,style:D,height:W?U:F},null);const H=h(R,z),K=m(R,H),q=y(_);return J(QW,pt(O,{selected:H,disabled:r(z)||K,created:!!z.created,hovering:q,item:z,onSelect:I,onHover:L}),{default:Q=>{var ee;return((ee=t.default)==null?void 0:ee.call(t,Q))||J("span",null,[l(z)])}})},{onKeyboardNavigate:k,onKeyboardSelect:E}=a,T=()=>{k("forward")},$=()=>{k("backward")},N=O=>{const _=zt(O),{tab:P,esc:D,down:W,up:U,enter:F,numpadEnter:R}=Ce;switch([D,W,U,F,R].includes(_)&&(O.preventDefault(),O.stopPropagation()),_){case P:case D:break;case W:T();break;case U:$();break;case F:case R:E();break}};return()=>{var R,I,L,z;const{data:O,width:_}=e,{height:P,multiple:D,scrollbarAlwaysOn:W}=a.props,U=S(()=>Tc?!0:W),F=i(f)?bk:PW;return J("div",{class:[o.b("dropdown"),o.is("multiple",D)],style:{width:`${_}px`}},[(R=t.header)==null?void 0:R.call(t),((I=t.loading)==null?void 0:I.call(t))||((L=t.empty)==null?void 0:L.call(t))||J(F,pt({ref:c},i(p),{className:o.be("dropdown","list"),scrollbarAlwaysOn:U.value,data:O,height:P,width:_,total:O.length,innerElement:"ul",innerProps:{id:e.id,role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},onKeydown:N}),{default:H=>J(C,H,null)}),(z=t.footer)==null?void 0:z.call(t)])}}});function n7(e,t){const{aliasProps:n,getLabel:a,getValue:o}=Cu(e),l=A(0),s=A(),r=S(()=>e.allowCreate&&e.filterable);fe(()=>e.options,g=>{const v=new Set(g.map(h=>a(h)));t.createdOptions=t.createdOptions.filter(h=>!v.has(a(h)))});function u(g){const v=h=>a(h)===g;return e.options&&e.options.some(v)||t.createdOptions.some(v)}function c(g){r.value&&(e.multiple&&g.created?l.value++:s.value=g)}function d(g){if(r.value)if(g&&g.length>0){if(u(g)){t.createdOptions=t.createdOptions.filter(h=>a(h)!==t.previousQuery);return}const v={[n.value.value]:g,[n.value.label]:g,created:!0,[n.value.disabled]:!1};t.createdOptions.length>=l.value?t.createdOptions[l.value]=v:t.createdOptions.push(v)}else if(e.multiple)t.createdOptions.length=l.value;else{const v=s.value;t.createdOptions.length=0,v&&v.created&&t.createdOptions.push(v)}}function f(g){if(!r.value||!g||!g.created||g.created&&e.reserveKeyword&&t.inputValue===a(g))return;const v=t.createdOptions.findIndex(h=>o(h)===o(g));~v&&(t.createdOptions.splice(v,1),l.value--)}function p(){r.value&&(t.createdOptions.length=0,l.value=0)}return{createNewOption:d,removeNewOption:f,selectNewOption:c,clearAllNewOption:p}}const a7=(e,t)=>{const{t:n}=Et(),a=fn(),o=he("select"),l=he("input"),{form:s,formItem:r}=Pn(),{inputId:u}=Ta(e,{formItemContext:r}),{aliasProps:c,getLabel:d,getValue:f,getDisabled:p,getOptions:g}=Cu(e),{valueOnClear:v,isEmptyValue:h}=gu(e),m=Rt({inputValue:"",cachedOptions:[],createdOptions:[],hoveringIndex:-1,inputHovering:!1,selectionWidth:0,collapseItemWidth:0,previousQuery:null,previousValue:void 0,selectedLabel:"",menuVisibleOnFocus:!1,isBeforeHide:!1}),y=A(-1),b=A(!1),w=A(),C=A(),k=A(),E=A(),T=A(),$=A(),N=A(),O=A(),_=A(),P=A(),{isComposing:D,handleCompositionStart:W,handleCompositionEnd:U,handleCompositionUpdate:F}=mu({afterComposition:xe=>Gt(xe)}),R=on(),{wrapperRef:I,isFocused:L,handleBlur:z}=dl(T,{disabled:R,afterFocus(){e.automaticDropdown&&!Q.value&&(Q.value=!0,m.menuVisibleOnFocus=!0)},beforeBlur(xe){var lt,wt;return((lt=k.value)==null?void 0:lt.isFocusInsideContent(xe))||((wt=E.value)==null?void 0:wt.isFocusInsideContent(xe))},afterBlur(){var xe;Q.value=!1,m.menuVisibleOnFocus=!1,e.validateEvent&&((xe=r==null?void 0:r.validate)==null||xe.call(r,"blur").catch(lt=>ft(lt)))}}),H=S(()=>Me("")),K=S(()=>e.loading?!1:e.options.length>0||m.createdOptions.length>0),q=A([]),Q=A(!1),ee=S(()=>(s==null?void 0:s.statusIcon)??!1),ue=S(()=>{const xe=q.value.length*e.itemHeight;return xe>e.height?e.height:xe}),te=S(()=>e.multiple?be(e.modelValue)&&e.modelValue.length>0:!h(e.modelValue)),de=S(()=>e.clearable&&!R.value&&te.value&&(L.value||m.inputHovering)),se=S(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),Y=S(()=>se.value&&o.is("reverse",Q.value)),G=S(()=>(r==null?void 0:r.validateState)||""),V=S(()=>{if(G.value)return Dd[G.value]}),Z=S(()=>e.remote?e.debounce:0),oe=S(()=>e.remote&&!m.inputValue&&!K.value),ce=S(()=>e.loading?e.loadingText||n("el.select.loading"):e.filterable&&m.inputValue&&K.value&&q.value.length===0?e.noMatchText||n("el.select.noMatch"):K.value?null:e.noDataText||n("el.select.noData")),ge=S(()=>e.filterable&&ze(e.filterMethod)),me=S(()=>e.filterable&&e.remote&&ze(e.remoteMethod)),Me=xe=>{const lt=new RegExp(lh(xe),"i"),wt=kt=>ge.value||me.value?!0:xe?lt.test(d(kt)||""):!0;return e.loading?[]:[...m.createdOptions,...e.options].reduce((kt,An)=>{const ca=g(An);if(be(ca)){const Br=ca.filter(wt);Br.length>0&&kt.push({label:d(An),type:"Group"},...Br)}else(e.remote||wt(An))&&kt.push(An);return kt},[])},Ie=()=>{q.value=Me(m.inputValue)},Re=S(()=>{const xe=new Map;return H.value.forEach((lt,wt)=>{xe.set(Ge(f(lt)),{option:lt,index:wt})}),xe}),ye=S(()=>{const xe=new Map;return q.value.forEach((lt,wt)=>{xe.set(Ge(f(lt)),{option:lt,index:wt})}),xe}),Te=S(()=>q.value.every(xe=>p(xe))),we=bn(),Pe=S(()=>we.value==="small"?"small":"default"),Ve=()=>{var lt;if(Fe(e.fitInputWidth)){y.value=e.fitInputWidth;return}const xe=((lt=w.value)==null?void 0:lt.offsetWidth)||200;!e.fitInputWidth&&K.value?Ae(()=>{y.value=Math.max(xe,Qe())}):y.value=xe},Qe=()=>{var ca,Br;const xe=document.createElement("canvas").getContext("2d"),lt=o.be("dropdown","item"),wt=(((Br=(ca=O.value)==null?void 0:ca.listRef)==null?void 0:Br.innerRef)||document).querySelector(`.${lt}`);if(wt===null||xe===null)return 0;const kt=getComputedStyle(wt),An=Number.parseFloat(kt.paddingLeft)+Number.parseFloat(kt.paddingRight);return xe.font=`bold ${kt.font.replace(new RegExp(`\\b${kt.fontWeight}\\b`),"")}`,q.value.reduce((jE,UE)=>{const YE=xe.measureText(d(UE));return Math.max(YE.width,jE)},0)+An},tt=()=>{if(!C.value)return 0;const xe=window.getComputedStyle(C.value);return Number.parseFloat(xe.gap||"6px")},nt=S(()=>{const xe=tt(),lt=e.filterable?xe+hd:0;return{maxWidth:`${P.value&&e.maxCollapseTags===1?m.selectionWidth-m.collapseItemWidth-xe-lt:m.selectionWidth-lt}px`}}),Oe=S(()=>({maxWidth:`${m.selectionWidth}px`})),qe=S(()=>be(e.modelValue)?e.modelValue.length===0&&!m.inputValue:e.filterable?!m.inputValue:!0),it=S(()=>{const xe=e.placeholder??n("el.select.placeholder");return e.multiple||!te.value?xe:m.selectedLabel}),We=S(()=>{var xe,lt;return(lt=(xe=k.value)==null?void 0:xe.popperRef)==null?void 0:lt.contentRef}),et=S(()=>{if(e.multiple){const xe=e.modelValue.length;if(xe>0&&ye.value.has(e.modelValue[xe-1])){const{index:lt}=ye.value.get(e.modelValue[xe-1]);return lt}}else if(!h(e.modelValue)&&ye.value.has(e.modelValue)){const{index:xe}=ye.value.get(e.modelValue);return xe}return-1}),gt=S({get(){return Q.value&&(e.loading||!oe.value||e.remote&&!!a.empty)&&(!b.value||!la(m.previousQuery)||K.value)},set(xe){Q.value=xe}}),ve=S(()=>e.multiple?e.collapseTags?m.cachedOptions.slice(0,e.maxCollapseTags):m.cachedOptions:[]),Le=S(()=>e.multiple?e.collapseTags?m.cachedOptions.slice(e.maxCollapseTags):[]:[]),{createNewOption:pe,removeNewOption:$e,selectNewOption:ut,clearAllNewOption:It}=n7(e,m),Yt=xe=>{var lt;R.value||e.filterable&&Q.value&&xe&&!((lt=N.value)!=null&<.contains(xe.target))||(m.menuVisibleOnFocus?m.menuVisibleOnFocus=!1:Q.value=!Q.value)},Ne=()=>{m.inputValue.length>0&&!Q.value&&(Q.value=!0),pe(m.inputValue),Ae(()=>{Ze(m.inputValue)})},Ke=eu(()=>{Ne(),b.value=!1},Z),Ze=xe=>{m.previousQuery===xe||D.value||(m.previousQuery=xe,e.filterable&&ze(e.filterMethod)?e.filterMethod(xe):e.filterable&&e.remote&&ze(e.remoteMethod)&&e.remoteMethod(xe),e.defaultFirstOption&&(e.filterable||e.remote)&&q.value.length?Ae(rn):Ae(Tt))},rn=()=>{const xe=q.value.filter(kt=>!kt.disabled&&kt.type!=="Group"),lt=xe.find(kt=>kt.created),wt=xe[0];m.hoveringIndex=Ue(q.value,lt||wt)},Dt=xe=>{tn(e.modelValue,xe)||t(yt,xe)},qt=xe=>{t(at,xe),Dt(xe),m.previousValue=e.multiple?String(xe):xe,Ae(()=>{if(e.multiple&&be(e.modelValue)){const lt=m.cachedOptions.slice(),wt=e.modelValue.map(kt=>Dr(kt,lt));tn(m.cachedOptions,wt)||(m.cachedOptions=wt)}else Ps(!0)})},Ue=(xe=[],lt)=>{if(!ot(lt))return xe.indexOf(lt);const wt=e.valueKey;let kt=-1;return xe.some((An,ca)=>mn(An,wt)===mn(lt,wt)?(kt=ca,!0):!1),kt},Ge=xe=>ot(xe)?mn(xe,e.valueKey):xe,ht=()=>{Ve()},En=()=>{m.selectionWidth=Number.parseFloat(window.getComputedStyle(C.value).width)},lo=()=>{m.collapseItemWidth=P.value.getBoundingClientRect().width},Da=()=>{var xe,lt;(lt=(xe=k.value)==null?void 0:xe.updatePopper)==null||lt.call(xe)},xu=()=>{var xe,lt;(lt=(xe=E.value)==null?void 0:xe.updatePopper)==null||lt.call(xe)},Kl=xe=>{const lt=f(xe);if(e.multiple){let wt=e.modelValue.slice();const kt=Ue(wt,lt);kt>-1?(wt=[...wt.slice(0,kt),...wt.slice(kt+1)],m.cachedOptions.splice(kt,1),$e(xe)):(e.multipleLimit<=0||wt.length{let wt=e.modelValue.slice();const kt=Ue(wt,f(lt));kt>-1&&!R.value&&(wt=[...e.modelValue.slice(0,kt),...e.modelValue.slice(kt+1)],m.cachedOptions.splice(kt,1),qt(wt),t("remove-tag",f(lt)),$e(lt)),xe.stopPropagation(),Po()},Po=()=>{var xe;(xe=T.value)==null||xe.focus()},Xd=()=>{var xe;if(Q.value){Q.value=!1,Ae(()=>{var lt;return(lt=T.value)==null?void 0:lt.blur()});return}(xe=T.value)==null||xe.blur()},Zd=()=>{m.inputValue.length>0?m.inputValue="":Q.value=!1},Jd=xe=>Gw(xe,lt=>!m.cachedOptions.some(wt=>f(wt)===lt&&p(wt))),Qd=xe=>{const lt=zt(xe);if(e.multiple&<!==Ce.delete&&m.inputValue.length===0){xe.preventDefault();const wt=e.modelValue.slice(),kt=Jd(wt);if(kt<0)return;const An=wt[kt];wt.splice(kt,1);const ca=m.cachedOptions[kt];m.cachedOptions.splice(kt,1),$e(ca),qt(wt),t("remove-tag",An)}},ef=()=>{let xe;be(e.modelValue)?xe=[]:xe=v.value,m.selectedLabel="",Q.value=!1,qt(xe),t("clear"),It(),Po()},hl=(xe,lt=void 0)=>{const wt=q.value;if(!["forward","backward"].includes(xe)||R.value||wt.length<=0||Te.value||D.value)return;if(!Q.value)return Yt();xt(lt)&&(lt=m.hoveringIndex);let kt=-1;xe==="forward"?(kt=lt+1,kt>=wt.length&&(kt=0)):xe==="backward"&&(kt=lt-1,(kt<0||kt>=wt.length)&&(kt=wt.length-1));const An=wt[kt];if(p(An)||An.type==="Group")return hl(xe,kt);m.hoveringIndex=kt,Ao(kt)},Ee=()=>{if(Q.value)~m.hoveringIndex&&q.value[m.hoveringIndex]&&Kl(q.value[m.hoveringIndex]);else return Yt()},Je=xe=>{m.hoveringIndex=xe??-1},Tt=()=>{if(!e.multiple)m.hoveringIndex=q.value.findIndex(xe=>Ge(f(xe))===Ge(e.modelValue));else{const xe=e.modelValue.length;if(xe>0){const lt=e.modelValue[xe-1];m.hoveringIndex=q.value.findIndex(wt=>Ge(lt)===Ge(f(wt)))}else m.hoveringIndex=-1}},Gt=xe=>{if(m.inputValue=xe.target.value,e.remote)b.value=!0,Ke();else return Ne()},yn=xe=>{Q.value=!1,L.value&&z(new FocusEvent("blur",xe))},Mn=()=>(m.isBeforeHide=!1,Ae(()=>{~et.value&&Ao(et.value)})),Ao=xe=>{O.value.scrollToItem(xe)},Dr=(xe,lt)=>{const wt=Ge(xe);if(Re.value.has(wt)){const{option:kt}=Re.value.get(wt);return kt}if(lt&<.length){const kt=lt.find(An=>Ge(f(An))===wt);if(kt)return kt}return{[c.value.value]:xe,[c.value.label]:xe}},Wl=xe=>{var lt;return((lt=Re.value.get(f(xe)))==null?void 0:lt.index)??-1},Ps=(xe=!1)=>{if(e.multiple)if(e.modelValue.length>0){const lt=m.cachedOptions.slice();m.cachedOptions.length=0,m.previousValue=e.modelValue.toString();for(const wt of e.modelValue){const kt=Dr(wt,lt);m.cachedOptions.push(kt)}}else m.cachedOptions=[],m.previousValue=void 0;else if(te.value){m.previousValue=e.modelValue;const lt=q.value,wt=lt.findIndex(kt=>Ge(f(kt))===Ge(e.modelValue));~wt?m.selectedLabel=d(lt[wt]):(!m.selectedLabel||xe)&&(m.selectedLabel=Ge(e.modelValue))}else m.selectedLabel="",m.previousValue=void 0;It(),Ve()};fe(()=>e.fitInputWidth,()=>{Ve()}),fe(Q,xe=>{xe?(e.persistent||Ve(),Ze("")):(m.inputValue="",m.previousQuery=null,m.isBeforeHide=!0,m.menuVisibleOnFocus=!1,pe(""))}),fe(()=>e.modelValue,(xe,lt)=>{var wt;(!xe||be(xe)&&xe.length===0||e.multiple&&!tn(xe.toString(),m.previousValue)||!e.multiple&&Ge(xe)!==Ge(m.previousValue))&&Ps(!0),!tn(xe,lt)&&e.validateEvent&&((wt=r==null?void 0:r.validate)==null||wt.call(r,"change").catch(kt=>ft(kt)))},{deep:!0}),fe(()=>e.options,()=>{const xe=T.value;(!xe||xe&&document.activeElement!==xe)&&Ps()},{deep:!0,flush:"post"}),fe(()=>q.value,()=>(Ve(),O.value&&Ae(O.value.resetScrollTop))),sa(()=>{m.isBeforeHide||Ie()}),sa(()=>{const{valueKey:xe,options:lt}=e,wt=new Map;for(const kt of lt){const An=f(kt);let ca=An;if(ot(ca)&&(ca=mn(An,xe)),wt.get(ca)){ft("ElSelectV2","The option values you provided seem to be duplicated, which may cause some problems, please check.");break}else wt.set(ca,!0)}}),mt(()=>{Ps()}),Xt(w,ht),Xt(C,En),Xt(I,Da),Xt(_,xu),Xt(P,lo);let Vr;return fe(()=>gt.value,xe=>{xe?Vr=Xt(O,Da).stop:(Vr==null||Vr(),Vr=void 0),t("visible-change",xe)}),{inputId:u,collapseTagSize:Pe,currentPlaceholder:it,expanded:Q,emptyText:ce,popupHeight:ue,debounce:Z,allOptions:H,allOptionsValueMap:Re,filteredOptions:q,iconComponent:se,iconReverse:Y,tagStyle:nt,collapseTagStyle:Oe,popperSize:y,dropdownMenuVisible:gt,hasModelValue:te,shouldShowPlaceholder:qe,selectDisabled:R,selectSize:we,needStatusIcon:ee,showClearBtn:de,states:m,isFocused:L,nsSelect:o,nsInput:l,inputRef:T,menuRef:O,tagMenuRef:_,tooltipRef:k,tagTooltipRef:E,selectRef:w,wrapperRef:I,selectionRef:C,prefixRef:$,suffixRef:N,collapseItemRef:P,popperRef:We,validateState:G,validateIcon:V,showTagList:ve,collapseTagList:Le,debouncedOnInputChange:Ke,deleteTag:Tu,getLabel:d,getValue:f,getDisabled:p,getValueKey:Ge,getIndex:Wl,handleClear:ef,handleClickOutside:yn,handleDel:Qd,handleEsc:Zd,focus:Po,blur:Xd,handleMenuEnter:Mn,handleResize:ht,resetSelectionWidth:En,updateTooltip:Da,updateTagTooltip:xu,updateOptions:Ie,toggleMenu:Yt,scrollTo:Ao,onInput:Gt,onKeyboardNavigate:hl,onKeyboardSelect:Ee,onSelect:Kl,onHover:Je,handleCompositionStart:W,handleCompositionEnd:U,handleCompositionUpdate:F}};var o7=ie({name:"ElSelectV2",components:{ElSelectMenu:t7,ElTag:Xo,ElTooltip:_n,ElIcon:Be},directives:{ClickOutside:Ll},props:HW,emits:WW,setup(e,{emit:t}){const n=S(()=>{const{modelValue:u,multiple:c}=e,d=c?[]:void 0;return be(u)?c?u:d:c?d:u}),a=a7(Rt({...Nn(e),modelValue:n}),t),{calculatorRef:o,inputStyle:l}=oh(),s=Fn();bt(om,{props:Rt({...Nn(e),height:a.popupHeight,modelValue:n}),expanded:a.expanded,tooltipRef:a.tooltipRef,contentId:s,onSelect:a.onSelect,onHover:a.onHover,onKeyboardNavigate:a.onKeyboardNavigate,onKeyboardSelect:a.onKeyboardSelect});const r=S(()=>e.multiple?a.states.cachedOptions.map(u=>a.getLabel(u)):a.states.selectedLabel);return{...a,modelValue:n,selectedLabel:r,calculatorRef:o,inputStyle:l,contentId:s,BORDER_HORIZONTAL_WIDTH:sw}}});const l7=["id","value","autocomplete","tabindex","aria-expanded","aria-label","disabled","aria-controls","aria-activedescendant","readonly","name"],s7=["textContent"],r7={key:1};function i7(e,t,n,a,o,l){const s=Ot("el-tag"),r=Ot("el-tooltip"),u=Ot("el-icon"),c=Ot("el-select-menu"),d=Pv("click-outside");return dt((x(),B("div",{ref:"selectRef",class:M([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[15]||(t[15]=f=>e.states.inputHovering=!0),onMouseleave:t[16]||(t[16]=f=>e.states.inputHovering=!1)},[J(r,{ref:"tooltipRef",visible:e.dropdownMenuVisible,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-style":e.popperStyle,"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,placement:e.placement,pure:"",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,trigger:"click",persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:t[14]||(t[14]=f=>e.states.isBeforeHide=!1)},{default:ne(()=>{var f;return[j("div",{ref:"wrapperRef",class:M([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:t[11]||(t[11]=Xe((...p)=>e.toggleMenu&&e.toggleMenu(...p),["prevent"]))},[e.$slots.prefix?(x(),B("div",{key:0,ref:"prefixRef",class:M(e.nsSelect.e("prefix"))},[ae(e.$slots,"prefix")],2)):le("v-if",!0),j("div",{ref:"selectionRef",class:M([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.modelValue.length)])},[e.multiple?ae(e.$slots,"tag",{key:0,data:e.states.cachedOptions,deleteTag:e.deleteTag,selectDisabled:e.selectDisabled},()=>{var p,g,v,h,m,y,b,w,C,k,E,T,$;return[(x(!0),B(He,null,Ct(e.showTagList,N=>(x(),B("div",{key:e.getValueKey(e.getValue(N)),class:M(e.nsSelect.e("selected-item"))},[J(s,{closable:!e.selectDisabled&&!e.getDisabled(N),size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:je(e.tagStyle),onClose:O=>e.deleteTag(O,N)},{default:ne(()=>[j("span",{class:M(e.nsSelect.e("tags-text"))},[ae(e.$slots,"label",{index:e.getIndex(N),label:e.getLabel(N),value:e.getValue(N)},()=>[St(ke(e.getLabel(N)),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.cachedOptions.length>e.maxCollapseTags?(x(),re(r,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":((p=e.tagTooltip)==null?void 0:p.fallbackPlacements)??["bottom","top","right","left"],effect:((g=e.tagTooltip)==null?void 0:g.effect)??e.effect,placement:((v=e.tagTooltip)==null?void 0:v.placement)??"bottom","popper-class":((h=e.tagTooltip)==null?void 0:h.popperClass)??e.popperClass,"popper-style":((m=e.tagTooltip)==null?void 0:m.popperStyle)??e.popperStyle,teleported:((y=e.tagTooltip)==null?void 0:y.teleported)??e.teleported,"append-to":((b=e.tagTooltip)==null?void 0:b.appendTo)??e.appendTo,"popper-options":((w=e.tagTooltip)==null?void 0:w.popperOptions)??e.popperOptions,transition:(C=e.tagTooltip)==null?void 0:C.transition,"show-after":(k=e.tagTooltip)==null?void 0:k.showAfter,"hide-after":(E=e.tagTooltip)==null?void 0:E.hideAfter,"auto-close":(T=e.tagTooltip)==null?void 0:T.autoClose,offset:($=e.tagTooltip)==null?void 0:$.offset},{default:ne(()=>[j("div",{ref:"collapseItemRef",class:M(e.nsSelect.e("selected-item"))},[J(s,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,style:je(e.collapseTagStyle),"disable-transitions":""},{default:ne(()=>[j("span",{class:M(e.nsSelect.e("tags-text"))}," + "+ke(e.states.cachedOptions.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:ne(()=>[j("div",{ref:"tagMenuRef",class:M(e.nsSelect.e("selection"))},[(x(!0),B(He,null,Ct(e.collapseTagList,N=>(x(),B("div",{key:e.getValueKey(e.getValue(N)),class:M(e.nsSelect.e("selected-item"))},[J(s,{class:"in-tooltip",closable:!e.selectDisabled&&!e.getDisabled(N),size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:O=>e.deleteTag(O,N)},{default:ne(()=>[j("span",{class:M(e.nsSelect.e("tags-text"))},[ae(e.$slots,"label",{index:e.getIndex(N),label:e.getLabel(N),value:e.getValue(N)},()=>[St(ke(e.getLabel(N)),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","fallback-placements","effect","placement","popper-class","popper-style","teleported","append-to","popper-options","transition","show-after","hide-after","auto-close","offset"])):le("v-if",!0)]}):le("v-if",!0),j("div",{class:M([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable||e.selectDisabled||!e.states.inputValue&&!e.isFocused)])},[j("input",{id:e.inputId,ref:"inputRef",value:e.states.inputValue,style:je(e.inputStyle),autocomplete:e.autocomplete,tabindex:e.tabindex,"aria-autocomplete":"none","aria-haspopup":"listbox",autocapitalize:"off","aria-expanded":e.expanded,"aria-label":e.ariaLabel,class:M([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,role:"combobox","aria-controls":e.contentId,"aria-activedescendant":e.states.hoveringIndex>=0?`${e.contentId}-${e.states.hoveringIndex}`:"",readonly:!e.filterable,spellcheck:"false",type:"text",name:e.name,onInput:t[0]||(t[0]=(...p)=>e.onInput&&e.onInput(...p)),onChange:t[1]||(t[1]=Xe(()=>{},["stop"])),onCompositionstart:t[2]||(t[2]=(...p)=>e.handleCompositionStart&&e.handleCompositionStart(...p)),onCompositionupdate:t[3]||(t[3]=(...p)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...p)),onCompositionend:t[4]||(t[4]=(...p)=>e.handleCompositionEnd&&e.handleCompositionEnd(...p)),onKeydown:[t[5]||(t[5]=en(Xe(p=>e.onKeyboardNavigate("backward"),["stop","prevent"]),["up"])),t[6]||(t[6]=en(Xe(p=>e.onKeyboardNavigate("forward"),["stop","prevent"]),["down"])),t[7]||(t[7]=en(Xe((...p)=>e.onKeyboardSelect&&e.onKeyboardSelect(...p),["stop","prevent"]),["enter"])),t[8]||(t[8]=en(Xe((...p)=>e.handleEsc&&e.handleEsc(...p),["stop","prevent"]),["esc"])),t[9]||(t[9]=en(Xe((...p)=>e.handleDel&&e.handleDel(...p),["stop"]),["delete"]))],onClick:t[10]||(t[10]=Xe((...p)=>e.toggleMenu&&e.toggleMenu(...p),["stop"]))},null,46,l7),e.filterable?(x(),B("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:M(e.nsSelect.e("input-calculator")),textContent:ke(e.states.inputValue)},null,10,s7)):le("v-if",!0)],2),e.shouldShowPlaceholder?(x(),B("div",{key:1,class:M([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?ae(e.$slots,"label",{key:0,index:((f=e.allOptionsValueMap.get(e.modelValue))==null?void 0:f.index)??-1,label:e.currentPlaceholder,value:e.modelValue},()=>[j("span",null,ke(e.currentPlaceholder),1)]):(x(),B("span",r7,ke(e.currentPlaceholder),1))],2)):le("v-if",!0)],2),j("div",{ref:"suffixRef",class:M(e.nsSelect.e("suffix"))},[e.iconComponent?dt((x(),re(u,{key:0,class:M([e.nsSelect.e("caret"),e.nsInput.e("icon"),e.iconReverse])},{default:ne(()=>[(x(),re(ct(e.iconComponent)))]),_:1},8,["class"])),[[Nt,!e.showClearBtn]]):le("v-if",!0),e.showClearBtn&&e.clearIcon?(x(),re(u,{key:1,class:M([e.nsSelect.e("caret"),e.nsInput.e("icon"),e.nsSelect.e("clear")]),onClick:Xe(e.handleClear,["prevent","stop"])},{default:ne(()=>[(x(),re(ct(e.clearIcon)))]),_:1},8,["class","onClick"])):le("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(x(),re(u,{key:2,class:M([e.nsInput.e("icon"),e.nsInput.e("validateIcon"),e.nsInput.is("loading",e.validateState==="validating")])},{default:ne(()=>[(x(),re(ct(e.validateIcon)))]),_:1},8,["class"])):le("v-if",!0)],2)],2)]}),content:ne(()=>[J(c,{id:e.contentId,ref:"menuRef",data:e.filteredOptions,width:e.popperSize-e.BORDER_HORIZONTAL_WIDTH,"hovering-index":e.states.hoveringIndex,"scrollbar-always-on":e.scrollbarAlwaysOn,"aria-label":e.ariaLabel},ra({default:ne(f=>[ae(e.$slots,"default",Yo(qo(f)))]),_:2},[e.$slots.header?{name:"header",fn:ne(()=>[j("div",{class:M(e.nsSelect.be("dropdown","header")),onClick:t[12]||(t[12]=Xe(()=>{},["stop"]))},[ae(e.$slots,"header")],2)]),key:"0"}:void 0,e.$slots.loading&&e.loading?{name:"loading",fn:ne(()=>[j("div",{class:M(e.nsSelect.be("dropdown","loading"))},[ae(e.$slots,"loading")],2)]),key:"1"}:e.loading||e.filteredOptions.length===0?{name:"empty",fn:ne(()=>[j("div",{class:M(e.nsSelect.be("dropdown","empty"))},[ae(e.$slots,"empty",{},()=>[j("span",null,ke(e.emptyText),1)])],2)]),key:"2"}:void 0,e.$slots.footer?{name:"footer",fn:ne(()=>[j("div",{class:M(e.nsSelect.be("dropdown","footer")),onClick:t[13]||(t[13]=Xe(()=>{},["stop"]))},[ae(e.$slots,"footer")],2)]),key:"3"}:void 0]),1032,["id","data","width","hovering-index","scrollbar-always-on","aria-label"])]),_:3},8,["visible","teleported","popper-class","popper-style","popper-options","fallback-placements","effect","placement","transition","persistent","append-to","show-arrow","offset","onBeforeShow"])],34)),[[d,e.handleClickOutside,e.popperRef]])}var u7=kn(o7,[["render",i7]]);const c7=rt(u7),d7=Se({animated:Boolean,count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:X([Number,Object])}}),f7=Se({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}});var p7=ie({name:"ElSkeletonItem",__name:"skeleton-item",props:f7,setup(e){const t=he("skeleton");return(n,a)=>(x(),B("div",{class:M([i(t).e("item"),i(t).e(e.variant)])},[e.variant==="image"?(x(),re(i(HP),{key:0})):le("v-if",!0)],2))}}),Xc=p7,v7=ie({name:"ElSkeleton",__name:"skeleton",props:d7,setup(e,{expose:t}){const n=e,a=he("skeleton"),o=KI(Lt(n,"loading"),n.throttle);return t({uiLoading:o}),(l,s)=>i(o)?(x(),B("div",pt({key:0,class:[i(a).b(),i(a).is("animated",e.animated)]},l.$attrs),[(x(!0),B(He,null,Ct(e.count,r=>(x(),B(He,{key:r},[i(o)?ae(l.$slots,"template",{key:r},()=>[J(Xc,{class:M(i(a).is("first")),variant:"p"},null,8,["class"]),(x(!0),B(He,null,Ct(e.rows,u=>(x(),re(Xc,{key:u,class:M([i(a).e("paragraph"),i(a).is("last",u===e.rows&&e.rows>1)]),variant:"p"},null,8,["class"]))),128))]):le("v-if",!0)],64))),128))],16)):ae(l.$slots,"default",Yo(pt({key:1},l.$attrs)))}}),h7=v7;const m7=rt(h7,{SkeletonItem:Xc}),g7=Qt(Xc),$k=Symbol("sliderContextKey"),y7=Se({modelValue:{type:X([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:X([Number,String]),default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:Sn,inputSize:Sn,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:X(Function),default:void 0},disabled:{type:Boolean,default:void 0},range:Boolean,vertical:Boolean,height:String,rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:X(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:Mo,default:"top"},marks:{type:X(Object)},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...Qn(["ariaLabel"])}),Vf=e=>Fe(e)||be(e)&&e.every(Fe),b7={[at]:Vf,[gn]:Vf,[yt]:Vf},w7=(e,t,n)=>{const a=A();return mt(async()=>{e.range?(be(e.modelValue)?(t.firstValue=Math.max(e.min,e.modelValue[0]),t.secondValue=Math.min(e.max,e.modelValue[1])):(t.firstValue=e.min,t.secondValue=e.max),t.oldValue=[t.firstValue,t.secondValue]):(!Fe(e.modelValue)||Number.isNaN(e.modelValue)?t.firstValue=e.min:t.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),t.oldValue=t.firstValue),At(window,"resize",n),await Ae(),n()}),{sliderWrapper:a}},C7=e=>{const t=S(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((n,a)=>n-a).filter(n=>n<=e.max&&n>=e.min).map(n=>({point:n,position:(n-e.min)*100/(e.max-e.min),mark:e.marks[n]})):[]);return sa(()=>{if(e.step==="mark"&&!e.marks&&ft("ElSlider","marks prop must be provided when step is mark"),e.marks){const n=Object.keys(e.marks),a=t.value.map(l=>l.point),o=n.filter(l=>{const s=Number.parseFloat(l);return Number.isNaN(s)||!a.includes(s)});o.length>0&&ft("ElSlider",`Some marks keys are invalid (not a number or out of [min, max]): [${o.map(l=>`'${l}'`).join(", ")}] and will be ignored.`)}}),t},S7=(e,t,n)=>{const{formItem:a}=Pn(),o=Wt(),l=A(),s=A(),r={firstButton:l,secondButton:s},u=on(),c=S(()=>Math.min(t.firstValue,t.secondValue)),d=S(()=>Math.max(t.firstValue,t.secondValue)),f=S(()=>e.range?`${100*(d.value-c.value)/(e.max-e.min)}%`:`${100*(t.firstValue-e.min)/(e.max-e.min)}%`),p=S(()=>e.range?`${100*(c.value-e.min)/(e.max-e.min)}%`:"0%"),g=S(()=>e.vertical?{height:e.height}:{}),v=S(()=>e.vertical?{height:f.value,bottom:p.value}:{width:f.value,left:p.value}),h=()=>{o.value&&(t.sliderSize=o.value.getBoundingClientRect()[e.vertical?"height":"width"])},m=_=>{const P=e.min+_*(e.max-e.min)/100;if(!e.range)return l;let D;return Math.abs(c.value-P)t.secondValue?"firstButton":"secondButton",r[D]},y=_=>{const P=m(_);return P.value.setPosition(_),P},b=_=>{t.firstValue=_??e.min,C(e.range?[c.value,d.value]:_??e.min)},w=_=>{t.secondValue=_,e.range&&C([c.value,d.value])},C=_=>{n(at,_),n(gn,_)},k=async()=>{await Ae(),n(yt,e.range?[c.value,d.value]:e.modelValue)},E=_=>{var D,W,U,F;if(u.value||t.dragging)return;h();let P=0;if(e.vertical){const R=((W=(D=_.touches)==null?void 0:D.item(0))==null?void 0:W.clientY)??_.clientY;P=(o.value.getBoundingClientRect().bottom-R)/t.sliderSize*100}else P=((((F=(U=_.touches)==null?void 0:U.item(0))==null?void 0:F.clientX)??_.clientX)-o.value.getBoundingClientRect().left)/t.sliderSize*100;if(!(P<0||P>100))return y(P)};return{elFormItem:a,slider:o,firstButton:l,secondButton:s,sliderDisabled:u,minValue:c,maxValue:d,runwayStyle:g,barStyle:v,resetSize:h,setPosition:y,emitChange:k,onSliderWrapperPrevent:_=>{var P,D;((P=r.firstButton.value)!=null&&P.dragging||(D=r.secondButton.value)!=null&&D.dragging)&&_.preventDefault()},onSliderClick:_=>{E(_)&&k()},onSliderDown:async _=>{const P=E(_);P&&(await Ae(),P.value.onButtonDown(_))},onSliderMarkerDown:_=>{u.value||t.dragging||y(_)&&k()},setFirstValue:b,setSecondValue:w}},k7=(e,t,n,a)=>({stops:S(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step==="mark"||e.step===0)return e.step===0&&ft("ElSlider","step should not be 0."),[];const s=Math.ceil((e.max-e.min)/e.step),r=100*e.step/(e.max-e.min),u=Array.from({length:s-1}).map((c,d)=>(d+1)*r);return e.range?u.filter(c=>c<100*(n.value-e.min)/(e.max-e.min)||c>100*(a.value-e.min)/(e.max-e.min)):u.filter(c=>c>100*(t.firstValue-e.min)/(e.max-e.min))}),getStopStyle:s=>e.vertical?{bottom:`${s}%`}:{left:`${s}%`}}),E7=(e,t,n,a,o,l)=>{const s=c=>{o(at,c),o(gn,c)},r=()=>e.range?![n.value,a.value].every((c,d)=>c===t.oldValue[d]):e.modelValue!==t.oldValue,u=()=>{var d,f;e.min>e.max&&Jt("Slider","min should not be greater than max.");const c=e.modelValue;e.range&&be(c)?c[1]e.max?s([e.max,e.max]):c[0]e.max?s([c[0],e.max]):(t.firstValue=c[0],t.secondValue=c[1],r()&&(e.validateEvent&&((d=l==null?void 0:l.validate)==null||d.call(l,"change").catch(p=>ft(p))),t.oldValue=c.slice())):!e.range&&Fe(c)&&!Number.isNaN(c)&&(ce.max?s(e.max):(t.firstValue=c,r()&&(e.validateEvent&&((f=l==null?void 0:l.validate)==null||f.call(l,"change").catch(p=>ft(p))),t.oldValue=c)))};u(),fe(()=>t.dragging,c=>{c||u()}),fe(()=>e.modelValue,(c,d)=>{t.dragging||be(c)&&be(d)&&c.every((f,p)=>f===d[p])&&t.firstValue===c[0]&&t.secondValue===c[1]||u()},{deep:!0}),fe(()=>[e.min,e.max],()=>{u()})},x7=(e,t,n)=>{const a=A(),o=A(!1),l=S(()=>t.value instanceof Function);return{tooltip:a,tooltipVisible:o,formatValue:S(()=>l.value&&t.value(e.modelValue)||e.modelValue),displayTooltip:To(()=>{n.value&&(o.value=!0)},50),hideTooltip:To(()=>{n.value&&(o.value=!1)},50)}},T7=(e,t,n)=>{const{disabled:a,min:o,max:l,step:s,showTooltip:r,persistent:u,precision:c,sliderSize:d,formatTooltip:f,emitChange:p,resetSize:g,updateDragging:v,markList:h}=_e($k),{tooltip:m,tooltipVisible:y,formatValue:b,displayTooltip:w,hideTooltip:C}=x7(e,f,r),k=A(),E=S(()=>`${(e.modelValue-o.value)/(l.value-o.value)*100}%`),T=S(()=>e.vertical?{bottom:E.value}:{left:E.value}),$=S(()=>s.value==="mark"&&h.value.length>0),N=()=>{t.hovering=!0,w()},O=()=>{t.hovering=!1,t.dragging||C()},_=ue=>{a.value||(ue.preventDefault(),K(ue),window.addEventListener("mousemove",q),window.addEventListener("touchmove",q),window.addEventListener("mouseup",Q),window.addEventListener("touchend",Q),window.addEventListener("contextmenu",Q),k.value.focus())},P=ue=>{a.value||(t.newPosition=Number.parseFloat(E.value)+ue/(l.value-o.value)*100,ee(t.newPosition),p())},D=ue=>{if(a.value||!h.value.length)return;const te=e.modelValue,de=Number.EPSILON,se=Math.abs(ue);let Y;if(ue>0){const G=h.value.findIndex(V=>V.point>te+de);if(G!==-1){const V=Math.min(G+se-1,h.value.length-1);Y=h.value[V].point}}else{let G=-1;for(let V=h.value.length-1;V>=0;V--)if(h.value[V].point{$.value?D(-1):Fe(s.value)&&P(-s.value)},U=()=>{$.value?D(1):Fe(s.value)&&P(s.value)},F=()=>{$.value?D(-4):Fe(s.value)&&P(-s.value*4)},R=()=>{$.value?D(4):Fe(s.value)&&P(s.value*4)},I=()=>{a.value||(ee(0),p())},L=()=>{a.value||(ee(100),p())},z=ue=>{const te=zt(ue);let de=!0;switch(te){case Ce.left:case Ce.down:W();break;case Ce.right:case Ce.up:U();break;case Ce.home:I();break;case Ce.end:L();break;case Ce.pageDown:F();break;case Ce.pageUp:R();break;default:de=!1;break}de&&ue.preventDefault()},H=ue=>{let te,de;return ue.type.startsWith("touch")?(de=ue.touches[0].clientY,te=ue.touches[0].clientX):(de=ue.clientY,te=ue.clientX),{clientX:te,clientY:de}},K=ue=>{t.dragging=!0,t.isClick=!0;const{clientX:te,clientY:de}=H(ue);e.vertical?t.startY=de:t.startX=te,t.startPosition=Number.parseFloat(E.value),t.newPosition=t.startPosition},q=ue=>{if(t.dragging){t.isClick=!1,w(),g();let te;const{clientX:de,clientY:se}=H(ue);e.vertical?(t.currentY=se,te=(t.startY-t.currentY)/d.value*100):(t.currentX=de,te=(t.currentX-t.startX)/d.value*100),t.newPosition=t.startPosition+te,ee(t.newPosition)}},Q=()=>{t.dragging&&(setTimeout(()=>{t.dragging=!1,t.hovering||C(),t.isClick||ee(t.newPosition),p()},0),window.removeEventListener("mousemove",q),window.removeEventListener("touchmove",q),window.removeEventListener("mouseup",Q),window.removeEventListener("touchend",Q),window.removeEventListener("contextmenu",Q))},ee=async ue=>{if(ue===null||Number.isNaN(+ue))return;ue=as(ue,0,100);let te;if(s.value==="mark")h.value.length===0?te=ue<=50?o.value:l.value:te=h.value.reduce((de,se)=>Math.abs(se.position-ue)t.dragging,ue=>{v(ue)}),At(k,"touchstart",_,{passive:!1}),{disabled:a,button:k,tooltip:m,tooltipVisible:y,showTooltip:r,persistent:u,wrapperStyle:T,formatValue:b,handleMouseEnter:N,handleMouseLeave:O,onButtonDown:_,onKeyDown:z,setPosition:ee}},$7=Se({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:Mo,default:"top"}}),O7={[at]:e=>Fe(e)},N7=["tabindex"];var M7=ie({name:"ElSliderButton",__name:"button",props:$7,emits:O7,setup(e,{expose:t,emit:n}){const a=e,o=n,l=he("slider"),s=Rt({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:a.modelValue}),r=S(()=>f.value?p.value:!1),{disabled:u,button:c,tooltip:d,showTooltip:f,persistent:p,tooltipVisible:g,wrapperStyle:v,formatValue:h,handleMouseEnter:m,handleMouseLeave:y,onButtonDown:b,onKeyDown:w,setPosition:C}=T7(a,s,o),{hovering:k,dragging:E}=Nn(s);return t({onButtonDown:b,onKeyDown:w,setPosition:C,hovering:k,dragging:E}),(T,$)=>(x(),B("div",{ref_key:"button",ref:c,class:M([i(l).e("button-wrapper"),{hover:i(k),dragging:i(E)}]),style:je(i(v)),tabindex:i(u)?void 0:0,onMouseenter:$[0]||($[0]=(...N)=>i(m)&&i(m)(...N)),onMouseleave:$[1]||($[1]=(...N)=>i(y)&&i(y)(...N)),onMousedown:$[2]||($[2]=(...N)=>i(b)&&i(b)(...N)),onFocus:$[3]||($[3]=(...N)=>i(m)&&i(m)(...N)),onBlur:$[4]||($[4]=(...N)=>i(y)&&i(y)(...N)),onKeydown:$[5]||($[5]=(...N)=>i(w)&&i(w)(...N))},[J(i(_n),{ref_key:"tooltip",ref:d,visible:i(g),placement:T.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":T.tooltipClass,disabled:!i(f),persistent:r.value},{content:ne(()=>[j("span",null,ke(i(h)),1)]),default:ne(()=>[j("div",{class:M([i(l).e("button"),{hover:i(k),dragging:i(E)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled","persistent"])],46,N7))}}),Db=M7;const R7=Se({mark:{type:X([String,Object]),default:void 0}});var I7=ie({name:"ElSliderMarker",props:R7,setup(e){const t=he("slider"),n=S(()=>De(e.mark)?e.mark:e.mark.label),a=S(()=>De(e.mark)?void 0:e.mark.style);return()=>Ye("div",{class:t.e("marks-text"),style:a.value},n.value)}});const _7=["id","role","aria-label","aria-labelledby"],P7={key:1};var A7=ie({name:"ElSlider",__name:"slider",props:y7,emits:b7,setup(e,{expose:t,emit:n}){const a=e,o=n,l=he("slider"),{t:s}=Et(),r=Rt({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:u,slider:c,firstButton:d,secondButton:f,sliderDisabled:p,minValue:g,maxValue:v,runwayStyle:h,barStyle:m,resetSize:y,emitChange:b,onSliderWrapperPrevent:w,onSliderClick:C,onSliderDown:k,onSliderMarkerDown:E,setFirstValue:T,setSecondValue:$}=S7(a,r,o),{stops:N,getStopStyle:O}=k7(a,r,g,v),{inputId:_,isLabeledByFormItem:P}=Ta(a,{formItemContext:u}),D=bn(),W=S(()=>a.inputSize||D.value),U=S(()=>a.showInput&&!a.range&&a.step!=="mark"),F=S(()=>a.ariaLabel||s("el.slider.defaultLabel",{min:a.min,max:a.max})),R=S(()=>a.range?a.rangeStartLabel||s("el.slider.defaultRangeStartLabel"):F.value),I=S(()=>a.formatValueText?a.formatValueText(ue.value):`${ue.value}`),L=S(()=>a.rangeEndLabel||s("el.slider.defaultRangeEndLabel")),z=S(()=>a.formatValueText?a.formatValueText(te.value):`${te.value}`),H=S(()=>[l.b(),l.m(D.value),l.is("vertical",a.vertical),{[l.m("with-input")]:U.value}]),K=C7(a);E7(a,r,g,v,o,u);const q=S(()=>Fe(a.step)?a.step:1),Q=S(()=>{const Y=Fe(a.step)?a.step:1,G=[a.min,a.max,Y].map(V=>{const Z=`${V}`.split(".")[1];return Z?Z.length:0});return Math.max.apply(null,G)}),{sliderWrapper:ee}=w7(a,r,y),{firstValue:ue,secondValue:te,sliderSize:de}=Nn(r),se=Y=>{r.dragging=Y};return At(ee,"touchstart",w,{passive:!1}),At(ee,"touchmove",w,{passive:!1}),bt($k,{...Nn(a),sliderSize:de,disabled:p,precision:Q,markList:K,emitChange:b,resetSize:y,updateDragging:se}),t({onSliderClick:C}),(Y,G)=>{var V,Z;return x(),B("div",{id:Y.range?i(_):void 0,ref_key:"sliderWrapper",ref:ee,class:M(H.value),role:Y.range?"group":void 0,"aria-label":Y.range&&!i(P)?F.value:void 0,"aria-labelledby":Y.range&&i(P)?(V=i(u))==null?void 0:V.labelId:void 0},[j("div",{ref_key:"slider",ref:c,class:M([i(l).e("runway"),{"show-input":U.value},i(l).is("disabled",i(p))]),style:je(i(h)),onMousedown:G[0]||(G[0]=(...oe)=>i(k)&&i(k)(...oe)),onTouchstartPassive:G[1]||(G[1]=(...oe)=>i(k)&&i(k)(...oe))},[j("div",{class:M(i(l).e("bar")),style:je(i(m))},null,6),J(Db,{id:Y.range?void 0:i(_),ref_key:"firstButton",ref:d,"model-value":i(ue),vertical:Y.vertical,"tooltip-class":Y.tooltipClass,placement:Y.placement,role:"slider","aria-label":Y.range||!i(P)?R.value:void 0,"aria-labelledby":!Y.range&&i(P)?(Z=i(u))==null?void 0:Z.labelId:void 0,"aria-valuemin":Y.min,"aria-valuemax":Y.range?i(te):Y.max,"aria-valuenow":i(ue),"aria-valuetext":I.value,"aria-orientation":Y.vertical?"vertical":"horizontal","aria-disabled":i(p),"onUpdate:modelValue":i(T)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),Y.range?(x(),re(Db,{key:0,ref_key:"secondButton",ref:f,"model-value":i(te),vertical:Y.vertical,"tooltip-class":Y.tooltipClass,placement:Y.placement,role:"slider","aria-label":L.value,"aria-valuemin":i(ue),"aria-valuemax":Y.max,"aria-valuenow":i(te),"aria-valuetext":z.value,"aria-orientation":Y.vertical?"vertical":"horizontal","aria-disabled":i(p),"onUpdate:modelValue":i($)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):le("v-if",!0),Y.showStops?(x(),B("div",P7,[(x(!0),B(He,null,Ct(i(N),(oe,ce)=>(x(),B("div",{key:ce,class:M(i(l).e("stop")),style:je(i(O)(oe))},null,6))),128))])):le("v-if",!0),i(K).length>0?(x(),B(He,{key:2},[j("div",null,[(x(!0),B(He,null,Ct(i(K),(oe,ce)=>(x(),B("div",{key:ce,style:je(i(O)(oe.position)),class:M([i(l).e("stop"),i(l).e("marks-stop")])},null,6))),128))]),j("div",{class:M(i(l).e("marks"))},[(x(!0),B(He,null,Ct(i(K),(oe,ce)=>(x(),re(i(I7),{key:ce,mark:oe.mark,style:je(i(O)(oe.position)),onMousedown:Xe(ge=>i(E)(oe.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):le("v-if",!0)],38),U.value?(x(),re(i(tk),{key:0,ref:"input","model-value":i(ue),class:M(i(l).e("input")),step:q.value,disabled:i(p),controls:Y.showInputControls,min:Y.min,max:Y.max,precision:Q.value,size:W.value,"onUpdate:modelValue":i(T),onChange:i(b)},null,8,["model-value","class","step","disabled","controls","min","max","precision","size","onUpdate:modelValue","onChange"])):le("v-if",!0)],10,_7)}}}),L7=A7;const D7=rt(L7),V7=Se({prefixCls:{type:String}}),Vb=ie({name:"ElSpaceItem",props:V7,setup(e,{slots:t}){const n=he("space"),a=S(()=>`${e.prefixCls||n.b()}__item`);return()=>Ye("div",{class:a.value},ae(t,"default"))}}),Bb={small:8,default:12,large:16};function B7(e){const t=he("space"),n=S(()=>[t.b(),t.m(e.direction),e.class]),a=A(0),o=A(0),l=S(()=>[e.wrap||e.fill?{flexWrap:"wrap"}:{},{alignItems:e.alignment},{rowGap:`${o.value}px`,columnGap:`${a.value}px`},e.style]),s=S(()=>e.fill?{flexGrow:1,minWidth:`${e.fillRatio}%`}:{});return sa(()=>{const{size:r="small",wrap:u,direction:c,fill:d}=e;if(be(r)){const[f=0,p=0]=r;a.value=f,o.value=p}else{let f;Fe(r)?f=r:f=Bb[r||"small"]||Bb.small,(u||d)&&c==="horizontal"?a.value=o.value=f:c==="horizontal"?(a.value=f,o.value=0):(o.value=f,a.value=0)}}),{classes:n,containerStyle:l,itemStyle:s}}const F7=Se({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:X([String,Object,Array]),default:""},style:{type:X([String,Array,Object]),default:""},alignment:{type:X(String),default:"center"},prefixCls:{type:String},spacer:{type:X([Object,String,Number,Array]),default:null,validator:e=>Ht(e)||Fe(e)||De(e)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:eo,validator:e=>Fe(e)||be(e)&&e.length===2&&e.every(Fe)}}),z7=ie({name:"ElSpace",props:F7,setup(e,{slots:t}){const{classes:n,containerStyle:a,itemStyle:o}=B7(e);function l(s,r="",u=[]){const{prefixCls:c}=e;return s.forEach((d,f)=>{Mp(d)?be(d.children)&&d.children.forEach((p,g)=>{Mp(p)&&be(p.children)?l(p.children,`${r+g}-`,u):Ht(p)&&(p==null?void 0:p.type)===vn?u.push(p):u.push(J(Vb,{style:o.value,prefixCls:c,key:`nested-${r+g}`},{default:()=>[p]},Va.PROPS|Va.STYLE,["style","prefixCls"]))}):H_(d)&&u.push(J(Vb,{style:o.value,prefixCls:c,key:`LoopKey${r+f}`},{default:()=>[d]},Va.PROPS|Va.STYLE,["style","prefixCls"]))}),u}return()=>{const{spacer:s,direction:r}=e,u=ae(t,"default",{key:0},()=>[]);if((u.children??[]).length===0)return null;if(be(u.children)){let c=l(u.children);if(s){const d=c.length-1;c=c.reduce((f,p,g)=>{const v=[...f,p];return g!==d&&v.push(J("span",{style:[o.value,r==="vertical"?"width: 100%":null],key:g},[Ht(s)?s:St(s,Va.TEXT)],Va.STYLE)),v},[])}return J("div",{class:n.value,style:a.value},c,Va.STYLE|Va.CLASS)}return u.children}}}),H7=rt(z7),K7=Se({decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},precision:{type:Number,default:0},formatter:Function,value:{type:X([Number,Object]),default:0},prefix:String,suffix:String,title:String,valueStyle:{type:X([String,Object,Array])}});var W7=ie({name:"ElStatistic",__name:"statistic",props:K7,setup(e,{expose:t}){const n=e,a=he("statistic"),o=S(()=>{const{value:l,formatter:s,precision:r,decimalSeparator:u,groupSeparator:c}=n;if(ze(s))return s(l);if(!Fe(l)||Number.isNaN(l))return l;let[d,f=""]=String(l).split(".");return f=f.padEnd(r,"0").slice(0,r>0?r:0),d=d.replace(/\B(?=(\d{3})+(?!\d))/g,c),[d,f].join(f?u:"")});return t({displayValue:o}),(l,s)=>(x(),B("div",{class:M(i(a).b())},[l.$slots.title||e.title?(x(),B("div",{key:0,class:M(i(a).e("head"))},[ae(l.$slots,"title",{},()=>[St(ke(e.title),1)])],2)):le("v-if",!0),j("div",{class:M(i(a).e("content"))},[l.$slots.prefix||e.prefix?(x(),B("div",{key:0,class:M(i(a).e("prefix"))},[ae(l.$slots,"prefix",{},()=>[j("span",null,ke(e.prefix),1)])],2)):le("v-if",!0),j("span",{class:M(i(a).e("number")),style:je(e.valueStyle)},ke(o.value),7),l.$slots.suffix||e.suffix?(x(),B("div",{key:1,class:M(i(a).e("suffix"))},[ae(l.$slots,"suffix",{},()=>[j("span",null,ke(e.suffix),1)])],2)):le("v-if",!0)],2)],2))}}),j7=W7;const Ok=rt(j7),U7=Se({format:{type:String,default:"HH:mm:ss"},prefix:String,suffix:String,title:String,value:{type:X([Number,Object]),default:0},valueStyle:{type:X([String,Object,Array])}}),Y7={finish:()=>!0,[yt]:e=>Fe(e)},q7=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]],Fb=e=>Fe(e)?new Date(e).getTime():e.valueOf(),zb=(e,t)=>{let n=e;return q7.reduce((a,[o,l])=>{const s=new RegExp(`${o}+(?![^\\[\\]]*\\])`,"g");if(s.test(a)){const r=Math.floor(n/l);return n-=r*l,a.replace(s,u=>String(r).padStart(u.length,"0"))}return a},t).replace(/\[([^\]]*)]/g,"$1")};var G7=ie({name:"ElCountdown",__name:"countdown",props:U7,emits:Y7,setup(e,{expose:t,emit:n}){const a=e,o=n;let l;const s=A(0),r=S(()=>zb(s.value,a.format)),u=f=>zb(f,a.format),c=()=>{l&&(tl(l),l=void 0)},d=()=>{const f=Fb(a.value),p=()=>{let g=f-Date.now();o(yt,g),g<=0?(g=0,c(),o("finish")):l=_a(p),s.value=g};l=_a(p)};return mt(()=>{s.value=Fb(a.value)-Date.now(),fe(()=>[a.value,a.format],()=>{c(),d()},{immediate:!0})}),Pt(()=>{c()}),t({displayValue:r}),(f,p)=>(x(),re(i(Ok),{value:s.value,title:e.title,prefix:e.prefix,suffix:e.suffix,"value-style":e.valueStyle,formatter:u},ra({_:2},[Ct(f.$slots,(g,v)=>({name:v,fn:ne(()=>[ae(f.$slots,v)])}))]),1032,["value","title","prefix","suffix","value-style"]))}}),X7=G7;const Z7=rt(X7),J7=Se({space:{type:[Number,String],default:""},active:{type:Number,default:0},direction:{type:String,default:"horizontal",values:["horizontal","vertical"]},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{type:String,values:["wait","process","finish","error","success"],default:"finish"},processStatus:{type:String,values:["wait","process","finish","error","success"],default:"process"}}),Q7={[yt]:(e,t)=>[e,t].every(Fe)},Nk="ElSteps",ej=Se({title:{type:String,default:""},icon:{type:Ft},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}});var tj=ie({name:"ElSteps",__name:"steps",props:J7,emits:Q7,setup(e,{emit:t}){const n=e,a=t,o=he("steps"),{children:l,addChild:s,removeChild:r,ChildrenSorter:u}=Pd(vt(),"ElStep");return fe(l,()=>{l.value.forEach((c,d)=>{c.setIndex(d)})}),bt(Nk,{props:n,steps:l,addStep:s,removeStep:r}),fe(()=>n.active,(c,d)=>{a(yt,c,d)}),(c,d)=>(x(),B("div",{class:M([i(o).b(),i(o).m(e.simple?"simple":e.direction)])},[ae(c.$slots,"default"),J(i(u))],2))}}),nj=tj,aj=ie({name:"ElStep",__name:"item",props:ej,setup(e){const t=e,n=he("step"),a=A(-1),o=A({}),l=A(""),s=_e(Nk),r=vt();let u=0,c=0;mt(()=>{fe([()=>s.props.active,()=>s.props.processStatus,()=>s.props.finishStatus],([$],[N])=>{c=N||0,u=$-c,E($)},{immediate:!0})});const d=S(()=>t.status||l.value),f=S(()=>{const $=s.steps.value[a.value-1];return $?$.internalStatus.value:"wait"}),p=S(()=>s.props.alignCenter),g=S(()=>s.props.direction==="vertical"),v=S(()=>s.props.simple),h=S(()=>s.steps.value.length),m=S(()=>{var $;return(($=s.steps.value[h.value-1])==null?void 0:$.uid)===r.uid}),y=S(()=>v.value?"":s.props.space),b=S(()=>[n.b(),n.is(v.value?"simple":s.props.direction),n.is("flex",m.value&&!y.value&&!p.value),n.is("center",p.value&&!g.value&&!v.value)]),w=S(()=>{const $={flexBasis:Fe(y.value)?`${y.value}px`:y.value?y.value:`${100/(h.value-(p.value?0:1))}%`};return g.value||m.value&&($.maxWidth=`${100/h.value}%`),$}),C=$=>{a.value=$},k=$=>{const N=$==="wait",O={transitionDelay:`${Math.abs(u)===1?0:u>0?(a.value+1-c)*150:-(a.value+1-s.props.active)*150}ms`},_=$===s.props.processStatus||N?0:100;O.borderWidth=_&&!v.value?"1px":0,O[s.props.direction==="vertical"?"height":"width"]=`${_}%`,o.value=O},E=$=>{$>a.value?l.value=s.props.finishStatus:$===a.value&&f.value!=="error"?l.value=s.props.processStatus:l.value="wait";const N=s.steps.value[a.value-1];N&&N.calcProgress(l.value)},T={uid:r.uid,getVnode:()=>r.vnode,currentStatus:d,internalStatus:l,setIndex:C,calcProgress:k};return s.addStep(T),Pt(()=>{s.removeStep(T)}),($,N)=>(x(),B("div",{style:je(w.value),class:M(b.value)},[le(" icon & line "),j("div",{class:M([i(n).e("head"),i(n).is(d.value)])},[v.value?le("v-if",!0):(x(),B("div",{key:0,class:M(i(n).e("line"))},[j("i",{class:M(i(n).e("line-inner")),style:je(o.value)},null,6)],2)),j("div",{class:M([i(n).e("icon"),i(n).is(e.icon||$.$slots.icon?"icon":"text")])},[ae($.$slots,"icon",{},()=>[e.icon?(x(),re(i(Be),{key:0,class:M(i(n).e("icon-inner"))},{default:ne(()=>[(x(),re(ct(e.icon)))]),_:1},8,["class"])):d.value==="success"?(x(),re(i(Be),{key:1,class:M([i(n).e("icon-inner"),i(n).is("status")])},{default:ne(()=>[J(i(yu))]),_:1},8,["class"])):d.value==="error"?(x(),re(i(Be),{key:2,class:M([i(n).e("icon-inner"),i(n).is("status")])},{default:ne(()=>[J(i(La))]),_:1},8,["class"])):v.value?le("v-if",!0):(x(),B("div",{key:3,class:M(i(n).e("icon-inner"))},ke(a.value+1),3))])],2)],2),le(" title & description "),j("div",{class:M(i(n).e("main"))},[j("div",{class:M([i(n).e("title"),i(n).is(d.value)])},[ae($.$slots,"title",{},()=>[St(ke(e.title),1)])],2),v.value?(x(),B("div",{key:0,class:M(i(n).e("arrow"))},null,2)):(x(),B("div",{key:1,class:M([i(n).e("description"),i(n).is(d.value)])},[ae($.$slots,"description",{},()=>[St(ke(e.description),1)])],2))],2)],6))}}),Mk=aj;const oj=rt(nj,{Step:Mk}),lj=Qt(Mk),Rk=e=>["",...eo].includes(e),sj=Se({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:void 0},loading:Boolean,size:{type:String,validator:Rk},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:Ft},activeActionIcon:{type:Ft},activeIcon:{type:Ft},inactiveIcon:{type:Ft},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:X(Function)},id:String,tabindex:{type:[String,Number]},...Qn(["ariaLabel"])}),rj={[at]:e=>Vt(e)||De(e)||Fe(e),[yt]:e=>Vt(e)||De(e)||Fe(e),[gn]:e=>Vt(e)||De(e)||Fe(e)},ij=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex"],uj=["aria-hidden"],cj={key:1},dj={key:1},fj=["aria-hidden"],Bf="ElSwitch";var pj=ie({name:Bf,__name:"switch",props:sj,emits:rj,setup(e,{expose:t,emit:n}){const a=e,o=n,{formItem:l}=Pn(),s=bn(),r=he("switch"),{inputId:u}=Ta(a,{formItemContext:l}),c=on(S(()=>{if(a.loading)return!0})),d=A(a.modelValue!==!1),f=Wt(),p=S(()=>[r.b(),r.m(s.value),r.is("disabled",c.value),r.is("checked",y.value)]),g=S(()=>[r.e("label"),r.em("label","left"),r.is("active",!y.value)]),v=S(()=>[r.e("label"),r.em("label","right"),r.is("active",y.value)]),h=S(()=>({width:an(a.width)}));fe(()=>a.modelValue,()=>{d.value=!0});const m=S(()=>d.value?a.modelValue:!1),y=S(()=>m.value===a.activeValue);[a.activeValue,a.inactiveValue].includes(m.value)||(o(at,a.inactiveValue),o(yt,a.inactiveValue),o(gn,a.inactiveValue)),fe(y,k=>{var E;f.value.checked=k,a.validateEvent&&((E=l==null?void 0:l.validate)==null||E.call(l,"change").catch(T=>ft(T)))});const b=()=>{const k=y.value?a.inactiveValue:a.activeValue;o(at,k),o(yt,k),o(gn,k),Ae(()=>{f.value.checked=y.value})},w=()=>{if(c.value)return;const{beforeChange:k}=a;if(!k){b();return}const E=k();[Pl(E),Vt(E)].includes(!0)||Jt(Bf,"beforeChange must return type `Promise` or `boolean`"),Pl(E)?E.then(T=>{T&&b()}).catch(T=>{ft(Bf,`some error occurred: ${T}`)}):E&&b()},C=()=>{var k,E;(E=(k=f.value)==null?void 0:k.focus)==null||E.call(k)};return mt(()=>{f.value.checked=y.value}),t({focus:C,checked:y}),(k,E)=>(x(),B("div",{class:M(p.value),onClick:Xe(w,["prevent"])},[j("input",{id:i(u),ref_key:"input",ref:f,class:M(i(r).e("input")),type:"checkbox",role:"switch","aria-checked":y.value,"aria-disabled":i(c),"aria-label":e.ariaLabel,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:i(c),tabindex:e.tabindex,onChange:b,onKeydown:en(w,["enter"])},null,42,ij),!e.inlinePrompt&&(e.inactiveIcon||e.inactiveText||k.$slots.inactive)?(x(),B("span",{key:0,class:M(g.value)},[ae(k.$slots,"inactive",{},()=>[e.inactiveIcon?(x(),re(i(Be),{key:0},{default:ne(()=>[(x(),re(ct(e.inactiveIcon)))]),_:1})):le("v-if",!0),!e.inactiveIcon&&e.inactiveText?(x(),B("span",{key:1,"aria-hidden":y.value},ke(e.inactiveText),9,uj)):le("v-if",!0)])],2)):le("v-if",!0),j("span",{class:M(i(r).e("core")),style:je(h.value)},[e.inlinePrompt?(x(),B("div",{key:0,class:M(i(r).e("inner"))},[y.value?(x(),B("div",{key:1,class:M(i(r).e("inner-wrapper"))},[ae(k.$slots,"active",{},()=>[e.activeIcon?(x(),re(i(Be),{key:0},{default:ne(()=>[(x(),re(ct(e.activeIcon)))]),_:1})):le("v-if",!0),!e.activeIcon&&e.activeText?(x(),B("span",dj,ke(e.activeText),1)):le("v-if",!0)])],2)):(x(),B("div",{key:0,class:M(i(r).e("inner-wrapper"))},[ae(k.$slots,"inactive",{},()=>[e.inactiveIcon?(x(),re(i(Be),{key:0},{default:ne(()=>[(x(),re(ct(e.inactiveIcon)))]),_:1})):le("v-if",!0),!e.inactiveIcon&&e.inactiveText?(x(),B("span",cj,ke(e.inactiveText),1)):le("v-if",!0)])],2))],2)):le("v-if",!0),j("div",{class:M(i(r).e("action"))},[e.loading?(x(),re(i(Be),{key:0,class:M(i(r).is("loading"))},{default:ne(()=>[J(i(Oo))]),_:1},8,["class"])):y.value?ae(k.$slots,"active-action",{key:1},()=>[e.activeActionIcon?(x(),re(i(Be),{key:0},{default:ne(()=>[(x(),re(ct(e.activeActionIcon)))]),_:1})):le("v-if",!0)]):y.value?le("v-if",!0):ae(k.$slots,"inactive-action",{key:2},()=>[e.inactiveActionIcon?(x(),re(i(Be),{key:0},{default:ne(()=>[(x(),re(ct(e.inactiveActionIcon)))]),_:1})):le("v-if",!0)])],2)],6),!e.inlinePrompt&&(e.activeIcon||e.activeText||k.$slots.active)?(x(),B("span",{key:1,class:M(v.value)},[ae(k.$slots,"active",{},()=>[e.activeIcon?(x(),re(i(Be),{key:0},{default:ne(()=>[(x(),re(ct(e.activeIcon)))]),_:1})):le("v-if",!0),!e.activeIcon&&e.activeText?(x(),B("span",{key:1,"aria-hidden":!y.value},ke(e.activeText),9,fj)):le("v-if",!0)])],2)):le("v-if",!0)],2))}}),vj=pj;const hj=rt(vj),Ff=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},mj=function(e,t,n,a,o){if(!t&&!a&&(!o||be(o)&&!o.length))return e;De(n)?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const l=a?null:function(r,u){return o?Xw(Tn(o),c=>De(c)?mn(r,c):c(r,u,e)):(t!=="$key"&&ot(r)&&"$value"in r&&(r=r.$value),[ot(r)?t?mn(r,t):null:r])},s=function(r,u){var c,d,f,p,g;if(a)return a(r.value,u.value);for(let v=0,h=((c=r.key)==null?void 0:c.length)??0;v((g=u.key)==null?void 0:g[v]))return 1}return 0};return e.map((r,u)=>({value:r,index:u,key:l?l(r,u):null})).sort((r,u)=>{let c=s(r,u);return c||(c=r.index-u.index),c*+n}).map(r=>r.value)},Ik=function(e,t){let n=null;return e.columns.forEach(a=>{a.id===t&&(n=a)}),n},gj=function(e,t){let n=null;for(let a=0;a{if(!e)throw new Error("Row is required when get row identity");if(De(t)){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let a=e;for(const o of n)a=a[o];return`${a}`}else if(ze(t))return t.call(null,e);return""},or=function(e,t,n=!1,a="children"){const o=e||[],l={};return o.forEach((s,r)=>{if(l[zn(s,t)]={row:s,index:r},n){const u=s[a];be(u)&&Object.assign(l,or(u,t,!0,a))}}),l};function yj(e,t){const n={};let a;for(a in e)n[a]=e[a];for(a in t)if($t(t,a)){const o=t[a];xt(o)||(n[a]=o)}return n}function lm(e){return e===""||xt(e)||(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function _k(e){return e===""||xt(e)||(e=lm(e),Number.isNaN(e)&&(e=80)),e}function bj(e){return Fe(e)?e:De(e)?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function wj(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...a)=>t(n(...a)))}function Zc(e,t,n,a,o,l,s){let r=l??0,u=!1;const d=(()=>{if(!s)return e.indexOf(t);const h=zn(t,s);return e.findIndex(m=>zn(m,s)===h)})(),f=d!==-1,p=o==null?void 0:o.call(null,t,r),g=h=>{h==="add"?e.push(t):e.splice(d,1),u=!0},v=h=>{let m=0;const y=(a==null?void 0:a.children)&&h[a.children];return y&&be(y)&&(m+=y.length,y.forEach(b=>{m+=v(b)})),m};return(!o||p)&&(Vt(n)?n&&!f?g("add"):!n&&f&&g("remove"):g(f?"remove":"add")),!(a!=null&&a.checkStrictly)&&(a!=null&&a.children)&&be(t[a.children])&&t[a.children].forEach(h=>{const m=Zc(e,h,n??!f,a,o,r+1,s);r+=v(h)+1,m&&(u=m)}),u}function Cj(e,t,n="children",a="hasChildren",o=!1){const l=r=>!(be(r)&&r.length);function s(r,u,c){t(r,u,c),u.forEach(d=>{if(d[a]&&o){t(d,null,c+1);return}const f=d[n];l(f)||s(d,f,c+1)})}e.forEach(r=>{if(r[a]&&o){t(r,null,0);return}const u=r[n];l(u)||s(r,u,0)})}const Sj=(e,t,n,a)=>{const o={strategy:"fixed",...e.popperOptions},l=ze(a==null?void 0:a.tooltipFormatter)?a.tooltipFormatter({row:n,column:a,cellValue:Ml(n,a.property).value}):void 0;return Ht(l)?{slotContent:l,content:null,...e,popperOptions:o}:{slotContent:null,content:l??t,...e,popperOptions:o}};let ln=null;function kj(e,t,n,a,o,l){var g;const s=Sj(e,t,n,a),r={...s,slotContent:void 0};if((ln==null?void 0:ln.trigger)===o){const v=(g=ln.vm)==null?void 0:g.component;Zw(v==null?void 0:v.props,r),v&&s.slotContent&&(v.slots.content=()=>[s.slotContent]);return}ln==null||ln();const u=l==null?void 0:l.refs.tableWrapper,c=u==null?void 0:u.dataset.prefix,d=J(_n,{virtualTriggering:!0,virtualRef:o,appendTo:u,placement:"top",transition:"none",offset:0,hideAfter:0,...r},s.slotContent?{content:()=>s.slotContent}:void 0);d.appContext={...l.appContext,...l};const f=document.createElement("div");Al(d,f),d.component.exposed.onOpen();const p=u==null?void 0:u.querySelector(`.${c}-scrollbar__wrap`);ln=()=>{var h,m;(m=(h=d.component)==null?void 0:h.exposed)!=null&&m.onClose&&d.component.exposed.onClose(),Al(null,f);const v=ln;p==null||p.removeEventListener("scroll",v),v.trigger=void 0,v.vm=void 0,ln=null},ln.trigger=o??void 0,ln.vm=d,p==null||p.addEventListener("scroll",ln)}function Pk(e){return e.children?Xw(e.children,Pk):[e]}function Kb(e,t){return e+t.colSpan}const Ak=(e,t,n,a)=>{let o=0,l=e;const s=n.states.columns.value;if(a){const u=Pk(a[e]);o=s.slice(0,s.indexOf(u[0])).reduce(Kb,0),l=o+u.reduce(Kb,0)-1}else o=e;let r;switch(t){case"left":l=s.length-n.states.rightFixedLeafColumnsLength.value&&(r="right");break;default:l=s.length-n.states.rightFixedLeafColumnsLength.value&&(r="right")}return r?{direction:r,start:o,after:l}:{}},sm=(e,t,n,a,o,l=0)=>{const s=[],{direction:r,start:u,after:c}=Ak(t,n,a,o);if(r){const d=r==="left";s.push(`${e}-fixed-column--${r}`),d&&c+l===a.states.fixedLeafColumnsLength.value-1?s.push("is-last-column"):!d&&u-l===a.states.columns.value.length-a.states.rightFixedLeafColumnsLength.value&&s.push("is-first-column")}return s};function Wb(e,t){return e+(Td(t.realWidth)||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const rm=(e,t,n,a)=>{const{direction:o,start:l=0,after:s=0}=Ak(e,t,n,a);if(!o)return;const r={},u=o==="left",c=n.states.columns.value;return u?r.left=c.slice(0,l).reduce(Wb,0):r.right=c.slice(s+1).reverse().reduce(Wb,0),r},kr=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function Lk(e){return e.some(t=>Ht(t)?!(t.type===vn||t.type===He&&!Lk(t.children)):!0)?e:null}function Ej(e){const t=vt(),n=A(!1),a=A([]),o=(c,d)=>{const f=t.store.states.rowExpandable.value;return(f==null?void 0:f(c,d))??!0};return{updateExpandRows:()=>{const c=e.data.value||[],d=e.rowKey.value;if(n.value)a.value=t.store.states.rowExpandable.value?c.filter(o):c.slice();else if(d){const f=or(a.value,d);a.value=c.filter((p,g)=>!!f[zn(p,d)]&&o(p,g))}else a.value=[]},toggleRowExpansion:(c,d)=>{const f=(e.data.value||[]).indexOf(c);f>-1&&!o(c,f)||Zc(a.value,c,d,void 0,void 0,void 0,e.rowKey.value)&&t.emit("expand-change",c,a.value.slice())},setExpandRowKeys:c=>{t.store.assertRowKey();const d=e.data.value||[],f=e.rowKey.value,p=or(d,f);a.value=c.reduce((g,v)=>{const h=p[v];return h&&o(h.row,h.index)&&g.push(h.row),g},[])},isRowExpanded:c=>{const d=e.rowKey.value;return d?!!or(a.value,d)[zn(c,d)]:a.value.includes(c)},states:{expandRows:a,defaultExpandAll:n}}}function xj(e){const t=vt(),n=A(null),a=A(null),o=c=>{t.store.assertRowKey(),n.value=c,s(c)},l=()=>{n.value=null},s=c=>{const{data:d,rowKey:f}=e,p=a.value;let g=null;f.value&&(g=(i(d)||[]).find(v=>zn(v,f.value)===c)??null),a.value=g??null,t.emit("current-change",a.value,p)};return{setCurrentRowKey:o,restoreCurrentRowKey:l,setCurrentRowByKey:s,updateCurrentRow:c=>{const d=a.value;if(c&&c!==d){a.value=c,t.emit("current-change",a.value,d);return}!c&&d&&(a.value=null,t.emit("current-change",null,d))},updateCurrentRowData:()=>{const c=e.rowKey.value,d=e.data.value||[],f=a.value;f&&!d.includes(f)?c?s(zn(f,c)):(a.value=null,t.emit("current-change",null,f)):n.value&&(s(n.value),l())},states:{_currentRowKey:n,currentRow:a}}}function Tj(e){const t=A([]),n=A({}),a=A(16),o=A(!1),l=A({}),s=A("hasChildren"),r=A("children"),u=A(!1),c=vt(),d=S(()=>e.rowKey.value?p(e.data.value||[]):{}),f=S(()=>{const C=e.rowKey.value,k=Object.keys(l.value),E={};return k.length&&k.forEach(T=>{if(l.value[T].length){const $={children:[]};l.value[T].forEach(N=>{const O=zn(N,C);$.children.push(O),N[s.value]&&!E[O]&&(E[O]={children:[]})}),E[T]=$}}),E}),p=C=>{const k=e.rowKey.value,E={};return Cj(C,(T,$,N)=>{const O=zn(T,k);be($)?E[O]={children:$.map(_=>zn(_,k)),level:N}:o.value&&(E[O]={children:[],lazy:!0,level:N})},r.value,s.value,o.value),E},g=(C=!1,k)=>{var O,_;k||(k=(O=c.store)==null?void 0:O.states.defaultExpandAll.value);const E=d.value,T=f.value,$=Object.keys(E),N={};if($.length){const P=i(n),D=[],W=(F,R)=>{if(C)return t.value?k||t.value.includes(R):!!(k||F!=null&&F.expanded);{const I=k||t.value&&t.value.includes(R);return!!(F!=null&&F.expanded||I)}};$.forEach(F=>{const R=P[F],I={...E[F]};if(I.expanded=W(R,F),I.lazy){const{loaded:L=!1,loading:z=!1}=R||{};I.loaded=!!L,I.loading=!!z,D.push(F)}N[F]=I});const U=Object.keys(T);o.value&&U.length&&D.length&&U.forEach(F=>{var L;const R=P[F],I=T[F].children;if(D.includes(F)){if(((L=N[F].children)==null?void 0:L.length)!==0)throw new Error("[ElTable]children must be an empty array.");N[F].children=I}else{const{loaded:z=!1,loading:H=!1}=R||{};N[F]={lazy:!0,loaded:!!z,loading:!!H,expanded:W(R,F),children:I,level:void 0}}})}n.value=N,(_=c.store)==null||_.updateTableScrollY()};fe(()=>t.value,()=>{g(!0)},{deep:!0}),fe(()=>d.value,()=>{g()}),fe(()=>f.value,()=>{g()});const v=C=>{t.value=C,g()},h=C=>o.value&&C&&"loaded"in C&&!C.loaded,m=(C,k)=>{c.store.assertRowKey();const E=e.rowKey.value,T=zn(C,E),$=T&&n.value[T];if(T&&$&&"expanded"in $){const N=$.expanded;k=xt(k)?!$.expanded:k,n.value[T].expanded=k,N!==k&&c.emit("expand-change",C,k),k&&h($)&&b(C,T,$),c.store.updateTableScrollY()}},y=C=>{c.store.assertRowKey();const k=e.rowKey.value,E=zn(C,k),T=n.value[E];h(T)?b(C,E,T):m(C,void 0)},b=(C,k,E)=>{const{load:T}=c.props;T&&!n.value[k].loaded&&(n.value[k].loading=!0,T(C,E,$=>{if(!be($))throw new TypeError("[ElTable] data must be an array");n.value[k].loading=!1,n.value[k].loaded=!0,n.value[k].expanded=!0,$.length&&(l.value[k]=$),c.emit("expand-change",C,!0)}))};return{loadData:b,loadOrToggle:y,toggleTreeExpansion:m,updateTreeExpandKeys:v,updateTreeData:g,updateKeyChildren:(C,k)=>{const{lazy:E,rowKey:T}=c.props;if(E){if(!T)throw new Error("[Table] rowKey is required in updateKeyChild");l.value[C]&&(l.value[C]=k)}},normalize:p,states:{expandRowKeys:t,treeData:n,indent:a,lazy:o,lazyTreeNodeMap:l,lazyColumnIdentifier:s,childrenColumnName:r,checkStrictly:u}}}const $j=(e,t)=>{const n=t.sortingColumn;return!n||De(n.sortable)?e:mj(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy)},cc=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,cc(n.children)):t.push(n)}),t};function Oj(){var it;const e=vt(),{size:t}=Nn((it=e.proxy)==null?void 0:it.$props),n=A(null),a=A([]),o=A([]),l=A(!1),s=A([]),r=A([]),u=A([]),c=A([]),d=A([]),f=A([]),p=A([]),g=A([]),v=[],h=A(0),m=A(0),y=A(0),b=A(!1),w=A([]),C=A(!1),k=A(!1),E=A(null),T=A(null),$=A({}),N=A(null),O=A(null),_=A(null),P=A(null),D=A(null),W=S(()=>n.value?or(w.value,n.value):void 0);fe(a,()=>{var We;e.state&&(I(!1),e.props.tableLayout==="auto"&&((We=e.refs.tableHeaderRef)==null||We.updateFixedColumnStyle()))},{deep:!0});const U=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},F=We=>{var et;(et=We.children)==null||et.forEach(gt=>{gt.fixed=We.fixed,F(gt)})},R=()=>{s.value.forEach($e=>{F($e)}),c.value=s.value.filter($e=>[!0,"left"].includes($e.fixed));const We=s.value.find($e=>$e.type==="selection");let et;We&&We.fixed!=="right"&&!c.value.includes(We)&&s.value.indexOf(We)===0&&c.value.length&&(c.value.unshift(We),et=!0),d.value=s.value.filter($e=>$e.fixed==="right");const gt=s.value.filter($e=>(et?$e.type!=="selection":!0)&&!$e.fixed);r.value=Array.from(c.value).concat(gt).concat(d.value);const ve=cc(gt),Le=cc(c.value),pe=cc(d.value);h.value=ve.length,m.value=Le.length,y.value=pe.length,u.value=Array.from(Le).concat(ve).concat(pe),l.value=c.value.length>0||d.value.length>0},I=(We,et=!1)=>{We&&R(),et?e.state.doLayout():e.state.debouncedUpdateLayout()},L=We=>W.value?!!W.value[zn(We,n.value)]:w.value.includes(We),z=()=>{b.value=!1;const We=w.value;w.value=[],We.length&&e.emit("selection-change",[])},H=()=>{var et,gt;let We;if(n.value){We=[];const ve=(gt=(et=e==null?void 0:e.store)==null?void 0:et.states)==null?void 0:gt.childrenColumnName.value,Le=or(a.value,n.value,!0,ve);for(const pe in W.value)$t(W.value,pe)&&!Le[pe]&&We.push(W.value[pe].row)}else We=w.value.filter(ve=>!a.value.includes(ve));if(We.length){const ve=w.value.filter(Le=>!We.includes(Le));w.value=ve,e.emit("selection-change",ve.slice())}},K=()=>(w.value||[]).slice(),q=(We,et,gt=!0,ve=!1)=>{var pe,$e,ut,It;const Le={children:($e=(pe=e==null?void 0:e.store)==null?void 0:pe.states)==null?void 0:$e.childrenColumnName.value,checkStrictly:(It=(ut=e==null?void 0:e.store)==null?void 0:ut.states)==null?void 0:It.checkStrictly.value};if(Zc(w.value,We,et,Le,ve?void 0:E.value,a.value.indexOf(We),n.value)){const Yt=(w.value||[]).slice();gt&&e.emit("select",Yt,We),e.emit("selection-change",Yt)}},Q=()=>{var $e,ut;const We=k.value?!b.value:!(b.value||w.value.length);b.value=We;let et=!1,gt=0;const ve=(ut=($e=e==null?void 0:e.store)==null?void 0:$e.states)==null?void 0:ut.rowKey.value,{childrenColumnName:Le}=e.store.states,pe={children:Le.value,checkStrictly:!1};a.value.forEach((It,Yt)=>{const Ne=Yt+gt;Zc(w.value,It,We,pe,E.value,Ne,ve)&&(et=!0),gt+=ue(zn(It,ve))}),et&&e.emit("selection-change",w.value?w.value.slice():[]),e.emit("select-all",(w.value||[]).slice())},ee=()=>{var pe;if(((pe=a.value)==null?void 0:pe.length)===0){b.value=!1;return}const{childrenColumnName:We}=e.store.states;let et=0,gt=0;const ve=$e=>{var ut;for(const It of $e){const Yt=E.value&&E.value.call(null,It,et);if(L(It))gt++;else if(!E.value||Yt)return!1;if(et++,(ut=It[We.value])!=null&&ut.length&&!ve(It[We.value]))return!1}return!0},Le=ve(a.value||[]);b.value=gt===0?!1:Le},ue=We=>{var Le;if(!e||!e.store)return 0;const{treeData:et}=e.store.states;let gt=0;const ve=(Le=et.value[We])==null?void 0:Le.children;return ve&&(gt+=ve.length,ve.forEach(pe=>{gt+=ue(pe)})),gt},te=(We,et)=>{const gt={};return Tn(We).forEach(ve=>{$.value[ve.id]=et,gt[ve.columnKey||ve.id]=et}),gt},de=(We,et,gt)=>{O.value&&O.value!==We&&(O.value.order=null),O.value=We,_.value=et,P.value=gt},se=()=>{let We=i(o);Object.keys($.value).forEach(et=>{const gt=$.value[et];if(!gt||gt.length===0)return;const ve=Ik({columns:u.value},et);ve&&ve.filterMethod&&(We=We.filter(Le=>gt.some(pe=>ve.filterMethod.call(null,pe,Le,ve))))}),N.value=We},Y=()=>{a.value=$j(N.value??[],{sortingColumn:O.value,sortProp:_.value,sortOrder:P.value})},G=(We=void 0)=>{We!=null&&We.filter||se(),Y()},V=We=>{const{tableHeaderRef:et}=e.refs;if(!et)return;const gt=Object.assign({},et.filterPanels),ve=Object.keys(gt);if(ve.length)if(De(We)&&(We=[We]),be(We)){const Le=We.map(pe=>gj({columns:u.value},pe));ve.forEach(pe=>{const $e=Le.find(ut=>ut.id===pe);$e&&($e.filteredValue=[])}),e.store.commit("filterChange",{column:Le,values:[],silent:!0,multi:!0})}else ve.forEach(Le=>{const pe=u.value.find($e=>$e.id===Le);pe&&(pe.filteredValue=[])}),$.value={},e.store.commit("filterChange",{column:{},values:[],silent:!0})},Z=()=>{O.value&&(de(null,null,null),e.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:oe,toggleRowExpansion:ce,updateExpandRows:ge,states:me,isRowExpanded:Me}=Ej({data:a,rowKey:n}),{updateTreeExpandKeys:Ie,toggleTreeExpansion:Re,updateTreeData:ye,updateKeyChildren:Te,loadOrToggle:we,states:Pe}=Tj({data:a,rowKey:n}),{updateCurrentRowData:Ve,updateCurrentRow:Qe,setCurrentRowKey:tt,states:nt}=xj({data:a,rowKey:n});return{assertRowKey:U,updateColumns:R,scheduleLayout:I,isSelected:L,clearSelection:z,cleanSelection:H,getSelectionRows:K,toggleRowSelection:q,_toggleAllSelection:Q,toggleAllSelection:null,updateAllSelected:ee,updateFilters:te,updateCurrentRow:Qe,updateSort:de,execFilter:se,execSort:Y,execQuery:G,clearFilter:V,clearSort:Z,toggleRowExpansion:ce,setExpandRowKeysAdapter:We=>{oe(We),Ie(We)},setCurrentRowKey:tt,toggleRowExpansionAdapter:(We,et)=>{u.value.some(({type:gt})=>gt==="expand")?ce(We,et):Re(We,et)},isRowExpanded:Me,updateExpandRows:ge,updateCurrentRowData:Ve,loadOrToggle:we,updateTreeData:ye,updateKeyChildren:Te,states:{tableSize:t,rowKey:n,data:a,_data:o,isComplex:l,_columns:s,originColumns:r,columns:u,fixedColumns:c,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:p,rightFixedLeafColumns:g,updateOrderFns:v,leafColumnsLength:h,fixedLeafColumnsLength:m,rightFixedLeafColumnsLength:y,isAllSelected:b,selection:w,reserveSelection:C,selectOnIndeterminate:k,selectable:E,rowExpandable:T,filters:$,filteredData:N,sortingColumn:O,sortProp:_,sortOrder:P,hoverRow:D,...me,...Pe,...nt}}}function nv(e,t){return e.map(n=>{var a;return n.id===t.id?t:((a=n.children)!=null&&a.length&&(n.children=nv(n.children,t)),n)})}function av(e){e.forEach(t=>{var n,a;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(a=t.children)!=null&&a.length&&av(t.children)}),e.sort((t,n)=>t.no-n.no)}function Nj(){const e=vt(),t=Oj(),n=he("table"),{t:a}=Et();return{ns:n,t:a,...t,mutations:{setData(r,u){const c=i(r._data)!==u;r.data.value=u,r._data.value=u,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),i(r.reserveSelection)?e.store.assertRowKey():c?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(r,u,c,d){var g;const f=i(r._columns);let p=[];c?(c&&!c.children&&(c.children=[]),(g=c.children)==null||g.push(u),p=nv(f,c)):(f.push(u),p=f),av(p),r._columns.value=p,r.updateOrderFns.push(d),u.type==="selection"&&(r.selectable.value=u.selectable,r.reserveSelection.value=u.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(r,u){var c;((c=u.getColumnIndex)==null?void 0:c.call(u))!==u.no&&(av(r._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(r,u,c,d){var g;const f=i(r._columns)||[];if(c)(g=c.children)==null||g.splice(c.children.findIndex(v=>v.id===u.id),1),Ae(()=>{var v;((v=c.children)==null?void 0:v.length)===0&&delete c.children}),r._columns.value=nv(f,c);else{const v=f.indexOf(u);v>-1&&(f.splice(v,1),r._columns.value=f)}const p=r.updateOrderFns.indexOf(d);p>-1&&r.updateOrderFns.splice(p,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(r,u){const{prop:c,order:d,init:f}=u;if(c){const p=i(r.columns).find(g=>g.property===c);p&&(p.order=d,e.store.updateSort(p,c,d),e.store.commit("changeSortCondition",{init:f}))}},changeSortCondition(r,u){const{sortingColumn:c,sortProp:d,sortOrder:f}=r,p=i(c),g=i(d),v=i(f);Td(v)&&(r.sortingColumn.value=null,r.sortProp.value=null),e.store.execQuery({filter:!0}),(!u||!(u.silent||u.init))&&e.emit("sort-change",{column:p,prop:g,order:v}),e.store.updateTableScrollY()},filterChange(r,u){const{column:c,values:d,silent:f}=u,p=e.store.updateFilters(c,d);e.store.execQuery(),f||e.emit("filter-change",p),e.store.updateTableScrollY()},toggleAllSelection(){var r,u;(u=(r=e.store).toggleAllSelection)==null||u.call(r)},rowSelectedChanged(r,u){e.store.toggleRowSelection(u),e.store.updateAllSelected()},setHoverRow(r,u){r.hoverRow.value=u},setCurrentRow(r,u){e.store.updateCurrentRow(u)}},commit:function(r,...u){const c=e.store.mutations;if(c[r])c[r].apply(e,[e.store.states,...u]);else throw new Error(`Action not found: ${r}`)},updateTableScrollY:function(){Ae(()=>e.layout.updateScrollY.apply(e.layout))}}}const im={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",rowExpandable:"rowExpandable",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function Mj(e,t){if(!e)throw new Error("Table is required.");const n=Nj();return n.toggleAllSelection=To(n._toggleAllSelection,10),Object.keys(im).forEach(a=>{Dk(Vk(t,a),a,n)}),Rj(n,t),n}function Rj(e,t){Object.keys(im).forEach(n=>{fe(()=>Vk(t,n),a=>{Dk(a,n,e)})})}function Dk(e,t,n){let a=e,o=im[t];ot(o)&&(a=a||o.default,o=o.key),n.states[o].value=a}function Vk(e,t){if(t.includes(".")){const n=t.split(".");let a=e;return n.forEach(o=>{a=a[o]}),a}else return e[t]}var Ij=class{constructor(e){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=A(null),this.scrollX=A(!1),this.scrollY=A(!1),this.bodyWidth=A(null),this.fixedWidth=A(null),this.rightFixedWidth=A(null),this.gutterWidth=0;for(const t in e)$t(e,t)&&(Ut(this[t])?this[t].value=e[t]:this[t]=e[t]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){const e=this.height.value;if(Td(e))return!1;const t=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(t!=null&&t.wrapRef)){let n=!0;const a=this.scrollY.value;return n=t.wrapRef.scrollHeight>t.wrapRef.clientHeight,this.scrollY.value=n,a!==n}return!1}setHeight(e,t="height"){if(!Mt)return;const n=this.table.vnode.el;if(e=bj(e),this.height.value=Number(e),!n&&(e||e===0)){Ae(()=>this.setHeight(e,t));return}n&&Fe(e)?(n.style[t]=`${e}px`,this.updateElsHeight()):n&&De(e)&&(n.style[t]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[];return this.table.store.states.columns.value.forEach(t=>{t.isColumnGroup?e.push.apply(e,t.columns):e.push(t)}),e}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(e){if(!e)return!0;let t=e;for(;t.tagName!=="DIV";){if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}updateColumnsWidth(){var r;if(!Mt)return;const e=this.fit,t=(r=this.table.vnode.el)==null?void 0:r.clientWidth;let n=0;const a=this.getFlattenColumns(),o=a.filter(u=>!Fe(u.width));if(a.forEach(u=>{Fe(u.width)&&u.realWidth&&(u.realWidth=null)}),o.length>0&&e){if(a.forEach(u=>{n+=Number(u.width||u.minWidth||80)}),n<=t){this.scrollX.value=!1;const u=t-n;if(o.length===1)o[0].realWidth=Number(o[0].minWidth||80)+u;else{const c=u/o.reduce((f,p)=>f+Number(p.minWidth||80),0);let d=0;o.forEach((f,p)=>{if(p===0)return;const g=Math.floor(Number(f.minWidth||80)*c);d+=g,f.realWidth=Number(f.minWidth||80)+g}),o[0].realWidth=Number(o[0].minWidth||80)+u-d}}else this.scrollX.value=!0,o.forEach(u=>{u.realWidth=Number(u.minWidth)});this.bodyWidth.value=Math.max(n,t),this.table.state.resizeState.value.width=this.bodyWidth.value}else a.forEach(u=>{!u.width&&!u.minWidth?u.realWidth=80:u.realWidth=Number(u.width||u.minWidth),n+=u.realWidth}),this.scrollX.value=n>t,this.bodyWidth.value=n;const l=this.store.states.fixedColumns.value;if(l.length>0){let u=0;l.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.fixedWidth.value=u}const s=this.store.states.rightFixedColumns.value;if(s.length>0){let u=0;s.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.rightFixedWidth.value=u}this.notifyObservers("columns")}addObserver(e){this.observers.push(e)}removeObserver(e){const t=this.observers.indexOf(e);t!==-1&&this.observers.splice(t,1)}notifyObservers(e){this.observers.forEach(t=>{var n,a;switch(e){case"columns":(n=t.state)==null||n.onColumnsChange(this);break;case"scrollable":(a=t.state)==null||a.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}})}};const oo=Symbol("ElTable"),Bk=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,Bk(n.children))):t.push(n)}),t},Fk=e=>{let t=1;const n=(o,l)=>{if(l&&(o.level=l.level+1,t{n(r,o),s+=r.colSpan}),o.colSpan=s}else o.colSpan=1};e.forEach(o=>{o.level=1,n(o,void 0)});const a=[];for(let o=0;o{o.children?(o.rowSpan=1,o.children.forEach(l=>l.isSubColumn=!0)):o.rowSpan=t-o.level+1,a[o.level-1].push(o)}),a};function _j(e){const t=_e(oo),n=S(()=>Fk(e.store.states.originColumns.value));return{isGroup:S(()=>{const l=n.value.length>1;return l&&t&&(t.state.isGroup.value=!0),l}),toggleAllSelection:l=>{l.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:n}}var Pj=ie({name:"ElTableFilterPanel",components:{ElCheckbox:Za,ElCheckboxGroup:zh,ElScrollbar:Ga,ElTooltip:_n,ElIcon:Be,ArrowDown:Io,ArrowUp:Ad},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:Bt.appendTo},setup(e){const t=vt(),{t:n}=Et(),a=he("table-filter"),o=t==null?void 0:t.parent;e.column&&!o.filterPanels.value[e.column.id]&&(o.filterPanels.value[e.column.id]=t);const l=A(null),s=A(null),r=A(0),u=S(()=>e.column&&e.column.filters),c=S(()=>e.column&&e.column.filterClassName?`${a.b()} ${e.column.filterClassName}`:a.b()),d=S({get:()=>{var T;return(((T=e.column)==null?void 0:T.filteredValue)||[])[0]},set:T=>{f.value&&(pa(T)?f.value.splice(0,1):f.value.splice(0,1,T))}}),f=S({get(){return e.column?e.column.filteredValue||[]:[]},set(T){var $;e.column&&(($=e.upDataColumn)==null||$.call(e,"filteredValue",T))}}),p=S(()=>e.column?e.column.filterMultiple:!0),g=T=>T.value===d.value,v=()=>{var T;(T=l.value)==null||T.onClose()},h=()=>{b(f.value),v()},m=()=>{f.value=[],b(f.value),v()},y=(T,$)=>{d.value=T,r.value=$,pa(T)?b([]):b(f.value),v()},b=T=>{var $,N;($=e.store)==null||$.commit("filterChange",{column:e.column,values:T}),(N=e.store)==null||N.updateAllSelected()},w=()=>{var T,$;(T=s.value)==null||T.focus(),!p.value&&k(),e.column&&(($=e.upDataColumn)==null||$.call(e,"filterOpened",!0))},C=()=>{var T;e.column&&((T=e.upDataColumn)==null||T.call(e,"filterOpened",!1))},k=()=>{if(pa(d)){r.value=0;return}const T=(u.value||[]).findIndex($=>$.value===d.value);r.value=T>=0?T+1:0};return{multiple:p,filterClassName:c,filteredValue:f,filterValue:d,filters:u,handleConfirm:h,handleReset:m,handleSelect:y,isPropAbsent:pa,isActive:g,t:n,ns:a,tooltipRef:l,rootRef:s,checkedIndex:r,handleShowTooltip:w,handleHideTooltip:C,handleKeydown:T=>{var P,D;const $=zt(T),N=(u.value?u.value.length:0)+1;let O=r.value,_=!0;switch($){case Ce.down:case Ce.right:O=(O+1)%N;break;case Ce.up:case Ce.left:O=(O-1+N)%N;break;case Ce.tab:v(),_=!1;break;case Ce.enter:case Ce.space:if(O===0)y(null,0);else{const W=(u.value||[])[O-1];W.value&&y(W.value,O)}break;default:_=!1;break}_&&T.preventDefault(),r.value=O,(D=(P=s.value)==null?void 0:P.querySelector(`.${a.e("list-item")}:nth-child(${O+1})`))==null||D.focus()}}}});const Aj=["disabled"],Lj=["tabindex","aria-checked"],Dj=["tabindex","aria-checked","onClick"],Vj=["aria-label"];function Bj(e,t,n,a,o,l){const s=Ot("el-checkbox"),r=Ot("el-checkbox-group"),u=Ot("el-scrollbar"),c=Ot("arrow-up"),d=Ot("arrow-down"),f=Ot("el-icon"),p=Ot("el-tooltip");return x(),re(p,{ref:"tooltipRef",offset:0,placement:e.placement,"show-arrow":!1,trigger:"click",role:"dialog",teleported:"",effect:"light",pure:"",loop:"","popper-class":e.filterClassName,persistent:"","append-to":e.appendTo,onShow:e.handleShowTooltip,onHide:e.handleHideTooltip},{content:ne(()=>[e.multiple?(x(),B("div",{key:0,ref:"rootRef",tabindex:"-1",class:M(e.ns.e("multiple"))},[j("div",{class:M(e.ns.e("content"))},[J(u,{"wrap-class":e.ns.e("wrap")},{default:ne(()=>[J(r,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=g=>e.filteredValue=g),class:M(e.ns.e("checkbox-group"))},{default:ne(()=>[(x(!0),B(He,null,Ct(e.filters,g=>(x(),re(s,{key:g.value,value:g.value},{default:ne(()=>[St(ke(g.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),j("div",{class:M(e.ns.e("bottom"))},[j("button",{class:M(e.ns.is("disabled",e.filteredValue.length===0)),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...g)=>e.handleConfirm&&e.handleConfirm(...g))},ke(e.t("el.table.confirmFilter")),11,Aj),j("button",{type:"button",onClick:t[2]||(t[2]=(...g)=>e.handleReset&&e.handleReset(...g))},ke(e.t("el.table.resetFilter")),1)],2)],2)):(x(),B("ul",{key:1,ref:"rootRef",tabindex:"-1",role:"radiogroup",class:M(e.ns.e("list")),onKeydown:t[4]||(t[4]=(...g)=>e.handleKeydown&&e.handleKeydown(...g))},[j("li",{role:"radio",class:M([e.ns.e("list-item"),e.ns.is("active",e.isPropAbsent(e.filterValue))]),tabindex:e.checkedIndex===0?0:-1,"aria-checked":e.isPropAbsent(e.filterValue),onClick:t[3]||(t[3]=g=>e.handleSelect(null,0))},ke(e.t("el.table.clearFilter")),11,Lj),(x(!0),B(He,null,Ct(e.filters,(g,v)=>(x(),B("li",{key:g.value,role:"radio",class:M([e.ns.e("list-item"),e.ns.is("active",e.isActive(g))]),tabindex:e.checkedIndex===v+1?0:-1,"aria-checked":e.isActive(g),onClick:h=>e.handleSelect(g.value,v+1)},ke(g.text),11,Dj))),128))],34))]),default:ne(()=>{var g;return[j("button",{type:"button",class:M(`${e.ns.namespace.value}-table__column-filter-trigger`),"aria-label":e.t("el.table.filterLabel",{column:((g=e.column)==null?void 0:g.label)||""})},[J(f,null,{default:ne(()=>[ae(e.$slots,"filter-icon",{},()=>{var v;return[(v=e.column)!=null&&v.filterOpened?(x(),re(c,{key:0})):(x(),re(d,{key:1}))]})]),_:3})],10,Vj)]}),_:3},8,["placement","popper-class","append-to","onShow","onHide"])}var Fj=kn(Pj,[["render",Bj]]);function um(e){const t=vt();fd(()=>{n.value.addObserver(t)}),mt(()=>{a(n.value),o(n.value)}),Qa(()=>{a(n.value),o(n.value)}),$r(()=>{n.value.removeObserver(t)});const n=S(()=>{const l=e.layout;if(!l)throw new Error("Can not find table layout.");return l}),a=l=>{var c;const s=((c=e.vnode.el)==null?void 0:c.querySelectorAll("colgroup > col"))||[];if(!s.length)return;const r=l.getFlattenColumns(),u={};r.forEach(d=>{u[d.id]=d});for(let d=0,f=s.length;d{var u,c;const s=((u=e.vnode.el)==null?void 0:u.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let d=0,f=s.length;d{h.stopPropagation()},l=(h,m)=>{!m.filters&&m.sortable?v(h,m,!1):m.filterable&&!m.sortable&&o(h),a==null||a.emit("header-click",m,h)},s=(h,m)=>{a==null||a.emit("header-contextmenu",m,h)},r=A(null),u=A(!1),c=A(),d=(h,m)=>{var y,b,w;if(Mt&&!(m.children&&m.children.length>0)&&r.value&&e.border&&r.value.id===m.id){u.value=!0;const C=a;t("set-drag-visible",!0);const k=(y=C==null?void 0:C.vnode.el)==null?void 0:y.getBoundingClientRect().left,E=(w=(b=n==null?void 0:n.vnode)==null?void 0:b.el)==null?void 0:w.querySelector(`th.${m.id}`),T=E.getBoundingClientRect(),$=T.left-k+30;Na(E,"noclick"),c.value={startMouseLeft:h.clientX,startLeft:T.right-k,startColumnLeft:T.left-k,tableLeft:k};const N=C==null?void 0:C.refs.resizeProxy;N.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const O=P=>{const D=P.clientX-c.value.startMouseLeft,W=c.value.startLeft+D;N.style.left=`${Math.max($,W)}px`},_=()=>{if(u.value){const{startColumnLeft:P,startLeft:D}=c.value;m.width=m.realWidth=Number.parseInt(N.style.left,10)-P,C==null||C.emit("header-dragend",m.width,D-P,m,h),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",u.value=!1,r.value=null,c.value=void 0,t("set-drag-visible",!1)}document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",_),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{Zn(E,"noclick")},0)};document.addEventListener("mousemove",O),document.addEventListener("mouseup",_)}},f=(h,m)=>{var N;if(!e.border||m.children&&m.children.length>0)return;const y=h.target,b=fa(y)?y.closest("th"):null;if(!b)return;const w=wo(b,"is-sortable");if(w){const O=u.value?"col-resize":"";b.style.cursor=O;const _=b.querySelector(".caret-wrapper");_&&(_.style.cursor=O)}if(!m.resizable||u.value){r.value=null;return}const C=b.getBoundingClientRect(),k=((N=b.parentNode)==null?void 0:N.lastElementChild)===b,E=e.allowDragLastColumn||!k,T=C.width>12&&C.right-h.clientX<8&&E,$=T?"col-resize":"";document.body.style.cursor=$,r.value=T?m:null,w&&(b.style.cursor=$)},p=()=>{!Mt||u.value||(document.body.style.cursor="")},g=({order:h,sortOrders:m})=>{if(h==="")return m[0];const y=m.indexOf(h||null);return m[y>m.length-2?0:y+1]},v=(h,m,y)=>{var N;h.stopPropagation();const b=m.order===y?null:y||g(m),w=(N=h.target)==null?void 0:N.closest("th");if(w&&wo(w,"noclick")){Zn(w,"noclick");return}if(!m.sortable)return;const C=h.currentTarget;if(["ascending","descending"].some(O=>wo(C,O)&&!m.sortOrders.includes(O)))return;const k=e.store.states;let E=k.sortProp.value,T;const $=k.sortingColumn.value;($!==m||$===m&&Td($.order))&&($&&($.order=null),k.sortingColumn.value=m,E=m.property),b?T=m.order=b:T=m.order=null,k.sortProp.value=E,k.sortOrder.value=T,a==null||a.store.commit("changeSortCondition")};return{handleHeaderClick:l,handleHeaderContextMenu:s,handleMouseDown:d,handleMouseMove:f,handleMouseOut:p,handleSortClick:v,handleFilterClick:o}}function Hj(e){const t=_e(oo),n=he("table");return{getHeaderRowStyle:r=>{const u=t==null?void 0:t.props.headerRowStyle;return ze(u)?u.call(null,{rowIndex:r}):u},getHeaderRowClass:r=>{const u=[],c=t==null?void 0:t.props.headerRowClassName;return De(c)?u.push(c):ze(c)&&u.push(c.call(null,{rowIndex:r})),u.join(" ")},getHeaderCellStyle:(r,u,c,d)=>{let f=(t==null?void 0:t.props.headerCellStyle)??{};ze(f)&&(f=f.call(null,{rowIndex:r,columnIndex:u,row:c,column:d}));const p=rm(u,d.fixed,e.store,c);return kr(p,"left"),kr(p,"right"),Object.assign({},f,p)},getHeaderCellClass:(r,u,c,d)=>{const f=sm(n.b(),u,d.fixed,e.store,c),p=[d.id,d.order,d.headerAlign,d.className,d.labelClassName,...f];d.children||p.push("is-leaf"),d.sortable&&p.push("is-sortable");const g=t==null?void 0:t.props.headerCellClassName;return De(g)?p.push(g):ze(g)&&p.push(g.call(null,{rowIndex:r,columnIndex:u,row:c,column:d})),p.push(n.e("cell")),p.filter(v=>!!v).join(" ")}}}var Kj=ie({name:"ElTableHeader",components:{ElCheckbox:Za},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String},allowDragLastColumn:{type:Boolean}},setup(e,{emit:t}){const n=vt(),a=_e(oo),o=he("table"),l=A({}),{onColumnsChange:s,onScrollableChange:r}=um(a),u=(a==null?void 0:a.props.tableLayout)==="auto",c=Rt(new Map),d=A();let f;const p=()=>{f=setTimeout(()=>{c.size>0&&(c.forEach((P,D)=>{const W=d.value.querySelector(`.${D.replace(/\s/g,".")}`);W&&(P.width=W.getBoundingClientRect().width||P.width)}),c.clear())})};fe(c,p),Pt(()=>{f&&(clearTimeout(f),f=void 0)}),mt(async()=>{await Ae(),await Ae();const{prop:P,order:D}=e.defaultSort;a==null||a.store.commit("sort",{prop:P,order:D,init:!0}),p()});const{handleHeaderClick:g,handleHeaderContextMenu:v,handleMouseDown:h,handleMouseMove:m,handleMouseOut:y,handleSortClick:b,handleFilterClick:w}=zj(e,t),{getHeaderRowStyle:C,getHeaderRowClass:k,getHeaderCellStyle:E,getHeaderCellClass:T}=Hj(e),{isGroup:$,toggleAllSelection:N,columnRows:O}=_j(e),{t:_}=Et();return n.state={onColumnsChange:s,onScrollableChange:r},n.filterPanels=l,{ns:o,t:_,filterPanels:l,onColumnsChange:s,onScrollableChange:r,columnRows:O,getHeaderRowClass:k,getHeaderRowStyle:C,getHeaderCellClass:T,getHeaderCellStyle:E,handleHeaderClick:g,handleHeaderContextMenu:v,handleMouseDown:h,handleMouseMove:m,handleMouseOut:y,handleSortClick:b,handleFilterClick:w,isGroup:$,toggleAllSelection:N,saveIndexSelection:c,isTableLayoutAuto:u,theadRef:d,updateFixedColumnStyle:p}},render(){const{ns:e,t,isGroup:n,columnRows:a,getHeaderCellStyle:o,getHeaderCellClass:l,getHeaderRowClass:s,getHeaderRowStyle:r,handleHeaderClick:u,handleHeaderContextMenu:c,handleMouseDown:d,handleMouseMove:f,handleSortClick:p,handleMouseOut:g,store:v,$parent:h,saveIndexSelection:m,isTableLayoutAuto:y}=this;let b=1;return Ye("thead",{ref:"theadRef",class:e.is("group",n)},a.map((w,C)=>Ye("tr",{class:s(C),key:C,style:r(C)},w.map((k,E)=>{k.rowSpan>b&&(b=k.rowSpan);const T=l(C,E,w,k);return y&&k.fixed&&m.set(T,k),Ye("th",{class:T,colspan:k.colSpan,key:`${k.id}-thead`,rowspan:k.rowSpan,scope:k.colSpan>1?"colgroup":"col",ariaSort:k.sortable?k.order:void 0,style:o(C,E,w,k),onClick:$=>{var N;(N=$.currentTarget)!=null&&N.classList.contains("noclick")||u($,k)},onContextmenu:$=>c($,k),onMousedown:$=>d($,k),onMousemove:$=>f($,k),onMouseout:g},[Ye("div",{class:["cell",k.filteredValue&&k.filteredValue.length>0?"highlight":""]},[k.renderHeader?k.renderHeader({column:k,$index:E,store:v,_self:h}):k.label,k.sortable&&Ye("button",{type:"button",class:"caret-wrapper","aria-label":t("el.table.sortLabel",{column:k.label||""}),onClick:$=>p($,k)},[Ye("i",{onClick:$=>p($,k,"ascending"),class:"sort-caret ascending"}),Ye("i",{onClick:$=>p($,k,"descending"),class:"sort-caret descending"})]),k.filterable&&Ye(Fj,{store:v,placement:k.filterPlacement||"bottom-start",appendTo:h==null?void 0:h.appendFilterPanelTo,column:k,upDataColumn:($,N)=>{k[$]=N}},{"filter-icon":()=>k.renderFilterIcon?k.renderFilterIcon({filterOpened:k.filterOpened}):null})])])}))))}});function Wj(e){const t=_e(oo),n=A(""),a=A(Ye("div")),o=(v,h,m)=>{var k,E;const y=t,b=Ff(v);let w=null;const C=(k=y==null?void 0:y.vnode.el)==null?void 0:k.dataset.prefix;b&&(w=Hb({columns:((E=e.store)==null?void 0:E.states.columns.value)??[]},b,C),w&&(y==null||y.emit(`cell-${m}`,h,w,b,v))),y==null||y.emit(`row-${m}`,h,w,v)},l=(v,h)=>{o(v,h,"dblclick")},s=(v,h)=>{var m;(m=e.store)==null||m.commit("setCurrentRow",h),o(v,h,"click")},r=(v,h)=>{o(v,h,"contextmenu")},u=To(v=>{var h;(h=e.store)==null||h.commit("setHoverRow",v)},30),c=To(()=>{var v;(v=e.store)==null||v.commit("setHoverRow",null)},30),d=v=>{const h=window.getComputedStyle(v,null);return{left:Number.parseInt(h.paddingLeft,10)||0,right:Number.parseInt(h.paddingRight,10)||0,top:Number.parseInt(h.paddingTop,10)||0,bottom:Number.parseInt(h.paddingBottom,10)||0}},f=(v,h,m)=>{var b;let y=(b=h==null?void 0:h.target)==null?void 0:b.parentNode;for(;v>1&&(y=y==null?void 0:y.nextSibling,!(!y||y.nodeName!=="TR"));)m(y,"hover-row hover-fixed-row"),v--};return{handleDoubleClick:l,handleClick:s,handleContextMenu:r,handleMouseEnter:u,handleMouseLeave:c,handleCellMouseEnter:(v,h,m)=>{var R,I,L;if(!t)return;const y=t,b=Ff(v),w=(R=y==null?void 0:y.vnode.el)==null?void 0:R.dataset.prefix;let C=null;if(b){if(C=Hb({columns:((I=e.store)==null?void 0:I.states.columns.value)??[]},b,w),!C)return;b.rowSpan>1&&f(b.rowSpan,v,Na);const z=y.hoverState={cell:b,column:C,row:h};y==null||y.emit("cell-mouse-enter",z.row,z.column,z.cell,v)}if(!m){(ln==null?void 0:ln.trigger)===b&&(ln==null||ln());return}const k=v.target.querySelector(".cell");if(!(wo(k,`${w}-tooltip`)&&k.childNodes.length&&((L=k.textContent)!=null&&L.trim())))return;const E=document.createRange();E.setStart(k,0),E.setEnd(k,k.childNodes.length);const{width:T,height:$}=E.getBoundingClientRect(),{width:N,height:O}=k.getBoundingClientRect(),{top:_,left:P,right:D,bottom:W}=d(k),U=P+D,F=_+W;Rl(T+U,N)||Rl($+F,O)||Rl(k.scrollWidth,N)?kj(m,((b==null?void 0:b.innerText)||(b==null?void 0:b.textContent))??"",h,C,b,y):(ln==null?void 0:ln.trigger)===b&&(ln==null||ln())},handleCellMouseLeave:v=>{const h=Ff(v);if(!h)return;h.rowSpan>1&&f(h.rowSpan,v,Zn);const m=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",m==null?void 0:m.row,m==null?void 0:m.column,m==null?void 0:m.cell,v)},tooltipContent:n,tooltipTrigger:a}}function jj(e){const t=_e(oo),n=he("table");return{getRowStyle:(c,d)=>{const f=t==null?void 0:t.props.rowStyle;return ze(f)?f.call(null,{row:c,rowIndex:d}):f||null},getRowClass:(c,d,f)=>{var v;const p=[n.e("row")];t!=null&&t.props.highlightCurrentRow&&c===((v=e.store)==null?void 0:v.states.currentRow.value)&&p.push("current-row"),e.stripe&&f%2===1&&p.push(n.em("row","striped"));const g=t==null?void 0:t.props.rowClassName;return De(g)?p.push(g):ze(g)&&p.push(g.call(null,{row:c,rowIndex:d})),p},getCellStyle:(c,d,f,p)=>{const g=t==null?void 0:t.props.cellStyle;let v=g??{};ze(g)&&(v=g.call(null,{rowIndex:c,columnIndex:d,row:f,column:p}));const h=rm(d,e==null?void 0:e.fixed,e.store);return kr(h,"left"),kr(h,"right"),Object.assign({},v,h)},getCellClass:(c,d,f,p,g)=>{const v=sm(n.b(),d,e==null?void 0:e.fixed,e.store,void 0,g),h=[p.id,p.align,p.className,...v],m=t==null?void 0:t.props.cellClassName;return De(m)?h.push(m):ze(m)&&h.push(m.call(null,{rowIndex:c,columnIndex:d,row:f,column:p})),h.push(n.e("cell")),h.filter(y=>!!y).join(" ")},getSpan:(c,d,f,p)=>{let g=1,v=1;const h=t==null?void 0:t.props.spanMethod;if(ze(h)){const m=h({row:c,column:d,rowIndex:f,columnIndex:p});be(m)?(g=m[0],v=m[1]):ot(m)&&(g=m.rowspan,v=m.colspan)}return{rowspan:g,colspan:v}},getColspanRealWidth:(c,d,f)=>{if(d<1)return c[f].realWidth;const p=c.map(({realWidth:g,width:v})=>g||v).slice(f,f+d);return Number(p.reduce((g,v)=>Number(g)+Number(v),-1))}}}const Uj=["colspan","rowspan"];var Yj=ie({name:"TableTdWrapper",__name:"td-wrapper",props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(e){return(t,n)=>(x(),B("td",{colspan:e.colspan,rowspan:e.rowspan},[ae(t.$slots,"default")],8,Uj))}}),qj=Yj;function Gj(e){const t=_e(oo),n=he("table"),{handleDoubleClick:a,handleClick:o,handleContextMenu:l,handleMouseEnter:s,handleMouseLeave:r,handleCellMouseEnter:u,handleCellMouseLeave:c,tooltipContent:d,tooltipTrigger:f}=Wj(e),{getRowStyle:p,getRowClass:g,getCellStyle:v,getCellClass:h,getSpan:m,getColspanRealWidth:y}=jj(e);let b=-1;const w=S(()=>{var $;return($=e.store)==null?void 0:$.states.columns.value.findIndex(({type:N})=>N==="default")}),C=($,N)=>{var _;const O=(_=t==null?void 0:t.props)==null?void 0:_.rowKey;return O?zn($,O):N},k=($,N,O,_=!1)=>{const{tooltipEffect:P,tooltipOptions:D,store:W}=e,{indent:U,columns:F}=W.states,R=[];let I=!0;return O&&(R.push(n.em("row",`level-${O.level}`)),I=!!O.display),N===0&&(b=-1),e.stripe&&I&&b++,R.push(...g($,N,b)),Ye("tr",{style:[I?null:{display:"none"},p($,N)],class:R,key:C($,N),onDblclick:L=>a(L,$),onClick:L=>o(L,$),onContextmenu:L=>l(L,$),onMouseenter:()=>s(N),onMouseleave:r},F.value.map((L,z)=>{const{rowspan:H,colspan:K}=m($,L,N,z);if(!H||!K)return null;const q=Object.assign({},L);q.realWidth=y(F.value,K,z);const Q={store:W,_self:e.context||t,column:q,row:$,$index:N,cellIndex:z,expanded:_};z===w.value&&O&&(Q.treeNode={indent:O.level&&O.level*U.value,level:O.level},Vt(O.expanded)&&(Q.treeNode.expanded=O.expanded,"loading"in O&&(Q.treeNode.loading=O.loading),"noLazyChildren"in O&&(Q.treeNode.noLazyChildren=O.noLazyChildren)));const ee=`${C($,N)},${z}`,ue=q.columnKey||q.rawColumnKey||"",te=L.showOverflowTooltip&&Zw({effect:P},D,L.showOverflowTooltip);return Ye(qj,{style:v(N,z,$,L),class:h(N,z,$,L,K-1),key:`${ue}${ee}`,rowspan:H,colspan:K,onMouseenter:de=>u(de,$,te),onMouseleave:c},{default:()=>E(z,L,Q)})}))},E=($,N,O)=>N.renderCell(O);return{wrappedRowRender:($,N)=>{const O=e.store,{isRowExpanded:_,assertRowKey:P}=O,{treeData:D,lazyTreeNodeMap:W,childrenColumnName:U,rowKey:F}=O.states,R=O.states.columns.value;if(R.some(({type:I})=>I==="expand")){const I=_($),L=k($,N,void 0,I),z=t==null?void 0:t.renderExpanded;if(!z)return console.error("[Element Error]renderExpanded is required."),L;const H=[[L]];return(t.props.preserveExpandedContent||I)&&H[0].push(Ye("tr",{key:`expanded-row__${L.key}`,style:{display:I?"":"none"}},[Ye("td",{colspan:R.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[z({row:$,$index:N,store:O,expanded:I})])])),H}else if(Object.keys(D.value).length){P();const I=zn($,F.value);let L=D.value[I],z=null;L&&(z={expanded:L.expanded,level:L.level,display:!0,noLazyChildren:void 0,loading:void 0},Vt(L.lazy)&&(z&&Vt(L.loaded)&&L.loaded&&(z.noLazyChildren=!(L.children&&L.children.length)),z.loading=L.loading));const H=[k($,N,z??void 0)];if(L){let K=0;const q=(Q,ee)=>{Q&&Q.length&&ee&&Q.forEach(ue=>{const te={display:ee.display&&ee.expanded,level:ee.level+1,expanded:!1,noLazyChildren:!1,loading:!1},de=zn(ue,F.value);if(pa(de))throw new Error("For nested data item, row-key is required.");L={...D.value[de]},L&&(te.expanded=L.expanded,L.level=L.level||te.level,L.display=!!(L.expanded&&te.display),Vt(L.lazy)&&(Vt(L.loaded)&&L.loaded&&(te.noLazyChildren=!(L.children&&L.children.length)),te.loading=L.loading)),K++,H.push(k(ue,N+K,te)),L&&q(W.value[de]||ue[U.value],L)})};L.display=!0,q(W.value[I]||$[U.value],L)}return H}else return k($,N,void 0)},tooltipContent:d,tooltipTrigger:f}}const Xj={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var Zj=ie({name:"ElTableBody",props:Xj,setup(e){var d;const t=vt(),n=_e(oo),a=he("table"),{wrappedRowRender:o,tooltipContent:l,tooltipTrigger:s}=Gj(e),{onColumnsChange:r,onScrollableChange:u}=um(n),c=[];return fe((d=e.store)==null?void 0:d.states.hoverRow,(f,p)=>{var y,b;const g=t==null?void 0:t.vnode.el,v=Array.from((g==null?void 0:g.children)||[]).filter(w=>w==null?void 0:w.classList.contains(`${a.e("row")}`));let h=f;const m=(y=v[h])==null?void 0:y.childNodes;if(m!=null&&m.length){let w=0;Array.from(m).reduce((C,k,E)=>{var T,$;return((T=m[E])==null?void 0:T.colSpan)>1&&(w=($=m[E])==null?void 0:$.colSpan),k.nodeName!=="TD"&&w===0&&C.push(E),w>0&&w--,C},[]).forEach(C=>{var k;for(h=f;h>0;){const E=(k=v[h-1])==null?void 0:k.childNodes;if(E[C]&&E[C].nodeName==="TD"&&E[C].rowSpan>1){Na(E[C],"hover-cell"),c.push(E[C]);break}h--}})}else c.forEach(w=>Zn(w,"hover-cell")),c.length=0;!((b=e.store)!=null&&b.states.isComplex.value)||!Mt||_a(()=>{const w=v[p],C=v[f];w&&!w.classList.contains("hover-fixed-row")&&Zn(w,"hover-row"),C&&Na(C,"hover-row")})}),$r(()=>{ln==null||ln()}),{ns:a,onColumnsChange:r,onScrollableChange:u,wrappedRowRender:o,tooltipContent:l,tooltipTrigger:s}},render(){const{wrappedRowRender:e,store:t}=this;return Ye("tbody",{tabIndex:-1},[((t==null?void 0:t.states.data.value)||[]).reduce((n,a)=>n.concat(e(a,n.length)),[])])}});function Jj(){var t;const e=(t=_e(oo))==null?void 0:t.store;return{leftFixedLeafCount:S(()=>(e==null?void 0:e.states.fixedLeafColumnsLength.value)??0),rightFixedLeafCount:S(()=>(e==null?void 0:e.states.rightFixedColumns.value.length)??0),columnsCount:S(()=>(e==null?void 0:e.states.columns.value.length)??0),leftFixedCount:S(()=>(e==null?void 0:e.states.fixedColumns.value.length)??0),rightFixedCount:S(()=>(e==null?void 0:e.states.rightFixedColumns.value.length)??0),columns:S(()=>(e==null?void 0:e.states.columns.value)??[])}}function Qj(e){const{columns:t}=Jj(),n=he("table");return{getCellClasses:(l,s)=>{const r=l[s],u=[n.e("cell"),r.id,r.align,r.labelClassName,...sm(n.b(),s,r.fixed,e.store)];return r.className&&u.push(r.className),r.children||u.push(n.is("leaf")),u},getCellStyles:(l,s)=>{const r=rm(s,l.fixed,e.store);return kr(r,"left"),kr(r,"right"),r},columns:t}}var eU=ie({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const t=_e(oo),n=he("table"),{getCellClasses:a,getCellStyles:o,columns:l}=Qj(e),{onScrollableChange:s,onColumnsChange:r}=um(t);return{ns:n,onScrollableChange:s,onColumnsChange:r,getCellClasses:a,getCellStyles:o,columns:l}},render(){const{columns:e,getCellStyles:t,getCellClasses:n,summaryMethod:a,sumText:o}=this,l=this.store.states.data.value;let s=[];return a?s=a({columns:e,data:l}):e.forEach((r,u)=>{if(u===0){s[u]=o;return}const c=l.map(g=>Number(g[r.property])),d=[];let f=!0;c.forEach(g=>{if(!Number.isNaN(+g)){f=!1;const v=`${g}`.split(".")[1];d.push(v?v.length:0)}});const p=Math.max.apply(null,d);f?s[u]="":s[u]=c.reduce((g,v)=>{const h=Number(v);return Number.isNaN(+h)?g:Number.parseFloat((g+v).toFixed(Math.min(p,20)))},0)}),Ye(Ye("tfoot",[Ye("tr",{},[...e.map((r,u)=>Ye("td",{key:u,colspan:r.colSpan,rowspan:r.rowSpan,class:n(e,u),style:t(r,u)},[Ye("div",{class:["cell",r.labelClassName]},[s[u]])]))])]))}});function tU(e){return{setCurrentRow:f=>{e.commit("setCurrentRow",f)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(f,p,g=!0)=>{e.toggleRowSelection(f,p,!1,g),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:f=>{e.clearFilter(f)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(f,p)=>{e.toggleRowExpansionAdapter(f,p)},clearSort:()=>{e.clearSort()},sort:(f,p)=>{e.commit("sort",{prop:f,order:p})},updateKeyChildren:(f,p)=>{e.updateKeyChildren(f,p)}}}function nU(e,t,n,a){const o=A(!1),l=A(null),s=A(!1),r=U=>{s.value=U},u=A({width:null,height:null,headerHeight:null}),c=A(!1),d={display:"inline-block",verticalAlign:"middle"},f=A(),p=A(0),g=A(0),v=A(0),h=A(0),m=A(0);fe(()=>e.height,U=>{t.setHeight(U??null)},{immediate:!0}),fe(()=>e.maxHeight,U=>{t.setMaxHeight(U??null)},{immediate:!0}),fe(()=>[e.currentRowKey,n.states.rowKey],([U,F])=>{!i(F)||!i(U)||n.setCurrentRowKey(`${U}`)},{immediate:!0}),fe(()=>e.data,U=>{a.store.commit("setData",U)},{immediate:!0,deep:!0}),sa(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const y=()=>{a.store.commit("setHoverRow",null),a.hoverState&&(a.hoverState=null)},b=(U,F)=>{const{pixelX:R,pixelY:I}=F;Math.abs(R)>=Math.abs(I)&&(a.refs.bodyWrapper.scrollLeft+=F.pixelX/5)},w=S(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),C=S(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),k=()=>{w.value&&t.updateElsHeight(),t.updateColumnsWidth(),!(typeof window>"u")&&requestAnimationFrame(N)};mt(async()=>{await Ae(),n.updateColumns(),O(),requestAnimationFrame(k);const U=a.vnode.el,F=a.refs.headerWrapper;e.flexible&&U&&U.parentElement&&(U.parentElement.style.minWidth="0"),u.value={width:f.value=U.offsetWidth,height:U.offsetHeight,headerHeight:e.showHeader&&F?F.offsetHeight:null},n.states.columns.value.forEach(R=>{R.filteredValue&&R.filteredValue.length&&a.store.commit("filterChange",{column:R,values:R.filteredValue,silent:!0})}),a.$ready=!0});const E=(U,F)=>{if(!U)return;const R=Array.from(U.classList).filter(I=>!I.startsWith("is-scrolling-"));R.push(t.scrollX.value?F:"is-scrolling-none"),U.className=R.join(" ")},T=U=>{const{tableWrapper:F}=a.refs;E(F,U)},$=U=>{const{tableWrapper:F}=a.refs;return!!(F&&F.classList.contains(U))},N=function(){if(!a.refs.scrollBarRef)return;if(!t.scrollX.value){const H="is-scrolling-none";$(H)||T(H);return}const U=a.refs.scrollBarRef.wrapRef;if(!U)return;const{scrollLeft:F,offsetWidth:R,scrollWidth:I}=U,{headerWrapper:L,footerWrapper:z}=a.refs;L&&(L.scrollLeft=F),z&&(z.scrollLeft=F),F>=I-R-1?T("is-scrolling-right"):T(F===0?"is-scrolling-left":"is-scrolling-middle")},O=()=>{a.refs.scrollBarRef&&(a.refs.scrollBarRef.wrapRef&&At(a.refs.scrollBarRef.wrapRef,"scroll",N,{passive:!0}),e.fit?Xt(a.vnode.el,_):At(window,"resize",_),Xt(a.refs.tableInnerWrapper,()=>{var U,F;_(),(F=(U=a.refs)==null?void 0:U.scrollBarRef)==null||F.update()}))},_=()=>{var q,Q,ee,ue;const U=a.vnode.el;if(!a.$ready||!U)return;let F=!1;const{width:R,height:I,headerHeight:L}=u.value,z=f.value=U.offsetWidth;R!==z&&(F=!0);const H=U.offsetHeight;(e.height||w.value)&&I!==H&&(F=!0);const K=e.tableLayout==="fixed"?a.refs.headerWrapper:(q=a.refs.tableHeaderRef)==null?void 0:q.$el;e.showHeader&&(K==null?void 0:K.offsetHeight)!==L&&(F=!0),p.value=((Q=a.refs.tableWrapper)==null?void 0:Q.scrollHeight)||0,v.value=(K==null?void 0:K.scrollHeight)||0,h.value=((ee=a.refs.footerWrapper)==null?void 0:ee.offsetHeight)||0,m.value=((ue=a.refs.appendWrapper)==null?void 0:ue.offsetHeight)||0,g.value=p.value-v.value-h.value-m.value,F&&(u.value={width:z,height:H,headerHeight:e.showHeader&&(K==null?void 0:K.offsetHeight)||0},k())},P=bn(),D=S(()=>{const{bodyWidth:U,scrollY:F,gutterWidth:R}=t;return U.value?`${U.value-(F.value?R:0)}px`:""}),W=S(()=>e.maxHeight?"fixed":e.tableLayout);return{isHidden:o,renderExpanded:l,setDragVisible:r,isGroup:c,handleMouseLeave:y,handleHeaderFooterMousewheel:b,tableSize:P,emptyBlockStyle:S(()=>{if(e.data&&e.data.length)return;let U="100%";e.height&&g.value&&(U=`${g.value}px`);const F=f.value;return{width:F?`${F}px`:"",height:U}}),resizeProxyVisible:s,bodyWidth:D,resizeState:u,doLayout:k,tableBodyStyles:C,tableLayout:W,scrollbarViewStyle:d,scrollbarStyle:S(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${v.value+h.value}px)`}:{maxHeight:`${+e.maxHeight-v.value-h.value}px`}:{})}}function aU(e){let t;const n=()=>{const a=e.vnode.el.querySelector(".hidden-columns"),o={childList:!0,subtree:!0},l=e.store.states.updateOrderFns;t=new MutationObserver(()=>{l.forEach(s=>s())}),t.observe(a,o)};mt(()=>{n()}),$r(()=>{t==null||t.disconnect()})}var oU={data:{type:Array,default:()=>[]},size:Sn,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,rowExpandable:{type:Function},defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:[String,Object,Array],default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0},allowDragLastColumn:{type:Boolean,default:!0},preserveExpandedContent:Boolean,nativeScrollbar:Boolean};function zk(e){const t=e.tableLayout==="auto";let n=e.columns||[];t&&n.every(({width:o})=>xt(o))&&(n=[]);const a=o=>{const l={key:`${e.tableLayout}_${o.id}`,style:{},name:void 0};return t?l.style={width:`${o.width}px`}:l.name=o.id,l};return Ye("colgroup",{},n.map(o=>Ye("col",a(o))))}zk.props=["columns","tableLayout"];const lU=()=>{const e=A(),t=(l,s)=>{const r=e.value;r&&r.scrollTo(l,s)},n=(l,s)=>{const r=e.value;r&&Fe(s)&&["Top","Left"].includes(l)&&r[`setScroll${l}`](s)};return{scrollBarRef:e,scrollTo:t,setScrollTop:l=>n("Top",l),setScrollLeft:l=>n("Left",l)}};let sU=1;var rU=ie({name:"ElTable",directives:{Mousewheel:C3},components:{TableHeader:Kj,TableBody:Zj,TableFooter:eU,ElScrollbar:Ga,hColgroup:zk},props:oU,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(e){const{t}=Et(),n=he("table"),a=fl("table"),o=vt();bt(oo,o);const l=Mj(o,e);o.store=l;const s=new Ij({store:o.store,table:o,fit:e.fit,showHeader:e.showHeader});o.layout=s;const r=S(()=>(l.states.data.value||[]).length===0),{setCurrentRow:u,getSelectionRows:c,toggleRowSelection:d,clearSelection:f,clearFilter:p,toggleAllSelection:g,toggleRowExpansion:v,clearSort:h,sort:m,updateKeyChildren:y}=tU(l),{isHidden:b,renderExpanded:w,setDragVisible:C,isGroup:k,handleMouseLeave:E,handleHeaderFooterMousewheel:T,tableSize:$,emptyBlockStyle:N,resizeProxyVisible:O,bodyWidth:_,resizeState:P,doLayout:D,tableBodyStyles:W,tableLayout:U,scrollbarViewStyle:F,scrollbarStyle:R}=nU(e,s,l,o),{scrollBarRef:I,scrollTo:L,setScrollLeft:z,setScrollTop:H}=lU(),K=To(D,50),q=`${n.namespace.value}-table_${sU++}`;o.tableId=q,o.state={isGroup:k,resizeState:P,doLayout:D,debouncedUpdateLayout:K};const Q=S(()=>e.sumText??t("el.table.sumText")),ee=S(()=>e.emptyText??t("el.table.emptyText")),ue=S(()=>{var se;return e.tooltipEffect??((se=a.value)==null?void 0:se.tooltipEffect)}),te=S(()=>{var se;return e.tooltipOptions??((se=a.value)==null?void 0:se.tooltipOptions)}),de=S(()=>Fk(l.states.originColumns.value)[0]);return aU(o),Pt(()=>{K.cancel()}),{ns:n,layout:s,store:l,columns:de,handleHeaderFooterMousewheel:T,handleMouseLeave:E,tableId:q,tableSize:$,isHidden:b,isEmpty:r,renderExpanded:w,resizeProxyVisible:O,resizeState:P,isGroup:k,bodyWidth:_,tableBodyStyles:W,emptyBlockStyle:N,debouncedUpdateLayout:K,setCurrentRow:u,getSelectionRows:c,toggleRowSelection:d,clearSelection:f,clearFilter:p,toggleAllSelection:g,toggleRowExpansion:v,clearSort:h,doLayout:D,sort:m,updateKeyChildren:y,t,setDragVisible:C,context:o,computedSumText:Q,computedEmptyText:ee,computedTooltipEffect:ue,computedTooltipOptions:te,tableLayout:U,scrollbarViewStyle:F,scrollbarStyle:R,scrollBarRef:I,scrollTo:L,setScrollLeft:z,setScrollTop:H,allowDragLastColumn:e.allowDragLastColumn}}});const iU=["data-prefix"],uU={ref:"hiddenColumns",class:"hidden-columns"};function cU(e,t,n,a,o,l){const s=Ot("hColgroup"),r=Ot("table-header"),u=Ot("table-body"),c=Ot("table-footer"),d=Ot("el-scrollbar"),f=Pv("mousewheel");return x(),B("div",{ref:"tableWrapper",class:M([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:je(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[1]||(t[1]=(...p)=>e.handleMouseLeave&&e.handleMouseLeave(...p))},[j("div",{ref:"tableInnerWrapper",class:M(e.ns.e("inner-wrapper"))},[j("div",uU,[ae(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?dt((x(),B("div",{key:0,ref:"headerWrapper",class:M(e.ns.e("header-wrapper"))},[j("table",{ref:"tableHeader",class:M(e.ns.e("header")),style:je(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[J(s,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),J(r,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,"append-filter-panel-to":e.appendFilterPanelTo,"allow-drag-last-column":e.allowDragLastColumn,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[f,e.handleHeaderFooterMousewheel]]):le("v-if",!0),j("div",{ref:"bodyWrapper",class:M(e.ns.e("body-wrapper"))},[J(d,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn,tabindex:e.scrollbarTabindex,native:e.nativeScrollbar,onScroll:t[0]||(t[0]=p=>e.$emit("scroll",p))},{default:ne(()=>[j("table",{ref:"tableBody",class:M(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:je({width:e.bodyWidth,tableLayout:e.tableLayout})},[J(s,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(x(),re(r,{key:0,ref:"tableHeaderRef",class:M(e.ns.e("body-header")),border:e.border,"default-sort":e.defaultSort,store:e.store,"append-filter-panel-to":e.appendFilterPanelTo,onSetDragVisible:e.setDragVisible},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):le("v-if",!0),J(u,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.computedTooltipEffect,"tooltip-options":e.computedTooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&e.tableLayout==="auto"?(x(),re(c,{key:1,class:M(e.ns.e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):le("v-if",!0)],6),e.isEmpty?(x(),B("div",{key:0,ref:"emptyBlock",style:je(e.emptyBlockStyle),class:M(e.ns.e("empty-block"))},[j("span",{class:M(e.ns.e("empty-text"))},[ae(e.$slots,"empty",{},()=>[St(ke(e.computedEmptyText),1)])],2)],6)):le("v-if",!0),e.$slots.append?(x(),B("div",{key:1,ref:"appendWrapper",class:M(e.ns.e("append-wrapper"))},[ae(e.$slots,"append")],2)):le("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","native"])],2),e.showSummary&&e.tableLayout==="fixed"?dt((x(),B("div",{key:1,ref:"footerWrapper",class:M(e.ns.e("footer-wrapper"))},[j("table",{class:M(e.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:je(e.tableBodyStyles)},[J(s,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),J(c,{border:e.border,"default-sort":e.defaultSort,store:e.store,"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[Nt,!e.isEmpty],[f,e.handleHeaderFooterMousewheel]]):le("v-if",!0),e.border||e.isGroup?(x(),B("div",{key:2,class:M(e.ns.e("border-left-patch"))},null,2)):le("v-if",!0)],2),dt(j("div",{ref:"resizeProxy",class:M(e.ns.e("column-resize-proxy"))},null,2),[[Nt,e.resizeProxyVisible]])],46,iU)}var dU=kn(rU,[["render",cU]]);const fU={selection:"table-column--selection",expand:"table__expand-column"},pU={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},vU=e=>fU[e]||"",hU={selection:{renderHeader({store:e}){function t(){return e.states.data.value&&e.states.data.value.length===0}return Ye(Za,{disabled:t(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection??void 0,modelValue:e.states.isAllSelected.value,ariaLabel:e.t("el.table.selectAllLabel")})},renderCell({row:e,column:t,store:n,$index:a}){return Ye(Za,{disabled:t.selectable?!t.selectable.call(null,e,a):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:o=>o.stopPropagation(),modelValue:n.isSelected(e),ariaLabel:n.t("el.table.selectRowLabel")})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let n=t+1;const a=e.index;return Fe(a)?n=t+a:ze(a)&&(n=a(t)),Ye("div",{},[n])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({column:e,row:t,store:n,expanded:a,$index:o}){var c,d;const{ns:l}=n,s=[l.e("expand-icon")];!e.renderExpand&&a&&s.push(l.em("expand-icon","expanded"));const r=function(f){f.stopPropagation(),n.toggleRowExpansion(t)},u=((d=(c=n.states.rowExpandable).value)==null?void 0:d.call(c,t,o))??!0;return u||s.push(l.is("disabled")),Ye("button",{type:"button",disabled:!u,"aria-label":n.t(a?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":a,class:s,onClick:r},{default:()=>e.renderExpand?[e.renderExpand({expanded:a,expandable:u})]:[Ye(Be,null,{default:()=>[Ye(Jn)]})]})},sortable:!1,resizable:!1}};function mU({row:e,column:t,$index:n}){var l;const a=t.property,o=a&&Ml(e,a).value;return t&&t.formatter?t.formatter(e,t,o,n):((l=o==null?void 0:o.toString)==null?void 0:l.call(o))||""}function gU({row:e,treeNode:t,store:n},a=!1){const{ns:o}=n;if(!t)return a?[Ye("span",{class:o.e("placeholder")})]:null;const l=[],s=function(r){r.stopPropagation(),!t.loading&&n.loadOrToggle(e)};if(t.indent&&l.push(Ye("span",{class:o.e("indent"),style:{"padding-left":`${t.indent}px`}})),Vt(t.expanded)&&!t.noLazyChildren){const r=[o.e("expand-icon"),t.expanded?o.em("expand-icon","expanded"):""];let u=Jn;t.loading&&(u=Oo),l.push(Ye("button",{type:"button","aria-label":n.t(t.expanded?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":t.expanded,class:r,onClick:s},{default:()=>[Ye(Be,{class:o.is("loading",t.loading)},{default:()=>[Ye(u)]})]}))}else l.push(Ye("span",{class:o.e("placeholder")}));return l}function jb(e,t){return e.reduce((n,a)=>(n[a]=a,n),t)}function yU(e,t){const n=vt();return{registerComplexWatchers:()=>{const l=["fixed"],s={realWidth:"width",realMinWidth:"minWidth"},r=jb(l,s);Object.keys(r).forEach(u=>{const c=s[u];$t(t,c)&&fe(()=>t[c],d=>{let f=d;c==="width"&&u==="realWidth"&&(f=lm(d)),c==="minWidth"&&u==="realMinWidth"&&(f=_k(d)),n.columnConfig.value[c]=f,n.columnConfig.value[u]=f;const p=c==="fixed";e.value.store.scheduleLayout(p)})})},registerNormalWatchers:()=>{const l=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip","tooltipFormatter","resizable"],s=["showOverflowTooltip"],r={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},u=jb(l,r);Object.keys(u).forEach(d=>{const f=r[d];$t(t,f)&&fe(()=>t[f],p=>{n.columnConfig.value[d]=p,(d==="filters"||d==="filterMethod")&&(n.columnConfig.value.filterable=!!(n.columnConfig.value.filters||n.columnConfig.value.filterMethod))})}),s.forEach(d=>{$t(e.value.props,d)&&fe(()=>e.value.props[d],f=>{n.columnConfig.value.type!=="selection"&&xt(t[d])&&(n.columnConfig.value[d]=f)})});const c=fl("table");c.value&&$t(c.value,"showOverflowTooltip")&&fe(()=>{var d;return(d=c.value)==null?void 0:d.showOverflowTooltip},d=>{n.columnConfig.value.type!=="selection"&&(!xt(t.showOverflowTooltip)||!xt(e.value.props.showOverflowTooltip)||(n.columnConfig.value.showOverflowTooltip=d))})}}}function bU(e,t,n){const a=vt(),o=A(""),l=A(!1),s=A(),r=A(),u=he("table");sa(()=>{s.value=e.align?`is-${e.align}`:null,s.value}),sa(()=>{r.value=e.headerAlign?`is-${e.headerAlign}`:s.value,r.value});const c=S(()=>{let C=a.vnode.vParent||a.parent;for(;C&&!C.tableId&&!C.columnId;)C=C.vnode.vParent||C.parent;return C}),d=S(()=>{const{store:C}=a.parent;if(!C)return!1;const{treeData:k}=C.states,E=k.value;return E&&Object.keys(E).length>0}),f=A(lm(e.width)),p=A(_k(e.minWidth)),g=C=>(f.value&&(C.width=f.value),p.value&&(C.minWidth=p.value),!f.value&&p.value&&(C.width=void 0),C.minWidth||(C.minWidth=80),C.realWidth=Number(xt(C.width)?C.minWidth:C.width),C),v=C=>{const k=C.type,E=hU[k]||{};Object.keys(E).forEach($=>{const N=E[$];$!=="className"&&!xt(N)&&(C[$]=N)});const T=vU(k);if(T){const $=`${i(u.namespace)}-${T}`;C.className=C.className?`${C.className} ${$}`:$}return C},h=C=>{be(C)?C.forEach(E=>k(E)):k(C);function k(E){var T;((T=E==null?void 0:E.type)==null?void 0:T.name)==="ElTableColumn"&&(E.vParent=a)}};return{columnId:o,realAlign:s,isSubColumn:l,realHeaderAlign:r,columnOrTableParent:c,setColumnWidth:g,setColumnForcedProps:v,setColumnRenders:C=>{e.renderHeader?ft("TableColumn","Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):C.type!=="selection"&&(C.renderHeader=E=>{if(a.columnConfig.value.label,t.header){const T=t.header(E);if(Lk(T))return Ye(He,T)}return St(C.label)}),t["filter-icon"]&&(C.renderFilterIcon=E=>ae(t,"filter-icon",E)),t.expand&&(C.renderExpand=E=>ae(t,"expand",E));let k=C.renderCell;return C.type==="expand"?(C.renderCell=E=>Ye("div",{class:"cell"},[k(E)]),n.value.renderExpanded=E=>t.default?t.default(E):t.default):(k=k||mU,C.renderCell=E=>{let T=null;if(t.default){const P=t.default(E);T=P.some(D=>D.type!==vn)?P:k(E)}else T=k(E);const{columns:$}=n.value.store.states,N=$.value.findIndex(P=>P.type==="default"),O=gU(E,d.value&&E.cellIndex===N),_={class:"cell",style:{}};return C.showOverflowTooltip&&(_.class=`${_.class} ${i(u.namespace)}-tooltip`,_.style={width:`${(E.column.realWidth||Number(E.column.width))-1}px`}),h(T),Ye("div",_,[O,T])}),C},getPropsData:(...C)=>C.reduce((k,E)=>(be(E)&&E.forEach(T=>{k[T]=e[T]}),k),{}),getColumnElIndex:(C,k)=>Array.prototype.indexOf.call(C,k),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",a.columnConfig.value)}}}var wU={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}};let CU=1;var SU=ie({name:"ElTableColumn",components:{ElCheckbox:Za},props:wU,setup(e,{slots:t}){const n=vt(),a=fl("table"),o=A({}),l=S(()=>{let C=n.parent;for(;C&&!C.tableId;)C=C.parent;return C}),{registerNormalWatchers:s,registerComplexWatchers:r}=yU(l,e),{columnId:u,isSubColumn:c,realHeaderAlign:d,columnOrTableParent:f,setColumnWidth:p,setColumnForcedProps:g,setColumnRenders:v,getPropsData:h,getColumnElIndex:m,realAlign:y,updateColumnOrder:b}=bU(e,t,l),w=f.value;u.value=`${"tableId"in w&&w.tableId||"columnId"in w&&w.columnId}_column_${CU++}`,fd(()=>{var O,_;c.value=l.value!==w;const C=e.type||"default",k=e.sortable===""?!0:e.sortable,E=C==="selection"?!1:xt(e.showOverflowTooltip)?w.props.showOverflowTooltip??((O=a.value)==null?void 0:O.showOverflowTooltip):e.showOverflowTooltip,T=xt(e.tooltipFormatter)?w.props.tooltipFormatter??((_=a.value)==null?void 0:_.tooltipFormatter):e.tooltipFormatter,$={...pU[C],id:u.value,type:C,property:e.prop||e.property,align:y,headerAlign:d,showOverflowTooltip:E,tooltipFormatter:T,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:k,index:e.index,rawColumnKey:n.vnode.key};let N=h(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);N=yj($,N),N=wj(v,p,g)(N),o.value=N,s(),r()}),mt(()=>{var T,$;const C=f.value,k=c.value?(T=C.vnode.el)==null?void 0:T.children:($=C.refs.hiddenColumns)==null?void 0:$.children,E=()=>m(k||[],n.vnode.el);o.value.getColumnIndex=E,E()>-1&&l.value.store.commit("insertColumn",o.value,c.value?"columnConfig"in C&&C.columnConfig.value:null,b)}),Pt(()=>{const C=o.value.getColumnIndex;(C?C():-1)>-1&&l.value.store.commit("removeColumn",o.value,c.value?"columnConfig"in w&&w.columnConfig.value:null,b)}),n.columnId=u.value,n.columnConfig=o},render(){var e,t,n;try{const a=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),o=[];if(be(a))for(const l of a)((n=l.type)==null?void 0:n.name)==="ElTableColumn"||l.shapeFlag&2?o.push(l):l.type===He&&be(l.children)&&l.children.forEach(s=>{(s==null?void 0:s.patchFlag)!==1024&&!De(s==null?void 0:s.children)&&o.push(s)});return Ye("div",o)}catch{return Ye("div",[])}}}),Hk=SU;const kU=rt(dU,{TableColumn:Hk}),EU=Qt(Hk);let yo=function(e){return e.ASC="asc",e.DESC="desc",e}({}),Jc=function(e){return e.LEFT="left",e.CENTER="center",e.RIGHT="right",e}({}),xU=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const ov={[yo.ASC]:yo.DESC,[yo.DESC]:yo.ASC},Ui=Symbol("placeholder"),Kk=String,ku={type:X(Array),required:!0},cm={type:X(Array)},Wk={...cm,required:!0},TU=String,Ub={type:X(Array),default:()=>nn([])},ns={type:Number,required:!0},jk={type:X([String,Number,Symbol]),default:"id"},Yb={type:X(Object)},is=Se({class:String,columns:ku,columnsStyles:{type:X(Object),required:!0},depth:Number,expandColumnKey:TU,estimatedRowHeight:{...vs.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:X(Function)},onRowHover:{type:X(Function)},onRowHeightChange:{type:X(Function)},rowData:{type:X(Object),required:!0},rowEventHandlers:{type:X(Object)},rowIndex:{type:Number,required:!0},rowKey:jk,style:{type:X(Object)}}),zf={type:Number,required:!0},dm=Se({class:String,columns:ku,fixedHeaderData:{type:X(Array)},headerData:{type:X(Array),required:!0},headerHeight:{type:X([Number,Array]),default:50},rowWidth:zf,rowHeight:{type:Number,default:50},height:zf,width:zf}),dc=Se({columns:ku,data:Wk,fixedData:cm,estimatedRowHeight:is.estimatedRowHeight,width:ns,height:ns,headerWidth:ns,headerHeight:dm.headerHeight,bodyWidth:ns,rowHeight:ns,cache:fk.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:vs.scrollbarAlwaysOn,scrollbarStartGap:vs.scrollbarStartGap,scrollbarEndGap:vs.scrollbarEndGap,class:Kk,style:Yb,containerStyle:Yb,getRowHeight:{type:X(Function),required:!0},rowKey:is.rowKey,onRowsRendered:{type:X(Function)},onScroll:{type:X(Function)}}),$U=Se({cache:dc.cache,estimatedRowHeight:is.estimatedRowHeight,rowKey:jk,headerClass:{type:X([String,Function])},headerProps:{type:X([Object,Function])},headerCellProps:{type:X([Object,Function])},headerHeight:dm.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:X([String,Function])},rowProps:{type:X([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:X([Object,Function])},columns:ku,data:Wk,dataGetter:{type:X(Function)},fixedData:cm,expandColumnKey:is.expandColumnKey,expandedRowKeys:Ub,defaultExpandedRowKeys:Ub,class:Kk,fixed:Boolean,style:{type:X(Object)},width:ns,height:ns,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:vs.hScrollbarSize,vScrollbarSize:vs.vScrollbarSize,scrollbarAlwaysOn:hk.alwaysOn,sortBy:{type:X(Object),default:()=>({})},sortState:{type:X(Object),default:void 0},onColumnSort:{type:X(Function)},onExpandedRowsChange:{type:X(Function)},onEndReached:{type:X(Function)},onRowExpand:is.onRowExpand,onScroll:dc.onScroll,onRowsRendered:dc.onRowsRendered,rowEventHandlers:is.rowEventHandlers}),OU=(e,t,n)=>{const a={flexGrow:0,flexShrink:0,...n?{}:{flexGrow:e.flexGrow??0,flexShrink:e.flexShrink??1}},o={...e.style??{},...a,flexBasis:"auto",width:e.width};return t||(e.maxWidth&&(o.maxWidth=e.maxWidth),e.minWidth&&(o.minWidth=e.minWidth)),o};function NU(e,t,n){const a=S(()=>i(t).map((m,y)=>({...m,key:m.key??m.dataKey??y}))),o=S(()=>i(a).filter(m=>!m.hidden)),l=S(()=>i(o).filter(m=>m.fixed==="left"||m.fixed===!0)),s=S(()=>i(o).filter(m=>m.fixed==="right")),r=S(()=>i(o).filter(m=>!m.fixed)),u=S(()=>{const m=[];return i(l).forEach(y=>{m.push({...y,placeholderSign:Ui})}),i(r).forEach(y=>{m.push(y)}),i(s).forEach(y=>{m.push({...y,placeholderSign:Ui})}),m}),c=S(()=>i(l).length||i(s).length),d=S(()=>i(a).reduce((m,y)=>(m[y.key]=OU(y,i(n),e.fixed),m),{})),f=S(()=>i(o).reduce((m,y)=>m+y.width,0)),p=m=>i(a).find(y=>y.key===m),g=m=>i(d)[m],v=(m,y)=>{m.width=y};function h(m){var k;const{key:y}=m.currentTarget.dataset;if(!y)return;const{sortState:b,sortBy:w}=e;let C=yo.ASC;ot(b)?C=ov[b[y]]:C=ov[w.order],(k=e.onColumnSort)==null||k.call(e,{column:p(y),key:y,order:C})}return{columns:a,columnsStyles:d,columnsTotalWidth:f,fixedColumnsOnLeft:l,fixedColumnsOnRight:s,hasFixedColumns:c,mainColumns:u,normalColumns:r,visibleColumns:o,getColumn:p,getColumnStyle:g,updateColumnWidth:v,onColumnSorted:h}}const MU=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,onMaybeEndReached:o})=>{const l=A({scrollLeft:0,scrollTop:0});function s(g){var h,m,y;const{scrollTop:v}=g;(h=t.value)==null||h.scrollTo(g),(m=n.value)==null||m.scrollToTop(v),(y=a.value)==null||y.scrollToTop(v)}function r(g){l.value=g,s(g)}function u(g){l.value.scrollTop=g,s(i(l))}function c(g){var v,h;l.value.scrollLeft=g,(h=(v=t.value)==null?void 0:v.scrollTo)==null||h.call(v,i(l))}function d(g){var v;r(g),(v=e.onScroll)==null||v.call(e,g)}function f({scrollTop:g}){const{scrollTop:v}=i(l);g!==v&&u(g)}function p(g,v="auto"){var h;(h=t.value)==null||h.scrollToRow(g,v)}return fe(()=>i(l).scrollTop,(g,v)=>{g>v&&o()}),{scrollPos:l,scrollTo:r,scrollToLeft:c,scrollToTop:u,scrollToRow:p,onScroll:d,onVerticalScroll:f}},RU=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,tableInstance:o,ns:l,isScrolling:s})=>{const r=vt(),{emit:u}=r,c=Wt(!1),d=A(e.defaultExpandedRowKeys||[]),f=A(-1),p=Wt(null),g=A({}),v=A({}),h=Wt({}),m=Wt({}),y=Wt({}),b=S(()=>Fe(e.estimatedRowHeight));function w(O){var _;(_=e.onRowsRendered)==null||_.call(e,O),O.rowCacheEnd>i(f)&&(f.value=O.rowCacheEnd)}function C({hovered:O,rowKey:_}){s.value||o.vnode.el.querySelectorAll(`[rowkey="${String(_)}"]`).forEach(P=>{O?P.classList.add(l.is("hovered")):P.classList.remove(l.is("hovered"))})}function k({expanded:O,rowData:_,rowIndex:P,rowKey:D}){var F,R;const W=[...i(d)],U=W.indexOf(D);O?U===-1&&W.push(D):U>-1&&W.splice(U,1),d.value=W,u("update:expandedRowKeys",W),(F=e.onRowExpand)==null||F.call(e,{expanded:O,rowData:_,rowIndex:P,rowKey:D}),(R=e.onExpandedRowsChange)==null||R.call(e,W),o.vnode.el.querySelector(`.${l.is("hovered")}[rowkey="${String(D)}"]`)&&Ae(()=>C({hovered:!0,rowKey:D}))}const E=To(()=>{var O,_,P,D;c.value=!0,g.value={...i(g),...i(v)},T(i(p),!1),v.value={},p.value=null,(O=t.value)==null||O.forceUpdate(),(_=n.value)==null||_.forceUpdate(),(P=a.value)==null||P.forceUpdate(),(D=r.proxy)==null||D.$forceUpdate(),c.value=!1},0);function T(O,_=!1){i(b)&&[t,n,a].forEach(P=>{const D=i(P);D&&D.resetAfterRowIndex(O,_)})}function $(O,_,P){const D=i(p);(D===null||D>P)&&(p.value=P),v.value[O]=_}function N({rowKey:O,height:_,rowIndex:P},D){D?D===xU.RIGHT?y.value[O]=_:h.value[O]=_:m.value[O]=_;const W=Math.max(...[h,y,m].map(U=>U.value[O]||0));i(g)[O]!==W&&($(O,W,P),E())}return{expandedRowKeys:d,lastRenderedRowIndex:f,isDynamic:b,isResetting:c,rowHeights:g,resetAfterIndex:T,onRowExpanded:k,onRowHovered:C,onRowsRendered:w,onRowHeightChange:N}},IU=(e,{expandedRowKeys:t,lastRenderedRowIndex:n,resetAfterIndex:a})=>{const o=A({}),l=S(()=>{const r={},{data:u,rowKey:c}=e,d=i(t);if(!d||!d.length)return u;const f=[],p=new Set;d.forEach(v=>p.add(v));let g=u.slice();for(g.forEach(v=>r[v[c]]=0);g.length>0;){const v=g.shift();f.push(v),p.has(v[c])&&be(v.children)&&v.children.length>0&&(g=[...v.children,...g],v.children.forEach(h=>r[h[c]]=r[v[c]]+1))}return o.value=r,f}),s=S(()=>{const{data:r,expandColumnKey:u}=e;return u?i(l):r});return fe(s,(r,u)=>{r!==u&&(n.value=-1,a(0,!0))}),{data:s,depthMap:o}},_U=(e,t)=>e+t,fc=e=>be(e)?e.reduce(_U,0):e,xs=(e,t,n={})=>ze(e)?e(t):e??n,Nl=e=>(["width","maxWidth","minWidth","height"].forEach(t=>{e[t]=an(e[t])}),e),Uk=e=>Ht(e)?t=>Ye(e,t):e,PU=(e,{columnsTotalWidth:t,rowsHeight:n,fixedColumnsOnLeft:a,fixedColumnsOnRight:o})=>{const l=S(()=>{const{fixed:h,width:m,vScrollbarSize:y}=e,b=m-y;return h?Math.max(Math.round(i(t)),b):b}),s=S(()=>{const{height:h=0,maxHeight:m=0,footerHeight:y,hScrollbarSize:b}=e;if(m>0){const w=i(p),C=i(n),k=i(f)+w+C+b;return Math.min(k,m-y)}return h-y}),r=S(()=>{const{maxHeight:h}=e,m=i(s);if(Fe(h)&&h>0)return m;const y=i(n)+i(f)+i(p);return Math.min(m,y)}),u=h=>h.width,c=S(()=>fc(i(a).map(u))),d=S(()=>fc(i(o).map(u))),f=S(()=>fc(e.headerHeight)),p=S(()=>{var h;return(((h=e.fixedData)==null?void 0:h.length)||0)*e.rowHeight}),g=S(()=>i(s)-i(f)-i(p)),v=S(()=>{const{style:h={},height:m,width:y}=e;return Nl({...h,height:m,width:y})});return{bodyWidth:l,fixedTableHeight:r,mainTableHeight:s,leftTableWidth:c,rightTableWidth:d,windowHeight:g,footerHeight:S(()=>Nl({height:e.footerHeight})),emptyStyle:S(()=>({top:an(i(f)),bottom:an(e.footerHeight),width:an(e.width)})),rootStyle:v,headerHeight:f}};function AU(e){const t=A(),n=A(),a=A(),{columns:o,columnsStyles:l,columnsTotalWidth:s,fixedColumnsOnLeft:r,fixedColumnsOnRight:u,hasFixedColumns:c,mainColumns:d,onColumnSorted:f}=NU(e,Lt(e,"columns"),Lt(e,"fixed")),{scrollTo:p,scrollToLeft:g,scrollToTop:v,scrollToRow:h,onScroll:m,onVerticalScroll:y,scrollPos:b}=MU(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,onMaybeEndReached:Z}),w=he("table-v2"),C=vt(),k=Wt(!1),{expandedRowKeys:E,lastRenderedRowIndex:T,isDynamic:$,isResetting:N,rowHeights:O,resetAfterIndex:_,onRowExpanded:P,onRowHeightChange:D,onRowHovered:W,onRowsRendered:U}=RU(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,tableInstance:C,ns:w,isScrolling:k}),{data:F,depthMap:R}=IU(e,{expandedRowKeys:E,lastRenderedRowIndex:T,resetAfterIndex:_}),I=S(()=>{const{estimatedRowHeight:oe,rowHeight:ce}=e,ge=i(F);return Fe(oe)?Object.values(i(O)).reduce((me,Me)=>me+Me,0):ge.length*ce}),{bodyWidth:L,fixedTableHeight:z,mainTableHeight:H,leftTableWidth:K,rightTableWidth:q,windowHeight:Q,footerHeight:ee,emptyStyle:ue,rootStyle:te,headerHeight:de}=PU(e,{columnsTotalWidth:s,fixedColumnsOnLeft:r,fixedColumnsOnRight:u,rowsHeight:I}),se=A(),Y=S(()=>{const oe=i(F).length===0;return be(e.fixedData)?e.fixedData.length===0&&oe:oe});function G(oe){const{estimatedRowHeight:ce,rowHeight:ge,rowKey:me}=e;return ce?i(O)[i(F)[oe][me]]||ce:ge}const V=A(!1);function Z(){const{onEndReached:oe}=e;if(!oe)return;const{scrollTop:ce}=i(b),ge=i(I),me=ge-(ce+i(Q))+e.hScrollbarSize;!V.value&&i(T)>=0&&ge<=ce+i(H)-i(de)?(V.value=!0,oe(me)):V.value=!1}return fe(()=>i(I),()=>V.value=!1),fe(()=>e.expandedRowKeys,oe=>E.value=oe,{deep:!0}),{columns:o,containerRef:se,mainTableRef:t,leftTableRef:n,rightTableRef:a,isDynamic:$,isResetting:N,isScrolling:k,hasFixedColumns:c,columnsStyles:l,columnsTotalWidth:s,data:F,expandedRowKeys:E,depthMap:R,fixedColumnsOnLeft:r,fixedColumnsOnRight:u,mainColumns:d,bodyWidth:L,emptyStyle:ue,rootStyle:te,footerHeight:ee,mainTableHeight:H,fixedTableHeight:z,leftTableWidth:K,rightTableWidth:q,showEmpty:Y,getRowHeight:G,onColumnSorted:f,onRowHovered:W,onRowExpanded:P,onRowsRendered:U,onRowHeightChange:D,scrollTo:p,scrollToLeft:g,scrollToTop:v,scrollToRow:h,onScroll:m,onVerticalScroll:y}}const fm=Symbol("tableV2"),Yk="tableV2GridScrollLeft",LU=ie({name:"ElTableV2Header",props:dm,setup(e,{slots:t,expose:n}){const a=he("table-v2"),o=_e(Yk),l=A(),s=S(()=>Nl({width:e.width,height:e.height})),r=S(()=>Nl({width:e.rowWidth,height:e.height})),u=S(()=>Tn(i(e.headerHeight))),c=p=>{const g=i(l);Ae(()=>{g!=null&&g.scroll&&g.scroll({left:p})})},d=()=>{const p=a.e("fixed-header-row"),{columns:g,fixedHeaderData:v,rowHeight:h}=e;return v==null?void 0:v.map((m,y)=>{var w;const b=Nl({height:h,width:"100%"});return(w=t.fixed)==null?void 0:w.call(t,{class:p,columns:g,rowData:m,rowIndex:-(y+1),style:b})})},f=()=>{const p=a.e("dynamic-header-row"),{columns:g}=e;return i(u).map((v,h)=>{var y;const m=Nl({width:"100%",height:v});return(y=t.dynamic)==null?void 0:y.call(t,{class:p,columns:g,headerIndex:h,style:m})})};return Qa(()=>{o!=null&&o.value&&c(o.value)}),n({scrollToLeft:c}),()=>{if(!(e.height<=0))return J("div",{ref:l,class:e.class,style:i(s),role:"rowgroup"},[J("div",{style:i(r),class:a.e("header")},[f(),d()])])}}}),DU="ElTableV2Grid",VU=e=>{const t=A(),n=A(),a=A(0),o=S(()=>{const{data:m,rowHeight:y,estimatedRowHeight:b}=e;if(!b)return m.length*y}),l=S(()=>{const{fixedData:m,rowHeight:y}=e;return((m==null?void 0:m.length)||0)*y}),s=S(()=>fc(e.headerHeight)),r=S(()=>{const{height:m}=e;return Math.max(0,m-i(s)-i(l))}),u=S(()=>i(s)+i(l)>0),c=({data:m,rowIndex:y})=>m[y][e.rowKey];function d({rowCacheStart:m,rowCacheEnd:y,rowVisibleStart:b,rowVisibleEnd:w}){var C;(C=e.onRowsRendered)==null||C.call(e,{rowCacheStart:m,rowCacheEnd:y,rowVisibleStart:b,rowVisibleEnd:w})}function f(m,y){var b;(b=n.value)==null||b.resetAfterRowIndex(m,y)}function p(m,y){const b=i(t),w=i(n);ot(m)?(b==null||b.scrollToLeft(m.scrollLeft),a.value=m.scrollLeft,w==null||w.scrollTo(m)):(b==null||b.scrollToLeft(m),a.value=m,w==null||w.scrollTo({scrollLeft:m,scrollTop:y}))}function g(m){var y;(y=i(n))==null||y.scrollTo({scrollTop:m})}function v(m,y){const b=i(n);if(!b)return;const w=a.value;b.scrollToItem(m,0,y),w&&p({scrollLeft:w})}function h(){var m,y;(m=i(n))==null||m.$forceUpdate(),(y=i(t))==null||y.$forceUpdate()}return fe(()=>e.bodyWidth,()=>{var m;Fe(e.estimatedRowHeight)&&((m=n.value)==null||m.resetAfter({columnIndex:0},!1))}),{bodyRef:n,forceUpdate:h,fixedRowHeight:l,gridHeight:r,hasHeader:u,headerHeight:s,headerRef:t,totalHeight:o,itemKey:c,onItemRendered:d,resetAfterRowIndex:f,scrollTo:p,scrollToTop:g,scrollToRow:v,scrollLeft:a}},pm=ie({name:DU,props:dc,setup(e,{slots:t,expose:n}){const{ns:a}=_e(fm),{bodyRef:o,fixedRowHeight:l,gridHeight:s,hasHeader:r,headerRef:u,headerHeight:c,totalHeight:d,forceUpdate:f,itemKey:p,onItemRendered:g,resetAfterRowIndex:v,scrollTo:h,scrollToTop:m,scrollToRow:y,scrollLeft:b}=VU(e);bt(Yk,b),Ji(async()=>{var k;await Ae();const C=(k=o.value)==null?void 0:k.states.scrollTop;C&&m(Math.round(C)+1)}),n({forceUpdate:f,totalHeight:d,scrollTo:h,scrollToTop:m,scrollToRow:y,resetAfterRowIndex:v});const w=()=>e.bodyWidth;return()=>{const{cache:C,columns:k,data:E,fixedData:T,useIsScrolling:$,scrollbarAlwaysOn:N,scrollbarEndGap:O,scrollbarStartGap:_,style:P,rowHeight:D,bodyWidth:W,estimatedRowHeight:U,headerWidth:F,height:R,width:I,getRowHeight:L,onScroll:z}=e,H=Fe(U),K=H?zW:DW,q=i(c);return J("div",{role:"table",class:[a.e("table"),e.class],style:P},[J(K,{ref:o,data:E,useIsScrolling:$,itemKey:p,columnCache:0,columnWidth:H?w:W,totalColumn:1,totalRow:E.length,rowCache:C,rowHeight:H?L:D,width:I,height:i(s),class:a.e("body"),role:"rowgroup",scrollbarStartGap:_,scrollbarEndGap:O,scrollbarAlwaysOn:N,onScroll:z,onItemRendered:g,perfMode:!1},{default:Q=>{var ue;const ee=E[Q.rowIndex];return(ue=t.row)==null?void 0:ue.call(t,{...Q,columns:k,rowData:ee})}}),i(r)&&J(LU,{ref:u,class:a.e("header-wrapper"),columns:k,headerData:E,headerHeight:e.headerHeight,fixedHeaderData:T,rowWidth:F,rowHeight:D,width:I,height:Math.min(q+i(l),R)},{dynamic:t.header,fixed:t.row})])}}});function BU(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ht(e)}const FU=(e,{slots:t})=>{const{mainTableRef:n,...a}=e;return J(pm,pt({ref:n},a),BU(t)?t:{default:()=>[t]})};function zU(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ht(e)}const HU=(e,{slots:t})=>{if(!e.columns.length)return;const{leftTableRef:n,...a}=e;return J(pm,pt({ref:n},a),zU(t)?t:{default:()=>[t]})};function KU(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ht(e)}const WU=(e,{slots:t})=>{if(!e.columns.length)return;const{rightTableRef:n,...a}=e;return J(pm,pt({ref:n},a),KU(t)?t:{default:()=>[t]})},jU=e=>{const{isScrolling:t}=_e(fm),n=A(!1),a=A(),o=S(()=>Fe(e.estimatedRowHeight)&&e.rowIndex>=0),l=(u=!1)=>{const c=i(a);if(!c)return;const{columns:d,onRowHeightChange:f,rowKey:p,rowIndex:g,style:v}=e,{height:h}=c.getBoundingClientRect();n.value=!0,Ae(()=>{if(u||h!==Number.parseInt(v.height)){const m=d[0],y=(m==null?void 0:m.placeholderSign)===Ui;f==null||f({rowKey:p,height:h,rowIndex:g},m&&!y&&m.fixed)}})},s=S(()=>{const{rowData:u,rowIndex:c,rowKey:d,onRowHover:f}=e,p=e.rowEventHandlers||{},g={};return Object.entries(p).forEach(([v,h])=>{ze(h)&&(g[v]=m=>{h({event:m,rowData:u,rowIndex:c,rowKey:d})})}),f&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:v,hovered:h})=>{const m=g[v];g[v]=y=>{f({event:y,hovered:h,rowData:u,rowIndex:c,rowKey:d}),m==null||m(y)}}),g}),r=u=>{const{onRowExpand:c,rowData:d,rowIndex:f,rowKey:p}=e;c==null||c({expanded:u,rowData:d,rowIndex:f,rowKey:p})};return mt(()=>{i(o)&&l(!0)}),{isScrolling:t,measurable:o,measured:n,rowRef:a,eventHandlers:s,onExpand:r}},UU=ie({name:"ElTableV2TableRow",props:is,setup(e,{expose:t,slots:n,attrs:a}){const{eventHandlers:o,isScrolling:l,measurable:s,measured:r,rowRef:u,onExpand:c}=jU(e);return t({onExpand:c}),()=>{const{columns:d,columnsStyles:f,expandColumnKey:p,depth:g,rowData:v,rowIndex:h,style:m}=e;let y=d.map((b,w)=>{const C=be(v.children)&&v.children.length>0&&b.key===p;return n.cell({column:b,columns:d,columnIndex:w,depth:g,style:f[b.key],rowData:v,rowIndex:h,isScrolling:i(l),expandIconProps:C?{rowData:v,rowIndex:h,onExpand:c}:void 0})});if(n.row&&(y=n.row({cells:y.map(b=>be(b)&&b.length===1?b[0]:b),style:m,columns:d,depth:g,rowData:v,rowIndex:h,isScrolling:i(l)})),i(s)){const{height:b,...w}=m||{},C=i(r);return J("div",pt({ref:u,class:e.class,style:C?m:w,role:"row"},a,i(o)),[y])}return J("div",pt(a,{ref:u,class:e.class,style:m,role:"row"},i(o)),[y])}}});function YU(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ht(e)}const qU=(e,{slots:t})=>{const{columns:n,columnsStyles:a,depthMap:o,expandColumnKey:l,expandedRowKeys:s,estimatedRowHeight:r,hasFixedColumns:u,rowData:c,rowIndex:d,style:f,isScrolling:p,rowProps:g,rowClass:v,rowKey:h,rowEventHandlers:m,ns:y,onRowHovered:b,onRowExpanded:w}=e,C=xs(v,{columns:n,rowData:c,rowIndex:d},""),k=xs(g,{columns:n,rowData:c,rowIndex:d}),E=c[h],T=o[E]||0,$=!!l,N=d<0,O=[y.e("row"),C,y.is("expanded",$&&s.includes(E)),y.is("fixed",!T&&N),y.is("customized",!!t.row),{[y.e(`row-depth-${T}`)]:$&&d>=0}],_=u?b:void 0,P={...k,columns:n,columnsStyles:a,class:O,depth:T,expandColumnKey:l,estimatedRowHeight:N?void 0:r,isScrolling:p,rowIndex:d,rowData:c,rowKey:E,rowEventHandlers:m,style:f};return J(UU,pt(P,{onRowExpand:w,onMouseenter:U=>{_==null||_({hovered:!0,rowKey:E,event:U,rowData:c,rowIndex:d})},onMouseleave:U=>{_==null||_({hovered:!1,rowKey:E,event:U,rowData:c,rowIndex:d})},rowkey:E}),YU(t)?t:{default:()=>[t]})},vm=(e,{slots:t})=>{var s;const{cellData:n,style:a}=e,o=((s=n==null?void 0:n.toString)==null?void 0:s.call(n))||"",l=ae(t,"default",e,()=>[o]);return J("div",{class:e.class,title:o,style:a},[l])};vm.displayName="ElTableV2Cell";vm.inheritAttrs=!1;const qk=e=>{const{expanded:t,expandable:n,onExpand:a,style:o,size:l,ariaLabel:s}=e;return J("button",pt({onClick:n?()=>a(!t):void 0,ariaLabel:s,ariaExpanded:t,class:e.class},{type:"button"}),[J(Be,{size:l,style:o},{default:()=>[J(Jn,null,null)]})])};qk.inheritAttrs=!1;const lv=({columns:e,column:t,columnIndex:n,depth:a,expandIconProps:o,isScrolling:l,rowData:s,rowIndex:r,style:u,expandedRowKeys:c,ns:d,t:f,cellProps:p,expandColumnKey:g,indentSize:v,iconSize:h,rowKey:m},{slots:y})=>{const b=Nl(u);if(t.placeholderSign===Ui)return J("div",{class:d.em("row-cell","placeholder"),style:b},null);const{cellRenderer:w,dataKey:C,dataGetter:k}=t,E=ze(k)?k({columns:e,column:t,columnIndex:n,rowData:s,rowIndex:r}):mn(s,C??""),T=xs(p,{cellData:E,columns:e,column:t,columnIndex:n,rowIndex:r,rowData:s}),$={class:d.e("cell-text"),columns:e,column:t,columnIndex:n,cellData:E,isScrolling:l,rowData:s,rowIndex:r},N=Uk(w),O=N?N($):ae(y,"default",$,()=>[J(vm,$,null)]),_=[d.e("row-cell"),t.class,t.align===Jc.CENTER&&d.is("align-center"),t.align===Jc.RIGHT&&d.is("align-right")],P=r>=0&&g&&t.key===g,D=r>=0&&c.includes(s[m]);let W;const U=`margin-inline-start: ${a*v}px;`;return P&&(ot(o)?W=J(qk,pt(o,{class:[d.e("expand-icon"),d.is("expanded",D)],size:h,expanded:D,ariaLabel:f(D?"el.table.collapseRowLabel":"el.table.expandRowLabel"),style:U,expandable:!0}),null):W=J("div",{style:[U,`width: ${h}px; height: ${h}px;`].join(" ")},null)),J("div",pt({class:_,style:b},T,{role:"cell"}),[W,O])};lv.inheritAttrs=!1;const GU=Se({class:String,columns:ku,columnsStyles:{type:X(Object),required:!0},headerIndex:Number,style:{type:X(Object)}}),XU=ie({name:"ElTableV2HeaderRow",props:GU,setup(e,{slots:t}){return()=>{const{columns:n,columnsStyles:a,headerIndex:o,style:l}=e;let s=n.map((r,u)=>t.cell({columns:n,column:r,columnIndex:u,headerIndex:o,style:a[r.key]}));return t.header&&(s=t.header({cells:s.map(r=>be(r)&&r.length===1?r[0]:r),columns:n,headerIndex:o})),J("div",{class:e.class,style:l,role:"row"},[s])}}});function ZU(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ht(e)}const JU=({columns:e,columnsStyles:t,headerIndex:n,style:a,headerClass:o,headerProps:l,ns:s},{slots:r})=>{const u={columns:e,headerIndex:n},c=[s.e("header-row"),xs(o,u,""),s.is("customized",!!r.header)];return J(XU,{...xs(l,u),columnsStyles:t,class:c,columns:e,headerIndex:n,style:a},ZU(r)?r:{default:()=>[r]})},hm=(e,{slots:t})=>ae(t,"default",e,()=>{var n,a;return[J("div",{class:e.class,title:(n=e.column)==null?void 0:n.title},[(a=e.column)==null?void 0:a.title])]});hm.displayName="ElTableV2HeaderCell";hm.inheritAttrs=!1;const QU=e=>{const{sortOrder:t}=e;return J("button",{type:"button","aria-label":e.ariaLabel,class:e.class},[J(Be,{size:14},{default:()=>[t===yo.ASC?J(oA,null,null):J(nA,null,null)]})])},qb=(e,{slots:t})=>{const{column:n,ns:a,t:o,style:l,onColumnSorted:s}=e,r=Nl(l);if(n.placeholderSign===Ui)return J("div",{class:a.em("header-row-cell","placeholder"),style:r},null);const{headerCellRenderer:u,headerClass:c,sortable:d}=n,f={...e,class:a.e("header-cell-text")},p=Uk(u),g=p?p(f):ae(t,"default",f,()=>[J(hm,f,null)]),{sortBy:v,sortState:h,headerCellProps:m}=e;let y,b,w;if(h){const k=h[n.key];y=!!ov[k],b=y?k:yo.ASC}else y=n.key===v.key,b=y?v.order:yo.ASC;b===yo.ASC?w="ascending":b===yo.DESC?w="descending":w=void 0;const C=[a.e("header-cell"),xs(c,e,""),n.align===Jc.CENTER&&a.is("align-center"),n.align===Jc.RIGHT&&a.is("align-right"),d&&a.is("sortable")];return J("div",pt({...xs(m,e),onClick:n.sortable?s:void 0,ariaSort:d?w:void 0,class:C,style:r,"data-key":n.key},{role:"columnheader"}),[g,d&&J(QU,{class:[a.e("sort-icon"),y&&a.is("sorting")],sortOrder:b,ariaLabel:o("el.table.sortLabel",{column:n.title||""})},null)])},Gk=(e,{slots:t})=>{var n;return J("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};Gk.displayName="ElTableV2Footer";const Xk=(e,{slots:t})=>{const n=ae(t,"default",{},()=>[J(Q2,null,null)]);return J("div",{class:e.class,style:e.style},[n])};Xk.displayName="ElTableV2Empty";const Zk=(e,{slots:t})=>{var n;return J("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};Zk.displayName="ElTableV2Overlay";function Gr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Ht(e)}const eY=ie({name:"ElTableV2",props:$U,slots:Object,setup(e,{slots:t,expose:n}){const a=he("table-v2"),{t:o}=Et(),{columnsStyles:l,fixedColumnsOnLeft:s,fixedColumnsOnRight:r,mainColumns:u,mainTableHeight:c,fixedTableHeight:d,leftTableWidth:f,rightTableWidth:p,data:g,depthMap:v,expandedRowKeys:h,hasFixedColumns:m,mainTableRef:y,leftTableRef:b,rightTableRef:w,isDynamic:C,isResetting:k,isScrolling:E,bodyWidth:T,emptyStyle:$,rootStyle:N,footerHeight:O,showEmpty:_,scrollTo:P,scrollToLeft:D,scrollToTop:W,scrollToRow:U,getRowHeight:F,onColumnSorted:R,onRowHeightChange:I,onRowHovered:L,onRowExpanded:z,onRowsRendered:H,onScroll:K,onVerticalScroll:q}=AU(e);return n({scrollTo:P,scrollToLeft:D,scrollToTop:W,scrollToRow:U}),bt(fm,{ns:a,isResetting:k,isScrolling:E}),()=>{const{cache:Q,cellProps:ee,estimatedRowHeight:ue,expandColumnKey:te,fixedData:de,headerHeight:se,headerClass:Y,headerProps:G,headerCellProps:V,sortBy:Z,sortState:oe,rowHeight:ce,rowClass:ge,rowEventHandlers:me,rowKey:Me,rowProps:Ie,scrollbarAlwaysOn:Re,indentSize:ye,iconSize:Te,useIsScrolling:we,vScrollbarSize:Pe,width:Ve}=e,Qe=i(g),tt={cache:Q,class:a.e("main"),columns:i(u),data:Qe,fixedData:de,estimatedRowHeight:ue,bodyWidth:i(T),headerHeight:se,headerWidth:i(T),height:i(c),mainTableRef:y,rowKey:Me,rowHeight:ce,scrollbarAlwaysOn:Re,scrollbarStartGap:2,scrollbarEndGap:Pe,useIsScrolling:we,width:Ve,getRowHeight:F,onRowsRendered:H,onScroll:K},nt=i(f),Oe=i(d),qe={cache:Q,class:a.e("left"),columns:i(s),data:Qe,fixedData:de,estimatedRowHeight:ue,leftTableRef:b,rowHeight:ce,bodyWidth:nt,headerWidth:nt,headerHeight:se,height:Oe,rowKey:Me,scrollbarAlwaysOn:Re,scrollbarStartGap:2,scrollbarEndGap:Pe,useIsScrolling:we,width:nt,getRowHeight:F,onScroll:q},it=i(p),We={cache:Q,class:a.e("right"),columns:i(r),data:Qe,fixedData:de,estimatedRowHeight:ue,rightTableRef:w,rowHeight:ce,bodyWidth:it,headerWidth:it,headerHeight:se,height:Oe,rowKey:Me,scrollbarAlwaysOn:Re,scrollbarStartGap:2,scrollbarEndGap:Pe,width:it,style:`${a.cssVarName("table-scrollbar-size")}: ${Pe}px`,useIsScrolling:we,getRowHeight:F,onScroll:q},et=i(l),gt={ns:a,depthMap:i(v),columnsStyles:et,expandColumnKey:te,expandedRowKeys:i(h),estimatedRowHeight:ue,hasFixedColumns:i(m),rowProps:Ie,rowClass:ge,rowKey:Me,rowEventHandlers:me,onRowHovered:L,onRowExpanded:z,onRowHeightChange:I},ve={cellProps:ee,expandColumnKey:te,indentSize:ye,iconSize:Te,rowKey:Me,expandedRowKeys:i(h),ns:a,t:o},Le={ns:a,headerClass:Y,headerProps:G,columnsStyles:et},pe={ns:a,t:o,sortBy:Z,sortState:oe,headerCellProps:V,onColumnSorted:R},$e={row:Yt=>J(qU,pt(Yt,gt),{row:t.row,cell:Ne=>{let Ke;return t.cell?J(lv,pt(Ne,ve,{style:et[Ne.column.key]}),Gr(Ke=t.cell(Ne))?Ke:{default:()=>[Ke]}):J(lv,pt(Ne,ve,{style:et[Ne.column.key]}),null)}}),header:Yt=>J(JU,pt(Yt,Le),{header:t.header,cell:Ne=>{let Ke;return t["header-cell"]?J(qb,pt(Ne,pe,{style:et[Ne.column.key]}),Gr(Ke=t["header-cell"](Ne))?Ke:{default:()=>[Ke]}):J(qb,pt(Ne,pe,{style:et[Ne.column.key]}),null)}})},ut=[e.class,a.b(),a.e("root"),a.is("dynamic",i(C))],It={class:a.e("footer"),style:i(O)};return J("div",{class:ut,style:i(N)},[J(FU,tt,Gr($e)?$e:{default:()=>[$e]}),J(HU,qe,Gr($e)?$e:{default:()=>[$e]}),J(WU,We,Gr($e)?$e:{default:()=>[$e]}),t.footer&&J(Gk,It,{default:t.footer}),i(_)&&J(Xk,{class:a.e("empty"),style:i($)},{default:t.empty}),t.overlay&&J(Zk,{class:a.e("overlay")},{default:t.overlay})])}}}),tY=Se({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:X(Function)}}),nY=e=>{const t=A(),n=A(0),a=A(0);let o;return mt(()=>{o=Xt(t,([l])=>{const{width:s,height:r}=l.contentRect,{paddingLeft:u,paddingRight:c,paddingTop:d,paddingBottom:f}=getComputedStyle(l.target),p=Number.parseInt(u)||0,g=Number.parseInt(c)||0,v=Number.parseInt(d)||0,h=Number.parseInt(f)||0;n.value=s-p-g,a.value=r-v-h}).stop}),Pt(()=>{o==null||o()}),fe([n,a],([l,s])=>{var r;(r=e.onResize)==null||r.call(e,{width:l,height:s})}),{sizer:t,width:n,height:a}},aY=ie({name:"ElAutoResizer",props:tY,setup(e,{slots:t}){const n=he("auto-resizer"),{height:a,width:o,sizer:l}=nY(e),s={width:"100%",height:"100%"};return()=>{var r;return J("div",{ref:l,class:n.b(),style:s},[(r=t.default)==null?void 0:r.call(t,{height:a.value,width:o.value})])}}}),oY=rt(eY),lY=rt(aY),jd=Symbol("tabsRootContextKey"),sY=Se({tabs:{type:X(Array),default:()=>nn([])},tabRefs:{type:X(Object),default:()=>nn({})}}),Gb="ElTabBar";var rY=ie({name:Gb,__name:"tab-bar",props:sY,setup(e,{expose:t}){const n=e,a=_e(jd);a||Jt(Gb,"");const o=he("tabs"),l=A(),s=A(),r=S(()=>{var g;return xt(a.props.defaultValue)||!!((g=s.value)!=null&&g.transform)}),u=()=>{let g=0,v=0;const h=["top","bottom"].includes(a.props.tabPosition)?"width":"height",m=h==="width"?"x":"y",y=m==="x"?"left":"top";return n.tabs.every(b=>{if(xt(b.paneName))return!1;const w=n.tabRefs[b.paneName];if(!w)return!1;if(!b.active)return!0;g=w[`offset${bf(y)}`],v=w[`client${bf(h)}`];const C=window.getComputedStyle(w);return h==="width"&&(v-=Number.parseFloat(C.paddingLeft)+Number.parseFloat(C.paddingRight),g+=Number.parseFloat(C.paddingLeft)),!1}),{[h]:`${v}px`,transform:`translate${bf(m)}(${g}px)`}},c=()=>s.value=u(),d=[],f=()=>{d.forEach(g=>g.stop()),d.length=0,Object.values(n.tabRefs).forEach(g=>{d.push(Xt(g,c))})};fe(()=>n.tabs,async()=>{await Ae(),c(),f()},{immediate:!0});const p=Xt(l,()=>c());return Pt(()=>{d.forEach(g=>g.stop()),d.length=0,p.stop()}),t({ref:l,update:c}),(g,v)=>r.value?(x(),B("div",{key:0,ref_key:"barRef",ref:l,class:M([i(o).e("active-bar"),i(o).is(i(a).props.tabPosition)]),style:je(s.value)},null,6)):le("v-if",!0)}}),iY=rY;const uY=Se({panes:{type:X(Array),default:()=>nn([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean,tabindex:{type:[String,Number],default:void 0}}),cY={tabClick:(e,t,n)=>n instanceof Event,tabRemove:(e,t)=>t instanceof Event},Xb="ElTabNav",dY=ie({name:Xb,props:uY,emits:cY,setup(e,{expose:t,emit:n}){const a=_e(jd);a||Jt(Xb,"");const o=he("tabs"),l=L$(),s=V$(),r=A(),u=A(),c=A(),d=A({}),f=A(),p=A(!1),g=A(0),v=A(!1),h=A(!0),m=A(!1),y=Wt(),b=S(()=>["top","bottom"].includes(a.props.tabPosition)),w=S(()=>b.value?"width":"height"),C=S(()=>{const K=w.value==="width"?"X":"Y";return{transition:m.value?"none":void 0,transform:`translate${K}(-${g.value}px)`}}),{width:k,height:E}=ip(r),{width:T,height:$}=ip(u,{width:0,height:0},{box:"border-box"}),N=S(()=>b.value?k.value:E.value),O=S(()=>b.value?T.value:$.value),{onWheel:_}=gk({atStartEdge:S(()=>g.value<=0),atEndEdge:S(()=>O.value-g.value<=N.value),layout:S(()=>b.value?"horizontal":"vertical")},K=>{g.value=as(g.value+K,0,O.value-N.value)}),P=K=>{m.value=!0,_(K),_a(()=>{m.value=!1})},D=()=>{if(!r.value)return;const K=r.value.getBoundingClientRect()[w.value],q=g.value;q&&(g.value=q>K?q-K:0)},W=()=>{if(!r.value||!u.value)return;const K=u.value.getBoundingClientRect()[w.value],q=r.value.getBoundingClientRect()[w.value],Q=g.value;Rl(K-Q,q)&&(g.value=K-Q>q*2?Q+q:K-q)},U=async()=>{const K=u.value;if(!p.value||!c.value||!r.value||!K)return;await Ae();const q=d.value[e.currentName];if(!q)return;const Q=r.value,ee=q.getBoundingClientRect(),ue=Q.getBoundingClientRect(),te=ue.left+1,de=ue.right-1,se=K.getBoundingClientRect(),Y=b.value?se.width-ue.width:se.height-ue.height,G=g.value;let V=G;b.value?(ee.leftde&&(V=G+ee.right-de)):(ee.topue.bottom&&(V=G+(ee.bottom-ue.bottom))),V=Math.max(V,0),g.value=Math.min(V,Y)},F=()=>{var ee;if(!u.value||!r.value)return;e.stretch&&((ee=f.value)==null||ee.update());const K=u.value.getBoundingClientRect()[w.value],q=r.value.getBoundingClientRect()[w.value],Q=g.value;q0&&(g.value=0))},R=K=>{const q=zt(K);let Q=0;switch(q){case Ce.left:case Ce.up:Q=-1;break;case Ce.right:case Ce.down:Q=1;break;default:return}const ee=Array.from(K.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let ue=ee.indexOf(K.target)+Q;ue<0?ue=ee.length-1:ue>=ee.length&&(ue=0),ee[ue].focus({preventScroll:!0}),ee[ue].click(),I()},I=()=>{h.value&&(v.value=!0)},L=()=>v.value=!1,z=(K,q)=>{d.value[q]=K},H=async()=>{var K;await Ae(),(K=d.value[e.currentName])==null||K.focus({preventScroll:!0})};return fe(l,K=>{K==="hidden"?h.value=!1:K==="visible"&&setTimeout(()=>h.value=!0,50)}),fe(s,K=>{K?setTimeout(()=>h.value=!0,50):h.value=!1}),Xt(c,()=>{_a(F)}),mt(()=>setTimeout(()=>U(),0)),Qa(()=>F()),t({scrollToActiveTab:U,removeFocus:L,focusActiveTab:H,tabListRef:u,tabBarRef:f,scheduleRender:()=>Ju(y)}),()=>{const K=p.value?[J("span",{class:[o.e("nav-prev"),o.is("disabled",!p.value.prev)],onClick:D},[J(Be,null,{default:()=>[J(al,null,null)]})]),J("span",{class:[o.e("nav-next"),o.is("disabled",!p.value.next)],onClick:W},[J(Be,null,{default:()=>[J(Jn,null,null)]})])]:null,q=e.panes.map((Q,ee)=>{var Z,oe;const ue=Q.uid,te=Q.props.disabled,de=Q.props.name??Q.index??`${ee}`,se=!te&&(Q.isClosable||Q.props.closable!==!1&&e.editable);Q.index=`${ee}`;const Y=se?J(Be,{class:"is-icon-close",onClick:ce=>n("tabRemove",Q,ce)},{default:()=>[J(La,null,null)]}):null,G=((oe=(Z=Q.slots).label)==null?void 0:oe.call(Z))||Q.props.label,V=!te&&Q.active?e.tabindex??a.props.tabindex:-1;return J("div",{ref:ce=>z(ce,de),class:[o.e("item"),o.is(a.props.tabPosition),o.is("active",Q.active),o.is("disabled",te),o.is("closable",se),o.is("focus",v.value)],id:`tab-${de}`,key:`tab-${ue}`,"aria-controls":`pane-${de}`,role:"tab","aria-selected":Q.active,tabindex:V,onFocus:()=>I(),onBlur:()=>L(),onClick:ce=>{L(),n("tabClick",Q,de,ce)},onKeydown:ce=>{const ge=zt(ce);se&&(ge===Ce.delete||ge===Ce.backspace)&&n("tabRemove",Q,ce)}},[G,Y])});return y.value,J("div",{ref:c,class:[o.e("nav-wrap"),o.is("scrollable",!!p.value),o.is(a.props.tabPosition)]},[K,J("div",{class:o.e("nav-scroll"),ref:r},[e.panes.length>0?J("div",{class:[o.e("nav"),o.is(a.props.tabPosition),o.is("stretch",e.stretch&&["top","bottom"].includes(a.props.tabPosition))],ref:u,style:C.value,role:"tablist",onKeydown:R,onWheel:P},[e.type?null:J(iY,{ref:f,tabs:[...e.panes],tabRefs:d.value},null),q]):null])])}}}),fY=Se({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},defaultValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:X(Function),default:()=>!0},stretch:Boolean,tabindex:{type:[String,Number],default:0}}),Hf=e=>De(e)||Fe(e),pY={[at]:e=>Hf(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>Hf(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>Hf(e),tabAdd:()=>!0},vY=ie({name:"ElTabs",props:fY,emits:pY,setup(e,{emit:t,slots:n,expose:a}){const o=he("tabs"),l=S(()=>["left","right"].includes(e.tabPosition)),{children:s,addChild:r,removeChild:u,ChildrenSorter:c}=Pd(vt(),"ElTabPane"),d=A(),f=A((xt(e.modelValue)?e.defaultValue:e.modelValue)??"0"),p=async(b,w=!1)=>{var C,k,E,T;if(!(f.value===b||xt(b)))try{let $;if(e.beforeLeave){const N=e.beforeLeave(b,f.value);$=N instanceof Promise?await N:N}else $=!0;if($!==!1){const N=(C=s.value.find(O=>O.paneName===f.value))==null?void 0:C.isFocusInsidePane();f.value=b,w&&(t(at,b),t("tabChange",b)),(E=(k=d.value)==null?void 0:k.removeFocus)==null||E.call(k),N&&((T=d.value)==null||T.focusActiveTab())}}catch{}},g=(b,w,C)=>{b.props.disabled||(t("tabClick",b,C),p(w,!0))},v=(b,w)=>{b.props.disabled||xt(b.props.name)||(w.stopPropagation(),t("edit",b.props.name,"remove"),t("tabRemove",b.props.name))},h=()=>{t("edit",void 0,"add"),t("tabAdd")},m=b=>{const w=zt(b);[Ce.enter,Ce.numpadEnter].includes(w)&&h()},y=b=>{const w=b.el.firstChild,C=["bottom","right"].includes(e.tabPosition)?b.children[0].el:b.children[1].el;w!==C&&w.before(C)};return fe(()=>e.modelValue,b=>p(b)),fe(f,async()=>{var b;await Ae(),(b=d.value)==null||b.scrollToActiveTab()}),bt(jd,{props:e,currentName:f,registerPane:r,unregisterPane:u,nav$:d}),a({currentName:f,get tabNavRef(){return su(d.value,["scheduleRender"])}}),()=>{const b=n["add-icon"],w=e.editable||e.addable?J("div",{class:[o.e("new-tab"),l.value&&o.e("new-tab-vertical")],tabindex:e.tabindex,onClick:h,onKeydown:m},[b?ae(n,"add-icon"):J(Be,{class:o.is("icon-plus")},{default:()=>[J(nS,null,null)]})]):null,C=()=>J(dY,{ref:d,currentName:f.value,editable:e.editable,type:e.type,panes:s.value,stretch:e.stretch,onTabClick:g,onTabRemove:v},null),k=J("div",{class:[o.e("header"),l.value&&o.e("header-vertical"),o.is(e.tabPosition)]},[J(c,null,{default:C,$stable:!0}),w]),E=J("div",{class:o.e("content")},[ae(n,"default")]);return J("div",{class:[o.b(),o.m(e.tabPosition),{[o.m("card")]:e.type==="card",[o.m("border-card")]:e.type==="border-card"}],onVnodeMounted:y,onVnodeUpdated:y},[E,k])}}}),hY=Se({label:{type:String,default:""},name:{type:[String,Number]},closable:{type:Boolean,default:void 0},disabled:Boolean,lazy:Boolean}),mY=["id","aria-hidden","aria-labelledby"],Zb="ElTabPane";var gY=ie({name:Zb,__name:"tab-pane",props:hY,setup(e){const t=e,n=vt(),a=fn(),o=_e(jd);o||Jt(Zb,"usage: ");const l=he("tab-pane"),s=A(),r=A(),u=S(()=>t.closable??o.props.closable),c=S(()=>o.currentName.value===(t.name??r.value)),d=A(c.value),f=S(()=>t.name??r.value),p=S(()=>!t.lazy||d.value||c.value),g=()=>{var h;return(h=s.value)==null?void 0:h.contains(document.activeElement)};fe(c,h=>{h&&(d.value=!0)});const v=Rt({uid:n.uid,getVnode:()=>n.vnode,slots:a,props:t,paneName:f,active:c,index:r,isClosable:u,isFocusInsidePane:g});return o.registerPane(v),Pt(()=>{o.unregisterPane(v)}),Iv(()=>{var h;a.label&&((h=o.nav$.value)==null||h.scheduleRender())}),(h,m)=>p.value?dt((x(),B("div",{key:0,id:`pane-${f.value}`,ref_key:"paneRef",ref:s,class:M(i(l).b()),role:"tabpanel","aria-hidden":!c.value,"aria-labelledby":`tab-${f.value}`},[ae(h.$slots,"default")],10,mY)),[[Nt,c.value]]):le("v-if",!0)}}),Jk=gY;const yY=rt(vY,{TabPane:Jk}),bY=Qt(Jk),wY=Se({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:eo,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}});var CY=ie({name:"ElText",__name:"text",props:wY,setup(e){const t=e,n=A(),a=bn(),o=he("text"),l=S(()=>[o.b(),o.m(t.type),o.m(a.value),o.is("truncated",t.truncated),o.is("line-clamp",!xt(t.lineClamp))]),s=()=>{var c,d,f,p,g,v,h;if(rl().title)return;let r=!1;const u=((c=n.value)==null?void 0:c.textContent)||"";if(t.truncated){const m=(d=n.value)==null?void 0:d.offsetWidth,y=(f=n.value)==null?void 0:f.scrollWidth;m&&y&&y>m&&(r=!0)}else if(!xt(t.lineClamp)){const m=(p=n.value)==null?void 0:p.offsetHeight,y=(g=n.value)==null?void 0:g.scrollHeight;m&&y&&y>m&&(r=!0)}r?(v=n.value)==null||v.setAttribute("title",u):(h=n.value)==null||h.removeAttribute("title")};return mt(s),Qa(s),(r,u)=>(x(),re(ct(e.tag),{ref_key:"textRef",ref:n,class:M(l.value),style:je({"-webkit-line-clamp":e.lineClamp})},{default:ne(()=>[ae(r.$slots,"default")]),_:3},8,["class","style"]))}}),SY=CY;const mm=rt(SY),sv="00:30",kY=Se({format:{type:String,default:"HH:mm"},modelValue:{type:X(String)},disabled:{type:Boolean,default:void 0},editable:{type:Boolean,default:!0},effect:{type:X(String),default:"light"},clearable:{type:Boolean,default:!0},size:Sn,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:sv},minTime:{type:X(String)},maxTime:{type:X(String)},includeEndTime:Boolean,name:String,prefixIcon:{type:X([String,Object]),default:()=>tS},clearIcon:{type:X([String,Object]),default:()=>_o},popperClass:{type:String,default:""},popperStyle:{type:X([String,Object])},...Is}),jo=e=>{const t=(e||"").split(":");if(t.length>=2){let n=Number.parseInt(t[0],10);const a=Number.parseInt(t[1],10),o=e.toUpperCase();return o.includes("AM")&&n===12?n=0:o.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:a}}return null},Kf=(e,t)=>{const n=jo(e);if(!n)return-1;const a=jo(t);if(!a)return-1;const o=n.minutes+n.hours*60,l=a.minutes+a.hours*60;return o===l?0:o>l?1:-1},Jb=e=>`${e}`.padStart(2,"0"),js=e=>`${Jb(e.hours)}:${Jb(e.minutes)}`,EY=(e,t)=>{const n=jo(e);if(!n)return"";const a=jo(t);if(!a)return"";const o={hours:n.hours,minutes:n.minutes};return o.minutes+=a.minutes,o.hours+=a.hours,o.hours+=Math.floor(o.minutes/60),o.minutes=o.minutes%60,js(o)};var xY=ie({name:"ElTimeSelect",__name:"time-select",props:kY,emits:[yt,"blur","focus","clear",at],setup(e,{expose:t}){st.extend(Dh);const{Option:n}=zl,a=e,o=he("input"),l=A(),s=on(),{lang:r}=Et(),u=S(()=>a.modelValue),c=S(()=>{const y=jo(a.start);return y?js(y):null}),d=S(()=>{const y=jo(a.end);return y?js(y):null}),f=S(()=>{const y=jo(a.minTime||"");return y?js(y):null}),p=S(()=>{const y=jo(a.maxTime||"");return y?js(y):null}),g=S(()=>{const y=jo(a.step),b=!y||y.hours<0||y.minutes<0||Number.isNaN(y.hours)||Number.isNaN(y.minutes)||y.hours===0&&y.minutes===0;return b&&ft("ElTimeSelect",`invalid step, fallback to default step (${sv}).`),b?sv:js(y)}),v=S(()=>{var w;const y=[],b=(C,k)=>{y.push({value:C,rawValue:k,disabled:Kf(k,f.value||"-1:-1")<=0||Kf(k,p.value||"100:100")>=0})};if(a.start&&a.end&&a.step){let C=c.value,k;for(;C&&d.value&&Kf(C,d.value)<=0;)k=st(C,"HH:mm").locale(r.value).format(a.format),b(k,C),C=EY(C,g.value);a.includeEndTime&&d.value&&((w=y[y.length-1])==null?void 0:w.rawValue)!==d.value&&b(st(d.value,"HH:mm").locale(r.value).format(a.format),d.value)}return y});return t({blur:()=>{var y,b;(b=(y=l.value)==null?void 0:y.blur)==null||b.call(y)},focus:()=>{var y,b;(b=(y=l.value)==null?void 0:y.focus)==null||b.call(y)}}),(y,b)=>(x(),re(i(zl),{ref_key:"select",ref:l,name:e.name,"model-value":u.value,disabled:i(s),clearable:e.clearable,"clear-icon":e.clearIcon,size:e.size,effect:e.effect,placeholder:e.placeholder,"default-first-option":"",filterable:e.editable,"empty-values":e.emptyValues,"value-on-clear":e.valueOnClear,"popper-class":e.popperClass,"popper-style":e.popperStyle,"onUpdate:modelValue":b[0]||(b[0]=w=>y.$emit(i(at),w)),onChange:b[1]||(b[1]=w=>y.$emit(i(yt),w)),onBlur:b[2]||(b[2]=w=>y.$emit("blur",w)),onFocus:b[3]||(b[3]=w=>y.$emit("focus",w)),onClear:b[4]||(b[4]=()=>y.$emit("clear"))},{prefix:ne(()=>[e.prefixIcon?(x(),re(i(Be),{key:0,class:M(i(o).e("prefix-icon"))},{default:ne(()=>[(x(),re(ct(e.prefixIcon)))]),_:1},8,["class"])):le("v-if",!0)]),default:ne(()=>[(x(!0),B(He,null,Ct(v.value,w=>(x(),re(i(n),{key:w.value,label:w.value,value:w.value,disabled:w.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["name","model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","popper-class","popper-style"]))}}),TY=xY;const $Y=rt(TY),Qk="timeline",OY=Se({mode:{type:String,values:["start","alternate","alternate-reverse","end"],default:"start"},reverse:Boolean}),NY=ie({name:"ElTimeline",props:OY,setup(e,{slots:t}){const n=he("timeline");bt(Qk,{props:e,slots:t});const a=S(()=>[n.b(),n.is(e.mode)]);return()=>{var l;const o=wa(((l=t.default)==null?void 0:l.call(t))??[]);return Ye("ul",{class:a.value},e.reverse?o.reverse():o)}}}),MY=Se({timestamp:{type:String,default:""},hideTimestamp:Boolean,center:Boolean,placement:{type:String,values:["top","bottom"],default:"bottom"},type:{type:String,values:["primary","success","warning","danger","info"],default:""},color:{type:String,default:""},size:{type:String,values:["normal","large"],default:"normal"},icon:{type:Ft},hollow:Boolean});var RY=ie({name:"ElTimelineItem",__name:"timeline-item",props:MY,setup(e){const t=e,{props:n}=_e(Qk),a=he("timeline-item"),o=S(()=>[a.e("node"),a.em("node",t.size||""),a.em("node",t.type||""),a.is("hollow",t.hollow)]),l=S(()=>[a.b(),{[a.e("center")]:t.center},a.is(n.mode)]);return(s,r)=>(x(),B("li",{class:M(l.value)},[j("div",{class:M(i(a).e("tail"))},null,2),s.$slots.dot?le("v-if",!0):(x(),B("div",{key:0,class:M(o.value),style:je({backgroundColor:e.color})},[e.icon?(x(),re(i(Be),{key:0,class:M(i(a).e("icon"))},{default:ne(()=>[(x(),re(ct(e.icon)))]),_:1},8,["class"])):le("v-if",!0)],6)),s.$slots.dot?(x(),B("div",{key:1,class:M(i(a).e("dot"))},[ae(s.$slots,"dot")],2)):le("v-if",!0),j("div",{class:M(i(a).e("wrapper"))},[!e.hideTimestamp&&e.placement==="top"?(x(),B("div",{key:0,class:M([i(a).e("timestamp"),i(a).is("top")])},ke(e.timestamp),3)):le("v-if",!0),j("div",{class:M(i(a).e("content"))},[ae(s.$slots,"default")],2),!e.hideTimestamp&&e.placement==="bottom"?(x(),B("div",{key:1,class:M([i(a).e("timestamp"),i(a).is("bottom")])},ke(e.timestamp),3)):le("v-if",!0)],2)],2))}}),eE=RY;const IY=rt(NY,{TimelineItem:eE}),_Y=Qt(eE),tE="left-check-change",nE="right-check-change",Us=Se({data:{type:X(Array),default:()=>[]},titles:{type:X(Array),default:()=>[]},buttonTexts:{type:X(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:X(Function)},leftDefaultChecked:{type:X(Array),default:()=>[]},rightDefaultChecked:{type:X(Array),default:()=>[]},renderContent:{type:X(Function)},modelValue:{type:X(Array),default:()=>[]},format:{type:X(Object),default:()=>({})},filterable:Boolean,props:{type:X(Object),default:()=>nn({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0}}),rv=(e,t)=>[e,t].every(be)||be(e)&&hn(t),PY={[yt]:(e,t,n)=>[e,n].every(be)&&["left","right"].includes(t),[at]:e=>be(e),[tE]:rv,[nE]:rv},Eu=e=>{const t={label:"label",key:"key",disabled:"disabled"};return S(()=>({...t,...e.props}))},AY=(e,t)=>({onSourceCheckedChange:(o,l)=>{e.leftChecked=o,l&&t(tE,o,l)},onTargetCheckedChange:(o,l)=>{e.rightChecked=o,l&&t(nE,o,l)}}),LY=e=>{const t=Eu(e),n=S(()=>e.data.reduce((a,o)=>(a[o[t.value.key]]=o,a),{}));return{sourceData:S(()=>e.data.filter(a=>!e.modelValue.includes(a[t.value.key]))),targetData:S(()=>e.targetOrder==="original"?e.data.filter(a=>e.modelValue.includes(a[t.value.key])):e.modelValue.reduce((a,o)=>{const l=n.value[o];return l&&a.push(l),a},[]))}},DY=(e,t,n)=>{const a=Eu(e),o=(r,u,c)=>{n(at,r),n(yt,r,u,c)};return{addToLeft:()=>{const r=e.modelValue.slice();t.rightChecked.forEach(u=>{const c=r.indexOf(u);c>-1&&r.splice(c,1)}),o(r,"left",t.rightChecked)},addToRight:()=>{let r=e.modelValue.slice();const u=e.data.filter(c=>{const d=c[a.value.key];return t.leftChecked.includes(d)&&!e.modelValue.includes(d)}).map(c=>c[a.value.key]);r=e.targetOrder==="unshift"?u.concat(r):r.concat(u),e.targetOrder==="original"&&(r=e.data.filter(c=>r.includes(c[a.value.key])).map(c=>c[a.value.key])),o(r,"right",t.leftChecked)}}},iv="checked-change",VY=Se({data:Us.data,optionRender:{type:X(Function)},placeholder:String,title:String,filterable:Boolean,format:Us.format,filterMethod:Us.filterMethod,defaultChecked:Us.leftDefaultChecked,props:Us.props}),BY={[iv]:rv},FY=(e,t,n)=>{const a=Eu(e),o=S(()=>e.data.filter(d=>ze(e.filterMethod)?e.filterMethod(t.query,d):String(d[a.value.label]||d[a.value.key]).toLowerCase().includes(t.query.toLowerCase()))),l=S(()=>o.value.filter(d=>!d[a.value.disabled])),s=S(()=>{const d=t.checked.length,f=e.data.length,{noChecked:p,hasChecked:g}=e.format;return p&&g?d>0?g.replace(/\${checked}/g,d.toString()).replace(/\${total}/g,f.toString()):p.replace(/\${total}/g,f.toString()):`${d}/${f}`}),r=S(()=>{const d=t.checked.length;return d>0&&d{const d=l.value.map(f=>f[a.value.key]);t.allChecked=d.length>0&&d.every(f=>t.checked.includes(f))},c=d=>{t.checked=d?l.value.map(f=>f[a.value.key]):[]};return fe(()=>t.checked,(d,f)=>{u(),t.checkChangeByUser?n(iv,d,d.concat(f).filter(p=>!d.includes(p)||!f.includes(p))):(n(iv,d),t.checkChangeByUser=!0)}),fe(l,()=>{u()}),fe(()=>e.data,()=>{const d=[],f=o.value.map(p=>p[a.value.key]);t.checked.forEach(p=>{f.includes(p)&&d.push(p)}),t.checkChangeByUser=!1,t.checked=d}),fe(()=>e.defaultChecked,(d,f)=>{if(f&&d.length===f.length&&d.every(v=>f.includes(v)))return;const p=[],g=l.value.map(v=>v[a.value.key]);d.forEach(v=>{g.includes(v)&&p.push(v)}),t.checkChangeByUser=!1,t.checked=p},{immediate:!0}),{filteredData:o,checkableData:l,checkedSummary:s,isIndeterminate:r,updateAllChecked:u,handleAllCheckedChange:c}};var zY=ie({name:"ElTransferPanel",__name:"transfer-panel",props:VY,emits:BY,setup(e,{expose:t,emit:n}){const a=e,o=n,l=fn(),s=({option:C})=>C,{t:r}=Et(),u=he("transfer"),c=Rt({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),d=Eu(a),{filteredData:f,checkedSummary:p,isIndeterminate:g,handleAllCheckedChange:v}=FY(a,c,o),h=S(()=>!la(c.query)&&la(f.value)),m=S(()=>!la(l.default()[0].children)),{checked:y,allChecked:b,query:w}=Nn(c);return t({query:w}),(C,k)=>(x(),B("div",{class:M(i(u).b("panel"))},[j("p",{class:M(i(u).be("panel","header"))},[J(i(Za),{modelValue:i(b),"onUpdate:modelValue":k[0]||(k[0]=E=>Ut(b)?b.value=E:null),indeterminate:i(g),"validate-event":!1,onChange:i(v)},{default:ne(()=>[j("span",{class:M(i(u).be("panel","header-title"))},ke(e.title),3),j("span",{class:M(i(u).be("panel","header-count"))},ke(i(p)),3)]),_:1},8,["modelValue","indeterminate","onChange"])],2),j("div",{class:M([i(u).be("panel","body"),i(u).is("with-footer",m.value)])},[e.filterable?(x(),re(i(Dn),{key:0,modelValue:i(w),"onUpdate:modelValue":k[1]||(k[1]=E=>Ut(w)?w.value=E:null),class:M(i(u).be("panel","filter")),size:"default",placeholder:e.placeholder,"prefix-icon":i(QP),clearable:"","validate-event":!1},null,8,["modelValue","class","placeholder","prefix-icon"])):le("v-if",!0),dt(J(i(zh),{modelValue:i(y),"onUpdate:modelValue":k[2]||(k[2]=E=>Ut(y)?y.value=E:null),"validate-event":!1,class:M([i(u).is("filterable",e.filterable),i(u).be("panel","list")])},{default:ne(()=>[(x(!0),B(He,null,Ct(i(f),E=>(x(),re(i(Za),{key:E[i(d).key],class:M(i(u).be("panel","item")),value:E[i(d).key],disabled:E[i(d).disabled],"validate-event":!1},{default:ne(()=>{var T;return[J(s,{option:(T=e.optionRender)==null?void 0:T.call(e,E)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","class"]),[[Nt,!h.value&&!i(la)(e.data)]]),dt(j("div",{class:M(i(u).be("panel","empty"))},[ae(C.$slots,"empty",{},()=>[St(ke(h.value?i(r)("el.transfer.noMatch"):i(r)("el.transfer.noData")),1)])],2),[[Nt,h.value||i(la)(e.data)]])],2),m.value?(x(),B("p",{key:0,class:M(i(u).be("panel","footer"))},[ae(C.$slots,"default")],2)):le("v-if",!0)],2))}}),Qb=zY;const HY={key:0},KY={key:0};var WY=ie({name:"ElTransfer",__name:"transfer",props:Us,emits:PY,setup(e,{expose:t,emit:n}){const a=e,o=n,l=fn(),{t:s}=Et(),r=he("transfer"),{formItem:u}=Pn(),c=Rt({leftChecked:[],rightChecked:[]}),d=Eu(a),{sourceData:f,targetData:p}=LY(a),{onSourceCheckedChange:g,onTargetCheckedChange:v}=AY(c,o),{addToLeft:h,addToRight:m}=DY(a,c,o),y=A(),b=A(),w=N=>{switch(N){case"left":y.value.query="";break;case"right":b.value.query="";break}},C=S(()=>a.buttonTexts.length===2),k=S(()=>a.titles[0]||s("el.transfer.titles.0")),E=S(()=>a.titles[1]||s("el.transfer.titles.1")),T=S(()=>a.filterPlaceholder||s("el.transfer.filterPlaceholder"));fe(()=>a.modelValue,()=>{var N;a.validateEvent&&((N=u==null?void 0:u.validate)==null||N.call(u,"change").catch(O=>ft(O)))});const $=S(()=>N=>{var _;if(a.renderContent)return a.renderContent(Ye,N);const O=(((_=l.default)==null?void 0:_.call(l,{option:N}))||[]).filter(P=>P.type!==vn);return O.length?O:Ye("span",N[d.value.label]||N[d.value.key])});return t({clearQuery:w,leftPanel:y,rightPanel:b}),(N,O)=>(x(),B("div",{class:M(i(r).b())},[J(Qb,{ref_key:"leftPanel",ref:y,data:i(f),"option-render":$.value,placeholder:T.value,title:k.value,filterable:e.filterable,format:e.format,"filter-method":e.filterMethod,"default-checked":e.leftDefaultChecked,props:a.props,onCheckedChange:i(g)},{empty:ne(()=>[ae(N.$slots,"left-empty")]),default:ne(()=>[ae(N.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","onCheckedChange"]),j("div",{class:M(i(r).e("buttons"))},[J(i($n),{type:"primary",class:M([i(r).e("button"),i(r).is("with-texts",C.value)]),disabled:i(la)(c.rightChecked),onClick:i(h)},{default:ne(()=>[J(i(Be),null,{default:ne(()=>[J(i(al))]),_:1}),i(xt)(e.buttonTexts[0])?le("v-if",!0):(x(),B("span",HY,ke(e.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),J(i($n),{type:"primary",class:M([i(r).e("button"),i(r).is("with-texts",C.value)]),disabled:i(la)(c.leftChecked),onClick:i(m)},{default:ne(()=>[i(xt)(e.buttonTexts[1])?le("v-if",!0):(x(),B("span",KY,ke(e.buttonTexts[1]),1)),J(i(Be),null,{default:ne(()=>[J(i(Jn))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),J(Qb,{ref_key:"rightPanel",ref:b,data:i(p),"option-render":$.value,placeholder:T.value,filterable:e.filterable,format:e.format,"filter-method":e.filterMethod,title:E.value,"default-checked":e.rightDefaultChecked,props:a.props,onCheckedChange:i(v)},{empty:ne(()=>[ae(N.$slots,"right-empty")]),default:ne(()=>[ae(N.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","onCheckedChange"])],2))}}),jY=WY;const UY=rt(jY),gm="RootTree",aE="NodeInstance",e0="TreeNodeMap",oE=Se({data:{type:X(Array),default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},checkDescendants:Boolean,autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:{type:Array},defaultExpandedKeys:{type:Array},currentNodeKey:{type:[String,Number]},renderContent:{type:X(Function)},showCheckbox:Boolean,draggable:Boolean,allowDrag:{type:X(Function)},allowDrop:{type:X(Function)},props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:Boolean,highlightCurrent:Boolean,load:{type:Function},filterNodeMethod:{type:Function},accordion:Boolean,indent:{type:Number,default:18},icon:{type:Ft}}),YY={"check-change":(e,t,n)=>e&&Vt(t)&&Vt(n),"current-change":(e,t)=>!0,"node-click":(e,t,n,a)=>e&&t&&a instanceof Event,"node-contextmenu":(e,t,n,a)=>e instanceof Event&&t&&n,"node-collapse":(e,t,n)=>e&&t,"node-expand":(e,t,n)=>e&&t,check:(e,t)=>e&&t,"node-drag-start":(e,t)=>e&&t,"node-drag-end":(e,t,n,a)=>e&&a,"node-drop":(e,t,n,a)=>e&&t&&a,"node-drag-leave":(e,t,n)=>e&&t&&n,"node-drag-enter":(e,t,n)=>e&&t&&n,"node-drag-over":(e,t,n)=>e&&t&&n},lr="$treeNodeId",t0=function(e,t){!t||t[lr]||Object.defineProperty(t,lr,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},ym=(e,t)=>t==null?void 0:t[e||lr],uv=(e,t,n)=>{const a=e.value.currentNode;n();const o=e.value.currentNode;a!==o&&t("current-change",o?o.data:null,o)},lE=e=>{let t=!0,n=!0,a=!0,o=!0;for(let l=0,s=e.length;l{n.canFocus=t,cv(n.childNodes,t)})};let qY=0;var dv=class pc{constructor(t){this.isLeafByUser=void 0,this.isLeaf=void 0,this.isEffectivelyChecked=!1,this.id=qY++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const n in t)$t(t,n)&&(this[n]=t[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){var l;const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const n=t.props;if(n&&typeof n.isLeaf<"u"){const s=qu(this,"isLeaf");Vt(s)&&(this.isLeafByUser=s)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&!this.isLeafByUser&&this.expand(),be(this.data)||t0(this,this.data),!this.data)return;const a=t.defaultExpandedKeys,o=t.key;o&&!hn(this.key)&&a&&a.includes(this.key)&&this.expand(null,t.autoExpandParent),o&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode&&(t.currentNode.isCurrent=!1),t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),(this.level===1||((l=this.parent)==null?void 0:l.expanded)===!0)&&(this.canFocus=!0)}setData(t){be(t)||t0(this,t),this.data=t,this.childNodes=[];let n;this.level===0&&be(this.data)?n=this.data:n=qu(this,"children")||[];for(let a=0,o=n.length;a-1)return t.childNodes[n+1]}return null}get previousSibling(){const t=this.parent;if(t){const n=t.childNodes.indexOf(this);if(n>-1)return n>0?t.childNodes[n-1]:null}return null}contains(t,n=!0){return(this.childNodes||[]).some(a=>a===t||n&&a.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,n,a){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof pc)){if(!a){const o=this.getChildren(!0);o!=null&&o.includes(t.data)||(xt(n)||n<0?o==null||o.push(t.data):o==null||o.splice(n,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=Rt(new pc(t)),t instanceof pc&&t.initialize()}t.level=this.level+1,xt(n)||n<0?this.childNodes.push(t):this.childNodes.splice(n,0,t),this.updateLeafState()}insertBefore(t,n){let a;n&&(a=this.childNodes.indexOf(n)),this.insertChild(t,a)}insertAfter(t,n){let a;n&&(a=this.childNodes.indexOf(n),a!==-1&&(a+=1)),this.insertChild(t,a)}removeChild(t){const n=this.getChildren()||[],a=n.indexOf(t.data);a>-1&&n.splice(a,1);const o=this.childNodes.indexOf(t);o>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(o,1)),this.updateLeafState()}removeChildByData(t){const n=this.childNodes.find(a=>a.data===t);n&&this.removeChild(n)}expand(t,n){const a=()=>{if(n){let o=this.parent;for(;o&&o.level>0;)o.expanded=!0,o=o.parent}this.expanded=!0,t&&t(),cv(this.childNodes,!0)};this.shouldLoadData()?this.loadData(o=>{be(o)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||ti(this),a())}):a()}doCreateChildren(t,n={}){t.forEach(a=>{this.insertChild(Object.assign({data:a},n),void 0,!0)})}collapse(){this.expanded=!1,cv(this.childNodes,!1)}shouldLoadData(){return!!(this.store.lazy===!0&&this.store.load&&!this.loaded)}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}this.isLeaf=!1}setChecked(t,n,a,o){if(this.indeterminate=t==="half",this.checked=t===!0,this.isEffectivelyChecked=!this.childNodes.length&&(this.disabled||this.checked),this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const s=()=>{if(n){const r=this.childNodes;for(let f=0,p=r.length;f{s(),ti(this)},{checked:t!==!1});return}else s()}const l=this.parent;!l||l.level===0||a||ti(l)}getChildren(t=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const a=this.store.props;let o="children";return a&&(o=a.children||"children"),xt(n[o])&&(n[o]=null),t&&!n[o]&&(n[o]=[]),n[o]}updateChildren(){const t=this.getChildren()||[],n=this.childNodes.map(l=>l.data),a={},o=[];t.forEach((l,s)=>{const r=l[lr];r&&n.some(u=>(u==null?void 0:u[lr])===r)?a[r]={index:s,data:l}:o.push({index:s,data:l})}),this.store.lazy||n.forEach(l=>{a[l==null?void 0:l[lr]]||this.removeChildByData(l)}),o.forEach(({index:l,data:s})=>{this.insertChild({data:s},l)}),this.updateLeafState()}loadData(t,n={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(n).length)){this.loading=!0;const a=l=>{this.childNodes=[],this.doCreateChildren(l,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,l)},o=()=>{this.loading=!1};this.store.load(this,a,o)}else t&&t.call(this)}eachNode(t){const n=[this];for(;n.length;){const a=n.shift();n.unshift(...a.childNodes),t(a)}}reInitChecked(){this.store.checkStrictly||ti(this)}},GY=class{constructor(e){this.lazy=!1,this.checkStrictly=!1,this.autoExpandParent=!1,this.defaultExpandAll=!1,this.checkDescendants=!1,this.currentNode=null,this.currentNodeKey=null;for(const t in e)$t(e,t)&&(this[t]=e[t]);this.nodesMap={}}initialize(){if(this.root=new dv({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,t=>{this.root.doCreateChildren(t),this._initDefaultCheckedNodes()},_t)}else this._initDefaultCheckedNodes()}filter(e){const t=this.filterNodeMethod,n=this.lazy,a=async function(o){const l=o.root?o.root.childNodes:o.childNodes;for(const[s,r]of l.entries())r.visible=!!(t!=null&&t.call(r,e,r.data,r)),s%80===0&&s>0&&await Ae(),await a(r);if(!o.visible&&l.length){let s=!0;s=!l.some(r=>r.visible),o.root?o.root.visible=s===!1:o.visible=s===!1}e&&o.visible&&!o.isLeaf&&(!n||o.loaded)&&o.expand()};a(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(e){if(e instanceof dv)return e;const t=ot(e)?ym(this.key,e):e;return this.nodesMap[t]||null}insertBefore(e,t){var a;const n=this.getNode(t);(a=n.parent)==null||a.insertBefore({data:e},n)}insertAfter(e,t){var a;const n=this.getNode(t);(a=n.parent)==null||a.insertAfter({data:e},n)}remove(e){const t=this.getNode(e);t&&t.parent&&(t===this.currentNode&&(this.currentNode=null),t.parent.removeChild(t))}append(e,t){const n=pa(t)?this.root:this.getNode(t);n&&n.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],t=this.nodesMap;e.forEach(n=>{const a=t[n];a&&a.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){const t=this.defaultCheckedKeys||[];!hn(e.key)&&t.includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const t=this.key;if(!(!e||!e.data))if(!t)this.nodesMap[e.id]=e;else{const n=e.key;hn(n)||(this.nodesMap[n]=e)}}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(t=>{this.deregisterNode(t)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,t=!1){const n=[],a=function(o){(o.root?o.root.childNodes:o.childNodes).forEach(l=>{(l.checked||t&&l.indeterminate)&&(!e||e&&l.isLeaf)&&n.push(l.data),a(l)})};return a(this),n}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(t=>(t||{})[this.key])}getHalfCheckedNodes(){const e=[],t=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(a=>{a.indeterminate&&e.push(a.data),t(a)})};return t(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],t=this.nodesMap;for(const n in t)$t(t,n)&&e.push(t[n]);return e}updateChildren(e,t){const n=this.nodesMap[e];if(!n)return;const a=n.childNodes;for(let o=a.length-1;o>=0;o--){const l=a[o];this.remove(l.data)}for(let o=0,l=t.length;or.level-u.level),o=Object.create(null),l=Object.keys(n);a.forEach(r=>r.setChecked(!1,!1));const s=r=>{r.childNodes.forEach(u=>{var c;o[u.data[e]]=!0,(c=u.childNodes)!=null&&c.length&&s(u)})};for(let r=0,u=a.length;r{g.isLeaf||g.setChecked(!1,!1,!0),f(g)}),p.reInitChecked()};f(c)}}}setCheckedNodes(e,t=!1){const n=this.key,a={};e.forEach(o=>{a[(o||{})[n]]=!0}),this._setCheckedKeys(n,t,a)}setCheckedKeys(e,t=!1){this.defaultCheckedKeys=e;const n=this.key,a={};e.forEach(o=>{a[o]=!0}),this._setCheckedKeys(n,t,a)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach(t=>{const n=this.getNode(t);n&&n.expand(null,this.autoExpandParent)})}setChecked(e,t,n){const a=this.getNode(e);a&&a.setChecked(!!t,n)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const t=this.currentNode;t&&(t.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,t=!0){var o;const n=e[this.key],a=this.nodesMap[n];this.setCurrentNode(a),t&&this.currentNode&&this.currentNode.level>1&&((o=this.currentNode.parent)==null||o.expand(null,!0))}setCurrentNodeKey(e,t=!0){var a;if(this.currentNodeKey=e,pa(e)){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(e);n&&(this.setCurrentNode(n),t&&this.currentNode&&this.currentNode.level>1&&((a=this.currentNode.parent)==null||a.expand(null,!0)))}};function sE(e){const t=_e(e0,null);let n={treeNodeExpand:a=>{var o;e.node!==a&&((o=e.node)==null||o.collapse())},children:new Set};return t&&t.children.add(n),Pt(()=>{t&&t.children.delete(n),n=null}),bt(e0,n),{broadcastExpanded:a=>{if(e.accordion)for(const o of n.children)o.treeNodeExpand(a)}}}const rE=Symbol("dragEvents");function XY({props:e,ctx:t,el$:n,dropIndicator$:a,store:o}){const l=he("tree"),s=A({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return bt(rE,{treeNodeDragStart:({event:d,treeNode:f})=>{if(d.dataTransfer){if(ze(e.allowDrag)&&!e.allowDrag(f.node))return d.preventDefault(),!1;d.dataTransfer.effectAllowed="move";try{d.dataTransfer.setData("text/plain","")}catch{}s.value.draggingNode=f,t.emit("node-drag-start",f.node,d)}},treeNodeDragOver:({event:d,treeNode:f})=>{if(!d.dataTransfer)return;const p=f,g=s.value.dropNode;g&&g.node.id!==p.node.id&&Zn(g.$el,l.is("drop-inner"));const v=s.value.draggingNode;if(!v||!p)return;let h=!0,m=!0,y=!0,b=!0;ze(e.allowDrop)&&(h=e.allowDrop(v.node,p.node,"prev"),b=m=e.allowDrop(v.node,p.node,"inner"),y=e.allowDrop(v.node,p.node,"next")),d.dataTransfer.dropEffect=m||h||y?"move":"none",(h||m||y)&&(g==null?void 0:g.node.id)!==p.node.id&&(g&&t.emit("node-drag-leave",v.node,g.node,d),t.emit("node-drag-enter",v.node,p.node,d)),h||m||y?s.value.dropNode=p:s.value.dropNode=null,p.node.nextSibling===v.node&&(y=!1),p.node.previousSibling===v.node&&(h=!1),p.node.contains(v.node,!1)&&(m=!1),(v.node===p.node||v.node.contains(p.node))&&(h=!1,m=!1,y=!1);const w=p.$el,C=w.querySelector(`.${l.be("node","content")}`).getBoundingClientRect(),k=n.value.getBoundingClientRect(),E=n.value.scrollTop;let T;const $=h?m?.25:y?.45:1:Number.NEGATIVE_INFINITY,N=y?m?.75:h?.55:0:Number.POSITIVE_INFINITY;let O=-9999;const _=d.clientY-C.top;_C.height*N?T="after":m?T="inner":T="none";const P=w.querySelector(`.${l.be("node","expand-icon")}`).getBoundingClientRect(),D=a.value;T==="before"?O=P.top-k.top+E:T==="after"&&(O=P.bottom-k.top+E),D.style.top=`${O}px`,D.style.left=`${P.right-k.left}px`,T==="inner"?Na(w,l.is("drop-inner")):Zn(w,l.is("drop-inner")),s.value.showDropIndicator=T==="before"||T==="after",s.value.allowDrop=s.value.showDropIndicator||b,s.value.dropType=T,t.emit("node-drag-over",v.node,p.node,d)},treeNodeDragEnd:d=>{var v,h;const{draggingNode:f,dropType:p,dropNode:g}=s.value;if(d.preventDefault(),d.dataTransfer&&(d.dataTransfer.dropEffect="move"),f!=null&&f.node.data&&g){const m={data:f.node.data};p!=="none"&&f.node.remove(),p==="before"?(v=g.node.parent)==null||v.insertBefore(m,g.node):p==="after"?(h=g.node.parent)==null||h.insertAfter(m,g.node):p==="inner"&&g.node.insertChild(m),p!=="none"&&(o.value.registerNode(m),o.value.key&&f.node.eachNode(y=>{var b;(b=o.value.nodesMap[y.data[o.value.key]])==null||b.setChecked(y.checked,!o.value.checkStrictly)})),Zn(g.$el,l.is("drop-inner")),t.emit("node-drag-end",f.node,g.node,p,d),p!=="none"&&t.emit("node-drop",f.node,g.node,p,d)}f&&!g&&t.emit("node-drag-end",f.node,null,p,d),s.value.showDropIndicator=!1,s.value.draggingNode=null,s.value.dropNode=null,s.value.allowDrop=!0}}),{dragState:s}}var ZY=ie({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=he("tree"),n=_e(aE),a=_e(gm);return()=>{const o=e.node,{data:l,store:s}=o;return e.renderContent?e.renderContent(Ye,{_self:n,node:o,data:l,store:s}):ae(a.ctx.slots,"default",{node:o,data:l},()=>[Ye(mm,{tag:"span",truncated:!0,class:t.be("node","label")},()=>[o.label])])}}}),JY=ZY,QY=ie({name:"ElTreeNode",components:{ElCollapseTransition:zd,ElCheckbox:Za,NodeContent:JY,ElIcon:Be,Loading:Oo},props:{node:{type:dv,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:Boolean},emits:["node-expand"],setup(e,t){const n=he("tree"),{broadcastExpanded:a}=sE(e),o=_e(gm),l=A(!1),s=A(!1),r=A(),u=A(),c=A(),d=_e(rE),f=vt();bt(aE,f),o||ft("Tree","Can not find node's tree."),e.node.expanded&&(l.value=!0,s.value=!0);const p=o.props.props.children||"children";fe(()=>{var O;const N=(O=e.node.data)==null?void 0:O[p];return N&&[...N]},()=>{e.node.updateChildren()}),fe(()=>e.node.indeterminate,N=>{h(e.node.checked,N)}),fe(()=>e.node.checked,N=>{h(N,e.node.indeterminate)}),fe(()=>e.node.childNodes.length,()=>e.node.reInitChecked()),fe(()=>e.node.expanded,N=>{Ae(()=>l.value=N),N&&(s.value=!0)});const g=N=>o.props.nodeKey?ym(o.props.nodeKey,N.data):N.id,v=N=>{const O=e.props.class;if(!O)return{};let _;if(ze(O)){const{data:P}=N;_=O(P,N)}else _=O;return De(_)?{[_]:!0}:_},h=(N,O)=>{(r.value!==N||u.value!==O)&&o.ctx.emit("check-change",e.node.data,N,O),r.value=N,u.value=O},m=N=>{uv(o.store,o.ctx.emit,()=>{var O;if((O=o==null?void 0:o.props)!=null&&O.nodeKey){const _=g(e.node);o.store.value.setCurrentNodeKey(_)}else o.store.value.setCurrentNode(e.node)}),o.currentNode.value=e.node,o.props.expandOnClickNode&&b(),(o.props.checkOnClickNode||e.node.isLeaf&&o.props.checkOnClickLeaf&&e.showCheckbox)&&!e.node.disabled&&w(!e.node.checked),o.ctx.emit("node-click",e.node.data,e.node,f,N)},y=N=>{var O;(O=o.instance.vnode.props)!=null&&O.onNodeContextmenu&&(N.stopPropagation(),N.preventDefault()),o.ctx.emit("node-contextmenu",N,e.node.data,e.node,f)},b=()=>{e.node.isLeaf||(l.value?(o.ctx.emit("node-collapse",e.node.data,e.node,f),e.node.collapse()):e.node.expand(()=>{t.emit("node-expand",e.node.data,e.node,f)}))},w=N=>{const O=o==null?void 0:o.props.checkStrictly,_=e.node.childNodes;!O&&_.length&&(N=_.some(P=>!P.isEffectivelyChecked)),e.node.setChecked(N,!O),Ae(()=>{const P=o.store.value;o.ctx.emit("check",e.node.data,{checkedNodes:P.getCheckedNodes(),checkedKeys:P.getCheckedKeys(),halfCheckedNodes:P.getHalfCheckedNodes(),halfCheckedKeys:P.getHalfCheckedKeys()})})};return{ns:n,node$:c,tree:o,expanded:l,childNodeRendered:s,oldChecked:r,oldIndeterminate:u,getNodeKey:g,getNodeClass:v,handleSelectChange:h,handleClick:m,handleContextMenu:y,handleExpandIconClick:b,handleCheckChange:w,handleChildNodeExpand:(N,O,_)=>{a(O),o.ctx.emit("node-expand",N,O,_)},handleDragStart:N=>{o.props.draggable&&d.treeNodeDragStart({event:N,treeNode:e})},handleDragOver:N=>{N.preventDefault(),o.props.draggable&&d.treeNodeDragOver({event:N,treeNode:{$el:c.value,node:e.node}})},handleDrop:N=>{N.preventDefault()},handleDragEnd:N=>{o.props.draggable&&d.treeNodeDragEnd(N)},CaretRight:eS}}});const eq=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],tq=["aria-expanded"];function nq(e,t,n,a,o,l){const s=Ot("el-icon"),r=Ot("el-checkbox"),u=Ot("loading"),c=Ot("node-content"),d=Ot("el-tree-node"),f=Ot("el-collapse-transition");return dt((x(),B("div",{ref:"node$",class:M([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[2]||(t[2]=Xe((...p)=>e.handleClick&&e.handleClick(...p),["stop"])),onContextmenu:t[3]||(t[3]=(...p)=>e.handleContextMenu&&e.handleContextMenu(...p)),onDragstart:t[4]||(t[4]=Xe((...p)=>e.handleDragStart&&e.handleDragStart(...p),["stop"])),onDragover:t[5]||(t[5]=Xe((...p)=>e.handleDragOver&&e.handleDragOver(...p),["stop"])),onDragend:t[6]||(t[6]=Xe((...p)=>e.handleDragEnd&&e.handleDragEnd(...p),["stop"])),onDrop:t[7]||(t[7]=Xe((...p)=>e.handleDrop&&e.handleDrop(...p),["stop"]))},[j("div",{class:M(e.ns.be("node","content")),style:je({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(x(),re(s,{key:0,class:M([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:Xe(e.handleExpandIconClick,["stop"])},{default:ne(()=>[(x(),re(ct(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):le("v-if",!0),e.showCheckbox?(x(),re(r,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=Xe(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):le("v-if",!0),e.node.loading?(x(),re(s,{key:2,class:M([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:ne(()=>[J(u)]),_:1},8,["class"])):le("v-if",!0),J(c,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),J(f,null,{default:ne(()=>[!e.renderAfterExpand||e.childNodeRendered?dt((x(),B("div",{key:0,class:M(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded,onClick:t[1]||(t[1]=Xe(()=>{},["stop"]))},[(x(!0),B(He,null,Ct(e.node.childNodes,p=>(x(),re(d,{key:e.getNodeKey(p),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:p,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,tq)),[[Nt,e.expanded]]):le("v-if",!0)]),_:1})],42,eq)),[[Nt,e.node.visible]])}var aq=kn(QY,[["render",nq]]);function oq({el$:e},t){const n=he("tree");mt(()=>{l()}),Qa(()=>{var s;(s=e.value)==null||s.querySelectorAll("input[type=checkbox]").forEach(r=>{r.setAttribute("tabindex","-1")})});function a(s,r){var c,d;const u=t.value.getNode(s[r].dataset.key);return u.canFocus&&u.visible&&(((c=u.parent)==null?void 0:c.expanded)||((d=u.parent)==null?void 0:d.level)===0)}At(e,"keydown",s=>{const r=s.target;if(!r.className.includes(n.b("node")))return;const u=zt(s),c=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),d=c.indexOf(r);let f;if([Ce.up,Ce.down].includes(u)){if(s.preventDefault(),u===Ce.up){f=d===-1?0:d!==0?d-1:c.length-1;const g=f;for(;!a(c,f);){if(f--,f===g){f=-1;break}f<0&&(f=c.length-1)}}else{f=d===-1?0:d=c.length&&(f=0)}}f!==-1&&c[f].focus()}[Ce.left,Ce.right].includes(u)&&(s.preventDefault(),r.click());const p=r.querySelector('[type="checkbox"]');[Ce.enter,Ce.numpadEnter,Ce.space].includes(u)&&p&&(s.preventDefault(),p.click())});const l=()=>{var u;if(!e.value)return;const s=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));Array.from(e.value.querySelectorAll("input[type=checkbox]")).forEach(c=>{c.setAttribute("tabindex","-1")});const r=e.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(r.length){r[0].setAttribute("tabindex","0");return}(u=s[0])==null||u.setAttribute("tabindex","0")}}var lq=ie({name:"ElTree",components:{ElTreeNode:aq},props:oE,emits:YY,setup(e,t){const{t:n}=Et(),a=he("tree"),o=A(new GY({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));o.value.initialize();const l=A(o.value.root),s=A(null),r=A(null),u=A(null),{broadcastExpanded:c}=sE(e),{dragState:d}=XY({props:e,ctx:t,el$:r,dropIndicator$:u,store:o});oq({el$:r},o);const f=vt(),p=S(()=>{let z=f==null?void 0:f.parent;for(;z;){if(z.type.name==="ElTreeSelect")return!0;z=z.parent}return!1}),g=S(()=>{const{childNodes:z}=l.value;return(!z||z.length===0||z.every(({visible:H})=>!H))&&!p.value});fe(()=>e.currentNodeKey,z=>{o.value.setCurrentNodeKey(z??null)}),fe(()=>e.defaultCheckedKeys,(z,H)=>{tn(z,H)||o.value.setDefaultCheckedKey(z??[])}),fe(()=>e.defaultExpandedKeys,z=>{o.value.setDefaultExpandedKeys(z??[])}),fe(()=>e.data,z=>{o.value.setData(z)},{deep:!0}),fe(()=>e.checkStrictly,z=>{o.value.checkStrictly=z});const v=z=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");o.value.filter(z)},h=z=>e.nodeKey?ym(e.nodeKey,z.data):z.id,m=z=>{if(!e.nodeKey)throw new Error(`[Tree] nodeKey is required in ${z}`)},y=z=>{m("getNodePath");const H=o.value.getNode(z);if(!H)return[];const K=[H.data];let q=H.parent;for(;q&&q!==l.value;)K.push(q.data),q=q.parent;return K.reverse()},b=(z,H)=>o.value.getCheckedNodes(z,H),w=z=>o.value.getCheckedKeys(z),C=()=>{const z=o.value.getCurrentNode();return z?z.data:null},k=()=>{m("getCurrentKey");const z=C();return z?z[e.nodeKey]:null},E=(z,H)=>{m("setCheckedNodes"),o.value.setCheckedNodes(z,H)},T=(z,H)=>{m("setCheckedKeys"),o.value.setCheckedKeys(z,H)},$=(z,H,K)=>{o.value.setChecked(z,H,K)},N=()=>o.value.getHalfCheckedNodes(),O=()=>o.value.getHalfCheckedKeys(),_=(z,H=!0)=>{m("setCurrentNode"),uv(o,t.emit,()=>{c(z),o.value.setUserCurrentNode(z,H)})},P=(z=null,H=!0)=>{m("setCurrentKey"),uv(o,t.emit,()=>{c(),o.value.setCurrentNodeKey(z,H)})},D=z=>o.value.getNode(z),W=z=>{o.value.remove(z)},U=(z,H)=>{o.value.append(z,H)},F=(z,H)=>{o.value.insertBefore(z,H)},R=(z,H)=>{o.value.insertAfter(z,H)},I=(z,H,K)=>{c(H),t.emit("node-expand",z,H,K)},L=(z,H)=>{m("updateKeyChildren"),o.value.updateChildren(z,H)};return bt(gm,{ctx:t,props:e,store:o,root:l,currentNode:s,instance:f}),bt(No,void 0),{ns:a,store:o,root:l,currentNode:s,dragState:d,el$:r,dropIndicator$:u,isEmpty:g,filter:v,getNodeKey:h,getNodePath:y,getCheckedNodes:b,getCheckedKeys:w,getCurrentNode:C,getCurrentKey:k,setCheckedNodes:E,setCheckedKeys:T,setChecked:$,getHalfCheckedNodes:N,getHalfCheckedKeys:O,setCurrentNode:_,setCurrentKey:P,t:n,getNode:D,remove:W,append:U,insertBefore:F,insertAfter:R,handleNodeExpand:I,updateKeyChildren:L}}});function sq(e,t,n,a,o,l){const s=Ot("el-tree-node");return x(),B("div",{ref:"el$",class:M([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(x(!0),B(He,null,Ct(e.root.childNodes,r=>(x(),re(s,{key:e.getNodeKey(r),node:r,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(x(),B("div",{key:0,class:M(e.ns.e("empty-block"))},[ae(e.$slots,"empty",{},()=>[j("span",{class:M(e.ns.e("empty-text"))},ke(e.emptyText??e.t("el.tree.emptyText")),3)])],2)):le("v-if",!0),dt(j("div",{ref:"dropIndicator$",class:M(e.ns.e("drop-indicator"))},null,2),[[Nt,e.dragState.showDropIndicator]])],2)}var rq=kn(lq,[["render",sq]]);const bm=rt(rq),iq=(e,{attrs:t,emit:n},{select:a,tree:o,key:l})=>{const s=he("tree-select");fe(()=>e.data,()=>{e.filterable&&Ae(()=>{var u,c;(c=o.value)==null||c.filter((u=a.value)==null?void 0:u.states.inputValue)})},{flush:"post"});const r=u=>{var d,f;const c=u.at(-1);if(c.expanded&&c.childNodes.at(-1))r([c.childNodes.at(-1)]);else{(f=(d=o.value.el$)==null?void 0:d.querySelector(`[data-key="${u.at(-1).key}"]`))==null||f.focus({preventScroll:!0});return}};return mt(()=>{At(()=>{var u;return(u=a.value)==null?void 0:u.$el},"keydown",async u=>{const c=zt(u),{dropdownMenuVisible:d}=a.value;[Ce.down,Ce.up].includes(c)&&d&&(await Ae(),setTimeout(()=>{var f,p,g;if(Ce.up===c){const v=o.value.store.root.childNodes;r(v);return}(g=(p=(f=a.value.optionsArray[a.value.states.hoveringIndex].$el)==null?void 0:f.parentNode)==null?void 0:p.parentNode)==null||g.focus({preventScroll:!0})}))},{capture:!0})}),{...el(Nn(e),Object.keys(zl.props)),...t,class:S(()=>t.class),style:S(()=>t.style),"onUpdate:modelValue":u=>n(at,u),valueKey:l,popperClass:S(()=>{const u=[s.e("popper")];return e.popperClass&&u.push(e.popperClass),u.join(" ")}),filterMethod:(u="")=>{var c;e.filterMethod?e.filterMethod(u):e.remoteMethod?e.remoteMethod(u):(c=o.value)==null||c.filter(u)}}},uq=ie({extends:Vc,setup(e,t){const n=Vc.setup(e,t);delete n.selectOptionClick;const a=vt().proxy;return Ae(()=>{n.select.states.cachedOptions.get(a.value)||n.select.onOptionCreate(a)}),fe(()=>t.attrs.visible,o=>{Ae(()=>{n.states.visible=o})},{immediate:!0}),n},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function fv(e){return e||e===0}function wm(e){return be(e)&&e.length}function Hs(e){return be(e)?e:fv(e)?[e]:[]}function vc(e,t,n,a,o){for(let l=0;l{fe([()=>e.modelValue,l],()=>{e.showCheckbox&&Ae(()=>{const v=l.value;v&&!tn(v.getCheckedKeys(),Hs(e.modelValue))&&v.setCheckedKeys(Hs(e.modelValue))})},{immediate:!0,deep:!0});const r=S(()=>({value:s.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...e.props})),u=(v,h)=>{var y;const m=r.value[v];return ze(m)?m(h,(y=l.value)==null?void 0:y.getNode(u("value",h))):h[m]},c=Hs(e.modelValue).map(v=>vc(e.data||[],h=>u("value",h)===v,h=>u("children",h),(h,m,y,b)=>b&&u("value",b))).filter(v=>fv(v)),d=S(()=>{if(!e.renderAfterExpand&&!e.lazy)return[];const v=[];return hc(e.data.concat(e.cacheData),h=>{const m=u("value",h);v.push({value:m,currentLabel:u("label",h),isDisabled:u("disabled",h)})},h=>u("children",h)),v}),f=()=>{var v;return(v=l.value)==null?void 0:v.getCheckedKeys().filter(h=>{var y;const m=(y=l.value)==null?void 0:y.getNode(h);return!hn(m)&&la(m.childNodes)})},p=v=>{tn(e.modelValue,v)||a(yt,v)};function g(v){a(at,v),p(v)}return{...el(Nn(e),Object.keys(bm.props)),...t,nodeKey:s,expandOnClickNode:S(()=>!e.checkStrictly&&e.expandOnClickNode),defaultExpandedKeys:S(()=>e.defaultExpandedKeys?e.defaultExpandedKeys.concat(c):c),renderContent:(v,{node:h,data:m,store:y})=>v(uq,{value:u("value",m),label:u("label",m),disabled:u("disabled",m),visible:h.visible},e.renderContent?()=>e.renderContent(v,{node:h,data:m,store:y}):n.default?()=>n.default({node:h,data:m,store:y}):void 0),filterNodeMethod:(v,h,m)=>e.filterNodeMethod?e.filterNodeMethod(v,h,m):v?new RegExp(lh(v),"i").test(u("label",h)||""):!0,onNodeClick:(v,h,m)=>{var y,b,w;if((y=t.onNodeClick)==null||y.call(t,v,h,m),!(e.showCheckbox&&e.checkOnClickNode))if(!e.showCheckbox&&(e.checkStrictly||h.isLeaf)){if(!u("disabled",v)){const C=(b=o.value)==null?void 0:b.states.options.get(u("value",v));(w=o.value)==null||w.handleOptionSelect(C)}}else e.expandOnClickNode&&m.proxy.handleExpandIconClick()},onCheck:(v,h)=>{var k;if(!e.showCheckbox)return;const m=u("value",v),y={};hc([l.value.store.root],E=>y[E.key]=E,E=>E.childNodes);const b=h.checkedKeys,w=e.multiple?Hs(e.modelValue).filter(E=>!(E in y)&&!b.includes(E)):[],C=w.concat(b);if(e.checkStrictly)g(e.multiple?C:C.includes(m)?m:void 0);else if(e.multiple){const E=f();g(w.concat(E))}else{const E=vc([v],N=>!wm(u("children",N))&&!u("disabled",N),N=>u("children",N)),T=E?u("value",E):void 0,$=fv(e.modelValue)&&!!vc([v],N=>u("value",N)===e.modelValue,N=>u("children",N));g(T===e.modelValue||$?void 0:T)}Ae(()=>{var T;const E=Hs(e.modelValue);l.value.setCheckedKeys(E),(T=t.onCheck)==null||T.call(t,v,{checkedKeys:l.value.getCheckedKeys(),checkedNodes:l.value.getCheckedNodes(),halfCheckedKeys:l.value.getHalfCheckedKeys(),halfCheckedNodes:l.value.getHalfCheckedNodes()})}),(k=o.value)==null||k.focus()},onNodeExpand:(v,h,m)=>{var y;(y=t.onNodeExpand)==null||y.call(t,v,h,m),Ae(()=>{if(!e.checkStrictly&&e.lazy&&e.multiple&&h.checked){const b={},w=l.value.getCheckedKeys();hc([l.value.store.root],E=>b[E.key]=E,E=>E.childNodes);const C=Hs(e.modelValue).filter(E=>!(E in b)&&!w.includes(E)),k=f();g(C.concat(k))}})},cacheOptions:d}};var dq=ie({props:{data:{type:Array,default:()=>[]}},setup(e){const t=_e(wu);return fe(()=>e.data,()=>{var a;e.data.forEach(o=>{t.states.cachedOptions.has(o.value)||t.states.cachedOptions.set(o.value,o)});const n=((a=t.selectRef)==null?void 0:a.querySelectorAll("input"))||[];Mt&&!Array.from(n).includes(document.activeElement)&&t.setSelected()},{flush:"post",immediate:!0}),()=>{}}}),fq=ie({name:"ElTreeSelect",inheritAttrs:!1,props:{...US,...oE,cacheData:{type:Array,default:()=>[]}},setup(e,t){const{slots:n,expose:a,emit:o,attrs:l}=t,s={...l,onChange:void 0},r=A(),u=A(),c=S(()=>e.nodeKey||e.valueKey||"value"),d=iq(e,{attrs:l,emit:o},{select:r,tree:u,key:c}),{cacheOptions:f,...p}=cq(e,{attrs:s,slots:n,emit:o},{select:r,tree:u,key:c}),g=Rt({});return a(g),mt(()=>{Object.assign(g,{...el(u.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...el(r.value,["focus","blur","selectedLabel"]),treeRef:u.value,selectRef:r.value})}),()=>Ye(zl,Rt({...d,ref:v=>r.value=v}),{...n,default:()=>[Ye(dq,{data:f.value}),Ye(bm,Rt({...p,ref:v=>u.value=v}))]})}}),pq=fq;const vq=rt(pq),Cm=Symbol(),hq={key:-1,level:-1,data:{}};let Uo=function(e){return e.KEY="id",e.LABEL="label",e.CHILDREN="children",e.DISABLED="disabled",e.CLASS="",e}({}),n0=function(e){return e.ADD="add",e.DELETE="delete",e}({});const iE={type:Number,default:26},mq=Se({data:{type:X(Array),default:()=>nn([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:X(Object),default:()=>nn({children:Uo.CHILDREN,label:Uo.LABEL,disabled:Uo.DISABLED,value:Uo.KEY,class:Uo.CLASS})},highlightCurrent:Boolean,showCheckbox:Boolean,defaultCheckedKeys:{type:X(Array),default:()=>nn([])},checkStrictly:Boolean,defaultExpandedKeys:{type:X(Array),default:()=>nn([])},indent:{type:Number,default:16},itemSize:iE,icon:{type:Ft},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},currentNodeKey:{type:X([String,Number])},accordion:Boolean,filterMethod:{type:X(Function)},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:Boolean}),gq=Se({node:{type:X(Object),default:()=>nn(hq)},expanded:Boolean,checked:Boolean,indeterminate:Boolean,showCheckbox:Boolean,disabled:Boolean,current:Boolean,hiddenExpandIcon:Boolean,itemSize:iE}),yq=Se({node:{type:X(Object),required:!0}}),uE="node-click",cE="node-drop",dE="node-expand",fE="node-collapse",pE="current-change",vE="check",hE="check-change",mE="node-contextmenu",bq={[uE]:(e,t,n)=>e&&t&&n,[cE]:(e,t,n)=>e&&t&&n,[dE]:(e,t)=>e&&t,[fE]:(e,t)=>e&&t,[pE]:(e,t)=>e&&t,[vE]:(e,t)=>e&&t,[hE]:(e,t)=>e&&Vt(t),[mE]:(e,t,n)=>e&&t&&n},wq={click:(e,t)=>!!(e&&t),drop:(e,t)=>!!(e&&t),toggle:e=>!!e,check:(e,t)=>e&&Vt(t)};function Cq(e,t){const n=A(new Set),a=A(new Set),{emit:o}=vt();fe([()=>t.value,()=>e.defaultCheckedKeys],()=>Ae(()=>{b(e.defaultCheckedKeys)}),{immediate:!0});const l=()=>{if(!t.value||!e.showCheckbox||e.checkStrictly)return;const{levelTreeNodeMap:w,maxLevel:C}=t.value,k=n.value,E=new Set;for(let T=C;T>=1;--T){const $=w.get(T);$&&$.forEach(N=>{const O=N.children;let _=!N.isLeaf||N.disabled||k.has(N.key);if(O){let P=!0,D=!1;for(const W of O){const U=W.key;if(W.isEffectivelyChecked||(_=!1),k.has(U))D=!0;else if(E.has(U)){P=!1,D=!0;break}else P=!1}P?k.add(N.key):D?(E.add(N.key),k.delete(N.key)):(k.delete(N.key),E.delete(N.key))}N.isEffectivelyChecked=_})}a.value=E},s=w=>n.value.has(w.key),r=w=>a.value.has(w.key),u=(w,C,k=!0,E=!0)=>{const T=n.value,$=w.children;!e.checkStrictly&&k&&($!=null&&$.length)&&(C=$.some(O=>!O.isEffectivelyChecked));const N=(O,_)=>{T[_?n0.ADD:n0.DELETE](O.key);const P=O.children;!e.checkStrictly&&P&&P.forEach(D=>{(!D.disabled||D.children)&&N(D,_)})};N(w,C),E&&l(),k&&c(w,C)},c=(w,C)=>{const{checkedNodes:k,checkedKeys:E}=v(),{halfCheckedNodes:T,halfCheckedKeys:$}=h();o(vE,w.data,{checkedKeys:E,checkedNodes:k,halfCheckedKeys:$,halfCheckedNodes:T}),o(hE,w.data,C)};function d(w=!1){return v(w).checkedKeys}function f(w=!1){return v(w).checkedNodes}function p(){return h().halfCheckedKeys}function g(){return h().halfCheckedNodes}function v(w=!1){const C=[],k=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:E}=t.value;n.value.forEach(T=>{const $=E.get(T);$&&(!w||w&&$.isLeaf)&&(k.push(T),C.push($.data))})}return{checkedKeys:k,checkedNodes:C}}function h(){const w=[],C=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:k}=t.value;a.value.forEach(E=>{const T=k.get(E);T&&(C.push(E),w.push(T.data))})}return{halfCheckedNodes:w,halfCheckedKeys:C}}function m(w){n.value.clear(),a.value.clear(),Ae(()=>{b(w)})}function y(w,C){if(t!=null&&t.value&&e.showCheckbox){const k=t.value.treeNodeMap.get(w);k&&u(k,C,!1)}}function b(w){if(t!=null&&t.value){const{treeNodeMap:C}=t.value;if(e.showCheckbox&&C&&(w==null?void 0:w.length)>0){for(const k of w){const E=C.get(k);E&&!s(E)&&u(E,!0,!1,!1)}l()}}}return{updateCheckedKeys:l,toggleCheckbox:u,isChecked:s,isIndeterminate:r,getCheckedKeys:d,getCheckedNodes:f,getHalfCheckedKeys:p,getHalfCheckedNodes:g,setChecked:y,setCheckedKeys:m}}function Sq(e,t){const n=A(new Set([])),a=A(new Set([])),o=S(()=>ze(e.filterMethod));function l(r){var h;if(!o.value)return;const u=new Set,c=a.value,d=n.value,f=[],p=((h=t.value)==null?void 0:h.treeNodes)||[],g=e.filterMethod;d.clear();function v(m){m.forEach(y=>{f.push(y),g!=null&&g(r,y.data,y)?f.forEach(w=>{u.add(w.key),w.expanded=!0}):(y.expanded=!1,y.isLeaf&&d.add(y.key));const b=y.children;if(b&&v(b),!y.isLeaf){if(!u.has(y.key))d.add(y.key);else if(b){let w=!0;for(const C of b)if(!d.has(C.key)){w=!1;break}w?c.add(y.key):c.delete(y.key)}}f.pop()})}return v(p),u}function s(r){return a.value.has(r.key)}return{hiddenExpandIconKeySet:a,hiddenNodeKeySet:n,doFilter:l,isForceHiddenExpandIcon:s}}function kq(e,t){const n=A(new Set),a=A(),o=Wt(),l=A(),{isIndeterminate:s,isChecked:r,toggleCheckbox:u,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:p,setChecked:g,setCheckedKeys:v}=Cq(e,o),{doFilter:h,hiddenNodeKeySet:m,isForceHiddenExpandIcon:y}=Sq(e,o),b=S(()=>{var G;return((G=e.props)==null?void 0:G.value)||Uo.KEY}),w=S(()=>{var G;return((G=e.props)==null?void 0:G.children)||Uo.CHILDREN}),C=S(()=>{var G;return((G=e.props)==null?void 0:G.disabled)||Uo.DISABLED}),k=S(()=>{var G;return((G=e.props)==null?void 0:G.label)||Uo.LABEL}),E=S(()=>{var ge;const G=n.value,V=m.value,Z=[],oe=((ge=o.value)==null?void 0:ge.treeNodes)||[],ce=[];for(let me=oe.length-1;me>=0;--me)ce.push(oe[me]);for(;ce.length;){const me=ce.pop();if(!V.has(me.key)&&(Z.push(me),me.children&&G.has(me.key)))for(let Me=me.children.length-1;Me>=0;--Me)ce.push(me.children[Me])}return Z}),T=S(()=>E.value.length>0);function $(G){const V=new Map,Z=new Map;let oe=1;function ce(me,Me=1,Ie=void 0){var ye;const Re=[];for(const Te of me){const we=_(Te),Pe={level:Me,key:we,data:Te};Pe.label=D(Te),Pe.parent=Ie;const Ve=O(Te);Pe.disabled=P(Te),Pe.isLeaf=!Ve||Ve.length===0,Pe.expanded=n.value.has(we),Ve&&Ve.length&&(Pe.children=ce(Ve,Me+1,Pe)),Re.push(Pe),V.set(we,Pe),Z.has(Me)||Z.set(Me,[]),(ye=Z.get(Me))==null||ye.push(Pe)}return Me>oe&&(oe=Me),Re}const ge=ce(G);return{treeNodeMap:V,levelTreeNodeMap:Z,maxLevel:oe,treeNodes:ge}}function N(G){const V=h(G);V&&(n.value=V)}function O(G){return G[w.value]}function _(G){return G?G[b.value]:""}function P(G){return G[C.value]}function D(G){return G[k.value]}function W(G){n.value.has(G.key)?H(G):z(G)}function U(G){const V=new Set,Z=o.value.treeNodeMap;n.value.forEach(oe=>{const ce=Z.get(oe);ce&&(ce.expanded=!1)}),G.forEach(oe=>{let ce=Z.get(oe);for(;ce&&!V.has(ce.key);)V.add(ce.key),ce.expanded=!0,ce=ce.parent}),n.value=V}function F(G,V){t(uE,G.data,G,V),I(G),e.expandOnClickNode&&W(G),e.showCheckbox&&(e.checkOnClickNode||G.isLeaf&&e.checkOnClickLeaf)&&!G.disabled&&u(G,!r(G),!0)}function R(G,V){t(cE,G.data,G,V)}function I(G){q(G)||(a.value=G.key,t(pE,G.data,G))}function L(G,V){u(G,V)}function z(G){const V=n.value;if(o.value&&e.accordion){const{treeNodeMap:oe}=o.value;V.forEach(ce=>{const ge=oe.get(ce);G&&G.level===(ge==null?void 0:ge.level)&&(V.delete(ce),ge.expanded=!1)})}V.add(G.key);const Z=de(G.key);Z&&(Z.expanded=!0,t(dE,Z.data,Z))}function H(G){n.value.delete(G.key);const V=de(G.key);V&&(V.expanded=!1,t(fE,V.data,V))}function K(G){return!!G.disabled}function q(G){const V=a.value;return V!==void 0&&V===G.key}function Q(){var G,V;if(a.value)return(V=(G=o.value)==null?void 0:G.treeNodeMap.get(a.value))==null?void 0:V.data}function ee(){return a.value}function ue(G){a.value=G}function te(G){o.value=$(G)}function de(G){var Z;const V=ot(G)?_(G):G;return(Z=o.value)==null?void 0:Z.treeNodeMap.get(V)}function se(G,V="auto"){const Z=de(G);Z&&l.value&&l.value.scrollToItem(E.value.indexOf(Z),V)}function Y(G){var V;(V=l.value)==null||V.scrollTo(G)}return fe(()=>e.currentNodeKey,G=>{a.value=G},{immediate:!0}),fe(()=>e.defaultExpandedKeys,G=>{U(G||[])}),fe(()=>e.data,G=>{te(G),U(e.defaultExpandedKeys||[])},{immediate:!0}),{tree:o,flattenTree:E,isNotEmpty:T,listRef:l,getKey:_,getChildren:O,toggleExpand:W,toggleCheckbox:u,isChecked:r,isIndeterminate:s,isDisabled:K,isCurrent:q,isForceHiddenExpandIcon:y,handleNodeClick:F,handleNodeDrop:R,handleNodeCheck:L,getCurrentNode:Q,getCurrentKey:ee,setCurrentKey:ue,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:p,setChecked:g,setCheckedKeys:v,filter:N,setData:te,getNode:de,expandNode:z,collapseNode:H,setExpandedKeys:U,scrollToNode:se,scrollTo:Y}}var Eq=ie({name:"ElTreeNodeContent",props:yq,setup(e){const t=_e(Cm),n=he("tree");return()=>{const a=e.node,{data:o}=a;return t!=null&&t.ctx.slots.default?t.ctx.slots.default({node:a,data:o}):Ye(mm,{tag:"span",truncated:!0,class:n.be("node","label")},()=>[a==null?void 0:a.label])}}});const xq=["aria-expanded","aria-disabled","aria-checked","data-key"];var Tq=ie({name:"ElTreeNode",__name:"tree-node",props:gq,emits:wq,setup(e,{emit:t}){const n=e,a=t,o=_e(Cm),l=he("tree"),s=S(()=>(o==null?void 0:o.props.indent)??16),r=S(()=>(o==null?void 0:o.props.icon)??eS),u=v=>{var y;const h=(y=o==null?void 0:o.props.props)==null?void 0:y.class;if(!h)return{};let m;if(ze(h)){const{data:b}=v;m=h(b,v)}else m=h;return De(m)?{[m]:!0}:m},c=v=>{a("click",n.node,v)},d=v=>{a("drop",n.node,v)},f=()=>{a("toggle",n.node)},p=v=>{a("check",n.node,v)},g=v=>{var h,m,y,b;(y=(m=(h=o==null?void 0:o.instance)==null?void 0:h.vnode)==null?void 0:m.props)!=null&&y.onNodeContextmenu&&(v.stopPropagation(),v.preventDefault()),o==null||o.ctx.emit(mE,v,(b=n.node)==null?void 0:b.data,n.node)};return(v,h)=>{var m,y,b;return x(),B("div",{ref:"node$",class:M([i(l).b("node"),i(l).is("expanded",e.expanded),i(l).is("current",e.current),i(l).is("focusable",!e.disabled),i(l).is("checked",!e.disabled&&e.checked),u(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.disabled,"aria-checked":e.checked,"data-key":(m=e.node)==null?void 0:m.key,onClick:Xe(c,["stop"]),onContextmenu:g,onDragover:h[1]||(h[1]=Xe(()=>{},["prevent"])),onDragenter:h[2]||(h[2]=Xe(()=>{},["prevent"])),onDrop:Xe(d,["stop"])},[j("div",{class:M(i(l).be("node","content")),style:je({paddingLeft:`${(e.node.level-1)*s.value}px`,height:e.itemSize+"px"})},[r.value?(x(),re(i(Be),{key:0,class:M([i(l).is("leaf",!!((y=e.node)!=null&&y.isLeaf)),i(l).is("hidden",e.hiddenExpandIcon),{expanded:!((b=e.node)!=null&&b.isLeaf)&&e.expanded},i(l).be("node","expand-icon")]),onClick:Xe(f,["stop"])},{default:ne(()=>[(x(),re(ct(r.value)))]),_:1},8,["class"])):le("v-if",!0),e.showCheckbox?(x(),re(i(Za),{key:1,"model-value":e.checked,indeterminate:e.indeterminate,disabled:e.disabled,onChange:p,onClick:h[0]||(h[0]=Xe(()=>{},["stop"]))},null,8,["model-value","indeterminate","disabled"])):le("v-if",!0),J(i(Eq),{node:{...e.node,expanded:e.expanded}},null,8,["node"])],6)],42,xq)}}}),$q=Tq,Oq=ie({name:"ElTreeV2",__name:"tree",props:mq,emits:bq,setup(e,{expose:t,emit:n}){const a=e,o=n,l=fn(),s=S(()=>a.itemSize);bt(Cm,{ctx:{emit:o,slots:l},props:a,instance:vt()}),bt(No,void 0);const{t:r}=Et(),u=he("tree"),{flattenTree:c,isNotEmpty:d,listRef:f,toggleExpand:p,isIndeterminate:g,isChecked:v,isDisabled:h,isCurrent:m,isForceHiddenExpandIcon:y,handleNodeClick:b,handleNodeDrop:w,handleNodeCheck:C,toggleCheckbox:k,getCurrentNode:E,getCurrentKey:T,setCurrentKey:$,getCheckedKeys:N,getCheckedNodes:O,getHalfCheckedKeys:_,getHalfCheckedNodes:P,setChecked:D,setCheckedKeys:W,filter:U,setData:F,getNode:R,expandNode:I,collapseNode:L,setExpandedKeys:z,scrollToNode:H,scrollTo:K}=kq(a,o);return t({toggleCheckbox:k,getCurrentNode:E,getCurrentKey:T,setCurrentKey:$,getCheckedKeys:N,getCheckedNodes:O,getHalfCheckedKeys:_,getHalfCheckedNodes:P,setChecked:D,setCheckedKeys:W,filter:U,setData:F,getNode:R,expandNode:I,collapseNode:L,setExpandedKeys:z,scrollToNode:H,scrollTo:K}),(q,Q)=>(x(),B("div",{class:M([i(u).b(),{[i(u).m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[i(d)?(x(),re(i(bk),{key:0,ref_key:"listRef",ref:f,"class-name":i(u).b("virtual-list"),data:i(c),total:i(c).length,height:e.height,"item-size":s.value,"perf-mode":e.perfMode,"scrollbar-always-on":e.scrollbarAlwaysOn},{default:ne(({data:ee,index:ue,style:te})=>[(x(),re($q,{key:ee[ue].key,style:je(te),node:ee[ue],expanded:ee[ue].expanded,"show-checkbox":e.showCheckbox,checked:i(v)(ee[ue]),indeterminate:i(g)(ee[ue]),"item-size":s.value,disabled:i(h)(ee[ue]),current:i(m)(ee[ue]),"hidden-expand-icon":i(y)(ee[ue]),onClick:i(b),onToggle:i(p),onCheck:i(C),onDrop:i(w)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck","onDrop"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode","scrollbar-always-on"])):(x(),B("div",{key:1,class:M(i(u).e("empty-block"))},[ae(q.$slots,"empty",{},()=>[j("span",{class:M(i(u).e("empty-text"))},ke(e.emptyText??i(r)("el.tree.emptyText")),3)])],2))],2))}}),Nq=Oq;const Mq=rt(Nq),Rq="ElUpload";var Iq=class extends Error{constructor(e,t,n,a){super(e),this.name="UploadAjaxError",this.status=t,this.method=n,this.url=a}};function a0(e,t,n){let a;return n.response?a=`${n.response.error||n.response}`:n.responseText?a=`${n.responseText}`:a=`fail to ${t.method} ${e} ${n.status}`,new Iq(a,n.status,t.method,e)}function _q(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const Pq=e=>{typeof XMLHttpRequest>"u"&&Jt(Rq,"XMLHttpRequest is undefined");const t=new XMLHttpRequest,n=e.action;t.upload&&t.upload.addEventListener("progress",l=>{const s=l;s.percent=l.total>0?l.loaded/l.total*100:0,e.onProgress(s)});const a=new FormData;if(e.data)for(const[l,s]of Object.entries(e.data))be(s)?s.length===2&&s[0]instanceof Blob&&De(s[1])?a.append(l,s[0],s[1]):s.forEach(r=>{a.append(l,r)}):a.append(l,s);a.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(a0(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(a0(n,e,t));e.onSuccess(_q(t))}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const o=e.headers||{};if(o instanceof Headers)o.forEach((l,s)=>t.setRequestHeader(s,l));else for(const[l,s]of Object.entries(o))hn(s)||t.setRequestHeader(l,String(s));return t.send(a),t},gE=["text","picture","picture-card"];let Aq=1;const pv=()=>Date.now()+Aq++,yE=Se({action:{type:String,default:"#"},headers:{type:X(Object)},method:{type:String,default:"post"},data:{type:X([Object,Function,Promise]),default:()=>nn({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:X(Array),default:()=>nn([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:gE,default:"text"},httpRequest:{type:X(Function),default:Pq},disabled:{type:Boolean,default:void 0},limit:Number,directory:Boolean}),Lq=Se({...yE,beforeUpload:{type:X(Function),default:_t},beforeRemove:{type:X(Function)},onRemove:{type:X(Function),default:_t},onChange:{type:X(Function),default:_t},onPreview:{type:X(Function),default:_t},onSuccess:{type:X(Function),default:_t},onProgress:{type:X(Function),default:_t},onError:{type:X(Function),default:_t},onExceed:{type:X(Function),default:_t},crossorigin:{type:X(String)}}),bE=Symbol("uploadContextKey"),Dq=Se({files:{type:X(Array),default:()=>nn([])},disabled:{type:Boolean,default:void 0},handlePreview:{type:X(Function),default:_t},listType:{type:String,values:gE,default:"text"},crossorigin:{type:X(String)}}),Vq={remove:e=>!!e},Bq=Se({...yE,beforeUpload:{type:X(Function),default:_t},onRemove:{type:X(Function),default:_t},onStart:{type:X(Function),default:_t},onSuccess:{type:X(Function),default:_t},onProgress:{type:X(Function),default:_t},onError:{type:X(Function),default:_t},onExceed:{type:X(Function),default:_t}}),Fq=Se({disabled:{type:Boolean,default:void 0},directory:Boolean}),zq={file:e=>be(e)},Hq=["tabindex","aria-disabled","onKeydown"],Kq=["src","crossorigin"],Wq=["onClick"],jq=["title"],Uq=["onClick"],Yq=["onClick"];var qq=ie({name:"ElUploadList",__name:"upload-list",props:Dq,emits:Vq,setup(e,{emit:t}){const n=e,a=t,{t:o}=Et(),l=he("upload"),s=he("icon"),r=he("list"),u=on(),c=A(!1),d=S(()=>[l.b("list"),l.bm("list",n.listType),l.is("disabled",u.value)]),f=p=>{a("remove",p)};return(p,g)=>(x(),re(Z1,{tag:"ul",class:M(d.value),name:i(r).b()},{default:ne(()=>[(x(!0),B(He,null,Ct(e.files,(v,h)=>(x(),B("li",{key:v.uid||v.name,class:M([i(l).be("list","item"),i(l).is(v.status),{focusing:c.value}]),tabindex:i(u)?void 0:0,"aria-disabled":i(u),role:"button",onKeydown:en(m=>!i(u)&&f(v),["delete"]),onFocus:g[0]||(g[0]=m=>c.value=!0),onBlur:g[1]||(g[1]=m=>c.value=!1),onClick:g[2]||(g[2]=m=>c.value=!1)},[ae(p.$slots,"default",{file:v,index:h},()=>[e.listType==="picture"||v.status!=="uploading"&&e.listType==="picture-card"?(x(),B("img",{key:0,class:M(i(l).be("list","item-thumbnail")),src:v.url,crossorigin:e.crossorigin,alt:""},null,10,Kq)):le("v-if",!0),v.status==="uploading"||e.listType!=="picture-card"?(x(),B("div",{key:1,class:M(i(l).be("list","item-info"))},[j("a",{class:M(i(l).be("list","item-name")),onClick:Xe(m=>e.handlePreview(v),["prevent"])},[J(i(Be),{class:M(i(s).m("document"))},{default:ne(()=>[J(i(OP))]),_:1},8,["class"]),j("span",{class:M(i(l).be("list","item-file-name")),title:v.name},ke(v.name),11,jq)],10,Wq),v.status==="uploading"?(x(),re(i(ik),{key:0,type:e.listType==="picture-card"?"circle":"line","stroke-width":e.listType==="picture-card"?6:2,percentage:Number(v.percentage),style:je(e.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):le("v-if",!0)],2)):le("v-if",!0),j("label",{class:M(i(l).be("list","item-status-label"))},[e.listType==="text"?(x(),re(i(Be),{key:0,class:M([i(s).m("upload-success"),i(s).m("circle-check")])},{default:ne(()=>[J(i(Eh))]),_:1},8,["class"])):["picture-card","picture"].includes(e.listType)?(x(),re(i(Be),{key:1,class:M([i(s).m("upload-success"),i(s).m("check")])},{default:ne(()=>[J(i(yu))]),_:1},8,["class"])):le("v-if",!0)],2),i(u)?le("v-if",!0):(x(),re(i(Be),{key:2,class:M(i(s).m("close")),"aria-label":i(o)("el.upload.delete"),role:"button",tabindex:"0",onClick:m=>f(v),onKeydown:en(Xe(m=>f(v),["prevent"]),["enter","space"])},{default:ne(()=>[J(i(La))]),_:1},8,["class","aria-label","onClick","onKeydown"])),i(u)?le("v-if",!0):(x(),B("i",{key:3,class:M(i(s).m("close-tip"))},ke(i(o)("el.upload.deleteTip")),3)),e.listType==="picture-card"?(x(),B("span",{key:4,class:M(i(l).be("list","item-actions"))},[j("span",{class:M(i(l).be("list","item-preview")),onClick:m=>e.handlePreview(v)},[J(i(Be),{class:M(i(s).m("zoom-in"))},{default:ne(()=>[J(i(oS))]),_:1},8,["class"])],10,Uq),i(u)?le("v-if",!0):(x(),B("span",{key:0,class:M(i(l).be("list","item-delete")),onClick:m=>f(v)},[J(i(Be),{class:M(i(s).m("delete"))},{default:ne(()=>[J(i(xP))]),_:1},8,["class"])],10,Yq))],2)):le("v-if",!0)])],42,Hq))),128)),ae(p.$slots,"append")]),_:3},8,["class","name"]))}}),o0=qq;const l0="ElUploadDrag";var Gq=ie({name:l0,__name:"upload-dragger",props:Fq,emits:zq,setup(e,{emit:t}){const n=e,a=t;_e(bE)||Jt(l0,"usage: ");const o=he("upload"),l=A(!1),s=on(),r=p=>new Promise((g,v)=>p.file(g,v)),u=async p=>{try{if(p.isFile){const g=await r(p);return g.isDirectory=!1,[g]}if(p.isDirectory){const g=p.createReader(),v=()=>new Promise((b,w)=>g.readEntries(b,w)),h=[];let m=await v();for(;m.length>0;)h.push(...m),m=await v();const y=h.map(b=>u(b).catch(()=>[]));return Oc(await Promise.all(y))}}catch{return[]}return[]},c=async p=>{if(s.value)return;l.value=!1,p.stopPropagation();const g=Array.from(p.dataTransfer.files),v=p.dataTransfer.items||[];if(n.directory){const h=Array.from(v).map(m=>{var y;return(y=m==null?void 0:m.webkitGetAsEntry)==null?void 0:y.call(m)}).filter(m=>m);a("file",Oc(await Promise.all(h.map(u))));return}g.forEach((h,m)=>{var b,w;const y=(w=(b=v[m])==null?void 0:b.webkitGetAsEntry)==null?void 0:w.call(b);y&&(h.isDirectory=y.isDirectory)}),a("file",g)},d=()=>{s.value||(l.value=!0)},f=p=>{p.currentTarget.contains(p.relatedTarget)||(l.value=!1)};return(p,g)=>(x(),B("div",{class:M([i(o).b("dragger"),i(o).is("dragover",l.value)]),onDrop:Xe(c,["prevent"]),onDragover:Xe(d,["prevent"]),onDragleave:Xe(f,["prevent"])},[ae(p.$slots,"default")],34))}}),Xq=Gq;const Zq=["tabindex","aria-disabled","onKeydown"],Jq=["name","disabled","multiple","accept","webkitdirectory"];var Qq=ie({name:"ElUploadContent",inheritAttrs:!1,__name:"upload-content",props:Bq,setup(e,{expose:t}){const n=e,a=he("upload"),o=on(),l=Wt({}),s=Wt(),r=h=>{if(h.length===0)return;const{autoUpload:m,limit:y,fileList:b,multiple:w,onStart:C,onExceed:k}=n;if(y&&b.length+h.length>y){k(h,b);return}w||(h=h.slice(0,1));for(const E of h){const T=E;T.uid=pv(),C(T),m&&u(T)}},u=async h=>{if(s.value.value="",!n.beforeUpload)return d(h);let m,y={};try{const w=n.data,C=n.beforeUpload(h);y=bi(n.data)?mo(n.data):n.data,m=await C,bi(n.data)&&tn(w,y)&&(y=mo(n.data))}catch{m=!1}if(m===!1){n.onRemove(h);return}let b=h;m instanceof Blob&&(m instanceof File?b=m:b=new File([m],h.name,{type:h.type})),d(Object.assign(b,{uid:h.uid}),y)},c=async(h,m)=>ze(h)?h(m):h,d=async(h,m)=>{const{headers:y,data:b,method:w,withCredentials:C,name:k,action:E,onProgress:T,onSuccess:$,onError:N,httpRequest:O}=n;try{m=await c(m??b,h)}catch{n.onRemove(h);return}const{uid:_}=h,P={headers:y||{},withCredentials:C,file:h,data:m,method:w,filename:k,action:E,onProgress:W=>{T(W,h)},onSuccess:W=>{$(W,h),delete l.value[_]},onError:W=>{N(W,h),delete l.value[_]}},D=O(P);l.value[_]=D,D instanceof Promise&&D.then(P.onSuccess,P.onError)},f=h=>{const m=h.target.files;m&&r(Array.from(m))},p=()=>{o.value||(s.value.value="",s.value.click())},g=()=>{p()};return t({abort:h=>{dC(l.value).filter(h?([m])=>String(h.uid)===m:()=>!0).forEach(([m,y])=>{y instanceof XMLHttpRequest&&y.abort(),delete l.value[m]})},upload:u}),(h,m)=>(x(),B("div",{class:M([i(a).b(),i(a).m(e.listType),i(a).is("drag",e.drag),i(a).is("disabled",i(o))]),tabindex:i(o)?void 0:0,"aria-disabled":i(o),role:"button",onClick:p,onKeydown:en(Xe(g,["self"]),["enter","space"])},[e.drag?(x(),re(Xq,{key:0,disabled:i(o),directory:e.directory,onFile:r},{default:ne(()=>[ae(h.$slots,"default")]),_:3},8,["disabled","directory"])):ae(h.$slots,"default",{key:1}),j("input",{ref_key:"inputRef",ref:s,class:M(i(a).e("input")),name:e.name,disabled:i(o),multiple:e.multiple,accept:e.accept,webkitdirectory:e.directory||void 0,type:"file",onChange:f,onClick:m[0]||(m[0]=Xe(()=>{},["stop"]))},null,42,Jq)],42,Zq))}}),s0=Qq;const r0="ElUpload",i0=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},eG=(e,t)=>{const n=fw(e,"fileList",void 0,{passive:!0}),a=v=>n.value.find(h=>h.uid===v.uid);function o(v){var h;(h=t.value)==null||h.abort(v)}function l(v=["ready","uploading","success","fail"]){n.value=n.value.filter(h=>!v.includes(h.status))}function s(v){n.value=n.value.filter(h=>h.uid!==v.uid)}const r=v=>{Ae(()=>e.onChange(v,n.value))},u=(v,h)=>{const m=a(h);m&&(console.error(v),m.status="fail",s(m),e.onError(v,m,n.value),r(m))},c=(v,h)=>{const m=a(h);m&&(e.onProgress(v,m,n.value),m.status="uploading",m.percentage=Math.round(v.percent))},d=(v,h)=>{const m=a(h);m&&(m.status="success",m.response=v,e.onSuccess(v,m,n.value),r(m))},f=v=>{hn(v.uid)&&(v.uid=pv());const h={name:v.name,percentage:0,status:"ready",size:v.size,raw:v,uid:v.uid};if(e.listType==="picture-card"||e.listType==="picture")try{h.url=URL.createObjectURL(v)}catch(m){ft(r0,m.message),e.onError(m,h,n.value)}n.value=[...n.value,h],r(h)},p=async v=>{const h=v instanceof File?a(v):v;h||Jt(r0,"file to be removed not found");const m=y=>{o(y),s(y),e.onRemove(y,n.value),i0(y)};e.beforeRemove?await e.beforeRemove(h,n.value)!==!1&&m(h):m(h)};function g(){n.value.filter(({status:v})=>v==="ready").forEach(({raw:v})=>{var h;return v&&((h=t.value)==null?void 0:h.upload(v))})}return fe(()=>e.listType,v=>{v!=="picture-card"&&v!=="picture"||(n.value=n.value.map(h=>{const{raw:m,url:y}=h;if(!y&&m)try{h.url=URL.createObjectURL(m)}catch(b){e.onError(b,h,n.value)}return h}))}),fe(n,v=>{for(const h of v)h.uid||(h.uid=pv()),h.status||(h.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:o,clearFiles:l,handleError:u,handleProgress:c,handleStart:f,handleSuccess:d,handleRemove:p,submit:g,revokeFileObjectURL:i0}};var tG=ie({name:"ElUpload",__name:"upload",props:Lq,setup(e,{expose:t}){const n=e,a=on(),o=Wt(),{abort:l,submit:s,clearFiles:r,uploadFiles:u,handleStart:c,handleError:d,handleRemove:f,handleSuccess:p,handleProgress:g,revokeFileObjectURL:v}=eG(n,o),h=S(()=>n.listType==="picture-card"),m=S(()=>({...n,fileList:u.value,onStart:c,onProgress:g,onSuccess:p,onError:d,onRemove:f}));return Pt(()=>{u.value.forEach(v)}),bt(bE,{accept:Lt(n,"accept")}),t({abort:l,submit:s,clearFiles:r,handleStart:c,handleRemove:f}),(y,b)=>(x(),B("div",null,[h.value&&e.showFileList?(x(),re(o0,{key:0,disabled:i(a),"list-type":e.listType,files:i(u),crossorigin:e.crossorigin,"handle-preview":e.onPreview,onRemove:i(f)},ra({append:ne(()=>[J(s0,pt({ref_key:"uploadRef",ref:o},m.value),{default:ne(()=>[y.$slots.trigger?ae(y.$slots,"trigger",{key:0}):le("v-if",!0),!y.$slots.trigger&&y.$slots.default?ae(y.$slots,"default",{key:1}):le("v-if",!0)]),_:3},16)]),_:2},[y.$slots.file?{name:"default",fn:ne(({file:w,index:C})=>[ae(y.$slots,"file",{file:w,index:C})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):le("v-if",!0),!h.value||h.value&&!e.showFileList?(x(),re(s0,pt({key:1,ref_key:"uploadRef",ref:o},m.value),{default:ne(()=>[y.$slots.trigger?ae(y.$slots,"trigger",{key:0}):le("v-if",!0),!y.$slots.trigger&&y.$slots.default?ae(y.$slots,"default",{key:1}):le("v-if",!0)]),_:3},16)):le("v-if",!0),y.$slots.trigger?ae(y.$slots,"default",{key:2}):le("v-if",!0),ae(y.$slots,"tip"),!h.value&&e.showFileList?(x(),re(o0,{key:3,disabled:i(a),"list-type":e.listType,files:i(u),crossorigin:e.crossorigin,"handle-preview":e.onPreview,onRemove:i(f)},ra({_:2},[y.$slots.file?{name:"default",fn:ne(({file:w,index:C})=>[ae(y.$slots,"file",{file:w,index:C})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):le("v-if",!0)]))}}),nG=tG;const aG=rt(nG),oG=Se({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:X([String,Array]),default:"Element Plus"},font:{type:X(Object)},gap:{type:X(Array),default:()=>[100,100]},offset:{type:X(Array)}});function lG(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function sG(e){return Object.keys(e).map(t=>`${lG(t)}: ${e[t]};`).join(" ")}function rG(){return window.devicePixelRatio||1}const iG=(e,t)=>{let n=!1;return e.removedNodes.length&&t&&(n=Array.from(e.removedNodes).includes(t)),e.type==="attributes"&&e.target===t&&(n=!0),n},uG={left:[0,.5],start:[0,.5],center:[.5,0],right:[1,-.5],end:[1,-.5]};function Wf(e,t,n=1){const a=document.createElement("canvas"),o=a.getContext("2d"),l=e*n,s=t*n;return a.setAttribute("width",`${l}px`),a.setAttribute("height",`${s}px`),o.save(),[o,a,l,s]}function cG(){function e(t,n,a,o,l,s,r,u,c){const[d,f,p,g]=Wf(o,l,a);let v=0;if(t instanceof HTMLImageElement)d.drawImage(t,0,0,p,g);else{const{color:K,fontSize:q,fontStyle:Q,fontWeight:ee,fontFamily:ue,textAlign:te,textBaseline:de}=s,se=Number(q)*a;d.font=`${Q} normal ${ee} ${se}px/${l}px ${ue}`,d.fillStyle=K,d.textAlign=te,d.textBaseline=de;const Y=be(t)?t:[t];if(de!=="top"&&Y[0]){const G=d.measureText(Y[0]);d.textBaseline="top";const V=d.measureText(Y[0]);v=G.actualBoundingBoxAscent-V.actualBoundingBoxAscent}Y==null||Y.forEach((G,V)=>{const[Z,oe]=uG[te];d.fillText(G??"",p*Z+c*oe,V*(se+s.fontGap*a))})}const h=Math.PI/180*Number(n),m=Math.max(o,l),[y,b,w]=Wf(m,m,a);y.translate(w/2,w/2),y.rotate(h),p>0&&g>0&&y.drawImage(f,-p/2,-g/2);function C(K,q){return[K*Math.cos(h)-q*Math.sin(h),K*Math.sin(h)+q*Math.cos(h)]}let k=0,E=0,T=0,$=0;const N=p/2,O=g/2;[[0-N,0-O],[0+N,0-O],[0+N,0+O],[0-N,0+O]].forEach(([K,q])=>{const[Q,ee]=C(K,q);k=Math.min(k,Q),E=Math.max(E,Q),T=Math.min(T,ee),$=Math.max($,ee)});const _=k+w/2,P=T+w/2,D=E-k,W=$-T,U=r*a,F=u*a,R=(D+U)*2,I=W+F,[L,z]=Wf(R,I);function H(K=0,q=0){L.drawImage(b,_,P,D,W,K,q+v,D,W)}return H(),H(D+U,-W/2-F/2),H(D+U,+W/2+F/2),[z.toDataURL(),R/a,I/a]}return e}var dG=ie({name:"ElWatermark",__name:"watermark",props:oG,setup(e){const t={position:"relative"},n=e,a=S(()=>{var _;return((_=n.font)==null?void 0:_.fontGap)??3}),o=S(()=>{var _;return((_=n.font)==null?void 0:_.color)??"rgba(0,0,0,.15)"}),l=S(()=>{var _;return((_=n.font)==null?void 0:_.fontSize)??16}),s=S(()=>{var _;return((_=n.font)==null?void 0:_.fontWeight)??"normal"}),r=S(()=>{var _;return((_=n.font)==null?void 0:_.fontStyle)??"normal"}),u=S(()=>{var _;return((_=n.font)==null?void 0:_.fontFamily)??"sans-serif"}),c=S(()=>{var _;return((_=n.font)==null?void 0:_.textAlign)??"center"}),d=S(()=>{var _;return((_=n.font)==null?void 0:_.textBaseline)??"hanging"}),f=S(()=>n.gap[0]),p=S(()=>n.gap[1]),g=S(()=>f.value/2),v=S(()=>p.value/2),h=S(()=>{var _;return((_=n.offset)==null?void 0:_[0])??g.value}),m=S(()=>{var _;return((_=n.offset)==null?void 0:_[1])??v.value}),y=()=>{const _={zIndex:n.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let P=h.value-g.value,D=m.value-v.value;return P>0&&(_.left=`${P}px`,_.width=`calc(100% - ${P}px)`,P=0),D>0&&(_.top=`${D}px`,_.height=`calc(100% - ${D}px)`,D=0),_.backgroundPosition=`${P}px ${D}px`,_},b=Wt(null),w=Wt(),C=A(!1),k=()=>{w.value&&(w.value.remove(),w.value=void 0)},E=(_,P)=>{var D;b.value&&w.value&&(C.value=!0,w.value.setAttribute("style",sG({...y(),backgroundImage:`url('${_}')`,backgroundSize:`${Math.floor(P)}px`})),(D=b.value)==null||D.append(w.value),setTimeout(()=>{C.value=!1}))},T=_=>{let P=120,D=64,W=0;const{image:U,content:F,width:R,height:I,rotate:L}=n;if(!U&&_.measureText){_.font=`${Number(l.value)}px ${u.value}`;const z=be(F)?F:[F];let H=0,K=0;z.forEach(Q=>{const{width:ee,fontBoundingBoxAscent:ue,fontBoundingBoxDescent:te,actualBoundingBoxAscent:de,actualBoundingBoxDescent:se}=_.measureText(Q),Y=xt(ue)?de+se:ue+te;ee>H&&(H=Math.ceil(ee)),Y>K&&(K=Math.ceil(Y))}),P=H,D=K*z.length+(z.length-1)*a.value;const q=Math.PI/180*Number(L);W=Math.ceil(Math.abs(Math.sin(q)*D)/2),P+=W}return[R??P,I??D,W]},$=cG(),N=()=>{const _=document.createElement("canvas").getContext("2d"),P=n.image,D=n.content,W=n.rotate;if(_){w.value||(w.value=document.createElement("div"));const U=rG(),[F,R,I]=T(_),L=z=>{const[H,K]=$(z||"",W,U,F,R,{color:o.value,fontSize:l.value,fontStyle:r.value,fontWeight:s.value,fontFamily:u.value,fontGap:a.value,textAlign:c.value,textBaseline:d.value},f.value,p.value,I);E(H,K)};if(P){const z=new Image;z.onload=()=>{L(z)},z.onerror=()=>{L(D)},z.crossOrigin="anonymous",z.referrerPolicy="no-referrer",z.src=P}else L(D)}};return mt(()=>{N()}),fe(()=>n,()=>{N()},{deep:!0,flush:"post"}),Pt(()=>{k()}),tu(b,_=>{C.value||_.forEach(P=>{iG(P,w.value)&&(k(),N())})},{attributes:!0,subtree:!0,childList:!0}),(_,P)=>(x(),B("div",{ref_key:"containerRef",ref:b,style:je([t])},[ae(_.$slots,"default")],4))}}),fG=dG;const pG=rt(fG),vG=["absolute","fixed"],hG=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],Sm=Se({placement:{type:X(String),values:hG,default:"bottom"},reference:{type:X(Object),default:null},strategy:{type:X(String),values:vG,default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),mG={close:()=>!0},gG=Se({modelValue:Boolean,current:{type:Number,default:0},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:Ft},placement:Sm.placement,contentStyle:{type:X([Object])},mask:{type:X([Boolean,Object]),default:!0},gap:{type:X(Object),default:()=>({offset:6,radius:2})},zIndex:{type:Number},scrollIntoViewOptions:{type:X([Boolean,Object]),default:()=>({block:"center"})},type:{type:X(String)},appendTo:{type:uu.to.type,default:"body"},closeOnPressEscape:{type:Boolean,default:!0},targetAreaClickable:{type:Boolean,default:!0}}),yG={[at]:e=>Vt(e),"update:current":e=>Fe(e),close:e=>Fe(e),finish:()=>!0,change:e=>Fe(e)},bG=Se({target:{type:X([String,Object,Function])},title:String,description:String,showClose:{type:Boolean,default:void 0},closeIcon:{type:Ft},showArrow:{type:Boolean,default:void 0},placement:Sm.placement,mask:{type:X([Boolean,Object]),default:void 0},contentStyle:{type:X([Object])},prevButtonProps:{type:X(Object)},nextButtonProps:{type:X(Object)},scrollIntoViewOptions:{type:X([Boolean,Object]),default:void 0},type:{type:X(String)}}),wG={close:()=>!0},CG=(e,t,n,a,o)=>{const l=A(null),s=()=>{let d;return De(e.value)?d=document.querySelector(e.value):ze(e.value)?d=e.value():d=e.value,d},r=()=>{const d=s();if(!d||!t.value){l.value=null;return}SG(d)||d.scrollIntoView(o.value);const{left:f,top:p,width:g,height:v}=d.getBoundingClientRect();l.value={left:f,top:p,width:g,height:v,radius:0}};mt(()=>{fe([t,e],()=>{r()},{immediate:!0}),window.addEventListener("resize",r)}),Pt(()=>{window.removeEventListener("resize",r)});const u=d=>(be(n.value.offset)?n.value.offset[d]:n.value.offset)??6,c=S(()=>{var g;if(!l.value)return l.value;const d=u(0),f=u(1),p=((g=n.value)==null?void 0:g.radius)||2;return{left:l.value.left-d,top:l.value.top-f,width:l.value.width+d*2,height:l.value.height+f*2,radius:p}});return{mergedPosInfo:c,triggerTarget:S(()=>{const d=s();return!a.value||!d||!window.DOMRect?d||void 0:{getBoundingClientRect(){var f,p,g,v;return window.DOMRect.fromRect({width:((f=c.value)==null?void 0:f.width)||0,height:((p=c.value)==null?void 0:p.height)||0,x:((g=c.value)==null?void 0:g.left)||0,y:((v=c.value)==null?void 0:v.top)||0})}}})}},Ud=Symbol("ElTour");function SG(e){const t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:a,right:o,bottom:l,left:s}=e.getBoundingClientRect();return a>=0&&s>=0&&o<=t&&l<=n}const kG=(e,t,n,a,o,l,s,r)=>{const u=A(),c=A(),d=A({}),f={x:u,y:c,placement:a,strategy:o,middlewareData:d},p=S(()=>{const y=[A_(i(l)),D_(),L_(),EG()];return i(r)&&i(n)&&y.push(V_({element:i(n)})),y}),g=async()=>{if(!Mt)return;const y=i(e),b=i(t);if(!y||!b)return;const w=await B_(y,b,{placement:i(a),strategy:i(o),middleware:i(p)});Ri(f).forEach(C=>{f[C].value=w[C]})},v=S(()=>{if(!i(e))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:i(s)};const{overflow:y}=i(d);return{position:i(o),zIndex:i(s),top:i(c)!=null?`${i(c)}px`:"",left:i(u)!=null?`${i(u)}px`:"",maxWidth:y!=null&&y.maxWidth?`${y==null?void 0:y.maxWidth}px`:""}}),h=S(()=>{if(!i(r))return{};const{arrow:y}=i(d);return{left:(y==null?void 0:y.x)!=null?`${y==null?void 0:y.x}px`:"",top:(y==null?void 0:y.y)!=null?`${y==null?void 0:y.y}px`:""}});let m;return mt(()=>{const y=i(e),b=i(t);y&&b&&(m=__(y,b,g)),sa(()=>{g()})}),Pt(()=>{m&&m()}),{update:g,contentStyle:v,arrowStyle:h}},EG=()=>({name:"overflow",async fn(e){const t=await P_(e);let n=0;return t.left>0&&(n=t.left),t.right>0&&(n=t.right),{data:{maxWidth:e.rects.floating.width-n}}}}),xG=Se({zIndex:{type:Number,default:1001},visible:Boolean,fill:{type:String,default:"rgba(0,0,0,0.5)"},pos:{type:X(Object)},targetAreaClickable:{type:Boolean,default:!0}}),TG={style:{width:"100%",height:"100%"}},$G=["d"];var OG=ie({name:"ElTourMask",inheritAttrs:!1,__name:"mask",props:xG,setup(e){const t=e,{ns:n}=_e(Ud),a=S(()=>{var d;return((d=t.pos)==null?void 0:d.radius)??2}),o=S(()=>{const d=a.value,f=`a${d},${d} 0 0 1`;return{topRight:`${f} ${d},${d}`,bottomRight:`${f} ${-d},${d}`,bottomLeft:`${f} ${-d},${-d}`,topLeft:`${f} ${d},${-d}`}}),{width:l,height:s}=Hv(),r=S(()=>{const d=l.value,f=s.value,p=o.value,g=`M${d},0 L0,0 L0,${f} L${d},${f} L${d},0 Z`,v=a.value;return t.pos?`${g} M${t.pos.left+v},${t.pos.top} h${t.pos.width-v*2} ${p.topRight} v${t.pos.height-v*2} ${p.bottomRight} h${-t.pos.width+v*2} ${p.bottomLeft} v${-t.pos.height+v*2} ${p.topLeft} z`:g}),u=S(()=>({position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:t.zIndex,pointerEvents:t.pos&&t.targetAreaClickable?"none":"auto"})),c=S(()=>({fill:t.fill,pointerEvents:"auto",cursor:"auto"}));return Od(Lt(t,"visible"),{ns:n}),(d,f)=>e.visible?(x(),B("div",pt({key:0,class:i(n).e("mask"),style:u.value},d.$attrs),[(x(),B("svg",TG,[j("path",{class:M(i(n).e("hollow")),style:je(c.value),d:r.value},null,14,$G)]))],16)):le("v-if",!0)}}),NG=OG;const MG=["data-side"];var RG=ie({name:"ElTourContent",__name:"content",props:Sm,emits:mG,setup(e,{emit:t}){const n=e,a=t,o=A(n.placement),l=A(n.strategy),s=A(null),r=A(null);fe(()=>n.placement,()=>{o.value=n.placement});const{contentStyle:u,arrowStyle:c}=kG(Lt(n,"reference"),s,r,o,l,Lt(n,"offset"),Lt(n,"zIndex"),Lt(n,"showArrow")),d=S(()=>o.value.split("-")[0]),{ns:f}=_e(Ud),p=()=>{a("close")},g=v=>{v.detail.focusReason==="pointer"&&v.preventDefault()};return(v,h)=>(x(),B("div",{ref_key:"contentRef",ref:s,style:je(i(u)),class:M(i(f).e("content")),"data-side":d.value,tabindex:"-1"},[J(i(Pr),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":s.value||void 0,onReleaseRequested:p,onFocusoutPrevented:g},{default:ne(()=>[ae(v.$slots,"default")]),_:3},8,["focus-trap-el"]),e.showArrow?(x(),B("span",{key:0,ref_key:"arrowRef",ref:r,style:je(i(c)),class:M(i(f).e("arrow"))},null,6)):le("v-if",!0)],14,MG))}}),IG=RG,_G=ie({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(e,{slots:t,emit:n}){let a=0;return()=>{var u,c;const o=(u=t.default)==null?void 0:u.call(t),l=[];let s=0;function r(d){be(d)&&d.forEach(f=>{var p;((p=(f==null?void 0:f.type)||{})==null?void 0:p.name)==="ElTourStep"&&(l.push(f),s+=1)})}return o.length&&r(wa((c=o[0])==null?void 0:c.children)),a!==s&&(a=s,n("update-total",s)),l.length?l[e.current]:null}}}),PG=ie({name:"ElTour",inheritAttrs:!1,__name:"tour",props:gG,emits:yG,setup(e,{emit:t}){const n=e,a=t,o=he("tour"),l=A(0),s=A(),r=fw(n,"current",a,{passive:!0}),u=S(()=>{var O;return(O=s.value)==null?void 0:O.target}),c=S(()=>[o.b(),y.value==="primary"?o.m("primary"):""]),d=S(()=>{var O;return((O=s.value)==null?void 0:O.placement)||n.placement}),f=S(()=>{var O;return((O=s.value)==null?void 0:O.contentStyle)??n.contentStyle}),p=S(()=>{var O;return((O=s.value)==null?void 0:O.mask)??n.mask}),g=S(()=>!!p.value&&n.modelValue),v=S(()=>Vt(p.value)?void 0:p.value),h=S(()=>{var O;return!!u.value&&(((O=s.value)==null?void 0:O.showArrow)??n.showArrow)}),m=S(()=>{var O;return((O=s.value)==null?void 0:O.scrollIntoViewOptions)??n.scrollIntoViewOptions}),y=S(()=>{var O;return((O=s.value)==null?void 0:O.type)??n.type}),{nextZIndex:b}=fu(),w=b(),C=S(()=>n.zIndex??w),{mergedPosInfo:k,triggerTarget:E}=CG(u,Lt(n,"modelValue"),Lt(n,"gap"),p,m);fe(()=>n.modelValue,O=>{O||(r.value=0)});const T=()=>{n.closeOnPressEscape&&(a(at,!1),a("close",r.value))},$=O=>{l.value=O},N=fn();return bt(Ud,{currentStep:s,current:r,total:l,showClose:Lt(n,"showClose"),closeIcon:Lt(n,"closeIcon"),mergedType:y,ns:o,slots:N,updateModelValue(O){a(at,O)},onClose(){a("close",r.value)},onFinish(){a("finish")},onChange(){a(yt,r.value)}}),(O,_)=>(x(),B(He,null,[J(i(_r),{to:e.appendTo},{default:ne(()=>{var P,D;return[j("div",pt({class:c.value},O.$attrs),[J(NG,{visible:g.value,fill:(P=v.value)==null?void 0:P.color,style:je((D=v.value)==null?void 0:D.style),pos:i(k),"z-index":C.value,"target-area-clickable":e.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),e.modelValue?(x(),re(IG,{key:i(r),reference:i(E),placement:d.value,"show-arrow":h.value,"z-index":C.value,style:je(f.value),onClose:T},{default:ne(()=>[J(i(_G),{current:i(r),onUpdateTotal:$},{default:ne(()=>[ae(O.$slots,"default")]),_:3},8,["current"])]),_:3},8,["reference","placement","show-arrow","z-index","style"])):le("v-if",!0)],16)]}),_:3},8,["to"]),le(" just for IDE "),le("v-if",!0)],64))}}),AG=PG;const LG=["aria-label"];var DG=ie({name:"ElTourStep",__name:"step",props:bG,emits:wG,setup(e,{emit:t}){const n=e,a=t,{Close:o}=lS,{t:l}=Et(),{currentStep:s,current:r,total:u,showClose:c,closeIcon:d,mergedType:f,ns:p,slots:g,updateModelValue:v,onClose:h,onFinish:m,onChange:y}=_e(Ud);fe(n,O=>{s.value=O},{immediate:!0});const b=S(()=>n.showClose??c.value),w=S(()=>n.closeIcon??d.value??o),C=O=>{if(O)return su(O,["children","onClick"])},k=()=>{var O,_;r.value-=1,(O=n.prevButtonProps)!=null&&O.onClick&&((_=n.prevButtonProps)==null||_.onClick()),y()},E=()=>{var O;r.value>=u.value-1?T():r.value+=1,(O=n.nextButtonProps)!=null&&O.onClick&&n.nextButtonProps.onClick(),y()},T=()=>{$(),m()},$=()=>{v(!1),h(),a("close")},N=O=>{var _;if(!((_=O.target)!=null&&_.isContentEditable))switch(zt(O)){case Ce.left:O.preventDefault(),r.value>0&&k();break;case Ce.right:O.preventDefault(),E();break}};return mt(()=>{window.addEventListener("keydown",N)}),Pt(()=>{window.removeEventListener("keydown",N)}),(O,_)=>(x(),B(He,null,[b.value?(x(),B("button",{key:0,"aria-label":i(l)("el.tour.close"),class:M(i(p).e("closebtn")),type:"button",onClick:$},[J(i(Be),{class:M(i(p).e("close"))},{default:ne(()=>[(x(),re(ct(w.value)))]),_:1},8,["class"])],10,LG)):le("v-if",!0),j("header",{class:M([i(p).e("header"),{"show-close":i(c)}])},[ae(O.$slots,"header",{},()=>[j("span",{role:"heading",class:M(i(p).e("title"))},ke(e.title),3)])],2),j("div",{class:M(i(p).e("body"))},[ae(O.$slots,"default",{},()=>[j("span",null,ke(e.description),1)])],2),j("footer",{class:M(i(p).e("footer"))},[j("div",{class:M(i(p).b("indicators"))},[i(g).indicators?(x(),re(ct(i(g).indicators),{key:0,current:i(r),total:i(u)},null,8,["current","total"])):(x(!0),B(He,{key:1},Ct(i(u),(P,D)=>(x(),B("span",{key:P,class:M([i(p).b("indicator"),i(p).is("active",D===i(r))])},null,2))),128))],2),j("div",{class:M(i(p).b("buttons"))},[i(r)>0?(x(),re(i($n),pt({key:0,size:"small",type:i(f)},C(e.prevButtonProps),{onClick:k}),{default:ne(()=>{var P;return[St(ke(((P=e.prevButtonProps)==null?void 0:P.children)??i(l)("el.tour.previous")),1)]}),_:1},16,["type"])):le("v-if",!0),i(r)<=i(u)-1?(x(),re(i($n),pt({key:1,size:"small",type:i(f)==="primary"?"default":"primary"},C(e.nextButtonProps),{onClick:E}),{default:ne(()=>{var P;return[St(ke(((P=e.nextButtonProps)==null?void 0:P.children)??(i(r)===i(u)-1?i(l)("el.tour.finish"):i(l)("el.tour.next"))),1)]}),_:1},16,["type"])):le("v-if",!0)],2)],2)],64))}}),wE=DG;const VG=rt(AG,{TourStep:wE}),BG=Qt(wE),FG=Se({container:{type:X([String,Object])},offset:{type:Number,default:0},bound:{type:Number,default:15},duration:{type:Number,default:300},marker:{type:Boolean,default:!0},type:{type:X(String),default:"default"},direction:{type:X(String),default:"vertical"},selectScrollTop:Boolean}),zG={change:e=>De(e),click:(e,t)=>e instanceof MouseEvent&&(De(t)||xt(t))},Gu=e=>{if(!Mt||e==="")return null;if(De(e))try{return document.querySelector(e)}catch{return null}return e};function HG(e){let t=0;const n=(...a)=>{t&&tl(t),t=_a(()=>{e(...a),t=0})};return n.cancel=()=>{tl(t),t=0},n}const CE=Symbol("anchor");var KG=ie({name:"ElAnchor",__name:"anchor",props:FG,emits:zG,setup(e,{expose:t,emit:n}){const a=e,o=n,l=fn(),s=A(""),r=A({}),u=A(null),c=A(null),d=A(),f={};let p=!1,g=0;const v=he("anchor"),h=S(()=>[v.b(),a.type==="underline"?v.m("underline"):"",v.m(a.direction)]),m=P=>{f[P.href]=P.el},y=P=>{delete f[P]},b=P=>{s.value!==P&&(s.value=P,o(yt,P))};let w=null,C="";const k=P=>{if(!d.value)return;const D=Gu(P);if(!D)return;if(w){if(C===P)return;w()}C=P,p=!0;const W=iy(D,d.value),U=jp(D,W),F=W.scrollHeight-W.clientHeight,R=Math.min(U-a.offset,F);w=A3(d.value,g,R,a.duration,()=>{setTimeout(()=>{p=!1,C=""},20)})},E=P=>{P&&(b(P),k(P))},T=(P,D)=>{o("click",P,D),E(D)},$=HG(()=>{d.value&&(g=uy(d.value));const P=N();p||xt(P)||b(P)}),N=()=>{if(!d.value)return;const P=uy(d.value),D=[];for(const W of Object.keys(f)){const U=Gu(W);if(!U)continue;const F=jp(U,iy(U,d.value));D.push({top:F-a.offset-a.bound,href:W})}D.sort((W,U)=>W.top-U.top);for(let W=0;WP))return U.href}},O=()=>{const P=Gu(a.container);!P||ru(P)?d.value=window:d.value=P};At(d,"scroll",$);const _=()=>{Ae(()=>{if(!u.value||!c.value||!s.value){r.value={};return}const P=f[s.value];if(!P){r.value={};return}const D=u.value.getBoundingClientRect(),W=c.value.getBoundingClientRect(),U=P.getBoundingClientRect();a.direction==="horizontal"?r.value={left:`${U.left-D.left}px`,width:`${U.width}px`,opacity:1}:r.value={top:`${U.top-D.top+(U.height-W.height)/2}px`,opacity:1}})};return fe(s,_),fe(()=>{var P;return(P=l.default)==null?void 0:P.call(l)},_),mt(()=>{O();const P=decodeURIComponent(window.location.hash);Gu(P)?E(P):$()}),fe(()=>a.container,()=>{O()}),bt(CE,{ns:v,direction:a.direction,currentAnchor:s,addLink:m,removeLink:y,handleClick:T}),t({scrollTo:E}),(P,D)=>(x(),B("div",{ref_key:"anchorRef",ref:u,class:M(h.value)},[e.marker?(x(),B("div",{key:0,ref_key:"markerRef",ref:c,class:M(i(v).e("marker")),style:je(r.value)},null,6)):le("v-if",!0),j("div",{class:M(i(v).e("list"))},[ae(P.$slots,"default")],2)],2))}}),WG=KG;const jG=Se({title:String,href:String}),UG=["href"];var YG=ie({name:"ElAnchorLink",__name:"anchor-link",props:jG,setup(e){const t=e,n=A(null),{ns:a,direction:o,currentAnchor:l,addLink:s,removeLink:r,handleClick:u}=_e(CE),c=S(()=>[a.e("link"),a.is("active",l.value===t.href)]),d=f=>{u(f,t.href)};return fe(()=>t.href,(f,p)=>{Ae(()=>{p&&r(p),f&&s({href:f,el:n.value})})}),mt(()=>{const{href:f}=t;f&&s({href:f,el:n.value})}),Pt(()=>{const{href:f}=t;f&&r(f)}),(f,p)=>(x(),B("div",{class:M(i(a).e("item"))},[j("a",{ref_key:"linkRef",ref:n,class:M(c.value),href:e.href,onClick:d},[ae(f.$slots,"default",{},()=>[St(ke(e.title),1)])],10,UG),f.$slots["sub-link"]&&i(o)==="vertical"?(x(),B("div",{key:0,class:M(i(a).e("list"))},[ae(f.$slots,"sub-link")],2)):le("v-if",!0)],2))}}),SE=YG;const qG=rt(WG,{AnchorLink:SE}),GG=Qt(SE),kE={label:"label",value:"value",disabled:"disabled"},XG=Se({direction:{type:X(String),default:"horizontal"},options:{type:X(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},props:{type:X(Object),default:()=>kE},block:Boolean,size:Sn,disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},id:String,name:String,...Qn(["ariaLabel"])}),ZG={[at]:e=>De(e)||Fe(e)||Vt(e),[yt]:e=>De(e)||Fe(e)||Vt(e)},JG=["id","aria-label","aria-labelledby"],QG=["name","disabled","checked","onChange"];var eX=ie({name:"ElSegmented",__name:"segmented",props:XG,emits:ZG,setup(e,{emit:t}){const n=e,a=t,o=he("segmented"),l=Fn(),s=bn(),r=on(),{formItem:u}=Pn(),{inputId:c,isLabeledByFormItem:d}=Ta(n,{formItemContext:u}),f=A(null),p=I$(),g=Rt({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),v=(_,P)=>{const D=m(P);a(at,D),a(yt,D),_.target.checked=D===n.modelValue},h=S(()=>({...kE,...n.props})),m=_=>ot(_)?_[h.value.value]:_,y=_=>ot(_)?_[h.value.label]:_,b=_=>!!(r.value||ot(_)&&_[h.value.disabled]),w=_=>n.modelValue===m(_),C=_=>n.options.find(P=>m(P)===_),k=_=>[o.e("item"),o.is("selected",w(_)),o.is("disabled",b(_))],E=()=>{if(!f.value)return;const _=f.value.querySelector(".is-selected"),P=f.value.querySelector(".is-selected input");if(!_||!P){g.width=0,g.height=0,g.translateX=0,g.translateY=0,g.focusVisible=!1;return}g.isInit=!0,n.direction==="vertical"?(g.height=_.offsetHeight,g.translateY=_.offsetTop):(g.width=_.offsetWidth,g.translateX=_.offsetLeft);try{g.focusVisible=P.matches(":focus-visible")}catch{}},T=S(()=>[o.b(),o.m(s.value),o.is("block",n.block)]),$=S(()=>({width:n.direction==="vertical"?"100%":`${g.width}px`,height:n.direction==="vertical"?`${g.height}px`:"100%",transform:n.direction==="vertical"?`translateY(${g.translateY}px)`:`translateX(${g.translateX}px)`,display:g.isInit?"block":"none"})),N=S(()=>[o.e("item-selected"),o.is("disabled",b(C(n.modelValue))),o.is("focus-visible",g.focusVisible)]),O=S(()=>n.name||l.value);return Xt(f,E),fe(p,E),fe(()=>n.modelValue,()=>{var _;E(),n.validateEvent&&((_=u==null?void 0:u.validate)==null||_.call(u,"change").catch(P=>ft(P)))},{flush:"post"}),(_,P)=>e.options.length?(x(),B("div",{key:0,id:i(c),ref_key:"segmentedRef",ref:f,class:M(T.value),role:"radiogroup","aria-label":i(d)?void 0:e.ariaLabel||"segmented","aria-labelledby":i(d)?i(u).labelId:void 0},[j("div",{class:M([i(o).e("group"),i(o).m(e.direction)])},[j("div",{style:je($.value),class:M(N.value)},null,6),(x(!0),B(He,null,Ct(e.options,(D,W)=>(x(),B("label",{key:W,class:M(k(D))},[j("input",{class:M(i(o).e("item-input")),type:"radio",name:O.value,disabled:b(D),checked:w(D),onChange:U=>v(U,D)},null,42,QG),j("div",{class:M(i(o).e("item-label"))},[ae(_.$slots,"default",{item:D},()=>[St(ke(y(D)),1)])],2)],2))),128))],2)],10,JG)):le("v-if",!0)}}),tX=eX;const nX=rt(tX),aX=(e,t)=>{const n=e.toLowerCase();return(t.label||t.value||"").toLowerCase().includes(n)},oX=(e,t,n)=>{const{selectionEnd:a}=e;if(a===null)return;const o=e.value,l=Tn(t);let s=-1,r;for(let u=a-1;u>=0;--u){const c=o[u];if(s===-1&&(c===n||c===` +`||c==="\r")){s=u;continue}if(l.includes(c)){const d=s===-1?a:s;r={pattern:o.slice(u+1,d),start:u+1,end:d,prefix:c,prefixIndex:u,splitIndex:s,selectionEnd:a};break}}return r},lX=(e,t={debug:!1,useSelectionEnd:!1})=>{const n=e.selectionStart!==null?e.selectionStart:0,a=e.selectionEnd!==null?e.selectionEnd:0,o=t.useSelectionEnd?a:n,l=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(t.debug){const p=document.querySelector("#input-textarea-caret-position-mirror-div");p!=null&&p.parentNode&&p.parentNode.removeChild(p)}const s=document.createElement("div");s.id="input-textarea-caret-position-mirror-div",document.body.appendChild(s);const r=s.style,u=window.getComputedStyle(e),c=e.nodeName==="INPUT";r.whiteSpace=c?"nowrap":"pre-wrap",c||(r.wordWrap="break-word"),r.position="absolute",t.debug||(r.visibility="hidden"),l.forEach(p=>{if(c&&p==="lineHeight")if(u.boxSizing==="border-box"){const g=Number.parseInt(u.height),v=Number.parseInt(u.paddingTop)+Number.parseInt(u.paddingBottom)+Number.parseInt(u.borderTopWidth)+Number.parseInt(u.borderBottomWidth),h=v+Number.parseInt(u.lineHeight);g>h?r.lineHeight=`${g-v}px`:g===h?r.lineHeight=u.lineHeight:r.lineHeight="0"}else r.lineHeight=u.height;else r[p]=u[p]}),gd()?e.scrollHeight>Number.parseInt(u.height)&&(r.overflowY="scroll"):r.overflow="hidden",s.textContent=e.value.slice(0,Math.max(0,o)),c&&s.textContent&&(s.textContent=s.textContent.replace(/\s/g," "));const d=document.createElement("span");d.textContent=e.value.slice(Math.max(0,o))||".",d.style.position="relative",d.style.left=`${-e.scrollLeft}px`,d.style.top=`${-e.scrollTop}px`,s.appendChild(d);const f={top:d.offsetTop+Number.parseInt(u.borderTopWidth),left:d.offsetLeft+Number.parseInt(u.borderLeftWidth),height:Number.parseInt(u.fontSize)*1.5};return t.debug?d.style.backgroundColor="#aaa":document.body.removeChild(s),f.left>=e.clientWidth&&(f.left=e.clientWidth),f},sX=Se({...Rh,options:{type:X(Array),default:()=>[]},prefix:{type:X([String,Array]),default:"@",validator:e=>De(e)?e.length===1:e.every(t=>De(t)&&t.length===1)},split:{type:String,default:" ",validator:e=>e.length===1},filterOption:{type:X([Boolean,Function]),default:()=>aX,validator:e=>e===!1?!0:ze(e)},placement:{type:X(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:X(Function)},modelValue:String,loading:Boolean,popperClass:Bt.popperClass,popperStyle:Bt.popperStyle,popperOptions:{type:X(Object),default:()=>({})},props:{type:X(Object),default:()=>EE}}),rX={[at]:e=>De(e),"whole-remove":(e,t)=>De(e)&&De(t),input:e=>De(e),search:(e,t)=>De(e)&&De(t),select:(e,t)=>ot(e)&&De(t),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},EE={value:"value",label:"label",disabled:"disabled"},iX=Se({options:{type:X(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),uX={select:e=>De(e.value)},cX=["id","aria-disabled","aria-selected","onMousemove","onClick"];var dX=ie({name:"ElMentionDropdown",__name:"mention-dropdown",props:iX,emits:uX,setup(e,{expose:t,emit:n}){const a=e,o=n,l=he("mention"),{t:s}=Et(),r=A(-1),u=A(),c=A(),d=A(),f=(C,k)=>[l.be("dropdown","item"),l.is("hovering",r.value===k),l.is("disabled",C.disabled||a.disabled)],p=C=>{C.disabled||a.disabled||o("select",C)},g=C=>{r.value=C},v=S(()=>a.disabled||a.options.every(C=>C.disabled)),h=S(()=>a.options[r.value]),m=()=>{!h.value||h.value.disabled||a.disabled||o("select",h.value)},y=C=>{const{options:k}=a;if(k.length===0||v.value)return;C==="next"?(r.value++,r.value===k.length&&(r.value=0)):C==="prev"&&(r.value--,r.value<0&&(r.value=k.length-1));const E=k[r.value];if(E.disabled){y(C);return}Ae(()=>b(E))},b=C=>{var $,N,O,_;const{options:k}=a,E=k.findIndex(P=>P.value===C.value),T=($=c.value)==null?void 0:$[E];if(T){const P=(O=(N=d.value)==null?void 0:N.querySelector)==null?void 0:O.call(N,`.${l.be("dropdown","wrap")}`);P&&ih(P,T)}(_=u.value)==null||_.handleScroll()};return fe(()=>a.options,()=>{v.value||a.options.length===0?r.value=-1:r.value=a.options.findIndex(C=>!C.disabled)},{immediate:!0}),t({hoveringIndex:r,navigateOptions:y,selectHoverOption:m,hoverOption:h}),(C,k)=>(x(),B("div",{ref_key:"dropdownRef",ref:d,class:M(i(l).b("dropdown"))},[C.$slots.header?(x(),B("div",{key:0,class:M(i(l).be("dropdown","header"))},[ae(C.$slots,"header")],2)):le("v-if",!0),dt(J(i(Ga),{id:e.contentId,ref_key:"scrollbarRef",ref:u,tag:"ul","wrap-class":i(l).be("dropdown","wrap"),"view-class":i(l).be("dropdown","list"),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:ne(()=>[(x(!0),B(He,null,Ct(e.options,(E,T)=>(x(),B("li",{id:`${e.contentId}-${T}`,ref_for:!0,ref_key:"optionRefs",ref:c,key:T,class:M(f(E,T)),role:"option","aria-disabled":E.disabled||e.disabled||void 0,"aria-selected":r.value===T,onMousemove:$=>g(T),onClick:Xe($=>p(E),["stop"])},[ae(C.$slots,"label",{item:E,index:T},()=>[j("span",null,ke(E.label??E.value),1)])],42,cX))),128))]),_:3},8,["id","wrap-class","view-class","aria-label"]),[[Nt,e.options.length>0&&!e.loading]]),e.loading?(x(),B("div",{key:1,class:M(i(l).be("dropdown","loading"))},[ae(C.$slots,"loading",{},()=>[St(ke(i(s)("el.mention.loading")),1)])],2)):le("v-if",!0),C.$slots.footer?(x(),B("div",{key:2,class:M(i(l).be("dropdown","footer"))},[ae(C.$slots,"footer")],2)):le("v-if",!0)],2))}}),fX=dX,pX=ie({name:"ElMention",inheritAttrs:!1,__name:"mention",props:sX,emits:rX,setup(e,{expose:t,emit:n}){const a=e,o=n,l=S(()=>{const R=Dn.props??[];return el(a,be(R)?R:Object.keys(R))}),s=he("mention"),r=on(),u=Fn(),c=A(),d=A(),f=A(),p=A(!1),g=A(),v=A(),h=S(()=>a.showArrow?a.placement:`${a.placement}-start`),m=S(()=>a.showArrow?["bottom","top"]:["bottom-start","top-start"]),y=S(()=>({...EE,...a.props})),b=R=>{const I={label:R[y.value.label],value:R[y.value.value],disabled:R[y.value.disabled]};return{...R,...I}},w=S(()=>a.options.map(b)),C=S(()=>{const{filterOption:R}=a;return!v.value||!R?w.value:w.value.filter(I=>R(v.value.pattern,I))}),k=S(()=>p.value&&(!!C.value.length||a.loading)),E=S(()=>{var R;return`${u.value}-${(R=f.value)==null?void 0:R.hoveringIndex}`}),T=R=>{o(at,R),o(gn,R),W()},$=R=>{var L,z,H,K;if((L=c.value)!=null&&L.isComposing)return;const I=zt(R);switch(I){case Ce.left:case Ce.right:W();break;case Ce.up:case Ce.down:if(!p.value)return;R.preventDefault(),(z=f.value)==null||z.navigateOptions(I===Ce.up?"prev":"next");break;case Ce.enter:case Ce.numpadEnter:if(!p.value){a.type!=="textarea"&&W();return}R.preventDefault(),(H=f.value)!=null&&H.hoverOption?(K=f.value)==null||K.selectHoverOption():p.value=!1;break;case Ce.esc:if(!p.value)return;R.preventDefault(),p.value=!1;break;case Ce.backspace:if(a.whole&&v.value){const{splitIndex:q,selectionEnd:Q,pattern:ee,prefixIndex:ue,prefix:te}=v.value,de=D();if(!de)return;const se=de.value,Y=w.value.find(G=>G.value===ee);if((ze(a.checkIsWhole)?a.checkIsWhole(ee,te):Y)&&q!==-1&&q+1===Q){R.preventDefault();const G=se.slice(0,ue)+se.slice(q+1);o(at,G),o(gn,G),o("whole-remove",ee,te);const V=ue;Ae(()=>{de.selectionStart=V,de.selectionEnd=V,F()})}}}},{wrapperRef:N}=dl(c,{disabled:r,afterFocus(){W()},beforeBlur(R){var I;return(I=d.value)==null?void 0:I.isFocusInsideContent(R)},afterBlur(){p.value=!1}}),O=()=>{W()},_=R=>a.options.find(I=>R.value===I[y.value.value]),P=R=>{if(!v.value)return;const I=D();if(!I)return;const L=I.value,{split:z}=a,H=L.slice(v.value.end),K=H.startsWith(z),q=`${R.value}${K?"":z}`,Q=L.slice(0,v.value.start)+q+H;o(at,Q),o(gn,Q),o("select",_(R),v.value.prefix);const ee=v.value.start+q.length+(K?1:0);Ae(()=>{I.selectionStart=ee,I.selectionEnd=ee,I.focus(),F()})},D=()=>{var R,I;return a.type==="textarea"?(R=c.value)==null?void 0:R.textarea:(I=c.value)==null?void 0:I.input},W=()=>{setTimeout(()=>{U(),F(),Ae(()=>{var R;return(R=d.value)==null?void 0:R.updatePopper()})},0)},U=()=>{const R=D();if(!R)return;const I=lX(R),L=R.getBoundingClientRect(),z=N.value.getBoundingClientRect();g.value={position:"absolute",width:0,height:`${I.height}px`,left:`${I.left+L.left-z.left}px`,top:`${I.top+L.top-z.top}px`}},F=()=>{const R=D();if(document.activeElement!==R){p.value=!1;return}const{prefix:I,split:L}=a;if(v.value=oX(R,I,L),v.value&&v.value.splitIndex===-1){p.value=!0,o("search",v.value.pattern,v.value.prefix);return}p.value=!1};return t({input:c,tooltip:d,dropdownVisible:k}),(R,I)=>(x(),B("div",{ref_key:"wrapperRef",ref:N,class:M(i(s).b())},[J(i(Dn),pt(pt(l.value,R.$attrs),{ref_key:"elInputRef",ref:c,"model-value":e.modelValue,disabled:i(r),role:k.value?"combobox":void 0,"aria-activedescendant":k.value?E.value||"":void 0,"aria-controls":k.value?i(u):void 0,"aria-expanded":k.value||void 0,"aria-label":e.ariaLabel,"aria-autocomplete":k.value?"none":void 0,"aria-haspopup":k.value?"listbox":void 0,onInput:T,onKeydown:$,onMousedown:O}),ra({_:2},[Ct(R.$slots,(L,z)=>({name:z,fn:ne(H=>[ae(R.$slots,z,Yo(qo(H)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),J(i(_n),{ref_key:"tooltipRef",ref:d,visible:k.value,"popper-class":[i(s).e("popper"),e.popperClass],"popper-style":e.popperStyle,"popper-options":e.popperOptions,placement:h.value,"fallback-placements":m.value,effect:"light",pure:"",offset:e.offset,"show-arrow":e.showArrow},{default:ne(()=>[j("div",{style:je(g.value)},null,4)]),content:ne(()=>[J(fX,{ref_key:"dropdownRef",ref:f,options:C.value,disabled:i(r),loading:e.loading,"content-id":i(u),"aria-label":e.ariaLabel,onSelect:P,onClick:I[0]||(I[0]=Xe(L=>{var z;return(z=c.value)==null?void 0:z.focus()},["stop"]))},ra({_:2},[Ct(R.$slots,(L,z)=>({name:z,fn:ne(H=>[ae(R.$slots,z,Yo(qo(H)))])}))]),1032,["options","disabled","loading","content-id","aria-label"])]),_:3},8,["visible","popper-class","popper-style","popper-options","placement","fallback-placements","offset","show-arrow"])],2))}}),vX=pX;const hX=rt(vX),mX=Se({layout:{type:String,default:"horizontal",values:["horizontal","vertical"]},lazy:Boolean}),gX={resizeStart:(e,t)=>!0,resize:(e,t)=>!0,resizeEnd:(e,t)=>!0,collapse:(e,t,n)=>!0},yX=Se({min:{type:[String,Number]},max:{type:[String,Number]},size:{type:[String,Number]},resizable:{type:Boolean,default:!0},collapsible:Boolean}),bX={"update:size":e=>typeof e=="number"||typeof e=="string"};function wX(e){const t=A(),{width:n,height:a}=ip(t);return{containerEl:t,containerSize:S(()=>e.value==="horizontal"?n.value:a.value)}}function km(e){return Number(e.slice(0,-1))/100}function Em(e){return Number(e.slice(0,-2))}function xm(e){return De(e)&&e.endsWith("%")}function Tm(e){return De(e)&&e.endsWith("px")}function CX(e,t){const n=S(()=>e.value.map(s=>s.size)),a=S(()=>e.value.length),o=A([]);fe([n,a,t],()=>{var c;let s=[],r=0;for(let d=0;dd+(f||0),0);if(u>1||!r){const d=1/u;s=s.map(f=>f===void 0?0:f*d)}else{const d=(1-u)/r;s=s.map(f=>f===void 0?d:f)}o.value=s});const l=s=>s*t.value;return{percentSizes:o,pxSizes:S(()=>o.value.map(l))}}function SX(e,t,n,a){const o=m=>m*t.value||0;function l(m,y){return xm(m)?o(km(m)):Tm(m)?Em(m):m??y}const s=A(0),r=A(null);let u=[],c=_t;const d=S(()=>e.value.map(m=>[m.min,m.max]));fe(a,()=>{if(s.value){const m=new MouseEvent("mouseup",{bubbles:!0});window.dispatchEvent(m)}});const f=m=>{s.value=0,r.value={index:m,confirmed:!1},u=n.value},p=(m,y)=>{var _;let b=null;if((!r.value||!r.value.confirmed)&&y!==0){if(y>0)b=m,r.value={index:m,confirmed:!0};else for(let P=m;P>=0;P-=1)if(u[P]>0){b=P,r.value={index:P,confirmed:!0};break}}const w=b??((_=r.value)==null?void 0:_.index)??m,C=[...u],k=w+1,E=l(d.value[w][0],0),T=l(d.value[k][0],0),$=l(d.value[w][1],t.value||0),N=l(d.value[k][1],t.value||0);let O=y;C[w]+O$&&(O=$-C[w]),C[k]-O>N&&(O=C[k]-N),C[w]+=O,C[k]-=O,s.value=O,c=()=>{e.value.forEach((P,D)=>{P.size=C[D]}),c=_t},a.value||c()},g=()=>{a.value&&c(),s.value=0,r.value=null,u=[]},v=[];return{lazyOffset:s,onMoveStart:f,onMoving:p,onMoveEnd:g,movingIndex:r,onCollapse:(m,y)=>{v.length||v.push(...n.value);const b=n.value,w=y==="start"?m:m+1,C=y==="start"?m+1:m,k=b[w],E=b[C];if(k!==0&&E!==0)b[w]=0,b[C]+=k,v[m]=k;else{const T=k+E,$=v[m],N=T-$;b[C]=$,b[w]=N}e.value.forEach((T,$)=>{T.size=b[$]})}}}const xE=Symbol("splitterRootContextKey");var kX=ie({name:"ElSplitter",__name:"splitter",props:mX,emits:gX,setup(e,{emit:t}){const n=he("splitter"),a=t,o=e,l=Lt(o,"layout"),s=Lt(o,"lazy"),{containerEl:r,containerSize:u}=wX(l),{removeChild:c,children:d,addChild:f,ChildrenSorter:p}=Pd(vt(),"ElSplitterPanel");fe(d,()=>{m.value=null,d.value.forEach((O,_)=>{O.setIndex(_)})});const{percentSizes:g,pxSizes:v}=CX(d,u),{lazyOffset:h,movingIndex:m,onMoveStart:y,onMoving:b,onMoveEnd:w,onCollapse:C}=SX(d,u,v,s),k=S(()=>({[n.cssVarBlockName("bar-offset")]:s.value?`${h.value}px`:void 0}));return bt(xE,Rt({panels:d,percentSizes:g,pxSizes:v,layout:l,lazy:s,movingIndex:m,containerSize:u,onMoveStart:O=>{y(O),a("resizeStart",O,v.value)},onMoving:(O,_)=>{b(O,_),s.value||a("resize",O,v.value)},onMoveEnd:async O=>{w(),await Ae(),a("resizeEnd",O,v.value)},onCollapse:(O,_)=>{C(O,_),a("collapse",O,_,v.value)},registerPanel:f,unregisterPanel:c})),(O,_)=>(x(),B("div",{ref_key:"containerEl",ref:r,class:M([i(n).b(),i(n).e(l.value)]),style:je(k.value)},[ae(O.$slots,"default"),J(i(p)),le(" Prevent iframe touch events from breaking "),i(m)?(x(),B("div",{key:0,class:M([i(n).e("mask"),i(n).e(`mask-${l.value}`)])},null,2)):le("v-if",!0)],6))}}),EX=kX;function xX(e){return e&&ot(e)?e:{start:!!e,end:!!e}}function u0(e,t,n,a){return!!(e!=null&&e.collapsible.end&&t>0||n!=null&&n.collapsible.start&&a===0&&t>0)}var TX=ie({name:"ElSplitterBar",__name:"split-bar",props:{index:{type:Number,required:!0},layout:{type:String,values:["horizontal","vertical"],default:"horizontal"},resizable:{type:Boolean,default:!0},lazy:Boolean,startCollapsible:Boolean,endCollapsible:Boolean},emits:["moveStart","moving","moveEnd","collapse"],setup(e,{emit:t}){const n=he("splitter-bar"),a=e,o=t,l=S(()=>a.layout==="horizontal"),s=S(()=>l.value?{width:0}:{height:0}),r=S(()=>({width:l.value?"16px":"100%",height:l.value?"100%":"16px",cursor:a.resizable?l.value?"ew-resize":"ns-resize":"auto",touchAction:"none"})),u=S(()=>{const b=n.e("dragger");return{[`${b}-horizontal`]:l.value,[`${b}-vertical`]:!l.value,[`${b}-active`]:!!c.value}}),c=A(null),d=b=>{a.resizable&&(c.value=[b.pageX,b.pageY],o("moveStart",a.index),window.addEventListener("mouseup",v),window.addEventListener("mousemove",p))},f=b=>{if(a.resizable&&b.touches.length===1){b.preventDefault();const w=b.touches[0];c.value=[w.pageX,w.pageY],o("moveStart",a.index),window.addEventListener("touchend",h),window.addEventListener("touchmove",g)}},p=b=>{const{pageX:w,pageY:C}=b,k=w-c.value[0],E=C-c.value[1],T=l.value?k:E;o("moving",a.index,T)},g=b=>{if(b.touches.length===1){b.preventDefault();const w=b.touches[0],C=w.pageX-c.value[0],k=w.pageY-c.value[1],E=l.value?C:k;o("moving",a.index,E)}},v=()=>{c.value=null,window.removeEventListener("mouseup",v),window.removeEventListener("mousemove",p),o("moveEnd",a.index)},h=()=>{c.value=null,window.removeEventListener("touchend",h),window.removeEventListener("touchmove",g),o("moveEnd",a.index)},m=S(()=>l.value?al:Ad),y=S(()=>l.value?Jn:Io);return(b,w)=>(x(),B("div",{class:M([i(n).b()]),style:je(s.value)},[e.startCollapsible?(x(),B("div",{key:0,class:M([i(n).e("collapse-icon"),i(n).e(`${e.layout}-collapse-icon-start`)]),onClick:w[0]||(w[0]=C=>o("collapse",e.index,"start"))},[ae(b.$slots,"start-collapsible",{},()=>[(x(),re(ct(m.value),{style:{width:"12px",height:"12px"}}))])],2)):le("v-if",!0),j("div",{class:M([i(n).e("dragger"),u.value,i(n).is("disabled",!e.resizable),i(n).is("lazy",e.resizable&&e.lazy)]),style:je(r.value),onMousedown:d,onTouchstart:f},null,38),e.endCollapsible?(x(),B("div",{key:1,class:M([i(n).e("collapse-icon"),i(n).e(`${e.layout}-collapse-icon-end`)]),onClick:w[1]||(w[1]=C=>o("collapse",e.index,"end"))},[ae(b.$slots,"end-collapsible",{},()=>[(x(),re(ct(y.value),{style:{width:"12px",height:"12px"}}))])],2)):le("v-if",!0)],6))}}),$X=TX;const c0="ElSplitterPanel";var OX=ie({name:c0,__name:"split-panel",props:yX,emits:bX,setup(e,{expose:t,emit:n}){const a=he("splitter-panel"),o=e,l=n,s=_e(xE);s||Jt(c0,"usage: ");const{panels:r,layout:u,lazy:c,containerSize:d,pxSizes:f}=Nn(s),{registerPanel:p,unregisterPanel:g,onCollapse:v,onMoveEnd:h,onMoveStart:m,onMoving:y}=s,b=A(),w=vt(),C=w.uid,k=A(0),E=S(()=>r.value[k.value]),T=I=>{k.value=I},$=S(()=>E.value?f.value[k.value]??0:0),N=S(()=>E.value?f.value[k.value+1]??0:0),O=S(()=>E.value?r.value[k.value+1]:null),_=S(()=>{var I;return O.value?o.resizable&&((I=O.value)==null?void 0:I.resizable)&&($.value!==0||!o.min)&&(N.value!==0||!O.value.min):!1}),P=S(()=>E.value?k.value!==r.value.length-1:!1),D=S(()=>u0(E.value,$.value,O.value,N.value)),W=S(()=>u0(O.value,N.value,E.value,$.value));function U(I){return xm(I)?km(I)*d.value||0:Tm(I)?Em(I):I??0}let F=!1;fe(()=>o.size,()=>{if(!F&&E.value){if(!d.value){E.value.size=o.size;return}const I=U(o.size),L=U(o.max),z=U(o.min),H=Math.min(Math.max(I,z||0),L||I);H!==I&&l("update:size",H),E.value.size=H}}),fe(()=>{var I;return(I=E.value)==null?void 0:I.size},I=>{I!==o.size&&(F=!0,l("update:size",I),Ae(()=>F=!1))}),fe(()=>o.resizable,I=>{E.value&&(E.value.resizable=I)});const R=Rt({uid:C,getVnode:()=>w.vnode,setIndex:T,...o,collapsible:S(()=>xX(o.collapsible))});return p(R),Pt(()=>g(R)),t({splitterPanelRef:b}),(I,L)=>(x(),B(He,null,[j("div",pt({ref_key:"panelEl",ref:b,class:[i(a).b()],style:{flexBasis:`${$.value}px`}},I.$attrs),[ae(I.$slots,"default")],16),P.value?(x(),re($X,{key:0,index:k.value,layout:i(u),lazy:i(c),resizable:_.value,"start-collapsible":D.value,"end-collapsible":W.value,onMoveStart:i(m),onMoving:i(y),onMoveEnd:i(h),onCollapse:i(v)},{"start-collapsible":ne(()=>[ae(I.$slots,"start-collapsible")]),"end-collapsible":ne(()=>[ae(I.$slots,"end-collapsible")]),_:3},8,["index","layout","lazy","resizable","start-collapsible","end-collapsible","onMoveStart","onMoving","onMoveEnd","onCollapse"])):le("v-if",!0)],64))}}),TE=OX;const NX=rt(EX,{SplitPanel:TE}),MX=Qt(TE),RX="2.13.7",IX=(e=[])=>({version:RX,install:(n,a)=>{n[wg]||(n[wg]=!0,e.forEach(o=>n.use(o)),a&&_h(a,n,!0))}}),ya="ElInfiniteScroll",_X=50,PX=200,AX=0,LX={delay:{type:Number,default:PX},distance:{type:Number,default:AX},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},$m=(e,t)=>Object.entries(LX).reduce((n,[a,o])=>{const{type:l,default:s}=o,r=e.getAttribute(`infinite-scroll-${a}`);let u=t[r]??r??s;return u=u==="false"?!1:u,u=l(u),n[a]=Number.isNaN(u)?s:u,n},{}),$E=e=>{const{observer:t}=e[ya];t&&(t.disconnect(),delete e[ya].observer)},DX=(e,t)=>{const{container:n,containerEl:a,instance:o,observer:l,lastScrollTop:s}=e[ya],{disabled:r,distance:u}=$m(e,o),{clientHeight:c,scrollHeight:d,scrollTop:f}=a,p=f-s;if(e[ya].lastScrollTop=f,l||r||p<0)return;let g=!1;if(n===e)g=d-(c+f)<=u;else{const{clientTop:v,scrollHeight:h}=e,m=jp(e,a);g=f+c>=m+v+h-u}g&&t.call(o)};function jf(e,t){const{containerEl:n,instance:a}=e[ya],{disabled:o}=$m(e,a);o||n.clientHeight===0||(n.scrollHeight<=n.clientHeight?t.call(a):$E(e))}const VX={async mounted(e,t){const{instance:n,value:a}=t;bo({scope:ya,from:"the directive v-infinite-scroll",replacement:"the el-scrollbar infinite scroll",version:"3.0.0",ref:"https://element-plus.org/en-US/component/scrollbar#infinite-scroll"},!0),ze(a)||Jt(ya,"'v-infinite-scroll' binding value must be a function"),await Ae();const{delay:o,immediate:l}=$m(e,n),s=rh(e,!0),r=s===window?document.documentElement:s,u=Tl(DX.bind(null,e,a),o);if(s){if(e[ya]={instance:n,container:s,containerEl:r,delay:o,cb:a,onScroll:u,lastScrollTop:r.scrollTop},l){const c=new MutationObserver(Tl(jf.bind(null,e,a),_X));e[ya].observer=c,c.observe(e,{childList:!0,subtree:!0}),jf(e,a)}s.addEventListener("scroll",u)}},unmounted(e){if(!e[ya])return;const{container:t,onScroll:n}=e[ya];t==null||t.removeEventListener("scroll",n),$E(e)},async updated(e){if(!e[ya])await Ae();else{const{containerEl:t,cb:n,observer:a}=e[ya];t.clientHeight&&a&&jf(e,n)}}},vv=VX;vv.install=e=>{e.directive("InfiniteScroll",vv)};const BX=vv;function FX(e,t){let n;const a=A(!1),o=Rt({...e,originalPosition:"",originalOverflow:"",visible:!1});function l(p){o.text=p}function s(){const p=o.parent,g=f.ns;if(!p.vLoadingAddClassList){let v=p.getAttribute("loading-number");v=Number.parseInt(v)-1,v?p.setAttribute("loading-number",v.toString()):(Zn(p,g.bm("parent","relative")),p.removeAttribute("loading-number")),Zn(p,g.bm("parent","hidden"))}r(),d.unmount()}function r(){var p,g;(g=(p=f.$el)==null?void 0:p.parentNode)==null||g.removeChild(f.$el)}function u(){var p;e.beforeClose&&!e.beforeClose()||(a.value=!0,clearTimeout(n),n=setTimeout(c,400),o.visible=!1,(p=e.closed)==null||p.call(e))}function c(){if(!a.value)return;const p=o.parent;a.value=!1,p.vLoadingAddClassList=void 0,s()}const d=lw(ie({name:"ElLoading",setup(p,{expose:g}){const{ns:v,zIndex:h}=Bd("loading");return g({ns:v,zIndex:h}),()=>{const m=o.spinner||o.svg,y=Ye("svg",{class:"circular",viewBox:o.svgViewBox?o.svgViewBox:"0 0 50 50",...m?{innerHTML:m}:{}},[Ye("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),b=o.text?Ye("p",{class:v.b("text")},[o.text]):void 0;return Ye(Bn,{name:v.b("fade"),onAfterLeave:c},{default:ne(()=>[dt(J("div",{style:{backgroundColor:o.background||""},class:[v.b("mask"),o.customClass,v.is("fullscreen",o.fullscreen)]},[Ye("div",{class:v.b("spinner")},[y,b])]),[[Nt,o.visible]])])})}}}));Object.assign(d._context,t??{});const f=d.mount(document.createElement("div"));return{...Nn(o),setText:l,removeElLoadingChild:r,close:u,handleAfterLeave:c,vm:f,get $el(){return f.$el}}}let Xu;const sr=function(e={},t){if(!Mt)return;const n=zX(e);if(n.fullscreen&&Xu)return Xu;const a=FX({...n,closed:()=>{var l;(l=n.closed)==null||l.call(n),n.fullscreen&&(Xu=void 0)}},t??sr._context);HX(n,n.parent,a),d0(n,n.parent,a),n.parent.vLoadingAddClassList=()=>d0(n,n.parent,a);let o=n.parent.getAttribute("loading-number");return o?o=`${Number.parseInt(o)+1}`:o="1",n.parent.setAttribute("loading-number",o),n.parent.appendChild(a.$el),Ae(()=>a.visible.value=n.visible),n.fullscreen&&(Xu=a),a},zX=e=>{let t;return De(e.target)?t=document.querySelector(e.target)??document.body:t=e.target||document.body,{parent:t===document.body||e.body?document.body:t,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:t===document.body&&(e.fullscreen??!0),lock:e.lock??!1,customClass:e.customClass||"",visible:e.visible??!0,beforeClose:e.beforeClose,closed:e.closed,target:t}},HX=async(e,t,n)=>{const{nextZIndex:a}=n.vm.zIndex||n.vm._.exposed.zIndex,o={};if(e.fullscreen)n.originalPosition.value=Ko(document.body,"position"),n.originalOverflow.value=Ko(document.body,"overflow"),o.zIndex=a();else if(e.parent===document.body){n.originalPosition.value=Ko(document.body,"position"),await Ae();for(const l of["top","left"]){const s=l==="top"?"scrollTop":"scrollLeft";o[l]=`${e.target.getBoundingClientRect()[l]+document.body[s]+document.documentElement[s]-Number.parseInt(Ko(document.body,`margin-${l}`),10)}px`}for(const l of["height","width"])o[l]=`${e.target.getBoundingClientRect()[l]}px`}else n.originalPosition.value=Ko(t,"position");for(const[l,s]of Object.entries(o))n.$el.style[l]=s},d0=(e,t,n)=>{const a=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?Zn(t,a.bm("parent","relative")):Na(t,a.bm("parent","relative")),e.fullscreen&&e.lock?Na(t,a.bm("parent","hidden")):Zn(t,a.bm("parent","hidden"))};sr._context=null;const ni=Symbol("ElLoading"),Zl=e=>`element-loading-${ll(e)}`,f0=(e,t)=>{const n=t.instance,a=c=>ot(t.value)?t.value[c]:void 0,o=c=>A(De(c)&&(n==null?void 0:n[c])||c),l=c=>o(a(c)||e.getAttribute(Zl(c))),s=a("fullscreen")??t.modifiers.fullscreen,r={text:l("text"),svg:l("svg"),svgViewBox:l("svgViewBox"),spinner:l("spinner"),background:l("background"),customClass:l("customClass"),fullscreen:s,target:a("target")??(s?void 0:e),body:a("body")??t.modifiers.body,lock:a("lock")??t.modifiers.lock},u=sr(r);u._context=gi._context,e[ni]={options:r,instance:u}},KX=(e,t)=>{for(const n of Object.keys(e))Ut(e[n])&&(e[n].value=t[n])},gi={mounted(e,t){t.value&&f0(e,t)},updated(e,t){const n=e[ni];if(!t.value){n==null||n.instance.close(),e[ni]=null;return}n?KX(n.options,ot(t.value)?t.value:{text:e.getAttribute(Zl("text")),svg:e.getAttribute(Zl("svg")),svgViewBox:e.getAttribute(Zl("svgViewBox")),spinner:e.getAttribute(Zl("spinner")),background:e.getAttribute(Zl("background")),customClass:e.getAttribute(Zl("customClass"))}):f0(e,t)},unmounted(e){var t;(t=e[ni])==null||t.instance.close(),e[ni]=null}};gi._context=null;const WX={install(e){sr._context=e._context,gi._context=e._context,e.directive("loading",gi),e.config.globalProperties.$loading=sr},directive:gi,service:sr},OE=["primary","success","info","warning","error"],NE=["top","top-left","top-right","bottom","bottom-left","bottom-right"],rr="top",Un=nn({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,placement:void 0,zIndex:0,grouping:!1,repeatNum:1,appendTo:Mt?document.body:void 0}),jX=Se({customClass:{type:String,default:Un.customClass},dangerouslyUseHTMLString:{type:Boolean,default:Un.dangerouslyUseHTMLString},duration:{type:Number,default:Un.duration},icon:{type:Ft,default:Un.icon},id:{type:String,default:Un.id},message:{type:X([String,Object,Function]),default:Un.message},onClose:{type:X(Function),default:Un.onClose},showClose:{type:Boolean,default:Un.showClose},type:{type:String,values:OE,default:Un.type},plain:{type:Boolean,default:Un.plain},offset:{type:Number,default:Un.offset},placement:{type:String,values:NE,default:Un.placement},zIndex:{type:Number,default:Un.zIndex},grouping:{type:Boolean,default:Un.grouping},repeatNum:{type:Number,default:Un.repeatNum}}),UX={destroy:()=>!0},Wa=rd({}),YX=e=>(Wa[e]||(Wa[e]=rd([])),Wa[e]),qX=(e,t)=>{const n=Wa[t]||[],a=n.findIndex(s=>s.id===e),o=n[a];let l;return a>0&&(l=n[a-1]),{current:o,prev:l}},GX=(e,t)=>{const{prev:n}=qX(e,t);return n?n.vm.exposed.bottom.value:0},XX=(e,t,n)=>(Wa[n]||[]).findIndex(a=>a.id===e)>0?16:t,ZX=["id"],JX=["innerHTML"];var QX=ie({name:"ElMessage",__name:"message",props:jX,emits:UX,setup(e,{expose:t,emit:n}){const{Close:a}=Th,o=e,l=n,s=A(!1),{ns:r,zIndex:u}=Bd("message"),{currentZIndex:c,nextZIndex:d}=u,f=A(),p=A(!1),g=A(0);let v;const h=S(()=>o.type?o.type==="error"?"danger":o.type:"info"),m=S(()=>{const D=o.type;return{[r.bm("icon",D)]:D&&Fl[D]}}),y=S(()=>o.icon||Fl[o.type]||""),b=S(()=>o.placement||rr),w=S(()=>GX(o.id,b.value)),C=S(()=>Math.max(XX(o.id,o.offset,b.value)+w.value,o.offset)),k=S(()=>g.value+C.value),E=S(()=>b.value.includes("left")?r.is("left"):b.value.includes("right")?r.is("right"):r.is("center")),T=S(()=>b.value.startsWith("top")?"top":"bottom"),$=S(()=>({[T.value]:`${C.value}px`,zIndex:c.value}));function N(){o.duration!==0&&({stop:v}=dr(()=>{_()},o.duration))}function O(){v==null||v()}function _(){p.value=!1,Ae(()=>{var D;s.value||((D=o.onClose)==null||D.call(o),l("destroy"))})}function P(D){zt(D)===Ce.esc&&_()}return mt(()=>{N(),d(),p.value=!0}),fe(()=>o.repeatNum,()=>{O(),N()}),At(document,"keydown",P),Xt(f,()=>{g.value=f.value.getBoundingClientRect().height}),t({visible:p,bottom:k,close:_}),(D,W)=>(x(),re(Bn,{name:i(r).b("fade"),onBeforeEnter:W[0]||(W[0]=U=>s.value=!0),onBeforeLeave:e.onClose,onAfterLeave:W[1]||(W[1]=U=>D.$emit("destroy")),persisted:""},{default:ne(()=>[dt(j("div",{id:e.id,ref_key:"messageRef",ref:f,class:M([i(r).b(),{[i(r).m(e.type)]:e.type},i(r).is("closable",e.showClose),i(r).is("plain",e.plain),i(r).is("bottom",T.value==="bottom"),E.value,e.customClass]),style:je($.value),role:"alert",onMouseenter:O,onMouseleave:N},[e.repeatNum>1?(x(),re(i(ES),{key:0,value:e.repeatNum,type:h.value,class:M(i(r).e("badge"))},null,8,["value","type","class"])):le("v-if",!0),y.value?(x(),re(i(Be),{key:1,class:M([i(r).e("icon"),m.value])},{default:ne(()=>[(x(),re(ct(y.value)))]),_:1},8,["class"])):le("v-if",!0),ae(D.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(x(),B(He,{key:1},[le(" Caution here, message could've been compromised, never use user's input as message "),j("p",{class:M(i(r).e("content")),innerHTML:e.message},null,10,JX)],2112)):(x(),B("p",{key:0,class:M(i(r).e("content"))},ke(e.message),3))]),e.showClose?(x(),re(i(Be),{key:2,class:M(i(r).e("closeBtn")),onClick:Xe(_,["stop"])},{default:ne(()=>[J(i(a))]),_:1},8,["class"])):le("v-if",!0)],46,ZX),[[Nt,p.value]])]),_:3},8,["name","onBeforeLeave"]))}}),eZ=QX;let tZ=1;const nZ=e=>{if(!e.appendTo)e.appendTo=document.body;else if(De(e.appendTo)){let t=document.querySelector(e.appendTo);fa(t)||(ft("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body),e.appendTo=t}},aZ=e=>{!e.placement&&De(Yn.placement)&&Yn.placement&&(e.placement=Yn.placement),e.placement||(e.placement=rr),NE.includes(e.placement)||(ft("ElMessage",`Invalid placement: ${e.placement}. Falling back to '${rr}'.`),e.placement=rr)},ME=e=>{const t=!e||De(e)||Ht(e)||ze(e)?{message:e}:e,n={...Un,...t};return nZ(n),aZ(n),Vt(Yn.grouping)&&!n.grouping&&(n.grouping=Yn.grouping),Fe(Yn.duration)&&n.duration===3e3&&(n.duration=Yn.duration),Fe(Yn.offset)&&n.offset===16&&(n.offset=Yn.offset),Vt(Yn.showClose)&&!n.showClose&&(n.showClose=Yn.showClose),Vt(Yn.plain)&&!n.plain&&(n.plain=Yn.plain),n},oZ=e=>{const t=Wa[e.props.placement||rr],n=t.indexOf(e);if(n===-1)return;t.splice(n,1);const{handler:a}=e;a.close()},lZ=({appendTo:e,...t},n)=>{const a=`message_${tZ++}`,o=t.onClose,l=document.createElement("div"),s={...t,id:a,onClose:()=>{o==null||o(),oZ(c)},onDestroy:()=>{Al(null,l)}},r=J(eZ,s,ze(s.message)||Ht(s.message)?{default:ze(s.message)?s.message:()=>s.message}:null);r.appContext=n||Ts._context,Al(r,l),e.appendChild(l.firstElementChild);const u=r.component,c={id:a,vnode:r,vm:u,handler:{close:()=>{u.exposed.close()}},props:r.component.props};return c},Ts=(e={},t)=>{if(!Mt)return{close:()=>{}};const n=ME(e),a=YX(n.placement||rr);if(n.grouping&&a.length){const l=a.find(({vnode:s})=>{var r;return((r=s.props)==null?void 0:r.message)===n.message});if(l)return l.props.repeatNum+=1,l.props.type=n.type,l.handler}if(Fe(Yn.max)&&a.length>=Yn.max)return{close:()=>{}};const o=lZ(n,t);return a.push(o),o.handler};OE.forEach(e=>{Ts[e]=(t={},n)=>Ts({...ME(t),type:e},n)});function sZ(e){for(const t in Wa)if($t(Wa,t)){const n=[...Wa[t]];for(const a of n)(!e||e===a.props.type)&&a.handler.close()}}function rZ(e){Wa[e]&&[...Wa[e]].forEach(t=>t.handler.close())}Ts.closeAll=sZ;Ts.closeAllByPlacement=rZ;Ts._context=null;const iZ=QC(Ts,"$message");var uZ=ie({name:"ElMessageBox",directives:{TrapFocus:v3},components:{ElButton:$n,ElFocusTrap:Pr,ElInput:Dn,ElOverlay:Xh,ElIcon:Be,...Th},inheritAttrs:!1,props:{buttonSize:{type:String,validator:Rk},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:a,ns:o,size:l}=Bd("message-box",S(()=>e.buttonSize)),{t:s}=n,{nextZIndex:r}=a,u=A(!1),c=Rt({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",cancelButtonType:"",confirmButtonType:"primary",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:za(Oo),cancelButtonLoadingIcon:za(Oo),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:r()}),d=S(()=>{const U=c.type;return{[o.bm("icon",U)]:U&&Fl[U]}}),f=Fn(),p=Fn(),g=S(()=>{const U=c.type;return c.icon||U&&Fl[U]||""}),v=S(()=>!!c.message),h=A(),m=A(),y=A(),b=A(),w=A(),C=S(()=>c.confirmButtonClass);fe(()=>c.inputValue,async U=>{await Ae(),e.boxType==="prompt"&&U&&_()},{immediate:!0}),fe(()=>u.value,U=>{var F;U&&(e.boxType!=="prompt"&&(c.autofocus?y.value=((F=w.value)==null?void 0:F.$el)??h.value:y.value=h.value),c.zIndex=r()),e.boxType==="prompt"&&(U?Ae().then(()=>{b.value&&b.value.$el&&(c.autofocus?y.value=P()??h.value:y.value=h.value)}):(c.editorErrorMessage="",c.validateError=!1))});const{isDragging:k}=mC(h,m,S(()=>e.draggable),S(()=>e.overflow));mt(async()=>{await Ae(),e.closeOnHashChange&&window.addEventListener("hashchange",E)}),Pt(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",E)});function E(){u.value&&(u.value=!1,Ae(()=>{c.action&&t("action",c.action)}))}const T=()=>{e.closeOnClickModal&&O(c.distinguishCancelAndClose?"close":"cancel")},$=gh(T),N=U=>{var F;if(c.inputType!=="textarea"&&!((F=b.value)!=null&&F.isComposing))return U.preventDefault(),O("confirm")},O=U=>{var F;e.boxType==="prompt"&&U==="confirm"&&!_()||(c.action=U,c.beforeClose?(F=c.beforeClose)==null||F.call(c,U,c,E):E())},_=()=>{if(e.boxType==="prompt"){const U=c.inputPattern;if(U&&!U.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||s("el.messagebox.error"),c.validateError=!0,!1;const F=c.inputValidator;if(ze(F)){const R=F(c.inputValue);if(R===!1)return c.editorErrorMessage=c.inputErrorMessage||s("el.messagebox.error"),c.validateError=!0,!1;if(De(R))return c.editorErrorMessage=R,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},P=()=>{var F;const U=(F=b.value)==null?void 0:F.$refs;return(U==null?void 0:U.input)??(U==null?void 0:U.textarea)},D=()=>{O("close")},W=()=>{e.closeOnPressEscape&&D()};return e.lockScroll&&Od(u,{ns:o}),{...Nn(c),ns:o,overlayEvent:$,visible:u,hasMessage:v,typeClass:d,contentId:f,inputId:p,btnSize:l,iconComponent:g,confirmButtonClasses:C,rootRef:h,focusStartRef:y,headerRef:m,inputRef:b,isDragging:k,confirmRef:w,doClose:E,handleClose:D,onCloseRequested:W,handleWrapperClick:T,handleInputEnter:N,handleAction:O,t:s}}});const cZ=["aria-label","aria-describedby"],dZ=["aria-label"],fZ=["id"];function pZ(e,t,n,a,o,l){const s=Ot("el-icon"),r=Ot("el-input"),u=Ot("el-button"),c=Ot("el-focus-trap"),d=Ot("el-overlay");return x(),re(Bn,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=f=>e.$emit("vanish")),persisted:""},{default:ne(()=>[dt(J(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:ne(()=>[j("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:M(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...f)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...f)),onMousedown:t[9]||(t[9]=(...f)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...f)),onMouseup:t[10]||(t[10]=(...f)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...f))},[J(c,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:ne(()=>[j("div",{ref:"rootRef",class:M([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:je(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Xe(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(x(),B("div",{key:0,ref:"headerRef",class:M([e.ns.e("header"),{"show-close":e.showClose}])},[j("div",{class:M(e.ns.e("title"))},[e.iconComponent&&e.center?(x(),re(s,{key:0,class:M([e.ns.e("status"),e.typeClass])},{default:ne(()=>[(x(),re(ct(e.iconComponent)))]),_:1},8,["class"])):le("v-if",!0),j("span",null,ke(e.title),1)],2),e.showClose?(x(),B("button",{key:0,type:"button",class:M(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=en(Xe(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[J(s,{class:M(e.ns.e("close"))},{default:ne(()=>[(x(),re(ct(e.closeIcon||"close")))]),_:1},8,["class"])],42,dZ)):le("v-if",!0)],2)):le("v-if",!0),j("div",{id:e.contentId,class:M(e.ns.e("content"))},[j("div",{class:M(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(x(),re(s,{key:0,class:M([e.ns.e("status"),e.typeClass])},{default:ne(()=>[(x(),re(ct(e.iconComponent)))]),_:1},8,["class"])):le("v-if",!0),e.hasMessage?(x(),B("div",{key:1,class:M(e.ns.e("message"))},[ae(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(x(),re(ct(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(x(),re(ct(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:ke(e.message)},null,8,["for","textContent"]))])],2)):le("v-if",!0)],2),dt(j("div",{class:M(e.ns.e("input"))},[J(r,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=f=>e.inputValue=f),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:M({invalid:e.validateError}),onKeydown:en(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),j("div",{class:M(e.ns.e("errormsg")),style:je({visibility:e.editorErrorMessage?"visible":"hidden"})},ke(e.editorErrorMessage),7)],2),[[Nt,e.showInput]])],10,fZ),j("div",{class:M(e.ns.e("btns"))},[e.showCancelButton?(x(),re(u,{key:0,type:e.cancelButtonType==="text"?"":e.cancelButtonType,text:e.cancelButtonType==="text",loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:M([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=f=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=en(Xe(f=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:ne(()=>[St(ke(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","size"])):le("v-if",!0),dt(J(u,{ref:"confirmRef",type:e.confirmButtonType==="text"?"":e.confirmButtonType,text:e.confirmButtonType==="text",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:M([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=f=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=en(Xe(f=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:ne(()=>[St(ke(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","disabled","size"]),[[Nt,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,cZ)]),_:3},8,["z-index","overlay-class","mask"]),[[Nt,e.visible]])]),_:3})}var vZ=kn(uZ,[["render",pZ]]);const Yi=new Map,hZ=e=>{let t=document.body;return e.appendTo&&(De(e.appendTo)&&(t=document.querySelector(e.appendTo)),fa(e.appendTo)&&(t=e.appendTo),fa(t)||(ft("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body)),t},mZ=(e,t,n=null)=>{const a=J(vZ,e,ze(e.message)||Ht(e.message)?{default:ze(e.message)?e.message:()=>e.message}:null);return a.appContext=n,Al(a,t),hZ(e).appendChild(t.firstElementChild),a.component},gZ=()=>document.createElement("div"),yZ=(e,t)=>{const n=gZ();e.onVanish=()=>{Al(null,n),Yi.delete(o)},e.onAction=l=>{const s=Yi.get(o);let r;e.showInput?r={value:o.inputValue,action:l}:r=l,e.callback?e.callback(r,a.proxy):l==="cancel"||l==="close"?e.distinguishCancelAndClose&&l!=="cancel"?s.reject("close"):s.reject("cancel"):s.resolve(r)};const a=mZ(e,n,t),o=a.proxy;for(const l in e)$t(e,l)&&!$t(o.$props,l)&&(l==="closeIcon"&&ot(e[l])?o[l]=za(e[l]):o[l]=e[l]);return o.visible=!0,o};function Lr(e,t=null){if(!Mt)return Promise.reject();let n;return De(e)||Ht(e)?e={message:e}:n=e.callback,new Promise((a,o)=>{const l=yZ(e,t??Lr._context);Yi.set(l,{options:e,callback:n,resolve:a,reject:o})})}const bZ=["alert","confirm","prompt"],wZ={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};bZ.forEach(e=>{Lr[e]=CZ(e)});function CZ(e){return(t,n,a,o)=>{let l="";return ot(n)?(a=n,l=""):xt(n)?l="":l=n,Lr(Object.assign({title:l,message:t,type:"",...wZ[e]},a,{boxType:e}),o)}}Lr.close=()=>{Yi.forEach((e,t)=>{t.doClose()}),Yi.clear()};Lr._context=null;const Sl=Lr;Sl.install=e=>{Sl._context=e._context,e.config.globalProperties.$msgbox=Sl,e.config.globalProperties.$messageBox=Sl,e.config.globalProperties.$alert=Sl.alert,e.config.globalProperties.$confirm=Sl.confirm,e.config.globalProperties.$prompt=Sl.prompt};const SZ=Sl,RE=["primary","success","info","warning","error"],kZ=Se({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:Ft},id:{type:String,default:""},message:{type:X([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:X(Function),default:()=>{}},onClose:{type:X(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...RE,""],default:""},zIndex:Number,closeIcon:{type:Ft,default:La}}),EZ={destroy:()=>!0},xZ=["id"],TZ=["textContent"],$Z={key:0},OZ=["innerHTML"];var NZ=ie({name:"ElNotification",__name:"notification",props:kZ,emits:EZ,setup(e,{expose:t}){const n=e,{ns:a,zIndex:o}=Bd("notification"),{nextZIndex:l,currentZIndex:s}=o,r=A(!1);let u;const c=S(()=>{const b=n.type;return b&&Fl[n.type]?a.m(b):""}),d=S(()=>n.type&&Fl[n.type]||n.icon),f=S(()=>n.position.endsWith("right")?"right":"left"),p=S(()=>n.position.startsWith("top")?"top":"bottom"),g=S(()=>({[p.value]:`${n.offset}px`,zIndex:n.zIndex??s.value}));function v(){n.duration>0&&({stop:u}=dr(()=>{r.value&&m()},n.duration))}function h(){u==null||u()}function m(){r.value=!1}function y(b){switch(zt(b)){case Ce.delete:case Ce.backspace:h();break;case Ce.esc:r.value&&m();break;default:v();break}}return mt(()=>{v(),l(),r.value=!0}),At(document,"keydown",y),t({visible:r,close:m}),(b,w)=>(x(),re(Bn,{name:i(a).b("fade"),onBeforeLeave:e.onClose,onAfterLeave:w[1]||(w[1]=C=>b.$emit("destroy")),persisted:""},{default:ne(()=>[dt(j("div",{id:e.id,class:M([i(a).b(),e.customClass,f.value]),style:je(g.value),role:"alert",onMouseenter:h,onMouseleave:v,onClick:w[0]||(w[0]=(...C)=>e.onClick&&e.onClick(...C))},[d.value?(x(),re(i(Be),{key:0,class:M([i(a).e("icon"),c.value])},{default:ne(()=>[(x(),re(ct(d.value)))]),_:1},8,["class"])):le("v-if",!0),j("div",{class:M(i(a).e("group"))},[j("h2",{class:M(i(a).e("title")),textContent:ke(e.title)},null,10,TZ),dt(j("div",{class:M(i(a).e("content")),style:je(e.title?void 0:{margin:0})},[ae(b.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(x(),B(He,{key:1},[le(" Caution here, message could've been compromised, never use user's input as message "),j("p",{innerHTML:e.message},null,8,OZ)],2112)):(x(),B("p",$Z,ke(e.message),1))])],6),[[Nt,e.message]]),e.showClose?(x(),re(i(Be),{key:0,class:M(i(a).e("closeBtn")),onClick:Xe(m,["stop"])},{default:ne(()=>[(x(),re(ct(e.closeIcon)))]),_:1},8,["class"])):le("v-if",!0)],2)],46,xZ),[[Nt,r.value]])]),_:3},8,["name","onBeforeLeave"]))}}),MZ=NZ;const Er={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},Qc=16;let RZ=1;const $s=function(e={},t){if(!Mt)return{close:()=>{}};(De(e)||Ht(e))&&(e={message:e});const n=e.position||"top-right";let a=e.offset||0;Er[n].forEach(({vm:d})=>{var f;a+=(((f=d.el)==null?void 0:f.offsetHeight)||0)+Qc}),a+=Qc;const o=`notification_${RZ++}`,l=e.onClose,s={...e,offset:a,id:o,onClose:()=>{IZ(o,n,l)}};let r=document.body;fa(e.appendTo)?r=e.appendTo:De(e.appendTo)&&(r=document.querySelector(e.appendTo)),fa(r)||(ft("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),r=document.body);const u=document.createElement("div"),c=J(MZ,s,ze(s.message)?s.message:Ht(s.message)?()=>s.message:null);return c.appContext=xt(t)?$s._context:t,c.props.onDestroy=()=>{Al(null,u)},Al(c,u),Er[n].push({vm:c}),r.appendChild(u.firstElementChild),{close:()=>{c.component.exposed.visible.value=!1}}};RE.forEach(e=>{$s[e]=(t={},n)=>((De(t)||Ht(t))&&(t={message:t}),$s({...t,type:e},n))});function IZ(e,t,n){const a=Er[t],o=a.findIndex(({vm:c})=>{var d;return((d=c.component)==null?void 0:d.props.id)===e});if(o===-1)return;const{vm:l}=a[o];if(!l)return;n==null||n(l);const s=l.el.offsetHeight,r=t.split("-")[0];a.splice(o,1);const u=a.length;if(!(u<1))for(let c=o;c{t.component.exposed.visible.value=!1})}function PZ(e="top-right"){var n,a,o,l;let t=((o=(a=(n=Er[e][0])==null?void 0:n.vm.component)==null?void 0:a.props)==null?void 0:o.offset)||0;for(const{vm:s}of Er[e])s.component.props.offset=t,t+=(((l=s.el)==null?void 0:l.offsetHeight)||0)+Qc}$s.closeAll=_Z;$s.updateOffsets=PZ;$s._context=null;const AZ=QC($s,"$notify");var LZ=[eP,TA,AL,lY,zL,HL,qL,ES,o6,l6,$n,RS,UD,XD,dV,fV,sB,f2,dB,Za,OV,zh,CB,LB,DB,zd,E2,dF,d6,yF,bF,wF,CF,SF,tz,L2,cz,dz,Tz,W2,Bz,TH,$H,OH,Q2,E8,x8,Be,m9,ek,Dn,tk,_9,B9,tK,nK,aK,oK,cK,WK,GK,aW,yS,ik,d2,FV,BV,yW,SW,yB,Ga,zl,Vc,TD,c7,m7,g7,D7,H7,Ok,Z7,oj,lj,hj,kU,EU,oY,yY,bY,Xo,mm,eD,$Y,IY,_Y,_n,UY,bm,vq,Mq,aG,pG,VG,BG,qG,GG,nX,hX,NX,MX],DZ=[BX,WX,iZ,SZ,AZ,rk],Om=IX([...LZ,...DZ]);Om.install;Om.version;var VZ=Om;const BZ=["title"],FZ=ie({__name:"App",setup(e){const t=A(!1);function n(){t.value=!t.value,document.documentElement.setAttribute("data-theme",t.value?"dark":""),localStorage.setItem("theme",t.value?"dark":"light")}return mt(()=>{const a=localStorage.getItem("theme");(a==="dark"||!a&&window.matchMedia("(prefers-color-scheme: dark)").matches)&&(t.value=!0,document.documentElement.setAttribute("data-theme","dark"))}),(a,o)=>{const l=Ot("router-view");return x(),B(He,null,[J(l),j("button",{class:"theme-toggle",onClick:n,title:t.value?"切换亮色":"切换暗色"},ke(t.value?"☀️":"🌙"),9,BZ)],64)}}}),zZ="modulepreload",HZ=function(e){return"/"+e},p0={},io=function(t,n,a){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),r=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(n.map(u=>{if(u=HZ(u),u in p0)return;p0[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":zZ,c||(f.as="script"),f.crossOrigin="",f.href=u,r&&f.setAttribute("nonce",r),document.head.appendChild(f),c)return new Promise((p,g)=>{f.addEventListener("load",p),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function l(s){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=s,window.dispatchEvent(r),!r.defaultPrevented)throw s}return o.then(s=>{for(const r of s||[])r.status==="rejected"&&l(r.reason);return t().catch(l)})};/*! + * vue-router v4.6.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */const Ys=typeof document<"u";function IE(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function KZ(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&IE(e.default)}const Zt=Object.assign;function Uf(e,t){const n={};for(const a in t){const o=t[a];n[a]=Ja(o)?o.map(e):e(o)}return n}const yi=()=>{},Ja=Array.isArray;function v0(e,t){const n={};for(const a in e)n[a]=a in t?t[a]:e[a];return n}const _E=/#/g,WZ=/&/g,jZ=/\//g,UZ=/=/g,YZ=/\?/g,PE=/\+/g,qZ=/%5B/g,GZ=/%5D/g,AE=/%5E/g,XZ=/%60/g,LE=/%7B/g,ZZ=/%7C/g,DE=/%7D/g,JZ=/%20/g;function Nm(e){return e==null?"":encodeURI(""+e).replace(ZZ,"|").replace(qZ,"[").replace(GZ,"]")}function QZ(e){return Nm(e).replace(LE,"{").replace(DE,"}").replace(AE,"^")}function hv(e){return Nm(e).replace(PE,"%2B").replace(JZ,"+").replace(_E,"%23").replace(WZ,"%26").replace(XZ,"`").replace(LE,"{").replace(DE,"}").replace(AE,"^")}function eJ(e){return hv(e).replace(UZ,"%3D")}function tJ(e){return Nm(e).replace(_E,"%23").replace(YZ,"%3F")}function nJ(e){return tJ(e).replace(jZ,"%2F")}function qi(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const aJ=/\/$/,oJ=e=>e.replace(aJ,"");function Yf(e,t,n="/"){let a,o={},l="",s="";const r=t.indexOf("#");let u=t.indexOf("?");return u=r>=0&&u>r?-1:u,u>=0&&(a=t.slice(0,u),l=t.slice(u,r>0?r:t.length),o=e(l.slice(1))),r>=0&&(a=a||t.slice(0,r),s=t.slice(r,t.length)),a=iJ(a??t,n),{fullPath:a+l+s,path:a,query:o,hash:qi(s)}}function lJ(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function h0(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function sJ(e,t,n){const a=t.matched.length-1,o=n.matched.length-1;return a>-1&&a===o&&xr(t.matched[a],n.matched[o])&&VE(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function xr(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function VE(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!rJ(e[n],t[n]))return!1;return!0}function rJ(e,t){return Ja(e)?m0(e,t):Ja(t)?m0(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function m0(e,t){return Ja(t)?e.length===t.length&&e.every((n,a)=>n===t[a]):e.length===1&&e[0]===t}function iJ(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),a=e.split("/"),o=a[a.length-1];(o===".."||o===".")&&a.push("");let l=n.length-1,s,r;for(s=0;s1&&l--;else break;return n.slice(0,l).join("/")+"/"+a.slice(s).join("/")}const gl={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let mv=function(e){return e.pop="pop",e.push="push",e}({}),qf=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function uJ(e){if(!e)if(Ys){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),oJ(e)}const cJ=/^[^#]+#/;function dJ(e,t){return e.replace(cJ,"#")+t}function fJ(e,t){const n=document.documentElement.getBoundingClientRect(),a=e.getBoundingClientRect();return{behavior:t.behavior,left:a.left-n.left-(t.left||0),top:a.top-n.top-(t.top||0)}}const Yd=()=>({left:window.scrollX,top:window.scrollY});function pJ(e){let t;if("el"in e){const n=e.el,a=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?a?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=fJ(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function g0(e,t){return(history.state?history.state.position-t:-1)+e}const gv=new Map;function vJ(e,t){gv.set(e,t)}function hJ(e){const t=gv.get(e);return gv.delete(e),t}function mJ(e){return typeof e=="string"||e&&typeof e=="object"}function BE(e){return typeof e=="string"||typeof e=="symbol"}let wn=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const FE=Symbol("");wn.MATCHER_NOT_FOUND+"",wn.NAVIGATION_GUARD_REDIRECT+"",wn.NAVIGATION_ABORTED+"",wn.NAVIGATION_CANCELLED+"",wn.NAVIGATION_DUPLICATED+"";function Tr(e,t){return Zt(new Error,{type:e,[FE]:!0},t)}function Do(e,t){return e instanceof Error&&FE in e&&(t==null||!!(e.type&t))}const gJ=["params","query","hash"];function yJ(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of gJ)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function bJ(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let a=0;ao&&hv(o)):[a&&hv(a)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function wJ(e){const t={};for(const n in e){const a=e[n];a!==void 0&&(t[n]=Ja(a)?a.map(o=>o==null?null:""+o):a==null?a:""+a)}return t}const CJ=Symbol(""),b0=Symbol(""),qd=Symbol(""),Mm=Symbol(""),yv=Symbol("");function Xr(){let e=[];function t(a){return e.push(a),()=>{const o=e.indexOf(a);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function El(e,t,n,a,o,l=s=>s()){const s=a&&(a.enterCallbacks[o]=a.enterCallbacks[o]||[]);return()=>new Promise((r,u)=>{const c=p=>{p===!1?u(Tr(wn.NAVIGATION_ABORTED,{from:n,to:t})):p instanceof Error?u(p):mJ(p)?u(Tr(wn.NAVIGATION_GUARD_REDIRECT,{from:t,to:p})):(s&&a.enterCallbacks[o]===s&&typeof p=="function"&&s.push(p),r())},d=l(()=>e.call(a&&a.instances[o],t,n,c));let f=Promise.resolve(d);e.length<3&&(f=f.then(c)),f.catch(p=>u(p))})}function Gf(e,t,n,a,o=l=>l()){const l=[];for(const s of e)for(const r in s.components){let u=s.components[r];if(!(t!=="beforeRouteEnter"&&!s.instances[r]))if(IE(u)){const c=(u.__vccOpts||u)[t];c&&l.push(El(c,n,a,s,r,o))}else{let c=u();l.push(()=>c.then(d=>{if(!d)throw new Error(`Couldn't resolve component "${r}" at "${s.path}"`);const f=KZ(d)?d.default:d;s.mods[r]=d,s.components[r]=f;const p=(f.__vccOpts||f)[t];return p&&El(p,n,a,s,r,o)()}))}}return l}function SJ(e,t){const n=[],a=[],o=[],l=Math.max(t.matched.length,e.matched.length);for(let s=0;sxr(c,r))?a.push(r):n.push(r));const u=e.matched[s];u&&(t.matched.find(c=>xr(c,u))||o.push(u))}return[n,a,o]}/*! + * vue-router v4.6.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let kJ=()=>location.protocol+"//"+location.host;function zE(e,t){const{pathname:n,search:a,hash:o}=t,l=e.indexOf("#");if(l>-1){let s=o.includes(e.slice(l))?e.slice(l).length:1,r=o.slice(s);return r[0]!=="/"&&(r="/"+r),h0(r,"")}return h0(n,e)+a+o}function EJ(e,t,n,a){let o=[],l=[],s=null;const r=({state:p})=>{const g=zE(e,location),v=n.value,h=t.value;let m=0;if(p){if(n.value=g,t.value=p,s&&s===v){s=null;return}m=h?p.position-h.position:0}else a(g);o.forEach(y=>{y(n.value,v,{delta:m,type:mv.pop,direction:m?m>0?qf.forward:qf.back:qf.unknown})})};function u(){s=n.value}function c(p){o.push(p);const g=()=>{const v=o.indexOf(p);v>-1&&o.splice(v,1)};return l.push(g),g}function d(){if(document.visibilityState==="hidden"){const{history:p}=window;if(!p.state)return;p.replaceState(Zt({},p.state,{scroll:Yd()}),"")}}function f(){for(const p of l)p();l=[],window.removeEventListener("popstate",r),window.removeEventListener("pagehide",d),document.removeEventListener("visibilitychange",d)}return window.addEventListener("popstate",r),window.addEventListener("pagehide",d),document.addEventListener("visibilitychange",d),{pauseListeners:u,listen:c,destroy:f}}function w0(e,t,n,a=!1,o=!1){return{back:e,current:t,forward:n,replaced:a,position:window.history.length,scroll:o?Yd():null}}function xJ(e){const{history:t,location:n}=window,a={value:zE(e,n)},o={value:t.state};o.value||l(a.value,{back:null,current:a.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function l(u,c,d){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+u:kJ()+e+u;try{t[d?"replaceState":"pushState"](c,"",p),o.value=c}catch(g){console.error(g),n[d?"replace":"assign"](p)}}function s(u,c){l(u,Zt({},t.state,w0(o.value.back,u,o.value.forward,!0),c,{position:o.value.position}),!0),a.value=u}function r(u,c){const d=Zt({},o.value,t.state,{forward:u,scroll:Yd()});l(d.current,d,!0),l(u,Zt({},w0(a.value,u,null),{position:d.position+1},c),!1),a.value=u}return{location:a,state:o,push:r,replace:s}}function TJ(e){e=uJ(e);const t=xJ(e),n=EJ(e,t.state,t.location,t.replace);function a(l,s=!0){s||n.pauseListeners(),history.go(l)}const o=Zt({location:"",base:e,go:a,createHref:dJ.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}let us=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Rn=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Rn||{});const $J={type:us.Static,value:""},OJ=/[a-zA-Z0-9_]/;function NJ(e){if(!e)return[[]];if(e==="/")return[[$J]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(g){throw new Error(`ERR (${n})/"${c}": ${g}`)}let n=Rn.Static,a=n;const o=[];let l;function s(){l&&o.push(l),l=[]}let r=0,u,c="",d="";function f(){c&&(n===Rn.Static?l.push({type:us.Static,value:c}):n===Rn.Param||n===Rn.ParamRegExp||n===Rn.ParamRegExpEnd?(l.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),l.push({type:us.Param,value:c,regexp:d,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),c="")}function p(){c+=u}for(;rt.length?t.length===1&&t[0]===aa.Static+aa.Segment?1:-1:0}function HE(e,t){let n=0;const a=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const PJ={strict:!1,end:!0,sensitive:!1};function AJ(e,t,n){const a=IJ(NJ(e.path),n),o=Zt(a,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function LJ(e,t){const n=[],a=new Map;t=v0(PJ,t);function o(f){return a.get(f)}function l(f,p,g){const v=!g,h=E0(f);h.aliasOf=g&&g.record;const m=v0(t,f),y=[h];if("alias"in f){const C=typeof f.alias=="string"?[f.alias]:f.alias;for(const k of C)y.push(E0(Zt({},h,{components:g?g.record.components:h.components,path:k,aliasOf:g?g.record:h})))}let b,w;for(const C of y){const{path:k}=C;if(p&&k[0]!=="/"){const E=p.record.path,T=E[E.length-1]==="/"?"":"/";C.path=p.record.path+(k&&T+k)}if(b=AJ(C,p,m),g?g.alias.push(b):(w=w||b,w!==b&&w.alias.push(b),v&&f.name&&!x0(b)&&s(f.name)),KE(b)&&u(b),h.children){const E=h.children;for(let T=0;T{s(w)}:yi}function s(f){if(BE(f)){const p=a.get(f);p&&(a.delete(f),n.splice(n.indexOf(p),1),p.children.forEach(s),p.alias.forEach(s))}else{const p=n.indexOf(f);p>-1&&(n.splice(p,1),f.record.name&&a.delete(f.record.name),f.children.forEach(s),f.alias.forEach(s))}}function r(){return n}function u(f){const p=BJ(f,n);n.splice(p,0,f),f.record.name&&!x0(f)&&a.set(f.record.name,f)}function c(f,p){let g,v={},h,m;if("name"in f&&f.name){if(g=a.get(f.name),!g)throw Tr(wn.MATCHER_NOT_FOUND,{location:f});m=g.record.name,v=Zt(k0(p.params,g.keys.filter(w=>!w.optional).concat(g.parent?g.parent.keys.filter(w=>w.optional):[]).map(w=>w.name)),f.params&&k0(f.params,g.keys.map(w=>w.name))),h=g.stringify(v)}else if(f.path!=null)h=f.path,g=n.find(w=>w.re.test(h)),g&&(v=g.parse(h),m=g.record.name);else{if(g=p.name?a.get(p.name):n.find(w=>w.re.test(p.path)),!g)throw Tr(wn.MATCHER_NOT_FOUND,{location:f,currentLocation:p});m=g.record.name,v=Zt({},p.params,f.params),h=g.stringify(v)}const y=[];let b=g;for(;b;)y.unshift(b.record),b=b.parent;return{name:m,path:h,params:v,matched:y,meta:VJ(y)}}e.forEach(f=>l(f));function d(){n.length=0,a.clear()}return{addRoute:l,resolve:c,removeRoute:s,clearRoutes:d,getRoutes:r,getRecordMatcher:o}}function k0(e,t){const n={};for(const a of t)a in e&&(n[a]=e[a]);return n}function E0(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:DJ(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function DJ(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const a in e.components)t[a]=typeof n=="object"?n[a]:n;return t}function x0(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function VJ(e){return e.reduce((t,n)=>Zt(t,n.meta),{})}function BJ(e,t){let n=0,a=t.length;for(;n!==a;){const l=n+a>>1;HE(e,t[l])<0?a=l:n=l+1}const o=FJ(e);return o&&(a=t.lastIndexOf(o,a-1)),a}function FJ(e){let t=e;for(;t=t.parent;)if(KE(t)&&HE(e,t)===0)return t}function KE({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function T0(e){const t=_e(qd),n=_e(Mm),a=S(()=>{const u=i(e.to);return t.resolve(u)}),o=S(()=>{const{matched:u}=a.value,{length:c}=u,d=u[c-1],f=n.matched;if(!d||!f.length)return-1;const p=f.findIndex(xr.bind(null,d));if(p>-1)return p;const g=$0(u[c-2]);return c>1&&$0(d)===g&&f[f.length-1].path!==g?f.findIndex(xr.bind(null,u[c-2])):p}),l=S(()=>o.value>-1&&jJ(n.params,a.value.params)),s=S(()=>o.value>-1&&o.value===n.matched.length-1&&VE(n.params,a.value.params));function r(u={}){if(WJ(u)){const c=t[i(e.replace)?"replace":"push"](i(e.to)).catch(yi);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:a,href:S(()=>a.value.href),isActive:l,isExactActive:s,navigate:r}}function zJ(e){return e.length===1?e[0]:e}const HJ=ie({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:T0,setup(e,{slots:t}){const n=Rt(T0(e)),{options:a}=_e(qd),o=S(()=>({[O0(e.activeClass,a.linkActiveClass,"router-link-active")]:n.isActive,[O0(e.exactActiveClass,a.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const l=t.default&&zJ(t.default(n));return e.custom?l:Ye("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},l)}}}),KJ=HJ;function WJ(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function jJ(e,t){for(const n in t){const a=t[n],o=e[n];if(typeof a=="string"){if(a!==o)return!1}else if(!Ja(o)||o.length!==a.length||a.some((l,s)=>l.valueOf()!==o[s].valueOf()))return!1}return!0}function $0(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const O0=(e,t,n)=>e??t??n,UJ=ie({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const a=_e(yv),o=S(()=>e.route||a.value),l=_e(b0,0),s=S(()=>{let c=i(l);const{matched:d}=o.value;let f;for(;(f=d[c])&&!f.components;)c++;return c}),r=S(()=>o.value.matched[s.value]);bt(b0,S(()=>s.value+1)),bt(CJ,r),bt(yv,o);const u=A();return fe(()=>[u.value,r.value,e.name],([c,d,f],[p,g,v])=>{d&&(d.instances[f]=c,g&&g!==d&&c&&c===p&&(d.leaveGuards.size||(d.leaveGuards=g.leaveGuards),d.updateGuards.size||(d.updateGuards=g.updateGuards))),c&&d&&(!g||!xr(d,g)||!p)&&(d.enterCallbacks[f]||[]).forEach(h=>h(c))},{flush:"post"}),()=>{const c=o.value,d=e.name,f=r.value,p=f&&f.components[d];if(!p)return N0(n.default,{Component:p,route:c});const g=f.props[d],v=g?g===!0?c.params:typeof g=="function"?g(c):g:null,m=Ye(p,Zt({},v,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(f.instances[d]=null)},ref:u}));return N0(n.default,{Component:m,route:c})||m}}});function N0(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const YJ=UJ;function qJ(e){const t=LJ(e.routes,e),n=e.parseQuery||bJ,a=e.stringifyQuery||y0,o=e.history,l=Xr(),s=Xr(),r=Xr(),u=Wt(gl);let c=gl;Ys&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=Uf.bind(null,te=>""+te),f=Uf.bind(null,nJ),p=Uf.bind(null,qi);function g(te,de){let se,Y;return BE(te)?(se=t.getRecordMatcher(te),Y=de):Y=te,t.addRoute(Y,se)}function v(te){const de=t.getRecordMatcher(te);de&&t.removeRoute(de)}function h(){return t.getRoutes().map(te=>te.record)}function m(te){return!!t.getRecordMatcher(te)}function y(te,de){if(de=Zt({},de||u.value),typeof te=="string"){const oe=Yf(n,te,de.path),ce=t.resolve({path:oe.path},de),ge=o.createHref(oe.fullPath);return Zt(oe,ce,{params:p(ce.params),hash:qi(oe.hash),redirectedFrom:void 0,href:ge})}let se;if(te.path!=null)se=Zt({},te,{path:Yf(n,te.path,de.path).path});else{const oe=Zt({},te.params);for(const ce in oe)oe[ce]==null&&delete oe[ce];se=Zt({},te,{params:f(oe)}),de.params=f(de.params)}const Y=t.resolve(se,de),G=te.hash||"";Y.params=d(p(Y.params));const V=lJ(a,Zt({},te,{hash:QZ(G),path:Y.path})),Z=o.createHref(V);return Zt({fullPath:V,hash:G,query:a===y0?wJ(te.query):te.query||{}},Y,{redirectedFrom:void 0,href:Z})}function b(te){return typeof te=="string"?Yf(n,te,u.value.path):Zt({},te)}function w(te,de){if(c!==te)return Tr(wn.NAVIGATION_CANCELLED,{from:de,to:te})}function C(te){return T(te)}function k(te){return C(Zt(b(te),{replace:!0}))}function E(te,de){const se=te.matched[te.matched.length-1];if(se&&se.redirect){const{redirect:Y}=se;let G=typeof Y=="function"?Y(te,de):Y;return typeof G=="string"&&(G=G.includes("?")||G.includes("#")?G=b(G):{path:G},G.params={}),Zt({query:te.query,hash:te.hash,params:G.path!=null?{}:te.params},G)}}function T(te,de){const se=c=y(te),Y=u.value,G=te.state,V=te.force,Z=te.replace===!0,oe=E(se,Y);if(oe)return T(Zt(b(oe),{state:typeof oe=="object"?Zt({},G,oe.state):G,force:V,replace:Z}),de||se);const ce=se;ce.redirectedFrom=de;let ge;return!V&&sJ(a,Y,se)&&(ge=Tr(wn.NAVIGATION_DUPLICATED,{to:ce,from:Y}),H(Y,Y,!0,!1)),(ge?Promise.resolve(ge):O(ce,Y)).catch(me=>Do(me)?Do(me,wn.NAVIGATION_GUARD_REDIRECT)?me:z(me):I(me,ce,Y)).then(me=>{if(me){if(Do(me,wn.NAVIGATION_GUARD_REDIRECT))return T(Zt({replace:Z},b(me.to),{state:typeof me.to=="object"?Zt({},G,me.to.state):G,force:V}),de||ce)}else me=P(ce,Y,!0,Z,G);return _(ce,Y,me),me})}function $(te,de){const se=w(te,de);return se?Promise.reject(se):Promise.resolve()}function N(te){const de=Q.values().next().value;return de&&typeof de.runWithContext=="function"?de.runWithContext(te):te()}function O(te,de){let se;const[Y,G,V]=SJ(te,de);se=Gf(Y.reverse(),"beforeRouteLeave",te,de);for(const oe of Y)oe.leaveGuards.forEach(ce=>{se.push(El(ce,te,de))});const Z=$.bind(null,te,de);return se.push(Z),ue(se).then(()=>{se=[];for(const oe of l.list())se.push(El(oe,te,de));return se.push(Z),ue(se)}).then(()=>{se=Gf(G,"beforeRouteUpdate",te,de);for(const oe of G)oe.updateGuards.forEach(ce=>{se.push(El(ce,te,de))});return se.push(Z),ue(se)}).then(()=>{se=[];for(const oe of V)if(oe.beforeEnter)if(Ja(oe.beforeEnter))for(const ce of oe.beforeEnter)se.push(El(ce,te,de));else se.push(El(oe.beforeEnter,te,de));return se.push(Z),ue(se)}).then(()=>(te.matched.forEach(oe=>oe.enterCallbacks={}),se=Gf(V,"beforeRouteEnter",te,de,N),se.push(Z),ue(se))).then(()=>{se=[];for(const oe of s.list())se.push(El(oe,te,de));return se.push(Z),ue(se)}).catch(oe=>Do(oe,wn.NAVIGATION_CANCELLED)?oe:Promise.reject(oe))}function _(te,de,se){r.list().forEach(Y=>N(()=>Y(te,de,se)))}function P(te,de,se,Y,G){const V=w(te,de);if(V)return V;const Z=de===gl,oe=Ys?history.state:{};se&&(Y||Z?o.replace(te.fullPath,Zt({scroll:Z&&oe&&oe.scroll},G)):o.push(te.fullPath,G)),u.value=te,H(te,de,se,Z),z()}let D;function W(){D||(D=o.listen((te,de,se)=>{if(!ee.listening)return;const Y=y(te),G=E(Y,ee.currentRoute.value);if(G){T(Zt(G,{replace:!0,force:!0}),Y).catch(yi);return}c=Y;const V=u.value;Ys&&vJ(g0(V.fullPath,se.delta),Yd()),O(Y,V).catch(Z=>Do(Z,wn.NAVIGATION_ABORTED|wn.NAVIGATION_CANCELLED)?Z:Do(Z,wn.NAVIGATION_GUARD_REDIRECT)?(T(Zt(b(Z.to),{force:!0}),Y).then(oe=>{Do(oe,wn.NAVIGATION_ABORTED|wn.NAVIGATION_DUPLICATED)&&!se.delta&&se.type===mv.pop&&o.go(-1,!1)}).catch(yi),Promise.reject()):(se.delta&&o.go(-se.delta,!1),I(Z,Y,V))).then(Z=>{Z=Z||P(Y,V,!1),Z&&(se.delta&&!Do(Z,wn.NAVIGATION_CANCELLED)?o.go(-se.delta,!1):se.type===mv.pop&&Do(Z,wn.NAVIGATION_ABORTED|wn.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),_(Y,V,Z)}).catch(yi)}))}let U=Xr(),F=Xr(),R;function I(te,de,se){z(te);const Y=F.list();return Y.length?Y.forEach(G=>G(te,de,se)):console.error(te),Promise.reject(te)}function L(){return R&&u.value!==gl?Promise.resolve():new Promise((te,de)=>{U.add([te,de])})}function z(te){return R||(R=!te,W(),U.list().forEach(([de,se])=>te?se(te):de()),U.reset()),te}function H(te,de,se,Y){const{scrollBehavior:G}=e;if(!Ys||!G)return Promise.resolve();const V=!se&&hJ(g0(te.fullPath,0))||(Y||!se)&&history.state&&history.state.scroll||null;return Ae().then(()=>G(te,de,V)).then(Z=>Z&&pJ(Z)).catch(Z=>I(Z,te,de))}const K=te=>o.go(te);let q;const Q=new Set,ee={currentRoute:u,listening:!0,addRoute:g,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:m,getRoutes:h,resolve:y,options:e,push:C,replace:k,go:K,back:()=>K(-1),forward:()=>K(1),beforeEach:l.add,beforeResolve:s.add,afterEach:r.add,onError:F.add,isReady:L,install(te){te.component("RouterLink",KJ),te.component("RouterView",YJ),te.config.globalProperties.$router=ee,Object.defineProperty(te.config.globalProperties,"$route",{enumerable:!0,get:()=>i(u)}),Ys&&!q&&u.value===gl&&(q=!0,C(o.location).catch(Y=>{}));const de={};for(const Y in gl)Object.defineProperty(de,Y,{get:()=>u.value[Y],enumerable:!0});te.provide(qd,ee),te.provide(Mm,rd(de)),te.provide(yv,u);const se=te.unmount;Q.add(te),te.unmount=function(){Q.delete(te),Q.size<1&&(c=gl,D&&D(),D=null,u.value=gl,q=!1,R=!1),se()}}};function ue(te){return te.reduce((de,se)=>de.then(()=>N(se)),Promise.resolve())}return ee}function oQ(){return _e(qd)}function lQ(e){return _e(Mm)}const GJ=[{path:"/",name:"home",component:()=>io(()=>import("./HomePage-6khP6FBC.js"),__vite__mapDeps([0,1,2]))},{path:"/search",name:"search",component:()=>io(()=>import("./SearchResult-An38JvmS.js"),__vite__mapDeps([3,4,5,1,6]))},{path:"/result/:id",name:"result-detail",component:()=>io(()=>import("./ResultDetail-CbQPmE-g.js"),__vite__mapDeps([7,8,5,1,9,10]))},{path:"/admin/login",name:"admin-login",component:()=>io(()=>import("./AdminLogin-xBXneZTD.js"),__vite__mapDeps([11,1,12]))},{path:"/admin",component:()=>io(()=>import("./AdminLayout-CxD2j-KS.js"),__vite__mapDeps([13,1,14])),meta:{requiresAuth:!0},children:[{path:"",redirect:"/admin/dashboard"},{path:"dashboard",name:"admin-dashboard",component:()=>io(()=>import("./AdminDashboard-CYT9FxBx.js"),__vite__mapDeps([15,1,16,5,8,9,4,17,18,19,20,21,22]))},{path:"cloud-configs",name:"admin-cloud-configs",component:()=>io(()=>import("./CloudConfig-VN8uR29R.js"),__vite__mapDeps([16,5,1,8,9,4,17]))},{path:"cleanup",name:"admin-cleanup",component:()=>io(()=>import("./Cleanup-GlGrtKk0.js"),__vite__mapDeps([23,1,24]))},{path:"system",name:"admin-system",component:()=>io(()=>import("./SystemConfig-DRttMhxK.js"),__vite__mapDeps([18,1,19]))},{path:"save-records",name:"admin-save-records",component:()=>io(()=>import("./SaveRecords-AwnaSQhs.js"),__vite__mapDeps([20,1,21]))}]}],WE=qJ({history:TJ(),routes:GJ});WE.beforeEach((e,t,n)=>{const a=localStorage.getItem("admin_token");e.meta.requiresAuth&&!a?n("/admin/login"):n()});const Gd=lw(FZ);Gd.use(y$());Gd.use(WE);Gd.use(VZ);Gd.mount("#app");export{vP as A,Ae as B,ZJ as C,XJ as D,iZ as E,He as F,eQ as G,JJ as H,tQ as I,dt as J,Nt as K,Oo as L,aQ as M,Pv as N,QJ as O,nQ as P,x as a,j as b,B as c,ie as d,le as e,J as f,en as g,A as h,Rt as i,Ot as j,i as k,St as l,$r as m,M as n,mt as o,je as p,Xe as q,Ct as r,QP as s,ke as t,oQ as u,S as v,ne as w,fe as x,re as y,lQ as z}; diff --git a/source_clean/frontend/assets/index-D-B10deg.css b/source_clean/frontend/assets/index-D-B10deg.css new file mode 100644 index 0000000..457758e --- /dev/null +++ b/source_clean/frontend/assets/index-D-B10deg.css @@ -0,0 +1 @@ +:root{--el-color-white:#fff;--el-color-black:#000;--el-color-primary-rgb:64, 158, 255;--el-color-success-rgb:103, 194, 58;--el-color-warning-rgb:230, 162, 60;--el-color-danger-rgb:245, 108, 108;--el-color-error-rgb:245, 108, 108;--el-color-info-rgb:144, 147, 153;--el-font-size-extra-large:20px;--el-font-size-large:18px;--el-font-size-medium:16px;--el-font-size-base:14px;--el-font-size-small:13px;--el-font-size-extra-small:12px;--el-font-family:"Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;--el-font-weight-primary:500;--el-font-line-height-primary:24px;--el-index-normal:1;--el-index-top:1000;--el-index-popper:2000;--el-border-radius-base:4px;--el-border-radius-small:2px;--el-border-radius-round:20px;--el-border-radius-circle:100%;--el-transition-duration:.3s;--el-transition-duration-fast:.2s;--el-transition-function-ease-in-out-bezier:cubic-bezier(.645, .045, .355, 1);--el-transition-function-fast-bezier:cubic-bezier(.23, 1, .32, 1);--el-transition-all:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);--el-transition-fade:opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-md-fade:transform var(--el-transition-duration) var(--el-transition-function-fast-bezier), opacity var(--el-transition-duration) var(--el-transition-function-fast-bezier);--el-transition-fade-linear:opacity var(--el-transition-duration-fast) linear;--el-transition-border:border-color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-box-shadow:box-shadow var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-transition-color:color var(--el-transition-duration-fast) var(--el-transition-function-ease-in-out-bezier);--el-component-size-large:40px;--el-component-size:32px;--el-component-size-small:24px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--el-color-primary:#409eff;--el-color-primary-light-3:#79bbff;--el-color-primary-light-5:#a0cfff;--el-color-primary-light-7:#c6e2ff;--el-color-primary-light-8:#d9ecff;--el-color-primary-light-9:#ecf5ff;--el-color-primary-dark-2:#337ecc;--el-color-success:#67c23a;--el-color-success-light-3:#95d475;--el-color-success-light-5:#b3e19d;--el-color-success-light-7:#d1edc4;--el-color-success-light-8:#e1f3d8;--el-color-success-light-9:#f0f9eb;--el-color-success-dark-2:#529b2e;--el-color-warning:#e6a23c;--el-color-warning-light-3:#eebe77;--el-color-warning-light-5:#f3d19e;--el-color-warning-light-7:#f8e3c5;--el-color-warning-light-8:#faecd8;--el-color-warning-light-9:#fdf6ec;--el-color-warning-dark-2:#b88230;--el-color-danger:#f56c6c;--el-color-danger-light-3:#f89898;--el-color-danger-light-5:#fab6b6;--el-color-danger-light-7:#fcd3d3;--el-color-danger-light-8:#fde2e2;--el-color-danger-light-9:#fef0f0;--el-color-danger-dark-2:#c45656;--el-color-error:#f56c6c;--el-color-error-light-3:#f89898;--el-color-error-light-5:#fab6b6;--el-color-error-light-7:#fcd3d3;--el-color-error-light-8:#fde2e2;--el-color-error-light-9:#fef0f0;--el-color-error-dark-2:#c45656;--el-color-info:#909399;--el-color-info-light-3:#b1b3b8;--el-color-info-light-5:#c8c9cc;--el-color-info-light-7:#dedfe0;--el-color-info-light-8:#e9e9eb;--el-color-info-light-9:#f4f4f5;--el-color-info-dark-2:#73767a;--el-bg-color:#fff;--el-bg-color-page:#f2f3f5;--el-bg-color-overlay:#fff;--el-text-color-primary:#303133;--el-text-color-regular:#606266;--el-text-color-secondary:#909399;--el-text-color-placeholder:#a8abb2;--el-text-color-disabled:#c0c4cc;--el-border-color:#dcdfe6;--el-border-color-light:#e4e7ed;--el-border-color-lighter:#ebeef5;--el-border-color-extra-light:#f2f6fc;--el-border-color-dark:#d4d7de;--el-border-color-darker:#cdd0d6;--el-fill-color:#f0f2f5;--el-fill-color-light:#f5f7fa;--el-fill-color-lighter:#fafafa;--el-fill-color-extra-light:#fafcff;--el-fill-color-dark:#ebedf0;--el-fill-color-darker:#e6e8eb;--el-fill-color-blank:#fff;--el-box-shadow:0px 12px 32px 4px #0000000a, 0px 8px 20px #00000014;--el-box-shadow-light:0px 0px 12px #0000001f;--el-box-shadow-lighter:0px 0px 6px #0000001f;--el-box-shadow-dark:0px 16px 48px 16px #00000014, 0px 12px 32px #0000001f, 0px 8px 16px -8px #00000029;--el-disabled-bg-color:var(--el-fill-color-light);--el-disabled-text-color:var(--el-text-color-placeholder);--el-disabled-border-color:var(--el-border-color-light);--el-overlay-color:#000c;--el-overlay-color-light:#000000b3;--el-overlay-color-lighter:#00000080;--el-mask-color:#ffffffe6;--el-mask-color-extra-light:#ffffff4d;--el-border-width:1px;--el-border-style:solid;--el-border-color-hover:var(--el-text-color-disabled);--el-border:var(--el-border-width) var(--el-border-style) var(--el-border-color);--el-svg-monochrome-grey:var(--el-border-color)}.fade-in-linear-enter-active,.fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.fade-in-linear-enter-from,.fade-in-linear-leave-to{opacity:0}.el-fade-in-linear-enter-active,.el-fade-in-linear-leave-active{transition:var(--el-transition-fade-linear)}.el-fade-in-linear-enter-from,.el-fade-in-linear-leave-to{opacity:0}.el-fade-in-enter-active,.el-fade-in-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-fade-in-enter-from,.el-fade-in-leave-active{opacity:0}.el-zoom-in-center-enter-active,.el-zoom-in-center-leave-active{transition:all var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-zoom-in-center-enter-from,.el-zoom-in-center-leave-active{opacity:0;transform:scaleX(0)}.el-zoom-in-top-enter-active,.el-zoom-in-top-leave-active{opacity:1;transition:var(--el-transition-md-fade);transform-origin:top;transform:scaleY(1)}.el-zoom-in-top-enter-active[data-popper-placement^=top],.el-zoom-in-top-leave-active[data-popper-placement^=top]{transform-origin:bottom}.el-zoom-in-top-enter-from,.el-zoom-in-top-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-bottom-enter-active,.el-zoom-in-bottom-leave-active{opacity:1;transition:var(--el-transition-md-fade);transform-origin:bottom;transform:scaleY(1)}.el-zoom-in-bottom-enter-from,.el-zoom-in-bottom-leave-active{opacity:0;transform:scaleY(0)}.el-zoom-in-left-enter-active,.el-zoom-in-left-leave-active{opacity:1;transition:var(--el-transition-md-fade);transform-origin:0 0;transform:scale(1)}.el-zoom-in-left-enter-from,.el-zoom-in-left-leave-active{opacity:0;transform:scale(.45)}.collapse-transition{transition:var(--el-transition-duration) height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.el-collapse-transition-leave-active,.el-collapse-transition-enter-active{transition:var(--el-transition-duration) max-height ease-in-out,var(--el-transition-duration) padding-top ease-in-out,var(--el-transition-duration) padding-bottom ease-in-out}.horizontal-collapse-transition{transition:var(--el-transition-duration) width ease-in-out,var(--el-transition-duration) padding-left ease-in-out,var(--el-transition-duration) padding-right ease-in-out}.el-list-enter-active,.el-list-leave-active{transition:all 1s}.el-list-enter-from,.el-list-leave-to{opacity:0;transform:translateY(-30px)}.el-list-leave-active{position:absolute!important}.el-opacity-transition{transition:opacity var(--el-transition-duration) cubic-bezier(.55,0,.1,1)}.el-icon--right{margin-left:5px}.el-icon--left{margin-right:5px}@keyframes rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.el-icon{--color:inherit;fill:currentColor;width:1em;height:1em;color:var(--color);line-height:1em;font-size:inherit;justify-content:center;align-items:center;display:inline-flex;position:relative}.el-icon.is-loading{animation:2s linear infinite rotating}.el-icon svg{width:1em;height:1em}.el-affix--fixed{position:fixed}.el-alert{--el-alert-padding:8px 16px;--el-alert-border-radius-base:var(--el-border-radius-base);--el-alert-title-font-size:14px;--el-alert-title-with-description-font-size:16px;--el-alert-description-font-size:14px;--el-alert-close-font-size:16px;--el-alert-close-customed-font-size:14px;--el-alert-icon-size:16px;--el-alert-icon-large-size:28px;width:100%;padding:var(--el-alert-padding);box-sizing:border-box;border-radius:var(--el-alert-border-radius-base);background-color:var(--el-color-white);opacity:1;transition:opacity var(--el-transition-duration-fast);align-items:center;margin:0;display:flex;position:relative;overflow:hidden}.el-alert.is-light .el-alert__close-btn{color:var(--el-text-color-placeholder)}.el-alert.is-dark .el-alert__close-btn,.el-alert.is-dark .el-alert__description{color:var(--el-color-white)}.el-alert.is-center{justify-content:center}.el-alert--primary{--el-alert-bg-color:var(--el-color-primary-light-9)}.el-alert--primary.is-light{background-color:var(--el-alert-bg-color);color:var(--el-color-primary)}.el-alert--primary.is-light .el-alert__description{color:var(--el-color-primary)}.el-alert--primary.is-dark{background-color:var(--el-color-primary);color:var(--el-color-white)}.el-alert--success{--el-alert-bg-color:var(--el-color-success-light-9)}.el-alert--success.is-light{background-color:var(--el-alert-bg-color);color:var(--el-color-success)}.el-alert--success.is-light .el-alert__description{color:var(--el-color-success)}.el-alert--success.is-dark{background-color:var(--el-color-success);color:var(--el-color-white)}.el-alert--info{--el-alert-bg-color:var(--el-color-info-light-9)}.el-alert--info.is-light{background-color:var(--el-alert-bg-color);color:var(--el-color-info)}.el-alert--info.is-light .el-alert__description{color:var(--el-color-info)}.el-alert--info.is-dark{background-color:var(--el-color-info);color:var(--el-color-white)}.el-alert--warning{--el-alert-bg-color:var(--el-color-warning-light-9)}.el-alert--warning.is-light{background-color:var(--el-alert-bg-color);color:var(--el-color-warning)}.el-alert--warning.is-light .el-alert__description{color:var(--el-color-warning)}.el-alert--warning.is-dark{background-color:var(--el-color-warning);color:var(--el-color-white)}.el-alert--error{--el-alert-bg-color:var(--el-color-error-light-9)}.el-alert--error.is-light{background-color:var(--el-alert-bg-color);color:var(--el-color-error)}.el-alert--error.is-light .el-alert__description{color:var(--el-color-error)}.el-alert--error.is-dark{background-color:var(--el-color-error);color:var(--el-color-white)}.el-alert__content{flex-direction:column;gap:4px;display:flex}.el-alert .el-alert__icon{font-size:var(--el-alert-icon-size);width:var(--el-alert-icon-size);margin-right:8px}.el-alert .el-alert__icon.is-big{font-size:var(--el-alert-icon-large-size);width:var(--el-alert-icon-large-size);margin-right:12px}.el-alert__title{font-size:var(--el-alert-title-font-size);line-height:24px}.el-alert__title.with-description{font-size:var(--el-alert-title-with-description-font-size)}.el-alert .el-alert__description{font-size:var(--el-alert-description-font-size);margin:0}.el-alert .el-alert__close-btn{font-size:var(--el-alert-close-font-size);opacity:1;cursor:pointer;position:absolute;top:12px;right:16px}.el-alert .el-alert__close-btn.is-customed{font-style:normal;font-size:var(--el-alert-close-customed-font-size);line-height:24px;top:8px}.el-alert-fade-enter-from,.el-alert-fade-leave-active{opacity:0}.el-aside{box-sizing:border-box;width:var(--el-aside-width,300px);flex-shrink:0;overflow:auto}.el-autocomplete{--el-input-text-color:var(--el-text-color-regular);--el-input-border:var(--el-border);--el-input-hover-border:var(--el-border-color-hover);--el-input-focus-border:var(--el-color-primary);--el-input-transparent-border:0 0 0 1px transparent inset;--el-input-border-color:var(--el-border-color);--el-input-border-radius:var(--el-border-radius-base);--el-input-bg-color:var(--el-fill-color-blank);--el-input-icon-color:var(--el-text-color-placeholder);--el-input-placeholder-color:var(--el-text-color-placeholder);--el-input-hover-border-color:var(--el-border-color-hover);--el-input-clear-hover-color:var(--el-text-color-secondary);--el-input-focus-border-color:var(--el-color-primary);--el-input-width:100%;width:var(--el-input-width);display:inline-block;position:relative}.el-autocomplete__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light);box-shadow:var(--el-box-shadow-light)}.el-autocomplete__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-border-color-light)}.el-autocomplete__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-top-color:#0000;border-left-color:#0000}.el-autocomplete__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:#0000;border-right-color:#0000}.el-autocomplete__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:#0000;border-left-color:#0000}.el-autocomplete__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-top-color:#0000;border-right-color:#0000}.el-autocomplete-suggestion{border-radius:var(--el-border-radius-base);box-sizing:border-box}.el-autocomplete-suggestion__header{border-bottom:1px solid var(--el-border-color-lighter);padding:10px}.el-autocomplete-suggestion__footer{border-top:1px solid var(--el-border-color-lighter);padding:10px}.el-autocomplete-suggestion__wrap{box-sizing:border-box;max-height:280px;padding:10px 0}.el-autocomplete-suggestion__list{margin:0;padding:0}.el-autocomplete-suggestion li{cursor:pointer;color:var(--el-text-color-regular);line-height:34px;font-size:var(--el-font-size-base);text-align:left;text-overflow:ellipsis;white-space:nowrap;margin:0;padding:0 20px;list-style:none;overflow:hidden}.el-autocomplete-suggestion li:hover,.el-autocomplete-suggestion li.highlighted{background-color:var(--el-fill-color-light)}.el-autocomplete-suggestion li.divider{border-top:1px solid var(--el-color-black);margin-top:6px}.el-autocomplete-suggestion li.divider:last-child{margin-bottom:-6px}.el-autocomplete-suggestion.is-loading li{cursor:default;height:100px;color:var(--el-text-color-secondary);justify-content:center;align-items:center;font-size:20px;display:flex}.el-autocomplete-suggestion.is-loading li:hover{background-color:var(--el-bg-color-overlay)}.el-avatar{--el-avatar-text-color:var(--el-color-white);--el-avatar-bg-color:var(--el-text-color-disabled);--el-avatar-text-size:14px;--el-avatar-icon-size:18px;--el-avatar-border-radius:var(--el-border-radius-base);--el-avatar-size-large:56px;--el-avatar-size:40px;--el-avatar-size-small:24px;box-sizing:border-box;text-align:center;color:var(--el-avatar-text-color);background:var(--el-avatar-bg-color);width:var(--el-avatar-size);height:var(--el-avatar-size);font-size:var(--el-avatar-text-size);outline:none;justify-content:center;align-items:center;display:inline-flex;overflow:hidden}.el-avatar>img{width:100%;height:100%;display:block}.el-avatar--circle{border-radius:50%}.el-avatar--square{border-radius:var(--el-avatar-border-radius)}.el-avatar--icon{font-size:var(--el-avatar-icon-size)}.el-avatar--small{--el-avatar-size:24px}.el-avatar--large{--el-avatar-size:56px}.el-avatar-group{--el-avatar-group-item-gap:-8px;--el-avatar-group-collapse-item-gap:4px;display:inline-flex}.el-avatar-group .el-avatar{border:1px solid var(--el-border-color-extra-light)}.el-avatar-group .el-avatar:not(:first-child){margin-left:var(--el-avatar-group-item-gap)}.el-avatar-group__collapse-avatars{--el-avatar-group-item-gap:-8px;--el-avatar-group-collapse-item-gap:4px}.el-avatar-group__collapse-avatars .el-avatar:not(:first-child){margin-left:var(--el-avatar-group-collapse-item-gap)}.el-backtop{--el-backtop-bg-color:var(--el-bg-color-overlay);--el-backtop-text-color:var(--el-color-primary);--el-backtop-hover-bg-color:var(--el-border-color-extra-light);background-color:var(--el-backtop-bg-color);width:40px;height:40px;color:var(--el-backtop-text-color);box-shadow:var(--el-box-shadow-lighter);cursor:pointer;z-index:5;border-radius:50%;justify-content:center;align-items:center;font-size:20px;display:flex;position:fixed}.el-backtop:hover{background-color:var(--el-backtop-hover-bg-color)}.el-backtop__icon{font-size:20px}.el-badge{--el-badge-bg-color:var(--el-color-danger);--el-badge-radius:10px;--el-badge-font-size:12px;--el-badge-padding:6px;--el-badge-size:18px;vertical-align:middle;width:-moz-fit-content;width:fit-content;display:inline-block;position:relative}.el-badge__content{background-color:var(--el-badge-bg-color);border-radius:var(--el-badge-radius);color:var(--el-color-white);font-size:var(--el-badge-font-size);height:var(--el-badge-size);padding:0 var(--el-badge-padding);white-space:nowrap;border:1px solid var(--el-bg-color);justify-content:center;align-items:center;display:inline-flex}.el-badge__content.is-fixed{top:0;right:calc(1px + var(--el-badge-size) / 2);z-index:var(--el-index-normal);position:absolute;transform:translateY(-50%)translate(100%)}.el-badge__content.is-fixed.is-dot{right:5px}.el-badge__content.is-dot{border-radius:50%;width:8px;height:8px;padding:0;right:0}.el-badge__content.is-hide-zero{display:none}.el-badge__content--primary{background-color:var(--el-color-primary)}.el-badge__content--success{background-color:var(--el-color-success)}.el-badge__content--warning{background-color:var(--el-color-warning)}.el-badge__content--info{background-color:var(--el-color-info)}.el-badge__content--danger{background-color:var(--el-color-danger)}.el-breadcrumb__separator{color:var(--el-text-color-placeholder);margin:0 9px;font-weight:700}.el-breadcrumb__separator.el-icon{margin:0 6px;font-weight:400}.el-breadcrumb__separator.el-icon svg{vertical-align:middle}.el-breadcrumb__item{float:left;align-items:center;display:inline-flex}.el-breadcrumb__inner{color:var(--el-text-color-regular)}.el-breadcrumb__inner.is-link,.el-breadcrumb__inner a{transition:var(--el-transition-color);color:var(--el-text-color-primary);font-weight:700;text-decoration:none}.el-breadcrumb__inner.is-link:hover,.el-breadcrumb__inner a:hover{color:var(--el-color-primary);cursor:pointer}.el-breadcrumb__item:last-child .el-breadcrumb__inner,.el-breadcrumb__item:last-child .el-breadcrumb__inner:hover,.el-breadcrumb__item:last-child .el-breadcrumb__inner a,.el-breadcrumb__item:last-child .el-breadcrumb__inner a:hover{color:var(--el-text-color-regular);cursor:text;font-weight:400}.el-breadcrumb__item:last-child .el-breadcrumb__separator{display:none}.el-breadcrumb{font-size:14px;line-height:1}.el-breadcrumb:before,.el-breadcrumb:after{content:"";display:table}.el-breadcrumb:after{clear:both}.el-button-group>.el-button+.el-button{margin-left:0}.el-button-group>.el-button:first-child:last-child{border-top-right-radius:var(--el-border-radius-base);border-bottom-right-radius:var(--el-border-radius-base);border-top-left-radius:var(--el-border-radius-base);border-bottom-left-radius:var(--el-border-radius-base)}.el-button-group>.el-button:first-child:last-child.is-round{border-radius:var(--el-border-radius-round)}.el-button-group>.el-button:first-child:last-child.is-circle{border-radius:50%}.el-button-group>.el-button:not(:first-child):not(:last-child){border-radius:0}.el-button-group>.el-button:hover,.el-button-group>.el-button:focus,.el-button-group>.el-button:active,.el-button-group>.el-button.is-active{z-index:1}.el-button-group--horizontal{vertical-align:middle;display:inline-block}.el-button-group--horizontal:before,.el-button-group--horizontal:after{content:"";display:table}.el-button-group--horizontal:after{clear:both}.el-button-group--horizontal>.el-button{float:left;position:relative}.el-button-group--horizontal>.el-button:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.el-button-group--horizontal>.el-button:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.el-button-group--horizontal>.el-button:not(:last-child){margin-right:-1px}.el-button-group--horizontal .el-button--primary:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group--horizontal .el-button--primary:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group--horizontal .el-button--primary:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button-group--horizontal .el-button--success:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group--horizontal .el-button--success:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group--horizontal .el-button--success:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button-group--horizontal .el-button--warning:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group--horizontal .el-button--warning:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group--horizontal .el-button--warning:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button-group--horizontal .el-button--danger:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group--horizontal .el-button--danger:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group--horizontal .el-button--danger:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button-group--horizontal .el-button--info:first-child{border-right-color:var(--el-button-divide-border-color)}.el-button-group--horizontal .el-button--info:last-child{border-left-color:var(--el-button-divide-border-color)}.el-button-group--horizontal .el-button--info:not(:first-child):not(:last-child){border-left-color:var(--el-button-divide-border-color);border-right-color:var(--el-button-divide-border-color)}.el-button-group--horizontal>.el-dropdown>.el-button{border-left-color:var(--el-button-divide-border-color);border-top-left-radius:0;border-bottom-left-radius:0}.el-button-group--vertical{flex-direction:column;align-items:stretch;display:inline-flex}.el-button-group--vertical>.el-button{margin-top:-1px}.el-button-group--vertical>.el-button:first-child{border-bottom-right-radius:0;border-bottom-left-radius:0}.el-button-group--vertical>.el-button:last-child{border-top-left-radius:0;border-top-right-radius:0}.el-button-group--vertical>.el-dropdown{margin-top:-1px}.el-button-group--vertical>.el-dropdown>.el-button{border-left-color:var(--el-button-divide-border-color);border-top-left-radius:0;border-top-right-radius:0}.el-button-group--vertical .el-button--primary:first-child{border-bottom-color:var(--el-button-divide-border-color)}.el-button-group--vertical .el-button--primary:last-child{border-top-color:var(--el-button-divide-border-color)}.el-button-group--vertical .el-button--primary:not(:first-child):not(:last-child){border-top-color:var(--el-button-divide-border-color);border-bottom-color:var(--el-button-divide-border-color)}.el-button-group--vertical .el-button--success:first-child{border-bottom-color:var(--el-button-divide-border-color)}.el-button-group--vertical .el-button--success:last-child{border-top-color:var(--el-button-divide-border-color)}.el-button-group--vertical .el-button--success:not(:first-child):not(:last-child){border-top-color:var(--el-button-divide-border-color);border-bottom-color:var(--el-button-divide-border-color)}.el-button-group--vertical .el-button--warning:first-child{border-bottom-color:var(--el-button-divide-border-color)}.el-button-group--vertical .el-button--warning:last-child{border-top-color:var(--el-button-divide-border-color)}.el-button-group--vertical .el-button--warning:not(:first-child):not(:last-child){border-top-color:var(--el-button-divide-border-color);border-bottom-color:var(--el-button-divide-border-color)}.el-button-group--vertical .el-button--danger:first-child{border-bottom-color:var(--el-button-divide-border-color)}.el-button-group--vertical .el-button--danger:last-child{border-top-color:var(--el-button-divide-border-color)}.el-button-group--vertical .el-button--danger:not(:first-child):not(:last-child){border-top-color:var(--el-button-divide-border-color);border-bottom-color:var(--el-button-divide-border-color)}.el-button-group--vertical .el-button--info:first-child{border-bottom-color:var(--el-button-divide-border-color)}.el-button-group--vertical .el-button--info:last-child{border-top-color:var(--el-button-divide-border-color)}.el-button-group--vertical .el-button--info:not(:first-child):not(:last-child){border-top-color:var(--el-button-divide-border-color);border-bottom-color:var(--el-button-divide-border-color)}.el-button{--el-button-font-weight:var(--el-font-weight-primary);--el-button-border-color:var(--el-border-color);--el-button-bg-color:var(--el-fill-color-blank);--el-button-text-color:var(--el-text-color-regular);--el-button-disabled-text-color:var(--el-disabled-text-color);--el-button-disabled-bg-color:var(--el-fill-color-blank);--el-button-disabled-border-color:var(--el-border-color-light);--el-button-divide-border-color:#ffffff80;--el-button-hover-text-color:var(--el-color-primary);--el-button-hover-bg-color:var(--el-color-primary-light-9);--el-button-hover-border-color:var(--el-color-primary-light-7);--el-button-active-text-color:var(--el-button-hover-text-color);--el-button-active-border-color:var(--el-color-primary);--el-button-active-bg-color:var(--el-button-hover-bg-color);--el-button-outline-color:var(--el-color-primary-light-5);--el-button-hover-link-text-color:var(--el-text-color-secondary);--el-button-active-color:var(--el-text-color-primary);white-space:nowrap;cursor:pointer;height:32px;color:var(--el-button-text-color);text-align:center;box-sizing:border-box;line-height:1;font-weight:var(--el-button-font-weight);-webkit-user-select:none;user-select:none;vertical-align:middle;-webkit-appearance:none;background-color:var(--el-button-bg-color);border:var(--el-border);border-color:var(--el-button-border-color);outline:none;justify-content:center;align-items:center;transition:all .1s;display:inline-flex}.el-button:hover{color:var(--el-button-hover-text-color);border-color:var(--el-button-hover-border-color);background-color:var(--el-button-hover-bg-color);outline:none}.el-button:active{color:var(--el-button-active-text-color);border-color:var(--el-button-active-border-color);background-color:var(--el-button-active-bg-color);outline:none}.el-button:focus-visible{outline:2px solid var(--el-button-outline-color);outline-offset:1px;transition:outline-offset,outline}.el-button>span{align-items:center;display:inline-flex}.el-button+.el-button{margin-left:12px}.el-button{font-size:var(--el-font-size-base);border-radius:var(--el-border-radius-base);padding:8px 15px}.el-button.is-round{padding:8px 15px}.el-button::-moz-focus-inner{border:0}.el-button [class*=el-icon]+span{margin-left:6px}.el-button [class*=el-icon] svg{vertical-align:bottom}.el-button.is-plain{--el-button-hover-text-color:var(--el-color-primary);--el-button-hover-bg-color:var(--el-fill-color-blank);--el-button-hover-border-color:var(--el-color-primary)}.el-button.is-active{color:var(--el-button-active-text-color);border-color:var(--el-button-active-border-color);background-color:var(--el-button-active-bg-color);outline:none}.el-button.is-disabled,.el-button.is-disabled:hover{color:var(--el-button-disabled-text-color);cursor:not-allowed;background-image:none;background-color:var(--el-button-disabled-bg-color);border-color:var(--el-button-disabled-border-color)}.el-button.is-loading{pointer-events:none;position:relative}.el-button.is-loading:before{z-index:1;pointer-events:none;content:"";border-radius:inherit;background-color:var(--el-mask-color-extra-light);position:absolute;top:-1px;bottom:-1px;left:-1px;right:-1px}.el-button.is-round{border-radius:var(--el-border-radius-round)}.el-button.is-dashed{--el-button-hover-text-color:var(--el-color-primary);--el-button-hover-bg-color:var(--el-fill-color-blank);--el-button-hover-border-color:var(--el-color-primary);border-style:dashed}.el-button.is-circle{border-radius:50%;width:32px;padding:8px}.el-button.is-text{color:var(--el-button-text-color);background-color:#0000;border:0 solid #0000}.el-button.is-text.is-disabled{color:var(--el-button-disabled-text-color);background-color:#0000!important}.el-button.is-text:not(.is-disabled):hover{background-color:var(--el-fill-color-light)}.el-button.is-text:not(.is-disabled):focus-visible{outline:2px solid var(--el-button-outline-color);outline-offset:1px;transition:outline-offset,outline}.el-button.is-text:not(.is-disabled):active{background-color:var(--el-fill-color)}.el-button.is-text:not(.is-disabled).is-has-bg{background-color:var(--el-fill-color-light)}.el-button.is-text:not(.is-disabled).is-has-bg:hover{background-color:var(--el-fill-color)}.el-button.is-text:not(.is-disabled).is-has-bg:active{background-color:var(--el-fill-color-dark)}.el-button__text--expand{letter-spacing:.3em;margin-right:-.3em}.el-button.is-link{color:var(--el-button-text-color);background:0 0;border-color:#0000;height:auto;padding:2px}.el-button.is-link:hover{color:var(--el-button-hover-link-text-color)}.el-button.is-link.is-disabled{color:var(--el-button-disabled-text-color);background-color:#0000!important;border-color:#0000!important}.el-button.is-link:not(.is-disabled):hover{background-color:#0000;border-color:#0000}.el-button.is-link:not(.is-disabled):active{color:var(--el-button-active-color);background-color:#0000;border-color:#0000}.el-button--text{color:var(--el-color-primary);background:0 0;border-color:#0000;padding-left:0;padding-right:0}.el-button--text.is-disabled{color:var(--el-button-disabled-text-color);background-color:#0000!important;border-color:#0000!important}.el-button--text:not(.is-disabled):hover{color:var(--el-color-primary-light-3);background-color:#0000;border-color:#0000}.el-button--text:not(.is-disabled):active{color:var(--el-color-primary-dark-2);background-color:#0000;border-color:#0000}.el-button__link--expand{letter-spacing:.3em;margin-right:-.3em}.el-button--primary{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-primary);--el-button-border-color:var(--el-color-primary);--el-button-outline-color:var(--el-color-primary-light-5);--el-button-active-color:var(--el-color-primary-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-primary-light-5);--el-button-hover-bg-color:var(--el-color-primary-light-3);--el-button-hover-border-color:var(--el-color-primary-light-3);--el-button-active-bg-color:var(--el-color-primary-dark-2);--el-button-active-border-color:var(--el-color-primary-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-primary-light-5);--el-button-disabled-border-color:var(--el-color-primary-light-5)}.el-button--primary.is-plain,.el-button--primary.is-text,.el-button--primary.is-link{--el-button-text-color:var(--el-color-primary);--el-button-bg-color:var(--el-color-primary-light-9);--el-button-border-color:var(--el-color-primary-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-primary);--el-button-hover-border-color:var(--el-color-primary);--el-button-active-text-color:var(--el-color-white)}.el-button--primary.is-plain.is-disabled,.el-button--primary.is-plain.is-disabled:hover,.el-button--primary.is-plain.is-disabled:focus,.el-button--primary.is-plain.is-disabled:active,.el-button--primary.is-text.is-disabled,.el-button--primary.is-text.is-disabled:hover,.el-button--primary.is-text.is-disabled:focus,.el-button--primary.is-text.is-disabled:active,.el-button--primary.is-link.is-disabled,.el-button--primary.is-link.is-disabled:hover,.el-button--primary.is-link.is-disabled:focus,.el-button--primary.is-link.is-disabled:active{color:var(--el-color-primary-light-5);background-color:var(--el-color-primary-light-9);border-color:var(--el-color-primary-light-8)}.el-button--primary.is-dashed{--el-button-text-color:var(--el-color-primary);--el-button-bg-color:var(--el-color-primary-light-9);--el-button-border-color:var(--el-color-primary-light-5);--el-button-hover-text-color:var(--el-color-primary);--el-button-hover-bg-color:var(--el-color-primary-light-9);--el-button-hover-border-color:var(--el-color-primary-light-3);--el-button-active-text-color:var(--el-color-primary-dark-2);--el-button-active-bg-color:var(--el-color-primary-light-9);--el-button-active-border-color:var(--el-color-primary-dark-2)}.el-button--primary.is-dashed.is-disabled,.el-button--primary.is-dashed.is-disabled:hover,.el-button--primary.is-dashed.is-disabled:focus,.el-button--primary.is-dashed.is-disabled:active{color:var(--el-color-primary-light-5);background-color:var(--el-color-primary-light-9);border-color:var(--el-color-primary-light-8)}.el-button--success{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-success);--el-button-border-color:var(--el-color-success);--el-button-outline-color:var(--el-color-success-light-5);--el-button-active-color:var(--el-color-success-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-success-light-5);--el-button-hover-bg-color:var(--el-color-success-light-3);--el-button-hover-border-color:var(--el-color-success-light-3);--el-button-active-bg-color:var(--el-color-success-dark-2);--el-button-active-border-color:var(--el-color-success-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-success-light-5);--el-button-disabled-border-color:var(--el-color-success-light-5)}.el-button--success.is-plain,.el-button--success.is-text,.el-button--success.is-link{--el-button-text-color:var(--el-color-success);--el-button-bg-color:var(--el-color-success-light-9);--el-button-border-color:var(--el-color-success-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-success);--el-button-hover-border-color:var(--el-color-success);--el-button-active-text-color:var(--el-color-white)}.el-button--success.is-plain.is-disabled,.el-button--success.is-plain.is-disabled:hover,.el-button--success.is-plain.is-disabled:focus,.el-button--success.is-plain.is-disabled:active,.el-button--success.is-text.is-disabled,.el-button--success.is-text.is-disabled:hover,.el-button--success.is-text.is-disabled:focus,.el-button--success.is-text.is-disabled:active,.el-button--success.is-link.is-disabled,.el-button--success.is-link.is-disabled:hover,.el-button--success.is-link.is-disabled:focus,.el-button--success.is-link.is-disabled:active{color:var(--el-color-success-light-5);background-color:var(--el-color-success-light-9);border-color:var(--el-color-success-light-8)}.el-button--success.is-dashed{--el-button-text-color:var(--el-color-success);--el-button-bg-color:var(--el-color-success-light-9);--el-button-border-color:var(--el-color-success-light-5);--el-button-hover-text-color:var(--el-color-success);--el-button-hover-bg-color:var(--el-color-success-light-9);--el-button-hover-border-color:var(--el-color-success-light-3);--el-button-active-text-color:var(--el-color-success-dark-2);--el-button-active-bg-color:var(--el-color-success-light-9);--el-button-active-border-color:var(--el-color-success-dark-2)}.el-button--success.is-dashed.is-disabled,.el-button--success.is-dashed.is-disabled:hover,.el-button--success.is-dashed.is-disabled:focus,.el-button--success.is-dashed.is-disabled:active{color:var(--el-color-success-light-5);background-color:var(--el-color-success-light-9);border-color:var(--el-color-success-light-8)}.el-button--warning{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-warning);--el-button-border-color:var(--el-color-warning);--el-button-outline-color:var(--el-color-warning-light-5);--el-button-active-color:var(--el-color-warning-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-warning-light-5);--el-button-hover-bg-color:var(--el-color-warning-light-3);--el-button-hover-border-color:var(--el-color-warning-light-3);--el-button-active-bg-color:var(--el-color-warning-dark-2);--el-button-active-border-color:var(--el-color-warning-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-warning-light-5);--el-button-disabled-border-color:var(--el-color-warning-light-5)}.el-button--warning.is-plain,.el-button--warning.is-text,.el-button--warning.is-link{--el-button-text-color:var(--el-color-warning);--el-button-bg-color:var(--el-color-warning-light-9);--el-button-border-color:var(--el-color-warning-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-warning);--el-button-hover-border-color:var(--el-color-warning);--el-button-active-text-color:var(--el-color-white)}.el-button--warning.is-plain.is-disabled,.el-button--warning.is-plain.is-disabled:hover,.el-button--warning.is-plain.is-disabled:focus,.el-button--warning.is-plain.is-disabled:active,.el-button--warning.is-text.is-disabled,.el-button--warning.is-text.is-disabled:hover,.el-button--warning.is-text.is-disabled:focus,.el-button--warning.is-text.is-disabled:active,.el-button--warning.is-link.is-disabled,.el-button--warning.is-link.is-disabled:hover,.el-button--warning.is-link.is-disabled:focus,.el-button--warning.is-link.is-disabled:active{color:var(--el-color-warning-light-5);background-color:var(--el-color-warning-light-9);border-color:var(--el-color-warning-light-8)}.el-button--warning.is-dashed{--el-button-text-color:var(--el-color-warning);--el-button-bg-color:var(--el-color-warning-light-9);--el-button-border-color:var(--el-color-warning-light-5);--el-button-hover-text-color:var(--el-color-warning);--el-button-hover-bg-color:var(--el-color-warning-light-9);--el-button-hover-border-color:var(--el-color-warning-light-3);--el-button-active-text-color:var(--el-color-warning-dark-2);--el-button-active-bg-color:var(--el-color-warning-light-9);--el-button-active-border-color:var(--el-color-warning-dark-2)}.el-button--warning.is-dashed.is-disabled,.el-button--warning.is-dashed.is-disabled:hover,.el-button--warning.is-dashed.is-disabled:focus,.el-button--warning.is-dashed.is-disabled:active{color:var(--el-color-warning-light-5);background-color:var(--el-color-warning-light-9);border-color:var(--el-color-warning-light-8)}.el-button--danger{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-danger);--el-button-border-color:var(--el-color-danger);--el-button-outline-color:var(--el-color-danger-light-5);--el-button-active-color:var(--el-color-danger-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-danger-light-5);--el-button-hover-bg-color:var(--el-color-danger-light-3);--el-button-hover-border-color:var(--el-color-danger-light-3);--el-button-active-bg-color:var(--el-color-danger-dark-2);--el-button-active-border-color:var(--el-color-danger-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-danger-light-5);--el-button-disabled-border-color:var(--el-color-danger-light-5)}.el-button--danger.is-plain,.el-button--danger.is-text,.el-button--danger.is-link{--el-button-text-color:var(--el-color-danger);--el-button-bg-color:var(--el-color-danger-light-9);--el-button-border-color:var(--el-color-danger-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-danger);--el-button-hover-border-color:var(--el-color-danger);--el-button-active-text-color:var(--el-color-white)}.el-button--danger.is-plain.is-disabled,.el-button--danger.is-plain.is-disabled:hover,.el-button--danger.is-plain.is-disabled:focus,.el-button--danger.is-plain.is-disabled:active,.el-button--danger.is-text.is-disabled,.el-button--danger.is-text.is-disabled:hover,.el-button--danger.is-text.is-disabled:focus,.el-button--danger.is-text.is-disabled:active,.el-button--danger.is-link.is-disabled,.el-button--danger.is-link.is-disabled:hover,.el-button--danger.is-link.is-disabled:focus,.el-button--danger.is-link.is-disabled:active{color:var(--el-color-danger-light-5);background-color:var(--el-color-danger-light-9);border-color:var(--el-color-danger-light-8)}.el-button--danger.is-dashed{--el-button-text-color:var(--el-color-danger);--el-button-bg-color:var(--el-color-danger-light-9);--el-button-border-color:var(--el-color-danger-light-5);--el-button-hover-text-color:var(--el-color-danger);--el-button-hover-bg-color:var(--el-color-danger-light-9);--el-button-hover-border-color:var(--el-color-danger-light-3);--el-button-active-text-color:var(--el-color-danger-dark-2);--el-button-active-bg-color:var(--el-color-danger-light-9);--el-button-active-border-color:var(--el-color-danger-dark-2)}.el-button--danger.is-dashed.is-disabled,.el-button--danger.is-dashed.is-disabled:hover,.el-button--danger.is-dashed.is-disabled:focus,.el-button--danger.is-dashed.is-disabled:active{color:var(--el-color-danger-light-5);background-color:var(--el-color-danger-light-9);border-color:var(--el-color-danger-light-8)}.el-button--info{--el-button-text-color:var(--el-color-white);--el-button-bg-color:var(--el-color-info);--el-button-border-color:var(--el-color-info);--el-button-outline-color:var(--el-color-info-light-5);--el-button-active-color:var(--el-color-info-dark-2);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-link-text-color:var(--el-color-info-light-5);--el-button-hover-bg-color:var(--el-color-info-light-3);--el-button-hover-border-color:var(--el-color-info-light-3);--el-button-active-bg-color:var(--el-color-info-dark-2);--el-button-active-border-color:var(--el-color-info-dark-2);--el-button-disabled-text-color:var(--el-color-white);--el-button-disabled-bg-color:var(--el-color-info-light-5);--el-button-disabled-border-color:var(--el-color-info-light-5)}.el-button--info.is-plain,.el-button--info.is-text,.el-button--info.is-link{--el-button-text-color:var(--el-color-info);--el-button-bg-color:var(--el-color-info-light-9);--el-button-border-color:var(--el-color-info-light-5);--el-button-hover-text-color:var(--el-color-white);--el-button-hover-bg-color:var(--el-color-info);--el-button-hover-border-color:var(--el-color-info);--el-button-active-text-color:var(--el-color-white)}.el-button--info.is-plain.is-disabled,.el-button--info.is-plain.is-disabled:hover,.el-button--info.is-plain.is-disabled:focus,.el-button--info.is-plain.is-disabled:active,.el-button--info.is-text.is-disabled,.el-button--info.is-text.is-disabled:hover,.el-button--info.is-text.is-disabled:focus,.el-button--info.is-text.is-disabled:active,.el-button--info.is-link.is-disabled,.el-button--info.is-link.is-disabled:hover,.el-button--info.is-link.is-disabled:focus,.el-button--info.is-link.is-disabled:active{color:var(--el-color-info-light-5);background-color:var(--el-color-info-light-9);border-color:var(--el-color-info-light-8)}.el-button--info.is-dashed{--el-button-text-color:var(--el-color-info);--el-button-bg-color:var(--el-color-info-light-9);--el-button-border-color:var(--el-color-info-light-5);--el-button-hover-text-color:var(--el-color-info);--el-button-hover-bg-color:var(--el-color-info-light-9);--el-button-hover-border-color:var(--el-color-info-light-3);--el-button-active-text-color:var(--el-color-info-dark-2);--el-button-active-bg-color:var(--el-color-info-light-9);--el-button-active-border-color:var(--el-color-info-dark-2)}.el-button--info.is-dashed.is-disabled,.el-button--info.is-dashed.is-disabled:hover,.el-button--info.is-dashed.is-disabled:focus,.el-button--info.is-dashed.is-disabled:active{color:var(--el-color-info-light-5);background-color:var(--el-color-info-light-9);border-color:var(--el-color-info-light-8)}.el-button--large{--el-button-size:40px;height:var(--el-button-size)}.el-button--large [class*=el-icon]+span{margin-left:8px}.el-button--large{font-size:var(--el-font-size-base);border-radius:var(--el-border-radius-base);padding:12px 19px}.el-button--large.is-round{padding:12px 19px}.el-button--large.is-circle{width:var(--el-button-size);padding:12px}.el-button--small{--el-button-size:24px;height:var(--el-button-size)}.el-button--small [class*=el-icon]+span{margin-left:4px}.el-button--small{border-radius:calc(var(--el-border-radius-base) - 1px);padding:5px 11px;font-size:12px}.el-button--small.is-round{padding:5px 11px}.el-button--small.is-circle{width:var(--el-button-size);padding:5px}.el-calendar{--el-calendar-border:var(--el-table-border,1px solid var(--el-border-color-lighter));--el-calendar-header-border-bottom:var(--el-calendar-border);--el-calendar-selected-bg-color:var(--el-color-primary-light-9);--el-calendar-cell-width:85px;background-color:var(--el-fill-color-blank)}.el-calendar__header{border-bottom:var(--el-calendar-header-border-bottom);justify-content:space-between;padding:12px 20px;display:flex}.el-calendar__title{color:var(--el-text-color);align-self:center}.el-calendar__body{padding:12px 20px 35px}.el-calendar__select-controller .el-select{margin-right:8px}.el-calendar__select-controller .el-calendar-select__year{width:120px}.el-calendar__select-controller .el-calendar-select__month{width:60px}.el-calendar-table{table-layout:fixed;width:100%}.el-calendar-table thead th{color:var(--el-text-color-regular);padding:12px 0;font-weight:400}.el-calendar-table:not(.is-range) td.prev,.el-calendar-table:not(.is-range) td.next{color:var(--el-text-color-placeholder)}.el-calendar-table td{border-bottom:var(--el-calendar-border);border-right:var(--el-calendar-border);vertical-align:top;transition:background-color var(--el-transition-duration-fast) ease}.el-calendar-table td.is-selected{background-color:var(--el-calendar-selected-bg-color)}.el-calendar-table td.is-today{color:var(--el-color-primary)}.el-calendar-table tr:first-child td{border-top:var(--el-calendar-border)}.el-calendar-table tr td:first-child{border-left:var(--el-calendar-border)}.el-calendar-table tr.el-calendar-table__row--hide-border td{border-top:none}.el-calendar-table .el-calendar-day{box-sizing:border-box;height:var(--el-calendar-cell-width);padding:8px}.el-calendar-table .el-calendar-day:hover{cursor:pointer;background-color:var(--el-calendar-selected-bg-color)}.el-card{--el-card-border-color:var(--el-border-color-light);--el-card-border-radius:4px;--el-card-padding:20px;--el-card-bg-color:var(--el-fill-color-blank);border-radius:var(--el-card-border-radius);border:1px solid var(--el-card-border-color);background-color:var(--el-card-bg-color);color:var(--el-text-color-primary);transition:var(--el-transition-duration);flex-direction:column;display:flex;overflow:hidden}.el-card.is-always-shadow,.el-card.is-hover-shadow:hover,.el-card.is-hover-shadow:focus{box-shadow:var(--el-box-shadow-light)}.el-card__header{padding:calc(var(--el-card-padding) - 2px) var(--el-card-padding);border-bottom:1px solid var(--el-card-border-color);box-sizing:border-box}.el-card__body{padding:var(--el-card-padding);flex-grow:1;overflow:auto}.el-card__footer{padding:calc(var(--el-card-padding) - 2px) var(--el-card-padding);border-top:1px solid var(--el-card-border-color);box-sizing:border-box}.el-carousel__item{width:100%;height:100%;z-index:calc(var(--el-index-normal) - 1);display:inline-block;position:absolute;top:0;left:0;overflow:hidden}.el-carousel__item.is-active{z-index:calc(var(--el-index-normal) - 1)}.el-carousel__item.is-animating{transition:transform .4s ease-in-out}.el-carousel__item--card{width:50%;transition:transform .4s ease-in-out}.el-carousel__item--card.is-in-stage{cursor:pointer;z-index:var(--el-index-normal)}.el-carousel__item--card.is-in-stage:hover .el-carousel__mask,.el-carousel__item--card.is-in-stage.is-hover .el-carousel__mask{opacity:.12}.el-carousel__item--card.is-active{z-index:calc(var(--el-index-normal) + 1)}.el-carousel__item--card-vertical{width:100%;height:50%}.el-carousel__mask{background-color:var(--el-color-white);opacity:.24;width:100%;height:100%;transition:var(--el-transition-duration-fast);position:absolute;top:0;left:0}.el-carousel{--el-carousel-arrow-font-size:12px;--el-carousel-arrow-size:36px;--el-carousel-arrow-background:#1f2d3d1c;--el-carousel-arrow-hover-background:#1f2d3d3b;--el-carousel-indicator-width:30px;--el-carousel-indicator-height:2px;--el-carousel-indicator-padding-horizontal:4px;--el-carousel-indicator-padding-vertical:12px;--el-carousel-indicator-out-color:var(--el-border-color-hover);position:relative}.el-carousel--horizontal,.el-carousel--vertical{overflow:hidden}.el-carousel.is-vertical-outside{flex-direction:row;align-items:center;display:flex}.el-carousel.is-vertical-outside .el-carousel__container{flex:1}.el-carousel__container{height:300px;position:relative}.el-carousel__arrow{height:var(--el-carousel-arrow-size);width:var(--el-carousel-arrow-size);cursor:pointer;transition:var(--el-transition-duration);background-color:var(--el-carousel-arrow-background);color:#fff;z-index:10;text-align:center;font-size:var(--el-carousel-arrow-font-size);border:none;border-radius:50%;outline:none;justify-content:center;align-items:center;margin:0;padding:0;display:inline-flex;position:absolute;top:50%;transform:translateY(-50%)}.el-carousel__arrow--left{left:16px}.el-carousel__arrow--right{right:16px}.el-carousel__arrow:hover{background-color:var(--el-carousel-arrow-hover-background)}.el-carousel__arrow i{cursor:pointer}.el-carousel__indicators{z-index:calc(var(--el-index-normal) + 1);margin:0;padding:0;list-style:none;position:absolute}.el-carousel__indicators--horizontal{bottom:0;left:50%;transform:translate(-50%)}.el-carousel__indicators--vertical{top:50%;right:0;transform:translateY(-50%)}.el-carousel__indicators--outside{text-align:center;position:static;transform:none}.el-carousel__indicators--outside .el-carousel__indicator:hover button{opacity:.64}.el-carousel__indicators--outside button{background-color:var(--el-carousel-indicator-out-color);opacity:.24}.el-carousel__indicators--right{right:0}.el-carousel__indicators--labels .el-carousel__button{color:#000;padding:2px 18px;font-size:12px}.el-carousel__indicators--labels .el-carousel__indicator{padding:6px 4px}.el-carousel__indicator{cursor:pointer;background-color:#0000}.el-carousel__indicator:hover button{opacity:.72}.el-carousel__indicator--horizontal{padding:var(--el-carousel-indicator-padding-vertical) var(--el-carousel-indicator-padding-horizontal);display:inline-block}.el-carousel__indicator--vertical{padding:var(--el-carousel-indicator-padding-horizontal) var(--el-carousel-indicator-padding-vertical)}.el-carousel__indicator--vertical .el-carousel__button{width:var(--el-carousel-indicator-height);height:calc(var(--el-carousel-indicator-width) / 2)}.el-carousel__indicator.is-active button{opacity:1}.el-carousel__button{opacity:.48;width:var(--el-carousel-indicator-width);height:var(--el-carousel-indicator-height);cursor:pointer;transition:var(--el-transition-duration);background-color:#fff;border:none;outline:none;margin:0;padding:0;display:block}.el-carousel__indicators--labels .el-carousel__button{width:auto;height:auto}.carousel-arrow-left-enter-from,.carousel-arrow-left-leave-active{opacity:0;transform:translateY(-50%)translate(-10px)}.carousel-arrow-right-enter-from,.carousel-arrow-right-leave-active{opacity:0;transform:translateY(-50%)translate(10px)}.el-transitioning{filter:url(#elCarouselHorizontal)}.el-transitioning-vertical{filter:url(#elCarouselVertical)}.el-cascader-panel{--el-cascader-menu-text-color:var(--el-text-color-regular);--el-cascader-menu-selected-text-color:var(--el-color-primary);--el-cascader-menu-fill:var(--el-bg-color-overlay);--el-cascader-menu-font-size:var(--el-font-size-base);--el-cascader-menu-radius:var(--el-border-radius-base);--el-cascader-menu-border:solid 1px var(--el-border-color-light);--el-cascader-menu-shadow:var(--el-box-shadow-light);--el-cascader-node-background-hover:var(--el-fill-color-light);--el-cascader-node-color-disabled:var(--el-text-color-placeholder);--el-cascader-color-empty:var(--el-text-color-placeholder);--el-cascader-tag-background:var(--el-fill-color);border-radius:var(--el-cascader-menu-radius);width:-moz-fit-content;width:fit-content;font-size:var(--el-cascader-menu-font-size);display:flex}.el-cascader-panel.is-bordered{border:var(--el-cascader-menu-border);border-radius:var(--el-cascader-menu-radius)}.el-cascader-menu{box-sizing:border-box;min-width:180px;color:var(--el-cascader-menu-text-color);border-right:var(--el-cascader-menu-border)}.el-cascader-menu:last-child{border-right:none}.el-cascader-menu:last-child .el-cascader-node{padding-right:20px}.el-cascader-menu__wrap.el-scrollbar__wrap{height:204px}.el-cascader-menu__list{box-sizing:border-box;min-height:100%;margin:0;padding:6px 0;list-style:none;position:relative}.el-cascader-menu__hover-zone{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0}.el-cascader-menu__empty-text{color:var(--el-cascader-color-empty);align-items:center;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.el-cascader-menu__empty-text .is-loading{margin-right:2px}.el-cascader-node{outline:none;align-items:center;height:34px;padding:0 30px 0 20px;line-height:34px;display:flex;position:relative}.el-cascader-node.is-selectable.in-active-path{color:var(--el-cascader-menu-text-color)}.el-cascader-node.in-active-path,.el-cascader-node.is-selectable.in-checked-path,.el-cascader-node.is-active{color:var(--el-cascader-menu-selected-text-color);font-weight:700}.el-cascader-node:not(.is-disabled){cursor:pointer}.el-cascader-node:not(.is-disabled):hover,.el-cascader-node:not(.is-disabled):focus{background:var(--el-cascader-node-background-hover)}.el-cascader-node.is-disabled{color:var(--el-cascader-node-color-disabled);cursor:not-allowed}.el-cascader-node__prefix{position:absolute;left:10px}.el-cascader-node__postfix{position:absolute;right:10px}.el-cascader-node__label{text-align:left;white-space:nowrap;text-overflow:ellipsis;flex:1;padding:0 8px;overflow:hidden}.el-cascader-node>.el-checkbox,.el-cascader-node>.el-radio{margin-right:0}.el-cascader-node>.el-radio .el-radio__label{padding-left:0}.el-cascader{--el-cascader-menu-text-color:var(--el-text-color-regular);--el-cascader-menu-selected-text-color:var(--el-color-primary);--el-cascader-menu-fill:var(--el-bg-color-overlay);--el-cascader-menu-font-size:var(--el-font-size-base);--el-cascader-menu-radius:var(--el-border-radius-base);--el-cascader-menu-border:solid 1px var(--el-border-color-light);--el-cascader-menu-shadow:var(--el-box-shadow-light);--el-cascader-node-background-hover:var(--el-fill-color-light);--el-cascader-node-color-disabled:var(--el-text-color-placeholder);--el-cascader-color-empty:var(--el-text-color-placeholder);--el-cascader-tag-background:var(--el-fill-color);vertical-align:middle;font-size:var(--el-font-size-base);outline:none;line-height:32px;display:inline-block;position:relative}.el-cascader:not(.is-disabled):hover .el-input__wrapper{cursor:pointer;box-shadow:0 0 0 1px var(--el-input-hover-border-color) inset}.el-cascader .el-input{cursor:pointer;display:flex}.el-cascader .el-input .el-input__inner{text-overflow:ellipsis}.el-cascader .el-input .el-input__inner:read-only{cursor:pointer}.el-cascader .el-input .el-input__inner:disabled{cursor:not-allowed}.el-cascader .el-input .el-input__suffix-inner .el-icon svg{vertical-align:middle}.el-cascader .el-input .icon-arrow-down{transition:transform var(--el-transition-duration);font-size:14px}.el-cascader .el-input .icon-arrow-down.is-reverse{transform:rotate(180deg)}.el-cascader .el-input .icon-circle-close:hover{color:var(--el-input-clear-hover-color,var(--el-text-color-secondary))}.el-cascader .el-input.is-focus .el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-focus-border-color,var(--el-color-primary)) inset}.el-cascader--large{font-size:14px;line-height:40px}.el-cascader--large .el-cascader__tags{gap:6px;padding:8px}.el-cascader--large .el-cascader__search-input{height:24px;margin-left:7px}.el-cascader--small{font-size:12px;line-height:24px}.el-cascader--small .el-cascader__tags{gap:4px;padding:2px}.el-cascader--small .el-cascader__search-input{height:20px;margin-left:5px}.el-cascader.is-disabled .el-cascader__label{z-index:calc(var(--el-index-normal) + 1);color:var(--el-disabled-text-color)}.el-cascader__dropdown{--el-cascader-menu-text-color:var(--el-text-color-regular);--el-cascader-menu-selected-text-color:var(--el-color-primary);--el-cascader-menu-fill:var(--el-bg-color-overlay);--el-cascader-menu-font-size:var(--el-font-size-base);--el-cascader-menu-radius:var(--el-border-radius-base);--el-cascader-menu-border:solid 1px var(--el-border-color-light);--el-cascader-menu-shadow:var(--el-box-shadow-light);--el-cascader-node-background-hover:var(--el-fill-color-light);--el-cascader-node-color-disabled:var(--el-text-color-placeholder);--el-cascader-color-empty:var(--el-text-color-placeholder);--el-cascader-tag-background:var(--el-fill-color);font-size:var(--el-cascader-menu-font-size);border-radius:var(--el-cascader-menu-radius)}.el-cascader__dropdown.el-popper{background:var(--el-cascader-menu-fill);border:var(--el-cascader-menu-border);box-shadow:var(--el-cascader-menu-shadow)}.el-cascader__dropdown.el-popper .el-popper__arrow:before{border:var(--el-cascader-menu-border)}.el-cascader__dropdown.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-top-color:#0000;border-left-color:#0000}.el-cascader__dropdown.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:#0000;border-right-color:#0000}.el-cascader__dropdown.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:#0000;border-left-color:#0000}.el-cascader__dropdown.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-top-color:#0000;border-right-color:#0000}.el-cascader__dropdown.el-popper{box-shadow:var(--el-cascader-menu-shadow)}.el-cascader__header{border-bottom:1px solid var(--el-border-color-light);padding:10px}.el-cascader__footer{border-top:1px solid var(--el-border-color-light);padding:10px}.el-cascader__tags{text-align:left;box-sizing:border-box;flex-wrap:wrap;gap:6px;padding:4px;line-height:normal;display:flex;position:absolute;top:50%;left:0;right:30px;transform:translateY(-50%)}.el-cascader__tags .el-tag{text-overflow:ellipsis;background:var(--el-cascader-tag-background);align-items:center;max-width:100%;display:inline-flex}.el-cascader__tags .el-tag.el-tag--dark,.el-cascader__tags .el-tag.el-tag--plain{background-color:var(--el-tag-bg-color)}.el-cascader__tags .el-tag:not(.is-hit){border-color:#0000}.el-cascader__tags .el-tag:not(.is-hit).el-tag--dark,.el-cascader__tags .el-tag:not(.is-hit).el-tag--plain{border-color:var(--el-tag-border-color)}.el-cascader__tags .el-tag>span{text-overflow:ellipsis;flex:1;line-height:normal;overflow:hidden}.el-cascader__tags .el-tag .el-icon-close{background-color:var(--el-text-color-placeholder);color:var(--el-color-white);flex:none}.el-cascader__tags .el-tag .el-icon-close:hover{background-color:var(--el-text-color-secondary)}.el-cascader__tags .el-tag+input{margin-left:0}.el-cascader__tags.is-validate{right:55px}.el-cascader__collapse-tags{white-space:normal;z-index:var(--el-index-normal)}.el-cascader__collapse-tags .el-tag{text-overflow:ellipsis;background:var(--el-fill-color);align-items:center;max-width:100%;display:inline-flex}.el-cascader__collapse-tags .el-tag.el-tag--dark,.el-cascader__collapse-tags .el-tag.el-tag--plain{background-color:var(--el-tag-bg-color)}.el-cascader__collapse-tags .el-tag:not(.is-hit){border-color:#0000}.el-cascader__collapse-tags .el-tag:not(.is-hit).el-tag--dark,.el-cascader__collapse-tags .el-tag:not(.is-hit).el-tag--plain{border-color:var(--el-tag-border-color)}.el-cascader__collapse-tags .el-tag>span{text-overflow:ellipsis;flex:1;line-height:normal;overflow:hidden}.el-cascader__collapse-tags .el-tag .el-icon-close{background-color:var(--el-text-color-placeholder);color:var(--el-color-white);flex:none}.el-cascader__collapse-tags .el-tag .el-icon-close:hover{background-color:var(--el-text-color-secondary)}.el-cascader__collapse-tags .el-tag+input{margin-left:0}.el-cascader__collapse-tags .el-tag{margin:2px 0}.el-cascader__suggestion-panel{border-radius:var(--el-cascader-menu-radius)}.el-cascader__suggestion-list{max-height:204px;font-size:var(--el-font-size-base);color:var(--el-cascader-menu-text-color);text-align:center;margin:0;padding:6px 0}.el-cascader__suggestion-item{text-align:left;cursor:pointer;outline:none;justify-content:space-between;align-items:center;height:34px;padding:0 15px;display:flex}.el-cascader__suggestion-item:hover,.el-cascader__suggestion-item:focus{background:var(--el-cascader-node-background-hover)}.el-cascader__suggestion-item.is-checked{color:var(--el-cascader-menu-selected-text-color);font-weight:700}.el-cascader__suggestion-item>span{margin-right:10px}.el-cascader__empty-text{color:var(--el-cascader-color-empty);margin:10px 0}.el-cascader__search-input{min-width:60px;height:24px;color:var(--el-cascader-menu-text-color);box-sizing:border-box;background:0 0;border:none;outline:none;flex:1;margin-left:7px;padding:0}.el-cascader__search-input::placeholder{color:#0000}.el-check-tag{background-color:var(--el-color-info-light-9);border-radius:var(--el-border-radius-base);color:var(--el-color-info);cursor:pointer;font-size:var(--el-font-size-base);line-height:var(--el-font-size-base);transition:var(--el-transition-all);padding:7px 15px;font-weight:700;display:inline-block}.el-check-tag:hover{background-color:var(--el-color-info-light-7)}.el-check-tag.el-check-tag--primary.is-checked{background-color:var(--el-color-primary-light-8);color:var(--el-color-primary)}.el-check-tag.el-check-tag--primary.is-checked:hover{background-color:var(--el-color-primary-light-7)}.el-check-tag.el-check-tag--primary.is-checked.is-disabled{background-color:var(--el-color-primary-light-8);color:var(--el-disabled-text-color);cursor:not-allowed}.el-check-tag.el-check-tag--primary.is-checked.is-disabled:hover{background-color:var(--el-color-primary-light-8)}.el-check-tag.el-check-tag--primary.is-disabled{background-color:var(--el-color-info-light-9);color:var(--el-disabled-text-color);cursor:not-allowed}.el-check-tag.el-check-tag--primary.is-disabled:hover{background-color:var(--el-color-info-light-9)}.el-check-tag.el-check-tag--success.is-checked{background-color:var(--el-color-success-light-8);color:var(--el-color-success)}.el-check-tag.el-check-tag--success.is-checked:hover{background-color:var(--el-color-success-light-7)}.el-check-tag.el-check-tag--success.is-checked.is-disabled{background-color:var(--el-color-success-light-8);color:var(--el-disabled-text-color);cursor:not-allowed}.el-check-tag.el-check-tag--success.is-checked.is-disabled:hover{background-color:var(--el-color-success-light-8)}.el-check-tag.el-check-tag--success.is-disabled{background-color:var(--el-color-success-light-9);color:var(--el-disabled-text-color);cursor:not-allowed}.el-check-tag.el-check-tag--success.is-disabled:hover{background-color:var(--el-color-success-light-9)}.el-check-tag.el-check-tag--warning.is-checked{background-color:var(--el-color-warning-light-8);color:var(--el-color-warning)}.el-check-tag.el-check-tag--warning.is-checked:hover{background-color:var(--el-color-warning-light-7)}.el-check-tag.el-check-tag--warning.is-checked.is-disabled{background-color:var(--el-color-warning-light-8);color:var(--el-disabled-text-color);cursor:not-allowed}.el-check-tag.el-check-tag--warning.is-checked.is-disabled:hover{background-color:var(--el-color-warning-light-8)}.el-check-tag.el-check-tag--warning.is-disabled{background-color:var(--el-color-warning-light-9);color:var(--el-disabled-text-color);cursor:not-allowed}.el-check-tag.el-check-tag--warning.is-disabled:hover{background-color:var(--el-color-warning-light-9)}.el-check-tag.el-check-tag--danger.is-checked{background-color:var(--el-color-danger-light-8);color:var(--el-color-danger)}.el-check-tag.el-check-tag--danger.is-checked:hover{background-color:var(--el-color-danger-light-7)}.el-check-tag.el-check-tag--danger.is-checked.is-disabled{background-color:var(--el-color-danger-light-8);color:var(--el-disabled-text-color);cursor:not-allowed}.el-check-tag.el-check-tag--danger.is-checked.is-disabled:hover{background-color:var(--el-color-danger-light-8)}.el-check-tag.el-check-tag--danger.is-disabled{background-color:var(--el-color-danger-light-9);color:var(--el-disabled-text-color);cursor:not-allowed}.el-check-tag.el-check-tag--danger.is-disabled:hover{background-color:var(--el-color-danger-light-9)}.el-check-tag.el-check-tag--error.is-checked{background-color:var(--el-color-error-light-8);color:var(--el-color-error)}.el-check-tag.el-check-tag--error.is-checked:hover{background-color:var(--el-color-error-light-7)}.el-check-tag.el-check-tag--error.is-checked.is-disabled{background-color:var(--el-color-error-light-8);color:var(--el-disabled-text-color);cursor:not-allowed}.el-check-tag.el-check-tag--error.is-checked.is-disabled:hover{background-color:var(--el-color-error-light-8)}.el-check-tag.el-check-tag--error.is-disabled{background-color:var(--el-color-error-light-9);color:var(--el-disabled-text-color);cursor:not-allowed}.el-check-tag.el-check-tag--error.is-disabled:hover{background-color:var(--el-color-error-light-9)}.el-check-tag.el-check-tag--info.is-checked{background-color:var(--el-color-info-light-8);color:var(--el-color-info)}.el-check-tag.el-check-tag--info.is-checked:hover{background-color:var(--el-color-info-light-7)}.el-check-tag.el-check-tag--info.is-checked.is-disabled{background-color:var(--el-color-info-light-8);color:var(--el-disabled-text-color);cursor:not-allowed}.el-check-tag.el-check-tag--info.is-checked.is-disabled:hover{background-color:var(--el-color-info-light-8)}.el-check-tag.el-check-tag--info.is-disabled{background-color:var(--el-color-info-light-9);color:var(--el-disabled-text-color);cursor:not-allowed}.el-check-tag.el-check-tag--info.is-disabled:hover{background-color:var(--el-color-info-light-9)}.el-checkbox-button{--el-checkbox-button-checked-bg-color:var(--el-color-primary);--el-checkbox-button-checked-text-color:var(--el-color-white);--el-checkbox-button-checked-border-color:var(--el-color-primary);--el-checkbox-button-disabled-checked-fill:var(--el-border-color-extra-light);display:inline-block;position:relative}.el-checkbox-button__inner{line-height:1;font-weight:var(--el-checkbox-font-weight);white-space:nowrap;vertical-align:middle;cursor:pointer;background:var(--el-button-bg-color,var(--el-fill-color-blank));outline:var(--el-border);color:var(--el-button-text-color,var(--el-text-color-regular));-webkit-appearance:none;text-align:center;box-sizing:border-box;transition:var(--el-transition-all);-webkit-user-select:none;user-select:none;font-size:var(--el-font-size-base);border-radius:0;margin:0;padding:8px 15px;display:inline-block;position:relative}.el-checkbox-button__inner.is-round{padding:8px 15px}.el-checkbox-button__inner:hover{color:var(--el-color-primary)}.el-checkbox-button__inner [class*=el-icon-]{line-height:.9}.el-checkbox-button__inner [class*=el-icon-]+span{margin-left:5px}.el-checkbox-button__original{opacity:0;z-index:-1;outline:none;margin:0;position:absolute}.el-checkbox-button.is-checked .el-checkbox-button__inner{color:var(--el-checkbox-button-checked-text-color);background-color:var(--el-checkbox-button-checked-bg-color);border-color:var(--el-checkbox-button-checked-border-color);box-shadow:-1px 0 0 0 var(--el-color-primary-light-7)}.el-checkbox-button.is-checked:first-child .el-checkbox-button__inner{border-left-color:var(--el-checkbox-button-checked-border-color)}.el-checkbox-button.is-disabled .el-checkbox-button__inner{color:var(--el-disabled-text-color);cursor:not-allowed;background-image:none;background-color:var(--el-button-disabled-bg-color,var(--el-fill-color-blank));border-color:var(--el-button-disabled-border-color,var(--el-border-color-light));box-shadow:none}.el-checkbox-button.is-disabled:first-child .el-checkbox-button__inner{border-left-color:var(--el-button-disabled-border-color,var(--el-border-color-light))}.el-checkbox-button.is-disabled.is-checked .el-checkbox-button__inner{background-color:var(--el-checkbox-button-disabled-checked-fill)}.el-checkbox-button:first-child .el-checkbox-button__inner{border-top-left-radius:var(--el-border-radius-base);border-bottom-left-radius:var(--el-border-radius-base);box-shadow:none!important}.el-checkbox-button.is-focus .el-checkbox-button__inner{border-color:var(--el-checkbox-button-checked-border-color)}.el-checkbox-button:last-child .el-checkbox-button__inner{border-top-right-radius:var(--el-border-radius-base);border-bottom-right-radius:var(--el-border-radius-base)}.el-checkbox-button--large .el-checkbox-button__inner{font-size:var(--el-font-size-base);border-radius:0;padding:12px 19px}.el-checkbox-button--large .el-checkbox-button__inner.is-round{padding:12px 19px}.el-checkbox-button--small .el-checkbox-button__inner{border-radius:0;padding:5px 11px;font-size:12px}.el-checkbox-button--small .el-checkbox-button__inner.is-round{padding:5px 11px}.el-checkbox-group{font-size:0;line-height:0}.el-checkbox{--el-checkbox-font-size:14px;--el-checkbox-font-weight:var(--el-font-weight-primary);--el-checkbox-text-color:var(--el-text-color-regular);--el-checkbox-input-height:14px;--el-checkbox-input-width:14px;--el-checkbox-border-radius:var(--el-border-radius-small);--el-checkbox-bg-color:var(--el-fill-color-blank);--el-checkbox-input-border:var(--el-border);--el-checkbox-disabled-border-color:var(--el-border-color);--el-checkbox-disabled-input-fill:var(--el-fill-color-light);--el-checkbox-disabled-icon-color:var(--el-text-color-placeholder);--el-checkbox-disabled-checked-input-fill:var(--el-border-color-extra-light);--el-checkbox-disabled-checked-input-border-color:var(--el-border-color);--el-checkbox-disabled-checked-icon-color:var(--el-text-color-placeholder);--el-checkbox-checked-text-color:var(--el-color-primary);--el-checkbox-checked-input-border-color:var(--el-color-primary);--el-checkbox-checked-bg-color:var(--el-color-primary);--el-checkbox-checked-icon-color:var(--el-color-white);--el-checkbox-input-border-color-hover:var(--el-color-primary);color:var(--el-checkbox-text-color);font-weight:var(--el-checkbox-font-weight);font-size:var(--el-font-size-base);cursor:pointer;white-space:nowrap;-webkit-user-select:none;user-select:none;height:var(--el-checkbox-height,32px);align-items:center;margin-right:30px;display:inline-flex;position:relative}.el-checkbox.is-disabled{cursor:not-allowed}.el-checkbox.is-bordered{border-radius:var(--el-border-radius-base);border:var(--el-border);box-sizing:border-box;padding:0 15px 0 9px}.el-checkbox.is-bordered.is-checked{border-color:var(--el-color-primary)}.el-checkbox.is-bordered.is-disabled{border-color:var(--el-border-color-lighter)}.el-checkbox.is-bordered.el-checkbox--large{border-radius:var(--el-border-radius-base);padding:0 19px 0 11px}.el-checkbox.is-bordered.el-checkbox--large .el-checkbox__label{font-size:var(--el-font-size-base)}.el-checkbox.is-bordered.el-checkbox--large .el-checkbox__inner{width:14px;height:14px}.el-checkbox.is-bordered.el-checkbox--small{border-radius:calc(var(--el-border-radius-base) - 1px);padding:0 11px 0 7px}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__label{font-size:12px}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__inner{width:12px;height:12px}.el-checkbox.is-bordered.el-checkbox--small .el-checkbox__inner:after{width:2px;height:6px}.el-checkbox input:focus-visible+.el-checkbox__inner{outline:2px solid var(--el-checkbox-input-border-color-hover);outline-offset:1px;border-radius:var(--el-checkbox-border-radius)}.el-checkbox__input{white-space:nowrap;cursor:pointer;outline:none;display:inline-flex;position:relative}.el-checkbox__input.is-disabled .el-checkbox__inner{background-color:var(--el-checkbox-disabled-input-fill);border-color:var(--el-checkbox-disabled-border-color);cursor:not-allowed}.el-checkbox__input.is-disabled .el-checkbox__inner:after{cursor:not-allowed;border-color:var(--el-checkbox-disabled-icon-color);will-change:transform}.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner{background-color:var(--el-checkbox-disabled-checked-input-fill);border-color:var(--el-checkbox-disabled-checked-input-border-color)}.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner:after{border-color:var(--el-checkbox-disabled-checked-icon-color)}.el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner{background-color:var(--el-checkbox-disabled-checked-input-fill);border-color:var(--el-checkbox-disabled-checked-input-border-color)}.el-checkbox__input.is-disabled.is-indeterminate .el-checkbox__inner:before{background-color:var(--el-checkbox-disabled-checked-icon-color);border-color:var(--el-checkbox-disabled-checked-icon-color)}.el-checkbox__input.is-disabled+span.el-checkbox__label{color:var(--el-disabled-text-color);cursor:not-allowed}.el-checkbox__input.is-checked .el-checkbox__inner{background-color:var(--el-checkbox-checked-bg-color);border-color:var(--el-checkbox-checked-input-border-color)}.el-checkbox__input.is-checked .el-checkbox__inner:after{border-color:var(--el-checkbox-checked-icon-color);transform:translate(-45%,-60%)rotate(45deg)scaleY(1)}.el-checkbox__input.is-checked+.el-checkbox__label{color:var(--el-checkbox-checked-text-color)}.el-checkbox__input.is-focus:not(.is-checked) .el-checkbox__original:not(:focus-visible){border-color:var(--el-checkbox-input-border-color-hover)}.el-checkbox__input.is-indeterminate .el-checkbox__inner{background-color:var(--el-checkbox-checked-bg-color);border-color:var(--el-checkbox-checked-input-border-color)}.el-checkbox__input.is-indeterminate .el-checkbox__inner:before{content:"";background-color:var(--el-checkbox-checked-icon-color);height:2px;display:block;position:absolute;top:5px;left:0;right:0;transform:scale(.5)}.el-checkbox__input.is-indeterminate .el-checkbox__inner:after{display:none}.el-checkbox__inner{border:var(--el-checkbox-input-border);border-radius:var(--el-checkbox-border-radius);box-sizing:border-box;width:var(--el-checkbox-input-width);height:var(--el-checkbox-input-height);background-color:var(--el-checkbox-bg-color);z-index:var(--el-index-normal);transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46),outline .25s cubic-bezier(.71,-.46,.29,1.46);display:inline-block;position:relative}.el-checkbox__inner:hover{border-color:var(--el-checkbox-input-border-color-hover)}.el-checkbox__inner:after{box-sizing:content-box;content:"";transform-origin:50%;border:1px solid #0000;border-top:0;border-left:0;width:3px;height:7px;transition:transform .15s ease-in 50ms;position:absolute;top:50%;left:50%;transform:translate(-45%,-60%)rotate(45deg)scaleY(0)}.el-checkbox__original{opacity:0;z-index:-1;outline:none;width:0;height:0;margin:0;position:absolute}.el-checkbox__label{line-height:1;font-size:var(--el-checkbox-font-size);padding-left:8px;display:inline-block}.el-checkbox.el-checkbox--large{height:40px}.el-checkbox.el-checkbox--large .el-checkbox__label{font-size:14px}.el-checkbox.el-checkbox--large .el-checkbox__inner{width:14px;height:14px}.el-checkbox.el-checkbox--small{height:24px}.el-checkbox.el-checkbox--small .el-checkbox__label{font-size:12px}.el-checkbox.el-checkbox--small .el-checkbox__inner{width:12px;height:12px}.el-checkbox.el-checkbox--small .el-checkbox__input.is-indeterminate .el-checkbox__inner:before{top:4px}.el-checkbox.el-checkbox--small .el-checkbox__inner:after{width:2px;height:6px}.el-checkbox:last-of-type{margin-right:0}[class*=el-col-]{box-sizing:border-box}[class*=el-col-].is-guttered{min-height:1px;display:block}.el-col-0{flex:0 0;max-width:0%;display:none}.el-col-0.is-guttered{display:none}.el-col-offset-0{margin-left:0%}.el-col-pull-0{position:relative;right:0%}.el-col-push-0{position:relative;left:0%}.el-col-1{flex:0 0 4.16667%;max-width:4.16667%;display:block}.el-col-1.is-guttered{display:block}.el-col-offset-1{margin-left:4.16667%}.el-col-pull-1{position:relative;right:4.16667%}.el-col-push-1{position:relative;left:4.16667%}.el-col-2{flex:0 0 8.33333%;max-width:8.33333%;display:block}.el-col-2.is-guttered{display:block}.el-col-offset-2{margin-left:8.33333%}.el-col-pull-2{position:relative;right:8.33333%}.el-col-push-2{position:relative;left:8.33333%}.el-col-3{flex:0 0 12.5%;max-width:12.5%;display:block}.el-col-3.is-guttered{display:block}.el-col-offset-3{margin-left:12.5%}.el-col-pull-3{position:relative;right:12.5%}.el-col-push-3{position:relative;left:12.5%}.el-col-4{flex:0 0 16.6667%;max-width:16.6667%;display:block}.el-col-4.is-guttered{display:block}.el-col-offset-4{margin-left:16.6667%}.el-col-pull-4{position:relative;right:16.6667%}.el-col-push-4{position:relative;left:16.6667%}.el-col-5{flex:0 0 20.8333%;max-width:20.8333%;display:block}.el-col-5.is-guttered{display:block}.el-col-offset-5{margin-left:20.8333%}.el-col-pull-5{position:relative;right:20.8333%}.el-col-push-5{position:relative;left:20.8333%}.el-col-6{flex:0 0 25%;max-width:25%;display:block}.el-col-6.is-guttered{display:block}.el-col-offset-6{margin-left:25%}.el-col-pull-6{position:relative;right:25%}.el-col-push-6{position:relative;left:25%}.el-col-7{flex:0 0 29.1667%;max-width:29.1667%;display:block}.el-col-7.is-guttered{display:block}.el-col-offset-7{margin-left:29.1667%}.el-col-pull-7{position:relative;right:29.1667%}.el-col-push-7{position:relative;left:29.1667%}.el-col-8{flex:0 0 33.3333%;max-width:33.3333%;display:block}.el-col-8.is-guttered{display:block}.el-col-offset-8{margin-left:33.3333%}.el-col-pull-8{position:relative;right:33.3333%}.el-col-push-8{position:relative;left:33.3333%}.el-col-9{flex:0 0 37.5%;max-width:37.5%;display:block}.el-col-9.is-guttered{display:block}.el-col-offset-9{margin-left:37.5%}.el-col-pull-9{position:relative;right:37.5%}.el-col-push-9{position:relative;left:37.5%}.el-col-10{flex:0 0 41.6667%;max-width:41.6667%;display:block}.el-col-10.is-guttered{display:block}.el-col-offset-10{margin-left:41.6667%}.el-col-pull-10{position:relative;right:41.6667%}.el-col-push-10{position:relative;left:41.6667%}.el-col-11{flex:0 0 45.8333%;max-width:45.8333%;display:block}.el-col-11.is-guttered{display:block}.el-col-offset-11{margin-left:45.8333%}.el-col-pull-11{position:relative;right:45.8333%}.el-col-push-11{position:relative;left:45.8333%}.el-col-12{flex:0 0 50%;max-width:50%;display:block}.el-col-12.is-guttered{display:block}.el-col-offset-12{margin-left:50%}.el-col-pull-12{position:relative;right:50%}.el-col-push-12{position:relative;left:50%}.el-col-13{flex:0 0 54.1667%;max-width:54.1667%;display:block}.el-col-13.is-guttered{display:block}.el-col-offset-13{margin-left:54.1667%}.el-col-pull-13{position:relative;right:54.1667%}.el-col-push-13{position:relative;left:54.1667%}.el-col-14{flex:0 0 58.3333%;max-width:58.3333%;display:block}.el-col-14.is-guttered{display:block}.el-col-offset-14{margin-left:58.3333%}.el-col-pull-14{position:relative;right:58.3333%}.el-col-push-14{position:relative;left:58.3333%}.el-col-15{flex:0 0 62.5%;max-width:62.5%;display:block}.el-col-15.is-guttered{display:block}.el-col-offset-15{margin-left:62.5%}.el-col-pull-15{position:relative;right:62.5%}.el-col-push-15{position:relative;left:62.5%}.el-col-16{flex:0 0 66.6667%;max-width:66.6667%;display:block}.el-col-16.is-guttered{display:block}.el-col-offset-16{margin-left:66.6667%}.el-col-pull-16{position:relative;right:66.6667%}.el-col-push-16{position:relative;left:66.6667%}.el-col-17{flex:0 0 70.8333%;max-width:70.8333%;display:block}.el-col-17.is-guttered{display:block}.el-col-offset-17{margin-left:70.8333%}.el-col-pull-17{position:relative;right:70.8333%}.el-col-push-17{position:relative;left:70.8333%}.el-col-18{flex:0 0 75%;max-width:75%;display:block}.el-col-18.is-guttered{display:block}.el-col-offset-18{margin-left:75%}.el-col-pull-18{position:relative;right:75%}.el-col-push-18{position:relative;left:75%}.el-col-19{flex:0 0 79.1667%;max-width:79.1667%;display:block}.el-col-19.is-guttered{display:block}.el-col-offset-19{margin-left:79.1667%}.el-col-pull-19{position:relative;right:79.1667%}.el-col-push-19{position:relative;left:79.1667%}.el-col-20{flex:0 0 83.3333%;max-width:83.3333%;display:block}.el-col-20.is-guttered{display:block}.el-col-offset-20{margin-left:83.3333%}.el-col-pull-20{position:relative;right:83.3333%}.el-col-push-20{position:relative;left:83.3333%}.el-col-21{flex:0 0 87.5%;max-width:87.5%;display:block}.el-col-21.is-guttered{display:block}.el-col-offset-21{margin-left:87.5%}.el-col-pull-21{position:relative;right:87.5%}.el-col-push-21{position:relative;left:87.5%}.el-col-22{flex:0 0 91.6667%;max-width:91.6667%;display:block}.el-col-22.is-guttered{display:block}.el-col-offset-22{margin-left:91.6667%}.el-col-pull-22{position:relative;right:91.6667%}.el-col-push-22{position:relative;left:91.6667%}.el-col-23{flex:0 0 95.8333%;max-width:95.8333%;display:block}.el-col-23.is-guttered{display:block}.el-col-offset-23{margin-left:95.8333%}.el-col-pull-23{position:relative;right:95.8333%}.el-col-push-23{position:relative;left:95.8333%}.el-col-24{flex:0 0 100%;max-width:100%;display:block}.el-col-24.is-guttered{display:block}.el-col-offset-24{margin-left:100%}.el-col-pull-24{position:relative;right:100%}.el-col-push-24{position:relative;left:100%}@media only screen and (max-width:767px){.el-col-xs-0{flex:0 0;max-width:0%;display:none}.el-col-xs-0.is-guttered{display:none}.el-col-xs-offset-0{margin-left:0%}.el-col-xs-pull-0{position:relative;right:0%}.el-col-xs-push-0{position:relative;left:0%}.el-col-xs-1{flex:0 0 4.16667%;max-width:4.16667%;display:block}.el-col-xs-1.is-guttered{display:block}.el-col-xs-offset-1{margin-left:4.16667%}.el-col-xs-pull-1{position:relative;right:4.16667%}.el-col-xs-push-1{position:relative;left:4.16667%}.el-col-xs-2{flex:0 0 8.33333%;max-width:8.33333%;display:block}.el-col-xs-2.is-guttered{display:block}.el-col-xs-offset-2{margin-left:8.33333%}.el-col-xs-pull-2{position:relative;right:8.33333%}.el-col-xs-push-2{position:relative;left:8.33333%}.el-col-xs-3{flex:0 0 12.5%;max-width:12.5%;display:block}.el-col-xs-3.is-guttered{display:block}.el-col-xs-offset-3{margin-left:12.5%}.el-col-xs-pull-3{position:relative;right:12.5%}.el-col-xs-push-3{position:relative;left:12.5%}.el-col-xs-4{flex:0 0 16.6667%;max-width:16.6667%;display:block}.el-col-xs-4.is-guttered{display:block}.el-col-xs-offset-4{margin-left:16.6667%}.el-col-xs-pull-4{position:relative;right:16.6667%}.el-col-xs-push-4{position:relative;left:16.6667%}.el-col-xs-5{flex:0 0 20.8333%;max-width:20.8333%;display:block}.el-col-xs-5.is-guttered{display:block}.el-col-xs-offset-5{margin-left:20.8333%}.el-col-xs-pull-5{position:relative;right:20.8333%}.el-col-xs-push-5{position:relative;left:20.8333%}.el-col-xs-6{flex:0 0 25%;max-width:25%;display:block}.el-col-xs-6.is-guttered{display:block}.el-col-xs-offset-6{margin-left:25%}.el-col-xs-pull-6{position:relative;right:25%}.el-col-xs-push-6{position:relative;left:25%}.el-col-xs-7{flex:0 0 29.1667%;max-width:29.1667%;display:block}.el-col-xs-7.is-guttered{display:block}.el-col-xs-offset-7{margin-left:29.1667%}.el-col-xs-pull-7{position:relative;right:29.1667%}.el-col-xs-push-7{position:relative;left:29.1667%}.el-col-xs-8{flex:0 0 33.3333%;max-width:33.3333%;display:block}.el-col-xs-8.is-guttered{display:block}.el-col-xs-offset-8{margin-left:33.3333%}.el-col-xs-pull-8{position:relative;right:33.3333%}.el-col-xs-push-8{position:relative;left:33.3333%}.el-col-xs-9{flex:0 0 37.5%;max-width:37.5%;display:block}.el-col-xs-9.is-guttered{display:block}.el-col-xs-offset-9{margin-left:37.5%}.el-col-xs-pull-9{position:relative;right:37.5%}.el-col-xs-push-9{position:relative;left:37.5%}.el-col-xs-10{flex:0 0 41.6667%;max-width:41.6667%;display:block}.el-col-xs-10.is-guttered{display:block}.el-col-xs-offset-10{margin-left:41.6667%}.el-col-xs-pull-10{position:relative;right:41.6667%}.el-col-xs-push-10{position:relative;left:41.6667%}.el-col-xs-11{flex:0 0 45.8333%;max-width:45.8333%;display:block}.el-col-xs-11.is-guttered{display:block}.el-col-xs-offset-11{margin-left:45.8333%}.el-col-xs-pull-11{position:relative;right:45.8333%}.el-col-xs-push-11{position:relative;left:45.8333%}.el-col-xs-12{flex:0 0 50%;max-width:50%;display:block}.el-col-xs-12.is-guttered{display:block}.el-col-xs-offset-12{margin-left:50%}.el-col-xs-pull-12{position:relative;right:50%}.el-col-xs-push-12{position:relative;left:50%}.el-col-xs-13{flex:0 0 54.1667%;max-width:54.1667%;display:block}.el-col-xs-13.is-guttered{display:block}.el-col-xs-offset-13{margin-left:54.1667%}.el-col-xs-pull-13{position:relative;right:54.1667%}.el-col-xs-push-13{position:relative;left:54.1667%}.el-col-xs-14{flex:0 0 58.3333%;max-width:58.3333%;display:block}.el-col-xs-14.is-guttered{display:block}.el-col-xs-offset-14{margin-left:58.3333%}.el-col-xs-pull-14{position:relative;right:58.3333%}.el-col-xs-push-14{position:relative;left:58.3333%}.el-col-xs-15{flex:0 0 62.5%;max-width:62.5%;display:block}.el-col-xs-15.is-guttered{display:block}.el-col-xs-offset-15{margin-left:62.5%}.el-col-xs-pull-15{position:relative;right:62.5%}.el-col-xs-push-15{position:relative;left:62.5%}.el-col-xs-16{flex:0 0 66.6667%;max-width:66.6667%;display:block}.el-col-xs-16.is-guttered{display:block}.el-col-xs-offset-16{margin-left:66.6667%}.el-col-xs-pull-16{position:relative;right:66.6667%}.el-col-xs-push-16{position:relative;left:66.6667%}.el-col-xs-17{flex:0 0 70.8333%;max-width:70.8333%;display:block}.el-col-xs-17.is-guttered{display:block}.el-col-xs-offset-17{margin-left:70.8333%}.el-col-xs-pull-17{position:relative;right:70.8333%}.el-col-xs-push-17{position:relative;left:70.8333%}.el-col-xs-18{flex:0 0 75%;max-width:75%;display:block}.el-col-xs-18.is-guttered{display:block}.el-col-xs-offset-18{margin-left:75%}.el-col-xs-pull-18{position:relative;right:75%}.el-col-xs-push-18{position:relative;left:75%}.el-col-xs-19{flex:0 0 79.1667%;max-width:79.1667%;display:block}.el-col-xs-19.is-guttered{display:block}.el-col-xs-offset-19{margin-left:79.1667%}.el-col-xs-pull-19{position:relative;right:79.1667%}.el-col-xs-push-19{position:relative;left:79.1667%}.el-col-xs-20{flex:0 0 83.3333%;max-width:83.3333%;display:block}.el-col-xs-20.is-guttered{display:block}.el-col-xs-offset-20{margin-left:83.3333%}.el-col-xs-pull-20{position:relative;right:83.3333%}.el-col-xs-push-20{position:relative;left:83.3333%}.el-col-xs-21{flex:0 0 87.5%;max-width:87.5%;display:block}.el-col-xs-21.is-guttered{display:block}.el-col-xs-offset-21{margin-left:87.5%}.el-col-xs-pull-21{position:relative;right:87.5%}.el-col-xs-push-21{position:relative;left:87.5%}.el-col-xs-22{flex:0 0 91.6667%;max-width:91.6667%;display:block}.el-col-xs-22.is-guttered{display:block}.el-col-xs-offset-22{margin-left:91.6667%}.el-col-xs-pull-22{position:relative;right:91.6667%}.el-col-xs-push-22{position:relative;left:91.6667%}.el-col-xs-23{flex:0 0 95.8333%;max-width:95.8333%;display:block}.el-col-xs-23.is-guttered{display:block}.el-col-xs-offset-23{margin-left:95.8333%}.el-col-xs-pull-23{position:relative;right:95.8333%}.el-col-xs-push-23{position:relative;left:95.8333%}.el-col-xs-24{flex:0 0 100%;max-width:100%;display:block}.el-col-xs-24.is-guttered{display:block}.el-col-xs-offset-24{margin-left:100%}.el-col-xs-pull-24{position:relative;right:100%}.el-col-xs-push-24{position:relative;left:100%}}@media only screen and (min-width:768px){.el-col-sm-0{flex:0 0;max-width:0%;display:none}.el-col-sm-0.is-guttered{display:none}.el-col-sm-offset-0{margin-left:0%}.el-col-sm-pull-0{position:relative;right:0%}.el-col-sm-push-0{position:relative;left:0%}.el-col-sm-1{flex:0 0 4.16667%;max-width:4.16667%;display:block}.el-col-sm-1.is-guttered{display:block}.el-col-sm-offset-1{margin-left:4.16667%}.el-col-sm-pull-1{position:relative;right:4.16667%}.el-col-sm-push-1{position:relative;left:4.16667%}.el-col-sm-2{flex:0 0 8.33333%;max-width:8.33333%;display:block}.el-col-sm-2.is-guttered{display:block}.el-col-sm-offset-2{margin-left:8.33333%}.el-col-sm-pull-2{position:relative;right:8.33333%}.el-col-sm-push-2{position:relative;left:8.33333%}.el-col-sm-3{flex:0 0 12.5%;max-width:12.5%;display:block}.el-col-sm-3.is-guttered{display:block}.el-col-sm-offset-3{margin-left:12.5%}.el-col-sm-pull-3{position:relative;right:12.5%}.el-col-sm-push-3{position:relative;left:12.5%}.el-col-sm-4{flex:0 0 16.6667%;max-width:16.6667%;display:block}.el-col-sm-4.is-guttered{display:block}.el-col-sm-offset-4{margin-left:16.6667%}.el-col-sm-pull-4{position:relative;right:16.6667%}.el-col-sm-push-4{position:relative;left:16.6667%}.el-col-sm-5{flex:0 0 20.8333%;max-width:20.8333%;display:block}.el-col-sm-5.is-guttered{display:block}.el-col-sm-offset-5{margin-left:20.8333%}.el-col-sm-pull-5{position:relative;right:20.8333%}.el-col-sm-push-5{position:relative;left:20.8333%}.el-col-sm-6{flex:0 0 25%;max-width:25%;display:block}.el-col-sm-6.is-guttered{display:block}.el-col-sm-offset-6{margin-left:25%}.el-col-sm-pull-6{position:relative;right:25%}.el-col-sm-push-6{position:relative;left:25%}.el-col-sm-7{flex:0 0 29.1667%;max-width:29.1667%;display:block}.el-col-sm-7.is-guttered{display:block}.el-col-sm-offset-7{margin-left:29.1667%}.el-col-sm-pull-7{position:relative;right:29.1667%}.el-col-sm-push-7{position:relative;left:29.1667%}.el-col-sm-8{flex:0 0 33.3333%;max-width:33.3333%;display:block}.el-col-sm-8.is-guttered{display:block}.el-col-sm-offset-8{margin-left:33.3333%}.el-col-sm-pull-8{position:relative;right:33.3333%}.el-col-sm-push-8{position:relative;left:33.3333%}.el-col-sm-9{flex:0 0 37.5%;max-width:37.5%;display:block}.el-col-sm-9.is-guttered{display:block}.el-col-sm-offset-9{margin-left:37.5%}.el-col-sm-pull-9{position:relative;right:37.5%}.el-col-sm-push-9{position:relative;left:37.5%}.el-col-sm-10{flex:0 0 41.6667%;max-width:41.6667%;display:block}.el-col-sm-10.is-guttered{display:block}.el-col-sm-offset-10{margin-left:41.6667%}.el-col-sm-pull-10{position:relative;right:41.6667%}.el-col-sm-push-10{position:relative;left:41.6667%}.el-col-sm-11{flex:0 0 45.8333%;max-width:45.8333%;display:block}.el-col-sm-11.is-guttered{display:block}.el-col-sm-offset-11{margin-left:45.8333%}.el-col-sm-pull-11{position:relative;right:45.8333%}.el-col-sm-push-11{position:relative;left:45.8333%}.el-col-sm-12{flex:0 0 50%;max-width:50%;display:block}.el-col-sm-12.is-guttered{display:block}.el-col-sm-offset-12{margin-left:50%}.el-col-sm-pull-12{position:relative;right:50%}.el-col-sm-push-12{position:relative;left:50%}.el-col-sm-13{flex:0 0 54.1667%;max-width:54.1667%;display:block}.el-col-sm-13.is-guttered{display:block}.el-col-sm-offset-13{margin-left:54.1667%}.el-col-sm-pull-13{position:relative;right:54.1667%}.el-col-sm-push-13{position:relative;left:54.1667%}.el-col-sm-14{flex:0 0 58.3333%;max-width:58.3333%;display:block}.el-col-sm-14.is-guttered{display:block}.el-col-sm-offset-14{margin-left:58.3333%}.el-col-sm-pull-14{position:relative;right:58.3333%}.el-col-sm-push-14{position:relative;left:58.3333%}.el-col-sm-15{flex:0 0 62.5%;max-width:62.5%;display:block}.el-col-sm-15.is-guttered{display:block}.el-col-sm-offset-15{margin-left:62.5%}.el-col-sm-pull-15{position:relative;right:62.5%}.el-col-sm-push-15{position:relative;left:62.5%}.el-col-sm-16{flex:0 0 66.6667%;max-width:66.6667%;display:block}.el-col-sm-16.is-guttered{display:block}.el-col-sm-offset-16{margin-left:66.6667%}.el-col-sm-pull-16{position:relative;right:66.6667%}.el-col-sm-push-16{position:relative;left:66.6667%}.el-col-sm-17{flex:0 0 70.8333%;max-width:70.8333%;display:block}.el-col-sm-17.is-guttered{display:block}.el-col-sm-offset-17{margin-left:70.8333%}.el-col-sm-pull-17{position:relative;right:70.8333%}.el-col-sm-push-17{position:relative;left:70.8333%}.el-col-sm-18{flex:0 0 75%;max-width:75%;display:block}.el-col-sm-18.is-guttered{display:block}.el-col-sm-offset-18{margin-left:75%}.el-col-sm-pull-18{position:relative;right:75%}.el-col-sm-push-18{position:relative;left:75%}.el-col-sm-19{flex:0 0 79.1667%;max-width:79.1667%;display:block}.el-col-sm-19.is-guttered{display:block}.el-col-sm-offset-19{margin-left:79.1667%}.el-col-sm-pull-19{position:relative;right:79.1667%}.el-col-sm-push-19{position:relative;left:79.1667%}.el-col-sm-20{flex:0 0 83.3333%;max-width:83.3333%;display:block}.el-col-sm-20.is-guttered{display:block}.el-col-sm-offset-20{margin-left:83.3333%}.el-col-sm-pull-20{position:relative;right:83.3333%}.el-col-sm-push-20{position:relative;left:83.3333%}.el-col-sm-21{flex:0 0 87.5%;max-width:87.5%;display:block}.el-col-sm-21.is-guttered{display:block}.el-col-sm-offset-21{margin-left:87.5%}.el-col-sm-pull-21{position:relative;right:87.5%}.el-col-sm-push-21{position:relative;left:87.5%}.el-col-sm-22{flex:0 0 91.6667%;max-width:91.6667%;display:block}.el-col-sm-22.is-guttered{display:block}.el-col-sm-offset-22{margin-left:91.6667%}.el-col-sm-pull-22{position:relative;right:91.6667%}.el-col-sm-push-22{position:relative;left:91.6667%}.el-col-sm-23{flex:0 0 95.8333%;max-width:95.8333%;display:block}.el-col-sm-23.is-guttered{display:block}.el-col-sm-offset-23{margin-left:95.8333%}.el-col-sm-pull-23{position:relative;right:95.8333%}.el-col-sm-push-23{position:relative;left:95.8333%}.el-col-sm-24{flex:0 0 100%;max-width:100%;display:block}.el-col-sm-24.is-guttered{display:block}.el-col-sm-offset-24{margin-left:100%}.el-col-sm-pull-24{position:relative;right:100%}.el-col-sm-push-24{position:relative;left:100%}}@media only screen and (min-width:992px){.el-col-md-0{flex:0 0;max-width:0%;display:none}.el-col-md-0.is-guttered{display:none}.el-col-md-offset-0{margin-left:0%}.el-col-md-pull-0{position:relative;right:0%}.el-col-md-push-0{position:relative;left:0%}.el-col-md-1{flex:0 0 4.16667%;max-width:4.16667%;display:block}.el-col-md-1.is-guttered{display:block}.el-col-md-offset-1{margin-left:4.16667%}.el-col-md-pull-1{position:relative;right:4.16667%}.el-col-md-push-1{position:relative;left:4.16667%}.el-col-md-2{flex:0 0 8.33333%;max-width:8.33333%;display:block}.el-col-md-2.is-guttered{display:block}.el-col-md-offset-2{margin-left:8.33333%}.el-col-md-pull-2{position:relative;right:8.33333%}.el-col-md-push-2{position:relative;left:8.33333%}.el-col-md-3{flex:0 0 12.5%;max-width:12.5%;display:block}.el-col-md-3.is-guttered{display:block}.el-col-md-offset-3{margin-left:12.5%}.el-col-md-pull-3{position:relative;right:12.5%}.el-col-md-push-3{position:relative;left:12.5%}.el-col-md-4{flex:0 0 16.6667%;max-width:16.6667%;display:block}.el-col-md-4.is-guttered{display:block}.el-col-md-offset-4{margin-left:16.6667%}.el-col-md-pull-4{position:relative;right:16.6667%}.el-col-md-push-4{position:relative;left:16.6667%}.el-col-md-5{flex:0 0 20.8333%;max-width:20.8333%;display:block}.el-col-md-5.is-guttered{display:block}.el-col-md-offset-5{margin-left:20.8333%}.el-col-md-pull-5{position:relative;right:20.8333%}.el-col-md-push-5{position:relative;left:20.8333%}.el-col-md-6{flex:0 0 25%;max-width:25%;display:block}.el-col-md-6.is-guttered{display:block}.el-col-md-offset-6{margin-left:25%}.el-col-md-pull-6{position:relative;right:25%}.el-col-md-push-6{position:relative;left:25%}.el-col-md-7{flex:0 0 29.1667%;max-width:29.1667%;display:block}.el-col-md-7.is-guttered{display:block}.el-col-md-offset-7{margin-left:29.1667%}.el-col-md-pull-7{position:relative;right:29.1667%}.el-col-md-push-7{position:relative;left:29.1667%}.el-col-md-8{flex:0 0 33.3333%;max-width:33.3333%;display:block}.el-col-md-8.is-guttered{display:block}.el-col-md-offset-8{margin-left:33.3333%}.el-col-md-pull-8{position:relative;right:33.3333%}.el-col-md-push-8{position:relative;left:33.3333%}.el-col-md-9{flex:0 0 37.5%;max-width:37.5%;display:block}.el-col-md-9.is-guttered{display:block}.el-col-md-offset-9{margin-left:37.5%}.el-col-md-pull-9{position:relative;right:37.5%}.el-col-md-push-9{position:relative;left:37.5%}.el-col-md-10{flex:0 0 41.6667%;max-width:41.6667%;display:block}.el-col-md-10.is-guttered{display:block}.el-col-md-offset-10{margin-left:41.6667%}.el-col-md-pull-10{position:relative;right:41.6667%}.el-col-md-push-10{position:relative;left:41.6667%}.el-col-md-11{flex:0 0 45.8333%;max-width:45.8333%;display:block}.el-col-md-11.is-guttered{display:block}.el-col-md-offset-11{margin-left:45.8333%}.el-col-md-pull-11{position:relative;right:45.8333%}.el-col-md-push-11{position:relative;left:45.8333%}.el-col-md-12{flex:0 0 50%;max-width:50%;display:block}.el-col-md-12.is-guttered{display:block}.el-col-md-offset-12{margin-left:50%}.el-col-md-pull-12{position:relative;right:50%}.el-col-md-push-12{position:relative;left:50%}.el-col-md-13{flex:0 0 54.1667%;max-width:54.1667%;display:block}.el-col-md-13.is-guttered{display:block}.el-col-md-offset-13{margin-left:54.1667%}.el-col-md-pull-13{position:relative;right:54.1667%}.el-col-md-push-13{position:relative;left:54.1667%}.el-col-md-14{flex:0 0 58.3333%;max-width:58.3333%;display:block}.el-col-md-14.is-guttered{display:block}.el-col-md-offset-14{margin-left:58.3333%}.el-col-md-pull-14{position:relative;right:58.3333%}.el-col-md-push-14{position:relative;left:58.3333%}.el-col-md-15{flex:0 0 62.5%;max-width:62.5%;display:block}.el-col-md-15.is-guttered{display:block}.el-col-md-offset-15{margin-left:62.5%}.el-col-md-pull-15{position:relative;right:62.5%}.el-col-md-push-15{position:relative;left:62.5%}.el-col-md-16{flex:0 0 66.6667%;max-width:66.6667%;display:block}.el-col-md-16.is-guttered{display:block}.el-col-md-offset-16{margin-left:66.6667%}.el-col-md-pull-16{position:relative;right:66.6667%}.el-col-md-push-16{position:relative;left:66.6667%}.el-col-md-17{flex:0 0 70.8333%;max-width:70.8333%;display:block}.el-col-md-17.is-guttered{display:block}.el-col-md-offset-17{margin-left:70.8333%}.el-col-md-pull-17{position:relative;right:70.8333%}.el-col-md-push-17{position:relative;left:70.8333%}.el-col-md-18{flex:0 0 75%;max-width:75%;display:block}.el-col-md-18.is-guttered{display:block}.el-col-md-offset-18{margin-left:75%}.el-col-md-pull-18{position:relative;right:75%}.el-col-md-push-18{position:relative;left:75%}.el-col-md-19{flex:0 0 79.1667%;max-width:79.1667%;display:block}.el-col-md-19.is-guttered{display:block}.el-col-md-offset-19{margin-left:79.1667%}.el-col-md-pull-19{position:relative;right:79.1667%}.el-col-md-push-19{position:relative;left:79.1667%}.el-col-md-20{flex:0 0 83.3333%;max-width:83.3333%;display:block}.el-col-md-20.is-guttered{display:block}.el-col-md-offset-20{margin-left:83.3333%}.el-col-md-pull-20{position:relative;right:83.3333%}.el-col-md-push-20{position:relative;left:83.3333%}.el-col-md-21{flex:0 0 87.5%;max-width:87.5%;display:block}.el-col-md-21.is-guttered{display:block}.el-col-md-offset-21{margin-left:87.5%}.el-col-md-pull-21{position:relative;right:87.5%}.el-col-md-push-21{position:relative;left:87.5%}.el-col-md-22{flex:0 0 91.6667%;max-width:91.6667%;display:block}.el-col-md-22.is-guttered{display:block}.el-col-md-offset-22{margin-left:91.6667%}.el-col-md-pull-22{position:relative;right:91.6667%}.el-col-md-push-22{position:relative;left:91.6667%}.el-col-md-23{flex:0 0 95.8333%;max-width:95.8333%;display:block}.el-col-md-23.is-guttered{display:block}.el-col-md-offset-23{margin-left:95.8333%}.el-col-md-pull-23{position:relative;right:95.8333%}.el-col-md-push-23{position:relative;left:95.8333%}.el-col-md-24{flex:0 0 100%;max-width:100%;display:block}.el-col-md-24.is-guttered{display:block}.el-col-md-offset-24{margin-left:100%}.el-col-md-pull-24{position:relative;right:100%}.el-col-md-push-24{position:relative;left:100%}}@media only screen and (min-width:1200px){.el-col-lg-0{flex:0 0;max-width:0%;display:none}.el-col-lg-0.is-guttered{display:none}.el-col-lg-offset-0{margin-left:0%}.el-col-lg-pull-0{position:relative;right:0%}.el-col-lg-push-0{position:relative;left:0%}.el-col-lg-1{flex:0 0 4.16667%;max-width:4.16667%;display:block}.el-col-lg-1.is-guttered{display:block}.el-col-lg-offset-1{margin-left:4.16667%}.el-col-lg-pull-1{position:relative;right:4.16667%}.el-col-lg-push-1{position:relative;left:4.16667%}.el-col-lg-2{flex:0 0 8.33333%;max-width:8.33333%;display:block}.el-col-lg-2.is-guttered{display:block}.el-col-lg-offset-2{margin-left:8.33333%}.el-col-lg-pull-2{position:relative;right:8.33333%}.el-col-lg-push-2{position:relative;left:8.33333%}.el-col-lg-3{flex:0 0 12.5%;max-width:12.5%;display:block}.el-col-lg-3.is-guttered{display:block}.el-col-lg-offset-3{margin-left:12.5%}.el-col-lg-pull-3{position:relative;right:12.5%}.el-col-lg-push-3{position:relative;left:12.5%}.el-col-lg-4{flex:0 0 16.6667%;max-width:16.6667%;display:block}.el-col-lg-4.is-guttered{display:block}.el-col-lg-offset-4{margin-left:16.6667%}.el-col-lg-pull-4{position:relative;right:16.6667%}.el-col-lg-push-4{position:relative;left:16.6667%}.el-col-lg-5{flex:0 0 20.8333%;max-width:20.8333%;display:block}.el-col-lg-5.is-guttered{display:block}.el-col-lg-offset-5{margin-left:20.8333%}.el-col-lg-pull-5{position:relative;right:20.8333%}.el-col-lg-push-5{position:relative;left:20.8333%}.el-col-lg-6{flex:0 0 25%;max-width:25%;display:block}.el-col-lg-6.is-guttered{display:block}.el-col-lg-offset-6{margin-left:25%}.el-col-lg-pull-6{position:relative;right:25%}.el-col-lg-push-6{position:relative;left:25%}.el-col-lg-7{flex:0 0 29.1667%;max-width:29.1667%;display:block}.el-col-lg-7.is-guttered{display:block}.el-col-lg-offset-7{margin-left:29.1667%}.el-col-lg-pull-7{position:relative;right:29.1667%}.el-col-lg-push-7{position:relative;left:29.1667%}.el-col-lg-8{flex:0 0 33.3333%;max-width:33.3333%;display:block}.el-col-lg-8.is-guttered{display:block}.el-col-lg-offset-8{margin-left:33.3333%}.el-col-lg-pull-8{position:relative;right:33.3333%}.el-col-lg-push-8{position:relative;left:33.3333%}.el-col-lg-9{flex:0 0 37.5%;max-width:37.5%;display:block}.el-col-lg-9.is-guttered{display:block}.el-col-lg-offset-9{margin-left:37.5%}.el-col-lg-pull-9{position:relative;right:37.5%}.el-col-lg-push-9{position:relative;left:37.5%}.el-col-lg-10{flex:0 0 41.6667%;max-width:41.6667%;display:block}.el-col-lg-10.is-guttered{display:block}.el-col-lg-offset-10{margin-left:41.6667%}.el-col-lg-pull-10{position:relative;right:41.6667%}.el-col-lg-push-10{position:relative;left:41.6667%}.el-col-lg-11{flex:0 0 45.8333%;max-width:45.8333%;display:block}.el-col-lg-11.is-guttered{display:block}.el-col-lg-offset-11{margin-left:45.8333%}.el-col-lg-pull-11{position:relative;right:45.8333%}.el-col-lg-push-11{position:relative;left:45.8333%}.el-col-lg-12{flex:0 0 50%;max-width:50%;display:block}.el-col-lg-12.is-guttered{display:block}.el-col-lg-offset-12{margin-left:50%}.el-col-lg-pull-12{position:relative;right:50%}.el-col-lg-push-12{position:relative;left:50%}.el-col-lg-13{flex:0 0 54.1667%;max-width:54.1667%;display:block}.el-col-lg-13.is-guttered{display:block}.el-col-lg-offset-13{margin-left:54.1667%}.el-col-lg-pull-13{position:relative;right:54.1667%}.el-col-lg-push-13{position:relative;left:54.1667%}.el-col-lg-14{flex:0 0 58.3333%;max-width:58.3333%;display:block}.el-col-lg-14.is-guttered{display:block}.el-col-lg-offset-14{margin-left:58.3333%}.el-col-lg-pull-14{position:relative;right:58.3333%}.el-col-lg-push-14{position:relative;left:58.3333%}.el-col-lg-15{flex:0 0 62.5%;max-width:62.5%;display:block}.el-col-lg-15.is-guttered{display:block}.el-col-lg-offset-15{margin-left:62.5%}.el-col-lg-pull-15{position:relative;right:62.5%}.el-col-lg-push-15{position:relative;left:62.5%}.el-col-lg-16{flex:0 0 66.6667%;max-width:66.6667%;display:block}.el-col-lg-16.is-guttered{display:block}.el-col-lg-offset-16{margin-left:66.6667%}.el-col-lg-pull-16{position:relative;right:66.6667%}.el-col-lg-push-16{position:relative;left:66.6667%}.el-col-lg-17{flex:0 0 70.8333%;max-width:70.8333%;display:block}.el-col-lg-17.is-guttered{display:block}.el-col-lg-offset-17{margin-left:70.8333%}.el-col-lg-pull-17{position:relative;right:70.8333%}.el-col-lg-push-17{position:relative;left:70.8333%}.el-col-lg-18{flex:0 0 75%;max-width:75%;display:block}.el-col-lg-18.is-guttered{display:block}.el-col-lg-offset-18{margin-left:75%}.el-col-lg-pull-18{position:relative;right:75%}.el-col-lg-push-18{position:relative;left:75%}.el-col-lg-19{flex:0 0 79.1667%;max-width:79.1667%;display:block}.el-col-lg-19.is-guttered{display:block}.el-col-lg-offset-19{margin-left:79.1667%}.el-col-lg-pull-19{position:relative;right:79.1667%}.el-col-lg-push-19{position:relative;left:79.1667%}.el-col-lg-20{flex:0 0 83.3333%;max-width:83.3333%;display:block}.el-col-lg-20.is-guttered{display:block}.el-col-lg-offset-20{margin-left:83.3333%}.el-col-lg-pull-20{position:relative;right:83.3333%}.el-col-lg-push-20{position:relative;left:83.3333%}.el-col-lg-21{flex:0 0 87.5%;max-width:87.5%;display:block}.el-col-lg-21.is-guttered{display:block}.el-col-lg-offset-21{margin-left:87.5%}.el-col-lg-pull-21{position:relative;right:87.5%}.el-col-lg-push-21{position:relative;left:87.5%}.el-col-lg-22{flex:0 0 91.6667%;max-width:91.6667%;display:block}.el-col-lg-22.is-guttered{display:block}.el-col-lg-offset-22{margin-left:91.6667%}.el-col-lg-pull-22{position:relative;right:91.6667%}.el-col-lg-push-22{position:relative;left:91.6667%}.el-col-lg-23{flex:0 0 95.8333%;max-width:95.8333%;display:block}.el-col-lg-23.is-guttered{display:block}.el-col-lg-offset-23{margin-left:95.8333%}.el-col-lg-pull-23{position:relative;right:95.8333%}.el-col-lg-push-23{position:relative;left:95.8333%}.el-col-lg-24{flex:0 0 100%;max-width:100%;display:block}.el-col-lg-24.is-guttered{display:block}.el-col-lg-offset-24{margin-left:100%}.el-col-lg-pull-24{position:relative;right:100%}.el-col-lg-push-24{position:relative;left:100%}}@media only screen and (min-width:1920px){.el-col-xl-0{flex:0 0;max-width:0%;display:none}.el-col-xl-0.is-guttered{display:none}.el-col-xl-offset-0{margin-left:0%}.el-col-xl-pull-0{position:relative;right:0%}.el-col-xl-push-0{position:relative;left:0%}.el-col-xl-1{flex:0 0 4.16667%;max-width:4.16667%;display:block}.el-col-xl-1.is-guttered{display:block}.el-col-xl-offset-1{margin-left:4.16667%}.el-col-xl-pull-1{position:relative;right:4.16667%}.el-col-xl-push-1{position:relative;left:4.16667%}.el-col-xl-2{flex:0 0 8.33333%;max-width:8.33333%;display:block}.el-col-xl-2.is-guttered{display:block}.el-col-xl-offset-2{margin-left:8.33333%}.el-col-xl-pull-2{position:relative;right:8.33333%}.el-col-xl-push-2{position:relative;left:8.33333%}.el-col-xl-3{flex:0 0 12.5%;max-width:12.5%;display:block}.el-col-xl-3.is-guttered{display:block}.el-col-xl-offset-3{margin-left:12.5%}.el-col-xl-pull-3{position:relative;right:12.5%}.el-col-xl-push-3{position:relative;left:12.5%}.el-col-xl-4{flex:0 0 16.6667%;max-width:16.6667%;display:block}.el-col-xl-4.is-guttered{display:block}.el-col-xl-offset-4{margin-left:16.6667%}.el-col-xl-pull-4{position:relative;right:16.6667%}.el-col-xl-push-4{position:relative;left:16.6667%}.el-col-xl-5{flex:0 0 20.8333%;max-width:20.8333%;display:block}.el-col-xl-5.is-guttered{display:block}.el-col-xl-offset-5{margin-left:20.8333%}.el-col-xl-pull-5{position:relative;right:20.8333%}.el-col-xl-push-5{position:relative;left:20.8333%}.el-col-xl-6{flex:0 0 25%;max-width:25%;display:block}.el-col-xl-6.is-guttered{display:block}.el-col-xl-offset-6{margin-left:25%}.el-col-xl-pull-6{position:relative;right:25%}.el-col-xl-push-6{position:relative;left:25%}.el-col-xl-7{flex:0 0 29.1667%;max-width:29.1667%;display:block}.el-col-xl-7.is-guttered{display:block}.el-col-xl-offset-7{margin-left:29.1667%}.el-col-xl-pull-7{position:relative;right:29.1667%}.el-col-xl-push-7{position:relative;left:29.1667%}.el-col-xl-8{flex:0 0 33.3333%;max-width:33.3333%;display:block}.el-col-xl-8.is-guttered{display:block}.el-col-xl-offset-8{margin-left:33.3333%}.el-col-xl-pull-8{position:relative;right:33.3333%}.el-col-xl-push-8{position:relative;left:33.3333%}.el-col-xl-9{flex:0 0 37.5%;max-width:37.5%;display:block}.el-col-xl-9.is-guttered{display:block}.el-col-xl-offset-9{margin-left:37.5%}.el-col-xl-pull-9{position:relative;right:37.5%}.el-col-xl-push-9{position:relative;left:37.5%}.el-col-xl-10{flex:0 0 41.6667%;max-width:41.6667%;display:block}.el-col-xl-10.is-guttered{display:block}.el-col-xl-offset-10{margin-left:41.6667%}.el-col-xl-pull-10{position:relative;right:41.6667%}.el-col-xl-push-10{position:relative;left:41.6667%}.el-col-xl-11{flex:0 0 45.8333%;max-width:45.8333%;display:block}.el-col-xl-11.is-guttered{display:block}.el-col-xl-offset-11{margin-left:45.8333%}.el-col-xl-pull-11{position:relative;right:45.8333%}.el-col-xl-push-11{position:relative;left:45.8333%}.el-col-xl-12{flex:0 0 50%;max-width:50%;display:block}.el-col-xl-12.is-guttered{display:block}.el-col-xl-offset-12{margin-left:50%}.el-col-xl-pull-12{position:relative;right:50%}.el-col-xl-push-12{position:relative;left:50%}.el-col-xl-13{flex:0 0 54.1667%;max-width:54.1667%;display:block}.el-col-xl-13.is-guttered{display:block}.el-col-xl-offset-13{margin-left:54.1667%}.el-col-xl-pull-13{position:relative;right:54.1667%}.el-col-xl-push-13{position:relative;left:54.1667%}.el-col-xl-14{flex:0 0 58.3333%;max-width:58.3333%;display:block}.el-col-xl-14.is-guttered{display:block}.el-col-xl-offset-14{margin-left:58.3333%}.el-col-xl-pull-14{position:relative;right:58.3333%}.el-col-xl-push-14{position:relative;left:58.3333%}.el-col-xl-15{flex:0 0 62.5%;max-width:62.5%;display:block}.el-col-xl-15.is-guttered{display:block}.el-col-xl-offset-15{margin-left:62.5%}.el-col-xl-pull-15{position:relative;right:62.5%}.el-col-xl-push-15{position:relative;left:62.5%}.el-col-xl-16{flex:0 0 66.6667%;max-width:66.6667%;display:block}.el-col-xl-16.is-guttered{display:block}.el-col-xl-offset-16{margin-left:66.6667%}.el-col-xl-pull-16{position:relative;right:66.6667%}.el-col-xl-push-16{position:relative;left:66.6667%}.el-col-xl-17{flex:0 0 70.8333%;max-width:70.8333%;display:block}.el-col-xl-17.is-guttered{display:block}.el-col-xl-offset-17{margin-left:70.8333%}.el-col-xl-pull-17{position:relative;right:70.8333%}.el-col-xl-push-17{position:relative;left:70.8333%}.el-col-xl-18{flex:0 0 75%;max-width:75%;display:block}.el-col-xl-18.is-guttered{display:block}.el-col-xl-offset-18{margin-left:75%}.el-col-xl-pull-18{position:relative;right:75%}.el-col-xl-push-18{position:relative;left:75%}.el-col-xl-19{flex:0 0 79.1667%;max-width:79.1667%;display:block}.el-col-xl-19.is-guttered{display:block}.el-col-xl-offset-19{margin-left:79.1667%}.el-col-xl-pull-19{position:relative;right:79.1667%}.el-col-xl-push-19{position:relative;left:79.1667%}.el-col-xl-20{flex:0 0 83.3333%;max-width:83.3333%;display:block}.el-col-xl-20.is-guttered{display:block}.el-col-xl-offset-20{margin-left:83.3333%}.el-col-xl-pull-20{position:relative;right:83.3333%}.el-col-xl-push-20{position:relative;left:83.3333%}.el-col-xl-21{flex:0 0 87.5%;max-width:87.5%;display:block}.el-col-xl-21.is-guttered{display:block}.el-col-xl-offset-21{margin-left:87.5%}.el-col-xl-pull-21{position:relative;right:87.5%}.el-col-xl-push-21{position:relative;left:87.5%}.el-col-xl-22{flex:0 0 91.6667%;max-width:91.6667%;display:block}.el-col-xl-22.is-guttered{display:block}.el-col-xl-offset-22{margin-left:91.6667%}.el-col-xl-pull-22{position:relative;right:91.6667%}.el-col-xl-push-22{position:relative;left:91.6667%}.el-col-xl-23{flex:0 0 95.8333%;max-width:95.8333%;display:block}.el-col-xl-23.is-guttered{display:block}.el-col-xl-offset-23{margin-left:95.8333%}.el-col-xl-pull-23{position:relative;right:95.8333%}.el-col-xl-push-23{position:relative;left:95.8333%}.el-col-xl-24{flex:0 0 100%;max-width:100%;display:block}.el-col-xl-24.is-guttered{display:block}.el-col-xl-offset-24{margin-left:100%}.el-col-xl-pull-24{position:relative;right:100%}.el-col-xl-push-24{position:relative;left:100%}}.el-collapse-item.is-disabled .el-collapse-item__header{color:var(--el-text-color-disabled);cursor:not-allowed}.el-collapse-item__header{width:100%;min-height:var(--el-collapse-header-height);line-height:var(--el-collapse-header-height);background-color:var(--el-collapse-header-bg-color);color:var(--el-collapse-header-text-color);cursor:pointer;border:none;border-bottom:1px solid var(--el-collapse-border-color);font-size:var(--el-collapse-header-font-size);transition:border-bottom-color var(--el-transition-duration);box-sizing:border-box;outline:none;align-items:center;padding:0;font-weight:500;display:flex}.el-collapse-item__arrow{transition:transform var(--el-transition-duration);font-weight:300}.el-collapse-item__arrow.is-active{transform:rotate(90deg)}.el-collapse-item__title{text-align:left;flex:auto}.el-collapse-item__header.focusing:focus:not(:hover){color:var(--el-color-primary)}.el-collapse-item__header.is-active{border-bottom-color:#0000}.el-collapse-item__wrap{will-change:height;background-color:var(--el-collapse-content-bg-color);box-sizing:border-box;border-bottom:1px solid var(--el-collapse-border-color);overflow:hidden}.el-collapse-item__content{font-size:var(--el-collapse-content-font-size);color:var(--el-collapse-content-text-color);padding-bottom:25px;line-height:1.76923}.el-collapse-item:last-child{margin-bottom:-1px}.el-collapse{--el-collapse-border-color:var(--el-border-color-lighter);--el-collapse-header-height:48px;--el-collapse-header-bg-color:var(--el-fill-color-blank);--el-collapse-header-text-color:var(--el-text-color-primary);--el-collapse-header-font-size:13px;--el-collapse-content-bg-color:var(--el-fill-color-blank);--el-collapse-content-font-size:13px;--el-collapse-content-text-color:var(--el-text-color-primary);border-top:1px solid var(--el-collapse-border-color);border-bottom:1px solid var(--el-collapse-border-color)}.el-collapse-icon-position-left .el-collapse-item__header{gap:8px}.el-collapse-icon-position-left .el-collapse-item__title{order:1}.el-collapse-icon-position-right .el-collapse-item__header{padding-right:8px}.el-color-picker-panel{--el-colorpicker-bg-color:var(--el-bg-color-overlay);--el-fill-color-blank:var(--el-colorpicker-bg-color);box-sizing:content-box;background:var(--el-colorpicker-bg-color);width:300px;padding:12px}.el-color-picker-panel.is-border{border:solid 1px var(--el-border-color-lighter);border-radius:4px}.el-color-picker-panel__wrapper{margin-bottom:6px}.el-color-picker-panel__footer{text-align:right;justify-content:space-between;margin-top:12px;display:flex}.el-color-picker-panel__footer .el-input{color:#000;width:160px;font-size:12px;line-height:26px}.el-color-picker-panel.is-disabled .el-color-svpanel,.el-color-picker-panel.is-disabled .el-color-hue-slider{cursor:not-allowed;opacity:.3}.el-color-picker-panel.is-disabled .el-color-hue-slider__thumb{cursor:not-allowed}.el-color-picker-panel.is-disabled .el-color-alpha-slider,.el-color-picker-panel.is-disabled .el-color-predefine .el-color-predefine__color-selector{cursor:not-allowed;opacity:.3}.el-color-predefine{width:280px;margin-top:8px;font-size:12px;display:flex}.el-color-predefine__colors{flex-wrap:wrap;flex:1;gap:8px;display:flex}.el-color-predefine__color-selector{border-radius:var(--el-border-radius-base);cursor:pointer;border:none;outline:none;width:20px;height:20px;padding:0;overflow:hidden}.el-color-predefine__color-selector.selected{box-shadow:0 0 3px 2px var(--el-color-primary)}.el-color-predefine__color-selector:focus-visible{outline:2px solid var(--el-color-primary);outline-offset:2px}.el-color-predefine__color-selector>div{height:100%;display:flex}.el-color-predefine__color-selector.is-alpha{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.el-color-hue-slider{box-sizing:border-box;float:right;background-color:red;width:280px;height:12px;padding:0 2px;position:relative}.el-color-hue-slider__bar{background:linear-gradient(90deg,red,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red);height:100%;position:relative}.el-color-hue-slider__thumb{cursor:pointer;box-sizing:border-box;border:1px solid var(--el-border-color-lighter);z-index:1;background:#fff;border-radius:1px;width:4px;height:100%;position:absolute;top:0;left:0;box-shadow:0 0 2px #0009}.el-color-hue-slider__thumb:focus-visible{outline:2px solid var(--el-color-primary);outline-offset:1px}.el-color-hue-slider.is-vertical{width:12px;height:180px;padding:2px 0}.el-color-hue-slider.is-vertical .el-color-hue-slider__bar{background:linear-gradient(red,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.el-color-hue-slider.is-vertical .el-color-hue-slider__thumb{width:100%;height:4px;top:0;left:0}.el-color-svpanel{background-image:linear-gradient(#0000,#000),linear-gradient(90deg,#fff,#fff0);width:280px;height:180px;position:relative}.el-color-svpanel__cursor{cursor:pointer;border-radius:50%;width:4px;height:4px;position:absolute;transform:translate(-2px,-2px);box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px #0000004d,0 0 1px 2px #0006}.el-color-svpanel__cursor:focus-visible{outline:2px solid var(--el-color-primary);outline-offset:2px}.el-color-alpha-slider{box-sizing:border-box;background-image:linear-gradient(45deg,var(--el-color-picker-alpha-bg-a) 25%,var(--el-color-picker-alpha-bg-b) 25%),linear-gradient(135deg,var(--el-color-picker-alpha-bg-a) 25%,var(--el-color-picker-alpha-bg-b) 25%),linear-gradient(45deg,var(--el-color-picker-alpha-bg-b) 75%,var(--el-color-picker-alpha-bg-a) 75%),linear-gradient(135deg,var(--el-color-picker-alpha-bg-b) 75%,var(--el-color-picker-alpha-bg-a) 75%);background-position:0 0,6px 0,6px -6px,0 6px;background-size:12px 12px;width:280px;height:12px;position:relative}.el-color-alpha-slider.is-disabled .el-color-alpha-slider__thumb{cursor:not-allowed}.el-color-alpha-slider__bar{background:linear-gradient(to right,#fff0 0%,var(--el-bg-color) 100%);height:100%;position:relative}.el-color-alpha-slider__thumb{cursor:pointer;box-sizing:border-box;border:1px solid var(--el-border-color-lighter);z-index:1;background:#fff;border-radius:1px;width:4px;height:100%;position:absolute;top:0;left:0;box-shadow:0 0 2px #0009}.el-color-alpha-slider__thumb:focus-visible{outline:2px solid var(--el-color-primary);outline-offset:1px}.el-color-alpha-slider.is-vertical{width:20px;height:180px}.el-color-alpha-slider.is-vertical .el-color-alpha-slider__bar{background:linear-gradient(#fff0,#fff)}.el-color-alpha-slider.is-vertical .el-color-alpha-slider__thumb{width:100%;height:4px;top:0;left:0}.el-color-picker-panel{--el-color-picker-alpha-bg-a:#ccc;--el-color-picker-alpha-bg-b:transparent}.dark .el-color-picker-panel{--el-color-picker-alpha-bg-a:#333}.el-color-picker{outline:none;width:32px;height:32px;line-height:normal;display:inline-block;position:relative}.el-color-picker:hover:not(:-webkit-any(.is-disabled,.is-focused)) .el-color-picker__trigger{border-color:var(--el-border-color-hover)}.el-color-picker:hover:not(:is(.is-disabled,.is-focused)) .el-color-picker__trigger{border-color:var(--el-border-color-hover)}.el-color-picker:focus-visible:not(.is-disabled) .el-color-picker__trigger{outline:2px solid var(--el-color-primary);outline-offset:1px}.el-color-picker.is-focused .el-color-picker__trigger{border-color:var(--el-color-primary)}.el-color-picker.is-disabled .el-color-picker__trigger{cursor:not-allowed;background-color:var(--el-fill-color-light)}.el-color-picker.is-disabled .el-color-picker__color{opacity:.3}.el-color-picker--large{width:40px;height:40px}.el-color-picker--small{width:24px;height:24px}.el-color-picker--small .el-color-picker__icon,.el-color-picker--small .el-color-picker__empty{transform:scale(.8)}.el-color-picker__trigger{box-sizing:border-box;border:1px solid var(--el-border-color);cursor:pointer;border-radius:4px;justify-content:center;align-items:center;width:100%;height:100%;padding:4px;font-size:0;display:inline-flex;position:relative}.el-color-picker__color{box-sizing:border-box;border:1px solid var(--el-text-color-secondary);border-radius:var(--el-border-radius-small);text-align:center;width:100%;height:100%;display:block;position:relative}.el-color-picker__color.is-alpha{background-image:linear-gradient(45deg,var(--el-color-picker-alpha-bg-a) 25%,var(--el-color-picker-alpha-bg-b) 25%),linear-gradient(135deg,var(--el-color-picker-alpha-bg-a) 25%,var(--el-color-picker-alpha-bg-b) 25%),linear-gradient(45deg,var(--el-color-picker-alpha-bg-b) 75%,var(--el-color-picker-alpha-bg-a) 75%),linear-gradient(135deg,var(--el-color-picker-alpha-bg-b) 75%,var(--el-color-picker-alpha-bg-a) 75%);background-position:0 0,6px 0,6px -6px,0 6px;background-size:12px 12px}.el-color-picker__color-inner{justify-content:center;align-items:center;width:100%;height:100%;display:inline-flex}.el-color-picker .el-color-picker__empty{color:var(--el-text-color-secondary);font-size:12px}.el-color-picker .el-color-picker__icon{color:#fff;justify-content:center;align-items:center;font-size:12px;display:inline-flex}.el-color-picker__panel{border-radius:var(--el-border-radius-base);box-shadow:var(--el-box-shadow-light);background-color:#fff}.el-color-picker__panel.el-popper{border:1px solid var(--el-border-color-lighter)}.el-color-picker,.el-color-picker__panel{--el-color-picker-alpha-bg-a:#ccc;--el-color-picker-alpha-bg-b:transparent}.dark .el-color-picker,.dark .el-color-picker__panel{--el-color-picker-alpha-bg-a:#333}.el-container{box-sizing:border-box;flex-direction:row;flex:auto;min-width:0;display:flex}.el-container.is-vertical{flex-direction:column}.el-date-table{-webkit-user-select:none;user-select:none;font-size:12px}.el-date-table.is-week-mode .el-date-table__row:hover .el-date-table-cell{background-color:var(--el-datepicker-inrange-bg-color)}.el-date-table.is-week-mode .el-date-table__row:hover td.available:hover{color:var(--el-datepicker-text-color)}.el-date-table.is-week-mode .el-date-table__row:hover td:first-child .el-date-table-cell{border-top-left-radius:15px;border-bottom-left-radius:15px;margin-left:5px}.el-date-table.is-week-mode .el-date-table__row:hover td:last-child .el-date-table-cell{border-top-right-radius:15px;border-bottom-right-radius:15px;margin-right:5px}.el-date-table.is-week-mode .el-date-table__row.current .el-date-table-cell{background-color:var(--el-datepicker-inrange-bg-color)}.el-date-table td{box-sizing:border-box;text-align:center;cursor:pointer;width:32px;height:30px;padding:4px 0;position:relative}.el-date-table td .el-date-table-cell{box-sizing:border-box;height:30px;padding:3px 0}.el-date-table td .el-date-table-cell .el-date-table-cell__text{border-radius:50%;width:24px;height:24px;margin:0 auto;line-height:24px;display:block;position:absolute;left:50%;transform:translate(-50%)}.el-date-table td.next-month,.el-date-table td.prev-month{color:var(--el-datepicker-off-text-color)}.el-date-table td.today{position:relative}.el-date-table td.today .el-date-table-cell__text{color:var(--el-color-primary);font-weight:700}.el-date-table td.today.start-date .el-date-table-cell__text,.el-date-table td.today.end-date .el-date-table-cell__text{color:#fff}.el-date-table td.available:hover{color:var(--el-datepicker-hover-text-color)}.el-date-table td.in-range .el-date-table-cell{background-color:var(--el-datepicker-inrange-bg-color)}.el-date-table td.in-range .el-date-table-cell:hover{background-color:var(--el-datepicker-inrange-hover-bg-color)}.el-date-table td.current:not(.disabled) .el-date-table-cell__text{color:#fff;background-color:var(--el-datepicker-active-color)}.el-date-table td.current:not(.disabled):focus-visible .el-date-table-cell__text{outline:2px solid var(--el-datepicker-active-color);outline-offset:1px}.el-date-table td.start-date .el-date-table-cell,.el-date-table td.end-date .el-date-table-cell{color:#fff}.el-date-table td.start-date .el-date-table-cell__text,.el-date-table td.end-date .el-date-table-cell__text{background-color:var(--el-datepicker-active-color)}.el-date-table td.start-date .el-date-table-cell{border-top-left-radius:15px;border-bottom-left-radius:15px;margin-left:5px}.el-date-table td.end-date .el-date-table-cell{border-top-right-radius:15px;border-bottom-right-radius:15px;margin-right:5px}.el-date-table td.disabled .el-date-table-cell{background-color:var(--el-fill-color-light);opacity:1;cursor:not-allowed;color:var(--el-text-color-placeholder)}.el-date-table td.selected .el-date-table-cell{border-radius:15px;margin-left:5px;margin-right:5px}.el-date-table td.selected .el-date-table-cell__text{background-color:var(--el-datepicker-active-color);color:#fff;border-radius:15px}.el-date-table td.week{color:var(--el-datepicker-off-text-color);cursor:default;font-size:80%}.el-date-table td:focus{outline:none}.el-date-table th{color:var(--el-datepicker-header-text-color);border-bottom:solid 1px var(--el-border-color-lighter);padding:5px;font-weight:400}.el-date-table th.el-date-table__week-header{width:24px;padding:0}.el-month-table{border-collapse:collapse;margin:-1px;font-size:12px}.el-month-table td{text-align:center;cursor:pointer;width:68px;padding:8px 0;position:relative}.el-month-table td .el-date-table-cell{box-sizing:border-box;height:48px;padding:6px 0}.el-month-table td.today .el-date-table-cell__text{color:var(--el-color-primary);font-weight:700}.el-month-table td.today.start-date .el-date-table-cell__text,.el-month-table td.today.end-date .el-date-table-cell__text{color:#fff}.el-month-table td.disabled .el-date-table-cell__text{background-color:var(--el-fill-color-light);cursor:not-allowed;color:var(--el-text-color-placeholder)}.el-month-table td.disabled .el-date-table-cell__text:hover{color:var(--el-text-color-placeholder)}.el-month-table td .el-date-table-cell__text{width:54px;height:36px;color:var(--el-datepicker-text-color);border-radius:18px;margin:0 auto;line-height:36px;display:block;position:absolute;left:50%;transform:translate(-50%)}.el-month-table td .el-date-table-cell__text:hover{color:var(--el-datepicker-hover-text-color)}.el-month-table td.in-range .el-date-table-cell{background-color:var(--el-datepicker-inrange-bg-color)}.el-month-table td.in-range .el-date-table-cell:hover{background-color:var(--el-datepicker-inrange-hover-bg-color)}.el-month-table td.start-date .el-date-table-cell,.el-month-table td.end-date .el-date-table-cell{color:#fff}.el-month-table td.start-date .el-date-table-cell__text,.el-month-table td.end-date .el-date-table-cell__text{color:#fff;background-color:var(--el-datepicker-active-color)}.el-month-table td.start-date .el-date-table-cell{border-top-left-radius:24px;border-bottom-left-radius:24px;margin-left:3px}.el-month-table td.end-date .el-date-table-cell{border-top-right-radius:24px;border-bottom-right-radius:24px;margin-right:3px}.el-month-table td.current:not(.disabled) .el-date-table-cell{border-radius:24px;margin-left:3px;margin-right:3px}.el-month-table td.current:not(.disabled) .el-date-table-cell__text{color:#fff;background-color:var(--el-datepicker-active-color)}.el-month-table td:focus-visible{outline:none}.el-month-table td:focus-visible .el-date-table-cell__text{outline:2px solid var(--el-datepicker-active-color);outline-offset:1px}.el-year-table{border-collapse:collapse;margin:-1px;font-size:12px}.el-year-table .el-icon{color:var(--el-datepicker-icon-color)}.el-year-table td{text-align:center;cursor:pointer;width:68px;padding:8px 0;position:relative}.el-year-table td .el-date-table-cell{box-sizing:border-box;height:48px;padding:6px 0}.el-year-table td.today .el-date-table-cell__text{color:var(--el-color-primary);font-weight:700}.el-year-table td.today.start-date .el-date-table-cell__text,.el-year-table td.today.end-date .el-date-table-cell__text{color:#fff}.el-year-table td.disabled .el-date-table-cell__text{background-color:var(--el-fill-color-light);cursor:not-allowed;color:var(--el-text-color-placeholder)}.el-year-table td.disabled .el-date-table-cell__text:hover{color:var(--el-text-color-placeholder)}.el-year-table td .el-date-table-cell__text{width:60px;height:36px;color:var(--el-datepicker-text-color);border-radius:18px;margin:0 auto;line-height:36px;display:block;position:absolute;left:50%;transform:translate(-50%)}.el-year-table td .el-date-table-cell__text:hover{color:var(--el-datepicker-hover-text-color)}.el-year-table td.in-range .el-date-table-cell{background-color:var(--el-datepicker-inrange-bg-color)}.el-year-table td.in-range .el-date-table-cell:hover{background-color:var(--el-datepicker-inrange-hover-bg-color)}.el-year-table td.start-date .el-date-table-cell,.el-year-table td.end-date .el-date-table-cell{color:#fff}.el-year-table td.start-date .el-date-table-cell__text,.el-year-table td.end-date .el-date-table-cell__text{color:#fff;background-color:var(--el-datepicker-active-color)}.el-year-table td.start-date .el-date-table-cell{border-top-left-radius:24px;border-bottom-left-radius:24px}.el-year-table td.end-date .el-date-table-cell{border-top-right-radius:24px;border-bottom-right-radius:24px}.el-year-table td.current:not(.disabled) .el-date-table-cell__text{color:#fff;background-color:var(--el-datepicker-active-color)}.el-year-table td:focus-visible{outline:none}.el-year-table td:focus-visible .el-date-table-cell__text{outline:2px solid var(--el-datepicker-active-color);outline-offset:1px}.el-time-spinner.has-seconds .el-time-spinner__wrapper{width:33.3%}.el-time-spinner__wrapper{vertical-align:top;width:50%;max-height:192px;display:inline-block;position:relative;overflow:auto}.el-time-spinner__wrapper.el-scrollbar__wrap:not(.el-scrollbar__wrap--hidden-default){padding-bottom:15px}.el-time-spinner__wrapper.is-arrow{box-sizing:border-box;text-align:center;overflow:hidden}.el-time-spinner__wrapper.is-arrow .el-time-spinner__list{transform:translateY(-32px)}.el-time-spinner__wrapper.is-arrow .el-time-spinner__item:hover:not(.is-disabled):not(.is-active){background:var(--el-fill-color-light);cursor:default}.el-time-spinner__arrow{color:var(--el-text-color-secondary);width:100%;z-index:var(--el-index-normal);text-align:center;cursor:pointer;height:30px;font-size:12px;line-height:30px;position:absolute;left:0}.el-time-spinner__arrow:hover{color:var(--el-color-primary)}.el-time-spinner__arrow.arrow-up{top:10px}.el-time-spinner__arrow.arrow-down{bottom:10px}.el-time-spinner__input.el-input{width:70%}.el-time-spinner__input.el-input .el-input__inner{text-align:center;padding:0}.el-time-spinner__list{text-align:center;margin:0;padding:0;list-style:none}.el-time-spinner__list:after,.el-time-spinner__list:before{content:"";width:100%;height:80px;display:block}.el-time-spinner__item{height:32px;color:var(--el-text-color-regular);font-size:12px;line-height:32px}.el-time-spinner__item:hover:not(.is-disabled):not(.is-active){background:var(--el-fill-color-light);cursor:pointer}.el-time-spinner__item.is-active:not(.is-disabled){color:var(--el-text-color-primary);font-weight:700}.el-time-spinner__item.is-disabled{color:var(--el-text-color-placeholder);cursor:not-allowed}.el-picker__popper{--el-datepicker-border-color:var(--el-disabled-border-color)}.el-picker__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-datepicker-border-color);box-shadow:var(--el-box-shadow-light)}.el-picker__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-datepicker-border-color)}.el-picker__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-top-color:#0000;border-left-color:#0000}.el-picker__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:#0000;border-right-color:#0000}.el-picker__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:#0000;border-left-color:#0000}.el-picker__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-top-color:#0000;border-right-color:#0000}.el-date-editor{--el-date-editor-width:220px;--el-date-editor-monthrange-width:300px;--el-date-editor-daterange-width:350px;--el-date-editor-datetimerange-width:400px;--el-input-text-color:var(--el-text-color-regular);--el-input-border:var(--el-border);--el-input-hover-border:var(--el-border-color-hover);--el-input-focus-border:var(--el-color-primary);--el-input-transparent-border:0 0 0 1px transparent inset;--el-input-border-color:var(--el-border-color);--el-input-border-radius:var(--el-border-radius-base);--el-input-bg-color:var(--el-fill-color-blank);--el-input-icon-color:var(--el-text-color-placeholder);--el-input-placeholder-color:var(--el-text-color-placeholder);--el-input-hover-border-color:var(--el-border-color-hover);--el-input-clear-hover-color:var(--el-text-color-secondary);--el-input-focus-border-color:var(--el-color-primary);--el-input-width:100%;text-align:left;vertical-align:middle;position:relative}.el-date-editor.el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-border-color,var(--el-border-color)) inset}.el-date-editor.el-input__wrapper:hover{box-shadow:0 0 0 1px var(--el-input-hover-border-color) inset}.el-date-editor.is-focus .el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset}.el-date-editor.el-input,.el-date-editor.el-input__wrapper{width:var(--el-date-editor-width);height:var(--el-input-height,var(--el-component-size))}.el-date-editor--monthrange{--el-date-editor-width:var(--el-date-editor-monthrange-width)}.el-date-editor--daterange,.el-date-editor--timerange{--el-date-editor-width:var(--el-date-editor-daterange-width)}.el-date-editor--datetimerange{--el-date-editor-width:var(--el-date-editor-datetimerange-width)}.el-date-editor--dates .el-input__wrapper{text-overflow:ellipsis;white-space:nowrap}.el-date-editor .close-icon,.el-date-editor .clear-icon{cursor:pointer}.el-date-editor .clear-icon:hover{color:var(--el-input-clear-hover-color)}.el-date-editor .el-range__icon{height:inherit;color:var(--el-text-color-placeholder);float:left;font-size:14px}.el-date-editor .el-range__icon svg{vertical-align:middle}.el-date-editor .el-range-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:center;width:39%;height:30px;line-height:30px;font-size:var(--el-font-size-base);color:var(--el-text-color-regular);background-color:#0000;border:none;outline:none;margin:0;padding:0;display:inline-block}.el-date-editor .el-range-input::placeholder{color:var(--el-text-color-placeholder)}.el-date-editor .el-range-separator{overflow-wrap:break-word;height:100%;color:var(--el-text-color-primary);flex:1;justify-content:center;align-items:center;margin:0;padding:0 5px;font-size:14px;display:inline-flex}.el-date-editor .el-range__close-icon{color:var(--el-text-color-placeholder);height:inherit;width:unset;cursor:pointer;font-size:14px}.el-date-editor .el-range__close-icon:hover{color:var(--el-input-clear-hover-color)}.el-date-editor .el-range__close-icon svg{vertical-align:middle}.el-date-editor .el-range__close-icon--hidden{opacity:0;visibility:hidden}.el-range-editor.el-input__wrapper{vertical-align:middle;align-items:center;padding:0 10px;display:inline-flex}.el-range-editor.is-active,.el-range-editor.is-active:hover{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset}.el-range-editor--large{line-height:var(--el-component-size-large)}.el-range-editor--large.el-input__wrapper{height:var(--el-component-size-large)}.el-range-editor--large .el-range-separator{font-size:14px;line-height:40px}.el-range-editor--large .el-range-input{height:38px;font-size:14px;line-height:38px}.el-range-editor--small{line-height:var(--el-component-size-small)}.el-range-editor--small.el-input__wrapper{height:var(--el-component-size-small)}.el-range-editor--small .el-range-separator{font-size:12px;line-height:24px}.el-range-editor--small .el-range-input{height:22px;font-size:12px;line-height:22px}.el-range-editor.is-disabled{background-color:var(--el-disabled-bg-color);border-color:var(--el-disabled-border-color);color:var(--el-disabled-text-color);cursor:not-allowed}.el-range-editor.is-disabled:hover,.el-range-editor.is-disabled:focus{border-color:var(--el-disabled-border-color)}.el-range-editor.is-disabled input{background-color:var(--el-disabled-bg-color);color:var(--el-disabled-text-color);cursor:not-allowed}.el-range-editor.is-disabled input::placeholder{color:var(--el-text-color-placeholder)}.el-range-editor.is-disabled .el-range-separator{color:var(--el-disabled-text-color)}.el-picker-panel{color:var(--el-text-color-regular);background:var(--el-datepicker-bg-color);border-radius:var(--el-popper-border-radius,var(--el-border-radius-base));line-height:30px}.el-picker-panel .el-time-panel{border:solid 1px var(--el-datepicker-border-color);background-color:var(--el-datepicker-bg-color);box-shadow:var(--el-box-shadow-light);margin:5px 0}.el-picker-panel__body:after,.el-picker-panel__body-wrapper:after{content:"";clear:both;display:table}.el-picker-panel__content{margin:15px;position:relative}.el-picker-panel__footer{border-top:1px solid var(--el-datepicker-inner-border-color);text-align:right;background-color:var(--el-datepicker-bg-color);padding:4px 12px;font-size:0;position:relative}.el-picker-panel__shortcut{width:100%;color:var(--el-datepicker-text-color);text-align:left;cursor:pointer;background-color:#0000;border:0;outline:none;padding-left:12px;font-size:14px;line-height:28px;display:block}.el-picker-panel__shortcut:hover{color:var(--el-datepicker-hover-text-color)}.el-picker-panel__shortcut.active{color:var(--el-datepicker-active-color);background-color:#e6f1fe}.el-picker-panel__btn{border:1px solid var(--el-fill-color-darker);color:var(--el-text-color-primary);cursor:pointer;background-color:#0000;border-radius:2px;outline:none;padding:0 20px;font-size:12px;line-height:24px}.el-picker-panel__btn[disabled]{color:var(--el-text-color-disabled);cursor:not-allowed}.el-picker-panel__icon-btn{color:var(--el-datepicker-icon-color);cursor:pointer;background:0 0;border:0;outline:none;margin-top:8px;padding:1px 6px;font-size:12px;line-height:1}.el-picker-panel__icon-btn:hover{color:var(--el-datepicker-hover-text-color)}.el-picker-panel__icon-btn:focus-visible{color:var(--el-datepicker-hover-text-color)}.el-picker-panel__icon-btn.is-disabled{color:var(--el-text-color-disabled)}.el-picker-panel__icon-btn.is-disabled:hover{cursor:not-allowed}.el-picker-panel__icon-btn.is-disabled .el-icon{cursor:inherit}.el-picker-panel__icon-btn .el-icon{cursor:pointer;font-size:inherit}.el-picker-panel__link-btn{vertical-align:middle}.el-picker-panel.is-disabled .el-picker-panel__prev-btn{color:var(--el-text-color-disabled)}.el-picker-panel.is-disabled .el-picker-panel__prev-btn:hover{cursor:not-allowed}.el-picker-panel.is-disabled .el-picker-panel__prev-btn .el-icon{cursor:inherit}.el-picker-panel.is-disabled .el-picker-panel__next-btn{color:var(--el-text-color-disabled)}.el-picker-panel.is-disabled .el-picker-panel__next-btn:hover{cursor:not-allowed}.el-picker-panel.is-disabled .el-picker-panel__next-btn .el-icon{cursor:inherit}.el-picker-panel.is-disabled .el-picker-panel__icon-btn{color:var(--el-text-color-disabled)}.el-picker-panel.is-disabled .el-picker-panel__icon-btn:hover{cursor:not-allowed}.el-picker-panel.is-disabled .el-picker-panel__icon-btn .el-icon{cursor:inherit}.el-picker-panel.is-disabled .el-picker-panel__shortcut{color:var(--el-text-color-disabled)}.el-picker-panel.is-disabled .el-picker-panel__shortcut:hover{cursor:not-allowed}.el-picker-panel.is-disabled .el-picker-panel__shortcut .el-icon{cursor:inherit}.el-picker-panel [slot=sidebar],.el-picker-panel__sidebar{border-right:1px solid var(--el-datepicker-inner-border-color);box-sizing:border-box;width:110px;padding-top:6px;position:absolute;top:0;bottom:0;overflow:auto}.el-picker-panel [slot=sidebar]+.el-picker-panel__body,.el-picker-panel__sidebar+.el-picker-panel__body{margin-left:110px}.el-date-picker{--el-datepicker-text-color:var(--el-text-color-regular);--el-datepicker-off-text-color:var(--el-text-color-placeholder);--el-datepicker-header-text-color:var(--el-text-color-regular);--el-datepicker-icon-color:var(--el-text-color-primary);--el-datepicker-border-color:var(--el-disabled-border-color);--el-datepicker-inner-border-color:var(--el-border-color-light);--el-datepicker-inrange-bg-color:var(--el-border-color-extra-light);--el-datepicker-inrange-hover-bg-color:var(--el-border-color-extra-light);--el-datepicker-active-color:var(--el-color-primary);--el-datepicker-hover-text-color:var(--el-color-primary);--el-datepicker-bg-color:var(--el-bg-color-overlay);--el-fill-color-blank:var(--el-datepicker-bg-color);width:322px}.el-date-picker.has-sidebar.has-time{width:434px}.el-date-picker.has-sidebar{width:438px}.el-date-picker.has-time .el-picker-panel__body-wrapper{position:relative}.el-date-picker .el-picker-panel__content{width:292px}.el-date-picker table{table-layout:fixed;width:100%}.el-date-picker__editor-wrap{padding:0 5px;display:table-cell;position:relative}.el-date-picker__time-header{border-bottom:1px solid var(--el-datepicker-inner-border-color);box-sizing:border-box;width:100%;padding:8px 5px 5px;font-size:12px;display:table;position:relative}.el-date-picker__header{text-align:center;padding:12px 12px 0}.el-date-picker__header--bordered{border-bottom:solid 1px var(--el-border-color-lighter);margin-bottom:0;padding-bottom:12px}.el-date-picker__header--bordered+.el-picker-panel__content{margin-top:0}.el-date-picker__header-label{text-align:center;cursor:pointer;color:var(--el-text-color-regular);padding:0 5px;font-size:16px;font-weight:500;line-height:22px}.el-date-picker__header-label:hover{color:var(--el-datepicker-hover-text-color)}.el-date-picker__header-label:focus-visible{color:var(--el-datepicker-hover-text-color);outline:none}.el-date-picker__header-label.active{color:var(--el-datepicker-active-color)}.el-date-picker__prev-btn{float:left}.el-date-picker__next-btn{float:right}.el-date-picker__time-wrap{text-align:center;padding:10px}.el-date-picker__time-label{float:left;cursor:pointer;margin-left:10px;line-height:30px}.el-date-picker .el-time-panel{position:absolute}.el-date-picker.is-disabled .el-date-picker__header-label{color:var(--el-text-color-disabled)}.el-date-picker.is-disabled .el-date-picker__header-label:hover{cursor:not-allowed}.el-date-picker.is-disabled .el-date-picker__header-label .el-icon{cursor:inherit}.el-date-range-picker{--el-datepicker-text-color:var(--el-text-color-regular);--el-datepicker-off-text-color:var(--el-text-color-placeholder);--el-datepicker-header-text-color:var(--el-text-color-regular);--el-datepicker-icon-color:var(--el-text-color-primary);--el-datepicker-border-color:var(--el-disabled-border-color);--el-datepicker-inner-border-color:var(--el-border-color-light);--el-datepicker-inrange-bg-color:var(--el-border-color-extra-light);--el-datepicker-inrange-hover-bg-color:var(--el-border-color-extra-light);--el-datepicker-active-color:var(--el-color-primary);--el-datepicker-hover-text-color:var(--el-color-primary);--el-datepicker-bg-color:var(--el-bg-color-overlay);width:646px}.el-date-range-picker.has-sidebar{width:756px}.el-date-range-picker.has-time .el-picker-panel__body-wrapper{position:relative}.el-date-range-picker table{table-layout:fixed;width:100%}.el-date-range-picker .el-picker-panel__body{min-width:513px}.el-date-range-picker .el-picker-panel__content{margin:0}.el-date-range-picker__header{text-align:center;height:28px;position:relative}.el-date-range-picker__header [class*=arrow-left]{float:left}.el-date-range-picker__header [class*=arrow-right]{float:right}.el-date-range-picker__header div{margin-right:50px;font-size:16px;font-weight:500}.el-date-range-picker__header-label{text-align:center;cursor:pointer;color:var(--el-text-color-regular);padding:0 5px;font-size:16px;font-weight:500;line-height:22px}.el-date-range-picker__header-label:hover{color:var(--el-datepicker-hover-text-color)}.el-date-range-picker__header-label:focus-visible{color:var(--el-datepicker-hover-text-color);outline:none}.el-date-range-picker__header-label.active{color:var(--el-datepicker-active-color)}.el-date-range-picker__content{box-sizing:border-box;width:50%;margin:0;padding:16px;display:table-cell}.el-date-range-picker__content.is-left{border-right:1px solid var(--el-datepicker-inner-border-color)}.el-date-range-picker__content .el-date-range-picker__header div{margin-left:50px;margin-right:50px}.el-date-range-picker__editors-wrap{box-sizing:border-box;display:table-cell}.el-date-range-picker__editors-wrap.is-right{text-align:right}.el-date-range-picker__time-header{border-bottom:1px solid var(--el-datepicker-inner-border-color);box-sizing:border-box;width:100%;padding:8px 5px 5px;font-size:12px;display:table;position:relative}.el-date-range-picker__time-header>.el-icon-arrow-right{vertical-align:middle;color:var(--el-datepicker-icon-color);font-size:20px;display:table-cell}.el-date-range-picker__time-picker-wrap{padding:0 5px;display:table-cell;position:relative}.el-date-range-picker__time-picker-wrap .el-picker-panel{z-index:1;background:#fff;position:absolute;top:13px;right:0}.el-date-range-picker__time-picker-wrap .el-time-panel{position:absolute}.el-date-range-picker.is-disabled .el-date-range-picker__header-label{color:var(--el-text-color-disabled)}.el-date-range-picker.is-disabled .el-date-range-picker__header-label:hover{cursor:not-allowed}.el-date-range-picker.is-disabled .el-date-range-picker__header-label .el-icon{cursor:inherit}.el-time-range-picker{width:354px;overflow:visible}.el-time-range-picker__content{text-align:center;z-index:1;padding:10px;position:relative}.el-time-range-picker__cell{box-sizing:border-box;width:50%;margin:0;padding:4px 7px 7px;display:inline-block}.el-time-range-picker__header{text-align:center;margin-bottom:5px;font-size:14px}.el-time-range-picker__body{border:1px solid var(--el-datepicker-border-color);border-radius:2px}.el-time-panel{width:180px;z-index:var(--el-index-top);-webkit-user-select:none;user-select:none;box-sizing:content-box;border-radius:2px;position:relative;left:0}.el-time-panel__content{font-size:0;position:relative;overflow:hidden}.el-time-panel__content:after,.el-time-panel__content:before{content:"";z-index:-1;box-sizing:border-box;text-align:left;height:32px;margin-top:-16px;padding-top:6px;position:absolute;top:50%;left:0;right:0}.el-time-panel__content:after{margin-left:12%;margin-right:12%;left:50%}.el-time-panel__content:before{border-top:1px solid var(--el-border-color-light);border-bottom:1px solid var(--el-border-color-light);margin-left:12%;margin-right:12%;padding-left:50%}.el-time-panel__content.has-seconds:after{left:66.6667%}.el-time-panel__content.has-seconds:before{padding-left:33.3333%}.el-time-panel__footer{border-top:1px solid var(--el-timepicker-inner-border-color,var(--el-border-color-light));text-align:right;box-sizing:border-box;height:36px;padding:4px;line-height:25px}.el-time-panel__btn{cursor:pointer;color:var(--el-text-color-primary);background-color:#0000;border:none;outline:none;margin:0 5px;padding:0 5px;font-size:12px;line-height:28px}.el-time-panel__btn.confirm{color:var(--el-timepicker-active-color,var(--el-color-primary));font-weight:800}.el-picker-panel.is-border{border:solid 1px var(--el-border-color-lighter)}.el-picker-panel.is-border .el-picker-panel__body-wrapper{position:relative}.el-picker-panel.is-border.el-picker-panel [slot=sidebar],.el-picker-panel.is-border.el-picker-panel__sidebar{border-right:1px solid var(--el-datepicker-inner-border-color);box-sizing:border-box;width:110px;height:100%;padding-top:6px;position:absolute;top:0;overflow:auto}.el-descriptions{--el-descriptions-table-border:1px solid var(--el-border-color-lighter);--el-descriptions-item-bordered-label-background:var(--el-fill-color-light);box-sizing:border-box;font-size:var(--el-font-size-base);color:var(--el-text-color-primary)}.el-descriptions__header{justify-content:space-between;align-items:center;margin-bottom:16px;display:flex}.el-descriptions__title{color:var(--el-text-color-primary);font-size:16px;font-weight:700}.el-descriptions__body{background-color:var(--el-fill-color-blank)}.el-descriptions__body .el-descriptions__table{border-collapse:collapse;width:100%}.el-descriptions__body .el-descriptions__table .el-descriptions__cell{box-sizing:border-box;text-align:left;font-size:14px;line-height:23px}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-left{text-align:left}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-center{text-align:center}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-right{text-align:right}.el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{border:var(--el-descriptions-table-border);padding:8px 11px}.el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:12px}.el-descriptions--large{font-size:14px}.el-descriptions--large .el-descriptions__header{margin-bottom:20px}.el-descriptions--large .el-descriptions__header .el-descriptions__title{font-size:16px}.el-descriptions--large .el-descriptions__body .el-descriptions__table .el-descriptions__cell{font-size:14px}.el-descriptions--large .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{padding:12px 15px}.el-descriptions--large .el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:16px}.el-descriptions--small{font-size:12px}.el-descriptions--small .el-descriptions__header{margin-bottom:12px}.el-descriptions--small .el-descriptions__header .el-descriptions__title{font-size:14px}.el-descriptions--small .el-descriptions__body .el-descriptions__table .el-descriptions__cell{font-size:12px}.el-descriptions--small .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{padding:4px 7px}.el-descriptions--small .el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:8px}.el-descriptions__label.el-descriptions__cell.is-bordered-label{color:var(--el-text-color-regular);background:var(--el-descriptions-item-bordered-label-background);font-weight:700}.el-descriptions__label:not(.is-bordered-label){color:var(--el-text-color-primary);margin-right:16px}.el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:6px}.el-descriptions__content.el-descriptions__cell.is-bordered-content{color:var(--el-text-color-primary)}.el-descriptions__content:not(.is-bordered-label){color:var(--el-text-color-regular)}.el-descriptions--large .el-descriptions__label:not(.is-bordered-label){margin-right:16px}.el-descriptions--large .el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:8px}.el-descriptions--small .el-descriptions__label:not(.is-bordered-label){margin-right:12px}.el-descriptions--small .el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:4px}:root{--el-popup-modal-bg-color:var(--el-color-black);--el-popup-modal-opacity:.5}.v-modal-enter{animation:v-modal-in var(--el-transition-duration-fast) ease}.v-modal-leave{animation:v-modal-out var(--el-transition-duration-fast) ease forwards}@keyframes v-modal-in{0%{opacity:0}}@keyframes v-modal-out{to{opacity:0}}.v-modal{width:100%;height:100%;opacity:var(--el-popup-modal-opacity);background:var(--el-popup-modal-bg-color);position:fixed;top:0;left:0}.el-popup-parent--hidden{overflow:hidden}.el-dialog{--el-dialog-width:50%;--el-dialog-margin-top:15vh;--el-dialog-bg-color:var(--el-bg-color);--el-dialog-box-shadow:var(--el-box-shadow);--el-dialog-title-font-size:var(--el-font-size-large);--el-dialog-content-font-size:14px;--el-dialog-font-line-height:var(--el-font-line-height-primary);--el-dialog-padding-primary:16px;--el-dialog-border-radius:var(--el-border-radius-base);margin:var(--el-dialog-margin-top,15vh) auto 50px;background:var(--el-dialog-bg-color);border-radius:var(--el-dialog-border-radius);box-shadow:var(--el-dialog-box-shadow);box-sizing:border-box;padding:var(--el-dialog-padding-primary);width:var(--el-dialog-width,50%);overflow-wrap:break-word;position:relative}.el-dialog:focus{outline:none!important}.el-dialog.is-align-center{margin:auto}.el-dialog.is-fullscreen{--el-dialog-width:100%;--el-dialog-margin-top:0;border-radius:0;height:100%;margin-bottom:0;overflow:auto}.el-dialog__wrapper{margin:0;position:fixed;top:0;bottom:0;left:0;right:0;overflow:auto}.el-dialog.is-draggable .el-dialog__header{cursor:move;-webkit-user-select:none;user-select:none}.el-dialog__header{padding-bottom:var(--el-dialog-padding-primary)}.el-dialog__header.show-close{padding-right:calc(var(--el-dialog-padding-primary) + var(--el-message-close-size,16px))}.el-dialog__headerbtn{cursor:pointer;width:48px;height:48px;font-size:var(--el-message-close-size,16px);background:0 0;border:none;outline:none;padding:0;position:absolute;top:0;right:0}.el-dialog__headerbtn .el-dialog__close{color:var(--el-color-info);font-size:inherit}.el-dialog__headerbtn:focus .el-dialog__close,.el-dialog__headerbtn:hover .el-dialog__close{color:var(--el-color-primary)}.el-dialog__title{line-height:var(--el-dialog-font-line-height);font-size:var(--el-dialog-title-font-size);color:var(--el-text-color-primary)}.el-dialog__body{color:var(--el-text-color-regular);font-size:var(--el-dialog-content-font-size)}.el-dialog__footer{padding-top:var(--el-dialog-padding-primary);text-align:right;box-sizing:border-box}.el-dialog--center{text-align:center}.el-dialog--center .el-dialog__body{text-align:initial}.el-dialog--center .el-dialog__footer{text-align:inherit}.el-modal-dialog.is-penetrable{pointer-events:none}.el-modal-dialog.is-penetrable .el-dialog{pointer-events:auto}.el-overlay-dialog{position:fixed;top:0;bottom:0;left:0;right:0;overflow:auto}.el-overlay-dialog.is-closing .el-dialog{pointer-events:none}.dialog-fade-enter-active{animation:modal-fade-in var(--el-transition-duration)}.dialog-fade-enter-active .el-overlay-dialog{animation:dialog-fade-in var(--el-transition-duration)}.dialog-fade-leave-active{animation:modal-fade-out var(--el-transition-duration)}.dialog-fade-leave-active .el-overlay-dialog{animation:dialog-fade-out var(--el-transition-duration)}@keyframes dialog-fade-in{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translate(0)}}@keyframes dialog-fade-out{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translateY(-20px)}}@keyframes modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes modal-fade-out{0%{opacity:1}to{opacity:0}}.el-divider{position:relative}.el-divider--horizontal{border-top:1px var(--el-border-color) var(--el-border-style);width:100%;height:1px;margin:24px 0;display:block}.el-divider--vertical{vertical-align:middle;border-left:1px var(--el-border-color) var(--el-border-style);width:1px;height:1em;margin:0 8px;display:inline-block;position:relative}.el-divider__text{background-color:var(--el-bg-color);color:var(--el-text-color-primary);padding:0 20px;font-size:14px;font-weight:500;position:absolute}.el-divider__text.is-left{left:20px;transform:translateY(-50%)}.el-divider__text.is-center{left:50%;transform:translate(-50%)translateY(-50%)}.el-divider__text.is-right{right:20px;transform:translateY(-50%)}.el-overlay.is-drawer{overflow:hidden}.el-drawer{--el-drawer-bg-color:var(--el-dialog-bg-color,var(--el-bg-color));--el-drawer-padding-primary:var(--el-dialog-padding-primary,20px);--el-drawer-dragger-size:8px;box-sizing:border-box;background-color:var(--el-drawer-bg-color);box-shadow:var(--el-box-shadow-dark);transition:all var(--el-transition-duration);flex-direction:column;display:flex;position:absolute}.el-drawer .rtl,.el-drawer .ltr,.el-drawer .ttb,.el-drawer .btt{transform:translate(0)}.el-drawer__sr-focus:focus{outline:none!important}.el-drawer__header{color:var(--el-text-color-primary);padding:var(--el-drawer-padding-primary);align-items:center;margin-bottom:32px;padding-bottom:0;display:flex;overflow:hidden}.el-drawer__header>:first-child{flex:1}.el-drawer__title{line-height:inherit;flex:1;margin:0;font-size:16px}.el-drawer__footer{padding:var(--el-drawer-padding-primary);text-align:right;padding-top:10px;overflow:hidden}.el-drawer__close-btn{cursor:pointer;font-size:var(--el-font-size-extra-large);color:inherit;background-color:#0000;border:none;outline:none;display:inline-flex}.el-drawer__close-btn:focus i,.el-drawer__close-btn:hover i{color:var(--el-color-primary)}.el-drawer__body{padding:var(--el-drawer-padding-primary);flex:1;overflow:auto}.el-drawer__body>*{box-sizing:border-box}.el-drawer.is-dragging{transition:none}.el-drawer__dragger{-webkit-user-select:none;user-select:none;background-color:#0000;transition:all .2s;position:absolute}.el-drawer__dragger:before{content:"";background-color:#0000;transition:all .2s;position:absolute}.el-drawer__dragger:hover:before{background-color:var(--el-color-primary)}.el-drawer.ltr,.el-drawer.rtl{height:100%;top:0;bottom:0}.el-drawer.ltr>.el-drawer__dragger,.el-drawer.rtl>.el-drawer__dragger{height:100%;width:var(--el-drawer-dragger-size);cursor:ew-resize;top:0;bottom:0}.el-drawer.ltr>.el-drawer__dragger:before,.el-drawer.rtl>.el-drawer__dragger:before{width:3px;top:0;bottom:0}.el-drawer.ttb,.el-drawer.btt{width:100%;left:0;right:0}.el-drawer.ttb>.el-drawer__dragger,.el-drawer.btt>.el-drawer__dragger{width:100%;height:var(--el-drawer-dragger-size);cursor:ns-resize;left:0;right:0}.el-drawer.ttb>.el-drawer__dragger:before,.el-drawer.btt>.el-drawer__dragger:before{height:3px;left:0;right:0}.el-drawer.ltr{left:0}.el-drawer.ltr>.el-drawer__dragger{right:0}.el-drawer.ltr>.el-drawer__dragger:before{right:-2px}.el-drawer.rtl{right:0}.el-drawer.rtl>.el-drawer__dragger{left:0}.el-drawer.rtl>.el-drawer__dragger:before{left:-2px}.el-drawer.ttb{top:0}.el-drawer.ttb>.el-drawer__dragger{bottom:0}.el-drawer.ttb>.el-drawer__dragger:before{bottom:-2px}.el-drawer.btt{bottom:0}.el-drawer.btt>.el-drawer__dragger{top:0}.el-drawer.btt>.el-drawer__dragger:before{top:-2px}.el-modal-drawer.is-penetrable{pointer-events:none}.el-modal-drawer.is-penetrable .el-drawer{pointer-events:auto}.el-drawer-fade-enter-active,.el-drawer-fade-leave-active{transition:all var(--el-transition-duration)}.el-drawer-fade-enter-from,.el-drawer-fade-enter-active,.el-drawer-fade-enter-to,.el-drawer-fade-leave-from,.el-drawer-fade-leave-active,.el-drawer-fade-leave-to{overflow:hidden!important}.el-drawer-fade-enter-from,.el-drawer-fade-leave-to{background-color:#0000!important}.el-drawer-fade-enter-from .rtl,.el-drawer-fade-leave-to .rtl{transform:translate(100%)}.el-drawer-fade-enter-from .ltr,.el-drawer-fade-leave-to .ltr{transform:translate(-100%)}.el-drawer-fade-enter-from .ttb,.el-drawer-fade-leave-to .ttb{transform:translateY(-100%)}.el-drawer-fade-enter-from .btt,.el-drawer-fade-leave-to .btt{transform:translateY(100%)}.el-dropdown{--el-dropdown-menu-box-shadow:var(--el-box-shadow-light);--el-dropdown-menuItem-hover-fill:var(--el-color-primary-light-9);--el-dropdown-menuItem-hover-color:var(--el-color-primary);--el-dropdown-menu-index:10;color:var(--el-text-color-regular);font-size:var(--el-font-size-base);vertical-align:top;line-height:1;display:inline-flex;position:relative}.el-dropdown.is-disabled{color:var(--el-text-color-placeholder);cursor:not-allowed}.el-dropdown__popper{--el-dropdown-menu-box-shadow:var(--el-box-shadow-light);--el-dropdown-menuItem-hover-fill:var(--el-color-primary-light-9);--el-dropdown-menuItem-hover-color:var(--el-color-primary);--el-dropdown-menu-index:10}.el-dropdown__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light);box-shadow:var(--el-dropdown-menu-box-shadow)}.el-dropdown__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-border-color-light)}.el-dropdown__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-top-color:#0000;border-left-color:#0000}.el-dropdown__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:#0000;border-right-color:#0000}.el-dropdown__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:#0000;border-left-color:#0000}.el-dropdown__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-top-color:#0000;border-right-color:#0000}.el-dropdown__popper .el-dropdown-menu{border:none}.el-dropdown__popper .el-dropdown__popper-selfdefine{outline:none}.el-dropdown__popper .el-scrollbar__bar{z-index:calc(var(--el-dropdown-menu-index) + 1)}.el-dropdown__popper .el-dropdown__list{box-sizing:border-box;margin:0;padding:0;list-style:none}.el-dropdown .el-dropdown__caret-button{border-left:none;justify-content:center;align-items:center;width:32px;padding-left:0;padding-right:0;display:inline-flex}.el-dropdown .el-dropdown__caret-button>span{display:inline-flex}.el-dropdown .el-dropdown__caret-button:before{content:"";background:var(--el-overlay-color-lighter);width:1px;display:block;position:absolute;top:-1px;bottom:-1px;left:0}.el-dropdown .el-dropdown__caret-button.el-button:before{background:var(--el-border-color);opacity:.5}.el-dropdown .el-dropdown__caret-button .el-dropdown__icon{font-size:inherit;padding-left:0}.el-dropdown .el-dropdown-selfdefine{outline:none}.el-dropdown--large .el-dropdown__caret-button{width:40px}.el-dropdown--small .el-dropdown__caret-button{width:24px}.el-dropdown-menu{z-index:var(--el-dropdown-menu-index);background-color:var(--el-bg-color-overlay);border-radius:var(--el-border-radius-base);box-shadow:none;border:none;margin:0;padding:5px 0;list-style:none;position:relative;top:0;left:0}.el-dropdown-menu__item{white-space:nowrap;line-height:22px;font-size:var(--el-font-size-base);color:var(--el-text-color-regular);cursor:pointer;outline:none;align-items:center;margin:0;padding:5px 16px;list-style:none;display:flex}.el-dropdown-menu__item:not(.is-disabled):hover,.el-dropdown-menu__item:not(.is-disabled):focus{background-color:var(--el-dropdown-menuItem-hover-fill);color:var(--el-dropdown-menuItem-hover-color)}.el-dropdown-menu__item i{margin-right:5px}.el-dropdown-menu__item--divided{border-top:1px solid var(--el-border-color-lighter);margin:6px 0}.el-dropdown-menu__item.is-disabled{cursor:not-allowed;color:var(--el-text-color-disabled)}.el-dropdown-menu--large{padding:7px 0}.el-dropdown-menu--large .el-dropdown-menu__item{padding:7px 20px;font-size:14px;line-height:22px}.el-dropdown-menu--large .el-dropdown-menu__item--divided{margin:8px 0}.el-dropdown-menu--small{padding:3px 0}.el-dropdown-menu--small .el-dropdown-menu__item{padding:2px 12px;font-size:12px;line-height:20px}.el-dropdown-menu--small .el-dropdown-menu__item--divided{margin:4px 0}.el-empty{--el-empty-padding:40px 0;--el-empty-image-width:160px;--el-empty-description-margin-top:20px;--el-empty-bottom-margin-top:20px;--el-empty-fill-color-0:var(--el-color-white);--el-empty-fill-color-1:#fcfcfd;--el-empty-fill-color-2:#f8f9fb;--el-empty-fill-color-3:#f7f8fc;--el-empty-fill-color-4:#eeeff3;--el-empty-fill-color-5:#edeef2;--el-empty-fill-color-6:#e9ebef;--el-empty-fill-color-7:#e5e7e9;--el-empty-fill-color-8:#e0e3e9;--el-empty-fill-color-9:#d5d7de;text-align:center;box-sizing:border-box;padding:var(--el-empty-padding);flex-direction:column;justify-content:center;align-items:center;display:flex}.el-empty__image{width:var(--el-empty-image-width)}.el-empty__image img{-webkit-user-select:none;user-select:none;vertical-align:top;object-fit:contain;width:100%;height:100%}.el-empty__image svg{color:var(--el-svg-monochrome-grey);fill:currentColor;vertical-align:top;width:100%;height:100%}.el-empty__description{margin-top:var(--el-empty-description-margin-top)}.el-empty__description p{font-size:var(--el-font-size-base);color:var(--el-text-color-secondary);margin:0}.el-empty__bottom{margin-top:var(--el-empty-bottom-margin-top)}.el-footer{--el-footer-padding:0 20px;--el-footer-height:60px;padding:var(--el-footer-padding);box-sizing:border-box;height:var(--el-footer-height);flex-shrink:0}.el-form-item{--font-size:14px;margin-bottom:18px;display:flex}.el-form-item .el-form-item{margin-bottom:0}.el-form-item .el-input__validateIcon{display:none}.el-form-item--large{--font-size:14px;--el-form-label-font-size:var(--font-size);margin-bottom:22px}.el-form-item--large .el-form-item__label{height:40px;line-height:40px}.el-form-item--large .el-form-item__content{line-height:40px}.el-form-item--large .el-form-item__error{padding-top:4px}.el-form-item--default{--font-size:14px;--el-form-label-font-size:var(--font-size);margin-bottom:18px}.el-form-item--default .el-form-item__label{height:32px;line-height:32px}.el-form-item--default .el-form-item__content{line-height:32px}.el-form-item--default .el-form-item__error{padding-top:2px}.el-form-item--small{--font-size:12px;--el-form-label-font-size:var(--font-size);margin-bottom:18px}.el-form-item--small .el-form-item__label{height:24px;line-height:24px}.el-form-item--small .el-form-item__content{line-height:24px}.el-form-item--small .el-form-item__error{padding-top:2px}.el-form-item--label-left .el-form-item__label{text-align:left;justify-content:flex-start}.el-form-item--label-right .el-form-item__label{text-align:right;justify-content:flex-end}.el-form-item--label-top{display:block}.el-form-item--label-top .el-form-item__label{text-align:left;width:-moz-fit-content;width:fit-content;height:auto;margin-bottom:8px;padding-right:0;line-height:22px;display:block}.el-form-item__label-wrap{display:flex}.el-form-item__label{font-size:var(--el-form-label-font-size);color:var(--el-text-color-regular);box-sizing:border-box;flex:none;align-items:flex-start;height:32px;padding:0 12px 0 0;line-height:32px;display:inline-flex}.el-form-item__content{line-height:32px;font-size:var(--font-size);flex-wrap:wrap;flex:1;align-items:center;min-width:0;display:flex;position:relative}.el-form-item__content .el-input-group{vertical-align:top}.el-form-item__error{color:var(--el-color-danger);padding-top:2px;font-size:12px;line-height:1;position:absolute;top:100%;left:0}.el-form-item__error--inline{margin-left:10px;display:inline-block;position:relative;top:auto;left:auto}.el-form-item.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label:before,.el-form-item.is-required:not(.is-no-asterisk).asterisk-left>.el-form-item__label-wrap>.el-form-item__label:before{content:"*";color:var(--el-color-danger);margin-right:4px}.el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label:after,.el-form-item.is-required:not(.is-no-asterisk).asterisk-right>.el-form-item__label-wrap>.el-form-item__label:after{content:"*";color:var(--el-color-danger);margin-left:4px}.el-form-item.is-error .el-form-item__content .el-input__wrapper,.el-form-item.is-error .el-form-item__content .el-input__wrapper:hover,.el-form-item.is-error .el-form-item__content .el-input__wrapper:focus,.el-form-item.is-error .el-form-item__content .el-input__wrapper.is-focus,.el-form-item.is-error .el-form-item__content .el-textarea__inner,.el-form-item.is-error .el-form-item__content .el-textarea__inner:hover,.el-form-item.is-error .el-form-item__content .el-textarea__inner:focus,.el-form-item.is-error .el-form-item__content .el-textarea__inner.is-focus,.el-form-item.is-error .el-form-item__content .el-select__wrapper,.el-form-item.is-error .el-form-item__content .el-select__wrapper:hover,.el-form-item.is-error .el-form-item__content .el-select__wrapper:focus,.el-form-item.is-error .el-form-item__content .el-select__wrapper.is-focus,.el-form-item.is-error .el-form-item__content .el-input-tag__wrapper,.el-form-item.is-error .el-form-item__content .el-input-tag__wrapper:hover,.el-form-item.is-error .el-form-item__content .el-input-tag__wrapper:focus,.el-form-item.is-error .el-form-item__content .el-input-tag__wrapper.is-focus{box-shadow:0 0 0 1px var(--el-color-danger) inset}.el-form-item.is-error .el-form-item__content .el-input-group__append .el-input__wrapper,.el-form-item.is-error .el-form-item__content .el-input-group__prepend .el-input__wrapper{box-shadow:inset 0 0 0 1px #0000}.el-form-item.is-error .el-form-item__content .el-input-group__append .el-input__validateIcon,.el-form-item.is-error .el-form-item__content .el-input-group__prepend .el-input__validateIcon{display:none}.el-form-item.is-error .el-form-item__content .el-input__validateIcon{color:var(--el-color-danger)}.el-form-item--feedback .el-input__validateIcon{display:inline-flex}.el-form{--el-form-label-font-size:var(--el-font-size-base);--el-form-inline-content-width:220px}.el-form--inline .el-form-item{vertical-align:middle;margin-right:32px;display:inline-flex}.el-form--inline.el-form--label-top{flex-wrap:wrap;display:flex}.el-form--inline.el-form--label-top .el-form-item{display:block}.el-header{--el-header-padding:0 20px;--el-header-height:60px;padding:var(--el-header-padding);box-sizing:border-box;height:var(--el-header-height);flex-shrink:0}.el-image-viewer__wrapper{position:fixed;top:0;bottom:0;left:0;right:0}.el-image-viewer__wrapper:focus{outline:none!important}.el-image-viewer__btn{z-index:1;opacity:.8;cursor:pointer;box-sizing:border-box;-webkit-user-select:none;user-select:none;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute}.el-image-viewer__btn .el-icon{cursor:pointer}.el-image-viewer__close{width:40px;height:40px;font-size:40px;top:40px;right:40px}.el-image-viewer__canvas{-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:static}.el-image-viewer__actions{background-color:var(--el-text-color-regular);border-color:#fff;border-radius:22px;height:44px;padding:0 23px;bottom:30px;left:50%;transform:translate(-50%)}.el-image-viewer__actions__inner{cursor:default;color:#fff;justify-content:space-around;align-items:center;gap:22px;width:100%;height:100%;padding:0 6px;font-size:23px;display:flex}.el-image-viewer__actions__divider{margin:0 -6px}.el-image-viewer__progress{cursor:default;color:#fff;bottom:90px;left:50%;transform:translate(-50%)}.el-image-viewer__prev{color:#fff;background-color:var(--el-text-color-regular);border-color:#fff;width:44px;height:44px;font-size:24px;top:50%;left:40px;transform:translateY(-50%)}.el-image-viewer__next{text-indent:2px;color:#fff;background-color:var(--el-text-color-regular);border-color:#fff;width:44px;height:44px;font-size:24px;top:50%;right:40px;transform:translateY(-50%)}.el-image-viewer__close{color:#fff;background-color:var(--el-text-color-regular);border-color:#fff;width:44px;height:44px;font-size:24px}.el-image-viewer__mask{opacity:.5;background:#000;width:100%;height:100%;position:absolute;top:0;left:0}.el-image-viewer-parent--hidden{overflow:hidden}.viewer-fade-enter-active{animation:viewer-fade-in var(--el-transition-duration)}.viewer-fade-leave-active{animation:viewer-fade-out var(--el-transition-duration)}@keyframes viewer-fade-in{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translate(0)}}@keyframes viewer-fade-out{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translateY(-20px)}}.el-image__error,.el-image__placeholder,.el-image__wrapper,.el-image__inner{width:100%;height:100%}.el-image{display:inline-block;position:relative;overflow:hidden}.el-image__inner{vertical-align:top;opacity:1}.el-image__inner.is-loading{opacity:0}.el-image__wrapper{position:absolute;top:0;left:0}.el-image__placeholder{background:var(--el-fill-color-light)}.el-image__error{background:var(--el-fill-color-light);color:var(--el-text-color-placeholder);vertical-align:middle;justify-content:center;align-items:center;font-size:14px;display:flex}.el-image__preview{cursor:pointer}.el-textarea{--el-input-text-color:var(--el-text-color-regular);--el-input-border:var(--el-border);--el-input-hover-border:var(--el-border-color-hover);--el-input-focus-border:var(--el-color-primary);--el-input-transparent-border:0 0 0 1px transparent inset;--el-input-border-color:var(--el-border-color);--el-input-border-radius:var(--el-border-radius-base);--el-input-bg-color:var(--el-fill-color-blank);--el-input-icon-color:var(--el-text-color-placeholder);--el-input-placeholder-color:var(--el-text-color-placeholder);--el-input-hover-border-color:var(--el-border-color-hover);--el-input-clear-hover-color:var(--el-text-color-secondary);--el-input-focus-border-color:var(--el-color-primary);--el-input-width:100%;vertical-align:bottom;width:100%;font-size:var(--el-font-size-base);display:inline-block;position:relative}.el-textarea__inner{resize:vertical;box-sizing:border-box;width:100%;line-height:1.5;font-size:inherit;color:var(--el-input-text-color,var(--el-text-color-regular));background-color:var(--el-input-bg-color,var(--el-fill-color-blank));-webkit-appearance:none;box-shadow:0 0 0 1px var(--el-input-border-color,var(--el-border-color)) inset;border-radius:var(--el-input-border-radius,var(--el-border-radius-base));transition:var(--el-transition-box-shadow);background-image:none;border:none;padding:5px 11px;font-family:inherit;display:block;position:relative}.el-textarea__inner.is-clearable{padding:5px 26px 5px 11px}.el-textarea__inner::placeholder{color:var(--el-input-placeholder-color,var(--el-text-color-placeholder))}.el-textarea__inner:hover{box-shadow:0 0 0 1px var(--el-input-hover-border-color) inset}.el-textarea__inner:focus{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset;outline:none}.el-textarea__clear{color:var(--el-input-icon-color);cursor:pointer;font-size:14px;position:absolute;top:15px;right:11px;transform:translateY(-50%)}.el-textarea__clear:hover{color:var(--el-input-clear-hover-color)}.el-textarea .el-input__count{color:var(--el-color-info);background:var(--el-fill-color-blank);font-size:12px;line-height:14px;position:absolute;bottom:5px;right:10px}.el-textarea .el-input__count.is-outside{top:100%;right:0;bottom:unset;background:0 0;padding-top:2px;line-height:1;position:absolute}.el-textarea.is-disabled .el-textarea__inner{box-shadow:0 0 0 1px var(--el-disabled-border-color) inset;background-color:var(--el-disabled-bg-color);color:var(--el-disabled-text-color);cursor:not-allowed}.el-textarea.is-disabled .el-textarea__inner::placeholder{color:var(--el-text-color-placeholder)}.el-textarea.is-exceed .el-textarea__inner{box-shadow:0 0 0 1px var(--el-color-danger) inset}.el-textarea.is-exceed .el-input__count{color:var(--el-color-danger)}.el-input{--el-input-text-color:var(--el-text-color-regular);--el-input-border:var(--el-border);--el-input-hover-border:var(--el-border-color-hover);--el-input-focus-border:var(--el-color-primary);--el-input-transparent-border:0 0 0 1px transparent inset;--el-input-border-color:var(--el-border-color);--el-input-border-radius:var(--el-border-radius-base);--el-input-bg-color:var(--el-fill-color-blank);--el-input-icon-color:var(--el-text-color-placeholder);--el-input-placeholder-color:var(--el-text-color-placeholder);--el-input-hover-border-color:var(--el-border-color-hover);--el-input-clear-hover-color:var(--el-text-color-secondary);--el-input-focus-border-color:var(--el-color-primary);--el-input-width:100%;--el-input-height:var(--el-component-size);font-size:var(--el-font-size-base);width:var(--el-input-width);line-height:var(--el-input-height);box-sizing:border-box;vertical-align:middle;display:inline-flex;position:relative}.el-input::-webkit-scrollbar{z-index:11;width:6px}.el-input::-webkit-scrollbar:horizontal{height:6px}.el-input::-webkit-scrollbar-thumb{background:var(--el-text-color-disabled);border-radius:5px;width:6px}.el-input::-webkit-scrollbar-corner{background:var(--el-fill-color-blank)}.el-input::-webkit-scrollbar-track{background:var(--el-fill-color-blank)}.el-input::-webkit-scrollbar-track-piece{background:var(--el-fill-color-blank);width:6px}.el-input .el-input__clear,.el-input .el-input__password{color:var(--el-input-icon-color);cursor:pointer;font-size:14px}.el-input .el-input__clear:hover,.el-input .el-input__password:hover{color:var(--el-input-clear-hover-color)}.el-input .el-input__count{height:100%;color:var(--el-color-info);align-items:center;font-size:12px;display:inline-flex}.el-input .el-input__count .el-input__count-inner{background:var(--el-fill-color-blank);line-height:initial;padding-left:8px;display:inline-block}.el-input .el-input__count.is-outside{height:unset;padding-top:2px;position:absolute;top:100%;right:0}.el-input .el-input__count.is-outside .el-input__count-inner{background:0 0;padding-left:0;line-height:1}.el-input__wrapper{background-color:var(--el-input-bg-color,var(--el-fill-color-blank));border-radius:var(--el-input-border-radius,var(--el-border-radius-base));cursor:text;transition:var(--el-transition-box-shadow);box-shadow:0 0 0 1px var(--el-input-border-color,var(--el-border-color)) inset;background-image:none;flex-grow:1;justify-content:center;align-items:center;padding:1px 11px;display:inline-flex;transform:translate(0)}.el-input__wrapper:hover{box-shadow:0 0 0 1px var(--el-input-hover-border-color) inset}.el-input__wrapper.is-focus{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset}.el-input{--el-input-inner-height:calc(var(--el-input-height,32px) - 2px)}.el-input__inner{-webkit-appearance:none;width:100%;color:var(--el-input-text-color,var(--el-text-color-regular));font-size:inherit;height:var(--el-input-inner-height);line-height:var(--el-input-inner-height);box-sizing:border-box;background:0 0;border:none;outline:none;flex-grow:1;padding:0}.el-input__inner:focus{outline:none}.el-input__inner::placeholder{color:var(--el-input-placeholder-color,var(--el-text-color-placeholder))}.el-input__inner[type=password]::-ms-reveal{display:none}.el-input__inner[type=number]{line-height:1}.el-input__prefix{white-space:nowrap;height:100%;line-height:var(--el-input-inner-height);text-align:center;color:var(--el-input-icon-color,var(--el-text-color-placeholder));transition:all var(--el-transition-duration);pointer-events:none;flex-wrap:nowrap;flex-shrink:0;display:inline-flex}.el-input__prefix-inner{pointer-events:all;justify-content:center;align-items:center;display:inline-flex}.el-input__prefix-inner>:last-child{margin-right:8px}.el-input__prefix-inner>:first-child,.el-input__prefix-inner>:first-child.el-input__icon{margin-left:0}.el-input__suffix{white-space:nowrap;height:100%;line-height:var(--el-input-inner-height);text-align:center;color:var(--el-input-icon-color,var(--el-text-color-placeholder));transition:all var(--el-transition-duration);pointer-events:none;flex-wrap:nowrap;flex-shrink:0;display:inline-flex}.el-input__suffix-inner{pointer-events:all;justify-content:center;align-items:center;display:inline-flex}.el-input__suffix-inner>:first-child{margin-left:8px}.el-input .el-input__icon{height:inherit;line-height:inherit;transition:all var(--el-transition-duration);justify-content:center;align-items:center;margin-left:8px;display:flex}.el-input__validateIcon{pointer-events:none}.el-input.is-active .el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-focus-color, ) inset}.el-input.is-disabled{cursor:not-allowed}.el-input.is-disabled .el-input__wrapper{background-color:var(--el-disabled-bg-color);cursor:not-allowed;box-shadow:0 0 0 1px var(--el-disabled-border-color) inset}.el-input.is-disabled .el-input__inner{color:var(--el-disabled-text-color);-webkit-text-fill-color:var(--el-disabled-text-color);cursor:not-allowed}.el-input.is-disabled .el-input__inner::placeholder{color:var(--el-text-color-placeholder)}.el-input.is-disabled .el-input__icon{cursor:not-allowed}.el-input.is-disabled .el-input__prefix-inner,.el-input.is-disabled .el-input__suffix-inner{pointer-events:none}.el-input.is-exceed .el-input__wrapper{box-shadow:0 0 0 1px var(--el-color-danger) inset}.el-input.is-exceed .el-input__suffix .el-input__count{color:var(--el-color-danger)}.el-input--large{--el-input-height:var(--el-component-size-large);font-size:14px}.el-input--large .el-input__wrapper{padding:1px 15px}.el-input--large{--el-input-inner-height:calc(var(--el-input-height,40px) - 2px)}.el-input--small{--el-input-height:var(--el-component-size-small);font-size:12px}.el-input--small .el-input__wrapper{padding:1px 7px}.el-input--small{--el-input-inner-height:calc(var(--el-input-height,24px) - 2px)}.el-input-group{align-items:stretch;width:100%;display:inline-flex}.el-input-group__append,.el-input-group__prepend{background-color:var(--el-fill-color-light);color:var(--el-color-info);border-radius:var(--el-input-border-radius);white-space:nowrap;justify-content:center;align-items:center;min-height:100%;padding:0 20px;display:inline-flex;position:relative}.el-input-group__append:focus,.el-input-group__prepend:focus{outline:none}.el-input-group__append .el-select,.el-input-group__append .el-button,.el-input-group__prepend .el-select,.el-input-group__prepend .el-button{flex:1;margin:0 -20px;display:inline-block}.el-input-group__append button.el-button,.el-input-group__append button.el-button:hover,.el-input-group__append div.el-select .el-select__wrapper,.el-input-group__append div.el-select:hover .el-select__wrapper,.el-input-group__prepend button.el-button,.el-input-group__prepend button.el-button:hover,.el-input-group__prepend div.el-select .el-select__wrapper,.el-input-group__prepend div.el-select:hover .el-select__wrapper{color:inherit;background-color:#0000;border-color:#0000}.el-input-group__append .el-button,.el-input-group__append .el-input,.el-input-group__prepend .el-button,.el-input-group__prepend .el-input{font-size:inherit}.el-input-group__prepend{box-shadow:1px 0 0 0 var(--el-input-border-color) inset,0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset;border-right:0;border-top-right-radius:0;border-bottom-right-radius:0}.el-input-group__append{box-shadow:0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset,-1px 0 0 0 var(--el-input-border-color) inset;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.el-input-group--prepend>.el-input__wrapper{border-top-left-radius:0;border-bottom-left-radius:0}.el-input-group--prepend .el-input-group__prepend .el-select .el-select__wrapper{box-shadow:1px 0 0 0 var(--el-input-border-color) inset,0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset;border-top-right-radius:0;border-bottom-right-radius:0}.el-input-group--append>.el-input__wrapper{border-top-right-radius:0;border-bottom-right-radius:0}.el-input-group--append .el-input-group__append .el-select .el-select__wrapper{box-shadow:0 1px 0 0 var(--el-input-border-color) inset,0 -1px 0 0 var(--el-input-border-color) inset,-1px 0 0 0 var(--el-input-border-color) inset;border-top-left-radius:0;border-bottom-left-radius:0}.el-input-hidden{display:none!important}.el-input-number{vertical-align:middle;width:150px;line-height:30px;display:inline-flex;position:relative}.el-input-number .el-input__wrapper{padding-left:42px;padding-right:42px}.el-input-number .el-input__inner{-webkit-appearance:none;-moz-appearance:textfield;text-align:center;line-height:1}.el-input-number .el-input__inner::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.el-input-number .el-input__inner::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.el-input-number.is-left .el-input__inner{text-align:left}.el-input-number.is-right .el-input__inner{text-align:right}.el-input-number.is-center .el-input__inner{text-align:center}.el-input-number__increase,.el-input-number__decrease{z-index:1;background:var(--el-fill-color-light);width:32px;height:auto;color:var(--el-text-color-regular);cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;font-size:13px;display:flex;position:absolute;top:1px;bottom:1px}.el-input-number__increase:hover,.el-input-number__decrease:hover{color:var(--el-color-primary)}.el-input-number__increase:hover~.el-input:not(.is-disabled) .el-input__wrapper,.el-input-number__decrease:hover~.el-input:not(.is-disabled) .el-input__wrapper{box-shadow:0 0 0 1px var(--el-input-focus-border-color,var(--el-color-primary)) inset}.el-input-number__increase.is-disabled,.el-input-number__decrease.is-disabled{color:var(--el-disabled-text-color);cursor:not-allowed}.el-input-number__increase{border-radius:0 var(--el-border-radius-base) var(--el-border-radius-base) 0;border-left:var(--el-border);right:1px}.el-input-number__decrease{border-radius:var(--el-border-radius-base) 0 0 var(--el-border-radius-base);border-right:var(--el-border);left:1px}.el-input-number.is-disabled .el-input-number__increase,.el-input-number.is-disabled .el-input-number__decrease{border-color:var(--el-disabled-border-color);color:var(--el-disabled-border-color)}.el-input-number.is-disabled .el-input-number__increase:hover,.el-input-number.is-disabled .el-input-number__decrease:hover{color:var(--el-disabled-border-color);cursor:not-allowed}.el-input-number--large{width:180px;line-height:38px}.el-input-number--large .el-input-number__increase,.el-input-number--large .el-input-number__decrease{width:40px;font-size:14px}.el-input-number--large.is-controls-right .el-input--large .el-input__wrapper{padding-right:47px}.el-input-number--large .el-input--large .el-input__wrapper{padding-left:47px;padding-right:47px}.el-input-number--small{width:120px;line-height:22px}.el-input-number--small .el-input-number__increase,.el-input-number--small .el-input-number__decrease{width:24px;font-size:12px}.el-input-number--small.is-controls-right .el-input--small .el-input__wrapper{padding-right:31px}.el-input-number--small .el-input--small .el-input__wrapper{padding-left:31px;padding-right:31px}.el-input-number--small .el-input-number__increase [class*=el-icon],.el-input-number--small .el-input-number__decrease [class*=el-icon]{transform:scale(.9)}.el-input-number.is-without-controls .el-input__wrapper{padding-left:15px;padding-right:15px}.el-input-number.is-controls-right .el-input__wrapper{padding-left:15px;padding-right:42px}.el-input-number.is-controls-right .el-input-number__increase,.el-input-number.is-controls-right .el-input-number__decrease{--el-input-number-controls-height:15px;height:var(--el-input-number-controls-height);line-height:var(--el-input-number-controls-height)}.el-input-number.is-controls-right .el-input-number__increase [class*=el-icon],.el-input-number.is-controls-right .el-input-number__decrease [class*=el-icon]{transform:scale(.8)}.el-input-number.is-controls-right .el-input-number__increase{border-radius:0 var(--el-border-radius-base) 0 0;border-bottom:var(--el-border);bottom:auto;left:auto}.el-input-number.is-controls-right .el-input-number__decrease{border-right:none;border-left:var(--el-border);border-radius:0 0 var(--el-border-radius-base) 0;top:auto;left:auto;right:1px}.el-input-number.is-controls-right[class*=large] [class*=increase],.el-input-number.is-controls-right[class*=large] [class*=decrease]{--el-input-number-controls-height:19px}.el-input-number.is-controls-right[class*=small] [class*=increase],.el-input-number.is-controls-right[class*=small] [class*=decrease]{--el-input-number-controls-height:11px}.el-input-tag{--el-input-tag-border-color-hover:var(--el-border-color-hover);--el-input-tag-placeholder-color:var(--el-text-color-placeholder);--el-input-tag-disabled-color:var(--el-disabled-text-color);--el-input-tag-disabled-border:var(--el-disabled-border-color);--el-input-tag-font-size:var(--el-font-size-base);--el-input-tag-close-hover-color:var(--el-text-color-secondary);--el-input-tag-text-color:var(--el-text-color-regular);--el-input-tag-input-focus-border-color:var(--el-color-primary);--el-input-tag-width:100%;--el-input-tag-mini-height:var(--el-component-size);--el-input-tag-gap:6px;--el-input-tag-padding:4px;--el-input-tag-inner-padding:8px;--el-input-tag-line-height:24px;box-sizing:border-box;cursor:pointer;font-size:var(--el-input-tag-font-size);padding:var(--el-input-tag-padding);width:var(--el-input-tag-width);min-height:var(--el-input-tag-mini-height);line-height:var(--el-input-tag-line-height);border-radius:var(--el-border-radius-base);background-color:var(--el-fill-color-blank);transition:var(--el-transition-duration);box-shadow:0 0 0 1px var(--el-border-color) inset;align-items:center;display:flex;transform:translate(0)}.el-input-tag.is-focused{box-shadow:0 0 0 1px var(--el-color-primary) inset}.el-input-tag.is-hovering:not(.is-focused){box-shadow:0 0 0 1px var(--el-border-color-hover) inset}.el-input-tag.is-disabled{cursor:not-allowed;background-color:var(--el-fill-color-light);box-shadow:0 0 0 1px var(--el-input-tag-disabled-border) inset}.el-input-tag.is-disabled:hover{box-shadow:0 0 0 1px var(--el-input-tag-disabled-border) inset}.el-input-tag.is-disabled.is-focus{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset}.el-input-tag.is-disabled .el-input-tag__inner .el-input-tag__input,.el-input-tag.is-disabled .el-input-tag__inner .el-tag{cursor:not-allowed}.el-input-tag__prefix{padding:0 var(--el-input-tag-inner-padding);color:var(--el-input-icon-color,var(--el-text-color-placeholder));flex-shrink:0;align-items:center;display:flex}.el-input-tag__suffix{padding:0 var(--el-input-tag-inner-padding);color:var(--el-input-icon-color,var(--el-text-color-placeholder));flex-shrink:0;align-items:center;gap:8px;display:flex}.el-input-tag__collapse-tag{line-height:1}.el-input-tag__input-tag-list{flex-wrap:wrap;flex:1;align-items:center;gap:6px;min-width:0;display:flex;position:relative}.el-input-tag__input-tag-list.is-near{margin-left:-8px}.el-input-tag__input-tag-list .el-tag{cursor:pointer;border-color:#0000}.el-input-tag__input-tag-list .el-tag.el-tag--plain{border-color:var(--el-tag-border-color)}.el-input-tag__input-tag-list .el-tag .el-tag__content{min-width:0}.el-input-tag__inner{align-items:center;gap:var(--el-input-tag-gap);flex-wrap:wrap;flex:1;min-width:0;max-width:100%;display:flex;position:relative}.el-input-tag__inner.is-left-space{margin-left:var(--el-input-tag-inner-padding)}.el-input-tag__inner.is-right-space{margin-right:var(--el-input-tag-inner-padding)}.el-input-tag__inner.is-draggable .el-tag{cursor:move;-webkit-user-select:none;user-select:none}.el-input-tag__drop-indicator{width:1px;height:var(--el-input-tag-line-height);background-color:var(--el-color-primary);position:absolute;top:0}.el-input-tag__inner .el-tag{cursor:pointer;border-color:#0000;max-width:100%}.el-input-tag__inner .el-tag.el-tag--plain{border-color:var(--el-tag-border-color)}.el-input-tag__inner .el-tag .el-tag__content{text-overflow:ellipsis;white-space:nowrap;min-width:0;line-height:normal;overflow:hidden}.el-input-tag__input-wrapper{flex:1}.el-input-tag__input{color:var(--el-input-tag-text-color);font-size:inherit;font-family:inherit;line-height:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none;outline:none;width:100%;padding:0}.el-input-tag__input::placeholder{color:var(--el-input-tag-placeholder-color)}.el-input-tag__input-calculator{visibility:hidden;white-space:pre;max-width:100%;position:absolute;top:0;left:0;overflow:hidden}.el-input-tag--large{--el-input-tag-gap:6px;--el-input-tag-padding:8px;--el-input-tag-padding-left:8px;--el-input-tag-font-size:14px}.el-input-tag--small{--el-input-tag-gap:4px;--el-input-tag-padding:2px;--el-input-tag-padding-left:6px;--el-input-tag-font-size:12px;--el-input-tag-line-height:20px;--el-input-tag-mini-height:var(--el-component-size-small)}.el-link{--el-link-font-size:var(--el-font-size-base);--el-link-font-weight:var(--el-font-weight-primary);--el-link-text-color:var(--el-text-color-regular);--el-link-hover-text-color:var(--el-color-primary);--el-link-disabled-text-color:var(--el-text-color-placeholder);vertical-align:middle;cursor:pointer;font-size:var(--el-link-font-size);font-weight:var(--el-link-font-weight);color:var(--el-link-text-color);outline:none;flex-direction:row;justify-content:center;align-items:center;padding:0;text-decoration:none;display:inline-flex;position:relative}.el-link.is-hover-underline:hover:after{content:"";border-bottom:1px solid var(--el-link-hover-text-color);height:0;position:absolute;bottom:0;left:0;right:0}.el-link.is-underline:after{content:"";border-bottom:1px solid var(--el-link-text-color);height:0;position:absolute;bottom:0;left:0;right:0}.el-link:hover{color:var(--el-link-hover-text-color)}.el-link:hover:after{border-color:var(--el-link-hover-text-color)}.el-link [class*=el-icon-]+span{margin-left:5px}.el-link__inner{justify-content:center;align-items:center;display:inline-flex}.el-link.el-link--primary{--el-link-text-color:var(--el-color-primary);--el-link-hover-text-color:var(--el-color-primary-light-3);--el-link-disabled-text-color:var(--el-color-primary-light-5)}.el-link.el-link--success{--el-link-text-color:var(--el-color-success);--el-link-hover-text-color:var(--el-color-success-light-3);--el-link-disabled-text-color:var(--el-color-success-light-5)}.el-link.el-link--warning{--el-link-text-color:var(--el-color-warning);--el-link-hover-text-color:var(--el-color-warning-light-3);--el-link-disabled-text-color:var(--el-color-warning-light-5)}.el-link.el-link--danger{--el-link-text-color:var(--el-color-danger);--el-link-hover-text-color:var(--el-color-danger-light-3);--el-link-disabled-text-color:var(--el-color-danger-light-5)}.el-link.el-link--error{--el-link-text-color:var(--el-color-error);--el-link-hover-text-color:var(--el-color-error-light-3);--el-link-disabled-text-color:var(--el-color-error-light-5)}.el-link.el-link--info{--el-link-text-color:var(--el-color-info);--el-link-hover-text-color:var(--el-color-info-light-3);--el-link-disabled-text-color:var(--el-color-info-light-5)}.el-link.is-disabled{color:var(--el-link-disabled-text-color);cursor:not-allowed}.el-link.is-disabled:after{border-color:var(--el-link-disabled-text-color)}:root{--el-loading-spinner-size:42px;--el-loading-fullscreen-spinner-size:50px}.el-loading-parent--relative{position:relative!important}.el-loading-parent--hidden{overflow:hidden!important}.el-loading-mask{z-index:2000;background-color:var(--el-mask-color);transition:opacity var(--el-transition-duration);margin:0;position:absolute;top:0;bottom:0;left:0;right:0}.el-loading-mask.is-fullscreen{position:fixed}.el-loading-mask.is-fullscreen .el-loading-spinner{margin-top:calc((0px - var(--el-loading-fullscreen-spinner-size)) / 2)}.el-loading-mask.is-fullscreen .el-loading-spinner .circular{height:var(--el-loading-fullscreen-spinner-size);width:var(--el-loading-fullscreen-spinner-size)}.el-loading-spinner{margin-top:calc((0px - var(--el-loading-spinner-size)) / 2);text-align:center;width:100%;position:absolute;top:50%}.el-loading-spinner .el-loading-text{color:var(--el-color-primary);margin:3px 0;font-size:14px}.el-loading-spinner .circular{height:var(--el-loading-spinner-size);width:var(--el-loading-spinner-size);animation:2s linear infinite loading-rotate;display:inline}.el-loading-spinner .path{stroke-dasharray:90 150;stroke-dashoffset:0;stroke-width:2px;stroke:var(--el-color-primary);stroke-linecap:round;animation:1.5s ease-in-out infinite loading-dash}.el-loading-spinner i{color:var(--el-color-primary)}.el-loading-fade-enter-from,.el-loading-fade-leave-to{opacity:0}@keyframes loading-rotate{to{transform:rotate(360deg)}}@keyframes loading-dash{0%{stroke-dasharray:1 200;stroke-dashoffset:0}50%{stroke-dasharray:90 150;stroke-dashoffset:-40px}to{stroke-dasharray:90 150;stroke-dashoffset:-120px}}.el-main{--el-main-padding:20px;box-sizing:border-box;padding:var(--el-main-padding);flex:auto;display:block;overflow:auto}:root{--el-menu-active-color:var(--el-color-primary);--el-menu-text-color:var(--el-text-color-primary);--el-menu-hover-text-color:var(--el-color-primary);--el-menu-bg-color:var(--el-fill-color-blank);--el-menu-hover-bg-color:var(--el-color-primary-light-9);--el-menu-item-height:56px;--el-menu-sub-item-height:calc(var(--el-menu-item-height) - 6px);--el-menu-horizontal-height:60px;--el-menu-horizontal-sub-item-height:36px;--el-menu-item-font-size:var(--el-font-size-base);--el-menu-item-hover-fill:var(--el-color-primary-light-9);--el-menu-border-color:var(--el-border-color);--el-menu-base-level-padding:20px;--el-menu-level-padding:20px;--el-menu-icon-width:24px}.el-menu{border-right:solid 1px var(--el-menu-border-color);background-color:var(--el-menu-bg-color);box-sizing:border-box;margin:0;padding-left:0;list-style:none;position:relative}.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container) .el-menu-item,.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container) .el-sub-menu__title,.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container) .el-menu-item-group__title{white-space:nowrap;padding-left:calc(var(--el-menu-base-level-padding) + var(--el-menu-level) * var(--el-menu-level-padding))}.el-menu:not(.el-menu--collapse) .el-sub-menu__title{padding-right:calc(var(--el-menu-base-level-padding) + var(--el-menu-icon-width))}.el-menu--horizontal{height:var(--el-menu-horizontal-height);border-right:none;flex-wrap:nowrap;display:flex}.el-menu--horizontal.el-menu--popup-container{height:unset}.el-menu--horizontal.el-menu{border-bottom:solid 1px var(--el-menu-border-color)}.el-menu--horizontal>.el-menu-item{height:100%;color:var(--el-menu-text-color);border-bottom:2px solid #0000;justify-content:center;align-items:center;margin:0;display:inline-flex}.el-menu--horizontal>.el-menu-item a,.el-menu--horizontal>.el-menu-item a:hover{color:inherit}.el-menu--horizontal>.el-sub-menu:focus,.el-menu--horizontal>.el-sub-menu:hover{outline:none}.el-menu--horizontal>.el-sub-menu:hover .el-sub-menu__title{color:var(--el-menu-hover-text-color)}.el-menu--horizontal>.el-sub-menu.is-active .el-sub-menu__title{border-bottom:2px solid var(--el-menu-active-color);color:var(--el-menu-active-color)}.el-menu--horizontal>.el-sub-menu .el-sub-menu__title{height:100%;color:var(--el-menu-text-color);border-bottom:2px solid #0000}.el-menu--horizontal>.el-sub-menu .el-sub-menu__title:hover{background-color:var(--el-menu-bg-color)}.el-menu--horizontal .el-menu .el-menu-item,.el-menu--horizontal .el-menu .el-sub-menu__title{background-color:var(--el-menu-bg-color);height:var(--el-menu-horizontal-sub-item-height);line-height:var(--el-menu-horizontal-sub-item-height);color:var(--el-menu-text-color);align-items:center;padding:0 10px;display:flex}.el-menu--horizontal .el-menu .el-sub-menu__title{padding-right:40px}.el-menu--horizontal .el-menu .el-menu-item.is-active,.el-menu--horizontal .el-menu .el-menu-item.is-active:hover,.el-menu--horizontal .el-menu .el-sub-menu.is-active>.el-sub-menu__title,.el-menu--horizontal .el-menu .el-sub-menu.is-active>.el-sub-menu__title:hover{color:var(--el-menu-active-color)}.el-menu--horizontal .el-menu-item:not(.is-disabled):hover,.el-menu--horizontal .el-menu-item:not(.is-disabled):focus{color:var(--el-menu-active-color,var(--el-menu-hover-text-color));background-color:var(--el-menu-hover-bg-color);outline:none}.el-menu--horizontal>.el-menu-item.is-active{border-bottom:2px solid var(--el-menu-active-color);color:var(--el-menu-active-color)!important}.el-menu--collapse{width:calc(var(--el-menu-icon-width) + var(--el-menu-base-level-padding) * 2)}.el-menu--collapse>.el-menu-item [class^=el-icon],.el-menu--collapse>.el-sub-menu>.el-sub-menu__title [class^=el-icon],.el-menu--collapse>.el-menu-item-group>ul>.el-sub-menu>.el-sub-menu__title [class^=el-icon]{vertical-align:middle;width:var(--el-menu-icon-width);text-align:center;margin:0}.el-menu--collapse>.el-menu-item .el-sub-menu__icon-arrow,.el-menu--collapse>.el-sub-menu>.el-sub-menu__title .el-sub-menu__icon-arrow,.el-menu--collapse>.el-menu-item-group>ul>.el-sub-menu>.el-sub-menu__title .el-sub-menu__icon-arrow{display:none}.el-menu--collapse>.el-menu-item>span,.el-menu--collapse>.el-sub-menu>.el-sub-menu__title>span,.el-menu--collapse>.el-menu-item-group>ul>.el-sub-menu>.el-sub-menu__title>span{visibility:hidden;width:0;height:0;display:inline-block;overflow:hidden}.el-menu--collapse>.el-menu-item.is-active i{color:inherit}.el-menu--collapse .el-menu .el-sub-menu{min-width:200px}.el-menu--collapse .el-sub-menu.is-active .el-sub-menu__title{color:var(--el-menu-active-color)}.el-menu--popup{z-index:100;border-radius:var(--el-border-radius-small);min-width:200px;box-shadow:var(--el-box-shadow-light);border:none;padding:5px 0}.el-menu .el-icon{flex-shrink:0}.el-menu-item{height:var(--el-menu-item-height);line-height:var(--el-menu-item-height);font-size:var(--el-menu-item-font-size);color:var(--el-menu-text-color);padding:0 var(--el-menu-base-level-padding);cursor:pointer;transition:border-color var(--el-transition-duration),background-color var(--el-transition-duration),color var(--el-transition-duration);box-sizing:border-box;white-space:nowrap;align-items:center;list-style:none;display:flex;position:relative}.el-menu-item *{vertical-align:bottom}.el-menu-item i{color:inherit}.el-menu-item:hover,.el-menu-item:focus{outline:none}.el-menu-item:hover{background-color:var(--el-menu-hover-bg-color)}.el-menu-item.is-disabled{opacity:.25;cursor:not-allowed;background:0 0!important}.el-menu-item [class^=el-icon]{width:var(--el-menu-icon-width);text-align:center;vertical-align:middle;margin-right:5px;font-size:18px}.el-menu-item.is-active{color:var(--el-menu-active-color)}.el-menu-item.is-active i{color:inherit}.el-menu-item .el-menu-tooltip__trigger{box-sizing:border-box;width:100%;height:100%;padding:0 var(--el-menu-base-level-padding);align-items:center;display:inline-flex;position:absolute;top:0;left:0}.el-sub-menu{margin:0;padding-left:0;list-style:none}.el-sub-menu__title{height:var(--el-menu-item-height);line-height:var(--el-menu-item-height);font-size:var(--el-menu-item-font-size);color:var(--el-menu-text-color);padding:0 var(--el-menu-base-level-padding);cursor:pointer;transition:border-color var(--el-transition-duration),background-color var(--el-transition-duration),color var(--el-transition-duration);box-sizing:border-box;white-space:nowrap;align-items:center;list-style:none;display:flex;position:relative}.el-sub-menu__title *{vertical-align:bottom}.el-sub-menu__title i{color:inherit}.el-sub-menu__title:hover,.el-sub-menu__title:focus{outline:none}.el-sub-menu__title.is-disabled{opacity:.25;cursor:not-allowed;background:0 0!important}.el-sub-menu__title:hover{background-color:var(--el-menu-hover-bg-color)}.el-sub-menu .el-menu{border:none}.el-sub-menu .el-menu-item{height:var(--el-menu-sub-item-height);line-height:var(--el-menu-sub-item-height)}.el-sub-menu.el-sub-menu__hide-arrow .el-sub-menu__title{padding-right:var(--el-menu-base-level-padding)}.el-sub-menu__hide-arrow .el-sub-menu__icon-arrow{display:none!important}.el-sub-menu.is-active .el-sub-menu__title{border-bottom-color:var(--el-menu-active-color)}.el-sub-menu.is-disabled .el-sub-menu__title,.el-sub-menu.is-disabled .el-menu-item{opacity:.25;cursor:not-allowed;background:0 0!important}.el-sub-menu .el-icon{vertical-align:middle;width:var(--el-menu-icon-width);text-align:center;margin-right:5px;font-size:18px}.el-sub-menu .el-icon.el-sub-menu__icon-more{margin-right:0!important}.el-sub-menu .el-sub-menu__icon-arrow{top:50%;right:var(--el-menu-base-level-padding);transition:transform var(--el-transition-duration);width:inherit;margin-top:-6px;margin-right:0;font-size:12px;position:absolute}.el-menu-item-group>ul{padding:0}.el-menu-item-group__title{padding:7px 0 7px var(--el-menu-base-level-padding);color:var(--el-text-color-secondary);font-size:12px;line-height:normal}.horizontal-collapse-transition .el-sub-menu__title .el-sub-menu__icon-arrow{transition:var(--el-transition-duration-fast);opacity:0}.el-popper,.el-menu--popup-container,.el-menu{outline:none}.el-message-box{--el-messagebox-title-color:var(--el-text-color-primary);--el-messagebox-width:420px;--el-messagebox-border-radius:4px;--el-messagebox-box-shadow:var(--el-box-shadow);--el-messagebox-font-size:var(--el-font-size-large);--el-messagebox-content-font-size:var(--el-font-size-base);--el-messagebox-content-color:var(--el-text-color-regular);--el-messagebox-error-font-size:12px;--el-messagebox-padding-primary:12px;--el-messagebox-font-line-height:var(--el-font-line-height-primary);max-width:var(--el-messagebox-width);width:100%;padding:var(--el-messagebox-padding-primary);vertical-align:middle;background-color:var(--el-bg-color);border-radius:var(--el-messagebox-border-radius);font-size:var(--el-messagebox-font-size);box-shadow:var(--el-messagebox-box-shadow);text-align:left;-webkit-backface-visibility:hidden;backface-visibility:hidden;box-sizing:border-box;overflow-wrap:break-word;display:inline-block;position:relative;overflow:hidden}.el-message-box:focus{outline:none!important}.is-message-box .el-overlay-message-box{text-align:center;padding:16px;position:fixed;top:0;bottom:0;left:0;right:0;overflow:auto}.is-message-box .el-overlay-message-box:after{content:"";vertical-align:middle;width:0;height:100%;display:inline-block}.el-message-box.is-draggable .el-message-box__header{cursor:move;-webkit-user-select:none;user-select:none}.el-message-box__header{padding-bottom:var(--el-messagebox-padding-primary)}.el-message-box__header.show-close{padding-right:calc(var(--el-messagebox-padding-primary) + var(--el-message-close-size,16px))}.el-message-box__title{font-size:var(--el-messagebox-font-size);line-height:var(--el-messagebox-font-line-height);color:var(--el-messagebox-title-color)}.el-message-box__headerbtn{width:40px;height:40px;font-size:var(--el-message-close-size,16px);cursor:pointer;background:0 0;border:none;outline:none;padding:0;position:absolute;top:0;right:0}.el-message-box__headerbtn .el-message-box__close{color:var(--el-color-info);font-size:inherit}.el-message-box__headerbtn:focus .el-message-box__close,.el-message-box__headerbtn:hover .el-message-box__close{color:var(--el-color-primary)}.el-message-box__content{color:var(--el-messagebox-content-color);font-size:var(--el-messagebox-content-font-size)}.el-message-box__container{align-items:center;gap:12px;display:flex}.el-message-box__input{padding-top:12px}.el-message-box__input div.invalid>input,.el-message-box__input div.invalid>input:focus{border-color:var(--el-color-error)}.el-message-box__status{font-size:24px}.el-message-box__status.el-message-box-icon--primary{--el-messagebox-color:var(--el-color-primary);color:var(--el-messagebox-color)}.el-message-box__status.el-message-box-icon--success{--el-messagebox-color:var(--el-color-success);color:var(--el-messagebox-color)}.el-message-box__status.el-message-box-icon--info{--el-messagebox-color:var(--el-color-info);color:var(--el-messagebox-color)}.el-message-box__status.el-message-box-icon--warning{--el-messagebox-color:var(--el-color-warning);color:var(--el-messagebox-color)}.el-message-box__status.el-message-box-icon--error{--el-messagebox-color:var(--el-color-error);color:var(--el-messagebox-color)}.el-message-box__message{min-width:0;margin:0}.el-message-box__message p{line-height:var(--el-messagebox-font-line-height);margin:0}.el-message-box__errormsg{color:var(--el-color-error);font-size:var(--el-messagebox-error-font-size);line-height:var(--el-messagebox-font-line-height)}.el-message-box__btns{padding-top:var(--el-messagebox-padding-primary);flex-wrap:wrap;justify-content:flex-end;align-items:center;display:flex}.el-message-box--center .el-message-box__title{justify-content:center;align-items:center;gap:6px;display:flex}.el-message-box--center .el-message-box__status{font-size:inherit}.el-message-box--center .el-message-box__btns,.el-message-box--center .el-message-box__container{justify-content:center}.el-message-box-parent--hidden{overflow:hidden}.fade-in-linear-enter-active .el-overlay-message-box{animation:msgbox-fade-in var(--el-transition-duration)}.fade-in-linear-leave-active .el-overlay-message-box{animation:msgbox-fade-in var(--el-transition-duration) reverse}@keyframes msgbox-fade-in{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translate(0)}}.el-message{--el-message-bg-color:var(--el-color-info-light-9);--el-message-border-color:var(--el-border-color-lighter);--el-message-padding:11px 15px;--el-message-close-size:16px;--el-message-close-icon-color:var(--el-text-color-placeholder);--el-message-close-hover-color:var(--el-text-color-secondary);box-sizing:border-box;border-radius:var(--el-border-radius-base);border-width:var(--el-border-width);border-style:var(--el-border-style);border-color:var(--el-message-border-color);background-color:var(--el-message-bg-color);width:max-content;max-width:calc(100% - 32px);transition:opacity var(--el-transition-duration),transform .4s,top .4s,bottom .4s;padding:var(--el-message-padding);align-items:center;gap:8px;display:flex;position:fixed}.el-message.is-left{left:16px}.el-message.is-right{right:16px}.el-message.is-center{left:50%;transform:translate(-50%)}.el-message.is-plain{background-color:var(--el-bg-color-overlay);border-color:var(--el-bg-color-overlay);box-shadow:var(--el-box-shadow-light)}.el-message p{margin:0}.el-message--primary{--el-message-bg-color:var(--el-color-primary-light-9);--el-message-border-color:var(--el-color-primary-light-8);--el-message-text-color:var(--el-color-primary)}.el-message--primary .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--primary{color:var(--el-message-text-color)}.el-message--success{--el-message-bg-color:var(--el-color-success-light-9);--el-message-border-color:var(--el-color-success-light-8);--el-message-text-color:var(--el-color-success)}.el-message--success .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--success{color:var(--el-message-text-color)}.el-message--info{--el-message-bg-color:var(--el-color-info-light-9);--el-message-border-color:var(--el-color-info-light-8);--el-message-text-color:var(--el-color-info)}.el-message--info .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--info{color:var(--el-message-text-color)}.el-message--warning{--el-message-bg-color:var(--el-color-warning-light-9);--el-message-border-color:var(--el-color-warning-light-8);--el-message-text-color:var(--el-color-warning)}.el-message--warning .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--warning{color:var(--el-message-text-color)}.el-message--error{--el-message-bg-color:var(--el-color-error-light-9);--el-message-border-color:var(--el-color-error-light-8);--el-message-text-color:var(--el-color-error)}.el-message--error .el-message__content{color:var(--el-message-text-color);overflow-wrap:break-word}.el-message .el-message-icon--error{color:var(--el-message-text-color)}.el-message .el-message__badge{position:absolute;top:-8px;right:-8px}.el-message__content{padding:0;font-size:14px;line-height:1}.el-message__content:focus{outline-width:0}.el-message .el-message__closeBtn{cursor:pointer;color:var(--el-message-close-icon-color);font-size:var(--el-message-close-size)}.el-message .el-message__closeBtn:focus{outline-width:0}.el-message .el-message__closeBtn:hover{color:var(--el-message-close-hover-color)}.el-message-fade-enter-from,.el-message-fade-leave-to{opacity:0}.el-message-fade-enter-from.is-left,.el-message-fade-enter-from.is-right,.el-message-fade-leave-to.is-left,.el-message-fade-leave-to.is-right{transform:translateY(-100%)}.el-message-fade-enter-from.is-left.is-bottom,.el-message-fade-enter-from.is-right.is-bottom,.el-message-fade-leave-to.is-left.is-bottom,.el-message-fade-leave-to.is-right.is-bottom{transform:translateY(100%)}.el-message-fade-enter-from.is-center,.el-message-fade-leave-to.is-center{transform:translate(-50%,-100%)}.el-message-fade-enter-from.is-center.is-bottom,.el-message-fade-leave-to.is-center.is-bottom{transform:translate(-50%,100%)}.el-notification{--el-notification-width:330px;--el-notification-padding:14px 26px 14px 13px;--el-notification-radius:8px;--el-notification-shadow:var(--el-box-shadow-light);--el-notification-border-color:var(--el-border-color-lighter);--el-notification-icon-size:24px;--el-notification-close-font-size:var(--el-message-close-size,16px);--el-notification-group-margin-left:13px;--el-notification-group-margin-right:8px;--el-notification-content-font-size:var(--el-font-size-base);--el-notification-content-color:var(--el-text-color-regular);--el-notification-title-font-size:16px;--el-notification-title-color:var(--el-text-color-primary);--el-notification-close-color:var(--el-text-color-secondary);--el-notification-close-hover-color:var(--el-text-color-regular);width:var(--el-notification-width);padding:var(--el-notification-padding);border-radius:var(--el-notification-radius);box-sizing:border-box;border:1px solid var(--el-notification-border-color);background-color:var(--el-bg-color-overlay);box-shadow:var(--el-notification-shadow);transition:opacity var(--el-transition-duration),transform var(--el-transition-duration),left var(--el-transition-duration),right var(--el-transition-duration),top .4s,bottom var(--el-transition-duration);overflow-wrap:break-word;z-index:9999;display:flex;position:fixed;overflow:hidden}.el-notification.right{right:16px}.el-notification.left{left:16px}.el-notification__group{min-width:0;margin-left:var(--el-notification-group-margin-left);margin-right:var(--el-notification-group-margin-right);flex:1}.el-notification__title{font-weight:700;font-size:var(--el-notification-title-font-size);line-height:var(--el-notification-icon-size);color:var(--el-notification-title-color);margin:0}.el-notification__content{font-size:var(--el-notification-content-font-size);color:var(--el-notification-content-color);margin:6px 0 0;line-height:24px}.el-notification__content p{margin:0}.el-notification .el-notification__icon{height:var(--el-notification-icon-size);width:var(--el-notification-icon-size);font-size:var(--el-notification-icon-size);flex-shrink:0}.el-notification .el-notification__closeBtn{cursor:pointer;color:var(--el-notification-close-color);font-size:var(--el-notification-close-font-size);position:absolute;top:18px;right:15px}.el-notification .el-notification__closeBtn:hover{color:var(--el-notification-close-hover-color)}.el-notification .el-notification--primary{--el-notification-icon-color:var(--el-color-primary);color:var(--el-notification-icon-color)}.el-notification .el-notification--success{--el-notification-icon-color:var(--el-color-success);color:var(--el-notification-icon-color)}.el-notification .el-notification--info{--el-notification-icon-color:var(--el-color-info);color:var(--el-notification-icon-color)}.el-notification .el-notification--warning{--el-notification-icon-color:var(--el-color-warning);color:var(--el-notification-icon-color)}.el-notification .el-notification--error{--el-notification-icon-color:var(--el-color-error);color:var(--el-notification-icon-color)}.el-notification-fade-enter-from.right{right:0;transform:translate(100%)}.el-notification-fade-enter-from.left{left:0;transform:translate(-100%)}.el-notification-fade-leave-to{opacity:0}.el-overlay{z-index:2000;background-color:var(--el-overlay-color-lighter);height:100%;position:fixed;top:0;bottom:0;left:0;right:0;overflow:auto}.el-overlay .el-overlay-root{height:0}.el-page-header.is-contentful .el-page-header__main{border-top:1px solid var(--el-border-color-light);margin-top:16px}.el-page-header__header{justify-content:space-between;align-items:center;line-height:24px;display:flex}.el-page-header__left{align-items:center;margin-right:40px;display:flex;position:relative}.el-page-header__back{cursor:pointer;align-items:center;display:flex}.el-page-header__left .el-divider--vertical{margin:0 16px}.el-page-header__icon{align-items:center;margin-right:10px;font-size:16px;display:flex}.el-page-header__icon .el-icon{font-size:inherit}.el-page-header__title{font-size:14px;font-weight:500}.el-page-header__content{color:var(--el-text-color-primary);font-size:18px}.el-page-header__breadcrumb{margin-bottom:16px}.el-pagination{--el-pagination-font-size:14px;--el-pagination-bg-color:var(--el-fill-color-blank);--el-pagination-text-color:var(--el-text-color-primary);--el-pagination-border-radius:2px;--el-pagination-button-color:var(--el-text-color-primary);--el-pagination-button-width:32px;--el-pagination-button-height:32px;--el-pagination-button-disabled-color:var(--el-text-color-placeholder);--el-pagination-button-disabled-bg-color:var(--el-fill-color-blank);--el-pagination-button-bg-color:var(--el-fill-color);--el-pagination-hover-color:var(--el-color-primary);--el-pagination-font-size-small:12px;--el-pagination-button-width-small:24px;--el-pagination-button-height-small:24px;--el-pagination-button-width-large:40px;--el-pagination-button-height-large:40px;--el-pagination-item-gap:16px;white-space:nowrap;color:var(--el-pagination-text-color);font-size:var(--el-pagination-font-size);align-items:center;font-weight:400;display:flex}.el-pagination .el-input__inner{text-align:center;-moz-appearance:textfield}.el-pagination .el-select{width:128px}.el-pagination .btn-prev,.el-pagination .btn-next{font-size:var(--el-pagination-font-size);min-width:var(--el-pagination-button-width);height:var(--el-pagination-button-height);line-height:var(--el-pagination-button-height);color:var(--el-pagination-button-color);background:var(--el-pagination-bg-color);border-radius:var(--el-pagination-border-radius);cursor:pointer;text-align:center;box-sizing:border-box;border:none;justify-content:center;align-items:center;padding:0 4px;display:flex}.el-pagination .btn-prev *,.el-pagination .btn-next *{pointer-events:none}.el-pagination .btn-prev:focus,.el-pagination .btn-next:focus{outline:none}.el-pagination .btn-prev:hover,.el-pagination .btn-next:hover{color:var(--el-pagination-hover-color)}.el-pagination .btn-prev.is-active,.el-pagination .btn-next.is-active{color:var(--el-pagination-hover-color);cursor:default;font-weight:700}.el-pagination .btn-prev.is-active.is-disabled,.el-pagination .btn-next.is-active.is-disabled{color:var(--el-text-color-secondary);font-weight:700}.el-pagination .btn-prev:disabled,.el-pagination .btn-prev.is-disabled,.el-pagination .btn-next:disabled,.el-pagination .btn-next.is-disabled{color:var(--el-pagination-button-disabled-color);background-color:var(--el-pagination-button-disabled-bg-color);cursor:not-allowed}.el-pagination .btn-prev:focus-visible{outline:1px solid var(--el-pagination-hover-color);outline-offset:-1px}.el-pagination .btn-next:focus-visible{outline:1px solid var(--el-pagination-hover-color);outline-offset:-1px}.el-pagination .btn-prev .el-icon,.el-pagination .btn-next .el-icon{width:inherit;font-size:12px;font-weight:700;display:block}.el-pagination>.is-first{margin-left:0!important}.el-pagination>.is-last{margin-right:0!important}.el-pagination .btn-prev{margin-left:var(--el-pagination-item-gap)}.el-pagination__sizes,.el-pagination__total{margin-left:var(--el-pagination-item-gap);color:var(--el-text-color-regular);font-weight:400}.el-pagination__total[disabled=true]{color:var(--el-text-color-placeholder)}.el-pagination__jump{margin-left:var(--el-pagination-item-gap);color:var(--el-text-color-regular);align-items:center;font-weight:400;display:flex}.el-pagination__jump[disabled=true]{color:var(--el-text-color-placeholder)}.el-pagination__goto{margin-right:8px}.el-pagination__editor{text-align:center;box-sizing:border-box}.el-pagination__editor.el-input{width:56px}.el-pagination__editor .el-input__inner::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.el-pagination__editor .el-input__inner::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.el-pagination__classifier{margin-left:8px}.el-pagination__rightwrapper{flex:1;justify-content:flex-end;align-items:center;display:flex}.el-pagination.is-background .btn-prev,.el-pagination.is-background .btn-next,.el-pagination.is-background .el-pager li{background-color:var(--el-pagination-button-bg-color);margin:0 4px}.el-pagination.is-background .btn-prev.is-active,.el-pagination.is-background .btn-next.is-active,.el-pagination.is-background .el-pager li.is-active{background-color:var(--el-color-primary);color:var(--el-color-white)}.el-pagination.is-background .btn-prev:disabled,.el-pagination.is-background .btn-prev.is-disabled,.el-pagination.is-background .btn-next:disabled,.el-pagination.is-background .btn-next.is-disabled,.el-pagination.is-background .el-pager li:disabled,.el-pagination.is-background .el-pager li.is-disabled{color:var(--el-text-color-placeholder);background-color:var(--el-disabled-bg-color)}.el-pagination.is-background .btn-prev:disabled.is-active,.el-pagination.is-background .btn-prev.is-disabled.is-active,.el-pagination.is-background .btn-next:disabled.is-active,.el-pagination.is-background .btn-next.is-disabled.is-active,.el-pagination.is-background .el-pager li:disabled.is-active,.el-pagination.is-background .el-pager li.is-disabled.is-active{color:var(--el-text-color-secondary);background-color:var(--el-fill-color-dark)}.el-pagination.is-background .btn-prev{margin-left:var(--el-pagination-item-gap)}.el-pagination--small .btn-prev,.el-pagination--small .btn-next,.el-pagination--small .el-pager li{height:var(--el-pagination-button-height-small);line-height:var(--el-pagination-button-height-small);font-size:var(--el-pagination-font-size-small);min-width:var(--el-pagination-button-width-small)}.el-pagination--small span:not([class*=suffix]),.el-pagination--small button{font-size:var(--el-pagination-font-size-small)}.el-pagination--small .el-select{width:100px}.el-pagination--large .btn-prev,.el-pagination--large .btn-next,.el-pagination--large .el-pager li{height:var(--el-pagination-button-height-large);line-height:var(--el-pagination-button-height-large);min-width:var(--el-pagination-button-width-large)}.el-pagination--large .el-select .el-input{width:160px}.el-pager{-webkit-user-select:none;user-select:none;align-items:center;margin:0;padding:0;font-size:0;list-style:none;display:flex}.el-pager li{font-size:var(--el-pagination-font-size);min-width:var(--el-pagination-button-width);height:var(--el-pagination-button-height);line-height:var(--el-pagination-button-height);color:var(--el-pagination-button-color);background:var(--el-pagination-bg-color);border-radius:var(--el-pagination-border-radius);cursor:pointer;text-align:center;box-sizing:border-box;border:none;justify-content:center;align-items:center;padding:0 4px;display:flex}.el-pager li *{pointer-events:none}.el-pager li:focus{outline:none}.el-pager li:hover{color:var(--el-pagination-hover-color)}.el-pager li.is-active{color:var(--el-pagination-hover-color);cursor:default;font-weight:700}.el-pager li.is-active.is-disabled{color:var(--el-text-color-secondary);font-weight:700}.el-pager li:disabled,.el-pager li.is-disabled{color:var(--el-pagination-button-disabled-color);background-color:var(--el-pagination-button-disabled-bg-color);cursor:not-allowed}.el-pager li:focus-visible{outline:1px solid var(--el-pagination-hover-color);outline-offset:-1px}.el-popconfirm{outline:none}.el-popconfirm__main{align-items:center;display:flex}.el-popconfirm__icon{margin-right:5px}.el-popconfirm__action{text-align:right;margin-top:8px}.el-popover{--el-popover-bg-color:var(--el-bg-color-overlay);--el-popover-font-size:var(--el-font-size-base);--el-popover-border-color:var(--el-border-color-lighter);--el-popover-padding:12px;--el-popover-padding-large:18px 20px;--el-popover-title-font-size:16px;--el-popover-title-text-color:var(--el-text-color-primary);--el-popover-border-radius:4px}.el-popover.el-popper{background:var(--el-popover-bg-color);border-radius:var(--el-popover-border-radius);border:1px solid var(--el-popover-border-color);min-width:150px;padding:var(--el-popover-padding);z-index:var(--el-index-popper);color:var(--el-text-color-regular);line-height:1.4;font-size:var(--el-popover-font-size);box-shadow:var(--el-box-shadow-light);overflow-wrap:break-word;box-sizing:border-box}.el-popover.el-popper--plain{padding:var(--el-popover-padding-large)}.el-popover__title{color:var(--el-popover-title-text-color);font-size:var(--el-popover-title-font-size);margin-bottom:12px;line-height:1}.el-popover__reference:focus:not(.focusing),.el-popover__reference:focus:hover{outline-width:0}.el-popover.el-popper.is-dark{--el-popover-bg-color:var(--el-text-color-primary);--el-popover-border-color:var(--el-text-color-primary);--el-popover-title-text-color:var(--el-bg-color);color:var(--el-bg-color)}.el-popover.el-popper:focus:active,.el-popover.el-popper:focus{outline-width:0}.el-progress{align-items:center;line-height:1;display:flex;position:relative}.el-progress__text{color:var(--el-text-color-regular);min-width:50px;margin-left:5px;font-size:14px;line-height:1}.el-progress__text i{vertical-align:middle;display:block}.el-progress--circle,.el-progress--dashboard{display:inline-block}.el-progress--circle .el-progress__text,.el-progress--dashboard .el-progress__text{text-align:center;width:100%;margin:0;position:absolute;top:50%;left:0;transform:translateY(-50%)}.el-progress--circle .el-progress__text i,.el-progress--dashboard .el-progress__text i{vertical-align:middle;display:inline-block}.el-progress--without-text .el-progress__text{display:none}.el-progress--without-text .el-progress-bar{margin-right:0;padding-right:0;display:block}.el-progress--text-inside .el-progress-bar{margin-right:0;padding-right:0}.el-progress.is-success .el-progress-bar__inner{background-color:var(--el-color-success)}.el-progress.is-success .el-progress__text{color:var(--el-color-success)}.el-progress.is-warning .el-progress-bar__inner{background-color:var(--el-color-warning)}.el-progress.is-warning .el-progress__text{color:var(--el-color-warning)}.el-progress.is-exception .el-progress-bar__inner{background-color:var(--el-color-danger)}.el-progress.is-exception .el-progress__text{color:var(--el-color-danger)}.el-progress-bar{box-sizing:border-box;flex-grow:1}.el-progress-bar__outer{background-color:var(--el-border-color-lighter);vertical-align:middle;border-radius:100px;height:6px;position:relative;overflow:hidden}.el-progress-bar__inner{background-color:var(--el-color-primary);text-align:right;white-space:nowrap;border-radius:100px;height:100%;line-height:1;transition:width .6s;position:absolute;top:0;left:0}.el-progress-bar__inner:after{content:"";vertical-align:middle;height:100%;display:inline-block}.el-progress-bar__inner--indeterminate{animation:3s infinite indeterminate;transform:translateZ(0)}.el-progress-bar__inner--striped{background-image:linear-gradient(45deg,#0000001a 25%,#0000 25%,#0000 50%,#0000001a 50%,#0000001a 75%,#0000 75%,#0000);background-size:1.25em 1.25em}.el-progress-bar__inner--striped.el-progress-bar__inner--striped-flow{animation:3s linear infinite striped-flow}.el-progress-bar__innerText{vertical-align:middle;color:#fff;margin:0 5px;font-size:12px;display:inline-block}@keyframes progress{0%{background-position:0 0}to{background-position:32px 0}}@keyframes indeterminate{0%{left:-100%}to{left:100%}}@keyframes striped-flow{0%{background-position:-100%}to{background-position:100%}}.el-radio-button{--el-radio-button-checked-bg-color:var(--el-color-primary);--el-radio-button-checked-text-color:var(--el-color-white);--el-radio-button-checked-border-color:var(--el-color-primary);--el-radio-button-disabled-checked-fill:var(--el-border-color-extra-light);outline:none;display:inline-block;position:relative}.el-radio-button__inner{white-space:nowrap;vertical-align:middle;background:var(--el-button-bg-color,var(--el-fill-color-blank));outline:var(--el-border);line-height:1;font-weight:var(--el-button-font-weight,var(--el-font-weight-primary));color:var(--el-button-text-color,var(--el-text-color-regular));-webkit-appearance:none;text-align:center;box-sizing:border-box;cursor:pointer;transition:var(--el-transition-all);-webkit-user-select:none;user-select:none;font-size:var(--el-font-size-base);border-radius:0;margin:0;padding:8px 15px;display:inline-block;position:relative}.el-radio-button__inner.is-round{padding:8px 15px}.el-radio-button__inner:hover{color:var(--el-color-primary)}.el-radio-button__inner [class*=el-icon-]{line-height:.9}.el-radio-button__inner [class*=el-icon-]+span{margin-left:5px}.el-radio-button:first-child .el-radio-button__inner{border-radius:var(--el-border-radius-base) 0 0 var(--el-border-radius-base);box-shadow:none!important}.el-radio-button.is-active .el-radio-button__original-radio:not(:disabled)+.el-radio-button__inner{color:var(--el-radio-button-checked-text-color,var(--el-color-white));background-color:var(--el-radio-button-checked-bg-color,var(--el-color-primary));border-color:var(--el-radio-button-checked-border-color,var(--el-color-primary));box-shadow:-1px 0 0 0 var(--el-radio-button-checked-border-color,var(--el-color-primary))}.el-radio-button__original-radio{opacity:0;z-index:-1;outline:none;position:absolute}.el-radio-button__original-radio:focus-visible+.el-radio-button__inner{border-left:var(--el-border);border-left-color:var(--el-radio-button-checked-border-color,var(--el-color-primary));outline:2px solid var(--el-radio-button-checked-border-color);outline-offset:1px;z-index:2;border-radius:var(--el-border-radius-base);box-shadow:none}.el-radio-button__original-radio:disabled+.el-radio-button__inner{color:var(--el-disabled-text-color);cursor:not-allowed;background-image:none;background-color:var(--el-button-disabled-bg-color,var(--el-fill-color-blank));border-color:var(--el-button-disabled-border-color,var(--el-border-color-light));box-shadow:none}.el-radio-button__original-radio:disabled:checked+.el-radio-button__inner{background-color:var(--el-radio-button-disabled-checked-fill)}.el-radio-button:last-child .el-radio-button__inner{border-radius:0 var(--el-border-radius-base) var(--el-border-radius-base) 0}.el-radio-button:first-child:last-child .el-radio-button__inner{border-radius:var(--el-border-radius-base)}.el-radio-button--large .el-radio-button__inner{font-size:var(--el-font-size-base);border-radius:0;padding:12px 19px}.el-radio-button--large .el-radio-button__inner.is-round{padding:12px 19px}.el-radio-button--small .el-radio-button__inner{border-radius:0;padding:5px 11px;font-size:12px}.el-radio-button--small .el-radio-button__inner.is-round{padding:5px 11px}.el-radio-group{flex-wrap:wrap;align-items:center;font-size:0;display:inline-flex}.el-radio{--el-radio-font-size:var(--el-font-size-base);--el-radio-text-color:var(--el-text-color-regular);--el-radio-font-weight:var(--el-font-weight-primary);--el-radio-input-height:14px;--el-radio-input-width:14px;--el-radio-input-border-radius:var(--el-border-radius-circle);--el-radio-input-bg-color:var(--el-fill-color-blank);--el-radio-input-border:var(--el-border);--el-radio-input-border-color:var(--el-border-color);--el-radio-input-border-color-hover:var(--el-color-primary);color:var(--el-radio-text-color);font-weight:var(--el-radio-font-weight);cursor:pointer;white-space:nowrap;font-size:var(--el-font-size-base);-webkit-user-select:none;user-select:none;outline:none;align-items:center;height:32px;margin-right:30px;display:inline-flex;position:relative}.el-radio.el-radio--large{height:40px}.el-radio.el-radio--small{height:24px}.el-radio.is-bordered{border-radius:var(--el-border-radius-base);border:var(--el-border);box-sizing:border-box;padding:0 15px 0 9px}.el-radio.is-bordered.is-checked{border-color:var(--el-color-primary)}.el-radio.is-bordered.is-disabled{cursor:not-allowed;border-color:var(--el-border-color-lighter)}.el-radio.is-bordered.el-radio--large{border-radius:var(--el-border-radius-base);padding:0 19px 0 11px}.el-radio.is-bordered.el-radio--large .el-radio__label{font-size:var(--el-font-size-base)}.el-radio.is-bordered.el-radio--large .el-radio__inner{width:14px;height:14px}.el-radio.is-bordered.el-radio--small{border-radius:var(--el-border-radius-base);padding:0 11px 0 7px}.el-radio.is-bordered.el-radio--small .el-radio__label{font-size:12px}.el-radio.is-bordered.el-radio--small .el-radio__inner{width:12px;height:12px}.el-radio:last-child{margin-right:0}.el-radio__input{white-space:nowrap;cursor:pointer;vertical-align:middle;outline:none;display:inline-flex;position:relative}.el-radio__input.is-disabled .el-radio__inner{background-color:var(--el-disabled-bg-color);border-color:var(--el-disabled-border-color);cursor:not-allowed}.el-radio__input.is-disabled .el-radio__inner:after{cursor:not-allowed;background-color:var(--el-disabled-bg-color)}.el-radio__input.is-disabled .el-radio__inner+.el-radio__label{cursor:not-allowed}.el-radio__input.is-disabled.is-checked .el-radio__inner{background-color:var(--el-disabled-bg-color);border-color:var(--el-disabled-border-color)}.el-radio__input.is-disabled.is-checked .el-radio__inner:after{background-color:var(--el-text-color-placeholder)}.el-radio__input.is-disabled+span.el-radio__label{color:var(--el-text-color-placeholder);cursor:not-allowed}.el-radio__input.is-checked .el-radio__inner{border-color:var(--el-color-primary);background:var(--el-color-primary)}.el-radio__input.is-checked .el-radio__inner:after{background-color:var(--el-color-white);transform:translate(-50%,-50%)scale(1)}.el-radio__input.is-checked+.el-radio__label{color:var(--el-color-primary)}.el-radio__input.is-focus .el-radio__inner{border-color:var(--el-radio-input-border-color-hover)}.el-radio__inner{border:var(--el-radio-input-border);border-radius:var(--el-radio-input-border-radius);width:var(--el-radio-input-width);height:var(--el-radio-input-height);background-color:var(--el-radio-input-bg-color);cursor:pointer;box-sizing:border-box;transition:all .3s;display:inline-block;position:relative}.el-radio__inner:hover{border-color:var(--el-radio-input-border-color-hover)}.el-radio__inner:after{border-radius:var(--el-radio-input-border-radius);content:"";width:4px;height:4px;transition:transform .15s ease-in;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)scale(0)}.el-radio__original{opacity:0;z-index:-1;outline:none;margin:0;position:absolute;top:0;bottom:0;left:0;right:0}.el-radio__original:focus-visible+.el-radio__inner{outline:2px solid var(--el-radio-input-border-color-hover);outline-offset:1px;border-radius:var(--el-radio-input-border-radius)}.el-radio:focus:not(:focus-visible):not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner{box-shadow:0 0 2px 2px var(--el-radio-input-border-color-hover)}.el-radio__label{font-size:var(--el-radio-font-size);padding-left:8px}.el-radio.el-radio--large .el-radio__label{font-size:14px}.el-radio.el-radio--large .el-radio__inner{width:14px;height:14px}.el-radio.el-radio--small .el-radio__label{font-size:12px}.el-radio.el-radio--small .el-radio__inner{width:12px;height:12px}.el-rate{--el-rate-height:20px;--el-rate-font-size:var(--el-font-size-base);--el-rate-icon-size:18px;--el-rate-icon-margin:6px;--el-rate-void-color:var(--el-border-color-darker);--el-rate-fill-color:#f7ba2a;--el-rate-disabled-void-color:var(--el-fill-color);--el-rate-text-color:var(--el-text-color-primary);--el-rate-outline-color:var(--el-color-primary-light-5);align-items:center;height:32px;display:inline-flex}.el-rate:focus,.el-rate:active{outline:none}.el-rate:focus-visible .el-rate__item .el-rate__icon.is-focus-visible{outline:2px solid var(--el-rate-outline-color);transition:outline-offset,outline}.el-rate__item{cursor:pointer;vertical-align:middle;color:var(--el-rate-void-color);font-size:0;line-height:normal;display:inline-block;position:relative}.el-rate .el-rate__icon{font-size:var(--el-rate-icon-size);margin-right:var(--el-rate-icon-margin);transition:var(--el-transition-duration);display:inline-block;position:relative}.el-rate .el-rate__icon.hover{transform:scale(1.15)}.el-rate .el-rate__icon .path2{position:absolute;top:0;left:0}.el-rate .el-rate__icon.is-active{color:var(--el-rate-fill-color)}.el-rate__decimal{color:var(--el-rate-fill-color);display:inline-block;position:absolute;top:0;left:0;overflow:hidden}.el-rate__decimal--box{position:absolute;top:0;left:0}.el-rate__text{font-size:var(--el-rate-font-size);vertical-align:middle;color:var(--el-rate-text-color)}.el-rate--large{height:40px}.el-rate--small{height:24px}.el-rate--small .el-rate__icon{font-size:14px}.el-rate.is-disabled .el-rate__item{cursor:not-allowed;color:var(--el-rate-disabled-void-color)}.el-result{--el-result-padding:40px 30px;--el-result-icon-font-size:64px;--el-result-title-font-size:20px;--el-result-title-margin-top:20px;--el-result-subtitle-margin-top:10px;--el-result-extra-margin-top:30px;text-align:center;box-sizing:border-box;padding:var(--el-result-padding);flex-direction:column;justify-content:center;align-items:center;display:flex}.el-result__icon svg{width:var(--el-result-icon-font-size);height:var(--el-result-icon-font-size)}.el-result__title{margin-top:var(--el-result-title-margin-top)}.el-result__title p{font-size:var(--el-result-title-font-size);color:var(--el-text-color-primary);margin:0;line-height:1.3}.el-result__subtitle{margin-top:var(--el-result-subtitle-margin-top)}.el-result__subtitle p{font-size:var(--el-font-size-base);color:var(--el-text-color-regular);margin:0;line-height:1.3}.el-result__extra{margin-top:var(--el-result-extra-margin-top)}.el-result .icon-primary{--el-result-color:var(--el-color-primary);color:var(--el-result-color)}.el-result .icon-success{--el-result-color:var(--el-color-success);color:var(--el-result-color)}.el-result .icon-warning{--el-result-color:var(--el-color-warning);color:var(--el-result-color)}.el-result .icon-danger{--el-result-color:var(--el-color-danger);color:var(--el-result-color)}.el-result .icon-error{--el-result-color:var(--el-color-error);color:var(--el-result-color)}.el-result .icon-info{--el-result-color:var(--el-color-info);color:var(--el-result-color)}.el-row{box-sizing:border-box;flex-wrap:wrap;display:flex;position:relative}.el-row.is-justify-center{justify-content:center}.el-row.is-justify-end{justify-content:flex-end}.el-row.is-justify-space-between{justify-content:space-between}.el-row.is-justify-space-around{justify-content:space-around}.el-row.is-justify-space-evenly{justify-content:space-evenly}.el-row.is-align-top{align-items:flex-start}.el-row.is-align-middle{align-items:center}.el-row.is-align-bottom{align-items:flex-end}.el-scrollbar{--el-scrollbar-opacity:.3;--el-scrollbar-bg-color:var(--el-text-color-secondary);--el-scrollbar-hover-opacity:.5;--el-scrollbar-hover-bg-color:var(--el-text-color-secondary);height:100%;position:relative;overflow:hidden}.el-scrollbar__wrap{height:100%;overflow:auto}.el-scrollbar__wrap--hidden-default{scrollbar-width:none}.el-scrollbar__wrap--hidden-default::-webkit-scrollbar{display:none}.el-scrollbar__thumb{cursor:pointer;border-radius:inherit;background-color:var(--el-scrollbar-bg-color,var(--el-text-color-secondary));width:0;height:0;transition:var(--el-transition-duration) background-color;opacity:var(--el-scrollbar-opacity,.3);display:block;position:relative}.el-scrollbar__thumb:hover{background-color:var(--el-scrollbar-hover-bg-color,var(--el-text-color-secondary));opacity:var(--el-scrollbar-hover-opacity,.5)}.el-scrollbar__bar{z-index:1;border-radius:4px;position:absolute;bottom:2px;right:2px}.el-scrollbar__bar.is-vertical{width:6px;top:2px}.el-scrollbar__bar.is-vertical>div{width:100%}.el-scrollbar__bar.is-horizontal{height:6px;left:2px}.el-scrollbar__bar.is-horizontal>div{height:100%}.el-scrollbar-fade-enter-active{transition:opacity .34s ease-out}.el-scrollbar-fade-leave-active{transition:opacity .12s ease-out}.el-scrollbar-fade-enter-from,.el-scrollbar-fade-leave-active{opacity:0}.el-select-dropdown{z-index:calc(var(--el-index-top) + 1);border-radius:var(--el-border-radius-base);box-sizing:border-box}.el-select-dropdown .el-scrollbar.is-empty .el-select-dropdown__list{padding:0}.el-select-dropdown__loading,.el-select-dropdown__empty{text-align:center;color:var(--el-text-color-secondary);font-size:var(--el-select-font-size);margin:0;padding:10px 0}.el-select-dropdown__wrap{max-height:274px}.el-select-dropdown__list{box-sizing:border-box;margin:0;padding:6px 0;list-style:none}.el-select-dropdown__list.el-vl__window{margin:6px 0;padding:0}.el-select-dropdown__header{border-bottom:1px solid var(--el-border-color-light);padding:10px}.el-select-dropdown__footer{border-top:1px solid var(--el-border-color-light);padding:10px}.el-select-dropdown__item{font-size:var(--el-font-size-base);white-space:nowrap;text-overflow:ellipsis;color:var(--el-text-color-regular);box-sizing:border-box;cursor:pointer;height:34px;padding:0 32px 0 20px;line-height:34px;position:relative;overflow:hidden}.el-select-dropdown__item.is-hovering{background-color:var(--el-fill-color-light)}.el-select-dropdown__item.is-selected{color:var(--el-color-primary);font-weight:700}.el-select-dropdown__item.is-disabled{color:var(--el-text-color-placeholder);cursor:not-allowed;background-color:unset}.el-select-dropdown.is-multiple .el-select-dropdown__item.is-selected:after{content:"";background-position:50%;background-repeat:no-repeat;background-color:var(--el-color-primary);-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg class='icon' width='200' height='200' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='M406.656 706.944L195.84 496.256a32 32 0 10-45.248 45.248l256 256 512-512a32 32 0 00-45.248-45.248L406.592 706.944z'%3E%3C/path%3E%3C/svg%3E") 0 0/100% 100% no-repeat;mask:url("data:image/svg+xml;utf8,%3Csvg class='icon' width='200' height='200' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='M406.656 706.944L195.84 496.256a32 32 0 10-45.248 45.248l256 256 512-512a32 32 0 00-45.248-45.248L406.592 706.944z'%3E%3C/path%3E%3C/svg%3E") 0 0/100% 100% no-repeat;border-top:none;border-right:none;width:12px;height:12px;position:absolute;top:50%;right:20px;transform:translateY(-50%);-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg class='icon' width='200' height='200' viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='M406.656 706.944L195.84 496.256a32 32 0 10-45.248 45.248l256 256 512-512a32 32 0 00-45.248-45.248L406.592 706.944z'%3E%3C/path%3E%3C/svg%3E") 0 0/100% 100% no-repeat}.el-select-dropdown.is-multiple .el-select-dropdown__item.is-disabled:after{background-color:var(--el-text-color-placeholder)}.el-select-group{margin:0;padding:0}.el-select-group__wrap{margin:0;padding:0;list-style:none;position:relative}.el-select-group__title{box-sizing:border-box;color:var(--el-color-info);text-overflow:ellipsis;white-space:nowrap;padding:0 20px;font-size:12px;line-height:34px;overflow:hidden}.el-select-group .el-select-dropdown__item{padding-left:20px}.el-select{--el-select-border-color-hover:var(--el-border-color-hover);--el-select-disabled-color:var(--el-disabled-text-color);--el-select-disabled-border:var(--el-disabled-border-color);--el-select-font-size:var(--el-font-size-base);--el-select-close-hover-color:var(--el-text-color-secondary);--el-select-input-color:var(--el-text-color-placeholder);--el-select-multiple-input-color:var(--el-text-color-regular);--el-select-input-focus-border-color:var(--el-color-primary);--el-select-input-font-size:14px;--el-select-width:100%;vertical-align:middle;width:var(--el-select-width);display:inline-block;position:relative}.el-select__wrapper{box-sizing:border-box;cursor:pointer;text-align:left;border-radius:var(--el-border-radius-base);background-color:var(--el-fill-color-blank);min-height:32px;transition:var(--el-transition-duration);box-shadow:0 0 0 1px var(--el-border-color) inset;align-items:center;gap:6px;padding:4px 12px;font-size:14px;line-height:24px;display:flex;position:relative;transform:translate(0)}.el-select__wrapper.is-filterable{cursor:text}.el-select__wrapper.is-focused{box-shadow:0 0 0 1px var(--el-color-primary) inset}.el-select__wrapper.is-hovering:not(.is-focused){box-shadow:0 0 0 1px var(--el-border-color-hover) inset}.el-select__wrapper.is-disabled{cursor:not-allowed;background-color:var(--el-fill-color-light);color:var(--el-text-color-placeholder);box-shadow:0 0 0 1px var(--el-select-disabled-border) inset}.el-select__wrapper.is-disabled:hover{box-shadow:0 0 0 1px var(--el-select-disabled-border) inset}.el-select__wrapper.is-disabled.is-focus{box-shadow:0 0 0 1px var(--el-input-focus-border-color) inset}.el-select__wrapper.is-disabled .el-select__selected-item{color:var(--el-select-disabled-color)}.el-select__wrapper.is-disabled .el-select__caret,.el-select__wrapper.is-disabled .el-tag,.el-select__wrapper.is-disabled input{cursor:not-allowed}.el-select__wrapper.is-disabled .el-select__prefix,.el-select__wrapper.is-disabled .el-select__suffix{pointer-events:none}.el-select__prefix,.el-select__suffix{color:var(--el-input-icon-color,var(--el-text-color-placeholder));flex-shrink:0;align-items:center;gap:6px;display:flex}.el-select__caret{color:var(--el-select-input-color);font-size:var(--el-select-input-font-size);transition:var(--el-transition-duration);cursor:pointer;transform:rotate(0)}.el-select__caret.is-reverse{transform:rotate(180deg)}.el-select__clear{cursor:pointer}.el-select__clear:hover{color:var(--el-select-close-hover-color)}.el-select__selection{flex-wrap:wrap;flex:1;align-items:center;gap:6px;min-width:0;display:flex;position:relative}.el-select__selection.is-near{margin-left:-8px}.el-select__selection .el-tag{cursor:pointer;border-color:#0000}.el-select__selection .el-tag.el-tag--plain{border-color:var(--el-tag-border-color)}.el-select__selection .el-tag .el-tag__content{min-width:0}.el-select__selected-item{-webkit-user-select:none;user-select:none;flex-wrap:wrap;display:flex}.el-select__tags-text{text-overflow:ellipsis;white-space:nowrap;line-height:normal;display:block;overflow:hidden}.el-select__placeholder{z-index:-1;text-overflow:ellipsis;white-space:nowrap;width:100%;color:var(--el-input-text-color,var(--el-text-color-regular));display:block;position:absolute;top:50%;overflow:hidden;transform:translateY(-50%)}.el-select__placeholder.is-transparent{-webkit-user-select:none;user-select:none;color:var(--el-text-color-placeholder)}.el-select__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light);box-shadow:var(--el-box-shadow-light)}.el-select__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-border-color-light)}.el-select__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-top-color:#0000;border-left-color:#0000}.el-select__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:#0000;border-right-color:#0000}.el-select__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:#0000;border-left-color:#0000}.el-select__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-top-color:#0000;border-right-color:#0000}.el-select__input-wrapper{flex:1}.el-select__input-wrapper.is-hidden{opacity:0;z-index:-1;position:absolute}.el-select__input{color:var(--el-select-multiple-input-color);font-size:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#0000;border:none;outline:none;width:100%;height:24px;padding:0;font-family:inherit}.el-select__input-calculator{visibility:hidden;white-space:pre;max-width:100%;position:absolute;top:0;left:0;overflow:hidden}.el-select--large .el-select__wrapper{gap:6px;min-height:40px;padding:8px 16px;font-size:14px;line-height:24px}.el-select--large .el-select__selection{gap:6px}.el-select--large .el-select__selection.is-near{margin-left:-8px}.el-select--large .el-select__prefix,.el-select--large .el-select__suffix{gap:6px}.el-select--large .el-select__input{height:24px}.el-select--small .el-select__wrapper{gap:4px;min-height:24px;padding:2px 8px;font-size:12px;line-height:20px}.el-select--small .el-select__selection{gap:4px}.el-select--small .el-select__selection.is-near{margin-left:-6px}.el-select--small .el-select__prefix,.el-select--small .el-select__suffix{gap:4px}.el-select--small .el-select__input{height:20px}.el-skeleton{--el-skeleton-circle-size:var(--el-avatar-size)}.el-skeleton__item{background:var(--el-skeleton-color);border-radius:var(--el-border-radius-base);width:100%;height:16px;display:inline-block}.el-skeleton__circle{width:var(--el-skeleton-circle-size);height:var(--el-skeleton-circle-size);line-height:var(--el-skeleton-circle-size);border-radius:50%}.el-skeleton__button{border-radius:4px;width:64px;height:40px}.el-skeleton__p{width:100%}.el-skeleton__p.is-last{width:61%}.el-skeleton__p.is-first{width:33%}.el-skeleton__text{width:100%;height:var(--el-font-size-small)}.el-skeleton__caption{height:var(--el-font-size-extra-small)}.el-skeleton__h1{height:var(--el-font-size-extra-large)}.el-skeleton__h3{height:var(--el-font-size-large)}.el-skeleton__h5{height:var(--el-font-size-medium)}.el-skeleton__image{width:unset;border-radius:0;justify-content:center;align-items:center;display:flex}.el-skeleton__image svg{color:var(--el-svg-monochrome-grey);fill:currentColor;width:22%;height:22%}.el-skeleton{--el-skeleton-color:var(--el-fill-color);--el-skeleton-to-color:var(--el-fill-color-darker)}@keyframes el-skeleton-loading{0%{background-position:100%}to{background-position:0}}.el-skeleton{width:100%}.el-skeleton__first-line,.el-skeleton__paragraph{background:var(--el-skeleton-color);height:16px;margin-top:16px}.el-skeleton.is-animated .el-skeleton__item{background:linear-gradient(90deg,var(--el-skeleton-color) 25%,var(--el-skeleton-to-color) 37%,var(--el-skeleton-color) 63%);background-size:400% 100%;animation:1.4s infinite el-skeleton-loading}.el-slider{--el-slider-main-bg-color:var(--el-color-primary);--el-slider-runway-bg-color:var(--el-border-color-light);--el-slider-stop-bg-color:var(--el-color-white);--el-slider-disabled-color:var(--el-text-color-placeholder);--el-slider-border-radius:3px;--el-slider-height:6px;--el-slider-button-size:20px;--el-slider-button-wrapper-size:36px;--el-slider-button-wrapper-offset:-15px;align-items:center;width:100%;height:32px;display:flex}.el-slider__runway{height:var(--el-slider-height);background-color:var(--el-slider-runway-bg-color);border-radius:var(--el-slider-border-radius);cursor:pointer;flex:1;position:relative}.el-slider__runway.show-input{width:auto;margin-right:30px}.el-slider__runway.is-disabled{cursor:default}.el-slider__runway.is-disabled .el-slider__bar{background-color:var(--el-slider-disabled-color)}.el-slider__runway.is-disabled .el-slider__button{border-color:var(--el-slider-disabled-color)}.el-slider__runway.is-disabled .el-slider__button-wrapper:hover,.el-slider__runway.is-disabled .el-slider__button-wrapper.hover,.el-slider__runway.is-disabled .el-slider__button-wrapper.dragging{cursor:not-allowed}.el-slider__runway.is-disabled .el-slider__button:hover,.el-slider__runway.is-disabled .el-slider__button.hover,.el-slider__runway.is-disabled .el-slider__button.dragging{cursor:not-allowed;transform:scale(1)}.el-slider__input{flex-shrink:0;width:130px}.el-slider__bar{height:var(--el-slider-height);background-color:var(--el-slider-main-bg-color);border-top-left-radius:var(--el-slider-border-radius);border-bottom-left-radius:var(--el-slider-border-radius);position:absolute}.el-slider__button-wrapper{height:var(--el-slider-button-wrapper-size);width:var(--el-slider-button-wrapper-size);z-index:1;top:var(--el-slider-button-wrapper-offset);text-align:center;-webkit-user-select:none;user-select:none;background-color:#0000;outline:none;line-height:normal;position:absolute;transform:translate(-50%)}.el-slider__button-wrapper:after{content:"";vertical-align:middle;height:100%;display:inline-block}.el-slider__button-wrapper:hover,.el-slider__button-wrapper.hover{cursor:grab}.el-slider__button-wrapper.dragging{cursor:grabbing}.el-slider__button{width:var(--el-slider-button-size);height:var(--el-slider-button-size);vertical-align:middle;border:solid 2px var(--el-slider-main-bg-color);background-color:var(--el-color-white);box-sizing:border-box;transition:var(--el-transition-duration-fast);-webkit-user-select:none;user-select:none;border-radius:50%;display:inline-block}.el-slider__button:hover,.el-slider__button.hover,.el-slider__button.dragging{transform:scale(1.2)}.el-slider__button:hover,.el-slider__button.hover{cursor:grab}.el-slider__button.dragging{cursor:grabbing}.el-slider__stop{height:var(--el-slider-height);width:var(--el-slider-height);border-radius:var(--el-border-radius-circle);background-color:var(--el-slider-stop-bg-color);position:absolute;transform:translate(-50%)}.el-slider__marks{width:18px;height:100%;top:0;left:12px}.el-slider__marks-text{color:var(--el-color-info);white-space:pre;margin-top:15px;font-size:14px;position:absolute;transform:translate(-50%)}.el-slider.is-vertical{flex:0;width:auto;height:100%;display:inline-flex;position:relative}.el-slider.is-vertical .el-slider__runway{width:var(--el-slider-height);height:100%;margin:0 16px}.el-slider.is-vertical .el-slider__bar{width:var(--el-slider-height);border-radius:0 0 3px 3px;height:auto}.el-slider.is-vertical .el-slider__button-wrapper{top:auto;left:var(--el-slider-button-wrapper-offset);transform:translateY(50%)}.el-slider.is-vertical .el-slider__stop{transform:translateY(50%)}.el-slider.is-vertical .el-slider__marks-text{margin-top:0;left:15px;transform:translateY(50%)}.el-slider--large{height:40px}.el-slider--small{height:24px}.el-space{vertical-align:top;display:inline-flex}.el-space__item{flex-wrap:wrap;display:flex}.el-space__item>*{flex:1}.el-space--vertical{flex-direction:column}.el-time-spinner{white-space:nowrap;width:100%}.el-spinner{vertical-align:middle;display:inline-block}.el-spinner-inner{width:50px;height:50px;animation:2s linear infinite rotate}.el-spinner-inner .path{stroke:var(--el-border-color-lighter);stroke-linecap:round;animation:1.5s ease-in-out infinite dash}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1 150;stroke-dashoffset:0}50%{stroke-dasharray:90 150;stroke-dashoffset:-35px}to{stroke-dasharray:90 150;stroke-dashoffset:-124px}}.el-step{flex-shrink:1;position:relative}.el-step:last-of-type .el-step__line{display:none}.el-step:last-of-type.is-flex{flex-grow:0;flex-shrink:0;flex-basis:auto!important}.el-step:last-of-type .el-step__main,.el-step:last-of-type .el-step__description{padding-right:0}.el-step__head{width:100%;position:relative}.el-step__head.is-process{color:var(--el-text-color-primary);border-color:var(--el-text-color-primary)}.el-step__head.is-wait{color:var(--el-text-color-placeholder);border-color:var(--el-text-color-placeholder)}.el-step__head.is-success{color:var(--el-color-success);border-color:var(--el-color-success)}.el-step__head.is-error{color:var(--el-color-danger);border-color:var(--el-color-danger)}.el-step__head.is-finish{color:var(--el-color-primary);border-color:var(--el-color-primary)}.el-step__icon{z-index:1;box-sizing:border-box;background:var(--el-bg-color);justify-content:center;align-items:center;width:24px;height:24px;font-size:14px;transition:all .15s ease-out;display:inline-flex;position:relative}.el-step__icon.is-text{border:2px solid;border-radius:50%}.el-step__icon.is-icon{width:40px}.el-step__icon-inner{-webkit-user-select:none;user-select:none;text-align:center;color:inherit;font-weight:700;line-height:1;display:inline-block}.el-step__icon-inner[class*=el-icon]:not(.is-status){font-size:25px;font-weight:400}.el-step__icon-inner.is-status{transform:translateY(1px)}.el-step__line{background-color:var(--el-text-color-placeholder);border-color:currentColor;position:absolute}.el-step__line-inner{box-sizing:border-box;border:1px solid;width:0;height:0;transition:all .15s ease-out;display:block}.el-step__main{white-space:normal;text-align:left}.el-step__title{font-size:16px;line-height:38px}.el-step__title.is-process{color:var(--el-text-color-primary);font-weight:700}.el-step__title.is-wait{color:var(--el-text-color-placeholder)}.el-step__title.is-success{color:var(--el-color-success)}.el-step__title.is-error{color:var(--el-color-danger)}.el-step__title.is-finish{color:var(--el-color-primary)}.el-step__description{margin-top:-5px;padding-right:10%;font-size:12px;font-weight:400;line-height:20px}.el-step__description.is-process{color:var(--el-text-color-primary)}.el-step__description.is-wait{color:var(--el-text-color-placeholder)}.el-step__description.is-success{color:var(--el-color-success)}.el-step__description.is-error{color:var(--el-color-danger)}.el-step__description.is-finish{color:var(--el-color-primary)}.el-step.is-horizontal{display:inline-block}.el-step.is-horizontal .el-step__line{height:2px;top:11px;left:0;right:0}.el-step.is-vertical{display:flex}.el-step.is-vertical .el-step__head{flex-grow:0;width:24px}.el-step.is-vertical .el-step__main{flex-grow:1;padding-left:10px}.el-step.is-vertical .el-step__title{padding-bottom:8px;line-height:24px}.el-step.is-vertical .el-step__line{width:2px;top:0;bottom:0;left:11px}.el-step.is-vertical .el-step__icon.is-icon{width:24px}.el-step.is-vertical .el-step__description{padding-right:0}.el-step.is-center .el-step__head,.el-step.is-center .el-step__main{text-align:center}.el-step.is-center .el-step__description{padding-left:20%;padding-right:20%}.el-step.is-center .el-step__line{left:50%;right:-50%}.el-step.is-simple{align-items:center;display:flex}.el-step.is-simple .el-step__head{width:auto;padding-right:10px;font-size:0}.el-step.is-simple .el-step__icon{background:0 0;width:16px;height:16px;font-size:12px}.el-step.is-simple .el-step__icon-inner[class*=el-icon]:not(.is-status){font-size:18px}.el-step.is-simple .el-step__icon-inner.is-status{transform:scale(.8)translateY(1px)}.el-step.is-simple .el-step__main{flex-grow:1;align-items:stretch;display:flex;position:relative}.el-step.is-simple .el-step__title{font-size:16px;line-height:20px}.el-step.is-simple:not(:last-of-type) .el-step__title{overflow-wrap:break-word;max-width:50%}.el-step.is-simple .el-step__arrow{flex-grow:1;justify-content:center;align-items:center;display:flex}.el-step.is-simple .el-step__arrow:before,.el-step.is-simple .el-step__arrow:after{content:"";background:var(--el-text-color-placeholder);width:1px;height:15px;display:inline-block;position:absolute}.el-step.is-simple .el-step__arrow:before{transform-origin:0 0;transform:rotate(-45deg)translateY(-4px)}.el-step.is-simple .el-step__arrow:after{transform-origin:100% 100%;transform:rotate(45deg)translateY(4px)}.el-step.is-simple:last-of-type .el-step__arrow{display:none}.el-steps{line-height:normal;display:flex}.el-steps--simple{background:var(--el-fill-color-light);border-radius:4px;padding:13px 8%}.el-steps--horizontal{white-space:nowrap}.el-steps--vertical{flex-flow:column;height:100%}.el-switch{--el-switch-on-color:var(--el-color-primary);--el-switch-off-color:var(--el-border-color);vertical-align:middle;align-items:center;height:32px;font-size:14px;line-height:20px;display:inline-flex;position:relative}.el-switch.is-disabled .el-switch__core,.el-switch.is-disabled .el-switch__label{cursor:not-allowed}.el-switch__label{transition:var(--el-transition-duration-fast);cursor:pointer;vertical-align:middle;height:20px;color:var(--el-text-color-primary);font-size:14px;font-weight:500;display:inline-block}.el-switch__label.is-active{color:var(--el-color-primary)}.el-switch__label--left{margin-right:10px}.el-switch__label--right{margin-left:10px}.el-switch__label *{font-size:14px;line-height:1;display:inline-block}.el-switch__label .el-icon{height:inherit}.el-switch__label .el-icon svg{vertical-align:middle}.el-switch__input{opacity:0;width:0;height:0;margin:0;position:absolute}.el-switch__input:focus-visible~.el-switch__core{outline:2px solid var(--el-switch-on-color);outline-offset:1px}.el-switch__core{border:1px solid var(--el-switch-border-color,var(--el-switch-off-color));box-sizing:border-box;background:var(--el-switch-off-color);cursor:pointer;min-width:40px;height:20px;transition:border-color var(--el-transition-duration),background-color var(--el-transition-duration);border-radius:10px;outline:none;align-items:center;display:inline-flex;position:relative}.el-switch__core .el-switch__inner{width:100%;transition:all var(--el-transition-duration);justify-content:center;align-items:center;height:16px;padding:0 4px 0 18px;display:flex;overflow:hidden}.el-switch__core .el-switch__inner-wrapper{color:var(--el-color-white);-webkit-user-select:none;user-select:none;text-overflow:ellipsis;white-space:nowrap;align-items:center;font-size:12px;display:flex;overflow:hidden}.el-switch__core .el-switch__action{border-radius:var(--el-border-radius-circle);transition:all var(--el-transition-duration);background-color:var(--el-color-white);width:16px;height:16px;color:var(--el-switch-off-color);justify-content:center;align-items:center;display:flex;position:absolute;left:1px}.el-switch.is-checked .el-switch__core{border-color:var(--el-switch-border-color,var(--el-switch-on-color));background-color:var(--el-switch-on-color)}.el-switch.is-checked .el-switch__core .el-switch__action{color:var(--el-switch-on-color);left:calc(100% - 17px)}.el-switch.is-checked .el-switch__core .el-switch__inner{padding:0 18px 0 4px}.el-switch.is-disabled{opacity:.6}.el-switch--wide .el-switch__label.el-switch__label--left span{left:10px}.el-switch--wide .el-switch__label.el-switch__label--right span{right:10px}.el-switch .label-fade-enter-from,.el-switch .label-fade-leave-active{opacity:0}.el-switch--large{height:40px;font-size:14px;line-height:24px}.el-switch--large .el-switch__label{height:24px;font-size:14px}.el-switch--large .el-switch__label *{font-size:14px}.el-switch--large .el-switch__core{border-radius:12px;min-width:50px;height:24px}.el-switch--large .el-switch__core .el-switch__inner{height:20px;padding:0 6px 0 22px}.el-switch--large .el-switch__core .el-switch__action{width:20px;height:20px}.el-switch--large.is-checked .el-switch__core .el-switch__action{left:calc(100% - 21px)}.el-switch--large.is-checked .el-switch__core .el-switch__inner{padding:0 22px 0 6px}.el-switch--small{height:24px;font-size:12px;line-height:16px}.el-switch--small .el-switch__label{height:16px;font-size:12px}.el-switch--small .el-switch__label *{font-size:12px}.el-switch--small .el-switch__core{border-radius:8px;min-width:30px;height:16px}.el-switch--small .el-switch__core .el-switch__inner{height:12px;padding:0 2px 0 14px}.el-switch--small .el-switch__core .el-switch__action{width:12px;height:12px}.el-switch--small.is-checked .el-switch__core .el-switch__action{left:calc(100% - 13px)}.el-switch--small.is-checked .el-switch__core .el-switch__inner{padding:0 14px 0 2px}.el-table-column--selection .cell{padding-left:14px;padding-right:14px}.el-table-filter{border:solid 1px var(--el-border-color-lighter);box-shadow:var(--el-box-shadow-light);box-sizing:border-box;background-color:#fff;border-radius:2px}.el-table-filter__list{outline:none;min-width:100px;margin:0;padding:5px 0;list-style:none}.el-table-filter__list-item{cursor:pointer;line-height:36px;font-size:var(--el-font-size-base);outline:none;padding:0 10px}.el-table-filter__list-item:hover,.el-table-filter__list-item:focus{background-color:var(--el-color-primary-light-9);color:var(--el-color-primary)}.el-table-filter__list-item.is-active{background-color:var(--el-color-primary);color:#fff}.el-table-filter__multiple{outline:none}.el-table-filter__content{min-width:100px}.el-table-filter__bottom{border-top:1px solid var(--el-border-color-lighter);padding:8px}.el-table-filter__bottom button{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--el-border-radius-base);transition:transform var(--el-transition-duration-fast) ease-in-out;background-color:#0000;border:none;outline:none;margin:0;padding:0}.el-table-filter__bottom button:focus-visible{outline:2px solid var(--el-color-primary);outline-offset:2px}.el-table-filter__bottom button{color:var(--el-text-color-regular);font-size:var(--el-font-size-small);padding:0 3px}.el-table-filter__bottom button:hover{color:var(--el-color-primary)}.el-table-filter__bottom button.is-disabled{color:var(--el-disabled-text-color);cursor:not-allowed}.el-table-filter__wrap{max-height:280px}.el-table-filter__checkbox-group{padding:10px}.el-table-filter__checkbox-group label.el-checkbox{height:unset;align-items:center;margin-bottom:12px;margin-left:5px;margin-right:5px;display:flex}.el-table-filter__checkbox-group .el-checkbox:last-child{margin-bottom:0}.el-table{--el-table-border-color:var(--el-border-color-lighter);--el-table-border:1px solid var(--el-table-border-color);--el-table-text-color:var(--el-text-color-regular);--el-table-header-text-color:var(--el-text-color-secondary);--el-table-row-hover-bg-color:var(--el-fill-color-light);--el-table-current-row-bg-color:var(--el-color-primary-light-9);--el-table-header-bg-color:var(--el-fill-color-blank);--el-table-fixed-box-shadow:var(--el-box-shadow-light);--el-table-bg-color:var(--el-fill-color-blank);--el-table-tr-bg-color:var(--el-fill-color-blank);--el-table-expanded-cell-bg-color:var(--el-fill-color-blank);--el-table-fixed-left-column:inset 10px 0 10px -10px #00000026;--el-table-fixed-right-column:inset -10px 0 10px -10px #00000026;--el-table-index:var(--el-index-normal);box-sizing:border-box;background-color:var(--el-table-bg-color);width:100%;max-width:100%;height:-moz-fit-content;height:fit-content;font-size:var(--el-font-size-base);color:var(--el-table-text-color);position:relative;overflow:hidden}.el-table__inner-wrapper{flex-direction:column;height:100%;display:flex;position:relative}.el-table__inner-wrapper:before{height:1px;bottom:0;left:0}.el-table tbody:focus-visible{outline:none}.el-table.has-footer.el-table--scrollable-y tr:last-child td.el-table__cell,.el-table.has-footer.el-table--fluid-height tr:last-child td.el-table__cell{border-bottom-color:#0000}.el-table__empty-block{text-align:center;justify-content:center;align-items:center;width:100%;min-height:60px;display:flex;position:sticky;left:0}.el-table__empty-text{width:50%;color:var(--el-text-color-secondary);line-height:60px}.el-table__expand-column .cell{text-align:center;-webkit-user-select:none;user-select:none;padding:0}.el-table__expand-icon{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--el-border-radius-base);transition:transform var(--el-transition-duration-fast) ease-in-out;background-color:#0000;border:none;outline:none;margin:0;padding:0}.el-table__expand-icon:focus-visible{outline:2px solid var(--el-color-primary);outline-offset:-2px}.el-table__expand-icon{color:var(--el-text-color-regular);width:min(23px,100%);height:23px;font-size:12px;line-height:12px}.el-table__expand-icon.is-disabled{color:var(--el-disabled-text-color);cursor:not-allowed}.el-table__expand-icon--expanded{transform:rotate(90deg)}.el-table__expand-icon>.el-icon{font-size:12px}.el-table__expanded-cell{background-color:var(--el-table-expanded-cell-bg-color)}.el-table__expanded-cell[class*=cell]{padding:20px 50px}.el-table__expanded-cell:hover{background-color:#0000!important}.el-table__placeholder{width:20px;display:inline-block}.el-table__append-wrapper{overflow:hidden}.el-table--fit{border-bottom:0;border-right:0}.el-table--fit .el-table__cell.gutter{border-right-width:1px}.el-table--fit .el-table__inner-wrapper:before{width:100%}.el-table thead{color:var(--el-table-header-text-color)}.el-table thead th{font-weight:600}.el-table thead.is-group th.el-table__cell{background:var(--el-fill-color-light)}.el-table .el-table__cell{box-sizing:border-box;text-overflow:ellipsis;vertical-align:middle;text-align:left;min-width:0;z-index:var(--el-table-index);padding:8px 0;position:relative}.el-table .el-table__cell.is-center{text-align:center}.el-table .el-table__cell.is-right{text-align:right}.el-table .el-table__cell.gutter{border-bottom-width:0;border-right-width:0;width:15px;padding:0}.el-table .el-table__cell.is-hidden>*{visibility:hidden}.el-table .cell{box-sizing:border-box;text-overflow:ellipsis;white-space:normal;overflow-wrap:break-word;padding:0 12px;line-height:23px;overflow:hidden}.el-table .cell.el-tooltip{white-space:nowrap;min-width:50px}.el-table--large{font-size:var(--el-font-size-base)}.el-table--large .el-table__cell{padding:12px 0}.el-table--large .cell{padding:0 16px}.el-table--default{font-size:var(--el-font-size-base)}.el-table--default .el-table__cell{padding:8px 0}.el-table--default .cell{padding:0 12px}.el-table--small{font-size:var(--el-font-size-extra-small)}.el-table--small .el-table__cell{padding:4px 0}.el-table--small .cell{padding:0 8px}.el-table tr{background-color:var(--el-table-tr-bg-color)}.el-table tr input[type=checkbox]{margin:0}.el-table th.el-table__cell.is-leaf,.el-table td.el-table__cell{border-bottom:var(--el-table-border)}.el-table th.el-table__cell.is-sortable{cursor:pointer}.el-table th.el-table__cell{background-color:var(--el-table-header-bg-color)}.el-table th.el-table__cell>.cell.highlight{color:var(--el-color-primary)}.el-table th.el-table__cell.required>div:before{content:"";vertical-align:middle;background:#ff4d51;border-radius:50%;width:8px;height:8px;margin-right:5px;display:inline-block}.el-table td.el-table__cell div{box-sizing:border-box}.el-table td.el-table__cell.gutter{width:0}.el-table--border:after,.el-table--border:before,.el-table--border .el-table__inner-wrapper:after,.el-table__inner-wrapper:before{content:"";background-color:var(--el-table-border-color);z-index:calc(var(--el-table-index) + 2);position:absolute}.el-table--border .el-table__inner-wrapper:after{width:100%;height:1px;z-index:calc(var(--el-table-index) + 2);top:0;left:0}.el-table--border:before{width:1px;height:100%;top:-1px;left:0}.el-table--border:after{width:1px;height:100%;top:-1px;right:0}.el-table--border .el-table__inner-wrapper{border-bottom:none;border-right:none}.el-table--border .el-table__footer-wrapper{flex-shrink:0;position:relative}.el-table--border .el-table__cell{border-right:var(--el-table-border)}.el-table--border th.el-table__cell.gutter:last-of-type{border-bottom:var(--el-table-border);border-bottom-width:1px}.el-table--border th.el-table__cell{border-bottom:var(--el-table-border)}.el-table--hidden{visibility:hidden}.el-table__header-wrapper,.el-table__body-wrapper,.el-table__footer-wrapper{width:100%}.el-table__header-wrapper tr td.el-table-fixed-column--left,.el-table__header-wrapper tr td.el-table-fixed-column--right,.el-table__header-wrapper tr th.el-table-fixed-column--left,.el-table__header-wrapper tr th.el-table-fixed-column--right,.el-table__body-wrapper tr td.el-table-fixed-column--left,.el-table__body-wrapper tr td.el-table-fixed-column--right,.el-table__body-wrapper tr th.el-table-fixed-column--left,.el-table__body-wrapper tr th.el-table-fixed-column--right,.el-table__footer-wrapper tr td.el-table-fixed-column--left,.el-table__footer-wrapper tr td.el-table-fixed-column--right,.el-table__footer-wrapper tr th.el-table-fixed-column--left,.el-table__footer-wrapper tr th.el-table-fixed-column--right{background:inherit;z-index:calc(var(--el-table-index) + 1);position:sticky!important}.el-table__header-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-first-column:before{content:"";width:10px;box-shadow:none;touch-action:none;pointer-events:none;position:absolute;top:0;bottom:0;overflow:hidden}.el-table__header-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-first-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-first-column:before{left:-10px}.el-table__header-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__header-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__body-wrapper tr th.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr td.el-table-fixed-column--right.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--left.is-last-column:before,.el-table__footer-wrapper tr th.el-table-fixed-column--right.is-last-column:before{right:-10px}.el-table__header-wrapper tr td.el-table__fixed-right-patch,.el-table__header-wrapper tr th.el-table__fixed-right-patch,.el-table__body-wrapper tr td.el-table__fixed-right-patch,.el-table__body-wrapper tr th.el-table__fixed-right-patch,.el-table__footer-wrapper tr td.el-table__fixed-right-patch,.el-table__footer-wrapper tr th.el-table__fixed-right-patch{z-index:calc(var(--el-table-index) + 1);background:#fff;right:0;position:sticky!important}.el-table__header-wrapper{flex-shrink:0}.el-table__header-wrapper tr th.el-table-fixed-column--left,.el-table__header-wrapper tr th.el-table-fixed-column--right{background-color:var(--el-table-header-bg-color)}.el-table__header,.el-table__body,.el-table__footer{table-layout:fixed;border-collapse:separate}.el-table__header-wrapper{overflow:hidden}.el-table__header-wrapper tbody td.el-table__cell{background-color:var(--el-table-row-hover-bg-color);color:var(--el-table-text-color)}.el-table__footer-wrapper{flex-shrink:0;overflow:hidden}.el-table__footer-wrapper tfoot td.el-table__cell{background-color:var(--el-table-row-hover-bg-color);color:var(--el-table-text-color)}.el-table__header-wrapper .el-table-column--selection>.cell,.el-table__body-wrapper .el-table-column--selection>.cell{align-items:center;height:23px;display:inline-flex}.el-table__header-wrapper .el-table-column--selection .el-checkbox,.el-table__body-wrapper .el-table-column--selection .el-checkbox{height:unset}.el-table.is-scrolling-left .el-table-fixed-column--right.is-first-column:before{box-shadow:var(--el-table-fixed-right-column)}.el-table.is-scrolling-left.el-table--border .el-table-fixed-column--left.is-last-column.el-table__cell{border-right:var(--el-table-border)}.el-table.is-scrolling-left th.el-table-fixed-column--left{background-color:var(--el-table-header-bg-color)}.el-table.is-scrolling-right .el-table-fixed-column--left.is-last-column:before{box-shadow:var(--el-table-fixed-left-column)}.el-table.is-scrolling-right .el-table-fixed-column--left.is-last-column.el-table__cell{border-right:none}.el-table.is-scrolling-right th.el-table-fixed-column--right{background-color:var(--el-table-header-bg-color)}.el-table.is-scrolling-middle .el-table-fixed-column--left.is-last-column.el-table__cell{border-right:none}.el-table.is-scrolling-middle .el-table-fixed-column--right.is-first-column:before{box-shadow:var(--el-table-fixed-right-column)}.el-table.is-scrolling-middle .el-table-fixed-column--left.is-last-column:before{box-shadow:var(--el-table-fixed-left-column)}.el-table.is-scrolling-none .el-table-fixed-column--left.is-first-column:before,.el-table.is-scrolling-none .el-table-fixed-column--left.is-last-column:before,.el-table.is-scrolling-none .el-table-fixed-column--right.is-first-column:before,.el-table.is-scrolling-none .el-table-fixed-column--right.is-last-column:before{box-shadow:none}.el-table.is-scrolling-none th.el-table-fixed-column--left,.el-table.is-scrolling-none th.el-table-fixed-column--right{background-color:var(--el-table-header-bg-color)}.el-table__body-wrapper{flex:1;position:relative;overflow:hidden}.el-table__body-wrapper .el-scrollbar__bar{z-index:calc(var(--el-table-index) + 2)}.el-table .caret-wrapper{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--el-border-radius-base);transition:transform var(--el-transition-duration-fast) ease-in-out;background-color:#0000;border:none;outline:none;margin:0;padding:0}.el-table .caret-wrapper:focus-visible{outline:2px solid var(--el-color-primary);outline-offset:2px}.el-table .caret-wrapper{vertical-align:middle;width:24px;height:14px;overflow:initial;flex-direction:column;align-items:center;display:inline-flex;position:relative}.el-table .sort-caret{border:5px solid #0000;width:0;height:0;position:absolute;left:7px}.el-table .sort-caret.ascending{border-bottom-color:var(--el-text-color-placeholder);top:-5px}.el-table .sort-caret.descending{border-top-color:var(--el-text-color-placeholder);bottom:-3px}.el-table .ascending .sort-caret.ascending{border-bottom-color:var(--el-color-primary)}.el-table .descending .sort-caret.descending{border-top-color:var(--el-color-primary)}.el-table .hidden-columns{visibility:hidden;z-index:-1;position:absolute}.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell{background:var(--el-fill-color-lighter)}.el-table--striped .el-table__body tr.el-table__row--striped.current-row td.el-table__cell{background-color:var(--el-table-current-row-bg-color)}.el-table__body tr.hover-row>td.el-table__cell,.el-table__body tr.hover-row.current-row>td.el-table__cell,.el-table__body tr.hover-row.el-table__row--striped>td.el-table__cell,.el-table__body tr.hover-row.el-table__row--striped.current-row>td.el-table__cell,.el-table__body tr>td.hover-cell{background-color:var(--el-table-row-hover-bg-color)}.el-table__body tr.current-row>td.el-table__cell{background-color:var(--el-table-current-row-bg-color)}.el-table.el-table--scrollable-y .el-table__body-header{z-index:calc(var(--el-table-index) + 2);position:sticky;top:0}.el-table.el-table--scrollable-y .el-table__body-footer{z-index:calc(var(--el-table-index) + 2);position:sticky;bottom:0}.el-table__column-resize-proxy{border-left:var(--el-table-border);width:0;z-index:calc(var(--el-table-index) + 9);position:absolute;top:0;bottom:0;left:200px}.el-table__column-filter-trigger{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--el-border-radius-base);transition:transform var(--el-transition-duration-fast) ease-in-out;background-color:#0000;border:none;outline:none;margin:0;padding:0}.el-table__column-filter-trigger:focus-visible{outline:2px solid var(--el-color-primary);outline-offset:2px}.el-table__column-filter-trigger{display:inline-block}.el-table__column-filter-trigger i{color:var(--el-color-info);vertical-align:middle;font-size:14px}.el-table__border-left-patch{width:1px;height:100%;z-index:calc(var(--el-table-index) + 2);background-color:var(--el-table-border-color);position:absolute;top:0;left:0}.el-table__border-bottom-patch{height:1px;z-index:calc(var(--el-table-index) + 2);background-color:var(--el-table-border-color);position:absolute;left:0}.el-table__border-right-patch{width:1px;height:100%;z-index:calc(var(--el-table-index) + 2);background-color:var(--el-table-border-color);position:absolute;top:0}.el-table--enable-row-transition .el-table__body td.el-table__cell{transition:background-color .25s 1ms}.el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell{background-color:var(--el-table-row-hover-bg-color)}.el-table [class*=el-table__row--level] .el-table__expand-icon{text-align:center;width:20px;display:inline-block}.el-table .el-table.el-table--border .el-table__cell{border-right:var(--el-table-border)}.el-table:not(.el-table--border) .el-table__cell{border-right:none}.el-table:not(.el-table--border)>.el-table__inner-wrapper:after{content:none}.el-table-v2{--el-table-border-color:var(--el-border-color-lighter);--el-table-border:1px solid var(--el-table-border-color);--el-table-text-color:var(--el-text-color-regular);--el-table-header-text-color:var(--el-text-color-secondary);--el-table-row-hover-bg-color:var(--el-fill-color-light);--el-table-current-row-bg-color:var(--el-color-primary-light-9);--el-table-header-bg-color:var(--el-fill-color-blank);--el-table-fixed-box-shadow:var(--el-box-shadow-light);--el-table-bg-color:var(--el-fill-color-blank);--el-table-tr-bg-color:var(--el-fill-color-blank);--el-table-expanded-cell-bg-color:var(--el-fill-color-blank);--el-table-fixed-left-column:inset 10px 0 10px -10px #00000026;--el-table-fixed-right-column:inset -10px 0 10px -10px #00000026;--el-table-index:var(--el-index-normal);font-size:var(--el-font-size-base)}.el-table-v2 *{box-sizing:border-box}.el-table-v2__root{position:relative}.el-table-v2__root:hover .el-table-v2__main .el-virtual-scrollbar{opacity:1}.el-table-v2__main{background-color:var(--el-bg-color);flex-direction:column-reverse;display:flex;position:absolute;top:0;left:0;overflow:hidden}.el-table-v2__main .el-vl__horizontal,.el-table-v2__main .el-vl__vertical{z-index:2}.el-table-v2__left{background-color:var(--el-bg-color);flex-direction:column-reverse;display:flex;position:absolute;top:0;left:0;overflow:hidden;box-shadow:2px 0 4px #0000000f}.el-table-v2__left .el-virtual-scrollbar{opacity:0}.el-table-v2__left .el-vl__vertical,.el-table-v2__left .el-vl__horizontal{z-index:-1}.el-table-v2__right{background-color:var(--el-bg-color);flex-direction:column-reverse;display:flex;position:absolute;top:0;right:0;overflow:hidden;box-shadow:-2px 0 4px #0000000f}.el-table-v2__right .el-virtual-scrollbar{opacity:0}.el-table-v2__right .el-vl__vertical,.el-table-v2__right .el-vl__horizontal{z-index:-1}.el-table-v2__header-row,.el-table-v2__row{padding-inline-end:var(--el-table-scrollbar-size)}.el-table-v2__header-wrapper{overflow:hidden}.el-table-v2__header{position:relative;overflow:hidden}.el-table-v2__header .el-checkbox{z-index:0}.el-table-v2__footer{position:absolute;bottom:0;left:0;right:0;overflow:hidden}.el-table-v2__empty{position:absolute;left:0}.el-table-v2__overlay{z-index:9999;position:absolute;top:0;bottom:0;left:0;right:0}.el-table-v2__header-row{border-bottom:var(--el-table-border);display:flex}.el-table-v2__header-cell{-webkit-user-select:none;user-select:none;background-color:var(--el-table-header-bg-color);height:100%;color:var(--el-table-header-text-color);align-items:center;padding:0 8px;font-weight:700;display:flex;overflow:hidden}.el-table-v2__header-cell.is-align-center{text-align:center;justify-content:center}.el-table-v2__header-cell.is-align-right{text-align:right;justify-content:flex-end}.el-table-v2__header-cell.is-sortable{cursor:pointer}.el-table-v2__header-cell:hover .el-icon{display:block}.el-table-v2__sort-icon{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--el-border-radius-base);transition:transform var(--el-transition-duration-fast) ease-in-out;background-color:#0000;border:none;outline:none;margin:0;padding:0}.el-table-v2__sort-icon:focus-visible{outline:2px solid var(--el-color-primary);outline-offset:2px}.el-table-v2__sort-icon{transition:opacity,display var(--el-transition-duration);opacity:.6;display:none}.el-table-v2__sort-icon.is-sorting{opacity:1;display:flex}.el-table-v2__row{border-bottom:var(--el-table-border);transition:background-color var(--el-transition-duration);align-items:center;display:flex}.el-table-v2__row.is-hovered,.el-table-v2__row:hover{background-color:var(--el-table-row-hover-bg-color)}.el-table-v2__row-cell{align-items:center;height:100%;padding:0 8px;display:flex;overflow:hidden}.el-table-v2__row-cell.is-align-center{text-align:center;justify-content:center}.el-table-v2__row-cell.is-align-right{text-align:right;justify-content:flex-end}.el-table-v2__expand-icon{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--el-border-radius-base);transition:transform var(--el-transition-duration-fast) ease-in-out;background-color:#0000;border:none;outline:none;margin:0;padding:0}.el-table-v2__expand-icon:focus-visible{outline:2px solid var(--el-color-primary);outline-offset:2px}.el-table-v2__expand-icon{-webkit-user-select:none;user-select:none;margin:0 4px}.el-table-v2__expand-icon svg{transition:transform var(--el-transition-duration)}.el-table-v2__expand-icon.is-expanded svg{transform:rotate(90deg)}.el-table-v2:not(.is-dynamic) .el-table-v2__cell-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.el-table-v2.is-dynamic .el-table-v2__row{align-items:stretch;overflow:hidden}.el-table-v2.is-dynamic .el-table-v2__row .el-table-v2__row-cell{overflow-wrap:break-word}.el-tabs{--el-tabs-header-height:40px;display:flex}.el-tabs__header{justify-content:space-between;align-items:center;margin:0 0 15px;padding:0;display:flex;position:relative}.el-tabs__header-vertical{flex-direction:column}.el-tabs__active-bar{background-color:var(--el-color-primary);z-index:1;height:2px;transition:width var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier),transform var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);list-style:none;position:absolute;bottom:0;left:0}.el-tabs__active-bar.is-bottom{bottom:auto}.el-tabs__new-tab{border:1px solid var(--el-border-color);text-align:center;width:20px;height:20px;color:var(--el-text-color-primary);cursor:pointer;border-radius:3px;flex-shrink:0;justify-content:center;align-items:center;margin:10px 0 10px 10px;font-size:12px;line-height:20px;transition:all .15s;display:flex}.el-tabs__new-tab .is-icon-plus{height:inherit;width:inherit;transform:scale(.8)}.el-tabs__new-tab .is-icon-plus svg{vertical-align:middle}.el-tabs__new-tab:hover{color:var(--el-color-primary)}.el-tabs__new-tab-vertical{margin-left:0}.el-tabs__nav-wrap{flex:auto;margin-bottom:-1px;position:relative;overflow:hidden}.el-tabs__nav-wrap:after{content:"";background-color:var(--el-border-color-light);width:100%;height:2px;z-index:var(--el-index-normal);position:absolute;bottom:0;left:0}.el-tabs__nav-wrap.is-bottom:after{top:0;bottom:auto}.el-tabs__nav-wrap.is-scrollable{box-sizing:border-box;padding:0 20px}.el-tabs__nav-scroll{overflow:hidden}.el-tabs__nav-next,.el-tabs__nav-prev{cursor:pointer;color:var(--el-text-color-secondary);text-align:center;width:20px;font-size:12px;line-height:44px;position:absolute}.el-tabs__nav-next.is-disabled,.el-tabs__nav-prev.is-disabled{color:var(--el-text-color-disabled);cursor:not-allowed}.el-tabs__nav-next{right:0}.el-tabs__nav-prev{left:0}.el-tabs__nav{white-space:nowrap;transition:transform var(--el-transition-duration);float:left;z-index:calc(var(--el-index-normal) + 1);display:flex;position:relative}.el-tabs__nav.is-stretch{min-width:100%;display:flex}.el-tabs__nav.is-stretch>*{text-align:center;flex:1}.el-tabs__item{height:var(--el-tabs-header-height);box-sizing:border-box;font-size:var(--el-font-size-base);color:var(--el-text-color-primary);justify-content:center;align-items:center;padding:0 20px;font-weight:500;list-style:none;display:flex;position:relative}.el-tabs__item:focus,.el-tabs__item:focus:active{outline:none}.el-tabs__item:focus-visible{box-shadow:0 0 2px 2px var(--el-color-primary) inset;border-radius:3px}.el-tabs__item .is-icon-close{text-align:center;transition:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);border-radius:50%;margin-left:5px}.el-tabs__item .is-icon-close:before{display:inline-block;transform:scale(.9)}.el-tabs__item .is-icon-close:hover{background-color:var(--el-text-color-placeholder);color:#fff}.el-tabs__item.is-active{color:var(--el-color-primary)}.el-tabs__item:hover{color:var(--el-color-primary);cursor:pointer}.el-tabs__item.is-disabled{color:var(--el-disabled-text-color);cursor:not-allowed}.el-tabs__content{flex-grow:1;position:relative;overflow:hidden}.el-tabs--top>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--bottom>.el-tabs__header .el-tabs__item:nth-child(2){padding-left:0}.el-tabs--top>.el-tabs__header .el-tabs__item:last-child,.el-tabs--bottom>.el-tabs__header .el-tabs__item:last-child{padding-right:0}.el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--bottom.el-tabs--border-card>.el-tabs__header .el-tabs__item:nth-child(2),.el-tabs--bottom.el-tabs--card>.el-tabs__header .el-tabs__item:nth-child(2){padding-left:20px}.el-tabs--top.el-tabs--border-card>.el-tabs__header .el-tabs__item:last-child,.el-tabs--top.el-tabs--card>.el-tabs__header .el-tabs__item:last-child,.el-tabs--bottom.el-tabs--border-card>.el-tabs__header .el-tabs__item:last-child,.el-tabs--bottom.el-tabs--card>.el-tabs__header .el-tabs__item:last-child{padding-right:20px}.el-tabs--card>.el-tabs__header{border-bottom:1px solid var(--el-border-color-light);height:var(--el-tabs-header-height);box-sizing:border-box}.el-tabs--card>.el-tabs__header .el-tabs__nav-wrap:after{content:none}.el-tabs--card>.el-tabs__header .el-tabs__nav{border:1px solid var(--el-border-color-light);box-sizing:border-box;border-bottom:none;border-radius:4px 4px 0 0}.el-tabs--card>.el-tabs__header .el-tabs__active-bar{display:none}.el-tabs--card>.el-tabs__header .el-tabs__item .is-icon-close{transform-origin:100%;width:0;height:14px;font-size:12px;position:relative;right:-2px;overflow:hidden}.el-tabs--card>.el-tabs__header .el-tabs__item{border-bottom:1px solid #0000;border-left:1px solid var(--el-border-color-light);transition:color var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier),padding var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);margin-top:-1px}.el-tabs--card>.el-tabs__header .el-tabs__item:first-child{border-left:none}.el-tabs--card>.el-tabs__header .el-tabs__item.is-closable:hover{padding-left:13px;padding-right:13px}.el-tabs--card>.el-tabs__header .el-tabs__item.is-closable:hover .is-icon-close{width:14px}.el-tabs--card>.el-tabs__header .el-tabs__item.is-active{border-bottom-color:var(--el-bg-color)}.el-tabs--card>.el-tabs__header .el-tabs__item.is-active.is-closable{padding-left:20px;padding-right:20px}.el-tabs--card>.el-tabs__header .el-tabs__item.is-active.is-closable .is-icon-close{width:14px}.el-tabs--border-card{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color)}.el-tabs--border-card>.el-tabs__content{padding:15px}.el-tabs--border-card>.el-tabs__header{background-color:var(--el-fill-color-light);border-bottom:1px solid var(--el-border-color-light);margin:0}.el-tabs--border-card>.el-tabs__header .el-tabs__nav-wrap:after{content:none}.el-tabs--border-card>.el-tabs__header .el-tabs__item{transition:all var(--el-transition-duration) var(--el-transition-function-ease-in-out-bezier);color:var(--el-text-color-secondary);border:1px solid #0000;margin-top:-1px}.el-tabs--border-card>.el-tabs__header .el-tabs__item:first-child,.el-tabs--border-card>.el-tabs__header .el-tabs__item+.el-tabs__item{margin-left:-1px}.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active{color:var(--el-color-primary);background-color:var(--el-bg-color-overlay);border-right-color:var(--el-border-color);border-left-color:var(--el-border-color)}.el-tabs--border-card>.el-tabs__header .el-tabs__item:not(.is-disabled):hover{color:var(--el-color-primary)}.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-disabled{color:var(--el-disabled-text-color)}.el-tabs--border-card>.el-tabs__header .is-scrollable .el-tabs__item:first-child{margin-left:0}.el-tabs--bottom{flex-direction:column}.el-tabs--bottom .el-tabs__header.is-bottom{margin-top:10px;margin-bottom:0}.el-tabs--bottom.el-tabs--border-card .el-tabs__header.is-bottom{border-bottom:0;border-top:1px solid var(--el-border-color)}.el-tabs--bottom.el-tabs--border-card .el-tabs__nav-wrap.is-bottom{margin-top:-1px;margin-bottom:0}.el-tabs--bottom.el-tabs--border-card .el-tabs__item.is-bottom:not(.is-active){border:1px solid #0000}.el-tabs--bottom.el-tabs--border-card .el-tabs__item.is-bottom{margin:0 -1px -1px}.el-tabs--left,.el-tabs--right{overflow:hidden}.el-tabs--left .el-tabs__header.is-left,.el-tabs--left .el-tabs__header.is-right,.el-tabs--left .el-tabs__nav-wrap.is-left,.el-tabs--left .el-tabs__nav-wrap.is-right,.el-tabs--left .el-tabs__nav-scroll,.el-tabs--right .el-tabs__header.is-left,.el-tabs--right .el-tabs__header.is-right,.el-tabs--right .el-tabs__nav-wrap.is-left,.el-tabs--right .el-tabs__nav-wrap.is-right,.el-tabs--right .el-tabs__nav-scroll{height:100%}.el-tabs--left .el-tabs__active-bar.is-left,.el-tabs--left .el-tabs__active-bar.is-right,.el-tabs--right .el-tabs__active-bar.is-left,.el-tabs--right .el-tabs__active-bar.is-right{width:2px;height:auto;top:0;bottom:auto}.el-tabs--left .el-tabs__nav-wrap.is-left,.el-tabs--left .el-tabs__nav-wrap.is-right,.el-tabs--right .el-tabs__nav-wrap.is-left,.el-tabs--right .el-tabs__nav-wrap.is-right{margin-bottom:0}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-next{text-align:center;cursor:pointer;width:100%;height:30px;line-height:30px}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev i,.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-next i,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev i,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-next i,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev i,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-next i,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev i,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-next i{transform:rotate(90deg)}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev.is-disabled,.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-next.is-disabled,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev.is-disabled,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-next.is-disabled,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev.is-disabled,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-next.is-disabled,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev.is-disabled,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-next.is-disabled{cursor:not-allowed}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-prev,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-prev{top:0;left:auto}.el-tabs--left .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--left .el-tabs__nav-wrap.is-right>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-left>.el-tabs__nav-next,.el-tabs--right .el-tabs__nav-wrap.is-right>.el-tabs__nav-next{bottom:0;right:auto}.el-tabs--left .el-tabs__nav-wrap.is-left.is-scrollable,.el-tabs--left .el-tabs__nav-wrap.is-right.is-scrollable,.el-tabs--right .el-tabs__nav-wrap.is-left.is-scrollable,.el-tabs--right .el-tabs__nav-wrap.is-right.is-scrollable{padding:30px 0}.el-tabs--left .el-tabs__nav-wrap.is-left:after,.el-tabs--left .el-tabs__nav-wrap.is-right:after,.el-tabs--right .el-tabs__nav-wrap.is-left:after,.el-tabs--right .el-tabs__nav-wrap.is-right:after{width:2px;height:100%;top:0;bottom:auto}.el-tabs--left .el-tabs__nav.is-left,.el-tabs--left .el-tabs__nav.is-right,.el-tabs--right .el-tabs__nav.is-left,.el-tabs--right .el-tabs__nav.is-right{flex-direction:column}.el-tabs--left .el-tabs__item.is-left,.el-tabs--right .el-tabs__item.is-left{justify-content:flex-end}.el-tabs--left .el-tabs__item.is-right,.el-tabs--right .el-tabs__item.is-right{justify-content:flex-start}.el-tabs--left{flex-direction:row}.el-tabs--left .el-tabs__header.is-left{margin-bottom:0;margin-right:10px}.el-tabs--left .el-tabs__nav-wrap.is-left{margin-right:-1px}.el-tabs--left .el-tabs__nav-wrap.is-left:after,.el-tabs--left .el-tabs__active-bar.is-left{left:auto;right:0}.el-tabs--left .el-tabs__item.is-left{text-align:right}.el-tabs--left.el-tabs--card .el-tabs__active-bar.is-left{display:none}.el-tabs--left.el-tabs--card .el-tabs__item.is-left{border-left:none;border-right:1px solid var(--el-border-color-light);border-bottom:none;border-top:1px solid var(--el-border-color-light);text-align:left}.el-tabs--left.el-tabs--card .el-tabs__item.is-left:first-child{border-right:1px solid var(--el-border-color-light);border-top:none}.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active{border:1px solid var(--el-border-color-light);border-bottom:none;border-left:none;border-right-color:#fff}.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active:first-child{border-top:none}.el-tabs--left.el-tabs--card .el-tabs__item.is-left.is-active:last-child{border-bottom:none}.el-tabs--left.el-tabs--card .el-tabs__nav{border-bottom:1px solid var(--el-border-color-light);border-right:none;border-radius:4px 0 0 4px}.el-tabs--left.el-tabs--card .el-tabs__new-tab{float:none}.el-tabs--left.el-tabs--border-card .el-tabs__header.is-left{border-right:1px solid var(--el-border-color)}.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left{border:1px solid #0000;margin:-1px 0 -1px -1px}.el-tabs--left.el-tabs--border-card .el-tabs__item.is-left.is-active{border-color:#d1dbe5 #0000}.el-tabs--left>.el-tabs__content+.el-tabs__header{order:-1}.el-tabs--right .el-tabs__header.is-right{margin-bottom:0;margin-left:10px}.el-tabs--right .el-tabs__nav-wrap.is-right{margin-left:-1px}.el-tabs--right .el-tabs__nav-wrap.is-right:after{left:0;right:auto}.el-tabs--right .el-tabs__active-bar.is-right{left:0}.el-tabs--right.el-tabs--card .el-tabs__active-bar.is-right{display:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right{border-bottom:none;border-top:1px solid var(--el-border-color-light)}.el-tabs--right.el-tabs--card .el-tabs__item.is-right:first-child{border-left:1px solid var(--el-border-color-light);border-top:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active{border:1px solid var(--el-border-color-light);border-bottom:none;border-left-color:#fff;border-right:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active:first-child{border-top:none}.el-tabs--right.el-tabs--card .el-tabs__item.is-right.is-active:last-child{border-bottom:none}.el-tabs--right.el-tabs--card .el-tabs__nav{border-bottom:1px solid var(--el-border-color-light);border-left:none;border-radius:0 4px 4px 0}.el-tabs--right.el-tabs--border-card .el-tabs__header.is-right{border-left:1px solid var(--el-border-color)}.el-tabs--right.el-tabs--border-card .el-tabs__item.is-right{border:1px solid #0000;margin:-1px -1px -1px 0}.el-tabs--right.el-tabs--border-card .el-tabs__item.is-right.is-active{border-color:#d1dbe5 #0000}.el-tabs--top{flex-direction:column}.el-tabs--top>.el-tabs__content+.el-tabs__header{order:-1}.slideInRight-transition,.slideInLeft-transition{display:inline-block}.slideInRight-enter{animation:slideInRight-enter var(--el-transition-duration)}.slideInRight-leave{animation:slideInRight-leave var(--el-transition-duration);position:absolute;left:0;right:0}.slideInLeft-enter{animation:slideInLeft-enter var(--el-transition-duration)}.slideInLeft-leave{animation:slideInLeft-leave var(--el-transition-duration);position:absolute;left:0;right:0}@keyframes slideInRight-enter{0%{opacity:0;transform-origin:0 0;transform:translate(100%)}to{opacity:1;transform-origin:0 0;transform:translate(0)}}@keyframes slideInRight-leave{0%{transform-origin:0 0;opacity:1;transform:translate(0)}to{transform-origin:0 0;opacity:0;transform:translate(100%)}}@keyframes slideInLeft-enter{0%{opacity:0;transform-origin:0 0;transform:translate(-100%)}to{opacity:1;transform-origin:0 0;transform:translate(0)}}@keyframes slideInLeft-leave{0%{transform-origin:0 0;opacity:1;transform:translate(0)}to{transform-origin:0 0;opacity:0;transform:translate(-100%)}}.el-tag{--el-tag-font-size:12px;--el-tag-border-radius:4px;--el-tag-border-radius-rounded:9999px;background-color:var(--el-tag-bg-color);border-color:var(--el-tag-border-color);color:var(--el-tag-text-color);vertical-align:middle;height:24px;font-size:var(--el-tag-font-size);border-radius:var(--el-tag-border-radius);box-sizing:border-box;white-space:nowrap;--el-icon-size:14px;--el-tag-bg-color:var(--el-color-primary-light-9);--el-tag-border-color:var(--el-color-primary-light-8);--el-tag-hover-color:var(--el-color-primary);border-style:solid;border-width:1px;justify-content:center;align-items:center;padding:0 9px;line-height:1;display:inline-flex}.el-tag.el-tag--primary{--el-tag-bg-color:var(--el-color-primary-light-9);--el-tag-border-color:var(--el-color-primary-light-8);--el-tag-hover-color:var(--el-color-primary)}.el-tag.el-tag--success{--el-tag-bg-color:var(--el-color-success-light-9);--el-tag-border-color:var(--el-color-success-light-8);--el-tag-hover-color:var(--el-color-success)}.el-tag.el-tag--warning{--el-tag-bg-color:var(--el-color-warning-light-9);--el-tag-border-color:var(--el-color-warning-light-8);--el-tag-hover-color:var(--el-color-warning)}.el-tag.el-tag--danger{--el-tag-bg-color:var(--el-color-danger-light-9);--el-tag-border-color:var(--el-color-danger-light-8);--el-tag-hover-color:var(--el-color-danger)}.el-tag.el-tag--error{--el-tag-bg-color:var(--el-color-error-light-9);--el-tag-border-color:var(--el-color-error-light-8);--el-tag-hover-color:var(--el-color-error)}.el-tag.el-tag--info{--el-tag-bg-color:var(--el-color-info-light-9);--el-tag-border-color:var(--el-color-info-light-8);--el-tag-hover-color:var(--el-color-info)}.el-tag.is-hit{border-color:var(--el-color-primary)}.el-tag.is-round{border-radius:var(--el-tag-border-radius-rounded)}.el-tag .el-tag__close{color:var(--el-tag-text-color);flex-shrink:0}.el-tag .el-tag__close:hover{color:var(--el-color-white);background-color:var(--el-tag-hover-color)}.el-tag.el-tag--primary{--el-tag-text-color:var(--el-color-primary)}.el-tag.el-tag--success{--el-tag-text-color:var(--el-color-success)}.el-tag.el-tag--warning{--el-tag-text-color:var(--el-color-warning)}.el-tag.el-tag--danger{--el-tag-text-color:var(--el-color-danger)}.el-tag.el-tag--error{--el-tag-text-color:var(--el-color-error)}.el-tag.el-tag--info{--el-tag-text-color:var(--el-color-info)}.el-tag .el-icon{cursor:pointer;font-size:calc(var(--el-icon-size) - 2px);height:var(--el-icon-size);width:var(--el-icon-size);border-radius:50%}.el-tag .el-tag__close{background-color:#0000;border:none;border-radius:50%;outline:none;margin-left:6px;padding:0;overflow:hidden}.el-tag .el-tag__close:focus-visible{outline:2px solid var(--el-color-primary);outline-offset:2px}.el-tag .el-tag__close .el-icon{display:flex}.el-tag--dark{--el-tag-text-color:var(--el-color-white);--el-tag-bg-color:var(--el-color-primary);--el-tag-border-color:var(--el-color-primary);--el-tag-hover-color:var(--el-color-primary-light-3)}.el-tag--dark.el-tag--primary{--el-tag-bg-color:var(--el-color-primary);--el-tag-border-color:var(--el-color-primary);--el-tag-hover-color:var(--el-color-primary-light-3)}.el-tag--dark.el-tag--success{--el-tag-bg-color:var(--el-color-success);--el-tag-border-color:var(--el-color-success);--el-tag-hover-color:var(--el-color-success-light-3)}.el-tag--dark.el-tag--warning{--el-tag-bg-color:var(--el-color-warning);--el-tag-border-color:var(--el-color-warning);--el-tag-hover-color:var(--el-color-warning-light-3)}.el-tag--dark.el-tag--danger{--el-tag-bg-color:var(--el-color-danger);--el-tag-border-color:var(--el-color-danger);--el-tag-hover-color:var(--el-color-danger-light-3)}.el-tag--dark.el-tag--error{--el-tag-bg-color:var(--el-color-error);--el-tag-border-color:var(--el-color-error);--el-tag-hover-color:var(--el-color-error-light-3)}.el-tag--dark.el-tag--info{--el-tag-bg-color:var(--el-color-info);--el-tag-border-color:var(--el-color-info);--el-tag-hover-color:var(--el-color-info-light-3)}.el-tag--dark.el-tag--primary,.el-tag--dark.el-tag--success,.el-tag--dark.el-tag--warning,.el-tag--dark.el-tag--danger,.el-tag--dark.el-tag--error,.el-tag--dark.el-tag--info{--el-tag-text-color:var(--el-color-white)}.el-tag--plain,.el-tag--plain.el-tag--primary{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-primary-light-5);--el-tag-hover-color:var(--el-color-primary)}.el-tag--plain.el-tag--success{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-success-light-5);--el-tag-hover-color:var(--el-color-success)}.el-tag--plain.el-tag--warning{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-warning-light-5);--el-tag-hover-color:var(--el-color-warning)}.el-tag--plain.el-tag--danger{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-danger-light-5);--el-tag-hover-color:var(--el-color-danger)}.el-tag--plain.el-tag--error{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-error-light-5);--el-tag-hover-color:var(--el-color-error)}.el-tag--plain.el-tag--info{--el-tag-bg-color:var(--el-fill-color-blank);--el-tag-border-color:var(--el-color-info-light-5);--el-tag-hover-color:var(--el-color-info)}.el-tag.is-closable{padding-right:5px}.el-tag--large{--el-icon-size:16px;height:32px;padding:0 11px}.el-tag--large .el-tag__close{margin-left:8px}.el-tag--large.is-closable{padding-right:7px}.el-tag--small{--el-icon-size:12px;height:20px;padding:0 7px}.el-tag--small .el-tag__close{margin-left:4px}.el-tag--small.is-closable{padding-right:3px}.el-tag--small .el-icon-close{transform:scale(.8)}.el-tag.el-tag--primary.is-hit{border-color:var(--el-color-primary)}.el-tag.el-tag--success.is-hit{border-color:var(--el-color-success)}.el-tag.el-tag--warning.is-hit{border-color:var(--el-color-warning)}.el-tag.el-tag--danger.is-hit{border-color:var(--el-color-danger)}.el-tag.el-tag--error.is-hit{border-color:var(--el-color-error)}.el-tag.el-tag--info.is-hit{border-color:var(--el-color-info)}.el-text{--el-text-font-size:var(--el-font-size-base);--el-text-color:var(--el-text-color-regular);font-size:var(--el-text-font-size);color:var(--el-text-color);overflow-wrap:break-word;align-self:center;margin:0;padding:0}.el-text.is-truncated{text-overflow:ellipsis;white-space:nowrap;max-width:100%;display:inline-block;overflow:hidden}.el-text.is-line-clamp{-webkit-box-orient:vertical;display:-webkit-inline-box;overflow:hidden}.el-text--large{--el-text-font-size:var(--el-font-size-medium)}.el-text--default{--el-text-font-size:var(--el-font-size-base)}.el-text--small{--el-text-font-size:var(--el-font-size-extra-small)}.el-text.el-text--primary{--el-text-color:var(--el-color-primary)}.el-text.el-text--success{--el-text-color:var(--el-color-success)}.el-text.el-text--warning{--el-text-color:var(--el-color-warning)}.el-text.el-text--danger{--el-text-color:var(--el-color-danger)}.el-text.el-text--error{--el-text-color:var(--el-color-error)}.el-text.el-text--info{--el-text-color:var(--el-color-info)}.el-text>.el-icon{vertical-align:-2px}.time-select{min-width:0;margin:5px 0}.time-select .el-picker-panel__content{max-height:200px;margin:0}.time-select-item{padding:8px 10px;font-size:14px;line-height:20px}.time-select-item.disabled{color:var(--el-datepicker-border-color);cursor:not-allowed}.time-select-item:hover{background-color:var(--el-fill-color-light);cursor:pointer;font-weight:700}.time-select .time-select-item.selected:not(.disabled){color:var(--el-color-primary);font-weight:700}.el-timeline-item{padding-bottom:20px;position:relative}.el-timeline-item__wrapper{box-sizing:content-box;position:relative;top:-3px}.el-timeline-item__tail{border-left:2px solid var(--el-timeline-node-color);height:100%;position:absolute}.el-timeline-item .el-timeline-item__icon{color:var(--el-color-white);font-size:var(--el-font-size-small)}.el-timeline-item__node{background-color:var(--el-timeline-node-color);border-color:var(--el-timeline-node-color);box-sizing:border-box;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute}.el-timeline-item__node--normal{width:var(--el-timeline-node-size-normal);height:var(--el-timeline-node-size-normal)}.el-timeline-item__node--large{width:var(--el-timeline-node-size-large);height:var(--el-timeline-node-size-large)}.el-timeline-item__node.is-hollow{background:var(--el-color-white);border-style:solid;border-width:2px}.el-timeline-item__node--primary{background-color:var(--el-color-primary);border-color:var(--el-color-primary)}.el-timeline-item__node--success{background-color:var(--el-color-success);border-color:var(--el-color-success)}.el-timeline-item__node--warning{background-color:var(--el-color-warning);border-color:var(--el-color-warning)}.el-timeline-item__node--danger{background-color:var(--el-color-danger);border-color:var(--el-color-danger)}.el-timeline-item__node--info{background-color:var(--el-color-info);border-color:var(--el-color-info)}.el-timeline-item__dot{justify-content:center;align-items:center;display:flex;position:absolute}.el-timeline-item__content{color:var(--el-text-color-primary)}.el-timeline-item__timestamp{color:var(--el-text-color-secondary);line-height:1;font-size:var(--el-font-size-small)}.el-timeline-item__timestamp.is-top{margin-bottom:8px;padding-top:4px}.el-timeline-item__timestamp.is-bottom{margin-top:8px}.el-timeline-item.is-start .el-timeline-item__wrapper{padding-left:28px}.el-timeline-item.is-start .el-timeline-item__tail{left:4px}.el-timeline-item.is-start .el-timeline-item__node--normal{left:-1px}.el-timeline-item.is-start .el-timeline-item__node--large{left:-2px}.el-timeline-item.is-end .el-timeline-item__wrapper{text-align:right;padding-right:28px}.el-timeline-item.is-end .el-timeline-item__tail{right:4px}.el-timeline-item.is-end .el-timeline-item__node--normal{right:-1px}.el-timeline-item.is-end .el-timeline-item__node--large{right:-2px}.el-timeline-item.is-alternate .el-timeline-item__tail,.el-timeline-item.is-alternate .el-timeline-item__node,.el-timeline-item.is-alternate-reverse .el-timeline-item__tail,.el-timeline-item.is-alternate-reverse .el-timeline-item__node{left:50%;transform:translate(-50%)}.el-timeline{--el-timeline-node-size-normal:12px;--el-timeline-node-size-large:14px;--el-timeline-node-color:var(--el-border-color-light);font-size:var(--el-font-size-base);margin:0;list-style:none}.el-timeline .el-timeline-item:last-child .el-timeline-item__tail{display:none}.el-timeline .el-timeline-item__center{align-items:center;display:flex}.el-timeline .el-timeline-item__center .el-timeline-item__wrapper{width:100%}.el-timeline .el-timeline-item__center .el-timeline-item__tail{top:0}.el-timeline .el-timeline-item__center:first-child .el-timeline-item__tail{height:calc(50% + 10px);top:calc(50% - 10px)}.el-timeline .el-timeline-item__center:last-child .el-timeline-item__tail{height:calc(50% - 10px);display:block}.el-timeline.is-start{padding-left:40px;padding-right:0}.el-timeline.is-end{padding-left:0;padding-right:40px}.el-timeline.is-alternate{padding-left:20px;padding-right:20px}.el-timeline.is-alternate .el-timeline-item:nth-child(odd) .el-timeline-item__wrapper{width:calc(50% - 28px);left:calc(50% - var(--el-timeline-node-size-large) / 2);padding-left:28px}.el-timeline.is-alternate .el-timeline-item:nth-child(2n) .el-timeline-item__wrapper{width:calc(50% - 28px + var(--el-timeline-node-size-large) / 2);text-align:right;padding-right:28px}.el-timeline.is-alternate-reverse{padding-left:20px;padding-right:20px}.el-timeline.is-alternate-reverse .el-timeline-item:nth-child(odd) .el-timeline-item__wrapper{width:calc(50% - 28px + var(--el-timeline-node-size-large) / 2);text-align:right;padding-right:28px}.el-timeline.is-alternate-reverse .el-timeline-item:nth-child(2n) .el-timeline-item__wrapper{width:calc(50% - 28px);left:calc(50% - var(--el-timeline-node-size-large) / 2);padding-left:28px}.el-transfer{--el-transfer-border-color:var(--el-border-color-lighter);--el-transfer-border-radius:var(--el-border-radius-base);--el-transfer-panel-width:200px;--el-transfer-panel-header-height:40px;--el-transfer-panel-header-bg-color:var(--el-fill-color-light);--el-transfer-panel-footer-height:40px;--el-transfer-panel-body-height:278px;--el-transfer-item-height:30px;--el-transfer-filter-height:32px;font-size:var(--el-font-size-base)}.el-transfer__buttons{vertical-align:middle;padding:0 30px;display:inline-block}.el-transfer__button{vertical-align:top}.el-transfer__button:nth-child(2){margin:0 0 0 10px}.el-transfer__button i,.el-transfer__button span{font-size:14px}.el-transfer__button .el-icon+span{margin-left:0}.el-transfer-panel{background:var(--el-bg-color-overlay);text-align:left;vertical-align:middle;width:var(--el-transfer-panel-width);box-sizing:border-box;max-height:100%;display:inline-block;position:relative;overflow:hidden}.el-transfer-panel__body{height:var(--el-transfer-panel-body-height);border-left:1px solid var(--el-transfer-border-color);border-right:1px solid var(--el-transfer-border-color);border-bottom:1px solid var(--el-transfer-border-color);border-bottom-left-radius:var(--el-transfer-border-radius);border-bottom-right-radius:var(--el-transfer-border-radius);overflow:hidden}.el-transfer-panel__body.is-with-footer{border-bottom:none;border-bottom-right-radius:0;border-bottom-left-radius:0}.el-transfer-panel__list{height:var(--el-transfer-panel-body-height);box-sizing:border-box;margin:0;padding:6px 0;list-style:none;overflow:auto}.el-transfer-panel__list.is-filterable{height:calc(100% - var(--el-transfer-filter-height) - 30px);padding-top:0}.el-transfer-panel__item{height:var(--el-transfer-item-height);line-height:var(--el-transfer-item-height);padding-left:15px;display:block!important}.el-transfer-panel__item+.el-transfer-panel__item{margin-left:0}.el-transfer-panel__item.el-checkbox{color:var(--el-text-color-regular);margin-right:30px}.el-transfer-panel__item:hover{color:var(--el-color-primary)}.el-transfer-panel__item.el-checkbox .el-checkbox__label{text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;width:100%;line-height:var(--el-transfer-item-height);padding-left:22px;display:block;overflow:hidden}.el-transfer-panel__item .el-checkbox__input{position:absolute;top:8px}.el-transfer-panel__filter{text-align:center;box-sizing:border-box;padding:15px}.el-transfer-panel__filter .el-input__inner{height:var(--el-transfer-filter-height);box-sizing:border-box;width:100%;font-size:12px;display:inline-block}.el-transfer-panel__filter .el-icon-circle-close{cursor:pointer}.el-transfer-panel .el-transfer-panel__header{height:var(--el-transfer-panel-header-height);background:var(--el-transfer-panel-header-bg-color);border:1px solid var(--el-transfer-border-color);border-top-left-radius:var(--el-transfer-border-radius);border-top-right-radius:var(--el-transfer-border-radius);box-sizing:border-box;color:var(--el-color-black);align-items:center;margin:0;padding-left:15px;display:flex}.el-transfer-panel .el-transfer-panel__header .el-checkbox{align-items:center;width:100%;display:flex;position:relative}.el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label{min-width:0;color:var(--el-text-color-primary);flex:1;align-items:center;font-size:16px;font-weight:400;display:flex}.el-transfer-panel .el-transfer-panel__header-title{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.el-transfer-panel .el-transfer-panel__header-count{color:var(--el-text-color-secondary);flex-shrink:0;margin-left:8px;margin-right:15px;font-size:12px}.el-transfer-panel .el-transfer-panel__footer{height:var(--el-transfer-panel-footer-height);background:var(--el-bg-color-overlay);border:1px solid var(--el-transfer-border-color);border-bottom-left-radius:var(--el-transfer-border-radius);border-bottom-right-radius:var(--el-transfer-border-radius);margin:0;padding:0}.el-transfer-panel .el-transfer-panel__footer:after{content:"";vertical-align:middle;height:100%;display:inline-block}.el-transfer-panel .el-transfer-panel__footer .el-checkbox{color:var(--el-text-color-regular);padding-left:20px}.el-transfer-panel .el-transfer-panel__empty{height:var(--el-transfer-item-height);line-height:var(--el-transfer-item-height);color:var(--el-text-color-secondary);text-align:center;margin:0;padding:6px 15px 0}.el-transfer-panel .el-checkbox__label{padding-left:8px}.el-tree{--el-tree-node-content-height:26px;--el-tree-node-hover-bg-color:var(--el-fill-color-light);--el-tree-text-color:var(--el-text-color-regular);--el-tree-expand-icon-color:var(--el-text-color-placeholder);cursor:default;background:var(--el-fill-color-blank);color:var(--el-tree-text-color);font-size:var(--el-font-size-base);position:relative}.el-tree__empty-block{text-align:center;width:100%;height:100%;min-height:60px;position:relative}.el-tree__empty-text{color:var(--el-text-color-secondary);font-size:var(--el-font-size-base);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.el-tree__drop-indicator{background-color:var(--el-color-primary);height:1px;position:absolute;left:0;right:0}.el-tree-node{white-space:nowrap;outline:none}.el-tree-node:focus>.el-tree-node__content{background-color:var(--el-tree-node-hover-bg-color)}.el-tree-node.is-drop-inner>.el-tree-node__content .el-tree-node__label{background-color:var(--el-color-primary);color:#fff}.el-tree-node__content{--el-checkbox-height:var(--el-tree-node-content-height);height:var(--el-tree-node-content-height);cursor:pointer;align-items:center;display:flex}.el-tree-node__content>.el-tree-node__expand-icon{box-sizing:content-box;padding:6px}.el-tree-node__content>label.el-checkbox{margin-right:8px}.el-tree-node__content:hover{background-color:var(--el-tree-node-hover-bg-color)}.el-tree.is-dragging .el-tree-node__content{cursor:move}.el-tree.is-dragging .el-tree-node__content *{pointer-events:none}.el-tree.is-dragging.is-drop-not-allow .el-tree-node__content{cursor:not-allowed}.el-tree-node__expand-icon{cursor:pointer;color:var(--el-tree-expand-icon-color);transition:transform var(--el-transition-duration) ease-in-out;font-size:12px;transform:rotate(0)}.el-tree-node__expand-icon.expanded{transform:rotate(90deg)}.el-tree-node__expand-icon.is-leaf{color:#0000;cursor:default;visibility:hidden}.el-tree-node__expand-icon.is-hidden{visibility:hidden}.el-tree-node__loading-icon{font-size:var(--el-font-size-base);color:var(--el-tree-expand-icon-color);margin-right:8px}.el-tree-node>.el-tree-node__children{background-color:#0000;overflow:hidden}.el-tree-node.is-expanded>.el-tree-node__children{display:block}.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{background-color:var(--el-color-primary-light-9)}.el-tree-select{--el-tree-node-content-height:26px;--el-tree-node-hover-bg-color:var(--el-fill-color-light);--el-tree-text-color:var(--el-text-color-regular);--el-tree-expand-icon-color:var(--el-text-color-placeholder)}.el-tree-select__popper .el-tree-node__expand-icon{margin-left:8px}.el-tree-select__popper .el-tree-node.is-checked>.el-tree-node__content .el-select-dropdown__item.selected:after{content:none}.el-tree-select__popper .el-select-dropdown__list>.el-select-dropdown__item{padding-left:32px}.el-tree-select__popper .el-select-dropdown__item{flex:1;height:20px;padding-left:0;line-height:20px;background:0 0!important}.el-upload{--el-upload-dragger-padding-horizontal:10px;--el-upload-dragger-padding-vertical:40px;--el-upload-list-picture-card-size:var(--el-upload-picture-card-size);--el-upload-picture-card-size:148px;cursor:pointer;outline:none;justify-content:center;align-items:center;display:inline-flex}.el-upload.is-disabled{cursor:not-allowed}.el-upload.is-disabled:focus{border-color:var(--el-border-color-darker);color:inherit}.el-upload.is-disabled:focus .el-upload-dragger{border-color:var(--el-border-color-darker)}.el-upload.is-disabled .el-upload-dragger{cursor:not-allowed;background-color:var(--el-disabled-bg-color)}.el-upload.is-disabled .el-upload-dragger .el-upload__text{color:var(--el-text-color-placeholder)}.el-upload.is-disabled .el-upload-dragger .el-upload__text em{color:var(--el-disabled-text-color)}.el-upload.is-disabled .el-upload-dragger:hover{border-color:var(--el-border-color-darker)}.el-upload__input{display:none}.el-upload__tip{color:var(--el-text-color-regular);margin-top:7px;font-size:12px}.el-upload iframe{z-index:-1;opacity:0;filter:alpha(opacity=0);position:absolute;top:0;left:0}.el-upload--picture-card{background-color:var(--el-fill-color-lighter);border:1px dashed var(--el-border-color-darker);box-sizing:border-box;width:var(--el-upload-picture-card-size);height:var(--el-upload-picture-card-size);cursor:pointer;vertical-align:top;border-radius:6px;justify-content:center;align-items:center;display:inline-flex}.el-upload--picture-card>i{color:var(--el-text-color-secondary);font-size:28px}.el-upload--picture-card:hover{border-color:var(--el-color-primary);color:var(--el-color-primary)}.el-upload.is-drag{display:block}.el-upload:focus{border-color:var(--el-color-primary);color:var(--el-color-primary)}.el-upload:focus .el-upload-dragger{border-color:var(--el-color-primary)}.el-upload-dragger{padding:var(--el-upload-dragger-padding-vertical) var(--el-upload-dragger-padding-horizontal);background-color:var(--el-fill-color-blank);border:1px dashed var(--el-border-color);box-sizing:border-box;text-align:center;cursor:pointer;border-radius:6px;position:relative;overflow:hidden}.el-upload-dragger .el-icon--upload{color:var(--el-text-color-placeholder);margin-bottom:16px;font-size:67px;line-height:50px}.el-upload-dragger+.el-upload__tip{text-align:center}.el-upload-dragger~.el-upload__files{border-top:var(--el-border);margin-top:7px;padding-top:5px}.el-upload-dragger .el-upload__text{color:var(--el-text-color-regular);text-align:center;font-size:14px}.el-upload-dragger .el-upload__text em{color:var(--el-color-primary);font-style:normal}.el-upload-dragger:hover{border-color:var(--el-color-primary)}.el-upload-dragger.is-dragover{padding:calc(var(--el-upload-dragger-padding-vertical) - 1px) calc(var(--el-upload-dragger-padding-horizontal) - 1px);background-color:var(--el-color-primary-light-9);border:2px dashed var(--el-color-primary)}.el-upload-list{--el-upload-dragger-padding-horizontal:10px;--el-upload-dragger-padding-vertical:40px;--el-upload-list-picture-card-size:var(--el-upload-picture-card-size);--el-upload-picture-card-size:148px;margin:10px 0 0;padding:0;list-style:none;position:relative}.el-upload-list__item{color:var(--el-text-color-regular);box-sizing:border-box;border-radius:4px;width:100%;margin-bottom:5px;font-size:14px;transition:all .5s cubic-bezier(.55,0,.1,1);position:relative}.el-upload-list__item .el-progress{width:100%;position:absolute;top:20px}.el-upload-list__item .el-progress__text{position:absolute;top:-13px;right:0}.el-upload-list__item .el-progress-bar{margin-right:0;padding-right:0}.el-upload-list__item .el-icon--upload-success{color:var(--el-color-success)}.el-upload-list__item .el-icon--close{cursor:pointer;opacity:.75;color:var(--el-text-color-regular);transition:opacity var(--el-transition-duration);display:none;position:absolute;top:50%;right:5px;transform:translateY(-50%)}.el-upload-list__item .el-icon--close:hover{opacity:1;color:var(--el-color-primary)}.el-upload-list__item .el-icon--close-tip{cursor:pointer;opacity:1;color:var(--el-color-primary);font-size:12px;font-style:normal;display:none;position:absolute;top:1px;right:5px}.el-upload-list__item:hover,.el-upload-list__item:focus-within{background-color:var(--el-fill-color-light)}.el-upload-list__item:hover .el-icon--close,.el-upload-list__item:focus-within .el-icon--close{display:inline-flex}.el-upload-list__item:hover .el-icon--close-tip,.el-upload-list__item:focus-within .el-icon--close-tip{right:24px}.el-upload-list__item:hover .el-progress__text,.el-upload-list__item:focus-within .el-progress__text{display:none}.el-upload-list__item .el-upload-list__item-info{flex-direction:column;justify-content:center;width:calc(100% - 30px);margin-left:4px;display:inline-flex}.el-upload-list__item.is-success .el-upload-list__item-status-label{display:inline-flex}.el-upload-list__item.is-success .el-upload-list__item-name:hover,.el-upload-list__item.is-success .el-upload-list__item-name:focus{color:var(--el-color-primary);cursor:pointer}.el-upload-list__item.is-success:focus:not(:hover) .el-icon--close-tip{display:inline-block}.el-upload-list__item.is-success:not(.focusing):focus,.el-upload-list__item.is-success:active{outline-width:0}.el-upload-list__item.is-success:not(.focusing):focus .el-icon--close-tip,.el-upload-list__item.is-success:active .el-icon--close-tip{display:none}.el-upload-list__item.is-success:hover .el-upload-list__item-status-label,.el-upload-list__item.is-success:focus .el-upload-list__item-status-label,.el-upload-list__item.is-success:focus-within .el-upload-list__item-status-label{opacity:0;display:none}.el-upload-list__item-name{color:var(--el-text-color-regular);text-align:center;transition:color var(--el-transition-duration);font-size:var(--el-font-size-base);align-items:center;padding:0 4px;display:inline-flex}.el-upload-list__item-name .el-icon{color:var(--el-text-color-secondary);margin-right:6px}.el-upload-list__item-file-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.el-upload-list__item-status-label{line-height:inherit;height:100%;transition:opacity var(--el-transition-duration);justify-content:center;align-items:center;display:none;position:absolute;top:0;right:5px}.el-upload-list__item-delete{color:var(--el-text-color-regular);font-size:12px;display:none;position:absolute;top:0;right:10px}.el-upload-list__item-delete:hover{color:var(--el-color-primary)}.el-upload-list--picture-card{flex-wrap:wrap;margin:0;display:inline-flex}.el-upload-list--picture-card .el-upload-list__item{background-color:var(--el-fill-color-blank);border:1px solid var(--el-border-color);box-sizing:border-box;width:var(--el-upload-list-picture-card-size);height:var(--el-upload-list-picture-card-size);border-radius:6px;margin:0 8px 8px 0;padding:0;display:inline-flex;overflow:hidden}.el-upload-list--picture-card .el-upload-list__item .el-icon--check,.el-upload-list--picture-card .el-upload-list__item .el-icon--circle-check{color:#fff}.el-upload-list--picture-card .el-upload-list__item .el-icon--close{display:none}.el-upload-list--picture-card .el-upload-list__item:hover .el-upload-list__item-status-label{opacity:0;display:block}.el-upload-list--picture-card .el-upload-list__item:hover .el-progress__text{display:block}.el-upload-list--picture-card .el-upload-list__item .el-upload-list__item-name{display:none}.el-upload-list--picture-card .el-upload-list__item-thumbnail{object-fit:contain;width:100%;height:100%}.el-upload-list--picture-card .el-upload-list__item-status-label{background:var(--el-color-success);text-align:center;width:40px;height:24px;top:-6px;right:-15px;transform:rotate(45deg)}.el-upload-list--picture-card .el-upload-list__item-status-label i{margin-top:11px;font-size:12px;transform:rotate(-45deg)}.el-upload-list--picture-card .el-upload-list__item-actions{cursor:default;color:#fff;opacity:0;background-color:var(--el-overlay-color-lighter);width:100%;height:100%;transition:opacity var(--el-transition-duration);justify-content:center;align-items:center;font-size:20px;display:inline-flex;position:absolute;top:0;left:0}.el-upload-list--picture-card .el-upload-list__item-actions span{cursor:pointer;display:none}.el-upload-list--picture-card .el-upload-list__item-actions span+span{margin-left:16px}.el-upload-list--picture-card .el-upload-list__item-actions .el-upload-list__item-delete{font-size:inherit;color:inherit;position:static}.el-upload-list--picture-card .el-upload-list__item-actions:hover{opacity:1}.el-upload-list--picture-card .el-upload-list__item-actions:hover span{display:inline-flex}.el-upload-list--picture-card .el-progress{width:126px;top:50%;bottom:auto;left:50%;transform:translate(-50%,-50%)}.el-upload-list--picture-card .el-progress .el-progress__text{top:50%}.el-upload-list--picture .el-upload-list__item{z-index:0;background-color:var(--el-fill-color-blank);border:1px solid var(--el-border-color);box-sizing:border-box;border-radius:6px;align-items:center;margin-top:10px;padding:10px;display:flex;overflow:hidden}.el-upload-list--picture .el-upload-list__item .el-icon--check,.el-upload-list--picture .el-upload-list__item .el-icon--circle-check{color:#fff}.el-upload-list--picture .el-upload-list__item:hover .el-upload-list__item-status-label{opacity:0;display:inline-flex}.el-upload-list--picture .el-upload-list__item:hover .el-progress__text{display:block}.el-upload-list--picture .el-upload-list__item.is-success .el-upload-list__item-name i{display:none}.el-upload-list--picture .el-upload-list__item .el-icon--close{top:5px;transform:translateY(0)}.el-upload-list--picture .el-upload-list__item-thumbnail{object-fit:contain;z-index:1;background-color:var(--el-color-white);justify-content:center;align-items:center;width:70px;height:70px;display:inline-flex;position:relative}.el-upload-list--picture .el-upload-list__item-status-label{background:var(--el-color-success);text-align:center;width:46px;height:26px;position:absolute;top:-7px;right:-17px;transform:rotate(45deg)}.el-upload-list--picture .el-upload-list__item-status-label i{margin-top:12px;font-size:12px;transform:rotate(-45deg)}.el-upload-list--picture .el-progress{position:relative;top:-7px}.el-upload-cover{z-index:10;cursor:default;width:100%;height:100%;position:absolute;top:0;left:0;overflow:hidden}.el-upload-cover:after{content:"";vertical-align:middle;height:100%;display:inline-block}.el-upload-cover img{width:100%;height:100%;display:block}.el-upload-cover__label{background:var(--el-color-success);text-align:center;width:40px;height:24px;top:-6px;right:-15px;transform:rotate(45deg)}.el-upload-cover__label i{color:#fff;margin-top:11px;font-size:12px;transform:rotate(-45deg)}.el-upload-cover__progress{vertical-align:middle;width:243px;display:inline-block;position:static}.el-upload-cover__progress+.el-upload__inner{opacity:0}.el-upload-cover__content{width:100%;height:100%;position:absolute;top:0;left:0}.el-upload-cover__interact{background-color:var(--el-overlay-color-light);text-align:center;width:100%;height:100%;position:absolute;bottom:0;left:0}.el-upload-cover__interact .btn{color:#fff;cursor:pointer;vertical-align:middle;transition:var(--el-transition-md-fade);margin-top:60px;font-size:14px;display:inline-block}.el-upload-cover__interact .btn i{margin-top:0}.el-upload-cover__interact .btn span{opacity:0;transition:opacity .15s linear}.el-upload-cover__interact .btn:not(:first-child){margin-left:35px}.el-upload-cover__interact .btn:hover{transform:translateY(-13px)}.el-upload-cover__interact .btn:hover span{opacity:1}.el-upload-cover__interact .btn i{color:#fff;font-size:24px;line-height:inherit;margin:0 auto 5px;display:block}.el-upload-cover__title{text-overflow:ellipsis;white-space:nowrap;text-align:left;width:100%;height:36px;color:var(--el-text-color-primary);background-color:#fff;margin:0;padding:0 10px;font-size:14px;font-weight:400;line-height:36px;position:absolute;bottom:0;left:0;overflow:hidden}.el-upload-cover+.el-upload__inner{opacity:0;z-index:1;position:relative}.el-vl__wrapper{position:relative}.el-vl__wrapper:hover .el-virtual-scrollbar,.el-vl__wrapper.always-on .el-virtual-scrollbar{opacity:1}.el-vl__window{scrollbar-width:none}.el-vl__window::-webkit-scrollbar{display:none}.el-virtual-scrollbar{opacity:0;transition:opacity .34s ease-out}.el-virtual-scrollbar.always-on{opacity:1}.el-vg__wrapper{position:relative}.el-popper{--el-popper-border-radius:var(--el-popover-border-radius,4px);--el-popper-bg-color-light:var(--el-bg-color-overlay);--el-popper-bg-color-dark:var(--el-text-color-primary);border-radius:var(--el-popper-border-radius);z-index:2000;overflow-wrap:break-word;word-break:normal;visibility:visible;min-width:10px;padding:5px 11px;font-size:12px;line-height:20px;position:absolute}.el-popper.is-dark{--el-fill-color-blank:var(--el-popper-bg-color-dark);color:var(--el-bg-color);background:var(--el-popper-bg-color-dark);border:1px solid var(--el-text-color-primary)}.el-popper.is-dark>.el-popper__arrow:before{border:1px solid var(--el-text-color-primary);background:var(--el-popper-bg-color-dark);right:0}.el-popper.is-light{--el-fill-color-blank:var(--el-popper-bg-color-light);background:var(--el-popper-bg-color-light);border:1px solid var(--el-border-color-light)}.el-popper.is-light>.el-popper__arrow:before{border:1px solid var(--el-border-color-light);background:var(--el-popper-bg-color-light);right:0}.el-popper.is-pure{padding:0}.el-popper__arrow{z-index:-1;width:10px;height:10px;position:absolute}.el-popper__arrow:before{z-index:-1;content:" ";background:var(--el-text-color-primary);box-sizing:border-box;width:10px;height:10px;position:absolute;transform:rotate(45deg)}.el-popper[data-popper-placement^=top]>.el-popper__arrow{bottom:-5px}.el-popper[data-popper-placement^=top]>.el-popper__arrow:before{border-bottom-right-radius:2px}.el-popper[data-popper-placement^=bottom]>.el-popper__arrow{top:-5px}.el-popper[data-popper-placement^=bottom]>.el-popper__arrow:before{border-top-left-radius:2px}.el-popper[data-popper-placement^=left]>.el-popper__arrow{right:-5px}.el-popper[data-popper-placement^=left]>.el-popper__arrow:before{border-top-right-radius:2px}.el-popper[data-popper-placement^=right]>.el-popper__arrow{left:-5px}.el-popper[data-popper-placement^=right]>.el-popper__arrow:before{border-bottom-left-radius:2px}.el-popper[data-popper-placement^=top]>.el-popper__arrow:before{border-top-color:#0000!important;border-left-color:#0000!important}.el-popper[data-popper-placement^=bottom]>.el-popper__arrow:before{border-bottom-color:#0000!important;border-right-color:#0000!important}.el-popper[data-popper-placement^=left]>.el-popper__arrow:before{border-bottom-color:#0000!important;border-left-color:#0000!important}.el-popper[data-popper-placement^=right]>.el-popper__arrow:before{border-top-color:#0000!important;border-right-color:#0000!important}.el-statistic{--el-statistic-title-font-weight:400;--el-statistic-title-font-size:var(--el-font-size-extra-small);--el-statistic-title-color:var(--el-text-color-regular);--el-statistic-content-font-weight:400;--el-statistic-content-font-size:var(--el-font-size-extra-large);--el-statistic-content-color:var(--el-text-color-primary)}.el-statistic__head{font-weight:var(--el-statistic-title-font-weight);font-size:var(--el-statistic-title-font-size);color:var(--el-statistic-title-color);margin-bottom:4px;line-height:20px}.el-statistic__content{font-weight:var(--el-statistic-content-font-weight);font-size:var(--el-statistic-content-font-size);color:var(--el-statistic-content-color)}.el-statistic__value{display:inline-block}.el-statistic__prefix{margin-right:4px;display:inline-block}.el-statistic__suffix{margin-left:4px;display:inline-block}.el-tour{--el-tour-width:520px;--el-tour-padding-primary:12px;--el-tour-font-line-height:var(--el-font-line-height-primary);--el-tour-title-font-size:16px;--el-tour-title-text-color:var(--el-text-color-primary);--el-tour-title-font-weight:400;--el-tour-close-color:var(--el-color-info);--el-tour-font-size:14px;--el-tour-color:var(--el-text-color-primary);--el-tour-bg-color:var(--el-bg-color);--el-tour-border-radius:4px}.el-tour__hollow{transition:all var(--el-transition-duration) ease}.el-tour__content{border-radius:var(--el-tour-border-radius);width:var(--el-tour-width);padding:var(--el-tour-padding-primary);background:var(--el-tour-bg-color);box-shadow:var(--el-box-shadow-light);box-sizing:border-box;overflow-wrap:break-word;outline:none}.el-tour__arrow{background:var(--el-tour-bg-color);pointer-events:none;box-sizing:border-box;width:10px;height:10px;position:absolute;transform:rotate(45deg)}.el-tour__content[data-side^=top] .el-tour__arrow{border-top-color:#0000;border-left-color:#0000}.el-tour__content[data-side^=bottom] .el-tour__arrow{border-bottom-color:#0000;border-right-color:#0000}.el-tour__content[data-side^=left] .el-tour__arrow{border-bottom-color:#0000;border-left-color:#0000}.el-tour__content[data-side^=right] .el-tour__arrow{border-top-color:#0000;border-right-color:#0000}.el-tour__content[data-side^=top] .el-tour__arrow{bottom:-5px}.el-tour__content[data-side^=bottom] .el-tour__arrow{top:-5px}.el-tour__content[data-side^=left] .el-tour__arrow{right:-5px}.el-tour__content[data-side^=right] .el-tour__arrow{left:-5px}.el-tour__closebtn{cursor:pointer;width:40px;height:40px;font-size:var(--el-message-close-size,16px);background:0 0;border:none;outline:none;padding:0;position:absolute;top:0;right:0}.el-tour__closebtn .el-tour__close{color:var(--el-tour-close-color);font-size:inherit}.el-tour__closebtn:focus .el-tour__close,.el-tour__closebtn:hover .el-tour__close{color:var(--el-color-primary)}.el-tour__header{padding-bottom:var(--el-tour-padding-primary)}.el-tour__header.show-close{padding-right:calc(var(--el-tour-padding-primary) + var(--el-message-close-size,16px))}.el-tour__title{line-height:var(--el-tour-font-line-height);font-size:var(--el-tour-title-font-size);color:var(--el-tour-title-text-color);font-weight:var(--el-tour-title-font-weight)}.el-tour__body{color:var(--el-tour-text-color);font-size:var(--el-tour-font-size)}.el-tour__body img,.el-tour__body video{max-width:100%}.el-tour__footer{padding-top:var(--el-tour-padding-primary);box-sizing:border-box;justify-content:space-between;display:flex}.el-tour__content .el-tour-indicators{flex:1;display:inline-block}.el-tour__content .el-tour-indicator{background:var(--el-color-info-light-9);border-radius:50%;width:6px;height:6px;margin-right:6px;display:inline-block}.el-tour__content .el-tour-indicator.is-active{background:var(--el-color-primary)}.el-tour.el-tour--primary{--el-tour-title-text-color:#fff;--el-tour-text-color:#fff;--el-tour-bg-color:var(--el-color-primary);--el-tour-close-color:#fff}.el-tour.el-tour--primary .el-tour__closebtn:focus .el-tour__close,.el-tour.el-tour--primary .el-tour__closebtn:hover .el-tour__close{color:var(--el-tour-title-text-color)}.el-tour.el-tour--primary .el-button--default{color:var(--el-color-primary);border-color:var(--el-color-primary);background:#fff}.el-tour.el-tour--primary .el-button--primary{border-color:#fff}.el-tour.el-tour--primary .el-tour-indicator{background:#ffffff26}.el-tour.el-tour--primary .el-tour-indicator.is-active{background:#fff}.el-tour-parent--hidden{overflow:hidden}.el-anchor{--el-anchor-bg-color:var(--el-bg-color);--el-anchor-padding-indent:14px;--el-anchor-line-height:22px;--el-anchor-font-size:12px;--el-anchor-color:var(--el-text-color-secondary);--el-anchor-active-color:var(--el-color-primary);--el-anchor-hover-color:var(--el-text-color-regular);--el-anchor-marker-bg-color:var(--el-color-primary);background-color:var(--el-anchor-bg-color);position:relative}.el-anchor__marker{background-color:var(--el-anchor-marker-bg-color);opacity:0;z-index:0;border-radius:4px;position:absolute}.el-anchor.el-anchor--vertical .el-anchor__marker{width:4px;height:14px;transition:top .25s ease-in-out,opacity .25s;top:8px;left:0}.el-anchor.el-anchor--vertical .el-anchor__list{padding-left:var(--el-anchor-padding-indent)}.el-anchor.el-anchor--vertical.el-anchor--underline:before{content:"";background-color:#0505050f;width:2px;height:100%;position:absolute;left:0}.el-anchor.el-anchor--vertical.el-anchor--underline .el-anchor__marker{border-radius:unset;width:2px}.el-anchor.el-anchor--horizontal .el-anchor__marker{width:20px;height:2px;transition:left .25s ease-in-out,opacity .25s,width .25s;bottom:0}.el-anchor.el-anchor--horizontal .el-anchor__list{padding-bottom:4px;display:flex}.el-anchor.el-anchor--horizontal .el-anchor__list .el-anchor__item{padding-left:16px}.el-anchor.el-anchor--horizontal .el-anchor__list .el-anchor__item:first-child{padding-left:0}.el-anchor.el-anchor--horizontal.el-anchor--underline:before{content:"";background-color:#0505050f;width:100%;height:2px;position:absolute;bottom:0}.el-anchor.el-anchor--horizontal.el-anchor--underline .el-anchor__marker{border-radius:unset;height:2px}.el-anchor__item{flex-direction:column;display:flex}.el-anchor__link{font-size:var(--el-anchor-font-size);line-height:var(--el-anchor-line-height);color:var(--el-anchor-color);transition:color var(--el-transition-duration);white-space:nowrap;text-overflow:ellipsis;cursor:pointer;outline:none;max-width:100%;padding:4px 0;text-decoration:none;overflow:hidden}.el-anchor__link:hover,.el-anchor__link:focus{color:var(--el-hover-color)}.el-anchor__link:focus-visible{border-radius:var(--el-border-radius-base);outline:2px solid var(--el-color-primary)}.el-anchor__link.is-active{color:var(--el-anchor-active-color)}.el-anchor .el-anchor__list .el-anchor__item a{display:inline-block}.el-segmented--vertical{flex-direction:column}.el-segmented--vertical .el-segmented__item{padding:11px}.el-segmented{--el-segmented-color:var(--el-text-color-regular);--el-segmented-bg-color:var(--el-fill-color-light);--el-segmented-padding:2px;--el-segmented-item-selected-color:var(--el-color-white);--el-segmented-item-selected-bg-color:var(--el-color-primary);--el-segmented-item-selected-disabled-bg-color:var(--el-color-primary-light-5);--el-segmented-item-hover-color:var(--el-text-color-primary);--el-segmented-item-hover-bg-color:var(--el-fill-color-dark);--el-segmented-item-active-bg-color:var(--el-fill-color-darker);--el-segmented-item-disabled-color:var(--el-text-color-placeholder);background:var(--el-segmented-bg-color);min-height:32px;padding:var(--el-segmented-padding);border-radius:var(--el-border-radius-base);color:var(--el-segmented-color);box-sizing:border-box;align-items:stretch;font-size:14px;display:inline-flex}.el-segmented__group{align-items:stretch;width:100%;display:flex;position:relative}.el-segmented__item-selected{background:var(--el-segmented-item-selected-bg-color);border-radius:calc(var(--el-border-radius-base) - 2px);pointer-events:none;width:10px;height:100%;transition:all .3s;position:absolute;top:0;left:0}.el-segmented__item-selected.is-disabled{background:var(--el-segmented-item-selected-disabled-bg-color)}.el-segmented__item-selected.is-focus-visible:before{content:"";border-radius:inherit;outline:2px solid var(--el-segmented-item-selected-bg-color);outline-offset:1px;position:absolute;top:0;bottom:0;left:0;right:0}.el-segmented__item{cursor:pointer;border-radius:calc(var(--el-border-radius-base) - 2px);flex:1;align-items:center;padding:0 11px;display:flex}.el-segmented__item:not(.is-disabled):not(.is-selected):hover{color:var(--el-segmented-item-hover-color);background:var(--el-segmented-item-hover-bg-color)}.el-segmented__item:not(.is-disabled):not(.is-selected):active{background:var(--el-segmented-item-active-bg-color)}.el-segmented__item.is-selected,.el-segmented__item.is-selected.is-disabled{color:var(--el-segmented-item-selected-color)}.el-segmented__item.is-disabled{cursor:not-allowed;color:var(--el-segmented-item-disabled-color)}.el-segmented__item-input{opacity:0;pointer-events:none;width:0;height:0;margin:0;position:absolute}.el-segmented__item-label{text-align:center;text-overflow:ellipsis;white-space:nowrap;z-index:1;flex:1;line-height:normal;transition:color .3s;overflow:hidden}.el-segmented.is-block{display:flex}.el-segmented.is-block .el-segmented__item{min-width:0}.el-segmented--large{border-radius:var(--el-border-radius-base);min-height:40px;font-size:16px}.el-segmented--large .el-segmented__item-selected{border-radius:calc(var(--el-border-radius-base) - 2px)}.el-segmented--large .el-segmented--vertical .el-segmented__item{padding:11px}.el-segmented--large .el-segmented__item{border-radius:calc(var(--el-border-radius-base) - 2px);padding:0 11px}.el-segmented--small{border-radius:calc(var(--el-border-radius-base) - 1px);min-height:24px;font-size:14px}.el-segmented--small .el-segmented__item-selected{border-radius:calc(calc(var(--el-border-radius-base) - 1px) - 2px)}.el-segmented--small .el-segmented--vertical .el-segmented__item{padding:7px}.el-segmented--small .el-segmented__item{border-radius:calc(calc(var(--el-border-radius-base) - 1px) - 2px);padding:0 7px}.el-mention{width:100%;position:relative}.el-mention__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light);box-shadow:var(--el-box-shadow-light)}.el-mention__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-border-color-light)}.el-mention__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-top-color:#0000;border-left-color:#0000}.el-mention__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:#0000;border-right-color:#0000}.el-mention__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-bottom-color:#0000;border-left-color:#0000}.el-mention__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-top-color:#0000;border-right-color:#0000}.el-mention-dropdown{--el-mention-font-size:var(--el-font-size-base);--el-mention-bg-color:var(--el-bg-color-overlay);--el-mention-shadow:var(--el-box-shadow-light);--el-mention-border:1px solid var(--el-border-color-light);--el-mention-option-color:var(--el-text-color-regular);--el-mention-option-height:34px;--el-mention-option-min-width:100px;--el-mention-option-hover-background:var(--el-fill-color-light);--el-mention-option-selected-color:var(--el-color-primary);--el-mention-option-disabled-color:var(--el-text-color-placeholder);--el-mention-option-loading-color:var(--el-text-color-secondary);--el-mention-option-loading-padding:10px 0;--el-mention-max-height:174px;--el-mention-padding:6px 0;--el-mention-header-padding:10px;--el-mention-footer-padding:10px}.el-mention-dropdown__item{font-size:var(--el-mention-font-size);white-space:nowrap;text-overflow:ellipsis;color:var(--el-mention-option-color);height:var(--el-mention-option-height);line-height:var(--el-mention-option-height);box-sizing:border-box;min-width:var(--el-mention-option-min-width);cursor:pointer;padding:0 20px;position:relative;overflow:hidden}.el-mention-dropdown__item.is-hovering{background-color:var(--el-mention-option-hover-background)}.el-mention-dropdown__item.is-selected{color:var(--el-mention-option-selected-color);font-weight:700}.el-mention-dropdown__item.is-disabled{color:var(--el-mention-option-disabled-color);cursor:not-allowed;background-color:unset}.el-mention-dropdown{z-index:calc(var(--el-index-top) + 1);border-radius:var(--el-border-radius-base);box-sizing:border-box}.el-mention-dropdown__loading{text-align:center;color:var(--el-mention-option-loading-color);min-width:var(--el-mention-option-min-width);margin:0;padding:10px 0;font-size:12px}.el-mention-dropdown__wrap{max-height:var(--el-mention-max-height)}.el-mention-dropdown__list{padding:var(--el-mention-padding);box-sizing:border-box;margin:0;list-style:none}.el-mention-dropdown__header{padding:var(--el-mention-header-padding);border-bottom:var(--el-mention-border)}.el-mention-dropdown__footer{padding:var(--el-mention-footer-padding);border-top:var(--el-mention-border)}.el-splitter{width:100%;height:100%;margin:0;padding:0;display:flex;position:relative}.el-splitter__mask{z-index:999;position:absolute;top:0;bottom:0;left:0;right:0}.el-splitter__mask-horizontal{cursor:ew-resize}.el-splitter__mask-vertical{cursor:ns-resize}.el-splitter__horizontal{flex-direction:row}.el-splitter__vertical{flex-direction:column}.el-splitter-bar{-webkit-user-select:none;user-select:none;flex:none;position:relative}.el-splitter-bar__dragger{z-index:1;background:0 0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.el-splitter-bar__dragger:before,.el-splitter-bar__dragger:after{content:"";background-color:var(--el-border-color-light);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.el-splitter-bar__dragger:not(.is-lazy):after{display:none}.el-splitter-bar__dragger:after{opacity:.4}.el-splitter-bar__dragger:hover:not(.is-disabled):before{background-color:var(--el-color-primary-light-5)}.el-splitter-bar__dragger-horizontal:before,.el-splitter-bar__dragger-horizontal:after{width:2px;height:100%}.el-splitter-bar__dragger-vertical:before,.el-splitter-bar__dragger-vertical:after{width:100%;height:2px}.el-splitter-bar__dragger-active:before,.el-splitter-bar__dragger-active:after{background-color:var(--el-color-primary-light-3)}.el-splitter-bar__dragger-active.el-splitter-bar__dragger-horizontal:after{transform:translate(calc(-50% + var(--el-splitter-bar-offset)),-50%)}.el-splitter-bar__dragger-active.el-splitter-bar__dragger-vertical:after{transform:translate(-50%,calc(-50% + var(--el-splitter-bar-offset)))}.el-splitter-bar:hover .el-splitter-bar__collapse-icon{opacity:1}.el-splitter-bar__collapse-icon{background:var(--el-border-color-light);cursor:pointer;opacity:0;z-index:9;border-radius:2px;justify-content:center;align-items:center;display:flex;position:absolute}.el-splitter-bar__collapse-icon:hover{opacity:1;background-color:var(--el-color-primary-light-5)}.el-splitter-bar__horizontal-collapse-icon-start{width:16px;height:24px;top:50%;left:-12px;transform:translate(-50%,-50%)}.el-splitter-bar__horizontal-collapse-icon-end{width:16px;height:24px;top:50%;left:12px;transform:translate(-50%,-50%)}.el-splitter-bar__vertical-collapse-icon-start{width:24px;height:16px;top:-12px;right:50%;transform:translate(50%,-50%)}.el-splitter-bar__vertical-collapse-icon-end{width:24px;height:16px;top:12px;right:50%;transform:translate(50%,-50%)}.el-splitter-panel{scrollbar-width:thin;box-sizing:border-box;flex-grow:0;overflow:auto}:root{--bg: #f5f7fa;--bg-card: #ffffff;--bg-input: #f5f7fa;--text: #303133;--text2: #909399;--text3: #c0c4cc;--border: #e4e7ed;--primary: #409eff;--primary-light: rgba(64, 158, 255, .08);--shadow: 0 2px 12px rgba(0, 0, 0, .06);--hover: #f5f7fa}[data-theme=dark]{--bg: #141414;--bg-card: #1f1f1f;--bg-input: #2a2a2a;--text: #e5e5e5;--text2: #999999;--text3: #666666;--border: #333333;--primary: #409eff;--primary-light: rgba(64, 158, 255, .15);--shadow: 0 2px 12px rgba(0, 0, 0, .3);--hover: #2a2a2a}[data-theme=dark] body{background:var(--bg);color:var(--text)}[data-theme=dark] .el-card,[data-theme=dark] .el-dialog,[data-theme=dark] .el-menu{background-color:var(--bg-card)!important;border-color:var(--border)!important;color:var(--text)!important}[data-theme=dark] .el-input__wrapper,[data-theme=dark] .el-select .el-input__wrapper{background-color:var(--bg-input)!important;border-color:var(--border)!important}[data-theme=dark] .el-input__inner,[data-theme=dark] .el-textarea__inner{background-color:var(--bg-input)!important;color:var(--text)!important}[data-theme=dark] .el-button--default{background:var(--bg-card);border-color:var(--border);color:var(--text)}[data-theme=dark] .rank-panel,[data-theme=dark] .rank-item{background:var(--bg-card);border-color:var(--border)}[data-theme=dark] .panel-title,[data-theme=dark] .rank-name,[data-theme=dark] .card-title{color:var(--text)}[data-theme=dark] .card-meta,[data-theme=dark] .rank-cnt,[data-theme=dark] .panel-footer span:first-child{color:var(--text2)}[data-theme=dark] .site-footer{background:var(--bg-card);border-color:var(--border);color:var(--text2)}.theme-toggle{position:fixed;bottom:24px;right:24px;z-index:99;width:44px;height:44px;border-radius:50%;border:1px solid var(--border);background:var(--bg-card);cursor:pointer;font-size:20px;display:flex;align-items:center;justify-content:center;box-shadow:var(--shadow);transition:all .3s}.theme-toggle:hover{transform:scale(1.1);border-color:var(--primary)}#app{min-height:100vh;background:var(--bg);color:var(--text)}*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;color:#333;background:#f5f7fa}:root{--primary-color: #409eff;--primary-dark: #337ecc;--text-secondary: #909399;--border-color: #e4e7ed;--bg-white: #ffffff;--shadow-card: 0 2px 12px rgba(0, 0, 0, .08);--radius-card: 12px}a{text-decoration:none;color:var(--primary-color)} diff --git a/source_clean/frontend/disclaimer/index.html b/source_clean/frontend/disclaimer/index.html new file mode 100755 index 0000000..6735c1a --- /dev/null +++ b/source_clean/frontend/disclaimer/index.html @@ -0,0 +1,72 @@ + + + + + +免责声明 - 资源分享 + + + +
+

📜 网站免责声明

+ +

一、版权与资源声明

+

本网站(hk-zy.timaa.cn)是一个基于开源项目搭建的非盈利性个人站点,旨在分享与交流技术资源。本网站所有资源均收集整理自互联网,其版权、著作权均归原作者或发行公司所有。本网站不对资源的版权归属进行实质审查,对于任何由资源本身引发的版权争议概不负责。

+ +

二、使用限制与法律责任

+

用户在本网站下载的所有软件、资料等资源,仅供个人学习、研究、技术交流,严禁用于任何商业或非法用途。用户必须在下载后的24小时内,从个人电脑及存储设备中彻底删除相关内容。如用户喜欢该程序或内容,请支持正版,到官方网站购买注册。

+

因用户不当使用(包括但不限于商业使用、非法传播、破解侵权)而引发的一切法律纠纷及后果,由用户自行承担,本网站及网站管理者不承担任何连带责任。

+ +

三、"避风港原则"与侵权处理

+

依据《信息网络传播权保护条例》,本网站仅提供信息存储空间服务或资源索引服务。若用户上传或分享的内容侵犯了您的合法权益,请您立即通过以下联系方式与我们交涉。

+

联系方式: 3337598077@qq.com

+

处理措施: 我们在收到权利人发出的合格通知(包括权属证明和侵权链接)后,将在合理期限内对涉嫌侵权内容进行核实、断开链接或直接删除。

+

唯一目的: 本网站为纯公益、非盈利性分享,绝无意侵害任何第三方权益。若内容涉及侵权,实属无意,请版权方及时通知以便我们处理。

+ +

四、用户行为与网站免责

+

访问者在本网站进行下载、浏览时,须自行承担风险。本网站不保证资源完全无毒、无缺陷或绝对安全,对于因使用本站资源而造成的硬件损坏、数据丢失等损失,本网站不负任何责任。

+

本站内容仅代表资源提供者的个人观点,不代表本站立场。对于任何站点外部链接的真实性、合法性,本站不承担担保责任。

+

凡以任何方式登陆本网站或直接、间接使用本网站资源者,视为自愿接受本网站免责声明的约束。

+ +

五、法律适用

+

本声明未涉及的问题参见国家有关法律法规。当本声明与国家法律法规冲突时,以国家法律法规为准。本网站保留对本声明的最终解释权。

+ + +
+ + diff --git a/source_clean/frontend/h5/index.html b/source_clean/frontend/h5/index.html new file mode 100755 index 0000000..bf89fbb --- /dev/null +++ b/source_clean/frontend/h5/index.html @@ -0,0 +1,923 @@ + + + + + + + + + CloudSearch - 搜索 + + + + + +
+ +
+
+ + +
+
+
+
+
+ + + +
+ + +
+ + + + + + diff --git a/source_clean/frontend/index.html b/source_clean/frontend/index.html new file mode 100644 index 0000000..be04807 --- /dev/null +++ b/source_clean/frontend/index.html @@ -0,0 +1,30 @@ + + + + + + CloudSearch - 网盘资源搜索 + + + + + + +
+ + diff --git a/source_clean/package-lock.json b/source_clean/package-lock.json new file mode 100644 index 0000000..995ffbc --- /dev/null +++ b/source_clean/package-lock.json @@ -0,0 +1,2600 @@ +{ + "name": "cloudsearch-backend", + "version": "2.0.26", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "cloudsearch-backend", + "version": "2.0.26", + "dependencies": { + "bcryptjs": "^2.4.3", + "better-sqlite3": "^11.0.0", + "cors": "^2.8.5", + "express": "^4.21.0", + "express-rate-limit": "^7.4.0", + "helmet": "^8.0.0", + "https-proxy-agent": "^9.0.0", + "ioredis": "^5.4.0", + "jsonwebtoken": "^9.0.2", + "jsqr": "^1.4.0", + "morgan": "^1.10.0", + "multer": "^1.4.5-lts.1", + "playwright": "^1.52.0", + "sharp": "^0.33.0", + "socks-proxy-agent": "^10.0.0", + "uuid": "^10.0.0" + }, + "devDependencies": { + "@types/bcryptjs": "^2.4.6", + "@types/better-sqlite3": "^7.6.11", + "@types/cors": "^2.8.17", + "@types/express": "^5.0.0", + "@types/jsonwebtoken": "^9.0.6", + "@types/morgan": "^1.9.9", + "@types/multer": "^1.4.12", + "@types/uuid": "^10.0.0", + "tsx": "^4.19.0", + "typescript": "^5.9.3", + "vitest": "^2.1.0" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.7", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.0.4", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.33.5", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.0.4" + } + }, + "node_modules/@ioredis/commands": { + "version": "1.5.1", + "license": "MIT" + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.60.2", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.60.2", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@types/bcryptjs": { + "version": "2.4.6", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/better-sqlite3": { + "version": "7.6.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/cors": { + "version": "2.8.19", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/express": { + "version": "5.0.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^5.0.0", + "@types/serve-static": "^2" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "5.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/jsonwebtoken": { + "version": "9.0.10", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/ms": "*", + "@types/node": "*" + } + }, + "node_modules/@types/morgan": { + "version": "1.9.10", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/ms": { + "version": "2.1.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/multer": { + "version": "1.4.13", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/node": { + "version": "25.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.19.0" + } + }, + "node_modules/@types/qs": { + "version": "6.15.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "1.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*" + } + }, + "node_modules/@types/uuid": { + "version": "10.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/@vitest/expect": { + "version": "2.1.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "2.1.9", + "@vitest/utils": "2.1.9", + "chai": "^5.1.2", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "2.1.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "2.1.9", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.12" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "2.1.9", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "2.1.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "2.1.9", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "2.1.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "2.1.9", + "magic-string": "^0.30.12", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "2.1.9", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^3.0.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "2.1.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "2.1.9", + "loupe": "^3.1.2", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/agent-base": { + "version": "9.0.0", + "license": "MIT", + "engines": { + "node": ">= 20" + } + }, + "node_modules/append-field": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "license": "MIT" + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/basic-auth": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/basic-auth/node_modules/safe-buffer": { + "version": "5.1.2", + "license": "MIT" + }, + "node_modules/bcryptjs": { + "version": "2.4.3", + "license": "MIT" + }, + "node_modules/better-sqlite3": { + "version": "11.10.0", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "bindings": "^1.5.0", + "prebuild-install": "^7.1.1" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/body-parser": { + "version": "1.20.5", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.15.1", + "raw-body": "~2.5.3", + "type-is": "~1.6.18", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.15.1", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "license": "BSD-3-Clause" + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "license": "MIT" + }, + "node_modules/busboy": { + "version": "1.6.0", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chai": { + "version": "5.3.3", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/check-error": { + "version": "2.1.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "license": "ISC" + }, + "node_modules/cluster-key-slot": { + "version": "1.1.2", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color": { + "version": "4.2.3", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "license": "MIT" + }, + "node_modules/color-string": { + "version": "1.9.1", + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "engines": [ + "node >= 0.8" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.7", + "license": "MIT" + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.6", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "5.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/denque": { + "version": "2.1.0", + "license": "Apache-2.0", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "dev": true, + "license": "MIT" + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.27.7", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.7", + "@esbuild/android-arm": "0.27.7", + "@esbuild/android-arm64": "0.27.7", + "@esbuild/android-x64": "0.27.7", + "@esbuild/darwin-arm64": "0.27.7", + "@esbuild/darwin-x64": "0.27.7", + "@esbuild/freebsd-arm64": "0.27.7", + "@esbuild/freebsd-x64": "0.27.7", + "@esbuild/linux-arm": "0.27.7", + "@esbuild/linux-arm64": "0.27.7", + "@esbuild/linux-ia32": "0.27.7", + "@esbuild/linux-loong64": "0.27.7", + "@esbuild/linux-mips64el": "0.27.7", + "@esbuild/linux-ppc64": "0.27.7", + "@esbuild/linux-riscv64": "0.27.7", + "@esbuild/linux-s390x": "0.27.7", + "@esbuild/linux-x64": "0.27.7", + "@esbuild/netbsd-arm64": "0.27.7", + "@esbuild/netbsd-x64": "0.27.7", + "@esbuild/openbsd-arm64": "0.27.7", + "@esbuild/openbsd-x64": "0.27.7", + "@esbuild/openharmony-arm64": "0.27.7", + "@esbuild/sunos-x64": "0.27.7", + "@esbuild/win32-arm64": "0.27.7", + "@esbuild/win32-ia32": "0.27.7", + "@esbuild/win32-x64": "0.27.7" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "license": "MIT" + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/expand-template": { + "version": "2.0.3", + "license": "(MIT OR WTFPL)", + "engines": { + "node": ">=6" + } + }, + "node_modules/expect-type": { + "version": "1.3.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/express": { + "version": "4.22.1", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "~1.20.3", + "content-disposition": "~0.5.4", + "content-type": "~1.0.4", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "~0.1.12", + "proxy-addr": "~2.0.7", + "qs": "~6.14.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "~0.19.0", + "serve-static": "~1.16.2", + "setprototypeof": "1.2.0", + "statuses": "~2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express-rate-limit": { + "version": "7.5.1", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/express-rate-limit" + }, + "peerDependencies": { + "express": ">= 4.11" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/finalhandler": { + "version": "1.3.2", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "statuses": "~2.0.2", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-tsconfig": { + "version": "4.14.0", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/github-from-package": { + "version": "0.0.0", + "license": "MIT" + }, + "node_modules/gopd": { + "version": "1.2.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.3", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/helmet": { + "version": "8.1.0", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/https-proxy-agent": { + "version": "9.0.0", + "license": "MIT", + "dependencies": { + "agent-base": "9.0.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.4.3", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/https-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "license": "MIT" + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inherits": { + "version": "2.0.4", + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "license": "ISC" + }, + "node_modules/ioredis": { + "version": "5.10.1", + "license": "MIT", + "dependencies": { + "@ioredis/commands": "1.5.1", + "cluster-key-slot": "^1.1.0", + "debug": "^4.3.4", + "denque": "^2.1.0", + "lodash.defaults": "^4.2.0", + "lodash.isarguments": "^3.1.0", + "redis-errors": "^1.2.0", + "redis-parser": "^3.0.0", + "standard-as-callback": "^2.1.0" + }, + "engines": { + "node": ">=12.22.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ioredis" + } + }, + "node_modules/ioredis/node_modules/debug": { + "version": "4.4.3", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/ioredis/node_modules/ms": { + "version": "2.1.3", + "license": "MIT" + }, + "node_modules/ip-address": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.2.0.tgz", + "integrity": "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arrayish": { + "version": "0.3.4", + "license": "MIT" + }, + "node_modules/isarray": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/jsonwebtoken": { + "version": "9.0.3", + "license": "MIT", + "dependencies": { + "jws": "^4.0.1", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/ms": { + "version": "2.1.3", + "license": "MIT" + }, + "node_modules/jsqr": { + "version": "1.4.0", + "license": "Apache-2.0" + }, + "node_modules/jwa": { + "version": "2.0.1", + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "^1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "4.0.1", + "license": "MIT", + "dependencies": { + "jwa": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "license": "MIT" + }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "license": "MIT" + }, + "node_modules/lodash.isarguments": { + "version": "3.1.0", + "license": "MIT" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "license": "MIT" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "license": "MIT" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "license": "MIT" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "license": "MIT" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "license": "MIT" + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "license": "MIT" + }, + "node_modules/loupe": { + "version": "3.2.1", + "dev": true, + "license": "MIT" + }, + "node_modules/magic-string": { + "version": "0.30.21", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "license": "MIT" + }, + "node_modules/morgan": { + "version": "1.10.1", + "license": "MIT", + "dependencies": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.1.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/morgan/node_modules/on-finished": { + "version": "2.3.0", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "license": "MIT" + }, + "node_modules/multer": { + "version": "1.4.5-lts.2", + "license": "MIT", + "dependencies": { + "append-field": "^1.0.0", + "busboy": "^1.0.0", + "concat-stream": "^1.5.2", + "mkdirp": "^0.5.4", + "object-assign": "^4.1.1", + "type-is": "^1.6.4", + "xtend": "^4.0.0" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/nanoid": { + "version": "3.3.11", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/napi-build-utils": { + "version": "2.0.0", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-abi": { + "version": "3.89.0", + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.1.0", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.13", + "license": "MIT" + }, + "node_modules/pathe": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, + "node_modules/pathval": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "dev": true, + "license": "ISC" + }, + "node_modules/playwright": { + "version": "1.59.1", + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.59.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.59.1", + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/postcss": { + "version": "8.5.12", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prebuild-install": { + "version": "7.1.3", + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^2.0.0", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "license": "MIT" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pump": { + "version": "3.0.4", + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/qs": { + "version": "6.14.2", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.3", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "license": "MIT" + }, + "node_modules/redis-errors": { + "version": "1.2.0", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/redis-parser": { + "version": "3.0.0", + "license": "MIT", + "dependencies": { + "redis-errors": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/rollup": { + "version": "4.60.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.60.2", + "@rollup/rollup-android-arm64": "4.60.2", + "@rollup/rollup-darwin-arm64": "4.60.2", + "@rollup/rollup-darwin-x64": "4.60.2", + "@rollup/rollup-freebsd-arm64": "4.60.2", + "@rollup/rollup-freebsd-x64": "4.60.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.60.2", + "@rollup/rollup-linux-arm-musleabihf": "4.60.2", + "@rollup/rollup-linux-arm64-gnu": "4.60.2", + "@rollup/rollup-linux-arm64-musl": "4.60.2", + "@rollup/rollup-linux-loong64-gnu": "4.60.2", + "@rollup/rollup-linux-loong64-musl": "4.60.2", + "@rollup/rollup-linux-ppc64-gnu": "4.60.2", + "@rollup/rollup-linux-ppc64-musl": "4.60.2", + "@rollup/rollup-linux-riscv64-gnu": "4.60.2", + "@rollup/rollup-linux-riscv64-musl": "4.60.2", + "@rollup/rollup-linux-s390x-gnu": "4.60.2", + "@rollup/rollup-linux-x64-gnu": "4.60.2", + "@rollup/rollup-linux-x64-musl": "4.60.2", + "@rollup/rollup-openbsd-x64": "4.60.2", + "@rollup/rollup-openharmony-arm64": "4.60.2", + "@rollup/rollup-win32-arm64-msvc": "4.60.2", + "@rollup/rollup-win32-ia32-msvc": "4.60.2", + "@rollup/rollup-win32-x64-gnu": "4.60.2", + "@rollup/rollup-win32-x64-msvc": "4.60.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup/node_modules/@types/estree": { + "version": "1.0.8", + "dev": true, + "license": "MIT" + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.4", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.19.2", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.4.1", + "range-parser": "~1.2.1", + "statuses": "~2.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.16.3", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "~0.19.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "license": "ISC" + }, + "node_modules/sharp": { + "version": "0.33.5", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.3", + "semver": "^7.6.3" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.33.5", + "@img/sharp-darwin-x64": "0.33.5", + "@img/sharp-libvips-darwin-arm64": "1.0.4", + "@img/sharp-libvips-darwin-x64": "1.0.4", + "@img/sharp-libvips-linux-arm": "1.0.5", + "@img/sharp-libvips-linux-arm64": "1.0.4", + "@img/sharp-libvips-linux-s390x": "1.0.4", + "@img/sharp-libvips-linux-x64": "1.0.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", + "@img/sharp-libvips-linuxmusl-x64": "1.0.4", + "@img/sharp-linux-arm": "0.33.5", + "@img/sharp-linux-arm64": "0.33.5", + "@img/sharp-linux-s390x": "0.33.5", + "@img/sharp-linux-x64": "0.33.5", + "@img/sharp-linuxmusl-arm64": "0.33.5", + "@img/sharp-linuxmusl-x64": "0.33.5", + "@img/sharp-wasm32": "0.33.5", + "@img/sharp-win32-ia32": "0.33.5", + "@img/sharp-win32-x64": "0.33.5" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/simple-get": { + "version": "4.0.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.4", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.8.tgz", + "integrity": "sha512-NlGELfPrgX2f1TAAcz0WawlLn+0r3FyhhCRpFFK2CemXenPYvzMWWZINv3eDNo9ucdwme7oCHRY0Jnbs4aIkog==", + "license": "MIT", + "dependencies": { + "ip-address": "^10.1.1", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-10.0.0.tgz", + "integrity": "sha512-pyp2YR3mNxAMu0mGLtzs4g7O3uT4/9sQOLAKcViAkaS9fJWkud7nmaf6ZREFqQEi24IPkBcjfHjXhPTUWjo3uA==", + "license": "MIT", + "dependencies": { + "agent-base": "9.0.0", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/socks-proxy-agent/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socks-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/standard-as-callback": { + "version": "2.1.0", + "license": "MIT" + }, + "node_modules/statuses": { + "version": "2.0.2", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/std-env": { + "version": "3.10.0", + "dev": true, + "license": "MIT" + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "license": "MIT" + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tar-fs": { + "version": "2.1.4", + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.2", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/tinybench": { + "version": "2.9.0", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "dev": true, + "license": "MIT" + }, + "node_modules/tinypool": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tsx": { + "version": "4.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.27.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "license": "MIT" + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "7.19.2", + "dev": true, + "license": "MIT" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "10.0.0", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vite": { + "version": "5.4.21", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "2.1.9", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.3.7", + "es-module-lexer": "^1.5.4", + "pathe": "^1.1.2", + "vite": "^5.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vite-node/node_modules/debug": { + "version": "4.4.3", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/vite-node/node_modules/ms": { + "version": "2.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/vite/node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/esbuild": { + "version": "0.21.5", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/vitest": { + "version": "2.1.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "2.1.9", + "@vitest/mocker": "2.1.9", + "@vitest/pretty-format": "^2.1.9", + "@vitest/runner": "2.1.9", + "@vitest/snapshot": "2.1.9", + "@vitest/spy": "2.1.9", + "@vitest/utils": "2.1.9", + "chai": "^5.1.2", + "debug": "^4.3.7", + "expect-type": "^1.1.0", + "magic-string": "^0.30.12", + "pathe": "^1.1.2", + "std-env": "^3.8.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.1", + "tinypool": "^1.0.1", + "tinyrainbow": "^1.2.0", + "vite": "^5.0.0", + "vite-node": "2.1.9", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "2.1.9", + "@vitest/ui": "2.1.9", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/debug": { + "version": "4.4.3", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/vitest/node_modules/ms": { + "version": "2.1.3", + "dev": true, + "license": "MIT" + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "license": "ISC" + }, + "node_modules/xtend": { + "version": "4.0.2", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + } + } +} diff --git a/source_clean/package.json b/source_clean/package.json new file mode 100755 index 0000000..0538429 --- /dev/null +++ b/source_clean/package.json @@ -0,0 +1,43 @@ +{ + "name": "cloudsearch-backend", + "version": "2.0.26", + "private": true, + "scripts": { + "dev": "tsx watch src/main.ts", + "build": "tsc", + "start": "node dist/main.js", + "test": "vitest run", + "test:watch": "vitest" + }, + "dependencies": { + "bcryptjs": "^2.4.3", + "better-sqlite3": "^11.0.0", + "cors": "^2.8.5", + "express": "^4.21.0", + "express-rate-limit": "^7.4.0", + "helmet": "^8.0.0", + "https-proxy-agent": "^9.0.0", + "ioredis": "^5.4.0", + "jsonwebtoken": "^9.0.2", + "jsqr": "^1.4.0", + "morgan": "^1.10.0", + "multer": "^1.4.5-lts.1", + "playwright": "^1.52.0", + "sharp": "^0.33.0", + "socks-proxy-agent": "^10.0.0", + "uuid": "^10.0.0" + }, + "devDependencies": { + "@types/bcryptjs": "^2.4.6", + "@types/better-sqlite3": "^7.6.11", + "@types/cors": "^2.8.17", + "@types/express": "^5.0.0", + "@types/jsonwebtoken": "^9.0.6", + "@types/morgan": "^1.9.9", + "@types/multer": "^1.4.12", + "@types/uuid": "^10.0.0", + "tsx": "^4.19.0", + "typescript": "^5.9.3", + "vitest": "^2.1.0" + } +} diff --git a/source_clean/src/admin/auth.service.ts b/source_clean/src/admin/auth.service.ts new file mode 100755 index 0000000..10a164d --- /dev/null +++ b/source_clean/src/admin/auth.service.ts @@ -0,0 +1,76 @@ +import jwt from 'jsonwebtoken'; +import bcrypt from 'bcryptjs'; +import { Request, Response, NextFunction } from 'express'; +import config from '../config'; +import { getDb } from '../database/database'; + +export interface AuthPayload { + id: number; + username: string; +} + +export function login(username: string, password: string): string | null { + const db = getDb(); + const row = db.prepare('SELECT id, username, password_hash FROM admins WHERE username = ?').get(username) as any; + + if (!row) return null; + + const valid = bcrypt.compareSync(password, row.password_hash); + if (!valid) return null; + + // Update last login + db.prepare('UPDATE admins SET last_login = datetime(\'now\') WHERE id = ?').run(row.id); + + // Generate JWT + const payload: AuthPayload = { id: row.id, username: row.username }; + const token = jwt.sign(payload, config.jwtSecret, { expiresIn: '24h' }); + + return token; +} + +export function verifyToken(token: string): AuthPayload | null { + try { + const decoded = jwt.verify(token, config.jwtSecret) as AuthPayload; + return decoded; + } catch { + return null; + } +} + +export function authMiddleware(req: Request, res: Response, next: NextFunction): void { + const authHeader = req.headers.authorization; + + if (!authHeader || !authHeader.startsWith('Bearer ')) { + res.status(401).json({ error: 'Missing or invalid authorization header', code: 401 }); + return; + } + + const token = authHeader.split(' ')[1]; + const payload = verifyToken(token); + + if (!payload) { + res.status(401).json({ error: 'Invalid or expired token', code: 401 }); + return; + } + + (req as any).user = payload; + next(); +} + +export function changePassword(username: string, oldPassword: string, newPassword: string): { success: boolean; message: string } { + const db = getDb(); + const row = db.prepare('SELECT id, password_hash FROM admins WHERE username = ?').get(username) as any; + if (!row) { + return { success: false, message: '用户不存在' }; + } + + const valid = bcrypt.compareSync(oldPassword, row.password_hash); + if (!valid) { + return { success: false, message: '原密码错误' }; + } + + const salt = bcrypt.genSaltSync(10); + const hash = bcrypt.hashSync(newPassword, salt); + db.prepare("UPDATE admins SET password_hash = ? WHERE id = ?").run(hash, row.id); + return { success: true, message: '密码修改成功' }; +} diff --git a/source_clean/src/admin/stats.service.ts b/source_clean/src/admin/stats.service.ts new file mode 100755 index 0000000..3412e97 --- /dev/null +++ b/source_clean/src/admin/stats.service.ts @@ -0,0 +1,161 @@ +import { getDb } from '../database/database'; +import { formatLocalDate } from '../utils/time'; + +export interface AdminStats { + todaySearches: number; + todaySaves: number; + monthSearches: number; + monthSaves: number; + totalSearches: number; + totalSaves: number; + hotKeywords: Array<{ keyword: string; count: number }>; + trendTrend: Array<{ date: string; searches: number; saves: number; searchDelta: number; saveDelta: number }>; + cloudUsage: Array<{ + cloudType: string; + nickname: string; + storageUsed: string; + storageTotal: string; + isActive: boolean; + }>; + topIps: Array<{ ip: string; ip_location: string | null; count: number }>; + provinceRankings: Array<{ province: string; count: number }>; +} + +/** + * Get today's date string in the configured timezone (e.g. "2026-05-04"). + * Delegates to shared formatLocalDate() in utils/time.ts. + */ +function todayLocalDate(): string { + return formatLocalDate(); +} + +/** + * Get the first day of the current month in the configured timezone. + */ +function monthStartLocalDate(): string { + return todayLocalDate().slice(0, 7) + '-01'; +} + +export function getStats(trendDays: number = 7): AdminStats { + const db = getDb(); + + // Use local timezone date — NOT UTC via toISOString() + const today = todayLocalDate(); + const monthStart = monthStartLocalDate(); + + // IMPORTANT: created_at is stored as "YYYY-MM-DDTHH:mm:ss+08:00" (localTimestamp) + // SQLite's date() function would interpret the +08:00 timezone offset and + // convert to UTC, giving wrong date. Instead, use SUBSTR to get first 10 chars. + const todaySearchesRow = db.prepare( + "SELECT COUNT(*) as count FROM search_stats WHERE SUBSTR(created_at, 1, 10) = ?" + ).get(today) as any; + + const todaySavesRow = db.prepare( + "SELECT COUNT(*) as count FROM save_records WHERE SUBSTR(created_at, 1, 10) = ?" + ).get(today) as any; + + const monthSearchesRow = db.prepare( + "SELECT COUNT(*) as count FROM search_stats WHERE SUBSTR(created_at, 1, 10) >= ?" + ).get(monthStart) as any; + + const monthSavesRow = db.prepare( + "SELECT COUNT(*) as count FROM save_records WHERE SUBSTR(created_at, 1, 10) >= ?" + ).get(monthStart) as any; + + // Total searches + const totalSearchesRow = db.prepare( + "SELECT COUNT(*) as count FROM search_stats" + ).get() as any; + + // Total saves + const totalSavesRow = db.prepare( + "SELECT COUNT(*) as count FROM save_records" + ).get() as any; + + // Hot keywords + const hotKeywords = db.prepare( + 'SELECT keyword, search_count as count FROM hot_keywords ORDER BY search_count DESC LIMIT 20' + ).all() as Array<{ keyword: string; count: number }>; + + // Trend data (configurable days, default 7) + const trendLen = Math.min(Math.max(trendDays, 1), 90); + const trendTrend: Array<{ date: string; searches: number; saves: number; searchDelta: number; saveDelta: number }> = []; + for (let i = trendLen - 1; i >= 0; i--) { + const d = new Date(); + const target = new Date(d.getTime() - i * 86400000); + const dateStr = formatLocalDate(target); + const searchRow = db.prepare( + "SELECT COUNT(*) as count FROM search_stats WHERE SUBSTR(created_at, 1, 10) = ?" + ).get(dateStr) as any; + const saveRow = db.prepare( + "SELECT COUNT(*) as count FROM save_records WHERE SUBSTR(created_at, 1, 10) = ?" + ).get(dateStr) as any; + trendTrend.push({ + date: dateStr, + searches: searchRow?.count || 0, + saves: saveRow?.count || 0, + searchDelta: 0, + saveDelta: 0, + }); + } + // Compute day-over-day delta (absolute change from previous day) + for (let i = trendTrend.length - 1; i > 0; i--) { + const prev = trendTrend[i - 1]; + const curr = trendTrend[i]; + curr.searchDelta = curr.searches - prev.searches; + curr.saveDelta = curr.saves - prev.saves; + } + + // Cloud usage + const cloudUsage = db.prepare( + 'SELECT cloud_type as cloudType, nickname, storage_used as storageUsed, storage_total as storageTotal, is_active as isActive FROM cloud_configs ORDER BY id ASC' + ).all() as Array<{ + cloudType: string; + nickname: string; + storageUsed: string; + storageTotal: string; + isActive: boolean; + }>; + + // Top IPs from save_records — correctly count total per IP, then get latest location + const topIps = db.prepare( + `SELECT ip_address as ip, COUNT(*) as count, + (SELECT ip_location FROM save_records s2 + WHERE s2.ip_address = s1.ip_address AND s2.ip_location IS NOT NULL AND s2.ip_location != '' + ORDER BY s2.created_at DESC LIMIT 1) as ip_location + FROM save_records s1 + WHERE ip_address IS NOT NULL AND ip_address != '' + GROUP BY ip_address + ORDER BY count DESC LIMIT 10` + ).all() as Array<{ ip: string; ip_location: string | null; count: number }>; + + // Province rankings — extract province from ip_location (first segment) + let provinceRankings: Array<{ province: string; count: number }> = []; + const locRows = db.prepare( + `SELECT ip_location FROM save_records WHERE ip_location IS NOT NULL AND ip_location != ''` + ).all() as Array<{ ip_location: string }>; + const provMap = new Map(); + for (const row of locRows) { + const parts = row.ip_location.trim().split(/\s+/); + const province = parts[0] || '未知'; + provMap.set(province, (provMap.get(province) || 0) + 1); + } + provinceRankings = Array.from(provMap.entries()) + .map(([province, count]) => ({ province, count })) + .sort((a, b) => b.count - a.count) + .slice(0, 15); + + return { + todaySearches: (todaySearchesRow as any)?.count || 0, + todaySaves: (todaySavesRow as any)?.count || 0, + monthSearches: (monthSearchesRow as any)?.count || 0, + monthSaves: (monthSavesRow as any)?.count || 0, + totalSearches: (totalSearchesRow as any)?.count || 0, + totalSaves: (totalSavesRow as any)?.count || 0, + hotKeywords, + trendTrend, + cloudUsage, + topIps, + provinceRankings, + }; +} diff --git a/source_clean/src/admin/system-config.service.ts b/source_clean/src/admin/system-config.service.ts new file mode 100755 index 0000000..6ee09ee --- /dev/null +++ b/source_clean/src/admin/system-config.service.ts @@ -0,0 +1,40 @@ +import { getDb } from '../database/database'; +import { localTimestamp } from '../utils/time'; + +export interface SystemConfigEntry { + key: string; + value: string; + description?: string; + updated_at?: string; +} + +export function getAllSystemConfigs(): SystemConfigEntry[] { + const db = getDb(); + return db.prepare('SELECT key, value, description, updated_at FROM system_configs ORDER BY key').all() as SystemConfigEntry[]; +} + +export function getSystemConfig(key: string): string | null { + const db = getDb(); + const row = db.prepare('SELECT value FROM system_configs WHERE key = ?').get(key) as { value: string } | undefined; + return row?.value ?? null; +} + +export function updateSystemConfig(key: string, value: string): void { + const db = getDb(); + db.prepare( + "UPDATE system_configs SET value = ?, updated_at = ? WHERE key = ?" + ).run(value, localTimestamp(), key); +} + +export function updateSystemConfigs(entries: { key: string; value: string }[]): void { + const db = getDb(); + const update = db.prepare( + "UPDATE system_configs SET value = ?, updated_at = ? WHERE key = ?" + ); + const tx = db.transaction((items: { key: string; value: string }[]) => { + for (const item of items) { + update.run(item.value, localTimestamp(), item.key); + } + }); + tx(entries); +} diff --git a/source_clean/src/cloud/checkin.service.ts b/source_clean/src/cloud/checkin.service.ts new file mode 100644 index 0000000..471a019 --- /dev/null +++ b/source_clean/src/cloud/checkin.service.ts @@ -0,0 +1,140 @@ +import { getDb } from '../database/database'; +import { localTimestamp, formatLocalDate } from '../utils/time'; +import { CloudConfig, getCloudConfigById } from './credential.service'; + +export async function dailyCheckIn(id: number): Promise<{ + success: boolean; + message: string; + signedDays?: number; +}> { + const db = getDb(); + const config = db.prepare( + 'SELECT * FROM cloud_configs WHERE id = ?' + ).get(id) as CloudConfig | undefined; + if (!config || !config.cookie) { + return { success: false, message: '未找到该网盘的有效配置' }; + } + try { + const { QuarkDriver } = require('./drivers/quark.driver'); + const driver = new QuarkDriver({ cookie: config.cookie }); + const result = await driver.checkIn(); + + if (result.success) { + db.prepare( + `UPDATE cloud_configs SET + checkin_status = 'success', + last_checkin_at = datetime('now','localtime'), + checkin_message = ?, + consecutive_failures = 0 + WHERE id = ?` + ).run(result.message || '签到成功', id); + } else { + db.prepare( + `UPDATE cloud_configs SET + checkin_status = 'failed', + last_checkin_at = datetime('now','localtime'), + checkin_message = ?, + consecutive_failures = consecutive_failures + 1 + WHERE id = ?` + ).run(result.message || '签到失败', id); + } + + try { + const storage = await driver.getStorageInfo(); + db.prepare( + `UPDATE cloud_configs SET storage_used = ?, storage_total = ? WHERE id = ?` + ).run(storage.used, storage.total, id); + } catch { + // Storage info fetch is best-effort + } + + return result; + } catch (err: any) { + db.prepare( + `UPDATE cloud_configs SET + checkin_status = 'failed', + last_checkin_at = datetime('now','localtime'), + checkin_message = ?, + consecutive_failures = consecutive_failures + 1 + WHERE id = ?` + ).run(err.message || '签到失败:未知错误', id); + + return { success: false, message: `签到失败:${err.message || '未知错误'}` }; + } +} + +/** Get all quark drives that need checkin today. */ +export function getDrivesForCheckin(): CloudConfig[] { + const db = getDb(); + return db.prepare( + `SELECT * FROM cloud_configs + WHERE cloud_type = 'quark' AND is_active = 1 + AND (checkin_status IS NULL OR checkin_status != 'success' + OR last_checkin_at IS NULL + OR last_checkin_at < date('now','localtime'))` + ).all() as CloudConfig[]; +} + +/** Skip checkin for a drive. */ +export function skipCheckin(id: number): boolean { + const db = getDb(); + const result = db.prepare( + `UPDATE cloud_configs SET + checkin_status = 'skipped', + last_checkin_at = datetime('now','localtime'), + checkin_message = '已跳过签到' + WHERE id = ?` + ).run(id); + return result.changes > 0; +} + +/** Get today's checkin summary for quark drives. */ +export function getCheckinSummary(): { + total: number; + success: number; + failed: number; + pending: number; + skipped: number; +} { + const db = getDb(); + const todayStr = formatLocalDate(); + + const all = db.prepare( + `SELECT checkin_status, COUNT(*) as count FROM cloud_configs + WHERE cloud_type = 'quark' AND is_active = 1 + GROUP BY checkin_status` + ).all() as { checkin_status: string; count: number }[]; + + const neverCheckedInToday = db.prepare( + `SELECT COUNT(*) as count FROM cloud_configs + WHERE cloud_type = 'quark' AND is_active = 1 + AND (last_checkin_at IS NULL OR last_checkin_at < ?)` + ).get(todayStr) as { count: number }; + + const summary: Record = { + success: 0, + failed: 0, + pending: 0, + skipped: 0, + }; + + for (const row of all) { + if (row.checkin_status === 'none' || row.checkin_status === null) { + summary.pending += row.count; + } else if (row.checkin_status in summary) { + summary[row.checkin_status] += row.count; + } + } + + summary.pending += neverCheckedInToday.count; + + const total = Object.values(summary).reduce((a, b) => a + b, 0); + + return { + total, + success: summary.success, + failed: summary.failed, + pending: summary.pending, + skipped: summary.skipped, + }; +} diff --git a/source_clean/src/cloud/cleanup.service.ts b/source_clean/src/cloud/cleanup.service.ts new file mode 100755 index 0000000..1c836c0 --- /dev/null +++ b/source_clean/src/cloud/cleanup.service.ts @@ -0,0 +1,254 @@ +import { getDb } from '../database/database'; +import { getSystemConfig, updateSystemConfig } from '../admin/system-config.service'; +import { formatLocalDate, formatLocalDateTime } from '../utils/time'; +import { QuarkDriver } from './drivers/quark.driver'; +import { BaiduDriver } from './drivers/baidu.driver'; + +// ═══════════════════════════════════════════════════════════════════════════ +// CloudCleanupDriver — contract that each cloud driver must fulfill +// to participate in the cleanup cycle. +// +// To add a new cloud type (e.g. Baidu, Aliyun), implement these three +// methods in the driver and register it in getDriverForCleanup() below. +// The controller (this file) handles WHEN and WITH WHAT parameters; +// the driver handles HOW. +// ═══════════════════════════════════════════════════════════════════════════ + +/** Each cleanup operation returns { trashed: number; errors: string[] } */ +interface CleanupOpResult { trashed: number; errors: string[] } + +interface CloudCleanupDriver { + /** Trash date folders (YYYY-MM-DD) older than `days`. */ + cleanupOldDateFolders(days: number): Promise; + /** + * If used space exceeds thresholdPercent% of TOTAL capacity, + * delete oldest date folders until totalBytes * deletePercent/100 + * of TOTAL capacity is freed. + * @param thresholdPercent — trigger when usage >= this % of total + * @param deletePercent — free this % of total capacity + */ + cleanupBySpaceThreshold(thresholdPercent: number, deletePercent: number): Promise; + /** Permanently empty the recycle bin. */ + emptyTrash(): Promise; +} + +// ═══════════════════════════════════════════════════════════════════════════ +// Driver factory — create the right driver for a given cloud config. +// When adding a new cloud type, add a case here. +// ═══════════════════════════════════════════════════════════════════════════ + +function getDriverForCleanup(config: { cloud_type: string; cookie: string }): CloudCleanupDriver | null { + switch (config.cloud_type) { + case 'quark': + return new QuarkDriver({ cookie: config.cookie }); + case 'baidu': + return new BaiduDriver({ cookie: config.cookie }); + // case 'aliyun': return new AliyunDriver({ cookie: config.cookie }); + default: + return null; + } +} + +// ═══════════════════════════════════════════════════════════════════════════ +// Cleanup controller — reads system configs and dispatches to each +// active cloud driver. Every driver receives the same parameters; +// the driver decides whether/how to act. +// ═══════════════════════════════════════════════════════════════════════════ + +interface CleanupStats { + filesTrashed: number; + logsDeleted: number; + trashEmptied: boolean; + errors: string[]; +} + +/** Get all active cloud configs (any type). Used by the orchestrator. */ +function getActiveCleanupConfigs(): Array<{ id: number; cloud_type: string; cookie: string; nickname?: string }> { + const db = getDb(); + return db.prepare( + `SELECT id, cloud_type, cookie, nickname FROM cloud_configs + WHERE is_active = 1 AND cookie IS NOT NULL AND cookie != ''` + ).all() as Array<{ id: number; cloud_type: string; cookie: string; nickname?: string }>; +} + +/** + * Dispatch cleanupOldDateFolders to every active driver. + * Each driver receives the same `days` parameter. + */ +async function cleanupCloudFiles(days: number): Promise { + const configs = getActiveCleanupConfigs(); + const errors: string[] = []; + let totalTrashed = 0; + + for (const cfg of configs) { + const driver = getDriverForCleanup(cfg); + if (!driver) { + console.log(`[Cleanup] No driver for cloud_type="${cfg.cloud_type}", skipping config #${cfg.id}`); + continue; + } + try { + const result = await driver.cleanupOldDateFolders(days); + totalTrashed += result.trashed; + errors.push(...result.errors.map(e => `[${cfg.cloud_type}#${cfg.id}] ${e}`)); + } catch (err: any) { + errors.push(`[${cfg.cloud_type}#${cfg.id}] cleanupOldDateFolders: ${err.message}`); + } + await new Promise(r => setTimeout(r, 1000)); + } + + return { trashed: totalTrashed, errors }; +} + +/** + * Dispatch cleanupBySpaceThreshold to every active driver. + * Each driver receives the same threshold/delete percentages. + */ +async function cleanupAllBySpaceThreshold( + thresholdPercent: number, + deletePercent: number, +): Promise { + const configs = getActiveCleanupConfigs(); + const errors: string[] = []; + let totalTrashed = 0; + + for (const cfg of configs) { + const driver = getDriverForCleanup(cfg); + if (!driver) { + console.log(`[Cleanup] No driver for cloud_type="${cfg.cloud_type}", skipping config #${cfg.id}`); + continue; + } + try { + const result = await driver.cleanupBySpaceThreshold(thresholdPercent, deletePercent); + totalTrashed += result.trashed; + errors.push(...result.errors.map(e => `[${cfg.cloud_type}#${cfg.id}] ${e}`)); + } catch (err: any) { + errors.push(`[${cfg.cloud_type}#${cfg.id}] cleanupBySpaceThreshold: ${err.message}`); + } + await new Promise(r => setTimeout(r, 1000)); + } + + return { trashed: totalTrashed, errors }; +} + +/** + * Dispatch emptyTrash to every active driver. + */ +export async function emptyAllTrash(): Promise<{ emptied: boolean; errors: string[] }> { + const configs = getActiveCleanupConfigs(); + const errors: string[] = []; + let emptied = false; + + for (const cfg of configs) { + const driver = getDriverForCleanup(cfg); + if (!driver) continue; + try { + const ok = await driver.emptyTrash(); + if (ok) { + emptied = true; + console.log(`[Cleanup] ✅ Emptied trash for [${cfg.cloud_type}#${cfg.id}]`); + } else { + errors.push(`[${cfg.cloud_type}#${cfg.id}] empty trash failed`); + } + } catch (err: any) { + errors.push(`[${cfg.cloud_type}#${cfg.id}]: ${err.message}`); + } + } + + return { emptied, errors }; +} + +/** + * Delete save_records older than the specified number of days. + */ +function cleanupLogs(days: number): number { + const db = getDb(); + const cutoffStr = formatLocalDateTime(new Date(Date.now() - days * 24 * 60 * 60 * 1000)); + + const result = db.prepare('DELETE FROM save_records WHERE created_at < ?').run(cutoffStr); + console.log(`[Cleanup] Deleted ${result.changes} save records older than ${days} days (before ${cutoffStr})`); + return result.changes; +} + +/** + * Run full cleanup cycle: + * 0. Force-clean by space threshold (if enabled & exceeded) — priority highest + * 1. Delete old save_records + * 2. Trash old date folders by retention days + * 3. Empty recycle bin (permanently free space) + */ +export async function runFullCleanup(): Promise { + const fileDays = parseInt(getSystemConfig('cleanup_file_retention_days') || '7', 10); + const logDays = parseInt(getSystemConfig('cleanup_log_retention_days') || '30', 10); + const emptyTrashEnabled = getSystemConfig('cleanup_empty_trash') !== 'false'; + + const stats: CleanupStats = { filesTrashed: 0, logsDeleted: 0, trashEmptied: false, errors: [] }; + + // 0. Space threshold (highest priority) + const thresholdEnabled = getSystemConfig('cleanup_space_threshold_enabled'); + if (thresholdEnabled === 'true') { + const thresholdPercent = parseInt(getSystemConfig('cleanup_space_threshold_percent') || '90', 10); + const deletePercent = parseInt(getSystemConfig('cleanup_space_threshold_delete_percent') || '10', 10); + if (thresholdPercent > 0 && thresholdPercent < 100) { + try { + const result = await cleanupAllBySpaceThreshold(thresholdPercent, deletePercent); + stats.filesTrashed += result.trashed; + stats.errors.push(...result.errors); + } catch (err: any) { + stats.errors.push(`空间阈值清理失败: ${err.message}`); + } + } + } + + // 1. Delete old save_records + try { + stats.logsDeleted = cleanupLogs(logDays); + } catch (err: any) { + stats.errors.push(`日志清理失败: ${err.message}`); + } + + // 2. Trash old files from cloud drives + try { + const result = await cleanupCloudFiles(fileDays); + stats.filesTrashed += result.trashed; + stats.errors.push(...result.errors); + } catch (err: any) { + stats.errors.push(`文件清理失败: ${err.message}`); + } + + // 3. Empty recycle bin (only if enabled, and only if we trashed something) + if (emptyTrashEnabled && stats.filesTrashed > 0) { + try { + const result = await emptyAllTrash(); + stats.trashEmptied = result.emptied; + stats.errors.push(...result.errors); + } catch (err: any) { + stats.errors.push(`清空回收站失败: ${err.message}`); + } + } + + // Save last run timestamp and stats + updateSystemConfig('cleanup_last_run', formatLocalDateTime()); + updateSystemConfig('cleanup_last_stats', + JSON.stringify({ filesTrashed: stats.filesTrashed, logsDeleted: stats.logsDeleted, trashEmptied: stats.trashEmptied, errors: stats.errors.length }) + ); + + return stats; +} + +/** + * Check if a daily cleanup is due and run it. + * Called periodically by the scheduler (setInterval). + */ +export async function checkAndRunScheduledCleanup(): Promise { + const enabled = getSystemConfig('cleanup_enabled'); + if (enabled !== 'true') return; + + const lastRun = getSystemConfig('cleanup_last_run'); + const todayStr = formatLocalDate(); + + if (lastRun && lastRun.startsWith(todayStr)) return; + + console.log(`[Cleanup] Scheduled cleanup starting at ${new Date().toISOString()}...`); + const stats = await runFullCleanup(); + console.log(`[Cleanup] Done: trashed ${stats.filesTrashed} folders, deleted ${stats.logsDeleted} logs, emptied trash: ${stats.trashEmptied}, errors: ${stats.errors.length}`); +} diff --git a/source_clean/src/cloud/cloud-types.service.ts b/source_clean/src/cloud/cloud-types.service.ts new file mode 100755 index 0000000..cf39b43 --- /dev/null +++ b/source_clean/src/cloud/cloud-types.service.ts @@ -0,0 +1,58 @@ +import { getSystemConfig } from '../admin/system-config.service'; + +export interface CloudTypeInfo { + type: string; + label: string; + icon: string; + enabled: boolean; +} + +/** Official brand icons — Baidu via SimpleIcons, Aliyun via SimpleIcons Alibaba Cloud. */ + +const ICONS: Record = { + baidu: 'data:image/svg+xml,%3Csvg%20fill%3D%22%232932E1%22%20role%3D%22img%22%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ctitle%3EBaidu%3C%2Ftitle%3E%3Cpath%20d%3D%22M9.154%200C7.71%200%206.54%201.658%206.54%203.707c0%202.051%201.171%203.71%202.615%203.71%201.446%200%202.614-1.659%202.614-3.71C11.768%201.658%2010.6%200%209.154%200zm7.025.594C14.86.58%2013.347%202.589%2013.2%203.927c-.187%201.745.25%203.487%202.179%203.735%201.933.25%203.175-1.806%203.422-3.364.252-1.555-.995-3.364-2.362-3.674a1.218%201.218%200%200%200-.261-.03zM3.582%205.535a2.811%202.811%200%200%200-.156.008c-2.118.19-2.428%203.24-2.428%203.24-.287%201.41.686%204.425%203.297%203.864%202.617-.561%202.262-3.68%202.183-4.362-.125-1.018-1.292-2.773-2.896-2.75zm16.534%201.753c-2.308%200-2.617%202.119-2.617%203.616%200%201.43.121%203.425%202.988%203.362%202.867-.063%202.553-3.238%202.553-3.988%200-.745-.62-2.99-2.924-2.99zm-8.264%202.478c-1.424.014-2.708.925-3.323%201.947-1.118%201.868-2.863%203.05-3.112%203.363-.25.309-3.61%202.116-2.864%205.42.746%203.301%203.365%203.237%203.365%203.237s1.93.19%204.171-.31c2.24-.495%204.17.123%204.17.123s5.233%201.748%206.665-1.616c1.43-3.364-.808-5.109-.808-5.109s-2.99-2.306-4.736-4.798c-1.072-1.665-2.348-2.268-3.528-2.257zm-2.234%203.84l1.542.024v8.197H7.758c-1.47-.291-2.055-1.292-2.13-1.462-.072-.173-.488-.976-.268-2.343.635-2.049%202.447-2.196%202.447-2.196h1.81zm3.964%202.39v3.881c.096.413.612.488.612.488h1.614v-4.343h1.689v5.782h-3.915c-1.517-.39-1.59-1.465-1.59-1.465v-4.317zm-5.458%201.147c-.66.197-.978.708-1.05.928-.076.22-.247.78-.1%201.269.294%201.095%201.248%201.144%201.248%201.144h1.37v-3.34z%22%2F%3E%3C%2Fsvg%3E', + aliyun: 'data:image/svg+xml,%3Csvg%20fill%3D%22%23FF6A00%22%20role%3D%22img%22%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ctitle%3EAlibaba%20Cloud%3C%2Ftitle%3E%3Cpath%20d%3D%22M3.996%204.517h5.291L8.01%206.324%204.153%207.506a1.668%201.668%200%200%200-1.165%201.601v5.786a1.668%201.668%200%200%200%201.165%201.6l3.857%201.183%201.277%201.807H3.996A3.996%203.996%200%200%201%200%2015.487V8.513a3.996%203.996%200%200%201%203.996-3.996m16.008%200h-5.291l1.277%201.807%203.857%201.182c.715.227%201.17.889%201.165%201.601v5.786a1.668%201.668%200%200%201-1.165%201.6l-3.857%201.183-1.277%201.807h5.291A3.996%203.996%200%200%200%2024%2015.487V8.513a3.996%203.996%200%200%200-3.996-3.996m-4.007%208.345H8.002v-1.804h7.995Z%22%2F%3E%3C%2Fsvg%3E', + quark: 'data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20rx%3D%224%22%20fill%3D%22%231A7BFF%22%2F%3E%3Cpath%20d%3D%22M12%204C8%204%206%207%205%2010l3%202-2%204c3%200%205-1%206-3%201%202%203%203%206%203l-2-4%203-2c-1-3-3-6-7-6z%22%20fill%3D%22%23fff%22%20opacity%3D%22.9%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%229%22%20r%3D%222%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E', + '115': 'data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20rx%3D%224%22%20fill%3D%22%232377E0%22%2F%3E%3Ctext%20x%3D%2212%22%20y%3D%2217%22%20font-size%3D%2211%22%20font-weight%3D%22bold%22%20fill%3D%22%23fff%22%20text-anchor%3D%22middle%22%20font-family%3D%22Arial%2Csans-serif%22%3E115%3C%2Ftext%3E%3C%2Fsvg%3E', + tianyi: 'data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20rx%3D%224%22%20fill%3D%22%230066CC%22%2F%3E%3Cpath%20d%3D%22M7%2017c-2.5%200-4.5-1.8-4.5-4.2S4.5%208.6%207%208.6c.3-2.3%202.3-4%204.7-4%202.2%200%204%201.4%204.5%203.3.3-.1.6-.1.9-.1%202.2%200%204%201.6%204%203.6S19.3%2015%2017.1%2015H7v2z%22%20fill%3D%22%23fff%22%20opacity%3D%22.9%22%2F%3E%3Cpath%20d%3D%22M14%2012l-3-3v6l3-3z%22%20fill%3D%22%230066CC%22%2F%3E%3C%2Fsvg%3E', + '123pan': 'data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20rx%3D%224%22%20fill%3D%22%232875FF%22%2F%3E%3Ctext%20x%3D%2212%22%20y%3D%2217%22%20font-size%3D%2210%22%20font-weight%3D%22bold%22%20fill%3D%22%23fff%22%20text-anchor%3D%22middle%22%20font-family%3D%22Arial%2Csans-serif%22%3E123%3C%2Ftext%3E%3C%2Fsvg%3E', + uc: 'data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20rx%3D%224%22%20fill%3D%22%23FF7A00%22%2F%3E%3Ctext%20x%3D%2212%22%20y%3D%2217%22%20font-size%3D%2212%22%20font-weight%3D%22bold%22%20fill%3D%22%23fff%22%20text-anchor%3D%22middle%22%20font-family%3D%22Arial%2Csans-serif%22%3EUC%3C%2Ftext%3E%3C%2Fsvg%3E', + xunlei: 'data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20rx%3D%224%22%20fill%3D%22%230084FF%22%2F%3E%3Cpath%20d%3D%22M12%202L6%2013h3.5L9%2022l7-12h-3.5L12%202z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E', + pikpak: 'data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20rx%3D%224%22%20fill%3D%22%237B2FF7%22%2F%3E%3Cpath%20d%3D%22M7%207h3v10H7V7zm7%200h3v10h-3V7z%22%20fill%3D%22%23fff%22%20opacity%3D%22.3%22%2F%3E%3Crect%20x%3D%2210%22%20y%3D%225%22%20width%3D%224%22%20height%3D%2214%22%20rx%3D%221%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E', + magnet: 'data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20rx%3D%224%22%20fill%3D%22%236366F1%22%2F%3E%3Cpath%20d%3D%22M7%2016l5-5m-5%200l5%205m5-5l-5-5m5%200l-5%205%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20fill%3D%22none%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2211%22%20r%3D%221%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fsvg%3E', + ed2k: 'data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20rx%3D%224%22%20fill%3D%22%238B4513%22%2F%3E%3Ctext%20x%3D%2212%22%20y%3D%2217%22%20font-size%3D%2211%22%20font-weight%3D%22bold%22%20fill%3D%22%23fff%22%20text-anchor%3D%22middle%22%20font-family%3D%22Arial%2Csans-serif%22%3EeD%3C%2Ftext%3E%3C%2Fsvg%3E', + others: 'data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%2224%22%20height%3D%2224%22%20rx%3D%224%22%20fill%3D%22%239CA3AF%22%2F%3E%3Cpath%20d%3D%22M6%2013c0-2.8%202.2-5%205-5a5%205%200%200%201%204.5%202.7A4%204%200%200%201%2020%2014a4%204%200%200%201-3%203.9h-8A4%204%200%200%201%206%2013z%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%221.5%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E', +}; + +export const ALL_CLOUD_TYPES: { type: string; label: string; icon: string }[] = [ + { type: 'quark', label: '夸克网盘', icon: ICONS.quark }, + { type: 'baidu', label: '百度网盘', icon: ICONS.baidu }, + { type: 'aliyun', label: '阿里云盘', icon: ICONS.aliyun }, + { type: '115', label: '115 网盘', icon: ICONS['115'] }, + { type: 'tianyi', label: '天翼云盘', icon: ICONS.tianyi }, + { type: '123pan', label: '123 云盘', icon: ICONS['123pan'] }, + { type: 'uc', label: 'UC 网盘', icon: ICONS.uc }, + { type: 'xunlei', label: '迅雷网盘', icon: ICONS.xunlei }, + { type: 'pikpak', label: 'PikPak', icon: ICONS.pikpak }, + { type: 'magnet', label: '磁力链接', icon: ICONS.magnet }, + { type: 'ed2k', label: '电驴链接', icon: ICONS.ed2k }, + { type: 'others', label: '其他', icon: ICONS.others }, +]; + +export function isCloudTypeEnabled(type: string): boolean { + const val = getSystemConfig(`cloud_type_${type}_enabled`); + if (val === null) return type !== 'others'; + return val === "true" || val === "1"; +} + +export function getAllCloudTypes(): CloudTypeInfo[] { + return ALL_CLOUD_TYPES.map(ct => ({ ...ct, enabled: isCloudTypeEnabled(ct.type) })); +} + +export function getEnabledCloudTypeSet(): Set { + const enabled = new Set(); + for (const ct of ALL_CLOUD_TYPES) { + if (isCloudTypeEnabled(ct.type)) enabled.add(ct.type); + } + return enabled; +} diff --git a/source_clean/src/cloud/cloud.service.ts b/source_clean/src/cloud/cloud.service.ts new file mode 100644 index 0000000..5aa9655 --- /dev/null +++ b/source_clean/src/cloud/cloud.service.ts @@ -0,0 +1,317 @@ +import { getDb } from '../database/database'; +import { localTimestamp, formatLocalDateTime } from '../utils/time'; +import { getSystemConfig } from '../admin/system-config.service'; +import { QuarkDriver } from './drivers/quark.driver'; +import { BaiduDriver } from './drivers/baidu.driver'; +import { CloudConfig, getAndValidateCredential, getActiveCloudConfigs } from './credential.service'; +import { lookupIpLocation } from './ip-lookup'; + +/** In-flight save dedup: prevents concurrent saves of the same URL (race condition fix) */ +const inFlightSaves = new Map>(); + +export interface SaveResult { + success: boolean; + shareUrl?: string; + share_url?: string; + sharePwd?: string; + folderName?: string; + message: string; + file_count?: number; + folder_count?: number; + duration_ms?: number; +} + +export interface SaveRecord { + id: number; + source_type: string; + source_title: string | null; + source_url: string; + target_cloud: string; + share_url: string | null; + share_pwd: string | null; + file_size: string | null; + file_count: number; + folder_count: number; + duration_ms: number; + status: string; + error_message: string | null; + folder_name: string | null; + original_folder_name: string | null; + ip_address: string | null; + ip_location: string | null; + created_at: string; +} + +/** Core save logic extracted so inFlight dedup can wrap it */ +async function doSaveFromShare(shareUrl: string, cloudType: string, sourceTitle?: string, ipAddress?: string): Promise { + const db = getDb(); + const ipLocation = await lookupIpLocation(ipAddress || ''); + + // ── Short-term dedup: prevent duplicate saves of the same URL within 60 seconds ── + const DEDUP_WINDOW_SEC = 60; + let dedupCutoff = ''; + try { + const recentCutoff = db.prepare( + `SELECT datetime('now','localtime', '-${DEDUP_WINDOW_SEC} seconds') as cutoff` + ).get() as { cutoff: string }; + dedupCutoff = recentCutoff.cutoff; + + const recentRecord = db.prepare( + `SELECT share_url, share_pwd, status, error_message, folder_name, original_folder_name FROM save_records + WHERE source_url = ? AND created_at >= ? + ORDER BY created_at DESC LIMIT 1` + ).get(shareUrl, dedupCutoff) as { + share_url: string | null; share_pwd: string | null; status: string; + error_message: string | null; folder_name: string | null; original_folder_name: string | null; + } | undefined; + + if (recentRecord) { + const alreadySaved = recentRecord.status === 'success' || recentRecord.status === 'reused'; + if (alreadySaved && recentRecord.share_url) { + console.log(`[Share] 🛡️ Dedup: ${shareUrl} was saved ${DEDUP_WINDOW_SEC}s ago (status=${recentRecord.status}), returning existing share link`); + db.prepare( + `INSERT INTO save_records (source_type, source_title, source_url, target_cloud, share_url, share_pwd, file_size, file_count, folder_count, duration_ms, status, error_message, folder_name, original_folder_name, ip_address, ip_location, created_at) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)` + ).run( + cloudType, sourceTitle || null, shareUrl, cloudType, + recentRecord.share_url, recentRecord.share_pwd || null, + null, 0, 0, 0, 'reused', null, + recentRecord.folder_name || null, recentRecord.original_folder_name || null, + ipAddress || null, ipLocation, localTimestamp(), + ); + return { + success: true, + message: `🛡️ 此资源刚在 ${DEDUP_WINDOW_SEC} 秒内转存过,直接返回已有分享链接`, + share_url: recentRecord.share_url, shareUrl: recentRecord.share_url, + sharePwd: recentRecord.share_pwd || '', folderName: '', + file_count: 0, folder_count: 0, duration_ms: 0, + }; + } + } + } catch (err: any) { + console.log(`[Share] Dedup check failed: ${err.message}, proceeding with normal save`); + } + + // ── Share link reuse: if same source URL was already saved successfully, validate and reuse ── + const reuseEnabled = getSystemConfig('save_reuse_enabled'); + if (reuseEnabled !== 'false') { + try { + const existing = db.prepare( + `SELECT share_url, share_pwd, folder_name, original_folder_name FROM save_records + WHERE source_url = ? AND status IN ('success', 'reused') AND share_url IS NOT NULL AND share_url != '' + ORDER BY created_at DESC LIMIT 1` + ).get(shareUrl) as { share_url: string; share_pwd: string; folder_name: string | null; original_folder_name: string | null } | undefined; + + if (existing?.share_url) { + const { LinkValidator } = await import('../validation/link-validator.service'); + const validator = new LinkValidator(); + const validation = await validator.validate(existing.share_url, 'quark'); + if (validation.status === 'valid') { + const isFirstReuse = dedupCutoff ? !db.prepare( + `SELECT 1 FROM save_records WHERE source_url = ? AND created_at >= ? AND status = 'reused' LIMIT 1` + ).get(shareUrl, dedupCutoff) : true; + const reuseStatus = isFirstReuse ? 'success' : 'reused'; + const reuseMsg = isFirstReuse + ? `♻️ 检测到此资源之前已转存过,直接复用已存在的分享链接` + : `♻️ 短时间内重复请求,复用已有分享链接`; + + console.log(`[Share] ♻️ Reusing existing share link for ${shareUrl}: ${existing.share_url} (firstReuse=${isFirstReuse})`); + db.prepare( + `INSERT INTO save_records (source_type, source_title, source_url, target_cloud, share_url, share_pwd, file_size, file_count, folder_count, duration_ms, status, error_message, folder_name, original_folder_name, ip_address, ip_location, created_at) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)` + ).run( + cloudType, sourceTitle || null, shareUrl, cloudType, + existing.share_url, existing.share_pwd || null, + null, 0, 0, 0, reuseStatus, null, + existing.folder_name || null, existing.original_folder_name || null, + ipAddress || null, ipLocation, localTimestamp(), + ); + return { + success: true, message: reuseMsg, + share_url: existing.share_url, shareUrl: existing.share_url, + sharePwd: existing.share_pwd || '', folderName: '', + file_count: 0, folder_count: 0, duration_ms: 0, + }; + } + console.log(`[Share] Existing share link for ${shareUrl} is invalid/expired, will re-save`); + } + } catch (err: any) { + console.log(`[Share] Link reuse check failed: ${err.message}, proceeding with normal save`); + } + } + + // ── Unified credential validation ── + const credential = await getAndValidateCredential(cloudType); + if (!credential.valid || !credential.config) { + return { success: false, message: credential.message }; + } + const config = credential.config; + const startTime = Date.now(); + + try { + let driverResult: { success: boolean; message: string; shareUrl?: string; sharePwd?: string; folderName?: string; fileCount?: number; folderCount?: number; originalFolderName?: string }; + + switch (cloudType) { + case 'quark': { + const driver = new QuarkDriver({ cookie: config.cookie!, nickname: config.nickname }); + driverResult = await driver.saveFromShare(shareUrl, sourceTitle); + break; + } + case 'baidu': { + const driver = new BaiduDriver({ cookie: config.cookie!, nickname: config.nickname }); + driverResult = await driver.saveFromShare(shareUrl, sourceTitle); + break; + } + case 'aliyun': + return { success: false, message: '阿里云盘保存功能暂未实现' }; + default: + return { success: false, message: `暂不支持 ${cloudType} 的保存功能` }; + } + + const durationMs = Date.now() - startTime; + + if (driverResult.success) { + db.prepare( + `UPDATE cloud_configs SET last_used_at = datetime('now','localtime'), total_saves = total_saves + 1, consecutive_failures = 0 WHERE id = ?` + ).run(config.id); + } else if ((driverResult as any).cookieExpired) { + // Cookie expired — don't count as failure, user needs to re-login + } else { + db.prepare( + `UPDATE cloud_configs SET consecutive_failures = consecutive_failures + 1 WHERE id = ?` + ).run(config.id); + } + + db.prepare( + `INSERT INTO save_records (source_type, source_title, source_url, target_cloud, share_url, share_pwd, file_size, file_count, folder_count, duration_ms, status, error_message, folder_name, original_folder_name, ip_address, ip_location, created_at) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)` + ).run( + cloudType, sourceTitle || driverResult.folderName || null, shareUrl, cloudType, + driverResult.shareUrl || null, driverResult.sharePwd || null, + null, driverResult.fileCount || 0, driverResult.folderCount || 0, + durationMs, driverResult.success ? 'success' : 'failed', + driverResult.success ? null : driverResult.message, + driverResult.folderName || null, driverResult.originalFolderName || null, + ipAddress || null, ipLocation, localTimestamp(), + ); + + return { + success: driverResult.success, + message: driverResult.message, + share_url: driverResult.shareUrl || '', + shareUrl: driverResult.shareUrl, + sharePwd: (driverResult as any).sharePwd || '', + folderName: driverResult.folderName || '', + file_count: driverResult.fileCount || 0, + folder_count: driverResult.folderCount || 0, + duration_ms: durationMs, + }; + } catch (err: any) { + const durationMs = Date.now() - startTime; + const errorMessage = err.message || 'Failed to save to cloud'; + + db.prepare( + `UPDATE cloud_configs SET consecutive_failures = consecutive_failures + 1 WHERE id = ?` + ).run(config.id); + + db.prepare( + `INSERT INTO save_records (source_type, source_url, target_cloud, duration_ms, status, error_message, ip_address, ip_location, created_at) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)` + ).run(cloudType, shareUrl, cloudType, durationMs, 'failed', errorMessage, ipAddress || null, ipLocation, localTimestamp()); + + return { success: false, message: errorMessage }; + } +} + +export async function saveFromShare(shareUrl: string, cloudType: string, sourceTitle?: string, ipAddress?: string): Promise { + const key = `${cloudType}:${shareUrl}`; + + const inflight = inFlightSaves.get(key); + if (inflight) { + console.log(`[Share] ⏳ In-flight: ${shareUrl} — another save is already running, awaiting result`); + return inflight; + } + + const promise = doSaveFromShare(shareUrl, cloudType, sourceTitle, ipAddress); + inFlightSaves.set(key, promise); + try { + return await promise; + } finally { + inFlightSaves.delete(key); + } +} + +// ── Save Records ────────────────────────────────────────────────── + +export function getSaveRecords(page: number = 1, pageSize: number = 20, startDate?: string, endDate?: string, status?: string, sourceType?: string, keyword?: string): { total: number; records: SaveRecord[]; summary?: { total: number; success: number; failed: number; reused: number } } { + const db = getDb(); + const offset = (page - 1) * pageSize; + const conditions: string[] = []; + const params: any[] = []; + const summaryConditions: string[] = []; + const summaryParams: any[] = []; + if (startDate) { + conditions.push('created_at >= ?'); params.push(startDate); + summaryConditions.push('created_at >= ?'); summaryParams.push(startDate); + } + if (endDate) { + conditions.push('created_at < ?'); params.push(endDate); + summaryConditions.push('created_at < ?'); summaryParams.push(endDate); + } + if (status) { conditions.push('status = ?'); params.push(status); } + if (sourceType) { + conditions.push('source_type = ?'); params.push(sourceType); + summaryConditions.push('source_type = ?'); summaryParams.push(sourceType); + } + if (keyword) { conditions.push('source_title LIKE ?'); params.push(`%${keyword}%`); } + const where = conditions.length > 0 ? 'WHERE ' + conditions.join(' AND ') : ''; + const total = (db.prepare(`SELECT COUNT(*) as count FROM save_records ${where}`).get(...params) as any).count; + const records = db.prepare( + `SELECT * FROM save_records ${where} ORDER BY created_at DESC LIMIT ? OFFSET ?` + ).all(...params, pageSize, offset) as SaveRecord[]; + + const summaryWhere = summaryConditions.length > 0 ? 'WHERE ' + summaryConditions.join(' AND ') : ''; + const summaryRows = db.prepare( + `SELECT status, COUNT(*) as cnt FROM save_records ${summaryWhere} GROUP BY status` + ).all(...summaryParams) as { status: string; cnt: number }[]; + let sumTotal = 0, sumSuccess = 0, sumFailed = 0, sumReused = 0; + for (const r of summaryRows) { + sumTotal += r.cnt; + if (r.status === 'success') sumSuccess = r.cnt; + else if (r.status === 'failed') sumFailed = r.cnt; + else if (r.status === 'reused') sumReused = r.cnt; + } + const summary = { total: sumTotal, success: sumSuccess, failed: sumFailed, reused: sumReused }; + + return { total, records, summary }; +} + +export function cleanupOldSaveRecords(): void { + const db = getDb(); + const cutoff = formatLocalDateTime(new Date(Date.now() - 60 * 24 * 60 * 60 * 1000)); + const deleted = db.prepare('DELETE FROM save_records WHERE created_at < ?').run(cutoff); + console.log(`[Cleanup] Deleted ${deleted.changes} save records older than 60 days (before ${cutoff})`); +} + +// ── Storage Refresh ─────────────────────────────────────────────── + +export async function refreshAllStorageInfo(): Promise { + const configs = getActiveCloudConfigs().filter(c => c.cloud_type === 'quark' && c.cookie); + if (configs.length === 0) return; + + for (const cfg of configs) { + try { + const { QuarkDriver } = require('./drivers/quark.driver'); + const driver = new QuarkDriver({ cookie: cfg.cookie, nickname: cfg.nickname }); + const storage = await driver.getStorageInfo(); + if (storage.totalBytes > 0 || storage.usedBytes > 0) { + const db = getDb(); + db.prepare( + `UPDATE cloud_configs SET storage_used = ?, storage_total = ? WHERE id = ?` + ).run(storage.used, storage.total, cfg.id); + } + } catch (err: any) { + console.error(`[Storage] Failed to refresh quark#${cfg.id}:`, err.message); + } + } +} diff --git a/source_clean/src/cloud/credential.service.ts b/source_clean/src/cloud/credential.service.ts new file mode 100644 index 0000000..d0012ca --- /dev/null +++ b/source_clean/src/cloud/credential.service.ts @@ -0,0 +1,373 @@ +import { getDb } from '../database/database'; +import { localTimestamp, formatLocalDate, formatLocalDateTime } from '../utils/time'; + +export interface CloudConfig { + id: number; + cloud_type: string; + cookie?: string; + nickname?: string; + is_active: number; + storage_used?: string; + storage_total?: string; + checkin_status: string; // 'none'|'success'|'failed'|'pending'|'skipped' + last_checkin_at?: string; + checkin_message?: string; + consecutive_failures: number; + last_used_at?: string; + total_saves: number; + created_at: string; + updated_at: string; + verification_status?: string; +} + +// ── Cookie UID Extraction ──────────────────────────────────────── + +function extractCookieUid(cookie: string): string { + if (!cookie) return ''; + let m = cookie.match(/__uid=([a-zA-Z0-9+/=_-]+)/); + if (m) return m[1]; + m = cookie.match(/b-user-id=([a-zA-Z0-9-]+)/); + if (m) return m[1]; + return ''; +} + +// ── Config CRUD ────────────────────────────────────────────────── + +export function getCloudConfigs(): CloudConfig[] { + const db = getDb(); + return db.prepare( + `SELECT id, cloud_type, cookie, nickname, is_active, storage_used, storage_total, + checkin_status, last_checkin_at, checkin_message, consecutive_failures, + last_used_at, total_saves, created_at, updated_at, verification_status + FROM cloud_configs ORDER BY id ASC` + ).all() as CloudConfig[]; +} + +export function getAvailableClouds(): CloudConfig[] { + const db = getDb(); + return db.prepare( + `SELECT id, cloud_type, nickname, is_active, storage_used, storage_total, + checkin_status, last_checkin_at, checkin_message, consecutive_failures, + last_used_at, total_saves, created_at, updated_at + FROM cloud_configs WHERE is_active = 1 ORDER BY id ASC` + ).all() as CloudConfig[]; +} + +/** Returns the first active config matching the given cloud type. */ +export function getCloudConfigByType(cloudType: string): CloudConfig | undefined { + const db = getDb(); + return db.prepare( + `SELECT id, cloud_type, cookie, nickname, is_active, storage_used, storage_total, + checkin_status, last_checkin_at, checkin_message, consecutive_failures, + last_used_at, total_saves, created_at, updated_at, verification_status + FROM cloud_configs WHERE cloud_type = ? AND is_active = 1 + ORDER BY id ASC LIMIT 1` + ).get(cloudType) as CloudConfig | undefined; +} + +export function getCloudConfigById(id: number): CloudConfig | undefined { + const db = getDb(); + return db.prepare( + `SELECT id, cloud_type, cookie, nickname, is_active, storage_used, storage_total, + checkin_status, last_checkin_at, checkin_message, consecutive_failures, + last_used_at, total_saves, created_at, updated_at, verification_status + FROM cloud_configs WHERE id = ?` + ).get(id) as CloudConfig | undefined; +} + +/** Returns all active cloud configs (used by save flow for cloud type switching). */ +export function getActiveCloudConfigs(): CloudConfig[] { + const db = getDb(); + return db.prepare( + `SELECT id, cloud_type, cookie, nickname, is_active, storage_used, storage_total, + checkin_status, last_checkin_at, checkin_message, consecutive_failures, + last_used_at, total_saves, created_at, updated_at + FROM cloud_configs WHERE is_active = 1 + ORDER BY cloud_type ASC, id ASC` + ).all() as CloudConfig[]; +} + +export function saveCloudConfig(data: { + id?: number; + cloud_type: string; + cookie?: string; + nickname?: string; + cookie_uid?: string; + promotion_account?: string; + is_active?: number; + storage_used?: string; + storage_total?: string; +}): CloudConfig { + const db = getDb(); + + const cookieUidForUpdate = data.cookie ? extractCookieUid(data.cookie) : null; + + if (data.id) { + db.prepare( + `UPDATE cloud_configs SET + cloud_type = COALESCE(?, cloud_type), + cookie = COALESCE(?, cookie), + nickname = COALESCE(?, nickname), + cookie_uid = COALESCE(?, cookie_uid), + promotion_account = COALESCE(?, promotion_account), + is_active = COALESCE(?, is_active), + storage_used = COALESCE(?, storage_used), + storage_total = COALESCE(?, storage_total), + consecutive_failures = 0, + updated_at = ? + WHERE id = ?` + ).run(data.cloud_type, data.cookie || null, data.nickname || null, cookieUidForUpdate || null, data.promotion_account || null, data.is_active ?? 1, data.storage_used || null, data.storage_total || null, localTimestamp(), data.id); + } else { + const existing = db.prepare( + 'SELECT id, nickname FROM cloud_configs WHERE cloud_type = ? AND is_active = 1 LIMIT 1' + ).get(data.cloud_type) as any; + if (existing) { + db.prepare( + `UPDATE cloud_configs SET + cookie = COALESCE(?, cookie), + nickname = COALESCE(?, nickname), + cookie_uid = COALESCE(?, cookie_uid), + promotion_account = COALESCE(?, promotion_account), + is_active = COALESCE(?, is_active), + storage_used = COALESCE(?, storage_used), + storage_total = COALESCE(?, storage_total), + consecutive_failures = 0, + updated_at = ? + WHERE id = ?` + ).run(data.cookie || null, data.nickname || null, cookieUidForUpdate || null, data.promotion_account || null, data.is_active ?? 1, data.storage_used || null, data.storage_total || null, localTimestamp(), existing.id); + } else { + db.prepare( + 'INSERT INTO cloud_configs (cloud_type, cookie, nickname, cookie_uid, promotion_account, is_active, storage_used, storage_total, consecutive_failures) VALUES (?, ?, ?, ?, ?, ?, ?, ?, 0)' + ).run(data.cloud_type, data.cookie || null, data.nickname || null, cookieUidForUpdate || null, data.promotion_account || null, data.is_active ?? 1, data.storage_used || null, data.storage_total || null); + } + } + + const savedId = data.id || (db.prepare('SELECT last_insert_rowid() as id').get() as any).id; + return db.prepare( + `SELECT id, cloud_type, cookie, nickname, is_active, storage_used, storage_total, + checkin_status, last_checkin_at, checkin_message, consecutive_failures, + last_used_at, total_saves, created_at, updated_at + FROM cloud_configs WHERE id = ?` + ).get(savedId) as CloudConfig; +} + +export function deleteCloudConfig(id: number): boolean { + const db = getDb(); + const result = db.prepare('DELETE FROM cloud_configs WHERE id = ?').run(id); + return result.changes > 0; +} + +// ── Cookie Validation ──────────────────────────────────────────── + +async function fetchQuarkNickname(cookie: string): Promise { + const MAX_RETRIES = 2; + for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) { + try { + const response = await fetch('https://pan.quark.cn/account/info', { + headers: { + 'Cookie': cookie, + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', + 'Referer': 'https://pan.quark.cn/', + }, + signal: AbortSignal.timeout(15000), + }); + if (!response.ok) return null; + const data = await response.json() as any; + if (data?.data?.nickname) return data.data.nickname; + } catch { + if (attempt < MAX_RETRIES) { + await new Promise(r => setTimeout(r, 1500)); + continue; + } + } + } + return null; +} + +export async function testCloudConnection(id: number): Promise<{ + success: boolean; + message: string; + nickname?: string; + storage_used?: string; + storage_total?: string; +}> { + const config = getCloudConfigById(id); + if (!config) { + return { success: false, message: 'Cloud config not found' }; + } + + if (!config.cookie) { + return { success: false, message: 'Cookie not configured' }; + } + + try { + let valid = false; + let nickname = ''; + let storageUsed = config.storage_used || ''; + let storageTotal = config.storage_total || ''; + + if (config.cloud_type === 'baidu') { + const { BaiduDriver } = require('./drivers/baidu.driver'); + const driver = new BaiduDriver({ cookie: config.cookie, nickname: config.nickname }); + valid = await driver.validate(); + if (valid) { + const info = await driver.getUserInfo(); + if (info) { + nickname = config.nickname || info.nickname || '百度网盘'; + const fmt = (b: number) => b >= 1024**3 ? (b/1024**3).toFixed(2)+' GB' : (b/1024**2).toFixed(2)+' MB'; + storageUsed = fmt(info.usedBytes); + storageTotal = fmt(info.totalBytes); + } + } + } else { + const { QuarkDriver } = require('./drivers/quark.driver'); + const driver = new QuarkDriver({ cookie: config.cookie, nickname: config.nickname }); + valid = await driver.validate(); + if (valid) { + nickname = config.nickname || (await fetchQuarkNickname(config.cookie)) || '夸克网盘'; + const storage = await driver.getStorageInfoQuick(); + storageTotal = (storage.total !== '-' && storage.total !== '0 B') ? storage.total : (config.storage_total || ''); + } + } + + const db = getDb(); + if (!valid) { + db.prepare( + `UPDATE cloud_configs SET verification_status = 'invalid', updated_at = ? WHERE id = ?` + ).run(localTimestamp(), id); + return { success: false, message: '连接失败:Cookie 无效或已过期,或网络暂时异常' }; + } + + db.prepare( + `UPDATE cloud_configs SET nickname = ?, storage_total = ?, storage_used = ?, is_active = 1, verification_status = 'valid', updated_at = ? WHERE id = ?` + ).run(nickname, storageTotal, storageUsed, localTimestamp(), id); + + return { + success: true, + message: '连接成功', + nickname, + storage_used: storageUsed, + storage_total: storageTotal, + }; + } catch (err: any) { + try { + const db = getDb(); + db.prepare( + `UPDATE cloud_configs SET verification_status = 'invalid', updated_at = ? WHERE id = ?` + ).run(localTimestamp(), id); + } catch {} + return { success: false, message: `连接失败:${err.message || '未知错误'}` }; + } +} + +export async function testCloudConnectionWithCookie(cloudType: string, cookie: string): Promise<{ + success: boolean; + message: string; + nickname?: string; + storage_used?: string; + storage_total?: string; +}> { + try { + const { QuarkDriver } = require('./drivers/quark.driver'); + const driver = new QuarkDriver({ cookie, nickname: '' }); + const valid = await driver.validate(); + if (!valid) { + return { success: false, message: '连接失败:Cookie 无效或已过期' }; + } + const nickname = (await fetchQuarkNickname(cookie)) || cloudType; + const storage = await driver.getStorageInfo(); + return { + success: true, + message: '连接成功', + nickname, + storage_used: storage.used, + storage_total: storage.total, + }; + } catch (err: any) { + return { success: false, message: `连接失败:${err.message || '未知错误'}` }; + } +} + +// ── Unified Credential Validation ───────────────────────────────── + +export interface CredentialValidationResult { + valid: boolean; + config?: CloudConfig; + errorCode?: string; + message: string; +} + +/** + * Get and validate a credential for the given cloud type. + * + * This is the unified entry point for all save/transfer operations. + * It handles: + * 1. Finding an active config with < 5 consecutive failures (round-robin) + * 2. Validating cookie freshness via driver.validate() + * 3. Returning structured result with error codes + * + * Reference: search-ucmao get_and_validate_credential() pattern. + */ +export async function getAndValidateCredential(cloudType: string): Promise { + const db = getDb(); + + const config = db.prepare( + `SELECT * FROM cloud_configs + WHERE cloud_type = ? AND is_active = 1 + AND consecutive_failures < 5 + ORDER BY last_used_at ASC NULLS FIRST + LIMIT 1` + ).get(cloudType) as CloudConfig | undefined; + + if (!config) { + return { + valid: false, + errorCode: 'NO_AVAILABLE_DRIVE', + message: `Cloud type "${cloudType}" is not configured or no available drives`, + }; + } + + if (!config.cookie) { + return { + valid: false, + errorCode: 'COOKIE_MISSING', + message: `Cookie not configured for ${cloudType} drive #${config.id}`, + }; + } + + try { + let cookieValid = false; + if (cloudType === 'baidu') { + const { BaiduDriver } = require('./drivers/baidu.driver'); + const driver = new BaiduDriver({ cookie: config.cookie, nickname: config.nickname }); + cookieValid = await driver.validate(); + } else { + const { QuarkDriver } = require('./drivers/quark.driver'); + const driver = new QuarkDriver({ cookie: config.cookie, nickname: config.nickname }); + cookieValid = await driver.validate(); + } + + if (!cookieValid) { + db.prepare( + `UPDATE cloud_configs SET verification_status = 'invalid', updated_at = ? WHERE id = ?` + ).run(localTimestamp(), config.id); + return { + valid: false, + errorCode: 'COOKIE_EXPIRED', + message: `Cookie expired or invalid for ${cloudType} drive #${config.id}`, + }; + } + + return { + valid: true, + config, + message: 'ok', + }; + } catch (err: any) { + return { + valid: false, + errorCode: 'VALIDATION_ERROR', + message: `Credential validation failed: ${err.message}`, + }; + } +} diff --git a/source_clean/src/cloud/credential.service.ts.bak_p0fix b/source_clean/src/cloud/credential.service.ts.bak_p0fix new file mode 100644 index 0000000..68b2e6c --- /dev/null +++ b/source_clean/src/cloud/credential.service.ts.bak_p0fix @@ -0,0 +1,354 @@ +import { getDb } from '../database/database'; +import { localTimestamp, formatLocalDate, formatLocalDateTime } from '../utils/time'; + +export interface CloudConfig { + id: number; + cloud_type: string; + cookie?: string; + nickname?: string; + is_active: number; + storage_used?: string; + storage_total?: string; + checkin_status: string; // 'none'|'success'|'failed'|'pending'|'skipped' + last_checkin_at?: string; + checkin_message?: string; + consecutive_failures: number; + last_used_at?: string; + total_saves: number; + created_at: string; + updated_at: string; + verification_status?: string; +} + +// ── Config CRUD ────────────────────────────────────────────────── + +export function getCloudConfigs(): CloudConfig[] { + const db = getDb(); + return db.prepare( + `SELECT id, cloud_type, cookie, nickname, is_active, storage_used, storage_total, + checkin_status, last_checkin_at, checkin_message, consecutive_failures, + last_used_at, total_saves, created_at, updated_at, verification_status + FROM cloud_configs ORDER BY id ASC` + ).all() as CloudConfig[]; +} + +export function getAvailableClouds(): CloudConfig[] { + const db = getDb(); + return db.prepare( + `SELECT id, cloud_type, nickname, is_active, storage_used, storage_total, + checkin_status, last_checkin_at, checkin_message, consecutive_failures, + last_used_at, total_saves, created_at, updated_at + FROM cloud_configs WHERE is_active = 1 ORDER BY id ASC` + ).all() as CloudConfig[]; +} + +/** Returns the first active config matching the given cloud type. */ +export function getCloudConfigByType(cloudType: string): CloudConfig | undefined { + const db = getDb(); + return db.prepare( + `SELECT id, cloud_type, cookie, nickname, is_active, storage_used, storage_total, + checkin_status, last_checkin_at, checkin_message, consecutive_failures, + last_used_at, total_saves, created_at, updated_at, verification_status + FROM cloud_configs WHERE cloud_type = ? AND is_active = 1 + ORDER BY id ASC LIMIT 1` + ).get(cloudType) as CloudConfig | undefined; +} + +export function getCloudConfigById(id: number): CloudConfig | undefined { + const db = getDb(); + return db.prepare( + `SELECT id, cloud_type, cookie, nickname, is_active, storage_used, storage_total, + checkin_status, last_checkin_at, checkin_message, consecutive_failures, + last_used_at, total_saves, created_at, updated_at, verification_status + FROM cloud_configs WHERE id = ?` + ).get(id) as CloudConfig | undefined; +} + +/** Returns all active cloud configs (used by save flow for cloud type switching). */ +export function getActiveCloudConfigs(): CloudConfig[] { + const db = getDb(); + return db.prepare( + `SELECT id, cloud_type, cookie, nickname, is_active, storage_used, storage_total, + checkin_status, last_checkin_at, checkin_message, consecutive_failures, + last_used_at, total_saves, created_at, updated_at + FROM cloud_configs WHERE is_active = 1 + ORDER BY cloud_type ASC, id ASC` + ).all() as CloudConfig[]; +} + +export function saveCloudConfig(data: { + id?: number; + cloud_type: string; + cookie?: string; + nickname?: string; + is_active?: number; + storage_used?: string; + storage_total?: string; +}): CloudConfig { + const db = getDb(); + + if (data.id) { + db.prepare( + `UPDATE cloud_configs SET + cloud_type = COALESCE(?, cloud_type), + cookie = COALESCE(?, cookie), + nickname = COALESCE(?, nickname), + is_active = COALESCE(?, is_active), + storage_used = COALESCE(?, storage_used), + storage_total = COALESCE(?, storage_total), + consecutive_failures = 0, + updated_at = ? + WHERE id = ?` + ).run(data.cloud_type, data.cookie || null, data.nickname || null, data.is_active ?? 1, data.storage_used || null, data.storage_total || null, localTimestamp(), data.id); + } else { + const existing = db.prepare( + 'SELECT id, nickname FROM cloud_configs WHERE cloud_type = ? AND is_active = 1 LIMIT 1' + ).get(data.cloud_type) as any; + if (existing) { + db.prepare( + `UPDATE cloud_configs SET + cookie = COALESCE(?, cookie), + nickname = COALESCE(?, nickname), + is_active = COALESCE(?, is_active), + storage_used = COALESCE(?, storage_used), + storage_total = COALESCE(?, storage_total), + consecutive_failures = 0, + updated_at = ? + WHERE id = ?` + ).run(data.cookie || null, data.nickname || null, data.is_active ?? 1, data.storage_used || null, data.storage_total || null, localTimestamp(), existing.id); + } else { + db.prepare( + 'INSERT INTO cloud_configs (cloud_type, cookie, nickname, is_active, storage_used, storage_total, consecutive_failures) VALUES (?, ?, ?, ?, ?, ?, 0)' + ).run(data.cloud_type, data.cookie || null, data.nickname || null, data.is_active ?? 1, data.storage_used || null, data.storage_total || null); + } + } + + const savedId = data.id || (db.prepare('SELECT last_insert_rowid() as id').get() as any).id; + return db.prepare( + `SELECT id, cloud_type, cookie, nickname, is_active, storage_used, storage_total, + checkin_status, last_checkin_at, checkin_message, consecutive_failures, + last_used_at, total_saves, created_at, updated_at + FROM cloud_configs WHERE id = ?` + ).get(savedId) as CloudConfig; +} + +export function deleteCloudConfig(id: number): boolean { + const db = getDb(); + const result = db.prepare('DELETE FROM cloud_configs WHERE id = ?').run(id); + return result.changes > 0; +} + +// ── Cookie Validation ──────────────────────────────────────────── + +async function fetchQuarkNickname(cookie: string): Promise { + const MAX_RETRIES = 2; + for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) { + try { + const response = await fetch('https://pan.quark.cn/account/info', { + headers: { + 'Cookie': cookie, + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', + 'Referer': 'https://pan.quark.cn/', + }, + signal: AbortSignal.timeout(15000), + }); + if (!response.ok) return null; + const data = await response.json() as any; + if (data?.data?.nickname) return data.data.nickname; + } catch { + if (attempt < MAX_RETRIES) { + await new Promise(r => setTimeout(r, 1500)); + continue; + } + } + } + return null; +} + +export async function testCloudConnection(id: number): Promise<{ + success: boolean; + message: string; + nickname?: string; + storage_used?: string; + storage_total?: string; +}> { + const config = getCloudConfigById(id); + if (!config) { + return { success: false, message: 'Cloud config not found' }; + } + + if (!config.cookie) { + return { success: false, message: 'Cookie not configured' }; + } + + try { + let valid = false; + let nickname = ''; + let storageUsed = config.storage_used || ''; + let storageTotal = config.storage_total || ''; + + if (config.cloud_type === 'baidu') { + const { BaiduDriver } = require('./drivers/baidu.driver'); + const driver = new BaiduDriver({ cookie: config.cookie, nickname: config.nickname }); + valid = await driver.validate(); + if (valid) { + const info = await driver.getUserInfo(); + if (info) { + nickname = config.nickname || info.nickname || '百度网盘'; + const fmt = (b: number) => b >= 1024**3 ? (b/1024**3).toFixed(2)+' GB' : (b/1024**2).toFixed(2)+' MB'; + storageUsed = fmt(info.usedBytes); + storageTotal = fmt(info.totalBytes); + } + } + } else { + const { QuarkDriver } = require('./drivers/quark.driver'); + const driver = new QuarkDriver({ cookie: config.cookie, nickname: config.nickname }); + valid = await driver.validate(); + if (valid) { + nickname = config.nickname || (await fetchQuarkNickname(config.cookie)) || '夸克网盘'; + const storage = await driver.getStorageInfoQuick(); + storageTotal = (storage.total !== '-' && storage.total !== '0 B') ? storage.total : (config.storage_total || ''); + } + } + + const db = getDb(); + if (!valid) { + db.prepare( + `UPDATE cloud_configs SET verification_status = 'invalid', updated_at = ? WHERE id = ?` + ).run(localTimestamp(), id); + return { success: false, message: '连接失败:Cookie 无效或已过期,或网络暂时异常' }; + } + + db.prepare( + `UPDATE cloud_configs SET nickname = ?, storage_total = ?, storage_used = ?, is_active = 1, verification_status = 'valid', updated_at = ? WHERE id = ?` + ).run(nickname, storageTotal, storageUsed, localTimestamp(), id); + + return { + success: true, + message: '连接成功', + nickname, + storage_used: storageUsed, + storage_total: storageTotal, + }; + } catch (err: any) { + try { + const db = getDb(); + db.prepare( + `UPDATE cloud_configs SET verification_status = 'invalid', updated_at = ? WHERE id = ?` + ).run(localTimestamp(), id); + } catch {} + return { success: false, message: `连接失败:${err.message || '未知错误'}` }; + } +} + +export async function testCloudConnectionWithCookie(cloudType: string, cookie: string): Promise<{ + success: boolean; + message: string; + nickname?: string; + storage_used?: string; + storage_total?: string; +}> { + try { + const { QuarkDriver } = require('./drivers/quark.driver'); + const driver = new QuarkDriver({ cookie, nickname: '' }); + const valid = await driver.validate(); + if (!valid) { + return { success: false, message: '连接失败:Cookie 无效或已过期' }; + } + const nickname = (await fetchQuarkNickname(cookie)) || cloudType; + const storage = await driver.getStorageInfo(); + return { + success: true, + message: '连接成功', + nickname, + storage_used: storage.used, + storage_total: storage.total, + }; + } catch (err: any) { + return { success: false, message: `连接失败:${err.message || '未知错误'}` }; + } +} + +// ── Unified Credential Validation ───────────────────────────────── + +export interface CredentialValidationResult { + valid: boolean; + config?: CloudConfig; + errorCode?: string; + message: string; +} + +/** + * Get and validate a credential for the given cloud type. + * + * This is the unified entry point for all save/transfer operations. + * It handles: + * 1. Finding an active config with < 5 consecutive failures (round-robin) + * 2. Validating cookie freshness via driver.validate() + * 3. Returning structured result with error codes + * + * Reference: search-ucmao get_and_validate_credential() pattern. + */ +export async function getAndValidateCredential(cloudType: string): Promise { + const db = getDb(); + + const config = db.prepare( + `SELECT * FROM cloud_configs + WHERE cloud_type = ? AND is_active = 1 + AND consecutive_failures < 5 + ORDER BY last_used_at ASC NULLS FIRST + LIMIT 1` + ).get(cloudType) as CloudConfig | undefined; + + if (!config) { + return { + valid: false, + errorCode: 'NO_AVAILABLE_DRIVE', + message: `Cloud type "${cloudType}" is not configured or no available drives`, + }; + } + + if (!config.cookie) { + return { + valid: false, + errorCode: 'COOKIE_MISSING', + message: `Cookie not configured for ${cloudType} drive #${config.id}`, + }; + } + + try { + let cookieValid = false; + if (cloudType === 'baidu') { + const { BaiduDriver } = require('./drivers/baidu.driver'); + const driver = new BaiduDriver({ cookie: config.cookie, nickname: config.nickname }); + cookieValid = await driver.validate(); + } else { + const { QuarkDriver } = require('./drivers/quark.driver'); + const driver = new QuarkDriver({ cookie: config.cookie, nickname: config.nickname }); + cookieValid = await driver.validate(); + } + + if (!cookieValid) { + db.prepare( + `UPDATE cloud_configs SET verification_status = 'invalid', updated_at = ? WHERE id = ?` + ).run(localTimestamp(), config.id); + return { + valid: false, + errorCode: 'COOKIE_EXPIRED', + message: `Cookie expired or invalid for ${cloudType} drive #${config.id}`, + }; + } + + return { + valid: true, + config, + message: 'ok', + }; + } catch (err: any) { + return { + valid: false, + errorCode: 'VALIDATION_ERROR', + message: `Credential validation failed: ${err.message}`, + }; + } +} diff --git a/source_clean/src/cloud/drivers/aliyun.driver.ts b/source_clean/src/cloud/drivers/aliyun.driver.ts new file mode 100755 index 0000000..f5ab72c --- /dev/null +++ b/source_clean/src/cloud/drivers/aliyun.driver.ts @@ -0,0 +1,113 @@ +// Native fetch available in Node 20+ + +export interface AliyunConfig { + cookie?: string; + nickname?: string; +} + +export class AliyunDriver { + private config: AliyunConfig; + private baseUrl = 'https://api.aliyundrive.com'; + + constructor(config: AliyunConfig = {}) { + this.config = config; + } + + /** + * Extract share_id from an Aliyun share URL. + * Supports: + * https://www.aliyundrive.com/s/XXXYYY + * https://www.alipan.com/s/XXXYYY + * https://api.aliyundrive.com/v2/share_link/XXXYYY + */ + private extractShareId(shareUrl: string): string | null { + try { + const url = new URL(shareUrl); + const pathMatch = url.pathname.match(/\/s\/([a-zA-Z0-9]+)/); + if (pathMatch) return pathMatch[1]; + + const shareMatch = url.pathname.match(/\/share_link\/([a-zA-Z0-9]+)/); + if (shareMatch) return shareMatch[1]; + + return null; + } catch { + return null; + } + } + + /** + * Validate a share link using Aliyun's public anonymous API. + * No cookie or token required — this endpoint is open. + * + * API: + * POST https://api.aliyundrive.com/v2/share_link/get_share_by_anonymous + * Body: { "share_id": "XXXYYY", "share_pwd": "" } + * + * Success: returns share_name, file_infos, creator info + * Failure: returns error code (ShareLinkExpired, ShareLinkCancelled, etc.) + */ + async validateShareLink(shareUrl: string): Promise<{ + valid: boolean; + message: string; + fileCount?: number; + shareName?: string; + }> { + const shareId = this.extractShareId(shareUrl); + if (!shareId) { + return { valid: false, message: '无法解析阿里云盘链接格式' }; + } + + try { + const response = await fetch( + `${this.baseUrl}/v2/share_link/get_share_by_anonymous`, + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', + 'Referer': 'https://www.aliyundrive.com/', + 'Accept-Language': 'zh-CN,zh;q=0.9', + }, + body: JSON.stringify({ + share_id: shareId, + share_pwd: '', + }), + signal: AbortSignal.timeout(10000), + } + ); + + if (!response.ok) { + return { valid: false, message: `HTTP ${response.status}: API 请求失败` }; + } + + const data = await response.json() as any; + + // Check for error codes + if (data.code) { + switch (data.code) { + case 'ShareLinkExpired': + return { valid: false, message: '分享已失效(已过期)' }; + case 'ShareLinkCancelled': + return { valid: false, message: '分享已被取消' }; + case 'NotFound.ShareLink': + return { valid: false, message: '分享链接不存在' }; + case 'ShareLinkPasswordIncorrect': + return { valid: true, message: '需要提取码(链接有效)' }; + default: + return { valid: false, message: data.message || `未知错误 (${data.code})` }; + } + } + + // Success — valid share link + const fileInfos = data.file_infos || []; + return { + valid: true, + message: `有效链接(${fileInfos.length} 个文件)`, + fileCount: fileInfos.length, + shareName: data.share_name || '', + }; + } catch (err: any) { + return { valid: false, message: `网络错误: ${err.message || err}` }; + } + } +} diff --git a/source_clean/src/cloud/drivers/baidu.driver.ts b/source_clean/src/cloud/drivers/baidu.driver.ts new file mode 100644 index 0000000..bba0333 --- /dev/null +++ b/source_clean/src/cloud/drivers/baidu.driver.ts @@ -0,0 +1,1189 @@ +// Baidu Netdisk Driver v4 — Cookie-based (Playwright QR login + HTTP API) +// Uses full browser Cookie string for all operations (no OAuth access_token needed). +// Share operations use internal web API (/share/verify, /share/transfer, parse HTML). +// Reference: https://github.com/hxz393/BaiduPanFilesTransfers +// +// v4 changes from v3: +// - QR login via Playwright browser → captures full Cookie string (BDUSS + BAIDUID + STOKEN + ...) +// - getShareFiles uses Cookie HTTP: getbdstoken → verify password → GET share page → regex parse +// - transferFiles uses Cookie HTTP: POST /share/transfer +// - File list/create/delete use Cookie-based /api/* endpoints with bdstoken +// - Removed OAuth Device Code flow (no more access_token) + +import type { Browser, BrowserContext, Page } from 'playwright'; + +export interface BaiduConfig { + cookie?: string; // Full Cookie string: "BDUSS=xxx; BAIDUID=yyy; STOKEN=zzz; ..." + bdstoken?: string; // Cached bdstoken from /api/gettemplatevariable + cookieExpired?: boolean; // Flag set when cookie validation fails + nickname?: string; +} + +interface ShareFileInfo { + server_filename: string; + fs_id: string; + isdir: number; + size: number; + path: string; + category: number; +} + +interface ShareDetail { + files: ShareFileInfo[]; + childFiles: ShareFileInfo[] | null; +} + +// ═══════════════════════════════════ +// Constants +// ═══════════════════════════════════ +const API_HOST = "https://pan.baidu.com"; +const CHROMIUM_PATH = process.env.CHROMIUM_PATH || "/usr/bin/chromium-browser"; +const APP_ID_WEB = "38824127"; // Web app ID from BaiduPanFilesTransfers + +// HTTP headers matching BaiduPanFilesTransfers +const WEB_HEADERS: Record = { + 'Host': 'pan.baidu.com', + 'Connection': 'keep-alive', + 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', + 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8', + 'Accept-Encoding': 'gzip, deflate, br', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36', + 'Referer': 'https://pan.baidu.com', +}; + +function buildHeaders(cookie: string): Record { + if (cookie) { + return { ...WEB_HEADERS, 'Cookie': cookie }; + } + return { ...WEB_HEADERS }; +} + +// ═══════════════════════════════════ +// Playwright singleton for QR login +// ═══════════════════════════════════ +let _browser: Browser | null = null; + +async function getBrowserSingleton(): Promise { + const { chromium } = await import("playwright"); + if (!_browser || !_browser.isConnected()) { + _browser = await chromium.launch({ + executablePath: CHROMIUM_PATH, + headless: true, + args: [ + "--no-sandbox", "--disable-setuid-sandbox", "--disable-dev-shm-usage", + "--disable-gpu", "--disable-software-rasterizer", + "--disable-features=Vulkan", "--use-gl=swiftshader", + ], + timeout: 30000, + }); + } + return _browser; +} + +// ═══════════════════════════════════ +// QR login session store +// ═══════════════════════════════════ +const qrSessions = new Map(); + +// ═══════════════════════════════════ +// Helpers +// ═══════════════════════════════════ + +function dailyFolderName(): string { + const d = new Date(); + return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`; +} + +async function humanDelay(): Promise { + await new Promise(r => setTimeout(r, 500 + Math.random() * 1000)); +} + +// Extract short_url from share link: /s/1XXXXX... → strip leading '1' +function extractShortUrl(shareUrl: string): { surl: string; pwd: string } | null { + try { + const url = new URL(shareUrl); + if (!url.hostname.includes('pan.baidu.com')) return null; + const pathMatch = url.pathname.match(/^\/s\/(1[a-zA-Z0-9_-]+)/); + if (!pathMatch) return null; + const surl = pathMatch[1].slice(1); + if (surl.length < 20) return null; + const pwd = url.searchParams.get('pwd') || ''; + return { surl, pwd }; + } catch { + return null; + } +} + +// Regex patterns for parsing share page HTML +const RE_SHAREID = /"shareid":(\d+?),"/; +const RE_SHARE_UK = /"share_uk":"(\d+?)","/; +const RE_FSID = /"fs_id":(\d+?),"/; +const RE_FILENAME = /"server_filename":"(.+?)","/; +const RE_ISDIR = /"isdir":(\d+?),"/; +const RE_SIZE = /"size":(\d+?),"/; +const RE_CATEGORY = /"category":(\d+?),"/; + +// ═══════════════════════════════════ +// BaiduDriver +// ═══════════════════════════════════ + +export class BaiduDriver { + private config: BaiduConfig; + + constructor(config: BaiduConfig = {}) { + this.config = { ...config }; + } + + private getCookie(): string { + return this.config.cookie || ''; + } + + private async getBdstoken(): Promise { + // Use cached if available + if (this.config.bdstoken) { + // Validate: bdstoken is typically ~32 chars hex + if (this.config.bdstoken.length > 10) return this.config.bdstoken; + } + + const cookie = this.getCookie(); + if (!cookie) return null; + + try { + const url = `${API_HOST}/api/gettemplatevariable?clienttype=0&app_id=${APP_ID_WEB}&web=1&fields=["bdstoken","token","uk","isdocuser","servertime"]`; + const res = await fetch(url, { + headers: buildHeaders(cookie), + signal: AbortSignal.timeout(10000), + }); + if (!res.ok) { + console.error('[Baidu] getBdstoken HTTP', res.status); + return null; + } + const data = await res.json() as any; + if (data.errno !== 0) { + console.error('[Baidu] getBdstoken errno:', data.errno); + // errno -6 = cookie expired / invalid + if (data.errno === -6) { + this.config.cookieExpired = true; + console.error('[Baidu] Cookie expired — user needs to re-scan QR code'); + } + return null; + } + const bdstoken = data.result?.bdstoken || ''; + if (bdstoken) { + this.config.bdstoken = bdstoken; + console.log('[Baidu] bdstoken obtained'); + return bdstoken; + } + return null; + } catch (err: any) { + console.error('[Baidu] getBdstoken error:', err.message); + return null; + } + } + + // ═══════════════════════════════════ + // QR Login — Playwright browser + // ═══════════════════════════════════ + + static async startQrLogin(): Promise<{ qrUrl?: string; sessionId: string }> { + const sessionId = "baidu_" + Date.now() + "_" + Math.random().toString(36).slice(2, 8); + let browser: Browser | null = null; + let context: BrowserContext | null = null; + let page: Page | null = null; + + try { + browser = await getBrowserSingleton(); + context = await browser.newContext({ + viewport: { width: 1280, height: 800 }, + locale: "zh-CN", + userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", + ignoreHTTPSErrors: true, + }); + // Anti-detection + await context.addInitScript(`(() => { Object.defineProperty(navigator, 'webdriver', { get: () => false }); })()`); + + page = await context.newPage(); + + // Navigate directly to passport QR login page (the actual login page with QR code) + console.log('[BaiduQR] Navigating to passport QR login...'); + await page.goto('https://passport.baidu.com/v2/?login&qrlogin&tpl=netdisk', { waitUntil: 'commit', timeout: 30000 }); + await page.waitForTimeout(4000); + + // Check if we landed on the right page + const currentUrl = page.url(); + console.log('[BaiduQR] Current URL:', currentUrl); + + // Wait for QR code image on passport page + console.log('[BaiduQR] Waiting for QR code...'); + await page.waitForSelector('img[src*="passport.baidu.com/v2/api/qrcode"], img[src*="qrcode"]', { timeout: 20000 }); + await page.waitForTimeout(1500); + + // Extract QR code image URL + const qrImgSrc = await page.evaluate(`(() => { + const imgs = document.querySelectorAll('img'); + for (const img of imgs) { + const src = img.src || ''; + if (src.includes('passport.baidu.com/v2/api/qrcode') || (src.includes('qrcode') && img.width > 100)) { + return src; + } + } + return ''; + })()`) as string; + + if (!qrImgSrc) { + throw new Error('Could not find QR code image on page'); + } + + // Parse sign + logPage from QR image URL, construct wappass login URL + let qrContent = ''; + try { + const imgUrlObj = new URL(qrImgSrc); + const sign = imgUrlObj.searchParams.get('sign') || ''; + const logPage = imgUrlObj.searchParams.get('logPage') || ''; + const t = Math.floor(Date.now() / 1000); + qrContent = `https://wappass.baidu.com/wp/?qrlogin&t=${t}&error=0&sign=${sign}&cmd=login&lp=pc&tpl=netdisk&adapter=3&logPage=${encodeURIComponent(logPage)}&qrloginfrom=pc`; + } catch { + qrContent = qrImgSrc; // fallback: raw image URL + } + + // Store session + qrSessions.set(sessionId, { + browser: browser, + context, + page, + startTime: Date.now(), + verifying: false, + }); + + console.log('[BaiduQR] Session stored:', sessionId); + return { sessionId, qrUrl: qrContent }; + + } catch (err: any) { + console.error('[BaiduQR] startQrLogin error:', err.message); + // Cleanup on error + if (page) try { await page.close(); } catch {} + if (context) try { await context.close(); } catch {} + throw new Error('启动百度扫码失败: ' + err.message); + } + // Note: browser/context/page NOT closed on success — need them for status polling + } + + static async getQrLoginStatus(sessionId: string): Promise<{ + status: string; + cookie?: string; + nickname?: string; + bdstoken?: string; + storage_used?: string; + storage_total?: string; + }> { + const session = qrSessions.get(sessionId); + if (!session) return { status: 'expired' }; + + const { page, context, browser } = session; + + // Prevent concurrent status checks (lock) + if (session.verifying) { + console.log('[BaiduQR] Status check already in progress, returning pending'); + return { status: 'pending' }; + } + session.verifying = true; + + // 300s expiry + if (Date.now() - session.startTime > 300000) { + try { await context.close(); } catch {} + session.verifying = false; + qrSessions.delete(sessionId); + return { status: 'expired' }; + } + + try { + // Check cookies for BDUSS (login indicator) + const cookies = await context.cookies(); + const hasBDUSS = cookies.some((c: any) => { + if (c.name === 'BDUSS' && c.value && c.value.length > 50) return true; + return false; + }); + + // Check page for login completion + const currentUrl = page.url(); + const bodyText = await page.evaluate(`(() => (document.body?.innerText || ''))()`) as string; + + // Login detection signals + const qrGone = !(await page.$('img[src*="qrcode"]')); + const loginSuccess = bodyText.includes('登录成功') || bodyText.includes('确认登录'); + const onPanPage = currentUrl.includes('pan.baidu.com/disk'); + + if (hasBDUSS && (qrGone || loginSuccess || onPanPage)) { + // Login detected! Wait for redirect to pan.baidu.com + console.log('[BaiduQR] Login detected, waiting for redirect...'); + + // Wait up to 15s for page to settle on pan.baidu.com + for (let i = 0; i < 15; i++) { + await page.waitForTimeout(1000); + const newUrl = page.url(); + if (newUrl.includes('pan.baidu.com') && !newUrl.includes('passport')) break; + } + + // Navigate to disk home to ensure cookies are fully set + try { + await page.goto('https://pan.baidu.com/disk/home', { waitUntil: 'commit', timeout: 15000 }); + await page.waitForTimeout(2000); + } catch {} + + // Capture ALL cookies + const allCookies = await context.cookies(); + const cookieStr = allCookies + .map((c: any) => `${c.name}=${c.value}`) + .join('; '); + + console.log(`[BaiduQR] Login success! Got ${allCookies.length} cookies, BDUSS=${hasBDUSS}`); + + // Get nickname and bdstoken + let nickname = ''; + let bdstoken = ''; + try { + const bdres = await fetch( + `${API_HOST}/api/gettemplatevariable?clienttype=0&app_id=${APP_ID_WEB}&web=1&fields=["bdstoken","uk"]`, + { headers: buildHeaders(cookieStr), signal: AbortSignal.timeout(10000) } + ); + if (bdres.ok) { + const bddata = await bdres.json() as any; + if (bddata.errno === 0) { + bdstoken = bddata.result?.bdstoken || ''; + } + } + } catch {} + + // Get storage info + let storage_used = ''; + let storage_total = ''; + if (bdstoken) { + try { + const qRes = await fetch(`${API_HOST}/api/quota?checkfree=1&checkexpire=1&bdstoken=${bdstoken}`, { + headers: buildHeaders(cookieStr), + signal: AbortSignal.timeout(10000), + }); + if (qRes.ok) { + const qData = await qRes.json() as any; + if (qData.errno === 0) { + const fmt = (bytes: number) => { + if (bytes >= 1024**4) return (bytes / 1024**4).toFixed(2) + ' TB'; + if (bytes >= 1024**3) return (bytes / 1024**3).toFixed(2) + ' GB'; + if (bytes >= 1024**2) return (bytes / 1024**2).toFixed(2) + ' MB'; + return (bytes / 1024).toFixed(2) + ' KB'; + }; + storage_used = qData.used ? fmt(qData.used) : ''; + storage_total = qData.total ? fmt(qData.total) : ''; + } + } + } catch {} + } + + // Get nickname from Baidu REST API (baidu_name field) + if (bdstoken) { + try { + const uRes = await fetch(`${API_HOST}/rest/2.0/xpan/nas?method=uinfo`, { + headers: buildHeaders(cookieStr), + signal: AbortSignal.timeout(10000), + }); + if (uRes.ok) { + const uData = await uRes.json() as any; + if (uData.errno === 0 && uData.baidu_name) { + nickname = uData.baidu_name; + } + } + } catch {} + } + + // Cleanup + session.verifying = false; + try { await context.close(); } catch {} + qrSessions.delete(sessionId); + + return { + status: 'logged_in', + cookie: cookieStr, + nickname: nickname || '百度用户', + bdstoken, + storage_used, + storage_total, + }; + } + + // Still pending + session.verifying = false; + return { status: 'pending' }; + + } catch (err: any) { + console.error('[BaiduQR] Status check error:', err.message); + session.verifying = false; + return { status: 'pending' }; + } + } + + static cancelQrLogin(sessionId: string) { + const session = qrSessions.get(sessionId); + if (session) { + const { context } = session; + try { context.close(); } catch {} + qrSessions.delete(sessionId); + console.log('[BaiduQR] Cancelled:', sessionId); + } + } + + // ═══════════════════════════════════ + // Validate — check cookie validity + // ═══════════════════════════════════ + + async validate(): Promise { + const cookie = this.getCookie(); + if (!cookie || !cookie.includes('BDUSS')) return false; + const bdstoken = await this.getBdstoken(); + return bdstoken !== null; + } + + async getUserInfo(): Promise<{ nickname: string; usedBytes: number; totalBytes: number } | null> { + const cookie = this.getCookie(); + if (!cookie) return null; + + try { + let nickname = this.config.nickname || ''; + let usedBytes = 0; + let totalBytes = 0; + + // Try to get user info from /api/userinfo + const uRes = await fetch(`${API_HOST}/api/userinfo?act=getuserinfo&bdstoken=${await this.getBdstoken()}`, { + headers: buildHeaders(cookie), + signal: AbortSignal.timeout(10000), + }); + if (uRes.ok) { + const uData = await uRes.json() as any; + if (uData.errno === 0 && uData.records) { + nickname = uData.records[0]?.username || nickname; + } + } + + // Get quota + try { + const qRes = await fetch(`${API_HOST}/api/quota?checkfree=1&checkexpire=1&bdstoken=${await this.getBdstoken()}`, { + headers: buildHeaders(cookie), + signal: AbortSignal.timeout(10000), + }); + if (qRes.ok) { + const qData = await qRes.json() as any; + if (qData.errno === 0) { + usedBytes = qData.used || 0; + totalBytes = qData.total || 0; + } + } + } catch {} + + return { nickname, usedBytes, totalBytes }; + } catch { + return null; + } + } + + async getStorageInfo(): Promise<{ used: string; total: string }> { + const info = await this.getUserInfo(); + if (!info) return { used: '0 B', total: '0 B' }; + const fmt = (bytes: number) => { + if (bytes >= 1024**4) return (bytes / 1024**4).toFixed(2) + ' TB'; + if (bytes >= 1024**3) return (bytes / 1024**3).toFixed(2) + ' GB'; + if (bytes >= 1024**2) return (bytes / 1024**2).toFixed(2) + ' MB'; + return (bytes / 1024).toFixed(2) + ' KB'; + }; + return { used: fmt(info.usedBytes), total: fmt(info.totalBytes) }; + } + + // ═══════════════════════════════════ + // File list (Cookie-based) + // ═══════════════════════════════════ + + private async listRootDir(): Promise> { + const cookie = this.getCookie(); + if (!cookie) return []; + const bdstoken = await this.getBdstoken(); + if (!bdstoken) return []; + + try { + const url = `${API_HOST}/api/list?order=time&desc=1&showempty=0&web=1&page=1&num=1000&dir=/&bdstoken=${bdstoken}`; + const res = await fetch(url, { + headers: buildHeaders(cookie), + signal: AbortSignal.timeout(15000), + }); + if (!res.ok) return []; + const data = await res.json() as any; + if (data.errno === 0 && data.list) { + return data.list.map((f: any) => ({ + fid: String(f.fs_id), + file_name: f.server_filename, + dir: f.isdir === 1 || f.isdir === '1', + size: f.size || 0, + })); + } + console.error('[Baidu] listRootDir errno:', data.errno); + return []; + } catch (err: any) { + console.error('[Baidu] listRootDir error:', err.message); + return []; + } + } + + private async createDir(path: string): Promise { + const cookie = this.getCookie(); + if (!cookie) return false; + const bdstoken = await this.getBdstoken(); + if (!bdstoken) return false; + + try { + const url = `${API_HOST}/api/create?a=commit&bdstoken=${bdstoken}`; + const body = new URLSearchParams({ path, isdir: '1', block_list: '[]' }); + const res = await fetch(url, { + method: 'POST', + headers: { ...buildHeaders(cookie), 'Content-Type': 'application/x-www-form-urlencoded' }, + body: body.toString(), + signal: AbortSignal.timeout(15000), + }); + if (!res.ok) return false; + const data = await res.json() as any; + if (data.errno === 0) return true; + if (data.errno === -8) return true; // already exists + console.error('[Baidu] createDir errno:', data.errno); + return false; + } catch (err: any) { + console.error('[Baidu] createDir error:', err.message); + return false; + } + } + + private async findOrCreateDir(dirName: string): Promise { + const rootItems = await this.listRootDir(); + const existing = rootItems.find(f => f.file_name === dirName && f.dir); + if (existing) return `/${dirName}`; + + const ok = await this.createDir(`/${dirName}`); + if (ok) { + console.log(`[Baidu] Created dir: ${dirName}`); + return `/${dirName}`; + } + return null; + } + + // ═══════════════════════════════════ + // Delete files + // ═══════════════════════════════════ + + private async deleteFiles(fsIds: string[]): Promise { + const cookie = this.getCookie(); + if (!cookie) return false; + const bdstoken = await this.getBdstoken(); + if (!bdstoken) return false; + + try { + const filelist = JSON.stringify(fsIds); + const body = new URLSearchParams({ async: '2', filelist }); + const res = await fetch(`${API_HOST}/api/filemanager?opera=delete&bdstoken=${bdstoken}`, { + method: 'POST', + headers: { ...buildHeaders(cookie), 'Content-Type': 'application/x-www-form-urlencoded' }, + body: body.toString(), + signal: AbortSignal.timeout(30000), + }); + if (!res.ok) return false; + const data = await res.json() as any; + return data.errno === 0; + } catch (err: any) { + console.error('[Baidu] deleteFiles error:', err.message); + return false; + } + } + + // ═══════════════════════════════════ + // Validate share link + // ═══════════════════════════════════ + + async validateShareLink(shareUrl: string): Promise<{ valid: boolean; message: string; fileCount?: number }> { + const parsed = extractShortUrl(shareUrl); + if (!parsed) return { valid: false, message: '无法解析百度网盘链接格式' }; + const { surl, pwd } = parsed; + + try { + // Try to get share file list + const shareInfo = await this.getShareFiles(surl, pwd); + if (shareInfo && shareInfo.files.length > 0) { + return { valid: true, message: `有效(${shareInfo.files.length} 个文件)`, fileCount: shareInfo.files.length }; + } + return { valid: false, message: '链接已过期或需要提取码' }; + } catch (err: any) { + return { valid: false, message: `验证失败: ${err.message}` }; + } + } + + // ═══════════════════════════════════ + // Get share file list — Cookie HTTP + // ═══════════════════════════════════ + // Flow: getbdstoken → verify password (get randsk) → update cookie with BDCLND → GET share page → regex parse + + private async getShareFiles(surl: string, pwd: string): Promise { + const cookie = this.getCookie(); + if (!cookie) { + console.log('[Baidu] No cookie available for share file listing'); + return null; + } + + const bdstoken = await this.getBdstoken(); + if (!bdstoken) { + console.log('[Baidu] No bdstoken available'); + return null; + } + + let workingCookie = cookie; + + try { + // Step 1: Verify password and get randsk (BDCLND) + if (pwd) { + console.log(`[Baidu:Share] Verifying password for surl=${surl}...`); + const t = String(Date.now()); + const verifyUrl = `${API_HOST}/share/verify?surl=${surl}&bdstoken=${bdstoken}&t=${t}&channel=chunlei&web=1&clienttype=0`; + const verifyBody = new URLSearchParams({ pwd, vcode: '', vcode_str: '' }); + + const vRes = await fetch(verifyUrl, { + method: 'POST', + headers: { ...buildHeaders(workingCookie), 'Content-Type': 'application/x-www-form-urlencoded' }, + body: verifyBody.toString(), + signal: AbortSignal.timeout(10000), + }); + + if (!vRes.ok) { + console.log(`[Baidu:Share] Password verify HTTP ${vRes.status}`); + return null; + } + const vData = await vRes.json() as any; + + if (vData.errno !== 0) { + // Error codes: -9/-12 = wrong password, 105 = not found, -62 = blocked + const errMap: Record = { '-9': '提取码错误', '-12': '提取码错误', '105': '链接不存在', '-62': '访问次数过多', '2': '链接已过期', '-33': '转存失败' }; + console.log(`[Baidu:Share] Password verify failed: errno=${vData.errno} — ${errMap[vData.errno] || '未知错误'}`); + return null; + } + + const randsk = vData.randsk || ''; + if (randsk) { + // Update cookie with BDCLND=randsk (per BaiduPanFilesTransfers) + workingCookie = updateCookie(workingCookie, 'BDCLND', randsk); + console.log('[Baidu:Share] Password verified, BDCLND updated'); + } + } + + // Step 2: GET share page with updated cookie + const shareUrl = `https://pan.baidu.com/s/1${surl}`; + console.log(`[Baidu:Share] Fetching share page: ${shareUrl}`); + const sRes = await fetch(shareUrl, { + headers: buildHeaders(workingCookie), + signal: AbortSignal.timeout(15000), + redirect: 'follow', + }); + + if (!sRes.ok) { + console.log(`[Baidu:Share] Share page HTTP ${sRes.status}`); + return null; + } + + const html = await sRes.text(); + + // Check for error states + if (html.includes('页面不存在') || html.includes('你来晚了') || html.includes('链接已失效') || html.includes('分享已过期')) { + console.log('[Baidu:Share] Share link is dead/expired'); + return null; + } + + // Step 3: Parse HTML for file info using regex + const shareidMatch = html.match(RE_SHAREID); + const ukMatch = html.match(RE_SHARE_UK); + const fsIdMatches = [...html.matchAll(new RegExp(RE_FSID.source, 'g'))]; + const filenameMatches = [...html.matchAll(new RegExp(RE_FILENAME.source, 'g'))]; + const isdirMatches = [...html.matchAll(new RegExp(RE_ISDIR.source, 'g'))]; + const sizeMatches = [...html.matchAll(new RegExp(RE_SIZE.source, 'g'))]; + const categoryMatches = [...html.matchAll(new RegExp(RE_CATEGORY.source, 'g'))]; + + if (!shareidMatch || !ukMatch || fsIdMatches.length === 0) { + // Try alternative extraction from yunData in script tags + const yunMatch = html.match(/yunData\.setData\((\{[^]*?\})\);?/); + if (yunMatch) { + try { + const yunData = JSON.parse(yunMatch[1]); + if (yunData.filelist && yunData.filelist.length > 0) { + const files: ShareFileInfo[] = yunData.filelist.map((f: any) => ({ + server_filename: f.server_filename || '', + fs_id: String(f.fs_id), + isdir: f.isdir || 0, + size: f.size || 0, + path: f.path || '', + category: f.category || 0, + })); + console.log(`[Baidu:Share] Found ${files.length} file(s) via yunData`); + return { files, childFiles: null }; + } + } catch {} + } + + console.log('[Baidu:Share] Could not parse file list from page'); + return null; + } + + const count = fsIdMatches.length; + const files: ShareFileInfo[] = []; + for (let i = 0; i < count; i++) { + files.push({ + server_filename: filenameMatches[i] ? filenameMatches[i][1] : '', + fs_id: fsIdMatches[i][1], + isdir: isdirMatches[i] ? parseInt(isdirMatches[i][1]) : 0, + size: sizeMatches[i] ? parseInt(sizeMatches[i][1]) : 0, + path: '', + category: categoryMatches[i] ? parseInt(categoryMatches[i][1]) : 0, + }); + } + + console.log(`[Baidu:Share] Found ${files.length} file(s) via regex parse`); + return { files, childFiles: null }; + + } catch (err: any) { + console.error('[Baidu:Share] getShareFiles error:', err.message); + return null; + } + } + + // ═══════════════════════════════════ + // Transfer files — Cookie HTTP + // ═══════════════════════════════════ + + private async transferFiles( + surl: string, pwd: string, + fsIds: string[], destPath: string + ): Promise<{ success: boolean; taskId?: string; message: string }> { + const cookie = this.getCookie(); + if (!cookie) return { success: false, message: '未登录百度网盘' }; + + const bdstoken = await this.getBdstoken(); + if (!bdstoken) return { success: false, message: '获取 bdstoken 失败,Cookie 可能已过期' }; + + let workingCookie = cookie; + + try { + // Step 1: Get share info from page (shareid + uk) + const shareUrl = `https://pan.baidu.com/s/1${surl}`; + + // Verify password first if needed + if (pwd) { + const t = String(Date.now()); + const vUrl = `${API_HOST}/share/verify?surl=${surl}&bdstoken=${bdstoken}&t=${t}&channel=chunlei&web=1&clienttype=0`; + const vBody = new URLSearchParams({ pwd, vcode: '', vcode_str: '' }); + + const vRes = await fetch(vUrl, { + method: 'POST', + headers: { ...buildHeaders(workingCookie), 'Content-Type': 'application/x-www-form-urlencoded' }, + body: vBody.toString(), + signal: AbortSignal.timeout(10000), + }); + + if (vRes.ok) { + const vData = await vRes.json() as any; + if (vData.errno === 0 && vData.randsk) { + workingCookie = updateCookie(workingCookie, 'BDCLND', vData.randsk); + } else { + return { success: false, message: `密码验证失败 errno=${vData.errno}` }; + } + } + } + + // Get share page to extract shareid + uk + const sRes = await fetch(shareUrl, { + headers: buildHeaders(workingCookie), + signal: AbortSignal.timeout(15000), + redirect: 'follow', + }); + if (!sRes.ok) return { success: false, message: `无法访问分享页面 HTTP ${sRes.status}` }; + + const html = await sRes.text(); + const shareidMatch = html.match(RE_SHAREID); + const ukMatch = html.match(RE_SHARE_UK); + + if (!shareidMatch || !ukMatch) { + return { success: false, message: '无法从页面提取分享信息' }; + } + + const shareid = shareidMatch[1]; + const uk = ukMatch[1]; + + // Step 2: Transfer + console.log(`[Baidu:Transfer] Transferring ${fsIds.length} file(s) to ${destPath}...`); + const fsidlist = `[${fsIds.join(',')}]`; + const path = destPath === '/' ? '/' : `/${destPath.replace(/^\//, '')}`; + + const tUrl = `${API_HOST}/share/transfer?shareid=${shareid}&from=${uk}&bdstoken=${bdstoken}&channel=chunlei&web=1&clienttype=0`; + const tBody = new URLSearchParams({ fsidlist, path }); + + // Retry up to 3 times for transient fetch failures + let tRes: any; + let lastErr: any; + for (let attempt = 0; attempt < 3; attempt++) { + try { + tRes = await fetch(tUrl, { + method: 'POST', + headers: { ...buildHeaders(workingCookie), 'Content-Type': 'application/x-www-form-urlencoded' }, + body: tBody.toString(), + signal: AbortSignal.timeout(30000), + }); + break; + } catch (err: any) { + lastErr = err; + if (attempt < 2) { + console.log(`[Baidu:Transfer] Attempt ${attempt + 1} failed: ${err.message}, retrying in 2s...`); + await new Promise(r => setTimeout(r, 2000)); + } + } + } + if (!tRes) return { success: false, message: `转存网络错误: ${lastErr?.message || 'fetch failed'}` }; + + if (!tRes.ok) return { success: false, message: `转存请求失败 HTTP ${tRes.status}` }; + + const tData = await tRes.json() as any; + + if (tData.errno === 0) { + console.log(`[Baidu:Transfer] Success!`); + return { success: true, taskId: `transfer_${Date.now()}`, message: 'ok' }; + } + + // Known error codes + const errMap: Record = { + 0: '转存成功', + 2: '目标目录不存在', + 4: '目录中存在同名文件', + 12: '转存文件数超过限制', + 20: '容量不足', + '-4': '登录失效,请重新登录', + '-6': 'Cookie 无效,请重新获取', + '-62': '访问次数过多,请稍后再试', + // -33 is a known error, mapped as generic + }; + + const errMsg = errMap[tData.errno] || `errno=${tData.errno}`; + console.error(`[Baidu:Transfer] Failed: ${errMsg}`); + return { success: false, message: errMsg }; + + } catch (err: any) { + console.error('[Baidu:Transfer] Error:', err.message); + return { success: false, message: `转存异常: ${err.message}` }; + } + } + + // ═══════════════════════════════════ + // Main saveFromShare — full pipeline + // ═══════════════════════════════════ + + async saveFromShare(shareUrl: string, sourceTitle?: string): Promise<{ + success: boolean; + message: string; + shareUrl?: string; + sharePwd?: string; + folderName?: string; + taskId?: string; + fileCount?: number; + folderCount?: number; + originalFolderName?: string; + }> { + const parsed = extractShortUrl(shareUrl); + if (!parsed) return { success: false, message: '无法解析百度网盘链接格式' }; + + const { surl, pwd } = parsed; + console.log(`[Baidu] saveFromShare: surl=${surl}, pwd=${pwd ? '***' : '(none)'}`); + + // Step 1: Get share file list + const shareInfo = await this.getShareFiles(surl, pwd); + if (!shareInfo || shareInfo.files.length === 0) { + if ((this.config as any).cookieExpired) { + return { + success: false, + message: '百度登录已过期,请重新扫码登录', + cookieExpired: true, + } as any; + } + return { success: false, message: '获取分享文件列表失败,链接可能已过期或需要提取码' }; + } + + const { files } = shareInfo; + const originalFolderName = files[0]?.server_filename || ''; + const fileCount = files.filter(f => !f.isdir).length; + const folderCount = files.filter(f => f.isdir).length; + + // Step 2: Create/find daily folder, then sub-folder with original name + await humanDelay(); + const saveDirName = dailyFolderName(); + console.log(`[Baidu] Creating/finding dir: ${saveDirName}`); + const saveDirPath = await this.findOrCreateDir(saveDirName); + let destPath = saveDirPath || '/'; + if (!saveDirPath) { + console.log(`[Baidu] WARNING: failed to create dir, saving to root`); + } + + // Create sub-folder with original name under date folder + let savedFolderName = saveDirName; + if (originalFolderName && saveDirPath) { + const subDirName = originalFolderName.replace(/[/\\:*?"<>|]/g, '_').substring(0, 100); + const subDirPath = `${saveDirPath}/${subDirName}`; + const subOk = await this.createDir(subDirPath); + if (subOk) { + destPath = subDirPath; + savedFolderName = `${saveDirName}/${subDirName}`; + console.log(`[Baidu] Created sub-folder: ${subDirName}`); + } else { + console.log(`[Baidu] Failed to create sub-folder, saving to ${destPath}`); + } + } + + // Step 3: Transfer files + await humanDelay(); + const fsIds = files.map(f => f.fs_id); + console.log(`[Baidu] Transferring ${fsIds.length} file(s) to ${destPath}`); + const transferResult = await this.transferFiles(surl, pwd, fsIds, destPath); + if (!transferResult.success) { + return { success: false, message: `转存失败: ${transferResult.message}`, fileCount, folderCount, originalFolderName }; + } + + console.log(`[Baidu] Save complete: ${fsIds.length} files -> ${destPath}`); + + // Step 4: Create share link from user's own drive + let ownShareUrl = ''; + let ownSharePwd = ''; + let shareMsg = ''; + try { + // Find the saved directory to get its fs_id for sharing + const savedDir = await this.findDirByPath(destPath); + if (savedDir) { + const shareResult = await this.createShareLink(savedDir); + if (shareResult.success && shareResult.shareUrl) { + ownShareUrl = shareResult.shareUrl; + ownSharePwd = shareResult.sharePwd || ''; + shareMsg = '(已创建分享链接)'; + } else if (shareResult.needVerify) { + // Account needs verification to create shares + shareMsg = '(你的百度账号需要实名/绑定手机才能创建分享链接,当前为源链接)'; + ownShareUrl = `https://pan.baidu.com/s/1${surl}`; + ownSharePwd = pwd || ''; + } else { + shareMsg = `(分享创建失败:${shareResult.message},当前为源链接)`; + ownShareUrl = `https://pan.baidu.com/s/1${surl}`; + ownSharePwd = pwd || ''; + } + } else { + ownShareUrl = `https://pan.baidu.com/s/1${surl}`; + ownSharePwd = pwd || ''; + } + } catch { + ownShareUrl = `https://pan.baidu.com/s/1${surl}`; + ownSharePwd = pwd || ''; + } + + return { + success: true, + message: `✅ 转存成功${shareMsg}`, + shareUrl: ownShareUrl || undefined, + sharePwd: ownSharePwd || undefined, + folderName: savedFolderName, + taskId: transferResult.taskId, + fileCount, + folderCount, + originalFolderName, + }; + } + + // ═══════════════════════════════════ + // Share creation (user's own drive) + // ═══════════════════════════════════ + + /** Find a directory by path, return its fs_id */ + private async findDirByPath(dirPath: string): Promise { + const cookie = this.getCookie(); + if (!cookie) return null; + const bdstoken = await this.getBdstoken(); + if (!bdstoken) return null; + + const parentPath = dirPath.substring(0, dirPath.lastIndexOf('/')) || '/'; + const dirName = dirPath.substring(dirPath.lastIndexOf('/') + 1); + + try { + const res = await fetch( + `${API_HOST}/api/list?dir=${encodeURIComponent(parentPath)}&bdstoken=${bdstoken}&order=time&desc=1`, + { headers: buildHeaders(cookie), signal: AbortSignal.timeout(10000) } + ); + if (!res.ok) return null; + const data = await res.json() as any; + if (data.errno !== 0) return null; + const found = (data.list || []).find((f: any) => f.server_filename === dirName && f.isdir === 1); + return found ? String(found.fs_id) : null; + } catch { + return null; + } + } + + /** Create a share link from a file/directory in user's own drive */ + private async createShareLink(fsId: string): Promise<{ success: boolean; shareUrl?: string; sharePwd?: string; message: string; needVerify?: boolean }> { + const cookie = this.getCookie(); + if (!cookie) return { success: false, message: '未登录' }; + const bdstoken = await this.getBdstoken(); + if (!bdstoken) return { success: false, message: '获取 bdstoken 失败' }; + + try { + // Generate a random 4-char share password (required by Baidu share/set API) + const pwd = Math.random().toString(36).substring(2, 6); + const body = new URLSearchParams({ + fid_list: `[${fsId}]`, + schannel: '0', + channel_list: '[]', + period: '0', + pwd, + }); + + const url = `${API_HOST}/share/set?bdstoken=${bdstoken}&channel=chunlei&web=1&clienttype=0&app_id=250528`; + const res = await fetch(url, { + method: 'POST', + headers: { ...buildHeaders(cookie), 'Content-Type': 'application/x-www-form-urlencoded' }, + body: body.toString(), + signal: AbortSignal.timeout(15000), + }); + + const data = await res.json() as any; + + if (data.errno === 0) { + // Success — extract shareid and link from response + const shareid = data.shareid; + if (shareid) { + const link = data.link || `https://pan.baidu.com/s/1${shareid}`; + return { success: true, shareUrl: link, sharePwd: pwd, message: 'ok' }; + } + return { success: false, message: '创建成功但未获取到分享链接' }; + } + + if (data.errno === 115) { + // Account genuinely restricted (should not happen with correct pwd param) + return { success: false, message: '账号异常,禁止分享', needVerify: true }; + } + + return { success: false, message: data.show_msg || `分享创建失败 errno=${data.errno}` }; + } catch (err: any) { + return { success: false, message: err.message || '网络错误' }; + } + } + + // ═══════════════════════════════════ + // Cleanup + // ═══════════════════════════════════ + + async emptyTrash(): Promise { + // Cookie-based approach: list recycle and delete + const cookie = this.getCookie(); + if (!cookie) return false; + + try { + const bdstoken = await this.getBdstoken(); + if (!bdstoken) return false; + + // We don't have a dedicated trash API with Cookie, use /api/list with recycle parameter + // For now, skip if trash is empty + console.log('[Baidu] emptyTrash: not fully implemented for Cookie yet, skipping'); + return true; + } catch (err: any) { + console.error('[Baidu] emptyTrash error:', err.message); + return false; + } + } + + async cleanupOldDateFolders(days: number): Promise<{ trashed: number; errors: string[] }> { + const errors: string[] = []; + const cutoff = new Date(); + cutoff.setDate(cutoff.getDate() - days); + const cutoffStr = cutoff.toISOString().slice(0, 10); + + try { + const rootItems = await this.listRootDir(); + const oldFolders = rootItems.filter(item => { + if (!item.dir) return false; + if (!/^\d{4}-\d{2}-\d{2}$/.test(item.file_name)) return false; + return item.file_name < cutoffStr; + }); + + if (oldFolders.length === 0) return { trashed: 0, errors: [] }; + + const fsIds = oldFolders.map(f => f.fid); + console.log(`[Baidu] Deleting ${fsIds.length} old date folders (before ${cutoffStr}): ${oldFolders.map(f => f.file_name).join(', ')}`); + const ok = await this.deleteFiles(fsIds); + if (ok) return { trashed: fsIds.length, errors: [] }; + return { trashed: 0, errors: [`删除 ${fsIds.length} 个文件夹失败`] }; + } catch (err: any) { + return { trashed: 0, errors: [err.message] }; + } + } + + async cleanupBySpaceThreshold(thresholdPercent: number, deletePercent: number): Promise<{ trashed: number; errors: string[] }> { + const errors: string[] = []; + try { + const info = await this.getUserInfo(); + if (!info || info.totalBytes <= 0) return { trashed: 0, errors: [] }; + + const usagePercent = (info.usedBytes / info.totalBytes) * 100; + if (usagePercent < thresholdPercent) { + console.log(`[Baidu] Usage ${usagePercent.toFixed(1)}% below threshold ${thresholdPercent}%, skipping`); + return { trashed: 0, errors: [] }; + } + + const targetBytesToFree = Math.floor(info.totalBytes * Math.min(deletePercent, 100) / 100); + const rootItems = await this.listRootDir(); + const dateFolders = rootItems + .filter(item => item.dir && /^\d{4}-\d{2}-\d{2}$/.test(item.file_name)) + .sort((a, b) => a.file_name.localeCompare(b.file_name)); + + if (dateFolders.length === 0) return { trashed: 0, errors: [] }; + + const avgSize = info.usedBytes / dateFolders.length; + const estCount = Math.max(1, Math.ceil(targetBytesToFree / (avgSize || 1))); + const foldersToTrash = dateFolders.slice(0, Math.min(estCount, dateFolders.length)); + + const freedMB = (foldersToTrash.length * (avgSize || 0) / 1024 / 1024).toFixed(0); + const fsIdsToTrash = foldersToTrash.map(f => f.fid); + console.log(`[Baidu] Space threshold: deleting ${foldersToTrash.length}/${dateFolders.length} oldest folders (~${freedMB} MB)`); + + const ok = await this.deleteFiles(fsIdsToTrash); + if (ok) return { trashed: foldersToTrash.length, errors: [] }; + return { trashed: 0, errors: ['空间阈值清理失败'] }; + } catch (err: any) { + return { trashed: 0, errors: [err.message] }; + } + } +} + +// ═══════════════════════════════════ +// Utility: update Cookie string +// ═══════════════════════════════════ + +function updateCookie(cookieStr: string, key: string, value: string): string { + const pairs = cookieStr.split(';').map(s => s.trim()).filter(s => s); + let found = false; + const updated = pairs.map(p => { + const eq = p.indexOf('='); + if (eq > 0 && p.substring(0, eq) === key) { + found = true; + return `${key}=${value}`; + } + return p; + }); + if (!found) { + updated.push(`${key}=${value}`); + } + return updated.join('; '); +} diff --git a/source_clean/src/cloud/drivers/quark.driver.ts b/source_clean/src/cloud/drivers/quark.driver.ts new file mode 100755 index 0000000..9ed3808 --- /dev/null +++ b/source_clean/src/cloud/drivers/quark.driver.ts @@ -0,0 +1,1533 @@ +// Native fetch available in Node 20+ +import * as crypto from 'crypto'; + +export interface QuarkConfig { + cookie: string; + nickname?: string; +} + +export interface StorageInfo { + used: string; + total: string; + usedBytes: number; + totalBytes: number; +} + +interface ShareFile { + fid: string; + file_name: string; + share_fid_token: string; + dir: boolean; + size?: number; +} + +export class QuarkDriver { + private config: QuarkConfig; + private baseUrl = 'https://drive-pc.quark.cn'; + private cachedUsedSpace: { bytes: number; hourBlock: number } | null = null; + + constructor(config: QuarkConfig) { + this.config = config; + } + + private getHeaders(): Record { + return { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', + 'Cookie': this.config.cookie, + 'Accept': 'application/json, text/plain, */*', + 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8', + 'Referer': 'https://pan.quark.cn/', + 'Origin': 'https://pan.quark.cn', + }; + } + + private getCommonParams(): Record { + return { pr: 'ucpro', fr: 'pc' }; + } + + /** Random delay to mimic human behavior (500-2000ms) */ + private async humanDelay(): Promise { + const ms = Math.floor(Math.random() * 1500) + 500; + await new Promise(r => setTimeout(r, ms)); + } + + /** Generate a random password for share links */ + private randomSharePwd(): string { + return Math.floor(1000 + Math.random() * 9000).toString(); + } + + /** Generate a daily folder name (e.g. "2026-05-03") for organizing saves */ + private dailyFolderName(): string { + const d = new Date(); + const y = d.getFullYear(); + const m = String(d.getMonth() + 1).padStart(2, '0'); + const day = String(d.getDate()).padStart(2, '0'); + return `${y}-${m}-${day}`; + } + + /** Generate a random folder name for saving (fallback) */ + private randomFolderName(): string { + const chars = 'abcdefghijklmnopqrstuvwxyz0123456789'; + let name = ''; + for (let i = 0; i < 12; i++) { + name += chars[Math.floor(Math.random() * chars.length)]; + } + return name; + } + + /** Generate query string with common params + random timing to mimic browser */ + private makeQuery(extra: Record = {}): string { + const __dt = Math.floor(Math.random() * 240000 + 60000); + const __t = Date.now() / 1000; + return new URLSearchParams({ + ...this.getCommonParams(), + uc_param_str: '', + app: 'clouddrive', + __dt: String(__dt), + __t: String(__t), + ...extra, + }).toString(); + } + + /** + * Extract kps/sign/vcode from cookie for API signing (bare keys, no __ prefix). + */ + private getMparam(): { kps?: string; sign?: string; vcode?: string } { + const cookie = this.config.cookie; + const kpsMatch = cookie.match(/(? = { + // 网盘热门番名 — 谐音替换 (same sound, different char) + '斗':'陡','破':'坡','苍':'仓','穹':'穷', + '完':'玩','美':'每','世':'士','界':'介', + '凡':'烦','人':'仁','修':'休','罗':'络', + '仙':'先','逆':'腻','遮':'折','天':'添', + '吞':'屯','噬':'逝','大':'达','主':'嘱','宰':'崽', + '星':'惺','辰':'晨','变':'便','一':'伊','念':'捻', + '永':'泳','恒':'横','神':'申','墓':'暮','长':'尝','生':'甥', + '剑':'箭','来':'莱','诡':'鬼','秘':'蜜', + '全':'泉','职':'值','盘':'磐','龙':'笼', + '雪':'血','鹰':'莺','莽':'蟒','荒':'慌','纪':'记', + '珠':'株','王':'亡','座':'坐','牧':'木','记':'计', + '沧':'舱','元':'圆','图':'涂','紫':'仔','川':'串', + '百':'白','炼':'恋','成':'程','饶':'绕','命':'冥', + // 通用谐音替换 + '的':'得','了':'啦','是':'事','不':'布','我':'窝', + '你':'尼','他':'她','有':'友','和':'合','与':'予', + '上':'尚','下':'夏','中':'忠','第':'弟','集':'级', + '话':'划','季':'际','年':'念','月':'阅','日':'曰', + '新':'心','版':'板','高':'糕','清':'青','原':'源', + '小':'晓','片':'篇','视':'市','频':'贫','道':'到', + '动':'洞','画':'话','声':'升','音':'因','文':'闻', + '明':'名','暗':'黯','光':'广','影':'映','色':'瑟', + '风':'疯','雨':'语','花':'华','国':'果','家':'佳', + '战':'站','争':'挣','士':'仕','兵':'宾', + '皇':'惶','帝':'谛','魔':'磨','鬼':'诡','怪':'乖', + '精':'经','灵':'铃','妖':'夭','武':'舞','侠':'狭', + '杀':'刹','血':'雪','刀':'叨','枪':'呛','炮':'泡', + '时':'石','空':'孔','前':'钱','后':'厚','东':'冬', + '南':'难','西':'夕','北':'备','开':'凯','关':'官', + '出':'初','进':'近','去':'趣', + '短':'短','多':'多','少':'少','真':'贞','假':'价', + '好':'郝','坏':'怀','对':'队','错':'措','以':'已', + '从':'从','被':'被','把':'把','将':'将','在':'在', + '但':'但','就':'就','才':'才','也':'也','很':'狠', + '又':'又','再':'再','更':'更','最':'最','总':'总', + '共':'共','只':'只','各':'各','每':'每','任':'任', + '所':'所','该':'该','本':'本', + }; + + /** Convert Chinese text to homophonic (substitute chars with same sound) */ + private homophonicText(text: string): string { + let result = ''; + for (const ch of text) { + if (/[\u4e00-\u9fff]/.test(ch)) { + const homophone = QuarkDriver.HOMOPHONE_MAP[ch]; + result += homophone || ch; + } else { + result += ch; + } + } + return result; + } + + /** Convert Chinese text to pinyin-initial-like string (each char → first pinyin letter or fallback) */ + private pinyinLike(text: string): string { + let result = ''; + for (const ch of text) { + if (/[\u4e00-\u9fff]/.test(ch)) { + const homophone = QuarkDriver.HOMOPHONE_MAP[ch]; + if (homophone) { + // Take first letter of homophone pinyin + result += this.pinyinInitial(homophone); + } else { + // Fallback: use codepoint to generate a letter + const code = ch.charCodeAt(0); + result += String.fromCharCode(97 + (code % 26)); + } + } else if (/[a-zA-Z0-9]/.test(ch)) { + result += ch; + } else if (/[\s._-]/.test(ch)) { + result += '_'; + } + } + return result.replace(/_+/g, '_').replace(/^_|_$/g, ''); + } + + /** Get pinyin initial (first letter of pinyin) for a Chinese character */ + private pinyinInitial(ch: string): string { + // This is a simplified pinyin initial mapping based on unicode range + // Real pinyin would need a full library, this is a workable approximation + const code = ch.charCodeAt(0); + if (code >= 0x4E00 && code <= 0x9FFF) { + // Crude but functional: map unicode range to initial letters + // Based on real pinyin distributions + const initials = ['b','p','m','f','d','t','n','l','g','k','h','j','q','x','zh','ch','sh','r','z','c','s','y','w']; + const idx = Math.min(Math.floor((code - 0x4E00) / 700), initials.length - 1); + return initials[idx]; + } + return ch.toLowerCase(); + } + + private static readonly NOISE_CJK = '的了在是不有会可对所之也同与及但或如且乃而岂乎焉兮哉亦犹尚乃其若故盖诸焉欤' + + '么个着过把对为从以到说时要就这那和上人家下能出得发来年心开物力些长样吧啊哦嗯嚯哇咯呗哟嘿呵哈'; + /** + * Anti-harmony rename for directories. + * NEW APPROACH: light homophonic replacement + preserve structure. + * Goal: still recognizable to humans, but doesn't match keyword filters. + * + * 妖神记 第九季 (2025) 更新432 + * → 夭申记 弟九季 (2025) 更新432_9b03 (80%: light homophonic) + * → ys记 第9季 (2025) gx432_9b03 (20%: partial pinyin) + */ + private magicRenameDir(dirName: string): string { + const hash = crypto.createHash('md5').update(dirName + Date.now()).digest('hex').slice(0, 4); + + // Clean up: replace multiple spaces, trim + let cleanName = dirName.trim().replace(/\s+/g, ' '); + + if (!cleanName) { + return `media_${hash}`; + } + + // Two strategies: light homophonic (80%) or partial pinyin (20%) + let baseName: string; + + if (Math.random() < 0.2) { + // Partial pinyin: 30% of CJK chars → pinyin initial, 70% stay as-is + const chars = [...cleanName]; + const result: string[] = []; + for (const ch of chars) { + if (/[\u4e00-\u9fff]/.test(ch) && Math.random() < 0.3) { + result.push(this.pinyinInitial(ch)); + } else { + result.push(ch); + } + } + baseName = result.join(''); + } else { + // Light homophonic: replace each CJK char, keep everything else as-is + const chars = [...cleanName]; + const result: string[] = []; + for (const ch of chars) { + if (/[\u4e00-\u9fff]/.test(ch)) { + result.push(QuarkDriver.HOMOPHONE_MAP[ch] || ch); + } else { + result.push(ch); + } + } + baseName = result.join(''); + + // Optional: insert 0-2 light noise chars (low probability) + const noiseCount = Math.random() < 0.3 ? (Math.random() < 0.5 ? 1 : 2) : 0; + for (let n = 0; n < noiseCount; n++) { + const pos = Math.floor(Math.random() * (baseName.length + 1)); + const ink = QuarkDriver.NOISE_CJK[Math.floor(Math.random() * QuarkDriver.NOISE_CJK.length)]; + baseName = baseName.slice(0, pos) + ink + baseName.slice(pos); + } + } + + // Cleanup: replace non-alphanumeric/CJK chars with underscore + baseName = baseName.replace(/[^\u4e00-\u9fff\w]/g, '_'); + baseName = baseName.replace(/_+/g, '_').replace(/^_|_$/g, ''); + if (baseName.length > 30) baseName = baseName.slice(0, 30); + + // Append hash suffix + return `${baseName}_${hash}`; + } + + /** + * Anti-harmony rename for files. + * KEEPS: episode numbers (第01集, 01, Ep1), quality (4K, 1080P, HDR), language tags, original extension + * REPLACES: Chinese title with homophonic/pinyin + * + * Original: 斗破苍穹_第01集_1080p.mp4 + * Result: 陡坡仓穷_Ep01_1080p_x9k2.mp4 + */ + private magicRename(filename: string): string { + const hash = crypto.createHash('md5').update(filename + Date.now()).digest('hex').slice(0, 8); + + let ext = ''; + const extMatch = filename.match(/\.[a-zA-Z0-9]+$/); + if (extMatch) { + ext = extMatch[0]; + filename = filename.slice(0, -ext.length); + } + + // Extract and REMEMBER: episode info, quality, language, year + const episodePatterns = [ + { regex: /第\s*(\d+)\s*[集话話話話话回章期]/, format: (m: string) => 'Ep' + m.replace(/[^\d]/g, '') }, + { regex: /Ep\d+|ep\d+/i, format: (m: string) => m.toUpperCase() }, + { regex: /Part\s*\d+/i, format: (m: string) => m.replace(/\s+/g, '') }, + { regex: /E\d{2,}/i, format: (m: string) => m.toUpperCase() }, + ]; + let episodeTag = ''; + for (const { regex, format } of episodePatterns) { + const m = filename.match(regex); + if (m) { + episodeTag = format(m[0]); + filename = filename.replace(m[0], ''); + break; + } + } + + // Extract and REMEMBER: quality tags + const qualityPattern = /\b(4k|1080p|1080P|2160p|720p|HD|BluRay|Blu-ray|HDR|WEB-DL|WEBRip|BDRip|REMUX|DV|Dovi|HEVC|x264|x265|H\.264|H\.265)\b/; + const qualityMatch = filename.match(qualityPattern); + const qualityTag = qualityMatch ? qualityMatch[0] : ''; + if (qualityMatch) filename = filename.replace(qualityMatch[0], ''); + + // Extract and REMEMBER: language tags + const langPattern = /\b(CHS|CHT|JP|EN|BIG5|GB|粤语|国语|日语|英语|中字|日字|英字|繁体中字)\b/; + const langMatch = filename.match(langPattern); + const langTag = langMatch ? langMatch[0] : ''; + if (langMatch) filename = filename.replace(langMatch[0], ''); + + // Extract and REMEMBER: year + const yearMatch = filename.match(/\b(20\d{2})\b/); + const yearTag = yearMatch ? yearMatch[0] : ''; + if (yearMatch) filename = filename.replace(yearMatch[0], ''); + + // Extract and REMEMBER: season info + const seasonMatch = filename.match(/第?\s*(\d+)\s*[季部期]/); + const seasonTag = seasonMatch ? `${seasonMatch[1]}季` : ''; + if (seasonMatch) filename = filename.replace(seasonMatch[0], ''); + + // Now process the remaining name (mostly Chinese title) + // Clean up separators + filename = filename.replace(/[._\-【】\[\]()()\s]+/g, '_').trim(); + + // Decide: homophonic or pinyin-initial + const useHomophonic = Math.random() > 0.5; + let titlePart: string; + if (useHomophonic) { + titlePart = this.homophonicText(filename); + // Remove non-title chars + titlePart = titlePart.replace(/[^\u4e00-\u9fff\wa-zA-Z0-9]/g, '_'); + titlePart = titlePart.replace(/_+/g, '_').replace(/^_|_$/g, ''); + if (titlePart.length > 15) titlePart = titlePart.slice(0, 15); + } else { + titlePart = this.pinyinLike(filename); + titlePart = titlePart.replace(/[^a-zA-Z0-9]/g, '_'); + titlePart = titlePart.replace(/_+/g, '_').replace(/^_|_$/g, ''); + if (titlePart.length > 15) titlePart = titlePart.slice(0, 15); + } + + // Remove sensitive keywords from title part + const sensitiveWords = /斗破|完美|凡人|仙逆|遮天|吞噬|大主宰|绝世|武动|星辰变|一念永恒|修罗|神墓|长生|剑来|诡秘|全职|斗罗|盘龙|雪鹰|莽荒纪|天珠变|神印王座|牧神记|沧元图|紫川|百炼成神|大王饶命|全球高考/ig; + titlePart = titlePart.replace(sensitiveWords, ''); + titlePart = titlePart.replace(/_+/g, '_').replace(/^_|_$/g, ''); + + // Build preserved tags + const tags: string[] = []; + if (seasonTag) tags.push(seasonTag); + if (episodeTag) tags.push(episodeTag); + if (qualityTag) tags.push(qualityTag.toUpperCase()); + if (langTag) tags.push(langTag); + if (yearTag) tags.push(yearTag); + tags.push(hash); // Always add hash for uniqueness + + // Keep original file extension — don't change to .zip/.rar which corrupts files + const newExt = ext || '.bin'; + + // Assemble final name + const parts = [titlePart, ...tags].filter(Boolean); + let result = parts.join('_'); + + // If too long, trim + if (result.length > 80) { + result = result.slice(0, 80); + } + + // If result is too short, add random filler + if (result.length < 10) { + const filler = crypto.randomBytes(4).toString('hex'); + result = `${filler}_${result}`; + } + + return result + newExt; + } + + // ==================== Public API ==================== + + /** + * Validate the cookie by fetching user info. + */ + async validate(): Promise { + const MAX_RETRIES = 2; + for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) { + try { + // Use drive-pc.quark.cn (Alibaba internal) instead of pan.quark.cn which times out from China servers + const params = new URLSearchParams({ pr: 'ucpro', fr: 'pc', pdir_fid: '0', _page: '1', _size: '1' }); + const response = await fetch(`${this.baseUrl}/1/clouddrive/file/sort?${params.toString()}`, { + headers: this.getHeaders(), + signal: AbortSignal.timeout(15000), + }); + if (!response.ok) return false; + const data = await response.json() as any; + if (data?.status === 200) return true; + } catch (err: any) { + if (attempt < MAX_RETRIES) { + console.log(`[Quark] validate attempt ${attempt + 1} failed: ${err.message}, retrying...`); + await new Promise(r => setTimeout(r, 2000)); + continue; + } + console.log(`[Quark] validate all ${MAX_RETRIES + 1} attempts failed: ${err.message}`); + } + } + return false; + } + + // ==================== Share Save Flow ==================== + + /** + * Save files from a share link → magic rename → create shared link. + * + * Flow: token → detail → save → wait_task → rename → share + */ + async saveFromShare(shareUrl: string, sourceTitle?: string): Promise<{ + success: boolean; + message: string; + shareUrl?: string; + sharePwd?: string; + folderName?: string; + taskId?: string; + renamed?: string[]; + fileCount?: number; + folderCount?: number; + originalFolderName?: string; + }> { + try { + // Parse share token from URL + const urlObj = new URL(shareUrl); + const pwdId = urlObj.pathname.split('/').filter(Boolean).pop(); + if (!pwdId) { + return { success: false, message: 'Invalid share URL: could not extract share token' }; + } + + // Step 1: Acquire stoken + const stoken = await this.acquireStoken(pwdId); + if (!stoken) { + return { success: false, message: '😅 Oops!资源好像偷偷溜走了,换个链接试试吧~' }; + } + + // Step 2: Get share detail + const shareInfo = await this.getShareFiles(pwdId, stoken); + if (!shareInfo || !shareInfo.files || shareInfo.files.length === 0) { + return { success: false, message: '🌚 空的!这个分享里啥都没有…' }; + } + + const { files: topFiles, topDir, childFiles } = shareInfo; + const originalFolderName = topFiles[0]?.file_name || ''; + const fids = topFiles.map(f => f.fid); + const fidTokens = topFiles.map(f => f.share_fid_token); + + // 按日期创建/查找文件夹,每天的转存存入当天文件夹 + await this.humanDelay(); + const saveDirName = this.dailyFolderName(); + console.log(`[Quark] saveFromShare: looking for/create dir "${saveDirName}"`); + const saveDirFid = await this.findOrCreateDir(saveDirName); + const targetPdirFid = saveDirFid || '0'; + if (saveDirFid) { + console.log(`[Quark] Using save directory: ${saveDirName} (fid: ${saveDirFid})`); + } else { + console.log(`[Quark] WARNING: failed to create/find dir "${saveDirName}", saving to root`); + } + + // Step 3: Save top-level item(s) to the random directory + const saveResult = await this.saveFiles(pwdId, stoken, fids, fidTokens, targetPdirFid); + if (!saveResult.success) { + return saveResult; + } + + const taskId = saveResult.taskId!; + + // Step 4: Wait for save task to complete (poll up to 30s) + const savedFids = await this.waitForTask(taskId, 30000); + if (!savedFids || savedFids.length === 0) { + return { success: true, message: '文件已保存,但获取保存结果超时' }; + } + + // Step 5: Magic rename files — with random delay to avoid detection + await this.humanDelay(); + const renamed: Array<{ original: string; renamed: string }> = []; + let shareFid = ''; + let savedFolderName = ''; + let newInnerDirName = ''; + + if (topDir && childFiles && childFiles.length > 0) { + // ── Single folder share ── + const savedDirFid = savedFids[0]; + shareFid = savedDirFid; + savedFolderName = topFiles[0]?.file_name || ''; + } else { + // ── Multiple files at top level ── + shareFid = savedFids[0]; + savedFolderName = topFiles[0]?.file_name || ''; + } + + // Step 6: Create share link FIRST (before rename), so all files are guaranteed to be shared + await this.humanDelay(); + let shareUrlResult = ''; + let sharePwdResult = ''; + let shareMsg = ''; + let successCount = 0; // total items (files + folders) actually saved + if (shareFid) { + const shareResult = await this.createShareLink(shareFid); + if (shareResult.success && shareResult.shareUrl) { + shareUrlResult = shareResult.shareUrl; + if (shareResult.sharePwd) sharePwdResult = shareResult.sharePwd; + } else { + shareMsg = `(分享失败:${shareResult.message})`; + } + } + + // Step 7: Rename files AFTER creating the share link (anti-harmony, won't affect the share) + if (topDir && childFiles && childFiles.length > 0) { + // ── Single folder share ── + const savedDirFid = savedFids[0]; + + // List files inside the saved directory + const dirFiles = await this.listDir(savedDirFid); + if (dirFiles && dirFiles.length > 0) { + for (const file of dirFiles) { + if (file.dir) continue; + const newName = this.magicRename(file.file_name); + const renameOk = await this.renameFile(file.fid, newName); + if (renameOk) { + renamed.push({ original: file.file_name, renamed: newName }); + } + } + } + + // Also rename the inner folder itself (the actual shared folder) + const innerDirOriginalName = sourceTitle || topFiles[0]?.file_name || ''; + if (innerDirOriginalName) { + newInnerDirName = this.magicRenameDir(innerDirOriginalName); + const innerDirRenameOk = await this.renameFile(savedDirFid, newInnerDirName); + if (innerDirRenameOk) { + console.log(`[Quark] Renamed inner folder: ${innerDirOriginalName} → ${newInnerDirName}`); + } + } + } else { + // ── Multiple files at top level ── + for (let i = 0; i < savedFids.length && i < topFiles.length; i++) { + const originalName = topFiles[i].file_name; + if (topFiles[i].dir) continue; + const newName = this.magicRename(originalName); + const renameOk = await this.renameFile(savedFids[i], newName); + if (renameOk) { + renamed.push({ original: originalName, renamed: newName }); + } + } + } + + // Step 8: DAY FOLDER STAYS AS-IS (e.g. "2026-05-03") + // DO NOT rename the date folder — it serves as the organizational container. + // The inner folder (for single-folder shares) was already renamed in Step 7. + savedFolderName = newInnerDirName ? `${saveDirName}/${newInnerDirName}` : saveDirName; + + // Recursively count files and folders from saved cloud directory + let fileCount = 0; + let folderCount = 0; + if (shareFid) { + try { + const counts = await this.countRecursive(shareFid); + fileCount = counts.fileCount; + folderCount = counts.folderCount; + } catch { + // Fallback to simple count if recursive fails + console.log('[Quark] Recursive count failed, using fallback'); + } + } + // If recursive count returned nothing, try fallback + if (fileCount === 0 && folderCount === 0) { + if (topDir && childFiles) { + folderCount = 1 + childFiles.filter(f => f.dir).length; + fileCount = childFiles.filter(f => !f.dir).length; + } else { + folderCount = topFiles.filter(f => f.dir).length; + fileCount = topFiles.filter(f => !f.dir).length; + } + } + + const renameMsg = renamed.length > 0 + ? `,已重命名 ${renamed.length} 个文件` + : ''; + const folderMsg = savedFolderName ? `到文件夹「${savedFolderName}」` : ''; + + return { + success: true, + message: `已保存${folderMsg}${renameMsg}${shareMsg}`, + shareUrl: shareUrlResult || undefined, + sharePwd: sharePwdResult || undefined, + folderName: savedFolderName, + taskId, + renamed: renamed.map(r => `${r.original} → ${r.renamed}`), + fileCount, + folderCount, + originalFolderName, + }; + } catch (err: any) { + return { success: false, message: err.message || 'Network error' }; + } + } + + // ==================== Internal API Methods ==================== + + /** + * Create a new directory in the root. + */ + private async createDir(dirName: string): Promise { + try { + const resp = await fetch( + `${this.baseUrl}/1/clouddrive/file?${this.makeQuery()}`, + { + method: 'POST', + headers: { ...this.getHeaders(), 'Content-Type': 'application/json' }, + body: JSON.stringify({ + pdir_fid: '0', + file_name: dirName, + dir: true, + dir_path: '', + }), + signal: AbortSignal.timeout(10000), + } + ); + const data = await resp.json() as any; + if (data.status === 200 && data.data?.fid) { + console.log(`[Quark] Created dir "${dirName}" (fid: ${data.data.fid})`); + return data.data.fid; + } + console.log(`[Quark] createDir API returned non-200: status=${data.status} msg=${data.message}`); + return null; + } catch (err: any) { + console.log(`[Quark] createDir error: ${err.message}`); + return null; + } + } + + /** + * Find an existing directory by name, or create it if not found. + * Used for daily folders that may already exist from earlier saves today. + */ + private async findOrCreateDir(dirName: string): Promise { + try { + // List root directory + const params = new URLSearchParams({ + pr: 'ucpro', fr: 'pc', + pdir_fid: '0', + _page: '1', _size: '200', + _fetch_total: '1', _fetch_sub_dirs: '0', + _sort: 'file_type:asc,updated_at:desc', + fetch_all_file: '1', + fetch_risk_file_name: '1', + }); + const resp = await fetch( + `${this.baseUrl}/1/clouddrive/file/sort?${params.toString()}`, + { headers: this.getHeaders(), signal: AbortSignal.timeout(15000), } + ); + if (resp.ok) { + const data = await resp.json() as any; + if (data.status === 200 && data.data?.list) { + const existing = data.data.list.find((f: any) => f.dir && f.file_name === dirName); + if (existing?.fid) { + console.log(`[Quark] Found existing daily folder: ${dirName} (fid: ${existing.fid})`); + return existing.fid; + } + } + } + console.log(`[Quark] Daily folder "${dirName}" not found, creating...`); + } catch (err: any) { + console.log(`[Quark] findOrCreateDir list error: ${err.message}`); + } + // Not found → create it + const fid = await this.createDir(dirName); + console.log(`[Quark] createDir result for "${dirName}": ${fid || 'null'}`); + return fid; + } + + private async acquireStoken(pwdId: string): Promise { + // Retry up to 2 times for transient network issues + for (let attempt = 0; attempt < 3; attempt++) { + try { + const params = new URLSearchParams(this.getCommonParams()); + const resp = await fetch( + `${this.baseUrl}/1/clouddrive/share/sharepage/token?${params.toString()}`, + { + method: 'POST', + headers: { ...this.getHeaders(), 'Content-Type': 'application/json' }, + body: JSON.stringify({ pwd_id: pwdId, passcode: '' }), + signal: AbortSignal.timeout(10000), + } + ); + if (!resp.ok) { + if (attempt < 2) continue; + return null; + } + const data = await resp.json() as any; + if (data.status === 200 && data.data?.stoken) { + return data.data.stoken; + } + return null; + } catch { + if (attempt >= 2) return null; + // Wait before retry (0.5s, 1s) + await new Promise(r => setTimeout(r, 500 * (attempt + 1))); + } + } + return null; + } + + /** + * Recursively collect files from a share. + * If the share contains a single directory, drill into it to list contents + * but still save the directory itself. + */ + private async getShareFiles(pwdId: string, stoken: string): Promise<{ files: ShareFile[]; topDir: boolean; childFiles?: ShareFile[] } | null> { + try { + const topLevel = await this.getDetailAt(pwdId, stoken, '0'); + if (!topLevel || topLevel.length === 0) return null; + + // If the share is a single directory, we save the directory itself + // and fetch its contents for renaming later + if (topLevel.length === 1 && topLevel[0].dir) { + const innerFiles = await this.getDetailAt(pwdId, stoken, topLevel[0].fid); + // Return both: the directory for saving, its contents for renaming + return { + files: topLevel, + topDir: true, + childFiles: innerFiles || [], + }; + } + + // Multiple top-level items: save them directly + return { + files: topLevel, + topDir: false, + }; + } catch { + return null; + } + } + + /** + * Fetch detail at a given pdir_fid. + */ + private async getDetailAt( + pwdId: string, stoken: string, pdirFid: string, + ): Promise { + const params = new URLSearchParams({ + ...this.getCommonParams(), + pwd_id: pwdId, + stoken, + pdir_fid: pdirFid, + force: '0', + _page: '1', + _size: '50', + _fetch_banner: '0', + _fetch_share: '1', + _fetch_total: '1', + _sort: 'file_type:asc,updated_at:desc', + ver: '2', + fetch_share_full_path: '0', + }); + const resp = await fetch( + `${this.baseUrl}/1/clouddrive/share/sharepage/detail?${params.toString()}`, + { headers: this.getHeaders(), signal: AbortSignal.timeout(15000), } + ); + if (!resp.ok) return []; + const data = await resp.json() as any; + if (data.status !== 200) return []; + return (data.data?.list || []).filter((f: any) => f.fid).map((f: any) => ({ + fid: f.fid, + file_name: f.file_name, + share_fid_token: f.share_fid_token || '', + dir: f.dir || false, + size: f.size || 0, + })); + } + + private async saveFiles( + pwdId: string, stoken: string, + fids: string[], fidTokens: string[], + toPdirFid: string + ): Promise<{ success: boolean; message: string; taskId?: string }> { + try { + const resp = await fetch( + `${this.baseUrl}/1/clouddrive/share/sharepage/save?${this.makeQuery()}`, + { + method: 'POST', + headers: { ...this.getHeaders(), 'Content-Type': 'application/json' }, + body: JSON.stringify({ + fid_list: fids, + fid_token_list: fidTokens, + to_pdir_fid: toPdirFid, + pwd_id: pwdId, + stoken, + pdir_fid: '0', + scene: 'link', + }), + signal: AbortSignal.timeout(30000), + } + ); + const data = await resp.json() as any; + if (data.status === 200 && data.data?.task_id) { + return { success: true, message: 'Save task created', taskId: data.data.task_id }; + } + return { + success: false, + message: data.message === 'require login [guest]' + ? '夸克网盘 Cookie 已过期,请在后台重新配置 Cookie' + : (data.message || `API 返回错误 (status=${data.status}, code=${data.code})`), + }; + } catch (err: any) { + return { success: false, message: err.message || 'Network error' }; + } + } + + /** + * Poll task status until complete or timeout. + * Returns the saved file FIDs (save_as_top_fids). + */ + private async waitForTask(taskId: string, timeoutMs: number): Promise { + const start = Date.now(); + let retryIndex = 0; + + while (Date.now() - start < timeoutMs) { + try { + const params = new URLSearchParams({ + ...this.getCommonParams(), + uc_param_str: '', + task_id: taskId, + retry_index: String(retryIndex), + __dt: String(Math.floor(Math.random() * 240000 + 60000)), + __t: String(Date.now() / 1000), + }); + const resp = await fetch( + `${this.baseUrl}/1/clouddrive/task?${params.toString()}`, + { headers: this.getHeaders(), signal: AbortSignal.timeout(10000), } + ); + const data = await resp.json() as any; + if (data.status === 200) { + if (data.data?.status === 2) { + // Task completed + const savedFids: string[] = data.data?.save_as?.save_as_top_fids || []; + return savedFids; + } + // Still in progress + retryIndex++; + } + } catch { + // Network error, retry + } + await new Promise(r => setTimeout(r, 1000)); + } + return null; // Timeout + } + + /** + * Rename a file by its FID. + */ + private async renameFile(fid: string, newName: string): Promise { + try { + const resp = await fetch( + `${this.baseUrl}/1/clouddrive/file/rename?${this.makeQuery()}`, + { + method: 'POST', + headers: { ...this.getHeaders(), 'Content-Type': 'application/json' }, + body: JSON.stringify({ fid, file_name: newName }), + signal: AbortSignal.timeout(10000), + } + ); + const data = await resp.json() as any; + return data.status === 200 || data.code === 0; + } catch { + return false; + } + } + + /** + * List files in a directory by its FID (after save to cloud). + */ + private async listDir(pdirFid: string): Promise { + try { + const params = new URLSearchParams({ + ...this.getCommonParams(), + uc_param_str: '', + pdir_fid: pdirFid, + _page: '1', + _size: '50', + _fetch_total: '1', + _fetch_sub_dirs: '0', + _sort: 'file_type:asc,updated_at:desc', + fetch_all_file: '1', + fetch_risk_file_name: '1', + }); + const resp = await fetch( + `${this.baseUrl}/1/clouddrive/file/sort?${params.toString()}`, + { headers: this.getHeaders(), signal: AbortSignal.timeout(15000), } + ); + if (!resp.ok) return []; + const data = await resp.json() as any; + if (data.status !== 200) return []; + return (data.data?.list || []).filter((f: any) => f.fid).map((f: any) => ({ + fid: f.fid, + file_name: f.file_name, + share_fid_token: '', + dir: f.dir || false, + size: f.size || 0, + })); + } catch { + return []; + } + } + + /** + * Recursively count files and folders for a saved cloud directory. + */ + private async countRecursive(pdirFid: string): Promise<{ fileCount: number; folderCount: number }> { + let fileCount = 0; + let folderCount = 0; + const stack = [pdirFid]; + const visited = new Set(); + while (stack.length > 0) { + const fid = stack.pop()!; + if (visited.has(fid)) continue; + visited.add(fid); + const files = await this.listDir(fid); + if (!files) continue; + for (const f of files) { + if (f.dir) { + folderCount++; + stack.push(f.fid); + } else { + fileCount++; + } + } + } + return { fileCount, folderCount }; + } + + /** + * Create a share link for a file/folder. + * Flow: create task → poll for share_id → submit to get short URL. + */ + async createShareLink(fileId: string): Promise<{ success: boolean; shareUrl?: string; sharePwd?: string; message: string }> { + try { + const sharePwd = this.randomSharePwd(); + + // Try different share_type values (1=7天, 0=无限制) + const shareTypes = ['1', '0']; + let lastError = ''; + + for (const st of shareTypes) { + await this.humanDelay(); + // Step 1: Create share task - get task_id + const response = await fetch( + `${this.baseUrl}/1/clouddrive/share?${this.makeQuery()}`, + { + method: 'POST', + headers: { ...this.getHeaders(), 'Content-Type': 'application/json' }, + body: JSON.stringify({ + fid_list: [fileId], + share_type: st, + url_type: '1', + share_pwd: sharePwd, + }), + signal: AbortSignal.timeout(15000), + } + ); + const data = await response.json() as any; + const taskId = data.data?.task_id; + if (!taskId) { + lastError = data.message || `share_type=${st} 失败`; + console.error('[Quark] Create share task failed (type=%s):', st, data.message || JSON.stringify(data).slice(0, 200)); + continue; + } + + // Step 2: Poll task until complete + const result = await this.waitForShareTask(taskId, 20000); + if (!result?.shareId) { + lastError = result?.message || '任务超时'; + console.error('[Quark] Wait for share task failed (type=%s):', st, result?.message || 'unknown'); + continue; + } + + // Step 3: Submit share via /password endpoint + const shareUrl = await this.submitShare(result.shareId, sharePwd); + if (shareUrl) { + return { + success: true, + shareUrl, + sharePwd, + message: `分享链接已生成(密码:${sharePwd})`, + }; + } + lastError = '提交密码后未获取到短链接'; + } + + return { success: false, message: lastError || '🤷 各种姿势都试过了,就是分享不出来…' }; + } catch (err: any) { + console.error('[Quark] createShareLink error:', err.message); + return { success: false, message: err.message || '🌩️ 网络开小差了,再试试?' }; + } + } + + /** + * Submit share via /password endpoint to get the actual short URL. + * The initial task API only returns a 32-char UUID, this call converts it + * to a valid short URL code (e.g. https://pan.quark.cn/s/12chars). + */ + private async submitShare(shareId: string, sharePwd?: string): Promise { + try { + const response = await fetch( + `${this.baseUrl}/1/clouddrive/share/password?${this.makeQuery()}`, + { + method: 'POST', + headers: { ...this.getHeaders(), 'Content-Type': 'application/json' }, + body: JSON.stringify({ share_id: shareId, share_pwd: sharePwd || '' }), + signal: AbortSignal.timeout(15000), + } + ); + const data = await response.json() as any; + if (data.status === 200 && data.data?.share_url) { + console.log('[Quark] Share short URL:', data.data.share_url); + return data.data.share_url; + } + console.log('[Quark] /password response:', JSON.stringify(data).slice(0, 300)); + console.error('[Quark] /password FAIL status=%s msg=%s', data.status, data.message || ''); + return null; + } catch (err) { + console.log('[Quark] /password error:', err); + return null; + } + } + + /** + * Poll share task until complete and extract share URL/shortcode. + * Tries multiple approaches to extract the correct short URL code. + */ + private async waitForShareTask(taskId: string, timeoutMs: number): Promise<{ shareId?: string; message?: string } | null> { + const start = Date.now(); + let retryIndex = 0; + while (Date.now() - start < timeoutMs) { + try { + const params = new URLSearchParams({ + ...this.getCommonParams(), + uc_param_str: '', + task_id: taskId, + retry_index: String(retryIndex), + __dt: String(Math.floor(Math.random() * 240000 + 60000)), + __t: String(Date.now() / 1000), + }); + const resp = await fetch( + `${this.baseUrl}/1/clouddrive/task?${params.toString()}`, + { headers: this.getHeaders(), signal: AbortSignal.timeout(10000), } + ); + const data = await resp.json() as any; + if (data.data?.status === 2) { + // Task completed — try multiple extraction approaches + + // 1. Direct share_url field + if (data.data?.share_url) { + const match = data.data.share_url.match(/\/s\/([a-zA-Z0-9]+)/); + if (match) return { shareId: match[1] }; + } + + // 2. Nested share object + if (data.data?.share?.url) { + const match = data.data.share.url.match(/\/s\/([a-zA-Z0-9]+)/); + if (match) return { shareId: match[1] }; + } + if (data.data?.share?.short_url) { + const match = data.data.share.short_url.match(/\/s\/([a-zA-Z0-9]+)/); + if (match) return { shareId: match[1] }; + } + + // 3. share_id — validate it's a reasonable short code (8-20 chars, not UUID-like) + const shareId = data.data?.share_id; + if (shareId && shareId.length <= 20 && shareId.length >= 8) { + return { shareId }; + } + + // 4. Regex search through the full response for a URL pattern + const str = JSON.stringify(data); + const urlMatch = str.match(/https?:\/\/pan\.quark\.cn\/s\/([a-zA-Z0-9]{6,16})/); + if (urlMatch) { + return { shareId: urlMatch[1] }; + } + + // 5. Extract from any URL field in the response + const urlFields = ['url', 'link', 'share_url', 'short_url', 'share_link']; + for (const field of urlFields) { + const val = data.data?.[field] || data.data?.share?.[field]; + if (typeof val === 'string' && val.includes('pan.quark.cn/s/')) { + const m = val.match(/\/s\/([a-zA-Z0-9]+)/); + if (m) return { shareId: m[1] }; + } + } + + // 6. Log full share task response for debugging + console.log('[Quark] Full share task response:', JSON.stringify(data, null, 2).slice(0, 2000)); + + // 7. Even if shareId is UUID-like (32 hex chars), use it anyway as last resort + if (shareId) { + return { shareId }; + } + + return { message: 'Share task completed but no share URL found' }; + } + if (data.data?.status === 3) { + return { message: data.message || 'Share task failed' }; + } + retryIndex++; + } catch { + // Retry + } + await new Promise(r => setTimeout(r, 1000)); + } + return { message: 'Share task timed out' }; + } + + // ==================== Other Features ==================== + + async checkIn(): Promise<{ success: boolean; message: string; signedDays?: number }> { + try { + const mparam = this.getMparam(); + if (!mparam.kps || !mparam.sign || !mparam.vcode) { + return { success: false, message: 'Cookie 缺少 kps/sign/vcode 参数,无法签到' }; + } + const params = new URLSearchParams({ + ...this.getCommonParams(), + kps: mparam.kps, + sign: mparam.sign, + vcode: mparam.vcode, + }); + const response = await fetch( + `${this.baseUrl}/1/clouddrive/capacity/growth/sign?${params.toString()}`, + { + method: 'POST', + headers: { ...this.getHeaders(), 'Content-Type': 'application/json' }, + body: JSON.stringify({}), + signal: AbortSignal.timeout(15000), + } + ); + const data = await response.json() as any; + if (data.status === 200) { + const signInfo = data.data?.sign_in_daily || {}; + const signedDays = signInfo.signed_day || signInfo.sign_day || 0; + const isSigned = signInfo.sign_in === true || signInfo.is_sign_in === true; + return { + success: isSigned, + message: isSigned + ? `签到成功!本月已签到 ${signedDays} 天` + : `签到失败(可能今日已签到,本月 ${signedDays} 天)`, + signedDays, + }; + } + if (data.status === 40002 || data.status === 40003) { + return { success: false, message: '今日已签到,明天再来吧' }; + } + return { success: false, message: data.message || `签到失败(${data.status})` }; + } catch (err: any) { + return { success: false, message: `签到请求失败:${err.message || '网络错误'}` }; + } + } + + // Get total capacity from /capacity/detail API + async getStorageInfoQuick(): Promise<{ total: string; totalBytes: number }> { + try { + const mparam = this.getMparam(); + const params = new URLSearchParams({ + ...this.getCommonParams(), + kps: mparam.kps || '', + sign: mparam.sign || '', + vcode: mparam.vcode || '', + }); + const response = await fetch(`${this.baseUrl}/1/clouddrive/capacity/detail?${params.toString()}`, { + headers: this.getHeaders(), + signal: AbortSignal.timeout(10000), + }); + if (response.ok) { + const data = await response.json() as any; + if (data.status === 200 && data.data) { + let totalBytes = data.data.capacity_summary?.sum_capacity || 0; + if (totalBytes === 0) { + const memberships = [...(data.data.effect || []), ...(data.data.expired || [])]; + totalBytes = memberships.reduce((max: number, m: any) => Math.max(max, m.capacity || 0), 0); + } + return { total: this.formatBytes(totalBytes), totalBytes }; + } + } + } catch {} + return { total: '-', totalBytes: 0 }; + } + + async getStorageInfo(): Promise { + try { + const mparam = this.getMparam(); + let totalBytes = 0; + const params = new URLSearchParams({ + ...this.getCommonParams(), + kps: mparam.kps || '', + sign: mparam.sign || '', + vcode: mparam.vcode || '', + }); + const response = await fetch(`${this.baseUrl}/1/clouddrive/capacity/detail?${params.toString()}`, { + headers: this.getHeaders(), + signal: AbortSignal.timeout(10000), + }); + if (response.ok) { + const data = await response.json() as any; + if (data.status === 200 && data.data) { + totalBytes = data.data.capacity_summary?.sum_capacity || 0; + if (totalBytes === 0) { + const memberships = [...(data.data.effect || []), ...(data.data.expired || [])]; + totalBytes = memberships.reduce((max: number, m: any) => Math.max(max, m.capacity || 0), 0); + } + } + } + + // Calculate used space by recursively traversing all files + const usedBytes = await this.calculateUsedSpace(); + + // 即使 totalBytes 为 0(API 异常或免费账户),仍然返回已用空间 + // 免费/过期账户用 expired 中的历史最大容量作为参考 + if (totalBytes > 0 || usedBytes > 0) { + return { + total: totalBytes > 0 ? this.formatBytes(totalBytes) : '-', + used: this.formatBytes(usedBytes), + usedBytes, + totalBytes: totalBytes > 0 ? totalBytes : 0, + }; + } + return { used: '0 B', total: '-', usedBytes: 0, totalBytes: 0 }; + } catch { + return { used: '-', total: '-', usedBytes: 0, totalBytes: 0 }; + } + } + + private formatBytes(bytes: number): string { + if (bytes === 0) return '0 B'; + const sizes = ['B', 'KB', 'MB', 'GB', 'TB']; + const i = Math.floor(Math.log(bytes) / Math.log(1024)); + return parseFloat((bytes / Math.pow(1024, i)).toFixed(2)) + ' ' + sizes[i]; + } + + // ==================== Cleanup / Trash ==================== + + /** + * List files at the root level (pdir_fid=0) — returns all top-level dirs/files. + * Used by cleanup to find date-named folders. + */ + async listRootDir(): Promise> { + try { + const params = new URLSearchParams({ + pr: 'ucpro', fr: 'pc', + pdir_fid: '0', + _page: '1', _size: '200', + _fetch_total: '1', _fetch_sub_dirs: '0', + _sort: 'file_type:asc,updated_at:desc', + fetch_all_file: '1', + fetch_risk_file_name: '1', + }); + const resp = await fetch( + `${this.baseUrl}/1/clouddrive/file/sort?${params.toString()}`, + { headers: this.getHeaders(), signal: AbortSignal.timeout(15000), } + ); + if (!resp.ok) return []; + const data = await resp.json() as any; + if (data.status !== 200 || !data.data?.list) return []; + return (data.data.list || []).map((f: any) => ({ + fid: f.fid, + file_name: f.file_name, + dir: f.dir || false, + size: f.size || 0, + })); + } catch { + return []; + } + } + + /** + * List all files in a directory, handling pagination. + * Fetches all pages until no more results. + */ + private async listDirAllPages(pdirFid: string): Promise { + const allFiles: ShareFile[] = []; + let page = 1; + const pageSize = 100; + let total = -1; + while (total === -1 || (page - 1) * pageSize < total) { + const params = new URLSearchParams({ + ...this.getCommonParams(), + uc_param_str: '', + pdir_fid: pdirFid, + _page: String(page), + _size: String(pageSize), + _fetch_total: '1', + _fetch_sub_dirs: '0', + _sort: 'file_type:asc,updated_at:desc', + fetch_all_file: '1', + fetch_risk_file_name: '1', + }); + try { + const resp = await fetch( + `${this.baseUrl}/1/clouddrive/file/sort?${params.toString()}`, + { headers: this.getHeaders(), signal: AbortSignal.timeout(15000), } + ); + if (!resp.ok) break; + const data = await resp.json() as any; + if (data.status !== 200 || !data.data?.list) break; + allFiles.push(...(data.data.list || []).filter((f: any) => f.fid).map((f: any) => ({ + fid: f.fid, + file_name: f.file_name, + share_fid_token: '', + dir: f.dir || false, + size: f.size || 0, + }))); + if (total === -1) { + total = data.metadata?._total || allFiles.length; + } + page++; + } catch { + break; + } + } + return allFiles; + } + + /** + * Calculate total used space by recursively traversing all files + * and summing their sizes. Uses 3-hour time window cache (0/3/6/9/12/15/18/21). + */ + async calculateUsedSpace(): Promise { + // 3-hour time window: refetch only when crossing 0/3/6/9/12/15/18/21 boundaries + const currentHourBlock = Math.floor(new Date().getHours() / 3); + if (this.cachedUsedSpace && this.cachedUsedSpace.hourBlock === currentHourBlock) { + return this.cachedUsedSpace.bytes; + } + let totalUsed = 0; + const stack: string[] = ['0']; + const visited = new Set(); + while (stack.length > 0) { + const fid = stack.pop()!; + if (visited.has(fid)) continue; + visited.add(fid); + const files = await this.listDirAllPages(fid); + if (!files.length) continue; + for (const f of files) { + if (f.dir) { + stack.push(f.fid); + } else { + totalUsed += f.size || 0; + } + } + await new Promise(r => setTimeout(r, 50)); + } + this.cachedUsedSpace = { bytes: totalUsed, hourBlock: currentHourBlock }; + return totalUsed; + } + + /** + * Move specified files/folders to trash (recycle bin). + * Files in trash don't count toward storage usage. + */ + async trashFiles(fids: string[]): Promise { + if (!fids.length) return true; + try { + const response = await fetch( + `${this.baseUrl}/1/clouddrive/file/trash?${this.makeQuery()}`, + { + method: 'POST', + headers: { ...this.getHeaders(), 'Content-Type': 'application/json' }, + body: JSON.stringify({ + action_type: 1, // 1 = move to trash + filelist: fids, + exclude_filelist: [], + }), + signal: AbortSignal.timeout(30000), + } + ); + if (!response.ok) return false; + const data = await response.json() as any; + if (data.status === 200) return true; + console.error(`[Quark] trashFiles failed: ${data.message || data.status}`); + return false; + } catch (err: any) { + console.error(`[Quark] trashFiles error: ${err.message}`); + return false; + } + } + + /** + * Empty the recycle bin — permanently delete all files in trash. + * This actually frees up storage space. + * Quark API: POST /1/clouddrive/file/trash/clear + */ + async emptyTrash(): Promise { + try { + const response = await fetch( + `${this.baseUrl}/1/clouddrive/file/trash/clear?${this.makeQuery()}`, + { + method: 'POST', + headers: { ...this.getHeaders(), 'Content-Type': 'application/json' }, + body: JSON.stringify({}), + signal: AbortSignal.timeout(60000), + } + ); + if (!response.ok) return false; + const data = await response.json() as any; + if (data.status === 200) return true; + console.error(`[Quark] emptyTrash failed: ${data.message || data.status}`); + return false; + } catch (err: any) { + console.error(`[Quark] emptyTrash error: ${err.message}`); + return false; + } + } + + // ════════════════════════════════════════════════════════════════ + // Cleanup operations — called by the generic cleanup controller + // (cleanup.service.ts). Each cloud driver implements these to + // tell the controller HOW to clean, while the controller decides + // WHEN and WITH WHAT parameters. + // ════════════════════════════════════════════════════════════════ + + /** + * [Cleanup] Trash date-named folders (YYYY-MM-DD) older than `days`. + * Called by the generic cleanup controller with cleanup_file_retention_days. + * Returns the number of folders trashed. + */ + async cleanupOldDateFolders(days: number): Promise<{ trashed: number; errors: string[] }> { + const errors: string[] = []; + const cutoff = new Date(); + cutoff.setDate(cutoff.getDate() - days); + const cutoffStr = cutoff.toISOString().slice(0, 10); + + try { + const rootItems = await this.listRootDir(); + const oldFolders = rootItems.filter(item => { + if (!item.dir) return false; + if (!/^\d{4}-\d{2}-\d{2}$/.test(item.file_name)) return false; + return item.file_name < cutoffStr; + }); + + if (oldFolders.length === 0) { + return { trashed: 0, errors: [] }; + } + + const fids = oldFolders.map(f => f.fid); + console.log(`[Quark] Trashing ${fids.length} old date folders (before ${cutoffStr}): ${oldFolders.map(f => f.file_name).join(', ')}`); + const ok = await this.trashFiles(fids); + if (ok) { + return { trashed: fids.length, errors: [] }; + } + return { trashed: 0, errors: [`Trash API returned failure for ${fids.length} folders`] }; + } catch (err: any) { + return { trashed: 0, errors: [err.message] }; + } + } + + /** + * [Cleanup] If used space exceeds thresholdPercent% of total, + * delete the oldest date folders until totalBytes * deletePercent/100 + * of total capacity is freed. Returns the number of folders trashed. + */ + async cleanupBySpaceThreshold( + thresholdPercent: number, + deletePercent: number, + ): Promise<{ trashed: number; errors: string[] }> { + const errors: string[] = []; + + try { + const storage = await this.getStorageInfo(); + if (storage.totalBytes <= 0) return { trashed: 0, errors: [] }; + + const usagePercent = (storage.usedBytes / storage.totalBytes) * 100; + if (usagePercent < thresholdPercent) { + console.log(`[Quark] Usage ${usagePercent.toFixed(1)}% below threshold ${thresholdPercent}%, skipping`); + return { trashed: 0, errors: [] }; + } + + const targetBytesToFree = Math.floor(storage.totalBytes * Math.min(deletePercent, 100) / 100); + + const rootItems = await this.listRootDir(); + const dateFolders = rootItems + .filter(item => item.dir && /^\d{4}-\d{2}-\d{2}$/.test(item.file_name)) + .sort((a, b) => a.file_name.localeCompare(b.file_name)); + + if (dateFolders.length === 0) return { trashed: 0, errors: [] }; + + // Accumulate oldest folders until their total size >= targetBytesToFree + // If API returns size=0 for directories, fall back to count-based estimation + const hasSizes = dateFolders.some(f => f.size > 0); + let cumulativeSize = 0; + const foldersToTrash: typeof dateFolders = []; + + if (hasSizes) { + for (const folder of dateFolders) { + foldersToTrash.push(folder); + cumulativeSize += folder.size; + if (cumulativeSize >= targetBytesToFree) break; + } + } else { + const avgSizePerFolder = storage.usedBytes / dateFolders.length; + const estCount = Math.max(1, Math.ceil(targetBytesToFree / avgSizePerFolder)); + foldersToTrash.push(...dateFolders.slice(0, estCount)); + cumulativeSize = estCount * avgSizePerFolder; + } + + const freedMB = (cumulativeSize / 1024 / 1024).toFixed(0); + const targetMB = (targetBytesToFree / 1024 / 1024).toFixed(0); + const fidsToTrash = foldersToTrash.map(f => f.fid); + console.log(`[Quark] Space threshold: trashing ${foldersToTrash.length}/${dateFolders.length} oldest folders (~${freedMB} MB) to free ${targetMB} MB (${deletePercent}% of ${(storage.totalBytes/1024/1024/1024).toFixed(0)} GB total)`); + + const ok = await this.trashFiles(fidsToTrash); + if (ok) { + console.log(`[Quark] ✅ Space-threshold trashed ${foldersToTrash.length} folders (~${freedMB} MB)`); + return { trashed: foldersToTrash.length, errors: [] }; + } + return { trashed: 0, errors: [`Space-threshold trash failed for ${foldersToTrash.length} folders`] }; + } catch (err: any) { + return { trashed: 0, errors: [err.message] }; + } + } +} diff --git a/source_clean/src/cloud/error-codes.ts b/source_clean/src/cloud/error-codes.ts new file mode 100644 index 0000000..f8eedd0 --- /dev/null +++ b/source_clean/src/cloud/error-codes.ts @@ -0,0 +1,70 @@ +// Standard error codes for all cloud drivers +export const ErrCode = { + COOKIE_EXPIRED: 'COOKIE_EXPIRED', + COOKIE_INVALID: 'COOKIE_INVALID', + TOKEN_EXPIRED: 'TOKEN_EXPIRED', + SHARE_NOT_FOUND: 'SHARE_NOT_FOUND', + SHARE_EXPIRED: 'SHARE_EXPIRED', + PASSWORD_REQUIRED: 'PASSWORD_REQUIRED', + PASSWORD_WRONG: 'PASSWORD_WRONG', + CAPACITY_FULL: 'CAPACITY_FULL', + FILE_EXISTS: 'FILE_EXISTS', + RATE_LIMITED: 'RATE_LIMITED', + TRANSFER_FAILED: 'TRANSFER_FAILED', + NETWORK_ERROR: 'NETWORK_ERROR', + UNSUPPORTED: 'UNSUPPORTED', + UNKNOWN: 'UNKNOWN', +} as const; + +export type ErrorCode = typeof ErrCode[keyof typeof ErrCode]; + +const messages: Record = { + [ErrCode.COOKIE_EXPIRED]: 'Cookie已过期,请重新登录', + [ErrCode.COOKIE_INVALID]: 'Cookie无效,请检查配置', + [ErrCode.TOKEN_EXPIRED]: 'Token已过期,请刷新', + [ErrCode.SHARE_NOT_FOUND]: '分享链接不存在或已被删除', + [ErrCode.SHARE_EXPIRED]: '分享链接已过期', + [ErrCode.PASSWORD_REQUIRED]: '需要提取码', + [ErrCode.PASSWORD_WRONG]: '提取码错误', + [ErrCode.CAPACITY_FULL]: '网盘容量不足', + [ErrCode.RATE_LIMITED]: '请求过于频繁,请稍后重试', + [ErrCode.TRANSFER_FAILED]: '转存失败', + [ErrCode.NETWORK_ERROR]: '网络请求失败', + [ErrCode.UNKNOWN]: '未知错误', +}; + +export function errorResponse(code: ErrorCode, detail?: string) { + return { + success: false, + code, + message: messages[code] + (detail ? ': ' + detail : ''), + }; +} + +export class TransferError extends Error { + code: ErrorCode; + detail?: string; + cookieExpired: boolean; + + constructor(code: ErrorCode, detail?: string) { + super(messages[code] + (detail ? ': ' + detail : '')); + this.code = code; + this.detail = detail; + this.cookieExpired = (code === ErrCode.COOKIE_EXPIRED || code === ErrCode.COOKIE_INVALID); + } +} + +/** Detect error code from driver result message (for untagged drivers) */ +export function detectErrorCode(result: { message?: string; cookieExpired?: boolean }): ErrorCode | null { + if (!result || !result.message) return null; + if (result.cookieExpired) return ErrCode.COOKIE_EXPIRED; + const msg = result.message.toLowerCase(); + if (msg.includes('cookie') || msg.includes('登录') || msg.includes('bdstoken')) return ErrCode.COOKIE_EXPIRED; + if (msg.includes('不存在') || msg.includes('not found') || msg.includes('已删除')) return ErrCode.SHARE_NOT_FOUND; + if (msg.includes('过期') || msg.includes('expired')) return ErrCode.SHARE_EXPIRED; + if (msg.includes('提取码') || msg.includes('密码') || msg.includes('password')) return ErrCode.PASSWORD_WRONG; + if (msg.includes('容量') || msg.includes('空间') || msg.includes('capacity')) return ErrCode.CAPACITY_FULL; + if (msg.includes('频繁') || msg.includes('稍后') || msg.includes('rate')) return ErrCode.RATE_LIMITED; + if (msg.includes('网络') || msg.includes('fetch') || msg.includes('timeout')) return ErrCode.NETWORK_ERROR; + return ErrCode.TRANSFER_FAILED; +} diff --git a/source_clean/src/cloud/ip-lookup.ts b/source_clean/src/cloud/ip-lookup.ts new file mode 100644 index 0000000..83f2e37 --- /dev/null +++ b/source_clean/src/cloud/ip-lookup.ts @@ -0,0 +1,31 @@ +/** + * IP 归属地查询工具 + * 通过系统配置中的 IP 地理接口查询 + */ + +import { getSystemConfig } from '../admin/system-config.service'; + +export async function lookupIpLocation(ip: string): Promise { + if (!ip || ip === '127.0.0.1' || ip === '::1' || ip.startsWith('192.168.') || ip.startsWith('10.')) { + return null; + } + try { + const apiUrlTemplate = getSystemConfig('ip_geo_api_url'); + if (!apiUrlTemplate) return null; + const url = apiUrlTemplate.replace('{ip}', encodeURIComponent(ip)); + + const res = await fetch(url, { signal: AbortSignal.timeout(5000) }); + if (!res.ok) return null; + const data = await res.json() as { + code: number; sheng?: string; shi?: string; qu?: string; + isp?: string; msg?: string; guo?: string; + }; + if (data.code !== 200) return null; + // Format: "四川 绵阳 江油 中国联通" — strip 省/市/区/州 suffixes for compact display + const stripSuffix = (s: string | undefined) => s?.replace(/[省市州区]$/, ''); + const parts = [stripSuffix(data.sheng), stripSuffix(data.shi), stripSuffix(data.qu), data.isp].filter(Boolean); + return parts.join(' '); + } catch { + return null; + } +} diff --git a/source_clean/src/cloud/notification.service.ts b/source_clean/src/cloud/notification.service.ts new file mode 100644 index 0000000..f60114c --- /dev/null +++ b/source_clean/src/cloud/notification.service.ts @@ -0,0 +1,95 @@ +// Native fetch available in Node 20+ +import { getSystemConfig } from '../admin/system-config.service'; + +type NotifyLevel = 'info' | 'warn' | 'error'; + +interface NotifyChannel { + send(title: string, content: string, level: NotifyLevel): Promise; +} + +// ---- Feishu Webhook Channel ---- +class FeishuChannel implements NotifyChannel { + private webhookUrl: string; + + constructor(webhookUrl: string) { + this.webhookUrl = webhookUrl; + } + + async send(title: string, content: string, _level: NotifyLevel): Promise { + try { + const body = JSON.stringify({ + msg_type: 'interactive', + card: { + header: { + title: { tag: 'plain_text', content: title }, + template: _level === 'error' ? 'red' : _level === 'warn' ? 'orange' : 'blue', + }, + elements: [ + { tag: 'div', text: { tag: 'lark_md', content } }, + { + tag: 'note', + elements: [ + { tag: 'plain_text', content: `CloudSearch · ${new Date().toLocaleString('zh-CN', { timeZone: 'Asia/Shanghai' })}` }, + ], + }, + ], + }, + }); + + const resp = await fetch(this.webhookUrl, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body, + }); + + if (!resp.ok) { + console.error(`[Notify] Feishu send failed: ${resp.status}`); + } + } catch (err: any) { + console.error('[Notify] Feishu send error:', err.message); + } + } +} + +// ---- Notification Manager ---- +let _channel: NotifyChannel | null = null; + +function getChannel(): NotifyChannel | null { + const feishuUrl = process.env.FEISHU_WEBHOOK || getSystemConfig('feishu_webhook_url'); + if (!feishuUrl) return null; + + if (!_channel) { + _channel = new FeishuChannel(feishuUrl); + console.log('[Notify] Feishu webhook configured'); + } + return _channel; +} + +/** + * Send a notification through configured channels. + * Returns immediately — failures are logged silently. + */ +export function notify(title: string, content: string, level: NotifyLevel = 'info'): void { + const ch = getChannel(); + if (!ch) return; + // Fire-and-forget — don't block the caller + ch.send(title, content, level).catch(() => {}); +} + +/** + * Notify on critical events: + * - Cookie expired / login failed + * - Save/transfer failed repeatedly + * - Storage below threshold + */ +export function notifyError(title: string, detail: string): void { + notify(`⚠️ ${title}`, detail, 'error'); +} + +export function notifyWarn(title: string, detail: string): void { + notify(`🔔 ${title}`, detail, 'warn'); +} + +export function notifyInfo(title: string, detail: string): void { + notify(`ℹ️ ${title}`, detail, 'info'); +} diff --git a/source_clean/src/cloud/qr-login.service.ts b/source_clean/src/cloud/qr-login.service.ts new file mode 100755 index 0000000..742a34a --- /dev/null +++ b/source_clean/src/cloud/qr-login.service.ts @@ -0,0 +1,407 @@ +import { chromium, BrowserContext, Page } from 'playwright'; +import jsQR from 'jsqr'; +import { getDb } from '../database/database'; +import { escapeLike } from '../utils/time'; + +interface QrSession { + id: string; + browserContext: BrowserContext; + page: Page; + createdAt: number; + cookieSnapshot: string; + lastPollAt: number; + qrUrl: string; + status: 'pending' | 'scanned' | 'logged_in' | 'expired' | 'error'; + error?: string; +} + +const SESSIONS = new Map(); +const SESSION_TTL = 5 * 60 * 1000; // 5 minutes +const COOKIE_CHECK_INTERVAL = 1500; // 1.5s between cookie checks + +const CHROMIUM_PATH = process.env.CHROMIUM_PATH || '/usr/bin/chromium-browser'; + +// Clean up old sessions periodically +setInterval(() => { + const now = Date.now(); + for (const [id, session] of SESSIONS.entries()) { + if (now - session.createdAt > SESSION_TTL) { + cleanupSession(id); + } + } +}, 60000); + +function cleanupSession(id: string) { + const session = SESSIONS.get(id); + if (session) { + try { + session.browserContext.close().catch(() => {}); + } catch {} + SESSIONS.delete(id); + } +} + +/** + * Extract QR code URL from the login page canvas using jsQR. + * The actual login QR code is Canvas #0 (anonymous, 177x177), NOT #react-qrcode-logo. + */ +async function extractQrUrl(page: Page): Promise { + // Run inside Playwright's browser context (as a string to avoid Node TS type errors) + const raw = await page.evaluate(`(() => { + const canvases = document.querySelectorAll('canvas'); + var results = []; + for (var i = 0; i < canvases.length; i++) { + try { + var c = canvases[i]; + var ctx = c.getContext('2d'); + if (!ctx) continue; + var imageData = ctx.getImageData(0, 0, c.width, c.height); + results.push({ + index: i, + w: c.width, + h: c.height, + data: Array.from(imageData.data) + }); + } catch(e) {} + } + return results; + })()`) as unknown as { index: number; w: number; h: number; data: number[] }[]; + + if (!raw || raw.length === 0) { + throw new Error('页面没有可用的 canvas'); + } + + // Try to decode each canvas, preferring the one with su.quark.cn URL + let bestUrl = ''; + let bestResult: { index: number; w: number; h: number; data: number[] } | null = null; + + for (const canvas of raw) { + const code = jsQR(new Uint8ClampedArray(canvas.data), canvas.w, canvas.h); + if (code && code.data) { + // If this is the login QR code (has su.quark.cn), use it immediately + if (code.data.includes('su.quark.cn')) { + return code.data; + } + // Otherwise keep it as fallback + if (!bestUrl) { + bestUrl = code.data; + bestResult = canvas; + } + } + } + + if (bestUrl) { + return bestUrl; + } + + throw new Error('无法解析二维码内容'); +} + +/** + * Start a QR code login session. + * Launches headless Chromium, navigates to Quark login page, extracts QR code URL. + */ +export async function startQrLogin(): Promise<{ + sessionId: string; + qrUrl: string; + expiresIn: number; +}> { + // Clean up any existing expired sessions + for (const [id, session] of SESSIONS.entries()) { + if (Date.now() - session.createdAt > SESSION_TTL) { + cleanupSession(id); + } + } + + const browser = await chromium.launch({ + executablePath: CHROMIUM_PATH, + headless: true, + args: [ + '--no-sandbox', + '--disable-setuid-sandbox', + '--disable-dev-shm-usage', + '--disable-gpu', + '--no-first-run', + '--no-zygote', + ], + }); + + const browserContext = await browser.newContext({ + userAgent: + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', + viewport: { width: 1280, height: 800 }, + locale: 'zh-CN', + }); + + const page = await browserContext.newPage(); + const sessionId = Date.now().toString(36) + Math.random().toString(36).slice(2, 8); + + try { + // Navigate to Quark login page (now the homepage itself has QR login) + await page.goto('https://pan.quark.cn/', { + waitUntil: 'commit', + timeout: 30000, + }); + + // Wait for the QR code canvas to appear + await page.waitForSelector('canvas', { timeout: 15000 }); + + // Extra wait for the QR code to fully render + await page.waitForTimeout(2000); + + // Extract the QR code URL from the canvas + const qrUrl = await extractQrUrl(page); + + // Take initial cookie snapshot + const cookies = await browserContext.cookies(); + const cookieSnapshot = cookies.map(c => `${c.name}=${c.value}`).join('; '); + + const session: QrSession = { + id: sessionId, + browserContext, + page, + createdAt: Date.now(), + cookieSnapshot, + lastPollAt: Date.now(), + qrUrl, + status: 'pending', + }; + + SESSIONS.set(sessionId, session); + + // Start background polling for login detection + pollLoginStatus(session); + + // Handle page navigation (like redirect after login) + page.on('framenavigated', async (frame) => { + if (frame === page.mainFrame()) { + const url = frame.url(); + if (url === 'about:blank') { + await checkAndCaptureCookies(session); + } + } + }); + + // Handle popups/dialogs + page.on('popup', async (popup) => { + try { + await popup.waitForLoadState('networkidle', { timeout: 10000 }); + await checkAndCaptureCookies(session); + } catch {} + }); + + return { + sessionId, + qrUrl, + expiresIn: SESSION_TTL / 1000, + }; + } catch (err: any) { + // Clean up on failure + try { await browserContext.close(); } catch {} + try { browser.close().catch(() => {}); } catch {} + SESSIONS.delete(sessionId); + throw new Error(`启动扫码登录失败: ${err.message}`); + } +} + +/** + * Poll login status in background. + * Checks cookies every COOKIE_CHECK_INTERVAL ms for new session tokens. + */ +async function pollLoginStatus(session: QrSession) { + const checkInterval = setInterval(async () => { + try { + const now = Date.now(); + + // Check if expired + if (now - session.createdAt > SESSION_TTL) { + clearInterval(checkInterval); + session.status = 'expired'; + cleanupSession(session.id); + return; + } + + session.lastPollAt = now; + + // Check cookies + const cookies = await session.browserContext.cookies(); + const cookieStr = cookies.map(c => `${c.name}=${c.value}`).join('; '); + + // Check for session cookies indicating login + const hasSessionCookie = cookies.some( + c => (c.name === '__st' || c.name === 'pus' || c.name === '__pus' || c.name === '__ktd') + ); + + if (hasSessionCookie) { + session.cookieSnapshot = cookieStr; + session.status = 'logged_in'; + clearInterval(checkInterval); + return; + } + + // Check URL change as alternative indicator + const url = session.page.url(); + if (!url.includes('login') && !url.includes('qrcode') && url !== 'about:blank' && url !== 'https://pan.quark.cn/' && url.length > 10) { + await checkAndCaptureCookies(session); + } + } catch (err: any) { + // Page might have been closed + clearInterval(checkInterval); + } + }, COOKIE_CHECK_INTERVAL); +} + +/** + * Check cookies after navigation/redirect and capture them if login succeeded. + */ +async function checkAndCaptureCookies(session: QrSession) { + try { + const cookies = await session.browserContext.cookies(); + const cookieStr = cookies.map(c => `${c.name}=${c.value}`).join('; '); + const hasSessionCookie = cookies.some( + c => (c.name === '__st' || c.name === 'pus' || c.name === '__pus' || c.name === '__ktd') + ); + + if (hasSessionCookie) { + session.cookieSnapshot = cookieStr; + session.status = 'logged_in'; + } else if (cookies.length > 3) { + const newCookies = cookies.filter( + c => !['ctoken', 'b-user-id', '__wpkreporterwid_'].includes(c.name) + ); + if (newCookies.length > 0) { + session.cookieSnapshot = cookieStr; + try { + const resp = await session.page.evaluate(async () => { + const r = await fetch('https://pan.quark.cn/account/info', { + credentials: 'include', + }); + return await r.text(); + }); + const data = JSON.parse(resp); + if (data?.data?.nickname) { + session.status = 'logged_in'; + } + } catch {} + } + } + } catch {} +} + +/** + * Get the login status for a session. + */ +export async function getQrLoginStatus(sessionId: string): Promise<{ + status: string; + cookie?: string; + nickname?: string; + storage_used?: string; + storage_total?: string; + autoUpdated?: boolean; + updatedConfigId?: number; +}> { + const session = SESSIONS.get(sessionId); + if (!session) { + return { status: 'expired' }; + } + + // Check if expired + if (Date.now() - session.createdAt > SESSION_TTL) { + session.status = 'expired'; + cleanupSession(sessionId); + return { status: 'expired' }; + } + + if (session.status === 'logged_in') { + // Try to get nickname too + let nickname = ''; + try { + const resp = await session.page.evaluate(async () => { + const r = await fetch('https://pan.quark.cn/account/info', { + credentials: 'include', + }); + return await r.text(); + }); + const data = JSON.parse(resp); + nickname = data?.data?.nickname || ''; + } catch {} + + // Fetch capacity info from within the browser context (has full JS signing) + let storageTotal = ''; + let storageUsed = ''; + try { + const capResp = await session.page.evaluate(async () => { + const r = await fetch( + 'https://pan.quark.cn/1/clouddrive/capacity/detail?pr=ucpro&fr=pc', + { credentials: 'include' } + ); + return await r.text(); + }); + const capData = JSON.parse(capResp); + if (capData.status === 200 && capData.data?.capacity_summary) { + const summary = capData.data.capacity_summary; + const total = summary.sum_capacity || 0; + storageTotal = formatBytes(total); + storageUsed = '0 B'; // capacity/detail doesn't return used_size + } + } catch {} + + // Build full cookie string including httpOnly cookies + const cookies = await session.browserContext.cookies(); + const cookieStr = cookies.map(c => `${c.name}=${c.value}`).join('; '); + + // Extract __uid from cookie for duplicate detection + const uidMatch = cookieStr.match(/(? { + cleanupSession(sessionId); +} diff --git a/source_clean/src/config/cloud-labels.ts b/source_clean/src/config/cloud-labels.ts new file mode 100755 index 0000000..bb48a66 --- /dev/null +++ b/source_clean/src/config/cloud-labels.ts @@ -0,0 +1,56 @@ +/** + * Cloud type labels and colors + * Shared between backend and frontend-facing routes + */ + +/** Cloud domain → type regex mapping (single source of truth) */ +export const CLOUD_DOMAIN_PATTERNS: Array<{ regex: RegExp; type: string }> = [ + { regex: /pan\.baidu\.com/i, type: 'baidu' }, + { regex: /pan\.quark\.cn/i, type: 'quark' }, + { regex: /aliyundrive\.com|alipan\.com/i, type: 'aliyun' }, + { regex: /115\.com|115cdn\.com/i, type: '115' }, + { regex: /cloud\.189\.cn/i, type: 'tianyi' }, + { regex: /123pan\.com|123684\.com|123912\.com/i, type: '123pan' }, + { regex: /drive\.uc\.cn/i, type: 'uc' }, + { regex: /pan\.xunlei\.com/i, type: 'xunlei' }, + { regex: /magnet:/i, type: 'magnet' }, +]; + +/** Detect cloud type from a URL string */ +export function detectCloudType(url: string | undefined | null): string { + if (!url) return 'others'; + for (const { regex, type } of CLOUD_DOMAIN_PATTERNS) { + if (regex.test(url)) return type; + } + return 'others'; +} + +export const CLOUD_LABELS: Record = { + quark: '夸克网盘', + baidu: '百度网盘', + aliyun: '阿里云盘', + '115': '115网盘', + tianyi: '天翼云盘', + '123pan': '123云盘', + uc: 'UC网盘', + xunlei: '迅雷云盘', + pikpak: 'PikPak', + magnet: '磁力链接', + ed2k: '电驴链接', + others: '其他', +}; + +export const CLOUD_COLORS: Record = { + quark: '#07c160', + baidu: '#4e6ef2', + aliyun: '#ff6a00', + '115': '#9b59b6', + tianyi: '#00a1d6', + '123pan': '#e74c3c', + uc: '#f39c12', + xunlei: '#2ecc71', + pikpak: '#8e44ad', + magnet: '#95a5a6', + ed2k: '#7f8c8d', + others: '#95a5a6', +}; diff --git a/source_clean/src/config/index.ts b/source_clean/src/config/index.ts new file mode 100755 index 0000000..a0ede68 --- /dev/null +++ b/source_clean/src/config/index.ts @@ -0,0 +1,51 @@ +export interface Config { + port: number; + nodeEnv: string; + redisUrl: string; + pansouUrl: string; + pansouAuthToken: string; + videoParserUrl: string; + jwtSecret: string; + adminUsername: string; + adminPassword: string; + validation: { + concurrency: number; + timeout: number; + cacheTtlValid: number; + cacheTtlInvalid: number; + }; + dbPath: string; +} + +const config: Config = { + port: parseInt(process.env.PORT || '9527', 10), + nodeEnv: process.env.NODE_ENV || 'development', + redisUrl: process.env.REDIS_URL || 'redis://localhost:6379', + pansouUrl: process.env.PANSOU_URL || 'http://localhost:8888', + pansouAuthToken: process.env.PANSOU_AUTH_TOKEN || '', + videoParserUrl: process.env.VIDEO_PARSER_URL || 'http://localhost:3001', + jwtSecret: process.env.JWT_SECRET || 'cloudsearch-jwt-secret-dev', + adminUsername: process.env.ADMIN_USERNAME || 'admin', + adminPassword: process.env.ADMIN_PASSWORD || 'admin123', + validation: { + concurrency: parseInt(process.env.VALIDATION_CONCURRENCY || '10', 10), + timeout: parseInt(process.env.VALIDATION_TIMEOUT || '5000', 10), + cacheTtlValid: parseInt(process.env.CACHE_TTL_VALID || '14400', 10), // 4小时 + cacheTtlInvalid: parseInt(process.env.CACHE_TTL_INVALID || '3600', 10), // 1小时 + }, + dbPath: process.env.DB_PATH || './data/cloudsearch.db', +}; + +// 生产环境强制校验关键安全配置 +if (process.env.NODE_ENV === 'production') { + if (!process.env.JWT_SECRET || process.env.JWT_SECRET === 'cloudsearch-jwt-secret-dev') { + console.error('[FATAL] JWT_SECRET 未设置或使用了默认值,请在 .env 中设置强密码') + process.exit(1) + } + if (!process.env.ADMIN_PASSWORD || process.env.ADMIN_PASSWORD === 'admin123') { + console.error('[FATAL] ADMIN_PASSWORD 未设置或使用了默认值,请在 .env 中设置强密码') + process.exit(1) + } +} + +export default config; diff --git a/source_clean/src/content/content.service.ts b/source_clean/src/content/content.service.ts new file mode 100755 index 0000000..c43769e --- /dev/null +++ b/source_clean/src/content/content.service.ts @@ -0,0 +1,325 @@ +// Native fetch available in Node 20+ +import { getDb } from '../database/database'; +import { localTimestamp } from '../utils/time'; + +export interface ContentInfo { + keyword: string; + title: string; + description: string; + tags: string[]; + cover: string; + source: string; + /** TMDB 详情页链接 */ + tmdb_url?: string; + /** 评分 e.g. "7.3" */ + rating?: string; + /** 评分人数 e.g. "12345" */ + rating_count?: string; + /** 发布年份 e.g. "2025" */ + year?: string; + /** 类型标签 e.g. ["动作", "科幻"] */ + genres?: string[]; + /** 导演 e.g. "克里斯托弗·诺兰" */ + directors?: string; + /** 演员(前5个) e.g. "基里安·墨菲 / 艾米莉·布朗特" */ + actors?: string; + /** 制片国家/地区 e.g. "美国 / 英国" */ + region?: string; + /** 片长 e.g. "180分钟" */ + duration?: string; +} + +const CACHE_TTL_MS = 7 * 24 * 60 * 60 * 1000; + +export async function getContentInfo(keyword: string): Promise { + if (!keyword || keyword.length < 1) return null; + + const db = getDb(); + const tmdbToken = (db.prepare('SELECT value FROM system_configs WHERE key = ?').get('tmdb_api_token') as any)?.value || ''; + if (!tmdbToken) return null; + + const cached = db.prepare('SELECT * FROM content_cache WHERE keyword = ?').get(keyword) as any; + if (cached) { + const age = Date.now() - new Date(cached.updated_at + 'Z').getTime(); + if (age < CACHE_TTL_MS) { + return rowToContentInfo(cached); + } + } + + try { + const info = await fetchFromTMDB(keyword, tmdbToken); + if (info) { + db.prepare(` + INSERT OR REPLACE INTO content_cache + (keyword, title, description, tags, cover, douban_url, source, updated_at, + rating, rating_count, year, genres, directors, actors, region, duration) + VALUES (?, ?, ?, ?, ?, ?, 'tmdb', ?, + ?, ?, ?, ?, ?, ?, ?, ?) + `).run( + keyword, info.title, info.description, JSON.stringify(info.tags), info.cover, info.tmdb_url || '', localTimestamp(), + info.rating || '', info.rating_count || '', info.year || '', + JSON.stringify(info.genres || []), info.directors || '', info.actors || '', + info.region || '', info.duration || '' + ); + return info; + } + } catch (err) { + console.error(`[Content] Failed to fetch for "${keyword}":`, err); + } + return null; +} + +function rowToContentInfo(row: any): ContentInfo { + return { + keyword: row.keyword, + title: row.title || '', + description: row.description || '', + tags: safeParseTags(row.tags), + cover: row.cover || '', + source: row.source || (row.title ? 'tmdb' : 'cache'), + tmdb_url: row.douban_url || '', + rating: row.rating || '', + rating_count: row.rating_count || '', + year: row.year || '', + genres: safeParseTags(row.genres), + directors: row.directors || '', + actors: row.actors || '', + region: row.region || '', + duration: row.duration || '', + }; +} + +async function fetchFromTMDB(keyword: string, tmdbToken: string): Promise { + // Step 1: TMDB search — search both movie and TV in parallel + let movieResults: any[] = []; + let tvResults: any[] = []; + + try { + const searchUrl = `https://api.themoviedb.org/3/search/movie?query=${encodeURIComponent(keyword)}&language=zh-CN&page=1`; + const searchResp = await fetch(searchUrl, { + headers: { 'Authorization': `Bearer ${tmdbToken}` }, + signal: AbortSignal.timeout(8000), + }); + if (searchResp.ok) { + const searchData = await searchResp.json() as any; + if (Array.isArray(searchData.results)) { + movieResults = searchData.results; + } + } + } catch { + console.warn(`[Content] TMDB movie search failed for "${keyword}"`); + } + + try { + const searchUrl = `https://api.themoviedb.org/3/search/tv?query=${encodeURIComponent(keyword)}&language=zh-CN&page=1`; + const searchResp = await fetch(searchUrl, { + headers: { 'Authorization': `Bearer ${tmdbToken}` }, + signal: AbortSignal.timeout(8000), + }); + if (searchResp.ok) { + const searchData = await searchResp.json() as any; + if (Array.isArray(searchData.results)) { + tvResults = searchData.results; + } + } + } catch { + console.warn(`[Content] TMDB TV search failed for "${keyword}"`); + } + + // Step 2: Score and rank all results + const isChineseKeyword = /[\u4e00-\u9fff]/.test(keyword); + const kwLower = keyword.toLowerCase(); + + // Score function: higher = better match + function scoreResult(item: any, type: 'tv' | 'movie'): number { + const name = (type === 'tv' ? (item.name || item.original_name || '') : (item.title || item.original_title || '')).toLowerCase(); + // Exact match gets highest priority + if (name === kwLower) return 100; + // Name starts with keyword + if (name.startsWith(kwLower)) return 80; + // Name contains keyword as a standalone segment + if (name.includes(kwLower)) return 60; + // Keyword contains significant portion of name + const cleanName = name.replace(/[^a-z0-9\u4e00-\u9fff]/g, ''); + if (kwLower.includes(cleanName) && cleanName.length >= 2) return 40; + // Partial match + if (name.includes(kwLower) || kwLower.includes(cleanName)) return 20; + return 0; + } + + // Score all TV results + const scoredTV = tvResults.map((r: any) => ({ item: r, score: scoreResult(r, 'tv') })).filter(r => r.score > 0); + // Score all movie results + const scoredMovie = movieResults.map((r: any) => ({ item: r, score: scoreResult(r, 'movie') })).filter(r => r.score > 0); + + // Sort by score descending + scoredTV.sort((a, b) => b.score - a.score); + scoredMovie.sort((a, b) => b.score - a.score); + + const tvBest = scoredTV[0]?.item || null; + const movieBest = scoredMovie[0]?.item || null; + const tvBestScore = scoredTV[0]?.score || 0; + const movieBestScore = scoredMovie[0]?.score || 0; + + let best: any = null; + let mediaType: 'movie' | 'tv' = 'movie'; + let movie: any = null; + + if (tvBest && movieBest) { + // Both have matches — score-based comparison + // For Chinese keywords: TV gets +15 score bonus to prefer series over movies + const tvScore = tvBestScore + (isChineseKeyword ? 15 : 0); + const movieScore = movieBestScore; + if (tvScore > movieScore) { + best = tvBest; + mediaType = 'tv'; + } else if (movieScore > tvScore) { + best = movieBest; + mediaType = 'movie'; + } else { + // Tie — prefer TV for Chinese keywords, otherwise pick higher vote count + if (isChineseKeyword) { + best = tvBest; + mediaType = 'tv'; + } else { + const tvVotes = tvBest.vote_count || 0; + const movieVotes = movieBest.vote_count || 0; + best = tvVotes >= movieVotes ? tvBest : movieBest; + mediaType = tvVotes >= movieVotes ? 'tv' : 'movie'; + } + } + } else if (tvBest) { + best = tvBest; + mediaType = 'tv'; + } else if (movieBest) { + best = movieBest; + mediaType = 'movie'; + } else if (scoredTV.length > 0 && !scoredMovie.length) { + best = scoredTV[0].item; + mediaType = 'tv'; + } else if (scoredMovie.length > 0) { + best = scoredMovie[0].item; + mediaType = 'movie'; + } else if (tvResults.length > 0 && !movieResults.length) { + best = tvResults[0]; + mediaType = 'tv'; + } else if (movieResults.length > 0) { + best = movieResults[0]; + mediaType = 'movie'; + } else { + return null; + } + + let tmdbId = best.id; + try { + const detailUrl = `https://api.themoviedb.org/3/${mediaType}/${tmdbId}?language=zh-CN&append_to_response=credits`; + const detailResp = await fetch(detailUrl, { + headers: { 'Authorization': `Bearer ${tmdbToken}` }, + signal: AbortSignal.timeout(8000), + }); + if (detailResp.ok) { + movie = await detailResp.json() as any; + } + } catch { + console.warn(`[Content] TMDB detail failed for ${mediaType} id ${tmdbId}`); + return null; + } + + if (!movie) return null; + + // Extract TMDB data (use title for movie, name for TV) + const title = movie.title || movie.name || keyword; + const rating = movie.vote_average > 0 ? String(Math.round(movie.vote_average * 10) / 10) : ''; + const ratingCount = movie.vote_count ? String(movie.vote_count) : ''; + // Use release_date for movie, first_air_date for TV + const year = movie.release_date ? movie.release_date.substring(0, 4) : (movie.first_air_date ? movie.first_air_date.substring(0, 4) : ''); + const genres = Array.isArray(movie.genres) ? movie.genres.map((g: any) => g.name).filter(Boolean) : []; + // Directors: tv shows have limited crew data, fall back to "creator" for TV + const directors = Array.isArray(movie.credits?.crew) + ? movie.credits.crew.filter((c: any) => c.job === 'Director').map((c: any) => c.name).filter(Boolean).join(' / ') + : ''; + const actors = Array.isArray(movie.credits?.cast) + ? movie.credits.cast.slice(0, 5).map((c: any) => c.name).filter(Boolean).join(' / ') + : ''; + const region = Array.isArray(movie.production_countries) + ? movie.production_countries.map((c: any) => c.name).filter(Boolean).join(' / ') + : (Array.isArray(movie.origin_country) ? movie.origin_country.join(' / ') : ''); + const duration = mediaType === 'movie' + ? (movie.runtime > 0 ? `${movie.runtime}分钟` : '') + : (movie.episode_run_time && movie.episode_run_time.length > 0 ? `每集${movie.episode_run_time[0]}分钟` : ''); + const description = movie.overview ? movie.overview.substring(0, 200) : ''; + const cover = movie.poster_path ? `https://image.tmdb.org/t/p/w500${movie.poster_path}` : ''; + + // TMDB detail page URL + const tmdbUrl = `https://www.themoviedb.org/${mediaType}/${tmdbId}`; + + // Generate tags from keyword + title + const tags = genTags({ keyword, title }); + + // Build description fallback + let desc = description; + if (!desc) { + const parts: string[] = []; + if (year) parts.push(`${year}年`); + if (genres.length > 0) parts.push(genres.slice(0, 3).join(' / ')); + if (duration) parts.push(duration); + desc = parts.length > 0 ? parts.join(' · ') : ''; + } + + return { + keyword, + title, + description: desc, + tags, + cover, + source: 'tmdb', + tmdb_url: tmdbUrl, + rating, + rating_count: ratingCount, + year, + genres, + directors, + actors, + region, + duration, + }; +} + +function genTags(opts: { keyword: string; title: string }): string[] { + const { keyword, title } = opts; + const tags: string[] = []; + if (keyword.length <= 8) tags.push(keyword); + + const txt = (title + ' ' + keyword).toLowerCase(); + const isDonghua = /动画|动漫/i.test(txt); + if (isDonghua) { + tags.push('动画'); tags.push('国漫'); + } else { + tags.push('电影'); + } + + const genreMap: Record = { + '动画': ['动画'], '动漫': ['动漫'], '国漫': ['国漫'], + '剧场版': ['剧场版'], '年番': ['年番'], + '动作': ['动作'], '奇幻': ['奇幻'], '玄幻': ['玄幻'], + '仙侠': ['仙侠'], '古装': ['古装'], '爱情': ['爱情'], + '科幻': ['科幻'], '喜剧': ['喜剧'], '悬疑': ['悬疑'], + '冒险': ['冒险'], '战争': ['战争'], '纪录': ['纪录片'], '真人': ['真人秀'], + }; + for (const [key, vals] of Object.entries(genreMap)) { + if (txt.includes(key)) { + for (const v of vals) { if (!tags.includes(v)) tags.push(v); } + } + } + return tags; +} + +function safeParseTags(tagsStr: string | null | undefined): string[] { + if (!tagsStr) return []; + try { + const parsed = JSON.parse(tagsStr); + return Array.isArray(parsed) ? parsed : []; + } catch { + return []; + } +} diff --git a/source_clean/src/database/database.ts b/source_clean/src/database/database.ts new file mode 100755 index 0000000..45cc5d3 --- /dev/null +++ b/source_clean/src/database/database.ts @@ -0,0 +1,327 @@ +import Database from 'better-sqlite3'; +import path from 'path'; +import bcrypt from 'bcryptjs'; +import config from '../config'; +import { formatLocalDateTime } from '../utils/time'; + +let db: Database.Database | null = null; + +export function getDb(): Database.Database { + if (db) return db; + + const dbDir = path.dirname(config.dbPath); + const fs = require('fs'); + if (!fs.existsSync(dbDir)) { + fs.mkdirSync(dbDir, { recursive: true }); + } + + db = new Database(config.dbPath); + db.pragma('journal_mode = WAL'); + db.pragma('foreign_keys = ON'); + + // Performance indexes (IF NOT EXISTS ensures idempotent) + db.exec(` + CREATE INDEX IF NOT EXISTS idx_cc_type_active ON cloud_configs(cloud_type, is_active); + CREATE INDEX IF NOT EXISTS idx_cc_uid ON cloud_configs(cookie_uid); + CREATE INDEX IF NOT EXISTS idx_cc_verification ON cloud_configs(verification_status); +`); + + runMigrations(db); + seedAdmin(db); + + return db; +} + +function runMigrations(db: Database.Database): void { + db.exec(` + CREATE TABLE IF NOT EXISTS admins ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + username TEXT UNIQUE NOT NULL, + password_hash TEXT NOT NULL, + created_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')), + last_login TEXT + ); + + CREATE TABLE IF NOT EXISTS cloud_configs ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + cloud_type TEXT NOT NULL, + cookie TEXT, + nickname TEXT, + is_active INTEGER NOT NULL DEFAULT 1, + storage_used TEXT, + storage_total TEXT, + checkin_status TEXT NOT NULL DEFAULT 'none', + last_checkin_at TEXT, + checkin_message TEXT, + consecutive_failures INTEGER DEFAULT 0, + last_used_at TEXT, + total_saves INTEGER DEFAULT 0, + created_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')), + updated_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + + CREATE TABLE IF NOT EXISTS promotions ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + title TEXT NOT NULL, + description TEXT, + image_url TEXT, + link_url TEXT, + position TEXT, + sort_order INTEGER NOT NULL DEFAULT 0, + active INTEGER NOT NULL DEFAULT 1, + click_count INTEGER NOT NULL DEFAULT 0, + start_time TEXT, + end_time TEXT, + created_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')), + updated_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + + CREATE TABLE IF NOT EXISTS save_records ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + source_type TEXT, + source_title TEXT, + source_url TEXT, + target_cloud TEXT, + share_url TEXT, + share_pwd TEXT, + file_size TEXT, + file_count INTEGER DEFAULT 0, + duration_ms INTEGER DEFAULT 0, + status TEXT NOT NULL DEFAULT '', + error_message TEXT, + ip_address TEXT, + created_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + + CREATE TABLE IF NOT EXISTS search_stats ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + keyword TEXT, + intent TEXT, + result_count INTEGER DEFAULT 0, + ip_address TEXT, + created_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + + CREATE TABLE IF NOT EXISTS hot_keywords ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + keyword TEXT UNIQUE NOT NULL, + search_count INTEGER NOT NULL DEFAULT 1, + updated_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + + CREATE TABLE IF NOT EXISTS system_configs ( + key TEXT PRIMARY KEY, + value TEXT NOT NULL DEFAULT '', + description TEXT, + updated_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + + CREATE TABLE IF NOT EXISTS content_cache ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + keyword TEXT UNIQUE NOT NULL, + title TEXT, + description TEXT, + tags TEXT, + cover TEXT, + source TEXT, + updated_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + `); + seedSystemConfigs(db); + migrateSaveRecords(db); + migrateContentCache(db); + migrateCloudConfigs(db); + cleanupOldSaveRecords(db); +} + +/** 迁移: 给已有 save_records 表补充新列 */ +function migrateSaveRecords(db: Database.Database): void { + const newCols: { col: string; def: string }[] = [ + { col: 'share_pwd', def: 'TEXT' }, + { col: 'file_count', def: 'INTEGER DEFAULT 0' }, + { col: 'folder_count', def: 'INTEGER DEFAULT 0' }, + { col: 'duration_ms', def: 'INTEGER DEFAULT 0' }, + { col: 'status', def: "TEXT NOT NULL DEFAULT ''" }, + { col: 'error_message', def: 'TEXT' }, + { col: 'folder_name', def: 'TEXT' }, + { col: 'request_url', def: 'TEXT' }, + { col: 'ip_location', def: 'TEXT' }, + { col: 'original_folder_name', def: 'TEXT' }, + ]; + for (const { col, def } of newCols) { + try { + db.exec(`ALTER TABLE save_records ADD COLUMN ${col} ${def}`); + } catch { + // Column already exists — ignore + } + } +} + +/** 迁移: 给 content_cache 表加 douban_url 列 */ +function migrateContentCache(db: Database.Database): void { + const columns: { col: string; def: string }[] = [ + { col: 'douban_url', def: 'TEXT' }, + { col: 'rating', def: 'TEXT' }, + { col: 'rating_count', def: 'TEXT' }, + { col: 'year', def: 'TEXT' }, + { col: 'genres', def: 'TEXT' }, + { col: 'directors', def: 'TEXT' }, + { col: 'actors', def: 'TEXT' }, + { col: 'region', def: 'TEXT' }, + { col: 'duration', def: 'TEXT' }, + ]; + for (const { col, def } of columns) { + try { + db.exec(`ALTER TABLE content_cache ADD COLUMN ${col} ${def}`); + } catch { + // Column already exists — ignore + } + } + // 修复旧记录:source 为 NULL 但实际有 TMDB 数据的,标记为 tmdb + db.exec(`UPDATE content_cache SET source = 'tmdb' WHERE source IS NULL AND title IS NOT NULL AND title != ''`); +} + +/** 迁移: 给 cloud_configs 表去UNIQUE约束 + 加签到/轮训字段 */ +function migrateCloudConfigs(db: Database.Database): void { + // 加新列 + const newCols: { col: string; def: string }[] = [ + { col: 'checkin_status', def: "TEXT NOT NULL DEFAULT 'none'" }, + { col: 'last_checkin_at', def: 'TEXT' }, + { col: 'checkin_message', def: 'TEXT' }, + { col: 'consecutive_failures', def: 'INTEGER DEFAULT 0' }, + { col: 'last_used_at', def: 'TEXT' }, + { col: 'total_saves', def: 'INTEGER DEFAULT 0' }, + ]; + for (const { col, def } of newCols) { + try { db.exec(`ALTER TABLE cloud_configs ADD COLUMN ${col} ${def}`); } catch {} + } + // 检查旧表是否有 UNIQUE 约束,有则重建表 + const row = db.prepare(`SELECT sql FROM sqlite_master WHERE type='table' AND name='cloud_configs'`).get() as any; + if (row && row.sql && row.sql.includes('cloud_type TEXT UNIQUE')) { + db.exec(` + CREATE TABLE IF NOT EXISTS cloud_configs_v2 ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + cloud_type TEXT NOT NULL, + cookie TEXT, + nickname TEXT, + is_active INTEGER NOT NULL DEFAULT 1, + storage_used TEXT, + storage_total TEXT, + checkin_status TEXT NOT NULL DEFAULT 'none', + last_checkin_at TEXT, + checkin_message TEXT, + consecutive_failures INTEGER DEFAULT 0, + last_used_at TEXT, + total_saves INTEGER DEFAULT 0, + created_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')), + updated_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + INSERT INTO cloud_configs_v2 (id, cloud_type, cookie, nickname, is_active, storage_used, storage_total, checkin_status, last_checkin_at, checkin_message, consecutive_failures, last_used_at, total_saves, created_at, updated_at) + SELECT id, cloud_type, cookie, nickname, is_active, storage_used, storage_total, COALESCE(checkin_status,'none'), last_checkin_at, checkin_message, COALESCE(consecutive_failures,0), last_used_at, COALESCE(total_saves,0), created_at, updated_at FROM cloud_configs; + DROP TABLE cloud_configs; + ALTER TABLE cloud_configs_v2 RENAME TO cloud_configs; + `); + console.log('[DB] cloud_configs migration: UNIQUE constraint removed, new fields added'); + } + + // Migration 2: Add verification_status column + const row2 = db.prepare("SELECT sql FROM sqlite_master WHERE name='cloud_configs' AND sql LIKE '%verification_status%'").get(); + if (!row2) { + db.exec("ALTER TABLE cloud_configs ADD COLUMN verification_status TEXT DEFAULT NULL"); + console.log('[DB] cloud_configs migration: verification_status column added'); + } + + // Migration 3: Add cookie_uid column + const hasCookieUid = db.prepare("SELECT sql FROM sqlite_master WHERE name='cloud_configs' AND sql LIKE '%cookie_uid%'").get(); + if (!hasCookieUid) { + db.exec("ALTER TABLE cloud_configs ADD COLUMN cookie_uid TEXT DEFAULT NULL"); + console.log('[DB] cloud_configs migration: cookie_uid column added'); + } + + // Migration 4: Add promotion_account column + const hasPromotionAccount = db.prepare("SELECT sql FROM sqlite_master WHERE name='cloud_configs' AND sql LIKE '%promotion_account%'").get(); + if (!hasPromotionAccount) { + db.exec("ALTER TABLE cloud_configs ADD COLUMN promotion_account TEXT DEFAULT NULL"); + console.log('[DB] cloud_configs migration: promotion_account column added'); + } +} + +function seedAdmin(db: Database.Database): void { + const existing = db.prepare('SELECT id FROM admins WHERE username = ?').get(config.adminUsername); + if (existing) return; + + const salt = bcrypt.genSaltSync(10); + const hash = bcrypt.hashSync(config.adminPassword, salt); + + db.prepare( + 'INSERT INTO admins (username, password_hash) VALUES (?, ?)' + ).run(config.adminUsername, hash); + + console.log(`[DB] Admin user "${config.adminUsername}" created`); +} + +function seedSystemConfigs(db: Database.Database): void { + const defaults: { key: string; value: string; description: string }[] = [ + { key: 'pansou_url', value: config.pansouUrl, description: 'PanSou 搜索引擎服务地址' }, + { key: 'video_parser_url', value: config.videoParserUrl, description: '视频解析服务地址' }, + { key: 'validation_concurrency', value: String(config.validation.concurrency), description: '链接验证并发数' }, + { key: 'validation_timeout', value: String(config.validation.timeout), description: '链接验证超时(ms)' }, + { key: 'validation_cache_ttl_valid', value: String(config.validation.cacheTtlValid), description: '有效链接缓存时间(s)' }, + { key: 'validation_cache_ttl_invalid', value: String(config.validation.cacheTtlInvalid), description: '无效链接缓存时间(s)' }, + { key: 'search_proxy_enabled', value: 'false', description: '搜索代理开关(true/false)' }, + { key: 'search_proxy_url', value: '', description: '搜索代理地址 (如 http://127.0.0.1:7890)' }, + { key: 'search_strategy', value: 'wait_all', description: '搜索结果展示方式: wait_all=等待全部后展示, stream_channel=频道逐步展示' }, + { key: 'link_validation_enabled', value: 'true', description: '资源链接有效性检测开关(true/false)' }, + { key: 'cloud_enabled_quark', value: 'true', description: '夸克网盘' }, + { key: 'cloud_enabled_baidu', value: 'true', description: '百度网盘' }, + { key: 'cloud_enabled_aliyun', value: 'true', description: '阿里云盘' }, + { key: 'cloud_enabled_115', value: 'true', description: '115 网盘' }, + { key: 'cloud_enabled_tianyi', value: 'true', description: '天翼云盘' }, + { key: 'cloud_enabled_123pan', value: 'true', description: '123 云盘' }, + { key: 'cloud_enabled_uc', value: 'true', description: 'UC 网盘' }, + { key: 'cloud_enabled_xunlei', value: 'true', description: '迅雷网盘' }, + { key: 'cloud_enabled_pikpak', value: 'true', description: 'PikPak 网盘' }, + { key: 'cloud_enabled_magnet', value: 'true', description: '磁力链接' }, + { key: 'cloud_enabled_ed2k', value: 'true', description: '电驴链接' }, + { key: 'cloud_enabled_others', value: 'false', description: '其他类型(默认关闭)' }, + { key: 'search_result_limit', value: '10', description: '每类网盘最多展示的有效结果数' }, + { key: 'search_fallback_image', value: '', description: '无图资源的兜底封面图 URL(留空使用渐变色)' }, + { key: 'site_logo', value: '', description: '网站 LOGO 图片 URL(留空使用默认图标/文字)' }, + { key: 'site_name', value: 'CloudSearch', description: '网站名称(显示在首页标题/页脚)' }, + { key: 'site_disclaimer', value: '本站为非盈利性个人站点,所有资源仅供学习、研究使用,版权归原作者所有。请于下载后24小时内删除,切勿用于商业或非法用途。若侵犯了您的权益,请联系我们(邮箱:3337598077@qq.com),我们将及时处理。', description: '网站底部免责声明' }, + { key: 'site_marquee', value: '📢 欢迎使用CloudSearch,所有资源仅供学习交流,请于下载后24小时内删除', description: '搜索栏下方滚动通知文字(从右往左滚动显示)' }, + { key: 'tmdb_api_token', value: '', description: 'TMDB API 读取令牌(用于增强豆瓣内容信息)' }, + { key: 'ip_geo_api_url', value: 'https://cn.apihz.cn/api/ip/chaapi.php?id=10014356&key=ca7ccb3b9ca044dd993c8604bc9afd93&ip={ip}&td=0', description: 'IP 归属地查询接口({ip} 会被替换为实际IP)' }, + { key: 'ip_geo_api_key', value: '', description: 'IP 归属地备用 API Key(留空使用默认)' }, + { key: 'title_filter_rules', value: '', description: '搜索结果标题过滤规则(一行一条:纯文本直接移除 / 正则用/包围/)' }, + { key: 'timezone', value: 'Asia/Shanghai', description: '系统时区(如 Asia/Shanghai、America/New_York、UTC)' }, + { key: 'redis_url', value: 'redis://redis:6379', description: 'Redis 连接地址(用于缓存优化)' }, + { key: 'pansou_auth_token', value: '', description: 'PanSou API 认证令牌(用于私有搜索服务)' }, + { key: 'pansou_web_enabled', value: 'false', description: '启用 PanSou Web 端访问(在 /pansou 路径提供 PanSou 搜索引擎管理界面)' }, + { key: 'cleanup_enabled', value: 'true', description: '启用自动清理(每天检查一次,移入回收站+清空日志+清空回收站)' }, + { key: 'cleanup_file_retention_days', value: '7', description: '云盘文件保留天数(超过此天数的日期文件夹将被移入回收站)' }, + { key: 'cleanup_log_retention_days', value: '30', description: '转存日志保留天数' }, + { key: 'cleanup_empty_trash', value: 'true', description: '清理时是否清空回收站(永久删除释放空间)' }, + { key: 'cleanup_space_threshold_enabled', value: 'false', description: '启用空间阈值自动清理(已用空间超过XX%时按比例删除最旧的转存文件)' }, + { key: 'cleanup_space_threshold_percent', value: '90', description: '空间使用阈值百分比(超过此值时触发强制清理)' }, + { key: 'cleanup_space_threshold_delete_percent', value: '10', description: '触发阈值清理时释放总空间的百分比(如 10 表示累计删除最旧文件直到达到总空间的 10%,6TB 总空间 → 释放 ~600GB)' }, + { key: 'save_reuse_enabled', value: 'true', description: '启用分享链接复用(相同原始链接不再重复转存,直接复用之前的分享链接)' }, + { key: 'cleanup_last_run', value: '', description: '上次自动清理时间' }, + { key: 'cleanup_last_stats', value: '', description: '上次清理结果统计(JSON)' }, + ]; + const insert = db.prepare( + 'INSERT OR IGNORE INTO system_configs (key, value, description) VALUES (?, ?, ?)' + ); + for (const entry of defaults) { + insert.run(entry.key, entry.value, entry.description); + } +} + +/** 清理 60 天前的转存记录 */ +function cleanupOldSaveRecords(db: Database.Database): void { + const cutoff = formatLocalDateTime(new Date(Date.now() - 60 * 24 * 60 * 60 * 1000)); + const deleted = db.prepare('DELETE FROM save_records WHERE created_at < ?').run(cutoff); + console.log(`[DB] Cleaned up ${deleted.changes} save records older than 60 days (before ${cutoff})`); +} + +export default getDb; diff --git a/source_clean/src/database/database.ts.bak_idx b/source_clean/src/database/database.ts.bak_idx new file mode 100755 index 0000000..5098be2 --- /dev/null +++ b/source_clean/src/database/database.ts.bak_idx @@ -0,0 +1,306 @@ +import Database from 'better-sqlite3'; +import path from 'path'; +import bcrypt from 'bcryptjs'; +import config from '../config'; +import { formatLocalDateTime } from '../utils/time'; + +let db: Database.Database | null = null; + +export function getDb(): Database.Database { + if (db) return db; + + const dbDir = path.dirname(config.dbPath); + const fs = require('fs'); + if (!fs.existsSync(dbDir)) { + fs.mkdirSync(dbDir, { recursive: true }); + } + + db = new Database(config.dbPath); + db.pragma('journal_mode = WAL'); + db.pragma('foreign_keys = ON'); + + runMigrations(db); + seedAdmin(db); + + return db; +} + +function runMigrations(db: Database.Database): void { + db.exec(` + CREATE TABLE IF NOT EXISTS admins ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + username TEXT UNIQUE NOT NULL, + password_hash TEXT NOT NULL, + created_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')), + last_login TEXT + ); + + CREATE TABLE IF NOT EXISTS cloud_configs ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + cloud_type TEXT NOT NULL, + cookie TEXT, + nickname TEXT, + is_active INTEGER NOT NULL DEFAULT 1, + storage_used TEXT, + storage_total TEXT, + checkin_status TEXT NOT NULL DEFAULT 'none', + last_checkin_at TEXT, + checkin_message TEXT, + consecutive_failures INTEGER DEFAULT 0, + last_used_at TEXT, + total_saves INTEGER DEFAULT 0, + created_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')), + updated_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + + CREATE TABLE IF NOT EXISTS promotions ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + title TEXT NOT NULL, + description TEXT, + image_url TEXT, + link_url TEXT, + position TEXT, + sort_order INTEGER NOT NULL DEFAULT 0, + active INTEGER NOT NULL DEFAULT 1, + click_count INTEGER NOT NULL DEFAULT 0, + start_time TEXT, + end_time TEXT, + created_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')), + updated_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + + CREATE TABLE IF NOT EXISTS save_records ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + source_type TEXT, + source_title TEXT, + source_url TEXT, + target_cloud TEXT, + share_url TEXT, + share_pwd TEXT, + file_size TEXT, + file_count INTEGER DEFAULT 0, + duration_ms INTEGER DEFAULT 0, + status TEXT NOT NULL DEFAULT '', + error_message TEXT, + ip_address TEXT, + created_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + + CREATE TABLE IF NOT EXISTS search_stats ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + keyword TEXT, + intent TEXT, + result_count INTEGER DEFAULT 0, + ip_address TEXT, + created_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + + CREATE TABLE IF NOT EXISTS hot_keywords ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + keyword TEXT UNIQUE NOT NULL, + search_count INTEGER NOT NULL DEFAULT 1, + updated_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + + CREATE TABLE IF NOT EXISTS system_configs ( + key TEXT PRIMARY KEY, + value TEXT NOT NULL DEFAULT '', + description TEXT, + updated_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + + CREATE TABLE IF NOT EXISTS content_cache ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + keyword TEXT UNIQUE NOT NULL, + title TEXT, + description TEXT, + tags TEXT, + cover TEXT, + source TEXT, + updated_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + `); + seedSystemConfigs(db); + migrateSaveRecords(db); + migrateContentCache(db); + migrateCloudConfigs(db); + cleanupOldSaveRecords(db); +} + +/** 迁移: 给已有 save_records 表补充新列 */ +function migrateSaveRecords(db: Database.Database): void { + const newCols: { col: string; def: string }[] = [ + { col: 'share_pwd', def: 'TEXT' }, + { col: 'file_count', def: 'INTEGER DEFAULT 0' }, + { col: 'folder_count', def: 'INTEGER DEFAULT 0' }, + { col: 'duration_ms', def: 'INTEGER DEFAULT 0' }, + { col: 'status', def: "TEXT NOT NULL DEFAULT ''" }, + { col: 'error_message', def: 'TEXT' }, + { col: 'folder_name', def: 'TEXT' }, + { col: 'request_url', def: 'TEXT' }, + { col: 'ip_location', def: 'TEXT' }, + { col: 'original_folder_name', def: 'TEXT' }, + ]; + for (const { col, def } of newCols) { + try { + db.exec(`ALTER TABLE save_records ADD COLUMN ${col} ${def}`); + } catch { + // Column already exists — ignore + } + } +} + +/** 迁移: 给 content_cache 表加 douban_url 列 */ +function migrateContentCache(db: Database.Database): void { + const columns: { col: string; def: string }[] = [ + { col: 'douban_url', def: 'TEXT' }, + { col: 'rating', def: 'TEXT' }, + { col: 'rating_count', def: 'TEXT' }, + { col: 'year', def: 'TEXT' }, + { col: 'genres', def: 'TEXT' }, + { col: 'directors', def: 'TEXT' }, + { col: 'actors', def: 'TEXT' }, + { col: 'region', def: 'TEXT' }, + { col: 'duration', def: 'TEXT' }, + ]; + for (const { col, def } of columns) { + try { + db.exec(`ALTER TABLE content_cache ADD COLUMN ${col} ${def}`); + } catch { + // Column already exists — ignore + } + } + // 修复旧记录:source 为 NULL 但实际有 TMDB 数据的,标记为 tmdb + db.exec(`UPDATE content_cache SET source = 'tmdb' WHERE source IS NULL AND title IS NOT NULL AND title != ''`); +} + +/** 迁移: 给 cloud_configs 表去UNIQUE约束 + 加签到/轮训字段 */ +function migrateCloudConfigs(db: Database.Database): void { + // 加新列 + const newCols: { col: string; def: string }[] = [ + { col: 'checkin_status', def: "TEXT NOT NULL DEFAULT 'none'" }, + { col: 'last_checkin_at', def: 'TEXT' }, + { col: 'checkin_message', def: 'TEXT' }, + { col: 'consecutive_failures', def: 'INTEGER DEFAULT 0' }, + { col: 'last_used_at', def: 'TEXT' }, + { col: 'total_saves', def: 'INTEGER DEFAULT 0' }, + ]; + for (const { col, def } of newCols) { + try { db.exec(`ALTER TABLE cloud_configs ADD COLUMN ${col} ${def}`); } catch {} + } + // 检查旧表是否有 UNIQUE 约束,有则重建表 + const row = db.prepare(`SELECT sql FROM sqlite_master WHERE type='table' AND name='cloud_configs'`).get() as any; + if (row && row.sql && row.sql.includes('cloud_type TEXT UNIQUE')) { + db.exec(` + CREATE TABLE IF NOT EXISTS cloud_configs_v2 ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + cloud_type TEXT NOT NULL, + cookie TEXT, + nickname TEXT, + is_active INTEGER NOT NULL DEFAULT 1, + storage_used TEXT, + storage_total TEXT, + checkin_status TEXT NOT NULL DEFAULT 'none', + last_checkin_at TEXT, + checkin_message TEXT, + consecutive_failures INTEGER DEFAULT 0, + last_used_at TEXT, + total_saves INTEGER DEFAULT 0, + created_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')), + updated_at TEXT NOT NULL DEFAULT (datetime('now', 'localtime')) + ); + INSERT INTO cloud_configs_v2 (id, cloud_type, cookie, nickname, is_active, storage_used, storage_total, checkin_status, last_checkin_at, checkin_message, consecutive_failures, last_used_at, total_saves, created_at, updated_at) + SELECT id, cloud_type, cookie, nickname, is_active, storage_used, storage_total, COALESCE(checkin_status,'none'), last_checkin_at, checkin_message, COALESCE(consecutive_failures,0), last_used_at, COALESCE(total_saves,0), created_at, updated_at FROM cloud_configs; + DROP TABLE cloud_configs; + ALTER TABLE cloud_configs_v2 RENAME TO cloud_configs; + `); + console.log('[DB] cloud_configs migration: UNIQUE constraint removed, new fields added'); + } + + // Migration 2: Add verification_status column + const row2 = db.prepare("SELECT sql FROM sqlite_master WHERE name='cloud_configs' AND sql LIKE '%verification_status%'").get(); + if (!row2) { + db.exec("ALTER TABLE cloud_configs ADD COLUMN verification_status TEXT DEFAULT NULL"); + console.log('[DB] cloud_configs migration: verification_status column added'); + } +} + +function seedAdmin(db: Database.Database): void { + const existing = db.prepare('SELECT id FROM admins WHERE username = ?').get(config.adminUsername); + if (existing) return; + + const salt = bcrypt.genSaltSync(10); + const hash = bcrypt.hashSync(config.adminPassword, salt); + + db.prepare( + 'INSERT INTO admins (username, password_hash) VALUES (?, ?)' + ).run(config.adminUsername, hash); + + console.log(`[DB] Admin user "${config.adminUsername}" created`); +} + +function seedSystemConfigs(db: Database.Database): void { + const defaults: { key: string; value: string; description: string }[] = [ + { key: 'pansou_url', value: config.pansouUrl, description: 'PanSou 搜索引擎服务地址' }, + { key: 'video_parser_url', value: config.videoParserUrl, description: '视频解析服务地址' }, + { key: 'validation_concurrency', value: String(config.validation.concurrency), description: '链接验证并发数' }, + { key: 'validation_timeout', value: String(config.validation.timeout), description: '链接验证超时(ms)' }, + { key: 'validation_cache_ttl_valid', value: String(config.validation.cacheTtlValid), description: '有效链接缓存时间(s)' }, + { key: 'validation_cache_ttl_invalid', value: String(config.validation.cacheTtlInvalid), description: '无效链接缓存时间(s)' }, + { key: 'search_proxy_enabled', value: 'false', description: '搜索代理开关(true/false)' }, + { key: 'search_proxy_url', value: '', description: '搜索代理地址 (如 http://127.0.0.1:7890)' }, + { key: 'search_strategy', value: 'wait_all', description: '搜索结果展示方式: wait_all=等待全部后展示, stream_channel=频道逐步展示' }, + { key: 'link_validation_enabled', value: 'true', description: '资源链接有效性检测开关(true/false)' }, + { key: 'cloud_enabled_quark', value: 'true', description: '夸克网盘' }, + { key: 'cloud_enabled_baidu', value: 'true', description: '百度网盘' }, + { key: 'cloud_enabled_aliyun', value: 'true', description: '阿里云盘' }, + { key: 'cloud_enabled_115', value: 'true', description: '115 网盘' }, + { key: 'cloud_enabled_tianyi', value: 'true', description: '天翼云盘' }, + { key: 'cloud_enabled_123pan', value: 'true', description: '123 云盘' }, + { key: 'cloud_enabled_uc', value: 'true', description: 'UC 网盘' }, + { key: 'cloud_enabled_xunlei', value: 'true', description: '迅雷网盘' }, + { key: 'cloud_enabled_pikpak', value: 'true', description: 'PikPak 网盘' }, + { key: 'cloud_enabled_magnet', value: 'true', description: '磁力链接' }, + { key: 'cloud_enabled_ed2k', value: 'true', description: '电驴链接' }, + { key: 'cloud_enabled_others', value: 'false', description: '其他类型(默认关闭)' }, + { key: 'search_result_limit', value: '10', description: '每类网盘最多展示的有效结果数' }, + { key: 'search_fallback_image', value: '', description: '无图资源的兜底封面图 URL(留空使用渐变色)' }, + { key: 'site_logo', value: '', description: '网站 LOGO 图片 URL(留空使用默认图标/文字)' }, + { key: 'site_name', value: 'CloudSearch', description: '网站名称(显示在首页标题/页脚)' }, + { key: 'site_disclaimer', value: '本站为非盈利性个人站点,所有资源仅供学习、研究使用,版权归原作者所有。请于下载后24小时内删除,切勿用于商业或非法用途。若侵犯了您的权益,请联系我们(邮箱:3337598077@qq.com),我们将及时处理。', description: '网站底部免责声明' }, + { key: 'site_marquee', value: '📢 欢迎使用CloudSearch,所有资源仅供学习交流,请于下载后24小时内删除', description: '搜索栏下方滚动通知文字(从右往左滚动显示)' }, + { key: 'tmdb_api_token', value: '', description: 'TMDB API 读取令牌(用于增强豆瓣内容信息)' }, + { key: 'ip_geo_api_url', value: 'https://cn.apihz.cn/api/ip/chaapi.php?id=10014356&key=ca7ccb3b9ca044dd993c8604bc9afd93&ip={ip}&td=0', description: 'IP 归属地查询接口({ip} 会被替换为实际IP)' }, + { key: 'ip_geo_api_key', value: '', description: 'IP 归属地备用 API Key(留空使用默认)' }, + { key: 'title_filter_rules', value: '', description: '搜索结果标题过滤规则(一行一条:纯文本直接移除 / 正则用/包围/)' }, + { key: 'timezone', value: 'Asia/Shanghai', description: '系统时区(如 Asia/Shanghai、America/New_York、UTC)' }, + { key: 'redis_url', value: 'redis://redis:6379', description: 'Redis 连接地址(用于缓存优化)' }, + { key: 'pansou_auth_token', value: '', description: 'PanSou API 认证令牌(用于私有搜索服务)' }, + { key: 'pansou_web_enabled', value: 'false', description: '启用 PanSou Web 端访问(在 /pansou 路径提供 PanSou 搜索引擎管理界面)' }, + { key: 'cleanup_enabled', value: 'true', description: '启用自动清理(每天检查一次,移入回收站+清空日志+清空回收站)' }, + { key: 'cleanup_file_retention_days', value: '7', description: '云盘文件保留天数(超过此天数的日期文件夹将被移入回收站)' }, + { key: 'cleanup_log_retention_days', value: '30', description: '转存日志保留天数' }, + { key: 'cleanup_empty_trash', value: 'true', description: '清理时是否清空回收站(永久删除释放空间)' }, + { key: 'cleanup_space_threshold_enabled', value: 'false', description: '启用空间阈值自动清理(已用空间超过XX%时按比例删除最旧的转存文件)' }, + { key: 'cleanup_space_threshold_percent', value: '90', description: '空间使用阈值百分比(超过此值时触发强制清理)' }, + { key: 'cleanup_space_threshold_delete_percent', value: '10', description: '触发阈值清理时释放总空间的百分比(如 10 表示累计删除最旧文件直到达到总空间的 10%,6TB 总空间 → 释放 ~600GB)' }, + { key: 'save_reuse_enabled', value: 'true', description: '启用分享链接复用(相同原始链接不再重复转存,直接复用之前的分享链接)' }, + { key: 'cleanup_last_run', value: '', description: '上次自动清理时间' }, + { key: 'cleanup_last_stats', value: '', description: '上次清理结果统计(JSON)' }, + ]; + const insert = db.prepare( + 'INSERT OR IGNORE INTO system_configs (key, value, description) VALUES (?, ?, ?)' + ); + for (const entry of defaults) { + insert.run(entry.key, entry.value, entry.description); + } +} + +/** 清理 60 天前的转存记录 */ +function cleanupOldSaveRecords(db: Database.Database): void { + const cutoff = formatLocalDateTime(new Date(Date.now() - 60 * 24 * 60 * 60 * 1000)); + const deleted = db.prepare('DELETE FROM save_records WHERE created_at < ?').run(cutoff); + console.log(`[DB] Cleaned up ${deleted.changes} save records older than 60 days (before ${cutoff})`); +} + +export default getDb; diff --git a/source_clean/src/intent/intent.service.ts b/source_clean/src/intent/intent.service.ts new file mode 100755 index 0000000..319a8ee --- /dev/null +++ b/source_clean/src/intent/intent.service.ts @@ -0,0 +1,41 @@ +export type IntentType = 'SEARCH' | 'VIDEO_PARSE' | 'CLOUD_SAVE'; + +export interface IntentResult { + type: IntentType; + platform?: string; + rawInput: string; + cleanInput: string; +} + +const VIDEO_PLATFORMS = [ + { domain: /douyin\.com|v\.douyin\.com/i, name: 'douyin' }, + { domain: /kuaishou\.com/i, name: 'kuaishou' }, + { domain: /xiaohongshu\.com/i, name: 'xiaohongshu' }, + { domain: /bilibili\.com|b23\.tv/i, name: 'bilibili' }, + { domain: /weibo\.com/i, name: 'weibo' }, + { domain: /pipixia\.com/i, name: 'pipixia' }, + { domain: /y\.qq\.com/i, name: 'qqmusic' }, +]; + +import { CLOUD_DOMAIN_PATTERNS } from '../config/cloud-labels'; + +export function detectIntent(input: string): IntentResult { + const urlMatch = input.match(/(https?:\/\/[^\s]+)/i); + if (urlMatch) { + const url = urlMatch[1]; + + for (const p of VIDEO_PLATFORMS) { + if (p.domain.test(url)) { + return { type: 'VIDEO_PARSE', platform: p.name, rawInput: input, cleanInput: url }; + } + } + + for (const p of CLOUD_DOMAIN_PATTERNS) { + if (p.regex.test(url)) { + return { type: 'CLOUD_SAVE', platform: p.type, rawInput: input, cleanInput: url }; + } + } + } + + return { type: 'SEARCH', rawInput: input, cleanInput: input.trim() }; +} diff --git a/source_clean/src/main.ts b/source_clean/src/main.ts new file mode 100755 index 0000000..9f8030c --- /dev/null +++ b/source_clean/src/main.ts @@ -0,0 +1,187 @@ +import express from 'express'; +import path from 'path'; +import cors from 'cors'; +import helmet from 'helmet'; +import morgan from 'morgan'; +import config from './config'; +const { version } = require('../package.json'); +import { getDb } from './database/database'; +import { connectRedis, disconnectRedis, reconnectRedis, testRedisConnection } from './middleware/cache'; +import rateLimiter from './middleware/rate-limit'; +import routes from './routes'; +import { pansouWebProxy } from './proxy/pansou-web'; +import { checkAndRunScheduledCleanup } from './cloud/cleanup.service'; +import { refreshAllStorageInfo } from './cloud/cloud.service'; + +const app = express(); + +// ============ Middleware ============ +app.set('trust proxy', true); + +// CORS — 生产环境必须配置真实域名(空值或占位符用 * 并打警告日志) +const corsOrigin = process.env.CORS_ORIGIN || ''; +const isPlaceholder = !corsOrigin || corsOrigin === 'https://your-domain.com'; +if (config.nodeEnv === 'production' && isPlaceholder) { + console.error('[FATAL] CORS_ORIGIN 未配置或使用了占位符 https://your-domain.com,生产环境必须设置真实域名。应用拒绝启动。'); + process.exit(1); +} +if (config.nodeEnv === 'production' && !isPlaceholder) { + app.use(cors({ origin: corsOrigin, credentials: true })); +} else { + app.use(cors({ origin: '*', credentials: false })); +} + +app.use(helmet({ contentSecurityPolicy: false })); + +// morgan 日志格式:不记录 IP,避免隐私合规问题 +app.use(morgan(':method :url :status :res[content-length] - :response-time ms')); + +app.use(express.json({ limit: '10mb' })); +app.use(express.urlencoded({ extended: true, limit: '10mb' })); +app.use(rateLimiter); + +// ============ 前端静态文件 ============ +const frontendDist = path.join(__dirname, 'frontend'); +app.use(express.static(frontendDist)); + +// ============ Routes ============ +app.use('/api/uploads', express.static('/app/uploads')); +app.use('/api', routes); + +// ============ Health Check(增强版:覆盖 Redis / PanSou / VideoParser 状态) ============ +app.get('/health', async (_req, res) => { + const dbOk = (() => { + try { getDb(); return true; } catch { return false; } + })(); + + const redisStatus = await (async () => { + try { + const { getRedis } = require('./middleware/cache'); + const redis = getRedis(); + if (!redis) return 'disconnected'; + const pong = await redis.ping().catch(() => null); + return pong === 'PONG' ? 'connected' : 'error'; + // eslint-disable-next-line no-unused-vars + } catch { return 'unknown'; } + })(); + + const pansouStatus = await (async () => { + try { + // Native fetch available in Node 20+ + const url = (config.pansouUrl || 'http://pansou:80').replace(/\/+$/, '') + '/api/search'; + const controller = new AbortController(); + const t = setTimeout(() => controller.abort(), 3000); + const r = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ kw: 'health', page: 1 }), signal: controller.signal }); + clearTimeout(t); + return r.ok ? 'ok' : 'degraded'; + // eslint-disable-next-line no-unused-vars + } catch { return 'unreachable'; } + })(); + + const videoParserStatus = await (async () => { + try { + // Native fetch available in Node 20+ + const url = (config.videoParserUrl || 'http://video-parser:3001').replace(/\/+$/, ''); + const controller = new AbortController(); + const t = setTimeout(() => controller.abort(), 3000); + const r = await fetch(url, { signal: controller.signal }); + clearTimeout(t); + return r.ok ? 'ok' : 'degraded'; + // eslint-disable-next-line no-unused-vars + } catch { return 'unreachable'; } + })(); + + const overall = dbOk && redisStatus === 'connected' && pansouStatus === 'ok' && videoParserStatus === 'ok' + ? 'ok' + : dbOk && redisStatus !== 'unknown' && pansouStatus !== 'unreachable' + ? 'degraded' + : 'unhealthy'; + + res.json({ + version, + status: overall, + timestamp: new Date().toISOString(), + uptime: Math.floor(process.uptime()), + memory: process.memoryUsage().rss, + components: { + db: dbOk ? 'connected' : 'error', + redis: redisStatus, + pansou: pansouStatus, + videoParser: videoParserStatus, + }, + }); +}); + +// ============ PanSou Web UI Proxy ============ +app.use('/pansou', pansouWebProxy); + +// SPA fallback +app.use((req, res, next) => { + if (req.path.startsWith('/api/') || req.path === '/health') return next(); + res.sendFile(path.join(frontendDist, 'index.html'), (err) => { if (err) next(); }); +}); + +// Global error handler +app.use((err: any, _req: express.Request, res: express.Response, _next: express.NextFunction) => { + console.error('[Error]', err); + res.status(err.status || 500).json({ + error: config.nodeEnv === 'production' ? 'Internal server error' : err.message, + code: err.status || 500, + }); +}); + +// ============ Server Start ============ +async function start(): Promise { + try { + getDb(); + console.log('[DB] SQLite database initialized'); + try { + const { getSystemConfig } = require('./admin/system-config.service'); + const tz = getSystemConfig('timezone'); + if (tz) { process.env.TZ = tz; console.log(`[Config] Timezone set to: ${tz}`); } + } catch { console.warn('[Config] Could not set timezone, using default'); } + } catch (err) { + console.error('[DB] Failed to initialize database:', err); + process.exit(1); + } + + try { + const { getSystemConfig } = require('./admin/system-config.service'); + const redisUrl = process.env.REDIS_URL || getSystemConfig('redis_url'); + if (redisUrl) { + const ok = await reconnectRedis(redisUrl); + if (ok) console.log('[Redis] Connected to', redisUrl); + } else { + await connectRedis(); + } + } catch { console.warn('[Redis] Redis not available, continuing without cache'); } + + // Cleanup scheduler + const CLEANUP_INTERVAL = 10 * 60 * 1000; + setInterval(() => { checkAndRunScheduledCleanup().catch(err => console.error('[Cleanup] Scheduler error:', err.message)); }, CLEANUP_INTERVAL); + setTimeout(() => { checkAndRunScheduledCleanup().catch(err => console.error('[Cleanup] Initial check error:', err.message)); }, 30000); + + // Storage info refresh scheduler — every 60 minutes + const STORAGE_REFRESH_INTERVAL = 60 * 60 * 1000; + setInterval(() => { refreshAllStorageInfo().catch(err => console.error('[Storage] Refresh error:', err.message)); }, STORAGE_REFRESH_INTERVAL); + setTimeout(() => { refreshAllStorageInfo().catch(err => console.error('[Storage] Initial refresh error:', err.message)); }, 60000); + + const server = app.listen(config.port, () => { + console.log(`[Server] CloudSearch Backend running on port ${config.port} (${config.nodeEnv})`); + }); + + const shutdown = async (signal: string) => { + console.log(`\n[Server] Received ${signal}, shutting down gracefully...`); + server.close(async () => { await disconnectRedis(); console.log('[Server] Closed'); process.exit(0); }); + setTimeout(() => { console.error('[Server] Force shutdown'); process.exit(1); }, 10000); + }; + + process.on('SIGTERM', () => shutdown('SIGTERM')); + process.on('SIGINT', () => shutdown('SIGINT')); + process.on('uncaughtException', (err) => { console.error('[FATAL] Uncaught Exception:', err); setTimeout(() => process.exit(1), 1000); }); + process.on('unhandledRejection', (reason) => { const msg = reason instanceof Error ? reason.message : String(reason); console.error('[FATAL] Unhandled Rejection:', msg); }); +} + +start().catch((err) => { console.error('[Server] Failed to start:', err); process.exit(1); }); + +export default app; diff --git a/source_clean/src/main.ts.bak_p0fix b/source_clean/src/main.ts.bak_p0fix new file mode 100755 index 0000000..c5ae41b --- /dev/null +++ b/source_clean/src/main.ts.bak_p0fix @@ -0,0 +1,186 @@ +import express from 'express'; +import path from 'path'; +import cors from 'cors'; +import helmet from 'helmet'; +import morgan from 'morgan'; +import config from './config'; +const { version } = require('../package.json'); +import { getDb } from './database/database'; +import { connectRedis, disconnectRedis, reconnectRedis, testRedisConnection } from './middleware/cache'; +import rateLimiter from './middleware/rate-limit'; +import routes from './routes'; +import { pansouWebProxy } from './proxy/pansou-web'; +import { checkAndRunScheduledCleanup } from './cloud/cleanup.service'; +import { refreshAllStorageInfo } from './cloud/cloud.service'; + +const app = express(); + +// ============ Middleware ============ +app.set('trust proxy', true); + +// CORS — 生产环境必须配置真实域名(空值或占位符用 * 并打警告日志) +const corsOrigin = process.env.CORS_ORIGIN || ''; +const isPlaceholder = !corsOrigin || corsOrigin === 'https://your-domain.com'; +if (config.nodeEnv === 'production' && isPlaceholder) { + console.warn('[WARN] CORS_ORIGIN 未配置或使用了占位符,生产环境建议设置真实域名,当前临时允许所有来源'); +} +if (config.nodeEnv === 'production' && !isPlaceholder) { + app.use(cors({ origin: corsOrigin, credentials: true })); +} else { + app.use(cors({ origin: '*', credentials: false })); +} + +app.use(helmet({ contentSecurityPolicy: false })); + +// morgan 日志格式:不记录 IP,避免隐私合规问题 +app.use(morgan(':method :url :status :res[content-length] - :response-time ms')); + +app.use(express.json({ limit: '10mb' })); +app.use(express.urlencoded({ extended: true, limit: '10mb' })); +app.use(rateLimiter); + +// ============ 前端静态文件 ============ +const frontendDist = path.join(__dirname, 'frontend'); +app.use(express.static(frontendDist)); + +// ============ Routes ============ +app.use('/api/uploads', express.static('/app/uploads')); +app.use('/api', routes); + +// ============ Health Check(增强版:覆盖 Redis / PanSou / VideoParser 状态) ============ +app.get('/health', async (_req, res) => { + const dbOk = (() => { + try { getDb(); return true; } catch { return false; } + })(); + + const redisStatus = await (async () => { + try { + const { getRedis } = require('./middleware/cache'); + const redis = getRedis(); + if (!redis) return 'disconnected'; + const pong = await redis.ping().catch(() => null); + return pong === 'PONG' ? 'connected' : 'error'; + // eslint-disable-next-line no-unused-vars + } catch { return 'unknown'; } + })(); + + const pansouStatus = await (async () => { + try { + // Native fetch available in Node 20+ + const url = (config.pansouUrl || 'http://pansou:80').replace(/\/+$/, '') + '/api/search'; + const controller = new AbortController(); + const t = setTimeout(() => controller.abort(), 3000); + const r = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ kw: 'health', page: 1 }), signal: controller.signal }); + clearTimeout(t); + return r.ok ? 'ok' : 'degraded'; + // eslint-disable-next-line no-unused-vars + } catch { return 'unreachable'; } + })(); + + const videoParserStatus = await (async () => { + try { + // Native fetch available in Node 20+ + const url = (config.videoParserUrl || 'http://video-parser:3001').replace(/\/+$/, ''); + const controller = new AbortController(); + const t = setTimeout(() => controller.abort(), 3000); + const r = await fetch(url, { signal: controller.signal }); + clearTimeout(t); + return r.ok ? 'ok' : 'degraded'; + // eslint-disable-next-line no-unused-vars + } catch { return 'unreachable'; } + })(); + + const overall = dbOk && redisStatus === 'connected' && pansouStatus === 'ok' && videoParserStatus === 'ok' + ? 'ok' + : dbOk && redisStatus !== 'unknown' && pansouStatus !== 'unreachable' + ? 'degraded' + : 'unhealthy'; + + res.json({ + version, + status: overall, + timestamp: new Date().toISOString(), + uptime: Math.floor(process.uptime()), + memory: process.memoryUsage().rss, + components: { + db: dbOk ? 'connected' : 'error', + redis: redisStatus, + pansou: pansouStatus, + videoParser: videoParserStatus, + }, + }); +}); + +// ============ PanSou Web UI Proxy ============ +app.use('/pansou', pansouWebProxy); + +// SPA fallback +app.use((req, res, next) => { + if (req.path.startsWith('/api/') || req.path === '/health') return next(); + res.sendFile(path.join(frontendDist, 'index.html'), (err) => { if (err) next(); }); +}); + +// Global error handler +app.use((err: any, _req: express.Request, res: express.Response, _next: express.NextFunction) => { + console.error('[Error]', err); + res.status(err.status || 500).json({ + error: config.nodeEnv === 'production' ? 'Internal server error' : err.message, + code: err.status || 500, + }); +}); + +// ============ Server Start ============ +async function start(): Promise { + try { + getDb(); + console.log('[DB] SQLite database initialized'); + try { + const { getSystemConfig } = require('./admin/system-config.service'); + const tz = getSystemConfig('timezone'); + if (tz) { process.env.TZ = tz; console.log(`[Config] Timezone set to: ${tz}`); } + } catch { console.warn('[Config] Could not set timezone, using default'); } + } catch (err) { + console.error('[DB] Failed to initialize database:', err); + process.exit(1); + } + + try { + const { getSystemConfig } = require('./admin/system-config.service'); + const redisUrl = process.env.REDIS_URL || getSystemConfig('redis_url'); + if (redisUrl) { + const ok = await reconnectRedis(redisUrl); + if (ok) console.log('[Redis] Connected to', redisUrl); + } else { + await connectRedis(); + } + } catch { console.warn('[Redis] Redis not available, continuing without cache'); } + + // Cleanup scheduler + const CLEANUP_INTERVAL = 10 * 60 * 1000; + setInterval(() => { checkAndRunScheduledCleanup().catch(err => console.error('[Cleanup] Scheduler error:', err.message)); }, CLEANUP_INTERVAL); + setTimeout(() => { checkAndRunScheduledCleanup().catch(err => console.error('[Cleanup] Initial check error:', err.message)); }, 30000); + + // Storage info refresh scheduler — every 60 minutes + const STORAGE_REFRESH_INTERVAL = 60 * 60 * 1000; + setInterval(() => { refreshAllStorageInfo().catch(err => console.error('[Storage] Refresh error:', err.message)); }, STORAGE_REFRESH_INTERVAL); + setTimeout(() => { refreshAllStorageInfo().catch(err => console.error('[Storage] Initial refresh error:', err.message)); }, 60000); + + const server = app.listen(config.port, () => { + console.log(`[Server] CloudSearch Backend running on port ${config.port} (${config.nodeEnv})`); + }); + + const shutdown = async (signal: string) => { + console.log(`\n[Server] Received ${signal}, shutting down gracefully...`); + server.close(async () => { await disconnectRedis(); console.log('[Server] Closed'); process.exit(0); }); + setTimeout(() => { console.error('[Server] Force shutdown'); process.exit(1); }, 10000); + }; + + process.on('SIGTERM', () => shutdown('SIGTERM')); + process.on('SIGINT', () => shutdown('SIGINT')); + process.on('uncaughtException', (err) => { console.error('[FATAL] Uncaught Exception:', err); setTimeout(() => process.exit(1), 1000); }); + process.on('unhandledRejection', (reason) => { const msg = reason instanceof Error ? reason.message : String(reason); console.error('[FATAL] Unhandled Rejection:', msg); }); +} + +start().catch((err) => { console.error('[Server] Failed to start:', err); process.exit(1); }); + +export default app; diff --git a/source_clean/src/middleware/cache.ts b/source_clean/src/middleware/cache.ts new file mode 100755 index 0000000..8d9ca39 --- /dev/null +++ b/source_clean/src/middleware/cache.ts @@ -0,0 +1,161 @@ +import Redis from 'ioredis'; + +let client: Redis | null = null; +let currentUrl: string = ''; + +export function getRedis(): Redis | null { + return client; +} + +export function getRedisClient(): Redis { + if (client) return client; + return createClient(); +} + +function createClient(url?: string): Redis { + const redisUrl = url || process.env.REDIS_URL || currentUrl || getSystemConfigRedisUrl(); + currentUrl = redisUrl; + + if (client) { + try { client.disconnect(); } catch {} + client = null; + } + + client = new Redis(redisUrl, { + maxRetriesPerRequest: 3, + retryStrategy(times: number) { + if (times > 3) return null; + return Math.min(times * 200, 2000); + }, + lazyConnect: true, + }); + + client.on('error', (err: Error) => { + console.error('[Redis] Error:', err.message); + }); + + client.on('connect', () => { + console.log('[Redis] Connected to', currentUrl); + }); + + return client; +} + +function getSystemConfigRedisUrl(): string { + try { + const { getSystemConfig } = require('./admin/system-config.service'); + return getSystemConfig('redis_url') || process.env.REDIS_URL || 'redis://redis:6379'; + } catch { + return 'redis://redis:6379'; + } +} + +export async function connectRedis(): Promise { + const redis = createClient(); + try { + await redis.connect(); + } catch (err) { + console.warn('[Redis] Connection failed, running without cache'); + } +} + +export async function reconnectRedis(url: string): Promise { + try { + if (client) { + await client.quit().catch(() => {}); + client = null; + } + const redis = createClient(url); + await redis.connect(); + console.log('[Redis] Reconnected with new URL:', url); + return true; + } catch (err) { + console.error('[Redis] Reconnect failed:', err); + return false; + } +} + +export async function disconnectRedis(): Promise { + if (client) { + await client.quit(); + client = null; + currentUrl = ''; + console.log('[Redis] Disconnected'); + } +} + +/** + * Test a Redis URL without affecting the running client. + * @returns { ok: boolean, latency: number, info?: string } + */ +export async function testRedisConnection(url: string): Promise<{ ok: boolean; latency: number; info?: string }> { + const start = Date.now(); + const testClient = new Redis(url, { + maxRetriesPerRequest: 1, + retryStrategy() { return null; }, + lazyConnect: true, + connectTimeout: 5000, + }); + try { + await testClient.connect(); + const pong = await testClient.ping(); + const latency = Date.now() - start; + await testClient.quit(); + return { ok: pong === 'PONG', latency, info: `响应时间 ${latency}ms` }; + } catch (err: any) { + try { await testClient.disconnect(); } catch {} + const latency = Date.now() - start; + return { ok: false, latency, info: err.message || '连接失败' }; + } +} + +export class RedisClient { + private redis: Redis; + + constructor() { + this.redis = getRedisClient(); + } + + async get(key: string): Promise { + try { + return await this.redis.get(key); + } catch { + return null; + } + } + + async set(key: string, value: string): Promise { + try { + await this.redis.set(key, value); + } catch { + // silently fail + } + } + + async setEx(key: string, ttl: number, value: string): Promise { + try { + await this.redis.setex(key, ttl, value); + } catch { + // silently fail + } + } + + async del(key: string): Promise { + try { + await this.redis.del(key); + } catch { + // silently fail + } + } + + async exists(key: string): Promise { + try { + const result = await this.redis.exists(key); + return result === 1; + } catch { + return false; + } + } +} + +export default RedisClient; diff --git a/source_clean/src/middleware/rate-limit.ts b/source_clean/src/middleware/rate-limit.ts new file mode 100755 index 0000000..ae9f81e --- /dev/null +++ b/source_clean/src/middleware/rate-limit.ts @@ -0,0 +1,53 @@ +import rateLimit from 'express-rate-limit'; + +/** 公开搜索接口:较宽松 */ +export const searchLimiter = rateLimit({ + windowMs: 60 * 1000, + max: 150, + standardHeaders: true, + legacyHeaders: false, + keyGenerator: (req) => req.socket.remoteAddress ?? 'unknown', + message: { error: '搜索请求过于频繁,请稍后再试', code: 429 }, +}); + +/** 管理接口(admin/*):较严格 */ +export const adminLimiter = rateLimit({ + windowMs: 60 * 1000, + max: 30, + standardHeaders: true, + legacyHeaders: false, + keyGenerator: (req) => req.socket.remoteAddress ?? 'unknown', + message: { error: '操作过于频繁,请稍后再试', code: 429 }, +}); + +/** 登录接口:极严格,防暴力破解 */ +export const loginLimiter = rateLimit({ + windowMs: 60 * 1000, + max: 5, + standardHeaders: true, + legacyHeaders: false, + keyGenerator: (req) => req.socket.remoteAddress ?? 'unknown', + message: { error: '登录尝试次数过多,请一分钟后重试', code: 429 }, +}); + +/** 转存/保存接口:中等等级 */ +export const saveLimiter = rateLimit({ + windowMs: 60 * 1000, + max: 30, + standardHeaders: true, + legacyHeaders: false, + keyGenerator: (req) => req.socket.remoteAddress ?? 'unknown', + message: { error: '转存操作过于频繁,请稍后再试', code: 429 }, +}); + +/** 默认全局限流(兜底,未匹配上述规则的路由) */ +const defaultLimiter = rateLimit({ + windowMs: 60 * 1000, + max: 100, + standardHeaders: true, + legacyHeaders: false, + keyGenerator: (req) => req.socket.remoteAddress ?? 'unknown', + message: { error: 'Too many requests, please try again later.', code: 429 }, +}); + +export default defaultLimiter; diff --git a/source_clean/src/proxy/pansou-web.ts b/source_clean/src/proxy/pansou-web.ts new file mode 100755 index 0000000..5be0fbb --- /dev/null +++ b/source_clean/src/proxy/pansou-web.ts @@ -0,0 +1,137 @@ +import { Request, Response, NextFunction } from 'express'; +// Native fetch available in Node 20+ +import { getSystemConfig } from '../admin/system-config.service'; + +const PANSOU_UPSTREAM = 'http://pansou:80'; + +// Content types that need sub_filter path rewriting +const TEXT_TYPES = ['text/html', 'application/javascript', 'text/javascript']; + +// Hop-by-hop headers that should not be forwarded +const HOP_HEADERS = new Set([ + 'host', 'connection', 'content-length', 'transfer-encoding', + 'keep-alive', 'proxy-authenticate', 'proxy-authorization', + 'te', 'trailer', 'upgrade', +]); + +/** + * Apply sub_filter string replacements to HTML/JS content. + * This matches what the nginx pansou.conf sub_filter does. + */ +function applySubFilter(text: string): string { + return text + // Replace HTML/JS path references: /api/ -> /pansou/api/ + .replace(/\/api\//g, '/pansou/api/') + // baseURL rewrite (Vue SPA config) + .replace(/baseURL:"\/api"/g, 'baseURL:"/pansou/api"') + .replace(/baseURL:'\/api'/g, "baseURL:'/pansou/api'") + // Static asset path rewrites + .replace(/src="\/assets\//g, 'src="/pansou/assets/') + .replace(/src='\/assets\//g, "src='/pansou/assets/") + .replace(/href="\/assets\//g, 'href="/pansou/assets/') + .replace(/href='\/assets\//g, "href='/pansou/assets/") + // Favicon path rewrite + .replace(/href="\/favicon\.ico/g, 'href="/pansou/favicon.ico') + .replace(/href='\/favicon\.ico/g, "href='/pansou/favicon.ico"); +} + +/** + * Express middleware that proxies /pansou/* requests to the PanSou web container. + * + * How it works: + * 1. Strips the /pansou prefix from the request path + * 2. Forwards the request to http://pansou:80/{path} + * 3. For HTML/JS responses, applies sub_filter path rewriting + * so that /api/ becomes /pansou/api/ and /assets/ becomes /pansou/assets/ + * 4. For static assets (CSS, images, fonts), pipes through as-is + * + * Controlled by system config key 'pansou_web_enabled' (true/false). + */ +export async function pansouWebProxy(req: Request, res: Response, _next: NextFunction): Promise { + try { + // Check if PanSou web is enabled + const enabled = getSystemConfig('pansou_web_enabled'); + if (enabled !== 'true') { + res.status(404).send('PanSou Web UI is disabled by administrator'); + return; + } + + // Build upstream URL: strip /pansou prefix + let targetPath = req.path; + targetPath = targetPath.replace(/^\/pansou/, '') || '/'; + + // Preserve query string + const queryIndex = req.url.indexOf('?'); + const query = queryIndex >= 0 ? req.url.substring(queryIndex) : ''; + const upstreamUrl = `${PANSOU_UPSTREAM}${targetPath}${query}`; + + // Build forwarded headers (filter out hop-by-hop headers) + const forwardHeaders: Record = {}; + for (const [key, value] of Object.entries(req.headers)) { + if (!HOP_HEADERS.has(key.toLowerCase()) && value !== undefined) { + forwardHeaders[key] = Array.isArray(value) ? value.join(', ') : value; + } + } + // Override Host header to target the upstream + forwardHeaders['Host'] = 'pansou'; + // Remove Accept-Encoding so we get uncompressed content for text rewriting + forwardHeaders['accept-encoding'] = ''; + + // Forward the request + const response = await fetch(upstreamUrl, { + method: req.method as any, + headers: forwardHeaders, + body: ['GET', 'HEAD'].includes(req.method) ? undefined : JSON.stringify(req.body), + redirect: 'manual', + signal: AbortSignal.timeout(30000), + }); + + const contentType = response.headers.get('content-type') || ''; + + // Set response status + res.status(response.status); + + // Handle redirects - rewrite Location header to include /pansou prefix + if (response.status >= 300 && response.status < 400) { + const location = response.headers.get('location'); + if (location) { + if (location.startsWith('/')) { + res.setHeader('location', '/pansou' + location); + } else { + res.setHeader('location', location); + } + } + } + + // For HTML/JS content, apply sub_filter string replacements + if (TEXT_TYPES.some(t => contentType.includes(t))) { + const text = await response.text(); + const modified = applySubFilter(text); + res.setHeader('content-type', contentType); + // Remove content-encoding since we decompressed + res.setHeader('content-length', Buffer.byteLength(modified, 'utf-8').toString()); + res.send(modified); + return; + } + + // For other content (CSS, images, fonts, etc.), pipe through as-is + const excludedHeaders = new Set([ + 'content-encoding', 'content-length', 'transfer-encoding', + 'keep-alive', 'connection', + ]); + response.headers.forEach((value, key) => { + if (!excludedHeaders.has(key.toLowerCase())) { + res.setHeader(key, value); + } + }); + + // Use buffer for reliability + const buffer = await response.arrayBuffer().then(buf => Buffer.from(buf)); + res.end(buffer); + } catch (err: any) { + console.error(`[PanSou Web Proxy] Error proxying ${req.path}:`, err.message); + if (!res.headersSent) { + res.status(502).send(`PanSou Web proxy error: ${err.message}`); + } + } +} diff --git a/source_clean/src/routes/admin.routes.ts b/source_clean/src/routes/admin.routes.ts new file mode 100644 index 0000000..439c822 --- /dev/null +++ b/source_clean/src/routes/admin.routes.ts @@ -0,0 +1,674 @@ +import { Router, Request, Response } from 'express'; +// Native fetch available in Node 20+ +import fs from "fs"; +import { execSync } from 'child_process'; +import { adminLimiter, loginLimiter } from '../middleware/rate-limit'; +import { getSaveRecords } from '../cloud/cloud.service'; +import { getCloudConfigs, getCloudConfigById, saveCloudConfig, deleteCloudConfig, getCloudConfigByType, testCloudConnection, testCloudConnectionWithCookie } from '../cloud/credential.service'; +import { dailyCheckIn, skipCheckin, getCheckinSummary, getDrivesForCheckin } from '../cloud/checkin.service'; +import { getAllCloudTypes } from '../cloud/cloud-types.service'; +import { login, authMiddleware, verifyToken, changePassword } from '../admin/auth.service'; +import { getStats } from '../admin/stats.service'; +import { getAllSystemConfigs, updateSystemConfig, updateSystemConfigs, getSystemConfig } from '../admin/system-config.service'; +import { getDb } from '../database/database'; +import { reconnectRedis, testRedisConnection } from '../middleware/cache'; +import { startQrLogin, getQrLoginStatus, cancelQrLogin } from '../cloud/qr-login.service'; +import { BaiduDriver } from '../cloud/drivers/baidu.driver'; + +const router = Router(); + +// ═══════════════════════════════════════ +// Public routes (no auth required) +// ═══════════════════════════════════════ + +/** + * POST /api/admin/login + * Admin login + */ +router.post('/admin/login', loginLimiter, (req: Request, res: Response) => { + try { + const { username, password } = req.body; + if (!username || !password) { + res.status(400).json({ error: 'Username and password are required' }); + return; + } + + const token = login(username, password); + if (!token) { + res.status(401).json({ error: 'Invalid credentials' }); + return; + } + + res.json({ token }); + } catch (err: any) { + console.error('[Login] Error:', err); + res.status(500).json({ error: err.message || 'Internal server error' }); + } +}); + +/** + * GET /api/admin/cloud-types + * List all cloud types (public, read-only). + */ +router.get('/admin/cloud-types', (_req: Request, res: Response) => { + try { + const types = getAllCloudTypes(); + res.json({ types }); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Internal server error' }); + } +}); + +// ═══════════════════════════════════════ +// QR Login routes (no auth — user not logged in yet) +// MUST be before authMiddleware! +// ═══════════════════════════════════════ + +// ===== 夸克扫码登录 ===== +router.post('/admin/quark/qr-login/start', async (_req: Request, res: Response) => { + try { + const result = await startQrLogin(); + res.json({ ok: true, ...result }); + } catch (err: any) { + res.status(500).json({ ok: false, error: err.message }); + } +}); + +router.get('/admin/quark/qr-login/:sessionId/status', async (req: Request, res: Response) => { + try { + const sessionId = req.params.sessionId as string; + const result = await getQrLoginStatus(sessionId); + res.json({ ok: true, ...result }); + } catch (err: any) { + res.status(500).json({ ok: false, error: err.message }); + } +}); + +router.post('/admin/quark/qr-login/:sessionId/cancel', async (req: Request, res: Response) => { + try { + const sessionId = req.params.sessionId as string; + await cancelQrLogin(sessionId); + res.json({ ok: true }); + } catch (err: any) { + res.status(500).json({ ok: false, error: err.message }); + } +}); + +// ===== 百度扫码登录 ===== +router.post("/admin/baidu/qr-login/start", async (_req: Request, res: Response) => { + try { + const result = await BaiduDriver.startQrLogin(); + res.json({ ok: true, ...result }); + } catch (err: any) { + res.status(500).json({ ok: false, error: err.message }); + } +}); + +router.get("/admin/baidu/qr-login/:sessionId/status", async (req: Request, res: Response) => { + try { + const sessionId = req.params.sessionId as string; + const result: any = await BaiduDriver.getQrLoginStatus(sessionId); + // Map to frontend-expected format (frontend reads data.cookie) + res.json({ + ok: true, + status: result.status, + cookie: result.cookie || result.access_token || "", + nickname: result.nickname || "", + storage_used: result.storage_used || "", + storage_total: result.storage_total || "", + }); + } catch (err: any) { + res.status(500).json({ ok: false, error: err.message }); + } +}); + +router.post("/admin/baidu/qr-login/:sessionId/cancel", async (req: Request, res: Response) => { + try { + BaiduDriver.cancelQrLogin(req.params.sessionId as string); + } catch {} + res.json({ ok: true }); +}); + +// ═══════════════════════════════════════ +// Auth wall — all routes below require JWT +// ═══════════════════════════════════════ +router.use('/admin', authMiddleware); + +// ═══════════════════════════════════════ +// Cloud Configs CRUD +// ═══════════════════════════════════════ + +/** GET /api/admin/cloud-configs — list all cloud configs */ +router.get('/admin/cloud-configs', (_req: Request, res: Response) => { + try { + const configs = getCloudConfigs(); + res.json(configs); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Failed to fetch cloud configs' }); + } +}); + +/** POST /api/admin/cloud-configs — create or smart-replace a cloud config */ +router.post('/admin/cloud-configs', (req: Request, res: Response) => { + try { + const data = req.body; + if (!data.cloud_type) { + res.status(400).json({ error: 'cloud_type is required' }); + return; + } + // Normalize is_active: frontend sends boolean, SQLite needs 0/1 + if (typeof data.is_active === 'boolean') data.is_active = data.is_active ? 1 : 0; + const saved = saveCloudConfig(data); + res.json(saved); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Failed to save cloud config' }); + } +}); + +/** PUT /api/admin/cloud-configs/:id — update an existing cloud config */ +router.put('/admin/cloud-configs/:id', (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id as string); + const existing = getCloudConfigById(id); + if (!existing) { + res.status(404).json({ error: 'Cloud config not found' }); + return; + } + const saved = saveCloudConfig({ ...req.body, id }); + res.json(saved); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Failed to update cloud config' }); + } +}); + +/** DELETE /api/admin/cloud-configs/:id */ +router.delete('/admin/cloud-configs/:id', (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id as string); + const ok = deleteCloudConfig(id); + if (!ok) { + res.status(404).json({ error: 'Cloud config not found' }); + return; + } + res.json({ success: true }); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Failed to delete cloud config' }); + } +}); + +/** POST /api/admin/cloud-configs/:type/test — test cloud connection (by type or id) */ +router.post('/admin/cloud-configs/:type/test', async (req: Request, res: Response) => { + try { + const type = req.params.type as string; + const { cookie, id } = req.body; + + // If cookie is provided directly, test with it (for new configs not yet saved) + if (cookie) { + const result = await testCloudConnectionWithCookie(type, cookie); + res.json(result); + return; + } + + // Otherwise test by config id + if (id) { + const result = await testCloudConnection(parseInt(id)); + res.json(result); + return; + } + + res.status(400).json({ success: false, message: 'Provide either cookie or id' }); + } catch (err: any) { + res.status(500).json({ success: false, message: err.message || 'Connection test failed' }); + } +}); + +// ═══════════════════════════════════════ +// Daily Check-in +// ═══════════════════════════════════════ + +/** POST /api/admin/cloud-configs/:id/checkin */ +router.post('/admin/cloud-configs/:id/checkin', async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id as string); + const result = await dailyCheckIn(id); + res.json(result); + } catch (err: any) { + res.status(500).json({ success: false, message: err.message || 'Check-in failed' }); + } +}); + +/** POST /api/admin/cloud-configs/:id/skip-checkin */ +router.post('/admin/cloud-configs/:id/skip-checkin', async (req: Request, res: Response) => { + try { + const id = parseInt(req.params.id as string); + const ok = skipCheckin(id); + res.json({ success: ok }); + } catch (err: any) { + res.status(500).json({ success: false, message: err.message || 'Skip check-in failed' }); + } +}); + +/** POST /api/admin/cloud-configs/checkin-all */ +router.post('/admin/cloud-configs/checkin-all', async (_req: Request, res: Response) => { + try { + const drives = getDrivesForCheckin(); + const results: { id: number; nickname: string; success: boolean; message: string }[] = []; + let total = 0; + for (const drive of drives) { + total++; + try { + const result = await dailyCheckIn(drive.id); + results.push({ id: drive.id, nickname: drive.nickname || '', success: result.success, message: result.message }); + } catch (err: any) { + results.push({ id: drive.id, nickname: drive.nickname || '', success: false, message: err.message || 'Check-in failed' }); + } + } + res.json({ total, results }); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Check-in all failed' }); + } +}); + +/** GET /api/admin/cloud-configs/checkin-summary */ +router.get('/admin/cloud-configs/checkin-summary', (_req: Request, res: Response) => { + try { + const summary = getCheckinSummary(); + res.json(summary); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Failed to get check-in summary' }); + } +}); + +// ═══════════════════════════════════════ +// Stats +// ═══════════════════════════════════════ + +/** GET /api/admin/stats */ +router.get('/admin/stats', (req: Request, res: Response) => { + try { + const days = req.query.days ? parseInt(req.query.days as string) : 7; + const stats = getStats(days); + res.json(stats); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Failed to get stats' }); + } +}); + +// ═══════════════════════════════════════ +// Save Records (转存日志) +// ═══════════════════════════════════════ + +/** GET /api/admin/save-records */ +router.get('/admin/save-records', (req: Request, res: Response) => { + try { + const page = parseInt(req.query.page as string) || 1; + const pageSize = parseInt(req.query.pageSize as string) || 20; + const startDate = req.query.startDate as string | undefined; + const endDate = req.query.endDate as string | undefined; + const status = req.query.status as string | undefined; + const sourceType = req.query.sourceType as string | undefined; + const keyword = req.query.keyword as string | undefined; + const result = getSaveRecords(page, pageSize, startDate, endDate, status, sourceType, keyword); + res.json(result); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Failed to get save records' }); + } +}); + +// ═══════════════════════════════════════ +// System Configs +// ═══════════════════════════════════════ + +/** GET /api/admin/system-configs */ +router.get('/admin/system-configs', (_req: Request, res: Response) => { + try { + const configs = getAllSystemConfigs(); + res.json(configs); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Failed to get system configs' }); + } +}); + +/** PUT /api/admin/system-configs — batch update */ +router.put('/admin/system-configs', (req: Request, res: Response) => { + try { + const { entries } = req.body; + if (!entries || !Array.isArray(entries)) { + res.status(400).json({ error: 'entries array is required' }); + return; + } + updateSystemConfigs(entries); + res.json({ success: true }); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Failed to update system configs' }); + } +}); + +// ═══════════════════════════════════════ +// Cloud Types Toggle +// ═══════════════════════════════════════ + +/** PUT /api/admin/cloud-types — toggle cloud type enabled/disabled */ +router.put('/admin/cloud-types', (req: Request, res: Response) => { + try { + const { type, enabled } = req.body; + if (!type) { + res.status(400).json({ error: 'type is required' }); + return; + } + const db = getDb(); + db.prepare( + `INSERT INTO system_configs (key, value, description) VALUES (?, ?, ?) + ON CONFLICT(key) DO UPDATE SET value = excluded.value` + ).run(`cloud_type_${type}_enabled`, enabled ? '1' : '0', `Enable/disable ${type} cloud drive`); + res.json({ success: true }); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Failed to toggle cloud type' }); + } +}); + +// ═══════════════════════════════════════ +// Change Password +// ═══════════════════════════════════════ + +/** POST /api/admin/change-password */ +router.post('/admin/change-password', (req: Request, res: Response) => { + try { + const { oldPassword, newPassword } = req.body; + if (!oldPassword || !newPassword) { + res.status(400).json({ error: 'Both old and new passwords are required' }); + return; + } + // Get username from JWT + const authHeader = req.headers.authorization || ''; + const token = authHeader.replace('Bearer ', ''); + const payload = verifyToken(token); + if (!payload) { + res.status(401).json({ error: 'Invalid token' }); + return; + } + const result = changePassword(payload.username, oldPassword, newPassword); + res.json(result); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Failed to change password' }); + } +}); + +// ═══════════════════════════════════════ +// DB Status +// ═══════════════════════════════════════ + +/** GET /api/admin/db-status */ +router.get('/admin/db-status', async (_req: Request, res: Response) => { + try { + const dbFile = getSystemConfig('db_path') || ''; + let dbSize = 'N/A'; + if (dbFile) { + try { + const stats = fs.statSync(dbFile); + dbSize = (stats.size / 1024 / 1024).toFixed(2) + ' MB'; + } catch {} + } + + const db = getDb(); + const counts = { + save_records: (db.prepare('SELECT COUNT(*) as c FROM save_records').get() as any)?.c || 0, + search_stats: (db.prepare('SELECT COUNT(*) as c FROM search_stats').get() as any)?.c || 0, + system_configs: (db.prepare('SELECT COUNT(*) as c FROM system_configs').get() as any)?.c || 0, + cloud_configs: (db.prepare('SELECT COUNT(*) as c FROM cloud_configs').get() as any)?.c || 0, + content_cache: (db.prepare('SELECT COUNT(*) as c FROM content_cache').get() as any)?.c || 0, + }; + + // Redis status + let redis_status = 'disconnected'; + let redis_url = getSystemConfig('redis_url') || ''; + try { + const testResult = await testRedisConnection(redis_url); + redis_status = testResult.ok ? 'connected' : 'disconnected'; + } catch { + redis_status = 'error'; + } + + res.json({ + db_size: dbSize, + db_path: dbFile, + ...counts, + redis_status, + redis_url, + }); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Failed to get DB status' }); + } +}); + +// ═══════════════════════════════════════ +// Test Redis Connection +// ═══════════════════════════════════════ + +/** POST /api/admin/test-redis */ +router.post('/admin/test-redis', (req: Request, res: Response) => { + try { + const { url } = req.body; + if (!url) { + res.status(400).json({ ok: false, info: 'Redis URL is required' }); + return; + } + const result = testRedisConnection(url); + res.json(result); + } catch (err: any) { + res.status(500).json({ ok: false, info: err.message || 'Redis test failed' }); + } +}); + +// ═══════════════════════════════════════ +// Test External Service +// ═══════════════════════════════════════ + +/** POST /api/admin/test-external-service */ +router.post('/admin/test-external-service', async (req: Request, res: Response) => { + try { + const { type, url, token } = req.body; + const start = Date.now(); + + switch (type) { + case 'pansou': { + const pansouUrl = url || getSystemConfig('pansou_url') || ''; + if (!pansouUrl) { + res.json({ ok: false, info: 'PanSou URL not configured' }); + return; + } + const response = await fetch(pansouUrl + '/api/health', { signal: AbortSignal.timeout(8000) }); + const data: any = await response.json(); + const latency = Date.now() - start; + res.json({ + ok: response.ok && data?.status === 'ok', + latency, + info: response.ok ? `连接成功 (${data?.channels_count || 0} 频道, ${data?.plugin_count || 0} 插件)` : '连接失败', + }); + break; + } + case 'video_parser': { + const parserUrl = url || getSystemConfig('video_parser_url') || ''; + if (!parserUrl) { + res.json({ ok: false, info: 'Video Parser URL not configured' }); + return; + } + const response = await fetch(parserUrl + '/health', { signal: AbortSignal.timeout(8000) }); + const latency = Date.now() - start; + res.json({ + ok: response.ok, + latency, + info: response.ok ? '连接成功' : `HTTP ${response.status}`, + }); + break; + } + case 'tmdb': { + const tmdbToken = token || getSystemConfig('tmdb_api_key') || ''; + if (!tmdbToken) { + res.json({ ok: false, info: 'TMDB API Key not configured' }); + return; + } + const response = await fetch('https://api.themoviedb.org/3/configuration', { + headers: { Authorization: `Bearer ${tmdbToken}` }, + signal: AbortSignal.timeout(8000), + }); + const latency = Date.now() - start; + res.json({ + ok: response.ok, + latency, + info: response.ok ? '连接成功' : `HTTP ${response.status}`, + }); + break; + } + case 'proxy': { + const proxyUrl = url || getSystemConfig('proxy_url') || ''; + if (!proxyUrl) { + res.json({ ok: false, info: 'Proxy URL not configured' }); + return; + } + const response = await fetch(proxyUrl, { signal: AbortSignal.timeout(8000) }); + const latency = Date.now() - start; + res.json({ + ok: response.ok, + latency, + info: response.ok ? '连接成功' : `HTTP ${response.status}`, + }); + break; + } + case 'ip_geo': { + const geoUrl = url || getSystemConfig('ip_geo_api_url') || ''; + if (!geoUrl) { + res.json({ ok: false, info: '请先输入 IP 归属地查询 API 地址' }); + return; + } + const testUrl = geoUrl.replace('{ip}', '8.8.8.8'); + const response = await fetch(testUrl, { signal: AbortSignal.timeout(8000) }); + const data: any = await response.json(); + const latency = Date.now() - start; + const valid = !!(data?.country || data?.region || data?.city || data?.countryCode); + res.json({ ok: valid, latency, info: valid ? '连接成功' : '响应格式不符' }); + break; + } + default: + res.json({ ok: false, info: `Unknown service type: ${type}` }); + } + } catch (err: any) { + res.status(500).json({ ok: false, info: err.message || 'External service test failed' }); + } +}); + +// ═══════════════════════════════════════ +// Pansou Info & Update +// ═══════════════════════════════════════ + +/** GET /api/admin/pansou-info — pansou health + version + update check */ +router.get('/admin/pansou-info', async (_req: Request, res: Response) => { + try { + const baseUrl = getSystemConfig('pansou_url') || ''; + if (!baseUrl) { + res.json({ status: 'disconnected', channelCount: 0, pluginCount: 0, diskCount: 0, version: '', hasUpdate: false, latestVersion: '' }); + return; + } + + // Fetch PanSou health + const healthUrl = baseUrl + '/api/health'; + const response = await fetch(healthUrl, { signal: AbortSignal.timeout(8000) }); + const healthData: any = await response.json(); + const channelCount = healthData.channels_count || 0; + const pluginCount = healthData.plugin_count || 0; + + // Derive disk count from channel names + const driveKeywords = ['aliyun', 'baidu', 'quark', '115', 'pikpak', 'xunlei', 'uc', '123', '139', '189', 'tianyi', 'netease']; + const drives = new Set(); + for (const ch of (healthData.channels || [])) { + for (const kw of driveKeywords) { + if (ch.toLowerCase().includes(kw)) { drives.add(kw); break; } + } + } + const diskCount = drives.size || 5; + + // Get local version from docker label + let version = ''; + let hasUpdate = false; + let latestVersion = ''; + try { + const created = execSync( + `docker inspect CloudSearch_PanSou --format '{{index .Config.Labels "org.opencontainers.image.created"}}'`, + { timeout: 5000, encoding: 'utf8' } + ).trim(); + version = created ? created.slice(0, 10) : ''; + + // Check update cache + const cacheFile = '/tmp/pansou-update-cache.json'; + let cache: any = null; + try { cache = JSON.parse(fs.readFileSync(cacheFile, 'utf8') || 'null'); } catch {} + const threeDays = 3 * 24 * 3600 * 1000; + + if (!cache || (Date.now() - cache.checkedAt) > threeDays) { + // Check GHCR for latest version + try { + const tokenRes = await fetch( + 'https://ghcr.io/token?scope=repository:fish2018/pansou-web:pull&service=ghcr.io' + ); + const ghcrToken = (await tokenRes.json() as any).token; + const manifestRes = await fetch( + 'https://ghcr.io/v2/fish2018/pansou-web/manifests/latest', + { headers: { Authorization: `Bearer ${ghcrToken}`, Accept: 'application/vnd.oci.image.index.v1+json, application/vnd.docker.distribution.manifest.list.v2+json' } } + ); + const manifestList: any = await manifestRes.json(); + const amd64 = manifestList.manifests?.find((m: any) => m.platform?.architecture === 'amd64' && m.platform?.os === 'linux'); + if (amd64) { + const blobRes = await fetch( + `https://ghcr.io/v2/fish2018/pansou-web/manifests/${amd64.digest}`, + { headers: { Authorization: `Bearer ${ghcrToken}`, Accept: 'application/vnd.oci.image.manifest.v1+json' } } + ); + const blobData: any = await blobRes.json(); + const cfgDigest = blobData.config?.digest; + if (cfgDigest) { + const cfgRes = await fetch( + `https://ghcr.io/v2/fish2018/pansou-web/blobs/${cfgDigest}`, + { headers: { Authorization: `Bearer ${ghcrToken}` } } + ); + const cfgData: any = await cfgRes.json(); + const remoteCreated = cfgData.config?.Labels?.['org.opencontainers.image.created']; + if (remoteCreated) { + latestVersion = remoteCreated.slice(0, 10); + if (version && latestVersion !== version) hasUpdate = true; + } + } + } + } catch {} + fs.writeFileSync(cacheFile, JSON.stringify({ checkedAt: Date.now(), hasUpdate, latestVersion })); + } else { + hasUpdate = cache.hasUpdate; + latestVersion = cache.latestVersion; + } + } catch {} + + res.json({ + status: response.ok ? 'connected' : 'disconnected', + channelCount, + pluginCount, + diskCount, + version, + hasUpdate, + latestVersion, + }); + } catch (err: any) { + res.json({ status: 'error', channelCount: 0, pluginCount: 0, diskCount: 0, version: '', hasUpdate: false, latestVersion: '', error: err.message }); + } +}); + +/** POST /api/admin/update-pansou — pull latest pansou image + recreate container */ +router.post('/admin/update-pansou', async (_req: Request, res: Response) => { + try { + execSync('docker pull ghcr.io/fish2018/pansou-web:latest', { timeout: 120000 }); + execSync('docker compose -p cloudsearch -f /app/docker-compose.yml up -d pansou', { timeout: 60000 }); + try { fs.unlinkSync('/tmp/pansou-update-cache.json'); } catch {} + res.json({ success: true, message: 'PanSou 更新成功' }); + } catch (err: any) { + res.status(500).json({ success: false, error: err.message || 'PanSou 更新失败' }); + } +}); + +export default router; diff --git a/source_clean/src/routes/cleanup.routes.ts b/source_clean/src/routes/cleanup.routes.ts new file mode 100644 index 0000000..da29bf3 --- /dev/null +++ b/source_clean/src/routes/cleanup.routes.ts @@ -0,0 +1,87 @@ +import { Router, Request, Response } from 'express'; +import { runFullCleanup, emptyAllTrash } from '../cloud/cleanup.service'; + +const router = Router(); + +// ============ Cleanup & Storage Management ============ + +/** + * POST /api/admin/cleanup/run + * Manually trigger a cleanup cycle: + * - Trash old date folders from cloud drives + * - Delete old save_records + * - Empty recycle bin + */ +router.post('/admin/cleanup/run', async (_req: Request, res: Response) => { + try { + const stats = await runFullCleanup(); + res.json({ + success: stats.errors.length === 0, + files_trashed: stats.filesTrashed, + logs_deleted: stats.logsDeleted, + trash_emptied: stats.trashEmptied, + errors: stats.errors, + message: stats.errors.length === 0 + ? `✅ 清理完成:移入回收站 ${stats.filesTrashed} 个文件夹,删除 ${stats.logsDeleted} 条日志,清空回收站${stats.trashEmptied ? '✓' : '-'}` + : `清理完成,但有 ${stats.errors.length} 个错误`, + }); + } catch (err: any) { + res.status(500).json({ success: false, error: err.message }); + } +}); + +/** + * POST /api/admin/cleanup/empty-trash + * Empty recycle bin for all cloud drives (permanently delete, frees space). + */ +router.post('/admin/cleanup/empty-trash', async (_req: Request, res: Response) => { + try { + const result = await emptyAllTrash(); + res.json({ + success: result.errors.length === 0, + emptied: result.emptied, + errors: result.errors, + message: result.emptied + ? '✅ 回收站已清空,存储空间已释放' + : (result.errors.length > 0 ? `清空回收站部分失败:${result.errors.join('; ')}` : '没有可清空的网盘'), + }); + } catch (err: any) { + res.status(500).json({ success: false, error: err.message }); + } +}); + + +/** + * Extract genre tags from search result titles. + */ +function extractTagsFromResults(results: any[], keyword: string): string[] { + const tags: string[] = []; + if (keyword) tags.push(keyword); + + const genreKeywords: Record = { + '动画': '动画', '动漫': '动画', '国漫': '国漫', + '剧场版': '剧场版', '年番': '年番', + '动作': '动作', '奇幻': '奇幻', '玄幻': '玄幻', + '仙侠': '仙侠', '古装': '古装', '爱情': '爱情', + '科幻': '科幻', '喜剧': '喜剧', '悬疑': '悬疑', + '恐怖': '恐怖', '惊悚': '惊悚', '剧情': '剧情', + '冒险': '冒险', '战争': '战争', '武侠': '武侠', + '纪录': '纪录片', '真人': '真人秀', '短片': '短片', + }; + + const seen = new Set(); + for (const r of results) { + const title = (r.title || r.note || '') as string; + for (const [key, val] of Object.entries(genreKeywords)) { + if (title.includes(key) && !seen.has(val)) { + seen.add(val); + tags.push(val); + } + } + } + + return tags; +} + + +export default router; \ No newline at end of file diff --git a/source_clean/src/routes/index.ts b/source_clean/src/routes/index.ts new file mode 100755 index 0000000..7a83269 --- /dev/null +++ b/source_clean/src/routes/index.ts @@ -0,0 +1,14 @@ +import { Router } from 'express'; +import searchRoutes from './search.routes'; +import adminRoutes from './admin.routes'; +import uploadRoutes from './upload.routes'; +import cleanupRoutes from './cleanup.routes'; + +const router = Router(); + +router.use(searchRoutes); +router.use(adminRoutes); +router.use(uploadRoutes); +router.use(cleanupRoutes); + +export default router; diff --git a/source_clean/src/routes/search.routes.ts b/source_clean/src/routes/search.routes.ts new file mode 100644 index 0000000..94c7dd1 --- /dev/null +++ b/source_clean/src/routes/search.routes.ts @@ -0,0 +1,630 @@ +import { Router, Request, Response } from 'express'; +// Native fetch available in Node 20+ +import { searchLimiter, saveLimiter } from '../middleware/rate-limit'; +import { detectIntent } from '../intent/intent.service'; +import { search, applyTitleFilter } from '../search/search.service'; +import { getRankings, getHotKeywords, getCategorizedRankings } from '../search/rankings.service'; +import { parseVideo } from '../video/video.service'; +import { saveFromShare } from '../cloud/cloud.service'; +import { getEnabledCloudTypeSet } from '../cloud/cloud-types.service'; +import { getSystemConfig } from '../admin/system-config.service'; +import { verifyToken } from '../admin/auth.service'; +import { LinkValidator } from '../validation/link-validator.service'; +import { getContentInfo } from '../content/content.service'; +import { detectCloudType } from '../config/cloud-labels'; +import { CLOUD_LABELS, CLOUD_COLORS } from '../config/cloud-labels'; +import { getDb } from '../database/database'; + +const router = Router(); + +// ============ Search & Query ============ + +/** + * POST /api/query + * Intent recognition + execution + */ +router.post('/query', searchLimiter, async (req: Request, res: Response) => { + try { + const { input, q } = req.body; + const query = input || q; + if (!query || typeof query !== 'string') { + res.status(400).json({ error: 'Input is required' }); + return; + } + + const intent = detectIntent(query); + const ip = req.ip || req.socket.remoteAddress || ''; + + switch (intent.type) { + case 'SEARCH': { + const result = await search(intent.cleanInput, 1, ip); + + // Pass through: use all results, group by cloud type + const allResults = result.results || []; + + // Transform to frontend-friendly format + let formatted = (allResults || []).map((item: any, idx: number) => ({ + id: `search_${idx}`, + title: filterTitle(item.title || item.content || ''), + description: item.content || '', + share_url: item.url || '', + cloud_type: detectCloudType(item.url || ''), + file_size: '', + update_time: item.datetime || '', + source: item.source || '', + file_id: '', + cover: Array.isArray(item.images) && item.images.length > 0 ? item.images[0] : '', + password: item.password || '', + })); + + // Filter out expired/invalid links + formatted = formatted.filter(r => !r.share_url || !isExpiredShareLink(r.share_url)); + + // Filter by enabled cloud types (admin-configurable per-type toggle) + // Skip filter if search_all_channels is enabled + const searchAllChannels = getSystemConfig('search_all_channels') === 'true'; + if (!searchAllChannels) { + const enabledSet = getEnabledCloudTypeSet(); + formatted = formatted.filter(r => !r.cloud_type || enabledSet.has(r.cloud_type)); + } + + const contentQuery = intent.cleanInput || query; + const contentInfo = await getContentInfo(contentQuery).catch(() => null); + const extractedTags = extractTagsFromResults(formatted, contentQuery); + const linkValidationEnabled = getSystemConfig('link_validation_enabled') !== 'false'; + + // Set up streaming response (NDJSON) + res.setHeader('Content-Type', 'application/x-ndjson'); + res.setHeader('X-Accel-Buffering', 'no'); + res.setHeader('Cache-Control', 'no-cache'); + res.setHeader('Connection', 'keep-alive'); + + // 0. Send searching signal immediately so frontend shows feedback + res.write(JSON.stringify({ type: 'searching' }) + '\n'); + + // 0.5 Query local DB for previously saved resources matching keyword + const savedResults = getSavedResources(intent.cleanInput); + if (savedResults.length > 0) { + res.write(JSON.stringify({ + type: 'saved', + results: savedResults, + total: savedResults.length, + }) + '\n'); + } + + // 1. Send stats immediately + const fallbackImage = getSystemConfig('search_fallback_image') || ''; + const siteLogo = getSystemConfig('site_logo') || ''; + const siteNameInStats = getSystemConfig('site_name') || 'CloudSearch'; + const siteDisclaimer = getSystemConfig('site_disclaimer') || ''; + const siteMarquee = getSystemConfig('site_marquee') || ''; + const statsPayload = { + type: 'stats', + total: formatted.length, + channels: groupResultsByChannel(formatted, (item: any) => item.cloud_type), + content_info: contentInfo, + content_tags: extractedTags, + link_validation: linkValidationEnabled, + fallback_image: fallbackImage, + site_logo: siteLogo, + site_name: siteNameInStats, + site_disclaimer: siteDisclaimer, + site_marquee: siteMarquee, + }; + res.write(JSON.stringify(statsPayload) + '\n'); + + // 2. Validate links — per-type grouping, newest-first, per-type cap from config + if (linkValidationEnabled) { + const validator = new LinkValidator(); + const resultLimit = parseInt(getSystemConfig('search_result_limit') || '10', 10); + const MAX_VALID_PER_TYPE = Math.min(100, Math.max(1, resultLimit)); // configurable, 1-100 + const MAX_TOTAL_VALID = MAX_VALID_PER_TYPE * 6; // up to 6 cloud types + const pool = validator['pool']; // concurrency: 10 + + // Group formatted results by cloud_type, then sort each group by time desc + const byType: Record = {}; + for (const item of formatted) { + const ct = item.cloud_type || 'others'; + if (!byType[ct]) byType[ct] = []; + byType[ct].push(item); + } + + // Sort each group by update_time descending (newest first) + for (const ct of Object.keys(byType)) { + byType[ct].sort((a: any, b: any) => { + const ta = a.update_time || ''; + const tb = b.update_time || ''; + if (!ta && !tb) return 0; + if (!ta) return 1; + if (!tb) return -1; + return tb.localeCompare(ta); + }); + } + + // Build a round-robin validation queue: interleave items from each type + // to give fair priority across all cloud types + const typeOrder = ['quark', 'baidu', 'aliyun', '115', 'tianyi', '123pan', 'uc', 'xunlei', 'pikpak', 'magnet', 'ed2k', 'others']; + const sortedTypes = typeOrder.filter(ct => byType[ct] && byType[ct].length > 0); + // Sort by total count descending so types with more results get more validation slots + sortedTypes.sort((a, b) => (byType[b]?.length || 0) - (byType[a]?.length || 0)); + + const validationQueue: { item: any; type: string }[] = []; + const maxLen = Math.max(...sortedTypes.map(ct => byType[ct].length), 0); + for (let i = 0; i < maxLen; i++) { + for (const ct of sortedTypes) { + if (i < byType[ct].length) { + validationQueue.push({ item: byType[ct][i], type: ct }); + } + } + } + + const validResults: any[] = []; + const perTypeValid: Record = {}; + let totalValid = 0; + let totalInvalid = 0; + let totalChecked = 0; + const unknownItemIds: number[] = []; // IDs that got 'unknown' from PanSou + + // Pass 1: PanSou-only validation + const tasks = validationQueue.map(({ item, type }) => pool.run(async () => { + // Stop if we've hit overall cap or per-type cap + if (totalValid >= MAX_TOTAL_VALID) return; + if ((perTypeValid[type] || 0) >= MAX_VALID_PER_TYPE) return; + + totalChecked++; + try { + const vr = await validator.validate(item.share_url, item.cloud_type); + // 'unknown' = PanSou couldn't determine → treat as valid for now + if (vr.status === 'valid' || vr.status === 'unknown') { + if (vr.status === 'unknown') { + unknownItemIds.push(item.id); + } + if (totalValid < MAX_TOTAL_VALID && (perTypeValid[type] || 0) < MAX_VALID_PER_TYPE) { + validResults.push(item); + perTypeValid[type] = (perTypeValid[type] || 0) + 1; + totalValid++; + res.write(JSON.stringify({ type: 'result', id: item.id, valid: true, message: vr.message }) + '\n'); + } + } else { + totalInvalid++; + res.write(JSON.stringify({ type: 'result', id: item.id, valid: false, message: vr.message }) + '\n'); + } + } catch { + if (totalValid < MAX_TOTAL_VALID && (perTypeValid[type] || 0) < MAX_VALID_PER_TYPE) { + validResults.push(item); + perTypeValid[type] = (perTypeValid[type] || 0) + 1; + totalValid++; + } + res.write(JSON.stringify({ type: 'result', id: item.id, valid: true }) + '\n'); + } + })); + await Promise.all(tasks); + + // Pass 2: If PanSou didn't provide enough valid results, validate + // uncertain items with local fallback (external API calls) + if (totalValid < MAX_TOTAL_VALID && unknownItemIds.length > 0) { + const unknownItems = validationQueue.filter(({ item }) => unknownItemIds.includes(item.id)); + for (const { item, type } of unknownItems) { + if (totalValid >= MAX_TOTAL_VALID) break; + if ((perTypeValid[type] || 0) >= MAX_VALID_PER_TYPE) break; + try { + const vr = await validator.validateWithLocalFallback(item.share_url, item.cloud_type); + if (vr.status === 'valid') { + // Already in validResults from pass 1, just count it again + perTypeValid[type] = (perTypeValid[type] || 0) + 1; + totalValid++; + res.write(JSON.stringify({ type: 'result', id: item.id, valid: true, message: vr.message + ' (本地确认)' }) + '\n'); + } else if (vr.status === 'invalid') { + // Remove from validResults — was previously included as unknown + const idx = validResults.findIndex(r => r.id === item.id); + if (idx >= 0) { + validResults.splice(idx, 1); + perTypeValid[type] = Math.max(0, (perTypeValid[type] || 1) - 1); + totalValid--; + } + totalInvalid++; + res.write(JSON.stringify({ type: 'result', id: item.id, valid: false, message: vr.message + ' (本地确认失效)' }) + '\n'); + } + } catch { + // Keep as-is (already treated as valid from pass 1) + } + } + } + + const skippedCount = validationQueue.length - totalChecked; + + res.write(JSON.stringify({ + type: 'complete', + results: validResults, + channels: groupResultsByChannel(validResults, (item: any) => item.cloud_type), + total: validResults.length, + filtered: totalInvalid, + per_type: perTypeValid, + skipped: skippedCount, + }) + '\n'); + } else { + // No validation - just send all results + res.write(JSON.stringify({ + type: 'complete', + results: formatted, + channels: groupResultsByChannel(formatted, (item: any) => item.cloud_type), + total: formatted.length, + filtered: 0, + }) + '\n'); + } + + res.end(); + break; + } + case 'VIDEO_PARSE': { + const videoInfo = await parseVideo(intent.cleanInput); + res.json({ intent: intent.type, platform: intent.platform, data: videoInfo }); + break; + } + case 'CLOUD_SAVE': { + const result = await saveFromShare(intent.cleanInput, intent.platform || '', undefined, req.ip); + res.json({ intent: intent.type, platform: intent.platform, ...result }); + break; + } + default: + res.status(400).json({ error: 'Unknown intent type' }); + } + } catch (err: any) { + console.error('[Query] Error:', err); + res.status(500).json({ error: err.message || 'Internal server error' }); + } +}); + +/** + * GET /api/search + * Search with optional link validation filtering + */ +router.get('/search', searchLimiter, async (req: Request, res: Response) => { + try { + const keyword = (req.query.q || req.query.kw) as string; + const page = parseInt(req.query.page as string || '1', 10); + const ip = req.ip || req.socket.remoteAddress || ''; + + if (!keyword) { + res.status(400).json({ error: 'Query parameter "q" is required' }); + return; + } + + const result = await search(keyword, page, ip); + + // Pass through: use all results + const allResults = result.results || []; + + // Transform to frontend format + let formatted = (allResults || []).map((item: any) => ({ + id: item.id || '', + title: filterTitle(item.title || item.content || ''), + description: item.content || item.snippet || '', + share_url: item.url || '', + cloud_type: detectCloudType(item.url || ''), + file_size: '', + source: item.source || '', + datetime: item.datetime || '', + cover: Array.isArray(item.images) && item.images.length > 0 ? item.images[0] : '', + password: item.password || '', + })); + + // Filter out expired/invalid links + const expiredCount = formatted.filter(r => r.share_url && isExpiredShareLink(r.share_url)).length; + formatted = formatted.filter(r => !r.share_url || !isExpiredShareLink(r.share_url)); + + // Filter by enabled cloud types (admin-configurable per-type toggle) + const enabledSet = getEnabledCloudTypeSet(); + formatted = formatted.filter(r => !r.cloud_type || enabledSet.has(r.cloud_type)); + + // Return results immediately without blocking validation + const channels = groupResultsByChannel(formatted, (item: any) => + detectCloudType(item.url || '') + ); + + res.json({ + results: formatted, + channels, + total: formatted.length, + filtered: expiredCount, + link_validation: false, + }); + } catch (err: any) { + console.error('[Search] Error:', err); + res.status(500).json({ error: err.message || 'Internal server error' }); + } +}); + +/** + * Load title filter rules from DB and apply to a title. + */ +function filterTitle(title: string): string { + const rules = getSystemConfig('title_filter_rules') || ''; + return applyTitleFilter(title, rules); +} + +// detectCloudType is imported from config/cloud-labels + +// 检测失效的分享链接(支持多种模式) +function isExpiredShareLink(url: string): boolean { + if (!url) return false; + + // 空链接/纯片段(无实际链接内容) + if (url.startsWith('#') || url.length < 10) return true; + + // PanSou 有时返回残缺链接如 "/s/xxx" 或只有 "#/list/share" + if (url.startsWith('/') && !url.startsWith('//') && !url.startsWith('http')) return true; + + // 夸克链接格式校验 + if (url.includes('pan.quark.cn')) { + const baseUrl = url.split('#')[0]; // 去掉 hash 路由片段 + // 有效格式必须是 pan.quark.cn/s/xxxxxx + if (!/pan\.quark\.cn\/s\/[a-zA-Z0-9]+/.test(baseUrl)) return true; + } + + // 百度网盘常见失效格式 + if (url.includes('pan.baidu.com') && /share\/init\?surl=$/.test(url)) return true; + + // 阿里云盘失效格式(短到异常的链接) + if (url.includes('aliyundrive.com') && url.length < 30) return true; + + return false; +} + +/** + * Group search results into channels by cloud type. + * Each channel: { cloud_type, label, color, count, items } + */ + +function groupResultsByChannel(results: any[], getCloudType?: (item: any) => string): any[] { + const groups: Record = {}; + const order: Record = { + quark: 1, baidu: 2, aliyun: 3, '115': 4, + tianyi: 5, '123pan': 6, uc: 7, xunlei: 8, + pikpak: 9, magnet: 10, ed2k: 11, others: 12, + }; + for (const item of results) { + const ct = getCloudType ? getCloudType(item) : (item.source || detectCloudType(item.url || '') || 'others'); + if (!groups[ct]) groups[ct] = []; + groups[ct].push(item); + } + return Object.entries(groups) + .sort((a, b) => (order[a[0]] ?? 99) - (order[b[0]] ?? 99)) + .map(([cloud_type, items]) => ({ + cloud_type, + label: (CLOUD_LABELS as any)[cloud_type] || cloud_type, + color: (CLOUD_COLORS as any)[cloud_type] || '#95a5a6', + count: items.length, + items, + })); +} + +// ============ Video ============ +// ============ Video ============ + +/** + * POST /api/video/parse + * Parse a video URL + */ +router.post('/video/parse', async (req: Request, res: Response) => { + try { + const { url } = req.body; + if (!url) { + res.status(400).json({ error: 'URL is required' }); + return; + } + + const videoInfo = await parseVideo(url); + res.json(videoInfo); + } catch (err: any) { + console.error('[Video] Parse error:', err); + res.status(500).json({ error: err.message || 'Failed to parse video' }); + } +}); + +// ============ Cloud Save ============ +// ============ Cloud Save ============ + +/** + * POST /api/save + * Save a share link to a specific cloud + */ +router.post('/save', saveLimiter, async (req: Request, res: Response) => { + try { + // Support both formats: + // 1. Backend-style: { url, cloudType } + // 2. Frontend-style: { source: { share_url }, target_cloud } + const url = req.body.url || req.body.source?.share_url || req.body.source?.url; + const cloudType = req.body.cloudType || req.body.target_cloud || (req.body.source as any)?.cloud_type; + const sourceTitle = req.body.source_title || req.body.source?.title || req.body.title; + if (!url || !cloudType) { + res.status(400).json({ error: 'URL and cloudType/cloud_type are required' }); + return; + } + + const ip = req.ip || (req.headers['x-forwarded-for'] as string)?.split(',')[0]?.trim() || ''; + const result = await saveFromShare(url, cloudType, sourceTitle, ip); + res.json(result); + } catch (err: any) { + console.error('[Save] Error:', err); + res.status(500).json({ error: err.message || 'Failed to save to cloud' }); + } +}); + +/** + * POST /api/video/save-to-cloud + * Save a video to cloud + */ +router.post('/video/save-to-cloud', saveLimiter, async (req: Request, res: Response) => { + try { + const { videoUrl, cloudType, title } = req.body; + if (!videoUrl || !cloudType) { + res.status(400).json({ error: 'videoUrl and cloudType are required' }); + return; + } + + const ip = req.ip || (req.headers['x-forwarded-for'] as string)?.split(',')[0]?.trim() || ''; + const result = await saveFromShare(videoUrl, cloudType, title, ip); + res.json(result); + } catch (err: any) { + console.error('[Video] Save-to-cloud error:', err); + res.status(500).json({ error: err.message || 'Failed to save video to cloud' }); + } +}); + +// ============ Rankings ============ +// ============ Rankings ============ + +/** + * GET /api/rankings + * Get search rankings + */ +router.get('/rankings', async (_req: Request, res: Response) => { + try { + const rankings = await getRankings(); + res.json(rankings); + } catch (err: any) { + console.error('[Rankings] Error:', err); + res.status(500).json({ error: err.message || 'Internal server error' }); + } +}); + +/** + * GET /api/rankings/hot + * Get hot keywords + */ +router.get('/rankings/hot', async (_req: Request, res: Response) => { + try { + const keywords = await getHotKeywords(); + res.json(keywords); + } catch (err: any) { + console.error('[Hot] Error:', err); + res.status(500).json({ error: err.message || 'Internal server error' }); + } +}); + +/** + * GET /api/rankings/categorized + * Get categorized rankings (hot + newest per category), cached for 12h + */ +router.get('/rankings/categorized', async (_req: Request, res: Response) => { + try { + const data = await getCategorizedRankings(); + res.json(data); + } catch (err: any) { + console.error('[Categorized] Error:', err); + res.status(500).json({ error: err.message || 'Internal server error' }); + } +}); + +/** + * GET /api/site-config + * Public site configuration (no auth required). + */ +router.get('/site-config', (_req: Request, res: Response) => { + try { + const siteLogo = getSystemConfig('site_logo') || ''; + const siteName = getSystemConfig('site_name') || 'CloudSearch'; + const fallbackImage = getSystemConfig('search_fallback_image') || ''; + const siteDisclaimer = getSystemConfig('site_disclaimer') || ''; + const siteMarquee = getSystemConfig('site_marquee') || ''; + res.json({ site_logo: siteLogo, site_name: siteName, search_fallback_image: fallbackImage, site_disclaimer: siteDisclaimer, site_marquee: siteMarquee }); + } catch (err: any) { + res.status(500).json({ error: err.message || 'Internal server error' }); + } +}); + +/** + * GET /api/me + * Get current user info from token (public, no auth middleware). + */ +router.get('/me', (req: Request, res: Response) => { + try { + const authHeader = req.headers.authorization; + if (!authHeader || !authHeader.startsWith('Bearer ')) { + res.json({ loggedIn: false }); + return; + } + const token = authHeader.split(' ')[1]; + const payload = verifyToken(token); + if (!payload) { + res.json({ loggedIn: false }); + return; + } + res.json({ loggedIn: true, id: payload.id, username: payload.username }); + } catch (err: any) { + res.json({ loggedIn: false }); + } +}); + +// ============ Admin ============ + + +/** + * Extract genre tags from search result titles. + */ +function extractTagsFromResults(results: any[], keyword: string): string[] { + const tags: string[] = []; + if (keyword) tags.push(keyword); + + const genreKeywords: Record = { + '动画': '动画', '动漫': '动画', '国漫': '国漫', + '剧场版': '剧场版', '年番': '年番', + '动作': '动作', '奇幻': '奇幻', '玄幻': '玄幻', + '仙侠': '仙侠', '古装': '古装', '爱情': '爱情', + '科幻': '科幻', '喜剧': '喜剧', '悬疑': '悬疑', + '恐怖': '恐怖', '惊悚': '惊悚', '剧情': '剧情', + '冒险': '冒险', '战争': '战争', '武侠': '武侠', + '纪录': '纪录片', '真人': '真人秀', '短片': '短片', + }; + + const seen = new Set(); + for (const r of results) { + const title = (r.title || r.note || '') as string; + for (const [key, val] of Object.entries(genreKeywords)) { + if (title.includes(key) && !seen.has(val)) { + seen.add(val); + tags.push(val); + } + } + } + + return tags; +} + +/** + * Query DB for previously saved resources that match the keyword. + * Returns formatted results for immediate streaming before external API call. + */ +function getSavedResources(keyword: string): any[] { + try { + const db = getDb(); + const rows = db.prepare(` + SELECT source_url, source_title, target_cloud, share_url, created_at + FROM save_records + WHERE status = 'success' + AND (source_title LIKE ? OR source_url LIKE ?) + ORDER BY created_at DESC + LIMIT 20 + `).all(`%${keyword}%`, `%${keyword}%`) as any[]; + + return rows.map((row: any, idx: number) => ({ + id: `saved_${idx}`, + title: row.source_title || row.source_url || '', + description: '', + share_url: row.share_url || row.source_url || '', + cloud_type: detectCloudType(row.share_url || row.source_url || ''), + file_size: '', + update_time: row.created_at || '', + source: 'local', + file_id: '', + cover: '', + password: '', + })); + } catch (err) { + console.error('[SavedResources] DB query error:', err); + return []; + } +} + +export default router; \ No newline at end of file diff --git a/source_clean/src/routes/upload.routes.ts b/source_clean/src/routes/upload.routes.ts new file mode 100644 index 0000000..16e055f --- /dev/null +++ b/source_clean/src/routes/upload.routes.ts @@ -0,0 +1,125 @@ +import { Router, Request, Response } from 'express'; +import multer from 'multer'; +import sharp from 'sharp'; +import path from 'path'; +import fs from 'fs'; +import { authMiddleware } from '../admin/auth.service'; +import { updateSystemConfig } from '../admin/system-config.service'; + +const router = Router(); + +// ============ Upload ============ + +/** + * POST /api/admin/upload-fallback-image + * Upload a fallback cover image for search results without covers. + * Recommended: 320×180 JPEG/PNG (16:9), max 2MB. + */ +const uploadDir = path.resolve('/app/uploads/fallback'); +if (!fs.existsSync(uploadDir)) { + fs.mkdirSync(uploadDir, { recursive: true }); +} + +const fallbackStorage = multer.diskStorage({ + destination: (_req, _file, cb) => cb(null, uploadDir), + filename: (_req, _file, cb) => { + const ext = '.jpg'; + cb(null, `fallback_cover_tmp${ext}`); + }, +}); + +const upload = multer({ + storage: fallbackStorage, + limits: { fileSize: 2 * 1024 * 1024 }, // 2MB max + fileFilter: (_req, file, cb) => { + if (file.mimetype.startsWith('image/')) { + cb(null, true); + } else { + cb(new Error('仅支持图片文件(JPEG/PNG)')); + } + }, +}); + +router.post('/admin/upload-fallback-image', authMiddleware, upload.single('image'), async (req: Request, res: Response) => { + try { + if (!req.file) { + res.status(400).json({ error: '请选择要上传的图片' }); + return; + } + // 压缩:最大宽度320px,JPEG quality 80 + const outPath = path.resolve(uploadDir, 'fallback_cover.jpg'); + await sharp(req.file.path) + .resize(320, undefined, { fit: 'inside', withoutEnlargement: true }) + .jpeg({ quality: 80 }) + .toFile(outPath); + // 删除原始上传文件(如果路径不同) + if (req.file.path !== outPath) { + fs.unlink(req.file.path, () => {}); + } + const url = `/api/uploads/fallback/fallback_cover.jpg`; + updateSystemConfig('search_fallback_image', url); + const stat = fs.statSync(outPath); + res.json({ success: true, url, message: `✅ 兜底图已压缩上传 (${(stat.size / 1024).toFixed(1)}KB)` }); + } catch (err: any) { + res.status(500).json({ error: err.message || '上传失败' }); + } +}); + +/** + * POST /api/admin/upload-logo + * Upload a site logo image displayed on search page (home link) and homepage. + * Recommended: 320×60 or similar wide/banner ratio, JPEG/PNG/WebP, max 2MB. + */ +const logoUploadDir = path.resolve('/app/uploads/logo'); +if (!fs.existsSync(logoUploadDir)) { + fs.mkdirSync(logoUploadDir, { recursive: true }); +} + +const logoStorage = multer.diskStorage({ + destination: (_req, _file, cb) => cb(null, logoUploadDir), + filename: (_req, _file, cb) => { + cb(null, `site_logo_tmp.png`); + }, +}); + +const logoUpload = multer({ + storage: logoStorage, + limits: { fileSize: 2 * 1024 * 1024 }, // 2MB max + fileFilter: (_req, file, cb) => { + if (file.mimetype.startsWith('image/')) { + cb(null, true); + } else { + cb(new Error('仅支持图片文件(JPEG/PNG/WebP)')); + } + }, +}); + +router.post('/admin/upload-logo', authMiddleware, logoUpload.single('image'), async (req: Request, res: Response) => { + try { + if (!req.file) { + res.status(400).json({ error: '请选择要上传的图片' }); + return; + } + // 压缩:最大宽度640px,PNG格式 + const outPath = path.resolve(logoUploadDir, 'site_logo.png'); + await sharp(req.file.path) + .resize(640, undefined, { fit: 'inside', withoutEnlargement: true }) + .png({ compressionLevel: 9 }) + .toFile(outPath); + if (req.file.path !== outPath) { + fs.unlink(req.file.path, () => {}); + } + const url = `/api/uploads/logo/site_logo.png`; + updateSystemConfig('site_logo', url); + const stat = fs.statSync(outPath); + res.json({ success: true, url, message: `✅ 站点图标已压缩上传 (${(stat.size / 1024).toFixed(1)}KB)` }); + } catch (err: any) { + res.status(500).json({ error: err.message || '上传失败' }); + } +}); + +import { startQrLogin, getQrLoginStatus, cancelQrLogin } from '../cloud/qr-login.service'; + +// ===== 夸克扫码登录 (不需要 auth,用户未登录时也需要能用) ===== + +export default router; \ No newline at end of file diff --git a/source_clean/src/search/rankings.service.ts b/source_clean/src/search/rankings.service.ts new file mode 100755 index 0000000..7e878de --- /dev/null +++ b/source_clean/src/search/rankings.service.ts @@ -0,0 +1,351 @@ +// Native fetch available in Node 20+ +import { getDb } from '../database/database'; +import { getTimezone, formatLocalDateTime } from '../utils/time'; + +export interface RankingItem { + keyword: string; + searchCount: number; + updatedAt: string; + rating?: number; +} + +export interface CategorizedRanking { + category: string; + label: string; + hot: RankingItem[]; + newest: RankingItem[]; +} + +export interface CategorizedResponse { + fetchedAt: string; + categories: CategorizedRanking[]; +} + +// ===== Bilibili PGC 排行榜配置 ===== +interface BiliPgcDef { + category: string; + label: string; + season_type: number; // 1=番剧, 2=电影, 3=纪录片, 4=国创, 5=电视剧, 7=综艺 +} + +const BILI_PGC_CATEGORIES: BiliPgcDef[] = [ + // 国创:凡人修仙传、灵笼、斗破苍穹等官方国产动画 + { category: 'donghua', label: '国产动漫', season_type: 4 }, + // 番剧:日漫等全球动画 + { category: 'global_anime', label: '热门动漫', season_type: 1 }, +]; + +// ===== 百度热搜榜配置 ===== +interface BaiduBoardDef { + category: string; + label: string; + tab: string; // movie=电影热搜, teleplay=电视剧热搜 +} + +const BAIDU_BOARDS: BaiduBoardDef[] = [ + // 百度电影热搜:实时反映国内电影热度 + { category: 'movie', label: '国内电影', tab: 'movie' }, + // 百度电视剧热搜:国内剧集热度 + { category: 'tv', label: '热门剧集', tab: 'teleplay' }, +]; + +// ===== TMDB 分类配置(保留欧美和冷门内容)===== +interface TmdbCategoryDef { + category: string; + label: string; + hotUrl: string; + newestUrl: string; +} + +const TMDB_CATEGORIES: TmdbCategoryDef[] = [ + { + category: 'western_movie', label: '欧美电影', + hotUrl: 'https://api.themoviedb.org/3/discover/movie?with_origin_country=US&sort_by=vote_average.desc&vote_count.gte=10', + newestUrl: 'https://api.themoviedb.org/3/discover/movie?with_origin_country=US&sort_by=release_date.desc&vote_count.gte=1', + }, + { + category: 'western_tv', label: '欧美剧集', + hotUrl: 'https://api.themoviedb.org/3/discover/tv?with_origin_country=US&sort_by=vote_average.desc&vote_count.gte=10', + newestUrl: 'https://api.themoviedb.org/3/discover/tv?with_origin_country=US&sort_by=first_air_date.desc&vote_count.gte=10', + }, + { + category: 'niche', label: '冷门佳片', + hotUrl: 'https://api.themoviedb.org/3/discover/movie?sort_by=vote_average.desc&vote_count.gte=10&vote_count.lte=500', + newestUrl: 'https://api.themoviedb.org/3/discover/movie?sort_by=release_date.desc&vote_count.gte=1&vote_count.lte=500', + }, +]; + +// ===== 显示顺序 ===== +const CATEGORY_ORDER: Record = { + donghua: 1, + movie: 2, + tv: 3, + global_anime: 4, + western_movie: 5, + western_tv: 6, + niche: 7, + hotsite: 8, +}; + +// ===== 12小时缓存 ===== +let cache: { data: CategorizedResponse; time: number } | null = null; +const CACHE_TTL = 12 * 60 * 60 * 1000; + +function isCacheValid(): boolean { + return cache !== null && (Date.now() - cache.time) < CACHE_TTL; +} + +// ===== Bilibili PGC API ===== + +/** + * 抓取 Bilibili PGC 排行榜(番剧/国创) + */ +async function fetchFromBiliPgc(season_type: number): Promise { + try { + const url = `https://api.bilibili.com/pgc/web/rank/list?season_type=${season_type}&day=7`; + const resp = await fetch(url, { + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', + 'Referer': 'https://www.bilibili.com/', + 'Accept': 'application/json, text/plain, */*', + 'Accept-Language': 'zh-CN,zh;q=0.9', + }, + signal: AbortSignal.timeout(8000), + }); + if (!resp.ok) { + console.error(`[BiliPGC] HTTP ${resp.status} for season_type=${season_type}`); + return []; + } + const json = await resp.json() as any; + if (json.code !== 0 || !json.result?.list) { + console.error(`[BiliPGC] API error code=${json.code} for season_type=${season_type}`); + return []; + } + return json.result.list.slice(0, 20).map((item: any) => { + const stat = item.stat || {}; + const viewCount = stat.view || 0; + const followCount = stat.follow || 0; + const searchCount = viewCount > 0 ? viewCount : followCount; + + let rating = 0; + if (item.rating) { + const m = String(item.rating).match(/([\d.]+)/); + if (m) rating = parseFloat(m[1]); + } + + return { + keyword: item.title || '', + searchCount, + updatedAt: item.new_ep?.index_show || item.new_ep?.cover || '', + rating, + }; + }); + } catch (err) { + console.error(`[BiliPGC] Fetch error for season_type=${season_type}:`, (err as Error).message); + return []; + } +} + +// ===== 百度热搜榜 API ===== + +/** + * 抓取百度热搜榜 + * tab: movie=电影, teleplay=电视剧 + */ +async function fetchFromBaidu(tab: string): Promise { + try { + const url = `https://top.baidu.com/api/board?tab=${tab}`; + const resp = await fetch(url, { + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', + 'Referer': 'https://top.baidu.com/board', + }, + signal: AbortSignal.timeout(8000), + }); + if (!resp.ok) { + console.error(`[Baidu] HTTP ${resp.status} for tab=${tab}`); + return []; + } + const json = await resp.json() as any; + if (!json.success || !json.data?.cards) { + console.error(`[Baidu] API error for tab=${tab}`); + return []; + } + + const results: RankingItem[] = []; + for (const card of json.data.cards) { + for (const item of (card.content || [])) { + results.push({ + keyword: item.word || '', + // hotScore can be like "96438", parse as number + searchCount: parseInt(item.hotScore || '0', 10) || 0, + updatedAt: item.desc || '', + rating: 0, + }); + } + } + + return results.slice(0, 20); + } catch (err) { + console.error(`[Baidu] Fetch error for tab=${tab}:`, (err as Error).message); + return []; + } +} + +// ===== TMDB ===== + +function getTmdbToken(): string { + const db = getDb(); + return (db.prepare('SELECT value FROM system_configs WHERE key = ?').get('tmdb_api_token') as any)?.value || ''; +} + +function tmdbResultToRanking(item: any): RankingItem { + const title = item.title || item.name || ''; + const date = item.release_date || item.first_air_date || ''; + const rating = item.vote_average ? Math.round(item.vote_average * 10) / 10 : 0; + return { + keyword: title, + searchCount: item.vote_count || 0, + updatedAt: date, + rating, + }; +} + +async function tmdbFetch(url: string, token: string): Promise { + const fullUrl = `${url}${url.includes('?') ? '&' : '?'}language=zh-CN`; + try { + const resp = await fetch(fullUrl, { + headers: { 'Authorization': `Bearer ${token}` }, + signal: AbortSignal.timeout(10000), + }); + if (!resp.ok) { + console.error(`[TMDB] HTTP ${resp.status} for ${url}`); + return []; + } + const data = await resp.json() as any; + return (data.results || []).slice(0, 20); + } catch (err) { + console.error(`[TMDB] Fetch error for ${url}:`, err); + return []; + } +} + +// ===== 主流程 ===== + +async function fetchRankings(): Promise { + const fetchedAt = formatLocalDateTime(); + + // 1. 并行抓取 Bilibili PGC 数据(国漫、番剧) + const biliPromises = BILI_PGC_CATEGORIES.map(async (cat) => { + const results = await fetchFromBiliPgc(cat.season_type); + const mid = Math.ceil(results.length / 2); + return { + category: cat.category, + label: cat.label, + hot: results.slice(0, mid), + newest: results.slice(mid), + }; + }); + + // 2. 并行抓取百度热搜数据(电影、电视剧) + // 百度只有热榜没有最新榜,全部放 hot + const baiduPromises = BAIDU_BOARDS.map(async (board) => { + const results = await fetchFromBaidu(board.tab); + return { + category: board.category, + label: board.label, + hot: results, + newest: [], + }; + }); + + // 3. 并行抓取 TMDB 数据(欧美观影、剧集、冷门) + const token = getTmdbToken(); + let tmdbResults: CategorizedRanking[] = []; + if (token) { + const tmdbPromises = TMDB_CATEGORIES.map(async (cat) => { + const [hotResults, newestResults] = await Promise.all([ + tmdbFetch(cat.hotUrl, token), + tmdbFetch(cat.newestUrl, token), + ]); + return { + category: cat.category, + label: cat.label, + hot: hotResults.map(tmdbResultToRanking), + newest: newestResults.map(tmdbResultToRanking), + }; + }); + tmdbResults = await Promise.all(tmdbPromises); + } + + // 4. 本站热搜 + const db = getDb(); + const rows = db.prepare( + 'SELECT keyword, search_count as searchCount, updated_at as updatedAt FROM hot_keywords ORDER BY search_count DESC LIMIT 20' + ).all() as RankingItem[]; + const newestRows = db.prepare( + 'SELECT keyword, search_count as searchCount, updated_at as updatedAt FROM hot_keywords ORDER BY updated_at DESC LIMIT 20' + ).all() as RankingItem[]; + + const hotsiteCategory: CategorizedRanking = { + category: 'hotsite', + label: '本站热搜', + hot: rows, + newest: newestRows, + }; + + // 5. 合并所有结果 + const [biliResults, baiduResults] = await Promise.all([ + Promise.all(biliPromises), + Promise.all(baiduPromises), + ]); + const allCategories = [...biliResults, ...baiduResults, ...tmdbResults, hotsiteCategory]; + + // 按 CATEGORY_ORDER 排序 + allCategories.sort((a, b) => (CATEGORY_ORDER[a.category] || 99) - (CATEGORY_ORDER[b.category] || 99)); + + return { fetchedAt, categories: allCategories }; +} + +export async function getCategorizedRankings(): Promise { + if (isCacheValid()) { + return cache!.data; + } + + try { + const data = await fetchRankings(); + cache = { data, time: Date.now() }; + return data; + } catch (err) { + console.error('[Rankings] Fetch error:', err); + if (cache) return cache.data; + const db = getDb(); + const rows = db.prepare( + 'SELECT keyword, search_count as searchCount, updated_at as updatedAt FROM hot_keywords ORDER BY search_count DESC LIMIT 20' + ).all() as RankingItem[]; + return { + fetchedAt: formatLocalDateTime(), + categories: [{ + category: 'hotsite', label: '本站热搜', + hot: rows, + newest: [...rows].sort((a, b) => b.updatedAt.localeCompare(a.updatedAt)).slice(0, 20), + }], + }; + } +} + +export async function getRankings(): Promise { + const db = getDb(); + const rows = db.prepare( + 'SELECT keyword, search_count as searchCount, updated_at as updatedAt FROM hot_keywords ORDER BY search_count DESC LIMIT 20' + ).all() as RankingItem[]; + return rows; +} + +export async function getHotKeywords(): Promise { + const db = getDb(); + const rows = db.prepare( + 'SELECT keyword FROM hot_keywords ORDER BY search_count DESC LIMIT 20' + ).all() as { keyword: string }[]; + return rows.map(r => r.keyword); +} diff --git a/source_clean/src/search/search-optimizer.ts b/source_clean/src/search/search-optimizer.ts new file mode 100755 index 0000000..ff9afb3 --- /dev/null +++ b/source_clean/src/search/search-optimizer.ts @@ -0,0 +1,125 @@ +/** + * Search Results Optimizer + * + * For each cloud type, keep only the top N most relevant results. + * Order groups by priority: real cloud storage > other providers > magnet/others. + * + * Goal: give users a manageable, high-quality result set instead of overwhelming them + * with hundreds of results dominated by magnet links. + */ + +import { detectCloudType } from '../config/cloud-labels'; + +/** Minimal result shape the optimizer needs */ +interface OptimizableResult { + title?: string; + url?: string; + source?: string; + score?: number; + [key: string]: any; +} + +/** Priority tiers for result ordering */ +const CLOUD_PRIORITY: Record = { + // Tier 1: Major cloud storage (most useful for save-to-cloud feature) + baidu: 10, + quark: 10, + aliyun: 10, + // Tier 2: Other cloud storage + '115': 20, + tianyi: 20, + '123pan': 20, + uc: 20, + xunlei: 20, + pikpak: 20, + // Tier 3: Mobile/app links (not very useful) + mobile: 50, + // Tier 4: Direct links (lowest utility for cloud saving) + magnet: 100, + ed2k: 100, + others: 100, +}; + +const DEFAULT_PRIORITY = 50; + +/** Get cloud type for a result, with an extra check for tracker URLs */ +function getCloudType(result: OptimizableResult): string { + const url = result.url; + // Check for tracker/private-site URLs not covered by shared detection + if (url && /mteam|hdarea|hdsky/i.test(url)) return 'others'; + return detectCloudType(url); +} + +function getPriority(cloudType: string): number { + return CLOUD_PRIORITY[cloudType] ?? DEFAULT_PRIORITY; +} + +export interface OptimizationResult { + results: OptimizableResult[]; + /** Per-type stats for display */ + perType: Array<{ type: string; count: number; total: number }>; + /** How many items were kept vs filtered */ + keptCount: number; + filteredCount: number; +} + +/** + * Optimize search results: + * 1. Group by cloud type + * 2. Sort by score descending within each group + * 3. Keep only top `maxPerType` results per type + * 4. Order groups by priority (cloud storage first) + */ +export function optimizeSearchResults( + items: OptimizableResult[], + maxPerType: number = 20 +): OptimizationResult { + // Step 1: Group by cloud type + const grouped: Record = {}; + const typeTotals: Record = {}; + + for (const item of items) { + const ct = getCloudType(item); + if (!grouped[ct]) { + grouped[ct] = []; + } + grouped[ct].push(item); + typeTotals[ct] = (typeTotals[ct] || 0) + 1; + } + + // Step 2 & 3: Sort each group by score desc, take top N + const kept: OptimizableResult[] = []; + const perType: Array<{ type: string; count: number; total: number }> = []; + + for (const [ct, groupItems] of Object.entries(grouped)) { + // Sort by score descending (higher score = more relevant) + groupItems.sort((a, b) => (b.score || 0) - (a.score || 0)); + + const top = groupItems.slice(0, maxPerType); + kept.push(...top); + + perType.push({ + type: ct, + count: top.length, + total: typeTotals[ct], + }); + } + + // Step 4: Sort kept results by cloud priority, then by score within same priority + kept.sort((a, b) => { + const pa = getPriority(getCloudType(a)); + const pb = getPriority(getCloudType(b)); + if (pa !== pb) return pa - pb; + return (b.score || 0) - (a.score || 0); + }); + + const keptCount = kept.length; + const filteredCount = items.length - keptCount; + + return { + results: kept, + perType, + keptCount, + filteredCount, + }; +} diff --git a/source_clean/src/search/search.service.ts b/source_clean/src/search/search.service.ts new file mode 100755 index 0000000..60ca0a4 --- /dev/null +++ b/source_clean/src/search/search.service.ts @@ -0,0 +1,344 @@ +// Native fetch available in Node 20+ +import config from '../config'; +import { getDb } from '../database/database'; +import { localTimestamp } from '../utils/time'; + +export interface SearchResult { + title: string; + url: string; + content: string; + score?: number; + source?: string; + password?: string; + datetime?: string; + responseTimeMs?: number; +} + +export interface SearchResponse { + results: SearchResult[]; + total: number; + page: number; + pageSize: number; +} + +export interface ApiSearchSource { + name: string; + url: string; + method?: string; // GET | POST (default POST) + headers?: Record; + body?: string; // JSON body template, supports {keyword} {page} + resultPath: string; // dot-notation path to results array (e.g. "data.list") + fieldMap: { // maps SearchResult fields to JSON response fields + title?: string; + url?: string; + content?: string; + password?: string; + datetime?: string; + }; + timeout?: number; // per-source timeout (ms), default 10000 +} + +/** Simple dot/bracket notation JSON path accessor. */ +function jsonPathGet(obj: any, path: string): any { + if (!obj || !path) return undefined; + const parts = path + .replace(/\[(\d+)\]/g, '.$1') // items[0] → items.0 + .split('.') + .filter(Boolean); + let current = obj; + for (const part of parts) { + if (current == null) return undefined; + current = current[part]; + } + return current; +} + +/** Parse configured API search sources from system config. */ +function getApiSearchSources(): ApiSearchSource[] { + try { + const db = getDb(); + const raw = (db.prepare("SELECT value FROM system_configs WHERE key = 'api_search_sources'").get() as any)?.value; + if (!raw) return []; + const parsed = JSON.parse(raw); + if (!Array.isArray(parsed)) return []; + return parsed.filter((s: any) => s.url && s.resultPath); + } catch { + return []; + } +} + +/** Query a single API search source and return results with timing. */ +async function queryApiSource( + source: ApiSearchSource, + keyword: string, + page: number, +): Promise<{ source: string; results: SearchResult[]; responseTimeMs: number; error?: string }> { + const startTime = Date.now(); + const timeout = source.timeout || 10000; + const method = (source.method || 'POST').toUpperCase(); + + try { + let url = source.url; + const headers: Record = { ...source.headers }; + + let body: string | undefined; + if (source.body) { + body = source.body + .replace(/\{keyword\}/g, encodeURIComponent(keyword)) + .replace(/\{page\}/g, String(page)); + } + + // For GET requests, append query params; for POST, use body + const fetchOptions: RequestInit = { + method, + headers: { 'Content-Type': 'application/json', ...headers }, + signal: AbortSignal.timeout(timeout), + }; + + if (method === 'GET') { + // Parse body as JSON and convert to query string + if (body) { + try { + const params = JSON.parse(body); + const qs = new URLSearchParams(params).toString(); + url += (url.includes('?') ? '&' : '?') + qs; + } catch { + // If body is not JSON, append as raw query + url += (url.includes('?') ? '&' : '?') + body; + } + } + } else { + (fetchOptions as any).body = body || JSON.stringify({ keyword, page }); + } + + const response = await fetch(url, fetchOptions); + const responseTimeMs = Date.now() - startTime; + + if (!response.ok) { + return { source: source.name, results: [], responseTimeMs, error: `HTTP ${response.status}` }; + } + + const data = await response.json(); + const resultTimeMs = Date.now() - startTime; + + // Extract results array using JSONPath + const items = jsonPathGet(data, source.resultPath); + if (!Array.isArray(items)) { + return { source: source.name, results: [], responseTimeMs: resultTimeMs, error: 'resultPath not found or not an array' }; + } + + // Map fields + const fm = source.fieldMap || {}; + const results: SearchResult[] = items.map((item: any) => ({ + title: (fm.title ? item[fm.title] : item.title) || item.name || '', + url: (fm.url ? item[fm.url] : item.url) || item.link || '', + content: (fm.content ? item[fm.content] : item.content) || item.snippet || '', + password: (fm.password ? item[fm.password] : item.password) || '', + datetime: (fm.datetime ? item[fm.datetime] : item.datetime) || item.date || '', + source: source.name, + responseTimeMs: resultTimeMs, + })); + + return { source: source.name, results, responseTimeMs: resultTimeMs }; + } catch (err: any) { + const responseTimeMs = Date.now() - startTime; + return { source: source.name, results: [], responseTimeMs, error: err.message }; + } +} + +/** Query all configured API search sources in parallel. */ +async function searchApiSources(keyword: string, page: number): Promise<{ + results: SearchResult[]; + sourceStats: { name: string; count: number; responseTimeMs: number; error?: string }[]; +}> { + const sources = getApiSearchSources(); + if (sources.length === 0) return { results: [], sourceStats: [] }; + + const promises = sources.map(s => queryApiSource(s, keyword, page)); + const allResults = await Promise.all(promises); + + const sourceStats = allResults.map(r => ({ + name: r.source, + count: r.results.length, + responseTimeMs: r.responseTimeMs, + error: r.error, + })); + + // Merge all results, tag with source name, sort by response time (fastest first) + const results = allResults + .flatMap(r => r.results) + .sort((a, b) => (a.responseTimeMs || 99999) - (b.responseTimeMs || 99999)); + + return { results, sourceStats }; +} + +export async function search(keyword: string, page: number = 1, ip?: string): Promise { + const db = getDb(); + const pansouUrl = (db.prepare('SELECT value FROM system_configs WHERE key = ?').get('pansou_url') as any)?.value || config.pansouUrl; + const proxyEnabled = (db.prepare('SELECT value FROM system_configs WHERE key = ?').get('search_proxy_enabled') as any)?.value === 'true'; + const proxyUrl = (db.prepare('SELECT value FROM system_configs WHERE key = ?').get('search_proxy_url') as any)?.value || ''; + + // ── Run PanSou and API sources in parallel ── + const pansouPromise = (async () => { + const url = `${pansouUrl}/api/search`; + const fetchOptions: any = { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ kw: keyword, page }), + signal: AbortSignal.timeout(10000), + }; + const pansouStart = Date.now(); + const response = await fetch(url, fetchOptions); + if (!response.ok) throw new Error(`PanSou API error: ${response.status}`); + const data = await response.json() as any; + return { data, responseTimeMs: Date.now() - pansouStart }; + })(); + + const apiSourcesPromise = searchApiSources(keyword, page); + + const [pansouResult, apiSourcesResult] = await Promise.all([pansouPromise, apiSourcesPromise]); + + const { data, responseTimeMs: pansouTime } = pansouResult; + + // ── Parse PanSou results ── + let items: any[] = []; + let total = 0; + + if (data.data?.merged_by_type) { + for (const [cloudType, cloudItems] of Object.entries(data.data.merged_by_type)) { + if (Array.isArray(cloudItems)) { + items.push(...cloudItems.map((item: any) => ({ + ...item, + _cloud_type: cloudType, + }))); + } + } + total = data.data.total || items.length; + } else if (Array.isArray(data.data)) { + items = data.data; + total = data.total || items.length; + } else if (Array.isArray(data.results)) { + items = data.results; + total = data.total || items.length; + } + + const pansouResults: SearchResult[] = items.map((item: any) => ({ + title: item.note || item.title || '', + url: item.url || item.link || '', + content: item.content || item.snippet || item.note || '', + score: item.score || 0, + source: item.source || item._cloud_type || 'pansou', + password: item.password || '', + datetime: item.datetime || '', + responseTimeMs: pansouTime, + images: item.images || [], + })); + + // ── Merge PanSou + API sources, sort by response time (fastest first) ── + const allResults = [...apiSourcesResult.results, ...pansouResults] + .sort((a, b) => (a.responseTimeMs || 99999) - (b.responseTimeMs || 99999)); + + // Deduplicate by URL within merged results + const seenUrls = new Set(); + const results: SearchResult[] = []; + for (const r of allResults) { + if (r.url && !seenUrls.has(r.url)) { + seenUrls.add(r.url); + results.push(r); + } else if (!r.url) { + results.push(r); // keep results without URLs (unlikely but safe) + } + } + + total = results.length; + + // Sort by datetime descending as secondary sort (preserve response-time groups) + results.sort((a: any, b: any) => { + const ta = a.datetime || ''; + const tb = b.datetime || ''; + if (!ta && !tb) return 0; + if (!ta) return 1; + if (!tb) return -1; + return tb.localeCompare(ta); + }); + + // Record search statistics + recordSearchStats(keyword, results.length, ip); + + // Update hot keywords + updateHotKeywords(keyword); + + return { + results, + total, + page, + pageSize: data.pageSize || 10, + }; +} + +/** + * Apply title filter rules to clean up search result titles. + * Rules format (one per line): + * # comment lines are ignored (hash must be followed by space) + * /pattern/flags → regex: matched content is deleted from title + * plain text → literal text: exact text is deleted from title wherever it appears + */ +export function applyTitleFilter(title: string, rules: string): string { + if (!title || !rules) return title; + const lines = rules.split('\n'); + let result = title; + for (const rawLine of lines) { + const line = rawLine.trim(); + if (!line || line.startsWith('# ')) continue; + try { + if (line.startsWith('/') && line.lastIndexOf('/') > 0) { + const lastSlashIdx = line.lastIndexOf('/'); + const pattern = line.substring(1, lastSlashIdx); + const flags = line.substring(lastSlashIdx + 1); + const anchored = pattern.startsWith('^') ? pattern : '^' + pattern; + const re = new RegExp(anchored, flags); + const match = re.exec(result); + if (match && match.index === 0) { + result = result.slice(match[0].length); + } + } else { + if (result.startsWith(line)) { + result = result.slice(line.length); + } + } + } catch { + continue; + } + } + return result.trim(); +} + +function recordSearchStats(keyword: string, resultCount: number, ip?: string): void { + try { + const db = getDb(); + db.prepare( + 'INSERT INTO search_stats (keyword, intent, result_count, ip_address, created_at) VALUES (?, ?, ?, ?, ?)' + ).run(keyword, 'SEARCH', resultCount, ip || '', localTimestamp()); + } catch (err) { + console.error('[Search] Failed to record stats:', err); + } +} + +function updateHotKeywords(keyword: string): void { + try { + const db = getDb(); + const existing = db.prepare('SELECT id FROM hot_keywords WHERE keyword = ?').get(keyword) as any; + + if (existing) { + db.prepare( + "UPDATE hot_keywords SET search_count = search_count + 1, updated_at = ? WHERE keyword = ?" + ).run(localTimestamp(), keyword); + } else { + db.prepare( + "INSERT INTO hot_keywords (keyword, search_count, updated_at) VALUES (?, 1, ?)" + ).run(keyword, localTimestamp()); + } + } catch (err) { + console.error('[Search] Failed to update hot keywords:', err); + } +} diff --git a/source_clean/src/utils/qr-login.service.ts b/source_clean/src/utils/qr-login.service.ts new file mode 100755 index 0000000..742a34a --- /dev/null +++ b/source_clean/src/utils/qr-login.service.ts @@ -0,0 +1,407 @@ +import { chromium, BrowserContext, Page } from 'playwright'; +import jsQR from 'jsqr'; +import { getDb } from '../database/database'; +import { escapeLike } from '../utils/time'; + +interface QrSession { + id: string; + browserContext: BrowserContext; + page: Page; + createdAt: number; + cookieSnapshot: string; + lastPollAt: number; + qrUrl: string; + status: 'pending' | 'scanned' | 'logged_in' | 'expired' | 'error'; + error?: string; +} + +const SESSIONS = new Map(); +const SESSION_TTL = 5 * 60 * 1000; // 5 minutes +const COOKIE_CHECK_INTERVAL = 1500; // 1.5s between cookie checks + +const CHROMIUM_PATH = process.env.CHROMIUM_PATH || '/usr/bin/chromium-browser'; + +// Clean up old sessions periodically +setInterval(() => { + const now = Date.now(); + for (const [id, session] of SESSIONS.entries()) { + if (now - session.createdAt > SESSION_TTL) { + cleanupSession(id); + } + } +}, 60000); + +function cleanupSession(id: string) { + const session = SESSIONS.get(id); + if (session) { + try { + session.browserContext.close().catch(() => {}); + } catch {} + SESSIONS.delete(id); + } +} + +/** + * Extract QR code URL from the login page canvas using jsQR. + * The actual login QR code is Canvas #0 (anonymous, 177x177), NOT #react-qrcode-logo. + */ +async function extractQrUrl(page: Page): Promise { + // Run inside Playwright's browser context (as a string to avoid Node TS type errors) + const raw = await page.evaluate(`(() => { + const canvases = document.querySelectorAll('canvas'); + var results = []; + for (var i = 0; i < canvases.length; i++) { + try { + var c = canvases[i]; + var ctx = c.getContext('2d'); + if (!ctx) continue; + var imageData = ctx.getImageData(0, 0, c.width, c.height); + results.push({ + index: i, + w: c.width, + h: c.height, + data: Array.from(imageData.data) + }); + } catch(e) {} + } + return results; + })()`) as unknown as { index: number; w: number; h: number; data: number[] }[]; + + if (!raw || raw.length === 0) { + throw new Error('页面没有可用的 canvas'); + } + + // Try to decode each canvas, preferring the one with su.quark.cn URL + let bestUrl = ''; + let bestResult: { index: number; w: number; h: number; data: number[] } | null = null; + + for (const canvas of raw) { + const code = jsQR(new Uint8ClampedArray(canvas.data), canvas.w, canvas.h); + if (code && code.data) { + // If this is the login QR code (has su.quark.cn), use it immediately + if (code.data.includes('su.quark.cn')) { + return code.data; + } + // Otherwise keep it as fallback + if (!bestUrl) { + bestUrl = code.data; + bestResult = canvas; + } + } + } + + if (bestUrl) { + return bestUrl; + } + + throw new Error('无法解析二维码内容'); +} + +/** + * Start a QR code login session. + * Launches headless Chromium, navigates to Quark login page, extracts QR code URL. + */ +export async function startQrLogin(): Promise<{ + sessionId: string; + qrUrl: string; + expiresIn: number; +}> { + // Clean up any existing expired sessions + for (const [id, session] of SESSIONS.entries()) { + if (Date.now() - session.createdAt > SESSION_TTL) { + cleanupSession(id); + } + } + + const browser = await chromium.launch({ + executablePath: CHROMIUM_PATH, + headless: true, + args: [ + '--no-sandbox', + '--disable-setuid-sandbox', + '--disable-dev-shm-usage', + '--disable-gpu', + '--no-first-run', + '--no-zygote', + ], + }); + + const browserContext = await browser.newContext({ + userAgent: + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', + viewport: { width: 1280, height: 800 }, + locale: 'zh-CN', + }); + + const page = await browserContext.newPage(); + const sessionId = Date.now().toString(36) + Math.random().toString(36).slice(2, 8); + + try { + // Navigate to Quark login page (now the homepage itself has QR login) + await page.goto('https://pan.quark.cn/', { + waitUntil: 'commit', + timeout: 30000, + }); + + // Wait for the QR code canvas to appear + await page.waitForSelector('canvas', { timeout: 15000 }); + + // Extra wait for the QR code to fully render + await page.waitForTimeout(2000); + + // Extract the QR code URL from the canvas + const qrUrl = await extractQrUrl(page); + + // Take initial cookie snapshot + const cookies = await browserContext.cookies(); + const cookieSnapshot = cookies.map(c => `${c.name}=${c.value}`).join('; '); + + const session: QrSession = { + id: sessionId, + browserContext, + page, + createdAt: Date.now(), + cookieSnapshot, + lastPollAt: Date.now(), + qrUrl, + status: 'pending', + }; + + SESSIONS.set(sessionId, session); + + // Start background polling for login detection + pollLoginStatus(session); + + // Handle page navigation (like redirect after login) + page.on('framenavigated', async (frame) => { + if (frame === page.mainFrame()) { + const url = frame.url(); + if (url === 'about:blank') { + await checkAndCaptureCookies(session); + } + } + }); + + // Handle popups/dialogs + page.on('popup', async (popup) => { + try { + await popup.waitForLoadState('networkidle', { timeout: 10000 }); + await checkAndCaptureCookies(session); + } catch {} + }); + + return { + sessionId, + qrUrl, + expiresIn: SESSION_TTL / 1000, + }; + } catch (err: any) { + // Clean up on failure + try { await browserContext.close(); } catch {} + try { browser.close().catch(() => {}); } catch {} + SESSIONS.delete(sessionId); + throw new Error(`启动扫码登录失败: ${err.message}`); + } +} + +/** + * Poll login status in background. + * Checks cookies every COOKIE_CHECK_INTERVAL ms for new session tokens. + */ +async function pollLoginStatus(session: QrSession) { + const checkInterval = setInterval(async () => { + try { + const now = Date.now(); + + // Check if expired + if (now - session.createdAt > SESSION_TTL) { + clearInterval(checkInterval); + session.status = 'expired'; + cleanupSession(session.id); + return; + } + + session.lastPollAt = now; + + // Check cookies + const cookies = await session.browserContext.cookies(); + const cookieStr = cookies.map(c => `${c.name}=${c.value}`).join('; '); + + // Check for session cookies indicating login + const hasSessionCookie = cookies.some( + c => (c.name === '__st' || c.name === 'pus' || c.name === '__pus' || c.name === '__ktd') + ); + + if (hasSessionCookie) { + session.cookieSnapshot = cookieStr; + session.status = 'logged_in'; + clearInterval(checkInterval); + return; + } + + // Check URL change as alternative indicator + const url = session.page.url(); + if (!url.includes('login') && !url.includes('qrcode') && url !== 'about:blank' && url !== 'https://pan.quark.cn/' && url.length > 10) { + await checkAndCaptureCookies(session); + } + } catch (err: any) { + // Page might have been closed + clearInterval(checkInterval); + } + }, COOKIE_CHECK_INTERVAL); +} + +/** + * Check cookies after navigation/redirect and capture them if login succeeded. + */ +async function checkAndCaptureCookies(session: QrSession) { + try { + const cookies = await session.browserContext.cookies(); + const cookieStr = cookies.map(c => `${c.name}=${c.value}`).join('; '); + const hasSessionCookie = cookies.some( + c => (c.name === '__st' || c.name === 'pus' || c.name === '__pus' || c.name === '__ktd') + ); + + if (hasSessionCookie) { + session.cookieSnapshot = cookieStr; + session.status = 'logged_in'; + } else if (cookies.length > 3) { + const newCookies = cookies.filter( + c => !['ctoken', 'b-user-id', '__wpkreporterwid_'].includes(c.name) + ); + if (newCookies.length > 0) { + session.cookieSnapshot = cookieStr; + try { + const resp = await session.page.evaluate(async () => { + const r = await fetch('https://pan.quark.cn/account/info', { + credentials: 'include', + }); + return await r.text(); + }); + const data = JSON.parse(resp); + if (data?.data?.nickname) { + session.status = 'logged_in'; + } + } catch {} + } + } + } catch {} +} + +/** + * Get the login status for a session. + */ +export async function getQrLoginStatus(sessionId: string): Promise<{ + status: string; + cookie?: string; + nickname?: string; + storage_used?: string; + storage_total?: string; + autoUpdated?: boolean; + updatedConfigId?: number; +}> { + const session = SESSIONS.get(sessionId); + if (!session) { + return { status: 'expired' }; + } + + // Check if expired + if (Date.now() - session.createdAt > SESSION_TTL) { + session.status = 'expired'; + cleanupSession(sessionId); + return { status: 'expired' }; + } + + if (session.status === 'logged_in') { + // Try to get nickname too + let nickname = ''; + try { + const resp = await session.page.evaluate(async () => { + const r = await fetch('https://pan.quark.cn/account/info', { + credentials: 'include', + }); + return await r.text(); + }); + const data = JSON.parse(resp); + nickname = data?.data?.nickname || ''; + } catch {} + + // Fetch capacity info from within the browser context (has full JS signing) + let storageTotal = ''; + let storageUsed = ''; + try { + const capResp = await session.page.evaluate(async () => { + const r = await fetch( + 'https://pan.quark.cn/1/clouddrive/capacity/detail?pr=ucpro&fr=pc', + { credentials: 'include' } + ); + return await r.text(); + }); + const capData = JSON.parse(capResp); + if (capData.status === 200 && capData.data?.capacity_summary) { + const summary = capData.data.capacity_summary; + const total = summary.sum_capacity || 0; + storageTotal = formatBytes(total); + storageUsed = '0 B'; // capacity/detail doesn't return used_size + } + } catch {} + + // Build full cookie string including httpOnly cookies + const cookies = await session.browserContext.cookies(); + const cookieStr = cookies.map(c => `${c.name}=${c.value}`).join('; '); + + // Extract __uid from cookie for duplicate detection + const uidMatch = cookieStr.match(/(? { + cleanupSession(sessionId); +} diff --git a/source_clean/src/utils/response.ts b/source_clean/src/utils/response.ts new file mode 100755 index 0000000..d07b223 --- /dev/null +++ b/source_clean/src/utils/response.ts @@ -0,0 +1,27 @@ +import { Response } from 'express'; + +/** + * Send a successful JSON response. + * Uses the standard format: { error: null, data } + */ +export function sendSuccess(res: Response, data: T, status: number = 200) { + res.status(status).json({ error: null, ...(data as any) }); +} + +/** + * Send an error JSON response. + * Uses the standard format: { error: string } + * All routes should use this for consistent frontend error handling. + */ +export function sendError(res: Response, status: number, message: string) { + res.status(status).json({ error: message }); +} + +/** + * Send a 500 error response from a caught exception. + * Prevents leaking stack traces in production. + */ +export function sendServerError(res: Response, err: unknown, fallbackMessage: string = 'Internal server error') { + const message = err instanceof Error ? err.message : fallbackMessage; + res.status(500).json({ error: message || fallbackMessage }); +} diff --git a/source_clean/src/utils/time.ts b/source_clean/src/utils/time.ts new file mode 100755 index 0000000..b16a713 --- /dev/null +++ b/source_clean/src/utils/time.ts @@ -0,0 +1,116 @@ +import { getDb } from '../database/database'; + +/** + * Get the current timezone from DB config, with fallback. + */ +export function getTimezone(): string { + try { + const db = getDb(); + const row = db.prepare('SELECT value FROM system_configs WHERE key = ?').get('timezone') as any; + return row?.value || 'Asia/Shanghai'; + } catch { + return 'Asia/Shanghai'; + } +} + +/** + * Returns current local time as an ISO 8601 string with timezone offset. + * Example: "2026-05-02T14:32:23+08:00" + * This format is reliably parsed by JavaScript Date() in all browsers. + */ +export function localTimestamp(): string { + const tz = getTimezone(); + const now = new Date(); + // Format as local time string with timezone offset + try { + const parts = new Intl.DateTimeFormat('sv-SE', { + timeZone: tz, + year: 'numeric', month: '2-digit', day: '2-digit', + hour: '2-digit', minute: '2-digit', second: '2-digit', + hour12: false, + }).formatToParts(now); + const get = (type: string) => parts.find(p => p.type === type)?.value || '00'; + const dateStr = `${get('year')}-${get('month')}-${get('day')}T${get('hour')}:${get('minute')}:${get('second')}`; + // Calculate timezone offset for the configured timezone + // Use getTimezoneOffset difference between UTC and the target timezone + const utcMs = now.getTime(); + const localStr = dateStr.replace('T', ' '); + // Get offset in minutes for the configured timezone + const formatter = new Intl.DateTimeFormat('sv-SE', { + timeZone: tz, + timeZoneName: 'longOffset', + }); + const tzName = formatter.formatToParts(now).find(p => p.type === 'timeZoneName')?.value || ''; + // tzName is like "GMT+8" or "GMT-05:00" + let offset = '+00:00'; + if (tzName) { + const match = tzName.match(/GMT([+-])(\d+)(?::(\d+))?/); + if (match) { + const sign = match[1]; + const hours = match[2].padStart(2, '0'); + const mins = (match[3] || '00').padStart(2, '0'); + offset = `${sign}${hours}:${mins}`; + } + } + return dateStr + offset; + } catch { + // Fallback: use UTC + return now.toISOString(); + } +} + +/** + * Returns today's (or given date's) date string in the configured timezone. + * Example: "2026-05-04" + */ +export function formatLocalDate(date?: Date): string { + const tz = getTimezone(); + const d = date || new Date(); + try { + const parts = new Intl.DateTimeFormat('sv-SE', { + timeZone: tz, + year: 'numeric', month: '2-digit', day: '2-digit', + }).formatToParts(d); + const get = (type: string) => parts.find(p => p.type === type)?.value || '00'; + return `${get('year')}-${get('month')}-${get('day')}`; + } catch { + const y = d.getFullYear(); + const m = String(d.getMonth() + 1).padStart(2, '0'); + const day = String(d.getDate()).padStart(2, '0'); + return `${y}-${m}-${day}`; + } +} + +/** + * Escape SQL LIKE wildcards (% and _) in user input to prevent unintended pattern matching. + */ +export function escapeLike(str: string): string { + return str.replace(/[%_\\]/g, '\\$&'); +} + +/** + * Returns a local datetime string in the configured timezone. + * Example: "2026-05-04 14:32:23" — intentionally space-separated (no T) for DB compatibility. + */ +export function formatLocalDateTime(date?: Date): string { + const tz = getTimezone(); + const d = date || new Date(); + try { + const parts = new Intl.DateTimeFormat('sv-SE', { + timeZone: tz, + year: 'numeric', month: '2-digit', day: '2-digit', + hour: '2-digit', minute: '2-digit', second: '2-digit', + hour12: false, + }).formatToParts(d); + const get = (type: string) => parts.find(p => p.type === type)?.value || '00'; + return `${get('year')}-${get('month')}-${get('day')} ${get('hour')}:${get('minute')}:${get('second')}`; + } catch { + const y = d.getFullYear(); + const mo = String(d.getMonth() + 1).padStart(2, '0'); + const da = String(d.getDate()).padStart(2, '0'); + const h = String(d.getHours()).padStart(2, '0'); + const mi = String(d.getMinutes()).padStart(2, '0'); + const s = String(d.getSeconds()).padStart(2, '0'); + return `${y}-${mo}-${da} ${h}:${mi}:${s}`; + } +} diff --git a/source_clean/src/validation/bounded-pool.ts b/source_clean/src/validation/bounded-pool.ts new file mode 100755 index 0000000..7401fcf --- /dev/null +++ b/source_clean/src/validation/bounded-pool.ts @@ -0,0 +1,49 @@ +export class BoundedPool { + private concurrency: number; + private running: number; + private queue: Array<() => Promise>; + + constructor(concurrency: number = 10) { + this.concurrency = concurrency; + this.running = 0; + this.queue = []; + } + + async run(fn: () => Promise): Promise { + return new Promise((resolve, reject) => { + const task = async () => { + this.running++; + try { + const result = await fn(); + resolve(result); + } catch (err) { + reject(err); + } finally { + this.running--; + this.processQueue(); + } + }; + + if (this.running < this.concurrency) { + task(); + } else { + this.queue.push(task); + } + }); + } + + private processQueue(): void { + while (this.running < this.concurrency && this.queue.length > 0) { + const task = this.queue.shift(); + if (task) task(); + } + } + + get pending(): number { + return this.queue.length; + } + + get active(): number { + return this.running; + } +} diff --git a/source_clean/src/validation/link-validator.service.ts b/source_clean/src/validation/link-validator.service.ts new file mode 100755 index 0000000..23e3ffc --- /dev/null +++ b/source_clean/src/validation/link-validator.service.ts @@ -0,0 +1,375 @@ +// Native fetch available in Node 20+ +import config from '../config'; +import { RedisClient } from '../middleware/cache'; +import { BoundedPool } from './bounded-pool'; +import { BaiduDriver } from '../cloud/drivers/baidu.driver'; +import { AliyunDriver } from '../cloud/drivers/aliyun.driver'; +import { getSystemConfig } from '../admin/system-config.service'; + +export type LinkStatus = 'valid' | 'invalid' | 'unknown'; + +export interface ValidationResult { + url: string; + status: LinkStatus; + cloudType: string; + checkedAt: string; + message?: string; +} + +/** + * 从系统配置加载自定义关键词列表(一行一条) + */ +function loadCustomKeywords(configKey: string): string[] { + try { + const rules = getSystemConfig(configKey); + if (rules) { + return rules.split('\n').map(k => k.trim()).filter(k => k.length > 0); + } + } catch { + // ignore + } + return []; +} + +export class LinkValidator { + private cache: RedisClient; + private pool: BoundedPool; + + constructor(concurrency?: number) { + this.cache = new RedisClient(); + this.pool = new BoundedPool(concurrency || config.validation.concurrency); + } + + /** + * Validate a single share link — PanSou only, no local fallback. + */ + async validate(url: string, cloudType: string): Promise { + // Check cache first + const cacheKey = `link:valid:${cloudType}:${Buffer.from(url).toString('base64').slice(0, 64)}`; + + try { + const cached = await this.cache.get(cacheKey); + if (cached) { + const parsed = JSON.parse(cached); + return parsed as ValidationResult; + } + } catch { + // ignore cache errors + } + + // Try PanSou's /api/check/links + const pansouResult = await this.validateViaPansou(url, cloudType); + if (pansouResult) { + if (pansouResult.status === 'valid' || pansouResult.status === 'invalid') { + // Cache definitive result + const ttl = pansouResult.status === 'valid' ? config.validation.cacheTtlValid : config.validation.cacheTtlInvalid; + try { await this.cache.setEx(cacheKey, ttl, JSON.stringify(pansouResult)); } catch {} + return pansouResult; + } + // PanSou returned locked/unsupported/uncertain → return unknown, no local fallback + return pansouResult; + } + + // PanSou unreachable → return unknown + return { url, status: 'unknown' as LinkStatus, cloudType, checkedAt: new Date().toISOString(), message: '盘搜不可达' }; + } + + /** + * Full validation with local fallback when PanSou can't determine. + */ + async validateWithLocalFallback(url: string, cloudType: string): Promise { + // Check cache first + const cacheKey = `link:valid:${cloudType}:${Buffer.from(url).toString('base64').slice(0, 64)}`; + + try { + const cached = await this.cache.get(cacheKey); + if (cached) { + const parsed = JSON.parse(cached); + return parsed as ValidationResult; + } + } catch { + // ignore cache errors + } + + // Try PanSou + const pansouResult = await this.validateViaPansou(url, cloudType); + if (pansouResult) { + if (pansouResult.status === 'valid' || pansouResult.status === 'invalid') { + const ttl = pansouResult.status === 'valid' ? config.validation.cacheTtlValid : config.validation.cacheTtlInvalid; + try { await this.cache.setEx(cacheKey, ttl, JSON.stringify(pansouResult)); } catch {} + return pansouResult; + } + // PanSou uncertain → fall through to local validation + } + + // Fall back to own validation + let result: ValidationResult; + + switch (cloudType) { + case 'quark': + result = await this.validateQuark(url); + break; + case 'baidu': + result = await this.validateBaidu(url); + break; + case 'aliyun': + result = await this.validateAliyun(url); + break; + default: + result = await this.validateByHtml(url, cloudType); + } + + const ttl = result.status === 'valid' ? config.validation.cacheTtlValid : config.validation.cacheTtlInvalid; + try { await this.cache.setEx(cacheKey, ttl, JSON.stringify(result)); } catch {} + + return result; + } + + /** + * Try PanSou's /api/check/links for validation. + * Returns null if PanSou is unreachable. + * + * Judgment order: + * 1. summary "链接有效" → valid (PanSou's own OK signal) + * 2. summary 含自定义确认关键词 → valid (from DB link_valid_keywords) + * 3. summary 含自定义失效关键词 → invalid (from DB link_invalid_keywords) + * 4. 其他 → unknown + */ + private async validateViaPansou(url: string, cloudType: string): Promise { + const checkedAt = new Date().toISOString(); + try { + const pansouApiUrl = `${config.pansouUrl}/api/check/links`; + const response = await fetch(pansouApiUrl, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + items: [{ disk_type: cloudType, url }], + }), + signal: AbortSignal.timeout(10000), + }); + + if (!response.ok) return null; + + const data = await response.json() as any; + const pansouResult = data.results?.[0]; + if (!pansouResult) return null; + + const summary = pansouResult.summary || ''; + + // 1. PanSou 明确返回"链接有效" + if (summary.includes('链接有效')) { + return { url, status: 'valid', cloudType, checkedAt, message: summary }; + } + + // 2. 自定义确认关键词(用户配置的"有效"信号) + const validKeywords = loadCustomKeywords('link_valid_keywords'); + if (validKeywords.some(kw => summary.includes(kw))) { + return { url, status: 'valid', cloudType, checkedAt, message: summary }; + } + + // 3. 自定义失效关键词(用户配置的"失效"信号) + const invalidKeywords = loadCustomKeywords('link_invalid_keywords'); + if (invalidKeywords.some(kw => summary.includes(kw))) { + return { url, status: 'invalid', cloudType, checkedAt, message: summary }; + } + + // 4. 其余全部返回 unknown + return { url, status: 'unknown', cloudType, checkedAt, message: summary || '盘搜无法确认' }; + } catch { + return null; + } + } + + /** + * Validate a Quark share link using the public share token API. + */ + private async validateQuark(url: string): Promise { + const checkedAt = new Date().toISOString(); + + try { + const cleanUrl = url.split('#')[0]; + const urlObj = new URL(cleanUrl); + const pathParts = urlObj.pathname.split('/'); + const shareToken = pathParts[pathParts.length - 1] || pathParts[pathParts.length - 2]; + + if (!shareToken) { + return { url, status: 'unknown', cloudType: 'quark', checkedAt, message: '无法解析分享链接 token' }; + } + + const tokenUrl = 'https://drive-pc.quark.cn/1/clouddrive/share/sharepage/token?pr=ucpro&fr=pc'; + const response = await fetch(tokenUrl, { + method: 'POST', + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36', + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'Origin': 'https://pan.quark.cn', + 'Referer': 'https://pan.quark.cn/', + }, + body: JSON.stringify({ pwd_id: shareToken, passcode: '' }), + signal: AbortSignal.timeout(15000), + }); + + if (!response.ok) { + const msg = response.status === 403 ? '分享已过期或需要密码' : `HTTP ${response.status}`; + return { url, status: 'invalid', cloudType: 'quark', checkedAt, message: msg }; + } + + const data = await response.json() as any; + if (data.status === 200 && data.data?.stoken) { + const title = data.data?.title || ''; + const author = data.data?.author?.nick_name || ''; + const expiredAt = data.data?.expired_at || 0; + const expireDate = expiredAt > 0 ? new Date(expiredAt).toISOString().slice(0, 10) : ''; + return { + url, + status: 'valid', + cloudType: 'quark', + checkedAt, + message: expireDate ? `有效链接,过期时间: ${expireDate}` : '有效链接', + }; + } + + // API 返回了 200 但无 stoken — 可能是临时异常,保守判 unknown + return { url, status: 'unknown', cloudType: 'quark', checkedAt, message: 'API 返回异常(无 stoken),不做失效判定' }; + } catch (err: any) { + return { + url, + status: 'unknown', + cloudType: 'quark', + checkedAt, + message: `校验异常: ${err.message?.slice(0, 50) || '未知错误'}`, + }; + } + } + + private async validateBaidu(url: string): Promise { + const checkedAt = new Date().toISOString(); + + try { + const driver = new BaiduDriver(); + const result = await driver.validateShareLink(url); + + return { + url, + status: result.valid ? 'valid' : 'invalid', + cloudType: 'baidu', + checkedAt, + message: result.message, + }; + } catch (err: any) { + return { + url, + status: 'unknown', + cloudType: 'baidu', + checkedAt, + message: `校验失败: ${err.message || err}`, + }; + } + } + + private async validateAliyun(url: string): Promise { + const checkedAt = new Date().toISOString(); + + try { + const driver = new AliyunDriver(); + const result = await driver.validateShareLink(url); + + return { + url, + status: result.valid ? 'valid' : 'invalid', + cloudType: 'aliyun', + checkedAt, + message: result.message, + }; + } catch (err: any) { + return { + url, + status: 'unknown', + cloudType: 'aliyun', + checkedAt, + message: `校验失败: ${err.message || err}`, + }; + } + } + + /** + * Fallback: validate by fetching the share page as HTML and checking for + * custom failure keywords from DB config. Used for providers without a + * dedicated API (115, tianyi, 123pan, etc.). + */ + private async validateByHtml(url: string, cloudType: string): Promise { + let status: LinkStatus = 'valid'; + const checkedAt = new Date().toISOString(); + let message = ''; + + try { + const controller = new AbortController(); + const timeoutId = setTimeout(() => controller.abort(), config.validation.timeout); + + const response = await fetch(url, { + signal: controller.signal as any, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', + 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', + 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8', + }, + redirect: 'follow', + }); + + clearTimeout(timeoutId); + + const text = await response.text(); + const keywords = loadCustomKeywords('link_invalid_keywords'); + + const isHttpError = response.status >= 400; + if (isHttpError) { + status = 'invalid'; + message = `HTTP ${response.status} ${response.statusText}`; + } else { + const matched = keywords.find(kw => text.includes(kw)); + if (matched) { + status = 'invalid'; + message = `页面包含自定义失效关键词: "${matched}"`; + } else { + message = 'HTML 页面可访问,未检测到失效关键词'; + } + } + } catch (err: any) { + // On timeout or network error, conservatively mark as valid + status = 'valid'; + message = `网络校验超时,保守标记为有效`; + } + + return { url, status, cloudType, checkedAt, message }; + } + + /** + * Batch validate multiple links with bounded concurrency. + */ + async validateBatch(urls: Array<{ url: string; cloudType: string }>): Promise { + const tasks = urls.map(item => () => this.validate(item.url, item.cloudType)); + const results: ValidationResult[] = []; + + for (const task of tasks) { + try { + const result = await this.pool.run(task); + results.push(result); + } catch (err) { + results.push({ + url: '', + status: 'unknown', + cloudType: '', + checkedAt: new Date().toISOString(), + message: '校验执行异常', + }); + } + } + + return results; + } + + async validateBatchWithPool(urls: Array<{ url: string; cloudType: string }>): Promise { + return this.validateBatch(urls); + } +} diff --git a/source_clean/src/video/video.service.ts b/source_clean/src/video/video.service.ts new file mode 100755 index 0000000..6242901 --- /dev/null +++ b/source_clean/src/video/video.service.ts @@ -0,0 +1,37 @@ +// Native fetch available in Node 20+ +import config from '../config'; + +export interface VideoInfo { + title: string; + coverUrl: string; + videoUrl: string; + author: string; + platform: string; + duration?: string; +} + +export async function parseVideo(url: string): Promise { + const apiUrl = `${config.videoParserUrl}/parse`; + + const response = await fetch(apiUrl, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ url }), + signal: AbortSignal.timeout(30000), + }); + + if (!response.ok) { + throw new Error(`Video parser API error: ${response.status} ${response.statusText}`); + } + + const data = await response.json() as any; + + return { + title: data.title || '', + coverUrl: data.coverUrl || data.cover || '', + videoUrl: data.videoUrl || data.url || data.video || '', + author: data.author || data.nickname || '', + platform: data.platform || '', + duration: data.duration || '', + }; +} diff --git a/source_clean/tsconfig.json b/source_clean/tsconfig.json new file mode 100755 index 0000000..1951778 --- /dev/null +++ b/source_clean/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "commonjs", + "lib": ["ES2022"], + "outDir": "./dist", + "rootDir": "./src", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "declaration": true, + "declarationMap": true, + "sourceMap": true + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +}