dsh-life-pack 0.3.80 → 0.3.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.js CHANGED
@@ -471,7 +471,7 @@ window.__ModuleLoader__.load({
471
471
  path: "/api/ilife-manager"
472
472
  };
473
473
  //#endregion
474
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/shared/config.js
474
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/shared/config.js
475
475
  const DEFAULT_PANEL_POLL_MS = 1e3;
476
476
  function assertPrefix(value, role) {
477
477
  if (typeof value !== "string" || value.length === 0) throw new Error("[dsh-plugin-update] " + role + " 非法:须为非空字符串(收到 " + JSON.stringify(value) + ")");
@@ -493,7 +493,7 @@ window.__ModuleLoader__.load({
493
493
  return buildPhoneNames(prefix).logAppend;
494
494
  }
495
495
  //#endregion
496
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/shared/codes.js
496
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/shared/codes.js
497
497
  const BLOCKED_REASONS = [
498
498
  "unknown-profile",
499
499
  "channel-mismatch",
@@ -530,7 +530,7 @@ window.__ModuleLoader__.load({
530
530
  return typeof code === "string" && isOneOf(CHECK_SIDE_FAILURE_CODES, code.trim());
531
531
  }
532
532
  //#endregion
533
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/shared/lang.js
533
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/shared/lang.js
534
534
  function normalizeLangTag(tag) {
535
535
  if (typeof tag !== "string") return "zh";
536
536
  const s = tag.trim().toLowerCase().replace(/_/g, "-");
@@ -672,7 +672,7 @@ window.__ModuleLoader__.load({
672
672
  };
673
673
  }
674
674
  //#endregion
675
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/core/i18n/dictionary.js
675
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/core/i18n/dictionary.js
676
676
  const BILINGUAL_STRINGS = {
677
677
  "entry.label.idle": {
678
678
  en: "Check for updates",
@@ -2069,6 +2069,11 @@ window.__ModuleLoader__.load({
2069
2069
  zh: "已继续上次未完成的更新(剩余 {count} 个)。",
2070
2070
  draft: true
2071
2071
  },
2072
+ "batch.notice.resume-stale": {
2073
+ en: "The last update was left unfinished. Click \"Continue the unfinished batch\" to resume.",
2074
+ zh: "上次更新未完成,点「继续上次未完成的更新」继续。",
2075
+ draft: true
2076
+ },
2072
2077
  "batch.notice.no-resume": {
2073
2078
  en: "Nothing to continue.",
2074
2079
  zh: "暂无可继续的内容。",
@@ -2741,7 +2746,7 @@ window.__ModuleLoader__.load({
2741
2746
  }
2742
2747
  };
2743
2748
  //#endregion
2744
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/core/i18n/text.js
2749
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/core/i18n/text.js
2745
2750
  function escapeHtml$4(value) {
2746
2751
  return String(value ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
2747
2752
  }
@@ -2770,7 +2775,7 @@ window.__ModuleLoader__.load({
2770
2775
  return "<span class=\"dsh-upd-bi\"><span lang=\"" + l + "\">" + text + "</span></span>";
2771
2776
  }
2772
2777
  //#endregion
2773
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/core/cause.js
2778
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/core/cause.js
2774
2779
  const CAUSE_KINDS = ["minimum-release-age"];
2775
2780
  const CAUSE_SIGNATURES = [{
2776
2781
  kind: "minimum-release-age",
@@ -2890,7 +2895,7 @@ window.__ModuleLoader__.load({
2890
2895
  }
2891
2896
  }
2892
2897
  //#endregion
2893
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/shared/redaction.js
2898
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/shared/redaction.js
2894
2899
  const COPY_BUDGET_CHARS = 1500;
2895
2900
  const REDACTED_PATH = "<路径>";
2896
2901
  const REDACTED_SECRET = "<脱敏>";
@@ -2970,7 +2975,7 @@ window.__ModuleLoader__.load({
2970
2975
  return userinfo.masked ? truncateWithMaskNote(scrubbed, COPY_BUDGET_CHARS) : truncateForCopy(scrubbed);
2971
2976
  }
2972
2977
  //#endregion
2973
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/shared/copy.js
2978
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/shared/copy.js
2974
2979
  const BLOCKED_KEYS = {
2975
2980
  "unknown-profile": {
2976
2981
  title: "panel.blocked.unknown-profile.title",
@@ -3388,7 +3393,7 @@ window.__ModuleLoader__.load({
3388
3393
  return blockLines.join("\n");
3389
3394
  }
3390
3395
  //#endregion
3391
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/panel/theme.js
3396
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/panel/theme.js
3392
3397
  function normalizePanelTheme(value) {
3393
3398
  return value === "archive" ? "archive" : "default";
3394
3399
  }
@@ -3500,7 +3505,7 @@ window.__ModuleLoader__.load({
3500
3505
  return parts.join(";");
3501
3506
  }
3502
3507
  //#endregion
3503
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/core/judgment.js
3508
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/core/judgment.js
3504
3509
  function updateError(code) {
3505
3510
  return Object.assign(new Error(code), { code });
3506
3511
  }
@@ -3587,7 +3592,7 @@ window.__ModuleLoader__.load({
3587
3592
  return 0;
3588
3593
  }
3589
3594
  //#endregion
3590
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/shared/hash.js
3595
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/shared/hash.js
3591
3596
  function hash8(value) {
3592
3597
  try {
3593
3598
  const text = String(value ?? "");
@@ -3600,7 +3605,7 @@ window.__ModuleLoader__.load({
3600
3605
  }
3601
3606
  [...CORE_ERROR_CODES];
3602
3607
  //#endregion
3603
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/panel/skip-store.js
3608
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/panel/skip-store.js
3604
3609
  const PANEL_SKIPPED_MAX = 50;
3605
3610
  function panelSkipKey(pluginId) {
3606
3611
  return `dsh-upd-skipped/${String(pluginId)}`;
@@ -3703,7 +3708,7 @@ window.__ModuleLoader__.load({
3703
3708
  };
3704
3709
  }
3705
3710
  //#endregion
3706
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/panel/view-model.js
3711
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/panel/view-model.js
3707
3712
  const SEAL_KEYS = {
3708
3713
  loading: {
3709
3714
  text: "panel.seal.loading.text",
@@ -3853,7 +3858,8 @@ window.__ModuleLoader__.load({
3853
3858
  staleFailure = false;
3854
3859
  }
3855
3860
  const gated = !(typeof errorKind === "string" && errorKind.trim()) && !lastError ? checkPrejudgeOfView(input.checkPrejudge, snapshot) : null;
3856
- if (!staleFailure && !gated && (failedCode || jobState === "failed" || jobState === "interrupted")) {
3861
+ const historicalJobFailure = !(typeof errorKind === "string" && errorKind.trim() || lastError) && snapshot.installed === false && (jobState === "failed" || jobState === "interrupted");
3862
+ if (!staleFailure && !gated && !historicalJobFailure && (failedCode || jobState === "failed" || jobState === "interrupted")) {
3857
3863
  const code = failedCode || "install-failed";
3858
3864
  const copy = failureCopy(code, l);
3859
3865
  const checkDetail = copy?.zh ?? code;
@@ -4016,7 +4022,7 @@ window.__ModuleLoader__.load({
4016
4022
  }
4017
4023
  }
4018
4024
  //#endregion
4019
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/core/changelog/parse.js
4025
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/core/changelog/parse.js
4020
4026
  const CHANGELOG_MAX_CHARS = 65536;
4021
4027
  const CHANGELOG_ALL_CATEGORIES = [
4022
4028
  "Added",
@@ -4616,7 +4622,7 @@ window.__ModuleLoader__.load({
4616
4622
  return String(text ?? "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
4617
4623
  }
4618
4624
  //#endregion
4619
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/core/changelog/render-model.js
4625
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/core/changelog/render-model.js
4620
4626
  const MD_URL_MAX = 2048;
4621
4627
  const MD_MAX_DEPTH = 2;
4622
4628
  function isHttpUrl(u) {
@@ -5137,7 +5143,7 @@ ${note}${blocks.join("\n")}
5137
5143
  }
5138
5144
  }
5139
5145
  //#endregion
5140
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/shared/last-resort.js
5146
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/shared/last-resort.js
5141
5147
  const STAGES = [
5142
5148
  "install",
5143
5149
  "check",
@@ -5237,12 +5243,12 @@ ${note}${blocks.join("\n")}
5237
5243
  return verdict("unknown");
5238
5244
  }
5239
5245
  //#endregion
5240
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/shared/log-events.js
5246
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/shared/log-events.js
5241
5247
  const LOG_EVENT_CALL = "host.call";
5242
5248
  const LOG_EVENT_CALL_FAIL = "host.call.fail";
5243
5249
  const LOG_EVENT_INSTALL_EXEC = "update.install.exec";
5244
5250
  //#endregion
5245
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/shared/commands.js
5251
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/shared/commands.js
5246
5252
  const MANUAL_SUPPRESSING_REASONS = [
5247
5253
  "source-install",
5248
5254
  "unknown-profile",
@@ -5252,7 +5258,7 @@ ${note}${blocks.join("\n")}
5252
5258
  return reason !== null && reason !== void 0 && MANUAL_SUPPRESSING_REASONS.includes(reason);
5253
5259
  }
5254
5260
  //#endregion
5255
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/shared/manual-absent.js
5261
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/shared/manual-absent.js
5256
5262
  const REASON_KEYS = {
5257
5263
  "unknown-profile": "panel.manual.absent.unknown-profile",
5258
5264
  "source-install": "panel.manual.absent.source-install",
@@ -5288,7 +5294,7 @@ ${note}${blocks.join("\n")}
5288
5294
  return manualAbsentReasonTextOf(null, lang) + joiner + manualAbsentReasonTextOf(reason, lang);
5289
5295
  }
5290
5296
  //#endregion
5291
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/panel/archive-theme.js
5297
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/panel/archive-theme.js
5292
5298
  const UPDATE_PANEL_ARCHIVE_CSS = [
5293
5299
  "/* Archive 档案卷可选主题:只换颜色/字体/间距;内核 DOM 顺序一字不动,不断复制诊断。 */",
5294
5300
  ".dsh-upd[data-theme=\"archive\"]{--dsh-update-bg-soft:#f7f3ea;--dsh-update-bg:#fffdf6;--dsh-update-text:#1a1a1a;--dsh-update-text-muted:#6f675a;",
@@ -5427,7 +5433,7 @@ ${note}${blocks.join("\n")}
5427
5433
  "@media (prefers-reduced-motion: reduce){.dsh-upd[data-theme=\"archive\"] *{transition:none !important;animation:none !important}}"
5428
5434
  ].join("\n");
5429
5435
  //#endregion
5430
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/panel/failure-latch.js
5436
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/panel/failure-latch.js
5431
5437
  function formatLatchTime(atMs, lang) {
5432
5438
  if (typeof atMs !== "number" || !Number.isFinite(atMs) || atMs <= 0) return null;
5433
5439
  const raw = typeof lang === "string" ? lang.trim().replace(/_/g, "-") : "";
@@ -5444,7 +5450,7 @@ ${note}${blocks.join("\n")}
5444
5450
  return null;
5445
5451
  }
5446
5452
  //#endregion
5447
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/panel/render.js
5453
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/panel/render.js
5448
5454
  const UPDATE_PANEL_CSS = [
5449
5455
  ".dsh-upd{font:var(--dsh-update-panel-font-size,14px)/1.75 system-ui,\"Microsoft YaHei\",sans-serif;color:var(--dsh-update-text,#1f2937);",
5450
5456
  "background:var(--dsh-update-bg,#ffffff);border:1px solid var(--dsh-update-border,#e5e7eb);border-radius:8px;padding:12px 14px;max-width:560px;",
@@ -6301,7 +6307,7 @@ ${body}`;
6301
6307
  };
6302
6308
  }
6303
6309
  //#endregion
6304
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/log/panel-client.js
6310
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/log/panel-client.js
6305
6311
  const RENDER_FAIL_DEDUPE_MS = 6e4;
6306
6312
  function createPanelClientLogShell(options) {
6307
6313
  const option = options.clientLog;
@@ -6521,10 +6527,10 @@ ${body}`;
6521
6527
  }
6522
6528
  }
6523
6529
  //#endregion
6524
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/core/i18n/styles.js
6530
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/core/i18n/styles.js
6525
6531
  const BILINGUAL_CSS = [".dsh-upd-bi{display:inline;overflow-wrap:anywhere}", ".dsh-upd-bi [lang]{overflow-wrap:anywhere}"].join("\n");
6526
6532
  //#endregion
6527
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/panel/entry.js
6533
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/panel/entry.js
6528
6534
  const UPDATE_ENTRY_CSS = [
6529
6535
  ".dsh-upd-entry{display:inline-flex;align-items:center;gap:8px;font:13px/1.6 var(--dsh-update-font-sans,system-ui,\"Microsoft YaHei\",sans-serif);font-size:var(--dsh-update-entry-font-size,13px);color:var(--dsh-update-text,#1f2937)}",
6530
6536
  ".dsh-upd-entry-btn{font:inherit;border:1px solid var(--dsh-update-border,#d1d5db);border-radius:var(--dsh-update-entry-border-radius,6px);",
@@ -6559,7 +6565,7 @@ ${body}`;
6559
6565
  ".dsh-upd-entry-btn{--dsh-update-button-bg:#1f2937;--dsh-update-border:#374151}}"
6560
6566
  ].join("\n");
6561
6567
  //#endregion
6562
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/panel/batch/helpers.js
6568
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/panel/batch/helpers.js
6563
6569
  const BATCH_PANEL_POLL = {
6564
6570
  defaultMs: 1500,
6565
6571
  minMs: 250
@@ -6745,7 +6751,7 @@ ${body}`;
6745
6751
  };
6746
6752
  }
6747
6753
  //#endregion
6748
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/panel/batch/ledger.js
6754
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/panel/batch/ledger.js
6749
6755
  function noteRestart(counts, row) {
6750
6756
  if (restartUnregistered(row)) counts.restartUnregistered += 1;
6751
6757
  else counts.restart += 1;
@@ -6992,9 +6998,11 @@ ${body}`;
6992
6998
  return null;
6993
6999
  }
6994
7000
  //#endregion
6995
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/panel/batch/styles.js
7001
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/panel/batch/styles.js
6996
7002
  const UPDATE_BATCH_PANEL_CSS = [
6997
7003
  "/* 批量面板(#25):类名沿用 dsh-upd-* 前缀;默认(最小)主题,Archive 皮肤见 UPDATE_BATCH_PANEL_ARCHIVE_CSS。 */",
7004
+ ".dsh-upd-overlay .dsh-upd.dsh-upd-batch{overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}",
7005
+ ".dsh-upd-overlay .dsh-upd.dsh-upd-batch>*{flex:none}",
6998
7006
  ".dsh-upd-batch-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap}",
6999
7007
  ".dsh-upd-batch-title{font-weight:700;font-size:var(--dsh-update-panel-chapter-font-size,15px);letter-spacing:.06em}",
7000
7008
  ".dsh-upd-batch-title i{font-style:normal;color:var(--dsh-update-primary,#2563eb)}",
@@ -7102,7 +7110,7 @@ ${body}`;
7102
7110
  ".dsh-upd[data-theme=\"archive\"] .dsh-upd-banner>.dsh-upd-browline button:not([data-primary=\"1\"]):not([data-busy=\"1\"]){background:transparent}"
7103
7111
  ].join(String.fromCharCode(10));
7104
7112
  //#endregion
7105
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/panel/batch/render.js
7113
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/panel/batch/render.js
7106
7114
  function renderBatchPanelHTML(input) {
7107
7115
  const rows = Array.isArray(input.rows) ? input.rows : [];
7108
7116
  const theme = normalizePanelTheme(input.theme);
@@ -7558,7 +7566,8 @@ ${body}`;
7558
7566
  };
7559
7567
  }
7560
7568
  //#endregion
7561
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/panel/batch/mount.js
7569
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/panel/batch/mount.js
7570
+ const AUTO_RESUME_MAX_AGE_MS = 6e5;
7562
7571
  function singleInstallPhoneOf(row) {
7563
7572
  const phones = isObject$2(row.phoneNames) ? row.phoneNames : null;
7564
7573
  if (!phones) return null;
@@ -8819,6 +8828,12 @@ ${body}`;
8819
8828
  act(kind, key === null ? void 0 : key);
8820
8829
  } catch {}
8821
8830
  }
8831
+ function autoResumeAgeMsOf(value) {
8832
+ if (!isObject$2(value)) return null;
8833
+ const at = value["updatedAt"];
8834
+ if (typeof at !== "number" || !Number.isFinite(at) || at <= 0) return null;
8835
+ return Math.max(0, Date.now() - at);
8836
+ }
8822
8837
  async function autoOnce() {
8823
8838
  try {
8824
8839
  await runAutoOnce();
@@ -8833,6 +8848,13 @@ ${body}`;
8833
8848
  if (autoResumeOption && !autoResumeDone) {
8834
8849
  autoResumeDone = true;
8835
8850
  if (hasUnfinishedRows(rows, lastSession ?? void 0) && !inFlight && !refreshing) {
8851
+ const ageMs = autoResumeAgeMsOf(lastSession);
8852
+ if (ageMs !== null && ageMs > AUTO_RESUME_MAX_AGE_MS) {
8853
+ autoCheckOutcome = "recent";
8854
+ say(batchText("batch.notice.resume-stale", currentLang()));
8855
+ render();
8856
+ return;
8857
+ }
8836
8858
  const before = lastError;
8837
8859
  const latchBefore = failureLatch;
8838
8860
  try {
@@ -8946,7 +8968,8 @@ ${body}`;
8946
8968
  };
8947
8969
  }
8948
8970
  //#endregion
8949
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/panel/batch/entry-batch.js
8971
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/panel/batch/entry-batch.js
8972
+ const ENTRY_WATCH_MAX_MS = 6e5;
8950
8973
  function isObject$1(value) {
8951
8974
  return !!value && typeof value === "object" && !Array.isArray(value);
8952
8975
  }
@@ -9087,6 +9110,8 @@ ${body}`;
9087
9110
  let mounted = true;
9088
9111
  let panel = null;
9089
9112
  let panelMode = null;
9113
+ let watchTimer = null;
9114
+ let watchUntil = 0;
9090
9115
  const panelHost = {
9091
9116
  get innerHTML() {
9092
9117
  return container.innerHTML;
@@ -9139,6 +9164,36 @@ ${body}`;
9139
9164
  if (!mounted) return;
9140
9165
  if (panelMode !== null) return;
9141
9166
  container.innerHTML = entryHTML();
9167
+ scheduleBackgroundWatch();
9168
+ }
9169
+ function stopBackgroundWatch() {
9170
+ if (watchTimer !== null) {
9171
+ clearTimeout(watchTimer);
9172
+ watchTimer = null;
9173
+ }
9174
+ watchUntil = 0;
9175
+ }
9176
+ function scheduleBackgroundWatch() {
9177
+ if (!mounted || panelMode !== null) {
9178
+ stopBackgroundWatch();
9179
+ return;
9180
+ }
9181
+ if (!hasUnfinishedRows(rows ?? [], session ?? void 0)) {
9182
+ stopBackgroundWatch();
9183
+ return;
9184
+ }
9185
+ const now = Date.now();
9186
+ if (watchUntil === 0) watchUntil = now + ENTRY_WATCH_MAX_MS;
9187
+ if (now >= watchUntil) {
9188
+ stopBackgroundWatch();
9189
+ return;
9190
+ }
9191
+ if (watchTimer !== null) return;
9192
+ const base = pollMs === void 0 ? BATCH_PANEL_POLL.defaultMs : pollMs;
9193
+ watchTimer = setTimeout(() => {
9194
+ watchTimer = null;
9195
+ refresh();
9196
+ }, Math.max(250, Math.min(base, 5e3)));
9142
9197
  }
9143
9198
  function applyReply(reply) {
9144
9199
  if (!isObject$1(reply) || reply["ok"] !== true) {
@@ -9176,6 +9231,7 @@ ${body}`;
9176
9231
  }
9177
9232
  function mountPanel(mode) {
9178
9233
  if (!mounted || panelMode !== null) return;
9234
+ stopBackgroundWatch();
9179
9235
  panel = mountUpdateBatchPanel(panelHost, {
9180
9236
  prefix: options.prefix,
9181
9237
  mode,
@@ -9286,6 +9342,7 @@ ${body}`;
9286
9342
  function unmount() {
9287
9343
  if (!mounted) return;
9288
9344
  mounted = false;
9345
+ stopBackgroundWatch();
9289
9346
  try {
9290
9347
  unsubLang();
9291
9348
  } catch {}
@@ -9326,7 +9383,7 @@ ${body}`;
9326
9383
  };
9327
9384
  }
9328
9385
  //#endregion
9329
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/core/install-button/styles.js
9386
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/core/install-button/styles.js
9330
9387
  const INSTALL_BUTTON_CSS = [
9331
9388
  ".dsh-upd-ib{display:flex;flex-direction:column;gap:8px;font:inherit}",
9332
9389
  ".dsh-upd-ib-status{font-weight:600;overflow-wrap:anywhere}",
@@ -9350,7 +9407,7 @@ ${body}`;
9350
9407
  ".dsh-upd-ib[data-theme=\"archive\"] .dsh-upd-ib-status{font-family:serif}"
9351
9408
  ].join("\n");
9352
9409
  //#endregion
9353
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/core/install-button/widgets.js
9410
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/core/install-button/widgets.js
9354
9411
  function isObject(value) {
9355
9412
  return typeof value === "object" && value !== null && !Array.isArray(value);
9356
9413
  }
@@ -9419,7 +9476,7 @@ ${body}`;
9419
9476
  } catch {}
9420
9477
  }
9421
9478
  //#endregion
9422
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/core/install-button/view.js
9479
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/core/install-button/view.js
9423
9480
  function installButtonFallbackOf(input, bannerKind) {
9424
9481
  try {
9425
9482
  if (bannerKind !== "failed") return null;
@@ -9550,7 +9607,7 @@ ${body}`;
9550
9607
  };
9551
9608
  }
9552
9609
  //#endregion
9553
- //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.35/node_modules/dsh-plugin-update/dist/core/install-button/render.js
9610
+ //#region ../../node_modules/.pnpm/dsh-plugin-update@0.18.37/node_modules/dsh-plugin-update/dist/core/install-button/render.js
9554
9611
  function renderInstallButtonHTML(view, opts) {
9555
9612
  const l = opts.lang;
9556
9613
  const manualSource = opts.manualSource === "carried-over" ? "carried-over" : opts.manualSource === null ? null : "frame";
@@ -13405,7 +13462,7 @@ ${body}`;
13405
13462
  }, react.createElement("span", { style: S.morePkg }, row.pkg), react.createElement("span", { style: S.moreDesc }, row.desc), react.createElement("span", { style: S.moreIcon }, react.createElement(ExternalIcon, null)))));
13406
13463
  }
13407
13464
  /** 版本胶囊那一行字:只在这里拼一次,屏上与用例读的是同一串。 */
13408
- const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.80";
13465
+ const MANAGER_VERSION_TEXT = "dsh-life-pack · 0.3.82";
13409
13466
  /** 右下角那本书离面板两沿的距离:用户口径「一直处于面板右下角、不随列表滑动消失」
13410
13467
  * ⇒ sticky 吸附(面板相对,视口多大都落在面板角上);INSET=右沿,BOTTOM=底沿。 */
13411
13468
  const MANUAL_ENTRY_INSET = 16;