@skillre/dsh-plugin-work-dashboard 0.6.0 → 0.9.0

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
@@ -59,6 +59,13 @@ window.__ModuleLoader__.load({
59
59
  "R11-no-next-milestone",
60
60
  "R12-stage-stalled"
61
61
  ]);
62
+ var BLOCKER_SOURCES = Object.freeze([
63
+ "gap",
64
+ "stalled",
65
+ "missing-amount",
66
+ "no-progress",
67
+ "no-stage-since"
68
+ ]);
62
69
 
63
70
  // src/client/api.ts
64
71
  var ActionError = class extends Error {
@@ -86,7 +93,8 @@ window.__ModuleLoader__.load({
86
93
  refresh: (signal) => call({ action: "refresh" }, signal),
87
94
  detail: (pocId, signal) => call({ action: "detail", pocId }, signal),
88
95
  risks: (signal) => call({ action: "risks" }, signal),
89
- timeline: (signal) => call({ action: "timeline" }, signal)
96
+ timeline: (signal) => call({ action: "timeline" }, signal),
97
+ exportForm: (mode, pocIds, signal) => call({ action: "export-form", mode, pocIds: [...pocIds] }, signal)
90
98
  };
91
99
  }
92
100
 
@@ -97,6 +105,7 @@ window.__ModuleLoader__.load({
97
105
  title: "\u5DE5\u4F5C\u770B\u677F",
98
106
  subtitle: "\u591A\u6A21\u5757\u8FD0\u8425\u770B\u677F\uFF1A\u5148\u628A\u6B63\u5728\u63A8\u8FDB\u7684\u4E8B\u60C5\u770B\u6E05\u695A\uFF0C\u518D\u51B3\u5B9A\u4E0B\u4E00\u6B65\u8865\u4EC0\u4E48\u3002",
99
107
  dataSource: "\u6570\u636E\u6E90",
108
+ dataSourceLine: "\u6570\u636E\u6E90\uFF1Agithub.com/{repository}",
100
109
  eyebrow: "\u5DE5\u4F5C\u770B\u677F \xB7 \u53EA\u8BFB",
101
110
  modulePoc: "POC \u8FD0\u8425",
102
111
  modulePocHint: "\u9879\u76EE\u9636\u6BB5\u3001\u56DB\u7EF4\u7ED3\u679C\u4E0E\u7F3A\u53E3\u6E05\u5355",
@@ -132,10 +141,6 @@ window.__ModuleLoader__.load({
132
141
  loading: "\u52A0\u8F7D\u4E2D\u2026",
133
142
  loadingDetail: "\u6B63\u5728\u8BFB\u53D6\u9879\u76EE\u2026",
134
143
  // Stats
135
- statActive: "\u8FDB\u884C\u4E2D",
136
- statG0: "\u5F85\u8865 G0",
137
- statRisk: "\u6709\u98CE\u9669",
138
- statConvertible: "\u53EF\u8F6C\u5316",
139
144
  statTotal: "\u9879\u76EE\u603B\u6570",
140
145
  statClosed: "\u5DF2\u5173\u95ED",
141
146
  // Table
@@ -170,9 +175,6 @@ window.__ModuleLoader__.load({
170
175
  stagePending: "\u672A\u5F00\u59CB",
171
176
  stageUnknown: "\u9636\u6BB5\u672A\u8BC6\u522B",
172
177
  // Pending list
173
- pendingTitle: "\u5F85\u5904\u7406",
174
- pendingEmpty: "\u6CA1\u6709\u626B\u51FA\u7F3A\u53E3\uFF0C\u7EE7\u7EED\u4FDD\u6301\u3002",
175
- pendingCount: "{count} \u9879",
176
178
  gapPriority: "\u4F18\u5148\u7EA7 {value}",
177
179
  // Detail page
178
180
  back: "\u2190 \u8FD4\u56DE",
@@ -274,13 +276,6 @@ window.__ModuleLoader__.load({
274
276
  timelineNoFeedback: "\u65E0\u5BA2\u6237\u53CD\u9988",
275
277
  timelineActual: "\u5B9E\u9645\u7ED3\u679C",
276
278
  timelineRoundShort: "\u7B2C {round} \u8F6E",
277
- statTotalProjects: "POC \u603B\u6570",
278
- statTotalNote: "\u53F0\u8D26\u5185\u5168\u90E8\u9879\u76EE",
279
- statG0Passed: "G0 \u901A\u8FC7",
280
- statG0CompleteNote: "G0 \u5B8C\u6574",
281
- statInProgress: "\u8FDB\u884C\u4E2D",
282
- statStoppedNote: "\u6682\u505C/\u5173\u95ED/\u53D6\u6D88",
283
- statAmount: "\u91D1\u989D\u5408\u8BA1",
284
279
  statAmountUnit: "\u4E07\u5143",
285
280
  colOrg: "\u4F53\u7CFB/\u516C\u53F8",
286
281
  colAmount: "\u91D1\u989D",
@@ -411,6 +406,7 @@ window.__ModuleLoader__.load({
411
406
  filterLabel: "\u7B5B\u9009",
412
407
  filterAll: "\u5168\u90E8",
413
408
  filterSystem: "\u4F53\u7CFB",
409
+ filterCompany: "\u516C\u53F8",
414
410
  filterStage: "\u9636\u6BB5",
415
411
  filterStatus: "\u72B6\u6001",
416
412
  filterType: "\u7C7B\u578B",
@@ -445,13 +441,114 @@ window.__ModuleLoader__.load({
445
441
  tableProgressCell: "{date} \xB7 {count} \u6B21",
446
442
  tableStageSince: "{days} \u5929",
447
443
  tableSortByThis: "\u6309\u6B64\u5217\u6392\u5E8F",
448
- pendingGrouped: "\u6309\u89C4\u5219\u5206\u7EC4",
449
- pendingUngrouped: "\u5E73\u94FA\u5217\u8868",
450
- pendingRuleCount: "{count} \u4E2A\u9879\u76EE\u547D\u4E2D",
451
444
  pendingExpand: "\u5C55\u5F00",
452
445
  pendingCollapse: "\u6536\u8D77",
453
- pendingMoreProjects: "\u8FD8\u6709 {count} \u4E2A\u9879\u76EE",
454
- pendingEmptyFiltered: "\u5F53\u524D\u7B5B\u9009\u4E0B\u6CA1\u6709\u7F3A\u53E3\u3002",
446
+ // ---------- 0.7 · 阻障(统一口径) ----------
447
+ blockerTitle: "\u963B\u969C",
448
+ blockerSubtitle: "\u5361\u4F4F\u7684\u5730\u65B9\uFF0C\u4E94\u7C7B\u6765\u6E90\u5408\u5728\u4E00\u8D77\u770B\u3002",
449
+ blockerCount: "{count} \u9879",
450
+ blockerProjectsNote: "{blocked} / {total} \u4E2A\u9879\u76EE\u6709\u963B\u969C",
451
+ blockerAll: "\u5168\u90E8",
452
+ blockerSourceGap: "\u7F3A\u53E3\u89C4\u5219",
453
+ blockerSourceStalled: "\u9636\u6BB5\u505C\u6EDE",
454
+ blockerSourceMissingAmount: "\u672A\u586B\u91D1\u989D",
455
+ blockerSourceNoProgress: "\u65E0\u8FDB\u5C55\u8BB0\u5F55",
456
+ blockerSourceNoStageSince: "\u7F3A\u9636\u6BB5\u8D77\u59CB\u65E5",
457
+ blockerEmpty: "\u6CA1\u6709\u626B\u51FA\u963B\u969C\uFF0C\u7EE7\u7EED\u4FDD\u6301\u3002",
458
+ blockerEmptyFiltered: "\u5F53\u524D\u7B5B\u9009\u4E0B\u6CA1\u6709\u963B\u969C\u3002",
459
+ blockerStalledCopy: "\u5DF2\u5728\u5F53\u524D\u9636\u6BB5\u505C\u7559 {days} \u5929\uFF08\u9608\u503C {stallDays} \u5929\uFF09\uFF0C\u6CA1\u6709\u4EFB\u4F55\u63A8\u8FDB\u3002",
460
+ blockerMissingAmountCopy: "\u6CA1\u6709\u586B\u91D1\u989D\uFF0C\u65E0\u6CD5\u6392\u5E8F\u3001\u4F30\u7B97\uFF0C\u4E5F\u65E0\u6CD5\u5224\u65AD\u662F\u5426\u89E6\u53CA\u5927\u989D\u89C4\u5219\u3002",
461
+ blockerNoProgressCopy: "\u4E00\u6761\u8FDB\u5C55\u8BB0\u5F55\u90FD\u6CA1\u6709\uFF1A\u8FD9\u4E2A\u9879\u76EE\u63A8\u8FDB\u8FC7\u6CA1\u6709\uFF0C\u8BF4\u4E0D\u6E05\u3002",
462
+ blockerNoStageSinceCopy: "\u6CA1\u6709\u586B\u8FDB\u5165\u9636\u6BB5\u7684\u65F6\u95F4\uFF0C\u505C\u6EDE\u5929\u6570\u65E0\u6CD5\u8BA1\u7B97\u3002",
463
+ blockerMoreProjects: "\u8FD8\u6709 {count} \u4E2A\u9879\u76EE",
464
+ blockerOpen: "\u67E5\u770B",
465
+ blockerLegendHint: "\u70B9\u4EFB\u610F\u4E00\u7C7B\u53EA\u770B\u5B83\uFF0C\u518D\u70B9\u4E00\u6B21\u53D6\u6D88\u3002",
466
+ // ---------- 0.7 · 阶段感知详情页 ----------
467
+ dtStageSkeleton: "\u5F53\u524D\u9636\u6BB5\u89C6\u56FE",
468
+ dtStageG0Title: "G0 \u5DE5\u4F5C\u53F0",
469
+ dtStageG0Copy: "\u5148\u628A\u8FD9\u4E2A\u9879\u76EE\u503C\u4E0D\u503C\u5F97\u505A\u8BB2\u6E05\u695A\uFF0C\u518D\u8C08\u8BA1\u5212\u4E0E\u8FDB\u5C55\u3002",
470
+ dtStageG0Next: "\u4E94\u9879\u5FC5\u586B\u9F50\u4E86\u3001\u8BC4\u5BA1\u901A\u8FC7\u540E\uFF0C\u624D\u8FDB\u5165 G1 \u65B9\u6848\u8BBE\u8BA1\u3002",
471
+ dtStageG1Title: "G1 \u65B9\u6848\u8BBE\u8BA1",
472
+ dtStageG1Copy: "\u600E\u4E48\u8D62\uFF1A\u75DB\u70B9\u3001\u6307\u6807\u3001\u573A\u666F\u3001\u4F18\u52BF\uFF0C\u8FD8\u6709 G1 \u7ED3\u8BBA\u3002",
473
+ dtStageG1Next: "G1 \u901A\u8FC7\u5E76\u786E\u8BA4\u524D\u7F6E\u6761\u4EF6\u5C31\u7EEA\u540E\uFF0C\u8FDB\u5165 G2 \u65B9\u6848\u9A8C\u8BC1\u3002",
474
+ dtStageG2Title: "G2 \u65B9\u6848\u9A8C\u8BC1",
475
+ dtStageG2Copy: "\u524D\u7F6E\u6761\u4EF6\u662F\u5426\u5C31\u7EEA\uFF0C\u9A8C\u8BC1\u8FC7\u7A0B\u4EA7\u751F\u4E86\u54EA\u4E9B\u8FDB\u5C55\u4E0E\u8BC1\u636E\u3002",
476
+ dtStageG2Next: "G2 Ready \u4E14\u9A8C\u8BC1\u6709\u8BC1\u636E\u540E\uFF0C\u8FDB\u5165 G3 \u7ED3\u679C\u9A8C\u8BC1\u3002",
477
+ dtStageG3Title: "G3 \u7ED3\u679C\u9A8C\u8BC1",
478
+ dtStageG3Copy: "\u8BC1\u636E\u94FE\u4E0E\u5BA2\u6237\u8BA4\u53EF\uFF1A\u8BC1\u660E\u4E86\u4EC0\u4E48\uFF0C\u5BA2\u6237\u627F\u8BA4\u4E86\u4EC0\u4E48\u3002",
479
+ dtStageG3Next: "G3-2 \u5DF2\u786E\u8BA4\u540E\uFF0C\u8FDB\u5165 G4 \u7ED3\u679C\u8F6C\u5316\u3002",
480
+ dtStageG4Title: "G4 \u7ED3\u679C\u8F6C\u5316",
481
+ dtStageG4Copy: "\u56DB\u7EF4\u7ED3\u8BBA\u4E0E\u4E0B\u4E00\u6B65\u91CC\u7A0B\u7891\uFF1A\u4EF7\u503C\u505A\u51FA\u6765\u4E86\uFF0C\u8981\u628A\u5B83\u843D\u4E0B\u6765\u3002",
482
+ dtStageG4Next: "\u91CC\u7A0B\u7891\u6709\u4E86\u8D1F\u8D23\u4EBA\u4E0E\u622A\u6B62\u65E5\uFF0C\u624D\u7B97\u771F\u6B63\u5B8C\u6210\u3002",
483
+ dtStageClosedTitle: "\u5DF2\u5173\u95ED",
484
+ dtStageClosedCopy: "\u5F52\u6863\u89C6\u56FE\uFF1A\u7ED3\u8BBA\u4E0E\u56DB\u7EF4\u7ED3\u679C\uFF0C\u8FDB\u5C55\u6D41\u7559\u4F5C\u590D\u76D8\u3002",
485
+ dtStageUnknownTitle: "\u9636\u6BB5\u672A\u8BC6\u522B",
486
+ dtStageUnknownCopy: "\u53F0\u8D26\u91CC\u7684\u9636\u6BB5\u503C\u65E0\u6CD5\u8BC6\u522B\uFF0C\u6309\u5168\u91CF\u987A\u5E8F\u5C55\u793A\u3002",
487
+ dtStageDone: "\u672C\u9636\u6BB5\u5DF2\u8BB0\u5F55\u5B8C\u6210",
488
+ dtStagePending: "\u672C\u9636\u6BB5\u8FD8\u6709\u5F85\u8865\u9879",
489
+ dtOtherSections: "\u5176\u4ED6\u533A\u5757",
490
+ dtOtherSectionsHint: "\u5168\u90E8\u5B57\u6BB5\u90FD\u8FD8\u5728\uFF0C\u53EA\u662F\u6309\u5F53\u524D\u9636\u6BB5\u6392\u5230\u4E86\u540E\u9762\u3002",
491
+ // ---------- 0.7 · 工作清单(空态改成可执行) ----------
492
+ worklistTitle: "\u5F85\u8865\u6E05\u5355",
493
+ worklistEmpty: "\u8FD9\u9879\u5DF2\u7ECF\u9F50\u4E86\u3002",
494
+ worklistG0Intro: "\u8865\u9F50\u4E0B\u9762 {count} \u9879\uFF0CG0 \u624D\u7B97\u5B8C\u6574\u3002",
495
+ worklistG0Done: "\u4E94\u9879\u5FC5\u586B\u5DF2\u9F50\uFF0C\u53EF\u4EE5\u63A8\u8FDB G0 \u8BC4\u5BA1\u3002",
496
+ worklistG0Field: "\u8865 {field}",
497
+ worklistG0Hint: "\u5728\u53F0\u8D26\u91CC\u8865\u5B8C\u540E\u70B9\u5237\u65B0\uFF1B\u4E5F\u53EF\u4EE5\u5BFC\u51FA\u6536\u96C6\u8868\u5355\u4EA4\u7ED9\u7EC4\u5458\u586B\u3002",
498
+ worklistNoProgressIntro: "\u8FD8\u6CA1\u6709\u7B2C\u4E00\u6761\u8FDB\u5C55\u8BB0\u5F55\u3002\u4E00\u6B21\u8FDB\u5C55\u81F3\u5C11\u8981\u5199\u6E05\u76EE\u6807\u3001\u5B9E\u9645\u7ED3\u679C\u548C\u4E0B\u4E00\u6B65\u3002",
499
+ worklistNoProgressAction: "\u8865\u7B2C\u4E00\u6761\u8FDB\u5C55",
500
+ worklistNoPlanIntro: "\u8BA1\u5212\u8FD8\u662F\u7A7A\u7684\uFF1A\u6CA1\u6709\u6210\u529F\u6307\u6807\uFF0C\u540E\u9762\u65E0\u6CD5\u9A8C\u6536\u3002",
501
+ worklistNoPlanAction: "\u8865\u8BA1\u5212\uFF08\u6307\u6807 / \u573A\u666F / \u98CE\u9669\uFF09",
502
+ worklistNoOutcomeIntro: "\u7ED3\u8BBA\u8FD8\u6CA1\u5199\uFF1A\u505A\u6210\u4E86\u4EC0\u4E48\u3001\u5BA2\u6237\u8BA4\u53EF\u4EC0\u4E48\u3001\u4E0B\u4E00\u6B65\u505A\u4EC0\u4E48\u3002",
503
+ worklistNoOutcomeAction: "\u8865\u7ED3\u8BBA",
504
+ worklistMissingAmountIntro: "\u6CA1\u6709\u586B\u91D1\u989D\uFF0C\u8FD9\u4E2A\u9879\u76EE\u5728\u9884\u7B97\u89C6\u56FE\u91CC\u4F1A\u7F3A\u5E2D\u3002",
505
+ worklistMissingAmountAction: "\u8865\u91D1\u989D",
506
+ worklistMissingStageSinceIntro: "\u6CA1\u6709\u586B\u8FDB\u5165\u9636\u6BB5\u7684\u65F6\u95F4\uFF0C\u505C\u6EDE\u5929\u6570\u7B97\u4E0D\u51FA\u6765\u3002",
507
+ worklistMissingStageSinceAction: "\u8865\u9636\u6BB5\u8D77\u59CB\u65E5",
508
+ worklistFixAll: "\u5171 {count} \u9879\u5F85\u8865",
509
+ worklistDone: "\u6CA1\u6709\u5F85\u8865\u9879\uFF0C\u7EE7\u7EED\u4FDD\u6301\u3002",
510
+ // ---------- 0.8 · KPI 顶条 ----------
511
+ kpiTitle: "\u6574\u4F53\u60C5\u51B5",
512
+ kpiTotal: "\u9879\u76EE\u603B\u6570",
513
+ kpiActive: "\u8FDB\u884C\u4E2D",
514
+ kpiBudget: "\u9884\u7B97\u5408\u8BA1",
515
+ kpiBlocked: "\u6709\u963B\u969C",
516
+ kpiG0Passed: "G0 \u5DF2\u901A\u8FC7",
517
+ kpiStageBreakdown: "\u5404\u9636\u6BB5",
518
+ kpiBlockedNote: "{count} \u4E2A\u9879\u76EE",
519
+ kpiClickHint: "\u70B9\u4EFB\u610F\u4E00\u9879\u6309\u8BE5\u6761\u4EF6\u7B5B\u9009",
520
+ kpiAllNote: "\u5168\u90E8 {count} \u4E2A\u9879\u76EE",
521
+ // ---------- 0.8 · 预算面板 ----------
522
+ budgetTitle: "\u9884\u7B97",
523
+ budgetNote: "\u6309\u8BC4\u5BA1\u72B6\u6001\u62C6\u5206",
524
+ budgetTotal: "\u9884\u7B97\u5408\u8BA1",
525
+ budgetApproved: "G0 \u5DF2\u901A\u8FC7",
526
+ budgetPending: "\u5F85\u8BC4\u5BA1",
527
+ budgetUnset: "\u672A\u586B\u91D1\u989D",
528
+ budgetApprovedNote: "{count} \u4E2A\u9879\u76EE \xB7 {amount} \u4E07",
529
+ budgetPendingNote: "{count} \u4E2A\u9879\u76EE \xB7 {amount} \u4E07",
530
+ budgetUnsetNote: "{count} \u4E2A\u9879\u76EE",
531
+ budgetByOrg: "\u6309\u4F53\u7CFB",
532
+ budgetConcentration: "\u96C6\u4E2D\u5EA6",
533
+ budgetConcentrationCopy: "\u6700\u5927\u5355\u9879\u76EE\u5360 {share}%",
534
+ budgetEmpty: "\u53F0\u8D26\u91CC\u8FD8\u6CA1\u6709\u91D1\u989D\u6570\u636E\u3002",
535
+ budgetUnsetWarning: "{count} \u4E2A\u9879\u76EE\u6CA1\u6709\u91D1\u989D\uFF0C\u9884\u7B97\u5408\u8BA1\u504F\u4F4E\u3002",
536
+ // ---------- 0.8 · 阶段内完成度 ----------
537
+ stageProgressLabel: "\u9636\u6BB5\u5185\u5B8C\u6210",
538
+ stageProgressNote: "{done} / {total} \u5DF2\u5B8C\u6210",
539
+ stageNoData: "\u672C\u9636\u6BB5\u6CA1\u6709\u9879\u76EE",
540
+ // ---------- 0.8 · 基本信息 ----------
541
+ dtBasicTitle: "\u57FA\u672C\u4FE1\u606F",
542
+ dtCustomerName: "\u5BA2\u6237\u540D",
543
+ dtCustomerSystem: "\u4F53\u7CFB",
544
+ dtCustomerCompany: "\u5BA2\u6237\u516C\u53F8",
545
+ dtCustomerDepartment: "\u90E8\u95E8",
546
+ dtCustomerTech: "\u5BA2\u6237\u6280\u672F\u4EBA",
547
+ dtCustomerSponsor: "\u5BA2\u6237\u4E1A\u52A1\u51B3\u7B56\u4EBA",
548
+ dtBasicDecisionChain: "\u51B3\u7B56\u94FE",
549
+ dtBasicDecisionChainNone: "\u8FD8\u6CA1\u6709\u5199\u6E05\u8C01\u62CD\u677F\u3001\u6309\u4EC0\u4E48\u6D41\u7A0B\u8D70\u3002",
550
+ dtBasicPostPoc: "\u6D4B\u540E\u51B3\u7B56",
551
+ dtBasicPostPocNone: "\u8FD8\u6CA1\u6709\u5199\u6E05\u6D4B\u5B8C\u4E4B\u540E\u5BA2\u6237\u4F1A\u505A\u4EC0\u4E48\u51B3\u5B9A\u3002",
455
552
  // ---------- 0.3 · 详情页 ----------
456
553
  dtRailTitle: "\u9879\u76EE\u6863\u6848",
457
554
  dtStageSection: "\u9636\u6BB5",
@@ -552,6 +649,7 @@ window.__ModuleLoader__.load({
552
649
  title: "Work Dashboard",
553
650
  subtitle: "A multi-module operations dashboard: see what is actually moving before deciding what to fix next.",
554
651
  dataSource: "Data source",
652
+ dataSourceLine: "Source: github.com/{repository}",
555
653
  eyebrow: "Work Dashboard \xB7 read-only",
556
654
  modulePoc: "POC Operations",
557
655
  modulePocHint: "Stage, four dimensions and gaps",
@@ -584,10 +682,6 @@ window.__ModuleLoader__.load({
584
682
  failureHint: "Check the network and gh login, then retry.",
585
683
  loading: "Loading\u2026",
586
684
  loadingDetail: "Reading the project\u2026",
587
- statActive: "Active",
588
- statG0: "Missing G0",
589
- statRisk: "At risk",
590
- statConvertible: "Convertible",
591
685
  statTotal: "Total",
592
686
  statClosed: "Closed",
593
687
  tableTitle: "Projects",
@@ -618,9 +712,6 @@ window.__ModuleLoader__.load({
618
712
  stageCurrent: "Current",
619
713
  stagePending: "Not started",
620
714
  stageUnknown: "Unrecognized stage",
621
- pendingTitle: "Pending",
622
- pendingEmpty: "No gaps found. Keep it up.",
623
- pendingCount: "{count} items",
624
715
  gapPriority: "Priority {value}",
625
716
  back: "\u2190 Back",
626
717
  detailIdentity: "{pocId} \xB7 {stage} \xB7 {org}",
@@ -718,13 +809,6 @@ window.__ModuleLoader__.load({
718
809
  timelineNoFeedback: "No customer feedback",
719
810
  timelineActual: "Actual result",
720
811
  timelineRoundShort: "Round {round}",
721
- statTotalProjects: "POCs",
722
- statTotalNote: "All projects in the ledger",
723
- statG0Passed: "G0 passed",
724
- statG0CompleteNote: "G0 complete",
725
- statInProgress: "In progress",
726
- statStoppedNote: "Paused/closed/cancelled",
727
- statAmount: "Total amount",
728
812
  statAmountUnit: "10k CNY",
729
813
  colOrg: "System / company",
730
814
  colAmount: "Amount",
@@ -856,6 +940,7 @@ window.__ModuleLoader__.load({
856
940
  filterLabel: "Filters",
857
941
  filterAll: "All",
858
942
  filterSystem: "System",
943
+ filterCompany: "Company",
859
944
  filterStage: "Stage",
860
945
  filterStatus: "Status",
861
946
  filterType: "Type",
@@ -890,13 +975,114 @@ window.__ModuleLoader__.load({
890
975
  tableProgressCell: "{date} \xB7 {count} entries",
891
976
  tableStageSince: "{days} days",
892
977
  tableSortByThis: "Sort by this column",
893
- pendingGrouped: "Group by rule",
894
- pendingUngrouped: "Flat list",
895
- pendingRuleCount: "{count} project(s) hit",
896
978
  pendingExpand: "Expand",
897
979
  pendingCollapse: "Collapse",
898
- pendingMoreProjects: "{count} more project(s)",
899
- pendingEmptyFiltered: "No gaps under the current filters.",
980
+ // ---------- 0.7 · blockers (one story) ----------
981
+ blockerTitle: "Blockers",
982
+ blockerSubtitle: "Every way a project is stuck, from five sources in one list.",
983
+ blockerCount: "{count} item(s)",
984
+ blockerProjectsNote: "{blocked} of {total} project(s) blocked",
985
+ blockerAll: "All",
986
+ blockerSourceGap: "Gap rules",
987
+ blockerSourceStalled: "Stalled",
988
+ blockerSourceMissingAmount: "No amount",
989
+ blockerSourceNoProgress: "No progress",
990
+ blockerSourceNoStageSince: "No stage date",
991
+ blockerEmpty: "No blockers found. Keep it up.",
992
+ blockerEmptyFiltered: "No blockers under the current filters.",
993
+ blockerStalledCopy: "In stage for {days} days (threshold {stallDays}) with no movement.",
994
+ blockerMissingAmountCopy: "No amount recorded: it cannot be ranked, estimated, or checked against the large-amount rule.",
995
+ blockerNoProgressCopy: "Not a single progress entry, so whether this project moved at all is unknown.",
996
+ blockerNoStageSinceCopy: "No stage start date, so the stall clock never started.",
997
+ blockerMoreProjects: "{count} more project(s)",
998
+ blockerOpen: "View",
999
+ blockerLegendHint: "Pick a source to see only it; pick it again to clear.",
1000
+ // ---------- 0.7 · stage-aware detail ----------
1001
+ dtStageSkeleton: "Stage view",
1002
+ dtStageG0Title: "G0 workbench",
1003
+ dtStageG0Copy: "Settle whether this project is worth doing before plan and progress.",
1004
+ dtStageG0Next: "Once the five requirements are present and the review passes, G1 design starts.",
1005
+ dtStageG1Title: "G1 design",
1006
+ dtStageG1Copy: "How to win: pain, metrics, scenarios, edge, and the G1 conclusion.",
1007
+ dtStageG1Next: "After G1 passes and the prerequisites are ready, G2 validation starts.",
1008
+ dtStageG2Title: "G2 validation",
1009
+ dtStageG2Copy: "Whether the prerequisites are ready, and which progress and evidence the run produced.",
1010
+ dtStageG2Next: "Once G2 is Ready with evidence, G3 result validation starts.",
1011
+ dtStageG3Title: "G3 result validation",
1012
+ dtStageG3Copy: "The proof chain: what we proved, and what the customer accepted.",
1013
+ dtStageG3Next: "Once G3-2 is confirmed, G4 conversion starts.",
1014
+ dtStageG4Title: "G4 conversion",
1015
+ dtStageG4Copy: "The four dimensions and the next milestone: value exists, now bank it.",
1016
+ dtStageG4Next: "It is only complete with a milestone owner and a deadline.",
1017
+ dtStageClosedTitle: "Closed",
1018
+ dtStageClosedCopy: "Archive view: the conclusion and the four dimensions, with the stream for review.",
1019
+ dtStageUnknownTitle: "Unrecognized stage",
1020
+ dtStageUnknownCopy: "The ledger value is not a known stage, so every section keeps its full order.",
1021
+ dtStageDone: "This stage is recorded as done",
1022
+ dtStagePending: "This stage still has gaps",
1023
+ dtOtherSections: "Other sections",
1024
+ dtOtherSectionsHint: "Every field is still here; the current stage just moved them down.",
1025
+ // ---------- 0.7 · worklist (empty states that say what to do) ----------
1026
+ worklistTitle: "To fill in",
1027
+ worklistEmpty: "This one is complete.",
1028
+ worklistG0Intro: "Fill in the {count} item(s) below to make G0 complete.",
1029
+ worklistG0Done: "All five requirements are present; G0 review can proceed.",
1030
+ worklistG0Field: "Add {field}",
1031
+ worklistG0Hint: "Fill it in the ledger, then refresh; or export the collection form for a colleague.",
1032
+ worklistNoProgressIntro: "No progress entry yet. One entry needs a goal, an actual result and a next step.",
1033
+ worklistNoProgressAction: "Add the first entry",
1034
+ worklistNoPlanIntro: "The plan is empty: without success criteria nothing can be accepted later.",
1035
+ worklistNoPlanAction: "Add the plan (criteria / scenarios / risks)",
1036
+ worklistNoOutcomeIntro: "No conclusion yet: what was proved, what the customer accepted, what comes next.",
1037
+ worklistNoOutcomeAction: "Add the conclusion",
1038
+ worklistMissingAmountIntro: "No amount, so this project is missing from the budget view.",
1039
+ worklistMissingAmountAction: "Add the amount",
1040
+ worklistMissingStageSinceIntro: "No stage start date, so the stall clock cannot run.",
1041
+ worklistMissingStageSinceAction: "Add the stage start date",
1042
+ worklistFixAll: "{count} item(s) to fill in",
1043
+ worklistDone: "Nothing to fill in. Keep it up.",
1044
+ // ---------- 0.8 · KPI strip ----------
1045
+ kpiTitle: "At a glance",
1046
+ kpiTotal: "Projects",
1047
+ kpiActive: "In progress",
1048
+ kpiBudget: "Budget",
1049
+ kpiBlocked: "Blocked",
1050
+ kpiG0Passed: "G0 passed",
1051
+ kpiStageBreakdown: "By stage",
1052
+ kpiBlockedNote: "{count} project(s)",
1053
+ kpiClickHint: "Pick a figure to filter by it",
1054
+ kpiAllNote: "All {count} project(s)",
1055
+ // ---------- 0.8 · budget panel ----------
1056
+ budgetTitle: "Budget",
1057
+ budgetNote: "Split by review state",
1058
+ budgetTotal: "Total budget",
1059
+ budgetApproved: "G0 passed",
1060
+ budgetPending: "Awaiting review",
1061
+ budgetUnset: "No amount",
1062
+ budgetApprovedNote: "{count} project(s) \xB7 {amount}",
1063
+ budgetPendingNote: "{count} project(s) \xB7 {amount}",
1064
+ budgetUnsetNote: "{count} project(s)",
1065
+ budgetByOrg: "By system",
1066
+ budgetConcentration: "Concentration",
1067
+ budgetConcentrationCopy: "Largest project is {share}%",
1068
+ budgetEmpty: "No amount recorded in the ledger yet.",
1069
+ budgetUnsetWarning: "{count} project(s) have no amount, so the total understates the budget.",
1070
+ // ---------- 0.8 · in-stage completion ----------
1071
+ stageProgressLabel: "Stage progress",
1072
+ stageProgressNote: "{done} of {total} done",
1073
+ stageNoData: "No project at this stage",
1074
+ // ---------- 0.8 · basic info ----------
1075
+ dtBasicTitle: "Basic information",
1076
+ dtCustomerName: "Customer",
1077
+ dtCustomerSystem: "System",
1078
+ dtCustomerCompany: "Company",
1079
+ dtCustomerDepartment: "Department",
1080
+ dtCustomerTech: "Customer tech contact",
1081
+ dtCustomerSponsor: "Customer business sponsor",
1082
+ dtBasicDecisionChain: "Decision chain",
1083
+ dtBasicDecisionChainNone: "Who signs off, and by what process, is not written down.",
1084
+ dtBasicPostPoc: "Post-POC decision",
1085
+ dtBasicPostPocNone: "What the customer does after the POC is not written down.",
900
1086
  // ---------- 0.3 · detail ----------
901
1087
  dtRailTitle: "Project file",
902
1088
  dtStageSection: "Stage",
@@ -997,7 +1183,7 @@ window.__ModuleLoader__.load({
997
1183
  }
998
1184
 
999
1185
  // src/client/shell.tsx
1000
- var import_react2 = require("react");
1186
+ var import_react6 = require("react");
1001
1187
 
1002
1188
  // src/client/preferences.ts
1003
1189
  var DEFAULT_PREFERENCE = { interval: "off", customMinutes: DEFAULT_CUSTOM_MINUTES };
@@ -1076,6 +1262,48 @@ window.__ModuleLoader__.load({
1076
1262
  }
1077
1263
  }
1078
1264
 
1265
+ // src/client/format.ts
1266
+ function formatWan(value) {
1267
+ const rounded = Math.round(value * 10) / 10;
1268
+ return rounded.toLocaleString("zh-CN", { maximumFractionDigits: 1 });
1269
+ }
1270
+ function isCalendarDate(value) {
1271
+ return /^\d{4}-\d{2}-\d{2}$/.test(value);
1272
+ }
1273
+ function formatDate(value, locale, fallback = "") {
1274
+ if (value === null || value === "") return fallback;
1275
+ if (!isCalendarDate(value)) return value;
1276
+ const stamp = /* @__PURE__ */ new Date(`${value}T00:00:00`);
1277
+ if (Number.isNaN(stamp.getTime())) return value;
1278
+ return stamp.toLocaleDateString(locale.toLowerCase().startsWith("zh") ? "zh-CN" : "en-US", {
1279
+ year: "numeric",
1280
+ month: "2-digit",
1281
+ day: "2-digit"
1282
+ });
1283
+ }
1284
+ function clockOf(value, locale) {
1285
+ if (value === null) return "";
1286
+ const stamp = new Date(value);
1287
+ if (Number.isNaN(stamp.getTime())) return "";
1288
+ return stamp.toLocaleTimeString(locale.toLowerCase().startsWith("zh") ? "zh-CN" : "en-US", {
1289
+ hour: "2-digit",
1290
+ minute: "2-digit"
1291
+ });
1292
+ }
1293
+ function stageLabel(t, key) {
1294
+ if (key === "closed") return t("stageClosed");
1295
+ if (key === "unknown") return t("stageUnknown");
1296
+ if (STAGES.includes(key)) return t(`stage${key}`);
1297
+ return key;
1298
+ }
1299
+ function stageBucketKey(project) {
1300
+ if (project.closed) return "closed";
1301
+ return project.stage ?? "unknown";
1302
+ }
1303
+
1304
+ // src/client/detail.tsx
1305
+ var import_react2 = require("react");
1306
+
1079
1307
  // src/client/charts.tsx
1080
1308
  var import_jsx_runtime = require("react/jsx-runtime");
1081
1309
  var TONES = ["blue", "green", "amber", "red", "slate"];
@@ -1320,8 +1548,232 @@ window.__ModuleLoader__.load({
1320
1548
  }
1321
1549
  }
1322
1550
 
1323
- // src/client/detail.tsx
1551
+ // src/client/blockers.tsx
1552
+ var import_react = require("react");
1553
+
1554
+ // src/gap.ts
1555
+ var RULE_META = {
1556
+ // R1: the G0 floor. Nothing downstream is trustworthy without it.
1557
+ "R1-gate0-missing": { no: 1, level: "high", priority: 90 },
1558
+ // R2: a large commitment decided before the gate was cleared.
1559
+ "R2-large-amount-no-g0": { no: 2, level: "high", priority: 94 },
1560
+ // R3: cleared the gate, then never wrote down what success means.
1561
+ "R3-g0-passed-no-plan": { no: 3, level: "high", priority: 92 },
1562
+ // R4–R6: focus. A pilot measuring everything measures nothing.
1563
+ "R4-criteria-count": { no: 4, level: "medium", priority: 50 },
1564
+ "R5-scenarios-count": { no: 5, level: "medium", priority: 48 },
1565
+ "R6-risks-overflow": { no: 6, level: "medium", priority: 46 },
1566
+ // R7: testing before the prerequisites are ready burns team time.
1567
+ "R7-g2-not-ready": { no: 7, level: "high", priority: 84 },
1568
+ // R8–R10: the proof chain, read from the newest progress entry.
1569
+ "R8-progress-no-evidence": { no: 8, level: "high", priority: 82 },
1570
+ "R9-evidence-no-recognition": { no: 9, level: "high", priority: 80 },
1571
+ "R10-g3-1-without-g3-2": { no: 10, level: "high", priority: 78 },
1572
+ // R11: it worked, and nothing followed. The highest-value gap, as the
1573
+ // original design documented: value was created and none of it was banked.
1574
+ "R11-no-next-milestone": { no: 11, level: "high", priority: 96 },
1575
+ // R12: the project has not moved.
1576
+ "R12-stage-stalled": { no: 12, level: "medium", priority: 40 }
1577
+ };
1578
+
1579
+ // src/client/blockers.tsx
1324
1580
  var import_jsx_runtime2 = require("react/jsx-runtime");
1581
+ var SOURCE_TEXT = {
1582
+ gap: "blockerSourceGap",
1583
+ stalled: "blockerSourceStalled",
1584
+ "missing-amount": "blockerSourceMissingAmount",
1585
+ "no-progress": "blockerSourceNoProgress",
1586
+ "no-stage-since": "blockerSourceNoStageSince"
1587
+ };
1588
+ var SOURCE_ORDER = [
1589
+ "gap",
1590
+ "stalled",
1591
+ "no-progress",
1592
+ "missing-amount",
1593
+ "no-stage-since"
1594
+ ];
1595
+ function sourceCopy(row, t) {
1596
+ switch (row.source) {
1597
+ case "stalled":
1598
+ return format(t("blockerStalledCopy"), {
1599
+ days: String(row.params.days ?? ""),
1600
+ stallDays: String(row.params.stallDays ?? "")
1601
+ });
1602
+ case "missing-amount":
1603
+ return t("blockerMissingAmountCopy");
1604
+ case "no-progress":
1605
+ return t("blockerNoProgressCopy");
1606
+ case "no-stage-since":
1607
+ return t("blockerNoStageSinceCopy");
1608
+ case "gap":
1609
+ return "";
1610
+ }
1611
+ }
1612
+ function rowLabel(row, t) {
1613
+ if (row.source !== "gap" || row.rule === null) return t(SOURCE_TEXT[row.source]);
1614
+ const meta = RULE_META[row.rule];
1615
+ return `R${meta.no} ${format(t(`gap.${row.rule}.title`), { ...row.params })}`;
1616
+ }
1617
+ function groupByProject(rows) {
1618
+ const groups = /* @__PURE__ */ new Map();
1619
+ for (const row of rows) {
1620
+ const existing = groups.get(row.pocId);
1621
+ if (existing === void 0) {
1622
+ groups.set(row.pocId, {
1623
+ pocId: row.pocId,
1624
+ pocName: row.pocName,
1625
+ stageLabel: row.stageLabel,
1626
+ rows: [row],
1627
+ level: row.level
1628
+ });
1629
+ continue;
1630
+ }
1631
+ existing.rows.push(row);
1632
+ if (row.level === "high") existing.level = "high";
1633
+ }
1634
+ return [...groups.values()];
1635
+ }
1636
+ function BlockerPanel({ board, visibleIds, t, onOpen }) {
1637
+ const [source, setSource] = (0, import_react.useState)(null);
1638
+ const scoped = (0, import_react.useMemo)(
1639
+ () => visibleIds === null ? board.rows : board.rows.filter((row) => visibleIds.has(row.pocId)),
1640
+ [board.rows, visibleIds]
1641
+ );
1642
+ const counts = (0, import_react.useMemo)(() => {
1643
+ const next = { gap: 0, stalled: 0, "missing-amount": 0, "no-progress": 0, "no-stage-since": 0 };
1644
+ for (const row of scoped) next[row.source] += 1;
1645
+ return next;
1646
+ }, [scoped]);
1647
+ const shown = source === null ? scoped : scoped.filter((row) => row.source === source);
1648
+ const groups = (0, import_react.useMemo)(() => groupByProject(shown), [shown]);
1649
+ const chipEntries = SOURCE_ORDER.filter((key) => counts[key] > 0 || source === key);
1650
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "blockers", children: [
1651
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "blocker-chips", role: "group", "aria-label": t("blockerTitle"), children: [
1652
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1653
+ "button",
1654
+ {
1655
+ type: "button",
1656
+ className: "blocker-chip",
1657
+ "data-active": source === null,
1658
+ onClick: () => setSource(null),
1659
+ title: t("blockerLegendHint"),
1660
+ children: [
1661
+ t("blockerAll"),
1662
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "blocker-chip-count", children: scoped.length })
1663
+ ]
1664
+ }
1665
+ ),
1666
+ chipEntries.map((key) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1667
+ "button",
1668
+ {
1669
+ type: "button",
1670
+ className: "blocker-chip",
1671
+ "data-active": source === key,
1672
+ "data-source": key,
1673
+ onClick: () => setSource(source === key ? null : key),
1674
+ title: t("blockerLegendHint"),
1675
+ children: [
1676
+ t(SOURCE_TEXT[key]),
1677
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "blocker-chip-count", children: counts[key] })
1678
+ ]
1679
+ },
1680
+ key
1681
+ ))
1682
+ ] }),
1683
+ groups.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "blocker-empty", children: t("blockerEmptyFiltered") }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "blocker-list", children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: "blocker-group", "data-level": group.level, children: [
1684
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { className: "blocker-group-head", children: [
1685
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("button", { type: "button", className: "blocker-project", onClick: () => onOpen(group.pocId), children: [
1686
+ group.pocName === "" ? group.pocId : group.pocName,
1687
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "blocker-project-id", children: group.pocId })
1688
+ ] }),
1689
+ group.stageLabel === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "blocker-stage", children: group.stageLabel }),
1690
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "blocker-group-count", children: group.rows.length })
1691
+ ] }),
1692
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { className: "blocker-rows", children: group.rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("li", { className: "blocker-row", "data-source": row.source, children: [
1693
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "blocker-row-headline", children: rowLabel(row, t) }),
1694
+ row.source === "gap" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "blocker-row-copy", children: sourceCopy(row, t) })
1695
+ ] }, `${row.source}:${row.rule ?? index}`)) })
1696
+ ] }, group.pocId)) })
1697
+ ] });
1698
+ }
1699
+ var G0_WORK_LABEL = {
1700
+ why_customer: "whyCustomerTest",
1701
+ why_us: "whyWeTest",
1702
+ decision_chain: "decisionChain",
1703
+ post_poc_decision: "postPocDecision",
1704
+ tech_owner: "customerTechOwner"
1705
+ };
1706
+ function Worklist({ detail, rows, t }) {
1707
+ const items = (0, import_react.useMemo)(() => {
1708
+ const next = [];
1709
+ const missing = detail.gate0.checklist.filter((item) => !item.present);
1710
+ for (const item of missing) {
1711
+ const label = t(G0_WORK_LABEL[item.field] ?? item.field);
1712
+ next.push({
1713
+ key: `g0:${item.field}`,
1714
+ label: format(t("worklistG0Field"), { field: label }),
1715
+ copy: t("worklistG0Intro", { count: String(missing.length) }),
1716
+ action: t("worklistG0Hint")
1717
+ });
1718
+ }
1719
+ const has = (source) => (rows ?? []).some((row) => row.source === source);
1720
+ if (has("missing-amount")) {
1721
+ next.push({
1722
+ key: "amount",
1723
+ label: t("worklistMissingAmountAction"),
1724
+ copy: t("worklistMissingAmountIntro"),
1725
+ action: ""
1726
+ });
1727
+ }
1728
+ if (has("no-stage-since")) {
1729
+ next.push({
1730
+ key: "stage-since",
1731
+ label: t("worklistMissingStageSinceAction"),
1732
+ copy: t("worklistMissingStageSinceIntro"),
1733
+ action: ""
1734
+ });
1735
+ }
1736
+ if (has("no-progress")) {
1737
+ next.push({
1738
+ key: "progress",
1739
+ label: t("worklistNoProgressAction"),
1740
+ copy: t("worklistNoProgressIntro"),
1741
+ action: ""
1742
+ });
1743
+ }
1744
+ if (detail.plan.criteria.length === 0) {
1745
+ next.push({
1746
+ key: "plan",
1747
+ label: t("worklistNoPlanAction"),
1748
+ copy: t("worklistNoPlanIntro"),
1749
+ action: ""
1750
+ });
1751
+ }
1752
+ if (detail.outcome.overall === "" && detail.outcome.achievement === "") {
1753
+ next.push({
1754
+ key: "outcome",
1755
+ label: t("worklistNoOutcomeAction"),
1756
+ copy: t("worklistNoOutcomeIntro"),
1757
+ action: ""
1758
+ });
1759
+ }
1760
+ return next;
1761
+ }, [detail, rows, t]);
1762
+ if (items.length === 0) {
1763
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "worklist", "data-empty": "true", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "worklist-done", children: t("worklistDone") }) });
1764
+ }
1765
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "worklist", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { className: "worklist-items", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("li", { className: "worklist-item", children: [
1766
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "worklist-mark", "aria-hidden": "true", children: "\u25A1" }),
1767
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "worklist-text", children: [
1768
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "worklist-label", children: item.label }),
1769
+ item.copy === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "worklist-copy", children: item.copy }),
1770
+ item.action === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "worklist-action", children: item.action })
1771
+ ] })
1772
+ ] }, item.key)) }) });
1773
+ }
1774
+
1775
+ // src/client/detail.tsx
1776
+ var import_jsx_runtime3 = require("react/jsx-runtime");
1325
1777
  var DIMENSION_TEXT = {
1326
1778
  achievement: "dimAchievement",
1327
1779
  evidence: "dimEvidence",
@@ -1342,21 +1794,6 @@ window.__ModuleLoader__.load({
1342
1794
  tech_owner: "customerTechOwner"
1343
1795
  };
1344
1796
  var G0_PROSE = /* @__PURE__ */ new Set(["why_customer", "why_us"]);
1345
- function formatWan(value) {
1346
- const rounded = Math.round(value * 10) / 10;
1347
- return rounded.toLocaleString("zh-CN", { maximumFractionDigits: 1 });
1348
- }
1349
- function formatDate(value, locale) {
1350
- if (value === null || value === "") return "";
1351
- if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) return value;
1352
- const stamp = /* @__PURE__ */ new Date(`${value}T00:00:00`);
1353
- if (Number.isNaN(stamp.getTime())) return value;
1354
- return stamp.toLocaleDateString(locale.toLowerCase().startsWith("zh") ? "zh-CN" : "en-US", {
1355
- year: "numeric",
1356
- month: "2-digit",
1357
- day: "2-digit"
1358
- });
1359
- }
1360
1797
  function recognitionTone(value) {
1361
1798
  if (value === "\u8BA4\u53EF") return "green";
1362
1799
  if (value === "\u90E8\u5206\u8BA4\u53EF" || value === "\u5F85\u786E\u8BA4") return "amber";
@@ -1376,41 +1813,77 @@ window.__ModuleLoader__.load({
1376
1813
  if (!Number.isFinite(parsed)) return null;
1377
1814
  return Math.min(1, Math.max(0, parsed / 100));
1378
1815
  }
1816
+ var SKELETON_FOR = {
1817
+ G0: { sections: ["basic", "gate0", "plan"], title: "dtStageG0Title", copy: "dtStageG0Copy", next: "dtStageG0Next" },
1818
+ G1: { sections: ["basic", "plan", "progress"], title: "dtStageG1Title", copy: "dtStageG1Copy", next: "dtStageG1Next" },
1819
+ G2: { sections: ["basic", "plan", "progress"], title: "dtStageG2Title", copy: "dtStageG2Copy", next: "dtStageG2Next" },
1820
+ G3: { sections: ["progress", "dimensions", "basic"], title: "dtStageG3Title", copy: "dtStageG3Copy", next: "dtStageG3Next" },
1821
+ G4: { sections: ["dimensions", "outcome", "basic"], title: "dtStageG4Title", copy: "dtStageG4Copy", next: "dtStageG4Next" },
1822
+ closed: { sections: ["outcome", "dimensions", "basic"], title: "dtStageClosedTitle", copy: "dtStageClosedCopy", next: "dtStageG4Next" },
1823
+ unknown: {
1824
+ sections: ["basic", "progress", "dimensions", "gate0", "plan", "outcome"],
1825
+ title: "dtStageUnknownTitle",
1826
+ copy: "dtStageUnknownCopy",
1827
+ next: "dtStageUnknownCopy"
1828
+ }
1829
+ };
1830
+ function stageStateOf(detail) {
1831
+ const stage = detail.summary.stage;
1832
+ if (detail.summary.closed) return { done: true, pending: false };
1833
+ if (stage === null) return { done: false, pending: true };
1834
+ const index = STAGES.indexOf(stage);
1835
+ if (index === -1) return { done: false, pending: true };
1836
+ const done = detail.summary.stageDone[index] === true;
1837
+ return { done, pending: !done };
1838
+ }
1839
+ function StageContext({ stage, done, pending, t }) {
1840
+ const key = stage ?? "unknown";
1841
+ const skeleton = SKELETON_FOR[key] ?? SKELETON_FOR.unknown;
1842
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: "dt-stage-context", "data-done": done, "aria-label": t("dtStageSkeleton"), children: [
1843
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-stage-context-head", children: [
1844
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "dt-stage-context-title", children: t(skeleton.title) }),
1845
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-stage-context-kicker", children: t("dtStageSkeleton") })
1846
+ ] }),
1847
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dt-stage-context-copy", children: t(skeleton.copy) }),
1848
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dt-stage-context-next", children: t(skeleton.next) }),
1849
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-stage-context-state", children: pending ? t("dtStagePending") : t("dtStageDone") })
1850
+ ] });
1851
+ }
1379
1852
  function Section({ title, kicker, children }) {
1380
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("section", { className: "dsec", children: [
1381
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { className: "dsec-head", children: [
1382
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { className: "dsec-title", children: title }),
1383
- kicker === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dsec-kicker", children: kicker })
1853
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: "dsec", children: [
1854
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "dsec-head", children: [
1855
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "dsec-title", children: title }),
1856
+ kicker === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dsec-kicker", children: kicker })
1384
1857
  ] }),
1385
1858
  children
1386
1859
  ] });
