Peach: Local-first video metadata scraper and media manager.
Merge branch 'master' into agent/claude/vercel-button-fills
longmeidaoc81ae5cb78d8
diff --cc frontend/src/islands/clouddrive-guide.tsxindex 000000000,6874e1358..962c996bfmode 000000,100644..100644--- a/frontend/src/islands/clouddrive-guide.tsx+++ b/frontend/src/islands/clouddrive-guide.tsx@@@ -1,0 -1,33 +1,33 @@@+ import { useLayoutEffect, useRef } from 'preact/hooks';+ import { wireCollapse } from '@peach/legacy/ui';++ export const CLOUDDRIVE_PROFILES = [+ {name: '机械硬盘或内存不超过 8 GB', cache: '10–20 GiB', read: '256 / 128 KB', task: '同时处理 1 个视频', advice: '缓存优先放内置 SSD。只有机械硬盘时,先用按需读取;反复观看同一批文件才开启文件夹缓存。'},+ {name: 'SATA SSD,8–16 GB 内存', cache: '20–50 GiB', read: '256 / 128 KB', task: '同时处理 1–2 个视频', advice: '扫描、抽帧用小读块。观看高码率视频若仍缓冲,再试 512 / 256 KB。'},+ {name: 'NVMe SSD,16 GB 以上内存', cache: '50–100 GiB', read: '256 / 128 KB', task: '同时处理 2 个视频起步', advice: '以扫描和拖动播放为主时保留小读块。连续看高码率视频可试 512 / 256 KB,速度不升就调回。'},+ ] as const;++ export function CloudDriveGuide() {+ const root = useRef<HTMLDivElement>(null);+ useLayoutEffect(() => { if (root.current) wireCollapse(root.current, 'details', 'clouddrive-guide'); }, []);+ return <div ref={root} class="cloudguide">- <p class="confighelp">先在 CloudDrive 登录网盘并挂载,开启「启动时自动挂载」。<a href="https://www.clouddrive2.com/help.html" target="_blank" rel="noreferrer">挂载帮助<svg aria-hidden="true" viewBox="0 0 24 24"><use href="#i-external-link" /></svg></a></p>++ <p class="confighelp">先在 CloudDrive 登录网盘并挂载,开启「启动时自动挂载」。<a class="externallink" href="https://www.clouddrive2.com/help.html" target="_blank" rel="noreferrer">挂载帮助<svg class="externalmark" viewBox="0 0 24 24" aria-hidden="true"><use href="#i-external-link" /></svg></a></p>+ <details>+ <summary>CloudDrive 速度与缓存建议</summary>+ <p class="confighelp">按缓存所在的硬盘选起步配置。优先保证播放流畅,再用同一视频比较冷启动、拖动和流量;参数越大不一定越快。</p>+ <div class="cloudguide-profiles">{CLOUDDRIVE_PROFILES.map(profile => <section aria-label={profile.name} key={profile.name}>+ <h4>{profile.name}</h4>+ <dl><dt>磁盘缓存上限</dt><dd>{profile.cache}</dd><dt>默认 / 最小读取长度</dt><dd>{profile.read}</dd><dt>Peach 并行任务</dt><dd>{profile.task}</dd></dl>+ <p class="confighelp">{profile.advice}</p>+ </section>)}</div>+ <ul class="cloudguide-notes">+ <li>在 CloudDrive「设置」中设置磁盘缓存上限和 LRU(优先清理最久没用的缓存)。系统盘至少留 40 GiB;上限不要填 0。设置后重新打开确认,并观察实际占盘。</li>+ <li>在各网盘的下载设置中调整读取长度和下载线程。115 从 2 线程开始,遵守当前客户端上限;PikPak / WebDAV 从 2 线程开始,带宽充足且速度确实提升时再试 4。开启支持的直链选项,确认播放可用。</li>+ <li>PikPak 按当前 CloudDrive 提供的接入方式配置;使用 WebDAV 时,先确认服务端允许直链。不能直接套用 115 的连接方式。</li>+ <li>看视频时暂停批量抽帧,关闭不用的播放页。下载速度应高于视频码率除以 8,并留出余量:80 Mbps 视频约需 10 MB/s,建议稳定达到 15 MB/s。</li>+ <li>Buffer Cache 的内存占用、磁盘缓存和文件夹缓存是不同设置。磁盘显示的逻辑大小也不等于实际占盘;只改一个上限不能限制所有缓存。</li>+ </ul>- <p class="confighelp">上表容量和并发是起步建议,按实际占盘与播放结果调整。直链和代理是不同设置;连接慢时分别比较,不能只看开关是否开启。<a href="https://www.clouddrive2.com/features.html" target="_blank" rel="noreferrer">缓存说明<svg aria-hidden="true" viewBox="0 0 24 24"><use href="#i-external-link" /></svg></a></p>++ <p class="confighelp">上表容量和并发是起步建议,按实际占盘与播放结果调整。直链和代理是不同设置;连接慢时分别比较,不能只看开关是否开启。<a class="externallink" href="https://www.clouddrive2.com/features.html" target="_blank" rel="noreferrer">缓存说明<svg class="externalmark" viewBox="0 0 24 24" aria-hidden="true"><use href="#i-external-link" /></svg></a></p>+ </details>+ </div>;+ }diff --cc frontend/src/islands/configuration.tsxindex ad485ded1,8f3df8992..696b44a39--- a/frontend/src/islands/configuration.tsx+++ b/frontend/src/islands/configuration.tsx@@@ -303,8 -304,8 +304,8 @@@ function ConfigurationForm({ data, rece))}</div><button type="button" class="geist-button configadd" onClick={add}>添加文件夹</button>- {kinds.some((kind) => kind === '115' || kind === 'pikpak') ? <p class="confighelp">先在 CloudDrive 登录网盘并完成挂载。<a class="externallink" href="https://www.clouddrive2.com/help.html" target="_blank" rel="noreferrer">挂载帮助<svg class="externalmark" viewBox="0 0 24 24" aria-hidden="true"><use href="#i-external-link" /></svg></a></p> : null}+ {kinds.some((kind) => kind === '115' || kind === 'pikpak') ? <CloudDriveGuide /> : null}- {kinds.some((kind) => kind === '115' || kind === 'pikpak') ? data.mount_dependencies?.filter((dependency) => !dependency.available).map((dependency) => <p class="confighelp">未检测到 {dependency.name}。<a href={dependency.download_url} target="_blank" rel="noreferrer">下载 {dependency.name}<svg aria-hidden="true" viewBox="0 0 24 24"><use href="#i-external-link" /></svg></a></p>) : null}+ {kinds.some((kind) => kind === '115' || kind === 'pikpak') ? data.mount_dependencies?.filter((dependency) => !dependency.available).map((dependency) => <p class="confighelp">未检测到 {dependency.name}。<a class="externallink" href={dependency.download_url} target="_blank" rel="noreferrer">下载 {dependency.name}<svg class="externalmark" viewBox="0 0 24 24" aria-hidden="true"><use href="#i-external-link" /></svg></a></p>) : null}{data.windows === false ? <p class="confighelp">本机文件夹是这台电脑读取媒体的位置。Windows 中的对应路径用于匹配馆藏中已有的路径,例如 B:\ 对应本机挂载文件夹。</p> : null}</div>{data.port_editable !== false ? <div class="configfield">diff --cc web/app.jsindex c57e656a7,5d53809bb..f9a135e16--- a/web/app.js+++ b/web/app.js@@@ -257,13 -255,7 +258,11 @@@ const MANAGEMENT_PLACEHOLDERS=// 骨架照 .fsec 的轮廓画三块,六张 16:9 占位说的是另一个页面的结构。'/follow-manage':()=>`<div class="follow">${pageSkeletonHtml('正在读取关注管理',{cards:true,count:3,fill:false,className:'followmanage-skeleton'})}</div>`,- // 配置页是两块同宽的卡(表单、运行信息),骨架照数据管理那套单列卡片的轮廓画两块。- '/configuration':()=>`<div class="configpage">${pageSkeletonHtml('正在读取配置',- {cards:true,count:2,fill:false,className:'cleanup-skeleton'})}</div>`,+ '/configuration':()=>configurationSkeletonHtml(),+ /* 采集来源是 812px 窄列里一叠同宽的 Fieldset:一块高清封面加六个来源。骨架画四块,+ 那是首屏装得下的张数;说明那一句是静态文案,与数据无关,立刻显示。 */+ '/scraping':()=>`<div class="scraping-page"><p>高清图片可能需要代理才能下载,请先检查连接。</p>+ ${pageSkeletonHtml('正在读取采集来源',{cards:true,count:4,fill:false,className:'cleanup-skeleton'})}</div>`,};const managementPlaceholder=path=>(MANAGEMENT_PLACEHOLDERS[path]||(()=>pageSkeletonHtml('正在读取页面')))();@@@ -3553,14 -3549,17 +3570,14 @@@ async function openDataCleanup(push=tru<strong>${online.length.toLocaleString()} 个来源可扫描</strong><p class="cleanupmeta">${sourceLine}</p><p class="cleanupstate" aria-live="polite"></p></div><footer class="geist-fieldset-footer" data-geist-fieldset-footer><button type="button" class="danger" data-cleanup-empty>${icon('trash')}<span>删除空文件夹</span></button></footer>- </section>- ${DATA_MANAGEMENT_ENTRIES.map(([section,title,label])=>`- <section class="cleanupfieldset" data-geist-fieldset aria-labelledby="cleanup-${section}-title">- <div class="geist-fieldset-content">${fieldsetTitle(`cleanup-${section}-title`,title)}- <strong data-cleanup-count="${section}">—</strong>- <p class="cleanupmeta" data-cleanup-meta="${section}"></p></div>- <footer class="geist-fieldset-footer" data-geist-fieldset-footer><button type="button" data-cleanup-go="${section}">${esc(label)}</button></footer>- </section>`).join('')}+ </section>`,+ review:entryCard('review'),quality:entryCard('quality'),trash:entryCard('trash'),+ };+ $('#stats').innerHTML=`<div class="cleanuppage"><div class="cleanupgrid">+ ${DATA_MANAGEMENT_ORDER.map(section=>cleanupCards[section]).join('')}</div>${linkManagerMarkup()}- ${cloudLocations(sources.sources||[]).length?resourceSyncMarkup():''}</div>`;+ ${(sources.sources||[]).some(source=>['local','115','pikpak'].includes(source.location)&&source.roots?.length)?resourceSyncMarkup():''}</div>`;$('#stats').querySelector('[data-cleanup-open="junk"]').onclick=()=>openManage('ads');const processingUi=await import('/dist/peach-ui.js');if(!surfaceCurrent(surface))return;diff --cc web/css/09-skeleton.cssindex f0f56bd7b,48aae705c..388aa3896--- a/web/css/09-skeleton.css+++ b/web/css/09-skeleton.css@@@ -148,10 -124,9 +148,11 @@@ body.refreshing #tiers .brandpill::aftebackground-size:50% 100%;animation:skeleton-sweep 1.5s ease-in-out infinite reverse}/* 框体不是待填的内容,本来就不参与呼吸,也不参与微光。 */+.cleanup-skeleton .skeletoncard em::after,+.review-skeleton .skeletoncard em::after,.followmanage-skeleton .skeletoncard i::after{content:none}+/* 计数骨架的宽高定死:跟着真实文本走的话,数字回来那一刻整行会横向弹一下。14px 远低于筛选条按钮的 32px,而 `.count` 有 min-height 兜底,所以换成真数字不改变行高。`视频 · N` 用的是同一枚。 */diff --cc web/css/12-cards.cssindex 687eb4ca7,20492d3ed..cce7d23d2--- a/web/css/12-cards.css+++ b/web/css/12-cards.css@@@ -40,9 -40,9 +40,9 @@@ main{position:relative;z-index:1;paddin.count.count-actions-only{position:relative;top:auto;min-height:0;margin:0 0 16px;padding:0;justify-content:flex-end}.count.count-actions-only:empty{display:none}.resourcesync{scroll-margin-top:calc(var(--topH) + 18px);display:grid;gap:16px}.resourcesync>h2{margin:0;font-size:var(--fs-xl)}- .resourcesyncbox,.resourcepanel{overflow:clip;border:1px solid var(--field-ring);border-radius:var(--floating-radius);background:var(--ground)}.resourcesyncbody{padding:20px}.resourcesyncbody p{max-width:760px;margin:0;color:var(--muted);font-size:var(--fs-sm);line-height:1.55}.resourcesyncfooter,.resourceapplyrow{box-sizing:border-box;min-height:var(--fieldset-bar-h);display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 12px 12px 20px;border-top:1px solid var(--line-soft);background:var(--overlay-5)}.resourcesyncfooter p,.resourceapplyrow>p{margin:0;color:var(--muted);font-size:var(--fs-xs);line-height:1.5}.resourceaction{box-sizing:border-box;height:36px;padding:0 12px;border:0;border-radius:var(--control-radius);background:var(--ground);color:var(--ink-2);display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:none;font:inherit;font-size:var(--fs-sm);font-weight:500;cursor:pointer;transition:background-color .12s,color .12s}.resourceaction:hover:not(:disabled){background:var(--surface);color:var(--ink)}.resourceaction:focus-visible{outline:2px solid var(--tungsten);outline-offset:2px}.resourceaction:disabled{background:var(--sunk);color:var(--muted);cursor:default}.resourceaction svg{width:16px;height:16px;stroke:currentColor;fill:none}#resourceSyncResult:empty{display:none}.resourcescanning{margin:0;padding:14px 16px;border:1px solid var(--line-soft);border-radius:var(--control-radius);color:var(--muted)}.resourcesources{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.resourcesources article{display:grid;gap:4px;min-width:0;padding:16px}.resourcesources article+article{border-left:1px solid var(--line-soft)}.resourcesourcetitle{display:flex;align-items:center;justify-content:space-between;gap:12px}.resourcesourcetitle span{font-size:var(--fs-xs)}.resourcesources .online{color:var(--success)}.resourcesources .offline{color:var(--drop)}.resourcesources strong{margin-top:10px;font-size:var(--fs-2xl);font-variant-numeric:tabular-nums}.resourcesources small,.resourcecache small{color:var(--muted)}/* 这里是一排读数,不是又一个盒子。原先它自带填色和分格线,和下面的操作条同色,-.resourcesyncbox,.resourcepanel{overflow:clip;border:1px solid var(--field-ring);border-radius:var(--floating-radius);background:var(--ground)}.resourcesyncbody{padding:20px}.resourcesyncbody p{max-width:760px;margin:0;color:var(--muted);font-size:var(--fs-sm);line-height:1.55}.resourcesyncfooter,.resourceapplyrow{box-sizing:border-box;min-height:var(--fieldset-bar-h);display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 12px 12px 20px;border-top:1px solid var(--line-soft);background:var(--overlay-5)}.resourcesyncfooter p,.resourceapplyrow>p{margin:0;color:var(--muted);font-size:var(--fs-xs);line-height:1.5}.resourceaction{box-sizing:border-box;height:36px;padding:0 12px;border:1px solid var(--line-soft);border-radius:var(--control-radius);background:var(--ground);color:var(--ink-2);display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:none;font:inherit;font-size:var(--fs-sm);font-weight:500;cursor:pointer;transition:background-color .12s,border-color .12s,color .12s}.resourceaction:hover:not(:disabled){background:var(--surface);color:var(--ink)}.resourceaction:focus-visible{outline:2px solid var(--tungsten);outline-offset:2px}.resourceaction:disabled{background:var(--sunk);border-color:var(--line-soft);color:var(--muted);cursor:default}.resourceaction svg{width:16px;height:16px;stroke:currentColor;fill:none}#resourceSyncResult:empty{display:none}.resourcescanning{margin:0;padding:14px 16px;border:1px solid var(--line-soft);border-radius:var(--control-radius);color:var(--muted)}.resourcesources{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}.resourcesources article{display:grid;gap:4px;min-width:0;padding:16px}.resourcesources article+article{border-left:1px solid var(--line-soft)}.resourcesourcetitle{display:flex;align-items:center;justify-content:space-between;gap:12px}.resourcesourcetitle span{font-size:var(--fs-xs)}.resourcesources .online{color:var(--success)}.resourcesources .offline{color:var(--drop)}.resourcesources strong{margin-top:10px;font-size:var(--fs-2xl);font-variant-numeric:tabular-nums}.resourcesources small,.resourcecache small{color:var(--muted)}/* 这里是一排读数,不是又一个盒子。原先它自带填色和分格线,和下面的操作条同色,++.resourcesyncbox,.resourcepanel{overflow:clip;border:1px solid var(--field-ring);border-radius:var(--floating-radius);background:var(--ground)}.resourcesyncbody{padding:20px}.resourcesyncbody p{max-width:760px;margin:0;color:var(--muted);font-size:var(--fs-sm);line-height:1.55}.resourcesyncfooter,.resourceapplyrow{box-sizing:border-box;min-height:var(--fieldset-bar-h);display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:12px 12px 12px 20px;border-top:1px solid var(--line-soft);background:var(--overlay-5)}.resourcesyncfooter p,.resourceapplyrow>p{margin:0;color:var(--muted);font-size:var(--fs-xs);line-height:1.5}.resourceaction{box-sizing:border-box;height:36px;padding:0 12px;border:0;border-radius:var(--control-radius);background:var(--ground);color:var(--ink-2);display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:none;font:inherit;font-size:var(--fs-sm);font-weight:500;cursor:pointer;transition:background-color .12s,color .12s}.resourceaction:hover:not(:disabled){background:var(--surface);color:var(--ink)}.resourceaction:focus-visible{outline:2px solid var(--tungsten);outline-offset:2px}.resourceaction:disabled{background:var(--sunk);color:var(--muted);cursor:default}.resourceaction svg{width:16px;height:16px;stroke:currentColor;fill:none}#resourceSyncResult:empty{display:none}.resourcescanning{margin:0;padding:14px 16px;border:1px solid var(--line-soft);border-radius:var(--control-radius);color:var(--muted)}.resourcesources{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}.resourcesources article{display:grid;gap:4px;min-width:0;padding:16px}.resourcesources article+article{border-left:1px solid var(--line-soft)}.resourcesourcetitle{display:flex;align-items:center;justify-content:space-between;gap:12px}.resourcesourcetitle span{font-size:var(--fs-xs)}.resourcesources .online{color:var(--success)}.resourcesources .offline{color:var(--drop)}.resourcesources strong{margin-top:10px;font-size:var(--fs-2xl);font-variant-numeric:tabular-nums}.resourcesources small,.resourcecache small{color:var(--muted)}/* 这里是一排读数,不是又一个盒子。原先它自带填色和分格线,和下面的操作条同色,两条带子连在一起看不出边界;框里再套框也是多余的一层。 */-.resourcecache{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 32px;border-top:1px solid var(--line-soft);padding:16px 20px}.resourcecache>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:4px 16px}.resourcecache b{font-size:var(--fs-2xl);font-variant-numeric:tabular-nums}.resourcecache span{font-weight:600}.resourcecache small{grid-column:1/-1}.resourceapplyrow .resourcesyncok{color:var(--success)}.resourcedanger{color:var(--drop)}.resourcedanger:hover:not(:disabled){background:var(--drop);border-color:var(--drop);color:#fff}.resourcesyncok{margin:0;color:var(--success)}+.resourcecache{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 32px;border-top:1px solid var(--line-soft);padding:16px 20px}.resourcecache>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:4px 16px}.resourcecache b{font-size:var(--fs-2xl);font-variant-numeric:tabular-nums}.resourcecache span{font-weight:600}.resourcecache small{grid-column:1/-1}.resourceapplyrow .resourcesyncok{color:var(--success)}.resourcesyncok{margin:0;color:var(--success)}.tagbar,.count,.entitytagbar,.entitycollectionhead{transition:background-color .16s ease,border-color .16s ease}/* 吸顶那条是底色的半透明版,配方跟着 --ground 走:写死深色底会在浅色主题下变成一条黑带压在白底内容上。 */diff --cc web/css/22-followmanage.cssindex 9e2e49212,37abba144..e7a1c9c10--- a/web/css/22-followmanage.css+++ b/web/css/22-followmanage.css@@@ -408,7 -406,17 +413,17 @@@ details.fcred{display:block;min-width:0/* 地址用中间截断而不是尾部省略:这张表要回答「哪一条坏了」,而`/official/talent/X` 与 `/talent/X` 的差别就在尾部,切掉尾部等于切掉答案。 */.linktable .linkurl{max-width:360px;overflow:hidden}-/* 只需要 block:overflow 与 nowrap 由全局的 `*[data-middle-truncate]` 管,- 但那条规则量不出行内元素的可用宽度。 */-.linktable .linkurl a{display:block;color:var(--muted);text-decoration:none}+/* 中缩要量可用宽度,量不出行内元素的:地址自己占一个 minmax(0,1fr) 的格子,+ 外链标固定宽度排在它后面。 */+.linktable .linkurl a{display:grid;grid-template-columns:minmax(0,1fr) auto;color:var(--muted)}.linktable .linkurl a:hover{color:var(--ink)}+ .photolight.has-strip .photodetail.context-card,.photodetail.context-card{position:fixed;inset:auto;width:320px;max-width:calc(100vw - 16px);background:var(--ground);color:var(--ink);backdrop-filter:none}.photodetail.context-card .photodetailmeta,.photodetail.context-card .srcstate{color:var(--muted)}.photodetail.context-card>button{color:var(--ink);border-color:var(--line)}++ .geist-gauge{display:inline-flex;width:32px;height:32px;flex:none;vertical-align:middle;margin-inline-end:8px}.geist-gauge svg{width:100%;height:100%;fill:none;stroke-width:3}.geist-gauge circle:first-child{stroke:var(--line-soft)}.geist-gauge circle:last-child{stroke:var(--feedback-success);transform:rotate(-90deg);transform-origin:center}.geist-progress{position:relative}.geist-progress i{background:var(--progress-color,var(--feedback-success))}.geist-progress-stop{position:absolute;top:0;bottom:0;width:2px;background:var(--ground);transform:translateX(-50%)}+ .geist-note:has(>[data-note-action]){grid-template-columns:16px minmax(0,1fr) auto;align-items:center}+ .geist-note>[data-note-action]{margin:0;white-space:nowrap}+ .geist-gauge[data-level="warning"] circle:last-child{stroke:var(--meter)}+ .geist-gauge[data-level="error"] circle:last-child{stroke:var(--drop)}+ .gauge-status{margin-inline-end:8px;font-size:var(--fs-xs)}+ @media(prefers-reduced-motion:no-preference){.geist-progress i{transition:width .2s ease-out,background-color .2s ease-out}.geist-gauge circle:last-child{transition:stroke-dasharray .2s ease-out,stroke .2s ease-out}}+ @media(max-width:600px){.geist-note:has(>[data-note-action]){grid-template-columns:16px minmax(0,1fr)}.geist-note>[data-note-action]{grid-column:2;justify-self:start}}diff --cc web/css/23-configuration.cssindex 1b4345951,425799c24..08ca6b66b--- a/web/css/23-configuration.css+++ b/web/css/23-configuration.css@@@ -40,8 -40,10 +40,9 @@@.configpage .geist-input[aria-invalid="true"]{border-color:var(--drop)}.configpage .geist-input[aria-invalid="true"]:focus{box-shadow:0 0 0 4px color-mix(in srgb,var(--drop) 24%,transparent)}.confighelp{margin:8px 0 0;color:var(--muted);font-size:var(--fs-sm);line-height:1.5}+ .cloudguide{min-width:0}.cloudguide details{margin-top:16px}.cloudguide summary{cursor:pointer;font-size:var(--fs-sm);min-height:var(--control-h);display:flex;align-items:center;gap:8px}.cloudguide summary:focus-visible{outline:2px solid var(--tungsten);outline-offset:2px}.cloudguide-profiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:16px}.cloudguide-profiles section{min-width:0}.cloudguide h4{font-size:var(--fs-sm);font-weight:600;margin:0 0 12px}.cloudguide dl{margin:0;font-size:var(--fs-sm);line-height:1.5}.cloudguide dt{color:var(--muted);margin-top:8px}.cloudguide dd{margin:0;font-variant-numeric:tabular-nums}.cloudguide-notes{padding-left:20px;font-size:var(--fs-sm);line-height:1.6;color:var(--muted)}.cloudguide-notes li+li{margin-top:8px}@media(max-width:640px){.cloudguide-profiles{grid-template-columns:1fr}.cloudguide-profiles section+section{border-top:1px solid var(--line-soft);padding-top:16px}.cloudguide summary{min-height:44px}}.confighelp a{color:var(--tungsten);text-decoration:none;margin-inline-start:6px}.confighelp a:hover{text-decoration:underline;text-underline-offset:3px}-.confighelp a svg{display:inline-block;width:14px;height:14px;margin-inline-start:4px;vertical-align:-2px;stroke:currentColor;fill:none;stroke-width:2}.configbad{margin:8px 0 0;color:var(--drop);font-size:var(--fs-sm)}/* 一行一个文件夹:输入框、选择文件夹、移除,三者共用 --control-h,差 3px 就不是一行了。flex 而不是 grid:只剩一行时移除键不画,grid 的空轨道会留下一段 gap。 */diff --cc web/dist/peach-ui.jsindex 28aa20ec7,ac377d9c8..b592b409e--- a/web/dist/peach-ui.js+++ b/web/dist/peach-ui.js@@@ -1,21 -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, wireCollapse as d, wireSelectField as f } from "/js/ui-components.js";- import { LOC as p, esc as m, faviconUrl as h, fmtDur as g, fmtSize as _, icon as v } from "/js/core.js";-import { LOC as e, esc as t, fmtDur as n, fmtSize as r, icon as i, requestErrorMessage as a } from "/js/core.js";-import { MEDIA_SOURCE_ICONS as o, checkboxHtml as s, confirmModal as c, emptyStateHtml as l, fieldsetTitle as u, loadingDotsHtml as d, noteHtml as f, progressHtml as p, projectBannerHtml as m, selectFieldHtml as h, selectOptionIconHtml as g, setActionBusy as _, wireCollapse as v, wireSelectField as y } from "/js/ui-components.js";++import { LOC as e, esc as t, faviconUrl as n, fmtDur as r, fmtSize as i, icon as a, requestErrorMessage as o } from "/js/core.js";++import { MEDIA_SOURCE_ICONS as s, checkboxHtml as c, confirmModal as l, emptyStateHtml as u, fieldsetTitle as d, loadingDotsHtml as f, noteHtml as p, progressHtml as m, projectBannerHtml as h, selectFieldHtml as g, selectOptionIconHtml as _, setActionBusy as v, wireCollapse as y, wireSelectField as b } from "/js/ui-components.js";//#region node_modules/preact/dist/preact.module.js- var y, b, x, S, C, w, T, E, D, O, k, A, ee, j, M, N = {}, P = [], te = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ne = Array.isArray;-var b, x, S, C, w, T, E, D, O, k, A, ee, j, M, N, P = {}, te = [], ne = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, re = Array.isArray;++var x, S, C, w, T, E, D, O, k, A, j, ee, M, te, N, P = {}, ne = [], re = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ie = Array.isArray;function F(e, t) {for (var n in t) e[n] = t[n];return e;}- function re(e) {-function ie(e) {++function ae(e) {e && e.parentNode && e.parentNode.removeChild(e);}- function ie(e, t, n) {-function ae(e, t, n) {++function oe(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 ? y.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 ? b.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);++ if (arguments.length > 2 && (o.children = arguments.length > 3 ? x.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (a in e.defaultProps) o[a] === void 0 && (o[a] = e.defaultProps[a]);++ return se(e, o, r, i, null);}- function ae(e, t, n, r, i) {-function oe(e, t, n, r, i) {++function se(e, t, n, r, i) {var a = {type: e,props: t,@@@ -27,16 -27,16 +27,16 @@@__e: null,__c: null,constructor: void 0,- __v: i ?? ++x,- __v: i ?? ++S,++ __v: i ?? ++C,__i: -1,__u: 0};- return i == null && b.vnode != null && b.vnode(a), a;- return i == null && x.vnode != null && x.vnode(a), a;++ return i == null && S.vnode != null && S.vnode(a), a;}function I(e) {return e.children;}- function oe(e, t) {-function se(e, t) {++function ce(e, t) {this.props = e, this.context = t;}function L(e, t) {@@@ -44,42 -44,42 +44,42 @@@for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;return typeof e.type == "function" ? L(e) : null;}- function se(e) {-function ce(e) {++function le(e) {if (e.__P && e.__d) {var t = e.__v, n = t.__e, r = [], i = [], a = F({}, t);- a.__v = t.__v + 1, b.vnode && b.vnode(a), ve(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? L(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, be(r, a, i), t.__e = t.__ = null, a.__e != n && ce(a);- a.__v = t.__v + 1, x.vnode && x.vnode(a), ye(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? L(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, xe(r, a, i), t.__e = t.__ = null, a.__e != n && le(a);++ a.__v = t.__v + 1, S.vnode && S.vnode(a), be(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? L(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, Se(r, a, i), t.__e = t.__ = null, a.__e != n && ue(a);}}- function ce(e) {-function le(e) {++function ue(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);++ }), ue(e);}- function le(e) {- (!e.__d && (e.__d = !0) && C.push(e) && !ue.__r++ || w != b.debounceRendering) && ((w = b.debounceRendering) || T)(ue);-function ue(e) {- (!e.__d && (e.__d = !0) && w.push(e) && !de.__r++ || T != x.debounceRendering) && ((T = x.debounceRendering) || E)(de);++function de(e) {++ (!e.__d && (e.__d = !0) && T.push(e) && !fe.__r++ || E != S.debounceRendering) && ((E = S.debounceRendering) || D)(fe);}- function ue() {-function de() {++function fe() {try {- for (var e, t = 1; C.length;) C.length > t && C.sort(E), e = C.shift(), t = C.length, se(e);- for (var e, t = 1; w.length;) w.length > t && w.sort(D), e = w.shift(), t = w.length, ce(e);++ for (var e, t = 1; T.length;) T.length > t && T.sort(O), e = T.shift(), t = T.length, le(e);} finally {- C.length = ue.__r = 0;- w.length = de.__r = 0;++ T.length = fe.__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 || P, 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] || N, 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 || te, v = t.length;- for (c = pe(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || P, 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);++function pe(e, t, n, r, i, a, o, s, c, l, u) {++ var d, f, p, m, h, g, _ = r && r.__k || ne, v = t.length;++ for (c = me(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || P, p.__i = d, g = be(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && Te(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = he(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), p.__u &= -7);return n.__e = h, c;}- function fe(e, t, n, r, i) {-function pe(e, t, n, r, i) {++function me(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) : ne(o) ? o = e.__k[a] = ae(I, { 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 = L(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(I, { 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 = L(s)), Te(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] = se(null, o, null, null, null) : ie(o) ? o = e.__k[a] = se(I, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = se(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = ge(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;++ if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = L(s)), Ee(s, s));return r;}- function pe(e, t, n) {-function me(e, t, n) {++function he(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));++ for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = he(r[i], t, n));return t;}e.__e != t && (t && e.type && !t.parentNode && (t = L(e)), t = n.insertBefore(e.__e, t || null));@@@ -88,7 -88,7 +88,7 @@@while (t != null && t.nodeType == 8);return t;}- function me(e, t, n, r) {-function he(e, t, n, r) {++function ge(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 +96,18 @@@}return -1;}- function he(e, t, n) {- t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || te.test(t) ? n : n + "px";-function ge(e, t, n) {- t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || ne.test(t) ? n : n + "px";++function _e(e, t, n) {++ t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || re.test(t) ? n : n + "px";}- function ge(e, t, n, r, i) {-function _e(e, t, n, r, i) {++function ve(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]);++ if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || _e(e.style, t, "");++ if (n) for (t in n) r && n[t] == r[t] || _e(e.style, t, n[t]);}- } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(A, "$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[k] = r[k] : (n[k] = ee, e.addEventListener(t, a ? M : j, a)) : e.removeEventListener(t, a ? M : j, 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[A] = r[A] : (n[A] = j, e.addEventListener(t, a ? N : M, a)) : e.removeEventListener(t, a ? N : M, a);++ } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(ee, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[j] = r[j] : (n[j] = M, e.addEventListener(t, a ? N : te, a)) : e.removeEventListener(t, a ? N : te, 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 +117,72 @@@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) {++function ye(e) {return function(t) {if (this.l) {var n = this.l[t.type + e];- if (t[O] == null) t[O] = ee++;- else if (t[O] < n[k]) return;- return n(b.event ? b.event(t) : t);- if (t[k] == null) t[k] = j++;- else if (t[k] < n[A]) return;- return n(x.event ? x.event(t) : t);++ if (t[A] == null) t[A] = M++;++ else if (t[A] < n[j]) return;++ return n(S.event ? S.event(t) : t);}};}- function ve(e, t, n, r, i, a, o, s, c, l) {- var u, d, f, p, m, h, g, _, v, y, 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, _, v, y, b, S, C, w, T, E, D = t.type;++function be(e, t, n, r, i, a, o, s, c, l) {++ var u, d, f, p, m, h, g, _, v, y, b, x, C, w, T, E, D = t.type;if (t.constructor !== void 0) return null;- 128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = b.__b) && u(t);- 128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = x.__b) && u(t);++ 128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = S.__b) && u(t);n: if (typeof D == "function") {d = o.length;try {- if (v = t.props, y = D.prototype && D.prototype.render, x = (u = D.contextType) && r[u.__c], S = u ? x ? x.props.value : u.__ : r, n.__c ? _ = (f = t.__c = n.__c).__ = f.__E : (y ? t.__c = f = new D(v, S) : (t.__c = f = new oe(v, 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 = []), y && f.__s == null && (f.__s = f.state), y && D.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = F({}, f.__s)), F(f.__s, D.getDerivedStateFromProps(v, f.__s))), m = f.props, h = f.state, f.__v = t, p) y && D.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), y && f.componentDidMount != null && f.__h.push(f.componentDidMount);- if (v = t.props, y = D.prototype && D.prototype.render, b = (u = D.contextType) && r[u.__c], S = u ? b ? b.props.value : u.__ : r, n.__c ? _ = (f = t.__c = n.__c).__ = f.__E : (y ? t.__c = f = new D(v, S) : (t.__c = f = new se(v, S), f.constructor = D, f.render = Ee), b && b.sub(f), f.state || (f.state = {}), f.__n = r, p = f.__d = !0, f.__h = [], f._sb = []), y && f.__s == null && (f.__s = f.state), y && D.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = F({}, f.__s)), F(f.__s, D.getDerivedStateFromProps(v, f.__s))), m = f.props, h = f.state, f.__v = t, p) y && D.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), y && f.componentDidMount != null && f.__h.push(f.componentDidMount);++ if (v = t.props, y = D.prototype && D.prototype.render, b = (u = D.contextType) && r[u.__c], x = u ? b ? b.props.value : u.__ : r, n.__c ? _ = (f = t.__c = n.__c).__ = f.__E : (y ? t.__c = f = new D(v, x) : (t.__c = f = new ce(v, x), f.constructor = D, f.render = De), b && b.sub(f), f.state || (f.state = {}), f.__n = r, p = f.__d = !0, f.__h = [], f._sb = []), y && f.__s == null && (f.__s = f.state), y && D.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = F({}, f.__s)), F(f.__s, D.getDerivedStateFromProps(v, f.__s))), m = f.props, h = f.state, f.__v = t, p) y && D.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), y && f.componentDidMount != null && f.__h.push(f.componentDidMount);else {-- if (y && D.getDerivedStateFromProps == null && v !== m && f.componentWillReceiveProps != null && f.componentWillReceiveProps(v, S), t.__v == n.__v || !f.__e && f.shouldComponentUpdate != null && !1 === f.shouldComponentUpdate(v, f.__s, S)) {++ if (y && D.getDerivedStateFromProps == null && v !== m && f.componentWillReceiveProps != null && f.componentWillReceiveProps(v, x), t.__v == n.__v || !f.__e && f.shouldComponentUpdate != null && !1 === f.shouldComponentUpdate(v, f.__s, x)) {t.__v != n.__v && (f.props = v, f.state = f.__s, f.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(e) {e && (e.__ = t);- }), P.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = L(n);- }), te.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = L(n);++ }), ne.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = L(n);break n;}-- f.componentWillUpdate != null && f.componentWillUpdate(v, f.__s, S), y && f.componentDidUpdate != null && f.__h.push(function() {++ f.componentWillUpdate != null && f.componentWillUpdate(v, f.__s, x), y && f.componentDidUpdate != null && f.__h.push(function() {f.componentDidUpdate(m, h, g);});}- if (f.context = S, f.props = v, f.__P = e, f.__e = !1, C = b.__r, w = 0, y) f.state = f.__s, f.__d = !1, C && C(t), u = f.render(f.props, f.state, f.context), P.push.apply(f.__h, f._sb), f._sb = [];- if (f.context = S, f.props = v, f.__P = e, f.__e = !1, C = x.__r, w = 0, y) f.state = f.__s, f.__d = !1, C && C(t), u = f.render(f.props, f.state, f.context), te.push.apply(f.__h, f._sb), f._sb = [];++ if (f.context = x, f.props = v, f.__P = e, f.__e = !1, C = S.__r, w = 0, y) f.state = f.__s, f.__d = !1, C && C(t), u = f.render(f.props, f.state, f.context), ne.push.apply(f.__h, f._sb), f._sb = [];else dof.__d = !1, C && C(t), u = f.render(f.props, f.state, f.context), f.state = f.__s;while (f.__d && ++w < 25);- f.state = f.__s, f.getChildContext != null && (r = F(F({}, r), f.getChildContext())), y && !p && f.getSnapshotBeforeUpdate != null && (g = f.getSnapshotBeforeUpdate(m, h)), T = u != null && u.type === I && u.key == null ? xe(u.props.children) : u, s = de(e, ne(T) ? T : [T], t, n, r, i, a, o, s, c, l), f.base = t.__e, t.__u &= -161, f.__h.length && o.push(f), _ && (f.__E = f.__ = null);- f.state = f.__s, f.getChildContext != null && (r = F(F({}, r), f.getChildContext())), y && !p && f.getSnapshotBeforeUpdate != null && (g = f.getSnapshotBeforeUpdate(m, h)), T = u != null && u.type === I && 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);++ f.state = f.__s, f.getChildContext != null && (r = F(F({}, r), f.getChildContext())), y && !p && f.getSnapshotBeforeUpdate != null && (g = f.getSnapshotBeforeUpdate(m, h)), T = u != null && u.type === I && u.key == null ? Ce(u.props.children) : u, s = pe(e, ie(T) ? T : [T], t, n, r, i, a, o, s, c, l), f.base = t.__e, t.__u &= -161, f.__h.length && o.push(f), _ && (f.__E = f.__ = null);} 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 if (a != null) for (E = a.length; E--;) ae(a[E]);} else t.__e = n.__e;- t.__k ??= n.__k || [], e.then || ye(t), b.__e(e, t, n);- t.__k ??= n.__k || [], e.then || be(t), x.__e(e, t, n);++ t.__k ??= n.__k || [], e.then || xe(t), S.__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 = b.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 = x.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 = we(n.__e, t, n, r, i, a, o, c, l);++ return (u = S.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 xe(e) {++ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(xe));}- function be(e, t, n) {- for (var r = 0; r < n.length; r++) Ce(n[r], n[++r], n[++r]);- b.__c && b.__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]);- x.__c && x.__c(t, e), e.some(function(t) {++function Se(e, t, n) {++ for (var r = 0; r < n.length; r++) Te(n[r], n[++r], n[++r]);++ S.__c && S.__c(t, e), e.some(function(t) {try {e = t.__h, t.__h = [], e.some(function(e) {e.call(t);});} catch (e) {- b.__e(e, t.__v);- x.__e(e, t.__v);++ S.__e(e, t.__v);}});}- function xe(e) {- return typeof e != "object" || !e || e.__b > 0 ? e : ne(e) ? e.map(xe) : e.constructor === void 0 ? F({}, e) : null;-function Se(e) {- return typeof e != "object" || !e || e.__b > 0 ? e : re(e) ? e.map(Se) : e.constructor === void 0 ? F({}, e) : null;++function Ce(e) {++ return typeof e != "object" || !e || e.__b > 0 ? e : ie(e) ? e.map(Ce) : e.constructor === void 0 ? F({}, e) : null;}- function Se(e, t, n, r, i, a, o, s, c) {- var l, u, d, f, p, m, h, g = n.props || N, _ = t.props, v = t.type;-function Ce(e, t, n, r, i, a, o, s, c) {++function we(e, t, n, r, i, a, o, s, c) {+ var l, u, d, f, p, m, h, g = n.props || P, _ = t.props, v = t.type;if (v == "svg" ? i = "http://www.w3.org/2000/svg" : v == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i ||= "http://www.w3.org/1999/xhtml", a != null) {for (l = 0; l < a.length; l++) if ((p = a[l]) && "setAttribute" in p == !!v && (v ? p.localName == v : p.nodeType == 3)) {e = p, a[l] = null;@@@ -191,80 -191,80 +191,80 @@@}if (e == null) {if (v == null) return document.createTextNode(_);- e = document.createElementNS(i, v, _.is && _), s &&= (b.__m && b.__m(t, a), !1), a = null;- e = document.createElementNS(i, v, _.is && _), s &&= (x.__m && x.__m(t, a), !1), a = null;++ e = document.createElementNS(i, v, _.is && _), s &&= (S.__m && S.__m(t, a), !1), a = null;}if (v == null) g === _ || s && e.data == _ || (e.data = _);else {- if (a = v == "textarea" && _.defaultValue != null ? null : a && y.call(e.childNodes), !s && a != null) for (g = {}, l = 0; l < e.attributes.length; l++) g[(p = e.attributes[l]).name] = p.value;- for (l in g) p = g[l], l == "dangerouslySetInnerHTML" ? d = p : l == "children" || l in _ || l == "value" && "defaultValue" in _ || l == "checked" && "defaultChecked" in _ || ge(e, l, null, p, i);- for (l in _) p = _[l], l == "children" ? f = p : l == "dangerouslySetInnerHTML" ? u = p : l == "value" ? m = p : l == "checked" ? h = p : s && typeof p != "function" || g[l] === p || ge(e, l, p, g[l], i);- if (a = v == "textarea" && _.defaultValue != null ? null : a && b.call(e.childNodes), !s && a != null) for (g = {}, l = 0; l < e.attributes.length; l++) g[(p = e.attributes[l]).name] = p.value;- for (l in g) p = g[l], l == "dangerouslySetInnerHTML" ? d = p : l == "children" || l in _ || l == "value" && "defaultValue" in _ || l == "checked" && "defaultChecked" in _ || _e(e, l, null, p, i);- for (l in _) p = _[l], l == "children" ? f = p : l == "dangerouslySetInnerHTML" ? u = p : l == "value" ? m = p : l == "checked" ? h = p : s && typeof p != "function" || g[l] === p || _e(e, l, p, g[l], i);++ if (a = v == "textarea" && _.defaultValue != null ? null : a && x.call(e.childNodes), !s && a != null) for (g = {}, l = 0; l < e.attributes.length; l++) g[(p = e.attributes[l]).name] = p.value;++ for (l in g) p = g[l], l == "dangerouslySetInnerHTML" ? d = p : l == "children" || l in _ || l == "value" && "defaultValue" in _ || l == "checked" && "defaultChecked" in _ || ve(e, l, null, p, i);++ for (l in _) p = _[l], l == "children" ? f = p : l == "dangerouslySetInnerHTML" ? u = p : l == "value" ? m = p : l == "checked" ? h = p : s && typeof p != "function" || g[l] === p || ve(e, l, p, g[l], i);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, ne(f) ? f : [f], t, n, r, v == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && L(n, 0), s, c), a != null) for (l = a.length; l--;) re(a[l]);- s && v != "textarea" || (l = "value", v == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || v == "progress" && !m || v == "option" && m != g[l]) && ge(e, l, m, g[l], i), l = "checked", h != null && h != e[l] && ge(e, l, h, g[l], i));- else if (d && (e.innerHTML = ""), fe(t.type == "template" ? e.content : e, re(f) ? f : [f], t, n, r, v == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && L(n, 0), s, c), a != null) for (l = a.length; l--;) ie(a[l]);- s && v != "textarea" || (l = "value", v == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || v == "progress" && !m || v == "option" && m != g[l]) && _e(e, l, m, g[l], i), l = "checked", h != null && h != e[l] && _e(e, l, h, g[l], i));++ else if (d && (e.innerHTML = ""), pe(t.type == "template" ? e.content : e, ie(f) ? f : [f], t, n, r, v == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && L(n, 0), s, c), a != null) for (l = a.length; l--;) ae(a[l]);++ s && v != "textarea" || (l = "value", v == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || v == "progress" && !m || v == "option" && m != g[l]) && ve(e, l, m, g[l], i), l = "checked", h != null && h != e[l] && ve(e, l, h, g[l], i));}return e;}- function Ce(e, t, n) {-function we(e, t, n) {++function Te(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) {- b.__e(e, n);- x.__e(e, n);++ S.__e(e, n);}}- function we(e, t, n) {-function Te(e, t, n) {++function Ee(e, t, n) {var r, i;- if (b.unmount && b.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || Ce(r, null, t)), (r = e.__c) != null) {- if (x.unmount && x.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || we(r, null, t)), (r = e.__c) != null) {++ if (S.unmount && S.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || Te(r, null, t)), (r = e.__c) != null) {if (r.componentWillUnmount) try {r.componentWillUnmount();} catch (e) {- b.__e(e, t);- x.__e(e, t);++ S.__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;++ if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && Ee(r[i], t, n || typeof e.type != "function");++ n || ae(e.__e), e.__c = e.__ = e.__e = void 0;}- function Te(e, t, n) {-function Ee(e, t, n) {++function De(e, t, n) {return this.constructor(e, n);}- function Ee(e, t, n) {-function De(e, t, n) {++function Oe(e, t, n) {var r, i, a, o;- t == document && (t = document.documentElement), b.__ && b.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], ve(t, e = (!r && n || t).__k = ie(I, null, [e]), i || N, N, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? y.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), x.__ && x.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], ye(t, e = (!r && n || t).__k = ae(I, null, [e]), i || P, P, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? b.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), xe(a, e, o), e.props.children = null;++ t == document && (t = document.documentElement), S.__ && S.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], be(t, e = (!r && n || t).__k = oe(I, null, [e]), i || P, P, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? x.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), Se(a, e, o), e.props.children = null;}- y = P.slice, b = { __e: function(e, t, n, r) {-b = te.slice, x = { __e: function(e, t, n, r) {++x = ne.slice, S = { __e: function(e, t, n, r) {for (var i, a, o; t = t.__;) if ((i = t.__c) && !i.__) try {if ((a = i.constructor) && a.getDerivedStateFromError != null && (i.setState(a.getDerivedStateFromError(e)), o = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, r || {}), o = i.__d), o) return i.__E = i;} catch (t) {e = t;}throw e;- } }, x = 0, S = function(e) {-} }, S = 0, C = function(e) {++} }, C = 0, w = function(e) {return e != null && e.constructor === void 0;- }, oe.prototype.setState = function(e, t) {-}, se.prototype.setState = function(e, t) {++}, ce.prototype.setState = function(e, t) {var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = F({}, this.state);- typeof e == "function" && (e = e(F({}, n), this.props)), e && F(n, e), e != null && this.__v && (t && this._sb.push(t), le(this));- }, oe.prototype.forceUpdate = function(e) {- this.__v && (this.__e = !0, e && this.__h.push(e), le(this));- }, oe.prototype.render = I, C = [], T = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, E = function(e, t) {- typeof e == "function" && (e = e(F({}, n), this.props)), e && F(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 = I, w = [], E = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, D = function(e, t) {++ typeof e == "function" && (e = e(F({}, n), this.props)), e && F(n, e), e != null && this.__v && (t && this._sb.push(t), de(this));++}, ce.prototype.forceUpdate = function(e) {++ this.__v && (this.__e = !0, e && this.__h.push(e), de(this));++}, ce.prototype.render = I, T = [], D = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, O = function(e, t) {return e.__v.__b - t.__v.__b;- }, ue.__r = 0, D = Math.random().toString(8), O = "__d" + D, k = "__a" + D, A = /(PointerCapture)$|Capture$/i, ee = 0, j = _e(!1), M = _e(!0);-}, de.__r = 0, O = Math.random().toString(8), k = "__d" + O, A = "__a" + O, ee = /(PointerCapture)$|Capture$/i, j = 0, M = ve(!1), N = ve(!0);++}, fe.__r = 0, k = Math.random().toString(8), A = "__d" + k, j = "__a" + k, ee = /(PointerCapture)$|Capture$/i, M = 0, te = ye(!1), N = ye(!0);//#endregion//#region src/sort-preferences.ts- function De(e, t, n) {-function Oe(e, t, n) {++function ke(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 {++var Ae = class extends Error {status;body;constructor(e, t, n = null) {- super(e), this.name = "ApiError", this.status = t, this.body = n;- super(a(e, t)), this.name = "ApiError", this.status = t, this.body = n;++ super(o(e, t)), this.name = "ApiError", this.status = t, this.body = n;}- }, ke = (e) => {-}, Ae = (e) => {++}, je = (e) => {if (!e || typeof e != "object") return "";let t = e;for (let e of [@@@ -276,7 -276,7 +276,7 @@@if (typeof n == "string" && n) return n;}return "";- }, R = (e) => e instanceof Error ? e.message : String(e);-}, R = (e) => a(e);++}, R = (e) => o(e);async function z(e, t) {let n = await fetch(e, {headers: { Accept: "application/json" },@@@ -286,7 -286,7 +286,7 @@@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);++ if (!n.ok) throw new Ae(je(r) || `请求失败(${n.status})`, n.status);return r;}async function B(e, t, n = "POST", r) {@@@ -303,14 -303,14 +303,14 @@@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);++ if (!i.ok) throw new Ae(je(a) || `请求失败(${i.status})`, i.status, a);return a;}//#endregion//#region node_modules/preact/hooks/dist/hooks.module.js- var V, H, Ae, je, Me = 0, Ne = [], U = b, Pe = U.__b, Fe = U.__r, Ie = U.diffed, Le = U.__c, Re = U.unmount, ze = U.__;- function Be(e, t) {- U.__h && U.__h(H, e, Me || t), Me = 0;-var V, H, je, Me, Ne = 0, Pe = [], U = x, Fe = U.__b, Ie = U.__r, Le = U.diffed, Re = U.__c, ze = U.unmount, Be = U.__;-function Ve(e, t) {- U.__h && U.__h(H, e, Ne || t), Ne = 0;++var V, H, Me, Ne, Pe = 0, Fe = [], U = S, Ie = U.__b, Le = U.__r, Re = U.diffed, ze = U.__c, Be = U.unmount, Ve = U.__;++function He(e, t) {++ U.__h && U.__h(H, e, Pe || t), Pe = 0;var n = H.__H || (H.__H = {__: [],__h: []@@@ -318,11 -318,11 +318,11 @@@return e >= n.__.length && n.__.push({}), n.__[e];}function W(e) {- return Me = 1, Ve(Ye, e);- return Ne = 1, He(Xe, e);++ return Pe = 1, Ue(Ze, e);}- function Ve(e, t, n) {- var r = Be(V++, 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(V++, 2);- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Xe(void 0, t), function(e) {++function Ue(e, t, n) {++ var r = He(V++, 2);++ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Ze(void 0, t), function(e) {var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));}], r.__c = H, !H.__f)) {@@@ -354,97 -354,97 +354,97 @@@return r.__N || r.__;}function G(e, t) {- var n = Be(V++, 3);- !U.__s && Je(n.__H, t) && (n.__ = e, n.u = t, H.__H.__h.push(n));- var n = Ve(V++, 3);- !U.__s && Ye(n.__H, t) && (n.__ = e, n.u = t, H.__H.__h.push(n));++ var n = He(V++, 3);++ !U.__s && Xe(n.__H, t) && (n.__ = e, n.u = t, H.__H.__h.push(n));}function K(e, t) {- var n = Be(V++, 4);- !U.__s && Je(n.__H, t) && (n.__ = e, n.u = t, H.__h.push(n));- var n = Ve(V++, 4);- !U.__s && Ye(n.__H, t) && (n.__ = e, n.u = t, H.__h.push(n));++ var n = He(V++, 4);++ !U.__s && Xe(n.__H, t) && (n.__ = e, n.u = t, H.__h.push(n));}function q(e) {- return Me = 5, He(function() {- return Ne = 5, Ue(function() {++ return Pe = 5, We(function() {return { current: e };}, []);}- function He(e, t) {- var n = Be(V++, 7);- return Je(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;-function Ue(e, t) {- var n = Ve(V++, 7);- return Ye(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;++function We(e, t) {++ var n = He(V++, 7);++ return Xe(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();) {++function Ge() {++ for (var e; e = Fe.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 = [];++ t.__h.some(Je), t.__h.some(Ye), t.__h = [];} catch (n) {t.__h = [], U.__e(n, e.__v);}}}U.__b = function(e) {- H = null, Pe && Pe(e);- H = null, Fe && Fe(e);++ H = null, Ie && Ie(e);}, U.__ = function(e, t) {- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), ze && ze(e, t);- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Be && Be(e, t);++ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Ve && Ve(e, t);}, U.__r = function(e) {- Fe && Fe(e), V = 0;- Ie && Ie(e), V = 0;++ Le && Le(e), V = 0;var t = (H = e.__c).__H;- t && (Ae === H ? (t.__h = [], H.__h = [], t.__.some(function(e) {- t && (je === H ? (t.__h = [], H.__h = [], t.__.some(function(e) {++ t && (Me === H ? (t.__h = [], H.__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 = [], V = 0)), Ae = H;- })) : (t.__h.some(qe), t.__h.some(Je), t.__h = [], V = 0)), je = H;++ })) : (t.__h.some(Je), t.__h.some(Ye), t.__h = [], V = 0)), Me = H;}, U.diffed = function(e) {- Ie && Ie(e);- Le && Le(e);++ Re && Re(e);var t = e.__c;- t && t.__H && (t.__H.__h.length && (Ne.push(t) !== 1 && je === U.requestAnimationFrame || ((je = U.requestAnimationFrame) || Ge)(Ue)), t.__H.__.some(function(e) {- t && t.__H && (t.__H.__h.length && (Pe.push(t) !== 1 && Me === U.requestAnimationFrame || ((Me = U.requestAnimationFrame) || Ke)(We)), t.__H.__.some(function(e) {++ t && t.__H && (t.__H.__h.length && (Fe.push(t) !== 1 && Ne === U.requestAnimationFrame || ((Ne = U.requestAnimationFrame) || qe)(Ge)), t.__H.__.some(function(e) {e.u &&= (e.__H = e.u, void 0);- })), Ae = H = null;- })), je = H = null;++ })), Me = H = null;}, U.__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);++ e.__h.some(Je), e.__h = e.__h.filter(function(e) {++ return !e.__ || Ye(e);});} catch (n) {t.some(function(e) {e.__h &&= [];}), t = [], U.__e(n, e.__v);}- }), Le && Le(e, t);- }), Re && Re(e, t);++ }), ze && ze(e, t);}, U.unmount = function(e) {- Re && Re(e);- ze && ze(e);++ Be && Be(e);var t, n = e.__c;n && n.__H && (n.__H.__.some(function(e) {try {- Ke(e);- qe(e);++ Je(e);} catch (e) {t = e;}}), n.__H = void 0, t && U.__e(t, n.__v));};- var We = typeof requestAnimationFrame == "function";- function Ge(e) {-var Ge = typeof requestAnimationFrame == "function";-function Ke(e) {++var Ke = typeof requestAnimationFrame == "function";++function qe(e) {var t, n = function() {- clearTimeout(r), We && cancelAnimationFrame(t), setTimeout(e);- clearTimeout(r), Ge && cancelAnimationFrame(t), setTimeout(e);++ clearTimeout(r), Ke && cancelAnimationFrame(t), setTimeout(e);}, r = setTimeout(n, 35);- We && (t = requestAnimationFrame(n));- Ge && (t = requestAnimationFrame(n));++ Ke && (t = requestAnimationFrame(n));}- function Ke(e) {-function qe(e) {++function Je(e) {var t = H, n = e.__c;typeof n == "function" && (e.__c = void 0, n()), H = t;}- function qe(e) {-function Je(e) {++function Ye(e) {var t = H;e.__c = e.__(), H = t;}- function Je(e, t) {-function Ye(e, t) {++function Xe(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) {++function Ze(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;++var Qe = 0;Array.isArray;function J(e, t, n, r, i, a) {t ||= {};@@@ -461,18 -461,18 +461,18 @@@__e: null,__c: null,constructor: void 0,- __v: --Xe,- __v: --Ze,++ __v: --Qe,__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 b.vnode && b.vnode(l), l;- return x.vnode && x.vnode(l), l;++ return S.vnode && S.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, disabled: s = !1 }) {-function Qe({ id: e, label: t, value: n, onInput: r, error: i, help: a, current: o = !1, disabled: s = !1 }) {++function $e({ id: e, label: t, value: n, onInput: r, error: i, help: a, current: o = !1, disabled: s = !1 }) {return /* @__PURE__ */ J("div", {class: "configfield",children: [@@@ -502,35 -502,35 +502,35 @@@]});}- function Qe({ initial: e, receipt: t }) {- let [n, r] = W(e), [a, s] = W(""), [c, l] = W(""), [d, f] = W(""), [p, m] = W(!1), [h, g] = W(""), [_, v] = W({}), y = q(null), b = q(!1), x = q(null);-function $e({ initial: e, receipt: t }) {- let [n, r] = W(e), [i, a] = W(""), [o, s] = W(""), [c, l] = W(""), [d, p] = W(!1), [m, h] = W(""), [g, v] = W({}), y = q(null), b = q(!1), x = q(null);++function et({ initial: e, receipt: t }) {++ let [n, r] = W(e), [i, a] = W(""), [o, s] = W(""), [c, l] = W(""), [u, f] = W(!1), [m, h] = W(""), [g, _] = W({}), y = q(null), b = q(!1), x = q(null);return /* @__PURE__ */ J("form", {class: "configfieldset",- "data-fieldset-type": p ? "warning" : void 0,- "data-fieldset-type": d ? "warning" : void 0,++ "data-fieldset-type": u ? "warning" : void 0,onSubmit: async (e) => {if (e.preventDefault(), b.current) return;- g("");- let i = {};- if (n.mode === "password" && !a && (i.current_password = "请输入当前访问密码"), p || ((c.length < 8 || c.length > 256) && (i.password = "访问密码需为 8–256 个字符"), c !== d && (i.confirmation = "两次输入的密码不一致")), v(i), Object.keys(i).length) {+ h("");- let u = {};- if (n.mode === "password" && !i && (u.current_password = "请输入当前访问密码"), d || ((o.length < 8 || o.length > 256) && (u.password = "访问密码需为 8–256 个字符"), o !== c && (u.confirmation = "两次输入的密码不一致")), v(u), Object.keys(u).length) {++ let d = {};++ if (n.mode === "password" && !i && (d.current_password = "请输入当前访问密码"), u || ((o.length < 8 || o.length > 256) && (d.password = "访问密码需为 8–256 个字符"), o !== c && (d.confirmation = "两次输入的密码不一致")), _(d), Object.keys(d).length) {requestAnimationFrame(() => y.current?.querySelector("[aria-invalid=\"true\"]")?.focus());return;}- b.current = !0, u(x.current, !0);- b.current = !0, _(x.current, !0);++ b.current = !0, v(x.current, !0);try {let e = await B("/api/configuration/access", {revision: n.revision,- action: p ? "disable" : "set",- confirm_disable: p,- current_password: a,- password: p ? "" : c,- confirmation: p ? "" : d- action: d ? "disable" : "set",- confirm_disable: d,++ action: u ? "disable" : "set",++ confirm_disable: u,+ current_password: i,- password: d ? "" : o,- confirmation: d ? "" : c++ password: u ? "" : o,++ confirmation: u ? "" : c});- r(e), s(""), l(""), f(""), m(!1), v({}), t(e.mode === "open" ? "已关闭访问密码" : "已保存访问密码");- r(e), a(""), s(""), l(""), p(!1), v({}), t(e.mode === "open" ? "已关闭访问密码" : "已保存访问密码");++ r(e), a(""), s(""), l(""), f(!1), _({}), t(e.mode === "open" ? "已关闭访问密码" : "已保存访问密码");} catch (e) {- let t = e instanceof Oe ? e.body : null, n = t?.errors || t?.detail?.errors;- n ? v(n) : g(R(e));- let t = e instanceof ke ? e.body : null, n = t?.errors || t?.detail?.errors;- n ? v(n) : h(R(e));++ let t = e instanceof Ae ? e.body : null, n = t?.errors || t?.detail?.errors;++ n ? _(n) : h(R(e));} finally {- b.current = !1, u(x.current, !1);- b.current = !1, _(x.current, !1);++ b.current = !1, v(x.current, !1);}},"aria-labelledby": "accessTitle",@@@ -541,7 -541,7 +541,7 @@@children: [/* @__PURE__ */ J("div", {class: "configfieldset-heading",- children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: i("accessTitle", "访问密码") } }), /* @__PURE__ */ J("p", {- children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: u("accessTitle", "访问密码") } }), /* @__PURE__ */ J("p", {++ children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d("accessTitle", "访问密码") } }), /* @__PURE__ */ J("p", {class: "confighelp",children: n.mode === "open" ? "未设置密码,能连接到 Peach 的设备可直接访问。" : n.mode === "legacy" ? "当前使用系统生成的访问口令。你可以设置自己的密码,或关闭登录要求。" : n.mode === "locked" ? "访问设置无法读取,请在本机检查配置文件。" : "已设置密码。新设备需要登录,保持登录时间在登录页选择。"})]@@@ -552,8 -552,8 +552,8 @@@class: "pcheck",children: [/* @__PURE__ */ J("input", {type: "checkbox",- checked: p,- onChange: (e) => m(e.currentTarget.checked)- checked: d,- onChange: (e) => p(e.currentTarget.checked)++ checked: u,++ onChange: (e) => f(e.currentTarget.checked)}), /* @__PURE__ */ J("span", {"aria-hidden": "true",children: /* @__PURE__ */ J("svg", {@@@ -563,31 -563,31 +563,31 @@@})]}), /* @__PURE__ */ J("span", { children: "关闭访问密码,允许能连接到 Peach 的设备直接访问" })]}) : null,- n.mode === "password" ? /* @__PURE__ */ J(Ze, {- n.mode === "password" ? /* @__PURE__ */ J(Qe, {++ n.mode === "password" ? /* @__PURE__ */ J($e, {id: "access-current",label: "当前访问密码",- value: a,- onInput: s,- error: _.current_password,+ value: i,+ onInput: a,+ error: g.current_password,current: !0}) : null,- n.mode === "locked" ? null : /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J(Ze, {- n.mode === "locked" ? null : /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J(Qe, {++ n.mode === "locked" ? null : /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J($e, {id: "access-password",label: n.mode === "password" ? "新访问密码" : "设置访问密码",- value: c,- onInput: l,- disabled: p,- error: p ? void 0 : _.password,- help: p ? "关闭访问密码时无需填写。" : "至少 8 个字符。保存后其他设备需要重新登录。"- }), /* @__PURE__ */ J(Ze, {+ value: o,+ onInput: s,- disabled: d,- error: d ? void 0 : g.password,- help: d ? "关闭访问密码时无需填写。" : "至少 8 个字符。保存后其他设备需要重新登录。"- }), /* @__PURE__ */ J(Qe, {++ disabled: u,++ error: u ? void 0 : g.password,++ help: u ? "关闭访问密码时无需填写。" : "至少 8 个字符。保存后其他设备需要重新登录。"++ }), /* @__PURE__ */ J($e, {id: "access-confirm",label: "确认访问密码",- value: d,- onInput: f,- disabled: p,- error: p ? void 0 : _.confirmation+ value: c,+ onInput: l,- disabled: d,- error: d ? void 0 : g.confirmation++ disabled: u,++ error: u ? void 0 : g.confirmation})] }),- p && /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: o("保存后,能连接到 Peach 的设备将直接访问馆藏。", {- d && /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: f("保存后,能连接到 Peach 的设备将直接访问馆藏。", {++ u && /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: p("保存后,能连接到 Peach 的设备将直接访问馆藏。", {variant: "warning",label: "访问范围"}) } }),@@@ -610,7 -610,7 +610,7 @@@}//#endregion//#region src/islands/release-updates.tsx- var $e = /* @__PURE__ */ new Set([-var et = /* @__PURE__ */ new Set([++var tt = /* @__PURE__ */ new Set(["downloading","verifying","extracting",@@@ -618,74 -618,74 +618,74 @@@"restarting","installing"]);- function et({ initial: e, initialJob: t }) {- let [r, a] = W(e), [o, c] = W(t || {-function tt({ initial: e, initialJob: t }) {++function nt({ initial: e, initialJob: t }) {+ let [n, r] = W(e), [i, a] = W(t || {state: "idle",progress: 0- }), [l, d] = W(""), f = q(null), p = q(!0), m = q(!1), h = q(null);- }), [o, s] = W(""), l = q(null), d = q(!0), m = q(!1), h = q(null);++ }), [o, s] = W(""), c = q(null), u = q(!0), f = q(!1), h = q(null);G(() => {- u(h.current, $e.has(o.state));- }, [o.state]), G(() => () => {- p.current = !1, f.current?.abort();- _(h.current, et.has(i.state));++ v(h.current, tt.has(i.state));+ }, [i.state]), G(() => () => {- d.current = !1, l.current?.abort();++ u.current = !1, c.current?.abort();}, []);let g = async () => {let e = await B("/api/configuration/update-restart", {});- p.current && c(e);- d.current && a(e);++ u.current && a(e);};G(() => {- o.state !== "ready" || m.current || (m.current = !0, n({- i.state !== "ready" || m.current || (m.current = !0, c({++ i.state !== "ready" || f.current || (f.current = !0, l({title: "更新已准备好",- body: `Peach ${o.version || ""} 将在重启后安装。`,+ body: `Peach ${i.version || ""} 将在重启后安装。`,confirmLabel: "立即重启",cancelLabel: "稍后",onConfirm: g}));- }, [o.state]), G(() => {- if (!$e.has(o.state)) return;- let e = new AbortController(), t, n = 0, r = async () => {+ }, [i.state]), G(() => {- if (!et.has(i.state)) return;++ if (!tt.has(i.state)) return;+ let e = new AbortController(), t, n = 0, o = async () => {try {let t = await z("/api/configuration/update-status", e.signal);- e.signal.aborted || (c(t), n = 0, t.state === "complete" && a((e) => ({+ e.signal.aborted || (a(t), n = 0, t.state === "complete" && r((e) => ({...e,current_version: t.version || e.current_version,state: "current",message: "已是最新测试版。"})));} catch {- ++n >= 120 && !e.signal.aborted && d("尚未连接到 Peach,请检查托盘后刷新页面。");+ ++n >= 120 && !e.signal.aborted && s("尚未连接到 Peach,请检查托盘后刷新页面。");}- !e.signal.aborted && n < 120 && (t = setTimeout(r, 1e3));+ !e.signal.aborted && n < 120 && (t = setTimeout(o, 1e3));};- return t = setTimeout(r, 1e3), () => {+ return t = setTimeout(o, 1e3), () => {e.abort(), clearTimeout(t);};- }, [o.state]);+ }, [i.state]);- let v = async (e) => {- if (l.current || et.has(i.state)) return;+ let _ = async (e) => {- if (f.current || $e.has(o.state)) return;++ if (c.current || tt.has(i.state)) return;let t = new AbortController();- f.current = t, m.current = !1, d(""), u(e, !0);- l.current = t, m.current = !1, s(""), _(e, !0);++ c.current = t, f.current = !1, s(""), v(e, !0);try {let e = await B("/api/configuration/update", {}, "POST", t.signal);- t.signal.aborted || c(e);+ t.signal.aborted || a(e);} catch (e) {- t.signal.aborted || d(R(e));+ t.signal.aborted || s(R(e));} finally {- f.current = null, u(e, !1);- l.current = null, _(e, !1);++ c.current = null, v(e, !1);}- }, v = async (t) => {- if (f.current) return;+ }, y = async (t) => {- if (l.current) return;++ if (c.current) return;let n = new AbortController();- f.current = n, u(t, !0), d("");- l.current = n, _(t, !0), s("");++ c.current = n, v(t, !0), s("");try {let e = await z("/api/configuration/updates", n.signal);- n.signal.aborted || a(e);+ n.signal.aborted || r(e);} catch (t) {- n.signal.aborted || (a({+ n.signal.aborted || (r({...e,state: "error"- }), d(R(t)));+ }), s(R(t)));} finally {- f.current = null, u(t, !1);- l.current = null, _(t, !1);++ c.current = null, v(t, !1);}};return /* @__PURE__ */ J("section", {@@@ -695,34 -695,57 +695,57 @@@children: [/* @__PURE__ */ J("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: i("configUpdatesTitle", "检查更新") } }),- /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: u("configUpdatesTitle", "检查更新") } }),++ /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d("configUpdatesTitle", "检查更新") } }),/* @__PURE__ */ J("dl", {class: "configfacts",children: [/* @__PURE__ */ J("dt", { children: "当前版本" }),- /* @__PURE__ */ J("dd", { children: r.current_version }),+ /* @__PURE__ */ J("dd", { children: n.current_version }),/* @__PURE__ */ J("dt", { children: "安装方式" }),- /* @__PURE__ */ J("dd", { children: r.installation }),+ /* @__PURE__ */ J("dd", { children: n.installation }),/* @__PURE__ */ J("dt", { children: "更新通道" }),- /* @__PURE__ */ J("dd", { children: r.channel }),+ /* @__PURE__ */ J("dd", { children: n.channel }),/* @__PURE__ */ J("dt", { children: "最新版本" }),- /* @__PURE__ */ J("dd", { children: r.latest_version || (r.state === "unchecked" ? "尚未检查" : "未取得") })+ /* @__PURE__ */ J("dd", { children: n.latest_version || (n.state === "unchecked" ? "尚未检查" : "未取得") })]}),- /* @__PURE__ */ J("p", {- class: l || r.state === "error" ? "configbad" : "confighelp",- role: l || r.state === "error" ? "alert" : "status",- children: l || r.message+ n.state === "available" && !o ? /* @__PURE__ */ J("div", {+ role: "status",- dangerouslySetInnerHTML: { __html: f(n.message, { label: "有可用更新" }) }++ dangerouslySetInnerHTML: { __html: p(n.message, { label: "有可用更新" }) }+ }) : /* @__PURE__ */ J("p", {+ class: o || n.state === "error" ? "configbad" : "confighelp",+ role: o || n.state === "error" ? "alert" : "status",+ children: o || n.message}),- o.state === "idle" ? null : /* @__PURE__ */ J("div", {+ i.state === "idle" ? null : /* @__PURE__ */ J("div", {"aria-live": "polite",children: [/* @__PURE__ */ J("p", {- class: o.state === "error" ? "configbad" : "confighelp",- children: o.message- }), o.state === "error" ? null : /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: s(o.state === "downloading" ? "下载进度" : "安装进度", o.state === "downloading" ? o.downloaded || 0 : o.progress, o.state === "downloading" ? o.total || 1 : 100) } }), /* @__PURE__ */ J("p", {- class: "confighelp",- children: o.state === "downloading" && o.total ? `${((o.downloaded || 0) / 1048576).toFixed(1)} / ${(o.total / 1048576).toFixed(1)} MB` : `${o.progress}%`- })] })]+ class: i.state === "error" ? "configbad" : "confighelp",+ children: i.message+ }), i.state === "error" ? null : /* @__PURE__ */ J(I, { children: [- /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: p("更新准备进度:下载、校验、解压、准备安装", i.progress, 100, { stops: [++ /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: m("更新准备进度:下载、校验、解压、准备安装", i.progress, 100, { stops: [+ {+ value: 65,+ label: "下载结束"+ },+ {+ value: 67,+ label: "校验结束"+ },+ {+ value: 90,+ label: "准备安装"+ }+ ] }) } }),+ /* @__PURE__ */ J("p", {+ class: "confighelp",+ children: ["下载 → 校验 → 解压 → 准备安装 · ", i.message]+ }),+ /* @__PURE__ */ J("p", {+ class: "confighelp",+ children: i.state === "downloading" && i.total ? `${((i.downloaded || 0) / 1048576).toFixed(1)} / ${(i.total / 1048576).toFixed(1)} MB` : `${i.progress}%`+ })+ ] })]})]}), /* @__PURE__ */ J("div", {@@@ -730,24 -753,19 +753,24 @@@"data-geist-fieldset-footer": !0,children: [/* @__PURE__ */ J("a", {- class: "geist-button",+ class: "geist-button externallink",- href: r.release_url,+ href: n.release_url,target: "_blank",rel: "noreferrer",- children: "查看发布页"+ children: ["查看发布页", /* @__PURE__ */ J("svg", {+ class: "externalmark",+ viewBox: "0 0 24 24",+ "aria-hidden": "true",+ children: /* @__PURE__ */ J("use", { href: "#i-external-link" })+ })]}),- o.state === "ready" ? /* @__PURE__ */ J("button", {+ i.state === "ready" ? /* @__PURE__ */ J("button", {type: "button",class: "geist-button primary",onClick: () => {- n({- c({++ l({title: "更新已准备好",- body: `Peach ${o.version || ""} 将在重启后安装。`,+ body: `Peach ${i.version || ""} 将在重启后安装。`,confirmLabel: "立即重启",cancelLabel: "稍后",onConfirm: g@@@ -765,8 -783,8 +788,8 @@@/* @__PURE__ */ J("button", {type: "button",class: "geist-button",- disabled: $e.has(o.state),- onClick: (e) => v(e.currentTarget),- disabled: et.has(i.state),++ disabled: tt.has(i.state),+ onClick: (e) => y(e.currentTarget),children: "检查更新"})]@@@ -775,11 -793,11 +798,11 @@@}//#endregion//#region src/islands/peach-proxy.tsx- function tt({ initial: e, receipt: t }) {- let [n, r] = W(e), [a, o] = W(e.mode), [s, l] = W(""), [d, p] = W(""), m = q(!1), h = q(null), g = q(null), _ = q(new AbortController());- G(() => () => _.current.abort(), []), K(() => {- let t = h.current;- t.innerHTML = c([-function nt({ initial: e, receipt: t }) {- let [n, r] = W(e), [i, a] = W(e.mode), [o, s] = W(""), [c, l] = W(""), d = q(!1), f = q(null), p = q(null), m = q(new AbortController());++function rt({ initial: e, receipt: t }) {++ let [n, r] = W(e), [i, a] = W(e.mode), [o, s] = W(""), [c, l] = W(""), u = q(!1), f = q(null), p = q(null), m = q(new AbortController());+ G(() => () => m.current.abort(), []), K(() => {+ let t = f.current;- t.innerHTML = h([++ t.innerHTML = g([["environment", "系统代理"],["direct", "直连"],["proxy", "自定义"]@@@ -788,24 -806,24 +811,24 @@@className: "configselect",attr: "data-fixed-width"});- let n = f(t.firstElementChild), r = () => o(n.value);- let n = y(t.firstElementChild), r = () => a(n.value);++ let n = b(t.firstElementChild), r = () => a(n.value);return n.addEventListener("change", r), () => {n.removeEventListener("change", r), t.replaceChildren();};}, []);- async function v() {- if (!m.current) {- m.current = !0, u(g.current, !0), p("");- async function g() {- if (!d.current) {- d.current = !0, _(p.current, !0), l("");++ async function h() {++ if (!u.current) {++ u.current = !0, v(p.current, !0), l("");try {let e = await B("/api/configuration/peach-proxy", {- mode: a,- proxy: s- }, "POST", _.current.signal);- _.current.signal.aborted || (r(e), l(""), t("已保存 Peach 代理"));+ mode: i,+ proxy: o+ }, "POST", m.current.signal);+ m.current.signal.aborted || (r(e), s(""), t("已保存 Peach 代理"));} catch (e) {- _.current.signal.aborted || p(R(e));+ m.current.signal.aborted || l(R(e));} finally {- m.current = !1, u(g.current, !1);- d.current = !1, _(p.current, !1);++ u.current = !1, v(p.current, !1);}}}@@@ -814,14 -832,14 +837,14 @@@class: "configfieldset","data-geist-fieldset": !0,onSubmit: (e) => {- e.preventDefault(), v();- e.preventDefault(), g();++ e.preventDefault(), h();},children: [/* @__PURE__ */ J("div", {class: "geist-fieldset-content",children: [/* @__PURE__ */ J("div", {class: "configfieldset-heading",- children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: i("peachProxyTitle", "Peach 代理") } }), /* @__PURE__ */ J("p", {- children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: u("peachProxyTitle", "Peach 代理") } }), /* @__PURE__ */ J("p", {++ children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d("peachProxyTitle", "Peach 代理") } }), /* @__PURE__ */ J("p", {class: "confighelp",children: "采集来源选择“Peach 代理”时共用此设置。"})]@@@ -866,7 -884,7 +889,7 @@@}//#endregion//#region src/islands/desktop-settings.tsx- function nt({ label: e, checked: t, disabled: n, change: r }) {-function rt({ label: e, checked: t, disabled: n, change: r }) {++function it({ label: e, checked: t, disabled: n, change: r }) {return /* @__PURE__ */ J("label", {class: "configcheck",children: [/* @__PURE__ */ J("span", {@@@ -886,7 -904,7 +909,7 @@@}), /* @__PURE__ */ J("span", { children: e })]});}- function rt({ label: e, checked: t, disabled: n, change: r }) {-function it({ label: e, checked: t, disabled: n, change: r }) {++function at({ label: e, checked: t, disabled: n, change: r }) {return /* @__PURE__ */ J("label", {class: "configtoggle",children: [/* @__PURE__ */ J("span", { children: e }), /* @__PURE__ */ J("input", {@@@ -899,20 -917,20 +922,20 @@@})]});}- function it({ startup: e, receipt: t }) {- let [n, r] = W(e.enabled), [a, o] = W(e.silent), [s, c] = W(""), l = q(!1), d = q(null);- async function f() {- if (!l.current) {- l.current = !0, u(d.current, !0), c("");-function at({ startup: e, receipt: t }) {++function ot({ startup: e, receipt: t }) {+ let [n, r] = W(e.enabled), [i, a] = W(e.silent), [o, s] = W(""), c = q(!1), l = q(null);- async function d() {++ async function u() {+ if (!c.current) {- c.current = !0, _(l.current, !0), s("");++ c.current = !0, v(l.current, !0), s("");try {await B("/api/configuration/startup", {enabled: n,- silent: a+ silent: i}), t("已保存开机自启");} catch (e) {- c(R(e));+ s(R(e));} finally {- l.current = !1, u(d.current, !1);- c.current = !1, _(l.current, !1);++ c.current = !1, v(l.current, !1);}}}@@@ -920,28 -938,28 +943,28 @@@class: "configfieldset","data-geist-fieldset": !0,onSubmit: (e) => {- e.preventDefault(), f();- e.preventDefault(), d();++ e.preventDefault(), u();},children: [/* @__PURE__ */ J("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: i("startupTitle", "开机自启") } }),- /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: u("startupTitle", "开机自启") } }),++ /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d("startupTitle", "开机自启") } }),/* @__PURE__ */ J("div", {class: "configoptions",role: "group","aria-labelledby": "startupTitle",- children: [/* @__PURE__ */ J(rt, {- children: [/* @__PURE__ */ J(it, {++ children: [/* @__PURE__ */ J(at, {label: "开机后启动 Peach",checked: n,disabled: !e.available,change: r}), /* @__PURE__ */ J("div", {class: "configoption",- children: [/* @__PURE__ */ J(rt, {- children: [/* @__PURE__ */ J(it, {++ children: [/* @__PURE__ */ J(at, {label: "静默启动",- checked: a,+ checked: i,disabled: !e.available,- change: o+ change: a}), /* @__PURE__ */ J("p", {class: "confighelp",children: "静默启动仅显示托盘。"@@@ -971,24 -989,24 +994,24 @@@})]});}- function at({ data: e }) {-function ot({ data: e }) {++function st({ data: e }) {let t = q(null);return K(() => {let n = t.current, r = document.createElement("details");r.className = "configdirectories";- let a = document.createElement("summary");- a.innerHTML = i("chevron-right") + "<span>数据目录</span>", r.append(a);+ let i = document.createElement("summary");- i.innerHTML = v("chevron-right") + "<span>数据目录</span>", r.append(i);++ i.innerHTML = a("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();- return n.replaceChildren(r), v(n, "details", "uninstall-data"), () => n.replaceChildren();++ return n.replaceChildren(r), y(n, "details", "uninstall-data"), () => n.replaceChildren();}, [e]), /* @__PURE__ */ J("div", { ref: t });}- function ot({ uninstall: e }) {- let [t, r] = W(!1), [a, o] = W("");- async function s() {- await n({-function st({ uninstall: e }) {++function ct({ uninstall: e }) {+ let [t, n] = W(!1), [r, i] = W("");+ async function a() {- await c({++ await l({title: "卸载 Peach",danger: !0,body: t ? "将退出 Peach,移除程序、开机自启、设置、本地数据库、观看记录、凭据和缓存。原始媒体文件保留。" : "将退出 Peach 并移除程序和开机自启。设置、本地数据库、观看记录与缓存保留。",@@@ -1012,18 -1030,18 +1035,18 @@@children: [/* @__PURE__ */ J("div", {class: "configfieldset-heading",- children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: i("uninstallTitle", "卸载 Peach") } }), e.available && /* @__PURE__ */ J("p", {- children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: u("uninstallTitle", "卸载 Peach") } }), e.available && /* @__PURE__ */ J("p", {++ children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d("uninstallTitle", "卸载 Peach") } }), e.available && /* @__PURE__ */ J("p", {class: "confighelp",children: "卸载会退出 Peach、移除程序和开机自启。原始媒体文件保留。"})]}),- /* @__PURE__ */ J(nt, {- /* @__PURE__ */ J(rt, {++ /* @__PURE__ */ J(it, {label: "完全卸载:同时删除设置、本地数据库、观看记录、凭据和缓存",checked: t,- disabled: !e.full_available || !!a,- change: r+ disabled: !e.full_available || !!r,+ change: n}),- /* @__PURE__ */ J(at, { data: e }),- /* @__PURE__ */ J(ot, { data: e }),++ /* @__PURE__ */ J(st, { data: e }),e.message && /* @__PURE__ */ J("p", {class: "confighelp",children: e.message@@@ -1048,19 -1066,116 +1071,120 @@@});}//#endregion+ //#region src/islands/clouddrive-guide.tsx-var ct = [++var lt = [+ {+ name: "机械硬盘或内存不超过 8 GB",+ cache: "10–20 GiB",+ read: "256 / 128 KB",+ task: "同时处理 1 个视频",+ advice: "缓存优先放内置 SSD。只有机械硬盘时,先用按需读取;反复观看同一批文件才开启文件夹缓存。"+ },+ {+ name: "SATA SSD,8–16 GB 内存",+ cache: "20–50 GiB",+ read: "256 / 128 KB",+ task: "同时处理 1–2 个视频",+ advice: "扫描、抽帧用小读块。观看高码率视频若仍缓冲,再试 512 / 256 KB。"+ },+ {+ name: "NVMe SSD,16 GB 以上内存",+ cache: "50–100 GiB",+ read: "256 / 128 KB",+ task: "同时处理 2 个视频起步",+ advice: "以扫描和拖动播放为主时保留小读块。连续看高码率视频可试 512 / 256 KB,速度不升就调回。"+ }+ ];-function lt() {++function ut() {+ let e = q(null);+ return K(() => {- e.current && v(e.current, "details", "clouddrive-guide");++ e.current && y(e.current, "details", "clouddrive-guide");+ }, []), /* @__PURE__ */ J("div", {+ ref: e,+ class: "cloudguide",+ children: [/* @__PURE__ */ J("p", {+ class: "confighelp",+ children: ["先在 CloudDrive 登录网盘并挂载,开启「启动时自动挂载」。", /* @__PURE__ */ J("a", {++ class: "externallink",+ href: "https://www.clouddrive2.com/help.html",+ target: "_blank",+ rel: "noreferrer",+ children: ["挂载帮助", /* @__PURE__ */ J("svg", {- "aria-hidden": "true",++ class: "externalmark",+ viewBox: "0 0 24 24",++ "aria-hidden": "true",+ children: /* @__PURE__ */ J("use", { href: "#i-external-link" })+ })]+ })]+ }), /* @__PURE__ */ J("details", { children: [+ /* @__PURE__ */ J("summary", { children: "CloudDrive 速度与缓存建议" }),+ /* @__PURE__ */ J("p", {+ class: "confighelp",+ children: "按缓存所在的硬盘选起步配置。优先保证播放流畅,再用同一视频比较冷启动、拖动和流量;参数越大不一定越快。"+ }),+ /* @__PURE__ */ J("div", {+ class: "cloudguide-profiles",- children: ct.map((e) => /* @__PURE__ */ J("section", {++ children: lt.map((e) => /* @__PURE__ */ J("section", {+ "aria-label": e.name,+ children: [+ /* @__PURE__ */ J("h4", { children: e.name }),+ /* @__PURE__ */ J("dl", { children: [+ /* @__PURE__ */ J("dt", { children: "磁盘缓存上限" }),+ /* @__PURE__ */ J("dd", { children: e.cache }),+ /* @__PURE__ */ J("dt", { children: "默认 / 最小读取长度" }),+ /* @__PURE__ */ J("dd", { children: e.read }),+ /* @__PURE__ */ J("dt", { children: "Peach 并行任务" }),+ /* @__PURE__ */ J("dd", { children: e.task })+ ] }),+ /* @__PURE__ */ J("p", {+ class: "confighelp",+ children: e.advice+ })+ ]+ }, e.name))+ }),+ /* @__PURE__ */ J("ul", {+ class: "cloudguide-notes",+ children: [+ /* @__PURE__ */ J("li", { children: "在 CloudDrive「设置」中设置磁盘缓存上限和 LRU(优先清理最久没用的缓存)。系统盘至少留 40 GiB;上限不要填 0。设置后重新打开确认,并观察实际占盘。" }),+ /* @__PURE__ */ J("li", { children: "在各网盘的下载设置中调整读取长度和下载线程。115 从 2 线程开始,遵守当前客户端上限;PikPak / WebDAV 从 2 线程开始,带宽充足且速度确实提升时再试 4。开启支持的直链选项,确认播放可用。" }),+ /* @__PURE__ */ J("li", { children: "PikPak 按当前 CloudDrive 提供的接入方式配置;使用 WebDAV 时,先确认服务端允许直链。不能直接套用 115 的连接方式。" }),+ /* @__PURE__ */ J("li", { children: "看视频时暂停批量抽帧,关闭不用的播放页。下载速度应高于视频码率除以 8,并留出余量:80 Mbps 视频约需 10 MB/s,建议稳定达到 15 MB/s。" }),+ /* @__PURE__ */ J("li", { children: "Buffer Cache 的内存占用、磁盘缓存和文件夹缓存是不同设置。磁盘显示的逻辑大小也不等于实际占盘;只改一个上限不能限制所有缓存。" })+ ]+ }),+ /* @__PURE__ */ J("p", {+ class: "confighelp",+ children: ["上表容量和并发是起步建议,按实际占盘与播放结果调整。直链和代理是不同设置;连接慢时分别比较,不能只看开关是否开启。", /* @__PURE__ */ J("a", {++ class: "externallink",+ href: "https://www.clouddrive2.com/features.html",+ target: "_blank",+ rel: "noreferrer",+ children: ["缓存说明", /* @__PURE__ */ J("svg", {- "aria-hidden": "true",++ class: "externalmark",+ viewBox: "0 0 24 24",++ "aria-hidden": "true",+ children: /* @__PURE__ */ J("use", { href: "#i-external-link" })+ })]+ })]+ })+ ] })]+ });+ }+ //#endregion//#region src/islands/configuration.tsx- var st = "/api/configuration", ct = "/api/pick-folder", lt = 8e3, ut = (e, t) => z(st, t), Y = ({ html: e, class: t }) => /* @__PURE__ */ J("div", {-var ut = "/api/configuration", dt = "/api/pick-folder", ft = 8e3, pt = (e, t) => z(ut, t), mt = ({ html: e, class: t }) => /* @__PURE__ */ J("div", {++var dt = "/api/configuration", ft = "/api/pick-folder", pt = 8e3, mt = (e, t) => z(dt, t), ht = ({ html: e, class: t }) => /* @__PURE__ */ J("div", {class: t,dangerouslySetInnerHTML: { __html: e }- }), dt = (e) => !(e instanceof Oe) || e.status !== 400 ? null : e.body?.errors ?? null;- function ft({ facts: e }) {-}), ht = (e) => !(e instanceof ke) || e.status !== 400 ? null : e.body?.errors ?? null;-function gt({ facts: e }) {++}), gt = (e) => !(e instanceof Ae) || e.status !== 400 ? null : e.body?.errors ?? null;++function _t({ facts: e }) {return /* @__PURE__ */ J("section", {class: "configfieldset","data-geist-fieldset": !0,"aria-labelledby": "configFactsTitle",children: /* @__PURE__ */ J("div", {class: "geist-fieldset-content",- children: [/* @__PURE__ */ J(Y, { html: i("configFactsTitle", "运行信息") }), /* @__PURE__ */ J("dl", {- children: [/* @__PURE__ */ J(mt, { html: u("configFactsTitle", "运行信息") }), /* @__PURE__ */ J("dl", {++ children: [/* @__PURE__ */ J(ht, { html: d("configFactsTitle", "运行信息") }), /* @__PURE__ */ J("dl", {class: "configfacts",children: e.map((e) => /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J("dt", { children: e.term }), /* @__PURE__ */ J("dd", { children: [e.value, e.download_url ? /* @__PURE__ */ J("span", {class: "confighelp",@@@ -1081,34 -1194,34 +1205,34 @@@})});}- function pt({ data: t }) {- let [n, r] = W(t.media_sources), [a, o] = W(""), s = q(null);- G(() => () => s.current?.abort(), []);- let c = async (e) => {- if (s.current) return;-function _t({ data: e }) {++function vt({ data: e }) {+ let [t, n] = W(e.media_sources), [r, i] = W(""), a = q(null);+ G(() => () => a.current?.abort(), []);- let s = async (e) => {++ let o = async (e) => {+ if (a.current) return;let t = new AbortController();- s.current = t, u(e, !0), o("");- a.current = t, _(e, !0), i("");++ a.current = t, v(e, !0), i("");try {- let e = await z(st, t.signal);- t.signal.aborted || r(e.media_sources);- let e = await z(ut, t.signal);++ let e = await z(dt, t.signal);+ t.signal.aborted || n(e.media_sources);} catch (e) {- t.signal.aborted || o(R(e));+ t.signal.aborted || i(R(e));} finally {- s.current = null, u(e, !1);- a.current = null, _(e, !1);++ a.current = null, v(e, !1);}};- return n ? /* @__PURE__ */ J("section", {+ return t ? /* @__PURE__ */ J("section", {class: "configfieldset","aria-labelledby": "configMountsTitle",children: [/* @__PURE__ */ J("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ J(Y, { html: i("configMountsTitle", "挂载状态") }),- /* @__PURE__ */ J(mt, { html: u("configMountsTitle", "挂载状态") }),++ /* @__PURE__ */ J(ht, { html: d("configMountsTitle", "挂载状态") }),/* @__PURE__ */ J("dl", {class: "configfacts",- children: n.map((t) => /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J("dt", { children: [/* @__PURE__ */ J("span", {+ children: t.map((e) => /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J("dt", { children: [/* @__PURE__ */ J("span", {"aria-hidden": "true",- dangerouslySetInnerHTML: { __html: l(e[t.location]) }- dangerouslySetInnerHTML: { __html: g(o[e.location]) }++ dangerouslySetInnerHTML: { __html: _(s[e.location]) }}), {local: "本地磁盘",115: "CloudDrive · 115",@@@ -1134,73 -1247,73 +1258,73 @@@children: /* @__PURE__ */ J("button", {type: "button",class: "geist-button",- onClick: (e) => c(e.currentTarget),- onClick: (e) => s(e.currentTarget),++ onClick: (e) => o(e.currentTarget),children: "刷新挂载状态"})})]}) : null;}- function mt({ value: t, label: n, onChange: r }) {- let i = q(null), a = q(null), o = q(r);- return o.current = r, K(() => {- let r = i.current;- r.innerHTML = c([-function vt({ value: e, label: t, onChange: n }) {++function yt({ value: e, label: t, onChange: n }) {+ let r = q(null), i = q(null), a = q(n);+ return a.current = n, K(() => {+ let n = r.current;- n.innerHTML = h([++ n.innerHTML = g([["local", "本地磁盘"],["115", "CloudDrive · 115"],["pikpak", "CloudDrive · PikPak"]- ].map(([t, n]) => [+ ].map(([e, t]) => [+ e,t,- n,- e[t]- ]), t, { label: n });- 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();- o[e]++ s[e]+ ]), e, { label: t });- let s = y(n.firstElementChild);- i.current = s;- let c = () => a.current(s.value);- return s.addEventListener("change", c), () => {- i.current = null, s.disabled = !0, s.removeEventListener("change", c), n.replaceChildren();++ let o = b(n.firstElementChild);++ i.current = o;++ let c = () => a.current(o.value);++ return o.addEventListener("change", c), () => {++ i.current = null, o.disabled = !0, o.removeEventListener("change", c), n.replaceChildren();};- }, [n]), K(() => {- a.current && (a.current.value = t);- }, [t]), /* @__PURE__ */ J("div", {- ref: i,+ }, [t]), K(() => {+ i.current && (i.current.value = e);+ }, [e]), /* @__PURE__ */ J("div", {+ ref: r,class: "configsourcecontrol"});}- function ht({ data: e, receipt: t }) {-function yt({ data: e, receipt: t }) {++function bt({ data: e, receipt: t }) {let n = e.media_sources?.filter((e) => ["local","115","pikpak"- ].includes(e.location)), [r, a] = W(n?.length ? n.map((e) => e.path) : e.media_dirs.length ? e.media_dirs : [""]), [s, c] = W(n?.map((e) => e.location) ?? []), [l, d] = W(n?.map((e) => e.root) ?? []), [f, p] = W(String(e.port)), [m, h] = W(!1), [g, _] = W([]), [v, y] = W(""), [b, x] = W(""), [S, C] = W(null), [w, T] = W(null), E = q(!1), D = q(e.revision), O = q([]), k = q(null);- ].includes(e.location)), [r, i] = W(n?.length ? n.map((e) => e.path) : e.media_dirs.length ? e.media_dirs : [""]), [a, o] = W(n?.map((e) => e.location) ?? []), [s, c] = W(n?.map((e) => e.root) ?? []), [l, d] = W(String(e.port)), [p, m] = W(!1), [h, g] = W([]), [v, y] = W(""), [b, x] = W(""), [S, C] = W(null), [w, T] = W(null), E = q(!1), D = q(e.revision), O = q([]), k = q(null);++ ].includes(e.location)), [r, i] = W(n?.length ? n.map((e) => e.path) : e.media_dirs.length ? e.media_dirs : [""]), [a, o] = W(n?.map((e) => e.location) ?? []), [s, c] = W(n?.map((e) => e.root) ?? []), [l, u] = W(String(e.port)), [f, m] = W(!1), [h, g] = W([]), [_, y] = W(""), [b, x] = W(""), [S, C] = W(null), [w, T] = W(null), E = q(!1), D = q(e.revision), O = q([]), k = q(null);K(() => {w !== null && (O.current[w]?.focus(), T(null));}, [w]), G(() => {if (!S) return;- let e = setTimeout(() => location.assign(S.url), lt);- let e = setTimeout(() => location.assign(S.url), ft);++ let e = setTimeout(() => location.assign(S.url), pt);return () => clearTimeout(e);}, [S]);let A = (e, t) => {- a((n) => n.map((n, r) => r === e ? t : n));- }, ee = () => {- T(r.length), a((e) => [...e, ""]);- }, j = (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));+ i((n) => n.map((n, r) => r === e ? t : n));- }, ee = () => {++ }, j = () => {+ T(r.length), i((e) => [...e, ""]);- }, j = (e) => {++ }, ee = (e) => {+ o((t) => t.filter((t, n) => n !== e)), c((t) => t.filter((t, n) => n !== e)), i((t) => t.filter((t, n) => n !== e)), g((t) => t.filter((t, n) => n !== e));}, M = (e, t) => {- _((n) => {+ g((n) => {let r = [...n];for (; r.length <= e;) r.push("");return r[e] = t, r;});-- }, N = async (e, t) => {++ }, te = async (e, t) => {if (t.getAttribute("aria-busy") !== "true") {- u(t, !0);- _(t, !0);++ v(t, !0);try {- let { path: t } = await B(ct, { initial: r[e] ?? "" });- let { path: t } = await B(dt, { initial: r[e] ?? "" });++ let { path: t } = await B(ft, { initial: r[e] ?? "" });t && (A(e, t), M(e, ""));} catch (t) {M(e, R(t));} finally {- u(t, !1);- _(t, !1);++ v(t, !1);}}};@@@ -1229,25 -1342,25 +1353,25 @@@"aria-labelledby": "configTitle",onSubmit: async (n) => {if (n.preventDefault(), !E.current) {- E.current = !0, u(k.current, !0), x("");- E.current = !0, _(k.current, !0), x("");++ E.current = !0, v(k.current, !0), x("");try {- let n = await B(st, {- let n = await B(ut, {++ let n = await B(dt, {revision: D.current,media_dirs: r,...e.media_sources ? { media_sources: r.map((e, t) => ({path: e,- location: s[t] || "local",- root: l[t] || ""+ location: a[t] || "local",+ root: s[t] || ""})) } : {},- port: f,- scan_now: m+ port: l,- scan_now: p++ scan_now: f});- D.current = n.revision, _([]), y(""), t("已保存配置"), C(n);+ D.current = n.revision, g([]), y(""), t("已保存配置"), C(n);} catch (e) {- let t = dt(e);- t ? (_(t.media_dirs ?? []), y(t.port ?? "")) : (_([]), y(""), x(R(e)));- let t = ht(e);++ let t = gt(e);+ t ? (g(t.media_dirs ?? []), y(t.port ?? "")) : (g([]), y(""), x(R(e)));} finally {- E.current = !1, u(k.current, !1);- E.current = !1, _(k.current, !1);++ E.current = !1, v(k.current, !1);}}},@@@ -1255,7 -1368,7 +1379,7 @@@children: [/* @__PURE__ */ J("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ J(Y, { html: i("configTitle", "这台电脑") }),- /* @__PURE__ */ J(mt, { html: u("configTitle", "这台电脑") }),++ /* @__PURE__ */ J(ht, { html: d("configTitle", "这台电脑") }),/* @__PURE__ */ J("div", {class: "configfield",children: [@@@ -1290,7 -1403,7 +1414,7 @@@type: "button",class: "geist-button configpick","aria-label": "选择文件夹",-- onClick: (e) => N(n, e.currentTarget),++ onClick: (e) => te(n, e.currentTarget),children: /* @__PURE__ */ J("svg", {viewBox: "0 0 24 24","aria-hidden": "true",@@@ -1301,7 -1414,7 +1425,7 @@@type: "button",class: "geist-button configrm","aria-label": "移除这个文件夹",-- onClick: () => j(n),++ onClick: () => ee(n),children: /* @__PURE__ */ J("svg", {viewBox: "0 0 24 24","aria-hidden": "true",@@@ -1312,12 -1425,12 +1436,12 @@@class: "configsource",children: [/* @__PURE__ */ J("div", {class: "configsourcelabel",- children: ["媒体来源", /* @__PURE__ */ J(mt, {- children: ["媒体来源", /* @__PURE__ */ J(vt, {++ children: ["媒体来源", /* @__PURE__ */ J(yt, {label: `媒体来源 ${n + 1}`,- value: s[n] || "local",+ value: a[n] || "local",onChange: (e) => {- let t = [...s];- t[n] = e, c(t);+ let t = [...a];+ t[n] = e, o(t);}})]}), e.windows === !1 ? /* @__PURE__ */ J("label", { children: ["Windows 中的对应路径", /* @__PURE__ */ J("input", {@@@ -1342,25 -1455,11 +1466,11 @@@/* @__PURE__ */ J("button", {type: "button",class: "geist-button configadd",-- onClick: ee,++ onClick: j,children: "添加文件夹"}),- s.some((e) => e === "115" || e === "pikpak") ? /* @__PURE__ */ J("p", {- class: "confighelp",- children: ["先在 CloudDrive 登录网盘并完成挂载。", /* @__PURE__ */ J("a", {- class: "externallink",- href: "https://www.clouddrive2.com/help.html",- target: "_blank",- rel: "noreferrer",- children: ["挂载帮助", /* @__PURE__ */ J("svg", {- class: "externalmark",- viewBox: "0 0 24 24",- "aria-hidden": "true",- children: /* @__PURE__ */ J("use", { href: "#i-external-link" })- })]- })]- }) : null,- s.some((e) => e === "115" || e === "pikpak") ? e.mount_dependencies?.filter((e) => !e.available).map((e) => /* @__PURE__ */ J("p", {- a.some((e) => e === "115" || e === "pikpak") ? /* @__PURE__ */ J(lt, {}) : null,++ a.some((e) => e === "115" || e === "pikpak") ? /* @__PURE__ */ J(ut, {}) : null,+ a.some((e) => e === "115" || e === "pikpak") ? e.mount_dependencies?.filter((e) => !e.available).map((e) => /* @__PURE__ */ J("p", {class: "confighelp",children: ["未检测到 ",@@@ -1402,14 -1499,14 +1512,14 @@@class: "geist-input",type: "text",inputMode: "numeric",- value: f,- "aria-invalid": v ? "true" : void 0,- onInput: (e) => p(e.currentTarget.value)+ value: l,- "aria-invalid": v ? "true" : void 0,- onInput: (e) => d(e.currentTarget.value)++ "aria-invalid": _ ? "true" : void 0,++ onInput: (e) => u(e.currentTarget.value)}),-- v ? /* @__PURE__ */ J("p", {++ _ ? /* @__PURE__ */ J("p", {class: "configbad",role: "alert",-- children: v++ children: _}) : null,/* @__PURE__ */ J("p", {class: "confighelp",@@@ -1423,8 -1520,8 +1533,8 @@@class: "pcheck",children: [/* @__PURE__ */ J("input", {type: "checkbox",- checked: m,- onChange: (e) => h(e.currentTarget.checked)- checked: p,++ checked: f,+ onChange: (e) => m(e.currentTarget.checked)}), /* @__PURE__ */ J("span", {"aria-hidden": "true",children: /* @__PURE__ */ J("svg", {@@@ -1434,7 -1531,7 +1544,7 @@@})]}), /* @__PURE__ */ J("span", { children: "保存后扫描并补全资料" })]}),- b ? /* @__PURE__ */ J(Y, { html: o(b, {- b ? /* @__PURE__ */ J(mt, { html: f(b, {++ b ? /* @__PURE__ */ J(ht, { html: p(b, {variant: "error",label: "没有保存"}) }) : null@@@ -1451,10 -1548,10 +1561,10 @@@})]});}- function gt({ receipt: e, data: t, error: n }) {- return n || !t ? /* @__PURE__ */ J(Y, {-function bt({ receipt: e, data: t, error: n }) {- return n || !t ? /* @__PURE__ */ J(mt, {++function xt({ receipt: e, data: t, error: n }) {++ return n || !t ? /* @__PURE__ */ J(ht, {class: "configpage",- html: o(n || "没有读到配置", {- html: f(n || "没有读到配置", {++ html: p(n || "没有读到配置", {variant: "error",label: "打不开配置"})@@@ -1465,7 -1562,7 +1575,7 @@@class: "configgroup",children: "通用"}) : null,- t.startup ? /* @__PURE__ */ J(it, {- t.startup ? /* @__PURE__ */ J(at, {++ t.startup ? /* @__PURE__ */ J(ot, {startup: t.startup,receipt: e}) : null,@@@ -1473,23 -1570,23 +1583,23 @@@class: "configgroup",children: "媒体"}),- t.editable ? /* @__PURE__ */ J(ht, {- t.editable ? /* @__PURE__ */ J(yt, {++ t.editable ? /* @__PURE__ */ J(bt, {data: t,receipt: e- }) : /* @__PURE__ */ J(Y, { html: o(t.notice, {- }) : /* @__PURE__ */ J(mt, { html: f(t.notice, {++ }) : /* @__PURE__ */ J(ht, { html: p(t.notice, {variant: "secondary",label: "只读"}) }),- /* @__PURE__ */ J(pt, { data: t }),- /* @__PURE__ */ J(_t, { data: t }),++ /* @__PURE__ */ J(vt, { data: t }),t.peach_proxy || t.access ? /* @__PURE__ */ J("h2", {class: "configgroup",children: "网络与访问"}) : null,- t.peach_proxy ? /* @__PURE__ */ J(tt, {- t.peach_proxy ? /* @__PURE__ */ J(nt, {++ t.peach_proxy ? /* @__PURE__ */ J(rt, {initial: t.peach_proxy,receipt: e}) : null,- t.access ? /* @__PURE__ */ J(Qe, {- t.access ? /* @__PURE__ */ J($e, {++ t.access ? /* @__PURE__ */ J(et, {initial: t.access,receipt: e}) : null,@@@ -1497,34 -1594,34 +1607,34 @@@class: "configgroup",children: "更新与维护"}),- t.updates ? /* @__PURE__ */ J(et, {- t.updates ? /* @__PURE__ */ J(tt, {++ t.updates ? /* @__PURE__ */ J(nt, {initial: t.updates,initialJob: t.update_job}) : null,- /* @__PURE__ */ J(ft, { facts: t.facts }),- t.uninstall ? /* @__PURE__ */ J(ot, { uninstall: t.uninstall }) : null- /* @__PURE__ */ J(gt, { facts: t.facts }),- t.uninstall ? /* @__PURE__ */ J(st, { uninstall: t.uninstall }) : null++ /* @__PURE__ */ J(_t, { facts: t.facts }),++ t.uninstall ? /* @__PURE__ */ J(ct, { uninstall: t.uninstall }) : null]});}//#endregion//#region node_modules/@preact/signals-core/dist/signals-core.module.js- var _t = Symbol.for("preact-signals");- function vt() {- if (Z > 1) Z--;-var xt = Symbol.for("preact-signals");-function St() {++var St = Symbol.for("preact-signals");++function Ct() {+ if (X > 1) X--;else {var e, t = !1;for ((function() {- var e = Et;- for (Et = void 0; e !== void 0;) {- var e = At;- for (At = void 0; e !== void 0;) {++ var e = jt;++ for (jt = 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;}- })(); St !== void 0;) {- var n = St;- for (St = void 0, Ct++; n !== void 0;) {- })(); Et !== void 0;) {- var n = Et;- for (Et = void 0, Dt++; n !== void 0;) {++ })(); Dt !== void 0;) {++ var n = Dt;++ for (Dt = void 0, Ot++; n !== void 0;) {var r = n.u;- if (n.u = void 0, n.f &= -3, !(8 & n.f) && At(n)) try {- if (n.u = void 0, n.f &= -3, !(8 & n.f) && Pt(n)) try {++ if (n.u = void 0, n.f &= -3, !(8 & n.f) && Ft(n)) try {n.c();} catch (n) {t ||= (e = n, !0);@@@ -1532,53 -1629,53 +1642,53 @@@n = r;}}- if (Ct = 0, Z--, t) throw e;- if (Dt = 0, X--, t) throw e;++ if (Ot = 0, X--, t) throw e;}}- function yt(e) {- if (Z > 0) return e();- Tt = ++wt, Z++;-function Ct(e) {++function wt(e) {+ if (X > 0) return e();- kt = ++Ot, X++;++ At = ++kt, X++;try {return e();} finally {- vt();- St();++ Ct();}}- var bt, X = void 0;- function xt(e) {- var t = X, n = bt;- X = void 0, bt = void 0;-var wt, Y = void 0;-function Tt(e) {- var t = Y, n = wt;- Y = void 0, wt = void 0;++var Tt, Y = void 0;++function Et(e) {++ var t = Y, n = Tt;++ Y = void 0, Tt = void 0;try {return e();} finally {- X = t, bt = n;- Y = t, wt = n;++ Y = t, Tt = n;}}- var St = void 0, Z = 0, Ct = 0, wt = 0, Tt = 0, Et = void 0, Dt = 0;- function Ot(e) {- if (X !== void 0) {-var Et = void 0, X = 0, Dt = 0, Ot = 0, kt = 0, At = void 0, jt = 0;-function Mt(e) {++var Dt = void 0, X = 0, Ot = 0, kt = 0, At = 0, jt = void 0, Mt = 0;++function Nt(e) {+ if (Y !== void 0) {var t = e.n;- if (t === void 0 || t.t !== X) return t = {+ if (t === void 0 || t.t !== Y) return t = {i: 0,S: e,- p: X.s,+ p: Y.s,n: void 0,- t: X,+ t: Y,e: void 0,x: void 0,r: t- }, X.s !== void 0 && (X.s.n = t), X.s = t, e.n = t, 32 & X.f && e.S(t), t;- if (t.i === -1) return t.i = 0, t.n !== void 0 && (t.n.p = t.p, t.p !== void 0 && (t.p.n = t.n), t.p = X.s, t.n = void 0, X.s.n = t, X.s = t), t;+ }, Y.s !== void 0 && (Y.s.n = t), Y.s = t, e.n = t, 32 & Y.f && e.S(t), t;+ if (t.i === -1) return t.i = 0, t.n !== void 0 && (t.n.p = t.p, t.p !== void 0 && (t.p.n = t.n), t.p = Y.s, t.n = void 0, Y.s.n = t, Y.s = t), t;}}- function Q(e, t) {+ function Z(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;}- Q.prototype.brand = _t, Q.prototype.h = function() {-Z.prototype.brand = xt, Z.prototype.h = function() {++Z.prototype.brand = St, Z.prototype.h = function() {return !0;- }, Q.prototype.S = function(e) {+ }, Z.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 ? xt(function() {- n !== e && e.e === void 0 && (e.x = n, this.t = e, n === void 0 ? Tt(function() {++ n !== e && e.e === void 0 && (e.x = n, this.t = e, n === void 0 ? Et(function() {var e;(e = t.W) == null || e.call(t);}) : n.e = e);@@@ -1586,62 -1683,62 +1696,62 @@@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 && xt(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 && Tt(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 && Et(function() {var e;(e = t.Z) == null || e.call(t);}));}- }, Q.prototype.subscribe = function(e) {+ }, Z.prototype.subscribe = function(e) {var t = this;- return Rt(function() {- return Ht(function() {++ return Ut(function() {var n = t.value;- xt(function() {- Tt(function() {++ Et(function() {return e(n);});}, { name: "sub" });- }, Q.prototype.valueOf = function() {+ }, Z.prototype.valueOf = function() {return this.value;- }, Q.prototype.toString = function() {+ }, Z.prototype.toString = function() {return this.value + "";- }, Q.prototype.toJSON = function() {+ }, Z.prototype.toJSON = function() {return this.value;- }, Q.prototype.peek = function() {+ }, Z.prototype.peek = function() {var e = this;- return xt(function() {- return Tt(function() {++ return Et(function() {return e.value;});- }, Object.defineProperty(Q.prototype, "value", {+ }, Object.defineProperty(Z.prototype, "value", {get: function() {- var e = Ot(this);- var e = Mt(this);++ var e = Nt(this);return e !== void 0 && (e.i = this.i), this.v;},set: function(e) {if (e !== this.v) {- if (Ct > 100) throw Error("Cycle detected");- if (Dt > 100) throw Error("Cycle detected");++ if (Ot > 100) throw Error("Cycle detected");(function(e) {- Z !== 0 && Ct === 0 && e.l !== Tt && (e.l = Tt, Et = {- X !== 0 && Dt === 0 && e.l !== kt && (e.l = kt, At = {++ X !== 0 && Ot === 0 && e.l !== At && (e.l = At, jt = {S: e,v: e.v,i: e.i,- o: Et- o: At++ o: jt});- })(this), this.v = e, this.i++, Dt++, Z++;- })(this), this.v = e, this.i++, jt++, X++;++ })(this), this.v = e, this.i++, Mt++, X++;try {for (var t = this.t; t !== void 0; t = t.x) t.t.N();} finally {- vt();- St();++ Ct();}}}});- function kt(e, t) {- return new Q(e, t);-function Nt(e, t) {++function Pt(e, t) {+ return new Z(e, t);}- function At(e) {-function Pt(e) {++function Ft(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 jt(e) {-function Ft(e) {++function It(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) {@@@ -1650,30 -1747,30 +1760,30 @@@}}}- function Mt(e) {-function It(e) {++function Lt(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 $(e, t) {- Q.call(this, void 0, t), this.x = e, this.s = void 0, this.g = Dt - 1, this.f = 4;+ function Q(e, t) {- Z.call(this, void 0, t), this.x = e, this.s = void 0, this.g = jt - 1, this.f = 4;++ Z.call(this, void 0, t), this.x = e, this.s = void 0, this.g = Mt - 1, this.f = 4;}- $.prototype = new Q(), $.prototype.h = function() {+ Q.prototype = new Z(), Q.prototype.h = function() {if (this.f &= -3, 1 & this.f) return !1;- if ((36 & this.f) == 32 || (this.f &= -5, this.g === Dt)) return !0;- if (this.g = Dt, this.f |= 1, this.i > 0 && !At(this)) return this.f &= -2, !0;- var e = X;- if ((36 & this.f) == 32 || (this.f &= -5, this.g === jt)) return !0;- if (this.g = jt, this.f |= 1, this.i > 0 && !Pt(this)) return this.f &= -2, !0;++ if ((36 & this.f) == 32 || (this.f &= -5, this.g === Mt)) return !0;++ if (this.g = Mt, this.f |= 1, this.i > 0 && !Ft(this)) return this.f &= -2, !0;+ var e = Y;try {- jt(this), X = this;- Ft(this), Y = this;++ It(this), Y = 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 X = e, Mt(this), this.f &= -2, !0;- }, $.prototype.S = function(e) {- return Y = e, It(this), this.f &= -2, !0;++ return Y = e, Lt(this), this.f &= -2, !0;+ }, Q.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);@@@ -1689,42 -1786,42 +1799,42 @@@this.f |= 6;for (var e = this.t; e !== void 0; e = e.x) e.t.N();}- }, Object.defineProperty($.prototype, "value", { get: function() {+ }, Object.defineProperty(Q.prototype, "value", { get: function() {if (1 & this.f) throw Error("Cycle detected");- var e = Ot(this);- var e = Mt(this);++ var e = Nt(this);if (this.h(), e !== void 0 && (e.i = this.i), 16 & this.f) throw this.v;return this.v;} });- function Nt(e, t) {- return new $(e, t);-function Lt(e, t) {++function Rt(e, t) {+ return new Q(e, t);}- function Pt(e) {-function Rt(e) {++function zt(e) {var t = e.m;if (e.m = void 0, typeof t == "function") {- Z++;- var n = X;- X = void 0;+ X++;+ var n = Y;+ Y = void 0;try {t();} catch (t) {- throw e.f &= -2, e.f |= 8, Ft(e), t;- throw e.f &= -2, e.f |= 8, zt(e), t;++ throw e.f &= -2, e.f |= 8, Bt(e), t;} finally {- X = n, vt();- Y = n, St();++ Y = n, Ct();}}}- function Ft(e) {-function zt(e) {++function Bt(e) {for (var t = e.s; t !== void 0; t = t.n) t.S.U(t);- e.x = void 0, e.s = void 0, Pt(e);- e.x = void 0, e.s = void 0, Rt(e);++ e.x = void 0, e.s = void 0, zt(e);}- function It(e) {- if (X !== this) throw Error("Out-of-order effect");- Mt(this), X = e, this.f &= -2, 8 & this.f && Ft(this), vt();-function Bt(e) {++function Vt(e) {+ if (Y !== this) throw Error("Out-of-order effect");- It(this), Y = e, this.f &= -2, 8 & this.f && zt(this), St();++ Lt(this), Y = e, this.f &= -2, 8 & this.f && Bt(this), Ct();}- function Lt(e, t) {- this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, bt && bt.push(this);-function Vt(e, t) {- this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, wt && wt.push(this);++function Ht(e, t) {++ this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, Tt && Tt.push(this);}- Lt.prototype.c = function() {-Vt.prototype.c = function() {++Ht.prototype.c = function() {var e = this.S();try {if (8 & this.f || this.x === void 0) return;@@@ -1733,20 -1830,20 +1843,20 @@@} finally {e();}- }, Lt.prototype.S = function() {-}, Vt.prototype.S = function() {++}, Ht.prototype.S = function() {if (1 & this.f) throw Error("Cycle detected");- this.f |= 1, this.f &= -9, Pt(this), jt(this), Z++;- var e = X;- return X = this, It.bind(this, e);- }, Lt.prototype.N = function() {- 2 & this.f || (this.f |= 2, this.u = St, St = this);- }, Lt.prototype.d = function() {- this.f |= 8, 1 & this.f || Ft(this);- }, Lt.prototype.dispose = function() {- this.f |= 1, this.f &= -9, Rt(this), Ft(this), X++;++ this.f |= 1, this.f &= -9, zt(this), It(this), X++;+ var e = Y;- return Y = this, Bt.bind(this, e);-}, Vt.prototype.N = function() {- 2 & this.f || (this.f |= 2, this.u = Et, Et = this);-}, Vt.prototype.d = function() {- this.f |= 8, 1 & this.f || zt(this);-}, Vt.prototype.dispose = function() {++ return Y = this, Vt.bind(this, e);++}, Ht.prototype.N = function() {++ 2 & this.f || (this.f |= 2, this.u = Dt, Dt = this);++}, Ht.prototype.d = function() {++ this.f |= 8, 1 & this.f || Bt(this);++}, Ht.prototype.dispose = function() {this.d();};- function Rt(e, t) {- var n = new Lt(e, t);-function Ht(e, t) {- var n = new Vt(e, t);++function Ut(e, t) {++ var n = new Ht(e, t);try {n.c();} catch (e) {@@@ -1757,35 -1854,35 +1867,35 @@@}//#endregion//#region node_modules/@preact/signals/dist/signals.module.js- var zt, Bt, Vt = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, Ht = [];- Rt(function() {- zt = this.N;-var Ut, Wt, Gt = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, Kt = [];-Ht(function() {- Ut = this.N;++var Wt, Gt, Kt = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, qt = [];++Ut(function() {++ Wt = this.N;})();- function Ut(e, t) {- b[e] = t.bind(null, b[e] || function() {});-function qt(e, t) {- x[e] = t.bind(null, x[e] || function() {});++function Jt(e, t) {++ S[e] = t.bind(null, S[e] || function() {});}- function Wt(e) {- if (Bt) {- var t = Bt;- Bt = void 0, t();-function Jt(e) {- if (Wt) {- var t = Wt;- Wt = void 0, t();++function Yt(e) {++ if (Gt) {++ var t = Gt;++ Gt = void 0, t();}- Bt = e && e.S();- Wt = e && e.S();++ Gt = e && e.S();}- function Gt(e) {- var t = this, n = e.data, r = qt(n);-function Yt(e) {- var t = this, n = e.data, r = Zt(n);++function Xt(e) {++ var t = this, n = e.data, r = Qt(n);r.name = "ReactiveDom", r.value = n;- var i = He(function() {- var i = Ue(function() {++ var i = We(function() {for (var e = t, n = t.__v; n = n.__;) if (n.__c) {n.__c.__$f |= 4;break;}- var i = Nt(function() {- var i = Lt(function() {++ var i = Rt(function() {var e = r.value.value;return e === 0 ? 0 : !0 === e ? "" : e || "";- }), a = Nt(function() {- return !Array.isArray(i.value) && !S(i.value);- }), o = Rt(function() {- if (this.N = Xt, a.value) {- }), a = Lt(function() {- return !Array.isArray(i.value) && !C(i.value);- }), o = Ht(function() {- if (this.N = en, a.value) {++ }), a = Rt(function() {++ return !Array.isArray(i.value) && !w(i.value);++ }), o = Ut(function() {++ if (this.N = tn, a.value) {var t = i.value;e.__v && e.__v.__e && e.__v.__e.nodeType === 3 && (e.__v.__e.data = t);}@@@ -1796,14 -1893,14 +1906,14 @@@}, []), a = i[0], o = i[1];return a.value ? o.peek() : o.value;}- Gt.displayName = "ReactiveTextNode", Object.defineProperties(Q.prototype, {-Yt.displayName = "ReactiveTextNode", Object.defineProperties(Z.prototype, {++Xt.displayName = "ReactiveTextNode", Object.defineProperties(Z.prototype, {constructor: {configurable: !0,value: void 0},type: {configurable: !0,- value: Gt- value: Yt++ value: Xt},props: {configurable: !0,@@@ -1818,7 -1915,7 +1928,7 @@@configurable: !0,value: 1}- }), Ut("__b", function(e, t) {-}), qt("__b", function(e, t) {++}), Jt("__b", function(e, t) {if (typeof t.type == "string") {var n, r = t.props;for (var i in r) if (i !== "children") {@@@ -1827,26 -1924,26 +1937,26 @@@}}e(t);- }), Ut("__r", function(e, t) {-}), qt("__r", function(e, t) {++}), Jt("__r", function(e, t) {if (e(t), t.type !== I) {- Wt();- Jt();++ Yt();var n, r = t.__c;r && (r.__$f &= -2, (n = r.__$u) === void 0 && (r.__$u = n = function(e, t) {var n;- return Rt(function() {- return Ht(function() {++ return Ut(function() {n = this;}, { name: t }), n.c = e, n;}(function(e) {return function() {var t;- Vt && ((t = this.y) == null || t.call(this)), e.__$f |= 1, e.setState({});- Gt && ((t = this.y) == null || t.call(this)), e.__$f |= 1, e.setState({});++ Kt && ((t = this.y) == null || t.call(this)), e.__$f |= 1, e.setState({});};- }(r), typeof t.type == "function" ? t.type.displayName || t.type.name : ""))), Wt(n);- }(r), typeof t.type == "function" ? t.type.displayName || t.type.name : ""))), Jt(n);++ }(r), typeof t.type == "function" ? t.type.displayName || t.type.name : ""))), Yt(n);}- }), Ut("__e", function(e, t, n, r) {- Wt(), e(t, n, r);- }), Ut("diffed", function(e, t) {- Wt();-}), qt("__e", function(e, t, n, r) {- Jt(), e(t, n, r);-}), qt("diffed", function(e, t) {- Jt();++}), Jt("__e", function(e, t, n, r) {++ Yt(), e(t, n, r);++}), Jt("diffed", function(e, t) {++ Yt();var n;if (typeof t.type == "string" && (n = t.__e)) {var r = t.__np, i = t.props, a = n.U;@@@ -1856,25 -1953,25 +1966,25 @@@}if (r) for (var c in a || (a = {}, n.U = a), r) {var l = a[c], u = r[c];- l === void 0 ? (l = Kt(n, c, u, i), a[c] = l) : l.o(u, i);- l === void 0 ? (l = Xt(n, c, u, i), a[c] = l) : l.o(u, i);++ l === void 0 ? (l = Zt(n, c, u, i), a[c] = l) : l.o(u, i);}}e(t);});- function Kt(e, t, n, r) {- var i = t in e && e.ownerSVGElement === void 0, a = kt(n);-function Xt(e, t, n, r) {- var i = t in e && e.ownerSVGElement === void 0, a = Nt(n);++function Zt(e, t, n, r) {++ var i = t in e && e.ownerSVGElement === void 0, a = Pt(n);return {o: function(e, t) {a.value = e, r = t;},- d: Rt(function() {- this.N = Xt;- d: Ht(function() {- this.N = en;++ d: Ut(function() {++ this.N = tn;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));})};}- Ut("unmount", function(e, t) {-qt("unmount", function(e, t) {++Jt("unmount", function(e, t) {if (typeof t.type == "string") {var n = t.__e;if (n) {@@@ -1898,9 -1995,9 +2008,9 @@@}}e(t);- }), Ut("__h", function(e, t, n, r) {-}), qt("__h", function(e, t, n, r) {++}), Jt("__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) {++}), ce.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;@@@ -1912,44 -2009,44 +2022,44 @@@for (var s in this.props) if (!(s in e)) return !0;return !1;};- function qt(e, t) {- return He(function() {- return kt(e, t);-function Zt(e, t) {- return Ue(function() {- return Nt(e, t);++function Qt(e, t) {++ return We(function() {++ return Pt(e, t);}, []);}- var Jt = function(e) {-var Qt = function(e) {++var $t = function(e) {queueMicrotask(function() {queueMicrotask(e);});};- function Yt() {- yt(function() {- for (var e; e = Ht.shift();) zt.call(e);-function $t() {- Ct(function() {- for (var e; e = Kt.shift();) Ut.call(e);++function en() {++ wt(function() {++ for (var e; e = qt.shift();) Wt.call(e);});}- function Xt() {- Ht.push(this) === 1 && (b.requestAnimationFrame || Jt)(Yt);-function en() {- Kt.push(this) === 1 && (x.requestAnimationFrame || Qt)($t);++function tn() {++ qt.push(this) === 1 && (S.requestAnimationFrame || $t)(en);}//#endregion//#region src/state/quality-goals.ts- var Zt = "/api/quality-goals?limit=200", Qt = {-var tn = "/api/quality-goals?limit=200", nn = {++var nn = "/api/quality-goals?limit=200", rn = {data: null,error: ""- }, $t = kt(Qt), en = 0, tn = Nt(() => $t.value);- Nt(() => $t.value.data?.total ?? null);- function nn() {- en += 1, $t.value = Qt;-}, rn = Nt(nn), an = 0, on = Lt(() => rn.value);-Lt(() => rn.value.data?.total ?? null);-function sn() {- an += 1, rn.value = nn;++}, an = Pt(rn), on = 0, sn = Rt(() => an.value);++Rt(() => an.value.data?.total ?? null);++function cn() {++ on += 1, an.value = rn;}- async function rn(e) {- let t = en += 1;-async function cn(e) {- let t = an += 1;++async function ln(e) {++ let t = on += 1;try {- let n = await z(Zt, e);- return t === en && ($t.value = {- let n = await z(tn, e);- return t === an && (rn.value = {++ let n = await z(nn, e);++ return t === on && (an.value = {data: n,error: ""}), n;} catch (n) {- throw !e?.aborted && t === en && ($t.value = {- throw !e?.aborted && t === an && (rn.value = {++ throw !e?.aborted && t === on && (an.value = {data: null,error: R(n)}), n;@@@ -1957,28 -2054,28 +2067,28 @@@}//#endregion//#region src/islands/quality-goals.tsx- var an = (e, t) => rn(t), on = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;- function sn({ openItem: e, javTitleHtml: t, javDisplayName: n, srcBadge: i }) {- let { data: a, error: s } = tn.value;- if (s) return /* @__PURE__ */ J("div", {-var ln = (e, t) => cn(t), un = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;-function dn({ openItem: t, javTitleHtml: i, javDisplayName: a, srcBadge: o }) {- let { data: s, error: c } = on.value;++var un = (e, t) => ln(t), dn = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;++function fn({ openItem: t, javTitleHtml: n, javDisplayName: a, srcBadge: o }) {++ let { data: s, error: c } = sn.value;+ if (c) return /* @__PURE__ */ J("div", {class: "qualitylist",- dangerouslySetInnerHTML: { __html: o(s, {- dangerouslySetInnerHTML: { __html: f(c, {++ dangerouslySetInnerHTML: { __html: p(c, {variant: "error",label: "读取失败"}) }});- let c = a?.items ?? [];- return c.length ? /* @__PURE__ */ J("div", {- let u = s?.items ?? [];- return u.length ? /* @__PURE__ */ J("div", {++ let l = s?.items ?? [];++ return l.length ? /* @__PURE__ */ J("div", {class: "qualitylist",- children: c.map((r) => /* @__PURE__ */ J("article", {- children: u.map((s) => /* @__PURE__ */ J("article", {++ children: l.map((s) => /* @__PURE__ */ J("article", {class: "qualityitem",children: [/* @__PURE__ */ J("button", {class: "qualitycover",type: "button",- "aria-label": `打开 ${n(r)}`,- onClick: () => e(r.id),+ "aria-label": `打开 ${a(s)}`,+ onClick: () => t(s.id),children: /* @__PURE__ */ J("img", {- src: on(r),- src: un(s),++ src: dn(s),alt: "",loading: "lazy",onError: (e) => e.currentTarget.remove()@@@ -1987,32 -2084,32 +2097,32 @@@/* @__PURE__ */ J("h3", { children: /* @__PURE__ */ J("button", {type: "button","data-middle-truncate": !0,- onClick: () => e(r.id),- dangerouslySetInnerHTML: { __html: t(r) }+ onClick: () => t(s.id),- dangerouslySetInnerHTML: { __html: i(s) }++ dangerouslySetInnerHTML: { __html: n(s) }}) }),/* @__PURE__ */ J("p", {class: "mono",children: [/* @__PURE__ */ J("span", {style: "display:contents",- dangerouslySetInnerHTML: { __html: i(r.location, r.cost) }+ dangerouslySetInnerHTML: { __html: o(s.location, s.cost) }}),- /* @__PURE__ */ J("span", { children: p[r.location] ?? r.location }),- /* @__PURE__ */ J("span", { children: g(r.duration) }),- /* @__PURE__ */ J("span", { children: _(r.size ?? 0) })+ /* @__PURE__ */ J("span", { children: e[s.location] ?? s.location }),- /* @__PURE__ */ J("span", { children: n(s.duration) }),- /* @__PURE__ */ J("span", { children: r(s.size ?? 0) })++ /* @__PURE__ */ J("span", { children: r(s.duration) }),++ /* @__PURE__ */ J("span", { children: i(s.size ?? 0) })]}),- r.reason ? /* @__PURE__ */ J("p", { children: r.reason }) : null+ s.reason ? /* @__PURE__ */ J("p", { children: s.reason }) : null] })]- }, r.id))+ }, s.id))}) : /* @__PURE__ */ J("div", {class: "qualitylist",- dangerouslySetInnerHTML: { __html: r("sparkles", "没有标记中的高清版目标", "现有版本都已满足条件,或还没有加入追踪。") }- dangerouslySetInnerHTML: { __html: l("sparkles", "没有标记中的高清版目标", "现有版本都已满足条件,或还没有加入追踪。") }++ dangerouslySetInnerHTML: { __html: u("sparkles", "没有标记中的高清版目标", "现有版本都已满足条件,或还没有加入追踪。") }});}//#endregion//#region src/jobs.ts- async function cn(e) {-async function fn(e) {++async function pn(e) {let t = e.pause || ((e) => new Promise((t) => setTimeout(t, e))), n = 0;for (; e.active();) {let r;@@@ -2027,11 -2124,11 +2137,11 @@@await t(2e3);}}- function ln(e) {-function pn(e) {++function mn(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;- cn({- fn({++ pn({read: e.read,active: () => !i && e.active() && t.isConnected,keepWatching: e.watchIdle !== !1,@@@ -2057,13 -2154,13 +2167,13 @@@}//#endregion//#region src/islands/scraping.tsx- var un = (e, t) => z("/api/scraping", t);- function dn({ value: e, onChange: t }) {-var mn = (e, t) => z("/api/scraping", t);-function hn({ value: e, onChange: t }) {++var hn = (e, t) => z("/api/scraping", t);++function gn({ value: e, onChange: t }) {let n = q(null), r = q(t);return r.current = t, K(() => {let t = n.current;- t.innerHTML = c([["peach", "Peach 代理"], ["direct", "直接连接"]], e, { label: "连接方式" });- let i = f(t.firstElementChild), a = () => r.current(i.value);- t.innerHTML = h([["peach", "Peach 代理"], ["direct", "直接连接"]], e, { label: "连接方式" });- let i = y(t.firstElementChild), a = () => r.current(i.value);++ t.innerHTML = g([["peach", "Peach 代理"], ["direct", "直接连接"]], e, { label: "连接方式" });++ let i = b(t.firstElementChild), a = () => r.current(i.value);return i.addEventListener("change", a), () => {i.disabled = !0, i.removeEventListener("change", a), t.replaceChildren();};@@@ -2072,34 -2169,34 +2182,34 @@@class: "scraping-network"});}- function fn({ source: e, toast: t }) {- let [n, r] = W(e), [a, s] = W(e.network), [c, l] = W(""), [d, f] = W(""), [p, m] = W("paste"), [g, _] = W(""), [v, y] = W(!1), [b, x] = W(""), [S, C] = W([]), w = q(null), T = q(null);-function gn({ source: e, toast: t }) {- let [n, r] = W(e), [i, a] = W(e.network), [o, s] = W(""), [c, l] = W(""), [d, p] = W("paste"), [m, h] = W(""), [g, v] = W(!1), [y, b] = W(""), [x, S] = W([]), C = q(null), w = q(null);++function _n({ source: e, toast: t }) {++ let [r, i] = W(e), [a, o] = W(e.network), [s, c] = W(""), [l, u] = W(""), [f, m] = W("paste"), [h, g] = W(""), [_, y] = W(!1), [b, x] = W(""), [S, C] = W([]), w = q(null), T = q(null);K(() => {- T.current?.querySelectorAll("footer button").forEach((e) => u(e, v));- }, [v]);- w.current?.querySelectorAll("footer button").forEach((e) => _(e, g));- }, [g]);- let T = q(new AbortController());- G(() => () => T.current.abort(), []);- async function E(n) {- if (!g) {- v(!0), b(""), S([]);++ T.current?.querySelectorAll("footer button").forEach((e) => v(e, _));++ }, [_]);+ let E = q(new AbortController());+ G(() => () => E.current.abort(), []);+ async function D(n) {- if (!v) {++ if (!_) {+ y(!0), x(""), C([]);try {if (n === "check") {- let t = await B("/api/scraping/check", { source: e.source }, "POST", T.current.signal);- T.current.signal.aborted || S(t.results);+ let t = await B("/api/scraping/check", { source: e.source }, "POST", E.current.signal);+ E.current.signal.aborted || C(t.results);} else {- let i = await B("/api/scraping/settings", {- let a = await B("/api/scraping/settings", {++ let r = await B("/api/scraping/settings", {source: e.source,- network: i,- cookie: o,- cookies_text: c,+ network: a,- cookie: c,- cookies_text: d,++ cookie: s,++ cookies_text: l,revoke: n === "revoke"- }, "POST", T.current.signal);- T.current.signal.aborted || (r(a.saved), s(""), l(""), h(""), C.current && (C.current.value = ""), t(n === "revoke" ? "Cookie 已撤销" : "来源设置已保存"));+ }, "POST", E.current.signal);- E.current.signal.aborted || (r(i.saved), l(""), f(""), _(""), w.current && (w.current.value = ""), t(n === "revoke" ? "Cookie 已撤销" : "来源设置已保存"));++ E.current.signal.aborted || (i(r.saved), c(""), u(""), g(""), w.current && (w.current.value = ""), t(n === "revoke" ? "Cookie 已撤销" : "来源设置已保存"));}} catch (e) {- T.current.signal.aborted || b(R(e));+ E.current.signal.aborted || x(R(e));} finally {- T.current.signal.aborted || v(!1);+ E.current.signal.aborted || y(!1);}}}@@@ -2117,44 -2214,28 +2227,44 @@@children: [/* @__PURE__ */ J("div", {class: "geist-fieldset-heading",- children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: i(`scraping-${e.source}`, e.label) } }), /* @__PURE__ */ J("a", {- children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: u(`scraping-${e.source}`, e.label) } }), /* @__PURE__ */ J("a", {- class: "scraping-url",++ children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d(`scraping-${e.source}`, e.label) } }), /* @__PURE__ */ J("a", {+ class: "scraping-url externallink",href: e.login,target: "_blank",rel: "noopener noreferrer",- children: e.login+ children: [+ /* @__PURE__ */ J("img", {- src: h(e.login),++ src: n(e.login),+ alt: "",+ width: "16",+ height: "16",+ loading: "lazy",+ onError: (e) => e.currentTarget.remove()+ }),+ /* @__PURE__ */ J("span", { children: e.login }),+ /* @__PURE__ */ J("svg", {+ class: "externalmark",+ viewBox: "0 0 24 24",+ "aria-hidden": "true",+ children: /* @__PURE__ */ J("use", { href: "#i-external-link" })+ })+ ]})]}),/* @__PURE__ */ J("div", {class: "scraping-label",- children: ["连接方式", /* @__PURE__ */ J(dn, {- children: ["连接方式", /* @__PURE__ */ J(hn, {- value: i,- onChange: a++ children: ["连接方式", /* @__PURE__ */ J(gn, {+ value: a,- onChange: s++ onChange: o})]}),- i === "peach" && /* @__PURE__ */ J("a", {+ a === "peach" && /* @__PURE__ */ J("a", {class: "geist-text-link",href: "/configuration#peachProxy",children: "配置 Peach 代理"}),e.accepts_cookie && /* @__PURE__ */ J(I, { children: [-- /* @__PURE__ */ J("p", { children: n.cookie_saved ? "Cookie 已保存,登录是否有效请在抓取时确认。" : "需要登录时,任选一种方式提供 Cookie。" }),++ /* @__PURE__ */ J("p", { children: r.cookie_saved ? "Cookie 已保存,登录是否有效请在抓取时确认。" : "需要登录时,任选一种方式提供 Cookie。" }),/* @__PURE__ */ J("div", {class: "insightswitch scraping-cookie-method",role: "radiogroup",@@@ -2163,19 -2244,19 +2273,19 @@@type: "radio",name: `cookie-method-${e.source}`,value: t,- checked: p === t,- checked: d === t,++ checked: f === t,onChange: () => {- m(t), l(""), f(""), _("");- p(t), s(""), l(""), h("");++ m(t), c(""), u(""), g("");}}), /* @__PURE__ */ J("span", { children: n })] }, t))}),- p === "paste" ? /* @__PURE__ */ J("label", { children: ["Cookie", /* @__PURE__ */ J("input", {- d === "paste" ? /* @__PURE__ */ J("label", { children: ["Cookie", /* @__PURE__ */ J("input", {++ f === "paste" ? /* @__PURE__ */ J("label", { children: ["Cookie", /* @__PURE__ */ J("input", {class: "geist-input",type: "password",autoComplete: "off",- value: c,- disabled: v,- onInput: (e) => l(e.currentTarget.value)- value: o,- disabled: g,- onInput: (e) => s(e.currentTarget.value)++ value: s,++ disabled: _,++ onInput: (e) => c(e.currentTarget.value)})] }) : /* @__PURE__ */ J("label", {class: "scraping-file",children: ["Netscape Cookie 文件(.txt)", /* @__PURE__ */ J("span", {@@@ -2187,31 -2268,31 +2297,31 @@@}),/* @__PURE__ */ J("span", {class: "scraping-file-name",- children: g || "未选择文件"- children: m || "未选择文件"++ children: h || "未选择文件"}),/* @__PURE__ */ J("input", {- ref: C,+ ref: w,type: "file",accept: ".txt",- disabled: v,- disabled: g,++ disabled: _,onChange: async (e) => {let t = e.currentTarget.files?.[0];if (!t) {- f(""), _("");- l(""), h("");++ u(""), g("");return;}- if (f(""), t.size > 262144) {- if (l(""), t.size > 262144) {- b("Cookie 文本超过 256 KiB"), e.currentTarget.value = "";++ if (u(""), t.size > 262144) {+ x("Cookie 文本超过 256 KiB"), e.currentTarget.value = "";return;}- v(!0);+ y(!0);try {let e = await t.text();- E.current.signal.aborted || (f(e), _(t.name));- T.current.signal.aborted || (l(e), h(t.name));++ E.current.signal.aborted || (u(e), g(t.name));} catch {- T.current.signal.aborted || b("Cookie 文件未读取,请重新选择");+ E.current.signal.aborted || x("Cookie 文件未读取,请重新选择");} finally {- T.current.signal.aborted || v(!1);+ E.current.signal.aborted || y(!1);}}})@@@ -2219,24 -2300,23 +2329,24 @@@})]})] }),- y && /* @__PURE__ */ J("div", {+ b && /* @__PURE__ */ J("div", {role: "alert",- dangerouslySetInnerHTML: { __html: o(b, { variant: "error" }) }- dangerouslySetInnerHTML: { __html: f(y, { variant: "error" }) }++ dangerouslySetInnerHTML: { __html: p(b, { variant: "error" }) }}),- x.map((t) => /* @__PURE__ */ J("div", {+ S.map((t) => /* @__PURE__ */ J("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" }) }- dangerouslySetInnerHTML: { __html: f(`${e.label}${t.label === "来源页面" ? "" : " 高清图片"}:${t.ok ? "可连接" : "不能连接"}` + (t.width ? ` · ${t.width} × ${t.height}` : "") + (t.message ? `。${t.message}` : ""), { variant: t.ok ? "success" : "error" }) }++ dangerouslySetInnerHTML: { __html: p(`${e.label}${t.label === "来源页面" ? "" : " 高清图片"}:${t.ok ? "可连接" : "不能连接"}` + (t.width ? ` · ${t.width} × ${t.height}` : "") + (t.message ? `。${t.message}` : ""), { variant: t.ok ? "success" : "error" }) }}, t.label))]}), /* @__PURE__ */ J("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,children: [- e.accepts_cookie && n.cookie_saved && /* @__PURE__ */ J("button", {- /* @__PURE__ */ J("button", {- class: "geist-button primary",- type: "submit",- children: "保存"++ e.accepts_cookie && r.cookie_saved && /* @__PURE__ */ J("button", {+ class: "geist-button",+ type: "button",+ onClick: () => void D("revoke"),+ children: "撤销 Cookie"}),/* @__PURE__ */ J("button", {class: "geist-button",@@@ -2254,35 -2335,35 +2364,35 @@@})});}- function pn({ data: e, error: t, toast: n }) {- let [r, a] = W(""), [s, c] = W(!1), [l, d] = W(""), f = q(null);- K(() => u(f.current, s), [s]);- let p = q(new AbortController()), m = q(0);- async function h(e = !1) {- let t = ++m.current;- await cn({-function _n({ data: e, error: t, toast: n }) {++function vn({ data: e, error: t, toast: n }) {+ let [r, i] = W(""), [a, o] = W(!1), [s, c] = W(""), l = q(null);- K(() => _(l.current, a), [a]);- let d = q(new AbortController()), p = q(0);++ K(() => v(l.current, a), [a]);++ let u = q(new AbortController()), f = q(0);+ async function m(e = !1) {- let t = ++p.current;- await fn({++ let t = ++f.current;++ await pn({read: (e) => z("/api/scraping/cover", e),- active: () => !p.current.signal.aborted && t === m.current,- active: () => !d.current.signal.aborted && t === p.current,++ active: () => !u.current.signal.aborted && t === f.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 || "封面采集完成");+ o(t.status === "running"), t.status === "running" && (e = !1), t.status === "failed" && !e && c(t.error || "采集未取得"), t.status === "complete" && !e && n(t.result || "封面采集完成");},- disconnected: () => d("连接中断,正在重新读取后台进度")+ disconnected: () => c("连接中断,正在重新读取后台进度")});}- G(() => (h(!0), () => p.current.abort()), []);- async function g() {- if (!s) {- m.current++, c(!0), d("");- G(() => (m(!0), () => d.current.abort()), []);++ G(() => (m(!0), () => u.current.abort()), []);+ async function h() {+ if (!a) {- p.current++, o(!0), c("");++ f.current++, o(!0), c("");try {- await B("/api/scraping/cover", { code: r }, "POST", p.current.signal), await h();- await B("/api/scraping/cover", { code: r }, "POST", d.current.signal), await m();++ await B("/api/scraping/cover", { code: r }, "POST", u.current.signal), await m();} catch (e) {- p.current.signal.aborted || (c(!1), d(R(e)));- d.current.signal.aborted || (o(!1), c(R(e)));++ u.current.signal.aborted || (o(!1), c(R(e)));}}}return t ? /* @__PURE__ */ J("div", {role: "alert",- dangerouslySetInnerHTML: { __html: o(t, { variant: "error" }) }- dangerouslySetInnerHTML: { __html: f(t, { variant: "error" }) }++ dangerouslySetInnerHTML: { __html: p(t, { variant: "error" }) }}) : /* @__PURE__ */ J("div", {class: "scraping-page",children: [@@@ -2293,7 -2374,7 +2403,7 @@@children: /* @__PURE__ */ J("div", {class: "geist-fieldset-content scraping-fields",children: [- /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: i("scraping-cover", "高清封面") } }),- /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: u("scraping-cover", "高清封面") } }),++ /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d("scraping-cover", "高清封面") } }),/* @__PURE__ */ J("form", {class: "scraping-cover-form",onSubmit: (e) => {@@@ -2314,14 -2395,14 +2424,14 @@@children: "抓取封面"})]}),- l && /* @__PURE__ */ J("div", {+ s && /* @__PURE__ */ J("div", {role: "alert",- dangerouslySetInnerHTML: { __html: o(l, { variant: "error" }) }- dangerouslySetInnerHTML: { __html: f(s, { variant: "error" }) }++ dangerouslySetInnerHTML: { __html: p(s, { variant: "error" }) }})]})}),- e?.sources.map((e) => /* @__PURE__ */ J(fn, {- e?.sources.map((e) => /* @__PURE__ */ J(gn, {++ e?.sources.map((e) => /* @__PURE__ */ J(_n, {source: e,toast: n}, e.source))@@@ -2330,57 -2411,67 +2440,67 @@@}//#endregion//#region src/islands/library-processing.tsx- var mn = (e, t) => z("/api/library-processing", t);- function hn({ data: e, error: t, toast: n, onComplete: r, mode: c, monitor: l }) {- let [d, f] = W(e || { status: "idle" }), [p, m] = W(t), [h, g] = W(!1), [_, v] = W(!1), y = q(new AbortController()), b = q(0), x = q(d.status), S = q(null), C = h || d.status === "running";- K(() => u(S.current, C), [C]);- async function w() {- let e = ++b.current;- await cn({-var vn = (e, t) => z("/api/library-processing", t);-function yn({ data: e, error: t, toast: n, onComplete: r, mode: i, monitor: a }) {- let [o, s] = W(e || { status: "idle" }), [c, l] = W(t), [h, g] = W(!1), [v, y] = W(!1), b = q(new AbortController()), x = q(0), S = q(o.status), C = q(null), w = h || o.status === "running";- K(() => _(C.current, w), [w]);++var yn = (e, t) => z("/api/library-processing", t);++function bn({ data: e, error: t, toast: n, onComplete: r, mode: i, monitor: a }) {++ let [o, s] = W(e || { status: "idle" }), [c, l] = W(t), [u, g] = W(!1), [_, y] = W(!1), b = q(new AbortController()), x = q(0), S = q(o.status), C = q(null), w = u || o.status === "running";++ K(() => v(C.current, w), [w]);+ async function T() {+ let e = ++x.current;- await fn({++ await pn({read: (e) => z("/api/library-processing", e),- active: () => !y.current.signal.aborted && b.current === e,- keepWatching: c === "notice" || !!l,+ active: () => !b.current.signal.aborted && x.current === e,+ keepWatching: i === "notice" || !!a,render: (e) => {- f(e), m(""), e.status === "complete" && x.current === "running" && c !== "notice" && (v(!0), n("已完成扫描与资料采集")), x.current === "running" && (e.status === "complete" || e.status === "failed") && r?.(), x.current = e.status;+ s(e), l(""), e.status === "complete" && S.current === "running" && i !== "notice" && (y(!0), n("已完成扫描与资料采集")), S.current === "running" && (e.status === "complete" || e.status === "failed") && r?.(), S.current = e.status;},- disconnected: () => m("连接中断,正在重新读取处理进度")+ disconnected: () => l("连接中断,正在重新读取处理进度")});}- G(() => ((d.status === "running" || c === "notice" || l) && w(), () => y.current.abort()), []);- async function T() {- if (!C) {- g(!0), m(""), v(!1);+ G(() => ((o.status === "running" || i === "notice" || a) && T(), () => b.current.abort()), []);+ async function E() {+ if (!w) {+ g(!0), l(""), y(!1);try {- let e = await B("/api/library-processing", {}, "POST", y.current.signal);- if (y.current.signal.aborted) return;- x.current = e.status, f(e), g(!1), await w();+ let e = await B("/api/library-processing", {}, "POST", b.current.signal);+ if (b.current.signal.aborted) return;+ S.current = e.status, s(e), g(!1), await T();} catch (e) {- y.current.signal.aborted || (m(R(e)), g(!1));+ b.current.signal.aborted || (l(R(e)), g(!1));}}}- return c === "notice" ? !p && d.status !== "running" && d.status !== "failed" ? null : /* @__PURE__ */ J("div", {- class: "library-processing-banner",- role: "status",- children: [/* @__PURE__ */ J("span", { children: p || (d.status === "failed" ? "扫描与资料采集未完成" : `${d.stage || "正在整理馆藏"}${d.total ? ` · ${d.checked || 0} / ${d.total}` : ""}`) }), /* @__PURE__ */ J("a", {- class: "geist-button",+ if (i === "notice") {+ if (!c && o.status !== "running" && o.status !== "failed") return null;+ let e = c || (o.status === "failed" ? "扫描与资料采集未完成" : `${o.stage || "正在整理馆藏"}${o.total ? ` · ${o.checked || 0} / ${o.total}` : ""}`);- return /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: m(e, {++ return /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: h(e, {+ variant: o.status === "failed" ? "error" : c ? "warning" : "gray",href: "/data-cleanup#libraryProcessing",- children: p || d.status === "failed" ? "查看并处理" : "查看进度"- })]- }) : /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J("div", {+ label: c || o.status === "failed" ? "查看并处理" : "查看进度",+ value: o.checked || 0,+ ...o.status === "running" && o.total !== void 0 ? { max: o.total } : {}+ }) } });+ }+ return /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J("div", {class: "geist-fieldset-content library-processing",children: [- /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: i("cleanupScrapingTitle", "扫描与采集") } }),- /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: u("cleanupScrapingTitle", "扫描与采集") } }),++ /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d("cleanupScrapingTitle", "扫描与采集") } }),/* @__PURE__ */ J("p", { children: "扫描媒体文件夹,导入已有资料,采集缺失信息。" }),/* @__PURE__ */ J("div", {"aria-live": "polite",children: [- d.status === "running" && /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: a(`${d.stage || "正在处理"}${d.total ? ` · ${d.checked || 0} / ${d.total}` : ""}`) } }), !!d.total && /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: s(`已处理 ${d.checked || 0} / ${d.total} 个视频`, d.checked || 0, d.total) } })] }),- (p || d.status === "failed") && /* @__PURE__ */ J("div", {- o.status === "running" && /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: d(`${o.stage || "正在处理"}${o.total ? ` · ${o.checked || 0} / ${o.total}` : ""}`) } }), !!o.total && /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: p(`已处理 ${o.checked || 0} / ${o.total} 个视频`, o.checked || 0, o.total) } })] }),++ o.status === "running" && /* @__PURE__ */ J(I, { children: [/* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: f(`${o.stage || "正在处理"}${o.total ? ` · ${o.checked || 0} / ${o.total}` : ""}`) } }), !!o.total && /* @__PURE__ */ J("div", { dangerouslySetInnerHTML: { __html: m(`已处理 ${o.checked || 0} / ${o.total} 个视频`, o.checked || 0, o.total) } })] }),+ (c || o.status === "failed") && /* @__PURE__ */ J("div", {role: "alert",- dangerouslySetInnerHTML: { __html: o(p || d.error || "处理未完成,请重试", { variant: "error" }) }+ onClick: (e) => {+ e.target.closest("[data-note-action]") && E();+ },- dangerouslySetInnerHTML: { __html: f(c || o.error || "处理未完成,请重试", {++ dangerouslySetInnerHTML: { __html: p(c || o.error || "处理未完成,请重试", {+ variant: "error",+ filled: !0,+ actionLabel: o.status === "failed" ? "重试未完成项" : ""+ }) }}),- d.status === "failed" && !!d.issues?.length && /* @__PURE__ */ J("ul", { children: d.issues.slice(0, 20).map((e) => /* @__PURE__ */ J("li", { children: [+ o.status === "failed" && !!o.issues?.length && /* @__PURE__ */ J("ul", { children: o.issues.slice(0, 20).map((e) => /* @__PURE__ */ J("li", { children: [e.asset_id ? /* @__PURE__ */ J("a", {href: `/item/${e.asset_id}`,children: "查看视频"@@@ -2388,9 -2479,9 +2508,9 @@@e.asset_id ? ":" : "",e.message] })) }),- v && /* @__PURE__ */ J("div", {+ _ && /* @__PURE__ */ J("div", {class: "library-processing-result",- dangerouslySetInnerHTML: { __html: o(`已扫描 ${d.scanned || 0} 个文件,识别 ${d.identified || 0} 个番号,整理 ${d.candidates || 0} 组资料候选。`, {- dangerouslySetInnerHTML: { __html: f(`已扫描 ${o.scanned || 0} 个文件,识别 ${o.identified || 0} 个番号,整理 ${o.candidates || 0} 组资料候选。`, {++ dangerouslySetInnerHTML: { __html: p(`已扫描 ${o.scanned || 0} 个文件,识别 ${o.identified || 0} 个番号,整理 ${o.candidates || 0} 组资料候选。`, {variant: "success",label: "处理完成"}) }@@@ -2424,12 -2515,12 +2544,12 @@@}//#endregion//#region src/state/index.ts- var gn = { "quality-goals": {- refresh: rn,- reset: nn- } }, _n = () => Object.keys(gn);- async function vn(e) {- let t = gn[e];-var bn = { "quality-goals": {- refresh: cn,- reset: sn-} }, xn = () => Object.keys(bn);-async function Sn(e) {- let t = bn[e];++var xn = { "quality-goals": {++ refresh: ln,++ reset: cn++} }, Sn = () => Object.keys(xn);++async function Cn(e) {++ let t = xn[e];if (!t) throw Error(`未登记的共享 store:${String(e)}`);try {return await t.refresh(), !0;@@@ -2439,24 -2530,24 +2559,24 @@@}//#endregion//#region src/review-evidence.ts- var yn = (e = "") => /^https?:\/\//i.test(e) ? e : "";- function bn(e = "") {- let t = yn(e) || (e.startsWith("/") && !e.startsWith("//") ? e : "");- return `<div class="reviewimage" data-review-picture><span class="reviewimageempty"${t ? " hidden" : ""}>未取得来源图片</span>${t ? `<img src="${m(t)}" alt="来源候选图片" loading="lazy">` : ""}</div>`;- }- function xn(e) {- let t = yn(e.profile_url), n = (e.preview_assets || []).slice(0, 6), r = Math.max(0, Number(e.video_count || e.videos || 0));- return `<section class="reviewidentityevidence"><h5>候选身份:${m(e.babepedia_name || "未标注")}</h5>- <div class="reviewevidenceactions">${t ? `<a class="geist-button externallink" href="${m(t)}" target="_blank" rel="noopener noreferrer">来源资料<svg class="externalmark" viewBox="0 0 24 24" aria-hidden="true"><use href="#i-external-link" /></svg></a>` : ""}- <button type="button" class="geist-button" data-entity-kind="creator" data-entity-name="${m(e.creator || "")}">查看全部 ${r.toLocaleString()} 部作品</button></div>- ${bn(e.preview_url)}-var Cn = (e = "") => /^https?:\/\//i.test(e) ? e : "";-function wn(e = "") {- let n = Cn(e) || (e.startsWith("/") && !e.startsWith("//") ? e : "");++var wn = (e = "") => /^https?:\/\//i.test(e) ? e : "";++function Tn(e = "") {++ let n = wn(e) || (e.startsWith("/") && !e.startsWith("//") ? e : "");+ return `<div class="reviewimage" data-review-picture><span class="reviewimageempty"${n ? " hidden" : ""}>未取得来源图片</span>${n ? `<img src="${t(n)}" alt="来源候选图片" loading="lazy">` : ""}</div>`;+ }-function Tn(e) {- let n = Cn(e.profile_url), r = (e.preview_assets || []).slice(0, 6), i = Math.max(0, Number(e.video_count || e.videos || 0));++function En(e) {++ let n = wn(e.profile_url), r = (e.preview_assets || []).slice(0, 6), i = Math.max(0, Number(e.video_count || e.videos || 0));+ return `<section class="reviewidentityevidence"><h5>候选身份:${t(e.babepedia_name || "未标注")}</h5>- <div class="reviewevidenceactions">${n ? `<a class="geist-button" href="${t(n)}" target="_blank" rel="noopener noreferrer">来源资料 ↗</a>` : ""}++ <div class="reviewevidenceactions">${n ? `<a class="geist-button externallink" href="${t(n)}" target="_blank" rel="noopener noreferrer">来源资料<svg class="externalmark" viewBox="0 0 24 24" aria-hidden="true"><use href="#i-external-link" /></svg></a>` : ""}+ <button type="button" class="geist-button" data-entity-kind="creator" data-entity-name="${t(e.creator || "")}">查看全部 ${i.toLocaleString()} 部作品</button></div>- ${wn(e.preview_url)}++ ${Tn(e.preview_url)}<p>通过后记录身份判断。</p>- ${n.length ? `<h5>本地作品样本</h5><div class="reviewevidencesamples">${n.map((e) => `<div class="reviewevidencesample">- <button class="geist-button" type="button" data-review-open-item="${e.id}"><span data-middle-truncate title="${m(e.name)}">${m(e.name)}</span></button>- <button class="geist-button" type="button" data-review-reveal="${e.id}" aria-label="打开 ${m(e.name)} 的文件位置">文件位置</button>+ ${r.length ? `<h5>本地作品样本</h5><div class="reviewevidencesamples">${r.map((e) => `<div class="reviewevidencesample">+ <button class="geist-button" type="button" data-review-open-item="${e.id}"><span data-middle-truncate title="${t(e.name)}">${t(e.name)}</span></button>+ <button class="geist-button" type="button" data-review-reveal="${e.id}" aria-label="打开 ${t(e.name)} 的文件位置">文件位置</button></div>`).join("")}</div>` : "<p>暂无本地作品样本,打开全部作品核对。</p>"}</section>`;}- function Sn(e) {-function En(e) {++function Dn(e) {for (let t of e.querySelectorAll("[data-review-picture] img")) {let e = () => {t.hidden = !0;@@@ -2468,7 -2559,7 +2588,7 @@@}//#endregion//#region src/review-bulk.ts- var Cn = () => ({-var Dn = () => ({++var On = () => ({busy: !1,category: "",filter: "",@@@ -2479,7 -2570,17 +2599,17 @@@assets: /* @__PURE__ */ new Map(),errors: /* @__PURE__ */ new Map()});- function wn(e, t) {-function On(e) {++function kn(e) {+ let t = e?.querySelector(".reviewcontrols");+ if (!e || !t || t.offsetParent === null) return;+ let n = e.closest("main");+ n && e.style.setProperty("--review-edge", getComputedStyle(n).paddingLeft), e.style.setProperty("--review-controls-height", `${t.getBoundingClientRect().height}px`);+ for (let n of [t, ...e.querySelectorAll(".reviewgroupbar")]) {+ let e = parseFloat(getComputedStyle(n).top);+ n.classList.toggle("is-stuck", n.offsetParent !== null && window.scrollY > 0 && Number.isFinite(e) && Math.abs(n.getBoundingClientRect().top - e) <= 1);+ }+ }-function kn(e, t) {++function An(e, t) {let n = [["candidates",t ? "按候选数量" : "全部待复核",@@@ -2495,7 -2596,7 +2625,7 @@@"list-filter"]), n;}- function Tn(e, t) {-function An(e, t) {++function jn(e, t) {let n = /* @__PURE__ */ new Map();for (let r of e) {let e, i;@@@ -2512,11 -2613,11 +2642,11 @@@}return [...n.values()];}- function En(e, t, n, r, i) {-function jn(e, t, n, r, i) {++function Mn(e, t, n, r, i) {let a = e.anchor === null ? -1 : t.indexOf(e.anchor), o = t.indexOf(n);r && a >= 0 && o >= 0 ? t.slice(Math.min(a, o), Math.max(a, o) + 1).forEach((t) => e.selected.add(t)) : i ? e.selected.add(n) : e.selected.delete(n), e.anchor = n;}- async function Dn(e, t, n, r) {-async function Mn(e, t, n, r) {++async function Nn(e, t, n, r) {let i = [], a = 0;for (let o of e) {if (!r()) break;@@@ -2536,34 -2637,34 +2666,34 @@@failures: i};}- function On(e) {-function Nn(e) {++function Pn(e) {return e.length ? [...new Set(e.flatMap((e) => e.candidates?.map((e) => e.source || "") || []))].filter((t) => t && e.every((e) => e.candidates?.filter((e) => e.source === t).length === 1)) : [];}- function kn(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]")];- n.category !== void 0 && i.category !== n.category && (i.category = n.category, i.filter = "", i.groupBy = "candidates", i.anchor = null);- let o = wn(n.rows, n.metadata);- o.some((e) => e[0] === i.groupBy) || (i.groupBy = "candidates", i.filter = "");- let s = Tn(n.rows, i.groupBy);- s.some((e) => e.key === i.filter) || (i.filter = "");- let l = () => [...r.querySelectorAll("[data-review-key]")].filter((e) => !e.closest("[hidden]")), d = () => l().filter((e) => i.selected.has(e.dataset.reviewKey)), p = () => n.rows.filter((e) => d().some((t) => t.dataset.reviewKey === e.item_key)), m = (e) => !e.querySelector("[data-review-status=\"approved\"]")?.disabled, h = (e, t = "") => {-function Pn(e, t) {++function Fn(e, t) {+ let n = e.querySelector(".reviewlist");+ if (!n || !t.rows.length || t.locked) return;+ let r = t.state, i = [...n.querySelectorAll("[data-review-key]")];+ t.category !== void 0 && r.category !== t.category && (r.category = t.category, r.filter = "", r.groupBy = "candidates", r.anchor = null);- let a = kn(t.rows, t.metadata);++ let a = An(t.rows, t.metadata);+ a.some((e) => e[0] === r.groupBy) || (r.groupBy = "candidates", r.filter = "");- let o = An(t.rows, r.groupBy);++ let o = jn(t.rows, r.groupBy);+ o.some((e) => e.key === r.filter) || (r.filter = "");- let c = () => [...n.querySelectorAll("[data-review-key]")].filter((e) => !e.closest("[hidden]")), l = () => c().filter((e) => r.selected.has(e.dataset.reviewKey)), u = () => t.rows.filter((e) => l().some((t) => t.dataset.reviewKey === e.item_key)), d = (e) => !e.querySelector("[data-review-status=\"approved\"]")?.disabled, f = (e, t = "") => {++ let s = () => [...n.querySelectorAll("[data-review-key]")].filter((e) => !e.closest("[hidden]")), l = () => s().filter((e) => r.selected.has(e.dataset.reviewKey)), u = () => t.rows.filter((e) => l().some((t) => t.dataset.reviewKey === e.item_key)), d = (e) => !e.querySelector("[data-review-status=\"approved\"]")?.disabled, f = (e, t = "") => {let n = document.createElement("button");return n.type = "button", n.className = `geist-button ${t}`.trim(), n.textContent = e, n;- }, g = document.createElement("div");- g.className = "reviewbulkbar reviewbulktoolbar", g.setAttribute("role", "group"), g.setAttribute("aria-label", "复核批量操作");- let _ = document.createElement("div");- _.className = "reviewgroupby", _.innerHTML = c(o, i.groupBy, { label: "筛选分组方式" });- let v = f(_.firstElementChild);- _.querySelectorAll("[data-select-option] .gselectmark").forEach((e) => e.remove()), v.addEventListener("change", () => {- if (i.busy || !o.some((e) => e[0] === v.value)) return;- i.groupBy = v.value, i.filter = "", i.anchor = null;- let t = e.parentElement;- n.refresh(), t?.querySelector(".reviewgroupby button")?.focus({ preventScroll: !0 });+ }, p = document.createElement("div");+ p.className = "reviewbulkbar reviewbulktoolbar", p.setAttribute("role", "group"), p.setAttribute("aria-label", "复核批量操作");+ let m = document.createElement("div");- m.className = "reviewgroupby", m.innerHTML = h(a, r.groupBy, { label: "筛选分组方式" });- let g = y(m.firstElementChild);- m.querySelectorAll("[data-select-option] .gselectmark").forEach((e) => e.remove()), g.addEventListener("change", () => {- if (r.busy || !a.some((e) => e[0] === g.value)) return;- r.groupBy = g.value, r.filter = "", r.anchor = null;++ m.className = "reviewgroupby", m.innerHTML = g(a, r.groupBy, { label: "筛选分组方式" });++ let h = b(m.firstElementChild);++ m.querySelectorAll("[data-select-option] .gselectmark").forEach((e) => e.remove()), h.addEventListener("change", () => {++ if (r.busy || !a.some((e) => e[0] === h.value)) return;++ r.groupBy = h.value, r.filter = "", r.anchor = null;+ let n = e.parentElement;+ t.refresh(), n?.querySelector(".reviewgroupby button")?.focus({ preventScroll: !0 });});- let y = document.createElement("div");- y.className = "reviewcategoryfilter", y.hidden = s.length < 2, y.innerHTML = c([[- let v = document.createElement("div");- v.className = "reviewcategoryfilter", v.hidden = o.length < 2, v.innerHTML = h([[++ let _ = document.createElement("div");++ _.className = "reviewcategoryfilter", _.hidden = o.length < 2, _.innerHTML = g([["","全部分类","list-filter"@@@ -2571,129 -2672,129 +2701,129 @@@e.key,`${e.title} · ${e.rows.length}`,"list-filter"- ])], i.filter, { label: i.groupBy === "field" ? "筛选字段分类" : "筛选当前分类" });- let b = y.querySelector("[data-select-menu]");- if (b) {+ ])], r.filter, { label: r.groupBy === "field" ? "筛选字段分类" : "筛选当前分类" });- let b = v.querySelector("[data-select-menu]");- if (b) {++ let y = _.querySelector("[data-select-menu]");++ if (y) {let e = document.createElement("div");- e.setAttribute("role", "group"), e.setAttribute("aria-label", i.groupBy === "field" ? "字段分类" : "当前分类");+ e.setAttribute("role", "group"), e.setAttribute("aria-label", r.groupBy === "field" ? "字段分类" : "当前分类");let t = document.createElement("div");-- t.className = "reviewfilterheading", t.textContent = e.getAttribute("aria-label"), t.setAttribute("aria-hidden", "true"), e.append(t, ...Array.from(b.children).slice(1)), b.append(e);++ t.className = "reviewfilterheading", t.textContent = e.getAttribute("aria-label"), t.setAttribute("aria-hidden", "true"), e.append(t, ...Array.from(y.children).slice(1)), y.append(e);}- let x = f(y.firstElementChild);- y.querySelectorAll("[data-select-option] .gselectmark").forEach((e) => e.remove()), x.addEventListener("change", () => {- if (i.busy || x.value && !s.some((e) => e.key === x.value)) return;- i.filter = x.value, i.anchor = null;- let t = e.parentElement;- n.refresh(), t?.querySelector(".reviewcategoryfilter button")?.focus({ preventScroll: !0 });- let x = y(v.firstElementChild);- v.querySelectorAll("[data-select-option] .gselectmark").forEach((e) => e.remove()), x.addEventListener("change", () => {++ let x = b(_.firstElementChild);++ _.querySelectorAll("[data-select-option] .gselectmark").forEach((e) => e.remove()), x.addEventListener("change", () => {+ if (r.busy || x.value && !o.some((e) => e.key === x.value)) return;+ r.filter = x.value, r.anchor = null;+ let n = e.parentElement;+ t.refresh(), n?.querySelector(".reviewcategoryfilter button")?.focus({ preventScroll: !0 });});- let S = h("全选本页"), C = h("通过所选", "primary"), w = h("拒绝所选", "error"), T = document.createElement("span");+ let S = f("全选本页"), C = f("通过所选", "primary"), w = f("拒绝所选", "error"), T = document.createElement("span");T.className = "reviewselectedcount selectiondockcount", T.setAttribute("role", "status");let E = document.createElement("div");- E.className = "reviewbulksource", E.hidden = !n.metadata;+ E.className = "reviewbulksource", E.hidden = !t.metadata;let D = document.createElement("p");D.className = "reviewstate reviewbulkfeedback", D.setAttribute("role", "status");let O = document.createElement("div");O.className = "reviewbulkdecisions", O.append(C, w);let k = document.createElement("div");k.className = "selectiondock reviewdock", k.setAttribute("role", "group"), k.setAttribute("aria-label", "复核所选项目");- let A = h("取消选择");- k.append(T, E, O, A, D), g.append(_, y, S);- let ee = e.querySelector(".reviewcontrols");- ee ? ee.append(g) : r.before(g), e.append(k), r.classList.add("reviewgroups");- let j = () => {- i.selected.clear(), i.anchor = null, P();+ let A = f("取消选择");- k.append(T, E, O, A, D), p.append(m, v, S);- let ee = e.querySelector(".reviewcontrols");- ee ? ee.append(p) : n.before(p), e.append(k), n.classList.add("reviewgroups");- let j = () => {- r.selected.clear(), r.anchor = null, P();++ k.append(T, E, O, A, D), p.append(m, _, S);++ let j = e.querySelector(".reviewcontrols");++ j ? j.append(p) : n.before(p), e.append(k), n.classList.add("reviewgroups");++ let ee = () => {++ r.selected.clear(), r.anchor = null, N();};A.onclick = () => {- i.busy || (j(), S.focus({ preventScroll: !0 }));- r.busy || (j(), S.focus({ preventScroll: !0 }));++ r.busy || (ee(), S.focus({ preventScroll: !0 }));}, S.onclick = () => {- if (i.busy) return;- let e = l(), t = d().length === e.length;- e.forEach((e) => t ? i.selected.delete(e.dataset.reviewKey) : i.selected.add(e.dataset.reviewKey)), P();- }, C.onclick = () => te("approved", C), w.onclick = () => te("rejected", w);+ if (r.busy) return;- let e = c(), t = l().length === e.length;- e.forEach((e) => t ? r.selected.delete(e.dataset.reviewKey) : r.selected.add(e.dataset.reviewKey)), P();- }, C.onclick = () => te("approved", C), w.onclick = () => te("rejected", w);++ let e = s(), t = l().length === e.length;++ e.forEach((e) => t ? r.selected.delete(e.dataset.reviewKey) : r.selected.add(e.dataset.reviewKey)), N();++ }, C.onclick = () => P("approved", C), w.onclick = () => P("rejected", w);let M = [];- for (let e of s) {- let n = e.rows.map((e) => a.find((t) => t.dataset.reviewKey === e.item_key)).filter((e) => !!e), o = document.createElement("section");- o.className = "reviewgroup", o.hidden = !!i.filter && e.key !== i.filter;- let s = document.createElement("div");- s.className = "reviewbulkbar";- let c = document.createElement("h3");- c.textContent = `${e.title} · ${n.length}`;- let u = h("全选本组"), d = document.createElement("div");- d.className = "reviewlist", s.append(c, u), o.append(s, d), r.append(o), u.onclick = () => {- if (i.busy) return;- let e = n.every((e) => i.selected.has(e.dataset.reviewKey));- n.forEach((t) => e ? i.selected.delete(t.dataset.reviewKey) : i.selected.add(t.dataset.reviewKey)), P();+ for (let e of o) {+ let t = e.rows.map((e) => i.find((t) => t.dataset.reviewKey === e.item_key)).filter((e) => !!e), a = document.createElement("section");+ a.className = "reviewgroup", a.hidden = !!r.filter && e.key !== r.filter;+ let o = document.createElement("div");+ o.className = "reviewbulkbar reviewgroupbar";+ let l = document.createElement("h3");+ l.textContent = `${e.title} · ${t.length}`;+ let u = f("全选本组"), d = document.createElement("div");+ d.className = "reviewlist", o.append(l, u), a.append(o, d), n.append(a), u.onclick = () => {+ if (r.busy) return;+ let e = t.every((e) => r.selected.has(e.dataset.reviewKey));- t.forEach((t) => e ? r.selected.delete(t.dataset.reviewKey) : r.selected.add(t.dataset.reviewKey)), P();++ t.forEach((t) => e ? r.selected.delete(t.dataset.reviewKey) : r.selected.add(t.dataset.reviewKey)), N();}, M.push(() => {- u.textContent = n.every((e) => i.selected.has(e.dataset.reviewKey)) ? "清空本组" : "全选本组";+ u.textContent = t.every((e) => r.selected.has(e.dataset.reviewKey)) ? "清空本组" : "全选本组";});- for (let e of n) {+ for (let e of t) {d.append(e);- let n = e.dataset.reviewKey;- i.errors.has(n) && (e.querySelector(".reviewstate").textContent = i.errors.get(n));- let r = e.querySelector("h4,.reviewentity b") || e, a = document.createElement("label");- a.className = "reviewpickitem", a.innerHTML = t();- let o = a.querySelector("input");- if (o.setAttribute("aria-label", `选择 ${e.querySelector("legend")?.textContent || r.textContent || n}`), r !== e) {+ let t = e.dataset.reviewKey;+ r.errors.has(t) && (e.querySelector(".reviewstate").textContent = r.errors.get(t));+ let n = e.querySelector("h4,.reviewentity b") || e, i = document.createElement("label");- i.className = "reviewpickitem", i.innerHTML = s();++ i.className = "reviewpickitem", i.innerHTML = c();+ let a = i.querySelector("input");+ if (a.setAttribute("aria-label", `选择 ${e.querySelector("legend")?.textContent || n.textContent || t}`), n !== e) {let e = document.createElement("span");- e.className = "reviewpickname", e.append(...r.childNodes), r.classList.add("reviewpickheading"), r.append(a, e);- } else e.prepend(a);- let s = (e, t) => {- En(i, l().map((e) => e.dataset.reviewKey), n, e, t), P();+ e.className = "reviewpickname", e.append(...n.childNodes), n.classList.add("reviewpickheading"), n.append(i, e);+ } else e.prepend(i);+ let o = (e, n) => {- jn(r, c().map((e) => e.dataset.reviewKey), t, e, n), P();++ Mn(r, s().map((e) => e.dataset.reviewKey), t, e, n), N();};- if (a.addEventListener("mousedown", (e) => {+ if (i.addEventListener("mousedown", (e) => {e.shiftKey && e.preventDefault();+ }), i.addEventListener("click", (e) => {+ e.target !== a && (e.preventDefault(), r.busy || (a.focus(), o(e.shiftKey, !a.checked)));}), a.addEventListener("click", (e) => {- e.target !== o && (e.preventDefault(), i.busy || (o.focus(), s(e.shiftKey, !o.checked)));- }), o.addEventListener("click", (e) => {- i.busy || s(e.shiftKey, o.checked);- }), o.addEventListener("keydown", (t) => {- if (!(i.busy || !t.shiftKey)) {- if (t.key === " ") t.preventDefault(), s(!0, !0);- else if (t.key === "ArrowDown" || t.key === "ArrowUp") {- t.preventDefault();- let r = l(), a = r[r.indexOf(e) + (t.key === "ArrowDown" ? 1 : -1)];- a && (i.anchor === null && (i.anchor = n), En(i, r.map((e) => e.dataset.reviewKey), a.dataset.reviewKey, !0, !0), P(), a.querySelector(".reviewpickitem input")?.focus());+ r.busy || o(e.shiftKey, a.checked);+ }), a.addEventListener("keydown", (n) => {+ if (!(r.busy || !n.shiftKey)) {+ if (n.key === " ") n.preventDefault(), o(!0, !0);+ else if (n.key === "ArrowDown" || n.key === "ArrowUp") {+ n.preventDefault();- let i = c(), a = i[i.indexOf(e) + (n.key === "ArrowDown" ? 1 : -1)];- a && (r.anchor === null && (r.anchor = t), jn(r, i.map((e) => e.dataset.reviewKey), a.dataset.reviewKey, !0, !0), P(), a.querySelector(".reviewpickitem input")?.focus());++ let i = s(), a = i[i.indexOf(e) + (n.key === "ArrowDown" ? 1 : -1)];++ a && (r.anchor === null && (r.anchor = t), Mn(r, i.map((e) => e.dataset.reviewKey), a.dataset.reviewKey, !0, !0), N(), a.querySelector(".reviewpickitem input")?.focus());}}}), M.push(() => {- o.checked = i.selected.has(n);- }), i.assets.has(n)) {- let t = i.assets.get(n), r = [...e.querySelectorAll("[data-review-asset]")];- r.forEach((e) => {- let n = t.includes(Number(e.dataset.reviewAsset));- e.setAttribute("aria-pressed", String(n)), e.classList.toggle("picked", n);+ a.checked = r.selected.has(t);+ }), r.assets.has(t)) {+ let n = r.assets.get(t), i = [...e.querySelectorAll("[data-review-asset]")];+ i.forEach((e) => {+ let t = n.includes(Number(e.dataset.reviewAsset));+ e.setAttribute("aria-pressed", String(t)), e.classList.toggle("picked", t);});let a = e.querySelector("[data-picked-count]");- a && (a.textContent = `已选 ${t.length} / ${r.length}`);+ a && (a.textContent = `已选 ${n.length} / ${i.length}`);}- e.addEventListener("click", (t) => {- t.target.closest("[data-review-asset],[data-pick-all],[data-pick-none]") && i.assets.set(n, [...e.querySelectorAll("[data-review-asset][aria-pressed=\"true\"]")].map((e) => Number(e.dataset.reviewAsset)));+ e.addEventListener("click", (n) => {+ n.target.closest("[data-review-asset],[data-pick-all],[data-pick-none]") && r.assets.set(t, [...e.querySelectorAll("[data-review-asset][aria-pressed=\"true\"]")].map((e) => Number(e.dataset.reviewAsset)));});- for (let t of e.querySelectorAll("input[type=\"radio\"]")) i.choices.has(n) && (t.checked = i.choices.get(n) === t.value), t.addEventListener("change", () => {- t.checked && i.choices.set(n, t.value), P();+ for (let n of e.querySelectorAll("input[type=\"radio\"]")) r.choices.has(t) && (n.checked = r.choices.get(t) === n.value), n.addEventListener("change", () => {- n.checked && r.choices.set(t, n.value), P();++ n.checked && r.choices.set(t, n.value), N();});}}e.addEventListener("keydown", (t) => {- i.busy || !e.contains(r) || (t.key === "Escape" && i.selected.size && (t.preventDefault(), t.stopPropagation(), j()), (t.ctrlKey || t.metaKey) && t.key.toLowerCase() === "a" && !t.target.matches("textarea,input:not([type=\"checkbox\"]):not([type=\"radio\"])") && (t.preventDefault(), t.stopPropagation(), l().forEach((e) => i.selected.add(e.dataset.reviewKey)), P()));- r.busy || !e.contains(n) || (t.key === "Escape" && r.selected.size && (t.preventDefault(), t.stopPropagation(), j()), (t.ctrlKey || t.metaKey) && t.key.toLowerCase() === "a" && !t.target.matches("textarea,input:not([type=\"checkbox\"]):not([type=\"radio\"])") && (t.preventDefault(), t.stopPropagation(), c().forEach((e) => r.selected.add(e.dataset.reviewKey)), P()));++ r.busy || !e.contains(n) || (t.key === "Escape" && r.selected.size && (t.preventDefault(), t.stopPropagation(), ee()), (t.ctrlKey || t.metaKey) && t.key.toLowerCase() === "a" && !t.target.matches("textarea,input:not([type=\"checkbox\"]):not([type=\"radio\"])") && (t.preventDefault(), t.stopPropagation(), s().forEach((e) => r.selected.add(e.dataset.reviewKey)), N()));});-- let N = "";-- function P() {- let e = d();- S.textContent = e.length === l().length ? "清空当前选择" : i.filter ? "全选当前分类" : "全选本页", k.hidden = !e.length, T.textContent = `已选 ${e.length} 项`, C.disabled = !e.length || e.some((e) => !m(e)), w.disabled = !e.length;- let t = On(p());- E.hidden = !n.metadata || !p().some((e) => (e.candidates?.length || 0) > 1);- let r = e.length && !t.length ? "所选项目无共同来源" : "统一选择来源", a = JSON.stringify([r, t]);- if (a !== N) {- N = a, E.innerHTML = c([["", r], ...t.map((e) => [e, e])], "", { label: "统一选择来源" });- let e = f(E.firstElementChild);- e.disabled = !t.length, e.addEventListener("change", () => {- if (!(i.busy || !On(p()).includes(e.value))) {- for (let t of d()) {- let r = n.rows.find((e) => e.item_key === t.dataset.reviewKey).candidates.find((t) => t.source === e.value);- t.querySelectorAll("input[type=\"radio\"]").forEach((e) => {- e.checked = e.value === r.candidate_key;- }), i.choices.set(t.dataset.reviewKey, r.candidate_key);++ let te = "";++ function N() {+ let e = l();- S.textContent = e.length === c().length ? "清空当前选择" : r.filter ? "全选当前分类" : "全选本页", k.hidden = !e.length, T.textContent = `已选 ${e.length} 项`, C.disabled = !e.length || e.some((e) => !d(e)), w.disabled = !e.length;- let n = Nn(u());++ S.textContent = e.length === s().length ? "清空当前选择" : r.filter ? "全选当前分类" : "全选本页", k.hidden = !e.length, T.textContent = `已选 ${e.length} 项`, C.disabled = !e.length || e.some((e) => !d(e)), w.disabled = !e.length;++ let n = Pn(u());+ E.hidden = !t.metadata || !u().some((e) => (e.candidates?.length || 0) > 1);+ let i = e.length && !n.length ? "所选项目无共同来源" : "统一选择来源", a = JSON.stringify([i, n]);- if (a !== N) {- N = a, E.innerHTML = h([["", i], ...n.map((e) => [e, e])], "", { label: "统一选择来源" });- let e = y(E.firstElementChild);++ if (a !== te) {++ te = a, E.innerHTML = g([["", i], ...n.map((e) => [e, e])], "", { label: "统一选择来源" });++ let e = b(E.firstElementChild);+ e.disabled = !n.length, e.addEventListener("change", () => {- if (!(r.busy || !Nn(u()).includes(e.value))) {++ if (!(r.busy || !Pn(u()).includes(e.value))) {+ for (let n of l()) {+ let i = t.rows.find((e) => e.item_key === n.dataset.reviewKey).candidates.find((t) => t.source === e.value);+ n.querySelectorAll("input[type=\"radio\"]").forEach((e) => {+ e.checked = e.value === i.candidate_key;+ }), r.choices.set(n.dataset.reviewKey, i.candidate_key);}D.textContent = `已选择 ${e.value},点击通过所选采用。`;}@@@ -2701,51 -2802,51 +2831,51 @@@}M.forEach((e) => e());}- async function te(t, r) {- if (i.busy || !d().length) return;- let a = d().map((e) => ({- async function te(n, i) {++ async function P(n, i) {+ if (r.busy || !l().length) return;+ let a = l().map((e) => ({key: e.dataset.reviewKey,payload: {- ...n.payload(e),- status: t+ ...t.payload(e),+ status: n}}));- if (t === "approved" && n.metadata && a.some((e) => !e.payload.candidate_key)) {- D.textContent = "请先为所选的多来源候选选择来源。", d().find((e) => !e.querySelector("input[type=\"radio\"]:checked"))?.querySelector("input[type=\"radio\"]")?.focus();+ if (n === "approved" && t.metadata && a.some((e) => !e.payload.candidate_key)) {+ D.textContent = "请先为所选的多来源候选选择来源。", l().find((e) => !e.querySelector("input[type=\"radio\"]:checked"))?.querySelector("input[type=\"radio\"]")?.focus();return;}- i.busy = !0, D.textContent = `正在处理 0 / ${a.length}`, u(r, !0);- r.busy = !0, D.textContent = `正在处理 0 / ${a.length}`, _(i, !0);++ r.busy = !0, D.textContent = `正在处理 0 / ${a.length}`, v(i, !0);let o = [...e.querySelectorAll("button,input")], s = o.map((e) => e.getAttribute("aria-disabled"));o.forEach((e) => e.setAttribute("aria-disabled", "true"));let c = (e) => {e instanceof KeyboardEvent && e.key === "Tab" || (e.preventDefault(), e.stopImmediatePropagation());};e.addEventListener("click", c, !0), e.addEventListener("keydown", c, !0);- let l = 0, f = await Dn(a, async (e) => {- let u = 0, d = await Mn(a, async (e) => {++ let u = 0, d = await Nn(a, async (e) => {try {- return await n.submit(e);+ return await t.submit(e);} finally {- l++, n.active() && (D.textContent = `正在处理 ${l} / ${a.length}`);+ u++, t.active() && (D.textContent = `正在处理 ${u} / ${a.length}`);}}, (e) => {- i.selected.delete(e), i.errors.delete(e), n.applied(e);- }, n.active);- if (i.busy = !1, e.removeEventListener("click", c, !0), e.removeEventListener("keydown", c, !0), o.forEach((e, t) => {+ r.selected.delete(e), r.errors.delete(e), t.applied(e);+ }, t.active);+ if (r.busy = !1, e.removeEventListener("click", c, !0), e.removeEventListener("keydown", c, !0), o.forEach((e, t) => {let n = s[t];n === null ? e.removeAttribute("aria-disabled") : e.setAttribute("aria-disabled", n);- }), u(r, !1), !n.active()) return;- n.notify(`已${t === "approved" ? "通过" : "拒绝"} ${f.completed} 项${f.failures.length ? `,${f.failures.length} 项未完成` : ""}`), f.failures.forEach((e) => i.errors.set(e.key, e.message));- let p = e.parentElement;- n.refresh(), p?.querySelector(".reviewbulktoolbar button")?.focus({ preventScroll: !0 });- }), _(i, !1), !t.active()) return;++ }), v(i, !1), !t.active()) return;+ t.notify(`已${n === "approved" ? "通过" : "拒绝"} ${d.completed} 项${d.failures.length ? `,${d.failures.length} 项未完成` : ""}`), d.failures.forEach((e) => r.errors.set(e.key, e.message));+ let f = e.parentElement;+ t.refresh(), f?.querySelector(".reviewbulktoolbar button")?.focus({ preventScroll: !0 });}- P();- P(), On(e);++ N(), kn(e);}//#endregion//#region src/native-image.ts- function An(e, t, n, r) {-function Fn(e, t, n, r) {++function In(e, t, n, r) {return e > 0 && t > 0 && e === n && t === r;}- function jn(e, t, n, r, i = 1) {-function In(e, t, n, r, i = 1) {++function Ln(e, t, n, r, i = 1) {let a = Number.isFinite(i) && i > 0 ? i : 1;e /= a, t /= a;let o = [@@@ -2762,7 -2863,7 +2892,7 @@@}//#endregion//#region src/entity-skeleton.ts- function Mn(e, t) {-function Ln(e, t) {++function Rn(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>@@@ -2774,7 -2875,7 +2904,7 @@@}//#endregion//#region src/catalog-onboarding.ts- var Nn = [-var Rn = [++var zn = ["loc","creator","performer",@@@ -2791,16 -2892,16 +2921,16 @@@"jav","thumb"];- function Pn() {-function zn() {++function Bn() {let e = (e) => Array(64).fill(e).join("");return {tiers: "<div class=\"tier catalog-placeholder\" aria-hidden=\"true\">" + e("<span class=\"av\"><span class=\"ring\"></span><span class=\"nm\"> </span></span>") + "</div><div class=\"tier catalog-placeholder\" aria-hidden=\"true\">" + e("<span class=\"brandpill\"><span class=\"mk\"></span><span class=\"placeholder-name\"> </span></span>") + "</div>",tags: "<span class=\"catalog-placeholder placeholder-tags\" aria-hidden=\"true\">" + e("<span class=\"pill\"> </span>") + "</span>"};}- async function Fn(e, t) {-async function Bn(e, t) {++async function Vn(e, t) {let n = new URLSearchParams();- for (let t of Nn) e[t] && n.set(t, e[t]);- for (let t of Rn) e[t] && n.set(t, e[t]);++ for (let t of zn) 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 || [],@@@ -2811,9 -2912,9 +2941,9 @@@return r.set("q", e), r.set("limit", "1"), (await t("/api/items?" + r)).total > 0 ? e : "";}))).filter(Boolean);}- function In({ 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", "还没有" + ({-function Vn({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: r = !1, online: i = !1 } = {}) {++function Hn({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: r = !1, online: i = !1 } = {}) {+ let a = r ? "<a class=\"geist-button primary\" href=\"/configuration\">添加内容</a>" : "", o = "<a class=\"geist-button\" href=\"/follow-manage\">添加来源</a>";- return t || n ? l("search", n ? "还没有符合条件的 JAV 作品" : "没有符合条件的内容", n ? "已扫描但尚未补充发行资料的视频可在全部内容中查看。" : "清除筛选或搜索条件后查看全部内容。", { actions: "<a class=\"geist-button primary\" href=\"/?loc=&thumb=0\">查看全部内容</a>" }) : e === "catalog" ? l("play", "还没有视频", "添加媒体文件夹或关注来源,开始建立你的馆藏。", { actions: a + o }) : l(e === "tags" ? "tags" : "user-round", "还没有" + ({++ return t || n ? u("search", n ? "还没有符合条件的 JAV 作品" : "没有符合条件的内容", n ? "已扫描但尚未补充发行资料的视频可在全部内容中查看。" : "清除筛选或搜索条件后查看全部内容。", { actions: "<a class=\"geist-button primary\" href=\"/?loc=&thumb=0\">查看全部内容</a>" }) : e === "catalog" ? u("play", "还没有视频", "添加媒体文件夹或关注来源,开始建立你的馆藏。", { actions: a + o }) : u(e === "tags" ? "tags" : "user-round", "还没有" + ({tags: "标签",performers: "艺人",creators: "创作者",@@@ -2824,7 -2925,7 +2954,7 @@@}//#endregion//#region src/sidebar.ts- function Ln(e) {-function Hn(e) {++function Un(e) {return ["/","/unseen",@@@ -2834,23 -2935,23 +2964,23 @@@"/junk-files"].includes(e) || /^\/(item|mix|parts|editions)\//.test(e) || /^\/playlists\/\d+\/\d+$/.test(e) || /^\/(performers|studios|creators|series|agencies)\/.+/.test(e);}- function Rn(e, t) {-function Un(e, t) {++function Wn(e, t) {return e.dataset.surface === t && e.querySelector(".dnav") ? !1 : (e.dataset.surface = t, e.replaceChildren(), !0);}- function zn(e) {-function Wn(e) {++function Gn(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 Bn(e) {-function Gn(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 Vn(e, t) {-function Kn(e, t) {++function qn(e, t) {return t.filter((t) => e.some((e) => e.location === t));}- function Hn() {-function qn() {++function Jn() {return `<div class="cleanuppage" data-skeleton="cleanup" aria-busy="true" aria-label="正在读取数据管理状态"><div class="cleanupgrid">${[[@@@ -2896,9 -2997,9 +3026,9 @@@<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 Un(e, t = !1, n = !1) {-function Jn(e, t = !1, n = !1) {++function Yn(e, t = !1, n = !1) {if (t || n) return "";- let r = "<svg aria-hidden=\"true\"><use href=\"#i-external-link\"></use></svg>";+ let r = "<svg class=\"externalmark\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><use href=\"#i-external-link\"></use></svg>";return `<details class="taste-history-guide"${e ? " open" : ""}><summary>浏览器历史记录导入指南</summary><div class="taste-history-guide-content">@@@ -2910,70 -3011,92 +3040,92 @@@<button type="button" class="geist-button taste-guide-skip">跳过</button></div></details>`;}- var Wn = "peach-taste-guide-dismissed";- function Gn(e, t) {- d(e, ".taste-history-guide", "taste-guide-collapse");-var Yn = "peach-taste-guide-dismissed";-function Xn(e, t) {- v(e, ".taste-history-guide", "taste-guide-collapse");++var Xn = "peach-taste-guide-dismissed";++function Zn(e, t) {++ y(e, ".taste-history-guide", "taste-guide-collapse");let n = e.querySelector(".taste-history-guide");n?.querySelector(".taste-guide-skip")?.addEventListener("click", () => {- t.setItem(Wn, "1"), n.remove();- t.setItem(Yn, "1"), n.remove();++ t.setItem(Xn, "1"), n.remove();});}//#endregion+ //#region src/resource-sync.ts-var $ = (e = 0) => Number(e).toLocaleString(), Zn = {++var $ = (e = 0) => Number(e).toLocaleString(), Qn = {+ local: "本地磁盘",+ 115: "115",+ pikpak: "PikPak"+ };-function Qn(e, t) {++function $n(e, t) {+ let n = e.cache || {+ files: 0,+ bytes: 0+ }, r = !!(e.missing || n.files);+ return `<div class="resourcepanel" data-geist-fieldset><div class="resourcesources">${(e.sources || []).map((e) => `<article>- <div class="resourcesourcetitle"><b>${Zn[e.location] || "媒体来源"}</b><span class="${e.online ? "online" : "offline"}">${e.online ? "可访问" : "离线,已跳过"}</span></div>++ <div class="resourcesourcetitle"><b>${Qn[e.location] || "媒体来源"}</b><span class="${e.online ? "online" : "offline"}">${e.online ? "可访问" : "离线,已跳过"}</span></div>+ <strong>${e.online ? `${$(e.missing)} 项` : "—"}</strong>+ <small>${e.online ? `找不到文件 · 已检查 ${$(e.checked)} 项` : `馆藏中有 ${$(e.total)} 项`}</small>+ ${e.unreadable ? `<small>${$(e.unreadable)} 项读取失败,已跳过</small>` : ""}</article>`).join("")}</div>+ <div class="resourcecache"><div><span>可清理的缓存</span><b>${$(n.files)} 个</b><small>${t(n.bytes)}</small></div>+ <div><span>待移入回收站</span><b>${$(e.missing)} 项</b></div></div>- ${r ? f(`将把找不到文件的 ${$(e.missing)} 项馆藏记录移入回收站,并清理 ${$(n.files)} 个闲置缓存。`, { label: "清理内容" }) : ""}++ ${r ? p(`将把找不到文件的 ${$(e.missing)} 项馆藏记录移入回收站,并清理 ${$(n.files)} 个闲置缓存。`, { label: "清理内容" }) : ""}+ <div class="resourceapplyrow geist-fieldset-footer" data-geist-fieldset-footer>${r ? "<button class=\"geist-button primary\" type=\"button\" id=\"resourceApply\">清理失效记录与缓存</button>" : "<p class=\"resourcesyncok\">已检查可访问的来源,没有待清理的记录或缓存。</p>"}</div></div>`;+ }+ //#endregion//#region src/jav-artwork.ts- function Kn(e) {-function $n(e) {++function er(e) {return ["small","sleeve","preview"].includes(String(e)) ? "small" : "big";}- function qn(e) {-function er(e) {++function tr(e) {return {- javLayout: Kn(e.javLayout),- javImage: Jn(e.javLayout === "preview" ? "thumbnail" : e.javImage)- javLayout: $n(e.javLayout),- javImage: tr(e.javLayout === "preview" ? "thumbnail" : e.javImage)++ javLayout: er(e.javLayout),++ javImage: nr(e.javLayout === "preview" ? "thumbnail" : e.javImage)};}- function Jn(e) {-function tr(e) {++function nr(e) {return e === "thumbnail" ? "thumbnail" : "cover";}- function Yn(e, t) {- return e.is_jav && e.code && e.has_cover && (Jn(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";-function nr(e, t) {- return e.is_jav && e.code && e.has_cover && (tr(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";-}+ function rr(e, t) {++ return e.is_jav && e.code && e.has_cover && (nr(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";+}- function Xn(e, t) {++function ir(e, t) {e.querySelectorAll("img[data-jav-image]").forEach((e) => {- let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (Jn(t) === "cover" || !r)), a = i ? n : r;- let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (tr(t) === "cover" || !r)), a = i ? n : r;++ let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (nr(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 Zn = {-var ir = {++var ar = {"library-processing": {- load: mn,- component: hn- load: vn,- component: yn++ load: yn,++ component: bn},scraping: {- load: un,- component: pn- load: mn,- component: _n++ load: hn,++ component: vn},"quality-goals": {- load: an,- component: sn- load: ln,- component: dn++ load: un,++ component: fn},configuration: {- load: ut,- component: gt- load: pt,- component: bt++ load: mt,++ component: xt}- }, Qn = () => Object.keys(Zn), $n = /* @__PURE__ */ new Map();- async function er(e, t, n, r = {}) {- let i = Zn[e];-}, ar = () => Object.keys(ir), or = /* @__PURE__ */ new Map();-async function sr(e, t, n, r = {}) {- let i = ir[e];++}, or = () => Object.keys(ar), sr = /* @__PURE__ */ new Map();++async function cr(e, t, n, r = {}) {++ let i = ar[e];if (!i) throw Error(`未注册的 island:${String(e)}`);- tr(t);- cr(t);++ lr(t);let a = {controller: new AbortController(),painted: !1};- $n.set(t, a);- or.set(t, a);++ sr.set(t, a);let o;try {o = {@@@ -2987,9 -3110,9 +3139,9 @@@error: R(e)};}- if ($n.get(t) !== a) return;- if (or.get(t) !== a) return;++ if (sr.get(t) !== a) return;if (r.isCurrent && !r.isCurrent()) {- $n.delete(t);- or.delete(t);++ sr.delete(t);return;}t.textContent = "", a.painted = !0;@@@ -2997,11 -3120,11 +3149,11 @@@...n,...o};- Ee(ie(i.component, s), t);- De(ae(i.component, s), t);++ Oe(oe(i.component, s), t);}- function tr(e) {- let t = $n.get(e);- t && (t.controller.abort(), $n.delete(e), t.painted && Ee(null, e));-function cr(e) {- let t = or.get(e);- t && (t.controller.abort(), or.delete(e), t.painted && De(null, e));++function lr(e) {++ let t = sr.get(e);++ t && (t.controller.abort(), sr.delete(e), t.painted && Oe(null, e));}//#endregion- export { Wn as TASTE_GUIDE_KEY, In as catalogEmptyHtml, Fn as catalogSuggestions, Hn as cleanupSkeletonHtml, Bn as cloudLocations, Vn as cloudPreferenceLocations, Cn as createReviewSelection, Pn as emptyCatalogLayout, Mn as entitySkeletonHtml, ln as followJobProgress, xn as identityEvidenceHtml, Qn as islandNames, Yn as javImageKind, An as matchesFaceSource, er as mountIsland, jn as nativeImageFit, Jn as normalizeJavImage, Kn as normalizeJavLayout, qn as normalizeJavPreferences, De as preferredDirection, vn as refreshStore, bn as reviewImageHtml, Ln as sidebarHasCatalogContent, zn as sidebarTagCounts, _n as storeNames, Xn as syncJavImages, Rn as syncSidebarSurface, Un as tasteHistoryGuideHtml, tr as unmountIsland, cn as watchJob, Sn as wireReviewPictures, kn as wireReviewSelection, Gn as wireTasteHistoryGuide };-export { Yn as TASTE_GUIDE_KEY, Vn as catalogEmptyHtml, Bn as catalogSuggestions, qn as cleanupSkeletonHtml, Gn as cloudLocations, Kn as cloudPreferenceLocations, Dn as createReviewSelection, zn as emptyCatalogLayout, Ln as entitySkeletonHtml, pn as followJobProgress, Tn as identityEvidenceHtml, ar as islandNames, nr as javImageKind, Fn as matchesFaceSource, sr as mountIsland, In as nativeImageFit, tr as normalizeJavImage, $n as normalizeJavLayout, er as normalizeJavPreferences, Oe as preferredDirection, Sn as refreshStore, Qn as resourceScanHtml, wn as reviewImageHtml, Hn as sidebarHasCatalogContent, Wn as sidebarTagCounts, xn as storeNames, rr as syncJavImages, Un as syncSidebarSurface, Jn as tasteHistoryGuideHtml, cr as unmountIsland, On as updateReviewSticky, fn as watchJob, En as wireReviewPictures, Pn as wireReviewSelection, Xn as wireTasteHistoryGuide };++export { Xn as TASTE_GUIDE_KEY, Hn as catalogEmptyHtml, Vn as catalogSuggestions, Jn as cleanupSkeletonHtml, Kn as cloudLocations, qn as cloudPreferenceLocations, On as createReviewSelection, Bn as emptyCatalogLayout, Rn as entitySkeletonHtml, mn as followJobProgress, En as identityEvidenceHtml, or as islandNames, rr as javImageKind, In as matchesFaceSource, cr as mountIsland, Ln as nativeImageFit, nr as normalizeJavImage, er as normalizeJavLayout, tr as normalizeJavPreferences, ke as preferredDirection, Cn as refreshStore, $n as resourceScanHtml, Tn as reviewImageHtml, Un as sidebarHasCatalogContent, Gn as sidebarTagCounts, Sn as storeNames, ir as syncJavImages, Wn as syncSidebarSurface, Yn as tasteHistoryGuideHtml, lr as unmountIsland, kn as updateReviewSticky, pn as watchJob, Dn as wireReviewPictures, Fn as wireReviewSelection, Zn as wireTasteHistoryGuide };