Peach: Local-first video metadata scraper and media manager.
feat(ui): 统一媒体库图标与列表视觉规范
longmeidao1953aba82a4e
diff --git a/README.en.md b/README.en.mdindex d8ae91f41..62a235c62 100644--- a/README.en.md+++ b/README.en.md@@ -42,7 +42,7 @@ Interface preferences are saved in the current browser and live under Settings:The interface uses Board styling. Select “Use classic UI” in Settings and apply with a refresh to use the classic interface. “Increase contrast” disables navigation transparency and refraction. Numeric preferences accept custom values within their supported ranges, with switches for optional features.-Choose a media library at the top of the sidebar; theme and settings controls are fixed at the bottom. Give folders a library name in Configuration to group matching names into one library. Library selection filters work lists and facets.+Choose a media library at the top of the sidebar; theme and settings controls are fixed at the bottom. Set library names and icons in Configuration; matching names group folders into one library. Library selection filters work lists and facets. Cloud libraries use locally served provider icons by default.“Remember me” uses this browser’s Security preference (1–365 days, default 30). Leaving it unchecked creates a browser session lasting at most 12 hours.diff --git a/README.md b/README.mdindex d357ed320..595e06a06 100644--- a/README.md+++ b/README.md@@ -42,7 +42,7 @@ Peach 是单用户、本地优先的个人媒体系统。在自己的电脑上界面采用 Board 风格。设置中可选择「使用旧版 UI」并应用刷新;「增加对比度」关闭导航玻璃的透明与折射。数量和时间支持范围内自定义,可关闭的功能使用开关控制。-侧栏顶部选择媒体库,底部切换明暗主题并打开设置。配置中给文件夹填写媒体库名称,同名文件夹归入一库;库选择限定作品列表与筛选项。+侧栏顶部选择媒体库,底部切换明暗主题并打开设置。配置中可设置媒体库名称和图标,同名文件夹归入一库;库选择限定作品列表与筛选项。网盘默认显示本机提供的网盘图标。登录页勾选「保持登录」时,使用此浏览器安全设置里的保持时间(1–365 天,默认 30 天)。不勾选时使用最长 12 小时的浏览器会话。diff --git a/docs/BOARD_UI.md b/docs/BOARD_UI.mdindex 5dcd48b8c..eb4d65211 100644--- a/docs/BOARD_UI.md+++ b/docs/BOARD_UI.md@@ -85,13 +85,15 @@ Charts 已核对 Stat Cards、Bar List、Radar、Radial,以及 Orders、Revenu## 验证记录-侧栏采用 AI chat 公开变体的分组标题、展开叶项与尾部计数:标题 14/20,计数 12/16、1×4 内边距、4px 圆角。媒体库入口适配公开 `DashboardUserMenu`:265px 面板、16px 圆角、10px 内边距,桌面右侧 8px、手机下方展开,150ms ease-out 淡入、缩放 .95 与 2px 模糊。收起时点击 Logo 展开侧栏,不保留空的选择行。设置固定在底部,与明暗开关并排;收起时明暗开关只显示目标主题图标。主题动画参考公开 `https://www.boardui.com/r/theme-toggle.json`:200ms 滑块与 820ms 柔边扩散,缓动 `cubic-bezier(.16,1,.3,1)`,减少动态效果时直接切换。+侧栏采用 AI chat 公开变体的分组标题、展开叶项与尾部计数;分组箭头位于右侧。媒体库入口适配公开 `DashboardUserMenu`:265px 面板、16px 圆角、10px 内边距,桌面右侧 8px、手机下方展开,150ms ease-out 淡入、缩放 .95 与 2px 模糊。独立按钮控制侧栏展开;媒体库图标打开选择面板,展开面板时入口显示轮廓。首页使用 24px Peach logo,收起态按钮为 36px 正方形。媒体库与导航图标统一 20px、1.7px 线宽,无图标底色。设置固定在底部,与明暗开关并排;收起时明暗开关只显示目标主题图标。主题动画参考公开 `https://www.boardui.com/r/theme-toggle.json`:200ms 滑块与 820ms 柔边扩散,缓动 `cubic-bezier(.16,1,.3,1)`,减少动态效果时直接切换。-媒体库使用 `[media.libraries]` 为声明路径命名,同名路径归为一库。库选择限定作品列表与筛选项;来源 ID、挂载映射和 ledger 路径保留其业务含义。统计、口味和维护任务仍按整个部署汇总。配置表单读写库名,预览只读,不保存真实配置。+媒体库使用 `[media.libraries]` 为声明路径命名,同名路径归为一库;`[media.library_icons]` 保存可选图标,自动模式按来源显示本地磁盘或本机提供的网盘图标。库选择限定作品列表与筛选项;来源 ID、挂载映射和 ledger 路径保留其业务含义。统计、口味和维护任务按整个部署汇总。预览只读,不保存真实配置。++颜色按 [Board Color](https://www.boardui.com/components/color) 的文字、背景、边框和交互角色映射;字阶按 [Typography](https://www.boardui.com/components/typography) 使用正文 14/20、紧凑 13/18、说明 12/16、标题 20/26 与页面标题 32/44。本机打包 Inter Variable。统计、口味、关注管理和配置使用对应结构的骨架;其它页面复用实体、海报与网格骨架的 Board 样式。关注来源列表每行 48px,选择与启用状态独立;最近观看标题单行中间省略并链接视频详情。详情使用并列观看进度卡与独立动作按钮;Esc 先退出详情、再收起侧栏。首页与实体页排序保持横向滚动,换批按钮沿用动画 SVG,采用中性 Board 按钮。-- 162 项前端测试通过,包含非法值不保存、关闭恢复、异步读取值恢复、图表数值、库名提交、分组展开记忆与可访问语义;构建与类型检查通过。+- 167 项前端测试通过,包含非法值不保存、关闭恢复、异步读取值恢复、图表数值、库名及图标提交、分组展开记忆、页面骨架与可访问语义;构建与类型检查通过。- 18984 直接服务正式工作树。桌面已检查设置、首页、详情、统计、口味、数据管理、关注管理、配置与复核;390×844 已检查设置、详情、标签与事务所索引,没有页面横向溢出。- 设置关闭图标中心偏差为 0;纯图标控件不覆盖工具栏业务显隐。旧版模式关闭 Board 样式,增加对比度时导航 `backdrop-filter` 为 `none`,退出两种状态均已核对。- 预览只读,未写真实 ledger、配置或凭据;脱盘状态下真实播放未验证。生产入口与版本号未改。diff --git a/docs/PRODUCT_BACKLOG.md b/docs/PRODUCT_BACKLOG.mdindex 124ce41ee..a69bb8b0a 100644--- a/docs/PRODUCT_BACKLOG.md+++ b/docs/PRODUCT_BACKLOG.md@@ -10,7 +10,7 @@统计与口味已接入 Stat Cards、独立实现的排名条、雷达与分布环;侧栏使用同一导航的 60/260px 宽窄态,手机从左侧滑入。设置滚动渐隐、手机输入字号、焦点环留白及登录保持时长已接入。业务进度的适配范围与不适用图表见 [Board 适配](BOARD_UI.md)。-侧栏底部固定设置和明暗开关,收起时 Logo 负责展开;媒体库入口采用侧向面板。路径可命名分组,库选择限定作品列表与筛选项;部署级统计、口味和维护任务仍保持全局。详情优先响应 Esc,手机排序栏可横向滚动。预览不保存真实配置。+侧栏底部固定设置和明暗开关,顶部独立按钮控制展开;媒体库图标负责打开选择面板,首页入口使用 Peach logo。路径可命名分组并选择图标,网盘默认图标由本机提供;库选择限定作品列表与筛选项。统计、口味和维护任务保持全局。关注提供作者分组与可多选的来源列表,最近观看标题可跳转视频。详情优先响应 Esc,手机排序栏可横向滚动。预览不保存真实配置。## 已有骨架、尚未完成(6 项)diff --git a/frontend/src/board-skeleton.ts b/frontend/src/board-skeleton.tsnew file mode 100644index 000000000..fa26355ac--- /dev/null+++ b/frontend/src/board-skeleton.ts@@ -0,0 +1,14 @@+/** 页面骨架复用首屏结构;装饰元素不进入辅助技术阅读序列。 */+export function boardPageSkeleton(path:string):string {+ const line=(width='60%')=>`<i class="skeleton" style="width:${width}"></i>`;+ const row=()=>`<div class="board-skeleton-row">${line('36%')}${line('24%')}</div>`;+ let body='';+ if(path==='/stats'||path==='/taste'){+ body=`${path==='/taste'?`<div class="board-skeleton-row">${line('26%')}${line('32%')}</div>`:''}<div class="metricstrip board-skeleton-metrics">${Array.from({length:4},()=>`<div class="tastesummary">${line()}<b class="skeleton"></b><small class="board-stat-footer">${line('48%')}</small></div>`).join('')}</div><div class="board-skeleton-chart"><div class="board-skeleton-ring skeleton"></div><div>${row().repeat(4)}</div></div><div class="board-skeleton-section">${line('32%')}${row().repeat(5)}</div>`;+ }else if(path==='/follow-manage'){+ body=`<div class="board-skeleton-section">${line('20%')}<div class="skeleton board-skeleton-input"></div>${line('72%')}</div><div class="board-skeleton-row">${line('24%')}${line('40%')}</div><div class="board-skeleton-section">${row().repeat(6)}</div><div class="board-skeleton-row">${line('30%')}${line('30%')}</div>`;+ }else if(path==='/configuration'){+ body=`<div class="board-skeleton-row">${line('16%').repeat(4)}</div><div class="board-skeleton-section">${line('24%')}${row().repeat(3)}<div class="skeleton board-skeleton-input"></div></div><div class="board-skeleton-section">${line('24%')}${row().repeat(2)}</div>`;+ }else return '';+ return `<div class="board-page-skeleton" data-skeleton="board${path}" role="status" aria-label="正在读取页面"><div aria-hidden="true">${body}</div></div>`;+}diff --git a/frontend/src/islands.ts b/frontend/src/islands.tsindex ce48faa1a..77c1063a2 100644--- a/frontend/src/islands.ts+++ b/frontend/src/islands.ts@@ -39,6 +39,7 @@ export { identityEvidenceHtml, reviewImageHtml, wireReviewPictures } from './revexport { createReviewSelection, wireReviewSelection, updateReviewSticky } from './review-bulk';export { nativeImageFit, matchesFaceSource } from './native-image';export { entitySkeletonHtml } from './entity-skeleton';+export { boardPageSkeleton } from './board-skeleton';export { catalogSuggestions, catalogEmptyHtml, emptyCatalogLayout } from './catalog-onboarding';export { syncSidebarSurface, sidebarTagCounts, sidebarHasCatalogContent } from './sidebar';export { cleanupSkeletonHtml, cloudLocations, cloudPreferenceLocations, tasteHistoryGuideHtml, wireTasteHistoryGuide, TASTE_GUIDE_KEY } from './management';diff --git a/frontend/src/islands/configuration.tsx b/frontend/src/islands/configuration.tsxindex c420ff8e5..4312f5b7d 100644--- a/frontend/src/islands/configuration.tsx+++ b/frontend/src/islands/configuration.tsx@@ -43,7 +43,7 @@ export interface ConfigurationData {/** 设置文件的指纹,保存时带回去,服务端据此拒绝盖掉别处的改动。 */revision: string;media_dirs: string[];- media_sources?: { location: string; root: string; path: string; online?: boolean; library?: string }[];+ media_sources?: { location: string; root: string; path: string; online?: boolean; library?: string; library_icon?: string }[];windows?: boolean;port: number;port_editable?: boolean;@@ -130,20 +130,21 @@ function MountStatus({ data }: { data: ConfigurationData }) {</div></section>;}-function MediaSourceSelect({ value, label, onChange }: { value: string; label: string; onChange(value: string): void }) {+function MediaSourceSelect({ value, label, onChange, libraryIcon=false }: { value: string; label: string; onChange(value: string): void; libraryIcon?: boolean }) {const mount = useRef<HTMLDivElement>(null);const control = useRef<HTMLElement & { value: string; disabled: boolean } | null>(null);const callback = useRef(onChange);callback.current = onChange;useLayoutEffect(() => {const root = mount.current!;- root.innerHTML = selectFieldHtml([['local', '本地磁盘'], ['115', 'CloudDrive · 115'], ['pikpak', 'CloudDrive · PikPak']].map(([kind, text]) => [kind!, text!, MEDIA_SOURCE_ICONS[kind!]!]), value, { label });+ const options=libraryIcon ? [['','自动识别'],['hard-drive','磁盘'],['database','资料库'],['heart','心形'],['star','星标'],['tags','标签'],['115','115'],['pikpak','PikPak']] : [['local', '本地磁盘'], ['115', 'CloudDrive · 115'], ['pikpak', 'CloudDrive · PikPak']];+ root.innerHTML = selectFieldHtml(options.map(([kind, text]) => [kind!, text!, MEDIA_SOURCE_ICONS[kind!] || kind || 'database']), value, { label });const field = wireSelectField(root.firstElementChild!);control.current = field;const change = () => callback.current(field.value);field.addEventListener('change', change);return () => { control.current = null; field.disabled = true; field.removeEventListener('change', change); root.replaceChildren(); };- }, [label]);+ }, [label,libraryIcon]);useLayoutEffect(() => { if (control.current) control.current.value = value; }, [value]);return <div ref={mount} class="configsourcecontrol" />;}@@ -154,6 +155,7 @@ function ConfigurationForm({ data, receipt }: { data: ConfigurationData; receiptconst [kinds, setKinds] = useState<string[]>(initial?.map((row) => row.location) ?? []);const [roots, setRoots] = useState<string[]>(initial?.map((row) => row.root) ?? []);const [libraries, setLibraries] = useState<string[]>(initial?.map((row) => row.library || '') ?? []);+ const [libraryIcons, setLibraryIcons] = useState<string[]>(initial?.map((row) => row.library_icon || '') ?? []);const [port, setPort] = useState(String(data.port));const [scanNow, setScanNow] = useState(false);const [rowErrors, setRowErrors] = useState<string[]>([]);@@ -190,6 +192,7 @@ function ConfigurationForm({ data, receipt }: { data: ConfigurationData; receiptsetKinds((list) => list.filter((_, i) => i !== index));setRoots((list) => list.filter((_, i) => i !== index));setLibraries((list) => list.filter((_, i) => i !== index));+ setLibraryIcons((list) => list.filter((_, i) => i !== index));setDirs((list) => list.filter((_, i) => i !== index));setRowErrors((errors) => errors.filter((_, i) => i !== index));};@@ -228,7 +231,7 @@ function ConfigurationForm({ data, receipt }: { data: ConfigurationData; receiptconst result = await apiSend<SaveResult>(CONFIGURATION_URL, {revision: revision.current,media_dirs: dirs,- ...(data.media_sources ? { media_sources: dirs.map((path, i) => ({ path, location: kinds[i] || 'local', root: roots[i] || '', library: libraries[i] || '' })) } : {}),+ ...(data.media_sources ? { media_sources: dirs.map((path, i) => ({ path, location: kinds[i] || 'local', root: roots[i] || '', library: libraries[i] || '', library_icon: libraryIcons[i] || '' })) } : {}),port,scan_now: scanNow,});@@ -296,6 +299,10 @@ function ConfigurationForm({ data, receipt }: { data: ConfigurationData; receipt<input class="geist-input" aria-label={`媒体库 ${index + 1}`} maxLength={80} value={libraries[index] || ''} placeholder="同名文件夹归入同一个媒体库"onInput={(event) => { const next = [...libraries]; next[index] = event.currentTarget.value; setLibraries(next); }} /></label>+ <div class="configsourcelabel">媒体库图标+ <MediaSourceSelect libraryIcon label={`媒体库图标 ${index + 1}`} value={libraryIcons[index] || ''}+ onChange={(value) => { const next = [...libraryIcons]; next[index] = value; setLibraryIcons(next); }} />+ </div><div class="configsourcelabel">媒体来源<MediaSourceSelect label={`媒体来源 ${index + 1}`} value={kinds[index] || 'local'}onChange={(value) => { const next = [...kinds]; next[index] = value; setKinds(next); }} />diff --git a/frontend/test/board-skeleton.test.ts b/frontend/test/board-skeleton.test.tsnew file mode 100644index 000000000..17da54caa--- /dev/null+++ b/frontend/test/board-skeleton.test.ts@@ -0,0 +1,18 @@+import { describe, expect, it } from 'vitest';+import { boardPageSkeleton } from '../src/board-skeleton';++describe('Board 页面骨架', () => {+ it.each(['/stats', '/taste', '/follow-manage', '/configuration'])('为 %s 提供单一等待语义', path => {+ const root = document.createElement('div');+ root.innerHTML = boardPageSkeleton(path);+ expect(root.querySelectorAll('[role="status"]')).toHaveLength(1);+ expect(root.querySelector('[aria-hidden="true"]')).not.toBeNull();+ expect(root.querySelectorAll('button, input, a')).toHaveLength(0);+ });+ it('统计预留四张指标卡,未知页面交给自身骨架', () => {+ const root = document.createElement('div');+ root.innerHTML = boardPageSkeleton('/stats');+ expect(root.querySelectorAll('.tastesummary')).toHaveLength(4);+ expect(boardPageSkeleton('/item/5')).toBe('');+ });+});diff --git a/frontend/test/configuration.test.tsx b/frontend/test/configuration.test.tsxindex 3f67e6154..2c702a395 100644--- a/frontend/test/configuration.test.tsx+++ b/frontend/test/configuration.test.tsx@@ -133,7 +133,7 @@ describe('媒体文件夹列表', () => {expect(el.textContent).not.toContain('Windows 中的对应路径');expect(el.textContent).not.toContain('挂载帮助');expect(el.querySelector('select')).toBeNull();- const select = el.querySelector<HTMLElement>('.gselect')!;+ const select = el.querySelector<HTMLElement>('.gselect:has([aria-label="媒体来源 1"])')!;select.dataset.value = '115'; select.dispatchEvent(new Event('change')); await settle();expect(el.textContent).toContain('挂载帮助');expect(el.textContent).not.toContain('macOS');@@ -167,7 +167,7 @@ describe('媒体文件夹列表', () => {const fetch = fetchMock(200, { saved: true, url: '/', revision: 'rev-2' });vi.stubGlobal('fetch', fetch);const { el } = mount({ windows: false, media_sources: [- { location: '115', root: 'B:\\', path: '/Volumes/115', online: false, library: '收藏' },+ { location: '115', root: 'B:\\', path: '/Volumes/115', online: false, library: '收藏', library_icon: 'heart' },{ location: 'pikpak', root: 'A:\\', path: '/Volumes/PikPak', online: true },] });expect(inputs(el).map((input) => input.value)).toEqual(['/Volumes/115', '/Volumes/PikPak']);@@ -176,8 +176,8 @@ describe('媒体文件夹列表', () => {submit(el); await settle();const body = JSON.parse(String(fetch.mock.calls[0]?.[1].body));expect(body.media_sources).toEqual([- { location: '115', root: 'B:\\', path: '/Volumes/115', library: '收藏' },- { location: 'pikpak', root: 'A:\\', path: '/Volumes/PikPak', library: '' },+ { location: '115', root: 'B:\\', path: '/Volumes/115', library: '收藏', library_icon: 'heart' },+ { location: 'pikpak', root: 'A:\\', path: '/Volumes/PikPak', library: '', library_icon: '' },]);});it('一行一个文件夹,只有一行时没有移除键', () => {diff --git a/package-lock.json b/package-lock.jsonindex ae5547dd9..751f427a8 100644--- a/package-lock.json+++ b/package-lock.json@@ -6,6 +6,7 @@"": {"name": "peach-web-vendor","devDependencies": {+ "@fontsource-variable/inter": "5.3.0","@phosphor-icons/core": "2.1.1","healthicons": "2.0.0","lucide-static": "1.40.0",@@ -27,6 +28,16 @@"node": ">=6.9.0"}},+ "node_modules/@fontsource-variable/inter": {+ "version": "5.3.0",+ "resolved": "https://registry.npmjs.org/@fontsource-variable/inter/-/inter-5.3.0.tgz",+ "integrity": "sha512-OupL48va4JNofb97w6NYeF9S7W/kHNKM0Er8Dem5nqi4jeOLrVJDoE8tZEpnMJmtkvNbB1EIPPwHcdkF6b1oUA==",+ "dev": true,+ "license": "OFL-1.1",+ "funding": {+ "url": "https://github.com/sponsors/ayuhito"+ }+ },"node_modules/@phosphor-icons/core": {"version": "2.1.1","resolved": "https://registry.npmjs.org/@phosphor-icons/core/-/core-2.1.1.tgz",diff --git a/package.json b/package.jsonindex 6a09e9c19..317f6db5d 100644--- a/package.json+++ b/package.json@@ -10,6 +10,7 @@"check:vendor": "node scripts/vendor_web_dependencies.mjs --check"},"devDependencies": {+ "@fontsource-variable/inter": "5.3.0","@phosphor-icons/core": "2.1.1","healthicons": "2.0.0","lucide-static": "1.40.0",diff --git a/scripts/test_runner.py b/scripts/test_runner.pyindex 0f0afa5e1..2e1c5b0c3 100644--- a/scripts/test_runner.py+++ b/scripts/test_runner.py@@ -113,6 +113,7 @@ SCOPE_TEST_IDS: dict[str, tuple[str, ...]] = {# 其余模块按「模块名 ↔ 测试文件名」推断(`media.py` → `test_media.py` → media)。# 仓库根的 Markdown 归 tooling:入口文件、README 与待办的门槛都在那个域里。AUTO_SCOPE_PREFIXES: tuple[tuple[str, str], ...] = (+ ("src/peach/media.py", "media"),("src/peach/desktop_startup.py", "tooling"),("src/peach/desktop_uninstall.py", "tooling"),("src/peach/peach_proxy.py", "tooling"),diff --git a/scripts/vendor_web_dependencies.mjs b/scripts/vendor_web_dependencies.mjsindex 9e17e85d4..6530c536d 100644--- a/scripts/vendor_web_dependencies.mjs+++ b/scripts/vendor_web_dependencies.mjs@@ -38,6 +38,14 @@ const copyPackageFiles = ({ packageName, vendorName, files, note }) => {`${hashes.join("\n")}\n\n${note}\n`);};+copyPackageFiles({+ packageName: "@fontsource-variable/inter",+ vendorName: "inter",+ files: [["index.css", "index.css"], ...readdirSync(join(root, "node_modules/@fontsource-variable/inter/files"))+ .filter(name => name.endsWith("-wght-normal.woff2")).map(name => [`files/${name}`, `files/${name}`])],+ note: "Board 界面使用 Inter 可变字体;中文由系统中文字体补齐。",+});+copyPackageFiles({packageName: "video.js",vendorName: "videojs",diff --git a/src/peach/media_configuration.py b/src/peach/media_configuration.pyindex f76f082ae..e20f9689f 100644--- a/src/peach/media_configuration.py+++ b/src/peach/media_configuration.py@@ -60,6 +60,7 @@ def rows(config, *, windows: bool, probe: bool = False) -> list[dict[str, Any]]:mount = root if windows else (mounts[index] if index < len(mounts) else "")result.append({"location": location, "root": root, "path": mount,"library": config.library_names.get(root) or PureWindowsPath(root).name or root,+ "library_icon": config.library_icons.get(root, ""),"online": platform.root_online(Path(mount)) if probe and mount else False})return resultdiff --git a/src/peach/media_libraries.py b/src/peach/media_libraries.pyindex 966d76591..b99207a71 100644--- a/src/peach/media_libraries.py+++ b/src/peach/media_libraries.py@@ -1,6 +1,8 @@"""媒体库按声明路径分组,来源与挂载仍由媒体配置管理。"""from pathlib import PureWindowsPath+LIBRARY_ICONS = frozenset({"hard-drive", "database", "heart", "star", "tags", "115", "pikpak"})+def libraries(config):groups = {}@@ -8,7 +10,12 @@ def libraries(config):for root in roots:name = config.library_names.get(root) or PureWindowsPath(root).name or rootgroups.setdefault(name, []).append({"location": location, "root": root})- return [{"id": name, "name": name, "roots": roots} for name, roots in groups.items()]+ icons = getattr(config, "library_icons", {})+ return [{"id": name, "name": name, "roots": roots,+ "icon": next((icons[item["root"]] for item in roots+ if icons.get(item["root"]) in LIBRARY_ICONS),+ roots[0]["location"] if len({item["location"] for item in roots}) == 1 else "database")}+ for name, roots in groups.items()]def predicate(config, library):diff --git a/src/peach/routes_api.py b/src/peach/routes_api.pyindex 1204cc3f8..473bccabd 100644--- a/src/peach/routes_api.py+++ b/src/peach/routes_api.py@@ -89,7 +89,7 @@ def source_health(request: Request, args: dict[str, str] = Depends(require_auth)@router.get("/api/libraries")def media_library_list(request: Request, args: dict[str, str] = Depends(require_auth)):from . import media_libraries, settings_file- return {"libraries": [{"id": row["id"], "name": row["name"], "folders": len(row["roots"])}+ return {"libraries": [{"id": row["id"], "name": row["name"], "icon": row["icon"], "folders": len(row["roots"])}for row in media_libraries.libraries(settings_file.active())]}diff --git a/src/peach/routes_configuration.py b/src/peach/routes_configuration.pyindex 79edfad49..8a9702cf7 100644--- a/src/peach/routes_configuration.py+++ b/src/peach/routes_configuration.py@@ -193,7 +193,7 @@ def _validate(body: dict[str, Any], config) -> tuple[dict[str, Any], dict[str, Alocations, mounts, problems = media_configuration.validate(body["media_sources"], windows=os.name == "nt")paths = []validated.update(locations=locations, mounts=mounts)- names = {}+ names, icons = {}, {}if not problems:for index, row in enumerate(body["media_sources"]):name = str(row.get("library", "")).strip()@@ -204,7 +204,16 @@ def _validate(body: dict[str, Any], config) -> tuple[dict[str, Any], dict[str, Aroot = str(media_configuration.PureWindowsPath(row["path"] if os.name == "nt" else row["root"]))if name:names[root] = name+ from .media_libraries import LIBRARY_ICONS+ glyph = str(row.get("library_icon", ""))+ if glyph and glyph not in LIBRARY_ICONS:+ problems = [""] * len(body["media_sources"])+ problems[index] = "请选择列表中的媒体库图标"+ break+ if glyph:+ icons[root] = glyphvalidated["library_names"] = names+ validated["library_icons"] = iconselse:paths, problems = onboarding.read_media_dirs(rows, validate=onboarding.media_dir_validator(windows=os.name == "nt"))@@ -329,6 +338,7 @@ def save_configuration(request: Request, body: dict[str, Any] = Body(default_facmounts["local"] = tuple(str(path) for path in paths)prepared = replace(config, locations=locations, mounts=mounts,library_names=validated.get("library_names", config.library_names),+ library_icons=validated.get("library_icons", config.library_icons),server=replace(config.server, port=validated["port"]))temporary = config.path.with_suffix(".pending.toml")try:diff --git a/src/peach/settings_file.py b/src/peach/settings_file.pyindex a44184992..8248f1d3b 100644--- a/src/peach/settings_file.py+++ b/src/peach/settings_file.py@@ -170,6 +170,7 @@ class PeachConfig:#: 与 `locations` 里的声明根一一对应。Windows 上通常为空:盘符本身就是挂载点。mounts: dict[str, tuple[str, ...]] = field(default_factory=dict)library_names: dict[str, str] = field(default_factory=dict)+ library_icons: dict[str, str] = field(default_factory=dict)#: `asset.location` -> 账本口径的声明根,至少一个。locations: dict[str, tuple[str, ...]] = field(default_factory=lambda: dict(DEFAULT_LOCATION_ROOTS))@@ -295,7 +296,7 @@ def _merge(raise _fail(path, "`directories` 里有不认识的键:" + "、".join(unknown))media = _table(document, "media", path)- stray = sorted(set(media) - {_LOCATIONS_KEY, _MOUNTS_KEY, "libraries"})+ stray = sorted(set(media) - {_LOCATIONS_KEY, _MOUNTS_KEY, "libraries", "library_icons"})if stray:# 第一阶段的 `[media] R = '/Volumes/RESOURCES'`。键空间从盘符换成了 location ID,# 把它当未知键忽略等于「所有来源都没挂」——整台机器安静地进脱盘模式。@@ -367,6 +368,7 @@ def _merge(data_root=data_root, path=path, present=present, data_root_found=found,directories=directories, mounts=mounts, locations=locations,library_names=_string_map(_table(media, "libraries", path), path, "media.libraries."),+ library_icons=_string_map(_table(media, "library_icons", path), path, "media.library_icons."),server=server, replication=replication,)return _apply_environment(config, environ)@@ -523,6 +525,8 @@ def render(config: PeachConfig) -> str:lines += _render_roots(dict(config.locations))lines += ["", "[media.libraries]"]lines += [f"{_render_value(root)} = {_render_value(name)}" for root, name in config.library_names.items()]+ lines += ["", "[media.library_icons]"]+ lines += [f"{_render_value(root)} = {_render_value(icon)}" for root, icon in config.library_icons.items()]lines += ["","[media.mounts]",diff --git a/tests/test_dependency_policy.py b/tests/test_dependency_policy.pyindex e10028b94..53e27b580 100644--- a/tests/test_dependency_policy.py+++ b/tests/test_dependency_policy.py@@ -81,7 +81,7 @@ class DependencyPolicyTests(unittest.TestCase):self.assertTrue(manifest["private"])versions = manifest["devDependencies"]self.assertEqual(set(versions), {"@phosphor-icons/core", "healthicons",- "lucide-static", "swiper", "video.js", "remixicon"})+ "lucide-static", "swiper", "video.js", "remixicon", "@fontsource-variable/inter"})for version in versions.values():self.assertRegex(version, r"^\d+\.\d+\.\d+$")diff --git a/tests/test_follow_web.py b/tests/test_follow_web.pyindex e20fc4f28..e5d291c32 100644--- a/tests/test_follow_web.py+++ b/tests/test_follow_web.py@@ -1736,14 +1736,14 @@ class FollowWebSourceTests(unittest.TestCase):self.assertIn("height:280px", author_rule)self.assertIn("border:1px solid var(--border-10)", author_rule)self.assertIn("grid-template-rows:auto minmax(0,1fr)", author_rule)- self.assertPageContains("scrollerHtml(group.map(followSourceRow).join(''),{")+ self.assertPageContains("scrollerHtml(sourceRows,{")self.assertPageContains("className:'fauthorsources',label:`${name} 的关注来源`")# 滚动条由 attachOverlayScrollbar() 统一自绘,这里只留出滑块那一档的右内边距。self.assertPageContains(".fauthorsources .geist-scroller-container{padding-right:12px}")self.assertPageContains("wireScrollers(root)")def test_source_actions_are_icon_only_and_stay_on_one_row(self):- row = self.page[self.page.index("function followSourceRow(source)"):]+ row = self.page[self.page.index("function followSourceRow(source,selectable=false)"):]row = row[:row.index("function followAliasManager")]self.assertIn("data-follow-check", row)self.assertIn("data-follow-remove", row)@@ -2128,11 +2128,11 @@ class FollowWebSourceTests(unittest.TestCase):self.assertPageContains(".fcred .ficon{margin-right:0}")self.assertIn('data-drop="self"', self.page)- def test_the_follow_list_has_a_compact_switch_that_puts_two_per_row(self):+ def test_the_follow_list_has_author_and_selectable_source_views(self):"""两个互斥视图用 Switch(共享 name 的 radio),不是 Toggle。"""self.assertPageContains(- "const FOLLOW_LAYOUTS=[['cozy','舒适 · 一行一个','maximize'],"- "['compact','紧凑 · 一行两个','layout-grid']]")+ "const FOLLOW_LAYOUTS=[['cozy','作者分组','layout-grid'],"+ "['compact','列表 · 一行一个来源','list-filter']]")self.assertPageContains("iconSwitchHtml('follow-layout','关注列表版式',FOLLOW_LAYOUTS,followListLayout()")self.assertPageContains("{attr:'data-follow-layout'}")@@ -2140,7 +2140,10 @@ class FollowWebSourceTests(unittest.TestCase):self.assertPageContains("wireIconSwitch(root,'data-follow-layout',setFollowListLayout)")# 版式是纯展示层的事:改容器上的一个属性就够,不重画列表,也不重新请求。self.assertPageContains('<div class="frows fsources" data-layout="${followListLayout()}">')- self.assertPageContains("node.dataset.layout=followListLayout()")+ self.assertPageContains("renderFollowManage(followCredentials)")+ self.assertPageContains("sources.map(source=>followSourceRow(source,true))")+ self.assertPageContains("group.map(source=>followSourceRow(source))")+ self.assertPageContains("button.disabled=!ids.length||!!followRuntime?.ledger_read_only")# 紧凑就是一行两个;半幅宽度放不下六列,见 test_compact_rows_keep_the_favicon…。self.assertPageContains('.fsources[data-layout="compact"]{grid-template-columns:repeat(2,minmax(0,1fr))}')diff --git a/tests/test_media_libraries.py b/tests/test_media_libraries.pyindex e75056243..fd8a6b9fb 100644--- a/tests/test_media_libraries.py+++ b/tests/test_media_libraries.py@@ -20,6 +20,15 @@ class MediaLibraryTests(unittest.TestCase):self.assertEqual(len(rows), 1)self.assertEqual(len(rows[0]["roots"]), 2)+ def test_library_icons_follow_source_or_explicit_selection(self):+ config = self.config()+ config.locations = {"pikpak": ("A:\\",)}+ self.assertEqual(media_libraries.libraries(config)[0]["icon"], "pikpak")+ config.library_icons = {"A:\\": "heart"}+ self.assertEqual(media_libraries.libraries(config)[0]["icon"], "heart")+ config.library_icons = {"A:\\": "<script>"}+ self.assertEqual(media_libraries.libraries(config)[0]["icon"], "pikpak")+def test_filter_observes_source_and_directory_boundary(self):with sqlite3.connect(":memory:") as db:db.execute("CREATE TABLE asset (location TEXT, path TEXT)")@@ -37,8 +46,9 @@ class MediaLibraryTests(unittest.TestCase):self.assertEqual(tomllib.loads(line), {root: name})with TemporaryDirectory() as directory:config = settings_file.load_config(environ={"PEACH_DATA_ROOT": directory})- config = replace(config, library_names={root: name})+ config = replace(config, library_names={root: name}, library_icons={root: "star"})config.path.parent.mkdir(parents=True, exist_ok=True)config.path.write_text(settings_file.render(config), encoding="utf-8")loaded = settings_file.load_config(environ={"PEACH_DATA_ROOT": directory})self.assertEqual(loaded.library_names, {root: name})+ self.assertEqual(loaded.library_icons, {root: "star"})diff --git a/tests/test_web_ui.py b/tests/test_web_ui.pyindex 3985e23b3..0ab9b4257 100644--- a/tests/test_web_ui.py+++ b/tests/test_web_ui.py@@ -2521,7 +2521,7 @@ class WebUiSourceTests(unittest.TestCase):self.assertPageLacks(".insighttablerow:nth-child(odd)","分隔线变体不叠加隔栏异色")# 空态渲染在表格外面:留一张只有列头的空表等于让人对着两个列名找不存在的行。- self.assertPageContains("const table=(head,rows,empty)=>rows?")+ self.assertPageContains('class="board-watch-history"')self.assertPageContains("emptyStateHtml('history','还没有观看记录'")self.assertPageContains("emptyStateHtml('tags','还没有标签来源'")# 数字列 tabular numerals,各行数位对齐才好跨行比较。@@ -4853,8 +4853,8 @@ class WebUiSourceTests(unittest.TestCase):self.assertPageLacks("max-width:1440px")self.assertPageContains(".insightpage,.tastepage{width:min(1100px,100%);margin:0 auto")self.assertPageContains("metricTab('storage','使用空间'")- self.assertPageContains('class="insightdatatable"')- self.assertPageContains('<th>位置</th><th>已用</th><th>可用</th><th>使用率</th>')+ self.assertPageContains('class="board-volume-list"')+ self.assertPageContains('class="board-volume-values"')self.assertPageContains('class="insightranking"')self.assertPageContains("grid-template-columns:repeat(2,minmax(0,1fr))")self.assertPageContains("border-top:1px solid var(--line-soft);border-left:1px solid var(--line-soft);list-style:none")diff --git a/web/app.js b/web/app.jsindex 3e88596d5..92c3e7320 100644--- a/web/app.js+++ b/web/app.js@@ -1,6 +1,8 @@import { resourceScanHtml, boundedPreference, mountNumberSetting, syncNumberSetting, statCardBody, rankedChart, radarChart, distributionChart, jobProgressHtml, sidebarSectionHtml, wireSidebarGroups, transitionTheme } from './dist/peach-ui.js';import {$, ENTITY_ROUTES, LOC, ROUTE_ENTITIES, ROUTE_STATES, SITE_FAVICONS, STATE_LABELS, STATE_ROUTES, api, isAbort, mapLimit, brandIcon, entityPath, esc, faviconFallbackUrl, faviconUrl, linkHost, linkMarkUrl, fmtClock, fmtDur, fmtSize, foldName, icon, isCatalogPath, realDuration} from './js/core.js';import { faceFrame } from './js/face-frame.js';+import { MEDIA_SOURCE_ICONS } from './js/media-source-icons.js';+import { boardPageSkeleton } from './dist/peach-ui.js';import { imageFallbackAttrs, wireImageFallbacks } from './js/image-fallback.js';import { javDisplayName, javTitleHtml } from './js/jav-title.js';import { matchRoute, routeLabel } from './js/routes.js';@@ -265,6 +267,7 @@ const MANAGEMENT_PLACEHOLDERS={${pageSkeletonHtml('正在读取采集来源',{cards:true,count:4,fill:false,className:'cleanup-skeleton'})}</div>`,};const managementPlaceholder=path=>+ (localStorage.getItem('peach.legacy-ui')!=='true'&&boardPageSkeleton(path))||(MANAGEMENT_PLACEHOLDERS[path]||(()=>pageSkeletonHtml('正在读取页面')))();/* 顶部三层只属于首页。深链启动时先画一遍再由路由收起来,等于向管理页和索引页承诺了三条永远不会到货的横条。 */@@ -629,7 +632,7 @@ const SRCICON={local:icon('hard-drive'),'115':'<img class="source-icon" src="/logo?studio=115&variant=icon" alt="" data-drop="self">',// PikPak 官方触屏图标(取证 follow-source-icons-measured.md);/logo 的生成 logo 不对版。- pikpak:'<img class="source-icon" src="https://mypikpak.com/apple-touch-icon.png" alt="" loading="lazy" referrerpolicy="no-referrer" data-drop="self">',+ pikpak:`<img class="source-icon" src="${MEDIA_SOURCE_ICONS.pikpak}" alt="">`,online:icon('rss'),};const srcBadge=(loc,cost,cls)=>{const label=`${LOC[loc]||loc}${cost==='metered'?' · 计费':''}`;@@ -3160,7 +3163,7 @@ async function buildBars(){? facetData.creators.filter(item=>item.k!==context.name):facetData.creators;// 与窄栏共用 EDGE_ICONS —— 两边条目必须一致,抽屉不另写一份硬编码const navBtn=(k,label,ic)=>`<button data-nav="${k}" draggable="true" aria-pressed="${navOn(k)}">- ${icon(ic)}<span>${label}</span></button>`;+ ${navigationIcon(k,ic)}<span>${label}</span></button>`;$('#drawerScroll').innerHTML=`<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:10px"><b class="disp" style="font-size:15px;letter-spacing:.1em">导航与筛选</b>@@ -3365,25 +3368,23 @@ async function openStats(push=true){const locationRows=d.by_loc.map(row=>{const label=row.k==='online'?'已保存在线':(LOC[row.k]||row.k);return `<div class="insightbarrow"><div><span>${label}</span><b>${row.videos.toLocaleString()}</b></div>${progressHtml(`${label}:${row.videos.toLocaleString()} / ${totalVideos.toLocaleString()}`,row.videos,totalVideos)}<small>${gb(row.bytes)} · ${pct(row.videos,totalVideos)}%</small></div>`}).join('');- /* 一行都没有时整张表不出现,只留 Empty State:Geist Table 的判据是空态渲染在表格- 外面,留一张只有列头的空表等于让人对着两个列名找不存在的行。 */- const table=(head,rows,empty)=>rows?`<div class="insighttable"><div class="insighttablehead">${head.map(value=>`<span>${value}</span>`).join('')}</div>${rows}</div>`:empty;const tagsTable=d.top_tags.length?`<ol class="insightranking">${d.top_tags.map((t,index)=>`<li><button type="button" class="insightrankrow" data-k="${esc(t.k)}"><span class="insightrankpos">${index+1}</span><span>${esc(tagLabel(t.k))}</span><b>${t.n.toLocaleString()}</b></button></li>`).join('')}</ol>`:emptyStateHtml('tags','还没有内容标签','补全资料或添加标签后,这里会显示馆藏中的内容标签。');- const recentTable=table(['作品','观看证据'],d.recent.map(row=>{+ const recentTable=d.recent.length?`<div class="board-watch-history">${d.recent.map(row=>{const real=row.duration?Math.min(row.play_seconds/row.duration,1)*100:0;const reached=(row.max_reached||0)*100;const note=row.kind==='online'?'在线直接观看':(real<reached-25?'快进扫过':(row.o_count?`高潮 ${row.o_count}`:'正常观看'));- return `<div class="insighttablerow"><span>${esc((row.creator?row.creator+' · ':'')+row.name)}</span>- <b>真实 ${real.toFixed(0)}% · 到达 ${reached.toFixed(0)}% · ${note}</b></div>`}).join(''),- `<div class="insightempty">${emptyStateHtml('history','还没有观看记录','开始播放后,这里会显示最近的真实观看证据。')}</div>`);- const sourceTable=table(['标签来源','覆盖视频'],d.tag_source.map(row=>`<div class="insighttablerow"><span>${esc(row.k)}</span>- <b>${row.n.toLocaleString()} 条 · ${row.assets.toLocaleString()} 个视频</b></div>`).join(''),- `<div class="insightempty">${emptyStateHtml('tags','还没有标签来源','刮削或手动打标之后,这里会显示每个来源覆盖了多少视频。')}</div>`);- const storageTable=(d.storage_volumes||[]).length?`<table class="insightdatatable"><thead><tr><th>位置</th><th>已用</th><th>可用</th><th>使用率</th></tr></thead><tbody>${(d.storage_volumes||[]).map(row=>{+ return `<article class="board-watch-entry"><div><h3><a href="${row.kind==='online'?'/follow/item/':'/item/'}${Number(row.id)}" data-middle-truncate>${esc(row.name)}</a></h3><p>${esc(row.creator||'')}<span>${note}</span></p></div>+ <div class="board-watch-measures">${progressHtml(`真实观看 ${real.toFixed(0)}%`,real,100)}<small>真实 ${real.toFixed(0)}% · 到达 ${reached.toFixed(0)}%</small></div></article>`}).join('')}</div>`:+ `<div class="insightempty">${emptyStateHtml('history','还没有观看记录','开始播放后,这里会显示最近的真实观看证据。')}</div>`;+ const sourceTable=d.tag_source.length?`<div class="board-source-list">${d.tag_source.map(row=>`<article><header><h3>${esc(row.k)}</h3><b>${row.assets.toLocaleString()} <small>个视频</small></b></header>+ ${progressHtml(`${row.k} 覆盖视频`,row.assets,a.videos)}<small>${row.n.toLocaleString()} 条标签</small></article>`).join('')}</div>`:+ `<div class="insightempty">${emptyStateHtml('tags','还没有标签来源','刮削或手动打标之后,这里会显示每个来源覆盖了多少视频。')}</div>`;+ const storageTable=(d.storage_volumes||[]).length?`<div class="board-volume-list">${(d.storage_volumes||[]).map(row=>{const measured=row.total!=null, usedPct=measured?pct(row.used,row.total):0;- return `<tr><th scope="row"><span>${esc(row.label)}</span><small>${row.root?esc(row.root):'未映射'}</small></th><td>${measured?gb(row.used):'—'}</td><td>${measured?gb(row.free):'—'}</td><td>${measured?gaugeHtml(`${row.label}空间使用率`,row.used,row.total,{usage:true,compact:true})+usedPct+'%':(row.online?'容量未取得':'离线')}</td></tr>`}).join('')}</tbody></table>`+ return `<article><header><h3>${esc(row.label)}</h3><b>${measured?usedPct+'%':(row.online===false?'离线':'容量未取得')}</b></header><small>${row.root?esc(row.root):'未映射'}</small>+ ${measured?progressHtml(`${row.label}空间使用率`,row.used,row.total)+`<div class="board-volume-values"><span>已用 <b>${gb(row.used)}</b></span><span>可用 <b>${gb(row.free)}</b></span></div>`:''}</article>`}).join('')}</div>`:emptyStateHtml('hard-drive','还没有存储来源','添加媒体文件夹后,这里会显示存储空间。');$('#stats').innerHTML=`<div class="insightpage statsdashboard" data-stats-dashboard>@@ -3653,6 +3654,8 @@ function siteAvatar(name,domain,title=''){}const tasteRankRows=(rows,kind,empty='暂无足够证据',visual='')=>rows.length?rows.map((row,index)=>{const clickable=kind&&row.peach_items>0;+ const strength=Number(row.web_visits??row.score??row.visits??row.peach_items??0);+ const maximum=Math.max(1,...rows.map(item=>Number(item.web_visits??item.score??item.visits??item.peach_items??0)));const detail=row.web_visits!=null?`${row.web_visits?`浏览 ${row.web_visits}`:''}${row.web_visits&&row.peach_items?' · ':''}${row.peach_items?`Peach ${row.peach_items}`:''}`:`${Number(row.score||row.visits||0).toLocaleString()}`;@@ -3666,7 +3669,7 @@ const tasteRankRows=(rows,kind,empty='暂无足够证据',visual='')=>rows.lengt?siteAvatar(row.name,sourceDomain,`来源:${sourceDomain}`):visual?`<span class="tasteavatar">${avatarInner(row.name,ref,rep,visual)}</span>`:'';return `<${clickable?'button':'div'} class="tasterank${kind==='tag'?' tasterank-tag':''}${visual?' tasterank-visual':''}"${clickable?` data-taste-kind="${kind}" data-taste-name="${esc(row.name)}"`:''}>- <span class="tastepos mono">${index+1}</span>${media}<span><b>${esc(row.name)}</b><small>${esc(detail)}</small></span>+ <span class="tastepos mono">${index+1}</span>${media}<span class="taste-rank-copy"><b>${esc(row.name)}</b><small>${esc(detail)}</small><span class="taste-rank-track" aria-hidden="true"><i style="width:${Math.max(0,Math.min(100,strength/maximum*100))}%"></i></span></span>${clickable?icon('chevron-right'):''}</${clickable?'button':'div'}>`}).join(''):emptyStateHtml('search','暂无足够证据',empty);function openTasteSignal(kind,name){@@ -5491,8 +5494,10 @@ function followAuthorName(group){function followAuthorBlock(group){const name=followAuthorName(group);const bad=group.filter(s=>s.last_status==='error'||s.last_status==='unauthorized').length;- const sources=scrollerHtml(group.map(followSourceRow).join(''),{- className:'fauthorsources',label:`${name} 的关注来源`});+ const sourceRows=group.map(source=>followSourceRow(source)).join('');+ const sources=localStorage.getItem('peach.legacy-ui')==='true'+ ?scrollerHtml(sourceRows,{className:'fauthorsources',label:`${name} 的关注来源`})+ :`<div class="fauthorsources" aria-label="${esc(name)} 的关注来源">${sourceRows}</div>`;return `<div class="fauthor${bad?' bad':''}"><div class="fauthorhead">${followAuthorAvatar(group)}<b>${esc(name)}</b>@@ -5506,7 +5511,7 @@ function followAuthorBlock(group){${sources}</div>`;}-function followSourceRow(source){+function followSourceRow(source,selectable=false){const state=source.last_status||'未检查';const bad=state==='error'||state==='unauthorized';/* 状态用 Geist 的低饱和徽章(取证 vercel-geist-semantics-measured.md):@@ -5514,9 +5519,9 @@ function followSourceRow(source){const badge=state==='ok'?'ok':bad?'error':'none';const stateTitle=source.history_exhausted?'没有更多历史内容':state;return `<div class="frow fsource${bad?' bad':''}${source.enabled?'':' disabled'}">- <label class="fchannelcheck" title="${source.enabled?'参与检查更新':'暂停检查更新'}">${checkboxHtml(+ ${selectable?`<label class="fchannelcheck">${checkboxHtml(`data-follow-select="${source.id}" ${followSourceSelection.has(source.id)?'checked':''} aria-label="选择 ${esc(source.label)}"`)}</label>`:`<label class="fchannelcheck" title="${source.enabled?'参与检查更新':'暂停检查更新'}">${checkboxHtml(`data-follow-enabled="${source.id}" ${source.enabled?'checked':''}`- +` aria-label="${source.enabled?'暂停':'启用'} ${esc(source.label)} 的更新检查"`)}</label>+ +` aria-label="${source.enabled?'暂停':'启用'} ${esc(source.label)} 的更新检查"`)}</label>`}<b><a class="fsourcelink externallink" href="${esc(source.url)}" target="_blank"rel="noreferrer noopener" title="打开原来源">${esc(source.label)}${icon('external-link','externalmark')}</a></b><span class="fmeta fprovider" title="${esc(source.provider_label)}">${sourceIcon(source.provider)@@ -5616,7 +5621,8 @@ function followCredentialRow(row){/* 关注列表版式。默认一行一个,来源行的六列都在;紧凑是一行两个,半幅宽度放不下六列,收掉「上次检查」——哪个站、成没成功、能不能点都还留着,时间是里面最不影响判断的一列。和 JAV 版式共用 iconSwitchHtml,只是 name 与选项不同。 */-const FOLLOW_LAYOUTS=[['cozy','舒适 · 一行一个','maximize'],['compact','紧凑 · 一行两个','layout-grid']];+const followSourceSelection=new Set();+const FOLLOW_LAYOUTS=[['cozy','作者分组','layout-grid'],['compact','列表 · 一行一个来源','list-filter']];function followListLayout(){return allowedSetting(appSettings.followLayout,FOLLOW_LAYOUTS.map(([k])=>k),'cozy');}@@ -5627,8 +5633,8 @@ function followLayoutButtons(){function setFollowListLayout(value){appSettings.followLayout=value;saveSettings();- // 版式是纯展示层的事:改容器上的一个属性就够,不重画列表,也不重新请求。- document.querySelectorAll('.fsources').forEach(node=>{node.dataset.layout=followListLayout()});+ // 版式复用已载入的来源,分别渲染作者分组和来源列表。+ renderFollowManage(followCredentials);}/* 版式判据来自 docs/reference-sources.json 的 vercel-report-design:@@ -5674,8 +5680,9 @@ function renderFollowManage(credentials){icon('refresh-cw')}检查全部</button><button class="fbtn" data-follow-view>${icon('rss')}去看更新</button></div>${followCheckReport?followCheckFailNote(followCheckReport):''}+ ${sources.length&&followListLayout()==='compact'?`<div class="board-follow-selection"><label>${checkboxHtml('data-follow-select-all aria-label="全选来源"')}全选</label><span data-follow-selected-count>已选 0</span><button class="fbtn" data-follow-check="" data-follow-sources="" data-follow-selection-action disabled>检查所选</button><button class="fbtn" data-follow-selection-enabled="true" data-follow-selection-action disabled>启用</button><button class="fbtn" data-follow-selection-enabled="false" data-follow-selection-action disabled>暂停</button></div>`:''}${sources.length?`<div class="frows fsources" data-layout="${followListLayout()}">${- followAuthorGroups(sources).map(followAuthorBlock).join('')}</div>+ followListLayout()==='compact'?`<div class="board-follow-list">${sources.map(source=>followSourceRow(source,true)).join('')}</div>`:followAuthorGroups(sources).map(followAuthorBlock).join('')}</div>${counts.new?`<div class="fsecfoot"><p class="fnote fbulkrow"><span class="fbulkcounts">未看 ${counts.new} · 已看 ${counts.seen||0}· 已保存 ${counts.saved||0} · 已忽略 ${counts.ignored||0}</span><span class="fbulk"><button class="fbtn" data-follow-bulk="seen">全部标记已看</button>@@ -5697,7 +5704,7 @@ function renderFollowManage(credentials){void wireFollowProgress();if(locked)$('#stats').querySelectorAll('#followAdd input,#followAdd button,[data-follow-remove],[data-follow-check],'+- '[data-follow-enabled],'++ '[data-follow-enabled],[data-follow-selection-enabled],'+'[data-follow-bulk],[data-follow-guess],[data-follow-alias-add],'+'[data-follow-alias-remove],#followAliasAdd input,#followAliasAdd button,[data-cred-form] input,'+'[data-cred-form] button,[data-cred-clear]'@@ -5773,6 +5780,29 @@ function wireFollowItems(){function wireFollowManage(creds=[]){void wireResolveProgress();const root=$('#stats'),form=root.querySelector('#followAdd');+ const selectable=[...root.querySelectorAll('[data-follow-select]')];+ const selectedIds=()=>selectable.filter(field=>field.checked).map(field=>Number(field.dataset.followSelect));+ const syncSelection=()=>{+ const ids=selectedIds(),count=root.querySelector('[data-follow-selected-count]');+ if(count)count.textContent=`已选 ${ids.length}`;+ const all=root.querySelector('[data-follow-select-all]');+ if(all){all.checked=ids.length>0&&ids.length===selectable.length;all.indeterminate=ids.length>0&&ids.length<selectable.length}+ root.querySelectorAll('[data-follow-selection-action]').forEach(button=>{button.disabled=!ids.length||!!followRuntime?.ledger_read_only;if(button.hasAttribute('data-follow-check'))button.dataset.followSources=ids.join(',')});+ selectable.forEach(field=>field.closest('.fsource').classList.toggle('selected',field.checked));+ };+ selectable.forEach(field=>field.onchange=()=>{const id=Number(field.dataset.followSelect);if(field.checked)followSourceSelection.add(id);else followSourceSelection.delete(id);syncSelection()});+ const selectAll=root.querySelector('[data-follow-select-all]');+ if(selectAll)selectAll.onchange=()=>{selectable.forEach(field=>{field.checked=selectAll.checked;const id=Number(field.dataset.followSelect);if(field.checked)followSourceSelection.add(id);else followSourceSelection.delete(id)});syncSelection()};+ root.querySelectorAll('[data-follow-selection-enabled]').forEach(button=>button.onclick=async()=>{+ const ids=selectedIds(),enabled=button.dataset.followSelectionEnabled==='true';if(!ids.length)return;+ setActionBusy(button);+ const results=await mapLimit(ids,4,id=>api('/api/follow/source',{method:'POST',body:JSON.stringify({action:'enabled',id,enabled})}));+ const failures=results.filter(result=>!result.ok);+ await openFollowManage(false);+ if(failures.length)actionFailure(`批量更新 ${failures.length}/${ids.length} 个来源`,failures[0].error);+ else actionReceipt(`已${enabled?'启用':'暂停'} ${ids.length} 个关注来源`);+ });+ syncSelection();wireScrollers(root);const sortField=root.querySelector('[data-follow-sort]');if(sortField)wireSelectField(sortField).addEventListener('change',()=>{@@ -7113,7 +7143,7 @@ function buildDrawerNavigation(){<b class="disp" style="font-size:15px;letter-spacing:.1em">导航与筛选</b><button id="drawerClose" class="ib" title="收起" aria-label="收起导航">${icon('x')}</button></div><div class="dnav">${orderedEdgeIcons().map(([k,label,ic])=>- `<button data-nav="${k}" draggable="true" aria-pressed="${navOn(k)}">${icon(ic)}<span>${label}</span></button>`).join('')}</div>`;+ `<button data-nav="${k}" draggable="true" aria-pressed="${navOn(k)}">${navigationIcon(k,ic)}<span>${label}</span></button>`).join('')}</div>`;$('#drawerClose').onclick=()=>openDrawer(false);scroll.querySelectorAll('[data-nav]').forEach(b=>b.onclick=()=>navTo(b.dataset.nav));wireNavigationDrag(scroll.querySelector('.dnav'));@@ -7156,6 +7186,7 @@ const EDGE_ICONS=[归右上角。三个名字都带「管」「设」的字,字形就得把它们分开。 */['manage','管理','wrench'],];+function navigationIcon(key,glyph){return key===''&&localStorage.getItem('peach.legacy-ui')!=='true'?'<img class="board-home-logo" src="/peach-logo.png" alt="">':icon(glyph)}/* 每个管理页的身份(标题、图标、可直达的 URL)。用户仍可在设置里把其中任何一个加到顶层侧栏,所以这里保留全部页面,不因为它进了数据管理就删掉。 */const MANAGE_SECTIONS=[@@ -7577,7 +7608,7 @@ function buildEdge(){buildDrawerNavigation();$('#edge').innerHTML=orderedEdgeIcons().map(([k,t,ic])=>`<button data-nav="${k}" draggable="true" title="${t}" aria-pressed="${navOn(k)}">- ${icon(ic)}</button>`).join('')+ ${navigationIcon(k,ic)}</button>`).join('');$('#edge').querySelectorAll('[data-loc]').forEach(b=>b.onclick=()=>{const cur=(state.loc||'').split(',').filter(Boolean);@@ -9103,17 +9134,20 @@ if(!legacyUI){document.body.append(libraryPicker);boardBrand.setAttribute('aria-haspopup','dialog');boardBrand.setAttribute('aria-controls',libraryPicker.id);boardBrand.insertAdjacentHTML('beforeend','<svg class="board-library-chevron" viewBox="0 0 16 16" aria-hidden="true"><path d="m5 6 3-3 3 3M5 10l3 3 3-3"/></svg>');- boardBrand.onclick=event=>{event.preventDefault();if(!document.querySelector('#drawer').classList.contains('open')){event.stopImmediatePropagation();openDrawer(true)}};+ boardBrand.onclick=event=>{event.preventDefault()};const floating=wireAnchoredMenu(document.querySelector('#drawer'),boardBrand,libraryPicker,{side:true});libraryPicker.addEventListener('toggle',event=>{if(event.newState==='open')libraryPicker.querySelector('button')?.focus()});libraryPicker.addEventListener('keydown',event=>{if(event.key==='Escape'){event.stopPropagation();floating.setOpen(false);boardBrand.focus()}});api('/api/libraries').then(data=>{- const choices=[['','全部媒体库'],...data.libraries.map(row=>[row.id,row.name])];+ const choices=[['','全部媒体库','database'],...data.libraries.map(row=>[row.id,row.name,row.icon||'database'])];const selected=sessionStorage.getItem('peach.library')||'';if(!choices.some(row=>row[0]===selected)){sessionStorage.removeItem('peach.library');location.reload();return}const current=sessionStorage.getItem('peach.library')||'';boardBrand.querySelector('h1').textContent=current||'全部媒体库';- libraryPicker.innerHTML=`<p>媒体库</p><div class="board-library-rows">${choices.map(([id,name],i)=>`<button type="button" data-library="${esc(id)}" aria-pressed="${id===current}"><span class="board-library-avatar" data-color="${i%3}">${esc(name.slice(0,1))}</span><span>${esc(name)}</span></button>`).join('')}</div><footer><button type="button" class="geist-button" data-library-manage>管理媒体库</button></footer>`;+ const libraryMark=glyph=>MEDIA_SOURCE_ICONS[glyph]?.startsWith('data:')?`<img src="${MEDIA_SOURCE_ICONS[glyph]}" alt="">`:icon(glyph==='local'?'hard-drive':glyph);+ const mark=document.createElement('span');mark.className='mark';mark.setAttribute('aria-hidden','true');+ mark.innerHTML=libraryMark(choices.find(row=>row[0]===current)?.[2]||'database');boardBrand.querySelector('.mark').replaceWith(mark);+ libraryPicker.innerHTML=`<p>媒体库</p><div class="board-library-rows">${choices.map(([id,name,glyph])=>`<button type="button" data-library="${esc(id)}" aria-pressed="${id===current}"><span class="board-library-avatar">${libraryMark(glyph)}</span><span>${esc(name)}</span></button>`).join('')}</div><footer><button type="button" class="geist-button" data-library-manage>管理媒体库</button></footer>`;libraryPicker.querySelectorAll('[data-library]').forEach(button=>button.onclick=()=>{sessionStorage.setItem('peach.library',button.dataset.library);location.assign('/')});libraryPicker.querySelector('[data-library-manage]').onclick=()=>{floating.setOpen(false);openDrawer(false);location.assign('/configuration')};}).catch(()=>{libraryPicker.hidden=true});@@ -9130,7 +9164,7 @@ function placeBrand(){if(legacyUI)return;const close=document.querySelector('#drawerClose');if(close){const head=close.parentElement;head.classList.add('board-sidebar-head');- boardBrand.setAttribute('aria-label',document.querySelector('#drawer').classList.contains('open')?'选择媒体库':'展开侧栏');+ boardBrand.setAttribute('aria-label','选择媒体库');wireSidebarGroups(document.querySelector('#drawerScroll'));const expanded=document.querySelector('#drawer').classList.contains('open'),desktop=innerWidth>760;if(desktop||expanded){if(boardToggle.parentElement!==head)head.append(boardToggle)}else if(boardToggle.parentElement!==toggleHome.parentElement)toggleHome.after(boardToggle);diff --git a/web/board.css b/web/board.cssindex dae2801e6..72faa0c41 100644--- a/web/board.css+++ b/web/board.css@@ -1,12 +1,13 @@+@import url('/vendor/inter/5.3.0/index.css');.settingscard .settingsscroll .sidebarsetting{padding:16px 12px 12px 0!important;margin:0!important}.settingscard .settingsscroll .settingsortcontrols>[hidden]{display:none}.board-optional-number{display:flex;align-items:center;gap:12px;flex-direction:row-reverse}.board-number-fields[hidden]{display:none}.board-number-control input::-webkit-inner-spin-button,.board-number-control input::-webkit-outer-spin-button{appearance:none;margin:0}.board-number-control input{appearance:textfield;-moz-appearance:textfield}.settingspanel.settingspanel{background:rgba(0,0,0,.7);backdrop-filter:none}.settingscard.settingscard{width:871px;max-width:calc(100vw - 32px);height:614px;max-height:calc(100dvh - 32px);border-radius:24px;grid-template-columns:274px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);overflow:clip;background:var(--page)}-.settingscard.settingscard>.board-local-nav{grid-column:1;grid-row:1/3;padding:10px;gap:4px;background:var(--ground)}+.settingscard.settingscard>.board-local-nav{grid-column:1;grid-row:1/3;display:flex;flex-direction:column;align-items:stretch;padding:10px;gap:4px;background:var(--ground);border:0}.settingscard.settingscard>.board-local-nav:before{content:'设置';font-size:13px;color:var(--muted);padding:4px 8px 8px}-.settingscard.settingscard>.board-local-nav button{padding:8px;border-radius:10px;font-size:14px;min-height:36px;font-weight:500}+.settingscard.settingscard>.board-local-nav button{flex:0 0 auto;justify-content:flex-start;padding:8px;border:0;border-radius:10px;font-size:14px;min-height:36px;font-weight:500}.settingscard.settingscard>.board-local-nav button{display:flex;align-items:center;gap:8px}.settingscard.settingscard>.board-local-nav button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;flex:none}.settingscard.settingscard>.board-local-nav button[aria-selected=true]{background:var(--picked);box-shadow:none}.settingscard.settingscard .settingshead{grid-column:2;grid-row:1;padding:32px 32px 12px;background:transparent;border:0}@@ -53,8 +54,8 @@ html.board-high-contrast .board-filter-frame.board-filter-frame.board-filter-fra:root{--board-card-foot:color-mix(in srgb,var(--ground) 92%,var(--ink))}.followmanage.followmanage{width:100%;max-width:1120px}.followmanage .fmain{width:100%;max-width:1120px;margin-inline:auto;gap:20px}-.followmanage .fmain>.fsec{border:1px solid var(--line);border-radius:18px;background:var(--ground);overflow:visible}-.followmanage .fmain>.fsec>.fsechead{background:var(--ground);padding:20px 24px;border:0;border-bottom:1px solid var(--line-soft);border-radius:18px 18px 0 0;min-height:68px}+.followmanage .fmain>.fsec{border:0;border-radius:18px;background:var(--ground);overflow:visible}+.followmanage .fmain>.fsec>.fsechead{background:transparent;padding:20px 24px 8px;border:0;border-radius:18px 18px 0 0;min-height:56px}.followmanage .fsechead h3{font-size:16px;font-weight:500;letter-spacing:0;line-height:24px}.followmanage .fmain>.fsec>.fsecfoot,.followmanage .fmain>.fsec>.fdesc,.followmanage .fmain>.fsec>.falias{background:var(--board-card-foot);border-top:1px solid var(--line-soft);border-radius:0 0 17px 17px;padding:16px 24px;margin:0}.configfieldset.configfieldset>.geist-fieldset-footer,.cleanupfieldset.cleanupfieldset>.geist-fieldset-footer{background:var(--board-card-foot)}@@ -110,7 +111,7 @@ body.drawer-open{--railW:296px}.top .brand .sub{display:none}/* Routed management navigation uses BoardUI's underline treatment. */-.managebar{display:block;width:calc(100% - 48px);max-width:var(--board-content);margin:20px auto 28px;padding:0;background:none;border:0;border-radius:0;overflow:visible}+.managebar{display:block;width:100%;max-width:var(--board-content);margin:20px auto 28px;padding:0;background:none;border:0;border-radius:0;overflow:visible}.managebar .managebar-toggle{display:none!important}.managebar .managebar-menu{display:flex!important;position:static;flex-direction:row;flex-wrap:nowrap;gap:4px;width:100%;padding:0;margin:0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;box-shadow:none;overflow-x:auto;scrollbar-width:none}.managebar .managebar-menu button{position:relative;display:inline-flex;flex:none;width:auto;align-items:center;gap:7px;padding:12px 10px;margin:0;min-height:44px;border:0;border-bottom:2px solid transparent;border-radius:0;background:none;color:var(--ink-2);font-size:14px;font-weight:400;white-space:nowrap}@@ -118,7 +119,7 @@ body.drawer-open{--railW:296px}.managebar .managebar-menu button[aria-pressed="true"]{background:none;color:var(--tungsten);border-bottom-color:var(--tungsten);font-weight:500}.managebar .managebar-menu button:hover{background:none;color:var(--ink)}.managebar .managebar-menu button[aria-pressed="true"]:hover{color:var(--tungsten)}-body.cleanup-layout #manageTitle,body.cleanup-layout #manageCrumb,body.cleanup-layout #manageLede,body.configuration-layout #manageTitle{max-width:var(--board-content);width:calc(100% - 48px);margin-left:auto;margin-right:auto}+body #manageTitle,body.cleanup-layout #manageCrumb,body.cleanup-layout #manageLede{max-width:var(--board-content);width:100%;margin-left:auto;margin-right:auto}#manageTitle{font-size:26px;line-height:34px;margin-bottom:24px}/* Task entry cards and editing panels have different information density. */@@ -327,11 +328,12 @@ button,input,select,textarea{font-family:inherit}.board-library-rows button{display:flex;align-items:center;gap:8px;padding:6px 8px;min-height:32px;border:0;border-radius:10px;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer}.board-library-rows button:hover,.board-library-rows button[aria-pressed=true]{background:var(--hover)}.board-library-avatar{display:grid;place-items:center;width:20px;height:20px;flex:none;border-radius:50%;background:var(--picked);font-size:12px;color:var(--muted)}+.board-library-avatar img,.board-library-avatar svg{width:20px;height:20px;object-fit:contain;fill:none;stroke:currentColor}.board-sidebar-head .mark{display:grid;place-items:center;border-radius:50%;background:var(--picked);color:var(--ink-2)}.board-sidebar-head .mark>svg,.board-sidebar-head .mark>img{width:24px;height:24px;object-fit:contain;fill:none;stroke:currentColor}.board-library-avatar[data-color="1"]{background:#bef264;color:#365314}.board-library-avatar[data-color="2"]{background:#fbcfe8;color:#9d174d}.board-library-rows button>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.board-library-menu footer{margin:14px -10px 0;padding:14px 18px 8px;border-top:1px solid var(--line)}.board-library-menu footer button{width:100%}-@media(min-width:761px){.drawer:not(.open) .board-sidebar-head #filterBtn,.drawer:not(.open) .board-library-chevron{display:none}.drawer:not(.open) .board-sidebar-head{min-height:32px;flex-direction:row;justify-content:center}.drawer:not(.open) #brandHome{justify-content:center;width:36px;gap:0}.drawer:not(.open) #brandHome .mark{width:28px;height:28px}}+@media(min-width:761px){.drawer:not(.open) .board-library-chevron{display:none}.drawer:not(.open) .board-sidebar-head{min-height:80px;flex-direction:column-reverse;justify-content:flex-end}.drawer:not(.open) .board-sidebar-head #filterBtn{display:grid;width:36px;height:36px}.drawer:not(.open) #brandHome{justify-content:center;flex:none;width:36px;height:36px;gap:0}.drawer:not(.open) #brandHome .mark{width:28px;height:28px}.drawer:not(.open) .dnav button{width:36px;height:36px;min-height:36px;padding:8px;justify-content:center}}@media(prefers-reduced-motion:reduce){.board-library-menu:popover-open{animation:none}}.board-sidebar-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;padding:12px}.board-sidebar-foot>#settingsBtn{width:36px;height:36px;padding:0;display:grid;place-items:center;border-radius:8px;background:transparent;flex:none}@@ -348,7 +350,12 @@ button,input,select,textarea{font-family:inherit}.drawer .sec[data-sidebar-group]>h3{margin:0 0 4px;letter-spacing:0;text-transform:none;color:var(--muted);font-size:14px;line-height:20px;font-weight:400;gap:4px}.board-section-toggle{display:flex;align-items:center;gap:8px;flex:1;min-width:0;padding:8px;border:0;border-radius:10px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.board-section-toggle:hover{background:var(--hover)}-.board-section-toggle svg{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;transform:rotate(0deg)}+.board-sidebar-head #brandHome[aria-expanded=true]{box-shadow:0 0 0 2px var(--line);border-radius:var(--pill-radius)}+.board-sidebar-head #brandHome .mark{display:grid;place-items:center;background:none;border-radius:0}.board-sidebar-head .mark svg,.board-library-avatar svg,.drawer .dnav button svg{width:20px;height:20px;stroke-width:1.7}.board-library-avatar{background:none;border-radius:0}.board-home-logo{width:24px;height:24px;object-fit:contain;flex:none}.drawer:not(.open) .dnav button:has(.board-home-logo){padding:6px}+.drawer.drawer .dnav button[aria-pressed=true]:hover,.drawer.drawer .dnav button[aria-pressed=true]:active{background:var(--board-blue);color:white;filter:brightness(1.08)}+.board-section-toggle>span{font-size:12px;line-height:20px;font-weight:500;color:var(--muted)}+.vwrap>.gate{box-sizing:border-box;border-radius:inherit}.stage .vwrap{overflow:hidden;border-radius:var(--surface-radius)}+.board-section-toggle svg{order:2;margin-left:auto;width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;transform:rotate(0deg)}.board-section-toggle[aria-expanded=true] svg{transform:rotate(90deg)}.drawer .sec:has(.board-section-toggle[aria-expanded=false]) [data-more]{display:none}.drawer .board-sidebar-body[hidden]{display:none}@@ -387,7 +394,7 @@ button,input,select,textarea{font-family:inherit}.metricstrip>button,.tastesummary{display:flex;flex-direction:column;min-width:0;padding:16px 0 0;border:0;border-radius:16px;background:var(--ground);overflow:hidden;text-align:left;box-shadow:0 1px 2px #00000008}.metricstrip>button[aria-selected=true]{background:var(--ground);box-shadow:inset 0 0 0 2px var(--tungsten)}.metricstrip>button:hover{background:var(--surface)}-.metricstrip>button[aria-selected=true]::after{display:none}+.metricstrip>button[aria-selected=true]::after{content:"";display:block;position:absolute;inset:0;height:auto;border:2px solid var(--tungsten);border-radius:inherit;background:none;pointer-events:none;z-index:1}.metricstrip>button:focus-visible{outline:2px solid var(--tungsten);outline-offset:3px}.metricstrip .board-stat-label,.tastesummary>.board-stat-label{display:flex;align-items:center;gap:8px;padding:0 16px;color:var(--ink-2);font-size:14px;line-height:20px}.board-stat-icon{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:linear-gradient(135deg,#3986ff25,#1760ef08);color:var(--tungsten);flex:none}@@ -409,3 +416,54 @@ button,input,select,textarea{font-family:inherit}.board-radar text{font-family:inherit;font-size:12px;fill:var(--muted);dominant-baseline:middle}@media(max-width:1000px){.metricstrip,.tastesummaries{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}@media(max-width:480px){.board-stat-label{padding-inline:12px;font-size:13px;gap:6px}.metricstrip>button .board-stat-value,.tastesummary>.board-stat-value{padding:12px;font-size:24px;line-height:34px}.metricstrip>button .board-stat-footer,.tastesummary>.board-stat-footer{padding:8px 12px}.board-stat-icon{width:24px;height:24px}}++/* 数据按阅读目的分组,标题与内容共享边缘。 */+.insightpage,.tastepage{width:100%;max-width:var(--board-content)}+.board-watch-history,.board-source-list,.board-volume-list{display:grid;gap:20px;min-width:0}+.board-watch-entry{display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,30%);align-items:center;gap:24px;padding:12px 0}+.board-watch-entry h3,.board-source-list h3,.board-volume-list h3{margin:0;font-size:14px;line-height:20px;font-weight:500;overflow-wrap:anywhere}+.board-watch-entry>div{min-width:0}.board-watch-entry h3 a{display:block;max-width:100%;overflow:hidden;white-space:nowrap;color:var(--ink);text-decoration:none}.board-watch-entry h3 a:hover{text-decoration:underline}+.board-watch-entry p{display:flex;gap:12px;flex-wrap:wrap;margin:4px 0 0;font-size:12px;color:var(--muted)}+.board-watch-measures small,.board-source-list small,.board-volume-list small{display:block;font-size:12px;line-height:18px;color:var(--muted);margin-top:6px;overflow-wrap:anywhere}+.board-source-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 32px}+.board-source-list header,.board-volume-list header{display:flex;justify-content:space-between;align-items:baseline;gap:12px}+.board-source-list header b,.board-volume-list header b{font-size:14px;font-weight:500;white-space:nowrap}+.board-source-list header small{display:inline;font-weight:400}+.board-volume-values{display:flex;justify-content:space-between;gap:12px;margin-top:8px;color:var(--muted);font-size:12px}+.board-volume-values b{color:var(--ink-2);font-weight:400}+.insightstorage{overflow:visible}.insightfacts{gap:12px}.insightfacts .kv,.insightfacts .kv:nth-child(odd),.insightfacts .kv:nth-child(-n+2){border:0;padding:12px;min-height:64px;display:flex;flex-direction:column;gap:6px;background:var(--surface);border-radius:10px}.insightfacts .kv b{font-size:20px;text-align:left;max-width:100%}.insightfacts::after{display:none}+.insightranking{border:0;gap:4px 24px}.insightrankrow{border:0;border-radius:8px}.insightrankrow>span:nth-child(2){white-space:normal;overflow-wrap:anywhere}+.tasteranks,.tasteranks-tags,.tasteranks-visual{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 28px}+.tasterank,.tasterank-tag{border:0;background:none;border-radius:10px;padding:12px 8px;min-height:72px;grid-template-columns:24px minmax(0,1fr) 16px;gap:12px}+.tasterank-visual{grid-template-columns:24px 36px minmax(0,1fr) 16px}.tasterank .tasteavatar{width:36px;height:36px}.tasterank b{font-size:14px;line-height:20px;font-weight:500;white-space:normal;overflow-wrap:anywhere}.tasterank small{white-space:normal;line-height:18px}.tasterank .taste-rank-copy{min-width:0}+.taste-rank-track{display:block;height:4px;margin-top:8px;background:var(--line-soft);border-radius:var(--pill-radius);overflow:hidden}.taste-rank-track i{display:block;height:100%;background:var(--tungsten);opacity:.55;border-radius:inherit}+.tasteleads>header{padding:24px 24px 12px}.tastelede{display:flex;flex-direction:column;gap:12px}.tasteleads .tastelede p{font-size:20px;line-height:30px;color:var(--ink);max-width:64ch}.tasteleads .insightpanelbody{padding:8px 24px 24px;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:28px}.tasteinsights{display:flex;flex-direction:column;gap:20px;margin:0}.tasteinsight{padding:0;background:none;gap:6px}.tasteinsight>b{font-weight:400;line-height:22px}.tasteleadlist{align-content:start}.tastelead{background:var(--surface);padding:14px}.tastesources .insightpanelbody>div{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.tastesource{border:0;background:var(--surface);padding:16px}+.followmanage .fmain{gap:28px}.followmanage .fmain>.fsec:has(.fsources){background:none}.followmanage .fmain>.fsec:has(.fsources)>.fsechead{padding:0 0 16px}.followmanage .fmain>.fsec>.fsources{padding:0;grid-template-columns:minmax(0,1fr);gap:16px}.followmanage .fmain>.fsec>.fsources[data-layout="compact"]{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}+.followmanage .fauthor{height:auto;padding:16px 20px;border:0;border-radius:16px;background:var(--ground);display:block}.followmanage .fauthorhead{padding:0 0 12px}.followmanage .fauthorhead b{font-weight:500;white-space:normal}.followmanage .fauthorsources{height:auto;max-height:none;overflow:visible}.followmanage .fauthor .fsource.frow{padding-block:12px;border:0}.followmanage .fauthor .fsource.frow>b{font-weight:400}.followmanage .fauthor .fsource.frow+.fsource.frow{border-top:1px solid var(--line-soft)}+.followmanage .fmain>.fsec:has(.fcred){background:none}.followmanage .fmain>.fsec:has(.fcred)>.fsechead{padding:0 0 12px}.followmanage .fmain>.fsec:has(.fcred)>.frows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px;padding:0}.followmanage .fcred{margin:0;padding:16px;border:0;border-radius:12px;background:var(--ground);min-width:0}.followmanage .fcred summary{padding:0;min-height:32px}.followmanage .fcred.none{min-height:64px}.followmanage .fcred p{overflow-wrap:anywhere}.followmanage .fmain>.fsec>.fdesc{background:none;border:0;padding:16px 0}+.configfieldset-heading{border:0;padding-bottom:0}.configfieldset{border:0}.configfieldset>.geist-fieldset-footer{border:0}.configfieldset .configfieldset-heading h2{margin:0}+#linkCheckResult:not(:empty),#resourceSyncResult:not(:empty){margin-block:16px 28px}+.followmanage .fauthor{container-type:inline-size}+.followmanage .fmain>.fsec>.fsources[data-layout="compact"]{display:block}.board-follow-list{display:grid;border-radius:16px;background:var(--ground);padding:8px 16px}.board-follow-list .fsource.frow{display:grid;grid-template-columns:22px minmax(0,1fr) auto auto auto auto;gap:12px;padding:8px;min-height:48px;border:0;border-radius:8px}.board-follow-list .fsource.frow>b{font-size:13px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400}.board-follow-list .fsource.selected{background:var(--picked);opacity:1}.board-follow-selection{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:0 0 12px;font-size:13px}.board-follow-selection>label{display:flex;gap:8px;align-items:center}.board-follow-selection>span{margin-right:auto;color:var(--muted)}+@media(max-width:760px){.board-follow-list{padding:8px}.board-follow-list .fsource.frow{grid-template-columns:20px minmax(0,1fr) auto;gap:4px 8px}.board-follow-list .fchannelcheck{grid-column:1;grid-row:1}.board-follow-list .fsource.frow>b{grid-column:2;grid-row:1}.board-follow-list .fprovider{grid-column:2;grid-row:2}.board-follow-list .fchecked{grid-column:2;grid-row:3}.board-follow-list .sbadge{grid-column:1;grid-row:2}.board-follow-list .fsourceactions{grid-column:3;grid-row:1/4}}+@container(max-width:520px){.followmanage .fauthor .fsource.frow{grid-template-columns:22px minmax(0,1fr) auto;gap:6px 10px}.followmanage .fsource>.fchannelcheck{grid-column:1;grid-row:1}.followmanage .fauthor .fsource.frow>b{grid-column:2;grid-row:1;white-space:normal;overflow-wrap:anywhere}.followmanage .fsource>.fsourceactions{grid-column:3;grid-row:1/3}.followmanage .fsource>.fprovider{grid-column:2;grid-row:2}.followmanage .fsource>.fchecked{grid-column:2;grid-row:3}.followmanage .fsource>.sbadge{grid-column:1;grid-row:2}.followmanage .fsource>.frowerr{grid-column:1/-1}}+@media(max-width:760px){body #manageTitle{width:100%}.board-watch-entry,.board-source-list,.tasteleads .insightpanelbody,.tasteranks,.tasteranks-tags,.tasteranks-visual,.tastesources .insightpanelbody>div{grid-template-columns:minmax(0,1fr)}.board-watch-entry{gap:8px}.tasteleads>header{padding:20px 16px 12px}.tasteleads .insightpanelbody{padding:8px 16px 20px}.followmanage .fmain>.fsec>.fsources[data-layout="compact"],.followmanage .fmain>.fsec:has(.fcred)>.frows{grid-template-columns:minmax(0,1fr)}.followmanage .fauthor{padding:16px}.followmanage .fsechead{gap:8px}.followmanage .fmanagesort{margin-left:0}}++/* Board 的语义色与复合字阶;图表和业务状态独立于交互强调色。 */+:root,:root[data-theme="light"]{--color-text-primary:#0a0a0a;--color-text-secondary:#737373;--color-text-tertiary:#a3a3a3;--color-background-full:#fff;--color-background-primary-default:#fff;--color-background-primary-hover:#f5f5f5;--color-background-secondary-default:#f5f5f5;--color-background-tertiary-default:#e5e5e5;--color-border-button-default:#e5e5e5;--color-border-button-hover:#d4d4d4;--color-separator-border:#e5e5e5;--color-border-focus-ring:#3b82f6;--color-text-white:#fff;--color-text-disabled:#d4d4d4;--board-blue:linear-gradient(180deg,#3b82f6,#155dfc);--board-blue-hover:linear-gradient(180deg,#60a5fa,#2563eb)}+:root[data-theme="dark"]{--color-text-primary:#fafafa;--color-text-secondary:#737373;--color-text-tertiary:#525252;--color-background-full:#121212;--color-background-primary-default:#262626;--color-background-primary-hover:#40404099;--color-background-secondary-default:#171717;--color-background-tertiary-default:#262626;--color-border-button-default:#404040;--color-border-button-hover:#737373;--color-separator-border:#262626;--color-text-disabled:#262626}+:root{--page:var(--color-background-full);--ground:var(--color-background-secondary-default);--surface:var(--color-background-primary-default);--sunk:var(--color-background-secondary-default);--ink:var(--color-text-primary);--ink-2:var(--color-text-secondary);--muted:var(--color-text-secondary);--line:var(--color-border-button-default);--line-soft:var(--color-separator-border);--picked:var(--color-background-tertiary-default);--inset:var(--color-background-tertiary-default);--hover:var(--color-background-primary-hover);--tungsten:var(--color-border-focus-ring);--chart-0:#2dd4bf;--chart-1:#a3e635;--chart-2:#f472b6;--chart-3:#38bdf8;--board-font:'Inter Variable','Inter','Segoe UI','Microsoft YaHei UI','PingFang SC',sans-serif;--board-body:400 14px/20px var(--board-font);--board-body-medium:500 14px/20px var(--board-font);--board-compact:400 13px/18px var(--board-font);--board-caption:400 12px/16px var(--board-font);--board-heading:500 20px/26px var(--board-font);--board-title:500 32px/44px var(--board-font);--board-figure:500 24px/34px var(--board-font)}+:root[data-theme]{--page:var(--color-background-full);--ground:var(--color-background-secondary-default);--surface:var(--color-background-primary-default);--sunk:var(--color-background-secondary-default);--ink:var(--color-text-primary);--ink-2:var(--color-text-secondary);--muted:var(--color-text-secondary);--line:var(--color-border-button-default);--line-soft:var(--color-separator-border);--picked:var(--color-background-tertiary-default);--inset:var(--color-background-tertiary-default);--hover:var(--color-background-primary-hover);--tungsten:var(--color-border-focus-ring)}+body,.disp{font-family:var(--board-font);letter-spacing:0}body{font:var(--board-body)}button,input,textarea,select{font-family:var(--board-font)}+.pagetitle,.listtitle,body #manageTitle,.index .ihead h2,.indexheading,.playlistpage h2{font:var(--board-title);letter-spacing:0}.settingscard .settingshead h2,.configfieldset h2,.configfieldset h3,.cleanupfieldset h3,.followmanage .fsechead h3{font:var(--board-heading);letter-spacing:0}.metricstrip>button .board-stat-value,.tastesummary>.board-stat-value{font:var(--board-figure);letter-spacing:0}.drawer .dnav button,.board-library-rows button,.settingrow b,.fsource.frow>b{font:var(--board-body)}.fmeta,.confighelp,.settingrow small{font:var(--board-compact)}.board-stat-footer,.board-watch-measures small,.tasterank small,.insighttoolbar p{font:var(--board-caption);letter-spacing:.15px}+.geist-button,.fbtn,.resourceaction{background-color:var(--color-background-primary-default);border-color:var(--color-border-button-default);color:var(--color-text-primary);transition:background-color .15s ease,border-color .15s ease,color .15s ease}+.geist-button:hover:not(:disabled),.fbtn:hover:not(:disabled),.resourceaction:hover:not(:disabled){background-color:var(--color-background-primary-hover);border-color:var(--color-border-button-hover);color:var(--color-text-primary)}+.geist-button.primary,.geist-button.primary:hover:not(:disabled),.tagselection button.primary,.tagselection button.primary:hover:not(:disabled){background:var(--board-blue);color:var(--color-text-white);transition:filter .15s ease}.geist-button.primary:hover:not(:disabled),.tagselection button.primary:hover:not(:disabled){filter:brightness(1.08)}+.drawer.drawer .dnav button[aria-pressed=true],.drawer.drawer .dnav button[aria-pressed=true]:hover{background:var(--board-blue);color:var(--color-text-white);transition:filter .15s ease}+.geist-button.danger:hover:not(:disabled),.fbtn.danger:hover:not(:disabled),.resourceaction.danger:hover:not(:disabled){background:var(--drop);color:#fff}+@media(max-width:760px){.pagetitle,.listtitle,body #manageTitle,.index .ihead h2,.indexheading{font:var(--board-figure)}input.geist-input,.configfield input,.geist-search input{font-size:16px}}++/* 每类骨架保留实际内容的列宽、轮廓和留白。 */+.board-page-skeleton{max-width:var(--board-content);width:100%;margin:auto}.board-page-skeleton>div{display:grid;gap:24px}.board-skeleton-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px}.board-skeleton-row .skeleton{height:14px;margin:0}.board-skeleton-section{display:grid;gap:16px;border-radius:16px;padding:24px;background:var(--ground)}.board-skeleton-input{height:40px}.board-skeleton-metrics{margin:0;gap:16px}.board-skeleton-metrics .tastesummary{height:152px;margin:0;gap:16px}.board-skeleton-metrics .skeleton{margin-left:16px;height:20px}.board-skeleton-metrics b.skeleton{width:45%;height:34px}.board-skeleton-metrics .board-stat-footer .skeleton{margin:0;height:14px}.board-skeleton-chart{display:grid;grid-template-columns:36% minmax(0,1fr);min-height:330px;gap:24px;align-items:center;padding:24px;border-radius:16px;background:var(--ground)}.board-skeleton-ring{width:160px;height:160px;border-radius:50%;margin:auto;mask:radial-gradient(circle,transparent 50%,#000 51%)}+.skeleton,.skeletoncard i,.skeletoncard b,.skeletoncard em,.skeletoncard s,.skeletoncard u{background:var(--color-background-tertiary-default);border-radius:8px}.skeletoncard i{border-radius:12px}.postercard-skeleton .skeletoncard{gap:6px 12px}.postercard-skeleton .skeletoncard s{border-radius:50%}.skeleton-cards>div{gap:24px 16px}.cleanup-skeleton .skeletoncard,.review-skeleton .skeletoncard{border:0;border-radius:16px}.cleanup-skeleton .skeletoncard i,.review-skeleton .skeletoncard i{border-radius:8px}.index-skeleton .icell .ring{border-radius:50%}.entityskeletontext .skeleton{height:20px;border-radius:8px}.entityportrait.skeleton{border-radius:16px}.follow-content-skeleton .skeletoncard{padding-bottom:16px}.skeletondashstrip{border:0;gap:16px;background:none}.skeletondashstrip>span{border:0;border-radius:16px;background:var(--ground);min-height:152px}.skeletondashhero,.skeletondashpanel{border:0;border-radius:16px}+@media(max-width:760px){.board-skeleton-chart{grid-template-columns:minmax(0,1fr)}.board-skeleton-section{padding:16px}.board-skeleton-row{gap:12px}.board-skeleton-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}diff --git a/web/css/20-offdisk.css b/web/css/20-offdisk.cssindex 0fa48ea8b..ef00b55f2 100644--- a/web/css/20-offdisk.css+++ b/web/css/20-offdisk.css@@ -1,8 +1,7 @@/* ── 脱盘模式 ────────────────────────────────────────────────────────────────来源盘不在时只置灰该来源的筛选,其余来源照常。数量仍然显示:账本是本机真相,脱的是盘不是记录。 ── */-.chip.offline{opacity:.42;cursor:not-allowed;text-decoration:line-through- color-mix(in srgb,var(--muted) 70%,transparent)}+.chip.offline{opacity:.42;cursor:not-allowed;text-decoration:none}.chip.offline .n{text-decoration:none}.gate.offline{cursor:default;border-style:solid;border-color:var(--meter);gap:7px}.gate.offline b{letter-spacing:.08em}diff --git a/web/dist/peach-ui.js b/web/dist/peach-ui.jsindex 355849488..b5f6fdf05 100644--- a/web/dist/peach-ui.js+++ b/web/dist/peach-ui.js@@ -1,21 +1,21 @@import { LOC as e, esc as t, faviconUrl as n, fmtDur as r, fmtSize as i, icon as a, requestErrorMessage as o } from "/js/core.js";import { MEDIA_SOURCE_ICONS as s, checkboxHtml as c, confirmModal as l, emptyStateHtml as u, fieldsetTitle as d, loadingDotsHtml as f, noteHtml as p, progressHtml as m, projectBannerHtml as h, selectFieldHtml as g, selectOptionIconHtml as _, setActionBusy as v, wireCollapse as y, wireSelectField as b } from "/js/ui-components.js";//#region node_modules/preact/dist/preact.module.js-var x, S, C, w, T, E, D, O, k, A, j, ee, M, te, N, P = {}, ne = [], re = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ie = Array.isArray;-function F(e, t) {+var x, S, C, w, T, E, D, O, k, A, j, ee, M, N, P, F = {}, te = [], ne = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, re = Array.isArray;+function I(e, t) {for (var n in t) e[n] = t[n];return e;}-function ae(e) {+function ie(e) {e && e.parentNode && e.parentNode.removeChild(e);}-function oe(e, t, n) {+function ae(e, t, n) {var r, i, a, o = {};for (a in t) a == "key" ? r = t[a] : a == "ref" ? i = t[a] : o[a] = t[a];if (arguments.length > 2 && (o.children = arguments.length > 3 ? x.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (a in e.defaultProps) o[a] === void 0 && (o[a] = e.defaultProps[a]);- return se(e, o, r, i, null);+ return oe(e, o, r, i, null);}-function se(e, t, n, r, i) {+function oe(e, t, n, r, i) {var a = {type: e,props: t,@@ -33,62 +33,62 @@ function se(e, t, n, r, i) {};return i == null && S.vnode != null && S.vnode(a), a;}-function I(e) {+function L(e) {return e.children;}-function ce(e, t) {+function se(e, t) {this.props = e, this.context = t;}-function L(e, t) {- if (t == null) return e.__ ? L(e.__, e.__i + 1) : null;+function R(e, t) {+ if (t == null) return e.__ ? R(e.__, e.__i + 1) : null;for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;- return typeof e.type == "function" ? L(e) : null;+ return typeof e.type == "function" ? R(e) : null;}-function le(e) {+function ce(e) {if (e.__P && e.__d) {- var t = e.__v, n = t.__e, r = [], i = [], a = F({}, t);- a.__v = t.__v + 1, S.vnode && S.vnode(a), be(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? L(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, Se(r, a, i), t.__e = t.__ = null, a.__e != n && ue(a);+ var t = e.__v, n = t.__e, r = [], i = [], a = I({}, t);+ a.__v = t.__v + 1, S.vnode && S.vnode(a), ye(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? R(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, xe(r, a, i), t.__e = t.__ = null, a.__e != n && le(a);}}-function ue(e) {+function le(e) {if ((e = e.__) != null && e.__c != null) return e.__e = e.__c.base = null, e.__k.some(function(t) {if (t != null && t.__e != null) return e.__e = e.__c.base = t.__e;- }), ue(e);+ }), le(e);}-function de(e) {- (!e.__d && (e.__d = !0) && T.push(e) && !fe.__r++ || E != S.debounceRendering) && ((E = S.debounceRendering) || D)(fe);+function ue(e) {+ (!e.__d && (e.__d = !0) && T.push(e) && !de.__r++ || E != S.debounceRendering) && ((E = S.debounceRendering) || D)(de);}-function fe() {+function de() {try {- for (var e, t = 1; T.length;) T.length > t && T.sort(O), e = T.shift(), t = T.length, le(e);+ for (var e, t = 1; T.length;) T.length > t && T.sort(O), e = T.shift(), t = T.length, ce(e);} finally {- T.length = fe.__r = 0;+ T.length = de.__r = 0;}}-function pe(e, t, n, r, i, a, o, s, c, l, u) {- var d, f, p, m, h, g, _ = r && r.__k || ne, v = t.length;- for (c = me(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || P, p.__i = d, g = be(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && Te(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = he(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), p.__u &= -7);+function fe(e, t, n, r, i, a, o, s, c, l, u) {+ var d, f, p, m, h, g, _ = r && r.__k || te, v = t.length;+ for (c = pe(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || F, p.__i = d, g = ye(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && we(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = me(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), p.__u &= -7);return n.__e = h, c;}-function me(e, t, n, r, i) {+function pe(e, t, n, r, i) {var a, o, s, c, l, u = n.length, d = u, f = 0;- for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = se(null, o, null, null, null) : ie(o) ? o = e.__k[a] = se(I, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = se(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = ge(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;- if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = L(s)), Ee(s, s));+ for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = oe(null, o, null, null, null) : re(o) ? o = e.__k[a] = oe(L, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = oe(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = he(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;+ if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = R(s)), Te(s, s));return r;}-function he(e, t, n) {+function me(e, t, n) {var r, i;if (typeof e.type == "function") {- for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = he(r[i], t, n));+ for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = me(r[i], t, n));return t;}- e.__e != t && (t && e.type && !t.parentNode && (t = L(e)), t = n.insertBefore(e.__e, t || null));+ e.__e != t && (t && e.type && !t.parentNode && (t = R(e)), t = n.insertBefore(e.__e, t || null));dot &&= t.nextSibling;while (t != null && t.nodeType == 8);return t;}-function ge(e, t, n, r) {+function he(e, t, n, r) {var i, a, o, s = e.key, c = e.type, l = t[n], u = l != null && !(2 & l.__u);if (l === null && s == null || u && s == l.key && c == l.type) return n;if (r > +!!u) {@@ -96,18 +96,18 @@ function ge(e, t, n, r) {}return -1;}-function _e(e, t, n) {- t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || re.test(t) ? n : n + "px";+function ge(e, t, n) {+ t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || ne.test(t) ? n : n + "px";}-function ve(e, t, n, r, i) {+function _e(e, t, n, r, i) {var a, o;n: if (t == "style") {if (typeof n == "string") e.style.cssText = n;else {- if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || _e(e.style, t, "");- if (n) for (t in n) r && n[t] == r[t] || _e(e.style, t, n[t]);+ if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || ge(e.style, t, "");+ if (n) for (t in n) r && n[t] == r[t] || ge(e.style, t, n[t]);}- } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(ee, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[j] = r[j] : (n[j] = M, e.addEventListener(t, a ? N : te, a)) : e.removeEventListener(t, a ? N : te, a);+ } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(ee, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[j] = r[j] : (n[j] = M, e.addEventListener(t, a ? P : N, a)) : e.removeEventListener(t, a ? P : N, a);else {if (i == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {@@ -117,7 +117,7 @@ function ve(e, t, n, r, i) {typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));}}-function ye(e) {+function ve(e) {return function(t) {if (this.l) {var n = this.l[t.type + e];@@ -127,47 +127,47 @@ function ye(e) {}};}-function be(e, t, n, r, i, a, o, s, c, l) {+function ye(e, t, n, r, i, a, o, s, c, l) {var u, d, f, p, m, h, g, _, v, y, b, x, C, w, T, E, D = t.type;if (t.constructor !== void 0) return null;128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = S.__b) && u(t);n: if (typeof D == "function") {d = o.length;try {- if (v = t.props, y = D.prototype && D.prototype.render, b = (u = D.contextType) && r[u.__c], x = u ? b ? b.props.value : u.__ : r, n.__c ? _ = (f = t.__c = n.__c).__ = f.__E : (y ? t.__c = f = new D(v, x) : (t.__c = f = new ce(v, x), f.constructor = D, f.render = De), b && b.sub(f), f.state || (f.state = {}), f.__n = r, p = f.__d = !0, f.__h = [], f._sb = []), y && f.__s == null && (f.__s = f.state), y && D.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = F({}, f.__s)), F(f.__s, D.getDerivedStateFromProps(v, f.__s))), m = f.props, h = f.state, f.__v = t, p) y && D.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), y && f.componentDidMount != null && f.__h.push(f.componentDidMount);+ if (v = t.props, y = D.prototype && D.prototype.render, b = (u = D.contextType) && r[u.__c], x = u ? b ? b.props.value : u.__ : r, n.__c ? _ = (f = t.__c = n.__c).__ = f.__E : (y ? t.__c = f = new D(v, x) : (t.__c = f = new se(v, x), f.constructor = D, f.render = Ee), b && b.sub(f), f.state || (f.state = {}), f.__n = r, p = f.__d = !0, f.__h = [], f._sb = []), y && f.__s == null && (f.__s = f.state), y && D.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = I({}, f.__s)), I(f.__s, D.getDerivedStateFromProps(v, f.__s))), m = f.props, h = f.state, f.__v = t, p) y && D.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), y && f.componentDidMount != null && f.__h.push(f.componentDidMount);else {if (y && D.getDerivedStateFromProps == null && v !== m && f.componentWillReceiveProps != null && f.componentWillReceiveProps(v, x), t.__v == n.__v || !f.__e && f.shouldComponentUpdate != null && !1 === f.shouldComponentUpdate(v, f.__s, x)) {t.__v != n.__v && (f.props = v, f.state = f.__s, f.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(e) {e && (e.__ = t);- }), ne.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = L(n);+ }), te.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = R(n);break n;}f.componentWillUpdate != null && f.componentWillUpdate(v, f.__s, x), y && f.componentDidUpdate != null && f.__h.push(function() {f.componentDidUpdate(m, h, g);});}- if (f.context = x, f.props = v, f.__P = e, f.__e = !1, C = S.__r, w = 0, y) f.state = f.__s, f.__d = !1, C && C(t), u = f.render(f.props, f.state, f.context), ne.push.apply(f.__h, f._sb), f._sb = [];+ if (f.context = x, f.props = v, f.__P = e, f.__e = !1, C = S.__r, w = 0, y) f.state = f.__s, f.__d = !1, C && C(t), u = f.render(f.props, f.state, f.context), te.push.apply(f.__h, f._sb), f._sb = [];else dof.__d = !1, C && C(t), u = f.render(f.props, f.state, f.context), f.state = f.__s;while (f.__d && ++w < 25);- f.state = f.__s, f.getChildContext != null && (r = F(F({}, r), f.getChildContext())), y && !p && f.getSnapshotBeforeUpdate != null && (g = f.getSnapshotBeforeUpdate(m, h)), T = u != null && u.type === I && u.key == null ? Ce(u.props.children) : u, s = pe(e, ie(T) ? T : [T], t, n, r, i, a, o, s, c, l), f.base = t.__e, t.__u &= -161, f.__h.length && o.push(f), _ && (f.__E = f.__ = null);+ f.state = f.__s, f.getChildContext != null && (r = I(I({}, r), f.getChildContext())), y && !p && f.getSnapshotBeforeUpdate != null && (g = f.getSnapshotBeforeUpdate(m, h)), T = u != null && u.type === L && u.key == null ? Se(u.props.children) : u, s = fe(e, re(T) ? T : [T], t, n, r, i, a, o, s, c, l), f.base = t.__e, t.__u &= -161, f.__h.length && o.push(f), _ && (f.__E = f.__ = null);} catch (e) {if (o.length = d, t.__v = null, c || a != null) {if (e.then) {for (t.__u |= c ? 160 : 128; s && s.nodeType == 8 && s.nextSibling;) s = s.nextSibling;a != null && (a[a.indexOf(s)] = null), t.__e = s;- } else if (a != null) for (E = a.length; E--;) ae(a[E]);+ } else if (a != null) for (E = a.length; E--;) ie(a[E]);} else t.__e = n.__e;- t.__k ??= n.__k || [], e.then || xe(t), S.__e(e, t, n);+ t.__k ??= n.__k || [], e.then || be(t), S.__e(e, t, n);}- } else a == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : s = t.__e = we(n.__e, t, n, r, i, a, o, c, l);+ } else a == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : s = t.__e = Ce(n.__e, t, n, r, i, a, o, c, l);return (u = S.diffed) && u(t), 128 & t.__u ? void 0 : s;}-function xe(e) {- e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(xe));+function be(e) {+ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(be));}-function Se(e, t, n) {- for (var r = 0; r < n.length; r++) Te(n[r], n[++r], n[++r]);+function xe(e, t, n) {+ for (var r = 0; r < n.length; r++) we(n[r], n[++r], n[++r]);S.__c && S.__c(t, e), e.some(function(t) {try {e = t.__h, t.__h = [], e.some(function(e) {@@ -178,11 +178,11 @@ function Se(e, t, n) {}});}-function Ce(e) {- return typeof e != "object" || !e || e.__b > 0 ? e : ie(e) ? e.map(Ce) : e.constructor === void 0 ? F({}, e) : null;+function Se(e) {+ return typeof e != "object" || !e || e.__b > 0 ? e : re(e) ? e.map(Se) : e.constructor === void 0 ? I({}, e) : null;}-function we(e, t, n, r, i, a, o, s, c) {- var l, u, d, f, p, m, h, g = n.props || P, _ = t.props, v = t.type;+function Ce(e, t, n, r, i, a, o, s, c) {+ var l, u, d, f, p, m, h, g = n.props || F, _ = t.props, v = t.type;if (v == "svg" ? i = "http://www.w3.org/2000/svg" : v == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i ||= "http://www.w3.org/1999/xhtml", a != null) {for (l = 0; l < a.length; l++) if ((p = a[l]) && "setAttribute" in p == !!v && (v ? p.localName == v : p.nodeType == 3)) {e = p, a[l] = null;@@ -196,15 +196,15 @@ function we(e, t, n, r, i, a, o, s, c) {if (v == null) g === _ || s && e.data == _ || (e.data = _);else {if (a = v == "textarea" && _.defaultValue != null ? null : a && x.call(e.childNodes), !s && a != null) for (g = {}, l = 0; l < e.attributes.length; l++) g[(p = e.attributes[l]).name] = p.value;- for (l in g) p = g[l], l == "dangerouslySetInnerHTML" ? d = p : l == "children" || l in _ || l == "value" && "defaultValue" in _ || l == "checked" && "defaultChecked" in _ || ve(e, l, null, p, i);- for (l in _) p = _[l], l == "children" ? f = p : l == "dangerouslySetInnerHTML" ? u = p : l == "value" ? m = p : l == "checked" ? h = p : s && typeof p != "function" || g[l] === p || ve(e, l, p, g[l], i);+ for (l in g) p = g[l], l == "dangerouslySetInnerHTML" ? d = p : l == "children" || l in _ || l == "value" && "defaultValue" in _ || l == "checked" && "defaultChecked" in _ || _e(e, l, null, p, i);+ for (l in _) p = _[l], l == "children" ? f = p : l == "dangerouslySetInnerHTML" ? u = p : l == "value" ? m = p : l == "checked" ? h = p : s && typeof p != "function" || g[l] === p || _e(e, l, p, g[l], i);if (u) s || d && (u.__html == d.__html || u.__html == e.innerHTML) || (e.innerHTML = u.__html), t.__k = [];- else if (d && (e.innerHTML = ""), pe(t.type == "template" ? e.content : e, ie(f) ? f : [f], t, n, r, v == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && L(n, 0), s, c), a != null) for (l = a.length; l--;) ae(a[l]);- s && v != "textarea" || (l = "value", v == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || v == "progress" && !m || v == "option" && m != g[l]) && ve(e, l, m, g[l], i), l = "checked", h != null && h != e[l] && ve(e, l, h, g[l], i));+ else if (d && (e.innerHTML = ""), fe(t.type == "template" ? e.content : e, re(f) ? f : [f], t, n, r, v == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && R(n, 0), s, c), a != null) for (l = a.length; l--;) ie(a[l]);+ s && v != "textarea" || (l = "value", v == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || v == "progress" && !m || v == "option" && m != g[l]) && _e(e, l, m, g[l], i), l = "checked", h != null && h != e[l] && _e(e, l, h, g[l], i));}return e;}-function Te(e, t, n) {+function we(e, t, n) {try {if (typeof e == "function") {var r = typeof e.__u == "function";@@ -214,9 +214,9 @@ function Te(e, t, n) {S.__e(e, n);}}-function Ee(e, t, n) {+function Te(e, t, n) {var r, i;- if (S.unmount && S.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || Te(r, null, t)), (r = e.__c) != null) {+ if (S.unmount && S.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || we(r, null, t)), (r = e.__c) != null) {if (r.componentWillUnmount) try {r.componentWillUnmount();} catch (e) {@@ -224,17 +224,17 @@ function Ee(e, t, n) {}r.base = r.__P = r.__n = null;}- if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && Ee(r[i], t, n || typeof e.type != "function");- n || ae(e.__e), e.__c = e.__ = e.__e = void 0;+ if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && Te(r[i], t, n || typeof e.type != "function");+ n || ie(e.__e), e.__c = e.__ = e.__e = void 0;}-function De(e, t, n) {+function Ee(e, t, n) {return this.constructor(e, n);}-function Oe(e, t, n) {+function De(e, t, n) {var r, i, a, o;- t == document && (t = document.documentElement), S.__ && S.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], be(t, e = (!r && n || t).__k = oe(I, null, [e]), i || P, P, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? x.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), Se(a, e, o), e.props.children = null;+ t == document && (t = document.documentElement), S.__ && S.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], ye(t, e = (!r && n || t).__k = ae(L, null, [e]), i || F, F, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? x.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), xe(a, e, o), e.props.children = null;}-x = ne.slice, S = { __e: function(e, t, n, r) {+x = te.slice, S = { __e: function(e, t, n, r) {for (var i, a, o; t = t.__;) if ((i = t.__c) && !i.__) try {if ((a = i.constructor) && a.getDerivedStateFromError != null && (i.setState(a.getDerivedStateFromError(e)), o = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, r || {}), o = i.__d), o) return i.__E = i;} catch (t) {@@ -243,22 +243,22 @@ x = ne.slice, S = { __e: function(e, t, n, r) {throw e;} }, C = 0, w = function(e) {return e != null && e.constructor === void 0;-}, ce.prototype.setState = function(e, t) {- var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = F({}, this.state);- typeof e == "function" && (e = e(F({}, n), this.props)), e && F(n, e), e != null && this.__v && (t && this._sb.push(t), de(this));-}, ce.prototype.forceUpdate = function(e) {- this.__v && (this.__e = !0, e && this.__h.push(e), de(this));-}, ce.prototype.render = I, T = [], D = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, O = function(e, t) {+}, se.prototype.setState = function(e, t) {+ var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = I({}, this.state);+ typeof e == "function" && (e = e(I({}, n), this.props)), e && I(n, e), e != null && this.__v && (t && this._sb.push(t), ue(this));+}, se.prototype.forceUpdate = function(e) {+ this.__v && (this.__e = !0, e && this.__h.push(e), ue(this));+}, se.prototype.render = L, T = [], D = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, O = function(e, t) {return e.__v.__b - t.__v.__b;-}, fe.__r = 0, k = Math.random().toString(8), A = "__d" + k, j = "__a" + k, ee = /(PointerCapture)$|Capture$/i, M = 0, te = ye(!1), N = ye(!0);+}, de.__r = 0, k = Math.random().toString(8), A = "__d" + k, j = "__a" + k, ee = /(PointerCapture)$|Capture$/i, M = 0, N = ve(!1), P = ve(!0);//#endregion//#region src/sort-preferences.ts-function ke(e, t, n) {+function Oe(e, t, n) {return e === "seed" ? "" : e === t && n === "asc" ? "asc" : "desc";}//#endregion//#region src/number-setting.ts-var Ae = {+var ke = {loginDaysSetting: {min: 1,max: 365,@@ -306,17 +306,17 @@ var Ae = {fallback: 60}};-function je(e, t, n, r) {+function Ae(e, t, n, r) {return Number.isInteger(e) && e >= t && e <= n ? e : r;}-function Me(e, t, n) {+function je(e, t, n) {let r = e.querySelector("input[type=number]"), i = e.querySelector("[role=switch]"), a = e.querySelector(".board-number-fields");r && (r.disabled = n, t !== null && t > 0 && (r.value = String(t))), i && (i.disabled = n, t !== null && (i.checked = t > 0)), a && t !== null && (a.hidden = t === 0);}-function Ne(e, t, n, r, i) {- let a = Ae[t];+function Me(e, t, n, r, i) {+ let a = ke[t];if (!a) return !1;- let { min: o, max: s, unit: c, optional: l, fallback: u } = a, d = `peach.number.${t}`, f = je(Number(localStorage.getItem(d)), o, s, r > 0 ? r : u), p = document.createElement("div");+ let { min: o, max: s, unit: c, optional: l, fallback: u } = a, d = `peach.number.${t}`, f = Ae(Number(localStorage.getItem(d)), o, s, r > 0 ? r : u), p = document.createElement("div");p.className = "board-optional-number";let m = document.createElement("div");m.className = "board-number-fields", m.hidden = !!l && r === 0;@@ -351,37 +351,37 @@ function Ne(e, t, n, r, i) {}//#endregion//#region src/board-metrics.ts-var R = (e) => String(e ?? "").replace(/[&<>"']/g, (e) => ({+var z = (e) => String(e ?? "").replace(/[&<>"']/g, (e) => ({"&": "&","<": "<",">": ">","\"": ""","'": "'"})[e]);-function Pe(e, t, n, r = "chart-no-axes-combined") {- return `<span class="board-stat-label"><span class="board-stat-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><use href="#i-${/^[a-z0-9-]+$/.test(r) ? r : "database"}"/></svg></span>${R(e)}</span><b class="board-stat-value">${R(t)}</b><small class="board-stat-footer">${R(n || "当前记录")}</small>`;+function Ne(e, t, n, r = "chart-no-axes-combined") {+ return `<span class="board-stat-label"><span class="board-stat-icon" aria-hidden="true"><svg viewBox="0 0 24 24"><use href="#i-${/^[a-z0-9-]+$/.test(r) ? r : "database"}"/></svg></span>${z(e)}</span><b class="board-stat-value">${z(t)}</b><small class="board-stat-footer">${z(n || "当前记录")}</small>`;}-function Fe(e, t, n) {+function Pe(e, t, n) {if (!Number.isFinite(n) || n <= 0) return "";let r = Math.max(0, Math.min(n, Number.isFinite(t) ? t : 0)), i = r / n * 100;- return `<div class="board-job-progress" role="progressbar" aria-label="${R(e)}" aria-valuemin="0" aria-valuemax="${n}" aria-valuenow="${r}"><svg width="36" height="36" viewBox="0 0 36 36" aria-hidden="true"><circle class="board-job-track" cx="18" cy="18" r="15"/><circle class="board-job-fill" cx="18" cy="18" r="15" pathLength="100" stroke-dasharray="${i} ${100 - i}" transform="rotate(-90 18 18)"/></svg><span>${R(e)}<small>${Math.round(i)}%</small></span></div>`;+ return `<div class="board-job-progress" role="progressbar" aria-label="${z(e)}" aria-valuemin="0" aria-valuemax="${n}" aria-valuenow="${r}"><svg width="36" height="36" viewBox="0 0 36 36" aria-hidden="true"><circle class="board-job-track" cx="18" cy="18" r="15"/><circle class="board-job-fill" cx="18" cy="18" r="15" pathLength="100" stroke-dasharray="${i} ${100 - i}" transform="rotate(-90 18 18)"/></svg><span>${z(e)}<small>${Math.round(i)}%</small></span></div>`;}-function Ie(e, t) {+function Fe(e, t) {let n = e.filter((e) => Number.isFinite(e.score) && e.score > 0), r = n.reduce((e, t) => e + t.score, 0);if (!r) return "";let i = 0, a = n.map((e, t) => {- let n = e.score / r * 100, a = `<circle cx="100" cy="100" r="72" pathLength="100" fill="none" stroke="var(--chart-${t % 4})" stroke-width="22" stroke-dasharray="${n} ${100 - n}" stroke-dashoffset="${-i}"><title>${R(e.name)}:${e.score.toLocaleString()}</title></circle>`;+ let n = e.score / r * 100, a = `<circle cx="100" cy="100" r="72" pathLength="100" fill="none" stroke="var(--chart-${t % 4})" stroke-width="22" stroke-dasharray="${n} ${100 - n}" stroke-dashoffset="${-i}"><title>${z(e.name)}:${e.score.toLocaleString()}</title></circle>`;return i += n, a;}).join("");- return `<svg class="board-distribution" viewBox="0 0 200 200" role="img" aria-label="${R(t)}"><g transform="rotate(-90 100 100)">${a}</g><text x="100" y="100" text-anchor="middle" dominant-baseline="middle">${R(t)}</text></svg>`;+ return `<svg class="board-distribution" viewBox="0 0 200 200" role="img" aria-label="${z(t)}"><g transform="rotate(-90 100 100)">${a}</g><text x="100" y="100" text-anchor="middle" dominant-baseline="middle">${z(t)}</text></svg>`;}-function Le(e, t) {+function Ie(e, t) {let n = e.filter((e) => Number.isFinite(e.score) && e.score > 0).slice().sort((e, t) => t.score - e.score).slice(0, 8);if (!n.length) return "";- let r = n[0].score, i = n.map((e) => `<li><span class="board-rank-fill" style="width:${(e.score / r * 100).toFixed(2)}%"></span><span>${R(e.name)}</span><b>${e.score.toLocaleString()}</b></li>`).join("");- return `<ol class="board-ranked-chart" aria-label="${R(t)}">${i}</ol>`;+ let r = n[0].score, i = n.map((e) => `<li><span class="board-rank-fill" style="width:${(e.score / r * 100).toFixed(2)}%"></span><span>${z(e.name)}</span><b>${e.score.toLocaleString()}</b></li>`).join("");+ return `<ol class="board-ranked-chart" aria-label="${z(t)}">${i}</ol>`;}-function Re(e, t) {+function Le(e, t) {let n = e.filter((e) => Number.isFinite(e.score) && e.score > 0).slice().sort((e, t) => t.score - e.score).slice(0, 6);if (n.length < 3) return "";let r = Math.max(...n.map((e) => e.score)), i = n.length, a = (e, t) => {@@ -394,25 +394,25 @@ function Re(e, t) {100].map((e) => `<polygon points="${o(() => e)}" class="board-radar-grid"/>`).join(""), c = n.map((e, t) => {let [n, r] = a(t, 116);- return `<text x="${n}" y="${r}" text-anchor="${n < 145 ? "end" : n > 175 ? "start" : "middle"}">${R(e.name)}</text>`;+ return `<text x="${n}" y="${r}" text-anchor="${n < 145 ? "end" : n > 175 ? "start" : "middle"}">${z(e.name)}</text>`;}).join("");- return `<svg class="board-radar" viewBox="0 0 320 280" role="img" aria-label="${R(t)}"><title>${R(n.map((e) => `${e.name} ${e.score}`).join(","))}</title>${s}<polygon points="${o((e) => n[e].score / r * 100)}" class="board-radar-value"/>${c}</svg>`;+ return `<svg class="board-radar" viewBox="0 0 320 280" role="img" aria-label="${z(t)}"><title>${z(n.map((e) => `${e.name} ${e.score}`).join(","))}</title>${s}<polygon points="${o((e) => n[e].score / r * 100)}" class="board-radar-value"/>${c}</svg>`;}//#endregion//#region src/sidebar-groups.ts-var ze = (e) => e.replace(/[&<>"']/g, (e) => ({+var Re = (e) => e.replace(/[&<>"']/g, (e) => ({"&": "&","<": "<",">": ">","\"": ""","'": "'"})[e]);-function Be(e, t, n = "", r = "") {+function ze(e, t, n = "", r = "") {if (!t) return "";let i = `sidebar-group-${encodeURIComponent(e)}`;- return `<section class="sec${r ? " cat-" + ze(r) : ""}" data-sidebar-group="${ze(e)}"><h3><button type="button" class="board-section-toggle" aria-expanded="true" aria-controls="${i}"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-chevron-right"/></svg><span>${ze(e)}</span></button>${n}</h3><div class="board-sidebar-body" id="${i}">${t}</div></section>`;+ return `<section class="sec${r ? " cat-" + Re(r) : ""}" data-sidebar-group="${Re(e)}"><h3><button type="button" class="board-section-toggle" aria-expanded="true" aria-controls="${i}"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-chevron-right"/></svg><span>${Re(e)}</span></button>${n}</h3><div class="board-sidebar-body" id="${i}">${t}</div></section>`;}-function Ve(e) {+function Be(e) {e.querySelectorAll("[data-sidebar-group]").forEach((e) => {if (e.dataset.sidebarWired) return;e.dataset.sidebarWired = "true";@@ -432,32 +432,32 @@ function Ve(e) {};});}-var He = !1;-async function Ue(e, t) {- if (He) return;+var Ve = !1;+async function He(e, t) {+ if (Ve) return;if (!document.startViewTransition || matchMedia("(prefers-reduced-motion: reduce)").matches) {t();return;}let n = e.getBoundingClientRect(), r = n.left + n.width / 2, i = n.top + n.height / 2, a = Math.hypot(Math.max(r, innerWidth - r), Math.max(i, innerHeight - i)) * 2.5, o = document.createElement("style");- o.textContent = `::view-transition-old(root){animation:none}::view-transition-new(root){mix-blend-mode:normal;mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%20100%22%3E%3Cdefs%3E%3Cfilter%20id%3D%22b%22%20x%3D%22-50%25%22%20y%3D%22-50%25%22%20width%3D%22200%25%22%20height%3D%22200%25%22%3E%3CfeGaussianBlur%20stdDeviation%3D%222%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2242%22%20fill%3D%22white%22%20filter%3D%22url(%23b)%22%2F%3E%3C%2Fsvg%3E");mask-repeat:no-repeat;animation:peach-theme-reveal 820ms cubic-bezier(.16,1,.3,1) both}@keyframes peach-theme-reveal{from{mask-position:${r}px ${i}px;mask-size:0px 0px}to{mask-position:${r - a / 2}px ${i - a / 2}px;mask-size:${a}px ${a}px}}`, He = !0, document.head.append(o);+ o.textContent = `::view-transition-old(root){animation:none}::view-transition-new(root){mix-blend-mode:normal;mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%20100%22%3E%3Cdefs%3E%3Cfilter%20id%3D%22b%22%20x%3D%22-50%25%22%20y%3D%22-50%25%22%20width%3D%22200%25%22%20height%3D%22200%25%22%3E%3CfeGaussianBlur%20stdDeviation%3D%222%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2242%22%20fill%3D%22white%22%20filter%3D%22url(%23b)%22%2F%3E%3C%2Fsvg%3E");mask-repeat:no-repeat;animation:peach-theme-reveal 820ms cubic-bezier(.16,1,.3,1) both}@keyframes peach-theme-reveal{from{mask-position:${r}px ${i}px;mask-size:0px 0px}to{mask-position:${r - a / 2}px ${i - a / 2}px;mask-size:${a}px ${a}px}}`, Ve = !0, document.head.append(o);try {await document.startViewTransition(t).finished;} catch {t();} finally {- o.remove(), He = !1;+ o.remove(), Ve = !1;}}//#endregion//#region src/api.ts-var We = class extends Error {+var Ue = class extends Error {status;body;constructor(e, t, n = null) {super(o(e, t)), this.name = "ApiError", this.status = t, this.body = n;}-}, Ge = (e) => {+}, We = (e) => {if (!e || typeof e != "object") return "";let t = e;for (let e of [@@ -469,8 +469,8 @@ var We = class extends Error {if (typeof n == "string" && n) return n;}return "";-}, z = (e) => o(e);-async function B(e, t) {+}, B = (e) => o(e);+async function V(e, t) {let n = await fetch(e, {headers: { Accept: "application/json" },credentials: "same-origin",@@ -479,10 +479,10 @@ async function B(e, t) {try {r = await n.json();} catch {}- if (!n.ok) throw new We(Ge(r) || `请求失败(${n.status})`, n.status);+ if (!n.ok) throw new Ue(We(r) || `请求失败(${n.status})`, n.status);return r;}-async function V(e, t, n = "POST", r) {+async function H(e, t, n = "POST", r) {let i = await fetch(e, {method: n,...r ? { signal: r } : {},@@ -496,29 +496,29 @@ async function V(e, t, n = "POST", r) {try {a = await i.json();} catch {}- if (!i.ok) throw new We(Ge(a) || `请求失败(${i.status})`, i.status, a);+ if (!i.ok) throw new Ue(We(a) || `请求失败(${i.status})`, i.status, a);return a;}//#endregion//#region node_modules/preact/hooks/dist/hooks.module.js-var Ke, H, qe, Je, Ye = 0, Xe = [], U = S, Ze = U.__b, Qe = U.__r, $e = U.diffed, et = U.__c, tt = U.unmount, nt = U.__;-function rt(e, t) {- U.__h && U.__h(H, e, Ye || t), Ye = 0;- var n = H.__H || (H.__H = {+var Ge, U, Ke, qe, Je = 0, Ye = [], W = S, Xe = W.__b, Ze = W.__r, Qe = W.diffed, $e = W.__c, et = W.unmount, tt = W.__;+function nt(e, t) {+ W.__h && W.__h(U, e, Je || t), Je = 0;+ var n = U.__H || (U.__H = {__: [],__h: []});return e >= n.__.length && n.__.push({}), n.__[e];}-function W(e) {- return Ye = 1, it(ft, e);+function G(e) {+ return Je = 1, rt(dt, e);}-function it(e, t, n) {- var r = rt(Ke++, 2);- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : ft(void 0, t), function(e) {+function rt(e, t, n) {+ var r = nt(Ge++, 2);+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : dt(void 0, t), function(e) {var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));- }], r.__c = H, !H.__f)) {+ }], r.__c = U, !U.__f)) {var i = function(e, t, n) {if (!r.__c.__H) return !0;var i = !1, o = r.__c.props !== e;@@ -534,112 +534,112 @@ function it(e, t, n) {}return !i || o;};- H.__f = !0;- var a = H.shouldComponentUpdate, o = H.componentWillUpdate;- H.componentWillUpdate = function(e, t, n) {+ U.__f = !0;+ var a = U.shouldComponentUpdate, o = U.componentWillUpdate;+ U.componentWillUpdate = function(e, t, n) {if (this.__e) {var r = a;a = void 0, i(e, t, n), a = r;}o && o.call(this, e, t, n);- }, H.shouldComponentUpdate = i;+ }, U.shouldComponentUpdate = i;}return r.__N || r.__;}-function G(e, t) {- var n = rt(Ke++, 3);- !U.__s && dt(n.__H, t) && (n.__ = e, n.u = t, H.__H.__h.push(n));-}function K(e, t) {- var n = rt(Ke++, 4);- !U.__s && dt(n.__H, t) && (n.__ = e, n.u = t, H.__h.push(n));+ var n = nt(Ge++, 3);+ !W.__s && ut(n.__H, t) && (n.__ = e, n.u = t, U.__H.__h.push(n));}-function q(e) {- return Ye = 5, at(function() {+function q(e, t) {+ var n = nt(Ge++, 4);+ !W.__s && ut(n.__H, t) && (n.__ = e, n.u = t, U.__h.push(n));+}+function J(e) {+ return Je = 5, it(function() {return { current: e };}, []);}-function at(e, t) {- var n = rt(Ke++, 7);- return dt(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;+function it(e, t) {+ var n = nt(Ge++, 7);+ return ut(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;}-function ot() {- for (var e; e = Xe.shift();) {+function at() {+ for (var e; e = Ye.shift();) {var t = e.__H;if (e.__P && t) try {- t.__h.some(lt), t.__h.some(ut), t.__h = [];+ t.__h.some(ct), t.__h.some(lt), t.__h = [];} catch (n) {- t.__h = [], U.__e(n, e.__v);+ t.__h = [], W.__e(n, e.__v);}}}-U.__b = function(e) {- H = null, Ze && Ze(e);-}, U.__ = function(e, t) {- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), nt && nt(e, t);-}, U.__r = function(e) {- Qe && Qe(e), Ke = 0;- var t = (H = e.__c).__H;- t && (qe === H ? (t.__h = [], H.__h = [], t.__.some(function(e) {+W.__b = function(e) {+ U = null, Xe && Xe(e);+}, W.__ = function(e, t) {+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), tt && tt(e, t);+}, W.__r = function(e) {+ Ze && Ze(e), Ge = 0;+ var t = (U = e.__c).__H;+ t && (Ke === U ? (t.__h = [], U.__h = [], t.__.some(function(e) {e.__N && (e.__ = e.__N), e.u = e.__N = void 0;- })) : (t.__h.some(lt), t.__h.some(ut), t.__h = [], Ke = 0)), qe = H;-}, U.diffed = function(e) {- $e && $e(e);+ })) : (t.__h.some(ct), t.__h.some(lt), t.__h = [], Ge = 0)), Ke = U;+}, W.diffed = function(e) {+ Qe && Qe(e);var t = e.__c;- t && t.__H && (t.__H.__h.length && (Xe.push(t) !== 1 && Je === U.requestAnimationFrame || ((Je = U.requestAnimationFrame) || ct)(ot)), t.__H.__.some(function(e) {+ t && t.__H && (t.__H.__h.length && (Ye.push(t) !== 1 && qe === W.requestAnimationFrame || ((qe = W.requestAnimationFrame) || st)(at)), t.__H.__.some(function(e) {e.u &&= (e.__H = e.u, void 0);- })), qe = H = null;-}, U.__c = function(e, t) {+ })), Ke = U = null;+}, W.__c = function(e, t) {t.some(function(e) {try {- e.__h.some(lt), e.__h = e.__h.filter(function(e) {- return !e.__ || ut(e);+ e.__h.some(ct), e.__h = e.__h.filter(function(e) {+ return !e.__ || lt(e);});} catch (n) {t.some(function(e) {e.__h &&= [];- }), t = [], U.__e(n, e.__v);+ }), t = [], W.__e(n, e.__v);}- }), et && et(e, t);-}, U.unmount = function(e) {- tt && tt(e);+ }), $e && $e(e, t);+}, W.unmount = function(e) {+ et && et(e);var t, n = e.__c;n && n.__H && (n.__H.__.some(function(e) {try {- lt(e);+ ct(e);} catch (e) {t = e;}- }), n.__H = void 0, t && U.__e(t, n.__v));+ }), n.__H = void 0, t && W.__e(t, n.__v));};-var st = typeof requestAnimationFrame == "function";-function ct(e) {+var ot = typeof requestAnimationFrame == "function";+function st(e) {var t, n = function() {- clearTimeout(r), st && cancelAnimationFrame(t), setTimeout(e);+ clearTimeout(r), ot && cancelAnimationFrame(t), setTimeout(e);}, r = setTimeout(n, 35);- st && (t = requestAnimationFrame(n));+ ot && (t = requestAnimationFrame(n));}-function lt(e) {- var t = H, n = e.__c;- typeof n == "function" && (e.__c = void 0, n()), H = t;+function ct(e) {+ var t = U, n = e.__c;+ typeof n == "function" && (e.__c = void 0, n()), U = t;}-function ut(e) {- var t = H;- e.__c = e.__(), H = t;+function lt(e) {+ var t = U;+ e.__c = e.__(), U = t;}-function dt(e, t) {+function ut(e, t) {return !e || e.length !== t.length || t.some(function(t, n) {return t !== e[n];});}-function ft(e, t) {+function dt(e, t) {return typeof t == "function" ? t(e) : t;}//#endregion//#region node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js-var pt = 0;+var ft = 0;Array.isArray;-function J(e, t, n, r, i, a) {+function Y(e, t, n, r, i, a) {t ||= {};var o, s, c = t;if ("ref" in c) for (s in c = {}, t) s == "ref" ? o = t[s] : c[s] = t[s];@@ -654,7 +654,7 @@ function J(e, t, n, r, i, a) {__e: null,__c: null,constructor: void 0,- __v: --pt,+ __v: --ft,__i: -1,__u: 0,__source: i,@@ -665,15 +665,15 @@ function J(e, t, n, r, i, a) {}//#endregion//#region src/islands/access-settings.tsx-function mt({ id: e, label: t, value: n, onInput: r, error: i, help: a, current: o = !1, disabled: s = !1 }) {- return /* @__PURE__ */ J("div", {+function pt({ id: e, label: t, value: n, onInput: r, error: i, help: a, current: o = !1, disabled: s = !1 }) {+ return /* @__PURE__ */ Y("div", {class: "configfield",children: [- /* @__PURE__ */ J("label", {+ /* @__PURE__ */ Y("label", {for: e,children: t}),- /* @__PURE__ */ J("input", {+ /* @__PURE__ */ Y("input", {id: e,class: "geist-input",type: "password",@@ -686,7 +686,7 @@ function mt({ id: e, label: t, value: n, onInput: r, error: i, help: a, current:"aria-invalid": !!i,"aria-describedby": i || a ? `${e}-hint` : void 0}),- i || a ? /* @__PURE__ */ J("p", {+ i || a ? /* @__PURE__ */ Y("p", {id: `${e}-hint`,class: i ? "configbad" : "confighelp",role: i ? "alert" : void 0,@@ -695,9 +695,9 @@ function mt({ id: e, label: t, value: n, onInput: r, error: i, help: a, current:]});}-function ht({ initial: e, receipt: t }) {- let [n, r] = W(e), [i, a] = W(""), [o, s] = W(""), [c, l] = W(""), [u, f] = W(!1), [m, h] = W(""), [g, _] = W({}), y = q(null), b = q(!1), x = q(null);- return /* @__PURE__ */ J("form", {+function mt({ initial: e, receipt: t }) {+ let [n, r] = G(e), [i, a] = G(""), [o, s] = G(""), [c, l] = G(""), [u, f] = G(!1), [m, h] = G(""), [g, _] = G({}), y = J(null), b = J(!1), x = J(null);+ return /* @__PURE__ */ Y("form", {class: "configfieldset","data-fieldset-type": u ? "warning" : void 0,onSubmit: async (e) => {@@ -710,7 +710,7 @@ function ht({ initial: e, receipt: t }) {}b.current = !0, v(x.current, !0);try {- let e = await V("/api/configuration/access", {+ let e = await H("/api/configuration/access", {revision: n.revision,action: u ? "disable" : "set",confirm_disable: u,@@ -720,8 +720,8 @@ function ht({ initial: e, receipt: t }) {});r(e), a(""), s(""), l(""), f(!1), _({}), t(e.mode === "open" ? "已关闭访问密码" : "已保存访问密码");} catch (e) {- let t = e instanceof We ? e.body : null, n = t?.errors || t?.detail?.errors;- n ? _(n) : h(z(e));+ let t = e instanceof Ue ? e.body : null, n = t?.errors || t?.detail?.errors;+ n ? _(n) : h(B(e));} finally {b.current = !1, v(x.current, !1);}@@ -729,34 +729,34 @@ function ht({ initial: e, receipt: t }) {"aria-labelledby": "accessTitle",noValidate: !0,ref: y,- children: [/* @__PURE__ */ J("div", {+ children: [/* @__PURE__ */ Y("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y("div", {class: "configfieldset-heading",- children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d("accessTitle", "访问密码") } }), /* @__PURE__ */ J("p", {+ children: [/* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: d("accessTitle", "访问密码") } }), /* @__PURE__ */ Y("p", {class: "confighelp",children: n.mode === "open" ? "未设置密码,能连接到 Peach 的设备可直接访问。" : n.mode === "legacy" ? "当前使用系统生成的访问口令。你可以设置自己的密码,或关闭登录要求。" : n.mode === "locked" ? "访问设置无法读取,请在本机检查配置文件。" : "已设置密码。新设备需要登录,保持登录时间在登录页选择。"})]}),- n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ J("label", {+ n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ Y("label", {class: "configcheck",- children: [/* @__PURE__ */ J("span", {+ children: [/* @__PURE__ */ Y("span", {class: "pcheck",- children: [/* @__PURE__ */ J("input", {+ children: [/* @__PURE__ */ Y("input", {type: "checkbox",checked: u,onChange: (e) => f(e.currentTarget.checked)- }), /* @__PURE__ */ J("span", {+ }), /* @__PURE__ */ Y("span", {"aria-hidden": "true",- children: /* @__PURE__ */ J("svg", {+ children: /* @__PURE__ */ Y("svg", {viewBox: "0 0 24 24",- children: /* @__PURE__ */ J("use", { href: "#i-check" })+ children: /* @__PURE__ */ Y("use", { href: "#i-check" })})})]- }), /* @__PURE__ */ J("span", { children: "关闭访问密码,允许能连接到 Peach 的设备直接访问" })]+ }), /* @__PURE__ */ Y("span", { children: "关闭访问密码,允许能连接到 Peach 的设备直接访问" })]}) : null,- n.mode === "password" ? /* @__PURE__ */ J(mt, {+ n.mode === "password" ? /* @__PURE__ */ Y(pt, {id: "access-current",label: "当前访问密码",value: i,@@ -764,7 +764,7 @@ function ht({ initial: e, receipt: t }) {error: g.current_password,current: !0}) : null,- n.mode === "locked" ? null : /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J(mt, {+ n.mode === "locked" ? null : /* @__PURE__ */ Y(L, { children: [/* @__PURE__ */ Y(pt, {id: "access-password",label: n.mode === "password" ? "新访问密码" : "设置访问密码",value: o,@@ -772,7 +772,7 @@ function ht({ initial: e, receipt: t }) {disabled: u,error: u ? void 0 : g.password,help: u ? "关闭访问密码时无需填写。" : "至少 8 个字符。保存后其他设备需要重新登录。"- }), /* @__PURE__ */ J(mt, {+ }), /* @__PURE__ */ Y(pt, {id: "access-confirm",label: "确认访问密码",value: c,@@ -780,19 +780,19 @@ function ht({ initial: e, receipt: t }) {disabled: u,error: u ? void 0 : g.confirmation})] }),- u && /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: p("保存后,能连接到 Peach 的设备将直接访问馆藏。", {+ u && /* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: p("保存后,能连接到 Peach 的设备将直接访问馆藏。", {variant: "warning",label: "访问范围"}) } }),- m ? /* @__PURE__ */ J("p", {+ m ? /* @__PURE__ */ Y("p", {class: "configbad",role: "alert",children: m}) : null]- }), n.mode === "locked" ? null : /* @__PURE__ */ J("div", {+ }), n.mode === "locked" ? null : /* @__PURE__ */ Y("div", {class: "geist-fieldset-footer",- children: [/* @__PURE__ */ J("p", { children: "保存后立即生效。" }), /* @__PURE__ */ J("button", {+ children: [/* @__PURE__ */ Y("p", { children: "保存后立即生效。" }), /* @__PURE__ */ Y("button", {class: "geist-button primary",type: "submit",ref: x,@@ -803,7 +803,7 @@ function ht({ initial: e, receipt: t }) {}//#endregion//#region src/islands/release-updates.tsx-var gt = /* @__PURE__ */ new Set([+var ht = /* @__PURE__ */ new Set(["downloading","verifying","extracting",@@ -811,21 +811,21 @@ var gt = /* @__PURE__ */ new Set(["restarting","installing"]);-function _t({ initial: e, initialJob: t }) {- let [n, r] = W(e), [i, a] = W(t || {+function gt({ initial: e, initialJob: t }) {+ let [n, r] = G(e), [i, a] = G(t || {state: "idle",progress: 0- }), [o, s] = W(""), c = q(null), u = q(!0), f = q(!1), h = q(null);- G(() => {- v(h.current, gt.has(i.state));- }, [i.state]), G(() => () => {+ }), [o, s] = G(""), c = J(null), u = J(!0), f = J(!1), h = J(null);+ K(() => {+ v(h.current, ht.has(i.state));+ }, [i.state]), K(() => () => {u.current = !1, c.current?.abort();}, []);let g = async () => {- let e = await V("/api/configuration/update-restart", {});+ let e = await H("/api/configuration/update-restart", {});u.current && a(e);};- G(() => {+ K(() => {i.state !== "ready" || f.current || (f.current = !0, l({title: "更新已准备好",body: `Peach ${i.version || ""} 将在重启后安装。`,@@ -833,11 +833,11 @@ function _t({ initial: e, initialJob: t }) {cancelLabel: "稍后",onConfirm: g}));- }, [i.state]), G(() => {- if (!gt.has(i.state)) return;+ }, [i.state]), K(() => {+ if (!ht.has(i.state)) return;let e = new AbortController(), t, n = 0, o = async () => {try {- let t = await B("/api/configuration/update-status", e.signal);+ let t = await V("/api/configuration/update-status", e.signal);e.signal.aborted || (a(t), n = 0, t.state === "complete" && r((e) => ({...e,current_version: t.version || e.current_version,@@ -854,14 +854,14 @@ function _t({ initial: e, initialJob: t }) {};}, [i.state]);let _ = async (e) => {- if (c.current || gt.has(i.state)) return;+ if (c.current || ht.has(i.state)) return;let t = new AbortController();c.current = t, f.current = !1, s(""), v(e, !0);try {- let e = await V("/api/configuration/update", {}, "POST", t.signal);+ let e = await H("/api/configuration/update", {}, "POST", t.signal);t.signal.aborted || a(e);} catch (e) {- t.signal.aborted || s(z(e));+ t.signal.aborted || s(B(e));} finally {c.current = null, v(e, !1);}@@ -870,53 +870,53 @@ function _t({ initial: e, initialJob: t }) {let n = new AbortController();c.current = n, v(t, !0), s("");try {- let e = await B("/api/configuration/updates", n.signal);+ let e = await V("/api/configuration/updates", n.signal);n.signal.aborted || r(e);} catch (t) {n.signal.aborted || (r({...e,state: "error"- }), s(z(t)));+ }), s(B(t)));} finally {c.current = null, v(t, !1);}};- return /* @__PURE__ */ J("section", {+ return /* @__PURE__ */ Y("section", {class: "configfieldset","data-geist-fieldset": !0,"aria-labelledby": "configUpdatesTitle",- children: [/* @__PURE__ */ J("div", {+ children: [/* @__PURE__ */ Y("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d("configUpdatesTitle", "检查更新") } }),- /* @__PURE__ */ J("dl", {+ /* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: d("configUpdatesTitle", "检查更新") } }),+ /* @__PURE__ */ Y("dl", {class: "configfacts",children: [- /* @__PURE__ */ J("dt", { children: "当前版本" }),- /* @__PURE__ */ J("dd", { children: n.current_version }),- /* @__PURE__ */ J("dt", { children: "安装方式" }),- /* @__PURE__ */ J("dd", { children: n.installation }),- /* @__PURE__ */ J("dt", { children: "更新通道" }),- /* @__PURE__ */ J("dd", { children: n.channel }),- /* @__PURE__ */ J("dt", { children: "最新版本" }),- /* @__PURE__ */ J("dd", { children: n.latest_version || (n.state === "unchecked" ? "尚未检查" : "未取得") })+ /* @__PURE__ */ Y("dt", { children: "当前版本" }),+ /* @__PURE__ */ Y("dd", { children: n.current_version }),+ /* @__PURE__ */ Y("dt", { children: "安装方式" }),+ /* @__PURE__ */ Y("dd", { children: n.installation }),+ /* @__PURE__ */ Y("dt", { children: "更新通道" }),+ /* @__PURE__ */ Y("dd", { children: n.channel }),+ /* @__PURE__ */ Y("dt", { children: "最新版本" }),+ /* @__PURE__ */ Y("dd", { children: n.latest_version || (n.state === "unchecked" ? "尚未检查" : "未取得") })]}),- n.state === "available" && !o ? /* @__PURE__ */ J("div", {+ n.state === "available" && !o ? /* @__PURE__ */ Y("div", {role: "status",dangerouslySetInnerHTML: { __html: p(n.message, { label: "有可用更新" }) }- }) : /* @__PURE__ */ J("p", {+ }) : /* @__PURE__ */ Y("p", {class: o || n.state === "error" ? "configbad" : "confighelp",role: o || n.state === "error" ? "alert" : "status",children: o || n.message}),- i.state === "idle" ? null : /* @__PURE__ */ J("div", {+ i.state === "idle" ? null : /* @__PURE__ */ Y("div", {"aria-live": "polite",- children: [/* @__PURE__ */ J("p", {+ children: [/* @__PURE__ */ Y("p", {class: i.state === "error" ? "configbad" : "confighelp",children: i.message- }), i.state === "error" ? null : /* @__PURE__ */ J(I, { children: [- /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: m("更新准备进度:下载、校验、解压、准备安装", i.progress, 100, { stops: [+ }), i.state === "error" ? null : /* @__PURE__ */ Y(L, { children: [+ /* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: m("更新准备进度:下载、校验、解压、准备安装", i.progress, 100, { stops: [{value: 65,label: "下载结束"@@ -930,34 +930,34 @@ function _t({ initial: e, initialJob: t }) {label: "准备安装"}] }) } }),- /* @__PURE__ */ J("p", {+ /* @__PURE__ */ Y("p", {class: "confighelp",children: ["下载 → 校验 → 解压 → 准备安装 · ", i.message]}),- /* @__PURE__ */ J("p", {+ /* @__PURE__ */ Y("p", {class: "confighelp",children: i.state === "downloading" && i.total ? `${((i.downloaded || 0) / 1048576).toFixed(1)} / ${(i.total / 1048576).toFixed(1)} MB` : `${i.progress}%`})] })]})]- }), /* @__PURE__ */ J("div", {+ }), /* @__PURE__ */ Y("div", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,children: [- /* @__PURE__ */ J("a", {+ /* @__PURE__ */ Y("a", {class: "geist-button externallink",href: n.release_url,target: "_blank",rel: "noreferrer",- children: ["查看发布页", /* @__PURE__ */ J("svg", {+ children: ["查看发布页", /* @__PURE__ */ Y("svg", {class: "externalmark",viewBox: "0 0 24 24","aria-hidden": "true",- children: /* @__PURE__ */ J("use", { href: "#i-external-link" })+ children: /* @__PURE__ */ Y("use", { href: "#i-external-link" })})]}),- i.state === "ready" ? /* @__PURE__ */ J("button", {+ i.state === "ready" ? /* @__PURE__ */ Y("button", {type: "button",class: "geist-button primary",onClick: () => {@@ -971,17 +971,17 @@ function _t({ initial: e, initialJob: t }) {},children: "重启安装"}) : null,- n.state === "available" && n.installation === "独立测试包" && i.state !== "ready" ? /* @__PURE__ */ J("button", {+ n.state === "available" && n.installation === "独立测试包" && i.state !== "ready" ? /* @__PURE__ */ Y("button", {ref: h,type: "button",class: "geist-button primary",onClick: (e) => _(e.currentTarget),children: "下载并安装"}) : null,- /* @__PURE__ */ J("button", {+ /* @__PURE__ */ Y("button", {type: "button",class: "geist-button",- disabled: gt.has(i.state),+ disabled: ht.has(i.state),onClick: (e) => y(e.currentTarget),children: "检查更新"})@@ -991,9 +991,9 @@ function _t({ initial: e, initialJob: t }) {}//#endregion//#region src/islands/peach-proxy.tsx-function vt({ initial: e, receipt: t }) {- let [n, r] = W(e), [i, a] = W(e.mode), [o, s] = W(""), [c, l] = W(""), u = q(!1), f = q(null), p = q(null), m = q(new AbortController());- G(() => () => m.current.abort(), []), K(() => {+function _t({ initial: e, receipt: t }) {+ let [n, r] = G(e), [i, a] = G(e.mode), [o, s] = G(""), [c, l] = G(""), u = J(!1), f = J(null), p = J(null), m = J(new AbortController());+ K(() => () => m.current.abort(), []), q(() => {let t = f.current;t.innerHTML = g([["environment", "系统代理"],@@ -1013,42 +1013,42 @@ function vt({ initial: e, receipt: t }) {if (!u.current) {u.current = !0, v(p.current, !0), l("");try {- let e = await V("/api/configuration/peach-proxy", {+ let e = await H("/api/configuration/peach-proxy", {mode: i,proxy: o}, "POST", m.current.signal);m.current.signal.aborted || (r(e), s(""), t("已保存 Peach 代理"));} catch (e) {- m.current.signal.aborted || l(z(e));+ m.current.signal.aborted || l(B(e));} finally {u.current = !1, v(p.current, !1);}}}- return /* @__PURE__ */ J("form", {+ return /* @__PURE__ */ Y("form", {id: "peachProxy",class: "configfieldset","data-geist-fieldset": !0,onSubmit: (e) => {e.preventDefault(), h();},- children: [/* @__PURE__ */ J("div", {+ children: [/* @__PURE__ */ Y("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y("div", {class: "configfieldset-heading",- children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d("peachProxyTitle", "Peach 代理") } }), /* @__PURE__ */ J("p", {+ children: [/* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: d("peachProxyTitle", "Peach 代理") } }), /* @__PURE__ */ Y("p", {class: "confighelp",children: "采集来源选择“Peach 代理”时共用此设置。"})]}),- /* @__PURE__ */ J("div", { ref: f }),- i === "proxy" && /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y("div", { ref: f }),+ i === "proxy" && /* @__PURE__ */ Y("div", {class: "configfield",- children: [/* @__PURE__ */ J("label", {+ children: [/* @__PURE__ */ Y("label", {htmlFor: "peachProxyAddress",children: "代理地址"- }), /* @__PURE__ */ J("input", {+ }), /* @__PURE__ */ Y("input", {id: "peachProxyAddress",class: "geist-input",type: "password",@@ -1058,20 +1058,20 @@ function vt({ initial: e, receipt: t }) {onInput: (e) => s(e.currentTarget.value)})]}),- n.needs_selection && /* @__PURE__ */ J("p", {+ n.needs_selection && /* @__PURE__ */ Y("p", {class: "configbad",children: "已有来源的代理地址不同,请选择公共连接方式。"}),- c && /* @__PURE__ */ J("p", {+ c && /* @__PURE__ */ Y("p", {class: "configbad",role: "alert",children: c})]- }), /* @__PURE__ */ J("footer", {+ }), /* @__PURE__ */ Y("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: /* @__PURE__ */ J("button", {+ children: /* @__PURE__ */ Y("button", {ref: p,class: "geist-button primary",type: "submit",@@ -1082,30 +1082,30 @@ function vt({ initial: e, receipt: t }) {}//#endregion//#region src/islands/desktop-settings.tsx-function yt({ label: e, checked: t, disabled: n, change: r }) {- return /* @__PURE__ */ J("label", {+function vt({ label: e, checked: t, disabled: n, change: r }) {+ return /* @__PURE__ */ Y("label", {class: "configcheck",- children: [/* @__PURE__ */ J("span", {+ children: [/* @__PURE__ */ Y("span", {class: "pcheck",- children: [/* @__PURE__ */ J("input", {+ children: [/* @__PURE__ */ Y("input", {type: "checkbox",checked: t,disabled: n,onChange: (e) => r(e.currentTarget.checked)- }), /* @__PURE__ */ J("span", {+ }), /* @__PURE__ */ Y("span", {"aria-hidden": "true",- children: /* @__PURE__ */ J("svg", {+ children: /* @__PURE__ */ Y("svg", {viewBox: "0 0 24 24",- children: /* @__PURE__ */ J("use", { href: "#i-check" })+ children: /* @__PURE__ */ Y("use", { href: "#i-check" })})})]- }), /* @__PURE__ */ J("span", { children: e })]+ }), /* @__PURE__ */ Y("span", { children: e })]});}-function bt({ label: e, checked: t, disabled: n, change: r }) {- return /* @__PURE__ */ J("label", {+function yt({ label: e, checked: t, disabled: n, change: r }) {+ return /* @__PURE__ */ Y("label", {class: "configtoggle",- children: [/* @__PURE__ */ J("span", { children: e }), /* @__PURE__ */ J("input", {+ children: [/* @__PURE__ */ Y("span", { children: e }), /* @__PURE__ */ Y("input", {class: "ptoggle",type: "checkbox",role: "switch",@@ -1115,85 +1115,85 @@ function bt({ label: e, checked: t, disabled: n, change: r }) {})]});}-function xt({ startup: e, receipt: t }) {- let [n, r] = W(e.enabled), [i, a] = W(e.silent), [o, s] = W(e.desktop), [c, l] = W(""), u = q(!1), f = q(null), p = e.available && !e.desktop_message;+function bt({ startup: e, receipt: t }) {+ let [n, r] = G(e.enabled), [i, a] = G(e.silent), [o, s] = G(e.desktop), [c, l] = G(""), u = J(!1), f = J(null), p = e.available && !e.desktop_message;async function m() {if (!u.current) {u.current = !0, v(f.current, !0), l("");try {- await V("/api/configuration/startup", {+ await H("/api/configuration/startup", {enabled: n,silent: i,desktop: o}), t("已保存开机自启");} catch (e) {- l(z(e));+ l(B(e));} finally {u.current = !1, v(f.current, !1);}}}- return /* @__PURE__ */ J("form", {+ return /* @__PURE__ */ Y("form", {class: "configfieldset","data-geist-fieldset": !0,onSubmit: (e) => {e.preventDefault(), m();},- children: [/* @__PURE__ */ J("div", {+ children: [/* @__PURE__ */ Y("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d("startupTitle", "开机自启") } }),- /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: d("startupTitle", "开机自启") } }),+ /* @__PURE__ */ Y("div", {class: "configoptions",role: "group","aria-labelledby": "startupTitle",children: [- /* @__PURE__ */ J(bt, {+ /* @__PURE__ */ Y(yt, {label: "开机后启动 Peach",checked: n,disabled: !e.available,change: r}),- /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y("div", {class: "configoption",- children: [/* @__PURE__ */ J(bt, {+ children: [/* @__PURE__ */ Y(yt, {label: "静默启动",checked: i,disabled: !e.available || !n,change: a- }), /* @__PURE__ */ J("p", {+ }), /* @__PURE__ */ Y("p", {class: "confighelp",children: "静默启动仅显示托盘,开机后启动 Peach 打开时生效。"})]}),- /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y("div", {class: "configoption",- children: [/* @__PURE__ */ J(bt, {+ children: [/* @__PURE__ */ Y(yt, {label: "在桌面创建快捷方式",checked: o,disabled: !p,change: s- }), /* @__PURE__ */ J("p", {+ }), /* @__PURE__ */ Y("p", {class: "confighelp",children: e.desktop_message || "双击图标打开 Peach 网页;卸载时一并移除。"})]})]}),- e.message && /* @__PURE__ */ J("p", {+ e.message && /* @__PURE__ */ Y("p", {class: "confighelp",children: e.message}),- c && /* @__PURE__ */ J("p", {+ c && /* @__PURE__ */ Y("p", {class: "configbad",role: "alert",children: c})]- }), /* @__PURE__ */ J("footer", {+ }), /* @__PURE__ */ Y("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: /* @__PURE__ */ J("button", {+ children: /* @__PURE__ */ Y("button", {ref: f,type: "submit",class: "geist-button primary",@@ -1203,9 +1203,9 @@ function xt({ startup: e, receipt: t }) {})]});}-function St({ data: e }) {- let t = q(null);- return K(() => {+function xt({ data: e }) {+ let t = J(null);+ return q(() => {let n = t.current, r = document.createElement("details");r.className = "configdirectories";let i = document.createElement("summary");@@ -1215,10 +1215,10 @@ function St({ data: e }) {e.className = "confighelp", e.textContent = t, r.append(e);}return n.replaceChildren(r), y(n, "details", "uninstall-data"), () => n.replaceChildren();- }, [e]), /* @__PURE__ */ J("div", { ref: t });+ }, [e]), /* @__PURE__ */ Y("div", { ref: t });}-function Ct({ uninstall: e }) {- let [t, n] = W(!1), [r, i] = W("");+function St({ uninstall: e }) {+ let [t, n] = G(!1), [r, i] = G("");async function a() {await l({title: "卸载 Peach",@@ -1226,7 +1226,7 @@ function Ct({ uninstall: e }) {body: t ? "将退出 Peach,移除程序、开机自启、桌面图标、设置、本地数据库、观看记录、凭据和缓存。原始媒体文件保留。" : "将退出 Peach 并移除程序、开机自启和桌面图标。设置、本地数据库、观看记录与缓存保留。",confirmLabel: "卸载 Peach",onConfirm: async () => {- let e = await V("/api/configuration/uninstall", {+ let e = await H("/api/configuration/uninstall", {delete_data: t,confirmation: "卸载 Peach"});@@ -1234,42 +1234,42 @@ function Ct({ uninstall: e }) {}});}- return /* @__PURE__ */ J("section", {+ return /* @__PURE__ */ Y("section", {id: "uninstallPeach",class: "configfieldset configdanger","data-geist-fieldset": !0,"data-fieldset-type": "error",- children: [/* @__PURE__ */ J("div", {+ children: [/* @__PURE__ */ Y("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y("div", {class: "configfieldset-heading",- children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d("uninstallTitle", "卸载 Peach") } }), e.available && /* @__PURE__ */ J("p", {+ children: [/* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: d("uninstallTitle", "卸载 Peach") } }), e.available && /* @__PURE__ */ Y("p", {class: "confighelp",children: "卸载会退出 Peach、移除程序、开机自启和桌面图标。原始媒体文件保留。"})]}),- /* @__PURE__ */ J(yt, {+ /* @__PURE__ */ Y(vt, {label: "完全卸载:同时删除设置、本地数据库、观看记录、凭据和缓存",checked: t,disabled: !e.full_available || !!r,change: n}),- /* @__PURE__ */ J(St, { data: e }),- e.message && /* @__PURE__ */ J("p", {+ /* @__PURE__ */ Y(xt, { data: e }),+ e.message && /* @__PURE__ */ Y("p", {class: "confighelp",children: e.message}),- r && /* @__PURE__ */ J("p", {+ r && /* @__PURE__ */ Y("p", {class: "confighelp",role: "status",children: r})]- }), /* @__PURE__ */ J("footer", {+ }), /* @__PURE__ */ Y("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: /* @__PURE__ */ J("button", {+ children: /* @__PURE__ */ Y("button", {type: "button",class: "geist-button danger",disabled: !e.available || !!r,@@ -1281,7 +1281,7 @@ function Ct({ uninstall: e }) {}//#endregion//#region src/islands/clouddrive-guide.tsx-var wt = [+var Ct = [{name: "机械硬盘,或内存 8 GB 以内",cache: "10–20 GiB",@@ -1301,92 +1301,92 @@ var wt = [task: "2 个起步"}];-function Tt() {- let e = q(null);- return K(() => {+function wt() {+ let e = J(null);+ return q(() => {e.current && y(e.current, "details", "clouddrive-guide");- }, []), /* @__PURE__ */ J("div", {+ }, []), /* @__PURE__ */ Y("div", {ref: e,class: "cloudguide",- children: [/* @__PURE__ */ J("p", {+ children: [/* @__PURE__ */ Y("p", {class: "confighelp",- children: ["先在 CloudDrive 登录网盘并挂载,开启「启动时自动挂载」。", /* @__PURE__ */ J("a", {+ children: ["先在 CloudDrive 登录网盘并挂载,开启「启动时自动挂载」。", /* @__PURE__ */ Y("a", {class: "externallink",href: "https://www.clouddrive2.com/help.html",target: "_blank",rel: "noreferrer",- children: ["挂载帮助", /* @__PURE__ */ J("svg", {+ children: ["挂载帮助", /* @__PURE__ */ Y("svg", {class: "externalmark",viewBox: "0 0 24 24","aria-hidden": "true",- children: /* @__PURE__ */ J("use", { href: "#i-external-link" })+ children: /* @__PURE__ */ Y("use", { href: "#i-external-link" })})]})]- }), /* @__PURE__ */ J("details", { children: [- /* @__PURE__ */ J("summary", { children: [/* @__PURE__ */ J("svg", {+ }), /* @__PURE__ */ Y("details", { children: [+ /* @__PURE__ */ Y("summary", { children: [/* @__PURE__ */ Y("svg", {viewBox: "0 0 24 24","aria-hidden": "true",- children: /* @__PURE__ */ J("use", { href: "#i-chevron-right" })+ children: /* @__PURE__ */ Y("use", { href: "#i-chevron-right" })}), "CloudDrive 速度与缓存建议"] }),- /* @__PURE__ */ J("p", {+ /* @__PURE__ */ Y("p", {class: "confighelp",children: "看缓存放在哪块硬盘上,照那一行填。表里是起步值,先保证播放不卡,再拿同一个视频比较打开速度、拖动和流量;填得越大不一定越快。"}),- /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y("div", {class: "cloudguide-tablewrap",- children: /* @__PURE__ */ J("table", {+ children: /* @__PURE__ */ Y("table", {class: "cloudguide-table",- children: [/* @__PURE__ */ J("thead", { children: /* @__PURE__ */ J("tr", { children: [- /* @__PURE__ */ J("th", {+ children: [/* @__PURE__ */ Y("thead", { children: /* @__PURE__ */ Y("tr", { children: [+ /* @__PURE__ */ Y("th", {scope: "col",children: "缓存所在硬盘"}),- /* @__PURE__ */ J("th", {+ /* @__PURE__ */ Y("th", {scope: "col",children: "缓存上限"}),- /* @__PURE__ */ J("th", {+ /* @__PURE__ */ Y("th", {scope: "col",children: "读取长度(默认 / 最小)"}),- /* @__PURE__ */ J("th", {+ /* @__PURE__ */ Y("th", {scope: "col",children: "同时处理视频"})- ] }) }), /* @__PURE__ */ J("tbody", { children: wt.map((e) => /* @__PURE__ */ J("tr", { children: [- /* @__PURE__ */ J("th", {+ ] }) }), /* @__PURE__ */ Y("tbody", { children: Ct.map((e) => /* @__PURE__ */ Y("tr", { children: [+ /* @__PURE__ */ Y("th", {scope: "row",children: e.name}),- /* @__PURE__ */ J("td", { children: e.cache }),- /* @__PURE__ */ J("td", { children: e.read }),- /* @__PURE__ */ J("td", { children: e.task })+ /* @__PURE__ */ Y("td", { children: e.cache }),+ /* @__PURE__ */ Y("td", { children: e.read }),+ /* @__PURE__ */ Y("td", { children: e.task })] }, e.name)) })]})}),- /* @__PURE__ */ J("ul", {+ /* @__PURE__ */ Y("ul", {class: "cloudguide-notes",children: [- /* @__PURE__ */ J("li", { children: "缓存上限和清理方式填在 CloudDrive「设置」里,清理方式选 LRU。上限不要填 0,系统盘至少留 40 GiB。" }),- /* @__PURE__ */ J("li", { children: "读取长度和下载线程填在每个网盘各自的下载设置里,线程都从 2 开始。看高码率视频还是缓冲就试 512 / 256 KB,打开速度、拖动和流量都没改善就调回去。" }),- /* @__PURE__ */ J("li", { children: "Buffer Cache 占内存,磁盘缓存和文件夹缓存占硬盘,三处是分开的设置,改一个管不住另外两个。" }),- /* @__PURE__ */ J("li", { children: "填完重新打开 CloudDrive 的设置页确认存住了,再看硬盘实际少了多少。播放期间先暂停批量抽帧、关掉不用的播放页。" })+ /* @__PURE__ */ Y("li", { children: "缓存上限和清理方式填在 CloudDrive「设置」里,清理方式选 LRU。上限不要填 0,系统盘至少留 40 GiB。" }),+ /* @__PURE__ */ Y("li", { children: "读取长度和下载线程填在每个网盘各自的下载设置里,线程都从 2 开始。看高码率视频还是缓冲就试 512 / 256 KB,打开速度、拖动和流量都没改善就调回去。" }),+ /* @__PURE__ */ Y("li", { children: "Buffer Cache 占内存,磁盘缓存和文件夹缓存占硬盘,三处是分开的设置,改一个管不住另外两个。" }),+ /* @__PURE__ */ Y("li", { children: "填完重新打开 CloudDrive 的设置页确认存住了,再看硬盘实际少了多少。播放期间先暂停批量抽帧、关掉不用的播放页。" })]}),- /* @__PURE__ */ J("p", {+ /* @__PURE__ */ Y("p", {class: "confighelp",children: ["三处缓存分别管什么、码率和速度怎么换算、线程上限与直链代理怎么取舍,以及这些起步值的来源,都在",- /* @__PURE__ */ J("a", {+ /* @__PURE__ */ Y("a", {class: "externallink",href: "https://github.com/longmeidao/peach/blob/master/docs/CLOUDDRIVE.md",target: "_blank",rel: "noreferrer",- children: ["CloudDrive 配置与调优", /* @__PURE__ */ J("svg", {+ children: ["CloudDrive 配置与调优", /* @__PURE__ */ Y("svg", {class: "externalmark",viewBox: "0 0 24 24","aria-hidden": "true",- children: /* @__PURE__ */ J("use", { href: "#i-external-link" })+ children: /* @__PURE__ */ Y("use", { href: "#i-external-link" })})]}),"。"@@ -1397,31 +1397,31 @@ function Tt() {}//#endregion//#region src/islands/configuration.tsx-var Et = "/api/configuration", Dt = "/api/pick-folder", Ot = 8e3, kt = (e, t) => B(Et, t), At = ({ html: e, class: t }) => /* @__PURE__ */ J("div", {+var Tt = "/api/configuration", Et = "/api/pick-folder", Dt = 8e3, Ot = (e, t) => V(Tt, t), kt = ({ html: e, class: t }) => /* @__PURE__ */ Y("div", {class: t,dangerouslySetInnerHTML: { __html: e }-}), jt = (e) => !(e instanceof We) || e.status !== 400 ? null : e.body?.errors ?? null;-function Mt({ facts: e }) {- return /* @__PURE__ */ J("section", {+}), At = (e) => !(e instanceof Ue) || e.status !== 400 ? null : e.body?.errors ?? null;+function jt({ facts: e }) {+ return /* @__PURE__ */ Y("section", {class: "configfieldset","data-geist-fieldset": !0,"aria-labelledby": "configFactsTitle",- children: /* @__PURE__ */ J("div", {+ children: /* @__PURE__ */ Y("div", {class: "geist-fieldset-content",- children: [/* @__PURE__ */ J(At, { html: d("configFactsTitle", "运行信息") }), /* @__PURE__ */ J("dl", {+ children: [/* @__PURE__ */ Y(kt, { html: d("configFactsTitle", "运行信息") }), /* @__PURE__ */ Y("dl", {class: "configfacts",- children: e.map((e) => /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J("dt", { children: e.term }), /* @__PURE__ */ J("dd", { children: [e.value, e.download_url ? /* @__PURE__ */ J("span", {+ children: e.map((e) => /* @__PURE__ */ Y(L, { children: [/* @__PURE__ */ Y("dt", { children: e.term }), /* @__PURE__ */ Y("dd", { children: [e.value, e.download_url ? /* @__PURE__ */ Y("span", {class: "confighelp",- children: [" ", /* @__PURE__ */ J("a", {+ children: [" ", /* @__PURE__ */ Y("a", {class: "externallink",href: e.download_url,target: "_blank",rel: "noreferrer",- children: [e.download_label, /* @__PURE__ */ J("svg", {+ children: [e.download_label, /* @__PURE__ */ Y("svg", {class: "externalmark",viewBox: "0 0 24 24","aria-hidden": "true",- children: /* @__PURE__ */ J("use", { href: "#i-external-link" })+ children: /* @__PURE__ */ Y("use", { href: "#i-external-link" })})]})]}) : null] })] }))@@ -1429,57 +1429,57 @@ function Mt({ facts: e }) {})});}-function Nt({ data: e }) {- let [t, n] = W(e.media_sources), [r, i] = W(""), a = q(null);- G(() => () => a.current?.abort(), []);+function Mt({ data: e }) {+ let [t, n] = G(e.media_sources), [r, i] = G(""), a = J(null);+ K(() => () => a.current?.abort(), []);let o = async (e) => {if (a.current) return;let t = new AbortController();a.current = t, v(e, !0), i("");try {- let e = await B(Et, t.signal);+ let e = await V(Tt, t.signal);t.signal.aborted || n(e.media_sources);} catch (e) {- t.signal.aborted || i(z(e));+ t.signal.aborted || i(B(e));} finally {a.current = null, v(e, !1);}};- return t ? /* @__PURE__ */ J("section", {+ return t ? /* @__PURE__ */ Y("section", {class: "configfieldset","aria-labelledby": "configMountsTitle",- children: [/* @__PURE__ */ J("div", {+ children: [/* @__PURE__ */ Y("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ J(At, { html: d("configMountsTitle", "挂载状态") }),- /* @__PURE__ */ J("dl", {+ /* @__PURE__ */ Y(kt, { html: d("configMountsTitle", "挂载状态") }),+ /* @__PURE__ */ Y("dl", {class: "configfacts",- children: t.map((e) => /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J("dt", { children: [/* @__PURE__ */ J("span", {+ children: t.map((e) => /* @__PURE__ */ Y(L, { children: [/* @__PURE__ */ Y("dt", { children: [/* @__PURE__ */ Y("span", {"aria-hidden": "true",dangerouslySetInnerHTML: { __html: _(s[e.location]) }}), {local: "本地磁盘",115: "CloudDrive · 115",pikpak: "CloudDrive · PikPak"- }[e.location] || e.location] }), /* @__PURE__ */ J("dd", { children: [+ }[e.location] || e.location] }), /* @__PURE__ */ Y("dd", { children: [e.path || "未配置挂载点"," ",- /* @__PURE__ */ J("span", {+ /* @__PURE__ */ Y("span", {class: `configstatus ${e.online === !0 ? "online" : e.online === !1 ? "offline" : "unknown"}`,children: e.online === !0 ? "在线" : e.online === !1 ? "离线" : "未检测"})] })] }))}),- r ? /* @__PURE__ */ J("p", {+ r ? /* @__PURE__ */ Y("p", {class: "configbad",role: "alert",children: r}) : null]- }), /* @__PURE__ */ J("div", {+ }), /* @__PURE__ */ Y("div", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: /* @__PURE__ */ J("button", {+ children: /* @__PURE__ */ Y("button", {type: "button",class: "geist-button",onClick: (e) => o(e.currentTarget),@@ -1488,179 +1488,189 @@ function Nt({ data: e }) {})]}) : null;}-function Pt({ value: e, label: t, onChange: n }) {- let r = q(null), i = q(null), a = q(n);- return a.current = n, K(() => {- let n = r.current;- n.innerHTML = g([+function Nt({ value: e, label: t, onChange: n, libraryIcon: r = !1 }) {+ let i = J(null), a = J(null), o = J(n);+ return o.current = n, q(() => {+ let n = i.current;+ n.innerHTML = g((r ? [+ ["", "自动识别"],+ ["hard-drive", "磁盘"],+ ["database", "资料库"],+ ["heart", "心形"],+ ["star", "星标"],+ ["tags", "标签"],+ ["115", "115"],+ ["pikpak", "PikPak"]+ ] : [["local", "本地磁盘"],["115", "CloudDrive · 115"],["pikpak", "CloudDrive · PikPak"]- ].map(([e, t]) => [+ ]).map(([e, t]) => [e,t,- s[e]+ s[e] || e || "database"]), e, { label: t });- let o = b(n.firstElementChild);- i.current = o;- let c = () => a.current(o.value);- return o.addEventListener("change", c), () => {- i.current = null, o.disabled = !0, o.removeEventListener("change", c), n.replaceChildren();+ let c = b(n.firstElementChild);+ a.current = c;+ let l = () => o.current(c.value);+ return c.addEventListener("change", l), () => {+ a.current = null, c.disabled = !0, c.removeEventListener("change", l), n.replaceChildren();};- }, [t]), K(() => {- i.current && (i.current.value = e);- }, [e]), /* @__PURE__ */ J("div", {- ref: r,+ }, [t, r]), q(() => {+ a.current && (a.current.value = e);+ }, [e]), /* @__PURE__ */ Y("div", {+ ref: i,class: "configsourcecontrol"});}-function Ft({ data: e, receipt: t }) {+function Pt({ data: e, receipt: t }) {let n = e.media_sources?.filter((e) => ["local","115","pikpak"- ].includes(e.location)), [r, i] = W(n?.length ? n.map((e) => e.path) : e.media_dirs.length ? e.media_dirs : [""]), [a, o] = W(n?.map((e) => e.location) ?? []), [s, c] = W(n?.map((e) => e.root) ?? []), [l, u] = W(n?.map((e) => e.library || "") ?? []), [f, m] = W(String(e.port)), [h, g] = W(!1), [_, y] = W([]), [b, x] = W(""), [S, C] = W(""), [w, T] = W(null), [E, D] = W(null), O = q(!1), k = q(e.revision), A = q([]), j = q(null);- K(() => {- E !== null && (A.current[E]?.focus(), D(null));- }, [E]), G(() => {- if (!w) return;- let e = setTimeout(() => location.assign(w.url), Ot);+ ].includes(e.location)), [r, i] = G(n?.length ? n.map((e) => e.path) : e.media_dirs.length ? e.media_dirs : [""]), [a, o] = G(n?.map((e) => e.location) ?? []), [s, c] = G(n?.map((e) => e.root) ?? []), [l, u] = G(n?.map((e) => e.library || "") ?? []), [f, m] = G(n?.map((e) => e.library_icon || "") ?? []), [h, g] = G(String(e.port)), [_, y] = G(!1), [b, x] = G([]), [S, C] = G(""), [w, T] = G(""), [E, D] = G(null), [O, k] = G(null), A = J(!1), j = J(e.revision), ee = J([]), M = J(null);+ q(() => {+ O !== null && (ee.current[O]?.focus(), k(null));+ }, [O]), K(() => {+ if (!E) return;+ let e = setTimeout(() => location.assign(E.url), Dt);return () => clearTimeout(e);- }, [w]);- let ee = (e, t) => {+ }, [E]);+ let N = (e, t) => {i((n) => n.map((n, r) => r === e ? t : n));- }, M = () => {- D(r.length), i((e) => [...e, ""]);- }, te = (e) => {- o((t) => t.filter((t, n) => n !== e)), c((t) => t.filter((t, n) => n !== e)), u((t) => t.filter((t, n) => n !== e)), i((t) => t.filter((t, n) => n !== e)), y((t) => t.filter((t, n) => n !== e));- }, N = (e, t) => {- y((n) => {+ }, P = () => {+ k(r.length), i((e) => [...e, ""]);+ }, F = (e) => {+ o((t) => t.filter((t, n) => n !== e)), c((t) => t.filter((t, n) => n !== e)), u((t) => t.filter((t, n) => n !== e)), m((t) => t.filter((t, n) => n !== e)), i((t) => t.filter((t, n) => n !== e)), x((t) => t.filter((t, n) => n !== e));+ }, te = (e, t) => {+ x((n) => {let r = [...n];for (; r.length <= e;) r.push("");return r[e] = t, r;});- }, P = async (e, t) => {+ }, ne = async (e, t) => {if (t.getAttribute("aria-busy") !== "true") {v(t, !0);try {- let { path: t } = await V(Dt, { initial: r[e] ?? "" });- t && (ee(e, t), N(e, ""));+ let { path: t } = await H(Et, { initial: r[e] ?? "" });+ t && (N(e, t), te(e, ""));} catch (t) {- N(e, z(t));+ te(e, B(t));} finally {v(t, !1);}}};- return w ? /* @__PURE__ */ J("div", {+ return E ? /* @__PURE__ */ Y("div", {class: "configsaved",role: "status",- children: /* @__PURE__ */ J("div", {+ children: /* @__PURE__ */ Y("div", {class: "geist-note geist-note-success",role: "note",- children: [/* @__PURE__ */ J("svg", {+ children: [/* @__PURE__ */ Y("svg", {"aria-hidden": "true",viewBox: "0 0 24 24",- children: /* @__PURE__ */ J("use", { href: "#i-check" })- }), /* @__PURE__ */ J("p", { children: /* @__PURE__ */ J("span", { children: [+ children: /* @__PURE__ */ Y("use", { href: "#i-check" })+ }), /* @__PURE__ */ Y("p", { children: /* @__PURE__ */ Y("span", { children: ["配置已保存,Peach 正在重新启动。稍后自动跳转,或点击",- /* @__PURE__ */ J("a", {- href: w.url,+ /* @__PURE__ */ Y("a", {+ href: E.url,children: "进入馆藏"}),"。"] }) })]})- }) : /* @__PURE__ */ J("form", {+ }) : /* @__PURE__ */ Y("form", {class: "configfieldset","data-geist-fieldset": !0,"aria-labelledby": "configTitle",onSubmit: async (n) => {- if (n.preventDefault(), !O.current) {- O.current = !0, v(j.current, !0), C("");+ if (n.preventDefault(), !A.current) {+ A.current = !0, v(M.current, !0), T("");try {- let n = await V(Et, {- revision: k.current,+ let n = await H(Tt, {+ revision: j.current,media_dirs: r,...e.media_sources ? { media_sources: r.map((e, t) => ({path: e,location: a[t] || "local",root: s[t] || "",- library: l[t] || ""+ library: l[t] || "",+ library_icon: f[t] || ""})) } : {},- port: f,- scan_now: h+ port: h,+ scan_now: _});- k.current = n.revision, y([]), x(""), t("已保存配置"), T(n);+ j.current = n.revision, x([]), C(""), t("已保存配置"), D(n);} catch (e) {- let t = jt(e);- t ? (y(t.media_dirs ?? []), x(t.port ?? "")) : (y([]), x(""), C(z(e)));+ let t = At(e);+ t ? (x(t.media_dirs ?? []), C(t.port ?? "")) : (x([]), C(""), T(B(e)));} finally {- O.current = !1, v(j.current, !1);+ A.current = !1, v(M.current, !1);}}},noValidate: !0,- children: [/* @__PURE__ */ J("div", {+ children: [/* @__PURE__ */ Y("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ J(At, { html: d("configTitle", "这台电脑") }),- /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y(kt, { html: d("configTitle", "这台电脑") }),+ /* @__PURE__ */ Y("div", {class: "configfield",children: [- /* @__PURE__ */ J("span", {+ /* @__PURE__ */ Y("span", {class: "configlabel",id: "configDirsLabel",children: "媒体文件夹"}),- /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y("div", {class: "configdirs",role: "group","aria-labelledby": "configDirsLabel",- children: r.map((t, n) => /* @__PURE__ */ J("div", {+ children: r.map((t, n) => /* @__PURE__ */ Y("div", {class: "configdir",children: [- /* @__PURE__ */ J("span", {+ /* @__PURE__ */ Y("span", {class: "configpathlabel",children: ["本机文件夹 ", n + 1]}),- /* @__PURE__ */ J("input", {+ /* @__PURE__ */ Y("input", {class: "geist-input",type: "text",value: t,"aria-label": `媒体文件夹 ${n + 1}`,- "aria-invalid": _[n] ? "true" : void 0,- onInput: (e) => ee(n, e.currentTarget.value),+ "aria-invalid": b[n] ? "true" : void 0,+ onInput: (e) => N(n, e.currentTarget.value),ref: (e) => {- A.current[n] = e;+ ee.current[n] = e;}}),- /* @__PURE__ */ J("button", {+ /* @__PURE__ */ Y("button", {type: "button",class: "geist-button configpick","aria-label": "选择文件夹",- onClick: (e) => P(n, e.currentTarget),- children: /* @__PURE__ */ J("svg", {+ onClick: (e) => ne(n, e.currentTarget),+ children: /* @__PURE__ */ Y("svg", {viewBox: "0 0 24 24","aria-hidden": "true",- children: /* @__PURE__ */ J("use", { href: "#i-folder-search" })+ children: /* @__PURE__ */ Y("use", { href: "#i-folder-search" })})}),- r.length > 1 ? /* @__PURE__ */ J("button", {+ r.length > 1 ? /* @__PURE__ */ Y("button", {type: "button",class: "geist-button configrm danger","aria-label": "移除这个文件夹",- onClick: () => te(n),- children: /* @__PURE__ */ J("svg", {+ onClick: () => F(n),+ children: /* @__PURE__ */ Y("svg", {viewBox: "0 0 24 24","aria-hidden": "true",- children: /* @__PURE__ */ J("use", { href: "#i-x" })+ children: /* @__PURE__ */ Y("use", { href: "#i-x" })})}) : null,- /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y("div", {class: "configsource",children: [- /* @__PURE__ */ J("label", { children: ["媒体库", /* @__PURE__ */ J("input", {+ /* @__PURE__ */ Y("label", { children: ["媒体库", /* @__PURE__ */ Y("input", {class: "geist-input","aria-label": `媒体库 ${n + 1}`,maxLength: 80,@@ -1671,9 +1681,21 @@ function Ft({ data: e, receipt: t }) {t[n] = e.currentTarget.value, u(t);}})] }),- /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y("div", {+ class: "configsourcelabel",+ children: ["媒体库图标", /* @__PURE__ */ Y(Nt, {+ libraryIcon: !0,+ label: `媒体库图标 ${n + 1}`,+ value: f[n] || "",+ onChange: (e) => {+ let t = [...f];+ t[n] = e, m(t);+ }+ })]+ }),+ /* @__PURE__ */ Y("div", {class: "configsourcelabel",- children: ["媒体来源", /* @__PURE__ */ J(Pt, {+ children: ["媒体来源", /* @__PURE__ */ Y(Nt, {label: `媒体来源 ${n + 1}`,value: a[n] || "local",onChange: (e) => {@@ -1682,7 +1704,7 @@ function Ft({ data: e, receipt: t }) {}})]}),- e.windows === !1 ? /* @__PURE__ */ J("label", { children: ["Windows 中的对应路径", /* @__PURE__ */ J("input", {+ e.windows === !1 ? /* @__PURE__ */ Y("label", { children: ["Windows 中的对应路径", /* @__PURE__ */ Y("input", {class: "geist-input","aria-label": `Windows 中的对应路径 ${n + 1}`,value: s[n] || "",@@ -1694,28 +1716,28 @@ function Ft({ data: e, receipt: t }) {})] }) : null]}),- _[n] ? /* @__PURE__ */ J("p", {+ b[n] ? /* @__PURE__ */ Y("p", {class: "configbad",role: "alert",- children: _[n]+ children: b[n]}) : null]}, n))}),- /* @__PURE__ */ J("button", {+ /* @__PURE__ */ Y("button", {type: "button",class: "geist-button configadd",- onClick: M,+ onClick: P,children: "添加文件夹"}),- a.some((e) => e === "115" || e === "pikpak") ? /* @__PURE__ */ J(Tt, {}) : null,- a.some((e) => e === "115" || e === "pikpak") ? e.mount_dependencies?.filter((e) => !e.available).map((e) => /* @__PURE__ */ J("p", {+ a.some((e) => e === "115" || e === "pikpak") ? /* @__PURE__ */ Y(wt, {}) : null,+ a.some((e) => e === "115" || e === "pikpak") ? e.mount_dependencies?.filter((e) => !e.available).map((e) => /* @__PURE__ */ Y("p", {class: "confighelp",children: ["未检测到 ",e.name,"。",- /* @__PURE__ */ J("a", {+ /* @__PURE__ */ Y("a", {class: "externallink",href: e.download_url,target: "_blank",@@ -1723,157 +1745,157 @@ function Ft({ data: e, receipt: t }) {children: ["下载 ",e.name,- /* @__PURE__ */ J("svg", {+ /* @__PURE__ */ Y("svg", {class: "externalmark",viewBox: "0 0 24 24","aria-hidden": "true",- children: /* @__PURE__ */ J("use", { href: "#i-external-link" })+ children: /* @__PURE__ */ Y("use", { href: "#i-external-link" })})]})]})) : null,- e.windows === !1 ? /* @__PURE__ */ J("p", {+ e.windows === !1 ? /* @__PURE__ */ Y("p", {class: "confighelp",children: "本机文件夹是这台电脑读取媒体的位置。Windows 中的对应路径用于匹配馆藏中已有的路径,例如 B:\\ 对应本机挂载文件夹。"}) : null]}),- e.port_editable === !1 ? null : /* @__PURE__ */ J("div", {+ e.port_editable === !1 ? null : /* @__PURE__ */ Y("div", {class: "configfield",children: [- /* @__PURE__ */ J("label", {+ /* @__PURE__ */ Y("label", {for: "configPort",children: "本机访问端口"}),- /* @__PURE__ */ J("input", {+ /* @__PURE__ */ Y("input", {id: "configPort",class: "geist-input",type: "text",inputMode: "numeric",- value: f,- "aria-invalid": b ? "true" : void 0,- onInput: (e) => m(e.currentTarget.value)+ value: h,+ "aria-invalid": S ? "true" : void 0,+ onInput: (e) => g(e.currentTarget.value)}),- b ? /* @__PURE__ */ J("p", {+ S ? /* @__PURE__ */ Y("p", {class: "configbad",role: "alert",- children: b+ children: S}) : null,- /* @__PURE__ */ J("p", {+ /* @__PURE__ */ Y("p", {class: "confighelp",children: "浏览器地址里冒号后面的数字,一般不用改。"})]}),- /* @__PURE__ */ J("label", {+ /* @__PURE__ */ Y("label", {class: "configcheck",- children: [/* @__PURE__ */ J("span", {+ children: [/* @__PURE__ */ Y("span", {class: "pcheck",- children: [/* @__PURE__ */ J("input", {+ children: [/* @__PURE__ */ Y("input", {type: "checkbox",- checked: h,- onChange: (e) => g(e.currentTarget.checked)- }), /* @__PURE__ */ J("span", {+ checked: _,+ onChange: (e) => y(e.currentTarget.checked)+ }), /* @__PURE__ */ Y("span", {"aria-hidden": "true",- children: /* @__PURE__ */ J("svg", {+ children: /* @__PURE__ */ Y("svg", {viewBox: "0 0 24 24",- children: /* @__PURE__ */ J("use", { href: "#i-check" })+ children: /* @__PURE__ */ Y("use", { href: "#i-check" })})})]- }), /* @__PURE__ */ J("span", { children: "保存后扫描并补全资料" })]+ }), /* @__PURE__ */ Y("span", { children: "保存后扫描并补全资料" })]}),- S ? /* @__PURE__ */ J(At, { html: p(S, {+ w ? /* @__PURE__ */ Y(kt, { html: p(w, {variant: "error",label: "没有保存"}) }) : null]- }), /* @__PURE__ */ J("div", {+ }), /* @__PURE__ */ Y("div", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: [/* @__PURE__ */ J("p", { children: e.port_editable === !1 ? "保存后 Peach 会重新载入配置。" : "保存后 Peach 会重新启动,端口改了就用新地址打开。" }), /* @__PURE__ */ J("button", {+ children: [/* @__PURE__ */ Y("p", { children: e.port_editable === !1 ? "保存后 Peach 会重新载入配置。" : "保存后 Peach 会重新启动,端口改了就用新地址打开。" }), /* @__PURE__ */ Y("button", {type: "submit",class: "geist-button primary",- ref: j,+ ref: M,children: "保存配置"})]})]});}-function It({ receipt: e, data: t, error: n }) {- return n || !t ? /* @__PURE__ */ J(At, {+function Ft({ receipt: e, data: t, error: n }) {+ return n || !t ? /* @__PURE__ */ Y(kt, {class: "configpage",html: p(n || "没有读到配置", {variant: "error",label: "打不开配置"})- }) : /* @__PURE__ */ J("div", {+ }) : /* @__PURE__ */ Y("div", {class: "configpage",children: [- t.startup ? /* @__PURE__ */ J("h2", {+ t.startup ? /* @__PURE__ */ Y("h2", {class: "configgroup",children: "通用"}) : null,- t.startup ? /* @__PURE__ */ J(xt, {+ t.startup ? /* @__PURE__ */ Y(bt, {startup: t.startup,receipt: e}) : null,- /* @__PURE__ */ J("h2", {+ /* @__PURE__ */ Y("h2", {class: "configgroup",children: "媒体"}),- t.editable ? /* @__PURE__ */ J(Ft, {+ t.editable ? /* @__PURE__ */ Y(Pt, {data: t,receipt: e- }) : /* @__PURE__ */ J(At, { html: p(t.notice, {+ }) : /* @__PURE__ */ Y(kt, { html: p(t.notice, {variant: "secondary",label: "只读"}) }),- /* @__PURE__ */ J(Nt, { data: t }),- t.peach_proxy || t.access ? /* @__PURE__ */ J("h2", {+ /* @__PURE__ */ Y(Mt, { data: t }),+ t.peach_proxy || t.access ? /* @__PURE__ */ Y("h2", {class: "configgroup",children: "网络与访问"}) : null,- t.peach_proxy ? /* @__PURE__ */ J(vt, {+ t.peach_proxy ? /* @__PURE__ */ Y(_t, {initial: t.peach_proxy,receipt: e}) : null,- t.access ? /* @__PURE__ */ J(ht, {+ t.access ? /* @__PURE__ */ Y(mt, {initial: t.access,receipt: e}) : null,- /* @__PURE__ */ J("h2", {+ /* @__PURE__ */ Y("h2", {class: "configgroup",children: "更新与维护"}),- t.updates ? /* @__PURE__ */ J(_t, {+ t.updates ? /* @__PURE__ */ Y(gt, {initial: t.updates,initialJob: t.update_job}) : null,- /* @__PURE__ */ J(Mt, { facts: t.facts }),- t.uninstall ? /* @__PURE__ */ J(Ct, { uninstall: t.uninstall }) : null+ /* @__PURE__ */ Y(jt, { facts: t.facts }),+ t.uninstall ? /* @__PURE__ */ Y(St, { uninstall: t.uninstall }) : null]});}//#endregion//#region node_modules/@preact/signals-core/dist/signals-core.module.js-var Lt = Symbol.for("preact-signals");-function Rt() {- if (X > 1) X--;+var It = Symbol.for("preact-signals");+function Lt() {+ if (Z > 1) Z--;else {var e, t = !1;for ((function() {- var e = Kt;- for (Kt = void 0; e !== void 0;) {+ var e = Gt;+ for (Gt = void 0; e !== void 0;) {var t = e.S;if (t.v === e.v) for (var n = t.t; n !== void 0; n = n.x) n.i === e.i && (n.i = t.i);e = e.o;}- })(); Ht !== void 0;) {- var n = Ht;- for (Ht = void 0, Ut++; n !== void 0;) {+ })(); Vt !== void 0;) {+ var n = Vt;+ for (Vt = void 0, Ht++; n !== void 0;) {var r = n.u;- if (n.u = void 0, n.f &= -3, !(8 & n.f) && Xt(n)) try {+ if (n.u = void 0, n.f &= -3, !(8 & n.f) && Yt(n)) try {n.c();} catch (n) {t ||= (e = n, !0);@@ -1881,116 +1903,116 @@ function Rt() {n = r;}}- if (Ut = 0, X--, t) throw e;+ if (Ht = 0, Z--, t) throw e;}}-function zt(e) {- if (X > 0) return e();- Gt = ++Wt, X++;+function Rt(e) {+ if (Z > 0) return e();+ Wt = ++Ut, Z++;try {return e();} finally {- Rt();+ Lt();}}-var Bt, Y = void 0;-function Vt(e) {- var t = Y, n = Bt;- Y = void 0, Bt = void 0;+var zt, X = void 0;+function Bt(e) {+ var t = X, n = zt;+ X = void 0, zt = void 0;try {return e();} finally {- Y = t, Bt = n;+ X = t, zt = n;}}-var Ht = void 0, X = 0, Ut = 0, Wt = 0, Gt = 0, Kt = void 0, qt = 0;-function Jt(e) {- if (Y !== void 0) {+var Vt = void 0, Z = 0, Ht = 0, Ut = 0, Wt = 0, Gt = void 0, Kt = 0;+function qt(e) {+ if (X !== void 0) {var t = e.n;- if (t === void 0 || t.t !== Y) return t = {+ if (t === void 0 || t.t !== X) return t = {i: 0,S: e,- p: Y.s,+ p: X.s,n: void 0,- t: Y,+ t: X,e: void 0,x: void 0,r: t- }, Y.s !== void 0 && (Y.s.n = t), Y.s = t, e.n = t, 32 & Y.f && e.S(t), t;- if (t.i === -1) return t.i = 0, t.n !== void 0 && (t.n.p = t.p, t.p !== void 0 && (t.p.n = t.n), t.p = Y.s, t.n = void 0, Y.s.n = t, Y.s = t), t;+ }, X.s !== void 0 && (X.s.n = t), X.s = t, e.n = t, 32 & X.f && e.S(t), t;+ if (t.i === -1) return t.i = 0, t.n !== void 0 && (t.n.p = t.p, t.p !== void 0 && (t.p.n = t.n), t.p = X.s, t.n = void 0, X.s.n = t, X.s = t), t;}}-function Z(e, t) {+function Q(e, t) {this.v = e, this.i = 0, this.n = void 0, this.t = void 0, this.l = 0, this.W = t?.watched, this.Z = t?.unwatched, this.name = t?.name;}-Z.prototype.brand = Lt, Z.prototype.h = function() {+Q.prototype.brand = It, Q.prototype.h = function() {return !0;-}, Z.prototype.S = function(e) {+}, Q.prototype.S = function(e) {var t = this, n = this.t;- n !== e && e.e === void 0 && (e.x = n, this.t = e, n === void 0 ? Vt(function() {+ n !== e && e.e === void 0 && (e.x = n, this.t = e, n === void 0 ? Bt(function() {var e;(e = t.W) == null || e.call(t);}) : n.e = e);-}, Z.prototype.U = function(e) {+}, Q.prototype.U = function(e) {var t = this;if (this.t !== void 0) {var n = e.e, r = e.x;- n !== void 0 && (n.x = r, e.e = void 0), r !== void 0 && (r.e = n, e.x = void 0), e === this.t && (this.t = r, r === void 0 && Vt(function() {+ n !== void 0 && (n.x = r, e.e = void 0), r !== void 0 && (r.e = n, e.x = void 0), e === this.t && (this.t = r, r === void 0 && Bt(function() {var e;(e = t.Z) == null || e.call(t);}));}-}, Z.prototype.subscribe = function(e) {+}, Q.prototype.subscribe = function(e) {var t = this;return an(function() {var n = t.value;- Vt(function() {+ Bt(function() {return e(n);});}, { name: "sub" });-}, Z.prototype.valueOf = function() {+}, Q.prototype.valueOf = function() {return this.value;-}, Z.prototype.toString = function() {+}, Q.prototype.toString = function() {return this.value + "";-}, Z.prototype.toJSON = function() {+}, Q.prototype.toJSON = function() {return this.value;-}, Z.prototype.peek = function() {+}, Q.prototype.peek = function() {var e = this;- return Vt(function() {+ return Bt(function() {return e.value;});-}, Object.defineProperty(Z.prototype, "value", {+}, Object.defineProperty(Q.prototype, "value", {get: function() {- var e = Jt(this);+ var e = qt(this);return e !== void 0 && (e.i = this.i), this.v;},set: function(e) {if (e !== this.v) {- if (Ut > 100) throw Error("Cycle detected");+ if (Ht > 100) throw Error("Cycle detected");(function(e) {- X !== 0 && Ut === 0 && e.l !== Gt && (e.l = Gt, Kt = {+ Z !== 0 && Ht === 0 && e.l !== Wt && (e.l = Wt, Gt = {S: e,v: e.v,i: e.i,- o: Kt+ o: Gt});- })(this), this.v = e, this.i++, qt++, X++;+ })(this), this.v = e, this.i++, Kt++, Z++;try {for (var t = this.t; t !== void 0; t = t.x) t.t.N();} finally {- Rt();+ Lt();}}}});-function Yt(e, t) {- return new Z(e, t);+function Jt(e, t) {+ return new Q(e, t);}-function Xt(e) {+function Yt(e) {for (var t = e.s; t !== void 0; t = t.n) if (t.S.i !== t.i || !t.S.h() || t.S.i !== t.i) return !0;return !1;}-function Zt(e) {+function Xt(e) {for (var t = e.s; t !== void 0; t = t.n) {var n = t.S.n;if (n !== void 0 && (t.r = n), t.S.n = t, t.i = -1, t.n === void 0) {@@ -1999,66 +2021,66 @@ function Zt(e) {}}}-function Qt(e) {+function Zt(e) {for (var t = e.s, n = void 0; t !== void 0;) {var r = t.p;t.i === -1 ? (t.S.U(t), r !== void 0 && (r.n = t.n), t.n !== void 0 && (t.n.p = r)) : n = t, t.S.n = t.r, t.r !== void 0 && (t.r = void 0), t = r;}e.s = n;}-function Q(e, t) {- Z.call(this, void 0, t), this.x = e, this.s = void 0, this.g = qt - 1, this.f = 4;+function Qt(e, t) {+ Q.call(this, void 0, t), this.x = e, this.s = void 0, this.g = Kt - 1, this.f = 4;}-Q.prototype = new Z(), Q.prototype.h = function() {+Qt.prototype = new Q(), Qt.prototype.h = function() {if (this.f &= -3, 1 & this.f) return !1;- if ((36 & this.f) == 32 || (this.f &= -5, this.g === qt)) return !0;- if (this.g = qt, this.f |= 1, this.i > 0 && !Xt(this)) return this.f &= -2, !0;- var e = Y;+ if ((36 & this.f) == 32 || (this.f &= -5, this.g === Kt)) return !0;+ if (this.g = Kt, this.f |= 1, this.i > 0 && !Yt(this)) return this.f &= -2, !0;+ var e = X;try {- Zt(this), Y = this;+ Xt(this), X = this;var t = this.x();(16 & this.f || this.v !== t || this.i === 0) && (this.v = t, this.f &= -17, this.i++);} catch (e) {this.v = e, this.f |= 16, this.i++;}- return Y = e, Qt(this), this.f &= -2, !0;-}, Q.prototype.S = function(e) {+ return X = e, Zt(this), this.f &= -2, !0;+}, Qt.prototype.S = function(e) {if (this.t === void 0) {this.f |= 36;for (var t = this.s; t !== void 0; t = t.n) t.S.S(t);}- Z.prototype.S.call(this, e);-}, Q.prototype.U = function(e) {- if (this.t !== void 0 && (Z.prototype.U.call(this, e), this.t === void 0)) {+ Q.prototype.S.call(this, e);+}, Qt.prototype.U = function(e) {+ if (this.t !== void 0 && (Q.prototype.U.call(this, e), this.t === void 0)) {this.f &= -33;for (var t = this.s; t !== void 0; t = t.n) t.S.U(t);}-}, Q.prototype.N = function() {+}, Qt.prototype.N = function() {if (!(2 & this.f)) {this.f |= 6;for (var e = this.t; e !== void 0; e = e.x) e.t.N();}-}, Object.defineProperty(Q.prototype, "value", { get: function() {+}, Object.defineProperty(Qt.prototype, "value", { get: function() {if (1 & this.f) throw Error("Cycle detected");- var e = Jt(this);+ var e = qt(this);if (this.h(), e !== void 0 && (e.i = this.i), 16 & this.f) throw this.v;return this.v;} });function $t(e, t) {- return new Q(e, t);+ return new Qt(e, t);}function en(e) {var t = e.m;if (e.m = void 0, typeof t == "function") {- X++;- var n = Y;- Y = void 0;+ Z++;+ var n = X;+ X = void 0;try {t();} catch (t) {throw e.f &= -2, e.f |= 8, tn(e), t;} finally {- Y = n, Rt();+ X = n, Lt();}}}@@ -2067,11 +2089,11 @@ function tn(e) {e.x = void 0, e.s = void 0, en(e);}function nn(e) {- if (Y !== this) throw Error("Out-of-order effect");- Qt(this), Y = e, this.f &= -2, 8 & this.f && tn(this), Rt();+ if (X !== this) throw Error("Out-of-order effect");+ Zt(this), X = e, this.f &= -2, 8 & this.f && tn(this), Lt();}function rn(e, t) {- this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, Bt && Bt.push(this);+ this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, zt && zt.push(this);}rn.prototype.c = function() {var e = this.S();@@ -2084,11 +2106,11 @@ rn.prototype.c = function() {}}, rn.prototype.S = function() {if (1 & this.f) throw Error("Cycle detected");- this.f |= 1, this.f &= -9, en(this), Zt(this), X++;- var e = Y;- return Y = this, nn.bind(this, e);+ this.f |= 1, this.f &= -9, en(this), Xt(this), Z++;+ var e = X;+ return X = this, nn.bind(this, e);}, rn.prototype.N = function() {- 2 & this.f || (this.f |= 2, this.u = Ht, Ht = this);+ 2 & this.f || (this.f |= 2, this.u = Vt, Vt = this);}, rn.prototype.d = function() {this.f |= 8, 1 & this.f || tn(this);}, rn.prototype.dispose = function() {@@ -2123,7 +2145,7 @@ function dn(e) {function fn(e) {var t = this, n = e.data, r = mn(n);r.name = "ReactiveDom", r.value = n;- var i = at(function() {+ var i = it(function() {for (var e = t, n = t.__v; n = n.__;) if (n.__c) {n.__c.__$f |= 4;break;@@ -2145,7 +2167,7 @@ function fn(e) {}, []), a = i[0], o = i[1];return a.value ? o.peek() : o.value;}-fn.displayName = "ReactiveTextNode", Object.defineProperties(Z.prototype, {+fn.displayName = "ReactiveTextNode", Object.defineProperties(Q.prototype, {constructor: {configurable: !0,value: void 0@@ -2172,12 +2194,12 @@ fn.displayName = "ReactiveTextNode", Object.defineProperties(Z.prototype, {var n, r = t.props;for (var i in r) if (i !== "children") {var a = r[i];- a instanceof Z && (n || (t.__np = n = {}), n[i] = a, r[i] = a.peek());+ a instanceof Q && (n || (t.__np = n = {}), n[i] = a, r[i] = a.peek());}}e(t);}), un("__r", function(e, t) {- if (e(t), t.type !== I) {+ if (e(t), t.type !== L) {dn();var n, r = t.__c;r && (r.__$f &= -2, (n = r.__$u) === void 0 && (r.__$u = n = function(e, t) {@@ -2211,7 +2233,7 @@ fn.displayName = "ReactiveTextNode", Object.defineProperties(Z.prototype, {e(t);});function pn(e, t, n, r) {- var i = t in e && e.ownerSVGElement === void 0, a = Yt(n);+ var i = t in e && e.ownerSVGElement === void 0, a = Jt(n);return {o: function(e, t) {a.value = e, r = t;@@ -2249,7 +2271,7 @@ un("unmount", function(e, t) {e(t);}), un("__h", function(e, t, n, r) {r < 3 && (t.__$f |= 2), e(t, n, r);-}), ce.prototype.shouldComponentUpdate = function(e, t) {+}), se.prototype.shouldComponentUpdate = function(e, t) {if (this.__R) return !0;var n = this.__$u, r = n && n.s !== void 0;for (var i in t) return !0;@@ -2262,8 +2284,8 @@ un("unmount", function(e, t) {return !1;};function mn(e, t) {- return at(function() {- return Yt(e, t);+ return it(function() {+ return Jt(e, t);}, []);}var hn = function(e) {@@ -2272,7 +2294,7 @@ var hn = function(e) {});};function gn() {- zt(function() {+ Rt(function() {for (var e; e = ln.shift();) on.call(e);});}@@ -2284,7 +2306,7 @@ function _n() {var vn = "/api/quality-goals?limit=200", yn = {data: null,error: ""-}, bn = Yt(yn), xn = 0, Sn = $t(() => bn.value);+}, bn = Jt(yn), xn = 0, Sn = $t(() => bn.value);$t(() => bn.value.data?.total ?? null);function Cn() {xn += 1, bn.value = yn;@@ -2292,7 +2314,7 @@ function Cn() {async function wn(e) {let t = xn += 1;try {- let n = await B(vn, e);+ let n = await V(vn, e);return t === xn && (bn.value = {data: n,error: ""@@ -2300,7 +2322,7 @@ async function wn(e) {} catch (n) {throw !e?.aborted && t === xn && (bn.value = {data: null,- error: z(n)+ error: B(n)}), n;}}@@ -2309,7 +2331,7 @@ async function wn(e) {var Tn = (e, t) => wn(t), En = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;function Dn({ openItem: t, javTitleHtml: n, javDisplayName: a, srcBadge: o }) {let { data: s, error: c } = Sn.value;- if (c) return /* @__PURE__ */ J("div", {+ if (c) return /* @__PURE__ */ Y("div", {class: "qualitylist",dangerouslySetInnerHTML: { __html: p(c, {variant: "error",@@ -2317,44 +2339,44 @@ function Dn({ openItem: t, javTitleHtml: n, javDisplayName: a, srcBadge: o }) {}) }});let l = s?.items ?? [];- return l.length ? /* @__PURE__ */ J("div", {+ return l.length ? /* @__PURE__ */ Y("div", {class: "qualitylist",- children: l.map((s) => /* @__PURE__ */ J("article", {+ children: l.map((s) => /* @__PURE__ */ Y("article", {class: "qualityitem",- children: [/* @__PURE__ */ J("button", {+ children: [/* @__PURE__ */ Y("button", {class: "qualitycover",type: "button","aria-label": `打开 ${a(s)}`,onClick: () => t(s.id),- children: /* @__PURE__ */ J("img", {+ children: /* @__PURE__ */ Y("img", {src: En(s),alt: "",loading: "lazy",onError: (e) => e.currentTarget.remove()})- }), /* @__PURE__ */ J("div", { children: [- /* @__PURE__ */ J("h3", { children: /* @__PURE__ */ J("button", {+ }), /* @__PURE__ */ Y("div", { children: [+ /* @__PURE__ */ Y("h3", { children: /* @__PURE__ */ Y("button", {type: "button","data-middle-truncate": !0,onClick: () => t(s.id),dangerouslySetInnerHTML: { __html: n(s) }}) }),- /* @__PURE__ */ J("p", {+ /* @__PURE__ */ Y("p", {class: "mono",children: [- /* @__PURE__ */ J("span", {+ /* @__PURE__ */ Y("span", {style: "display:contents",dangerouslySetInnerHTML: { __html: o(s.location, s.cost) }}),- /* @__PURE__ */ J("span", { children: e[s.location] ?? s.location }),- /* @__PURE__ */ J("span", { children: r(s.duration) }),- /* @__PURE__ */ J("span", { children: i(s.size ?? 0) })+ /* @__PURE__ */ Y("span", { children: e[s.location] ?? s.location }),+ /* @__PURE__ */ Y("span", { children: r(s.duration) }),+ /* @__PURE__ */ Y("span", { children: i(s.size ?? 0) })]}),- s.reason ? /* @__PURE__ */ J("p", { children: s.reason }) : null+ s.reason ? /* @__PURE__ */ Y("p", { children: s.reason }) : null] })]}, s.id))- }) : /* @__PURE__ */ J("div", {+ }) : /* @__PURE__ */ Y("div", {class: "qualitylist",dangerouslySetInnerHTML: { __html: u("sparkles", "没有标记中的高清版目标", "现有版本都已满足条件,或还没有加入追踪。") }});@@ -2406,37 +2428,37 @@ function kn(e) {}//#endregion//#region src/islands/scraping.tsx-var An = (e, t) => B("/api/scraping", t);+var An = (e, t) => V("/api/scraping", t);function jn({ value: e, onChange: t }) {- let n = q(null), r = q(t);- return r.current = t, K(() => {+ let n = J(null), r = J(t);+ return r.current = t, q(() => {let t = n.current;t.innerHTML = g([["peach", "Peach 代理"], ["direct", "直接连接"]], e, { label: "连接方式" });let i = b(t.firstElementChild), a = () => r.current(i.value);return i.addEventListener("change", a), () => {i.disabled = !0, i.removeEventListener("change", a), t.replaceChildren();};- }, []), /* @__PURE__ */ J("div", {+ }, []), /* @__PURE__ */ Y("div", {ref: n,class: "scraping-network"});}function Mn({ source: e, toast: t }) {- let [r, i] = W(e), [a, o] = W(e.network), [s, c] = W(""), [l, u] = W(""), [f, m] = W("paste"), [h, g] = W(""), [_, y] = W(!1), [b, x] = W(""), [S, C] = W([]), w = q(null), T = q(null);- K(() => {+ let [r, i] = G(e), [a, o] = G(e.network), [s, c] = G(""), [l, u] = G(""), [f, m] = G("paste"), [h, g] = G(""), [_, y] = G(!1), [b, x] = G(""), [S, C] = G([]), w = J(null), T = J(null);+ q(() => {T.current?.querySelectorAll("footer button").forEach((e) => v(e, _));}, [_]);- let E = q(new AbortController());- G(() => () => E.current.abort(), []);+ let E = J(new AbortController());+ K(() => () => E.current.abort(), []);async function D(n) {if (!_) {y(!0), x(""), C([]);try {if (n === "check") {- let t = await V("/api/scraping/check", { source: e.source }, "POST", E.current.signal);+ let t = await H("/api/scraping/check", { source: e.source }, "POST", E.current.signal);E.current.signal.aborted || C(t.results);} else {- let r = await V("/api/scraping/settings", {+ let r = await H("/api/scraping/settings", {source: e.source,network: a,cookie: s,@@ -2446,33 +2468,33 @@ function Mn({ source: e, toast: t }) {E.current.signal.aborted || (i(r.saved), c(""), u(""), g(""), w.current && (w.current.value = ""), t(n === "revoke" ? "Cookie 已撤销" : "来源设置已保存"));}} catch (e) {- E.current.signal.aborted || x(z(e));+ E.current.signal.aborted || x(B(e));} finally {E.current.signal.aborted || y(!1);}}}- return /* @__PURE__ */ J("section", {+ return /* @__PURE__ */ Y("section", {class: "scraping-source",- children: /* @__PURE__ */ J("form", {+ children: /* @__PURE__ */ Y("form", {ref: T,class: "cleanupfieldset","data-geist-fieldset": !0,onSubmit: (e) => {e.preventDefault(), D("save");},- children: [/* @__PURE__ */ J("div", {+ children: [/* @__PURE__ */ Y("div", {class: "geist-fieldset-content scraping-fields",children: [- /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y("div", {class: "geist-fieldset-heading",- children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d(`scraping-${e.source}`, e.label) } }), /* @__PURE__ */ J("a", {+ children: [/* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: d(`scraping-${e.source}`, e.label) } }), /* @__PURE__ */ Y("a", {class: "scraping-url externallink",href: e.login,target: "_blank",rel: "noopener noreferrer",children: [- /* @__PURE__ */ J("img", {+ /* @__PURE__ */ Y("img", {src: n(e.login),alt: "",width: "16",@@ -2480,35 +2502,35 @@ function Mn({ source: e, toast: t }) {loading: "lazy",onError: (e) => e.currentTarget.remove()}),- /* @__PURE__ */ J("span", { children: e.login }),- /* @__PURE__ */ J("svg", {+ /* @__PURE__ */ Y("span", { children: e.login }),+ /* @__PURE__ */ Y("svg", {class: "externalmark",viewBox: "0 0 24 24","aria-hidden": "true",- children: /* @__PURE__ */ J("use", { href: "#i-external-link" })+ children: /* @__PURE__ */ Y("use", { href: "#i-external-link" })})]})]}),- /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y("div", {class: "scraping-label",- children: ["连接方式", /* @__PURE__ */ J(jn, {+ children: ["连接方式", /* @__PURE__ */ Y(jn, {value: a,onChange: o})]}),- a === "peach" && /* @__PURE__ */ J("a", {+ a === "peach" && /* @__PURE__ */ Y("a", {class: "geist-text-link",href: "/configuration#peachProxy",children: "配置 Peach 代理"}),- e.accepts_cookie && /* @__PURE__ */ J(I, { children: [- /* @__PURE__ */ J("p", { children: r.cookie_saved ? "Cookie 已保存,登录是否有效请在抓取时确认。" : "需要登录时,任选一种方式提供 Cookie。" }),- /* @__PURE__ */ J("div", {+ e.accepts_cookie && /* @__PURE__ */ Y(L, { children: [+ /* @__PURE__ */ Y("p", { children: r.cookie_saved ? "Cookie 已保存,登录是否有效请在抓取时确认。" : "需要登录时,任选一种方式提供 Cookie。" }),+ /* @__PURE__ */ Y("div", {class: "insightswitch scraping-cookie-method",role: "radiogroup","aria-label": "提供 Cookie 的方式(二选一)",- children: [["paste", "粘贴 Cookie"], ["file", "导入文件"]].map(([t, n]) => /* @__PURE__ */ J("label", { children: [/* @__PURE__ */ J("input", {+ children: [["paste", "粘贴 Cookie"], ["file", "导入文件"]].map(([t, n]) => /* @__PURE__ */ Y("label", { children: [/* @__PURE__ */ Y("input", {type: "radio",name: `cookie-method-${e.source}`,value: t,@@ -2516,29 +2538,29 @@ function Mn({ source: e, toast: t }) {onChange: () => {m(t), c(""), u(""), g("");}- }), /* @__PURE__ */ J("span", { children: n })] }, t))+ }), /* @__PURE__ */ Y("span", { children: n })] }, t))}),- f === "paste" ? /* @__PURE__ */ J("label", { children: ["Cookie", /* @__PURE__ */ J("input", {+ f === "paste" ? /* @__PURE__ */ Y("label", { children: ["Cookie", /* @__PURE__ */ Y("input", {class: "geist-input",type: "password",autoComplete: "off",value: s,disabled: _,onInput: (e) => c(e.currentTarget.value)- })] }) : /* @__PURE__ */ J("label", {+ })] }) : /* @__PURE__ */ Y("label", {class: "scraping-file",- children: ["Netscape Cookie 文件(.txt)", /* @__PURE__ */ J("span", {+ children: ["Netscape Cookie 文件(.txt)", /* @__PURE__ */ Y("span", {class: "scraping-file-control",children: [- /* @__PURE__ */ J("span", {+ /* @__PURE__ */ Y("span", {class: "geist-button",children: "选择文件"}),- /* @__PURE__ */ J("span", {+ /* @__PURE__ */ Y("span", {class: "scraping-file-name",children: h || "未选择文件"}),- /* @__PURE__ */ J("input", {+ /* @__PURE__ */ Y("input", {ref: w,type: "file",accept: ".txt",@@ -2568,32 +2590,32 @@ function Mn({ source: e, toast: t }) {})]})] }),- b && /* @__PURE__ */ J("div", {+ b && /* @__PURE__ */ Y("div", {role: "alert",dangerouslySetInnerHTML: { __html: p(b, { variant: "error" }) }}),- S.map((t) => /* @__PURE__ */ J("div", {+ S.map((t) => /* @__PURE__ */ Y("div", {role: "status",dangerouslySetInnerHTML: { __html: p(`${e.label}${t.label === "来源页面" ? "" : " 高清图片"}:${t.ok ? "可连接" : "不能连接"}` + (t.width ? ` · ${t.width} × ${t.height}` : "") + (t.message ? `。${t.message}` : ""), { variant: t.ok ? "success" : "error" }) }}, t.label))]- }), /* @__PURE__ */ J("footer", {+ }), /* @__PURE__ */ Y("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,children: [- e.accepts_cookie && r.cookie_saved && /* @__PURE__ */ J("button", {+ e.accepts_cookie && r.cookie_saved && /* @__PURE__ */ Y("button", {class: "geist-button",type: "button",onClick: () => void D("revoke"),children: "撤销 Cookie"}),- /* @__PURE__ */ J("button", {+ /* @__PURE__ */ Y("button", {class: "geist-button",type: "button",onClick: () => void D("check"),children: "检查连接"}),- /* @__PURE__ */ J("button", {+ /* @__PURE__ */ Y("button", {class: "geist-button primary",type: "submit",children: "保存"@@ -2604,13 +2626,13 @@ function Mn({ source: e, toast: t }) {});}function Nn({ data: e, error: t, toast: n }) {- let [r, i] = W(""), [a, o] = W(!1), [s, c] = W(""), l = q(null);- K(() => v(l.current, a), [a]);- let u = q(new AbortController()), f = q(0);+ let [r, i] = G(""), [a, o] = G(!1), [s, c] = G(""), l = J(null);+ q(() => v(l.current, a), [a]);+ let u = J(new AbortController()), f = J(0);async function m(e = !1) {let t = ++f.current;await On({- read: (e) => B("/api/scraping/cover", e),+ read: (e) => V("/api/scraping/cover", e),active: () => !u.current.signal.aborted && t === f.current,render: (t) => {o(t.status === "running"), t.status === "running" && (e = !1), t.status === "failed" && !e && c(t.error || "采集未取得"), t.status === "complete" && !e && n(t.result || "封面采集完成");@@ -2618,37 +2640,37 @@ function Nn({ data: e, error: t, toast: n }) {disconnected: () => c("连接中断,正在重新读取后台进度")});}- G(() => (m(!0), () => u.current.abort()), []);+ K(() => (m(!0), () => u.current.abort()), []);async function h() {if (!a) {f.current++, o(!0), c("");try {- await V("/api/scraping/cover", { code: r }, "POST", u.current.signal), await m();+ await H("/api/scraping/cover", { code: r }, "POST", u.current.signal), await m();} catch (e) {- u.current.signal.aborted || (o(!1), c(z(e)));+ u.current.signal.aborted || (o(!1), c(B(e)));}}}- return t ? /* @__PURE__ */ J("div", {+ return t ? /* @__PURE__ */ Y("div", {role: "alert",dangerouslySetInnerHTML: { __html: p(t, { variant: "error" }) }- }) : /* @__PURE__ */ J("div", {+ }) : /* @__PURE__ */ Y("div", {class: "scraping-page",children: [- /* @__PURE__ */ J("p", { children: "高清图片可能需要代理才能下载,请先检查连接。" }),- /* @__PURE__ */ J("section", {+ /* @__PURE__ */ Y("p", { children: "高清图片可能需要代理才能下载,请先检查连接。" }),+ /* @__PURE__ */ Y("section", {class: "cleanupfieldset scraping-source","data-geist-fieldset": !0,- children: /* @__PURE__ */ J("div", {+ children: /* @__PURE__ */ Y("div", {class: "geist-fieldset-content scraping-fields",children: [- /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d("scraping-cover", "高清封面") } }),- /* @__PURE__ */ J("form", {+ /* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: d("scraping-cover", "高清封面") } }),+ /* @__PURE__ */ Y("form", {class: "scraping-cover-form",onSubmit: (e) => {e.preventDefault(), h();},- children: [/* @__PURE__ */ J("input", {+ children: [/* @__PURE__ */ Y("input", {class: "geist-input","aria-label": "馆藏番号",required: !0,@@ -2656,21 +2678,21 @@ function Nn({ data: e, error: t, toast: n }) {disabled: a,placeholder: "输入馆藏番号,如 ABW-232",onInput: (e) => i(e.currentTarget.value)- }), /* @__PURE__ */ J("button", {+ }), /* @__PURE__ */ Y("button", {ref: l,class: "geist-button primary",type: "submit",children: "抓取封面"})]}),- s && /* @__PURE__ */ J("div", {+ s && /* @__PURE__ */ Y("div", {role: "alert",dangerouslySetInnerHTML: { __html: p(s, { variant: "error" }) }})]})}),- e?.sources.map((e) => /* @__PURE__ */ J(Mn, {+ e?.sources.map((e) => /* @__PURE__ */ Y(Mn, {source: e,toast: n}, e.source))@@ -2679,14 +2701,14 @@ function Nn({ data: e, error: t, toast: n }) {}//#endregion//#region src/islands/library-processing.tsx-var Pn = (e, t) => B("/api/library-processing", t);+var Pn = (e, t) => V("/api/library-processing", t);function Fn({ data: e, error: t, toast: n, onComplete: r, mode: i, monitor: a }) {- let [o, s] = W(e || { status: "idle" }), [c, l] = W(t), [u, m] = W(!1), [g, _] = W(!1), y = q(new AbortController()), b = q(0), x = q(o.status), S = q(null), C = u || o.status === "running";- K(() => v(S.current, C), [C]);+ let [o, s] = G(e || { status: "idle" }), [c, l] = G(t), [u, m] = G(!1), [g, _] = G(!1), y = J(new AbortController()), b = J(0), x = J(o.status), S = J(null), C = u || o.status === "running";+ q(() => v(S.current, C), [C]);async function w() {let e = ++b.current;await On({- read: (e) => B("/api/library-processing", e),+ read: (e) => V("/api/library-processing", e),active: () => !y.current.signal.aborted && b.current === e,keepWatching: i === "notice" || !!a,render: (e) => {@@ -2695,23 +2717,23 @@ function Fn({ data: e, error: t, toast: n, onComplete: r, mode: i, monitor: a })disconnected: () => l("连接中断,正在重新读取处理进度")});}- G(() => ((o.status === "running" || i === "notice" || a) && w(), () => y.current.abort()), []);+ K(() => ((o.status === "running" || i === "notice" || a) && w(), () => y.current.abort()), []);async function T() {if (!C) {m(!0), l(""), _(!1);try {- let e = await V("/api/library-processing", {}, "POST", y.current.signal);+ let e = await H("/api/library-processing", {}, "POST", y.current.signal);if (y.current.signal.aborted) return;x.current = e.status, s(e), m(!1), await w();} catch (e) {- y.current.signal.aborted || (l(z(e)), m(!1));+ y.current.signal.aborted || (l(B(e)), m(!1));}}}if (i === "notice") {if (!c && o.status !== "running" && o.status !== "failed") return null;let e = c || (o.status === "failed" ? "扫描与资料采集未完成" : `${o.stage || "正在整理馆藏"}${o.total ? ` · ${o.checked || 0} / ${o.total}` : ""}`);- return /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: h(e, {+ return /* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: h(e, {variant: o.status === "failed" ? "error" : c ? "warning" : "gray",href: "/data-cleanup#libraryProcessing",label: c || o.status === "failed" ? "查看并处理" : "查看进度",@@ -2719,16 +2741,16 @@ function Fn({ data: e, error: t, toast: n, onComplete: r, mode: i, monitor: a })...o.status === "running" && o.total !== void 0 ? { max: o.total } : {}}) } });}- return /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J("div", {+ return /* @__PURE__ */ Y(L, { children: [/* @__PURE__ */ Y("div", {class: "geist-fieldset-content library-processing",children: [- /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d("cleanupScrapingTitle", "扫描与采集") } }),- /* @__PURE__ */ J("p", { children: "扫描媒体文件夹,导入已有资料,采集缺失信息。" }),- /* @__PURE__ */ J("div", {+ /* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: d("cleanupScrapingTitle", "扫描与采集") } }),+ /* @__PURE__ */ Y("p", { children: "扫描媒体文件夹,导入已有资料,采集缺失信息。" }),+ /* @__PURE__ */ Y("div", {"aria-live": "polite",children: [- o.status === "running" && /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: f(`${o.stage || "正在处理"}${o.total ? ` · ${o.checked || 0} / ${o.total}` : ""}`) } }), !!o.total && /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: Fe(`已处理 ${o.checked || 0} / ${o.total} 个视频`, o.checked || 0, o.total) } })] }),- (c || o.status === "failed") && /* @__PURE__ */ J("div", {+ o.status === "running" && /* @__PURE__ */ Y(L, { children: [/* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: f(`${o.stage || "正在处理"}${o.total ? ` · ${o.checked || 0} / ${o.total}` : ""}`) } }), !!o.total && /* @__PURE__ */ Y("div", { dangerouslySetInnerHTML: { __html: Pe(`已处理 ${o.checked || 0} / ${o.total} 个视频`, o.checked || 0, o.total) } })] }),+ (c || o.status === "failed") && /* @__PURE__ */ Y("div", {role: "alert",onClick: (e) => {e.target.closest("[data-note-action]") && T();@@ -2739,15 +2761,15 @@ function Fn({ data: e, error: t, toast: n, onComplete: r, mode: i, monitor: a })actionLabel: o.status === "failed" ? "重试未完成项" : ""}) }}),- o.status === "failed" && !!o.issues?.length && /* @__PURE__ */ J("ul", { children: o.issues.slice(0, 20).map((e) => /* @__PURE__ */ J("li", { children: [- e.asset_id ? /* @__PURE__ */ J("a", {+ o.status === "failed" && !!o.issues?.length && /* @__PURE__ */ Y("ul", { children: o.issues.slice(0, 20).map((e) => /* @__PURE__ */ Y("li", { children: [+ e.asset_id ? /* @__PURE__ */ Y("a", {href: `/item/${e.asset_id}`,children: "查看视频"}) : null,e.asset_id ? ":" : "",e.message] })) }),- g && /* @__PURE__ */ J("div", {+ g && /* @__PURE__ */ Y("div", {class: "library-processing-result",dangerouslySetInnerHTML: { __html: p(`已扫描 ${o.scanned || 0} 个文件,识别 ${o.identified || 0} 个番号,整理 ${o.candidates || 0} 组资料候选。`, {variant: "success",@@ -2757,21 +2779,21 @@ function Fn({ data: e, error: t, toast: n, onComplete: r, mode: i, monitor: a })]})]- }), /* @__PURE__ */ J("footer", {+ }), /* @__PURE__ */ Y("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,children: [- /* @__PURE__ */ J("a", {+ /* @__PURE__ */ Y("a", {class: "geist-button",href: "/scraping",children: "采集来源"}),- !!o.candidates && /* @__PURE__ */ J("a", {+ !!o.candidates && /* @__PURE__ */ Y("a", {class: "geist-button",href: "/review",children: "复核资料"}),- o.status !== "failed" && /* @__PURE__ */ J("button", {+ o.status !== "failed" && /* @__PURE__ */ Y("button", {ref: S,type: "button",class: "geist-button primary",@@ -2896,7 +2918,7 @@ async function Jn(e, t, n, r) {} catch (e) {i.push({key: o.key,- message: z(e)+ message: B(e)});}}@@ -2970,15 +2992,15 @@ function Xn(e, t) {let j = e.querySelector(".reviewcontrols");j ? j.append(p) : n.before(p), e.append(k), n.classList.add("reviewgroups");let ee = () => {- r.selected.clear(), r.anchor = null, N();+ r.selected.clear(), r.anchor = null, P();};A.onclick = () => {r.busy || (ee(), S.focus({ preventScroll: !0 }));}, S.onclick = () => {if (r.busy) return;let e = s(), t = l().length === e.length;- e.forEach((e) => t ? r.selected.delete(e.dataset.reviewKey) : r.selected.add(e.dataset.reviewKey)), N();- }, C.onclick = () => P("approved", C), w.onclick = () => P("rejected", w);+ e.forEach((e) => t ? r.selected.delete(e.dataset.reviewKey) : r.selected.add(e.dataset.reviewKey)), P();+ }, C.onclick = () => F("approved", C), w.onclick = () => F("rejected", w);let M = [];for (let e of o) {let t = e.rows.map((e) => i.find((t) => t.dataset.reviewKey === e.item_key)).filter((e) => !!e), a = document.createElement("section");@@ -2991,7 +3013,7 @@ function Xn(e, t) {d.className = "reviewlist", o.append(l, u), a.append(o, d), n.append(a), u.onclick = () => {if (r.busy) return;let e = t.every((e) => r.selected.has(e.dataset.reviewKey));- t.forEach((t) => e ? r.selected.delete(t.dataset.reviewKey) : r.selected.add(t.dataset.reviewKey)), N();+ t.forEach((t) => e ? r.selected.delete(t.dataset.reviewKey) : r.selected.add(t.dataset.reviewKey)), P();}, M.push(() => {u.textContent = t.every((e) => r.selected.has(e.dataset.reviewKey)) ? "清空本组" : "全选本组";});@@ -3007,7 +3029,7 @@ function Xn(e, t) {e.className = "reviewpickname", e.append(...n.childNodes), n.classList.add("reviewpickheading"), n.append(i, e);} else e.prepend(i);let o = (e, n) => {- qn(r, s().map((e) => e.dataset.reviewKey), t, e, n), N();+ qn(r, s().map((e) => e.dataset.reviewKey), t, e, n), P();};if (i.addEventListener("mousedown", (e) => {e.shiftKey && e.preventDefault();@@ -3021,7 +3043,7 @@ function Xn(e, t) {else if (n.key === "ArrowDown" || n.key === "ArrowUp") {n.preventDefault();let i = s(), a = i[i.indexOf(e) + (n.key === "ArrowDown" ? 1 : -1)];- a && (r.anchor === null && (r.anchor = t), qn(r, i.map((e) => e.dataset.reviewKey), a.dataset.reviewKey, !0, !0), N(), a.querySelector(".reviewpickitem input")?.focus());+ a && (r.anchor === null && (r.anchor = t), qn(r, i.map((e) => e.dataset.reviewKey), a.dataset.reviewKey, !0, !0), P(), a.querySelector(".reviewpickitem input")?.focus());}}}), M.push(() => {@@ -3039,22 +3061,22 @@ function Xn(e, t) {n.target.closest("[data-review-asset],[data-pick-all],[data-pick-none]") && r.assets.set(t, [...e.querySelectorAll("[data-review-asset][aria-pressed=\"true\"]")].map((e) => Number(e.dataset.reviewAsset)));});for (let n of e.querySelectorAll("input[type=\"radio\"]")) r.choices.has(t) && (n.checked = r.choices.get(t) === n.value), n.addEventListener("change", () => {- n.checked && r.choices.set(t, n.value), N();+ n.checked && r.choices.set(t, n.value), P();});}}e.addEventListener("keydown", (t) => {- r.busy || !e.contains(n) || (t.key === "Escape" && r.selected.size && (t.preventDefault(), t.stopPropagation(), ee()), (t.ctrlKey || t.metaKey) && t.key.toLowerCase() === "a" && !t.target.matches("textarea,input:not([type=\"checkbox\"]):not([type=\"radio\"])") && (t.preventDefault(), t.stopPropagation(), s().forEach((e) => r.selected.add(e.dataset.reviewKey)), N()));+ r.busy || !e.contains(n) || (t.key === "Escape" && r.selected.size && (t.preventDefault(), t.stopPropagation(), ee()), (t.ctrlKey || t.metaKey) && t.key.toLowerCase() === "a" && !t.target.matches("textarea,input:not([type=\"checkbox\"]):not([type=\"radio\"])") && (t.preventDefault(), t.stopPropagation(), s().forEach((e) => r.selected.add(e.dataset.reviewKey)), P()));});- let te = "";- function N() {+ let N = "";+ function P() {let e = l();S.textContent = e.length === s().length ? "清空当前选择" : r.filter ? "全选当前分类" : "全选本页", k.hidden = !e.length, T.textContent = `已选 ${e.length} 项`, C.disabled = !e.length || e.some((e) => !d(e)), w.disabled = !e.length;let n = Yn(u());E.hidden = !t.metadata || !u().some((e) => (e.candidates?.length || 0) > 1);let i = e.length && !n.length ? "所选项目无共同来源" : "统一选择来源", a = JSON.stringify([i, n]);- if (a !== te) {- te = a, E.innerHTML = g([["", i], ...n.map((e) => [e, e])], "", { label: "统一选择来源" });+ if (a !== N) {+ N = a, E.innerHTML = g([["", i], ...n.map((e) => [e, e])], "", { label: "统一选择来源" });let e = b(E.firstElementChild);e.disabled = !n.length, e.addEventListener("change", () => {if (!(r.busy || !Yn(u()).includes(e.value))) {@@ -3070,7 +3092,7 @@ function Xn(e, t) {}M.forEach((e) => e());}- async function P(n, i) {+ async function F(n, i) {if (r.busy || !l().length) return;let a = l().map((e) => ({key: e.dataset.reviewKey,@@ -3107,7 +3129,7 @@ function Xn(e, t) {let f = e.parentElement;t.refresh(), f?.querySelector(".reviewbulktoolbar button")?.focus({ preventScroll: !0 });}- N(), Wn(e);+ P(), Wn(e);}//#endregion//#region src/native-image.ts@@ -3142,8 +3164,18 @@ function $n(e, t) {<div class="entitysection">${t}</div></div></section>`;}//#endregion+//#region src/board-skeleton.ts+function er(e) {+ let t = (e = "60%") => `<i class="skeleton" style="width:${e}"></i>`, n = () => `<div class="board-skeleton-row">${t("36%")}${t("24%")}</div>`, r = "";+ if (e === "/stats" || e === "/taste") r = `${e === "/taste" ? `<div class="board-skeleton-row">${t("26%")}${t("32%")}</div>` : ""}<div class="metricstrip board-skeleton-metrics">${Array.from({ length: 4 }, () => `<div class="tastesummary">${t()}<b class="skeleton"></b><small class="board-stat-footer">${t("48%")}</small></div>`).join("")}</div><div class="board-skeleton-chart"><div class="board-skeleton-ring skeleton"></div><div>${n().repeat(4)}</div></div><div class="board-skeleton-section">${t("32%")}${n().repeat(5)}</div>`;+ else if (e === "/follow-manage") r = `<div class="board-skeleton-section">${t("20%")}<div class="skeleton board-skeleton-input"></div>${t("72%")}</div><div class="board-skeleton-row">${t("24%")}${t("40%")}</div><div class="board-skeleton-section">${n().repeat(6)}</div><div class="board-skeleton-row">${t("30%")}${t("30%")}</div>`;+ else if (e === "/configuration") r = `<div class="board-skeleton-row">${t("16%").repeat(4)}</div><div class="board-skeleton-section">${t("24%")}${n().repeat(3)}<div class="skeleton board-skeleton-input"></div></div><div class="board-skeleton-section">${t("24%")}${n().repeat(2)}</div>`;+ else return "";+ return `<div class="board-page-skeleton" data-skeleton="board${e}" role="status" aria-label="正在读取页面"><div aria-hidden="true">${r}</div></div>`;+}+//#endregion//#region src/catalog-onboarding.ts-var er = [+var tr = ["loc","creator","performer",@@ -3160,16 +3192,16 @@ var er = ["jav","thumb"];-function tr() {+function nr() {let e = (e) => Array(64).fill(e).join("");return {tiers: "<div class=\"tier catalog-placeholder\" aria-hidden=\"true\">" + e("<span class=\"av\"><span class=\"ring\"></span><span class=\"nm\"> </span></span>") + "</div><div class=\"tier catalog-placeholder\" aria-hidden=\"true\">" + e("<span class=\"brandpill\"><span class=\"mk\"></span><span class=\"placeholder-name\"> </span></span>") + "</div>",tags: "<span class=\"catalog-placeholder placeholder-tags\" aria-hidden=\"true\">" + e("<span class=\"pill\"> </span>") + "</span>"};}-async function nr(e, t) {+async function rr(e, t) {let n = new URLSearchParams();- for (let t of er) e[t] && n.set(t, e[t]);+ for (let t of tr) e[t] && n.set(t, e[t]);let [r, i] = await Promise.all([t("/api/facets?" + n), t("/api/items?" + n + "&limit=5")]), a = [...new Set([...r.creators || [],...r.tagperformers || [],@@ -3180,7 +3212,7 @@ async function nr(e, t) {return r.set("q", e), r.set("limit", "1"), (await t("/api/items?" + r)).total > 0 ? e : "";}))).filter(Boolean);}-function rr({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: r = !1, online: i = !1 } = {}) {+function ir({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: r = !1, online: i = !1 } = {}) {let a = r ? "<a class=\"geist-button primary\" href=\"/configuration\">添加内容</a>" : "", o = "<a class=\"geist-button\" href=\"/follow-manage\">添加来源</a>";return t || n ? u("search", n ? "还没有符合条件的 JAV 作品" : "没有符合条件的内容", n ? "已扫描但尚未补充发行资料的视频可在全部内容中查看。" : "清除筛选或搜索条件后查看全部内容。", { actions: "<a class=\"geist-button primary\" href=\"/?loc=&thumb=0\">查看全部内容</a>" }) : e === "catalog" ? u("play", "还没有视频", "添加媒体文件夹或关注来源,开始建立你的馆藏。", { actions: a + o }) : u(e === "tags" ? "tags" : "user-round", "还没有" + ({tags: "标签",@@ -3193,7 +3225,7 @@ function rr({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable:}//#endregion//#region src/sidebar.ts-function ir(e) {+function ar(e) {return ["/","/unseen",@@ -3203,23 +3235,23 @@ function ir(e) {"/junk-files"].includes(e) || /^\/(item|mix|parts|editions)\//.test(e) || /^\/playlists\/\d+\/\d+$/.test(e) || /^\/(performers|studios|creators|series|agencies)\/.+/.test(e);}-function ar(e, t) {+function or(e, t) {return e.dataset.surface === t && e.querySelector(".dnav") ? !1 : (e.dataset.surface = t, e.replaceChildren(), !0);}-function or(e) {+function sr(e) {let t = /* @__PURE__ */ new Map();for (let n of e) for (let e of new Set(n.tags || [])) t.set(e, (t.get(e) || 0) + 1);return [...t].sort((e, t) => t[1] - e[1]).slice(0, 30);}//#endregion//#region src/management.ts-function sr(e) {+function cr(e) {return e.filter((e) => ["115", "pikpak"].includes(e.location) && (e.roots === void 0 || e.roots.length > 0)).map((e) => e.location);}-function cr(e, t) {+function lr(e, t) {return t.filter((t) => e.some((e) => e.location === t));}-function lr() {+function ur() {return `<div class="cleanuppage" data-skeleton="cleanup" aria-busy="true" aria-label="正在读取数据管理状态"><div class="cleanupgrid">${[[@@ -3265,7 +3297,7 @@ function lr() {<footer class="geist-fieldset-footer" data-geist-fieldset-footer><button type="button"${r === 3 ? " class=\"danger\"" : ""} disabled>${r === 3 ? "<svg aria-hidden=\"true\"><use href=\"#i-trash\"></use></svg><span>" + t + "</span>" : t}</button></footer></section>`).join("")}</div></div>`;}-function ur(e, t = !1, n = !1) {+function dr(e, t = !1, n = !1) {if (t || n) return "";let r = "<svg class=\"externalmark\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><use href=\"#i-external-link\"></use></svg>";return `<details class="taste-history-guide"${e ? " open" : ""}>@@ -3279,28 +3311,28 @@ function ur(e, t = !1, n = !1) {<button type="button" class="geist-button taste-guide-skip">跳过</button></div></details>`;}-var dr = "peach-taste-guide-dismissed";-function fr(e, t) {+var fr = "peach-taste-guide-dismissed";+function pr(e, t) {y(e, ".taste-history-guide", "taste-guide-collapse");let n = e.querySelector(".taste-history-guide");n?.querySelector(".taste-guide-skip")?.addEventListener("click", () => {- t.setItem(dr, "1"), n.remove();+ t.setItem(fr, "1"), n.remove();});}//#endregion//#region src/resource-sync.ts-var $ = (e = 0) => Number(e).toLocaleString(), pr = {+var $ = (e = 0) => Number(e).toLocaleString(), mr = {local: "本地磁盘",115: "115",pikpak: "PikPak"};-function mr(e, t) {+function hr(e, t) {let n = e.cache || {files: 0,bytes: 0}, r = !!(e.missing || n.files);return `<div class="resourcepanel" data-geist-fieldset><div class="resourcesources">${(e.sources || []).map((e) => `<article>- <div class="resourcesourcetitle"><b>${pr[e.location] || "媒体来源"}</b><span class="${e.online ? "online" : "offline"}">${e.online ? "可访问" : "离线,已跳过"}</span></div>+ <div class="resourcesourcetitle"><b>${mr[e.location] || "媒体来源"}</b><span class="${e.online ? "online" : "offline"}">${e.online ? "可访问" : "离线,已跳过"}</span></div><strong>${e.online ? `${$(e.missing)} 项` : "—"}</strong><small>${e.online ? `找不到文件 · 已检查 ${$(e.checked)} 项` : `馆藏中有 ${$(e.total)} 项`}</small>${e.unreadable ? `<small>${$(e.unreadable)} 项读取失败,已跳过</small>` : ""}</article>`).join("")}</div>@@ -3311,34 +3343,34 @@ function mr(e, t) {}//#endregion//#region src/jav-artwork.ts-function hr(e) {+function gr(e) {return ["small","sleeve","preview"].includes(String(e)) ? "small" : "big";}-function gr(e) {+function _r(e) {return {- javLayout: hr(e.javLayout),- javImage: _r(e.javLayout === "preview" ? "thumbnail" : e.javImage)+ javLayout: gr(e.javLayout),+ javImage: vr(e.javLayout === "preview" ? "thumbnail" : e.javImage)};}-function _r(e) {+function vr(e) {return e === "thumbnail" ? "thumbnail" : "cover";}-function vr(e, t) {- return e.is_jav && e.code && e.has_cover && (_r(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";-}function yr(e, t) {+ return e.is_jav && e.code && e.has_cover && (vr(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";+}+function br(e, t) {e.querySelectorAll("img[data-jav-image]").forEach((e) => {- let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (_r(t) === "cover" || !r)), a = i ? n : r;+ let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (vr(t) === "cover" || !r)), a = i ? n : r;e.classList.toggle("cover", i), e.classList.toggle("whole", i && e.dataset.javImageLayout !== "big"), e.classList.toggle("front", i && e.dataset.javImageLayout === "big"), e.removeAttribute("style"), a && e.getAttribute("src") !== a && (e.src = a);});}//#endregion//#region src/islands.ts-var br = {+var xr = {"library-processing": {load: Pn,component: Fn@@ -3352,19 +3384,19 @@ var br = {component: Dn},configuration: {- load: kt,- component: It+ load: Ot,+ component: Ft}-}, xr = () => Object.keys(br), Sr = /* @__PURE__ */ new Map();-async function Cr(e, t, n, r = {}) {- let i = br[e];+}, Sr = () => Object.keys(xr), Cr = /* @__PURE__ */ new Map();+async function wr(e, t, n, r = {}) {+ let i = xr[e];if (!i) throw Error(`未注册的 island:${String(e)}`);- wr(t);+ Tr(t);let a = {controller: new AbortController(),painted: !1};- Sr.set(t, a);+ Cr.set(t, a);let o;try {o = {@@ -3375,12 +3407,12 @@ async function Cr(e, t, n, r = {}) {if (a.controller.signal.aborted) return;o = {data: null,- error: z(e)+ error: B(e)};}- if (Sr.get(t) !== a) return;+ if (Cr.get(t) !== a) return;if (r.isCurrent && !r.isCurrent()) {- Sr.delete(t);+ Cr.delete(t);return;}t.textContent = "", a.painted = !0;@@ -3388,11 +3420,11 @@ async function Cr(e, t, n, r = {}) {...n,...o};- Oe(oe(i.component, s), t);+ De(ae(i.component, s), t);}-function wr(e) {- let t = Sr.get(e);- t && (t.controller.abort(), Sr.delete(e), t.painted && Oe(null, e));+function Tr(e) {+ let t = Cr.get(e);+ t && (t.controller.abort(), Cr.delete(e), t.painted && De(null, e));}//#endregion-export { dr as TASTE_GUIDE_KEY, je as boundedPreference, rr as catalogEmptyHtml, nr as catalogSuggestions, lr as cleanupSkeletonHtml, sr as cloudLocations, cr as cloudPreferenceLocations, Un as createReviewSelection, Ie as distributionChart, tr as emptyCatalogLayout, $n as entitySkeletonHtml, kn as followJobProgress, Vn as identityEvidenceHtml, xr as islandNames, vr as javImageKind, Fe as jobProgressHtml, Zn as matchesFaceSource, Cr as mountIsland, Ne as mountNumberSetting, Qn as nativeImageFit, _r as normalizeJavImage, hr as normalizeJavLayout, gr as normalizeJavPreferences, ke as preferredDirection, Re as radarChart, Le as rankedChart, Rn as refreshStore, mr as resourceScanHtml, Bn as reviewImageHtml, ir as sidebarHasCatalogContent, Be as sidebarSectionHtml, or as sidebarTagCounts, Pe as statCardBody, Ln as storeNames, yr as syncJavImages, Me as syncNumberSetting, ar as syncSidebarSurface, ur as tasteHistoryGuideHtml, Ue as transitionTheme, wr as unmountIsland, Wn as updateReviewSticky, On as watchJob, Hn as wireReviewPictures, Xn as wireReviewSelection, Ve as wireSidebarGroups, fr as wireTasteHistoryGuide };+export { fr as TASTE_GUIDE_KEY, er as boardPageSkeleton, Ae as boundedPreference, ir as catalogEmptyHtml, rr as catalogSuggestions, ur as cleanupSkeletonHtml, cr as cloudLocations, lr as cloudPreferenceLocations, Un as createReviewSelection, Fe as distributionChart, nr as emptyCatalogLayout, $n as entitySkeletonHtml, kn as followJobProgress, Vn as identityEvidenceHtml, Sr as islandNames, yr as javImageKind, Pe as jobProgressHtml, Zn as matchesFaceSource, wr as mountIsland, Me as mountNumberSetting, Qn as nativeImageFit, vr as normalizeJavImage, gr as normalizeJavLayout, _r as normalizeJavPreferences, Oe as preferredDirection, Le as radarChart, Ie as rankedChart, Rn as refreshStore, hr as resourceScanHtml, Bn as reviewImageHtml, ar as sidebarHasCatalogContent, ze as sidebarSectionHtml, sr as sidebarTagCounts, Ne as statCardBody, Ln as storeNames, br as syncJavImages, je as syncNumberSetting, or as syncSidebarSurface, dr as tasteHistoryGuideHtml, He as transitionTheme, Tr as unmountIsland, Wn as updateReviewSticky, On as watchJob, Hn as wireReviewPictures, Xn as wireReviewSelection, Be as wireSidebarGroups, pr as wireTasteHistoryGuide };diff --git a/web/vendor/inter/5.3.0/LICENSE b/web/vendor/inter/5.3.0/LICENSEnew file mode 100644index 000000000..40589daa9--- /dev/null+++ b/web/vendor/inter/5.3.0/LICENSE@@ -0,0 +1,93 @@+Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)++This Font Software is licensed under the SIL Open Font License, Version 1.1.+This license is copied below, and is also available with a FAQ at:+http://scripts.sil.org/OFL+++-----------------------------------------------------------+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007+-----------------------------------------------------------++PREAMBLE+The goals of the Open Font License (OFL) are to stimulate worldwide+development of collaborative font projects, to support the font creation+efforts of academic and linguistic communities, and to provide a free and+open framework in which fonts may be shared and improved in partnership+with others.++The OFL allows the licensed fonts to be used, studied, modified and+redistributed freely as long as they are not sold by themselves. The+fonts, including any derivative works, can be bundled, embedded,+redistributed and/or sold with any software provided that any reserved+names are not used by derivative works. The fonts and derivatives,+however, cannot be released under any other type of license. The+requirement for fonts to remain under this license does not apply+to any document created using the fonts or their derivatives.++DEFINITIONS+"Font Software" refers to the set of files released by the Copyright+Holder(s) under this license and clearly marked as such. This may+include source files, build scripts and documentation.++"Reserved Font Name" refers to any names specified as such after the+copyright statement(s).++"Original Version" refers to the collection of Font Software components as+distributed by the Copyright Holder(s).++"Modified Version" refers to any derivative made by adding to, deleting,+or substituting -- in part or in whole -- any of the components of the+Original Version, by changing formats or by porting the Font Software to a+new environment.++"Author" refers to any designer, engineer, programmer, technical+writer or other person who contributed to the Font Software.++PERMISSION & CONDITIONS+Permission is hereby granted, free of charge, to any person obtaining+a copy of the Font Software, to use, study, copy, merge, embed, modify,+redistribute, and sell modified and unmodified copies of the Font+Software, subject to the following conditions:++1) Neither the Font Software nor any of its individual components,+in Original or Modified Versions, may be sold by itself.++2) Original or Modified Versions of the Font Software may be bundled,+redistributed and/or sold with any software, provided that each copy+contains the above copyright notice and this license. These can be+included either as stand-alone text files, human-readable headers or+in the appropriate machine-readable metadata fields within text or+binary files as long as those fields can be easily viewed by the user.++3) No Modified Version of the Font Software may use the Reserved Font+Name(s) unless explicit written permission is granted by the corresponding+Copyright Holder. This restriction only applies to the primary font name as+presented to the users.++4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font+Software shall not be used to promote, endorse or advertise any+Modified Version, except to acknowledge the contribution(s) of the+Copyright Holder(s) and the Author(s) or with their explicit written+permission.++5) The Font Software, modified or unmodified, in part or in whole,+must be distributed entirely under this license, and must not be+distributed under any other license. The requirement for fonts to+remain under this license does not apply to any document created+using the Font Software.++TERMINATION+This license becomes null and void if any of the above conditions are+not met.++DISCLAIMER+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM+OTHER DEALINGS IN THE FONT SOFTWARE.diff --git a/web/vendor/inter/5.3.0/ORIGIN.md b/web/vendor/inter/5.3.0/ORIGIN.mdnew file mode 100644index 000000000..2c9df191d--- /dev/null+++ b/web/vendor/inter/5.3.0/ORIGIN.md@@ -0,0 +1,15 @@+# @fontsource-variable/inter 5.3.0++- npm 包:`@fontsource-variable/[email protected]`+- npm lock integrity:`sha512-OupL48va4JNofb97w6NYeF9S7W/kHNKM0Er8Dem5nqi4jeOLrVJDoE8tZEpnMJmtkvNbB1EIPPwHcdkF6b1oUA==`+- 许可证:见同目录 `LICENSE`+- `index.css` SHA-256:`78D97E4CBC385B8D0F86F21F650073C149EDA98423BBDC49B13A13836D81E571`+- `files/inter-cyrillic-ext-wght-normal.woff2` SHA-256:`CA157063339AC4AD418F214F3ABFED119B0798AB4D377386CE5C9E5A7A435EBD`+- `files/inter-cyrillic-wght-normal.woff2` SHA-256:`71D5EE93CC1E9F1D520A3A8B66456DE18C7879D8DF09D57FCD2EAFF75FEF0075`+- `files/inter-greek-ext-wght-normal.woff2` SHA-256:`6E9E020A25F9B56D418F2C085B1D3C09725A4DA23FE693A5B463064606732190`+- `files/inter-greek-wght-normal.woff2` SHA-256:`1BE3448E292FBF05FFE176FE1E43F135013D50B1E7D324AD1A558F623D3BB6F6`+- `files/inter-latin-ext-wght-normal.woff2` SHA-256:`34B9C504CAB7A73E37B746343A449132E56CF7B5481AF2CB81DC74DCFF25C956`+- `files/inter-latin-wght-normal.woff2` SHA-256:`3100E775E8616CD2611BEECFA23A4263D7037586789B43F035236A2E6FBD4C62`+- `files/inter-vietnamese-wght-normal.woff2` SHA-256:`5C66F9E07E90C6D4AC4922CC68D60DE26C17B1858E677FB5E603FCE3952B3FF2`++Board 界面使用 Inter 可变字体;中文由系统中文字体补齐。diff --git a/web/vendor/inter/5.3.0/files/inter-cyrillic-ext-wght-normal.woff2 b/web/vendor/inter/5.3.0/files/inter-cyrillic-ext-wght-normal.woff2new file mode 100644index 000000000..de83a9c74Binary files /dev/null and b/web/vendor/inter/5.3.0/files/inter-cyrillic-ext-wght-normal.woff2 differdiff --git a/web/vendor/inter/5.3.0/files/inter-cyrillic-wght-normal.woff2 b/web/vendor/inter/5.3.0/files/inter-cyrillic-wght-normal.woff2new file mode 100644index 000000000..d75091476Binary files /dev/null and b/web/vendor/inter/5.3.0/files/inter-cyrillic-wght-normal.woff2 differdiff --git a/web/vendor/inter/5.3.0/files/inter-greek-ext-wght-normal.woff2 b/web/vendor/inter/5.3.0/files/inter-greek-ext-wght-normal.woff2new file mode 100644index 000000000..6e7141f88Binary files /dev/null and b/web/vendor/inter/5.3.0/files/inter-greek-ext-wght-normal.woff2 differdiff --git a/web/vendor/inter/5.3.0/files/inter-greek-wght-normal.woff2 b/web/vendor/inter/5.3.0/files/inter-greek-wght-normal.woff2new file mode 100644index 000000000..024f07703Binary files /dev/null and b/web/vendor/inter/5.3.0/files/inter-greek-wght-normal.woff2 differdiff --git a/web/vendor/inter/5.3.0/files/inter-latin-ext-wght-normal.woff2 b/web/vendor/inter/5.3.0/files/inter-latin-ext-wght-normal.woff2new file mode 100644index 000000000..479d010d2Binary files /dev/null and b/web/vendor/inter/5.3.0/files/inter-latin-ext-wght-normal.woff2 differdiff --git a/web/vendor/inter/5.3.0/files/inter-latin-wght-normal.woff2 b/web/vendor/inter/5.3.0/files/inter-latin-wght-normal.woff2new file mode 100644index 000000000..d15208de0Binary files /dev/null and b/web/vendor/inter/5.3.0/files/inter-latin-wght-normal.woff2 differdiff --git a/web/vendor/inter/5.3.0/files/inter-vietnamese-wght-normal.woff2 b/web/vendor/inter/5.3.0/files/inter-vietnamese-wght-normal.woff2new file mode 100644index 000000000..a40c4699cBinary files /dev/null and b/web/vendor/inter/5.3.0/files/inter-vietnamese-wght-normal.woff2 differdiff --git a/web/vendor/inter/5.3.0/index.css b/web/vendor/inter/5.3.0/index.cssnew file mode 100644index 000000000..fead375af--- /dev/null+++ b/web/vendor/inter/5.3.0/index.css@@ -0,0 +1,69 @@+/* inter-cyrillic-ext-wght-normal */+@font-face {+ font-family: 'Inter Variable';+ font-style: normal;+ font-display: swap;+ font-weight: 100 900;+ src: url(./files/inter-cyrillic-ext-wght-normal.woff2) format('woff2-variations');+ unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;+}++/* inter-cyrillic-wght-normal */+@font-face {+ font-family: 'Inter Variable';+ font-style: normal;+ font-display: swap;+ font-weight: 100 900;+ src: url(./files/inter-cyrillic-wght-normal.woff2) format('woff2-variations');+ unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;+}++/* inter-greek-ext-wght-normal */+@font-face {+ font-family: 'Inter Variable';+ font-style: normal;+ font-display: swap;+ font-weight: 100 900;+ src: url(./files/inter-greek-ext-wght-normal.woff2) format('woff2-variations');+ unicode-range: U+1F00-1FFF;+}++/* inter-greek-wght-normal */+@font-face {+ font-family: 'Inter Variable';+ font-style: normal;+ font-display: swap;+ font-weight: 100 900;+ src: url(./files/inter-greek-wght-normal.woff2) format('woff2-variations');+ unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF;+}++/* inter-vietnamese-wght-normal */+@font-face {+ font-family: 'Inter Variable';+ font-style: normal;+ font-display: swap;+ font-weight: 100 900;+ src: url(./files/inter-vietnamese-wght-normal.woff2) format('woff2-variations');+ unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;+}++/* inter-latin-ext-wght-normal */+@font-face {+ font-family: 'Inter Variable';+ font-style: normal;+ font-display: swap;+ font-weight: 100 900;+ src: url(./files/inter-latin-ext-wght-normal.woff2) format('woff2-variations');+ unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;+}++/* inter-latin-wght-normal */+@font-face {+ font-family: 'Inter Variable';+ font-style: normal;+ font-display: swap;+ font-weight: 100 900;+ src: url(./files/inter-latin-wght-normal.woff2) format('woff2-variations');+ unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;+}\ No newline at end of file