dsh-lowtide 0.2.3 → 0.2.6

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/lib/client.js CHANGED
@@ -297,6 +297,12 @@ window.__ModuleLoader__.load({
297
297
  "settings.batchTitle": "闲时运行窗口",
298
298
  "settings.start": "开始",
299
299
  "settings.end": "结束",
300
+ "settings.batchWindowList": "运行时段(可添加多个)",
301
+ "settings.addBatchWindow": "+ 添加窗口",
302
+ "settings.batchWindowsHint": "每个窗口每天各自动开跑一批;例如中午一段、晚上一段。",
303
+ "settings.batchWindowOverlap": "提示:有窗口时间重叠,重叠时段内已跑过的任务不会重复执行。",
304
+ "settings.batchWindowInvalid": "运行窗口时间不完整或格式不对",
305
+ "settings.batchWindowMin": "至少保留一个运行窗口",
300
306
  "settings.tz": "时区(留空=你的本地时间)",
301
307
  "settings.gateLeadMin": "提前提醒(分钟)",
302
308
  "settings.maxTasksPerNight": "每批任务上限",
@@ -625,6 +631,12 @@ window.__ModuleLoader__.load({
625
631
  "settings.batchTitle": "Off-peak run window",
626
632
  "settings.start": "Start",
627
633
  "settings.end": "End",
634
+ "settings.batchWindowList": "Run windows (add as many as needed)",
635
+ "settings.addBatchWindow": "+ Add window",
636
+ "settings.batchWindowsHint": "Each window runs one batch per day — e.g. a noon slot and an evening slot.",
637
+ "settings.batchWindowOverlap": "Note: some windows overlap; tasks already run inside the overlap are not re-run.",
638
+ "settings.batchWindowInvalid": "A run window time is missing or invalid",
639
+ "settings.batchWindowMin": "At least one run window is required",
628
640
  "settings.tz": "Timezone (empty = your local time)",
629
641
  "settings.gateLeadMin": "Lead time (min)",
630
642
  "settings.maxTasksPerNight": "Max tasks per batch",
@@ -691,11 +703,11 @@ window.__ModuleLoader__.load({
691
703
  document.head.appendChild(tag);
692
704
  }
693
705
  var atoms_module_css_default = {
694
- "modelBadgeUnknown": "grgw_q_modelBadgeUnknown",
695
- "modelBadge": "grgw_q_modelBadge",
706
+ "countdown": "grgw_q_countdown",
696
707
  "money": "grgw_q_money",
697
- "modelBadgeQ": "grgw_q_modelBadgeQ",
698
- "countdown": "grgw_q_countdown"
708
+ "modelBadge": "grgw_q_modelBadge",
709
+ "modelBadgeUnknown": "grgw_q_modelBadgeUnknown",
710
+ "modelBadgeQ": "grgw_q_modelBadgeQ"
699
711
  };
700
712
  //#endregion
701
713
  //#region client/components/atoms.tsx
@@ -1431,7 +1443,7 @@ window.__ModuleLoader__.load({
1431
1443
  function systemTimeZone() {
1432
1444
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
1433
1445
  }
1434
- function minutesOf$1(hhmm) {
1446
+ function minutesOf$2(hhmm) {
1435
1447
  const match = /^(\d{1,2}):(\d{2})$/.exec(hhmm);
1436
1448
  if (match === null) throw new Error(`invalid HH:MM time "${hhmm}"`);
1437
1449
  const h = Number(match[1]);
@@ -1506,7 +1518,7 @@ window.__ModuleLoader__.load({
1506
1518
  for (const window of windows) {
1507
1519
  const { minutes, weekday } = localParts(when, window.tz ?? defaultTz);
1508
1520
  if (!matchesDays(window.days, weekday)) continue;
1509
- if (inRange(minutes, minutesOf$1(window.start), minutesOf$1(window.end))) return {
1521
+ if (inRange(minutes, minutesOf$2(window.start), minutesOf$2(window.end))) return {
1510
1522
  level: window.level,
1511
1523
  multiplier: window.multiplier ?? DEFAULT_MULTIPLIER[window.level],
1512
1524
  window
@@ -1534,8 +1546,8 @@ window.__ModuleLoader__.load({
1534
1546
  const probe = addDaysInTz(when, tz, day);
1535
1547
  const { minutes, weekday } = localParts(probe, tz);
1536
1548
  if (!matchesDays(window.days, weekday)) continue;
1537
- const start = minutesOf$1(window.start);
1538
- const end = minutesOf$1(window.end);
1549
+ const start = minutesOf$2(window.start);
1550
+ const end = minutesOf$2(window.end);
1539
1551
  const boundaries = end === start ? [start] : [start, end];
1540
1552
  for (const boundary of boundaries) {
1541
1553
  const candidate = new Date(probe.getTime() + (boundary - minutes) * 6e4);
@@ -2168,19 +2180,19 @@ window.__ModuleLoader__.load({
2168
2180
  document.head.appendChild(tag);
2169
2181
  }
2170
2182
  var PriceBand_module_css_default = {
2171
- "bandWrap": "EUchIG_bandWrap",
2172
- "band": "EUchIG_band",
2173
- "bandCell": "EUchIG_bandCell",
2174
2183
  "bandOff": "EUchIG_bandOff",
2184
+ "bandCustom": "EUchIG_bandCustom",
2175
2185
  "bandNow": "EUchIG_bandNow",
2186
+ "bandCell": "EUchIG_bandCell",
2176
2187
  "bandPeak": "EUchIG_bandPeak",
2177
2188
  "bandAxis": "EUchIG_bandAxis",
2178
- "bandCustom": "EUchIG_bandCustom",
2179
- "bandAxisLabel": "EUchIG_bandAxisLabel"
2189
+ "bandWrap": "EUchIG_bandWrap",
2190
+ "bandAxisLabel": "EUchIG_bandAxisLabel",
2191
+ "band": "EUchIG_band"
2180
2192
  };
2181
2193
  //#endregion
2182
2194
  //#region client/components/PriceBand.tsx
2183
- function minutesOf(hhmm) {
2195
+ function minutesOf$1(hhmm) {
2184
2196
  const match = /^(\d{1,2}):(\d{2})$/.exec(hhmm);
2185
2197
  if (match === null) return NaN;
2186
2198
  const h = Number(match[1]);
@@ -2194,8 +2206,8 @@ window.__ModuleLoader__.load({
2194
2206
  const start = i * 30;
2195
2207
  let cls = PriceBand_module_css_default.bandOff;
2196
2208
  for (const w of segments) {
2197
- const ws = minutesOf(w.start);
2198
- const we = minutesOf(w.end);
2209
+ const ws = minutesOf$1(w.start);
2210
+ const we = minutesOf$1(w.end);
2199
2211
  if (Number.isNaN(ws) || Number.isNaN(we)) continue;
2200
2212
  if (we > ws ? start >= ws && start < we : start >= ws || start < we) {
2201
2213
  cls = w.level === "peak" ? PriceBand_module_css_default.bandPeak : w.level === "custom" ? PriceBand_module_css_default.bandCustom : PriceBand_module_css_default.bandOff;
@@ -2241,18 +2253,18 @@ window.__ModuleLoader__.load({
2241
2253
  document.head.appendChild(tag);
2242
2254
  }
2243
2255
  var WindowEditorModal_module_css_default = {
2244
- "footerSpacer": "qLyHCq_footerSpacer",
2245
2256
  "wide": "qLyHCq_wide",
2246
- "row": "qLyHCq_row",
2247
2257
  "body": "qLyHCq_body",
2248
- "error": "qLyHCq_error",
2249
2258
  "hint": "qLyHCq_hint",
2250
- "dash": "qLyHCq_dash",
2251
- "footer": "qLyHCq_footer",
2259
+ "empty": "qLyHCq_empty",
2260
+ "error": "qLyHCq_error",
2252
2261
  "daysBadge": "qLyHCq_daysBadge",
2253
- "tzLine": "qLyHCq_tzLine",
2262
+ "row": "qLyHCq_row",
2263
+ "footer": "qLyHCq_footer",
2264
+ "footerSpacer": "qLyHCq_footerSpacer",
2254
2265
  "input": "qLyHCq_input",
2255
- "empty": "qLyHCq_empty"
2266
+ "dash": "qLyHCq_dash",
2267
+ "tzLine": "qLyHCq_tzLine"
2256
2268
  };
2257
2269
  //#endregion
2258
2270
  //#region client/components/WindowEditorModal.tsx
@@ -2538,14 +2550,14 @@ window.__ModuleLoader__.load({
2538
2550
  document.head.appendChild(tag);
2539
2551
  }
2540
2552
  var PricePill_module_css_default = {
2541
- "label": "oHcJEa_label",
2542
- "pill": "oHcJEa_pill",
2553
+ "count": "oHcJEa_count",
2554
+ "saved": "oHcJEa_saved",
2543
2555
  "queueIcon": "oHcJEa_queueIcon",
2556
+ "label": "oHcJEa_label",
2544
2557
  "badge": "oHcJEa_badge",
2545
- "pillStale": "oHcJEa_pillStale",
2546
- "count": "oHcJEa_count",
2558
+ "pill": "oHcJEa_pill",
2547
2559
  "dot": "oHcJEa_dot",
2548
- "saved": "oHcJEa_saved"
2560
+ "pillStale": "oHcJEa_pillStale"
2549
2561
  };
2550
2562
  //#endregion
2551
2563
  //#region client/components/PricePill.tsx
@@ -2725,29 +2737,29 @@ window.__ModuleLoader__.load({
2725
2737
  document.head.appendChild(tag);
2726
2738
  }
2727
2739
  var TaskForm_module_css_default = {
2728
- "modal": "kjcGda_modal",
2740
+ "guidanceInput": "kjcGda_guidanceInput",
2741
+ "prompt": "kjcGda_prompt",
2742
+ "fieldLabel": "kjcGda_fieldLabel",
2743
+ "compactRow": "kjcGda_compactRow",
2729
2744
  "compactInput": "kjcGda_compactInput",
2730
- "strategyActive": "kjcGda_strategyActive",
2731
2745
  "warning": "kjcGda_warning",
2746
+ "warningIcon": "kjcGda_warningIcon",
2747
+ "strategyActive": "kjcGda_strategyActive",
2732
2748
  "strategyHint": "kjcGda_strategyHint",
2733
- "advancedBtn": "kjcGda_advancedBtn",
2749
+ "advancedBody": "kjcGda_advancedBody",
2750
+ "advancedIcon": "kjcGda_advancedIcon",
2751
+ "fieldInput": "kjcGda_fieldInput",
2734
2752
  "strategyPill": "kjcGda_strategyPill",
2735
- "warningIcon": "kjcGda_warningIcon",
2736
- "autonomyBtn": "kjcGda_autonomyBtn",
2737
- "field": "kjcGda_field",
2738
2753
  "compact": "kjcGda_compact",
2739
- "sessionPickRow": "kjcGda_sessionPickRow",
2740
- "costTag": "kjcGda_costTag",
2741
- "advancedIcon": "kjcGda_advancedIcon",
2742
- "guidanceInput": "kjcGda_guidanceInput",
2743
- "pillRow": "kjcGda_pillRow",
2744
- "compactRow": "kjcGda_compactRow",
2754
+ "field": "kjcGda_field",
2745
2755
  "compactLabel": "kjcGda_compactLabel",
2746
- "advancedBody": "kjcGda_advancedBody",
2756
+ "pillRow": "kjcGda_pillRow",
2747
2757
  "modelFallbackRow": "kjcGda_modelFallbackRow",
2748
- "fieldInput": "kjcGda_fieldInput",
2749
- "fieldLabel": "kjcGda_fieldLabel",
2750
- "prompt": "kjcGda_prompt"
2758
+ "sessionPickRow": "kjcGda_sessionPickRow",
2759
+ "autonomyBtn": "kjcGda_autonomyBtn",
2760
+ "advancedBtn": "kjcGda_advancedBtn",
2761
+ "costTag": "kjcGda_costTag",
2762
+ "modal": "kjcGda_modal"
2751
2763
  };
2752
2764
  //#endregion
2753
2765
  //#region client/components/TaskForm.tsx
@@ -3306,17 +3318,17 @@ window.__ModuleLoader__.load({
3306
3318
  document.head.appendChild(tag);
3307
3319
  }
3308
3320
  var InterceptCard_module_css_default = {
3309
- "queueIcon": "_9OZWeG_queueIcon",
3321
+ "compare": "_9OZWeG_compare",
3310
3322
  "close": "_9OZWeG_close",
3311
- "header": "_9OZWeG_header",
3323
+ "queueIcon": "_9OZWeG_queueIcon",
3312
3324
  "title": "_9OZWeG_title",
3313
- "priceLabel": "_9OZWeG_priceLabel",
3314
3325
  "row": "_9OZWeG_row",
3315
- "dismiss": "_9OZWeG_dismiss",
3316
- "compare": "_9OZWeG_compare",
3317
- "card": "_9OZWeG_card",
3318
3326
  "queueStatus": "_9OZWeG_queueStatus",
3319
- "dot": "_9OZWeG_dot"
3327
+ "card": "_9OZWeG_card",
3328
+ "dismiss": "_9OZWeG_dismiss",
3329
+ "dot": "_9OZWeG_dot",
3330
+ "priceLabel": "_9OZWeG_priceLabel",
3331
+ "header": "_9OZWeG_header"
3320
3332
  };
3321
3333
  //#endregion
3322
3334
  //#region client/components/InterceptCard.tsx
@@ -3573,18 +3585,18 @@ window.__ModuleLoader__.load({
3573
3585
  document.head.appendChild(tag);
3574
3586
  }
3575
3587
  var TaskRow_module_css_default = {
3576
- "red": "ovX5jq_red",
3577
- "taskMeta": "ovX5jq_taskMeta",
3578
- "amber": "ovX5jq_amber",
3579
- "blue": "ovX5jq_blue",
3580
- "green": "ovX5jq_green",
3581
- "droppedRow": "ovX5jq_droppedRow",
3588
+ "taskMain": "ovX5jq_taskMain",
3582
3589
  "taskRow": "ovX5jq_taskRow",
3583
- "rowActions": "ovX5jq_rowActions",
3584
3590
  "taskPrompt": "ovX5jq_taskPrompt",
3591
+ "rowActions": "ovX5jq_rowActions",
3592
+ "taskMeta": "ovX5jq_taskMeta",
3593
+ "red": "ovX5jq_red",
3585
3594
  "iconBtn": "ovX5jq_iconBtn",
3586
3595
  "confirming": "ovX5jq_confirming",
3587
- "taskMain": "ovX5jq_taskMain"
3596
+ "droppedRow": "ovX5jq_droppedRow",
3597
+ "blue": "ovX5jq_blue",
3598
+ "green": "ovX5jq_green",
3599
+ "amber": "ovX5jq_amber"
3588
3600
  };
3589
3601
  //#endregion
3590
3602
  //#region client/components/TaskRow.tsx
@@ -3768,15 +3780,15 @@ window.__ModuleLoader__.load({
3768
3780
  document.head.appendChild(tag);
3769
3781
  }
3770
3782
  var CandidatesView_module_css_default = {
3771
- "title": "j6P39W_title",
3783
+ "wrap": "j6P39W_wrap",
3772
3784
  "excerpt": "j6P39W_excerpt",
3773
- "pickedTag": "j6P39W_pickedTag",
3774
- "meta": "j6P39W_meta",
3775
- "head": "j6P39W_head",
3785
+ "title": "j6P39W_title",
3776
3786
  "picked": "j6P39W_picked",
3777
- "wrap": "j6P39W_wrap",
3787
+ "head": "j6P39W_head",
3788
+ "candidate": "j6P39W_candidate",
3789
+ "pickedTag": "j6P39W_pickedTag",
3778
3790
  "toggle": "j6P39W_toggle",
3779
- "candidate": "j6P39W_candidate"
3791
+ "meta": "j6P39W_meta"
3780
3792
  };
3781
3793
  //#endregion
3782
3794
  //#region client/components/CandidatesView.tsx
@@ -3849,21 +3861,21 @@ window.__ModuleLoader__.load({
3849
3861
  document.head.appendChild(tag);
3850
3862
  }
3851
3863
  var TaskDetail_module_css_default = {
3864
+ "detailLabel": "bhvrsW_detailLabel",
3865
+ "detailResumed": "bhvrsW_detailResumed",
3866
+ "detailValue": "bhvrsW_detailValue",
3867
+ "detailSection": "bhvrsW_detailSection",
3868
+ "detailResumeWarn": "bhvrsW_detailResumeWarn",
3869
+ "detailFile": "bhvrsW_detailFile",
3852
3870
  "detailReviewBody": "bhvrsW_detailReviewBody",
3871
+ "detailRun": "bhvrsW_detailRun",
3853
3872
  "detailItem": "bhvrsW_detailItem",
3873
+ "detailPrompt": "bhvrsW_detailPrompt",
3854
3874
  "modalBody": "bhvrsW_modalBody",
3855
3875
  "detailError": "bhvrsW_detailError",
3856
- "detailGrid": "bhvrsW_detailGrid",
3857
- "detailReview": "bhvrsW_detailReview",
3858
- "detailFile": "bhvrsW_detailFile",
3859
- "detailValue": "bhvrsW_detailValue",
3860
- "detailRun": "bhvrsW_detailRun",
3861
- "detailResumed": "bhvrsW_detailResumed",
3862
- "detailPrompt": "bhvrsW_detailPrompt",
3863
3876
  "modalFooter": "bhvrsW_modalFooter",
3864
- "detailSection": "bhvrsW_detailSection",
3865
- "detailResumeWarn": "bhvrsW_detailResumeWarn",
3866
- "detailLabel": "bhvrsW_detailLabel"
3877
+ "detailGrid": "bhvrsW_detailGrid",
3878
+ "detailReview": "bhvrsW_detailReview"
3867
3879
  };
3868
3880
  //#endregion
3869
3881
  //#region client/components/TaskDetail.tsx
@@ -4402,27 +4414,27 @@ window.__ModuleLoader__.load({
4402
4414
  document.head.appendChild(tag);
4403
4415
  }
4404
4416
  var QueueDock_module_css_default = {
4405
- "clearBtn": "_2DjDSq_clearBtn",
4406
- "approveArmed": "_2DjDSq_approveArmed",
4417
+ "reportDot": "_2DjDSq_reportDot",
4418
+ "pending": "_2DjDSq_pending",
4419
+ "dockTitle": "_2DjDSq_dockTitle",
4420
+ "sectionHead": "_2DjDSq_sectionHead",
4421
+ "sectionToggle": "_2DjDSq_sectionToggle",
4422
+ "reportBtn": "_2DjDSq_reportBtn",
4423
+ "drawer": "_2DjDSq_drawer",
4424
+ "groupPath": "_2DjDSq_groupPath",
4425
+ "onboardingDismiss": "_2DjDSq_onboardingDismiss",
4426
+ "empty": "_2DjDSq_empty",
4407
4427
  "footer": "_2DjDSq_footer",
4408
- "dockRow": "_2DjDSq_dockRow",
4409
- "group": "_2DjDSq_group",
4410
4428
  "clearArmed": "_2DjDSq_clearArmed",
4429
+ "group": "_2DjDSq_group",
4430
+ "dock": "_2DjDSq_dock",
4431
+ "approveArmed": "_2DjDSq_approveArmed",
4411
4432
  "groupHeader": "_2DjDSq_groupHeader",
4412
- "reportBtn": "_2DjDSq_reportBtn",
4413
- "drawer": "_2DjDSq_drawer",
4433
+ "clearBtn": "_2DjDSq_clearBtn",
4414
4434
  "footerActions": "_2DjDSq_footerActions",
4415
- "pending": "_2DjDSq_pending",
4416
- "dock": "_2DjDSq_dock",
4417
- "dockActions": "_2DjDSq_dockActions",
4418
- "onboardingDismiss": "_2DjDSq_onboardingDismiss",
4419
- "groupPath": "_2DjDSq_groupPath",
4420
- "sectionHead": "_2DjDSq_sectionHead",
4421
4435
  "onboarding": "_2DjDSq_onboarding",
4422
- "sectionToggle": "_2DjDSq_sectionToggle",
4423
- "reportDot": "_2DjDSq_reportDot",
4424
- "dockTitle": "_2DjDSq_dockTitle",
4425
- "empty": "_2DjDSq_empty"
4436
+ "dockActions": "_2DjDSq_dockActions",
4437
+ "dockRow": "_2DjDSq_dockRow"
4426
4438
  };
4427
4439
  //#endregion
4428
4440
  //#region client/components/QueueDock.tsx
@@ -4753,34 +4765,34 @@ window.__ModuleLoader__.load({
4753
4765
  document.head.appendChild(tag);
4754
4766
  }
4755
4767
  var MorningReport_module_css_default = {
4756
- "reviewExcerptBody": "x0rCEq_reviewExcerptBody",
4757
- "headline": "x0rCEq_headline",
4758
- "headlineValue": "x0rCEq_headlineValue",
4759
- "taskMain": "x0rCEq_taskMain",
4760
- "historyMeta": "x0rCEq_historyMeta",
4761
- "historyDate": "x0rCEq_historyDate",
4762
- "historyList": "x0rCEq_historyList",
4763
- "taskRow": "x0rCEq_taskRow",
4764
- "badRow": "x0rCEq_badRow",
4765
- "more": "x0rCEq_more",
4766
- "reviewExcerpt": "x0rCEq_reviewExcerpt",
4767
- "historyFooter": "x0rCEq_historyFooter",
4768
4768
  "clearBtn": "x0rCEq_clearBtn",
4769
- "headlineMeta": "x0rCEq_headlineMeta",
4770
- "clearArmed": "x0rCEq_clearArmed",
4771
- "body": "x0rCEq_body",
4772
- "divider": "x0rCEq_divider",
4773
4769
  "historyRowWrap": "x0rCEq_historyRowWrap",
4770
+ "body": "x0rCEq_body",
4771
+ "historyHeader": "x0rCEq_historyHeader",
4772
+ "historyFooter": "x0rCEq_historyFooter",
4773
+ "headlineMeta": "x0rCEq_headlineMeta",
4774
+ "historyList": "x0rCEq_historyList",
4774
4775
  "historyDelete": "x0rCEq_historyDelete",
4775
- "taskMeta": "x0rCEq_taskMeta",
4776
+ "headline": "x0rCEq_headline",
4777
+ "divider": "x0rCEq_divider",
4778
+ "taskMain": "x0rCEq_taskMain",
4779
+ "taskPrompt": "x0rCEq_taskPrompt",
4780
+ "more": "x0rCEq_more",
4781
+ "historyMeta": "x0rCEq_historyMeta",
4776
4782
  "historyEmpty": "x0rCEq_historyEmpty",
4777
4783
  "headlineLabel": "x0rCEq_headlineLabel",
4778
- "taskPrompt": "x0rCEq_taskPrompt",
4784
+ "badRow": "x0rCEq_badRow",
4785
+ "taskMeta": "x0rCEq_taskMeta",
4786
+ "reviewExcerpt": "x0rCEq_reviewExcerpt",
4787
+ "reviewExcerptBody": "x0rCEq_reviewExcerptBody",
4779
4788
  "footer": "x0rCEq_footer",
4780
- "historyHeader": "x0rCEq_historyHeader",
4781
- "modalFooter": "x0rCEq_modalFooter",
4789
+ "taskRow": "x0rCEq_taskRow",
4782
4790
  "doneRow": "x0rCEq_doneRow",
4783
- "historyRow": "x0rCEq_historyRow"
4791
+ "historyDate": "x0rCEq_historyDate",
4792
+ "historyRow": "x0rCEq_historyRow",
4793
+ "headlineValue": "x0rCEq_headlineValue",
4794
+ "modalFooter": "x0rCEq_modalFooter",
4795
+ "clearArmed": "x0rCEq_clearArmed"
4784
4796
  };
4785
4797
  //#endregion
4786
4798
  //#region client/components/MorningReport.tsx
@@ -5114,19 +5126,19 @@ window.__ModuleLoader__.load({
5114
5126
  document.head.appendChild(tag);
5115
5127
  }
5116
5128
  var ConfirmGate_module_css_default = {
5117
- "prompt": "se0mvq_prompt",
5118
- "list": "se0mvq_list",
5119
5129
  "more": "se0mvq_more",
5120
5130
  "remove": "se0mvq_remove",
5121
- "footer": "se0mvq_footer",
5122
- "card": "se0mvq_card",
5123
- "defer": "se0mvq_defer",
5131
+ "prompt": "se0mvq_prompt",
5132
+ "close": "se0mvq_close",
5124
5133
  "title": "se0mvq_title",
5125
- "header": "se0mvq_header",
5134
+ "defer": "se0mvq_defer",
5135
+ "footer": "se0mvq_footer",
5126
5136
  "meta": "se0mvq_meta",
5127
5137
  "row": "se0mvq_row",
5128
- "close": "se0mvq_close",
5129
- "releaseLabel": "se0mvq_releaseLabel"
5138
+ "card": "se0mvq_card",
5139
+ "releaseLabel": "se0mvq_releaseLabel",
5140
+ "list": "se0mvq_list",
5141
+ "header": "se0mvq_header"
5130
5142
  };
5131
5143
  //#endregion
5132
5144
  //#region client/components/ConfirmGate.tsx
@@ -5267,7 +5279,7 @@ window.__ModuleLoader__.load({
5267
5279
  }
5268
5280
  //#endregion
5269
5281
  //#region \0dsh-css:C:\Users\胡克劳\lowtide\work\dsh-lowtide-0.2.2\packages\dsh-lowtide\client\settings.module.css.mjs
5270
- const css = "._9UODyG_page{flex-direction:column;gap:14px;padding:4px 2px 16px;display:flex}._9UODyG_loading{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);padding:12px 0}._9UODyG_onboarding{background:var(--dsw-specific-tip);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;flex-direction:column;gap:6px;padding:12px 14px;display:flex}._9UODyG_onboardingTitle{color:var(--dsw-alias-brand-primary);font:var(--dsw-font-s-14);font-weight:600}._9UODyG_onboardingSteps{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);margin:0;padding-left:18px;line-height:1.7}._9UODyG_onboardingSteps b{color:var(--dsw-alias-label-primary)}._9UODyG_langRow{justify-content:space-between;align-items:center;gap:8px;padding:8px 0;display:flex}._9UODyG_langLabel{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13)}._9UODyG_error{color:var(--dsw-alias-state-error-primary);font:var(--dsw-font-xs-13);background:var(--dsw-alias-interactive-bg-hover);border-radius:8px;padding:8px 12px}._9UODyG_section{flex-direction:column;gap:8px;display:flex}._9UODyG_sectionHead{justify-content:space-between;align-items:center;display:flex}._9UODyG_sectionTitle{color:var(--dsw-alias-label-primary);font:var(--dsw-font-s-14);margin:0;font-weight:600}._9UODyG_grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;display:grid}._9UODyG_field{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);flex-direction:column;gap:4px;display:flex}._9UODyG_fieldLabel{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13)}._9UODyG_strategyHint{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);line-height:1.5}._9UODyG_input{box-sizing:border-box;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);width:100%;height:32px;color:var(--dsw-alias-label-primary);font:var(--dsw-font-xs-13);border-radius:8px;outline:none;padding:0 8px}._9UODyG_input:focus{border-color:var(--dsw-alias-brand-primary)}._9UODyG_checkbox{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);align-items:center;gap:6px;display:flex}._9UODyG_pillRow{gap:6px;display:flex}._9UODyG_autonomyPill{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);cursor:pointer;user-select:none;border-radius:999px;padding:4px 12px}._9UODyG_autonomyPill:hover{background:var(--dsw-alias-interactive-bg-hover)}._9UODyG_autonomyActive{border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-brand-primary);font-weight:600}._9UODyG_confirmBox{color:var(--dsw-alias-state-warn-primary);font:var(--dsw-font-xxs-12);background:var(--dsw-specific-tip);border-radius:8px;align-items:center;gap:8px;padding:8px 10px;display:flex}._9UODyG_confirmBtn{background:var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-label-primary-foreground);font:var(--dsw-font-xxs-12);cursor:pointer;border:none;border-radius:999px;padding:3px 10px}._9UODyG_confirmCancel{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);cursor:pointer;background:0 0;border:none;padding:3px 8px}._9UODyG_hint{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);margin:0;line-height:1.6}._9UODyG_windowRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}._9UODyG_windowRow ._9UODyG_input{flex:0 150px}._9UODyG_dayRow{gap:4px;display:flex}._9UODyG_dayBtn{border:1px solid var(--dsw-alias-border-l2);width:24px;height:24px;color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);cursor:pointer;background:0 0;border-radius:999px;justify-content:center;align-items:center;display:inline-flex}._9UODyG_dayBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._9UODyG_dayActive{border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-brand-primary);font-weight:600}._9UODyG_noWindows{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);background:var(--dsw-specific-tip);border-radius:8px;padding:10px 12px}._9UODyG_footer{justify-content:flex-end;display:flex}._9UODyG_footerLeft{gap:8px;margin-right:auto;display:flex}._9UODyG_officialCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:10px;flex-direction:column;gap:6px;padding:10px 12px;display:flex}._9UODyG_officialTitle{color:var(--dsw-alias-label-primary);font:var(--dsw-font-xs-strong-13)}._9UODyG_officialBody{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xxs-12);line-height:1.6}._9UODyG_officialActions{align-items:center;gap:8px;margin-top:2px;display:flex}._9UODyG_legend{gap:14px;display:flex}._9UODyG_bandPeak{background:var(--dsw-alias-state-error-primary);opacity:.85}._9UODyG_bandOff{background:var(--dsw-alias-state-success-primary);opacity:.85}._9UODyG_bandCustom{background:var(--dsw-alias-state-warn-primary);opacity:.85}._9UODyG_legendItem{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);align-items:center;gap:5px;display:flex}._9UODyG_legendDot{opacity:.9;border-radius:2px;width:10px;height:10px}._9UODyG_priceTable{flex-direction:column;gap:3px;display:flex}._9UODyG_priceHead,._9UODyG_priceRow{grid-template-columns:1.4fr .6fr 1fr 1fr 1fr;align-items:center;gap:6px;display:grid}._9UODyG_priceHead{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12)}._9UODyG_priceRow ._9UODyG_input{height:28px}._9UODyG_priceModel{color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code);font-size:12px}._9UODyG_priceTier{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13)}";
5282
+ const css = "._9UODyG_page{flex-direction:column;gap:14px;padding:4px 2px 16px;display:flex}._9UODyG_loading{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);padding:12px 0}._9UODyG_onboarding{background:var(--dsw-specific-tip);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;flex-direction:column;gap:6px;padding:12px 14px;display:flex}._9UODyG_onboardingTitle{color:var(--dsw-alias-brand-primary);font:var(--dsw-font-s-14);font-weight:600}._9UODyG_onboardingSteps{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);margin:0;padding-left:18px;line-height:1.7}._9UODyG_onboardingSteps b{color:var(--dsw-alias-label-primary)}._9UODyG_langRow{justify-content:space-between;align-items:center;gap:8px;padding:8px 0;display:flex}._9UODyG_langLabel{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13)}._9UODyG_error{color:var(--dsw-alias-state-error-primary);font:var(--dsw-font-xs-13);background:var(--dsw-alias-interactive-bg-hover);border-radius:8px;padding:8px 12px}._9UODyG_section{flex-direction:column;gap:8px;display:flex}._9UODyG_sectionHead{justify-content:space-between;align-items:center;display:flex}._9UODyG_sectionTitle{color:var(--dsw-alias-label-primary);font:var(--dsw-font-s-14);margin:0;font-weight:600}._9UODyG_grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;display:grid}._9UODyG_field{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);flex-direction:column;gap:4px;display:flex}._9UODyG_fieldLabel{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13)}._9UODyG_strategyHint{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);line-height:1.5}._9UODyG_batchWindowField{grid-column:1/-1}._9UODyG_batchWindowRow{border-radius:8px;flex-wrap:wrap;align-items:center;gap:8px;margin-top:6px;padding:4px 6px;display:flex}._9UODyG_batchWindowRow:hover{background:var(--dsw-alias-interactive-bg-hover)}._9UODyG_batchWindowRow ._9UODyG_input{flex:0 132px;width:auto;height:36px}._9UODyG_batchWindowDash{color:var(--dsw-alias-label-tertiary)}._9UODyG_batchWindowActions{margin-top:8px}._9UODyG_input{box-sizing:border-box;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);width:100%;height:32px;color:var(--dsw-alias-label-primary);font:var(--dsw-font-xs-13);border-radius:8px;outline:none;padding:0 8px}._9UODyG_input:focus{border-color:var(--dsw-alias-brand-primary)}._9UODyG_checkbox{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);align-items:center;gap:6px;display:flex}._9UODyG_pillRow{gap:6px;display:flex}._9UODyG_autonomyPill{border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13);cursor:pointer;user-select:none;border-radius:999px;padding:4px 12px}._9UODyG_autonomyPill:hover{background:var(--dsw-alias-interactive-bg-hover)}._9UODyG_autonomyActive{border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-brand-primary);font-weight:600}._9UODyG_confirmBox{color:var(--dsw-alias-state-warn-primary);font:var(--dsw-font-xxs-12);background:var(--dsw-specific-tip);border-radius:8px;align-items:center;gap:8px;padding:8px 10px;display:flex}._9UODyG_confirmBtn{background:var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-label-primary-foreground);font:var(--dsw-font-xxs-12);cursor:pointer;border:none;border-radius:999px;padding:3px 10px}._9UODyG_confirmCancel{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);cursor:pointer;background:0 0;border:none;padding:3px 8px}._9UODyG_hint{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);margin:0;line-height:1.6}._9UODyG_windowRow{flex-wrap:wrap;align-items:center;gap:6px;display:flex}._9UODyG_windowRow ._9UODyG_input{flex:0 150px}._9UODyG_dayRow{gap:4px;display:flex}._9UODyG_dayBtn{border:1px solid var(--dsw-alias-border-l2);width:24px;height:24px;color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);cursor:pointer;background:0 0;border-radius:999px;justify-content:center;align-items:center;display:inline-flex}._9UODyG_dayBtn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._9UODyG_dayActive{border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-brand-primary);font-weight:600}._9UODyG_noWindows{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xs-13);background:var(--dsw-specific-tip);border-radius:8px;padding:10px 12px}._9UODyG_footer{justify-content:flex-end;display:flex}._9UODyG_footerLeft{gap:8px;margin-right:auto;display:flex}._9UODyG_officialCard{border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);border-radius:10px;flex-direction:column;gap:6px;padding:10px 12px;display:flex}._9UODyG_officialTitle{color:var(--dsw-alias-label-primary);font:var(--dsw-font-xs-strong-13)}._9UODyG_officialBody{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xxs-12);line-height:1.6}._9UODyG_officialActions{align-items:center;gap:8px;margin-top:2px;display:flex}._9UODyG_legend{gap:14px;display:flex}._9UODyG_bandPeak{background:var(--dsw-alias-state-error-primary);opacity:.85}._9UODyG_bandOff{background:var(--dsw-alias-state-success-primary);opacity:.85}._9UODyG_bandCustom{background:var(--dsw-alias-state-warn-primary);opacity:.85}._9UODyG_legendItem{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12);align-items:center;gap:5px;display:flex}._9UODyG_legendDot{opacity:.9;border-radius:2px;width:10px;height:10px}._9UODyG_priceTable{flex-direction:column;gap:3px;display:flex}._9UODyG_priceHead,._9UODyG_priceRow{grid-template-columns:1.4fr .6fr 1fr 1fr 1fr;align-items:center;gap:6px;display:grid}._9UODyG_priceHead{color:var(--dsw-alias-label-tertiary);font:var(--dsw-font-xxs-12)}._9UODyG_priceRow ._9UODyG_input{height:28px}._9UODyG_priceModel{color:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code);font-size:12px}._9UODyG_priceTier{color:var(--dsw-alias-label-secondary);font:var(--dsw-font-xs-13)}";
5271
5283
  const tagId = "dsh-lowtide/settings.module.css";
5272
5284
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
5273
5285
  const tag = document.createElement("style");
@@ -5277,52 +5289,56 @@ window.__ModuleLoader__.load({
5277
5289
  document.head.appendChild(tag);
5278
5290
  }
5279
5291
  var settings_module_css_default = {
5280
- "officialActions": "_9UODyG_officialActions",
5281
- "legendItem": "_9UODyG_legendItem",
5282
- "priceTable": "_9UODyG_priceTable",
5283
- "priceModel": "_9UODyG_priceModel",
5284
- "page": "_9UODyG_page",
5285
- "noWindows": "_9UODyG_noWindows",
5292
+ "loading": "_9UODyG_loading",
5293
+ "strategyHint": "_9UODyG_strategyHint",
5294
+ "batchWindowRow": "_9UODyG_batchWindowRow",
5286
5295
  "autonomyActive": "_9UODyG_autonomyActive",
5287
- "officialCard": "_9UODyG_officialCard",
5288
- "onboardingTitle": "_9UODyG_onboardingTitle",
5289
5296
  "dayActive": "_9UODyG_dayActive",
5290
- "footerLeft": "_9UODyG_footerLeft",
5291
- "bandCustom": "_9UODyG_bandCustom",
5292
- "fieldLabel": "_9UODyG_fieldLabel",
5293
- "hint": "_9UODyG_hint",
5294
- "dayRow": "_9UODyG_dayRow",
5295
- "onboarding": "_9UODyG_onboarding",
5296
- "sectionTitle": "_9UODyG_sectionTitle",
5297
- "input": "_9UODyG_input",
5298
- "confirmCancel": "_9UODyG_confirmCancel",
5299
- "confirmBox": "_9UODyG_confirmBox",
5300
- "officialTitle": "_9UODyG_officialTitle",
5297
+ "windowRow": "_9UODyG_windowRow",
5301
5298
  "priceHead": "_9UODyG_priceHead",
5302
5299
  "priceRow": "_9UODyG_priceRow",
5303
- "pillRow": "_9UODyG_pillRow",
5304
- "legendDot": "_9UODyG_legendDot",
5300
+ "sectionTitle": "_9UODyG_sectionTitle",
5301
+ "officialCard": "_9UODyG_officialCard",
5302
+ "legendItem": "_9UODyG_legendItem",
5303
+ "onboardingTitle": "_9UODyG_onboardingTitle",
5305
5304
  "sectionHead": "_9UODyG_sectionHead",
5305
+ "batchWindowActions": "_9UODyG_batchWindowActions",
5306
5306
  "checkbox": "_9UODyG_checkbox",
5307
+ "pillRow": "_9UODyG_pillRow",
5308
+ "officialActions": "_9UODyG_officialActions",
5309
+ "langRow": "_9UODyG_langRow",
5310
+ "confirmBtn": "_9UODyG_confirmBtn",
5311
+ "legend": "_9UODyG_legend",
5307
5312
  "bandOff": "_9UODyG_bandOff",
5313
+ "legendDot": "_9UODyG_legendDot",
5314
+ "officialTitle": "_9UODyG_officialTitle",
5315
+ "hint": "_9UODyG_hint",
5316
+ "batchWindowField": "_9UODyG_batchWindowField",
5317
+ "page": "_9UODyG_page",
5318
+ "grid": "_9UODyG_grid",
5319
+ "fieldLabel": "_9UODyG_fieldLabel",
5320
+ "dayRow": "_9UODyG_dayRow",
5308
5321
  "officialBody": "_9UODyG_officialBody",
5309
- "legend": "_9UODyG_legend",
5310
- "langRow": "_9UODyG_langRow",
5311
- "strategyHint": "_9UODyG_strategyHint",
5312
- "langLabel": "_9UODyG_langLabel",
5313
- "field": "_9UODyG_field",
5314
- "loading": "_9UODyG_loading",
5322
+ "bandCustom": "_9UODyG_bandCustom",
5323
+ "bandPeak": "_9UODyG_bandPeak",
5324
+ "onboardingSteps": "_9UODyG_onboardingSteps",
5325
+ "footerLeft": "_9UODyG_footerLeft",
5326
+ "priceTable": "_9UODyG_priceTable",
5315
5327
  "error": "_9UODyG_error",
5328
+ "priceModel": "_9UODyG_priceModel",
5316
5329
  "priceTier": "_9UODyG_priceTier",
5317
5330
  "footer": "_9UODyG_footer",
5318
- "grid": "_9UODyG_grid",
5319
- "confirmBtn": "_9UODyG_confirmBtn",
5320
- "bandPeak": "_9UODyG_bandPeak",
5321
- "onboardingSteps": "_9UODyG_onboardingSteps",
5322
- "windowRow": "_9UODyG_windowRow",
5331
+ "onboarding": "_9UODyG_onboarding",
5332
+ "section": "_9UODyG_section",
5333
+ "langLabel": "_9UODyG_langLabel",
5334
+ "confirmCancel": "_9UODyG_confirmCancel",
5323
5335
  "dayBtn": "_9UODyG_dayBtn",
5336
+ "input": "_9UODyG_input",
5337
+ "batchWindowDash": "_9UODyG_batchWindowDash",
5324
5338
  "autonomyPill": "_9UODyG_autonomyPill",
5325
- "section": "_9UODyG_section"
5339
+ "field": "_9UODyG_field",
5340
+ "noWindows": "_9UODyG_noWindows",
5341
+ "confirmBox": "_9UODyG_confirmBox"
5326
5342
  };
5327
5343
  //#endregion
5328
5344
  //#region client/settings.tsx
@@ -5335,6 +5351,37 @@ window.__ModuleLoader__.load({
5335
5351
  */
5336
5352
  /** Editable price-table rows: canonical official ids plus legacy aliases. */
5337
5353
  const OFFICIAL_PRICE_MODELS = [.../* @__PURE__ */ new Set([...Object.keys(OFFICIAL_PRICES), ...Object.keys(PRICE_ALIASES)])];
5354
+ function minutesOf(hhmm) {
5355
+ const match = /^(\d{1,2}):(\d{2})$/.exec(hhmm);
5356
+ if (match === null) return NaN;
5357
+ const h = Number(match[1]);
5358
+ const m = Number(match[2]);
5359
+ if (h > 23 || m > 59) return NaN;
5360
+ return h * 60 + m;
5361
+ }
5362
+ /** Half-open minute intervals of a window on the [0, 2880) axis (a
5363
+ * midnight-crossing range unwraps past 1440; start === end = full day). */
5364
+ function rangeIntervals(start, end) {
5365
+ if (end > start) return [[start, end]];
5366
+ if (end < start) return [[start, end + 1440]];
5367
+ return [[0, 1440]];
5368
+ }
5369
+ /** Whether two "HH:MM"-"HH:MM" drafts overlap (for the non-blocking hint). */
5370
+ function batchWindowsOverlap(list) {
5371
+ const intervals = [];
5372
+ for (const w of list) {
5373
+ const start = minutesOf(w.start);
5374
+ const end = minutesOf(w.end);
5375
+ if (Number.isNaN(start) || Number.isNaN(end)) continue;
5376
+ intervals.push(...rangeIntervals(start, end));
5377
+ }
5378
+ for (let i = 0; i < intervals.length; i++) for (let j = i + 1; j < intervals.length; j++) {
5379
+ const [a0, a1] = intervals[i];
5380
+ const [b0, b1] = intervals[j];
5381
+ if (a0 < b1 && b0 < a1) return true;
5382
+ }
5383
+ return false;
5384
+ }
5338
5385
  /** 当前本地时区的 UTC 偏移标签,如 "UTC+8" / "UTC-5"。 */
5339
5386
  function utcOffsetLabel() {
5340
5387
  const minutes = -(/* @__PURE__ */ new Date()).getTimezoneOffset();
@@ -5433,7 +5480,13 @@ window.__ModuleLoader__.load({
5433
5480
  }
5434
5481
  const c = res.config;
5435
5482
  const batch = c.batch ?? {};
5436
- const [start, end] = String(batch.window ?? "19:00-23:30").split("-");
5483
+ const batchWindows = (Array.isArray(batch.windows) && batch.windows.length > 0 ? batch.windows : [batch.window ?? "19:00-23:30"]).map((w) => {
5484
+ const [s, e] = String(w).split("-");
5485
+ return {
5486
+ start: s ?? "19:00",
5487
+ end: e ?? "23:30"
5488
+ };
5489
+ });
5437
5490
  const prices = {};
5438
5491
  if (c.prices !== void 0 && typeof c.prices === "object") for (const [model, tier] of Object.entries(c.prices)) prices[model] = {
5439
5492
  peak: {
@@ -5448,8 +5501,7 @@ window.__ModuleLoader__.load({
5448
5501
  }
5449
5502
  };
5450
5503
  setDraft({
5451
- start: start ?? "19:00",
5452
- end: end ?? "23:30",
5504
+ batchWindows,
5453
5505
  tz: typeof batch.tz === "string" ? batch.tz : "",
5454
5506
  paused: batch.paused === true,
5455
5507
  gateLeadMin: String(typeof batch.gateLeadMin === "number" ? batch.gateLeadMin : 30),
@@ -5498,6 +5550,15 @@ window.__ModuleLoader__.load({
5498
5550
  } : w)
5499
5551
  });
5500
5552
  }
5553
+ function setBatchWindow(index, patch) {
5554
+ setDraft((d) => d === null ? d : {
5555
+ ...d,
5556
+ batchWindows: d.batchWindows.map((w, i) => i === index ? {
5557
+ ...w,
5558
+ ...patch
5559
+ } : w)
5560
+ });
5561
+ }
5501
5562
  /** 已处于官方时段:窗口为空(空=官方回退,与显式采用等价)或草稿显式等于换算段(禁用"一键采用")。 */
5502
5563
  const officialAdopted = meta !== null && (draft.windows.length === 0 || meta.officialInLocal.length > 0 && draft.windows.length === meta.officialInLocal.length && meta.officialInLocal.every((w) => draft.windows.some((d) => d.level === "peak" && d.start === w.start && d.end === w.end)));
5503
5564
  /** 一键采用:官方忙时本地换算段写入窗口草稿(level=peak,保存时自动生成 id)。
@@ -5544,8 +5605,10 @@ window.__ModuleLoader__.load({
5544
5605
  function restoreDefaults() {
5545
5606
  setDraft((d) => d === null ? d : {
5546
5607
  ...d,
5547
- start: "19:00",
5548
- end: "23:30",
5608
+ batchWindows: [{
5609
+ start: "19:00",
5610
+ end: "23:30"
5611
+ }],
5549
5612
  tz: "",
5550
5613
  paused: false,
5551
5614
  gateLeadMin: "30",
@@ -5575,6 +5638,12 @@ window.__ModuleLoader__.load({
5575
5638
  const save = async () => {
5576
5639
  setSaving(true);
5577
5640
  setError(null);
5641
+ const batchRanges = [...new Set(draft.batchWindows.map((w) => `${w.start}-${w.end}`))];
5642
+ if (batchRanges.length === 0 || draft.batchWindows.some((w) => Number.isNaN(minutesOf(w.start)) || Number.isNaN(minutesOf(w.end)))) {
5643
+ setSaving(false);
5644
+ setError(t("settings.batchWindowInvalid"));
5645
+ return;
5646
+ }
5578
5647
  const daysOf = (s) => {
5579
5648
  const days = s.split(",").map((x) => Number(x.trim())).filter((n) => Number.isInteger(n) && n >= 1 && n <= 7);
5580
5649
  return days.length > 0 ? days : void 0;
@@ -5606,7 +5675,8 @@ window.__ModuleLoader__.load({
5606
5675
  }
5607
5676
  const res = await updateConfig({
5608
5677
  batch: {
5609
- window: `${draft.start}-${draft.end}`,
5678
+ window: batchRanges[0] ?? "19:00-23:30",
5679
+ windows: batchRanges,
5610
5680
  ...draft.tz.trim() !== "" ? { tz: draft.tz.trim() } : {},
5611
5681
  gateLeadMin: Math.max(Number(draft.gateLeadMin) || 0, 0),
5612
5682
  maxTasksPerNight: Math.max(Number(draft.maxTasksPerNight) || 1, 1),
@@ -5678,23 +5748,66 @@ window.__ModuleLoader__.load({
5678
5748
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5679
5749
  className: settings_module_css_default.grid,
5680
5750
  children: [
5681
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
5682
- className: settings_module_css_default.field,
5683
- children: [t("settings.start"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
5684
- type: "time",
5685
- className: settings_module_css_default.input,
5686
- value: draft.start,
5687
- onChange: (e) => set("start", e.target.value)
5688
- })]
5689
- }),
5690
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
5691
- className: settings_module_css_default.field,
5692
- children: [t("settings.end"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
5693
- type: "time",
5694
- className: settings_module_css_default.input,
5695
- value: draft.end,
5696
- onChange: (e) => set("end", e.target.value)
5697
- })]
5751
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5752
+ className: `${settings_module_css_default.field} ${settings_module_css_default.batchWindowField}`,
5753
+ children: [
5754
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5755
+ className: settings_module_css_default.fieldLabel,
5756
+ children: t("settings.batchWindowList")
5757
+ }),
5758
+ draft.batchWindows.map((w, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5759
+ className: settings_module_css_default.batchWindowRow,
5760
+ children: [
5761
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
5762
+ type: "time",
5763
+ className: settings_module_css_default.input,
5764
+ "aria-label": t("settings.start"),
5765
+ value: w.start,
5766
+ onChange: (e) => setBatchWindow(i, { start: e.target.value })
5767
+ }),
5768
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5769
+ className: settings_module_css_default.batchWindowDash,
5770
+ children: "–"
5771
+ }),
5772
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
5773
+ type: "time",
5774
+ className: settings_module_css_default.input,
5775
+ "aria-label": t("settings.end"),
5776
+ value: w.end,
5777
+ onChange: (e) => setBatchWindow(i, { end: e.target.value })
5778
+ }),
5779
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
5780
+ variant: "ghost",
5781
+ size: "md",
5782
+ disabled: draft.batchWindows.length <= 1,
5783
+ title: draft.batchWindows.length <= 1 ? t("settings.batchWindowMin") : void 0,
5784
+ onClick: () => set("batchWindows", draft.batchWindows.filter((_, idx) => idx !== i)),
5785
+ children: t("settings.windowDelete")
5786
+ })
5787
+ ]
5788
+ }, i)),
5789
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
5790
+ className: settings_module_css_default.batchWindowActions,
5791
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
5792
+ variant: "outline",
5793
+ size: "md",
5794
+ disabled: draft.batchWindows.length >= 6,
5795
+ onClick: () => set("batchWindows", [...draft.batchWindows, {
5796
+ start: "22:00",
5797
+ end: "23:30"
5798
+ }]),
5799
+ children: t("settings.addBatchWindow")
5800
+ })
5801
+ }),
5802
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5803
+ className: settings_module_css_default.strategyHint,
5804
+ children: t("settings.batchWindowsHint")
5805
+ }),
5806
+ batchWindowsOverlap(draft.batchWindows) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5807
+ className: settings_module_css_default.strategyHint,
5808
+ children: t("settings.batchWindowOverlap")
5809
+ })
5810
+ ]
5698
5811
  }),
5699
5812
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
5700
5813
  className: settings_module_css_default.field,