1387
1860
  }
1388
1861
  function Blank({ text }) {
1389
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dsec-blank", children: text });
1862
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "dsec-blank", children: text });
1390
1863
  }
1391
1864
  function Prose({ label, value, t }) {
1392
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dt-prose", "data-empty": value === "", children: [
1393
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dt-prose-label", children: label }),
1394
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "dt-prose-body prose", children: value === "" ? t("emptyField") : value })
1865
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-prose", "data-empty": value === "", children: [
1866
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-prose-label", children: label }),
1867
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dt-prose-body prose", children: value === "" ? t("emptyField") : value })
1395
1868
  ] });
1396
1869
  }
1397
1870
  function RailMeta({ label, value, t }) {
1398
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dt-rail-meta-row", children: [
1399
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dt-rail-meta-label", children: label }),
1400
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dt-rail-meta-value", "data-empty": value === "", children: value === "" ? t("dtUnset") : value })
1871
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-rail-meta-row", children: [
1872
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-rail-meta-label", children: label }),
1873
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-rail-meta-value", "data-empty": value === "", children: value === "" ? t("dtUnset") : value })
1401
1874
  ] });
1402
1875
  }
1403
1876
  function StageTrackVertical({ detail, t }) {
1404
1877
  const currentIndex = detail.summary.stage === null ? -1 : STAGES.indexOf(detail.summary.stage);
1405
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ol", { className: "dt-stages", "aria-label": t("stageTrack"), children: STAGES.map((stage, index) => {
1878
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ol", { className: "dt-stages", "aria-label": t("stageTrack"), children: STAGES.map((stage, index) => {
1406
1879
  const done = detail.summary.closed ? true : detail.summary.stageDone[index] === true;
1407
1880
  const current = !detail.summary.closed && index === currentIndex;
1408
1881
  const state = done ? t("stageDone") : current ? t("stageCurrent") : t("stagePending");
1409
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("li", { className: "dt-stage", "data-done": done, "data-current": current, "aria-current": current ? "step" : void 0, children: [
1410
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dt-stage-marker", "aria-hidden": "true", children: done ? "\u2713" : current ? "\u25C9" : index + 1 }),
1411
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dt-stage-text", children: [
1412
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dt-stage-label", children: t(`stage${stage}`) }),
1413
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dt-stage-state", children: state })
1882
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "dt-stage", "data-done": done, "data-current": current, "aria-current": current ? "step" : void 0, children: [
1883
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-stage-marker", "aria-hidden": "true", children: done ? "\u2713" : current ? "\u25C9" : index + 1 }),
1884
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "dt-stage-text", children: [
1885
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-stage-label", children: t(`stage${stage}`) }),
1886
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-stage-state", children: state })
1414
1887
  ] })
1415
1888
  ] }, stage);
1416
1889
  }) });
@@ -1430,67 +1903,69 @@ window.__ModuleLoader__.load({
1430
1903
  recognition: detail.outcome.customerRecognition !== "",
1431
1904
  nextMilestone: detail.outcome.milestone !== ""
1432
1905
  };
1433
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("aside", { className: "dt-rail", "aria-label": t("dtRailTitle"), children: [
1434
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dt-rail-head", children: [
1435
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { type: "button", className: "btn btn-small dt-rail-back", onClick: onBack, children: t("back") }),
1436
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h1", { className: "dt-rail-title", children: summary.name }),
1437
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dt-rail-id mono", children: summary.pocId }),
1438
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dt-rail-pills", children: [
1439
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "status-pill tone-blue", children: [
1440
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "status-dot" }),
1906
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("aside", { className: "dt-rail", "aria-label": t("dtRailTitle"), children: [
1907
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-rail-head", children: [
1908
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", className: "btn btn-small dt-rail-back", onClick: onBack, children: t("back") }),
1909
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h1", { className: "dt-rail-title", children: summary.name }),
1910
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-rail-id mono", children: summary.pocId }),
1911
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-rail-pills", children: [
1912
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "status-pill tone-blue", children: [
1913
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
1441
1914
  summary.closed ? t("stageClosed") : summary.stageLabel === "" ? t("stageUnknown") : summary.stageLabel
1442
1915
  ] }),
1443
- summary.status === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "status-pill tone-slate", children: summary.status }),
1444
- summary.priority === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "status-pill tone-amber", children: summary.priority })
1916
+ summary.status === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-pill tone-slate", children: summary.status }),
1917
+ summary.priority === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-pill tone-amber", children: summary.priority })
1445
1918
  ] })
1446
1919
  ] }),
1447
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dt-rail-amount", children: [
1448
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dt-rail-amount-label", children: t("dtAmountLabel") }),
1449
- summary.amountWan === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dt-rail-amount-value", "data-empty": "true", children: t("dtUnset") }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dt-rail-amount-value", children: [
1920
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-rail-amount", children: [
1921
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-rail-amount-label", children: t("dtAmountLabel") }),
1922
+ summary.amountWan === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-rail-amount-value", "data-empty": "true", children: t("dtUnset") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "dt-rail-amount-value", children: [
1450
1923
  formatWan(summary.amountWan),
1451
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dt-rail-amount-unit", children: t("statAmountUnit") })
1924
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-rail-amount-unit", children: t("statAmountUnit") })
1452
1925
  ] })
1453
1926
  ] }),
1454
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dt-rail-block", children: [
1455
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { className: "dt-rail-block-title", children: t("dtStageSection") }),
1456
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StageTrackVertical, { detail, t })
1927
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-rail-block", children: [
1928
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "dt-rail-block-title", children: t("dtStageSection") }),
1929
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(StageTrackVertical, { detail, t })
1457
1930
  ] }),
1458
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dt-rail-block", children: [
1459
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { className: "dt-rail-block-title", children: t("dtDimensionSection") }),
1460
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dt-rail-dims", children: DIMENSIONS.map((key) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dim-mini", "data-present": present[key], "data-origin": DIMENSION_ORIGIN[key], title: `${t(DIMENSION_TEXT[key])}: ${present[key] ? resolved[key] : t("dimMissing")}`, children: [
1461
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dim-mini-mark", "aria-hidden": "true", children: present[key] ? "\u2713" : "\u2717" }),
1462
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dim-mini-label", children: t(DIMENSION_TEXT[key]) })
1931
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-rail-block", children: [
1932
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "dt-rail-block-title", children: t("dtDimensionSection") }),
1933
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "dt-rail-dims", children: DIMENSIONS.map((key) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dim-mini", "data-present": present[key], "data-origin": DIMENSION_ORIGIN[key], title: `${t(DIMENSION_TEXT[key])}: ${present[key] ? resolved[key] : t("dimMissing")}`, children: [
1934
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dim-mini-mark", "aria-hidden": "true", children: present[key] ? "\u2713" : "\u2717" }),
1935
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dim-mini-label", children: t(DIMENSION_TEXT[key]) })
1463
1936
  ] }, key)) })
1464
1937
  ] }),
1465
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dt-rail-block", children: [
1466
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { className: "dt-rail-block-title", children: t("dtGapSection") }),
1467
- gaps.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "dt-rail-empty", children: t("dtNoGaps") }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { className: "dt-rail-gaps", children: gaps.map((item) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("li", { className: "dt-rail-gap", "data-level": item.level, children: [
1468
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "dt-rail-gap-no", children: [
1938
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-rail-block", children: [
1939
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "dt-rail-block-title", children: t("dtGapSection") }),
1940
+ gaps.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dt-rail-empty", children: t("dtNoGaps") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: "dt-rail-gaps", children: gaps.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "dt-rail-gap", "data-level": item.level, children: [
1941
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "dt-rail-gap-no", children: [
1469
1942
  "R",
1470
1943
  item.ruleNo
1471
1944
  ] }),
1472
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dt-rail-gap-title", children: format(t(`gap.${item.rule}.title`), { ...item.params ?? {} }) })
1945
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-rail-gap-title", children: format(t(`gap.${item.rule}.title`), { ...item.params ?? {} }) })
1473
1946
  ] }, item.rule)) })
1474
1947
  ] }),
1475
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dt-rail-block", children: [
1476
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h2", { className: "dt-rail-block-title", children: t("sectionIdentity") }),
1477
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dt-rail-meta", children: [
1478
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RailMeta, { label: t("dtOwnerLabel"), value: summary.owner, t }),
1479
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RailMeta, { label: t("dtTechOwnerLabel"), value: summary.techOwner, t }),
1480
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RailMeta, { label: t("dtSalesLabel"), value: detail.sales, t }),
1481
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RailMeta, { label: t("dtSponsorLabel"), value: detail.execSponsor, t }),
1482
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RailMeta, { label: t("type"), value: summary.pocType, t }),
1483
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RailMeta, { label: t("dtStageSinceLabel"), value: summary.stageSince === null ? "" : `${formatDate(summary.stageSince, locale)}${summary.daysInStage === null ? "" : ` \xB7 ${format(t("daysInStage"), { days: summary.daysInStage })}`}`, t }),
1484
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RailMeta, { label: t("dtPriorityLabel"), value: summary.priority, t })
1948
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-rail-block", children: [
1949
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "dt-rail-block-title", children: t("sectionIdentity") }),
1950
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-rail-meta", children: [
1951
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RailMeta, { label: t("dtCustomerCompany"), value: orgText(detail.org.company), t }),
1952
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RailMeta, { label: t("dtCustomerSystem"), value: orgText(detail.org.system), t }),
1953
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RailMeta, { label: t("dtOwnerLabel"), value: summary.owner, t }),
1954
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RailMeta, { label: t("dtTechOwnerLabel"), value: summary.techOwner, t }),
1955
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RailMeta, { label: t("dtSalesLabel"), value: detail.sales, t }),
1956
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RailMeta, { label: t("dtSponsorLabel"), value: detail.execSponsor, t }),
1957
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RailMeta, { label: t("type"), value: summary.pocType, t }),
1958
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RailMeta, { label: t("dtStageSinceLabel"), value: summary.stageSince === null ? "" : `${formatDate(summary.stageSince, locale)}${summary.daysInStage === null ? "" : ` \xB7 ${format(t("daysInStage"), { days: summary.daysInStage })}`}`, t }),
1959
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RailMeta, { label: t("dtPriorityLabel"), value: summary.priority, t })
1485
1960
  ] })
