Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

Merge branch 'master' into agent/claude/vercel-button-fills

longmeidaoc5dfbe4c210c
diff --cc frontend/src/legacy/core.d.ts
index 568048998,2dacf09ca..e9bd3f630
--- a/frontend/src/legacy/core.d.ts
+++ b/frontend/src/legacy/core.d.ts
@@@ -14,5 -14,4 +14,7 @@@ export declare function fmtDur(seconds
/** 字节格式化成 TB/GB/MB。 */
export declare function fmtSize(bytes: number | null | undefined): string;
+/** 站点图标地址:优先 `SITE_FAVICONS` 里登记的路径,否则同源的 `/favicon.ico`;解析失败给空串。 */
+export declare function faviconUrl(url: string): string;
++
+ export declare function esc(value: string): string;
diff --cc frontend/test/stubs/legacy-core.ts
index 270689999,362f99ec8..4288b0c38
--- a/frontend/test/stubs/legacy-core.ts
+++ b/frontend/test/stubs/legacy-core.ts
@@@ -28,8 -28,4 +28,10 @@@ export const fmtSize = (bytes: number
return `${Math.floor(value / 1048576)} MB`;
};
+/* 只复制行为,不复制 `SITE_FAVICONS` 那张表:island 用到的站点都不在表里,
+ 抄一份过来只会在遗留层加条目时变成两份各自漂移的清单。 */
+export const faviconUrl = (url: string): string => {
+ try { return new URL('/favicon.ico', url).href; } catch { return ''; }
+};
++
+ export const esc = (value: string): string => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;");
diff --cc tests/test_web_ui.py
index f89b2991c,076dda247..9d627ef4e
--- a/tests/test_web_ui.py
+++ b/tests/test_web_ui.py
@@@ -1581,46 -1571,6 +1581,47 @@@ class WebUiSourceTests(unittest.TestCas
self.assertPageLacks('entitylinkarrow', "外链箭头应当已删除")
self.assertPageLacks('↗', "外链箭头字符应当已删除")
+ def test_review_cards_put_the_evidence_at_the_bottom_of_one_stage(self):
+ """复核卡中段是一个框:预览铺满它,判断依据贴在框底。
+
+ 依据掉在框外时,一张卡上会出现两块留白——框里空半屏、框外一行字,读起来
+ 像两件不相干的事。没抽帧、取不到图的那两种同样在这个框里铺满,卡高因此不随
- 「有没有预览」上下跳。候选表单那一类不进框:它每一项自己就是一个框。
++ 「有没有预览」上下跳。候选表单和身份证据那两类不进框:它们每一项自己就是一个框。
+ """
++ self.assertPageContains("const framed=!metadata&&reviewCategory!=='western_identity';")
+ self.assertPageContains('const stage=`<div class="reviewstage"'
- "${metadata?'':' data-framed=\"\"'}>${preview}${")
++ "${framed?' data-framed=\"\"':''}>${preview}${")
+ self.assertPageContains("evidence?`<p class=\"reviewevidence\">${esc(evidence)}</p>`:''}</div>`;")
+ self.assertPageContains('${tags?`<div class="reviewtags">${tags}</div>`:\'\'}${stage}`;')
+ # 高度从卡身一路传到框:滚动壳不给 height,中间就断在内容高度上,框只到
+ # 内容为止,卡的下半截空着。框只长不缩,内容超出时由滚动壳接手。
+ self.assertPageContains(".reviewcontent .geist-scroller{height:100%}")
+ self.assertPageContains(".reviewcontent .geist-scroller-container{display:flex;"
+ "flex-direction:column}")
+ self.assertPageContains(".reviewstage{flex:1 0 auto;display:flex;"
+ "flex-direction:column;margin:10px 0 0}")
+ self.assertPageContains(".reviewstage>:first-child{flex:1 1 auto;min-height:0}")
+ self.assertPageContains(".reviewevidence{flex:none;margin:8px 0 0;padding-top:8px;")
+ # 空状态自己不再填色,填色是外面那个框的事,否则框里还有一个框。
+ empty = self.css.split(".emptystate.reviewempty{", 1)[1].split("}", 1)[0]
+ self.assertNotIn("background:", empty)
+ self.assertPageLacks(".reviewcontent .geist-scroller-container:has(>.reviewempty)")
+
+ def test_links_that_leave_peach_carry_the_external_mark(self):
+ """走出 Peach 的链接带一枚外链标,站内跳转不带。
+
+ 2026-09-06 实测 vercel.com 团队页:站内链接(PR 号、部署 ID、项目名)一律裸
+ 文字,只有离站的部署域名挂一枚 14×14 的 external-link。标记的是「这一跳会
+ 离开当前应用」,不是「这是个链接」——每个链接都挂就等于谁都没标。
+ """
+ island = (Path(__file__).resolve().parents[1]
+ / 'frontend/src/islands/release-updates.tsx').read_text(encoding='utf-8')
+ self.assertIn('查看发布页<svg aria-hidden="true" viewBox="0 0 24 24">'
+ '<use href="#i-external-link" /></svg>', island)
+ self.assertPageContains('.geist-button svg{width:14px;height:14px;flex:none;'
+ 'stroke:currentColor;fill:none;stroke-width:2}')
+ self.assertPageContains('<symbol id="i-external-link"')
+
def test_the_x_mark_is_a_full_disc_that_takes_the_current_ink(self):
"""圆盘吃 currentColor,字形从圆里挖掉,两个主题下分量一样重。
@@@ -4192,9 -4138,16 +4195,16 @@@
def test_review_asset_picker_wraps_instead_of_scrolling_sideways(self):
"""一个创作者可能有几十条候选,横向滚动条要一直拉才能看完。"""
self.assertPageContains(".reviewasset-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr))")
- self.assertPageContains(".reviewasset.picked{opacity:1;outline:2px solid var(--ink)")
+ self.assertPageContains(".reviewasset.picked{opacity:1;outline:2px solid var(--on-media)")
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 --cc web/app.js
index 09289a9c2,b5975cc06..726e2f314
--- a/web/app.js
+++ b/web/app.js
@@@ -3800,34 -3782,22 +3800,35 @@@ async function openReview(push=true)
? (assets.length?`<div class="reviewpick"><div class="reviewpickhead"><span class="mono" data-picked-count></span>
<button type="button" data-pick-all>全选</button><button type="button" data-pick-none>清空</button></div>
<div class="reviewasset-grid">${assets.map(asset=>`<button type="button" class="reviewasset picked" data-review-asset="${asset.id}" aria-pressed="true" title="${esc(asset.name)}"><img src="/poster?id=${asset.id}&c=4" alt="" loading="lazy"><span class="pickmark">${icon('check')}</span></button>`).join('')}</div></div>`
- // 空白一片会被当成界面坏了。真实原因是这些作品还没抽帧,说清楚比留白好。
- : `<p class="empty">这 ${esc(row.video_count||'')} 条作品尚未抽帧,暂无预览;批准后仍会按候选写入标签</p>`)
+ /* 空白一片会被当成界面坏了。真实原因是这些作品还没抽帧,说清楚比留白好;
+ 空状态铺满卡片中段,卡高不随「有没有预览」上下跳。 */
+ : emptyStateHtml('pics','这批作品尚未抽帧',
+ `${row.video_count||''} 条作品还没有可用预览;批准后仍会按候选写入标签。`,
+ {className:'reviewempty'}))
: reviewCategory==='fc2_similarity'?''
- : (row.preview_url?`<div class="reviewimage"><img src="${esc(row.preview_url)}" alt="" loading="lazy" data-drop="closest:.reviewimage"></div>`
- :emptyStateHtml('eye-off','未取得图片预览','这条候选没有可展示的图片,判断请依据下面的证据。',{className:'reviewempty'}));
+ : reviewCategory==='western_identity'?identityEvidenceHtml(row):reviewImageHtml(row.preview_url);
+ /* 预览和判断依据是同一件事的两半:看这几帧,然后读这一句。它们合成卡片中段
+ 那一个框,框铺满剩下的高度,依据贴在框底。依据掉在框外时一张卡上就有两块
+ 留白——框里空半屏、框外一行字,读起来像两件不相干的事。
- 候选表单那一类不进框:它自己每一项就是一个框,再套一层就是框中框。 */
- const stage=`<div class="reviewstage"${metadata?'':' data-framed=""'}>${preview}${
++ 候选表单和身份证据那两类不进框:它们每一项自己就是一个框,再套一层就是框中框。 */
++ const framed=!metadata&&reviewCategory!=='western_identity';
++ const stage=`<div class="reviewstage"${framed?' data-framed=""':''}>${preview}${
+ evidence?`<p class="reviewevidence">${esc(evidence)}</p>`:''}</div>`;
const body=`${
// 实体类卡片的名字已经写在创作者入口里,再画一个 h4 就是同一行字上下两遍。
subjectKind&&subjectName?'':`<h4>${esc(titleText)}</h4>`}${
// 账本规范名当标题,抓取来源给的写法(多为罗马音)留作副标题。
row.source_name?`<p class="reviewalias">来源写法:${esc(row.source_name)}</p>`:''}${
// 实体类卡片的作品数已经写在创作者入口里,这里再写一遍就是同一个数字两处。
- subjectKind&&subjectName?'':`<p>${esc(row.board||row.assets?`样本/资产:${row.video_count||row.assets||''}`:'')}</p>`}${origin}${tags?`<div class="reviewtags">${tags}</div>`:''}${preview}<p>${esc(evidence)}</p>`;
- 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>`;
+ subjectKind&&subjectName?'':`<p>${esc(row.board||row.assets?`样本/资产:${row.video_count||row.assets||''}`:'')}</p>`}${origin}${tags?`<div class="reviewtags">${tags}</div>`:''}${stage}`;
+ /* 主体动作在最右:一行里从左到右是「拒绝、跳过、通过」,读到最后一枚才是这张卡
+ 真正要人做的判断。Geist 的弹层与 Fieldset 操作条都是这个方向——取消在左,
+ 主动作靠 margin-left:auto 推到最右(vercel-geist-fieldset-scroller-empty-state.md)。 */
+ const actions=`<button class="geist-button error" data-review-status="rejected"${locked?' disabled':''}>拒绝</button><button class="geist-button warning" data-review-status="skipped"${locked?' disabled':''}>跳过</button><button class="geist-button primary" data-review-status="approved"${canApprove&&!locked?'':' disabled'}>${approveLabel}</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 --cc web/css/04-manage.css
index d73eeb60e,ab760b73b..7a20053f6
--- a/web/css/04-manage.css
+++ b/web/css/04-manage.css
@@@ -22,30 -23,10 +23,31 @@@
.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}
+/* 卡片中段是一个框:预览铺满它,判断依据贴在框底。没抽帧、没取到图的那两种卡
+ 在框里放空状态,同样铺满——一行小字挂在半屏留白上方,读起来像界面坏了,而这
+ 两种情况都是有原因、说得清的。 */
+.reviewcontent .geist-scroller{height:100%}
+.reviewcontent .geist-scroller-container{display:flex;flex-direction:column}
+/* 只长不缩:内容短时框吃掉剩下的高度,内容长时框保持原尺寸、由外面那层滚动。 */
+.reviewstage{flex:1 0 auto;display:flex;flex-direction:column;margin:10px 0 0}
+.reviewstage[data-framed]{padding:8px;border:1px solid var(--border-10);
+ border-radius:var(--surface-radius);background:var(--overlay-5)}
+.reviewstage>:first-child{flex:1 1 auto;min-height:0}
+.reviewstage .reviewimage{width:100%;height:auto;min-height:120px;margin:0}
+.reviewevidence{flex:none;margin:8px 0 0;padding-top:8px;border-top:1px solid var(--line-soft);
+ color:var(--muted);font-size:var(--fs-xs);line-height:1.55}
+.reviewstage:not([data-framed])>.reviewevidence{margin-top:12px;padding-top:0;border-top:0}
+/* 两个类一起写:.emptystate 的 320px 下限排在这条之后,单类选择器压不过它,
+ 空状态会撑到 320px 把卡里其余内容顶出可视区。填色由外面那个框给。 */
+.emptystate.reviewempty{min-height:120px;margin:0;padding:16px 14px;border:0}
+.emptystate.reviewempty .es-icon{width:40px;height:40px;margin-bottom:2px}
+.emptystate.reviewempty .es-icon svg{width:22px;height:22px}
+.emptystate.reviewempty h3{font-size:var(--fs-sm)}
+.emptystate.reviewempty p{max-width:30ch;font-size:var(--fs-xs)}
.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 里,
提交路径读的就是它;只是没什么可选的时候不该让人以为还有别的选项。 */
@@@ -59,9 -40,10 +61,10 @@@
.metadatacandidates{display:grid;gap:7px;margin:10px 0}.metadatacandidate{display:flex;align-items:flex-start;gap:9px;padding:9px 10px;border:1px solid var(--border-10);border-radius:var(--surface-radius);background:var(--overlay-5);cursor:pointer}.metadatacandidate:has(input:checked){border-color:var(--ink-2);background:var(--hover)}.metadatacandidate input{margin-top:3px;accent-color:var(--ink)}.metadatacandidate>span{display:grid;gap:3px;min-width:0}.metadatacandidate b{font-size:var(--fs-xs);color:var(--ink)}.metadatacandidate span span{font-size:var(--fs-sm);line-height:1.45;overflow-wrap:anywhere}.metadatacandidate i{font-size:var(--fs-xs);line-height:1.4;color:var(--meter);font-style:normal}
.metadataevidence{display:grid;gap:4px;margin:6px 0 0;padding:7px 0 0;border-top:1px solid var(--border-10);font-size:var(--fs-xs)}.metadataevidence>div{display:grid;grid-template-columns:68px minmax(0,1fr);gap:3px 8px;min-width:0}.metadataevidence dt{color:var(--muted)}.metadataevidence dd{min-width:0;margin:0;color:var(--ink-2);overflow-wrap:anywhere}.metadataevidence small{grid-column:2;color:var(--meter);line-height:1.4}
/* 资产选择用换行网格而不是横向滚动条:一个创作者可能有几十条候选,横拉看不完 */
-.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}
+.reviewpick{display:flex;flex-direction:column;min-width:0}.reviewpick>.reviewasset-grid{align-content:start}.reviewpickhead{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-size:var(--fs-xs);color:var(--muted)}.reviewpickhead button{border:0;border-radius:var(--control-radius);background:var(--ground);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(--on-media);color:var(--on-media-ink);box-shadow:0 2px 8px #0008}.reviewasset .pickmark svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:3}.reviewasset.picked{opacity:1;outline:2px solid var(--on-media);outline-offset:-2px}.reviewasset.picked .pickmark{display:grid}.reviewactions{display:flex;gap:7px;margin-top:12px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
/* 判定失败必须说出来:原来失败是静默的,按钮还卡在 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 --cc web/dist/peach-ui.js
index d8572d6e7,72577fe50..4ff23f3a4
--- a/web/dist/peach-ui.js
+++ b/web/dist/peach-ui.js
@@@ -1,21 -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, faviconUrl as h, fmtDur as g, fmtSize as _, icon as v } from "/js/core.js";
-import { LOC as m, esc as h, fmtDur as g, fmtSize as _, icon as v } from "/js/core.js";
++import { LOC as m, esc as h, faviconUrl as g, fmtDur as _, fmtSize as v, icon as y } from "/js/core.js";
//#region node_modules/preact/dist/preact.module.js
- 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) {
-var y, b, x, S, C, w, T, E, D, O, k, ee, A, j, M, N = {}, te = [], ne = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, re = Array.isArray;
++var b, x, S, C, w, T, E, D, O, k, A, j, M, N, ee, te = {}, ne = [], re = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ie = Array.isArray;
+ function P(e, t) {
for (var n in t) e[n] = t[n];
return e;
}
- function se(e) {
-function ie(e) {
++function ae(e) {
e && e.parentNode && e.parentNode.removeChild(e);
}
- function ce(e, t, n) {
-function ae(e, t, n) {
++function oe(e, t, n) {
var r, i, a, o = {};
for (a in t) a == "key" ? r = t[a] : a == "ref" ? i = t[a] : o[a] = t[a];
-- if (arguments.length > 2 && (o.children = arguments.length > 3 ? y.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (a in e.defaultProps) o[a] === void 0 && (o[a] = e.defaultProps[a]);
- return le(e, o, r, i, null);
- return oe(e, o, r, i, null);
++ if (arguments.length > 2 && (o.children = arguments.length > 3 ? b.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (a in e.defaultProps) o[a] === void 0 && (o[a] = e.defaultProps[a]);
++ return se(e, o, r, i, null);
}
- function le(e, t, n, r, i) {
-function oe(e, t, n, r, i) {
++function se(e, t, n, r, i) {
var a = {
type: e,
props: t,
@@@ -27,68 -27,68 +27,68 @@@
__e: null,
__c: null,
constructor: void 0,
-- __v: i ?? ++x,
++ __v: i ?? ++S,
__i: -1,
__u: 0
};
-- return i == null && b.vnode != null && b.vnode(a), a;
++ return i == null && x.vnode != null && x.vnode(a), a;
}
- function M(e) {
+ function F(e) {
return e.children;
}
- function ue(e, t) {
-function se(e, t) {
++function ce(e, t) {
this.props = e, this.context = t;
}
- function N(e, t) {
- if (t == null) return e.__ ? N(e.__, e.__i + 1) : null;
+ function I(e, t) {
+ if (t == null) return e.__ ? I(e.__, e.__i + 1) : null;
for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
- return typeof e.type == "function" ? N(e) : null;
+ return typeof e.type == "function" ? I(e) : null;
}
- function de(e) {
-function ce(e) {
++function le(e) {
if (e.__P && e.__d) {
- 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);
+ var t = e.__v, n = t.__e, r = [], i = [], a = P({}, t);
- a.__v = t.__v + 1, b.vnode && b.vnode(a), ye(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? I(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, xe(r, a, i), t.__e = t.__ = null, a.__e != n && le(a);
++ a.__v = t.__v + 1, x.vnode && x.vnode(a), be(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? I(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, Se(r, a, i), t.__e = t.__ = null, a.__e != n && ue(a);
}
}
- function fe(e) {
-function le(e) {
++function ue(e) {
if ((e = e.__) != null && e.__c != null) return e.__e = e.__c.base = null, e.__k.some(function(t) {
if (t != null && t.__e != null) return e.__e = e.__c.base = t.__e;
- }), fe(e);
- }), le(e);
++ }), ue(e);
}
- function pe(e) {
- (!e.__d && (e.__d = !0) && C.push(e) && !me.__r++ || w != b.debounceRendering) && ((w = b.debounceRendering) || T)(me);
-function ue(e) {
- (!e.__d && (e.__d = !0) && C.push(e) && !de.__r++ || w != b.debounceRendering) && ((w = b.debounceRendering) || T)(de);
++function de(e) {
++ (!e.__d && (e.__d = !0) && w.push(e) && !fe.__r++ || T != x.debounceRendering) && ((T = x.debounceRendering) || E)(fe);
}
- function me() {
-function de() {
++function fe() {
try {
- for (var e, t = 1; C.length;) C.length > t && C.sort(E), e = C.shift(), t = C.length, de(e);
- for (var e, t = 1; C.length;) C.length > t && C.sort(E), e = C.shift(), t = C.length, ce(e);
++ for (var e, t = 1; w.length;) w.length > t && w.sort(D), e = w.shift(), t = w.length, le(e);
} finally {
- C.length = me.__r = 0;
- C.length = de.__r = 0;
++ w.length = fe.__r = 0;
}
}
- 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);
-function fe(e, t, n, r, i, a, o, s, c, l, u) {
- var d, f, p, m, h, g, _ = r && r.__k || te, v = t.length;
- for (c = pe(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || N, p.__i = d, g = ye(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && we(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = me(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), p.__u &= -7);
++function pe(e, t, n, r, i, a, o, s, c, l, u) {
++ var d, f, p, m, h, g, _ = r && r.__k || ne, v = t.length;
++ for (c = me(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || te, p.__i = d, g = be(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && Te(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = he(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), p.__u &= -7);
return n.__e = h, c;
}
- function ge(e, t, n, r, i) {
-function pe(e, t, n, r, i) {
++function me(e, t, n, r, i) {
var a, o, s, c, l, u = n.length, d = u, f = 0;
- for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = 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));
- 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(F, { 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 = I(s)), Te(s, s));
++ for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = se(null, o, null, null, null) : ie(o) ? o = e.__k[a] = se(F, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = se(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = ge(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
++ if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = I(s)), Ee(s, s));
return r;
}
- function _e(e, t, n) {
-function me(e, t, n) {
++function he(e, t, n) {
var r, i;
if (typeof e.type == "function") {
- for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = _e(r[i], t, n));
- for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = me(r[i], t, n));
++ for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = he(r[i], t, n));
return t;
}
- e.__e != t && (t && e.type && !t.parentNode && (t = N(e)), t = n.insertBefore(e.__e, t || null));
+ e.__e != t && (t && e.type && !t.parentNode && (t = I(e)), t = n.insertBefore(e.__e, t || null));
do
t &&= t.nextSibling;
while (t != null && t.nodeType == 8);
return t;
}
- function ve(e, t, n, r) {
-function he(e, t, n, r) {
++function ge(e, t, n, r) {
var i, a, o, s = e.key, c = e.type, l = t[n], u = l != null && !(2 & l.__u);
if (l === null && s == null || u && s == l.key && c == l.type) return n;
if (r > +!!u) {
@@@ -96,18 -96,18 +96,18 @@@
}
return -1;
}
- function ye(e, t, n) {
- t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || ae.test(t) ? n : n + "px";
-function ge(e, t, n) {
- t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || ne.test(t) ? n : n + "px";
++function _e(e, t, n) {
++ t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || re.test(t) ? n : n + "px";
}
- function be(e, t, n, r, i) {
-function _e(e, t, n, r, i) {
++function ve(e, t, n, r, i) {
var a, o;
n: if (t == "style") {
if (typeof n == "string") e.style.cssText = n;
else {
- if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || ye(e.style, t, "");
- if (n) for (t in n) r && n[t] == r[t] || ye(e.style, t, n[t]);
- if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || ge(e.style, t, "");
- if (n) for (t in n) r && n[t] == r[t] || ge(e.style, t, n[t]);
++ if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || _e(e.style, t, "");
++ if (n) for (t in n) r && n[t] == r[t] || _e(e.style, t, n[t]);
}
- } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(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 (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] = A, e.addEventListener(t, a ? M : j, a)) : e.removeEventListener(t, a ? M : j, a);
++ } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(j, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[A] = r[A] : (n[A] = M, e.addEventListener(t, a ? ee : N, a)) : e.removeEventListener(t, a ? ee : N, a);
else {
if (i == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
@@@ -117,72 -117,72 +117,72 @@@
typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
}
}
- function xe(e) {
-function ve(e) {
++function ye(e) {
return function(t) {
if (this.l) {
var n = this.l[t.type + e];
- if (t[O] == null) t[O] = te++;
- if (t[O] == null) t[O] = A++;
-- else if (t[O] < n[k]) return;
-- return n(b.event ? b.event(t) : t);
++ if (t[k] == null) t[k] = M++;
++ else if (t[k] < n[A]) return;
++ return n(x.event ? x.event(t) : t);
}
};
}
- function Se(e, t, n, r, i, a, o, s, c, l) {
-function ye(e, t, n, r, i, a, o, s, c, l) {
-- var u, d, f, p, m, h, g, _, v, y, x, S, C, w, T, E, D = t.type;
++function be(e, t, n, r, i, a, o, s, c, l) {
++ var u, d, f, p, m, h, g, _, v, y, b, 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 = b.__b) && u(t);
++ 128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = x.__b) && u(t);
n: if (typeof D == "function") {
d = o.length;
try {
- if (v = t.props, y = D.prototype && D.prototype.render, x = (u = D.contextType) && r[u.__c], S = u ? x ? x.props.value : u.__ : r, n.__c ? _ = (f = t.__c = n.__c).__ = f.__E : (y ? t.__c = f = new D(v, S) : (t.__c = f = new 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);
- 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 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 = []), y && f.__s == null && (f.__s = f.state), y && D.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = P({}, f.__s)), P(f.__s, D.getDerivedStateFromProps(v, f.__s))), m = f.props, h = f.state, f.__v = t, p) y && D.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), y && f.componentDidMount != null && f.__h.push(f.componentDidMount);
++ if (v = t.props, y = D.prototype && D.prototype.render, b = (u = D.contextType) && r[u.__c], S = u ? b ? b.props.value : u.__ : r, n.__c ? _ = (f = t.__c = n.__c).__ = f.__E : (y ? t.__c = f = new D(v, S) : (t.__c = f = new ce(v, S), f.constructor = D, f.render = De), b && b.sub(f), f.state || (f.state = {}), f.__n = r, p = f.__d = !0, f.__h = [], f._sb = []), y && f.__s == null && (f.__s = f.state), y && D.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = P({}, f.__s)), P(f.__s, D.getDerivedStateFromProps(v, f.__s))), m = f.props, h = f.state, f.__v = t, p) y && D.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), y && f.componentDidMount != null && f.__h.push(f.componentDidMount);
else {
if (y && D.getDerivedStateFromProps == null && v !== m && f.componentWillReceiveProps != null && f.componentWillReceiveProps(v, S), t.__v == n.__v || !f.__e && f.shouldComponentUpdate != null && !1 === f.shouldComponentUpdate(v, f.__s, S)) {
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);
- }), ie.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = N(n);
- }), te.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = I(n);
++ }), ne.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = I(n);
break n;
}
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 = 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 = [];
- 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), te.push.apply(f.__h, f._sb), f._sb = [];
++ if (f.context = S, f.props = v, f.__P = e, f.__e = !1, C = x.__r, w = 0, y) f.state = f.__s, f.__d = !1, C && C(t), u = f.render(f.props, f.state, f.context), ne.push.apply(f.__h, f._sb), f._sb = [];
else do
f.__d = !1, C && C(t), u = f.render(f.props, f.state, f.context), f.state = f.__s;
while (f.__d && ++w < 25);
- f.state = f.__s, f.getChildContext != null && (r = j(j({}, r), f.getChildContext())), 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);
- f.state = f.__s, f.getChildContext != null && (r = P(P({}, r), f.getChildContext())), y && !p && f.getSnapshotBeforeUpdate != null && (g = f.getSnapshotBeforeUpdate(m, h)), T = u != null && u.type === F && 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 = P(P({}, r), f.getChildContext())), y && !p && f.getSnapshotBeforeUpdate != null && (g = f.getSnapshotBeforeUpdate(m, h)), T = u != null && u.type === F && u.key == null ? Ce(u.props.children) : u, s = pe(e, ie(T) ? T : [T], t, n, r, i, a, o, s, c, l), f.base = t.__e, t.__u &= -161, f.__h.length && o.push(f), _ && (f.__E = f.__ = null);
} catch (e) {
if (o.length = d, t.__v = null, c || a != null) {
if (e.then) {
for (t.__u |= c ? 160 : 128; s && s.nodeType == 8 && s.nextSibling;) s = s.nextSibling;
a != null && (a[a.indexOf(s)] = null), t.__e = s;
- } else if (a != null) for (E = a.length; E--;) se(a[E]);
- } else if (a != null) for (E = a.length; E--;) ie(a[E]);
++ } else if (a != null) for (E = a.length; E--;) ae(a[E]);
} else t.__e = n.__e;
- t.__k ??= n.__k || [], e.then || Ce(t), b.__e(e, t, n);
- t.__k ??= n.__k || [], e.then || be(t), b.__e(e, t, n);
++ t.__k ??= n.__k || [], e.then || xe(t), x.__e(e, t, n);
}
- } 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);
- } 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 = b.diffed) && u(t), 128 & t.__u ? void 0 : s;
++ } else a == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : s = t.__e = we(n.__e, t, n, r, i, a, o, c, l);
++ return (u = x.diffed) && u(t), 128 & t.__u ? void 0 : s;
}
- function Ce(e) {
- e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(Ce));
-function be(e) {
- e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(be));
++function xe(e) {
++ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(xe));
}
- function we(e, t, n) {
- for (var r = 0; r < n.length; r++) De(n[r], n[++r], n[++r]);
-function xe(e, t, n) {
- for (var r = 0; r < n.length; r++) we(n[r], n[++r], n[++r]);
-- b.__c && b.__c(t, e), e.some(function(t) {
++function Se(e, t, n) {
++ for (var r = 0; r < n.length; r++) Te(n[r], n[++r], n[++r]);
++ x.__c && x.__c(t, e), e.some(function(t) {
try {
e = t.__h, t.__h = [], e.some(function(e) {
e.call(t);
});
} catch (e) {
-- b.__e(e, t.__v);
++ x.__e(e, t.__v);
}
});
}
- 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 Se(e) {
- return typeof e != "object" || !e || e.__b > 0 ? e : re(e) ? e.map(Se) : e.constructor === void 0 ? P({}, e) : null;
++function Ce(e) {
++ return typeof e != "object" || !e || e.__b > 0 ? e : ie(e) ? e.map(Ce) : e.constructor === void 0 ? P({}, e) : null;
}
- 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;
-function Ce(e, t, n, r, i, a, o, s, c) {
- var l, u, d, f, p, m, h, g = n.props || N, _ = t.props, v = t.type;
++function we(e, t, n, r, i, a, o, s, c) {
++ var l, u, d, f, p, m, h, g = n.props || te, _ = t.props, v = t.type;
if (v == "svg" ? i = "http://www.w3.org/2000/svg" : v == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i ||= "http://www.w3.org/1999/xhtml", a != null) {
for (l = 0; l < a.length; l++) if ((p = a[l]) && "setAttribute" in p == !!v && (v ? p.localName == v : p.nodeType == 3)) {
e = p, a[l] = null;
@@@ -191,80 -191,80 +191,80 @@@
}
if (e == null) {
if (v == null) return document.createTextNode(_);
-- e = document.createElementNS(i, v, _.is && _), s &&= (b.__m && b.__m(t, a), !1), a = null;
++ e = document.createElementNS(i, v, _.is && _), s &&= (x.__m && x.__m(t, a), !1), a = null;
}
if (v == null) g === _ || s && e.data == _ || (e.data = _);
else {
-- if (a = v == "textarea" && _.defaultValue != null ? null : a && y.call(e.childNodes), !s && a != null) for (g = {}, l = 0; l < e.attributes.length; l++) g[(p = e.attributes[l]).name] = p.value;
- for (l in g) p = g[l], l == "dangerouslySetInnerHTML" ? d = p : l == "children" || l in _ || l == "value" && "defaultValue" in _ || l == "checked" && "defaultChecked" in _ || 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);
- 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 && b.call(e.childNodes), !s && a != null) for (g = {}, l = 0; l < e.attributes.length; l++) g[(p = e.attributes[l]).name] = p.value;
++ for (l in g) p = g[l], l == "dangerouslySetInnerHTML" ? d = p : l == "children" || l in _ || l == "value" && "defaultValue" in _ || l == "checked" && "defaultChecked" in _ || ve(e, l, null, p, i);
++ for (l in _) p = _[l], l == "children" ? f = p : l == "dangerouslySetInnerHTML" ? u = p : l == "value" ? m = p : l == "checked" ? h = p : s && typeof p != "function" || g[l] === p || ve(e, l, p, g[l], i);
if (u) s || d && (u.__html == d.__html || u.__html == e.innerHTML) || (e.innerHTML = u.__html), t.__k = [];
- else if (d && (e.innerHTML = ""), 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));
- else if (d && (e.innerHTML = ""), fe(t.type == "template" ? e.content : e, re(f) ? f : [f], t, n, r, v == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && I(n, 0), s, c), a != null) for (l = a.length; l--;) ie(a[l]);
- s && v != "textarea" || (l = "value", v == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || v == "progress" && !m || v == "option" && m != g[l]) && _e(e, l, m, g[l], i), l = "checked", h != null && h != e[l] && _e(e, l, h, g[l], i));
++ else if (d && (e.innerHTML = ""), pe(t.type == "template" ? e.content : e, ie(f) ? f : [f], t, n, r, v == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && I(n, 0), s, c), a != null) for (l = a.length; l--;) ae(a[l]);
++ s && v != "textarea" || (l = "value", v == "progress" && m == null ? e.removeAttribute("value") : m != null && (m !== e[l] || v == "progress" && !m || v == "option" && m != g[l]) && ve(e, l, m, g[l], i), l = "checked", h != null && h != e[l] && ve(e, l, h, g[l], i));
}
return e;
}
- function De(e, t, n) {
-function we(e, t, n) {
++function Te(e, t, n) {
try {
if (typeof e == "function") {
var r = typeof e.__u == "function";
r && e.__u(), r && t == null || (e.__u = e(t));
} else e.current = t;
} catch (e) {
-- b.__e(e, n);
++ x.__e(e, n);
}
}
- function Oe(e, t, n) {
-function Te(e, t, n) {
++function Ee(e, t, n) {
var r, i;
- if (b.unmount && b.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || De(r, null, t)), (r = e.__c) != null) {
- if (b.unmount && b.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || we(r, null, t)), (r = e.__c) != null) {
++ if (x.unmount && x.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || Te(r, null, t)), (r = e.__c) != null) {
if (r.componentWillUnmount) try {
r.componentWillUnmount();
} catch (e) {
-- b.__e(e, t);
++ x.__e(e, t);
}
r.base = r.__P = r.__n = null;
}
- 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;
- if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && Te(r[i], t, n || typeof e.type != "function");
- n || ie(e.__e), e.__c = e.__ = e.__e = void 0;
++ if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && Ee(r[i], t, n || typeof e.type != "function");
++ n || ae(e.__e), e.__c = e.__ = e.__e = void 0;
}
- function ke(e, t, n) {
-function Ee(e, t, n) {
++function De(e, t, n) {
return this.constructor(e, n);
}
- function Ae(e, t, n) {
-function De(e, t, n) {
++function Oe(e, t, n) {
var r, i, a, o;
- t == document && (t = document.documentElement), b.__ && b.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], 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;
- t == document && (t = document.documentElement), b.__ && b.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], ye(t, e = (!r && n || t).__k = ae(F, null, [e]), i || N, N, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? y.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), xe(a, e, o), e.props.children = null;
++ t == document && (t = document.documentElement), x.__ && x.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], be(t, e = (!r && n || t).__k = oe(F, null, [e]), i || te, te, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? b.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), Se(a, e, o), e.props.children = null;
}
- y = ie.slice, b = { __e: function(e, t, n, r) {
-y = te.slice, b = { __e: function(e, t, n, r) {
++b = ne.slice, x = { __e: function(e, t, n, r) {
for (var i, a, o; t = t.__;) if ((i = t.__c) && !i.__) try {
if ((a = i.constructor) && a.getDerivedStateFromError != null && (i.setState(a.getDerivedStateFromError(e)), o = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, r || {}), o = i.__d), o) return i.__E = i;
} catch (t) {
e = t;
}
throw e;
--} }, x = 0, S = function(e) {
++} }, S = 0, C = function(e) {
return e != null && e.constructor === void 0;
- }, 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) {
-}, se.prototype.setState = function(e, t) {
++}, ce.prototype.setState = function(e, t) {
+ var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = P({}, this.state);
- typeof e == "function" && (e = e(P({}, n), this.props)), e && P(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 = F, C = [], T = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, E = function(e, t) {
++ typeof e == "function" && (e = e(P({}, n), this.props)), e && P(n, e), e != null && this.__v && (t && this._sb.push(t), de(this));
++}, ce.prototype.forceUpdate = function(e) {
++ this.__v && (this.__e = !0, e && this.__h.push(e), de(this));
++}, ce.prototype.render = F, w = [], E = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, D = function(e, t) {
return e.__v.__b - t.__v.__b;
- }, 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);
-}, de.__r = 0, D = Math.random().toString(8), O = "__d" + D, k = "__a" + D, ee = /(PointerCapture)$|Capture$/i, A = 0, j = ve(!1), M = ve(!0);
++}, fe.__r = 0, O = Math.random().toString(8), k = "__d" + O, A = "__a" + O, j = /(PointerCapture)$|Capture$/i, M = 0, N = ye(!1), ee = ye(!0);
//#endregion
//#region src/sort-preferences.ts
- function je(e, t, n) {
-function Oe(e, t, n) {
++function ke(e, t, n) {
return e === "seed" ? "" : e === t && n === "asc" ? "asc" : "desc";
}
//#endregion
//#region src/api.ts
- var Me = class extends Error {
-var ke = class extends Error {
++var Ae = class extends Error {
status;
body;
constructor(e, t, n = null) {
super(e), this.name = "ApiError", this.status = t, this.body = n;
}
- }, Ne = (e) => {
-}, Ae = (e) => {
++}, je = (e) => {
if (!e || typeof e != "object") return "";
let t = e;
for (let e of [
@@@ -286,10 -286,10 +286,10 @@@ async function R(e, t)
try {
r = await n.json();
} catch {}
- if (!n.ok) throw new Me(Ne(r) || `请求失败(${n.status})`, n.status);
- if (!n.ok) throw new ke(Ae(r) || `请求失败(${n.status})`, n.status);
++ if (!n.ok) throw new Ae(je(r) || `请求失败(${n.status})`, n.status);
return r;
}
- async function I(e, t, n = "POST", r) {
+ async function z(e, t, n = "POST", r) {
let i = await fetch(e, {
method: n,
...r ? { signal: r } : {},
@@@ -303,29 -303,29 +303,29 @@@
try {
a = await i.json();
} catch {}
- if (!i.ok) throw new Me(Ne(a) || `请求失败(${i.status})`, i.status, a);
- if (!i.ok) throw new ke(Ae(a) || `请求失败(${i.status})`, i.status, a);
++ if (!i.ok) throw new Ae(je(a) || `请求失败(${i.status})`, i.status, a);
return a;
}
//#endregion
//#region node_modules/preact/hooks/dist/hooks.module.js
- var 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 = {
-var B, V, je, Me, Ne = 0, Pe = [], H = b, Fe = H.__b, Ie = H.__r, Le = H.diffed, Re = H.__c, ze = H.unmount, Be = H.__;
-function Ve(e, t) {
- H.__h && H.__h(V, e, Ne || t), Ne = 0;
++var B, V, Me, Ne, Pe = 0, Fe = [], H = x, Ie = H.__b, Le = H.__r, Re = H.diffed, ze = H.__c, Be = H.unmount, Ve = H.__;
++function He(e, t) {
++ H.__h && H.__h(V, e, Pe || t), Pe = 0;
+ var n = V.__H || (V.__H = {
__: [],
__h: []
});
return e >= n.__.length && n.__.push({}), n.__[e];
}
- function B(e) {
- return Ie = 1, Ge($e, e);
+ function U(e) {
- return Ne = 1, He(Xe, e);
++ return Pe = 1, Ue(Ze, 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) {
-function He(e, t, n) {
- var r = Ve(B++, 2);
- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Xe(void 0, t), function(e) {
++function Ue(e, t, n) {
++ var r = He(B++, 2);
++ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Ze(void 0, t), function(e) {
var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
- }], r.__c = R, !R.__f)) {
+ }], r.__c = V, !V.__f)) {
var i = function(e, t, n) {
if (!r.__c.__H) return !0;
var i = !1, o = r.__c.props !== e;
@@@ -353,100 -353,100 +353,100 @@@
}
return r.__N || r.__;
}
- 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(B++, 3);
- !H.__s && Ye(n.__H, t) && (n.__ = e, n.u = t, V.__H.__h.push(n));
++ var n = He(B++, 3);
++ !H.__s && Xe(n.__H, t) && (n.__ = e, n.u = t, V.__H.__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, t) {
- var n = Ve(B++, 4);
- !H.__s && Ye(n.__H, t) && (n.__ = e, n.u = t, V.__h.push(n));
++ var n = He(B++, 4);
++ !H.__s && Xe(n.__H, t) && (n.__ = e, n.u = t, V.__h.push(n));
}
- function U(e) {
- return Ie = 5, Ke(function() {
+ function K(e) {
- return Ne = 5, Ue(function() {
++ return Pe = 5, We(function() {
return { current: e };
}, []);
}
- function Ke(e, t) {
- var n = We(L++, 7);
- return Qe(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
-function Ue(e, t) {
- var n = Ve(B++, 7);
- return Ye(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
++function We(e, t) {
++ var n = He(B++, 7);
++ return Xe(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
}
- function qe() {
- for (var e; e = Le.shift();) {
-function We() {
- for (var e; e = Pe.shift();) {
++function Ge() {
++ for (var e; e = Fe.shift();) {
var t = e.__H;
if (e.__P && t) try {
- t.__h.some(Xe), t.__h.some(Ze), t.__h = [];
- t.__h.some(qe), t.__h.some(Je), t.__h = [];
++ t.__h.some(Je), t.__h.some(Ye), t.__h = [];
} catch (n) {
- t.__h = [], z.__e(n, e.__v);
+ t.__h = [], H.__e(n, e.__v);
}
}
}
- 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) {
+ H.__b = function(e) {
- V = null, Fe && Fe(e);
++ V = null, Ie && Ie(e);
+ }, H.__ = function(e, t) {
- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Be && Be(e, t);
++ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Ve && Ve(e, t);
+ }, H.__r = function(e) {
- Ie && Ie(e), B = 0;
++ Le && Le(e), B = 0;
+ var t = (V = e.__c).__H;
- t && (je === V ? (t.__h = [], V.__h = [], t.__.some(function(e) {
++ t && (Me === V ? (t.__h = [], V.__h = [], t.__.some(function(e) {
e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
- })) : (t.__h.some(Xe), t.__h.some(Ze), t.__h = [], L = 0)), Pe = R;
- }, z.diffed = function(e) {
- Be && Be(e);
- })) : (t.__h.some(qe), t.__h.some(Je), t.__h = [], B = 0)), je = V;
++ })) : (t.__h.some(Je), t.__h.some(Ye), t.__h = [], B = 0)), Me = V;
+ }, H.diffed = function(e) {
- Le && Le(e);
++ Re && Re(e);
var t = e.__c;
- t && t.__H && (t.__H.__h.length && (Le.push(t) !== 1 && Fe === z.requestAnimationFrame || ((Fe = z.requestAnimationFrame) || Ye)(qe)), t.__H.__.some(function(e) {
- t && t.__H && (t.__H.__h.length && (Pe.push(t) !== 1 && Me === H.requestAnimationFrame || ((Me = H.requestAnimationFrame) || Ke)(We)), t.__H.__.some(function(e) {
++ t && t.__H && (t.__H.__h.length && (Fe.push(t) !== 1 && Ne === H.requestAnimationFrame || ((Ne = H.requestAnimationFrame) || qe)(Ge)), t.__H.__.some(function(e) {
e.u &&= (e.__H = e.u, void 0);
- })), Pe = R = null;
- }, z.__c = function(e, t) {
- })), je = V = null;
++ })), Me = V = null;
+ }, H.__c = function(e, t) {
t.some(function(e) {
try {
- e.__h.some(Xe), e.__h = e.__h.filter(function(e) {
- return !e.__ || Ze(e);
- e.__h.some(qe), e.__h = e.__h.filter(function(e) {
- return !e.__ || Je(e);
++ e.__h.some(Je), e.__h = e.__h.filter(function(e) {
++ return !e.__ || Ye(e);
});
} catch (n) {
t.some(function(e) {
e.__h &&= [];
- }), t = [], z.__e(n, e.__v);
+ }), t = [], H.__e(n, e.__v);
}
- }), Ve && Ve(e, t);
- }, z.unmount = function(e) {
- He && He(e);
- }), Re && Re(e, t);
++ }), ze && ze(e, t);
+ }, H.unmount = function(e) {
- ze && ze(e);
++ Be && Be(e);
var t, n = e.__c;
n && n.__H && (n.__H.__.some(function(e) {
try {
- Xe(e);
- qe(e);
++ Je(e);
} catch (e) {
t = e;
}
- }), n.__H = void 0, t && z.__e(t, n.__v));
+ }), n.__H = void 0, t && H.__e(t, n.__v));
};
- var Je = typeof requestAnimationFrame == "function";
- function Ye(e) {
-var Ge = typeof requestAnimationFrame == "function";
-function Ke(e) {
++var Ke = typeof requestAnimationFrame == "function";
++function qe(e) {
var t, n = function() {
- clearTimeout(r), Je && cancelAnimationFrame(t), setTimeout(e);
- clearTimeout(r), Ge && cancelAnimationFrame(t), setTimeout(e);
++ clearTimeout(r), Ke && cancelAnimationFrame(t), setTimeout(e);
}, r = setTimeout(n, 35);
- Je && (t = requestAnimationFrame(n));
- Ge && (t = requestAnimationFrame(n));
++ Ke && (t = requestAnimationFrame(n));
}
- function Xe(e) {
- var t = R, n = e.__c;
- typeof n == "function" && (e.__c = void 0, n()), R = t;
-function qe(e) {
++function Je(e) {
+ var t = V, n = e.__c;
+ typeof n == "function" && (e.__c = void 0, n()), V = t;
}
- function Ze(e) {
- var t = R;
- e.__c = e.__(), R = t;
-function Je(e) {
++function Ye(e) {
+ var t = V;
+ e.__c = e.__(), V = t;
}
- function Qe(e, t) {
-function Ye(e, t) {
++function Xe(e, t) {
return !e || e.length !== t.length || t.some(function(t, n) {
return t !== e[n];
});
}
- function $e(e, t) {
-function Xe(e, t) {
++function Ze(e, t) {
return typeof t == "function" ? t(e) : t;
}
//#endregion
//#region node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
- var et = 0;
-var Ze = 0;
++var Qe = 0;
Array.isArray;
- function W(e, t, n, r, i, a) {
+ function q(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,22 -461,22 +461,22 @@@
__e: null,
__c: null,
constructor: void 0,
- __v: --et,
- __v: --Ze,
++ __v: --Qe,
__i: -1,
__u: 0,
__source: i,
__self: a
};
if (typeof e == "function" && (o = e.defaultProps)) for (s in o) c[s] === void 0 && (c[s] = o[s]);
-- return b.vnode && b.vnode(l), l;
++ return x.vnode && x.vnode(l), l;
}
//#endregion
//#region src/islands/access-settings.tsx
- function tt({ id: e, label: t, value: n, onInput: r, error: i, help: a, current: o = !1, disabled: s = !1 }) {
- return /* @__PURE__ */ W("div", {
-function Qe({ id: e, label: t, value: n, onInput: r, error: i, help: a, current: o = !1, disabled: s = !1 }) {
++function $e({ id: e, label: t, value: n, onInput: r, error: i, help: a, current: o = !1, disabled: s = !1 }) {
+ return /* @__PURE__ */ q("div", {
class: "configfield",
children: [
- /* @__PURE__ */ W("label", {
+ /* @__PURE__ */ q("label", {
for: e,
children: t
}),
@@@ -502,9 -502,9 +502,9 @@@
]
});
}
- 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", {
-function $e({ initial: e, receipt: t }) {
++function et({ initial: e, receipt: t }) {
+ let [n, r] = U(e), [i, o] = U(""), [c, l] = U(""), [u, f] = U(""), [p, m] = U(!1), [h, g] = U(""), [_, v] = U({}), y = K(null), b = K(!1), x = K(null);
+ return /* @__PURE__ */ q("form", {
class: "configfieldset",
"data-fieldset-type": p ? "warning" : void 0,
onSubmit: async (e) => {
@@@ -527,8 -527,8 +527,8 @@@
});
r(e), o(""), l(""), f(""), m(!1), v({}), t(e.mode === "open" ? "已关闭访问密码" : "已保存访问密码");
} catch (e) {
- let t = e instanceof Me ? e.body : null, n = t?.errors || t?.detail?.errors;
- n ? v(n) : g(P(e));
- let t = e instanceof ke ? e.body : null, n = t?.errors || t?.detail?.errors;
++ let t = e instanceof Ae ? e.body : null, n = t?.errors || t?.detail?.errors;
+ n ? v(n) : g(L(e));
} finally {
b.current = !1, d(x.current, !1);
}
@@@ -554,16 -554,16 +554,16 @@@
type: "checkbox",
checked: p,
onChange: (e) => m(e.currentTarget.checked)
- }), /* @__PURE__ */ W("span", {
+ }), /* @__PURE__ */ q("span", {
"aria-hidden": "true",
- children: /* @__PURE__ */ W("svg", {
+ children: /* @__PURE__ */ q("svg", {
viewBox: "0 0 24 24",
- children: /* @__PURE__ */ W("use", { href: "#i-check" })
+ children: /* @__PURE__ */ q("use", { href: "#i-check" })
})
})]
- }), /* @__PURE__ */ W("span", { children: "关闭访问密码,允许能连接到 Peach 的设备直接访问" })]
+ }), /* @__PURE__ */ q("span", { children: "关闭访问密码,允许能连接到 Peach 的设备直接访问" })]
}) : null,
- n.mode === "password" ? /* @__PURE__ */ W(tt, {
- n.mode === "password" ? /* @__PURE__ */ q(Qe, {
++ n.mode === "password" ? /* @__PURE__ */ q($e, {
id: "access-current",
label: "当前访问密码",
value: i,
@@@ -571,7 -571,7 +571,7 @@@
error: _.current_password,
current: !0
}) : null,
- n.mode === "locked" ? null : /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W(tt, {
- n.mode === "locked" ? null : /* @__PURE__ */ q(F, { children: [/* @__PURE__ */ q(Qe, {
++ n.mode === "locked" ? null : /* @__PURE__ */ q(F, { children: [/* @__PURE__ */ q($e, {
id: "access-password",
label: n.mode === "password" ? "新访问密码" : "设置访问密码",
value: c,
@@@ -579,7 -579,7 +579,7 @@@
disabled: p,
error: p ? void 0 : _.password,
help: p ? "关闭访问密码时无需填写。" : "至少 8 个字符。保存后其他设备需要重新登录。"
- }), /* @__PURE__ */ W(tt, {
- }), /* @__PURE__ */ q(Qe, {
++ }), /* @__PURE__ */ q($e, {
id: "access-confirm",
label: "确认访问密码",
value: u,
@@@ -610,7 -610,7 +610,7 @@@
}
//#endregion
//#region src/islands/release-updates.tsx
- var rt = /* @__PURE__ */ new Set([
-var et = /* @__PURE__ */ new Set([
++var tt = /* @__PURE__ */ new Set([
"downloading",
"verifying",
"extracting",
@@@ -618,14 -618,14 +618,14 @@@
"restarting",
"installing"
]);
- function it({ initial: e, initialJob: t }) {
- let [n, i] = B(e), [o, s] = B(t || {
-function tt({ initial: e, initialJob: t }) {
++function nt({ initial: e, initialJob: t }) {
+ let [n, i] = U(e), [o, s] = U(t || {
state: "idle",
progress: 0
- }), [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(() => () => {
+ }), [l, u] = U(""), f = K(null), p = K(!0), m = K(!1), h = K(null);
+ W(() => {
- d(h.current, et.has(o.state));
++ d(h.current, tt.has(o.state));
+ }, [o.state]), W(() => () => {
p.current = !1, f.current?.abort();
}, []);
let g = async () => {
@@@ -640,11 -640,11 +640,11 @@@
cancelLabel: "稍后",
onConfirm: g
}));
- }, [o.state]), V(() => {
- if (!rt.has(o.state)) return;
+ }, [o.state]), W(() => {
- if (!et.has(o.state)) return;
++ if (!tt.has(o.state)) return;
let e = new AbortController(), t, n = 0, r = async () => {
try {
- let t = await F("/api/configuration/update-status", e.signal);
+ let t = await R("/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,7 -661,7 +661,7 @@@
};
}, [o.state]);
let _ = async (e) => {
- if (f.current || rt.has(o.state)) return;
- if (f.current || et.has(o.state)) return;
++ if (f.current || tt.has(o.state)) return;
let t = new AbortController();
f.current = t, m.current = !1, u(""), d(e, !0);
try {
@@@ -734,13 -734,9 +734,13 @@@
href: n.release_url,
target: "_blank",
rel: "noreferrer",
- children: ["查看发布页", /* @__PURE__ */ W("svg", {
- children: "查看发布页"
++ children: ["查看发布页", /* @__PURE__ */ q("svg", {
+ "aria-hidden": "true",
+ viewBox: "0 0 24 24",
- children: /* @__PURE__ */ W("use", { href: "#i-external-link" })
++ children: /* @__PURE__ */ q("use", { href: "#i-external-link" })
+ })]
}),
- o.state === "ready" ? /* @__PURE__ */ W("button", {
+ o.state === "ready" ? /* @__PURE__ */ q("button", {
type: "button",
class: "geist-button primary",
onClick: () => {
@@@ -761,10 -757,10 +761,10 @@@
onClick: (e) => _(e.currentTarget),
children: "下载并安装"
}) : null,
- /* @__PURE__ */ W("button", {
+ /* @__PURE__ */ q("button", {
type: "button",
class: "geist-button",
- disabled: rt.has(o.state),
- disabled: et.has(o.state),
++ disabled: tt.has(o.state),
onClick: (e) => v(e.currentTarget),
children: "检查更新"
})
@@@ -774,9 -770,9 +774,9 @@@
}
//#endregion
//#region src/islands/peach-proxy.tsx
- 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(() => {
-function nt({ initial: e, receipt: t }) {
++function rt({ initial: e, receipt: t }) {
+ let [n, r] = U(e), [i, o] = U(e.mode), [s, c] = U(""), [u, f] = U(""), m = K(!1), h = K(null), g = K(null), _ = K(new AbortController());
+ W(() => () => _.current.abort(), []), G(() => {
let t = h.current;
t.innerHTML = l([
["environment", "系统代理"],
@@@ -865,30 -861,30 +865,30 @@@
}
//#endregion
//#region src/islands/desktop-settings.tsx
- function ot({ label: e, checked: t, disabled: n, change: r }) {
- return /* @__PURE__ */ W("label", {
-function rt({ label: e, checked: t, disabled: n, change: r }) {
++function it({ label: e, checked: t, disabled: n, change: r }) {
+ return /* @__PURE__ */ q("label", {
class: "configcheck",
- children: [/* @__PURE__ */ W("span", {
+ children: [/* @__PURE__ */ q("span", {
class: "pcheck",
- children: [/* @__PURE__ */ W("input", {
+ children: [/* @__PURE__ */ q("input", {
type: "checkbox",
checked: t,
disabled: n,
onChange: (e) => r(e.currentTarget.checked)
- }), /* @__PURE__ */ W("span", {
+ }), /* @__PURE__ */ q("span", {
"aria-hidden": "true",
- children: /* @__PURE__ */ W("svg", {
+ children: /* @__PURE__ */ q("svg", {
viewBox: "0 0 24 24",
- children: /* @__PURE__ */ W("use", { href: "#i-check" })
+ children: /* @__PURE__ */ q("use", { href: "#i-check" })
})
})]
- }), /* @__PURE__ */ W("span", { children: e })]
+ }), /* @__PURE__ */ q("span", { children: e })]
});
}
- function st({ label: e, checked: t, disabled: n, change: r }) {
- return /* @__PURE__ */ W("label", {
-function it({ label: e, checked: t, disabled: n, change: r }) {
++function at({ label: e, checked: t, disabled: n, change: r }) {
+ return /* @__PURE__ */ q("label", {
class: "configtoggle",
- children: [/* @__PURE__ */ W("span", { children: e }), /* @__PURE__ */ W("input", {
+ children: [/* @__PURE__ */ q("span", { children: e }), /* @__PURE__ */ q("input", {
class: "ptoggle",
type: "checkbox",
role: "switch",
@@@ -898,8 -894,8 +898,8 @@@
})]
});
}
- 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);
-function at({ startup: e, receipt: t }) {
++function ot({ startup: e, receipt: t }) {
+ let [n, r] = U(e.enabled), [i, o] = U(e.silent), [s, c] = U(""), l = K(!1), u = K(null);
async function f() {
if (!l.current) {
l.current = !0, d(u.current, !0), c("");
@@@ -929,14 -925,14 +929,14 @@@
class: "configoptions",
role: "group",
"aria-labelledby": "startupTitle",
- children: [/* @__PURE__ */ W(st, {
- children: [/* @__PURE__ */ q(it, {
++ children: [/* @__PURE__ */ q(at, {
label: "开机后启动 Peach",
checked: n,
disabled: !e.available,
change: r
- }), /* @__PURE__ */ W("div", {
+ }), /* @__PURE__ */ q("div", {
class: "configoption",
- children: [/* @__PURE__ */ W(st, {
- children: [/* @__PURE__ */ q(it, {
++ children: [/* @__PURE__ */ q(at, {
label: "静默启动",
checked: i,
disabled: !e.available,
@@@ -970,22 -966,22 +970,22 @@@
})]
});
}
- function lt({ data: e }) {
- let t = U(null);
- return H(() => {
-function ot({ data: e }) {
++function st({ data: e }) {
+ let t = K(null);
+ return G(() => {
let n = t.current, r = document.createElement("details");
r.className = "configdirectories";
let i = document.createElement("summary");
-- i.innerHTML = v("chevron-right") + "<span>数据目录</span>", r.append(i);
++ i.innerHTML = y("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__ */ W("div", { ref: t });
+ }, [e]), /* @__PURE__ */ q("div", { ref: t });
}
- function ut({ uninstall: e }) {
- let [t, n] = B(!1), [i, o] = B("");
-function st({ uninstall: e }) {
++function ct({ uninstall: e }) {
+ let [t, n] = U(!1), [i, o] = U("");
async function s() {
await r({
title: "卸载 Peach",
@@@ -1016,14 -1012,14 +1016,14 @@@
children: "卸载会退出 Peach、移除程序和开机自启。原始媒体文件保留。"
})]
}),
- /* @__PURE__ */ W(ot, {
- /* @__PURE__ */ q(rt, {
++ /* @__PURE__ */ q(it, {
label: "完全卸载:同时删除设置、本地数据库、观看记录、凭据和缓存",
checked: t,
disabled: !e.full_available || !!i,
change: n
}),
- /* @__PURE__ */ W(lt, { data: e }),
- e.message && /* @__PURE__ */ W("p", {
- /* @__PURE__ */ q(ot, { data: e }),
++ /* @__PURE__ */ q(st, { data: e }),
+ e.message && /* @__PURE__ */ q("p", {
class: "confighelp",
children: e.message
}),
@@@ -1048,22 -1044,22 +1048,22 @@@
}
//#endregion
//#region src/islands/configuration.tsx
- var dt = "/api/configuration", ft = "/api/pick-folder", pt = 8e3, mt = (e, t) => F(dt, t), G = ({ html: e, class: t }) => /* @__PURE__ */ W("div", {
-var ct = "/api/configuration", lt = "/api/pick-folder", ut = 8e3, dt = (e, t) => R(ct, t), J = ({ html: e, class: t }) => /* @__PURE__ */ q("div", {
++var lt = "/api/configuration", ut = "/api/pick-folder", dt = 8e3, ft = (e, t) => R(lt, t), pt = ({ html: e, class: t }) => /* @__PURE__ */ q("div", {
class: t,
dangerouslySetInnerHTML: { __html: e }
- }), ht = (e) => !(e instanceof Me) || e.status !== 400 ? null : e.body?.errors ?? null;
- function gt({ facts: e }) {
- return /* @__PURE__ */ W("section", {
-}), ft = (e) => !(e instanceof ke) || e.status !== 400 ? null : e.body?.errors ?? null;
-function pt({ facts: e }) {
++}), mt = (e) => !(e instanceof Ae) || e.status !== 400 ? null : e.body?.errors ?? null;
++function ht({ facts: e }) {
+ return /* @__PURE__ */ q("section", {
class: "configfieldset",
"data-geist-fieldset": !0,
"aria-labelledby": "configFactsTitle",
- children: /* @__PURE__ */ W("div", {
+ children: /* @__PURE__ */ q("div", {
class: "geist-fieldset-content",
- children: [/* @__PURE__ */ W(G, { html: a("configFactsTitle", "运行信息") }), /* @__PURE__ */ W("dl", {
- children: [/* @__PURE__ */ q(J, { html: a("configFactsTitle", "运行信息") }), /* @__PURE__ */ q("dl", {
++ children: [/* @__PURE__ */ q(pt, { html: a("configFactsTitle", "运行信息") }), /* @__PURE__ */ q("dl", {
class: "configfacts",
- children: e.map((e) => /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W("dt", { children: e.term }), /* @__PURE__ */ W("dd", { children: [e.value, e.download_url ? /* @__PURE__ */ W("span", {
+ children: e.map((e) => /* @__PURE__ */ q(F, { children: [/* @__PURE__ */ q("dt", { children: e.term }), /* @__PURE__ */ q("dd", { children: [e.value, e.download_url ? /* @__PURE__ */ q("span", {
class: "confighelp",
- children: [" ", /* @__PURE__ */ W("a", {
+ children: [" ", /* @__PURE__ */ q("a", {
href: e.download_url,
target: "_blank",
rel: "noreferrer",
@@@ -1078,32 -1074,32 +1078,32 @@@
})
});
}
- function _t({ data: t }) {
- let [n, r] = B(t.media_sources), [i, o] = B(""), s = U(null);
- V(() => () => s.current?.abort(), []);
-function mt({ data: t }) {
++function gt({ data: t }) {
+ let [n, r] = U(t.media_sources), [i, o] = U(""), s = K(null);
+ W(() => () => 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 F(dt, t.signal);
- let e = await R(ct, t.signal);
++ let e = await R(lt, t.signal);
t.signal.aborted || r(e.media_sources);
} catch (e) {
- t.signal.aborted || o(P(e));
+ t.signal.aborted || o(L(e));
} finally {
s.current = null, d(e, !1);
}
};
- return n ? /* @__PURE__ */ W("section", {
+ return n ? /* @__PURE__ */ q("section", {
class: "configfieldset",
"aria-labelledby": "configMountsTitle",
- children: [/* @__PURE__ */ W("div", {
+ children: [/* @__PURE__ */ q("div", {
class: "geist-fieldset-content",
children: [
- /* @__PURE__ */ W(G, { html: a("configMountsTitle", "挂载状态") }),
- /* @__PURE__ */ W("dl", {
- /* @__PURE__ */ q(J, { html: a("configMountsTitle", "挂载状态") }),
++ /* @__PURE__ */ q(pt, { html: a("configMountsTitle", "挂载状态") }),
+ /* @__PURE__ */ q("dl", {
class: "configfacts",
- children: n.map((t) => /* @__PURE__ */ W(M, { children: [/* @__PURE__ */ W("dt", { children: [/* @__PURE__ */ W("span", {
+ children: n.map((t) => /* @__PURE__ */ q(F, { children: [/* @__PURE__ */ q("dt", { children: [/* @__PURE__ */ q("span", {
"aria-hidden": "true",
dangerouslySetInnerHTML: { __html: u(e[t.location]) }
}), {
@@@ -1137,9 -1133,9 +1137,9 @@@
})]
}) : null;
}
- function vt({ value: t, label: n, onChange: r }) {
- let i = U(null), a = U(null), o = U(r);
- return o.current = r, H(() => {
-function ht({ value: t, label: n, onChange: r }) {
++function _t({ value: t, label: n, onChange: r }) {
+ let i = K(null), a = K(null), o = K(r);
+ return o.current = r, G(() => {
let r = i.current;
r.innerHTML = l([
["local", "本地磁盘"],
@@@ -1163,39 -1159,39 +1163,39 @@@
class: "configsourcecontrol"
});
}
- function yt({ data: e, receipt: t }) {
-function gt({ data: e, receipt: t }) {
++function vt({ data: e, receipt: t }) {
let n = e.media_sources?.filter((e) => [
"local",
"115",
"pikpak"
- ].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(() => {
+ ].includes(e.location)), [r, i] = U(n?.length ? n.map((e) => e.path) : e.media_dirs.length ? e.media_dirs : [""]), [o, c] = U(n?.map((e) => e.location) ?? []), [l, u] = U(n?.map((e) => e.root) ?? []), [f, p] = U(String(e.port)), [m, h] = U(!1), [g, _] = U([]), [v, y] = U(""), [b, x] = U(""), [S, C] = U(null), [w, T] = U(null), E = K(!1), D = K(e.revision), O = K([]), k = K(null);
+ G(() => {
w !== null && (O.current[w]?.focus(), T(null));
- }, [w]), V(() => {
+ }, [w]), W(() => {
if (!S) return;
- let e = setTimeout(() => location.assign(S.url), pt);
- let e = setTimeout(() => location.assign(S.url), ut);
++ let e = setTimeout(() => location.assign(S.url), dt);
return () => clearTimeout(e);
}, [S]);
-- let ee = (e, t) => {
++ let A = (e, t) => {
i((n) => n.map((n, r) => r === e ? t : n));
- }, te = () => {
- }, A = () => {
++ }, j = () => {
T(r.length), i((e) => [...e, ""]);
- }, ne = (e) => {
- }, j = (e) => {
++ }, M = (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));
- }, A = (e, t) => {
- }, M = (e, t) => {
++ }, N = (e, t) => {
_((n) => {
let r = [...n];
for (; r.length <= e;) r.push("");
return r[e] = t, r;
});
- }, re = async (e, t) => {
- }, N = async (e, t) => {
++ }, ee = async (e, t) => {
if (t.getAttribute("aria-busy") !== "true") {
d(t, !0);
try {
- let { path: t } = await I(ft, { initial: r[e] ?? "" });
- t && (ee(e, t), A(e, ""));
- let { path: t } = await z(lt, { initial: r[e] ?? "" });
- t && (ee(e, t), M(e, ""));
++ let { path: t } = await z(ut, { initial: r[e] ?? "" });
++ t && (A(e, t), N(e, ""));
} catch (t) {
- A(e, P(t));
- M(e, L(t));
++ N(e, L(t));
} finally {
d(t, !1);
}
@@@ -1228,7 -1224,7 +1228,7 @@@
if (n.preventDefault(), !E.current) {
E.current = !0, d(k.current, !0), x("");
try {
- let n = await I(dt, {
- let n = await z(ct, {
++ let n = await z(lt, {
revision: D.current,
media_dirs: r,
...e.media_sources ? { media_sources: r.map((e, t) => ({
@@@ -1241,22 -1237,22 +1241,22 @@@
});
D.current = n.revision, _([]), y(""), t("已保存配置"), C(n);
} catch (e) {
- let t = ht(e);
- t ? (_(t.media_dirs ?? []), y(t.port ?? "")) : (_([]), y(""), x(P(e)));
- let t = ft(e);
++ let t = mt(e);
+ t ? (_(t.media_dirs ?? []), y(t.port ?? "")) : (_([]), y(""), x(L(e)));
} finally {
E.current = !1, d(k.current, !1);
}
}
},
noValidate: !0,
- children: [/* @__PURE__ */ W("div", {
+ children: [/* @__PURE__ */ q("div", {
class: "geist-fieldset-content",
children: [
- /* @__PURE__ */ W(G, { html: a("configTitle", "这台电脑") }),
- /* @__PURE__ */ W("div", {
- /* @__PURE__ */ q(J, { html: a("configTitle", "这台电脑") }),
++ /* @__PURE__ */ q(pt, { html: a("configTitle", "这台电脑") }),
+ /* @__PURE__ */ q("div", {
class: "configfield",
children: [
- /* @__PURE__ */ W("span", {
+ /* @__PURE__ */ q("span", {
class: "configlabel",
id: "configDirsLabel",
children: "媒体文件夹"
@@@ -1278,7 -1274,7 +1278,7 @@@
value: t,
"aria-label": `媒体文件夹 ${n + 1}`,
"aria-invalid": g[n] ? "true" : void 0,
-- onInput: (e) => ee(n, e.currentTarget.value),
++ onInput: (e) => A(n, e.currentTarget.value),
ref: (e) => {
O.current[n] = e;
}
@@@ -1287,29 -1283,29 +1287,29 @@@
type: "button",
class: "geist-button configpick",
"aria-label": "选择文件夹",
- onClick: (e) => re(n, e.currentTarget),
- children: /* @__PURE__ */ W("svg", {
- onClick: (e) => N(n, e.currentTarget),
++ onClick: (e) => ee(n, e.currentTarget),
+ children: /* @__PURE__ */ q("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
- children: /* @__PURE__ */ W("use", { href: "#i-folder-search" })
+ children: /* @__PURE__ */ q("use", { href: "#i-folder-search" })
})
}),
- r.length > 1 ? /* @__PURE__ */ W("button", {
+ r.length > 1 ? /* @__PURE__ */ q("button", {
type: "button",
class: "geist-button configrm",
"aria-label": "移除这个文件夹",
- onClick: () => ne(n),
- children: /* @__PURE__ */ W("svg", {
- onClick: () => j(n),
++ onClick: () => M(n),
+ children: /* @__PURE__ */ q("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
- children: /* @__PURE__ */ W("use", { href: "#i-x" })
+ children: /* @__PURE__ */ q("use", { href: "#i-x" })
})
}) : null,
- /* @__PURE__ */ W("div", {
+ /* @__PURE__ */ q("div", {
class: "configsource",
- children: [/* @__PURE__ */ W("div", {
+ children: [/* @__PURE__ */ q("div", {
class: "configsourcelabel",
- children: ["媒体来源", /* @__PURE__ */ W(vt, {
- children: ["媒体来源", /* @__PURE__ */ q(ht, {
++ children: ["媒体来源", /* @__PURE__ */ q(_t, {
label: `媒体来源 ${n + 1}`,
value: o[n] || "local",
onChange: (e) => {
@@@ -1336,15 -1332,15 +1336,15 @@@
]
}, n))
}),
- /* @__PURE__ */ W("button", {
+ /* @__PURE__ */ q("button", {
type: "button",
class: "geist-button configadd",
- onClick: te,
- onClick: A,
++ onClick: j,
children: "添加文件夹"
}),
- o.some((e) => e === "115" || e === "pikpak") ? /* @__PURE__ */ W("p", {
+ o.some((e) => e === "115" || e === "pikpak") ? /* @__PURE__ */ q("p", {
class: "confighelp",
- children: ["先在 CloudDrive 登录网盘并完成挂载。", /* @__PURE__ */ W("a", {
+ children: ["先在 CloudDrive 登录网盘并完成挂载。", /* @__PURE__ */ q("a", {
href: "https://www.clouddrive2.com/help.html",
target: "_blank",
rel: "noreferrer",
@@@ -1418,16 -1414,16 +1418,16 @@@
type: "checkbox",
checked: m,
onChange: (e) => h(e.currentTarget.checked)
- }), /* @__PURE__ */ W("span", {
+ }), /* @__PURE__ */ q("span", {
"aria-hidden": "true",
- children: /* @__PURE__ */ W("svg", {
+ children: /* @__PURE__ */ q("svg", {
viewBox: "0 0 24 24",
- children: /* @__PURE__ */ W("use", { href: "#i-check" })
+ children: /* @__PURE__ */ q("use", { href: "#i-check" })
})
})]
- }), /* @__PURE__ */ W("span", { children: "保存后扫描并补全资料" })]
+ }), /* @__PURE__ */ q("span", { children: "保存后扫描并补全资料" })]
}),
- b ? /* @__PURE__ */ W(G, { html: s(b, {
- b ? /* @__PURE__ */ q(J, { html: s(b, {
++ b ? /* @__PURE__ */ q(pt, { html: s(b, {
variant: "error",
label: "没有保存"
}) }) : null
@@@ -1444,8 -1440,8 +1444,8 @@@
})]
});
}
- function bt({ receipt: e, data: t, error: n }) {
- return n || !t ? /* @__PURE__ */ W(G, {
-function _t({ receipt: e, data: t, error: n }) {
- return n || !t ? /* @__PURE__ */ q(J, {
++function yt({ receipt: e, data: t, error: n }) {
++ return n || !t ? /* @__PURE__ */ q(pt, {
class: "configpage",
html: s(n || "没有读到配置", {
variant: "error",
@@@ -1458,7 -1454,7 +1458,7 @@@
class: "configgroup",
children: "通用"
}) : null,
- t.startup ? /* @__PURE__ */ W(ct, {
- t.startup ? /* @__PURE__ */ q(at, {
++ t.startup ? /* @__PURE__ */ q(ot, {
startup: t.startup,
receipt: e
}) : null,
@@@ -1466,23 -1462,23 +1466,23 @@@
class: "configgroup",
children: "媒体"
}),
- t.editable ? /* @__PURE__ */ W(yt, {
- t.editable ? /* @__PURE__ */ q(gt, {
++ t.editable ? /* @__PURE__ */ q(vt, {
data: t,
receipt: e
- }) : /* @__PURE__ */ W(G, { html: s(t.notice, {
- }) : /* @__PURE__ */ q(J, { html: s(t.notice, {
++ }) : /* @__PURE__ */ q(pt, { html: s(t.notice, {
variant: "secondary",
label: "只读"
}) }),
- /* @__PURE__ */ W(_t, { data: t }),
- t.peach_proxy || t.access ? /* @__PURE__ */ W("h2", {
- /* @__PURE__ */ q(mt, { data: t }),
++ /* @__PURE__ */ q(gt, { data: t }),
+ t.peach_proxy || t.access ? /* @__PURE__ */ q("h2", {
class: "configgroup",
children: "网络与访问"
}) : null,
- t.peach_proxy ? /* @__PURE__ */ W(at, {
- t.peach_proxy ? /* @__PURE__ */ q(nt, {
++ t.peach_proxy ? /* @__PURE__ */ q(rt, {
initial: t.peach_proxy,
receipt: e
}) : null,
- t.access ? /* @__PURE__ */ W(nt, {
- t.access ? /* @__PURE__ */ q($e, {
++ t.access ? /* @__PURE__ */ q(et, {
initial: t.access,
receipt: e
}) : null,
@@@ -1490,34 -1486,34 +1490,34 @@@
class: "configgroup",
children: "更新与维护"
}),
- t.updates ? /* @__PURE__ */ W(it, {
- t.updates ? /* @__PURE__ */ q(tt, {
++ t.updates ? /* @__PURE__ */ q(nt, {
initial: t.updates,
initialJob: t.update_job
}) : null,
- /* @__PURE__ */ W(gt, { facts: t.facts }),
- t.uninstall ? /* @__PURE__ */ W(ut, { uninstall: t.uninstall }) : null
- /* @__PURE__ */ q(pt, { facts: t.facts }),
- t.uninstall ? /* @__PURE__ */ q(st, { uninstall: t.uninstall }) : null
++ /* @__PURE__ */ q(ht, { facts: t.facts }),
++ t.uninstall ? /* @__PURE__ */ q(ct, { uninstall: t.uninstall }) : null
]
});
}
//#endregion
//#region node_modules/@preact/signals-core/dist/signals-core.module.js
- var xt = Symbol.for("preact-signals");
- function St() {
-var vt = Symbol.for("preact-signals");
-function yt() {
- if (X > 1) X--;
++var bt = Symbol.for("preact-signals");
++function xt() {
+ if (Y > 1) Y--;
else {
var e, t = !1;
for ((function() {
- var e = Ot;
- for (Ot = void 0; e !== void 0;) {
- var e = Dt;
- for (Dt = void 0; e !== void 0;) {
++ var e = kt;
++ for (kt = 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;
}
- })(); J !== void 0;) {
- var n = J;
- for (J = void 0, Tt++; n !== void 0;) {
- })(); Ct !== void 0;) {
- var n = Ct;
- for (Ct = void 0, wt++; n !== void 0;) {
++ })(); Tt !== void 0;) {
++ var n = Tt;
++ for (Tt = void 0, Et++; n !== void 0;) {
var r = n.u;
- if (n.u = void 0, n.f &= -3, !(8 & n.f) && Mt(n)) try {
- 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) && Nt(n)) try {
n.c();
} catch (n) {
t ||= (e = n, !0);
@@@ -1525,53 -1521,53 +1525,53 @@@
n = r;
}
}
- if (Tt = 0, Y--, t) throw e;
- if (wt = 0, X--, t) throw e;
++ if (Et = 0, Y--, t) throw e;
}
}
- function Ct(e) {
-function bt(e) {
- if (X > 0) return e();
- Et = ++Tt, X++;
++function St(e) {
+ if (Y > 0) return e();
- Dt = ++Et, Y++;
++ Ot = ++Dt, Y++;
try {
return e();
} finally {
- St();
- yt();
++ xt();
}
}
- var K, q = void 0;
-var xt, Y = void 0;
-function St(e) {
- var t = Y, n = xt;
- Y = void 0, xt = void 0;
++var Ct, J = void 0;
+function wt(e) {
- var t = q, n = K;
- q = void 0, K = void 0;
++ var t = J, n = Ct;
++ J = void 0, Ct = void 0;
try {
return e();
} finally {
- q = t, K = n;
- Y = t, xt = n;
++ J = t, Ct = n;
}
}
- 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 Ct = void 0, X = 0, wt = 0, Tt = 0, Et = 0, Dt = void 0, Ot = 0;
-function kt(e) {
- if (Y !== void 0) {
++var Tt = void 0, Y = 0, Et = 0, Dt = 0, Ot = 0, kt = void 0, At = 0;
++function jt(e) {
++ if (J !== void 0) {
var t = e.n;
- if (t === void 0 || t.t !== q) return t = {
- if (t === void 0 || t.t !== Y) return t = {
++ if (t === void 0 || t.t !== J) return t = {
i: 0,
S: e,
- p: q.s,
- p: Y.s,
++ p: J.s,
n: void 0,
- t: q,
- t: Y,
++ t: J,
e: void 0,
x: void 0,
r: t
- }, q.s !== void 0 && (q.s.n = t), q.s = t, e.n = t, 32 & q.f && e.S(t), t;
- if (t.i === -1) return t.i = 0, t.n !== void 0 && (t.n.p = t.p, t.p !== void 0 && (t.p.n = t.n), t.p = q.s, t.n = void 0, q.s.n = t, q.s = t), t;
- }, Y.s !== void 0 && (Y.s.n = t), Y.s = t, e.n = t, 32 & Y.f && e.S(t), t;
- if (t.i === -1) return t.i = 0, t.n !== void 0 && (t.n.p = t.p, t.p !== void 0 && (t.p.n = t.n), t.p = Y.s, t.n = void 0, Y.s.n = t, Y.s = t), t;
++ }, J.s !== void 0 && (J.s.n = t), J.s = t, e.n = t, 32 & J.f && e.S(t), t;
++ if (t.i === -1) return t.i = 0, t.n !== void 0 && (t.n.p = t.p, t.p !== void 0 && (t.p.n = t.n), t.p = J.s, t.n = void 0, J.s.n = t, J.s = t), t;
}
}
-function Z(e, t) {
+function X(e, t) {
this.v = e, this.i = 0, this.n = void 0, this.t = void 0, this.l = 0, this.W = t?.watched, this.Z = t?.unwatched, this.name = t?.name;
}
- X.prototype.brand = xt, X.prototype.h = function() {
-Z.prototype.brand = vt, Z.prototype.h = function() {
++X.prototype.brand = bt, X.prototype.h = function() {
return !0;
-}, Z.prototype.S = function(e) {
+}, X.prototype.S = function(e) {
var t = this, n = this.t;
- n !== e && e.e === void 0 && (e.x = n, this.t = e, n === void 0 ? 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);
@@@ -1584,57 -1580,57 +1584,57 @@@
(e = t.Z) == null || e.call(t);
}));
}
-}, Z.prototype.subscribe = function(e) {
+}, X.prototype.subscribe = function(e) {
var t = this;
- return zt(function() {
- return Rt(function() {
++ return Bt(function() {
var n = t.value;
- St(function() {
+ wt(function() {
return e(n);
});
}, { name: "sub" });
-}, Z.prototype.valueOf = function() {
+}, X.prototype.valueOf = function() {
return this.value;
-}, Z.prototype.toString = function() {
+}, X.prototype.toString = function() {
return this.value + "";
-}, Z.prototype.toJSON = function() {
+}, X.prototype.toJSON = function() {
return this.value;
-}, Z.prototype.peek = function() {
+}, X.prototype.peek = function() {
var e = this;
- return St(function() {
+ return wt(function() {
return e.value;
});
-}, Object.defineProperty(Z.prototype, "value", {
+}, Object.defineProperty(X.prototype, "value", {
get: function() {
- var e = At(this);
- var e = kt(this);
++ var e = jt(this);
return e !== void 0 && (e.i = this.i), this.v;
},
set: function(e) {
if (e !== this.v) {
- if (Tt > 100) throw Error("Cycle detected");
- if (wt > 100) throw Error("Cycle detected");
++ if (Et > 100) throw Error("Cycle detected");
(function(e) {
- Y !== 0 && Tt === 0 && e.l !== Dt && (e.l = Dt, Ot = {
- X !== 0 && wt === 0 && e.l !== Et && (e.l = Et, Dt = {
++ Y !== 0 && Et === 0 && e.l !== Ot && (e.l = Ot, kt = {
S: e,
v: e.v,
i: e.i,
- o: Ot
- o: Dt
++ o: kt
});
- })(this), this.v = e, this.i++, kt++, Y++;
- })(this), this.v = e, this.i++, Ot++, X++;
++ })(this), this.v = e, this.i++, At++, Y++;
try {
for (var t = this.t; t !== void 0; t = t.x) t.t.N();
} finally {
- St();
- yt();
++ xt();
}
}
}
});
- function jt(e, t) {
-function At(e, t) {
- return new Z(e, t);
++function Mt(e, t) {
+ return new X(e, t);
}
- function Mt(e) {
-function jt(e) {
++function Nt(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 Nt(e) {
-function Mt(e) {
++function Pt(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) {
@@@ -1643,30 -1639,30 +1643,30 @@@
}
}
}
- function Pt(e) {
-function Nt(e) {
++function Ft(e) {
for (var t = e.s, n = void 0; t !== void 0;) {
var r = t.p;
t.i === -1 ? (t.S.U(t), r !== void 0 && (r.n = t.n), t.n !== void 0 && (t.n.p = r)) : n = t, t.S.n = t.r, t.r !== void 0 && (t.r = void 0), t = r;
}
e.s = n;
}
-function Q(e, t) {
- Z.call(this, void 0, t), this.x = e, this.s = void 0, this.g = Ot - 1, this.f = 4;
+function Z(e, t) {
- X.call(this, void 0, t), this.x = e, this.s = void 0, this.g = kt - 1, this.f = 4;
++ X.call(this, void 0, t), this.x = e, this.s = void 0, this.g = At - 1, this.f = 4;
}
-Q.prototype = new Z(), Q.prototype.h = function() {
+Z.prototype = new X(), Z.prototype.h = function() {
if (this.f &= -3, 1 & this.f) return !1;
- if ((36 & this.f) == 32 || (this.f &= -5, this.g === kt)) return !0;
- if (this.g = kt, this.f |= 1, this.i > 0 && !Mt(this)) return this.f &= -2, !0;
- var e = q;
- 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 = Y;
++ if ((36 & this.f) == 32 || (this.f &= -5, this.g === At)) return !0;
++ if (this.g = At, this.f |= 1, this.i > 0 && !Nt(this)) return this.f &= -2, !0;
++ var e = J;
try {
- Nt(this), q = this;
- Mt(this), Y = this;
++ Pt(this), J = this;
var t = this.x();
(16 & this.f || this.v !== t || this.i === 0) && (this.v = t, this.f &= -17, this.i++);
} catch (e) {
this.v = e, this.f |= 16, this.i++;
}
- return q = e, Pt(this), this.f &= -2, !0;
- return Y = e, Nt(this), this.f &= -2, !0;
-}, Q.prototype.S = function(e) {
++ return J = e, Ft(this), this.f &= -2, !0;
+}, Z.prototype.S = function(e) {
if (this.t === void 0) {
this.f |= 36;
for (var t = this.s; t !== void 0; t = t.n) t.S.S(t);
@@@ -1682,42 -1678,42 +1682,42 @@@
this.f |= 6;
for (var e = this.t; e !== void 0; e = e.x) e.t.N();
}
-}, Object.defineProperty(Q.prototype, "value", { get: function() {
+}, Object.defineProperty(Z.prototype, "value", { get: function() {
if (1 & this.f) throw Error("Cycle detected");
- var e = At(this);
- var e = kt(this);
++ var e = jt(this);
if (this.h(), e !== void 0 && (e.i = this.i), 16 & this.f) throw this.v;
return this.v;
} });
- function Ft(e, t) {
-function Pt(e, t) {
- return new Q(e, t);
++function It(e, t) {
+ return new Z(e, t);
}
- function It(e) {
-function Ft(e) {
++function Lt(e) {
var t = e.m;
if (e.m = void 0, typeof t == "function") {
- X++;
- var n = Y;
- Y = void 0;
+ Y++;
- var n = q;
- q = void 0;
++ var n = J;
++ J = void 0;
try {
t();
} catch (t) {
- throw e.f &= -2, e.f |= 8, Lt(e), t;
- throw e.f &= -2, e.f |= 8, It(e), t;
++ throw e.f &= -2, e.f |= 8, Rt(e), t;
} finally {
- q = n, St();
- Y = n, yt();
++ J = n, xt();
}
}
}
- function Lt(e) {
-function It(e) {
++function Rt(e) {
for (var t = e.s; t !== void 0; t = t.n) t.S.U(t);
- e.x = void 0, e.s = void 0, It(e);
- e.x = void 0, e.s = void 0, Ft(e);
++ e.x = void 0, e.s = void 0, Lt(e);
}
- 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 Lt(e) {
- if (Y !== this) throw Error("Out-of-order effect");
- Nt(this), Y = e, this.f &= -2, 8 & this.f && It(this), yt();
++function zt(e) {
++ if (J !== this) throw Error("Out-of-order effect");
++ Ft(this), J = e, this.f &= -2, 8 & this.f && Rt(this), xt();
}
-function $(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);
+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, K && K.push(this);
++ this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, Ct && Ct.push(this);
}
-$.prototype.c = function() {
+Q.prototype.c = function() {
var e = this.S();
try {
if (8 & this.f || this.x === void 0) return;
@@@ -1726,20 -1722,20 +1726,20 @@@
} finally {
e();
}
-}, $.prototype.S = function() {
+}, Q.prototype.S = function() {
if (1 & this.f) throw Error("Cycle detected");
- this.f |= 1, this.f &= -9, It(this), Nt(this), Y++;
- var e = q;
- return q = this, Rt.bind(this, e);
- this.f |= 1, this.f &= -9, Ft(this), Mt(this), X++;
- var e = Y;
- return Y = this, Lt.bind(this, e);
-}, $.prototype.N = function() {
- 2 & this.f || (this.f |= 2, this.u = Ct, Ct = this);
-}, $.prototype.d = function() {
- this.f |= 8, 1 & this.f || It(this);
-}, $.prototype.dispose = function() {
++ this.f |= 1, this.f &= -9, Lt(this), Pt(this), Y++;
++ var e = J;
++ return J = this, zt.bind(this, e);
+}, Q.prototype.N = function() {
- 2 & this.f || (this.f |= 2, this.u = J, J = this);
++ 2 & this.f || (this.f |= 2, this.u = Tt, Tt = this);
+}, Q.prototype.d = function() {
- this.f |= 8, 1 & this.f || Lt(this);
++ this.f |= 8, 1 & this.f || Rt(this);
+}, Q.prototype.dispose = function() {
this.d();
};
- function zt(e, t) {
-function Rt(e, t) {
- var n = new $(e, t);
++function Bt(e, t) {
+ var n = new Q(e, t);
try {
n.c();
} catch (e) {
@@@ -1750,35 -1746,35 +1750,35 @@@
}
//#endregion
//#region node_modules/@preact/signals/dist/signals.module.js
- var Bt, Vt, Ht = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, Ut = [];
- zt(function() {
- Bt = this.N;
-var zt, Bt, Vt = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, Ht = [];
-Rt(function() {
- zt = this.N;
++var Vt, Ht, Ut = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, Wt = [];
++Bt(function() {
++ Vt = this.N;
})();
-function Ut(e, t) {
- b[e] = t.bind(null, b[e] || function() {});
+function $(e, t) {
- b[e] = t.bind(null, b[e] || function() {});
++ x[e] = t.bind(null, x[e] || function() {});
}
--function Wt(e) {
- if (Vt) {
- var t = Vt;
- Vt = void 0, t();
- if (Bt) {
- var t = Bt;
- Bt = void 0, t();
++function Gt(e) {
++ if (Ht) {
++ var t = Ht;
++ Ht = void 0, t();
}
- Vt = e && e.S();
- Bt = e && e.S();
++ Ht = e && e.S();
}
--function Gt(e) {
-- var t = this, n = e.data, r = qt(n);
++function Kt(e) {
++ var t = this, n = e.data, r = Jt(n);
r.name = "ReactiveDom", r.value = n;
- var i = Ke(function() {
- var i = Ue(function() {
++ var i = We(function() {
for (var e = t, n = t.__v; n = n.__;) if (n.__c) {
n.__c.__$f |= 4;
break;
}
- var i = Ft(function() {
- var i = Pt(function() {
++ var i = It(function() {
var e = r.value.value;
return e === 0 ? 0 : !0 === e ? "" : e || "";
- }), a = Ft(function() {
- }), a = Pt(function() {
-- return !Array.isArray(i.value) && !S(i.value);
- }), o = zt(function() {
- }), o = Rt(function() {
-- if (this.N = Xt, a.value) {
++ }), a = It(function() {
++ return !Array.isArray(i.value) && !C(i.value);
++ }), o = Bt(function() {
++ if (this.N = Zt, a.value) {
var t = i.value;
e.__v && e.__v.__e && e.__v.__e.nodeType === 3 && (e.__v.__e.data = t);
}
@@@ -1789,14 -1785,14 +1789,14 @@@
}, []), a = i[0], o = i[1];
return a.value ? o.peek() : o.value;
}
- Gt.displayName = "ReactiveTextNode", Object.defineProperties(X.prototype, {
-Gt.displayName = "ReactiveTextNode", Object.defineProperties(Z.prototype, {
++Kt.displayName = "ReactiveTextNode", Object.defineProperties(X.prototype, {
constructor: {
configurable: !0,
value: void 0
},
type: {
configurable: !0,
-- value: Gt
++ value: Kt
},
props: {
configurable: !0,
@@@ -1820,26 -1816,26 +1820,26 @@@
}
}
e(t);
-}), Ut("__r", function(e, t) {
+}), $("__r", function(e, t) {
- if (e(t), t.type !== M) {
- Wt();
+ if (e(t), t.type !== F) {
- Wt();
++ Gt();
var n, r = t.__c;
r && (r.__$f &= -2, (n = r.__$u) === void 0 && (r.__$u = n = function(e, t) {
var n;
- return zt(function() {
- return Rt(function() {
++ return Bt(function() {
n = this;
}, { name: t }), n.c = e, n;
}(function(e) {
return function() {
var t;
- Ht && ((t = this.y) == null || t.call(this)), e.__$f |= 1, e.setState({});
- Vt && ((t = this.y) == null || t.call(this)), e.__$f |= 1, e.setState({});
++ Ut && ((t = this.y) == null || t.call(this)), e.__$f |= 1, e.setState({});
};
-- }(r), typeof t.type == "function" ? t.type.displayName || t.type.name : ""))), Wt(n);
++ }(r), typeof t.type == "function" ? t.type.displayName || t.type.name : ""))), Gt(n);
}
-}), Ut("__e", function(e, t, n, r) {
- Wt(), e(t, n, r);
-}), Ut("diffed", function(e, t) {
- Wt();
+}), $("__e", function(e, t, n, r) {
- Wt(), e(t, n, r);
++ Gt(), e(t, n, r);
+}), $("diffed", function(e, t) {
- Wt();
++ Gt();
var n;
if (typeof t.type == "string" && (n = t.__e)) {
var r = t.__np, i = t.props, a = n.U;
@@@ -1849,19 -1845,19 +1849,19 @@@
}
if (r) for (var c in a || (a = {}, n.U = a), r) {
var l = a[c], u = r[c];
-- l === void 0 ? (l = Kt(n, c, u, i), a[c] = l) : l.o(u, i);
++ l === void 0 ? (l = qt(n, c, u, i), a[c] = l) : l.o(u, i);
}
}
e(t);
});
--function Kt(e, t, n, r) {
- var i = t in e && e.ownerSVGElement === void 0, a = jt(n);
- var i = t in e && e.ownerSVGElement === void 0, a = At(n);
++function qt(e, t, n, r) {
++ var i = t in e && e.ownerSVGElement === void 0, a = Mt(n);
return {
o: function(e, t) {
a.value = e, r = t;
},
- d: zt(function() {
- d: Rt(function() {
-- this.N = Xt;
++ d: Bt(function() {
++ this.N = Zt;
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));
})
@@@ -1891,9 -1887,9 +1891,9 @@@ $("unmount", function(e, t)
}
}
e(t);
-}), Ut("__h", function(e, t, n, r) {
+}), $("__h", function(e, t, n, r) {
r < 3 && (t.__$f |= 2), e(t, n, r);
- }), ue.prototype.shouldComponentUpdate = function(e, t) {
-}), se.prototype.shouldComponentUpdate = function(e, t) {
++}), ce.prototype.shouldComponentUpdate = function(e, t) {
if (this.__R) return !0;
var n = this.__$u, r = n && n.s !== void 0;
for (var i in t) return !0;
@@@ -1905,55 -1901,55 +1905,55 @@@
for (var s in this.props) if (!(s in e)) return !0;
return !1;
};
--function qt(e, t) {
- return Ke(function() {
- return jt(e, t);
- return Ue(function() {
- return At(e, t);
++function Jt(e, t) {
++ return We(function() {
++ return Mt(e, t);
}, []);
}
--var Jt = function(e) {
++var Yt = function(e) {
queueMicrotask(function() {
queueMicrotask(e);
});
};
--function Yt() {
- Ct(function() {
- for (var e; e = Ut.shift();) Bt.call(e);
- bt(function() {
- for (var e; e = Ht.shift();) zt.call(e);
++function Xt() {
++ St(function() {
++ for (var e; e = Wt.shift();) Vt.call(e);
});
}
--function Xt() {
- Ut.push(this) === 1 && (b.requestAnimationFrame || Jt)(Yt);
- Ht.push(this) === 1 && (b.requestAnimationFrame || Jt)(Yt);
++function Zt() {
++ Wt.push(this) === 1 && (x.requestAnimationFrame || Yt)(Xt);
}
//#endregion
//#region src/state/quality-goals.ts
--var Zt = "/api/quality-goals?limit=200", Qt = {
++var Qt = "/api/quality-goals?limit=200", $t = {
data: null,
error: ""
- }, $t = jt(Qt), en = 0, tn = Ft(() => $t.value);
- Ft(() => $t.value.data?.total ?? null);
-}, $t = At(Qt), en = 0, tn = Pt(() => $t.value);
-Pt(() => $t.value.data?.total ?? null);
--function nn() {
-- en += 1, $t.value = Qt;
++}, en = Mt($t), tn = 0, nn = It(() => en.value);
++It(() => en.value.data?.total ?? null);
++function rn() {
++ tn += 1, en.value = $t;
}
--async function rn(e) {
-- let t = en += 1;
++async function an(e) {
++ let t = tn += 1;
try {
- let n = await F(Zt, e);
- let n = await R(Zt, e);
-- return t === en && ($t.value = {
++ let n = await R(Qt, e);
++ return t === tn && (en.value = {
data: n,
error: ""
}), n;
} catch (n) {
-- throw !e?.aborted && t === en && ($t.value = {
++ throw !e?.aborted && t === tn && (en.value = {
data: null,
- error: P(n)
+ error: L(n)
}), n;
}
}
//#endregion
//#region src/islands/quality-goals.tsx
--var an = (e, t) => rn(t), on = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;
--function sn({ openItem: e, javTitleHtml: t, javDisplayName: n, srcBadge: r }) {
-- let { data: a, error: o } = tn.value;
- if (o) return /* @__PURE__ */ W("div", {
++var on = (e, t) => an(t), sn = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;
++function cn({ openItem: e, javTitleHtml: t, javDisplayName: n, srcBadge: r }) {
++ let { data: a, error: o } = nn.value;
+ if (o) return /* @__PURE__ */ q("div", {
class: "qualitylist",
dangerouslySetInnerHTML: { __html: s(o, {
variant: "error",
@@@ -1970,8 -1966,8 +1970,8 @@@
type: "button",
"aria-label": `打开 ${n(i)}`,
onClick: () => e(i.id),
- children: /* @__PURE__ */ W("img", {
- src: on(i),
+ children: /* @__PURE__ */ q("img", {
- src: on(i),
++ src: sn(i),
alt: "",
loading: "lazy",
onError: (e) => e.currentTarget.remove()
@@@ -1990,22 -1986,22 +1990,22 @@@
style: "display:contents",
dangerouslySetInnerHTML: { __html: r(i.location, i.cost) }
}),
- /* @__PURE__ */ W("span", { children: m[i.location] ?? i.location }),
- /* @__PURE__ */ W("span", { children: g(i.duration) }),
- /* @__PURE__ */ W("span", { children: _(i.size ?? 0) })
+ /* @__PURE__ */ q("span", { children: m[i.location] ?? i.location }),
- /* @__PURE__ */ q("span", { children: g(i.duration) }),
- /* @__PURE__ */ q("span", { children: _(i.size ?? 0) })
++ /* @__PURE__ */ q("span", { children: _(i.duration) }),
++ /* @__PURE__ */ q("span", { children: v(i.size ?? 0) })
]
}),
- i.reason ? /* @__PURE__ */ W("p", { children: i.reason }) : null
+ i.reason ? /* @__PURE__ */ q("p", { children: i.reason }) : null
] })]
}, i.id))
- }) : /* @__PURE__ */ W("div", {
+ }) : /* @__PURE__ */ q("div", {
class: "qualitylist",
dangerouslySetInnerHTML: { __html: i("sparkles", "没有标记中的高清版目标", "现有版本都已满足条件,或还没有加入追踪。") }
});
}
//#endregion
//#region src/jobs.ts
--async function cn(e) {
++async function ln(e) {
let t = e.pause || ((e) => new Promise((t) => setTimeout(t, e))), n = 0;
for (; e.active();) {
let r;
@@@ -2020,11 -2016,11 +2020,11 @@@
await t(2e3);
}
}
--function ln(e) {
++function un(e) {
let t = document.createElement("div");
e.host.hidden = !0, t.dataset.followJob = "", t.setAttribute("aria-live", "polite"), e.host.prepend(t);
let n = e.storageKey || "peach-follow-job", r = sessionStorage.getItem(n) || void 0, i = !1;
-- cn({
++ ln({
read: e.read,
active: () => !i && e.active() && t.isConnected,
keepWatching: e.watchIdle !== !1,
@@@ -2050,10 -2046,10 +2050,10 @@@
}
//#endregion
//#region src/islands/scraping.tsx
- var un = (e, t) => F("/api/scraping", t);
-var un = (e, t) => R("/api/scraping", t);
--function dn({ value: e, onChange: t }) {
- let n = U(null), r = U(t);
- return r.current = t, H(() => {
++var dn = (e, t) => R("/api/scraping", t);
++function fn({ value: e, onChange: t }) {
+ let n = K(null), r = K(t);
+ return r.current = t, G(() => {
let t = n.current;
t.innerHTML = l([["peach", "Peach 代理"], ["direct", "直接连接"]], e, { label: "连接方式" });
let i = p(t.firstElementChild), a = () => r.current(i.value);
@@@ -2065,76 -2061,62 +2065,76 @@@
class: "scraping-network"
});
}
--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"), [g, _] = B(""), [v, y] = B(!1), [b, x] = B(""), [S, C] = B([]), w = U(null), T = U(null);
- H(() => {
- let [n, r] = U(e), [i, o] = U(e.network), [c, l] = U(""), [u, f] = U(""), [p, m] = U("paste"), [h, g] = U(""), [_, v] = U(!1), [y, b] = U(""), [x, S] = U([]), C = K(null), w = K(null);
++function pn({ source: e, toast: t }) {
++ let [n, r] = U(e), [i, o] = U(e.network), [c, l] = U(""), [u, f] = U(""), [p, m] = U("paste"), [h, _] = U(""), [v, y] = U(!1), [b, x] = U(""), [S, C] = U([]), w = K(null), T = K(null);
+ G(() => {
- w.current?.querySelectorAll("footer button").forEach((e) => d(e, _));
- }, [_]);
- let T = K(new AbortController());
- W(() => () => T.current.abort(), []);
- async function E(n) {
- if (!_) {
- v(!0), b(""), S([]);
+ T.current?.querySelectorAll("footer button").forEach((e) => d(e, v));
+ }, [v]);
- let E = U(new AbortController());
- V(() => () => E.current.abort(), []);
++ let E = K(new AbortController());
++ W(() => () => E.current.abort(), []);
+ async function D(n) {
+ if (!v) {
+ y(!0), x(""), C([]);
try {
if (n === "check") {
- let t = await I("/api/scraping/check", { source: e.source }, "POST", E.current.signal);
- let t = await z("/api/scraping/check", { source: e.source }, "POST", T.current.signal);
- T.current.signal.aborted || S(t.results);
++ let t = await z("/api/scraping/check", { source: e.source }, "POST", E.current.signal);
+ E.current.signal.aborted || C(t.results);
} else {
- let a = await I("/api/scraping/settings", {
+ let a = await z("/api/scraping/settings", {
source: e.source,
network: i,
cookie: c,
cookies_text: u,
revoke: n === "revoke"
- }, "POST", T.current.signal);
- T.current.signal.aborted || (r(a.saved), l(""), f(""), g(""), C.current && (C.current.value = ""), t(n === "revoke" ? "Cookie 已撤销" : "来源设置已保存"));
+ }, "POST", E.current.signal);
+ E.current.signal.aborted || (r(a.saved), l(""), f(""), _(""), w.current && (w.current.value = ""), t(n === "revoke" ? "Cookie 已撤销" : "来源设置已保存"));
}
} catch (e) {
- E.current.signal.aborted || x(P(e));
- T.current.signal.aborted || b(L(e));
++ E.current.signal.aborted || x(L(e));
} finally {
- T.current.signal.aborted || v(!1);
+ E.current.signal.aborted || y(!1);
}
}
}
- return /* @__PURE__ */ W("section", {
+ return /* @__PURE__ */ q("section", {
class: "scraping-source",
- children: /* @__PURE__ */ W("form", {
+ children: /* @__PURE__ */ q("form", {
- ref: w,
+ ref: T,
class: "cleanupfieldset",
"data-geist-fieldset": !0,
onSubmit: (e) => {
- e.preventDefault(), E("save");
+ e.preventDefault(), D("save");
},
- children: [/* @__PURE__ */ W("div", {
+ children: [/* @__PURE__ */ q("div", {
class: "geist-fieldset-content scraping-fields",
children: [
- /* @__PURE__ */ W("div", {
+ /* @__PURE__ */ q("div", {
class: "geist-fieldset-heading",
- children: [/* @__PURE__ */ W("div", { dangerouslySetInnerHTML: { __html: a(`scraping-${e.source}`, e.label) } }), /* @__PURE__ */ W("a", {
+ children: [/* @__PURE__ */ q("div", { dangerouslySetInnerHTML: { __html: a(`scraping-${e.source}`, e.label) } }), /* @__PURE__ */ q("a", {
class: "scraping-url",
href: e.login,
target: "_blank",
rel: "noopener noreferrer",
- children: e.login
+ children: [
- /* @__PURE__ */ W("img", {
- src: h(e.login),
++ /* @__PURE__ */ q("img", {
++ src: g(e.login),
+ alt: "",
+ width: "16",
+ height: "16",
+ loading: "lazy",
+ onError: (e) => e.currentTarget.remove()
+ }),
- /* @__PURE__ */ W("span", { children: e.login }),
- /* @__PURE__ */ W("svg", {
++ /* @__PURE__ */ q("span", { children: e.login }),
++ /* @__PURE__ */ q("svg", {
+ "aria-hidden": "true",
- children: /* @__PURE__ */ W("use", { href: "#i-external-link" })
++ children: /* @__PURE__ */ q("use", { href: "#i-external-link" })
+ })
+ ]
})]
}),
- /* @__PURE__ */ W("div", {
+ /* @__PURE__ */ q("div", {
class: "scraping-label",
- children: ["连接方式", /* @__PURE__ */ W(dn, {
- children: ["连接方式", /* @__PURE__ */ q(dn, {
++ children: ["连接方式", /* @__PURE__ */ q(fn, {
value: i,
onChange: o
})]
@@@ -2156,35 -2138,35 +2156,35 @@@
value: t,
checked: p === t,
onChange: () => {
- m(t), l(""), f(""), g("");
+ m(t), l(""), f(""), _("");
}
- }), /* @__PURE__ */ W("span", { children: n })] }, t))
+ }), /* @__PURE__ */ q("span", { children: n })] }, t))
}),
- p === "paste" ? /* @__PURE__ */ W("label", { children: ["Cookie", /* @__PURE__ */ W("input", {
+ p === "paste" ? /* @__PURE__ */ q("label", { children: ["Cookie", /* @__PURE__ */ q("input", {
class: "geist-input",
type: "password",
autoComplete: "off",
value: c,
- disabled: _,
+ disabled: v,
onInput: (e) => l(e.currentTarget.value)
- })] }) : /* @__PURE__ */ W("label", {
+ })] }) : /* @__PURE__ */ q("label", {
class: "scraping-file",
- children: ["Netscape Cookie 文件(.txt)", /* @__PURE__ */ W("span", {
+ children: ["Netscape Cookie 文件(.txt)", /* @__PURE__ */ q("span", {
class: "scraping-file-control",
children: [
- /* @__PURE__ */ W("span", {
+ /* @__PURE__ */ q("span", {
class: "geist-button",
children: "选择文件"
}),
- /* @__PURE__ */ W("span", {
+ /* @__PURE__ */ q("span", {
class: "scraping-file-name",
- children: g || "未选择文件"
+ children: h || "未选择文件"
}),
- /* @__PURE__ */ W("input", {
+ /* @__PURE__ */ q("input", {
- ref: C,
+ ref: w,
type: "file",
accept: ".txt",
- disabled: _,
+ disabled: v,
onChange: async (e) => {
let t = e.currentTarget.files?.[0];
if (!t) {
@@@ -2210,11 -2192,11 +2210,11 @@@
})]
})
] }),
- b && /* @__PURE__ */ W("div", {
- y && /* @__PURE__ */ q("div", {
++ b && /* @__PURE__ */ q("div", {
role: "alert",
- dangerouslySetInnerHTML: { __html: s(y, { variant: "error" }) }
+ dangerouslySetInnerHTML: { __html: s(b, { variant: "error" }) }
}),
- S.map((t) => /* @__PURE__ */ W("div", {
- x.map((t) => /* @__PURE__ */ q("div", {
++ S.map((t) => /* @__PURE__ */ q("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))
@@@ -2223,36 -2205,36 +2223,36 @@@
class: "geist-fieldset-footer",
"data-geist-fieldset-footer": !0,
children: [
- e.accepts_cookie && n.cookie_saved && /* @__PURE__ */ W("button", {
- /* @__PURE__ */ q("button", {
- class: "geist-button primary",
- type: "submit",
- children: "保存"
++ e.accepts_cookie && n.cookie_saved && /* @__PURE__ */ q("button", {
+ class: "geist-button",
+ type: "button",
+ onClick: () => void D("revoke"),
+ children: "撤销 Cookie"
}),
- /* @__PURE__ */ W("button", {
+ /* @__PURE__ */ q("button", {
class: "geist-button",
type: "button",
- onClick: () => void E("check"),
+ onClick: () => void D("check"),
children: "检查连接"
}),
- /* @__PURE__ */ W("button", {
- e.accepts_cookie && n.cookie_saved && /* @__PURE__ */ q("button", {
- class: "geist-button",
- type: "button",
- onClick: () => void E("revoke"),
- children: "撤销 Cookie"
++ /* @__PURE__ */ q("button", {
+ class: "geist-button primary",
+ type: "submit",
+ children: "保存"
})
]
})]
})
});
}
--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);
++function mn({ data: e, error: t, toast: n }) {
+ let [r, i] = U(""), [o, c] = U(!1), [l, u] = U(""), f = K(null);
+ G(() => d(f.current, o), [o]);
+ let p = K(new AbortController()), m = K(0);
async function h(e = !1) {
let t = ++m.current;
-- await cn({
- read: (e) => F("/api/scraping/cover", e),
++ await ln({
+ read: (e) => R("/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 || "封面采集完成");
@@@ -2312,7 -2294,7 +2312,7 @@@
]
})
}),
- e?.sources.map((e) => /* @__PURE__ */ W(fn, {
- e?.sources.map((e) => /* @__PURE__ */ q(fn, {
++ e?.sources.map((e) => /* @__PURE__ */ q(pn, {
source: e,
toast: n
}, e.source))
@@@ -2321,14 -2303,14 +2321,14 @@@
}
//#endregion
//#region src/islands/library-processing.tsx
- var mn = (e, t) => F("/api/library-processing", t);
-var mn = (e, t) => R("/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]);
++var hn = (e, t) => R("/api/library-processing", t);
++function gn({ data: e, error: t, toast: n, onComplete: r, mode: i, monitor: l }) {
+ let [u, f] = U(e || { status: "idle" }), [p, m] = U(t), [h, g] = U(!1), [_, v] = U(!1), y = K(new AbortController()), b = K(0), x = K(u.status), S = K(null), C = h || u.status === "running";
+ G(() => d(S.current, C), [C]);
async function w() {
let e = ++b.current;
-- await cn({
- read: (e) => F("/api/library-processing", e),
++ await ln({
+ read: (e) => R("/api/library-processing", e),
active: () => !y.current.signal.aborted && b.current === e,
keepWatching: i === "notice" || !!l,
render: (e) => {
@@@ -2415,12 -2397,12 +2415,12 @@@
}
//#endregion
//#region src/state/index.ts
--var gn = { "quality-goals": {
-- refresh: rn,
-- reset: nn
--} }, _n = () => Object.keys(gn);
--async function vn(e) {
-- let t = gn[e];
++var _n = { "quality-goals": {
++ refresh: an,
++ reset: rn
++} }, vn = () => Object.keys(_n);
++async function yn(e) {
++ let t = _n[e];
if (!t) throw Error(`未登记的共享 store:${String(e)}`);
try {
return await t.refresh(), !0;
@@@ -2429,9 -2411,40 +2429,40 @@@
}
}
//#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 : "");
++var bn = (e = "") => /^https?:\/\//i.test(e) ? e : "";
++function xn(e = "") {
++ let t = bn(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));
++function Sn(e) {
++ let t = bn(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)}
++ ${xn(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) {
++function Cn(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 yn = () => ({
-var Cn = () => ({
++var wn = () => ({
busy: !1,
+ category: "",
+ filter: "",
groupBy: "candidates",
anchor: null,
selected: /* @__PURE__ */ new Set(),
@@@ -2439,7 -2452,23 +2470,23 @@@
assets: /* @__PURE__ */ new Map(),
errors: /* @__PURE__ */ new Map()
});
- function bn(e, t) {
-function wn(e, t) {
++function Tn(e, t) {
+ let n = [[
+ "candidates",
+ t ? "按候选数量" : "全部待复核",
+ "list-filter"
+ ]];
+ return e.some((e) => e.source || e.candidates?.some((e) => e.source)) && n.push([
+ "source",
+ "按来源",
+ "list-filter"
+ ]), e.some((e) => e.field) && n.push([
+ "field",
+ "按字段",
+ "list-filter"
+ ]), n;
+ }
-function Tn(e, t) {
++function En(e, t) {
let n = /* @__PURE__ */ new Map();
for (let r of e) {
let e, i;
@@@ -2456,11 -2485,11 +2503,11 @@@
}
return [...n.values()];
}
- function xn(e, t, n, r, i) {
-function En(e, t, n, r, i) {
++function Dn(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 Sn(e, t, n, r) {
-async function Dn(e, t, n, r) {
++async function On(e, t, n, r) {
let i = [], a = 0;
for (let o of e) {
if (!r()) break;
@@@ -2480,63 -2509,87 +2527,87 @@@
failures: i
};
}
- function Cn(e) {
-function On(e) {
++function kn(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 wn(e, r) {
-function kn(e, r) {
++function An(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 = "") => {
+ let a = r.state, o = [...i.querySelectorAll("[data-review-key]")];
+ r.category !== void 0 && a.category !== r.category && (a.category = r.category, a.filter = "", a.groupBy = "candidates", a.anchor = null);
- let s = wn(r.rows, r.metadata);
++ let s = Tn(r.rows, r.metadata);
+ s.some((e) => e[0] === a.groupBy) || (a.groupBy = "candidates", a.filter = "");
- let c = Tn(r.rows, a.groupBy);
++ let c = En(r.rows, a.groupBy);
+ c.some((e) => e.key === a.filter) || (a.filter = "");
+ let u = () => [...i.querySelectorAll("[data-review-key]")].filter((e) => !e.closest("[hidden]")), f = () => u().filter((e) => a.selected.has(e.dataset.reviewKey)), m = () => r.rows.filter((e) => f().some((t) => t.dataset.reviewKey === e.item_key)), h = (e) => !e.querySelector("[data-review-status=\"approved\"]")?.disabled, g = (e, t = "") => {
let n = document.createElement("button");
return n.type = "button", n.className = `geist-button ${t}`.trim(), n.textContent = e, n;
- }, h = document.createElement("div");
- h.className = "reviewbulkbar reviewbulktoolbar", h.setAttribute("role", "group"), h.setAttribute("aria-label", "复核批量操作");
- let g = document.createElement("div");
- g.className = "reviewgroupby", g.innerHTML = l([
- ["candidates", "按候选数量"],
- ["source", "按来源"],
- ["field", "按字段"]
- ], a.groupBy, { label: "分组方式" });
- let _ = p(g.firstElementChild);
- _.addEventListener("change", () => {
- if (a.busy || ![
- "candidates",
- "source",
- "field"
- ].includes(_.value)) return;
- a.groupBy = _.value, a.anchor = null;
+ }, _ = document.createElement("div");
+ _.className = "reviewbulkbar reviewbulktoolbar", _.setAttribute("role", "group"), _.setAttribute("aria-label", "复核批量操作");
+ let v = document.createElement("div");
+ v.className = "reviewgroupby", v.innerHTML = l(s, a.groupBy, { label: "筛选分组方式" });
+ let y = p(v.firstElementChild);
+ y.addEventListener("change", () => {
+ if (a.busy || !s.some((e) => e[0] === y.value)) return;
+ a.groupBy = y.value, a.filter = "", a.anchor = null;
let t = e.parentElement;
r.refresh(), t?.querySelector(".reviewgroupby button")?.focus({ preventScroll: !0 });
});
- let v = m("全选本页"), y = m("通过所选", "primary"), b = m("拒绝所选", "error"), x = document.createElement("span");
- x.className = "reviewselectedcount", x.setAttribute("role", "status");
- let S = document.createElement("div");
- S.className = "reviewbulksource", S.hidden = !r.metadata;
- let C = document.createElement("p");
- C.className = "reviewstate reviewbulkfeedback", C.setAttribute("role", "status");
- let w = document.createElement("div");
- w.className = "reviewbulkdecisions", w.append(y, b), h.append(g, v, x, S, w), i.before(h, C), i.classList.add("reviewgroups");
- let T = () => {
- a.selected.clear(), a.anchor = null, O();
+ let b = document.createElement("div");
+ b.className = "reviewcategoryfilter", b.hidden = c.length < 2, b.innerHTML = l([[
+ "",
+ "全部分类",
+ "list-filter"
+ ], ...c.map((e) => [
+ e.key,
+ `${e.title} · ${e.rows.length}`,
+ "list-filter"
+ ])], a.filter, { label: a.groupBy === "field" ? "筛选字段分类" : "筛选当前分类" });
+ let x = b.querySelector("[data-select-menu]");
+ if (x) {
+ let e = document.createElement("div");
+ e.setAttribute("role", "group"), e.setAttribute("aria-label", a.groupBy === "field" ? "字段分类" : "当前分类");
+ let t = document.createElement("div");
+ t.className = "reviewfilterheading", t.textContent = e.getAttribute("aria-label"), t.setAttribute("aria-hidden", "true"), e.append(t, ...Array.from(x.children).slice(1)), x.append(e);
+ }
+ let S = p(b.firstElementChild);
+ S.addEventListener("change", () => {
+ if (a.busy || S.value && !c.some((e) => e.key === S.value)) return;
+ a.filter = S.value, a.anchor = null;
+ let t = e.parentElement;
+ r.refresh(), t?.querySelector(".reviewcategoryfilter button")?.focus({ preventScroll: !0 });
+ });
+ let C = g("全选本页"), w = g("通过所选", "primary"), T = g("拒绝所选", "error"), E = document.createElement("span");
+ E.className = "reviewselectedcount", E.setAttribute("role", "status");
+ let D = document.createElement("div");
+ D.className = "reviewbulksource", D.hidden = !r.metadata;
+ let O = document.createElement("p");
+ O.className = "reviewstate reviewbulkfeedback", O.setAttribute("role", "status");
+ let k = document.createElement("div");
+ k.className = "reviewbulkdecisions", k.append(w, T), _.append(v, b, C, E, D, k), i.before(_, O), i.classList.add("reviewgroups");
- let ee = () => {
- a.selected.clear(), a.anchor = null, M();
++ let A = () => {
++ a.selected.clear(), a.anchor = null, N();
};
- v.onclick = () => {
- 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 bn(r.rows, a.groupBy)) {
+ C.onclick = () => {
+ if (a.busy) return;
+ let e = u(), t = f().length === e.length;
- e.forEach((e) => t ? a.selected.delete(e.dataset.reviewKey) : a.selected.add(e.dataset.reviewKey)), M();
- }, w.onclick = () => N("approved", w), T.onclick = () => N("rejected", T);
- let A = [];
++ e.forEach((e) => t ? a.selected.delete(e.dataset.reviewKey) : a.selected.add(e.dataset.reviewKey)), N();
++ }, w.onclick = () => ee("approved", w), T.onclick = () => ee("rejected", T);
++ let j = [];
+ for (let e of c) {
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");
- c.className = "reviewbulkbar";
- let l = document.createElement("h3");
- l.textContent = `${e.title} · ${t.length}`;
- let u = m("全选本组"), d = document.createElement("div");
- d.className = "reviewlist", c.append(l, u), r.append(c, d), i.append(r), u.onclick = () => {
+ r.className = "reviewgroup", r.hidden = !!a.filter && e.key !== a.filter;
+ let s = document.createElement("div");
+ s.className = "reviewbulkbar";
+ let c = document.createElement("h3");
+ c.textContent = `${e.title} · ${t.length}`;
+ let l = g("全选本组"), d = document.createElement("div");
+ d.className = "reviewlist", s.append(c, l), r.append(s, d), i.append(r), l.onclick = () => {
if (a.busy) return;
let e = t.every((e) => a.selected.has(e.dataset.reviewKey));
- t.forEach((t) => e ? a.selected.delete(t.dataset.reviewKey) : a.selected.add(t.dataset.reviewKey)), O();
- }, E.push(() => {
- u.textContent = t.every((e) => a.selected.has(e.dataset.reviewKey)) ? "清空本组" : "全选本组";
- t.forEach((t) => e ? a.selected.delete(t.dataset.reviewKey) : a.selected.add(t.dataset.reviewKey)), M();
- }, A.push(() => {
++ t.forEach((t) => e ? a.selected.delete(t.dataset.reviewKey) : a.selected.add(t.dataset.reviewKey)), N();
++ }, j.push(() => {
+ l.textContent = t.every((e) => a.selected.has(e.dataset.reviewKey)) ? "清空本组" : "全选本组";
});
for (let e of t) {
d.append(e);
@@@ -2549,23 -2602,25 +2620,25 @@@
let e = document.createElement("span");
e.className = "reviewpickname", e.append(...r.childNodes), r.classList.add("reviewpickheading"), r.append(i, e);
} else e.prepend(i);
- let c = (e, n) => {
- xn(a, s().map((e) => e.dataset.reviewKey), t, e, n), O();
+ let s = (e, n) => {
- En(a, u().map((e) => e.dataset.reviewKey), t, e, n), M();
++ Dn(a, u().map((e) => e.dataset.reviewKey), t, e, n), N();
};
- if (i.addEventListener("click", (e) => {
- e.target !== o && (e.preventDefault(), a.busy || (o.focus(), c(e.shiftKey, !o.checked)));
+ if (i.addEventListener("mousedown", (e) => {
+ e.shiftKey && e.preventDefault();
+ }), i.addEventListener("click", (e) => {
+ e.target !== o && (e.preventDefault(), a.busy || (o.focus(), s(e.shiftKey, !o.checked)));
}), o.addEventListener("click", (e) => {
- a.busy || c(e.shiftKey, o.checked);
+ a.busy || s(e.shiftKey, o.checked);
}), o.addEventListener("keydown", (n) => {
if (!(a.busy || !n.shiftKey)) {
- if (n.key === " ") n.preventDefault(), c(!0, !0);
+ if (n.key === " ") n.preventDefault(), s(!0, !0);
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), xn(a, r.map((e) => e.dataset.reviewKey), i.dataset.reviewKey, !0, !0), O(), i.querySelector(".reviewpickitem input")?.focus());
+ let r = u(), i = r[r.indexOf(e) + (n.key === "ArrowDown" ? 1 : -1)];
- i && (a.anchor === null && (a.anchor = t), En(a, r.map((e) => e.dataset.reviewKey), i.dataset.reviewKey, !0, !0), M(), i.querySelector(".reviewpickitem input")?.focus());
++ i && (a.anchor === null && (a.anchor = t), Dn(a, r.map((e) => e.dataset.reviewKey), i.dataset.reviewKey, !0, !0), N(), i.querySelector(".reviewpickitem input")?.focus());
}
}
- }), E.push(() => {
- }), A.push(() => {
++ }), j.push(() => {
o.checked = a.selected.has(t);
}), a.assets.has(t)) {
let n = a.assets.get(t), r = [...e.querySelectorAll("[data-review-asset]")];
@@@ -2580,24 -2635,26 +2653,26 @@@
n.target.closest("[data-review-asset],[data-pick-all],[data-pick-none]") && a.assets.set(t, [...e.querySelectorAll("[data-review-asset][aria-pressed=\"true\"]")].map((e) => Number(e.dataset.reviewAsset)));
});
for (let n of e.querySelectorAll("input[type=\"radio\"]")) a.choices.has(t) && (n.checked = a.choices.get(t) === n.value), n.addEventListener("change", () => {
- n.checked && a.choices.set(t, n.value), O();
- n.checked && a.choices.set(t, n.value), M();
++ n.checked && a.choices.set(t, n.value), N();
});
}
}
- e.addEventListener("keydown", (e) => {
- a.busy || (e.key === "Escape" && a.selected.size && (e.preventDefault(), e.stopPropagation(), T()), (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "a" && !e.target.matches("textarea,input:not([type=\"checkbox\"]):not([type=\"radio\"])") && (e.preventDefault(), e.stopPropagation(), o.forEach((e) => a.selected.add(e.dataset.reviewKey)), O()));
+ e.addEventListener("keydown", (t) => {
- a.busy || !e.contains(i) || (t.key === "Escape" && a.selected.size && (t.preventDefault(), t.stopPropagation(), ee()), (t.ctrlKey || t.metaKey) && t.key.toLowerCase() === "a" && !t.target.matches("textarea,input:not([type=\"checkbox\"]):not([type=\"radio\"])") && (t.preventDefault(), t.stopPropagation(), u().forEach((e) => a.selected.add(e.dataset.reviewKey)), M()));
++ a.busy || !e.contains(i) || (t.key === "Escape" && a.selected.size && (t.preventDefault(), t.stopPropagation(), A()), (t.ctrlKey || t.metaKey) && t.key.toLowerCase() === "a" && !t.target.matches("textarea,input:not([type=\"checkbox\"]):not([type=\"radio\"])") && (t.preventDefault(), t.stopPropagation(), u().forEach((e) => a.selected.add(e.dataset.reviewKey)), N()));
});
- let D = "";
- 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 = Cn(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);
- let j = "";
- function M() {
++ let M = "";
++ function N() {
+ let e = f();
+ C.textContent = e.length === u().length ? "清空当前选择" : a.filter ? "全选当前分类" : "全选本页", E.innerHTML = t(`已选 ${e.length} 项`), w.disabled = !e.length || e.some((e) => !h(e)), T.disabled = !e.length;
- let n = On(m());
++ let n = kn(m());
+ D.hidden = !r.metadata || !m().some((e) => (e.candidates?.length || 0) > 1);
+ let i = e.length && !n.length ? "所选项目无共同来源" : "统一选择来源", o = JSON.stringify([i, n]);
- if (o !== j) {
- j = o, D.innerHTML = l([["", i], ...n.map((e) => [e, e])], "", { label: "统一选择来源" });
++ if (o !== M) {
++ M = o, D.innerHTML = l([["", i], ...n.map((e) => [e, e])], "", { label: "统一选择来源" });
+ let e = p(D.firstElementChild);
e.disabled = !n.length, e.addEventListener("change", () => {
- if (!(a.busy || !Cn(u()).includes(e.value))) {
- for (let t of c()) {
- if (!(a.busy || !On(m()).includes(e.value))) {
++ if (!(a.busy || !kn(m()).includes(e.value))) {
+ for (let t of f()) {
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) => {
e.checked = e.value === n.candidate_key;
@@@ -2607,11 -2664,11 +2682,11 @@@
}
});
}
- E.forEach((e) => e());
- A.forEach((e) => e());
++ j.forEach((e) => e());
}
- async function k(t, n) {
- if (a.busy || !c().length) return;
- let i = c().map((e) => ({
- async function N(t, n) {
++ async function ee(t, n) {
+ if (a.busy || !f().length) return;
+ let i = f().map((e) => ({
key: e.dataset.reviewKey,
payload: {
...r.payload(e),
@@@ -2619,17 -2676,17 +2694,17 @@@
}
}));
if (t === "approved" && r.metadata && i.some((e) => !e.payload.candidate_key)) {
- C.textContent = "请先为所选的多来源候选选择来源。", c().find((e) => !e.querySelector("input[type=\"radio\"]:checked"))?.querySelector("input[type=\"radio\"]")?.focus();
+ O.textContent = "请先为所选的多来源候选选择来源。", f().find((e) => !e.querySelector("input[type=\"radio\"]:checked"))?.querySelector("input[type=\"radio\"]")?.focus();
return;
}
- a.busy = !0, C.textContent = `正在处理 0 / ${i.length}`, d(n, !0);
+ a.busy = !0, O.textContent = `正在处理 0 / ${i.length}`, d(n, !0);
let o = [...e.querySelectorAll("button,input")], s = o.map((e) => e.getAttribute("aria-disabled"));
o.forEach((e) => e.setAttribute("aria-disabled", "true"));
- let l = (e) => {
+ let c = (e) => {
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 Sn(i, async (e) => {
+ e.addEventListener("click", c, !0), e.addEventListener("keydown", c, !0);
- let l = 0, u = await Dn(i, async (e) => {
++ let l = 0, u = await On(i, async (e) => {
try {
return await r.submit(e);
} finally {
@@@ -2646,14 -2703,14 +2721,14 @@@
let p = e.parentElement;
r.refresh(), p?.querySelector(".reviewbulktoolbar button")?.focus({ preventScroll: !0 });
}
- O();
- M();
++ N();
}
//#endregion
//#region src/native-image.ts
- function Tn(e, t, n, r) {
-function An(e, t, n, r) {
++function jn(e, t, n, r) {
return e > 0 && t > 0 && e === n && t === r;
}
- function En(e, t, n, r, i = 1) {
-function jn(e, t, n, r, i = 1) {
++function Mn(e, t, n, r, i = 1) {
let a = Number.isFinite(i) && i > 0 ? i : 1;
e /= a, t /= a;
let o = [
@@@ -2670,7 -2727,7 +2745,7 @@@
}
//#endregion
//#region src/entity-skeleton.ts
- function Dn(e, t) {
-function Mn(e, t) {
++function Nn(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>
@@@ -2682,7 -2739,7 +2757,7 @@@
}
//#endregion
//#region src/catalog-onboarding.ts
- var On = [
-var Nn = [
++var Pn = [
"loc",
"creator",
"performer",
@@@ -2699,16 -2756,16 +2774,16 @@@
"jav",
"thumb"
];
- function kn() {
-function Pn() {
++function Fn() {
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\">&nbsp;</span></span>") + "</div><div class=\"tier catalog-placeholder\" aria-hidden=\"true\">" + e("<span class=\"brandpill\"><span class=\"mk\"></span><span class=\"placeholder-name\">&nbsp;</span></span>") + "</div>",
tags: "<span class=\"catalog-placeholder placeholder-tags\" aria-hidden=\"true\">" + e("<span class=\"pill\">&nbsp;</span>") + "</span>"
};
}
- async function An(e, t) {
-async function Fn(e, t) {
++async function In(e, t) {
let n = new URLSearchParams();
- for (let t of On) e[t] && n.set(t, e[t]);
- for (let t of Nn) e[t] && n.set(t, e[t]);
++ for (let t of Pn) 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 || [],
@@@ -2719,7 -2776,7 +2794,7 @@@
return r.set("q", e), r.set("limit", "1"), (await t("/api/items?" + r)).total > 0 ? e : "";
}))).filter(Boolean);
}
- function jn({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: r = !1, online: a = !1 } = {}) {
-function In({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: r = !1, online: a = !1 } = {}) {
++function Ln({ 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: "标签",
@@@ -2732,7 -2789,7 +2807,7 @@@
}
//#endregion
//#region src/sidebar.ts
- function Mn(e) {
-function Ln(e) {
++function Rn(e) {
return [
"/",
"/unseen",
@@@ -2742,23 -2799,23 +2817,23 @@@
"/junk-files"
].includes(e) || /^\/(item|mix|parts|editions)\//.test(e) || /^\/playlists\/\d+\/\d+$/.test(e) || /^\/(performers|studios|creators|series|agencies)\/.+/.test(e);
}
- function Nn(e, t) {
-function Rn(e, t) {
++function zn(e, t) {
return e.dataset.surface === t && e.querySelector(".dnav") ? !1 : (e.dataset.surface = t, e.replaceChildren(), !0);
}
- function Pn(e) {
-function zn(e) {
++function Bn(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 Fn(e) {
-function Bn(e) {
++function Vn(e) {
return e.filter((e) => ["115", "pikpak"].includes(e.location) && (e.roots === void 0 || e.roots.length > 0)).map((e) => e.location);
}
- function In(e, t) {
-function Vn(e, t) {
++function Hn(e, t) {
return t.filter((t) => e.some((e) => e.location === t));
}
- function Ln() {
-function Hn() {
++function Un() {
return `<div class="cleanuppage" data-skeleton="cleanup" aria-busy="true" aria-label="正在读取数据管理状态">
<div class="cleanupgrid">${[
[
@@@ -2804,7 -2861,7 +2879,7 @@@
<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 Rn(e, t = !1, n = !1) {
-function Un(e, t = !1, n = !1) {
++function Wn(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" : ""}>
@@@ -2818,70 -2875,70 +2893,70 @@@
<button type="button" class="geist-button taste-guide-skip">跳过</button>
</div></details>`;
}
- var zn = "peach-taste-guide-dismissed";
- function Bn(e, t) {
-var Wn = "peach-taste-guide-dismissed";
-function Gn(e, t) {
++var Gn = "peach-taste-guide-dismissed";
++function Kn(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(zn, "1"), n.remove();
- t.setItem(Wn, "1"), n.remove();
++ t.setItem(Gn, "1"), n.remove();
});
}
//#endregion
//#region src/jav-artwork.ts
- function Vn(e) {
-function Kn(e) {
++function qn(e) {
return [
"small",
"sleeve",
"preview"
].includes(String(e)) ? "small" : "big";
}
- function Hn(e) {
-function qn(e) {
++function Jn(e) {
return {
- javLayout: Vn(e.javLayout),
- javImage: Un(e.javLayout === "preview" ? "thumbnail" : e.javImage)
- javLayout: Kn(e.javLayout),
- javImage: Jn(e.javLayout === "preview" ? "thumbnail" : e.javImage)
++ javLayout: qn(e.javLayout),
++ javImage: Yn(e.javLayout === "preview" ? "thumbnail" : e.javImage)
};
}
- function Un(e) {
-function Jn(e) {
++function Yn(e) {
return e === "thumbnail" ? "thumbnail" : "cover";
}
- function Wn(e, t) {
- return e.is_jav && e.code && e.has_cover && (Un(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";
-function Yn(e, t) {
- return e.is_jav && e.code && e.has_cover && (Jn(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";
-}
+ function Xn(e, t) {
++ return e.is_jav && e.code && e.has_cover && (Yn(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";
+}
- function Gn(e, t) {
++function Zn(e, t) {
e.querySelectorAll("img[data-jav-image]").forEach((e) => {
- let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (Un(t) === "cover" || !r)), a = i ? n : r;
- let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (Jn(t) === "cover" || !r)), a = i ? n : r;
++ let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (Yn(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 Kn = {
-var Zn = {
++var Qn = {
"library-processing": {
-- load: mn,
-- component: hn
++ load: hn,
++ component: gn
},
scraping: {
-- load: un,
-- component: pn
++ load: dn,
++ component: mn
},
"quality-goals": {
-- load: an,
-- component: sn
++ load: on,
++ component: cn
},
configuration: {
- load: mt,
- component: bt
- load: dt,
- component: _t
++ load: ft,
++ component: yt
}
- }, qn = () => Object.keys(Kn), Jn = /* @__PURE__ */ new Map();
- async function Yn(e, t, n, r = {}) {
- let i = Kn[e];
-}, Qn = () => Object.keys(Zn), $n = /* @__PURE__ */ new Map();
-async function er(e, t, n, r = {}) {
- let i = Zn[e];
++}, $n = () => Object.keys(Qn), er = /* @__PURE__ */ new Map();
++async function tr(e, t, n, r = {}) {
++ let i = Qn[e];
if (!i) throw Error(`未注册的 island:${String(e)}`);
- Xn(t);
- tr(t);
++ nr(t);
let a = {
controller: new AbortController(),
painted: !1
};
- Jn.set(t, a);
- $n.set(t, a);
++ er.set(t, a);
let o;
try {
o = {
@@@ -2892,12 -2949,12 +2967,12 @@@
if (a.controller.signal.aborted) return;
o = {
data: null,
- error: P(e)
+ error: L(e)
};
}
- if (Jn.get(t) !== a) return;
- if ($n.get(t) !== a) return;
++ if (er.get(t) !== a) return;
if (r.isCurrent && !r.isCurrent()) {
- Jn.delete(t);
- $n.delete(t);
++ er.delete(t);
return;
}
t.textContent = "", a.painted = !0;
@@@ -2905,11 -2962,11 +2980,11 @@@
...n,
...o
};
- Ae(ce(i.component, s), t);
- De(ae(i.component, s), t);
++ Oe(oe(i.component, s), t);
}
- function Xn(e) {
- let t = Jn.get(e);
- t && (t.controller.abort(), Jn.delete(e), t.painted && Ae(null, e));
-function tr(e) {
- let t = $n.get(e);
- t && (t.controller.abort(), $n.delete(e), t.painted && De(null, e));
++function nr(e) {
++ let t = er.get(e);
++ t && (t.controller.abort(), er.delete(e), t.painted && Oe(null, e));
}
//#endregion
- export { zn as TASTE_GUIDE_KEY, jn as catalogEmptyHtml, An as catalogSuggestions, Ln as cleanupSkeletonHtml, Fn as cloudLocations, In as cloudPreferenceLocations, yn as createReviewSelection, kn as emptyCatalogLayout, Dn as entitySkeletonHtml, ln as followJobProgress, qn as islandNames, Wn as javImageKind, Tn as matchesFaceSource, Yn as mountIsland, En as nativeImageFit, Un as normalizeJavImage, Vn as normalizeJavLayout, Hn as normalizeJavPreferences, je as preferredDirection, vn as refreshStore, Mn as sidebarHasCatalogContent, Pn as sidebarTagCounts, _n as storeNames, Gn as syncJavImages, Nn as syncSidebarSurface, Rn as tasteHistoryGuideHtml, Xn as unmountIsland, cn as watchJob, wn as wireReviewSelection, Bn as wireTasteHistoryGuide };
-export { Wn as TASTE_GUIDE_KEY, In as catalogEmptyHtml, Fn as catalogSuggestions, Hn as cleanupSkeletonHtml, Bn as cloudLocations, Vn as cloudPreferenceLocations, Cn as createReviewSelection, Pn as emptyCatalogLayout, Mn as entitySkeletonHtml, ln as followJobProgress, xn as identityEvidenceHtml, Qn as islandNames, Yn as javImageKind, An as matchesFaceSource, er as mountIsland, jn as nativeImageFit, Jn as normalizeJavImage, Kn as normalizeJavLayout, qn as normalizeJavPreferences, Oe as preferredDirection, vn as refreshStore, bn as reviewImageHtml, Ln as sidebarHasCatalogContent, zn as sidebarTagCounts, _n as storeNames, Xn as syncJavImages, Rn as syncSidebarSurface, Un as tasteHistoryGuideHtml, tr as unmountIsland, cn as watchJob, Sn as wireReviewPictures, kn as wireReviewSelection, Gn as wireTasteHistoryGuide };
++export { Gn as TASTE_GUIDE_KEY, Ln as catalogEmptyHtml, In as catalogSuggestions, Un as cleanupSkeletonHtml, Vn as cloudLocations, Hn as cloudPreferenceLocations, wn as createReviewSelection, Fn as emptyCatalogLayout, Nn as entitySkeletonHtml, un as followJobProgress, Sn as identityEvidenceHtml, $n as islandNames, Xn as javImageKind, jn as matchesFaceSource, tr as mountIsland, Mn as nativeImageFit, Yn as normalizeJavImage, qn as normalizeJavLayout, Jn as normalizeJavPreferences, ke as preferredDirection, yn as refreshStore, xn as reviewImageHtml, Rn as sidebarHasCatalogContent, Bn as sidebarTagCounts, vn as storeNames, Zn as syncJavImages, zn as syncSidebarSurface, Wn as tasteHistoryGuideHtml, nr as unmountIsland, ln as watchJob, Cn as wireReviewPictures, An as wireReviewSelection, Kn as wireTasteHistoryGuide };