@omg-dev/app 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{ChangelogPage-8lbvM9Pz.js → ChangelogPage-Cjj_DiYL.js} +57 -1
- package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
- package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
- package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
- package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
- package/dist-lib/{SessionFilesPanel-BKcTU57t.js → SessionFilesPanel-DxVJ43fE.js} +69 -69
- package/dist-lib/{TermView-gazV6UMU.js → TermView-B4V-DyD-.js} +521 -530
- package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
- package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
- package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
- package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
- package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
- package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
- package/dist-lib/{chat-engine-83mwx0z2.js → chat-engine-CUiDTHFP.js} +1173 -1218
- package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
- package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
- package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
- package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
- package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
- package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
- package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
- package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
- package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
- package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
- package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
- package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
- package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
- package/dist-lib/{coding-agents-page-8Nf-IuE2.js → coding-agents-page-DtxZ0nbQ.js} +152 -131
- package/dist-lib/computer-page-DIJeFOZz.js +8860 -0
- package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
- package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
- package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
- package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
- package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
- package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
- package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
- package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
- package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
- package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
- package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
- package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
- package/dist-lib/{embedded-BmrQsEvQ.js → embedded-PUsgcSTE.js} +13043 -13082
- package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
- package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
- package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
- package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
- package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
- package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
- package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
- package/dist-lib/index-B0neMIbR.js +16520 -0
- package/dist-lib/index-BBC0E3Qg.js +4994 -0
- package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
- package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
- package/dist-lib/index.js +1 -1
- package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
- package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
- package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
- package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
- package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
- package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
- package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
- package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
- package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
- package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
- package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
- package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
- package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
- package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
- package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
- package/dist-lib/{resume-session-sheet-Dr_81Gfm.js → resume-session-sheet-DTe_2QtJ.js} +2 -3
- package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
- package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
- package/dist-lib/{session-token-usage-CGhHZ3lT.js → session-token-usage-DY4vFlfs.js} +82 -83
- package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
- package/dist-lib/{shipped-page-p3oulUiM.js → shipped-page-B-ruG8li.js} +233 -236
- package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
- package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
- package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
- package/dist-lib/{streamdown-response-Dbn0PKUH.js → streamdown-response-BQy3geXs.js} +290 -297
- package/dist-lib/styles.css +1 -1
- package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
- package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
- package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
- package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
- package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
- package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
- package/package.json +4 -3
- package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
- package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
- package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
- package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
- package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
- package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
- package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
- package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
- package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
- package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
- package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
- package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
- package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
- package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
- package/dist-lib/index-DcwavxA1.js +0 -5062
- package/dist-lib/index-JkCQXUYs.js +0 -16566
- package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
- package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
- package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
- package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
- package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
- package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
- package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
- package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
- package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
- package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { _ as u, l as i } from "./index-B0neMIbR.js";
|
|
2
|
+
import { i as m, G as y } from "./graph-DAHC4kPm.js";
|
|
3
|
+
import { b as _, m as X } from "./map-DRdzG8Ho.js";
|
|
4
|
+
var j = 4;
|
|
5
|
+
function p(e) {
|
|
6
|
+
return _(e, j);
|
|
7
|
+
}
|
|
8
|
+
function C(e) {
|
|
9
|
+
var r = {
|
|
10
|
+
options: {
|
|
11
|
+
directed: e.isDirected(),
|
|
12
|
+
multigraph: e.isMultigraph(),
|
|
13
|
+
compound: e.isCompound()
|
|
14
|
+
},
|
|
15
|
+
nodes: F(e),
|
|
16
|
+
edges: M(e)
|
|
17
|
+
};
|
|
18
|
+
return m(e.graph()) || (r.value = p(e.graph())), r;
|
|
19
|
+
}
|
|
20
|
+
function F(e) {
|
|
21
|
+
return X(e.nodes(), function(r) {
|
|
22
|
+
var n = e.node(r), s = e.parent(r), t = { v: r };
|
|
23
|
+
return m(n) || (t.value = n), m(s) || (t.parent = s), t;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function M(e) {
|
|
27
|
+
return X(e.edges(), function(r) {
|
|
28
|
+
var n = e.edge(r), s = { v: r.v, w: r.w };
|
|
29
|
+
return m(r.name) || (s.name = r.name), m(n) || (s.value = n), s;
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
var c = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ u(() => {
|
|
33
|
+
w.clear(), A.clear(), c.clear();
|
|
34
|
+
}, "clear"), v = /* @__PURE__ */ u((e, r) => {
|
|
35
|
+
const n = w.get(r) || [];
|
|
36
|
+
return i.trace("In isDescendant", r, " ", e, " = ", n.includes(e)), n.includes(e);
|
|
37
|
+
}, "isDescendant"), R = /* @__PURE__ */ u((e, r) => {
|
|
38
|
+
const n = w.get(r) || [];
|
|
39
|
+
return i.info("Descendants of ", r, " is ", n), i.info("Edge is ", e), e.v === r || e.w === r ? !1 : n ? n.includes(e.v) || v(e.v, r) || v(e.w, r) || n.includes(e.w) : (i.debug("Tilt, ", r, ",not in descendants"), !1);
|
|
40
|
+
}, "edgeInCluster"), b = /* @__PURE__ */ u((e, r, n, s) => {
|
|
41
|
+
i.warn(
|
|
42
|
+
"Copying children of ",
|
|
43
|
+
e,
|
|
44
|
+
"root",
|
|
45
|
+
s,
|
|
46
|
+
"data",
|
|
47
|
+
r.node(e),
|
|
48
|
+
s
|
|
49
|
+
);
|
|
50
|
+
const t = r.children(e) || [];
|
|
51
|
+
e !== s && t.push(e), i.warn("Copying (nodes) clusterId", e, "nodes", t), t.forEach((o) => {
|
|
52
|
+
if (r.children(o).length > 0)
|
|
53
|
+
b(o, r, n, s);
|
|
54
|
+
else {
|
|
55
|
+
const l = r.node(o);
|
|
56
|
+
i.info("cp ", o, " to ", s, " with parent ", e), n.setNode(o, l), s !== r.parent(o) && (i.warn("Setting parent", o, r.parent(o)), n.setParent(o, r.parent(o))), e !== s && o !== e ? (i.debug("Setting parent", o, e), n.setParent(o, e)) : (i.info("In copy ", e, "root", s, "data", r.node(e), s), i.debug(
|
|
57
|
+
"Not Setting parent for node=",
|
|
58
|
+
o,
|
|
59
|
+
"cluster!==rootId",
|
|
60
|
+
e !== s,
|
|
61
|
+
"node!==clusterId",
|
|
62
|
+
o !== e
|
|
63
|
+
));
|
|
64
|
+
const f = r.edges(o);
|
|
65
|
+
i.debug("Copying Edges", f), f.forEach((a) => {
|
|
66
|
+
i.info("Edge", a);
|
|
67
|
+
const d = r.edge(a.v, a.w, a.name);
|
|
68
|
+
i.info("Edge data", d, s);
|
|
69
|
+
try {
|
|
70
|
+
if (R(a, s)) {
|
|
71
|
+
const g = w.get(s) || [], E = g.includes(a.v) || v(a.v, s) || a.v === s, x = g.includes(a.w) || v(a.w, s) || a.w === s;
|
|
72
|
+
if (E && x)
|
|
73
|
+
i.info("Copying as ", a.v, a.w, d, a.name), n.setEdge(a.v, a.w, d, a.name), i.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]));
|
|
74
|
+
else {
|
|
75
|
+
const N = E ? s : a.v, h = x ? s : a.w;
|
|
76
|
+
i.info("Rebinding cross-boundary edge as ", N, h, d, a.name), r.setEdge(N, h, d, a.name);
|
|
77
|
+
}
|
|
78
|
+
} else
|
|
79
|
+
i.info(
|
|
80
|
+
"Skipping copy of edge ",
|
|
81
|
+
a.v,
|
|
82
|
+
"-->",
|
|
83
|
+
a.w,
|
|
84
|
+
" rootId: ",
|
|
85
|
+
s,
|
|
86
|
+
" clusterId:",
|
|
87
|
+
e
|
|
88
|
+
);
|
|
89
|
+
} catch (g) {
|
|
90
|
+
i.error(g);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
i.debug("Removing node", o), r.removeNode(o);
|
|
95
|
+
});
|
|
96
|
+
}, "copy"), O = /* @__PURE__ */ u((e, r) => {
|
|
97
|
+
const n = r.children(e);
|
|
98
|
+
let s = [...n];
|
|
99
|
+
for (const t of n)
|
|
100
|
+
A.set(t, e), s = [...s, ...O(t, r)];
|
|
101
|
+
return s;
|
|
102
|
+
}, "extractDescendants"), P = /* @__PURE__ */ u((e, r, n) => {
|
|
103
|
+
const s = e.edges().filter((a) => a.v === r || a.w === r), t = e.edges().filter((a) => a.v === n || a.w === n), o = s.map((a) => ({ v: a.v === r ? n : a.v, w: a.w === r ? r : a.w })), l = t.map((a) => ({ v: a.v, w: a.w }));
|
|
104
|
+
return o.filter((a) => l.some((d) => a.v === d.v && a.w === d.w));
|
|
105
|
+
}, "findCommonEdges"), D = /* @__PURE__ */ u((e, r, n) => {
|
|
106
|
+
const s = r.children(e);
|
|
107
|
+
if (i.trace("Searching children of id ", e, s), s.length < 1)
|
|
108
|
+
return e;
|
|
109
|
+
let t;
|
|
110
|
+
for (const o of s) {
|
|
111
|
+
const l = D(o, r, n), f = P(r, n, l);
|
|
112
|
+
if (l)
|
|
113
|
+
if (f.length > 0)
|
|
114
|
+
t = l;
|
|
115
|
+
else
|
|
116
|
+
return l;
|
|
117
|
+
}
|
|
118
|
+
return t;
|
|
119
|
+
}, "findNonClusterChild"), S = /* @__PURE__ */ u((e) => !c.has(e) || !c.get(e).externalConnections ? e : c.has(e) ? c.get(e).id : e, "getAnchorId"), U = /* @__PURE__ */ u((e, r) => {
|
|
120
|
+
if (!e || r > 10) {
|
|
121
|
+
i.debug("Opting out, no graph ");
|
|
122
|
+
return;
|
|
123
|
+
} else
|
|
124
|
+
i.debug("Opting in, graph ");
|
|
125
|
+
e.nodes().forEach(function(n) {
|
|
126
|
+
e.children(n).length > 0 && (i.warn(
|
|
127
|
+
"Cluster identified",
|
|
128
|
+
n,
|
|
129
|
+
" Replacement id in edges: ",
|
|
130
|
+
D(n, e, n)
|
|
131
|
+
), w.set(n, O(n, e)), c.set(n, { id: D(n, e, n), clusterData: e.node(n) }));
|
|
132
|
+
}), e.nodes().forEach(function(n) {
|
|
133
|
+
const s = e.children(n), t = e.edges();
|
|
134
|
+
s.length > 0 ? (i.debug("Cluster identified", n, w), t.forEach((o) => {
|
|
135
|
+
const l = v(o.v, n), f = v(o.w, n);
|
|
136
|
+
l ^ f && (i.warn("Edge: ", o, " leaves cluster ", n), i.warn("Descendants of XXX ", n, ": ", w.get(n)), c.get(n).externalConnections = !0);
|
|
137
|
+
})) : i.debug("Not a cluster ", n, w);
|
|
138
|
+
});
|
|
139
|
+
for (let n of c.keys()) {
|
|
140
|
+
const s = c.get(n).id, t = e.parent(s);
|
|
141
|
+
t !== n && c.has(t) && !c.get(t).externalConnections && (c.get(n).id = t);
|
|
142
|
+
const o = e.edges().some((l) => l.v === n);
|
|
143
|
+
if (s && c.get(n)?.externalConnections && o && L(e, s, n)) {
|
|
144
|
+
const l = T(e, n, e.parent(s));
|
|
145
|
+
l && (c.get(n).id = l);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
e.edges().forEach(function(n) {
|
|
149
|
+
const s = e.edge(n);
|
|
150
|
+
i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(e.edge(n)));
|
|
151
|
+
let t = n.v, o = n.w;
|
|
152
|
+
if (i.warn(
|
|
153
|
+
"Fix XXX",
|
|
154
|
+
c,
|
|
155
|
+
"ids:",
|
|
156
|
+
n.v,
|
|
157
|
+
n.w,
|
|
158
|
+
"Translating: ",
|
|
159
|
+
c.get(n.v),
|
|
160
|
+
" --- ",
|
|
161
|
+
c.get(n.w)
|
|
162
|
+
), c.get(n.v) || c.get(n.w)) {
|
|
163
|
+
if (i.warn("Fixing and trying - removing XXX", n.v, n.w, n.name), t = S(n.v), o = S(n.w), e.removeEdge(n.v, n.w, n.name), t !== n.v) {
|
|
164
|
+
const l = e.parent(t);
|
|
165
|
+
c.get(l).externalConnections = !0, s.fromCluster = n.v;
|
|
166
|
+
}
|
|
167
|
+
if (o !== n.w) {
|
|
168
|
+
const l = e.parent(o);
|
|
169
|
+
c.get(l).externalConnections = !0, s.toCluster = n.w;
|
|
170
|
+
}
|
|
171
|
+
i.warn("Fix Replacing with XXX", t, o, n.name), e.setEdge(t, o, s, n.name);
|
|
172
|
+
}
|
|
173
|
+
}), i.warn("Adjusted Graph", C(e)), k(e, 0), i.trace(c);
|
|
174
|
+
}, "adjustClustersAndEdges"), k = /* @__PURE__ */ u((e, r) => {
|
|
175
|
+
if (i.warn("extractor - ", r, C(e), e.children("D")), r > 10) {
|
|
176
|
+
i.error("Bailing out");
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
let n = e.nodes(), s = !1;
|
|
180
|
+
for (const t of n) {
|
|
181
|
+
const o = e.children(t);
|
|
182
|
+
s = s || o.length > 0;
|
|
183
|
+
}
|
|
184
|
+
if (!s) {
|
|
185
|
+
i.debug("Done, no node has children", e.nodes());
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
i.debug("Nodes = ", n, r);
|
|
189
|
+
for (const t of n)
|
|
190
|
+
if (i.debug(
|
|
191
|
+
"Extracting node",
|
|
192
|
+
t,
|
|
193
|
+
c,
|
|
194
|
+
c.has(t) && !c.get(t).externalConnections,
|
|
195
|
+
!e.parent(t),
|
|
196
|
+
e.node(t),
|
|
197
|
+
e.children("D"),
|
|
198
|
+
" Depth ",
|
|
199
|
+
r
|
|
200
|
+
), !c.has(t))
|
|
201
|
+
i.debug("Not a cluster", t, r);
|
|
202
|
+
else if (c.get(t)?.clusterData?.explicitDir && e.children(t) && e.children(t).length > 0) {
|
|
203
|
+
i.warn("Cluster with explicit dir, creating subgraph for children", t, r);
|
|
204
|
+
const o = c.get(t).clusterData.dir, l = new y({
|
|
205
|
+
multigraph: !0,
|
|
206
|
+
compound: !0
|
|
207
|
+
}).setGraph({
|
|
208
|
+
rankdir: o,
|
|
209
|
+
nodesep: 50,
|
|
210
|
+
ranksep: 50,
|
|
211
|
+
marginx: 8,
|
|
212
|
+
marginy: 8
|
|
213
|
+
}).setDefaultEdgeLabel(function() {
|
|
214
|
+
return {};
|
|
215
|
+
});
|
|
216
|
+
b(t, e, l, t);
|
|
217
|
+
const f = e.node(t) || {};
|
|
218
|
+
e.setNode(t, {
|
|
219
|
+
...f,
|
|
220
|
+
clusterNode: !0,
|
|
221
|
+
id: t,
|
|
222
|
+
clusterData: c.get(t).clusterData,
|
|
223
|
+
label: c.get(t).label,
|
|
224
|
+
graph: l
|
|
225
|
+
}), i.warn(
|
|
226
|
+
"Subgraph for cluster with explicit dir created:",
|
|
227
|
+
t,
|
|
228
|
+
C(l)
|
|
229
|
+
);
|
|
230
|
+
} else if (!c.get(t).externalConnections && e.children(t) && e.children(t).length > 0) {
|
|
231
|
+
i.warn(
|
|
232
|
+
"Cluster without external connections, without a parent and with children",
|
|
233
|
+
t,
|
|
234
|
+
r
|
|
235
|
+
);
|
|
236
|
+
let l = e.graph().rankdir === "TB" ? "LR" : "TB";
|
|
237
|
+
c.get(t)?.clusterData?.dir && (l = c.get(t).clusterData.dir, i.warn("Fixing dir", c.get(t).clusterData.dir, l));
|
|
238
|
+
const f = new y({
|
|
239
|
+
multigraph: !0,
|
|
240
|
+
compound: !0
|
|
241
|
+
}).setGraph({
|
|
242
|
+
rankdir: l,
|
|
243
|
+
nodesep: 50,
|
|
244
|
+
ranksep: 50,
|
|
245
|
+
marginx: 8,
|
|
246
|
+
marginy: 8
|
|
247
|
+
}).setDefaultEdgeLabel(function() {
|
|
248
|
+
return {};
|
|
249
|
+
});
|
|
250
|
+
b(t, e, f, t);
|
|
251
|
+
const a = e.node(t) || {};
|
|
252
|
+
e.setNode(t, {
|
|
253
|
+
...a,
|
|
254
|
+
clusterNode: !0,
|
|
255
|
+
id: t,
|
|
256
|
+
clusterData: c.get(t).clusterData,
|
|
257
|
+
label: c.get(t).label,
|
|
258
|
+
graph: f
|
|
259
|
+
}), i.debug("Old graph after copy", C(e));
|
|
260
|
+
} else
|
|
261
|
+
i.warn(
|
|
262
|
+
"Cluster ** ",
|
|
263
|
+
t,
|
|
264
|
+
" **not meeting the criteria !externalConnections:",
|
|
265
|
+
!c.get(t).externalConnections,
|
|
266
|
+
" no parent: ",
|
|
267
|
+
!e.parent(t),
|
|
268
|
+
" children ",
|
|
269
|
+
e.children(t) && e.children(t).length > 0,
|
|
270
|
+
e.children("D"),
|
|
271
|
+
r
|
|
272
|
+
), i.debug(c);
|
|
273
|
+
n = e.nodes(), i.warn("New list of nodes", n);
|
|
274
|
+
for (const t of n) {
|
|
275
|
+
const o = e.node(t);
|
|
276
|
+
i.warn(" Now next level", t, o), o?.clusterNode && k(o.graph, r + 1);
|
|
277
|
+
}
|
|
278
|
+
}, "extractor"), B = /* @__PURE__ */ u((e, r) => {
|
|
279
|
+
if (r.length === 0)
|
|
280
|
+
return [];
|
|
281
|
+
let n = Object.assign([], r);
|
|
282
|
+
return r.forEach((s) => {
|
|
283
|
+
const t = e.children(s), o = B(e, t);
|
|
284
|
+
n = [...n, ...o];
|
|
285
|
+
}), n;
|
|
286
|
+
}, "sorter"), W = /* @__PURE__ */ u((e) => B(e, e.children()), "sortNodesByHierarchy"), L = /* @__PURE__ */ u((e, r, n) => {
|
|
287
|
+
let s = e.parent(r);
|
|
288
|
+
for (; s && s !== n; ) {
|
|
289
|
+
const t = c.get(s);
|
|
290
|
+
if (t && !t.externalConnections)
|
|
291
|
+
return !0;
|
|
292
|
+
s = e.parent(s);
|
|
293
|
+
}
|
|
294
|
+
return !1;
|
|
295
|
+
}, "isNodeInExtractableCluster"), T = /* @__PURE__ */ u((e, r, n) => {
|
|
296
|
+
const s = e.children(r) ?? [];
|
|
297
|
+
for (const t of s) {
|
|
298
|
+
if (t === n || v(t, n))
|
|
299
|
+
continue;
|
|
300
|
+
const o = D(t, e, r);
|
|
301
|
+
if (o && !L(e, o, r))
|
|
302
|
+
return o;
|
|
303
|
+
}
|
|
304
|
+
return null;
|
|
305
|
+
}, "findSafeAnchorNode");
|
|
306
|
+
export {
|
|
307
|
+
U as a,
|
|
308
|
+
c as b,
|
|
309
|
+
J as c,
|
|
310
|
+
D as f,
|
|
311
|
+
W as s,
|
|
312
|
+
C as w
|
|
313
|
+
};
|