1486
1961
  ] }),
1487
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dt-rail-nav", children: [
1488
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("button", { type: "button", className: "btn btn-small", disabled: onPrev === null, onClick: onPrev ?? void 0, children: [
1962
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-rail-nav", children: [
1963
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", className: "btn btn-small", disabled: onPrev === null, onClick: onPrev ?? void 0, children: [
1489
1964
  "\u2190 ",
1490
1965
  t("dtPrevProject")
1491
1966
  ] }),
1492
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dt-rail-position", children: format(t("dtPosition"), { index: position.index, total: position.total }) }),
1493
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("button", { type: "button", className: "btn btn-small", disabled: onNext === null, onClick: onNext ?? void 0, children: [
1967
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-rail-position", children: format(t("dtPosition"), { index: position.index, total: position.total }) }),
1968
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", className: "btn btn-small", disabled: onNext === null, onClick: onNext ?? void 0, children: [
1494
1969
  t("dtNextProject"),
1495
1970
  " \u2192"
1496
1971
  ] })
@@ -1501,84 +1976,84 @@ window.__ModuleLoader__.load({
1501
1976
  const tone = recognitionTone(entry.customer.recognition);
1502
1977
  const ratio = completionRatio(entry.completion);
1503
1978
  const hasNext = entry.next.goal !== "" || entry.next.owner !== "" || entry.next.deadline !== "";
1504
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("li", { className: "prog-item", "data-tone": tone, "data-latest": index === 0, children: [
1505
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "prog-gutter", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-node", "data-tone": tone }) }),
1506
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("article", { className: "prog-card", children: [
1507
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { className: "prog-head", children: [
1508
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("time", { className: "prog-date", dateTime: entry.date, children: formatDate(entry.date, locale) || "\u2014" }),
1509
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-type", children: entry.type === "" ? t("progressTypeUnset") : entry.type }),
1510
- entry.seq === null ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-seq", children: format(t("dtProgressSeq"), { seq: entry.seq }) }),
1511
- ratio === null ? entry.completion === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "prog-chip", children: [
1979
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "prog-item", "data-tone": tone, "data-latest": index === 0, children: [
1980
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "prog-gutter", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-node", "data-tone": tone }) }),
1981
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("article", { className: "prog-card", children: [
1982
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "prog-head", children: [
1983
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("time", { className: "prog-date", dateTime: entry.date, children: formatDate(entry.date, locale) || "\u2014" }),
1984
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-type", children: entry.type === "" ? t("progressTypeUnset") : entry.type }),
1985
+ entry.seq === null ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-seq", children: format(t("dtProgressSeq"), { seq: entry.seq }) }),
1986
+ ratio === null ? entry.completion === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "prog-chip", children: [
1512
1987
  t("dtProgressCompletion"),
1513
1988
  " ",
1514
1989
  entry.completion
1515
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "prog-meter", children: [
1516
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-meter-label", children: t("dtProgressCompletion") }),
1517
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(InlineMeter, { value: ratio, max: 1, tone: ratio >= 1 ? "green" : "blue" }),
1518
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-meter-value", children: entry.completion })
1990
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "prog-meter", children: [
1991
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-meter-label", children: t("dtProgressCompletion") }),
1992
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InlineMeter, { value: ratio, max: 1, tone: ratio >= 1 ? "green" : "blue" }),
1993
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-meter-value", children: entry.completion })
1519
1994
  ] })
1520
1995
  ] }),
1521
- entry.goal === "" && entry.actual === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "prog-pair", children: [
1522
- entry.goal === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "prog-goal", children: [
1523
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-pair-label", children: t("dtProgressGoal") }),
1524
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-pair-value", children: entry.goal })
1996
+ entry.goal === "" && entry.actual === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "prog-pair", children: [
1997
+ entry.goal === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "prog-goal", children: [
1998
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-pair-label", children: t("dtProgressGoal") }),
1999
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-pair-value", children: entry.goal })
1525
2000
  ] }),
1526
- entry.actual === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "prog-actual", children: [
1527
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-pair-label", children: t("dtProgressActual") }),
1528
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-pair-value", children: entry.actual })
2001
+ entry.actual === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "prog-actual", children: [
2002
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-pair-label", children: t("dtProgressActual") }),
2003
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-pair-value", children: entry.actual })
1529
2004
  ] })
1530
2005
  ] }),
1531
- entry.items.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "prog-scope", children: [
1532
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-scope-label", children: t("dtProgressScope") }),
1533
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "chip-row", children: entry.items.map((item, itemIndex) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "chip", children: item }, `${item}:${itemIndex}`)) })
2006
+ entry.items.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "prog-scope", children: [
2007
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-scope-label", children: t("dtProgressScope") }),
2008
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "chip-row", children: entry.items.map((item, itemIndex) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chip", children: item }, `${item}:${itemIndex}`)) })
1534
2009
  ] }),
1535
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "prog-evidence", children: [
1536
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-block-label", children: t("dtProgressEvidence") }),
1537
- entry.evidence.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-missing", children: t("dtProgressEvidenceNone") }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "chip-row", children: entry.evidence.map((item, itemIndex) => {
2010
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "prog-evidence", children: [
2011
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-block-label", children: t("dtProgressEvidence") }),
2012
+ entry.evidence.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-missing", children: t("dtProgressEvidenceNone") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "chip-row", children: entry.evidence.map((item, itemIndex) => {
1538
2013
  const label = `${item.type === "" ? "" : `${item.type} \xB7 `}${item.title === "" ? t("emptyField") : item.title}`;
1539
- return item.link === "" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "chip", children: label }, `${item.title}:${itemIndex}`) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("a", { className: "chip prog-evidence-link", href: item.link, target: "_blank", rel: "noreferrer", title: item.link, children: [
2014
+ return item.link === "" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chip", children: label }, `${item.title}:${itemIndex}`) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("a", { className: "chip prog-evidence-link", href: item.link, target: "_blank", rel: "noreferrer", title: item.link, children: [
1540
2015
  label,
1541
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-external", "aria-hidden": "true", children: "\u2197" })
2016
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-external", "aria-hidden": "true", children: "\u2197" })
1542
2017
  ] }, `${item.title}:${itemIndex}`);
1543
2018
  }) })
1544
2019
  ] }),
1545
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "prog-customer", children: [
1546
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-block-label", children: t("dtProgressCustomer") }),
1547
- entry.customer.syncedWith === "" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-missing", children: t("dtProgressCustomerNone") }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "chip", children: entry.customer.syncedWith }),
1548
- entry.customer.recognition === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: `status-pill tone-${tone}`, children: [
1549
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "status-dot" }),
2020
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "prog-customer", children: [
2021
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-block-label", children: t("dtProgressCustomer") }),
2022
+ entry.customer.syncedWith === "" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-missing", children: t("dtProgressCustomerNone") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chip", children: entry.customer.syncedWith }),
2023
+ entry.customer.recognition === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${tone}`, children: [
2024
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
1550
2025
  entry.customer.recognition
1551
2026
  ] }),
1552
- entry.gate3_1 === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "chip", children: [
2027
+ entry.gate3_1 === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "chip", children: [
1553
2028
  t("gate3_1Label"),
1554
2029
  "\uFF1A",
1555
2030
  entry.gate3_1
1556
2031
  ] }),
1557
- entry.gate3_2 === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "chip", children: [
2032
+ entry.gate3_2 === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "chip", children: [
1558
2033
  t("gate3_2Label"),
1559
2034
  "\uFF1A",
1560
2035
  entry.gate3_2
1561
2036
  ] })
1562
2037
  ] }),
1563
- entry.customer.feedback === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "prog-feedback", children: [
1564
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-block-label", children: t("dtProgressFeedback") }),
1565
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-feedback-copy prose", children: entry.customer.feedback })
2038
+ entry.customer.feedback === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "prog-feedback", children: [
2039
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-block-label", children: t("dtProgressFeedback") }),
2040
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-feedback-copy prose", children: entry.customer.feedback })
1566
2041
  ] }),
1567
- hasNext ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "prog-next", children: [
1568
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-next-label", children: t("dtProgressNext") }),
1569
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "prog-next-body", children: [
1570
- entry.next.goal === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-next-goal", children: entry.next.goal }),
1571
- entry.next.owner === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "chip", children: [
2042
+ hasNext ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "prog-next", children: [
2043
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-next-label", children: t("dtProgressNext") }),
2044
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "prog-next-body", children: [
2045
+ entry.next.goal === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-next-goal", children: entry.next.goal }),
2046
+ entry.next.owner === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "chip", children: [
1572
2047
  "@ ",
1573
2048
  entry.next.owner
1574
2049
  ] }),
1575
- entry.next.deadline === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "chip", children: [
2050
+ entry.next.deadline === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "chip", children: [
1576
2051
  t("dtProgressDeadline"),
1577
2052
  " ",
1578
2053
  formatDate(entry.next.deadline, locale)
1579
2054
  ] })
1580
2055
  ] })
1581
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "prog-next prog-next-empty", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "prog-missing", children: t("dtProgressNextNone") }) })
2056
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "prog-next prog-next-empty", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-missing", children: t("dtProgressNextNone") }) })
1582
2057
  ] })
1583
2058
  ] });
1584
2059
  }
@@ -1587,10 +2062,10 @@ window.__ModuleLoader__.load({
1587
2062
  if (left.date !== right.date) return right.date.localeCompare(left.date);
1588
2063
  return (right.seq ?? 0) - (left.seq ?? 0);
1589
2064
  });
1590
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Section, { title: t("dtProgressTitle"), kicker: format(t("dtProgressCount"), { count: ordered.length }), children: ordered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dsec-empty", children: [
1591
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h3", { className: "dsec-empty-title", children: t("dtProgressEmptyTitle") }),
1592
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "dsec-empty-copy", children: t("dtProgressEmptyCopy") })
1593
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ol", { className: "prog-stream", children: ordered.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ProgressItem, { entry, index, t, locale }, `${entry.date}:${entry.seq ?? index}`)) }) });
2065
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Section, { title: t("dtProgressTitle"), kicker: format(t("dtProgressCount"), { count: ordered.length }), children: ordered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dsec-empty", children: [
2066
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "dsec-empty-title", children: t("dtProgressEmptyTitle") }),
2067
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dsec-empty-copy", children: t("dtProgressEmptyCopy") })
2068
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ol", { className: "prog-stream", children: ordered.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ProgressItem, { entry, index, t, locale }, `${entry.date}:${entry.seq ?? index}`)) }) });
1594
2069
  }
1595
2070
  function DimensionGrid({ detail, t }) {
1596
2071
  const values = {
@@ -1599,14 +2074,14 @@ window.__ModuleLoader__.load({
1599
2074
  recognition: detail.outcome.customerRecognition,
1600
2075
  nextMilestone: detail.outcome.milestone
1601
2076
  };
1602
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Section, { title: t("dtDimensionSection"), kicker: format(t("dimensionCount"), { count: detail.summary.dimensionCount }), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "dim-grid-detail", children: DIMENSIONS.map((key) => {
2077
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Section, { title: t("dtDimensionSection"), kicker: format(t("dimensionCount"), { count: detail.summary.dimensionCount }), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "dim-grid-detail", children: DIMENSIONS.map((key) => {
1603
2078
  const present = values[key] !== "";
1604
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dim-card", "data-present": present, "data-origin": DIMENSION_ORIGIN[key], children: [
1605
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dim-card-label", children: t(DIMENSION_TEXT[key]) }),
1606
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dim-card-mark", "aria-hidden": "true", children: present ? "\u2713" : "\u2717" }),
1607
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dim-card-value", children: present ? values[key] : t("dimMissing") }),
1608
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dim-card-origin", children: DIMENSION_ORIGIN[key] === "auto" ? t("dtDimensionAuto") : t("dtDimensionManual") }),
1609
- present ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "dim-card-reason", children: t("dtDimensionEmptyReason") })
2079
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dim-card", "data-present": present, "data-origin": DIMENSION_ORIGIN[key], children: [
2080
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dim-card-label", children: t(DIMENSION_TEXT[key]) }),
2081
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dim-card-mark", "aria-hidden": "true", children: present ? "\u2713" : "\u2717" }),
2082
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dim-card-value", children: present ? values[key] : t("dimMissing") }),
2083
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dim-card-origin", children: DIMENSION_ORIGIN[key] === "auto" ? t("dtDimensionAuto") : t("dtDimensionManual") }),
2084
+ present ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dim-card-reason", children: t("dtDimensionEmptyReason") })
1610
2085
  ] }, key);
1611
2086
  }) }) });
1612
2087
  }
@@ -1618,22 +2093,22 @@ window.__ModuleLoader__.load({
1618
2093
  date: detail.gate0.reviewedAt === "" ? t("dtUnset") : detail.gate0.reviewedAt,
1619
2094
  conclusion: detail.gate0.conclusion
1620
2095
  });
1621
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Section, { title: t("dtG0Title"), kicker: format(t("dtG0FiveRequired"), { present: presentCount }), children: [
1622
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "g0-meter", role: "group", "aria-label": t("dtG0Title"), children: checklist.map((item) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "g0-cell", "data-present": item.present, title: `${t(G0_LABEL[item.field] ?? item.field)}: ${item.present ? t("dtG0Present") : t("dtG0Missing")}`, children: [
1623
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "g0-cell-mark", "aria-hidden": "true", children: item.present ? "\u2713" : "\u2717" }),
1624
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "g0-cell-label", children: t(G0_LABEL[item.field] ?? item.field) })
2096
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Section, { title: t("dtG0Title"), kicker: format(t("dtG0FiveRequired"), { present: presentCount }), children: [
2097
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "g0-meter", role: "group", "aria-label": t("dtG0Title"), children: checklist.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "g0-cell", "data-present": item.present, title: `${t(G0_LABEL[item.field] ?? item.field)}: ${item.present ? t("dtG0Present") : t("dtG0Missing")}`, children: [
2098
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "g0-cell-mark", "aria-hidden": "true", children: item.present ? "\u2713" : "\u2717" }),
2099
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "g0-cell-label", children: t(G0_LABEL[item.field] ?? item.field) })
1625
2100
  ] }, item.field)) }),
1626
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "g0-fields", children: checklist.map((item) => {
2101
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "g0-fields", children: checklist.map((item) => {
1627
2102
  const label = t(G0_LABEL[item.field] ?? item.field);
1628
2103
  const prose = G0_PROSE.has(item.field);
1629
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "g0-field", "data-present": item.present, "data-prose": prose, children: [
1630
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "g0-field-label", children: label }),
1631
- item.present ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "g0-field-value prose", children: item.value }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "g0-field-missing", children: t("dtG0Missing") })
2104
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "g0-field", "data-present": item.present, "data-prose": prose, children: [
2105
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "g0-field-label", children: label }),
2106
+ item.present ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "g0-field-value prose", children: item.value }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "g0-field-missing", children: t("dtG0Missing") })
1632
2107
  ] }, item.field);
1633
2108
  }) }),
1634
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "g0-foot", children: [
1635
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "g0-review", "data-empty": detail.gate0.conclusion === "", children: review }),
1636
- detail.gate0.competitor === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "chip", children: [
2109
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "g0-foot", children: [
2110
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "g0-review", "data-empty": detail.gate0.conclusion === "", children: review }),
2111
+ detail.gate0.competitor === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "chip", children: [
1637
2112
  t("competitor"),
1638
2113
  "\uFF1A",
1639
2114
  detail.gate0.competitor
@@ -1641,79 +2116,119 @@ window.__ModuleLoader__.load({
1641
2116
  ] })
1642
2117
  ] });
1643
2118
  }
2119
+ function orgText(value) {
2120
+ return value === null || value === void 0 ? "" : value;
2121
+ }
2122
+ function BasicInfo({ detail, t }) {
2123
+ const summary = detail.summary;
2124
+ const rows = [
2125
+ { key: "company", label: t("dtCustomerCompany"), value: orgText(detail.org.company) },
2126
+ { key: "system", label: t("dtCustomerSystem"), value: orgText(detail.org.system) },
2127
+ { key: "department", label: t("dtCustomerDepartment"), value: orgText(detail.org.department) },
2128
+ { key: "owner", label: t("dtOwnerLabel"), value: summary.owner },
2129
+ { key: "tech", label: t("dtCustomerTech"), value: summary.techOwner },
2130
+ { key: "sales", label: t("dtSalesLabel"), value: detail.sales },
2131
+ { key: "sponsor", label: t("dtCustomerSponsor"), value: detail.execSponsor },
2132
+ { key: "amount", label: t("dtAmountLabel"), value: summary.amountWan === 0 ? "" : `${formatWan(summary.amountWan)} ${t("statAmountUnit")}` }
2133
+ ];
2134
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Section, { title: t("dtBasicTitle"), children: [
2135
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dl", { className: "dt-basic-grid", children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-basic-row", "data-empty": row.value === "", children: [
2136
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dt", { className: "dt-basic-label", children: row.label }),
2137
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dd", { className: "dt-basic-value", children: row.value === "" ? t("dtUnset") : row.value })
2138
+ ] }, row.key)) }),
2139
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-basic-decisions", children: [
2140
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2141
+ Prose,
2142
+ {
2143
+ label: t("dtBasicDecisionChain"),
2144
+ value: detail.gate0.decisionChain === "" ? t("dtBasicDecisionChainNone") : detail.gate0.decisionChain,
2145
+ t
2146
+ }
2147
+ ),
2148
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2149
+ Prose,
2150
+ {
2151
+ label: t("dtBasicPostPoc"),
2152
+ value: detail.gate0.postPocDecision === "" ? t("dtBasicPostPocNone") : detail.gate0.postPocDecision,
2153
+ t
2154
+ }
2155
+ )
2156
+ ] })
2157
+ ] });
2158
+ }
1644
2159
  function PlanPanels({ detail, t }) {
1645
2160
  const plan = detail.plan;
1646
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Section, { title: t("dtPlanTitle"), children: [
1647
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "plan-meta", children: [
1648
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Prose, { label: t("dtPlanPain"), value: plan.customerPain, t }),
1649
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Prose, { label: t("dtPlanRecognition"), value: plan.expectedRecognition, t }),
1650
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Prose, { label: t("dtPlanEdge"), value: plan.ourEdge, t })
2161
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Section, { title: t("dtPlanTitle"), children: [
2162
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-meta", children: [
2163
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Prose, { label: t("dtPlanPain"), value: plan.customerPain, t }),
2164
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Prose, { label: t("dtPlanRecognition"), value: plan.expectedRecognition, t }),
2165
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Prose, { label: t("dtPlanEdge"), value: plan.ourEdge, t })
1651
2166
  ] }),
1652
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "plan-strip", children: [
1653
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "plan-strip-item", children: [
1654
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "plan-strip-label", children: t("dtPlanWindow") }),
1655
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "plan-strip-value", children: plan.timelineStart === "" && plan.timelineEnd === "" ? t("dtUnset") : `${plan.timelineStart === "" ? "\u2014" : plan.timelineStart} \u2192 ${plan.timelineEnd === "" ? "\u2014" : plan.timelineEnd}` })
2167
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-strip", children: [
2168
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-strip-item", children: [
2169
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-strip-label", children: t("dtPlanWindow") }),
2170
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-strip-value", children: plan.timelineStart === "" && plan.timelineEnd === "" ? t("dtUnset") : `${plan.timelineStart === "" ? "\u2014" : plan.timelineStart} \u2192 ${plan.timelineEnd === "" ? "\u2014" : plan.timelineEnd}` })
1656
2171
  ] }),
1657
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "plan-strip-item", children: [
1658
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "plan-strip-label", children: t("dtPlanGate1") }),
1659
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: `status-pill tone-${plan.gate1Conclusion === "\u901A\u8FC7" ? "green" : "slate"}`, children: [
1660
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "status-dot" }),
2172
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-strip-item", children: [
2173
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-strip-label", children: t("dtPlanGate1") }),
2174
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${plan.gate1Conclusion === "\u901A\u8FC7" ? "green" : "slate"}`, children: [
2175
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
1661
2176
  plan.gate1Conclusion === "" ? t("dtUnset") : plan.gate1Conclusion
1662
2177
  ] })
1663
2178
  ] }),
