Peach: Local-first video metadata scraper and media manager.
fix: 对齐设置危险区域与展开交互
longmeidao36ff59f55315
diff --git a/docs/HANDOFF.md b/docs/HANDOFF.mdindex 49143b1b5..0ca14edf7 100644--- a/docs/HANDOFF.md+++ b/docs/HANDOFF.md@@ -77,7 +77,7 @@- [Geist 控件](reference-snapshots/vercel-geist-controls-measured.md);[README 维护](README_MAINTENANCE.md)。-- 图 3、JavDB:`docs/REUSE.md`。+- 设置:`reference-snapshots/geist-settings.md`。快照、URL、版本、SHA、未取得面与 Peach 的有意差异统一登记在 `docs/reference-sources.json` 和`docs/reference-snapshots/`,每份快照自带「Peach 采用与差异」一节;获取、失效复核与接受更新的流程见diff --git a/docs/REUSE.md b/docs/REUSE.mdindex 95fe73769..c783571ae 100644--- a/docs/REUSE.md+++ b/docs/REUSE.md@@ -8,7 +8,7 @@- 独立包卸载复用正常托盘退出和 Windows PowerShell 助手;计划限制程序标记、数据直属目录、媒体不重叠,助手拒绝目录链接。临时程序、数据、媒体与无关文件组成的真实输入验证只删除计划内容。源码树仅提供手动卸载说明。- 扫描与采集统一挂在数据管理;首页进度 Banner 跳转同一入口。默认排序与方向使用浏览偏好,显式 URL 优先。-首页进度 Banner 与配置页复用 `LibraryProcessing`、`watchJob` 和 `/api/library-processing`,启动只提交一次,状态查询接续托盘首次处理。首页在完成后收起,失败提供设置跳转;配置页持续读取阶段与真实计数。Geist Banner 官方 DOM/CSS 已于 2026-09-06 取得,取证与 Peach 差异见 `docs/reference-snapshots/vercel-geist-library-banner.md`。+首页进度 Banner 与数据管理复用 `LibraryProcessing`、`watchJob` 和 `/api/library-processing`,启动只提交一次,状态查询接续托盘首次处理。首页在完成后收起,失败跳转数据管理;数据管理持续读取阶段与真实计数。Geist Banner 取证与 Peach 差异见 `docs/reference-snapshots/vercel-geist-library-banner.md`。## 独立测试包在线更新- 版本与资产信息复用 GitHub Releases REST API,测试通道包含预发布版本;查询复用项目 HTTPX 0.28.1,下载用其流式读取,ZIP 解压使用 Python 3.12+ 标准库,互斥复用 FileLock。没有新增依赖。diff --git a/docs/STATUS.md b/docs/STATUS.mdindex 35eee99bf..2ef775874 100644--- a/docs/STATUS.md+++ b/docs/STATUS.md@@ -4,7 +4,7 @@索引:`PRODUCT_BACKLOG.md`、`REUSE.md`、`HANDOFF.md`。-- 本机设置见 `REUSE.md`。+- 设置见 `REUSE.md`。## 运行态diff --git a/docs/reference-snapshots/geist-settings.md b/docs/reference-snapshots/geist-settings.mdnew file mode 100644index 000000000..3f3988587--- /dev/null+++ b/docs/reference-snapshots/geist-settings.md@@ -0,0 +1,20 @@+# Geist 设置区块取证++2026-09-06。实时浏览器访问 Fieldset 返回 `js execution timed out`;改用 HTTPX 读取官方 HTML/CSS。浏览器实时动画未取得,动画参数复用已登记的 `vercel-geist-semantics-measured.md`。本文件是人工测量笔记,不在 `docs/reference-sources.json` 中登记为上游快照。++| 来源 | HTML SHA-256 |+| --- | --- |+| https://vercel.com/geist/fieldset | 6a5bde91b9d131014d4837763227457711eee2575e68994a1d9c51a44948aa0c |+| https://vercel.com/geist/select | 921c1730ceea0220ab6507e93c636d5821bcc56bfbc97633cc4b40d8c842d52a |+| https://vercel.com/geist/collapse | ac9f84000a4a71bfabe70ac493e8f67bfc86e2b3e13cebf2daf401a59bf5b638 |++共同 CSS:`https://vercel.com/vc-ap-b3331f/_next/static/immutable/chunks/0ggp-66pwlt2m.css`,SHA-256 `ec205bee3ef6e6f0920703d79055cd9251990ecb23e12515a9ed041068245a28`。++- Error Fieldset 根带 `data-fieldset-type="error"`、红色 400 边框;正文使用背景 100;footer 使用红色 100 底、红色 400 顶边、红色 900 文字。危险按钮为实底,整卡并非全铺深红。+- Select 标签在上方,`mb-2` 对应 8px;原生选择器 `w-full` 跟随容器,文字截断、右侧留箭头位置。规范没有要求统一的固定像素宽度。+- Collapse 文档明确要求开合过渡。Peach 复用 `wireCollapse` 的高度与箭头 200ms `ease-in-out`、`aria-expanded`、`aria-controls` 和关闭时 `inert`。+- [Vercel General settings](https://vercel.com/docs/project-configuration/general-settings) 将通用设置作为独立类别。分类适合大量设置;Peach 当前采用按用途排列的 Fieldset,不再在同页叠加重复分类标题。++## Peach 采用与差异++配置顺序为自启、媒体与挂载、网络代理、访问控制、检查更新、运行信息、卸载。代理容器选用 `min(320px,100%)`,这是 Peach 布局决定;菜单固定与触发器等宽并复用已有键盘及视口定位。代理地址标签使用既有 8px 间距。卸载区与确认按钮使用项目危险色;目录明细复用已有 Collapse,不使用原生瞬间展开。diff --git a/frontend/src/islands/configuration.tsx b/frontend/src/islands/configuration.tsxindex 678a71a98..66e4d8c76 100644--- a/frontend/src/islands/configuration.tsx+++ b/frontend/src/islands/configuration.tsx@@ -15,7 +15,7 @@ import { ApiError, apiGet, apiSend, errorMessage } from '../api';import { AccessSettings, type AccessState } from './access-settings';import { ReleaseUpdates, type ReleaseState, type UpdateJob } from './release-updates';import { PeachProxy, type PeachProxyState } from './peach-proxy';-import { DesktopSettings, type StartupState, type UninstallState } from './desktop-settings';+import { StartupSettings, UninstallSettings, type StartupState, type UninstallState } from './desktop-settings';export interface ConfigurationProps {/** 保存成功后的过去时回执(遗留层的 Toast)。 */@@ -344,15 +344,16 @@ export function Configuration({ receipt, data, error }: ConfigurationProps & Sta}return (<div class="configpage">+ {data.startup ? <StartupSettings startup={data.startup} receipt={receipt} /> : null}{data.editable? <ConfigurationForm data={data} receipt={receipt} />: <Html html={noteHtml(data.notice, { variant: 'secondary', label: '只读' })} />}- {data.access ? <AccessSettings initial={data.access} receipt={receipt} /> : null}+ <MountStatus data={data} />{data.peach_proxy ? <PeachProxy initial={data.peach_proxy} receipt={receipt} /> : null}- {data.startup && data.uninstall ? <DesktopSettings startup={data.startup} uninstall={data.uninstall} receipt={receipt} /> : null}+ {data.access ? <AccessSettings initial={data.access} receipt={receipt} /> : null}{data.updates ? <ReleaseUpdates initial={data.updates} initialJob={data.update_job} /> : null}<Facts facts={data.facts} />- <MountStatus data={data} />+ {data.uninstall ? <UninstallSettings uninstall={data.uninstall} /> : null}</div>);}diff --git a/frontend/src/islands/desktop-settings.tsx b/frontend/src/islands/desktop-settings.tsxindex f06dd8022..487dc953e 100644--- a/frontend/src/islands/desktop-settings.tsx+++ b/frontend/src/islands/desktop-settings.tsx@@ -1,5 +1,6 @@-import { useRef, useState } from 'preact/hooks';-import { fieldsetTitle, setActionBusy, confirmModal } from '@peach/legacy/ui';+import { useLayoutEffect, useRef, useState } from 'preact/hooks';+import { fieldsetTitle, setActionBusy, confirmModal, wireCollapse } from '@peach/legacy/ui';+import { icon } from '@peach/legacy/core';import { apiSend, errorMessage } from '../api';export interface StartupState { available: boolean; enabled: boolean; silent: boolean; message: string }@@ -10,12 +11,10 @@ function SettingCheck({ label, checked, disabled, change }: { label:string; chec<span aria-hidden="true"><svg viewBox="0 0 24 24"><use href="#i-check" /></svg></span></span><span>{label}</span></label>;}-export function DesktopSettings({ startup, uninstall, receipt }: { startup: StartupState; uninstall: UninstallState; receipt(message: string): void }) {+export function StartupSettings({ startup, receipt }: { startup: StartupState; receipt(message: string): void }) {const [enabled,setEnabled] = useState(startup.enabled);const [silent,setSilent] = useState(startup.silent);- const [removeData,setRemoveData] = useState(false);const [error,setError] = useState('');- const [accepted,setAccepted] = useState('');const busy = useRef(false);const button = useRef<HTMLButtonElement>(null);async function save() {@@ -25,16 +24,7 @@ export function DesktopSettings({ startup, uninstall, receipt }: { startup: Starcatch (cause) { setError(errorMessage(cause)); }finally { busy.current = false; setActionBusy(button.current,false); }}- async function remove() {- await confirmModal({title:'卸载 Peach',body:removeData- ? '将退出 Peach,移除程序、开机自启、设置、本地数据库、观看记录、凭据和缓存。原始媒体文件保留。'- : '将退出 Peach 并移除程序和开机自启。设置、本地数据库、观看记录与缓存保留。',- confirmLabel:'卸载 Peach',onConfirm:async () => {- const result = await apiSend<{message:string}>('/api/configuration/uninstall',{delete_data:removeData,confirmation:'卸载 Peach'});- setAccepted(result.message);- }});- }- return <>+ return (<form class="configfieldset" data-geist-fieldset onSubmit={event=>{event.preventDefault();void save();}}><div class="geist-fieldset-content"><div dangerouslySetInnerHTML={{__html:fieldsetTitle('startupTitle','开机自启')}} />@@ -46,16 +36,46 @@ export function DesktopSettings({ startup, uninstall, receipt }: { startup: Star</div><footer class="geist-fieldset-footer" data-geist-fieldset-footer><button ref={button} type="submit" class="geist-button primary" disabled={!startup.available}>保存自启</button></footer></form>- <section id="uninstallPeach" class="configfieldset" data-geist-fieldset>+ );+}++function DataDirectories({ data }: { data: UninstallState }) {+ const mount = useRef<HTMLDivElement>(null);+ useLayoutEffect(()=>{+ const root=mount.current!;+ const details=document.createElement('details');details.className='configdirectories';+ const summary=document.createElement('summary');summary.innerHTML=icon('chevron-right')+'<span>数据目录</span>';+ details.append(summary);+ for(const path of [...new Set([data.data_root,...data.directories])]) {+ const line=document.createElement('p');line.className='confighelp';line.textContent=path;details.append(line);+ }+ root.replaceChildren(details);wireCollapse(root,'details','uninstall-data');+ return ()=>root.replaceChildren();+ },[data]);+ return <div ref={mount} />;+}++export function UninstallSettings({ uninstall }: { uninstall: UninstallState }) {+ const [removeData,setRemoveData] = useState(false);+ const [accepted,setAccepted] = useState('');+ async function remove() {+ await confirmModal({title:'卸载 Peach',danger:true,body:removeData+ ? '将退出 Peach,移除程序、开机自启、设置、本地数据库、观看记录、凭据和缓存。原始媒体文件保留。'+ : '将退出 Peach 并移除程序和开机自启。设置、本地数据库、观看记录与缓存保留。',+ confirmLabel:'卸载 Peach',onConfirm:async () => {+ const result = await apiSend<{message:string}>('/api/configuration/uninstall',{delete_data:removeData,confirmation:'卸载 Peach'});+ setAccepted(result.message);+ }});+ }+ return <section id="uninstallPeach" class="configfieldset configdanger" data-geist-fieldset data-fieldset-type="error"><div class="geist-fieldset-content"><div dangerouslySetInnerHTML={{__html:fieldsetTitle('uninstallTitle','卸载 Peach')}} />{uninstall.available && <p class="confighelp">卸载会退出 Peach、移除程序和开机自启。原始媒体文件保留。</p>}<SettingCheck label="完全卸载:同时删除设置、本地数据库、观看记录、凭据和缓存" checked={removeData} disabled={!uninstall.full_available || !!accepted} change={setRemoveData} />- <details><summary>数据目录</summary><p class="confighelp">{uninstall.data_root}</p>{uninstall.directories.map(path=><p class="confighelp" key={path}>{path}</p>)}</details>+ <DataDirectories data={uninstall} />{uninstall.message && <p class="confighelp">{uninstall.message}</p>}{accepted && <p class="confighelp" role="status">{accepted}</p>}</div><footer class="geist-fieldset-footer" data-geist-fieldset-footer><button type="button" class="geist-button danger" disabled={!uninstall.available || !!accepted} onClick={()=>void remove()}>卸载 Peach</button></footer>- </section>- </>;+ </section>;}diff --git a/frontend/src/islands/peach-proxy.tsx b/frontend/src/islands/peach-proxy.tsxindex 7c84bbf01..f355eac81 100644--- a/frontend/src/islands/peach-proxy.tsx+++ b/frontend/src/islands/peach-proxy.tsx@@ -15,7 +15,7 @@ export function PeachProxy({ initial, receipt }: { initial: PeachProxyState; recuseEffect(() => () => lifetime.current.abort(), []);useLayoutEffect(() => {const root = mount.current!;- root.innerHTML = selectFieldHtml([['environment','系统代理'],['direct','直连'],['proxy','自定义']],initial.mode,{label:'Peach 代理'});+ root.innerHTML = selectFieldHtml([['environment','系统代理'],['direct','直连'],['proxy','自定义']],initial.mode,{label:'Peach 代理',className:'configselect',attr:'data-fixed-width'});const field = wireSelectField(root.firstElementChild!);const change = () => setMode(field.value);field.addEventListener('change', change);@@ -35,8 +35,8 @@ export function PeachProxy({ initial, receipt }: { initial: PeachProxyState; rec<div dangerouslySetInnerHTML={{__html:fieldsetTitle('peachProxyTitle','Peach 代理')}} /><p class="confighelp">采集来源选择“Peach 代理”时共用此设置。</p><div ref={mount} />- {mode === 'proxy' && <label class="configfield">代理地址<input class="geist-input" type="password" autoComplete="off" value={address}- placeholder={saved.proxy_saved ? '已保存,留空保留' : 'http://127.0.0.1:7890'} onInput={event => setAddress(event.currentTarget.value)} /></label>}+ {mode === 'proxy' && <div class="configfield"><label htmlFor="peachProxyAddress">代理地址</label><input id="peachProxyAddress" class="geist-input" type="password" autoComplete="off" value={address}+ placeholder={saved.proxy_saved ? '已保存,留空保留' : 'http://127.0.0.1:7890'} onInput={event => setAddress(event.currentTarget.value)} /></div>}{saved.needs_selection && <p class="configbad">已有来源的代理地址不同,请选择公共连接方式。</p>}{error && <p class="configbad" role="alert">{error}</p>}</div>diff --git a/frontend/src/legacy/core.d.ts b/frontend/src/legacy/core.d.tsindex 96ce16b8b..db135f3f7 100644--- a/frontend/src/legacy/core.d.ts+++ b/frontend/src/legacy/core.d.ts@@ -6,6 +6,7 @@/** 来源代号到界面名称:`local`→`本地`、`115`→`115`、`pikpak`→`PikPak`、`online`→`在线`。 */export declare const LOC: Record<string, string>;+export declare function icon(name: string): string;/** 秒数格式化成 `h:mm:ss`/`m:ss`;`0`、负数与非有限值都是 `—`(probe 的硬失败哨兵)。 */export declare function fmtDur(seconds: number | null | undefined): string;diff --git a/frontend/src/legacy/ui.d.ts b/frontend/src/legacy/ui.d.tsindex 54a116c81..09a66deb1 100644--- a/frontend/src/legacy/ui.d.ts+++ b/frontend/src/legacy/ui.d.ts@@ -17,7 +17,8 @@ export declare function fieldsetTitle(id: string, title: string): string;export declare function checkboxHtml(inputAttrs?: string): string;export declare function loadingDotsHtml(label?: string, options?: { className?: string }): string;export declare function progressHtml(label: string, value: number, max?: number): string;-export declare function confirmModal(options: {title: string; body: string; confirmLabel: string; cancelLabel?: string; onConfirm?: () => Promise<unknown>}): Promise<{confirmed: boolean; result?: unknown}>;+export declare function confirmModal(options: {title: string; body: string; confirmLabel: string; cancelLabel?: string; danger?: boolean; onConfirm?: () => Promise<unknown>}): Promise<{confirmed: boolean; result?: unknown}>;+export declare function wireCollapse(root: Element, selector: string, idPrefix: string): void;export declare function selectFieldHtml(items: string[][], current: string,options?: { label?: string; attr?: string; className?: string }): string;diff --git a/frontend/test/desktop-settings.test.tsx b/frontend/test/desktop-settings.test.tsxindex 8d83a786e..a3bd24f5b 100644--- a/frontend/test/desktop-settings.test.tsx+++ b/frontend/test/desktop-settings.test.tsx@@ -1,17 +1,29 @@import { render } from 'preact';import { act } from 'preact/test-utils';import { afterEach, expect, it, vi } from 'vitest';-import { DesktopSettings } from '../src/islands/desktop-settings';+import { StartupSettings, UninstallSettings } from '../src/islands/desktop-settings';import { preferredDirection } from '../src/sort-preferences';+// 交互回归直接使用浏览器共用模块,包含 Collapse 的真实接线。+// @ts-expect-error 遗留 JS 的声明由正式 alias 提供。+vi.mock('@peach/legacy/ui',()=>import('../../web/js/ui-components.js'));+// @ts-expect-error 遗留 JS 的声明由正式 alias 提供。+vi.mock('@peach/legacy/core',()=>import('../../web/js/core.js'));+afterEach(()=>{document.body.replaceChildren();vi.unstubAllGlobals();});it('自启保存实际选项,卸载默认保留数据',async()=>{const fetch = vi.fn(async(_url:string,_init:RequestInit)=>({ok:true,json:async()=>({})}));vi.stubGlobal('fetch',fetch);const host=document.createElement('div');document.body.append(host);- await act(async()=>render(<DesktopSettings startup={{available:true,enabled:false,silent:true,message:''}}- uninstall={{available:true,full_available:true,message:'',data_root:'fixture',directories:[]}} receipt={()=>{}} />,host));+ await act(async()=>render(<><StartupSettings startup={{available:true,enabled:false,silent:true,message:''}} receipt={()=>{}} />+ <UninstallSettings uninstall={{available:true,full_available:true,message:'',data_root:'fixture',directories:[]}} /></>,host));const boxes=host.querySelectorAll<HTMLInputElement>('input');expect(boxes[2]!.checked).toBe(false);+ expect(host.querySelector('[data-fieldset-type=error]')).not.toBeNull();+ const summary=host.querySelector('summary')!;+ expect(summary.getAttribute('aria-expanded')).toBe('false');+ expect(host.querySelector('.fcollapse')).not.toBeNull();+ await act(async()=>{summary.click();});+ expect(summary.getAttribute('aria-expanded')).toBe('true');await act(async()=>{boxes[0]!.checked=true;boxes[0]!.dispatchEvent(new Event('change',{bubbles:true}));});await act(async()=>{host.querySelector('form')!.dispatchEvent(new Event('submit',{bubbles:true,cancelable:true}));});expect(JSON.parse(String(fetch.mock.calls[0]![1].body))).toEqual({enabled:true,silent:true});diff --git a/tests/test_desktop_settings.py b/tests/test_desktop_settings.pyindex dae478293..90c0ee9ce 100644--- a/tests/test_desktop_settings.py+++ b/tests/test_desktop_settings.py@@ -13,6 +13,19 @@ from peach import desktop_startup, desktop_uninstall, peach_proxy, scraping_acceclass DesktopSettingsTests(unittest.TestCase):+ def test_configuration_order_and_danger_area_share_the_ui_contract(self):+ root = Path(__file__).resolve().parents[1]+ configuration = (root / 'frontend/src/islands/configuration.tsx').read_text(encoding='utf-8')+ names = ['<StartupSettings', '<ConfigurationForm', '<MountStatus', '<PeachProxy', '<AccessSettings', '<ReleaseUpdates', '<Facts', '<UninstallSettings']+ # 定位配置主页面,排除同文件中组件定义的内部 JSX。+ page = configuration[configuration.index('export function Configuration('):]+ self.assertEqual(sorted(names, key=page.index), names)+ css = (root / 'web/css/23-configuration.css').read_text(encoding='utf-8')+ self.assertIn('.configdanger{border-color:var(--drop)}', css)+ self.assertIn('.configdanger>.geist-fieldset-footer', css)+ self.assertIn('.configselect{width:min(320px,100%)}', css)+ self.assertIn('.configdirectories .fcollapsebody{padding:12px 4px 4px}', css)+def setUp(self):temporary = tempfile.TemporaryDirectory()self.addCleanup(temporary.cleanup)diff --git a/web/css/23-configuration.css b/web/css/23-configuration.cssindex 92ead3051..4a38ef5b7 100644--- a/web/css/23-configuration.css+++ b/web/css/23-configuration.css@@ -8,8 +8,20 @@border:1px solid var(--line);border-radius:var(--control-radius);background:var(--ground)}.configfieldset>.geist-fieldset-content{flex:1;min-height:0;padding:20px;display:grid;gap:20px}.configfieldset .geist-fieldset-title{margin:0}-.configfieldset button.danger{color:var(--drop)}-.configfieldset button.danger:hover:not(:disabled){background:var(--drop);border-color:var(--drop);color:#fff}+.configdanger{border-color:var(--drop)}+.configdanger>.geist-fieldset-footer{border-top-color:var(--drop);background:color-mix(in srgb,var(--drop) 7%,var(--ground))}+.configfieldset button.danger,.geist-modal button.danger{background:var(--drop);border-color:var(--drop);color:#fff}+.configfieldset button.danger:hover:not(:disabled),.geist-modal button.danger:hover:not(:disabled){background:color-mix(in srgb,var(--drop) 88%,#000);border-color:var(--drop);color:#fff}+.configfieldset button.danger:disabled{background:var(--surface);border-color:var(--line);color:var(--muted)}+.configselect{width:min(320px,100%)}+.configselect>.gselectfield{width:100%}+.configdirectories>summary{display:flex;align-items:center;gap:8px;list-style:none;cursor:pointer;font-weight:500}+.configdirectories>summary::-webkit-details-marker{display:none}+.configdirectories>summary>svg{width:16px;height:16px;flex:none;stroke:currentColor;fill:none;transition:transform .2s ease-in-out}+.configdirectories>summary[aria-expanded="true"]>svg{transform:rotate(90deg)}+.configdirectories .fcollapsebody{padding:12px 4px 4px}+.configdirectories .confighelp{overflow-wrap:anywhere}+.configdirectories .confighelp:first-child{margin-top:0}.configfieldset-heading{display:grid;gap:8px}.configfieldset-heading>.confighelp{margin:0}.configfieldset>.geist-fieldset-footer{box-sizing:border-box;min-height:var(--fieldset-bar-h);diff --git a/web/dist/peach-ui.js b/web/dist/peach-ui.jsindex a17856c8d..b1b3ed6ee 100644--- a/web/dist/peach-ui.js+++ b/web/dist/peach-ui.js@@ -1,21 +1,21 @@-import { MEDIA_SOURCE_ICONS as e, checkboxHtml as t, confirmModal as n, emptyStateHtml as r, fieldsetTitle as i, loadingDotsHtml as a, noteHtml as o, progressHtml as s, selectFieldHtml as c, selectOptionIconHtml as l, setActionBusy as u, wireSelectField as d } from "/js/ui-components.js";-import { LOC as f, fmtDur as p, fmtSize as m } from "/js/core.js";+import { MEDIA_SOURCE_ICONS as e, checkboxHtml as t, confirmModal as n, emptyStateHtml as r, fieldsetTitle as i, loadingDotsHtml as a, noteHtml as o, progressHtml as s, selectFieldHtml as c, selectOptionIconHtml as l, setActionBusy as u, wireCollapse as d, wireSelectField as f } from "/js/ui-components.js";+import { LOC as p, fmtDur as m, fmtSize as h, icon as g } from "/js/core.js";//#region node_modules/preact/dist/preact.module.js-var h, g, _, v, y, b, x, S, C, w, T, E, D, ee, O, k = {}, te = [], ne = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, A = Array.isArray;-function j(e, t) {+var _, v, y, b, x, S, C, w, T, E, D, ee, O, k, te, A = {}, j = [], ne = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, re = Array.isArray;+function M(e, t) {for (var n in t) e[n] = t[n];return e;}-function re(e) {+function ie(e) {e && e.parentNode && e.parentNode.removeChild(e);}-function ie(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 ? h.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 ae(e, o, r, i, null);+ if (arguments.length > 2 && (o.children = arguments.length > 3 ? _.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 oe(e, o, r, i, null);}-function ae(e, t, n, r, i) {+function oe(e, t, n, r, i) {var a = {type: e,props: t,@@ -27,68 +27,68 @@ function ae(e, t, n, r, i) {__e: null,__c: null,constructor: void 0,- __v: i ?? ++_,+ __v: i ?? ++y,__i: -1,__u: 0};- return i == null && g.vnode != null && g.vnode(a), a;+ return i == null && v.vnode != null && v.vnode(a), a;}-function M(e) {+function N(e) {return e.children;}-function oe(e, t) {+function se(e, t) {this.props = e, this.context = t;}-function N(e, t) {- if (t == null) return e.__ ? N(e.__, e.__i + 1) : null;+function P(e, t) {+ if (t == null) return e.__ ? P(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" ? N(e) : null;+ return typeof e.type == "function" ? P(e) : null;}-function se(e) {+function ce(e) {if (e.__P && e.__d) {- var t = e.__v, n = t.__e, r = [], i = [], a = j({}, t);- a.__v = t.__v + 1, g.vnode && g.vnode(a), ve(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? N(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, be(r, a, i), t.__e = t.__ = null, a.__e != n && ce(a);+ var t = e.__v, n = t.__e, r = [], i = [], a = M({}, t);+ a.__v = t.__v + 1, v.vnode && v.vnode(a), ye(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? P(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 ce(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;- }), ce(e);+ }), le(e);}-function le(e) {- (!e.__d && (e.__d = !0) && y.push(e) && !ue.__r++ || b != g.debounceRendering) && ((b = g.debounceRendering) || x)(ue);+function ue(e) {+ (!e.__d && (e.__d = !0) && x.push(e) && !de.__r++ || S != v.debounceRendering) && ((S = v.debounceRendering) || C)(de);}-function ue() {+function de() {try {- for (var e, t = 1; y.length;) y.length > t && y.sort(S), e = y.shift(), t = y.length, se(e);+ for (var e, t = 1; x.length;) x.length > t && x.sort(w), e = x.shift(), t = x.length, ce(e);} finally {- y.length = ue.__r = 0;+ x.length = de.__r = 0;}}-function de(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 = fe(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || k, p.__i = d, g = ve(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && Ce(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = pe(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 || j, 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] || A, 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 fe(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] = ae(null, o, null, null, null) : A(o) ? o = e.__k[a] = ae(M, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = ae(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 = me(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 = N(s)), we(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(N, { 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 = P(s)), Te(s, s));return r;}-function pe(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 = pe(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 = N(e)), t = n.insertBefore(e.__e, t || null));+ e.__e != t && (t && e.type && !t.parentNode && (t = P(e)), t = n.insertBefore(e.__e, t || null));dot &&= t.nextSibling;while (t != null && t.nodeType == 8);return t;}-function me(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 me(e, t, n, r) {}return -1;}-function he(e, t, n) {+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 ge(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 || he(e.style, t, "");- if (n) for (t in n) r && n[t] == r[t] || he(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(E, "$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[T] = r[T] : (n[T] = D, e.addEventListener(t, a ? O : ee, a)) : e.removeEventListener(t, a ? O : ee, 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[D] = r[D] : (n[D] = O, e.addEventListener(t, a ? te : k, a)) : e.removeEventListener(t, a ? te : k, 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,72 +117,72 @@ function ge(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 _e(e) {+function ve(e) {return function(t) {if (this.l) {var n = this.l[t.type + e];- if (t[w] == null) t[w] = D++;- else if (t[w] < n[T]) return;- return n(g.event ? g.event(t) : t);+ if (t[E] == null) t[E] = O++;+ else if (t[E] < n[D]) return;+ return n(v.event ? v.event(t) : t);}};}-function ve(e, t, n, r, i, a, o, s, c, l) {- var u, d, f, p, m, h, _, v, y, b, x, S, C, w, T, E, D = t.type;+function ye(e, t, n, r, i, a, o, s, c, l) {+ var u, d, f, p, m, h, g, _, y, b, x, S, 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 = g.__b) && u(t);+ 128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = v.__b) && u(t);n: if (typeof D == "function") {d = o.length;try {- if (y = t.props, b = D.prototype && D.prototype.render, x = (u = D.contextType) && r[u.__c], S = u ? x ? x.props.value : u.__ : r, n.__c ? v = (f = t.__c = n.__c).__ = f.__E : (b ? t.__c = f = new D(y, S) : (t.__c = f = new oe(y, S), f.constructor = D, f.render = Te), x && x.sub(f), f.state || (f.state = {}), f.__n = r, p = f.__d = !0, f.__h = [], f._sb = []), b && f.__s == null && (f.__s = f.state), b && D.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = j({}, f.__s)), j(f.__s, D.getDerivedStateFromProps(y, f.__s))), m = f.props, h = f.state, f.__v = t, p) b && D.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), b && f.componentDidMount != null && f.__h.push(f.componentDidMount);+ if (y = t.props, b = D.prototype && D.prototype.render, x = (u = D.contextType) && r[u.__c], S = u ? x ? x.props.value : u.__ : r, n.__c ? _ = (f = t.__c = n.__c).__ = f.__E : (b ? t.__c = f = new D(y, S) : (t.__c = f = new se(y, S), f.constructor = D, f.render = Ee), x && x.sub(f), f.state || (f.state = {}), f.__n = r, p = f.__d = !0, f.__h = [], f._sb = []), b && f.__s == null && (f.__s = f.state), b && D.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = M({}, f.__s)), M(f.__s, D.getDerivedStateFromProps(y, f.__s))), m = f.props, h = f.state, f.__v = t, p) b && D.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), b && f.componentDidMount != null && f.__h.push(f.componentDidMount);else {if (b && D.getDerivedStateFromProps == null && y !== m && f.componentWillReceiveProps != null && f.componentWillReceiveProps(y, S), t.__v == n.__v || !f.__e && f.shouldComponentUpdate != null && !1 === f.shouldComponentUpdate(y, f.__s, S)) {t.__v != n.__v && (f.props = y, f.state = f.__s, f.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(e) {e && (e.__ = t);- }), te.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = N(n);+ }), j.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = P(n);break n;}f.componentWillUpdate != null && f.componentWillUpdate(y, f.__s, S), b && f.componentDidUpdate != null && f.__h.push(function() {- f.componentDidUpdate(m, h, _);+ f.componentDidUpdate(m, h, g);});}- if (f.context = S, f.props = y, f.__P = e, f.__e = !1, C = g.__r, w = 0, b) 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 = [];+ if (f.context = S, f.props = y, f.__P = e, f.__e = !1, C = v.__r, w = 0, b) f.state = f.__s, f.__d = !1, C && C(t), u = f.render(f.props, f.state, f.context), j.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 = j(j({}, r), f.getChildContext())), b && !p && f.getSnapshotBeforeUpdate != null && (_ = f.getSnapshotBeforeUpdate(m, h)), T = u != null && u.type === M && u.key == null ? xe(u.props.children) : u, s = de(e, A(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), v && (f.__E = f.__ = null);+ f.state = f.__s, f.getChildContext != null && (r = M(M({}, r), f.getChildContext())), b && !p && f.getSnapshotBeforeUpdate != null && (g = f.getSnapshotBeforeUpdate(m, h)), T = u != null && u.type === N && 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--;) re(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 || ye(t), g.__e(e, t, n);+ t.__k ??= n.__k || [], e.then || be(t), v.__e(e, t, n);}- } else a == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : s = t.__e = Se(n.__e, t, n, r, i, a, o, c, l);- return (u = g.diffed) && u(t), 128 & t.__u ? void 0 : s;+ } 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 = v.diffed) && u(t), 128 & t.__u ? void 0 : s;}-function ye(e) {- e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(ye));+function be(e) {+ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(be));}-function be(e, t, n) {- for (var r = 0; r < n.length; r++) Ce(n[r], n[++r], n[++r]);- g.__c && g.__c(t, e), e.some(function(t) {+function xe(e, t, n) {+ for (var r = 0; r < n.length; r++) we(n[r], n[++r], n[++r]);+ v.__c && v.__c(t, e), e.some(function(t) {try {e = t.__h, t.__h = [], e.some(function(e) {e.call(t);});} catch (e) {- g.__e(e, t.__v);+ v.__e(e, t.__v);}});}-function xe(e) {- return typeof e != "object" || !e || e.__b > 0 ? e : A(e) ? e.map(xe) : e.constructor === void 0 ? j({}, e) : null;+function Se(e) {+ return typeof e != "object" || !e || e.__b > 0 ? e : re(e) ? e.map(Se) : e.constructor === void 0 ? M({}, e) : null;}-function Se(e, t, n, r, i, a, o, s, c) {- var l, u, d, f, p, m, _, v = n.props || k, y = t.props, b = t.type;+function Ce(e, t, n, r, i, a, o, s, c) {+ var l, u, d, f, p, m, h, g = n.props || A, y = t.props, b = t.type;if (b == "svg" ? i = "http://www.w3.org/2000/svg" : b == "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 == !!b && (b ? p.localName == b : p.nodeType == 3)) {e = p, a[l] = null;@@ -191,80 +191,80 @@ function Se(e, t, n, r, i, a, o, s, c) {}if (e == null) {if (b == null) return document.createTextNode(y);- e = document.createElementNS(i, b, y.is && y), s &&= (g.__m && g.__m(t, a), !1), a = null;+ e = document.createElementNS(i, b, y.is && y), s &&= (v.__m && v.__m(t, a), !1), a = null;}- if (b == null) v === y || s && e.data == y || (e.data = y);+ if (b == null) g === y || s && e.data == y || (e.data = y);else {- if (a = b == "textarea" && y.defaultValue != null ? null : a && h.call(e.childNodes), !s && a != null) for (v = {}, l = 0; l < e.attributes.length; l++) v[(p = e.attributes[l]).name] = p.value;- for (l in v) p = v[l], l == "dangerouslySetInnerHTML" ? d = p : l == "children" || l in y || l == "value" && "defaultValue" in y || l == "checked" && "defaultChecked" in y || ge(e, l, null, p, i);- for (l in y) p = y[l], l == "children" ? f = p : l == "dangerouslySetInnerHTML" ? u = p : l == "value" ? m = p : l == "checked" ? _ = p : s && typeof p != "function" || v[l] === p || ge(e, l, p, v[l], i);+ if (a = b == "textarea" && y.defaultValue != null ? null : a && _.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 y || l == "value" && "defaultValue" in y || l == "checked" && "defaultChecked" in y || _e(e, l, null, p, i);+ for (l in y) p = y[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 = ""), de(t.type == "template" ? e.content : e, A(f) ? f : [f], t, n, r, b == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && N(n, 0), s, c), a != null) for (l = a.length; l--;) re(a[l]);- s && b != "textarea" || (l = "value", b == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || b == "progress" && !m || b == "option" && m != v[l]) && ge(e, l, m, v[l], i), l = "checked", _ != null && _ != e[l] && ge(e, l, _, v[l], i));+ else if (d && (e.innerHTML = ""), fe(t.type == "template" ? e.content : e, re(f) ? f : [f], t, n, r, b == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && P(n, 0), s, c), a != null) for (l = a.length; l--;) ie(a[l]);+ s && b != "textarea" || (l = "value", b == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || b == "progress" && !m || b == "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 Ce(e, t, n) {+function we(e, t, n) {try {if (typeof e == "function") {var r = typeof e.__u == "function";r && e.__u(), r && t == null || (e.__u = e(t));} else e.current = t;} catch (e) {- g.__e(e, n);+ v.__e(e, n);}}-function we(e, t, n) {+function Te(e, t, n) {var r, i;- if (g.unmount && g.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || Ce(r, null, t)), (r = e.__c) != null) {+ if (v.unmount && v.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) {- g.__e(e, t);+ v.__e(e, t);}r.base = r.__P = r.__n = null;}- if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && we(r[i], t, n || typeof e.type != "function");- n || re(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 Te(e, t, n) {+function Ee(e, t, n) {return this.constructor(e, n);}-function Ee(e, t, n) {+function De(e, t, n) {var r, i, a, o;- t == document && (t = document.documentElement), g.__ && g.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], ve(t, e = (!r && n || t).__k = ie(M, null, [e]), i || k, k, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? h.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), be(a, e, o), e.props.children = null;+ t == document && (t = document.documentElement), v.__ && v.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], ye(t, e = (!r && n || t).__k = ae(N, null, [e]), i || A, A, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? _.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), xe(a, e, o), e.props.children = null;}-h = te.slice, g = { __e: function(e, t, n, r) {+_ = j.slice, v = { __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) {e = t;}throw e;-} }, _ = 0, v = function(e) {+} }, y = 0, b = function(e) {return e != null && e.constructor === void 0;-}, oe.prototype.setState = function(e, t) {- var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = j({}, this.state);- typeof e == "function" && (e = e(j({}, n), this.props)), e && j(n, e), e != null && this.__v && (t && this._sb.push(t), le(this));-}, oe.prototype.forceUpdate = function(e) {- this.__v && (this.__e = !0, e && this.__h.push(e), le(this));-}, oe.prototype.render = M, y = [], x = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, S = function(e, t) {+}, se.prototype.setState = function(e, t) {+ var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = M({}, this.state);+ typeof e == "function" && (e = e(M({}, n), this.props)), e && M(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 = N, x = [], C = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, w = function(e, t) {return e.__v.__b - t.__v.__b;-}, ue.__r = 0, C = Math.random().toString(8), w = "__d" + C, T = "__a" + C, E = /(PointerCapture)$|Capture$/i, D = 0, ee = _e(!1), O = _e(!0);+}, de.__r = 0, T = Math.random().toString(8), E = "__d" + T, D = "__a" + T, ee = /(PointerCapture)$|Capture$/i, O = 0, k = ve(!1), te = ve(!0);//#endregion//#region src/sort-preferences.ts-function De(e, t, n) {+function Oe(e, t, n) {return e === "seed" ? "" : e === t && n === "asc" ? "asc" : "desc";}//#endregion//#region src/api.ts-var Oe = class extends Error {+var ke = class extends Error {status;body;constructor(e, t, n = null) {super(e), this.name = "ApiError", this.status = t, this.body = n;}-}, ke = (e) => {+}, Ae = (e) => {if (!e || typeof e != "object") return "";let t = e;for (let e of [@@ -276,8 +276,8 @@ var Oe = class extends Error {if (typeof n == "string" && n) return n;}return "";-}, P = (e) => e instanceof Error ? e.message : String(e);-async function F(e, t) {+}, F = (e) => e instanceof Error ? e.message : String(e);+async function I(e, t) {let n = await fetch(e, {headers: { Accept: "application/json" },credentials: "same-origin",@@ -286,10 +286,10 @@ async function F(e, t) {try {r = await n.json();} catch {}- if (!n.ok) throw new Oe(ke(r) || `请求失败(${n.status})`, n.status);+ if (!n.ok) throw new ke(Ae(r) || `请求失败(${n.status})`, n.status);return r;}-async function I(e, t, n = "POST", r) {+async function L(e, t, n = "POST", r) {let i = await fetch(e, {method: n,...r ? { signal: r } : {},@@ -303,29 +303,29 @@ async function I(e, t, n = "POST", r) {try {a = await i.json();} catch {}- if (!i.ok) throw new Oe(ke(a) || `请求失败(${i.status})`, i.status, a);+ if (!i.ok) throw new ke(Ae(a) || `请求失败(${i.status})`, i.status, a);return a;}//#endregion//#region node_modules/preact/hooks/dist/hooks.module.js-var L, R, Ae, je, Me = 0, Ne = [], z = g, Pe = z.__b, Fe = z.__r, Ie = z.diffed, Le = z.__c, Re = z.unmount, ze = z.__;-function Be(e, t) {- z.__h && z.__h(R, e, Me || t), Me = 0;- var n = R.__H || (R.__H = {+var R, z, je, Me, Ne = 0, Pe = [], B = v, Fe = B.__b, Ie = B.__r, Le = B.diffed, Re = B.__c, ze = B.unmount, Be = B.__;+function Ve(e, t) {+ B.__h && B.__h(z, e, Ne || t), Ne = 0;+ var n = z.__H || (z.__H = {__: [],__h: []});return e >= n.__.length && n.__.push({}), n.__[e];}-function B(e) {- return Me = 1, Ve(Ye, e);+function V(e) {+ return Ne = 1, He(Xe, e);}-function Ve(e, t, n) {- var r = Be(L++, 2);- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Ye(void 0, t), function(e) {+function He(e, t, n) {+ var r = Ve(R++, 2);+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Xe(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 = R, !R.__f)) {+ }], r.__c = z, !z.__f)) {var i = function(e, t, n) {if (!r.__c.__H) return !0;var i = !1, o = r.__c.props !== e;@@ -341,112 +341,112 @@ function Ve(e, t, n) {}return !i || o;};- R.__f = !0;- var a = R.shouldComponentUpdate, o = R.componentWillUpdate;- R.componentWillUpdate = function(e, t, n) {+ z.__f = !0;+ var a = z.shouldComponentUpdate, o = z.componentWillUpdate;+ z.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);- }, R.shouldComponentUpdate = i;+ }, z.shouldComponentUpdate = i;}return r.__N || r.__;}-function V(e, t) {- var n = Be(L++, 3);- !z.__s && Je(n.__H, t) && (n.__ = e, n.u = t, R.__H.__h.push(n));-}function H(e, t) {- var n = Be(L++, 4);- !z.__s && Je(n.__H, t) && (n.__ = e, n.u = t, R.__h.push(n));+ var n = Ve(R++, 3);+ !B.__s && Ye(n.__H, t) && (n.__ = e, n.u = t, z.__H.__h.push(n));}-function U(e) {- return Me = 5, He(function() {+function U(e, t) {+ var n = Ve(R++, 4);+ !B.__s && Ye(n.__H, t) && (n.__ = e, n.u = t, z.__h.push(n));+}+function W(e) {+ return Ne = 5, Ue(function() {return { current: e };}, []);}-function He(e, t) {- var n = Be(L++, 7);- return Je(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;+function Ue(e, t) {+ var n = Ve(R++, 7);+ return Ye(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;}-function Ue() {- for (var e; e = Ne.shift();) {+function We() {+ for (var e; e = Pe.shift();) {var t = e.__H;if (e.__P && t) try {- t.__h.some(Ke), t.__h.some(qe), t.__h = [];+ t.__h.some(qe), t.__h.some(Je), t.__h = [];} catch (n) {- t.__h = [], z.__e(n, e.__v);+ t.__h = [], B.__e(n, e.__v);}}}-z.__b = function(e) {- R = null, Pe && Pe(e);-}, z.__ = function(e, t) {- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), ze && ze(e, t);-}, z.__r = function(e) {- Fe && Fe(e), L = 0;- var t = (R = e.__c).__H;- t && (Ae === R ? (t.__h = [], R.__h = [], t.__.some(function(e) {+B.__b = function(e) {+ z = null, Fe && Fe(e);+}, B.__ = function(e, t) {+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Be && Be(e, t);+}, B.__r = function(e) {+ Ie && Ie(e), R = 0;+ var t = (z = e.__c).__H;+ t && (je === z ? (t.__h = [], z.__h = [], t.__.some(function(e) {e.__N && (e.__ = e.__N), e.u = e.__N = void 0;- })) : (t.__h.some(Ke), t.__h.some(qe), t.__h = [], L = 0)), Ae = R;-}, z.diffed = function(e) {- Ie && Ie(e);+ })) : (t.__h.some(qe), t.__h.some(Je), t.__h = [], R = 0)), je = z;+}, B.diffed = function(e) {+ Le && Le(e);var t = e.__c;- t && t.__H && (t.__H.__h.length && (Ne.push(t) !== 1 && je === z.requestAnimationFrame || ((je = z.requestAnimationFrame) || Ge)(Ue)), t.__H.__.some(function(e) {+ t && t.__H && (t.__H.__h.length && (Pe.push(t) !== 1 && Me === B.requestAnimationFrame || ((Me = B.requestAnimationFrame) || Ke)(We)), t.__H.__.some(function(e) {e.u &&= (e.__H = e.u, void 0);- })), Ae = R = null;-}, z.__c = function(e, t) {+ })), je = z = null;+}, B.__c = function(e, t) {t.some(function(e) {try {- e.__h.some(Ke), e.__h = e.__h.filter(function(e) {- return !e.__ || qe(e);+ e.__h.some(qe), e.__h = e.__h.filter(function(e) {+ return !e.__ || Je(e);});} catch (n) {t.some(function(e) {e.__h &&= [];- }), t = [], z.__e(n, e.__v);+ }), t = [], B.__e(n, e.__v);}- }), Le && Le(e, t);-}, z.unmount = function(e) {- Re && Re(e);+ }), Re && Re(e, t);+}, B.unmount = function(e) {+ ze && ze(e);var t, n = e.__c;n && n.__H && (n.__H.__.some(function(e) {try {- Ke(e);+ qe(e);} catch (e) {t = e;}- }), n.__H = void 0, t && z.__e(t, n.__v));+ }), n.__H = void 0, t && B.__e(t, n.__v));};-var We = typeof requestAnimationFrame == "function";-function Ge(e) {+var Ge = typeof requestAnimationFrame == "function";+function Ke(e) {var t, n = function() {- clearTimeout(r), We && cancelAnimationFrame(t), setTimeout(e);+ clearTimeout(r), Ge && cancelAnimationFrame(t), setTimeout(e);}, r = setTimeout(n, 35);- We && (t = requestAnimationFrame(n));-}-function Ke(e) {- var t = R, n = e.__c;- typeof n == "function" && (e.__c = void 0, n()), R = t;+ Ge && (t = requestAnimationFrame(n));}function qe(e) {- var t = R;- e.__c = e.__(), R = t;+ var t = z, n = e.__c;+ typeof n == "function" && (e.__c = void 0, n()), z = t;+}+function Je(e) {+ var t = z;+ e.__c = e.__(), z = t;}-function Je(e, t) {+function Ye(e, t) {return !e || e.length !== t.length || t.some(function(t, n) {return t !== e[n];});}-function Ye(e, t) {+function Xe(e, t) {return typeof t == "function" ? t(e) : t;}//#endregion//#region node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js-var Xe = 0;+var Ze = 0;Array.isArray;-function W(e, t, n, r, i, a) {+function G(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];@@ -461,26 +461,26 @@ function W(e, t, n, r, i, a) {__e: null,__c: null,constructor: void 0,- __v: --Xe,+ __v: --Ze,__i: -1,__u: 0,__source: i,__self: a};if (typeof e == "function" && (o = e.defaultProps)) for (s in o) c[s] === void 0 && (c[s] = o[s]);- return g.vnode && g.vnode(l), l;+ return v.vnode && v.vnode(l), l;}//#endregion//#region src/islands/access-settings.tsx-function Ze({ id: e, label: t, value: n, onInput: r, error: i, help: a, current: o = !1 }) {- return /* @__PURE__ */ W("div", {+function Qe({ id: e, label: t, value: n, onInput: r, error: i, help: a, current: o = !1 }) {+ return /* @__PURE__ */ G("div", {class: "configfield",children: [- /* @__PURE__ */ W("label", {+ /* @__PURE__ */ G("label", {for: e,children: t}),- /* @__PURE__ */ W("input", {+ /* @__PURE__ */ G("input", {id: e,class: "geist-input",type: "password",@@ -492,7 +492,7 @@ function Ze({ 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__ */ W("p", {+ i || a ? /* @__PURE__ */ G("p", {id: `${e}-hint`,class: i ? "configbad" : "confighelp",role: i ? "alert" : void 0,@@ -501,9 +501,9 @@ function Ze({ id: e, label: t, value: n, onInput: r, error: i, help: a, current:]});}-function Qe({ initial: e, receipt: t }) {- let [n, r] = B(e), [a, o] = B(""), [s, c] = B(""), [l, d] = B(""), [f, p] = B(!1), [m, h] = B(""), [g, _] = B({}), v = U(null), y = U(!1), b = U(null);- return /* @__PURE__ */ W("form", {+function $e({ initial: e, receipt: t }) {+ let [n, r] = V(e), [a, o] = V(""), [s, c] = V(""), [l, d] = V(""), [f, p] = V(!1), [m, h] = V(""), [g, _] = V({}), v = W(null), y = W(!1), b = W(null);+ return /* @__PURE__ */ G("form", {class: "configfieldset",onSubmit: async (e) => {if (e.preventDefault(), y.current) return;@@ -515,7 +515,7 @@ function Qe({ initial: e, receipt: t }) {}y.current = !0, u(b.current, !0);try {- let e = await I("/api/configuration/access", {+ let e = await L("/api/configuration/access", {revision: n.revision,action: f ? "disable" : "set",confirm_disable: f,@@ -525,8 +525,8 @@ function Qe({ initial: e, receipt: t }) {});r(e), o(""), c(""), d(""), p(!1), _({}), t(e.mode === "open" ? "已关闭访问密码" : "已保存访问密码");} catch (e) {- let t = e instanceof Oe ? e.body : null, n = t?.errors || t?.detail?.errors;- n ? _(n) : h(P(e));+ let t = e instanceof ke ? e.body : null, n = t?.errors || t?.detail?.errors;+ n ? _(n) : h(F(e));} finally {y.current = !1, u(b.current, !1);}@@ -534,17 +534,17 @@ function Qe({ initial: e, receipt: t }) {"aria-labelledby": "accessTitle",noValidate: !0,ref: v,- children: [/* @__PURE__ */ W("div", {+ children: [/* @__PURE__ */ G("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ W("div", {+ /* @__PURE__ */ G("div", {class: "configfieldset-heading",- children: [/* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: i("accessTitle", "访问密码") } }), /* @__PURE__ */ W("p", {+ children: [/* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i("accessTitle", "访问密码") } }), /* @__PURE__ */ G("p", {class: "confighelp",children: n.mode === "open" ? "未设置密码,能连接到 Peach 的设备可直接访问。" : n.mode === "legacy" ? "当前使用系统生成的访问口令。你可以设置自己的密码,或关闭登录要求。" : n.mode === "locked" ? "访问设置无法读取,请在本机检查配置文件。" : "已设置密码。新设备需要登录,保持登录时间在登录页选择。"})]}),- n.mode === "password" ? /* @__PURE__ */ W(Ze, {+ n.mode === "password" ? /* @__PURE__ */ G(Qe, {id: "access-current",label: "当前访问密码",value: a,@@ -552,46 +552,46 @@ function Qe({ initial: e, receipt: t }) {error: g.current_password,current: !0}) : null,- !f && n.mode !== "locked" ? /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W(Ze, {+ !f && n.mode !== "locked" ? /* @__PURE__ */ G(N, { children: [/* @__PURE__ */ G(Qe, {id: "access-password",label: n.mode === "password" ? "新访问密码" : "设置访问密码",value: s,onInput: c,error: g.password,help: "至少 8 个字符。保存后其他设备需要重新登录。"- }), /* @__PURE__ */ W(Ze, {+ }), /* @__PURE__ */ G(Qe, {id: "access-confirm",label: "确认访问密码",value: l,onInput: d,error: g.confirmation})] }) : null,- n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ W("label", {+ n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ G("label", {class: "configcheck",- children: [/* @__PURE__ */ W("span", {+ children: [/* @__PURE__ */ G("span", {class: "pcheck",- children: [/* @__PURE__ */ W("input", {+ children: [/* @__PURE__ */ G("input", {type: "checkbox",checked: f,onChange: (e) => p(e.currentTarget.checked)- }), /* @__PURE__ */ W("span", {+ }), /* @__PURE__ */ G("span", {"aria-hidden": "true",- children: /* @__PURE__ */ W("svg", {+ children: /* @__PURE__ */ G("svg", {viewBox: "0 0 24 24",- children: /* @__PURE__ */ W("use", { href: "#i-check" })+ children: /* @__PURE__ */ G("use", { href: "#i-check" })})})]- }), /* @__PURE__ */ W("span", { children: "关闭访问密码,允许能连接到 Peach 的设备直接访问" })]+ }), /* @__PURE__ */ G("span", { children: "关闭访问密码,允许能连接到 Peach 的设备直接访问" })]}) : null,- m ? /* @__PURE__ */ W("p", {+ m ? /* @__PURE__ */ G("p", {class: "configbad",role: "alert",children: m}) : null]- }), n.mode === "locked" ? null : /* @__PURE__ */ W("div", {+ }), n.mode === "locked" ? null : /* @__PURE__ */ G("div", {class: "geist-fieldset-footer",- children: [/* @__PURE__ */ W("p", { children: "保存后立即生效。" }), /* @__PURE__ */ W("button", {+ children: [/* @__PURE__ */ G("p", { children: "保存后立即生效。" }), /* @__PURE__ */ G("button", {class: "geist-button primary",type: "submit",ref: b,@@ -602,7 +602,7 @@ function Qe({ initial: e, receipt: t }) {}//#endregion//#region src/islands/release-updates.tsx-var $e = /* @__PURE__ */ new Set([+var et = /* @__PURE__ */ new Set(["downloading","verifying","extracting",@@ -610,21 +610,21 @@ var $e = /* @__PURE__ */ new Set(["restarting","installing"]);-function et({ initial: e, initialJob: t }) {- let [r, a] = B(e), [o, c] = B(t || {+function tt({ initial: e, initialJob: t }) {+ let [r, a] = V(e), [o, c] = V(t || {state: "idle",progress: 0- }), [l, d] = B(""), f = U(null), p = U(!0), m = U(!1), h = U(null);- V(() => {- u(h.current, $e.has(o.state));- }, [o.state]), V(() => () => {+ }), [l, d] = V(""), f = W(null), p = W(!0), m = W(!1), h = W(null);+ H(() => {+ u(h.current, et.has(o.state));+ }, [o.state]), H(() => () => {p.current = !1, f.current?.abort();}, []);let g = async () => {- let e = await I("/api/configuration/update-restart", {});+ let e = await L("/api/configuration/update-restart", {});p.current && c(e);};- V(() => {+ H(() => {o.state !== "ready" || m.current || (m.current = !0, n({title: "更新已准备好",body: `Peach ${o.version || ""} 将在重启后安装。`,@@ -632,11 +632,11 @@ function et({ initial: e, initialJob: t }) {cancelLabel: "稍后",onConfirm: g}));- }, [o.state]), V(() => {- if (!$e.has(o.state)) return;+ }, [o.state]), H(() => {+ if (!et.has(o.state)) return;let e = new AbortController(), t, n = 0, r = async () => {try {- let t = await F("/api/configuration/update-status", e.signal);+ let t = await I("/api/configuration/update-status", e.signal);e.signal.aborted || (c(t), n = 0, t.state === "complete" && a((e) => ({...e,current_version: t.version || e.current_version,@@ -653,14 +653,14 @@ function et({ initial: e, initialJob: t }) {};}, [o.state]);let _ = async (e) => {- if (f.current || $e.has(o.state)) return;+ if (f.current || et.has(o.state)) return;let t = new AbortController();f.current = t, m.current = !1, d(""), u(e, !0);try {- let e = await I("/api/configuration/update", {}, "POST", t.signal);+ let e = await L("/api/configuration/update", {}, "POST", t.signal);t.signal.aborted || c(e);} catch (e) {- t.signal.aborted || d(P(e));+ t.signal.aborted || d(F(e));} finally {f.current = null, u(e, !1);}@@ -669,66 +669,66 @@ function et({ initial: e, initialJob: t }) {let n = new AbortController();f.current = n, u(t, !0), d("");try {- let e = await F("/api/configuration/updates", n.signal);+ let e = await I("/api/configuration/updates", n.signal);n.signal.aborted || a(e);} catch (t) {n.signal.aborted || (a({...e,state: "error"- }), d(P(t)));+ }), d(F(t)));} finally {f.current = null, u(t, !1);}};- return /* @__PURE__ */ W("section", {+ return /* @__PURE__ */ G("section", {class: "configfieldset","data-geist-fieldset": !0,"aria-labelledby": "configUpdatesTitle",- children: [/* @__PURE__ */ W("div", {+ children: [/* @__PURE__ */ G("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: i("configUpdatesTitle", "检查更新") } }),- /* @__PURE__ */ W("dl", {+ /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i("configUpdatesTitle", "检查更新") } }),+ /* @__PURE__ */ G("dl", {class: "configfacts",children: [- /* @__PURE__ */ W("dt", { children: "当前版本" }),- /* @__PURE__ */ W("dd", { children: r.current_version }),- /* @__PURE__ */ W("dt", { children: "安装方式" }),- /* @__PURE__ */ W("dd", { children: r.installation }),- /* @__PURE__ */ W("dt", { children: "更新通道" }),- /* @__PURE__ */ W("dd", { children: r.channel }),- /* @__PURE__ */ W("dt", { children: "最新版本" }),- /* @__PURE__ */ W("dd", { children: r.latest_version || (r.state === "unchecked" ? "尚未检查" : "未取得") })+ /* @__PURE__ */ G("dt", { children: "当前版本" }),+ /* @__PURE__ */ G("dd", { children: r.current_version }),+ /* @__PURE__ */ G("dt", { children: "安装方式" }),+ /* @__PURE__ */ G("dd", { children: r.installation }),+ /* @__PURE__ */ G("dt", { children: "更新通道" }),+ /* @__PURE__ */ G("dd", { children: r.channel }),+ /* @__PURE__ */ G("dt", { children: "最新版本" }),+ /* @__PURE__ */ G("dd", { children: r.latest_version || (r.state === "unchecked" ? "尚未检查" : "未取得") })]}),- /* @__PURE__ */ W("p", {+ /* @__PURE__ */ G("p", {class: l || r.state === "error" ? "configbad" : "confighelp",role: l || r.state === "error" ? "alert" : "status",children: l || r.message}),- o.state === "idle" ? null : /* @__PURE__ */ W("div", {+ o.state === "idle" ? null : /* @__PURE__ */ G("div", {"aria-live": "polite",- children: [/* @__PURE__ */ W("p", {+ children: [/* @__PURE__ */ G("p", {class: o.state === "error" ? "configbad" : "confighelp",children: o.message- }), o.state === "error" ? null : /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: s(o.state === "downloading" ? "下载进度" : "安装进度", o.state === "downloading" ? o.downloaded || 0 : o.progress, o.state === "downloading" ? o.total || 1 : 100) } }), /* @__PURE__ */ W("p", {+ }), o.state === "error" ? null : /* @__PURE__ */ G(N, { children: [/* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: s(o.state === "downloading" ? "下载进度" : "安装进度", o.state === "downloading" ? o.downloaded || 0 : o.progress, o.state === "downloading" ? o.total || 1 : 100) } }), /* @__PURE__ */ G("p", {class: "confighelp",children: o.state === "downloading" && o.total ? `${((o.downloaded || 0) / 1048576).toFixed(1)} / ${(o.total / 1048576).toFixed(1)} MB` : `${o.progress}%`})] })]})]- }), /* @__PURE__ */ W("div", {+ }), /* @__PURE__ */ G("div", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,children: [- /* @__PURE__ */ W("a", {+ /* @__PURE__ */ G("a", {class: "geist-button",href: r.release_url,target: "_blank",rel: "noreferrer",children: "查看发布页"}),- o.state === "ready" ? /* @__PURE__ */ W("button", {+ o.state === "ready" ? /* @__PURE__ */ G("button", {type: "button",class: "geist-button primary",onClick: () => {@@ -742,17 +742,17 @@ function et({ initial: e, initialJob: t }) {},children: "重启安装"}) : null,- r.state === "available" && r.installation === "独立测试包" && o.state !== "ready" ? /* @__PURE__ */ W("button", {+ r.state === "available" && r.installation === "独立测试包" && o.state !== "ready" ? /* @__PURE__ */ G("button", {ref: h,type: "button",class: "geist-button primary",onClick: (e) => _(e.currentTarget),children: "下载并安装"}) : null,- /* @__PURE__ */ W("button", {+ /* @__PURE__ */ G("button", {type: "button",class: "geist-button",- disabled: $e.has(o.state),+ disabled: et.has(o.state),onClick: (e) => v(e.currentTarget),children: "检查更新"})@@ -762,16 +762,20 @@ function et({ initial: e, initialJob: t }) {}//#endregion//#region src/islands/peach-proxy.tsx-function tt({ initial: e, receipt: t }) {- let [n, r] = B(e), [a, o] = B(e.mode), [s, l] = B(""), [f, p] = B(""), m = U(!1), h = U(null), g = U(null), _ = U(new AbortController());- V(() => () => _.current.abort(), []), H(() => {+function nt({ initial: e, receipt: t }) {+ let [n, r] = V(e), [a, o] = V(e.mode), [s, l] = V(""), [d, p] = V(""), m = W(!1), h = W(null), g = W(null), _ = W(new AbortController());+ H(() => () => _.current.abort(), []), U(() => {let t = h.current;t.innerHTML = c([["environment", "系统代理"],["direct", "直连"],["proxy", "自定义"]- ], e.mode, { label: "Peach 代理" });- let n = d(t.firstElementChild), r = () => o(n.value);+ ], e.mode, {+ label: "Peach 代理",+ className: "configselect",+ attr: "data-fixed-width"+ });+ let n = f(t.firstElementChild), r = () => o(n.value);return n.addEventListener("change", r), () => {n.removeEventListener("change", r), t.replaceChildren();};@@ -780,37 +784,41 @@ function tt({ initial: e, receipt: t }) {if (!m.current) {m.current = !0, u(g.current, !0), p("");try {- let e = await I("/api/configuration/peach-proxy", {+ let e = await L("/api/configuration/peach-proxy", {mode: a,proxy: s}, "POST", _.current.signal);_.current.signal.aborted || (r(e), l(""), t("已保存 Peach 代理"));} catch (e) {- _.current.signal.aborted || p(P(e));+ _.current.signal.aborted || p(F(e));} finally {m.current = !1, u(g.current, !1);}}}- return /* @__PURE__ */ W("form", {+ return /* @__PURE__ */ G("form", {id: "peachProxy",class: "configfieldset","data-geist-fieldset": !0,onSubmit: (e) => {e.preventDefault(), v();},- children: [/* @__PURE__ */ W("div", {+ children: [/* @__PURE__ */ G("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: i("peachProxyTitle", "Peach 代理") } }),- /* @__PURE__ */ W("p", {+ /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i("peachProxyTitle", "Peach 代理") } }),+ /* @__PURE__ */ G("p", {class: "confighelp",children: "采集来源选择“Peach 代理”时共用此设置。"}),- /* @__PURE__ */ W("div", { ref: h }),- a === "proxy" && /* @__PURE__ */ W("label", {+ /* @__PURE__ */ G("div", { ref: h }),+ a === "proxy" && /* @__PURE__ */ G("div", {class: "configfield",- children: ["代理地址", /* @__PURE__ */ W("input", {+ children: [/* @__PURE__ */ G("label", {+ htmlFor: "peachProxyAddress",+ children: "代理地址"+ }), /* @__PURE__ */ G("input", {+ id: "peachProxyAddress",class: "geist-input",type: "password",autoComplete: "off",@@ -819,20 +827,20 @@ function tt({ initial: e, receipt: t }) {onInput: (e) => l(e.currentTarget.value)})]}),- n.needs_selection && /* @__PURE__ */ W("p", {+ n.needs_selection && /* @__PURE__ */ G("p", {class: "configbad",children: "已有来源的代理地址不同,请选择公共连接方式。"}),- f && /* @__PURE__ */ W("p", {+ d && /* @__PURE__ */ G("p", {class: "configbad",role: "alert",- children: f+ children: d})]- }), /* @__PURE__ */ W("footer", {+ }), /* @__PURE__ */ G("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: /* @__PURE__ */ W("button", {+ children: /* @__PURE__ */ G("button", {ref: g,class: "geist-button primary",type: "submit",@@ -843,181 +851,191 @@ function tt({ initial: e, receipt: t }) {}//#endregion//#region src/islands/desktop-settings.tsx-function nt({ label: e, checked: t, disabled: n, change: r }) {- return /* @__PURE__ */ W("label", {+function rt({ label: e, checked: t, disabled: n, change: r }) {+ return /* @__PURE__ */ G("label", {class: "configcheck",- children: [/* @__PURE__ */ W("span", {+ children: [/* @__PURE__ */ G("span", {class: "pcheck",- children: [/* @__PURE__ */ W("input", {+ children: [/* @__PURE__ */ G("input", {type: "checkbox",checked: t,disabled: n,onChange: (e) => r(e.currentTarget.checked)- }), /* @__PURE__ */ W("span", {+ }), /* @__PURE__ */ G("span", {"aria-hidden": "true",- children: /* @__PURE__ */ W("svg", {+ children: /* @__PURE__ */ G("svg", {viewBox: "0 0 24 24",- children: /* @__PURE__ */ W("use", { href: "#i-check" })+ children: /* @__PURE__ */ G("use", { href: "#i-check" })})})]- }), /* @__PURE__ */ W("span", { children: e })]+ }), /* @__PURE__ */ G("span", { children: e })]});}-function rt({ startup: e, uninstall: t, receipt: r }) {- let [a, o] = B(e.enabled), [s, c] = B(e.silent), [l, d] = B(!1), [f, p] = B(""), [m, h] = B(""), g = U(!1), _ = U(null);- async function v() {- if (!g.current) {- g.current = !0, u(_.current, !0), p("");+function it({ startup: e, receipt: t }) {+ let [n, r] = V(e.enabled), [a, o] = V(e.silent), [s, c] = V(""), l = W(!1), d = W(null);+ async function f() {+ if (!l.current) {+ l.current = !0, u(d.current, !0), c("");try {- await I("/api/configuration/startup", {- enabled: a,- silent: s- }), r("已保存开机自启");+ await L("/api/configuration/startup", {+ enabled: n,+ silent: a+ }), t("已保存开机自启");} catch (e) {- p(P(e));+ c(F(e));} finally {- g.current = !1, u(_.current, !1);+ l.current = !1, u(d.current, !1);}}}- async function y() {- await n({- title: "卸载 Peach",- body: l ? "将退出 Peach,移除程序、开机自启、设置、本地数据库、观看记录、凭据和缓存。原始媒体文件保留。" : "将退出 Peach 并移除程序和开机自启。设置、本地数据库、观看记录与缓存保留。",- confirmLabel: "卸载 Peach",- onConfirm: async () => {- let e = await I("/api/configuration/uninstall", {- delete_data: l,- confirmation: "卸载 Peach"- });- h(e.message);- }- });- }- return /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W("form", {+ return /* @__PURE__ */ G("form", {class: "configfieldset","data-geist-fieldset": !0,onSubmit: (e) => {- e.preventDefault(), v();+ e.preventDefault(), f();},- children: [/* @__PURE__ */ W("div", {+ children: [/* @__PURE__ */ G("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: i("startupTitle", "开机自启") } }),- /* @__PURE__ */ W(nt, {+ /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i("startupTitle", "开机自启") } }),+ /* @__PURE__ */ G(rt, {label: "开机后启动 Peach",- checked: a,+ checked: n,disabled: !e.available,- change: o+ change: r}),- /* @__PURE__ */ W(nt, {+ /* @__PURE__ */ G(rt, {label: "静默启动",- checked: s,+ checked: a,disabled: !e.available,- change: c+ change: o}),- /* @__PURE__ */ W("p", {+ /* @__PURE__ */ G("p", {class: "confighelp",children: "静默启动仅显示托盘;关闭后自动打开浏览器。"}),- e.message && /* @__PURE__ */ W("p", {+ e.message && /* @__PURE__ */ G("p", {class: "confighelp",children: e.message}),- f && /* @__PURE__ */ W("p", {+ s && /* @__PURE__ */ G("p", {class: "configbad",role: "alert",- children: f+ children: s})]- }), /* @__PURE__ */ W("footer", {+ }), /* @__PURE__ */ G("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: /* @__PURE__ */ W("button", {- ref: _,+ children: /* @__PURE__ */ G("button", {+ ref: d,type: "submit",class: "geist-button primary",disabled: !e.available,children: "保存自启"})})]- }), /* @__PURE__ */ W("section", {+ });+}+function at({ data: e }) {+ let t = W(null);+ return U(() => {+ let n = t.current, r = document.createElement("details");+ r.className = "configdirectories";+ let i = document.createElement("summary");+ i.innerHTML = g("chevron-right") + "<span>数据目录</span>", r.append(i);+ for (let t of [.../* @__PURE__ */ new Set([e.data_root, ...e.directories])]) {+ let e = document.createElement("p");+ e.className = "confighelp", e.textContent = t, r.append(e);+ }+ return n.replaceChildren(r), d(n, "details", "uninstall-data"), () => n.replaceChildren();+ }, [e]), /* @__PURE__ */ G("div", { ref: t });+}+function ot({ uninstall: e }) {+ let [t, r] = V(!1), [a, o] = V("");+ async function s() {+ await n({+ title: "卸载 Peach",+ danger: !0,+ body: t ? "将退出 Peach,移除程序、开机自启、设置、本地数据库、观看记录、凭据和缓存。原始媒体文件保留。" : "将退出 Peach 并移除程序和开机自启。设置、本地数据库、观看记录与缓存保留。",+ confirmLabel: "卸载 Peach",+ onConfirm: async () => {+ let e = await L("/api/configuration/uninstall", {+ delete_data: t,+ confirmation: "卸载 Peach"+ });+ o(e.message);+ }+ });+ }+ return /* @__PURE__ */ G("section", {id: "uninstallPeach",- class: "configfieldset",+ class: "configfieldset configdanger","data-geist-fieldset": !0,- children: [/* @__PURE__ */ W("div", {+ "data-fieldset-type": "error",+ children: [/* @__PURE__ */ G("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: i("uninstallTitle", "卸载 Peach") } }),- t.available && /* @__PURE__ */ W("p", {+ /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i("uninstallTitle", "卸载 Peach") } }),+ e.available && /* @__PURE__ */ G("p", {class: "confighelp",children: "卸载会退出 Peach、移除程序和开机自启。原始媒体文件保留。"}),- /* @__PURE__ */ W(nt, {+ /* @__PURE__ */ G(rt, {label: "完全卸载:同时删除设置、本地数据库、观看记录、凭据和缓存",- checked: l,- disabled: !t.full_available || !!m,- change: d+ checked: t,+ disabled: !e.full_available || !!a,+ change: r}),- /* @__PURE__ */ W("details", { children: [- /* @__PURE__ */ W("summary", { children: "数据目录" }),- /* @__PURE__ */ W("p", {- class: "confighelp",- children: t.data_root- }),- t.directories.map((e) => /* @__PURE__ */ W("p", {- class: "confighelp",- children: e- }, e))- ] }),- t.message && /* @__PURE__ */ W("p", {+ /* @__PURE__ */ G(at, { data: e }),+ e.message && /* @__PURE__ */ G("p", {class: "confighelp",- children: t.message+ children: e.message}),- m && /* @__PURE__ */ W("p", {+ a && /* @__PURE__ */ G("p", {class: "confighelp",role: "status",- children: m+ children: a})]- }), /* @__PURE__ */ W("footer", {+ }), /* @__PURE__ */ G("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: /* @__PURE__ */ W("button", {+ children: /* @__PURE__ */ G("button", {type: "button",class: "geist-button danger",- disabled: !t.available || !!m,- onClick: () => void y(),+ disabled: !e.available || !!a,+ onClick: () => void s(),children: "卸载 Peach"})})]- })] });+ });}//#endregion//#region src/islands/configuration.tsx-var it = "/api/configuration", at = "/api/pick-folder", ot = 8e3, st = (e, t) => F(it, t), G = ({ html: e, class: t }) => /* @__PURE__ */ W("div", {+var st = "/api/configuration", ct = "/api/pick-folder", lt = 8e3, ut = (e, t) => I(st, t), K = ({ html: e, class: t }) => /* @__PURE__ */ G("div", {class: t,dangerouslySetInnerHTML: { __html: e }-}), ct = (e) => !(e instanceof Oe) || e.status !== 400 ? null : e.body?.errors ?? null;-function lt({ facts: e }) {- return /* @__PURE__ */ W("section", {+}), dt = (e) => !(e instanceof ke) || e.status !== 400 ? null : e.body?.errors ?? null;+function ft({ facts: e }) {+ return /* @__PURE__ */ G("section", {class: "configfieldset","data-geist-fieldset": !0,"aria-labelledby": "configFactsTitle",- children: /* @__PURE__ */ W("div", {+ children: /* @__PURE__ */ G("div", {class: "geist-fieldset-content",- children: [/* @__PURE__ */ W(G, { html: i("configFactsTitle", "运行信息") }), /* @__PURE__ */ W("dl", {+ children: [/* @__PURE__ */ G(K, { html: i("configFactsTitle", "运行信息") }), /* @__PURE__ */ G("dl", {class: "configfacts",- children: e.map((e) => /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W("dt", { children: e.term }), /* @__PURE__ */ W("dd", { children: [e.value, e.download_url ? /* @__PURE__ */ W("span", {+ children: e.map((e) => /* @__PURE__ */ G(N, { children: [/* @__PURE__ */ G("dt", { children: e.term }), /* @__PURE__ */ G("dd", { children: [e.value, e.download_url ? /* @__PURE__ */ G("span", {class: "confighelp",- children: [" ", /* @__PURE__ */ W("a", {+ children: [" ", /* @__PURE__ */ G("a", {href: e.download_url,target: "_blank",rel: "noreferrer",- children: [e.download_label, /* @__PURE__ */ W("svg", {+ children: [e.download_label, /* @__PURE__ */ G("svg", {"aria-hidden": "true",viewBox: "0 0 24 24",- children: /* @__PURE__ */ W("use", { href: "#i-external-link" })+ children: /* @__PURE__ */ G("use", { href: "#i-external-link" })})]})]}) : null] })] }))@@ -1025,57 +1043,57 @@ function lt({ facts: e }) {})});}-function ut({ data: t }) {- let [n, r] = B(t.media_sources), [a, o] = B(""), s = U(null);- V(() => () => s.current?.abort(), []);+function pt({ data: t }) {+ let [n, r] = V(t.media_sources), [a, o] = V(""), s = W(null);+ H(() => () => s.current?.abort(), []);let c = async (e) => {if (s.current) return;let t = new AbortController();s.current = t, u(e, !0), o("");try {- let e = await F(it, t.signal);+ let e = await I(st, t.signal);t.signal.aborted || r(e.media_sources);} catch (e) {- t.signal.aborted || o(P(e));+ t.signal.aborted || o(F(e));} finally {s.current = null, u(e, !1);}};- return n ? /* @__PURE__ */ W("section", {+ return n ? /* @__PURE__ */ G("section", {class: "configfieldset","aria-labelledby": "configMountsTitle",- children: [/* @__PURE__ */ W("div", {+ children: [/* @__PURE__ */ G("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ W(G, { html: i("configMountsTitle", "挂载状态") }),- /* @__PURE__ */ W("dl", {+ /* @__PURE__ */ G(K, { html: i("configMountsTitle", "挂载状态") }),+ /* @__PURE__ */ G("dl", {class: "configfacts",- children: n.map((t) => /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W("dt", { children: [/* @__PURE__ */ W("span", {+ children: n.map((t) => /* @__PURE__ */ G(N, { children: [/* @__PURE__ */ G("dt", { children: [/* @__PURE__ */ G("span", {"aria-hidden": "true",dangerouslySetInnerHTML: { __html: l(e[t.location]) }}), {local: "本地磁盘",115: "CloudDrive · 115",pikpak: "CloudDrive · PikPak"- }[t.location] || t.location] }), /* @__PURE__ */ W("dd", { children: [+ }[t.location] || t.location] }), /* @__PURE__ */ G("dd", { children: [t.path || "未配置挂载点"," ",- /* @__PURE__ */ W("span", {+ /* @__PURE__ */ G("span", {class: `configstatus ${t.online === !0 ? "online" : t.online === !1 ? "offline" : "unknown"}`,children: t.online === !0 ? "在线" : t.online === !1 ? "离线" : "未检测"})] })] }))}),- a ? /* @__PURE__ */ W("p", {+ a ? /* @__PURE__ */ G("p", {class: "configbad",role: "alert",children: a}) : null]- }), /* @__PURE__ */ W("div", {+ }), /* @__PURE__ */ G("div", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: /* @__PURE__ */ W("button", {+ children: /* @__PURE__ */ G("button", {type: "button",class: "geist-button",onClick: (e) => c(e.currentTarget),@@ -1084,9 +1102,9 @@ function ut({ data: t }) {})]}) : null;}-function dt({ value: t, label: n, onChange: r }) {- let i = U(null), a = U(null), o = U(r);- return o.current = r, H(() => {+function mt({ value: t, label: n, onChange: r }) {+ let i = W(null), a = W(null), o = W(r);+ return o.current = r, U(() => {let r = i.current;r.innerHTML = c([["local", "本地磁盘"],@@ -1097,77 +1115,77 @@ function dt({ value: t, label: n, onChange: r }) {n,e[t]]), t, { label: n });- let s = d(r.firstElementChild);+ let s = f(r.firstElementChild);a.current = s;let l = () => o.current(s.value);return s.addEventListener("change", l), () => {a.current = null, s.disabled = !0, s.removeEventListener("change", l), r.replaceChildren();};- }, [n]), H(() => {+ }, [n]), U(() => {a.current && (a.current.value = t);- }, [t]), /* @__PURE__ */ W("div", {+ }, [t]), /* @__PURE__ */ G("div", {ref: i,class: "configsourcecontrol"});}-function ft({ data: e, receipt: t }) {+function ht({ data: e, receipt: t }) {let n = e.media_sources?.filter((e) => ["local","115","pikpak"- ].includes(e.location)), [r, a] = B(n?.length ? n.map((e) => e.path) : e.media_dirs.length ? e.media_dirs : [""]), [s, c] = B(n?.map((e) => e.location) ?? []), [l, d] = B(n?.map((e) => e.root) ?? []), [f, p] = B(String(e.port)), [m, h] = B(!1), [g, _] = B([]), [v, y] = B(""), [b, x] = B(""), [S, C] = B(null), [w, T] = B(null), E = U(!1), D = U(e.revision), ee = U([]), O = U(null);- H(() => {+ ].includes(e.location)), [r, a] = V(n?.length ? n.map((e) => e.path) : e.media_dirs.length ? e.media_dirs : [""]), [s, c] = V(n?.map((e) => e.location) ?? []), [l, d] = V(n?.map((e) => e.root) ?? []), [f, p] = V(String(e.port)), [m, h] = V(!1), [g, _] = V([]), [v, y] = V(""), [b, x] = V(""), [S, C] = V(null), [w, T] = V(null), E = W(!1), D = W(e.revision), ee = W([]), O = W(null);+ U(() => {w !== null && (ee.current[w]?.focus(), T(null));- }, [w]), V(() => {+ }, [w]), H(() => {if (!S) return;- let e = setTimeout(() => location.assign(S.url), ot);+ let e = setTimeout(() => location.assign(S.url), lt);return () => clearTimeout(e);}, [S]);let k = (e, t) => {a((n) => n.map((n, r) => r === e ? t : n));}, te = () => {T(r.length), a((e) => [...e, ""]);- }, ne = (e) => {+ }, A = (e) => {c((t) => t.filter((t, n) => n !== e)), d((t) => t.filter((t, n) => n !== e)), a((t) => t.filter((t, n) => n !== e)), _((t) => t.filter((t, n) => n !== e));- }, A = (e, t) => {+ }, j = (e, t) => {_((n) => {let r = [...n];for (; r.length <= e;) r.push("");return r[e] = t, r;});- }, j = async (e, t) => {+ }, ne = async (e, t) => {if (t.getAttribute("aria-busy") !== "true") {u(t, !0);try {- let { path: t } = await I(at, { initial: r[e] ?? "" });- t && (k(e, t), A(e, ""));+ let { path: t } = await L(ct, { initial: r[e] ?? "" });+ t && (k(e, t), j(e, ""));} catch (t) {- A(e, P(t));+ j(e, F(t));} finally {u(t, !1);}}};- return S ? /* @__PURE__ */ W("div", {+ return S ? /* @__PURE__ */ G("div", {class: "configsaved",role: "status",- children: /* @__PURE__ */ W("div", {+ children: /* @__PURE__ */ G("div", {class: "geist-note geist-note-success",role: "note",- children: [/* @__PURE__ */ W("svg", {+ children: [/* @__PURE__ */ G("svg", {"aria-hidden": "true",viewBox: "0 0 24 24",- children: /* @__PURE__ */ W("use", { href: "#i-check" })- }), /* @__PURE__ */ W("p", { children: /* @__PURE__ */ W("span", { children: [+ children: /* @__PURE__ */ G("use", { href: "#i-check" })+ }), /* @__PURE__ */ G("p", { children: /* @__PURE__ */ G("span", { children: ["配置已保存,Peach 正在重新启动。稍后自动跳转,或点击",- /* @__PURE__ */ W("a", {+ /* @__PURE__ */ G("a", {href: S.url,children: "进入馆藏"}),"。"] }) })]})- }) : /* @__PURE__ */ W("form", {+ }) : /* @__PURE__ */ G("form", {class: "configfieldset","data-geist-fieldset": !0,"aria-labelledby": "configTitle",@@ -1175,7 +1193,7 @@ function ft({ data: e, receipt: t }) {if (n.preventDefault(), !E.current) {E.current = !0, u(O.current, !0), x("");try {- let n = await I(it, {+ let n = await L(st, {revision: D.current,media_dirs: r,...e.media_sources ? { media_sources: r.map((e, t) => ({@@ -1188,38 +1206,38 @@ function ft({ data: e, receipt: t }) {});D.current = n.revision, _([]), y(""), t("已保存配置"), C(n);} catch (e) {- let t = ct(e);- t ? (_(t.media_dirs ?? []), y(t.port ?? "")) : (_([]), y(""), x(P(e)));+ let t = dt(e);+ t ? (_(t.media_dirs ?? []), y(t.port ?? "")) : (_([]), y(""), x(F(e)));} finally {E.current = !1, u(O.current, !1);}}},noValidate: !0,- children: [/* @__PURE__ */ W("div", {+ children: [/* @__PURE__ */ G("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ W(G, { html: i("configTitle", "这台电脑") }),- /* @__PURE__ */ W("div", {+ /* @__PURE__ */ G(K, { html: i("configTitle", "这台电脑") }),+ /* @__PURE__ */ G("div", {class: "configfield",children: [- /* @__PURE__ */ W("span", {+ /* @__PURE__ */ G("span", {class: "configlabel",id: "configDirsLabel",children: "媒体文件夹"}),- /* @__PURE__ */ W("div", {+ /* @__PURE__ */ G("div", {class: "configdirs",role: "group","aria-labelledby": "configDirsLabel",- children: r.map((t, n) => /* @__PURE__ */ W("div", {+ children: r.map((t, n) => /* @__PURE__ */ G("div", {class: "configdir",children: [- /* @__PURE__ */ W("span", {+ /* @__PURE__ */ G("span", {class: "configpathlabel",children: ["本机文件夹 ", n + 1]}),- /* @__PURE__ */ W("input", {+ /* @__PURE__ */ G("input", {class: "geist-input",type: "text",value: t,@@ -1230,33 +1248,33 @@ function ft({ data: e, receipt: t }) {ee.current[n] = e;}}),- /* @__PURE__ */ W("button", {+ /* @__PURE__ */ G("button", {type: "button",class: "geist-button configpick","aria-label": "选择文件夹",- onClick: (e) => j(n, e.currentTarget),- children: /* @__PURE__ */ W("svg", {+ onClick: (e) => ne(n, e.currentTarget),+ children: /* @__PURE__ */ G("svg", {viewBox: "0 0 24 24","aria-hidden": "true",- children: /* @__PURE__ */ W("use", { href: "#i-folder-search" })+ children: /* @__PURE__ */ G("use", { href: "#i-folder-search" })})}),- r.length > 1 ? /* @__PURE__ */ W("button", {+ r.length > 1 ? /* @__PURE__ */ G("button", {type: "button",class: "geist-button configrm","aria-label": "移除这个文件夹",- onClick: () => ne(n),- children: /* @__PURE__ */ W("svg", {+ onClick: () => A(n),+ children: /* @__PURE__ */ G("svg", {viewBox: "0 0 24 24","aria-hidden": "true",- children: /* @__PURE__ */ W("use", { href: "#i-x" })+ children: /* @__PURE__ */ G("use", { href: "#i-x" })})}) : null,- /* @__PURE__ */ W("div", {+ /* @__PURE__ */ G("div", {class: "configsource",- children: [/* @__PURE__ */ W("div", {+ children: [/* @__PURE__ */ G("div", {class: "configsourcelabel",- children: ["媒体来源", /* @__PURE__ */ W(dt, {+ children: ["媒体来源", /* @__PURE__ */ G(mt, {label: `媒体来源 ${n + 1}`,value: s[n] || "local",onChange: (e) => {@@ -1264,7 +1282,7 @@ function ft({ data: e, receipt: t }) {t[n] = e, c(t);}})]- }), e.windows === !1 ? /* @__PURE__ */ W("label", { children: ["Windows 中的对应路径", /* @__PURE__ */ W("input", {+ }), e.windows === !1 ? /* @__PURE__ */ G("label", { children: ["Windows 中的对应路径", /* @__PURE__ */ G("input", {class: "geist-input","aria-label": `Windows 中的对应路径 ${n + 1}`,value: l[n] || "",@@ -1275,7 +1293,7 @@ function ft({ data: e, receipt: t }) {}})] }) : null]}),- g[n] ? /* @__PURE__ */ W("p", {+ g[n] ? /* @__PURE__ */ G("p", {class: "configbad",role: "alert",children: g[n]@@ -1283,61 +1301,61 @@ function ft({ data: e, receipt: t }) {]}, n))}),- /* @__PURE__ */ W("button", {+ /* @__PURE__ */ G("button", {type: "button",class: "geist-button configadd",onClick: te,children: "添加文件夹"}),- s.some((e) => e === "115" || e === "pikpak") ? /* @__PURE__ */ W("p", {+ s.some((e) => e === "115" || e === "pikpak") ? /* @__PURE__ */ G("p", {class: "confighelp",- children: ["先在 CloudDrive 登录网盘并完成挂载。", /* @__PURE__ */ W("a", {+ children: ["先在 CloudDrive 登录网盘并完成挂载。", /* @__PURE__ */ G("a", {href: "https://www.clouddrive2.com/help.html",target: "_blank",rel: "noreferrer",- children: ["挂载帮助", /* @__PURE__ */ W("svg", {+ children: ["挂载帮助", /* @__PURE__ */ G("svg", {"aria-hidden": "true",viewBox: "0 0 24 24",- children: /* @__PURE__ */ W("use", { href: "#i-external-link" })+ children: /* @__PURE__ */ G("use", { href: "#i-external-link" })})]})]}) : null,- s.some((e) => e === "115" || e === "pikpak") ? e.mount_dependencies?.filter((e) => !e.available).map((e) => /* @__PURE__ */ W("p", {+ s.some((e) => e === "115" || e === "pikpak") ? e.mount_dependencies?.filter((e) => !e.available).map((e) => /* @__PURE__ */ G("p", {class: "confighelp",children: ["未检测到 ",e.name,"。",- /* @__PURE__ */ W("a", {+ /* @__PURE__ */ G("a", {href: e.download_url,target: "_blank",rel: "noreferrer",children: ["下载 ",e.name,- /* @__PURE__ */ W("svg", {+ /* @__PURE__ */ G("svg", {"aria-hidden": "true",viewBox: "0 0 24 24",- children: /* @__PURE__ */ W("use", { href: "#i-external-link" })+ children: /* @__PURE__ */ G("use", { href: "#i-external-link" })})]})]})) : null,- e.windows === !1 ? /* @__PURE__ */ W("p", {+ e.windows === !1 ? /* @__PURE__ */ G("p", {class: "confighelp",children: "本机文件夹是这台电脑读取媒体的位置。Windows 中的对应路径用于匹配馆藏中已有的路径,例如 B:\\ 对应本机挂载文件夹。"}) : null]}),- e.port_editable === !1 ? null : /* @__PURE__ */ W("div", {+ e.port_editable === !1 ? null : /* @__PURE__ */ G("div", {class: "configfield",children: [- /* @__PURE__ */ W("label", {+ /* @__PURE__ */ G("label", {for: "configPort",children: "本机访问端口"}),- /* @__PURE__ */ W("input", {+ /* @__PURE__ */ G("input", {id: "configPort",class: "geist-input",type: "text",@@ -1346,43 +1364,43 @@ function ft({ data: e, receipt: t }) {"aria-invalid": v ? "true" : void 0,onInput: (e) => p(e.currentTarget.value)}),- v ? /* @__PURE__ */ W("p", {+ v ? /* @__PURE__ */ G("p", {class: "configbad",role: "alert",children: v}) : null,- /* @__PURE__ */ W("p", {+ /* @__PURE__ */ G("p", {class: "confighelp",children: "浏览器地址里冒号后面的数字,一般不用改。"})]}),- /* @__PURE__ */ W("label", {+ /* @__PURE__ */ G("label", {class: "configcheck",- children: [/* @__PURE__ */ W("span", {+ children: [/* @__PURE__ */ G("span", {class: "pcheck",- children: [/* @__PURE__ */ W("input", {+ children: [/* @__PURE__ */ G("input", {type: "checkbox",checked: m,onChange: (e) => h(e.currentTarget.checked)- }), /* @__PURE__ */ W("span", {+ }), /* @__PURE__ */ G("span", {"aria-hidden": "true",- children: /* @__PURE__ */ W("svg", {+ children: /* @__PURE__ */ G("svg", {viewBox: "0 0 24 24",- children: /* @__PURE__ */ W("use", { href: "#i-check" })+ children: /* @__PURE__ */ G("use", { href: "#i-check" })})})]- }), /* @__PURE__ */ W("span", { children: "保存后扫描并补全资料" })]+ }), /* @__PURE__ */ G("span", { children: "保存后扫描并补全资料" })]}),- b ? /* @__PURE__ */ W(G, { html: o(b, {+ b ? /* @__PURE__ */ G(K, { html: o(b, {variant: "error",label: "没有保存"}) }) : null]- }), /* @__PURE__ */ W("div", {+ }), /* @__PURE__ */ G("div", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: [/* @__PURE__ */ W("p", { children: e.port_editable === !1 ? "保存后 Peach 会重新载入配置。" : "保存后 Peach 会重新启动,端口改了就用新地址打开。" }), /* @__PURE__ */ W("button", {+ children: [/* @__PURE__ */ G("p", { children: e.port_editable === !1 ? "保存后 Peach 会重新载入配置。" : "保存后 Peach 会重新启动,端口改了就用新地址打开。" }), /* @__PURE__ */ G("button", {type: "submit",class: "geist-button primary",ref: O,@@ -1391,64 +1409,64 @@ function ft({ data: e, receipt: t }) {})]});}-function pt({ receipt: e, data: t, error: n }) {- return n || !t ? /* @__PURE__ */ W(G, {+function gt({ receipt: e, data: t, error: n }) {+ return n || !t ? /* @__PURE__ */ G(K, {class: "configpage",html: o(n || "没有读到配置", {variant: "error",label: "打不开配置"})- }) : /* @__PURE__ */ W("div", {+ }) : /* @__PURE__ */ G("div", {class: "configpage",children: [- t.editable ? /* @__PURE__ */ W(ft, {+ t.startup ? /* @__PURE__ */ G(it, {+ startup: t.startup,+ receipt: e+ }) : null,+ t.editable ? /* @__PURE__ */ G(ht, {data: t,receipt: e- }) : /* @__PURE__ */ W(G, { html: o(t.notice, {+ }) : /* @__PURE__ */ G(K, { html: o(t.notice, {variant: "secondary",label: "只读"}) }),- t.access ? /* @__PURE__ */ W(Qe, {- initial: t.access,- receipt: e- }) : null,- t.peach_proxy ? /* @__PURE__ */ W(tt, {+ /* @__PURE__ */ G(pt, { data: t }),+ t.peach_proxy ? /* @__PURE__ */ G(nt, {initial: t.peach_proxy,receipt: e}) : null,- t.startup && t.uninstall ? /* @__PURE__ */ W(rt, {- startup: t.startup,- uninstall: t.uninstall,+ t.access ? /* @__PURE__ */ G($e, {+ initial: t.access,receipt: e}) : null,- t.updates ? /* @__PURE__ */ W(et, {+ t.updates ? /* @__PURE__ */ G(tt, {initial: t.updates,initialJob: t.update_job}) : null,- /* @__PURE__ */ W(lt, { facts: t.facts }),- /* @__PURE__ */ W(ut, { data: t })+ /* @__PURE__ */ G(ft, { facts: t.facts }),+ t.uninstall ? /* @__PURE__ */ G(ot, { uninstall: t.uninstall }) : null]});}//#endregion//#region node_modules/@preact/signals-core/dist/signals-core.module.js-var mt = Symbol.for("preact-signals");-function ht() {- if (J > 1) J--;+var _t = Symbol.for("preact-signals");+function vt() {+ if (Y > 1) Y--;else {var e, t = !1;for ((function() {- var e = St;- for (St = void 0; e !== void 0;) {+ var e = Tt;+ for (Tt = 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;}- })(); vt !== void 0;) {- var n = vt;- for (vt = void 0, yt++; n !== void 0;) {+ })(); xt !== void 0;) {+ var n = xt;+ for (xt = void 0, St++; n !== void 0;) {var r = n.u;- if (n.u = void 0, n.f &= -3, !(8 & n.f) && Et(n)) try {+ if (n.u = void 0, n.f &= -3, !(8 & n.f) && kt(n)) try {n.c();} catch (n) {t ||= (e = n, !0);@@ -1456,116 +1474,116 @@ function ht() {n = r;}}- if (yt = 0, J--, t) throw e;+ if (St = 0, Y--, t) throw e;}}-function gt(e) {- if (J > 0) return e();- xt = ++bt, J++;+function yt(e) {+ if (Y > 0) return e();+ wt = ++Ct, Y++;try {return e();} finally {- ht();+ vt();}}-var K, q = void 0;-function _t(e) {- var t = q, n = K;- q = void 0, K = void 0;+var q, J = void 0;+function bt(e) {+ var t = J, n = q;+ J = void 0, q = void 0;try {return e();} finally {- q = t, K = n;+ J = t, q = n;}}-var vt = void 0, J = 0, yt = 0, bt = 0, xt = 0, St = void 0, Ct = 0;-function wt(e) {- if (q !== void 0) {+var xt = void 0, Y = 0, St = 0, Ct = 0, wt = 0, Tt = void 0, Et = 0;+function Dt(e) {+ if (J !== void 0) {var t = e.n;- if (t === void 0 || t.t !== q) return t = {+ if (t === void 0 || t.t !== J) return t = {i: 0,S: e,- p: q.s,+ p: J.s,n: void 0,- t: q,+ t: J,e: void 0,x: void 0,r: t- }, q.s !== void 0 && (q.s.n = t), q.s = t, e.n = t, 32 & q.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 = q.s, t.n = void 0, q.s.n = t, q.s = t), t;+ }, J.s !== void 0 && (J.s.n = t), J.s = t, e.n = t, 32 & J.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 = J.s, t.n = void 0, J.s.n = t, J.s = t), t;}}-function Y(e, t) {+function X(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;}-Y.prototype.brand = mt, Y.prototype.h = function() {+X.prototype.brand = _t, X.prototype.h = function() {return !0;-}, Y.prototype.S = function(e) {+}, X.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 ? _t(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);-}, Y.prototype.U = function(e) {+}, X.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 && _t(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);}));}-}, Y.prototype.subscribe = function(e) {+}, X.prototype.subscribe = function(e) {var t = this;- return Q(function() {+ return It(function() {var n = t.value;- _t(function() {+ bt(function() {return e(n);});}, { name: "sub" });-}, Y.prototype.valueOf = function() {+}, X.prototype.valueOf = function() {return this.value;-}, Y.prototype.toString = function() {+}, X.prototype.toString = function() {return this.value + "";-}, Y.prototype.toJSON = function() {+}, X.prototype.toJSON = function() {return this.value;-}, Y.prototype.peek = function() {+}, X.prototype.peek = function() {var e = this;- return _t(function() {+ return bt(function() {return e.value;});-}, Object.defineProperty(Y.prototype, "value", {+}, Object.defineProperty(X.prototype, "value", {get: function() {- var e = wt(this);+ var e = Dt(this);return e !== void 0 && (e.i = this.i), this.v;},set: function(e) {if (e !== this.v) {- if (yt > 100) throw Error("Cycle detected");+ if (St > 100) throw Error("Cycle detected");(function(e) {- J !== 0 && yt === 0 && e.l !== xt && (e.l = xt, St = {+ Y !== 0 && St === 0 && e.l !== wt && (e.l = wt, Tt = {S: e,v: e.v,i: e.i,- o: St+ o: Tt});- })(this), this.v = e, this.i++, Ct++, J++;+ })(this), this.v = e, this.i++, Et++, Y++;try {for (var t = this.t; t !== void 0; t = t.x) t.t.N();} finally {- ht();+ vt();}}}});-function Tt(e, t) {- return new Y(e, t);+function Ot(e, t) {+ return new X(e, t);}-function Et(e) {+function kt(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 Dt(e) {+function At(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) {@@ -1574,81 +1592,81 @@ function Dt(e) {}}}-function Ot(e) {+function jt(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 X(e, t) {- Y.call(this, void 0, t), this.x = e, this.s = void 0, this.g = Ct - 1, this.f = 4;+function Z(e, t) {+ X.call(this, void 0, t), this.x = e, this.s = void 0, this.g = Et - 1, this.f = 4;}-X.prototype = new Y(), X.prototype.h = function() {+Z.prototype = new X(), Z.prototype.h = function() {if (this.f &= -3, 1 & this.f) return !1;- if ((36 & this.f) == 32 || (this.f &= -5, this.g === Ct)) return !0;- if (this.g = Ct, this.f |= 1, this.i > 0 && !Et(this)) return this.f &= -2, !0;- var e = q;+ if ((36 & this.f) == 32 || (this.f &= -5, this.g === Et)) return !0;+ if (this.g = Et, this.f |= 1, this.i > 0 && !kt(this)) return this.f &= -2, !0;+ var e = J;try {- Dt(this), q = this;+ At(this), J = 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 q = e, Ot(this), this.f &= -2, !0;-}, X.prototype.S = function(e) {+ return J = e, jt(this), this.f &= -2, !0;+}, Z.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);}- Y.prototype.S.call(this, e);-}, X.prototype.U = function(e) {- if (this.t !== void 0 && (Y.prototype.U.call(this, e), this.t === void 0)) {+ X.prototype.S.call(this, e);+}, Z.prototype.U = function(e) {+ if (this.t !== void 0 && (X.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);}-}, X.prototype.N = function() {+}, Z.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(X.prototype, "value", { get: function() {+}, Object.defineProperty(Z.prototype, "value", { get: function() {if (1 & this.f) throw Error("Cycle detected");- var e = wt(this);+ var e = Dt(this);if (this.h(), e !== void 0 && (e.i = this.i), 16 & this.f) throw this.v;return this.v;} });-function kt(e, t) {- return new X(e, t);+function Mt(e, t) {+ return new Z(e, t);}-function At(e) {+function Nt(e) {var t = e.m;if (e.m = void 0, typeof t == "function") {- J++;- var n = q;- q = void 0;+ Y++;+ var n = J;+ J = void 0;try {t();} catch (t) {- throw e.f &= -2, e.f |= 8, jt(e), t;+ throw e.f &= -2, e.f |= 8, Pt(e), t;} finally {- q = n, ht();+ J = n, vt();}}}-function jt(e) {+function Pt(e) {for (var t = e.s; t !== void 0; t = t.n) t.S.U(t);- e.x = void 0, e.s = void 0, At(e);+ e.x = void 0, e.s = void 0, Nt(e);}-function Mt(e) {- if (q !== this) throw Error("Out-of-order effect");- Ot(this), q = e, this.f &= -2, 8 & this.f && jt(this), ht();+function Ft(e) {+ if (J !== this) throw Error("Out-of-order effect");+ jt(this), J = e, this.f &= -2, 8 & this.f && Pt(this), vt();}-function Z(e, t) {- this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, K && K.push(this);+function Q(e, t) {+ this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, q && q.push(this);}-Z.prototype.c = function() {+Q.prototype.c = function() {var e = this.S();try {if (8 & this.f || this.x === void 0) return;@@ -1657,20 +1675,20 @@ Z.prototype.c = function() {} finally {e();}-}, Z.prototype.S = function() {+}, Q.prototype.S = function() {if (1 & this.f) throw Error("Cycle detected");- this.f |= 1, this.f &= -9, At(this), Dt(this), J++;- var e = q;- return q = this, Mt.bind(this, e);-}, Z.prototype.N = function() {- 2 & this.f || (this.f |= 2, this.u = vt, vt = this);-}, Z.prototype.d = function() {- this.f |= 8, 1 & this.f || jt(this);-}, Z.prototype.dispose = function() {+ this.f |= 1, this.f &= -9, Nt(this), At(this), Y++;+ var e = J;+ return J = this, Ft.bind(this, e);+}, Q.prototype.N = function() {+ 2 & this.f || (this.f |= 2, this.u = xt, xt = this);+}, Q.prototype.d = function() {+ this.f |= 8, 1 & this.f || Pt(this);+}, Q.prototype.dispose = function() {this.d();};-function Q(e, t) {- var n = new Z(e, t);+function It(e, t) {+ var n = new Q(e, t);try {n.c();} catch (e) {@@ -1681,35 +1699,35 @@ function Q(e, t) {}//#endregion//#region node_modules/@preact/signals/dist/signals.module.js-var Nt, Pt, Ft = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, It = [];-Q(function() {- Nt = this.N;+var Lt, Rt, zt = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, Bt = [];+It(function() {+ Lt = this.N;})();function $(e, t) {- g[e] = t.bind(null, g[e] || function() {});+ v[e] = t.bind(null, v[e] || function() {});}-function Lt(e) {- if (Pt) {- var t = Pt;- Pt = void 0, t();+function Vt(e) {+ if (Rt) {+ var t = Rt;+ Rt = void 0, t();}- Pt = e && e.S();+ Rt = e && e.S();}-function Rt(e) {- var t = this, n = e.data, r = Bt(n);+function Ht(e) {+ var t = this, n = e.data, r = Wt(n);r.name = "ReactiveDom", r.value = n;- var i = He(function() {+ var i = Ue(function() {for (var e = t, n = t.__v; n = n.__;) if (n.__c) {n.__c.__$f |= 4;break;}- var i = kt(function() {+ var i = Mt(function() {var e = r.value.value;return e === 0 ? 0 : !0 === e ? "" : e || "";- }), a = kt(function() {- return !Array.isArray(i.value) && !v(i.value);- }), o = Q(function() {- if (this.N = Ut, a.value) {+ }), a = Mt(function() {+ return !Array.isArray(i.value) && !b(i.value);+ }), o = It(function() {+ if (this.N = qt, a.value) {var t = i.value;e.__v && e.__v.__e && e.__v.__e.nodeType === 3 && (e.__v.__e.data = t);}@@ -1720,14 +1738,14 @@ function Rt(e) {}, []), a = i[0], o = i[1];return a.value ? o.peek() : o.value;}-Rt.displayName = "ReactiveTextNode", Object.defineProperties(Y.prototype, {+Ht.displayName = "ReactiveTextNode", Object.defineProperties(X.prototype, {constructor: {configurable: !0,value: void 0},type: {configurable: !0,- value: Rt+ value: Ht},props: {configurable: !0,@@ -1747,30 +1765,30 @@ Rt.displayName = "ReactiveTextNode", Object.defineProperties(Y.prototype, {var n, r = t.props;for (var i in r) if (i !== "children") {var a = r[i];- a instanceof Y && (n || (t.__np = n = {}), n[i] = a, r[i] = a.peek());+ a instanceof X && (n || (t.__np = n = {}), n[i] = a, r[i] = a.peek());}}e(t);}), $("__r", function(e, t) {- if (e(t), t.type !== M) {- Lt();+ if (e(t), t.type !== N) {+ Vt();var n, r = t.__c;r && (r.__$f &= -2, (n = r.__$u) === void 0 && (r.__$u = n = function(e, t) {var n;- return Q(function() {+ return It(function() {n = this;}, { name: t }), n.c = e, n;}(function(e) {return function() {var t;- Ft && ((t = this.y) == null || t.call(this)), e.__$f |= 1, e.setState({});+ zt && ((t = this.y) == null || t.call(this)), e.__$f |= 1, e.setState({});};- }(r), typeof t.type == "function" ? t.type.displayName || t.type.name : ""))), Lt(n);+ }(r), typeof t.type == "function" ? t.type.displayName || t.type.name : ""))), Vt(n);}}), $("__e", function(e, t, n, r) {- Lt(), e(t, n, r);+ Vt(), e(t, n, r);}), $("diffed", function(e, t) {- Lt();+ Vt();var n;if (typeof t.type == "string" && (n = t.__e)) {var r = t.__np, i = t.props, a = n.U;@@ -1780,19 +1798,19 @@ Rt.displayName = "ReactiveTextNode", Object.defineProperties(Y.prototype, {}if (r) for (var c in a || (a = {}, n.U = a), r) {var l = a[c], u = r[c];- l === void 0 ? (l = zt(n, c, u, i), a[c] = l) : l.o(u, i);+ l === void 0 ? (l = Ut(n, c, u, i), a[c] = l) : l.o(u, i);}}e(t);});-function zt(e, t, n, r) {- var i = t in e && e.ownerSVGElement === void 0, a = Tt(n);+function Ut(e, t, n, r) {+ var i = t in e && e.ownerSVGElement === void 0, a = Ot(n);return {o: function(e, t) {a.value = e, r = t;},- d: Q(function() {- this.N = Ut;+ d: It(function() {+ this.N = qt;var n = a.value.value;r[t] !== n && (r[t] = n, i ? e[t] = n : n != null && (!1 !== n || t[4] === "-") ? e.setAttribute(t, n) : e.removeAttribute(t));})@@ -1824,7 +1842,7 @@ $("unmount", function(e, t) {e(t);}), $("__h", function(e, t, n, r) {r < 3 && (t.__$f |= 2), e(t, n, r);-}), oe.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;@@ -1836,55 +1854,55 @@ $("unmount", function(e, t) {for (var s in this.props) if (!(s in e)) return !0;return !1;};-function Bt(e, t) {- return He(function() {- return Tt(e, t);+function Wt(e, t) {+ return Ue(function() {+ return Ot(e, t);}, []);}-var Vt = function(e) {+var Gt = function(e) {queueMicrotask(function() {queueMicrotask(e);});};-function Ht() {- gt(function() {- for (var e; e = It.shift();) Nt.call(e);+function Kt() {+ yt(function() {+ for (var e; e = Bt.shift();) Lt.call(e);});}-function Ut() {- It.push(this) === 1 && (g.requestAnimationFrame || Vt)(Ht);+function qt() {+ Bt.push(this) === 1 && (v.requestAnimationFrame || Gt)(Kt);}//#endregion//#region src/state/quality-goals.ts-var Wt = "/api/quality-goals?limit=200", Gt = {+var Jt = "/api/quality-goals?limit=200", Yt = {data: null,error: ""-}, Kt = Tt(Gt), qt = 0, Jt = kt(() => Kt.value);-kt(() => Kt.value.data?.total ?? null);-function Yt() {- qt += 1, Kt.value = Gt;+}, Xt = Ot(Yt), Zt = 0, Qt = Mt(() => Xt.value);+Mt(() => Xt.value.data?.total ?? null);+function $t() {+ Zt += 1, Xt.value = Yt;}-async function Xt(e) {- let t = qt += 1;+async function en(e) {+ let t = Zt += 1;try {- let n = await F(Wt, e);- return t === qt && (Kt.value = {+ let n = await I(Jt, e);+ return t === Zt && (Xt.value = {data: n,error: ""}), n;} catch (n) {- throw !e?.aborted && t === qt && (Kt.value = {+ throw !e?.aborted && t === Zt && (Xt.value = {data: null,- error: P(n)+ error: F(n)}), n;}}//#endregion//#region src/islands/quality-goals.tsx-var Zt = (e, t) => Xt(t), Qt = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;-function $t({ openItem: e, javTitleHtml: t, javDisplayName: n, srcBadge: i }) {- let { data: a, error: s } = Jt.value;- if (s) return /* @__PURE__ */ W("div", {+var tn = (e, t) => en(t), nn = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;+function rn({ openItem: e, javTitleHtml: t, javDisplayName: n, srcBadge: i }) {+ let { data: a, error: s } = Qt.value;+ if (s) return /* @__PURE__ */ G("div", {class: "qualitylist",dangerouslySetInnerHTML: { __html: o(s, {variant: "error",@@ -1892,51 +1910,51 @@ function $t({ openItem: e, javTitleHtml: t, javDisplayName: n, srcBadge: i }) {}) }});let c = a?.items ?? [];- return c.length ? /* @__PURE__ */ W("div", {+ return c.length ? /* @__PURE__ */ G("div", {class: "qualitylist",- children: c.map((r) => /* @__PURE__ */ W("article", {+ children: c.map((r) => /* @__PURE__ */ G("article", {class: "qualityitem",- children: [/* @__PURE__ */ W("button", {+ children: [/* @__PURE__ */ G("button", {class: "qualitycover",type: "button","aria-label": `打开 ${n(r)}`,onClick: () => e(r.id),- children: /* @__PURE__ */ W("img", {- src: Qt(r),+ children: /* @__PURE__ */ G("img", {+ src: nn(r),alt: "",loading: "lazy",onError: (e) => e.currentTarget.remove()})- }), /* @__PURE__ */ W("div", { children: [- /* @__PURE__ */ W("h3", { children: /* @__PURE__ */ W("button", {+ }), /* @__PURE__ */ G("div", { children: [+ /* @__PURE__ */ G("h3", { children: /* @__PURE__ */ G("button", {type: "button","data-middle-truncate": !0,onClick: () => e(r.id),dangerouslySetInnerHTML: { __html: t(r) }}) }),- /* @__PURE__ */ W("p", {+ /* @__PURE__ */ G("p", {class: "mono",children: [- /* @__PURE__ */ W("span", {+ /* @__PURE__ */ G("span", {style: "display:contents",dangerouslySetInnerHTML: { __html: i(r.location, r.cost) }}),- /* @__PURE__ */ W("span", { children: f[r.location] ?? r.location }),- /* @__PURE__ */ W("span", { children: p(r.duration) }),- /* @__PURE__ */ W("span", { children: m(r.size ?? 0) })+ /* @__PURE__ */ G("span", { children: p[r.location] ?? r.location }),+ /* @__PURE__ */ G("span", { children: m(r.duration) }),+ /* @__PURE__ */ G("span", { children: h(r.size ?? 0) })]}),- r.reason ? /* @__PURE__ */ W("p", { children: r.reason }) : null+ r.reason ? /* @__PURE__ */ G("p", { children: r.reason }) : null] })]}, r.id))- }) : /* @__PURE__ */ W("div", {+ }) : /* @__PURE__ */ G("div", {class: "qualitylist",dangerouslySetInnerHTML: { __html: r("sparkles", "没有标记中的高清版目标", "现有版本都已满足条件,或还没有加入追踪。") }});}//#endregion//#region src/jobs.ts-async function en(e) {+async function an(e) {let t = e.pause || ((e) => new Promise((t) => setTimeout(t, e))), n = 0;for (; e.active();) {let r;@@ -1951,11 +1969,11 @@ async function en(e) {await t(2e3);}}-function tn(e) {+function on(e) {let t = document.createElement("div");e.host.hidden = !0, t.dataset.followJob = "", t.setAttribute("aria-live", "polite"), e.host.prepend(t);let n = e.storageKey || "peach-follow-job", r = sessionStorage.getItem(n) || void 0, i = !1;- en({+ an({read: e.read,active: () => !i && e.active() && t.isConnected,keepWatching: e.watchIdle !== !1,@@ -1981,37 +1999,37 @@ function tn(e) {}//#endregion//#region src/islands/scraping.tsx-var nn = (e, t) => F("/api/scraping", t);-function rn({ value: e, onChange: t }) {- let n = U(null), r = U(t);- return r.current = t, H(() => {+var sn = (e, t) => I("/api/scraping", t);+function cn({ value: e, onChange: t }) {+ let n = W(null), r = W(t);+ return r.current = t, U(() => {let t = n.current;t.innerHTML = c([["peach", "Peach 代理"], ["direct", "直接连接"]], e, { label: "连接方式" });- let i = d(t.firstElementChild), a = () => r.current(i.value);+ let i = f(t.firstElementChild), a = () => r.current(i.value);return i.addEventListener("change", a), () => {i.disabled = !0, i.removeEventListener("change", a), t.replaceChildren();};- }, []), /* @__PURE__ */ W("div", {+ }, []), /* @__PURE__ */ G("div", {ref: n,class: "scraping-network"});}-function an({ source: e, toast: t }) {- let [n, r] = B(e), [a, s] = B(e.network), [c, l] = B(""), [d, f] = B(""), [p, m] = B("paste"), [h, g] = B(""), [_, v] = B(!1), [y, b] = B(""), [x, S] = B([]), C = U(null), w = U(null);- H(() => {+function ln({ source: e, toast: t }) {+ let [n, r] = V(e), [a, s] = V(e.network), [c, l] = V(""), [d, f] = V(""), [p, m] = V("paste"), [h, g] = V(""), [_, v] = V(!1), [y, b] = V(""), [x, S] = V([]), C = W(null), w = W(null);+ U(() => {w.current?.querySelectorAll("footer button").forEach((e) => u(e, _));}, [_]);- let T = U(new AbortController());- V(() => () => T.current.abort(), []);+ let T = W(new AbortController());+ H(() => () => T.current.abort(), []);async function E(n) {if (!_) {v(!0), b(""), S([]);try {if (n === "check") {- let t = await I("/api/scraping/check", { source: e.source }, "POST", T.current.signal);+ let t = await L("/api/scraping/check", { source: e.source }, "POST", T.current.signal);T.current.signal.aborted || S(t.results);} else {- let i = await I("/api/scraping/settings", {+ let i = await L("/api/scraping/settings", {source: e.source,network: a,cookie: c,@@ -2021,50 +2039,50 @@ function an({ source: e, toast: t }) {T.current.signal.aborted || (r(i.saved), l(""), f(""), g(""), C.current && (C.current.value = ""), t(n === "revoke" ? "Cookie 已撤销" : "来源设置已保存"));}} catch (e) {- T.current.signal.aborted || b(P(e));+ T.current.signal.aborted || b(F(e));} finally {T.current.signal.aborted || v(!1);}}}- return /* @__PURE__ */ W("section", {+ return /* @__PURE__ */ G("section", {class: "scraping-source",- children: /* @__PURE__ */ W("form", {+ children: /* @__PURE__ */ G("form", {ref: w,class: "cleanupfieldset","data-geist-fieldset": !0,onSubmit: (e) => {e.preventDefault(), E("save");},- children: [/* @__PURE__ */ W("div", {+ children: [/* @__PURE__ */ G("div", {class: "geist-fieldset-content scraping-fields",children: [- /* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: i(`scraping-${e.source}`, e.label) } }),- /* @__PURE__ */ W("a", {+ /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i(`scraping-${e.source}`, e.label) } }),+ /* @__PURE__ */ G("a", {class: "scraping-url",href: e.login,target: "_blank",rel: "noopener noreferrer",children: e.login}),- /* @__PURE__ */ W("div", {+ /* @__PURE__ */ G("div", {class: "scraping-label",- children: ["连接方式", /* @__PURE__ */ W(rn, {+ children: ["连接方式", /* @__PURE__ */ G(cn, {value: a,onChange: s})]}),- a === "peach" && /* @__PURE__ */ W("a", {+ a === "peach" && /* @__PURE__ */ G("a", {href: "/configuration#peachProxy",children: "配置 Peach 代理"}),- e.accepts_cookie && /* @__PURE__ */ W(M, { children: [- /* @__PURE__ */ W("p", { children: n.cookie_saved ? "Cookie 已保存,登录是否有效请在抓取时确认。" : "需要登录时,任选一种方式提供 Cookie。" }),- /* @__PURE__ */ W("div", {+ e.accepts_cookie && /* @__PURE__ */ G(N, { children: [+ /* @__PURE__ */ G("p", { children: n.cookie_saved ? "Cookie 已保存,登录是否有效请在抓取时确认。" : "需要登录时,任选一种方式提供 Cookie。" }),+ /* @__PURE__ */ G("div", {class: "insightswitch scraping-cookie-method",role: "radiogroup","aria-label": "提供 Cookie 的方式(二选一)",- children: [["paste", "粘贴 Cookie"], ["file", "导入文件"]].map(([t, n]) => /* @__PURE__ */ W("label", { children: [/* @__PURE__ */ W("input", {+ children: [["paste", "粘贴 Cookie"], ["file", "导入文件"]].map(([t, n]) => /* @__PURE__ */ G("label", { children: [/* @__PURE__ */ G("input", {type: "radio",name: `cookie-method-${e.source}`,value: t,@@ -2072,29 +2090,29 @@ function an({ source: e, toast: t }) {onChange: () => {m(t), l(""), f(""), g("");}- }), /* @__PURE__ */ W("span", { children: n })] }, t))+ }), /* @__PURE__ */ G("span", { children: n })] }, t))}),- p === "paste" ? /* @__PURE__ */ W("label", { children: ["Cookie", /* @__PURE__ */ W("input", {+ p === "paste" ? /* @__PURE__ */ G("label", { children: ["Cookie", /* @__PURE__ */ G("input", {class: "geist-input",type: "password",autoComplete: "off",value: c,disabled: _,onInput: (e) => l(e.currentTarget.value)- })] }) : /* @__PURE__ */ W("label", {+ })] }) : /* @__PURE__ */ G("label", {class: "scraping-file",- children: ["Netscape Cookie 文件(.txt)", /* @__PURE__ */ W("span", {+ children: ["Netscape Cookie 文件(.txt)", /* @__PURE__ */ G("span", {class: "scraping-file-control",children: [- /* @__PURE__ */ W("span", {+ /* @__PURE__ */ G("span", {class: "geist-button",children: "选择文件"}),- /* @__PURE__ */ W("span", {+ /* @__PURE__ */ G("span", {class: "scraping-file-name",children: h || "未选择文件"}),- /* @__PURE__ */ W("input", {+ /* @__PURE__ */ G("input", {ref: C,type: "file",accept: ".txt",@@ -2124,31 +2142,31 @@ function an({ source: e, toast: t }) {})]})] }),- y && /* @__PURE__ */ W("div", {+ y && /* @__PURE__ */ G("div", {role: "alert",dangerouslySetInnerHTML: { __html: o(y, { variant: "error" }) }}),- x.map((t) => /* @__PURE__ */ W("div", {+ x.map((t) => /* @__PURE__ */ G("div", {role: "status",dangerouslySetInnerHTML: { __html: o(`${e.label}${t.label === "来源页面" ? "" : " 高清图片"}:${t.ok ? "可连接" : "不能连接"}` + (t.width ? ` · ${t.width} × ${t.height}` : "") + (t.message ? `。${t.message}` : ""), { variant: t.ok ? "success" : "error" }) }}, t.label))]- }), /* @__PURE__ */ W("footer", {+ }), /* @__PURE__ */ G("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,children: [- /* @__PURE__ */ W("button", {+ /* @__PURE__ */ G("button", {class: "geist-button primary",type: "submit",children: "保存"}),- /* @__PURE__ */ W("button", {+ /* @__PURE__ */ G("button", {class: "geist-button",type: "button",onClick: () => void E("check"),children: "检查连接"}),- e.accepts_cookie && n.cookie_saved && /* @__PURE__ */ W("button", {+ e.accepts_cookie && n.cookie_saved && /* @__PURE__ */ G("button", {class: "geist-button",type: "button",onClick: () => void E("revoke"),@@ -2159,14 +2177,14 @@ function an({ source: e, toast: t }) {})});}-function on({ data: e, error: t, toast: n }) {- let [r, a] = B(""), [s, c] = B(!1), [l, d] = B(""), f = U(null);- H(() => u(f.current, s), [s]);- let p = U(new AbortController()), m = U(0);+function un({ data: e, error: t, toast: n }) {+ let [r, a] = V(""), [s, c] = V(!1), [l, d] = V(""), f = W(null);+ U(() => u(f.current, s), [s]);+ let p = W(new AbortController()), m = W(0);async function h(e = !1) {let t = ++m.current;- await en({- read: (e) => F("/api/scraping/cover", e),+ await an({+ read: (e) => I("/api/scraping/cover", e),active: () => !p.current.signal.aborted && t === m.current,render: (t) => {c(t.status === "running"), t.status === "running" && (e = !1), t.status === "failed" && !e && d(t.error || "采集未取得"), t.status === "complete" && !e && n(t.result || "封面采集完成");@@ -2174,37 +2192,37 @@ function on({ data: e, error: t, toast: n }) {disconnected: () => d("连接中断,正在重新读取后台进度")});}- V(() => (h(!0), () => p.current.abort()), []);+ H(() => (h(!0), () => p.current.abort()), []);async function g() {if (!s) {m.current++, c(!0), d("");try {- await I("/api/scraping/cover", { code: r }, "POST", p.current.signal), await h();+ await L("/api/scraping/cover", { code: r }, "POST", p.current.signal), await h();} catch (e) {- p.current.signal.aborted || (c(!1), d(P(e)));+ p.current.signal.aborted || (c(!1), d(F(e)));}}}- return t ? /* @__PURE__ */ W("div", {+ return t ? /* @__PURE__ */ G("div", {role: "alert",dangerouslySetInnerHTML: { __html: o(t, { variant: "error" }) }- }) : /* @__PURE__ */ W("div", {+ }) : /* @__PURE__ */ G("div", {class: "scraping-page",children: [- /* @__PURE__ */ W("p", { children: "高清图片可能需要代理才能下载,请先检查连接。" }),- /* @__PURE__ */ W("section", {+ /* @__PURE__ */ G("p", { children: "高清图片可能需要代理才能下载,请先检查连接。" }),+ /* @__PURE__ */ G("section", {class: "cleanupfieldset scraping-source","data-geist-fieldset": !0,- children: /* @__PURE__ */ W("div", {+ children: /* @__PURE__ */ G("div", {class: "geist-fieldset-content scraping-fields",children: [- /* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: i("scraping-cover", "高清封面") } }),- /* @__PURE__ */ W("form", {+ /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i("scraping-cover", "高清封面") } }),+ /* @__PURE__ */ G("form", {class: "scraping-cover-form",onSubmit: (e) => {e.preventDefault(), g();},- children: [/* @__PURE__ */ W("input", {+ children: [/* @__PURE__ */ G("input", {class: "geist-input","aria-label": "馆藏番号",required: !0,@@ -2212,21 +2230,21 @@ function on({ data: e, error: t, toast: n }) {disabled: s,placeholder: "输入馆藏番号,如 ABW-232",onInput: (e) => a(e.currentTarget.value)- }), /* @__PURE__ */ W("button", {+ }), /* @__PURE__ */ G("button", {ref: f,class: "geist-button primary",type: "submit",children: "抓取封面"})]}),- l && /* @__PURE__ */ W("div", {+ l && /* @__PURE__ */ G("div", {role: "alert",dangerouslySetInnerHTML: { __html: o(l, { variant: "error" }) }})]})}),- e?.sources.map((e) => /* @__PURE__ */ W(an, {+ e?.sources.map((e) => /* @__PURE__ */ G(ln, {source: e,toast: n}, e.source))@@ -2235,14 +2253,14 @@ function on({ data: e, error: t, toast: n }) {}//#endregion//#region src/islands/library-processing.tsx-var sn = (e, t) => F("/api/library-processing", t);-function cn({ data: e, error: t, toast: n, onComplete: r, mode: c, monitor: l }) {- let [d, f] = B(e || { status: "idle" }), [p, m] = B(t), [h, g] = B(!1), [_, v] = B(!1), y = U(new AbortController()), b = U(0), x = U(d.status), S = U(null), C = h || d.status === "running";- H(() => u(S.current, C), [C]);+var dn = (e, t) => I("/api/library-processing", t);+function fn({ data: e, error: t, toast: n, onComplete: r, mode: c, monitor: l }) {+ let [d, f] = V(e || { status: "idle" }), [p, m] = V(t), [h, g] = V(!1), [_, v] = V(!1), y = W(new AbortController()), b = W(0), x = W(d.status), S = W(null), C = h || d.status === "running";+ U(() => u(S.current, C), [C]);async function w() {let e = ++b.current;- await en({- read: (e) => F("/api/library-processing", e),+ await an({+ read: (e) => I("/api/library-processing", e),active: () => !y.current.signal.aborted && b.current === e,keepWatching: c === "notice" || !!l,render: (e) => {@@ -2251,49 +2269,49 @@ function cn({ data: e, error: t, toast: n, onComplete: r, mode: c, monitor: l })disconnected: () => m("连接中断,正在重新读取处理进度")});}- V(() => ((d.status === "running" || c === "notice" || l) && w(), () => y.current.abort()), []);+ H(() => ((d.status === "running" || c === "notice" || l) && w(), () => y.current.abort()), []);async function T() {if (!C) {g(!0), m(""), v(!1);try {- let e = await I("/api/library-processing", {}, "POST", y.current.signal);+ let e = await L("/api/library-processing", {}, "POST", y.current.signal);if (y.current.signal.aborted) return;x.current = e.status, f(e), g(!1), await w();} catch (e) {- y.current.signal.aborted || (m(P(e)), g(!1));+ y.current.signal.aborted || (m(F(e)), g(!1));}}}- return c === "notice" ? !p && d.status !== "running" && d.status !== "failed" ? null : /* @__PURE__ */ W("div", {+ return c === "notice" ? !p && d.status !== "running" && d.status !== "failed" ? null : /* @__PURE__ */ G("div", {class: "library-processing-banner",role: "status",- children: [/* @__PURE__ */ W("span", { children: p || (d.status === "failed" ? "扫描与资料采集未完成" : `${d.stage || "正在整理馆藏"}${d.total ? ` · ${d.checked || 0} / ${d.total}` : ""}`) }), /* @__PURE__ */ W("a", {+ children: [/* @__PURE__ */ G("span", { children: p || (d.status === "failed" ? "扫描与资料采集未完成" : `${d.stage || "正在整理馆藏"}${d.total ? ` · ${d.checked || 0} / ${d.total}` : ""}`) }), /* @__PURE__ */ G("a", {class: "geist-button",href: "/data-cleanup#libraryProcessing",children: p || d.status === "failed" ? "查看并处理" : "查看进度"})]- }) : /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W("div", {+ }) : /* @__PURE__ */ G(N, { children: [/* @__PURE__ */ G("div", {class: "geist-fieldset-content library-processing",children: [- /* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: i("cleanupScrapingTitle", "扫描与采集") } }),- /* @__PURE__ */ W("p", { children: "扫描媒体文件夹,导入已有资料,采集缺失信息。" }),- /* @__PURE__ */ W("div", {+ /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: i("cleanupScrapingTitle", "扫描与采集") } }),+ /* @__PURE__ */ G("p", { children: "扫描媒体文件夹,导入已有资料,采集缺失信息。" }),+ /* @__PURE__ */ G("div", {"aria-live": "polite",children: [- d.status === "running" && /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: a(`${d.stage || "正在处理"}${d.total ? ` · ${d.checked || 0} / ${d.total}` : ""}`) } }), !!d.total && /* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: s(`已处理 ${d.checked || 0} / ${d.total} 个视频`, d.checked || 0, d.total) } })] }),- (p || d.status === "failed") && /* @__PURE__ */ W("div", {+ d.status === "running" && /* @__PURE__ */ G(N, { children: [/* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: a(`${d.stage || "正在处理"}${d.total ? ` · ${d.checked || 0} / ${d.total}` : ""}`) } }), !!d.total && /* @__PURE__ */ G("div", { dangerouslySetInnerHTML: { __html: s(`已处理 ${d.checked || 0} / ${d.total} 个视频`, d.checked || 0, d.total) } })] }),+ (p || d.status === "failed") && /* @__PURE__ */ G("div", {role: "alert",dangerouslySetInnerHTML: { __html: o(p || d.error || "处理未完成,请重试", { variant: "error" }) }}),- d.status === "failed" && !!d.issues?.length && /* @__PURE__ */ W("ul", { children: d.issues.slice(0, 20).map((e) => /* @__PURE__ */ W("li", { children: [- e.asset_id ? /* @__PURE__ */ W("a", {+ d.status === "failed" && !!d.issues?.length && /* @__PURE__ */ G("ul", { children: d.issues.slice(0, 20).map((e) => /* @__PURE__ */ G("li", { children: [+ e.asset_id ? /* @__PURE__ */ G("a", {href: `/item/${e.asset_id}`,children: "查看视频"}) : null,e.asset_id ? ":" : "",e.message] })) }),- _ && /* @__PURE__ */ W("div", {+ _ && /* @__PURE__ */ G("div", {class: "library-processing-result",dangerouslySetInnerHTML: { __html: o(`已扫描 ${d.scanned || 0} 个文件,识别 ${d.identified || 0} 个番号,整理 ${d.candidates || 0} 组资料候选。`, {variant: "success",@@ -2303,21 +2321,21 @@ function cn({ data: e, error: t, toast: n, onComplete: r, mode: c, monitor: l })]})]- }), /* @__PURE__ */ W("footer", {+ }), /* @__PURE__ */ G("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,children: [- /* @__PURE__ */ W("a", {+ /* @__PURE__ */ G("a", {class: "geist-button",href: "/scraping",children: "采集来源"}),- !!d.candidates && /* @__PURE__ */ W("a", {+ !!d.candidates && /* @__PURE__ */ G("a", {class: "geist-button",href: "/review",children: "复核资料"}),- /* @__PURE__ */ W("button", {+ /* @__PURE__ */ G("button", {ref: S,type: "button",class: "geist-button primary",@@ -2329,12 +2347,12 @@ function cn({ data: e, error: t, toast: n, onComplete: r, mode: c, monitor: l })}//#endregion//#region src/state/index.ts-var ln = { "quality-goals": {- refresh: Xt,- reset: Yt-} }, un = () => Object.keys(ln);-async function dn(e) {- let t = ln[e];+var pn = { "quality-goals": {+ refresh: en,+ reset: $t+} }, mn = () => Object.keys(pn);+async function hn(e) {+ let t = pn[e];if (!t) throw Error(`未登记的共享 store:${String(e)}`);try {return await t.refresh(), !0;@@ -2344,7 +2362,7 @@ async function dn(e) {}//#endregion//#region src/review-bulk.ts-var fn = () => ({+var gn = () => ({active: !1,busy: !1,selected: /* @__PURE__ */ new Set(),@@ -2352,7 +2370,7 @@ var fn = () => ({assets: /* @__PURE__ */ new Map(),errors: /* @__PURE__ */ new Map()});-async function pn(e, t, n, r) {+async function _n(e, t, n, r) {let i = [], a = 0;for (let o of e) {if (!r()) break;@@ -2363,7 +2381,7 @@ async function pn(e, t, n, r) {} catch (e) {i.push({key: o.key,- message: P(e)+ message: F(e)});}}@@ -2372,7 +2390,7 @@ async function pn(e, t, n, r) {failures: i};}-function mn(e, n) {+function vn(e, n) {let r = e.querySelector(".reviewlist");if (!r || !n.rows.length || n.locked) return;let i = n.state, a = [...r.querySelectorAll("[data-review-key]")], o = document.createElement("div");@@ -2460,7 +2478,7 @@ function mn(e, n) {e instanceof KeyboardEvent && e.key === "Tab" || (e.preventDefault(), e.stopImmediatePropagation());};e.addEventListener("click", o, !0), e.addEventListener("keydown", o, !0);- let s = 0, c = await pn(t, async (e) => {+ let s = 0, c = await _n(t, async (e) => {try {return await n.submit(e);} finally {@@ -2487,10 +2505,10 @@ function mn(e, n) {}//#endregion//#region src/native-image.ts-function hn(e, t, n, r) {+function yn(e, t, n, r) {return e > 0 && t > 0 && e === n && t === r;}-function gn(e, t, n, r, i = 1) {+function bn(e, t, n, r, i = 1) {let a = Number.isFinite(i) && i > 0 ? i : 1;e /= a, t /= a;let o = [@@ -2507,7 +2525,7 @@ function gn(e, t, n, r, i = 1) {}//#endregion//#region src/entity-skeleton.ts-function _n(e, t) {+function xn(e, t) {return `<section data-skeleton="entity/${e}" role="status" aria-label="正在读取资料"><span class="sr-only">正在读取资料</span><div aria-hidden="true"><div class="entityhero"><div class="entityportrait ${e === "studio" || e === "agency" ? "square " : ""}skeleton"></div>@@ -2519,7 +2537,7 @@ function _n(e, t) {}//#endregion//#region src/catalog-onboarding.ts-var vn = [+var Sn = ["loc","creator","performer",@@ -2536,7 +2554,7 @@ var vn = ["jav","thumb"];-function yn() {+function Cn() {let e = (e) => [,,@@ -2547,9 +2565,9 @@ function yn() {tags: "<span class=\"catalog-placeholder placeholder-tags\" aria-hidden=\"true\">" + e("<span class=\"pill\"> </span>") + "</span>"};}-async function bn(e, t) {+async function wn(e, t) {let n = new URLSearchParams();- for (let t of vn) e[t] && n.set(t, e[t]);+ for (let t of Sn) 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 || [],@@ -2560,7 +2578,7 @@ async function bn(e, t) {return r.set("q", e), r.set("limit", "1"), (await t("/api/items?" + r)).total > 0 ? e : "";}))).filter(Boolean);}-function xn({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: i = !1, online: a = !1 } = {}) {+function Tn({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: i = !1, online: a = !1 } = {}) {let o = i ? "<a class=\"geist-button primary\" href=\"/configuration\">添加内容</a>" : "", s = "<a class=\"geist-button\" href=\"/follow-manage\">添加来源</a>";return t || n ? r("search", n ? "还没有符合条件的 JAV 作品" : "没有符合条件的内容", n ? "已扫描但尚未补充发行资料的视频可在全部内容中查看。" : "清除筛选或搜索条件后查看全部内容。", { actions: "<a class=\"geist-button primary\" href=\"/?loc=&thumb=0\">查看全部内容</a>" }) : e === "catalog" ? r("play", "还没有视频", "添加媒体文件夹或关注来源,开始建立你的馆藏。", { actions: o + s }) : r(e === "tags" ? "tags" : "user-round", "还没有" + ({tags: "标签",@@ -2573,7 +2591,7 @@ function xn({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable:}//#endregion//#region src/sidebar.ts-function Sn(e) {+function En(e) {return ["/","/unseen",@@ -2583,23 +2601,23 @@ function Sn(e) {"/junk-files"].includes(e) || /^\/(item|mix|parts|editions)\//.test(e) || /^\/playlists\/\d+\/\d+$/.test(e) || /^\/(performers|studios|creators|series|agencies)\/.+/.test(e);}-function Cn(e, t) {+function Dn(e, t) {return e.dataset.surface === t && e.querySelector(".dnav") ? !1 : (e.dataset.surface = t, e.replaceChildren(), !0);}-function wn(e) {+function On(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 Tn(e) {+function kn(e) {return e.filter((e) => ["115", "pikpak"].includes(e.location) && (e.roots === void 0 || e.roots.length > 0)).map((e) => e.location);}-function En(e, t) {+function An(e, t) {return t.filter((t) => e.some((e) => e.location === t));}-function Dn() {+function jn() {return `<div class="cleanuppage" data-skeleton="cleanup" aria-busy="true" aria-label="正在读取数据管理状态"><div class="cleanupgrid">${[[@@ -2645,7 +2663,7 @@ function Dn() {<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 On(e, t = !1, n = !1) {+function Mn(e, t = !1, n = !1) {if (t || n) return "";let r = "<svg aria-hidden=\"true\"><use href=\"#i-external-link\"></use></svg>";return `<details class="taste-history-guide"${e ? " open" : ""}>@@ -2659,69 +2677,69 @@ function On(e, t = !1, n = !1) {<button type="button" class="geist-button taste-guide-skip">跳过</button></div></details>`;}-var kn = "peach-taste-guide-dismissed";-function An(e, t) {+var Nn = "peach-taste-guide-dismissed";+function Pn(e, t) {let n = e.querySelector(".taste-history-guide");n?.querySelector(".taste-guide-skip")?.addEventListener("click", () => {- t.setItem(kn, "1"), n.remove();+ t.setItem(Nn, "1"), n.remove();});}//#endregion//#region src/jav-artwork.ts-function jn(e) {+function Fn(e) {return ["small","sleeve","preview"].includes(String(e)) ? "small" : "big";}-function Mn(e) {+function In(e) {return {- javLayout: jn(e.javLayout),- javImage: Nn(e.javLayout === "preview" ? "thumbnail" : e.javImage)+ javLayout: Fn(e.javLayout),+ javImage: Ln(e.javLayout === "preview" ? "thumbnail" : e.javImage)};}-function Nn(e) {+function Ln(e) {return e === "thumbnail" ? "thumbnail" : "cover";}-function Pn(e, t) {- return e.is_jav && e.code && e.has_cover && (Nn(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";+function Rn(e, t) {+ return e.is_jav && e.code && e.has_cover && (Ln(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";}-function Fn(e, t) {+function zn(e, t) {e.querySelectorAll("img[data-jav-image]").forEach((e) => {- let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (Nn(t) === "cover" || !r)), a = i ? n : r;+ let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (Ln(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 In = {+var Bn = {"library-processing": {- load: sn,- component: cn+ load: dn,+ component: fn},scraping: {- load: nn,- component: on+ load: sn,+ component: un},"quality-goals": {- load: Zt,- component: $t+ load: tn,+ component: rn},configuration: {- load: st,- component: pt+ load: ut,+ component: gt}-}, Ln = () => Object.keys(In), Rn = /* @__PURE__ */ new Map();-async function zn(e, t, n, r = {}) {- let i = In[e];+}, Vn = () => Object.keys(Bn), Hn = /* @__PURE__ */ new Map();+async function Un(e, t, n, r = {}) {+ let i = Bn[e];if (!i) throw Error(`未注册的 island:${String(e)}`);- Bn(t);+ Wn(t);let a = {controller: new AbortController(),painted: !1};- Rn.set(t, a);+ Hn.set(t, a);let o;try {o = {@@ -2732,12 +2750,12 @@ async function zn(e, t, n, r = {}) {if (a.controller.signal.aborted) return;o = {data: null,- error: P(e)+ error: F(e)};}- if (Rn.get(t) !== a) return;+ if (Hn.get(t) !== a) return;if (r.isCurrent && !r.isCurrent()) {- Rn.delete(t);+ Hn.delete(t);return;}t.textContent = "", a.painted = !0;@@ -2745,11 +2763,11 @@ async function zn(e, t, n, r = {}) {...n,...o};- Ee(ie(i.component, s), t);+ De(ae(i.component, s), t);}-function Bn(e) {- let t = Rn.get(e);- t && (t.controller.abort(), Rn.delete(e), t.painted && Ee(null, e));+function Wn(e) {+ let t = Hn.get(e);+ t && (t.controller.abort(), Hn.delete(e), t.painted && De(null, e));}//#endregion-export { kn as TASTE_GUIDE_KEY, xn as catalogEmptyHtml, bn as catalogSuggestions, Dn as cleanupSkeletonHtml, Tn as cloudLocations, En as cloudPreferenceLocations, fn as createReviewSelection, yn as emptyCatalogLayout, _n as entitySkeletonHtml, tn as followJobProgress, Ln as islandNames, Pn as javImageKind, hn as matchesFaceSource, zn as mountIsland, gn as nativeImageFit, Nn as normalizeJavImage, jn as normalizeJavLayout, Mn as normalizeJavPreferences, De as preferredDirection, dn as refreshStore, Sn as sidebarHasCatalogContent, wn as sidebarTagCounts, un as storeNames, Fn as syncJavImages, Cn as syncSidebarSurface, On as tasteHistoryGuideHtml, Bn as unmountIsland, en as watchJob, mn as wireReviewSelection, An as wireTasteHistoryGuide };+export { Nn as TASTE_GUIDE_KEY, Tn as catalogEmptyHtml, wn as catalogSuggestions, jn as cleanupSkeletonHtml, kn as cloudLocations, An as cloudPreferenceLocations, gn as createReviewSelection, Cn as emptyCatalogLayout, xn as entitySkeletonHtml, on as followJobProgress, Vn as islandNames, Rn as javImageKind, yn as matchesFaceSource, Un as mountIsland, bn as nativeImageFit, Ln as normalizeJavImage, Fn as normalizeJavLayout, In as normalizeJavPreferences, Oe as preferredDirection, hn as refreshStore, En as sidebarHasCatalogContent, On as sidebarTagCounts, mn as storeNames, zn as syncJavImages, Dn as syncSidebarSurface, Mn as tasteHistoryGuideHtml, Wn as unmountIsland, an as watchJob, vn as wireReviewSelection, Pn as wireTasteHistoryGuide };diff --git a/web/js/ui-components.js b/web/js/ui-components.jsindex 79f6f3a37..6d8611789 100644--- a/web/js/ui-components.js+++ b/web/js/ui-components.js@@ -571,7 +571,11 @@ export function wireSelectField(root){const current=()=>menu.querySelector('[aria-selected="true"]');/* 面板至少和触发器一样宽。菜单是 fixed 的,宽度不会自己跟着触发器走,而一个比触发器还窄的面板看着不像同一个控件。这条要接在 wireAnchoredMenu 之前:它按当前宽度定位。 */- trigger.addEventListener('click',()=>{menu.style.minWidth=`${trigger.getBoundingClientRect().width}px`});+ trigger.addEventListener('click',()=>{+ const width=`${trigger.getBoundingClientRect().width}px`;+ menu.style.minWidth=width;+ if(root.hasAttribute('data-fixed-width'))menu.style.width=width;+ });const anchored=wireAnchoredMenu(root,trigger,menu);trigger.addEventListener('click',()=>{if(!menu.hidden)current()?.focus()});const choose=value=>{@@ -613,7 +617,7 @@ export function wireSelectField(root){用原生 <dialog> 承载:焦点陷阱、Escape、背景 inert 和关掉后把焦点还给触发钮都由它给,自己搭一遍只会少掉其中一两样。onConfirm 失败时弹层不关,原因留在原位等重试。 */let modalSeq=0;-export function confirmModal({title,body,confirmLabel,cancelLabel='取消',onConfirm=null}={}){+export function confirmModal({title,body,confirmLabel,cancelLabel='取消',onConfirm=null,danger=false}={}){const trigger=document.activeElement;const dialog=document.createElement('dialog');dialog.className='geist-modal';@@ -629,6 +633,7 @@ export function confirmModal({title,body,confirmLabel,cancelLabel='取消',onCondialog.querySelector('.geist-modal-body p').textContent=body;const cancel=dialog.querySelector('[data-modal-cancel]');const accept=dialog.querySelector('[data-modal-confirm]');+ if(danger){accept.classList.remove('primary');accept.classList.add('danger')}const failure=dialog.querySelector('[data-modal-error]');cancel.textContent=cancelLabel;accept.textContent=confirmLabel;