Peach: Local-first video metadata scraper and media manager.
fix(review): expose identity evidence and local work inspection
longmeidao3a2aab657240
diff --git a/README.en.md b/README.en.mdindex 0d8d9e556..0177e359d 100644--- a/README.en.md+++ b/README.en.md@@ -47,7 +47,7 @@ Tray-managed services let you adjust media sources under Manage → ConfiguratioIn Configuration or Data Management, Scan and enrich scans folders, detects existing NFO files and local posters, and fetches missing metadata. While processing, the home page links to progress in Configuration. Same-name NFO files, `movie.nfo` in single-movie folders, and episode NFO files are supported. Metadata retains its original source and enters the review queue before updating the catalog. Local custom tags are preserved; folders containing multiple videos do not share `movie.nfo`.-Review items have checkboxes beside their names and support Shift range selection. Group by candidate count, source or field, then approve or reject selected items across groups. Choosing a shared source does not submit a decision; approve the selection to adopt it. Failed items retain their selection and error message for retry.+Review items have checkboxes beside their names and support Shift range selection. Group by candidate count, source or field, then approve or reject selected items across groups. Choosing a shared source does not submit a decision; approve the selection to adopt it. Failed items retain their selection and error message for retry. Identity candidates link to source profiles, local samples and file locations, with access to all associated works. Approval records the identity assessment.Follow sources include FANBOX, Patreon, SubscribeStar, Kemono, Pawchive, Coomer, the Rule34 family and F95zone. Availability depends on the site and your access rights. See [source collection](docs/SOURCING.md) for supported workflows and boundaries.diff --git a/README.md b/README.mdindex ba8c5bcf1..334f56f1f 100644--- a/README.md+++ b/README.md@@ -42,7 +42,7 @@ CloudDrive · 115 与 CloudDrive · PikPak 按本机文件夹接入;先在 Clo在「配置」或「数据管理」点击「扫描并补全资料」,可统一扫描文件夹、识别已有 NFO 和本地海报,并采集缺失资料。首页在处理期间提供进度入口,配置页显示当前阶段。支持同名 NFO、单影片目录的 `movie.nfo` 和单集 NFO;资料保留原始出处,在「复核资料」确认后写入馆藏。已有本地标签会保留,目录中有多部影片时不会共用 `movie.nfo`。「管理 → 配置 → 检查更新」显示当前版本与 GitHub 最新测试版。独立 Windows 包可直接下载并准备更新,进度实时显示;完成后选择「立即重启」或「稍后」,程序自动安装,失败时恢复旧版本。-复核名称前提供勾选框,支持 Shift 连选,按候选数量、来源或字段分组,跨组通过或拒绝所选项目。可统一选择共同来源,点击通过后才会采用;失败项保留选择和错误提示,可重试。+复核名称前提供勾选框,支持 Shift 连选,按候选数量、来源或字段分组,跨组通过或拒绝所选项目。可统一选择共同来源,点击通过后才会采用;失败项保留选择和错误提示,可重试。身份候选提供来源资料、本地作品样本和文件位置入口,可打开全部作品核对;通过后登记身份判断。首次设置可选择进入浏览器历史记录导入指南;完成导入后指南隐藏,点击「跳过」会在当前浏览器记住选择,折叠仍保留指南。需要补充记录时使用「口味」页的读取或导入按钮。设置中的「SFW 模式」会模糊、降低饱和度并压暗图片和视频,停止悬停预览,文字保持可见。数据管理中的「网盘与本地数据库」仅在配置网盘后显示;空文件夹清理也支持本地磁盘。diff --git a/docs/REUSE.md b/docs/REUSE.mdindex c844a5e26..c69061362 100644--- a/docs/REUSE.md+++ b/docs/REUSE.md@@ -1,6 +1,6 @@# 复用清单-复核复用 Checkbox、Button、Badge、Select 与 `/api/review/decision`,默认勾选并沿用馆藏页 Shift 连选语义;支持跨组通过/拒绝与无歧义的共同来源选择。按候选数量、来源组合或字段分组,每项仅出现一次,切组保留选择;成功移出、失败保留,页面离开后停止后续提交。正文使用不占宽度的 Scroller,完成结果复用成功 Note。+复核复用 Checkbox、Button、Badge、Select 与 `/api/review/decision`,默认勾选并沿用馆藏页 Shift 连选语义;支持跨组通过/拒绝与无歧义的共同来源选择。按候选数量、来源组合或字段分组,每项仅出现一次,切组保留选择;成功移出、失败保留,页面离开后停止后续提交。正文使用不占宽度的 Scroller,完成结果复用成功 Note。身份候选复用创作者页、作品详情与 revealSource 核对样本;来源图片和缺图占位共用 220px 预览区,加载失败保留占位。样本读取支持无缩略图作品,回收站不参与。## 本机设置与卸载diff --git a/docs/STATUS.md b/docs/STATUS.mdindex 46fff3820..4e4809750 100644--- a/docs/STATUS.md+++ b/docs/STATUS.md@@ -8,7 +8,7 @@## 运行态-- 复核控件见 `REUSE.md`。+- 复核取证见 `REUSE.md`。- 女优头像 545 张:2026-09-06 经用户批准换上 54 张 Gfriends 正脸照,脸宽中位数 148px → 320px;被顶掉的整套留在 `avatars-superseded/`,挑图与换源判据见 `SOURCING.md`。- 小图显示、资料骨架、官网图标、X 原色及自动播放开关已实现;桌面和手机预览通过,生产浏览器取证受客户端限制。请求共用 Chrome UA。diff --git a/docs/reference-snapshots/vercel-review-actions.md b/docs/reference-snapshots/vercel-review-actions.mdindex 0e2ce92ec..ff166a675 100644--- a/docs/reference-snapshots/vercel-review-actions.md+++ b/docs/reference-snapshots/vercel-review-actions.md@@ -11,3 +11,5 @@- 本次补核官方 https://vercel.com/geist/badge :Badge 表达静态状态信息;将「已选 N 项」放入中性 Badge 是 Peach 的布局选择,并非官方指定的计数控件。- Button 页面 DOM SHA-256:`12350909671ae8d5c6f2a357b3bce2ae3494ba2901394cb6d25f04655e444793`。32px 按钮采用居中布局;主操作、警告和错误使用各自语义色,禁用态使用中性色。- 本次 DOM、计算样式和隔离浏览器验证归档于 `attic/evidence/20260906-review-default-selection/`。++- 2026-09-06 复核 https://vercel.com/geist/fieldset :卡片支持底部操作区。Peach 将复核操作组右对齐,保持原有按钮顺序;这是本地布局选择。来源图片与缺图占位使用等高 220px 区域、名称勾选间距 8px,均为 Peach 的资料核对布局,非官方图像尺寸规范。验证归档于 `attic/evidence/20260906-review-evidence-layout/`。diff --git a/frontend/src/islands.ts b/frontend/src/islands.tsindex c969ef18c..cdb6b2fa2 100644--- a/frontend/src/islands.ts+++ b/frontend/src/islands.ts@@ -32,6 +32,7 @@ import type { LibraryProcessingData, LibraryProcessingProps } from './islands/li* 怎么写一个 store 见 `./state/index.ts` 和 `docs/FRONTEND.md`。 */export { refreshStore, storeNames } from './state';export { watchJob, followJobProgress } from './jobs';+export { identityEvidenceHtml, reviewImageHtml, wireReviewPictures } from './review-evidence';export { createReviewSelection, wireReviewSelection } from './review-bulk';export { nativeImageFit, matchesFaceSource } from './native-image';export { entitySkeletonHtml } from './entity-skeleton';diff --git a/frontend/src/legacy/core.d.ts b/frontend/src/legacy/core.d.tsindex db135f3f7..2dacf09ca 100644--- a/frontend/src/legacy/core.d.ts+++ b/frontend/src/legacy/core.d.ts@@ -13,3 +13,5 @@ export declare function fmtDur(seconds: number | null | undefined): string;/** 字节格式化成 TB/GB/MB。 */export declare function fmtSize(bytes: number | null | undefined): string;++export declare function esc(value: string): string;diff --git a/frontend/src/review-evidence.ts b/frontend/src/review-evidence.tsnew file mode 100644index 000000000..c15a4c455--- /dev/null+++ b/frontend/src/review-evidence.ts@@ -0,0 +1,35 @@+import { esc } from '@peach/legacy/core';++interface IdentityEvidence {+ creator?: string; babepedia_name?: string; preview_url?: string; profile_url?: string;+ videos?: string | number; video_count?: number;+ preview_assets?: { id: number; name: string; has_preview?: boolean }[];+}+const webUrl = (value = '') => /^https?:\/\//i.test(value) ? value : '';++export function reviewImageHtml(url = '') {+ const image = webUrl(url) || (url.startsWith('/') && !url.startsWith('//') ? url : '');+ return `<div class="reviewimage" data-review-picture><span class="reviewimageempty"${image ? ' hidden' : ''}>未取得来源图片</span>${image ? `<img src="${esc(image)}" alt="来源候选图片" loading="lazy">` : ''}</div>`;+}++export function identityEvidenceHtml(row: IdentityEvidence) {+ const profile = webUrl(row.profile_url), samples = (row.preview_assets || []).slice(0, 6);+ const count = Math.max(0, Number(row.video_count || row.videos || 0));+ return `<section class="reviewidentityevidence"><h5>候选身份:${esc(row.babepedia_name || '未标注')}</h5>+ <div class="reviewevidenceactions">${profile ? `<a class="geist-button" href="${esc(profile)}" target="_blank" rel="noopener noreferrer">来源资料 ↗</a>` : ''}+ <button type="button" class="geist-button" data-entity-kind="creator" data-entity-name="${esc(row.creator || '')}">查看全部 ${count.toLocaleString()} 部作品</button></div>+ ${reviewImageHtml(row.preview_url)}+ <p>通过后记录身份判断。</p>+ ${samples.length ? `<h5>本地作品样本</h5><div class="reviewevidencesamples">${samples.map(asset => `<div class="reviewevidencesample">+ <button class="geist-button" type="button" data-review-open-item="${asset.id}"><span data-middle-truncate title="${esc(asset.name)}">${esc(asset.name)}</span></button>+ <button class="geist-button" type="button" data-review-reveal="${asset.id}" aria-label="打开 ${esc(asset.name)} 的文件位置">文件位置</button>+ </div>`).join('')}</div>` : '<p>暂无本地作品样本,打开全部作品核对。</p>'}</section>`;+}++export function wireReviewPictures(root: ParentNode) {+ for (const image of root.querySelectorAll<HTMLImageElement>('[data-review-picture] img')) {+ const failed = () => { image.hidden = true; const placeholder = image.parentElement?.querySelector<HTMLElement>('.reviewimageempty'); if (placeholder) placeholder.hidden = false; };+ image.addEventListener('error', failed);+ if (image.complete && !image.naturalWidth) failed();+ }+}diff --git a/frontend/test/review-evidence.test.ts b/frontend/test/review-evidence.test.tsnew file mode 100644index 000000000..f005424d1--- /dev/null+++ b/frontend/test/review-evidence.test.ts@@ -0,0 +1,25 @@+import { afterEach, expect, it } from 'vitest';+import { identityEvidenceHtml, reviewImageHtml, wireReviewPictures } from '../src/review-evidence';+afterEach(()=>{document.body.innerHTML='';});+it('身份候选区分来源资料与本地作品,全部作品与文件定位保留准确对象',()=>{+ document.body.innerHTML=identityEvidenceHtml({creator:'sample',babepedia_name:'Sample',videos:336,profile_url:'https://example.com/person',preview_assets:[{id:42,name:'sample.mp4'}]});+ expect(document.body.textContent).toContain('查看全部 336 部作品');+ expect(document.querySelector('[data-entity-name="sample"]')).not.toBeNull();+ expect(document.querySelector('[data-review-reveal="42"]')).not.toBeNull();+ expect(document.querySelector('[data-review-open-item="42"]')).not.toBeNull();+ expect(document.body.textContent).toContain('通过后记录身份判断');+ expect(document.querySelector('a')?.rel).toContain('noopener');+});+it('图片缺失与加载失败都保留同一个预览容器',()=>{+ document.body.innerHTML=reviewImageHtml();expect(document.querySelector('.reviewimageempty')?.hasAttribute('hidden')).toBe(false);+ document.body.innerHTML=reviewImageHtml('https://example.com/photo.jpg');wireReviewPictures(document);+ document.querySelector('img')!.dispatchEvent(new Event('error'));+ expect(document.querySelector<HTMLImageElement>('img')!.hidden).toBe(true);+ expect(document.querySelector<HTMLElement>('.reviewimageempty')!.hidden).toBe(false);+ expect(document.querySelectorAll('.reviewimage')).toHaveLength(1);+});+it('来源与名称按安全链接和文本处理,样本展示有界',()=>{+ document.body.innerHTML=identityEvidenceHtml({creator:'<script>',profile_url:'javascript:alert(1)',preview_assets:Array.from({length:60},(_,id)=>({id,name:'<b>sample</b>'}))});+ expect(document.querySelector('a')).toBeNull();expect(document.querySelector('script,b')).toBeNull();+ expect(document.querySelectorAll('[data-review-reveal]')).toHaveLength(6);+});diff --git a/frontend/test/stubs/legacy-core.ts b/frontend/test/stubs/legacy-core.tsindex 4bc6ec3ad..362f99ec8 100644--- a/frontend/test/stubs/legacy-core.ts+++ b/frontend/test/stubs/legacy-core.ts@@ -27,3 +27,5 @@ export const fmtSize = (bytes: number | null | undefined): string => {if (value >= 1073741824) return `${(value / 1073741824).toFixed(1)} GB`;return `${Math.floor(value / 1048576)} MB`;};++export const esc = (value: string): string => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """);diff --git a/src/peach/web_review.py b/src/peach/web_review.pyindex 7d30c45ec..3ae92531b 100644--- a/src/peach/web_review.py+++ b/src/peach/web_review.py@@ -185,7 +185,7 @@ def _creator_entity_ids(connection, creators: list[str]) -> dict[str, int]:return found-def _creator_previews(connection, creators: list[str]) -> dict[str, list[dict]]:+def _creator_previews(connection, creators: list[str], *, include_unpictured: bool = False) -> dict[str, list[dict]]:"""一次查完所有候选创作者的预览作品;按候选逐个查是 N+1。"""wanted = [name for name in dict.fromkeys(creators) if name]if not wanted:@@ -197,8 +197,8 @@ def _creator_previews(connection, creators: list[str]) -> dict[str, list[dict]]:"LEFT JOIN entity e ON e.id=ae.entity_id AND e.kind='creator' ""LEFT JOIN entity_alias alias ON alias.entity_id=e.id ""WHERE a.medium='video' AND (a.disposal IS NULL OR a.disposal<>'trash') "- "AND a.snapshot_path IS NOT NULL "- f"AND (e.canonical_name IN ({marks}) OR alias.alias IN ({marks}) OR a.creator IN ({marks})) "+ + ("" if include_unpictured else "AND a.snapshot_path IS NOT NULL ")+ + f"AND (e.canonical_name IN ({marks}) OR alias.alias IN ({marks}) OR a.creator IN ({marks})) ""ORDER BY a.id",[*wanted, *wanted, *wanted],).fetchall()@@ -332,16 +332,16 @@ def _review_rows(contract: ReviewContract, category: str) -> tuple[list[dict], s(category,),)}- if category == "creator_tags":+ if category in {"creator_tags", "western_identity"}:names = [str(row.get("creator") or "").strip() for row in rows]- previews = _creator_previews(connection, names)+ previews = _creator_previews(connection, names, include_unpictured=category == "western_identity")# 这批候选判的是「这位创作者的作品该打什么标签」,主体是创作者本人。# 页面要给出创作者入口(头像 + 作品数),所以这里得把规范实体解析出来。entities = _creator_entity_ids(connection, names)for row in rows:name = str(row.get("creator") or "").strip()row["preview_assets"] = previews.get(name, [])- row["entity_id"] = entities.get(name, "")+ row["entity_id"] = entities.get(name, row.get("entity_id", ""))elif category == "metadata_fields":for row in rows:try:diff --git a/tests/test_web_review.py b/tests/test_web_review.pyindex f269d59a2..aafdf8a15 100644--- a/tests/test_web_review.py+++ b/tests/test_web_review.py@@ -822,6 +822,21 @@ class ReviewQueueTests(unittest.TestCase):writer.writeheader(); writer.writerows(rows)return path+ def test_identity_samples_include_unpictured_files_and_exclude_trash(self):+ with sqlite3.connect(self.db_path) as connection:+ connection.execute("UPDATE asset SET snapshot_path=NULL WHERE id=2")+ connection.execute("UPDATE asset SET disposal='trash' WHERE id=3")+ connection.close()+ self._csv("babepedia-candidates.csv", ["entity_id", "creator", "videos", "verdict"],+ [{"entity_id": "1", "creator": "ukiru", "videos": "2", "verdict": "命中"}])+ row = rm_review.q_review(self.contract)["sections"]["western_identity"][0]+ self.assertEqual([asset["id"] for asset in row["preview_assets"]], [1, 2])+ with sqlite3.connect(self.db_path) as connection:+ connection.row_factory = sqlite3.Row+ pictured = rm_review._creator_previews(connection, ["ukiru"])+ connection.close()+ self.assertEqual([asset["id"] for asset in pictured["ukiru"]], [1])+def test_settled_western_identity_rows_stay_out_of_the_queue(self):# 168 条里 143 条是「确认无档案」,站上确实没有这个人,没有可判断的东西。fields = ["entity_id", "creator", "videos", "verdict", "matched_variant",diff --git a/tests/test_web_ui.py b/tests/test_web_ui.pyindex 56eb077cf..71301e14b 100644--- a/tests/test_web_ui.py+++ b/tests/test_web_ui.py@@ -4139,6 +4139,13 @@ class WebUiSourceTests(unittest.TestCase):self.assertPageContains(".reviewasset.picked{opacity:1;outline:2px solid var(--ink)")self.assertPageContains('.reviewitem[data-decision="approved"]::before{background:var(--keep)}')+ def test_identity_review_keeps_picture_geometry_and_checkbox_spacing(self):+ self.assertPageContains('.reviewentity .reviewpickheading{display:flex;align-items:center;gap:8px}')+ self.assertPageContains('.reviewimage{width:100%;height:220px')+ self.assertPageContains('justify-content:flex-end}')+ self.assertPageContains("reviewCategory==='western_identity'?identityEvidenceHtml(row)")+ self.assertPageContains('revealSource(+button.dataset.reviewReveal')+def test_review_cards_use_equal_height_fieldsets_and_one_shared_scroller(self):self.assertPageContains('class="reviewitem" data-geist-fieldset')self.assertPageContains('class="geist-fieldset-content">${scrollerHtml(body')diff --git a/web/app.js b/web/app.jsindex 272e1d526..43608c7e5 100644--- a/web/app.js+++ b/web/app.js@@ -5,7 +5,7 @@ import { javDisplayName, javTitleHtml } from './js/jav-title.js';import { matchRoute, routeLabel } from './js/routes.js';import { initMiddleTruncate } from './js/middle-truncate.js';import { tagLabel } from './js/tags.js';-import { mountIsland, unmountIsland, createReviewSelection, wireReviewSelection, preferredDirection } from './dist/peach-ui.js';+import { mountIsland, unmountIsland, createReviewSelection, wireReviewSelection, identityEvidenceHtml, reviewImageHtml, wireReviewPictures, preferredDirection } from './dist/peach-ui.js';import { catalogSuggestions, catalogEmptyHtml, emptyCatalogLayout, syncSidebarSurface, sidebarTagCounts, sidebarHasCatalogContent, cleanupSkeletonHtml, cloudLocations, cloudPreferenceLocations, tasteHistoryGuideHtml, wireTasteHistoryGuide, TASTE_GUIDE_KEY } from './dist/peach-ui.js';import { javImageKind, normalizeJavImage, normalizeJavLayout, normalizeJavPreferences, syncJavImages, nativeImageFit, matchesFaceSource, entitySkeletonHtml } from './dist/peach-ui.js';import {@@ -3785,7 +3785,7 @@ async function openReview(push=true){// 空白一片会被当成界面坏了。真实原因是这些作品还没抽帧,说清楚比留白好。: `<p class="empty">这 ${esc(row.video_count||'')} 条作品尚未抽帧,暂无预览;批准后仍会按候选写入标签</p>`): reviewCategory==='fc2_similarity'?''- : (row.preview_url?`<div class="reviewimage"><img src="${esc(row.preview_url)}" alt="" loading="lazy" data-drop="closest:.reviewimage"></div>`:'<p class="empty">未取得图片预览</p>');+ : reviewCategory==='western_identity'?identityEvidenceHtml(row):reviewImageHtml(row.preview_url);const body=`${// 实体类卡片的名字已经写在创作者入口里,再画一个 h4 就是同一行字上下两遍。subjectKind&&subjectName?'':`<h4>${esc(titleText)}</h4>`}${@@ -3796,7 +3796,8 @@ async function openReview(push=true){const actions=`<button class="geist-button primary" data-review-status="approved"${canApprove&&!locked?'':' disabled'}>${approveLabel}</button><button class="geist-button warning" data-review-status="skipped"${locked?' disabled':''}>跳过</button><button class="geist-button error" data-review-status="rejected"${locked?' disabled':''}>拒绝</button><span class="reviewstate" aria-live="polite"></span>`;return `<fieldset class="reviewitem" data-geist-fieldset data-review-key="${esc(key)}" data-decision="${esc(decision)}"><legend class="sr-only">${esc(titleText)}</legend><div class="geist-fieldset-content">${scrollerHtml(body,{className:'reviewcontent',label:`复核:${titleText}`})}</div><footer class="reviewactions geist-fieldset-footer" data-geist-fieldset-footer>${actions}</footer></fieldset>`}).join(''):emptyState('square-check-big','暂无候选','该分类当前没有待人工复核的项目。')}</div></section></div>`;wireReviewAssets($('#stats'));- wireScrollers($('#stats'));+ wireScrollers($('#stats'));wireReviewPictures($('#stats'));+ $('#stats').querySelectorAll('[data-review-reveal]').forEach(button=>button.onclick=()=>revealSource(+button.dataset.reviewReveal,button.closest('[data-review-key]').querySelector('.reviewstate'),{button}));$('#stats').querySelectorAll('[data-review-open-item]').forEach(button=>button.onclick=()=>openItem(+button.dataset.reviewOpenItem));// 没有全局委托,每个界面各自接线(见 #stage 的同类处理)。$('#stats').querySelectorAll('[data-entity-kind]').forEach(button=>button.onclick=()=>diff --git a/web/css/04-manage.css b/web/css/04-manage.cssindex 3d3badf38..282e1dde6 100644--- a/web/css/04-manage.css+++ b/web/css/04-manage.css@@ -22,9 +22,10 @@.reviewpickheading{display:flex;align-items:center;gap:8px}.reviewpickname{min-width:0;overflow:hidden;text-overflow:ellipsis}.reviewpickitem[hidden],.reviewbulkbar [hidden]{display:none}-.reviewgroup>.reviewstate:empty{display:none}+.reviewgroup>.reviewactions .reviewstate:not(:empty){flex-basis:100%;text-align:right}+.reviewstate:empty{display:none}.library-processing-result{margin-top:16px}-.reviewitem .reviewactions{flex:0 0 auto;box-sizing:border-box;min-height:56px;margin:0;padding:12px 12px 12px 20px;background:var(--overlay-5);border-top:1px solid var(--line-soft);border-radius:0 0 var(--floating-radius) var(--floating-radius);display:flex;gap:8px}+.reviewitem .reviewactions{flex:0 0 auto;box-sizing:border-box;min-height:56px;margin:0;padding:12px 12px 12px 20px;background:var(--overlay-5);border-top:1px solid var(--line-soft);border-radius:0 0 var(--floating-radius) var(--floating-radius);display:flex;gap:8px;justify-content:flex-end}.reviewtags{display:flex;flex-wrap:wrap;gap:5px;margin:9px 0}.reviewtags span{padding:3px 9px;border:1px solid var(--border-15);border-radius:var(--pill-radius);font-size:var(--fs-xs);color:var(--ink-2)}/* 唯一候选:纯展示,几何对齐 .revieworigin,不画单选圈。radio 仍在 DOM 里,提交路径读的就是它;只是没什么可选的时候不该让人以为还有别的选项。 */@@ -41,6 +42,7 @@.reviewpick{margin:10px 0 4px;border:1px solid var(--border-10);border-radius:var(--surface-radius);background:var(--overlay-5);padding:8px}.reviewpickhead{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-size:var(--fs-xs);color:var(--muted)}.reviewpickhead button{border:1px solid var(--border-15);border-radius:var(--control-radius);background:transparent;color:var(--ink-2);padding:3px 10px;font-size:var(--fs-xs);cursor:pointer}.reviewpickhead button:hover{background:var(--hover);color:var(--ink)}.reviewpickhead [data-picked-count]{margin-right:auto}.reviewasset-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:6px}.reviewasset{position:relative;aspect-ratio:16/10;border:0;padding:0;border-radius:var(--surface-radius);overflow:hidden;background:#000;cursor:pointer;opacity:.5;transition:opacity .12s ease}.reviewasset img{width:100%;height:100%;object-fit:cover;display:block}.reviewasset .pickmark{position:absolute;top:4px;right:4px;width:19px;height:19px;border-radius:50%;display:none;place-items:center;background:var(--ink);color:var(--ground)}.reviewasset .pickmark svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:3}.reviewasset.picked{opacity:1;outline:2px solid var(--ink);outline-offset:-2px}.reviewasset.picked .pickmark{display:grid}.reviewactions{display:flex;gap:7px;margin-top:12px;align-items:center;flex-wrap:wrap}/* 判定失败必须说出来:原来失败是静默的,按钮还卡在 disabled。 */.reviewstate{font-size:var(--fs-xs);color:var(--drop);min-width:0;flex:1 1 100%}+.reviewactions .reviewstate:not(:empty){flex-basis:100%;text-align:right}.reviewstate:empty{display:none}.reviewalias{margin:2px 0 0;font-size:var(--fs-xs);color:var(--muted)}/* 数据管理整页收进一条窄列(vercel.com/geist/fieldset 实测示例块宽 812px),diff --git a/web/css/11-identity.css b/web/css/11-identity.cssindex 05a2a73b0..16cce0492 100644--- a/web/css/11-identity.css+++ b/web/css/11-identity.css@@ -110,6 +110,7 @@ button.serieslink.entitylink:hover{color:var(--tungsten);text-decoration:none}background:var(--hover);padding:6px 9px;color:var(--ink-2);cursor:pointer}.reviewentity>div button:hover{color:var(--ink-2)}.reviewentity>div button svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2}+.reviewentity .reviewpickheading{display:flex;align-items:center;gap:8px}.reviewentity small{display:block;margin-top:7px;color:var(--muted);font-size:var(--fs-xs)}.revieworigincover{width:132px;aspect-ratio:16/10;border:0;border-radius:var(--surface-radius);overflow:hidden;background:#000;padding:0;cursor:pointer}.revieworigincover img{width:100%;height:100%;object-fit:contain;display:block}.revieworigincover span{display:grid;place-items:center;width:100%;height:100%;color:var(--muted)}diff --git a/web/css/19-immersive.css b/web/css/19-immersive.cssindex 0a8cf5986..f5f1a4183 100644--- a/web/css/19-immersive.css+++ b/web/css/19-immersive.css@@ -218,7 +218,14 @@}#searchBtn{display:none}.searchback{display:none}-.reviewimage{width:160px;height:112px;border-radius:var(--surface-radius);overflow:hidden;background:#000;margin:8px 0}.reviewimage img{width:100%;height:100%;object-fit:contain;display:block}+.reviewimage{width:100%;height:220px;border-radius:var(--surface-radius);overflow:hidden;background:var(--sunk);margin:8px 0;display:flex;align-items:center;justify-content:center}.reviewimage img{width:100%;height:100%;object-fit:contain;display:block}.reviewimage img[hidden],.reviewimageempty[hidden]{display:none}+.reviewimageempty{padding:20px;text-align:center;color:var(--muted);font-size:var(--fs-sm)}+.reviewidentityevidence h5{margin:12px 0 8px;font-size:var(--fs-sm)}+.reviewevidenceactions{display:flex;flex-wrap:wrap;gap:8px}+.reviewevidencesamples{display:grid;gap:8px}+.reviewevidencesample{display:flex;gap:8px;min-width:0}+.reviewevidencesample>button:first-child{flex:1;min-width:0;justify-content:flex-start}+.reviewevidencesample>button:last-child{flex:none}/* JAV 版式条。只在 JAV 语境出现——首页混着创作者作品与素人流出,给它们切「封面」没有意义。 */@@ -265,3 +272,7 @@还压住旁边的「发行时间」。`.sorts button` 早就有 `flex:0 0 auto`,但 fieldset 不是button,那条规则选不到它。 */.sorts .javlayout{display:inline-flex;gap:2px;margin:0 6px;flex:none}+++.review:has(.reviewidentityevidence){--review-fieldset-height:560px}+diff --git a/web/dist/peach-ui.js b/web/dist/peach-ui.jsindex 90b127870..1ffcf7751 100644--- a/web/dist/peach-ui.js+++ b/web/dist/peach-ui.js@@ -1,21 +1,21 @@import { MEDIA_SOURCE_ICONS as e, badgeHtml as t, checkboxHtml as n, confirmModal as r, emptyStateHtml as i, fieldsetTitle as a, loadingDotsHtml as o, noteHtml as s, progressHtml as c, selectFieldHtml as l, selectOptionIconHtml as u, setActionBusy as d, wireCollapse as f, wireSelectField as p } from "/js/ui-components.js";-import { LOC as m, fmtDur as h, fmtSize as g, icon as _ } from "/js/core.js";+import { LOC as m, esc as h, fmtDur as g, fmtSize as _, icon as v } from "/js/core.js";//#region node_modules/preact/dist/preact.module.js-var v, y, b, x, S, C, w, T, E, D, O, k, A, ee, te, j = {}, M = [], ne = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, re = Array.isArray;-function N(e, t) {+var y, b, x, S, C, w, T, E, D, O, k, ee, te, ne, A, re = {}, ie = [], ae = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, oe = Array.isArray;+function j(e, t) {for (var n in t) e[n] = t[n];return e;}-function ie(e) {+function se(e) {e && e.parentNode && e.parentNode.removeChild(e);}-function ae(e, t, n) {+function ce(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 ? v.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 ? 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 le(e, o, r, i, null);}-function oe(e, t, n, r, i) {+function le(e, t, n, r, i) {var a = {type: e,props: t,@@ -27,68 +27,68 @@ function oe(e, t, n, r, i) {__e: null,__c: null,constructor: void 0,- __v: i ?? ++b,+ __v: i ?? ++x,__i: -1,__u: 0};- return i == null && y.vnode != null && y.vnode(a), a;+ return i == null && b.vnode != null && b.vnode(a), a;}-function P(e) {+function M(e) {return e.children;}-function se(e, t) {+function ue(e, t) {this.props = e, this.context = t;}-function F(e, t) {- if (t == null) return e.__ ? F(e.__, e.__i + 1) : null;+function N(e, t) {+ if (t == null) return e.__ ? N(e.__, e.__i + 1) : null;for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;- return typeof e.type == "function" ? F(e) : null;+ return typeof e.type == "function" ? N(e) : null;}-function ce(e) {+function de(e) {if (e.__P && e.__d) {- var t = e.__v, n = t.__e, r = [], i = [], a = N({}, t);- a.__v = t.__v + 1, y.vnode && y.vnode(a), ye(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? F(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);+ var t = e.__v, n = t.__e, r = [], i = [], a = j({}, t);+ a.__v = t.__v + 1, b.vnode && b.vnode(a), Se(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? N(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, we(r, a, i), t.__e = t.__ = null, a.__e != n && fe(a);}}-function le(e) {+function fe(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;- }), le(e);+ }), fe(e);}-function ue(e) {- (!e.__d && (e.__d = !0) && S.push(e) && !de.__r++ || C != y.debounceRendering) && ((C = y.debounceRendering) || w)(de);+function pe(e) {+ (!e.__d && (e.__d = !0) && C.push(e) && !me.__r++ || w != b.debounceRendering) && ((w = b.debounceRendering) || T)(me);}-function de() {+function me() {try {- for (var e, t = 1; S.length;) S.length > t && S.sort(T), e = S.shift(), t = S.length, ce(e);+ for (var e, t = 1; C.length;) C.length > t && C.sort(E), e = C.shift(), t = C.length, de(e);} finally {- S.length = de.__r = 0;+ C.length = me.__r = 0;}}-function fe(e, t, n, r, i, a, o, s, c, l, u) {- var d, f, p, m, h, g, _ = r && r.__k || M, 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] || j, 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 he(e, t, n, r, i, a, o, s, c, l, u) {+ var d, f, p, m, h, g, _ = r && r.__k || ie, v = t.length;+ for (c = ge(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || re, p.__i = d, g = Se(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && De(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = _e(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 pe(e, t, n, r, i) {+function ge(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] = oe(null, o, null, null, null) : re(o) ? o = e.__k[a] = oe(P, { 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 = F(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] = le(null, o, null, null, null) : oe(o) ? o = e.__k[a] = le(M, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = le(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 = ve(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;+ if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = N(s)), Oe(s, s));return r;}-function me(e, t, n) {+function _e(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 = me(r[i], t, n));+ for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = _e(r[i], t, n));return t;}- e.__e != t && (t && e.type && !t.parentNode && (t = F(e)), t = n.insertBefore(e.__e, t || null));+ e.__e != t && (t && e.type && !t.parentNode && (t = N(e)), t = n.insertBefore(e.__e, t || null));dot &&= t.nextSibling;while (t != null && t.nodeType == 8);return t;}-function he(e, t, n, r) {+function ve(e, t, n, r) {var i, a, o, s = e.key, c = e.type, l = t[n], u = l != null && !(2 & l.__u);if (l === null && s == null || u && s == l.key && c == l.type) return n;if (r > +!!u) {@@ -96,18 +96,18 @@ function he(e, t, n, r) {}return -1;}-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 ye(e, t, n) {+ t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || ae.test(t) ? n : n + "px";}-function _e(e, t, n, r, i) {+function be(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 || 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 || ye(e.style, t, "");+ if (n) for (t in n) r && n[t] == r[t] || ye(e.style, t, n[t]);}- } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(k, "$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[O] = r[O] : (n[O] = A, e.addEventListener(t, a ? te : ee, a)) : e.removeEventListener(t, a ? te : ee, a);+ } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(ee, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[k] = r[k] : (n[k] = te, e.addEventListener(t, a ? A : ne, a)) : e.removeEventListener(t, a ? A : ne, 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,154 +117,154 @@ function _e(e, t, n, r, i) {typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));}}-function ve(e) {+function xe(e) {return function(t) {if (this.l) {var n = this.l[t.type + e];- if (t[D] == null) t[D] = A++;- else if (t[D] < n[O]) return;- return n(y.event ? y.event(t) : t);+ if (t[O] == null) t[O] = te++;+ else if (t[O] < n[k]) return;+ return n(b.event ? b.event(t) : t);}};}-function ye(e, t, n, r, i, a, o, s, c, l) {- var u, d, f, p, m, h, g, _, v, b, x, S, C, w, T, E, D = t.type;+function Se(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;if (t.constructor !== void 0) return null;- 128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = y.__b) && u(t);+ 128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = b.__b) && u(t);n: if (typeof D == "function") {d = o.length;try {- if (v = t.props, b = D.prototype && D.prototype.render, x = (u = D.contextType) && r[u.__c], S = u ? x ? x.props.value : u.__ : r, n.__c ? _ = (f = t.__c = n.__c).__ = f.__E : (b ? t.__c = f = new D(v, S) : (t.__c = f = new se(v, S), f.constructor = D, f.render = Ee), x && x.sub(f), f.state || (f.state = {}), f.__n = r, p = f.__d = !0, f.__h = [], f._sb = []), b && f.__s == null && (f.__s = f.state), b && D.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = N({}, f.__s)), N(f.__s, D.getDerivedStateFromProps(v, f.__s))), m = f.props, h = f.state, f.__v = t, p) b && D.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), b && f.componentDidMount != null && f.__h.push(f.componentDidMount);+ if (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 ue(v, S), f.constructor = D, f.render = ke), 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 = j({}, f.__s)), j(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 (b && 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, S), t.__v == n.__v || !f.__e && f.shouldComponentUpdate != null && !1 === f.shouldComponentUpdate(v, f.__s, S)) {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);- }), M.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = F(n);+ }), ie.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = N(n);break n;}- f.componentWillUpdate != null && f.componentWillUpdate(v, f.__s, S), b && f.componentDidUpdate != null && f.__h.push(function() {+ f.componentWillUpdate != null && f.componentWillUpdate(v, f.__s, S), 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 = y.__r, w = 0, b) f.state = f.__s, f.__d = !1, C && C(t), u = f.render(f.props, f.state, f.context), M.push.apply(f.__h, f._sb), f._sb = [];+ 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), ie.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 = N(N({}, r), f.getChildContext())), b && !p && f.getSnapshotBeforeUpdate != null && (g = f.getSnapshotBeforeUpdate(m, h)), T = u != null && u.type === P && 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 = j(j({}, r), f.getChildContext())), y && !p && f.getSnapshotBeforeUpdate != null && (g = f.getSnapshotBeforeUpdate(m, h)), T = u != null && u.type === M && u.key == null ? Te(u.props.children) : u, s = he(e, oe(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--;) ie(a[E]);+ } else if (a != null) for (E = a.length; E--;) se(a[E]);} else t.__e = n.__e;- t.__k ??= n.__k || [], e.then || be(t), y.__e(e, t, n);+ t.__k ??= n.__k || [], e.then || Ce(t), b.__e(e, t, n);}- } 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 = y.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 = Ee(n.__e, t, n, r, i, a, o, c, l);+ return (u = b.diffed) && u(t), 128 & t.__u ? void 0 : s;}-function be(e) {- e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(be));+function Ce(e) {+ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(Ce));}-function xe(e, t, n) {- for (var r = 0; r < n.length; r++) we(n[r], n[++r], n[++r]);- y.__c && y.__c(t, e), e.some(function(t) {+function we(e, t, n) {+ for (var r = 0; r < n.length; r++) De(n[r], n[++r], n[++r]);+ b.__c && b.__c(t, e), e.some(function(t) {try {e = t.__h, t.__h = [], e.some(function(e) {e.call(t);});} catch (e) {- y.__e(e, t.__v);+ b.__e(e, t.__v);}});}-function Se(e) {- return typeof e != "object" || !e || e.__b > 0 ? e : re(e) ? e.map(Se) : e.constructor === void 0 ? N({}, e) : null;+function Te(e) {+ return typeof e != "object" || !e || e.__b > 0 ? e : oe(e) ? e.map(Te) : e.constructor === void 0 ? j({}, e) : null;}-function Ce(e, t, n, r, i, a, o, s, c) {- var l, u, d, f, p, m, h, g = n.props || j, _ = t.props, b = t.type;- if (b == "svg" ? i = "http://www.w3.org/2000/svg" : b == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i ||= "http://www.w3.org/1999/xhtml", a != null) {- for (l = 0; l < a.length; l++) if ((p = a[l]) && "setAttribute" in p == !!b && (b ? p.localName == b : p.nodeType == 3)) {+function Ee(e, t, n, r, i, a, o, s, c) {+ var l, u, d, f, p, m, h, g = n.props || re, _ = 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;break;}}if (e == null) {- if (b == null) return document.createTextNode(_);- e = document.createElementNS(i, b, _.is && _), s &&= (y.__m && y.__m(t, a), !1), a = null;+ if (v == null) return document.createTextNode(_);+ e = document.createElementNS(i, v, _.is && _), s &&= (b.__m && b.__m(t, a), !1), a = null;}- if (b == null) g === _ || s && e.data == _ || (e.data = _);+ if (v == null) g === _ || s && e.data == _ || (e.data = _);else {- if (a = b == "textarea" && _.defaultValue != null ? null : a && v.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 && 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 _ || be(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 || be(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 = ""), fe(t.type == "template" ? e.content : e, re(f) ? f : [f], t, n, r, b == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && F(n, 0), s, c), a != null) for (l = a.length; l--;) ie(a[l]);- s && b != "textarea" || (l = "value", b == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || b == "progress" && !m || b == "option" && m != g[l]) && _e(e, l, m, g[l], i), l = "checked", h != null && h != e[l] && _e(e, l, h, g[l], i));+ else if (d && (e.innerHTML = ""), he(t.type == "template" ? e.content : e, oe(f) ? f : [f], t, n, r, v == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && N(n, 0), s, c), a != null) for (l = a.length; l--;) se(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]) && be(e, l, m, g[l], i), l = "checked", h != null && h != e[l] && be(e, l, h, g[l], i));}return e;}-function we(e, t, n) {+function De(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) {- y.__e(e, n);+ b.__e(e, n);}}-function Te(e, t, n) {+function Oe(e, t, n) {var r, i;- if (y.unmount && y.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || we(r, null, t)), (r = e.__c) != null) {+ if (b.unmount && b.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || De(r, null, t)), (r = e.__c) != null) {if (r.componentWillUnmount) try {r.componentWillUnmount();} catch (e) {- y.__e(e, t);+ b.__e(e, t);}r.base = r.__P = r.__n = null;}- 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] && Oe(r[i], t, n || typeof e.type != "function");+ n || se(e.__e), e.__c = e.__ = e.__e = void 0;}-function Ee(e, t, n) {+function ke(e, t, n) {return this.constructor(e, n);}-function De(e, t, n) {+function Ae(e, t, n) {var r, i, a, o;- t == document && (t = document.documentElement), y.__ && y.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], ye(t, e = (!r && n || t).__k = ae(P, null, [e]), i || j, j, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? v.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), b.__ && b.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], Se(t, e = (!r && n || t).__k = ce(M, null, [e]), i || re, re, 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), we(a, e, o), e.props.children = null;}-v = M.slice, y = { __e: function(e, t, n, r) {+y = ie.slice, b = { __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;-} }, b = 0, x = function(e) {+} }, x = 0, S = function(e) {return e != null && e.constructor === void 0;-}, se.prototype.setState = function(e, t) {- var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = N({}, this.state);- typeof e == "function" && (e = e(N({}, n), this.props)), e && N(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 = P, S = [], w = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, T = function(e, t) {+}, ue.prototype.setState = function(e, t) {+ var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = j({}, this.state);+ typeof e == "function" && (e = e(j({}, n), this.props)), e && j(n, e), e != null && this.__v && (t && this._sb.push(t), pe(this));+}, ue.prototype.forceUpdate = function(e) {+ this.__v && (this.__e = !0, e && this.__h.push(e), pe(this));+}, ue.prototype.render = M, C = [], T = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, E = function(e, t) {return e.__v.__b - t.__v.__b;-}, de.__r = 0, E = Math.random().toString(8), D = "__d" + E, O = "__a" + E, k = /(PointerCapture)$|Capture$/i, A = 0, ee = ve(!1), te = ve(!0);+}, me.__r = 0, D = Math.random().toString(8), O = "__d" + D, k = "__a" + D, ee = /(PointerCapture)$|Capture$/i, te = 0, ne = xe(!1), A = xe(!0);//#endregion//#region src/sort-preferences.ts-function Oe(e, t, n) {+function je(e, t, n) {return e === "seed" ? "" : e === t && n === "asc" ? "asc" : "desc";}//#endregion//#region src/api.ts-var ke = class extends Error {+var Me = class extends Error {status;body;constructor(e, t, n = null) {super(e), this.name = "ApiError", this.status = t, this.body = n;}-}, Ae = (e) => {+}, Ne = (e) => {if (!e || typeof e != "object") return "";let t = e;for (let e of [@@ -276,8 +276,8 @@ var ke = class extends Error {if (typeof n == "string" && n) return n;}return "";-}, I = (e) => e instanceof Error ? e.message : String(e);-async function L(e, t) {+}, P = (e) => e instanceof Error ? e.message : String(e);+async function F(e, t) {let n = await fetch(e, {headers: { Accept: "application/json" },credentials: "same-origin",@@ -286,10 +286,10 @@ async function L(e, t) {try {r = await n.json();} catch {}- if (!n.ok) throw new ke(Ae(r) || `请求失败(${n.status})`, n.status);+ if (!n.ok) throw new Me(Ne(r) || `请求失败(${n.status})`, n.status);return r;}-async function R(e, t, n = "POST", r) {+async function I(e, t, n = "POST", r) {let i = await fetch(e, {method: n,...r ? { signal: r } : {},@@ -303,29 +303,29 @@ async function R(e, t, n = "POST", r) {try {a = await i.json();} catch {}- if (!i.ok) throw new ke(Ae(a) || `请求失败(${i.status})`, i.status, a);+ if (!i.ok) throw new Me(Ne(a) || `请求失败(${i.status})`, i.status, a);return a;}//#endregion//#region node_modules/preact/hooks/dist/hooks.module.js-var z, B, je, Me, Ne = 0, Pe = [], V = y, Fe = V.__b, Ie = V.__r, Le = V.diffed, Re = V.__c, ze = V.unmount, Be = V.__;-function Ve(e, t) {- V.__h && V.__h(B, e, Ne || t), Ne = 0;- var n = B.__H || (B.__H = {+var L, R, Pe, Fe, Ie = 0, Le = [], z = b, Re = z.__b, ze = z.__r, Be = z.diffed, Ve = z.__c, He = z.unmount, Ue = z.__;+function We(e, t) {+ z.__h && z.__h(R, e, Ie || t), Ie = 0;+ var n = R.__H || (R.__H = {__: [],__h: []});return e >= n.__.length && n.__.push({}), n.__[e];}-function H(e) {- return Ne = 1, He(Xe, e);+function B(e) {+ return Ie = 1, Ge($e, e);}-function He(e, t, n) {- var r = Ve(z++, 2);- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Xe(void 0, t), function(e) {+function Ge(e, t, n) {+ var r = We(L++, 2);+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : $e(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 = B, !B.__f)) {+ }], r.__c = R, !R.__f)) {var i = function(e, t, n) {if (!r.__c.__H) return !0;var i = !1, o = r.__c.props !== e;@@ -341,112 +341,112 @@ function He(e, t, n) {}return !i || o;};- B.__f = !0;- var a = B.shouldComponentUpdate, o = B.componentWillUpdate;- B.componentWillUpdate = function(e, t, n) {+ R.__f = !0;+ var a = R.shouldComponentUpdate, o = R.componentWillUpdate;+ R.componentWillUpdate = function(e, t, n) {if (this.__e) {var r = a;a = void 0, i(e, t, n), a = r;}o && o.call(this, e, t, n);- }, B.shouldComponentUpdate = i;+ }, R.shouldComponentUpdate = i;}return r.__N || r.__;}-function U(e, t) {- var n = Ve(z++, 3);- !V.__s && Ye(n.__H, t) && (n.__ = e, n.u = t, B.__H.__h.push(n));+function V(e, t) {+ var n = We(L++, 3);+ !z.__s && Qe(n.__H, t) && (n.__ = e, n.u = t, R.__H.__h.push(n));}-function W(e, t) {- var n = Ve(z++, 4);- !V.__s && Ye(n.__H, t) && (n.__ = e, n.u = t, B.__h.push(n));+function H(e, t) {+ var n = We(L++, 4);+ !z.__s && Qe(n.__H, t) && (n.__ = e, n.u = t, R.__h.push(n));}-function G(e) {- return Ne = 5, Ue(function() {+function U(e) {+ return Ie = 5, Ke(function() {return { current: e };}, []);}-function Ue(e, t) {- var n = Ve(z++, 7);- return Ye(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;+function Ke(e, t) {+ var n = We(L++, 7);+ return Qe(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;}-function We() {- for (var e; e = Pe.shift();) {+function qe() {+ for (var e; e = Le.shift();) {var t = e.__H;if (e.__P && t) try {- t.__h.some(qe), t.__h.some(Je), t.__h = [];+ t.__h.some(Xe), t.__h.some(Ze), t.__h = [];} catch (n) {- t.__h = [], V.__e(n, e.__v);+ t.__h = [], z.__e(n, e.__v);}}}-V.__b = function(e) {- B = null, Fe && Fe(e);-}, V.__ = function(e, t) {- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Be && Be(e, t);-}, V.__r = function(e) {- Ie && Ie(e), z = 0;- var t = (B = e.__c).__H;- t && (je === B ? (t.__h = [], B.__h = [], t.__.some(function(e) {+z.__b = function(e) {+ R = null, Re && Re(e);+}, z.__ = function(e, t) {+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Ue && Ue(e, t);+}, z.__r = function(e) {+ ze && ze(e), L = 0;+ var t = (R = e.__c).__H;+ t && (Pe === R ? (t.__h = [], R.__h = [], t.__.some(function(e) {e.__N && (e.__ = e.__N), e.u = e.__N = void 0;- })) : (t.__h.some(qe), t.__h.some(Je), t.__h = [], z = 0)), je = B;-}, V.diffed = function(e) {- Le && Le(e);+ })) : (t.__h.some(Xe), t.__h.some(Ze), t.__h = [], L = 0)), Pe = R;+}, z.diffed = function(e) {+ Be && Be(e);var t = e.__c;- t && t.__H && (t.__H.__h.length && (Pe.push(t) !== 1 && Me === V.requestAnimationFrame || ((Me = V.requestAnimationFrame) || Ke)(We)), t.__H.__.some(function(e) {+ t && t.__H && (t.__H.__h.length && (Le.push(t) !== 1 && Fe === z.requestAnimationFrame || ((Fe = z.requestAnimationFrame) || Ye)(qe)), t.__H.__.some(function(e) {e.u &&= (e.__H = e.u, void 0);- })), je = B = null;-}, V.__c = function(e, t) {+ })), Pe = R = null;+}, z.__c = function(e, t) {t.some(function(e) {try {- e.__h.some(qe), e.__h = e.__h.filter(function(e) {- return !e.__ || Je(e);+ e.__h.some(Xe), e.__h = e.__h.filter(function(e) {+ return !e.__ || Ze(e);});} catch (n) {t.some(function(e) {e.__h &&= [];- }), t = [], V.__e(n, e.__v);+ }), t = [], z.__e(n, e.__v);}- }), Re && Re(e, t);-}, V.unmount = function(e) {- ze && ze(e);+ }), Ve && Ve(e, t);+}, z.unmount = function(e) {+ He && He(e);var t, n = e.__c;n && n.__H && (n.__H.__.some(function(e) {try {- qe(e);+ Xe(e);} catch (e) {t = e;}- }), n.__H = void 0, t && V.__e(t, n.__v));+ }), n.__H = void 0, t && z.__e(t, n.__v));};-var Ge = typeof requestAnimationFrame == "function";-function Ke(e) {+var Je = typeof requestAnimationFrame == "function";+function Ye(e) {var t, n = function() {- clearTimeout(r), Ge && cancelAnimationFrame(t), setTimeout(e);+ clearTimeout(r), Je && cancelAnimationFrame(t), setTimeout(e);}, r = setTimeout(n, 35);- Ge && (t = requestAnimationFrame(n));+ Je && (t = requestAnimationFrame(n));}-function qe(e) {- var t = B, n = e.__c;- typeof n == "function" && (e.__c = void 0, n()), B = t;+function Xe(e) {+ var t = R, n = e.__c;+ typeof n == "function" && (e.__c = void 0, n()), R = t;}-function Je(e) {- var t = B;- e.__c = e.__(), B = t;+function Ze(e) {+ var t = R;+ e.__c = e.__(), R = t;}-function Ye(e, t) {+function Qe(e, t) {return !e || e.length !== t.length || t.some(function(t, n) {return t !== e[n];});}-function Xe(e, t) {+function $e(e, t) {return typeof t == "function" ? t(e) : t;}//#endregion//#region node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js-var Ze = 0;+var et = 0;Array.isArray;-function K(e, t, n, r, i, a) {+function W(e, t, n, r, i, a) {t ||= {};var o, s, c = t;if ("ref" in c) for (s in c = {}, t) s == "ref" ? o = t[s] : c[s] = t[s];@@ -461,26 +461,26 @@ function K(e, t, n, r, i, a) {__e: null,__c: null,constructor: void 0,- __v: --Ze,+ __v: --et,__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 y.vnode && y.vnode(l), l;+ return b.vnode && b.vnode(l), l;}//#endregion//#region src/islands/access-settings.tsx-function Qe({ id: e, label: t, value: n, onInput: r, error: i, help: a, current: o = !1, disabled: s = !1 }) {- return /* @__PURE__ */ K("div", {+function tt({ id: e, label: t, value: n, onInput: r, error: i, help: a, current: o = !1, disabled: s = !1 }) {+ return /* @__PURE__ */ W("div", {class: "configfield",children: [- /* @__PURE__ */ K("label", {+ /* @__PURE__ */ W("label", {for: e,children: t}),- /* @__PURE__ */ K("input", {+ /* @__PURE__ */ W("input", {id: e,class: "geist-input",type: "password",@@ -493,7 +493,7 @@ function Qe({ id: e, label: t, value: n, onInput: r, error: i, help: a, current:"aria-invalid": !!i,"aria-describedby": i || a ? `${e}-hint` : void 0}),- i || a ? /* @__PURE__ */ K("p", {+ i || a ? /* @__PURE__ */ W("p", {id: `${e}-hint`,class: i ? "configbad" : "confighelp",role: i ? "alert" : void 0,@@ -502,9 +502,9 @@ function Qe({ id: e, label: t, value: n, onInput: r, error: i, help: a, current:]});}-function $e({ initial: e, receipt: t }) {- let [n, r] = H(e), [i, o] = H(""), [c, l] = H(""), [u, f] = H(""), [p, m] = H(!1), [h, g] = H(""), [_, v] = H({}), y = G(null), b = G(!1), x = G(null);- return /* @__PURE__ */ K("form", {+function nt({ initial: e, receipt: t }) {+ let [n, r] = B(e), [i, o] = B(""), [c, l] = B(""), [u, f] = B(""), [p, m] = B(!1), [h, g] = B(""), [_, v] = B({}), y = U(null), b = U(!1), x = U(null);+ return /* @__PURE__ */ W("form", {class: "configfieldset","data-fieldset-type": p ? "warning" : void 0,onSubmit: async (e) => {@@ -517,7 +517,7 @@ function $e({ initial: e, receipt: t }) {}b.current = !0, d(x.current, !0);try {- let e = await R("/api/configuration/access", {+ let e = await I("/api/configuration/access", {revision: n.revision,action: p ? "disable" : "set",confirm_disable: p,@@ -527,8 +527,8 @@ function $e({ initial: e, receipt: t }) {});r(e), o(""), l(""), f(""), m(!1), v({}), t(e.mode === "open" ? "已关闭访问密码" : "已保存访问密码");} catch (e) {- let t = e instanceof ke ? e.body : null, n = t?.errors || t?.detail?.errors;- n ? v(n) : g(I(e));+ let t = e instanceof Me ? e.body : null, n = t?.errors || t?.detail?.errors;+ n ? v(n) : g(P(e));} finally {b.current = !1, d(x.current, !1);}@@ -536,34 +536,34 @@ function $e({ initial: e, receipt: t }) {"aria-labelledby": "accessTitle",noValidate: !0,ref: y,- children: [/* @__PURE__ */ K("div", {+ children: [/* @__PURE__ */ W("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ K("div", {+ /* @__PURE__ */ W("div", {class: "configfieldset-heading",- children: [/* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: a("accessTitle", "访问密码") } }), /* @__PURE__ */ K("p", {+ children: [/* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: a("accessTitle", "访问密码") } }), /* @__PURE__ */ W("p", {class: "confighelp",children: n.mode === "open" ? "未设置密码,能连接到 Peach 的设备可直接访问。" : n.mode === "legacy" ? "当前使用系统生成的访问口令。你可以设置自己的密码,或关闭登录要求。" : n.mode === "locked" ? "访问设置无法读取,请在本机检查配置文件。" : "已设置密码。新设备需要登录,保持登录时间在登录页选择。"})]}),- n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ K("label", {+ n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ W("label", {class: "configcheck",- children: [/* @__PURE__ */ K("span", {+ children: [/* @__PURE__ */ W("span", {class: "pcheck",- children: [/* @__PURE__ */ K("input", {+ children: [/* @__PURE__ */ W("input", {type: "checkbox",checked: p,onChange: (e) => m(e.currentTarget.checked)- }), /* @__PURE__ */ K("span", {+ }), /* @__PURE__ */ W("span", {"aria-hidden": "true",- children: /* @__PURE__ */ K("svg", {+ children: /* @__PURE__ */ W("svg", {viewBox: "0 0 24 24",- children: /* @__PURE__ */ K("use", { href: "#i-check" })+ children: /* @__PURE__ */ W("use", { href: "#i-check" })})})]- }), /* @__PURE__ */ K("span", { children: "关闭访问密码,允许能连接到 Peach 的设备直接访问" })]+ }), /* @__PURE__ */ W("span", { children: "关闭访问密码,允许能连接到 Peach 的设备直接访问" })]}) : null,- n.mode === "password" ? /* @__PURE__ */ K(Qe, {+ n.mode === "password" ? /* @__PURE__ */ W(tt, {id: "access-current",label: "当前访问密码",value: i,@@ -571,7 +571,7 @@ function $e({ initial: e, receipt: t }) {error: _.current_password,current: !0}) : null,- n.mode === "locked" ? null : /* @__PURE__ */ K(P, { children: [/* @__PURE__ */ K(Qe, {+ n.mode === "locked" ? null : /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W(tt, {id: "access-password",label: n.mode === "password" ? "新访问密码" : "设置访问密码",value: c,@@ -579,7 +579,7 @@ function $e({ initial: e, receipt: t }) {disabled: p,error: p ? void 0 : _.password,help: p ? "关闭访问密码时无需填写。" : "至少 8 个字符。保存后其他设备需要重新登录。"- }), /* @__PURE__ */ K(Qe, {+ }), /* @__PURE__ */ W(tt, {id: "access-confirm",label: "确认访问密码",value: u,@@ -587,19 +587,19 @@ function $e({ initial: e, receipt: t }) {disabled: p,error: p ? void 0 : _.confirmation})] }),- p && /* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: s("保存后,能连接到 Peach 的设备将直接访问馆藏。", {+ p && /* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: s("保存后,能连接到 Peach 的设备将直接访问馆藏。", {variant: "warning",label: "访问范围"}) } }),- h ? /* @__PURE__ */ K("p", {+ h ? /* @__PURE__ */ W("p", {class: "configbad",role: "alert",children: h}) : null]- }), n.mode === "locked" ? null : /* @__PURE__ */ K("div", {+ }), n.mode === "locked" ? null : /* @__PURE__ */ W("div", {class: "geist-fieldset-footer",- children: [/* @__PURE__ */ K("p", { children: "保存后立即生效。" }), /* @__PURE__ */ K("button", {+ children: [/* @__PURE__ */ W("p", { children: "保存后立即生效。" }), /* @__PURE__ */ W("button", {class: "geist-button primary",type: "submit",ref: x,@@ -610,7 +610,7 @@ function $e({ initial: e, receipt: t }) {}//#endregion//#region src/islands/release-updates.tsx-var et = /* @__PURE__ */ new Set([+var rt = /* @__PURE__ */ new Set(["downloading","verifying","extracting",@@ -618,21 +618,21 @@ var et = /* @__PURE__ */ new Set(["restarting","installing"]);-function tt({ initial: e, initialJob: t }) {- let [n, i] = H(e), [o, s] = H(t || {+function it({ initial: e, initialJob: t }) {+ let [n, i] = B(e), [o, s] = B(t || {state: "idle",progress: 0- }), [l, u] = H(""), f = G(null), p = G(!0), m = G(!1), h = G(null);- U(() => {- d(h.current, et.has(o.state));- }, [o.state]), U(() => () => {+ }), [l, u] = B(""), f = U(null), p = U(!0), m = U(!1), h = U(null);+ V(() => {+ d(h.current, rt.has(o.state));+ }, [o.state]), V(() => () => {p.current = !1, f.current?.abort();}, []);let g = async () => {- let e = await R("/api/configuration/update-restart", {});+ let e = await I("/api/configuration/update-restart", {});p.current && s(e);};- U(() => {+ V(() => {o.state !== "ready" || m.current || (m.current = !0, r({title: "更新已准备好",body: `Peach ${o.version || ""} 将在重启后安装。`,@@ -640,11 +640,11 @@ function tt({ initial: e, initialJob: t }) {cancelLabel: "稍后",onConfirm: g}));- }, [o.state]), U(() => {- if (!et.has(o.state)) return;+ }, [o.state]), V(() => {+ if (!rt.has(o.state)) return;let e = new AbortController(), t, n = 0, r = async () => {try {- let t = await L("/api/configuration/update-status", e.signal);+ let t = await F("/api/configuration/update-status", e.signal);e.signal.aborted || (s(t), n = 0, t.state === "complete" && i((e) => ({...e,current_version: t.version || e.current_version,@@ -661,14 +661,14 @@ function tt({ initial: e, initialJob: t }) {};}, [o.state]);let _ = async (e) => {- if (f.current || et.has(o.state)) return;+ if (f.current || rt.has(o.state)) return;let t = new AbortController();f.current = t, m.current = !1, u(""), d(e, !0);try {- let e = await R("/api/configuration/update", {}, "POST", t.signal);+ let e = await I("/api/configuration/update", {}, "POST", t.signal);t.signal.aborted || s(e);} catch (e) {- t.signal.aborted || u(I(e));+ t.signal.aborted || u(P(e));} finally {f.current = null, d(e, !1);}@@ -677,66 +677,66 @@ function tt({ initial: e, initialJob: t }) {let n = new AbortController();f.current = n, d(t, !0), u("");try {- let e = await L("/api/configuration/updates", n.signal);+ let e = await F("/api/configuration/updates", n.signal);n.signal.aborted || i(e);} catch (t) {n.signal.aborted || (i({...e,state: "error"- }), u(I(t)));+ }), u(P(t)));} finally {f.current = null, d(t, !1);}};- return /* @__PURE__ */ K("section", {+ return /* @__PURE__ */ W("section", {class: "configfieldset","data-geist-fieldset": !0,"aria-labelledby": "configUpdatesTitle",- children: [/* @__PURE__ */ K("div", {+ children: [/* @__PURE__ */ W("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: a("configUpdatesTitle", "检查更新") } }),- /* @__PURE__ */ K("dl", {+ /* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: a("configUpdatesTitle", "检查更新") } }),+ /* @__PURE__ */ W("dl", {class: "configfacts",children: [- /* @__PURE__ */ K("dt", { children: "当前版本" }),- /* @__PURE__ */ K("dd", { children: n.current_version }),- /* @__PURE__ */ K("dt", { children: "安装方式" }),- /* @__PURE__ */ K("dd", { children: n.installation }),- /* @__PURE__ */ K("dt", { children: "更新通道" }),- /* @__PURE__ */ K("dd", { children: n.channel }),- /* @__PURE__ */ K("dt", { children: "最新版本" }),- /* @__PURE__ */ K("dd", { children: n.latest_version || (n.state === "unchecked" ? "尚未检查" : "未取得") })+ /* @__PURE__ */ W("dt", { children: "当前版本" }),+ /* @__PURE__ */ W("dd", { children: n.current_version }),+ /* @__PURE__ */ W("dt", { children: "安装方式" }),+ /* @__PURE__ */ W("dd", { children: n.installation }),+ /* @__PURE__ */ W("dt", { children: "更新通道" }),+ /* @__PURE__ */ W("dd", { children: n.channel }),+ /* @__PURE__ */ W("dt", { children: "最新版本" }),+ /* @__PURE__ */ W("dd", { children: n.latest_version || (n.state === "unchecked" ? "尚未检查" : "未取得") })]}),- /* @__PURE__ */ K("p", {+ /* @__PURE__ */ W("p", {class: l || n.state === "error" ? "configbad" : "confighelp",role: l || n.state === "error" ? "alert" : "status",children: l || n.message}),- o.state === "idle" ? null : /* @__PURE__ */ K("div", {+ o.state === "idle" ? null : /* @__PURE__ */ W("div", {"aria-live": "polite",- children: [/* @__PURE__ */ K("p", {+ children: [/* @__PURE__ */ W("p", {class: o.state === "error" ? "configbad" : "confighelp",children: o.message- }), o.state === "error" ? null : /* @__PURE__ */ K(P, { children: [/* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: c(o.state === "downloading" ? "下载进度" : "安装进度", o.state === "downloading" ? o.downloaded || 0 : o.progress, o.state === "downloading" ? o.total || 1 : 100) } }), /* @__PURE__ */ K("p", {+ }), o.state === "error" ? null : /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: c(o.state === "downloading" ? "下载进度" : "安装进度", o.state === "downloading" ? o.downloaded || 0 : o.progress, o.state === "downloading" ? o.total || 1 : 100) } }), /* @__PURE__ */ W("p", {class: "confighelp",children: o.state === "downloading" && o.total ? `${((o.downloaded || 0) / 1048576).toFixed(1)} / ${(o.total / 1048576).toFixed(1)} MB` : `${o.progress}%`})] })]})]- }), /* @__PURE__ */ K("div", {+ }), /* @__PURE__ */ W("div", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,children: [- /* @__PURE__ */ K("a", {+ /* @__PURE__ */ W("a", {class: "geist-button",href: n.release_url,target: "_blank",rel: "noreferrer",children: "查看发布页"}),- o.state === "ready" ? /* @__PURE__ */ K("button", {+ o.state === "ready" ? /* @__PURE__ */ W("button", {type: "button",class: "geist-button primary",onClick: () => {@@ -750,17 +750,17 @@ function tt({ initial: e, initialJob: t }) {},children: "重启安装"}) : null,- n.state === "available" && n.installation === "独立测试包" && o.state !== "ready" ? /* @__PURE__ */ K("button", {+ n.state === "available" && n.installation === "独立测试包" && o.state !== "ready" ? /* @__PURE__ */ W("button", {ref: h,type: "button",class: "geist-button primary",onClick: (e) => _(e.currentTarget),children: "下载并安装"}) : null,- /* @__PURE__ */ K("button", {+ /* @__PURE__ */ W("button", {type: "button",class: "geist-button",- disabled: et.has(o.state),+ disabled: rt.has(o.state),onClick: (e) => v(e.currentTarget),children: "检查更新"})@@ -770,9 +770,9 @@ function tt({ initial: e, initialJob: t }) {}//#endregion//#region src/islands/peach-proxy.tsx-function nt({ initial: e, receipt: t }) {- let [n, r] = H(e), [i, o] = H(e.mode), [s, c] = H(""), [u, f] = H(""), m = G(!1), h = G(null), g = G(null), _ = G(new AbortController());- U(() => () => _.current.abort(), []), W(() => {+function at({ initial: e, receipt: t }) {+ let [n, r] = B(e), [i, o] = B(e.mode), [s, c] = B(""), [u, f] = B(""), m = U(!1), h = U(null), g = U(null), _ = U(new AbortController());+ V(() => () => _.current.abort(), []), H(() => {let t = h.current;t.innerHTML = l([["environment", "系统代理"],@@ -792,42 +792,42 @@ function nt({ initial: e, receipt: t }) {if (!m.current) {m.current = !0, d(g.current, !0), f("");try {- let e = await R("/api/configuration/peach-proxy", {+ let e = await I("/api/configuration/peach-proxy", {mode: i,proxy: s}, "POST", _.current.signal);_.current.signal.aborted || (r(e), c(""), t("已保存 Peach 代理"));} catch (e) {- _.current.signal.aborted || f(I(e));+ _.current.signal.aborted || f(P(e));} finally {m.current = !1, d(g.current, !1);}}}- return /* @__PURE__ */ K("form", {+ return /* @__PURE__ */ W("form", {id: "peachProxy",class: "configfieldset","data-geist-fieldset": !0,onSubmit: (e) => {e.preventDefault(), v();},- children: [/* @__PURE__ */ K("div", {+ children: [/* @__PURE__ */ W("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ K("div", {+ /* @__PURE__ */ W("div", {class: "configfieldset-heading",- children: [/* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: a("peachProxyTitle", "Peach 代理") } }), /* @__PURE__ */ K("p", {+ children: [/* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: a("peachProxyTitle", "Peach 代理") } }), /* @__PURE__ */ W("p", {class: "confighelp",children: "采集来源选择“Peach 代理”时共用此设置。"})]}),- /* @__PURE__ */ K("div", { ref: h }),- i === "proxy" && /* @__PURE__ */ K("div", {+ /* @__PURE__ */ W("div", { ref: h }),+ i === "proxy" && /* @__PURE__ */ W("div", {class: "configfield",- children: [/* @__PURE__ */ K("label", {+ children: [/* @__PURE__ */ W("label", {htmlFor: "peachProxyAddress",children: "代理地址"- }), /* @__PURE__ */ K("input", {+ }), /* @__PURE__ */ W("input", {id: "peachProxyAddress",class: "geist-input",type: "password",@@ -837,20 +837,20 @@ function nt({ initial: e, receipt: t }) {onInput: (e) => c(e.currentTarget.value)})]}),- n.needs_selection && /* @__PURE__ */ K("p", {+ n.needs_selection && /* @__PURE__ */ W("p", {class: "configbad",children: "已有来源的代理地址不同,请选择公共连接方式。"}),- u && /* @__PURE__ */ K("p", {+ u && /* @__PURE__ */ W("p", {class: "configbad",role: "alert",children: u})]- }), /* @__PURE__ */ K("footer", {+ }), /* @__PURE__ */ W("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: /* @__PURE__ */ K("button", {+ children: /* @__PURE__ */ W("button", {ref: g,class: "geist-button primary",type: "submit",@@ -861,30 +861,30 @@ function nt({ initial: e, receipt: t }) {}//#endregion//#region src/islands/desktop-settings.tsx-function rt({ label: e, checked: t, disabled: n, change: r }) {- return /* @__PURE__ */ K("label", {+function ot({ label: e, checked: t, disabled: n, change: r }) {+ return /* @__PURE__ */ W("label", {class: "configcheck",- children: [/* @__PURE__ */ K("span", {+ children: [/* @__PURE__ */ W("span", {class: "pcheck",- children: [/* @__PURE__ */ K("input", {+ children: [/* @__PURE__ */ W("input", {type: "checkbox",checked: t,disabled: n,onChange: (e) => r(e.currentTarget.checked)- }), /* @__PURE__ */ K("span", {+ }), /* @__PURE__ */ W("span", {"aria-hidden": "true",- children: /* @__PURE__ */ K("svg", {+ children: /* @__PURE__ */ W("svg", {viewBox: "0 0 24 24",- children: /* @__PURE__ */ K("use", { href: "#i-check" })+ children: /* @__PURE__ */ W("use", { href: "#i-check" })})})]- }), /* @__PURE__ */ K("span", { children: e })]+ }), /* @__PURE__ */ W("span", { children: e })]});}-function it({ label: e, checked: t, disabled: n, change: r }) {- return /* @__PURE__ */ K("label", {+function st({ label: e, checked: t, disabled: n, change: r }) {+ return /* @__PURE__ */ W("label", {class: "configtoggle",- children: [/* @__PURE__ */ K("span", { children: e }), /* @__PURE__ */ K("input", {+ children: [/* @__PURE__ */ W("span", { children: e }), /* @__PURE__ */ W("input", {class: "ptoggle",type: "checkbox",role: "switch",@@ -894,69 +894,69 @@ function it({ label: e, checked: t, disabled: n, change: r }) {})]});}-function at({ startup: e, receipt: t }) {- let [n, r] = H(e.enabled), [i, o] = H(e.silent), [s, c] = H(""), l = G(!1), u = G(null);+function ct({ startup: e, receipt: t }) {+ let [n, r] = B(e.enabled), [i, o] = B(e.silent), [s, c] = B(""), l = U(!1), u = U(null);async function f() {if (!l.current) {l.current = !0, d(u.current, !0), c("");try {- await R("/api/configuration/startup", {+ await I("/api/configuration/startup", {enabled: n,silent: i}), t("已保存开机自启");} catch (e) {- c(I(e));+ c(P(e));} finally {l.current = !1, d(u.current, !1);}}}- return /* @__PURE__ */ K("form", {+ return /* @__PURE__ */ W("form", {class: "configfieldset","data-geist-fieldset": !0,onSubmit: (e) => {e.preventDefault(), f();},- children: [/* @__PURE__ */ K("div", {+ children: [/* @__PURE__ */ W("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: a("startupTitle", "开机自启") } }),- /* @__PURE__ */ K("div", {+ /* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: a("startupTitle", "开机自启") } }),+ /* @__PURE__ */ W("div", {class: "configoptions",role: "group","aria-labelledby": "startupTitle",- children: [/* @__PURE__ */ K(it, {+ children: [/* @__PURE__ */ W(st, {label: "开机后启动 Peach",checked: n,disabled: !e.available,change: r- }), /* @__PURE__ */ K("div", {+ }), /* @__PURE__ */ W("div", {class: "configoption",- children: [/* @__PURE__ */ K(it, {+ children: [/* @__PURE__ */ W(st, {label: "静默启动",checked: i,disabled: !e.available,change: o- }), /* @__PURE__ */ K("p", {+ }), /* @__PURE__ */ W("p", {class: "confighelp",children: "静默启动仅显示托盘。"})]})]}),- e.message && /* @__PURE__ */ K("p", {+ e.message && /* @__PURE__ */ W("p", {class: "confighelp",children: e.message}),- s && /* @__PURE__ */ K("p", {+ s && /* @__PURE__ */ W("p", {class: "configbad",role: "alert",children: s})]- }), /* @__PURE__ */ K("footer", {+ }), /* @__PURE__ */ W("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: /* @__PURE__ */ K("button", {+ children: /* @__PURE__ */ W("button", {ref: u,type: "submit",class: "geist-button primary",@@ -966,22 +966,22 @@ function at({ startup: e, receipt: t }) {})]});}-function ot({ data: e }) {- let t = G(null);- return W(() => {+function lt({ data: e }) {+ let t = U(null);+ return H(() => {let n = t.current, r = document.createElement("details");r.className = "configdirectories";let i = document.createElement("summary");- i.innerHTML = _("chevron-right") + "<span>数据目录</span>", r.append(i);+ i.innerHTML = v("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), f(n, "details", "uninstall-data"), () => n.replaceChildren();- }, [e]), /* @__PURE__ */ K("div", { ref: t });+ }, [e]), /* @__PURE__ */ W("div", { ref: t });}-function st({ uninstall: e }) {- let [t, n] = H(!1), [i, o] = H("");+function ut({ uninstall: e }) {+ let [t, n] = B(!1), [i, o] = B("");async function s() {await r({title: "卸载 Peach",@@ -989,7 +989,7 @@ function st({ uninstall: e }) {body: t ? "将退出 Peach,移除程序、开机自启、设置、本地数据库、观看记录、凭据和缓存。原始媒体文件保留。" : "将退出 Peach 并移除程序和开机自启。设置、本地数据库、观看记录与缓存保留。",confirmLabel: "卸载 Peach",onConfirm: async () => {- let e = await R("/api/configuration/uninstall", {+ let e = await I("/api/configuration/uninstall", {delete_data: t,confirmation: "卸载 Peach"});@@ -997,42 +997,42 @@ function st({ uninstall: e }) {}});}- return /* @__PURE__ */ K("section", {+ return /* @__PURE__ */ W("section", {id: "uninstallPeach",class: "configfieldset configdanger","data-geist-fieldset": !0,"data-fieldset-type": "error",- children: [/* @__PURE__ */ K("div", {+ children: [/* @__PURE__ */ W("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ K("div", {+ /* @__PURE__ */ W("div", {class: "configfieldset-heading",- children: [/* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: a("uninstallTitle", "卸载 Peach") } }), e.available && /* @__PURE__ */ K("p", {+ children: [/* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: a("uninstallTitle", "卸载 Peach") } }), e.available && /* @__PURE__ */ W("p", {class: "confighelp",children: "卸载会退出 Peach、移除程序和开机自启。原始媒体文件保留。"})]}),- /* @__PURE__ */ K(rt, {+ /* @__PURE__ */ W(ot, {label: "完全卸载:同时删除设置、本地数据库、观看记录、凭据和缓存",checked: t,disabled: !e.full_available || !!i,change: n}),- /* @__PURE__ */ K(ot, { data: e }),- e.message && /* @__PURE__ */ K("p", {+ /* @__PURE__ */ W(lt, { data: e }),+ e.message && /* @__PURE__ */ W("p", {class: "confighelp",children: e.message}),- i && /* @__PURE__ */ K("p", {+ i && /* @__PURE__ */ W("p", {class: "confighelp",role: "status",children: i})]- }), /* @__PURE__ */ K("footer", {+ }), /* @__PURE__ */ W("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: /* @__PURE__ */ K("button", {+ children: /* @__PURE__ */ W("button", {type: "button",class: "geist-button danger",disabled: !e.available || !!i,@@ -1044,29 +1044,29 @@ function st({ uninstall: e }) {}//#endregion//#region src/islands/configuration.tsx-var ct = "/api/configuration", lt = "/api/pick-folder", ut = 8e3, dt = (e, t) => L(ct, t), q = ({ html: e, class: t }) => /* @__PURE__ */ K("div", {+var dt = "/api/configuration", ft = "/api/pick-folder", pt = 8e3, mt = (e, t) => F(dt, t), G = ({ html: e, class: t }) => /* @__PURE__ */ W("div", {class: t,dangerouslySetInnerHTML: { __html: e }-}), ft = (e) => !(e instanceof ke) || e.status !== 400 ? null : e.body?.errors ?? null;-function pt({ facts: e }) {- return /* @__PURE__ */ K("section", {+}), ht = (e) => !(e instanceof Me) || e.status !== 400 ? null : e.body?.errors ?? null;+function gt({ facts: e }) {+ return /* @__PURE__ */ W("section", {class: "configfieldset","data-geist-fieldset": !0,"aria-labelledby": "configFactsTitle",- children: /* @__PURE__ */ K("div", {+ children: /* @__PURE__ */ W("div", {class: "geist-fieldset-content",- children: [/* @__PURE__ */ K(q, { html: a("configFactsTitle", "运行信息") }), /* @__PURE__ */ K("dl", {+ children: [/* @__PURE__ */ W(G, { html: a("configFactsTitle", "运行信息") }), /* @__PURE__ */ W("dl", {class: "configfacts",- children: e.map((e) => /* @__PURE__ */ K(P, { children: [/* @__PURE__ */ K("dt", { children: e.term }), /* @__PURE__ */ K("dd", { children: [e.value, e.download_url ? /* @__PURE__ */ K("span", {+ children: e.map((e) => /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W("dt", { children: e.term }), /* @__PURE__ */ W("dd", { children: [e.value, e.download_url ? /* @__PURE__ */ W("span", {class: "confighelp",- children: [" ", /* @__PURE__ */ K("a", {+ children: [" ", /* @__PURE__ */ W("a", {href: e.download_url,target: "_blank",rel: "noreferrer",- children: [e.download_label, /* @__PURE__ */ K("svg", {+ children: [e.download_label, /* @__PURE__ */ W("svg", {"aria-hidden": "true",viewBox: "0 0 24 24",- children: /* @__PURE__ */ K("use", { href: "#i-external-link" })+ children: /* @__PURE__ */ W("use", { href: "#i-external-link" })})]})]}) : null] })] }))@@ -1074,57 +1074,57 @@ function pt({ facts: e }) {})});}-function mt({ data: t }) {- let [n, r] = H(t.media_sources), [i, o] = H(""), s = G(null);- U(() => () => s.current?.abort(), []);+function _t({ data: t }) {+ let [n, r] = B(t.media_sources), [i, o] = B(""), s = U(null);+ V(() => () => s.current?.abort(), []);let c = async (e) => {if (s.current) return;let t = new AbortController();s.current = t, d(e, !0), o("");try {- let e = await L(ct, t.signal);+ let e = await F(dt, t.signal);t.signal.aborted || r(e.media_sources);} catch (e) {- t.signal.aborted || o(I(e));+ t.signal.aborted || o(P(e));} finally {s.current = null, d(e, !1);}};- return n ? /* @__PURE__ */ K("section", {+ return n ? /* @__PURE__ */ W("section", {class: "configfieldset","aria-labelledby": "configMountsTitle",- children: [/* @__PURE__ */ K("div", {+ children: [/* @__PURE__ */ W("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ K(q, { html: a("configMountsTitle", "挂载状态") }),- /* @__PURE__ */ K("dl", {+ /* @__PURE__ */ W(G, { html: a("configMountsTitle", "挂载状态") }),+ /* @__PURE__ */ W("dl", {class: "configfacts",- children: n.map((t) => /* @__PURE__ */ K(P, { children: [/* @__PURE__ */ K("dt", { children: [/* @__PURE__ */ K("span", {+ children: n.map((t) => /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W("dt", { children: [/* @__PURE__ */ W("span", {"aria-hidden": "true",dangerouslySetInnerHTML: { __html: u(e[t.location]) }}), {local: "本地磁盘",115: "CloudDrive · 115",pikpak: "CloudDrive · PikPak"- }[t.location] || t.location] }), /* @__PURE__ */ K("dd", { children: [+ }[t.location] || t.location] }), /* @__PURE__ */ W("dd", { children: [t.path || "未配置挂载点"," ",- /* @__PURE__ */ K("span", {+ /* @__PURE__ */ W("span", {class: `configstatus ${t.online === !0 ? "online" : t.online === !1 ? "offline" : "unknown"}`,children: t.online === !0 ? "在线" : t.online === !1 ? "离线" : "未检测"})] })] }))}),- i ? /* @__PURE__ */ K("p", {+ i ? /* @__PURE__ */ W("p", {class: "configbad",role: "alert",children: i}) : null]- }), /* @__PURE__ */ K("div", {+ }), /* @__PURE__ */ W("div", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: /* @__PURE__ */ K("button", {+ children: /* @__PURE__ */ W("button", {type: "button",class: "geist-button",onClick: (e) => c(e.currentTarget),@@ -1133,9 +1133,9 @@ function mt({ data: t }) {})]}) : null;}-function ht({ value: t, label: n, onChange: r }) {- let i = G(null), a = G(null), o = G(r);- return o.current = r, W(() => {+function vt({ value: t, label: n, onChange: r }) {+ let i = U(null), a = U(null), o = U(r);+ return o.current = r, H(() => {let r = i.current;r.innerHTML = l([["local", "本地磁盘"],@@ -1152,71 +1152,71 @@ function ht({ value: t, label: n, onChange: r }) {return s.addEventListener("change", c), () => {a.current = null, s.disabled = !0, s.removeEventListener("change", c), r.replaceChildren();};- }, [n]), W(() => {+ }, [n]), H(() => {a.current && (a.current.value = t);- }, [t]), /* @__PURE__ */ K("div", {+ }, [t]), /* @__PURE__ */ W("div", {ref: i,class: "configsourcecontrol"});}-function gt({ data: e, receipt: t }) {+function yt({ data: e, receipt: t }) {let n = e.media_sources?.filter((e) => ["local","115","pikpak"- ].includes(e.location)), [r, i] = H(n?.length ? n.map((e) => e.path) : e.media_dirs.length ? e.media_dirs : [""]), [o, c] = H(n?.map((e) => e.location) ?? []), [l, u] = H(n?.map((e) => e.root) ?? []), [f, p] = H(String(e.port)), [m, h] = H(!1), [g, _] = H([]), [v, y] = H(""), [b, x] = H(""), [S, C] = H(null), [w, T] = H(null), E = G(!1), D = G(e.revision), O = G([]), k = G(null);- W(() => {+ ].includes(e.location)), [r, i] = B(n?.length ? n.map((e) => e.path) : e.media_dirs.length ? e.media_dirs : [""]), [o, c] = B(n?.map((e) => e.location) ?? []), [l, u] = B(n?.map((e) => e.root) ?? []), [f, p] = B(String(e.port)), [m, h] = B(!1), [g, _] = B([]), [v, y] = B(""), [b, x] = B(""), [S, C] = B(null), [w, T] = B(null), E = U(!1), D = U(e.revision), O = U([]), k = U(null);+ H(() => {w !== null && (O.current[w]?.focus(), T(null));- }, [w]), U(() => {+ }, [w]), V(() => {if (!S) return;- let e = setTimeout(() => location.assign(S.url), ut);+ let e = setTimeout(() => location.assign(S.url), pt);return () => clearTimeout(e);}, [S]);- let A = (e, t) => {+ let ee = (e, t) => {i((n) => n.map((n, r) => r === e ? t : n));- }, ee = () => {+ }, te = () => {T(r.length), i((e) => [...e, ""]);- }, te = (e) => {+ }, ne = (e) => {c((t) => t.filter((t, n) => n !== e)), u((t) => t.filter((t, n) => n !== e)), i((t) => t.filter((t, n) => n !== e)), _((t) => t.filter((t, n) => n !== e));- }, j = (e, t) => {+ }, A = (e, t) => {_((n) => {let r = [...n];for (; r.length <= e;) r.push("");return r[e] = t, r;});- }, M = async (e, t) => {+ }, re = async (e, t) => {if (t.getAttribute("aria-busy") !== "true") {d(t, !0);try {- let { path: t } = await R(lt, { initial: r[e] ?? "" });- t && (A(e, t), j(e, ""));+ let { path: t } = await I(ft, { initial: r[e] ?? "" });+ t && (ee(e, t), A(e, ""));} catch (t) {- j(e, I(t));+ A(e, P(t));} finally {d(t, !1);}}};- return S ? /* @__PURE__ */ K("div", {+ return S ? /* @__PURE__ */ W("div", {class: "configsaved",role: "status",- children: /* @__PURE__ */ K("div", {+ children: /* @__PURE__ */ W("div", {class: "geist-note geist-note-success",role: "note",- children: [/* @__PURE__ */ K("svg", {+ children: [/* @__PURE__ */ W("svg", {"aria-hidden": "true",viewBox: "0 0 24 24",- children: /* @__PURE__ */ K("use", { href: "#i-check" })- }), /* @__PURE__ */ K("p", { children: /* @__PURE__ */ K("span", { children: [+ children: /* @__PURE__ */ W("use", { href: "#i-check" })+ }), /* @__PURE__ */ W("p", { children: /* @__PURE__ */ W("span", { children: ["配置已保存,Peach 正在重新启动。稍后自动跳转,或点击",- /* @__PURE__ */ K("a", {+ /* @__PURE__ */ W("a", {href: S.url,children: "进入馆藏"}),"。"] }) })]})- }) : /* @__PURE__ */ K("form", {+ }) : /* @__PURE__ */ W("form", {class: "configfieldset","data-geist-fieldset": !0,"aria-labelledby": "configTitle",@@ -1224,7 +1224,7 @@ function gt({ data: e, receipt: t }) {if (n.preventDefault(), !E.current) {E.current = !0, d(k.current, !0), x("");try {- let n = await R(ct, {+ let n = await I(dt, {revision: D.current,media_dirs: r,...e.media_sources ? { media_sources: r.map((e, t) => ({@@ -1237,75 +1237,75 @@ function gt({ data: e, receipt: t }) {});D.current = n.revision, _([]), y(""), t("已保存配置"), C(n);} catch (e) {- let t = ft(e);- t ? (_(t.media_dirs ?? []), y(t.port ?? "")) : (_([]), y(""), x(I(e)));+ let t = ht(e);+ t ? (_(t.media_dirs ?? []), y(t.port ?? "")) : (_([]), y(""), x(P(e)));} finally {E.current = !1, d(k.current, !1);}}},noValidate: !0,- children: [/* @__PURE__ */ K("div", {+ children: [/* @__PURE__ */ W("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ K(q, { html: a("configTitle", "这台电脑") }),- /* @__PURE__ */ K("div", {+ /* @__PURE__ */ W(G, { html: a("configTitle", "这台电脑") }),+ /* @__PURE__ */ W("div", {class: "configfield",children: [- /* @__PURE__ */ K("span", {+ /* @__PURE__ */ W("span", {class: "configlabel",id: "configDirsLabel",children: "媒体文件夹"}),- /* @__PURE__ */ K("div", {+ /* @__PURE__ */ W("div", {class: "configdirs",role: "group","aria-labelledby": "configDirsLabel",- children: r.map((t, n) => /* @__PURE__ */ K("div", {+ children: r.map((t, n) => /* @__PURE__ */ W("div", {class: "configdir",children: [- /* @__PURE__ */ K("span", {+ /* @__PURE__ */ W("span", {class: "configpathlabel",children: ["本机文件夹 ", n + 1]}),- /* @__PURE__ */ K("input", {+ /* @__PURE__ */ W("input", {class: "geist-input",type: "text",value: t,"aria-label": `媒体文件夹 ${n + 1}`,"aria-invalid": g[n] ? "true" : void 0,- onInput: (e) => A(n, e.currentTarget.value),+ onInput: (e) => ee(n, e.currentTarget.value),ref: (e) => {O.current[n] = e;}}),- /* @__PURE__ */ K("button", {+ /* @__PURE__ */ W("button", {type: "button",class: "geist-button configpick","aria-label": "选择文件夹",- onClick: (e) => M(n, e.currentTarget),- children: /* @__PURE__ */ K("svg", {+ onClick: (e) => re(n, e.currentTarget),+ children: /* @__PURE__ */ W("svg", {viewBox: "0 0 24 24","aria-hidden": "true",- children: /* @__PURE__ */ K("use", { href: "#i-folder-search" })+ children: /* @__PURE__ */ W("use", { href: "#i-folder-search" })})}),- r.length > 1 ? /* @__PURE__ */ K("button", {+ r.length > 1 ? /* @__PURE__ */ W("button", {type: "button",class: "geist-button configrm","aria-label": "移除这个文件夹",- onClick: () => te(n),- children: /* @__PURE__ */ K("svg", {+ onClick: () => ne(n),+ children: /* @__PURE__ */ W("svg", {viewBox: "0 0 24 24","aria-hidden": "true",- children: /* @__PURE__ */ K("use", { href: "#i-x" })+ children: /* @__PURE__ */ W("use", { href: "#i-x" })})}) : null,- /* @__PURE__ */ K("div", {+ /* @__PURE__ */ W("div", {class: "configsource",- children: [/* @__PURE__ */ K("div", {+ children: [/* @__PURE__ */ W("div", {class: "configsourcelabel",- children: ["媒体来源", /* @__PURE__ */ K(ht, {+ children: ["媒体来源", /* @__PURE__ */ W(vt, {label: `媒体来源 ${n + 1}`,value: o[n] || "local",onChange: (e) => {@@ -1313,7 +1313,7 @@ function gt({ data: e, receipt: t }) {t[n] = e, c(t);}})]- }), e.windows === !1 ? /* @__PURE__ */ K("label", { children: ["Windows 中的对应路径", /* @__PURE__ */ K("input", {+ }), e.windows === !1 ? /* @__PURE__ */ W("label", { children: ["Windows 中的对应路径", /* @__PURE__ */ W("input", {class: "geist-input","aria-label": `Windows 中的对应路径 ${n + 1}`,value: l[n] || "",@@ -1324,7 +1324,7 @@ function gt({ data: e, receipt: t }) {}})] }) : null]}),- g[n] ? /* @__PURE__ */ K("p", {+ g[n] ? /* @__PURE__ */ W("p", {class: "configbad",role: "alert",children: g[n]@@ -1332,61 +1332,61 @@ function gt({ data: e, receipt: t }) {]}, n))}),- /* @__PURE__ */ K("button", {+ /* @__PURE__ */ W("button", {type: "button",class: "geist-button configadd",- onClick: ee,+ onClick: te,children: "添加文件夹"}),- o.some((e) => e === "115" || e === "pikpak") ? /* @__PURE__ */ K("p", {+ o.some((e) => e === "115" || e === "pikpak") ? /* @__PURE__ */ W("p", {class: "confighelp",- children: ["先在 CloudDrive 登录网盘并完成挂载。", /* @__PURE__ */ K("a", {+ children: ["先在 CloudDrive 登录网盘并完成挂载。", /* @__PURE__ */ W("a", {href: "https://www.clouddrive2.com/help.html",target: "_blank",rel: "noreferrer",- children: ["挂载帮助", /* @__PURE__ */ K("svg", {+ children: ["挂载帮助", /* @__PURE__ */ W("svg", {"aria-hidden": "true",viewBox: "0 0 24 24",- children: /* @__PURE__ */ K("use", { href: "#i-external-link" })+ children: /* @__PURE__ */ W("use", { href: "#i-external-link" })})]})]}) : null,- o.some((e) => e === "115" || e === "pikpak") ? e.mount_dependencies?.filter((e) => !e.available).map((e) => /* @__PURE__ */ K("p", {+ o.some((e) => e === "115" || e === "pikpak") ? e.mount_dependencies?.filter((e) => !e.available).map((e) => /* @__PURE__ */ W("p", {class: "confighelp",children: ["未检测到 ",e.name,"。",- /* @__PURE__ */ K("a", {+ /* @__PURE__ */ W("a", {href: e.download_url,target: "_blank",rel: "noreferrer",children: ["下载 ",e.name,- /* @__PURE__ */ K("svg", {+ /* @__PURE__ */ W("svg", {"aria-hidden": "true",viewBox: "0 0 24 24",- children: /* @__PURE__ */ K("use", { href: "#i-external-link" })+ children: /* @__PURE__ */ W("use", { href: "#i-external-link" })})]})]})) : null,- e.windows === !1 ? /* @__PURE__ */ K("p", {+ e.windows === !1 ? /* @__PURE__ */ W("p", {class: "confighelp",children: "本机文件夹是这台电脑读取媒体的位置。Windows 中的对应路径用于匹配馆藏中已有的路径,例如 B:\\ 对应本机挂载文件夹。"}) : null]}),- e.port_editable === !1 ? null : /* @__PURE__ */ K("div", {+ e.port_editable === !1 ? null : /* @__PURE__ */ W("div", {class: "configfield",children: [- /* @__PURE__ */ K("label", {+ /* @__PURE__ */ W("label", {for: "configPort",children: "本机访问端口"}),- /* @__PURE__ */ K("input", {+ /* @__PURE__ */ W("input", {id: "configPort",class: "geist-input",type: "text",@@ -1395,43 +1395,43 @@ function gt({ data: e, receipt: t }) {"aria-invalid": v ? "true" : void 0,onInput: (e) => p(e.currentTarget.value)}),- v ? /* @__PURE__ */ K("p", {+ v ? /* @__PURE__ */ W("p", {class: "configbad",role: "alert",children: v}) : null,- /* @__PURE__ */ K("p", {+ /* @__PURE__ */ W("p", {class: "confighelp",children: "浏览器地址里冒号后面的数字,一般不用改。"})]}),- /* @__PURE__ */ K("label", {+ /* @__PURE__ */ W("label", {class: "configcheck",- children: [/* @__PURE__ */ K("span", {+ children: [/* @__PURE__ */ W("span", {class: "pcheck",- children: [/* @__PURE__ */ K("input", {+ children: [/* @__PURE__ */ W("input", {type: "checkbox",checked: m,onChange: (e) => h(e.currentTarget.checked)- }), /* @__PURE__ */ K("span", {+ }), /* @__PURE__ */ W("span", {"aria-hidden": "true",- children: /* @__PURE__ */ K("svg", {+ children: /* @__PURE__ */ W("svg", {viewBox: "0 0 24 24",- children: /* @__PURE__ */ K("use", { href: "#i-check" })+ children: /* @__PURE__ */ W("use", { href: "#i-check" })})})]- }), /* @__PURE__ */ K("span", { children: "保存后扫描并补全资料" })]+ }), /* @__PURE__ */ W("span", { children: "保存后扫描并补全资料" })]}),- b ? /* @__PURE__ */ K(q, { html: s(b, {+ b ? /* @__PURE__ */ W(G, { html: s(b, {variant: "error",label: "没有保存"}) }) : null]- }), /* @__PURE__ */ K("div", {+ }), /* @__PURE__ */ W("div", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,- children: [/* @__PURE__ */ K("p", { children: e.port_editable === !1 ? "保存后 Peach 会重新载入配置。" : "保存后 Peach 会重新启动,端口改了就用新地址打开。" }), /* @__PURE__ */ K("button", {+ children: [/* @__PURE__ */ W("p", { children: e.port_editable === !1 ? "保存后 Peach 会重新载入配置。" : "保存后 Peach 会重新启动,端口改了就用新地址打开。" }), /* @__PURE__ */ W("button", {type: "submit",class: "geist-button primary",ref: k,@@ -1440,80 +1440,80 @@ function gt({ data: e, receipt: t }) {})]});}-function _t({ receipt: e, data: t, error: n }) {- return n || !t ? /* @__PURE__ */ K(q, {+function bt({ receipt: e, data: t, error: n }) {+ return n || !t ? /* @__PURE__ */ W(G, {class: "configpage",html: s(n || "没有读到配置", {variant: "error",label: "打不开配置"})- }) : /* @__PURE__ */ K("div", {+ }) : /* @__PURE__ */ W("div", {class: "configpage",children: [- t.startup ? /* @__PURE__ */ K("h2", {+ t.startup ? /* @__PURE__ */ W("h2", {class: "configgroup",children: "通用"}) : null,- t.startup ? /* @__PURE__ */ K(at, {+ t.startup ? /* @__PURE__ */ W(ct, {startup: t.startup,receipt: e}) : null,- /* @__PURE__ */ K("h2", {+ /* @__PURE__ */ W("h2", {class: "configgroup",children: "媒体"}),- t.editable ? /* @__PURE__ */ K(gt, {+ t.editable ? /* @__PURE__ */ W(yt, {data: t,receipt: e- }) : /* @__PURE__ */ K(q, { html: s(t.notice, {+ }) : /* @__PURE__ */ W(G, { html: s(t.notice, {variant: "secondary",label: "只读"}) }),- /* @__PURE__ */ K(mt, { data: t }),- t.peach_proxy || t.access ? /* @__PURE__ */ K("h2", {+ /* @__PURE__ */ W(_t, { data: t }),+ t.peach_proxy || t.access ? /* @__PURE__ */ W("h2", {class: "configgroup",children: "网络与访问"}) : null,- t.peach_proxy ? /* @__PURE__ */ K(nt, {+ t.peach_proxy ? /* @__PURE__ */ W(at, {initial: t.peach_proxy,receipt: e}) : null,- t.access ? /* @__PURE__ */ K($e, {+ t.access ? /* @__PURE__ */ W(nt, {initial: t.access,receipt: e}) : null,- /* @__PURE__ */ K("h2", {+ /* @__PURE__ */ W("h2", {class: "configgroup",children: "更新与维护"}),- t.updates ? /* @__PURE__ */ K(tt, {+ t.updates ? /* @__PURE__ */ W(it, {initial: t.updates,initialJob: t.update_job}) : null,- /* @__PURE__ */ K(pt, { facts: t.facts }),- t.uninstall ? /* @__PURE__ */ K(st, { uninstall: t.uninstall }) : null+ /* @__PURE__ */ W(gt, { facts: t.facts }),+ t.uninstall ? /* @__PURE__ */ W(ut, { uninstall: t.uninstall }) : null]});}//#endregion//#region node_modules/@preact/signals-core/dist/signals-core.module.js-var vt = Symbol.for("preact-signals");-function yt() {+var xt = Symbol.for("preact-signals");+function St() {if (Y > 1) Y--;else {var e, t = !1;for ((function() {- var e = Dt;- for (Dt = void 0; e !== void 0;) {+ var e = Ot;+ for (Ot = 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;}- })(); Ct !== void 0;) {- var n = Ct;- for (Ct = void 0, wt++; n !== void 0;) {+ })(); J !== void 0;) {+ var n = J;+ for (J = void 0, Tt++; n !== void 0;) {var r = n.u;- if (n.u = void 0, n.f &= -3, !(8 & n.f) && jt(n)) try {+ if (n.u = void 0, n.f &= -3, !(8 & n.f) && Mt(n)) try {n.c();} catch (n) {t ||= (e = n, !0);@@ -1521,53 +1521,53 @@ function yt() {n = r;}}- if (wt = 0, Y--, t) throw e;+ if (Tt = 0, Y--, t) throw e;}}-function bt(e) {+function Ct(e) {if (Y > 0) return e();- Et = ++Tt, Y++;+ Dt = ++Et, Y++;try {return e();} finally {- yt();+ St();}}-var xt, J = void 0;-function St(e) {- var t = J, n = xt;- J = void 0, xt = void 0;+var K, q = void 0;+function wt(e) {+ var t = q, n = K;+ q = void 0, K = void 0;try {return e();} finally {- J = t, xt = n;+ q = t, K = n;}}-var Ct = void 0, Y = 0, wt = 0, Tt = 0, Et = 0, Dt = void 0, Ot = 0;-function kt(e) {- if (J !== void 0) {+var J = void 0, Y = 0, Tt = 0, Et = 0, Dt = 0, Ot = void 0, kt = 0;+function At(e) {+ if (q !== void 0) {var t = e.n;- if (t === void 0 || t.t !== J) return t = {+ if (t === void 0 || t.t !== q) return t = {i: 0,S: e,- p: J.s,+ p: q.s,n: void 0,- t: J,+ t: q,e: void 0,x: void 0,r: t- }, J.s !== void 0 && (J.s.n = t), J.s = t, e.n = t, 32 & J.f && e.S(t), t;- if (t.i === -1) return t.i = 0, t.n !== void 0 && (t.n.p = t.p, t.p !== void 0 && (t.p.n = t.n), t.p = J.s, t.n = void 0, J.s.n = t, J.s = t), t;+ }, q.s !== void 0 && (q.s.n = t), q.s = t, e.n = t, 32 & q.f && e.S(t), t;+ if (t.i === -1) return t.i = 0, t.n !== void 0 && (t.n.p = t.p, t.p !== void 0 && (t.p.n = t.n), t.p = q.s, t.n = void 0, q.s.n = t, q.s = t), t;}}function X(e, t) {this.v = e, this.i = 0, this.n = void 0, this.t = void 0, this.l = 0, this.W = t?.watched, this.Z = t?.unwatched, this.name = t?.name;}-X.prototype.brand = vt, X.prototype.h = function() {+X.prototype.brand = xt, X.prototype.h = function() {return !0;}, X.prototype.S = function(e) {var t = this, n = this.t;- n !== e && e.e === void 0 && (e.x = n, this.t = e, n === void 0 ? St(function() {+ n !== e && e.e === void 0 && (e.x = n, this.t = e, n === void 0 ? wt(function() {var e;(e = t.W) == null || e.call(t);}) : n.e = e);@@ -1575,16 +1575,16 @@ X.prototype.brand = vt, X.prototype.h = function() {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 && St(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 && wt(function() {var e;(e = t.Z) == null || e.call(t);}));}}, X.prototype.subscribe = function(e) {var t = this;- return Rt(function() {+ return zt(function() {var n = t.value;- St(function() {+ wt(function() {return e(n);});}, { name: "sub" });@@ -1596,41 +1596,41 @@ X.prototype.brand = vt, X.prototype.h = function() {return this.value;}, X.prototype.peek = function() {var e = this;- return St(function() {+ return wt(function() {return e.value;});}, Object.defineProperty(X.prototype, "value", {get: function() {- var e = kt(this);+ var e = At(this);return e !== void 0 && (e.i = this.i), this.v;},set: function(e) {if (e !== this.v) {- if (wt > 100) throw Error("Cycle detected");+ if (Tt > 100) throw Error("Cycle detected");(function(e) {- Y !== 0 && wt === 0 && e.l !== Et && (e.l = Et, Dt = {+ Y !== 0 && Tt === 0 && e.l !== Dt && (e.l = Dt, Ot = {S: e,v: e.v,i: e.i,- o: Dt+ o: Ot});- })(this), this.v = e, this.i++, Ot++, Y++;+ })(this), this.v = e, this.i++, kt++, Y++;try {for (var t = this.t; t !== void 0; t = t.x) t.t.N();} finally {- yt();+ St();}}}});-function At(e, t) {+function jt(e, t) {return new X(e, t);}-function jt(e) {+function Mt(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 Mt(e) {+function Nt(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) {@@ -1639,7 +1639,7 @@ function Mt(e) {}}}-function Nt(e) {+function Pt(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;@@ -1647,21 +1647,21 @@ function Nt(e) {e.s = n;}function Z(e, t) {- X.call(this, void 0, t), this.x = e, this.s = void 0, this.g = Ot - 1, this.f = 4;+ X.call(this, void 0, t), this.x = e, this.s = void 0, this.g = kt - 1, this.f = 4;}Z.prototype = new X(), Z.prototype.h = function() {if (this.f &= -3, 1 & this.f) return !1;- if ((36 & this.f) == 32 || (this.f &= -5, this.g === Ot)) return !0;- if (this.g = Ot, this.f |= 1, this.i > 0 && !jt(this)) return this.f &= -2, !0;- var e = J;+ if ((36 & this.f) == 32 || (this.f &= -5, this.g === kt)) return !0;+ if (this.g = kt, this.f |= 1, this.i > 0 && !Mt(this)) return this.f &= -2, !0;+ var e = q;try {- Mt(this), J = this;+ Nt(this), q = 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 J = e, Nt(this), this.f &= -2, !0;+ return q = e, Pt(this), this.f &= -2, !0;}, Z.prototype.S = function(e) {if (this.t === void 0) {this.f |= 36;@@ -1680,38 +1680,38 @@ Z.prototype = new X(), Z.prototype.h = function() {}}, Object.defineProperty(Z.prototype, "value", { get: function() {if (1 & this.f) throw Error("Cycle detected");- var e = kt(this);+ var e = At(this);if (this.h(), e !== void 0 && (e.i = this.i), 16 & this.f) throw this.v;return this.v;} });-function Pt(e, t) {+function Ft(e, t) {return new Z(e, t);}-function Ft(e) {+function It(e) {var t = e.m;if (e.m = void 0, typeof t == "function") {Y++;- var n = J;- J = void 0;+ var n = q;+ q = void 0;try {t();} catch (t) {- throw e.f &= -2, e.f |= 8, It(e), t;+ throw e.f &= -2, e.f |= 8, Lt(e), t;} finally {- J = n, yt();+ q = n, St();}}}-function It(e) {+function Lt(e) {for (var t = e.s; t !== void 0; t = t.n) t.S.U(t);- e.x = void 0, e.s = void 0, Ft(e);+ e.x = void 0, e.s = void 0, It(e);}-function Lt(e) {- if (J !== this) throw Error("Out-of-order effect");- Nt(this), J = e, this.f &= -2, 8 & this.f && It(this), yt();+function Rt(e) {+ if (q !== this) throw Error("Out-of-order effect");+ Pt(this), q = e, this.f &= -2, 8 & this.f && Lt(this), St();}function Q(e, t) {- this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, xt && xt.push(this);+ this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, K && K.push(this);}Q.prototype.c = function() {var e = this.S();@@ -1724,17 +1724,17 @@ Q.prototype.c = function() {}}, Q.prototype.S = function() {if (1 & this.f) throw Error("Cycle detected");- this.f |= 1, this.f &= -9, Ft(this), Mt(this), Y++;- var e = J;- return J = this, Lt.bind(this, e);+ this.f |= 1, this.f &= -9, It(this), Nt(this), Y++;+ var e = q;+ return q = this, Rt.bind(this, e);}, Q.prototype.N = function() {- 2 & this.f || (this.f |= 2, this.u = Ct, Ct = this);+ 2 & this.f || (this.f |= 2, this.u = J, J = this);}, Q.prototype.d = function() {- this.f |= 8, 1 & this.f || It(this);+ this.f |= 8, 1 & this.f || Lt(this);}, Q.prototype.dispose = function() {this.d();};-function Rt(e, t) {+function zt(e, t) {var n = new Q(e, t);try {n.c();@@ -1746,35 +1746,35 @@ function Rt(e, t) {}//#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 Bt, Vt, Ht = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, Ut = [];+zt(function() {+ Bt = this.N;})();function $(e, t) {- y[e] = t.bind(null, y[e] || function() {});+ b[e] = t.bind(null, b[e] || function() {});}-function Ut(e) {- if (Bt) {- var t = Bt;- Bt = void 0, t();+function Wt(e) {+ if (Vt) {+ var t = Vt;+ Vt = void 0, t();}- Bt = e && e.S();+ Vt = e && e.S();}-function Wt(e) {- var t = this, n = e.data, r = Kt(n);+function Gt(e) {+ var t = this, n = e.data, r = qt(n);r.name = "ReactiveDom", r.value = n;- var i = Ue(function() {+ var i = Ke(function() {for (var e = t, n = t.__v; n = n.__;) if (n.__c) {n.__c.__$f |= 4;break;}- var i = Pt(function() {+ var i = Ft(function() {var e = r.value.value;return e === 0 ? 0 : !0 === e ? "" : e || "";- }), a = Pt(function() {- return !Array.isArray(i.value) && !x(i.value);- }), o = Rt(function() {- if (this.N = Yt, a.value) {+ }), a = Ft(function() {+ return !Array.isArray(i.value) && !S(i.value);+ }), o = zt(function() {+ if (this.N = Xt, a.value) {var t = i.value;e.__v && e.__v.__e && e.__v.__e.nodeType === 3 && (e.__v.__e.data = t);}@@ -1785,14 +1785,14 @@ function Wt(e) {}, []), a = i[0], o = i[1];return a.value ? o.peek() : o.value;}-Wt.displayName = "ReactiveTextNode", Object.defineProperties(X.prototype, {+Gt.displayName = "ReactiveTextNode", Object.defineProperties(X.prototype, {constructor: {configurable: !0,value: void 0},type: {configurable: !0,- value: Wt+ value: Gt},props: {configurable: !0,@@ -1817,25 +1817,25 @@ Wt.displayName = "ReactiveTextNode", Object.defineProperties(X.prototype, {}e(t);}), $("__r", function(e, t) {- if (e(t), t.type !== P) {- Ut();+ if (e(t), t.type !== M) {+ Wt();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 zt(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({});+ Ht && ((t = this.y) == null || t.call(this)), e.__$f |= 1, e.setState({});};- }(r), typeof t.type == "function" ? t.type.displayName || t.type.name : ""))), Ut(n);+ }(r), typeof t.type == "function" ? t.type.displayName || t.type.name : ""))), Wt(n);}}), $("__e", function(e, t, n, r) {- Ut(), e(t, n, r);+ Wt(), e(t, n, r);}), $("diffed", function(e, t) {- Ut();+ Wt();var n;if (typeof t.type == "string" && (n = t.__e)) {var r = t.__np, i = t.props, a = n.U;@@ -1845,19 +1845,19 @@ Wt.displayName = "ReactiveTextNode", Object.defineProperties(X.prototype, {}if (r) for (var c in a || (a = {}, n.U = a), r) {var l = a[c], u = r[c];- l === void 0 ? (l = Gt(n, c, u, i), a[c] = l) : l.o(u, i);+ l === void 0 ? (l = Kt(n, c, u, i), a[c] = l) : l.o(u, i);}}e(t);});-function Gt(e, t, n, r) {- var i = t in e && e.ownerSVGElement === void 0, a = At(n);+function Kt(e, t, n, r) {+ var i = t in e && e.ownerSVGElement === void 0, a = jt(n);return {o: function(e, t) {a.value = e, r = t;},- d: Rt(function() {- this.N = Yt;+ d: zt(function() {+ this.N = Xt;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));})@@ -1889,7 +1889,7 @@ $("unmount", function(e, t) {e(t);}), $("__h", function(e, t, n, r) {r < 3 && (t.__$f |= 2), e(t, n, r);-}), se.prototype.shouldComponentUpdate = function(e, t) {+}), ue.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;@@ -1901,55 +1901,55 @@ $("unmount", function(e, t) {for (var s in this.props) if (!(s in e)) return !0;return !1;};-function Kt(e, t) {- return Ue(function() {- return At(e, t);+function qt(e, t) {+ return Ke(function() {+ return jt(e, t);}, []);}-var qt = function(e) {+var Jt = function(e) {queueMicrotask(function() {queueMicrotask(e);});};-function Jt() {- bt(function() {- for (var e; e = Ht.shift();) zt.call(e);+function Yt() {+ Ct(function() {+ for (var e; e = Ut.shift();) Bt.call(e);});}-function Yt() {- Ht.push(this) === 1 && (y.requestAnimationFrame || qt)(Jt);+function Xt() {+ Ut.push(this) === 1 && (b.requestAnimationFrame || Jt)(Yt);}//#endregion//#region src/state/quality-goals.ts-var Xt = "/api/quality-goals?limit=200", Zt = {+var Zt = "/api/quality-goals?limit=200", Qt = {data: null,error: ""-}, Qt = At(Zt), $t = 0, en = Pt(() => Qt.value);-Pt(() => Qt.value.data?.total ?? null);-function tn() {- $t += 1, Qt.value = Zt;+}, $t = jt(Qt), en = 0, tn = Ft(() => $t.value);+Ft(() => $t.value.data?.total ?? null);+function nn() {+ en += 1, $t.value = Qt;}-async function nn(e) {- let t = $t += 1;+async function rn(e) {+ let t = en += 1;try {- let n = await L(Xt, e);- return t === $t && (Qt.value = {+ let n = await F(Zt, e);+ return t === en && ($t.value = {data: n,error: ""}), n;} catch (n) {- throw !e?.aborted && t === $t && (Qt.value = {+ throw !e?.aborted && t === en && ($t.value = {data: null,- error: I(n)+ error: P(n)}), n;}}//#endregion//#region src/islands/quality-goals.tsx-var rn = (e, t) => nn(t), an = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;-function on({ openItem: e, javTitleHtml: t, javDisplayName: n, srcBadge: r }) {- let { data: a, error: o } = en.value;- if (o) return /* @__PURE__ */ K("div", {+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: r }) {+ let { data: a, error: o } = tn.value;+ if (o) return /* @__PURE__ */ W("div", {class: "qualitylist",dangerouslySetInnerHTML: { __html: s(o, {variant: "error",@@ -1957,51 +1957,51 @@ function on({ openItem: e, javTitleHtml: t, javDisplayName: n, srcBadge: r }) {}) }});let c = a?.items ?? [];- return c.length ? /* @__PURE__ */ K("div", {+ return c.length ? /* @__PURE__ */ W("div", {class: "qualitylist",- children: c.map((i) => /* @__PURE__ */ K("article", {+ children: c.map((i) => /* @__PURE__ */ W("article", {class: "qualityitem",- children: [/* @__PURE__ */ K("button", {+ children: [/* @__PURE__ */ W("button", {class: "qualitycover",type: "button","aria-label": `打开 ${n(i)}`,onClick: () => e(i.id),- children: /* @__PURE__ */ K("img", {- src: an(i),+ children: /* @__PURE__ */ W("img", {+ src: on(i),alt: "",loading: "lazy",onError: (e) => e.currentTarget.remove()})- }), /* @__PURE__ */ K("div", { children: [- /* @__PURE__ */ K("h3", { children: /* @__PURE__ */ K("button", {+ }), /* @__PURE__ */ W("div", { children: [+ /* @__PURE__ */ W("h3", { children: /* @__PURE__ */ W("button", {type: "button","data-middle-truncate": !0,onClick: () => e(i.id),dangerouslySetInnerHTML: { __html: t(i) }}) }),- /* @__PURE__ */ K("p", {+ /* @__PURE__ */ W("p", {class: "mono",children: [- /* @__PURE__ */ K("span", {+ /* @__PURE__ */ W("span", {style: "display:contents",dangerouslySetInnerHTML: { __html: r(i.location, i.cost) }}),- /* @__PURE__ */ K("span", { children: m[i.location] ?? i.location }),- /* @__PURE__ */ K("span", { children: h(i.duration) }),- /* @__PURE__ */ K("span", { children: g(i.size ?? 0) })+ /* @__PURE__ */ W("span", { children: m[i.location] ?? i.location }),+ /* @__PURE__ */ W("span", { children: g(i.duration) }),+ /* @__PURE__ */ W("span", { children: _(i.size ?? 0) })]}),- i.reason ? /* @__PURE__ */ K("p", { children: i.reason }) : null+ i.reason ? /* @__PURE__ */ W("p", { children: i.reason }) : null] })]}, i.id))- }) : /* @__PURE__ */ K("div", {+ }) : /* @__PURE__ */ W("div", {class: "qualitylist",dangerouslySetInnerHTML: { __html: i("sparkles", "没有标记中的高清版目标", "现有版本都已满足条件,或还没有加入追踪。") }});}//#endregion//#region src/jobs.ts-async function sn(e) {+async function cn(e) {let t = e.pause || ((e) => new Promise((t) => setTimeout(t, e))), n = 0;for (; e.active();) {let r;@@ -2016,11 +2016,11 @@ async function sn(e) {await t(2e3);}}-function cn(e) {+function ln(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;- sn({+ cn({read: e.read,active: () => !i && e.active() && t.isConnected,keepWatching: e.watchIdle !== !1,@@ -2046,37 +2046,37 @@ function cn(e) {}//#endregion//#region src/islands/scraping.tsx-var ln = (e, t) => L("/api/scraping", t);-function un({ value: e, onChange: t }) {- let n = G(null), r = G(t);- return r.current = t, W(() => {+var un = (e, t) => F("/api/scraping", t);+function dn({ value: e, onChange: t }) {+ let n = U(null), r = U(t);+ return r.current = t, H(() => {let t = n.current;t.innerHTML = l([["peach", "Peach 代理"], ["direct", "直接连接"]], e, { label: "连接方式" });let i = p(t.firstElementChild), a = () => r.current(i.value);return i.addEventListener("change", a), () => {i.disabled = !0, i.removeEventListener("change", a), t.replaceChildren();};- }, []), /* @__PURE__ */ K("div", {+ }, []), /* @__PURE__ */ W("div", {ref: n,class: "scraping-network"});}-function dn({ source: e, toast: t }) {- let [n, r] = H(e), [i, o] = H(e.network), [c, l] = H(""), [u, f] = H(""), [p, m] = H("paste"), [h, g] = H(""), [_, v] = H(!1), [y, b] = H(""), [x, S] = H([]), C = G(null), w = G(null);- W(() => {+function fn({ source: e, toast: t }) {+ let [n, r] = B(e), [i, o] = B(e.network), [c, l] = B(""), [u, f] = B(""), [p, m] = B("paste"), [h, g] = B(""), [_, v] = B(!1), [y, b] = B(""), [x, S] = B([]), C = U(null), w = U(null);+ H(() => {w.current?.querySelectorAll("footer button").forEach((e) => d(e, _));}, [_]);- let T = G(new AbortController());- U(() => () => T.current.abort(), []);+ let T = U(new AbortController());+ V(() => () => T.current.abort(), []);async function E(n) {if (!_) {v(!0), b(""), S([]);try {if (n === "check") {- let t = await R("/api/scraping/check", { source: e.source }, "POST", T.current.signal);+ let t = await I("/api/scraping/check", { source: e.source }, "POST", T.current.signal);T.current.signal.aborted || S(t.results);} else {- let a = await R("/api/scraping/settings", {+ let a = await I("/api/scraping/settings", {source: e.source,network: i,cookie: c,@@ -2086,27 +2086,27 @@ function dn({ source: e, toast: t }) {T.current.signal.aborted || (r(a.saved), l(""), f(""), g(""), C.current && (C.current.value = ""), t(n === "revoke" ? "Cookie 已撤销" : "来源设置已保存"));}} catch (e) {- T.current.signal.aborted || b(I(e));+ T.current.signal.aborted || b(P(e));} finally {T.current.signal.aborted || v(!1);}}}- return /* @__PURE__ */ K("section", {+ return /* @__PURE__ */ W("section", {class: "scraping-source",- children: /* @__PURE__ */ K("form", {+ children: /* @__PURE__ */ W("form", {ref: w,class: "cleanupfieldset","data-geist-fieldset": !0,onSubmit: (e) => {e.preventDefault(), E("save");},- children: [/* @__PURE__ */ K("div", {+ children: [/* @__PURE__ */ W("div", {class: "geist-fieldset-content scraping-fields",children: [- /* @__PURE__ */ K("div", {+ /* @__PURE__ */ W("div", {class: "geist-fieldset-heading",- children: [/* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: a(`scraping-${e.source}`, e.label) } }), /* @__PURE__ */ K("a", {+ children: [/* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: a(`scraping-${e.source}`, e.label) } }), /* @__PURE__ */ W("a", {class: "scraping-url",href: e.login,target: "_blank",@@ -2114,25 +2114,25 @@ function dn({ source: e, toast: t }) {children: e.login})]}),- /* @__PURE__ */ K("div", {+ /* @__PURE__ */ W("div", {class: "scraping-label",- children: ["连接方式", /* @__PURE__ */ K(un, {+ children: ["连接方式", /* @__PURE__ */ W(dn, {value: i,onChange: o})]}),- i === "peach" && /* @__PURE__ */ K("a", {+ i === "peach" && /* @__PURE__ */ W("a", {class: "geist-text-link",href: "/configuration#peachProxy",children: "配置 Peach 代理"}),- e.accepts_cookie && /* @__PURE__ */ K(P, { children: [- /* @__PURE__ */ K("p", { children: n.cookie_saved ? "Cookie 已保存,登录是否有效请在抓取时确认。" : "需要登录时,任选一种方式提供 Cookie。" }),- /* @__PURE__ */ K("div", {+ e.accepts_cookie && /* @__PURE__ */ W(M, { children: [+ /* @__PURE__ */ W("p", { children: n.cookie_saved ? "Cookie 已保存,登录是否有效请在抓取时确认。" : "需要登录时,任选一种方式提供 Cookie。" }),+ /* @__PURE__ */ W("div", {class: "insightswitch scraping-cookie-method",role: "radiogroup","aria-label": "提供 Cookie 的方式(二选一)",- children: [["paste", "粘贴 Cookie"], ["file", "导入文件"]].map(([t, n]) => /* @__PURE__ */ K("label", { children: [/* @__PURE__ */ K("input", {+ children: [["paste", "粘贴 Cookie"], ["file", "导入文件"]].map(([t, n]) => /* @__PURE__ */ W("label", { children: [/* @__PURE__ */ W("input", {type: "radio",name: `cookie-method-${e.source}`,value: t,@@ -2140,29 +2140,29 @@ function dn({ source: e, toast: t }) {onChange: () => {m(t), l(""), f(""), g("");}- }), /* @__PURE__ */ K("span", { children: n })] }, t))+ }), /* @__PURE__ */ W("span", { children: n })] }, t))}),- p === "paste" ? /* @__PURE__ */ K("label", { children: ["Cookie", /* @__PURE__ */ K("input", {+ p === "paste" ? /* @__PURE__ */ W("label", { children: ["Cookie", /* @__PURE__ */ W("input", {class: "geist-input",type: "password",autoComplete: "off",value: c,disabled: _,onInput: (e) => l(e.currentTarget.value)- })] }) : /* @__PURE__ */ K("label", {+ })] }) : /* @__PURE__ */ W("label", {class: "scraping-file",- children: ["Netscape Cookie 文件(.txt)", /* @__PURE__ */ K("span", {+ children: ["Netscape Cookie 文件(.txt)", /* @__PURE__ */ W("span", {class: "scraping-file-control",children: [- /* @__PURE__ */ K("span", {+ /* @__PURE__ */ W("span", {class: "geist-button",children: "选择文件"}),- /* @__PURE__ */ K("span", {+ /* @__PURE__ */ W("span", {class: "scraping-file-name",children: h || "未选择文件"}),- /* @__PURE__ */ K("input", {+ /* @__PURE__ */ W("input", {ref: C,type: "file",accept: ".txt",@@ -2192,31 +2192,31 @@ function dn({ source: e, toast: t }) {})]})] }),- y && /* @__PURE__ */ K("div", {+ y && /* @__PURE__ */ W("div", {role: "alert",dangerouslySetInnerHTML: { __html: s(y, { variant: "error" }) }}),- x.map((t) => /* @__PURE__ */ K("div", {+ x.map((t) => /* @__PURE__ */ W("div", {role: "status",dangerouslySetInnerHTML: { __html: s(`${e.label}${t.label === "来源页面" ? "" : " 高清图片"}:${t.ok ? "可连接" : "不能连接"}` + (t.width ? ` · ${t.width} × ${t.height}` : "") + (t.message ? `。${t.message}` : ""), { variant: t.ok ? "success" : "error" }) }}, t.label))]- }), /* @__PURE__ */ K("footer", {+ }), /* @__PURE__ */ W("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,children: [- /* @__PURE__ */ K("button", {+ /* @__PURE__ */ W("button", {class: "geist-button primary",type: "submit",children: "保存"}),- /* @__PURE__ */ K("button", {+ /* @__PURE__ */ W("button", {class: "geist-button",type: "button",onClick: () => void E("check"),children: "检查连接"}),- e.accepts_cookie && n.cookie_saved && /* @__PURE__ */ K("button", {+ e.accepts_cookie && n.cookie_saved && /* @__PURE__ */ W("button", {class: "geist-button",type: "button",onClick: () => void E("revoke"),@@ -2227,14 +2227,14 @@ function dn({ source: e, toast: t }) {})});}-function fn({ data: e, error: t, toast: n }) {- let [r, i] = H(""), [o, c] = H(!1), [l, u] = H(""), f = G(null);- W(() => d(f.current, o), [o]);- let p = G(new AbortController()), m = G(0);+function pn({ data: e, error: t, toast: n }) {+ let [r, i] = B(""), [o, c] = B(!1), [l, u] = B(""), f = U(null);+ H(() => d(f.current, o), [o]);+ let p = U(new AbortController()), m = U(0);async function h(e = !1) {let t = ++m.current;- await sn({- read: (e) => L("/api/scraping/cover", e),+ await cn({+ read: (e) => F("/api/scraping/cover", e),active: () => !p.current.signal.aborted && t === m.current,render: (t) => {c(t.status === "running"), t.status === "running" && (e = !1), t.status === "failed" && !e && u(t.error || "采集未取得"), t.status === "complete" && !e && n(t.result || "封面采集完成");@@ -2242,37 +2242,37 @@ function fn({ data: e, error: t, toast: n }) {disconnected: () => u("连接中断,正在重新读取后台进度")});}- U(() => (h(!0), () => p.current.abort()), []);+ V(() => (h(!0), () => p.current.abort()), []);async function g() {if (!o) {m.current++, c(!0), u("");try {- await R("/api/scraping/cover", { code: r }, "POST", p.current.signal), await h();+ await I("/api/scraping/cover", { code: r }, "POST", p.current.signal), await h();} catch (e) {- p.current.signal.aborted || (c(!1), u(I(e)));+ p.current.signal.aborted || (c(!1), u(P(e)));}}}- return t ? /* @__PURE__ */ K("div", {+ return t ? /* @__PURE__ */ W("div", {role: "alert",dangerouslySetInnerHTML: { __html: s(t, { variant: "error" }) }- }) : /* @__PURE__ */ K("div", {+ }) : /* @__PURE__ */ W("div", {class: "scraping-page",children: [- /* @__PURE__ */ K("p", { children: "高清图片可能需要代理才能下载,请先检查连接。" }),- /* @__PURE__ */ K("section", {+ /* @__PURE__ */ W("p", { children: "高清图片可能需要代理才能下载,请先检查连接。" }),+ /* @__PURE__ */ W("section", {class: "cleanupfieldset scraping-source","data-geist-fieldset": !0,- children: /* @__PURE__ */ K("div", {+ children: /* @__PURE__ */ W("div", {class: "geist-fieldset-content scraping-fields",children: [- /* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: a("scraping-cover", "高清封面") } }),- /* @__PURE__ */ K("form", {+ /* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: a("scraping-cover", "高清封面") } }),+ /* @__PURE__ */ W("form", {class: "scraping-cover-form",onSubmit: (e) => {e.preventDefault(), g();},- children: [/* @__PURE__ */ K("input", {+ children: [/* @__PURE__ */ W("input", {class: "geist-input","aria-label": "馆藏番号",required: !0,@@ -2280,21 +2280,21 @@ function fn({ data: e, error: t, toast: n }) {disabled: o,placeholder: "输入馆藏番号,如 ABW-232",onInput: (e) => i(e.currentTarget.value)- }), /* @__PURE__ */ K("button", {+ }), /* @__PURE__ */ W("button", {ref: f,class: "geist-button primary",type: "submit",children: "抓取封面"})]}),- l && /* @__PURE__ */ K("div", {+ l && /* @__PURE__ */ W("div", {role: "alert",dangerouslySetInnerHTML: { __html: s(l, { variant: "error" }) }})]})}),- e?.sources.map((e) => /* @__PURE__ */ K(dn, {+ e?.sources.map((e) => /* @__PURE__ */ W(fn, {source: e,toast: n}, e.source))@@ -2303,14 +2303,14 @@ function fn({ data: e, error: t, toast: n }) {}//#endregion//#region src/islands/library-processing.tsx-var pn = (e, t) => L("/api/library-processing", t);-function mn({ data: e, error: t, toast: n, onComplete: r, mode: i, monitor: l }) {- let [u, f] = H(e || { status: "idle" }), [p, m] = H(t), [h, g] = H(!1), [_, v] = H(!1), y = G(new AbortController()), b = G(0), x = G(u.status), S = G(null), C = h || u.status === "running";- W(() => d(S.current, C), [C]);+var mn = (e, t) => F("/api/library-processing", t);+function hn({ data: e, error: t, toast: n, onComplete: r, mode: i, monitor: l }) {+ let [u, f] = B(e || { status: "idle" }), [p, m] = B(t), [h, g] = B(!1), [_, v] = B(!1), y = U(new AbortController()), b = U(0), x = U(u.status), S = U(null), C = h || u.status === "running";+ H(() => d(S.current, C), [C]);async function w() {let e = ++b.current;- await sn({- read: (e) => L("/api/library-processing", e),+ await cn({+ read: (e) => F("/api/library-processing", e),active: () => !y.current.signal.aborted && b.current === e,keepWatching: i === "notice" || !!l,render: (e) => {@@ -2319,49 +2319,49 @@ function mn({ data: e, error: t, toast: n, onComplete: r, mode: i, monitor: l })disconnected: () => m("连接中断,正在重新读取处理进度")});}- U(() => ((u.status === "running" || i === "notice" || l) && w(), () => y.current.abort()), []);+ V(() => ((u.status === "running" || i === "notice" || l) && w(), () => y.current.abort()), []);async function T() {if (!C) {g(!0), m(""), v(!1);try {- let e = await R("/api/library-processing", {}, "POST", y.current.signal);+ let e = await I("/api/library-processing", {}, "POST", y.current.signal);if (y.current.signal.aborted) return;x.current = e.status, f(e), g(!1), await w();} catch (e) {- y.current.signal.aborted || (m(I(e)), g(!1));+ y.current.signal.aborted || (m(P(e)), g(!1));}}}- return i === "notice" ? !p && u.status !== "running" && u.status !== "failed" ? null : /* @__PURE__ */ K("div", {+ return i === "notice" ? !p && u.status !== "running" && u.status !== "failed" ? null : /* @__PURE__ */ W("div", {class: "library-processing-banner",role: "status",- children: [/* @__PURE__ */ K("span", { children: p || (u.status === "failed" ? "扫描与资料采集未完成" : `${u.stage || "正在整理馆藏"}${u.total ? ` · ${u.checked || 0} / ${u.total}` : ""}`) }), /* @__PURE__ */ K("a", {+ children: [/* @__PURE__ */ W("span", { children: p || (u.status === "failed" ? "扫描与资料采集未完成" : `${u.stage || "正在整理馆藏"}${u.total ? ` · ${u.checked || 0} / ${u.total}` : ""}`) }), /* @__PURE__ */ W("a", {class: "geist-button",href: "/data-cleanup#libraryProcessing",children: p || u.status === "failed" ? "查看并处理" : "查看进度"})]- }) : /* @__PURE__ */ K(P, { children: [/* @__PURE__ */ K("div", {+ }) : /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W("div", {class: "geist-fieldset-content library-processing",children: [- /* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: a("cleanupScrapingTitle", "扫描与采集") } }),- /* @__PURE__ */ K("p", { children: "扫描媒体文件夹,导入已有资料,采集缺失信息。" }),- /* @__PURE__ */ K("div", {+ /* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: a("cleanupScrapingTitle", "扫描与采集") } }),+ /* @__PURE__ */ W("p", { children: "扫描媒体文件夹,导入已有资料,采集缺失信息。" }),+ /* @__PURE__ */ W("div", {"aria-live": "polite",children: [- u.status === "running" && /* @__PURE__ */ K(P, { children: [/* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: o(`${u.stage || "正在处理"}${u.total ? ` · ${u.checked || 0} / ${u.total}` : ""}`) } }), !!u.total && /* @__PURE__ */ K("div", { dangerouslySetInnerHTML: { __html: c(`已处理 ${u.checked || 0} / ${u.total} 个视频`, u.checked || 0, u.total) } })] }),- (p || u.status === "failed") && /* @__PURE__ */ K("div", {+ u.status === "running" && /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: o(`${u.stage || "正在处理"}${u.total ? ` · ${u.checked || 0} / ${u.total}` : ""}`) } }), !!u.total && /* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: c(`已处理 ${u.checked || 0} / ${u.total} 个视频`, u.checked || 0, u.total) } })] }),+ (p || u.status === "failed") && /* @__PURE__ */ W("div", {role: "alert",dangerouslySetInnerHTML: { __html: s(p || u.error || "处理未完成,请重试", { variant: "error" }) }}),- u.status === "failed" && !!u.issues?.length && /* @__PURE__ */ K("ul", { children: u.issues.slice(0, 20).map((e) => /* @__PURE__ */ K("li", { children: [- e.asset_id ? /* @__PURE__ */ K("a", {+ u.status === "failed" && !!u.issues?.length && /* @__PURE__ */ W("ul", { children: u.issues.slice(0, 20).map((e) => /* @__PURE__ */ W("li", { children: [+ e.asset_id ? /* @__PURE__ */ W("a", {href: `/item/${e.asset_id}`,children: "查看视频"}) : null,e.asset_id ? ":" : "",e.message] })) }),- _ && /* @__PURE__ */ K("div", {+ _ && /* @__PURE__ */ W("div", {class: "library-processing-result",dangerouslySetInnerHTML: { __html: s(`已扫描 ${u.scanned || 0} 个文件,识别 ${u.identified || 0} 个番号,整理 ${u.candidates || 0} 组资料候选。`, {variant: "success",@@ -2371,21 +2371,21 @@ function mn({ data: e, error: t, toast: n, onComplete: r, mode: i, monitor: l })]})]- }), /* @__PURE__ */ K("footer", {+ }), /* @__PURE__ */ W("footer", {class: "geist-fieldset-footer","data-geist-fieldset-footer": !0,children: [- /* @__PURE__ */ K("a", {+ /* @__PURE__ */ W("a", {class: "geist-button",href: "/scraping",children: "采集来源"}),- !!u.candidates && /* @__PURE__ */ K("a", {+ !!u.candidates && /* @__PURE__ */ W("a", {class: "geist-button",href: "/review",children: "复核资料"}),- /* @__PURE__ */ K("button", {+ /* @__PURE__ */ W("button", {ref: S,type: "button",class: "geist-button primary",@@ -2397,12 +2397,12 @@ function mn({ data: e, error: t, toast: n, onComplete: r, mode: i, monitor: l })}//#endregion//#region src/state/index.ts-var hn = { "quality-goals": {- refresh: nn,- reset: tn-} }, gn = () => Object.keys(hn);-async function _n(e) {- let t = hn[e];+var gn = { "quality-goals": {+ refresh: rn,+ reset: nn+} }, _n = () => Object.keys(gn);+async function vn(e) {+ let t = gn[e];if (!t) throw Error(`未登记的共享 store:${String(e)}`);try {return await t.refresh(), !0;@@ -2411,8 +2411,37 @@ async function _n(e) {}}//#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="${h(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>候选身份:${h(e.babepedia_name || "未标注")}</h5>+ <div class="reviewevidenceactions">${t ? `<a class="geist-button" href="${h(t)}" target="_blank" rel="noopener noreferrer">来源资料 ↗</a>` : ""}+ <button type="button" class="geist-button" data-entity-kind="creator" data-entity-name="${h(e.creator || "")}">查看全部 ${r.toLocaleString()} 部作品</button></div>+ ${bn(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="${h(e.name)}">${h(e.name)}</span></button>+ <button class="geist-button" type="button" data-review-reveal="${e.id}" aria-label="打开 ${h(e.name)} 的文件位置">文件位置</button>+ </div>`).join("")}</div>` : "<p>暂无本地作品样本,打开全部作品核对。</p>"}</section>`;+}+function Sn(e) {+ for (let t of e.querySelectorAll("[data-review-picture] img")) {+ let e = () => {+ t.hidden = !0;+ let e = t.parentElement?.querySelector(".reviewimageempty");+ e && (e.hidden = !1);+ };+ t.addEventListener("error", e), t.complete && !t.naturalWidth && e();+ }+}+//#endregion//#region src/review-bulk.ts-var vn = () => ({+var Cn = () => ({busy: !1,groupBy: "candidates",anchor: null,@@ -2421,7 +2450,7 @@ var vn = () => ({assets: /* @__PURE__ */ new Map(),errors: /* @__PURE__ */ new Map()});-function yn(e, t) {+function wn(e, t) {let n = /* @__PURE__ */ new Map();for (let r of e) {let e, i;@@ -2438,11 +2467,11 @@ function yn(e, t) {}return [...n.values()];}-function bn(e, t, n, r, i) {+function Tn(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 xn(e, t, n, r) {+async function En(e, t, n, r) {let i = [], a = 0;for (let o of e) {if (!r()) break;@@ -2453,7 +2482,7 @@ async function xn(e, t, n, r) {} catch (e) {i.push({key: o.key,- message: I(e)+ message: P(e)});}}@@ -2462,10 +2491,10 @@ async function xn(e, t, n, r) {failures: i};}-function Sn(e) {+function Dn(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 Cn(e, r) {+function On(e, r) {let i = e.querySelector(".reviewlist");if (!i || !r.rows.length || r.locked) return;let a = r.state, o = [...i.querySelectorAll("[data-review-key]")], s = () => [...i.querySelectorAll("[data-review-key]")], c = () => s().filter((e) => a.selected.has(e.dataset.reviewKey)), u = () => r.rows.filter((e) => a.selected.has(e.item_key)), f = (e) => !e.querySelector("[data-review-status=\"approved\"]")?.disabled, m = (e, t = "") => {@@ -2505,7 +2534,7 @@ function Cn(e, r) {a.busy || (c().length === o.length ? T() : (o.forEach((e) => a.selected.add(e.dataset.reviewKey)), O()));}, y.onclick = () => k("approved", y), b.onclick = () => k("rejected", b);let E = [];- for (let e of yn(r.rows, a.groupBy)) {+ for (let e of wn(r.rows, a.groupBy)) {let t = e.rows.map((e) => o.find((t) => t.dataset.reviewKey === e.item_key)).filter((e) => !!e), r = document.createElement("section");r.className = "reviewgroup";let c = document.createElement("div");@@ -2532,7 +2561,7 @@ function Cn(e, r) {e.className = "reviewpickname", e.append(...r.childNodes), r.classList.add("reviewpickheading"), r.append(i, e);} else e.prepend(i);let c = (e, n) => {- bn(a, s().map((e) => e.dataset.reviewKey), t, e, n), O();+ Tn(a, s().map((e) => e.dataset.reviewKey), t, e, n), O();};if (i.addEventListener("click", (e) => {e.target !== o && (e.preventDefault(), a.busy || (o.focus(), c(e.shiftKey, !o.checked)));@@ -2544,7 +2573,7 @@ function Cn(e, r) {else if (n.key === "ArrowDown" || n.key === "ArrowUp") {n.preventDefault();let r = s(), i = r[r.indexOf(e) + (n.key === "ArrowDown" ? 1 : -1)];- i && (a.anchor === null && (a.anchor = t), bn(a, r.map((e) => e.dataset.reviewKey), i.dataset.reviewKey, !0, !0), O(), i.querySelector(".reviewpickitem input")?.focus());+ i && (a.anchor === null && (a.anchor = t), Tn(a, r.map((e) => e.dataset.reviewKey), i.dataset.reviewKey, !0, !0), O(), i.querySelector(".reviewpickitem input")?.focus());}}}), E.push(() => {@@ -2573,12 +2602,12 @@ function Cn(e, r) {function O() {let e = c();v.textContent = e.length === o.length ? "清空选择" : "全选本页", x.innerHTML = t(`已选 ${e.length} 项`), y.disabled = !e.length || e.some((e) => !f(e)), b.disabled = !e.length;- let n = Sn(u()), i = e.length && !n.length ? "所选项目无共同来源" : "统一选择来源", s = JSON.stringify([i, n]);+ let n = Dn(u()), i = e.length && !n.length ? "所选项目无共同来源" : "统一选择来源", s = JSON.stringify([i, n]);if (s !== D) {D = s, S.innerHTML = l([["", i], ...n.map((e) => [e, e])], "", { label: "统一选择来源" });let e = p(S.firstElementChild);e.disabled = !n.length, e.addEventListener("change", () => {- if (!(a.busy || !Sn(u()).includes(e.value))) {+ if (!(a.busy || !Dn(u()).includes(e.value))) {for (let t of c()) {let n = r.rows.find((e) => e.item_key === t.dataset.reviewKey).candidates.find((t) => t.source === e.value);t.querySelectorAll("input[type=\"radio\"]").forEach((e) => {@@ -2611,7 +2640,7 @@ function Cn(e, r) {e instanceof KeyboardEvent && e.key === "Tab" || (e.preventDefault(), e.stopImmediatePropagation());};e.addEventListener("click", l, !0), e.addEventListener("keydown", l, !0);- let u = 0, f = await xn(i, async (e) => {+ let u = 0, f = await En(i, async (e) => {try {return await r.submit(e);} finally {@@ -2632,10 +2661,10 @@ function Cn(e, r) {}//#endregion//#region src/native-image.ts-function wn(e, t, n, r) {+function kn(e, t, n, r) {return e > 0 && t > 0 && e === n && t === r;}-function Tn(e, t, n, r, i = 1) {+function An(e, t, n, r, i = 1) {let a = Number.isFinite(i) && i > 0 ? i : 1;e /= a, t /= a;let o = [@@ -2652,7 +2681,7 @@ function Tn(e, t, n, r, i = 1) {}//#endregion//#region src/entity-skeleton.ts-function En(e, t) {+function jn(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>@@ -2664,7 +2693,7 @@ function En(e, t) {}//#endregion//#region src/catalog-onboarding.ts-var Dn = [+var Mn = ["loc","creator","performer",@@ -2681,16 +2710,16 @@ var Dn = ["jav","thumb"];-function On() {+function Nn() {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 kn(e, t) {+async function Pn(e, t) {let n = new URLSearchParams();- for (let t of Dn) e[t] && n.set(t, e[t]);+ for (let t of Mn) 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 || [],@@ -2701,7 +2730,7 @@ async function kn(e, t) {return r.set("q", e), r.set("limit", "1"), (await t("/api/items?" + r)).total > 0 ? e : "";}))).filter(Boolean);}-function An({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: r = !1, online: a = !1 } = {}) {+function Fn({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: r = !1, online: a = !1 } = {}) {let o = r ? "<a class=\"geist-button primary\" href=\"/configuration\">添加内容</a>" : "", s = "<a class=\"geist-button\" href=\"/follow-manage\">添加来源</a>";return t || n ? i("search", n ? "还没有符合条件的 JAV 作品" : "没有符合条件的内容", n ? "已扫描但尚未补充发行资料的视频可在全部内容中查看。" : "清除筛选或搜索条件后查看全部内容。", { actions: "<a class=\"geist-button primary\" href=\"/?loc=&thumb=0\">查看全部内容</a>" }) : e === "catalog" ? i("play", "还没有视频", "添加媒体文件夹或关注来源,开始建立你的馆藏。", { actions: o + s }) : i(e === "tags" ? "tags" : "user-round", "还没有" + ({tags: "标签",@@ -2714,7 +2743,7 @@ function An({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable:}//#endregion//#region src/sidebar.ts-function jn(e) {+function In(e) {return ["/","/unseen",@@ -2724,23 +2753,23 @@ function jn(e) {"/junk-files"].includes(e) || /^\/(item|mix|parts|editions)\//.test(e) || /^\/playlists\/\d+\/\d+$/.test(e) || /^\/(performers|studios|creators|series|agencies)\/.+/.test(e);}-function Mn(e, t) {+function Ln(e, t) {return e.dataset.surface === t && e.querySelector(".dnav") ? !1 : (e.dataset.surface = t, e.replaceChildren(), !0);}-function Nn(e) {+function Rn(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 Pn(e) {+function zn(e) {return e.filter((e) => ["115", "pikpak"].includes(e.location) && (e.roots === void 0 || e.roots.length > 0)).map((e) => e.location);}-function Fn(e, t) {+function Bn(e, t) {return t.filter((t) => e.some((e) => e.location === t));}-function In() {+function Vn() {return `<div class="cleanuppage" data-skeleton="cleanup" aria-busy="true" aria-label="正在读取数据管理状态"><div class="cleanupgrid">${[[@@ -2786,7 +2815,7 @@ function In() {<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 Ln(e, t = !1, n = !1) {+function Hn(e, t = !1, n = !1) {if (t || n) return "";let r = "<svg aria-hidden=\"true\"><use href=\"#i-external-link\"></use></svg>";return `<details class="taste-history-guide"${e ? " open" : ""}>@@ -2800,70 +2829,70 @@ function Ln(e, t = !1, n = !1) {<button type="button" class="geist-button taste-guide-skip">跳过</button></div></details>`;}-var Rn = "peach-taste-guide-dismissed";-function zn(e, t) {+var Un = "peach-taste-guide-dismissed";+function Wn(e, t) {f(e, ".taste-history-guide", "taste-guide-collapse");let n = e.querySelector(".taste-history-guide");n?.querySelector(".taste-guide-skip")?.addEventListener("click", () => {- t.setItem(Rn, "1"), n.remove();+ t.setItem(Un, "1"), n.remove();});}//#endregion//#region src/jav-artwork.ts-function Bn(e) {+function Gn(e) {return ["small","sleeve","preview"].includes(String(e)) ? "small" : "big";}-function Vn(e) {+function Kn(e) {return {- javLayout: Bn(e.javLayout),- javImage: Hn(e.javLayout === "preview" ? "thumbnail" : e.javImage)+ javLayout: Gn(e.javLayout),+ javImage: qn(e.javLayout === "preview" ? "thumbnail" : e.javImage)};}-function Hn(e) {+function qn(e) {return e === "thumbnail" ? "thumbnail" : "cover";}-function Un(e, t) {- return e.is_jav && e.code && e.has_cover && (Hn(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";+function Jn(e, t) {+ return e.is_jav && e.code && e.has_cover && (qn(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";}-function Wn(e, t) {+function Yn(e, t) {e.querySelectorAll("img[data-jav-image]").forEach((e) => {- let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (Hn(t) === "cover" || !r)), a = i ? n : r;+ let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (qn(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 Gn = {+var Xn = {"library-processing": {- load: pn,- component: mn+ load: mn,+ component: hn},scraping: {- load: ln,- component: fn+ load: un,+ component: pn},"quality-goals": {- load: rn,- component: on+ load: an,+ component: sn},configuration: {- load: dt,- component: _t+ load: mt,+ component: bt}-}, Kn = () => Object.keys(Gn), qn = /* @__PURE__ */ new Map();-async function Jn(e, t, n, r = {}) {- let i = Gn[e];+}, Zn = () => Object.keys(Xn), Qn = /* @__PURE__ */ new Map();+async function $n(e, t, n, r = {}) {+ let i = Xn[e];if (!i) throw Error(`未注册的 island:${String(e)}`);- Yn(t);+ er(t);let a = {controller: new AbortController(),painted: !1};- qn.set(t, a);+ Qn.set(t, a);let o;try {o = {@@ -2874,12 +2903,12 @@ async function Jn(e, t, n, r = {}) {if (a.controller.signal.aborted) return;o = {data: null,- error: I(e)+ error: P(e)};}- if (qn.get(t) !== a) return;+ if (Qn.get(t) !== a) return;if (r.isCurrent && !r.isCurrent()) {- qn.delete(t);+ Qn.delete(t);return;}t.textContent = "", a.painted = !0;@@ -2887,11 +2916,11 @@ async function Jn(e, t, n, r = {}) {...n,...o};- De(ae(i.component, s), t);+ Ae(ce(i.component, s), t);}-function Yn(e) {- let t = qn.get(e);- t && (t.controller.abort(), qn.delete(e), t.painted && De(null, e));+function er(e) {+ let t = Qn.get(e);+ t && (t.controller.abort(), Qn.delete(e), t.painted && Ae(null, e));}//#endregion-export { Rn as TASTE_GUIDE_KEY, An as catalogEmptyHtml, kn as catalogSuggestions, In as cleanupSkeletonHtml, Pn as cloudLocations, Fn as cloudPreferenceLocations, vn as createReviewSelection, On as emptyCatalogLayout, En as entitySkeletonHtml, cn as followJobProgress, Kn as islandNames, Un as javImageKind, wn as matchesFaceSource, Jn as mountIsland, Tn as nativeImageFit, Hn as normalizeJavImage, Bn as normalizeJavLayout, Vn as normalizeJavPreferences, Oe as preferredDirection, _n as refreshStore, jn as sidebarHasCatalogContent, Nn as sidebarTagCounts, gn as storeNames, Wn as syncJavImages, Mn as syncSidebarSurface, Ln as tasteHistoryGuideHtml, Yn as unmountIsland, sn as watchJob, Cn as wireReviewSelection, zn as wireTasteHistoryGuide };+export { Un as TASTE_GUIDE_KEY, Fn as catalogEmptyHtml, Pn as catalogSuggestions, Vn as cleanupSkeletonHtml, zn as cloudLocations, Bn as cloudPreferenceLocations, Cn as createReviewSelection, Nn as emptyCatalogLayout, jn as entitySkeletonHtml, ln as followJobProgress, xn as identityEvidenceHtml, Zn as islandNames, Jn as javImageKind, kn as matchesFaceSource, $n as mountIsland, An as nativeImageFit, qn as normalizeJavImage, Gn as normalizeJavLayout, Kn as normalizeJavPreferences, je as preferredDirection, vn as refreshStore, bn as reviewImageHtml, In as sidebarHasCatalogContent, Rn as sidebarTagCounts, _n as storeNames, Yn as syncJavImages, Ln as syncSidebarSurface, Hn as tasteHistoryGuideHtml, er as unmountIsland, cn as watchJob, Sn as wireReviewPictures, On as wireReviewSelection, Wn as wireTasteHistoryGuide };