1664
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "plan-strip-item", children: [
1665
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "plan-strip-label", children: t("dtPlanGate2") }),
1666
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: `status-pill tone-${plan.gate2Ready === "Ready" ? "green" : plan.gate2Ready === "" ? "slate" : "amber"}`, children: [
1667
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "status-dot" }),
2179
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-strip-item", children: [
2180
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-strip-label", children: t("dtPlanGate2") }),
2181
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${plan.gate2Ready === "Ready" ? "green" : plan.gate2Ready === "" ? "slate" : "amber"}`, children: [
2182
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
1668
2183
  plan.gate2Ready === "" ? t("dtUnset") : plan.gate2Ready
1669
2184
  ] })
1670
2185
  ] }),
1671
- plan.reportNodes.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "plan-strip-item", children: [
1672
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "plan-strip-label", children: t("dtPlanReportNodes") }),
1673
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "chip-row", children: plan.reportNodes.map((node, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "chip", children: node }, `${node}:${index}`)) })
2186
+ plan.reportNodes.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-strip-item", children: [
2187
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-strip-label", children: t("dtPlanReportNodes") }),
2188
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chip-row", children: plan.reportNodes.map((node, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chip", children: node }, `${node}:${index}`)) })
1674
2189
  ] })
1675
2190
  ] }),
1676
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "plan-block", children: [
1677
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { className: "plan-block-head", children: [
1678
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h3", { className: "plan-block-title", children: t("dtPlanCriteria") }),
1679
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "plan-block-note", children: plan.criteria.length === 0 ? t("dtPlanCriteriaNone") : format(t("dtPlanCriteriaCount"), { count: plan.criteria.length }) })
2191
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-block", children: [
2192
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "plan-block-head", children: [
2193
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "plan-block-title", children: t("dtPlanCriteria") }),
2194
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-block-note", children: plan.criteria.length === 0 ? t("dtPlanCriteriaNone") : format(t("dtPlanCriteriaCount"), { count: plan.criteria.length }) })
1680
2195
  ] }),
1681
- plan.criteria.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Blank, { text: t("dtPlanCriteriaNone") }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("table", { className: "plan-criteria", children: [
1682
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("tr", { children: [
1683
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { children: t("dtPlanCriteria") }),
1684
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { children: t("dtPlanMetric") }),
1685
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { children: t("dtPlanBaseline") }),
1686
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { children: t("dtPlanTarget") })
2196
+ plan.criteria.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtPlanCriteriaNone") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("table", { className: "plan-criteria", children: [
2197
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { children: [
2198
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanCriteria") }),
2199
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanMetric") }),
2200
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanBaseline") }),
2201
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanTarget") })
1687
2202
  ] }) }),
1688
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("tbody", { children: plan.criteria.map((criterion, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("tr", { children: [
1689
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", { className: "plan-criterion-name", children: criterion.name === "" ? t("emptyField") : criterion.name }),
1690
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", { children: criterion.metric === "" ? t("emptyField") : criterion.metric }),
1691
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", { className: "plan-criterion-num", children: criterion.baseline === "" ? "\u2014" : criterion.baseline }),
1692
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("td", { className: "plan-criterion-target", children: criterion.target === "" ? "\u2014" : criterion.target })
2203
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tbody", { children: plan.criteria.map((criterion, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { children: [
2204
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "plan-criterion-name", children: criterion.name === "" ? t("emptyField") : criterion.name }),
2205
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { children: criterion.metric === "" ? t("emptyField") : criterion.metric }),
2206
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "plan-criterion-num", children: criterion.baseline === "" ? "\u2014" : criterion.baseline }),
2207
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "plan-criterion-target", children: criterion.target === "" ? "\u2014" : criterion.target })
1693
2208
  ] }, `${criterion.name}:${index}`)) })
1694
2209
  ] })
1695
2210
  ] }),
1696
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "plan-block", children: [
1697
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { className: "plan-block-head", children: [
1698
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h3", { className: "plan-block-title", children: t("dtPlanScenarios") }),
1699
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "plan-block-note", children: plan.scenarios.length === 0 ? t("dtPlanScenariosNone") : format(t("dtPlanScenariosCount"), { count: plan.scenarios.length }) })
2211
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-block", children: [
2212
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "plan-block-head", children: [
2213
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "plan-block-title", children: t("dtPlanScenarios") }),
2214
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-block-note", children: plan.scenarios.length === 0 ? t("dtPlanScenariosNone") : format(t("dtPlanScenariosCount"), { count: plan.scenarios.length }) })
1700
2215
  ] }),
1701
- plan.scenarios.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Blank, { text: t("dtPlanScenariosNone") }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ol", { className: "plan-scenarios", children: plan.scenarios.map((scenario, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("li", { className: "plan-scenario", children: [
1702
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "plan-scenario-no", children: String(index + 1).padStart(2, "0") }),
1703
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "plan-scenario-text", children: scenario })
2216
+ plan.scenarios.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtPlanScenariosNone") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ol", { className: "plan-scenarios", children: plan.scenarios.map((scenario, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "plan-scenario", children: [
2217
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-scenario-no", children: String(index + 1).padStart(2, "0") }),
2218
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-scenario-text", children: scenario })
1704
2219
  ] }, `${scenario}:${index}`)) })
1705
2220
  ] }),
1706
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "plan-block", children: [
1707
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("header", { className: "plan-block-head", children: [
1708
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h3", { className: "plan-block-title", children: t("dtPlanRisks") }),
1709
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "plan-block-note", children: plan.risks.length === 0 ? t("dtPlanRisksNone") : format(t("dtPlanRisksCount"), { count: plan.risks.length }) })
2221
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-block", children: [
2222
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "plan-block-head", children: [
2223
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "plan-block-title", children: t("dtPlanRisks") }),
2224
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-block-note", children: plan.risks.length === 0 ? t("dtPlanRisksNone") : format(t("dtPlanRisksCount"), { count: plan.risks.length }) })
1710
2225
  ] }),
1711
- plan.risks.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Blank, { text: t("dtPlanRisksNone") }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { className: "plan-risks", children: plan.risks.map((risk, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("li", { className: "plan-risk", "data-tone": riskTone(risk.level), children: [
1712
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "plan-risk-dot", "aria-hidden": "true" }),
1713
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "plan-risk-text", children: [
1714
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "plan-risk-name", children: risk.name === "" ? t("emptyField") : risk.name }),
1715
- risk.level === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "plan-risk-level", children: risk.level }),
1716
- risk.mitigation === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "plan-risk-mitigation", children: [
2226
+ plan.risks.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtPlanRisksNone") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: "plan-risks", children: plan.risks.map((risk, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "plan-risk", "data-tone": riskTone(risk.level), children: [
2227
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-risk-dot", "aria-hidden": "true" }),
2228
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-risk-text", children: [
2229
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-risk-name", children: risk.name === "" ? t("emptyField") : risk.name }),
2230
+ risk.level === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-risk-level", children: risk.level }),
2231
+ risk.mitigation === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-risk-mitigation", children: [
1717
2232
  t("dtPlanMitigation"),
1718
2233
  "\uFF1A",
1719
2234
  risk.mitigation
@@ -1726,118 +2241,418 @@ window.__ModuleLoader__.load({
1726
2241
  function OutcomePanel({ detail, t }) {
1727
2242
  const outcome = detail.outcome;
1728
2243
  const hasMilestone = outcome.milestone !== "";
1729
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Section, { title: t("dtOutcomeTitle"), children: [
1730
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "out-triple", children: [
1731
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Prose, { label: t("dtOutcomeProved"), value: outcome.proved, t }),
1732
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Prose, { label: t("dtOutcomeRecognized"), value: outcome.recognized, t }),
1733
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Prose, { label: t("dtOutcomeNext"), value: outcome.nextBusiness, t })
2244
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Section, { title: t("dtOutcomeTitle"), children: [
2245
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "out-triple", children: [
2246
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Prose, { label: t("dtOutcomeProved"), value: outcome.proved, t }),
2247
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Prose, { label: t("dtOutcomeRecognized"), value: outcome.recognized, t }),
2248
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Prose, { label: t("dtOutcomeNext"), value: outcome.nextBusiness, t })
1734
2249
  ] }),
1735
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "out-milestone", "data-present": hasMilestone, children: [
1736
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "out-milestone-label", children: t("dtOutcomeMilestone") }),
1737
- hasMilestone ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "out-milestone-text", children: outcome.milestone }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "out-milestone-missing", children: t("dtOutcomeMilestoneNone") }),
1738
- hasMilestone ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "out-milestone-meta", children: [
1739
- outcome.businessOwner === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "chip", children: format(t("dtOutcomeMilestoneOwner"), { owner: outcome.businessOwner }) }),
1740
- outcome.businessDeadline === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "chip", children: format(t("dtOutcomeMilestoneDeadline"), { date: outcome.businessDeadline }) }),
1741
- outcome.businessStatus === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "chip", children: format(t("dtOutcomeMilestoneStatus"), { status: outcome.businessStatus }) })
2250
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "out-milestone", "data-present": hasMilestone, children: [
2251
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "out-milestone-label", children: t("dtOutcomeMilestone") }),
2252
+ hasMilestone ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "out-milestone-text", children: outcome.milestone }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "out-milestone-missing", children: t("dtOutcomeMilestoneNone") }),
2253
+ hasMilestone ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "out-milestone-meta", children: [
2254
+ outcome.businessOwner === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chip", children: format(t("dtOutcomeMilestoneOwner"), { owner: outcome.businessOwner }) }),
2255
+ outcome.businessDeadline === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chip", children: format(t("dtOutcomeMilestoneDeadline"), { date: outcome.businessDeadline }) }),
2256
+ outcome.businessStatus === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chip", children: format(t("dtOutcomeMilestoneStatus"), { status: outcome.businessStatus }) })
1742
2257
  ] }) : null
1743
2258
  ] }),
1744
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "out-meta", children: [
1745
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Prose, { label: t("dtOutcomeProof"), value: outcome.ourProof, t }),
1746
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Prose, { label: t("dtOutcomeRemaining"), value: outcome.remainingRisks, t }),
1747
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Prose, { label: t("dtOutcomeOverall"), value: outcome.overall, t }),
1748
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Prose, { label: t("dtOutcomeReviewed"), value: outcome.reviewedAt, t })
2259
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "out-meta", children: [
2260
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Prose, { label: t("dtOutcomeProof"), value: outcome.ourProof, t }),
2261
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Prose, { label: t("dtOutcomeRemaining"), value: outcome.remainingRisks, t }),
2262
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Prose, { label: t("dtOutcomeOverall"), value: outcome.overall, t }),
2263
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Prose, { label: t("dtOutcomeReviewed"), value: outcome.reviewedAt, t })
1749
2264
  ] })
1750
2265
  ] });
1751
2266
  }
1752
2267
  function DetailPage(props) {
1753
2268
  const { detail, t, locale } = props;
1754
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "dt-page", children: [
1755
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IdentityRail, { props }),
1756
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("main", { className: "dt-pane", children: [
1757
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ProgressStream, { detail, t, locale }),
1758
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DimensionGrid, { detail, t }),
1759
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Gate0Meter, { detail, t }),
1760
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PlanPanels, { detail, t }),
1761
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(OutcomePanel, { detail, t })
2269
+ const stage = detail.summary.closed ? "closed" : detail.summary.stage;
2270
+ const skeleton = SKELETON_FOR[stage] ?? SKELETON_FOR.unknown;
2271
+ const [foldOpen, setFoldOpen] = (0, import_react2.useState)(false);
2272
+ const sections = {
2273
+ basic: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BasicInfo, { detail, t }, "basic"),
2274
+ progress: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ProgressStream, { detail, t, locale }, "progress"),
2275
+ dimensions: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DimensionGrid, { detail, t }, "dimensions"),
2276
+ gate0: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Gate0Meter, { detail, t }, "gate0"),
2277
+ plan: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PlanPanels, { detail, t }, "plan"),
2278
+ outcome: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(OutcomePanel, { detail, t }, "outcome")
2279
+ };
2280
+ const primary = skeleton.sections;
2281
+ const secondary = ["basic", "progress", "dimensions", "gate0", "plan", "outcome"].filter((key) => !primary.includes(key));
2282
+ const stageState = stageStateOf(detail);
2283
+ const projectBlockers = props.blockers ?? [];
2284
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-page", children: [
2285
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IdentityRail, { props }),
2286
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("main", { className: "dt-pane", children: [
2287
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(StageContext, { stage, done: stageState.done, pending: stageState.pending, t }),
2288
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("section", { className: "dt-worklist", "aria-label": t("worklistTitle"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Worklist, { detail, rows: projectBlockers, t }) }),
2289
+ primary.map((key) => sections[key]),
2290
+ secondary.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: "dt-fold", "data-open": foldOpen, children: [
2291
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2292
+ "button",
2293
+ {
2294
+ type: "button",
2295
+ className: "dt-fold-head",
2296
+ "aria-expanded": foldOpen,
2297
+ onClick: () => setFoldOpen((value) => !value),
2298
+ children: [
2299
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "dt-fold-title", children: t("dtOtherSections") }),
2300
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-fold-hint", children: t("dtOtherSectionsHint") }),
2301
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-fold-arrow", "aria-hidden": "true", children: foldOpen ? "\u25B4" : "\u25BE" })
2302
+ ]
2303
+ }
2304
+ ),
2305
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "dt-fold-body", children: secondary.map((key) => sections[key]) })
2306
+ ] })
1762
2307
  ] })
1763
2308
  ] });
1764
2309
  }
1765
2310
 
2311
+ // src/client/export-form.tsx
2312
+ var import_react3 = require("react");
2313
+ var import_jsx_runtime4 = require("react/jsx-runtime");
2314
+ function ExportFormDialog({ api, projects, t, onClose, onError }) {
2315
+ const rows = (0, import_react3.useMemo)(
2316
+ () => projects.map((project) => ({ pocId: project.pocId, name: project.name, company: project.company })),
2317
+ [projects]
2318
+ );
2319
+ const [selected, setSelected] = (0, import_react3.useState)(() => new Set(rows.map((row) => row.pocId)));
2320
+ const [busy, setBusy] = (0, import_react3.useState)(false);
2321
+ const toggle = (pocId) => {
2322
+ setSelected((current) => {
2323
+ const next = new Set(current);
2324
+ if (next.has(pocId)) next.delete(pocId);
2325
+ else next.add(pocId);
2326
+ return next;
2327
+ });
2328
+ };
2329
+ const selectAll = () => setSelected(new Set(rows.map((row) => row.pocId)));
2330
+ const selectNone = () => setSelected(/* @__PURE__ */ new Set());
2331
+ const generate = async () => {
2332
+ setBusy(true);
2333
+ try {
2334
+ const mode = selected.size === 0 ? "blank" : "fill";
2335
+ const result = await api.exportForm(mode, mode === "blank" ? [] : [...selected]);
2336
+ const blob = new Blob([result.html], { type: "text/html;charset=utf-8" });
2337
+ const url = URL.createObjectURL(blob);
2338
+ const anchor = document.createElement("a");
2339
+ anchor.href = url;
2340
+ anchor.download = result.fileName;
2341
+ document.body.appendChild(anchor);
2342
+ anchor.click();
2343
+ anchor.remove();
2344
+ setTimeout(() => URL.revokeObjectURL(url), 4e3);
2345
+ onClose();
2346
+ } catch (error) {
2347
+ onError(error instanceof Error ? error.message : t("exportFailed"));
2348
+ } finally {
2349
+ setBusy(false);
2350
+ }
2351
+ };
2352
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2353
+ "div",
2354
+ {
2355
+ className: "modal-overlay",
2356
+ role: "presentation",
2357
+ onMouseDown: (event) => {
2358
+ if (event.target === event.currentTarget && !busy) onClose();
2359
+ },
2360
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2361
+ "div",
2362
+ {
2363
+ className: "modal modal-wide",
2364
+ role: "dialog",
2365
+ "aria-modal": "true",
2366
+ "aria-label": t("exportTitle"),
2367
+ onKeyDown: (event) => {
2368
+ if (event.key === "Escape" && !busy) onClose();
2369
+ },
2370
+ children: [
2371
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "modal-header", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { className: "modal-title", children: t("exportTitle") }) }),
2372
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "modal-content", children: [
2373
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "modal-lead", children: t("exportSubtitle") }),
2374
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "export-toolbar", children: [
2375
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", className: "btn btn-small", onClick: selectAll, disabled: busy, children: t("exportSelectAll") }),
2376
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", className: "btn btn-small", onClick: selectNone, disabled: busy, children: t("exportSelectNone") }),
2377
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "export-count", children: format(t("exportSelected"), { count: selected.size }) })
2378
+ ] }),
2379
+ rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "modal-lead", children: t("exportNoProjects") }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: "export-list", children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("label", { className: "export-row", "data-selected": selected.has(row.pocId), children: [
2380
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2381
+ "input",
2382
+ {
2383
+ type: "checkbox",
2384
+ checked: selected.has(row.pocId),
2385
+ disabled: busy,
2386
+ onChange: () => toggle(row.pocId)
2387
+ }
2388
+ ),
2389
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "export-row-text", children: [
2390
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "export-row-name", children: row.name === "" ? row.pocId : row.name }),
2391
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "export-row-meta", children: [
2392
+ row.pocId,
2393
+ row.company === "" ? "" : ` \xB7 ${row.company}`
2394
+ ] })
2395
+ ] })
2396
+ ] }) }, row.pocId)) }),
2397
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "helper-box", children: selected.size === 0 ? t("exportBlankHint") : t("exportHint") })
2398
+ ] }),
2399
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "modal-footer", children: [
2400
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "spacer" }),
2401
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", className: "btn", onClick: onClose, disabled: busy, children: t("cancel") }),
2402
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", className: "btn btn-primary", onClick: () => {
2403
+ void generate();
2404
+ }, disabled: busy, children: busy ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
2405
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "spinner" }),
2406
+ " ",
2407
+ t("exportGenerating")
2408
+ ] }) : t("exportGenerate") })
2409
+ ] })
2410
+ ]
2411
+ }
2412
+ )
2413
+ }
2414
+ );
2415
+ }
2416
+
1766
2417
  // src/client/overview.tsx
1767
- var import_react = require("react");
2418
+ var import_react5 = require("react");
1768
2419
 
1769
- // src/gap.ts
1770
- var RULE_META = {
1771
- // R1: the G0 floor. Nothing downstream is trustworthy without it.
1772
- "R1-gate0-missing": { no: 1, level: "high", priority: 90 },
1773
- // R2: a large commitment decided before the gate was cleared.
1774
- "R2-large-amount-no-g0": { no: 2, level: "high", priority: 94 },
1775
- // R3: cleared the gate, then never wrote down what success means.
1776
- "R3-g0-passed-no-plan": { no: 3, level: "high", priority: 92 },
1777
- // R4–R6: focus. A pilot measuring everything measures nothing.
1778
- "R4-criteria-count": { no: 4, level: "medium", priority: 50 },
1779
- "R5-scenarios-count": { no: 5, level: "medium", priority: 48 },
1780
- "R6-risks-overflow": { no: 6, level: "medium", priority: 46 },
1781
- // R7: testing before the prerequisites are ready burns team time.
1782
- "R7-g2-not-ready": { no: 7, level: "high", priority: 84 },
1783
- // R8–R10: the proof chain, read from the newest progress entry.
1784
- "R8-progress-no-evidence": { no: 8, level: "high", priority: 82 },
1785
- "R9-evidence-no-recognition": { no: 9, level: "high", priority: 80 },
1786
- "R10-g3-1-without-g3-2": { no: 10, level: "high", priority: 78 },
1787
- // R11: it worked, and nothing followed. The highest-value gap, as the
1788
- // original design documented: value was created and none of it was banked.
1789
- "R11-no-next-milestone": { no: 11, level: "high", priority: 96 },
1790
- // R12: the project has not moved.
1791
- "R12-stage-stalled": { no: 12, level: "medium", priority: 40 }
1792
- };
2420
+ // src/client/summary.tsx
2421
+ var import_react4 = require("react");
2422
+ var import_jsx_runtime5 = require("react/jsx-runtime");
2423
+ function KpiStrip({ stats, analysis, blockedCount, total, activeStage, t, onFilter, onClearFilters }) {
2424
+ const stageCounts = (0, import_react4.useMemo)(() => {
2425
+ const next = [];
2426
+ for (const bucket of analysis.stages) {
2427
+ if (bucket.key === "unknown" && bucket.count === 0) continue;
2428
+ next.push({ key: bucket.key, label: stageLabel(t, bucket.key), count: bucket.count });
2429
+ }
2430
+ return next;
2431
+ }, [analysis.stages, t]);
2432
+ const stageSummary = stageCounts.map((bucket) => `${bucket.label} ${bucket.count}`).join(" \xB7 ");
2433
+ const figures = [
2434
+ {
2435
+ key: "total",
2436
+ label: t("kpiTotal"),
2437
+ value: String(stats.total),
2438
+ note: format(t("kpiAllNote"), { count: total }),
2439
+ tone: "slate",
2440
+ // Not clickable: "all projects" cannot narrow anything.
2441
+ onSelect: null,
2442
+ active: false
2443
+ },
2444
+ {
2445
+ key: "active",
2446
+ label: t("kpiActive"),
2447
+ value: String(stats.inProgress),
2448
+ note: format(t("kpiBlockedNote"), { count: stats.inProgress }),
2449
+ tone: "blue",
2450
+ onSelect: () => onClearFilters(),
2451
+ active: false
2452
+ },
2453
+ {
2454
+ key: "budget",
2455
+ label: t("kpiBudget"),
2456
+ value: formatWan(stats.amountTotalWan),
2457
+ note: t("statAmountUnit"),
2458
+ tone: "amber",
2459
+ onSelect: null,
2460
+ active: false
2461
+ },
2462
+ {
2463
+ key: "blocked",
2464
+ label: t("kpiBlocked"),
2465
+ value: String(blockedCount),
2466
+ note: format(t("kpiBlockedNote"), { count: blockedCount }),
2467
+ tone: blockedCount > 0 ? "red" : "green",
2468
+ onSelect: () => onClearFilters(),
2469
+ active: false
2470
+ },
2471
+ {
2472
+ key: "g0",
2473
+ label: t("kpiG0Passed"),
2474
+ value: String(stats.g0Passed),
2475
+ note: format(t("kpiAllNote"), { count: stats.total }),
2476
+ tone: "green",
2477
+ onSelect: () => onClearFilters(),
2478
+ active: false
2479
+ }
2480
+ ];
2481
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "kpi-strip", "aria-label": t("kpiTitle"), children: [
2482
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "kpi-cells", children: figures.map((figure) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "kpi-cell", "data-tone": figure.tone, "data-clickable": figure.onSelect !== null, children: [
2483
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "kpi-label", children: figure.label }),
2484
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "kpi-value", children: figure.value }),
2485
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "kpi-note", children: figure.note })
2486
+ ] }, figure.key)) }),
2487
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "kpi-stages", role: "group", "aria-label": t("kpiStageBreakdown"), children: [
2488
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "kpi-stages-label", children: t("kpiStageBreakdown") }),
2489
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "kpi-stage-chips", children: stageCounts.map((bucket) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
2490
+ "button",
2491
+ {
2492
+ type: "button",
2493
+ className: "kpi-stage-chip",
2494
+ "data-active": activeStage === bucket.key,
2495
+ "data-zero": bucket.count === 0,
2496
+ disabled: bucket.count === 0 && activeStage !== bucket.key,
2497
+ title: `${bucket.label} \xB7 ${bucket.count}`,
2498
+ onClick: () => onFilter({ stage: activeStage === bucket.key ? null : bucket.key }),
2499
+ children: [
2500
+ bucket.label,
2501
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "kpi-stage-count", children: bucket.count })
2502
+ ]
2503
+ },
2504
+ bucket.key
2505
+ )) }),
2506
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "kpi-stages-summary", "aria-hidden": "true", children: stageSummary })
2507
+ ] })
2508
+ ] });
2509
+ }
2510
+ function splitBudget(projects) {
2511
+ const split = {
2512
+ approved: { count: 0, amount: 0 },
2513
+ pending: { count: 0, amount: 0 },
2514
+ unset: { count: 0 }
2515
+ };
2516
+ for (const project of projects) {
2517
+ if (project.amountWan === 0) {
2518
+ split.unset.count += 1;
2519
+ continue;
2520
+ }
2521
+ if (project.g0Passed) {
2522
+ split.approved.count += 1;
2523
+ split.approved.amount += project.amountWan;
2524
+ } else {
2525
+ split.pending.count += 1;
2526
+ split.pending.amount += project.amountWan;
2527
+ }
2528
+ }
2529
+ return split;
2530
+ }
2531
+ function BudgetPanel({ projects, analysis, t }) {
2532
+ const split = (0, import_react4.useMemo)(() => splitBudget(projects), [projects]);
2533
+ const total = split.approved.amount + split.pending.amount;
2534
+ const segments = [
2535
+ { key: "approved", value: split.approved.amount, tone: "green", label: t("budgetApproved") },
2536
+ { key: "pending", value: split.pending.amount, tone: "amber", label: t("budgetPending") }
2537
+ ].filter((segment) => segment.value > 0);
2538
+ const orgRows = analysis.orgs.slice(0, 5).map((row) => ({
2539
+ key: `${row.system}\0${row.company}`,
2540
+ label: row.company === "" ? row.system === "" ? t("dtUnset") : row.system : row.company,
2541
+ ...row.system === "" ? {} : { note: row.system },
2542
+ value: row.amountWan
2543
+ }));
2544
+ if (total === 0 && split.unset.count === 0) {
2545
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "budget-panel", "aria-label": t("budgetTitle"), children: [
2546
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("header", { className: "budget-head", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "budget-title", children: t("budgetTitle") }) }),
2547
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "budget-empty", children: t("budgetEmpty") })
2548
+ ] });
2549
+ }
2550
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("section", { className: "budget-panel", "aria-label": t("budgetTitle"), children: [
2551
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("header", { className: "budget-head", children: [
2552
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "budget-title", children: t("budgetTitle") }),
2553
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "budget-note", children: t("budgetNote") })
2554
+ ] }),
2555
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "budget-total", children: [
2556
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "budget-total-label", children: t("budgetTotal") }),
2557
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "budget-total-value", children: [
2558
+ formatWan(total),
2559
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "budget-total-unit", children: t("statAmountUnit") })
2560
+ ] })
2561
+ ] }),
2562
+ segments.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "budget-bar", role: "img", "aria-label": segments.map((segment) => `${segment.label} ${formatWan(segment.value)}`).join(", "), children: segments.map((segment) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2563
+ "span",
2564
+ {
2565
+ className: "budget-bar-segment",
2566
+ "data-tone": segment.tone,
2567
+ style: { width: `${total === 0 ? 0 : segment.value / total * 100}%` }
2568
+ },
2569
+ segment.key
2570
+ )) }),
2571
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("dl", { className: "budget-rows", children: [
2572
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "budget-row", "data-tone": "green", children: [
2573
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("dt", { className: "budget-row-label", children: t("budgetApproved") }),
2574
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("dd", { className: "budget-row-value", children: format(t("budgetApprovedNote"), { count: split.approved.count, amount: formatWan(split.approved.amount) }) })
2575
+ ] }),
2576
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "budget-row", "data-tone": "amber", children: [
2577
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("dt", { className: "budget-row-label", children: t("budgetPending") }),
2578
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("dd", { className: "budget-row-value", children: format(t("budgetPendingNote"), { count: split.pending.count, amount: formatWan(split.pending.amount) }) })
2579
+ ] }),
2580
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "budget-row", "data-tone": split.unset.count > 0 ? "red" : "slate", children: [
2581
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("dt", { className: "budget-row-label", children: t("budgetUnset") }),
2582
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("dd", { className: "budget-row-value", children: format(t("budgetUnsetNote"), { count: split.unset.count }) })
2583
+ ] })
2584
+ ] }),
2585
+ split.unset.count > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "budget-warning", role: "note", children: format(t("budgetUnsetWarning"), { count: split.unset.count }) }) : null,
2586
+ orgRows.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "budget-orgs", children: [
2587
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "budget-orgs-label", children: t("budgetByOrg") }),
2588
+ orgRows.map((row) => {
2589
+ const share = total === 0 ? 0 : row.value / total;
2590
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "budget-org-row", children: [
2591
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "budget-org-name", children: [
2592
+ row.label,
2593
+ row.note === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "budget-org-system", children: row.note })
2594
+ ] }),
2595
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(InlineMeter, { value: row.value, max: total, tone: "blue" }),
2596
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "budget-org-value", children: [
2597
+ Math.round(share * 100),
2598
+ "%"
2599
+ ] })
2600
+ ] }, row.key);
2601
+ })
2602
+ ] }),
2603
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "budget-concentration", children: format(t("budgetConcentrationCopy"), { share: Math.round(analysis.concentration * 100) }) })
2604
+ ] });
2605
+ }
2606
+ function StageProgressFigure({ analysis, projects, t }) {
2607
+ const rows = (0, import_react4.useMemo)(() => {
2608
+ return analysis.stages.filter((bucket) => bucket.key !== "unknown").map((bucket) => {
2609
+ const inBucket = projects.filter((project) => stageBucketKey(project) === bucket.key);
2610
+ const index = STAGES.indexOf(bucket.key);
2611
+ const done = index === -1 ? inBucket.length : inBucket.filter((project) => project.stageDone[index] === true).length;
2612
+ return {
2613
+ key: bucket.key,
2614
+ label: stageLabel(t, bucket.key),
2615
+ total: inBucket.length,
2616
+ done,
2617
+ hasGate: index !== -1
2618
+ };
2619
+ });
2620
+ }, [analysis.stages, projects, t]);
2621
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "stage-progress", children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "stage-progress-row", "data-empty": row.total === 0, children: [
2622
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "stage-progress-label", children: row.label }),
2623
+ row.total === 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "stage-progress-empty", children: t("stageNoData") }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
2624
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(InlineMeter, { value: row.done, max: row.total, tone: row.done === row.total ? "green" : "blue" }),
2625
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "stage-progress-value", children: row.hasGate ? format(t("stageProgressNote"), { done: row.done, total: row.total }) : `${row.total}` })
2626
+ ] })
2627
+ ] }, row.key)) });
2628
+ }
1793
2629
 
1794
2630
  // src/client/overview.tsx
1795
- var import_jsx_runtime3 = require("react/jsx-runtime");
2631
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1796
2632
  var DIMENSION_TEXT2 = {
1797
2633
  achievement: "dimAchievement",
1798
2634
  evidence: "dimEvidence",
1799
2635
  recognition: "dimRecognition",
1800
2636
  nextMilestone: "dimNextMilestone"
1801
2637
  };
1802
- function formatWan2(value) {
1803
- const rounded = Math.round(value * 10) / 10;
1804
- return rounded.toLocaleString("zh-CN", { maximumFractionDigits: 1 });
1805
- }
1806
- function formatDate2(value, locale) {
1807
- if (value === null || value === "") return "\u2014";
1808
- if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) return value;
1809
- const stamp = /* @__PURE__ */ new Date(`${value}T00:00:00`);
1810
- if (Number.isNaN(stamp.getTime())) return value;
1811
- return stamp.toLocaleDateString(locale.toLowerCase().startsWith("zh") ? "zh-CN" : "en-US", {
1812
- year: "numeric",
1813
- month: "2-digit",
1814
- day: "2-digit"
1815
- });
1816
- }
1817
- function stageLabel(t, key) {
1818
- if (key === "closed") return t("stageClosed");
1819
- if (key === "unknown") return t("stageUnknown");
1820
- if (STAGES.includes(key)) return t(`stage${key}`);
1821
- return key;
1822
- }
1823
2638
  function GapBadge({ project, t }) {
1824
2639
  if (project.gapCount === 0) return null;
1825
2640
  if (project.highGapCount > 0) {
1826
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pcard-badge", "data-tone": "red", children: format(t("cardGapBadgeHigh"), { count: project.highGapCount }) });
2641
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pcard-badge", "data-tone": "red", children: format(t("cardGapBadgeHigh"), { count: project.highGapCount }) });
1827
2642
  }
1828
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pcard-badge", "data-tone": "amber", children: format(t("cardGapBadge"), { count: project.gapCount }) });
2643
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pcard-badge", "data-tone": "amber", children: format(t("cardGapBadge"), { count: project.gapCount }) });
1829
2644
  }
1830
2645
  function DimensionMarks({ project, t }) {
1831
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pcard-dims", role: "group", "aria-label": t("colDimensions"), children: DIMENSIONS.map((key) => {
2646
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "pcard-dims", role: "group", "aria-label": t("colDimensions"), children: DIMENSIONS.map((key) => {
1832
2647
  const present = project.dimensions[key];
1833
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "pcard-dim", "data-present": present, title: `${t(DIMENSION_TEXT2[key])}: ${present ? t("dimPresent") : t("dimMissing")}`, children: [
1834
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pcard-dim-mark", "aria-hidden": "true", children: present ? "\u2713" : "\u2717" }),
1835
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pcard-dim-label", children: t(DIMENSION_TEXT2[key]) })
2648
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "pcard-dim", "data-present": present, title: `${t(DIMENSION_TEXT2[key])}: ${present ? t("dimPresent") : t("dimMissing")}`, children: [
2649
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pcard-dim-mark", "aria-hidden": "true", children: present ? "\u2713" : "\u2717" }),
2650
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pcard-dim-label", children: t(DIMENSION_TEXT2[key]) })
1836
2651
  ] }, key);
1837
2652
  }) });
1838
2653
  }
1839
2654
  function ProjectCard({ project, selected, locale, t, onOpen }) {
1840
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2655
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1841
2656
  "div",
1842
2657
  {
1843
2658
  className: "pcard",
@@ -1853,22 +2668,22 @@ window.__ModuleLoader__.load({
1853
2668
  }
1854
2669
  },
1855
2670
  children: [
1856
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "pcard-head", children: [
1857
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "pcard-title-block", children: [
1858
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pcard-name", children: project.name }),
1859
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "pcard-id", children: [
2671
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "pcard-head", children: [
2672
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "pcard-title-block", children: [
2673
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pcard-name", children: project.name }),
2674
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "pcard-id", children: [
1860
2675
  project.pocId,
1861
2676
  project.owner === "" ? "" : ` \xB7 ${project.owner}`
1862
2677
  ] })
1863
2678
  ] }),
1864
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(GapBadge, { project, t })
2679
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(GapBadge, { project, t })
1865
2680
  ] }),
1866
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "pcard-stage", children: [
1867
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "status-pill tone-blue pcard-stage-pill", children: [
1868
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
2681
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "pcard-stage", children: [
2682
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "status-pill tone-blue pcard-stage-pill", children: [
2683
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "status-dot" }),
1869
2684
  project.closed ? t("stageClosed") : project.stageLabel === "" ? t("stageUnknown") : project.stageLabel
1870
2685
  ] }),
1871
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2686
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1872
2687
  StageRailMini,
1873
2688
  {
1874
2689
  done: project.stageDone,
@@ -1878,30 +2693,30 @@ window.__ModuleLoader__.load({
1878
2693
  }
1879
2694
  )
1880
2695
  ] }),
1881
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "pcard-meta", children: [
1882
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "pcard-org", children: [
2696
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "pcard-meta", children: [
2697
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "pcard-org", children: [
1883
2698
  project.system === "" ? t("emptyField") : project.system,
1884
2699
  " \xB7 ",
1885
2700
  project.company === "" ? t("emptyField") : project.company
1886
2701
  ] }),
1887
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "pcard-amount", children: [
1888
- project.amountWan === 0 ? "\u2014" : formatWan2(project.amountWan),
1889
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pcard-unit", children: project.amountWan === 0 ? "" : t("statAmountUnit") })
2702
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "pcard-amount", children: [
2703
+ project.amountWan === 0 ? "\u2014" : formatWan(project.amountWan),
2704
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pcard-unit", children: project.amountWan === 0 ? "" : t("statAmountUnit") })
1890
2705
  ] })
1891
2706
  ] }),
1892
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "pcard-progress", children: [
1893
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pcard-progress-label", children: t("cardLatestProgress") }),
1894
- project.progressCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pcard-progress-copy is-muted", children: t("cardNoProgress") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pcard-progress-copy", children: project.lastProgressSummary === "" ? t("emptyField") : project.lastProgressSummary }),
1895
- project.progressCount === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "pcard-progress-meta", children: [
1896
- formatDate2(project.lastProgressDate, locale),
2707
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "pcard-progress", children: [
2708
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pcard-progress-label", children: t("cardLatestProgress") }),
2709
+ project.progressCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pcard-progress-copy is-muted", children: t("cardNoProgress") }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pcard-progress-copy", children: project.lastProgressSummary === "" ? t("emptyField") : project.lastProgressSummary }),
2710
+ project.progressCount === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "pcard-progress-meta", children: [
2711
+ formatDate(project.lastProgressDate, locale),
1897
2712
  " \xB7 ",
1898
2713
  format(t("cardProgressCount"), { count: project.progressCount })
1899
2714
  ] })
1900
2715
  ] }),
1901
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DimensionMarks, { project, t }),
1902
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "pcard-foot", children: [
1903
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pcard-since", children: project.daysInStage === null ? t("cardNoStageSince") : format(t("cardStageSince"), { days: project.daysInStage }) }),
1904
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "pcard-open", children: [
2716
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DimensionMarks, { project, t }),
2717
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "pcard-foot", children: [
2718
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pcard-since", children: project.daysInStage === null ? t("cardNoStageSince") : format(t("cardStageSince"), { days: project.daysInStage }) }),
2719
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "pcard-open", children: [
1905
2720
  t("cardOpen"),
1906
2721
  " \u2192"
1907
2722
  ] })
@@ -1911,7 +2726,7 @@ window.__ModuleLoader__.load({
1911
2726
  );
1912
2727
  }
1913
2728
  function ProjectCards({ projects, selectedId, locale, t, onOpen }) {
1914
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pcard-grid", children: projects.map((project) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2729
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "pcard-grid", children: projects.map((project) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1915
2730
  ProjectCard,
1916
2731
  {
1917
2732
  project,
@@ -1925,22 +2740,22 @@ window.__ModuleLoader__.load({
1925
2740
  }
1926
2741
  var BOARD_KEYS = ["G0", "G1", "G2", "G3", "G4", "closed", "unknown"];
1927
2742
  function BoardCard({ project, t, onOpen }) {
1928
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", className: "pboard-card", "data-high": project.highGapCount > 0, onClick: () => onOpen(project.pocId), children: [
1929
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pboard-card-name", children: project.name }),
1930
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "pboard-card-meta", children: [
1931
- project.amountWan === 0 ? "\u2014" : `${formatWan2(project.amountWan)} ${t("statAmountUnit")}`,
1932
- project.owner === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "pboard-card-owner", children: [
2743
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("button", { type: "button", className: "pboard-card", "data-high": project.highGapCount > 0, onClick: () => onOpen(project.pocId), children: [
2744
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pboard-card-name", children: project.name }),
2745
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "pboard-card-meta", children: [
2746
+ project.amountWan === 0 ? "\u2014" : `${formatWan(project.amountWan)} ${t("statAmountUnit")}`,
2747
+ project.owner === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "pboard-card-owner", children: [
1933
2748
  " \xB7 ",
1934
2749
  project.owner
1935
2750
  ] })
1936
2751
  ] }),
1937
- project.progressCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pboard-card-progress is-muted", children: t("cardNoProgress") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pboard-card-progress", children: project.lastProgressSummary === "" ? t("emptyField") : project.lastProgressSummary }),
1938
- project.highGapCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pboard-card-gap", "data-tone": "red", children: format(t("boardHighBadge"), { count: project.highGapCount }) }) : null
2752
+ project.progressCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pboard-card-progress is-muted", children: t("cardNoProgress") }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pboard-card-progress", children: project.lastProgressSummary === "" ? t("emptyField") : project.lastProgressSummary }),
2753
+ project.highGapCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pboard-card-gap", "data-tone": "red", children: format(t("boardHighBadge"), { count: project.highGapCount }) }) : null
1939
2754
  ] });
1940
2755
  }
1941
2756
  function ProjectBoard({ projects, t, onOpen }) {
1942
2757
  const columns = BOARD_KEYS.map((key) => {
1943
- const rows = projects.filter((project) => (project.closed ? "closed" : project.stage ?? "unknown") === key);
2758
+ const rows = projects.filter((project) => stageBucketKey(project) === key);
1944
2759
  return {
1945
2760
  key,
1946
2761
  label: stageLabel(t, key),
@@ -1949,13 +2764,13 @@ window.__ModuleLoader__.load({
1949
2764
  };
1950
2765
  }).filter((column) => column.rows.length > 0 || column.key !== "closed" && column.key !== "unknown");
1951
2766
  const peak = columns.reduce((highest, column) => Math.max(highest, column.rows.length), 0);
1952
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pboard", children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: "pboard-column", "data-empty": column.rows.length === 0, children: [
1953
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "pboard-column-head", children: [
1954
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pboard-column-label", children: column.label }),
1955
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pboard-column-count", children: format(t("boardColumnCount"), { count: column.rows.length, amount: formatWan2(column.amount) }) }),
1956
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InlineMeter, { value: column.rows.length, max: peak, tone: column.key === "closed" || column.key === "unknown" ? "slate" : "blue" })
2767
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "pboard", children: columns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "pboard-column", "data-empty": column.rows.length === 0, children: [
2768
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("header", { className: "pboard-column-head", children: [
2769
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pboard-column-label", children: column.label }),
2770
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pboard-column-count", children: format(t("boardColumnCount"), { count: column.rows.length, amount: formatWan(column.amount) }) }),
2771
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(InlineMeter, { value: column.rows.length, max: peak, tone: column.key === "closed" || column.key === "unknown" ? "slate" : "blue" })
1957
2772
  ] }),
1958
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pboard-column-body", children: column.rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pboard-empty", children: t("boardEmptyColumn") }) : column.rows.map((project) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BoardCard, { project, t, onOpen }, project.pocId)) })
2773
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "pboard-column-body", children: column.rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "pboard-empty", children: t("boardEmptyColumn") }) : column.rows.map((project) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(BoardCard, { project, t, onOpen }, project.pocId)) })
1959
2774
  ] }, column.key)) });
1960
2775
  }
1961
2776
  function SortableHead({
@@ -1966,26 +2781,26 @@ window.__ModuleLoader__.load({
1966
2781
  onClick,
1967
2782
  t
1968
2783
  }) {
1969
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { style: align === void 0 ? void 0 : { textAlign: align }, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", className: "ptable-sort", "data-active": active, title: t("tableSortByThis"), onClick, children: [
2784
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("th", { style: align === void 0 ? void 0 : { textAlign: align }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("button", { type: "button", className: "ptable-sort", "data-active": active, title: t("tableSortByThis"), onClick, children: [
1970
2785
  label,
1971
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "ptable-sort-arrow", "aria-hidden": "true", children: active ? asc ? "\u2191" : "\u2193" : "" })
2786
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ptable-sort-arrow", "aria-hidden": "true", children: active ? asc ? "\u2191" : "\u2193" : "" })
1972
2787
  ] }) });
1973
2788
  }
1974
2789
  function ProjectTable({ projects, selectedId, locale, t, sortKey, sortAsc, onSort, onOpen }) {
1975
2790
  const peak = projects.reduce((highest, project) => Math.max(highest, project.amountWan), 0);
1976
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("table", { className: "project-table ptable", children: [
1977
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("thead", { className: "table-head", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { children: [
1978
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { style: { width: "22%" }, children: t("colProject") }),
1979
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { style: { width: "14%" }, children: t("colOrg") }),
1980
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SortableHead, { label: t("colStage"), active: sortKey === "stage", asc: sortAsc, onClick: () => onSort("stage"), t }),
1981
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SortableHead, { label: t("colAmount"), active: sortKey === "amount", asc: sortAsc, align: "right", onClick: () => onSort("amount"), t }),
1982
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SortableHead, { label: t("colLatestProgress"), active: sortKey === "progress", asc: sortAsc, onClick: () => onSort("progress"), t }),
1983
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { style: { width: "8%" }, children: t("colGaps") }),
1984
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { style: { width: "10%", textAlign: "right" }, children: t("colAction") })
2791
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("table", { className: "project-table ptable", children: [
2792
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("thead", { className: "table-head", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("tr", { children: [
2793
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("th", { style: { width: "22%" }, children: t("colProject") }),
2794
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("th", { style: { width: "14%" }, children: t("colOrg") }),
2795
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SortableHead, { label: t("colStage"), active: sortKey === "stage", asc: sortAsc, onClick: () => onSort("stage"), t }),
2796
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SortableHead, { label: t("colAmount"), active: sortKey === "amount", asc: sortAsc, align: "right", onClick: () => onSort("amount"), t }),
2797
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SortableHead, { label: t("colLatestProgress"), active: sortKey === "progress", asc: sortAsc, onClick: () => onSort("progress"), t }),
2798
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("th", { style: { width: "8%" }, children: t("colGaps") }),
2799
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("th", { style: { width: "10%", textAlign: "right" }, children: t("colAction") })
1985
2800
  ] }) }),
1986
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tbody", { children: projects.map((project) => {
2801
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("tbody", { children: projects.map((project) => {
1987
2802
  const level = project.highGapCount > 0 ? "high" : project.gapCount > 0 ? "medium" : "none";
1988
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2803
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1989
2804
  "tr",
1990
2805
  {
1991
2806
  className: "project-row",
@@ -1999,91 +2814,49 @@ window.__ModuleLoader__.load({
1999
2814
  }
2000
2815
  },
2001
2816
  children: [
2002
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("td", { children: [
2003
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "project-name", children: project.name }),
2004
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "project-id", children: [
2817
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("td", { children: [
2818
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "project-name", children: project.name }),
2819
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "project-id", children: [
2005
2820
  project.pocId,
2006
2821
  project.owner === "" ? "" : ` \xB7 ${project.owner}`
2007
2822
  ] })
2008
2823
  ] }),
2009
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("td", { children: [
2010
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "project-org", children: project.system === "" ? t("emptyField") : project.system }),
2011
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "project-id", children: project.company === "" ? t("emptyField") : project.company })
2824
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("td", { children: [
2825
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "project-org", children: project.system === "" ? t("emptyField") : project.system }),
2826
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "project-id", children: project.company === "" ? t("emptyField") : project.company })
2012
2827
  ] }),
2013
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "ptable-stage", children: [
2014
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "status-pill tone-blue", children: [
2015
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
2828
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "ptable-stage", children: [
2829
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "status-pill tone-blue", children: [
2830
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "status-dot" }),
2016
2831
  project.closed ? t("stageClosed") : project.stageLabel === "" ? t("stageUnknown") : project.stageLabel
2017
2832
  ] }),
2018
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(StageRailMini, { done: project.stageDone, current: project.stage, closed: project.closed, ariaLabel: `${t("stageTrack")} \xB7 ${project.pocId}` })
2833
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StageRailMini, { done: project.stageDone, current: project.stage, closed: project.closed, ariaLabel: `${t("stageTrack")} \xB7 ${project.pocId}` })
2019
2834
  ] }) }),
2020
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "ptable-amount", children: [
2021
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "amount-cell", children: project.amountWan === 0 ? "\u2014" : formatWan2(project.amountWan) }),
2022
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InlineMeter, { value: project.amountWan, max: peak, tone: "amber" })
2835
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "ptable-amount", children: [
2836
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "amount-cell", children: project.amountWan === 0 ? "\u2014" : formatWan(project.amountWan) }),
2837
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(InlineMeter, { value: project.amountWan, max: peak, tone: "amber" })
2023
2838
  ] }) }),
2024
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { children: project.progressCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "project-meta is-muted", children: t("cardNoProgress") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2025
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "progress-summary", children: project.lastProgressSummary === "" ? t("emptyField") : project.lastProgressSummary }),
2026
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "project-id", children: format(t("tableProgressCell"), { date: formatDate2(project.lastProgressDate, locale), count: project.progressCount }) })
2839
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("td", { children: project.progressCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "project-meta is-muted", children: t("cardNoProgress") }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
2840
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "progress-summary", children: project.lastProgressSummary === "" ? t("emptyField") : project.lastProgressSummary }),
2841
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "project-id", children: format(t("tableProgressCell"), { date: formatDate(project.lastProgressDate, locale), count: project.progressCount }) })
2027
2842
  ] }) }),
2028
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "gap-cell", children: [
2029
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "gap-count", "data-level": level, children: project.gapCount === 0 ? "\u2014" : project.gapCount }),
2030
- project.highGapCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "project-meta", children: [
2843
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "gap-cell", children: [
2844
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "gap-count", "data-level": level, children: project.gapCount === 0 ? "\u2014" : project.gapCount }),
2845
+ project.highGapCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "project-meta", children: [
2031
2846
  project.highGapCount,
2032
2847
  "!"
2033
2848
  ] }) : null
2034
2849
  ] }) }),
2035
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "row-actions", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", className: "btn btn-small", onClick: (event) => {
2036
- event.stopPropagation();
2037
- onOpen(project.pocId);
2038
- }, children: t("detail") }) }) })
2039
- ]
2040
- },
2041
- project.pocId
2042
- );
2043
- }) })
2044
- ] });
2045
- }
2046
- function PendingGap({ item, t, onOpen }) {
2047
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "pending-gap", children: [
2048
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pending-gap-copy", children: format(t(`gap.${item.rule}.copy`), {
2049
- ...item.params ?? {},
2050
- // -1 is the Host's sentinel for "no timeline record at all", which is
2051
- // not the same thing as "not refreshed yet".
2052
- days: item.params?.days === -1 ? t("noTimeline") : String(item.params?.days ?? "")
2053
- }) }),
2054
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pending-gap-project", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", className: "pending-link", onClick: () => onOpen(item.pocId), children: item.pocName === "" ? item.pocId : `${item.pocName} \xB7 ${item.pocId}` }) })
2055
- ] });
2056
- }
2057
- function PendingRail({ gaps, t, onOpen }) {
2058
- const groups = /* @__PURE__ */ new Map();
2059
- for (const item of gaps) {
2060
- const existing = groups.get(item.rule);
2061
- if (existing === void 0) groups.set(item.rule, [item]);
2062
- else existing.push(item);
2063
- }
2064
- const ordered = [...groups.entries()].sort((left, right) => {
2065
- const leftMeta = RULE_META[left[0]];
2066
- const rightMeta = RULE_META[right[0]];
2067
- return rightMeta.priority - leftMeta.priority || leftMeta.no - rightMeta.no;
2068
- });
2069
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pending", children: ordered.map(([rule, items]) => {
2070
- const meta = RULE_META[rule];
2071
- const visible = items.slice(0, 3);
2072
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: "pending-group", "data-level": meta.level, "aria-label": format(t(`gap.${rule}.title`), { ...items[0]?.params ?? {} }), children: [
2073
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "pending-group-head", children: [
2074
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "pending-rule-no", children: [
2075
- "R",
2076
- meta.no
2077
- ] }),
2078
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pending-rule-title", children: format(t(`gap.${rule}.title`), { ...items[0]?.params ?? {} }) }),
2079
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pending-rule-count", children: format(t("pendingRuleCount"), { count: items.length }) })
2080
- ] }),
2081
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "pending-group-body", children: [
2082
- visible.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PendingGap, { item, t, onOpen }, `${item.pocId}:${index}`)),
2083
- items.length > visible.length ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pending-more", children: format(t("pendingMoreProjects"), { count: items.length - visible.length }) }) : null
2084
- ] })
2085
- ] }, rule);
2086
- }) });
2850
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "row-actions", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { type: "button", className: "btn btn-small", onClick: (event) => {
2851
+ event.stopPropagation();
2852
+ onOpen(project.pocId);
2853
+ }, children: t("detail") }) }) })
2854
+ ]
2855
+ },
2856
+ project.pocId
2857
+ );
2858
+ }) })
2859
+ ] });
2087
2860
  }
2088
2861
  function PortfolioBand({ props }) {
2089
2862
  const { analysis, filters, t, onFilter, onOpen } = props;
@@ -2102,7 +2875,7 @@ window.__ModuleLoader__.load({
2102
2875
  label: row.company === "" ? row.system === "" ? t("dtUnset") : row.system : row.company,
2103
2876
  ...row.system === "" ? {} : { note: row.system },
2104
2877
  value: row.amountWan,
2105
- display: format(t("orgAmountLabel"), { amount: formatWan2(row.amountWan) }),
2878
+ display: format(t("orgAmountLabel"), { amount: formatWan(row.amountWan) }),
2106
2879
  tone: row.highGapCount > 0 ? "red" : "blue"
2107
2880
  }));
2108
2881
  const typeSlices = analysis.types.map((row) => ({
@@ -2129,12 +2902,12 @@ window.__ModuleLoader__.load({
2129
2902
  display: format(t("gapRuleFiresLabel"), { count: row.count }),
2130
2903
  tone: row.level === "high" ? "red" : "amber"
2131
2904
  }));
2132
- const [collapsed, setCollapsed] = (0, import_react.useState)(false);
2133
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: "pf-band", "data-collapsed": collapsed, "aria-label": t("bandTitle"), children: [
2134
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "pf-band-head", children: [
2135
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "pf-band-title", children: t("bandTitle") }),
2136
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "pf-band-note", children: format(t("bandNote"), { count: totalProjects, amount: formatWan2(totalAmount) }) }),
2137
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2905
+ const [collapsed, setCollapsed] = (0, import_react5.useState)(false);
2906
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "pf-band", "data-collapsed": collapsed, "aria-label": t("bandTitle"), children: [
2907
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("header", { className: "pf-band-head", children: [
2908
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "pf-band-title", children: t("bandTitle") }),
2909
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pf-band-note", children: format(t("bandNote"), { count: totalProjects, amount: formatWan(totalAmount) }) }),
2910
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2138
2911
  "button",
2139
2912
  {
2140
2913
  type: "button",
@@ -2145,13 +2918,13 @@ window.__ModuleLoader__.load({
2145
2918
  }
2146
2919
  )
2147
2920
  ] }),
2148
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "pf-grid", children: [
2149
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "chart-block pf-block", "data-span": "4", children: [
2150
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "chart-block-head", children: [
2151
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "chart-block-title", children: t("bandStages") }),
2152
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chart-block-note", children: t("bandStagesNote") })
2921
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "pf-grid", children: [
2922
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "chart-block pf-block", "data-span": "4", children: [
2923
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "chart-block-head", children: [
2924
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "chart-block-title", children: t("bandStages") }),
2925
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "chart-block-note", children: t("bandStagesNote") })
2153
2926
  ] }),
2154
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2927
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2155
2928
  ColumnChart,
2156
2929
  {
2157
2930
  columns: stageColumns,
@@ -2162,19 +2935,23 @@ window.__ModuleLoader__.load({
2162
2935
  height: 72
2163
2936
  }
2164
2937
  ),
2165
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2938
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2166
2939
  Legend,
2167
2940
  {
2168
- items: analysis.stages.filter((bucket) => bucket.count > 0).map((bucket) => ({ key: bucket.key, label: stageLabel(t, bucket.key), tone: "blue", value: format(t("stageAmountLabel"), { amount: formatWan2(bucket.amountWan) }) }))
2941
+ items: analysis.stages.filter((bucket) => bucket.count > 0).map((bucket) => ({ key: bucket.key, label: stageLabel(t, bucket.key), tone: "blue", value: format(t("stageAmountLabel"), { amount: formatWan(bucket.amountWan) }) }))
2169
2942
  }
2170
- )
2943
+ ),
2944
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "pf-subfigure", children: [
2945
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pf-subfigure-label", children: t("stageProgressLabel") }),
2946
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StageProgressFigure, { analysis, projects: props.projects, t })
2947
+ ] })
2171
2948
  ] }),
2172
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "chart-block pf-block", "data-span": "4", children: [
2173
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "chart-block-head", children: [
2174
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "chart-block-title", children: t("bandDims") }),
2175
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chart-block-note", children: t("bandDimsNote") })
2949
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "chart-block pf-block", "data-span": "4", children: [
2950
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "chart-block-head", children: [
2951
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "chart-block-title", children: t("bandDims") }),
2952
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "chart-block-note", children: t("bandDimsNote") })
2176
2953
  ] }),
2177
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "pf-radials", children: analysis.dimensions.map((row) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2954
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "pf-radials", children: analysis.dimensions.map((row) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2178
2955
  RadialMeter,
2179
2956
  {
2180
2957
  ratio: row.ratio,
@@ -2187,12 +2964,12 @@ window.__ModuleLoader__.load({
2187
2964
  row.key
2188
2965
  )) })
2189
2966
  ] }),
2190
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "chart-block pf-block", "data-span": "2", children: [
2191
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "chart-block-head", children: [
2192
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "chart-block-title", children: t("bandOrgs") }),
2193
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chart-block-note", children: t("bandOrgsNote") })
2967
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "chart-block pf-block", "data-span": "2", children: [
2968
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "chart-block-head", children: [
2969
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "chart-block-title", children: t("bandOrgs") }),
2970
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "chart-block-note", children: t("bandOrgsNote") })
2194
2971
  ] }),
2195
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2972
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2196
2973
  BarList,
2197
2974
  {
2198
2975
  rows: orgRows,
@@ -2205,12 +2982,12 @@ window.__ModuleLoader__.load({
2205
2982
  }
2206
2983
  )
2207
2984
  ] }),
2208
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "chart-block pf-block", "data-span": "2", children: [
2209
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "chart-block-head", children: [
2210
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "chart-block-title", children: t("bandTypes") }),
2211
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chart-block-note", children: t("bandTypesNote") })
2985
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "chart-block pf-block", "data-span": "2", children: [
2986
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "chart-block-head", children: [
2987
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "chart-block-title", children: t("bandTypes") }),
2988
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "chart-block-note", children: t("bandTypesNote") })
2212
2989
  ] }),
2213
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2990
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2214
2991
  Donut,
2215
2992
  {
2216
2993
  slices: typeSlices,
@@ -2223,12 +3000,12 @@ window.__ModuleLoader__.load({
2223
3000
  }
2224
3001
  )
2225
3002
  ] }),
2226
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "chart-block pf-block", "data-span": "2", children: [
2227
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "chart-block-head", children: [
2228
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "chart-block-title", children: t("bandAmounts") }),
2229
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chart-block-note", children: t("bandAmountsNote") })
3003
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "chart-block pf-block", "data-span": "2", children: [
3004
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "chart-block-head", children: [
3005
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "chart-block-title", children: t("bandAmounts") }),
3006
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "chart-block-note", children: t("bandAmountsNote") })
2230
3007
  ] }),
2231
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3008
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2232
3009
  BarList,
2233
3010
  {
2234
3011
  rows: amountRows,
@@ -2237,17 +3014,17 @@ window.__ModuleLoader__.load({
2237
3014
  onSelect: (pocId) => onOpen(pocId)
2238
3015
  }
2239
3016
  ),
2240
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("p", { className: "pf-note", "data-tone": analysis.concentration > 0.33 ? "amber" : "muted", title: analysis.concentration > 0.33 ? t("concentrationHigh") : t("concentrationNormal"), children: [
3017
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "pf-note", "data-tone": analysis.concentration > 0.33 ? "amber" : "muted", title: analysis.concentration > 0.33 ? t("concentrationHigh") : t("concentrationNormal"), children: [
2241
3018
  format(t("amountConcentrationLabel"), { share: Math.round(analysis.concentration * 100) }),
2242
3019
  analysis.amountMissing > 0 ? ` \xB7 ${format(t("amountMissingLabel"), { count: analysis.amountMissing })}` : null
2243
3020
  ] })
2244
3021
  ] }),
2245
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "chart-block pf-block", "data-span": "2", children: [
2246
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "chart-block-head", children: [
2247
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "chart-block-title", children: t("bandGapRules") }),
2248
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chart-block-note", children: format(t("bandGapRulesNote"), { count: props.gaps.length }) })
3022
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "chart-block pf-block", "data-span": "2", children: [
3023
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "chart-block-head", children: [
3024
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h3", { className: "chart-block-title", children: t("bandGapRules") }),
3025
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "chart-block-note", children: format(t("bandGapRulesNote"), { count: props.gaps.length }) })
2249
3026
  ] }),
2250
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3027
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2251
3028
  BarList,
2252
3029
  {
2253
3030
  rows: gapRows,
@@ -2261,24 +3038,46 @@ window.__ModuleLoader__.load({
2261
3038
  ] });
2262
3039
  }
2263
3040
  function FilteredEmpty({ t, onClearFilters }) {
2264
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "empty-state", children: [
2265
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "empty-title", children: t("filteredEmptyTitle") }),
2266
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "empty-copy", children: t("filteredEmptyCopy") }),
2267
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", className: "btn", onClick: onClearFilters, children: t("filteredEmptyReset") })
3041
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "empty-state", children: [
3042
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "empty-title", children: t("filteredEmptyTitle") }),
3043
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "empty-copy", children: t("filteredEmptyCopy") }),
3044
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { type: "button", className: "btn", onClick: onClearFilters, children: t("filteredEmptyReset") })
2268
3045
  ] });
2269
3046
  }
2270
3047
  function OverviewPage(props) {
2271
- const { projects, gaps, viewMode, selectedId, locale, t, filteredOut, onOpen, onClearFilters, onSort, sortKey, sortAsc } = props;
2272
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2273
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PortfolioBand, { props }),
2274
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "workspace-grid", children: [
2275
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "primary-column", children: [
2276
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "panel", children: [
2277
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "panel-header", children: [
2278
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "panel-title", children: t("tableTitle") }),
2279
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "panel-kicker", children: projects.length })
3048
+ const { projects, viewMode, selectedId, locale, t, filteredOut, onOpen, onClearFilters, onSort, sortKey, sortAsc } = props;
3049
+ const visibleIds = (0, import_react5.useMemo)(() => {
3050
+ if (projects.length === props.snapshot.projects.length) return null;
3051
+ return new Set(projects.map((project) => project.pocId));
3052
+ }, [projects, props.snapshot.projects.length]);
3053
+ const visibleBlockerCount = (0, import_react5.useMemo)(
3054
+ () => visibleIds === null ? props.snapshot.blockers.rows.length : props.snapshot.blockers.rows.filter((row) => visibleIds.has(row.pocId)).length,
3055
+ [props.snapshot.blockers.rows, visibleIds]
3056
+ );
3057
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
3058
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3059
+ KpiStrip,
3060
+ {
3061
+ stats: props.snapshot.stats,
3062
+ analysis: props.analysis,
3063
+ blockedCount: props.snapshot.blockers.projectsBlocked,
3064
+ total: props.snapshot.projects.length,
3065
+ activeStage: props.filters.stage,
3066
+ t,
3067
+ onFilter: (next) => props.onFilter(next),
3068
+ onClearFilters: props.onClearFilters
3069
+ }
3070
+ ),
3071
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortfolioBand, { props }),
3072
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(BudgetPanel, { projects: props.projects, analysis: props.analysis, t }),
3073
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "workspace-grid", children: [
3074
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "primary-column", children: [
3075
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "panel", children: [
3076
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "panel-header", children: [
3077
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "panel-title", children: t("tableTitle") }),
3078
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "panel-kicker", children: projects.length })
2280
3079
  ] }),
2281
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "panel-body", children: filteredOut ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FilteredEmpty, { t, onClearFilters }) : viewMode === "cards" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ProjectCards, { projects, selectedId, locale, t, onOpen }) : viewMode === "board" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ProjectBoard, { projects, t, onOpen }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3080
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "panel-body", children: filteredOut ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FilteredEmpty, { t, onClearFilters }) : viewMode === "cards" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProjectCards, { projects, selectedId, locale, t, onOpen }) : viewMode === "board" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProjectBoard, { projects, t, onOpen }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2282
3081
  ProjectTable,
2283
3082
  {
2284
3083
  projects,
@@ -2292,30 +3091,39 @@ window.__ModuleLoader__.load({
2292
3091
  }
2293
3092
  ) })
2294
3093
  ] }),
2295
- props.snapshot.warnings.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "panel", children: [
2296
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "panel-header", children: [
2297
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "panel-title", children: t("warningsTitle") }),
2298
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "panel-kicker", children: props.snapshot.warnings.length })
3094
+ props.snapshot.warnings.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "panel", children: [
3095
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "panel-header", children: [
3096
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "panel-title", children: t("warningsTitle") }),
3097
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "panel-kicker", children: props.snapshot.warnings.length })
2299
3098
  ] }),
2300
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "panel-body padded", children: props.snapshot.warnings.map((warning) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("p", { className: "gap-copy", style: { margin: "0 0 4px" }, children: [
3099
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "panel-body padded", children: props.snapshot.warnings.map((warning) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "gap-copy", style: { margin: "0 0 4px" }, children: [
2301
3100
  "\xB7 ",
2302
3101
  warning
2303
3102
  ] }, warning)) })
2304
3103
  ] }) : null
2305
3104
  ] }),
2306
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "secondary-column", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "panel", children: [
2307
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "panel-header", children: [
2308
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: "panel-title", children: t("pendingTitle") }),
2309
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "panel-kicker", children: format(t("pendingCount"), { count: gaps.length }) })
3105
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "secondary-column", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "panel", children: [
3106
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "panel-header", children: [
3107
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { className: "panel-title", children: t("blockerTitle") }),
3108
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "panel-kicker", children: format(t("blockerCount"), { count: visibleBlockerCount }) })
2310
3109
  ] }),
2311
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "panel-body", children: gaps.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "panel-body padded", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "empty-copy", style: { margin: 0 }, children: filteredOut ? t("pendingEmptyFiltered") : t("pendingEmpty") }) }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PendingRail, { gaps, t, onOpen }) })
3110
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "panel-note", children: format(t("blockerProjectsNote"), { blocked: props.snapshot.blockers.projectsBlocked, total: props.snapshot.blockers.projectsTotal }) }),
3111
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "panel-body", children: visibleBlockerCount === 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "panel-body padded", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "empty-copy", style: { margin: 0 }, children: filteredOut ? t("blockerEmptyFiltered") : t("blockerEmpty") }) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3112
+ BlockerPanel,
3113
+ {
3114
+ board: props.snapshot.blockers,
3115
+ visibleIds,
3116
+ t,
3117
+ onOpen
3118
+ }
3119
+ ) })
2312
3120
  ] }) })
2313
3121
  ] })
2314
3122
  ] });
2315
3123
  }
2316
3124
 
2317
3125
  // src/client/insights.tsx
2318
- var import_jsx_runtime4 = require("react/jsx-runtime");
3126
+ var import_jsx_runtime7 = require("react/jsx-runtime");
2319
3127
  var LANE_ORDER = ["high", "medium", "low", "unset"];
2320
3128
  var LANE_TEXT = {
2321
3129
  high: "riskHigh",
@@ -2336,16 +3144,6 @@ window.__ModuleLoader__.load({
2336
3144
  function projectLabel(name, pocId) {
2337
3145
  return name === "" ? pocId : `${name} \xB7 ${pocId}`;
2338
3146
  }
2339
- function formatDate3(value, locale) {
2340
- if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) return value === "" ? "\u2014" : value;
2341
- const stamp = /* @__PURE__ */ new Date(`${value}T00:00:00`);
2342
- if (Number.isNaN(stamp.getTime())) return value;
2343
- return stamp.toLocaleDateString(locale.toLowerCase().startsWith("zh") ? "zh-CN" : "en-US", {
2344
- year: "numeric",
2345
- month: "2-digit",
2346
- day: "2-digit"
2347
- });
2348
- }
2349
3147
  function recognitionTone2(value) {
2350
3148
  if (value === "\u8BA4\u53EF") return "green";
2351
3149
  if (value === "\u90E8\u5206\u8BA4\u53EF") return "amber";
@@ -2353,20 +3151,20 @@ window.__ModuleLoader__.load({
2353
3151
  return "slate";
2354
3152
  }
2355
3153
  function LevelPill({ level, t }) {
2356
- if (level === "high") return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "status-pill tone-red", children: [
2357
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "status-dot" }),
3154
+ if (level === "high") return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "status-pill tone-red", children: [
3155
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "status-dot" }),
2358
3156
  t("riskHigh")
2359
3157
  ] });
2360
- if (level === "medium") return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "status-pill tone-amber", children: [
2361
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "status-dot" }),
3158
+ if (level === "medium") return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "status-pill tone-amber", children: [
3159
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "status-dot" }),
2362
3160
  t("riskMedium")
2363
3161
  ] });
2364
- if (level === "low") return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "status-pill tone-green", children: [
2365
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "status-dot" }),
3162
+ if (level === "low") return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "status-pill tone-green", children: [
3163
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "status-dot" }),
2366
3164
  t("riskLow")
2367
3165
  ] });
2368
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "status-pill tone-slate", children: [
2369
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "status-dot" }),
3166
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "status-pill tone-slate", children: [
3167
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "status-dot" }),
2370
3168
  t("riskUnset")
2371
3169
  ] });
2372
3170
  }
@@ -2420,20 +3218,20 @@ window.__ModuleLoader__.load({
2420
3218
  low: buckets.low.length,
2421
3219
  unset: buckets.unset.length
2422
3220
  });
2423
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: "risk-board", children: [
2424
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: "risk-head", children: [
2425
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "risk-head-text", children: [
2426
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h1", { className: "risk-head-title", children: t("risksBoardTitle") }),
2427
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "risk-head-subtitle", children: t("risksSubtitle") })
3221
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("section", { className: "risk-board", children: [
3222
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "risk-head", children: [
3223
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "risk-head-text", children: [
3224
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h1", { className: "risk-head-title", children: t("risksBoardTitle") }),
3225
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "risk-head-subtitle", children: t("risksSubtitle") })
2428
3226
  ] }),
2429
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", className: "risk-back", onClick: props.onBack, children: t("back") })
3227
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "risk-back", onClick: props.onBack, children: t("back") })
2430
3228
  ] }),
2431
- hasRisks ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: "risk-figure", "aria-labelledby": "risk-figure-title", children: [
2432
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: "risk-figure-head", children: [
2433
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { className: "risk-figure-title", id: "risk-figure-title", children: t("riskLaneTitle") }),
2434
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "risk-figure-note", children: format(t("riskBoardNote"), { count: board.rows.length, projects: board.projectsWithRisks }) })
3229
+ hasRisks ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("section", { className: "risk-figure", "aria-labelledby": "risk-figure-title", children: [
3230
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "risk-figure-head", children: [
3231
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { className: "risk-figure-title", id: "risk-figure-title", children: t("riskLaneTitle") }),
3232
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "risk-figure-note", children: format(t("riskBoardNote"), { count: board.rows.length, projects: board.projectsWithRisks }) })
2435
3233
  ] }),
2436
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3234
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2437
3235
  SeverityBar,
2438
3236
  {
2439
3237
  lanes: lanes.map((lane) => ({ key: lane.key, label: lane.label, value: lane.count, tone: lane.tone })),
@@ -2441,14 +3239,14 @@ window.__ModuleLoader__.load({
2441
3239
  summary: laneNote
2442
3240
  }
2443
3241
  ),
2444
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "risk-caption", children: laneNote })
3242
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "risk-caption", children: laneNote })
2445
3243
  ] }) : null,
2446
- hasRisks && projectRows.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: "risk-projects", "aria-labelledby": "risk-projects-title", children: [
2447
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: "risk-figure-head", children: [
2448
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { className: "risk-figure-title", id: "risk-projects-title", children: t("riskSourceProject") }),
2449
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "risk-figure-note", children: format(t("riskProjects"), { withRisks: board.projectsWithRisks, total: board.projectsTotal }) })
3244
+ hasRisks && projectRows.length > 1 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("section", { className: "risk-projects", "aria-labelledby": "risk-projects-title", children: [
3245
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "risk-figure-head", children: [
3246
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { className: "risk-figure-title", id: "risk-projects-title", children: t("riskSourceProject") }),
3247
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "risk-figure-note", children: format(t("riskProjects"), { withRisks: board.projectsWithRisks, total: board.projectsTotal }) })
2450
3248
  ] }),
2451
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3249
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2452
3250
  BarList,
2453
3251
  {
2454
3252
  rows: projectRows,
@@ -2458,27 +3256,27 @@ window.__ModuleLoader__.load({
2458
3256
  }
2459
3257
  )
2460
3258
  ] }) : null,
2461
- hasRisks ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "risk-lanes", children: lanes.map(
2462
- (lane) => lane.count === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: "risk-lane", "data-level": lane.key, "aria-label": lane.label, children: [
2463
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: "risk-lane-head", children: [
2464
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(LevelPill, { level: lane.key, t }),
2465
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "risk-lane-count", children: lane.count }),
2466
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "risk-lane-meter", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(InlineMeter, { value: lane.count, max: board.rows.length, tone: lane.tone }) }),
2467
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "risk-lane-share", children: [
3259
+ hasRisks ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "risk-lanes", children: lanes.map(
3260
+ (lane) => lane.count === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("section", { className: "risk-lane", "data-level": lane.key, "aria-label": lane.label, children: [
3261
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "risk-lane-head", children: [
3262
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(LevelPill, { level: lane.key, t }),
3263
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "risk-lane-count", children: lane.count }),
3264
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "risk-lane-meter", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(InlineMeter, { value: lane.count, max: board.rows.length, tone: lane.tone }) }),
3265
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "risk-lane-share", children: [
2468
3266
  Math.round(lane.count / board.rows.length * 100),
2469
3267
  "%"
2470
3268
  ] })
2471
3269
  ] }),
2472
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: "risk-rows", children: lane.rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("li", { className: "risk-row-item", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "risk-row", "data-level": laneOf(row.level), children: [
2473
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "risk-row-main", children: [
2474
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "risk-name", children: row.name === "" ? t("emptyField") : row.name }),
2475
- row.mitigation === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "risk-mitigation", children: [
2476
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "risk-mitigation-label", children: t("riskMitigation") }),
3270
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "risk-rows", children: lane.rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("li", { className: "risk-row-item", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "risk-row", "data-level": laneOf(row.level), children: [
3271
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "risk-row-main", children: [
3272
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "risk-name", children: row.name === "" ? t("emptyField") : row.name }),
3273
+ row.mitigation === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "risk-mitigation", children: [
3274
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "risk-mitigation-label", children: t("riskMitigation") }),
2477
3275
  row.mitigation
2478
3276
  ] })
2479
3277
  ] }),
2480
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "risk-row-side", children: [
2481
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
3278
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "risk-row-side", children: [
3279
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
2482
3280
  "button",
2483
3281
  {
2484
3282
  type: "button",
@@ -2486,17 +3284,17 @@ window.__ModuleLoader__.load({
2486
3284
  onClick: () => onOpenProject(row.pocId),
2487
3285
  children: [
2488
3286
  projectLabel(row.pocName, row.pocId),
2489
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "risk-project-arrow", "aria-hidden": "true", children: "\u2192" })
3287
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "risk-project-arrow", "aria-hidden": "true", children: "\u2192" })
2490
3288
  ]
2491
3289
  }
2492
3290
  ),
2493
- row.gapCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "risk-gap", children: format(t("riskGapContext"), { count: row.gapCount, high: row.highGapCount }) }) : null
3291
+ row.gapCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "risk-gap", children: format(t("riskGapContext"), { count: row.gapCount, high: row.highGapCount }) }) : null
2494
3292
  ] })
2495
3293
  ] }) }, `${row.pocId}:${index}`)) })
2496
3294
  ] }, lane.key)
2497
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "risk-empty", role: "status", children: [
2498
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "risk-empty-mark", "aria-hidden": "true", children: "\u2014" }),
2499
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "risk-empty-copy", children: t("riskNoRisks") })
3295
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "risk-empty", role: "status", children: [
3296
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "risk-empty-mark", "aria-hidden": "true", children: "\u2014" }),
3297
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "risk-empty-copy", children: t("riskNoRisks") })
2500
3298
  ] })
2501
3299
  ] });
2502
3300
  }
@@ -2525,22 +3323,22 @@ window.__ModuleLoader__.load({
2525
3323
  const groups = groupEntries(timeline.entries);
2526
3324
  const hasEntries = timeline.entries.length > 0;
2527
3325
  const sparkPoints = [...timeline.months].reverse();
2528
- const range = timeline.range === null ? null : format(t("timelineRange"), { from: formatDate3(timeline.range.from, locale), to: formatDate3(timeline.range.to, locale) });
3326
+ const range = timeline.range === null ? null : format(t("timelineRange"), { from: formatDate(timeline.range.from, locale), to: formatDate(timeline.range.to, locale) });
2529
3327
  const laneNote = format(t("tlLaneNote"), { count: timeline.entries.length });
2530
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: "tl-page", children: [
2531
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: "tl-head", children: [
2532
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "tl-head-text", children: [
2533
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h1", { className: "tl-head-title", children: t("timelineTitle") }),
2534
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "tl-head-subtitle", children: t("timelineSubtitle") })
3328
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("section", { className: "tl-page", children: [
3329
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "tl-head", children: [
3330
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "tl-head-text", children: [
3331
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h1", { className: "tl-head-title", children: t("timelineTitle") }),
3332
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "tl-head-subtitle", children: t("timelineSubtitle") })
2535
3333
  ] }),
2536
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { type: "button", className: "tl-back", onClick: props.onBack, children: t("back") })
3334
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("button", { type: "button", className: "tl-back", onClick: props.onBack, children: t("back") })
2537
3335
  ] }),
2538
- hasEntries ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: "tl-figure", "aria-labelledby": "tl-figure-title", children: [
2539
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: "tl-figure-head", children: [
2540
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { className: "tl-figure-title", id: "tl-figure-title", children: t("tlLaneTitle") }),
2541
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "tl-figure-note", children: range === null ? laneNote : range })
3336
+ hasEntries ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("section", { className: "tl-figure", "aria-labelledby": "tl-figure-title", children: [
3337
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "tl-figure-head", children: [
3338
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { className: "tl-figure-title", id: "tl-figure-title", children: t("tlLaneTitle") }),
3339
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "tl-figure-note", children: range === null ? laneNote : range })
2542
3340
  ] }),
2543
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3341
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2544
3342
  Sparkbars,
2545
3343
  {
2546
3344
  points: sparkPoints.map((point) => ({ month: point.month, count: point.count })),
@@ -2548,14 +3346,14 @@ window.__ModuleLoader__.load({
2548
3346
  summary: laneNote
2549
3347
  }
2550
3348
  ),
2551
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "tl-caption", children: range === null ? laneNote : `${laneNote} \xB7 ${range}` })
3349
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "tl-caption", children: range === null ? laneNote : `${laneNote} \xB7 ${range}` })
2552
3350
  ] }) : null,
2553
- timeline.silentProjects.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: "tl-silent", "aria-labelledby": "tl-silent-title", children: [
2554
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: "tl-silent-head", children: [
2555
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { className: "tl-silent-title", id: "tl-silent-title", children: t("tlSilentTitle") }),
2556
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "tl-silent-note", children: format(t("tlSilentNote"), { count: timeline.silentProjects.length }) })
3351
+ timeline.silentProjects.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("section", { className: "tl-silent", "aria-labelledby": "tl-silent-title", children: [
3352
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "tl-silent-head", children: [
3353
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { className: "tl-silent-title", id: "tl-silent-title", children: t("tlSilentTitle") }),
3354
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "tl-silent-note", children: format(t("tlSilentNote"), { count: timeline.silentProjects.length }) })
2557
3355
  ] }),
2558
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "tl-silent-chips", children: timeline.silentProjects.map((project) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3356
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "tl-silent-chips", children: timeline.silentProjects.map((project) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2559
3357
  "button",
2560
3358
  {
2561
3359
  type: "button",
@@ -2565,15 +3363,15 @@ window.__ModuleLoader__.load({
2565
3363
  },
2566
3364
  project.pocId
2567
3365
  )) }),
2568
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "tl-silent-hint", children: t("timelineSilentHint") })
3366
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "tl-silent-hint", children: t("timelineSilentHint") })
2569
3367
  ] }) : null,
2570
- hasEntries ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "tl-stream", children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: "tl-month-group", children: [
2571
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "tl-month", children: [
2572
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "tl-month-label", children: group.month === "" ? t("emptyField") : group.month }),
2573
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "tl-month-count", children: format(t("timelineCount"), { count: group.entries.length }) }),
2574
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "tl-month-rule", "aria-hidden": "true" })
3368
+ hasEntries ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "tl-stream", children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("section", { className: "tl-month-group", children: [
3369
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "tl-month", children: [
3370
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "tl-month-label", children: group.month === "" ? t("emptyField") : group.month }),
3371
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "tl-month-count", children: format(t("timelineCount"), { count: group.entries.length }) }),
3372
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "tl-month-rule", "aria-hidden": "true" })
2575
3373
  ] }),
2576
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ul", { className: "tl-entries", children: group.entries.map((entry, index) => {
3374
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("ul", { className: "tl-entries", children: group.entries.map((entry, index) => {
2577
3375
  const fields = [
2578
3376
  {
2579
3377
  key: "goal",
@@ -2606,14 +3404,14 @@ window.__ModuleLoader__.load({
2606
3404
  if (entry.gate3_2 !== "") chips.push({ key: "gate3-2", label: t("gate3_2Label"), value: entry.gate3_2 });
2607
3405
  if (entry.nextGoal !== "") chips.push({ key: "next", label: t("tlEntryNext"), value: entry.nextGoal });
2608
3406
  if (entry.nextOwner !== "") chips.push({ key: "owner", value: `@${entry.nextOwner}` });
2609
- if (entry.nextDeadline !== "") chips.push({ key: "deadline", value: formatDate3(entry.nextDeadline, locale) });
2610
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("li", { className: "tl-entry", children: [
2611
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "tl-gutter", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "tl-node", "data-tone": recognitionTone2(entry.recognition) }) }),
2612
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("article", { className: "tl-card", children: [
2613
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: "tl-card-head", children: [
2614
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("time", { className: "tl-date", dateTime: entry.date, children: formatDate3(entry.date, locale) }),
2615
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "tl-type", children: entry.type === "" ? t("roundUnnumbered") : entry.type }),
2616
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3407
+ if (entry.nextDeadline !== "") chips.push({ key: "deadline", value: formatDate(entry.nextDeadline, locale) });
3408
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("li", { className: "tl-entry", children: [
3409
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "tl-gutter", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "tl-node", "data-tone": recognitionTone2(entry.recognition) }) }),
3410
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("article", { className: "tl-card", children: [
3411
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "tl-card-head", children: [
3412
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("time", { className: "tl-date", dateTime: entry.date, children: formatDate(entry.date, locale, "\u2014") }),
3413
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "tl-type", children: entry.type === "" ? t("roundUnnumbered") : entry.type }),
3414
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2617
3415
  "button",
2618
3416
  {
2619
3417
  type: "button",
@@ -2622,25 +3420,25 @@ window.__ModuleLoader__.load({
2622
3420
  children: projectLabel(entry.pocName, entry.pocId)
2623
3421
  }
2624
3422
  ),
2625
- entry.recognition === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: `status-pill tone-${recognitionTone2(entry.recognition)} tl-recog`, children: [
2626
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "status-dot" }),
3423
+ entry.recognition === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: `status-pill tone-${recognitionTone2(entry.recognition)} tl-recog`, children: [
3424
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "status-dot" }),
2627
3425
  entry.recognition
2628
3426
  ] })
2629
3427
  ] }),
2630
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dl", { className: "tl-fields", children: fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "tl-field", children: [
2631
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dt", { className: "tl-field-label", children: field.label }),
2632
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dd", { className: "tl-field-value", "data-emphasis": field.emphasis, children: field.value })
3428
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("dl", { className: "tl-fields", children: fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "tl-field", children: [
3429
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("dt", { className: "tl-field-label", children: field.label }),
3430
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("dd", { className: "tl-field-value", "data-emphasis": field.emphasis, children: field.value })
2633
3431
  ] }, field.key)) }),
2634
- chips.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("footer", { className: "tl-chips", children: chips.map((chip) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "tl-chip", children: [
2635
- chip.label === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "tl-chip-label", children: chip.label }),
3432
+ chips.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("footer", { className: "tl-chips", children: chips.map((chip) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "tl-chip", children: [
3433
+ chip.label === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "tl-chip-label", children: chip.label }),
2636
3434
  chip.value
2637
3435
  ] }, chip.key)) })
2638
3436
  ] })
2639
3437
  ] }, `${entry.pocId}:${entry.date}:${index}`);
2640
3438
  }) })
2641
- ] }, group.month === "" ? "undated" : group.month)) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "tl-empty", role: "status", children: [
2642
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "tl-empty-mark", "aria-hidden": "true", children: "\u2014" }),
2643
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "tl-empty-copy", children: t("timelineEmpty") })
3439
+ ] }, group.month === "" ? "undated" : group.month)) }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "tl-empty", role: "status", children: [
3440
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "tl-empty-mark", "aria-hidden": "true", children: "\u2014" }),
3441
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "tl-empty-copy", children: t("timelineEmpty") })
2644
3442
  ] })
2645
3443
  ] });
2646
3444
  }
@@ -3006,6 +3804,45 @@ window.__ModuleLoader__.load({
3006
3804
  .wd-shell .modal-content { padding: 15px 19px; display: flex; flex-direction: column; gap: 5px; overflow: auto; }
3007
3805
  .wd-shell .modal-footer { display: flex; align-items: center; gap: 8px; padding: 13px 19px; border-top: 1px solid var(--wd-hairline); background: var(--wd-inset); }
3008
3806
  .wd-shell .modal-footer .spacer { flex: 1 1 auto; }
3807
+ /* The export dialog needs a wider box: it lists projects, and 452px clipped the
3808
+ company name on every row. */
3809
+ .wd-shell .modal-wide { width: min(560px, 100%); }
3810
+ .wd-shell .modal-lead {
3811
+ margin: 0 0 4px; font-size: 12px; line-height: 18px;
3812
+ color: var(--dsw-alias-label-secondary);
3813
+ }
3814
+ .wd-shell .export-toolbar {
3815
+ display: flex; align-items: center; gap: 7px;
3816
+ padding: 8px 0 6px;
3817
+ }
3818
+ .wd-shell .export-count {
3819
+ margin-left: auto; font-size: 11px; line-height: 16px;
3820
+ color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
3821
+ }
3822
+ .wd-shell .export-list {
3823
+ list-style: none; margin: 0; padding: 0;
3824
+ max-height: 42vh; overflow: auto;
3825
+ border: 1px solid var(--wd-hairline); border-radius: 9px;
3826
+ }
3827
+ .wd-shell .export-row {
3828
+ display: flex; align-items: flex-start; gap: 9px;
3829
+ padding: 8px 11px; cursor: pointer;
3830
+ border-bottom: 1px solid var(--wd-hairline);
3831
+ transition: background .11s ease;
3832
+ }
3833
+ .wd-shell .export-list li:last-child .export-row { border-bottom: 0; }
3834
+ .wd-shell .export-row:hover { background: var(--wd-inset); }
3835
+ .wd-shell .export-row[data-selected="true"] { background: var(--wd-primary-soft); }
3836
+ .wd-shell .export-row input[type="checkbox"] { accent-color: var(--wd-primary); flex: none; margin: 2px 0 0; }
3837
+ .wd-shell .export-row-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
3838
+ .wd-shell .export-row-name {
3839
+ font-size: 12px; line-height: 17px; font-weight: 600; color: var(--wd-text);
3840
+ overflow-wrap: anywhere;
3841
+ }
3842
+ .wd-shell .export-row-meta {
3843
+ font-size: 10.5px; line-height: 15px;
3844
+ color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
3845
+ }
3009
3846
  .wd-shell .checkbox-row {
3010
3847
  display: flex; align-items: center; gap: 10px;
3011
3848
  padding: 9px 11px; border-radius: 8px; cursor: pointer;
@@ -3039,6 +3876,187 @@ window.__ModuleLoader__.load({
3039
3876
  }
3040
3877
  `;
