@primmel/primmel 1.9.1 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/check-rules.d.ts.map +1 -1
- package/dist/src/check-rules.js +18 -1
- package/dist/src/check-rules.js.map +1 -1
- package/dist/src/check.d.ts.map +1 -1
- package/dist/src/check.js +104 -1
- package/dist/src/check.js.map +1 -1
- package/dist/src/ser-des/config/decisionRule.d.ts +5 -0
- package/dist/src/ser-des/config/decisionRule.d.ts.map +1 -0
- package/dist/src/ser-des/config/decisionRule.js +357 -0
- package/dist/src/ser-des/config/decisionRule.js.map +1 -0
- package/dist/src/ser-des/config/declaration.d.ts +9 -0
- package/dist/src/ser-des/config/declaration.d.ts.map +1 -0
- package/dist/src/ser-des/config/declaration.js +288 -0
- package/dist/src/ser-des/config/declaration.js.map +1 -0
- package/dist/src/ser-des/config/frameworkDocument.d.ts +9 -0
- package/dist/src/ser-des/config/frameworkDocument.d.ts.map +1 -0
- package/dist/src/ser-des/config/frameworkDocument.js +254 -0
- package/dist/src/ser-des/config/frameworkDocument.js.map +1 -0
- package/dist/src/ser-des/config/governanceOrgan.d.ts +5 -0
- package/dist/src/ser-des/config/governanceOrgan.d.ts.map +1 -0
- package/dist/src/ser-des/config/governanceOrgan.js +111 -0
- package/dist/src/ser-des/config/governanceOrgan.js.map +1 -0
- package/dist/src/ser-des/config/index.d.ts.map +1 -1
- package/dist/src/ser-des/config/index.js +91 -0
- package/dist/src/ser-des/config/index.js.map +1 -1
- package/dist/src/ser-des/config/participantKind.d.ts +5 -0
- package/dist/src/ser-des/config/participantKind.d.ts.map +1 -0
- package/dist/src/ser-des/config/participantKind.js +329 -0
- package/dist/src/ser-des/config/participantKind.js.map +1 -0
- package/dist/src/ser-des/config/scheme.d.ts +7 -0
- package/dist/src/ser-des/config/scheme.d.ts.map +1 -0
- package/dist/src/ser-des/config/scheme.js +434 -0
- package/dist/src/ser-des/config/scheme.js.map +1 -0
- package/dist/src/ser-des/package.d.ts +5 -2
- package/dist/src/ser-des/package.d.ts.map +1 -1
- package/dist/src/ser-des/package.js +76 -6
- package/dist/src/ser-des/package.js.map +1 -1
- package/dist/src/ser-des/parse.d.ts.map +1 -1
- package/dist/src/ser-des/parse.js +12 -0
- package/dist/src/ser-des/parse.js.map +1 -1
- package/dist/src/ser-des/types.d.ts +19 -0
- package/dist/src/ser-des/types.d.ts.map +1 -1
- package/dist/src/types/DecisionRule.d.ts +84 -0
- package/dist/src/types/DecisionRule.d.ts.map +1 -0
- package/dist/src/types/DecisionRule.js +17 -0
- package/dist/src/types/DecisionRule.js.map +1 -0
- package/dist/src/types/Declaration.d.ts +68 -0
- package/dist/src/types/Declaration.d.ts.map +1 -0
- package/dist/src/types/Declaration.js +22 -0
- package/dist/src/types/Declaration.js.map +1 -0
- package/dist/src/types/FrameworkDocument.d.ts +57 -0
- package/dist/src/types/FrameworkDocument.d.ts.map +1 -0
- package/dist/src/types/FrameworkDocument.js +21 -0
- package/dist/src/types/FrameworkDocument.js.map +1 -0
- package/dist/src/types/GovernanceOrgan.d.ts +23 -0
- package/dist/src/types/GovernanceOrgan.d.ts.map +1 -0
- package/dist/src/types/GovernanceOrgan.js +14 -0
- package/dist/src/types/GovernanceOrgan.js.map +1 -0
- package/dist/src/types/ParticipantKind.d.ts +82 -0
- package/dist/src/types/ParticipantKind.d.ts.map +1 -0
- package/dist/src/types/ParticipantKind.js +22 -0
- package/dist/src/types/ParticipantKind.js.map +1 -0
- package/dist/src/types/Scheme.d.ts +99 -0
- package/dist/src/types/Scheme.d.ts.map +1 -0
- package/dist/src/types/Scheme.js +24 -0
- package/dist/src/types/Scheme.js.map +1 -0
- package/dist/src/types/Standard.d.ts +19 -0
- package/dist/src/types/Standard.d.ts.map +1 -1
- package/dist-browser/index.mjs +1119 -298
- package/dist-cli/primmel.mjs +1757 -4
- package/package.json +1 -1
package/dist-browser/index.mjs
CHANGED
|
@@ -158,6 +158,17 @@ function u(e, n, r = {}) {
|
|
|
158
158
|
quantityRegisters: {},
|
|
159
159
|
duals: {},
|
|
160
160
|
activityArchetypes: {},
|
|
161
|
+
participantKinds: {},
|
|
162
|
+
governanceOrgans: {},
|
|
163
|
+
declarationKinds: {},
|
|
164
|
+
declarationStatuses: {},
|
|
165
|
+
declarationGates: {},
|
|
166
|
+
schemeDefinitions: {},
|
|
167
|
+
schemeLifecycles: {},
|
|
168
|
+
frameworkDocuments: {},
|
|
169
|
+
documentPrecedences: {},
|
|
170
|
+
autoInclusions: {},
|
|
171
|
+
decisionRules: {},
|
|
161
172
|
connectorProfiles: {},
|
|
162
173
|
monitors: {},
|
|
163
174
|
passports: {},
|
|
@@ -301,7 +312,7 @@ function v(e, t, n) {
|
|
|
301
312
|
function y(e, t, n) {
|
|
302
313
|
return n === "ref" || n === "corresponds" ? (t++, t < e.length && t++, t < e.length && e[t].startsWith("{") && t++, t) : n === "trust_ref" ? (t < e.length && t++, e[t] === "key" && (t++, t < e.length && t++), t) : _(n) ? (t < e.length && t++, !e[t - 1]?.startsWith("{") && e[t]?.startsWith("{") && t++, t) : (t < e.length && t++, t);
|
|
303
314
|
}
|
|
304
|
-
function
|
|
315
|
+
function b(e, t, n) {
|
|
305
316
|
if (e === "") return;
|
|
306
317
|
let a = r(e), o = 0;
|
|
307
318
|
for (; o < a.length;) {
|
|
@@ -320,13 +331,13 @@ function ee(e, t, n) {
|
|
|
320
331
|
t(e.join(" "), i(r));
|
|
321
332
|
}
|
|
322
333
|
}
|
|
323
|
-
function
|
|
334
|
+
function x(e) {
|
|
324
335
|
let t = e();
|
|
325
336
|
return t.length >= 2 && t.charAt(0) === "\"" && t.charAt(t.length - 1) === "\"" ? o(t.substr(1, t.length - 2)) : i(t);
|
|
326
337
|
}
|
|
327
338
|
//#endregion
|
|
328
339
|
//#region src/ser-des/config/ref.ts
|
|
329
|
-
function
|
|
340
|
+
function S(e, t, n, r) {
|
|
330
341
|
let i = {
|
|
331
342
|
predicate: n(e[t++] ?? ""),
|
|
332
343
|
target: n(e[t++] ?? "")
|
|
@@ -340,17 +351,17 @@ function x(e, t, n, r) {
|
|
|
340
351
|
next: t
|
|
341
352
|
};
|
|
342
353
|
}
|
|
343
|
-
function
|
|
354
|
+
function C(e, t, n, r) {
|
|
344
355
|
let i = [e(), e()], a = t();
|
|
345
|
-
return a && a.startsWith("{") && i.push(e()),
|
|
356
|
+
return a && a.startsWith("{") && i.push(e()), S(i, 0, n, r).ref;
|
|
346
357
|
}
|
|
347
|
-
function
|
|
358
|
+
function w(e, t, n) {
|
|
348
359
|
if (!e || e.length === 0) return "";
|
|
349
360
|
let r = "";
|
|
350
361
|
for (let i of e) r += `${t}ref ${i.predicate} "${n(i.target)}"`, r += i.note ? ` {\n${t} note "${n(i.note)}"\n${t}}\n` : "\n";
|
|
351
362
|
return r;
|
|
352
363
|
}
|
|
353
|
-
function
|
|
364
|
+
function ee(e) {
|
|
354
365
|
let t = /^(urn:[^#]+)(?:#(.+))?$/.exec(e);
|
|
355
366
|
if (!t) return null;
|
|
356
367
|
let n = t[2];
|
|
@@ -381,7 +392,7 @@ function T(e, t) {
|
|
|
381
392
|
urn: t.target,
|
|
382
393
|
role: "source"
|
|
383
394
|
}), !0;
|
|
384
|
-
let i =
|
|
395
|
+
let i = ee(t.target);
|
|
385
396
|
return i ? ((e.sourceRefs ??= []).push(i), "source" in e && !e.source && (e.source = i), "sourceRef" in e && !e.sourceRef && (e.sourceRef = i), "reference" in e && !e.reference && (e.reference = i.doc), !0) : !1;
|
|
386
397
|
}
|
|
387
398
|
if (t.predicate === "cites") return e.fieldReferences ? e.fieldReferences.push({
|
|
@@ -718,7 +729,7 @@ function le(e, t, o) {
|
|
|
718
729
|
else if (e === "reference") s.referenceIds = r(c[l++]).map(a);
|
|
719
730
|
else if (e === "references") s.fieldReferences = he(i(c[l++]));
|
|
720
731
|
else if (e === "ref") {
|
|
721
|
-
let e =
|
|
732
|
+
let e = S(c, l, a, i);
|
|
722
733
|
T(s, e.ref) || s.refs.push(e.ref), l = e.next;
|
|
723
734
|
} else if (e === "corresponds") {
|
|
724
735
|
let e = D(c, l, a);
|
|
@@ -1226,7 +1237,7 @@ var Pe = function(e, t) {
|
|
|
1226
1237
|
}
|
|
1227
1238
|
return v(t, (t, s, c) => {
|
|
1228
1239
|
if (t === "modality") o.modality = s();
|
|
1229
|
-
else if (t === "name") o.name =
|
|
1240
|
+
else if (t === "name") o.name = x(s);
|
|
1230
1241
|
else if (t === "actor") o._relations.actor = s();
|
|
1231
1242
|
else if (t === "parent") o.parent = s();
|
|
1232
1243
|
else if (t === "canvas" || t === "subprocess") o._relations.page = s();
|
|
@@ -1262,7 +1273,7 @@ var Pe = function(e, t) {
|
|
|
1262
1273
|
let e = I(i(s()));
|
|
1263
1274
|
o.source ||= e, (o.sourceRefs ??= []).push(e);
|
|
1264
1275
|
} else if (t === "ref") {
|
|
1265
|
-
let e =
|
|
1276
|
+
let e = C(s, c, a, i);
|
|
1266
1277
|
T(o, e) || (o.refs ??= []).push(e);
|
|
1267
1278
|
} else if (t === "corresponds") (o.correspondences ??= []).push(O(s, c, a));
|
|
1268
1279
|
else return !1;
|
|
@@ -1394,7 +1405,7 @@ var He = function(e, t) {
|
|
|
1394
1405
|
}
|
|
1395
1406
|
e.childComposition === "gateway" && (n += " child_composition gateway\n"), e.does && (n += Ve(e.does));
|
|
1396
1407
|
for (let t of e.sourceRefs ?? (e.source && (e.source.doc || e.source.clause) ? [e.source] : [])) n += E(t, " ", s);
|
|
1397
|
-
return n +=
|
|
1408
|
+
return n += w(e.refs, " ", s), n += k(e.correspondences, " ", s, N), e.parent && (e.children.length === 0 || !t?.nested) && (n += " parent " + e.parent + "\n"), n += "}\n", n;
|
|
1398
1409
|
};
|
|
1399
1410
|
//#endregion
|
|
1400
1411
|
//#region src/ser-des/dump.ts
|
|
@@ -1433,7 +1444,7 @@ var We = function(e, t) {
|
|
|
1433
1444
|
};
|
|
1434
1445
|
return v(t, (e, t) => {
|
|
1435
1446
|
if (e === "modality") n.modality = t();
|
|
1436
|
-
else if (e === "name") n.name =
|
|
1447
|
+
else if (e === "name") n.name = x(t);
|
|
1437
1448
|
else if (e === "actor") n._relations.actor = t();
|
|
1438
1449
|
else if (e === "approve_by") n._relations.approver = t();
|
|
1439
1450
|
else if (e === "approval_record") n._relations.records = r(t());
|
|
@@ -1488,7 +1499,7 @@ var We = function(e, t) {
|
|
|
1488
1499
|
value: ""
|
|
1489
1500
|
};
|
|
1490
1501
|
return v(t, (e, t) => {
|
|
1491
|
-
if (e === "definition") n.value =
|
|
1502
|
+
if (e === "definition") n.value = x(t);
|
|
1492
1503
|
else return !1;
|
|
1493
1504
|
return !0;
|
|
1494
1505
|
}, {
|
|
@@ -1503,7 +1514,7 @@ var We = function(e, t) {
|
|
|
1503
1514
|
_relations: { data: "" }
|
|
1504
1515
|
};
|
|
1505
1516
|
return v(t, (e, t) => {
|
|
1506
|
-
if (e === "title") n.title =
|
|
1517
|
+
if (e === "title") n.title = x(t);
|
|
1507
1518
|
else if (e === "data_class") n._relations.data = t();
|
|
1508
1519
|
else return !1;
|
|
1509
1520
|
return !0;
|
|
@@ -1516,7 +1527,7 @@ var We = function(e, t) {
|
|
|
1516
1527
|
id: e,
|
|
1517
1528
|
attributes: []
|
|
1518
1529
|
};
|
|
1519
|
-
return
|
|
1530
|
+
return b(t, (e, t) => {
|
|
1520
1531
|
if (e.startsWith("ref ")) {
|
|
1521
1532
|
let r = e.match(/^ref\s+(\S+)\s+"([^"]*)"$/);
|
|
1522
1533
|
if (r) {
|
|
@@ -1573,15 +1584,15 @@ var We = function(e, t) {
|
|
|
1573
1584
|
let a = e.indexOf(":");
|
|
1574
1585
|
return a !== -1 && (n.type = e.substr(a + 1, e.length - a - 1).trim(), e = e.substr(0, a)), n.id = e.trim(), v(t, (e, t) => {
|
|
1575
1586
|
if (e === "modality") n.modality = t();
|
|
1576
|
-
else if (e === "definition") n.definition =
|
|
1587
|
+
else if (e === "definition") n.definition = x(t);
|
|
1577
1588
|
else if (e === "reference") n._relations.ref = r(t());
|
|
1578
1589
|
else if (e === "satisfy") n.satisfy = r(t());
|
|
1579
1590
|
else if (e === "on_delete") n.onDelete = t();
|
|
1580
1591
|
else if (e === "deprecated") n.deprecated = t() === "true";
|
|
1581
1592
|
else if (e === "enum_values") n.enumValues = r(t());
|
|
1582
1593
|
else if (e === "required") n.required = t() === "true";
|
|
1583
|
-
else if (e === "unit") n.unit =
|
|
1584
|
-
else if (e === "default") n.defaultValue =
|
|
1594
|
+
else if (e === "unit") n.unit = x(t);
|
|
1595
|
+
else if (e === "default") n.defaultValue = x(t);
|
|
1585
1596
|
else return !1;
|
|
1586
1597
|
return !0;
|
|
1587
1598
|
}, {
|
|
@@ -1657,8 +1668,8 @@ var We = function(e, t) {
|
|
|
1657
1668
|
};
|
|
1658
1669
|
return v(t, (e, t) => {
|
|
1659
1670
|
if (e === "type") n.type = t();
|
|
1660
|
-
else if (e === "definition") n.definition =
|
|
1661
|
-
else if (e === "description") n.description =
|
|
1671
|
+
else if (e === "definition") n.definition = x(t);
|
|
1672
|
+
else if (e === "description") n.description = x(t);
|
|
1662
1673
|
else return !1;
|
|
1663
1674
|
return !0;
|
|
1664
1675
|
}, {
|
|
@@ -1739,7 +1750,7 @@ var gt = function(e, t) {
|
|
|
1739
1750
|
label: ""
|
|
1740
1751
|
};
|
|
1741
1752
|
return v(t, (e, t) => {
|
|
1742
|
-
if (e === "label") n.label =
|
|
1753
|
+
if (e === "label") n.label = x(t);
|
|
1743
1754
|
else return !1;
|
|
1744
1755
|
return !0;
|
|
1745
1756
|
}, {
|
|
@@ -1764,7 +1775,7 @@ var yt = function(e, t) {
|
|
|
1764
1775
|
ref: [],
|
|
1765
1776
|
_relations: { ref: [] }
|
|
1766
1777
|
};
|
|
1767
|
-
return v(t, (e, t) => (e === "modality" ? n.modality = t() : e === "condition" ? n.condition =
|
|
1778
|
+
return v(t, (e, t) => (e === "modality" ? n.modality = t() : e === "condition" ? n.condition = x(t) : e === "reference" ? n._relations.ref = r(t()) : n.subject.set(e, t()), !0), {
|
|
1768
1779
|
construct: "provision",
|
|
1769
1780
|
id: e
|
|
1770
1781
|
}), (t) => (t.provisions[e] = n, t);
|
|
@@ -1812,9 +1823,9 @@ var yt = function(e, t) {
|
|
|
1812
1823
|
name: ""
|
|
1813
1824
|
};
|
|
1814
1825
|
return v(t, (e, t) => {
|
|
1815
|
-
if (e === "name") n.name =
|
|
1816
|
-
else if (e === "label") n.label =
|
|
1817
|
-
else if (e === "description") n.description =
|
|
1826
|
+
if (e === "name") n.name = x(t);
|
|
1827
|
+
else if (e === "label") n.label = x(t);
|
|
1828
|
+
else if (e === "description") n.description = x(t);
|
|
1818
1829
|
else return !1;
|
|
1819
1830
|
return !0;
|
|
1820
1831
|
}, {
|
|
@@ -2007,7 +2018,7 @@ var Lt = [
|
|
|
2007
2018
|
let t = a();
|
|
2008
2019
|
if (!Lt.includes(t)) throw Error(`Parsing error: note. ID ${e}: Unknown type ${t} (valid: ${Lt.join(", ")})`);
|
|
2009
2020
|
n.type = t;
|
|
2010
|
-
} else if (t === "message") n.message =
|
|
2021
|
+
} else if (t === "message") n.message = x(a);
|
|
2011
2022
|
else if (t === "source_discrepancy") n.sourceDiscrepancy = A(i(a()));
|
|
2012
2023
|
else if (t === "reference") n._relations.ref = r(a());
|
|
2013
2024
|
else return !1;
|
|
@@ -2174,7 +2185,7 @@ var Jt = function(e, t) {
|
|
|
2174
2185
|
} else if (t === "domain") o.domain = i(s[c++]);
|
|
2175
2186
|
else if (t === "data") o.data = Yt(i(s[c++]));
|
|
2176
2187
|
else if (t === "ref") {
|
|
2177
|
-
let e =
|
|
2188
|
+
let e = S(s, c, a, i);
|
|
2178
2189
|
T(o, e.ref) || (o.refs ??= []).push(e.ref), c = e.next;
|
|
2179
2190
|
} else if (t === "corresponds") {
|
|
2180
2191
|
let e = D(s, c, a);
|
|
@@ -2396,7 +2407,7 @@ var pn = function(e, t) {
|
|
|
2396
2407
|
coverage: {}
|
|
2397
2408
|
};
|
|
2398
2409
|
return v(t, (t, r) => {
|
|
2399
|
-
if (t === "description") n.description =
|
|
2410
|
+
if (t === "description") n.description = x(r);
|
|
2400
2411
|
else if (t === "mapping") {
|
|
2401
2412
|
let t = dn(e, i(r()));
|
|
2402
2413
|
for (let [e, r] of Object.entries(t)) (n.mappings[e] ??= []).push(...r);
|
|
@@ -2441,7 +2452,7 @@ var gn = function(e, t) {
|
|
|
2441
2452
|
against: ""
|
|
2442
2453
|
};
|
|
2443
2454
|
return v(t, (e, t) => {
|
|
2444
|
-
if (e === "description") n.description =
|
|
2455
|
+
if (e === "description") n.description = x(t);
|
|
2445
2456
|
else if (e === "roles") n.roles = hn(t());
|
|
2446
2457
|
else if (e === "visible") n.visibleElements = hn(t());
|
|
2447
2458
|
else if (e === "against") n.against = t().trim();
|
|
@@ -2498,7 +2509,7 @@ var gn = function(e, t) {
|
|
|
2498
2509
|
o.reportRows = t;
|
|
2499
2510
|
} else if (t === "references") o.formReferences = he(i(s[c++]));
|
|
2500
2511
|
else if (t === "ref") {
|
|
2501
|
-
let e =
|
|
2512
|
+
let e = S(s, c, a, i);
|
|
2502
2513
|
T(o, e.ref) || (o.refs = [...o.refs ?? [], e.ref]), c = e.next;
|
|
2503
2514
|
} else if (t === "corresponds") {
|
|
2504
2515
|
let e = D(s, c, a);
|
|
@@ -2812,18 +2823,18 @@ var kn = function(e) {
|
|
|
2812
2823
|
};
|
|
2813
2824
|
return v(t, (t, s, c) => {
|
|
2814
2825
|
if (t === "ref") {
|
|
2815
|
-
let e =
|
|
2826
|
+
let e = C(s, c, a, i);
|
|
2816
2827
|
return T(o, e) || (o.refs ??= []).push(e), !0;
|
|
2817
2828
|
}
|
|
2818
2829
|
if (t === "corresponds") return (o.correspondences ??= []).push(O(s, c, a)), !0;
|
|
2819
|
-
if (t === "name") o.name =
|
|
2820
|
-
else if (t === "definition") o.definition =
|
|
2830
|
+
if (t === "name") o.name = x(s);
|
|
2831
|
+
else if (t === "definition") o.definition = x(s);
|
|
2821
2832
|
else if (t === "type") {
|
|
2822
2833
|
let t = s();
|
|
2823
2834
|
if (!An.includes(t)) throw Error(`Parsing error: symbol. ID ${e}: Unknown type ${t} (valid: ${An.join(", ")})`);
|
|
2824
2835
|
o.type = t;
|
|
2825
|
-
} else if (t === "unit") o.unit =
|
|
2826
|
-
else if (t === "latex") o.latex =
|
|
2836
|
+
} else if (t === "unit") o.unit = x(s);
|
|
2837
|
+
else if (t === "latex") o.latex = x(s);
|
|
2827
2838
|
else if (t === "values") {
|
|
2828
2839
|
let e = s();
|
|
2829
2840
|
o.values = e.startsWith("{") ? r(e).map(a) : [a(e)];
|
|
@@ -2848,7 +2859,7 @@ var kn = function(e) {
|
|
|
2848
2859
|
o === "display" ? t.display = a(e[r++]) : o === "expression" ? t.expression = a(e[r++]) : o === "inputs" ? t.inputs = n(a(e[r++])).map(a).filter((e) => e.length > 0) : i(e[r++]);
|
|
2849
2860
|
}
|
|
2850
2861
|
o.formula = t;
|
|
2851
|
-
} else if (t === "note") o.notes.push(
|
|
2862
|
+
} else if (t === "note") o.notes.push(x(s));
|
|
2852
2863
|
else if (t === "reference") o._relations.ref = r(s());
|
|
2853
2864
|
else return !1;
|
|
2854
2865
|
return !0;
|
|
@@ -2911,7 +2922,7 @@ var kn = function(e) {
|
|
|
2911
2922
|
else if (t === "expression") o.expression = i(s[c++]);
|
|
2912
2923
|
else if (t === "reference") o._relations.ref = r(s[c++]);
|
|
2913
2924
|
else if (t === "ref") {
|
|
2914
|
-
let e =
|
|
2925
|
+
let e = S(s, c, a, i);
|
|
2915
2926
|
T(o, e.ref) || (o.refs ??= []).push(e.ref), c = e.next;
|
|
2916
2927
|
} else if (t === "corresponds") {
|
|
2917
2928
|
let e = D(s, c, a);
|
|
@@ -3754,7 +3765,7 @@ var _r = function(e, t) {
|
|
|
3754
3765
|
title: gr(o[s++])
|
|
3755
3766
|
});
|
|
3756
3767
|
} else if (t === "ref") {
|
|
3757
|
-
let e =
|
|
3768
|
+
let e = S(o, s, a, i);
|
|
3758
3769
|
T(n, e.ref) || (n.refs ??= []).push(e.ref), s = e.next;
|
|
3759
3770
|
} else if (t === "corresponds") {
|
|
3760
3771
|
let e = D(o, s, a);
|
|
@@ -4026,11 +4037,11 @@ var Dr = function(e, t) {
|
|
|
4026
4037
|
sourceRef: null
|
|
4027
4038
|
};
|
|
4028
4039
|
return v(t, (e, t, s) => {
|
|
4029
|
-
if (e === "name") o.name =
|
|
4030
|
-
else if (e === "purpose") o.purpose =
|
|
4031
|
-
else if (e === "method") o.method =
|
|
4040
|
+
if (e === "name") o.name = x(t);
|
|
4041
|
+
else if (e === "purpose") o.purpose = x(t);
|
|
4042
|
+
else if (e === "method") o.method = x(t);
|
|
4032
4043
|
else if (e === "method_ref") o.methodRef = a(t());
|
|
4033
|
-
else if (e === "guidance") o.guidance =
|
|
4044
|
+
else if (e === "guidance") o.guidance = x(t);
|
|
4034
4045
|
else if (e === "type") o.type = t();
|
|
4035
4046
|
else if (e === "reference") {
|
|
4036
4047
|
let e = t();
|
|
@@ -4047,7 +4058,7 @@ var Dr = function(e, t) {
|
|
|
4047
4058
|
} else o.sourceRef = null, o.sourceRefs = void 0, o.reference = e;
|
|
4048
4059
|
} else if (e === "targets") o.targets = r(t());
|
|
4049
4060
|
else if (e === "ref") {
|
|
4050
|
-
let e =
|
|
4061
|
+
let e = C(t, s, a, i);
|
|
4051
4062
|
T(o, e) || (o.refs ??= []).push(e);
|
|
4052
4063
|
} else if (e === "corresponds") (o.correspondences ??= []).push(O(t, s, a));
|
|
4053
4064
|
else if (e === "binds_to") o.bindsTo = r(t());
|
|
@@ -4059,7 +4070,7 @@ var Dr = function(e, t) {
|
|
|
4059
4070
|
if (!isNaN(t) && n + 1 < e.length) {
|
|
4060
4071
|
let r = {
|
|
4061
4072
|
order: t,
|
|
4062
|
-
action:
|
|
4073
|
+
action: x(() => e[n + 1]),
|
|
4063
4074
|
outputs: []
|
|
4064
4075
|
};
|
|
4065
4076
|
n += 2, e[n] === "inputs" && n + 1 < e.length && (r.inputs = V(e[n + 1]), n += 2), e[n] === "outputs" && n + 1 < e.length && (r.outputs = V(e[n + 1]), n += 2), o.procedure.push(r);
|
|
@@ -4068,7 +4079,7 @@ var Dr = function(e, t) {
|
|
|
4068
4079
|
} else if (e === "procedure_steps") o.procedureSteps = V(t());
|
|
4069
4080
|
else if (e === "kind") o.kind = a(t());
|
|
4070
4081
|
else if (e === "obligation") o.obligation = a(t());
|
|
4071
|
-
else if (e === "obligation_note") o.obligationNote =
|
|
4082
|
+
else if (e === "obligation_note") o.obligationNote = x(t);
|
|
4072
4083
|
else if (e === "test_subject") o.testSubject = Tr(i(t()));
|
|
4073
4084
|
else if (e === "variables") o.variables = br(i(t()));
|
|
4074
4085
|
else if (e === "observables") o.observables = Sr(i(t()));
|
|
@@ -4207,12 +4218,12 @@ var Mr = function(e, t) {
|
|
|
4207
4218
|
};
|
|
4208
4219
|
return v(t, (t, o, s) => {
|
|
4209
4220
|
if (t === "ref") {
|
|
4210
|
-
let e =
|
|
4221
|
+
let e = C(o, s, a, i);
|
|
4211
4222
|
return e.predicate === "derives-from" && !n.source ? n.source = e.target : e.predicate === "cites" ? n.referenceIds.push(e.target) : (n.refs ??= []).push(e), !0;
|
|
4212
4223
|
}
|
|
4213
4224
|
if (t === "corresponds") return (n.correspondences ??= []).push(O(o, s, a)), !0;
|
|
4214
|
-
if (t === "label") n.label =
|
|
4215
|
-
else if (t === "definition") n.definition =
|
|
4225
|
+
if (t === "label") n.label = x(o);
|
|
4226
|
+
else if (t === "definition") n.definition = x(o);
|
|
4216
4227
|
else if (t === "symbol") n.symbolId = a(o());
|
|
4217
4228
|
else if (t === "reference") n.referenceIds = r(o());
|
|
4218
4229
|
else if (t === "vocab_ref") {
|
|
@@ -4223,14 +4234,14 @@ var Mr = function(e, t) {
|
|
|
4223
4234
|
for (let n = 0; n + 1 < e.length; n += 2) e[n] === "register" && (t.register = a(e[n + 1])), e[n] === "clause" && (t.clause = a(e[n + 1]));
|
|
4224
4235
|
n.vocabRef = t;
|
|
4225
4236
|
} else if (t === "vocab_term") n.vocabTerm = a(o());
|
|
4226
|
-
else if (t === "section") n.section =
|
|
4227
|
-
else if (t === "note") n.note =
|
|
4228
|
-
else if (t === "source") n.source =
|
|
4237
|
+
else if (t === "section") n.section = x(o);
|
|
4238
|
+
else if (t === "note") n.note = x(o);
|
|
4239
|
+
else if (t === "source") n.source = x(o);
|
|
4229
4240
|
else if (t === "overlay") n.overlay = o() === "true";
|
|
4230
|
-
else if (t === "scope_note") n.scopeNote =
|
|
4231
|
-
else if (t === "language") n.language =
|
|
4232
|
-
else if (t === "form_type") n.formType =
|
|
4233
|
-
else if (t === "part_of_speech") n.partOfSpeech =
|
|
4241
|
+
else if (t === "scope_note") n.scopeNote = x(o);
|
|
4242
|
+
else if (t === "language") n.language = x(o);
|
|
4243
|
+
else if (t === "form_type") n.formType = x(o);
|
|
4244
|
+
else if (t === "part_of_speech") n.partOfSpeech = x(o);
|
|
4234
4245
|
else if (Ar(t)) {
|
|
4235
4246
|
let i = o(), c, l = i;
|
|
4236
4247
|
if (!i.startsWith("{")) {
|
|
@@ -4304,9 +4315,9 @@ var Ir = function(e, t) {
|
|
|
4304
4315
|
if (t >= e.length) break;
|
|
4305
4316
|
n === "kind" ? r.quantityKind = a(e[t++]) : n === "unit" ? r.unit = a(e[t++]) : i(e[t++]);
|
|
4306
4317
|
}
|
|
4307
|
-
} else if (t === "symbol") r.symbol =
|
|
4318
|
+
} else if (t === "symbol") r.symbol = x(o);
|
|
4308
4319
|
else if (t === "behavior") r.behavior = o();
|
|
4309
|
-
else if (t === "derive" || t === "expression") r.derive =
|
|
4320
|
+
else if (t === "derive" || t === "expression") r.derive = x(o);
|
|
4310
4321
|
else if (t === "inputs" || t === "uses") r.inputs = Fr(o());
|
|
4311
4322
|
else if (t === "series_reduction") {
|
|
4312
4323
|
let t = o();
|
|
@@ -4317,7 +4328,7 @@ var Ir = function(e, t) {
|
|
|
4317
4328
|
let e = I(i(o()));
|
|
4318
4329
|
(r.sourceRefs ??= []).push(e), r.source ||= e;
|
|
4319
4330
|
} else if (t === "ref") {
|
|
4320
|
-
let e =
|
|
4331
|
+
let e = C(o, s, a, i);
|
|
4321
4332
|
T(r, e) || (r.refs ??= []).push(e);
|
|
4322
4333
|
} else if (t === "corresponds") (r.correspondences ??= []).push(O(o, s, a));
|
|
4323
4334
|
else return !1;
|
|
@@ -4331,7 +4342,7 @@ var Ir = function(e, t) {
|
|
|
4331
4342
|
e.symbol && (t += " symbol \"" + s(e.symbol) + "\"\n"), e.behavior && (t += " behavior " + e.behavior + "\n"), e.quantityKind && (t += " quantity { kind " + e.quantityKind, e.unit && (t += " unit \"" + s(e.unit) + "\""), t += " }\n"), e.derive && (t += " derive \"" + s(e.derive) + "\"\n"), e.inputs.length > 0 && (t += " inputs { " + e.inputs.join(" ") + " }\n"), e.seriesReduction && (t += " series_reduction " + e.seriesReduction + "\n"), e.acceptance && (t += Yn(e.acceptance, " ") + "\n");
|
|
4332
4343
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source && (e.source.doc || e.source.clause) ? [e.source] : [];
|
|
4333
4344
|
for (let e of n) t += E(e, " ", s);
|
|
4334
|
-
return t +=
|
|
4345
|
+
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
4335
4346
|
};
|
|
4336
4347
|
//#endregion
|
|
4337
4348
|
//#region src/ser-des/config/referenceMaterial.ts
|
|
@@ -4406,9 +4417,9 @@ function zr(e) {
|
|
|
4406
4417
|
} else if (r === "on_violation") e.onViolation = a(t[s++]);
|
|
4407
4418
|
else if (r === "source") e.source = I(i(t[s++]));
|
|
4408
4419
|
else if (r === "ref") {
|
|
4409
|
-
let n =
|
|
4420
|
+
let n = S(t, s, a, i);
|
|
4410
4421
|
if (s = n.next, n.ref.predicate === "derives-from" && !e.source) {
|
|
4411
|
-
let t =
|
|
4422
|
+
let t = ee(n.ref.target);
|
|
4412
4423
|
t && (e.source = t);
|
|
4413
4424
|
}
|
|
4414
4425
|
} else s = y(t, s, r);
|
|
@@ -4430,13 +4441,13 @@ var Br = function(e, t) {
|
|
|
4430
4441
|
};
|
|
4431
4442
|
return v(t, (e, t, r) => {
|
|
4432
4443
|
if (e === "kind") n.kind = a(t());
|
|
4433
|
-
else if (e === "name") n.name =
|
|
4434
|
-
else if (e === "definition") n.definition =
|
|
4444
|
+
else if (e === "name") n.name = x(t);
|
|
4445
|
+
else if (e === "definition") n.definition = x(t);
|
|
4435
4446
|
else if (e === "source") {
|
|
4436
4447
|
let e = I(i(t()));
|
|
4437
4448
|
(n.sourceRefs ??= []).push(e), n.source ||= e;
|
|
4438
4449
|
} else if (e === "ref") {
|
|
4439
|
-
let e =
|
|
4450
|
+
let e = C(t, r, a, i);
|
|
4440
4451
|
T(n, e) || (n.refs ??= []).push(e);
|
|
4441
4452
|
} else if (e === "corresponds") (n.correspondences ??= []).push(O(t, r, a));
|
|
4442
4453
|
else if (e === "identity_fields") n.identityFields = Rr(i(t()));
|
|
@@ -4452,7 +4463,7 @@ var Br = function(e, t) {
|
|
|
4452
4463
|
e.kind && (t += " kind " + e.kind + "\n"), e.name && (t += " name \"" + s(e.name) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n");
|
|
4453
4464
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
4454
4465
|
for (let e of n) t += E(e, " ", s);
|
|
4455
|
-
if (t +=
|
|
4466
|
+
if (t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), e.identityFields.length > 0) {
|
|
4456
4467
|
t += " identity_fields {\n";
|
|
4457
4468
|
for (let n of e.identityFields) {
|
|
4458
4469
|
let e = " field " + n.name + " { ";
|
|
@@ -4521,7 +4532,7 @@ var Gr = function(e, t) {
|
|
|
4521
4532
|
else if (t === "on_violation") n.onViolation = a(o[s++]);
|
|
4522
4533
|
else if (t === "source") n.source = I(i(o[s++]));
|
|
4523
4534
|
else if (t === "ref") {
|
|
4524
|
-
let e =
|
|
4535
|
+
let e = S(o, s, a, i);
|
|
4525
4536
|
T(n, e.ref) || (n.refs ??= []).push(e.ref), s = e.next;
|
|
4526
4537
|
} else if (t === "corresponds") {
|
|
4527
4538
|
let e = D(o, s, a);
|
|
@@ -4619,12 +4630,12 @@ var Qr = function(e, t) {
|
|
|
4619
4630
|
points: []
|
|
4620
4631
|
};
|
|
4621
4632
|
return v(t, (e, t, r) => {
|
|
4622
|
-
if (e === "description") n.description =
|
|
4633
|
+
if (e === "description") n.description = x(t);
|
|
4623
4634
|
else if (e === "source") {
|
|
4624
4635
|
let e = I(i(t()));
|
|
4625
4636
|
(n.sourceRefs ??= []).push(e), n.source ||= e;
|
|
4626
4637
|
} else if (e === "ref") {
|
|
4627
|
-
let e =
|
|
4638
|
+
let e = C(t, r, a, i);
|
|
4628
4639
|
T(n, e) || (n.refs ??= []).push(e);
|
|
4629
4640
|
} else if (e === "corresponds") (n.correspondences ??= []).push(O(t, r, a));
|
|
4630
4641
|
else if (e === "cardinality") n.cardinality = Xr(i(t()));
|
|
@@ -4641,7 +4652,7 @@ var Qr = function(e, t) {
|
|
|
4641
4652
|
e.description && (t += " description \"" + s(e.description) + "\"\n");
|
|
4642
4653
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source && (e.source.doc || e.source.clause) ? [e.source] : [];
|
|
4643
4654
|
for (let e of n) t += E(e, " ", s);
|
|
4644
|
-
t +=
|
|
4655
|
+
t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N);
|
|
4645
4656
|
let r = Object.keys(e.cardinality);
|
|
4646
4657
|
if (r.length > 0) {
|
|
4647
4658
|
t += " cardinality {\n";
|
|
@@ -4830,7 +4841,7 @@ var ii = function(e, t) {
|
|
|
4830
4841
|
let e = I(i(s[c++]));
|
|
4831
4842
|
o.source ||= e, (o.sourceRefs ??= []).push(e);
|
|
4832
4843
|
} else if (e === "ref") {
|
|
4833
|
-
let e =
|
|
4844
|
+
let e = S(s, c, a, i);
|
|
4834
4845
|
T(o, e.ref) || (o.refs ??= []).push(e.ref), c = e.next;
|
|
4835
4846
|
} else if (e === "corresponds") {
|
|
4836
4847
|
let e = D(s, c, a);
|
|
@@ -4968,7 +4979,7 @@ var mi = function(e) {
|
|
|
4968
4979
|
else if (e === "product") t.product = a(r[o++]);
|
|
4969
4980
|
else if (e === "maps_to" || e === "mapsTo") t.mapsTo = U(r[o++]);
|
|
4970
4981
|
else if (e === "ref") {
|
|
4971
|
-
let e =
|
|
4982
|
+
let e = S(r, o, a, i);
|
|
4972
4983
|
T(t, e.ref) || (t.refs ??= []).push(e.ref), o = e.next;
|
|
4973
4984
|
} else if (e === "corresponds") {
|
|
4974
4985
|
let e = D(r, o, a);
|
|
@@ -5354,9 +5365,9 @@ var Pi = function(e, t) {
|
|
|
5354
5365
|
else if (n === "note") o.familyNote = a(e[t++]);
|
|
5355
5366
|
else if (n === "source") o.familySource = I(i(e[t++]));
|
|
5356
5367
|
else if (n === "ref") {
|
|
5357
|
-
let n =
|
|
5368
|
+
let n = S(e, t, a, i);
|
|
5358
5369
|
if (t = n.next, n.ref.predicate === "derives-from") {
|
|
5359
|
-
let e =
|
|
5370
|
+
let e = ee(n.ref.target);
|
|
5360
5371
|
e && !o.familySource && (o.familySource = e);
|
|
5361
5372
|
}
|
|
5362
5373
|
} else i(e[t++]);
|
|
@@ -5371,7 +5382,7 @@ var Pi = function(e, t) {
|
|
|
5371
5382
|
} else if (e === "model_group") o.modelGroup = Vi(i(s[c++]));
|
|
5372
5383
|
else if (e === "reference") o.referenceIds = q(s[c++]);
|
|
5373
5384
|
else if (e === "ref") {
|
|
5374
|
-
let e =
|
|
5385
|
+
let e = S(s, c, a, i);
|
|
5375
5386
|
T(o, e.ref) || (o.refs ??= []).push(e.ref), c = e.next;
|
|
5376
5387
|
} else if (e === "corresponds") {
|
|
5377
5388
|
let e = D(s, c, a);
|
|
@@ -5475,7 +5486,7 @@ function Ri(e, t) {
|
|
|
5475
5486
|
else if (t === "values") r.values = zi(i(o[s++]));
|
|
5476
5487
|
else if (t === "values_of") r.valuesOf = a(o[s++]);
|
|
5477
5488
|
else if (t === "ref") {
|
|
5478
|
-
let e =
|
|
5489
|
+
let e = S(o, s, a, i);
|
|
5479
5490
|
T(r, e.ref) || (r.refs ??= []).push(e.ref), s = e.next;
|
|
5480
5491
|
} else s = y(o, s, t);
|
|
5481
5492
|
}
|
|
@@ -5546,7 +5557,7 @@ function Bi(e, t) {
|
|
|
5546
5557
|
}
|
|
5547
5558
|
i += n + "}\n";
|
|
5548
5559
|
}
|
|
5549
|
-
return i +=
|
|
5560
|
+
return i += w(e.refs, n, s), i += t + "}\n", i;
|
|
5550
5561
|
}
|
|
5551
5562
|
function Vi(e) {
|
|
5552
5563
|
let t = {
|
|
@@ -5566,9 +5577,9 @@ function Vi(e) {
|
|
|
5566
5577
|
else if (e === "note") t.note = a(r[o++]);
|
|
5567
5578
|
else if (e === "source") t.sources.push(I(i(r[o++])));
|
|
5568
5579
|
else if (e === "ref") {
|
|
5569
|
-
let e =
|
|
5580
|
+
let e = S(r, o, a, i);
|
|
5570
5581
|
if (o = e.next, e.ref.predicate === "derives-from") {
|
|
5571
|
-
let n =
|
|
5582
|
+
let n = ee(e.ref.target);
|
|
5572
5583
|
n && t.sources.push(n);
|
|
5573
5584
|
}
|
|
5574
5585
|
} else e === "sample_selection" ? t.sampleSelection.push(I(i(r[o++]))) : o = y(r, o, e);
|
|
@@ -5612,7 +5623,7 @@ var Hi = function(e) {
|
|
|
5612
5623
|
}
|
|
5613
5624
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
5614
5625
|
for (let e of n) t += E(e, " ", s);
|
|
5615
|
-
return t +=
|
|
5626
|
+
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += K("reference", e.referenceIds, " "), t += "}\n", t;
|
|
5616
5627
|
}, Ui = function(e, t) {
|
|
5617
5628
|
let n = {
|
|
5618
5629
|
id: e,
|
|
@@ -5654,7 +5665,7 @@ var Hi = function(e) {
|
|
|
5654
5665
|
else if (e === "irdi") n.irdi = a(o[s++]);
|
|
5655
5666
|
else if (e === "derived") n.derived = a(o[s++]);
|
|
5656
5667
|
else if (e === "ref") {
|
|
5657
|
-
let e =
|
|
5668
|
+
let e = S(o, s, a, i);
|
|
5658
5669
|
T(n, e.ref) || (n.refs ??= []).push(e.ref), s = e.next;
|
|
5659
5670
|
} else if (e === "corresponds") {
|
|
5660
5671
|
let e = D(o, s, a);
|
|
@@ -5668,7 +5679,7 @@ var Hi = function(e) {
|
|
|
5668
5679
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
5669
5680
|
for (let e of n) t += E(e, " ", s);
|
|
5670
5681
|
for (let n of e.referenceIds) t += " ref cites \"" + s(n) + "\"\n";
|
|
5671
|
-
return t +=
|
|
5682
|
+
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), e.quantityKind && (t += " quantity_kind " + e.quantityKind + "\n"), e.unit && (t += " unit \"" + s(e.unit) + "\"\n"), e.valueType && (t += " value_type " + e.valueType + "\n"), e.origin && (t += " origin " + e.origin + "\n"), e.scope && (t += " scope " + e.scope + "\n"), e.category && (t += " category " + e.category + "\n"), e.isDimension !== null && e.isDimension !== void 0 && (t += " is_dimension " + (e.isDimension ? "true" : "false") + "\n"), e.enumRef && (t += " enum " + e.enumRef + "\n"), e.enumValues && e.enumValues.length > 0 && (t += " enum_values { " + e.enumValues.map(N).join(" ") + " }\n"), e.irdi && (t += " irdi \"" + s(e.irdi) + "\"\n"), e.derived && (t += " derived \"" + s(e.derived) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), t += "}\n", t;
|
|
5672
5683
|
}, Gi = function(e, t) {
|
|
5673
5684
|
let n = {
|
|
5674
5685
|
id: e,
|
|
@@ -5695,7 +5706,7 @@ var Hi = function(e) {
|
|
|
5695
5706
|
else if (e === "verified_by_tests" || e === "verified_by") n.verifiedByTests = q(o[s++]);
|
|
5696
5707
|
else if (e === "reference") n.referenceIds = q(o[s++]);
|
|
5697
5708
|
else if (e === "ref") {
|
|
5698
|
-
let e =
|
|
5709
|
+
let e = S(o, s, a, i);
|
|
5699
5710
|
T(n, e.ref) || (n.refs ??= []).push(e.ref), s = e.next;
|
|
5700
5711
|
} else if (e === "corresponds") {
|
|
5701
5712
|
let e = D(o, s, a);
|
|
@@ -5705,7 +5716,7 @@ var Hi = function(e) {
|
|
|
5705
5716
|
return (t) => (t.capabilities[e] = n, t);
|
|
5706
5717
|
}, Ki = function(e) {
|
|
5707
5718
|
let t = "capability " + e.id + " {\n";
|
|
5708
|
-
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.abstract && (t += " abstract true\n"), t += K("extends", e.extends, " "), t += K("requires", e.requires, " "), t += K("has_parameters", e.hasParameters, " "), t += K("satisfies_requirements", e.satisfiesRequirements, " "), t += K("verified_by_tests", e.verifiedByTests, " "), t += K("reference", e.referenceIds, " "), t +=
|
|
5719
|
+
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.abstract && (t += " abstract true\n"), t += K("extends", e.extends, " "), t += K("requires", e.requires, " "), t += K("has_parameters", e.hasParameters, " "), t += K("satisfies_requirements", e.satisfiesRequirements, " "), t += K("verified_by_tests", e.verifiedByTests, " "), t += K("reference", e.referenceIds, " "), t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
5709
5720
|
}, qi = function(e, t) {
|
|
5710
5721
|
let n = {
|
|
5711
5722
|
id: e,
|
|
@@ -5727,7 +5738,7 @@ var Hi = function(e) {
|
|
|
5727
5738
|
(n.sourceRefs ??= []).push(e), n.source ||= e;
|
|
5728
5739
|
} else if (e === "verified_by" || e === "verified_by_tests") n.verifiedBy = q(o[s++]);
|
|
5729
5740
|
else if (e === "ref") {
|
|
5730
|
-
let e =
|
|
5741
|
+
let e = S(o, s, a, i);
|
|
5731
5742
|
T(n, e.ref) || (n.refs ??= []).push(e.ref), s = e.next;
|
|
5732
5743
|
} else if (e === "corresponds") {
|
|
5733
5744
|
let e = D(o, s, a);
|
|
@@ -5740,7 +5751,7 @@ var Hi = function(e) {
|
|
|
5740
5751
|
e.kind && (t += " kind " + e.kind + "\n"), e.stimulus && (t += " stimulus " + e.stimulus + "\n"), e.response && (t += " response \"" + s(e.response) + "\"\n");
|
|
5741
5752
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
5742
5753
|
for (let e of n) t += E(e, " ", s);
|
|
5743
|
-
return t +=
|
|
5754
|
+
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += K("verified_by", e.verifiedBy, " "), t += "}\n", t;
|
|
5744
5755
|
}, Yi = function(e, t) {
|
|
5745
5756
|
let n = {
|
|
5746
5757
|
id: e,
|
|
@@ -5761,9 +5772,9 @@ var Hi = function(e) {
|
|
|
5761
5772
|
let e = I(i(o[s++]));
|
|
5762
5773
|
n.sources.push(e), n.source ||= e;
|
|
5763
5774
|
} else if (e === "ref") {
|
|
5764
|
-
let e =
|
|
5775
|
+
let e = S(o, s, a, i);
|
|
5765
5776
|
if (s = e.next, e.ref.predicate === "derives-from") {
|
|
5766
|
-
let t =
|
|
5777
|
+
let t = ee(e.ref.target);
|
|
5767
5778
|
t ? (n.sources.push(t), n.source ||= t) : (n.refs ??= []).push(e.ref);
|
|
5768
5779
|
} else e.ref.predicate === "cites" ? n.referenceIds.push(e.ref.target) : (n.refs ??= []).push(e.ref);
|
|
5769
5780
|
} else if (e === "corresponds") {
|
|
@@ -5808,7 +5819,7 @@ var Zi = function(e) {
|
|
|
5808
5819
|
}
|
|
5809
5820
|
let n = e.sources && e.sources.length > 0 ? e.sources : e.source ? [e.source] : [];
|
|
5810
5821
|
for (let e of n) t += E(e, " ", s);
|
|
5811
|
-
return t += K("reference", e.referenceIds, " "), t +=
|
|
5822
|
+
return t += K("reference", e.referenceIds, " "), t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
5812
5823
|
};
|
|
5813
5824
|
function Qi(e) {
|
|
5814
5825
|
let t = {}, r = n(e), i = 0;
|
|
@@ -6413,7 +6424,7 @@ var Ja = function(e, t) {
|
|
|
6413
6424
|
(n.sourceRefs ??= []).push(e), n.source ||= e;
|
|
6414
6425
|
} else if (e === "reference") n.referenceIds = Wa(o[s++]);
|
|
6415
6426
|
else if (e === "ref") {
|
|
6416
|
-
let e =
|
|
6427
|
+
let e = S(o, s, a, i);
|
|
6417
6428
|
T(n, e.ref) || (n.refs ??= []).push(e.ref), s = e.next;
|
|
6418
6429
|
} else if (e === "corresponds") {
|
|
6419
6430
|
let e = D(o, s, a);
|
|
@@ -6448,7 +6459,7 @@ var Xa = function(e) {
|
|
|
6448
6459
|
e.producedWhen.kind && (t += " produced_when " + Ya(e.producedWhen) + "\n"), e.retention && (t += " retention \"" + s(e.retention) + "\"\n");
|
|
6449
6460
|
let r = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
6450
6461
|
for (let e of r) t += E(e, " ", s);
|
|
6451
|
-
return t +=
|
|
6462
|
+
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += Ua("reference", e.referenceIds, " "), t += "}\n", t;
|
|
6452
6463
|
}, Za = function(e, t) {
|
|
6453
6464
|
let n = {
|
|
6454
6465
|
id: e,
|
|
@@ -6854,7 +6865,7 @@ var Co = {
|
|
|
6854
6865
|
else if (t === "description") n.description = a(o[s++]);
|
|
6855
6866
|
else if (t === "sample_applicability") n.sampleApplicability = a(o[s++]);
|
|
6856
6867
|
else if (t === "ref") {
|
|
6857
|
-
let e =
|
|
6868
|
+
let e = S(o, s, a, i);
|
|
6858
6869
|
T(n, e.ref) || (n.refs = [...n.refs ?? [], e.ref]), s = e.next;
|
|
6859
6870
|
} else if (t === "corresponds") {
|
|
6860
6871
|
let e = D(o, s, a);
|
|
@@ -6899,7 +6910,7 @@ var Co = {
|
|
|
6899
6910
|
else if (e === "description") n.description = a(t());
|
|
6900
6911
|
else if (e === "formulas") n.formulas.push(...F(t()));
|
|
6901
6912
|
else if (e === "ref") {
|
|
6902
|
-
let e =
|
|
6913
|
+
let e = C(t, r, a, i);
|
|
6903
6914
|
T(n, e) || (n.refs ??= []).push(e);
|
|
6904
6915
|
} else if (e === "corresponds") (n.correspondences ??= []).push(O(t, r, a));
|
|
6905
6916
|
else if (e === "source") n.sourceRefs.push(I(i(t())));
|
|
@@ -7113,8 +7124,8 @@ var Ro = {
|
|
|
7113
7124
|
sourceRefs: []
|
|
7114
7125
|
};
|
|
7115
7126
|
return v(t, (e, t, r) => {
|
|
7116
|
-
if (e === "name") n.name =
|
|
7117
|
-
else if (e === "description") n.description =
|
|
7127
|
+
if (e === "name") n.name = x(t);
|
|
7128
|
+
else if (e === "description") n.description = x(t);
|
|
7118
7129
|
else if (e === "participant_class") {
|
|
7119
7130
|
let e = {
|
|
7120
7131
|
id: a(t()),
|
|
@@ -7122,8 +7133,8 @@ var Ro = {
|
|
|
7122
7133
|
description: ""
|
|
7123
7134
|
}, o = r();
|
|
7124
7135
|
o && o.startsWith("{") && v(i(t()), (t, n) => {
|
|
7125
|
-
if (t === "label") e.label =
|
|
7126
|
-
else if (t === "description") e.description =
|
|
7136
|
+
if (t === "label") e.label = x(n);
|
|
7137
|
+
else if (t === "description") e.description = x(n);
|
|
7127
7138
|
else return !1;
|
|
7128
7139
|
return !0;
|
|
7129
7140
|
}, {
|
|
@@ -7139,8 +7150,8 @@ var Ro = {
|
|
|
7139
7150
|
policy: ""
|
|
7140
7151
|
}, o = r();
|
|
7141
7152
|
o && o.startsWith("{") && v(i(t()), (t, n) => {
|
|
7142
|
-
if (t === "label") e.label =
|
|
7143
|
-
else if (t === "description") e.description =
|
|
7153
|
+
if (t === "label") e.label = x(n);
|
|
7154
|
+
else if (t === "description") e.description = x(n);
|
|
7144
7155
|
else if (t === "element") e.element = a(n());
|
|
7145
7156
|
else if (t === "policy") e.policy = a(n());
|
|
7146
7157
|
else return !1;
|
|
@@ -7161,7 +7172,7 @@ var Ro = {
|
|
|
7161
7172
|
o && o.startsWith("{") && v(i(t()), (t, n, r) => {
|
|
7162
7173
|
if (t === "trust_ref") e.trustRef = Io(n, r, a);
|
|
7163
7174
|
else if (t === "role") e.role = a(n());
|
|
7164
|
-
else if (t === "description") e.description =
|
|
7175
|
+
else if (t === "description") e.description = x(n);
|
|
7165
7176
|
else return !1;
|
|
7166
7177
|
return !0;
|
|
7167
7178
|
}, {
|
|
@@ -7173,7 +7184,7 @@ var Ro = {
|
|
|
7173
7184
|
let e = I(i(t()));
|
|
7174
7185
|
n.sourceRefs.push(e), n.source ||= e;
|
|
7175
7186
|
} else if (e === "ref") {
|
|
7176
|
-
let e =
|
|
7187
|
+
let e = C(t, r, a, i);
|
|
7177
7188
|
T(n, e) || (n.refs ??= []).push(e);
|
|
7178
7189
|
} else if (e === "corresponds") (n.correspondences ??= []).push(O(t, r, a));
|
|
7179
7190
|
else return !1;
|
|
@@ -7193,7 +7204,7 @@ var Ro = {
|
|
|
7193
7204
|
e.compatibleWith.length > 0 && (t += " compatible_with { " + e.compatibleWith.map(N).join(" ") + " }\n");
|
|
7194
7205
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
7195
7206
|
for (let e of n) t += E(e, " ", s);
|
|
7196
|
-
return t +=
|
|
7207
|
+
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
7197
7208
|
}
|
|
7198
7209
|
}, zo = [
|
|
7199
7210
|
"permission",
|
|
@@ -7215,8 +7226,8 @@ var Ro = {
|
|
|
7215
7226
|
sourceRefs: []
|
|
7216
7227
|
};
|
|
7217
7228
|
return v(t, (t, r, o) => {
|
|
7218
|
-
if (t === "name") n.name =
|
|
7219
|
-
else if (t === "description") n.description =
|
|
7229
|
+
if (t === "name") n.name = x(r);
|
|
7230
|
+
else if (t === "description") n.description = x(r);
|
|
7220
7231
|
else if (t === "governs") n.governs = F(r());
|
|
7221
7232
|
else if (t === "default_posture") {
|
|
7222
7233
|
let t = a(r());
|
|
@@ -7237,7 +7248,7 @@ var Ro = {
|
|
|
7237
7248
|
e.kind = t;
|
|
7238
7249
|
} else if (t === "action") e.action = a(n());
|
|
7239
7250
|
else if (t === "artifact") e.artifact = a(n());
|
|
7240
|
-
else if (t === "constraint") e.constraints.push(
|
|
7251
|
+
else if (t === "constraint") e.constraints.push(x(n));
|
|
7241
7252
|
else return !1;
|
|
7242
7253
|
return !0;
|
|
7243
7254
|
}, {
|
|
@@ -7248,7 +7259,7 @@ var Ro = {
|
|
|
7248
7259
|
let e = I(i(r()));
|
|
7249
7260
|
n.sourceRefs.push(e), n.source ||= e;
|
|
7250
7261
|
} else if (t === "ref") {
|
|
7251
|
-
let e =
|
|
7262
|
+
let e = C(r, o, a, i);
|
|
7252
7263
|
T(n, e) || (n.refs ??= []).push(e);
|
|
7253
7264
|
} else if (t === "corresponds") (n.correspondences ??= []).push(O(r, o, a));
|
|
7254
7265
|
else return !1;
|
|
@@ -7268,7 +7279,7 @@ var Ro = {
|
|
|
7268
7279
|
}
|
|
7269
7280
|
let n = e.sourceRefs && e.sourceRefs.length > 0 ? e.sourceRefs : e.source ? [e.source] : [];
|
|
7270
7281
|
for (let e of n) t += E(e, " ", s);
|
|
7271
|
-
return t +=
|
|
7282
|
+
return t += w(e.refs, " ", s), t += k(e.correspondences, " ", s, N), t += "}\n", t;
|
|
7272
7283
|
}
|
|
7273
7284
|
}, Vo = {
|
|
7274
7285
|
keyword: "dimension",
|
|
@@ -7305,11 +7316,734 @@ var Ro = {
|
|
|
7305
7316
|
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.parent && (t += " parent " + N(e.parent) + "\n"), t += "}\n", t;
|
|
7306
7317
|
};
|
|
7307
7318
|
//#endregion
|
|
7319
|
+
//#region src/ser-des/config/participantKind.ts
|
|
7320
|
+
function Wo(e) {
|
|
7321
|
+
let t = {
|
|
7322
|
+
delegates_to: "",
|
|
7323
|
+
clause: "",
|
|
7324
|
+
note: ""
|
|
7325
|
+
};
|
|
7326
|
+
return v(e, (e, n) => {
|
|
7327
|
+
if (e === "delegates_to") t.delegates_to = a(n());
|
|
7328
|
+
else if (e === "clause") t.clause = a(n());
|
|
7329
|
+
else if (e === "note") t.note = a(n());
|
|
7330
|
+
else return !1;
|
|
7331
|
+
return !0;
|
|
7332
|
+
}, {
|
|
7333
|
+
construct: "participant_kind competence",
|
|
7334
|
+
id: ""
|
|
7335
|
+
}), t;
|
|
7336
|
+
}
|
|
7337
|
+
function Go(e) {
|
|
7338
|
+
let t = {
|
|
7339
|
+
decided_by: "",
|
|
7340
|
+
on_recommendation_of: "",
|
|
7341
|
+
procedure: "",
|
|
7342
|
+
clause: ""
|
|
7343
|
+
};
|
|
7344
|
+
return v(e, (e, n) => {
|
|
7345
|
+
if (e === "decided_by") t.decided_by = a(n());
|
|
7346
|
+
else if (e === "on_recommendation_of") t.on_recommendation_of = a(n());
|
|
7347
|
+
else if (e === "procedure") t.procedure = a(n());
|
|
7348
|
+
else if (e === "clause") t.clause = a(n());
|
|
7349
|
+
else return !1;
|
|
7350
|
+
return !0;
|
|
7351
|
+
}, {
|
|
7352
|
+
construct: "participant_kind approval",
|
|
7353
|
+
id: ""
|
|
7354
|
+
}), t;
|
|
7355
|
+
}
|
|
7356
|
+
function Ko(e, t) {
|
|
7357
|
+
let n = {
|
|
7358
|
+
id: e,
|
|
7359
|
+
label: "",
|
|
7360
|
+
term: "",
|
|
7361
|
+
definition: "",
|
|
7362
|
+
data_flag: "",
|
|
7363
|
+
acceptance: "",
|
|
7364
|
+
acceptance_note: ""
|
|
7365
|
+
};
|
|
7366
|
+
return v(t, (e, t) => {
|
|
7367
|
+
if (e === "label") n.label = a(t());
|
|
7368
|
+
else if (e === "term") n.term = a(t());
|
|
7369
|
+
else if (e === "definition") n.definition = a(t());
|
|
7370
|
+
else if (e === "data_flag") n.data_flag = a(t());
|
|
7371
|
+
else if (e === "acceptance") n.acceptance = a(t());
|
|
7372
|
+
else if (e === "acceptance_note") n.acceptance_note = a(t());
|
|
7373
|
+
else return !1;
|
|
7374
|
+
return !0;
|
|
7375
|
+
}, {
|
|
7376
|
+
construct: "participant_kind subkind",
|
|
7377
|
+
id: e
|
|
7378
|
+
}), n;
|
|
7379
|
+
}
|
|
7380
|
+
var qo = (e, t) => {
|
|
7381
|
+
let n = {
|
|
7382
|
+
id: e,
|
|
7383
|
+
label: "",
|
|
7384
|
+
term: "",
|
|
7385
|
+
clause: "",
|
|
7386
|
+
definition: "",
|
|
7387
|
+
member: "",
|
|
7388
|
+
competence: null,
|
|
7389
|
+
approval: null,
|
|
7390
|
+
approved_by: "",
|
|
7391
|
+
designated_by: "",
|
|
7392
|
+
declaration: "",
|
|
7393
|
+
admission: "",
|
|
7394
|
+
becomes: "",
|
|
7395
|
+
procedure: "",
|
|
7396
|
+
subkinds: [],
|
|
7397
|
+
source: {
|
|
7398
|
+
doc: "",
|
|
7399
|
+
clause: ""
|
|
7400
|
+
}
|
|
7401
|
+
};
|
|
7402
|
+
return v(t, (t, r, o) => {
|
|
7403
|
+
if (t === "label") n.label = a(r());
|
|
7404
|
+
else if (t === "term") n.term = a(r());
|
|
7405
|
+
else if (t === "clause") n.clause = a(r());
|
|
7406
|
+
else if (t === "definition") n.definition = a(r());
|
|
7407
|
+
else if (t === "member") n.member = a(r());
|
|
7408
|
+
else if (t === "competence") n.competence = Wo(i(r()));
|
|
7409
|
+
else if (t === "approval") n.approval = Go(i(r()));
|
|
7410
|
+
else if (t === "approved_by") n.approved_by = a(r());
|
|
7411
|
+
else if (t === "designated_by") n.designated_by = a(r());
|
|
7412
|
+
else if (t === "declaration") n.declaration = a(r());
|
|
7413
|
+
else if (t === "admission") n.admission = a(r());
|
|
7414
|
+
else if (t === "becomes") n.becomes = a(r());
|
|
7415
|
+
else if (t === "procedure") n.procedure = a(r());
|
|
7416
|
+
else if (t === "subkind") {
|
|
7417
|
+
let t = a(r()), s = o();
|
|
7418
|
+
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: participant_kind. ID ${e}: subkind ${t} is missing its block`);
|
|
7419
|
+
n.subkinds.push(Ko(t, i(r())));
|
|
7420
|
+
} else if (t === "source") n.source = I(i(r()));
|
|
7421
|
+
else return !1;
|
|
7422
|
+
return !0;
|
|
7423
|
+
}, {
|
|
7424
|
+
construct: "participant_kind",
|
|
7425
|
+
id: e
|
|
7426
|
+
}), (t) => (t.participantKinds[e] = n, t);
|
|
7427
|
+
};
|
|
7428
|
+
function Jo(e) {
|
|
7429
|
+
let t = " competence {\n";
|
|
7430
|
+
return e.delegates_to && (t += " delegates_to " + N(e.delegates_to) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), t += " }\n", t;
|
|
7431
|
+
}
|
|
7432
|
+
function Yo(e) {
|
|
7433
|
+
let t = " approval {\n";
|
|
7434
|
+
return e.decided_by && (t += " decided_by " + N(e.decided_by) + "\n"), e.on_recommendation_of && (t += " on_recommendation_of " + N(e.on_recommendation_of) + "\n"), e.procedure && (t += " procedure \"" + s(e.procedure) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
7435
|
+
}
|
|
7436
|
+
function Xo(e) {
|
|
7437
|
+
let t = " subkind " + N(e.id) + " {\n";
|
|
7438
|
+
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.data_flag && (t += " data_flag \"" + s(e.data_flag) + "\"\n"), e.acceptance && (t += " acceptance " + N(e.acceptance) + "\n"), e.acceptance_note && (t += " acceptance_note \"" + s(e.acceptance_note) + "\"\n"), t += " }\n", t;
|
|
7439
|
+
}
|
|
7440
|
+
var Zo = function(e) {
|
|
7441
|
+
let t = "participant_kind " + e.id + " {\n";
|
|
7442
|
+
e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.member && (t += " member " + N(e.member) + "\n"), e.competence && (t += Jo(e.competence)), e.approval && (t += Yo(e.approval)), e.approved_by && (t += " approved_by " + N(e.approved_by) + "\n"), e.designated_by && (t += " designated_by " + N(e.designated_by) + "\n"), e.declaration && (t += " declaration " + N(e.declaration) + "\n"), e.admission && (t += " admission \"" + s(e.admission) + "\"\n"), e.becomes && (t += " becomes " + N(e.becomes) + "\n"), e.procedure && (t += " procedure \"" + s(e.procedure) + "\"\n");
|
|
7443
|
+
for (let n of e.subkinds) t += Xo(n);
|
|
7444
|
+
return (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
7445
|
+
}, Qo = (e, t) => {
|
|
7446
|
+
let n = {
|
|
7447
|
+
id: e,
|
|
7448
|
+
label: "",
|
|
7449
|
+
term: "",
|
|
7450
|
+
clause: "",
|
|
7451
|
+
mandate: "",
|
|
7452
|
+
sub_committee_of: "",
|
|
7453
|
+
independent_of: "",
|
|
7454
|
+
source: {
|
|
7455
|
+
doc: "",
|
|
7456
|
+
clause: ""
|
|
7457
|
+
}
|
|
7458
|
+
};
|
|
7459
|
+
return v(t, (e, t) => {
|
|
7460
|
+
if (e === "label") n.label = a(t());
|
|
7461
|
+
else if (e === "term") n.term = a(t());
|
|
7462
|
+
else if (e === "clause") n.clause = a(t());
|
|
7463
|
+
else if (e === "mandate") n.mandate = a(t());
|
|
7464
|
+
else if (e === "sub_committee_of") n.sub_committee_of = a(t());
|
|
7465
|
+
else if (e === "independent_of") n.independent_of = a(t());
|
|
7466
|
+
else if (e === "source") n.source = I(i(t()));
|
|
7467
|
+
else return !1;
|
|
7468
|
+
return !0;
|
|
7469
|
+
}, {
|
|
7470
|
+
construct: "governance_organ",
|
|
7471
|
+
id: e
|
|
7472
|
+
}), (t) => (t.governanceOrgans[e] = n, t);
|
|
7473
|
+
}, $o = function(e) {
|
|
7474
|
+
let t = "governance_organ " + e.id + " {\n";
|
|
7475
|
+
return e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.mandate && (t += " mandate \"" + s(e.mandate) + "\"\n"), e.sub_committee_of && (t += " sub_committee_of " + N(e.sub_committee_of) + "\n"), e.independent_of && (t += " independent_of " + N(e.independent_of) + "\n"), (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
7476
|
+
};
|
|
7477
|
+
//#endregion
|
|
7478
|
+
//#region src/ser-des/config/declaration.ts
|
|
7479
|
+
function es(e, t) {
|
|
7480
|
+
let n = {
|
|
7481
|
+
id: e,
|
|
7482
|
+
clause: "",
|
|
7483
|
+
description: ""
|
|
7484
|
+
};
|
|
7485
|
+
return v(t, (e, t) => {
|
|
7486
|
+
if (e === "clause") n.clause = a(t());
|
|
7487
|
+
else if (e === "description") n.description = a(t());
|
|
7488
|
+
else return !1;
|
|
7489
|
+
return !0;
|
|
7490
|
+
}, {
|
|
7491
|
+
construct: "declaration_kind content",
|
|
7492
|
+
id: e
|
|
7493
|
+
}), n;
|
|
7494
|
+
}
|
|
7495
|
+
var ts = (e, t) => {
|
|
7496
|
+
let n = {
|
|
7497
|
+
id: e,
|
|
7498
|
+
label: "",
|
|
7499
|
+
holder: "",
|
|
7500
|
+
clause: "",
|
|
7501
|
+
procedure: "",
|
|
7502
|
+
definition: "",
|
|
7503
|
+
scope_model: "",
|
|
7504
|
+
scheme_a_obligation: "",
|
|
7505
|
+
content: [],
|
|
7506
|
+
source: {
|
|
7507
|
+
doc: "",
|
|
7508
|
+
clause: ""
|
|
7509
|
+
}
|
|
7510
|
+
};
|
|
7511
|
+
return v(t, (t, r, o) => {
|
|
7512
|
+
if (t === "label") n.label = a(r());
|
|
7513
|
+
else if (t === "holder") n.holder = a(r());
|
|
7514
|
+
else if (t === "clause") n.clause = a(r());
|
|
7515
|
+
else if (t === "procedure") n.procedure = a(r());
|
|
7516
|
+
else if (t === "definition") n.definition = a(r());
|
|
7517
|
+
else if (t === "scope_model") n.scope_model = a(r());
|
|
7518
|
+
else if (t === "scheme_a_obligation") n.scheme_a_obligation = a(r());
|
|
7519
|
+
else if (t === "content") {
|
|
7520
|
+
let t = a(r()), s = o();
|
|
7521
|
+
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: declaration_kind. ID ${e}: content ${t} is missing its block`);
|
|
7522
|
+
n.content.push(es(t, i(r())));
|
|
7523
|
+
} else if (t === "source") n.source = I(i(r()));
|
|
7524
|
+
else return !1;
|
|
7525
|
+
return !0;
|
|
7526
|
+
}, {
|
|
7527
|
+
construct: "declaration_kind",
|
|
7528
|
+
id: e
|
|
7529
|
+
}), (t) => (t.declarationKinds[e] = n, t);
|
|
7530
|
+
};
|
|
7531
|
+
function ns(e) {
|
|
7532
|
+
let t = " content " + N(e.id) + " {\n";
|
|
7533
|
+
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), t += " }\n", t;
|
|
7534
|
+
}
|
|
7535
|
+
function rs(e) {
|
|
7536
|
+
let t = " source {\n";
|
|
7537
|
+
return e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
7538
|
+
}
|
|
7539
|
+
var is = function(e) {
|
|
7540
|
+
let t = "declaration_kind " + e.id + " {\n";
|
|
7541
|
+
e.label && (t += " label \"" + s(e.label) + "\"\n"), e.holder && (t += " holder " + N(e.holder) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.procedure && (t += " procedure \"" + s(e.procedure) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.scope_model && (t += " scope_model " + N(e.scope_model) + "\n"), e.scheme_a_obligation && (t += " scheme_a_obligation \"" + s(e.scheme_a_obligation) + "\"\n");
|
|
7542
|
+
for (let n of e.content) t += ns(n);
|
|
7543
|
+
return (e.source.doc || e.source.clause) && (t += rs(e.source)), t += "}\n", t;
|
|
7544
|
+
}, as = (e, t) => {
|
|
7545
|
+
let n = {
|
|
7546
|
+
id: e,
|
|
7547
|
+
description: ""
|
|
7548
|
+
};
|
|
7549
|
+
return v(t, (e, t) => {
|
|
7550
|
+
if (e === "description") n.description = a(t());
|
|
7551
|
+
else return !1;
|
|
7552
|
+
return !0;
|
|
7553
|
+
}, {
|
|
7554
|
+
construct: "declaration_status",
|
|
7555
|
+
id: e
|
|
7556
|
+
}), (t) => (t.declarationStatuses[e] = n, t);
|
|
7557
|
+
}, os = function(e) {
|
|
7558
|
+
let t = "declaration_status " + e.id + " {\n";
|
|
7559
|
+
return e.description && (t += " description \"" + s(e.description) + "\"\n"), t += "}\n", t;
|
|
7560
|
+
}, ss = (e, t) => {
|
|
7561
|
+
let n = {
|
|
7562
|
+
id: e,
|
|
7563
|
+
clause: "",
|
|
7564
|
+
statement: "",
|
|
7565
|
+
holder: "",
|
|
7566
|
+
declaration: "",
|
|
7567
|
+
blocks: [],
|
|
7568
|
+
blocks_note: "",
|
|
7569
|
+
scope_checked: [],
|
|
7570
|
+
source: {
|
|
7571
|
+
doc: "",
|
|
7572
|
+
clause: ""
|
|
7573
|
+
}
|
|
7574
|
+
};
|
|
7575
|
+
return v(t, (e, t) => {
|
|
7576
|
+
if (e === "clause") n.clause = a(t());
|
|
7577
|
+
else if (e === "statement") n.statement = a(t());
|
|
7578
|
+
else if (e === "holder") n.holder = a(t());
|
|
7579
|
+
else if (e === "declaration") n.declaration = a(t());
|
|
7580
|
+
else if (e === "blocks") n.blocks = r(i(t())).filter((e) => e.length > 0);
|
|
7581
|
+
else if (e === "blocks_note") n.blocks_note = a(t());
|
|
7582
|
+
else if (e === "scope_checked") n.scope_checked = r(i(t())).filter((e) => e.length > 0);
|
|
7583
|
+
else if (e === "source") n.source = I(i(t()));
|
|
7584
|
+
else return !1;
|
|
7585
|
+
return !0;
|
|
7586
|
+
}, {
|
|
7587
|
+
construct: "declaration_gate",
|
|
7588
|
+
id: e
|
|
7589
|
+
}), (t) => (t.declarationGates[e] = n, t);
|
|
7590
|
+
}, cs = function(e) {
|
|
7591
|
+
let t = "declaration_gate " + e.id + " {\n";
|
|
7592
|
+
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), e.holder && (t += " holder " + N(e.holder) + "\n"), e.declaration && (t += " declaration " + N(e.declaration) + "\n"), e.blocks.length > 0 && (t += " blocks { " + e.blocks.map(N).join(" ") + " }\n"), e.blocks_note && (t += " blocks_note \"" + s(e.blocks_note) + "\"\n"), e.scope_checked.length > 0 && (t += " scope_checked { " + e.scope_checked.map(N).join(" ") + " }\n"), (e.source.doc || e.source.clause) && (t += rs(e.source)), t += "}\n", t;
|
|
7593
|
+
};
|
|
7594
|
+
//#endregion
|
|
7595
|
+
//#region src/ser-des/config/scheme.ts
|
|
7596
|
+
function ls(e) {
|
|
7597
|
+
let t = {
|
|
7598
|
+
method: "",
|
|
7599
|
+
clause: "",
|
|
7600
|
+
basis: [],
|
|
7601
|
+
note: ""
|
|
7602
|
+
};
|
|
7603
|
+
return v(e, (e, n) => {
|
|
7604
|
+
if (e === "method") t.method = a(n());
|
|
7605
|
+
else if (e === "clause") t.clause = a(n());
|
|
7606
|
+
else if (e === "basis") t.basis = r(i(n())).filter((e) => e.length > 0);
|
|
7607
|
+
else if (e === "note") t.note = a(n());
|
|
7608
|
+
else return !1;
|
|
7609
|
+
return !0;
|
|
7610
|
+
}, {
|
|
7611
|
+
construct: "scheme_definition demonstration",
|
|
7612
|
+
id: ""
|
|
7613
|
+
}), t;
|
|
7614
|
+
}
|
|
7615
|
+
var us = (e, t) => {
|
|
7616
|
+
let n = {
|
|
7617
|
+
id: e,
|
|
7618
|
+
label: "",
|
|
7619
|
+
term: "",
|
|
7620
|
+
clause: "",
|
|
7621
|
+
definition: "",
|
|
7622
|
+
demonstration: null,
|
|
7623
|
+
source: {
|
|
7624
|
+
doc: "",
|
|
7625
|
+
clause: ""
|
|
7626
|
+
}
|
|
7627
|
+
};
|
|
7628
|
+
return v(t, (e, t) => {
|
|
7629
|
+
if (e === "label") n.label = a(t());
|
|
7630
|
+
else if (e === "term") n.term = a(t());
|
|
7631
|
+
else if (e === "clause") n.clause = a(t());
|
|
7632
|
+
else if (e === "definition") n.definition = a(t());
|
|
7633
|
+
else if (e === "demonstration") n.demonstration = ls(i(t()));
|
|
7634
|
+
else if (e === "source") n.source = I(i(t()));
|
|
7635
|
+
else return !1;
|
|
7636
|
+
return !0;
|
|
7637
|
+
}, {
|
|
7638
|
+
construct: "scheme_definition",
|
|
7639
|
+
id: e
|
|
7640
|
+
}), (t) => (t.schemeDefinitions[e] = n, t);
|
|
7641
|
+
};
|
|
7642
|
+
function ds(e) {
|
|
7643
|
+
let t = " source {\n";
|
|
7644
|
+
return e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
7645
|
+
}
|
|
7646
|
+
var fs = function(e) {
|
|
7647
|
+
let t = "scheme_definition " + e.id + " {\n";
|
|
7648
|
+
if (e.label && (t += " label \"" + s(e.label) + "\"\n"), e.term && (t += " term \"" + s(e.term) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.definition && (t += " definition \"" + s(e.definition) + "\"\n"), e.demonstration) {
|
|
7649
|
+
let n = e.demonstration;
|
|
7650
|
+
t += " demonstration {\n", n.method && (t += " method " + N(n.method) + "\n"), n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.basis.length > 0 && (t += " basis { " + n.basis.map(N).join(" ") + " }\n"), n.note && (t += " note \"" + s(n.note) + "\"\n"), t += " }\n";
|
|
7651
|
+
}
|
|
7652
|
+
return (e.source.doc || e.source.clause) && (t += ds(e.source)), t += "}\n", t;
|
|
7653
|
+
};
|
|
7654
|
+
function ps(e) {
|
|
7655
|
+
let t = {
|
|
7656
|
+
action: "",
|
|
7657
|
+
automatic: !1,
|
|
7658
|
+
clause: "",
|
|
7659
|
+
conditions_ref: "",
|
|
7660
|
+
description: ""
|
|
7661
|
+
};
|
|
7662
|
+
return v(e, (e, n) => {
|
|
7663
|
+
if (e === "action") t.action = a(n());
|
|
7664
|
+
else if (e === "automatic") t.automatic = n() === "true";
|
|
7665
|
+
else if (e === "clause") t.clause = a(n());
|
|
7666
|
+
else if (e === "conditions_ref") t.conditions_ref = a(n());
|
|
7667
|
+
else if (e === "description") t.description = a(n());
|
|
7668
|
+
else return !1;
|
|
7669
|
+
return !0;
|
|
7670
|
+
}, {
|
|
7671
|
+
construct: "scheme_lifecycle entry",
|
|
7672
|
+
id: ""
|
|
7673
|
+
}), t;
|
|
7674
|
+
}
|
|
7675
|
+
function ms(e) {
|
|
7676
|
+
let t = {
|
|
7677
|
+
clause: "",
|
|
7678
|
+
decided_by: "",
|
|
7679
|
+
on_proposal_of: "",
|
|
7680
|
+
description: ""
|
|
7681
|
+
};
|
|
7682
|
+
return v(e, (e, n) => {
|
|
7683
|
+
if (e === "clause") t.clause = a(n());
|
|
7684
|
+
else if (e === "decided_by") t.decided_by = a(n());
|
|
7685
|
+
else if (e === "on_proposal_of") t.on_proposal_of = a(n());
|
|
7686
|
+
else if (e === "description") t.description = a(n());
|
|
7687
|
+
else return !1;
|
|
7688
|
+
return !0;
|
|
7689
|
+
}, {
|
|
7690
|
+
construct: "scheme_lifecycle transition",
|
|
7691
|
+
id: ""
|
|
7692
|
+
}), t;
|
|
7693
|
+
}
|
|
7694
|
+
function hs(e, t) {
|
|
7695
|
+
let n = {
|
|
7696
|
+
id: e,
|
|
7697
|
+
kind: "",
|
|
7698
|
+
action: "",
|
|
7699
|
+
windowYears: 0,
|
|
7700
|
+
windowMonths: 0,
|
|
7701
|
+
clause: "",
|
|
7702
|
+
deferrable: !1,
|
|
7703
|
+
deferral_note: "",
|
|
7704
|
+
description: ""
|
|
7705
|
+
};
|
|
7706
|
+
return v(t, (e, t) => {
|
|
7707
|
+
if (e === "kind") n.kind = a(t());
|
|
7708
|
+
else if (e === "action") n.action = a(t());
|
|
7709
|
+
else if (e === "window") {
|
|
7710
|
+
let e = r(i(t()));
|
|
7711
|
+
for (let t = 0; t + 1 < e.length; t += 2) e[t] === "years" ? n.windowYears = parseInt(a(e[t + 1]), 10) || 0 : e[t] === "months" && (n.windowMonths = parseInt(a(e[t + 1]), 10) || 0);
|
|
7712
|
+
} else if (e === "clause") n.clause = a(t());
|
|
7713
|
+
else if (e === "deferrable") n.deferrable = t() === "true";
|
|
7714
|
+
else if (e === "deferral_note") n.deferral_note = a(t());
|
|
7715
|
+
else if (e === "description") n.description = a(t());
|
|
7716
|
+
else return !1;
|
|
7717
|
+
return !0;
|
|
7718
|
+
}, {
|
|
7719
|
+
construct: "scheme_lifecycle trigger",
|
|
7720
|
+
id: e
|
|
7721
|
+
}), n;
|
|
7722
|
+
}
|
|
7723
|
+
var gs = (e, t) => {
|
|
7724
|
+
let n = {
|
|
7725
|
+
id: e,
|
|
7726
|
+
applies_to: "",
|
|
7727
|
+
initial: "",
|
|
7728
|
+
entry: null,
|
|
7729
|
+
transitions: [],
|
|
7730
|
+
triggers: [],
|
|
7731
|
+
source: {
|
|
7732
|
+
doc: "",
|
|
7733
|
+
clause: ""
|
|
7734
|
+
}
|
|
7735
|
+
};
|
|
7736
|
+
return v(t, (t, r, o) => {
|
|
7737
|
+
if (t === "applies_to") n.applies_to = a(r());
|
|
7738
|
+
else if (t === "initial") n.initial = a(r());
|
|
7739
|
+
else if (t === "entry") n.entry = ps(i(r()));
|
|
7740
|
+
else if (t === "transition") {
|
|
7741
|
+
let t = a(r()), s = o();
|
|
7742
|
+
if (s === void 0 || s !== "->" && s !== "→") throw Error(`Parsing error: scheme_lifecycle. ID ${e}: transition ${t} is missing its '->'`);
|
|
7743
|
+
r();
|
|
7744
|
+
let c = a(r()), l = "";
|
|
7745
|
+
o() === "action" && (r(), l = a(r()));
|
|
7746
|
+
let u = o();
|
|
7747
|
+
if (u === void 0 || !u.startsWith("{")) throw Error(`Parsing error: scheme_lifecycle. ID ${e}: transition ${t} -> ${c} is missing its block`);
|
|
7748
|
+
let d = ms(i(r()));
|
|
7749
|
+
n.transitions.push({
|
|
7750
|
+
from: t,
|
|
7751
|
+
to: c,
|
|
7752
|
+
action: l,
|
|
7753
|
+
...d
|
|
7754
|
+
});
|
|
7755
|
+
} else if (t === "trigger") {
|
|
7756
|
+
let t = a(r()), s = o();
|
|
7757
|
+
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: scheme_lifecycle. ID ${e}: trigger ${t} is missing its block`);
|
|
7758
|
+
n.triggers.push(hs(t, i(r())));
|
|
7759
|
+
} else if (t === "source") n.source = I(i(r()));
|
|
7760
|
+
else return !1;
|
|
7761
|
+
return !0;
|
|
7762
|
+
}, {
|
|
7763
|
+
construct: "scheme_lifecycle",
|
|
7764
|
+
id: e
|
|
7765
|
+
}), (t) => (t.schemeLifecycles[e] = n, t);
|
|
7766
|
+
}, _s = function(e) {
|
|
7767
|
+
let t = "scheme_lifecycle " + e.id + " {\n";
|
|
7768
|
+
if (e.applies_to && (t += " applies_to " + N(e.applies_to) + "\n"), e.initial && (t += " initial " + N(e.initial) + "\n"), e.entry) {
|
|
7769
|
+
let n = e.entry;
|
|
7770
|
+
t += " entry {\n", n.action && (t += " action " + N(n.action) + "\n"), t += " automatic " + (n.automatic ? "true" : "false") + "\n", n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.conditions_ref && (t += " conditions_ref " + N(n.conditions_ref) + "\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
7771
|
+
}
|
|
7772
|
+
for (let n of e.transitions) t += " transition " + N(n.from) + " -> " + N(n.to), n.action && (t += " action " + N(n.action)), t += " {\n", n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.decided_by && (t += " decided_by " + N(n.decided_by) + "\n"), n.on_proposal_of && (t += " on_proposal_of " + N(n.on_proposal_of) + "\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
7773
|
+
for (let n of e.triggers) {
|
|
7774
|
+
if (t += " trigger " + N(n.id) + " {\n", n.kind && (t += " kind " + N(n.kind) + "\n"), n.action && (t += " action " + N(n.action) + "\n"), n.windowYears > 0 || n.windowMonths > 0) {
|
|
7775
|
+
let e = " window {";
|
|
7776
|
+
n.windowYears > 0 && (e += " years " + n.windowYears), n.windowMonths > 0 && (e += " months " + n.windowMonths), t += e + " }\n";
|
|
7777
|
+
}
|
|
7778
|
+
n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.deferrable && (t += " deferrable true\n"), n.deferral_note && (t += " deferral_note \"" + s(n.deferral_note) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
7779
|
+
}
|
|
7780
|
+
return (e.source.doc || e.source.clause) && (t += ds(e.source)), t += "}\n", t;
|
|
7781
|
+
};
|
|
7782
|
+
//#endregion
|
|
7783
|
+
//#region src/ser-des/config/frameworkDocument.ts
|
|
7784
|
+
function vs(e) {
|
|
7785
|
+
let t = " source {\n";
|
|
7786
|
+
return e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), t += " }\n", t;
|
|
7787
|
+
}
|
|
7788
|
+
var ys = (e, t) => {
|
|
7789
|
+
let n = {
|
|
7790
|
+
id: e,
|
|
7791
|
+
rank: 0,
|
|
7792
|
+
doc: "",
|
|
7793
|
+
title: "",
|
|
7794
|
+
approved_by: "",
|
|
7795
|
+
clause: "",
|
|
7796
|
+
note: "",
|
|
7797
|
+
source: {
|
|
7798
|
+
doc: "",
|
|
7799
|
+
clause: ""
|
|
7800
|
+
}
|
|
7801
|
+
};
|
|
7802
|
+
return v(t, (e, t) => {
|
|
7803
|
+
if (e === "rank") n.rank = parseInt(a(t()), 10) || 0;
|
|
7804
|
+
else if (e === "doc") n.doc = a(t());
|
|
7805
|
+
else if (e === "title") n.title = a(t());
|
|
7806
|
+
else if (e === "approved_by") n.approved_by = a(t());
|
|
7807
|
+
else if (e === "clause") n.clause = a(t());
|
|
7808
|
+
else if (e === "note") n.note = a(t());
|
|
7809
|
+
else if (e === "source") n.source = I(i(t()));
|
|
7810
|
+
else return !1;
|
|
7811
|
+
return !0;
|
|
7812
|
+
}, {
|
|
7813
|
+
construct: "framework_document",
|
|
7814
|
+
id: e
|
|
7815
|
+
}), (t) => (t.frameworkDocuments[e] = n, t);
|
|
7816
|
+
}, bs = function(e) {
|
|
7817
|
+
let t = "framework_document " + e.id + " {\n";
|
|
7818
|
+
return e.rank > 0 && (t += " rank " + e.rank + "\n"), e.doc && (t += " doc \"" + s(e.doc) + "\"\n"), e.title && (t += " title \"" + s(e.title) + "\"\n"), e.approved_by && (t += " approved_by " + N(e.approved_by) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.note && (t += " note \"" + s(e.note) + "\"\n"), (e.source.doc || e.source.clause) && (t += vs(e.source)), t += "}\n", t;
|
|
7819
|
+
}, xs = (e, t) => {
|
|
7820
|
+
let n = {
|
|
7821
|
+
id: e,
|
|
7822
|
+
clause: "",
|
|
7823
|
+
statement: "",
|
|
7824
|
+
source: {
|
|
7825
|
+
doc: "",
|
|
7826
|
+
clause: ""
|
|
7827
|
+
}
|
|
7828
|
+
};
|
|
7829
|
+
return v(t, (e, t) => {
|
|
7830
|
+
if (e === "clause") n.clause = a(t());
|
|
7831
|
+
else if (e === "statement") n.statement = a(t());
|
|
7832
|
+
else if (e === "source") n.source = I(i(t()));
|
|
7833
|
+
else return !1;
|
|
7834
|
+
return !0;
|
|
7835
|
+
}, {
|
|
7836
|
+
construct: "document_precedence",
|
|
7837
|
+
id: e
|
|
7838
|
+
}), (t) => (t.documentPrecedences[e] = n, t);
|
|
7839
|
+
}, Ss = function(e) {
|
|
7840
|
+
let t = "document_precedence " + e.id + " {\n";
|
|
7841
|
+
return e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n"), (e.source.doc || e.source.clause) && (t += vs(e.source)), t += "}\n", t;
|
|
7842
|
+
};
|
|
7843
|
+
function Cs(e, t) {
|
|
7844
|
+
let n = {
|
|
7845
|
+
id: e,
|
|
7846
|
+
clause: "",
|
|
7847
|
+
description: ""
|
|
7848
|
+
};
|
|
7849
|
+
return v(t, (e, t) => {
|
|
7850
|
+
if (e === "clause") n.clause = a(t());
|
|
7851
|
+
else if (e === "description") n.description = a(t());
|
|
7852
|
+
else return !1;
|
|
7853
|
+
return !0;
|
|
7854
|
+
}, {
|
|
7855
|
+
construct: "auto_inclusion condition",
|
|
7856
|
+
id: e
|
|
7857
|
+
}), n;
|
|
7858
|
+
}
|
|
7859
|
+
var ws = (e, t) => {
|
|
7860
|
+
let n = {
|
|
7861
|
+
id: e,
|
|
7862
|
+
clause: "",
|
|
7863
|
+
statement: "",
|
|
7864
|
+
conditions: [],
|
|
7865
|
+
note: "",
|
|
7866
|
+
source: {
|
|
7867
|
+
doc: "",
|
|
7868
|
+
clause: ""
|
|
7869
|
+
}
|
|
7870
|
+
};
|
|
7871
|
+
return v(t, (t, r, o) => {
|
|
7872
|
+
if (t === "clause") n.clause = a(r());
|
|
7873
|
+
else if (t === "statement") n.statement = a(r());
|
|
7874
|
+
else if (t === "condition") {
|
|
7875
|
+
let t = a(r()), s = o();
|
|
7876
|
+
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: auto_inclusion. ID ${e}: condition ${t} is missing its block`);
|
|
7877
|
+
n.conditions.push(Cs(t, i(r())));
|
|
7878
|
+
} else if (t === "note") n.note = a(r());
|
|
7879
|
+
else if (t === "source") n.source = I(i(r()));
|
|
7880
|
+
else return !1;
|
|
7881
|
+
return !0;
|
|
7882
|
+
}, {
|
|
7883
|
+
construct: "auto_inclusion",
|
|
7884
|
+
id: e
|
|
7885
|
+
}), (t) => (t.autoInclusions[e] = n, t);
|
|
7886
|
+
}, Ts = function(e) {
|
|
7887
|
+
let t = "auto_inclusion " + e.id + " {\n";
|
|
7888
|
+
e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.statement && (t += " statement \"" + s(e.statement) + "\"\n");
|
|
7889
|
+
for (let n of e.conditions) t += " condition " + N(n.id) + " {\n", n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
7890
|
+
return e.note && (t += " note \"" + s(e.note) + "\"\n"), (e.source.doc || e.source.clause) && (t += vs(e.source)), t += "}\n", t;
|
|
7891
|
+
};
|
|
7892
|
+
//#endregion
|
|
7893
|
+
//#region src/ser-des/config/decisionRule.ts
|
|
7894
|
+
function Es(e) {
|
|
7895
|
+
let t = {
|
|
7896
|
+
threshold: 0,
|
|
7897
|
+
base: "",
|
|
7898
|
+
clause: "",
|
|
7899
|
+
description: ""
|
|
7900
|
+
};
|
|
7901
|
+
return v(e, (e, n) => {
|
|
7902
|
+
if (e === "threshold") t.threshold = parseFloat(a(n())) || 0;
|
|
7903
|
+
else if (e === "base") t.base = a(n());
|
|
7904
|
+
else if (e === "clause") t.clause = a(n());
|
|
7905
|
+
else if (e === "description") t.description = a(n());
|
|
7906
|
+
else return !1;
|
|
7907
|
+
return !0;
|
|
7908
|
+
}, {
|
|
7909
|
+
construct: "decision_rule voting rule",
|
|
7910
|
+
id: ""
|
|
7911
|
+
}), t;
|
|
7912
|
+
}
|
|
7913
|
+
function Ds(e) {
|
|
7914
|
+
let t = {
|
|
7915
|
+
in_meeting: 0,
|
|
7916
|
+
by_correspondence: "",
|
|
7917
|
+
description: ""
|
|
7918
|
+
};
|
|
7919
|
+
return v(e, (e, n) => {
|
|
7920
|
+
if (e === "in_meeting") t.in_meeting = parseFloat(a(n())) || 0;
|
|
7921
|
+
else if (e === "by_correspondence") t.by_correspondence = a(n());
|
|
7922
|
+
else if (e === "description") t.description = a(n());
|
|
7923
|
+
else return !1;
|
|
7924
|
+
return !0;
|
|
7925
|
+
}, {
|
|
7926
|
+
construct: "decision_rule other_proposals",
|
|
7927
|
+
id: ""
|
|
7928
|
+
}), t;
|
|
7929
|
+
}
|
|
7930
|
+
function Os(e) {
|
|
7931
|
+
let t = {
|
|
7932
|
+
in_meeting: null,
|
|
7933
|
+
by_correspondence: null,
|
|
7934
|
+
other_proposals: null,
|
|
7935
|
+
proxies_max: 0,
|
|
7936
|
+
abstentions: "",
|
|
7937
|
+
reason_on_against_or_abstain: !1
|
|
7938
|
+
};
|
|
7939
|
+
return v(e, (e, n) => {
|
|
7940
|
+
if (e === "in_meeting") t.in_meeting = Es(i(n()));
|
|
7941
|
+
else if (e === "by_correspondence") t.by_correspondence = Es(i(n()));
|
|
7942
|
+
else if (e === "other_proposals") t.other_proposals = Ds(i(n()));
|
|
7943
|
+
else if (e === "proxies_max") t.proxies_max = parseInt(a(n()), 10) || 0;
|
|
7944
|
+
else if (e === "abstentions") t.abstentions = a(n());
|
|
7945
|
+
else if (e === "reason_on_against_or_abstain") t.reason_on_against_or_abstain = n() === "true";
|
|
7946
|
+
else return !1;
|
|
7947
|
+
return !0;
|
|
7948
|
+
}, {
|
|
7949
|
+
construct: "decision_rule voting",
|
|
7950
|
+
id: ""
|
|
7951
|
+
}), t;
|
|
7952
|
+
}
|
|
7953
|
+
function ks(e, t) {
|
|
7954
|
+
let n = {
|
|
7955
|
+
id: e,
|
|
7956
|
+
clause: "",
|
|
7957
|
+
description: ""
|
|
7958
|
+
};
|
|
7959
|
+
return v(t, (e, t) => {
|
|
7960
|
+
if (e === "clause") n.clause = a(t());
|
|
7961
|
+
else if (e === "description") n.description = a(t());
|
|
7962
|
+
else return !1;
|
|
7963
|
+
return !0;
|
|
7964
|
+
}, {
|
|
7965
|
+
construct: "decision_rule legacy_kind",
|
|
7966
|
+
id: e
|
|
7967
|
+
}), n;
|
|
7968
|
+
}
|
|
7969
|
+
function As(e) {
|
|
7970
|
+
return r(i(e)).filter((e) => e.length > 0);
|
|
7971
|
+
}
|
|
7972
|
+
var js = (e, t) => {
|
|
7973
|
+
let n = {
|
|
7974
|
+
id: e,
|
|
7975
|
+
organ: "",
|
|
7976
|
+
kind: "",
|
|
7977
|
+
clause: "",
|
|
7978
|
+
description: "",
|
|
7979
|
+
on_recommendation_of: "",
|
|
7980
|
+
independent_of: "",
|
|
7981
|
+
decides: [],
|
|
7982
|
+
voting: null,
|
|
7983
|
+
tasks: [],
|
|
7984
|
+
scope: [],
|
|
7985
|
+
principle: "",
|
|
7986
|
+
legacy_kinds: [],
|
|
7987
|
+
income: "",
|
|
7988
|
+
no_entrance_fees_for: [],
|
|
7989
|
+
source: {
|
|
7990
|
+
doc: "",
|
|
7991
|
+
clause: ""
|
|
7992
|
+
}
|
|
7993
|
+
};
|
|
7994
|
+
return v(t, (t, r, o) => {
|
|
7995
|
+
if (t === "organ") n.organ = a(r());
|
|
7996
|
+
else if (t === "kind") n.kind = a(r());
|
|
7997
|
+
else if (t === "clause") n.clause = a(r());
|
|
7998
|
+
else if (t === "description") n.description = a(r());
|
|
7999
|
+
else if (t === "on_recommendation_of") n.on_recommendation_of = a(r());
|
|
8000
|
+
else if (t === "independent_of") n.independent_of = a(r());
|
|
8001
|
+
else if (t === "decides") n.decides = As(r());
|
|
8002
|
+
else if (t === "voting") n.voting = Os(i(r()));
|
|
8003
|
+
else if (t === "tasks") n.tasks = As(r());
|
|
8004
|
+
else if (t === "scope") n.scope = As(r());
|
|
8005
|
+
else if (t === "principle") n.principle = a(r());
|
|
8006
|
+
else if (t === "legacy_kind") {
|
|
8007
|
+
let t = a(r()), s = o();
|
|
8008
|
+
if (s === void 0 || !s.startsWith("{")) throw Error(`Parsing error: decision_rule. ID ${e}: legacy_kind ${t} is missing its block`);
|
|
8009
|
+
n.legacy_kinds.push(ks(t, i(r())));
|
|
8010
|
+
} else if (t === "income") n.income = a(r());
|
|
8011
|
+
else if (t === "no_entrance_fees_for") n.no_entrance_fees_for = As(r());
|
|
8012
|
+
else if (t === "source") n.source = I(i(r()));
|
|
8013
|
+
else return !1;
|
|
8014
|
+
return !0;
|
|
8015
|
+
}, {
|
|
8016
|
+
construct: "decision_rule",
|
|
8017
|
+
id: e
|
|
8018
|
+
}), (t) => (t.decisionRules[e] = n, t);
|
|
8019
|
+
};
|
|
8020
|
+
function Ms(e, t) {
|
|
8021
|
+
let n = " " + e + " {\n";
|
|
8022
|
+
return t.threshold > 0 && (n += " threshold " + t.threshold + "\n"), t.base && (n += " base " + N(t.base) + "\n"), t.clause && (n += " clause \"" + s(t.clause) + "\"\n"), t.description && (n += " description \"" + s(t.description) + "\"\n"), n += " }\n", n;
|
|
8023
|
+
}
|
|
8024
|
+
function Ns(e) {
|
|
8025
|
+
let t = " voting {\n";
|
|
8026
|
+
if (e.in_meeting && (t += Ms("in_meeting", e.in_meeting)), e.by_correspondence && (t += Ms("by_correspondence", e.by_correspondence)), e.other_proposals) {
|
|
8027
|
+
let n = e.other_proposals;
|
|
8028
|
+
t += " other_proposals {\n", n.in_meeting > 0 && (t += " in_meeting " + n.in_meeting + "\n"), n.by_correspondence && (t += " by_correspondence " + N(n.by_correspondence) + "\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
8029
|
+
}
|
|
8030
|
+
return e.proxies_max > 0 && (t += " proxies_max " + e.proxies_max + "\n"), e.abstentions && (t += " abstentions " + N(e.abstentions) + "\n"), e.reason_on_against_or_abstain && (t += " reason_on_against_or_abstain true\n"), t += " }\n", t;
|
|
8031
|
+
}
|
|
8032
|
+
function Ps(e, t, n) {
|
|
8033
|
+
return n + e + " { " + t.map(N).join(" ") + " }\n";
|
|
8034
|
+
}
|
|
8035
|
+
var Fs = function(e) {
|
|
8036
|
+
let t = "decision_rule " + e.id + " {\n";
|
|
8037
|
+
e.organ && (t += " organ " + N(e.organ) + "\n"), e.kind && (t += " kind " + N(e.kind) + "\n"), e.clause && (t += " clause \"" + s(e.clause) + "\"\n"), e.description && (t += " description \"" + s(e.description) + "\"\n"), e.on_recommendation_of && (t += " on_recommendation_of " + N(e.on_recommendation_of) + "\n"), e.independent_of && (t += " independent_of " + N(e.independent_of) + "\n"), e.decides.length > 0 && (t += Ps("decides", e.decides, " ")), e.voting && (t += Ns(e.voting)), e.tasks.length > 0 && (t += Ps("tasks", e.tasks, " ")), e.scope.length > 0 && (t += Ps("scope", e.scope, " ")), e.principle && (t += " principle " + N(e.principle) + "\n");
|
|
8038
|
+
for (let n of e.legacy_kinds) t += " legacy_kind " + N(n.id) + " {\n", n.clause && (t += " clause \"" + s(n.clause) + "\"\n"), n.description && (t += " description \"" + s(n.description) + "\"\n"), t += " }\n";
|
|
8039
|
+
return e.income && (t += " income " + N(e.income) + "\n"), e.no_entrance_fees_for.length > 0 && (t += Ps("no_entrance_fees_for", e.no_entrance_fees_for, " ")), (e.source.doc || e.source.clause) && (t += " source {\n", e.source.doc && (t += " doc \"" + s(e.source.doc) + "\"\n"), e.source.clause && (t += " clause \"" + s(e.source.clause) + "\"\n"), t += " }\n"), t += "}\n", t;
|
|
8040
|
+
};
|
|
8041
|
+
//#endregion
|
|
7308
8042
|
//#region src/ser-des/config/index.ts
|
|
7309
8043
|
function J(e) {
|
|
7310
8044
|
return e;
|
|
7311
8045
|
}
|
|
7312
|
-
var
|
|
8046
|
+
var Is = [
|
|
7313
8047
|
J({
|
|
7314
8048
|
keyword: "role",
|
|
7315
8049
|
field: "roles",
|
|
@@ -7606,6 +8340,83 @@ var Wo = [
|
|
|
7606
8340
|
parse: Ho,
|
|
7607
8341
|
dump: Uo
|
|
7608
8342
|
}),
|
|
8343
|
+
J({
|
|
8344
|
+
keyword: "participant_kind",
|
|
8345
|
+
field: "participantKinds",
|
|
8346
|
+
takesID: !0,
|
|
8347
|
+
parse: qo,
|
|
8348
|
+
dump: Zo
|
|
8349
|
+
}),
|
|
8350
|
+
J({
|
|
8351
|
+
keyword: "governance_organ",
|
|
8352
|
+
field: "governanceOrgans",
|
|
8353
|
+
takesID: !0,
|
|
8354
|
+
parse: Qo,
|
|
8355
|
+
dump: $o
|
|
8356
|
+
}),
|
|
8357
|
+
J({
|
|
8358
|
+
keyword: "declaration_kind",
|
|
8359
|
+
field: "declarationKinds",
|
|
8360
|
+
takesID: !0,
|
|
8361
|
+
parse: ts,
|
|
8362
|
+
dump: is
|
|
8363
|
+
}),
|
|
8364
|
+
J({
|
|
8365
|
+
keyword: "declaration_status",
|
|
8366
|
+
field: "declarationStatuses",
|
|
8367
|
+
takesID: !0,
|
|
8368
|
+
parse: as,
|
|
8369
|
+
dump: os
|
|
8370
|
+
}),
|
|
8371
|
+
J({
|
|
8372
|
+
keyword: "declaration_gate",
|
|
8373
|
+
field: "declarationGates",
|
|
8374
|
+
takesID: !0,
|
|
8375
|
+
parse: ss,
|
|
8376
|
+
dump: cs
|
|
8377
|
+
}),
|
|
8378
|
+
J({
|
|
8379
|
+
keyword: "scheme_definition",
|
|
8380
|
+
field: "schemeDefinitions",
|
|
8381
|
+
takesID: !0,
|
|
8382
|
+
parse: us,
|
|
8383
|
+
dump: fs
|
|
8384
|
+
}),
|
|
8385
|
+
J({
|
|
8386
|
+
keyword: "scheme_lifecycle",
|
|
8387
|
+
field: "schemeLifecycles",
|
|
8388
|
+
takesID: !0,
|
|
8389
|
+
parse: gs,
|
|
8390
|
+
dump: _s
|
|
8391
|
+
}),
|
|
8392
|
+
J({
|
|
8393
|
+
keyword: "framework_document",
|
|
8394
|
+
field: "frameworkDocuments",
|
|
8395
|
+
takesID: !0,
|
|
8396
|
+
parse: ys,
|
|
8397
|
+
dump: bs
|
|
8398
|
+
}),
|
|
8399
|
+
J({
|
|
8400
|
+
keyword: "document_precedence",
|
|
8401
|
+
field: "documentPrecedences",
|
|
8402
|
+
takesID: !0,
|
|
8403
|
+
parse: xs,
|
|
8404
|
+
dump: Ss
|
|
8405
|
+
}),
|
|
8406
|
+
J({
|
|
8407
|
+
keyword: "auto_inclusion",
|
|
8408
|
+
field: "autoInclusions",
|
|
8409
|
+
takesID: !0,
|
|
8410
|
+
parse: ws,
|
|
8411
|
+
dump: Ts
|
|
8412
|
+
}),
|
|
8413
|
+
J({
|
|
8414
|
+
keyword: "decision_rule",
|
|
8415
|
+
field: "decisionRules",
|
|
8416
|
+
takesID: !0,
|
|
8417
|
+
parse: js,
|
|
8418
|
+
dump: Fs
|
|
8419
|
+
}),
|
|
7609
8420
|
Oi,
|
|
7610
8421
|
po,
|
|
7611
8422
|
bo,
|
|
@@ -7623,7 +8434,7 @@ var Wo = [
|
|
|
7623
8434
|
Bo,
|
|
7624
8435
|
Vo
|
|
7625
8436
|
];
|
|
7626
|
-
function
|
|
8437
|
+
function Ls(e) {
|
|
7627
8438
|
let t = {};
|
|
7628
8439
|
for (let n of e) {
|
|
7629
8440
|
if (!n.field) continue;
|
|
@@ -7637,61 +8448,61 @@ function Go(e) {
|
|
|
7637
8448
|
}
|
|
7638
8449
|
return t;
|
|
7639
8450
|
}
|
|
7640
|
-
function
|
|
8451
|
+
function Rs(e) {
|
|
7641
8452
|
let t = {};
|
|
7642
8453
|
for (let n of e) n.field && (t[n.field] = { resolve: n.resolve ?? ((e, t) => t) });
|
|
7643
8454
|
return t;
|
|
7644
8455
|
}
|
|
7645
|
-
function
|
|
8456
|
+
function zs(e) {
|
|
7646
8457
|
let t = {};
|
|
7647
8458
|
for (let n of e) n.field && (t[n.field] = n.dump);
|
|
7648
8459
|
return t;
|
|
7649
8460
|
}
|
|
7650
|
-
var
|
|
8461
|
+
var Bs = {
|
|
7651
8462
|
package: { parse: mi },
|
|
7652
8463
|
root: { parse: (e) => (t) => (t.root = e.trim(), t) },
|
|
7653
8464
|
metadata: { parse: m },
|
|
7654
8465
|
version: { parse: () => (e) => e },
|
|
7655
|
-
...
|
|
7656
|
-
},
|
|
8466
|
+
...Ls(Is)
|
|
8467
|
+
}, Vs = Rs(Is), Hs = zs(Is), Y = (/* @__PURE__ */ e(((e, t) => {
|
|
7657
8468
|
t.exports = {};
|
|
7658
|
-
})))(),
|
|
7659
|
-
function
|
|
8469
|
+
})))(), Us = /^include\s+"([^"]+)"/gm, Ws = /^[ \t]*(#|\/\/)/;
|
|
8470
|
+
function Gs(e, t = /* @__PURE__ */ new Set()) {
|
|
7660
8471
|
let n = (0, Y.resolve)(e);
|
|
7661
8472
|
if (t.has(n)) throw Error(`Include cycle detected: ${n} (chain: ${[...t, n].map((e) => e.split("/").pop()).join(" → ")})`);
|
|
7662
8473
|
if (t.add(n), !(0, Y.existsSync)(n)) throw Error(`Include file not found: ${n}`);
|
|
7663
8474
|
let r = (0, Y.readFileSync)(n, "utf8"), i = (0, Y.dirname)(n);
|
|
7664
|
-
return r.replace(
|
|
8475
|
+
return r.replace(Us, (e, n, a) => {
|
|
7665
8476
|
let o = r.lastIndexOf("\n", a) + 1, s = r.slice(o, a);
|
|
7666
|
-
if (
|
|
8477
|
+
if (Ws.test(s)) return e;
|
|
7667
8478
|
let c = (0, Y.isAbsolute)(n) ? n : (0, Y.resolve)(i, n);
|
|
7668
|
-
return
|
|
8479
|
+
return Gs(c.endsWith(".prl") || c.endsWith(".mmel") ? c : (0, Y.existsSync)(`${c}.prl`) ? `${c}.prl` : `${c}.mmel`, new Set(t));
|
|
7669
8480
|
});
|
|
7670
8481
|
}
|
|
7671
8482
|
//#endregion
|
|
7672
8483
|
//#region src/validate.ts
|
|
7673
|
-
function
|
|
8484
|
+
function Ks(e) {
|
|
7674
8485
|
let t = [];
|
|
7675
|
-
for (let n of
|
|
8486
|
+
for (let n of qs) t.push(...n.check(e));
|
|
7676
8487
|
return t;
|
|
7677
8488
|
}
|
|
7678
|
-
var
|
|
8489
|
+
var qs = [
|
|
7679
8490
|
{
|
|
7680
8491
|
name: "empty-ids",
|
|
7681
|
-
check:
|
|
8492
|
+
check: Js
|
|
7682
8493
|
},
|
|
7683
8494
|
{
|
|
7684
8495
|
name: "form-references",
|
|
7685
|
-
check:
|
|
8496
|
+
check: Ys
|
|
7686
8497
|
},
|
|
7687
8498
|
{
|
|
7688
8499
|
name: "state-machine-cascades",
|
|
7689
|
-
check:
|
|
8500
|
+
check: Xs
|
|
7690
8501
|
}
|
|
7691
8502
|
];
|
|
7692
|
-
function
|
|
8503
|
+
function Js(e) {
|
|
7693
8504
|
let t = [];
|
|
7694
|
-
for (let [n, r] of
|
|
8505
|
+
for (let [n, r] of Zs(e)) for (let e of r) (!e.id || e.id.trim() === "") && t.push({
|
|
7695
8506
|
severity: "error",
|
|
7696
8507
|
code: "empty-id",
|
|
7697
8508
|
construct: n,
|
|
@@ -7699,7 +8510,7 @@ function ns(e) {
|
|
|
7699
8510
|
});
|
|
7700
8511
|
return t;
|
|
7701
8512
|
}
|
|
7702
|
-
function
|
|
8513
|
+
function Ys(e) {
|
|
7703
8514
|
let t = [], n = new Set(e.calculations.map((e) => e.id)), r = new Set(e.processes.map((e) => e.id));
|
|
7704
8515
|
for (let t of e.conformanceTests ?? []) r.add(t.id);
|
|
7705
8516
|
let i = new Set(e.subforms.map((e) => e.id));
|
|
@@ -7711,7 +8522,7 @@ function rs(e) {
|
|
|
7711
8522
|
message: `Form "${a.id}" references conformance process "${a.conformanceProcessId}" which does not exist`,
|
|
7712
8523
|
id: a.id
|
|
7713
8524
|
});
|
|
7714
|
-
for (let e of
|
|
8525
|
+
for (let e of Qs(a)) {
|
|
7715
8526
|
let r = e.calculationId;
|
|
7716
8527
|
r && !r.startsWith("ocl{") && !n.has(r) && t.push({
|
|
7717
8528
|
severity: "error",
|
|
@@ -7730,7 +8541,7 @@ function rs(e) {
|
|
|
7730
8541
|
}
|
|
7731
8542
|
return t;
|
|
7732
8543
|
}
|
|
7733
|
-
function
|
|
8544
|
+
function Xs(e) {
|
|
7734
8545
|
let t = [];
|
|
7735
8546
|
for (let n of e.stateMachines) {
|
|
7736
8547
|
let e = new Set(n.states.map((e) => e.name));
|
|
@@ -7751,10 +8562,10 @@ function is(e) {
|
|
|
7751
8562
|
}
|
|
7752
8563
|
return t;
|
|
7753
8564
|
}
|
|
7754
|
-
function*
|
|
8565
|
+
function* Zs(e) {
|
|
7755
8566
|
for (let [t, n] of Object.entries(e)) Array.isArray(n) && n.length > 0 && typeof n[0]?.id == "string" && (yield [t, n]);
|
|
7756
8567
|
}
|
|
7757
|
-
function*
|
|
8568
|
+
function* Qs(e) {
|
|
7758
8569
|
let t = [...e.fields];
|
|
7759
8570
|
for (; t.length > 0;) {
|
|
7760
8571
|
let e = t.pop();
|
|
@@ -7763,30 +8574,30 @@ function* os(e) {
|
|
|
7763
8574
|
}
|
|
7764
8575
|
//#endregion
|
|
7765
8576
|
//#region src/ser-des/package.ts
|
|
7766
|
-
var
|
|
8577
|
+
var $s = [
|
|
7767
8578
|
"model",
|
|
7768
8579
|
"entities",
|
|
7769
8580
|
"specification",
|
|
7770
8581
|
"execution",
|
|
7771
8582
|
"evaluation"
|
|
7772
8583
|
];
|
|
7773
|
-
function
|
|
8584
|
+
function ec(e) {
|
|
7774
8585
|
let t = [];
|
|
7775
8586
|
if (!(0, Y.existsSync)(e)) return t;
|
|
7776
8587
|
for (let n of (0, Y.readdirSync)(e).sort()) {
|
|
7777
8588
|
let r = (0, Y.join)(e, n);
|
|
7778
|
-
(0, Y.statSync)(r).isDirectory() ? t.push(...
|
|
8589
|
+
(0, Y.statSync)(r).isDirectory() ? t.push(...ec(r)) : (n.endsWith(".prl") || n.endsWith(".mmel")) && t.push(r);
|
|
7779
8590
|
}
|
|
7780
8591
|
return t;
|
|
7781
8592
|
}
|
|
7782
|
-
function
|
|
8593
|
+
function tc(e) {
|
|
7783
8594
|
let t = (0, Y.resolve)(e), n = [], r = (0, Y.join)(t, "package.primmel");
|
|
7784
8595
|
(0, Y.existsSync)(r) && n.push({
|
|
7785
8596
|
path: r,
|
|
7786
8597
|
role: "manifest"
|
|
7787
8598
|
});
|
|
7788
8599
|
let i = [];
|
|
7789
|
-
for (let e of
|
|
8600
|
+
for (let e of $s) i.push(...ec((0, Y.join)(t, e)));
|
|
7790
8601
|
for (let e of (0, Y.readdirSync)(t).sort()) {
|
|
7791
8602
|
let n = (0, Y.join)(t, e);
|
|
7792
8603
|
(0, Y.statSync)(n).isFile() && (e.endsWith(".prl") || e.endsWith(".mmel")) && e !== "package.primmel" && e !== ".primmel-allowlist.prl" && i.push(n);
|
|
@@ -7798,10 +8609,10 @@ function ls(e) {
|
|
|
7798
8609
|
});
|
|
7799
8610
|
return n;
|
|
7800
8611
|
}
|
|
7801
|
-
function
|
|
7802
|
-
return
|
|
8612
|
+
function nc(e, t = {}) {
|
|
8613
|
+
return uc(e, t).standard;
|
|
7803
8614
|
}
|
|
7804
|
-
function
|
|
8615
|
+
function rc(e, t) {
|
|
7805
8616
|
let n = /* @__PURE__ */ new Map(), r = [];
|
|
7806
8617
|
for (let i of t) {
|
|
7807
8618
|
let t = e.constructs[i.field]?.[i.id];
|
|
@@ -7817,37 +8628,37 @@ function ds(e, t) {
|
|
|
7817
8628
|
unassigned: r
|
|
7818
8629
|
};
|
|
7819
8630
|
}
|
|
7820
|
-
function
|
|
7821
|
-
let n =
|
|
8631
|
+
function ic(e, t = {}) {
|
|
8632
|
+
let n = uc(e, t, !0);
|
|
7822
8633
|
if (!n.provenance) throw Error("loadPackageWithProvenance: provenance not collected");
|
|
7823
8634
|
return {
|
|
7824
8635
|
...n,
|
|
7825
8636
|
provenance: n.provenance
|
|
7826
8637
|
};
|
|
7827
8638
|
}
|
|
7828
|
-
function
|
|
8639
|
+
function ac(e) {
|
|
7829
8640
|
let t = 0;
|
|
7830
8641
|
for (let n = 0; n < e.length; n++) e.charAt(n) === "\n" && t++;
|
|
7831
8642
|
return t;
|
|
7832
8643
|
}
|
|
7833
|
-
function
|
|
8644
|
+
function oc(e) {
|
|
7834
8645
|
let t = [], n = 0, r = 1;
|
|
7835
8646
|
for (let i of e) {
|
|
7836
8647
|
if (i.role !== "content") continue;
|
|
7837
|
-
let e =
|
|
8648
|
+
let e = Gs(i.path);
|
|
7838
8649
|
t.push({
|
|
7839
8650
|
path: i.path,
|
|
7840
8651
|
text: e,
|
|
7841
8652
|
start: n,
|
|
7842
8653
|
lineStart: r
|
|
7843
|
-
}), n += e.length + 2, r +=
|
|
8654
|
+
}), n += e.length + 2, r += ac(e) + 2;
|
|
7844
8655
|
}
|
|
7845
8656
|
return t;
|
|
7846
8657
|
}
|
|
7847
|
-
function
|
|
8658
|
+
function sc(e) {
|
|
7848
8659
|
return e.map((e) => e.text).join("\n\n");
|
|
7849
8660
|
}
|
|
7850
|
-
function
|
|
8661
|
+
function cc(e, t, n) {
|
|
7851
8662
|
let r = {}, i = 0;
|
|
7852
8663
|
for (let a of e) {
|
|
7853
8664
|
for (; i + 1 < t.length && a.start.offset >= t[i + 1].start;) i++;
|
|
@@ -7867,7 +8678,7 @@ function gs(e, t, n) {
|
|
|
7867
8678
|
}
|
|
7868
8679
|
return r;
|
|
7869
8680
|
}
|
|
7870
|
-
function
|
|
8681
|
+
function lc(e) {
|
|
7871
8682
|
let t = (0, Y.join)((0, Y.resolve)(e), "package.primmel");
|
|
7872
8683
|
if (!(0, Y.existsSync)(t)) throw Error(`loadPackage: no package.primmel found in ${(0, Y.resolve)(e)}`);
|
|
7873
8684
|
let n = (0, Y.readFileSync)(t, "utf8"), r = { packageManifest: null };
|
|
@@ -7876,37 +8687,37 @@ function _s(e) {
|
|
|
7876
8687
|
if (!i || !i.id) throw Error(`loadPackage: ${t} is not a valid package manifest`);
|
|
7877
8688
|
return i;
|
|
7878
8689
|
}
|
|
7879
|
-
function
|
|
7880
|
-
let r =
|
|
8690
|
+
function uc(e, t = {}, n = !1) {
|
|
8691
|
+
let r = tc(e);
|
|
7881
8692
|
if (r.length === 0) throw Error(`loadPackage: no package files found in ${(0, Y.resolve)(e)}`);
|
|
7882
8693
|
let i = null;
|
|
7883
|
-
r.some((e) => e.role === "manifest") && (i =
|
|
7884
|
-
let a =
|
|
7885
|
-
if (i && t.resolvePackage &&
|
|
8694
|
+
r.some((e) => e.role === "manifest") && (i = lc(e));
|
|
8695
|
+
let a = oc(r);
|
|
8696
|
+
if (i && t.resolvePackage && fc(i).length > 0) return gc(e, t, i, n);
|
|
7886
8697
|
let o = n ? {
|
|
7887
8698
|
...t,
|
|
7888
8699
|
withProvenance: !0
|
|
7889
|
-
} : t, s = u(
|
|
8700
|
+
} : t, s = u(sc(a), Bs, o);
|
|
7890
8701
|
if (i) {
|
|
7891
8702
|
s.packageManifest = i;
|
|
7892
|
-
let e =
|
|
8703
|
+
let e = pc(i);
|
|
7893
8704
|
e && s.issues.push(e);
|
|
7894
8705
|
}
|
|
7895
8706
|
let c = {
|
|
7896
|
-
standard: p(s,
|
|
8707
|
+
standard: p(s, Vs),
|
|
7897
8708
|
issues: s.issues
|
|
7898
8709
|
};
|
|
7899
8710
|
if (n) {
|
|
7900
8711
|
let e = r.find((e) => e.role === "manifest")?.path;
|
|
7901
8712
|
c.provenance = {
|
|
7902
8713
|
...e === void 0 ? {} : { manifest: e },
|
|
7903
|
-
constructs:
|
|
8714
|
+
constructs: cc(s.constructs ?? [], a, i?.id)
|
|
7904
8715
|
};
|
|
7905
8716
|
}
|
|
7906
8717
|
return c;
|
|
7907
8718
|
}
|
|
7908
|
-
function
|
|
7909
|
-
return
|
|
8719
|
+
function dc(e, t = {}) {
|
|
8720
|
+
return uc(e, t);
|
|
7910
8721
|
}
|
|
7911
8722
|
var X = class extends Error {
|
|
7912
8723
|
rule;
|
|
@@ -7914,12 +8725,12 @@ var X = class extends Error {
|
|
|
7914
8725
|
super(t), this.rule = e, this.name = "CompositionError";
|
|
7915
8726
|
}
|
|
7916
8727
|
};
|
|
7917
|
-
function
|
|
8728
|
+
function fc(e) {
|
|
7918
8729
|
let t = [];
|
|
7919
8730
|
for (let n of [...e.uses ?? [], ...e.extends ? [e.extends] : []]) t.includes(n) || t.push(n);
|
|
7920
8731
|
return t;
|
|
7921
8732
|
}
|
|
7922
|
-
function
|
|
8733
|
+
function pc(e) {
|
|
7923
8734
|
return e.extends ? {
|
|
7924
8735
|
severity: "warning",
|
|
7925
8736
|
code: "extends-deprecated",
|
|
@@ -7928,25 +8739,25 @@ function xs(e) {
|
|
|
7928
8739
|
message: `package "${e.id}": 'extends ${e.extends}' is deprecated — declare 'uses { ${e.extends} }' instead (extends is treated as a single-entry uses)`
|
|
7929
8740
|
} : null;
|
|
7930
8741
|
}
|
|
7931
|
-
var
|
|
7932
|
-
function
|
|
7933
|
-
let n =
|
|
8742
|
+
var mc = /* @__PURE__ */ "approvals.roles.processes.pages.gateways.regs.references.provisions.dataclasses.events.enums.variables.notes.tables.figures.links.mapProfiles.viewProfiles.terms.forms.subforms.symbols.calculations.verdicts.referenceMaterials.testPointSets.competenceKinds.constraints.discrepancyRecords.stateMachines.conformanceTests.conformanceClasses.requirements.requirementClasses.instruments.attributeDefinitions.capabilities.behaviors.conditionSets.subjects.instances.quantityRegisters.duals.invariants.testSequences.formulasUsed.texts.participantKinds.governanceOrgans.declarationKinds.declarationStatuses.declarationGates.schemeDefinitions.schemeLifecycles.frameworkDocuments.documentPrecedences.autoInclusions.decisionRules.comments.predicates.artifactDefinitions.artifactInstances.activityArchetypes.connectorProfiles.monitors.passports.dataspaces.policies.dimensions".split(".");
|
|
8743
|
+
function hc(e, t) {
|
|
8744
|
+
let n = oc(tc(e));
|
|
7934
8745
|
return {
|
|
7935
|
-
ctx: u(
|
|
8746
|
+
ctx: u(sc(n), Bs, t),
|
|
7936
8747
|
chunks: n
|
|
7937
8748
|
};
|
|
7938
8749
|
}
|
|
7939
|
-
function
|
|
8750
|
+
function gc(e, t, n, r = !1) {
|
|
7940
8751
|
let i = t.resolvePackage, a = n.id, o = /* @__PURE__ */ new Map([[a, (0, Y.resolve)(e)]]), s = /* @__PURE__ */ new Map([[a, n]]), c = [], l = /* @__PURE__ */ new Map(), u = [], d = (e) => {
|
|
7941
8752
|
l.set(e, 1), u.push(e);
|
|
7942
|
-
for (let t of
|
|
8753
|
+
for (let t of fc(s.get(e))) {
|
|
7943
8754
|
let n = l.get(t) ?? 0;
|
|
7944
8755
|
if (n === 1) throw new X("uses-cycle", `uses cycle: ${[...u.slice(u.indexOf(t)), t].join(" → ")} — package composition must be acyclic (uses-cycle)`);
|
|
7945
8756
|
if (n !== 2) {
|
|
7946
8757
|
if (!o.has(t)) {
|
|
7947
8758
|
let n = i(t);
|
|
7948
8759
|
if (!n) throw new X("uses-resolves", `package "${e}" uses "${t}", which the package locator cannot resolve (uses-resolves)`);
|
|
7949
|
-
let r =
|
|
8760
|
+
let r = lc(n);
|
|
7950
8761
|
if (r.id !== t) throw new X("uses-resolves", `package "${e}" uses "${t}", but the located package (${(0, Y.resolve)(n)}) declares id "${r.id}" (uses-resolves)`);
|
|
7951
8762
|
if (o.set(t, n), s.set(t, r), r.kind === "product_reference") {
|
|
7952
8763
|
l.set(t, 2);
|
|
@@ -7964,16 +8775,26 @@ function ws(e, t, n, r = !1) {
|
|
|
7964
8775
|
withProvenance: !0
|
|
7965
8776
|
} : t, m = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map();
|
|
7966
8777
|
for (let e of c) {
|
|
7967
|
-
let t =
|
|
8778
|
+
let t = hc(o.get(e), f);
|
|
7968
8779
|
m.set(e, t.ctx), h.set(e, t.chunks);
|
|
7969
8780
|
}
|
|
7970
8781
|
let g = /* @__PURE__ */ new Map();
|
|
7971
|
-
for (let e of
|
|
8782
|
+
for (let e of mc) g.set(e, /* @__PURE__ */ new Map());
|
|
7972
8783
|
let _ = m.get(c[0]);
|
|
7973
|
-
for (let e of
|
|
8784
|
+
for (let e of mc) for (let t of Object.keys(_[e])) g.get(e).set(t, c[0]);
|
|
8785
|
+
let v = /* @__PURE__ */ new Map(), y = (e, t) => {
|
|
8786
|
+
for (let n of Object.keys(t.requirementClasses)) v.has(n) || v.set(n, e);
|
|
8787
|
+
}, b = (e, t) => {
|
|
8788
|
+
if (v.size !== 0) for (let n of ["requirementClasses", "requirements"]) {
|
|
8789
|
+
let r = n === "requirementClasses" ? "requirement class" : "requirement";
|
|
8790
|
+
for (let i of Object.keys(t[n])) for (let [t, n] of v) if (i.startsWith(t + "/")) throw new X("namespace-pin-violation", `package "${e}" declares ${r} "${i}" under the requirement namespace "${t}" owned by package "${n}" — a layer-owned namespace is single-sourced: a downstream package may reference its provisions, never declare scopes or requirements at or under it (namespace-pin-violation)`);
|
|
8791
|
+
}
|
|
8792
|
+
};
|
|
8793
|
+
y(c[0], _);
|
|
7974
8794
|
for (let e of c.slice(1)) {
|
|
7975
8795
|
let t = m.get(e);
|
|
7976
|
-
|
|
8796
|
+
b(e, t);
|
|
8797
|
+
for (let n of mc) {
|
|
7977
8798
|
let r = _[n], i = g.get(n);
|
|
7978
8799
|
for (let [a, o] of Object.entries(t[n])) {
|
|
7979
8800
|
let t = i.get(a);
|
|
@@ -7981,18 +8802,18 @@ function ws(e, t, n, r = !1) {
|
|
|
7981
8802
|
r[a] = o, i.set(a, e);
|
|
7982
8803
|
}
|
|
7983
8804
|
}
|
|
7984
|
-
_.issues.push(...t.issues), !_.metadata && t.metadata && (_.metadata = t.metadata);
|
|
8805
|
+
_.issues.push(...t.issues), !_.metadata && t.metadata && (_.metadata = t.metadata), y(e, t);
|
|
7985
8806
|
}
|
|
7986
8807
|
for (let e of c) {
|
|
7987
8808
|
let t = s.get(e);
|
|
7988
8809
|
for (let n of t.requires ?? []) if (!c.some((t) => t !== e && (t === n || (s.get(t).provides ?? []).includes(n)))) throw new X("requires-satisfied", `package "${e}" requires "${n}", which no package in the composition provides (requires-satisfied)`);
|
|
7989
8810
|
}
|
|
7990
|
-
let
|
|
8811
|
+
let x = [];
|
|
7991
8812
|
c.forEach((e, t) => {
|
|
7992
8813
|
let n = s.get(e), r = c.slice(t + 1);
|
|
7993
8814
|
for (let t of n.provides ?? []) {
|
|
7994
8815
|
let n = r.some((e) => (s.get(e).requires ?? []).includes(t)), i = r.some((n) => (s.get(n).waives ?? []).some((n) => n === t || n === `${e}:${t}`));
|
|
7995
|
-
!n && !i &&
|
|
8816
|
+
!n && !i && x.push({
|
|
7996
8817
|
severity: "warning",
|
|
7997
8818
|
code: "provides-unconsumed",
|
|
7998
8819
|
construct: "package",
|
|
@@ -8002,13 +8823,13 @@ function ws(e, t, n, r = !1) {
|
|
|
8002
8823
|
}
|
|
8003
8824
|
});
|
|
8004
8825
|
for (let e of s.values()) {
|
|
8005
|
-
let t =
|
|
8006
|
-
t &&
|
|
8826
|
+
let t = pc(e);
|
|
8827
|
+
t && x.push(t);
|
|
8007
8828
|
}
|
|
8008
8829
|
_.packageManifest = n;
|
|
8009
|
-
let
|
|
8010
|
-
standard: p(_,
|
|
8011
|
-
issues: [..._.issues, ...
|
|
8830
|
+
let S = {
|
|
8831
|
+
standard: p(_, Vs),
|
|
8832
|
+
issues: [..._.issues, ...x],
|
|
8012
8833
|
composition: {
|
|
8013
8834
|
root: a,
|
|
8014
8835
|
order: c
|
|
@@ -8017,22 +8838,22 @@ function ws(e, t, n, r = !1) {
|
|
|
8017
8838
|
if (r) {
|
|
8018
8839
|
let t = {};
|
|
8019
8840
|
for (let e of c) {
|
|
8020
|
-
let n =
|
|
8841
|
+
let n = cc(m.get(e).constructs ?? [], h.get(e), e);
|
|
8021
8842
|
for (let [e, r] of Object.entries(n)) {
|
|
8022
8843
|
let n = t[e] ??= {};
|
|
8023
8844
|
for (let [e, t] of Object.entries(r)) n[e] = t;
|
|
8024
8845
|
}
|
|
8025
8846
|
}
|
|
8026
|
-
|
|
8847
|
+
S.provenance = {
|
|
8027
8848
|
manifest: (0, Y.join)((0, Y.resolve)(e), "package.primmel"),
|
|
8028
8849
|
constructs: t
|
|
8029
8850
|
};
|
|
8030
8851
|
}
|
|
8031
|
-
return
|
|
8852
|
+
return S;
|
|
8032
8853
|
}
|
|
8033
8854
|
//#endregion
|
|
8034
8855
|
//#region src/ser-des/prm.ts
|
|
8035
|
-
var
|
|
8856
|
+
var _c = /* @__PURE__ */ new Set(["MMEL_MAP", "Primmel_MAP"]), vc = /* @__PURE__ */ new Set([
|
|
8036
8857
|
"full",
|
|
8037
8858
|
"minimal",
|
|
8038
8859
|
"partial",
|
|
@@ -8041,7 +8862,7 @@ var Ts = /* @__PURE__ */ new Set(["MMEL_MAP", "Primmel_MAP"]), Es = /* @__PURE__
|
|
|
8041
8862
|
function Z(e) {
|
|
8042
8863
|
throw Error(`.prm parse error: ${e}`);
|
|
8043
8864
|
}
|
|
8044
|
-
function
|
|
8865
|
+
function yc(e, t) {
|
|
8045
8866
|
let n = {
|
|
8046
8867
|
description: "",
|
|
8047
8868
|
justification: "",
|
|
@@ -8050,9 +8871,9 @@ function Ds(e, t) {
|
|
|
8050
8871
|
if (e == null) return n;
|
|
8051
8872
|
(typeof e != "object" || Array.isArray(e)) && Z(`${t}: pair metadata must be an object`);
|
|
8052
8873
|
let r = e;
|
|
8053
|
-
return r.description !== void 0 && (typeof r.description != "string" && Z(`${t}: "description" must be a string`), n.description = r.description), r.justification !== void 0 && (typeof r.justification != "string" && Z(`${t}: "justification" must be a string`), n.justification = r.justification), r.coverage !== void 0 && ((typeof r.coverage != "string" || !
|
|
8874
|
+
return r.description !== void 0 && (typeof r.description != "string" && Z(`${t}: "description" must be a string`), n.description = r.description), r.justification !== void 0 && (typeof r.justification != "string" && Z(`${t}: "justification" must be a string`), n.justification = r.justification), r.coverage !== void 0 && ((typeof r.coverage != "string" || !vc.has(r.coverage)) && Z(`${t}: "coverage" must be one of full | minimal | partial | none`), n.coverage = r.coverage), n;
|
|
8054
8875
|
}
|
|
8055
|
-
function
|
|
8876
|
+
function bc(e) {
|
|
8056
8877
|
let t;
|
|
8057
8878
|
try {
|
|
8058
8879
|
t = JSON.parse(e);
|
|
@@ -8061,7 +8882,7 @@ function Os(e) {
|
|
|
8061
8882
|
}
|
|
8062
8883
|
(typeof t != "object" || !t || Array.isArray(t)) && Z("top level must be an object");
|
|
8063
8884
|
let n = t, r = typeof n["@type"] == "string" ? n["@type"] : "";
|
|
8064
|
-
|
|
8885
|
+
_c.has(r) || Z(`"@type" must be MMEL_MAP or Primmel_MAP (got "${r}")`);
|
|
8065
8886
|
let i = {
|
|
8066
8887
|
context: typeof n["@context"] == "string" ? n["@context"] : "",
|
|
8067
8888
|
type: r,
|
|
@@ -8077,20 +8898,20 @@ function Os(e) {
|
|
|
8077
8898
|
coverage: {}
|
|
8078
8899
|
}, a = n.coverage ?? {};
|
|
8079
8900
|
(typeof a != "object" || !a || Array.isArray(a)) && Z(`mapSet."${e}".coverage: must be an object`);
|
|
8080
|
-
for (let [t, n] of Object.entries(a)) (typeof n != "string" || !
|
|
8901
|
+
for (let [t, n] of Object.entries(a)) (typeof n != "string" || !vc.has(n)) && Z(`mapSet."${e}".coverage."${t}": must be one of full | minimal | partial | none`), r.coverage[t] = n;
|
|
8081
8902
|
let o = n.mappings ?? {};
|
|
8082
8903
|
(typeof o != "object" || !o || Array.isArray(o)) && Z(`mapSet."${e}".mappings: must be an object`);
|
|
8083
8904
|
for (let [t, n] of Object.entries(o)) {
|
|
8084
8905
|
(typeof n != "object" || !n || Array.isArray(n)) && Z(`mapSet."${e}".mappings."${t}": must be an object`);
|
|
8085
8906
|
let i = {};
|
|
8086
|
-
for (let [r, a] of Object.entries(n)) i[r] =
|
|
8907
|
+
for (let [r, a] of Object.entries(n)) i[r] = yc(a, `mapSet."${e}".mappings."${t}"."${r}"`);
|
|
8087
8908
|
r.mappings[t] = i;
|
|
8088
8909
|
}
|
|
8089
8910
|
i.mapSet[e] = r;
|
|
8090
8911
|
}
|
|
8091
8912
|
return i;
|
|
8092
8913
|
}
|
|
8093
|
-
function
|
|
8914
|
+
function xc(e) {
|
|
8094
8915
|
let t = {};
|
|
8095
8916
|
e.context && (t["@context"] = e.context), t["@type"] = e.type || "Primmel_MAP", t.id = e.id;
|
|
8096
8917
|
let n = {};
|
|
@@ -8115,7 +8936,7 @@ function ks(e) {
|
|
|
8115
8936
|
}
|
|
8116
8937
|
return t.mapSet = n, JSON.stringify(t, null, 2) + "\n";
|
|
8117
8938
|
}
|
|
8118
|
-
function
|
|
8939
|
+
function Sc(e) {
|
|
8119
8940
|
let t = [];
|
|
8120
8941
|
for (let [n, r] of Object.entries(e.mapSet)) {
|
|
8121
8942
|
let e = {};
|
|
@@ -8134,7 +8955,7 @@ function As(e) {
|
|
|
8134
8955
|
}
|
|
8135
8956
|
return t;
|
|
8136
8957
|
}
|
|
8137
|
-
function
|
|
8958
|
+
function Cc(e, t) {
|
|
8138
8959
|
let n = {
|
|
8139
8960
|
context: "",
|
|
8140
8961
|
type: "Primmel_MAP",
|
|
@@ -8162,7 +8983,7 @@ function js(e, t) {
|
|
|
8162
8983
|
}
|
|
8163
8984
|
//#endregion
|
|
8164
8985
|
//#region src/type-expr.ts
|
|
8165
|
-
var
|
|
8986
|
+
var wc = [
|
|
8166
8987
|
"integer",
|
|
8167
8988
|
"float",
|
|
8168
8989
|
"double",
|
|
@@ -8177,8 +8998,8 @@ var Ms = [
|
|
|
8177
8998
|
"reference",
|
|
8178
8999
|
"object",
|
|
8179
9000
|
"any"
|
|
8180
|
-
],
|
|
8181
|
-
function
|
|
9001
|
+
], Tc = /^[A-Za-z_][A-Za-z0-9_-]*$/;
|
|
9002
|
+
function Ec(e) {
|
|
8182
9003
|
let t = 0;
|
|
8183
9004
|
for (let n = 0; n < e.length; n++) {
|
|
8184
9005
|
let r = e[n];
|
|
@@ -8188,33 +9009,33 @@ function Ps(e) {
|
|
|
8188
9009
|
}
|
|
8189
9010
|
return null;
|
|
8190
9011
|
}
|
|
8191
|
-
function
|
|
9012
|
+
function Dc(e) {
|
|
8192
9013
|
let t = e.trim();
|
|
8193
9014
|
if (t === "QuantityValue") return { kind: "quantity" };
|
|
8194
|
-
if (
|
|
9015
|
+
if (wc.includes(t)) return {
|
|
8195
9016
|
kind: "primitive",
|
|
8196
9017
|
name: t
|
|
8197
9018
|
};
|
|
8198
9019
|
let n = /^reference\(([^)]+)\)$/.exec(t);
|
|
8199
9020
|
if (n) {
|
|
8200
9021
|
let e = n[1].trim();
|
|
8201
|
-
return
|
|
9022
|
+
return Tc.test(e) ? {
|
|
8202
9023
|
kind: "reference",
|
|
8203
9024
|
target: e
|
|
8204
9025
|
} : null;
|
|
8205
9026
|
}
|
|
8206
9027
|
if (t.startsWith("map<") && t.endsWith(">")) {
|
|
8207
|
-
let e =
|
|
9028
|
+
let e = Ec(t.slice(4, -1));
|
|
8208
9029
|
if (!e) return null;
|
|
8209
9030
|
let n = e[0].trim(), r = null;
|
|
8210
9031
|
n === "string" ? r = {
|
|
8211
9032
|
kind: "primitive",
|
|
8212
9033
|
name: "string"
|
|
8213
|
-
} :
|
|
9034
|
+
} : Tc.test(n) && (r = {
|
|
8214
9035
|
kind: "reference",
|
|
8215
9036
|
target: n
|
|
8216
9037
|
});
|
|
8217
|
-
let i =
|
|
9038
|
+
let i = Dc(e[1]);
|
|
8218
9039
|
return !r || !i ? null : {
|
|
8219
9040
|
kind: "map",
|
|
8220
9041
|
key: r,
|
|
@@ -8223,13 +9044,13 @@ function Fs(e) {
|
|
|
8223
9044
|
}
|
|
8224
9045
|
return null;
|
|
8225
9046
|
}
|
|
8226
|
-
function
|
|
8227
|
-
let t =
|
|
9047
|
+
function Oc(e) {
|
|
9048
|
+
let t = Dc(e);
|
|
8228
9049
|
return t !== null && t.kind === "map";
|
|
8229
9050
|
}
|
|
8230
9051
|
//#endregion
|
|
8231
9052
|
//#region src/mapping-coverage.ts
|
|
8232
|
-
function
|
|
9053
|
+
function kc(e, t) {
|
|
8233
9054
|
let n = e.indexOf("#");
|
|
8234
9055
|
if (n >= 0) {
|
|
8235
9056
|
let t = e.slice(0, n), r = e.slice(n + 1);
|
|
@@ -8245,12 +9066,12 @@ function Ls(e, t) {
|
|
|
8245
9066
|
qualified: t + "#" + e
|
|
8246
9067
|
};
|
|
8247
9068
|
}
|
|
8248
|
-
function
|
|
9069
|
+
function Ac(e, t) {
|
|
8249
9070
|
let n = [];
|
|
8250
9071
|
for (let [r, i] of Object.entries(e.mappings)) for (let a of i) n.push({
|
|
8251
9072
|
source: r,
|
|
8252
9073
|
sourceModel: t,
|
|
8253
|
-
target:
|
|
9074
|
+
target: kc(a.target, e.namespace).qualified,
|
|
8254
9075
|
targetModel: e.namespace,
|
|
8255
9076
|
description: a.description,
|
|
8256
9077
|
justification: a.justification,
|
|
@@ -8258,12 +9079,12 @@ function Rs(e, t) {
|
|
|
8258
9079
|
});
|
|
8259
9080
|
return n;
|
|
8260
9081
|
}
|
|
8261
|
-
function
|
|
9082
|
+
function jc(e, t = {}) {
|
|
8262
9083
|
let n = t.modelId ?? e.packageManifest?.id ?? e.meta?.namespace ?? "", r = [...e.mapProfiles ?? []], i = t.prm ? Array.isArray(t.prm) ? t.prm : [t.prm] : [];
|
|
8263
|
-
for (let e of i) r.push(...
|
|
8264
|
-
return r.flatMap((e) =>
|
|
9084
|
+
for (let e of i) r.push(...Sc(e));
|
|
9085
|
+
return r.flatMap((e) => Ac(e, n));
|
|
8265
9086
|
}
|
|
8266
|
-
function
|
|
9087
|
+
function Mc(e, t = {}) {
|
|
8267
9088
|
let n = t.idPrefix ?? "", r = (e.processes ?? []).filter((e) => !n || e.id.startsWith(n)), i = new Set(r.map((e) => e.id)), a = /* @__PURE__ */ new Map();
|
|
8268
9089
|
for (let e of r) a.set(e.id, {
|
|
8269
9090
|
id: e.id.slice(n.length),
|
|
@@ -8277,18 +9098,18 @@ function Bs(e, t = {}) {
|
|
|
8277
9098
|
}
|
|
8278
9099
|
return o;
|
|
8279
9100
|
}
|
|
8280
|
-
function
|
|
9101
|
+
function Nc(e, t) {
|
|
8281
9102
|
return t.length === 0 ? "none" : t.every((e) => e === "full") ? "full" : e === "gateway" && t.some((e) => e === "full" || e === "minimal") ? "minimal" : t.some((e) => e !== "none") ? "partial" : "none";
|
|
8282
9103
|
}
|
|
8283
|
-
function
|
|
8284
|
-
let a = Array.isArray(t) ? t :
|
|
9104
|
+
function Pc(e, t, n, r, i = {}) {
|
|
9105
|
+
let a = Array.isArray(t) ? t : Mc(t), o = n.filter((e) => e.targetModel === r), s = /* @__PURE__ */ new Map();
|
|
8285
9106
|
for (let e of o) {
|
|
8286
|
-
let t =
|
|
9107
|
+
let t = kc(e.target, r).id;
|
|
8287
9108
|
(s.get(t) ?? s.set(t, []).get(t)).push(e.source);
|
|
8288
9109
|
}
|
|
8289
9110
|
let c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = (e, t) => {
|
|
8290
9111
|
let n = s.has(e.id), r = n ? e.id : t, i = e.children.map((e) => u(e, r)), a;
|
|
8291
|
-
return r === null ? a = e.children.length === 0 ? "none" :
|
|
9112
|
+
return r === null ? a = e.children.length === 0 ? "none" : Nc(e.composition, i) : (a = "full", !n && t !== null && l.set(e.id, t)), c.set(e.id, a), a;
|
|
8292
9113
|
};
|
|
8293
9114
|
for (let e of a) u(e, null);
|
|
8294
9115
|
let d = [], f = /* @__PURE__ */ new Map(), p = (e) => {
|
|
@@ -8310,24 +9131,24 @@ function Hs(e, t, n, r, i = {}) {
|
|
|
8310
9131
|
for (let e of d) m[e.coverage]++;
|
|
8311
9132
|
let h = [], g = /* @__PURE__ */ new Set();
|
|
8312
9133
|
for (let e of o) {
|
|
8313
|
-
let t =
|
|
9134
|
+
let t = kc(e.target, r).id;
|
|
8314
9135
|
f.has(t) ? g.add(e.source) : h.push({
|
|
8315
9136
|
source: e.source,
|
|
8316
9137
|
target: e.target
|
|
8317
9138
|
});
|
|
8318
9139
|
}
|
|
8319
|
-
let _ = (e.processes ?? []).map((e) => e.id).filter((e) => !g.has(e)).filter((e) => i.unmappedAliases !== "exclude" || !e.includes("#")), v = [], y = /* @__PURE__ */ new Set(),
|
|
9140
|
+
let _ = (e.processes ?? []).map((e) => e.id).filter((e) => !g.has(e)).filter((e) => i.unmappedAliases !== "exclude" || !e.includes("#")), v = [], y = /* @__PURE__ */ new Set(), b = (e) => {
|
|
8320
9141
|
let t = `${e.kind}|${e.sourceModel}|${e.source}|${e.target}`;
|
|
8321
9142
|
y.has(t) || (y.add(t), v.push(e));
|
|
8322
9143
|
};
|
|
8323
9144
|
for (let e of o) {
|
|
8324
|
-
let t =
|
|
9145
|
+
let t = kc(e.target, r).id, n = f.get(t);
|
|
8325
9146
|
if (!n) continue;
|
|
8326
9147
|
let i = (e, t) => {
|
|
8327
9148
|
for (let n of e.children) t.push(n), i(n, t);
|
|
8328
9149
|
}, a = [];
|
|
8329
9150
|
i(n, a);
|
|
8330
|
-
for (let t of a) (s.get(t.id) ?? []).includes(e.source) ||
|
|
9151
|
+
for (let t of a) (s.get(t.id) ?? []).includes(e.source) || b({
|
|
8331
9152
|
kind: "inherited",
|
|
8332
9153
|
sourceModel: e.sourceModel,
|
|
8333
9154
|
source: e.source,
|
|
@@ -8346,7 +9167,7 @@ function Hs(e, t, n, r, i = {}) {
|
|
|
8346
9167
|
e.children.forEach(a);
|
|
8347
9168
|
};
|
|
8348
9169
|
t.children.forEach(a);
|
|
8349
|
-
for (let a of n)
|
|
9170
|
+
for (let a of n) b({
|
|
8350
9171
|
kind: "closure",
|
|
8351
9172
|
sourceModel: o.find((e) => e.source === a)?.sourceModel ?? i.implementationId ?? "",
|
|
8352
9173
|
source: a,
|
|
@@ -8368,7 +9189,7 @@ function Hs(e, t, n, r, i = {}) {
|
|
|
8368
9189
|
summary: m
|
|
8369
9190
|
};
|
|
8370
9191
|
}
|
|
8371
|
-
function
|
|
9192
|
+
function Fc(e) {
|
|
8372
9193
|
let t = [], n = /* @__PURE__ */ new Set();
|
|
8373
9194
|
for (let r of e) for (let i of r.mappings) for (let r of e) if (r.modelId === i.targetModel) for (let e of r.mappings) {
|
|
8374
9195
|
if (i.target !== `${r.modelId}#${e.source}`) continue;
|
|
@@ -8386,7 +9207,7 @@ function Us(e) {
|
|
|
8386
9207
|
}
|
|
8387
9208
|
return t;
|
|
8388
9209
|
}
|
|
8389
|
-
function
|
|
9210
|
+
function Ic(e) {
|
|
8390
9211
|
let t = /* @__PURE__ */ new Map();
|
|
8391
9212
|
for (let n of e) for (let e of n.mappings) {
|
|
8392
9213
|
let r = `${n.modelId}→${e.targetModel}`, i = t.get(r) ?? {
|
|
@@ -8398,14 +9219,14 @@ function Ws(e) {
|
|
|
8398
9219
|
}
|
|
8399
9220
|
return [...t.values()];
|
|
8400
9221
|
}
|
|
8401
|
-
function
|
|
9222
|
+
function Lc(e) {
|
|
8402
9223
|
if (e && typeof e == "object") {
|
|
8403
|
-
for (let t of Object.values(e))
|
|
9224
|
+
for (let t of Object.values(e)) Lc(t);
|
|
8404
9225
|
Object.freeze(e);
|
|
8405
9226
|
}
|
|
8406
9227
|
return e;
|
|
8407
9228
|
}
|
|
8408
|
-
function
|
|
9229
|
+
function Rc(e, t, n = null) {
|
|
8409
9230
|
let r = new Set(t.visibleElements ?? []), i = r.size > 0, a = i ? [...r] : (e.processes ?? []).map((e) => e.id), o = null;
|
|
8410
9231
|
if (n) {
|
|
8411
9232
|
let e = n.components.filter((e) => !i || r.has(e.id) || e.mappedBy.some((e) => r.has(e))), t = {
|
|
@@ -8423,14 +9244,14 @@ function Ks(e, t, n = null) {
|
|
|
8423
9244
|
summary: t
|
|
8424
9245
|
};
|
|
8425
9246
|
}
|
|
8426
|
-
return
|
|
9247
|
+
return Lc({
|
|
8427
9248
|
id: t.id,
|
|
8428
9249
|
against: t.against ?? "",
|
|
8429
9250
|
elements: a,
|
|
8430
9251
|
coverage: o
|
|
8431
9252
|
});
|
|
8432
9253
|
}
|
|
8433
|
-
function
|
|
9254
|
+
function zc(e) {
|
|
8434
9255
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
8435
9256
|
for (let n of e ?? []) t.add(n.id);
|
|
8436
9257
|
};
|
|
@@ -8447,13 +9268,13 @@ function qs(e) {
|
|
|
8447
9268
|
}
|
|
8448
9269
|
//#endregion
|
|
8449
9270
|
//#region src/model-diff.ts
|
|
8450
|
-
var
|
|
9271
|
+
var Bc = [
|
|
8451
9272
|
"foundations",
|
|
8452
9273
|
"primary",
|
|
8453
9274
|
"secondary",
|
|
8454
9275
|
"tertiary",
|
|
8455
9276
|
"cross-cutting"
|
|
8456
|
-
],
|
|
9277
|
+
], Vc = {
|
|
8457
9278
|
terms: "foundations",
|
|
8458
9279
|
references: "foundations",
|
|
8459
9280
|
roles: "foundations",
|
|
@@ -8516,9 +9337,9 @@ function Q(e) {
|
|
|
8516
9337
|
};
|
|
8517
9338
|
return n(e);
|
|
8518
9339
|
}
|
|
8519
|
-
var
|
|
8520
|
-
function
|
|
8521
|
-
let r = e ?? "", i = n ?? "", a =
|
|
9340
|
+
var Hc = /#([^#]*)$/;
|
|
9341
|
+
function Uc(e, t, n = "") {
|
|
9342
|
+
let r = e ?? "", i = n ?? "", a = Hc.exec(r);
|
|
8522
9343
|
a && (r = r.slice(0, a.index), i ||= a[1]);
|
|
8523
9344
|
let o = r.lastIndexOf(":"), s = r, c = "";
|
|
8524
9345
|
if (o >= 0) {
|
|
@@ -8532,11 +9353,11 @@ function Zs(e, t, n = "") {
|
|
|
8532
9353
|
fragment: i
|
|
8533
9354
|
};
|
|
8534
9355
|
}
|
|
8535
|
-
var
|
|
9356
|
+
var Wc = [
|
|
8536
9357
|
"source",
|
|
8537
9358
|
"sourceRef",
|
|
8538
9359
|
"sourceRefs"
|
|
8539
|
-
],
|
|
9360
|
+
], Gc = {
|
|
8540
9361
|
requirements: {
|
|
8541
9362
|
statement: [
|
|
8542
9363
|
"name",
|
|
@@ -8585,7 +9406,7 @@ var Qs = [
|
|
|
8585
9406
|
"profile"
|
|
8586
9407
|
]
|
|
8587
9408
|
}
|
|
8588
|
-
},
|
|
9409
|
+
}, Kc = [
|
|
8589
9410
|
"name",
|
|
8590
9411
|
"label",
|
|
8591
9412
|
"title",
|
|
@@ -8594,16 +9415,16 @@ var Qs = [
|
|
|
8594
9415
|
"statement",
|
|
8595
9416
|
"purpose",
|
|
8596
9417
|
"text"
|
|
8597
|
-
],
|
|
9418
|
+
], qc = [
|
|
8598
9419
|
"parent",
|
|
8599
9420
|
"bindsTo",
|
|
8600
9421
|
"targets",
|
|
8601
9422
|
"conformanceProcessId",
|
|
8602
9423
|
"conformanceProcessIds"
|
|
8603
9424
|
];
|
|
8604
|
-
function
|
|
9425
|
+
function Jc(e) {
|
|
8605
9426
|
let t = {}, n = (e, n) => {
|
|
8606
|
-
n && typeof n == "object" && (n.doc || n.clause) && (t[e] ??= []).push(
|
|
9427
|
+
n && typeof n == "object" && (n.doc || n.clause) && (t[e] ??= []).push(Uc(n.doc ?? "", n.clause ?? "", n.fragment));
|
|
8607
9428
|
};
|
|
8608
9429
|
n("source", e.source), n("sourceRef", e.sourceRef);
|
|
8609
9430
|
for (let t of e.sourceRefs ?? []) n("sourceRefs", t);
|
|
@@ -8615,7 +9436,7 @@ function nc(e) {
|
|
|
8615
9436
|
let i = (e) => {
|
|
8616
9437
|
let t = /* @__PURE__ */ new Set();
|
|
8617
9438
|
return e.filter((e) => {
|
|
8618
|
-
let n =
|
|
9439
|
+
let n = Yc(e);
|
|
8619
9440
|
return !t.has(n) && (t.add(n), !0);
|
|
8620
9441
|
});
|
|
8621
9442
|
};
|
|
@@ -8625,17 +9446,17 @@ function nc(e) {
|
|
|
8625
9446
|
channels: t
|
|
8626
9447
|
};
|
|
8627
9448
|
}
|
|
8628
|
-
function
|
|
9449
|
+
function Yc(e) {
|
|
8629
9450
|
return Q({
|
|
8630
9451
|
basis: e.basis,
|
|
8631
9452
|
clause: e.clause,
|
|
8632
9453
|
fragment: e.fragment
|
|
8633
9454
|
});
|
|
8634
9455
|
}
|
|
8635
|
-
function
|
|
8636
|
-
let n = String(t.id ?? t.entityName ?? ""), r =
|
|
9456
|
+
function Xc(e, t) {
|
|
9457
|
+
let n = String(t.id ?? t.entityName ?? ""), r = Vc[e] ?? "cross-cutting", { edges: i, channels: a } = Jc(t), o = new Set(Wc);
|
|
8637
9458
|
typeof t.reference == "string" && t.reference.startsWith("urn:") && o.add("reference");
|
|
8638
|
-
let s = {}, c = {}, l =
|
|
9459
|
+
let s = {}, c = {}, l = Gc[e], u = (e) => {
|
|
8639
9460
|
let n = {};
|
|
8640
9461
|
for (let r of e) t[r] !== void 0 && (n[r] = t[r], o.add(r), s[r] = t[r]);
|
|
8641
9462
|
return n;
|
|
@@ -8655,9 +9476,9 @@ function ic(e, t) {
|
|
|
8655
9476
|
c[`spelling:${t.spelling}`] = Q(e), s[`spelling:${t.spelling}`] = e;
|
|
8656
9477
|
}
|
|
8657
9478
|
} else {
|
|
8658
|
-
let e = u(
|
|
9479
|
+
let e = u(Kc);
|
|
8659
9480
|
Object.keys(e).length > 0 && (c.statement = Q(e));
|
|
8660
|
-
let t = u(
|
|
9481
|
+
let t = u(qc);
|
|
8661
9482
|
Object.keys(t).length > 0 && (c.anchor = Q(t));
|
|
8662
9483
|
}
|
|
8663
9484
|
if (i.length > 0) {
|
|
@@ -8684,31 +9505,31 @@ function ic(e, t) {
|
|
|
8684
9505
|
provenance: i
|
|
8685
9506
|
};
|
|
8686
9507
|
}
|
|
8687
|
-
function
|
|
9508
|
+
function Zc(e, t) {
|
|
8688
9509
|
let n = /* @__PURE__ */ new Map();
|
|
8689
|
-
for (let r of Object.keys(
|
|
9510
|
+
for (let r of Object.keys(Vc)) {
|
|
8690
9511
|
let i = e[r];
|
|
8691
9512
|
if (Array.isArray(i)) {
|
|
8692
9513
|
for (let e of i) if (e && typeof e == "object" && ("id" in e || "entityName" in e)) {
|
|
8693
|
-
let i =
|
|
9514
|
+
let i = Xc(r, e);
|
|
8694
9515
|
n.has(i.key) && t?.push(i.key), n.set(i.key, i);
|
|
8695
9516
|
}
|
|
8696
9517
|
}
|
|
8697
9518
|
}
|
|
8698
9519
|
return n;
|
|
8699
9520
|
}
|
|
8700
|
-
function
|
|
9521
|
+
function Qc(e, t) {
|
|
8701
9522
|
return `${e}#${t}`;
|
|
8702
9523
|
}
|
|
8703
9524
|
function $(e) {
|
|
8704
9525
|
return e?.version ?? "";
|
|
8705
9526
|
}
|
|
8706
|
-
function
|
|
9527
|
+
function $c(e) {
|
|
8707
9528
|
let t = [...new Set(e)].sort();
|
|
8708
9529
|
return t.filter((e) => !t.some((t) => t !== e && e.startsWith(t + ".")));
|
|
8709
9530
|
}
|
|
8710
|
-
function
|
|
8711
|
-
let r = n.mappingsA ??
|
|
9531
|
+
function el(e, t, n) {
|
|
9532
|
+
let r = n.mappingsA ?? jc(e), i = n.mappingsB ?? jc(t), a = (e) => `${e.sourceModel}#${e.source}⇒${e.target}`, o = new Map(r.map((e) => [a(e), e])), s = new Map(i.map((e) => [a(e), e])), c = [], l = [], u = [];
|
|
8712
9533
|
for (let [e, t] of s) o.has(e) || c.push(t);
|
|
8713
9534
|
for (let [e, t] of o) {
|
|
8714
9535
|
let n = s.get(e);
|
|
@@ -8729,7 +9550,7 @@ function cc(e, t, n) {
|
|
|
8729
9550
|
let o = (e) => {
|
|
8730
9551
|
let t = n.references?.[a];
|
|
8731
9552
|
if (t) return t;
|
|
8732
|
-
let r =
|
|
9553
|
+
let r = Mc(e, { idPrefix: `${a}#` });
|
|
8733
9554
|
return r.length > 0 ? r : null;
|
|
8734
9555
|
}, s = o(e), c = o(t);
|
|
8735
9556
|
if (!s && !c) {
|
|
@@ -8738,11 +9559,11 @@ function cc(e, t, n) {
|
|
|
8738
9559
|
}
|
|
8739
9560
|
let l = /* @__PURE__ */ new Map();
|
|
8740
9561
|
if (s) {
|
|
8741
|
-
let t =
|
|
9562
|
+
let t = Pc(e, s, r, a);
|
|
8742
9563
|
for (let e of t.components) l.set(e.id, { from: e.coverage });
|
|
8743
9564
|
}
|
|
8744
9565
|
if (c) {
|
|
8745
|
-
let e =
|
|
9566
|
+
let e = Pc(t, c, i, a);
|
|
8746
9567
|
for (let t of e.components) {
|
|
8747
9568
|
let e = l.get(t.id) ?? {};
|
|
8748
9569
|
e.to = t.coverage, l.set(t.id, e);
|
|
@@ -8766,12 +9587,12 @@ function cc(e, t, n) {
|
|
|
8766
9587
|
namespacesSkipped: p
|
|
8767
9588
|
};
|
|
8768
9589
|
}
|
|
8769
|
-
function
|
|
9590
|
+
function tl(e, t) {
|
|
8770
9591
|
let n = [];
|
|
8771
9592
|
for (let [t, r] of e) {
|
|
8772
9593
|
let e = /* @__PURE__ */ new Set([...t.provenance.map((e) => e.basis), ...r.provenance.map((e) => e.basis)]);
|
|
8773
9594
|
for (let i of [...e].sort()) {
|
|
8774
|
-
let e = (e) =>
|
|
9595
|
+
let e = (e) => $c(e.provenance.filter((e) => e.basis === i).map((e) => e.clause)).filter((e) => e.length > 0), a = e(t), o = e(r), s = a.filter((e) => !o.includes(e)), c = o.filter((e) => !a.includes(e));
|
|
8775
9596
|
if (s.length === 0 && c.length === 0) continue;
|
|
8776
9597
|
let l = {
|
|
8777
9598
|
key: t.key,
|
|
@@ -8821,7 +9642,7 @@ function lc(e, t) {
|
|
|
8821
9642
|
}
|
|
8822
9643
|
let r = (e) => {
|
|
8823
9644
|
if (e.kind !== "renumbered" || !t.sentencesA || !t.sentencesB) return "unavailable";
|
|
8824
|
-
let n = t.sentencesA.get(
|
|
9645
|
+
let n = t.sentencesA.get(Qc(e.doc, e.from)), r = t.sentencesB.get(Qc(e.doc, e.to));
|
|
8825
9646
|
return n === void 0 || r === void 0 ? "unavailable" : n.replace(/\s+/g, " ").trim() === r.replace(/\s+/g, " ").trim() ? "same" : "differed";
|
|
8826
9647
|
}, i = /* @__PURE__ */ new Map();
|
|
8827
9648
|
for (let e of n) {
|
|
@@ -8837,21 +9658,21 @@ function lc(e, t) {
|
|
|
8837
9658
|
}
|
|
8838
9659
|
return [...i.values()].sort((e, t) => `${e.doc} ${e.from} ${e.to}`.localeCompare(`${t.doc} ${t.from} ${t.to}`));
|
|
8839
9660
|
}
|
|
8840
|
-
function
|
|
9661
|
+
function nl(e, t, n) {
|
|
8841
9662
|
return e.kind !== "texts" || !n.startsWith("spelling:") ? n : n in e.aspects ? n in t.aspects ? `${n} (changed)` : `${n} (removed)` : `${n} (added)`;
|
|
8842
9663
|
}
|
|
8843
|
-
var
|
|
8844
|
-
function
|
|
8845
|
-
if (
|
|
9664
|
+
var rl = (e) => typeof e == "object" && !!e && !Array.isArray(e);
|
|
9665
|
+
function il(e, t, n, r) {
|
|
9666
|
+
if (rl(t) && rl(n)) {
|
|
8846
9667
|
let i = [.../* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(n)])].sort();
|
|
8847
|
-
for (let a of i)
|
|
9668
|
+
for (let a of i) il(`${e}.${a}`, t[a], n[a], r);
|
|
8848
9669
|
return;
|
|
8849
9670
|
}
|
|
8850
9671
|
Q(t) !== Q(n) && r.push(e);
|
|
8851
9672
|
}
|
|
8852
|
-
function
|
|
9673
|
+
function al(e, t) {
|
|
8853
9674
|
let n = [.../* @__PURE__ */ new Set([...Object.keys(e.fields), ...Object.keys(t.fields)])].sort(), r = [];
|
|
8854
|
-
for (let i of n)
|
|
9675
|
+
for (let i of n) il(i, e.fields[i], t.fields[i], r);
|
|
8855
9676
|
let i = [
|
|
8856
9677
|
"source",
|
|
8857
9678
|
"sourceRef",
|
|
@@ -8864,8 +9685,8 @@ function pc(e, t) {
|
|
|
8864
9685
|
return !a.has(r) && (a.add(r), !0);
|
|
8865
9686
|
});
|
|
8866
9687
|
}
|
|
8867
|
-
function
|
|
8868
|
-
let r = [], i = [], a =
|
|
9688
|
+
function ol(e, t, n = {}) {
|
|
9689
|
+
let r = [], i = [], a = Zc(e, r), o = Zc(t, i), s = [], c = [], l = [], u = [], d = [], f = 0, p = Object.fromEntries(Bc.map((e) => [e, {
|
|
8869
9690
|
added: 0,
|
|
8870
9691
|
removed: 0,
|
|
8871
9692
|
changed: 0,
|
|
@@ -8903,15 +9724,15 @@ function mc(e, t, n = {}) {
|
|
|
8903
9724
|
id: t.id,
|
|
8904
9725
|
kind: t.kind,
|
|
8905
9726
|
tier: t.tier,
|
|
8906
|
-
aspects: r.map((e) =>
|
|
8907
|
-
fields:
|
|
9727
|
+
aspects: r.map((e) => nl(t, n, e)).sort(),
|
|
9728
|
+
fields: al(t, n)
|
|
8908
9729
|
}), p[t.tier].changed++);
|
|
8909
9730
|
}
|
|
8910
|
-
let m =
|
|
9731
|
+
let m = el(e, t, n), h = tl(d, n), g = s.length === 0 && c.length === 0 && l.length === 0 && u.length === 0 && m.added.length === 0 && m.removed.length === 0 && m.changed.length === 0 && m.coverageDelta.length === 0 && h.length === 0, _ = e.packageManifest, v = t.packageManifest, y = n.aLabel ?? (_?.id ? `${_.id}@${$(_) || "?"}` : "a"), b = n.bLabel ?? (v?.id ? `${v.id}@${$(v) || "?"}` : "b"), x = !!_?.id && _.id === v?.id && $(_) !== $(v), S = (e, t) => `${e}: duplicate element ${t} — the last declaration wins (a data error the duplicate-id linter owns); this side under-reports`, C = [...r.map((e) => S(y, e)), ...i.map((e) => S(b, e))];
|
|
8911
9732
|
return {
|
|
8912
9733
|
aLabel: y,
|
|
8913
|
-
bLabel:
|
|
8914
|
-
editionComparison:
|
|
9734
|
+
bLabel: b,
|
|
9735
|
+
editionComparison: x,
|
|
8915
9736
|
aVersion: $(_),
|
|
8916
9737
|
bVersion: $(v),
|
|
8917
9738
|
added: s.sort((e, t) => e.key.localeCompare(t.key)),
|
|
@@ -8922,44 +9743,44 @@ function mc(e, t, n = {}) {
|
|
|
8922
9743
|
byTier: p,
|
|
8923
9744
|
mappings: m,
|
|
8924
9745
|
clauseDrift: h,
|
|
8925
|
-
warnings:
|
|
9746
|
+
warnings: C,
|
|
8926
9747
|
empty: g
|
|
8927
9748
|
};
|
|
8928
9749
|
}
|
|
8929
|
-
function
|
|
9750
|
+
function sl(e) {
|
|
8930
9751
|
return `[${e.tier}/${e.kind}] ${e.id}`;
|
|
8931
9752
|
}
|
|
8932
|
-
function
|
|
9753
|
+
function cl(e, t) {
|
|
8933
9754
|
try {
|
|
8934
9755
|
let n = e ? JSON.parse(e) : {}, r = t ? JSON.parse(t) : {}, i = [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(r)])].sort().filter((e) => Q(n[e]) !== Q(r[e])).map((e) => `${e}: ${Q(n[e])} → ${Q(r[e])}`);
|
|
8935
9756
|
if (i.length > 0) return i;
|
|
8936
9757
|
} catch {}
|
|
8937
9758
|
return [`from ${e}`, `to ${t}`];
|
|
8938
9759
|
}
|
|
8939
|
-
function
|
|
9760
|
+
function ll(e) {
|
|
8940
9761
|
let t = [], n = e.editionComparison ? `edition comparison — ${e.aLabel} → ${e.bLabel}` : `model diff — ${e.aLabel} → ${e.bLabel}`;
|
|
8941
9762
|
t.push(`primmel diff: ${n}`), t.push(""), t.push(`elements: +${e.added.length} -${e.removed.length} ~${e.changed.length} >${e.moved.length} (${e.unchanged} unchanged)`), t.push(""), t.push("by tier: added removed changed moved unchanged");
|
|
8942
|
-
for (let n of
|
|
9763
|
+
for (let n of Bc) {
|
|
8943
9764
|
let r = e.byTier[n];
|
|
8944
9765
|
t.push(` ${n.padEnd(13)} ${String(r.added).padStart(5)} ${String(r.removed).padStart(8)} ${String(r.changed).padStart(8)} ${String(r.moved).padStart(6)} ${String(r.unchanged).padStart(9)}`);
|
|
8945
9766
|
}
|
|
8946
9767
|
if (e.added.length > 0) {
|
|
8947
9768
|
t.push("", "added:");
|
|
8948
|
-
for (let n of e.added) t.push(` + ${
|
|
9769
|
+
for (let n of e.added) t.push(` + ${sl(n)}`);
|
|
8949
9770
|
}
|
|
8950
9771
|
if (e.removed.length > 0) {
|
|
8951
9772
|
t.push("", "removed:");
|
|
8952
|
-
for (let n of e.removed) t.push(` - ${
|
|
9773
|
+
for (let n of e.removed) t.push(` - ${sl(n)}`);
|
|
8953
9774
|
}
|
|
8954
9775
|
if (e.changed.length > 0) {
|
|
8955
9776
|
t.push("", "changed:");
|
|
8956
|
-
for (let n of e.changed) t.push(` ~ ${
|
|
9777
|
+
for (let n of e.changed) t.push(` ~ ${sl(n)} — ${n.aspects.join(", ")} (fields: ${n.fields.join(", ")})`);
|
|
8957
9778
|
}
|
|
8958
9779
|
if (e.moved.length > 0) {
|
|
8959
9780
|
t.push("", "moved (re-anchored):");
|
|
8960
9781
|
for (let n of e.moved) {
|
|
8961
|
-
t.push(` > ${
|
|
8962
|
-
for (let e of
|
|
9782
|
+
t.push(` > ${sl(n)}`);
|
|
9783
|
+
for (let e of cl(n.from, n.to)) t.push(` ${e}`);
|
|
8963
9784
|
}
|
|
8964
9785
|
}
|
|
8965
9786
|
if (e.warnings.length > 0) {
|
|
@@ -8984,27 +9805,27 @@ function _c(e) {
|
|
|
8984
9805
|
}
|
|
8985
9806
|
//#endregion
|
|
8986
9807
|
//#region src/ser-des/index.ts
|
|
8987
|
-
function
|
|
8988
|
-
return p(u(e,
|
|
9808
|
+
function ul(e, t = {}) {
|
|
9809
|
+
return p(u(e, Bs, t), Vs);
|
|
8989
9810
|
}
|
|
8990
|
-
function
|
|
8991
|
-
let n = u(e,
|
|
9811
|
+
function dl(e, t = {}) {
|
|
9812
|
+
let n = u(e, Bs, t);
|
|
8992
9813
|
return {
|
|
8993
|
-
standard: p(n,
|
|
9814
|
+
standard: p(n, Vs),
|
|
8994
9815
|
issues: n.issues
|
|
8995
9816
|
};
|
|
8996
9817
|
}
|
|
8997
|
-
function
|
|
8998
|
-
return
|
|
9818
|
+
function fl(e, t = {}) {
|
|
9819
|
+
return ul(Gs(e), t);
|
|
8999
9820
|
}
|
|
9000
|
-
function
|
|
9001
|
-
return
|
|
9821
|
+
function pl(e, t = {}) {
|
|
9822
|
+
return dl(Gs(e), t);
|
|
9002
9823
|
}
|
|
9003
|
-
function
|
|
9004
|
-
return Ue(e,
|
|
9824
|
+
function ml(e) {
|
|
9825
|
+
return Ue(e, Hs);
|
|
9005
9826
|
}
|
|
9006
|
-
function
|
|
9007
|
-
return
|
|
9827
|
+
function hl(e) {
|
|
9828
|
+
return Ks(e);
|
|
9008
9829
|
}
|
|
9009
9830
|
//#endregion
|
|
9010
|
-
export { X as CompositionError, vi as ENDPOINT_ACCESS_SCOPES, _i as ENDPOINT_OPERATION_KINDS, ho as PASSPORT_ACCESS_CLASSES, mo as PASSPORT_CONTENT_CLASSES, go as PASSPORT_UPI_LEVELS,
|
|
9831
|
+
export { X as CompositionError, vi as ENDPOINT_ACCESS_SCOPES, _i as ENDPOINT_OPERATION_KINDS, ho as PASSPORT_ACCESS_CLASSES, mo as PASSPORT_CONTENT_CLASSES, go as PASSPORT_UPI_LEVELS, wc as PRIMITIVE_TYPES, Vc as TIER_BY_FIELD, Bc as TIER_ORDER, Rc as applyView, Mc as buildProcessTree, Q as canonical, Qc as clauseTextKey, jc as collectMappings, zc as componentIds, Pc as computeCoverage, ol as diffStandards, Fc as discoverTransitive, ml as dump, hi as dumpPackage, xc as dumpPrm, fc as effectiveUses, Zc as elementIndex, ll as formatDiffReport, rc as groupBySourceFile, Oc as isWellFormedMapType, ul as load, fl as loadFile, pl as loadFileWithIssues, nc as loadPackage, dc as loadPackageWithIssues, ic as loadPackageWithProvenance, bc as loadPrm, dl as loadWithIssues, Cc as mapProfilesToPrm, Ac as mappingsFromProfile, Uc as normalizeSourceRef, tc as packageFiles, kc as parseTargetRef, Dc as parseTypeExpression, Sc as prmToMapProfiles, lc as readPackageManifest, Ic as repoMap, hl as validate };
|