@aiquants/markdown 8.1.1 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -4
- package/dist/{abnfDiagram-VRR7QNED-714qd8by.cjs → abnfDiagram-VRR7QNED-CfcidEeF.cjs} +1 -1
- package/dist/{abnfDiagram-VRR7QNED-ClsV3o7-.js → abnfDiagram-VRR7QNED-CqzHEoGP.js} +3 -3
- package/dist/{arc-Bs2N0CEE.cjs → arc-BD-XC8JG.cjs} +1 -1
- package/dist/arc-CIHnI5Tn.js +83 -0
- package/dist/{architectureDiagram-ZJ3FMSHR-SPtbaJq1.cjs → architectureDiagram-ZJ3FMSHR-CLgC4ySs.cjs} +1 -1
- package/dist/{architectureDiagram-ZJ3FMSHR-l2Kn8D2e.js → architectureDiagram-ZJ3FMSHR-CX5DaRgk.js} +2 -2
- package/dist/{blockDiagram-677ZJIJ3-C01MGcBZ.cjs → blockDiagram-677ZJIJ3-B45jR5Ef.cjs} +1 -1
- package/dist/{blockDiagram-677ZJIJ3-CbCSQo90.js → blockDiagram-677ZJIJ3-BVvPQ2BZ.js} +3 -3
- package/dist/{c4Diagram-LMCZKHZV-TuT3uTkj.cjs → c4Diagram-LMCZKHZV-CUgZ93IA.cjs} +1 -1
- package/dist/{c4Diagram-LMCZKHZV-CdXSplj6.js → c4Diagram-LMCZKHZV-CmpNmuYQ.js} +2 -2
- package/dist/{channel-DZlQOicJ.cjs → channel-CCNoIO-n.cjs} +1 -1
- package/dist/{channel-inzdTBsL.js → channel-CJnvKaiK.js} +1 -1
- package/dist/{chunk-2Q5K7J3B-D2t88W5_.cjs → chunk-2Q5K7J3B-CGvZIrla.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-BlcbsuzR.js → chunk-2Q5K7J3B-DI5NSXs3.js} +1 -1
- package/dist/{chunk-32BRIVSS-DPtab14v.cjs → chunk-32BRIVSS-Buxmelj1.cjs} +1 -1
- package/dist/{chunk-32BRIVSS-8XP7uEWL.js → chunk-32BRIVSS-DBxZTCPU.js} +1 -1
- package/dist/{chunk-5VM5RSS4-D03FahtZ.js → chunk-5VM5RSS4-B3vhx_6_.js} +1 -1
- package/dist/{chunk-5VM5RSS4-BjciIcJB.cjs → chunk-5VM5RSS4-DJudqxeH.cjs} +1 -1
- package/dist/{chunk-EX3LRPZG-Cz4_aUcx.js → chunk-EX3LRPZG-3mU4tF-T.js} +21 -21
- package/dist/{chunk-EX3LRPZG-CwaWU3NG.cjs → chunk-EX3LRPZG-BYk-yeom.cjs} +1 -1
- package/dist/{chunk-JWPE2WC7-CZnRHc3B.js → chunk-JWPE2WC7-05_7DU1b.js} +1 -1
- package/dist/{chunk-JWPE2WC7-BhnZoEDO.cjs → chunk-JWPE2WC7-CF8PY84Z.cjs} +1 -1
- package/dist/{chunk-MOJQB5TN-Bln4G16L.cjs → chunk-MOJQB5TN-C1PxO_ZB.cjs} +1 -1
- package/dist/{chunk-MOJQB5TN-CAgrBpGK.js → chunk-MOJQB5TN-MX6h9dRz.js} +7 -7
- package/dist/{chunk-PUDLZKDR-Chc4If4v.js → chunk-PUDLZKDR-CEaKE3Nm.js} +6 -6
- package/dist/{chunk-PUDLZKDR-ZSUOxhwQ.cjs → chunk-PUDLZKDR-nwjWRhQa.cjs} +1 -1
- package/dist/{chunk-RYQCIY6F-CmqX9MNK.cjs → chunk-RYQCIY6F-0Xvnmozd.cjs} +1 -1
- package/dist/{chunk-RYQCIY6F-BWJMA-CG.js → chunk-RYQCIY6F-DCzkxbV-.js} +5 -5
- package/dist/{chunk-V7JOEXUC-DxTIfD2Z.js → chunk-V7JOEXUC-9kUlPSlw.js} +15 -15
- package/dist/{chunk-V7JOEXUC-B13vGPTt.cjs → chunk-V7JOEXUC-DJ6NOMBh.cjs} +1 -1
- package/dist/{chunk-VR4S4FIN-CbzSMdlG.js → chunk-VR4S4FIN-DTcdZAIy.js} +3 -3
- package/dist/{chunk-VR4S4FIN-C67CWetO.cjs → chunk-VR4S4FIN-DjgjZOol.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-D00l-azL.cjs → chunk-XXDRQBXY-BAN-bNyU.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-DF5XNYDF.js → chunk-XXDRQBXY-BSD7H18E.js} +1 -1
- package/dist/{classDiagram-v2-EOCWNBFH-BVXrsjAy.js → classDiagram-OUVF2IWQ-CAVtDASr.js} +2 -2
- package/dist/{classDiagram-OUVF2IWQ-kTYC0DeX.cjs → classDiagram-OUVF2IWQ-D9dkL55K.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-BVXrsjAy.js → classDiagram-v2-EOCWNBFH-CAVtDASr.js} +2 -2
- package/dist/{classDiagram-v2-EOCWNBFH-kTYC0DeX.cjs → classDiagram-v2-EOCWNBFH-D9dkL55K.cjs} +1 -1
- package/dist/code-blocks.cjs +1 -0
- package/dist/code-blocks.d.ts +12 -0
- package/dist/code-blocks.js +36 -0
- package/dist/components/MarkdownRenderer.d.ts +6 -1
- package/dist/components/MarkdownViewer.d.ts +5 -1
- package/dist/components/SpreadsheetBlock.d.ts +24 -0
- package/dist/components/SpreadsheetToolbar.d.ts +21 -0
- package/dist/components/controlStyles.d.ts +3 -0
- package/dist/components/mdastNodes/CodeNode.d.ts +1 -0
- package/dist/components/spreadsheetClipboard.d.ts +16 -0
- package/dist/components/spreadsheetLabels.d.ts +33 -0
- package/dist/components/spreadsheetModel.d.ts +31 -0
- package/dist/components/viewerLabels.d.ts +6 -1
- package/dist/converter.wasm +0 -0
- package/dist/{cose-bilkent-JH36ORCC-CbeyXphF.cjs → cose-bilkent-JH36ORCC-KQT29htQ.cjs} +1 -1
- package/dist/{cose-bilkent-JH36ORCC-lZuyWql7.js → cose-bilkent-JH36ORCC-aJGIpkTB.js} +5 -5
- package/dist/{cynefinDiagram-TSTJHNR4-DKAvatlk.js → cynefinDiagram-TSTJHNR4-C3F_WdyT.js} +56 -56
- package/dist/{cynefinDiagram-TSTJHNR4-Cuqne60m.cjs → cynefinDiagram-TSTJHNR4-C_rGUs0a.cjs} +1 -1
- package/dist/{dagre-VKFMJZFB-D9B4A3vP.cjs → dagre-VKFMJZFB-Bn_WdZ6A.cjs} +1 -1
- package/dist/{dagre-VKFMJZFB-DOl32ZLj.js → dagre-VKFMJZFB-CrmCHDPv.js} +26 -26
- package/dist/{diagram-FQU43EPY-CyKNQRDz.cjs → diagram-FQU43EPY-B8Bka9S6.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-DW9s8x-t.js → diagram-FQU43EPY-DuJ6IxJz.js} +31 -31
- package/dist/{diagram-G47NLZAW-JWyg9BAf.js → diagram-G47NLZAW-3UXM5joI.js} +49 -49
- package/dist/{diagram-G47NLZAW-Bd402kCS.cjs → diagram-G47NLZAW-D--MA_nT.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-O9D369xQ.cjs → diagram-NH7WQ7WH-Cqc8orqE.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-CBVjs5Qb.js → diagram-NH7WQ7WH-CtH8Gdkl.js} +15 -15
- package/dist/{diagram-OA4YK3LP-DwedHmnV.js → diagram-OA4YK3LP-CWRyqD4L.js} +25 -25
- package/dist/{diagram-OA4YK3LP-CGFLIsXt.cjs → diagram-OA4YK3LP-DfKPIPFJ.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-CEsljMQV.cjs → diagram-WEI45ONY-BYMVLI0Q.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-BgJvkrqe.js → diagram-WEI45ONY-C0OrOx2a.js} +67 -67
- package/dist/{ebnfDiagram-CCIWWBDH-C7QZ4wXM.js → ebnfDiagram-CCIWWBDH-CQ7558AK.js} +3 -3
- package/dist/{ebnfDiagram-CCIWWBDH-e9oWuIhA.cjs → ebnfDiagram-CCIWWBDH-DZKq52yC.cjs} +1 -1
- package/dist/{erDiagram-Q63AITRT-OUarWTK1.js → erDiagram-Q63AITRT-CsCp6RSB.js} +19 -19
- package/dist/{erDiagram-Q63AITRT-BdP8JBuN.cjs → erDiagram-Q63AITRT-CzkYgQ0q.cjs} +1 -1
- package/dist/{extractHeadings-CUTXOBTa.js → extractHeadings-BUjTmniO.js} +6443 -5933
- package/dist/extractHeadings-Dkf-aqDu.cjs +314 -0
- package/dist/flowDiagram-23GEKE2U-DwEDOisR.cjs +1 -0
- package/dist/flowDiagram-23GEKE2U-aboipivB.js +7 -0
- package/dist/{ganttDiagram-NO4QXBWP-DjqYneGy.cjs → ganttDiagram-NO4QXBWP-7oIdk62h.cjs} +1 -1
- package/dist/{ganttDiagram-NO4QXBWP-7q1R_3-p.js → ganttDiagram-NO4QXBWP-BVnjew_C.js} +2 -2
- package/dist/{gitGraphDiagram-IHSO6WYX-BjogZ4FH.cjs → gitGraphDiagram-IHSO6WYX-BufmbyyT.cjs} +1 -1
- package/dist/{gitGraphDiagram-IHSO6WYX-B5gb3Rqu.js → gitGraphDiagram-IHSO6WYX-fP0zuss4.js} +10 -10
- package/dist/index.cjs +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.d.ts +3 -1
- package/dist/index.client.js +38 -36
- package/dist/index.js +38 -36
- package/dist/{infoDiagram-FWYZ7A6U-BkG_Sltp.cjs → infoDiagram-FWYZ7A6U-DerCFmks.cjs} +1 -1
- package/dist/{infoDiagram-FWYZ7A6U-BaKyN9IA.js → infoDiagram-FWYZ7A6U-DzsSutoh.js} +3 -3
- package/dist/{ishikawaDiagram-FXEZZL3T-CiyiRY0n.cjs → ishikawaDiagram-FXEZZL3T-BN-byOYP.cjs} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-CSv6cDIC.js → ishikawaDiagram-FXEZZL3T-BZ_ric9v.js} +35 -35
- package/dist/{journeyDiagram-5HDEW3XC-CidOpS4e.cjs → journeyDiagram-5HDEW3XC-C7iTlBhN.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-BSe4iQ8y.js → journeyDiagram-5HDEW3XC-CfZ11aJu.js} +30 -30
- package/dist/{kanban-definition-HUTT4EX6-E7S0-2B0.cjs → kanban-definition-HUTT4EX6-BNNQtqj9.cjs} +1 -1
- package/dist/{kanban-definition-HUTT4EX6-NcWyJMi_.js → kanban-definition-HUTT4EX6-De7q9Kj3.js} +47 -47
- package/dist/{linear-DBHjPQ2a.js → linear-Bh2aX99D.js} +5 -5
- package/dist/{linear-DVrRITf5.cjs → linear-D8TLf9nV.cjs} +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-ddxMumCY.js → mindmap-definition-LN4V7U3C-3bksVDiB.js} +11 -11
- package/dist/{mindmap-definition-LN4V7U3C-CPgaG7JV.cjs → mindmap-definition-LN4V7U3C-CmbdSctZ.cjs} +1 -1
- package/dist/{pegDiagram-2B236MQR-CA_DeqqA.cjs → pegDiagram-2B236MQR-BWozQII1.cjs} +1 -1
- package/dist/{pegDiagram-2B236MQR-CLzXETR3.js → pegDiagram-2B236MQR-ffi6qFEn.js} +3 -3
- package/dist/{pieDiagram-ENE6RG2P-WVn8XJGb.js → pieDiagram-ENE6RG2P-De3q_Av5.js} +49 -49
- package/dist/{pieDiagram-ENE6RG2P-Dg04F48S.cjs → pieDiagram-ENE6RG2P-DfTgyWpG.cjs} +1 -1
- package/dist/{quadrantDiagram-ABIIQ3AL-BsckSYJt.cjs → quadrantDiagram-ABIIQ3AL-BZF5Z12H.cjs} +1 -1
- package/dist/{quadrantDiagram-ABIIQ3AL-DyWlNOhT.js → quadrantDiagram-ABIIQ3AL-CP7NgI8w.js} +45 -45
- package/dist/{railroadDiagram-RFXS5EU6-D3VxK11o.js → railroadDiagram-RFXS5EU6-BuWP-rUP.js} +3 -3
- package/dist/{railroadDiagram-RFXS5EU6-DCnQVXco.cjs → railroadDiagram-RFXS5EU6-Cui5Nx7p.cjs} +1 -1
- package/dist/{requirementDiagram-TGXJPOKE-DXCyNSis.cjs → requirementDiagram-TGXJPOKE-C-WJSUrB.cjs} +1 -1
- package/dist/{requirementDiagram-TGXJPOKE-BMaGXiNU.js → requirementDiagram-TGXJPOKE-DOEubcGx.js} +3 -3
- package/dist/{sankeyDiagram-HTMAVEWB-BX6vKeUm.js → sankeyDiagram-HTMAVEWB-BrD3GLG6.js} +47 -47
- package/dist/{sankeyDiagram-HTMAVEWB-D1m7iBLQ.cjs → sankeyDiagram-HTMAVEWB-CyT8wRcS.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-0mMExPO7.js → sequenceDiagram-DBY2YBRQ-CT6w_sxa.js} +3 -3
- package/dist/{sequenceDiagram-DBY2YBRQ-BOZ4f_Hs.cjs → sequenceDiagram-DBY2YBRQ-DmNBUeEN.cjs} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-CFgV5LdI.js → sizeCapture-X5ZJPWSS-Dt-2lcQO.js} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-0Q0rI-PZ.cjs → sizeCapture-X5ZJPWSS-h_Xsq3-D.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-Co2cQg3S.cjs → stateDiagram-2N3HPSRC-C9dyCEcu.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-BbQVKPdF.js → stateDiagram-2N3HPSRC-CjJrf8oq.js} +13 -13
- package/dist/{stateDiagram-v2-6OUMAXLB-QePyEJnH.js → stateDiagram-v2-6OUMAXLB-APLiC-KL.js} +2 -2
- package/dist/{stateDiagram-v2-6OUMAXLB-Boy-ppxx.cjs → stateDiagram-v2-6OUMAXLB-BhwjG0NA.cjs} +1 -1
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/markdown.standalone.css +1 -1
- package/dist/{swimlanes-5IMT3BWC-Cqs5VVSm.cjs → swimlanes-5IMT3BWC-DRPswRoa.cjs} +1 -1
- package/dist/{swimlanes-5IMT3BWC-D4n1siHn.js → swimlanes-5IMT3BWC-Dlu3b_xG.js} +313 -313
- package/dist/{swimlanesDiagram-G3AALYLV-Da8ZZAJn.js → swimlanesDiagram-G3AALYLV-CX2jbFCF.js} +2 -2
- package/dist/{swimlanesDiagram-G3AALYLV-DVHw2s5w.cjs → swimlanesDiagram-G3AALYLV-VAEv3KP_.cjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-D25i6kkS.cjs → timeline-definition-FHXFAJF6-C6xF4zqV.cjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-BGK-KyNC.js → timeline-definition-FHXFAJF6-Ct68OfPR.js} +40 -40
- package/dist/{vennDiagram-L72KCM5P-CLkAwtsq.js → vennDiagram-L72KCM5P-BfTAjs8X.js} +124 -124
- package/dist/{vennDiagram-L72KCM5P-8XQ-KXbG.cjs → vennDiagram-L72KCM5P-CUaYoUAd.cjs} +1 -1
- package/dist/{wardleyDiagram-EHGQE667-C0S3P_7H.js → wardleyDiagram-EHGQE667-2foz0EAt.js} +25 -25
- package/dist/{wardleyDiagram-EHGQE667-DPCJNwRB.cjs → wardleyDiagram-EHGQE667-Cp3kY_DT.cjs} +1 -1
- package/dist/{xychartDiagram-FW5EYKEG-DAacRCtv.js → xychartDiagram-FW5EYKEG-B3dGYiSE.js} +40 -40
- package/dist/{xychartDiagram-FW5EYKEG-BTE5ffMN.cjs → xychartDiagram-FW5EYKEG-CDkSOK02.cjs} +1 -1
- package/package.json +16 -7
- package/dist/arc-Eb0BfUPO.js +0 -83
- package/dist/extractHeadings-agc-00bD.cjs +0 -311
- package/dist/flowDiagram-23GEKE2U-BZYdQMwk.js +0 -7
- package/dist/flowDiagram-23GEKE2U-DDjpVH-X.cjs +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as re } from "./chunk-JWPE2WC7-
|
|
2
|
-
import {
|
|
1
|
+
import { p as re } from "./chunk-JWPE2WC7-05_7DU1b.js";
|
|
2
|
+
import { a9 as oe, a8 as se, G as de, J as le, K as ce, O as me, _ as o, U as g, Q as $, R as ue, aj as xe, ae as fe, ak as ge, ai as M, al as he, Y as y, a0 as P, a$ as pe } from "./extractHeadings-BUjTmniO.js";
|
|
3
3
|
import { p as be, i as ve } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
4
|
-
var
|
|
4
|
+
var T = "position frame", D = "frame positioned", S = "position relation", N = "relation positioned", we = /* @__PURE__ */ o(function(e) {
|
|
5
5
|
g.debug("options str", e);
|
|
6
6
|
}, "setOptions"), ye = /* @__PURE__ */ o(function() {
|
|
7
7
|
return {};
|
|
@@ -24,13 +24,13 @@ function O() {
|
|
|
24
24
|
return n.frames.forEach((i, a) => {
|
|
25
25
|
const r = L(i, n.dataEntities, t);
|
|
26
26
|
e = v(e, {
|
|
27
|
-
$kind:
|
|
27
|
+
$kind: T,
|
|
28
28
|
index: a,
|
|
29
29
|
frame: i,
|
|
30
30
|
textProps: r
|
|
31
31
|
});
|
|
32
32
|
let d;
|
|
33
|
-
|
|
33
|
+
z(i) ? (g.debug("source frame", i.sourceFrames), d = n.frames.filter((l) => i.sourceFrames.some((c) => c.$refText === l.name)), d.forEach((l) => {
|
|
34
34
|
e = v(e, {
|
|
35
35
|
$kind: S,
|
|
36
36
|
index: a,
|
|
@@ -48,10 +48,10 @@ function O() {
|
|
|
48
48
|
}, e;
|
|
49
49
|
}
|
|
50
50
|
o(O, "getState");
|
|
51
|
-
function
|
|
51
|
+
function I(e) {
|
|
52
52
|
B.ast = e;
|
|
53
53
|
}
|
|
54
|
-
o(
|
|
54
|
+
o(I, "setAst");
|
|
55
55
|
var s = {
|
|
56
56
|
swimlaneMinHeight: 70,
|
|
57
57
|
swimlanePadding: 15,
|
|
@@ -86,12 +86,12 @@ var Fe = {
|
|
|
86
86
|
maxR: 0,
|
|
87
87
|
sortedSwimlanesArray: []
|
|
88
88
|
};
|
|
89
|
-
function
|
|
89
|
+
function W(e) {
|
|
90
90
|
const n = e.split(".");
|
|
91
91
|
if (n.length === 2)
|
|
92
92
|
return n[0];
|
|
93
93
|
}
|
|
94
|
-
o(
|
|
94
|
+
o(W, "extractNamespace");
|
|
95
95
|
function H(e) {
|
|
96
96
|
const n = e.split(".");
|
|
97
97
|
return n.length === 2 ? n[1] : e;
|
|
@@ -113,7 +113,7 @@ function b(e, n, t) {
|
|
|
113
113
|
}
|
|
114
114
|
o(b, "findNextAvailableIndex");
|
|
115
115
|
function _(e, n) {
|
|
116
|
-
const t =
|
|
116
|
+
const t = W(e.entityIdentifier), i = U(n, t);
|
|
117
117
|
switch (e.modelEntityType) {
|
|
118
118
|
case "ui":
|
|
119
119
|
case "pcr":
|
|
@@ -299,14 +299,14 @@ function Y(e, n) {
|
|
|
299
299
|
return h;
|
|
300
300
|
}
|
|
301
301
|
o(Y, "evolveFramePositioned");
|
|
302
|
-
function
|
|
302
|
+
function K(e, n) {
|
|
303
303
|
return e === 0 && n.sourceFrames.length === 0;
|
|
304
304
|
}
|
|
305
|
-
o(
|
|
306
|
-
function
|
|
305
|
+
o(K, "isFirstFrame");
|
|
306
|
+
function z(e) {
|
|
307
307
|
return e.sourceFrames !== void 0 && e.sourceFrames !== null && e.sourceFrames.length > 0;
|
|
308
308
|
}
|
|
309
|
-
o(
|
|
309
|
+
o(z, "hasSourceFrame");
|
|
310
310
|
function k(e, n) {
|
|
311
311
|
if (n != null)
|
|
312
312
|
return e.find((t) => t.frame.name === n.name);
|
|
@@ -323,7 +323,7 @@ function J(e, n, t) {
|
|
|
323
323
|
o(J, "findBoxByLineIndex");
|
|
324
324
|
function Q(e, n) {
|
|
325
325
|
const t = n;
|
|
326
|
-
if (ve(t.frame) ||
|
|
326
|
+
if (ve(t.frame) || K(t.index, t.frame))
|
|
327
327
|
return [];
|
|
328
328
|
const i = k(e.boxes, t.frame);
|
|
329
329
|
if (i === void 0)
|
|
@@ -338,7 +338,7 @@ function Q(e, n) {
|
|
|
338
338
|
}];
|
|
339
339
|
}
|
|
340
340
|
o(Q, "decidePositionRelation");
|
|
341
|
-
function
|
|
341
|
+
function q(e, n) {
|
|
342
342
|
const t = n, i = {
|
|
343
343
|
visual: {
|
|
344
344
|
fill: "none",
|
|
@@ -360,22 +360,22 @@ function Z(e, n) {
|
|
|
360
360
|
relations: [...e.relations, i]
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
|
-
o(
|
|
363
|
+
o(q, "evolveRelationPositioned");
|
|
364
364
|
var Me = {
|
|
365
|
-
[
|
|
365
|
+
[T]: V,
|
|
366
366
|
[S]: Q
|
|
367
367
|
}, Be = {
|
|
368
368
|
[D]: Y,
|
|
369
|
-
[N]:
|
|
369
|
+
[N]: q
|
|
370
370
|
};
|
|
371
|
-
function
|
|
371
|
+
function Z(e, n) {
|
|
372
372
|
const t = Me[n.$kind];
|
|
373
373
|
if (t == null)
|
|
374
374
|
return [];
|
|
375
375
|
const i = t(e, n);
|
|
376
376
|
return g.debug("decided events", i), i;
|
|
377
377
|
}
|
|
378
|
-
o(
|
|
378
|
+
o(Z, "decide");
|
|
379
379
|
function ee(e, n) {
|
|
380
380
|
const t = n.reduce((i, a) => {
|
|
381
381
|
const r = Be[a.$kind];
|
|
@@ -385,7 +385,7 @@ function ee(e, n) {
|
|
|
385
385
|
}
|
|
386
386
|
o(ee, "evolve");
|
|
387
387
|
function v(e, n) {
|
|
388
|
-
const t =
|
|
388
|
+
const t = Z(e, n);
|
|
389
389
|
return ee(e, t);
|
|
390
390
|
}
|
|
391
391
|
o(v, "dispatch");
|
|
@@ -400,7 +400,7 @@ var F = {
|
|
|
400
400
|
setAccDescription: de,
|
|
401
401
|
setDiagramTitle: se,
|
|
402
402
|
getDiagramTitle: oe,
|
|
403
|
-
setAst:
|
|
403
|
+
setAst: I,
|
|
404
404
|
getDiagramProps: E,
|
|
405
405
|
getState: O
|
|
406
406
|
}, Ee = {
|
|
@@ -408,7 +408,7 @@ var F = {
|
|
|
408
408
|
const n = await be("eventmodeling", e);
|
|
409
409
|
g.debug(n), F.setAst(n), re(n, F);
|
|
410
410
|
}, "parse")
|
|
411
|
-
}, Ae =
|
|
411
|
+
}, Ae = $(), Re = Ae?.eventmodeling;
|
|
412
412
|
function te(e, n) {
|
|
413
413
|
return (t) => {
|
|
414
414
|
const i = t.swimlane.y + n.swimlanePadding, a = e.append("g").attr("class", "em-box");
|
|
@@ -440,22 +440,22 @@ function ae(e, n, t, i) {
|
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
442
|
o(ae, "renderD3Swimlane");
|
|
443
|
-
var
|
|
443
|
+
var $e = /* @__PURE__ */ o(function(e, n, t, i) {
|
|
444
444
|
if (g.debug("in eventmodeling renderer", e + `
|
|
445
445
|
`, "id:", n, t), !Re)
|
|
446
446
|
throw new Error("EventModeling config not found");
|
|
447
|
-
const a = i.db, { themeVariables: r, eventmodeling: d } =
|
|
447
|
+
const a = i.db, { themeVariables: r, eventmodeling: d } = $(), l = ue(`[id="${n}"]`), c = a.getDiagramProps(), m = a.getState(), x = `em-arrowhead-${n}`, u = r.emArrowhead ?? "#000000";
|
|
448
448
|
m.sortedSwimlanesArray.forEach(
|
|
449
449
|
ae(l, m.maxR, c, r)
|
|
450
450
|
), m.boxes.forEach(te(l, c)), m.relations.forEach(ie(l, c, x, r)), l.append("defs").append("marker").attr("id", x).attr("markerWidth", "10").attr("markerHeight", "7").attr("refX", "10").attr("refY", "3.5").attr("orient", "auto").append("polygon").attr("points", "0 0, 10 3.5, 0 7").attr("fill", u), xe(void 0, l, d?.padding ?? 30, d?.useMaxWidth);
|
|
451
|
-
}, "draw"),
|
|
452
|
-
draw:
|
|
453
|
-
}, De = /* @__PURE__ */ o((e) => "", "getStyles"), Ne = De,
|
|
451
|
+
}, "draw"), Te = {
|
|
452
|
+
draw: $e
|
|
453
|
+
}, De = /* @__PURE__ */ o((e) => "", "getStyles"), Ne = De, We = {
|
|
454
454
|
parser: Ee,
|
|
455
455
|
db: F,
|
|
456
|
-
renderer:
|
|
456
|
+
renderer: Te,
|
|
457
457
|
styles: Ne
|
|
458
458
|
};
|
|
459
459
|
export {
|
|
460
|
-
|
|
460
|
+
We as diagram
|
|
461
461
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as ge } from "./chunk-JWPE2WC7-
|
|
2
|
-
import { _ as w,
|
|
3
|
-
import { s as Ne } from "./chunk-VR4S4FIN-
|
|
1
|
+
import { p as ge } from "./chunk-JWPE2WC7-05_7DU1b.js";
|
|
2
|
+
import { _ as w, ao as ye, ai as ae, ak as ee, an as Se, V as ve, U as te, bU as B, R as U, O as xe, K as be, a8 as we, a9 as Ce, J as Te, G as Le, al as $e, bV as Ae, ae as Fe } from "./extractHeadings-BUjTmniO.js";
|
|
3
|
+
import { s as Ne } from "./chunk-VR4S4FIN-DTcdZAIy.js";
|
|
4
4
|
import { p as Me } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
5
5
|
import { b as O } from "./defaultLocale-BgPVtth8.js";
|
|
6
|
-
import { o as
|
|
6
|
+
import { o as Q } from "./ordinal-B6-f3MAq.js";
|
|
7
7
|
function _e(t) {
|
|
8
8
|
var a = 0, l = t.children, n = l && l.length;
|
|
9
9
|
if (!n) a = 1;
|
|
@@ -13,13 +13,13 @@ function _e(t) {
|
|
|
13
13
|
function ke() {
|
|
14
14
|
return this.eachAfter(_e);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Ve(t, a) {
|
|
17
17
|
let l = -1;
|
|
18
18
|
for (const n of this)
|
|
19
19
|
t.call(a, n, ++l, this);
|
|
20
20
|
return this;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function ze(t, a) {
|
|
23
23
|
for (var l = this, n = [l], s, i, h = -1; l = n.pop(); )
|
|
24
24
|
if (t.call(a, l, ++h, this), s = l.children)
|
|
25
25
|
for (i = s.length - 1; i >= 0; --i)
|
|
@@ -96,40 +96,40 @@ function* qe() {
|
|
|
96
96
|
while (l.length);
|
|
97
97
|
}
|
|
98
98
|
function ne(t, a) {
|
|
99
|
-
t instanceof Map ? (t = [void 0, t], a === void 0 && (a =
|
|
100
|
-
for (var l = new
|
|
99
|
+
t instanceof Map ? (t = [void 0, t], a === void 0 && (a = je)) : a === void 0 && (a = Ye);
|
|
100
|
+
for (var l = new J(t), n, s = [l], i, h, d, g; n = s.pop(); )
|
|
101
101
|
if ((h = a(n.data)) && (g = (h = Array.from(h)).length))
|
|
102
102
|
for (n.children = h, d = g - 1; d >= 0; --d)
|
|
103
|
-
s.push(i = h[d] = new
|
|
104
|
-
return l.eachBefore(
|
|
103
|
+
s.push(i = h[d] = new J(h[d])), i.parent = n, i.depth = n.depth + 1;
|
|
104
|
+
return l.eachBefore(Je);
|
|
105
105
|
}
|
|
106
106
|
function Xe() {
|
|
107
|
-
return ne(this).eachBefore(
|
|
107
|
+
return ne(this).eachBefore(Ue);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function Ye(t) {
|
|
110
110
|
return t.children;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function je(t) {
|
|
113
113
|
return Array.isArray(t) ? t[1] : null;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Ue(t) {
|
|
116
116
|
t.data.value !== void 0 && (t.value = t.data.value), t.data = t.data.data;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function Je(t) {
|
|
119
119
|
var a = 0;
|
|
120
120
|
do
|
|
121
121
|
t.height = a;
|
|
122
122
|
while ((t = t.parent) && t.height < ++a);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function J(t) {
|
|
125
125
|
this.data = t, this.depth = this.height = 0, this.parent = null;
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
constructor:
|
|
127
|
+
J.prototype = ne.prototype = {
|
|
128
|
+
constructor: J,
|
|
129
129
|
count: ke,
|
|
130
|
-
each:
|
|
130
|
+
each: Ve,
|
|
131
131
|
eachAfter: De,
|
|
132
|
-
eachBefore:
|
|
132
|
+
eachBefore: ze,
|
|
133
133
|
find: Pe,
|
|
134
134
|
sum: Be,
|
|
135
135
|
sort: Re,
|
|
@@ -141,7 +141,7 @@ Q.prototype = ne.prototype = {
|
|
|
141
141
|
copy: Xe,
|
|
142
142
|
[Symbol.iterator]: qe
|
|
143
143
|
};
|
|
144
|
-
function
|
|
144
|
+
function Ke(t) {
|
|
145
145
|
if (typeof t != "function") throw new Error();
|
|
146
146
|
return t;
|
|
147
147
|
}
|
|
@@ -156,7 +156,7 @@ function q(t) {
|
|
|
156
156
|
function Ze(t) {
|
|
157
157
|
t.x0 = Math.round(t.x0), t.y0 = Math.round(t.y0), t.x1 = Math.round(t.x1), t.y1 = Math.round(t.y1);
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Qe(t, a, l, n, s) {
|
|
160
160
|
for (var i = t.children, h, d = -1, g = i.length, c = t.value && (n - a) / t.value; ++d < g; )
|
|
161
161
|
h = i[d], h.y0 = l, h.y1 = s, h.x0 = a, h.x1 = a += h.value * c;
|
|
162
162
|
}
|
|
@@ -166,19 +166,19 @@ function et(t, a, l, n, s) {
|
|
|
166
166
|
}
|
|
167
167
|
var tt = (1 + Math.sqrt(5)) / 2;
|
|
168
168
|
function at(t, a, l, n, s, i) {
|
|
169
|
-
for (var h = [], d = a.children, g, c, u = 0, b = 0, r = d.length, x, S, v = a.value, p, y, N, $,
|
|
169
|
+
for (var h = [], d = a.children, g, c, u = 0, b = 0, r = d.length, x, S, v = a.value, p, y, N, $, z, W, M; u < r; ) {
|
|
170
170
|
x = s - l, S = i - n;
|
|
171
171
|
do
|
|
172
172
|
p = d[b++].value;
|
|
173
173
|
while (!p && b < r);
|
|
174
|
-
for (y = N = p, W = Math.max(S / x, x / S) / (v * t), M = p * p * W,
|
|
175
|
-
if (p += c = d[b].value, c < y && (y = c), c > N && (N = c), M = p * p * W, $ = Math.max(N / M, M / y), $ >
|
|
174
|
+
for (y = N = p, W = Math.max(S / x, x / S) / (v * t), M = p * p * W, z = Math.max(N / M, M / y); b < r; ++b) {
|
|
175
|
+
if (p += c = d[b].value, c < y && (y = c), c > N && (N = c), M = p * p * W, $ = Math.max(N / M, M / y), $ > z) {
|
|
176
176
|
p -= c;
|
|
177
177
|
break;
|
|
178
178
|
}
|
|
179
|
-
|
|
179
|
+
z = $;
|
|
180
180
|
}
|
|
181
|
-
h.push(g = { value: p, dice: x < S, children: d.slice(u, b) }), g.dice ?
|
|
181
|
+
h.push(g = { value: p, dice: x < S, children: d.slice(u, b) }), g.dice ? Qe(g, l, n, s, v ? n += S * p / v : i) : et(g, l, n, v ? l += x * p / v : s, i), v -= p, u = b;
|
|
182
182
|
}
|
|
183
183
|
return h;
|
|
184
184
|
}
|
|
@@ -204,7 +204,7 @@ function lt() {
|
|
|
204
204
|
}, u.size = function(r) {
|
|
205
205
|
return arguments.length ? (l = +r[0], n = +r[1], u) : [l, n];
|
|
206
206
|
}, u.tile = function(r) {
|
|
207
|
-
return arguments.length ? (t =
|
|
207
|
+
return arguments.length ? (t = Ke(r), u) : t;
|
|
208
208
|
}, u.padding = function(r) {
|
|
209
209
|
return arguments.length ? u.paddingInner(r).paddingOuter(r) : u.paddingInner();
|
|
210
210
|
}, u.paddingInner = function(r) {
|
|
@@ -341,7 +341,7 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
341
341
|
} catch (e) {
|
|
342
342
|
te.error("Error creating format function:", e), p = O(",");
|
|
343
343
|
}
|
|
344
|
-
const y =
|
|
344
|
+
const y = Q().range([
|
|
345
345
|
"transparent",
|
|
346
346
|
c.cScale0,
|
|
347
347
|
c.cScale1,
|
|
@@ -355,7 +355,7 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
355
355
|
c.cScale9,
|
|
356
356
|
c.cScale10,
|
|
357
357
|
c.cScale11
|
|
358
|
-
]), N =
|
|
358
|
+
]), N = Q().range([
|
|
359
359
|
"transparent",
|
|
360
360
|
c.cScalePeer0,
|
|
361
361
|
c.cScalePeer1,
|
|
@@ -369,7 +369,7 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
369
369
|
c.cScalePeer9,
|
|
370
370
|
c.cScalePeer10,
|
|
371
371
|
c.cScalePeer11
|
|
372
|
-
]), $ =
|
|
372
|
+
]), $ = Q().range([
|
|
373
373
|
c.cScaleLabel0,
|
|
374
374
|
c.cScaleLabel1,
|
|
375
375
|
c.cScaleLabel2,
|
|
@@ -384,9 +384,9 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
384
384
|
c.cScaleLabel11
|
|
385
385
|
]);
|
|
386
386
|
d && b.append("text").attr("x", S / 2).attr("y", u / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(d);
|
|
387
|
-
const
|
|
387
|
+
const z = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), W = ne(g).sum((e) => e.value ?? 0).sort((e, o) => (o.value ?? 0) - (e.value ?? 0)), le = lt().size([r, x]).paddingTop(
|
|
388
388
|
(e) => e.children && e.children.length > 0 ? X + R : 0
|
|
389
|
-
).paddingInner(h).paddingLeft((e) => e.children && e.children.length > 0 ? R : 0).paddingRight((e) => e.children && e.children.length > 0 ? R : 0).paddingBottom((e) => e.children && e.children.length > 0 ? R : 0).round(!0)(W), de = le.descendants().filter((e) => e.children && e.children.length > 0), H =
|
|
389
|
+
).paddingInner(h).paddingLeft((e) => e.children && e.children.length > 0 ? R : 0).paddingRight((e) => e.children && e.children.length > 0 ? R : 0).paddingBottom((e) => e.children && e.children.length > 0 ? R : 0).round(!0)(W), de = le.descendants().filter((e) => e.children && e.children.length > 0), H = z.selectAll(".treemapSection").data(de).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
390
390
|
H.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", X).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), H.append("clipPath").attr("id", (e, o) => `clip-section-${a}-${o}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", X), H.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, o) => `treemapSection section${o}`).attr("fill", (e) => y(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => N(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
|
|
391
391
|
if (e.depth === 0)
|
|
392
392
|
return "display: none;";
|
|
@@ -400,20 +400,20 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
400
400
|
}).each(function(e) {
|
|
401
401
|
if (e.depth === 0)
|
|
402
402
|
return;
|
|
403
|
-
const o =
|
|
403
|
+
const o = U(this), f = e.data.name;
|
|
404
404
|
o.text(f);
|
|
405
405
|
const C = e.x1 - e.x0, L = 6;
|
|
406
406
|
let T;
|
|
407
407
|
i.showValues !== !1 && e.value ? T = C - 10 - 30 - 10 - L : T = C - L - 6;
|
|
408
408
|
const m = Math.max(15, T), _ = o.node();
|
|
409
409
|
if (_.getComputedTextLength() > m) {
|
|
410
|
-
let
|
|
411
|
-
for (;
|
|
412
|
-
if (
|
|
410
|
+
let V = f;
|
|
411
|
+
for (; V.length > 0; ) {
|
|
412
|
+
if (V = f.substring(0, V.length - 1), V.length === 0) {
|
|
413
413
|
o.text("..."), _.getComputedTextLength() > m && o.text("");
|
|
414
414
|
break;
|
|
415
415
|
}
|
|
416
|
-
if (o.text(
|
|
416
|
+
if (o.text(V + "..."), _.getComputedTextLength() <= m)
|
|
417
417
|
break;
|
|
418
418
|
}
|
|
419
419
|
}
|
|
@@ -423,12 +423,12 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
423
423
|
const o = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + $(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
424
424
|
return o + f.labelStyles.replace("color:", "fill:");
|
|
425
425
|
});
|
|
426
|
-
const se = le.leaves(), A = se.length > 20, ue = A ? 16 : 38,
|
|
427
|
-
|
|
426
|
+
const se = le.leaves(), A = se.length > 20, ue = A ? 16 : 38, Y = A ? 14 : 28, D = A ? 4 : 8, I = A ? 4 : 6, K = A ? 2 : 4, re = A ? 8 : 10, Z = A ? 1 : 2, j = z.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class", (e, o) => `treemapNode treemapLeafGroup leaf${o}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
427
|
+
j.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("style", (e) => B({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("stroke-width", 3), j.append("clipPath").attr("id", (e, o) => `clip-${a}-${o}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), j.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
|
|
428
428
|
const o = `text-anchor: middle; dominant-baseline: middle; font-size: ${ue}px;fill:` + $(e.data.name) + ";", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
429
429
|
return o + f.labelStyles.replace("color:", "fill:");
|
|
430
430
|
}).attr("clip-path", (e, o) => `url(#clip-${a}-${o})`).text((e) => e.data.name).each(function(e) {
|
|
431
|
-
const o =
|
|
431
|
+
const o = U(this), f = e.x1 - e.x0, C = e.y1 - e.y0, L = o.node(), T = f - 2 * K, P = C - 2 * K;
|
|
432
432
|
if (T < re || P < re) {
|
|
433
433
|
o.style("display", "none");
|
|
434
434
|
return;
|
|
@@ -439,38 +439,38 @@ var st = /* @__PURE__ */ w((t, a) => {
|
|
|
439
439
|
m--, o.style("font-size", `${m}px`);
|
|
440
440
|
let F = Math.max(
|
|
441
441
|
I,
|
|
442
|
-
Math.min(
|
|
442
|
+
Math.min(Y, Math.round(m * _))
|
|
443
443
|
), k = m + Z + F;
|
|
444
444
|
for (; k > P && m > D && (m--, F = Math.max(
|
|
445
445
|
I,
|
|
446
|
-
Math.min(
|
|
446
|
+
Math.min(Y, Math.round(m * _))
|
|
447
447
|
), !(F < I && m === D)); )
|
|
448
448
|
o.style("font-size", `${m}px`), k = m + Z + F;
|
|
449
449
|
o.style("font-size", `${m}px`), A ? (m < D || P < D) && o.style("display", "none") : (L.getComputedTextLength() > T || m < D || P < m) && o.style("display", "none");
|
|
450
|
-
}), i.showValues !== !1 &&
|
|
450
|
+
}), i.showValues !== !1 && j.append("text").attr("class", "treemapValue").attr("x", (o) => (o.x1 - o.x0) / 2).attr("y", function(o) {
|
|
451
451
|
return (o.y1 - o.y0) / 2;
|
|
452
452
|
}).attr("style", (o) => {
|
|
453
|
-
const f = `text-anchor: middle; dominant-baseline: hanging; font-size: ${
|
|
453
|
+
const f = `text-anchor: middle; dominant-baseline: hanging; font-size: ${Y}px;fill:` + $(o.data.name) + ";", C = B({ cssCompiledStyles: o.data.cssCompiledStyles });
|
|
454
454
|
return f + C.labelStyles.replace("color:", "fill:");
|
|
455
455
|
}).attr("clip-path", (o, f) => `url(#clip-${a}-${f})`).text((o) => o.value ? p(o.value) : "").each(function(o) {
|
|
456
|
-
const f =
|
|
456
|
+
const f = U(this), C = this.parentNode;
|
|
457
457
|
if (!C) {
|
|
458
458
|
f.style("display", "none");
|
|
459
459
|
return;
|
|
460
460
|
}
|
|
461
|
-
const L =
|
|
461
|
+
const L = U(C).select(".treemapLabel");
|
|
462
462
|
if (L.empty() || L.style("display") === "none") {
|
|
463
463
|
f.style("display", "none");
|
|
464
464
|
return;
|
|
465
465
|
}
|
|
466
466
|
const T = parseFloat(L.style("font-size")), m = Math.max(
|
|
467
467
|
I,
|
|
468
|
-
Math.min(
|
|
468
|
+
Math.min(Y, Math.round(T * 0.6))
|
|
469
469
|
);
|
|
470
470
|
f.style("font-size", `${m}px`);
|
|
471
471
|
const F = (o.y1 - o.y0) / 2 + T / 2 + Z;
|
|
472
472
|
f.attr("y", F);
|
|
473
|
-
const k = o.x1 - o.x0, ie = o.y1 - o.y0 - 4, me = k - 2 *
|
|
473
|
+
const k = o.x1 - o.x0, ie = o.y1 - o.y0 - 4, me = k - 2 * K;
|
|
474
474
|
f.node().getComputedTextLength() > me || F + m > ie || m < I ? f.style("display", "none") : f.style("display", null);
|
|
475
475
|
});
|
|
476
476
|
const pe = i.diagramPadding ?? 8;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./chunk-JWPE2WC7-BhnZoEDO.cjs"),h=require("./extractHeadings-agc-00bD.cjs"),ue=require("./chunk-VR4S4FIN-C67CWetO.cjs"),pe=require("./cynefin-VYW2F7L2-MpAliYy9.cjs"),I=require("./defaultLocale-C4wbwF1n.cjs"),Z=require("./ordinal-CagbB1m8.cjs");function fe(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function ge(){return this.eachAfter(fe)}function me(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function ye(t,a){for(var l=this,n=[l],r,i,d=-1;l=n.pop();)if(t.call(a,l,++d,this),r=l.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function Se(t,a){for(var l=this,n=[l],r=[],i,d,u,y=-1;l=n.pop();)if(r.push(l),i=l.children)for(d=0,u=i.length;d<u;++d)n.push(i[d]);for(;l=r.pop();)t.call(a,l,++y,this);return this}function ve(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function xe(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function be(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function we(t){for(var a=this,l=Ce(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function Ce(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function Te(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function _e(){return Array.from(this)}function Le(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function $e(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Ae(){var t=this,a,l=[t],n,r,i;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)l.push(n[r]);while(l.length)}function K(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ne)):a===void 0&&(a=Me);for(var l=new j(t),n,r=[l],i,d,u,y;n=r.pop();)if((d=a(n.data))&&(y=(d=Array.from(d)).length))for(n.children=d,u=y-1;u>=0;--u)r.push(i=d[u]=new j(d[u])),i.parent=n,i.depth=n.depth+1;return l.eachBefore(Ve)}function Fe(){return K(this).eachBefore(ke)}function Me(t){return t.children}function Ne(t){return Array.isArray(t)?t[1]:null}function ke(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ve(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function j(t){this.data=t,this.depth=this.height=0,this.parent=null}j.prototype=K.prototype={constructor:j,count:ge,each:me,eachAfter:Se,eachBefore:ye,find:ve,sum:xe,sort:be,path:we,ancestors:Te,descendants:_e,leaves:Le,links:$e,copy:Fe,[Symbol.iterator]:Ae};function ze(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function O(t){return function(){return t}}function Pe(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function De(t,a,l,n,r){for(var i=t.children,d,u=-1,y=i.length,c=t.value&&(n-a)/t.value;++u<y;)d=i[u],d.y0=l,d.y1=r,d.x0=a,d.x1=a+=d.value*c}function Be(t,a,l,n,r){for(var i=t.children,d,u=-1,y=i.length,c=t.value&&(r-l)/t.value;++u<y;)d=i[u],d.x0=a,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var We=(1+Math.sqrt(5))/2;function Ee(t,a,l,n,r,i){for(var d=[],u=a.children,y,c,p=0,w=0,s=u.length,b,v,x=a.value,f,S,F,L,z,E,M;p<s;){b=r-l,v=i-n;do f=u[w++].value;while(!f&&w<s);for(S=F=f,E=Math.max(v/b,b/v)/(x*t),M=f*f*E,z=Math.max(F/M,M/S);w<s;++w){if(f+=c=u[w].value,c<S&&(S=c),c>F&&(F=c),M=f*f*E,L=Math.max(F/M,M/S),L>z){f-=c;break}z=L}d.push(y={value:f,dice:b<v,children:u.slice(p,w)}),y.dice?De(y,l,n,r,x?n+=v*f/x:i):Be(y,l,n,x?l+=b*f/x:r,i),x-=f,p=w}return d}const Re=(function t(a){function l(n,r,i,d,u){Ee(a,n,r,i,d,u)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(We);function He(){var t=Re,a=!1,l=1,n=1,r=[0],i=q,d=q,u=q,y=q,c=q;function p(s){return s.x0=s.y0=0,s.x1=l,s.y1=n,s.eachBefore(w),r=[0],a&&s.eachBefore(Pe),s}function w(s){var b=r[s.depth],v=s.x0+b,x=s.y0+b,f=s.x1-b,S=s.y1-b;f<v&&(v=f=(v+f)/2),S<x&&(x=S=(x+S)/2),s.x0=v,s.y0=x,s.x1=f,s.y1=S,s.children&&(b=r[s.depth+1]=i(s)/2,v+=c(s)-b,x+=d(s)-b,f-=u(s)-b,S-=y(s)-b,f<v&&(v=f=(v+f)/2),S<x&&(x=S=(x+S)/2),t(s,v,x,f,S))}return p.round=function(s){return arguments.length?(a=!!s,p):a},p.size=function(s){return arguments.length?(l=+s[0],n=+s[1],p):[l,n]},p.tile=function(s){return arguments.length?(t=ze(s),p):t},p.padding=function(s){return arguments.length?p.paddingInner(s).paddingOuter(s):p.paddingInner()},p.paddingInner=function(s){return arguments.length?(i=typeof s=="function"?s:O(+s),p):i},p.paddingOuter=function(s){return arguments.length?p.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s):p.paddingTop()},p.paddingTop=function(s){return arguments.length?(d=typeof s=="function"?s:O(+s),p):d},p.paddingRight=function(s){return arguments.length?(u=typeof s=="function"?s:O(+s),p):u},p.paddingBottom=function(s){return arguments.length?(y=typeof s=="function"?s:O(+s),p):y},p.paddingLeft=function(s){return arguments.length?(c=typeof s=="function"?s:O(+s),p):c},p}var W,ne=(W=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=h.setAccTitle,this.getAccTitle=h.getAccTitle,this.setDiagramTitle=h.setDiagramTitle,this.getDiagramTitle=h.getDiagramTitle,this.getAccDescription=h.getAccDescription,this.setAccDescription=h.setAccDescription}getNodes(){return this.nodes}getConfig(){const a=h.defaultConfig_default,l=h.getConfig();return h.cleanAndMerge({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},r=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(i=>{h.isLabelStyle(i)&&(n?.textStyles?n.textStyles.push(i):n.textStyles=[i]),n?.styles?n.styles.push(i):n.styles=[i]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){h.clear(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},h.__name(W,"TreeMapDB"),W);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n?.classSelector,n?.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const i=l[l.length-1].node;i.children?i.children.push(r):i.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}h.__name(le,"buildHierarchy");var Ie=h.__name((t,a)=>{he.populateCommonDb(t,a);const l=[];for(const i of t.TreemapRows??[])i.$type==="ClassDefStatement"&&a.addClass(i.className??"",i.styleText??"");for(const i of t.TreemapRows??[]){const d=i.item;if(!d)continue;const u=i.indent?parseInt(i.indent):0,y=qe(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],p=c.length>0?c:void 0,w={level:u,name:y,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:p};l.push(w)}const n=le(l),r=h.__name((i,d)=>{for(const u of i)a.addNode(u,d),u.children&&u.children.length>0&&r(u.children,d+1)},"addNodesRecursively");r(n,0)},"populate"),qe=h.__name(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:h.__name(async t=>{try{const a=pe.parse,l=await a("treemap",t);h.log.debug("Treemap AST:",l);const n=re.parser?.yy;if(!(n instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ie(l,n)}catch(a){throw h.log.error("Error parsing treemap:",a),a}},"parse")},Oe=10,B=10,G=25,Ge=h.__name((t,a,l,n)=>{const r=n.db,i=r.getConfig(),d=i.padding??Oe,u=r.getDiagramTitle(),y=r.getRoot(),{themeVariables:c}=h.getConfig();if(!y)return;const p=u?30:0,w=h.selectSvgElement(a),s=i.nodeWidth?i.nodeWidth*B:960,b=i.nodeHeight?i.nodeHeight*B:500,v=s,x=b+p;w.attr("viewBox",`0 0 ${v} ${x}`),h.configureSvgSize(w,x,v,i.useMaxWidth);let f;try{const e=i.valueFormat||",";if(e==="$0,0")f=h.__name(o=>"$"+I.format(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),g=o?o[0]:"";f=h.__name(C=>"$"+I.format(","+g)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);f=h.__name(g=>"$"+I.format(o||"")(g),"valueFormat")}else f=I.format(e)}catch(e){h.log.error("Error creating format function:",e),f=I.format(",")}const S=Z.ordinal().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),F=Z.ordinal().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),L=Z.ordinal().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);u&&w.append("text").attr("x",v/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(u);const z=w.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=K(y).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),Q=He().size([s,b]).paddingTop(e=>e.children&&e.children.length>0?G+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(E),se=Q.descendants().filter(e=>e.children&&e.children.length>0),R=z.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);R.append("rect").attr("width",e=>e.x1-e.x0).attr("height",G).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),R.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",G),R.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>S(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>F(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),R.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",G/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,o)=>`url(#clip-section-${a}-${o})`).attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+L(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o+g.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=h.select(this),g=e.data.name;o.text(g);const C=e.x1-e.x0,_=6;let T;i.showValues!==!1&&e.value?T=C-10-30-10-_:T=C-_-6;const m=Math.max(15,T),N=o.node();if(N.getComputedTextLength()>m){let V=g;for(;V.length>0;){if(V=g.substring(0,V.length-1),V.length===0){o.text("..."),N.getComputedTextLength()>m&&o.text("");break}if(o.text(V+"..."),N.getComputedTextLength()<=m)break}}}),i.showValues!==!1&&R.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",G/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?f(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+L(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o+g.labelStyles.replace("color:","fill:")});const ee=Q.leaves(),$=ee.length>20,ie=$?16:38,X=$?14:28,P=$?4:8,H=$?4:6,J=$?2:4,te=$?8:10,U=$?1:2,Y=z.selectAll(".treemapLeafGroup").data(ee).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);Y.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?S(e.parent.data.name):S(e.data.name)).attr("style",e=>h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?S(e.parent.data.name):S(e.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o=`text-anchor: middle; dominant-baseline: middle; font-size: ${ie}px;fill:`+L(e.data.name)+";",g=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o+g.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=h.select(this),g=e.x1-e.x0,C=e.y1-e.y0,_=o.node(),T=g-2*J,D=C-2*J;if(T<te||D<te){o.style("display","none");return}let m=parseInt(o.style("font-size"),10);const N=.6;for(;_.getComputedTextLength()>T&&m>P;)m--,o.style("font-size",`${m}px`);let A=Math.max(H,Math.min(X,Math.round(m*N))),k=m+U+A;for(;k>D&&m>P&&(m--,A=Math.max(H,Math.min(X,Math.round(m*N))),!(A<H&&m===P));)o.style("font-size",`${m}px`),k=m+U+A;o.style("font-size",`${m}px`),$?(m<P||D<P)&&o.style("display","none"):(_.getComputedTextLength()>T||m<P||D<m)&&o.style("display","none")}),i.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const g=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+L(o.data.name)+";",C=h.styles2String({cssCompiledStyles:o.data.cssCompiledStyles});return g+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,g)=>`url(#clip-${a}-${g})`).text(o=>o.value?f(o.value):"").each(function(o){const g=h.select(this),C=this.parentNode;if(!C){g.style("display","none");return}const _=h.select(C).select(".treemapLabel");if(_.empty()||_.style("display")==="none"){g.style("display","none");return}const T=parseFloat(_.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));g.style("font-size",`${m}px`);const A=(o.y1-o.y0)/2+T/2+U;g.attr("y",A);const k=o.x1-o.x0,ae=o.y1-o.y0-4,de=k-2*J;g.node().getComputedTextLength()>de||A+m>ae||m<H?g.style("display","none"):g.style("display",null)});const oe=i.diagramPadding??8;ue.setupViewPortForSVG(w,oe,"flowchart",i?.useMaxWidth||!1)},"draw"),Xe=h.__name(function(t,a){return a.db.getClasses()},"getClasses"),Ye={draw:Ge,getClasses:Xe},je={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Je=h.__name(({treemap:t}={})=>{const a=h.getThemeVariables3(),l=h.getConfig(),n=h.cleanAndMerge(a,l.themeVariables),r=h.cleanAndMerge(je,t),i=r.titleColor??n.titleColor,d=r.labelColor??n.textColor,u=r.valueColor??n.textColor;return`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./chunk-JWPE2WC7-CF8PY84Z.cjs"),h=require("./extractHeadings-Dkf-aqDu.cjs"),ue=require("./chunk-VR4S4FIN-DjgjZOol.cjs"),pe=require("./cynefin-VYW2F7L2-MpAliYy9.cjs"),I=require("./defaultLocale-C4wbwF1n.cjs"),Z=require("./ordinal-CagbB1m8.cjs");function fe(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function ge(){return this.eachAfter(fe)}function me(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function ye(t,a){for(var l=this,n=[l],r,i,d=-1;l=n.pop();)if(t.call(a,l,++d,this),r=l.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function Se(t,a){for(var l=this,n=[l],r=[],i,d,u,y=-1;l=n.pop();)if(r.push(l),i=l.children)for(d=0,u=i.length;d<u;++d)n.push(i[d]);for(;l=r.pop();)t.call(a,l,++y,this);return this}function ve(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function xe(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function be(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function we(t){for(var a=this,l=Ce(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function Ce(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function Te(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function _e(){return Array.from(this)}function Le(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function $e(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Ae(){var t=this,a,l=[t],n,r,i;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)l.push(n[r]);while(l.length)}function K(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ne)):a===void 0&&(a=Me);for(var l=new j(t),n,r=[l],i,d,u,y;n=r.pop();)if((d=a(n.data))&&(y=(d=Array.from(d)).length))for(n.children=d,u=y-1;u>=0;--u)r.push(i=d[u]=new j(d[u])),i.parent=n,i.depth=n.depth+1;return l.eachBefore(Ve)}function Fe(){return K(this).eachBefore(ke)}function Me(t){return t.children}function Ne(t){return Array.isArray(t)?t[1]:null}function ke(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ve(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function j(t){this.data=t,this.depth=this.height=0,this.parent=null}j.prototype=K.prototype={constructor:j,count:ge,each:me,eachAfter:Se,eachBefore:ye,find:ve,sum:xe,sort:be,path:we,ancestors:Te,descendants:_e,leaves:Le,links:$e,copy:Fe,[Symbol.iterator]:Ae};function ze(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function O(t){return function(){return t}}function Pe(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function De(t,a,l,n,r){for(var i=t.children,d,u=-1,y=i.length,c=t.value&&(n-a)/t.value;++u<y;)d=i[u],d.y0=l,d.y1=r,d.x0=a,d.x1=a+=d.value*c}function Be(t,a,l,n,r){for(var i=t.children,d,u=-1,y=i.length,c=t.value&&(r-l)/t.value;++u<y;)d=i[u],d.x0=a,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var We=(1+Math.sqrt(5))/2;function Ee(t,a,l,n,r,i){for(var d=[],u=a.children,y,c,p=0,w=0,s=u.length,b,v,x=a.value,f,S,F,L,z,E,M;p<s;){b=r-l,v=i-n;do f=u[w++].value;while(!f&&w<s);for(S=F=f,E=Math.max(v/b,b/v)/(x*t),M=f*f*E,z=Math.max(F/M,M/S);w<s;++w){if(f+=c=u[w].value,c<S&&(S=c),c>F&&(F=c),M=f*f*E,L=Math.max(F/M,M/S),L>z){f-=c;break}z=L}d.push(y={value:f,dice:b<v,children:u.slice(p,w)}),y.dice?De(y,l,n,r,x?n+=v*f/x:i):Be(y,l,n,x?l+=b*f/x:r,i),x-=f,p=w}return d}const Re=(function t(a){function l(n,r,i,d,u){Ee(a,n,r,i,d,u)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(We);function He(){var t=Re,a=!1,l=1,n=1,r=[0],i=q,d=q,u=q,y=q,c=q;function p(s){return s.x0=s.y0=0,s.x1=l,s.y1=n,s.eachBefore(w),r=[0],a&&s.eachBefore(Pe),s}function w(s){var b=r[s.depth],v=s.x0+b,x=s.y0+b,f=s.x1-b,S=s.y1-b;f<v&&(v=f=(v+f)/2),S<x&&(x=S=(x+S)/2),s.x0=v,s.y0=x,s.x1=f,s.y1=S,s.children&&(b=r[s.depth+1]=i(s)/2,v+=c(s)-b,x+=d(s)-b,f-=u(s)-b,S-=y(s)-b,f<v&&(v=f=(v+f)/2),S<x&&(x=S=(x+S)/2),t(s,v,x,f,S))}return p.round=function(s){return arguments.length?(a=!!s,p):a},p.size=function(s){return arguments.length?(l=+s[0],n=+s[1],p):[l,n]},p.tile=function(s){return arguments.length?(t=ze(s),p):t},p.padding=function(s){return arguments.length?p.paddingInner(s).paddingOuter(s):p.paddingInner()},p.paddingInner=function(s){return arguments.length?(i=typeof s=="function"?s:O(+s),p):i},p.paddingOuter=function(s){return arguments.length?p.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s):p.paddingTop()},p.paddingTop=function(s){return arguments.length?(d=typeof s=="function"?s:O(+s),p):d},p.paddingRight=function(s){return arguments.length?(u=typeof s=="function"?s:O(+s),p):u},p.paddingBottom=function(s){return arguments.length?(y=typeof s=="function"?s:O(+s),p):y},p.paddingLeft=function(s){return arguments.length?(c=typeof s=="function"?s:O(+s),p):c},p}var W,ne=(W=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=h.setAccTitle,this.getAccTitle=h.getAccTitle,this.setDiagramTitle=h.setDiagramTitle,this.getDiagramTitle=h.getDiagramTitle,this.getAccDescription=h.getAccDescription,this.setAccDescription=h.setAccDescription}getNodes(){return this.nodes}getConfig(){const a=h.defaultConfig_default,l=h.getConfig();return h.cleanAndMerge({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},r=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(i=>{h.isLabelStyle(i)&&(n?.textStyles?n.textStyles.push(i):n.textStyles=[i]),n?.styles?n.styles.push(i):n.styles=[i]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){h.clear(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},h.__name(W,"TreeMapDB"),W);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n?.classSelector,n?.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const i=l[l.length-1].node;i.children?i.children.push(r):i.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}h.__name(le,"buildHierarchy");var Ie=h.__name((t,a)=>{he.populateCommonDb(t,a);const l=[];for(const i of t.TreemapRows??[])i.$type==="ClassDefStatement"&&a.addClass(i.className??"",i.styleText??"");for(const i of t.TreemapRows??[]){const d=i.item;if(!d)continue;const u=i.indent?parseInt(i.indent):0,y=qe(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],p=c.length>0?c:void 0,w={level:u,name:y,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:p};l.push(w)}const n=le(l),r=h.__name((i,d)=>{for(const u of i)a.addNode(u,d),u.children&&u.children.length>0&&r(u.children,d+1)},"addNodesRecursively");r(n,0)},"populate"),qe=h.__name(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:h.__name(async t=>{try{const a=pe.parse,l=await a("treemap",t);h.log.debug("Treemap AST:",l);const n=re.parser?.yy;if(!(n instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ie(l,n)}catch(a){throw h.log.error("Error parsing treemap:",a),a}},"parse")},Oe=10,B=10,G=25,Ge=h.__name((t,a,l,n)=>{const r=n.db,i=r.getConfig(),d=i.padding??Oe,u=r.getDiagramTitle(),y=r.getRoot(),{themeVariables:c}=h.getConfig();if(!y)return;const p=u?30:0,w=h.selectSvgElement(a),s=i.nodeWidth?i.nodeWidth*B:960,b=i.nodeHeight?i.nodeHeight*B:500,v=s,x=b+p;w.attr("viewBox",`0 0 ${v} ${x}`),h.configureSvgSize(w,x,v,i.useMaxWidth);let f;try{const e=i.valueFormat||",";if(e==="$0,0")f=h.__name(o=>"$"+I.format(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),g=o?o[0]:"";f=h.__name(C=>"$"+I.format(","+g)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);f=h.__name(g=>"$"+I.format(o||"")(g),"valueFormat")}else f=I.format(e)}catch(e){h.log.error("Error creating format function:",e),f=I.format(",")}const S=Z.ordinal().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),F=Z.ordinal().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),L=Z.ordinal().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);u&&w.append("text").attr("x",v/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(u);const z=w.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=K(y).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),Q=He().size([s,b]).paddingTop(e=>e.children&&e.children.length>0?G+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(E),se=Q.descendants().filter(e=>e.children&&e.children.length>0),R=z.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);R.append("rect").attr("width",e=>e.x1-e.x0).attr("height",G).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),R.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",G),R.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>S(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>F(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),R.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",G/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,o)=>`url(#clip-section-${a}-${o})`).attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+L(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o+g.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=h.select(this),g=e.data.name;o.text(g);const C=e.x1-e.x0,_=6;let T;i.showValues!==!1&&e.value?T=C-10-30-10-_:T=C-_-6;const m=Math.max(15,T),N=o.node();if(N.getComputedTextLength()>m){let V=g;for(;V.length>0;){if(V=g.substring(0,V.length-1),V.length===0){o.text("..."),N.getComputedTextLength()>m&&o.text("");break}if(o.text(V+"..."),N.getComputedTextLength()<=m)break}}}),i.showValues!==!1&&R.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",G/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?f(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+L(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o+g.labelStyles.replace("color:","fill:")});const ee=Q.leaves(),$=ee.length>20,ie=$?16:38,X=$?14:28,P=$?4:8,H=$?4:6,J=$?2:4,te=$?8:10,U=$?1:2,Y=z.selectAll(".treemapLeafGroup").data(ee).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);Y.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?S(e.parent.data.name):S(e.data.name)).attr("style",e=>h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?S(e.parent.data.name):S(e.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o=`text-anchor: middle; dominant-baseline: middle; font-size: ${ie}px;fill:`+L(e.data.name)+";",g=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o+g.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=h.select(this),g=e.x1-e.x0,C=e.y1-e.y0,_=o.node(),T=g-2*J,D=C-2*J;if(T<te||D<te){o.style("display","none");return}let m=parseInt(o.style("font-size"),10);const N=.6;for(;_.getComputedTextLength()>T&&m>P;)m--,o.style("font-size",`${m}px`);let A=Math.max(H,Math.min(X,Math.round(m*N))),k=m+U+A;for(;k>D&&m>P&&(m--,A=Math.max(H,Math.min(X,Math.round(m*N))),!(A<H&&m===P));)o.style("font-size",`${m}px`),k=m+U+A;o.style("font-size",`${m}px`),$?(m<P||D<P)&&o.style("display","none"):(_.getComputedTextLength()>T||m<P||D<m)&&o.style("display","none")}),i.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const g=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+L(o.data.name)+";",C=h.styles2String({cssCompiledStyles:o.data.cssCompiledStyles});return g+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,g)=>`url(#clip-${a}-${g})`).text(o=>o.value?f(o.value):"").each(function(o){const g=h.select(this),C=this.parentNode;if(!C){g.style("display","none");return}const _=h.select(C).select(".treemapLabel");if(_.empty()||_.style("display")==="none"){g.style("display","none");return}const T=parseFloat(_.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));g.style("font-size",`${m}px`);const A=(o.y1-o.y0)/2+T/2+U;g.attr("y",A);const k=o.x1-o.x0,ae=o.y1-o.y0-4,de=k-2*J;g.node().getComputedTextLength()>de||A+m>ae||m<H?g.style("display","none"):g.style("display",null)});const oe=i.diagramPadding??8;ue.setupViewPortForSVG(w,oe,"flowchart",i?.useMaxWidth||!1)},"draw"),Xe=h.__name(function(t,a){return a.db.getClasses()},"getClasses"),Ye={draw:Ge,getClasses:Xe},je={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Je=h.__name(({treemap:t}={})=>{const a=h.getThemeVariables3(),l=h.getConfig(),n=h.cleanAndMerge(a,l.themeVariables),r=h.cleanAndMerge(je,t),i=r.titleColor??n.titleColor,d=r.labelColor??n.textColor,u=r.valueColor??n.textColor;return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${r.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${r.sectionStrokeWidth};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./chunk-JWPE2WC7-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./chunk-JWPE2WC7-CF8PY84Z.cjs"),a=require("./extractHeadings-Dkf-aqDu.cjs"),$=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var B=a.defaultConfig_default.packet,b,m=(b=class{constructor(){this.packet=[],this.setAccTitle=a.setAccTitle,this.getAccTitle=a.getAccTitle,this.setDiagramTitle=a.setDiagramTitle,this.getDiagramTitle=a.getDiagramTitle,this.getAccDescription=a.getAccDescription,this.setAccDescription=a.setAccDescription}getConfig(){const t=a.cleanAndMerge({...B,...a.getConfig().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){a.clear(),this.packet=[]}},a.__name(b,"PacketDB"),b),C=1e4,S=a.__name((e,t)=>{x.populateCommonDb(e,t);let o=-1,i=[],l=1;const{bitsPerRow:c}=t.getConfig();for(let{start:r,end:s,bits:p,label:d}of e.blocks){if(r!==void 0&&s!==void 0&&s<r)throw new Error(`Packet block ${r} - ${s} is invalid. End must be greater than start.`);if(r??=o+1,r!==o+1)throw new Error(`Packet block ${r} - ${s??r} is not contiguous. It should start from ${o+1}.`);if(p===0)throw new Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(s??=r+(p??1)-1,p??=s-r+1,o=s,a.log.debug(`Packet block ${r} - ${o} with label ${d}`);i.length<=c+1&&t.getPacket().length<C;){const[g,n]=_({start:r,end:s,bits:p,label:d},l,c);if(i.push(g),g.end+1===l*c&&(t.pushWord(i),i=[],l++),!n)break;({start:r,end:s,bits:p,label:d}=n)}}t.pushWord(i)},"populate"),_=a.__name((e,t,o)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*o)return[e,void 0];const i=t*o-1,l=t*o;return[{start:e.start,end:i,label:e.label,bits:i-e.start},{start:l,end:e.end,label:e.label,bits:e.end-l}]},"getNextFittingBlock"),w={parser:{yy:void 0},parse:a.__name(async e=>{const t=await $.parse("packet",e),o=w.parser?.yy;if(!(o instanceof m))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");a.log.debug(t),S(t,o)},"parse")},P=a.__name((e,t,o,i)=>{const l=i.db,c=l.getConfig(),{rowHeight:r,paddingY:s,bitWidth:p,bitsPerRow:d}=c,g=l.getPacket(),n=l.getDiagramTitle(),k=r+s,h=k*(g.length+1)-(n?0:r),f=p*d+2,u=a.selectSvgElement(t);u.attr("viewBox",`0 0 ${f} ${h}`),a.configureSvgSize(u,h,f,c.useMaxWidth);for(const[v,y]of g.entries())T(u,y,v,c);u.append("text").text(n).attr("x",f/2).attr("y",h-k/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),T=a.__name((e,t,o,{rowHeight:i,paddingX:l,paddingY:c,bitWidth:r,bitsPerRow:s,showBits:p})=>{const d=e.append("g"),g=o*(i+c)+c;for(const n of t){const k=n.start%s*r+1,h=(n.end-n.start+1)*r-l;if(d.append("rect").attr("x",k).attr("y",g).attr("width",h).attr("height",i).attr("class","packetBlock"),d.append("text").attr("x",k+h/2).attr("y",g+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(n.label),!p)continue;const f=n.end===n.start,u=g-2;d.append("text").attr("x",k+(f?h/2:0)).attr("y",u).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",f?"middle":"start").text(n.start),f||d.append("text").attr("x",k+h).attr("y",u).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(n.end)}},"drawWord"),D={draw:P},E={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},F=a.__name(({packet:e}={})=>{const t=a.cleanAndMerge(E,e);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${t.byteFontSize};
|
|
4
4
|
}
|