3041
3878
 
3879
+ // src/client/css/blockers.ts
3880
+ var BLOCKERS_CSS = `
3881
+ /* ---------- blocker chips ---------- */
3882
+ .wd-shell .blocker-chips {
3883
+ display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
3884
+ padding: 0 0 10px;
3885
+ }
3886
+ .wd-shell .blocker-chip {
3887
+ display: inline-flex; align-items: center; gap: 6px;
3888
+ height: 26px; padding: 0 10px;
3889
+ border: 1px solid var(--wd-hairline); border-radius: 20px;
3890
+ background: var(--wd-surface); color: var(--dsw-alias-label-secondary);
3891
+ font-size: 11.5px; line-height: 16px; cursor: pointer; white-space: nowrap;
3892
+ transition: background .12s ease, border-color .12s ease, color .12s ease;
3893
+ }
3894
+ .wd-shell .blocker-chip:hover { background: var(--wd-inset); color: var(--wd-text); }
3895
+ .wd-shell .blocker-chip[data-active="true"] {
3896
+ background: var(--wd-primary-soft); border-color: var(--wd-primary);
3897
+ color: var(--wd-primary); font-weight: 600;
3898
+ }
3899
+ .wd-shell .blocker-chip-count {
3900
+ font-size: 10.5px; font-variant-numeric: tabular-nums;
3901
+ color: var(--dsw-alias-label-tertiary); font-weight: 500;
3902
+ }
3903
+ .wd-shell .blocker-chip[data-active="true"] .blocker-chip-count { color: var(--wd-primary); }
3904
+
3905
+ /* ---------- blocker groups ---------- */
3906
+ .wd-shell .blocker-list { display: flex; flex-direction: column; gap: 10px; }
3907
+ .wd-shell .blocker-group {
3908
+ border: 1px solid var(--wd-hairline); border-radius: 10px;
3909
+ background: var(--wd-surface); overflow: hidden;
3910
+ }
3911
+ .wd-shell .blocker-group[data-level="high"] { border-left: 3px solid var(--wd-red); }
3912
+ .wd-shell .blocker-group[data-level="medium"] { border-left: 3px solid var(--wd-amber); }
3913
+ .wd-shell .blocker-group-head {
3914
+ display: flex; align-items: center; gap: 8px;
3915
+ padding: 9px 12px; border-bottom: 1px solid var(--wd-hairline);
3916
+ background: var(--wd-inset);
3917
+ }
3918
+ .wd-shell .blocker-project {
3919
+ display: inline-flex; align-items: baseline; gap: 7px;
3920
+ padding: 0; border: 0; background: none; cursor: pointer;
3921
+ font-size: 12.5px; line-height: 18px; font-weight: 650; color: var(--wd-text);
3922
+ text-align: left; min-width: 0; overflow-wrap: anywhere;
3923
+ }
3924
+ .wd-shell .blocker-project:hover { color: var(--wd-primary); }
3925
+ .wd-shell .blocker-project-id {
3926
+ font-size: 10.5px; font-weight: 500; color: var(--dsw-alias-label-tertiary);
3927
+ font-variant-numeric: tabular-nums;
3928
+ }
3929
+ .wd-shell .blocker-stage {
3930
+ flex: none; font-size: 10.5px; line-height: 16px;
3931
+ padding: 1px 7px; border-radius: 10px;
3932
+ background: var(--wd-primary-soft); color: var(--wd-primary);
3933
+ }
3934
+ .wd-shell .blocker-group-count {
3935
+ margin-left: auto; flex: none;
3936
+ font-size: 10.5px; font-variant-numeric: tabular-nums;
3937
+ color: var(--dsw-alias-label-tertiary);
3938
+ }
3939
+ .wd-shell .blocker-rows { list-style: none; margin: 0; padding: 0; }
3940
+ .wd-shell .blocker-row {
3941
+ display: flex; flex-direction: column; gap: 2px;
3942
+ padding: 8px 12px; border-bottom: 1px solid var(--wd-hairline);
3943
+ }
3944
+ .wd-shell .blocker-row:last-child { border-bottom: 0; }
3945
+ .wd-shell .blocker-row-headline {
3946
+ font-size: 12px; line-height: 17px; font-weight: 600; color: var(--wd-text);
3947
+ overflow-wrap: anywhere;
3948
+ }
3949
+ .wd-shell .blocker-row[data-source="missing-amount"] .blocker-row-headline,
3950
+ .wd-shell .blocker-row[data-source="no-stage-since"] .blocker-row-headline { color: var(--wd-amber); }
3951
+ .wd-shell .blocker-row[data-source="stalled"] .blocker-row-headline,
3952
+ .wd-shell .blocker-row[data-source="no-progress"] .blocker-row-headline { color: var(--wd-red); }
3953
+ .wd-shell .blocker-row-copy {
3954
+ font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-secondary);
3955
+ overflow-wrap: anywhere;
3956
+ }
3957
+ .wd-shell .blocker-empty {
3958
+ margin: 0; padding: 22px 12px; text-align: center;
3959
+ font-size: 12px; color: var(--dsw-alias-label-tertiary);
3960
+ }
3961
+
3962
+ /* ---------- worklist ---------- */
3963
+ .wd-shell .worklist { display: flex; flex-direction: column; gap: 8px; }
3964
+ .wd-shell .worklist-items {
3965
+ list-style: none; margin: 0; padding: 0;
3966
+ display: flex; flex-direction: column; gap: 6px;
3967
+ }
3968
+ .wd-shell .worklist-item {
3969
+ display: flex; align-items: flex-start; gap: 9px;
3970
+ padding: 9px 12px;
3971
+ border: 1px solid var(--wd-hairline); border-radius: 9px;
3972
+ background: var(--wd-inset);
3973
+ }
3974
+ .wd-shell .worklist-mark {
3975
+ flex: none; font-size: 13px; line-height: 17px;
3976
+ color: var(--wd-amber);
3977
+ }
3978
+ .wd-shell .worklist-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
3979
+ .wd-shell .worklist-label {
3980
+ font-size: 12px; line-height: 17px; font-weight: 600; color: var(--wd-text);
3981
+ overflow-wrap: anywhere;
3982
+ }
3983
+ .wd-shell .worklist-copy {
3984
+ font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-secondary);
3985
+ overflow-wrap: anywhere;
3986
+ }
3987
+ .wd-shell .worklist-action {
3988
+ font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-tertiary);
3989
+ overflow-wrap: anywhere;
3990
+ }
3991
+ .wd-shell .worklist-done {
3992
+ margin: 0; padding: 14px 12px; text-align: center;
3993
+ font-size: 12px; color: var(--wd-green);
3994
+ }
3995
+ .wd-shell .worklist[data-empty="true"] {
3996
+ border: 1px dashed var(--wd-hairline); border-radius: 9px;
3997
+ background: var(--wd-inset);
3998
+ }
3999
+
4000
+ /* ---------- detail: worklist section ---------- */
4001
+ .wd-shell .dt-worklist { margin-bottom: 14px; }
4002
+ .wd-shell .dt-stage-context {
4003
+ display: flex; flex-direction: column; gap: 3px;
4004
+ padding: 12px 14px; margin-bottom: 14px;
4005
+ border: 1px solid var(--wd-hairline); border-left: 3px solid var(--wd-primary);
4006
+ border-radius: 10px; background: var(--wd-surface);
4007
+ }
4008
+ .wd-shell .dt-stage-context-head {
4009
+ display: flex; align-items: baseline; gap: 8px;
4010
+ }
4011
+ .wd-shell .dt-stage-context-title {
4012
+ margin: 0; font-size: 13px; line-height: 19px; font-weight: 650; color: var(--wd-text);
4013
+ }
4014
+ .wd-shell .dt-stage-context-kicker {
4015
+ font-size: 10.5px; line-height: 15px; letter-spacing: .04em;
4016
+ text-transform: uppercase; color: var(--dsw-alias-label-tertiary);
4017
+ }
4018
+ .wd-shell .dt-stage-context-copy {
4019
+ margin: 0; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary);
4020
+ }
4021
+ .wd-shell .dt-stage-context-next {
4022
+ margin: 0; font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-tertiary);
4023
+ }
4024
+ .wd-shell .dt-stage-context-state {
4025
+ align-self: flex-start; margin-top: 2px;
4026
+ font-size: 10.5px; line-height: 16px; padding: 1px 8px; border-radius: 10px;
4027
+ }
4028
+ .wd-shell .dt-stage-context[data-done="true"] .dt-stage-context-state {
4029
+ background: var(--wd-green-soft); color: var(--wd-green);
4030
+ }
4031
+ .wd-shell .dt-stage-context[data-done="false"] .dt-stage-context-state {
4032
+ background: var(--wd-amber-soft); color: var(--wd-amber);
4033
+ }
4034
+
4035
+ /* ---------- detail: collapsed "other sections" ---------- */
4036
+ .wd-shell .dt-fold {
4037
+ border: 1px solid var(--wd-hairline); border-radius: 10px;
4038
+ background: var(--wd-surface); margin-bottom: 14px; overflow: hidden;
4039
+ }
4040
+ .wd-shell .dt-fold-head {
4041
+ display: flex; align-items: center; gap: 8px;
4042
+ padding: 10px 14px; cursor: pointer;
4043
+ background: var(--wd-inset); border: 0; width: 100%; text-align: left;
4044
+ }
4045
+ .wd-shell .dt-fold-head:hover { background: var(--wd-canvas); }
4046
+ .wd-shell .dt-fold-title {
4047
+ margin: 0; font-size: 12.5px; line-height: 18px; font-weight: 650; color: var(--wd-text);
4048
+ }
4049
+ .wd-shell .dt-fold-hint {
4050
+ font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-tertiary);
4051
+ }
4052
+ .wd-shell .dt-fold-arrow {
4053
+ margin-left: auto; font-size: 11px; color: var(--dsw-alias-label-tertiary);
4054
+ }
4055
+ .wd-shell .dt-fold[data-open="true"] .dt-fold-body { display: block; }
4056
+ .wd-shell .dt-fold[data-open="false"] .dt-fold-body { display: none; }
4057
+ .wd-shell .dt-fold-body { padding: 12px 14px; border-top: 1px solid var(--wd-hairline); }
4058
+ `;
4059
+
3042
4060
  // src/client/css/charts.ts
