@marimo-team/islands 0.14.11-dev39 → 0.14.11-dev4
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/{ConnectedDataExplorerComponent-Sd9Nxepm.js → ConnectedDataExplorerComponent-B3jU38aR.js} +4 -4
- package/dist/{ImageComparisonComponent-5Y_UPK-4.js → ImageComparisonComponent-CUfFulP7.js} +1 -1
- package/dist/{VegaLite-xEnU6x-s.js → VegaLite-CT_m2Gns.js} +7180 -6961
- package/dist/{_baseUniq-hectrKF-.js → _baseUniq-DVXzAxqW.js} +36 -36
- package/dist/{any-language-editor-CFSQwvzE.js → any-language-editor-Bm5ppbnQ.js} +1 -1
- package/dist/{architectureDiagram-NQ2NVSRB-CCXJjFvh.js → architectureDiagram-IEHRJDOE-Buq1PEDd.js} +894 -897
- package/dist/assets/{worker-Bfk1FrzG.js → save-worker-BIDtxCd1.js} +1724 -1604
- package/dist/assets/{save-worker-fI5ofStJ.js → worker-BcyuOSTi.js} +1649 -1076
- package/dist/assets/worker-Dz6PPEGc.js +4115 -0
- package/dist/{blockDiagram-PHRCVELO-BjyOlQ-1.js → blockDiagram-JOT3LUYC-Baj8O4gb.js} +522 -534
- package/dist/{c4Diagram-6F6E4RAY-Dekfu0nv.js → c4Diagram-VJAJSXHY-CBDfWUzS.js} +4 -4
- package/dist/{channel-3ZP1Ahsx.js → channel-Cy0SmgpI.js} +1 -1
- package/dist/{chunk-353BL4L5-DAFgStCL.js → chunk-4BMEZGHF-BnpEqs6S.js} +1 -1
- package/dist/{chunk-QEP2MXWD-B3Qy_0QF.js → chunk-A2AXSNBT-i8l7moUJ.js} +27 -30
- package/dist/chunk-AEK57VVT-BxuW_6WB.js +1416 -0
- package/dist/{chunk-67H74DCK-DZpdsEFc.js → chunk-D6G4REZN-DwIklRV0.js} +1 -1
- package/dist/chunk-RZ5BOZE2-CNoeotZt.js +24 -0
- package/dist/{chunk-AACKK3MU-B95hL8py.js → chunk-XZIHB7SX-Cr4T9caJ.js} +1 -1
- package/dist/{classDiagram-v2-O24JOBDK-CRnOnb_r.js → classDiagram-GIVACNV2-CbFkMOFI.js} +2 -2
- package/dist/{classDiagram-BGRH5UQR-CRnOnb_r.js → classDiagram-v2-COTLJTTW-CbFkMOFI.js} +2 -2
- package/dist/{clone-CFt3Dbsx.js → clone-BeXSGgDB.js} +1 -1
- package/dist/{dagre-FFZHY6LT-BCZYCsTf.js → dagre-OKDRZEBW-Bo2roBvL.js} +8 -8
- package/dist/{data-editor-DJm7TwNK.js → data-editor-Dnm_K2_c.js} +201 -213
- package/dist/{diagram-ZTM2IBQH-CZn2HwdK.js → diagram-SSKATNLV-6e7ZOneB.js} +3 -3
- package/dist/diagram-VNBRO52H-VcG5htt_.js +126 -0
- package/dist/{erDiagram-R3QVA2FD-CgONUTHE.js → erDiagram-Q7BY3M3F-DObb1KYA.js} +5 -6
- package/dist/{flowDiagram-PKI6S5ZS-Dk7_9UWG.js → flowDiagram-4HSFHLVR-BAvIkIMr.js} +278 -283
- package/dist/{ganttDiagram-EK5VF46D-CRpVp1Tv.js → ganttDiagram-APWFNJXF-BUabt1F7.js} +439 -453
- package/dist/{gitGraphDiagram-GW3U2K7C-C62qVSS0.js → gitGraphDiagram-7IBYFJ6S-Bs-H6FAX.js} +35 -35
- package/dist/{graph-Bmg6ThvY.js → graph-B7tbSSJp.js} +3 -3
- package/dist/{index-DjyV3XsQ.js → index-CiG5v3ld.js} +3 -3
- package/dist/{index-CpMCQprO.js → index-DI-1MlWW.js} +1 -1
- package/dist/{index-DOW7j8QD.js → index-DpepA-b-.js} +3 -6
- package/dist/{index-BmXq13zt.js → index-phTQQwAJ.js} +4 -4
- package/dist/{infoDiagram-RLU2ROGC-BxV_L_v4.js → infoDiagram-PH2N3AL5-7fwphtgP.js} +3 -5
- package/dist/journeyDiagram-U35MCT3I-C4s4ilvs.js +809 -0
- package/dist/{kanban-definition-ILFWEQ3N-Czy4NHmp.js → kanban-definition-NDS4AKOZ-DcxIaLdv.js} +39 -41
- package/dist/{layout-oDYqqouw.js → layout-v4OeDCTb.js} +49 -49
- package/dist/{linear-B2w8crqt.js → linear-xHimOevt.js} +22 -22
- package/dist/{main-WBPEOYUW.js → main-C7CuKeJY.js} +47637 -47530
- package/dist/main.js +1 -1
- package/dist/{mermaid-BrDUrAOA.js → mermaid-C9S7GU2b.js} +4855 -4927
- package/dist/min-BT9mkTQN.js +80 -0
- package/dist/{mindmap-definition-CZNETY7S-DwnN0Xtd.js → mindmap-definition-ALO5MXBD-CVFEcHZK.js} +3 -3
- package/dist/{pieDiagram-NIOCPIFQ-C6DftsTF.js → pieDiagram-IB7DONF6-Co1Ma8jK.js} +3 -3
- package/dist/{quadrantDiagram-2OG54O6I-D_F4-y3O.js → quadrantDiagram-7GDLP6J5-DQlP2K2y.js} +2 -2
- package/dist/{treemap-FKARHQ26-BdRtb6Jl.js → radar-MK3ICKWK-BhkTFShi.js} +2330 -2469
- package/dist/{react-plotly-DyGjmGkP.js → react-plotly-Bh6GaXqm.js} +1 -1
- package/dist/{requirementDiagram-SO3GGRV7-B0B6nUaZ.js → requirementDiagram-KVF5MWMF-BygiWyL4.js} +4 -5
- package/dist/{sankeyDiagram-4UZDY2LN-Dc9a_ZCf.js → sankeyDiagram-QLVOVGJD-Ch4TJi_X.js} +11 -11
- package/dist/{sequenceDiagram-ZIKVLSP4-CK0IGm4R.js → sequenceDiagram-X6HHIX6F-DuQdesWk.js} +149 -151
- package/dist/{slides-component-Dnp9jsH4.js → slides-component-BA1GLkbQ.js} +962 -969
- package/dist/stateDiagram-DGXRK772-CG6dTG8s.js +271 -0
- package/dist/{stateDiagram-v2-GD6S3NHB-z7eMLBFB.js → stateDiagram-v2-YXO3MK2T-ChBhvPue.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{time-CsAbaoLW.js → time-BImtLwbp.js} +2 -2
- package/dist/{timeline-definition-RI47OAVP-BClUsJ6N.js → timeline-definition-BDJGKUSR-DDxqWt73.js} +102 -99
- package/dist/{vega-component-B4kFG0mV.js → vega-component-ClHul7Ph.js} +21 -21
- package/dist/{xychartDiagram-H2YORKM3-DKa9A91j.js → xychartDiagram-VJFVF3MP-DsuROm2x.js} +375 -409
- package/package.json +42 -42
- package/dist/assets/worker-BldghCZh.js +0 -3752
- package/dist/chunk-6OLS64BW-Brmt-SZS.js +0 -1383
- package/dist/chunk-BFAMUDN2-BT75CqeT.js +0 -8
- package/dist/chunk-E2GYISFI-C0R6djsG.js +0 -19
- package/dist/chunk-SKB7J2MH-CW_LVmrE.js +0 -20
- package/dist/diagram-3EMPZRKU-K1apRbx_.js +0 -313
- package/dist/diagram-5UYTHUR4-CDt_HKgG.js +0 -137
- package/dist/index-pBmAzQJl.js +0 -235
- package/dist/journeyDiagram-EWQZEKCU-BmLTz9kg.js +0 -836
- package/dist/min-DrafC17d.js +0 -80
- package/dist/stateDiagram-XX37X6EN-BvfpfSgz.js +0 -264
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
var _a, _b;
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { l as Se, k as ke } from "./timer-BYwnU4DF.js";
|
|
2
|
+
import { _ as d, G as rt, d as O, e as oe, l as L, z as he, B as de, c as R, a2 as ge, a3 as j, a4 as Wt, a5 as ue, u as $, k as pe, a6 as fe, a7 as xt, a8 as xe, i as Tt } from "./mermaid-C9S7GU2b.js";
|
|
3
|
+
import { c as ye } from "./clone-BeXSGgDB.js";
|
|
4
|
+
import { G as be } from "./graph-B7tbSSJp.js";
|
|
5
|
+
import { c as we } from "./channel-Cy0SmgpI.js";
|
|
6
|
+
import { l as me, k as Le } from "./timer-BYwnU4DF.js";
|
|
8
7
|
var yt = function() {
|
|
9
8
|
var e = /* @__PURE__ */ d(function(D, y, g, f) {
|
|
10
9
|
for (g = g || {}, f = D.length; f--; g[D[f]] = y) ;
|
|
11
10
|
return g;
|
|
12
|
-
}, "o"), t = [1, 7], s = [1, 13], n = [1, 14], i = [1, 15],
|
|
11
|
+
}, "o"), t = [1, 7], s = [1, 13], n = [1, 14], i = [1, 15], r = [1, 19], a = [1, 16], l = [1, 17], c = [1, 18], u = [8, 30], h = [8, 21, 28, 29, 30, 31, 32, 40, 44, 47], x = [1, 23], w = [1, 24], b = [8, 15, 16, 21, 28, 29, 30, 31, 32, 40, 44, 47], S = [8, 15, 16, 21, 27, 28, 29, 30, 31, 32, 40, 44, 47], E = [1, 49], k = {
|
|
13
12
|
trace: /* @__PURE__ */ d(function() {
|
|
14
13
|
}, "trace"),
|
|
15
14
|
yy: {},
|
|
@@ -115,7 +114,7 @@ var yt = function() {
|
|
|
115
114
|
break;
|
|
116
115
|
}
|
|
117
116
|
}, "anonymous"),
|
|
118
|
-
table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: n, 31: i, 32:
|
|
117
|
+
table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 11: 3, 13: 4, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: n, 31: i, 32: r, 40: a, 44: l, 47: c }, { 8: [1, 20] }, e(u, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 21: t, 28: s, 29: n, 31: i, 32: r, 40: a, 44: l, 47: c }), e(h, [2, 16], { 14: 22, 15: x, 16: w }), e(h, [2, 17]), e(h, [2, 18]), e(h, [2, 19]), e(h, [2, 20]), e(h, [2, 21]), e(h, [2, 22]), e(b, [2, 25], { 27: [1, 25] }), e(h, [2, 26]), { 19: 26, 26: 12, 32: r }, { 11: 27, 13: 4, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: n, 31: i, 32: r, 40: a, 44: l, 47: c }, { 41: [1, 28], 43: [1, 29] }, { 45: [1, 30] }, { 48: [1, 31] }, e(S, [2, 29], { 33: 32, 36: [1, 33], 38: [1, 34] }), { 1: [2, 7] }, e(u, [2, 13]), { 26: 35, 32: r }, { 32: [2, 14] }, { 17: [1, 36] }, e(b, [2, 24]), { 11: 37, 13: 4, 14: 22, 15: x, 16: w, 19: 5, 20: 6, 21: t, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: n, 31: i, 32: r, 40: a, 44: l, 47: c }, { 30: [1, 38] }, { 42: [1, 39] }, { 42: [1, 40] }, { 46: [1, 41] }, { 49: [1, 42] }, e(S, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(b, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(h, [2, 28]), e(h, [2, 35]), e(h, [2, 36]), e(h, [2, 37]), e(h, [2, 38]), { 37: [1, 47] }, { 34: 48, 35: E }, { 15: [1, 50] }, e(h, [2, 27]), e(S, [2, 33]), { 39: [1, 51] }, { 34: 52, 35: E, 39: [2, 31] }, { 32: [2, 15] }, e(S, [2, 34]), { 39: [2, 32] }],
|
|
119
118
|
defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
|
|
120
119
|
parseError: /* @__PURE__ */ d(function(y, g) {
|
|
121
120
|
if (g.recoverable)
|
|
@@ -606,20 +605,20 @@ Expecting ` + it.join(", ") + ", got '" + (this.terminals_[F] || F) + "'" : ft =
|
|
|
606
605
|
return d(_, "Parser"), _.prototype = k, k.Parser = _, new _();
|
|
607
606
|
}();
|
|
608
607
|
yt.parser = yt;
|
|
609
|
-
var
|
|
608
|
+
var Se = yt, X = /* @__PURE__ */ new Map(), St = [], bt = /* @__PURE__ */ new Map(), Bt = "color", Ct = "fill", ke = "bgFill", Pt = ",", ve = R(), ct = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ d((e) => pe.sanitizeText(e, ve), "sanitizeText"), _e = /* @__PURE__ */ d(function(e, t = "") {
|
|
610
609
|
let s = ct.get(e);
|
|
611
610
|
s || (s = { id: e, styles: [], textStyles: [] }, ct.set(e, s)), t == null ? void 0 : t.split(Pt).forEach((n) => {
|
|
612
611
|
const i = n.replace(/([^;]*);/, "$1").trim();
|
|
613
612
|
if (RegExp(Bt).exec(n)) {
|
|
614
|
-
const
|
|
615
|
-
s.textStyles.push(
|
|
613
|
+
const a = i.replace(Ct, ke).replace(Bt, Ct);
|
|
614
|
+
s.textStyles.push(a);
|
|
616
615
|
}
|
|
617
616
|
s.styles.push(i);
|
|
618
617
|
});
|
|
619
|
-
}, "addStyleClass"),
|
|
618
|
+
}, "addStyleClass"), De = /* @__PURE__ */ d(function(e, t = "") {
|
|
620
619
|
const s = X.get(e);
|
|
621
620
|
t != null && (s.styles = t.split(Pt));
|
|
622
|
-
}, "addStyle2Node"),
|
|
621
|
+
}, "addStyle2Node"), Ne = /* @__PURE__ */ d(function(e, t) {
|
|
623
622
|
e.split(",").forEach(function(s) {
|
|
624
623
|
let n = X.get(s);
|
|
625
624
|
if (n === void 0) {
|
|
@@ -631,38 +630,38 @@ var ve = yt, X = /* @__PURE__ */ new Map(), St = [], bt = /* @__PURE__ */ new Ma
|
|
|
631
630
|
}, "setCssClass"), Yt = /* @__PURE__ */ d((e, t) => {
|
|
632
631
|
const s = e.flat(), n = [];
|
|
633
632
|
for (const i of s) {
|
|
634
|
-
if (i.label && (i.label =
|
|
635
|
-
|
|
633
|
+
if (i.label && (i.label = Ee(i.label)), i.type === "classDef") {
|
|
634
|
+
_e(i.id, i.css);
|
|
636
635
|
continue;
|
|
637
636
|
}
|
|
638
637
|
if (i.type === "applyClass") {
|
|
639
|
-
|
|
638
|
+
Ne(i.id, (i == null ? void 0 : i.styleClass) ?? "");
|
|
640
639
|
continue;
|
|
641
640
|
}
|
|
642
641
|
if (i.type === "applyStyles") {
|
|
643
|
-
(i == null ? void 0 : i.stylesStr) &&
|
|
642
|
+
(i == null ? void 0 : i.stylesStr) && De(i.id, i == null ? void 0 : i.stylesStr);
|
|
644
643
|
continue;
|
|
645
644
|
}
|
|
646
645
|
if (i.type === "column-setting")
|
|
647
646
|
t.columns = i.columns ?? -1;
|
|
648
647
|
else if (i.type === "edge") {
|
|
649
|
-
const
|
|
650
|
-
bt.set(i.id,
|
|
648
|
+
const r = (bt.get(i.id) ?? 0) + 1;
|
|
649
|
+
bt.set(i.id, r), i.id = r + "-" + i.id, St.push(i);
|
|
651
650
|
} else {
|
|
652
651
|
i.label || (i.type === "composite" ? i.label = "" : i.label = i.id);
|
|
653
|
-
const
|
|
654
|
-
if (
|
|
655
|
-
const
|
|
656
|
-
for (let l = 0; l <
|
|
657
|
-
const c =
|
|
652
|
+
const r = X.get(i.id);
|
|
653
|
+
if (r === void 0 ? X.set(i.id, i) : (i.type !== "na" && (r.type = i.type), i.label !== i.id && (r.label = i.label)), i.children && Yt(i.children, i), i.type === "space") {
|
|
654
|
+
const a = i.width ?? 1;
|
|
655
|
+
for (let l = 0; l < a; l++) {
|
|
656
|
+
const c = ye(i);
|
|
658
657
|
c.id = c.id + "-" + l, X.set(c.id, c), n.push(c);
|
|
659
658
|
}
|
|
660
|
-
} else
|
|
659
|
+
} else r === void 0 && n.push(i);
|
|
661
660
|
}
|
|
662
661
|
}
|
|
663
662
|
t.children = n;
|
|
664
|
-
}, "populateBlockDatabase"), kt = [], et = { id: "root", type: "composite", children: [], columns: -1 },
|
|
665
|
-
L.debug("Clear called"),
|
|
663
|
+
}, "populateBlockDatabase"), kt = [], et = { id: "root", type: "composite", children: [], columns: -1 }, Te = /* @__PURE__ */ d(() => {
|
|
664
|
+
L.debug("Clear called"), he(), et = { id: "root", type: "composite", children: [], columns: -1 }, X = /* @__PURE__ */ new Map([["root", et]]), kt = [], ct = /* @__PURE__ */ new Map(), St = [], bt = /* @__PURE__ */ new Map();
|
|
666
665
|
}, "clear");
|
|
667
666
|
function Ht(e) {
|
|
668
667
|
switch (L.debug("typeStr2Type", e), e) {
|
|
@@ -721,35 +720,35 @@ function Xt(e) {
|
|
|
721
720
|
}
|
|
722
721
|
}
|
|
723
722
|
d(Xt, "edgeStrToEdgeData");
|
|
724
|
-
var It = 0,
|
|
723
|
+
var It = 0, Be = /* @__PURE__ */ d(() => (It++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + It), "generateId"), Ce = /* @__PURE__ */ d((e) => {
|
|
725
724
|
et.children = e, Yt(e, et), kt = et.children;
|
|
726
|
-
}, "setHierarchy"),
|
|
725
|
+
}, "setHierarchy"), Ie = /* @__PURE__ */ d((e) => {
|
|
727
726
|
const t = X.get(e);
|
|
728
727
|
return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
|
|
729
|
-
}, "getColumns"),
|
|
728
|
+
}, "getColumns"), Oe = /* @__PURE__ */ d(() => [...X.values()], "getBlocksFlat"), Re = /* @__PURE__ */ d(() => kt || [], "getBlocks"), ze = /* @__PURE__ */ d(() => St, "getEdges"), Ae = /* @__PURE__ */ d((e) => X.get(e), "getBlock"), Me = /* @__PURE__ */ d((e) => {
|
|
730
729
|
X.set(e.id, e);
|
|
731
|
-
}, "setBlock"),
|
|
730
|
+
}, "setBlock"), Fe = /* @__PURE__ */ d(() => console, "getLogger"), We = /* @__PURE__ */ d(function() {
|
|
732
731
|
return ct;
|
|
733
|
-
}, "getClasses"),
|
|
732
|
+
}, "getClasses"), Pe = {
|
|
734
733
|
getConfig: /* @__PURE__ */ d(() => rt().block, "getConfig"),
|
|
735
734
|
typeStr2Type: Ht,
|
|
736
735
|
edgeTypeStr2Type: Kt,
|
|
737
736
|
edgeStrToEdgeData: Xt,
|
|
738
|
-
getLogger:
|
|
739
|
-
getBlocksFlat:
|
|
740
|
-
getBlocks:
|
|
741
|
-
getEdges:
|
|
742
|
-
setHierarchy:
|
|
743
|
-
getBlock:
|
|
744
|
-
setBlock:
|
|
745
|
-
getColumns:
|
|
746
|
-
getClasses:
|
|
747
|
-
clear:
|
|
748
|
-
generateId:
|
|
749
|
-
},
|
|
750
|
-
const s =
|
|
751
|
-
return
|
|
752
|
-
}, "fade"),
|
|
737
|
+
getLogger: Fe,
|
|
738
|
+
getBlocksFlat: Oe,
|
|
739
|
+
getBlocks: Re,
|
|
740
|
+
getEdges: ze,
|
|
741
|
+
setHierarchy: Ce,
|
|
742
|
+
getBlock: Ae,
|
|
743
|
+
setBlock: Me,
|
|
744
|
+
getColumns: Ie,
|
|
745
|
+
getClasses: We,
|
|
746
|
+
clear: Te,
|
|
747
|
+
generateId: Be
|
|
748
|
+
}, Ye = Pe, nt = /* @__PURE__ */ d((e, t) => {
|
|
749
|
+
const s = we, n = s(e, "r"), i = s(e, "g"), r = s(e, "b");
|
|
750
|
+
return de(n, i, r, t);
|
|
751
|
+
}, "fade"), He = /* @__PURE__ */ d((e) => `.label {
|
|
753
752
|
font-family: ${e.fontFamily};
|
|
754
753
|
color: ${e.nodeTextColor || e.textColor};
|
|
755
754
|
}
|
|
@@ -861,40 +860,39 @@ var It = 0, Ie = /* @__PURE__ */ d(() => (It++, "id-" + Math.random().toString(3
|
|
|
861
860
|
font-size: 18px;
|
|
862
861
|
fill: ${e.textColor};
|
|
863
862
|
}
|
|
864
|
-
|
|
865
|
-
`, "getStyles"), Ue = Xe, je = /* @__PURE__ */ d((e, t, s, n) => {
|
|
863
|
+
`, "getStyles"), Ke = He, Xe = /* @__PURE__ */ d((e, t, s, n) => {
|
|
866
864
|
t.forEach((i) => {
|
|
867
|
-
|
|
865
|
+
tr[i](e, s, n);
|
|
868
866
|
});
|
|
869
|
-
}, "insertMarkers"),
|
|
867
|
+
}, "insertMarkers"), Ue = /* @__PURE__ */ d((e, t, s) => {
|
|
870
868
|
L.trace("Making markers for ", s), e.append("defs").append("marker").attr("id", s + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", s + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
871
|
-
}, "extension"),
|
|
869
|
+
}, "extension"), je = /* @__PURE__ */ d((e, t, s) => {
|
|
872
870
|
e.append("defs").append("marker").attr("id", s + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", s + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
873
|
-
}, "composition"),
|
|
871
|
+
}, "composition"), Ve = /* @__PURE__ */ d((e, t, s) => {
|
|
874
872
|
e.append("defs").append("marker").attr("id", s + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", s + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
875
|
-
}, "aggregation"),
|
|
873
|
+
}, "aggregation"), Ge = /* @__PURE__ */ d((e, t, s) => {
|
|
876
874
|
e.append("defs").append("marker").attr("id", s + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", s + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
877
|
-
}, "dependency"),
|
|
875
|
+
}, "dependency"), Ze = /* @__PURE__ */ d((e, t, s) => {
|
|
878
876
|
e.append("defs").append("marker").attr("id", s + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", s + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
879
|
-
}, "lollipop"),
|
|
877
|
+
}, "lollipop"), qe = /* @__PURE__ */ d((e, t, s) => {
|
|
880
878
|
e.append("marker").attr("id", s + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", s + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
881
|
-
}, "point"),
|
|
879
|
+
}, "point"), Je = /* @__PURE__ */ d((e, t, s) => {
|
|
882
880
|
e.append("marker").attr("id", s + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", s + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
883
|
-
}, "circle"),
|
|
881
|
+
}, "circle"), Qe = /* @__PURE__ */ d((e, t, s) => {
|
|
884
882
|
e.append("marker").attr("id", s + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", s + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
885
|
-
}, "cross"),
|
|
883
|
+
}, "cross"), $e = /* @__PURE__ */ d((e, t, s) => {
|
|
886
884
|
e.append("defs").append("marker").attr("id", s + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
887
|
-
}, "barb"),
|
|
888
|
-
extension:
|
|
889
|
-
composition:
|
|
890
|
-
aggregation:
|
|
891
|
-
dependency:
|
|
892
|
-
lollipop:
|
|
893
|
-
point:
|
|
894
|
-
circle:
|
|
895
|
-
cross:
|
|
896
|
-
barb:
|
|
897
|
-
},
|
|
885
|
+
}, "barb"), tr = {
|
|
886
|
+
extension: Ue,
|
|
887
|
+
composition: je,
|
|
888
|
+
aggregation: Ve,
|
|
889
|
+
dependency: Ge,
|
|
890
|
+
lollipop: Ze,
|
|
891
|
+
point: qe,
|
|
892
|
+
circle: Je,
|
|
893
|
+
cross: Qe,
|
|
894
|
+
barb: $e
|
|
895
|
+
}, er = Xe, C = ((_b = (_a = R()) == null ? void 0 : _a.block) == null ? void 0 : _b.padding) ?? 8;
|
|
898
896
|
function Ut(e, t) {
|
|
899
897
|
if (e === 0 || !Number.isInteger(e))
|
|
900
898
|
throw new Error("Columns must be an integer !== 0.");
|
|
@@ -908,23 +906,23 @@ function Ut(e, t) {
|
|
|
908
906
|
return { px: s, py: n };
|
|
909
907
|
}
|
|
910
908
|
d(Ut, "calculateBlockPosition");
|
|
911
|
-
var
|
|
909
|
+
var rr = /* @__PURE__ */ d((e) => {
|
|
912
910
|
let t = 0, s = 0;
|
|
913
911
|
for (const n of e.children) {
|
|
914
|
-
const { width: i, height:
|
|
912
|
+
const { width: i, height: r, x: a, y: l } = n.size ?? { width: 0, height: 0, x: 0, y: 0 };
|
|
915
913
|
L.debug(
|
|
916
914
|
"getMaxChildSize abc95 child:",
|
|
917
915
|
n.id,
|
|
918
916
|
"width:",
|
|
919
917
|
i,
|
|
920
918
|
"height:",
|
|
921
|
-
a,
|
|
922
|
-
"x:",
|
|
923
919
|
r,
|
|
920
|
+
"x:",
|
|
921
|
+
a,
|
|
924
922
|
"y:",
|
|
925
923
|
l,
|
|
926
924
|
n.type
|
|
927
|
-
), n.type !== "space" && (i > t && (t = i / (e.widthInColumns ?? 1)),
|
|
925
|
+
), n.type !== "space" && (i > t && (t = i / (e.widthInColumns ?? 1)), r > s && (s = r));
|
|
928
926
|
}
|
|
929
927
|
return { width: t, height: s };
|
|
930
928
|
}, "getMaxChildSize");
|
|
@@ -936,7 +934,7 @@ function ot(e, t, s = 0, n = 0) {
|
|
|
936
934
|
(_a2 = e == null ? void 0 : e.size) == null ? void 0 : _a2.x,
|
|
937
935
|
"block width =",
|
|
938
936
|
e == null ? void 0 : e.size,
|
|
939
|
-
"
|
|
937
|
+
"sieblingWidth",
|
|
940
938
|
s
|
|
941
939
|
), ((_b2 = e == null ? void 0 : e.size) == null ? void 0 : _b2.width) || (e.size = {
|
|
942
940
|
width: s,
|
|
@@ -944,20 +942,20 @@ function ot(e, t, s = 0, n = 0) {
|
|
|
944
942
|
x: 0,
|
|
945
943
|
y: 0
|
|
946
944
|
});
|
|
947
|
-
let i = 0,
|
|
945
|
+
let i = 0, r = 0;
|
|
948
946
|
if (((_c = e.children) == null ? void 0 : _c.length) > 0) {
|
|
949
947
|
for (const b of e.children)
|
|
950
948
|
ot(b, t);
|
|
951
|
-
const
|
|
952
|
-
i =
|
|
949
|
+
const a = rr(e);
|
|
950
|
+
i = a.width, r = a.height, L.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", i, r);
|
|
953
951
|
for (const b of e.children)
|
|
954
952
|
b.size && (L.debug(
|
|
955
|
-
`abc95 Setting size of children of ${e.id} id=${b.id} ${i} ${
|
|
956
|
-
), b.size.width = i * (b.widthInColumns ?? 1) + C * ((b.widthInColumns ?? 1) - 1), b.size.height =
|
|
957
|
-
`abc95 updating size of ${e.id} children child:${b.id} maxWidth:${i} maxHeight:${
|
|
953
|
+
`abc95 Setting size of children of ${e.id} id=${b.id} ${i} ${r} ${JSON.stringify(b.size)}`
|
|
954
|
+
), b.size.width = i * (b.widthInColumns ?? 1) + C * ((b.widthInColumns ?? 1) - 1), b.size.height = r, b.size.x = 0, b.size.y = 0, L.debug(
|
|
955
|
+
`abc95 updating size of ${e.id} children child:${b.id} maxWidth:${i} maxHeight:${r}`
|
|
958
956
|
));
|
|
959
957
|
for (const b of e.children)
|
|
960
|
-
ot(b, t, i,
|
|
958
|
+
ot(b, t, i, r);
|
|
961
959
|
const l = e.columns ?? -1;
|
|
962
960
|
let c = 0;
|
|
963
961
|
for (const b of e.children)
|
|
@@ -965,13 +963,13 @@ function ot(e, t, s = 0, n = 0) {
|
|
|
965
963
|
let u = e.children.length;
|
|
966
964
|
l > 0 && l < c && (u = l);
|
|
967
965
|
const h = Math.ceil(c / u);
|
|
968
|
-
let x = u * (i + C) + C, w = h * (
|
|
966
|
+
let x = u * (i + C) + C, w = h * (r + C) + C;
|
|
969
967
|
if (x < s) {
|
|
970
968
|
L.debug(
|
|
971
|
-
`Detected to small
|
|
969
|
+
`Detected to small siebling: abc95 ${e.id} sieblingWidth ${s} sieblingHeight ${n} width ${x}`
|
|
972
970
|
), x = s, w = n;
|
|
973
971
|
const b = (s - u * C - C) / u, S = (n - h * C - C) / h;
|
|
974
|
-
L.debug("Size indata abc88", e.id, "childWidth", b, "maxWidth", i), L.debug("Size indata abc88", e.id, "childHeight", S, "maxHeight",
|
|
972
|
+
L.debug("Size indata abc88", e.id, "childWidth", b, "maxWidth", i), L.debug("Size indata abc88", e.id, "childHeight", S, "maxHeight", r), L.debug("Size indata abc88 xSize", u, "padding", C);
|
|
975
973
|
for (const E of e.children)
|
|
976
974
|
E.size && (E.size.width = b, E.size.height = S, E.size.x = 0, E.size.y = 0);
|
|
977
975
|
}
|
|
@@ -1014,25 +1012,25 @@ function vt(e, t) {
|
|
|
1014
1012
|
e.children.length > 0) {
|
|
1015
1013
|
const n = ((_e2 = (_d = e == null ? void 0 : e.children[0]) == null ? void 0 : _d.size) == null ? void 0 : _e2.width) ?? 0, i = e.children.length * n + (e.children.length - 1) * C;
|
|
1016
1014
|
L.debug("widthOfChildren 88", i, "posX");
|
|
1017
|
-
let
|
|
1015
|
+
let r = 0;
|
|
1018
1016
|
L.debug("abc91 block?.size?.x", e.id, (_f = e == null ? void 0 : e.size) == null ? void 0 : _f.x);
|
|
1019
|
-
let
|
|
1017
|
+
let a = ((_g = e == null ? void 0 : e.size) == null ? void 0 : _g.x) ? ((_h = e == null ? void 0 : e.size) == null ? void 0 : _h.x) + (-((_i = e == null ? void 0 : e.size) == null ? void 0 : _i.width) / 2 || 0) : -C, l = 0;
|
|
1020
1018
|
for (const c of e.children) {
|
|
1021
1019
|
const u = e;
|
|
1022
1020
|
if (!c.size)
|
|
1023
1021
|
continue;
|
|
1024
|
-
const { width: h, height: x } = c.size, { px: w, py: b } = Ut(s,
|
|
1025
|
-
if (b != l && (l = b,
|
|
1026
|
-
`abc89 layout blocks (child) id: ${c.id} Pos: ${
|
|
1022
|
+
const { width: h, height: x } = c.size, { px: w, py: b } = Ut(s, r);
|
|
1023
|
+
if (b != l && (l = b, a = ((_j = e == null ? void 0 : e.size) == null ? void 0 : _j.x) ? ((_k = e == null ? void 0 : e.size) == null ? void 0 : _k.x) + (-((_l = e == null ? void 0 : e.size) == null ? void 0 : _l.width) / 2 || 0) : -C, L.debug("New row in layout for block", e.id, " and child ", c.id, l)), L.debug(
|
|
1024
|
+
`abc89 layout blocks (child) id: ${c.id} Pos: ${r} (px, py) ${w},${b} (${(_m = u == null ? void 0 : u.size) == null ? void 0 : _m.x},${(_n = u == null ? void 0 : u.size) == null ? void 0 : _n.y}) parent: ${u.id} width: ${h}${C}`
|
|
1027
1025
|
), u.size) {
|
|
1028
1026
|
const S = h / 2;
|
|
1029
|
-
c.size.x =
|
|
1030
|
-
`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${
|
|
1031
|
-
),
|
|
1032
|
-
`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${
|
|
1027
|
+
c.size.x = a + C + S, L.debug(
|
|
1028
|
+
`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${a} new startingPosX${c.size.x} ${S} padding=${C} width=${h} halfWidth=${S} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${h * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
|
|
1029
|
+
), a = c.size.x + S, c.size.y = u.size.y - u.size.height / 2 + b * (x + C) + x / 2 + C, L.debug(
|
|
1030
|
+
`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${a}${C}${S}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${h * ((c == null ? void 0 : c.widthInColumns) ?? 1) / 2}`
|
|
1033
1031
|
);
|
|
1034
1032
|
}
|
|
1035
|
-
c.children && vt(c),
|
|
1033
|
+
c.children && vt(c), r += (c == null ? void 0 : c.widthInColumns) ?? 1, L.debug("abc88 columnsPos", c, r);
|
|
1036
1034
|
}
|
|
1037
1035
|
}
|
|
1038
1036
|
L.debug(
|
|
@@ -1042,12 +1040,12 @@ function vt(e, t) {
|
|
|
1042
1040
|
d(vt, "layoutBlocks");
|
|
1043
1041
|
function Et(e, { minX: t, minY: s, maxX: n, maxY: i } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
|
|
1044
1042
|
if (e.size && e.id !== "root") {
|
|
1045
|
-
const { x:
|
|
1046
|
-
|
|
1043
|
+
const { x: r, y: a, width: l, height: c } = e.size;
|
|
1044
|
+
r - l / 2 < t && (t = r - l / 2), a - c / 2 < s && (s = a - c / 2), r + l / 2 > n && (n = r + l / 2), a + c / 2 > i && (i = a + c / 2);
|
|
1047
1045
|
}
|
|
1048
1046
|
if (e.children)
|
|
1049
|
-
for (const
|
|
1050
|
-
({ minX: t, minY: s, maxX: n, maxY: i } = Et(
|
|
1047
|
+
for (const r of e.children)
|
|
1048
|
+
({ minX: t, minY: s, maxX: n, maxY: i } = Et(r, { minX: t, minY: s, maxX: n, maxY: i }));
|
|
1051
1049
|
return { minX: t, minY: s, maxX: n, maxY: i };
|
|
1052
1050
|
}
|
|
1053
1051
|
d(Et, "findBounds");
|
|
@@ -1056,8 +1054,8 @@ function jt(e) {
|
|
|
1056
1054
|
if (!t)
|
|
1057
1055
|
return;
|
|
1058
1056
|
ot(t, e, 0, 0), vt(t), L.debug("getBlocks", JSON.stringify(t, null, 2));
|
|
1059
|
-
const { minX: s, minY: n, maxX: i, maxY:
|
|
1060
|
-
return { x: s, y: n, width: l, height:
|
|
1057
|
+
const { minX: s, minY: n, maxX: i, maxY: r } = Et(t), a = r - n, l = i - s;
|
|
1058
|
+
return { x: s, y: n, width: l, height: a };
|
|
1061
1059
|
}
|
|
1062
1060
|
d(jt, "layout");
|
|
1063
1061
|
function wt(e, t) {
|
|
@@ -1065,34 +1063,34 @@ function wt(e, t) {
|
|
|
1065
1063
|
}
|
|
1066
1064
|
d(wt, "applyStyle");
|
|
1067
1065
|
function Vt(e) {
|
|
1068
|
-
const t = O(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), s = t.append("xhtml:div"), n = e.label, i = e.isNode ? "nodeLabel" : "edgeLabel",
|
|
1069
|
-
return
|
|
1066
|
+
const t = O(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), s = t.append("xhtml:div"), n = e.label, i = e.isNode ? "nodeLabel" : "edgeLabel", r = s.append("span");
|
|
1067
|
+
return r.html(n), wt(r, e.labelStyle), r.attr("class", i), wt(s, e.labelStyle), s.style("display", "inline-block"), s.style("white-space", "nowrap"), s.attr("xmlns", "http://www.w3.org/1999/xhtml"), t.node();
|
|
1070
1068
|
}
|
|
1071
1069
|
d(Vt, "addHtmlLabel");
|
|
1072
|
-
var
|
|
1070
|
+
var ar = /* @__PURE__ */ d((e, t, s, n) => {
|
|
1073
1071
|
let i = e || "";
|
|
1074
1072
|
if (typeof i == "object" && (i = i[0]), j(R().flowchart.htmlLabels)) {
|
|
1075
1073
|
i = i.replace(/\\n|\n/g, "<br />"), L.debug("vertexText" + i);
|
|
1076
|
-
const
|
|
1074
|
+
const r = {
|
|
1077
1075
|
isNode: n,
|
|
1078
|
-
label:
|
|
1076
|
+
label: fe(xt(i)),
|
|
1079
1077
|
labelStyle: t.replace("fill:", "color:")
|
|
1080
1078
|
};
|
|
1081
1079
|
return Vt(r);
|
|
1082
1080
|
} else {
|
|
1083
|
-
const
|
|
1084
|
-
|
|
1085
|
-
let
|
|
1086
|
-
typeof i == "string" ?
|
|
1087
|
-
for (const l of
|
|
1081
|
+
const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1082
|
+
r.setAttribute("style", t.replace("color:", "fill:"));
|
|
1083
|
+
let a = [];
|
|
1084
|
+
typeof i == "string" ? a = i.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(i) ? a = i : a = [];
|
|
1085
|
+
for (const l of a) {
|
|
1088
1086
|
const c = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
1089
|
-
c.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), c.setAttribute("dy", "1em"), c.setAttribute("x", "0"), s ? c.setAttribute("class", "title-row") : c.setAttribute("class", "row"), c.textContent = l.trim(),
|
|
1087
|
+
c.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), c.setAttribute("dy", "1em"), c.setAttribute("x", "0"), s ? c.setAttribute("class", "title-row") : c.setAttribute("class", "row"), c.textContent = l.trim(), r.appendChild(c);
|
|
1090
1088
|
}
|
|
1091
|
-
return
|
|
1089
|
+
return r;
|
|
1092
1090
|
}
|
|
1093
|
-
}, "createLabel"), K =
|
|
1091
|
+
}, "createLabel"), K = ar, sr = /* @__PURE__ */ d((e, t, s, n, i) => {
|
|
1094
1092
|
t.arrowTypeStart && Ot(e, "start", t.arrowTypeStart, s, n, i), t.arrowTypeEnd && Ot(e, "end", t.arrowTypeEnd, s, n, i);
|
|
1095
|
-
}, "addEdgeMarkers"),
|
|
1093
|
+
}, "addEdgeMarkers"), ir = {
|
|
1096
1094
|
arrow_cross: "cross",
|
|
1097
1095
|
arrow_point: "point",
|
|
1098
1096
|
arrow_barb: "barb",
|
|
@@ -1102,15 +1100,15 @@ var ir = /* @__PURE__ */ d(async (e, t, s, n) => {
|
|
|
1102
1100
|
composition: "composition",
|
|
1103
1101
|
dependency: "dependency",
|
|
1104
1102
|
lollipop: "lollipop"
|
|
1105
|
-
}, Ot = /* @__PURE__ */ d((e, t, s, n, i,
|
|
1106
|
-
const
|
|
1107
|
-
if (!
|
|
1103
|
+
}, Ot = /* @__PURE__ */ d((e, t, s, n, i, r) => {
|
|
1104
|
+
const a = ir[s];
|
|
1105
|
+
if (!a) {
|
|
1108
1106
|
L.warn(`Unknown arrow type: ${s}`);
|
|
1109
1107
|
return;
|
|
1110
1108
|
}
|
|
1111
1109
|
const l = t === "start" ? "Start" : "End";
|
|
1112
|
-
e.attr(`marker-${t}`, `url(${n}#${i}_${
|
|
1113
|
-
}, "addEdgeMarker"), mt = {}, M = {},
|
|
1110
|
+
e.attr(`marker-${t}`, `url(${n}#${i}_${r}-${a}${l})`);
|
|
1111
|
+
}, "addEdgeMarker"), mt = {}, M = {}, nr = /* @__PURE__ */ d((e, t) => {
|
|
1114
1112
|
const s = R(), n = j(s.flowchart.htmlLabels), i = t.labelType === "markdown" ? Wt(
|
|
1115
1113
|
e,
|
|
1116
1114
|
t.label,
|
|
@@ -1120,35 +1118,35 @@ var ir = /* @__PURE__ */ d(async (e, t, s, n) => {
|
|
|
1120
1118
|
addSvgBackground: true
|
|
1121
1119
|
},
|
|
1122
1120
|
s
|
|
1123
|
-
) :
|
|
1124
|
-
|
|
1121
|
+
) : K(t.label, t.labelStyle), r = e.insert("g").attr("class", "edgeLabel"), a = r.insert("g").attr("class", "label");
|
|
1122
|
+
a.node().appendChild(i);
|
|
1125
1123
|
let l = i.getBBox();
|
|
1126
1124
|
if (n) {
|
|
1127
1125
|
const u = i.children[0], h = O(i);
|
|
1128
1126
|
l = u.getBoundingClientRect(), h.attr("width", l.width), h.attr("height", l.height);
|
|
1129
1127
|
}
|
|
1130
|
-
|
|
1128
|
+
a.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")"), mt[t.id] = r, t.width = l.width, t.height = l.height;
|
|
1131
1129
|
let c;
|
|
1132
1130
|
if (t.startLabelLeft) {
|
|
1133
|
-
const u =
|
|
1131
|
+
const u = K(t.startLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
|
|
1134
1132
|
c = x.node().appendChild(u);
|
|
1135
1133
|
const w = u.getBBox();
|
|
1136
1134
|
x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), M[t.id] || (M[t.id] = {}), M[t.id].startLeft = h, tt(c, t.startLabelLeft);
|
|
1137
1135
|
}
|
|
1138
1136
|
if (t.startLabelRight) {
|
|
1139
|
-
const u =
|
|
1137
|
+
const u = K(t.startLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
|
|
1140
1138
|
c = h.node().appendChild(u), x.node().appendChild(u);
|
|
1141
1139
|
const w = u.getBBox();
|
|
1142
1140
|
x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), M[t.id] || (M[t.id] = {}), M[t.id].startRight = h, tt(c, t.startLabelRight);
|
|
1143
1141
|
}
|
|
1144
1142
|
if (t.endLabelLeft) {
|
|
1145
|
-
const u =
|
|
1143
|
+
const u = K(t.endLabelLeft, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
|
|
1146
1144
|
c = x.node().appendChild(u);
|
|
1147
1145
|
const w = u.getBBox();
|
|
1148
1146
|
x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), h.node().appendChild(u), M[t.id] || (M[t.id] = {}), M[t.id].endLeft = h, tt(c, t.endLabelLeft);
|
|
1149
1147
|
}
|
|
1150
1148
|
if (t.endLabelRight) {
|
|
1151
|
-
const u =
|
|
1149
|
+
const u = K(t.endLabelRight, t.labelStyle), h = e.insert("g").attr("class", "edgeTerminals"), x = h.insert("g").attr("class", "inner");
|
|
1152
1150
|
c = x.node().appendChild(u);
|
|
1153
1151
|
const w = u.getBBox();
|
|
1154
1152
|
x.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), h.node().appendChild(u), M[t.id] || (M[t.id] = {}), M[t.id].endRight = h, tt(c, t.endLabelRight);
|
|
@@ -1159,18 +1157,18 @@ function tt(e, t) {
|
|
|
1159
1157
|
R().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
|
|
1160
1158
|
}
|
|
1161
1159
|
d(tt, "setTerminalWidth");
|
|
1162
|
-
var
|
|
1160
|
+
var lr = /* @__PURE__ */ d((e, t) => {
|
|
1163
1161
|
L.debug("Moving label abc88 ", e.id, e.label, mt[e.id], t);
|
|
1164
1162
|
let s = t.updatedPath ? t.updatedPath : t.originalPath;
|
|
1165
|
-
const n = R(), { subGraphTitleTotalMargin: i } =
|
|
1163
|
+
const n = R(), { subGraphTitleTotalMargin: i } = ue(n);
|
|
1166
1164
|
if (e.label) {
|
|
1167
|
-
const
|
|
1168
|
-
let
|
|
1165
|
+
const r = mt[e.id];
|
|
1166
|
+
let a = e.x, l = e.y;
|
|
1169
1167
|
if (s) {
|
|
1170
1168
|
const c = $.calcLabelPosition(s);
|
|
1171
1169
|
L.debug(
|
|
1172
1170
|
"Moving label " + e.label + " from (",
|
|
1173
|
-
|
|
1171
|
+
a,
|
|
1174
1172
|
",",
|
|
1175
1173
|
l,
|
|
1176
1174
|
") to (",
|
|
@@ -1178,62 +1176,62 @@ var or = /* @__PURE__ */ d((e, t) => {
|
|
|
1178
1176
|
",",
|
|
1179
1177
|
c.y,
|
|
1180
1178
|
") abc88"
|
|
1181
|
-
), t.updatedPath && (
|
|
1179
|
+
), t.updatedPath && (a = c.x, l = c.y);
|
|
1182
1180
|
}
|
|
1183
|
-
|
|
1181
|
+
r.attr("transform", `translate(${a}, ${l + i / 2})`);
|
|
1184
1182
|
}
|
|
1185
1183
|
if (e.startLabelLeft) {
|
|
1186
|
-
const
|
|
1187
|
-
let
|
|
1184
|
+
const r = M[e.id].startLeft;
|
|
1185
|
+
let a = e.x, l = e.y;
|
|
1188
1186
|
if (s) {
|
|
1189
1187
|
const c = $.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", s);
|
|
1190
|
-
|
|
1188
|
+
a = c.x, l = c.y;
|
|
1191
1189
|
}
|
|
1192
|
-
|
|
1190
|
+
r.attr("transform", `translate(${a}, ${l})`);
|
|
1193
1191
|
}
|
|
1194
1192
|
if (e.startLabelRight) {
|
|
1195
|
-
const
|
|
1196
|
-
let
|
|
1193
|
+
const r = M[e.id].startRight;
|
|
1194
|
+
let a = e.x, l = e.y;
|
|
1197
1195
|
if (s) {
|
|
1198
1196
|
const c = $.calcTerminalLabelPosition(
|
|
1199
1197
|
e.arrowTypeStart ? 10 : 0,
|
|
1200
1198
|
"start_right",
|
|
1201
1199
|
s
|
|
1202
1200
|
);
|
|
1203
|
-
|
|
1201
|
+
a = c.x, l = c.y;
|
|
1204
1202
|
}
|
|
1205
|
-
|
|
1203
|
+
r.attr("transform", `translate(${a}, ${l})`);
|
|
1206
1204
|
}
|
|
1207
1205
|
if (e.endLabelLeft) {
|
|
1208
|
-
const
|
|
1209
|
-
let
|
|
1206
|
+
const r = M[e.id].endLeft;
|
|
1207
|
+
let a = e.x, l = e.y;
|
|
1210
1208
|
if (s) {
|
|
1211
1209
|
const c = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", s);
|
|
1212
|
-
|
|
1210
|
+
a = c.x, l = c.y;
|
|
1213
1211
|
}
|
|
1214
|
-
|
|
1212
|
+
r.attr("transform", `translate(${a}, ${l})`);
|
|
1215
1213
|
}
|
|
1216
1214
|
if (e.endLabelRight) {
|
|
1217
|
-
const
|
|
1218
|
-
let
|
|
1215
|
+
const r = M[e.id].endRight;
|
|
1216
|
+
let a = e.x, l = e.y;
|
|
1219
1217
|
if (s) {
|
|
1220
1218
|
const c = $.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", s);
|
|
1221
|
-
|
|
1219
|
+
a = c.x, l = c.y;
|
|
1222
1220
|
}
|
|
1223
|
-
|
|
1221
|
+
r.attr("transform", `translate(${a}, ${l})`);
|
|
1224
1222
|
}
|
|
1225
|
-
}, "positionEdgeLabel"),
|
|
1226
|
-
const s = e.x, n = e.y, i = Math.abs(t.x - s),
|
|
1227
|
-
return i >=
|
|
1228
|
-
}, "outsideNode"),
|
|
1223
|
+
}, "positionEdgeLabel"), cr = /* @__PURE__ */ d((e, t) => {
|
|
1224
|
+
const s = e.x, n = e.y, i = Math.abs(t.x - s), r = Math.abs(t.y - n), a = e.width / 2, l = e.height / 2;
|
|
1225
|
+
return i >= a || r >= l;
|
|
1226
|
+
}, "outsideNode"), or = /* @__PURE__ */ d((e, t, s) => {
|
|
1229
1227
|
L.debug(`intersection calc abc89:
|
|
1230
1228
|
outsidePoint: ${JSON.stringify(t)}
|
|
1231
1229
|
insidePoint : ${JSON.stringify(s)}
|
|
1232
1230
|
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
|
|
1233
|
-
const n = e.x, i = e.y,
|
|
1234
|
-
let l = s.x < t.x ?
|
|
1231
|
+
const n = e.x, i = e.y, r = Math.abs(n - s.x), a = e.width / 2;
|
|
1232
|
+
let l = s.x < t.x ? a - r : a + r;
|
|
1235
1233
|
const c = e.height / 2, u = Math.abs(t.y - s.y), h = Math.abs(t.x - s.x);
|
|
1236
|
-
if (Math.abs(i - t.y) *
|
|
1234
|
+
if (Math.abs(i - t.y) * a > Math.abs(n - t.x) * c) {
|
|
1237
1235
|
let x = s.y < t.y ? t.y - c - i : i - c - t.y;
|
|
1238
1236
|
l = h * x / u;
|
|
1239
1237
|
const w = {
|
|
@@ -1242,34 +1240,34 @@ var or = /* @__PURE__ */ d((e, t) => {
|
|
|
1242
1240
|
};
|
|
1243
1241
|
return l === 0 && (w.x = t.x, w.y = t.y), h === 0 && (w.x = t.x), u === 0 && (w.y = t.y), L.debug(`abc89 topp/bott calc, Q ${u}, q ${x}, R ${h}, r ${l}`, w), w;
|
|
1244
1242
|
} else {
|
|
1245
|
-
s.x < t.x ? l = t.x -
|
|
1243
|
+
s.x < t.x ? l = t.x - a - n : l = n - a - t.x;
|
|
1246
1244
|
let x = u * l / h, w = s.x < t.x ? s.x + h - l : s.x - h + l, b = s.y < t.y ? s.y + x : s.y - x;
|
|
1247
1245
|
return L.debug(`sides calc abc89, Q ${u}, q ${x}, R ${h}, r ${l}`, { _x: w, _y: b }), l === 0 && (w = t.x, b = t.y), h === 0 && (w = t.x), u === 0 && (b = t.y), { x: w, y: b };
|
|
1248
1246
|
}
|
|
1249
1247
|
}, "intersection"), Rt = /* @__PURE__ */ d((e, t) => {
|
|
1250
1248
|
L.debug("abc88 cutPathAtIntersect", e, t);
|
|
1251
1249
|
let s = [], n = e[0], i = false;
|
|
1252
|
-
return e.forEach((
|
|
1253
|
-
if (!
|
|
1254
|
-
const
|
|
1250
|
+
return e.forEach((r) => {
|
|
1251
|
+
if (!cr(t, r) && !i) {
|
|
1252
|
+
const a = or(t, n, r);
|
|
1255
1253
|
let l = false;
|
|
1256
1254
|
s.forEach((c) => {
|
|
1257
|
-
l = l || c.x ===
|
|
1258
|
-
}), s.some((c) => c.x ===
|
|
1255
|
+
l = l || c.x === a.x && c.y === a.y;
|
|
1256
|
+
}), s.some((c) => c.x === a.x && c.y === a.y) || s.push(a), i = true;
|
|
1259
1257
|
} else
|
|
1260
|
-
n =
|
|
1258
|
+
n = r, i || s.push(r);
|
|
1261
1259
|
}), s;
|
|
1262
|
-
}, "cutPathAtIntersect"),
|
|
1260
|
+
}, "cutPathAtIntersect"), hr = /* @__PURE__ */ d(function(e, t, s, n, i, r, a) {
|
|
1263
1261
|
let l = s.points;
|
|
1264
1262
|
L.debug("abc88 InsertEdge: edge=", s, "e=", t);
|
|
1265
1263
|
let c = false;
|
|
1266
|
-
const u =
|
|
1267
|
-
var h =
|
|
1264
|
+
const u = r.node(t.v);
|
|
1265
|
+
var h = r.node(t.w);
|
|
1268
1266
|
(h == null ? void 0 : h.intersect) && (u == null ? void 0 : u.intersect) && (l = l.slice(1, s.points.length - 1), l.unshift(u.intersect(l[0])), l.push(h.intersect(l[l.length - 1]))), s.toCluster && (L.debug("to cluster abc88", n[s.toCluster]), l = Rt(s.points, n[s.toCluster].node), c = true), s.fromCluster && (L.debug("from cluster abc88", n[s.fromCluster]), l = Rt(l.reverse(), n[s.fromCluster].node).reverse(), c = true);
|
|
1269
1267
|
const x = l.filter((y) => !Number.isNaN(y.y));
|
|
1270
|
-
let w =
|
|
1268
|
+
let w = Le;
|
|
1271
1269
|
s.curve && (i === "graph" || i === "flowchart") && (w = s.curve);
|
|
1272
|
-
const { x: b, y: S } =
|
|
1270
|
+
const { x: b, y: S } = ge(s), E = me().x(b).y(S).curve(w);
|
|
1273
1271
|
let k;
|
|
1274
1272
|
switch (s.thickness) {
|
|
1275
1273
|
case "normal":
|
|
@@ -1297,10 +1295,10 @@ var or = /* @__PURE__ */ d((e, t) => {
|
|
|
1297
1295
|
}
|
|
1298
1296
|
const B = e.append("path").attr("d", E(x)).attr("id", s.id).attr("class", " " + k + (s.classes ? " " + s.classes : "")).attr("style", s.style);
|
|
1299
1297
|
let _ = "";
|
|
1300
|
-
(R().flowchart.arrowMarkerAbsolute || R().state.arrowMarkerAbsolute) && (_ =
|
|
1298
|
+
(R().flowchart.arrowMarkerAbsolute || R().state.arrowMarkerAbsolute) && (_ = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, _ = _.replace(/\(/g, "\\("), _ = _.replace(/\)/g, "\\)")), sr(B, s, _, a, i);
|
|
1301
1299
|
let D = {};
|
|
1302
1300
|
return c && (D.updatedPath = l), D.originalPath = s.points, D;
|
|
1303
|
-
}, "insertEdge"),
|
|
1301
|
+
}, "insertEdge"), dr = /* @__PURE__ */ d((e) => {
|
|
1304
1302
|
const t = /* @__PURE__ */ new Set();
|
|
1305
1303
|
for (const s of e)
|
|
1306
1304
|
switch (s) {
|
|
@@ -1315,136 +1313,136 @@ var or = /* @__PURE__ */ d((e, t) => {
|
|
|
1315
1313
|
break;
|
|
1316
1314
|
}
|
|
1317
1315
|
return t;
|
|
1318
|
-
}, "expandAndDeduplicateDirections"),
|
|
1319
|
-
const n =
|
|
1316
|
+
}, "expandAndDeduplicateDirections"), gr = /* @__PURE__ */ d((e, t, s) => {
|
|
1317
|
+
const n = dr(e), i = 2, r = t.height + 2 * s.padding, a = r / i, l = t.width + 2 * a + s.padding, c = s.padding / 2;
|
|
1320
1318
|
return n.has("right") && n.has("left") && n.has("up") && n.has("down") ? [
|
|
1321
1319
|
// Bottom
|
|
1322
1320
|
{ x: 0, y: 0 },
|
|
1323
|
-
{ x:
|
|
1321
|
+
{ x: a, y: 0 },
|
|
1324
1322
|
{ x: l / 2, y: 2 * c },
|
|
1325
|
-
{ x: l -
|
|
1323
|
+
{ x: l - a, y: 0 },
|
|
1326
1324
|
{ x: l, y: 0 },
|
|
1327
1325
|
// Right
|
|
1328
|
-
{ x: l, y: -
|
|
1329
|
-
{ x: l + 2 * c, y: -
|
|
1330
|
-
{ x: l, y: -2 *
|
|
1331
|
-
{ x: l, y: -
|
|
1326
|
+
{ x: l, y: -r / 3 },
|
|
1327
|
+
{ x: l + 2 * c, y: -r / 2 },
|
|
1328
|
+
{ x: l, y: -2 * r / 3 },
|
|
1329
|
+
{ x: l, y: -r },
|
|
1332
1330
|
// Top
|
|
1333
|
-
{ x: l -
|
|
1334
|
-
{ x: l / 2, y: -
|
|
1335
|
-
{ x:
|
|
1331
|
+
{ x: l - a, y: -r },
|
|
1332
|
+
{ x: l / 2, y: -r - 2 * c },
|
|
1333
|
+
{ x: a, y: -r },
|
|
1336
1334
|
// Left
|
|
1337
|
-
{ x: 0, y: -
|
|
1338
|
-
{ x: 0, y: -2 *
|
|
1339
|
-
{ x: -2 * c, y: -
|
|
1340
|
-
{ x: 0, y: -
|
|
1335
|
+
{ x: 0, y: -r },
|
|
1336
|
+
{ x: 0, y: -2 * r / 3 },
|
|
1337
|
+
{ x: -2 * c, y: -r / 2 },
|
|
1338
|
+
{ x: 0, y: -r / 3 }
|
|
1341
1339
|
] : n.has("right") && n.has("left") && n.has("up") ? [
|
|
1342
|
-
{ x:
|
|
1343
|
-
{ x: l -
|
|
1344
|
-
{ x: l, y: -
|
|
1345
|
-
{ x: l -
|
|
1346
|
-
{ x:
|
|
1347
|
-
{ x: 0, y: -
|
|
1340
|
+
{ x: a, y: 0 },
|
|
1341
|
+
{ x: l - a, y: 0 },
|
|
1342
|
+
{ x: l, y: -r / 2 },
|
|
1343
|
+
{ x: l - a, y: -r },
|
|
1344
|
+
{ x: a, y: -r },
|
|
1345
|
+
{ x: 0, y: -r / 2 }
|
|
1348
1346
|
] : n.has("right") && n.has("left") && n.has("down") ? [
|
|
1349
1347
|
{ x: 0, y: 0 },
|
|
1350
|
-
{ x:
|
|
1351
|
-
{ x: l -
|
|
1348
|
+
{ x: a, y: -r },
|
|
1349
|
+
{ x: l - a, y: -r },
|
|
1352
1350
|
{ x: l, y: 0 }
|
|
1353
1351
|
] : n.has("right") && n.has("up") && n.has("down") ? [
|
|
1354
1352
|
{ x: 0, y: 0 },
|
|
1355
|
-
{ x: l, y: -
|
|
1356
|
-
{ x: l, y: -
|
|
1357
|
-
{ x: 0, y: -
|
|
1353
|
+
{ x: l, y: -a },
|
|
1354
|
+
{ x: l, y: -r + a },
|
|
1355
|
+
{ x: 0, y: -r }
|
|
1358
1356
|
] : n.has("left") && n.has("up") && n.has("down") ? [
|
|
1359
1357
|
{ x: l, y: 0 },
|
|
1360
|
-
{ x: 0, y: -
|
|
1361
|
-
{ x: 0, y: -
|
|
1362
|
-
{ x: l, y: -
|
|
1358
|
+
{ x: 0, y: -a },
|
|
1359
|
+
{ x: 0, y: -r + a },
|
|
1360
|
+
{ x: l, y: -r }
|
|
1363
1361
|
] : n.has("right") && n.has("left") ? [
|
|
1364
|
-
{ x:
|
|
1365
|
-
{ x:
|
|
1366
|
-
{ x: l -
|
|
1367
|
-
{ x: l -
|
|
1368
|
-
{ x: l, y: -
|
|
1369
|
-
{ x: l -
|
|
1370
|
-
{ x: l -
|
|
1371
|
-
{ x:
|
|
1372
|
-
{ x:
|
|
1373
|
-
{ x: 0, y: -
|
|
1362
|
+
{ x: a, y: 0 },
|
|
1363
|
+
{ x: a, y: -c },
|
|
1364
|
+
{ x: l - a, y: -c },
|
|
1365
|
+
{ x: l - a, y: 0 },
|
|
1366
|
+
{ x: l, y: -r / 2 },
|
|
1367
|
+
{ x: l - a, y: -r },
|
|
1368
|
+
{ x: l - a, y: -r + c },
|
|
1369
|
+
{ x: a, y: -r + c },
|
|
1370
|
+
{ x: a, y: -r },
|
|
1371
|
+
{ x: 0, y: -r / 2 }
|
|
1374
1372
|
] : n.has("up") && n.has("down") ? [
|
|
1375
1373
|
// Bottom center
|
|
1376
1374
|
{ x: l / 2, y: 0 },
|
|
1377
1375
|
// Left pont of bottom arrow
|
|
1378
1376
|
{ x: 0, y: -c },
|
|
1379
|
-
{ x:
|
|
1377
|
+
{ x: a, y: -c },
|
|
1380
1378
|
// Left top over vertical section
|
|
1381
|
-
{ x:
|
|
1382
|
-
{ x: 0, y: -
|
|
1379
|
+
{ x: a, y: -r + c },
|
|
1380
|
+
{ x: 0, y: -r + c },
|
|
1383
1381
|
// Top of arrow
|
|
1384
|
-
{ x: l / 2, y: -
|
|
1385
|
-
{ x: l, y: -
|
|
1382
|
+
{ x: l / 2, y: -r },
|
|
1383
|
+
{ x: l, y: -r + c },
|
|
1386
1384
|
// Top of right vertical bar
|
|
1387
|
-
{ x: l -
|
|
1388
|
-
{ x: l -
|
|
1385
|
+
{ x: l - a, y: -r + c },
|
|
1386
|
+
{ x: l - a, y: -c },
|
|
1389
1387
|
{ x: l, y: -c }
|
|
1390
1388
|
] : n.has("right") && n.has("up") ? [
|
|
1391
1389
|
{ x: 0, y: 0 },
|
|
1392
|
-
{ x: l, y: -
|
|
1393
|
-
{ x: 0, y: -
|
|
1390
|
+
{ x: l, y: -a },
|
|
1391
|
+
{ x: 0, y: -r }
|
|
1394
1392
|
] : n.has("right") && n.has("down") ? [
|
|
1395
1393
|
{ x: 0, y: 0 },
|
|
1396
1394
|
{ x: l, y: 0 },
|
|
1397
|
-
{ x: 0, y: -
|
|
1395
|
+
{ x: 0, y: -r }
|
|
1398
1396
|
] : n.has("left") && n.has("up") ? [
|
|
1399
1397
|
{ x: l, y: 0 },
|
|
1400
|
-
{ x: 0, y: -
|
|
1401
|
-
{ x: l, y: -
|
|
1398
|
+
{ x: 0, y: -a },
|
|
1399
|
+
{ x: l, y: -r }
|
|
1402
1400
|
] : n.has("left") && n.has("down") ? [
|
|
1403
1401
|
{ x: l, y: 0 },
|
|
1404
1402
|
{ x: 0, y: 0 },
|
|
1405
|
-
{ x: l, y: -
|
|
1403
|
+
{ x: l, y: -r }
|
|
1406
1404
|
] : n.has("right") ? [
|
|
1407
|
-
{ x:
|
|
1408
|
-
{ x:
|
|
1409
|
-
{ x: l -
|
|
1410
|
-
{ x: l -
|
|
1411
|
-
{ x: l, y: -
|
|
1412
|
-
{ x: l -
|
|
1413
|
-
{ x: l -
|
|
1405
|
+
{ x: a, y: -c },
|
|
1406
|
+
{ x: a, y: -c },
|
|
1407
|
+
{ x: l - a, y: -c },
|
|
1408
|
+
{ x: l - a, y: 0 },
|
|
1409
|
+
{ x: l, y: -r / 2 },
|
|
1410
|
+
{ x: l - a, y: -r },
|
|
1411
|
+
{ x: l - a, y: -r + c },
|
|
1414
1412
|
// top left corner of arrow
|
|
1415
|
-
{ x:
|
|
1416
|
-
{ x:
|
|
1413
|
+
{ x: a, y: -r + c },
|
|
1414
|
+
{ x: a, y: -r + c }
|
|
1417
1415
|
] : n.has("left") ? [
|
|
1418
|
-
{ x:
|
|
1419
|
-
{ x:
|
|
1416
|
+
{ x: a, y: 0 },
|
|
1417
|
+
{ x: a, y: -c },
|
|
1420
1418
|
// Two points, the right corners
|
|
1421
|
-
{ x: l -
|
|
1422
|
-
{ x: l -
|
|
1423
|
-
{ x:
|
|
1424
|
-
{ x:
|
|
1425
|
-
{ x: 0, y: -
|
|
1419
|
+
{ x: l - a, y: -c },
|
|
1420
|
+
{ x: l - a, y: -r + c },
|
|
1421
|
+
{ x: a, y: -r + c },
|
|
1422
|
+
{ x: a, y: -r },
|
|
1423
|
+
{ x: 0, y: -r / 2 }
|
|
1426
1424
|
] : n.has("up") ? [
|
|
1427
1425
|
// Bottom center
|
|
1428
|
-
{ x:
|
|
1426
|
+
{ x: a, y: -c },
|
|
1429
1427
|
// Left top over vertical section
|
|
1430
|
-
{ x:
|
|
1431
|
-
{ x: 0, y: -
|
|
1428
|
+
{ x: a, y: -r + c },
|
|
1429
|
+
{ x: 0, y: -r + c },
|
|
1432
1430
|
// Top of arrow
|
|
1433
|
-
{ x: l / 2, y: -
|
|
1434
|
-
{ x: l, y: -
|
|
1431
|
+
{ x: l / 2, y: -r },
|
|
1432
|
+
{ x: l, y: -r + c },
|
|
1435
1433
|
// Top of right vertical bar
|
|
1436
|
-
{ x: l -
|
|
1437
|
-
{ x: l -
|
|
1434
|
+
{ x: l - a, y: -r + c },
|
|
1435
|
+
{ x: l - a, y: -c }
|
|
1438
1436
|
] : n.has("down") ? [
|
|
1439
1437
|
// Bottom center
|
|
1440
1438
|
{ x: l / 2, y: 0 },
|
|
1441
1439
|
// Left pont of bottom arrow
|
|
1442
1440
|
{ x: 0, y: -c },
|
|
1443
|
-
{ x:
|
|
1441
|
+
{ x: a, y: -c },
|
|
1444
1442
|
// Left top over vertical section
|
|
1445
|
-
{ x:
|
|
1446
|
-
{ x: l -
|
|
1447
|
-
{ x: l -
|
|
1443
|
+
{ x: a, y: -r + c },
|
|
1444
|
+
{ x: l - a, y: -r + c },
|
|
1445
|
+
{ x: l - a, y: -c },
|
|
1448
1446
|
{ x: l, y: -c }
|
|
1449
1447
|
] : [{ x: 0, y: 0 }];
|
|
1450
1448
|
}, "getArrowPoints");
|
|
@@ -1452,12 +1450,12 @@ function Gt(e, t) {
|
|
|
1452
1450
|
return e.intersect(t);
|
|
1453
1451
|
}
|
|
1454
1452
|
d(Gt, "intersectNode");
|
|
1455
|
-
var
|
|
1453
|
+
var ur = Gt;
|
|
1456
1454
|
function Zt(e, t, s, n) {
|
|
1457
|
-
var i = e.x,
|
|
1455
|
+
var i = e.x, r = e.y, a = i - n.x, l = r - n.y, c = Math.sqrt(t * t * l * l + s * s * a * a), u = Math.abs(t * s * a / c);
|
|
1458
1456
|
n.x < i && (u = -u);
|
|
1459
1457
|
var h = Math.abs(t * s * l / c);
|
|
1460
|
-
return n.y <
|
|
1458
|
+
return n.y < r && (h = -h), { x: i + u, y: r + h };
|
|
1461
1459
|
}
|
|
1462
1460
|
d(Zt, "intersectEllipse");
|
|
1463
1461
|
var qt = Zt;
|
|
@@ -1465,53 +1463,53 @@ function Jt(e, t, s) {
|
|
|
1465
1463
|
return qt(e, t, t, s);
|
|
1466
1464
|
}
|
|
1467
1465
|
d(Jt, "intersectCircle");
|
|
1468
|
-
var
|
|
1466
|
+
var pr = Jt;
|
|
1469
1467
|
function Qt(e, t, s, n) {
|
|
1470
|
-
var i,
|
|
1471
|
-
if (i = t.y - e.y,
|
|
1472
|
-
return E = Math.abs(S / 2), k =
|
|
1468
|
+
var i, r, a, l, c, u, h, x, w, b, S, E, k, B, _;
|
|
1469
|
+
if (i = t.y - e.y, a = e.x - t.x, c = t.x * e.y - e.x * t.y, w = i * s.x + a * s.y + c, b = i * n.x + a * n.y + c, !(w !== 0 && b !== 0 && Lt(w, b)) && (r = n.y - s.y, l = s.x - n.x, u = n.x * s.y - s.x * n.y, h = r * e.x + l * e.y + u, x = r * t.x + l * t.y + u, !(h !== 0 && x !== 0 && Lt(h, x)) && (S = i * l - r * a, S !== 0)))
|
|
1470
|
+
return E = Math.abs(S / 2), k = a * u - l * c, B = k < 0 ? (k - E) / S : (k + E) / S, k = r * c - i * u, _ = k < 0 ? (k - E) / S : (k + E) / S, { x: B, y: _ };
|
|
1473
1471
|
}
|
|
1474
1472
|
d(Qt, "intersectLine");
|
|
1475
1473
|
function Lt(e, t) {
|
|
1476
1474
|
return e * t > 0;
|
|
1477
1475
|
}
|
|
1478
1476
|
d(Lt, "sameSign");
|
|
1479
|
-
var
|
|
1477
|
+
var fr = Qt, xr = $t;
|
|
1480
1478
|
function $t(e, t, s) {
|
|
1481
|
-
var n = e.x, i = e.y,
|
|
1479
|
+
var n = e.x, i = e.y, r = [], a = Number.POSITIVE_INFINITY, l = Number.POSITIVE_INFINITY;
|
|
1482
1480
|
typeof t.forEach == "function" ? t.forEach(function(S) {
|
|
1483
|
-
|
|
1484
|
-
}) : (
|
|
1485
|
-
for (var c = n - e.width / 2 -
|
|
1486
|
-
var x = t[h], w = t[h < t.length - 1 ? h + 1 : 0], b =
|
|
1481
|
+
a = Math.min(a, S.x), l = Math.min(l, S.y);
|
|
1482
|
+
}) : (a = Math.min(a, t.x), l = Math.min(l, t.y));
|
|
1483
|
+
for (var c = n - e.width / 2 - a, u = i - e.height / 2 - l, h = 0; h < t.length; h++) {
|
|
1484
|
+
var x = t[h], w = t[h < t.length - 1 ? h + 1 : 0], b = fr(
|
|
1487
1485
|
e,
|
|
1488
1486
|
s,
|
|
1489
1487
|
{ x: c + x.x, y: u + x.y },
|
|
1490
1488
|
{ x: c + w.x, y: u + w.y }
|
|
1491
1489
|
);
|
|
1492
|
-
b &&
|
|
1490
|
+
b && r.push(b);
|
|
1493
1491
|
}
|
|
1494
|
-
return
|
|
1492
|
+
return r.length ? (r.length > 1 && r.sort(function(S, E) {
|
|
1495
1493
|
var k = S.x - s.x, B = S.y - s.y, _ = Math.sqrt(k * k + B * B), D = E.x - s.x, y = E.y - s.y, g = Math.sqrt(D * D + y * y);
|
|
1496
1494
|
return _ < g ? -1 : _ === g ? 0 : 1;
|
|
1497
|
-
}),
|
|
1495
|
+
}), r[0]) : e;
|
|
1498
1496
|
}
|
|
1499
1497
|
d($t, "intersectPolygon");
|
|
1500
|
-
var
|
|
1501
|
-
var s = e.x, n = e.y, i = t.x - s,
|
|
1502
|
-
return Math.abs(
|
|
1503
|
-
}, "intersectRect"),
|
|
1504
|
-
node:
|
|
1505
|
-
circle:
|
|
1498
|
+
var yr = /* @__PURE__ */ d((e, t) => {
|
|
1499
|
+
var s = e.x, n = e.y, i = t.x - s, r = t.y - n, a = e.width / 2, l = e.height / 2, c, u;
|
|
1500
|
+
return Math.abs(r) * a > Math.abs(i) * l ? (r < 0 && (l = -l), c = r === 0 ? 0 : l * i / r, u = l) : (i < 0 && (a = -a), c = a, u = i === 0 ? 0 : a * r / i), { x: s + c, y: n + u };
|
|
1501
|
+
}, "intersectRect"), br = yr, N = {
|
|
1502
|
+
node: ur,
|
|
1503
|
+
circle: pr,
|
|
1506
1504
|
ellipse: qt,
|
|
1507
|
-
polygon:
|
|
1508
|
-
rect:
|
|
1505
|
+
polygon: xr,
|
|
1506
|
+
rect: br
|
|
1509
1507
|
}, A = /* @__PURE__ */ d(async (e, t, s, n) => {
|
|
1510
1508
|
const i = R();
|
|
1511
|
-
let
|
|
1512
|
-
const
|
|
1513
|
-
s ?
|
|
1514
|
-
const l = e.insert("g").attr("class",
|
|
1509
|
+
let r;
|
|
1510
|
+
const a = t.useHtmlLabels || j(i.flowchart.htmlLabels);
|
|
1511
|
+
s ? r = s : r = "node default";
|
|
1512
|
+
const l = e.insert("g").attr("class", r).attr("id", t.domId || t.id), c = l.insert("g").attr("class", "label").attr("style", t.labelStyle);
|
|
1515
1513
|
let u;
|
|
1516
1514
|
t.labelText === void 0 ? u = "" : u = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
|
|
1517
1515
|
const h = c.node();
|
|
@@ -1520,18 +1518,13 @@ var wr = /* @__PURE__ */ d((e, t) => {
|
|
|
1520
1518
|
c,
|
|
1521
1519
|
Tt(xt(u), i),
|
|
1522
1520
|
{
|
|
1523
|
-
useHtmlLabels:
|
|
1521
|
+
useHtmlLabels: a,
|
|
1524
1522
|
width: t.width || i.flowchart.wrappingWidth,
|
|
1525
1523
|
classes: "markdown-node-label"
|
|
1526
1524
|
},
|
|
1527
1525
|
i
|
|
1528
1526
|
) : x = h.appendChild(
|
|
1529
|
-
|
|
1530
|
-
Tt(xt(u), i),
|
|
1531
|
-
t.labelStyle,
|
|
1532
|
-
false,
|
|
1533
|
-
n
|
|
1534
|
-
)
|
|
1527
|
+
K(Tt(xt(u), i), t.labelStyle, false, n)
|
|
1535
1528
|
);
|
|
1536
1529
|
let w = x.getBBox();
|
|
1537
1530
|
const b = t.padding / 2;
|
|
@@ -1559,7 +1552,7 @@ var wr = /* @__PURE__ */ d((e, t) => {
|
|
|
1559
1552
|
}
|
|
1560
1553
|
w = S.getBoundingClientRect(), E.attr("width", w.width), E.attr("height", w.height);
|
|
1561
1554
|
}
|
|
1562
|
-
return
|
|
1555
|
+
return a ? c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")") : c.attr("transform", "translate(0, " + -w.height / 2 + ")"), t.centerLabel && c.attr("transform", "translate(" + -w.width / 2 + ", " + -w.height / 2 + ")"), c.insert("rect", ":first-child"), { shapeSvg: l, bbox: w, halfPadding: b, label: c };
|
|
1563
1556
|
}, "labelHelper"), T = /* @__PURE__ */ d((e, t) => {
|
|
1564
1557
|
const s = t.node().getBBox();
|
|
1565
1558
|
e.width = s.width, e.height = s.height;
|
|
@@ -1573,20 +1566,20 @@ function U(e, t, s, n) {
|
|
|
1573
1566
|
).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + s / 2 + ")");
|
|
1574
1567
|
}
|
|
1575
1568
|
d(U, "insertPolygonShape");
|
|
1576
|
-
var
|
|
1569
|
+
var wr = /* @__PURE__ */ d(async (e, t) => {
|
|
1577
1570
|
t.useHtmlLabels || R().flowchart.htmlLabels || (t.centerLabel = true);
|
|
1578
|
-
const { shapeSvg: n, bbox: i, halfPadding:
|
|
1571
|
+
const { shapeSvg: n, bbox: i, halfPadding: r } = await A(
|
|
1579
1572
|
e,
|
|
1580
1573
|
t,
|
|
1581
1574
|
"node " + t.classes,
|
|
1582
1575
|
true
|
|
1583
1576
|
);
|
|
1584
1577
|
L.info("Classes = ", t.classes);
|
|
1585
|
-
const
|
|
1586
|
-
return
|
|
1578
|
+
const a = n.insert("rect", ":first-child");
|
|
1579
|
+
return a.attr("rx", t.rx).attr("ry", t.ry).attr("x", -i.width / 2 - r).attr("y", -i.height / 2 - r).attr("width", i.width + t.padding).attr("height", i.height + t.padding), T(t, a), t.intersect = function(l) {
|
|
1587
1580
|
return N.rect(t, l);
|
|
1588
1581
|
}, n;
|
|
1589
|
-
}, "note"),
|
|
1582
|
+
}, "note"), mr = wr, zt = /* @__PURE__ */ d((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ d((e, t) => `${t || "node default"}${zt(e.classes)} ${zt(
|
|
1590
1583
|
e.class
|
|
1591
1584
|
)}`, "getClassesFromNode"), At = /* @__PURE__ */ d(async (e, t) => {
|
|
1592
1585
|
const { shapeSvg: s, bbox: n } = await A(
|
|
@@ -1594,18 +1587,18 @@ var Lr = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1594
1587
|
t,
|
|
1595
1588
|
Y(t, void 0),
|
|
1596
1589
|
true
|
|
1597
|
-
), i = n.width + t.padding,
|
|
1598
|
-
{ x:
|
|
1599
|
-
{ x:
|
|
1600
|
-
{ x:
|
|
1601
|
-
{ x: 0, y: -
|
|
1590
|
+
), i = n.width + t.padding, r = n.height + t.padding, a = i + r, l = [
|
|
1591
|
+
{ x: a / 2, y: 0 },
|
|
1592
|
+
{ x: a, y: -a / 2 },
|
|
1593
|
+
{ x: a / 2, y: -a },
|
|
1594
|
+
{ x: 0, y: -a / 2 }
|
|
1602
1595
|
];
|
|
1603
1596
|
L.info("Question main (Circle)");
|
|
1604
|
-
const c = U(s,
|
|
1597
|
+
const c = U(s, a, a, l);
|
|
1605
1598
|
return c.attr("style", t.style), T(t, c), t.intersect = function(u) {
|
|
1606
1599
|
return L.warn("Intersect called"), N.polygon(t, l, u);
|
|
1607
1600
|
}, s;
|
|
1608
|
-
}, "question"),
|
|
1601
|
+
}, "question"), Lr = /* @__PURE__ */ d((e, t) => {
|
|
1609
1602
|
const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = 28, i = [
|
|
1610
1603
|
{ x: 0, y: n / 2 },
|
|
1611
1604
|
{ x: n / 2, y: 0 },
|
|
@@ -1614,198 +1607,198 @@ var Lr = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1614
1607
|
];
|
|
1615
1608
|
return s.insert("polygon", ":first-child").attr(
|
|
1616
1609
|
"points",
|
|
1617
|
-
i.map(function(
|
|
1618
|
-
return
|
|
1610
|
+
i.map(function(a) {
|
|
1611
|
+
return a.x + "," + a.y;
|
|
1619
1612
|
}).join(" ")
|
|
1620
|
-
).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(
|
|
1621
|
-
return N.circle(t, 14,
|
|
1613
|
+
).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(a) {
|
|
1614
|
+
return N.circle(t, 14, a);
|
|
1622
1615
|
}, s;
|
|
1623
|
-
}, "choice"),
|
|
1616
|
+
}, "choice"), Sr = /* @__PURE__ */ d(async (e, t) => {
|
|
1624
1617
|
const { shapeSvg: s, bbox: n } = await A(
|
|
1625
1618
|
e,
|
|
1626
1619
|
t,
|
|
1627
1620
|
Y(t, void 0),
|
|
1628
1621
|
true
|
|
1629
|
-
), i = 4,
|
|
1630
|
-
{ x:
|
|
1631
|
-
{ x: l -
|
|
1632
|
-
{ x: l, y: -
|
|
1633
|
-
{ x: l -
|
|
1634
|
-
{ x:
|
|
1635
|
-
{ x: 0, y: -
|
|
1636
|
-
], u = U(s, l,
|
|
1622
|
+
), i = 4, r = n.height + t.padding, a = r / i, l = n.width + 2 * a + t.padding, c = [
|
|
1623
|
+
{ x: a, y: 0 },
|
|
1624
|
+
{ x: l - a, y: 0 },
|
|
1625
|
+
{ x: l, y: -r / 2 },
|
|
1626
|
+
{ x: l - a, y: -r },
|
|
1627
|
+
{ x: a, y: -r },
|
|
1628
|
+
{ x: 0, y: -r / 2 }
|
|
1629
|
+
], u = U(s, l, r, c);
|
|
1637
1630
|
return u.attr("style", t.style), T(t, u), t.intersect = function(h) {
|
|
1638
1631
|
return N.polygon(t, c, h);
|
|
1639
1632
|
}, s;
|
|
1640
|
-
}, "hexagon"),
|
|
1641
|
-
const { shapeSvg: s, bbox: n } = await A(e, t, void 0, true), i = 2,
|
|
1633
|
+
}, "hexagon"), kr = /* @__PURE__ */ d(async (e, t) => {
|
|
1634
|
+
const { shapeSvg: s, bbox: n } = await A(e, t, void 0, true), i = 2, r = n.height + 2 * t.padding, a = r / i, l = n.width + 2 * a + t.padding, c = gr(t.directions, n, t), u = U(s, l, r, c);
|
|
1642
1635
|
return u.attr("style", t.style), T(t, u), t.intersect = function(h) {
|
|
1643
1636
|
return N.polygon(t, c, h);
|
|
1644
1637
|
}, s;
|
|
1645
|
-
}, "block_arrow"),
|
|
1638
|
+
}, "block_arrow"), vr = /* @__PURE__ */ d(async (e, t) => {
|
|
1646
1639
|
const { shapeSvg: s, bbox: n } = await A(
|
|
1647
1640
|
e,
|
|
1648
1641
|
t,
|
|
1649
1642
|
Y(t, void 0),
|
|
1650
1643
|
true
|
|
1651
|
-
), i = n.width + t.padding,
|
|
1652
|
-
{ x: -
|
|
1644
|
+
), i = n.width + t.padding, r = n.height + t.padding, a = [
|
|
1645
|
+
{ x: -r / 2, y: 0 },
|
|
1653
1646
|
{ x: i, y: 0 },
|
|
1654
|
-
{ x: i, y: -
|
|
1655
|
-
{ x: -
|
|
1656
|
-
{ x: 0, y: -
|
|
1647
|
+
{ x: i, y: -r },
|
|
1648
|
+
{ x: -r / 2, y: -r },
|
|
1649
|
+
{ x: 0, y: -r / 2 }
|
|
1657
1650
|
];
|
|
1658
|
-
return U(s, i,
|
|
1659
|
-
return N.polygon(t,
|
|
1651
|
+
return U(s, i, r, a).attr("style", t.style), t.width = i + r, t.height = r, t.intersect = function(c) {
|
|
1652
|
+
return N.polygon(t, a, c);
|
|
1660
1653
|
}, s;
|
|
1661
|
-
}, "rect_left_inv_arrow"),
|
|
1662
|
-
const { shapeSvg: s, bbox: n } = await A(e, t, Y(t), true), i = n.width + t.padding,
|
|
1663
|
-
{ x: -2 *
|
|
1664
|
-
{ x: i -
|
|
1665
|
-
{ x: i + 2 *
|
|
1666
|
-
{ x:
|
|
1667
|
-
], l = U(s, i,
|
|
1654
|
+
}, "rect_left_inv_arrow"), Er = /* @__PURE__ */ d(async (e, t) => {
|
|
1655
|
+
const { shapeSvg: s, bbox: n } = await A(e, t, Y(t), true), i = n.width + t.padding, r = n.height + t.padding, a = [
|
|
1656
|
+
{ x: -2 * r / 6, y: 0 },
|
|
1657
|
+
{ x: i - r / 6, y: 0 },
|
|
1658
|
+
{ x: i + 2 * r / 6, y: -r },
|
|
1659
|
+
{ x: r / 6, y: -r }
|
|
1660
|
+
], l = U(s, i, r, a);
|
|
1668
1661
|
return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
|
|
1669
|
-
return N.polygon(t,
|
|
1662
|
+
return N.polygon(t, a, c);
|
|
1670
1663
|
}, s;
|
|
1671
|
-
}, "lean_right"),
|
|
1664
|
+
}, "lean_right"), _r = /* @__PURE__ */ d(async (e, t) => {
|
|
1672
1665
|
const { shapeSvg: s, bbox: n } = await A(
|
|
1673
1666
|
e,
|
|
1674
1667
|
t,
|
|
1675
1668
|
Y(t, void 0),
|
|
1676
1669
|
true
|
|
1677
|
-
), i = n.width + t.padding,
|
|
1678
|
-
{ x: 2 *
|
|
1679
|
-
{ x: i +
|
|
1680
|
-
{ x: i - 2 *
|
|
1681
|
-
{ x: -
|
|
1682
|
-
], l = U(s, i,
|
|
1670
|
+
), i = n.width + t.padding, r = n.height + t.padding, a = [
|
|
1671
|
+
{ x: 2 * r / 6, y: 0 },
|
|
1672
|
+
{ x: i + r / 6, y: 0 },
|
|
1673
|
+
{ x: i - 2 * r / 6, y: -r },
|
|
1674
|
+
{ x: -r / 6, y: -r }
|
|
1675
|
+
], l = U(s, i, r, a);
|
|
1683
1676
|
return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
|
|
1684
|
-
return N.polygon(t,
|
|
1677
|
+
return N.polygon(t, a, c);
|
|
1685
1678
|
}, s;
|
|
1686
|
-
}, "lean_left"),
|
|
1679
|
+
}, "lean_left"), Dr = /* @__PURE__ */ d(async (e, t) => {
|
|
1687
1680
|
const { shapeSvg: s, bbox: n } = await A(
|
|
1688
1681
|
e,
|
|
1689
1682
|
t,
|
|
1690
1683
|
Y(t, void 0),
|
|
1691
1684
|
true
|
|
1692
|
-
), i = n.width + t.padding,
|
|
1693
|
-
{ x: -2 *
|
|
1694
|
-
{ x: i + 2 *
|
|
1695
|
-
{ x: i -
|
|
1696
|
-
{ x:
|
|
1697
|
-
], l = U(s, i,
|
|
1685
|
+
), i = n.width + t.padding, r = n.height + t.padding, a = [
|
|
1686
|
+
{ x: -2 * r / 6, y: 0 },
|
|
1687
|
+
{ x: i + 2 * r / 6, y: 0 },
|
|
1688
|
+
{ x: i - r / 6, y: -r },
|
|
1689
|
+
{ x: r / 6, y: -r }
|
|
1690
|
+
], l = U(s, i, r, a);
|
|
1698
1691
|
return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
|
|
1699
|
-
return N.polygon(t,
|
|
1692
|
+
return N.polygon(t, a, c);
|
|
1700
1693
|
}, s;
|
|
1701
|
-
}, "trapezoid"),
|
|
1694
|
+
}, "trapezoid"), Nr = /* @__PURE__ */ d(async (e, t) => {
|
|
1702
1695
|
const { shapeSvg: s, bbox: n } = await A(
|
|
1703
1696
|
e,
|
|
1704
1697
|
t,
|
|
1705
1698
|
Y(t, void 0),
|
|
1706
1699
|
true
|
|
1707
|
-
), i = n.width + t.padding,
|
|
1708
|
-
{ x:
|
|
1709
|
-
{ x: i -
|
|
1710
|
-
{ x: i + 2 *
|
|
1711
|
-
{ x: -2 *
|
|
1712
|
-
], l = U(s, i,
|
|
1700
|
+
), i = n.width + t.padding, r = n.height + t.padding, a = [
|
|
1701
|
+
{ x: r / 6, y: 0 },
|
|
1702
|
+
{ x: i - r / 6, y: 0 },
|
|
1703
|
+
{ x: i + 2 * r / 6, y: -r },
|
|
1704
|
+
{ x: -2 * r / 6, y: -r }
|
|
1705
|
+
], l = U(s, i, r, a);
|
|
1713
1706
|
return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
|
|
1714
|
-
return N.polygon(t,
|
|
1707
|
+
return N.polygon(t, a, c);
|
|
1715
1708
|
}, s;
|
|
1716
|
-
}, "inv_trapezoid"),
|
|
1709
|
+
}, "inv_trapezoid"), Tr = /* @__PURE__ */ d(async (e, t) => {
|
|
1717
1710
|
const { shapeSvg: s, bbox: n } = await A(
|
|
1718
1711
|
e,
|
|
1719
1712
|
t,
|
|
1720
1713
|
Y(t, void 0),
|
|
1721
1714
|
true
|
|
1722
|
-
), i = n.width + t.padding,
|
|
1715
|
+
), i = n.width + t.padding, r = n.height + t.padding, a = [
|
|
1723
1716
|
{ x: 0, y: 0 },
|
|
1724
|
-
{ x: i +
|
|
1725
|
-
{ x: i, y: -
|
|
1726
|
-
{ x: i +
|
|
1727
|
-
{ x: 0, y: -
|
|
1728
|
-
], l = U(s, i,
|
|
1717
|
+
{ x: i + r / 2, y: 0 },
|
|
1718
|
+
{ x: i, y: -r / 2 },
|
|
1719
|
+
{ x: i + r / 2, y: -r },
|
|
1720
|
+
{ x: 0, y: -r }
|
|
1721
|
+
], l = U(s, i, r, a);
|
|
1729
1722
|
return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
|
|
1730
|
-
return N.polygon(t,
|
|
1723
|
+
return N.polygon(t, a, c);
|
|
1731
1724
|
}, s;
|
|
1732
|
-
}, "rect_right_inv_arrow"),
|
|
1725
|
+
}, "rect_right_inv_arrow"), Br = /* @__PURE__ */ d(async (e, t) => {
|
|
1733
1726
|
const { shapeSvg: s, bbox: n } = await A(
|
|
1734
1727
|
e,
|
|
1735
1728
|
t,
|
|
1736
1729
|
Y(t, void 0),
|
|
1737
1730
|
true
|
|
1738
|
-
), i = n.width + t.padding,
|
|
1731
|
+
), i = n.width + t.padding, r = i / 2, a = r / (2.5 + i / 50), l = n.height + a + t.padding, c = "M 0," + a + " a " + r + "," + a + " 0,0,0 " + i + " 0 a " + r + "," + a + " 0,0,0 " + -i + " 0 l 0," + l + " a " + r + "," + a + " 0,0,0 " + i + " 0 l 0," + -l, u = s.attr("label-offset-y", a).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -i / 2 + "," + -(l / 2 + a) + ")");
|
|
1739
1732
|
return T(t, u), t.intersect = function(h) {
|
|
1740
1733
|
const x = N.rect(t, h), w = x.x - t.x;
|
|
1741
|
-
if (
|
|
1742
|
-
let b =
|
|
1743
|
-
b != 0 && (b = Math.sqrt(b)), b =
|
|
1734
|
+
if (r != 0 && (Math.abs(w) < t.width / 2 || Math.abs(w) == t.width / 2 && Math.abs(x.y - t.y) > t.height / 2 - a)) {
|
|
1735
|
+
let b = a * a * (1 - w * w / (r * r));
|
|
1736
|
+
b != 0 && (b = Math.sqrt(b)), b = a - b, h.y - t.y > 0 && (b = -b), x.y += b;
|
|
1744
1737
|
}
|
|
1745
1738
|
return x;
|
|
1746
1739
|
}, s;
|
|
1747
|
-
}, "cylinder"),
|
|
1740
|
+
}, "cylinder"), Cr = /* @__PURE__ */ d(async (e, t) => {
|
|
1748
1741
|
const { shapeSvg: s, bbox: n, halfPadding: i } = await A(
|
|
1749
1742
|
e,
|
|
1750
1743
|
t,
|
|
1751
1744
|
"node " + t.classes + " " + t.class,
|
|
1752
1745
|
true
|
|
1753
|
-
),
|
|
1754
|
-
if (
|
|
1746
|
+
), r = s.insert("rect", ":first-child"), a = t.positioned ? t.width : n.width + t.padding, l = t.positioned ? t.height : n.height + t.padding, c = t.positioned ? -a / 2 : -n.width / 2 - i, u = t.positioned ? -l / 2 : -n.height / 2 - i;
|
|
1747
|
+
if (r.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", a).attr("height", l), t.props) {
|
|
1755
1748
|
const h = new Set(Object.keys(t.props));
|
|
1756
|
-
t.props.borders && (ht(
|
|
1749
|
+
t.props.borders && (ht(r, t.props.borders, a, l), h.delete("borders")), h.forEach((x) => {
|
|
1757
1750
|
L.warn(`Unknown node property ${x}`);
|
|
1758
1751
|
});
|
|
1759
1752
|
}
|
|
1760
|
-
return T(t,
|
|
1753
|
+
return T(t, r), t.intersect = function(h) {
|
|
1761
1754
|
return N.rect(t, h);
|
|
1762
1755
|
}, s;
|
|
1763
|
-
}, "rect"),
|
|
1756
|
+
}, "rect"), Ir = /* @__PURE__ */ d(async (e, t) => {
|
|
1764
1757
|
const { shapeSvg: s, bbox: n, halfPadding: i } = await A(
|
|
1765
1758
|
e,
|
|
1766
1759
|
t,
|
|
1767
1760
|
"node " + t.classes,
|
|
1768
1761
|
true
|
|
1769
|
-
),
|
|
1770
|
-
if (
|
|
1762
|
+
), r = s.insert("rect", ":first-child"), a = t.positioned ? t.width : n.width + t.padding, l = t.positioned ? t.height : n.height + t.padding, c = t.positioned ? -a / 2 : -n.width / 2 - i, u = t.positioned ? -l / 2 : -n.height / 2 - i;
|
|
1763
|
+
if (r.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", c).attr("y", u).attr("width", a).attr("height", l), t.props) {
|
|
1771
1764
|
const h = new Set(Object.keys(t.props));
|
|
1772
|
-
t.props.borders && (ht(
|
|
1765
|
+
t.props.borders && (ht(r, t.props.borders, a, l), h.delete("borders")), h.forEach((x) => {
|
|
1773
1766
|
L.warn(`Unknown node property ${x}`);
|
|
1774
1767
|
});
|
|
1775
1768
|
}
|
|
1776
|
-
return T(t,
|
|
1769
|
+
return T(t, r), t.intersect = function(h) {
|
|
1777
1770
|
return N.rect(t, h);
|
|
1778
1771
|
}, s;
|
|
1779
|
-
}, "composite"),
|
|
1772
|
+
}, "composite"), Or = /* @__PURE__ */ d(async (e, t) => {
|
|
1780
1773
|
const { shapeSvg: s } = await A(e, t, "label", true);
|
|
1781
1774
|
L.trace("Classes = ", t.class);
|
|
1782
|
-
const n = s.insert("rect", ":first-child"), i = 0,
|
|
1783
|
-
if (n.attr("width", i).attr("height",
|
|
1784
|
-
const
|
|
1785
|
-
t.props.borders && (ht(n, t.props.borders, i,
|
|
1775
|
+
const n = s.insert("rect", ":first-child"), i = 0, r = 0;
|
|
1776
|
+
if (n.attr("width", i).attr("height", r), s.attr("class", "label edgeLabel"), t.props) {
|
|
1777
|
+
const a = new Set(Object.keys(t.props));
|
|
1778
|
+
t.props.borders && (ht(n, t.props.borders, i, r), a.delete("borders")), a.forEach((l) => {
|
|
1786
1779
|
L.warn(`Unknown node property ${l}`);
|
|
1787
1780
|
});
|
|
1788
1781
|
}
|
|
1789
|
-
return T(t, n), t.intersect = function(
|
|
1790
|
-
return N.rect(t,
|
|
1782
|
+
return T(t, n), t.intersect = function(a) {
|
|
1783
|
+
return N.rect(t, a);
|
|
1791
1784
|
}, s;
|
|
1792
1785
|
}, "labelRect");
|
|
1793
1786
|
function ht(e, t, s, n) {
|
|
1794
|
-
const i = [],
|
|
1787
|
+
const i = [], r = /* @__PURE__ */ d((l) => {
|
|
1795
1788
|
i.push(l, 0);
|
|
1796
|
-
}, "addBorder"),
|
|
1789
|
+
}, "addBorder"), a = /* @__PURE__ */ d((l) => {
|
|
1797
1790
|
i.push(0, l);
|
|
1798
1791
|
}, "skipBorder");
|
|
1799
|
-
t.includes("t") ? (L.debug("add top border"),
|
|
1792
|
+
t.includes("t") ? (L.debug("add top border"), r(s)) : a(s), t.includes("r") ? (L.debug("add right border"), r(n)) : a(n), t.includes("b") ? (L.debug("add bottom border"), r(s)) : a(s), t.includes("l") ? (L.debug("add left border"), r(n)) : a(n), e.attr("stroke-dasharray", i.join(" "));
|
|
1800
1793
|
}
|
|
1801
1794
|
d(ht, "applyNodePropertyBorders");
|
|
1802
|
-
var
|
|
1795
|
+
var Rr = /* @__PURE__ */ d((e, t) => {
|
|
1803
1796
|
let s;
|
|
1804
1797
|
t.classes ? s = "node " + t.classes : s = "node default";
|
|
1805
|
-
const n = e.insert("g").attr("class", s).attr("id", t.domId || t.id), i = n.insert("rect", ":first-child"),
|
|
1798
|
+
const n = e.insert("g").attr("class", s).attr("id", t.domId || t.id), i = n.insert("rect", ":first-child"), r = n.insert("line"), a = n.insert("g").attr("class", "label"), l = t.labelText.flat ? t.labelText.flat() : t.labelText;
|
|
1806
1799
|
let c = "";
|
|
1807
1800
|
typeof l == "object" ? c = l[0] : c = l, L.info("Label text abc79", c, l, typeof l == "object");
|
|
1808
|
-
const u =
|
|
1801
|
+
const u = a.node().appendChild(K(c, t.labelStyle, true, true));
|
|
1809
1802
|
let h = { width: 0, height: 0 };
|
|
1810
1803
|
if (j(R().flowchart.htmlLabels)) {
|
|
1811
1804
|
const E = u.children[0], k = O(u);
|
|
@@ -1814,13 +1807,8 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1814
1807
|
L.info("Text 2", l);
|
|
1815
1808
|
const x = l.slice(1, l.length);
|
|
1816
1809
|
let w = u.getBBox();
|
|
1817
|
-
const b =
|
|
1818
|
-
|
|
1819
|
-
x.join ? x.join("<br/>") : x,
|
|
1820
|
-
t.labelStyle,
|
|
1821
|
-
true,
|
|
1822
|
-
true
|
|
1823
|
-
)
|
|
1810
|
+
const b = a.node().appendChild(
|
|
1811
|
+
K(x.join ? x.join("<br/>") : x, t.labelStyle, true, true)
|
|
1824
1812
|
);
|
|
1825
1813
|
if (j(R().flowchart.htmlLabels)) {
|
|
1826
1814
|
const E = b.children[0], k = O(b);
|
|
@@ -1835,91 +1823,91 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1835
1823
|
"transform",
|
|
1836
1824
|
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
1837
1825
|
(h.width < w.width ? 0 : -(w.width - h.width) / 2) + ", 0)"
|
|
1838
|
-
), h =
|
|
1826
|
+
), h = a.node().getBBox(), a.attr(
|
|
1839
1827
|
"transform",
|
|
1840
1828
|
"translate(" + -h.width / 2 + ", " + (-h.height / 2 - S + 3) + ")"
|
|
1841
|
-
), i.attr("class", "outer title-state").attr("x", -h.width / 2 - S).attr("y", -h.height / 2 - S).attr("width", h.width + t.padding).attr("height", h.height + t.padding),
|
|
1829
|
+
), i.attr("class", "outer title-state").attr("x", -h.width / 2 - S).attr("y", -h.height / 2 - S).attr("width", h.width + t.padding).attr("height", h.height + t.padding), r.attr("class", "divider").attr("x1", -h.width / 2 - S).attr("x2", h.width / 2 + S).attr("y1", -h.height / 2 - S + w.height + S).attr("y2", -h.height / 2 - S + w.height + S), T(t, i), t.intersect = function(E) {
|
|
1842
1830
|
return N.rect(t, E);
|
|
1843
1831
|
}, n;
|
|
1844
|
-
}, "rectWithTitle"),
|
|
1832
|
+
}, "rectWithTitle"), zr = /* @__PURE__ */ d(async (e, t) => {
|
|
1845
1833
|
const { shapeSvg: s, bbox: n } = await A(
|
|
1846
1834
|
e,
|
|
1847
1835
|
t,
|
|
1848
1836
|
Y(t, void 0),
|
|
1849
1837
|
true
|
|
1850
|
-
), i = n.height + t.padding,
|
|
1851
|
-
return T(t,
|
|
1838
|
+
), i = n.height + t.padding, r = n.width + i / 4 + t.padding, a = s.insert("rect", ":first-child").attr("style", t.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -r / 2).attr("y", -i / 2).attr("width", r).attr("height", i);
|
|
1839
|
+
return T(t, a), t.intersect = function(l) {
|
|
1852
1840
|
return N.rect(t, l);
|
|
1853
1841
|
}, s;
|
|
1854
|
-
}, "stadium"),
|
|
1842
|
+
}, "stadium"), Ar = /* @__PURE__ */ d(async (e, t) => {
|
|
1855
1843
|
const { shapeSvg: s, bbox: n, halfPadding: i } = await A(
|
|
1856
1844
|
e,
|
|
1857
1845
|
t,
|
|
1858
1846
|
Y(t, void 0),
|
|
1859
1847
|
true
|
|
1860
|
-
),
|
|
1861
|
-
return
|
|
1862
|
-
return L.info("Circle intersect", t, n.width / 2 + i,
|
|
1848
|
+
), r = s.insert("circle", ":first-child");
|
|
1849
|
+
return r.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i).attr("width", n.width + t.padding).attr("height", n.height + t.padding), L.info("Circle main"), T(t, r), t.intersect = function(a) {
|
|
1850
|
+
return L.info("Circle intersect", t, n.width / 2 + i, a), N.circle(t, n.width / 2 + i, a);
|
|
1863
1851
|
}, s;
|
|
1864
|
-
}, "circle"),
|
|
1852
|
+
}, "circle"), Mr = /* @__PURE__ */ d(async (e, t) => {
|
|
1865
1853
|
const { shapeSvg: s, bbox: n, halfPadding: i } = await A(
|
|
1866
1854
|
e,
|
|
1867
1855
|
t,
|
|
1868
1856
|
Y(t, void 0),
|
|
1869
1857
|
true
|
|
1870
|
-
),
|
|
1871
|
-
return
|
|
1872
|
-
return L.info("DoubleCircle intersect", t, n.width / 2 + i +
|
|
1858
|
+
), r = 5, a = s.insert("g", ":first-child"), l = a.insert("circle"), c = a.insert("circle");
|
|
1859
|
+
return a.attr("class", t.class), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i + r).attr("width", n.width + t.padding + r * 2).attr("height", n.height + t.padding + r * 2), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + i).attr("width", n.width + t.padding).attr("height", n.height + t.padding), L.info("DoubleCircle main"), T(t, l), t.intersect = function(u) {
|
|
1860
|
+
return L.info("DoubleCircle intersect", t, n.width / 2 + i + r, u), N.circle(t, n.width / 2 + i + r, u);
|
|
1873
1861
|
}, s;
|
|
1874
|
-
}, "doublecircle"),
|
|
1862
|
+
}, "doublecircle"), Fr = /* @__PURE__ */ d(async (e, t) => {
|
|
1875
1863
|
const { shapeSvg: s, bbox: n } = await A(
|
|
1876
1864
|
e,
|
|
1877
1865
|
t,
|
|
1878
1866
|
Y(t, void 0),
|
|
1879
1867
|
true
|
|
1880
|
-
), i = n.width + t.padding,
|
|
1868
|
+
), i = n.width + t.padding, r = n.height + t.padding, a = [
|
|
1881
1869
|
{ x: 0, y: 0 },
|
|
1882
1870
|
{ x: i, y: 0 },
|
|
1883
|
-
{ x: i, y: -
|
|
1884
|
-
{ x: 0, y: -
|
|
1871
|
+
{ x: i, y: -r },
|
|
1872
|
+
{ x: 0, y: -r },
|
|
1885
1873
|
{ x: 0, y: 0 },
|
|
1886
1874
|
{ x: -8, y: 0 },
|
|
1887
1875
|
{ x: i + 8, y: 0 },
|
|
1888
|
-
{ x: i + 8, y: -
|
|
1889
|
-
{ x: -8, y: -
|
|
1876
|
+
{ x: i + 8, y: -r },
|
|
1877
|
+
{ x: -8, y: -r },
|
|
1890
1878
|
{ x: -8, y: 0 }
|
|
1891
|
-
], l = U(s, i,
|
|
1879
|
+
], l = U(s, i, r, a);
|
|
1892
1880
|
return l.attr("style", t.style), T(t, l), t.intersect = function(c) {
|
|
1893
|
-
return N.polygon(t,
|
|
1881
|
+
return N.polygon(t, a, c);
|
|
1894
1882
|
}, s;
|
|
1895
|
-
}, "subroutine"),
|
|
1883
|
+
}, "subroutine"), Wr = /* @__PURE__ */ d((e, t) => {
|
|
1896
1884
|
const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = s.insert("circle", ":first-child");
|
|
1897
1885
|
return n.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), T(t, n), t.intersect = function(i) {
|
|
1898
1886
|
return N.circle(t, 7, i);
|
|
1899
1887
|
}, s;
|
|
1900
1888
|
}, "start"), Mt = /* @__PURE__ */ d((e, t, s) => {
|
|
1901
1889
|
const n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
|
|
1902
|
-
let i = 70,
|
|
1903
|
-
s === "LR" && (i = 10,
|
|
1904
|
-
const
|
|
1905
|
-
return T(t,
|
|
1890
|
+
let i = 70, r = 10;
|
|
1891
|
+
s === "LR" && (i = 10, r = 70);
|
|
1892
|
+
const a = n.append("rect").attr("x", -1 * i / 2).attr("y", -1 * r / 2).attr("width", i).attr("height", r).attr("class", "fork-join");
|
|
1893
|
+
return T(t, a), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(l) {
|
|
1906
1894
|
return N.rect(t, l);
|
|
1907
1895
|
}, n;
|
|
1908
|
-
}, "forkJoin"),
|
|
1896
|
+
}, "forkJoin"), Pr = /* @__PURE__ */ d((e, t) => {
|
|
1909
1897
|
const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = s.insert("circle", ":first-child"), i = s.insert("circle", ":first-child");
|
|
1910
|
-
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), n.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), T(t, i), t.intersect = function(
|
|
1911
|
-
return N.circle(t, 7,
|
|
1898
|
+
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), n.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), T(t, i), t.intersect = function(r) {
|
|
1899
|
+
return N.circle(t, 7, r);
|
|
1912
1900
|
}, s;
|
|
1913
|
-
}, "end"),
|
|
1901
|
+
}, "end"), Yr = /* @__PURE__ */ d((e, t) => {
|
|
1914
1902
|
var _a2;
|
|
1915
1903
|
const s = t.padding / 2, n = 4, i = 8;
|
|
1916
|
-
let
|
|
1917
|
-
t.classes ?
|
|
1918
|
-
const
|
|
1904
|
+
let r;
|
|
1905
|
+
t.classes ? r = "node " + t.classes : r = "node default";
|
|
1906
|
+
const a = e.insert("g").attr("class", r).attr("id", t.domId || t.id), l = a.insert("rect", ":first-child"), c = a.insert("line"), u = a.insert("line");
|
|
1919
1907
|
let h = 0, x = n;
|
|
1920
|
-
const w =
|
|
1908
|
+
const w = a.insert("g").attr("class", "label");
|
|
1921
1909
|
let b = 0;
|
|
1922
|
-
const S = (_a2 = t.classData.annotations) == null ? void 0 : _a2[0], E = t.classData.annotations[0] ? "\xAB" + t.classData.annotations[0] + "\xBB" : "", k = w.node().appendChild(
|
|
1910
|
+
const S = (_a2 = t.classData.annotations) == null ? void 0 : _a2[0], E = t.classData.annotations[0] ? "\xAB" + t.classData.annotations[0] + "\xBB" : "", k = w.node().appendChild(K(E, t.labelStyle, true, true));
|
|
1923
1911
|
let B = k.getBBox();
|
|
1924
1912
|
if (j(R().flowchart.htmlLabels)) {
|
|
1925
1913
|
const v = k.children[0], o = O(k);
|
|
@@ -1928,7 +1916,7 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1928
1916
|
t.classData.annotations[0] && (x += B.height + n, h += B.width);
|
|
1929
1917
|
let _ = t.classData.label;
|
|
1930
1918
|
t.classData.type !== void 0 && t.classData.type !== "" && (R().flowchart.htmlLabels ? _ += "<" + t.classData.type + ">" : _ += "<" + t.classData.type + ">");
|
|
1931
|
-
const D = w.node().appendChild(
|
|
1919
|
+
const D = w.node().appendChild(K(_, t.labelStyle, true, true));
|
|
1932
1920
|
O(D).attr("class", "classTitle");
|
|
1933
1921
|
let y = D.getBBox();
|
|
1934
1922
|
if (j(R().flowchart.htmlLabels)) {
|
|
@@ -1937,12 +1925,12 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1937
1925
|
}
|
|
1938
1926
|
x += y.height + n, y.width > h && (h = y.width);
|
|
1939
1927
|
const g = [];
|
|
1940
|
-
t.classData.members.forEach(
|
|
1928
|
+
t.classData.members.forEach((v) => {
|
|
1941
1929
|
const o = v.getDisplayDetails();
|
|
1942
1930
|
let W = o.displayText;
|
|
1943
1931
|
R().flowchart.htmlLabels && (W = W.replace(/</g, "<").replace(/>/g, ">"));
|
|
1944
1932
|
const p = w.node().appendChild(
|
|
1945
|
-
|
|
1933
|
+
K(
|
|
1946
1934
|
W,
|
|
1947
1935
|
o.cssStyle ? o.cssStyle : t.labelStyle,
|
|
1948
1936
|
true,
|
|
@@ -1957,12 +1945,12 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
|
|
|
1957
1945
|
I.width > h && (h = I.width), x += I.height + n, g.push(p);
|
|
1958
1946
|
}), x += i;
|
|
1959
1947
|
const f = [];
|
|
1960
|
-
if (t.classData.methods.forEach(
|
|
1948
|
+
if (t.classData.methods.forEach((v) => {
|
|
1961
1949
|
const o = v.getDisplayDetails();
|
|
1962
1950
|
let W = o.displayText;
|
|
1963
1951
|
R().flowchart.htmlLabels && (W = W.replace(/</g, "<").replace(/>/g, ">"));
|
|
1964
1952
|
const p = w.node().appendChild(
|
|
1965
|
-
|
|
1953
|
+
K(
|
|
1966
1954
|
W,
|
|
1967
1955
|
o.cssStyle ? o.cssStyle : t.labelStyle,
|
|
1968
1956
|
true,
|
|
@@ -2002,43 +1990,43 @@ var Ar = /* @__PURE__ */ d(async (e, t) => {
|
|
|
2002
1990
|
b += ((o == null ? void 0 : o.height) ?? 0) + n;
|
|
2003
1991
|
}), l.attr("style", t.style).attr("class", "outer title-state").attr("x", -h / 2 - s).attr("y", -(x / 2) - s).attr("width", h + t.padding).attr("height", x + t.padding), T(t, l), t.intersect = function(v) {
|
|
2004
1992
|
return N.rect(t, v);
|
|
2005
|
-
},
|
|
1993
|
+
}, a;
|
|
2006
1994
|
}, "class_box"), Ft = {
|
|
2007
1995
|
rhombus: At,
|
|
2008
|
-
composite:
|
|
1996
|
+
composite: Ir,
|
|
2009
1997
|
question: At,
|
|
2010
|
-
rect:
|
|
2011
|
-
labelRect:
|
|
2012
|
-
rectWithTitle:
|
|
2013
|
-
choice:
|
|
2014
|
-
circle:
|
|
2015
|
-
doublecircle:
|
|
2016
|
-
stadium:
|
|
2017
|
-
hexagon:
|
|
2018
|
-
block_arrow:
|
|
2019
|
-
rect_left_inv_arrow:
|
|
2020
|
-
lean_right:
|
|
2021
|
-
lean_left:
|
|
2022
|
-
trapezoid:
|
|
2023
|
-
inv_trapezoid:
|
|
2024
|
-
rect_right_inv_arrow:
|
|
2025
|
-
cylinder:
|
|
2026
|
-
start:
|
|
2027
|
-
end:
|
|
2028
|
-
note:
|
|
2029
|
-
subroutine:
|
|
1998
|
+
rect: Cr,
|
|
1999
|
+
labelRect: Or,
|
|
2000
|
+
rectWithTitle: Rr,
|
|
2001
|
+
choice: Lr,
|
|
2002
|
+
circle: Ar,
|
|
2003
|
+
doublecircle: Mr,
|
|
2004
|
+
stadium: zr,
|
|
2005
|
+
hexagon: Sr,
|
|
2006
|
+
block_arrow: kr,
|
|
2007
|
+
rect_left_inv_arrow: vr,
|
|
2008
|
+
lean_right: Er,
|
|
2009
|
+
lean_left: _r,
|
|
2010
|
+
trapezoid: Dr,
|
|
2011
|
+
inv_trapezoid: Nr,
|
|
2012
|
+
rect_right_inv_arrow: Tr,
|
|
2013
|
+
cylinder: Br,
|
|
2014
|
+
start: Wr,
|
|
2015
|
+
end: Pr,
|
|
2016
|
+
note: mr,
|
|
2017
|
+
subroutine: Fr,
|
|
2030
2018
|
fork: Mt,
|
|
2031
2019
|
join: Mt,
|
|
2032
|
-
class_box:
|
|
2020
|
+
class_box: Yr
|
|
2033
2021
|
}, lt = {}, te = /* @__PURE__ */ d(async (e, t, s) => {
|
|
2034
2022
|
let n, i;
|
|
2035
2023
|
if (t.link) {
|
|
2036
|
-
let
|
|
2037
|
-
R().securityLevel === "sandbox" ?
|
|
2024
|
+
let r;
|
|
2025
|
+
R().securityLevel === "sandbox" ? r = "_top" : t.linkTarget && (r = t.linkTarget || "_blank"), n = e.insert("svg:a").attr("xlink:href", t.link).attr("target", r), i = await Ft[t.shape](n, t, s);
|
|
2038
2026
|
} else
|
|
2039
2027
|
i = await Ft[t.shape](e, t, s), n = i;
|
|
2040
2028
|
return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), lt[t.id] = n, t.haveCallback && lt[t.id].attr("class", lt[t.id].attr("class") + " clickable"), n;
|
|
2041
|
-
}, "insertNode"),
|
|
2029
|
+
}, "insertNode"), Hr = /* @__PURE__ */ d((e) => {
|
|
2042
2030
|
const t = lt[e.id];
|
|
2043
2031
|
L.trace(
|
|
2044
2032
|
"Transforming node",
|
|
@@ -2057,75 +2045,75 @@ function _t(e, t, s = false) {
|
|
|
2057
2045
|
const n = e;
|
|
2058
2046
|
let i = "default";
|
|
2059
2047
|
(((_a2 = n == null ? void 0 : n.classes) == null ? void 0 : _a2.length) || 0) > 0 && (i = ((n == null ? void 0 : n.classes) ?? []).join(" ")), i = i + " flowchart-label";
|
|
2060
|
-
let
|
|
2048
|
+
let r = 0, a = "", l;
|
|
2061
2049
|
switch (n.type) {
|
|
2062
2050
|
case "round":
|
|
2063
|
-
|
|
2051
|
+
r = 5, a = "rect";
|
|
2064
2052
|
break;
|
|
2065
2053
|
case "composite":
|
|
2066
|
-
|
|
2054
|
+
r = 0, a = "composite", l = 0;
|
|
2067
2055
|
break;
|
|
2068
2056
|
case "square":
|
|
2069
|
-
|
|
2057
|
+
a = "rect";
|
|
2070
2058
|
break;
|
|
2071
2059
|
case "diamond":
|
|
2072
|
-
|
|
2060
|
+
a = "question";
|
|
2073
2061
|
break;
|
|
2074
2062
|
case "hexagon":
|
|
2075
|
-
|
|
2063
|
+
a = "hexagon";
|
|
2076
2064
|
break;
|
|
2077
2065
|
case "block_arrow":
|
|
2078
|
-
|
|
2066
|
+
a = "block_arrow";
|
|
2079
2067
|
break;
|
|
2080
2068
|
case "odd":
|
|
2081
|
-
|
|
2069
|
+
a = "rect_left_inv_arrow";
|
|
2082
2070
|
break;
|
|
2083
2071
|
case "lean_right":
|
|
2084
|
-
|
|
2072
|
+
a = "lean_right";
|
|
2085
2073
|
break;
|
|
2086
2074
|
case "lean_left":
|
|
2087
|
-
|
|
2075
|
+
a = "lean_left";
|
|
2088
2076
|
break;
|
|
2089
2077
|
case "trapezoid":
|
|
2090
|
-
|
|
2078
|
+
a = "trapezoid";
|
|
2091
2079
|
break;
|
|
2092
2080
|
case "inv_trapezoid":
|
|
2093
|
-
|
|
2081
|
+
a = "inv_trapezoid";
|
|
2094
2082
|
break;
|
|
2095
2083
|
case "rect_left_inv_arrow":
|
|
2096
|
-
|
|
2084
|
+
a = "rect_left_inv_arrow";
|
|
2097
2085
|
break;
|
|
2098
2086
|
case "circle":
|
|
2099
|
-
|
|
2087
|
+
a = "circle";
|
|
2100
2088
|
break;
|
|
2101
2089
|
case "ellipse":
|
|
2102
|
-
|
|
2090
|
+
a = "ellipse";
|
|
2103
2091
|
break;
|
|
2104
2092
|
case "stadium":
|
|
2105
|
-
|
|
2093
|
+
a = "stadium";
|
|
2106
2094
|
break;
|
|
2107
2095
|
case "subroutine":
|
|
2108
|
-
|
|
2096
|
+
a = "subroutine";
|
|
2109
2097
|
break;
|
|
2110
2098
|
case "cylinder":
|
|
2111
|
-
|
|
2099
|
+
a = "cylinder";
|
|
2112
2100
|
break;
|
|
2113
2101
|
case "group":
|
|
2114
|
-
|
|
2102
|
+
a = "rect";
|
|
2115
2103
|
break;
|
|
2116
2104
|
case "doublecircle":
|
|
2117
|
-
|
|
2105
|
+
a = "doublecircle";
|
|
2118
2106
|
break;
|
|
2119
2107
|
default:
|
|
2120
|
-
|
|
2108
|
+
a = "rect";
|
|
2121
2109
|
}
|
|
2122
|
-
const c =
|
|
2110
|
+
const c = xe((n == null ? void 0 : n.styles) ?? []), u = n.label, h = n.size ?? { width: 0, height: 0, x: 0, y: 0 };
|
|
2123
2111
|
return {
|
|
2124
2112
|
labelStyle: c.labelStyle,
|
|
2125
|
-
shape:
|
|
2113
|
+
shape: a,
|
|
2126
2114
|
labelText: u,
|
|
2127
|
-
rx:
|
|
2128
|
-
ry:
|
|
2115
|
+
rx: r,
|
|
2116
|
+
ry: r,
|
|
2129
2117
|
class: i,
|
|
2130
2118
|
style: c.style,
|
|
2131
2119
|
id: n.id,
|
|
@@ -2145,15 +2133,15 @@ async function ee(e, t, s) {
|
|
|
2145
2133
|
const n = _t(t, s, false);
|
|
2146
2134
|
if (n.type === "group")
|
|
2147
2135
|
return;
|
|
2148
|
-
const i = rt(),
|
|
2149
|
-
l.size = { width:
|
|
2136
|
+
const i = rt(), r = await te(e, n, { config: i }), a = r.node().getBBox(), l = s.getBlock(n.id);
|
|
2137
|
+
l.size = { width: a.width, height: a.height, x: 0, y: 0, node: r }, s.setBlock(l), r.remove();
|
|
2150
2138
|
}
|
|
2151
2139
|
d(ee, "calculateBlockSize");
|
|
2152
2140
|
async function re(e, t, s) {
|
|
2153
2141
|
const n = _t(t, s, true);
|
|
2154
2142
|
if (s.getBlock(n.id).type !== "space") {
|
|
2155
|
-
const
|
|
2156
|
-
await te(e, n, { config:
|
|
2143
|
+
const r = rt();
|
|
2144
|
+
await te(e, n, { config: r }), t.intersect = n == null ? void 0 : n.intersect, Hr(n);
|
|
2157
2145
|
}
|
|
2158
2146
|
}
|
|
2159
2147
|
d(re, "insertBlockPositioned");
|
|
@@ -2171,56 +2159,56 @@ async function se(e, t, s) {
|
|
|
2171
2159
|
}
|
|
2172
2160
|
d(se, "insertBlocks");
|
|
2173
2161
|
async function ie(e, t, s, n, i) {
|
|
2174
|
-
const
|
|
2162
|
+
const r = new be({
|
|
2175
2163
|
multigraph: true,
|
|
2176
2164
|
compound: true
|
|
2177
2165
|
});
|
|
2178
|
-
|
|
2166
|
+
r.setGraph({
|
|
2179
2167
|
rankdir: "TB",
|
|
2180
2168
|
nodesep: 10,
|
|
2181
2169
|
ranksep: 10,
|
|
2182
2170
|
marginx: 8,
|
|
2183
2171
|
marginy: 8
|
|
2184
2172
|
});
|
|
2185
|
-
for (const
|
|
2186
|
-
|
|
2187
|
-
width:
|
|
2188
|
-
height:
|
|
2189
|
-
intersect:
|
|
2173
|
+
for (const a of s)
|
|
2174
|
+
a.size && r.setNode(a.id, {
|
|
2175
|
+
width: a.size.width,
|
|
2176
|
+
height: a.size.height,
|
|
2177
|
+
intersect: a.intersect
|
|
2190
2178
|
});
|
|
2191
|
-
for (const
|
|
2192
|
-
if (
|
|
2193
|
-
const l = n.getBlock(
|
|
2179
|
+
for (const a of t)
|
|
2180
|
+
if (a.start && a.end) {
|
|
2181
|
+
const l = n.getBlock(a.start), c = n.getBlock(a.end);
|
|
2194
2182
|
if ((l == null ? void 0 : l.size) && (c == null ? void 0 : c.size)) {
|
|
2195
2183
|
const u = l.size, h = c.size, x = [
|
|
2196
2184
|
{ x: u.x, y: u.y },
|
|
2197
2185
|
{ x: u.x + (h.x - u.x) / 2, y: u.y + (h.y - u.y) / 2 },
|
|
2198
2186
|
{ x: h.x, y: h.y }
|
|
2199
2187
|
];
|
|
2200
|
-
|
|
2188
|
+
hr(
|
|
2201
2189
|
e,
|
|
2202
|
-
{ v:
|
|
2190
|
+
{ v: a.start, w: a.end, name: a.id },
|
|
2203
2191
|
{
|
|
2204
|
-
...
|
|
2205
|
-
arrowTypeEnd:
|
|
2206
|
-
arrowTypeStart:
|
|
2192
|
+
...a,
|
|
2193
|
+
arrowTypeEnd: a.arrowTypeEnd,
|
|
2194
|
+
arrowTypeStart: a.arrowTypeStart,
|
|
2207
2195
|
points: x,
|
|
2208
2196
|
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
2209
2197
|
},
|
|
2210
2198
|
void 0,
|
|
2211
2199
|
"block",
|
|
2212
|
-
|
|
2200
|
+
r,
|
|
2213
2201
|
i
|
|
2214
|
-
),
|
|
2215
|
-
...
|
|
2216
|
-
label:
|
|
2202
|
+
), a.label && (await nr(e, {
|
|
2203
|
+
...a,
|
|
2204
|
+
label: a.label,
|
|
2217
2205
|
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
2218
|
-
arrowTypeEnd:
|
|
2219
|
-
arrowTypeStart:
|
|
2206
|
+
arrowTypeEnd: a.arrowTypeEnd,
|
|
2207
|
+
arrowTypeStart: a.arrowTypeStart,
|
|
2220
2208
|
points: x,
|
|
2221
2209
|
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
2222
|
-
}),
|
|
2223
|
-
{ ...
|
|
2210
|
+
}), lr(
|
|
2211
|
+
{ ...a, x: x[1].x, y: x[1].y },
|
|
2224
2212
|
{
|
|
2225
2213
|
originalPath: x
|
|
2226
2214
|
}
|
|
@@ -2229,33 +2217,33 @@ async function ie(e, t, s, n, i) {
|
|
|
2229
2217
|
}
|
|
2230
2218
|
}
|
|
2231
2219
|
d(ie, "insertEdges");
|
|
2232
|
-
var
|
|
2220
|
+
var Kr = /* @__PURE__ */ d(function(e, t) {
|
|
2233
2221
|
return t.db.getClasses();
|
|
2234
|
-
}, "getClasses"),
|
|
2235
|
-
const { securityLevel: i, block:
|
|
2222
|
+
}, "getClasses"), Xr = /* @__PURE__ */ d(async function(e, t, s, n) {
|
|
2223
|
+
const { securityLevel: i, block: r } = rt(), a = n.db;
|
|
2236
2224
|
let l;
|
|
2237
2225
|
i === "sandbox" && (l = O("#i" + t));
|
|
2238
2226
|
const c = i === "sandbox" ? O(l.nodes()[0].contentDocument.body) : O("body"), u = i === "sandbox" ? c.select(`[id="${t}"]`) : O(`[id="${t}"]`);
|
|
2239
|
-
|
|
2240
|
-
const x =
|
|
2241
|
-
await ae(S, x,
|
|
2242
|
-
const E = jt(
|
|
2243
|
-
if (await se(S, x,
|
|
2244
|
-
const k = E, B = Math.max(1, Math.round(0.125 * (k.width / k.height))), _ = k.height + B + 10, D = k.width + 10, { useMaxWidth: y } =
|
|
2245
|
-
|
|
2227
|
+
er(u, ["point", "circle", "cross"], n.type, t);
|
|
2228
|
+
const x = a.getBlocks(), w = a.getBlocksFlat(), b = a.getEdges(), S = u.insert("g").attr("class", "block");
|
|
2229
|
+
await ae(S, x, a);
|
|
2230
|
+
const E = jt(a);
|
|
2231
|
+
if (await se(S, x, a), await ie(S, b, w, a, t), E) {
|
|
2232
|
+
const k = E, B = Math.max(1, Math.round(0.125 * (k.width / k.height))), _ = k.height + B + 10, D = k.width + 10, { useMaxWidth: y } = r;
|
|
2233
|
+
oe(u, _, D, !!y), L.debug("Here Bounds", E, k), u.attr(
|
|
2246
2234
|
"viewBox",
|
|
2247
2235
|
`${k.x - 5} ${k.y - 5} ${k.width + 10} ${k.height + 10}`
|
|
2248
2236
|
);
|
|
2249
2237
|
}
|
|
2250
|
-
}, "draw"),
|
|
2251
|
-
draw:
|
|
2252
|
-
getClasses:
|
|
2253
|
-
},
|
|
2254
|
-
parser:
|
|
2255
|
-
db:
|
|
2256
|
-
renderer:
|
|
2257
|
-
styles:
|
|
2238
|
+
}, "draw"), Ur = {
|
|
2239
|
+
draw: Xr,
|
|
2240
|
+
getClasses: Kr
|
|
2241
|
+
}, Jr = {
|
|
2242
|
+
parser: Se,
|
|
2243
|
+
db: Ye,
|
|
2244
|
+
renderer: Ur,
|
|
2245
|
+
styles: Ke
|
|
2258
2246
|
};
|
|
2259
2247
|
export {
|
|
2260
|
-
|
|
2248
|
+
Jr as diagram
|
|
2261
2249
|
};
|