@skillre/dsh-plugin-work-dashboard 0.9.0 → 0.10.1
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/docs/DESIGN-1.0-/344/274/230/345/214/226/346/226/271/346/241/210.md +212 -0
- package/docs/DESIGN-/344/274/232/350/257/235/344/272/214-SuperAgent/344/270/216/344/273/223/345/272/223/346/224/271/351/200/240.md +275 -0
- package/docs/LEDGER-REQUIREMENTS-v3.1.md +367 -0
- package/docs/PLAN-v3.1-adaptation.md +237 -0
- package/docs/TARGET-/345/217/260/350/264/246/344/273/223/345/272/223v3.1.md +500 -0
- package/docs//350/200/201Mac-SuperAgent/346/224/271/351/200/240/350/256/260/345/275/225-/347/254/254/344/272/214/346/255/245.md +233 -0
- package/lib/client/css/detail.d.ts +1 -1
- package/lib/client/css/detail.js +273 -22
- package/lib/client/text.js +90 -6
- package/lib/client.js +3040 -519
- package/lib/form.d.ts +62 -2
- package/lib/form.js +88 -10
- package/lib/gap.d.ts +26 -8
- package/lib/gap.js +88 -17
- package/lib/repo.d.ts +60 -0
- package/lib/repo.js +99 -0
- package/lib/rules.d.ts +105 -0
- package/lib/rules.js +227 -0
- package/lib/signals.d.ts +126 -0
- package/lib/signals.js +238 -0
- package/lib/store.d.ts +16 -1
- package/lib/store.js +80 -10
- package/lib/types.d.ts +129 -15
- package/lib/types.js +5 -0
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -57,7 +57,12 @@ window.__ModuleLoader__.load({
|
|
|
57
57
|
"R9-evidence-no-recognition",
|
|
58
58
|
"R10-g3-1-without-g3-2",
|
|
59
59
|
"R11-no-next-milestone",
|
|
60
|
-
"R12-stage-stalled"
|
|
60
|
+
"R12-stage-stalled",
|
|
61
|
+
// v3.1 state rules: a plan that is the right shape but unexecuted.
|
|
62
|
+
"R13-scenario-no-evidence",
|
|
63
|
+
"R14-scenario-awaiting-customer",
|
|
64
|
+
"R15-criteria-unverified",
|
|
65
|
+
"R16-scenario-not-started"
|
|
61
66
|
]);
|
|
62
67
|
var BLOCKER_SOURCES = Object.freeze([
|
|
63
68
|
"gap",
|
|
@@ -212,6 +217,12 @@ window.__ModuleLoader__.load({
|
|
|
212
217
|
scenariosLimitHint: "\u8981\u6C42 3\u20135 \u4E2A",
|
|
213
218
|
risksLimitHint: "\u4E0A\u9650 3 \u4E2A",
|
|
214
219
|
emptyField: "\uFF08\u7A7A\uFF09",
|
|
220
|
+
// The ledger's `priority` is an English enum (strategic/high/normal). Rendering
|
|
221
|
+
// it raw would read as a code fragment inside a Chinese page.
|
|
222
|
+
priorityStrategic: "\u6218\u7565",
|
|
223
|
+
priorityHigh: "\u9AD8",
|
|
224
|
+
priorityNormal: "\u5E38\u89C4",
|
|
225
|
+
priorityUnknown: "\u672A\u5B9A",
|
|
215
226
|
riskLevel: "\u7B49\u7EA7",
|
|
216
227
|
riskMitigation: "\u5E94\u5BF9",
|
|
217
228
|
round: "\u7B2C {round} \u8F6E",
|
|
@@ -594,16 +605,53 @@ window.__ModuleLoader__.load({
|
|
|
594
605
|
dtG0Unreviewed: "\u8FD8\u6CA1\u6709\u8BC4\u5BA1\u7ED3\u8BBA",
|
|
595
606
|
dtPlanTitle: "\u8BA1\u5212\uFF08G1 / G2\uFF09",
|
|
596
607
|
dtPlanCriteria: "\u6210\u529F\u6307\u6807",
|
|
597
|
-
|
|
608
|
+
dtPlanCriteriaStatus: "\u72B6\u6001",
|
|
609
|
+
dtPlanScenarioGoal: "\u76EE\u6807",
|
|
610
|
+
dtPlanScenarioEvidence: "{count} \u9879\u8BC1\u636E",
|
|
611
|
+
dtProgressCountLabel: "{count} \u6761",
|
|
612
|
+
dtPlanScenarioDetail: "\u8BE6\u60C5",
|
|
613
|
+
dtG0GridTitle: "Gate 0 \xB7 \u5173\u952E\u4FE1\u606F\u533A",
|
|
614
|
+
dtG0ReviewTitle: "G0 Review",
|
|
615
|
+
dtG0Answered: "{answered} / {total} \u5DF2\u586B",
|
|
616
|
+
dtG0MissingNote: "\u8FD8\u6709 {count} \u9879\u5FC5\u586B\u6CA1\u5199\u3002G0 \u4E0D\u9F50\uFF0C\u540E\u9762\u6240\u6709\u5224\u65AD\u90FD\u4E0D\u53EF\u4FE1\u3002",
|
|
617
|
+
dtNextActionsTitle: "\u4E0B\u4E00\u6B65\u5DE5\u4F5C\u76EE\u6807\u53CA\u8BA1\u5212",
|
|
618
|
+
dtNextActionsKicker: "\u627F\u63A5 outcome.business.milestone \uFF0F progress[].next",
|
|
619
|
+
dtNextActionsNone: "\u8FD8\u6CA1\u6709\u4E0B\u4E00\u6B65\u3002POC \u505A\u6210\u4E86\u5374\u6CA1\u6709\u4E0B\u4E00\u6B65\uFF0C\u662F\u6700\u5BB9\u6613\u6F0F\u6389\u3001\u5546\u4E1A\u4EF7\u503C\u6700\u9AD8\u7684\u7F3A\u53E3\u3002",
|
|
620
|
+
dtNextGoal: "\u76EE\u6807",
|
|
621
|
+
dtNextOwner: "\u8D1F\u8D23\u4EBA",
|
|
622
|
+
dtNextDeadline: "\u622A\u6B62",
|
|
623
|
+
dtNextStatus: "\u72B6\u6001",
|
|
624
|
+
dtScenarioBack: "\u8FD4\u56DE\u603B\u89C8",
|
|
625
|
+
dtScenarioTitle: "\u573A\u666F\u8BE6\u60C5",
|
|
626
|
+
dtScenarioGoal: "\u6210\u529F\u76EE\u6807",
|
|
627
|
+
dtScenarioEvidence: "\u8BC1\u636E",
|
|
628
|
+
dtScenarioEvidenceNone: "\u8FD9\u4E2A\u573A\u666F\u8FD8\u6CA1\u6709\u4EFB\u4F55\u8BC1\u636E\u3002\u6CA1\u6709\u8BC1\u636E\u7684\u573A\u666F\uFF0C\u5728\u4EFB\u4F55\u8BA8\u8BBA\u91CC\u90FD\u7B49\u4E8E\u6CA1\u505A\u8FC7\u3002",
|
|
629
|
+
dtScenarioCustomer: "\u5BA2\u6237\u53CD\u9988",
|
|
630
|
+
dtScenarioSyncedWith: "\u540C\u6B65\u5BF9\u8C61",
|
|
631
|
+
dtScenarioFeedbackEmpty: "\u8FD8\u6CA1\u6709\u8BB0\u5F55\u5BA2\u6237\u53CD\u9988\u3002\u5BA2\u6237\u600E\u4E48\u8BF4\uFF0C\u6BD4\u6211\u4EEC\u600E\u4E48\u6D4B\u66F4\u91CD\u8981\u3002",
|
|
632
|
+
dtScenarioGate3: "G3 \u5224\u5B9A",
|
|
633
|
+
dtScenarioLinked: "\u5173\u8054\u8FDB\u5C55",
|
|
634
|
+
dtScenarioLinkedNone: "\u8FD8\u6CA1\u6709\u8FDB\u5C55\u5173\u8054\u5230\u8FD9\u4E2A\u573A\u666F\u3002\u65B0\u589E\u8FDB\u5C55\u65F6\u7528 scenario_ids \u5F15\u7528\u5B83\u3002",
|
|
635
|
+
dtScenarioNotFound: "\u627E\u4E0D\u5230\u8FD9\u4E2A\u573A\u666F",
|
|
636
|
+
dtStatusProven: "\u5DF2\u8BC1\u660E",
|
|
637
|
+
dtStatusAwaiting: "\u5F85\u5BA2\u6237\u786E\u8BA4",
|
|
638
|
+
dtStatusNoEvidence: "\u65E0\u8BC1\u636E",
|
|
639
|
+
dtStatusNotStarted: "\u672A\u5F00\u59CB",
|
|
640
|
+
dtCritProven: "\u5DF2\u8FBE\u6210",
|
|
641
|
+
dtCritPartial: "\u90E8\u5206\u8FBE\u6210",
|
|
642
|
+
dtCritFailed: "\u672A\u8FBE\u6210",
|
|
643
|
+
dtCritUnverified: "\u672A\u9A8C\u8BC1",
|
|
644
|
+
dtCriteriaStatusNone: "\u672A\u9A8C\u8BC1",
|
|
645
|
+
dtPlanCriteriaNone: "\u8FD8\u6CA1\u6709\u6210\u529F\u6307\u6807\u3002\u81F3\u5C11\u5199 2 \u9879\u53EF\u9A8C\u6536\u7684\u6307\u6807\uFF0C\u5426\u5219 POC \u7ED3\u675F\u540E\u65E0\u6CD5\u5224\u5B9A\u6210\u6CA1\u6210\u3002",
|
|
598
646
|
dtPlanCriteriaCount: "{count} \u9879\uFF08\u8981\u6C42 2\u20133\uFF09",
|
|
599
647
|
dtPlanMetric: "\u6307\u6807",
|
|
600
648
|
dtPlanBaseline: "\u57FA\u7EBF",
|
|
601
649
|
dtPlanTarget: "\u76EE\u6807",
|
|
602
650
|
dtPlanScenarios: "\u9A8C\u8BC1\u573A\u666F",
|
|
603
|
-
dtPlanScenariosNone: "\u8FD8\u6CA1\u6709\
|
|
651
|
+
dtPlanScenariosNone: "\u8FD8\u6CA1\u6709\u9A8C\u8BC1\u573A\u666F\u3002\u5199 3\u20135 \u4E2A\u5177\u4F53\u573A\u666F\uFF0C\u6BCF\u4E2A\u90FD\u8981\u80FD\u5BF9\u5E94\u5230\u8BC1\u636E\u3002",
|
|
604
652
|
dtPlanScenariosCount: "{count} \u4E2A\uFF08\u8981\u6C42 3\u20135\uFF09",
|
|
605
653
|
dtPlanRisks: "\u98CE\u9669",
|
|
606
|
-
dtPlanRisksNone: "\u6CA1\u6709\u767B\u8BB0\u98CE\u9669",
|
|
654
|
+
dtPlanRisksNone: "\u6CA1\u6709\u767B\u8BB0\u98CE\u9669\u3002\u81F3\u5C11\u5199\u4E0B\u6700\u53EF\u80FD\u8BA9\u8FD9\u6B21 POC \u5931\u8D25\u7684\u90A3\u4E00\u6761\u3002",
|
|
607
655
|
dtPlanRisksCount: "{count} \u4E2A\uFF08\u4E0A\u9650 3\uFF09",
|
|
608
656
|
dtPlanMitigation: "\u5E94\u5BF9",
|
|
609
657
|
dtPlanPain: "\u5BA2\u6237\u75DB\u70B9",
|
|
@@ -747,6 +795,10 @@ window.__ModuleLoader__.load({
|
|
|
747
795
|
scenariosLimitHint: "3\u20135 required",
|
|
748
796
|
risksLimitHint: "At most 3",
|
|
749
797
|
emptyField: "(empty)",
|
|
798
|
+
priorityStrategic: "Strategic",
|
|
799
|
+
priorityHigh: "High",
|
|
800
|
+
priorityNormal: "Normal",
|
|
801
|
+
priorityUnknown: "Unset",
|
|
750
802
|
riskLevel: "Level",
|
|
751
803
|
riskMitigation: "Mitigation",
|
|
752
804
|
round: "Round {round}",
|
|
@@ -1128,16 +1180,53 @@ window.__ModuleLoader__.load({
|
|
|
1128
1180
|
dtG0Unreviewed: "No review conclusion yet",
|
|
1129
1181
|
dtPlanTitle: "Plan (G1 / G2)",
|
|
1130
1182
|
dtPlanCriteria: "Success criteria",
|
|
1131
|
-
|
|
1183
|
+
dtPlanCriteriaStatus: "Status",
|
|
1184
|
+
dtPlanScenarioGoal: "Goal",
|
|
1185
|
+
dtPlanScenarioEvidence: "{count} evidence",
|
|
1186
|
+
dtProgressCountLabel: "{count} entries",
|
|
1187
|
+
dtPlanScenarioDetail: "Detail",
|
|
1188
|
+
dtG0GridTitle: "Gate 0 \xB7 key information",
|
|
1189
|
+
dtG0ReviewTitle: "G0 review",
|
|
1190
|
+
dtG0Answered: "{answered} / {total} answered",
|
|
1191
|
+
dtG0MissingNote: "{count} required answer(s) still missing. Until G0 is complete, nothing downstream is trustworthy.",
|
|
1192
|
+
dtNextActionsTitle: "Next steps",
|
|
1193
|
+
dtNextActionsKicker: "outcome.business.milestone \uFF0F progress[].next",
|
|
1194
|
+
dtNextActionsNone: "No next step yet. A pilot that worked with nothing following is the most expensive gap.",
|
|
1195
|
+
dtNextGoal: "Goal",
|
|
1196
|
+
dtNextOwner: "Owner",
|
|
1197
|
+
dtNextDeadline: "Due",
|
|
1198
|
+
dtNextStatus: "Status",
|
|
1199
|
+
dtScenarioBack: "Back to overview",
|
|
1200
|
+
dtScenarioTitle: "Scenario detail",
|
|
1201
|
+
dtScenarioGoal: "Success goal",
|
|
1202
|
+
dtScenarioEvidence: "Evidence",
|
|
1203
|
+
dtScenarioEvidenceNone: "No evidence for this scenario yet. An unbacked scenario counts as not done.",
|
|
1204
|
+
dtScenarioCustomer: "Customer feedback",
|
|
1205
|
+
dtScenarioSyncedWith: "Synced with",
|
|
1206
|
+
dtScenarioFeedbackEmpty: "No customer feedback yet. What the customer says matters more than what we tested.",
|
|
1207
|
+
dtScenarioGate3: "G3 verdict",
|
|
1208
|
+
dtScenarioLinked: "Linked progress",
|
|
1209
|
+
dtScenarioLinkedNone: "No progress entry references this scenario yet. Cite its id in scenario_ids.",
|
|
1210
|
+
dtScenarioNotFound: "Scenario not found",
|
|
1211
|
+
dtStatusProven: "Proven",
|
|
1212
|
+
dtStatusAwaiting: "Awaiting customer",
|
|
1213
|
+
dtStatusNoEvidence: "No evidence",
|
|
1214
|
+
dtStatusNotStarted: "Not started",
|
|
1215
|
+
dtCritProven: "Met",
|
|
1216
|
+
dtCritPartial: "Partially met",
|
|
1217
|
+
dtCritFailed: "Not met",
|
|
1218
|
+
dtCritUnverified: "Unverified",
|
|
1219
|
+
dtCriteriaStatusNone: "Unverified",
|
|
1220
|
+
dtPlanCriteriaNone: "No success criterion yet. Write at least 2 so the pilot can be judged when it ends.",
|
|
1132
1221
|
dtPlanCriteriaCount: "{count} (2\u20133 required)",
|
|
1133
1222
|
dtPlanMetric: "Metric",
|
|
1134
1223
|
dtPlanBaseline: "Baseline",
|
|
1135
1224
|
dtPlanTarget: "Target",
|
|
1136
1225
|
dtPlanScenarios: "Validation scenarios",
|
|
1137
|
-
dtPlanScenariosNone: "No validation scenario
|
|
1226
|
+
dtPlanScenariosNone: "No validation scenario yet. Write 3\u20135 concrete ones, each able to point at evidence.",
|
|
1138
1227
|
dtPlanScenariosCount: "{count} (3\u20135 required)",
|
|
1139
1228
|
dtPlanRisks: "Risks",
|
|
1140
|
-
dtPlanRisksNone: "No risk registered",
|
|
1229
|
+
dtPlanRisksNone: "No risk registered. Name at least the one most likely to sink this pilot.",
|
|
1141
1230
|
dtPlanRisksCount: "{count} (max 3)",
|
|
1142
1231
|
dtPlanMitigation: "Mitigation",
|
|
1143
1232
|
dtPlanPain: "Customer pain",
|
|
@@ -1551,6 +1640,2323 @@ window.__ModuleLoader__.load({
|
|
|
1551
1640
|
// src/client/blockers.tsx
|
|
1552
1641
|
var import_react = require("react");
|
|
1553
1642
|
|
|
1643
|
+
// node_modules/yaml/browser/dist/nodes/identity.js
|
|
1644
|
+
var ALIAS = Symbol.for("yaml.alias");
|
|
1645
|
+
var DOC = Symbol.for("yaml.document");
|
|
1646
|
+
var MAP = Symbol.for("yaml.map");
|
|
1647
|
+
var PAIR = Symbol.for("yaml.pair");
|
|
1648
|
+
var SCALAR = Symbol.for("yaml.scalar");
|
|
1649
|
+
var SEQ = Symbol.for("yaml.seq");
|
|
1650
|
+
var NODE_TYPE = Symbol.for("yaml.node.type");
|
|
1651
|
+
var isAlias = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === ALIAS;
|
|
1652
|
+
var isDocument = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === DOC;
|
|
1653
|
+
var isMap = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === MAP;
|
|
1654
|
+
var isPair = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === PAIR;
|
|
1655
|
+
var isScalar = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SCALAR;
|
|
1656
|
+
var isSeq = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SEQ;
|
|
1657
|
+
function isCollection(node) {
|
|
1658
|
+
if (node && typeof node === "object")
|
|
1659
|
+
switch (node[NODE_TYPE]) {
|
|
1660
|
+
case MAP:
|
|
1661
|
+
case SEQ:
|
|
1662
|
+
return true;
|
|
1663
|
+
}
|
|
1664
|
+
return false;
|
|
1665
|
+
}
|
|
1666
|
+
function isNode(node) {
|
|
1667
|
+
if (node && typeof node === "object")
|
|
1668
|
+
switch (node[NODE_TYPE]) {
|
|
1669
|
+
case ALIAS:
|
|
1670
|
+
case MAP:
|
|
1671
|
+
case SCALAR:
|
|
1672
|
+
case SEQ:
|
|
1673
|
+
return true;
|
|
1674
|
+
}
|
|
1675
|
+
return false;
|
|
1676
|
+
}
|
|
1677
|
+
var hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;
|
|
1678
|
+
|
|
1679
|
+
// node_modules/yaml/browser/dist/visit.js
|
|
1680
|
+
var BREAK = Symbol("break visit");
|
|
1681
|
+
var SKIP = Symbol("skip children");
|
|
1682
|
+
var REMOVE = Symbol("remove node");
|
|
1683
|
+
function visit(node, visitor) {
|
|
1684
|
+
const visitor_ = initVisitor(visitor);
|
|
1685
|
+
if (isDocument(node)) {
|
|
1686
|
+
const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));
|
|
1687
|
+
if (cd === REMOVE)
|
|
1688
|
+
node.contents = null;
|
|
1689
|
+
} else
|
|
1690
|
+
visit_(null, node, visitor_, Object.freeze([]));
|
|
1691
|
+
}
|
|
1692
|
+
visit.BREAK = BREAK;
|
|
1693
|
+
visit.SKIP = SKIP;
|
|
1694
|
+
visit.REMOVE = REMOVE;
|
|
1695
|
+
function visit_(key, node, visitor, path) {
|
|
1696
|
+
const ctrl = callVisitor(key, node, visitor, path);
|
|
1697
|
+
if (isNode(ctrl) || isPair(ctrl)) {
|
|
1698
|
+
replaceNode(key, path, ctrl);
|
|
1699
|
+
return visit_(key, ctrl, visitor, path);
|
|
1700
|
+
}
|
|
1701
|
+
if (typeof ctrl !== "symbol") {
|
|
1702
|
+
if (isCollection(node)) {
|
|
1703
|
+
path = Object.freeze(path.concat(node));
|
|
1704
|
+
for (let i = 0; i < node.items.length; ++i) {
|
|
1705
|
+
const ci = visit_(i, node.items[i], visitor, path);
|
|
1706
|
+
if (typeof ci === "number")
|
|
1707
|
+
i = ci - 1;
|
|
1708
|
+
else if (ci === BREAK)
|
|
1709
|
+
return BREAK;
|
|
1710
|
+
else if (ci === REMOVE) {
|
|
1711
|
+
node.items.splice(i, 1);
|
|
1712
|
+
i -= 1;
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
} else if (isPair(node)) {
|
|
1716
|
+
path = Object.freeze(path.concat(node));
|
|
1717
|
+
const ck = visit_("key", node.key, visitor, path);
|
|
1718
|
+
if (ck === BREAK)
|
|
1719
|
+
return BREAK;
|
|
1720
|
+
else if (ck === REMOVE)
|
|
1721
|
+
node.key = null;
|
|
1722
|
+
const cv = visit_("value", node.value, visitor, path);
|
|
1723
|
+
if (cv === BREAK)
|
|
1724
|
+
return BREAK;
|
|
1725
|
+
else if (cv === REMOVE)
|
|
1726
|
+
node.value = null;
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
return ctrl;
|
|
1730
|
+
}
|
|
1731
|
+
async function visitAsync(node, visitor) {
|
|
1732
|
+
const visitor_ = initVisitor(visitor);
|
|
1733
|
+
if (isDocument(node)) {
|
|
1734
|
+
const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));
|
|
1735
|
+
if (cd === REMOVE)
|
|
1736
|
+
node.contents = null;
|
|
1737
|
+
} else
|
|
1738
|
+
await visitAsync_(null, node, visitor_, Object.freeze([]));
|
|
1739
|
+
}
|
|
1740
|
+
visitAsync.BREAK = BREAK;
|
|
1741
|
+
visitAsync.SKIP = SKIP;
|
|
1742
|
+
visitAsync.REMOVE = REMOVE;
|
|
1743
|
+
async function visitAsync_(key, node, visitor, path) {
|
|
1744
|
+
const ctrl = await callVisitor(key, node, visitor, path);
|
|
1745
|
+
if (isNode(ctrl) || isPair(ctrl)) {
|
|
1746
|
+
replaceNode(key, path, ctrl);
|
|
1747
|
+
return visitAsync_(key, ctrl, visitor, path);
|
|
1748
|
+
}
|
|
1749
|
+
if (typeof ctrl !== "symbol") {
|
|
1750
|
+
if (isCollection(node)) {
|
|
1751
|
+
path = Object.freeze(path.concat(node));
|
|
1752
|
+
for (let i = 0; i < node.items.length; ++i) {
|
|
1753
|
+
const ci = await visitAsync_(i, node.items[i], visitor, path);
|
|
1754
|
+
if (typeof ci === "number")
|
|
1755
|
+
i = ci - 1;
|
|
1756
|
+
else if (ci === BREAK)
|
|
1757
|
+
return BREAK;
|
|
1758
|
+
else if (ci === REMOVE) {
|
|
1759
|
+
node.items.splice(i, 1);
|
|
1760
|
+
i -= 1;
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
} else if (isPair(node)) {
|
|
1764
|
+
path = Object.freeze(path.concat(node));
|
|
1765
|
+
const ck = await visitAsync_("key", node.key, visitor, path);
|
|
1766
|
+
if (ck === BREAK)
|
|
1767
|
+
return BREAK;
|
|
1768
|
+
else if (ck === REMOVE)
|
|
1769
|
+
node.key = null;
|
|
1770
|
+
const cv = await visitAsync_("value", node.value, visitor, path);
|
|
1771
|
+
if (cv === BREAK)
|
|
1772
|
+
return BREAK;
|
|
1773
|
+
else if (cv === REMOVE)
|
|
1774
|
+
node.value = null;
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
return ctrl;
|
|
1778
|
+
}
|
|
1779
|
+
function initVisitor(visitor) {
|
|
1780
|
+
if (typeof visitor === "object" && (visitor.Collection || visitor.Node || visitor.Value)) {
|
|
1781
|
+
return Object.assign({
|
|
1782
|
+
Alias: visitor.Node,
|
|
1783
|
+
Map: visitor.Node,
|
|
1784
|
+
Scalar: visitor.Node,
|
|
1785
|
+
Seq: visitor.Node
|
|
1786
|
+
}, visitor.Value && {
|
|
1787
|
+
Map: visitor.Value,
|
|
1788
|
+
Scalar: visitor.Value,
|
|
1789
|
+
Seq: visitor.Value
|
|
1790
|
+
}, visitor.Collection && {
|
|
1791
|
+
Map: visitor.Collection,
|
|
1792
|
+
Seq: visitor.Collection
|
|
1793
|
+
}, visitor);
|
|
1794
|
+
}
|
|
1795
|
+
return visitor;
|
|
1796
|
+
}
|
|
1797
|
+
function callVisitor(key, node, visitor, path) {
|
|
1798
|
+
if (typeof visitor === "function")
|
|
1799
|
+
return visitor(key, node, path);
|
|
1800
|
+
if (isMap(node))
|
|
1801
|
+
return visitor.Map?.(key, node, path);
|
|
1802
|
+
if (isSeq(node))
|
|
1803
|
+
return visitor.Seq?.(key, node, path);
|
|
1804
|
+
if (isPair(node))
|
|
1805
|
+
return visitor.Pair?.(key, node, path);
|
|
1806
|
+
if (isScalar(node))
|
|
1807
|
+
return visitor.Scalar?.(key, node, path);
|
|
1808
|
+
if (isAlias(node))
|
|
1809
|
+
return visitor.Alias?.(key, node, path);
|
|
1810
|
+
return void 0;
|
|
1811
|
+
}
|
|
1812
|
+
function replaceNode(key, path, node) {
|
|
1813
|
+
const parent = path[path.length - 1];
|
|
1814
|
+
if (isCollection(parent)) {
|
|
1815
|
+
parent.items[key] = node;
|
|
1816
|
+
} else if (isPair(parent)) {
|
|
1817
|
+
if (key === "key")
|
|
1818
|
+
parent.key = node;
|
|
1819
|
+
else
|
|
1820
|
+
parent.value = node;
|
|
1821
|
+
} else if (isDocument(parent)) {
|
|
1822
|
+
parent.contents = node;
|
|
1823
|
+
} else {
|
|
1824
|
+
const pt = isAlias(parent) ? "alias" : "scalar";
|
|
1825
|
+
throw new Error(`Cannot replace node with ${pt} parent`);
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
// node_modules/yaml/browser/dist/doc/directives.js
|
|
1830
|
+
var escapeChars = {
|
|
1831
|
+
"!": "%21",
|
|
1832
|
+
",": "%2C",
|
|
1833
|
+
"[": "%5B",
|
|
1834
|
+
"]": "%5D",
|
|
1835
|
+
"{": "%7B",
|
|
1836
|
+
"}": "%7D"
|
|
1837
|
+
};
|
|
1838
|
+
var escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, (ch) => escapeChars[ch]);
|
|
1839
|
+
var Directives = class _Directives {
|
|
1840
|
+
constructor(yaml, tags) {
|
|
1841
|
+
this.docStart = null;
|
|
1842
|
+
this.docEnd = false;
|
|
1843
|
+
this.yaml = Object.assign({}, _Directives.defaultYaml, yaml);
|
|
1844
|
+
this.tags = Object.assign({}, _Directives.defaultTags, tags);
|
|
1845
|
+
}
|
|
1846
|
+
clone() {
|
|
1847
|
+
const copy = new _Directives(this.yaml, this.tags);
|
|
1848
|
+
copy.docStart = this.docStart;
|
|
1849
|
+
return copy;
|
|
1850
|
+
}
|
|
1851
|
+
/**
|
|
1852
|
+
* During parsing, get a Directives instance for the current document and
|
|
1853
|
+
* update the stream state according to the current version's spec.
|
|
1854
|
+
*/
|
|
1855
|
+
atDocument() {
|
|
1856
|
+
const res = new _Directives(this.yaml, this.tags);
|
|
1857
|
+
switch (this.yaml.version) {
|
|
1858
|
+
case "1.1":
|
|
1859
|
+
this.atNextDocument = true;
|
|
1860
|
+
break;
|
|
1861
|
+
case "1.2":
|
|
1862
|
+
this.atNextDocument = false;
|
|
1863
|
+
this.yaml = {
|
|
1864
|
+
explicit: _Directives.defaultYaml.explicit,
|
|
1865
|
+
version: "1.2"
|
|
1866
|
+
};
|
|
1867
|
+
this.tags = Object.assign({}, _Directives.defaultTags);
|
|
1868
|
+
break;
|
|
1869
|
+
}
|
|
1870
|
+
return res;
|
|
1871
|
+
}
|
|
1872
|
+
/**
|
|
1873
|
+
* @param onError - May be called even if the action was successful
|
|
1874
|
+
* @returns `true` on success
|
|
1875
|
+
*/
|
|
1876
|
+
add(line, onError) {
|
|
1877
|
+
if (this.atNextDocument) {
|
|
1878
|
+
this.yaml = { explicit: _Directives.defaultYaml.explicit, version: "1.1" };
|
|
1879
|
+
this.tags = Object.assign({}, _Directives.defaultTags);
|
|
1880
|
+
this.atNextDocument = false;
|
|
1881
|
+
}
|
|
1882
|
+
const parts = line.trim().split(/[ \t]+/);
|
|
1883
|
+
const name = parts.shift();
|
|
1884
|
+
switch (name) {
|
|
1885
|
+
case "%TAG": {
|
|
1886
|
+
if (parts.length !== 2) {
|
|
1887
|
+
onError(0, "%TAG directive should contain exactly two parts");
|
|
1888
|
+
if (parts.length < 2)
|
|
1889
|
+
return false;
|
|
1890
|
+
}
|
|
1891
|
+
const [handle, prefix] = parts;
|
|
1892
|
+
this.tags[handle] = prefix;
|
|
1893
|
+
return true;
|
|
1894
|
+
}
|
|
1895
|
+
case "%YAML": {
|
|
1896
|
+
this.yaml.explicit = true;
|
|
1897
|
+
if (parts.length !== 1) {
|
|
1898
|
+
onError(0, "%YAML directive should contain exactly one part");
|
|
1899
|
+
return false;
|
|
1900
|
+
}
|
|
1901
|
+
const [version] = parts;
|
|
1902
|
+
if (version === "1.1" || version === "1.2") {
|
|
1903
|
+
this.yaml.version = version;
|
|
1904
|
+
return true;
|
|
1905
|
+
} else {
|
|
1906
|
+
const isValid = /^\d+\.\d+$/.test(version);
|
|
1907
|
+
onError(6, `Unsupported YAML version ${version}`, isValid);
|
|
1908
|
+
return false;
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
default:
|
|
1912
|
+
onError(0, `Unknown directive ${name}`, true);
|
|
1913
|
+
return false;
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
/**
|
|
1917
|
+
* Resolves a tag, matching handles to those defined in %TAG directives.
|
|
1918
|
+
*
|
|
1919
|
+
* @returns Resolved tag, which may also be the non-specific tag `'!'` or a
|
|
1920
|
+
* `'!local'` tag, or `null` if unresolvable.
|
|
1921
|
+
*/
|
|
1922
|
+
tagName(source, onError) {
|
|
1923
|
+
if (source === "!")
|
|
1924
|
+
return "!";
|
|
1925
|
+
if (source[0] !== "!") {
|
|
1926
|
+
onError(`Not a valid tag: ${source}`);
|
|
1927
|
+
return null;
|
|
1928
|
+
}
|
|
1929
|
+
if (source[1] === "<") {
|
|
1930
|
+
const verbatim = source.slice(2, -1);
|
|
1931
|
+
if (verbatim === "!" || verbatim === "!!") {
|
|
1932
|
+
onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);
|
|
1933
|
+
return null;
|
|
1934
|
+
}
|
|
1935
|
+
if (source[source.length - 1] !== ">")
|
|
1936
|
+
onError("Verbatim tags must end with a >");
|
|
1937
|
+
return verbatim;
|
|
1938
|
+
}
|
|
1939
|
+
const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s);
|
|
1940
|
+
if (!suffix)
|
|
1941
|
+
onError(`The ${source} tag has no suffix`);
|
|
1942
|
+
const prefix = this.tags[handle];
|
|
1943
|
+
if (prefix) {
|
|
1944
|
+
try {
|
|
1945
|
+
return prefix + decodeURIComponent(suffix);
|
|
1946
|
+
} catch (error) {
|
|
1947
|
+
onError(String(error));
|
|
1948
|
+
return null;
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
if (handle === "!")
|
|
1952
|
+
return source;
|
|
1953
|
+
onError(`Could not resolve tag: ${source}`);
|
|
1954
|
+
return null;
|
|
1955
|
+
}
|
|
1956
|
+
/**
|
|
1957
|
+
* Given a fully resolved tag, returns its printable string form,
|
|
1958
|
+
* taking into account current tag prefixes and defaults.
|
|
1959
|
+
*/
|
|
1960
|
+
tagString(tag) {
|
|
1961
|
+
for (const [handle, prefix] of Object.entries(this.tags)) {
|
|
1962
|
+
if (tag.startsWith(prefix))
|
|
1963
|
+
return handle + escapeTagName(tag.substring(prefix.length));
|
|
1964
|
+
}
|
|
1965
|
+
return tag[0] === "!" ? tag : `!<${tag}>`;
|
|
1966
|
+
}
|
|
1967
|
+
toString(doc) {
|
|
1968
|
+
const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [];
|
|
1969
|
+
const tagEntries = Object.entries(this.tags);
|
|
1970
|
+
let tagNames;
|
|
1971
|
+
if (doc && tagEntries.length > 0 && isNode(doc.contents)) {
|
|
1972
|
+
const tags = {};
|
|
1973
|
+
visit(doc.contents, (_key, node) => {
|
|
1974
|
+
if (isNode(node) && node.tag)
|
|
1975
|
+
tags[node.tag] = true;
|
|
1976
|
+
});
|
|
1977
|
+
tagNames = Object.keys(tags);
|
|
1978
|
+
} else
|
|
1979
|
+
tagNames = [];
|
|
1980
|
+
for (const [handle, prefix] of tagEntries) {
|
|
1981
|
+
if (handle === "!!" && prefix === "tag:yaml.org,2002:")
|
|
1982
|
+
continue;
|
|
1983
|
+
if (!doc || tagNames.some((tn) => tn.startsWith(prefix)))
|
|
1984
|
+
lines.push(`%TAG ${handle} ${prefix}`);
|
|
1985
|
+
}
|
|
1986
|
+
return lines.join("\n");
|
|
1987
|
+
}
|
|
1988
|
+
};
|
|
1989
|
+
Directives.defaultYaml = { explicit: false, version: "1.2" };
|
|
1990
|
+
Directives.defaultTags = { "!!": "tag:yaml.org,2002:" };
|
|
1991
|
+
|
|
1992
|
+
// node_modules/yaml/browser/dist/doc/anchors.js
|
|
1993
|
+
function anchorIsValid(anchor) {
|
|
1994
|
+
if (/[\x00-\x19\s,[\]{}]/.test(anchor)) {
|
|
1995
|
+
const sa = JSON.stringify(anchor);
|
|
1996
|
+
const msg = `Anchor must not contain whitespace or control characters: ${sa}`;
|
|
1997
|
+
throw new Error(msg);
|
|
1998
|
+
}
|
|
1999
|
+
return true;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
// node_modules/yaml/browser/dist/doc/applyReviver.js
|
|
2003
|
+
function applyReviver(reviver, obj, key, val) {
|
|
2004
|
+
if (val && typeof val === "object") {
|
|
2005
|
+
if (Array.isArray(val)) {
|
|
2006
|
+
for (let i = 0, len = val.length; i < len; ++i) {
|
|
2007
|
+
const v0 = val[i];
|
|
2008
|
+
const v1 = applyReviver(reviver, val, String(i), v0);
|
|
2009
|
+
if (v1 === void 0)
|
|
2010
|
+
delete val[i];
|
|
2011
|
+
else if (v1 !== v0)
|
|
2012
|
+
val[i] = v1;
|
|
2013
|
+
}
|
|
2014
|
+
} else if (val instanceof Map) {
|
|
2015
|
+
for (const k of Array.from(val.keys())) {
|
|
2016
|
+
const v0 = val.get(k);
|
|
2017
|
+
const v1 = applyReviver(reviver, val, k, v0);
|
|
2018
|
+
if (v1 === void 0)
|
|
2019
|
+
val.delete(k);
|
|
2020
|
+
else if (v1 !== v0)
|
|
2021
|
+
val.set(k, v1);
|
|
2022
|
+
}
|
|
2023
|
+
} else if (val instanceof Set) {
|
|
2024
|
+
for (const v0 of Array.from(val)) {
|
|
2025
|
+
const v1 = applyReviver(reviver, val, v0, v0);
|
|
2026
|
+
if (v1 === void 0)
|
|
2027
|
+
val.delete(v0);
|
|
2028
|
+
else if (v1 !== v0) {
|
|
2029
|
+
val.delete(v0);
|
|
2030
|
+
val.add(v1);
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
} else {
|
|
2034
|
+
for (const [k, v0] of Object.entries(val)) {
|
|
2035
|
+
const v1 = applyReviver(reviver, val, k, v0);
|
|
2036
|
+
if (v1 === void 0)
|
|
2037
|
+
delete val[k];
|
|
2038
|
+
else if (v1 !== v0)
|
|
2039
|
+
val[k] = v1;
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
return reviver.call(obj, key, val);
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
// node_modules/yaml/browser/dist/nodes/toJS.js
|
|
2047
|
+
function toJS(value, arg, ctx) {
|
|
2048
|
+
if (Array.isArray(value))
|
|
2049
|
+
return value.map((v, i) => toJS(v, String(i), ctx));
|
|
2050
|
+
if (value && typeof value.toJSON === "function") {
|
|
2051
|
+
if (!ctx || !hasAnchor(value))
|
|
2052
|
+
return value.toJSON(arg, ctx);
|
|
2053
|
+
const data = { aliasCount: 0, count: 1, res: void 0 };
|
|
2054
|
+
ctx.anchors.set(value, data);
|
|
2055
|
+
ctx.onCreate = (res2) => {
|
|
2056
|
+
data.res = res2;
|
|
2057
|
+
delete ctx.onCreate;
|
|
2058
|
+
};
|
|
2059
|
+
const res = value.toJSON(arg, ctx);
|
|
2060
|
+
if (ctx.onCreate)
|
|
2061
|
+
ctx.onCreate(res);
|
|
2062
|
+
return res;
|
|
2063
|
+
}
|
|
2064
|
+
if (typeof value === "bigint" && !ctx?.keep)
|
|
2065
|
+
return Number(value);
|
|
2066
|
+
return value;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
// node_modules/yaml/browser/dist/nodes/Node.js
|
|
2070
|
+
var NodeBase = class {
|
|
2071
|
+
constructor(type) {
|
|
2072
|
+
Object.defineProperty(this, NODE_TYPE, { value: type });
|
|
2073
|
+
}
|
|
2074
|
+
/** Create a copy of this node. */
|
|
2075
|
+
clone() {
|
|
2076
|
+
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
2077
|
+
if (this.range)
|
|
2078
|
+
copy.range = this.range.slice();
|
|
2079
|
+
return copy;
|
|
2080
|
+
}
|
|
2081
|
+
/** A plain JavaScript representation of this node. */
|
|
2082
|
+
toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
|
|
2083
|
+
if (!isDocument(doc))
|
|
2084
|
+
throw new TypeError("A document argument is required");
|
|
2085
|
+
const ctx = {
|
|
2086
|
+
anchors: /* @__PURE__ */ new Map(),
|
|
2087
|
+
doc,
|
|
2088
|
+
keep: true,
|
|
2089
|
+
mapAsMap: mapAsMap === true,
|
|
2090
|
+
mapKeyWarned: false,
|
|
2091
|
+
maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100
|
|
2092
|
+
};
|
|
2093
|
+
const res = toJS(this, "", ctx);
|
|
2094
|
+
if (typeof onAnchor === "function")
|
|
2095
|
+
for (const { count, res: res2 } of ctx.anchors.values())
|
|
2096
|
+
onAnchor(res2, count);
|
|
2097
|
+
return typeof reviver === "function" ? applyReviver(reviver, { "": res }, "", res) : res;
|
|
2098
|
+
}
|
|
2099
|
+
};
|
|
2100
|
+
|
|
2101
|
+
// node_modules/yaml/browser/dist/nodes/Alias.js
|
|
2102
|
+
var Alias = class extends NodeBase {
|
|
2103
|
+
constructor(source) {
|
|
2104
|
+
super(ALIAS);
|
|
2105
|
+
this.source = source;
|
|
2106
|
+
Object.defineProperty(this, "tag", {
|
|
2107
|
+
set() {
|
|
2108
|
+
throw new Error("Alias nodes cannot have tags");
|
|
2109
|
+
}
|
|
2110
|
+
});
|
|
2111
|
+
}
|
|
2112
|
+
/**
|
|
2113
|
+
* Resolve the value of this alias within `doc`, finding the last
|
|
2114
|
+
* instance of the `source` anchor before this node.
|
|
2115
|
+
*/
|
|
2116
|
+
resolve(doc, ctx) {
|
|
2117
|
+
if (ctx?.maxAliasCount === 0)
|
|
2118
|
+
throw new ReferenceError("Alias resolution is disabled");
|
|
2119
|
+
let nodes;
|
|
2120
|
+
if (ctx?.aliasResolveCache) {
|
|
2121
|
+
nodes = ctx.aliasResolveCache;
|
|
2122
|
+
} else {
|
|
2123
|
+
nodes = [];
|
|
2124
|
+
visit(doc, {
|
|
2125
|
+
Node: (_key, node) => {
|
|
2126
|
+
if (isAlias(node) || hasAnchor(node))
|
|
2127
|
+
nodes.push(node);
|
|
2128
|
+
}
|
|
2129
|
+
});
|
|
2130
|
+
if (ctx)
|
|
2131
|
+
ctx.aliasResolveCache = nodes;
|
|
2132
|
+
}
|
|
2133
|
+
let found = void 0;
|
|
2134
|
+
for (const node of nodes) {
|
|
2135
|
+
if (node === this)
|
|
2136
|
+
break;
|
|
2137
|
+
if (node.anchor === this.source)
|
|
2138
|
+
found = node;
|
|
2139
|
+
}
|
|
2140
|
+
if (found && ctx) {
|
|
2141
|
+
const { anchors, doc: doc2, maxAliasCount } = ctx;
|
|
2142
|
+
let data = anchors.get(found);
|
|
2143
|
+
if (!data) {
|
|
2144
|
+
toJS(found, null, ctx);
|
|
2145
|
+
data = anchors.get(found);
|
|
2146
|
+
}
|
|
2147
|
+
if (data?.res === void 0) {
|
|
2148
|
+
const msg = "This should not happen: Alias anchor was not resolved?";
|
|
2149
|
+
throw new ReferenceError(msg);
|
|
2150
|
+
}
|
|
2151
|
+
if (maxAliasCount >= 0) {
|
|
2152
|
+
data.count += 1;
|
|
2153
|
+
if (data.aliasCount === 0)
|
|
2154
|
+
data.aliasCount = getAliasCount(doc2, found, anchors);
|
|
2155
|
+
if (data.count * data.aliasCount > maxAliasCount) {
|
|
2156
|
+
const msg = "Excessive alias count indicates a resource exhaustion attack";
|
|
2157
|
+
throw new ReferenceError(msg);
|
|
2158
|
+
}
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
return found;
|
|
2162
|
+
}
|
|
2163
|
+
toJSON(_arg, ctx) {
|
|
2164
|
+
if (!ctx)
|
|
2165
|
+
return { source: this.source };
|
|
2166
|
+
const source = this.resolve(ctx.doc, ctx);
|
|
2167
|
+
if (!source) {
|
|
2168
|
+
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
2169
|
+
throw new ReferenceError(msg);
|
|
2170
|
+
}
|
|
2171
|
+
return ctx.anchors.get(source).res;
|
|
2172
|
+
}
|
|
2173
|
+
toString(ctx, _onComment, _onChompKeep) {
|
|
2174
|
+
const src = `*${this.source}`;
|
|
2175
|
+
if (ctx) {
|
|
2176
|
+
anchorIsValid(this.source);
|
|
2177
|
+
if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {
|
|
2178
|
+
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
2179
|
+
throw new Error(msg);
|
|
2180
|
+
}
|
|
2181
|
+
if (ctx.implicitKey)
|
|
2182
|
+
return `${src} `;
|
|
2183
|
+
}
|
|
2184
|
+
return src;
|
|
2185
|
+
}
|
|
2186
|
+
};
|
|
2187
|
+
function getAliasCount(doc, node, anchors) {
|
|
2188
|
+
if (isAlias(node)) {
|
|
2189
|
+
const source = node.resolve(doc);
|
|
2190
|
+
const anchor = anchors && source && anchors.get(source);
|
|
2191
|
+
return anchor ? anchor.count * anchor.aliasCount : 0;
|
|
2192
|
+
} else if (isCollection(node)) {
|
|
2193
|
+
let count = 0;
|
|
2194
|
+
for (const item of node.items) {
|
|
2195
|
+
const c = getAliasCount(doc, item, anchors);
|
|
2196
|
+
if (c > count)
|
|
2197
|
+
count = c;
|
|
2198
|
+
}
|
|
2199
|
+
return count;
|
|
2200
|
+
} else if (isPair(node)) {
|
|
2201
|
+
const kc = getAliasCount(doc, node.key, anchors);
|
|
2202
|
+
const vc = getAliasCount(doc, node.value, anchors);
|
|
2203
|
+
return Math.max(kc, vc);
|
|
2204
|
+
}
|
|
2205
|
+
return 1;
|
|
2206
|
+
}
|
|
2207
|
+
|
|
2208
|
+
// node_modules/yaml/browser/dist/nodes/Scalar.js
|
|
2209
|
+
var isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object";
|
|
2210
|
+
var Scalar = class extends NodeBase {
|
|
2211
|
+
constructor(value) {
|
|
2212
|
+
super(SCALAR);
|
|
2213
|
+
this.value = value;
|
|
2214
|
+
}
|
|
2215
|
+
toJSON(arg, ctx) {
|
|
2216
|
+
return ctx?.keep ? this.value : toJS(this.value, arg, ctx);
|
|
2217
|
+
}
|
|
2218
|
+
toString() {
|
|
2219
|
+
return String(this.value);
|
|
2220
|
+
}
|
|
2221
|
+
};
|
|
2222
|
+
Scalar.BLOCK_FOLDED = "BLOCK_FOLDED";
|
|
2223
|
+
Scalar.BLOCK_LITERAL = "BLOCK_LITERAL";
|
|
2224
|
+
Scalar.PLAIN = "PLAIN";
|
|
2225
|
+
Scalar.QUOTE_DOUBLE = "QUOTE_DOUBLE";
|
|
2226
|
+
Scalar.QUOTE_SINGLE = "QUOTE_SINGLE";
|
|
2227
|
+
|
|
2228
|
+
// node_modules/yaml/browser/dist/doc/createNode.js
|
|
2229
|
+
var defaultTagPrefix = "tag:yaml.org,2002:";
|
|
2230
|
+
function findTagObject(value, tagName, tags) {
|
|
2231
|
+
if (tagName) {
|
|
2232
|
+
const match = tags.filter((t) => t.tag === tagName);
|
|
2233
|
+
const tagObj = match.find((t) => !t.format) ?? match[0];
|
|
2234
|
+
if (!tagObj)
|
|
2235
|
+
throw new Error(`Tag ${tagName} not found`);
|
|
2236
|
+
return tagObj;
|
|
2237
|
+
}
|
|
2238
|
+
return tags.find((t) => t.identify?.(value) && !t.format);
|
|
2239
|
+
}
|
|
2240
|
+
function createNode(value, tagName, ctx) {
|
|
2241
|
+
if (isDocument(value))
|
|
2242
|
+
value = value.contents;
|
|
2243
|
+
if (isNode(value))
|
|
2244
|
+
return value;
|
|
2245
|
+
if (isPair(value)) {
|
|
2246
|
+
const map2 = ctx.schema[MAP].createNode?.(ctx.schema, null, ctx);
|
|
2247
|
+
map2.items.push(value);
|
|
2248
|
+
return map2;
|
|
2249
|
+
}
|
|
2250
|
+
if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) {
|
|
2251
|
+
value = value.valueOf();
|
|
2252
|
+
}
|
|
2253
|
+
const { aliasDuplicateObjects, onAnchor, onTagObj, schema: schema4, sourceObjects } = ctx;
|
|
2254
|
+
let ref = void 0;
|
|
2255
|
+
if (aliasDuplicateObjects && value && typeof value === "object") {
|
|
2256
|
+
ref = sourceObjects.get(value);
|
|
2257
|
+
if (ref) {
|
|
2258
|
+
ref.anchor ?? (ref.anchor = onAnchor(value));
|
|
2259
|
+
return new Alias(ref.anchor);
|
|
2260
|
+
} else {
|
|
2261
|
+
ref = { anchor: null, node: null };
|
|
2262
|
+
sourceObjects.set(value, ref);
|
|
2263
|
+
}
|
|
2264
|
+
}
|
|
2265
|
+
if (tagName?.startsWith("!!"))
|
|
2266
|
+
tagName = defaultTagPrefix + tagName.slice(2);
|
|
2267
|
+
let tagObj = findTagObject(value, tagName, schema4.tags);
|
|
2268
|
+
if (!tagObj) {
|
|
2269
|
+
if (value && typeof value.toJSON === "function") {
|
|
2270
|
+
value = value.toJSON();
|
|
2271
|
+
}
|
|
2272
|
+
if (!value || typeof value !== "object") {
|
|
2273
|
+
const node2 = new Scalar(value);
|
|
2274
|
+
if (ref)
|
|
2275
|
+
ref.node = node2;
|
|
2276
|
+
return node2;
|
|
2277
|
+
}
|
|
2278
|
+
tagObj = value instanceof Map ? schema4[MAP] : Symbol.iterator in Object(value) ? schema4[SEQ] : schema4[MAP];
|
|
2279
|
+
}
|
|
2280
|
+
if (onTagObj) {
|
|
2281
|
+
onTagObj(tagObj);
|
|
2282
|
+
delete ctx.onTagObj;
|
|
2283
|
+
}
|
|
2284
|
+
const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar(value);
|
|
2285
|
+
if (tagName)
|
|
2286
|
+
node.tag = tagName;
|
|
2287
|
+
else if (!tagObj.default)
|
|
2288
|
+
node.tag = tagObj.tag;
|
|
2289
|
+
if (ref)
|
|
2290
|
+
ref.node = node;
|
|
2291
|
+
return node;
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
// node_modules/yaml/browser/dist/nodes/Collection.js
|
|
2295
|
+
function collectionFromPath(schema4, path, value) {
|
|
2296
|
+
let v = value;
|
|
2297
|
+
for (let i = path.length - 1; i >= 0; --i) {
|
|
2298
|
+
const k = path[i];
|
|
2299
|
+
if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
|
|
2300
|
+
const a = [];
|
|
2301
|
+
a[k] = v;
|
|
2302
|
+
v = a;
|
|
2303
|
+
} else {
|
|
2304
|
+
v = /* @__PURE__ */ new Map([[k, v]]);
|
|
2305
|
+
}
|
|
2306
|
+
}
|
|
2307
|
+
return createNode(v, void 0, {
|
|
2308
|
+
aliasDuplicateObjects: false,
|
|
2309
|
+
keepUndefined: false,
|
|
2310
|
+
onAnchor: () => {
|
|
2311
|
+
throw new Error("This should not happen, please report a bug.");
|
|
2312
|
+
},
|
|
2313
|
+
schema: schema4,
|
|
2314
|
+
sourceObjects: /* @__PURE__ */ new Map()
|
|
2315
|
+
});
|
|
2316
|
+
}
|
|
2317
|
+
var isEmptyPath = (path) => path == null || typeof path === "object" && !!path[Symbol.iterator]().next().done;
|
|
2318
|
+
var Collection = class extends NodeBase {
|
|
2319
|
+
constructor(type, schema4) {
|
|
2320
|
+
super(type);
|
|
2321
|
+
Object.defineProperty(this, "schema", {
|
|
2322
|
+
value: schema4,
|
|
2323
|
+
configurable: true,
|
|
2324
|
+
enumerable: false,
|
|
2325
|
+
writable: true
|
|
2326
|
+
});
|
|
2327
|
+
}
|
|
2328
|
+
/**
|
|
2329
|
+
* Create a copy of this collection.
|
|
2330
|
+
*
|
|
2331
|
+
* @param schema - If defined, overwrites the original's schema
|
|
2332
|
+
*/
|
|
2333
|
+
clone(schema4) {
|
|
2334
|
+
const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
|
|
2335
|
+
if (schema4)
|
|
2336
|
+
copy.schema = schema4;
|
|
2337
|
+
copy.items = copy.items.map((it) => isNode(it) || isPair(it) ? it.clone(schema4) : it);
|
|
2338
|
+
if (this.range)
|
|
2339
|
+
copy.range = this.range.slice();
|
|
2340
|
+
return copy;
|
|
2341
|
+
}
|
|
2342
|
+
/**
|
|
2343
|
+
* Adds a value to the collection. For `!!map` and `!!omap` the value must
|
|
2344
|
+
* be a Pair instance or a `{ key, value }` object, which may not have a key
|
|
2345
|
+
* that already exists in the map.
|
|
2346
|
+
*/
|
|
2347
|
+
addIn(path, value) {
|
|
2348
|
+
if (isEmptyPath(path))
|
|
2349
|
+
this.add(value);
|
|
2350
|
+
else {
|
|
2351
|
+
const [key, ...rest] = path;
|
|
2352
|
+
const node = this.get(key, true);
|
|
2353
|
+
if (isCollection(node))
|
|
2354
|
+
node.addIn(rest, value);
|
|
2355
|
+
else if (node === void 0 && this.schema)
|
|
2356
|
+
this.set(key, collectionFromPath(this.schema, rest, value));
|
|
2357
|
+
else
|
|
2358
|
+
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
/**
|
|
2362
|
+
* Removes a value from the collection.
|
|
2363
|
+
* @returns `true` if the item was found and removed.
|
|
2364
|
+
*/
|
|
2365
|
+
deleteIn(path) {
|
|
2366
|
+
const [key, ...rest] = path;
|
|
2367
|
+
if (rest.length === 0)
|
|
2368
|
+
return this.delete(key);
|
|
2369
|
+
const node = this.get(key, true);
|
|
2370
|
+
if (isCollection(node))
|
|
2371
|
+
return node.deleteIn(rest);
|
|
2372
|
+
else
|
|
2373
|
+
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
2374
|
+
}
|
|
2375
|
+
/**
|
|
2376
|
+
* Returns item at `key`, or `undefined` if not found. By default unwraps
|
|
2377
|
+
* scalar values from their surrounding node; to disable set `keepScalar` to
|
|
2378
|
+
* `true` (collections are always returned intact).
|
|
2379
|
+
*/
|
|
2380
|
+
getIn(path, keepScalar) {
|
|
2381
|
+
const [key, ...rest] = path;
|
|
2382
|
+
const node = this.get(key, true);
|
|
2383
|
+
if (rest.length === 0)
|
|
2384
|
+
return !keepScalar && isScalar(node) ? node.value : node;
|
|
2385
|
+
else
|
|
2386
|
+
return isCollection(node) ? node.getIn(rest, keepScalar) : void 0;
|
|
2387
|
+
}
|
|
2388
|
+
hasAllNullValues(allowScalar) {
|
|
2389
|
+
return this.items.every((node) => {
|
|
2390
|
+
if (!isPair(node))
|
|
2391
|
+
return false;
|
|
2392
|
+
const n = node.value;
|
|
2393
|
+
return n == null || allowScalar && isScalar(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
|
|
2394
|
+
});
|
|
2395
|
+
}
|
|
2396
|
+
/**
|
|
2397
|
+
* Checks if the collection includes a value with the key `key`.
|
|
2398
|
+
*/
|
|
2399
|
+
hasIn(path) {
|
|
2400
|
+
const [key, ...rest] = path;
|
|
2401
|
+
if (rest.length === 0)
|
|
2402
|
+
return this.has(key);
|
|
2403
|
+
const node = this.get(key, true);
|
|
2404
|
+
return isCollection(node) ? node.hasIn(rest) : false;
|
|
2405
|
+
}
|
|
2406
|
+
/**
|
|
2407
|
+
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
2408
|
+
* boolean to add/remove the item from the set.
|
|
2409
|
+
*/
|
|
2410
|
+
setIn(path, value) {
|
|
2411
|
+
const [key, ...rest] = path;
|
|
2412
|
+
if (rest.length === 0) {
|
|
2413
|
+
this.set(key, value);
|
|
2414
|
+
} else {
|
|
2415
|
+
const node = this.get(key, true);
|
|
2416
|
+
if (isCollection(node))
|
|
2417
|
+
node.setIn(rest, value);
|
|
2418
|
+
else if (node === void 0 && this.schema)
|
|
2419
|
+
this.set(key, collectionFromPath(this.schema, rest, value));
|
|
2420
|
+
else
|
|
2421
|
+
throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);
|
|
2422
|
+
}
|
|
2423
|
+
}
|
|
2424
|
+
};
|
|
2425
|
+
|
|
2426
|
+
// node_modules/yaml/browser/dist/stringify/stringifyComment.js
|
|
2427
|
+
var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
|
|
2428
|
+
function indentComment(comment, indent) {
|
|
2429
|
+
if (/^\n+$/.test(comment))
|
|
2430
|
+
return comment.substring(1);
|
|
2431
|
+
return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;
|
|
2432
|
+
}
|
|
2433
|
+
var lineComment = (str, indent, comment) => str.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str.endsWith(" ") ? "" : " ") + comment;
|
|
2434
|
+
|
|
2435
|
+
// node_modules/yaml/browser/dist/stringify/foldFlowLines.js
|
|
2436
|
+
var FOLD_FLOW = "flow";
|
|
2437
|
+
var FOLD_BLOCK = "block";
|
|
2438
|
+
var FOLD_QUOTED = "quoted";
|
|
2439
|
+
function foldFlowLines(text, indent, mode = "flow", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {
|
|
2440
|
+
if (!lineWidth || lineWidth < 0)
|
|
2441
|
+
return text;
|
|
2442
|
+
if (lineWidth < minContentWidth)
|
|
2443
|
+
minContentWidth = 0;
|
|
2444
|
+
const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);
|
|
2445
|
+
if (text.length <= endStep)
|
|
2446
|
+
return text;
|
|
2447
|
+
const folds = [];
|
|
2448
|
+
const escapedFolds = {};
|
|
2449
|
+
let end = lineWidth - indent.length;
|
|
2450
|
+
if (typeof indentAtStart === "number") {
|
|
2451
|
+
if (indentAtStart > lineWidth - Math.max(2, minContentWidth))
|
|
2452
|
+
folds.push(0);
|
|
2453
|
+
else
|
|
2454
|
+
end = lineWidth - indentAtStart;
|
|
2455
|
+
}
|
|
2456
|
+
let split = void 0;
|
|
2457
|
+
let prev = void 0;
|
|
2458
|
+
let overflow = false;
|
|
2459
|
+
let i = -1;
|
|
2460
|
+
let escStart = -1;
|
|
2461
|
+
let escEnd = -1;
|
|
2462
|
+
if (mode === FOLD_BLOCK) {
|
|
2463
|
+
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
2464
|
+
if (i !== -1)
|
|
2465
|
+
end = i + endStep;
|
|
2466
|
+
}
|
|
2467
|
+
for (let ch; ch = text[i += 1]; ) {
|
|
2468
|
+
if (mode === FOLD_QUOTED && ch === "\\") {
|
|
2469
|
+
escStart = i;
|
|
2470
|
+
switch (text[i + 1]) {
|
|
2471
|
+
case "x":
|
|
2472
|
+
i += 3;
|
|
2473
|
+
break;
|
|
2474
|
+
case "u":
|
|
2475
|
+
i += 5;
|
|
2476
|
+
break;
|
|
2477
|
+
case "U":
|
|
2478
|
+
i += 9;
|
|
2479
|
+
break;
|
|
2480
|
+
default:
|
|
2481
|
+
i += 1;
|
|
2482
|
+
}
|
|
2483
|
+
escEnd = i;
|
|
2484
|
+
}
|
|
2485
|
+
if (ch === "\n") {
|
|
2486
|
+
if (mode === FOLD_BLOCK)
|
|
2487
|
+
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
2488
|
+
end = i + indent.length + endStep;
|
|
2489
|
+
split = void 0;
|
|
2490
|
+
} else {
|
|
2491
|
+
if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") {
|
|
2492
|
+
const next = text[i + 1];
|
|
2493
|
+
if (next && next !== " " && next !== "\n" && next !== " ")
|
|
2494
|
+
split = i;
|
|
2495
|
+
}
|
|
2496
|
+
if (i >= end) {
|
|
2497
|
+
if (split) {
|
|
2498
|
+
folds.push(split);
|
|
2499
|
+
end = split + endStep;
|
|
2500
|
+
split = void 0;
|
|
2501
|
+
} else if (mode === FOLD_QUOTED) {
|
|
2502
|
+
while (prev === " " || prev === " ") {
|
|
2503
|
+
prev = ch;
|
|
2504
|
+
ch = text[i += 1];
|
|
2505
|
+
overflow = true;
|
|
2506
|
+
}
|
|
2507
|
+
const j = i > escEnd + 1 ? i - 2 : escStart - 1;
|
|
2508
|
+
if (escapedFolds[j])
|
|
2509
|
+
return text;
|
|
2510
|
+
folds.push(j);
|
|
2511
|
+
escapedFolds[j] = true;
|
|
2512
|
+
end = j + endStep;
|
|
2513
|
+
split = void 0;
|
|
2514
|
+
} else {
|
|
2515
|
+
overflow = true;
|
|
2516
|
+
}
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
prev = ch;
|
|
2520
|
+
}
|
|
2521
|
+
if (overflow && onOverflow)
|
|
2522
|
+
onOverflow();
|
|
2523
|
+
if (folds.length === 0)
|
|
2524
|
+
return text;
|
|
2525
|
+
if (onFold)
|
|
2526
|
+
onFold();
|
|
2527
|
+
let res = text.slice(0, folds[0]);
|
|
2528
|
+
for (let i2 = 0; i2 < folds.length; ++i2) {
|
|
2529
|
+
const fold = folds[i2];
|
|
2530
|
+
const end2 = folds[i2 + 1] || text.length;
|
|
2531
|
+
if (fold === 0)
|
|
2532
|
+
res = `
|
|
2533
|
+
${indent}${text.slice(0, end2)}`;
|
|
2534
|
+
else {
|
|
2535
|
+
if (mode === FOLD_QUOTED && escapedFolds[fold])
|
|
2536
|
+
res += `${text[fold]}\\`;
|
|
2537
|
+
res += `
|
|
2538
|
+
${indent}${text.slice(fold + 1, end2)}`;
|
|
2539
|
+
}
|
|
2540
|
+
}
|
|
2541
|
+
return res;
|
|
2542
|
+
}
|
|
2543
|
+
function consumeMoreIndentedLines(text, i, indent) {
|
|
2544
|
+
let end = i;
|
|
2545
|
+
let start = i + 1;
|
|
2546
|
+
let ch = text[start];
|
|
2547
|
+
while (ch === " " || ch === " ") {
|
|
2548
|
+
if (i < start + indent) {
|
|
2549
|
+
ch = text[++i];
|
|
2550
|
+
} else {
|
|
2551
|
+
do {
|
|
2552
|
+
ch = text[++i];
|
|
2553
|
+
} while (ch && ch !== "\n");
|
|
2554
|
+
end = i;
|
|
2555
|
+
start = i + 1;
|
|
2556
|
+
ch = text[start];
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
return end;
|
|
2560
|
+
}
|
|
2561
|
+
|
|
2562
|
+
// node_modules/yaml/browser/dist/stringify/stringifyString.js
|
|
2563
|
+
var getFoldOptions = (ctx, isBlock) => ({
|
|
2564
|
+
indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,
|
|
2565
|
+
lineWidth: ctx.options.lineWidth,
|
|
2566
|
+
minContentWidth: ctx.options.minContentWidth
|
|
2567
|
+
});
|
|
2568
|
+
var containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str);
|
|
2569
|
+
function lineLengthOverLimit(str, lineWidth, indentLength) {
|
|
2570
|
+
if (!lineWidth || lineWidth < 0)
|
|
2571
|
+
return false;
|
|
2572
|
+
const limit = lineWidth - indentLength;
|
|
2573
|
+
const strLen = str.length;
|
|
2574
|
+
if (strLen <= limit)
|
|
2575
|
+
return false;
|
|
2576
|
+
for (let i = 0, start = 0; i < strLen; ++i) {
|
|
2577
|
+
if (str[i] === "\n") {
|
|
2578
|
+
if (i - start > limit)
|
|
2579
|
+
return true;
|
|
2580
|
+
start = i + 1;
|
|
2581
|
+
if (strLen - start <= limit)
|
|
2582
|
+
return false;
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2585
|
+
return true;
|
|
2586
|
+
}
|
|
2587
|
+
function doubleQuotedString(value, ctx) {
|
|
2588
|
+
const json = JSON.stringify(value);
|
|
2589
|
+
if (ctx.options.doubleQuotedAsJSON)
|
|
2590
|
+
return json;
|
|
2591
|
+
const { implicitKey } = ctx;
|
|
2592
|
+
const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;
|
|
2593
|
+
const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
|
|
2594
|
+
let str = "";
|
|
2595
|
+
let start = 0;
|
|
2596
|
+
for (let i = 0, ch = json[i]; ch; ch = json[++i]) {
|
|
2597
|
+
if (ch === " " && json[i + 1] === "\\" && json[i + 2] === "n") {
|
|
2598
|
+
str += json.slice(start, i) + "\\ ";
|
|
2599
|
+
i += 1;
|
|
2600
|
+
start = i;
|
|
2601
|
+
ch = "\\";
|
|
2602
|
+
}
|
|
2603
|
+
if (ch === "\\")
|
|
2604
|
+
switch (json[i + 1]) {
|
|
2605
|
+
case "u":
|
|
2606
|
+
{
|
|
2607
|
+
str += json.slice(start, i);
|
|
2608
|
+
const code = json.substr(i + 2, 4);
|
|
2609
|
+
switch (code) {
|
|
2610
|
+
case "0000":
|
|
2611
|
+
str += "\\0";
|
|
2612
|
+
break;
|
|
2613
|
+
case "0007":
|
|
2614
|
+
str += "\\a";
|
|
2615
|
+
break;
|
|
2616
|
+
case "000b":
|
|
2617
|
+
str += "\\v";
|
|
2618
|
+
break;
|
|
2619
|
+
case "001b":
|
|
2620
|
+
str += "\\e";
|
|
2621
|
+
break;
|
|
2622
|
+
case "0085":
|
|
2623
|
+
str += "\\N";
|
|
2624
|
+
break;
|
|
2625
|
+
case "00a0":
|
|
2626
|
+
str += "\\_";
|
|
2627
|
+
break;
|
|
2628
|
+
case "2028":
|
|
2629
|
+
str += "\\L";
|
|
2630
|
+
break;
|
|
2631
|
+
case "2029":
|
|
2632
|
+
str += "\\P";
|
|
2633
|
+
break;
|
|
2634
|
+
default:
|
|
2635
|
+
if (code.substr(0, 2) === "00")
|
|
2636
|
+
str += "\\x" + code.substr(2);
|
|
2637
|
+
else
|
|
2638
|
+
str += json.substr(i, 6);
|
|
2639
|
+
}
|
|
2640
|
+
i += 5;
|
|
2641
|
+
start = i + 1;
|
|
2642
|
+
}
|
|
2643
|
+
break;
|
|
2644
|
+
case "n":
|
|
2645
|
+
if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) {
|
|
2646
|
+
i += 1;
|
|
2647
|
+
} else {
|
|
2648
|
+
str += json.slice(start, i) + "\n\n";
|
|
2649
|
+
while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') {
|
|
2650
|
+
str += "\n";
|
|
2651
|
+
i += 2;
|
|
2652
|
+
}
|
|
2653
|
+
str += indent;
|
|
2654
|
+
if (json[i + 2] === " ")
|
|
2655
|
+
str += "\\";
|
|
2656
|
+
i += 1;
|
|
2657
|
+
start = i + 1;
|
|
2658
|
+
}
|
|
2659
|
+
break;
|
|
2660
|
+
default:
|
|
2661
|
+
i += 1;
|
|
2662
|
+
}
|
|
2663
|
+
}
|
|
2664
|
+
str = start ? str + json.slice(start) : json;
|
|
2665
|
+
return implicitKey ? str : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx, false));
|
|
2666
|
+
}
|
|
2667
|
+
function singleQuotedString(value, ctx) {
|
|
2668
|
+
if (ctx.options.singleQuote === false || ctx.implicitKey && value.includes("\n") || /[ \t]\n|\n[ \t]/.test(value))
|
|
2669
|
+
return doubleQuotedString(value, ctx);
|
|
2670
|
+
const indent = ctx.indent || (containsDocumentMarker(value) ? " " : "");
|
|
2671
|
+
const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$&
|
|
2672
|
+
${indent}`) + "'";
|
|
2673
|
+
return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx, false));
|
|
2674
|
+
}
|
|
2675
|
+
function quotedString(value, ctx) {
|
|
2676
|
+
const { singleQuote } = ctx.options;
|
|
2677
|
+
let qs;
|
|
2678
|
+
if (singleQuote === false)
|
|
2679
|
+
qs = doubleQuotedString;
|
|
2680
|
+
else {
|
|
2681
|
+
const hasDouble = value.includes('"');
|
|
2682
|
+
const hasSingle = value.includes("'");
|
|
2683
|
+
if (hasDouble && !hasSingle)
|
|
2684
|
+
qs = singleQuotedString;
|
|
2685
|
+
else if (hasSingle && !hasDouble)
|
|
2686
|
+
qs = doubleQuotedString;
|
|
2687
|
+
else
|
|
2688
|
+
qs = singleQuote ? singleQuotedString : doubleQuotedString;
|
|
2689
|
+
}
|
|
2690
|
+
return qs(value, ctx);
|
|
2691
|
+
}
|
|
2692
|
+
var blockEndNewlines;
|
|
2693
|
+
try {
|
|
2694
|
+
blockEndNewlines = new RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
|
|
2695
|
+
} catch {
|
|
2696
|
+
blockEndNewlines = /\n+(?!\n|$)/g;
|
|
2697
|
+
}
|
|
2698
|
+
function blockString({ comment, type, value }, ctx, onComment, onChompKeep) {
|
|
2699
|
+
const { blockQuote, commentString, lineWidth } = ctx.options;
|
|
2700
|
+
if (!blockQuote || /\n[\t ]+$/.test(value)) {
|
|
2701
|
+
return quotedString(value, ctx);
|
|
2702
|
+
}
|
|
2703
|
+
const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : "");
|
|
2704
|
+
const literal = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar.BLOCK_FOLDED ? false : type === Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length);
|
|
2705
|
+
if (!value)
|
|
2706
|
+
return literal ? "|\n" : ">\n";
|
|
2707
|
+
let chomp;
|
|
2708
|
+
let endStart;
|
|
2709
|
+
for (endStart = value.length; endStart > 0; --endStart) {
|
|
2710
|
+
const ch = value[endStart - 1];
|
|
2711
|
+
if (ch !== "\n" && ch !== " " && ch !== " ")
|
|
2712
|
+
break;
|
|
2713
|
+
}
|
|
2714
|
+
let end = value.substring(endStart);
|
|
2715
|
+
const endNlPos = end.indexOf("\n");
|
|
2716
|
+
if (endNlPos === -1) {
|
|
2717
|
+
chomp = "-";
|
|
2718
|
+
} else if (value === end || endNlPos !== end.length - 1) {
|
|
2719
|
+
chomp = "+";
|
|
2720
|
+
if (onChompKeep)
|
|
2721
|
+
onChompKeep();
|
|
2722
|
+
} else {
|
|
2723
|
+
chomp = "";
|
|
2724
|
+
}
|
|
2725
|
+
if (end) {
|
|
2726
|
+
value = value.slice(0, -end.length);
|
|
2727
|
+
if (end[end.length - 1] === "\n")
|
|
2728
|
+
end = end.slice(0, -1);
|
|
2729
|
+
end = end.replace(blockEndNewlines, `$&${indent}`);
|
|
2730
|
+
}
|
|
2731
|
+
let startWithSpace = false;
|
|
2732
|
+
let startEnd;
|
|
2733
|
+
let startNlPos = -1;
|
|
2734
|
+
for (startEnd = 0; startEnd < value.length; ++startEnd) {
|
|
2735
|
+
const ch = value[startEnd];
|
|
2736
|
+
if (ch === " ")
|
|
2737
|
+
startWithSpace = true;
|
|
2738
|
+
else if (ch === "\n")
|
|
2739
|
+
startNlPos = startEnd;
|
|
2740
|
+
else
|
|
2741
|
+
break;
|
|
2742
|
+
}
|
|
2743
|
+
let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd);
|
|
2744
|
+
if (start) {
|
|
2745
|
+
value = value.substring(start.length);
|
|
2746
|
+
start = start.replace(/\n+/g, `$&${indent}`);
|
|
2747
|
+
}
|
|
2748
|
+
const indentSize = indent ? "2" : "1";
|
|
2749
|
+
let header = (startWithSpace ? indentSize : "") + chomp;
|
|
2750
|
+
if (comment) {
|
|
2751
|
+
header += " " + commentString(comment.replace(/ ?[\r\n]+/g, " "));
|
|
2752
|
+
if (onComment)
|
|
2753
|
+
onComment();
|
|
2754
|
+
}
|
|
2755
|
+
if (!literal) {
|
|
2756
|
+
const foldedValue = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`);
|
|
2757
|
+
let literalFallback = false;
|
|
2758
|
+
const foldOptions = getFoldOptions(ctx, true);
|
|
2759
|
+
if (blockQuote !== "folded" && type !== Scalar.BLOCK_FOLDED) {
|
|
2760
|
+
foldOptions.onOverflow = () => {
|
|
2761
|
+
literalFallback = true;
|
|
2762
|
+
};
|
|
2763
|
+
}
|
|
2764
|
+
const body = foldFlowLines(`${start}${foldedValue}${end}`, indent, FOLD_BLOCK, foldOptions);
|
|
2765
|
+
if (!literalFallback)
|
|
2766
|
+
return `>${header}
|
|
2767
|
+
${indent}${body}`;
|
|
2768
|
+
}
|
|
2769
|
+
value = value.replace(/\n+/g, `$&${indent}`);
|
|
2770
|
+
return `|${header}
|
|
2771
|
+
${indent}${start}${value}${end}`;
|
|
2772
|
+
}
|
|
2773
|
+
function plainString(item, ctx, onComment, onChompKeep) {
|
|
2774
|
+
const { type, value } = item;
|
|
2775
|
+
const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;
|
|
2776
|
+
if (implicitKey && value.includes("\n") || inFlow && /[[\]{},]/.test(value)) {
|
|
2777
|
+
return quotedString(value, ctx);
|
|
2778
|
+
}
|
|
2779
|
+
if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) {
|
|
2780
|
+
return implicitKey || inFlow || !value.includes("\n") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);
|
|
2781
|
+
}
|
|
2782
|
+
if (!implicitKey && !inFlow && type !== Scalar.PLAIN && value.includes("\n")) {
|
|
2783
|
+
return blockString(item, ctx, onComment, onChompKeep);
|
|
2784
|
+
}
|
|
2785
|
+
if (containsDocumentMarker(value)) {
|
|
2786
|
+
if (indent === "") {
|
|
2787
|
+
ctx.forceBlockIndent = true;
|
|
2788
|
+
return blockString(item, ctx, onComment, onChompKeep);
|
|
2789
|
+
} else if (implicitKey && indent === indentStep) {
|
|
2790
|
+
return quotedString(value, ctx);
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
const str = value.replace(/\n+/g, `$&
|
|
2794
|
+
${indent}`);
|
|
2795
|
+
if (actualString) {
|
|
2796
|
+
const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str);
|
|
2797
|
+
const { compat, tags } = ctx.doc.schema;
|
|
2798
|
+
if (tags.some(test) || compat?.some(test))
|
|
2799
|
+
return quotedString(value, ctx);
|
|
2800
|
+
}
|
|
2801
|
+
return implicitKey ? str : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx, false));
|
|
2802
|
+
}
|
|
2803
|
+
function stringifyString(item, ctx, onComment, onChompKeep) {
|
|
2804
|
+
const { implicitKey, inFlow } = ctx;
|
|
2805
|
+
const ss = typeof item.value === "string" ? item : Object.assign({}, item, { value: String(item.value) });
|
|
2806
|
+
let { type } = item;
|
|
2807
|
+
if (type !== Scalar.QUOTE_DOUBLE) {
|
|
2808
|
+
if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value))
|
|
2809
|
+
type = Scalar.QUOTE_DOUBLE;
|
|
2810
|
+
}
|
|
2811
|
+
const _stringify = (_type) => {
|
|
2812
|
+
switch (_type) {
|
|
2813
|
+
case Scalar.BLOCK_FOLDED:
|
|
2814
|
+
case Scalar.BLOCK_LITERAL:
|
|
2815
|
+
return implicitKey || inFlow ? quotedString(ss.value, ctx) : blockString(ss, ctx, onComment, onChompKeep);
|
|
2816
|
+
case Scalar.QUOTE_DOUBLE:
|
|
2817
|
+
return doubleQuotedString(ss.value, ctx);
|
|
2818
|
+
case Scalar.QUOTE_SINGLE:
|
|
2819
|
+
return singleQuotedString(ss.value, ctx);
|
|
2820
|
+
case Scalar.PLAIN:
|
|
2821
|
+
return plainString(ss, ctx, onComment, onChompKeep);
|
|
2822
|
+
default:
|
|
2823
|
+
return null;
|
|
2824
|
+
}
|
|
2825
|
+
};
|
|
2826
|
+
let res = _stringify(type);
|
|
2827
|
+
if (res === null) {
|
|
2828
|
+
const { defaultKeyType, defaultStringType } = ctx.options;
|
|
2829
|
+
const t = implicitKey && defaultKeyType || defaultStringType;
|
|
2830
|
+
res = _stringify(t);
|
|
2831
|
+
if (res === null)
|
|
2832
|
+
throw new Error(`Unsupported default string type ${t}`);
|
|
2833
|
+
}
|
|
2834
|
+
return res;
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2837
|
+
// node_modules/yaml/browser/dist/stringify/stringify.js
|
|
2838
|
+
function createStringifyContext(doc, options) {
|
|
2839
|
+
const opt = Object.assign({
|
|
2840
|
+
blockQuote: true,
|
|
2841
|
+
commentString: stringifyComment,
|
|
2842
|
+
defaultKeyType: null,
|
|
2843
|
+
defaultStringType: "PLAIN",
|
|
2844
|
+
directives: null,
|
|
2845
|
+
doubleQuotedAsJSON: false,
|
|
2846
|
+
doubleQuotedMinMultiLineLength: 40,
|
|
2847
|
+
falseStr: "false",
|
|
2848
|
+
flowCollectionPadding: true,
|
|
2849
|
+
indentSeq: true,
|
|
2850
|
+
lineWidth: 80,
|
|
2851
|
+
minContentWidth: 20,
|
|
2852
|
+
nullStr: "null",
|
|
2853
|
+
simpleKeys: false,
|
|
2854
|
+
singleQuote: null,
|
|
2855
|
+
trailingComma: false,
|
|
2856
|
+
trueStr: "true",
|
|
2857
|
+
verifyAliasOrder: true
|
|
2858
|
+
}, doc.schema.toStringOptions, options);
|
|
2859
|
+
let inFlow;
|
|
2860
|
+
switch (opt.collectionStyle) {
|
|
2861
|
+
case "block":
|
|
2862
|
+
inFlow = false;
|
|
2863
|
+
break;
|
|
2864
|
+
case "flow":
|
|
2865
|
+
inFlow = true;
|
|
2866
|
+
break;
|
|
2867
|
+
default:
|
|
2868
|
+
inFlow = null;
|
|
2869
|
+
}
|
|
2870
|
+
return {
|
|
2871
|
+
anchors: /* @__PURE__ */ new Set(),
|
|
2872
|
+
doc,
|
|
2873
|
+
flowCollectionPadding: opt.flowCollectionPadding ? " " : "",
|
|
2874
|
+
indent: "",
|
|
2875
|
+
indentStep: typeof opt.indent === "number" ? " ".repeat(opt.indent) : " ",
|
|
2876
|
+
inFlow,
|
|
2877
|
+
options: opt
|
|
2878
|
+
};
|
|
2879
|
+
}
|
|
2880
|
+
function getTagObject(tags, item) {
|
|
2881
|
+
if (item.tag) {
|
|
2882
|
+
const match = tags.filter((t) => t.tag === item.tag);
|
|
2883
|
+
if (match.length > 0)
|
|
2884
|
+
return match.find((t) => t.format === item.format) ?? match[0];
|
|
2885
|
+
}
|
|
2886
|
+
let tagObj = void 0;
|
|
2887
|
+
let obj;
|
|
2888
|
+
if (isScalar(item)) {
|
|
2889
|
+
obj = item.value;
|
|
2890
|
+
let match = tags.filter((t) => t.identify?.(obj));
|
|
2891
|
+
if (match.length > 1) {
|
|
2892
|
+
const testMatch = match.filter((t) => t.test);
|
|
2893
|
+
if (testMatch.length > 0)
|
|
2894
|
+
match = testMatch;
|
|
2895
|
+
}
|
|
2896
|
+
tagObj = match.find((t) => t.format === item.format) ?? match.find((t) => !t.format);
|
|
2897
|
+
} else {
|
|
2898
|
+
obj = item;
|
|
2899
|
+
tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass);
|
|
2900
|
+
}
|
|
2901
|
+
if (!tagObj) {
|
|
2902
|
+
const name = obj?.constructor?.name ?? (obj === null ? "null" : typeof obj);
|
|
2903
|
+
throw new Error(`Tag not resolved for ${name} value`);
|
|
2904
|
+
}
|
|
2905
|
+
return tagObj;
|
|
2906
|
+
}
|
|
2907
|
+
function stringifyProps(node, tagObj, { anchors, doc }) {
|
|
2908
|
+
if (!doc.directives)
|
|
2909
|
+
return "";
|
|
2910
|
+
const props = [];
|
|
2911
|
+
const anchor = (isScalar(node) || isCollection(node)) && node.anchor;
|
|
2912
|
+
if (anchor && anchorIsValid(anchor)) {
|
|
2913
|
+
anchors.add(anchor);
|
|
2914
|
+
props.push(`&${anchor}`);
|
|
2915
|
+
}
|
|
2916
|
+
const tag = node.tag ?? (tagObj.default ? null : tagObj.tag);
|
|
2917
|
+
if (tag)
|
|
2918
|
+
props.push(doc.directives.tagString(tag));
|
|
2919
|
+
return props.join(" ");
|
|
2920
|
+
}
|
|
2921
|
+
function stringify(item, ctx, onComment, onChompKeep) {
|
|
2922
|
+
if (isPair(item))
|
|
2923
|
+
return item.toString(ctx, onComment, onChompKeep);
|
|
2924
|
+
if (isAlias(item)) {
|
|
2925
|
+
if (ctx.doc.directives)
|
|
2926
|
+
return item.toString(ctx);
|
|
2927
|
+
if (ctx.resolvedAliases?.has(item)) {
|
|
2928
|
+
throw new TypeError(`Cannot stringify circular structure without alias nodes`);
|
|
2929
|
+
} else {
|
|
2930
|
+
if (ctx.resolvedAliases)
|
|
2931
|
+
ctx.resolvedAliases.add(item);
|
|
2932
|
+
else
|
|
2933
|
+
ctx.resolvedAliases = /* @__PURE__ */ new Set([item]);
|
|
2934
|
+
item = item.resolve(ctx.doc);
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2937
|
+
let tagObj = void 0;
|
|
2938
|
+
const node = isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o });
|
|
2939
|
+
tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node));
|
|
2940
|
+
const props = stringifyProps(node, tagObj, ctx);
|
|
2941
|
+
if (props.length > 0)
|
|
2942
|
+
ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;
|
|
2943
|
+
const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : isScalar(node) ? stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep);
|
|
2944
|
+
if (!props)
|
|
2945
|
+
return str;
|
|
2946
|
+
return isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props}
|
|
2947
|
+
${ctx.indent}${str}`;
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
// node_modules/yaml/browser/dist/stringify/stringifyPair.js
|
|
2951
|
+
function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
|
|
2952
|
+
const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
|
|
2953
|
+
let keyComment = isNode(key) && key.comment || null;
|
|
2954
|
+
if (simpleKeys) {
|
|
2955
|
+
if (keyComment) {
|
|
2956
|
+
throw new Error("With simple keys, key nodes cannot have comments");
|
|
2957
|
+
}
|
|
2958
|
+
if (isCollection(key) || !isNode(key) && typeof key === "object") {
|
|
2959
|
+
const msg = "With simple keys, collection cannot be used as a key value";
|
|
2960
|
+
throw new Error(msg);
|
|
2961
|
+
}
|
|
2962
|
+
}
|
|
2963
|
+
let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || isCollection(key) || (isScalar(key) ? key.type === Scalar.BLOCK_FOLDED || key.type === Scalar.BLOCK_LITERAL : typeof key === "object"));
|
|
2964
|
+
ctx = Object.assign({}, ctx, {
|
|
2965
|
+
allNullValues: false,
|
|
2966
|
+
implicitKey: !explicitKey && (simpleKeys || !allNullValues),
|
|
2967
|
+
indent: indent + indentStep
|
|
2968
|
+
});
|
|
2969
|
+
let keyCommentDone = false;
|
|
2970
|
+
let chompKeep = false;
|
|
2971
|
+
let str = stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
|
|
2972
|
+
if (!explicitKey && !ctx.inFlow && str.length > 1024) {
|
|
2973
|
+
if (simpleKeys)
|
|
2974
|
+
throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
|
|
2975
|
+
explicitKey = true;
|
|
2976
|
+
}
|
|
2977
|
+
if (ctx.inFlow) {
|
|
2978
|
+
if (allNullValues || value == null) {
|
|
2979
|
+
if (keyCommentDone && onComment)
|
|
2980
|
+
onComment();
|
|
2981
|
+
return str === "" ? "?" : explicitKey ? `? ${str}` : str;
|
|
2982
|
+
}
|
|
2983
|
+
} else if (allNullValues && !simpleKeys || value == null && explicitKey) {
|
|
2984
|
+
str = `? ${str}`;
|
|
2985
|
+
if (keyComment && !keyCommentDone) {
|
|
2986
|
+
str += lineComment(str, ctx.indent, commentString(keyComment));
|
|
2987
|
+
} else if (chompKeep && onChompKeep)
|
|
2988
|
+
onChompKeep();
|
|
2989
|
+
return str;
|
|
2990
|
+
}
|
|
2991
|
+
if (keyCommentDone)
|
|
2992
|
+
keyComment = null;
|
|
2993
|
+
if (explicitKey) {
|
|
2994
|
+
if (keyComment)
|
|
2995
|
+
str += lineComment(str, ctx.indent, commentString(keyComment));
|
|
2996
|
+
str = `? ${str}
|
|
2997
|
+
${indent}:`;
|
|
2998
|
+
} else {
|
|
2999
|
+
str = `${str}:`;
|
|
3000
|
+
if (keyComment)
|
|
3001
|
+
str += lineComment(str, ctx.indent, commentString(keyComment));
|
|
3002
|
+
}
|
|
3003
|
+
let vsb, vcb, valueComment;
|
|
3004
|
+
if (isNode(value)) {
|
|
3005
|
+
vsb = !!value.spaceBefore;
|
|
3006
|
+
vcb = value.commentBefore;
|
|
3007
|
+
valueComment = value.comment;
|
|
3008
|
+
} else {
|
|
3009
|
+
vsb = false;
|
|
3010
|
+
vcb = null;
|
|
3011
|
+
valueComment = null;
|
|
3012
|
+
if (value && typeof value === "object")
|
|
3013
|
+
value = doc.createNode(value);
|
|
3014
|
+
}
|
|
3015
|
+
ctx.implicitKey = false;
|
|
3016
|
+
if (!explicitKey && !keyComment && isScalar(value))
|
|
3017
|
+
ctx.indentAtStart = str.length + 1;
|
|
3018
|
+
chompKeep = false;
|
|
3019
|
+
if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && isSeq(value) && !value.flow && !value.tag && !value.anchor) {
|
|
3020
|
+
ctx.indent = ctx.indent.substring(2);
|
|
3021
|
+
}
|
|
3022
|
+
let valueCommentDone = false;
|
|
3023
|
+
const valueStr = stringify(value, ctx, () => valueCommentDone = true, () => chompKeep = true);
|
|
3024
|
+
let ws = " ";
|
|
3025
|
+
if (keyComment || vsb || vcb) {
|
|
3026
|
+
ws = vsb ? "\n" : "";
|
|
3027
|
+
if (vcb) {
|
|
3028
|
+
const cs = commentString(vcb);
|
|
3029
|
+
ws += `
|
|
3030
|
+
${indentComment(cs, ctx.indent)}`;
|
|
3031
|
+
}
|
|
3032
|
+
if (valueStr === "" && !ctx.inFlow) {
|
|
3033
|
+
if (ws === "\n" && valueComment)
|
|
3034
|
+
ws = "\n\n";
|
|
3035
|
+
} else {
|
|
3036
|
+
ws += `
|
|
3037
|
+
${ctx.indent}`;
|
|
3038
|
+
}
|
|
3039
|
+
} else if (!explicitKey && isCollection(value)) {
|
|
3040
|
+
const vs0 = valueStr[0];
|
|
3041
|
+
const nl0 = valueStr.indexOf("\n");
|
|
3042
|
+
const hasNewline = nl0 !== -1;
|
|
3043
|
+
const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0;
|
|
3044
|
+
if (hasNewline || !flow) {
|
|
3045
|
+
let hasPropsLine = false;
|
|
3046
|
+
if (hasNewline && (vs0 === "&" || vs0 === "!")) {
|
|
3047
|
+
let sp0 = valueStr.indexOf(" ");
|
|
3048
|
+
if (vs0 === "&" && sp0 !== -1 && sp0 < nl0 && valueStr[sp0 + 1] === "!") {
|
|
3049
|
+
sp0 = valueStr.indexOf(" ", sp0 + 1);
|
|
3050
|
+
}
|
|
3051
|
+
if (sp0 === -1 || nl0 < sp0)
|
|
3052
|
+
hasPropsLine = true;
|
|
3053
|
+
}
|
|
3054
|
+
if (!hasPropsLine)
|
|
3055
|
+
ws = `
|
|
3056
|
+
${ctx.indent}`;
|
|
3057
|
+
}
|
|
3058
|
+
} else if (valueStr === "" || valueStr[0] === "\n") {
|
|
3059
|
+
ws = "";
|
|
3060
|
+
}
|
|
3061
|
+
str += ws + valueStr;
|
|
3062
|
+
if (ctx.inFlow) {
|
|
3063
|
+
if (valueCommentDone && onComment)
|
|
3064
|
+
onComment();
|
|
3065
|
+
} else if (valueComment && !valueCommentDone) {
|
|
3066
|
+
str += lineComment(str, ctx.indent, commentString(valueComment));
|
|
3067
|
+
} else if (chompKeep && onChompKeep) {
|
|
3068
|
+
onChompKeep();
|
|
3069
|
+
}
|
|
3070
|
+
return str;
|
|
3071
|
+
}
|
|
3072
|
+
|
|
3073
|
+
// node_modules/yaml/browser/dist/log.js
|
|
3074
|
+
function warn(logLevel, warning) {
|
|
3075
|
+
if (logLevel === "debug" || logLevel === "warn") {
|
|
3076
|
+
console.warn(warning);
|
|
3077
|
+
}
|
|
3078
|
+
}
|
|
3079
|
+
|
|
3080
|
+
// node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
|
|
3081
|
+
var MERGE_KEY = "<<";
|
|
3082
|
+
var merge = {
|
|
3083
|
+
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
3084
|
+
default: "key",
|
|
3085
|
+
tag: "tag:yaml.org,2002:merge",
|
|
3086
|
+
test: /^<<$/,
|
|
3087
|
+
resolve: () => Object.assign(new Scalar(Symbol(MERGE_KEY)), {
|
|
3088
|
+
addToJSMap: addMergeToJSMap
|
|
3089
|
+
}),
|
|
3090
|
+
stringify: () => MERGE_KEY
|
|
3091
|
+
};
|
|
3092
|
+
var isMergeKey = (ctx, key) => (merge.identify(key) || isScalar(key) && (!key.type || key.type === Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
|
|
3093
|
+
function addMergeToJSMap(ctx, map2, value) {
|
|
3094
|
+
const source = resolveAliasValue(ctx, value);
|
|
3095
|
+
if (isSeq(source))
|
|
3096
|
+
for (const it of source.items)
|
|
3097
|
+
mergeValue(ctx, map2, it);
|
|
3098
|
+
else if (Array.isArray(source))
|
|
3099
|
+
for (const it of source)
|
|
3100
|
+
mergeValue(ctx, map2, it);
|
|
3101
|
+
else
|
|
3102
|
+
mergeValue(ctx, map2, source);
|
|
3103
|
+
}
|
|
3104
|
+
function mergeValue(ctx, map2, value) {
|
|
3105
|
+
const source = resolveAliasValue(ctx, value);
|
|
3106
|
+
if (!isMap(source))
|
|
3107
|
+
throw new Error("Merge sources must be maps or map aliases");
|
|
3108
|
+
const srcMap = source.toJSON(null, ctx, Map);
|
|
3109
|
+
for (const [key, value2] of srcMap) {
|
|
3110
|
+
if (map2 instanceof Map) {
|
|
3111
|
+
if (!map2.has(key))
|
|
3112
|
+
map2.set(key, value2);
|
|
3113
|
+
} else if (map2 instanceof Set) {
|
|
3114
|
+
map2.add(key);
|
|
3115
|
+
} else if (!Object.prototype.hasOwnProperty.call(map2, key)) {
|
|
3116
|
+
Object.defineProperty(map2, key, {
|
|
3117
|
+
value: value2,
|
|
3118
|
+
writable: true,
|
|
3119
|
+
enumerable: true,
|
|
3120
|
+
configurable: true
|
|
3121
|
+
});
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
return map2;
|
|
3125
|
+
}
|
|
3126
|
+
function resolveAliasValue(ctx, value) {
|
|
3127
|
+
return ctx && isAlias(value) ? value.resolve(ctx.doc, ctx) : value;
|
|
3128
|
+
}
|
|
3129
|
+
|
|
3130
|
+
// node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
|
|
3131
|
+
function addPairToJSMap(ctx, map2, { key, value }) {
|
|
3132
|
+
if (isNode(key) && key.addToJSMap)
|
|
3133
|
+
key.addToJSMap(ctx, map2, value);
|
|
3134
|
+
else if (isMergeKey(ctx, key))
|
|
3135
|
+
addMergeToJSMap(ctx, map2, value);
|
|
3136
|
+
else {
|
|
3137
|
+
const jsKey = toJS(key, "", ctx);
|
|
3138
|
+
if (map2 instanceof Map) {
|
|
3139
|
+
map2.set(jsKey, toJS(value, jsKey, ctx));
|
|
3140
|
+
} else if (map2 instanceof Set) {
|
|
3141
|
+
map2.add(jsKey);
|
|
3142
|
+
} else {
|
|
3143
|
+
const stringKey = stringifyKey(key, jsKey, ctx);
|
|
3144
|
+
const jsValue = toJS(value, stringKey, ctx);
|
|
3145
|
+
if (stringKey in map2)
|
|
3146
|
+
Object.defineProperty(map2, stringKey, {
|
|
3147
|
+
value: jsValue,
|
|
3148
|
+
writable: true,
|
|
3149
|
+
enumerable: true,
|
|
3150
|
+
configurable: true
|
|
3151
|
+
});
|
|
3152
|
+
else
|
|
3153
|
+
map2[stringKey] = jsValue;
|
|
3154
|
+
}
|
|
3155
|
+
}
|
|
3156
|
+
return map2;
|
|
3157
|
+
}
|
|
3158
|
+
function stringifyKey(key, jsKey, ctx) {
|
|
3159
|
+
if (jsKey === null)
|
|
3160
|
+
return "";
|
|
3161
|
+
if (typeof jsKey !== "object")
|
|
3162
|
+
return String(jsKey);
|
|
3163
|
+
if (isNode(key) && ctx?.doc) {
|
|
3164
|
+
const strCtx = createStringifyContext(ctx.doc, {});
|
|
3165
|
+
strCtx.anchors = /* @__PURE__ */ new Set();
|
|
3166
|
+
for (const node of ctx.anchors.keys())
|
|
3167
|
+
strCtx.anchors.add(node.anchor);
|
|
3168
|
+
strCtx.inFlow = true;
|
|
3169
|
+
strCtx.inStringifyKey = true;
|
|
3170
|
+
const strKey = key.toString(strCtx);
|
|
3171
|
+
if (!ctx.mapKeyWarned) {
|
|
3172
|
+
let jsonStr = JSON.stringify(strKey);
|
|
3173
|
+
if (jsonStr.length > 40)
|
|
3174
|
+
jsonStr = jsonStr.substring(0, 36) + '..."';
|
|
3175
|
+
warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);
|
|
3176
|
+
ctx.mapKeyWarned = true;
|
|
3177
|
+
}
|
|
3178
|
+
return strKey;
|
|
3179
|
+
}
|
|
3180
|
+
return JSON.stringify(jsKey);
|
|
3181
|
+
}
|
|
3182
|
+
|
|
3183
|
+
// node_modules/yaml/browser/dist/nodes/Pair.js
|
|
3184
|
+
function createPair(key, value, ctx) {
|
|
3185
|
+
const k = createNode(key, void 0, ctx);
|
|
3186
|
+
const v = createNode(value, void 0, ctx);
|
|
3187
|
+
return new Pair(k, v);
|
|
3188
|
+
}
|
|
3189
|
+
var Pair = class _Pair {
|
|
3190
|
+
constructor(key, value = null) {
|
|
3191
|
+
Object.defineProperty(this, NODE_TYPE, { value: PAIR });
|
|
3192
|
+
this.key = key;
|
|
3193
|
+
this.value = value;
|
|
3194
|
+
}
|
|
3195
|
+
clone(schema4) {
|
|
3196
|
+
let { key, value } = this;
|
|
3197
|
+
if (isNode(key))
|
|
3198
|
+
key = key.clone(schema4);
|
|
3199
|
+
if (isNode(value))
|
|
3200
|
+
value = value.clone(schema4);
|
|
3201
|
+
return new _Pair(key, value);
|
|
3202
|
+
}
|
|
3203
|
+
toJSON(_, ctx) {
|
|
3204
|
+
const pair = ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
3205
|
+
return addPairToJSMap(ctx, pair, this);
|
|
3206
|
+
}
|
|
3207
|
+
toString(ctx, onComment, onChompKeep) {
|
|
3208
|
+
return ctx?.doc ? stringifyPair(this, ctx, onComment, onChompKeep) : JSON.stringify(this);
|
|
3209
|
+
}
|
|
3210
|
+
};
|
|
3211
|
+
|
|
3212
|
+
// node_modules/yaml/browser/dist/stringify/stringifyCollection.js
|
|
3213
|
+
function stringifyCollection(collection, ctx, options) {
|
|
3214
|
+
const flow = ctx.inFlow ?? collection.flow;
|
|
3215
|
+
const stringify4 = flow ? stringifyFlowCollection : stringifyBlockCollection;
|
|
3216
|
+
return stringify4(collection, ctx, options);
|
|
3217
|
+
}
|
|
3218
|
+
function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
|
|
3219
|
+
const { indent, options: { commentString } } = ctx;
|
|
3220
|
+
const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });
|
|
3221
|
+
let chompKeep = false;
|
|
3222
|
+
const lines = [];
|
|
3223
|
+
for (let i = 0; i < items.length; ++i) {
|
|
3224
|
+
const item = items[i];
|
|
3225
|
+
let comment2 = null;
|
|
3226
|
+
if (isNode(item)) {
|
|
3227
|
+
if (!chompKeep && item.spaceBefore)
|
|
3228
|
+
lines.push("");
|
|
3229
|
+
addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
|
|
3230
|
+
if (item.comment)
|
|
3231
|
+
comment2 = item.comment;
|
|
3232
|
+
} else if (isPair(item)) {
|
|
3233
|
+
const ik = isNode(item.key) ? item.key : null;
|
|
3234
|
+
if (ik) {
|
|
3235
|
+
if (!chompKeep && ik.spaceBefore)
|
|
3236
|
+
lines.push("");
|
|
3237
|
+
addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);
|
|
3238
|
+
}
|
|
3239
|
+
}
|
|
3240
|
+
chompKeep = false;
|
|
3241
|
+
let str2 = stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
|
|
3242
|
+
if (comment2)
|
|
3243
|
+
str2 += lineComment(str2, itemIndent, commentString(comment2));
|
|
3244
|
+
if (chompKeep && comment2)
|
|
3245
|
+
chompKeep = false;
|
|
3246
|
+
lines.push(blockItemPrefix + str2);
|
|
3247
|
+
}
|
|
3248
|
+
let str;
|
|
3249
|
+
if (lines.length === 0) {
|
|
3250
|
+
str = flowChars.start + flowChars.end;
|
|
3251
|
+
} else {
|
|
3252
|
+
str = lines[0];
|
|
3253
|
+
for (let i = 1; i < lines.length; ++i) {
|
|
3254
|
+
const line = lines[i];
|
|
3255
|
+
str += line ? `
|
|
3256
|
+
${indent}${line}` : "\n";
|
|
3257
|
+
}
|
|
3258
|
+
}
|
|
3259
|
+
if (comment) {
|
|
3260
|
+
str += "\n" + indentComment(commentString(comment), indent);
|
|
3261
|
+
if (onComment)
|
|
3262
|
+
onComment();
|
|
3263
|
+
} else if (chompKeep && onChompKeep)
|
|
3264
|
+
onChompKeep();
|
|
3265
|
+
return str;
|
|
3266
|
+
}
|
|
3267
|
+
function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) {
|
|
3268
|
+
const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;
|
|
3269
|
+
itemIndent += indentStep;
|
|
3270
|
+
const itemCtx = Object.assign({}, ctx, {
|
|
3271
|
+
indent: itemIndent,
|
|
3272
|
+
inFlow: true,
|
|
3273
|
+
type: null
|
|
3274
|
+
});
|
|
3275
|
+
let reqNewline = false;
|
|
3276
|
+
let linesAtValue = 0;
|
|
3277
|
+
const lines = [];
|
|
3278
|
+
for (let i = 0; i < items.length; ++i) {
|
|
3279
|
+
const item = items[i];
|
|
3280
|
+
let comment = null;
|
|
3281
|
+
if (isNode(item)) {
|
|
3282
|
+
if (item.spaceBefore)
|
|
3283
|
+
lines.push("");
|
|
3284
|
+
addCommentBefore(ctx, lines, item.commentBefore, false);
|
|
3285
|
+
if (item.comment)
|
|
3286
|
+
comment = item.comment;
|
|
3287
|
+
} else if (isPair(item)) {
|
|
3288
|
+
const ik = isNode(item.key) ? item.key : null;
|
|
3289
|
+
if (ik) {
|
|
3290
|
+
if (ik.spaceBefore)
|
|
3291
|
+
lines.push("");
|
|
3292
|
+
addCommentBefore(ctx, lines, ik.commentBefore, false);
|
|
3293
|
+
if (ik.comment)
|
|
3294
|
+
reqNewline = true;
|
|
3295
|
+
}
|
|
3296
|
+
const iv = isNode(item.value) ? item.value : null;
|
|
3297
|
+
if (iv) {
|
|
3298
|
+
if (iv.comment)
|
|
3299
|
+
comment = iv.comment;
|
|
3300
|
+
if (iv.commentBefore)
|
|
3301
|
+
reqNewline = true;
|
|
3302
|
+
} else if (item.value == null && ik?.comment) {
|
|
3303
|
+
comment = ik.comment;
|
|
3304
|
+
}
|
|
3305
|
+
}
|
|
3306
|
+
if (comment)
|
|
3307
|
+
reqNewline = true;
|
|
3308
|
+
let str = stringify(item, itemCtx, () => comment = null);
|
|
3309
|
+
reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n"));
|
|
3310
|
+
if (i < items.length - 1) {
|
|
3311
|
+
str += ",";
|
|
3312
|
+
} else if (ctx.options.trailingComma) {
|
|
3313
|
+
if (ctx.options.lineWidth > 0) {
|
|
3314
|
+
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options.lineWidth);
|
|
3315
|
+
}
|
|
3316
|
+
if (reqNewline) {
|
|
3317
|
+
str += ",";
|
|
3318
|
+
}
|
|
3319
|
+
}
|
|
3320
|
+
if (comment)
|
|
3321
|
+
str += lineComment(str, itemIndent, commentString(comment));
|
|
3322
|
+
lines.push(str);
|
|
3323
|
+
linesAtValue = lines.length;
|
|
3324
|
+
}
|
|
3325
|
+
const { start, end } = flowChars;
|
|
3326
|
+
if (lines.length === 0) {
|
|
3327
|
+
return start + end;
|
|
3328
|
+
} else {
|
|
3329
|
+
if (!reqNewline) {
|
|
3330
|
+
const len = lines.reduce((sum, line) => sum + line.length + 2, 2);
|
|
3331
|
+
reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth;
|
|
3332
|
+
}
|
|
3333
|
+
if (reqNewline) {
|
|
3334
|
+
let str = start;
|
|
3335
|
+
for (const line of lines)
|
|
3336
|
+
str += line ? `
|
|
3337
|
+
${indentStep}${indent}${line}` : "\n";
|
|
3338
|
+
return `${str}
|
|
3339
|
+
${indent}${end}`;
|
|
3340
|
+
} else {
|
|
3341
|
+
return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`;
|
|
3342
|
+
}
|
|
3343
|
+
}
|
|
3344
|
+
}
|
|
3345
|
+
function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {
|
|
3346
|
+
if (comment && chompKeep)
|
|
3347
|
+
comment = comment.replace(/^\n+/, "");
|
|
3348
|
+
if (comment) {
|
|
3349
|
+
const ic = indentComment(commentString(comment), indent);
|
|
3350
|
+
lines.push(ic.trimStart());
|
|
3351
|
+
}
|
|
3352
|
+
}
|
|
3353
|
+
|
|
3354
|
+
// node_modules/yaml/browser/dist/nodes/YAMLMap.js
|
|
3355
|
+
function findPair(items, key) {
|
|
3356
|
+
const k = isScalar(key) ? key.value : key;
|
|
3357
|
+
for (const it of items) {
|
|
3358
|
+
if (isPair(it)) {
|
|
3359
|
+
if (it.key === key || it.key === k)
|
|
3360
|
+
return it;
|
|
3361
|
+
if (isScalar(it.key) && it.key.value === k)
|
|
3362
|
+
return it;
|
|
3363
|
+
}
|
|
3364
|
+
}
|
|
3365
|
+
return void 0;
|
|
3366
|
+
}
|
|
3367
|
+
var YAMLMap = class extends Collection {
|
|
3368
|
+
static get tagName() {
|
|
3369
|
+
return "tag:yaml.org,2002:map";
|
|
3370
|
+
}
|
|
3371
|
+
constructor(schema4) {
|
|
3372
|
+
super(MAP, schema4);
|
|
3373
|
+
this.items = [];
|
|
3374
|
+
}
|
|
3375
|
+
/**
|
|
3376
|
+
* A generic collection parsing method that can be extended
|
|
3377
|
+
* to other node classes that inherit from YAMLMap
|
|
3378
|
+
*/
|
|
3379
|
+
static from(schema4, obj, ctx) {
|
|
3380
|
+
const { keepUndefined, replacer } = ctx;
|
|
3381
|
+
const map2 = new this(schema4);
|
|
3382
|
+
const add = (key, value) => {
|
|
3383
|
+
if (typeof replacer === "function")
|
|
3384
|
+
value = replacer.call(obj, key, value);
|
|
3385
|
+
else if (Array.isArray(replacer) && !replacer.includes(key))
|
|
3386
|
+
return;
|
|
3387
|
+
if (value !== void 0 || keepUndefined)
|
|
3388
|
+
map2.items.push(createPair(key, value, ctx));
|
|
3389
|
+
};
|
|
3390
|
+
if (obj instanceof Map) {
|
|
3391
|
+
for (const [key, value] of obj)
|
|
3392
|
+
add(key, value);
|
|
3393
|
+
} else if (obj && typeof obj === "object") {
|
|
3394
|
+
for (const key of Object.keys(obj))
|
|
3395
|
+
add(key, obj[key]);
|
|
3396
|
+
}
|
|
3397
|
+
if (typeof schema4.sortMapEntries === "function") {
|
|
3398
|
+
map2.items.sort(schema4.sortMapEntries);
|
|
3399
|
+
}
|
|
3400
|
+
return map2;
|
|
3401
|
+
}
|
|
3402
|
+
/**
|
|
3403
|
+
* Adds a value to the collection.
|
|
3404
|
+
*
|
|
3405
|
+
* @param overwrite - If not set `true`, using a key that is already in the
|
|
3406
|
+
* collection will throw. Otherwise, overwrites the previous value.
|
|
3407
|
+
*/
|
|
3408
|
+
add(pair, overwrite) {
|
|
3409
|
+
let _pair;
|
|
3410
|
+
if (isPair(pair))
|
|
3411
|
+
_pair = pair;
|
|
3412
|
+
else if (!pair || typeof pair !== "object" || !("key" in pair)) {
|
|
3413
|
+
_pair = new Pair(pair, pair?.value);
|
|
3414
|
+
} else
|
|
3415
|
+
_pair = new Pair(pair.key, pair.value);
|
|
3416
|
+
const prev = findPair(this.items, _pair.key);
|
|
3417
|
+
const sortEntries = this.schema?.sortMapEntries;
|
|
3418
|
+
if (prev) {
|
|
3419
|
+
if (!overwrite)
|
|
3420
|
+
throw new Error(`Key ${_pair.key} already set`);
|
|
3421
|
+
if (isScalar(prev.value) && isScalarValue(_pair.value))
|
|
3422
|
+
prev.value.value = _pair.value;
|
|
3423
|
+
else
|
|
3424
|
+
prev.value = _pair.value;
|
|
3425
|
+
} else if (sortEntries) {
|
|
3426
|
+
const i = this.items.findIndex((item) => sortEntries(_pair, item) < 0);
|
|
3427
|
+
if (i === -1)
|
|
3428
|
+
this.items.push(_pair);
|
|
3429
|
+
else
|
|
3430
|
+
this.items.splice(i, 0, _pair);
|
|
3431
|
+
} else {
|
|
3432
|
+
this.items.push(_pair);
|
|
3433
|
+
}
|
|
3434
|
+
}
|
|
3435
|
+
delete(key) {
|
|
3436
|
+
const it = findPair(this.items, key);
|
|
3437
|
+
if (!it)
|
|
3438
|
+
return false;
|
|
3439
|
+
const del = this.items.splice(this.items.indexOf(it), 1);
|
|
3440
|
+
return del.length > 0;
|
|
3441
|
+
}
|
|
3442
|
+
get(key, keepScalar) {
|
|
3443
|
+
const it = findPair(this.items, key);
|
|
3444
|
+
const node = it?.value;
|
|
3445
|
+
return (!keepScalar && isScalar(node) ? node.value : node) ?? void 0;
|
|
3446
|
+
}
|
|
3447
|
+
has(key) {
|
|
3448
|
+
return !!findPair(this.items, key);
|
|
3449
|
+
}
|
|
3450
|
+
set(key, value) {
|
|
3451
|
+
this.add(new Pair(key, value), true);
|
|
3452
|
+
}
|
|
3453
|
+
/**
|
|
3454
|
+
* @param ctx - Conversion context, originally set in Document#toJS()
|
|
3455
|
+
* @param {Class} Type - If set, forces the returned collection type
|
|
3456
|
+
* @returns Instance of Type, Map, or Object
|
|
3457
|
+
*/
|
|
3458
|
+
toJSON(_, ctx, Type) {
|
|
3459
|
+
const map2 = Type ? new Type() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
|
|
3460
|
+
if (ctx?.onCreate)
|
|
3461
|
+
ctx.onCreate(map2);
|
|
3462
|
+
for (const item of this.items)
|
|
3463
|
+
addPairToJSMap(ctx, map2, item);
|
|
3464
|
+
return map2;
|
|
3465
|
+
}
|
|
3466
|
+
toString(ctx, onComment, onChompKeep) {
|
|
3467
|
+
if (!ctx)
|
|
3468
|
+
return JSON.stringify(this);
|
|
3469
|
+
for (const item of this.items) {
|
|
3470
|
+
if (!isPair(item))
|
|
3471
|
+
throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);
|
|
3472
|
+
}
|
|
3473
|
+
if (!ctx.allNullValues && this.hasAllNullValues(false))
|
|
3474
|
+
ctx = Object.assign({}, ctx, { allNullValues: true });
|
|
3475
|
+
return stringifyCollection(this, ctx, {
|
|
3476
|
+
blockItemPrefix: "",
|
|
3477
|
+
flowChars: { start: "{", end: "}" },
|
|
3478
|
+
itemIndent: ctx.indent || "",
|
|
3479
|
+
onChompKeep,
|
|
3480
|
+
onComment
|
|
3481
|
+
});
|
|
3482
|
+
}
|
|
3483
|
+
};
|
|
3484
|
+
|
|
3485
|
+
// node_modules/yaml/browser/dist/schema/common/map.js
|
|
3486
|
+
var map = {
|
|
3487
|
+
collection: "map",
|
|
3488
|
+
default: true,
|
|
3489
|
+
nodeClass: YAMLMap,
|
|
3490
|
+
tag: "tag:yaml.org,2002:map",
|
|
3491
|
+
resolve(map2, onError) {
|
|
3492
|
+
if (!isMap(map2))
|
|
3493
|
+
onError("Expected a mapping for this tag");
|
|
3494
|
+
return map2;
|
|
3495
|
+
},
|
|
3496
|
+
createNode: (schema4, obj, ctx) => YAMLMap.from(schema4, obj, ctx)
|
|
3497
|
+
};
|
|
3498
|
+
|
|
3499
|
+
// node_modules/yaml/browser/dist/nodes/YAMLSeq.js
|
|
3500
|
+
var YAMLSeq = class extends Collection {
|
|
3501
|
+
static get tagName() {
|
|
3502
|
+
return "tag:yaml.org,2002:seq";
|
|
3503
|
+
}
|
|
3504
|
+
constructor(schema4) {
|
|
3505
|
+
super(SEQ, schema4);
|
|
3506
|
+
this.items = [];
|
|
3507
|
+
}
|
|
3508
|
+
add(value) {
|
|
3509
|
+
this.items.push(value);
|
|
3510
|
+
}
|
|
3511
|
+
/**
|
|
3512
|
+
* Removes a value from the collection.
|
|
3513
|
+
*
|
|
3514
|
+
* `key` must contain a representation of an integer for this to succeed.
|
|
3515
|
+
* It may be wrapped in a `Scalar`.
|
|
3516
|
+
*
|
|
3517
|
+
* @returns `true` if the item was found and removed.
|
|
3518
|
+
*/
|
|
3519
|
+
delete(key) {
|
|
3520
|
+
const idx = asItemIndex(key);
|
|
3521
|
+
if (typeof idx !== "number")
|
|
3522
|
+
return false;
|
|
3523
|
+
const del = this.items.splice(idx, 1);
|
|
3524
|
+
return del.length > 0;
|
|
3525
|
+
}
|
|
3526
|
+
get(key, keepScalar) {
|
|
3527
|
+
const idx = asItemIndex(key);
|
|
3528
|
+
if (typeof idx !== "number")
|
|
3529
|
+
return void 0;
|
|
3530
|
+
const it = this.items[idx];
|
|
3531
|
+
return !keepScalar && isScalar(it) ? it.value : it;
|
|
3532
|
+
}
|
|
3533
|
+
/**
|
|
3534
|
+
* Checks if the collection includes a value with the key `key`.
|
|
3535
|
+
*
|
|
3536
|
+
* `key` must contain a representation of an integer for this to succeed.
|
|
3537
|
+
* It may be wrapped in a `Scalar`.
|
|
3538
|
+
*/
|
|
3539
|
+
has(key) {
|
|
3540
|
+
const idx = asItemIndex(key);
|
|
3541
|
+
return typeof idx === "number" && idx < this.items.length;
|
|
3542
|
+
}
|
|
3543
|
+
/**
|
|
3544
|
+
* Sets a value in this collection. For `!!set`, `value` needs to be a
|
|
3545
|
+
* boolean to add/remove the item from the set.
|
|
3546
|
+
*
|
|
3547
|
+
* If `key` does not contain a representation of an integer, this will throw.
|
|
3548
|
+
* It may be wrapped in a `Scalar`.
|
|
3549
|
+
*/
|
|
3550
|
+
set(key, value) {
|
|
3551
|
+
const idx = asItemIndex(key);
|
|
3552
|
+
if (typeof idx !== "number")
|
|
3553
|
+
throw new Error(`Expected a valid index, not ${key}.`);
|
|
3554
|
+
const prev = this.items[idx];
|
|
3555
|
+
if (isScalar(prev) && isScalarValue(value))
|
|
3556
|
+
prev.value = value;
|
|
3557
|
+
else
|
|
3558
|
+
this.items[idx] = value;
|
|
3559
|
+
}
|
|
3560
|
+
toJSON(_, ctx) {
|
|
3561
|
+
const seq2 = [];
|
|
3562
|
+
if (ctx?.onCreate)
|
|
3563
|
+
ctx.onCreate(seq2);
|
|
3564
|
+
let i = 0;
|
|
3565
|
+
for (const item of this.items)
|
|
3566
|
+
seq2.push(toJS(item, String(i++), ctx));
|
|
3567
|
+
return seq2;
|
|
3568
|
+
}
|
|
3569
|
+
toString(ctx, onComment, onChompKeep) {
|
|
3570
|
+
if (!ctx)
|
|
3571
|
+
return JSON.stringify(this);
|
|
3572
|
+
return stringifyCollection(this, ctx, {
|
|
3573
|
+
blockItemPrefix: "- ",
|
|
3574
|
+
flowChars: { start: "[", end: "]" },
|
|
3575
|
+
itemIndent: (ctx.indent || "") + " ",
|
|
3576
|
+
onChompKeep,
|
|
3577
|
+
onComment
|
|
3578
|
+
});
|
|
3579
|
+
}
|
|
3580
|
+
static from(schema4, obj, ctx) {
|
|
3581
|
+
const { replacer } = ctx;
|
|
3582
|
+
const seq2 = new this(schema4);
|
|
3583
|
+
if (obj && Symbol.iterator in Object(obj)) {
|
|
3584
|
+
let i = 0;
|
|
3585
|
+
for (let it of obj) {
|
|
3586
|
+
if (typeof replacer === "function") {
|
|
3587
|
+
const key = obj instanceof Set ? it : String(i++);
|
|
3588
|
+
it = replacer.call(obj, key, it);
|
|
3589
|
+
}
|
|
3590
|
+
seq2.items.push(createNode(it, void 0, ctx));
|
|
3591
|
+
}
|
|
3592
|
+
}
|
|
3593
|
+
return seq2;
|
|
3594
|
+
}
|
|
3595
|
+
};
|
|
3596
|
+
function asItemIndex(key) {
|
|
3597
|
+
let idx = isScalar(key) ? key.value : key;
|
|
3598
|
+
if (idx && typeof idx === "string")
|
|
3599
|
+
idx = Number(idx);
|
|
3600
|
+
return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null;
|
|
3601
|
+
}
|
|
3602
|
+
|
|
3603
|
+
// node_modules/yaml/browser/dist/schema/common/seq.js
|
|
3604
|
+
var seq = {
|
|
3605
|
+
collection: "seq",
|
|
3606
|
+
default: true,
|
|
3607
|
+
nodeClass: YAMLSeq,
|
|
3608
|
+
tag: "tag:yaml.org,2002:seq",
|
|
3609
|
+
resolve(seq2, onError) {
|
|
3610
|
+
if (!isSeq(seq2))
|
|
3611
|
+
onError("Expected a sequence for this tag");
|
|
3612
|
+
return seq2;
|
|
3613
|
+
},
|
|
3614
|
+
createNode: (schema4, obj, ctx) => YAMLSeq.from(schema4, obj, ctx)
|
|
3615
|
+
};
|
|
3616
|
+
|
|
3617
|
+
// node_modules/yaml/browser/dist/schema/json/schema.js
|
|
3618
|
+
function intIdentify(value) {
|
|
3619
|
+
return typeof value === "bigint" || Number.isInteger(value);
|
|
3620
|
+
}
|
|
3621
|
+
var stringifyJSON = ({ value }) => JSON.stringify(value);
|
|
3622
|
+
var jsonScalars = [
|
|
3623
|
+
{
|
|
3624
|
+
identify: (value) => typeof value === "string",
|
|
3625
|
+
default: true,
|
|
3626
|
+
tag: "tag:yaml.org,2002:str",
|
|
3627
|
+
resolve: (str) => str,
|
|
3628
|
+
stringify: stringifyJSON
|
|
3629
|
+
},
|
|
3630
|
+
{
|
|
3631
|
+
identify: (value) => value == null,
|
|
3632
|
+
createNode: () => new Scalar(null),
|
|
3633
|
+
default: true,
|
|
3634
|
+
tag: "tag:yaml.org,2002:null",
|
|
3635
|
+
test: /^null$/,
|
|
3636
|
+
resolve: () => null,
|
|
3637
|
+
stringify: stringifyJSON
|
|
3638
|
+
},
|
|
3639
|
+
{
|
|
3640
|
+
identify: (value) => typeof value === "boolean",
|
|
3641
|
+
default: true,
|
|
3642
|
+
tag: "tag:yaml.org,2002:bool",
|
|
3643
|
+
test: /^true$|^false$/,
|
|
3644
|
+
resolve: (str) => str === "true",
|
|
3645
|
+
stringify: stringifyJSON
|
|
3646
|
+
},
|
|
3647
|
+
{
|
|
3648
|
+
identify: intIdentify,
|
|
3649
|
+
default: true,
|
|
3650
|
+
tag: "tag:yaml.org,2002:int",
|
|
3651
|
+
test: /^-?(?:0|[1-9][0-9]*)$/,
|
|
3652
|
+
resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10),
|
|
3653
|
+
stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)
|
|
3654
|
+
},
|
|
3655
|
+
{
|
|
3656
|
+
identify: (value) => typeof value === "number",
|
|
3657
|
+
default: true,
|
|
3658
|
+
tag: "tag:yaml.org,2002:float",
|
|
3659
|
+
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
|
3660
|
+
resolve: (str) => parseFloat(str),
|
|
3661
|
+
stringify: stringifyJSON
|
|
3662
|
+
}
|
|
3663
|
+
];
|
|
3664
|
+
var jsonError = {
|
|
3665
|
+
default: true,
|
|
3666
|
+
tag: "",
|
|
3667
|
+
test: /^/,
|
|
3668
|
+
resolve(str, onError) {
|
|
3669
|
+
onError(`Unresolved plain scalar ${JSON.stringify(str)}`);
|
|
3670
|
+
return str;
|
|
3671
|
+
}
|
|
3672
|
+
};
|
|
3673
|
+
var schema = [map, seq].concat(jsonScalars, jsonError);
|
|
3674
|
+
|
|
3675
|
+
// node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
|
|
3676
|
+
function createPairs(schema4, iterable, ctx) {
|
|
3677
|
+
const { replacer } = ctx;
|
|
3678
|
+
const pairs2 = new YAMLSeq(schema4);
|
|
3679
|
+
pairs2.tag = "tag:yaml.org,2002:pairs";
|
|
3680
|
+
let i = 0;
|
|
3681
|
+
if (iterable && Symbol.iterator in Object(iterable))
|
|
3682
|
+
for (let it of iterable) {
|
|
3683
|
+
if (typeof replacer === "function")
|
|
3684
|
+
it = replacer.call(iterable, String(i++), it);
|
|
3685
|
+
let key, value;
|
|
3686
|
+
if (Array.isArray(it)) {
|
|
3687
|
+
if (it.length === 2) {
|
|
3688
|
+
key = it[0];
|
|
3689
|
+
value = it[1];
|
|
3690
|
+
} else
|
|
3691
|
+
throw new TypeError(`Expected [key, value] tuple: ${it}`);
|
|
3692
|
+
} else if (it && it instanceof Object) {
|
|
3693
|
+
const keys = Object.keys(it);
|
|
3694
|
+
if (keys.length === 1) {
|
|
3695
|
+
key = keys[0];
|
|
3696
|
+
value = it[key];
|
|
3697
|
+
} else {
|
|
3698
|
+
throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);
|
|
3699
|
+
}
|
|
3700
|
+
} else {
|
|
3701
|
+
key = it;
|
|
3702
|
+
}
|
|
3703
|
+
pairs2.items.push(createPair(key, value, ctx));
|
|
3704
|
+
}
|
|
3705
|
+
return pairs2;
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3708
|
+
// node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js
|
|
3709
|
+
var YAMLOMap = class _YAMLOMap extends YAMLSeq {
|
|
3710
|
+
constructor() {
|
|
3711
|
+
super();
|
|
3712
|
+
this.add = YAMLMap.prototype.add.bind(this);
|
|
3713
|
+
this.delete = YAMLMap.prototype.delete.bind(this);
|
|
3714
|
+
this.get = YAMLMap.prototype.get.bind(this);
|
|
3715
|
+
this.has = YAMLMap.prototype.has.bind(this);
|
|
3716
|
+
this.set = YAMLMap.prototype.set.bind(this);
|
|
3717
|
+
this.tag = _YAMLOMap.tag;
|
|
3718
|
+
}
|
|
3719
|
+
/**
|
|
3720
|
+
* If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
|
|
3721
|
+
* but TypeScript won't allow widening the signature of a child method.
|
|
3722
|
+
*/
|
|
3723
|
+
toJSON(_, ctx) {
|
|
3724
|
+
if (!ctx)
|
|
3725
|
+
return super.toJSON(_);
|
|
3726
|
+
const map2 = /* @__PURE__ */ new Map();
|
|
3727
|
+
if (ctx?.onCreate)
|
|
3728
|
+
ctx.onCreate(map2);
|
|
3729
|
+
for (const pair of this.items) {
|
|
3730
|
+
let key, value;
|
|
3731
|
+
if (isPair(pair)) {
|
|
3732
|
+
key = toJS(pair.key, "", ctx);
|
|
3733
|
+
value = toJS(pair.value, key, ctx);
|
|
3734
|
+
} else {
|
|
3735
|
+
key = toJS(pair, "", ctx);
|
|
3736
|
+
}
|
|
3737
|
+
if (map2.has(key))
|
|
3738
|
+
throw new Error("Ordered maps must not include duplicate keys");
|
|
3739
|
+
map2.set(key, value);
|
|
3740
|
+
}
|
|
3741
|
+
return map2;
|
|
3742
|
+
}
|
|
3743
|
+
static from(schema4, iterable, ctx) {
|
|
3744
|
+
const pairs2 = createPairs(schema4, iterable, ctx);
|
|
3745
|
+
const omap2 = new this();
|
|
3746
|
+
omap2.items = pairs2.items;
|
|
3747
|
+
return omap2;
|
|
3748
|
+
}
|
|
3749
|
+
};
|
|
3750
|
+
YAMLOMap.tag = "tag:yaml.org,2002:omap";
|
|
3751
|
+
|
|
3752
|
+
// node_modules/yaml/browser/dist/schema/yaml-1.1/set.js
|
|
3753
|
+
var YAMLSet = class _YAMLSet extends YAMLMap {
|
|
3754
|
+
constructor(schema4) {
|
|
3755
|
+
super(schema4);
|
|
3756
|
+
this.tag = _YAMLSet.tag;
|
|
3757
|
+
}
|
|
3758
|
+
add(key) {
|
|
3759
|
+
let pair;
|
|
3760
|
+
if (isPair(key))
|
|
3761
|
+
pair = key;
|
|
3762
|
+
else if (key && typeof key === "object" && "key" in key && "value" in key && key.value === null)
|
|
3763
|
+
pair = new Pair(key.key, null);
|
|
3764
|
+
else
|
|
3765
|
+
pair = new Pair(key, null);
|
|
3766
|
+
const prev = findPair(this.items, pair.key);
|
|
3767
|
+
if (!prev)
|
|
3768
|
+
this.items.push(pair);
|
|
3769
|
+
}
|
|
3770
|
+
/**
|
|
3771
|
+
* If `keepPair` is `true`, returns the Pair matching `key`.
|
|
3772
|
+
* Otherwise, returns the value of that Pair's key.
|
|
3773
|
+
*/
|
|
3774
|
+
get(key, keepPair) {
|
|
3775
|
+
const pair = findPair(this.items, key);
|
|
3776
|
+
return !keepPair && isPair(pair) ? isScalar(pair.key) ? pair.key.value : pair.key : pair;
|
|
3777
|
+
}
|
|
3778
|
+
set(key, value) {
|
|
3779
|
+
if (typeof value !== "boolean")
|
|
3780
|
+
throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
|
|
3781
|
+
const prev = findPair(this.items, key);
|
|
3782
|
+
if (prev && !value) {
|
|
3783
|
+
this.items.splice(this.items.indexOf(prev), 1);
|
|
3784
|
+
} else if (!prev && value) {
|
|
3785
|
+
this.items.push(new Pair(key));
|
|
3786
|
+
}
|
|
3787
|
+
}
|
|
3788
|
+
toJSON(_, ctx) {
|
|
3789
|
+
return super.toJSON(_, ctx, Set);
|
|
3790
|
+
}
|
|
3791
|
+
toString(ctx, onComment, onChompKeep) {
|
|
3792
|
+
if (!ctx)
|
|
3793
|
+
return JSON.stringify(this);
|
|
3794
|
+
if (this.hasAllNullValues(true))
|
|
3795
|
+
return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);
|
|
3796
|
+
else
|
|
3797
|
+
throw new Error("Set items must all have null values");
|
|
3798
|
+
}
|
|
3799
|
+
static from(schema4, iterable, ctx) {
|
|
3800
|
+
const { replacer } = ctx;
|
|
3801
|
+
const set2 = new this(schema4);
|
|
3802
|
+
if (iterable && Symbol.iterator in Object(iterable))
|
|
3803
|
+
for (let value of iterable) {
|
|
3804
|
+
if (typeof replacer === "function")
|
|
3805
|
+
value = replacer.call(iterable, value, value);
|
|
3806
|
+
set2.items.push(createPair(value, null, ctx));
|
|
3807
|
+
}
|
|
3808
|
+
return set2;
|
|
3809
|
+
}
|
|
3810
|
+
};
|
|
3811
|
+
YAMLSet.tag = "tag:yaml.org,2002:set";
|
|
3812
|
+
|
|
3813
|
+
// node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
|
|
3814
|
+
function parseSexagesimal(str, asBigInt) {
|
|
3815
|
+
const sign = str[0];
|
|
3816
|
+
const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
|
|
3817
|
+
const num = (n) => asBigInt ? BigInt(n) : Number(n);
|
|
3818
|
+
const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
|
|
3819
|
+
return sign === "-" ? num(-1) * res : res;
|
|
3820
|
+
}
|
|
3821
|
+
var timestamp = {
|
|
3822
|
+
identify: (value) => value instanceof Date,
|
|
3823
|
+
default: true,
|
|
3824
|
+
tag: "tag:yaml.org,2002:timestamp",
|
|
3825
|
+
// If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
|
|
3826
|
+
// may be omitted altogether, resulting in a date format. In such a case, the time part is
|
|
3827
|
+
// assumed to be 00:00:00Z (start of day, UTC).
|
|
3828
|
+
test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
|
|
3829
|
+
resolve(str) {
|
|
3830
|
+
const match = str.match(timestamp.test);
|
|
3831
|
+
if (!match)
|
|
3832
|
+
throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
|
|
3833
|
+
const [, year, month, day, hour, minute, second] = match.map(Number);
|
|
3834
|
+
const millisec = match[7] ? Number((match[7] + "00").substr(1, 3)) : 0;
|
|
3835
|
+
let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);
|
|
3836
|
+
const tz = match[8];
|
|
3837
|
+
if (tz && tz !== "Z") {
|
|
3838
|
+
let d = parseSexagesimal(tz, false);
|
|
3839
|
+
if (Math.abs(d) < 30)
|
|
3840
|
+
d *= 60;
|
|
3841
|
+
date -= 6e4 * d;
|
|
3842
|
+
}
|
|
3843
|
+
return new Date(date);
|
|
3844
|
+
},
|
|
3845
|
+
stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
|
|
3846
|
+
};
|
|
3847
|
+
|
|
3848
|
+
// node_modules/yaml/browser/dist/parse/cst-visit.js
|
|
3849
|
+
var BREAK2 = Symbol("break visit");
|
|
3850
|
+
var SKIP2 = Symbol("skip children");
|
|
3851
|
+
var REMOVE2 = Symbol("remove item");
|
|
3852
|
+
function visit2(cst, visitor) {
|
|
3853
|
+
if ("type" in cst && cst.type === "document")
|
|
3854
|
+
cst = { start: cst.start, value: cst.value };
|
|
3855
|
+
_visit(Object.freeze([]), cst, visitor);
|
|
3856
|
+
}
|
|
3857
|
+
visit2.BREAK = BREAK2;
|
|
3858
|
+
visit2.SKIP = SKIP2;
|
|
3859
|
+
visit2.REMOVE = REMOVE2;
|
|
3860
|
+
visit2.itemAtPath = (cst, path) => {
|
|
3861
|
+
let item = cst;
|
|
3862
|
+
for (const [field, index] of path) {
|
|
3863
|
+
const tok = item?.[field];
|
|
3864
|
+
if (tok && "items" in tok) {
|
|
3865
|
+
item = tok.items[index];
|
|
3866
|
+
} else
|
|
3867
|
+
return void 0;
|
|
3868
|
+
}
|
|
3869
|
+
return item;
|
|
3870
|
+
};
|
|
3871
|
+
visit2.parentCollection = (cst, path) => {
|
|
3872
|
+
const parent = visit2.itemAtPath(cst, path.slice(0, -1));
|
|
3873
|
+
const field = path[path.length - 1][0];
|
|
3874
|
+
const coll = parent?.[field];
|
|
3875
|
+
if (coll && "items" in coll)
|
|
3876
|
+
return coll;
|
|
3877
|
+
throw new Error("Parent collection not found");
|
|
3878
|
+
};
|
|
3879
|
+
function _visit(path, item, visitor) {
|
|
3880
|
+
let ctrl = visitor(item, path);
|
|
3881
|
+
if (typeof ctrl === "symbol")
|
|
3882
|
+
return ctrl;
|
|
3883
|
+
for (const field of ["key", "value"]) {
|
|
3884
|
+
const token = item[field];
|
|
3885
|
+
if (token && "items" in token) {
|
|
3886
|
+
for (let i = 0; i < token.items.length; ++i) {
|
|
3887
|
+
const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);
|
|
3888
|
+
if (typeof ci === "number")
|
|
3889
|
+
i = ci - 1;
|
|
3890
|
+
else if (ci === BREAK2)
|
|
3891
|
+
return BREAK2;
|
|
3892
|
+
else if (ci === REMOVE2) {
|
|
3893
|
+
token.items.splice(i, 1);
|
|
3894
|
+
i -= 1;
|
|
3895
|
+
}
|
|
3896
|
+
}
|
|
3897
|
+
if (typeof ctrl === "function" && field === "key")
|
|
3898
|
+
ctrl = ctrl(item, path);
|
|
3899
|
+
}
|
|
3900
|
+
}
|
|
3901
|
+
return typeof ctrl === "function" ? ctrl(item, path) : ctrl;
|
|
3902
|
+
}
|
|
3903
|
+
|
|
3904
|
+
// node_modules/yaml/browser/dist/parse/lexer.js
|
|
3905
|
+
var hexDigits = new Set("0123456789ABCDEFabcdef");
|
|
3906
|
+
var tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");
|
|
3907
|
+
var flowIndicatorChars = new Set(",[]{}");
|
|
3908
|
+
var invalidAnchorChars = new Set(" ,[]{}\n\r ");
|
|
3909
|
+
|
|
3910
|
+
// src/rules.ts
|
|
3911
|
+
var KNOWN_RULES = Object.freeze([
|
|
3912
|
+
"R1-gate0-missing",
|
|
3913
|
+
"R2-large-amount-no-g0",
|
|
3914
|
+
"R3-g0-passed-no-plan",
|
|
3915
|
+
"R4-criteria-count",
|
|
3916
|
+
"R5-scenarios-count",
|
|
3917
|
+
"R6-risks-overflow",
|
|
3918
|
+
"R7-g2-not-ready",
|
|
3919
|
+
"R8-progress-no-evidence",
|
|
3920
|
+
"R9-evidence-no-recognition",
|
|
3921
|
+
"R10-g3-1-without-g3-2",
|
|
3922
|
+
"R11-no-next-milestone",
|
|
3923
|
+
"R12-stage-stalled",
|
|
3924
|
+
"R13-scenario-no-evidence",
|
|
3925
|
+
"R14-scenario-awaiting-customer",
|
|
3926
|
+
"R15-criteria-unverified",
|
|
3927
|
+
"R16-scenario-not-started"
|
|
3928
|
+
]);
|
|
3929
|
+
var FALLBACK_THRESHOLDS = Object.freeze({
|
|
3930
|
+
largeAmountWan: 300,
|
|
3931
|
+
criteria: { min: 2, max: 3 },
|
|
3932
|
+
scenarios: { min: 3, max: 5 },
|
|
3933
|
+
risks: { max: 3 },
|
|
3934
|
+
stallDays: 45
|
|
3935
|
+
});
|
|
3936
|
+
var FALLBACK_PRIORITY = Object.freeze({
|
|
3937
|
+
strategicWan: 1e3,
|
|
3938
|
+
highWan: 300,
|
|
3939
|
+
strategicPocTypes: ["\u5927\u4F53\u91CF\u9879\u76EE"]
|
|
3940
|
+
});
|
|
3941
|
+
var FALLBACK_RULE_META = Object.freeze({
|
|
3942
|
+
R1: { id: "R1", name: "G0 \u4E94\u5FC5\u586B\u7F3A\u5931", level: "high", priority: 90, guard: null },
|
|
3943
|
+
R2: { id: "R2", name: "\u5927\u91D1\u989D\u672A\u8FC7 G0", level: "high", priority: 94, guard: null },
|
|
3944
|
+
R3: { id: "R3", name: "G0 \u901A\u8FC7\u65E0\u8BA1\u5212", level: "high", priority: 92, guard: null },
|
|
3945
|
+
R4: { id: "R4", name: "\u6210\u529F\u6807\u51C6\u4E0D\u805A\u7126", level: "medium", priority: 50, guard: null },
|
|
3946
|
+
R5: { id: "R5", name: "\u573A\u666F\u4E0D\u805A\u7126", level: "medium", priority: 48, guard: null },
|
|
3947
|
+
R6: { id: "R6", name: "\u98CE\u9669\u8D85\u9650", level: "medium", priority: 46, guard: null },
|
|
3948
|
+
R7: { id: "R7", name: "G2 \u672A\u5C31\u7EEA\u5DF2\u5F00\u6D4B", level: "high", priority: 84, guard: null },
|
|
3949
|
+
R8: { id: "R8", name: "\u8FDB\u5C55\u65E0\u8BC1\u636E", level: "high", priority: 82, guard: null },
|
|
3950
|
+
R9: { id: "R9", name: "\u6709\u8BC1\u636E\u65E0\u8BA4\u53EF", level: "high", priority: 80, guard: null },
|
|
3951
|
+
R10: { id: "R10", name: "G3-1 \u65E0 G3-2", level: "high", priority: 78, guard: null },
|
|
3952
|
+
R11: { id: "R11", name: "\u8FBE\u6210\u65E0\u4E0B\u4E00\u6B65", level: "high", priority: 96, guard: null },
|
|
3953
|
+
R12: { id: "R12", name: "\u9636\u6BB5\u505C\u6EDE", level: "medium", priority: 40, guard: null },
|
|
3954
|
+
R13: { id: "R13", name: "\u573A\u666F\u65E0\u8BC1\u636E", level: "high", priority: 88, guard: "requires-progress" },
|
|
3955
|
+
R14: { id: "R14", name: "\u573A\u666F\u5F85\u5BA2\u6237\u786E\u8BA4", level: "info", priority: 30, guard: null },
|
|
3956
|
+
R15: { id: "R15", name: "\u6307\u6807\u672A\u9A8C\u8BC1", level: "medium", priority: 44, guard: "criteria-count-in-range" },
|
|
3957
|
+
R16: { id: "R16", name: "\u573A\u666F\u672A\u5F00\u59CB", level: "medium", priority: 42, guard: "scenarios-count-in-range-and-progress" }
|
|
3958
|
+
});
|
|
3959
|
+
|
|
1554
3960
|
// src/gap.ts
|
|
1555
3961
|
var RULE_META = {
|
|
1556
3962
|
// R1: the G0 floor. Nothing downstream is trustworthy without it.
|
|
@@ -1573,7 +3979,14 @@ window.__ModuleLoader__.load({
|
|
|
1573
3979
|
// original design documented: value was created and none of it was banked.
|
|
1574
3980
|
"R11-no-next-milestone": { no: 11, level: "high", priority: 96 },
|
|
1575
3981
|
// R12: the project has not moved.
|
|
1576
|
-
"R12-stage-stalled": { no: 12, level: "medium", priority: 40 }
|
|
3982
|
+
"R12-stage-stalled": { no: 12, level: "medium", priority: 40 },
|
|
3983
|
+
// R13–R16: the plan is the right shape but the work has not moved. A scenario
|
|
3984
|
+
// with no evidence behind it is the state-level twin of R8, per item instead
|
|
3985
|
+
// of per entry.
|
|
3986
|
+
"R13-scenario-no-evidence": { no: 13, level: "high", priority: 88 },
|
|
3987
|
+
"R14-scenario-awaiting-customer": { no: 14, level: "info", priority: 30 },
|
|
3988
|
+
"R15-criteria-unverified": { no: 15, level: "medium", priority: 44 },
|
|
3989
|
+
"R16-scenario-not-started": { no: 16, level: "medium", priority: 42 }
|
|
1577
3990
|
};
|
|
1578
3991
|
|
|
1579
3992
|
// src/client/blockers.tsx
|
|
@@ -1614,6 +4027,11 @@ window.__ModuleLoader__.load({
|
|
|
1614
4027
|
const meta = RULE_META[row.rule];
|
|
1615
4028
|
return `R${meta.no} ${format(t(`gap.${row.rule}.title`), { ...row.params })}`;
|
|
1616
4029
|
}
|
|
4030
|
+
function levelRank(level) {
|
|
4031
|
+
if (level === "high") return 3;
|
|
4032
|
+
if (level === "medium") return 2;
|
|
4033
|
+
return 1;
|
|
4034
|
+
}
|
|
1617
4035
|
function groupByProject(rows) {
|
|
1618
4036
|
const groups = /* @__PURE__ */ new Map();
|
|
1619
4037
|
for (const row of rows) {
|
|
@@ -1629,7 +4047,7 @@ window.__ModuleLoader__.load({
|
|
|
1629
4047
|
continue;
|
|
1630
4048
|
}
|
|
1631
4049
|
existing.rows.push(row);
|
|
1632
|
-
if (row.level
|
|
4050
|
+
if (levelRank(row.level) > levelRank(existing.level)) existing.level = row.level;
|
|
1633
4051
|
}
|
|
1634
4052
|
return [...groups.values()];
|
|
1635
4053
|
}
|
|
@@ -1696,104 +4114,9 @@ window.__ModuleLoader__.load({
|
|
|
1696
4114
|
] }, group.pocId)) })
|
|
1697
4115
|
] });
|
|
1698
4116
|
}
|
|
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
4117
|
|
|
1775
4118
|
// src/client/detail.tsx
|
|
1776
4119
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1777
|
-
var DIMENSION_TEXT = {
|
|
1778
|
-
achievement: "dimAchievement",
|
|
1779
|
-
evidence: "dimEvidence",
|
|
1780
|
-
recognition: "dimRecognition",
|
|
1781
|
-
nextMilestone: "dimNextMilestone"
|
|
1782
|
-
};
|
|
1783
|
-
var DIMENSION_ORIGIN = {
|
|
1784
|
-
achievement: "auto",
|
|
1785
|
-
evidence: "manual",
|
|
1786
|
-
recognition: "auto",
|
|
1787
|
-
nextMilestone: "manual"
|
|
1788
|
-
};
|
|
1789
|
-
var G0_LABEL = {
|
|
1790
|
-
why_customer: "whyCustomerTest",
|
|
1791
|
-
why_us: "whyWeTest",
|
|
1792
|
-
decision_chain: "decisionChain",
|
|
1793
|
-
post_poc_decision: "postPocDecision",
|
|
1794
|
-
tech_owner: "customerTechOwner"
|
|
1795
|
-
};
|
|
1796
|
-
var G0_PROSE = /* @__PURE__ */ new Set(["why_customer", "why_us"]);
|
|
1797
4120
|
function recognitionTone(value) {
|
|
1798
4121
|
if (value === "\u8BA4\u53EF") return "green";
|
|
1799
4122
|
if (value === "\u90E8\u5206\u8BA4\u53EF" || value === "\u5F85\u786E\u8BA4") return "amber";
|
|
@@ -1806,6 +4129,46 @@ window.__ModuleLoader__.load({
|
|
|
1806
4129
|
if (level === "low") return "green";
|
|
1807
4130
|
return "slate";
|
|
1808
4131
|
}
|
|
4132
|
+
function priorityLabelKey(priority) {
|
|
4133
|
+
if (priority === "strategic") return "priorityStrategic";
|
|
4134
|
+
if (priority === "high") return "priorityHigh";
|
|
4135
|
+
if (priority === "normal") return "priorityNormal";
|
|
4136
|
+
return "priorityUnknown";
|
|
4137
|
+
}
|
|
4138
|
+
function scenarioNameOf(detail, id) {
|
|
4139
|
+
const found = detail.plan.scenarios.find((item) => item.id === id);
|
|
4140
|
+
return found === void 0 ? "" : found.name;
|
|
4141
|
+
}
|
|
4142
|
+
function scenarioTone(status) {
|
|
4143
|
+
if (status === "\u5DF2\u8BC1\u660E") return "green";
|
|
4144
|
+
if (status === "\u5F85\u5BA2\u6237\u786E\u8BA4") return "amber";
|
|
4145
|
+
if (status === "\u65E0\u8BC1\u636E") return "red";
|
|
4146
|
+
return "slate";
|
|
4147
|
+
}
|
|
4148
|
+
function scenarioGlyph(status) {
|
|
4149
|
+
if (status === "\u5DF2\u8BC1\u660E") return "\u25CF";
|
|
4150
|
+
if (status === "\u5F85\u5BA2\u6237\u786E\u8BA4") return "\u25D0";
|
|
4151
|
+
if (status === "\u65E0\u8BC1\u636E") return "\u25CB";
|
|
4152
|
+
return "\u2014";
|
|
4153
|
+
}
|
|
4154
|
+
function criterionTone(status) {
|
|
4155
|
+
if (status === "\u5DF2\u8FBE\u6210") return "green";
|
|
4156
|
+
if (status === "\u90E8\u5206\u8FBE\u6210") return "amber";
|
|
4157
|
+
if (status === "\u672A\u8FBE\u6210") return "red";
|
|
4158
|
+
return "slate";
|
|
4159
|
+
}
|
|
4160
|
+
var SCENARIO_STATUS_KEY = {
|
|
4161
|
+
\u5DF2\u8BC1\u660E: "Proven",
|
|
4162
|
+
\u5F85\u5BA2\u6237\u786E\u8BA4: "Awaiting",
|
|
4163
|
+
\u65E0\u8BC1\u636E: "NoEvidence",
|
|
4164
|
+
\u672A\u5F00\u59CB: "NotStarted"
|
|
4165
|
+
};
|
|
4166
|
+
var CRITERION_STATUS_KEY = {
|
|
4167
|
+
\u5DF2\u8FBE\u6210: "Proven",
|
|
4168
|
+
\u90E8\u5206\u8FBE\u6210: "Partial",
|
|
4169
|
+
\u672A\u8FBE\u6210: "Failed",
|
|
4170
|
+
\u672A\u9A8C\u8BC1: "Unverified"
|
|
4171
|
+
};
|
|
1809
4172
|
function completionRatio(value) {
|
|
1810
4173
|
const match = value.match(/^(\d+(?:\.\d+)?)\s*%/u);
|
|
1811
4174
|
if (match === null) return null;
|
|
@@ -1813,42 +4176,6 @@ window.__ModuleLoader__.load({
|
|
|
1813
4176
|
if (!Number.isFinite(parsed)) return null;
|
|
1814
4177
|
return Math.min(1, Math.max(0, parsed / 100));
|
|
1815
4178
|
}
|
|
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
|
-
}
|
|
1852
4179
|
function Section({ title, kicker, children }) {
|
|
1853
4180
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: "dsec", children: [
|
|
1854
4181
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "dsec-head", children: [
|
|
@@ -1867,193 +4194,26 @@ window.__ModuleLoader__.load({
|
|
|
1867
4194
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dt-prose-body prose", children: value === "" ? t("emptyField") : value })
|
|
1868
4195
|
] });
|
|
1869
4196
|
}
|
|
1870
|
-
function
|
|
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 })
|
|
1874
|
-
] });
|
|
1875
|
-
}
|
|
1876
|
-
function StageTrackVertical({ detail, t }) {
|
|
1877
|
-
const currentIndex = detail.summary.stage === null ? -1 : STAGES.indexOf(detail.summary.stage);
|
|
1878
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ol", { className: "dt-stages", "aria-label": t("stageTrack"), children: STAGES.map((stage, index) => {
|
|
1879
|
-
const done = detail.summary.closed ? true : detail.summary.stageDone[index] === true;
|
|
1880
|
-
const current = !detail.summary.closed && index === currentIndex;
|
|
1881
|
-
const state = done ? t("stageDone") : current ? t("stageCurrent") : t("stagePending");
|
|
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 })
|
|
1887
|
-
] })
|
|
1888
|
-
] }, stage);
|
|
1889
|
-
}) });
|
|
1890
|
-
}
|
|
1891
|
-
function IdentityRail({ props }) {
|
|
1892
|
-
const { detail, gaps, t, position, onPrev, onNext, onBack, locale } = props;
|
|
1893
|
-
const summary = detail.summary;
|
|
1894
|
-
const resolved = {
|
|
1895
|
-
achievement: detail.outcome.achievement,
|
|
1896
|
-
evidence: detail.outcome.ourProof,
|
|
1897
|
-
recognition: detail.outcome.customerRecognition,
|
|
1898
|
-
nextMilestone: detail.outcome.milestone
|
|
1899
|
-
};
|
|
1900
|
-
const present = {
|
|
1901
|
-
achievement: detail.outcome.achievement !== "",
|
|
1902
|
-
evidence: detail.outcome.ourProof !== "",
|
|
1903
|
-
recognition: detail.outcome.customerRecognition !== "",
|
|
1904
|
-
nextMilestone: detail.outcome.milestone !== ""
|
|
1905
|
-
};
|
|
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" }),
|
|
1914
|
-
summary.closed ? t("stageClosed") : summary.stageLabel === "" ? t("stageUnknown") : summary.stageLabel
|
|
1915
|
-
] }),
|
|
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 })
|
|
1918
|
-
] })
|
|
1919
|
-
] }),
|
|
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: [
|
|
1923
|
-
formatWan(summary.amountWan),
|
|
1924
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-rail-amount-unit", children: t("statAmountUnit") })
|
|
1925
|
-
] })
|
|
1926
|
-
] }),
|
|
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 })
|
|
1930
|
-
] }),
|
|
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]) })
|
|
1936
|
-
] }, key)) })
|
|
1937
|
-
] }),
|
|
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: [
|
|
1942
|
-
"R",
|
|
1943
|
-
item.ruleNo
|
|
1944
|
-
] }),
|
|
1945
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-rail-gap-title", children: format(t(`gap.${item.rule}.title`), { ...item.params ?? {} }) })
|
|
1946
|
-
] }, item.rule)) })
|
|
1947
|
-
] }),
|
|
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 })
|
|
1960
|
-
] })
|
|
1961
|
-
] }),
|
|
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: [
|
|
1964
|
-
"\u2190 ",
|
|
1965
|
-
t("dtPrevProject")
|
|
1966
|
-
] }),
|
|
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: [
|
|
1969
|
-
t("dtNextProject"),
|
|
1970
|
-
" \u2192"
|
|
1971
|
-
] })
|
|
1972
|
-
] })
|
|
1973
|
-
] });
|
|
1974
|
-
}
|
|
1975
|
-
function ProgressItem({ entry, index, t, locale }) {
|
|
4197
|
+
function ProgressItem({ entry, index, t, locale, detail }) {
|
|
1976
4198
|
const tone = recognitionTone(entry.customer.recognition);
|
|
1977
4199
|
const ratio = completionRatio(entry.completion);
|
|
1978
|
-
const hasNext = entry.next.goal !== "" || entry.next.owner !== "" || entry.next.deadline !== "";
|
|
1979
4200
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "prog-item", "data-tone": tone, "data-latest": index === 0, children: [
|
|
1980
4201
|
/* @__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: [
|
|
4202
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("article", { className: "prog-card prog-card-compact", children: [
|
|
1982
4203
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "prog-head", children: [
|
|
1983
4204
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("time", { className: "prog-date", dateTime: entry.date, children: formatDate(entry.date, locale) || "\u2014" }),
|
|
1984
4205
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-type", children: entry.type === "" ? t("progressTypeUnset") : entry.type }),
|
|
1985
|
-
entry.
|
|
1986
|
-
ratio === null ? entry.completion === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.
|
|
1987
|
-
t("dtProgressCompletion"),
|
|
1988
|
-
" ",
|
|
1989
|
-
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") }),
|
|
4206
|
+
entry.change === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-change", children: entry.change }),
|
|
4207
|
+
ratio === null ? entry.completion === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-chip", children: entry.completion }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "prog-meter", children: [
|
|
1992
4208
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InlineMeter, { value: ratio, max: 1, tone: ratio >= 1 ? "green" : "blue" }),
|
|
1993
4209
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-meter-value", children: entry.completion })
|
|
1994
4210
|
] })
|
|
1995
4211
|
] }),
|
|
1996
|
-
entry.
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
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 })
|
|
2004
|
-
] })
|
|
2005
|
-
] }),
|
|
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}`)) })
|
|
2009
|
-
] }),
|
|
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) => {
|
|
2013
|
-
const label = `${item.type === "" ? "" : `${item.type} \xB7 `}${item.title === "" ? t("emptyField") : item.title}`;
|
|
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: [
|
|
2015
|
-
label,
|
|
2016
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "prog-external", "aria-hidden": "true", children: "\u2197" })
|
|
2017
|
-
] }, `${item.title}:${itemIndex}`);
|
|
2018
|
-
}) })
|
|
2019
|
-
] }),
|
|
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" }),
|
|
2025
|
-
entry.customer.recognition
|
|
2026
|
-
] }),
|
|
2027
|
-
entry.gate3_1 === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "chip", children: [
|
|
2028
|
-
t("gate3_1Label"),
|
|
2029
|
-
"\uFF1A",
|
|
2030
|
-
entry.gate3_1
|
|
2031
|
-
] }),
|
|
2032
|
-
entry.gate3_2 === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "chip", children: [
|
|
2033
|
-
t("gate3_2Label"),
|
|
2034
|
-
"\uFF1A",
|
|
2035
|
-
entry.gate3_2
|
|
2036
|
-
] })
|
|
2037
|
-
] }),
|
|
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 })
|
|
2041
|
-
] }),
|
|
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: [
|
|
2047
|
-
"@ ",
|
|
2048
|
-
entry.next.owner
|
|
2049
|
-
] }),
|
|
2050
|
-
entry.next.deadline === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "chip", children: [
|
|
2051
|
-
t("dtProgressDeadline"),
|
|
2052
|
-
" ",
|
|
2053
|
-
formatDate(entry.next.deadline, locale)
|
|
2054
|
-
] })
|
|
2055
|
-
] })
|
|
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") }) })
|
|
4212
|
+
entry.actual === "" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "prog-actual-line", "data-empty": "true", children: t("emptyField") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "prog-actual-line", children: entry.actual }),
|
|
4213
|
+
entry.scenarioIds.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "chip-row prog-scope-row", children: entry.scenarioIds.map((id, itemIndex) => {
|
|
4214
|
+
const linked = scenarioNameOf(detail, id);
|
|
4215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "chip", children: linked === "" ? id : linked }, `${id}:${itemIndex}`);
|
|
4216
|
+
}) })
|
|
2057
4217
|
] })
|
|
2058
4218
|
] });
|
|
2059
4219
|
}
|
|
@@ -2065,56 +4225,7 @@ window.__ModuleLoader__.load({
|
|
|
2065
4225
|
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
4226
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "dsec-empty-title", children: t("dtProgressEmptyTitle") }),
|
|
2067
4227
|
/* @__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}`)) }) });
|
|
2069
|
-
}
|
|
2070
|
-
function DimensionGrid({ detail, t }) {
|
|
2071
|
-
const values = {
|
|
2072
|
-
achievement: detail.outcome.achievement,
|
|
2073
|
-
evidence: detail.outcome.ourProof,
|
|
2074
|
-
recognition: detail.outcome.customerRecognition,
|
|
2075
|
-
nextMilestone: detail.outcome.milestone
|
|
2076
|
-
};
|
|
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) => {
|
|
2078
|
-
const present = values[key] !== "";
|
|
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") })
|
|
2085
|
-
] }, key);
|
|
2086
|
-
}) }) });
|
|
2087
|
-
}
|
|
2088
|
-
function Gate0Meter({ detail, t }) {
|
|
2089
|
-
const checklist = detail.gate0.checklist;
|
|
2090
|
-
const presentCount = checklist.filter((item) => item.present).length;
|
|
2091
|
-
const review = detail.gate0.conclusion === "" ? t("dtG0Unreviewed") : format(t("dtG0ReviewLine"), {
|
|
2092
|
-
reviewer: detail.gate0.reviewer === "" ? t("dtUnset") : detail.gate0.reviewer,
|
|
2093
|
-
date: detail.gate0.reviewedAt === "" ? t("dtUnset") : detail.gate0.reviewedAt,
|
|
2094
|
-
conclusion: detail.gate0.conclusion
|
|
2095
|
-
});
|
|
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) })
|
|
2100
|
-
] }, item.field)) }),
|
|
2101
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "g0-fields", children: checklist.map((item) => {
|
|
2102
|
-
const label = t(G0_LABEL[item.field] ?? item.field);
|
|
2103
|
-
const prose = G0_PROSE.has(item.field);
|
|
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") })
|
|
2107
|
-
] }, item.field);
|
|
2108
|
-
}) }),
|
|
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: [
|
|
2112
|
-
t("competitor"),
|
|
2113
|
-
"\uFF1A",
|
|
2114
|
-
detail.gate0.competitor
|
|
2115
|
-
] })
|
|
2116
|
-
] })
|
|
2117
|
-
] });
|
|
4228
|
+
] }) : /* @__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, detail }, `${entry.date}:${entry.seq ?? index}`)) }) });
|
|
2118
4229
|
}
|
|
2119
4230
|
function orgText(value) {
|
|
2120
4231
|
return value === null || value === void 0 ? "" : value;
|
|
@@ -2156,154 +4267,311 @@ window.__ModuleLoader__.load({
|
|
|
2156
4267
|
] })
|
|
2157
4268
|
] });
|
|
2158
4269
|
}
|
|
2159
|
-
function
|
|
2160
|
-
const
|
|
2161
|
-
|
|
2162
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
4270
|
+
function ScenarioDetail({ detail, scenarioId, t }) {
|
|
4271
|
+
const scenario = detail.plan.scenarios.find((item) => item.id === scenarioId);
|
|
4272
|
+
if (scenario === void 0) {
|
|
4273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Section, { title: t("dtScenarioTitle"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtScenarioNotFound") }) });
|
|
4274
|
+
}
|
|
4275
|
+
const tone = scenarioTone(scenario.status);
|
|
4276
|
+
const entries = detail.progress.filter((entry) => entry.scenarioIds.includes(scenarioId)).slice().sort((left, right) => right.date === left.date ? (right.seq ?? 0) - (left.seq ?? 0) : right.date.localeCompare(left.date));
|
|
4277
|
+
const evidence = entries.flatMap((entry) => entry.evidence.map((item) => ({ ...item, date: entry.date })));
|
|
4278
|
+
const latestWithCustomer = entries.find((entry) => entry.customer.syncedWith !== "" || entry.customer.feedback !== "" || entry.customer.recognition !== "");
|
|
4279
|
+
const latest = entries[0];
|
|
4280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Section, { title: t("dtScenarioTitle"), kicker: scenario.name, children: [
|
|
4281
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "sd-head", "data-tone": tone, children: [
|
|
4282
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-head-no", children: scenario.id }),
|
|
4283
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-head-name", children: scenario.name === "" ? t("emptyField") : scenario.name }),
|
|
4284
|
+
scenario.status === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${tone}`, children: [
|
|
4285
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
|
|
4286
|
+
t(`dtStatus${SCENARIO_STATUS_KEY[scenario.status] ?? "NoEvidence"}`)
|
|
4287
|
+
] })
|
|
4288
|
+
] }),
|
|
4289
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-prose", "data-empty": scenario.goal === "", children: [
|
|
4290
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-prose-label", children: t("dtScenarioGoal") }),
|
|
4291
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "dt-prose-body prose", children: scenario.goal === "" ? t("emptyField") : scenario.goal })
|
|
2166
4292
|
] }),
|
|
2167
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-
|
|
2168
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("
|
|
2169
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("
|
|
2170
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-
|
|
4293
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-block", children: [
|
|
4294
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "plan-block-head", children: [
|
|
4295
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "plan-block-title", children: t("dtScenarioEvidence") }),
|
|
4296
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-block-note", children: format(t("dtPlanScenarioEvidence"), { count: evidence.length }) })
|
|
2171
4297
|
] }),
|
|
2172
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("
|
|
2173
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "
|
|
2174
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.
|
|
4298
|
+
evidence.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtScenarioEvidenceNone") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: "sd-evidence", children: evidence.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "sd-evidence-row", children: [
|
|
4299
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-evidence-type", children: item.type === "" ? t("dtUnset") : item.type }),
|
|
4300
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-evidence-title", children: item.title === "" ? t("emptyField") : item.title }),
|
|
4301
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-evidence-date", children: item.date }),
|
|
4302
|
+
item.link === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { className: "sd-evidence-link", href: item.link, target: "_blank", rel: "noreferrer noopener", children: t("dtPlanScenarioDetail") })
|
|
4303
|
+
] }, `${item.title}:${index}`)) })
|
|
4304
|
+
] }),
|
|
4305
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-block", children: [
|
|
4306
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("header", { className: "plan-block-head", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "plan-block-title", children: t("dtScenarioCustomer") }) }),
|
|
4307
|
+
latestWithCustomer === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtScenarioFeedbackEmpty") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "sd-customer", children: [
|
|
4308
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "sd-customer-sync", children: [
|
|
4309
|
+
t("dtScenarioSyncedWith"),
|
|
4310
|
+
"\uFF1A",
|
|
4311
|
+
latestWithCustomer.customer.syncedWith === "" ? t("dtUnset") : latestWithCustomer.customer.syncedWith,
|
|
4312
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-customer-date", children: latestWithCustomer.date })
|
|
4313
|
+
] }),
|
|
4314
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "sd-customer-feedback prose", children: latestWithCustomer.customer.feedback === "" ? t("dtUnset") : latestWithCustomer.customer.feedback }),
|
|
4315
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${recognitionTone(latestWithCustomer.customer.recognition)}`, children: [
|
|
2175
4316
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
|
|
2176
|
-
|
|
4317
|
+
latestWithCustomer.customer.recognition === "" ? t("dtUnset") : latestWithCustomer.customer.recognition
|
|
2177
4318
|
] })
|
|
2178
|
-
] })
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
4319
|
+
] })
|
|
4320
|
+
] }),
|
|
4321
|
+
latest === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-block", children: [
|
|
4322
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("header", { className: "plan-block-head", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "plan-block-title", children: t("dtScenarioGate3") }) }),
|
|
4323
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "sd-gate3", children: [
|
|
4324
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${latest.gate3_1 === "\u53EF\u8BC1\u660E" ? "green" : "amber"}`, children: [
|
|
2182
4325
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
4326
|
+
"G3-1 ",
|
|
4327
|
+
latest.gate3_1 === "" ? t("dtUnset") : latest.gate3_1
|
|
4328
|
+
] }),
|
|
4329
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${latest.gate3_2 === "\u5DF2\u786E\u8BA4" ? "green" : "amber"}`, children: [
|
|
4330
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
|
|
4331
|
+
"G3-2 ",
|
|
4332
|
+
latest.gate3_2 === "" ? t("dtUnset") : latest.gate3_2
|
|
4333
|
+
] }),
|
|
4334
|
+
latest.gate3_1 === "\u53EF\u8BC1\u660E" && latest.gate3_2 !== "\u5DF2\u786E\u8BA4" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-gate3-note", children: "R10" }) : null
|
|
2189
4335
|
] })
|
|
2190
4336
|
] }),
|
|
2191
4337
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "plan-block", children: [
|
|
2192
4338
|
/* @__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("
|
|
2194
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-block-note", children:
|
|
4339
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: "plan-block-title", children: t("dtScenarioLinked") }),
|
|
4340
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-block-note", children: format(t("dtProgressCountLabel"), { count: entries.length }) })
|
|
2195
4341
|
] }),
|
|
2196
|
-
|
|
2197
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
4342
|
+
entries.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtScenarioLinkedNone") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: "sd-linked", children: entries.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "sd-linked-row", children: [
|
|
4343
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-linked-date", children: entry.date }),
|
|
4344
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "sd-linked-seq", children: [
|
|
4345
|
+
"#",
|
|
4346
|
+
entry.seq ?? "\u2014"
|
|
4347
|
+
] }),
|
|
4348
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-linked-change", children: entry.change === "" ? t("dtUnset") : entry.change }),
|
|
4349
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sd-linked-actual", children: entry.actual === "" ? t("emptyField") : entry.actual })
|
|
4350
|
+
] }, entry.seq ?? entry.date)) })
|
|
4351
|
+
] })
|
|
4352
|
+
] });
|
|
4353
|
+
}
|
|
4354
|
+
function PageHeader({ props }) {
|
|
4355
|
+
const { detail, t, position, onPrev, onNext, onBack } = props;
|
|
4356
|
+
const summary = detail.summary;
|
|
4357
|
+
const org = [orgText(detail.org.system), orgText(detail.org.company), summary.pocType].filter((part) => part !== "");
|
|
4358
|
+
const owner = summary.owner === "" ? "" : `${t("dtOwnerLabel")} ${summary.owner}`;
|
|
4359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("header", { className: "dt-header", children: [
|
|
4360
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-header-main", children: [
|
|
4361
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", className: "btn btn-small dt-header-back", onClick: onBack, children: t("back") }),
|
|
4362
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h1", { className: "dt-header-title", children: summary.name }),
|
|
4363
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-header-meta", children: [
|
|
4364
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-header-id mono", children: summary.pocId }),
|
|
4365
|
+
org.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-header-org", children: org.join(" \xB7 ") }),
|
|
4366
|
+
owner === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-header-org", children: owner })
|
|
2209
4367
|
] })
|
|
2210
4368
|
] }),
|
|
2211
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "
|
|
2212
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("
|
|
2213
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.
|
|
2214
|
-
|
|
4369
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-header-side", children: [
|
|
4370
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-header-pills", children: [
|
|
4371
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "status-pill tone-blue", children: [
|
|
4372
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
|
|
4373
|
+
summary.closed ? t("stageClosed") : summary.stageLabel === "" ? t("stageUnknown") : summary.stageLabel
|
|
4374
|
+
] }),
|
|
4375
|
+
summary.status === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-pill tone-slate", children: summary.status }),
|
|
4376
|
+
summary.priority === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: `status-pill tone-${summary.priority === "normal" ? "slate" : "amber"}`, children: t(priorityLabelKey(summary.priority)) })
|
|
2215
4377
|
] }),
|
|
2216
|
-
|
|
2217
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "
|
|
2218
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "
|
|
2219
|
-
|
|
4378
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-header-amount", children: [
|
|
4379
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-header-amount-label", children: t("dtAmountLabel") }),
|
|
4380
|
+
summary.amountWan === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-header-amount-value", "data-empty": "true", children: t("dtUnset") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "dt-header-amount-value", children: [
|
|
4381
|
+
formatWan(summary.amountWan),
|
|
4382
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-header-amount-unit", children: t("statAmountUnit") })
|
|
4383
|
+
] })
|
|
4384
|
+
] })
|
|
2220
4385
|
] }),
|
|
2221
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("
|
|
2222
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("
|
|
2223
|
-
|
|
2224
|
-
|
|
4386
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("nav", { className: "dt-header-nav", "aria-label": t("dtRailTitle"), children: [
|
|
4387
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", className: "btn btn-small", disabled: onPrev === null, onClick: onPrev ?? void 0, children: [
|
|
4388
|
+
"\u2190 ",
|
|
4389
|
+
t("dtPrevProject")
|
|
2225
4390
|
] }),
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
risk.mitigation === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-risk-mitigation", children: [
|
|
2232
|
-
t("dtPlanMitigation"),
|
|
2233
|
-
"\uFF1A",
|
|
2234
|
-
risk.mitigation
|
|
2235
|
-
] })
|
|
2236
|
-
] })
|
|
2237
|
-
] }, `${risk.name}:${index}`)) })
|
|
4391
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-header-position", children: format(t("dtPosition"), { index: position.index, total: position.total }) }),
|
|
4392
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("button", { type: "button", className: "btn btn-small", disabled: onNext === null, onClick: onNext ?? void 0, children: [
|
|
4393
|
+
t("dtNextProject"),
|
|
4394
|
+
" \u2192"
|
|
4395
|
+
] })
|
|
2238
4396
|
] })
|
|
2239
4397
|
] });
|
|
2240
4398
|
}
|
|
2241
|
-
function
|
|
2242
|
-
const
|
|
2243
|
-
const
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "
|
|
2260
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
4399
|
+
function Gate0Grid({ detail, t }) {
|
|
4400
|
+
const gate0 = detail.gate0;
|
|
4401
|
+
const answered = gate0.checklist.filter((item) => item.present).length;
|
|
4402
|
+
const cards = [
|
|
4403
|
+
{ key: "why_customer", label: t("whyCustomerTest"), value: gate0.whyCustomer, present: gate0.whyCustomer !== "", prose: true },
|
|
4404
|
+
{ key: "why_us", label: t("whyWeTest"), value: gate0.whyUs, present: gate0.whyUs !== "", prose: true },
|
|
4405
|
+
{ key: "post_poc_decision", label: t("postPocDecision"), value: gate0.postPocDecision, present: gate0.postPocDecision !== "", prose: false },
|
|
4406
|
+
{ key: "decision_chain", label: t("decisionChain"), value: gate0.decisionChain, present: gate0.decisionChain !== "", prose: false },
|
|
4407
|
+
{ key: "competitor", label: t("competitor"), value: gate0.competitor, present: gate0.competitor !== "", prose: false },
|
|
4408
|
+
{
|
|
4409
|
+
key: "review",
|
|
4410
|
+
label: t("dtG0ReviewTitle"),
|
|
4411
|
+
value: gate0.conclusion === "" ? "" : [gate0.conclusion, gate0.reviewer, gate0.reviewedAt].filter((part) => part !== "").join(" \xB7 "),
|
|
4412
|
+
present: gate0.conclusion !== "",
|
|
4413
|
+
prose: false
|
|
4414
|
+
}
|
|
4415
|
+
];
|
|
4416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Section, { title: t("dtG0GridTitle"), kicker: format(t("dtG0Answered"), { answered, total: gate0.checklist.length }), children: [
|
|
4417
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "g0-grid", children: cards.map((card) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "g0-card", "data-present": card.present, "data-prose": card.prose, children: [
|
|
4418
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "g0-card-head", children: [
|
|
4419
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "g0-card-label", children: card.label }),
|
|
4420
|
+
card.present ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "g0-card-missing", children: t("dtG0Missing") })
|
|
4421
|
+
] }),
|
|
4422
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "g0-card-body", "data-empty": !card.present, children: card.present ? card.value : t("emptyField") })
|
|
4423
|
+
] }, card.key)) }),
|
|
4424
|
+
gate0.missing.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "g0-grid-note", children: format(t("dtG0MissingNote"), { count: gate0.missing.length }) })
|
|
2265
4425
|
] });
|
|
2266
4426
|
}
|
|
2267
|
-
function
|
|
2268
|
-
const
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
4427
|
+
function CriteriaPanel({ detail, t }) {
|
|
4428
|
+
const plan = detail.plan;
|
|
4429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Section, { title: t("dtPlanCriteria"), kicker: plan.criteria.length === 0 ? void 0 : format(t("dtPlanCriteriaCount"), { count: plan.criteria.length }), children: 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: [
|
|
4430
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { children: [
|
|
4431
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanCriteria") }),
|
|
4432
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanMetric") }),
|
|
4433
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanBaseline") }),
|
|
4434
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanTarget") }),
|
|
4435
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtPlanCriteriaStatus") })
|
|
4436
|
+
] }) }),
|
|
4437
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tbody", { children: plan.criteria.map((criterion, index) => {
|
|
4438
|
+
const status = criterion.status;
|
|
4439
|
+
const tone = criterionTone(status);
|
|
4440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { children: [
|
|
4441
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "plan-criterion-name", children: criterion.name === "" ? t("emptyField") : criterion.name }),
|
|
4442
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { children: criterion.metric === "" ? t("emptyField") : criterion.metric }),
|
|
4443
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "plan-criterion-num", children: criterion.baseline === "" ? "\u2014" : criterion.baseline }),
|
|
4444
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "plan-criterion-target", children: criterion.target === "" ? "\u2014" : criterion.target }),
|
|
4445
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "plan-criterion-status", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${tone}`, children: [
|
|
4446
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
|
|
4447
|
+
t(`dtCrit${CRITERION_STATUS_KEY[status] ?? "Unverified"}`)
|
|
4448
|
+
] }) })
|
|
4449
|
+
] }, criterion.id === "" ? `${criterion.name}:${index}` : criterion.id);
|
|
4450
|
+
}) })
|
|
4451
|
+
] }) });
|
|
4452
|
+
}
|
|
4453
|
+
function ScenarioPanel({ detail, t, onOpenScenario }) {
|
|
4454
|
+
const plan = detail.plan;
|
|
4455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Section, { title: t("dtPlanScenarios"), kicker: plan.scenarios.length === 0 ? void 0 : format(t("dtPlanScenariosCount"), { count: plan.scenarios.length }), children: 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) => {
|
|
4456
|
+
const tone = scenarioTone(scenario.status);
|
|
4457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "plan-scenario", "data-tone": tone, children: [
|
|
4458
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-scenario-no", children: String(index + 1).padStart(2, "0") }),
|
|
4459
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-scenario-body", children: [
|
|
4460
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-scenario-name", children: scenario.name === "" ? t("emptyField") : scenario.name }),
|
|
4461
|
+
scenario.goal === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-scenario-goal", children: [
|
|
4462
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-scenario-goal-label", children: t("dtPlanScenarioGoal") }),
|
|
4463
|
+
scenario.goal
|
|
4464
|
+
] })
|
|
4465
|
+
] }),
|
|
4466
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-scenario-tail", children: [
|
|
4467
|
+
scenario.status === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
4468
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-scenario-glyph", "aria-hidden": "true", children: scenarioGlyph(scenario.status) }),
|
|
4469
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${tone}`, children: [
|
|
4470
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
|
|
4471
|
+
t(`dtStatus${SCENARIO_STATUS_KEY[scenario.status] ?? "NoEvidence"}`)
|
|
4472
|
+
] }),
|
|
4473
|
+
scenario.evidenceCount === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-scenario-evidence", children: format(t("dtPlanScenarioEvidence"), { count: scenario.evidenceCount }) })
|
|
4474
|
+
] }),
|
|
4475
|
+
scenario.id === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
2292
4476
|
"button",
|
|
2293
4477
|
{
|
|
2294
4478
|
type: "button",
|
|
2295
|
-
className: "
|
|
2296
|
-
|
|
2297
|
-
|
|
4479
|
+
className: "plan-scenario-open",
|
|
4480
|
+
onClick: () => onOpenScenario(scenario.id),
|
|
4481
|
+
"aria-label": `${t("dtPlanScenarioDetail")}: ${scenario.name}`,
|
|
2298
4482
|
children: [
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "dt-fold-arrow", "aria-hidden": "true", children: foldOpen ? "\u25B4" : "\u25BE" })
|
|
4483
|
+
t("dtPlanScenarioDetail"),
|
|
4484
|
+
" \u203A"
|
|
2302
4485
|
]
|
|
2303
4486
|
}
|
|
2304
|
-
)
|
|
2305
|
-
|
|
4487
|
+
)
|
|
4488
|
+
] })
|
|
4489
|
+
] }, scenario.id === "" ? `${scenario.name}:${index}` : scenario.id);
|
|
4490
|
+
}) }) });
|
|
4491
|
+
}
|
|
4492
|
+
function RiskPanel({ detail, t }) {
|
|
4493
|
+
const risks = detail.plan.risks;
|
|
4494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Section, { title: t("dtPlanRisks"), kicker: risks.length === 0 ? void 0 : format(t("dtPlanRisksCount"), { count: risks.length }), children: risks.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtPlanRisksNone") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { className: "plan-risks", children: risks.map((risk, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { className: "plan-risk", "data-tone": riskTone(risk.level), children: [
|
|
4495
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-risk-dot", "aria-hidden": "true" }),
|
|
4496
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-risk-text", children: [
|
|
4497
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-risk-name", children: risk.name === "" ? t("emptyField") : risk.name }),
|
|
4498
|
+
risk.level === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "plan-risk-level", children: risk.level }),
|
|
4499
|
+
risk.mitigation === "" ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "plan-risk-mitigation", children: [
|
|
4500
|
+
t("dtPlanMitigation"),
|
|
4501
|
+
"\uFF1A",
|
|
4502
|
+
risk.mitigation
|
|
4503
|
+
] })
|
|
4504
|
+
] })
|
|
4505
|
+
] }, `${risk.name}:${index}`)) }) });
|
|
4506
|
+
}
|
|
4507
|
+
function NextActionsPanel({ detail, t }) {
|
|
4508
|
+
const outcome = detail.outcome;
|
|
4509
|
+
const newestNext = detail.progress.find((entry) => entry.next.goal !== "" || entry.next.owner !== "" || entry.next.deadline !== "");
|
|
4510
|
+
const rows = [];
|
|
4511
|
+
if (outcome.milestone !== "" || outcome.businessOwner !== "" || outcome.businessDeadline !== "") {
|
|
4512
|
+
rows.push({
|
|
4513
|
+
goal: outcome.milestone,
|
|
4514
|
+
owner: outcome.businessOwner,
|
|
4515
|
+
deadline: outcome.businessDeadline,
|
|
4516
|
+
status: outcome.businessStatus,
|
|
4517
|
+
tone: outcome.businessStatus === "\u5DF2\u8FDB\u5165\u4E0B\u4E00\u91CC\u7A0B\u7891" ? "green" : outcome.businessStatus === "" ? "slate" : "amber"
|
|
4518
|
+
});
|
|
4519
|
+
}
|
|
4520
|
+
if (newestNext !== void 0) {
|
|
4521
|
+
rows.push({
|
|
4522
|
+
goal: newestNext.next.goal,
|
|
4523
|
+
owner: newestNext.next.owner,
|
|
4524
|
+
deadline: newestNext.next.deadline,
|
|
4525
|
+
status: t("dtStatusNotStarted"),
|
|
4526
|
+
tone: "slate"
|
|
4527
|
+
});
|
|
4528
|
+
}
|
|
4529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Section, { title: t("dtNextActionsTitle"), kicker: t("dtNextActionsKicker"), children: rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Blank, { text: t("dtNextActionsNone") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("table", { className: "next-table", children: [
|
|
4530
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { children: [
|
|
4531
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtNextGoal") }),
|
|
4532
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtNextOwner") }),
|
|
4533
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtNextDeadline") }),
|
|
4534
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("th", { children: t("dtNextStatus") })
|
|
4535
|
+
] }) }),
|
|
4536
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tbody", { children: rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { children: [
|
|
4537
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "next-goal", children: row.goal === "" ? t("emptyField") : row.goal }),
|
|
4538
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { children: row.owner === "" ? "\u2014" : row.owner }),
|
|
4539
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: "next-deadline", children: row.deadline === "" ? "\u2014" : row.deadline }),
|
|
4540
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: `status-pill tone-${row.tone}`, children: [
|
|
4541
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "status-dot" }),
|
|
4542
|
+
row.status === "" ? t("dtUnset") : row.status
|
|
4543
|
+
] }) })
|
|
4544
|
+
] }, `${row.goal}:${index}`)) })
|
|
4545
|
+
] }) });
|
|
4546
|
+
}
|
|
4547
|
+
function DetailPage(props) {
|
|
4548
|
+
const { detail, t, locale } = props;
|
|
4549
|
+
const [scenarioId, setScenarioId] = (0, import_react2.useState)(null);
|
|
4550
|
+
if (scenarioId !== null) {
|
|
4551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-shell", children: [
|
|
4552
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PageHeader, { props }),
|
|
4553
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("main", { className: "dt-body", children: [
|
|
4554
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("button", { type: "button", className: "sd-back", onClick: () => setScenarioId(null), children: t("dtScenarioBack") }),
|
|
4555
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ScenarioDetail, { detail, scenarioId, t })
|
|
2306
4556
|
] })
|
|
4557
|
+
] });
|
|
4558
|
+
}
|
|
4559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-shell", children: [
|
|
4560
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PageHeader, { props }),
|
|
4561
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("main", { className: "dt-body", children: [
|
|
4562
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-columns", children: [
|
|
4563
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-col-main", children: [
|
|
4564
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Gate0Grid, { detail, t }),
|
|
4565
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CriteriaPanel, { detail, t }),
|
|
4566
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ScenarioPanel, { detail, t, onOpenScenario: setScenarioId })
|
|
4567
|
+
] }),
|
|
4568
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "dt-col-side", children: [
|
|
4569
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BasicInfo, { detail, t }),
|
|
4570
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ProgressStream, { detail, t, locale }),
|
|
4571
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RiskPanel, { detail, t })
|
|
4572
|
+
] })
|
|
4573
|
+
] }),
|
|
4574
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(NextActionsPanel, { detail, t })
|
|
2307
4575
|
] })
|
|
2308
4576
|
] });
|
|
2309
4577
|
}
|
|
@@ -2629,7 +4897,7 @@ window.__ModuleLoader__.load({
|
|
|
2629
4897
|
|
|
2630
4898
|
// src/client/overview.tsx
|
|
2631
4899
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
2632
|
-
var
|
|
4900
|
+
var DIMENSION_TEXT = {
|
|
2633
4901
|
achievement: "dimAchievement",
|
|
2634
4902
|
evidence: "dimEvidence",
|
|
2635
4903
|
recognition: "dimRecognition",
|
|
@@ -2645,9 +4913,9 @@ window.__ModuleLoader__.load({
|
|
|
2645
4913
|
function DimensionMarks({ project, t }) {
|
|
2646
4914
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "pcard-dims", role: "group", "aria-label": t("colDimensions"), children: DIMENSIONS.map((key) => {
|
|
2647
4915
|
const present = project.dimensions[key];
|
|
2648
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "pcard-dim", "data-present": present, title: `${t(
|
|
4916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "pcard-dim", "data-present": present, title: `${t(DIMENSION_TEXT[key])}: ${present ? t("dimPresent") : t("dimMissing")}`, children: [
|
|
2649
4917
|
/* @__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(
|
|
4918
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "pcard-dim-label", children: t(DIMENSION_TEXT[key]) })
|
|
2651
4919
|
] }, key);
|
|
2652
4920
|
}) });
|
|
2653
4921
|
}
|
|
@@ -2900,7 +5168,9 @@ window.__ModuleLoader__.load({
|
|
|
2900
5168
|
label: `R${row.ruleNo} ${format(t(`gap.${row.rule}.title`), { ...representative.get(row.rule)?.params ?? {} })}`,
|
|
2901
5169
|
value: row.count,
|
|
2902
5170
|
display: format(t("gapRuleFiresLabel"), { count: row.count }),
|
|
2903
|
-
|
|
5171
|
+
// `info` is its own tier (R14): painting it amber would put a project that is
|
|
5172
|
+
// merely waiting on the customer beside one that has no evidence at all.
|
|
5173
|
+
tone: row.level === "high" ? "red" : row.level === "medium" ? "amber" : "slate"
|
|
2904
5174
|
}));
|
|
2905
5175
|
const [collapsed, setCollapsed] = (0, import_react5.useState)(false);
|
|
2906
5176
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("section", { className: "pf-band", "data-collapsed": collapsed, "aria-label": t("bandTitle"), children: [
|
|
@@ -2955,11 +5225,11 @@ window.__ModuleLoader__.load({
|
|
|
2955
5225
|
RadialMeter,
|
|
2956
5226
|
{
|
|
2957
5227
|
ratio: row.ratio,
|
|
2958
|
-
label: t(
|
|
5228
|
+
label: t(DIMENSION_TEXT[row.key]),
|
|
2959
5229
|
value: format(t("coveragePresent"), { present: row.present, total: row.present + row.missing }),
|
|
2960
5230
|
...row.missing > 0 ? { note: format(t("coverageMissingNote"), { count: row.missing }) } : {},
|
|
2961
5231
|
tone: dimensionTone(row.key),
|
|
2962
|
-
ariaLabel: `${t(
|
|
5232
|
+
ariaLabel: `${t(DIMENSION_TEXT[row.key])} ${row.present}/${row.present + row.missing}`
|
|
2963
5233
|
},
|
|
2964
5234
|
row.key
|
|
2965
5235
|
)) })
|
|
@@ -4239,30 +6509,90 @@ window.__ModuleLoader__.load({
|
|
|
4239
6509
|
|
|
4240
6510
|
// src/client/css/detail.ts
|
|
4241
6511
|
var DETAIL_CSS = `
|
|
4242
|
-
/* ---------- two
|
|
4243
|
-
.wd-shell .dt-
|
|
4244
|
-
display:
|
|
4245
|
-
|
|
4246
|
-
|
|
6512
|
+
/* ---------- page shell: banner + fixed two columns ---------- */
|
|
6513
|
+
.wd-shell .dt-shell {
|
|
6514
|
+
display: flex; flex-direction: column;
|
|
6515
|
+
gap: 16px;
|
|
6516
|
+
padding: 20px 28px 44px;
|
|
4247
6517
|
min-height: 100%;
|
|
4248
6518
|
}
|
|
4249
|
-
|
|
6519
|
+
.wd-shell .dt-body { display: flex; flex-direction: column; gap: 18px; }
|
|
4250
6520
|
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
6521
|
+
/* ---------- banner ---------- */
|
|
6522
|
+
.wd-shell .dt-header {
|
|
6523
|
+
display: grid;
|
|
6524
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
6525
|
+
grid-template-areas: "main side" "nav nav";
|
|
6526
|
+
gap: 10px 18px;
|
|
6527
|
+
padding: 16px 20px;
|
|
4256
6528
|
background: var(--wd-surface);
|
|
4257
|
-
border
|
|
4258
|
-
|
|
6529
|
+
border: 1px solid var(--wd-hairline);
|
|
6530
|
+
border-radius: 10px;
|
|
4259
6531
|
}
|
|
4260
|
-
|
|
4261
|
-
.wd-shell .dt-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
6532
|
+
.wd-shell .dt-header-main { grid-area: main; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
6533
|
+
.wd-shell .dt-header-back { align-self: flex-start; margin-bottom: 2px; }
|
|
6534
|
+
.wd-shell .dt-header-title {
|
|
6535
|
+
margin: 0; font-size: 20px; line-height: 28px; font-weight: 700;
|
|
6536
|
+
letter-spacing: -.01em; color: var(--dsw-alias-label-primary); overflow-wrap: anywhere;
|
|
6537
|
+
}
|
|
6538
|
+
.wd-shell .dt-header-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
|
|
6539
|
+
.wd-shell .dt-header-id {
|
|
6540
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
6541
|
+
font-size: 10px; line-height: 15px; color: var(--dsw-alias-label-tertiary);
|
|
6542
|
+
}
|
|
6543
|
+
.wd-shell .dt-header-org { font-size: 10.5px; line-height: 15px; color: var(--dsw-alias-label-tertiary); }
|
|
6544
|
+
.wd-shell .dt-header-side { grid-area: side; display: flex; align-items: flex-start; gap: 18px; }
|
|
6545
|
+
.wd-shell .dt-header-pills { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
|
|
6546
|
+
.wd-shell .dt-header-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
|
|
6547
|
+
.wd-shell .dt-header-amount-label {
|
|
6548
|
+
font-size: 9.5px; line-height: 14px; letter-spacing: .05em; text-transform: uppercase;
|
|
6549
|
+
font-weight: 600; color: var(--wd-amber);
|
|
6550
|
+
}
|
|
6551
|
+
.wd-shell .dt-header-amount-value {
|
|
6552
|
+
font-size: 22px; line-height: 28px; font-weight: 700;
|
|
6553
|
+
font-variant-numeric: tabular-nums; color: var(--wd-amber); letter-spacing: -.02em;
|
|
6554
|
+
}
|
|
6555
|
+
.wd-shell .dt-header-amount-value[data-empty="true"] { font-size: 12px; font-weight: 500; font-style: italic; color: var(--dsw-alias-label-tertiary); }
|
|
6556
|
+
.wd-shell .dt-header-amount-unit { margin-left: 3px; font-size: 10.5px; font-weight: 500; }
|
|
6557
|
+
.wd-shell .dt-header-nav {
|
|
6558
|
+
grid-area: nav; display: flex; align-items: center; gap: 10px;
|
|
6559
|
+
padding-top: 10px; border-top: 1px solid var(--wd-hairline);
|
|
6560
|
+
}
|
|
6561
|
+
.wd-shell .dt-header-position { margin: 0 auto; font-size: 10px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
6562
|
+
|
|
6563
|
+
/* ---------- the fixed two-column contract ---------- */
|
|
6564
|
+
.wd-shell .dt-columns {
|
|
6565
|
+
display: grid;
|
|
6566
|
+
grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr);
|
|
6567
|
+
gap: 18px;
|
|
6568
|
+
align-items: start;
|
|
4265
6569
|
}
|
|
6570
|
+
@media (max-width: 1180px) { .wd-shell .dt-columns { grid-template-columns: minmax(0, 1fr); } }
|
|
6571
|
+
.wd-shell .dt-col-main,
|
|
6572
|
+
.wd-shell .dt-col-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
|
|
6573
|
+
|
|
6574
|
+
/* ---------- Gate 0 card grid ---------- */
|
|
6575
|
+
.wd-shell .g0-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
|
|
6576
|
+
.wd-shell .g0-card {
|
|
6577
|
+
display: flex; flex-direction: column; gap: 5px;
|
|
6578
|
+
padding: 10px 12px; border-radius: 8px;
|
|
6579
|
+
background: var(--wd-surface); border: 1px solid var(--wd-hairline);
|
|
6580
|
+
}
|
|
6581
|
+
.wd-shell .g0-card[data-present="false"] { background: var(--wd-inset); border-style: dashed; }
|
|
6582
|
+
.wd-shell .g0-card-head { display: flex; align-items: baseline; gap: 8px; }
|
|
6583
|
+
.wd-shell .g0-card-label { font-size: 11px; line-height: 16px; font-weight: 650; color: var(--dsw-alias-label-primary); }
|
|
6584
|
+
.wd-shell .g0-card-missing {
|
|
6585
|
+
margin-left: auto; font-size: 9px; line-height: 13px; font-weight: 650;
|
|
6586
|
+
color: var(--wd-amber); background: var(--wd-amber-soft);
|
|
6587
|
+
padding: 1px 5px; border-radius: 4px; white-space: nowrap;
|
|
6588
|
+
}
|
|
6589
|
+
.wd-shell .g0-card-body {
|
|
6590
|
+
margin: 0; font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary);
|
|
6591
|
+
overflow-wrap: anywhere;
|
|
6592
|
+
}
|
|
6593
|
+
.wd-shell .g0-card[data-prose="true"] .g0-card-body { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
6594
|
+
.wd-shell .g0-card-body[data-empty="true"] { font-style: italic; color: var(--dsw-alias-label-tertiary); }
|
|
6595
|
+
.wd-shell .g0-grid-note { margin: 0; font-size: 10px; line-height: 15px; color: var(--wd-amber); }
|
|
4266
6596
|
|
|
4267
6597
|
/* ---------- rail ---------- */
|
|
4268
6598
|
.wd-shell .dt-rail-head { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
|
|
@@ -4596,13 +6926,120 @@ window.__ModuleLoader__.load({
|
|
|
4596
6926
|
.wd-shell .plan-criterion-name { font-weight: 600; color: var(--dsw-alias-label-primary); overflow-wrap: anywhere; }
|
|
4597
6927
|
.wd-shell .plan-criterion-num { font-variant-numeric: tabular-nums; }
|
|
4598
6928
|
.wd-shell .plan-criterion-target { font-weight: 650; color: var(--wd-primary); font-variant-numeric: tabular-nums; }
|
|
4599
|
-
.wd-shell .plan-scenarios { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap:
|
|
4600
|
-
|
|
6929
|
+
.wd-shell .plan-scenarios { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
|
|
6930
|
+
/* A scenario row carries its derived state as a left edge: the row's colour is
|
|
6931
|
+
the finding, so it has to survive a glance down the list. */
|
|
6932
|
+
.wd-shell .plan-scenario {
|
|
6933
|
+
display: flex; align-items: flex-start; gap: 10px;
|
|
6934
|
+
padding: 8px 10px 8px 9px; border-radius: 8px;
|
|
6935
|
+
background: var(--wd-surface); border: 1px solid var(--wd-hairline);
|
|
6936
|
+
border-left: 3px solid var(--wd-slate);
|
|
6937
|
+
}
|
|
6938
|
+
.wd-shell .plan-scenario[data-tone="green"] { border-left-color: var(--wd-green); }
|
|
6939
|
+
.wd-shell .plan-scenario[data-tone="amber"] { border-left-color: var(--wd-amber); }
|
|
6940
|
+
.wd-shell .plan-scenario[data-tone="red"] { border-left-color: var(--wd-red); }
|
|
4601
6941
|
.wd-shell .plan-scenario-no {
|
|
4602
|
-
flex: none;
|
|
6942
|
+
flex: none; margin-top: 1px;
|
|
6943
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
4603
6944
|
font-size: 9.5px; line-height: 15px; font-weight: 650; color: var(--dsw-alias-label-tertiary);
|
|
4604
6945
|
}
|
|
4605
|
-
.wd-shell .plan-scenario-
|
|
6946
|
+
.wd-shell .plan-scenario[data-tone="green"] .plan-scenario-no { color: var(--wd-green); }
|
|
6947
|
+
.wd-shell .plan-scenario[data-tone="amber"] .plan-scenario-no { color: var(--wd-amber); }
|
|
6948
|
+
.wd-shell .plan-scenario[data-tone="red"] .plan-scenario-no { color: var(--wd-red); }
|
|
6949
|
+
.wd-shell .plan-scenario-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
|
|
6950
|
+
.wd-shell .plan-scenario-name { font-size: 11.5px; line-height: 17px; font-weight: 600; color: var(--dsw-alias-label-primary); overflow-wrap: anywhere; }
|
|
6951
|
+
.wd-shell .plan-scenario-goal { font-size: 10.5px; line-height: 15px; color: var(--dsw-alias-label-tertiary); overflow-wrap: anywhere; }
|
|
6952
|
+
.wd-shell .plan-scenario-goal-label { margin-right: 5px; color: var(--dsw-alias-label-tertiary); }
|
|
6953
|
+
.wd-shell .plan-scenario-tail { flex: none; display: flex; align-items: center; gap: 6px; }
|
|
6954
|
+
.wd-shell .plan-scenario-glyph { font-size: 10px; line-height: 14px; }
|
|
6955
|
+
.wd-shell .plan-scenario[data-tone="green"] .plan-scenario-glyph { color: var(--wd-green); }
|
|
6956
|
+
.wd-shell .plan-scenario[data-tone="amber"] .plan-scenario-glyph { color: var(--wd-amber); }
|
|
6957
|
+
.wd-shell .plan-scenario[data-tone="red"] .plan-scenario-glyph { color: var(--wd-red); }
|
|
6958
|
+
.wd-shell .plan-scenario[data-tone="slate"] .plan-scenario-glyph { color: var(--wd-slate); }
|
|
6959
|
+
.wd-shell .plan-scenario-evidence {
|
|
6960
|
+
font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary);
|
|
6961
|
+
font-variant-numeric: tabular-nums; white-space: nowrap;
|
|
6962
|
+
}
|
|
6963
|
+
.wd-shell .plan-criterion-status { white-space: nowrap; }
|
|
6964
|
+
|
|
6965
|
+
/* ---------- scenario legend ---------- */
|
|
6966
|
+
.wd-shell .plan-scenario-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 2px; }
|
|
6967
|
+
.wd-shell .plan-scenario-legend-item { font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); }
|
|
6968
|
+
.wd-shell .plan-scenario-legend-item[data-tone="green"] { color: var(--wd-green); }
|
|
6969
|
+
.wd-shell .plan-scenario-legend-item[data-tone="amber"] { color: var(--wd-amber); }
|
|
6970
|
+
.wd-shell .plan-scenario-legend-item[data-tone="red"] { color: var(--wd-red); }
|
|
6971
|
+
|
|
6972
|
+
/* ---------- next actions ---------- */
|
|
6973
|
+
.wd-shell .next-table {
|
|
6974
|
+
width: 100%; border-collapse: collapse;
|
|
6975
|
+
border: 1px solid var(--wd-hairline); border-radius: 9px; overflow: hidden;
|
|
6976
|
+
background: var(--wd-surface);
|
|
6977
|
+
}
|
|
6978
|
+
.wd-shell .next-table th {
|
|
6979
|
+
padding: 7px 10px; text-align: left;
|
|
6980
|
+
font-size: 9.5px; line-height: 14px; letter-spacing: .05em; text-transform: uppercase;
|
|
6981
|
+
font-weight: 600; color: var(--dsw-alias-label-tertiary);
|
|
6982
|
+
background: var(--wd-inset); border-bottom: 1px solid var(--wd-hairline);
|
|
6983
|
+
}
|
|
6984
|
+
.wd-shell .next-table td {
|
|
6985
|
+
padding: 8px 10px; font-size: 11.5px; line-height: 17px;
|
|
6986
|
+
color: var(--dsw-alias-label-secondary); border-bottom: 1px solid var(--wd-hairline);
|
|
6987
|
+
vertical-align: top;
|
|
6988
|
+
}
|
|
6989
|
+
.wd-shell .next-table tbody tr:last-child td { border-bottom: 0; }
|
|
6990
|
+
.wd-shell .next-goal { font-weight: 600; color: var(--dsw-alias-label-primary); overflow-wrap: anywhere; }
|
|
6991
|
+
.wd-shell .next-deadline { font-variant-numeric: tabular-nums; }
|
|
6992
|
+
|
|
6993
|
+
/* ---------- scenario detail (layer two) ---------- */
|
|
6994
|
+
.wd-shell .plan-scenario-open {
|
|
6995
|
+
flex: none; margin-left: 2px; padding: 2px 6px;
|
|
6996
|
+
border: 0; border-radius: 5px; background: transparent; cursor: pointer;
|
|
6997
|
+
font-family: inherit; font-size: 10.5px; line-height: 15px; font-weight: 600;
|
|
6998
|
+
color: var(--wd-primary);
|
|
6999
|
+
}
|
|
7000
|
+
.wd-shell .plan-scenario-open:hover { background: var(--wd-primary-soft); }
|
|
7001
|
+
.wd-shell .plan-scenario-open:focus-visible { outline: 2px solid var(--wd-primary-ring); outline-offset: 1px; }
|
|
7002
|
+
.wd-shell .sd-back {
|
|
7003
|
+
align-self: flex-start; margin-bottom: 2px; padding: 3px 8px;
|
|
7004
|
+
border: 1px solid var(--wd-hairline); border-radius: 6px; background: var(--wd-surface); cursor: pointer;
|
|
7005
|
+
font-family: inherit; font-size: 10.5px; line-height: 15px; font-weight: 600; color: var(--wd-primary);
|
|
7006
|
+
}
|
|
7007
|
+
.wd-shell .sd-back:hover { background: var(--wd-primary-soft); }
|
|
7008
|
+
.wd-shell .sd-back:focus-visible { outline: 2px solid var(--wd-primary-ring); outline-offset: 1px; }
|
|
7009
|
+
.wd-shell .sd-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 9px; border-bottom: 1px solid var(--wd-hairline); }
|
|
7010
|
+
.wd-shell .sd-head-no {
|
|
7011
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
7012
|
+
font-size: 10px; line-height: 15px; font-weight: 650; color: var(--dsw-alias-label-tertiary);
|
|
7013
|
+
}
|
|
7014
|
+
.wd-shell .sd-head-name { font-size: 14px; line-height: 20px; font-weight: 650; color: var(--dsw-alias-label-primary); overflow-wrap: anywhere; }
|
|
7015
|
+
.wd-shell .sd-evidence { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
|
|
7016
|
+
.wd-shell .sd-evidence-row {
|
|
7017
|
+
display: flex; align-items: baseline; gap: 9px; padding: 7px 10px;
|
|
7018
|
+
border-radius: 7px; background: var(--wd-inset);
|
|
7019
|
+
}
|
|
7020
|
+
.wd-shell .sd-evidence-type { flex: none; font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); }
|
|
7021
|
+
.wd-shell .sd-evidence-title { flex: 1; min-width: 0; font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
|
|
7022
|
+
.wd-shell .sd-evidence-date { flex: none; font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
7023
|
+
.wd-shell .sd-evidence-link { flex: none; font-size: 10.5px; color: var(--wd-primary); text-decoration: none; }
|
|
7024
|
+
.wd-shell .sd-evidence-link:hover { text-decoration: underline; }
|
|
7025
|
+
.wd-shell .sd-customer { display: flex; flex-direction: column; gap: 4px; padding: 9px 11px; border-radius: 8px; background: var(--wd-inset); }
|
|
7026
|
+
.wd-shell .sd-customer-sync { display: flex; align-items: baseline; gap: 8px; font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); }
|
|
7027
|
+
.wd-shell .sd-customer-date { font-variant-numeric: tabular-nums; }
|
|
7028
|
+
.wd-shell .sd-customer-feedback { margin: 0; font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-secondary); }
|
|
7029
|
+
.wd-shell .sd-gate3 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
|
7030
|
+
.wd-shell .sd-gate3-note {
|
|
7031
|
+
font-size: 9.5px; line-height: 14px; font-weight: 650; color: var(--wd-red);
|
|
7032
|
+
padding: 1px 5px; border-radius: 4px; background: var(--wd-red-soft);
|
|
7033
|
+
}
|
|
7034
|
+
.wd-shell .sd-linked { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
|
|
7035
|
+
.wd-shell .sd-linked-row {
|
|
7036
|
+
display: grid; grid-template-columns: 82px 34px 76px minmax(0, 1fr); gap: 8px;
|
|
7037
|
+
align-items: baseline; padding: 6px 10px; border-radius: 7px; background: var(--wd-inset);
|
|
7038
|
+
}
|
|
7039
|
+
.wd-shell .sd-linked-date { font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
7040
|
+
.wd-shell .sd-linked-seq { font-size: 9.5px; line-height: 14px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
7041
|
+
.wd-shell .sd-linked-change { font-size: 9.5px; line-height: 14px; font-weight: 600; color: var(--wd-primary); }
|
|
7042
|
+
.wd-shell .sd-linked-actual { font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
|
|
4606
7043
|
.wd-shell .plan-risks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
|
|
4607
7044
|
.wd-shell .plan-risk { display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px; border-radius: 8px; background: var(--wd-inset); }
|
|
4608
7045
|
.wd-shell .plan-risk-dot { flex: none; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--wd-slate); }
|
|
@@ -4640,6 +7077,90 @@ window.__ModuleLoader__.load({
|
|
|
4640
7077
|
@media (prefers-reduced-motion: reduce) {
|
|
4641
7078
|
.wd-shell .dim-card, .wd-shell .prog-card { transition: none; }
|
|
4642
7079
|
}
|
|
7080
|
+
|
|
7081
|
+
/* ================= v3.1 layout: banner + fixed two columns ================= */
|
|
7082
|
+
.wd-shell .dt-shell { display: flex; flex-direction: column; gap: 16px; padding: 20px 28px 44px; min-height: 100%; }
|
|
7083
|
+
.wd-shell .dt-body { display: flex; flex-direction: column; gap: 18px; }
|
|
7084
|
+
|
|
7085
|
+
.wd-shell .dt-header {
|
|
7086
|
+
display: grid; grid-template-columns: minmax(0, 1fr) auto;
|
|
7087
|
+
grid-template-areas: "main side" "nav nav"; gap: 10px 18px;
|
|
7088
|
+
padding: 16px 20px; background: var(--wd-surface);
|
|
7089
|
+
border: 1px solid var(--wd-hairline); border-radius: 10px;
|
|
7090
|
+
}
|
|
7091
|
+
.wd-shell .dt-header-main { grid-area: main; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
7092
|
+
.wd-shell .dt-header-back { align-self: flex-start; margin-bottom: 2px; }
|
|
7093
|
+
.wd-shell .dt-header-title {
|
|
7094
|
+
margin: 0; font-size: 20px; line-height: 28px; font-weight: 700;
|
|
7095
|
+
letter-spacing: -.01em; color: var(--dsw-alias-label-primary); overflow-wrap: anywhere;
|
|
7096
|
+
}
|
|
7097
|
+
.wd-shell .dt-header-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
|
|
7098
|
+
.wd-shell .dt-header-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; line-height: 15px; color: var(--dsw-alias-label-tertiary); }
|
|
7099
|
+
.wd-shell .dt-header-org { font-size: 10.5px; line-height: 15px; color: var(--dsw-alias-label-tertiary); }
|
|
7100
|
+
.wd-shell .dt-header-side { grid-area: side; display: flex; align-items: flex-start; gap: 18px; }
|
|
7101
|
+
.wd-shell .dt-header-pills { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
|
|
7102
|
+
.wd-shell .dt-header-amount { display: flex; flex-direction: column; align-items: flex-end; }
|
|
7103
|
+
.wd-shell .dt-header-amount-label { font-size: 9.5px; line-height: 14px; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; color: var(--wd-amber); }
|
|
7104
|
+
.wd-shell .dt-header-amount-value { font-size: 22px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--wd-amber); letter-spacing: -.02em; }
|
|
7105
|
+
.wd-shell .dt-header-amount-value[data-empty="true"] { font-size: 12px; font-weight: 500; font-style: italic; color: var(--dsw-alias-label-tertiary); }
|
|
7106
|
+
.wd-shell .dt-header-amount-unit { margin-left: 3px; font-size: 10.5px; font-weight: 500; }
|
|
7107
|
+
.wd-shell .dt-header-nav { grid-area: nav; display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--wd-hairline); }
|
|
7108
|
+
.wd-shell .dt-header-position { margin: 0 auto; font-size: 10px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
7109
|
+
|
|
7110
|
+
.wd-shell .dt-columns { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr); gap: 18px; align-items: start; }
|
|
7111
|
+
@media (max-width: 1180px) { .wd-shell .dt-columns { grid-template-columns: minmax(0, 1fr); } }
|
|
7112
|
+
.wd-shell .dt-col-main,
|
|
7113
|
+
.wd-shell .dt-col-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
|
|
7114
|
+
|
|
7115
|
+
.wd-shell .g0-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
|
|
7116
|
+
.wd-shell .g0-card { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border-radius: 8px; background: var(--wd-surface); border: 1px solid var(--wd-hairline); }
|
|
7117
|
+
.wd-shell .g0-card[data-present="false"] { background: var(--wd-inset); border-style: dashed; }
|
|
7118
|
+
.wd-shell .g0-card-head { display: flex; align-items: baseline; gap: 8px; }
|
|
7119
|
+
.wd-shell .g0-card-label { font-size: 11px; line-height: 16px; font-weight: 650; color: var(--dsw-alias-label-primary); }
|
|
7120
|
+
.wd-shell .g0-card-missing { margin-left: auto; font-size: 9px; line-height: 13px; font-weight: 650; color: var(--wd-amber); background: var(--wd-amber-soft); padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
|
|
7121
|
+
.wd-shell .g0-card-body { margin: 0; font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }
|
|
7122
|
+
.wd-shell .g0-card[data-prose="true"] .g0-card-body { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
7123
|
+
.wd-shell .g0-card-body[data-empty="true"] { font-style: italic; color: var(--dsw-alias-label-tertiary); }
|
|
7124
|
+
.wd-shell .g0-grid-note { margin: 0; font-size: 10px; line-height: 15px; color: var(--wd-amber); }
|
|
7125
|
+
|
|
7126
|
+
.wd-shell .next-table { width: 100%; border-collapse: collapse; border: 1px solid var(--wd-hairline); border-radius: 9px; overflow: hidden; background: var(--wd-surface); }
|
|
7127
|
+
.wd-shell .next-table th { padding: 7px 10px; text-align: left; font-size: 9.5px; line-height: 14px; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; color: var(--dsw-alias-label-tertiary); background: var(--wd-inset); border-bottom: 1px solid var(--wd-hairline); }
|
|
7128
|
+
.wd-shell .next-table td { padding: 8px 10px; font-size: 11.5px; line-height: 17px; color: var(--dsw-alias-label-secondary); border-bottom: 1px solid var(--wd-hairline); vertical-align: top; }
|
|
7129
|
+
.wd-shell .next-table tbody tr:last-child td { border-bottom: 0; }
|
|
7130
|
+
.wd-shell .next-goal { font-weight: 600; color: var(--dsw-alias-label-primary); overflow-wrap: anywhere; }
|
|
7131
|
+
.wd-shell .next-deadline { font-variant-numeric: tabular-nums; }
|
|
7132
|
+
|
|
7133
|
+
/*
|
|
7134
|
+
* Balance the columns.
|
|
7135
|
+
*
|
|
7136
|
+
* The progress stream grows without limit (one card per round), while the left
|
|
7137
|
+
* column holds a fixed set of commitments. Left alone, a project with ten rounds
|
|
7138
|
+
* leaves the commitments column looking half-empty. Capping the stream keeps the
|
|
7139
|
+
* two columns visually comparable and gives the reader an obvious scroll target,
|
|
7140
|
+
* while every round stays reachable.
|
|
7141
|
+
*/
|
|
7142
|
+
.wd-shell .dt-col-side .prog-stream {
|
|
7143
|
+
max-height: none; overflow-y: visible;
|
|
7144
|
+
padding-right: 4px;
|
|
7145
|
+
scrollbar-width: thin;
|
|
7146
|
+
}
|
|
7147
|
+
.wd-shell .dt-col-side .prog-stream::-webkit-scrollbar { width: 6px; }
|
|
7148
|
+
.wd-shell .dt-col-side .prog-stream::-webkit-scrollbar-thumb { background: var(--wd-hairline); border-radius: 3px; }
|
|
7149
|
+
|
|
7150
|
+
/* ---------- compact timeline row ---------- */
|
|
7151
|
+
.wd-shell .prog-card-compact { display: flex; flex-direction: column; gap: 5px; padding: 9px 11px; }
|
|
7152
|
+
.wd-shell .prog-card-compact .prog-head { gap: 8px; }
|
|
7153
|
+
.wd-shell .prog-change {
|
|
7154
|
+
font-size: 9px; line-height: 13px; font-weight: 650;
|
|
7155
|
+
color: var(--wd-primary); background: var(--wd-primary-soft);
|
|
7156
|
+
padding: 1px 5px; border-radius: 4px; white-space: nowrap;
|
|
7157
|
+
}
|
|
7158
|
+
.wd-shell .prog-actual-line {
|
|
7159
|
+
margin: 0; font-size: 11.5px; line-height: 17px;
|
|
7160
|
+
color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere;
|
|
7161
|
+
}
|
|
7162
|
+
.wd-shell .prog-actual-line[data-empty="true"] { font-style: italic; color: var(--dsw-alias-label-tertiary); }
|
|
7163
|
+
.wd-shell .prog-scope-row { margin-top: 1px; }
|
|
4643
7164
|
`;
|
|
4644
7165
|
|
|
4645
7166
|
// src/client/css/insights.ts
|
|
@@ -5804,9 +8325,9 @@ window.__ModuleLoader__.load({
|
|
|
5804
8325
|
const stages = /* @__PURE__ */ new Map();
|
|
5805
8326
|
const statuses = /* @__PURE__ */ new Map();
|
|
5806
8327
|
const types = /* @__PURE__ */ new Map();
|
|
5807
|
-
const bump = (
|
|
5808
|
-
const existing =
|
|
5809
|
-
if (existing === void 0)
|
|
8328
|
+
const bump = (map2, value, label) => {
|
|
8329
|
+
const existing = map2.get(value);
|
|
8330
|
+
if (existing === void 0) map2.set(value, { value, label, count: 1 });
|
|
5810
8331
|
else existing.count += 1;
|
|
5811
8332
|
};
|
|
5812
8333
|
for (const project of projects) {
|
|
@@ -5820,7 +8341,7 @@ window.__ModuleLoader__.load({
|
|
|
5820
8341
|
for (const stage of STAGES) {
|
|
5821
8342
|
if (!stages.has(stage)) stages.set(stage, { value: stage, label: stageLabel(snapshotT, stage), count: count((project) => project.closed ? "closed" : project.stage ?? "unknown", stage) });
|
|
5822
8343
|
}
|
|
5823
|
-
const sortOptions = (
|
|
8344
|
+
const sortOptions = (map2) => [...map2.values()].sort((left, right) => right.count - left.count || left.label.localeCompare(right.label));
|
|
5824
8345
|
return {
|
|
5825
8346
|
system: sortOptions(systems),
|
|
5826
8347
|
company: sortOptions(companies),
|