3043
4061
  var CHARTS_CSS = `
3044
4062
  /* ---------- shared chart chrome ---------- */
@@ -3398,6 +4416,30 @@ window.__ModuleLoader__.load({
3398
4416
  .wd-shell .dt-prose-body { margin: 0; font-size: 12px; line-height: 19px; color: var(--dsw-alias-label-secondary); }
3399
4417
  .wd-shell .dt-prose[data-empty="true"] .dt-prose-body { color: var(--dsw-alias-label-tertiary); font-style: italic; }
3400
4418
 
4419
+ /* ---------- basic information ---------- */
4420
+ .wd-shell .dt-basic-grid {
4421
+ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
4422
+ gap: 7px 18px; margin: 0 0 12px;
4423
+ }
4424
+ @media (max-width: 900px) { .wd-shell .dt-basic-grid { grid-template-columns: minmax(0, 1fr); } }
4425
+ .wd-shell .dt-basic-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
4426
+ .wd-shell .dt-basic-label {
4427
+ flex: none; width: 108px;
4428
+ font-size: 11px; line-height: 17px; color: var(--dsw-alias-label-tertiary);
4429
+ }
4430
+ .wd-shell .dt-basic-value {
4431
+ margin: 0; font-size: 12px; line-height: 17px; font-weight: 500;
4432
+ color: var(--wd-text); overflow-wrap: anywhere;
4433
+ }
4434
+ .wd-shell .dt-basic-row[data-empty="true"] .dt-basic-value {
4435
+ font-weight: 400; color: var(--dsw-alias-label-tertiary); font-style: italic;
4436
+ }
4437
+ .wd-shell .dt-basic-decisions {
4438
+ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
4439
+ gap: 12px; padding-top: 11px; border-top: 1px solid var(--wd-hairline);
4440
+ }
4441
+ @media (max-width: 900px) { .wd-shell .dt-basic-decisions { grid-template-columns: minmax(0, 1fr); } }
4442
+
3401
4443
  /* ---------- progress stream ---------- */
3402
4444
  .wd-shell .prog-stream { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
3403
4445
  .wd-shell .prog-item { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; }
@@ -4262,6 +5304,13 @@ window.__ModuleLoader__.load({
4262
5304
  }
4263
5305
  .wd-shell .panel-body { padding: 0; }
4264
5306
  .wd-shell .panel-body.padded { padding: 13px 18px; }
5307
+ /* A one-line caption between the panel header and its body: used by the blocker
5308
+ panel to state "12 of 30 projects blocked" before the list itself. */
5309
+ .wd-shell .panel-note {
5310
+ padding: 8px 18px 0;
5311
+ font-size: 11px; line-height: 16px;
5312
+ color: var(--dsw-alias-label-tertiary);
5313
+ }
4265
5314
 
4266
5315
  /* ---------- portfolio band ---------- */
4267
5316
  .wd-shell .pf-band {
@@ -4331,6 +5380,18 @@ window.__ModuleLoader__.load({
4331
5380
  }
4332
5381
  .wd-shell .pf-note[data-tone="amber"] { color: var(--wd-amber); }
4333
5382
 
5383
+ /* A secondary figure nested inside a band block: same box, quieter rules, so it
5384
+ reads as a detail of the chart above it rather than a seventh figure. */
5385
+ .wd-shell .pf-subfigure {
5386
+ margin-top: 9px; padding-top: 9px;
5387
+ border-top: 1px dashed var(--wd-hairline);
5388
+ display: flex; flex-direction: column; gap: 6px;
5389
+ }
5390
+ .wd-shell .pf-subfigure-label {
5391
+ font-size: 10px; line-height: 14px; letter-spacing: .05em;
5392
+ text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;
5393
+ }
5394
+
4334
5395
  /* ---------- project cards ---------- */
4335
5396
  .wd-shell .pcard-grid {
4336
5397
  display: grid;
@@ -4519,44 +5580,190 @@ window.__ModuleLoader__.load({
4519
5580
  .wd-shell .row-actions { display: flex; gap: 5px; justify-content: flex-end; }
4520
5581
  .wd-shell .gap-copy { font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
4521
5582
 
4522
- /* ---------- pending rail ---------- */
4523
- .wd-shell .pending { display: flex; flex-direction: column; }
4524
- .wd-shell .pending-group { border-bottom: 1px solid var(--wd-hairline); }
4525
- .wd-shell .pending-group:last-child { border-bottom: 0; }
4526
- .wd-shell .pending-group[data-level="high"] { border-left: 3px solid var(--wd-red); }
4527
- .wd-shell .pending-group[data-level="medium"] { border-left: 3px solid var(--wd-amber); }
4528
- .wd-shell .pending-group-head {
4529
- display: flex; align-items: baseline; gap: 6px;
4530
- padding: 9px 13px 5px; flex-wrap: wrap;
4531
- }
4532
- .wd-shell .pending-rule-no {
4533
- flex: none; padding: 0 5px; border-radius: 4px;
4534
- font-size: 9.5px; line-height: 15px; font-weight: 650;
4535
- font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
4536
- background: var(--wd-slate-soft); color: var(--dsw-alias-label-secondary);
5583
+ @media (prefers-reduced-motion: reduce) {
5584
+ .wd-shell .pcard, .wd-shell .pboard-card, .wd-shell .project-row { transition: none; }
4537
5585
  }
4538
- .wd-shell .pending-group[data-level="high"] .pending-rule-no { background: var(--wd-red-soft); color: var(--wd-red); }
4539
- .wd-shell .pending-group[data-level="medium"] .pending-rule-no { background: var(--wd-amber-soft); color: var(--wd-amber); }
4540
- .wd-shell .pending-rule-title { flex: 1 1 auto; min-width: 0; font-size: 11.5px; line-height: 16px; font-weight: 600; overflow-wrap: anywhere; }
4541
- .wd-shell .pending-rule-count { flex: none; font-size: 9.5px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
4542
- .wd-shell .pending-group-body { padding: 0 13px 10px; display: flex; flex-direction: column; gap: 6px; }
4543
- .wd-shell .pending-gap { display: flex; flex-direction: column; gap: 2px; }
4544
- .wd-shell .pending-gap-copy { font-size: 10.5px; line-height: 15px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
4545
- .wd-shell .pending-gap-project { display: flex; }
4546
- .wd-shell .pending-link {
4547
- padding: 0; border: 0; background: transparent; cursor: pointer;
4548
- font: inherit; font-size: 10px; color: var(--wd-primary); text-align: left;
5586
+ `;
5587
+
5588
+ // src/client/css/summary.ts
5589
+ var SUMMARY_CSS = `
5590
+ /* ---------- KPI strip ---------- */
5591
+ .wd-shell .kpi-strip {
5592
+ border: 1px solid var(--wd-hairline); border-radius: 12px;
5593
+ background: var(--wd-surface); box-shadow: var(--wd-shadow-1);
5594
+ margin-bottom: 16px; overflow: hidden;
5595
+ }
5596
+ .wd-shell .kpi-cells {
5597
+ display: grid;
5598
+ grid-template-columns: repeat(5, minmax(0, 1fr));
4549
5599
  }
4550
- .wd-shell .pending-link:hover { text-decoration: underline; }
4551
- .wd-shell .pending-more { font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-style: italic; }
5600
+ @media (max-width: 1180px) { .wd-shell .kpi-cells { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
5601
+ @media (max-width: 720px) { .wd-shell .kpi-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
4552
5602
 
4553
- @media (prefers-reduced-motion: reduce) {
4554
- .wd-shell .pcard, .wd-shell .pboard-card, .wd-shell .project-row { transition: none; }
5603
+ .wd-shell .kpi-cell {
5604
+ display: flex; flex-direction: column; gap: 2px;
5605
+ padding: 12px 16px;
5606
+ border-right: 1px solid var(--wd-hairline);
5607
+ min-width: 0;
5608
+ }
5609
+ .wd-shell .kpi-cell:last-child { border-right: 0; }
5610
+ /* A hairline above the value carries the tone, so the number itself stays the
5611
+ same ink on every cell: five differently-coloured numbers would read as five
5612
+ different kinds of number. */
5613
+ .wd-shell .kpi-label {
5614
+ font-size: 10.5px; line-height: 15px; letter-spacing: .05em;
5615
+ text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;
5616
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
5617
+ }
5618
+ .wd-shell .kpi-value {
5619
+ font-size: 21px; line-height: 28px; font-weight: 650;
5620
+ color: var(--wd-text); font-variant-numeric: tabular-nums;
5621
+ letter-spacing: -.01em;
5622
+ }
5623
+ .wd-shell .kpi-cell[data-tone="red"] .kpi-value { color: var(--wd-red); }
5624
+ .wd-shell .kpi-cell[data-tone="green"] .kpi-value { color: var(--wd-green); }
5625
+ .wd-shell .kpi-cell[data-tone="amber"] .kpi-value { color: var(--wd-amber); }
5626
+ .wd-shell .kpi-note {
5627
+ font-size: 10.5px; line-height: 15px;
5628
+ color: var(--dsw-alias-label-tertiary);
5629
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
5630
+ }
5631
+
5632
+ .wd-shell .kpi-stages {
5633
+ display: flex; align-items: center; gap: 10px;
5634
+ padding: 9px 16px;
5635
+ border-top: 1px solid var(--wd-hairline);
5636
+ background: var(--wd-inset);
5637
+ flex-wrap: wrap;
5638
+ }
5639
+ .wd-shell .kpi-stages-label {
5640
+ flex: none; font-size: 10.5px; line-height: 15px; letter-spacing: .05em;
5641
+ text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;
5642
+ }
5643
+ .wd-shell .kpi-stage-chips { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
5644
+ .wd-shell .kpi-stage-chip {
5645
+ display: inline-flex; align-items: center; gap: 5px;
5646
+ height: 24px; padding: 0 9px;
5647
+ border: 1px solid var(--wd-hairline); border-radius: 20px;
5648
+ background: var(--wd-surface); color: var(--dsw-alias-label-secondary);
5649
+ font-size: 11px; line-height: 16px; cursor: pointer; white-space: nowrap;
5650
+ transition: background .12s ease, border-color .12s ease, color .12s ease;
5651
+ }
5652
+ .wd-shell .kpi-stage-chip:hover:not([disabled]) { background: var(--wd-canvas); color: var(--wd-text); }
5653
+ .wd-shell .kpi-stage-chip[data-active="true"] {
5654
+ background: var(--wd-primary-soft); border-color: var(--wd-primary);
5655
+ color: var(--wd-primary); font-weight: 600;
5656
+ }
5657
+ /* A zero bucket stays visible but muted: its existence is information ("nothing
5658
+ reached G3"), and hiding it would make the funnel look shorter than it is. */
5659
+ .wd-shell .kpi-stage-chip[data-zero="true"] { opacity: .5; }
5660
+ .wd-shell .kpi-stage-count {
5661
+ font-size: 10.5px; font-variant-numeric: tabular-nums;
5662
+ color: var(--dsw-alias-label-tertiary); font-weight: 500;
5663
+ }
5664
+ .wd-shell .kpi-stage-chip[data-active="true"] .kpi-stage-count { color: var(--wd-primary); }
5665
+ .wd-shell .kpi-stages-summary {
5666
+ margin-left: auto; font-size: 10.5px; line-height: 15px;
5667
+ color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
5668
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
5669
+ }
5670
+ @media (max-width: 900px) { .wd-shell .kpi-stages-summary { display: none; } }
5671
+
5672
+ /* ---------- budget panel ---------- */
5673
+ .wd-shell .budget-panel {
5674
+ border: 1px solid var(--wd-hairline); border-radius: 12px;
5675
+ background: var(--wd-surface); box-shadow: var(--wd-shadow-1);
5676
+ padding: 13px 16px 14px;
5677
+ display: flex; flex-direction: column; gap: 11px;
5678
+ }
5679
+ .wd-shell .budget-head { display: flex; align-items: baseline; gap: 9px; }
5680
+ .wd-shell .budget-title { margin: 0; font-size: 13.5px; line-height: 20px; font-weight: 650; }
5681
+ .wd-shell .budget-note { margin-left: auto; font-size: 10.5px; color: var(--dsw-alias-label-tertiary); }
5682
+ .wd-shell .budget-total { display: flex; align-items: baseline; gap: 8px; }
5683
+ .wd-shell .budget-total-label {
5684
+ font-size: 10.5px; line-height: 15px; letter-spacing: .05em;
5685
+ text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;
5686
+ }
5687
+ .wd-shell .budget-total-value {
5688
+ font-size: 22px; line-height: 30px; font-weight: 650; color: var(--wd-text);
5689
+ font-variant-numeric: tabular-nums; letter-spacing: -.01em;
5690
+ }
5691
+ .wd-shell .budget-total-unit { margin-left: 4px; font-size: 11px; font-weight: 500; color: var(--dsw-alias-label-tertiary); }
5692
+ .wd-shell .budget-bar {
5693
+ display: flex; height: 8px; border-radius: 5px; overflow: hidden;
5694
+ background: var(--wd-inset); border: 1px solid var(--wd-hairline);
5695
+ }
5696
+ .wd-shell .budget-bar-segment { height: 100%; }
5697
+ .wd-shell .budget-bar-segment[data-tone="green"] { background: var(--wd-green); }
5698
+ .wd-shell .budget-bar-segment[data-tone="amber"] { background: var(--wd-amber); }
5699
+ .wd-shell .budget-rows { margin: 0; display: flex; flex-direction: column; gap: 5px; }
5700
+ .wd-shell .budget-row { display: flex; align-items: baseline; gap: 8px; }
5701
+ .wd-shell .budget-row-label {
5702
+ flex: none; width: 82px; font-size: 11.5px; line-height: 17px; font-weight: 600;
5703
+ color: var(--dsw-alias-label-secondary);
5704
+ }
5705
+ .wd-shell .budget-row[data-tone="green"] .budget-row-label { color: var(--wd-green); }
5706
+ .wd-shell .budget-row[data-tone="amber"] .budget-row-label { color: var(--wd-amber); }
5707
+ .wd-shell .budget-row[data-tone="red"] .budget-row-label { color: var(--wd-red); }
5708
+ .wd-shell .budget-row-value {
5709
+ margin: 0; font-size: 11.5px; line-height: 17px;
5710
+ color: var(--dsw-alias-label-secondary); font-variant-numeric: tabular-nums;
5711
+ }
5712
+ .wd-shell .budget-warning {
5713
+ margin: 0; padding: 7px 10px;
5714
+ border-radius: 8px; background: var(--wd-red-soft); color: var(--wd-red);
5715
+ font-size: 11.5px; line-height: 17px;
5716
+ }
5717
+ .wd-shell .budget-empty {
5718
+ margin: 0; padding: 16px 4px; text-align: center;
5719
+ font-size: 12px; color: var(--dsw-alias-label-tertiary);
5720
+ }
5721
+ .wd-shell .budget-orgs { display: flex; flex-direction: column; gap: 5px; }
5722
+ .wd-shell .budget-orgs-label {
5723
+ font-size: 10.5px; line-height: 15px; letter-spacing: .05em;
5724
+ text-transform: uppercase; color: var(--dsw-alias-label-tertiary); font-weight: 600;
5725
+ }
5726
+ .wd-shell .budget-org-row {
5727
+ display: grid; grid-template-columns: minmax(0, 1fr) 74px 34px;
5728
+ align-items: center; gap: 8px;
5729
+ }
5730
+ .wd-shell .budget-org-name {
5731
+ font-size: 11.5px; line-height: 17px; color: var(--wd-text);
5732
+ overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
5733
+ }
5734
+ .wd-shell .budget-org-system { margin-left: 5px; font-size: 10px; color: var(--dsw-alias-label-tertiary); }
5735
+ .wd-shell .budget-org-value {
5736
+ font-size: 10.5px; line-height: 15px; text-align: right;
5737
+ color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
5738
+ }
5739
+ .wd-shell .budget-concentration {
5740
+ margin: 0; font-size: 10.5px; line-height: 15px;
5741
+ color: var(--dsw-alias-label-tertiary);
5742
+ }
5743
+
5744
+ /* ---------- in-stage progress ---------- */
5745
+ .wd-shell .stage-progress { display: flex; flex-direction: column; gap: 4px; }
5746
+ .wd-shell .stage-progress-row {
5747
+ display: grid; grid-template-columns: 68px minmax(0, 1fr) 82px;
5748
+ align-items: center; gap: 8px;
5749
+ }
5750
+ .wd-shell .stage-progress-label {
5751
+ font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary);
5752
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
5753
+ }
5754
+ .wd-shell .stage-progress-value {
5755
+ font-size: 10.5px; line-height: 15px; text-align: right;
5756
+ color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums;
5757
+ }
5758
+ .wd-shell .stage-progress-empty {
5759
+ grid-column: 2 / -1; font-size: 10.5px; line-height: 15px;
5760
+ color: var(--dsw-alias-label-tertiary);
4555
5761
  }
5762
+ .wd-shell .stage-progress-row[data-empty="true"] { opacity: .7; }
4556
5763
  `;
