3 Commits
Author SHA1 Message Date
jinghui b7b274ae32 docs: README Docker 安装切换腾讯云镜像 + 部署截图重截1600×900半屏大图 + 引导新增同行热卖店铺 (v3.6.12) 2026-11-16 15:17:09 +08:00
jinghui 5cd9e28405 v3.6.11: 同行热卖店铺页 + 关于页链接调整 2026-11-16 12:33:16 +08:00
jinghui 7591537268 v3.6.10: 登录页页脚改为更多开源应用链接
- 登录页页脚「躺赚鱼 · www.88531.cn」→「更多开源应用:https://nav.88531.cn」
- URL 可点击(新窗口打开,品牌金色 hover 下划线)
2026-11-16 11:35:37 +08:00
69 changed files with 1479 additions and 147 deletions

No files matched your search

+37
View File
@@ -4,6 +4,43 @@
---
## 2026-11-16 · v3.6.12
### 📝 文档与发布更新
- **Docker 安装方式切换为腾讯云镜像**:`jpccr.ccs.tencentyun.com/jinghui/tangzhuan-yu`(国内秒拉,无需 npm/pip 构建)
- **部署截图全部重截为 1600×900 半屏大图**,文字清晰可读;新增「同行热卖店铺」页截图
- 首次使用引导新增「同行热卖店铺」条目
- 镜像已推腾讯云 TCR(latest + v3.6.11,digest `042387b4e66e`)
---
## 2026-11-16 · v3.6.11
### ✨ 新功能
- **同行热卖店铺页**(侧边栏新入口,位于「实时热卖榜」下方)
- 按您店铺的类型关键词,从闲鱼实时搜索聚合同类型**销量最好的 50 家店铺**(翻页提量 + 聚合去重)
- 每家显示:**销量、信用(等级★/搜索信号)、评论数、与您店铺的相似度、参考价值**
- **自定义排序**:按销量(默认)/ 按相似度 / 按信用 / 按评论数
- **点击直达闲鱼**:店铺名与「店铺」按钮打开 `goofish.com/personal?userId=` 店铺主页(含全部商品),「商品」按钮打开代表商品
- **AI 一键分析**:检测到模型 KEY 即由模型输出「最适合您店铺的同行 + 可借鉴打法 + 避坑」报告;未配 KEY 给出配置引导
- 相似度 = 类型关键词命中率 50% + 词集重合 30% + 价格带 20%;参考价值 = 相似度 40% + 销量 25% + 信用 20% + 好评率 15%
- 抓取带进度条轮询(约 1 分钟)、命中风控给出明确等待提示、缓存落盘 `data/peer_shops_cache.json`
- 三个端点均挂登录鉴权(匿名 401 实测)
- **关于页文案调整**
- 「官网」标签改为 **「更多精品应用」**(链接仍指向 nav.88531.cn 导航页)
- 开源仓库地址改为 **`https://gitea.88531.cn/jinghui/tangzhuan-yu`**(显示 `jinghui/tangzhuan-yu`)
### ✅ 验证
- 端到端真实抓取跑通:触发后约 40 秒完成,42 家店铺数据 + URL 格式全部正确
- 关键词修复实测生效:类目数字 ID(如 50023914)与通用词不再进入搜索词
- 浏览器实测:侧边栏导航、页面标题/排序按钮/AI 按钮/空态渲染正常;关于页三处断言全过(新标签、新仓库 URL、旧值消失)
- 仓库链接 `gitea.88531.cn/jinghui/tangzhuan-yu` 实测 200
---
## 2026-11-16 · v3.6.8
### ✨ 新功能
+30 -26
View File
@@ -5,7 +5,7 @@
**🎮 在线体验(免部署,打开即用):https://tzy.88531.cn**
[![Version](https://img.shields.io/badge/Version-3.6.2-52c41a)](CHANGELOG.md)
[![Version](https://img.shields.io/badge/Version-3.6.11-52c41a)](CHANGELOG.md)
[![Python](https://img.shields.io/badge/Python-3.11+-3776AB?logo=python&logoColor=white)](https://www.python.org/)
[![React](https://img.shields.io/badge/React-19-149ECA?logo=react&logoColor=white)](https://react.dev/)
[![Docker](https://img.shields.io/badge/Docker-Ready-2496ED?logo=docker&logoColor=white)](https://www.docker.com/)
@@ -25,7 +25,8 @@
3. 点 **实时热卖榜**:看当前什么最好卖(11 个分类、按想要人数排序)
4. 点 **价格监控**:给想卖的品设关键词与目标价,低于目标价自动盯
5. 点 **一键转卖**:把收藏 / 搜到的商品改个价直接铺到自己店铺
6. 点 **AI 回复**:配置模型,买家闲聊也有人接
6. 点 **同行热卖店铺**:一键聚合同类型最能卖的 50 家同行,看相似度、参考价值,AI 告诉你抄谁的作业
7. 点 **AI 回复**:配置模型,买家闲聊也有人接
觉得好用再往下看「怎么部署到自己的服务器」。
@@ -36,6 +37,7 @@
| 功能 | 说明 |
| --- | --- |
| 🏆 **实时热卖榜** | 11 个分类(含虚拟商品、软件资源、AI 资源、学习资料)实时抓取闲鱼在售商品,按**想要人数**取前 30 名;商品名点击直达闲鱼详情页;附**热门搜索词 + 真实热度**(命中商品想要人数合计),点击直接跳闲鱼搜索 |
| 🏪 **同行热卖店铺** | 按您店铺的类型关键词实时聚合同类型**销量最好的 50 家店铺**,显示销量 / 信用 / 评论数、**与您店铺的相似度**与**参考价值**,支持按销量(默认)/ 相似度 / 信用 / 评论数自定义排序,一键直达闲鱼店铺主页;**配置模型 KEY 后可 AI 一键分析**「最适合您店铺的同行 + 可借鉴打法」 |
| 💰 **价格监控** | 关键词规则定时搜索闲鱼,抓**全网最低价**,低于目标价立即通知;支持**卖家信用度筛选**(不限 / 卖信用 / 新卖家 / 优质卖家)、**销量下限**、**AI 精准监控**(模型判断商品是否匹配需求,避免低价干扰) |
| 🔄 **一键转卖** | 收藏的商品自动加载(支持分页)→ 改标题 / 改价 → 一键发布到自己的账号;商品卡片点击直达闲鱼详情核对货源 |
| 🤖 **AI 回复增强** | 兼容 OpenAI 协议任意模型;支持**议价边界**(最低价 + 议价轮数,绝不越线让价);**免费 token 领取入口**(https://ai.88531.cn),开箱即用 |
@@ -45,7 +47,7 @@
| 📢 **公告与版本推送** | 接入授权系统:在线人数统计、新版本横幅提示、公告统一推送 |
| ✨ **品牌与体验** | 全站更名为「躺赚鱼」,中文界面,登录页 / 侧边栏 / 页脚统一 |
> 完整改动记录见 [CHANGELOG.md](CHANGELOG.md)(v1.1.0 → v3.6.2,逐版本带验证记录)。
> 完整改动记录见 [CHANGELOG.md](CHANGELOG.md)(v1.1.0 → v3.6.11,逐版本带验证记录)。
## 💡 为什么要用这个版本
@@ -79,6 +81,10 @@
![实时热卖榜](screenshots/05-hotlist.png)
### 同行热卖店铺:同类型最能卖的 50 家同行,相似度 / 参考价值 / AI 分析
![同行热卖店铺](screenshots/06-peershops.png)
---
## 📦 核心功能(原版能力全部保留)
@@ -105,14 +111,13 @@
> **⚠️ 不要部署到 Hugging Face Spaces 等共享托管平台**:内置反检测浏览器与验证码处理组件易被判滥用,且海外出口 IP 显著增加闲鱼风控概率。
> **推荐本地设备、自有 VPS 或国内服务器。**
### 方式一:docker run(先构建镜像,再启动)
### 方式一:docker run(拉取腾讯云镜像,复制即用)
镜像已发布到腾讯云容器镜像服务(国内拉取快,含全部新功能,无需 clone / 构建):
```bash
git clone https://gitea.88531.cn/jinghui/tangzhuan-yu.git
cd tangzhuan-yu
# 构建镜像(多阶段构建,前端 React 自动编译进镜像,无需手动 npm build)
docker build -t tangzhuan-yu:latest .
# 拉取镜像(公网仓库,匿名可拉)
docker pull jpccr.ccs.tencentyun.com/jinghui/tangzhuan-yu:latest
# 启动(参数齐全,复制即用)
docker run -d --name xianyu-butler \
@@ -126,7 +131,7 @@ docker run -d --name xianyu-butler \
-e TZ=Asia/Shanghai \
-e PYTHONUNBUFFERED=1 \
--restart unless-stopped \
tangzhuan-yu:latest
jpccr.ccs.tencentyun.com/jinghui/tangzhuan-yu:latest
```
浏览器打开 `http://服务器IP:8080` 即可。
@@ -150,21 +155,20 @@ Windows PowerShell:把 `$(pwd)` 换成 `${PWD}`,续行 `\` 换成反引号 `
仓库自带 `docker-compose.yml`(另有国内源 `docker-compose-cn.yml`、NAS 专用 `docker-compose.nas.yml`):
```bash
git clone https://gitea.88531.cn/jinghui/tangzhuan-yu.git
cd tangzhuan-yu
cp .env.example .env # 不改也能启动(默认 admin/admin123),生产环境务必改掉
docker compose up -d --build # 国内网络用: docker compose -f docker-compose-cn.yml up -d --build
mkdir tangzhuan-yu && cd tangzhuan-yu # 任意空目录,数据放这里
curl -O https://gitea.88531.cn/jinghui/tangzhuan-yu/raw/branch/main/docker-compose.yml
cp .env.example .env # 没有 .env 就直接 docker compose up -d(默认 admin/admin123),生产环境务必改掉
docker compose up -d # 直接拉取腾讯云镜像,无需构建
```
> 也可以 `git clone https://gitea.88531.cn/jinghui/tangzhuan-yu.git`(或 Gitee 镜像 `https://gitee.com/jinghui111/tangzhuan-yu.git`)拿到完整仓库后再 `docker compose up -d`,compose 里已配置直接拉镜像。
仓库内 `docker-compose.yml` 已带齐全部参数,等价于:
```yaml
services:
xianyu-app:
build:
context: .
dockerfile: Dockerfile # 多阶段构建,前端自动编译
image: tangzhuan-yu:latest
image: jpccr.ccs.tencentyun.com/jinghui/tangzhuan-yu:latest # 腾讯云镜像(含全部新功能),如需本地构建把这行换成 build 段
container_name: xianyu-butler
restart: unless-stopped # 宿主重启自动拉起
user: "0:0" # 容器内需要写 /app/data 等挂载目录
@@ -195,19 +199,18 @@ services:
**注意事项**
- **数据不丢**:`./data`、`./logs`、`./backups` 三个目录必须挂载,升级只 `docker compose build && up -d`,数据原地保留。
- **数据不丢**:`./data`、`./logs`、`./backups` 三个目录必须挂载,升级只 `docker compose pull && up -d`,数据原地保留。
- **改端口**:`.env` 里设 `WEB_PORT=9000`。
- **国内网络**:用 `docker-compose-cn.yml`(apt / pip / npm / Chromium 全走国内镜像),否则 `npm ci` 极易超时。
- **NAS / 低配设备(飞牛 fnOS、群晖、威联通)**:`npm ci` + Python 依赖 + Chromium 下载会打满 CPU 内存,低配机器建议分时段构建,或先在 PC 构建好镜像再 `docker save` / `docker load` 过去。
- **不要用上游预构建镜像**(`ghcr.io/23star/xianyu-super-butler`):那是原版,**不含本仓库的热卖榜 / 价格监控 / 一键转卖等新功能**,必须本地 `build`。
- **无需本地构建**:镜像已发布在腾讯云仓库 `jpccr.ccs.tencentyun.com/jinghui/tangzhuan-yu`(国内拉取快),`docker pull` 即用——NAS / 低配设备(飞牛 fnOS、群晖、威联通)也不用跑 `npm ci`,不会打满 CPU。
- **不要用上游预构建镜像**(`ghcr.io/23star/xianyu-super-butler`):那是原版,**不含本仓库的热卖榜 / 价格监控 / 一键转卖 / 同行热卖店铺等新功能**,请用上面的腾讯云镜像。
- **健康检查**:容器内置 `HEALTHCHECK`,探测 `http://localhost:8080/health`;API 文档 `/docs`。
### 方式三:源码运行(开发调试)
需要 Python 3.11+、Node.js 20+:
需要 Python 3.11+、Node.js 20+(Gitea 主仓:`https://gitea.88531.cn/jinghui/tangzhuan-yu`,Gitee 镜像:`https://gitee.com/jinghui111/tangzhuan-yu`,两处同步):
```bash
git clone https://gitea.88531.cn/jinghui/tangzhuan-yu.git
git clone https://gitea.88531.cn/jinghui/tangzhuan-yu.git # 或从 Gitee 克隆
cd tangzhuan-yu
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
@@ -227,6 +230,7 @@ python Start.py
5. **让 AI 接住闲聊**:买家问「在吗 / 能便宜吗 / 怎么用」由模型应答,价格永远不越你设的底线。
6. **开始经营**:
- 「实时热卖榜」看什么最好卖 → 「一键转卖」把品铺到自己店铺;
- 「同行热卖店铺」看同类型销量最好的 50 家同行(相似度 / 参考价值 / AI 一键分析先学谁);
- 「价格监控」给目标品设关键词与目标价,低于目标价自动通知你补货 / 调价;
- 「订单管理」拉取历史订单看营收,「买家互动」确认收货后自动评价致谢。
7. **看数据**:回「总览」,成交额、订单、商品销量排行一屏掌握。
@@ -236,8 +240,8 @@ python Start.py
## 🔁 更新
```bash
git pull
docker compose up -d --build # 数据在 ./data,升级不丢
docker compose pull && docker compose up -d # 拉最新腾讯云镜像,数据在 ./data 升级不丢
# docker run 方式: docker pull jpccr.ccs.tencentyun.com/jinghui/tangzhuan-yu:latest && docker rm -f xianyu-butler && 重跑上面的 docker run 命令
```
逐版本改动见 [CHANGELOG.md](CHANGELOG.md)。
+2
View File
@@ -42,6 +42,7 @@ from app.routers.ai_optimize import create_ai_optimize_router
from app.routers.logistics_quote import create_logistics_quote_router
from app.routers.logistics_agent import create_logistics_agent_router
from app.routers.hotlist import create_hotlist_router
from app.routers.peer_shops import create_peer_shops_router
from utils.qr_login import qr_login_manager
from utils.xianyu_utils import trans_cookies
from utils.image_utils import image_manager
@@ -395,6 +396,7 @@ app.include_router(create_logistics_agent_router(get_current_user, db_manager))
logger.info("已注册物流 Agent 路由")
app.include_router(create_hotlist_router(get_current_user, db_manager))
app.include_router(create_peer_shops_router(get_current_user, db_manager))
logger.info("已注册实时热卖榜路由")
from app.routers.pricewatch import create_pricewatch_router, start_scheduler as start_pricewatch_scheduler
+690
View File
@@ -0,0 +1,690 @@
"""同行热卖店铺:按用户店铺类型抓取闲鱼同类型高销量店铺,给出相似度与参考价值。
流程:
1. 从该账号已同步商品的标题/类目提取类型关键词(型号 token + 中文高频词);
2. 关键词搜索闲鱼(pc.search),按加密 seller_id 聚合出候选店铺;
3. 按搜索成交量排序,逐店调 pc.detail 补齐明文 sellerId、销量、信用、好评率、
店铺标签,并拼出店铺主页 URL(goofish.com/personal?userId=<id>);
4. 计算与用户店铺的相似度(词集 Jaccard + 价格带)与参考价值(加权分);
5. 缓存到 data/peer_shops_cache.json,前端轮询读取;
6. 用户配置了模型 KEY 时可一键 AI 分析最适合自己店铺的同行。
"""
from __future__ import annotations
import asyncio
import json
import math
import os
import re
import statistics
import time
from collections import Counter
from typing import Any, Callable, Dict, List, Optional
from fastapi import APIRouter, Depends, HTTPException
from loguru import logger
from pydantic import BaseModel, Field
from utils.risk_control import is_risk_control_error
from utils.search_parse import extract_seller_signal, normalize_price, normalize_image, extract_want
from utils.xianyu_seller_api import SellerApiError, XianyuSellerAPI
CACHE_FILE = os.getenv("PEER_SHOPS_CACHE", "data/peer_shops_cache.json")
# 抓取参数
MAX_KEYWORDS = 6 # 类型关键词数
PAGES_PER_KEYWORD = 2 # 每关键词翻页数(单页只有 10 条,两页才够凑满 50 家)
SEARCH_GAP = 0.5 # 搜索间隔(风控友好)
DETAIL_GAP = 0.45 # 详情间隔
CANDIDATE_TOP = 55 # 参与详情补齐的候选店铺数(保 50 个成片)
SHOPS_TOP = 50 # 最终展示店铺数
REQUEST_TIMEOUT = 130.0 # AI 分析超时
# 不适合当搜索关键词的通用词(出现在商品标题里但搜了只会捞到无关同行)
_BAD_KEYWORDS = {
"合集", "全新", "二手", "包邮", "现货", "批发", "个人", "闲置", "转让",
"自用", "正常", "处理", "亏本", "清仓", "秒发", "当天", "低价", "急出",
"实拍", "现货", "优惠", "特价", "促销", "包退", "质保", "发货", "现货",
"2024", "2025", "2026", "2027", "精选", "推荐", "同款", "正品",
}
# 分词停用词(碎片字)
_STOP = set("的了和与在有是我不你他她它们这那些个一二三四五六七八九十件全新二手闲置转让出售购买包邮可刀谢谢咨询请问什么怎么可以没有自己东西东西儿哦啊吧呢嘛~!!!,。、:;??()()【】[]\"'")
# --------------------------------------------------------------------------- #
# 关键词提取
# --------------------------------------------------------------------------- #
def _extract_terms(text: str) -> List[str]:
"""标题/标签 → 词列表:英文数字型号 token + 中文 2-4 字片段。"""
if not text:
return []
lower = str(text).lower()
# 型号:字母开头(rtx4060/h310/m.2…)或带单位的数字(16g/1tb/15寸);
# 裸数字多半是价格、编号、日期,搜它只会白费请求。
tokens = re.findall(r"[a-z][a-z0-9+./#-]{1,}|"
r"\d+(?:\.\d+)?(?:gb|tb|kg|g|t|w|寸|代)", lower)
zh_parts = re.findall(r"[\u4e00-\u9fa5]+", str(text))
grams: List[str] = []
for seg in zh_parts:
for n in (2, 3, 4):
for i in range(len(seg) - n + 1):
g = seg[i:i + n]
if g[0] in _STOP or g[-1] in _STOP or len(set(g)) == 1:
continue
grams.append(g)
return [t.strip() for t in tokens if len(t.strip()) >= 2] + grams
def _user_features(db_manager, cookie_id: str) -> Dict[str, Any]:
"""用户店铺特征:商品标题分词、类目、价格中位数、搜索关键词。"""
rows = db_manager.get_items_by_cookie(cookie_id) or []
titles = [str(r.get("item_title") or "") for r in rows if r.get("item_title")]
categories = [str(r.get("item_category") or "").strip() for r in rows if r.get("item_category")]
prices: List[float] = []
for r in rows:
raw = str(r.get("item_price") or "").replace("¥", "").replace("¥", "").replace(",", "").strip()
try:
prices.append(float(raw))
except ValueError:
pass
term_counter: Counter = Counter()
for t in titles:
for term in set(_extract_terms(t)):
term_counter[term] += 1
# 高频词优先,但型号类(英文/数字)权重加倍——型号是最强类型信号
def _weight(term: str) -> float:
base = term_counter[term]
return base * (2.5 if re.search(r"[a-z0-9]", term) else 1.0)
top_terms = sorted(term_counter, key=_weight, reverse=True)
# 关键词:类目 + 型号 + 高频中文词,去重限量。
# 类目字段可能是数字分类 ID(如 50023914),搜它只会白费请求,必须跳过。
def _usable(w: str) -> bool:
w = w.strip()
if not w or len(w) > 12:
return False
if w.lower() in _BAD_KEYWORDS or w in _BAD_KEYWORDS:
return False
if w.isdigit() and len(w) >= 4:
return False
return len(w) >= 2
keywords: List[str] = []
for c in categories:
if _usable(c) and c not in keywords:
keywords.append(c)
for term in top_terms:
if len(keywords) >= MAX_KEYWORDS:
break
if term in keywords or not _usable(term):
continue
# 太长的中文串(多为拼接碎片)与过短的词跳过
if len(term) < 2 or len(term) > 10:
continue
keywords.append(term)
med_price = statistics.median(prices) if prices else 0.0
return {
"terms": top_terms[:400],
"term_set": set(top_terms[:400]),
"categories": categories,
"keywords": keywords,
"items_count": len(rows),
"med_price": med_price,
"titles": titles[:60],
}
# --------------------------------------------------------------------------- #
# 解析
# --------------------------------------------------------------------------- #
def _parse_search(result: Dict[str, Any]) -> List[Dict[str, Any]]:
"""pc.search → 商品列表(带加密 seller_id,用于按店铺聚合)。"""
out: List[Dict[str, Any]] = []
for raw in (result.get("data") or {}).get("resultList") or []:
main = (((raw or {}).get("data") or {}).get("item") or {}).get("main") or {}
content = main.get("exContent") or {}
if not content:
continue
args = (main.get("clickParam") or {}).get("args") or {}
params = content.get("detailParams") or {}
item_id = str(content.get("itemId") or params.get("itemId") or args.get("item_id") or "").strip()
seller_id = str(args.get("seller_id") or "").strip()
if not item_id:
continue
credit, deals = extract_seller_signal(content)
title = str(content.get("title") or params.get("title") or "").strip()
out.append({
"item_id": item_id,
"title": title,
"price": normalize_price(content),
"image": normalize_image(content.get("picUrl")),
"area": str(content.get("area") or ""),
"seller": str(content.get("userNickName") or params.get("userNick") or "").strip(),
"want_count": extract_want(content, args),
"seller_id": seller_id or (str(content.get("userActiveUrl") or "") or f"nick:{title[:0]}"),
"seller_credit": credit,
"seller_deals": deals,
"url": f"https://www.goofish.com/item?id={item_id}",
})
return out
def _price_num(price: str) -> float:
try:
return float(str(price).replace("¥", "").replace("¥", "").replace(",", "").strip() or 0)
except ValueError:
return 0.0
# --------------------------------------------------------------------------- #
# 打分
# --------------------------------------------------------------------------- #
def _similarity(
shop_terms: set,
user_terms: set,
shop_price: float,
user_price: float,
hit_count: int,
total_keywords: int,
) -> int:
"""相似度 0-100:类型关键词命中率 50% + 词集重合 30% + 价格带 20%。
- 命中率:该店出现在我几个类型关键词的搜索结果里(最直接的"同类"信号);
- 词集重合用 overlap 系数(交集/较小集合),大词集下 Jaccard 分母过大永远≈0;
- 价格带取对数距离,0.8 元软件店与实体同行会自然拉开。
"""
if not user_terms:
return 0
hit = (hit_count / total_keywords) if total_keywords else 0.0
if shop_terms:
inter = len(shop_terms & user_terms)
overlap = inter / max(1, min(len(shop_terms), len(user_terms)))
else:
overlap = 0.0
price_sim = 1.0
if shop_price > 0 and user_price > 0:
ratio = math.log((shop_price + 1) / (user_price + 1))
price_sim = math.exp(-abs(ratio) / 1.5)
score = 100 * (0.5 * hit + 0.3 * min(1.0, overlap * 3) + 0.2 * price_sim)
return max(0, min(100, round(score)))
# 信用文本 → 排序权重(detail 的 sellerLevel 缺失时用搜索信号兜底)
_CREDIT_TEXT_RANK = {"极好": 5, "优秀": 4, "良好": 3, "一般": 2, "较差": 1, "中等": 2}
def _credit_sort(level: int, text: str) -> int:
"""信用排序键:等级优先(1-5→10-50),无等级时用搜索信号文本。"""
if level:
return level * 10
return _CREDIT_TEXT_RANK.get((text or "").strip(), 0)
def _value_score(sim: int, sold: int, credit_level: int, good_rate: float) -> int:
"""参考价值 0-100:相似度 40% + 销量 25% + 信用 20% + 好评率 15%。"""
sold_score = min(100.0, math.log10(max(sold, 0) + 1) / 4.3 * 100)
credit_score = max(0, min(100, (credit_level or 0) * 20))
good_score = max(0.0, min(100.0, float(good_rate or 0)))
return round(0.4 * sim + 0.25 * sold_score + 0.2 * credit_score + 0.15 * good_score)
# --------------------------------------------------------------------------- #
# 缓存 / 状态
# --------------------------------------------------------------------------- #
_cache: Dict[str, Any] = {}
_state_lock = asyncio.Lock()
# cookie_id -> {"state": idle|running|done|error, "done": n, "total": n, "stage": str, "error": str, "started_at": ts}
_progress: Dict[str, Dict[str, Any]] = {}
_last_refresh: Dict[str, float] = {}
def _load_cache() -> None:
global _cache
if os.path.exists(CACHE_FILE):
try:
with open(CACHE_FILE, "r", encoding="utf-8") as fh:
_cache = json.load(fh) or {}
except Exception as exc:
logger.warning(f"同行店铺缓存读取失败: {exc}")
_cache = {}
def _save_cache() -> None:
try:
directory = os.path.dirname(CACHE_FILE)
if directory:
os.makedirs(directory, exist_ok=True)
tmp = f"{CACHE_FILE}.tmp"
with open(tmp, "w", encoding="utf-8") as fh:
json.dump(_cache, fh, ensure_ascii=False)
os.replace(tmp, CACHE_FILE)
except Exception as exc:
logger.warning(f"同行店铺缓存写入失败: {exc}")
_load_cache()
# --------------------------------------------------------------------------- #
# 刷新
# --------------------------------------------------------------------------- #
async def _refresh(cookie_id: str, cookies_str: str, db_manager) -> None:
"""抓取并计算该账号的同行热卖店铺,写入缓存。"""
async with _state_lock:
_progress[cookie_id] = {
"state": "running", "done": 0, "total": MAX_KEYWORDS,
"stage": "提取店铺类型关键词", "error": "", "started_at": time.time(),
}
try:
features = _user_features(db_manager, cookie_id)
keywords = features["keywords"]
if not keywords:
async with _state_lock:
_progress[cookie_id] = {
"state": "error", "done": 0, "total": 0, "stage": "",
"error": "没有可分析的商品,请先在商品管理同步商品。", "started_at": time.time(),
}
return
client = XianyuSellerAPI(cookie_id, cookies_str)
risk_hit = ""
# 聚合:加密 seller_id -> 店铺
shops: Dict[str, Dict[str, Any]] = {}
done = 0
total = len(keywords) * PAGES_PER_KEYWORD
async with _state_lock:
_progress[cookie_id].update({"total": total, "stage": "搜索同类型商品"})
for keyword in keywords:
for page in range(1, PAGES_PER_KEYWORD + 1):
if risk_hit:
break
async with _state_lock:
_progress[cookie_id].update({"done": done, "stage": f"搜索:{keyword}"})
try:
result = await client._call_buyer(
"mtop.taobao.idlemtopsearch.pc.search",
{"keyword": keyword, "page": page, "pageSize": 10},
spm_cnt="a21ybx.search.0.0",
)
except SellerApiError as exc:
message = str(exc)
if is_risk_control_error(message):
risk_hit = message
logger.warning(f"同行店铺 命中风控,中止搜索: {message}")
break
logger.warning(f"同行店铺 {keyword} p{page} 失败: {message}")
done += 1
continue
except Exception as exc:
logger.warning(f"同行店铺 {keyword} p{page} 异常: {exc}")
done += 1
continue
for item in _parse_search(result):
sid = item["seller_id"]
if not sid:
continue
agg = shops.get(sid)
if agg is None:
agg = {
"seller_id": sid,
"nicks": set(),
"titles": [],
"item_ids": [],
"images": [],
"areas": set(),
"search_deals": -1,
"search_credit": "",
"keywords_hit": set(),
"prices": [],
}
shops[sid] = agg
if item["seller"]:
agg["nicks"].add(item["seller"])
if len(agg["titles"]) < 6:
agg["titles"].append(item["title"])
if len(agg["item_ids"]) < 4:
agg["item_ids"].append(item["item_id"])
if item["image"] and len(agg["images"]) < 3:
agg["images"].append(item["image"])
if item["area"]:
agg["areas"].add(item["area"])
if item["seller_deals"] > agg["search_deals"]:
agg["search_deals"] = item["seller_deals"]
if not agg["search_credit"] and item["seller_credit"]:
agg["search_credit"] = item["seller_credit"]
agg["keywords_hit"].add(keyword)
p = _price_num(item["price"])
if p > 0:
agg["prices"].append(p)
done += 1
await asyncio.sleep(SEARCH_GAP)
if risk_hit:
break
if not shops:
async with _state_lock:
_progress[cookie_id] = {
"state": "error", "done": done, "total": total, "stage": "",
"error": "搜索未拿到任何同类型店铺" + ("(命中风控,稍后再试)" if risk_hit else ""),
"started_at": time.time(),
}
return
# 按搜索成交量排序,取前 CANDIDATE_TOP 逐店补详情
ordered = sorted(
shops.values(),
key=lambda s: (s["search_deals"], len(s["item_ids"])),
reverse=True,
)[:CANDIDATE_TOP]
async with _state_lock:
_progress[cookie_id].update({
"done": 0, "total": len(ordered), "stage": "补齐店铺详情(销量/信用/主页)",
})
enriched: List[Dict[str, Any]] = []
user_terms = features["term_set"]
user_price = features["med_price"]
for idx, agg in enumerate(ordered):
async with _state_lock:
_progress[cookie_id].update({"done": idx, "stage": "补齐店铺详情"})
if not agg["item_ids"]:
continue
detail: Dict[str, Any] = {}
for item_id in agg["item_ids"]:
if risk_hit:
break
try:
resp = await client._call_buyer(
"mtop.taobao.idle.pc.detail",
{"itemId": str(item_id)},
spm_cnt="a21ybx.detail.0.0",
)
data = resp.get("data") or {}
seller_do = data.get("sellerDO") or {}
if seller_do.get("sellerId"):
detail = data
break
except SellerApiError as exc:
message = str(exc)
if is_risk_control_error(message):
risk_hit = message
logger.warning(f"同行店铺 详情命中风控,停止补齐: {message}")
break
await asyncio.sleep(DETAIL_GAP)
continue
except Exception as exc:
logger.debug(f"同行店铺 detail {item_id} 异常: {exc}")
await asyncio.sleep(DETAIL_GAP)
continue
await asyncio.sleep(DETAIL_GAP)
if risk_hit and not detail:
break
if not detail:
continue
seller_do = detail.get("sellerDO") or {}
remark = detail.get("remarkDO") or {}
credit_tag = detail.get("idleFishCreditTag") or {}
tags = [str(t.get("text") or "") for t in (detail.get("sellerInfoTags") or []) if t.get("text")]
seller_id_plain = str(seller_do.get("sellerId") or "").strip()
if not seller_id_plain:
continue
nick = str(seller_do.get("nick") or "").strip() or (
sorted(agg["nicks"])[0] if agg["nicks"] else "未知店铺")
try:
sold = int(seller_do.get("hasSoldNumInteger") or 0)
except (TypeError, ValueError):
sold = 0
try:
credit_level = int((credit_tag.get("trackParams") or {}).get("sellerLevel") or 0)
except (TypeError, ValueError):
credit_level = 0
try:
good_rate = float(str(seller_do.get("newGoodRatioRate") or "0").replace("%", "") or 0)
except ValueError:
good_rate = 0.0
try:
good = int(remark.get("praise") or 0)
bad = int(remark.get("poor") or 0)
mid = int(remark.get("middle") or 0)
except (TypeError, ValueError):
good = bad = mid = 0
# 店铺词集:命中商品标题 + 店铺标签
shop_terms: set = set()
for t in agg["titles"]:
shop_terms.update(_extract_terms(t))
for t in tags:
shop_terms.update(_extract_terms(t))
prices = agg["prices"] or ([user_price] if user_price else [0])
shop_price = statistics.median([p for p in prices if p > 0] or [0])
sim = _similarity(
shop_terms, user_terms, shop_price, user_price,
len(agg.get("keywords_hit") or ()), len(keywords),
)
value = _value_score(sim, sold or agg["search_deals"], credit_level, good_rate)
enriched.append({
"nick": nick,
"seller_id": seller_id_plain,
"url": f"https://www.goofish.com/personal?userId={seller_id_plain}",
"item_url": f"https://www.goofish.com/item?id={agg['item_ids'][0]}",
"avatar": str(seller_do.get("avatarUrl") or ""),
"items_seen": len(agg["item_ids"]),
"titles": agg["titles"][:3],
"images": agg["images"][:2],
"search_deals": agg["search_deals"],
"search_credit": agg["search_credit"],
"sold": sold,
"credit_level": credit_level,
"good": good, "mid": mid, "bad": bad,
"good_rate": good_rate,
"city": str(seller_do.get("city") or ""),
"signature": str(seller_do.get("signature") or ""),
"tags": tags[:6],
"area": sorted(agg["areas"])[0] if agg["areas"] else "",
"price_avg": round(shop_price, 1) if shop_price else 0,
"similarity": sim,
"value_score": value,
"credit_sort": _credit_sort(credit_level, agg.get("search_credit") or ""),
"keywords_hit": sorted(agg.get("keywords_hit") or ()),
})
if len(enriched) >= SHOPS_TOP and risk_hit:
break
enriched.sort(key=lambda e: e["sold"], reverse=True)
enriched = enriched[:SHOPS_TOP]
for i, e in enumerate(enriched, 1):
e["rank"] = i
fail_msg = "详情补齐失败,请稍后重试。"
if risk_hit:
fail_msg = "命中闲鱼风控(请求过于频繁),请稍等几分钟再点「重新抓取」。"
result_payload = {
"status": "ok" if enriched else "error",
"updated_at": time.time(),
"risk_hit": risk_hit,
"keywords": keywords,
"user": {
"items_count": features["items_count"],
"med_price": user_price,
"terms_preview": features["terms"][:20],
"categories": features["categories"][:5],
},
"shops": enriched,
"error": "" if enriched else fail_msg,
}
async with _state_lock:
_cache[cookie_id] = result_payload
_progress[cookie_id] = {
"state": "done", "done": len(enriched), "total": len(enriched),
"stage": "", "error": "", "started_at": time.time(),
}
_last_refresh[cookie_id] = time.time()
_save_cache()
logger.info(f"同行热卖店铺[{cookie_id}] 刷新完成: {len(enriched)} 家,关键词={keywords}")
except Exception as exc: # noqa: BLE001 —— 任何异常都要落进状态,供前端展示
logger.exception(f"同行店铺刷新失败: {exc}")
async with _state_lock:
_progress[cookie_id] = {
"state": "error", "done": 0, "total": 0, "stage": "",
"error": f"刷新失败: {exc}", "started_at": time.time(),
}
# --------------------------------------------------------------------------- #
# 路由
# --------------------------------------------------------------------------- #
class AnalyzeRequest(BaseModel):
cookie_id: str = Field("", alias="cookie_id")
class Config:
populate_by_name = True
class RefreshRequest(BaseModel):
cookie_id: str = Field("", alias="cookie_id")
class Config:
populate_by_name = True
def create_peer_shops_router(get_current_user: Callable, db_manager) -> APIRouter:
router = APIRouter()
@router.get("/peer-shops")
async def get_peer_shops(
cookie_id: str = "",
current_user: Dict[str, Any] = Depends(get_current_user),
) -> Dict[str, Any]:
"""读缓存;带 ?refresh=1 时触发后台刷新(单飞)。"""
if not cookie_id:
raise HTTPException(status_code=400, detail="cookie_id 不能为空")
async with _state_lock:
prog = dict(_progress.get(cookie_id) or {"state": "idle", "done": 0, "total": 0, "stage": "", "error": ""})
cached = _cache.get(cookie_id)
return {
"status": "ok",
"progress": prog,
"refreshing": prog.get("state") == "running",
"data": cached,
}
@router.post("/peer-shops/refresh")
async def refresh_peer_shops(
req: RefreshRequest,
current_user: Dict[str, Any] = Depends(get_current_user),
) -> Dict[str, Any]:
cookie_id = (req.cookie_id or "").strip()
if not cookie_id:
raise HTTPException(status_code=400, detail="cookie_id 不能为空")
async with _state_lock:
prog = _progress.get(cookie_id)
if prog and prog.get("state") == "running":
return {"status": "running"}
cookies_str = db_manager.get_cookie(cookie_id)
if not cookies_str:
raise HTTPException(status_code=400, detail="该账号 Cookie 不可用,请先扫码登录")
asyncio.create_task(_refresh(cookie_id, cookies_str, db_manager))
return {"status": "started"}
@router.post("/peer-shops/ai-analyze")
async def ai_analyze(
req: AnalyzeRequest,
current_user: Dict[str, Any] = Depends(get_current_user),
) -> Dict[str, Any]:
"""AI 一键分析:哪家同行最适合自己店铺(需配置模型 KEY)。"""
cookie_id = (req.cookie_id or "").strip()
if not cookie_id:
raise HTTPException(status_code=400, detail="cookie_id 不能为空")
settings = db_manager.get_ai_reply_settings(cookie_id)
api_key = (settings.get("api_key") or "").strip()
if not api_key:
return {
"status": "need_api_key",
"message": "尚未配置模型 KEY,请先在「AI 回复设置」填写模型 KEY 再使用 AI 分析。",
}
data = _cache.get(cookie_id)
if not data or not data.get("shops"):
return {"status": "need_data", "message": "还没有同行店铺数据,请先点击「开始分析」抓取数据。"}
user = data.get("user") or {}
shops = data.get("shops") or []
top = sorted(shops, key=lambda s: s.get("value_score", 0), reverse=True)[:20]
lines = []
for s in top:
lines.append(
f"- {s.get('nick')}|销量{s.get('sold')}|信用{s.get('credit_level')}级"
f"|好评率{s.get('good_rate')}%|相似度{s.get('similarity')}"
f"|参考价值{s.get('value_score')}|城市{s.get('city') or '-'}"
f"|标签({'、'.join(s.get('tags') or []) or '-'})"
f"|主营线索: {';'.join(s.get('titles') or [])[:120]}"
)
prompt = (
"你是闲鱼店铺运营顾问。下面是我的店铺情况和同类型销量最好的同行店铺数据。"
"请分析哪几家同行最适合我参考(综合类型匹配度、销量、信用、好评率),"
"并给出 3 条可落地的行动建议(选品/定价/标题优化方向)。\n\n"
f"我的店铺:已同步商品 {user.get('items_count', 0)} 件,价格中位数 ¥{user.get('med_price', 0)},"
f"类目线索:{'、'.join(user.get('categories') or []) or '-'},"
f"商品关键词线索:{'、'.join((user.get('terms_preview') or [])[:12])}\n\n"
f"同类型同行(按参考价值排序前 {len(top)} 家):\n" + "\n".join(lines) + "\n\n"
"要求:先给出「最适合参考的 3 家店铺 +每家一句理由」,再给「3 条行动建议」。"
"用中文,直接输出面向店主的可读文本,不要 JSON。"
)
try:
from openai import OpenAI
client = OpenAI(
api_key=api_key,
base_url=(settings.get("base_url") or "").strip() or None,
timeout=REQUEST_TIMEOUT,
max_retries=0,
default_headers={
"User-Agent": settings.get("user_agent")
or "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
},
)
model_name = (
(settings.get("model_name") or settings.get("model") or "").strip() or "qwen-plus"
)
extra = None
try:
extra = {"enable_thinking": False}
except Exception:
extra = None
response = client.chat.completions.create(
model=model_name,
messages=[{"role": "user", "content": prompt}],
temperature=0.4,
max_tokens=3000,
extra_body=extra,
)
text = (response.choices[0].message.content or "").strip()
if not text:
return {"status": "error", "message": "模型没有返回内容,请重试。"}
return {"status": "ok", "analysis": text, "model": model_name}
except Exception as exc: # noqa: BLE001
logger.exception("同行店铺 AI 分析失败")
return {"status": "error", "message": f"AI 分析失败: {exc}"}
return router
+9 -1
View File
@@ -25,6 +25,7 @@ const About = lazy(() => import('./components/About'));
const BuyerInteraction = lazy(() => import('./components/BuyerInteraction'));
const Resell = lazy(() => import('./components/Resell'));
const HotList = lazy(() => import('./components/HotList'));
const PeerShops = lazy(() => import('./components/PeerShops'));
const PriceWatch = lazy(() => import('./components/PriceWatch'));
const Help = lazy(() => import('./components/Help'));
@@ -41,6 +42,7 @@ const pageLabels: Record<string, string> = {
items: '商品与发货',
resell: '一键转卖',
hotlist: '实时热卖榜',
peershops: '同行热卖店铺',
pricewatch: '价格监控',
orders: '订单管理',
'buyer-interaction': '买家互动',
@@ -528,7 +530,10 @@ const App: React.FC = () => {
)}
<p className="mt-7 border-t border-gray-100 pt-5 text-xs font-medium text-gray-400">
躺赚鱼 · www.88531.cn
更多开源应用:
<a href="https://nav.88531.cn" target="_blank" rel="noopener noreferrer" className="text-[var(--brand-text)] hover:underline">
https://nav.88531.cn
</a>
</p>
</div>
</div>
@@ -597,6 +602,9 @@ const App: React.FC = () => {
<section hidden={activeTab !== 'hotlist'}>
<Suspense fallback={activeTab === 'hotlist' ? <PageLoader /> : null}><HotList /></Suspense>
</section>
<section hidden={activeTab !== 'peershops'}>
<Suspense fallback={activeTab === 'peershops' ? <PageLoader /> : null}><PeerShops /></Suspense>
</section>
<section hidden={activeTab !== 'pricewatch'}>
<Suspense fallback={activeTab === 'pricewatch' ? <PageLoader /> : null}><PriceWatch /></Suspense>
</section>
+4 -4
View File
@@ -4,11 +4,11 @@ import { getAnnouncement } from '../services/api';
import { AnnouncementPayload } from '../types';
import { EmptyState, PageHeader } from './ui';
// 对外入口统一指向自己的站点与仓库,不指向原作者的地址
// 对外入口:更多精品应用导航页 + 自己的开源仓库(tangzhuan-yu)
const SITE_URL = 'https://nav.88531.cn';
const SITE_LABEL = 'nav.88531.cn';
const REPO_URL = 'https://gitea.88531.cn/jinghui/xianyu-auto-reply';
const REPO_LABEL = 'jinghui/xianyu-auto-reply';
const REPO_URL = 'https://gitea.88531.cn/jinghui/tangzhuan-yu';
const REPO_LABEL = 'jinghui/tangzhuan-yu';
const CONTACT_EMAIL = '3970260761@qq.com';
const levelStyles: Record<string, string> = {
@@ -123,7 +123,7 @@ const About: React.FC = () => {
<div className="mt-4 grid gap-3 border-t border-gray-100 pt-4 sm:grid-cols-2 lg:grid-cols-3">
<div className="flex min-w-0 flex-col gap-1.5">
<span className="text-xs font-semibold text-gray-500">官网</span>
<span className="text-xs font-semibold text-gray-500">更多精品应用</span>
<a
href={SITE_URL}
target="_blank"
+491
View File
@@ -0,0 +1,491 @@
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import {
Building2,
ExternalLink,
Loader2,
RefreshCw,
Sparkles,
TrendingUp,
} from 'lucide-react';
import { PeerShop, PeerShopsData } from '../types';
import {
analyzePeerShops,
getAccountDetails,
getPeerShops,
refreshPeerShops,
} from '../services/api';
import { EmptyState, NoticeBanner, PageHeader, PageLoading } from './ui';
type Notice = { type: 'success' | 'error' | 'info'; message: string } | null;
type SortKey = 'sold' | 'similarity' | 'credit' | 'reviews';
/** 刷新中轮询间隔(毫秒) */
const POLL_INTERVAL = 2500;
const SORT_OPTIONS: { id: SortKey; label: string }[] = [
{ id: 'sold', label: '按销量' },
{ id: 'similarity', label: '按相似度' },
{ id: 'credit', label: '按信用' },
{ id: 'reviews', label: '按评论数' },
];
/** 4225 → "4225",26000 → "2.6万" */
const formatNum = (n: number): string => {
if (!n || n < 0) return '0';
return n >= 10000 ? `${(n / 10000).toFixed(1).replace(/\.0$/, '')}万` : String(n);
};
/** 秒级时间戳 → "3天前" / "2小时前" */
const formatAge = (ts: number): string => {
if (!ts) return '—';
const diff = Date.now() - ts * 1000;
if (diff < 60_000) return '刚刚';
if (diff < 3_600_000) return `${Math.floor(diff / 60_000)}分钟前`;
if (diff < 86_400_000) return `${Math.floor(diff / 3_600_000)}小时前`;
if (diff < 7 * 86_400_000) return `${Math.floor(diff / 86_400_000)}天前`;
const d = new Date(ts * 1000);
return `${d.getMonth() + 1}月${d.getDate()}日`;
};
/** 相似度/参考价值徽章:高分绿、中分蓝、低分灰 */
const ScoreBadge: React.FC<{ value: number; max?: number; suffix?: string }> = ({
value,
max = 100,
suffix = '',
}) => {
const pct = max > 0 ? value / max : 0;
const cls =
pct >= 0.7
? 'bg-emerald-100 text-emerald-700'
: pct >= 0.4
? 'bg-sky-100 text-sky-700'
: 'bg-[var(--surface-subtle)] text-[var(--text-soft)]';
return (
<span className={`inline-flex min-w-[3rem] justify-center rounded-full px-2 py-0.5 text-xs font-semibold ${cls}`}>
{value}
{suffix}
</span>
);
};
/** 信用等级:5 星样式(level 1-5),无数据时显示搜索信号文案 */
const CreditCell: React.FC<{ level: number; fallback: string }> = ({ level, fallback }) => {
if (!level) {
return (
<span className="text-xs text-[var(--text-soft)]" title={fallback}>
{fallback || '—'}
</span>
);
}
return (
<span className="inline-flex items-center gap-1 text-xs font-medium text-amber-600" title={`信用等级 ${level} 级`}>
{'★'.repeat(level)}
<span className="text-[var(--text-soft)] font-normal">{level}级</span>
</span>
);
};
const PeerShops: React.FC = () => {
const [loading, setLoading] = useState(true);
const [cookieId, setCookieId] = useState('');
const [data, setData] = useState<PeerShopsData | null>(null);
const [refreshing, setRefreshing] = useState(false);
const [progress, setProgress] = useState<{ done: number; total: number; stage: string } | null>(null);
const [sortKey, setSortKey] = useState<SortKey>('sold');
const [notice, setNotice] = useState<Notice>(null);
const [aiText, setAiText] = useState('');
const [aiModel, setAiModel] = useState('');
const [aiLoading, setAiLoading] = useState(false);
const pollRef = useRef<ReturnType<typeof setInterval> | null>(null);
const stopPolling = useCallback(() => {
if (pollRef.current) {
clearInterval(pollRef.current);
pollRef.current = null;
}
setRefreshing(false);
setProgress(null);
}, []);
const load = useCallback(async (id: string) => {
try {
const res = await getPeerShops(id);
if (res.data) setData(res.data);
if (res.refreshing) {
setRefreshing(true);
setProgress({
done: res.progress?.done ?? 0,
total: res.progress?.total ?? 0,
stage: res.progress?.stage || '抓取中',
});
}
if (res.progress?.state === 'error' && res.progress.error) {
setNotice({ type: 'error', message: res.progress.error });
}
} catch (err) {
console.error('加载同行店铺失败:', err);
}
}, []);
// 初始化:取第一个账号
useEffect(() => {
let alive = true;
(async () => {
try {
const accounts = await getAccountDetails();
const first = accounts[0];
if (!alive) return;
if (!first) {
setNotice({ type: 'info', message: '请先在「账号管理」添加账号并同步商品,再回到本页。' });
setLoading(false);
return;
}
setCookieId(first.id);
await load(first.id);
} catch (err) {
console.error('初始化同行店铺失败:', err);
} finally {
if (alive) setLoading(false);
}
})();
return () => {
alive = false;
if (pollRef.current) clearInterval(pollRef.current);
};
}, [load]);
// 刷新轮询
useEffect(() => {
if (!refreshing || !cookieId) return;
pollRef.current = setInterval(async () => {
try {
const res = await getPeerShops(cookieId);
setProgress({
done: res.progress?.done ?? 0,
total: res.progress?.total ?? 0,
stage: res.progress?.stage || '抓取中',
});
if (res.progress?.state === 'done') {
stopPolling();
if (res.data) setData(res.data);
setNotice({ type: 'success', message: '同行店铺数据已更新。' });
} else if (res.progress?.state === 'error') {
stopPolling();
setNotice({ type: 'error', message: res.progress.error || '抓取失败,请稍后重试。' });
}
} catch (err) {
console.error('轮询同行店铺失败:', err);
}
}, POLL_INTERVAL);
return () => {
if (pollRef.current) clearInterval(pollRef.current);
};
}, [refreshing, cookieId, stopPolling]);
const triggerRefresh = useCallback(async () => {
if (!cookieId || refreshing) return;
setNotice(null);
setAiText('');
try {
const res = await refreshPeerShops(cookieId);
if (res.status === 'running') {
setRefreshing(true);
return;
}
setRefreshing(true);
setProgress({ done: 0, total: 0, stage: '准备抓取' });
} catch (err: any) {
const msg = err?.response?.data?.detail || err?.message || '触发刷新失败';
setNotice({ type: 'error', message: String(msg) });
}
}, [cookieId, refreshing]);
const runAiAnalyze = useCallback(async () => {
if (!cookieId || aiLoading) return;
setAiLoading(true);
setNotice(null);
try {
const res = await analyzePeerShops(cookieId);
if (res.status === 'ok' && res.analysis) {
setAiText(res.analysis);
setAiModel(res.model || '');
} else if (res.status === 'need_api_key') {
setNotice({
type: 'info',
message: res.message || '尚未配置模型 KEY,请先在「AI 回复设置」填写模型 KEY。',
});
} else {
setNotice({ type: 'error', message: res.message || 'AI 分析失败,请稍后重试。' });
}
} catch (err: any) {
const msg = err?.response?.data?.detail || err?.message || 'AI 分析失败';
setNotice({ type: 'error', message: String(msg) });
} finally {
setAiLoading(false);
}
}, [cookieId, aiLoading]);
const shops = useMemo(() => {
const list = [...(data?.shops || [])];
const bySort: Record<SortKey, (a: PeerShop, b: PeerShop) => number> = {
sold: (a, b) => b.sold - a.sold || b.search_deals - a.search_deals,
similarity: (a, b) => b.similarity - a.similarity || b.value_score - a.value_score,
credit: (a, b) => (b.credit_sort ?? b.credit_level) - (a.credit_sort ?? a.credit_level) || b.good_rate - a.good_rate,
reviews: (a, b) => b.good + b.mid + b.bad - (a.good + a.mid + a.bad) || b.good - a.good,
};
return list.sort(bySort[sortKey]);
}, [data, sortKey]);
if (loading) return <PageLoading label="正在加载同行店铺" />;
const user = data?.user;
const updatedLabel = data?.updated_at ? formatAge(data.updated_at) : '尚未生成';
return (
<div className="flex flex-col gap-4">
<PageHeader
title="同行热卖店铺"
description="按您店铺的类型,从闲鱼实时搜索聚合同类型销量最好的 50 家店铺,给出与您店铺的相似度和参考价值。"
icon={Building2}
badge={
<span className="rounded-full bg-[var(--surface-subtle)] px-2 py-0.5 text-xs text-[var(--text-soft)]">
{data ? `更新于 ${updatedLabel}` : '待生成'}
</span>
}
actions={
<div className="flex flex-wrap items-center gap-2">
<button
type="button"
className="ios-btn-secondary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm"
onClick={() => void runAiAnalyze()}
disabled={aiLoading || !data?.shops?.length}
title={data?.shops?.length ? '用模型 KEY 一键分析最适合您店铺的同行' : '先抓取数据后再分析'}
>
{aiLoading ? <Loader2 className="h-4 w-4 animate-spin" /> : <Sparkles className="h-4 w-4" />}
{aiLoading ? 'AI 分析中…' : 'AI 一键分析'}
</button>
<button
type="button"
className="ios-btn-primary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm"
onClick={() => void triggerRefresh()}
disabled={refreshing || !cookieId}
>
{refreshing ? <Loader2 className="h-4 w-4 animate-spin" /> : <RefreshCw className="h-4 w-4" />}
{refreshing ? '抓取中…' : data ? '重新抓取' : '开始分析'}
</button>
</div>
}
/>
{notice && (
<NoticeBanner
type={notice.type === 'info' ? 'success' : notice.type}
message={notice.message}
onClose={() => setNotice(null)}
/>
)}
{refreshing && (
<div className="section-panel">
<div className="flex items-center gap-3 text-sm text-[var(--text-soft)]">
<Loader2 className="h-4 w-4 animate-spin text-[#ff4400]" />
<span>
{progress?.stage || '抓取中…'}
{progress && progress.total > 0 ? `(${progress.done}/${progress.total})` : ''}
</span>
</div>
{progress && progress.total > 0 && (
<div className="mt-2 h-1.5 w-full overflow-hidden rounded-full bg-[var(--surface-subtle)]">
<div
className="h-full rounded-full bg-[#ff4400] transition-all"
style={{ width: `${Math.min(100, Math.round((progress.done / progress.total) * 100))}%` }}
/>
</div>
)}
<p className="mt-2 text-xs text-[var(--text-soft)]">
约需 1 分钟:按店铺类型搜索 → 聚合高销量店铺 → 逐店补齐销量/信用/主页。
</p>
</div>
)}
{user && (
<div className="section-panel flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-[var(--text-soft)]">
<span>您的店铺:已同步 {user.items_count} 件商品</span>
{user.med_price > 0 && <span>价格中位数 ¥{user.med_price}</span>}
{user.categories?.length > 0 && <span>类目:{user.categories.slice(0, 3).join('、')}</span>}
{data?.keywords?.length > 0 && <span>匹配关键词:{data.keywords.slice(0, 5).join('、')}</span>}
</div>
)}
{aiText && (
<div className="section-panel">
<div className="mb-2 flex items-center gap-2 text-sm font-semibold">
<Sparkles className="h-4 w-4 text-amber-500" />
AI 分析结果
{aiModel && <span className="text-xs font-normal text-[var(--text-soft)]">({aiModel})</span>}
</div>
<div className="whitespace-pre-wrap text-sm leading-6 text-[var(--text)]">{aiText}</div>
</div>
)}
{!data && !refreshing && (
<EmptyState
title="还没有同行店铺数据"
description="点击右上角「开始分析」,将按您店铺的类型搜索闲鱼同类型高销量店铺,并计算相似度与参考价值。需要先在账号管理添加账号并同步商品。"
icon={TrendingUp}
/>
)}
{data && shops.length === 0 && !refreshing && (
<EmptyState
title={data.error || '没有拿到同类型店铺'}
description="可能是搜索命中风控或关键词过窄,稍后点「重新抓取」再试。"
icon={Building2}
/>
)}
{shops.length > 0 && (
<div className="section-panel">
<div className="mb-3 flex flex-wrap items-center justify-between gap-2">
<div className="flex items-center gap-1 rounded-lg bg-[var(--surface-subtle)] p-1">
{SORT_OPTIONS.map(opt => (
<button
key={opt.id}
type="button"
onClick={() => setSortKey(opt.id)}
className={`rounded-md px-3 py-1.5 text-xs font-medium transition ${
sortKey === opt.id
? 'bg-white text-[var(--text)] shadow-sm'
: 'text-[var(--text-soft)] hover:text-[var(--text)]'
}`}
>
{opt.label}
</button>
))}
</div>
<span className="text-xs text-[var(--text-soft)]">
共 {shops.length} 家 · 默认按销量排序 · 点击店铺名查看闲鱼店铺全部商品
</span>
</div>
<div className="overflow-x-auto">
<table className="w-full min-w-[860px] text-sm">
<thead>
<tr className="border-b border-[var(--border)] text-left text-xs text-[var(--text-soft)]">
<th className="py-2 pr-3 font-medium">排名</th>
<th className="py-2 pr-3 font-medium">店铺</th>
<th className="py-2 pr-3 text-right font-medium">销量</th>
<th className="py-2 pr-3 font-medium">信用</th>
<th className="py-2 pr-3 text-right font-medium">评论数</th>
<th className="py-2 pr-3 text-right font-medium">相似度</th>
<th className="py-2 pr-3 text-right font-medium">参考价值</th>
<th className="py-2 text-right font-medium">操作</th>
</tr>
</thead>
<tbody>
{shops.map(shop => {
const reviews = Math.max(0, shop.good) + Math.max(0, shop.mid) + Math.max(0, shop.bad);
return (
<tr
key={shop.seller_id || shop.url}
className="border-b border-[var(--border)] last:border-0 hover:bg-[var(--surface-subtle)]"
>
<td className="py-2.5 pr-3">
<span
className={`inline-flex h-6 w-6 items-center justify-center rounded-full text-xs font-bold ${
shop.rank === 1
? 'bg-amber-400 text-white'
: shop.rank === 2
? 'bg-gray-300 text-gray-700'
: shop.rank === 3
? 'bg-orange-300 text-orange-900'
: 'bg-[var(--surface-subtle)] text-[var(--text-soft)]'
}`}
>
{shop.rank}
</span>
</td>
<td className="py-2.5 pr-3">
<a
href={shop.url}
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-1.5 font-medium text-[var(--text)] hover:text-[#ff4400] hover:underline"
title={`在闲鱼查看「${shop.nick}」的店铺详情与全部商品`}
>
{shop.nick}
<ExternalLink className="h-3.5 w-3.5 shrink-0 text-[var(--text-soft)]" />
</a>
<div className="mt-0.5 flex flex-wrap items-center gap-x-2 text-xs text-[var(--text-soft)]">
{shop.city && <span>{shop.city}</span>}
{shop.tags?.slice(0, 2).map(t => (
<span key={t} className="rounded bg-[var(--surface-subtle)] px-1.5 py-0.5">
{t}
</span>
))}
{shop.price_avg > 0 && <span>均价 ¥{shop.price_avg}</span>}
{!!shop.keywords_hit?.length && (
<span
className="rounded bg-[var(--surface-subtle)] px-1.5 py-0.5 text-[var(--text-soft)]"
title={`命中类型关键词:${shop.keywords_hit.join('、')}`}
>
命中{shop.keywords_hit.length}词
</span>
)}
</div>
</td>
<td className="py-2.5 pr-3 text-right font-semibold">{formatNum(shop.sold)}</td>
<td className="py-2.5 pr-3">
<CreditCell level={shop.credit_level} fallback={shop.search_credit} />
</td>
<td className="py-2.5 pr-3 text-right" title={`好评 ${shop.good} / 中评 ${shop.mid} / 差评 ${shop.bad}`}>
<span className="font-medium">{formatNum(reviews)}</span>
{shop.good_rate > 0 && (
<span className="ml-1 text-xs text-emerald-600">{shop.good_rate}%</span>
)}
</td>
<td className="py-2.5 pr-3 text-right">
<ScoreBadge value={shop.similarity} />
</td>
<td className="py-2.5 pr-3 text-right">
<ScoreBadge value={shop.value_score} />
</td>
<td className="py-2.5 text-right">
<div className="flex items-center justify-end gap-2">
<a
href={shop.url}
target="_blank"
rel="noopener noreferrer"
className="rounded-md border border-[var(--border)] px-2 py-1 text-xs hover:border-[#ff4400] hover:text-[#ff4400]"
>
店铺
</a>
<a
href={shop.item_url}
target="_blank"
rel="noopener noreferrer"
className="rounded-md border border-[var(--border)] px-2 py-1 text-xs hover:border-[#ff4400] hover:text-[#ff4400]"
>
商品
</a>
</div>
</td>
</tr>
);
})}
</tbody>
</table>
</div>
<p className="mt-3 text-xs leading-5 text-[var(--text-soft)]">
相似度 = 与您店铺商品词集的重合度(含价格带接近度);参考价值 = 相似度 40% + 销量 25% + 信用 20% + 好评率 15%。
数据来自闲鱼实时搜索,每次抓取约 1 分钟,可点「重新抓取」更新。
</p>
</div>
)}
</div>
);
};
export default PeerShops;
+2
View File
@@ -6,6 +6,7 @@ import {
Bot,
Box,
ChevronUp,
Building2,
CreditCard,
KeyRound,
LayoutDashboard,
@@ -80,6 +81,7 @@ const Sidebar: React.FC<SidebarProps> = ({ activeTab, setActiveTab, onLogout, mo
{ id: 'items', icon: Box, label: '商品与发货' },
{ id: 'resell', icon: Store, label: '一键转卖' },
{ id: 'hotlist', icon: Flame, label: '实时热卖榜' },
{ id: 'peershops', icon: Building2, label: '同行热卖店铺' },
{ id: 'pricewatch', icon: TrendingDown, label: '价格监控' },
{ id: 'orders', icon: ShoppingBag, label: '订单管理' },
{ id: 'buyer-interaction', icon: Star, label: '买家互动' },
+17
View File
@@ -1682,3 +1682,20 @@ export const getAiOptimizePreview = async (cookieId: string): Promise<import('..
export const getAiOptimizeSuggest = async (cookieId: string): Promise<import('../types').AiOptimizeResult> =>
// 后端单次模型调用 130s 超时 + 失败重试一次,最坏约 4.5 分钟,前端放宽到 6 分钟
post('/ai-optimize/suggest', { cookie_id: cookieId }, { timeout: 360000 });
// ==================== 同行热卖店铺 ====================
/** 同行热卖店铺:读缓存与抓取进度(data 为 null 表示还没抓过)。 */
export const getPeerShops = async (cookieId: string): Promise<import('../types').PeerShopsResponse> =>
get('/peer-shops', { cookie_id: cookieId });
/** 触发后台抓取(搜索同类型商品 → 聚合店铺 → 补齐详情),前端轮询 getPeerShops 看进度。 */
export const refreshPeerShops = async (cookieId: string): Promise<{ status: string }> =>
post('/peer-shops/refresh', { cookie_id: cookieId });
/** AI 一键分析哪家同行最适合自己店铺(需已配置模型 KEY)。 */
export const analyzePeerShops = async (
cookieId: string,
): Promise<{ status: string; analysis?: string; message?: string; model?: string }> =>
post('/peer-shops/ai-analyze', { cookie_id: cookieId }, { timeout: 360000 });
+75
View File
@@ -916,3 +916,78 @@ export interface AiOptimizeResult {
truncated?: boolean;
model?: string;
}
// ==================== 同行热卖店铺 ====================
/** 同类型销量最好的同行店铺(后端 peer_shops 聚合 + 详情补齐) */
export interface PeerShop {
rank: number;
nick: string;
/** 闲鱼明文卖家 ID(详情接口 sellerDO.sellerId) */
seller_id: string;
/** 店铺主页(goofish.com/personal?userId=) */
url: string;
/** 代表商品链接 */
item_url: string;
avatar?: string;
/** 搜索命中的该店商品数 */
items_seen: number;
/** 该店命中商品标题线索 */
titles: string[];
images: string[];
/** 搜索信号:N 条评价(成交量)/ 信用标签 */
search_deals: number;
search_credit: string;
/** 累计销量(详情接口) */
sold: number;
/** 信用等级 1-5 */
credit_level: number;
good: number;
mid: number;
bad: number;
/** 好评率百分比(97 = 97%) */
good_rate: number;
city: string;
signature: string;
/** 店铺标签(主营线索) */
tags: string[];
area: string;
price_avg: number;
/** 与用户店铺的相似度 0-100 */
similarity: number;
/** 参考价值 0-100(相似度/销量/信用/好评率加权) */
value_score: number;
/** 信用排序键:等级×10,无等级时按搜索信号文本(极好=5…较差=1) */
credit_sort?: number;
/** 该店命中的我的类型关键词 */
keywords_hit?: string[];
}
export interface PeerShopsData {
status: string;
/** 秒级时间戳 */
updated_at: number;
risk_hit: string;
keywords: string[];
user: {
items_count: number;
med_price: number;
terms_preview: string[];
categories: string[];
};
shops: PeerShop[];
error: string;
}
export interface PeerShopsResponse {
status: string;
progress: {
state: 'idle' | 'running' | 'done' | 'error';
done: number;
total: number;
stage: string;
error: string;
};
refreshing: boolean;
data: PeerShopsData | null;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 743 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 291 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

@@ -1 +1 @@
import{r as l,o as O,n as i,z as k,j as e,B as j,L as A,E as H,aE as q,S,K as z,aR as B}from"./index-CkAjw-Zl.js";import{P as F,a as U,E as D,S as o}from"./ui-DGhuFsSA.js";import{S as $}from"./save-2L2g6g1L.js";import{M as E}from"./message-square-text-DqMbrfJm.js";import{E as G}from"./eye-off-DVn7pRcv.js";import{E as J}from"./eye-vwq0YQk5.js";import{P as C}from"./play-BTeYe-0U.js";const I="https://ai.88531.cn/v1",Q="https://ai.88531.cn",f={ai_enabled:!1,model_name:"qwen-plus",api_key:"",api_key_configured:!1,base_url:I,user_agent:"codex_cli_rs/0.0.0 (Hermes Agent)",max_discount_percent:10,max_discount_amount:100,max_bargain_rounds:3,context_enabled:!0,context_message_limit:12,context_expire_minutes:120,custom_prompts:""},ae=()=>{const[c,P]=l.useState([]),[t,y]=l.useState(""),[a,d]=l.useState(f),[R,x]=l.useState(!0),[p,N]=l.useState(!1),[u,_]=l.useState(!1),[g,w]=l.useState(!1),[h,K]=l.useState("你好,这个商品现在还能买吗?"),[v,b]=l.useState(""),r=l.useMemo(()=>c.find(s=>s.id===t),[c,t]);l.useEffect(()=>{O().then(s=>{var m;P(s),y(((m=s[0])==null?void 0:m.id)||"")}).catch(s=>i(s instanceof Error?s.message:"账号加载失败","error")).finally(()=>x(!1))},[]),l.useEffect(()=>{t&&(x(!0),b(""),w(!1),k(t).then(s=>d({...f,...s,api_key:""})).catch(s=>i(s instanceof Error?s.message:"AI配置加载失败","error")).finally(()=>x(!1)))},[t]);const n=(s,m)=>{d(M=>({...M,[s]:m}))},T=async()=>{if(!t){i("请先选择账号","warning");return}if(!a.model_name.trim()||!a.base_url.trim()){i("模型名称和接口地址不能为空","warning");return}N(!0);try{await z(t,a);const s=await k(t);d({...f,...s,api_key:""}),i("人工智能回复配置已保存","success")}catch(s){i(s instanceof Error?s.message:"AI配置保存失败","error")}finally{N(!1)}},L=async()=>{if(!t||!h.trim()){i("请选择账号并输入测试消息","warning");return}_(!0),b("");try{const s=await B(t,{message:h.trim(),item_title:"测试商品",item_price:100,item_desc:"仅用于测试人工智能回复,不会发送到闲鱼。"});b(s.reply||s.message||"测试完成"),i("AI回复测试完成","success")}catch(s){i(s instanceof Error?s.message:"AI回复测试失败","error")}finally{_(!1)}};return R&&c.length===0?e.jsx(F,{label:"正在加载 AI 回复配置"}):e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(U,{title:"AI 回复",description:"按账号配置模型连接、上下文记忆、议价边界和业务回复规则。",icon:j,actions:e.jsxs("div",{className:"flex min-w-0 flex-wrap items-end gap-2",children:[e.jsxs("label",{className:"min-w-0 sm:w-72",children:[e.jsx("span",{className:"field-label",children:"当前账号"}),e.jsx("select",{value:t,onChange:s=>y(s.target.value),className:"ios-input w-full rounded-md px-3 py-2 text-sm font-semibold",children:c.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||`账号 ${s.id.slice(0,8)}`},s.id))})]}),e.jsxs("button",{type:"button",onClick:T,disabled:p||!t,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[p?e.jsx(A,{className:"h-4 w-4 animate-spin"}):e.jsx($,{className:"h-4 w-4"}),p?"保存中":"保存配置"]})]})}),t?e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"section-panel grid gap-4 p-4 lg:grid-cols-[1fr_auto] lg:items-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 font-bold text-gray-900",children:[e.jsx(E,{className:"h-5 w-5"}),(r==null?void 0:r.nickname)||(r==null?void 0:r.remark)||t]}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"回复优先级:关键词回复 → 人工智能回复 → 默认回复。AI失败时不会中断消息处理。"})]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-3",children:[e.jsx("span",{className:"text-sm font-bold text-gray-700",children:a.ai_enabled?"已启用":"已停用"}),e.jsx("input",{type:"checkbox",checked:a.ai_enabled,onChange:s=>n("ai_enabled",s.target.checked),className:"h-5 w-5 accent-yellow-400"})]})]}),e.jsxs("div",{className:"grid gap-6 xl:grid-cols-[minmax(0,1.35fr)_minmax(340px,0.65fr)]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"模型连接",description:"支持 OpenAI 兼容接口;密钥留空时保留服务器中已有配置。",icon:j}),e.jsxs("div",{className:"grid gap-4 p-5 md:grid-cols-2",children:[e.jsxs("div",{className:"md:col-span-2 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-brand-200 bg-brand-50 px-4 py-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-gray-800",children:"没有 API Key?每天可免费领取额度"}),e.jsx("p",{className:"mt-0.5 text-xs text-gray-600",children:"兼容 OpenAI 接口,注册后把密钥填到下方即可直接用。"})]}),e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:e.jsxs("a",{href:Q,target:"_blank",rel:"norefLine truncated
import{r as l,o as O,n as i,z as k,j as e,B as j,L as A,E as H,aE as q,S,K as z,aR as B}from"./index-IP-mmLlr.js";import{P as F,a as U,E as D,S as o}from"./ui-Fi8l9rTp.js";import{S as $}from"./save-CNiIU-3u.js";import{M as E}from"./message-square-text-ApwvxIVw.js";import{E as G}from"./eye-off-B2vwWUUu.js";import{E as J}from"./eye-BxUVYll7.js";import{P as C}from"./play-CYUspTVx.js";const I="https://ai.88531.cn/v1",Q="https://ai.88531.cn",f={ai_enabled:!1,model_name:"qwen-plus",api_key:"",api_key_configured:!1,base_url:I,user_agent:"codex_cli_rs/0.0.0 (Hermes Agent)",max_discount_percent:10,max_discount_amount:100,max_bargain_rounds:3,context_enabled:!0,context_message_limit:12,context_expire_minutes:120,custom_prompts:""},ae=()=>{const[c,P]=l.useState([]),[t,y]=l.useState(""),[a,d]=l.useState(f),[R,x]=l.useState(!0),[p,N]=l.useState(!1),[u,_]=l.useState(!1),[g,w]=l.useState(!1),[h,K]=l.useState("你好,这个商品现在还能买吗?"),[v,b]=l.useState(""),r=l.useMemo(()=>c.find(s=>s.id===t),[c,t]);l.useEffect(()=>{O().then(s=>{var m;P(s),y(((m=s[0])==null?void 0:m.id)||"")}).catch(s=>i(s instanceof Error?s.message:"账号加载失败","error")).finally(()=>x(!1))},[]),l.useEffect(()=>{t&&(x(!0),b(""),w(!1),k(t).then(s=>d({...f,...s,api_key:""})).catch(s=>i(s instanceof Error?s.message:"AI配置加载失败","error")).finally(()=>x(!1)))},[t]);const n=(s,m)=>{d(M=>({...M,[s]:m}))},T=async()=>{if(!t){i("请先选择账号","warning");return}if(!a.model_name.trim()||!a.base_url.trim()){i("模型名称和接口地址不能为空","warning");return}N(!0);try{await z(t,a);const s=await k(t);d({...f,...s,api_key:""}),i("人工智能回复配置已保存","success")}catch(s){i(s instanceof Error?s.message:"AI配置保存失败","error")}finally{N(!1)}},L=async()=>{if(!t||!h.trim()){i("请选择账号并输入测试消息","warning");return}_(!0),b("");try{const s=await B(t,{message:h.trim(),item_title:"测试商品",item_price:100,item_desc:"仅用于测试人工智能回复,不会发送到闲鱼。"});b(s.reply||s.message||"测试完成"),i("AI回复测试完成","success")}catch(s){i(s instanceof Error?s.message:"AI回复测试失败","error")}finally{_(!1)}};return R&&c.length===0?e.jsx(F,{label:"正在加载 AI 回复配置"}):e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(U,{title:"AI 回复",description:"按账号配置模型连接、上下文记忆、议价边界和业务回复规则。",icon:j,actions:e.jsxs("div",{className:"flex min-w-0 flex-wrap items-end gap-2",children:[e.jsxs("label",{className:"min-w-0 sm:w-72",children:[e.jsx("span",{className:"field-label",children:"当前账号"}),e.jsx("select",{value:t,onChange:s=>y(s.target.value),className:"ios-input w-full rounded-md px-3 py-2 text-sm font-semibold",children:c.map(s=>e.jsx("option",{value:s.id,children:s.nickname||s.remark||`账号 ${s.id.slice(0,8)}`},s.id))})]}),e.jsxs("button",{type:"button",onClick:T,disabled:p||!t,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[p?e.jsx(A,{className:"h-4 w-4 animate-spin"}):e.jsx($,{className:"h-4 w-4"}),p?"保存中":"保存配置"]})]})}),t?e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"section-panel grid gap-4 p-4 lg:grid-cols-[1fr_auto] lg:items-center",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 font-bold text-gray-900",children:[e.jsx(E,{className:"h-5 w-5"}),(r==null?void 0:r.nickname)||(r==null?void 0:r.remark)||t]}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"回复优先级:关键词回复 → 人工智能回复 → 默认回复。AI失败时不会中断消息处理。"})]}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-3",children:[e.jsx("span",{className:"text-sm font-bold text-gray-700",children:a.ai_enabled?"已启用":"已停用"}),e.jsx("input",{type:"checkbox",checked:a.ai_enabled,onChange:s=>n("ai_enabled",s.target.checked),className:"h-5 w-5 accent-yellow-400"})]})]}),e.jsxs("div",{className:"grid gap-6 xl:grid-cols-[minmax(0,1.35fr)_minmax(340px,0.65fr)]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(o,{title:"模型连接",description:"支持 OpenAI 兼容接口;密钥留空时保留服务器中已有配置。",icon:j}),e.jsxs("div",{className:"grid gap-4 p-5 md:grid-cols-2",children:[e.jsxs("div",{className:"md:col-span-2 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-brand-200 bg-brand-50 px-4 py-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-gray-800",children:"没有 API Key?每天可免费领取额度"}),e.jsx("p",{className:"mt-0.5 text-xs text-gray-600",children:"兼容 OpenAI 接口,注册后把密钥填到下方即可直接用。"})]}),e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:e.jsxs("a",{href:Q,target:"_blank",rel:"norefLine truncated
+11
View File
@@ -0,0 +1,11 @@
import{c as m,r as n,j as e,bD as h,e as g,P as b,E as l,aE as j,aU as f,aV as o,bE as N}from"./index-IP-mmLlr.js";import{a as u,E as y}from"./ui-Fi8l9rTp.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const w=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],v=m("github",w);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],k=m("globe",_),E="https://nav.88531.cn",L="nav.88531.cn",A="https://gitea.88531.cn/jinghui/tangzhuan-yu",C="jinghui/tangzhuan-yu",d="3970260761@qq.com",x={info:"border-blue-200 bg-blue-50 text-blue-800",warning:"border-amber-200 bg-amber-50 text-amber-800",danger:"border-red-200 bg-red-50 text-red-700"},M={info:"通知",warning:"注意",danger:"重要"},I=()=>{const[s,p]=n.useState(null),[t,c]=n.useState(!1),i=async(a=!1)=>{c(!0);try{p(await N(a))}catch{}finally{c(!1)}};n.useEffect(()=>{i()},[]);const r=(s==null?void 0:s.announcements)||[];return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(u,{title:"关于",description:"查看当前版本、检查更新与历史公告。",icon:h,actions:e.jsxs("button",{type:"button",onClick:()=>i(!0),disabled:t,className:"ios-btn-secondary flex items-center gap-2 rounded-md px-4 py-2 text-sm disabled:opacity-50",children:[e.jsx(g,{className:`h-4 w-4 ${t?"animate-spin":""}`}),t?"正在检查":"检查更新"]})}),e.jsxs("section",{className:"section-panel p-4",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-md border border-gray-200 p-4",children:[e.jsx("p",{className:"text-xs font-semibold text-gray-500",children:"当前版本"}),e.jsx("p",{className:"mt-1 text-2xl font-bold text-gray-900",children:(s==null?void 0:s.local_version)||"—"})]}),e.jsxs("div",{className:`rounded-md border p-4 ${s!=null&&s.has_update?"border-amber-200 bg-amber-50":"border-gray-200"}`,children:[e.jsx("p",{className:"text-xs font-semibold text-gray-500",children:"最新版本"}),s!=null&&s.has_update?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-1 text-2xl font-bold text-amber-700",children:s.latest_version}),s.release_notes&&e.jsx("p",{className:"mt-2 whitespace-pre-wrap text-xs text-amber-800",children:s.release_notes}),s.download_url&&e.jsxs("a",{href:s.download_url,target:"_blank",rel:"noopener noreferrer",className:"ios-btn-primary mt-3 inline-flex items-center gap-2 rounded-md px-3 py-2 text-xs",children:[e.jsx(b,{className:"h-4 w-4"}),"前往下载",e.jsx(l,{className:"h-3 w-3"})]})]}):e.jsxs("p",{className:"mt-1 flex items-center gap-2 text-sm font-bold text-green-700",children:[e.jsx(j,{className:"h-5 w-5"}),s!=null&&s.source_configured?"已是最新版本":"未配置更新源"]})]})]}),!(s!=null&&s.source_configured)&&e.jsx("p",{className:"mt-4 rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-xs text-gray-600",children:"公告与更新检查已关闭。在「系统设置 → 公告与更新」里开启后, 这里会显示公告并自动检查新版本。"}),(s==null?void 0:s.error)&&e.jsxs("p",{className:"mt-3 rounded-md border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-700",children:["拉取公告失败:",s.error]}),e.jsxs("div",{className:"mt-4 grid gap-3 border-t border-gray-100 pt-4 sm:grid-cols-2 lg:grid-cols-3",children:[e.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"更多精品应用"}),e.jsxs("a",{href:E,target:"_blank",rel:"noopener noreferrer",className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-bold text-[#8c7900] hover:underline",children:[e.jsx(k,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",children:L}),e.jsx(l,{className:"h-3 w-3 shrink-0"})]})]}),e.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"开源仓库"}),e.jsxs("a",{href:A,target:"_blank",rel:"noopener noreferrer",className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-bold text-[#8c7900] hover:underline",children:[e.jsx(v,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",children:C}),e.jsx(l,{className:"h-3 w-3 shrink-0"})]})]}),e.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"联系邮箱"}),e.jsxs("a",{href:`mailto:${d}`,className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-bold text-[#8c7900] hover:underline",children:[e.jsx(f,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",children:d})]})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-200 px-4 py-3",children:[e.jsx(o,{className:"h-4 w-4 text-gray-500"}),e.jsx("span",{className:"text-sm font-bold text-gray-800",children:"历史公告"}),e.jsxs("span",{className:"text-xs text-gray-400",children:[r.length," 条"]})]}),r.length>0?e.jsx("div",{className:"divide-y divide-gray-100",children:r.map(a=>e.jsxs("article",{className:"px-4 py-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{clas Line truncated
-11
View File
@@ -1,11 +0,0 @@
import{c as m,r as n,j as e,bD as h,e as g,P as b,E as l,aE as j,aU as f,aV as o,bE as N}from"./index-CkAjw-Zl.js";import{a as u,E as y}from"./ui-DGhuFsSA.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const w=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],v=m("github",w);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],k=m("globe",_),E="https://nav.88531.cn",L="nav.88531.cn",A="https://gitea.88531.cn/jinghui/xianyu-auto-reply",C="jinghui/xianyu-auto-reply",x="3970260761@qq.com",d={info:"border-blue-200 bg-blue-50 text-blue-800",warning:"border-amber-200 bg-amber-50 text-amber-800",danger:"border-red-200 bg-red-50 text-red-700"},M={info:"通知",warning:"注意",danger:"重要"},I=()=>{const[s,p]=n.useState(null),[t,c]=n.useState(!1),i=async(a=!1)=>{c(!0);try{p(await N(a))}catch{}finally{c(!1)}};n.useEffect(()=>{i()},[]);const r=(s==null?void 0:s.announcements)||[];return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(u,{title:"关于",description:"查看当前版本、检查更新与历史公告。",icon:h,actions:e.jsxs("button",{type:"button",onClick:()=>i(!0),disabled:t,className:"ios-btn-secondary flex items-center gap-2 rounded-md px-4 py-2 text-sm disabled:opacity-50",children:[e.jsx(g,{className:`h-4 w-4 ${t?"animate-spin":""}`}),t?"正在检查":"检查更新"]})}),e.jsxs("section",{className:"section-panel p-4",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-md border border-gray-200 p-4",children:[e.jsx("p",{className:"text-xs font-semibold text-gray-500",children:"当前版本"}),e.jsx("p",{className:"mt-1 text-2xl font-bold text-gray-900",children:(s==null?void 0:s.local_version)||"—"})]}),e.jsxs("div",{className:`rounded-md border p-4 ${s!=null&&s.has_update?"border-amber-200 bg-amber-50":"border-gray-200"}`,children:[e.jsx("p",{className:"text-xs font-semibold text-gray-500",children:"最新版本"}),s!=null&&s.has_update?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-1 text-2xl font-bold text-amber-700",children:s.latest_version}),s.release_notes&&e.jsx("p",{className:"mt-2 whitespace-pre-wrap text-xs text-amber-800",children:s.release_notes}),s.download_url&&e.jsxs("a",{href:s.download_url,target:"_blank",rel:"noopener noreferrer",className:"ios-btn-primary mt-3 inline-flex items-center gap-2 rounded-md px-3 py-2 text-xs",children:[e.jsx(b,{className:"h-4 w-4"}),"前往下载",e.jsx(l,{className:"h-3 w-3"})]})]}):e.jsxs("p",{className:"mt-1 flex items-center gap-2 text-sm font-bold text-green-700",children:[e.jsx(j,{className:"h-5 w-5"}),s!=null&&s.source_configured?"已是最新版本":"未配置更新源"]})]})]}),!(s!=null&&s.source_configured)&&e.jsx("p",{className:"mt-4 rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-xs text-gray-600",children:"公告与更新检查已关闭。在「系统设置 → 公告与更新」里开启后, 这里会显示公告并自动检查新版本。"}),(s==null?void 0:s.error)&&e.jsxs("p",{className:"mt-3 rounded-md border border-red-200 bg-red-50 px-3 py-2 text-xs text-red-700",children:["拉取公告失败:",s.error]}),e.jsxs("div",{className:"mt-4 grid gap-3 border-t border-gray-100 pt-4 sm:grid-cols-2 lg:grid-cols-3",children:[e.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"官网"}),e.jsxs("a",{href:E,target:"_blank",rel:"noopener noreferrer",className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-bold text-[#8c7900] hover:underline",children:[e.jsx(k,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",children:L}),e.jsx(l,{className:"h-3 w-3 shrink-0"})]})]}),e.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"开源仓库"}),e.jsxs("a",{href:A,target:"_blank",rel:"noopener noreferrer",className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-bold text-[#8c7900] hover:underline",children:[e.jsx(v,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",children:C}),e.jsx(l,{className:"h-3 w-3 shrink-0"})]})]}),e.jsxs("div",{className:"flex min-w-0 flex-col gap-1.5",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-500",children:"联系邮箱"}),e.jsxs("a",{href:`mailto:${x}`,className:"inline-flex min-w-0 items-center gap-1.5 text-xs font-bold text-[#8c7900] hover:underline",children:[e.jsx(f,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",children:x})]})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-200 px-4 py-3",children:[e.jsx(o,{className:"h-4 w-4 text-gray-500"}),e.jsx("span",{className:"text-sm font-bold text-gray-800",children:"历史公告"}),e.jsxs("span",{className:"text-xs text-gray-400",children:[r.length," 条"]})]}),r.length>0?e.jsx("div",{className:"divide-y divide-gray-100",children:r.map(a=>e.jsxs("article",{className:"px-4 py-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{classN Line truncated
@@ -1,4 +1,4 @@
import{c as ee,r as i,j as e,U as Ce,B as Q,M as Ze,L as C,S as G,e as Ae,k as es,b as z,X as T,l as ss,m as O,o as ts,p as as,q as rs,s as ls,t as ns,n as m,u as Ie,v as Me,w as is,x as os,y as ds,z as cs,A as ms,D as xs,F as us,G as hs,H as ps,I as gs,J as fs,K as bs,N as ys}from"./index-CkAjw-Zl.js";import{P as js,a as Ns,E as _s}from"./ui-DGhuFsSA.js";import{C as Z}from"./check-B6GSSnq6.js";import{S as ws}from"./sparkles-ITX60YIA.js";import{P as vs,a as ks}from"./power-DZ_kRimy.js";import{T as Ss}from"./trash-2-H_4vB0ks.js";import{K as Cs}from"./key-B8XT9PyZ.js";import{E as As}from"./eye-off-DVn7pRcv.js";import{E as Is}from"./eye-vwq0YQk5.js";import{S as $e}from"./save-2L2g6g1L.js";/**
import{c as ee,r as i,j as e,U as Ce,B as Q,M as Ze,L as C,S as G,e as Ae,k as es,b as z,X as T,l as ss,m as O,o as ts,p as as,q as rs,s as ls,t as ns,n as m,u as Ie,v as Me,w as is,x as os,y as ds,z as cs,A as ms,D as xs,F as us,G as hs,H as ps,I as gs,J as fs,K as bs,N as ys}from"./index-IP-mmLlr.js";import{P as js,a as Ns,E as _s}from"./ui-Fi8l9rTp.js";import{C as Z}from"./check-D50E5xnW.js";import{S as ws}from"./sparkles-CavN45fA.js";import{P as vs,a as ks}from"./power-Ucg7FCbo.js";import{T as Ss}from"./trash-2-BNPsgs2t.js";import{K as Cs}from"./key-ItWA3Cb3.js";import{E as As}from"./eye-off-B2vwWUUu.js";import{E as Is}from"./eye-BxUVYll7.js";import{S as $e}from"./save-CNiIU-3u.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1 +1 @@
import{r as n,j as e,Q as C,e as A,aS as $,T as P,o as B,n as i,aX as H,bF as M}from"./index-CkAjw-Zl.js";import{P as D,a as R,N as z,S as d}from"./ui-DGhuFsSA.js";import{S as O}from"./save-2L2g6g1L.js";import{S as U}from"./shield-alert-BxxLkcUR.js";import{F as X}from"./flower-2-Cth4QkK1.js";import{M as q}from"./message-square-text-DqMbrfJm.js";const r=200,E="宝贝收到了,很满意,感谢老板,欢迎下次再来!",G="亲,感谢支持!有任何问题随时找我~",I={auto_rate_enabled:"评价买家",auto_flower_enabled:"索要小红花",auto_thanks_enabled:"收货致谢",auto_receive_flower_enabled:"自动收下小红花"},K=[{value:300,label:"5 分钟"},{value:900,label:"15 分钟"},{value:1800,label:"30 分钟"},{value:3600,label:"1 小时"},{value:7200,label:"2 小时(默认)"},{value:21600,label:"6 小时"},{value:86400,label:"24 小时"}],ee=()=>{const[l,c]=n.useState(null),[p,h]=n.useState(!1),[b,_]=n.useState(!1),[o,T]=n.useState([]),[f,x]=n.useState({}),j=()=>{h(!0),Promise.all([$(),P().catch(()=>null),B().catch(()=>[])]).then(([t,a,s])=>{c({...t,auto_rate_template:(t.auto_rate_template??"").trim()||(a==null?void 0:a.auto_rate_template)||E}),T(s),x((a==null?void 0:a.accounts)??{})}).finally(()=>h(!1))},F=async(t,a)=>{const s=f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},w={...s,[a]:!s[a]};x(u=>({...u,[t]:w}));try{await M(t,{[a]:w[a]})}catch(u){x(k=>({...k,[t]:s})),i(`保存失败:${u.message}`)}};n.useEffect(()=>{j()},[]);const L=async()=>{if(!l)return;const t=(l.auto_rate_template||"").trim();if(!t){i("默认评价内容不能为空");return}if(t.length>r){i(`默认评价内容不能超过 ${r} 字`);return}_(!0);try{await H({auto_rate_template:t,auto_thanks_template:(l.auto_thanks_template||"").trim(),buyer_interaction_interval:String(S)}),i("买家互动配置已保存")}catch(a){i(`保存失败:${a.message}`)}finally{_(!1)}};if(!l)return e.jsx(D,{label:"正在加载买家互动配置"});const m=t=>f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},g=o.some(t=>m(t.id).auto_rate_enabled),y=o.some(t=>m(t.id).auto_thanks_enabled),N=l.auto_rate_template??"",v=l.auto_thanks_template??"",S=Number(l.buyer_interaction_interval)||7200;return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(R,{title:"买家互动",description:"评价买家、索要小红花与自动收花。涉及平台实际操作,请按账号开启。",icon:C,actions:e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:j,disabled:p,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(A,{className:`h-4 w-4 ${p?"animate-spin":""}`}),"刷新"]}),e.jsxs("button",{type:"button",onClick:()=>void L(),disabled:b,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(O,{className:"h-4 w-4"}),b?"保存中":"保存设置"]})]})}),e.jsx(z,{type:"warning",message:"评价提交后无法撤销,求花会向买家发送一条消息。建议先用测试订单验证效果。"}),e.jsxs("div",{className:"grid gap-4 xl:grid-cols-2",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"按账号开启",description:"逐个账号控制。关闭的账号不会自动执行,订单页也不显示入口、后端拒绝请求。",icon:U}),o.length===0?e.jsx("p",{className:"px-4 py-6 text-sm text-gray-500",children:"还没有账号,请先在账号管理里添加。"}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 text-left text-xs text-gray-500",children:[e.jsx("th",{className:"px-4 py-2 font-semibold",children:"账号"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"评价买家"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"索要小红花"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"收货致谢"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"自动收下小红花"})]})}),e.jsx("tbody",{children:o.map(t=>{const a=m(t.id);return e.jsxs("tr",{className:"border-b border-gray-100 last:border-b-0",children:[e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("p",{className:"font-semibold text-gray-900",children:t.nickname||t.id}),e.jsx("p",{className:"mt-0.5 font-mono text-xs text-gray-400",children:t.id})]}),["auto_rate_enabled","auto_flower_enabled","auto_thanks_enabled","auto_receive_flower_enabled"].map(s=>e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsx("button",{type:"button",role:"switch","aria-checked":a[s],"aria-label":`${t.nickname||t.id} ${I[s]}`,onClick:()=>void F(t.id,s),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${a[s]?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{cLine truncated
import{r as n,j as e,Q as C,e as A,aS as $,T as P,o as B,n as i,aX as H,bF as M}from"./index-IP-mmLlr.js";import{P as D,a as R,N as z,S as d}from"./ui-Fi8l9rTp.js";import{S as O}from"./save-CNiIU-3u.js";import{S as U}from"./shield-alert-B8_J0uYT.js";import{F as X}from"./flower-2-fqYsfuSn.js";import{M as q}from"./message-square-text-ApwvxIVw.js";const r=200,E="宝贝收到了,很满意,感谢老板,欢迎下次再来!",G="亲,感谢支持!有任何问题随时找我~",I={auto_rate_enabled:"评价买家",auto_flower_enabled:"索要小红花",auto_thanks_enabled:"收货致谢",auto_receive_flower_enabled:"自动收下小红花"},K=[{value:300,label:"5 分钟"},{value:900,label:"15 分钟"},{value:1800,label:"30 分钟"},{value:3600,label:"1 小时"},{value:7200,label:"2 小时(默认)"},{value:21600,label:"6 小时"},{value:86400,label:"24 小时"}],ee=()=>{const[l,c]=n.useState(null),[p,h]=n.useState(!1),[b,_]=n.useState(!1),[o,T]=n.useState([]),[f,x]=n.useState({}),j=()=>{h(!0),Promise.all([$(),P().catch(()=>null),B().catch(()=>[])]).then(([t,a,s])=>{c({...t,auto_rate_template:(t.auto_rate_template??"").trim()||(a==null?void 0:a.auto_rate_template)||E}),T(s),x((a==null?void 0:a.accounts)??{})}).finally(()=>h(!1))},F=async(t,a)=>{const s=f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},w={...s,[a]:!s[a]};x(u=>({...u,[t]:w}));try{await M(t,{[a]:w[a]})}catch(u){x(k=>({...k,[t]:s})),i(`保存失败:${u.message}`)}};n.useEffect(()=>{j()},[]);const L=async()=>{if(!l)return;const t=(l.auto_rate_template||"").trim();if(!t){i("默认评价内容不能为空");return}if(t.length>r){i(`默认评价内容不能超过 ${r} 字`);return}_(!0);try{await H({auto_rate_template:t,auto_thanks_template:(l.auto_thanks_template||"").trim(),buyer_interaction_interval:String(S)}),i("买家互动配置已保存")}catch(a){i(`保存失败:${a.message}`)}finally{_(!1)}};if(!l)return e.jsx(D,{label:"正在加载买家互动配置"});const m=t=>f[t]??{auto_rate_enabled:!1,auto_flower_enabled:!1,auto_thanks_enabled:!1,auto_receive_flower_enabled:!1},g=o.some(t=>m(t.id).auto_rate_enabled),y=o.some(t=>m(t.id).auto_thanks_enabled),N=l.auto_rate_template??"",v=l.auto_thanks_template??"",S=Number(l.buyer_interaction_interval)||7200;return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(R,{title:"买家互动",description:"评价买家、索要小红花与自动收花。涉及平台实际操作,请按账号开启。",icon:C,actions:e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:j,disabled:p,className:"ios-btn-secondary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(A,{className:`h-4 w-4 ${p?"animate-spin":""}`}),"刷新"]}),e.jsxs("button",{type:"button",onClick:()=>void L(),disabled:b,className:"ios-btn-primary flex items-center justify-center gap-2 rounded-md px-4 py-2 text-sm",children:[e.jsx(O,{className:"h-4 w-4"}),b?"保存中":"保存设置"]})]})}),e.jsx(z,{type:"warning",message:"评价提交后无法撤销,求花会向买家发送一条消息。建议先用测试订单验证效果。"}),e.jsxs("div",{className:"grid gap-4 xl:grid-cols-2",children:[e.jsxs("section",{className:"section-panel",children:[e.jsx(d,{title:"按账号开启",description:"逐个账号控制。关闭的账号不会自动执行,订单页也不显示入口、后端拒绝请求。",icon:U}),o.length===0?e.jsx("p",{className:"px-4 py-6 text-sm text-gray-500",children:"还没有账号,请先在账号管理里添加。"}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-gray-200 text-left text-xs text-gray-500",children:[e.jsx("th",{className:"px-4 py-2 font-semibold",children:"账号"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"评价买家"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"索要小红花"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"收货致谢"}),e.jsx("th",{className:"px-4 py-2 text-center font-semibold",children:"自动收下小红花"})]})}),e.jsx("tbody",{children:o.map(t=>{const a=m(t.id);return e.jsxs("tr",{className:"border-b border-gray-100 last:border-b-0",children:[e.jsxs("td",{className:"px-4 py-3",children:[e.jsx("p",{className:"font-semibold text-gray-900",children:t.nickname||t.id}),e.jsx("p",{className:"mt-0.5 font-mono text-xs text-gray-400",children:t.id})]}),["auto_rate_enabled","auto_flower_enabled","auto_thanks_enabled","auto_receive_flower_enabled"].map(s=>e.jsx("td",{className:"px-4 py-3 text-center",children:e.jsx("button",{type:"button",role:"switch","aria-checked":a[s],"aria-label":`${t.nickname||t.id} ${I[s]}`,onClick:()=>void F(t.id,s),className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${a[s]?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{cLine truncated
@@ -1,4 +1,4 @@
import{c as P,r as m,j as e,X as D,a6 as re,n as j,a7 as de,a8 as M,a9 as G,b as z,aa as H,v as Y,ab as ce,ac as oe,ad as me}from"./index-CkAjw-Zl.js";import{a as pe,S as xe,E as B}from"./ui-DGhuFsSA.js";import{P as U}from"./plus-BXZgwA0o.js";import{S as he}from"./square-pen-B8Sj6MD6.js";import{T as ye}from"./trash-2-H_4vB0ks.js";import{P as Z}from"./package-CwcnsKO8.js";import{S as ue}from"./save-2L2g6g1L.js";import{I as q}from"./image-BN5k8Hl-.js";import{P as be}from"./package-check-DD7mkdH5.js";/**
import{c as P,r as m,j as e,X as D,a6 as re,n as j,a7 as de,a8 as M,a9 as G,b as z,aa as H,v as Y,ab as ce,ac as oe,ad as me}from"./index-IP-mmLlr.js";import{a as pe,S as xe,E as B}from"./ui-Fi8l9rTp.js";import{P as U}from"./plus-BbnHS2Zx.js";import{S as he}from"./square-pen-ZPivfDGR.js";import{T as ye}from"./trash-2-BNPsgs2t.js";import{P as Z}from"./package-C7ydMeAZ.js";import{S as ue}from"./save-CNiIU-3u.js";import{I as q}from"./image-hfWSlf8S.js";import{P as be}from"./package-check-OAWoRoy_.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
var Db=Object.defineProperty;var $b=(e,t,r)=>t in e?Db(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _i=(e,t,r)=>$b(e,typeof t!="symbol"?t+"":t,r);import{c as gu,r as v,a as bu,b as xu,g as Nb,R as Rb,d as Lb,j as I,C as zb,e as Bb,U as Fb,E as Wb,f as Kb,h as Ub,n as Hb,i as Ac}from"./index-CkAjw-Zl.js";import{P as Yb,a as Gb,b as Vb,S as qb,E as Ii}from"./ui-DGhuFsSA.js";import{P as Ro}from"./package-CwcnsKO8.js";import{T as Lh}from"./trending-up-DkO2MYj4.js";import{A as Xb}from"./activity-DQLHFHES.js";import{P as Zb}from"./package-check-DD7mkdH5.js";/**
var Db=Object.defineProperty;var $b=(e,t,r)=>t in e?Db(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _i=(e,t,r)=>$b(e,typeof t!="symbol"?t+"":t,r);import{c as gu,r as v,a as bu,b as xu,g as Nb,R as Rb,d as Lb,j as I,C as zb,e as Bb,U as Fb,E as Wb,f as Kb,h as Ub,n as Hb,i as Ac}from"./index-IP-mmLlr.js";import{P as Yb,a as Gb,b as Vb,S as qb,E as Ii}from"./ui-Fi8l9rTp.js";import{P as Ro}from"./package-C7ydMeAZ.js";import{T as Lh}from"./trending-up-BcW73Gjl.js";import{A as Xb}from"./activity-Dmn-a3S9.js";import{P as Zb}from"./package-check-OAWoRoy_.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1 +1 @@
import{r as o,j as e}from"./index-CkAjw-Zl.js";const r=[{group:"快速开始",items:[{id:"dashboard",label:"系统总览"},{id:"accounts",label:"账号管理"}]},{group:"闲鱼业务",items:[{id:"items",label:"商品与发货"},{id:"resell",label:"一键转卖"},{id:"hotlist",label:"实时热卖榜"},{id:"pricewatch",label:"价格监控"},{id:"orders",label:"订单管理"},{id:"buyer-interaction",label:"买家互动"},{id:"cards",label:"卡密库存"}]},{group:"消息与自动化",items:[{id:"messages",label:"消息中心"},{id:"auto-reply",label:"自动回复"},{id:"ai-reply",label:"AI 回复"},{id:"product-automation",label:"商品自动化"}]},{group:"系统",items:[{id:"notifications",label:"通知与日志"},{id:"settings",label:"系统设置"},{id:"users",label:"用户管理"},{id:"about",label:"关于本系统"}]}],p={dashboard:{title:"系统总览",intro:"登录后的首页,汇总账号、订单、营收和库存数据,一眼判断当前经营状态。",steps:["顶部时间筛选可切换统计周期:今天 / 昨天 / 三天内 / 7天内 / 一个月内 / 自定义。","「有效成交额」与「已到账」两张卡片展示所选周期内的资金数据。","「系统运行中」状态灯表示后端自动回复、定时任务正常运行。","左侧菜单点击任意功能即可切换页面,右上角可切换日间/夜间模式。"],tips:["新部署时没有订单记录,金额显示 ¥0.00 属正常,产生交易后自动累计。"]},accounts:{title:"账号管理",intro:"所有功能的入口:先把闲鱼账号接入系统,其他页面才能选择该账号操作。",steps:["点击「添加账号」,填入账号备注名与 Cookie(从浏览器登录闲鱼后在开发者工具 Network 里复制)。","保存后列表会显示该账号,可点击「检测」验证 Cookie 是否仍然有效。","失效的账号需要重新复制 Cookie 更新;不用的账号可「禁用」而不必删除。","启用状态的账号才会参与自动回复、订单同步、消息聚合等自动化。"],tips:["Cookie 等同账号登录态,请勿泄露;本系统只保存在自己的服务器数据库中。"]},items:{title:"商品与发货",intro:"同步闲鱼在售商品,为每个商品配置自动发货内容(卡密、网盘链接或文字说明)。",steps:["选择账号后点击同步,把该账号在闲鱼的在售商品拉取到列表。","给商品设置发货内容:虚拟商品可填卡密说明或网盘链接,实物商品可填物流备注。","买家付款后系统按这里配置的内容自动回复发货,无需手动复制粘贴。","商品价格、标题变化可通过刷新按钮同步最新状态。"],tips:["发货内容支持多行文本与链接,建议按「商品名称 + 提取码」格式写清楚。"]},resell:{title:"一键转卖",intro:"从收藏或搜索结果里挑商品,改好标题价格直接发布到自己账号,做无货源转卖。",steps:["右上角先选择要发布到的闲鱼账号。","点「我的收藏」→「加载收藏」读取该账号收藏的在售商品;或切到「搜索商品」按关键词找货。","在列表中勾选想转卖的商品,修改标题、价格、描述等发布信息。","点「一键转卖」发布,商品即挂到自己账号名下。"],tips:["发布前核对价格是否留足利润;同名商品重复转卖前先在商品列表确认未上架过。"]},hotlist:{title:"实时热卖榜",intro:"抓取闲鱼实时热卖数据,帮你判断什么好卖、该上什么货。",steps:["选择分类或直接查看综合热卖榜,列表按近期成交热度排序。","点击商品可查看详情与价格区间,作为自己定价的参考。","看中的品可直接跳「一键转卖」上架到自己账号。"],tips:["榜单数据为实时抓取,个别时段可能延迟,可点刷新重新拉取。"]},pricewatch:{title:"价格监控",intro:"设定关键词和目标价,系统定时搜索闲鱼,出现低于目标价的商品立即通知你捡漏。",steps:["点「新建规则」:填写关键词(如想蹲的商品名)、目标价、检测间隔,保存后立即执行一次检测。","检测结果展示匹配商品数、历史最低价与「最近一次」的完整商品信息(超长内容自动换行展示)。","低于目标价时触发通知——前提是已在「通知与日志」页配置好通知渠道并勾选「价格监控」事件(见下方章节)。","点「历史记录」查看每次检测的明细;不需要的规则可停用或删除。"],tips:["通知没发出来时,页面顶部的红色提示会写明去哪配置,按提示到「通知与日志」页补配即可。","关键词越具体匹配越准,避免太宽泛导致噪音过多。"]},orders:{title:"订单管理",intro:"汇总所选账号的闲鱼订单,查看状态、手动补发与核对发货记录。",steps:["选择账号与时间范围筛选订单,列表显示买家、商品、金额与状态。","自动发货成Line truncated
import{r as o,j as e}from"./index-IP-mmLlr.js";const r=[{group:"快速开始",items:[{id:"dashboard",label:"系统总览"},{id:"accounts",label:"账号管理"}]},{group:"闲鱼业务",items:[{id:"items",label:"商品与发货"},{id:"resell",label:"一键转卖"},{id:"hotlist",label:"实时热卖榜"},{id:"pricewatch",label:"价格监控"},{id:"orders",label:"订单管理"},{id:"buyer-interaction",label:"买家互动"},{id:"cards",label:"卡密库存"}]},{group:"消息与自动化",items:[{id:"messages",label:"消息中心"},{id:"auto-reply",label:"自动回复"},{id:"ai-reply",label:"AI 回复"},{id:"product-automation",label:"商品自动化"}]},{group:"系统",items:[{id:"notifications",label:"通知与日志"},{id:"settings",label:"系统设置"},{id:"users",label:"用户管理"},{id:"about",label:"关于本系统"}]}],p={dashboard:{title:"系统总览",intro:"登录后的首页,汇总账号、订单、营收和库存数据,一眼判断当前经营状态。",steps:["顶部时间筛选可切换统计周期:今天 / 昨天 / 三天内 / 7天内 / 一个月内 / 自定义。","「有效成交额」与「已到账」两张卡片展示所选周期内的资金数据。","「系统运行中」状态灯表示后端自动回复、定时任务正常运行。","左侧菜单点击任意功能即可切换页面,右上角可切换日间/夜间模式。"],tips:["新部署时没有订单记录,金额显示 ¥0.00 属正常,产生交易后自动累计。"]},accounts:{title:"账号管理",intro:"所有功能的入口:先把闲鱼账号接入系统,其他页面才能选择该账号操作。",steps:["点击「添加账号」,填入账号备注名与 Cookie(从浏览器登录闲鱼后在开发者工具 Network 里复制)。","保存后列表会显示该账号,可点击「检测」验证 Cookie 是否仍然有效。","失效的账号需要重新复制 Cookie 更新;不用的账号可「禁用」而不必删除。","启用状态的账号才会参与自动回复、订单同步、消息聚合等自动化。"],tips:["Cookie 等同账号登录态,请勿泄露;本系统只保存在自己的服务器数据库中。"]},items:{title:"商品与发货",intro:"同步闲鱼在售商品,为每个商品配置自动发货内容(卡密、网盘链接或文字说明)。",steps:["选择账号后点击同步,把该账号在闲鱼的在售商品拉取到列表。","给商品设置发货内容:虚拟商品可填卡密说明或网盘链接,实物商品可填物流备注。","买家付款后系统按这里配置的内容自动回复发货,无需手动复制粘贴。","商品价格、标题变化可通过刷新按钮同步最新状态。"],tips:["发货内容支持多行文本与链接,建议按「商品名称 + 提取码」格式写清楚。"]},resell:{title:"一键转卖",intro:"从收藏或搜索结果里挑商品,改好标题价格直接发布到自己账号,做无货源转卖。",steps:["右上角先选择要发布到的闲鱼账号。","点「我的收藏」→「加载收藏」读取该账号收藏的在售商品;或切到「搜索商品」按关键词找货。","在列表中勾选想转卖的商品,修改标题、价格、描述等发布信息。","点「一键转卖」发布,商品即挂到自己账号名下。"],tips:["发布前核对价格是否留足利润;同名商品重复转卖前先在商品列表确认未上架过。"]},hotlist:{title:"实时热卖榜",intro:"抓取闲鱼实时热卖数据,帮你判断什么好卖、该上什么货。",steps:["选择分类或直接查看综合热卖榜,列表按近期成交热度排序。","点击商品可查看详情与价格区间,作为自己定价的参考。","看中的品可直接跳「一键转卖」上架到自己账号。"],tips:["榜单数据为实时抓取,个别时段可能延迟,可点刷新重新拉取。"]},pricewatch:{title:"价格监控",intro:"设定关键词和目标价,系统定时搜索闲鱼,出现低于目标价的商品立即通知你捡漏。",steps:["点「新建规则」:填写关键词(如想蹲的商品名)、目标价、检测间隔,保存后立即执行一次检测。","检测结果展示匹配商品数、历史最低价与「最近一次」的完整商品信息(超长内容自动换行展示)。","低于目标价时触发通知——前提是已在「通知与日志」页配置好通知渠道并勾选「价格监控」事件(见下方章节)。","点「历史记录」查看每次检测的明细;不需要的规则可停用或删除。"],tips:["通知没发出来时,页面顶部的红色提示会写明去哪配置,按提示到「通知与日志」页补配即可。","关键词越具体匹配越准,避免太宽泛导致噪音过多。"]},orders:{title:"订单管理",intro:"汇总所选账号的闲鱼订单,查看状态、手动补发与核对发货记录。",steps:["选择账号与时间范围筛选订单,列表显示买家、商品、金额与状态。","自动发货成Line truncated
@@ -1 +1 @@
import{r as n,bN as H,bO as O,j as e,bP as S,L as y,e as A,E as B}from"./index-CkAjw-Zl.js";import{P as F,a as U,N as q,b as z,E as V}from"./ui-DGhuFsSA.js";import{T as R}from"./trending-up-DkO2MYj4.js";import{P as W}from"./package-CwcnsKO8.js";const Y=2500,L=r=>r?r>=1e4?`${(r/1e4).toFixed(1).replace(/\.0$/,"")}万`:String(r):"0",G=r=>{if(!r)return"—";const i=Date.now()-r;if(i<6e4)return"刚刚";if(i<36e5)return`${Math.floor(i/6e4)}分钟前`;if(i<864e5)return`${Math.floor(i/36e5)}小时前`;if(i<7*864e5)return`${Math.floor(i/864e5)}天前`;const o=new Date(r);return`${o.getMonth()+1}月${o.getDate()}日`},J=r=>{if(!r)return"—";const i=new Date(r),o=v=>String(v).padStart(2,"0");return`${i.getFullYear()}-${o(i.getMonth()+1)}-${o(i.getDate())}`},K=({rank:r})=>{const i=r===1?"bg-amber-400 text-white":r===2?"bg-gray-300 text-gray-700":r===3?"bg-orange-300 text-orange-900":"bg-[var(--surface-subtle)] text-[var(--text-soft)]";return e.jsx("span",{className:`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-sm font-bold ${i}`,children:r})},se=()=>{const[r,i]=n.useState(!0),[o,v]=n.useState({}),[$,P]=n.useState([]),[d,M]=n.useState("digital"),[j,f]=n.useState(null),[h,_]=n.useState(0),[u,k]=n.useState(!1),g=n.useRef(null),I=n.useRef(d);I.current=d;const w=n.useCallback(()=>{g.current&&(clearInterval(g.current),g.current=null)},[]),b=n.useCallback(async s=>{try{const a=await H();v(a.boards||{}),P(a.categories||[]),s!=null&&s.silent||i(!1),Object.values(a.boards||{}).some(x=>x.refreshing)?E():w()}catch(a){s!=null&&s.silent||(i(!1),f({type:"error",message:a.message||"榜单加载失败"}))}},[]),E=n.useCallback(()=>{g.current||(g.current=setInterval(()=>{b({silent:!0})},Y))},[b]);n.useEffect(()=>(b(),w),[b,w]),n.useEffect(()=>{if(h<=0)return;const s=setInterval(()=>_(a=>a<=1?0:a-1),1e3);return()=>clearInterval(s)},[h]);const t=o[d];n.useEffect(()=>{const s=o[d];!s||r||s.refreshing||s.items.length>0||s.cooldown_remaining>0||N(d)},[d,r,o]);const N=async s=>{if(!u){k(!0);try{const a=await O(s);a.started?(f({type:"info",message:a.categories&&a.categories.length>1?"已开始刷新全部类目,完成后自动更新。":"已开始抓取,十几秒后榜单自动刷新。"}),E()):a.reason==="cooldown"?f({type:"error",message:a.message||"刷新过于频繁,请稍后再试"}):f({type:"info",message:a.message||"已有刷新任务进行中"})}catch(a){f({type:"error",message:a.message||"刷新触发失败"})}finally{k(!1)}}};n.useEffect(()=>{t&&t.cooldown_remaining>0&&_(t.cooldown_remaining)},[t]);const T=n.useMemo(()=>$.map(s=>{var a;return{id:s.id,label:s.name,count:(a=o[s.id])==null?void 0:a.items.length}}),[$,o]),C=n.useMemo(()=>{if(!t)return[];const s={};return(t.items||[]).forEach(l=>{(l.keywords||[]).forEach(x=>{const p=s[x]||(s[x]={hits:0,want:0});p.hits+=1,p.want+=l.want_count||0})}),(t.keywords&&t.keywords.length?t.keywords:Object.keys(s)).map(l=>{var x,p;return{kw:l,hits:((x=s[l])==null?void 0:x.hits)||0,want:((p=s[l])==null?void 0:p.want)||0}}).sort((l,x)=>x.want-l.want)},[t]),m=!!(t!=null&&t.refreshing),c=t==null?void 0:t.progress,D=t!=null&&t.updated_at?G(t.updated_at*1e3):"尚未生成";return r?e.jsx(F,{label:"正在加载热卖榜"}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(U,{title:"实时热卖榜",description:"按「想要人数」排序的全网热卖商品,数据来自闲鱼实时搜索聚合。",icon:S,badge:e.jsx("span",{className:"rounded-full bg-[var(--surface-subtle)] px-2 py-0.5 text-xs text-[var(--text-soft)]",children:t?`更新于 ${D}`:"待生成"}),actions:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("button",{type:"button",className:"ios-btn-secondary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N("all"),disabled:u||m||h>0,children:[u||m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(A,{className:"h-4 w-4"}),"全部刷新"]}),e.jsxs("button",{type:"button",className:"ios-btn-primary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N(d),disabled:u||m||h>0,children:[m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(R,{className:"h-4 w-4"}),h>0?`${h}s 后可刷新`:"刷新本类目"]})]})}),j&&e.jsx(q,{type:j.type==="info"?"success":j.type,message:j.message,onClose:()=>f(null)}),e.jsx("div",{className:"toolbar",children:e.jsx(z,{value:d,onChange:M,items:T,ariaLabel:"热卖榜类目"})}),m&&e.jsx("div",{className:"section-panel",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm text-[var(--text-soft)]",children:[e.jsx(y,{className:"h-4 w-4 animate-spin text-[#ff4400]"}),e.jsxs("span",{children:["正在抓取「",(c==null?void 0:c.keyword)||"…","」",c&&c.total>0?`(${Math.min(c.done+1,c.total)}/${c.total})`:""]}),c&&c.total>0&&e.jsx("span",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--surface-subtle)]",children:e.jsx("span",{className:"block h-full rounded-full bg-[#ff4400] transition-all",style:{width:`${Math.round(c.Line truncated
import{r as n,bN as H,bO as O,j as e,bP as S,L as y,e as A,E as B}from"./index-IP-mmLlr.js";import{P as F,a as U,N as q,b as z,E as V}from"./ui-Fi8l9rTp.js";import{T as R}from"./trending-up-BcW73Gjl.js";import{P as W}from"./package-C7ydMeAZ.js";const Y=2500,L=r=>r?r>=1e4?`${(r/1e4).toFixed(1).replace(/\.0$/,"")}万`:String(r):"0",G=r=>{if(!r)return"—";const i=Date.now()-r;if(i<6e4)return"刚刚";if(i<36e5)return`${Math.floor(i/6e4)}分钟前`;if(i<864e5)return`${Math.floor(i/36e5)}小时前`;if(i<7*864e5)return`${Math.floor(i/864e5)}天前`;const o=new Date(r);return`${o.getMonth()+1}月${o.getDate()}日`},J=r=>{if(!r)return"—";const i=new Date(r),o=v=>String(v).padStart(2,"0");return`${i.getFullYear()}-${o(i.getMonth()+1)}-${o(i.getDate())}`},K=({rank:r})=>{const i=r===1?"bg-amber-400 text-white":r===2?"bg-gray-300 text-gray-700":r===3?"bg-orange-300 text-orange-900":"bg-[var(--surface-subtle)] text-[var(--text-soft)]";return e.jsx("span",{className:`inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-sm font-bold ${i}`,children:r})},se=()=>{const[r,i]=n.useState(!0),[o,v]=n.useState({}),[$,P]=n.useState([]),[d,M]=n.useState("digital"),[j,f]=n.useState(null),[h,_]=n.useState(0),[u,k]=n.useState(!1),g=n.useRef(null),I=n.useRef(d);I.current=d;const w=n.useCallback(()=>{g.current&&(clearInterval(g.current),g.current=null)},[]),b=n.useCallback(async s=>{try{const a=await H();v(a.boards||{}),P(a.categories||[]),s!=null&&s.silent||i(!1),Object.values(a.boards||{}).some(x=>x.refreshing)?E():w()}catch(a){s!=null&&s.silent||(i(!1),f({type:"error",message:a.message||"榜单加载失败"}))}},[]),E=n.useCallback(()=>{g.current||(g.current=setInterval(()=>{b({silent:!0})},Y))},[b]);n.useEffect(()=>(b(),w),[b,w]),n.useEffect(()=>{if(h<=0)return;const s=setInterval(()=>_(a=>a<=1?0:a-1),1e3);return()=>clearInterval(s)},[h]);const t=o[d];n.useEffect(()=>{const s=o[d];!s||r||s.refreshing||s.items.length>0||s.cooldown_remaining>0||N(d)},[d,r,o]);const N=async s=>{if(!u){k(!0);try{const a=await O(s);a.started?(f({type:"info",message:a.categories&&a.categories.length>1?"已开始刷新全部类目,完成后自动更新。":"已开始抓取,十几秒后榜单自动刷新。"}),E()):a.reason==="cooldown"?f({type:"error",message:a.message||"刷新过于频繁,请稍后再试"}):f({type:"info",message:a.message||"已有刷新任务进行中"})}catch(a){f({type:"error",message:a.message||"刷新触发失败"})}finally{k(!1)}}};n.useEffect(()=>{t&&t.cooldown_remaining>0&&_(t.cooldown_remaining)},[t]);const T=n.useMemo(()=>$.map(s=>{var a;return{id:s.id,label:s.name,count:(a=o[s.id])==null?void 0:a.items.length}}),[$,o]),C=n.useMemo(()=>{if(!t)return[];const s={};return(t.items||[]).forEach(l=>{(l.keywords||[]).forEach(x=>{const p=s[x]||(s[x]={hits:0,want:0});p.hits+=1,p.want+=l.want_count||0})}),(t.keywords&&t.keywords.length?t.keywords:Object.keys(s)).map(l=>{var x,p;return{kw:l,hits:((x=s[l])==null?void 0:x.hits)||0,want:((p=s[l])==null?void 0:p.want)||0}}).sort((l,x)=>x.want-l.want)},[t]),m=!!(t!=null&&t.refreshing),c=t==null?void 0:t.progress,D=t!=null&&t.updated_at?G(t.updated_at*1e3):"尚未生成";return r?e.jsx(F,{label:"正在加载热卖榜"}):e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(U,{title:"实时热卖榜",description:"按「想要人数」排序的全网热卖商品,数据来自闲鱼实时搜索聚合。",icon:S,badge:e.jsx("span",{className:"rounded-full bg-[var(--surface-subtle)] px-2 py-0.5 text-xs text-[var(--text-soft)]",children:t?`更新于 ${D}`:"待生成"}),actions:e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("button",{type:"button",className:"ios-btn-secondary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N("all"),disabled:u||m||h>0,children:[u||m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(A,{className:"h-4 w-4"}),"全部刷新"]}),e.jsxs("button",{type:"button",className:"ios-btn-primary flex items-center gap-1.5 rounded-md px-3 py-2 text-sm",onClick:()=>void N(d),disabled:u||m||h>0,children:[m?e.jsx(y,{className:"h-4 w-4 animate-spin"}):e.jsx(R,{className:"h-4 w-4"}),h>0?`${h}s 后可刷新`:"刷新本类目"]})]})}),j&&e.jsx(q,{type:j.type==="info"?"success":j.type,message:j.message,onClose:()=>f(null)}),e.jsx("div",{className:"toolbar",children:e.jsx(z,{value:d,onChange:M,items:T,ariaLabel:"热卖榜类目"})}),m&&e.jsx("div",{className:"section-panel",children:e.jsxs("div",{className:"flex items-center gap-3 text-sm text-[var(--text-soft)]",children:[e.jsx(y,{className:"h-4 w-4 animate-spin text-[#ff4400]"}),e.jsxs("span",{children:["正在抓取「",(c==null?void 0:c.keyword)||"…","」",c&&c.total>0?`(${Math.min(c.done+1,c.total)}/${c.total})`:""]}),c&&c.total>0&&e.jsx("span",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--surface-subtle)]",children:e.jsx("span",{className:"block h-full rounded-full bg-[#ff4400] transition-all",style:{width:`${Math.round(c.Line truncated
@@ -1,4 +1,4 @@
import{c as _e,r,ae as fs,af as Ee,n as w,j as e,e as ve,X as ee,L as V,ag as js,ah as Ns,ai as _s,v as xe,aj as vs,ak as Be,b as re,al as fe,am as je,an as ws,ao as ks,ap as Qe,aq as Re,o as Te,h as ye,a8 as Le,ar as ze,as as be,w as Ss,at as Cs,au as Ue,av as Ke,aw as Is,ax as $s,ay as Ms,az as Ds}from"./index-CkAjw-Zl.js";import{E as se,S as Ne,P as qe,a as Fs,b as Ps,N as Es}from"./ui-DGhuFsSA.js";import{S as de}from"./shield-alert-BxxLkcUR.js";import{S as ce}from"./save-2L2g6g1L.js";import{T as me}from"./trash-2-H_4vB0ks.js";import{P as oe}from"./plus-BXZgwA0o.js";import{P as Bs}from"./power-off-BEy-96bB.js";import{a as Rs,P as Ts}from"./power-DZ_kRimy.js";import{P as We}from"./package-check-DD7mkdH5.js";import{S as Oe}from"./sparkles-ITX60YIA.js";import{S as Ls}from"./settings-2-CVdvHFW4.js";import{S as zs}from"./square-pen-B8Sj6MD6.js";/**
import{c as _e,r,ae as fs,af as Ee,n as w,j as e,e as ve,X as ee,L as V,ag as js,ah as Ns,ai as _s,v as xe,aj as vs,ak as Be,b as re,al as fe,am as je,an as ws,ao as ks,ap as Qe,aq as Re,o as Te,h as ye,a8 as Le,ar as ze,as as be,w as Ss,at as Cs,au as Ue,av as Ke,aw as Is,ax as $s,ay as Ms,az as Ds}from"./index-IP-mmLlr.js";import{E as se,S as Ne,P as qe,a as Fs,b as Ps,N as Es}from"./ui-Fi8l9rTp.js";import{S as de}from"./shield-alert-B8_J0uYT.js";import{S as ce}from"./save-CNiIU-3u.js";import{T as me}from"./trash-2-BNPsgs2t.js";import{P as oe}from"./plus-BbnHS2Zx.js";import{P as Bs}from"./power-off-D47FTQRk.js";import{a as Rs,P as Ts}from"./power-Ucg7FCbo.js";import{P as We}from"./package-check-OAWoRoy_.js";import{S as Oe}from"./sparkles-CavN45fA.js";import{S as Ls}from"./settings-2-DVRotgka.js";import{S as zs}from"./square-pen-ZPivfDGR.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1 +1 @@
import{r as i,o as J,b2 as fe,ar as Ne,a8 as ve,b3 as we,j as e,M as R,B as P,e as Q,b as E,X as F,v as k,b4 as _e,n as t,al as V,am as ke,b5 as Se,b6 as Ce,b7 as De,b8 as Re,b9 as Pe}from"./index-CkAjw-Zl.js";import{a as Ee,b as Fe,E as S,P as Me,S as M}from"./ui-DGhuFsSA.js";import{T}from"./truck-hG3NWX-r.js";import{K as W}from"./key-B8XT9PyZ.js";import{P as Te}from"./plus-BXZgwA0o.js";import{P as $,a as $e}from"./power-DZ_kRimy.js";import{T as A}from"./trash-2-H_4vB0ks.js";import{P as Ae}from"./power-off-BEy-96bB.js";import{S as K}from"./save-2L2g6g1L.js";import{S as Ke}from"./sparkles-ITX60YIA.js";const Ve=({mode:l})=>{const[x,L]=i.useState([]),[d,B]=i.useState(""),[y,Y]=i.useState("reply"),[j,Z]=i.useState([]),[I,h]=i.useState(!1),[f,z]=i.useState(null),[c,N]=i.useState({keyword:"",reply_content:""}),[C,ee]=i.useState([]),[se,ae]=i.useState([]),[te,u]=i.useState(!1),[v,H]=i.useState(null),[r,o]=i.useState({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),[O,le]=i.useState({}),[ie,g]=i.useState(!1),[Le,q]=i.useState(null),[n,m]=i.useState({cookie_id:"",enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),[re,U]=i.useState(!1);i.useEffect(()=>{if(l==="delivery"){b(),X(),J().then(L);return}J().then(s=>{L(s),s&&s.length>0&&B(a=>a||s[0].id)})},[l]),i.useEffect(()=>{l==="reply"&&d&&(_(),w())},[l,d]);const w=async()=>{try{const s=await fe();le(s)}catch(s){console.error("加载默认回复失败",s)}},b=async()=>{try{const s=await Ne();ee(s.filter(a=>!a.item_id))}catch(s){console.error("加载发货规则失败",s)}},X=async()=>{try{const s=await ve();ae(s)}catch(s){console.error("加载卡券失败",s)}},_=async()=>{if(d){U(!0);try{const s=await we(d);Z(s)}catch(s){console.error("加载关键词失败",s)}finally{U(!1)}}},ne=()=>{if(l==="delivery")H(null),o({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),u(!0);else if(y==="reply")z(null),N({keyword:"",reply_content:""}),h(!0);else{if(!d)return;G(d)}},G=async s=>{try{const a=await Se(s);q(a),m({cookie_id:s,enabled:a.enabled,reply_content:a.reply_content,reply_once:a.reply_once,reply_image_url:a.reply_image_url||""}),g(!0)}catch(a){console.error("加载默认回复失败",a),q(null),m({cookie_id:s,enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),g(!0)}},de=s=>{y==="reply"&&(z(s),N({keyword:s.keyword,reply_content:s.reply_content}),h(!0))},ce=s=>{H(s),o({keyword:s.item_keyword,cookie_id:s.cookie_id||"",card_id:String(s.card_group_id),description:s.name,enabled:s.enabled}),u(!0)},oe=async()=>{if(!d){t("请先选择账号");return}if(!c.keyword.trim()||!c.reply_content.trim()){t("请填写关键词和回复内容");return}try{await Re({id:f==null?void 0:f.id,keyword:c.keyword,reply_content:c.reply_content,match_type:"exact",enabled:!0},d),h(!1),_(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},me=async()=>{if(!r.keyword.trim()){t("请填写触发关键词");return}if(!r.card_id){t("请选择卡券");return}try{await V({id:v==null?void 0:v.id,item_keyword:r.keyword,cookie_id:r.cookie_id||void 0,item_id:void 0,card_group_id:parseInt(r.card_id),name:r.description,priority:1,enabled:r.enabled}),u(!1),b(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},pe=async s=>{if(!(!d||!await k("确认删除该关键词吗?")))try{await _e(s,d),_(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},xe=async s=>{if(await k("确认删除该发货规则吗?"))try{await ke(s),b(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ye=async s=>{try{await V({id:s.id,item_keyword:s.item_keyword,cookie_id:s.cookie_id,item_id:s.item_id,card_group_id:s.card_group_id,name:s.name,priority:s.priority,enabled:!s.enabled}),b()}catch(a){t("操作失败:"+a.message)}},he=async()=>{if(!n.cookie_id){t("请先选择账号");return}try{await Pe(n.cookie_id,{enabled:n.enabled,reply_content:n.reply_content,reply_once:n.reply_once,reply_image_url:n.reply_image_url}),g(!1),w(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},ue=async s=>{if(await k("确认删除该默认回复吗?"))try{await De(s),w(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ge=async s=>{if(await k("确认清空该账号的回复记录吗?清空后可以重新对所有对话使用默认回复。"))try{await Ce(s),t("清空成功!")}catch(a){t("清空失败:"+a.message)}},be=Object.values(O).filter(s=>s.enabled).length,je=()=>{l==="delivery"?Promise.all([b(),X()]):y==="reply"?_():w()},D=(s,a,p)=>e.jsx("button",{type:"button",role:"switch","aria-checked":s,"aria-label":p,onClick:a,className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${s?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${s?"translate-x-5":""}`})});return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(Ee,{title:l==="reply"?"自动回复":"通用自动发货",description:l==="reply"?"管理账Line truncated
import{r as i,o as J,b2 as fe,ar as Ne,a8 as ve,b3 as we,j as e,M as R,B as P,e as Q,b as E,X as F,v as k,b4 as _e,n as t,al as V,am as ke,b5 as Se,b6 as Ce,b7 as De,b8 as Re,b9 as Pe}from"./index-IP-mmLlr.js";import{a as Ee,b as Fe,E as S,P as Me,S as M}from"./ui-Fi8l9rTp.js";import{T}from"./truck-CrexfDE5.js";import{K as W}from"./key-ItWA3Cb3.js";import{P as Te}from"./plus-BbnHS2Zx.js";import{P as $,a as $e}from"./power-Ucg7FCbo.js";import{T as A}from"./trash-2-BNPsgs2t.js";import{P as Ae}from"./power-off-D47FTQRk.js";import{S as K}from"./save-CNiIU-3u.js";import{S as Ke}from"./sparkles-CavN45fA.js";const Ve=({mode:l})=>{const[x,L]=i.useState([]),[d,B]=i.useState(""),[y,Y]=i.useState("reply"),[j,Z]=i.useState([]),[I,h]=i.useState(!1),[f,z]=i.useState(null),[c,N]=i.useState({keyword:"",reply_content:""}),[C,ee]=i.useState([]),[se,ae]=i.useState([]),[te,u]=i.useState(!1),[v,H]=i.useState(null),[r,o]=i.useState({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),[O,le]=i.useState({}),[ie,g]=i.useState(!1),[Le,q]=i.useState(null),[n,m]=i.useState({cookie_id:"",enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),[re,U]=i.useState(!1);i.useEffect(()=>{if(l==="delivery"){b(),X(),J().then(L);return}J().then(s=>{L(s),s&&s.length>0&&B(a=>a||s[0].id)})},[l]),i.useEffect(()=>{l==="reply"&&d&&(_(),w())},[l,d]);const w=async()=>{try{const s=await fe();le(s)}catch(s){console.error("加载默认回复失败",s)}},b=async()=>{try{const s=await Ne();ee(s.filter(a=>!a.item_id))}catch(s){console.error("加载发货规则失败",s)}},X=async()=>{try{const s=await ve();ae(s)}catch(s){console.error("加载卡券失败",s)}},_=async()=>{if(d){U(!0);try{const s=await we(d);Z(s)}catch(s){console.error("加载关键词失败",s)}finally{U(!1)}}},ne=()=>{if(l==="delivery")H(null),o({keyword:"",cookie_id:"",card_id:"",description:"",enabled:!0}),u(!0);else if(y==="reply")z(null),N({keyword:"",reply_content:""}),h(!0);else{if(!d)return;G(d)}},G=async s=>{try{const a=await Se(s);q(a),m({cookie_id:s,enabled:a.enabled,reply_content:a.reply_content,reply_once:a.reply_once,reply_image_url:a.reply_image_url||""}),g(!0)}catch(a){console.error("加载默认回复失败",a),q(null),m({cookie_id:s,enabled:!1,reply_content:"",reply_once:!1,reply_image_url:""}),g(!0)}},de=s=>{y==="reply"&&(z(s),N({keyword:s.keyword,reply_content:s.reply_content}),h(!0))},ce=s=>{H(s),o({keyword:s.item_keyword,cookie_id:s.cookie_id||"",card_id:String(s.card_group_id),description:s.name,enabled:s.enabled}),u(!0)},oe=async()=>{if(!d){t("请先选择账号");return}if(!c.keyword.trim()||!c.reply_content.trim()){t("请填写关键词和回复内容");return}try{await Re({id:f==null?void 0:f.id,keyword:c.keyword,reply_content:c.reply_content,match_type:"exact",enabled:!0},d),h(!1),_(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},me=async()=>{if(!r.keyword.trim()){t("请填写触发关键词");return}if(!r.card_id){t("请选择卡券");return}try{await V({id:v==null?void 0:v.id,item_keyword:r.keyword,cookie_id:r.cookie_id||void 0,item_id:void 0,card_group_id:parseInt(r.card_id),name:r.description,priority:1,enabled:r.enabled}),u(!1),b(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},pe=async s=>{if(!(!d||!await k("确认删除该关键词吗?")))try{await _e(s,d),_(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},xe=async s=>{if(await k("确认删除该发货规则吗?"))try{await ke(s),b(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ye=async s=>{try{await V({id:s.id,item_keyword:s.item_keyword,cookie_id:s.cookie_id,item_id:s.item_id,card_group_id:s.card_group_id,name:s.name,priority:s.priority,enabled:!s.enabled}),b()}catch(a){t("操作失败:"+a.message)}},he=async()=>{if(!n.cookie_id){t("请先选择账号");return}try{await Pe(n.cookie_id,{enabled:n.enabled,reply_content:n.reply_content,reply_once:n.reply_once,reply_image_url:n.reply_image_url}),g(!1),w(),t("保存成功!")}catch(s){t("保存失败:"+s.message)}},ue=async s=>{if(await k("确认删除该默认回复吗?"))try{await De(s),w(),t("删除成功!")}catch(a){t("删除失败:"+a.message)}},ge=async s=>{if(await k("确认清空该账号的回复记录吗?清空后可以重新对所有对话使用默认回复。"))try{await Ce(s),t("清空成功!")}catch(a){t("清空失败:"+a.message)}},be=Object.values(O).filter(s=>s.enabled).length,je=()=>{l==="delivery"?Promise.all([b(),X()]):y==="reply"?_():w()},D=(s,a,p)=>e.jsx("button",{type:"button",role:"switch","aria-checked":s,"aria-label":p,onClick:a,className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${s?"bg-[#ffe100]":"bg-gray-300"}`,children:e.jsx("span",{className:`absolute left-1 top-1 h-4 w-4 rounded-full bg-white transition-transform ${s?"translate-x-5":""}`})});return e.jsxs("div",{className:"page-stack animate-fade-in",children:[e.jsx(Ee,{title:l==="reply"?"自动回复":"通用自动发货",description:l==="reply"?"管理账Line truncated
@@ -1,4 +1,4 @@
import{c as We,r as n,aW as mt,o as xt,n as u,h as ut,ba as ht,bb as ft,j as t,e as $e,L as U,bc as pt,X as gt,bd as bt,be as jt,bf as yt,aT as vt,bg as wt,bh as Nt,bi as kt,bj as St,v as Te,bk as Ct,bl as Mt}from"./index-CkAjw-Zl.js";import{I as Re,c as _t,S as Ee,E as It}from"./ui-DGhuFsSA.js";import{S as Z}from"./settings-2-CVdvHFW4.js";import{S as $t}from"./search-BUYv4hib.js";import{P as Tt}from"./package-CwcnsKO8.js";import{I as Rt}from"./image-BN5k8Hl-.js";import{Z as Et}from"./zap-BGhU4xU3.js";import{S as Lt}from"./send-jdubw9eF.js";import{P as Le}from"./plus-BXZgwA0o.js";import{T as Ue}from"./trash-2-H_4vB0ks.js";/**
import{c as We,r as n,aW as mt,o as xt,n as u,h as ut,ba as ht,bb as ft,j as t,e as $e,L as U,bc as pt,X as gt,bd as bt,be as jt,bf as yt,aT as vt,bg as wt,bh as Nt,bi as kt,bj as St,v as Te,bk as Ct,bl as Mt}from"./index-IP-mmLlr.js";import{I as Re,c as _t,S as Ee,E as It}from"./ui-Fi8l9rTp.js";import{S as Z}from"./settings-2-DVRotgka.js";import{S as $t}from"./search-TGrYyOkD.js";import{P as Tt}from"./package-C7ydMeAZ.js";import{I as Rt}from"./image-hfWSlf8S.js";import{Z as Et}from"./zap-DljT2UQs.js";import{S as Lt}from"./send-CwI5w629.js";import{P as Le}from"./plus-BbnHS2Zx.js";import{T as Ue}from"./trash-2-BNPsgs2t.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1 +1 @@
import{r as l,j as t,bc as E,e as ee,L as te,aE as ot,C as ct,X as Se,o as dt,bm as mt,bn as xt,bo as pt,n as o,bp as ut,bq as ht,br as _e,v as se,bs as yt,bt as Re,bu as bt,bv as gt,bw as ft,bx as jt,by as Nt}from"./index-CkAjw-Zl.js";import{a as vt,b as wt,S as $,E as L}from"./ui-DGhuFsSA.js";import{L as ae}from"./link-2-PznVeo4F.js";import{S as le}from"./shield-alert-BxxLkcUR.js";import{A as ne}from"./activity-DQLHFHES.js";import{P as Ee}from"./plus-BXZgwA0o.js";import{P as $e}from"./pen-line-CsaG3RgF.js";import{T as ie}from"./trash-2-H_4vB0ks.js";import{S as kt}from"./send-jdubw9eF.js";import{C as Ct,a as St}from"./chevron-right-DidJSJ1m.js";import{S as Le}from"./save-2L2g6g1L.js";import{C as _t}from"./check-B6GSSnq6.js";const y={dingtalk:{label:"钉钉",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://oapi.dingtalk.com/robot/send?..."},{key:"secret",label:"加签密钥",type:"password",optional:!0}],defaults:{}},feishu:{label:"飞书",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://open.feishu.cn/open-apis/bot/v2/hook/..."},{key:"secret",label:"签名密钥",type:"password",optional:!0}],defaults:{}},bark:{label:"Bark",fields:[{key:"device_key",label:"Device Key",type:"password"},{key:"server_url",label:"服务器地址",placeholder:"https://api.day.app",optional:!0}],defaults:{server_url:"https://api.day.app"}},email:{label:"邮件",fields:[{key:"smtp_server",label:"SMTP 服务器",placeholder:"留空则使用「系统设置 → 邮件服务」",optional:!0},{key:"smtp_port",label:"SMTP 端口",type:"number",placeholder:"留空则使用系统设置(如 465)",optional:!0},{key:"email_user",label:"发件邮箱",placeholder:"留空则使用系统设置的发件邮箱",optional:!0},{key:"email_password",label:"邮箱密码或授权码",type:"password",placeholder:"留空则使用系统设置的授权码",optional:!0},{key:"recipient_email",label:"接收邮箱",placeholder:"必填,通知发到这个邮箱"}],defaults:{}},webhook:{label:"Webhook",fields:[{key:"webhook_url",label:"Webhook 地址"},{key:"http_method",label:"请求方法",type:"select",options:["POST","PUT"]},{key:"headers",label:"请求头 JSON",type:"textarea",placeholder:'{"Authorization":"Bearer ..."}',optional:!0}],defaults:{http_method:"POST",headers:"{}"}},wechat:{label:"企业微信",fields:[{key:"webhook_url",label:"机器人 Webhook 地址"}],defaults:{}},telegram:{label:"Telegram",fields:[{key:"bot_token",label:"Bot Token",type:"password"},{key:"chat_id",label:"Chat ID"}],defaults:{}}},re=20,Rt=i=>{var k,x;const r=(x=(k=i==null?void 0:i.response)==null?void 0:k.data)==null?void 0:x.detail;if(r&&typeof r=="object"&&"message"in r){const b=r.message;if(typeof b=="string"&&b.trim())return b.trim()}return typeof r=="string"&&r.trim()?r.trim():i instanceof Error&&i.message?i.message:"测试发送失败,请稍后重试"},oe=i=>i.nickname||i.remark||i.id,T=i=>{if(!i)return"-";const r=new Date(i.includes("T")?i:`${i.replace(" ","T")}Z`);return Number.isNaN(r.getTime())?i:r.toLocaleString("zh-CN")},Wt=({isAdmin:i})=>{const[r,k]=l.useState("channels"),[x,b]=l.useState([]),[A,ce]=l.useState([]),[de,D]=l.useState([]),[Te,g]=l.useState({}),[f,Ae]=l.useState([]),[me,De]=l.useState([]),[C,xe]=l.useState(!0),[Pe,j]=l.useState(!1),[N,pe]=l.useState(null),[P,B]=l.useState("dingtalk"),[O,I]=l.useState(""),[d,p]=l.useState({}),[ue,he]=l.useState(!1),[Be,u]=l.useState(!1),[v,ye]=l.useState(null),[M,q]=l.useState(""),[W,G]=l.useState(""),[z,F]=l.useState(""),[H,h]=l.useState([]),[be,S]=l.useState(!1),[ge,Oe]=l.useState([]),[fe,Ie]=l.useState(0),[U,Me]=l.useState(""),[Z,qe]=l.useState(""),[w,_]=l.useState(0),[J,je]=l.useState(!1),[Ne,We]=l.useState([]),[ve,Ge]=l.useState(""),[R,we]=l.useState(""),[K,ke]=l.useState(!1),m=async()=>{xe(!0);try{const[e,s,a,n]=await Promise.all([dt(),mt(),xt(),pt()]);b(e),ce(s.data),D(a.data),g(c=>{const rt=new Set(a.data.map(Y=>String(Y.id)));return Object.fromEntries(Object.entries(c).filter(([Y])=>rt.has(Y)))}),Ae(n.events),De(n.priorities)}catch(e){o(`加载通知配置失败:${e.message}`)}finally{xe(!1)}};l.useEffect(()=>{m()},[]);const ze=()=>{const e="dingtalk";pe(null),B(e),I(""),p({...y[e].defaults}),j(!0)},Fe=e=>{pe(e),B(e.type),I(e.name),p({...y[e.type].defaults,...e.config}),j(!0)},He=e=>{B(e),p({...y[e].defaults})},Ue=async()=>{he(!0);try{N?await _e(N.id,{name:O,config:d,enabled:N.enabled}):await jt({name:O,type:P,config:d}),j(!1),await m()}catch(e){o(`保存通知渠道失败:${e.message}`)}finally{he(!1)}},Ze=async e=>{try{await _e(e.id,{enabled:!e.enabled}),ce(s=>s.map(a=>a.id===e.id?{...a,enabled:!a.enabled}:a)),e.enabled?D(s=>s.filter(a=>a.channel_id!==Number(e.id))):await m()}catch(s){o(`更新渠道状态失败:${s.message}`)}},Je=async e=>{if(await se(`确认删除通知渠道“${e.name}”?相关账号绑定也会被删除。`))try{await yt(e.id),await m()}catch(s){o(`删除通知渠道失败:${s.message}`)}},Ke=e=>{var s;return((s=f.find(a=Line truncated
import{r as l,j as t,bc as E,e as ee,L as te,aE as ot,C as ct,X as Se,o as dt,bm as mt,bn as xt,bo as pt,n as o,bp as ut,bq as ht,br as _e,v as se,bs as yt,bt as Re,bu as bt,bv as gt,bw as ft,bx as jt,by as Nt}from"./index-IP-mmLlr.js";import{a as vt,b as wt,S as $,E as L}from"./ui-Fi8l9rTp.js";import{L as ae}from"./link-2-xKkzn7ZQ.js";import{S as le}from"./shield-alert-B8_J0uYT.js";import{A as ne}from"./activity-Dmn-a3S9.js";import{P as Ee}from"./plus-BbnHS2Zx.js";import{P as $e}from"./pen-line-D5rb4QS3.js";import{T as ie}from"./trash-2-BNPsgs2t.js";import{S as kt}from"./send-CwI5w629.js";import{C as Ct,a as St}from"./chevron-right-CbwGgzS_.js";import{S as Le}from"./save-CNiIU-3u.js";import{C as _t}from"./check-D50E5xnW.js";const y={dingtalk:{label:"钉钉",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://oapi.dingtalk.com/robot/send?..."},{key:"secret",label:"加签密钥",type:"password",optional:!0}],defaults:{}},feishu:{label:"飞书",fields:[{key:"webhook_url",label:"Webhook 地址",placeholder:"https://open.feishu.cn/open-apis/bot/v2/hook/..."},{key:"secret",label:"签名密钥",type:"password",optional:!0}],defaults:{}},bark:{label:"Bark",fields:[{key:"device_key",label:"Device Key",type:"password"},{key:"server_url",label:"服务器地址",placeholder:"https://api.day.app",optional:!0}],defaults:{server_url:"https://api.day.app"}},email:{label:"邮件",fields:[{key:"smtp_server",label:"SMTP 服务器",placeholder:"留空则使用「系统设置 → 邮件服务」",optional:!0},{key:"smtp_port",label:"SMTP 端口",type:"number",placeholder:"留空则使用系统设置(如 465)",optional:!0},{key:"email_user",label:"发件邮箱",placeholder:"留空则使用系统设置的发件邮箱",optional:!0},{key:"email_password",label:"邮箱密码或授权码",type:"password",placeholder:"留空则使用系统设置的授权码",optional:!0},{key:"recipient_email",label:"接收邮箱",placeholder:"必填,通知发到这个邮箱"}],defaults:{}},webhook:{label:"Webhook",fields:[{key:"webhook_url",label:"Webhook 地址"},{key:"http_method",label:"请求方法",type:"select",options:["POST","PUT"]},{key:"headers",label:"请求头 JSON",type:"textarea",placeholder:'{"Authorization":"Bearer ..."}',optional:!0}],defaults:{http_method:"POST",headers:"{}"}},wechat:{label:"企业微信",fields:[{key:"webhook_url",label:"机器人 Webhook 地址"}],defaults:{}},telegram:{label:"Telegram",fields:[{key:"bot_token",label:"Bot Token",type:"password"},{key:"chat_id",label:"Chat ID"}],defaults:{}}},re=20,Rt=i=>{var k,x;const r=(x=(k=i==null?void 0:i.response)==null?void 0:k.data)==null?void 0:x.detail;if(r&&typeof r=="object"&&"message"in r){const b=r.message;if(typeof b=="string"&&b.trim())return b.trim()}return typeof r=="string"&&r.trim()?r.trim():i instanceof Error&&i.message?i.message:"测试发送失败,请稍后重试"},oe=i=>i.nickname||i.remark||i.id,T=i=>{if(!i)return"-";const r=new Date(i.includes("T")?i:`${i.replace(" ","T")}Z`);return Number.isNaN(r.getTime())?i:r.toLocaleString("zh-CN")},Wt=({isAdmin:i})=>{const[r,k]=l.useState("channels"),[x,b]=l.useState([]),[A,ce]=l.useState([]),[de,D]=l.useState([]),[Te,g]=l.useState({}),[f,Ae]=l.useState([]),[me,De]=l.useState([]),[C,xe]=l.useState(!0),[Pe,j]=l.useState(!1),[N,pe]=l.useState(null),[P,B]=l.useState("dingtalk"),[O,I]=l.useState(""),[d,p]=l.useState({}),[ue,he]=l.useState(!1),[Be,u]=l.useState(!1),[v,ye]=l.useState(null),[M,q]=l.useState(""),[W,G]=l.useState(""),[z,F]=l.useState(""),[H,h]=l.useState([]),[be,S]=l.useState(!1),[ge,Oe]=l.useState([]),[fe,Ie]=l.useState(0),[U,Me]=l.useState(""),[Z,qe]=l.useState(""),[w,_]=l.useState(0),[J,je]=l.useState(!1),[Ne,We]=l.useState([]),[ve,Ge]=l.useState(""),[R,we]=l.useState(""),[K,ke]=l.useState(!1),m=async()=>{xe(!0);try{const[e,s,a,n]=await Promise.all([dt(),mt(),xt(),pt()]);b(e),ce(s.data),D(a.data),g(c=>{const rt=new Set(a.data.map(Y=>String(Y.id)));return Object.fromEntries(Object.entries(c).filter(([Y])=>rt.has(Y)))}),Ae(n.events),De(n.priorities)}catch(e){o(`加载通知配置失败:${e.message}`)}finally{xe(!1)}};l.useEffect(()=>{m()},[]);const ze=()=>{const e="dingtalk";pe(null),B(e),I(""),p({...y[e].defaults}),j(!0)},Fe=e=>{pe(e),B(e.type),I(e.name),p({...y[e.type].defaults,...e.config}),j(!0)},He=e=>{B(e),p({...y[e].defaults})},Ue=async()=>{he(!0);try{N?await _e(N.id,{name:O,config:d,enabled:N.enabled}):await jt({name:O,type:P,config:d}),j(!1),await m()}catch(e){o(`保存通知渠道失败:${e.message}`)}finally{he(!1)}},Ze=async e=>{try{await _e(e.id,{enabled:!e.enabled}),ce(s=>s.map(a=>a.id===e.id?{...a,enabled:!a.enabled}:a)),e.enabled?D(s=>s.filter(a=>a.channel_id!==Number(e.id))):await m()}catch(s){o(`更新渠道状态失败:${s.message}`)}},Je=async e=>{if(await se(`确认删除通知渠道“${e.name}”?相关账号绑定也会被删除。`))try{await yt(e.id),await m()}catch(s){o(`删除通知渠道失败:${s.message}`)}},Ke=e=>{var s;return((s=f.find(a=Line truncated
@@ -1,4 +1,4 @@
import{c as Re,r as l,h as ys,O as js,j as e,e as $,P as fs,E as vs,Q as Ns,b as N,X as _,o as _s,T as ws,V as Me,W as ks,Y as Ss,n,Z as Cs,v as Pe,_ as Os,$ as Es,a0 as Ls,a1 as Is,a2 as Ms,a3 as Ps,a4 as Ds,a5 as Fs}from"./index-CkAjw-Zl.js";import{a as As,b as $s,E as Rs}from"./ui-DGhuFsSA.js";import{P as qs}from"./plus-BXZgwA0o.js";import{T as De}from"./truck-hG3NWX-r.js";import{S as Ts}from"./search-BUYv4hib.js";import{P as Y}from"./package-check-DD7mkdH5.js";import{F as zs}from"./flower-2-Cth4QkK1.js";import{E as Vs}from"./eye-vwq0YQk5.js";import{S as Hs}from"./square-pen-B8Sj6MD6.js";import{T as Js}from"./trash-2-H_4vB0ks.js";import{C as Ws,a as Bs}from"./chevron-right-DidJSJ1m.js";import{S as Fe}from"./save-2L2g6g1L.js";/**
import{c as Re,r as l,h as ys,O as js,j as e,e as $,P as fs,E as vs,Q as Ns,b as N,X as _,o as _s,T as ws,V as Me,W as ks,Y as Ss,n,Z as Cs,v as Pe,_ as Os,$ as Es,a0 as Ls,a1 as Is,a2 as Ms,a3 as Ps,a4 as Ds,a5 as Fs}from"./index-IP-mmLlr.js";import{a as As,b as $s,E as Rs}from"./ui-Fi8l9rTp.js";import{P as qs}from"./plus-BbnHS2Zx.js";import{T as De}from"./truck-CrexfDE5.js";import{S as Ts}from"./search-TGrYyOkD.js";import{P as Y}from"./package-check-OAWoRoy_.js";import{F as zs}from"./flower-2-fqYsfuSn.js";import{E as Vs}from"./eye-BxUVYll7.js";import{S as Hs}from"./square-pen-ZPivfDGR.js";import{T as Js}from"./trash-2-BNPsgs2t.js";import{C as Ws,a as Bs}from"./chevron-right-CbwGgzS_.js";import{S as Fe}from"./save-CNiIU-3u.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
+1
View File
@@ -0,0 +1 @@
import{r as c,bQ as T,o as V,bR as q,bS as G,j as e,bT as D,L as k,e as J,E as W}from"./index-IP-mmLlr.js";import{P as X,a as Z,N as ee,E as K}from"./ui-Fi8l9rTp.js";import{S as O}from"./sparkles-CavN45fA.js";import{T as te}from"./trending-up-BcW73Gjl.js";const se=2500,re=[{id:"sold",label:"按销量"},{id:"similarity",label:"按相似度"},{id:"credit",label:"按信用"},{id:"reviews",label:"按评论数"}],B=n=>!n||n<0?"0":n>=1e4?`${(n/1e4).toFixed(1).replace(/\.0$/,"")}万`:String(n),ae=n=>{if(!n)return"—";const o=Date.now()-n*1e3;if(o<6e4)return"刚刚";if(o<36e5)return`${Math.floor(o/6e4)}分钟前`;if(o<864e5)return`${Math.floor(o/36e5)}小时前`;if(o<7*864e5)return`${Math.floor(o/864e5)}天前`;const d=new Date(n*1e3);return`${d.getMonth()+1}月${d.getDate()}日`},Y=({value:n,max:o=100,suffix:d=""})=>{const j=o>0?n/o:0,r=j>=.7?"bg-emerald-100 text-emerald-700":j>=.4?"bg-sky-100 text-sky-700":"bg-[var(--surface-subtle)] text-[var(--text-soft)]";return e.jsxs("span",{className:`inline-flex min-w-[3rem] justify-center rounded-full px-2 py-0.5 text-xs font-semibold ${r}`,children:[n,d]})},le=({level:n,fallback:o})=>n?e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-amber-600",title:`信用等级 ${n} 级`,children:["★".repeat(n),e.jsxs("span",{className:"text-[var(--text-soft)] font-normal",children:[n,"级"]})]}):e.jsx("span",{className:"text-xs text-[var(--text-soft)]",title:o,children:o||"—"}),de=()=>{var M,L,P,R;const[n,o]=c.useState(!0),[d,j]=c.useState(""),[r,S]=c.useState(null),[f,y]=c.useState(!1),[x,b]=c.useState(null),[w,z]=c.useState("sold"),[v,m]=c.useState(null),[$,A]=c.useState(""),[I,F]=c.useState(""),[h,C]=c.useState(!1),u=c.useRef(null),_=c.useCallback(()=>{u.current&&(clearInterval(u.current),u.current=null),y(!1),b(null)},[]),E=c.useCallback(async t=>{var i,s,a,g;try{const l=await T(t);l.data&&S(l.data),l.refreshing&&(y(!0),b({done:((i=l.progress)==null?void 0:i.done)??0,total:((s=l.progress)==null?void 0:s.total)??0,stage:((a=l.progress)==null?void 0:a.stage)||"抓取中"})),((g=l.progress)==null?void 0:g.state)==="error"&&l.progress.error&&m({type:"error",message:l.progress.error})}catch(l){console.error("加载同行店铺失败:",l)}},[]);c.useEffect(()=>{let t=!0;return(async()=>{try{const s=(await V())[0];if(!t)return;if(!s){m({type:"info",message:"请先在「账号管理」添加账号并同步商品,再回到本页。"}),o(!1);return}j(s.id),await E(s.id)}catch(i){console.error("初始化同行店铺失败:",i)}finally{t&&o(!1)}})(),()=>{t=!1,u.current&&clearInterval(u.current)}},[E]),c.useEffect(()=>{if(!(!f||!d))return u.current=setInterval(async()=>{var t,i,s,a,g;try{const l=await T(d);b({done:((t=l.progress)==null?void 0:t.done)??0,total:((i=l.progress)==null?void 0:i.total)??0,stage:((s=l.progress)==null?void 0:s.stage)||"抓取中"}),((a=l.progress)==null?void 0:a.state)==="done"?(_(),l.data&&S(l.data),m({type:"success",message:"同行店铺数据已更新。"})):((g=l.progress)==null?void 0:g.state)==="error"&&(_(),m({type:"error",message:l.progress.error||"抓取失败,请稍后重试。"}))}catch(l){console.error("轮询同行店铺失败:",l)}},se),()=>{u.current&&clearInterval(u.current)}},[f,d,_]);const H=c.useCallback(async()=>{var t,i;if(!(!d||f)){m(null),A("");try{if((await q(d)).status==="running"){y(!0);return}y(!0),b({done:0,total:0,stage:"准备抓取"})}catch(s){const a=((i=(t=s==null?void 0:s.response)==null?void 0:t.data)==null?void 0:i.detail)||(s==null?void 0:s.message)||"触发刷新失败";m({type:"error",message:String(a)})}}},[d,f]),Q=c.useCallback(async()=>{var t,i;if(!(!d||h)){C(!0),m(null);try{const s=await G(d);s.status==="ok"&&s.analysis?(A(s.analysis),F(s.model||"")):s.status==="need_api_key"?m({type:"info",message:s.message||"尚未配置模型 KEY,请先在「AI 回复设置」填写模型 KEY。"}):m({type:"error",message:s.message||"AI 分析失败,请稍后重试。"})}catch(s){const a=((i=(t=s==null?void 0:s.response)==null?void 0:t.data)==null?void 0:i.detail)||(s==null?void 0:s.message)||"AI 分析失败";m({type:"error",message:String(a)})}finally{C(!1)}}},[d,h]),N=c.useMemo(()=>{const t=[...(r==null?void 0:r.shops)||[]],i={sold:(s,a)=>a.sold-s.sold||a.search_deals-s.search_deals,similarity:(s,a)=>a.similarity-s.similarity||a.value_score-s.value_score,credit:(s,a)=>(a.credit_sort??a.credit_level)-(s.credit_sort??s.credit_level)||a.good_rate-s.good_rate,reviews:(s,a)=>a.good+a.mid+a.bad-(s.good+s.mid+s.bad)||a.good-s.good};return t.sort(i[w])},[r,w]);if(n)return e.jsx(X,{label:"正在加载同行店铺"});const p=r==null?void 0:r.user,U=r!=null&&r.updated_at?ae(r.updated_at):"尚未生成";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Z,{title:"同行热卖店铺",description:"按您店铺的类型,从闲鱼实时搜索聚合同类型销量最好的 50 家店铺,给出与您店铺的相似度和参考价值。",icon:D,badge:e.jsx("span",{className:"rounded-fullLine truncated
@@ -1,4 +1,4 @@
import{c as A,r as n,bQ as oe,bR as me,j as e,bS as X,e as M,X as q,bT as xe,aE as pe,bU as he,bV as ue,bW as be,bX as je,bY as ge,bZ as ve}from"./index-CkAjw-Zl.js";import{P as Q,a as ye,N as E,E as U}from"./ui-DGhuFsSA.js";import{P as Ne}from"./plus-BXZgwA0o.js";import{P as _e}from"./play-BTeYe-0U.js";import{P as fe}from"./pen-line-CsaG3RgF.js";import{T as we}from"./trash-2-H_4vB0ks.js";import{S as V}from"./search-BUYv4hib.js";/**
import{c as A,r as n,bU as oe,bV as me,j as e,bW as X,e as M,X as q,bX as xe,aE as pe,bY as he,bZ as ue,b_ as be,b$ as je,c0 as ge,c1 as ve}from"./index-IP-mmLlr.js";import{P as U,a as ye,N as E,E as V}from"./ui-Fi8l9rTp.js";import{P as Ne}from"./plus-BbnHS2Zx.js";import{P as _e}from"./play-CYUspTVx.js";import{P as fe}from"./pen-line-D5rb4QS3.js";import{T as we}from"./trash-2-BNPsgs2t.js";import{S as Z}from"./search-TGrYyOkD.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -13,4 +13,4 @@ import{c as A,r as n,bQ as oe,bR as me,j as e,bS as X,e as M,X as q,bT as xe,aE
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $e=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Pe=A("history",$e),Me=2500,x=t=>t==null?"—":`¥${Number(t).toLocaleString("zh-CN",{maximumFractionDigits:2})}`,I=()=>Math.floor(Date.now()/1e3),L=t=>{if(!t||t<=0)return"—";const i=Math.floor(t);return i<60?`${i} 秒前`:i<3600?`${Math.floor(i/60)} 分钟前`:i<86400?`${Math.floor(i/3600)} 小时前`:`${Math.floor(i/86400)} 天前`},Ee=t=>t==null||t<0?"已停用":t<60?`${Math.max(0,Math.round(t))} 秒后`:t<3600?`${Math.floor(t/60)} 分钟后`:`${Math.floor(t/3600)} 小时后`,k=t=>{const i=t.trim();if(i==="")return null;const h=Number(i);return Number.isFinite(h)&&h>=0?h:null},Z={name:"",keyword:"",min_price:"",max_price:"",target_price:"",interval_minutes:"30",pages:"2",enabled:!0,cookie_id:"",min_seller_credit:"",min_seller_deals:"",ai_precise:!1},Re=t=>({name:t.name,keyword:t.keyword,min_price:t.min_price===null?"":String(t.min_price),max_price:t.max_price===null?"":String(t.max_price),target_price:t.target_price===null?"":String(t.target_price),interval_minutes:String(t.interval_minutes),pages:String(t.pages||2),enabled:t.enabled!==!1,cookie_id:t.cookie_id||"",min_seller_credit:t.min_seller_credit||"",min_seller_deals:t.min_seller_deals!=null?String(t.min_seller_deals):"",ai_precise:!!t.ai_precise}),J=t=>{const i=t.keyword.trim();if(!i)return{input:null,error:"请填写搜索关键词"};const h=t.name.trim()||i,v=k(t.min_price),m=k(t.max_price);if(v!==null&&m!==null&&v>m)return{input:null,error:"最低价不能大于最高价"};const g=k(t.target_price);if(g!==null&&m!==null&&g>m)return{input:null,error:"目标价不能高于最高价"};const u=Number(t.interval_minutes);if(!Number.isFinite(u)||u<5)return{input:null,error:"检查间隔至少 5 分钟"};const c=Number(t.pages);return!Number.isFinite(c)||c<1||c>5?{input:null,error:"每轮页数取 1~5"}:{input:{name:h,keyword:i,min_price:v,max_price:m,target_price:g,interval_minutes:Math.round(u),pages:Math.round(c),enabled:t.enabled,cookie_id:t.cookie_id||null,min_seller_credit:t.min_seller_credit||null,min_seller_deals:k(t.min_seller_deals),ai_precise:t.ai_precise}}};function Oe(){const[t,i]=n.useState([]),[h,v]=n.useState(!0),[m,g]=n.useState(""),[u,c]=n.useState(null),[ee,F]=n.useState([]),[se,y]=n.useState(!1),[N,T]=n.useState(null),[l,d]=n.useState(Z),[D,H]=n.useState(!1),[O,_]=n.useState(""),[C,Y]=n.useState(!1),[o,f]=n.useState(null),[B,b]=n.useState(""),[S,z]=n.useState(null),[G,$]=n.useState([]),[te,K]=n.useState(!1),w=n.useRef(new Set),p=n.useCallback(async()=>{try{const r=(await oe()).rules??[];i(r),g("");const a=new Set;for(const j of r)j.running&&a.add(j.id);const P=[...w.current].filter(j=>!a.has(j));w.current=a,P.length&&p()}catch(s){g(s instanceof Error?s.message:"加载失败")}finally{v(!1)}},[]);n.useEffect(()=>{p(),me().then(r=>F(r.cookies??[])).catch(()=>F([]));const s=setInterval(()=>void p(),Me);return()=>clearInterval(s)},[p]);const ae=()=>{T(null),d(Z),f(null),b(""),_(""),y(!0)},re=s=>{T(s.id),d(Re(s)),f(null),b(""),_(""),y(!0)},le=async()=>{const{input:s,error:r}=J(l);if(!s){b(r??"参数有误");return}Y(!0),b(""),f(null);try{const a=await he({keyword:s.keyword,min_price:s.min_price,max_price:s.max_price,pages:s.pages,cookie_id:s.cookie_id,min_seller_credit:s.min_seller_credit,min_seller_deals:s.min_seller_deals,ai_precise:s.ai_precise});f(a),a.error?b(a.error):a.lowest||b("没搜到符合条件的商品,换个关键词或放宽价格区间试试")}catch(a){b(a instanceof Error?a.message:"试搜失败")}finally{Y(!1)}},ne=async()=>{const{input:s,error:r}=J(l);if(!s){_(r??"参数有误");return}H(!0),_("");try{N===null?await ue(s):await be(N,s),y(!1),c({type:"info",message:N===null?"规则已创建,可以立即检查一次":"规则已保存"}),await p()}catch(a){_(a instanceof Error?a.message:"保存失败")}finally{H(!1)}},ie=async s=>{w.current.add(s.id),c(null);try{const r=await je(s.id);if(!r.started)c({type:"info",message:r.message??"任务未启动"});else if(r.record){const a=r.record.lowest_price;a==null?c({type:"warning",message:`「${s.name}」没搜到可比价的商品(已记录一次空结果)`}):r.notified?c({type:"success",message:`已找到最低价 ${x(a)},通知已发送(${r.notify_reason||"命中"})`}):c({type:"info",message:`本次最低价 ${x(a)}(${r.notify_reason||"未触发通知"})`}),r.notify_error&&c({type:"error",message:`通知发送失败:${r.notify_error}`})}}catch(r){c({type:"error",message:r instanceof Error?r.message:"检查失败"})}finally{w.current.delete(s.id),await p()}},ce=async s=>{if(window.confirm(`删除监控规则「${s.name}」?检查历史会一并删除。`))try{await ge(s.id),c({type:"info",message:"规则已删除"}),await p()}catch(r){c({type:"error",message:r instanceof Error?r.message:"删除失败"})}},de=async s=>{z(s),K(!0),$([]);try{const r=await ve(s.id,50);$(r.records??[])}catchLine truncated
*/const $e=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Pe=A("history",$e),Me=2500,x=t=>t==null?"—":`¥${Number(t).toLocaleString("zh-CN",{maximumFractionDigits:2})}`,I=()=>Math.floor(Date.now()/1e3),L=t=>{if(!t||t<=0)return"—";const i=Math.floor(t);return i<60?`${i} 秒前`:i<3600?`${Math.floor(i/60)} 分钟前`:i<86400?`${Math.floor(i/3600)} 小时前`:`${Math.floor(i/86400)} 天前`},Ee=t=>t==null||t<0?"已停用":t<60?`${Math.max(0,Math.round(t))} 秒后`:t<3600?`${Math.floor(t/60)} 分钟后`:`${Math.floor(t/3600)} 小时后`,k=t=>{const i=t.trim();if(i==="")return null;const h=Number(i);return Number.isFinite(h)&&h>=0?h:null},J={name:"",keyword:"",min_price:"",max_price:"",target_price:"",interval_minutes:"30",pages:"2",enabled:!0,cookie_id:"",min_seller_credit:"",min_seller_deals:"",ai_precise:!1},Re=t=>({name:t.name,keyword:t.keyword,min_price:t.min_price===null?"":String(t.min_price),max_price:t.max_price===null?"":String(t.max_price),target_price:t.target_price===null?"":String(t.target_price),interval_minutes:String(t.interval_minutes),pages:String(t.pages||2),enabled:t.enabled!==!1,cookie_id:t.cookie_id||"",min_seller_credit:t.min_seller_credit||"",min_seller_deals:t.min_seller_deals!=null?String(t.min_seller_deals):"",ai_precise:!!t.ai_precise}),Q=t=>{const i=t.keyword.trim();if(!i)return{input:null,error:"请填写搜索关键词"};const h=t.name.trim()||i,v=k(t.min_price),m=k(t.max_price);if(v!==null&&m!==null&&v>m)return{input:null,error:"最低价不能大于最高价"};const g=k(t.target_price);if(g!==null&&m!==null&&g>m)return{input:null,error:"目标价不能高于最高价"};const u=Number(t.interval_minutes);if(!Number.isFinite(u)||u<5)return{input:null,error:"检查间隔至少 5 分钟"};const c=Number(t.pages);return!Number.isFinite(c)||c<1||c>5?{input:null,error:"每轮页数取 1~5"}:{input:{name:h,keyword:i,min_price:v,max_price:m,target_price:g,interval_minutes:Math.round(u),pages:Math.round(c),enabled:t.enabled,cookie_id:t.cookie_id||null,min_seller_credit:t.min_seller_credit||null,min_seller_deals:k(t.min_seller_deals),ai_precise:t.ai_precise}}};function Oe(){const[t,i]=n.useState([]),[h,v]=n.useState(!0),[m,g]=n.useState(""),[u,c]=n.useState(null),[ee,F]=n.useState([]),[se,y]=n.useState(!1),[N,D]=n.useState(null),[l,d]=n.useState(J),[T,H]=n.useState(!1),[O,_]=n.useState(""),[C,Y]=n.useState(!1),[o,f]=n.useState(null),[B,b]=n.useState(""),[S,z]=n.useState(null),[G,$]=n.useState([]),[te,K]=n.useState(!1),w=n.useRef(new Set),p=n.useCallback(async()=>{try{const r=(await oe()).rules??[];i(r),g("");const a=new Set;for(const j of r)j.running&&a.add(j.id);const P=[...w.current].filter(j=>!a.has(j));w.current=a,P.length&&p()}catch(s){g(s instanceof Error?s.message:"加载失败")}finally{v(!1)}},[]);n.useEffect(()=>{p(),me().then(r=>F(r.cookies??[])).catch(()=>F([]));const s=setInterval(()=>void p(),Me);return()=>clearInterval(s)},[p]);const ae=()=>{D(null),d(J),f(null),b(""),_(""),y(!0)},re=s=>{D(s.id),d(Re(s)),f(null),b(""),_(""),y(!0)},le=async()=>{const{input:s,error:r}=Q(l);if(!s){b(r??"参数有误");return}Y(!0),b(""),f(null);try{const a=await he({keyword:s.keyword,min_price:s.min_price,max_price:s.max_price,pages:s.pages,cookie_id:s.cookie_id,min_seller_credit:s.min_seller_credit,min_seller_deals:s.min_seller_deals,ai_precise:s.ai_precise});f(a),a.error?b(a.error):a.lowest||b("没搜到符合条件的商品,换个关键词或放宽价格区间试试")}catch(a){b(a instanceof Error?a.message:"试搜失败")}finally{Y(!1)}},ne=async()=>{const{input:s,error:r}=Q(l);if(!s){_(r??"参数有误");return}H(!0),_("");try{N===null?await ue(s):await be(N,s),y(!1),c({type:"info",message:N===null?"规则已创建,可以立即检查一次":"规则已保存"}),await p()}catch(a){_(a instanceof Error?a.message:"保存失败")}finally{H(!1)}},ie=async s=>{w.current.add(s.id),c(null);try{const r=await je(s.id);if(!r.started)c({type:"info",message:r.message??"任务未启动"});else if(r.record){const a=r.record.lowest_price;a==null?c({type:"warning",message:`「${s.name}」没搜到可比价的商品(已记录一次空结果)`}):r.notified?c({type:"success",message:`已找到最低价 ${x(a)},通知已发送(${r.notify_reason||"命中"})`}):c({type:"info",message:`本次最低价 ${x(a)}(${r.notify_reason||"未触发通知"})`}),r.notify_error&&c({type:"error",message:`通知发送失败:${r.notify_error}`})}}catch(r){c({type:"error",message:r instanceof Error?r.message:"检查失败"})}finally{w.current.delete(s.id),await p()}},ce=async s=>{if(window.confirm(`删除监控规则「${s.name}」?检查历史会一并删除。`))try{await ge(s.id),c({type:"info",message:"规则已删除"}),await p()}catch(r){c({type:"error",message:r instanceof Error?r.message:"删除失败"})}},de=async s=>{z(s),K(!0),$([]);try{const r=await ve(s.id,50);$(r.records??[])}catchLine truncated
@@ -1,4 +1,4 @@
import{c as H,r as c,j as e,aA as J,e as ye,S as ge,E as be,L as j,aB as je,aC as _e,aD as Ne,aE as ve,X as O,o as fe,aF as we,aG as ke,aH as Ce,aI as U,n as r,v as E,aJ as $e,aK as Se,aL as Pe,aM as De,aN as Re,aO as Fe,aP as Me,aQ as Le}from"./index-CkAjw-Zl.js";import{P as Ie,a as Ae,b as Ee,S as _,E as N,N as ze}from"./ui-DGhuFsSA.js";import{S as C}from"./search-BUYv4hib.js";import{T as v}from"./trash-2-H_4vB0ks.js";import{S as z}from"./save-2L2g6g1L.js";import{P as X}from"./play-BTeYe-0U.js";import{P as Te}from"./package-check-DD7mkdH5.js";import{L as Be}from"./link-2-PznVeo4F.js";/**
import{c as H,r as c,j as e,aA as J,e as ye,S as ge,E as be,L as j,aB as je,aC as _e,aD as Ne,aE as ve,X as O,o as fe,aF as we,aG as ke,aH as Ce,aI as U,n as r,v as E,aJ as $e,aK as Se,aL as Pe,aM as De,aN as Re,aO as Fe,aP as Me,aQ as Le}from"./index-IP-mmLlr.js";import{P as Ie,a as Ae,b as Ee,S as _,E as N,N as ze}from"./ui-Fi8l9rTp.js";import{S as C}from"./search-TGrYyOkD.js";import{T as v}from"./trash-2-BNPsgs2t.js";import{S as z}from"./save-CNiIU-3u.js";import{P as X}from"./play-CYUspTVx.js";import{P as Te}from"./package-check-OAWoRoy_.js";import{L as Be}from"./link-2-xKkzn7ZQ.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as Fe,r,o as Ee,j as e,bG as le,L as g,b as Re,X as ie,E as Ae,bH as $e,bI as Ue,bJ as qe,bK as De,bL as Me,bM as Te}from"./index-CkAjw-Zl.js";import{a as ze,N as Be,b as He,E as ne}from"./ui-DGhuFsSA.js";import{S as F}from"./search-BUYv4hib.js";import{P as Oe}from"./plus-BXZgwA0o.js";import{S as Ke}from"./sparkles-ITX60YIA.js";import{P as We}from"./package-CwcnsKO8.js";/**
import{c as Fe,r,o as Ee,j as e,bG as le,L as g,b as Re,X as ie,E as Ae,bH as $e,bI as Ue,bJ as qe,bK as De,bL as Me,bM as Te}from"./index-IP-mmLlr.js";import{a as ze,N as Be,b as He,E as ne}from"./ui-Fi8l9rTp.js";import{S as F}from"./search-TGrYyOkD.js";import{P as Oe}from"./plus-BbnHS2Zx.js";import{S as Ke}from"./sparkles-CavN45fA.js";import{P as We}from"./package-C7ydMeAZ.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as se,r as l,aS as ae,j as e,l as te,e as K,aT as ne,aU as v,aV as q,S as le,ak as O,aW as ie,aX as re,n as c,aY as ce,aZ as oe,a_ as de,a$ as pe,b0 as me,b1 as ue}from"./index-CkAjw-Zl.js";import{P as xe,a as he,b as ge,S as p,N as ye}from"./ui-DGhuFsSA.js";import{S as je}from"./save-2L2g6g1L.js";import{S as Q}from"./sparkles-ITX60YIA.js";import{Z as L}from"./zap-BGhU4xU3.js";import{E as w}from"./eye-off-DVn7pRcv.js";import{E as C}from"./eye-vwq0YQk5.js";/**
import{c as se,r as l,aS as ae,j as e,l as te,e as K,aT as ne,aU as v,aV as q,S as le,ak as O,aW as ie,aX as re,n as c,aY as ce,aZ as oe,a_ as de,a$ as pe,b0 as me,b1 as ue}from"./index-IP-mmLlr.js";import{P as xe,a as he,b as ge,S as p,N as ye}from"./ui-Fi8l9rTp.js";import{S as je}from"./save-CNiIU-3u.js";import{S as Q}from"./sparkles-CavN45fA.js";import{Z as L}from"./zap-DljT2UQs.js";import{E as w}from"./eye-off-B2vwWUUu.js";import{E as C}from"./eye-BxUVYll7.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1 +1 @@
import{r as l,j as e,U as h,e as $,S as j,aT as A,L as f,ak as T,bz as L,n as i,v as y,bA as P,bB as R,aY as E,bC as _}from"./index-CkAjw-Zl.js";import{a as I,S as N,E as B}from"./ui-DGhuFsSA.js";import{T as z}from"./trash-2-H_4vB0ks.js";const D=n=>{if(!n)return"-";const c=new Date(n.includes("T")?n:`${n.replace(" ","T")}Z`);return Number.isNaN(c.getTime())?n:c.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})},Y=()=>{const[n,c]=l.useState([]),[u,g]=l.useState(!0),[o,d]=l.useState(null),[w,p]=l.useState(null),[b,m]=l.useState(""),x=async()=>{g(!0);try{c(await L())}catch(t){i(`加载用户列表失败:${t.message}`,"error")}finally{g(!1)}};l.useEffect(()=>{x()},[]);const U=async t=>{if(o!==null)return;const s=t.is_active!==!1;if(!(s&&!await y(`禁用用户「${t.username}」?其所有在线会话将立即下线,且无法再登录。`,{title:"禁用用户",confirmLabel:"禁用",danger:!0}))){d(t.id);try{const a=await P(t.id,!s);i(a.message||"状态已更新","success"),await x()}catch(a){i(`操作失败:${a.message}`,"error")}finally{d(null)}}},C=async t=>{const[s,a]=E(b);if(!s){i(a,"warning");return}if(o===null){d(t.id);try{const r=await _(t.id,b);i(r.message||"密码已重置","success"),p(null),m("")}catch(r){i(`重置失败:${r.message}`,"error")}finally{d(null)}}},k=async t=>{if(o===null&&await y(`删除用户「${t.username}」?其名下的闲鱼账号、卡密、回复规则等数据将一并删除,不可恢复。`,{title:"删除用户",confirmLabel:"删除",danger:!0})){d(t.id);try{const s=await R(t.id);i(s.message||"用户已删除","success"),await x()}catch(s){i(`删除失败:${s.message}`,"error")}finally{d(null)}}};return e.jsxs("div",{className:"page-stack",children:[e.jsx(I,{title:"用户管理",description:"管理注册用户与登录权限。普通用户仅能操作分配给其名下的账号数据。",icon:h,actions:e.jsxs("button",{type:"button",onClick:()=>void x(),className:"ios-btn-secondary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx($,{className:`h-4 w-4 ${u?"animate-spin":""}`}),"刷新"]})}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"权限说明",icon:j}),e.jsxs("div",{className:"grid gap-3 p-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(j,{className:"h-4 w-4 text-[#8a6300]"}),"管理员(admin)"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"拥有全部权限:系统设置、通知与系统日志、用户管理,以及所有闲鱼账号和数据。"})]}),e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(A,{className:"h-4 w-4 text-[var(--text-soft)]"}),"普通用户"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"只能看到并操作自己名下的闲鱼账号、商品、订单与消息;侧栏不显示系统设置与用户管理,接口层也会拒绝其访问。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"用户列表",description:`共 ${n.length} 个用户`,icon:h}),e.jsxs("div",{className:"divide-y divide-[var(--border)]",children:[n.map(t=>{const s=t.username==="admin",a=t.is_active===!1,r=o===t.id,v=w===t.id;return e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[var(--brand)] text-sm font-black text-[#2a2416]",children:t.username.slice(0,1).toUpperCase()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"text-sm font-bold text-[var(--text)]",children:t.username}),s&&e.jsx("span",{className:"rounded-full bg-[var(--brand)] px-2 py-0.5 text-[10px] font-bold text-[#2a2416]",children:"内置管理员"}),e.jsx("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-bold ${a?"bg-red-50 text-red-600":"bg-emerald-50 text-emerald-600"}`,children:a?"已禁用":"正常"})]}),e.jsx("p",{className:"mt-0.5 truncate text-xs text-[var(--text-muted)]",children:t.email}),e.jsxs("p",{className:"mt-1 text-[11px] text-[var(--text-soft)]",children:[t.cookie_count??0," 个闲鱼账号 · ",t.card_count??0," 张卡密 · 注册于 ",D(t.created_at)]})]}),!s&&e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void U(t),disabled:r,className:a?"rounded-md bg-emerald-50 px-3 py-2 text-xs font-bold text-emerald-700 hover:bg-emerald-100 disabled:opacity-50":"rounded-md bg-amber-50 px-3 py-2 text-xs font-bolLine truncated
import{r as l,j as e,U as h,e as $,S as j,aT as A,L as f,ak as T,bz as L,n as i,v as y,bA as P,bB as R,aY as E,bC as _}from"./index-IP-mmLlr.js";import{a as I,S as N,E as B}from"./ui-Fi8l9rTp.js";import{T as z}from"./trash-2-BNPsgs2t.js";const D=n=>{if(!n)return"-";const c=new Date(n.includes("T")?n:`${n.replace(" ","T")}Z`);return Number.isNaN(c.getTime())?n:c.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})},Y=()=>{const[n,c]=l.useState([]),[u,g]=l.useState(!0),[o,d]=l.useState(null),[w,p]=l.useState(null),[b,m]=l.useState(""),x=async()=>{g(!0);try{c(await L())}catch(t){i(`加载用户列表失败:${t.message}`,"error")}finally{g(!1)}};l.useEffect(()=>{x()},[]);const U=async t=>{if(o!==null)return;const s=t.is_active!==!1;if(!(s&&!await y(`禁用用户「${t.username}」?其所有在线会话将立即下线,且无法再登录。`,{title:"禁用用户",confirmLabel:"禁用",danger:!0}))){d(t.id);try{const a=await P(t.id,!s);i(a.message||"状态已更新","success"),await x()}catch(a){i(`操作失败:${a.message}`,"error")}finally{d(null)}}},C=async t=>{const[s,a]=E(b);if(!s){i(a,"warning");return}if(o===null){d(t.id);try{const r=await _(t.id,b);i(r.message||"密码已重置","success"),p(null),m("")}catch(r){i(`重置失败:${r.message}`,"error")}finally{d(null)}}},k=async t=>{if(o===null&&await y(`删除用户「${t.username}」?其名下的闲鱼账号、卡密、回复规则等数据将一并删除,不可恢复。`,{title:"删除用户",confirmLabel:"删除",danger:!0})){d(t.id);try{const s=await R(t.id);i(s.message||"用户已删除","success"),await x()}catch(s){i(`删除失败:${s.message}`,"error")}finally{d(null)}}};return e.jsxs("div",{className:"page-stack",children:[e.jsx(I,{title:"用户管理",description:"管理注册用户与登录权限。普通用户仅能操作分配给其名下的账号数据。",icon:h,actions:e.jsxs("button",{type:"button",onClick:()=>void x(),className:"ios-btn-secondary flex items-center gap-2 rounded-md px-4 py-2.5 text-sm",children:[e.jsx($,{className:`h-4 w-4 ${u?"animate-spin":""}`}),"刷新"]})}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"权限说明",icon:j}),e.jsxs("div",{className:"grid gap-3 p-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(j,{className:"h-4 w-4 text-[#8a6300]"}),"管理员(admin)"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"拥有全部权限:系统设置、通知与系统日志、用户管理,以及所有闲鱼账号和数据。"})]}),e.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface-subtle)] p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-sm font-bold text-[var(--text)]",children:[e.jsx(A,{className:"h-4 w-4 text-[var(--text-soft)]"}),"普通用户"]}),e.jsx("p",{className:"mt-1.5 text-xs leading-5 text-[var(--text-muted)]",children:"只能看到并操作自己名下的闲鱼账号、商品、订单与消息;侧栏不显示系统设置与用户管理,接口层也会拒绝其访问。"})]})]})]}),e.jsxs("section",{className:"section-panel",children:[e.jsx(N,{title:"用户列表",description:`共 ${n.length} 个用户`,icon:h}),e.jsxs("div",{className:"divide-y divide-[var(--border)]",children:[n.map(t=>{const s=t.username==="admin",a=t.is_active===!1,r=o===t.id,v=w===t.id;return e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[var(--brand)] text-sm font-black text-[#2a2416]",children:t.username.slice(0,1).toUpperCase()}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"text-sm font-bold text-[var(--text)]",children:t.username}),s&&e.jsx("span",{className:"rounded-full bg-[var(--brand)] px-2 py-0.5 text-[10px] font-bold text-[#2a2416]",children:"内置管理员"}),e.jsx("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-bold ${a?"bg-red-50 text-red-600":"bg-emerald-50 text-emerald-600"}`,children:a?"已禁用":"正常"})]}),e.jsx("p",{className:"mt-0.5 truncate text-xs text-[var(--text-muted)]",children:t.email}),e.jsxs("p",{className:"mt-1 text-[11px] text-[var(--text-soft)]",children:[t.cookie_count??0," 个闲鱼账号 · ",t.card_count??0," 张卡密 · 注册于 ",D(t.created_at)]})]}),!s&&e.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>void U(t),disabled:r,className:a?"rounded-md bg-emerald-50 px-3 py-2 text-xs font-bold text-emerald-700 hover:bg-emerald-100 disabled:opacity-50":"rounded-md bg-amber-50 px-3 py-2 text-xs font-bolLine truncated
@@ -1,4 +1,4 @@
import{c as t}from"./index-CkAjw-Zl.js";/**
import{c as t}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c}from"./index-CkAjw-Zl.js";/**
import{c}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as o}from"./index-CkAjw-Zl.js";/**
import{c as o}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c}from"./index-CkAjw-Zl.js";/**
import{c}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as e}from"./index-CkAjw-Zl.js";/**
import{c as e}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c}from"./index-CkAjw-Zl.js";/**
import{c}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as e}from"./index-CkAjw-Zl.js";/**
import{c as e}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
-1
View File
@@ -1 +0,0 @@
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--gray-200) / 1)}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:rgb(var(--gray-400) / 1)}input::placeholder,textarea::placeholder{opacity:1;color:rgb(var(--gray-400) / 1)}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relativeLine truncated
+1
View File
@@ -0,0 +1 @@
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--gray-200) / 1)}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:rgb(var(--gray-400) / 1)}input::placeholder,textarea::placeholder{opacity:1;color:rgb(var(--gray-400) / 1)}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relativeLine truncated
@@ -1,5 +1,5 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-YbRCdkEx.js","assets/ui-DGhuFsSA.js","assets/package-CwcnsKO8.js","assets/trending-up-DkO2MYj4.js","assets/activity-DQLHFHES.js","assets/package-check-DD7mkdH5.js","assets/AccountList-Bc2Yv0W8.js","assets/check-B6GSSnq6.js","assets/sparkles-ITX60YIA.js","assets/power-DZ_kRimy.js","assets/trash-2-H_4vB0ks.js","assets/key-B8XT9PyZ.js","assets/eye-off-DVn7pRcv.js","assets/eye-vwq0YQk5.js","assets/save-2L2g6g1L.js","assets/OrderList-Bl_9hfcv.js","assets/plus-BXZgwA0o.js","assets/truck-hG3NWX-r.js","assets/search-BUYv4hib.js","assets/flower-2-Cth4QkK1.js","assets/square-pen-B8Sj6MD6.js","assets/chevron-right-DidJSJ1m.js","assets/CardList-MdsiObLx.js","assets/image-BN5k8Hl-.js","assets/ItemList-CtALEPY8.js","assets/shield-alert-BxxLkcUR.js","assets/power-off-BEy-96bB.js","assets/settings-2-CVdvHFW4.js","assets/ProductAutomation-CgvrvUY8.js","assets/play-BTeYe-0U.js","assets/link-2-PznVeo4F.js","assets/AIReply-BGbSjkXO.js","assets/message-square-text-DqMbrfJm.js","assets/Settings-DTKbGyYP.js","assets/zap-BGhU4xU3.js","assets/Keywords-D8S9L4tw.js","assets/MessageManagement-LKRQ4rFr.js","assets/send-jdubw9eF.js","assets/NotificationsAndLogs-BXbdIicr.js","assets/pen-line-CsaG3RgF.js","assets/UserManagement-ClhaMsDE.js","assets/About-HAsBMH6n.js","assets/BuyerInteraction-GyhcBrDa.js","assets/Resell-Op0d7Nd7.js","assets/HotList-DWh7Y7Wd.js","assets/PriceWatch-Dmiap8Bb.js"])))=>i.map(i=>d[i]);
function xp(l,s){for(var c=0;c<s.length;c++){const r=s[c];if(typeof r!="string"&&!Array.isArray(r)){for(const f in r)if(f!=="default"&&!(f in l)){const m=Object.getOwnPropertyDescriptor(r,f);m&&Object.defineProperty(l,f,m.get?m:{enumerable:!0,get:()=>r[f]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const h of m.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function c(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function r(f){if(f.ep)return;f.ep=!0;const m=c(f);fetch(f.href,m)}})();function hh(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Ic={exports:{}},lu={};/**
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-CeRTyM_j.js","assets/ui-Fi8l9rTp.js","assets/package-C7ydMeAZ.js","assets/trending-up-BcW73Gjl.js","assets/activity-Dmn-a3S9.js","assets/package-check-OAWoRoy_.js","assets/AccountList-DfgloUxg.js","assets/check-D50E5xnW.js","assets/sparkles-CavN45fA.js","assets/power-Ucg7FCbo.js","assets/trash-2-BNPsgs2t.js","assets/key-ItWA3Cb3.js","assets/eye-off-B2vwWUUu.js","assets/eye-BxUVYll7.js","assets/save-CNiIU-3u.js","assets/OrderList-CL0--ZMt.js","assets/plus-BbnHS2Zx.js","assets/truck-CrexfDE5.js","assets/search-TGrYyOkD.js","assets/flower-2-fqYsfuSn.js","assets/square-pen-ZPivfDGR.js","assets/chevron-right-CbwGgzS_.js","assets/CardList-CfOseTaj.js","assets/image-hfWSlf8S.js","assets/ItemList-BcNZ279Z.js","assets/shield-alert-B8_J0uYT.js","assets/power-off-D47FTQRk.js","assets/settings-2-DVRotgka.js","assets/ProductAutomation-DCR1XEfL.js","assets/play-CYUspTVx.js","assets/link-2-xKkzn7ZQ.js","assets/AIReply-lg6NYQkE.js","assets/message-square-text-ApwvxIVw.js","assets/Settings-6SylkBTn.js","assets/zap-DljT2UQs.js","assets/Keywords-BfjxZQp6.js","assets/MessageManagement-NPF-d8RM.js","assets/send-CwI5w629.js","assets/NotificationsAndLogs-FD8llMy1.js","assets/pen-line-D5rb4QS3.js","assets/UserManagement-DkSfyiXx.js","assets/About-Bnoqurmz.js","assets/BuyerInteraction-BBBi7zM4.js","assets/Resell-CYFkAG_P.js","assets/HotList-CmrhQsvX.js","assets/PeerShops--FPB0l6-.js","assets/PriceWatch-D0ZYbUkf.js"])))=>i.map(i=>d[i]);
function xp(l,s){for(var c=0;c<s.length;c++){const r=s[c];if(typeof r!="string"&&!Array.isArray(r)){for(const f in r)if(f!=="default"&&!(f in l)){const m=Object.getOwnPropertyDescriptor(r,f);m&&Object.defineProperty(l,f,m.get?m:{enumerable:!0,get:()=>r[f]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const y of m.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&r(y)}).observe(document,{childList:!0,subtree:!0});function c(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function r(f){if(f.ep)return;f.ep=!0;const m=c(f);fetch(f.href,m)}})();function hh(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Pc={exports:{}},lu={};/**
* @license React
* react-jsx-runtime.production.js
*
@@ -7,7 +7,7 @@ function xp(l,s){for(var c=0;c<s.length;c++){const r=s[c];if(typeof r!="string"&
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var wm;function Ep(){if(wm)return lu;wm=1;var l=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function c(r,f,m){var h=null;if(m!==void 0&&(h=""+m),f.key!==void 0&&(h=""+f.key),"key"in f){m={};for(var p in f)p!=="key"&&(m[p]=f[p])}else m=f;return f=m.ref,{$$typeof:l,type:r,key:h,ref:f!==void 0?f:null,props:m}}return lu.Fragment=s,lu.jsx=c,lu.jsxs=c,lu}var zm;function Ap(){return zm||(zm=1,Ic.exports=Ep()),Ic.exports}var y=Ap(),Pc={exports:{}},ce={};/**
*/var wm;function Ep(){if(wm)return lu;wm=1;var l=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function c(r,f,m){var y=null;if(m!==void 0&&(y=""+m),f.key!==void 0&&(y=""+f.key),"key"in f){m={};for(var p in f)p!=="key"&&(m[p]=f[p])}else m=f;return f=m.ref,{$$typeof:l,type:r,key:y,ref:f!==void 0?f:null,props:m}}return lu.Fragment=s,lu.jsx=c,lu.jsxs=c,lu}var zm;function Ap(){return zm||(zm=1,Pc.exports=Ep()),Pc.exports}var h=Ap(),Ic={exports:{}},ce={};/**
* @license React
* react.production.js
*
@@ -15,7 +15,7 @@ function xp(l,s){for(var c=0;c<s.length;c++){const r=s[c];if(typeof r!="string"&
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var jm;function Tp(){if(jm)return ce;jm=1;var l=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),q=Symbol.iterator;function F(S){return S===null||typeof S!="object"?null:(S=q&&S[q]||S["@@iterator"],typeof S=="function"?S:null)}var W={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X=Object.assign,Y={};function C(S,j,H){this.props=S,this.context=j,this.refs=Y,this.updater=H||W}C.prototype.isReactComponent={},C.prototype.setState=function(S,j){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,j,"setState")},C.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function K(){}K.prototype=C.prototype;function Q(S,j,H){this.props=S,this.context=j,this.refs=Y,this.updater=H||W}var ee=Q.prototype=new K;ee.constructor=Q,X(ee,C.prototype),ee.isPureReactComponent=!0;var Ee=Array.isArray;function me(){}var ne={H:null,A:null,T:null,S:null},Le=Object.prototype.hasOwnProperty;function ct(S,j,H){var G=H.ref;return{$$typeof:l,type:S,key:j,ref:G!==void 0?G:null,props:H}}function be(S,j){return ct(S.type,j,S.props)}function Me(S){return typeof S=="object"&&S!==null&&S.$$typeof===l}function ke(S){var j={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(H){return j[H]})}var xt=/\/+/g;function He(S,j){return typeof S=="object"&&S!==null&&S.key!=null?ke(""+S.key):j.toString(36)}function Re(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(me,me):(S.status="pending",S.then(function(j){S.status==="pending"&&(S.status="fulfilled",S.value=j)},function(j){S.status==="pending"&&(S.status="rejected",S.reason=j)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function z(S,j,H,G,le){var Z=typeof S;(Z==="undefined"||Z==="boolean")&&(S=null);var k=!1;if(S===null)k=!0;else switch(Z){case"bigint":case"string":case"number":k=!0;break;case"object":switch(S.$$typeof){case l:case s:k=!0;break;case A:return k=S._init,z(k(S._payload),j,H,G,le)}}if(k)return le=le(S),k=G===""?"."+He(S,0):G,Ee(le)?(H="",k!=null&&(H=k.replace(xt,"$&/")+"/"),z(le,j,H,"",function(Za){return Za})):le!=null&&(Me(le)&&(le=be(le,H+(le.key==null||S&&S.key===le.key?"":(""+le.key).replace(xt,"$&/")+"/")+k)),j.push(le)),1;k=0;var ue=G===""?".":G+":";if(Ee(S))for(var Te=0;Te<S.length;Te++)G=S[Te],Z=ue+He(G,Te),k+=z(G,j,H,Z,le);else if(Te=F(S),typeof Te=="function")for(S=Te.call(S),Te=0;!(G=S.next()).done;)G=G.value,Z=ue+He(G,Te++),k+=z(G,j,H,Z,le);else if(Z==="object"){if(typeof S.then=="function")return z(Re(S),j,H,G,le);throw j=String(S),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.")}return k}function L(S,j,H){if(S==null)return S;var G=[],le=0;return z(S,G,"","",function(Z){return j.call(H,Z,le++)}),G}function P(S){if(S._status===-1){var j=S._result;j=j(),j.then(function(H){(S._status===0||S._status===-1)&&(S._status=1,S._result=H)},function(H){(S._status===0||S._status===-1)&&(S._status=2,S._result=H)}),S._status===-1&&(S._status=0,S._result=j)}if(S._status===1)return S._result.default;throw S._result}var Se=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var j=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(j))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},re={map:L,forEach:function(S,j,H){L(S,function(){j.apply(this,arguments)},H)},count:function(S){var j=0;return L(S,function(){j++}),j},toArray:function(S){return L(S,function(j){return j})||[]},only:function(S){if(!Me(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return ce.Activity=N,ce.Children=re,ce.Component=C,ce.Fragment=c,ce.Profiler=f,ce.PureComponent=Q,ce.StrictMode=r,ce.Suspense=v,ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ne,ce.__COMPILER_RUNTIME={__proto__:null,c:function(S){return ne.H.useMemoCache(S)}},ce.cache=function(S){return function(){return S.apply(null,arguments)}},ce.cacheSignal=function(){return null},ce.cloneElement=function(S,j,H){if(S==null)throw Error("The argumLine truncated
*/var jm;function Tp(){if(jm)return ce;jm=1;var l=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),y=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),B=Symbol.iterator;function F(S){return S===null||typeof S!="object"?null:(S=B&&S[B]||S["@@iterator"],typeof S=="function"?S:null)}var W={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X=Object.assign,Y={};function M(S,j,H){this.props=S,this.context=j,this.refs=Y,this.updater=H||W}M.prototype.isReactComponent={},M.prototype.setState=function(S,j){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,j,"setState")},M.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function K(){}K.prototype=M.prototype;function Q(S,j,H){this.props=S,this.context=j,this.refs=Y,this.updater=H||W}var ee=Q.prototype=new K;ee.constructor=Q,X(ee,M.prototype),ee.isPureReactComponent=!0;var Ee=Array.isArray;function me(){}var le={H:null,A:null,T:null,S:null},Le=Object.prototype.hasOwnProperty;function ct(S,j,H){var G=H.ref;return{$$typeof:l,type:S,key:j,ref:G!==void 0?G:null,props:H}}function be(S,j){return ct(S.type,j,S.props)}function Ce(S){return typeof S=="object"&&S!==null&&S.$$typeof===l}function ke(S){var j={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(H){return j[H]})}var xt=/\/+/g;function He(S,j){return typeof S=="object"&&S!==null&&S.key!=null?ke(""+S.key):j.toString(36)}function Re(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(me,me):(S.status="pending",S.then(function(j){S.status==="pending"&&(S.status="fulfilled",S.value=j)},function(j){S.status==="pending"&&(S.status="rejected",S.reason=j)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function z(S,j,H,G,ue){var Z=typeof S;(Z==="undefined"||Z==="boolean")&&(S=null);var k=!1;if(S===null)k=!0;else switch(Z){case"bigint":case"string":case"number":k=!0;break;case"object":switch(S.$$typeof){case l:case s:k=!0;break;case A:return k=S._init,z(k(S._payload),j,H,G,ue)}}if(k)return ue=ue(S),k=G===""?"."+He(S,0):G,Ee(ue)?(H="",k!=null&&(H=k.replace(xt,"$&/")+"/"),z(ue,j,H,"",function(Za){return Za})):ue!=null&&(Ce(ue)&&(ue=be(ue,H+(ue.key==null||S&&S.key===ue.key?"":(""+ue.key).replace(xt,"$&/")+"/")+k)),j.push(ue)),1;k=0;var ie=G===""?".":G+":";if(Ee(S))for(var Te=0;Te<S.length;Te++)G=S[Te],Z=ie+He(G,Te),k+=z(G,j,H,Z,ue);else if(Te=F(S),typeof Te=="function")for(S=Te.call(S),Te=0;!(G=S.next()).done;)G=G.value,Z=ie+He(G,Te++),k+=z(G,j,H,Z,ue);else if(Z==="object"){if(typeof S.then=="function")return z(Re(S),j,H,G,ue);throw j=String(S),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.")}return k}function L(S,j,H){if(S==null)return S;var G=[],ue=0;return z(S,G,"","",function(Z){return j.call(H,Z,ue++)}),G}function I(S){if(S._status===-1){var j=S._result;j=j(),j.then(function(H){(S._status===0||S._status===-1)&&(S._status=1,S._result=H)},function(H){(S._status===0||S._status===-1)&&(S._status=2,S._result=H)}),S._status===-1&&(S._status=0,S._result=j)}if(S._status===1)return S._result.default;throw S._result}var Se=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var j=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(j))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},re={map:L,forEach:function(S,j,H){L(S,function(){j.apply(this,arguments)},H)},count:function(S){var j=0;return L(S,function(){j++}),j},toArray:function(S){return L(S,function(j){return j})||[]},only:function(S){if(!Ce(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return ce.Activity=N,ce.Children=re,ce.Component=M,ce.Fragment=c,ce.Profiler=f,ce.PureComponent=Q,ce.StrictMode=r,ce.Suspense=v,ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=le,ce.__COMPILER_RUNTIME={__proto__:null,c:function(S){return le.H.useMemoCache(S)}},ce.cache=function(S){return function(){return S.apply(null,arguments)}},ce.cacheSignal=function(){return null},ce.cloneElement=function(S,j,H){if(S==null)throw Error("The argumLine truncated
* @license React
* scheduler.production.js
*
@@ -23,7 +23,7 @@ function xp(l,s){for(var c=0;c<s.length;c++){const r=s[c];if(typeof r!="string"&
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Cm;function Op(){return Cm||(Cm=1,(function(l){function s(z,L){var P=z.length;z.push(L);e:for(;0<P;){var Se=P-1>>>1,re=z[Se];if(0<f(re,L))z[Se]=L,z[P]=re,P=Se;else break e}}function c(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var L=z[0],P=z.pop();if(P!==L){z[0]=P;e:for(var Se=0,re=z.length,S=re>>>1;Se<S;){var j=2*(Se+1)-1,H=z[j],G=j+1,le=z[G];if(0>f(H,P))G<re&&0>f(le,H)?(z[Se]=le,z[G]=P,Se=G):(z[Se]=H,z[j]=P,Se=j);else if(G<re&&0>f(le,P))z[Se]=le,z[G]=P,Se=G;else break e}}return L}function f(z,L){var P=z.sortIndex-L.sortIndex;return P!==0?P:z.id-L.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;l.unstable_now=function(){return m.now()}}else{var h=Date,p=h.now();l.unstable_now=function(){return h.now()-p}}var v=[],g=[],A=1,N=null,q=3,F=!1,W=!1,X=!1,Y=!1,C=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function ee(z){for(var L=c(g);L!==null;){if(L.callback===null)r(g);else if(L.startTime<=z)r(g),L.sortIndex=L.expirationTime,s(v,L);else break;L=c(g)}}function Ee(z){if(X=!1,ee(z),!W)if(c(v)!==null)W=!0,me||(me=!0,ke());else{var L=c(g);L!==null&&Re(Ee,L.startTime-z)}}var me=!1,ne=-1,Le=5,ct=-1;function be(){return Y?!0:!(l.unstable_now()-ct<Le)}function Me(){if(Y=!1,me){var z=l.unstable_now();ct=z;var L=!0;try{e:{W=!1,X&&(X=!1,K(ne),ne=-1),F=!0;var P=q;try{t:{for(ee(z),N=c(v);N!==null&&!(N.expirationTime>z&&be());){var Se=N.callback;if(typeof Se=="function"){N.callback=null,q=N.priorityLevel;var re=Se(N.expirationTime<=z);if(z=l.unstable_now(),typeof re=="function"){N.callback=re,ee(z),L=!0;break t}N===c(v)&&r(v),ee(z)}else r(v);N=c(v)}if(N!==null)L=!0;else{var S=c(g);S!==null&&Re(Ee,S.startTime-z),L=!1}}break e}finally{N=null,q=P,F=!1}L=void 0}}finally{L?ke():me=!1}}}var ke;if(typeof Q=="function")ke=function(){Q(Me)};else if(typeof MessageChannel<"u"){var xt=new MessageChannel,He=xt.port2;xt.port1.onmessage=Me,ke=function(){He.postMessage(null)}}else ke=function(){C(Me,0)};function Re(z,L){ne=C(function(){z(l.unstable_now())},L)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(z){z.callback=null},l.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Le=0<z?Math.floor(1e3/z):5},l.unstable_getCurrentPriorityLevel=function(){return q},l.unstable_next=function(z){switch(q){case 1:case 2:case 3:var L=3;break;default:L=q}var P=q;q=L;try{return z()}finally{q=P}},l.unstable_requestPaint=function(){Y=!0},l.unstable_runWithPriority=function(z,L){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var P=q;q=z;try{return L()}finally{q=P}},l.unstable_scheduleCallback=function(z,L,P){var Se=l.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?Se+P:Se):P=Se,z){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=P+re,z={id:A++,callback:L,priorityLevel:z,startTime:P,expirationTime:re,sortIndex:-1},P>Se?(z.sortIndex=P,s(g,z),c(v)===null&&z===c(g)&&(X?(K(ne),ne=-1):X=!0,Re(Ee,P-Se))):(z.sortIndex=re,s(v,z),W||F||(W=!0,me||(me=!0,ke()))),z},l.unstable_shouldYield=be,l.unstable_wrapCallback=function(z){var L=q;return function(){var P=q;q=L;try{return z.apply(this,arguments)}finally{q=P}}}})(ar)),ar}var Mm;function Np(){return Mm||(Mm=1,tr.exports=Op()),tr.exports}var nr={exports:{}},rt={};/**
*/var Mm;function Op(){return Mm||(Mm=1,(function(l){function s(z,L){var I=z.length;z.push(L);e:for(;0<I;){var Se=I-1>>>1,re=z[Se];if(0<f(re,L))z[Se]=L,z[I]=re,I=Se;else break e}}function c(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var L=z[0],I=z.pop();if(I!==L){z[0]=I;e:for(var Se=0,re=z.length,S=re>>>1;Se<S;){var j=2*(Se+1)-1,H=z[j],G=j+1,ue=z[G];if(0>f(H,I))G<re&&0>f(ue,H)?(z[Se]=ue,z[G]=I,Se=G):(z[Se]=H,z[j]=I,Se=j);else if(G<re&&0>f(ue,I))z[Se]=ue,z[G]=I,Se=G;else break e}}return L}function f(z,L){var I=z.sortIndex-L.sortIndex;return I!==0?I:z.id-L.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;l.unstable_now=function(){return m.now()}}else{var y=Date,p=y.now();l.unstable_now=function(){return y.now()-p}}var v=[],g=[],A=1,N=null,B=3,F=!1,W=!1,X=!1,Y=!1,M=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function ee(z){for(var L=c(g);L!==null;){if(L.callback===null)r(g);else if(L.startTime<=z)r(g),L.sortIndex=L.expirationTime,s(v,L);else break;L=c(g)}}function Ee(z){if(X=!1,ee(z),!W)if(c(v)!==null)W=!0,me||(me=!0,ke());else{var L=c(g);L!==null&&Re(Ee,L.startTime-z)}}var me=!1,le=-1,Le=5,ct=-1;function be(){return Y?!0:!(l.unstable_now()-ct<Le)}function Ce(){if(Y=!1,me){var z=l.unstable_now();ct=z;var L=!0;try{e:{W=!1,X&&(X=!1,K(le),le=-1),F=!0;var I=B;try{t:{for(ee(z),N=c(v);N!==null&&!(N.expirationTime>z&&be());){var Se=N.callback;if(typeof Se=="function"){N.callback=null,B=N.priorityLevel;var re=Se(N.expirationTime<=z);if(z=l.unstable_now(),typeof re=="function"){N.callback=re,ee(z),L=!0;break t}N===c(v)&&r(v),ee(z)}else r(v);N=c(v)}if(N!==null)L=!0;else{var S=c(g);S!==null&&Re(Ee,S.startTime-z),L=!1}}break e}finally{N=null,B=I,F=!1}L=void 0}}finally{L?ke():me=!1}}}var ke;if(typeof Q=="function")ke=function(){Q(Ce)};else if(typeof MessageChannel<"u"){var xt=new MessageChannel,He=xt.port2;xt.port1.onmessage=Ce,ke=function(){He.postMessage(null)}}else ke=function(){M(Ce,0)};function Re(z,L){le=M(function(){z(l.unstable_now())},L)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(z){z.callback=null},l.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Le=0<z?Math.floor(1e3/z):5},l.unstable_getCurrentPriorityLevel=function(){return B},l.unstable_next=function(z){switch(B){case 1:case 2:case 3:var L=3;break;default:L=B}var I=B;B=L;try{return z()}finally{B=I}},l.unstable_requestPaint=function(){Y=!0},l.unstable_runWithPriority=function(z,L){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var I=B;B=z;try{return L()}finally{B=I}},l.unstable_scheduleCallback=function(z,L,I){var Se=l.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?Se+I:Se):I=Se,z){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=I+re,z={id:A++,callback:L,priorityLevel:z,startTime:I,expirationTime:re,sortIndex:-1},I>Se?(z.sortIndex=I,s(g,z),c(v)===null&&z===c(g)&&(X?(K(le),le=-1):X=!0,Re(Ee,I-Se))):(z.sortIndex=re,s(v,z),W||F||(W=!0,me||(me=!0,ke()))),z},l.unstable_shouldYield=be,l.unstable_wrapCallback=function(z){var L=B;return function(){var I=B;B=L;try{return z.apply(this,arguments)}finally{B=I}}}})(ar)),ar}var Cm;function Np(){return Cm||(Cm=1,tr.exports=Op()),tr.exports}var nr={exports:{}},rt={};/**
* @license React
* react-dom.production.js
*
@@ -31,7 +31,7 @@ function xp(l,s){for(var c=0;c<s.length;c++){const r=s[c];if(typeof r!="string"&
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Um;function Rp(){if(Um)return rt;Um=1;var l=vr();function s(v){var g="https://react.dev/errors/"+v;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)g+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+v+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var r={d:{f:c,r:function(){throw Error(s(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},f=Symbol.for("react.portal");function m(v,g,A){var N=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:N==null?null:""+N,children:v,containerInfo:g,implementation:A}}var h=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(v,g){if(v==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,rt.createPortal=function(v,g){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return m(v,g,null,A)},rt.flushSync=function(v){var g=h.T,A=r.p;try{if(h.T=null,r.p=2,v)return v()}finally{h.T=g,r.p=A,r.d.f()}},rt.preconnect=function(v,g){typeof v=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(v,g))},rt.prefetchDNS=function(v){typeof v=="string"&&r.d.D(v)},rt.preinit=function(v,g){if(typeof v=="string"&&g&&typeof g.as=="string"){var A=g.as,N=p(A,g.crossOrigin),q=typeof g.integrity=="string"?g.integrity:void 0,F=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;A==="style"?r.d.S(v,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:N,integrity:q,fetchPriority:F}):A==="script"&&r.d.X(v,{crossOrigin:N,integrity:q,fetchPriority:F,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},rt.preinitModule=function(v,g){if(typeof v=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var A=p(g.as,g.crossOrigin);r.d.M(v,{crossOrigin:A,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(v)},rt.preload=function(v,g){if(typeof v=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var A=g.as,N=p(A,g.crossOrigin);r.d.L(v,A,{crossOrigin:N,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},rt.preloadModule=function(v,g){if(typeof v=="string")if(g){var A=p(g.as,g.crossOrigin);r.d.m(v,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:A,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(v)},rt.requestFormReset=function(v){r.d.r(v)},rt.unstable_batchedUpdates=function(v,g){return v(g)},rt.useFormState=function(v,g,A){return h.H.useFormState(v,g,A)},rt.useFormStatus=function(){return h.H.useHostTransitionStatus()},rt.version="19.2.8",rt}var qm;function ph(){if(qm)return nr.exports;qm=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),nr.exports=Rp(),nr.exports}/**
*/var Um;function Rp(){if(Um)return rt;Um=1;var l=vr();function s(v){var g="https://react.dev/errors/"+v;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)g+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+v+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var r={d:{f:c,r:function(){throw Error(s(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},f=Symbol.for("react.portal");function m(v,g,A){var N=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:N==null?null:""+N,children:v,containerInfo:g,implementation:A}}var y=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(v,g){if(v==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,rt.createPortal=function(v,g){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return m(v,g,null,A)},rt.flushSync=function(v){var g=y.T,A=r.p;try{if(y.T=null,r.p=2,v)return v()}finally{y.T=g,r.p=A,r.d.f()}},rt.preconnect=function(v,g){typeof v=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(v,g))},rt.prefetchDNS=function(v){typeof v=="string"&&r.d.D(v)},rt.preinit=function(v,g){if(typeof v=="string"&&g&&typeof g.as=="string"){var A=g.as,N=p(A,g.crossOrigin),B=typeof g.integrity=="string"?g.integrity:void 0,F=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;A==="style"?r.d.S(v,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:N,integrity:B,fetchPriority:F}):A==="script"&&r.d.X(v,{crossOrigin:N,integrity:B,fetchPriority:F,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},rt.preinitModule=function(v,g){if(typeof v=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var A=p(g.as,g.crossOrigin);r.d.M(v,{crossOrigin:A,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(v)},rt.preload=function(v,g){if(typeof v=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var A=g.as,N=p(A,g.crossOrigin);r.d.L(v,A,{crossOrigin:N,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},rt.preloadModule=function(v,g){if(typeof v=="string")if(g){var A=p(g.as,g.crossOrigin);r.d.m(v,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:A,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(v)},rt.requestFormReset=function(v){r.d.r(v)},rt.unstable_batchedUpdates=function(v,g){return v(g)},rt.useFormState=function(v,g,A){return y.H.useFormState(v,g,A)},rt.useFormStatus=function(){return y.H.useHostTransitionStatus()},rt.version="19.2.8",rt}var qm;function ph(){if(qm)return nr.exports;qm=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),nr.exports=Rp(),nr.exports}/**
* @license React
* react-dom-client.production.js
*
@@ -39,15 +39,15 @@ function xp(l,s){for(var c=0;c<s.length;c++){const r=s[c];if(typeof r!="string"&
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Bm;function wp(){if(Bm)return uu;Bm=1;var l=Np(),s=vr(),c=ph();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(m(e)!==e)throw Error(r(188))}function g(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,n=t;;){var u=a.return;if(u===null)break;var i=u.alternate;if(i===null){if(n=u.return,n!==null){a=n;continue}break}if(u.child===i.child){for(i=u.child;i;){if(i===a)return v(u),e;if(i===n)return v(u),t;i=i.sibling}throw Error(r(188))}if(a.return!==n.return)a=u,n=i;else{for(var o=!1,d=u.child;d;){if(d===a){o=!0,a=u,n=i;break}if(d===n){o=!0,n=u,a=i;break}d=d.sibling}if(!o){for(d=i.child;d;){if(d===a){o=!0,a=i,n=u;break}if(d===n){o=!0,n=i,a=u;break}d=d.sibling}if(!o)throw Error(r(189))}}if(a.alternate!==n)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function A(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=A(e),t!==null)return t;e=e.sibling}return null}var N=Object.assign,q=Symbol.for("react.element"),F=Symbol.for("react.transitional.element"),W=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),Ee=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),Le=Symbol.for("react.lazy"),ct=Symbol.for("react.activity"),be=Symbol.for("react.memo_cache_sentinel"),Me=Symbol.iterator;function ke(e){return e===null||typeof e!="object"?null:(e=Me&&e[Me]||e["@@iterator"],typeof e=="function"?e:null)}var xt=Symbol.for("react.client.reference");function He(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===xt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case C:return"Profiler";case Y:return"StrictMode";case Ee:return"Suspense";case me:return"SuspenseList";case ct:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case W:return"Portal";case Q:return e.displayName||"Context";case K:return(e._context.displayName||"Context")+".Consumer";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ne:return t=e.displayName||null,t!==null?t:He(e.type)||"Memo";case Le:t=e._payload,e=e._init;try{return He(e(t))}catch{}}return null}var Re=Array.isArray,z=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},Se=[],re=-1;function S(e){return{current:e}}function j(e){0>re||(e.current=Se[re],Se[re]=null,re--)}function H(e,t){re++,Se[re]=e.current,e.current=t}var G=S(null),le=S(null),Z=S(null),k=S(null);function ue(e,t){switch(H(Z,t),H(le,e),H(G,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Id(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Id(t),e=Pd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(G),H(G,e)}function Te(){j(G),j(le),j(Z)}function Za(e){e.memoizedState!==null&&H(k,e);var t=G.current,a=Pd(t,e.type);t!==a&&(H(le,e),H(G,a))}function Ka(e){le.current===e&&(j(G),j(le)),k.current===e&&(j(k),eu._currentValue=P)}var Et,ol;function Zt(e){if(Et===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Et=t&&t[1]||"",ol=-1<a.stack.indexOf(`
*/var Bm;function wp(){if(Bm)return uu;Bm=1;var l=Np(),s=vr(),c=ph();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function y(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(m(e)!==e)throw Error(r(188))}function g(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,n=t;;){var u=a.return;if(u===null)break;var i=u.alternate;if(i===null){if(n=u.return,n!==null){a=n;continue}break}if(u.child===i.child){for(i=u.child;i;){if(i===a)return v(u),e;if(i===n)return v(u),t;i=i.sibling}throw Error(r(188))}if(a.return!==n.return)a=u,n=i;else{for(var o=!1,d=u.child;d;){if(d===a){o=!0,a=u,n=i;break}if(d===n){o=!0,n=u,a=i;break}d=d.sibling}if(!o){for(d=i.child;d;){if(d===a){o=!0,a=i,n=u;break}if(d===n){o=!0,n=i,a=u;break}d=d.sibling}if(!o)throw Error(r(189))}}if(a.alternate!==n)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function A(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=A(e),t!==null)return t;e=e.sibling}return null}var N=Object.assign,B=Symbol.for("react.element"),F=Symbol.for("react.transitional.element"),W=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),Ee=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),Le=Symbol.for("react.lazy"),ct=Symbol.for("react.activity"),be=Symbol.for("react.memo_cache_sentinel"),Ce=Symbol.iterator;function ke(e){return e===null||typeof e!="object"?null:(e=Ce&&e[Ce]||e["@@iterator"],typeof e=="function"?e:null)}var xt=Symbol.for("react.client.reference");function He(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===xt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case M:return"Profiler";case Y:return"StrictMode";case Ee:return"Suspense";case me:return"SuspenseList";case ct:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case W:return"Portal";case Q:return e.displayName||"Context";case K:return(e._context.displayName||"Context")+".Consumer";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case le:return t=e.displayName||null,t!==null?t:He(e.type)||"Memo";case Le:t=e._payload,e=e._init;try{return He(e(t))}catch{}}return null}var Re=Array.isArray,z=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},Se=[],re=-1;function S(e){return{current:e}}function j(e){0>re||(e.current=Se[re],Se[re]=null,re--)}function H(e,t){re++,Se[re]=e.current,e.current=t}var G=S(null),ue=S(null),Z=S(null),k=S(null);function ie(e,t){switch(H(Z,t),H(ue,e),H(G,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Pd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Pd(t),e=Id(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(G),H(G,e)}function Te(){j(G),j(ue),j(Z)}function Za(e){e.memoizedState!==null&&H(k,e);var t=G.current,a=Id(t,e.type);t!==a&&(H(ue,e),H(G,a))}function Ka(e){ue.current===e&&(j(G),j(ue)),k.current===e&&(j(k),eu._currentValue=I)}var Et,ol;function Zt(e){if(Et===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Et=t&&t[1]||"",ol=-1<a.stack.indexOf(`
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Et+e+ol}var At=!1;function se(e,t){if(!e||At)return"";At=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(w){var R=w}Reflect.construct(e,[],U)}else{try{U.call()}catch(w){R=w}e.call(U.prototype)}}else{try{throw Error()}catch(w){R=w}(U=e())&&typeof U.catch=="function"&&U.catch(function(){})}}catch(w){if(w&&R&&typeof w.stack=="string")return[w.stack,R.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=n.DetermineComponentFrameRoot(),o=i[0],d=i[1];if(o&&d){var b=o.split(`
`),O=d.split(`
`);for(u=n=0;n<b.length&&!b[n].includes("DetermineComponentFrameRoot");)n++;for(;u<O.length&&!O[u].includes("DetermineComponentFrameRoot");)u++;if(n===b.length||u===O.length)for(n=b.length-1,u=O.length-1;1<=n&&0<=u&&b[n]!==O[u];)u--;for(;1<=n&&0<=u;n--,u--)if(b[n]!==O[u]){if(n!==1||u!==1)do if(n--,u--,0>u||b[n]!==O[u]){var D=`
`+b[n].replace(" at new "," at ");return e.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",e.displayName)),D}while(1<=n&&0<=u);break}}}finally{At=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Zt(a):""}function dt(e,t){switch(e.tag){case 26:case 27:case 5:return Zt(e.type);case 16:return Zt("Lazy");case 13:return e.child!==t&&t!==null?Zt("Suspense Fallback"):Zt("Suspense");case 19:return Zt("SuspenseList");case 0:case 15:return se(e.type,!1);case 11:return se(e.type.render,!1);case 1:return se(e.type,!0);case 31:return Zt("Activity");default:return""}}function Kt(e){try{var t="",a=null;do t+=dt(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
Error generating stack: `+n.message+`
`+n.stack}}var Jt=Object.prototype.hasOwnProperty,vn=l.unstable_scheduleCallback,fl=l.unstable_cancelCallback,Ja=l.unstable_shouldYield,ty=l.unstable_requestPaint,Tt=l.unstable_now,ay=l.unstable_getCurrentPriorityLevel,Rr=l.unstable_ImmediatePriority,wr=l.unstable_UserBlockingPriority,mu=l.unstable_NormalPriority,ny=l.unstable_LowPriority,zr=l.unstable_IdlePriority,ly=l.log,uy=l.unstable_setDisableYieldValue,dl=null,Ot=null;function Sa(e){if(typeof ly=="function"&&uy(e),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(dl,e)}catch{}}var Nt=Math.clz32?Math.clz32:cy,iy=Math.log,sy=Math.LN2;function cy(e){return e>>>=0,e===0?32:31-(iy(e)/sy|0)|0}var hu=256,yu=262144,pu=4194304;function $a(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function gu(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var u=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var d=n&134217727;return d!==0?(n=d&~i,n!==0?u=$a(n):(o&=d,o!==0?u=$a(o):a||(a=d&~e,a!==0&&(u=$a(a))))):(d=n&~i,d!==0?u=$a(d):o!==0?u=$a(o):a||(a=n&~e,a!==0&&(u=$a(a)))),u===0?0:t!==0&&t!==u&&(t&i)===0&&(i=u&-u,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:u}function ml(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ry(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jr(){var e=pu;return pu<<=1,(pu&62914560)===0&&(pu=4194304),e}function ki(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function hl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function oy(e,t,a,n,u,i){var o=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var d=e.entanglements,b=e.expirationTimes,O=e.hiddenUpdates;for(a=o&~a;0<a;){var D=31-Nt(a),U=1<<D;d[D]=0,b[D]=-1;var R=O[D];if(R!==null)for(O[D]=null,D=0;D<R.length;D++){var w=R[D];w!==null&&(w.lane&=-536870913)}a&=~U}n!==0&&Dr(e,n,0),i!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function Dr(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Nt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function Cr(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Nt(a),u=1<<n;u&t|e[n]&t&&(e[n]|=t),a&=~u}}function Mr(e,t){var a=t&-t;return a=(a&42)!==0?1:Yi(a),(a&(e.suspendedLanes|t))!==0?0:a}function Yi(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Vi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ur(){var e=L.p;return e!==0?e:(e=window.event,e===void 0?32:xm(e.type))}function qr(e,t){var a=L.p;try{return L.p=e,t()}finally{L.p=a}}var _a=Math.random().toString(36).slice(2),at="__reactFiber$"+_a,ht="__reactProps$"+_a,Sn="__reactContainer$"+_a,Xi="__reactEvents$"+_a,fy="__reactListeners$"+_a,dy="__reactHandles$"+_a,Br="__reactResources$"+_a,yl="__reactMarker$"+_a;function Gi(e){delete e[at],delete e[ht],delete e[Xi],delete e[fy],delete e[dy]}function _n(e){var t=e[at];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Sn]||a[at]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=im(e);e!==null;){if(a=e[at])return a;e=im(e)}return t}e=a,a=e.parentNode}return null}function xn(e){if(e=e[at]||e[Sn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function En(e){var t=e[Br];return t||(t=e[Br]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function We(e){e[yl]=!0}var Hr=new Set,Lr={};function Fa(e,t){An(e,t),An(e+"Capture",t)}function An(e,t){for(Lr[e]=t,e=0;e<t.length;e++)Hr.add(t[e])}var my=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u21 Line truncated
`).replace(G0,"")}function Fd(e,t){return t=$d(t),$d(e)===t}function ze(e,t,a,n,u,i){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||On(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&On(e,""+n);break;case"className":vu(e,"class",n);break;case"tabIndex":vu(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":vu(e,a,n);break;case"style":Jr(e,n,i);break;case"data":if(t!=="object"){vu(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=_u(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(a==="formAction"?(t!=="input"&&ze(e,t,"name",u.name,u,null),ze(e,t,"formEncType",u.formEncType,u,null),ze(e,t,"formMethod",u.formMethod,u,null),ze(e,t,"formTarget",u.formTarget,u,null)):(ze(e,t,"encType",u.encType,u,null),ze(e,t,"method",u.method,u,null),ze(e,t,"target",u.target,u,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=_u(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=na);break;case"onScroll":n!=null&&ye("scroll",e);break;case"onScrollEnd":n!=null&&ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(a=n.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=_u(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":ye("beforetoggle",e),ye("toggle",e),bu(e,"popover",n);break;case"xlinkActuate":aa(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":aa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":aa(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":aa(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":aa(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":aa(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":aa(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":aa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":aa(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":bu(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=by.get(a)||a,bu(e,a,n))}}function Mc(e,t,a,n,u,i){switch(a){case"style":Jr(e,n,i);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(a=n.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof n=="string"?On(e,n):(typeof n=="number"||typeof n=="bigint")&&On(e,""+n);break;case"onScroll":n!=null&&ye("scroll",e);break;case"onScrollEnd":n!=null&&ye("scrollend",e);break;case"onClick":n!=null&&(e.onclick=na);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne Line truncated
`+n.stack}}var Jt=Object.prototype.hasOwnProperty,vn=l.unstable_scheduleCallback,fl=l.unstable_cancelCallback,Ja=l.unstable_shouldYield,ty=l.unstable_requestPaint,Tt=l.unstable_now,ay=l.unstable_getCurrentPriorityLevel,Rr=l.unstable_ImmediatePriority,wr=l.unstable_UserBlockingPriority,mu=l.unstable_NormalPriority,ny=l.unstable_LowPriority,zr=l.unstable_IdlePriority,ly=l.log,uy=l.unstable_setDisableYieldValue,dl=null,Ot=null;function Sa(e){if(typeof ly=="function"&&uy(e),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(dl,e)}catch{}}var Nt=Math.clz32?Math.clz32:cy,iy=Math.log,sy=Math.LN2;function cy(e){return e>>>=0,e===0?32:31-(iy(e)/sy|0)|0}var hu=256,yu=262144,pu=4194304;function $a(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function gu(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var u=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var d=n&134217727;return d!==0?(n=d&~i,n!==0?u=$a(n):(o&=d,o!==0?u=$a(o):a||(a=d&~e,a!==0&&(u=$a(a))))):(d=n&~i,d!==0?u=$a(d):o!==0?u=$a(o):a||(a=n&~e,a!==0&&(u=$a(a)))),u===0?0:t!==0&&t!==u&&(t&i)===0&&(i=u&-u,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:u}function ml(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ry(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jr(){var e=pu;return pu<<=1,(pu&62914560)===0&&(pu=4194304),e}function ki(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function hl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function oy(e,t,a,n,u,i){var o=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var d=e.entanglements,b=e.expirationTimes,O=e.hiddenUpdates;for(a=o&~a;0<a;){var D=31-Nt(a),U=1<<D;d[D]=0,b[D]=-1;var R=O[D];if(R!==null)for(O[D]=null,D=0;D<R.length;D++){var w=R[D];w!==null&&(w.lane&=-536870913)}a&=~U}n!==0&&Dr(e,n,0),i!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function Dr(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Nt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function Mr(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Nt(a),u=1<<n;u&t|e[n]&t&&(e[n]|=t),a&=~u}}function Cr(e,t){var a=t&-t;return a=(a&42)!==0?1:Yi(a),(a&(e.suspendedLanes|t))!==0?0:a}function Yi(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Vi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ur(){var e=L.p;return e!==0?e:(e=window.event,e===void 0?32:xm(e.type))}function qr(e,t){var a=L.p;try{return L.p=e,t()}finally{L.p=a}}var _a=Math.random().toString(36).slice(2),at="__reactFiber$"+_a,ht="__reactProps$"+_a,Sn="__reactContainer$"+_a,Xi="__reactEvents$"+_a,fy="__reactListeners$"+_a,dy="__reactHandles$"+_a,Br="__reactResources$"+_a,yl="__reactMarker$"+_a;function Gi(e){delete e[at],delete e[ht],delete e[Xi],delete e[fy],delete e[dy]}function _n(e){var t=e[at];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Sn]||a[at]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=im(e);e!==null;){if(a=e[at])return a;e=im(e)}return t}e=a,a=e.parentNode}return null}function xn(e){if(e=e[at]||e[Sn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function En(e){var t=e[Br];return t||(t=e[Br]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ie(e){e[yl]=!0}var Hr=new Set,Lr={};function Fa(e,t){An(e,t),An(e+"Capture",t)}function An(e,t){for(Lr[e]=t,e=0;e<t.length;e++)Hr.add(t[e])}var my=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u21 Line truncated
`).replace(G0,"")}function Fd(e,t){return t=$d(t),$d(e)===t}function ze(e,t,a,n,u,i){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||On(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&On(e,""+n);break;case"className":vu(e,"class",n);break;case"tabIndex":vu(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":vu(e,a,n);break;case"style":Jr(e,n,i);break;case"data":if(t!=="object"){vu(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=_u(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(a==="formAction"?(t!=="input"&&ze(e,t,"name",u.name,u,null),ze(e,t,"formEncType",u.formEncType,u,null),ze(e,t,"formMethod",u.formMethod,u,null),ze(e,t,"formTarget",u.formTarget,u,null)):(ze(e,t,"encType",u.encType,u,null),ze(e,t,"method",u.method,u,null),ze(e,t,"target",u.target,u,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=_u(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=na);break;case"onScroll":n!=null&&ye("scroll",e);break;case"onScrollEnd":n!=null&&ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(a=n.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=_u(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":ye("beforetoggle",e),ye("toggle",e),bu(e,"popover",n);break;case"xlinkActuate":aa(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":aa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":aa(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":aa(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":aa(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":aa(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":aa(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":aa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":aa(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":bu(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=by.get(a)||a,bu(e,a,n))}}function Cc(e,t,a,n,u,i){switch(a){case"style":Jr(e,n,i);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(a=n.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof n=="string"?On(e,n):(typeof n=="number"||typeof n=="bigint")&&On(e,""+n);break;case"onScroll":n!=null&&ye("scroll",e);break;case"onScrollEnd":n!=null&&ye("scrollend",e);break;case"onClick":n!=null&&(e.onclick=na);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne Line truncated
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -62,12 +62,12 @@ Error generating stack: `+n.message+`
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kp=B.forwardRef(({color:l="currentColor",size:s=24,strokeWidth:c=2,absoluteStrokeWidth:r,className:f="",children:m,iconNode:h,...p},v)=>B.createElement("svg",{ref:v,...Lp,width:s,height:s,stroke:l,strokeWidth:r?Number(c)*24/Number(s):c,className:gh("lucide",f),...!m&&!Hp(p)&&{"aria-hidden":"true"},...p},[...h.map(([g,A])=>B.createElement(g,A)),...Array.isArray(m)?m:[m]]));/**
*/const kp=q.forwardRef(({color:l="currentColor",size:s=24,strokeWidth:c=2,absoluteStrokeWidth:r,className:f="",children:m,iconNode:y,...p},v)=>q.createElement("svg",{ref:v,...Lp,width:s,height:s,stroke:l,strokeWidth:r?Number(c)*24/Number(s):c,className:gh("lucide",f),...!m&&!Hp(p)&&{"aria-hidden":"true"},...p},[...y.map(([g,A])=>q.createElement(g,A)),...Array.isArray(m)?m:[m]]));/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const de=(l,s)=>{const c=B.forwardRef(({className:r,...f},m)=>B.createElement(kp,{ref:m,iconNode:s,className:gh(`lucide-${qp(km(l))}`,`lucide-${l}`,r),...f}));return c.displayName=km(l),c};/**
*/const de=(l,s)=>{const c=q.forwardRef(({className:r,...f},m)=>q.createElement(kp,{ref:m,iconNode:s,className:gh(`lucide-${qp(km(l))}`,`lucide-${l}`,r),...f}));return c.displayName=km(l),c};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -97,182 +97,187 @@ Error generating stack: `+n.message+`
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Fp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Wp=de("chevron-up",Fp);/**
*/const Fp=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],Wp=de("building-2",Fp);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ip=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Pp=de("circle-alert",Ip);/**
*/const Pp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ip=de("chevron-up",Pp);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const e1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],or=de("circle-check",e1);/**
*/const e1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],t1=de("circle-alert",e1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const t1=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],a1=de("credit-card",t1);/**
*/const a1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],or=de("circle-check",a1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const n1=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],l1=de("download",n1);/**
*/const n1=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],l1=de("credit-card",n1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const u1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],i1=de("external-link",u1);/**
*/const u1=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],i1=de("download",u1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const s1=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],c1=de("flame",s1);/**
*/const s1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],c1=de("external-link",s1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const r1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],bh=de("info",r1);/**
*/const r1=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],o1=de("flame",r1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const o1=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],vh=de("key-round",o1);/**
*/const f1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],bh=de("info",f1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const f1=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],d1=de("layout-dashboard",f1);/**
*/const d1=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],vh=de("key-round",d1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const m1=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],h1=de("list-filter",m1);/**
*/const m1=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],h1=de("layout-dashboard",m1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const y1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],su=de("loader-circle",y1);/**
*/const y1=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],p1=de("list-filter",y1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const p1=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Vm=de("lock",p1);/**
*/const g1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],su=de("loader-circle",g1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const g1=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],b1=de("log-out",g1);/**
*/const b1=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Vm=de("lock",b1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const v1=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],S1=de("mail",v1);/**
*/const v1=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],S1=de("log-out",v1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _1=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],x1=de("megaphone",_1);/**
*/const _1=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],x1=de("mail",_1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const E1=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],A1=de("menu",E1);/**
*/const E1=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],A1=de("megaphone",E1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const T1=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],O1=de("message-square",T1);/**
*/const T1=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],O1=de("menu",T1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const N1=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],R1=de("monitor",N1);/**
*/const N1=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],R1=de("message-square",N1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const w1=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],z1=de("moon",w1);/**
*/const w1=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],z1=de("monitor",w1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const j1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],D1=de("refresh-cw",j1);/**
*/const j1=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],D1=de("moon",j1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const C1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],M1=de("settings",C1);/**
*/const M1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],C1=de("refresh-cw",M1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const U1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Xm=de("shield-check",U1);/**
*/const U1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],q1=de("settings",U1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q1=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],B1=de("shopping-bag",q1);/**
*/const B1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Xm=de("shield-check",B1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const H1=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],L1=de("star",H1);/**
*/const H1=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],L1=de("shopping-bag",H1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const k1=[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]],Y1=de("store",k1);/**
*/const k1=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Y1=de("star",k1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const V1=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],X1=de("sun",V1);/**
*/const V1=[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]],X1=de("store",V1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const G1=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],Q1=de("trending-down",G1);/**
*/const G1=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Q1=de("sun",G1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Z1=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Sh=de("triangle-alert",Z1);/**
*/const Z1=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],K1=de("trending-down",Z1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const K1=[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],J1=de("user-cog",K1);/**
*/const J1=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Sh=de("triangle-alert",J1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $1=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],F1=de("user-round",$1);/**
*/const $1=[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],F1=de("user-cog",$1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const W1=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Gm=de("user",W1);/**
*/const W1=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],P1=de("user-round",W1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const I1=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],P1=de("users",I1);/**
*/const I1=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Gm=de("user",I1);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eg=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],tg=de("workflow",eg);/**
*/const eg=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],tg=de("users",eg);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ag=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_h=de("x",ag),fr="xianyu-theme-preference",xh="(prefers-color-scheme: dark)",Eh=B.createContext(null),Ah=l=>l==="light"||l==="dark"||l==="system"?l:"system",ng=()=>{if(typeof window>"u")return"system";try{return Ah(window.localStorage.getItem(fr))}catch{return"system"}},lg=()=>typeof window>"u"?"light":window.matchMedia(xh).matches?"dark":"light",ug=({children:l})=>{const[s,c]=B.useState(ng),[r,f]=B.useState(lg);B.useEffect(()=>{const v=window.matchMedia(xh),g=A=>{f(A.matches?"dark":"light")};return f(v.matches?"dark":"light"),v.addEventListener("change",g),()=>v.removeEventListener("change",g)},[]),B.useEffect(()=>{const v=g=>{g.key===fr&&c(Ah(g.newValue))};return window.addEventListener("storage",v),()=>window.removeEventListener("storage",v)},[]);const m=s==="system"?r:s;B.useLayoutEffect(()=>{const v=document.documentElement;v.dataset.theme=m,v.dataset.themePreference=s,v.classList.toggle("dark",m==="dark"),v.style.colorScheme=m;try{window.localStorage.setItem(fr,s)}catch{}},[m,s]);const h=B.useCallback(v=>{c(v)},[]),p=B.useMemo(()=>({theme:s,resolvedTheme:m,setTheme:h}),[m,h,s]);return y.jsx(Eh.Provider,{value:p,children:l})},ig=()=>{const l=B.useContext(Eh);if(!l)throw new Error("useTheme must be used inside ThemeProvider");return l},ll=[{value:"light",label:"浅色",description:"使用浅色主题",icon:X1},{value:"dark",label:"深色",description:"使用深色主题",icon:z1},{value:"system",label:"自动",description:"跟随系统外观",icon:R1}],dr=({compact:l=!1,className:s=""})=>{const{theme:c,resolvedTheme:r,setTheme:f}=ig(),m=(h,p)=>{var A,N;let v=p;if(h.key==="ArrowRight"||h.key==="ArrowDown")v=(p+1)%ll.length;else if(h.key==="ArrowLeft"||h.key==="ArrowUp")v=(p-1+ll.length)%ll.length;else if(h.key==="Home")v=0;else if(h.key==="End")v=ll.length-1;else return;h.preventDefault();const g=ll[v].value;f(g),(N=(A=h.currentTarget.parentElement)==null?void 0:A.querySelector(`[data-theme-option="${g}"]`))==null||N.focus()};return y.jsxs("div",{className:`theme-picker ${l?"theme-picker--compact":""} ${s}`.trim(),"data-resolved-theme":r,children:[!l&&y.jsxs("div",{className:"theme-picker__heading",children:[y.jsx("span",{children:"显示主题"}),y.jsx("span",{className:"theme-picker__status",children:c==="system"?`自动 · ${r==="dark"?"深色":"浅色"}`:c==="dark"?"深色":"浅色"})]}),y.jsx("div",{className:"theme-switcher",role:"radiogroup","aria-label":"显示主题",children:ll.map((h,p)=>{const v=h.icon,g=c===h.value;return y.jsxs("button",{type:"button",role:"radio","aria-checked":g,"aria-label":h.description,title:h.description,tabIndex:g?0:-1,"data-theme-option":h.value,className:`theme-switcher__option ${g?"theme-switcher__option--active":""}`,onClick:()=>f(h.value),onKeyDown:A=>m(A,p),children:[y.jsx(v,{className:"h-3.5 w-3.5"}),!l&&y.jsx("span",{children:h.label})]},h.value)})})]})};function Th(l,s){return function(){return l.apply(s,arguments)}}const{toString:sg}=Object.prototype,{getPrototypeOf:sl}=Object,{iterator:ru,toStringTag:Oh}=Symbol,Mi=(({hasOwnProperty:l})=>(s,c)=>l.call(s,c))(Object.prototype),cu=(l,s)=>{let c=l;const r=[];for(;c!=null&&c!==Object.prototype;){if(r.indexOf(c)!==-1)return!1;if(r.push(c),Mi(c,s))return!0;c=sl(c)}return!1},cg=(l,s)=>l!=null&&cu(l,s)?l[s]:void 0,Sr=(l=>s=>{const c=sg.call(s);return l[c]||(l[c]=c.slice(8,-1).toLowerCase())})(Object.create(null)),Qt=l=>(l=l.toLowerCase(),s=>Sr(s)===l),Bi=l=>s=>typeof s===l,{isArray:pn}=Array,gn=Bi("undefined");function cl(l){return l!==null&&!gn(l)&&l.constructor!==null&&!gn(l.constructor)&&_t(l.constructor.isBuffer)&&l.constructor.isBuffer(l)}const Nh=Qt("ArrayBuffer");function rg(l){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(l):s=l&&l.buffer&&Nh(l.buffer),s}const og=Bi("string"),_t=Bi("function"),Rh=Bi("number"),rl=l=>l!==null&&typeof l=="object",fg=l=>l===!0||l===!1,ji=l=>{if(!rl(l))return!1;const s=sl(l);return(s===null||s===Object.prototype||sl(s)===null)&&!cu(l,Oh)&&!cu(l,ru)},dg=l=>{if(!rl(l)||cl(l))return!1;try{return Object.keys(l).length===0&&Object.getPrototypeOf(l)===Object.prototype}catch{return!1}},mg=Qt("Date"),hg=Qt("File"),yg=l=>!!(l&&typeof l.uri<"u"),pg=l=>l&&typeof l.getParts<"u",gg=Qt("Blob"),bg=Qt("FileList"),vg=Qt("Set"),Sg=l=>rl(l)&&_t(l.pipe);function _g(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Qm=_g(),Zm=typeof Qm.FormData<"u"?Qm.FormData:void 0,xg=l=>{if(!l)return!1;if(Zm&&l instanceof Zm)return!0;const s=sl(l);if(!s||s===Object.prototype||!_t(l.append))return!1;const c=Sr(l);return c==="formdata"||c==="object"&&_t(l.toString)&&l.toString()==="[object FormData]"},Eg=Qt("URLSearchParams"),[Ag,Tg,Og,Ng]=["ReadableStream","Request","Response","Headers"].map(Qt),Rg=l=>l.trim?l.trim():l.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ou(l,s,{allOwnKeys:c=!1}={}){if(l===null||typeoLine truncated
`).forEach(function(h){f=h.indexOf(":"),c=h.substring(0,f).trim().toLowerCase(),r=h.substring(f+1).trim();const p=x.hasOwnProp(s,c);!c||p&&x.hasOwnProp(Ig,c)||(c==="set-cookie"?p?s[c].push(r):s[c]=[r]:s[c]=p?s[c]+", "+r:r)}),s};function eb(l){let s=0,c=l.length;for(;s<c;){const r=l.charCodeAt(s);if(r!==9&&r!==32)break;s+=1}for(;c>s;){const r=l.charCodeAt(c-1);if(r!==9&&r!==32)break;c-=1}return s===0&&c===l.length?l:l.slice(s,c)}const tb=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ab=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function _r(l,s){return x.isArray(l)?l.map(c=>_r(c,s)):eb(String(l).replace(s,""))}const nb=l=>_r(l,tb),lb=l=>_r(l,ab);function Mh(l){const s=Object.create(null);return x.forEach(l.toJSON(),(c,r)=>{s[r]=lb(c)}),s}const Km=Symbol("internals");function iu(l){return l&&String(l).trim().toLowerCase()}function Di(l){return l===!1||l==null?l:x.isArray(l)?l.map(Di):nb(String(l))}function ub(l){const s=Object.create(null),c=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=c.exec(l);)s[r[1]]=r[2];return s}const ib=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function lr(l){let s=0,c=l.length;for(;s<c;){const r=l.charCodeAt(s);if(r!==9&&r!==32)break;s+=1}for(;c>s;){const r=l.charCodeAt(c-1);if(r!==9&&r!==32)break;c-=1}return s===0&&c===l.length?l:l.slice(s,c)}function sb(l){const s=l.length-1;if(s<1||l.charCodeAt(0)!==34||l.charCodeAt(s)!==34)return l;let c="";for(let r=1;r<s;r++){const f=l.charCodeAt(r);if(f===34||f===92&&(r+=1,r>=s))return l;c+=l[r]}return c}function cb(l){const s=Object.create(null),c=String(l);let r=0,f=!1,m=!1;function h(p){const v=lr(c.slice(r,p)),g=v.indexOf("=");if(g<1)return;const A=lr(v.slice(0,g));if(!ib.test(A))return;const N=A.toLowerCase();if(N==="__proto__"||N==="constructor"||N==="prototype")return;const q=lr(v.slice(g+1));s[N]=sb(q)}for(let p=0;p<c.length;p++){const v=c.charCodeAt(p);f?m?m=!1:v===92?m=!0:v===34&&(f=!1):v===34?f=!0:(v===44||v===59)&&(h(p),r=p+1)}return h(c.length),s}const rb=l=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(l.trim());function ur(l,s,c,r,f){if(x.isFunction(r))return r.call(this,s,c);if(f&&(s=c),!!x.isString(s)){if(x.isString(r))return s.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(s)}}function ob(l){return l.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(s,c,r)=>c.toUpperCase()+r)}function fb(l,s){const c=x.toCamelCase(" "+s);["get","set","has"].forEach(r=>{Object.defineProperty(l,r+c,{__proto__:null,value:function(f,m,h){return this[r].call(this,s,f,m,h)},configurable:!0})})}let ft=class{constructor(s){s&&this.set(s)}set(s,c,r){const f=this;function m(p,v,g){const A=iu(v);if(!A)return;const N=x.findKey(f,A);(!N||f[N]===void 0||g===!0||g===void 0&&f[N]!==!1)&&(f[N||v]=Di(p))}const h=(p,v)=>x.forEach(p,(g,A)=>m(g,A,v));if(x.isPlainObject(s)||s instanceof this.constructor)h(s,c);else if(x.isString(s)&&(s=s.trim())&&!rb(s))h(Pg(s),c);else if(x.isObject(s)&&x.isSafeIterable(s)){let p=Object.create(null),v,g;for(const A of s){if(!x.isArray(A))throw new TypeError("Object iterator must return a key-value pair");g=A[0],x.hasOwnProp(p,g)?(v=p[g],p[g]=x.isArray(v)?[...v,A[1]]:[v,A[1]]):p[g]=A[1]}h(p,c)}else s!=null&&m(c,s,r);return this}get(s,c){if(s=iu(s),s){const r=x.findKey(this,s);if(r){const f=this[r];if(!c)return f;if(c===!0)return ub(f);if(x.isFunction(c))return c.call(this,f,r);if(x.isRegExp(c))return c.exec(f);throw new TypeError("parser must be boolean|regexp|function")}}}has(s,c){if(s=iu(s),s){const r=x.findKey(this,s);return!!(r&&this[r]!==void 0&&(!c||ur(this,this[r],r,c)))}return!1}delete(s,c){const r=this;let f=!1;function m(h){if(h=iu(h),h){const p=x.findKey(r,h);p&&(!c||ur(r,r[p],p,c))&&(delete r[p],f=!0)}}return x.isArray(s)?s.forEach(m):m(s),f}clear(s){const c=Object.keys(this);let r=c.length,f=!1;for(;r--;){const m=c[r];(!s||ur(this,this[m],m,s,!0))&&(delete this[m],f=!0)}return f}normalize(s){const c=this,r={};return x.forEach(this,(f,m)=>{const h=x.findKey(r,m);if(h){c[h]=Di(f),delete c[m];return}const p=s?ob(m):String(m).trim();p!==m&&delete c[m],c[p]=Di(f),r[p]=!0}),this}concat(...s){return this.constructor.concat(this,...s)}toJSON(s){const c=Object.create(null);return x.forEach(this,(r,f)=>{r!=null&&r!==!1&&(c[f]=s&&x.isArray(r)?r.join(", "):r)}),c}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([s,c])=>s+": "+c).join(`
`)}getSetCookie(){const s=this.get("set-cookie");return x.isArray(s)?s:s==null||s===!1?[]:[s]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static parseParameters(s){return cb(s)}static concat(s,...c){const r=new this(s);return c.forEach(f=>r.set(f)),r}static accessor(s){const r=(this[Km]=this[Km]={accessors:{}}).accessors,f=this.prototype;function m(h){const p=iu(h);r[p]||(fb(f,h),r[p]=!0)}return x.isArray(s)?s.forEach(m):m(s),this}};ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(ft.prototype,({value:l},s)=>{let c=s[0].toUpperCase()+s.slice(1);return{get:()=>l,set(r){this[c]=r}}});x.freezeMethods(ft);const Ui="[REDACTED ****]";function db(l){if(x.hasOwnProp(l,"toJSON"))return!0;let s=Object.getPrototypeOf(l);for(;s&&s!==Object.prototype;){if(x.hasOwnProp(s,"toJSON"))return!0;s=Object.getPrototypeOf(s)}return!1}function mb(l,s){const c=new Set(s.map(m=>String(m).toLowerCase())),r=[],f=m=>{if(m===null||typeof m!="object"||x.isBuffer(m))return m;if(r.indexOf(m)!==-1)return;m instanceof ft&&(m=m.toJSON()),r.push(m);let h;if(x.isArray(m))h=[],m.forEach((p,v)=>{const g=f(p);x.isUndefined(g)||(h[v]=g)});else{if(!x.isPlainObject(m)&&db(m))return r.pop(),m;h=Object.create(null);for(const[p,v]of Object.entries(m)){const g=c.has(p.toLowerCase())?Ui:f(v);x.isUndefined(g)||(h[p]=g)}}return r.pop(),h};return f(l)}function Jm(l){try{return String(l)}catch{return""}}function hb(l){return l.errors.map(c=>{try{return c&&c.message?Jm(c.message):Jm(c)}catch{return""}}).filter(Boolean).join("; ")||l.name||"AggregateError"}let V=class Uh extends Error{static from(s,c,r,f,m,h){let p=s.message;!p&&x.isArray(s.errors)&&s.errors.length&&(p=hb(s));const v=new Uh(p,c||s.code,r,f,m);return Object.defineProperty(v,"cause",{__proto__:null,value:s,writable:!0,enumerable:!1,configurable:!0}),v.name=s.name,s.status!=null&&v.status==null&&(v.status=s.status),h&&Object.assign(v,h),v}constructor(s,c,r,f,m){super(s),Object.defineProperty(this,"message",{__proto__:null,value:s,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,c&&(this.code=c),r&&(this.config=r),f&&(this.request=f),m&&(this.response=m,this.status=m.status)}toJSON(){const s=this.config,c=s&&x.hasOwnProp(s,"redact")?s.redact:void 0,r=x.isArray(c)&&c.length>0?mb(s,c):x.toJSONObject(s);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:r,code:this.code,status:this.status}}};V.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";V.ERR_BAD_OPTION="ERR_BAD_OPTION";V.ECONNABORTED="ECONNABORTED";V.ETIMEDOUT="ETIMEDOUT";V.ECONNREFUSED="ECONNREFUSED";V.ERR_NETWORK="ERR_NETWORK";V.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";V.ERR_DEPRECATED="ERR_DEPRECATED";V.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";V.ERR_BAD_REQUEST="ERR_BAD_REQUEST";V.ERR_CANCELED="ERR_CANCELED";V.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";V.ERR_INVALID_URL="ERR_INVALID_URL";V.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const yb=null,qh=100;function hr(l){return x.isPlainObject(l)||x.isArray(l)}function Bh(l){return x.endsWith(l,"[]")?l.slice(0,-2):l}function ir(l,s,c){return l?l.concat(s).map(function(f,m){return f=Bh(f),!c&&m?"["+f+"]":f}).join(c?".":""):s}function pb(l){return x.isArray(l)&&!l.some(hr)}const gb=x.toFlatObject(x,{},null,function(s){return/^is[A-Z]/.test(s)});function Hi(l,s,c){if(!x.isObject(l))throw new TypeError("target must be an object");s=s||new FormData,c=x.toFlatObject(c,{metaTokens:!0,dots:!1,indexes:!1},!1,function(K,Q){return!x.isUndefined(Q[K])});const r=c.metaTokens,f=c.visitor||W,m=c.dots,h=c.indexes,p=c.Blob||typeof Blob<"u"&&Blob,v=c.maxDepth===void 0?qh:c.maxDepth,g=p&&x.isSpecCompliantForm(s),A=[];if(!x.isFunction(f))throw new TypeError("visitor must be a function");function N(C){if(C===null)return"";if(x.isDate(C))return C.toISOString();if(x.isBoolean(C))return C.toString();if(!g&&x.isBlob(C))throw new V("Blob is not supported. Use a Buffer instead.");if(x.isArrayBuffer(C)||x.isTypedArray(C)){if(g&&typeof p=="function")return new p([C]);throw new V("Blob is not supported. Use a Buffer instead.",V.ERR_NOT_SUPPORT)}return C}function q(C){if(C>v)throw new V("Object is too deeply nested ("+C+" levels). Max depth: "+v,V.ERR_FORM_DATA_DEPTH_EXCEEDED)}function F(C,K){if(v===1/0)return JSON.stringify(C);const Q=[];return JSON.stringify(C,function(Ee,me){if(!x.isObject(me))return me;for(;Q.length&&Q[Q.length-1]!==this;)Q.pop();return Q.push(me),q(K+Q.length-1),me})}function W(C,K,Q){let ee=C;if(x.isReactNative(s)&&x.isReactNativeBlob(C))return s.append(ir(Q,K,m),N(C)),!1;if(C&&!Q&&typeof C=="object"){if(x.endsWith(K,"{}"))K=r?K:K.slice(0,-2),C=F(C,1);else if(x.isArray(C)&&pb(C)||(x.isFileList(C)||x.endsWith(K,"[]"))&&(ee=x.toArray(C)))return K=Bh(K),ee.forEach(function(me,ne){!(x.is Line truncated
`+h.map(ch).join(`
`):" "+ch(h[0]):"as no adapter specified";throw new V("There is no suitable adapter to dispatch the request "+p,V.ERR_NOT_SUPPORT)}return f}const Jh={getAdapter:dv,adapters:Or};function cr(l){if(l.cancelToken&&l.cancelToken.throwIfRequested(),l.signal&&l.signal.aborted)throw new du(null,l)}function rr(l){return cr(l),l.headers=ft.from(l.headers),l.data=sr.call(l,l.transformRequest),["post","put","patch"].indexOf(l.method)!==-1&&l.headers.setContentType("application/x-www-form-urlencoded",!1),Jh.getAdapter(l.adapter||fu.adapter,l)(l).then(function(r){cr(l),l.response=r;try{r.data=sr.call(l,l.transformResponse,r)}finally{delete l.response}return r.headers=ft.from(r.headers),r},function(r){if(!Vh(r)&&(cr(l),r&&r.response)){l.response=r.response;try{r.response.data=sr.call(l,l.transformResponse,r.response)}finally{delete l.response}r.response.headers=ft.from(r.response.headers)}return Promise.reject(r)})}const Li={};["object","boolean","number","function","string","symbol"].forEach((l,s)=>{Li[l]=function(r){return typeof r===l||"a"+(s<1?"n ":" ")+l}});const rh={};Li.transitional=function(s,c,r){function f(m,h){return"[Axios v"+Tr+"] Transitional option '"+m+"'"+h+(r?". "+r:"")}return(m,h,p)=>{if(s===!1)throw new V(f(h," has been removed"+(c?" in "+c:"")),V.ERR_DEPRECATED);return c&&!rh[h]&&(rh[h]=!0,console.warn(f(h," has been deprecated since v"+c+" and will be removed in the near future"))),s?s(m,h,p):!0}};Li.spelling=function(s){return(c,r)=>(console.warn(`${r} is likely a misspelling of ${s}`),!0)};function mv(l,s,c){if(typeof l!="object"||l===null)throw new V("options must be an object",V.ERR_BAD_OPTION_VALUE);const r=Object.keys(l);let f=r.length;for(;f-- >0;){const m=r[f],h=Object.prototype.hasOwnProperty.call(s,m)?s[m]:void 0;if(h){const p=l[m],v=p===void 0||h(p,m,l);if(v!==!0)throw new V("option "+m+" must be "+v,V.ERR_BAD_OPTION_VALUE);continue}if(c!==!0)throw new V("Unknown option "+m,V.ERR_BAD_OPTION)}}const Ci={assertOptions:mv,validators:Li},ot=Ci.validators;let yn=class{constructor(s){this.defaults=s||{},this.interceptors={request:new Fm,response:new Fm}}async request(s,c){try{return await this._request(s,c)}catch(r){if(r instanceof Error){let f={};Error.captureStackTrace?Error.captureStackTrace(f):f=new Error;const m=(()=>{if(!f.stack)return"";const h=f.stack.indexOf(`
`);return h===-1?"":f.stack.slice(h+1)})();try{if(!r.stack)r.stack=m;else if(m){const h=m.indexOf(`
`),p=h===-1?-1:m.indexOf(`
`,h+1),v=p===-1?"":m.slice(p+1);String(r.stack).endsWith(v)||(r.stack+=`
`+m)}}catch{}}throw r}}_request(s,c){typeof s=="string"?(c=c||{},c.url=s):c=s||{},c=bn(this.defaults,c);const{transitional:r,paramsSerializer:f,headers:m}=c;r!==void 0&&Ci.assertOptions(r,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean),legacyInterceptorReqResOrdering:ot.transitional(ot.boolean),advertiseZstdAcceptEncoding:ot.transitional(ot.boolean),validateStatusUndefinedResolves:ot.transitional(ot.boolean)},!1),f!=null&&(x.isFunction(f)?c.paramsSerializer={serialize:f}:Ci.assertOptions(f,{encode:ot.function,serialize:ot.function},!0)),c.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?c.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:c.allowAbsoluteUrls=!0),Ci.assertOptions(c,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),c.method=(c.method||this.defaults.method||"get").toLowerCase();let h=m&&x.merge(m.common,m[c.method]);m&&x.forEach(["delete","get","head","post","put","patch","query","common"],W=>{delete m[W]}),c.headers=ft.concat(h,m);const p=[];let v=!0;this.interceptors.request.forEach(function(X){if(typeof X.runWhen=="function"&&X.runWhen(c)===!1)return;v=v&&X.synchronous;const Y=c.transitional||Er;Y&&Y.legacyInterceptorReqResOrdering?p.unshift(X.fulfilled,X.rejected):p.push(X.fulfilled,X.rejected)});const g=[];this.interceptors.response.forEach(function(X){g.push(X.fulfilled,X.rejected)});let A,N=0,q;if(!v){const W=[rr.bind(this),void 0];for(W.unshift(...p),W.push(...g),q=W.length,A=Promise.resolve(c);N<q;)A=A.then(W[N++],W[N++]);return A}q=p.length;let F=c;for(;N<q;){const W=p[N++],X=p[N++];try{F=W?W(F):F}catch(Y){if(!X){A=Promise.reject(Y);break}try{const C=X.call(this,Y);x.isThenable(C)&&(A=Promise.resolve(C).then(()=>rr.call(this,F)))}catch(C){A=Promise.reject(C)}break}}if(!A)try{A=rr.call(this,F)}catch(W){A=Promise.reject(W)}for(N=0,q=g.length;N<q;)A=A.then(g[N++],g[N++]);return A}getUri(s){s=bn(this.defaults,s);const c=Gh(s.baseURL,s.url,s.allowAbsoluteUrls,s);return Lh(c,s.params,s.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(s){yn.prototype[s]=function(c,r){return this.request(bn(r||{},{method:s,url:c,data:r&&x.hasOwnProp(r,"data")?r.data:void 0}))}});x.forEach(["post","put","patch","query"],function(s){function c(r){return function(m,h,p){return this.request(bn(p||{},{method:s,headers:r?{"Content-Type":"multipart/form-data"}:{},url:m,data:h}))}}yn.prototype[s]=c(),s!=="query"&&(yn.prototype[s+"Form"]=c(!0))});let hv=class $h{constructor(s){if(typeof s!="function")throw new TypeError("executor must be a function.");let c;this.promise=new Promise(function(m){c=m});const r=this;this.promise.then(f=>{if(!r._listeners)return;let m=r._listeners.length;for(;m-- >0;)r._listeners[m](f);r._listeners=null}),this.promise.then=f=>{let m;const h=new Promise(p=>{r.subscribe(p),m=p}).then(f);return h.cancel=function(){r.unsubscribe(m)},h},s(function(m,h,p){r.reason||(r.reason=new du(m,h,p),c(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const c=this._listeners.indexOf(s);c!==-1&&this._listeners.splice(c,1)}toAbortSignal(){const s=new AbortController,c=r=>{s.abort(r)};return this.subscribe(c),s.signal.unsubscribe=()=>this.unsubscribe(c),s.signal}static source(){let s;return{token:new $h(function(f){s=f}),cancel:s}}};function yv(l){return function(c){return l.apply(null,c)}}function pv(l){return x.isObject(l)&&l.isAxiosError===!0}const pr={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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCe Line truncated
*/const ag=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],ng=de("workflow",ag);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_h=de("x",lg),fr="xianyu-theme-preference",xh="(prefers-color-scheme: dark)",Eh=q.createContext(null),Ah=l=>l==="light"||l==="dark"||l==="system"?l:"system",ug=()=>{if(typeof window>"u")return"system";try{return Ah(window.localStorage.getItem(fr))}catch{return"system"}},ig=()=>typeof window>"u"?"light":window.matchMedia(xh).matches?"dark":"light",sg=({children:l})=>{const[s,c]=q.useState(ug),[r,f]=q.useState(ig);q.useEffect(()=>{const v=window.matchMedia(xh),g=A=>{f(A.matches?"dark":"light")};return f(v.matches?"dark":"light"),v.addEventListener("change",g),()=>v.removeEventListener("change",g)},[]),q.useEffect(()=>{const v=g=>{g.key===fr&&c(Ah(g.newValue))};return window.addEventListener("storage",v),()=>window.removeEventListener("storage",v)},[]);const m=s==="system"?r:s;q.useLayoutEffect(()=>{const v=document.documentElement;v.dataset.theme=m,v.dataset.themePreference=s,v.classList.toggle("dark",m==="dark"),v.style.colorScheme=m;try{window.localStorage.setItem(fr,s)}catch{}},[m,s]);const y=q.useCallback(v=>{c(v)},[]),p=q.useMemo(()=>({theme:s,resolvedTheme:m,setTheme:y}),[m,y,s]);return h.jsx(Eh.Provider,{value:p,children:l})},cg=()=>{const l=q.useContext(Eh);if(!l)throw new Error("useTheme must be used inside ThemeProvider");return l},ll=[{value:"light",label:"浅色",description:"使用浅色主题",icon:Q1},{value:"dark",label:"深色",description:"使用深色主题",icon:D1},{value:"system",label:"自动",description:"跟随系统外观",icon:z1}],dr=({compact:l=!1,className:s=""})=>{const{theme:c,resolvedTheme:r,setTheme:f}=cg(),m=(y,p)=>{var A,N;let v=p;if(y.key==="ArrowRight"||y.key==="ArrowDown")v=(p+1)%ll.length;else if(y.key==="ArrowLeft"||y.key==="ArrowUp")v=(p-1+ll.length)%ll.length;else if(y.key==="Home")v=0;else if(y.key==="End")v=ll.length-1;else return;y.preventDefault();const g=ll[v].value;f(g),(N=(A=y.currentTarget.parentElement)==null?void 0:A.querySelector(`[data-theme-option="${g}"]`))==null||N.focus()};return h.jsxs("div",{className:`theme-picker ${l?"theme-picker--compact":""} ${s}`.trim(),"data-resolved-theme":r,children:[!l&&h.jsxs("div",{className:"theme-picker__heading",children:[h.jsx("span",{children:"显示主题"}),h.jsx("span",{className:"theme-picker__status",children:c==="system"?`自动 · ${r==="dark"?"深色":"浅色"}`:c==="dark"?"深色":"浅色"})]}),h.jsx("div",{className:"theme-switcher",role:"radiogroup","aria-label":"显示主题",children:ll.map((y,p)=>{const v=y.icon,g=c===y.value;return h.jsxs("button",{type:"button",role:"radio","aria-checked":g,"aria-label":y.description,title:y.description,tabIndex:g?0:-1,"data-theme-option":y.value,className:`theme-switcher__option ${g?"theme-switcher__option--active":""}`,onClick:()=>f(y.value),onKeyDown:A=>m(A,p),children:[h.jsx(v,{className:"h-3.5 w-3.5"}),!l&&h.jsx("span",{children:y.label})]},y.value)})})]})};function Th(l,s){return function(){return l.apply(s,arguments)}}const{toString:rg}=Object.prototype,{getPrototypeOf:sl}=Object,{iterator:ru,toStringTag:Oh}=Symbol,Ci=(({hasOwnProperty:l})=>(s,c)=>l.call(s,c))(Object.prototype),cu=(l,s)=>{let c=l;const r=[];for(;c!=null&&c!==Object.prototype;){if(r.indexOf(c)!==-1)return!1;if(r.push(c),Ci(c,s))return!0;c=sl(c)}return!1},og=(l,s)=>l!=null&&cu(l,s)?l[s]:void 0,Sr=(l=>s=>{const c=rg.call(s);return l[c]||(l[c]=c.slice(8,-1).toLowerCase())})(Object.create(null)),Qt=l=>(l=l.toLowerCase(),s=>Sr(s)===l),Bi=l=>s=>typeof s===l,{isArray:pn}=Array,gn=Bi("undefined");function cl(l){return l!==null&&!gn(l)&&l.constructor!==null&&!gn(l.constructor)&&_t(l.constructor.isBuffer)&&l.constructor.isBuffer(l)}const Nh=Qt("ArrayBuffer");function fg(l){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(l):s=l&&l.buffer&&Nh(l.buffer),s}const dg=Bi("string"),_t=Bi("function"),Rh=Bi("number"),rl=l=>l!==null&&typeof l=="object",mg=l=>l===!0||l===!1,ji=l=>{if(!rl(l))return!1;const s=sl(l);return(s===null||s===Object.prototype||sl(s)===null)&&!cu(l,Oh)&&!cu(l,ru)},hg=l=>{if(!rl(l)||cl(l))return!1;try{return Object.keys(l).length===0&&Object.getPrototypeOf(l)===Object.prototype}catch{return!1}},yg=Qt("Date"),pg=Qt("File"),gg=l=>!!(l&&typeof l.uri<"u"),bg=l=>l&&typeof l.getParts<"u",vg=Qt("Blob"),Sg=Qt("FileList"),_g=Qt("Set"),xg=l=>rl(l)&&_t(l.pipe);function Eg(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Qm=Eg(),Zm=typeof Qm.FormData<"u"?Qm.FormData:void 0,Ag=l=>{if(!l)return!1;if(Zm&&l instanceof Zm)return!0;const s=sl(l);if(!s||s===Object.prototype||!_t(l.append))return!1;const c=Sr(l);return c==="formdata"||c==="object"&&_t(l.toString)&&l.toString()==="[object FormData]"},Tg=Qt("URLSearchParams"),[Og,Ng,Rg,wg]=["ReadableStream","Request","Response","Headers"].map(Qt),zg=l=>l.trim?l.trim():l.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ou(l,s,{allOwnKeys:c=!1}={}){if(l===null||typeoLine truncated
`).forEach(function(y){f=y.indexOf(":"),c=y.substring(0,f).trim().toLowerCase(),r=y.substring(f+1).trim();const p=x.hasOwnProp(s,c);!c||p&&x.hasOwnProp(eb,c)||(c==="set-cookie"?p?s[c].push(r):s[c]=[r]:s[c]=p?s[c]+", "+r:r)}),s};function ab(l){let s=0,c=l.length;for(;s<c;){const r=l.charCodeAt(s);if(r!==9&&r!==32)break;s+=1}for(;c>s;){const r=l.charCodeAt(c-1);if(r!==9&&r!==32)break;c-=1}return s===0&&c===l.length?l:l.slice(s,c)}const nb=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),lb=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function _r(l,s){return x.isArray(l)?l.map(c=>_r(c,s)):ab(String(l).replace(s,""))}const ub=l=>_r(l,nb),ib=l=>_r(l,lb);function Ch(l){const s=Object.create(null);return x.forEach(l.toJSON(),(c,r)=>{s[r]=ib(c)}),s}const Km=Symbol("internals");function iu(l){return l&&String(l).trim().toLowerCase()}function Di(l){return l===!1||l==null?l:x.isArray(l)?l.map(Di):ub(String(l))}function sb(l){const s=Object.create(null),c=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=c.exec(l);)s[r[1]]=r[2];return s}const cb=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function lr(l){let s=0,c=l.length;for(;s<c;){const r=l.charCodeAt(s);if(r!==9&&r!==32)break;s+=1}for(;c>s;){const r=l.charCodeAt(c-1);if(r!==9&&r!==32)break;c-=1}return s===0&&c===l.length?l:l.slice(s,c)}function rb(l){const s=l.length-1;if(s<1||l.charCodeAt(0)!==34||l.charCodeAt(s)!==34)return l;let c="";for(let r=1;r<s;r++){const f=l.charCodeAt(r);if(f===34||f===92&&(r+=1,r>=s))return l;c+=l[r]}return c}function ob(l){const s=Object.create(null),c=String(l);let r=0,f=!1,m=!1;function y(p){const v=lr(c.slice(r,p)),g=v.indexOf("=");if(g<1)return;const A=lr(v.slice(0,g));if(!cb.test(A))return;const N=A.toLowerCase();if(N==="__proto__"||N==="constructor"||N==="prototype")return;const B=lr(v.slice(g+1));s[N]=rb(B)}for(let p=0;p<c.length;p++){const v=c.charCodeAt(p);f?m?m=!1:v===92?m=!0:v===34&&(f=!1):v===34?f=!0:(v===44||v===59)&&(y(p),r=p+1)}return y(c.length),s}const fb=l=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(l.trim());function ur(l,s,c,r,f){if(x.isFunction(r))return r.call(this,s,c);if(f&&(s=c),!!x.isString(s)){if(x.isString(r))return s.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(s)}}function db(l){return l.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(s,c,r)=>c.toUpperCase()+r)}function mb(l,s){const c=x.toCamelCase(" "+s);["get","set","has"].forEach(r=>{Object.defineProperty(l,r+c,{__proto__:null,value:function(f,m,y){return this[r].call(this,s,f,m,y)},configurable:!0})})}let ft=class{constructor(s){s&&this.set(s)}set(s,c,r){const f=this;function m(p,v,g){const A=iu(v);if(!A)return;const N=x.findKey(f,A);(!N||f[N]===void 0||g===!0||g===void 0&&f[N]!==!1)&&(f[N||v]=Di(p))}const y=(p,v)=>x.forEach(p,(g,A)=>m(g,A,v));if(x.isPlainObject(s)||s instanceof this.constructor)y(s,c);else if(x.isString(s)&&(s=s.trim())&&!fb(s))y(tb(s),c);else if(x.isObject(s)&&x.isSafeIterable(s)){let p=Object.create(null),v,g;for(const A of s){if(!x.isArray(A))throw new TypeError("Object iterator must return a key-value pair");g=A[0],x.hasOwnProp(p,g)?(v=p[g],p[g]=x.isArray(v)?[...v,A[1]]:[v,A[1]]):p[g]=A[1]}y(p,c)}else s!=null&&m(c,s,r);return this}get(s,c){if(s=iu(s),s){const r=x.findKey(this,s);if(r){const f=this[r];if(!c)return f;if(c===!0)return sb(f);if(x.isFunction(c))return c.call(this,f,r);if(x.isRegExp(c))return c.exec(f);throw new TypeError("parser must be boolean|regexp|function")}}}has(s,c){if(s=iu(s),s){const r=x.findKey(this,s);return!!(r&&this[r]!==void 0&&(!c||ur(this,this[r],r,c)))}return!1}delete(s,c){const r=this;let f=!1;function m(y){if(y=iu(y),y){const p=x.findKey(r,y);p&&(!c||ur(r,r[p],p,c))&&(delete r[p],f=!0)}}return x.isArray(s)?s.forEach(m):m(s),f}clear(s){const c=Object.keys(this);let r=c.length,f=!1;for(;r--;){const m=c[r];(!s||ur(this,this[m],m,s,!0))&&(delete this[m],f=!0)}return f}normalize(s){const c=this,r={};return x.forEach(this,(f,m)=>{const y=x.findKey(r,m);if(y){c[y]=Di(f),delete c[m];return}const p=s?db(m):String(m).trim();p!==m&&delete c[m],c[p]=Di(f),r[p]=!0}),this}concat(...s){return this.constructor.concat(this,...s)}toJSON(s){const c=Object.create(null);return x.forEach(this,(r,f)=>{r!=null&&r!==!1&&(c[f]=s&&x.isArray(r)?r.join(", "):r)}),c}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([s,c])=>s+": "+c).join(`
`)}getSetCookie(){const s=this.get("set-cookie");return x.isArray(s)?s:s==null||s===!1?[]:[s]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static parseParameters(s){return ob(s)}static concat(s,...c){const r=new this(s);return c.forEach(f=>r.set(f)),r}static accessor(s){const r=(this[Km]=this[Km]={accessors:{}}).accessors,f=this.prototype;function m(y){const p=iu(y);r[p]||(mb(f,y),r[p]=!0)}return x.isArray(s)?s.forEach(m):m(s),this}};ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(ft.prototype,({value:l},s)=>{let c=s[0].toUpperCase()+s.slice(1);return{get:()=>l,set(r){this[c]=r}}});x.freezeMethods(ft);const Ui="[REDACTED ****]";function hb(l){if(x.hasOwnProp(l,"toJSON"))return!0;let s=Object.getPrototypeOf(l);for(;s&&s!==Object.prototype;){if(x.hasOwnProp(s,"toJSON"))return!0;s=Object.getPrototypeOf(s)}return!1}function yb(l,s){const c=new Set(s.map(m=>String(m).toLowerCase())),r=[],f=m=>{if(m===null||typeof m!="object"||x.isBuffer(m))return m;if(r.indexOf(m)!==-1)return;m instanceof ft&&(m=m.toJSON()),r.push(m);let y;if(x.isArray(m))y=[],m.forEach((p,v)=>{const g=f(p);x.isUndefined(g)||(y[v]=g)});else{if(!x.isPlainObject(m)&&hb(m))return r.pop(),m;y=Object.create(null);for(const[p,v]of Object.entries(m)){const g=c.has(p.toLowerCase())?Ui:f(v);x.isUndefined(g)||(y[p]=g)}}return r.pop(),y};return f(l)}function Jm(l){try{return String(l)}catch{return""}}function pb(l){return l.errors.map(c=>{try{return c&&c.message?Jm(c.message):Jm(c)}catch{return""}}).filter(Boolean).join("; ")||l.name||"AggregateError"}let V=class Uh extends Error{static from(s,c,r,f,m,y){let p=s.message;!p&&x.isArray(s.errors)&&s.errors.length&&(p=pb(s));const v=new Uh(p,c||s.code,r,f,m);return Object.defineProperty(v,"cause",{__proto__:null,value:s,writable:!0,enumerable:!1,configurable:!0}),v.name=s.name,s.status!=null&&v.status==null&&(v.status=s.status),y&&Object.assign(v,y),v}constructor(s,c,r,f,m){super(s),Object.defineProperty(this,"message",{__proto__:null,value:s,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,c&&(this.code=c),r&&(this.config=r),f&&(this.request=f),m&&(this.response=m,this.status=m.status)}toJSON(){const s=this.config,c=s&&x.hasOwnProp(s,"redact")?s.redact:void 0,r=x.isArray(c)&&c.length>0?yb(s,c):x.toJSONObject(s);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:r,code:this.code,status:this.status}}};V.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";V.ERR_BAD_OPTION="ERR_BAD_OPTION";V.ECONNABORTED="ECONNABORTED";V.ETIMEDOUT="ETIMEDOUT";V.ECONNREFUSED="ECONNREFUSED";V.ERR_NETWORK="ERR_NETWORK";V.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";V.ERR_DEPRECATED="ERR_DEPRECATED";V.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";V.ERR_BAD_REQUEST="ERR_BAD_REQUEST";V.ERR_CANCELED="ERR_CANCELED";V.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";V.ERR_INVALID_URL="ERR_INVALID_URL";V.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const gb=null,qh=100;function hr(l){return x.isPlainObject(l)||x.isArray(l)}function Bh(l){return x.endsWith(l,"[]")?l.slice(0,-2):l}function ir(l,s,c){return l?l.concat(s).map(function(f,m){return f=Bh(f),!c&&m?"["+f+"]":f}).join(c?".":""):s}function bb(l){return x.isArray(l)&&!l.some(hr)}const vb=x.toFlatObject(x,{},null,function(s){return/^is[A-Z]/.test(s)});function Hi(l,s,c){if(!x.isObject(l))throw new TypeError("target must be an object");s=s||new FormData,c=x.toFlatObject(c,{metaTokens:!0,dots:!1,indexes:!1},!1,function(K,Q){return!x.isUndefined(Q[K])});const r=c.metaTokens,f=c.visitor||W,m=c.dots,y=c.indexes,p=c.Blob||typeof Blob<"u"&&Blob,v=c.maxDepth===void 0?qh:c.maxDepth,g=p&&x.isSpecCompliantForm(s),A=[];if(!x.isFunction(f))throw new TypeError("visitor must be a function");function N(M){if(M===null)return"";if(x.isDate(M))return M.toISOString();if(x.isBoolean(M))return M.toString();if(!g&&x.isBlob(M))throw new V("Blob is not supported. Use a Buffer instead.");if(x.isArrayBuffer(M)||x.isTypedArray(M)){if(g&&typeof p=="function")return new p([M]);throw new V("Blob is not supported. Use a Buffer instead.",V.ERR_NOT_SUPPORT)}return M}function B(M){if(M>v)throw new V("Object is too deeply nested ("+M+" levels). Max depth: "+v,V.ERR_FORM_DATA_DEPTH_EXCEEDED)}function F(M,K){if(v===1/0)return JSON.stringify(M);const Q=[];return JSON.stringify(M,function(Ee,me){if(!x.isObject(me))return me;for(;Q.length&&Q[Q.length-1]!==this;)Q.pop();return Q.push(me),B(K+Q.length-1),me})}function W(M,K,Q){let ee=M;if(x.isReactNative(s)&&x.isReactNativeBlob(M))return s.append(ir(Q,K,m),N(M)),!1;if(M&&!Q&&typeof M=="object"){if(x.endsWith(K,"{}"))K=r?K:K.slice(0,-2),M=F(M,1);else if(x.isArray(M)&&bb(M)||(x.isFileList(M)||x.endsWith(K,"[]"))&&(ee=x.toArray(M)))return K=Bh(K),ee.forEach(function(me,le){!(x.is Line truncated
`+y.map(ch).join(`
`):" "+ch(y[0]):"as no adapter specified";throw new V("There is no suitable adapter to dispatch the request "+p,V.ERR_NOT_SUPPORT)}return f}const Jh={getAdapter:hv,adapters:Or};function cr(l){if(l.cancelToken&&l.cancelToken.throwIfRequested(),l.signal&&l.signal.aborted)throw new du(null,l)}function rr(l){return cr(l),l.headers=ft.from(l.headers),l.data=sr.call(l,l.transformRequest),["post","put","patch"].indexOf(l.method)!==-1&&l.headers.setContentType("application/x-www-form-urlencoded",!1),Jh.getAdapter(l.adapter||fu.adapter,l)(l).then(function(r){cr(l),l.response=r;try{r.data=sr.call(l,l.transformResponse,r)}finally{delete l.response}return r.headers=ft.from(r.headers),r},function(r){if(!Vh(r)&&(cr(l),r&&r.response)){l.response=r.response;try{r.response.data=sr.call(l,l.transformResponse,r.response)}finally{delete l.response}r.response.headers=ft.from(r.response.headers)}return Promise.reject(r)})}const Li={};["object","boolean","number","function","string","symbol"].forEach((l,s)=>{Li[l]=function(r){return typeof r===l||"a"+(s<1?"n ":" ")+l}});const rh={};Li.transitional=function(s,c,r){function f(m,y){return"[Axios v"+Tr+"] Transitional option '"+m+"'"+y+(r?". "+r:"")}return(m,y,p)=>{if(s===!1)throw new V(f(y," has been removed"+(c?" in "+c:"")),V.ERR_DEPRECATED);return c&&!rh[y]&&(rh[y]=!0,console.warn(f(y," has been deprecated since v"+c+" and will be removed in the near future"))),s?s(m,y,p):!0}};Li.spelling=function(s){return(c,r)=>(console.warn(`${r} is likely a misspelling of ${s}`),!0)};function yv(l,s,c){if(typeof l!="object"||l===null)throw new V("options must be an object",V.ERR_BAD_OPTION_VALUE);const r=Object.keys(l);let f=r.length;for(;f-- >0;){const m=r[f],y=Object.prototype.hasOwnProperty.call(s,m)?s[m]:void 0;if(y){const p=l[m],v=p===void 0||y(p,m,l);if(v!==!0)throw new V("option "+m+" must be "+v,V.ERR_BAD_OPTION_VALUE);continue}if(c!==!0)throw new V("Unknown option "+m,V.ERR_BAD_OPTION)}}const Mi={assertOptions:yv,validators:Li},ot=Mi.validators;let yn=class{constructor(s){this.defaults=s||{},this.interceptors={request:new Fm,response:new Fm}}async request(s,c){try{return await this._request(s,c)}catch(r){if(r instanceof Error){let f={};Error.captureStackTrace?Error.captureStackTrace(f):f=new Error;const m=(()=>{if(!f.stack)return"";const y=f.stack.indexOf(`
`);return y===-1?"":f.stack.slice(y+1)})();try{if(!r.stack)r.stack=m;else if(m){const y=m.indexOf(`
`),p=y===-1?-1:m.indexOf(`
`,y+1),v=p===-1?"":m.slice(p+1);String(r.stack).endsWith(v)||(r.stack+=`
`+m)}}catch{}}throw r}}_request(s,c){typeof s=="string"?(c=c||{},c.url=s):c=s||{},c=bn(this.defaults,c);const{transitional:r,paramsSerializer:f,headers:m}=c;r!==void 0&&Mi.assertOptions(r,{silentJSONParsing:ot.transitional(ot.boolean),forcedJSONParsing:ot.transitional(ot.boolean),clarifyTimeoutError:ot.transitional(ot.boolean),legacyInterceptorReqResOrdering:ot.transitional(ot.boolean),advertiseZstdAcceptEncoding:ot.transitional(ot.boolean),validateStatusUndefinedResolves:ot.transitional(ot.boolean)},!1),f!=null&&(x.isFunction(f)?c.paramsSerializer={serialize:f}:Mi.assertOptions(f,{encode:ot.function,serialize:ot.function},!0)),c.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?c.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:c.allowAbsoluteUrls=!0),Mi.assertOptions(c,{baseUrl:ot.spelling("baseURL"),withXsrfToken:ot.spelling("withXSRFToken")},!0),c.method=(c.method||this.defaults.method||"get").toLowerCase();let y=m&&x.merge(m.common,m[c.method]);m&&x.forEach(["delete","get","head","post","put","patch","query","common"],W=>{delete m[W]}),c.headers=ft.concat(y,m);const p=[];let v=!0;this.interceptors.request.forEach(function(X){if(typeof X.runWhen=="function"&&X.runWhen(c)===!1)return;v=v&&X.synchronous;const Y=c.transitional||Er;Y&&Y.legacyInterceptorReqResOrdering?p.unshift(X.fulfilled,X.rejected):p.push(X.fulfilled,X.rejected)});const g=[];this.interceptors.response.forEach(function(X){g.push(X.fulfilled,X.rejected)});let A,N=0,B;if(!v){const W=[rr.bind(this),void 0];for(W.unshift(...p),W.push(...g),B=W.length,A=Promise.resolve(c);N<B;)A=A.then(W[N++],W[N++]);return A}B=p.length;let F=c;for(;N<B;){const W=p[N++],X=p[N++];try{F=W?W(F):F}catch(Y){if(!X){A=Promise.reject(Y);break}try{const M=X.call(this,Y);x.isThenable(M)&&(A=Promise.resolve(M).then(()=>rr.call(this,F)))}catch(M){A=Promise.reject(M)}break}}if(!A)try{A=rr.call(this,F)}catch(W){A=Promise.reject(W)}for(N=0,B=g.length;N<B;)A=A.then(g[N++],g[N++]);return A}getUri(s){s=bn(this.defaults,s);const c=Gh(s.baseURL,s.url,s.allowAbsoluteUrls,s);return Lh(c,s.params,s.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(s){yn.prototype[s]=function(c,r){return this.request(bn(r||{},{method:s,url:c,data:r&&x.hasOwnProp(r,"data")?r.data:void 0}))}});x.forEach(["post","put","patch","query"],function(s){function c(r){return function(m,y,p){return this.request(bn(p||{},{method:s,headers:r?{"Content-Type":"multipart/form-data"}:{},url:m,data:y}))}}yn.prototype[s]=c(),s!=="query"&&(yn.prototype[s+"Form"]=c(!0))});let pv=class $h{constructor(s){if(typeof s!="function")throw new TypeError("executor must be a function.");let c;this.promise=new Promise(function(m){c=m});const r=this;this.promise.then(f=>{if(!r._listeners)return;let m=r._listeners.length;for(;m-- >0;)r._listeners[m](f);r._listeners=null}),this.promise.then=f=>{let m;const y=new Promise(p=>{r.subscribe(p),m=p}).then(f);return y.cancel=function(){r.unsubscribe(m)},y},s(function(m,y,p){r.reason||(r.reason=new du(m,y,p),c(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const c=this._listeners.indexOf(s);c!==-1&&this._listeners.splice(c,1)}toAbortSignal(){const s=new AbortController,c=r=>{s.abort(r)};return this.subscribe(c),s.signal.unsubscribe=()=>this.unsubscribe(c),s.signal}static source(){let s;return{token:new $h(function(f){s=f}),cancel:s}}};function gv(l){return function(c){return l.apply(null,c)}}function bv(l){return x.isObject(l)&&l.isAxiosError===!0}const pr={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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCe Line truncated
@@ -1,4 +1,4 @@
import{c}from"./index-CkAjw-Zl.js";/**
import{c}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as e}from"./index-CkAjw-Zl.js";/**
import{c as e}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as e}from"./index-CkAjw-Zl.js";/**
import{c as e}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as a}from"./index-CkAjw-Zl.js";/**
import{c as a}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as e}from"./index-CkAjw-Zl.js";/**
import{c as e}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as e}from"./index-CkAjw-Zl.js";/**
import{c as e}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as a}from"./index-CkAjw-Zl.js";/**
import{c as a}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as e}from"./index-CkAjw-Zl.js";/**
import{c as e}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as o}from"./index-CkAjw-Zl.js";/**
import{c as o}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as o}from"./index-CkAjw-Zl.js";/**
import{c as o}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as a}from"./index-CkAjw-Zl.js";/**
import{c as a}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c}from"./index-CkAjw-Zl.js";/**
import{c}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as a}from"./index-CkAjw-Zl.js";/**
import{c as a}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c}from"./index-CkAjw-Zl.js";/**
import{c}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as e}from"./index-CkAjw-Zl.js";/**
import{c as e}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as a}from"./index-CkAjw-Zl.js";/**
import{c as a}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as a}from"./index-CkAjw-Zl.js";/**
import{c as a}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as a}from"./index-CkAjw-Zl.js";/**
import{c as a}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c as e}from"./index-CkAjw-Zl.js";/**
import{c as e}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
import{c}from"./index-CkAjw-Zl.js";/**
import{c}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -1,6 +1,6 @@
import{c as W,j as e,L as $,aE as A,bT as H,X as R,r as x,b as z}from"./index-CkAjw-Zl.js";/**
import{c as W,j as e,L as $,aE as A,bX as H,X as R,r as x,b as z}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const M=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],C=W("inbox",M),D=({title:s,description:a,icon:c,badge:n,actions:t})=>e.jsxs("header",{className:"page-header",children:[e.jsxs("div",{className:"page-header__identity",children:[c&&e.jsx("span",{className:"page-header__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-5 w-5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h1",{className:"page-title",children:s}),n]}),a&&e.jsx("p",{className:"page-description",children:a})]})]}),t&&e.jsx("div",{className:"page-actions",children:t})]}),F=({value:s,onChange:a,items:c,ariaLabel:n="页面分区"})=>e.jsx("div",{className:"page-tabs",role:"tablist","aria-label":n,children:c.map(t=>{const p=t.icon,m=s===t.id;return e.jsxs("button",{type:"button",role:"tab","aria-selected":m,onClick:()=>a(t.id),className:`page-tab ${m?"page-tab--active":""}`,children:[p&&e.jsx(p,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{children:t.label}),t.count!==void 0&&e.jsx("span",{className:"page-tab__count",children:t.count})]},t.id)})}),I=({title:s,description:a,icon:c,actions:n})=>e.jsxs("div",{className:"section-panel__header",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[c&&e.jsx("span",{className:"section-header__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"section-title",children:s}),a&&e.jsx("p",{className:"section-description",children:a})]})]}),n&&e.jsx("div",{className:"section-header__actions",children:n})]}),T=({type:s,message:a,onClose:c,children:n})=>{const t=s==="success"?A:H;return e.jsxs("div",{className:`notice-banner notice-banner--${s}`,role:"status",children:[e.jsx(t,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"min-w-0 flex-1",children:a??n}),c&&e.jsx("button",{type:"button",onClick:c,"aria-label":"关闭提示",children:e.jsx(R,{className:"h-4 w-4"})})]})},q=({title:s,description:a,icon:c=C,action:n,compact:t=!1})=>e.jsxs("div",{className:`empty-state ${t?"empty-state--compact":""}`,children:[e.jsx("span",{className:"empty-state__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-6 w-6"})}),e.jsx("h3",{children:s}),a&&e.jsx("p",{children:a}),n&&e.jsx("div",{className:"mt-4",children:n})]}),K=({label:s="正在加载"})=>e.jsxs("div",{className:"page-loading",role:"status",children:[e.jsx($,{className:"h-5 w-5 animate-spin"}),e.jsx("span",{children:s})]}),U=({open:s,onClose:a,trigger:c,placement:n="bottom",align:t="left",panelClassName:p="max-h-72 w-80",children:m,portal:h=!1})=>{const f=x.useRef(null),v=x.useRef(null),[j,L]=x.useState(null);x.useEffect(()=>{if(!s)return;const u=o=>{var i,l;const r=o.target;(i=f.current)!=null&&i.contains(r)||(l=v.current)!=null&&l.contains(r)||a()},d=o=>{o.key==="Escape"&&a()};return document.addEventListener("mousedown",u),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",d)}},[s,a]),x.useLayoutEffect(()=>{if(!s||!h)return;const u=()=>{var y,E,_;const r=(y=f.current)==null?void 0:y.getBoundingClientRect();if(!r)return;const i=8,l=((E=v.current)==null?void 0:E.offsetHeight)??0,w=((_=v.current)==null?void 0:_.offsetWidth)??0,N=window.innerHeight-r.bottom-i,b=r.top-i,k=(n==="top"?b>=l||b>=N?"top":"bottom":N>=l||N>=b?"bottom":"top")==="top"?r.top-l-i:r.bottom+i,P=t==="left"?Math.min(r.left,Math.max(i,window.innerWidth-w-i)):Math.max(i,Math.min(r.right-w,window.innerWidth-w-i));L({top:k,left:P,minWidth:r.width})};u();let d=0;const o=()=>{cancelAnimationFrame(d),d=requestAnimationFrame(u)};return window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{cancelAnimationFrame(d),window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0)}},[s,h,n,t,m]);const g=e.jsx("div",{ref:v,className:`overflow-y-auto rounded-lg border border-[var(--border)] bg-[var(--surface)] p-2 shadow-lg ${h?"fixed z-50":`absolute z-20 ${n==="top"?"bottom-8":"top-8"} ${t==="left"?"left-0":"right-0"}`} ${p}`,style:h&&j?{top:j.top,left:j.left,minWidth:j.minWidth}:void 0,children:m});return e.jsxs("div",{ref:f,className:"relative",children:[c,s&&(h?z.createPortal(g,document.body):g)]})};export{q as E,C as I,T as N,K as P,I as S,D as a,F as b,U as c};
*/const M=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],C=W("inbox",M),D=({title:s,description:a,icon:c,badge:n,actions:t})=>e.jsxs("header",{className:"page-header",children:[e.jsxs("div",{className:"page-header__identity",children:[c&&e.jsx("span",{className:"page-header__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-5 w-5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h1",{className:"page-title",children:s}),n]}),a&&e.jsx("p",{className:"page-description",children:a})]})]}),t&&e.jsx("div",{className:"page-actions",children:t})]}),F=({value:s,onChange:a,items:c,ariaLabel:n="页面分区"})=>e.jsx("div",{className:"page-tabs",role:"tablist","aria-label":n,children:c.map(t=>{const p=t.icon,m=s===t.id;return e.jsxs("button",{type:"button",role:"tab","aria-selected":m,onClick:()=>a(t.id),className:`page-tab ${m?"page-tab--active":""}`,children:[p&&e.jsx(p,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{children:t.label}),t.count!==void 0&&e.jsx("span",{className:"page-tab__count",children:t.count})]},t.id)})}),I=({title:s,description:a,icon:c,actions:n})=>e.jsxs("div",{className:"section-panel__header",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[c&&e.jsx("span",{className:"section-header__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"section-title",children:s}),a&&e.jsx("p",{className:"section-description",children:a})]})]}),n&&e.jsx("div",{className:"section-header__actions",children:n})]}),q=({type:s,message:a,onClose:c,children:n})=>{const t=s==="success"?A:H;return e.jsxs("div",{className:`notice-banner notice-banner--${s}`,role:"status",children:[e.jsx(t,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"min-w-0 flex-1",children:a??n}),c&&e.jsx("button",{type:"button",onClick:c,"aria-label":"关闭提示",children:e.jsx(R,{className:"h-4 w-4"})})]})},T=({title:s,description:a,icon:c=C,action:n,compact:t=!1})=>e.jsxs("div",{className:`empty-state ${t?"empty-state--compact":""}`,children:[e.jsx("span",{className:"empty-state__icon","aria-hidden":"true",children:e.jsx(c,{className:"h-6 w-6"})}),e.jsx("h3",{children:s}),a&&e.jsx("p",{children:a}),n&&e.jsx("div",{className:"mt-4",children:n})]}),X=({label:s="正在加载"})=>e.jsxs("div",{className:"page-loading",role:"status",children:[e.jsx($,{className:"h-5 w-5 animate-spin"}),e.jsx("span",{children:s})]}),K=({open:s,onClose:a,trigger:c,placement:n="bottom",align:t="left",panelClassName:p="max-h-72 w-80",children:m,portal:h=!1})=>{const f=x.useRef(null),v=x.useRef(null),[j,L]=x.useState(null);x.useEffect(()=>{if(!s)return;const u=o=>{var i,l;const r=o.target;(i=f.current)!=null&&i.contains(r)||(l=v.current)!=null&&l.contains(r)||a()},d=o=>{o.key==="Escape"&&a()};return document.addEventListener("mousedown",u),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",d)}},[s,a]),x.useLayoutEffect(()=>{if(!s||!h)return;const u=()=>{var y,E,_;const r=(y=f.current)==null?void 0:y.getBoundingClientRect();if(!r)return;const i=8,l=((E=v.current)==null?void 0:E.offsetHeight)??0,w=((_=v.current)==null?void 0:_.offsetWidth)??0,N=window.innerHeight-r.bottom-i,b=r.top-i,k=(n==="top"?b>=l||b>=N?"top":"bottom":N>=l||N>=b?"bottom":"top")==="top"?r.top-l-i:r.bottom+i,P=t==="left"?Math.min(r.left,Math.max(i,window.innerWidth-w-i)):Math.max(i,Math.min(r.right-w,window.innerWidth-w-i));L({top:k,left:P,minWidth:r.width})};u();let d=0;const o=()=>{cancelAnimationFrame(d),d=requestAnimationFrame(u)};return window.addEventListener("resize",o),window.addEventListener("scroll",o,!0),()=>{cancelAnimationFrame(d),window.removeEventListener("resize",o),window.removeEventListener("scroll",o,!0)}},[s,h,n,t,m]);const g=e.jsx("div",{ref:v,className:`overflow-y-auto rounded-lg border border-[var(--border)] bg-[var(--surface)] p-2 shadow-lg ${h?"fixed z-50":`absolute z-20 ${n==="top"?"bottom-8":"top-8"} ${t==="left"?"left-0":"right-0"}`} ${p}`,style:h&&j?{top:j.top,left:j.left,minWidth:j.minWidth}:void 0,children:m});return e.jsxs("div",{ref:f,className:"relative",children:[c,s&&(h?z.createPortal(g,document.body):g)]})};export{T as E,C as I,q as N,X as P,I as S,D as a,F as b,K as c};
@@ -1,4 +1,4 @@
import{c as a}from"./index-CkAjw-Zl.js";/**
import{c as a}from"./index-IP-mmLlr.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
+2 -2
View File
@@ -24,8 +24,8 @@
}
})();
</script>
<script type="module" crossorigin src="/static/assets/index-CkAjw-Zl.js"></script>
<link rel="stylesheet" crossorigin href="/static/assets/index-CFvjDKMG.css">
<script type="module" crossorigin src="/static/assets/index-IP-mmLlr.js"></script>
<link rel="stylesheet" crossorigin href="/static/assets/index-Dj620IsJ.css">
</head>
<body>
<div id="root"></div>