4557
5764
 
4558
5765
  // src/client/styles.ts
4559
- var CONSOLE_CSS = [BASE_CSS, CHARTS_CSS, OVERVIEW_CSS, DETAIL_CSS, INSIGHTS_CSS].join("\n");
5766
+ var CONSOLE_CSS = [BASE_CSS, CHARTS_CSS, OVERVIEW_CSS, SUMMARY_CSS, DETAIL_CSS, INSIGHTS_CSS, BLOCKERS_CSS].join("\n");
4560
5767
 
4561
5768
  // src/client/view-contract.ts
4562
5769
  var NO_FILTERS = Object.freeze({
@@ -4571,21 +5778,15 @@ window.__ModuleLoader__.load({
4571
5778
  }
4572
5779
 
4573
5780
  // src/client/shell.tsx
4574
- var import_jsx_runtime5 = require("react/jsx-runtime");
5781
+ var import_jsx_runtime8 = require("react/jsx-runtime");
4575
5782
  function SidebarGlyph({ size = 18 }) {
4576
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { className: "wd-glyph", width: size, height: size, viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
4577
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "3", y: "4.5", width: "18", height: "15", rx: "3.2", stroke: "currentColor", strokeWidth: "1.6" }),
4578
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "6", y: "8", width: "5.4", height: "3.6", rx: "1.2", fill: "currentColor", opacity: "0.85" }),
4579
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "12.6", y: "8", width: "5.4", height: "3.6", rx: "1.2", fill: "currentColor", opacity: "0.35" }),
4580
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "6", y: "13", width: "12", height: "3.4", rx: "1.2", fill: "currentColor", opacity: "0.5" })
5783
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("svg", { className: "wd-glyph", width: size, height: size, viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
5784
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("rect", { x: "3", y: "4.5", width: "18", height: "15", rx: "3.2", stroke: "currentColor", strokeWidth: "1.6" }),
5785
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("rect", { x: "6", y: "8", width: "5.4", height: "3.6", rx: "1.2", fill: "currentColor", opacity: "0.85" }),
5786
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("rect", { x: "12.6", y: "8", width: "5.4", height: "3.6", rx: "1.2", fill: "currentColor", opacity: "0.35" }),
5787
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("rect", { x: "6", y: "13", width: "12", height: "3.4", rx: "1.2", fill: "currentColor", opacity: "0.5" })
4581
5788
  ] });
4582
5789
  }
4583
- function clockOf(value, locale) {
4584
- if (value === null) return "";
4585
- const stamp = new Date(value);
4586
- if (Number.isNaN(stamp.getTime())) return "";
4587
- return stamp.toLocaleTimeString(locale.toLowerCase().startsWith("zh") ? "zh-CN" : "en-US", { hour: "2-digit", minute: "2-digit" });
4588
- }
4589
5790
  function errorText(t, error) {
4590
5791
  if (error instanceof ActionError) {
4591
5792
  const key = `error.${error.code.replace(/^(skillre-)?work-dashboard\//, "")}`;
@@ -4595,12 +5796,6 @@ window.__ModuleLoader__.load({
4595
5796
  if (error instanceof Error) return error.message;
4596
5797
  return t("error.failed");
4597
5798
  }
4598
- function stageLabel2(t, stage) {
4599
- if (stage === "closed") return t("stageClosed");
4600
- if (stage === "unknown") return t("stageUnknown");
4601
- if (STAGES.includes(stage)) return t(`stage${stage}`);
4602
- return stage;
4603
- }
4604
5799
  function buildFilterOptions(snapshot) {
4605
5800
  const projects = snapshot?.projects ?? [];
4606
5801
  const count = (pick, value) => projects.filter((project) => pick(project) === value).length;
@@ -4618,12 +5813,12 @@ window.__ModuleLoader__.load({
4618
5813
  if (project.system !== "") bump(systems, project.system, project.system);
4619
5814
  if (project.company !== "") bump(companies, project.company, project.company);
4620
5815
  const stageKey = project.closed ? "closed" : project.stage ?? "unknown";
4621
- bump(stages, stageKey, stageLabel2(snapshotT, stageKey));
5816
+ bump(stages, stageKey, stageLabel(snapshotT, stageKey));
4622
5817
  if (project.status !== "") bump(statuses, project.status, project.status);
4623
5818
  if (project.pocType !== "") bump(types, project.pocType, project.pocType);
4624
5819
  }
4625
5820
  for (const stage of STAGES) {
4626
- if (!stages.has(stage)) stages.set(stage, { value: stage, label: stageLabel2(snapshotT, stage), count: count((project) => project.closed ? "closed" : project.stage ?? "unknown", stage) });
5821
+ if (!stages.has(stage)) stages.set(stage, { value: stage, label: stageLabel(snapshotT, stage), count: count((project) => project.closed ? "closed" : project.stage ?? "unknown", stage) });
4627
5822
  }
4628
5823
  const sortOptions = (map) => [...map.values()].sort((left, right) => right.count - left.count || left.label.localeCompare(right.label));
4629
5824
  return {
@@ -4676,8 +5871,8 @@ window.__ModuleLoader__.load({
4676
5871
  onSave,
4677
5872
  onCancel
4678
5873
  }) {
4679
- const [interval, setIntervalValue] = (0, import_react2.useState)(preference.interval);
4680
- const [minutes, setMinutes] = (0, import_react2.useState)(String(preference.customMinutes));
5874
+ const [interval, setIntervalValue] = (0, import_react6.useState)(preference.interval);
5875
+ const [minutes, setMinutes] = (0, import_react6.useState)(String(preference.customMinutes));
4681
5876
  const parsedMinutes = Number(minutes);
4682
5877
  const minutesValid = Number.isFinite(parsedMinutes) && parsedMinutes >= CUSTOM_MINUTES_MIN && parsedMinutes <= CUSTOM_MINUTES_MAX;
4683
5878
  const rows = [
@@ -4686,9 +5881,9 @@ window.__ModuleLoader__.load({
4686
5881
  { value: "1h", label: t("interval1h") },
4687
5882
  { value: "custom", label: t("intervalCustom") }
4688
5883
  ];
4689
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "modal-overlay", role: "presentation", onMouseDown: (event) => {
5884
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "modal-overlay", role: "presentation", onMouseDown: (event) => {
4690
5885
  if (event.target === event.currentTarget) onCancel();
4691
- }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5886
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
4692
5887
  "div",
4693
5888
  {
4694
5889
  className: "modal",
@@ -4699,14 +5894,14 @@ window.__ModuleLoader__.load({
4699
5894
  if (event.key === "Escape") onCancel();
4700
5895
  },
4701
5896
  children: [
4702
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "modal-header", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "modal-title", children: t("refreshSettings") }) }),
4703
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "modal-content", children: [
4704
- rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: "checkbox-row", "data-selected": interval === row.value, children: [
4705
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("input", { type: "radio", name: "work-dashboard-refresh-interval", value: row.value, checked: interval === row.value, onChange: () => setIntervalValue(row.value) }),
4706
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: row.label })
5897
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "modal-header", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "modal-title", children: t("refreshSettings") }) }),
5898
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "modal-content", children: [
5899
+ rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "checkbox-row", "data-selected": interval === row.value, children: [
5900
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("input", { type: "radio", name: "work-dashboard-refresh-interval", value: row.value, checked: interval === row.value, onChange: () => setIntervalValue(row.value) }),
5901
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: row.label })
4707
5902
  ] }, row.value)),
4708
- interval === "custom" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "inline-field", children: [
4709
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5903
+ interval === "custom" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "inline-field", children: [
5904
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
4710
5905
  "input",
4711
5906
  {
4712
5907
  className: "input",
@@ -4719,17 +5914,17 @@ window.__ModuleLoader__.load({
4719
5914
  onChange: (event) => setMinutes(event.target.value)
4720
5915
  }
4721
5916
  ),
4722
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: t("customMinutes") })
5917
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: t("customMinutes") })
4723
5918
  ] }) : null,
4724
- interval === "custom" && !minutesValid ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "form-error", children: format(t("customMinutesError"), { min: CUSTOM_MINUTES_MIN, max: CUSTOM_MINUTES_MAX }) }) : null,
4725
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "helper-box", children: interval === "off" ? t("autoRefreshOff") : format(t("autoRefreshOn"), {
5919
+ interval === "custom" && !minutesValid ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "form-error", children: format(t("customMinutesError"), { min: CUSTOM_MINUTES_MIN, max: CUSTOM_MINUTES_MAX }) }) : null,
5920
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "helper-box", children: interval === "off" ? t("autoRefreshOff") : format(t("autoRefreshOn"), {
4726
5921
  minutes: interval === "10m" ? 10 : interval === "1h" ? 60 : minutesValid ? clampMinutes(parsedMinutes) : 0
4727
5922
  }) })
4728
5923
  ] }),
4729
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "modal-footer", children: [
4730
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "spacer" }),
4731
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "btn", onClick: onCancel, children: t("cancel") }),
4732
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5924
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "modal-footer", children: [
5925
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "spacer" }),
5926
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "btn", onClick: onCancel, children: t("cancel") }),
5927
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
4733
5928
  "button",
4734
5929
  {
4735
5930
  type: "button",
@@ -4745,20 +5940,20 @@ window.__ModuleLoader__.load({
4745
5940
  ) });
4746
5941
  }
4747
5942
  function EmptyState({ snapshot, t, busy, onRefresh }) {
4748
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "empty-state", children: [
4749
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "empty-icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { width: "34", height: "34", viewBox: "0 0 24 24", fill: "none", children: [
4750
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M3.5 7.2l8.5-4.2 8.5 4.2v9.6L12 21l-8.5-4.2V7.2z", stroke: "currentColor", strokeWidth: "1.4", strokeLinejoin: "round" }),
4751
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M3.5 7.2L12 11.6l8.5-4.4M12 11.6V21", stroke: "currentColor", strokeWidth: "1.4", strokeLinejoin: "round" })
5943
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "empty-state", children: [
5944
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "empty-icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("svg", { width: "34", height: "34", viewBox: "0 0 24 24", fill: "none", children: [
5945
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M3.5 7.2l8.5-4.2 8.5 4.2v9.6L12 21l-8.5-4.2V7.2z", stroke: "currentColor", strokeWidth: "1.4", strokeLinejoin: "round" }),
5946
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M3.5 7.2L12 11.6l8.5-4.4M12 11.6V21", stroke: "currentColor", strokeWidth: "1.4", strokeLinejoin: "round" })
4752
5947
  ] }) }),
4753
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "empty-title", children: t("emptyTitle") }),
4754
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "empty-copy", children: t("emptyCopy") }),
4755
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "btn btn-primary", disabled: busy, onClick: onRefresh, children: busy ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
4756
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "spinner" }),
5948
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "empty-title", children: t("emptyTitle") }),
5949
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "empty-copy", children: t("emptyCopy") }),
5950
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "btn btn-primary", disabled: busy, onClick: onRefresh, children: busy ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
5951
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "spinner" }),
4757
5952
  " ",
4758
5953
  t("refreshing")
4759
5954
  ] }) : t("emptyRefresh") }),
4760
- busy ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "empty-copy", style: { marginTop: 6 }, children: t("refreshingHint") }) : null,
4761
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "empty-meta", children: [
5955
+ busy ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "empty-copy", style: { marginTop: 6 }, children: t("refreshingHint") }) : null,
5956
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { className: "empty-meta", children: [
4762
5957
  t("dataSource"),
4763
5958
  "\uFF1Agithub.com/",
4764
5959
  snapshot?.repository ?? "",
@@ -4770,19 +5965,19 @@ window.__ModuleLoader__.load({
4770
5965
  ] });
4771
5966
  }
4772
5967
  function FailureBanner({ message, t, onRetry, busy }) {
4773
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "failure", role: "alert", children: [
4774
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "failure-text", children: [
4775
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "failure-title", children: [
5968
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "failure", role: "alert", children: [
5969
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "failure-text", children: [
5970
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "failure-title", children: [
4776
5971
  "\u26A0 ",
4777
5972
  t("failureTitle")
4778
5973
  ] }),
4779
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "failure-reason", children: [
5974
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "failure-reason", children: [
4780
5975
  t("failureReason"),
4781
5976
  "\uFF1A",
4782
5977
  message
4783
5978
  ] })
4784
5979
  ] }),
4785
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "btn btn-small", disabled: busy, onClick: onRetry, children: t("failureRetry") })
5980
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "btn btn-small", disabled: busy, onClick: onRetry, children: t("failureRetry") })
4786
5981
  ] });
4787
5982
  }
4788
5983
  function FilterChips({
@@ -4792,9 +5987,9 @@ window.__ModuleLoader__.load({
4792
5987
  onSelect
4793
5988
  }) {
4794
5989
  if (options.length === 0) return null;
4795
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "toolbar-group", role: "group", "aria-label": label, children: [
4796
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "toolbar-group-label", children: label }),
4797
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "chip-scroll", children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
5990
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "toolbar-group", role: "group", "aria-label": label, children: [
5991
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "toolbar-group-label", children: label }),
5992
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "chip-scroll", children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
4798
5993
  "button",
4799
5994
  {
4800
5995
  type: "button",
@@ -4805,7 +6000,7 @@ window.__ModuleLoader__.load({
4805
6000
  title: `${option.label} \xB7 ${option.count}`,
4806
6001
  children: [
4807
6002
  option.label,
4808
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "filter-chip-count", children: option.count })
6003
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "filter-chip-count", children: option.count })
4809
6004
  ]
4810
6005
  },
4811
6006
  option.value
@@ -4842,11 +6037,11 @@ window.__ModuleLoader__.load({
4842
6037
  { value: "progress", label: t("sortProgress") },
4843
6038
  { value: "stage", label: t("sortStage") }
4844
6039
  ];
4845
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "toolbar", role: "toolbar", "aria-label": t("filterLabel"), children: [
4846
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "toolbar-row", children: [
4847
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: "search-box", children: [
4848
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "search-glyph", "aria-hidden": "true", children: "\u2315" }),
4849
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6040
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "toolbar", role: "toolbar", "aria-label": t("filterLabel"), children: [
6041
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "toolbar-row", children: [
6042
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "search-box", children: [
6043
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "search-glyph", "aria-hidden": "true", children: "\u2315" }),
6044
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
4850
6045
  "input",
4851
6046
  {
4852
6047
  ref: searchRef,
@@ -4858,9 +6053,9 @@ window.__ModuleLoader__.load({
4858
6053
  onChange: (event) => onSearch(event.target.value)
4859
6054
  }
4860
6055
  ),
4861
- search === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "search-clear", "aria-label": t("searchClear"), title: t("searchClear"), onClick: () => onSearch(""), children: "\xD7" })
6056
+ search === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "search-clear", "aria-label": t("searchClear"), title: t("searchClear"), onClick: () => onSearch(""), children: "\xD7" })
4862
6057
  ] }),
4863
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "view-switch", role: "group", "aria-label": t("viewLabel"), children: viewOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
6058
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "view-switch", role: "group", "aria-label": t("viewLabel"), children: viewOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
4864
6059
  "button",
4865
6060
  {
4866
6061
  type: "button",
@@ -4872,56 +6067,58 @@ window.__ModuleLoader__.load({
4872
6067
  },
4873
6068
  option.value
4874
6069
  )) }),
4875
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "sort-switch", role: "group", "aria-label": t("sortLabel"), children: [
4876
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("select", { className: "sort-select", value: sortKey, "aria-label": t("sortLabel"), onChange: (event) => onSort(event.target.value), children: sortOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: option.value, children: option.label }, option.value)) }),
4877
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "btn btn-icon btn-small", title: t("sortDirection"), "aria-label": t("sortDirection"), onClick: onSortDirection, children: sortAsc ? "\u2191" : "\u2193" })
6070
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "sort-switch", role: "group", "aria-label": t("sortLabel"), children: [
6071
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("select", { className: "sort-select", value: sortKey, "aria-label": t("sortLabel"), onChange: (event) => onSort(event.target.value), children: sortOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: option.value, children: option.label }, option.value)) }),
6072
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "btn btn-icon btn-small", title: t("sortDirection"), "aria-label": t("sortDirection"), onClick: onSortDirection, children: sortAsc ? "\u2191" : "\u2193" })
4878
6073
  ] }),
4879
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "toolbar-result", children: format(t("filterResult"), { shown, total }) }),
4880
- activeCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("button", { type: "button", className: "btn btn-small btn-ghost", onClick: onClearFilters, children: [
6074
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "toolbar-result", children: format(t("filterResult"), { shown, total }) }),
6075
+ activeCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "btn btn-small btn-ghost", onClick: onClearFilters, children: [
4881
6076
  t("filterClear"),
4882
6077
  " \xB7 ",
4883
6078
  format(t("filterActiveNote"), { count: activeCount })
4884
6079
  ] }) : null
4885
6080
  ] }),
4886
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "toolbar-row toolbar-row-filters", children: [
4887
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FilterChips, { label: t("filterSystem"), options: options.system, selected: filters.system, onSelect: (value) => onFilters({ ...filters, system: value }) }),
4888
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FilterChips, { label: t("filterStage"), options: options.stage, selected: filters.stage, onSelect: (value) => onFilters({ ...filters, stage: value }) }),
4889
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FilterChips, { label: t("filterStatus"), options: options.status, selected: filters.status, onSelect: (value) => onFilters({ ...filters, status: value }) }),
4890
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FilterChips, { label: t("filterType"), options: options.pocType, selected: filters.pocType, onSelect: (value) => onFilters({ ...filters, pocType: value }) })
6081
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "toolbar-row toolbar-row-filters", children: [
6082
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FilterChips, { label: t("filterSystem"), options: options.system, selected: filters.system, onSelect: (value) => onFilters({ ...filters, system: value }) }),
6083
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FilterChips, { label: t("filterCompany"), options: options.company, selected: filters.company, onSelect: (value) => onFilters({ ...filters, company: value }) }),
6084
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FilterChips, { label: t("filterStage"), options: options.stage, selected: filters.stage, onSelect: (value) => onFilters({ ...filters, stage: value }) }),
6085
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FilterChips, { label: t("filterStatus"), options: options.status, selected: filters.status, onSelect: (value) => onFilters({ ...filters, status: value }) }),
6086
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FilterChips, { label: t("filterType"), options: options.pocType, selected: filters.pocType, onSelect: (value) => onFilters({ ...filters, pocType: value }) })
4891
6087
  ] })
4892
6088
  ] });
4893
6089
  }
4894
6090
  function WorkDashboardPage({ api, locale, t }) {
4895
- const [snapshot, setSnapshot] = (0, import_react2.useState)(null);
4896
- const [page, setPage] = (0, import_react2.useState)({ kind: "overview" });
4897
- const [detail, setDetail] = (0, import_react2.useState)(null);
4898
- const [loading, setLoading] = (0, import_react2.useState)(true);
4899
- const [busy, setBusy] = (0, import_react2.useState)(false);
4900
- const [failure, setFailure] = (0, import_react2.useState)(null);
4901
- const [statusNote, setStatusNote] = (0, import_react2.useState)(null);
4902
- const [preference, setPreference] = (0, import_react2.useState)(DEFAULT_PREFERENCE);
4903
- const [viewPreference, setViewPreference] = (0, import_react2.useState)(DEFAULT_VIEW_PREFERENCE);
4904
- const [settingsOpen, setSettingsOpen] = (0, import_react2.useState)(false);
4905
- const [filters, setFilters] = (0, import_react2.useState)(NO_FILTERS);
4906
- const [search, setSearch] = (0, import_react2.useState)("");
4907
- const [sortAsc, setSortAsc] = (0, import_react2.useState)(false);
4908
- const [selectedId, setSelectedId] = (0, import_react2.useState)(null);
4909
- const [riskBoard, setRiskBoard] = (0, import_react2.useState)(null);
4910
- const [timeline, setTimeline] = (0, import_react2.useState)(null);
4911
- const searchRef = (0, import_react2.useRef)(null);
4912
- const inFlight = (0, import_react2.useRef)(null);
4913
- const mounted = (0, import_react2.useRef)(true);
4914
- (0, import_react2.useEffect)(() => {
6091
+ const [snapshot, setSnapshot] = (0, import_react6.useState)(null);
6092
+ const [page, setPage] = (0, import_react6.useState)({ kind: "overview" });
6093
+ const [detail, setDetail] = (0, import_react6.useState)(null);
6094
+ const [loading, setLoading] = (0, import_react6.useState)(true);
6095
+ const [busy, setBusy] = (0, import_react6.useState)(false);
6096
+ const [failure, setFailure] = (0, import_react6.useState)(null);
6097
+ const [statusNote, setStatusNote] = (0, import_react6.useState)(null);
6098
+ const [preference, setPreference] = (0, import_react6.useState)(DEFAULT_PREFERENCE);
6099
+ const [viewPreference, setViewPreference] = (0, import_react6.useState)(DEFAULT_VIEW_PREFERENCE);
6100
+ const [settingsOpen, setSettingsOpen] = (0, import_react6.useState)(false);
6101
+ const [exportOpen, setExportOpen] = (0, import_react6.useState)(false);
6102
+ const [filters, setFilters] = (0, import_react6.useState)(NO_FILTERS);
6103
+ const [search, setSearch] = (0, import_react6.useState)("");
6104
+ const [sortAsc, setSortAsc] = (0, import_react6.useState)(false);
6105
+ const [selectedId, setSelectedId] = (0, import_react6.useState)(null);
6106
+ const [riskBoard, setRiskBoard] = (0, import_react6.useState)(null);
6107
+ const [timeline, setTimeline] = (0, import_react6.useState)(null);
6108
+ const searchRef = (0, import_react6.useRef)(null);
6109
+ const inFlight = (0, import_react6.useRef)(null);
6110
+ const mounted = (0, import_react6.useRef)(true);
6111
+ (0, import_react6.useEffect)(() => {
4915
6112
  mounted.current = true;
4916
6113
  return () => {
4917
6114
  mounted.current = false;
4918
6115
  };
4919
6116
  }, []);
4920
- (0, import_react2.useEffect)(() => {
6117
+ (0, import_react6.useEffect)(() => {
4921
6118
  setPreference(readPreference());
4922
6119
  setViewPreference(readViewPreference());
4923
6120
  }, []);
4924
- const load = (0, import_react2.useCallback)(async () => {
6121
+ const load = (0, import_react6.useCallback)(async () => {
4925
6122
  setLoading(true);
4926
6123
  try {
4927
6124
  const next = await api.list();
@@ -4935,10 +6132,10 @@ window.__ModuleLoader__.load({
4935
6132
  if (mounted.current) setLoading(false);
4936
6133
  }
4937
6134
  }, [api, t]);
4938
- (0, import_react2.useEffect)(() => {
6135
+ (0, import_react6.useEffect)(() => {
4939
6136
  void load();
4940
6137
  }, [load]);
4941
- const refresh = (0, import_react2.useCallback)(async (manual) => {
6138
+ const refresh = (0, import_react6.useCallback)(async (manual) => {
4942
6139
  if (inFlight.current !== null) return inFlight.current;
4943
6140
  const job = (async () => {
4944
6141
  setBusy(true);
@@ -4966,7 +6163,7 @@ window.__ModuleLoader__.load({
4966
6163
  return inFlight.current;
4967
6164
  }, [api, t]);
4968
6165
  const period = intervalMs(preference);
4969
- (0, import_react2.useEffect)(() => {
6166
+ (0, import_react6.useEffect)(() => {
4970
6167
  if (period === null) return;
4971
6168
  const timer = setInterval(() => {
4972
6169
  void refresh(false);
@@ -4976,8 +6173,8 @@ window.__ModuleLoader__.load({
4976
6173
  };
4977
6174
  }, [period, refresh]);
4978
6175
  snapshotT = t;
4979
- const filterOptions = (0, import_react2.useMemo)(() => buildFilterOptions(snapshot), [snapshot, t]);
4980
- const visibleProjects = (0, import_react2.useMemo)(() => {
6176
+ const filterOptions = (0, import_react6.useMemo)(() => buildFilterOptions(snapshot), [snapshot, t]);
6177
+ const visibleProjects = (0, import_react6.useMemo)(() => {
4981
6178
  const projects = snapshot?.projects ?? [];
4982
6179
  const needle = search.trim().toLowerCase();
4983
6180
  const filtered = projects.filter((project) => {
@@ -4991,16 +6188,16 @@ window.__ModuleLoader__.load({
4991
6188
  });
4992
6189
  return sorted;
4993
6190
  }, [snapshot, filters, search, viewPreference.sortKey, sortAsc]);
4994
- const visibleGaps = (0, import_react2.useMemo)(() => {
6191
+ const visibleGaps = (0, import_react6.useMemo)(() => {
4995
6192
  const order = new Map(visibleProjects.map((project, index) => [project.pocId, index]));
4996
6193
  return (snapshot?.gaps ?? []).filter((item) => order.has(item.pocId)).sort((left, right) => order.get(left.pocId) - order.get(right.pocId) || right.priority - left.priority);
4997
6194
  }, [snapshot, visibleProjects]);
4998
- const visibleAnalysis = (0, import_react2.useMemo)(() => {
6195
+ const visibleAnalysis = (0, import_react6.useMemo)(() => {
4999
6196
  if (snapshot === null) return null;
5000
6197
  if (visibleProjects.length === snapshot.projects.length) return snapshot.analysis;
5001
6198
  return recomputeAnalysis(visibleProjects, visibleGaps);
5002
6199
  }, [snapshot, visibleProjects, visibleGaps]);
5003
- const openDetail = (0, import_react2.useCallback)(async (pocId) => {
6200
+ const openDetail = (0, import_react6.useCallback)(async (pocId) => {
5004
6201
  setPage({ kind: "detail", pocId });
5005
6202
  setSelectedId(pocId);
5006
6203
  setDetail(null);
@@ -5011,12 +6208,12 @@ window.__ModuleLoader__.load({
5011
6208
  if (mounted.current) setFailure(errorText(t, error));
5012
6209
  }
5013
6210
  }, [api, t]);
5014
- const backToOverview = (0, import_react2.useCallback)(() => {
6211
+ const backToOverview = (0, import_react6.useCallback)(() => {
5015
6212
  setPage({ kind: "overview" });
5016
6213
  setDetail(null);
5017
6214
  setFailure(null);
5018
6215
  }, []);
5019
- const openRisks = (0, import_react2.useCallback)(() => {
6216
+ const openRisks = (0, import_react6.useCallback)(() => {
5020
6217
  setPage({ kind: "risks" });
5021
6218
  if (riskBoard !== null) return;
5022
6219
  void (async () => {
@@ -5028,7 +6225,7 @@ window.__ModuleLoader__.load({
5028
6225
  }
5029
6226
  })();
5030
6227
  }, [api, riskBoard, t]);
5031
- const openTimeline = (0, import_react2.useCallback)(() => {
6228
+ const openTimeline = (0, import_react6.useCallback)(() => {
5032
6229
  setPage({ kind: "timeline" });
5033
6230
  if (timeline !== null) return;
5034
6231
  void (async () => {
@@ -5040,29 +6237,29 @@ window.__ModuleLoader__.load({
5040
6237
  }
5041
6238
  })();
5042
6239
  }, [api, timeline, t]);
5043
- const savePreference = (0, import_react2.useCallback)((next) => {
6240
+ const savePreference = (0, import_react6.useCallback)((next) => {
5044
6241
  setPreference(next);
5045
6242
  writePreference(next);
5046
6243
  setSettingsOpen(false);
5047
6244
  }, []);
5048
- const saveViewMode = (0, import_react2.useCallback)((next) => {
6245
+ const saveViewMode = (0, import_react6.useCallback)((next) => {
5049
6246
  const updated = { ...viewPreference, viewMode: next };
5050
6247
  setViewPreference(updated);
5051
6248
  writeViewPreference(updated);
5052
6249
  }, [viewPreference]);
5053
- const saveSortKey = (0, import_react2.useCallback)((next) => {
6250
+ const saveSortKey = (0, import_react6.useCallback)((next) => {
5054
6251
  const updated = { ...viewPreference, sortKey: next };
5055
6252
  setViewPreference(updated);
5056
6253
  writeViewPreference(updated);
5057
6254
  }, [viewPreference]);
5058
- const applyFilter = (0, import_react2.useCallback)((next) => {
6255
+ const applyFilter = (0, import_react6.useCallback)((next) => {
5059
6256
  setFilters((current) => ({ ...current, ...next }));
5060
6257
  }, []);
5061
- const clearFilters = (0, import_react2.useCallback)(() => {
6258
+ const clearFilters = (0, import_react6.useCallback)(() => {
5062
6259
  setFilters(NO_FILTERS);
5063
6260
  setSearch("");
5064
6261
  }, []);
5065
- const onKeyDown = (0, import_react2.useCallback)((event) => {
6262
+ const onKeyDown = (0, import_react6.useCallback)((event) => {
5066
6263
  const target = event.target;
5067
6264
  if (target !== null && (target.tagName === "INPUT" || target.tagName === "SELECT" || target.tagName === "TEXTAREA")) {
5068
6265
  if (event.key === "Escape") target.blur();
@@ -5094,7 +6291,11 @@ window.__ModuleLoader__.load({
5094
6291
  void openDetail(selectedId);
5095
6292
  }
5096
6293
  }, [page.kind, visibleProjects, selectedId, backToOverview, openDetail]);
5097
- const detailNeighbours = (0, import_react2.useMemo)(() => {
6294
+ const projectBlockers = (0, import_react6.useCallback)((pocId) => {
6295
+ if (snapshot === null) return null;
6296
+ return snapshot.blockers.rows.filter((row) => row.pocId === pocId);
6297
+ }, [snapshot]);
6298
+ const detailNeighbours = (0, import_react6.useMemo)(() => {
5098
6299
  if (page.kind !== "detail") return { prev: null, next: null, index: 0, total: visibleProjects.length };
5099
6300
  const index = visibleProjects.findIndex((project) => project.pocId === page.pocId);
5100
6301
  if (index === -1) return { prev: null, next: null, index: 0, total: visibleProjects.length };
@@ -5106,172 +6307,181 @@ window.__ModuleLoader__.load({
5106
6307
  };
5107
6308
  }, [page, visibleProjects]);
5108
6309
  const activeLocale = locale.getSnapshot().active;
5109
- const refreshed = (0, import_react2.useMemo)(() => {
6310
+ const refreshed = (0, import_react6.useMemo)(() => {
5110
6311
  if (snapshot?.fetchedAt === null || snapshot?.fetchedAt === void 0) return t("neverRefreshed");
5111
6312
  return format(t("refreshedAt"), { time: clockOf(snapshot.fetchedAt, activeLocale) });
5112
6313
  }, [snapshot, t, activeLocale]);
5113
6314
  const autoNote = period === null ? t("autoRefreshOff") : format(t("autoRefreshOn"), { minutes: Math.round(period / 6e4) });
5114
6315
  const overviewReady = snapshot !== null && snapshot.cacheReady;
5115
6316
  const filteredOut = overviewReady && visibleProjects.length === 0;
5116
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
5117
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("style", { children: CONSOLE_CSS }),
5118
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "wd-shell", onKeyDown, tabIndex: -1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "page", children: [
5119
- page.kind === "overview" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
5120
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "module-rail", children: [
5121
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("button", { type: "button", className: "module-tab", "data-active": "true", title: t("modulePocHint"), children: [
5122
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "module-tab-dot" }),
5123
- t("modulePoc")
6317
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
6318
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("style", { children: CONSOLE_CSS }),
6319
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "wd-shell", onKeyDown, tabIndex: -1, children: [
6320
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "page", children: [
6321
+ page.kind === "overview" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
6322
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "module-rail", children: [
6323
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("button", { type: "button", className: "module-tab", "data-active": "true", title: t("modulePocHint"), children: [
6324
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "module-tab-dot" }),
6325
+ t("modulePoc")
6326
+ ] }),
6327
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "module-rail-hint", children: t("moduleMore") })
5124
6328
  ] }),
5125
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "module-rail-hint", children: t("moduleMore") })
5126
- ] }),
5127
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "page-header", children: [
5128
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "page-header-text", children: [
5129
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "page-eyebrow", children: t("eyebrow") }),
5130
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h1", { className: "page-title", children: t("modulePoc") }),
5131
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "page-subtitle", children: t("subtitle") }),
5132
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "page-source", children: [
5133
- t("dataSource"),
5134
- "\uFF1A",
5135
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("code", { children: [
5136
- "github.com/",
5137
- snapshot?.repository ?? ""
5138
- ] }),
5139
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: "\xB7" }),
5140
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: refreshed })
6329
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "page-header", children: [
6330
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "page-header-text", children: [
6331
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "page-eyebrow", children: t("eyebrow") }),
6332
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h1", { className: "page-title", children: t("modulePoc") }),
6333
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "page-subtitle", children: t("subtitle") }),
6334
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("p", { className: "page-source", children: [
6335
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: format(t("dataSourceLine"), { repository: snapshot?.repository ?? "" }) }),
6336
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "\xB7" }),
6337
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: refreshed })
6338
+ ] })
6339
+ ] }),
6340
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "header-actions", children: [
6341
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "btn btn-primary", disabled: busy, onClick: () => {
6342
+ void refresh(true);
6343
+ }, children: busy ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
6344
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "spinner" }),
6345
+ " ",
6346
+ t("refreshing")
6347
+ ] }) : t("refresh") }),
6348
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "btn", onClick: openRisks, disabled: !overviewReady, children: t("risksNav") }),
6349
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "btn", onClick: openTimeline, disabled: !overviewReady, children: t("timelineNav") }),
6350
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "btn", onClick: () => setExportOpen(true), disabled: !overviewReady, children: t("exportNav") }),
6351
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "btn", onClick: () => setSettingsOpen(true), title: autoNote, children: t("refreshSettings") })
5141
6352
  ] })
5142
6353
  ] }),
5143
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "header-actions", children: [
5144
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "btn btn-primary", disabled: busy, onClick: () => {
5145
- void refresh(true);
5146
- }, children: busy ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
5147
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "spinner" }),
5148
- " ",
5149
- t("refreshing")
5150
- ] }) : t("refresh") }),
5151
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "btn", onClick: openRisks, disabled: !overviewReady, children: t("risksNav") }),
5152
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "btn", onClick: openTimeline, disabled: !overviewReady, children: t("timelineNav") }),
5153
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "btn", onClick: () => setSettingsOpen(true), title: autoNote, children: t("refreshSettings") })
5154
- ] })
5155
- ] }),
5156
- overviewReady ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5157
- Toolbar,
5158
- {
5159
- filters,
5160
- options: filterOptions,
5161
- viewMode: viewPreference.viewMode,
5162
- sortKey: viewPreference.sortKey,
5163
- sortAsc,
5164
- shown: visibleProjects.length,
5165
- total: snapshot.projects.length,
5166
- search,
5167
- searchRef,
5168
- t,
5169
- onFilters: setFilters,
5170
- onSearch: setSearch,
5171
- onClearFilters: clearFilters,
5172
- onViewMode: saveViewMode,
5173
- onSort: saveSortKey,
5174
- onSortDirection: () => setSortAsc((value) => !value)
5175
- }
5176
- ) : null
5177
- ] }) : null,
5178
- page.kind === "risks" ? riskBoard === null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PageLoading, { t, onBack: backToOverview }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RiskBoardPage, { board: riskBoard, t, onBack: backToOverview, onOpenProject: (pocId) => {
5179
- void openDetail(pocId);
5180
- } }) : page.kind === "timeline" ? timeline === null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PageLoading, { t, onBack: backToOverview }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TimelinePage, { timeline, locale: activeLocale, t, onBack: backToOverview, onOpenProject: (pocId) => {
5181
- void openDetail(pocId);
5182
- } }) : null,
5183
- page.kind === "risks" || page.kind === "timeline" ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: page.kind === "overview" ? "page-body" : "detail-body", children: [
5184
- failure !== null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FailureBanner, { message: failure, t, busy, onRetry: () => {
5185
- void refresh(true);
5186
- } }) }) : null,
5187
- loading ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "empty-state", children: [
5188
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "spinner" }),
5189
- " ",
5190
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "empty-copy", children: t("loading") })
5191
- ] }) : page.kind === "detail" ? detail === null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "empty-state", children: [
5192
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "empty-title", children: t("detailMissing") }),
5193
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "empty-copy", children: format(t("detailMissingCopy"), { pocId: page.pocId }) }),
5194
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "btn", onClick: backToOverview, children: t("back") })
5195
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5196
- DetailPage,
5197
- {
5198
- detail,
5199
- gaps: detail.gaps,
5200
- locale: activeLocale,
5201
- t,
5202
- position: { index: detailNeighbours.index + 1, total: detailNeighbours.total },
5203
- onPrev: detailNeighbours.prev === null ? null : () => {
5204
- void openDetail(detailNeighbours.prev);
5205
- },
5206
- onNext: detailNeighbours.next === null ? null : () => {
5207
- void openDetail(detailNeighbours.next);
5208
- },
5209
- onBack: backToOverview,
5210
- onOpen: (pocId) => {
5211
- void openDetail(pocId);
6354
+ overviewReady ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6355
+ Toolbar,
6356
+ {
6357
+ filters,
6358
+ options: filterOptions,
6359
+ viewMode: viewPreference.viewMode,
6360
+ sortKey: viewPreference.sortKey,
6361
+ sortAsc,
6362
+ shown: visibleProjects.length,
6363
+ total: snapshot.projects.length,
6364
+ search,
6365
+ searchRef,
6366
+ t,
6367
+ onFilters: setFilters,
6368
+ onSearch: setSearch,
6369
+ onClearFilters: clearFilters,
6370
+ onViewMode: saveViewMode,
6371
+ onSort: saveSortKey,
6372
+ onSortDirection: () => setSortAsc((value) => !value)
5212
6373
  }
5213
- }
5214
- ) : !overviewReady ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EmptyState, { snapshot, t, busy, onRefresh: () => {
5215
- void refresh(true);
5216
- } }) : snapshot === null || visibleAnalysis === null ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5217
- OverviewPage,
5218
- {
5219
- snapshot,
5220
- projects: visibleProjects,
5221
- gaps: visibleGaps,
5222
- analysis: visibleAnalysis,
5223
- filters,
5224
- viewMode: viewPreference.viewMode,
5225
- sortKey: viewPreference.sortKey,
5226
- sortAsc,
5227
- selectedId,
5228
- locale: activeLocale,
5229
- t,
5230
- filteredOut,
5231
- onOpen: (pocId) => {
5232
- void openDetail(pocId);
5233
- },
5234
- onFilter: applyFilter,
5235
- onClearFilters: clearFilters,
5236
- onViewMode: saveViewMode,
5237
- onSort: saveSortKey
5238
- }
5239
- )
5240
- ] }),
5241
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "page-footer", children: [
5242
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: autoNote }),
5243
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "footer-hint", children: t("keyboardHint") }),
5244
- statusNote === null ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
5245
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: "\xB7" }),
5246
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: statusNote })
6374
+ ) : null
6375
+ ] }) : null,
6376
+ page.kind === "risks" ? riskBoard === null ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PageLoading, { t, onBack: backToOverview }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(RiskBoardPage, { board: riskBoard, t, onBack: backToOverview, onOpenProject: (pocId) => {
6377
+ void openDetail(pocId);
6378
+ } }) : page.kind === "timeline" ? timeline === null ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PageLoading, { t, onBack: backToOverview }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TimelinePage, { timeline, locale: activeLocale, t, onBack: backToOverview, onOpenProject: (pocId) => {
6379
+ void openDetail(pocId);
6380
+ } }) : null,
6381
+ page.kind === "risks" || page.kind === "timeline" ? null : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: page.kind === "overview" ? "page-body" : "detail-body", children: [
6382
+ failure !== null ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(FailureBanner, { message: failure, t, busy, onRetry: () => {
6383
+ void refresh(true);
6384
+ } }) }) : null,
6385
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "empty-state", children: [
6386
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "spinner" }),
6387
+ " ",
6388
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "empty-copy", children: t("loading") })
6389
+ ] }) : page.kind === "detail" ? detail === null ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "empty-state", children: [
6390
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "empty-title", children: t("detailMissing") }),
6391
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "empty-copy", children: format(t("detailMissingCopy"), { pocId: page.pocId }) }),
6392
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "btn", onClick: backToOverview, children: t("back") })
6393
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6394
+ DetailPage,
6395
+ {
6396
+ detail,
6397
+ gaps: detail.gaps,
6398
+ blockers: projectBlockers(detail.summary.pocId),
6399
+ locale: activeLocale,
6400
+ t,
6401
+ position: { index: detailNeighbours.index + 1, total: detailNeighbours.total },
6402
+ onPrev: detailNeighbours.prev === null ? null : () => {
6403
+ void openDetail(detailNeighbours.prev);
6404
+ },
6405
+ onNext: detailNeighbours.next === null ? null : () => {
6406
+ void openDetail(detailNeighbours.next);
6407
+ },
6408
+ onBack: backToOverview,
6409
+ onOpen: (pocId) => {
6410
+ void openDetail(pocId);
6411
+ }
6412
+ }
6413
+ ) : !overviewReady ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(EmptyState, { snapshot, t, busy, onRefresh: () => {
6414
+ void refresh(true);
6415
+ } }) : snapshot === null || visibleAnalysis === null ? null : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6416
+ OverviewPage,
6417
+ {
6418
+ snapshot,
6419
+ projects: visibleProjects,
6420
+ gaps: visibleGaps,
6421
+ analysis: visibleAnalysis,
6422
+ filters,
6423
+ viewMode: viewPreference.viewMode,
6424
+ sortKey: viewPreference.sortKey,
6425
+ sortAsc,
6426
+ selectedId,
6427
+ locale: activeLocale,
6428
+ t,
6429
+ filteredOut,
6430
+ onOpen: (pocId) => {
6431
+ void openDetail(pocId);
6432
+ },
6433
+ onFilter: applyFilter,
6434
+ onClearFilters: clearFilters,
6435
+ onViewMode: saveViewMode,
6436
+ onSort: saveSortKey
6437
+ }
6438
+ )
5247
6439
  ] }),
5248
- overviewReady ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
5249
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "spacer" }),
5250
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: format(t("filterResult"), { shown: visibleProjects.length, total: snapshot.projects.length }) })
5251
- ] }) : null
5252
- ] })
5253
- ] }) }),
5254
- settingsOpen ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5255
- RefreshSettings,
5256
- {
5257
- preference,
5258
- t,
5259
- onSave: savePreference,
5260
- onCancel: () => setSettingsOpen(false)
5261
- }
5262
- ) : null
6440
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "page-footer", children: [
6441
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: autoNote }),
6442
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "footer-hint", children: t("keyboardHint") }),
6443
+ statusNote === null ? null : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
6444
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "\xB7" }),
6445
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: statusNote })
6446
+ ] }),
6447
+ overviewReady ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
6448
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "spacer" }),
6449
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: format(t("filterResult"), { shown: visibleProjects.length, total: snapshot.projects.length }) })
6450
+ ] }) : null
6451
+ ] })
6452
+ ] }),
6453
+ settingsOpen ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6454
+ RefreshSettings,
6455
+ {
6456
+ preference,
6457
+ t,
6458
+ onSave: savePreference,
6459
+ onCancel: () => setSettingsOpen(false)
6460
+ }
6461
+ ) : null,
6462
+ exportOpen ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
6463
+ ExportFormDialog,
6464
+ {
6465
+ api,
6466
+ projects: visibleProjects,
6467
+ t,
6468
+ onClose: () => setExportOpen(false),
6469
+ onError: (message) => setFailure(message)
6470
+ }
6471
+ ) : null
6472
+ ] })
5263
6473
  ] });
5264
6474
  }
5265
6475
  function PageLoading({ t, onBack }) {
5266
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
5267
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "page-header", children: [
5268
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "page-header-text", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h1", { className: "page-title", children: t("loading") }) }),
5269
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "header-actions", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: "btn", onClick: onBack, children: t("back") }) })
6476
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
6477
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "page-header", children: [
6478
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "page-header-text", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h1", { className: "page-title", children: t("loading") }) }),
6479
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "header-actions", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("button", { type: "button", className: "btn", onClick: onBack, children: t("back") }) })
5270
6480
  ] }),
5271
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "page-body", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "empty-state", children: [
5272
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "spinner" }),
6481
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "page-body", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "empty-state", children: [
6482
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "spinner" }),
5273
6483
  " ",
5274
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "empty-copy", children: t("loading") })
6484
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "empty-copy", children: t("loading") })
5275
6485
  ] }) })
5276
6486
  ] });
5277
6487
  }
@@ -5346,7 +6556,7 @@ window.__ModuleLoader__.load({
5346
6556
  }
5347
6557
 
5348
6558
  // src/client/index.tsx
5349
- var import_jsx_runtime6 = require("react/jsx-runtime");
6559
+ var import_jsx_runtime9 = require("react/jsx-runtime");
5350
6560
  var inject = ["slots", "locale", "connection"];
5351
6561
  var SIDEBAR_SLOT = "sidebar.panellist";
5352
6562
  var MAIN_SLOT = "main";
@@ -5379,7 +6589,7 @@ window.__ModuleLoader__.load({
5379
6589
  "skillre-work-dashboard sidebar entry"
5380
6590
  );
5381
6591
  ctx.effect(
5382
- () => ctx.slots.inject(MAIN_SLOT, () => ctx.slots.register({ name: MAIN_SLOT, key: PANEL_ID }, () => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(WorkDashboardPage, { api, locale: ctx.locale, t }))),
6592
+ () => ctx.slots.inject(MAIN_SLOT, () => ctx.slots.register({ name: MAIN_SLOT, key: PANEL_ID }, () => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(WorkDashboardPage, { api, locale: ctx.locale, t }))),
5383
6593
  "skillre-work-dashboard console page"
5384
6594
  );
5385
6595
  }