gradio-leaderboard 0.0.13__py3-none-any.whl → 0.0.14__py3-none-any.whl

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.
Files changed (56) hide show
  1. gradio_leaderboard/leaderboard.pyi +26 -9
  2. gradio_leaderboard/templates/component/Index-CzS_eGV6.js +34210 -0
  3. gradio_leaderboard/templates/component/_basePickBy-CPQEc5fh.js +151 -0
  4. gradio_leaderboard/templates/component/_baseUniq-DlEwemC3.js +615 -0
  5. gradio_leaderboard/templates/component/arc-4UNMf6Jv.js +83 -0
  6. gradio_leaderboard/templates/component/architectureDiagram-NQ2NVSRB-ClVp_eQQ.js +4629 -0
  7. gradio_leaderboard/templates/component/blockDiagram-PHRCVELO-CBZHEIQE.js +2255 -0
  8. gradio_leaderboard/templates/component/c4Diagram-6F6E4RAY-BcEP_NdH.js +1586 -0
  9. gradio_leaderboard/templates/component/channel-BK2Jce3b.js +5 -0
  10. gradio_leaderboard/templates/component/chunk-353BL4L5-D4dVjjbU.js +8 -0
  11. gradio_leaderboard/templates/component/chunk-67H74DCK-Dd9cOxfN.js +64 -0
  12. gradio_leaderboard/templates/component/chunk-6OLS64BW-CfumlcA2.js +1376 -0
  13. gradio_leaderboard/templates/component/chunk-AACKK3MU-4CpiDhxa.js +18 -0
  14. gradio_leaderboard/templates/component/chunk-BFAMUDN2-C6YyJRb4.js +8 -0
  15. gradio_leaderboard/templates/component/chunk-E2GYISFI-CbYUJnri.js +19 -0
  16. gradio_leaderboard/templates/component/chunk-QEP2MXWD-BYLoFCys.js +1380 -0
  17. gradio_leaderboard/templates/component/chunk-SKB7J2MH-DNiBnZKZ.js +19 -0
  18. gradio_leaderboard/templates/component/classDiagram-BGRH5UQR-BrG1RRX8.js +16 -0
  19. gradio_leaderboard/templates/component/classDiagram-v2-O24JOBDK-BrG1RRX8.js +16 -0
  20. gradio_leaderboard/templates/component/clone-BA6MvtJ3.js +8 -0
  21. gradio_leaderboard/templates/component/cytoscape.esm-Bdz5CrXX.js +18629 -0
  22. gradio_leaderboard/templates/component/dagre-FFZHY6LT-6RahWHGr.js +444 -0
  23. gradio_leaderboard/templates/component/defaultLocale-D7EN2tov.js +171 -0
  24. gradio_leaderboard/templates/component/diagram-3EMPZRKU-DtoOVTDy.js +526 -0
  25. gradio_leaderboard/templates/component/diagram-5UYTHUR4-MEp0H-U7.js +137 -0
  26. gradio_leaderboard/templates/component/diagram-ZTM2IBQH-22c5YuUh.js +217 -0
  27. gradio_leaderboard/templates/component/erDiagram-R3QVA2FD-DZp2MeDc.js +844 -0
  28. gradio_leaderboard/templates/component/flowDiagram-PKI6S5ZS-CfK9UZi3.js +1623 -0
  29. gradio_leaderboard/templates/component/ganttDiagram-EK5VF46D-waaD2Kup.js +2502 -0
  30. gradio_leaderboard/templates/component/gitGraphDiagram-GW3U2K7C-DJCAxNvz.js +699 -0
  31. gradio_leaderboard/templates/component/graph-CXm5uxKj.js +247 -0
  32. gradio_leaderboard/templates/component/index.js +2 -33755
  33. gradio_leaderboard/templates/component/infoDiagram-RLU2ROGC-_Rx9wF6U.js +24 -0
  34. gradio_leaderboard/templates/component/init-DjUOC4st.js +16 -0
  35. gradio_leaderboard/templates/component/journeyDiagram-EWQZEKCU-G-tt0noJ.js +836 -0
  36. gradio_leaderboard/templates/component/kanban-definition-ILFWEQ3N-2aHifLFR.js +718 -0
  37. gradio_leaderboard/templates/component/layout-DiZ88ySr.js +1324 -0
  38. gradio_leaderboard/templates/component/linear-D4M9Dm-w.js +259 -0
  39. gradio_leaderboard/templates/component/mermaid.core-D36e06XD.js +14941 -0
  40. gradio_leaderboard/templates/component/mindmap-definition-CZNETY7S-1Jow2c7r.js +3215 -0
  41. gradio_leaderboard/templates/component/ordinal-DfAQgscy.js +61 -0
  42. gradio_leaderboard/templates/component/pieDiagram-NIOCPIFQ-DU7jHSoi.js +162 -0
  43. gradio_leaderboard/templates/component/quadrantDiagram-2OG54O6I-GcojS_If.js +1028 -0
  44. gradio_leaderboard/templates/component/requirementDiagram-SO3GGRV7-CBRyajan.js +853 -0
  45. gradio_leaderboard/templates/component/sankeyDiagram-4UZDY2LN-CeZji6oR.js +820 -0
  46. gradio_leaderboard/templates/component/sequenceDiagram-ZIKVLSP4-DMygkr3Y.js +2284 -0
  47. gradio_leaderboard/templates/component/stateDiagram-XX37X6EN-DK2vsx2r.js +263 -0
  48. gradio_leaderboard/templates/component/stateDiagram-v2-GD6S3NHB-BoIkPrjk.js +16 -0
  49. gradio_leaderboard/templates/component/style.css +1 -1
  50. gradio_leaderboard/templates/component/timeline-definition-RI47OAVP-BQ_Jr8hZ.js +797 -0
  51. gradio_leaderboard/templates/component/treemap-FKARHQ26-2Ty0RcZX.js +12981 -0
  52. gradio_leaderboard/templates/component/xychartDiagram-H2YORKM3--C9dwTwV.js +1368 -0
  53. {gradio_leaderboard-0.0.13.dist-info → gradio_leaderboard-0.0.14.dist-info}/METADATA +2 -2
  54. gradio_leaderboard-0.0.14.dist-info/RECORD +59 -0
  55. {gradio_leaderboard-0.0.13.dist-info → gradio_leaderboard-0.0.14.dist-info}/WHEEL +1 -1
  56. gradio_leaderboard-0.0.13.dist-info/RECORD +0 -10
@@ -0,0 +1,3215 @@
1
+ import { _ as S, l as z, j as Nt, ak as Dt, P as mt, d as at, H as Ot, W as At, C as tt, i as et, X as It, Y as Ct, $ as Rt } from "./mermaid.core-D36e06XD.js";
2
+ import { c as pt } from "./cytoscape.esm-Bdz5CrXX.js";
3
+ import { c as ot, g as xt } from "./Index-CzS_eGV6.js";
4
+ var dt = { exports: {} }, it = { exports: {} }, nt = { exports: {} }, ut;
5
+ function Mt() {
6
+ return ut || (ut = 1, function(I, w) {
7
+ (function(m, v) {
8
+ I.exports = v();
9
+ })(ot, function() {
10
+ return (
11
+ /******/
12
+ function(f) {
13
+ var m = {};
14
+ function v(r) {
15
+ if (m[r])
16
+ return m[r].exports;
17
+ var t = m[r] = {
18
+ /******/
19
+ i: r,
20
+ /******/
21
+ l: !1,
22
+ /******/
23
+ exports: {}
24
+ /******/
25
+ };
26
+ return f[r].call(t.exports, t, t.exports, v), t.l = !0, t.exports;
27
+ }
28
+ return v.m = f, v.c = m, v.i = function(r) {
29
+ return r;
30
+ }, v.d = function(r, t, e) {
31
+ v.o(r, t) || Object.defineProperty(r, t, {
32
+ /******/
33
+ configurable: !1,
34
+ /******/
35
+ enumerable: !0,
36
+ /******/
37
+ get: e
38
+ /******/
39
+ });
40
+ }, v.n = function(r) {
41
+ var t = r && r.__esModule ? (
42
+ /******/
43
+ function() {
44
+ return r.default;
45
+ }
46
+ ) : (
47
+ /******/
48
+ function() {
49
+ return r;
50
+ }
51
+ );
52
+ return v.d(t, "a", t), t;
53
+ }, v.o = function(r, t) {
54
+ return Object.prototype.hasOwnProperty.call(r, t);
55
+ }, v.p = "", v(v.s = 26);
56
+ }([
57
+ /* 0 */
58
+ /***/
59
+ function(f, m, v) {
60
+ function r() {
61
+ }
62
+ r.QUALITY = 1, r.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, r.DEFAULT_INCREMENTAL = !1, r.DEFAULT_ANIMATION_ON_LAYOUT = !0, r.DEFAULT_ANIMATION_DURING_LAYOUT = !1, r.DEFAULT_ANIMATION_PERIOD = 50, r.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, r.DEFAULT_GRAPH_MARGIN = 15, r.NODE_DIMENSIONS_INCLUDE_LABELS = !1, r.SIMPLE_NODE_SIZE = 40, r.SIMPLE_NODE_HALF_SIZE = r.SIMPLE_NODE_SIZE / 2, r.EMPTY_COMPOUND_NODE_SIZE = 40, r.MIN_EDGE_LENGTH = 1, r.WORLD_BOUNDARY = 1e6, r.INITIAL_WORLD_BOUNDARY = r.WORLD_BOUNDARY / 1e3, r.WORLD_CENTER_X = 1200, r.WORLD_CENTER_Y = 900, f.exports = r;
63
+ },
64
+ /* 1 */
65
+ /***/
66
+ function(f, m, v) {
67
+ var r = v(2), t = v(8), e = v(9);
68
+ function i(g, a, y) {
69
+ r.call(this, y), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = y, this.bendpoints = [], this.source = g, this.target = a;
70
+ }
71
+ i.prototype = Object.create(r.prototype);
72
+ for (var o in r)
73
+ i[o] = r[o];
74
+ i.prototype.getSource = function() {
75
+ return this.source;
76
+ }, i.prototype.getTarget = function() {
77
+ return this.target;
78
+ }, i.prototype.isInterGraph = function() {
79
+ return this.isInterGraph;
80
+ }, i.prototype.getLength = function() {
81
+ return this.length;
82
+ }, i.prototype.isOverlapingSourceAndTarget = function() {
83
+ return this.isOverlapingSourceAndTarget;
84
+ }, i.prototype.getBendpoints = function() {
85
+ return this.bendpoints;
86
+ }, i.prototype.getLca = function() {
87
+ return this.lca;
88
+ }, i.prototype.getSourceInLca = function() {
89
+ return this.sourceInLca;
90
+ }, i.prototype.getTargetInLca = function() {
91
+ return this.targetInLca;
92
+ }, i.prototype.getOtherEnd = function(g) {
93
+ if (this.source === g)
94
+ return this.target;
95
+ if (this.target === g)
96
+ return this.source;
97
+ throw "Node is not incident with this edge";
98
+ }, i.prototype.getOtherEndInGraph = function(g, a) {
99
+ for (var y = this.getOtherEnd(g), n = a.getGraphManager().getRoot(); ; ) {
100
+ if (y.getOwner() == a)
101
+ return y;
102
+ if (y.getOwner() == n)
103
+ break;
104
+ y = y.getOwner().getParent();
105
+ }
106
+ return null;
107
+ }, i.prototype.updateLength = function() {
108
+ var g = new Array(4);
109
+ this.isOverlapingSourceAndTarget = t.getIntersection(this.target.getRect(), this.source.getRect(), g), this.isOverlapingSourceAndTarget || (this.lengthX = g[0] - g[2], this.lengthY = g[1] - g[3], Math.abs(this.lengthX) < 1 && (this.lengthX = e.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = e.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY));
110
+ }, i.prototype.updateLengthSimple = function() {
111
+ this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = e.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = e.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
112
+ }, f.exports = i;
113
+ },
114
+ /* 2 */
115
+ /***/
116
+ function(f, m, v) {
117
+ function r(t) {
118
+ this.vGraphObject = t;
119
+ }
120
+ f.exports = r;
121
+ },
122
+ /* 3 */
123
+ /***/
124
+ function(f, m, v) {
125
+ var r = v(2), t = v(10), e = v(13), i = v(0), o = v(16), g = v(4);
126
+ function a(n, c, l, E) {
127
+ l == null && E == null && (E = c), r.call(this, E), n.graphManager != null && (n = n.graphManager), this.estimatedSize = t.MIN_VALUE, this.inclusionTreeDepth = t.MAX_VALUE, this.vGraphObject = E, this.edges = [], this.graphManager = n, l != null && c != null ? this.rect = new e(c.x, c.y, l.width, l.height) : this.rect = new e();
128
+ }
129
+ a.prototype = Object.create(r.prototype);
130
+ for (var y in r)
131
+ a[y] = r[y];
132
+ a.prototype.getEdges = function() {
133
+ return this.edges;
134
+ }, a.prototype.getChild = function() {
135
+ return this.child;
136
+ }, a.prototype.getOwner = function() {
137
+ return this.owner;
138
+ }, a.prototype.getWidth = function() {
139
+ return this.rect.width;
140
+ }, a.prototype.setWidth = function(n) {
141
+ this.rect.width = n;
142
+ }, a.prototype.getHeight = function() {
143
+ return this.rect.height;
144
+ }, a.prototype.setHeight = function(n) {
145
+ this.rect.height = n;
146
+ }, a.prototype.getCenterX = function() {
147
+ return this.rect.x + this.rect.width / 2;
148
+ }, a.prototype.getCenterY = function() {
149
+ return this.rect.y + this.rect.height / 2;
150
+ }, a.prototype.getCenter = function() {
151
+ return new g(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
152
+ }, a.prototype.getLocation = function() {
153
+ return new g(this.rect.x, this.rect.y);
154
+ }, a.prototype.getRect = function() {
155
+ return this.rect;
156
+ }, a.prototype.getDiagonal = function() {
157
+ return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
158
+ }, a.prototype.getHalfTheDiagonal = function() {
159
+ return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
160
+ }, a.prototype.setRect = function(n, c) {
161
+ this.rect.x = n.x, this.rect.y = n.y, this.rect.width = c.width, this.rect.height = c.height;
162
+ }, a.prototype.setCenter = function(n, c) {
163
+ this.rect.x = n - this.rect.width / 2, this.rect.y = c - this.rect.height / 2;
164
+ }, a.prototype.setLocation = function(n, c) {
165
+ this.rect.x = n, this.rect.y = c;
166
+ }, a.prototype.moveBy = function(n, c) {
167
+ this.rect.x += n, this.rect.y += c;
168
+ }, a.prototype.getEdgeListToNode = function(n) {
169
+ var c = [], l = this;
170
+ return l.edges.forEach(function(E) {
171
+ if (E.target == n) {
172
+ if (E.source != l) throw "Incorrect edge source!";
173
+ c.push(E);
174
+ }
175
+ }), c;
176
+ }, a.prototype.getEdgesBetween = function(n) {
177
+ var c = [], l = this;
178
+ return l.edges.forEach(function(E) {
179
+ if (!(E.source == l || E.target == l)) throw "Incorrect edge source and/or target";
180
+ (E.target == n || E.source == n) && c.push(E);
181
+ }), c;
182
+ }, a.prototype.getNeighborsList = function() {
183
+ var n = /* @__PURE__ */ new Set(), c = this;
184
+ return c.edges.forEach(function(l) {
185
+ if (l.source == c)
186
+ n.add(l.target);
187
+ else {
188
+ if (l.target != c)
189
+ throw "Incorrect incidency!";
190
+ n.add(l.source);
191
+ }
192
+ }), n;
193
+ }, a.prototype.withChildren = function() {
194
+ var n = /* @__PURE__ */ new Set(), c, l;
195
+ if (n.add(this), this.child != null)
196
+ for (var E = this.child.getNodes(), T = 0; T < E.length; T++)
197
+ c = E[T], l = c.withChildren(), l.forEach(function(D) {
198
+ n.add(D);
199
+ });
200
+ return n;
201
+ }, a.prototype.getNoOfChildren = function() {
202
+ var n = 0, c;
203
+ if (this.child == null)
204
+ n = 1;
205
+ else
206
+ for (var l = this.child.getNodes(), E = 0; E < l.length; E++)
207
+ c = l[E], n += c.getNoOfChildren();
208
+ return n == 0 && (n = 1), n;
209
+ }, a.prototype.getEstimatedSize = function() {
210
+ if (this.estimatedSize == t.MIN_VALUE)
211
+ throw "assert failed";
212
+ return this.estimatedSize;
213
+ }, a.prototype.calcEstimatedSize = function() {
214
+ return this.child == null ? this.estimatedSize = (this.rect.width + this.rect.height) / 2 : (this.estimatedSize = this.child.calcEstimatedSize(), this.rect.width = this.estimatedSize, this.rect.height = this.estimatedSize, this.estimatedSize);
215
+ }, a.prototype.scatter = function() {
216
+ var n, c, l = -i.INITIAL_WORLD_BOUNDARY, E = i.INITIAL_WORLD_BOUNDARY;
217
+ n = i.WORLD_CENTER_X + o.nextDouble() * (E - l) + l;
218
+ var T = -i.INITIAL_WORLD_BOUNDARY, D = i.INITIAL_WORLD_BOUNDARY;
219
+ c = i.WORLD_CENTER_Y + o.nextDouble() * (D - T) + T, this.rect.x = n, this.rect.y = c;
220
+ }, a.prototype.updateBounds = function() {
221
+ if (this.getChild() == null)
222
+ throw "assert failed";
223
+ if (this.getChild().getNodes().length != 0) {
224
+ var n = this.getChild();
225
+ if (n.updateBounds(!0), this.rect.x = n.getLeft(), this.rect.y = n.getTop(), this.setWidth(n.getRight() - n.getLeft()), this.setHeight(n.getBottom() - n.getTop()), i.NODE_DIMENSIONS_INCLUDE_LABELS) {
226
+ var c = n.getRight() - n.getLeft(), l = n.getBottom() - n.getTop();
227
+ this.labelWidth > c && (this.rect.x -= (this.labelWidth - c) / 2, this.setWidth(this.labelWidth)), this.labelHeight > l && (this.labelPos == "center" ? this.rect.y -= (this.labelHeight - l) / 2 : this.labelPos == "top" && (this.rect.y -= this.labelHeight - l), this.setHeight(this.labelHeight));
228
+ }
229
+ }
230
+ }, a.prototype.getInclusionTreeDepth = function() {
231
+ if (this.inclusionTreeDepth == t.MAX_VALUE)
232
+ throw "assert failed";
233
+ return this.inclusionTreeDepth;
234
+ }, a.prototype.transform = function(n) {
235
+ var c = this.rect.x;
236
+ c > i.WORLD_BOUNDARY ? c = i.WORLD_BOUNDARY : c < -i.WORLD_BOUNDARY && (c = -i.WORLD_BOUNDARY);
237
+ var l = this.rect.y;
238
+ l > i.WORLD_BOUNDARY ? l = i.WORLD_BOUNDARY : l < -i.WORLD_BOUNDARY && (l = -i.WORLD_BOUNDARY);
239
+ var E = new g(c, l), T = n.inverseTransformPoint(E);
240
+ this.setLocation(T.x, T.y);
241
+ }, a.prototype.getLeft = function() {
242
+ return this.rect.x;
243
+ }, a.prototype.getRight = function() {
244
+ return this.rect.x + this.rect.width;
245
+ }, a.prototype.getTop = function() {
246
+ return this.rect.y;
247
+ }, a.prototype.getBottom = function() {
248
+ return this.rect.y + this.rect.height;
249
+ }, a.prototype.getParent = function() {
250
+ return this.owner == null ? null : this.owner.getParent();
251
+ }, f.exports = a;
252
+ },
253
+ /* 4 */
254
+ /***/
255
+ function(f, m, v) {
256
+ function r(t, e) {
257
+ t == null && e == null ? (this.x = 0, this.y = 0) : (this.x = t, this.y = e);
258
+ }
259
+ r.prototype.getX = function() {
260
+ return this.x;
261
+ }, r.prototype.getY = function() {
262
+ return this.y;
263
+ }, r.prototype.setX = function(t) {
264
+ this.x = t;
265
+ }, r.prototype.setY = function(t) {
266
+ this.y = t;
267
+ }, r.prototype.getDifference = function(t) {
268
+ return new DimensionD(this.x - t.x, this.y - t.y);
269
+ }, r.prototype.getCopy = function() {
270
+ return new r(this.x, this.y);
271
+ }, r.prototype.translate = function(t) {
272
+ return this.x += t.width, this.y += t.height, this;
273
+ }, f.exports = r;
274
+ },
275
+ /* 5 */
276
+ /***/
277
+ function(f, m, v) {
278
+ var r = v(2), t = v(10), e = v(0), i = v(6), o = v(3), g = v(1), a = v(13), y = v(12), n = v(11);
279
+ function c(E, T, D) {
280
+ r.call(this, D), this.estimatedSize = t.MIN_VALUE, this.margin = e.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = E, T != null && T instanceof i ? this.graphManager = T : T != null && T instanceof Layout && (this.graphManager = T.graphManager);
281
+ }
282
+ c.prototype = Object.create(r.prototype);
283
+ for (var l in r)
284
+ c[l] = r[l];
285
+ c.prototype.getNodes = function() {
286
+ return this.nodes;
287
+ }, c.prototype.getEdges = function() {
288
+ return this.edges;
289
+ }, c.prototype.getGraphManager = function() {
290
+ return this.graphManager;
291
+ }, c.prototype.getParent = function() {
292
+ return this.parent;
293
+ }, c.prototype.getLeft = function() {
294
+ return this.left;
295
+ }, c.prototype.getRight = function() {
296
+ return this.right;
297
+ }, c.prototype.getTop = function() {
298
+ return this.top;
299
+ }, c.prototype.getBottom = function() {
300
+ return this.bottom;
301
+ }, c.prototype.isConnected = function() {
302
+ return this.isConnected;
303
+ }, c.prototype.add = function(E, T, D) {
304
+ if (T == null && D == null) {
305
+ var L = E;
306
+ if (this.graphManager == null)
307
+ throw "Graph has no graph mgr!";
308
+ if (this.getNodes().indexOf(L) > -1)
309
+ throw "Node already in graph!";
310
+ return L.owner = this, this.getNodes().push(L), L;
311
+ } else {
312
+ var O = E;
313
+ if (!(this.getNodes().indexOf(T) > -1 && this.getNodes().indexOf(D) > -1))
314
+ throw "Source or target not in graph!";
315
+ if (!(T.owner == D.owner && T.owner == this))
316
+ throw "Both owners must be this graph!";
317
+ return T.owner != D.owner ? null : (O.source = T, O.target = D, O.isInterGraph = !1, this.getEdges().push(O), T.edges.push(O), D != T && D.edges.push(O), O);
318
+ }
319
+ }, c.prototype.remove = function(E) {
320
+ var T = E;
321
+ if (E instanceof o) {
322
+ if (T == null)
323
+ throw "Node is null!";
324
+ if (!(T.owner != null && T.owner == this))
325
+ throw "Owner graph is invalid!";
326
+ if (this.graphManager == null)
327
+ throw "Owner graph manager is invalid!";
328
+ for (var D = T.edges.slice(), L, O = D.length, d = 0; d < O; d++)
329
+ L = D[d], L.isInterGraph ? this.graphManager.remove(L) : L.source.owner.remove(L);
330
+ var N = this.nodes.indexOf(T);
331
+ if (N == -1)
332
+ throw "Node not in owner node list!";
333
+ this.nodes.splice(N, 1);
334
+ } else if (E instanceof g) {
335
+ var L = E;
336
+ if (L == null)
337
+ throw "Edge is null!";
338
+ if (!(L.source != null && L.target != null))
339
+ throw "Source and/or target is null!";
340
+ if (!(L.source.owner != null && L.target.owner != null && L.source.owner == this && L.target.owner == this))
341
+ throw "Source and/or target owner is invalid!";
342
+ var s = L.source.edges.indexOf(L), h = L.target.edges.indexOf(L);
343
+ if (!(s > -1 && h > -1))
344
+ throw "Source and/or target doesn't know this edge!";
345
+ L.source.edges.splice(s, 1), L.target != L.source && L.target.edges.splice(h, 1);
346
+ var N = L.source.owner.getEdges().indexOf(L);
347
+ if (N == -1)
348
+ throw "Not in owner's edge list!";
349
+ L.source.owner.getEdges().splice(N, 1);
350
+ }
351
+ }, c.prototype.updateLeftTop = function() {
352
+ for (var E = t.MAX_VALUE, T = t.MAX_VALUE, D, L, O, d = this.getNodes(), N = d.length, s = 0; s < N; s++) {
353
+ var h = d[s];
354
+ D = h.getTop(), L = h.getLeft(), E > D && (E = D), T > L && (T = L);
355
+ }
356
+ return E == t.MAX_VALUE ? null : (d[0].getParent().paddingLeft != null ? O = d[0].getParent().paddingLeft : O = this.margin, this.left = T - O, this.top = E - O, new y(this.left, this.top));
357
+ }, c.prototype.updateBounds = function(E) {
358
+ for (var T = t.MAX_VALUE, D = -t.MAX_VALUE, L = t.MAX_VALUE, O = -t.MAX_VALUE, d, N, s, h, u, p = this.nodes, A = p.length, C = 0; C < A; C++) {
359
+ var R = p[C];
360
+ E && R.child != null && R.updateBounds(), d = R.getLeft(), N = R.getRight(), s = R.getTop(), h = R.getBottom(), T > d && (T = d), D < N && (D = N), L > s && (L = s), O < h && (O = h);
361
+ }
362
+ var x = new a(T, L, D - T, O - L);
363
+ T == t.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), p[0].getParent().paddingLeft != null ? u = p[0].getParent().paddingLeft : u = this.margin, this.left = x.x - u, this.right = x.x + x.width + u, this.top = x.y - u, this.bottom = x.y + x.height + u;
364
+ }, c.calculateBounds = function(E) {
365
+ for (var T = t.MAX_VALUE, D = -t.MAX_VALUE, L = t.MAX_VALUE, O = -t.MAX_VALUE, d, N, s, h, u = E.length, p = 0; p < u; p++) {
366
+ var A = E[p];
367
+ d = A.getLeft(), N = A.getRight(), s = A.getTop(), h = A.getBottom(), T > d && (T = d), D < N && (D = N), L > s && (L = s), O < h && (O = h);
368
+ }
369
+ var C = new a(T, L, D - T, O - L);
370
+ return C;
371
+ }, c.prototype.getInclusionTreeDepth = function() {
372
+ return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
373
+ }, c.prototype.getEstimatedSize = function() {
374
+ if (this.estimatedSize == t.MIN_VALUE)
375
+ throw "assert failed";
376
+ return this.estimatedSize;
377
+ }, c.prototype.calcEstimatedSize = function() {
378
+ for (var E = 0, T = this.nodes, D = T.length, L = 0; L < D; L++) {
379
+ var O = T[L];
380
+ E += O.calcEstimatedSize();
381
+ }
382
+ return E == 0 ? this.estimatedSize = e.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = E / Math.sqrt(this.nodes.length), this.estimatedSize;
383
+ }, c.prototype.updateConnected = function() {
384
+ var E = this;
385
+ if (this.nodes.length == 0) {
386
+ this.isConnected = !0;
387
+ return;
388
+ }
389
+ var T = new n(), D = /* @__PURE__ */ new Set(), L = this.nodes[0], O, d, N = L.withChildren();
390
+ for (N.forEach(function(C) {
391
+ T.push(C), D.add(C);
392
+ }); T.length !== 0; ) {
393
+ L = T.shift(), O = L.getEdges();
394
+ for (var s = O.length, h = 0; h < s; h++) {
395
+ var u = O[h];
396
+ if (d = u.getOtherEndInGraph(L, this), d != null && !D.has(d)) {
397
+ var p = d.withChildren();
398
+ p.forEach(function(C) {
399
+ T.push(C), D.add(C);
400
+ });
401
+ }
402
+ }
403
+ }
404
+ if (this.isConnected = !1, D.size >= this.nodes.length) {
405
+ var A = 0;
406
+ D.forEach(function(C) {
407
+ C.owner == E && A++;
408
+ }), A == this.nodes.length && (this.isConnected = !0);
409
+ }
410
+ }, f.exports = c;
411
+ },
412
+ /* 6 */
413
+ /***/
414
+ function(f, m, v) {
415
+ var r, t = v(1);
416
+ function e(i) {
417
+ r = v(5), this.layout = i, this.graphs = [], this.edges = [];
418
+ }
419
+ e.prototype.addRoot = function() {
420
+ var i = this.layout.newGraph(), o = this.layout.newNode(null), g = this.add(i, o);
421
+ return this.setRootGraph(g), this.rootGraph;
422
+ }, e.prototype.add = function(i, o, g, a, y) {
423
+ if (g == null && a == null && y == null) {
424
+ if (i == null)
425
+ throw "Graph is null!";
426
+ if (o == null)
427
+ throw "Parent node is null!";
428
+ if (this.graphs.indexOf(i) > -1)
429
+ throw "Graph already in this graph mgr!";
430
+ if (this.graphs.push(i), i.parent != null)
431
+ throw "Already has a parent!";
432
+ if (o.child != null)
433
+ throw "Already has a child!";
434
+ return i.parent = o, o.child = i, i;
435
+ } else {
436
+ y = g, a = o, g = i;
437
+ var n = a.getOwner(), c = y.getOwner();
438
+ if (!(n != null && n.getGraphManager() == this))
439
+ throw "Source not in this graph mgr!";
440
+ if (!(c != null && c.getGraphManager() == this))
441
+ throw "Target not in this graph mgr!";
442
+ if (n == c)
443
+ return g.isInterGraph = !1, n.add(g, a, y);
444
+ if (g.isInterGraph = !0, g.source = a, g.target = y, this.edges.indexOf(g) > -1)
445
+ throw "Edge already in inter-graph edge list!";
446
+ if (this.edges.push(g), !(g.source != null && g.target != null))
447
+ throw "Edge source and/or target is null!";
448
+ if (!(g.source.edges.indexOf(g) == -1 && g.target.edges.indexOf(g) == -1))
449
+ throw "Edge already in source and/or target incidency list!";
450
+ return g.source.edges.push(g), g.target.edges.push(g), g;
451
+ }
452
+ }, e.prototype.remove = function(i) {
453
+ if (i instanceof r) {
454
+ var o = i;
455
+ if (o.getGraphManager() != this)
456
+ throw "Graph not in this graph mgr";
457
+ if (!(o == this.rootGraph || o.parent != null && o.parent.graphManager == this))
458
+ throw "Invalid parent node!";
459
+ var g = [];
460
+ g = g.concat(o.getEdges());
461
+ for (var a, y = g.length, n = 0; n < y; n++)
462
+ a = g[n], o.remove(a);
463
+ var c = [];
464
+ c = c.concat(o.getNodes());
465
+ var l;
466
+ y = c.length;
467
+ for (var n = 0; n < y; n++)
468
+ l = c[n], o.remove(l);
469
+ o == this.rootGraph && this.setRootGraph(null);
470
+ var E = this.graphs.indexOf(o);
471
+ this.graphs.splice(E, 1), o.parent = null;
472
+ } else if (i instanceof t) {
473
+ if (a = i, a == null)
474
+ throw "Edge is null!";
475
+ if (!a.isInterGraph)
476
+ throw "Not an inter-graph edge!";
477
+ if (!(a.source != null && a.target != null))
478
+ throw "Source and/or target is null!";
479
+ if (!(a.source.edges.indexOf(a) != -1 && a.target.edges.indexOf(a) != -1))
480
+ throw "Source and/or target doesn't know this edge!";
481
+ var E = a.source.edges.indexOf(a);
482
+ if (a.source.edges.splice(E, 1), E = a.target.edges.indexOf(a), a.target.edges.splice(E, 1), !(a.source.owner != null && a.source.owner.getGraphManager() != null))
483
+ throw "Edge owner graph or owner graph manager is null!";
484
+ if (a.source.owner.getGraphManager().edges.indexOf(a) == -1)
485
+ throw "Not in owner graph manager's edge list!";
486
+ var E = a.source.owner.getGraphManager().edges.indexOf(a);
487
+ a.source.owner.getGraphManager().edges.splice(E, 1);
488
+ }
489
+ }, e.prototype.updateBounds = function() {
490
+ this.rootGraph.updateBounds(!0);
491
+ }, e.prototype.getGraphs = function() {
492
+ return this.graphs;
493
+ }, e.prototype.getAllNodes = function() {
494
+ if (this.allNodes == null) {
495
+ for (var i = [], o = this.getGraphs(), g = o.length, a = 0; a < g; a++)
496
+ i = i.concat(o[a].getNodes());
497
+ this.allNodes = i;
498
+ }
499
+ return this.allNodes;
500
+ }, e.prototype.resetAllNodes = function() {
501
+ this.allNodes = null;
502
+ }, e.prototype.resetAllEdges = function() {
503
+ this.allEdges = null;
504
+ }, e.prototype.resetAllNodesToApplyGravitation = function() {
505
+ this.allNodesToApplyGravitation = null;
506
+ }, e.prototype.getAllEdges = function() {
507
+ if (this.allEdges == null) {
508
+ var i = [], o = this.getGraphs();
509
+ o.length;
510
+ for (var g = 0; g < o.length; g++)
511
+ i = i.concat(o[g].getEdges());
512
+ i = i.concat(this.edges), this.allEdges = i;
513
+ }
514
+ return this.allEdges;
515
+ }, e.prototype.getAllNodesToApplyGravitation = function() {
516
+ return this.allNodesToApplyGravitation;
517
+ }, e.prototype.setAllNodesToApplyGravitation = function(i) {
518
+ if (this.allNodesToApplyGravitation != null)
519
+ throw "assert failed";
520
+ this.allNodesToApplyGravitation = i;
521
+ }, e.prototype.getRoot = function() {
522
+ return this.rootGraph;
523
+ }, e.prototype.setRootGraph = function(i) {
524
+ if (i.getGraphManager() != this)
525
+ throw "Root not in this graph mgr!";
526
+ this.rootGraph = i, i.parent == null && (i.parent = this.layout.newNode("Root node"));
527
+ }, e.prototype.getLayout = function() {
528
+ return this.layout;
529
+ }, e.prototype.isOneAncestorOfOther = function(i, o) {
530
+ if (!(i != null && o != null))
531
+ throw "assert failed";
532
+ if (i == o)
533
+ return !0;
534
+ var g = i.getOwner(), a;
535
+ do {
536
+ if (a = g.getParent(), a == null)
537
+ break;
538
+ if (a == o)
539
+ return !0;
540
+ if (g = a.getOwner(), g == null)
541
+ break;
542
+ } while (!0);
543
+ g = o.getOwner();
544
+ do {
545
+ if (a = g.getParent(), a == null)
546
+ break;
547
+ if (a == i)
548
+ return !0;
549
+ if (g = a.getOwner(), g == null)
550
+ break;
551
+ } while (!0);
552
+ return !1;
553
+ }, e.prototype.calcLowestCommonAncestors = function() {
554
+ for (var i, o, g, a, y, n = this.getAllEdges(), c = n.length, l = 0; l < c; l++) {
555
+ if (i = n[l], o = i.source, g = i.target, i.lca = null, i.sourceInLca = o, i.targetInLca = g, o == g) {
556
+ i.lca = o.getOwner();
557
+ continue;
558
+ }
559
+ for (a = o.getOwner(); i.lca == null; ) {
560
+ for (i.targetInLca = g, y = g.getOwner(); i.lca == null; ) {
561
+ if (y == a) {
562
+ i.lca = y;
563
+ break;
564
+ }
565
+ if (y == this.rootGraph)
566
+ break;
567
+ if (i.lca != null)
568
+ throw "assert failed";
569
+ i.targetInLca = y.getParent(), y = i.targetInLca.getOwner();
570
+ }
571
+ if (a == this.rootGraph)
572
+ break;
573
+ i.lca == null && (i.sourceInLca = a.getParent(), a = i.sourceInLca.getOwner());
574
+ }
575
+ if (i.lca == null)
576
+ throw "assert failed";
577
+ }
578
+ }, e.prototype.calcLowestCommonAncestor = function(i, o) {
579
+ if (i == o)
580
+ return i.getOwner();
581
+ var g = i.getOwner();
582
+ do {
583
+ if (g == null)
584
+ break;
585
+ var a = o.getOwner();
586
+ do {
587
+ if (a == null)
588
+ break;
589
+ if (a == g)
590
+ return a;
591
+ a = a.getParent().getOwner();
592
+ } while (!0);
593
+ g = g.getParent().getOwner();
594
+ } while (!0);
595
+ return g;
596
+ }, e.prototype.calcInclusionTreeDepths = function(i, o) {
597
+ i == null && o == null && (i = this.rootGraph, o = 1);
598
+ for (var g, a = i.getNodes(), y = a.length, n = 0; n < y; n++)
599
+ g = a[n], g.inclusionTreeDepth = o, g.child != null && this.calcInclusionTreeDepths(g.child, o + 1);
600
+ }, e.prototype.includesInvalidEdge = function() {
601
+ for (var i, o = this.edges.length, g = 0; g < o; g++)
602
+ if (i = this.edges[g], this.isOneAncestorOfOther(i.source, i.target))
603
+ return !0;
604
+ return !1;
605
+ }, f.exports = e;
606
+ },
607
+ /* 7 */
608
+ /***/
609
+ function(f, m, v) {
610
+ var r = v(0);
611
+ function t() {
612
+ }
613
+ for (var e in r)
614
+ t[e] = r[e];
615
+ t.MAX_ITERATIONS = 2500, t.DEFAULT_EDGE_LENGTH = 50, t.DEFAULT_SPRING_STRENGTH = 0.45, t.DEFAULT_REPULSION_STRENGTH = 4500, t.DEFAULT_GRAVITY_STRENGTH = 0.4, t.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, t.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, t.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3, t.COOLING_ADAPTATION_FACTOR = 0.33, t.ADAPTATION_LOWER_NODE_LIMIT = 1e3, t.ADAPTATION_UPPER_NODE_LIMIT = 5e3, t.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, t.MAX_NODE_DISPLACEMENT = t.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, t.MIN_REPULSION_DIST = t.DEFAULT_EDGE_LENGTH / 10, t.CONVERGENCE_CHECK_PERIOD = 100, t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1, t.MIN_EDGE_LENGTH = 1, t.GRID_CALCULATION_CHECK_PERIOD = 10, f.exports = t;
616
+ },
617
+ /* 8 */
618
+ /***/
619
+ function(f, m, v) {
620
+ var r = v(12);
621
+ function t() {
622
+ }
623
+ t.calcSeparationAmount = function(e, i, o, g) {
624
+ if (!e.intersects(i))
625
+ throw "assert failed";
626
+ var a = new Array(2);
627
+ this.decideDirectionsForOverlappingNodes(e, i, a), o[0] = Math.min(e.getRight(), i.getRight()) - Math.max(e.x, i.x), o[1] = Math.min(e.getBottom(), i.getBottom()) - Math.max(e.y, i.y), e.getX() <= i.getX() && e.getRight() >= i.getRight() ? o[0] += Math.min(i.getX() - e.getX(), e.getRight() - i.getRight()) : i.getX() <= e.getX() && i.getRight() >= e.getRight() && (o[0] += Math.min(e.getX() - i.getX(), i.getRight() - e.getRight())), e.getY() <= i.getY() && e.getBottom() >= i.getBottom() ? o[1] += Math.min(i.getY() - e.getY(), e.getBottom() - i.getBottom()) : i.getY() <= e.getY() && i.getBottom() >= e.getBottom() && (o[1] += Math.min(e.getY() - i.getY(), i.getBottom() - e.getBottom()));
628
+ var y = Math.abs((i.getCenterY() - e.getCenterY()) / (i.getCenterX() - e.getCenterX()));
629
+ i.getCenterY() === e.getCenterY() && i.getCenterX() === e.getCenterX() && (y = 1);
630
+ var n = y * o[0], c = o[1] / y;
631
+ o[0] < c ? c = o[0] : n = o[1], o[0] = -1 * a[0] * (c / 2 + g), o[1] = -1 * a[1] * (n / 2 + g);
632
+ }, t.decideDirectionsForOverlappingNodes = function(e, i, o) {
633
+ e.getCenterX() < i.getCenterX() ? o[0] = -1 : o[0] = 1, e.getCenterY() < i.getCenterY() ? o[1] = -1 : o[1] = 1;
634
+ }, t.getIntersection2 = function(e, i, o) {
635
+ var g = e.getCenterX(), a = e.getCenterY(), y = i.getCenterX(), n = i.getCenterY();
636
+ if (e.intersects(i))
637
+ return o[0] = g, o[1] = a, o[2] = y, o[3] = n, !0;
638
+ var c = e.getX(), l = e.getY(), E = e.getRight(), T = e.getX(), D = e.getBottom(), L = e.getRight(), O = e.getWidthHalf(), d = e.getHeightHalf(), N = i.getX(), s = i.getY(), h = i.getRight(), u = i.getX(), p = i.getBottom(), A = i.getRight(), C = i.getWidthHalf(), R = i.getHeightHalf(), x = !1, _ = !1;
639
+ if (g === y) {
640
+ if (a > n)
641
+ return o[0] = g, o[1] = l, o[2] = y, o[3] = p, !1;
642
+ if (a < n)
643
+ return o[0] = g, o[1] = D, o[2] = y, o[3] = s, !1;
644
+ } else if (a === n) {
645
+ if (g > y)
646
+ return o[0] = c, o[1] = a, o[2] = h, o[3] = n, !1;
647
+ if (g < y)
648
+ return o[0] = E, o[1] = a, o[2] = N, o[3] = n, !1;
649
+ } else {
650
+ var U = e.height / e.width, X = i.height / i.width, M = (n - a) / (y - g), G = void 0, F = void 0, b = void 0, Y = void 0, k = void 0, H = void 0;
651
+ if (-U === M ? g > y ? (o[0] = T, o[1] = D, x = !0) : (o[0] = E, o[1] = l, x = !0) : U === M && (g > y ? (o[0] = c, o[1] = l, x = !0) : (o[0] = L, o[1] = D, x = !0)), -X === M ? y > g ? (o[2] = u, o[3] = p, _ = !0) : (o[2] = h, o[3] = s, _ = !0) : X === M && (y > g ? (o[2] = N, o[3] = s, _ = !0) : (o[2] = A, o[3] = p, _ = !0)), x && _)
652
+ return !1;
653
+ if (g > y ? a > n ? (G = this.getCardinalDirection(U, M, 4), F = this.getCardinalDirection(X, M, 2)) : (G = this.getCardinalDirection(-U, M, 3), F = this.getCardinalDirection(-X, M, 1)) : a > n ? (G = this.getCardinalDirection(-U, M, 1), F = this.getCardinalDirection(-X, M, 3)) : (G = this.getCardinalDirection(U, M, 2), F = this.getCardinalDirection(X, M, 4)), !x)
654
+ switch (G) {
655
+ case 1:
656
+ Y = l, b = g + -d / M, o[0] = b, o[1] = Y;
657
+ break;
658
+ case 2:
659
+ b = L, Y = a + O * M, o[0] = b, o[1] = Y;
660
+ break;
661
+ case 3:
662
+ Y = D, b = g + d / M, o[0] = b, o[1] = Y;
663
+ break;
664
+ case 4:
665
+ b = T, Y = a + -O * M, o[0] = b, o[1] = Y;
666
+ break;
667
+ }
668
+ if (!_)
669
+ switch (F) {
670
+ case 1:
671
+ H = s, k = y + -R / M, o[2] = k, o[3] = H;
672
+ break;
673
+ case 2:
674
+ k = A, H = n + C * M, o[2] = k, o[3] = H;
675
+ break;
676
+ case 3:
677
+ H = p, k = y + R / M, o[2] = k, o[3] = H;
678
+ break;
679
+ case 4:
680
+ k = u, H = n + -C * M, o[2] = k, o[3] = H;
681
+ break;
682
+ }
683
+ }
684
+ return !1;
685
+ }, t.getCardinalDirection = function(e, i, o) {
686
+ return e > i ? o : 1 + o % 4;
687
+ }, t.getIntersection = function(e, i, o, g) {
688
+ if (g == null)
689
+ return this.getIntersection2(e, i, o);
690
+ var a = e.x, y = e.y, n = i.x, c = i.y, l = o.x, E = o.y, T = g.x, D = g.y, L = void 0, O = void 0, d = void 0, N = void 0, s = void 0, h = void 0, u = void 0, p = void 0, A = void 0;
691
+ return d = c - y, s = a - n, u = n * y - a * c, N = D - E, h = l - T, p = T * E - l * D, A = d * h - N * s, A === 0 ? null : (L = (s * p - h * u) / A, O = (N * u - d * p) / A, new r(L, O));
692
+ }, t.angleOfVector = function(e, i, o, g) {
693
+ var a = void 0;
694
+ return e !== o ? (a = Math.atan((g - i) / (o - e)), o < e ? a += Math.PI : g < i && (a += this.TWO_PI)) : g < i ? a = this.ONE_AND_HALF_PI : a = this.HALF_PI, a;
695
+ }, t.doIntersect = function(e, i, o, g) {
696
+ var a = e.x, y = e.y, n = i.x, c = i.y, l = o.x, E = o.y, T = g.x, D = g.y, L = (n - a) * (D - E) - (T - l) * (c - y);
697
+ if (L === 0)
698
+ return !1;
699
+ var O = ((D - E) * (T - a) + (l - T) * (D - y)) / L, d = ((y - c) * (T - a) + (n - a) * (D - y)) / L;
700
+ return 0 < O && O < 1 && 0 < d && d < 1;
701
+ }, t.HALF_PI = 0.5 * Math.PI, t.ONE_AND_HALF_PI = 1.5 * Math.PI, t.TWO_PI = 2 * Math.PI, t.THREE_PI = 3 * Math.PI, f.exports = t;
702
+ },
703
+ /* 9 */
704
+ /***/
705
+ function(f, m, v) {
706
+ function r() {
707
+ }
708
+ r.sign = function(t) {
709
+ return t > 0 ? 1 : t < 0 ? -1 : 0;
710
+ }, r.floor = function(t) {
711
+ return t < 0 ? Math.ceil(t) : Math.floor(t);
712
+ }, r.ceil = function(t) {
713
+ return t < 0 ? Math.floor(t) : Math.ceil(t);
714
+ }, f.exports = r;
715
+ },
716
+ /* 10 */
717
+ /***/
718
+ function(f, m, v) {
719
+ function r() {
720
+ }
721
+ r.MAX_VALUE = 2147483647, r.MIN_VALUE = -2147483648, f.exports = r;
722
+ },
723
+ /* 11 */
724
+ /***/
725
+ function(f, m, v) {
726
+ var r = /* @__PURE__ */ function() {
727
+ function a(y, n) {
728
+ for (var c = 0; c < n.length; c++) {
729
+ var l = n[c];
730
+ l.enumerable = l.enumerable || !1, l.configurable = !0, "value" in l && (l.writable = !0), Object.defineProperty(y, l.key, l);
731
+ }
732
+ }
733
+ return function(y, n, c) {
734
+ return n && a(y.prototype, n), c && a(y, c), y;
735
+ };
736
+ }();
737
+ function t(a, y) {
738
+ if (!(a instanceof y))
739
+ throw new TypeError("Cannot call a class as a function");
740
+ }
741
+ var e = function(y) {
742
+ return { value: y, next: null, prev: null };
743
+ }, i = function(y, n, c, l) {
744
+ return y !== null ? y.next = n : l.head = n, c !== null ? c.prev = n : l.tail = n, n.prev = y, n.next = c, l.length++, n;
745
+ }, o = function(y, n) {
746
+ var c = y.prev, l = y.next;
747
+ return c !== null ? c.next = l : n.head = l, l !== null ? l.prev = c : n.tail = c, y.prev = y.next = null, n.length--, y;
748
+ }, g = function() {
749
+ function a(y) {
750
+ var n = this;
751
+ t(this, a), this.length = 0, this.head = null, this.tail = null, y?.forEach(function(c) {
752
+ return n.push(c);
753
+ });
754
+ }
755
+ return r(a, [{
756
+ key: "size",
757
+ value: function() {
758
+ return this.length;
759
+ }
760
+ }, {
761
+ key: "insertBefore",
762
+ value: function(n, c) {
763
+ return i(c.prev, e(n), c, this);
764
+ }
765
+ }, {
766
+ key: "insertAfter",
767
+ value: function(n, c) {
768
+ return i(c, e(n), c.next, this);
769
+ }
770
+ }, {
771
+ key: "insertNodeBefore",
772
+ value: function(n, c) {
773
+ return i(c.prev, n, c, this);
774
+ }
775
+ }, {
776
+ key: "insertNodeAfter",
777
+ value: function(n, c) {
778
+ return i(c, n, c.next, this);
779
+ }
780
+ }, {
781
+ key: "push",
782
+ value: function(n) {
783
+ return i(this.tail, e(n), null, this);
784
+ }
785
+ }, {
786
+ key: "unshift",
787
+ value: function(n) {
788
+ return i(null, e(n), this.head, this);
789
+ }
790
+ }, {
791
+ key: "remove",
792
+ value: function(n) {
793
+ return o(n, this);
794
+ }
795
+ }, {
796
+ key: "pop",
797
+ value: function() {
798
+ return o(this.tail, this).value;
799
+ }
800
+ }, {
801
+ key: "popNode",
802
+ value: function() {
803
+ return o(this.tail, this);
804
+ }
805
+ }, {
806
+ key: "shift",
807
+ value: function() {
808
+ return o(this.head, this).value;
809
+ }
810
+ }, {
811
+ key: "shiftNode",
812
+ value: function() {
813
+ return o(this.head, this);
814
+ }
815
+ }, {
816
+ key: "get_object_at",
817
+ value: function(n) {
818
+ if (n <= this.length()) {
819
+ for (var c = 1, l = this.head; c < n; )
820
+ l = l.next, c++;
821
+ return l.value;
822
+ }
823
+ }
824
+ }, {
825
+ key: "set_object_at",
826
+ value: function(n, c) {
827
+ if (n <= this.length()) {
828
+ for (var l = 1, E = this.head; l < n; )
829
+ E = E.next, l++;
830
+ E.value = c;
831
+ }
832
+ }
833
+ }]), a;
834
+ }();
835
+ f.exports = g;
836
+ },
837
+ /* 12 */
838
+ /***/
839
+ function(f, m, v) {
840
+ function r(t, e, i) {
841
+ this.x = null, this.y = null, t == null && e == null && i == null ? (this.x = 0, this.y = 0) : typeof t == "number" && typeof e == "number" && i == null ? (this.x = t, this.y = e) : t.constructor.name == "Point" && e == null && i == null && (i = t, this.x = i.x, this.y = i.y);
842
+ }
843
+ r.prototype.getX = function() {
844
+ return this.x;
845
+ }, r.prototype.getY = function() {
846
+ return this.y;
847
+ }, r.prototype.getLocation = function() {
848
+ return new r(this.x, this.y);
849
+ }, r.prototype.setLocation = function(t, e, i) {
850
+ t.constructor.name == "Point" && e == null && i == null ? (i = t, this.setLocation(i.x, i.y)) : typeof t == "number" && typeof e == "number" && i == null && (parseInt(t) == t && parseInt(e) == e ? this.move(t, e) : (this.x = Math.floor(t + 0.5), this.y = Math.floor(e + 0.5)));
851
+ }, r.prototype.move = function(t, e) {
852
+ this.x = t, this.y = e;
853
+ }, r.prototype.translate = function(t, e) {
854
+ this.x += t, this.y += e;
855
+ }, r.prototype.equals = function(t) {
856
+ if (t.constructor.name == "Point") {
857
+ var e = t;
858
+ return this.x == e.x && this.y == e.y;
859
+ }
860
+ return this == t;
861
+ }, r.prototype.toString = function() {
862
+ return new r().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
863
+ }, f.exports = r;
864
+ },
865
+ /* 13 */
866
+ /***/
867
+ function(f, m, v) {
868
+ function r(t, e, i, o) {
869
+ this.x = 0, this.y = 0, this.width = 0, this.height = 0, t != null && e != null && i != null && o != null && (this.x = t, this.y = e, this.width = i, this.height = o);
870
+ }
871
+ r.prototype.getX = function() {
872
+ return this.x;
873
+ }, r.prototype.setX = function(t) {
874
+ this.x = t;
875
+ }, r.prototype.getY = function() {
876
+ return this.y;
877
+ }, r.prototype.setY = function(t) {
878
+ this.y = t;
879
+ }, r.prototype.getWidth = function() {
880
+ return this.width;
881
+ }, r.prototype.setWidth = function(t) {
882
+ this.width = t;
883
+ }, r.prototype.getHeight = function() {
884
+ return this.height;
885
+ }, r.prototype.setHeight = function(t) {
886
+ this.height = t;
887
+ }, r.prototype.getRight = function() {
888
+ return this.x + this.width;
889
+ }, r.prototype.getBottom = function() {
890
+ return this.y + this.height;
891
+ }, r.prototype.intersects = function(t) {
892
+ return !(this.getRight() < t.x || this.getBottom() < t.y || t.getRight() < this.x || t.getBottom() < this.y);
893
+ }, r.prototype.getCenterX = function() {
894
+ return this.x + this.width / 2;
895
+ }, r.prototype.getMinX = function() {
896
+ return this.getX();
897
+ }, r.prototype.getMaxX = function() {
898
+ return this.getX() + this.width;
899
+ }, r.prototype.getCenterY = function() {
900
+ return this.y + this.height / 2;
901
+ }, r.prototype.getMinY = function() {
902
+ return this.getY();
903
+ }, r.prototype.getMaxY = function() {
904
+ return this.getY() + this.height;
905
+ }, r.prototype.getWidthHalf = function() {
906
+ return this.width / 2;
907
+ }, r.prototype.getHeightHalf = function() {
908
+ return this.height / 2;
909
+ }, f.exports = r;
910
+ },
911
+ /* 14 */
912
+ /***/
913
+ function(f, m, v) {
914
+ var r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
915
+ return typeof e;
916
+ } : function(e) {
917
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
918
+ };
919
+ function t() {
920
+ }
921
+ t.lastID = 0, t.createID = function(e) {
922
+ return t.isPrimitive(e) ? e : (e.uniqueID != null || (e.uniqueID = t.getString(), t.lastID++), e.uniqueID);
923
+ }, t.getString = function(e) {
924
+ return e == null && (e = t.lastID), "Object#" + e;
925
+ }, t.isPrimitive = function(e) {
926
+ var i = typeof e > "u" ? "undefined" : r(e);
927
+ return e == null || i != "object" && i != "function";
928
+ }, f.exports = t;
929
+ },
930
+ /* 15 */
931
+ /***/
932
+ function(f, m, v) {
933
+ function r(l) {
934
+ if (Array.isArray(l)) {
935
+ for (var E = 0, T = Array(l.length); E < l.length; E++)
936
+ T[E] = l[E];
937
+ return T;
938
+ } else
939
+ return Array.from(l);
940
+ }
941
+ var t = v(0), e = v(6), i = v(3), o = v(1), g = v(5), a = v(4), y = v(17), n = v(27);
942
+ function c(l) {
943
+ n.call(this), this.layoutQuality = t.QUALITY, this.createBendsAsNeeded = t.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = t.DEFAULT_INCREMENTAL, this.animationOnLayout = t.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = t.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = t.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = t.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new e(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, l != null && (this.isRemoteUse = l);
944
+ }
945
+ c.RANDOM_SEED = 1, c.prototype = Object.create(n.prototype), c.prototype.getGraphManager = function() {
946
+ return this.graphManager;
947
+ }, c.prototype.getAllNodes = function() {
948
+ return this.graphManager.getAllNodes();
949
+ }, c.prototype.getAllEdges = function() {
950
+ return this.graphManager.getAllEdges();
951
+ }, c.prototype.getAllNodesToApplyGravitation = function() {
952
+ return this.graphManager.getAllNodesToApplyGravitation();
953
+ }, c.prototype.newGraphManager = function() {
954
+ var l = new e(this);
955
+ return this.graphManager = l, l;
956
+ }, c.prototype.newGraph = function(l) {
957
+ return new g(null, this.graphManager, l);
958
+ }, c.prototype.newNode = function(l) {
959
+ return new i(this.graphManager, l);
960
+ }, c.prototype.newEdge = function(l) {
961
+ return new o(null, null, l);
962
+ }, c.prototype.checkLayoutSuccess = function() {
963
+ return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
964
+ }, c.prototype.runLayout = function() {
965
+ this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
966
+ var l;
967
+ return this.checkLayoutSuccess() ? l = !1 : l = this.layout(), t.ANIMATE === "during" ? !1 : (l && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, l);
968
+ }, c.prototype.doPostLayout = function() {
969
+ this.incremental || this.transform(), this.update();
970
+ }, c.prototype.update2 = function() {
971
+ if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
972
+ for (var l = this.graphManager.getAllEdges(), E = 0; E < l.length; E++)
973
+ l[E];
974
+ for (var T = this.graphManager.getRoot().getNodes(), E = 0; E < T.length; E++)
975
+ T[E];
976
+ this.update(this.graphManager.getRoot());
977
+ }
978
+ }, c.prototype.update = function(l) {
979
+ if (l == null)
980
+ this.update2();
981
+ else if (l instanceof i) {
982
+ var E = l;
983
+ if (E.getChild() != null)
984
+ for (var T = E.getChild().getNodes(), D = 0; D < T.length; D++)
985
+ update(T[D]);
986
+ if (E.vGraphObject != null) {
987
+ var L = E.vGraphObject;
988
+ L.update(E);
989
+ }
990
+ } else if (l instanceof o) {
991
+ var O = l;
992
+ if (O.vGraphObject != null) {
993
+ var d = O.vGraphObject;
994
+ d.update(O);
995
+ }
996
+ } else if (l instanceof g) {
997
+ var N = l;
998
+ if (N.vGraphObject != null) {
999
+ var s = N.vGraphObject;
1000
+ s.update(N);
1001
+ }
1002
+ }
1003
+ }, c.prototype.initParameters = function() {
1004
+ this.isSubLayout || (this.layoutQuality = t.QUALITY, this.animationDuringLayout = t.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = t.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = t.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = t.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = t.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = t.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
1005
+ }, c.prototype.transform = function(l) {
1006
+ if (l == null)
1007
+ this.transform(new a(0, 0));
1008
+ else {
1009
+ var E = new y(), T = this.graphManager.getRoot().updateLeftTop();
1010
+ if (T != null) {
1011
+ E.setWorldOrgX(l.x), E.setWorldOrgY(l.y), E.setDeviceOrgX(T.x), E.setDeviceOrgY(T.y);
1012
+ for (var D = this.getAllNodes(), L, O = 0; O < D.length; O++)
1013
+ L = D[O], L.transform(E);
1014
+ }
1015
+ }
1016
+ }, c.prototype.positionNodesRandomly = function(l) {
1017
+ if (l == null)
1018
+ this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
1019
+ else
1020
+ for (var E, T, D = l.getNodes(), L = 0; L < D.length; L++)
1021
+ E = D[L], T = E.getChild(), T == null || T.getNodes().length == 0 ? E.scatter() : (this.positionNodesRandomly(T), E.updateBounds());
1022
+ }, c.prototype.getFlatForest = function() {
1023
+ for (var l = [], E = !0, T = this.graphManager.getRoot().getNodes(), D = !0, L = 0; L < T.length; L++)
1024
+ T[L].getChild() != null && (D = !1);
1025
+ if (!D)
1026
+ return l;
1027
+ var O = /* @__PURE__ */ new Set(), d = [], N = /* @__PURE__ */ new Map(), s = [];
1028
+ for (s = s.concat(T); s.length > 0 && E; ) {
1029
+ for (d.push(s[0]); d.length > 0 && E; ) {
1030
+ var h = d[0];
1031
+ d.splice(0, 1), O.add(h);
1032
+ for (var u = h.getEdges(), L = 0; L < u.length; L++) {
1033
+ var p = u[L].getOtherEnd(h);
1034
+ if (N.get(h) != p)
1035
+ if (!O.has(p))
1036
+ d.push(p), N.set(p, h);
1037
+ else {
1038
+ E = !1;
1039
+ break;
1040
+ }
1041
+ }
1042
+ }
1043
+ if (!E)
1044
+ l = [];
1045
+ else {
1046
+ var A = [].concat(r(O));
1047
+ l.push(A);
1048
+ for (var L = 0; L < A.length; L++) {
1049
+ var C = A[L], R = s.indexOf(C);
1050
+ R > -1 && s.splice(R, 1);
1051
+ }
1052
+ O = /* @__PURE__ */ new Set(), N = /* @__PURE__ */ new Map();
1053
+ }
1054
+ }
1055
+ return l;
1056
+ }, c.prototype.createDummyNodesForBendpoints = function(l) {
1057
+ for (var E = [], T = l.source, D = this.graphManager.calcLowestCommonAncestor(l.source, l.target), L = 0; L < l.bendpoints.length; L++) {
1058
+ var O = this.newNode(null);
1059
+ O.setRect(new Point(0, 0), new Dimension(1, 1)), D.add(O);
1060
+ var d = this.newEdge(null);
1061
+ this.graphManager.add(d, T, O), E.add(O), T = O;
1062
+ }
1063
+ var d = this.newEdge(null);
1064
+ return this.graphManager.add(d, T, l.target), this.edgeToDummyNodes.set(l, E), l.isInterGraph() ? this.graphManager.remove(l) : D.remove(l), E;
1065
+ }, c.prototype.createBendpointsFromDummyNodes = function() {
1066
+ var l = [];
1067
+ l = l.concat(this.graphManager.getAllEdges()), l = [].concat(r(this.edgeToDummyNodes.keys())).concat(l);
1068
+ for (var E = 0; E < l.length; E++) {
1069
+ var T = l[E];
1070
+ if (T.bendpoints.length > 0) {
1071
+ for (var D = this.edgeToDummyNodes.get(T), L = 0; L < D.length; L++) {
1072
+ var O = D[L], d = new a(O.getCenterX(), O.getCenterY()), N = T.bendpoints.get(L);
1073
+ N.x = d.x, N.y = d.y, O.getOwner().remove(O);
1074
+ }
1075
+ this.graphManager.add(T, T.source, T.target);
1076
+ }
1077
+ }
1078
+ }, c.transform = function(l, E, T, D) {
1079
+ if (T != null && D != null) {
1080
+ var L = E;
1081
+ if (l <= 50) {
1082
+ var O = E / T;
1083
+ L -= (E - O) / 50 * (50 - l);
1084
+ } else {
1085
+ var d = E * D;
1086
+ L += (d - E) / 50 * (l - 50);
1087
+ }
1088
+ return L;
1089
+ } else {
1090
+ var N, s;
1091
+ return l <= 50 ? (N = 9 * E / 500, s = E / 10) : (N = 9 * E / 50, s = -8 * E), N * l + s;
1092
+ }
1093
+ }, c.findCenterOfTree = function(l) {
1094
+ var E = [];
1095
+ E = E.concat(l);
1096
+ var T = [], D = /* @__PURE__ */ new Map(), L = !1, O = null;
1097
+ (E.length == 1 || E.length == 2) && (L = !0, O = E[0]);
1098
+ for (var d = 0; d < E.length; d++) {
1099
+ var N = E[d], s = N.getNeighborsList().size;
1100
+ D.set(N, N.getNeighborsList().size), s == 1 && T.push(N);
1101
+ }
1102
+ var h = [];
1103
+ for (h = h.concat(T); !L; ) {
1104
+ var u = [];
1105
+ u = u.concat(h), h = [];
1106
+ for (var d = 0; d < E.length; d++) {
1107
+ var N = E[d], p = E.indexOf(N);
1108
+ p >= 0 && E.splice(p, 1);
1109
+ var A = N.getNeighborsList();
1110
+ A.forEach(function(x) {
1111
+ if (T.indexOf(x) < 0) {
1112
+ var _ = D.get(x), U = _ - 1;
1113
+ U == 1 && h.push(x), D.set(x, U);
1114
+ }
1115
+ });
1116
+ }
1117
+ T = T.concat(h), (E.length == 1 || E.length == 2) && (L = !0, O = E[0]);
1118
+ }
1119
+ return O;
1120
+ }, c.prototype.setGraphManager = function(l) {
1121
+ this.graphManager = l;
1122
+ }, f.exports = c;
1123
+ },
1124
+ /* 16 */
1125
+ /***/
1126
+ function(f, m, v) {
1127
+ function r() {
1128
+ }
1129
+ r.seed = 1, r.x = 0, r.nextDouble = function() {
1130
+ return r.x = Math.sin(r.seed++) * 1e4, r.x - Math.floor(r.x);
1131
+ }, f.exports = r;
1132
+ },
1133
+ /* 17 */
1134
+ /***/
1135
+ function(f, m, v) {
1136
+ var r = v(4);
1137
+ function t(e, i) {
1138
+ this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
1139
+ }
1140
+ t.prototype.getWorldOrgX = function() {
1141
+ return this.lworldOrgX;
1142
+ }, t.prototype.setWorldOrgX = function(e) {
1143
+ this.lworldOrgX = e;
1144
+ }, t.prototype.getWorldOrgY = function() {
1145
+ return this.lworldOrgY;
1146
+ }, t.prototype.setWorldOrgY = function(e) {
1147
+ this.lworldOrgY = e;
1148
+ }, t.prototype.getWorldExtX = function() {
1149
+ return this.lworldExtX;
1150
+ }, t.prototype.setWorldExtX = function(e) {
1151
+ this.lworldExtX = e;
1152
+ }, t.prototype.getWorldExtY = function() {
1153
+ return this.lworldExtY;
1154
+ }, t.prototype.setWorldExtY = function(e) {
1155
+ this.lworldExtY = e;
1156
+ }, t.prototype.getDeviceOrgX = function() {
1157
+ return this.ldeviceOrgX;
1158
+ }, t.prototype.setDeviceOrgX = function(e) {
1159
+ this.ldeviceOrgX = e;
1160
+ }, t.prototype.getDeviceOrgY = function() {
1161
+ return this.ldeviceOrgY;
1162
+ }, t.prototype.setDeviceOrgY = function(e) {
1163
+ this.ldeviceOrgY = e;
1164
+ }, t.prototype.getDeviceExtX = function() {
1165
+ return this.ldeviceExtX;
1166
+ }, t.prototype.setDeviceExtX = function(e) {
1167
+ this.ldeviceExtX = e;
1168
+ }, t.prototype.getDeviceExtY = function() {
1169
+ return this.ldeviceExtY;
1170
+ }, t.prototype.setDeviceExtY = function(e) {
1171
+ this.ldeviceExtY = e;
1172
+ }, t.prototype.transformX = function(e) {
1173
+ var i = 0, o = this.lworldExtX;
1174
+ return o != 0 && (i = this.ldeviceOrgX + (e - this.lworldOrgX) * this.ldeviceExtX / o), i;
1175
+ }, t.prototype.transformY = function(e) {
1176
+ var i = 0, o = this.lworldExtY;
1177
+ return o != 0 && (i = this.ldeviceOrgY + (e - this.lworldOrgY) * this.ldeviceExtY / o), i;
1178
+ }, t.prototype.inverseTransformX = function(e) {
1179
+ var i = 0, o = this.ldeviceExtX;
1180
+ return o != 0 && (i = this.lworldOrgX + (e - this.ldeviceOrgX) * this.lworldExtX / o), i;
1181
+ }, t.prototype.inverseTransformY = function(e) {
1182
+ var i = 0, o = this.ldeviceExtY;
1183
+ return o != 0 && (i = this.lworldOrgY + (e - this.ldeviceOrgY) * this.lworldExtY / o), i;
1184
+ }, t.prototype.inverseTransformPoint = function(e) {
1185
+ var i = new r(this.inverseTransformX(e.x), this.inverseTransformY(e.y));
1186
+ return i;
1187
+ }, f.exports = t;
1188
+ },
1189
+ /* 18 */
1190
+ /***/
1191
+ function(f, m, v) {
1192
+ function r(n) {
1193
+ if (Array.isArray(n)) {
1194
+ for (var c = 0, l = Array(n.length); c < n.length; c++)
1195
+ l[c] = n[c];
1196
+ return l;
1197
+ } else
1198
+ return Array.from(n);
1199
+ }
1200
+ var t = v(15), e = v(7), i = v(0), o = v(8), g = v(9);
1201
+ function a() {
1202
+ t.call(this), this.useSmartIdealEdgeLengthCalculation = e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.idealEdgeLength = e.DEFAULT_EDGE_LENGTH, this.springConstant = e.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = e.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = e.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = e.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = e.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * e.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = e.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = e.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = e.MAX_ITERATIONS;
1203
+ }
1204
+ a.prototype = Object.create(t.prototype);
1205
+ for (var y in t)
1206
+ a[y] = t[y];
1207
+ a.prototype.initParameters = function() {
1208
+ t.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1209
+ }, a.prototype.calcIdealEdgeLengths = function() {
1210
+ for (var n, c, l, E, T, D, L = this.getGraphManager().getAllEdges(), O = 0; O < L.length; O++)
1211
+ n = L[O], n.idealLength = this.idealEdgeLength, n.isInterGraph && (l = n.getSource(), E = n.getTarget(), T = n.getSourceInLca().getEstimatedSize(), D = n.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (n.idealLength += T + D - 2 * i.SIMPLE_NODE_SIZE), c = n.getLca().getInclusionTreeDepth(), n.idealLength += e.DEFAULT_EDGE_LENGTH * e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (l.getInclusionTreeDepth() + E.getInclusionTreeDepth() - 2 * c));
1212
+ }, a.prototype.initSpringEmbedder = function() {
1213
+ var n = this.getAllNodes().length;
1214
+ this.incremental ? (n > e.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * e.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (n - e.ADAPTATION_LOWER_NODE_LIMIT) / (e.ADAPTATION_UPPER_NODE_LIMIT - e.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - e.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = e.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (n > e.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(e.COOLING_ADAPTATION_FACTOR, 1 - (n - e.ADAPTATION_LOWER_NODE_LIMIT) / (e.ADAPTATION_UPPER_NODE_LIMIT - e.ADAPTATION_LOWER_NODE_LIMIT) * (1 - e.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = e.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1215
+ }, a.prototype.calcSpringForces = function() {
1216
+ for (var n = this.getAllEdges(), c, l = 0; l < n.length; l++)
1217
+ c = n[l], this.calcSpringForce(c, c.idealLength);
1218
+ }, a.prototype.calcRepulsionForces = function() {
1219
+ var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, l, E, T, D, L = this.getAllNodes(), O;
1220
+ if (this.useFRGridVariant)
1221
+ for (this.totalIterations % e.GRID_CALCULATION_CHECK_PERIOD == 1 && n && this.updateGrid(), O = /* @__PURE__ */ new Set(), l = 0; l < L.length; l++)
1222
+ T = L[l], this.calculateRepulsionForceOfANode(T, O, n, c), O.add(T);
1223
+ else
1224
+ for (l = 0; l < L.length; l++)
1225
+ for (T = L[l], E = l + 1; E < L.length; E++)
1226
+ D = L[E], T.getOwner() == D.getOwner() && this.calcRepulsionForce(T, D);
1227
+ }, a.prototype.calcGravitationalForces = function() {
1228
+ for (var n, c = this.getAllNodesToApplyGravitation(), l = 0; l < c.length; l++)
1229
+ n = c[l], this.calcGravitationalForce(n);
1230
+ }, a.prototype.moveNodes = function() {
1231
+ for (var n = this.getAllNodes(), c, l = 0; l < n.length; l++)
1232
+ c = n[l], c.move();
1233
+ }, a.prototype.calcSpringForce = function(n, c) {
1234
+ var l = n.getSource(), E = n.getTarget(), T, D, L, O;
1235
+ if (this.uniformLeafNodeSizes && l.getChild() == null && E.getChild() == null)
1236
+ n.updateLengthSimple();
1237
+ else if (n.updateLength(), n.isOverlapingSourceAndTarget)
1238
+ return;
1239
+ T = n.getLength(), T != 0 && (D = this.springConstant * (T - c), L = D * (n.lengthX / T), O = D * (n.lengthY / T), l.springForceX += L, l.springForceY += O, E.springForceX -= L, E.springForceY -= O);
1240
+ }, a.prototype.calcRepulsionForce = function(n, c) {
1241
+ var l = n.getRect(), E = c.getRect(), T = new Array(2), D = new Array(4), L, O, d, N, s, h, u;
1242
+ if (l.intersects(E)) {
1243
+ o.calcSeparationAmount(l, E, T, e.DEFAULT_EDGE_LENGTH / 2), h = 2 * T[0], u = 2 * T[1];
1244
+ var p = n.noOfChildren * c.noOfChildren / (n.noOfChildren + c.noOfChildren);
1245
+ n.repulsionForceX -= p * h, n.repulsionForceY -= p * u, c.repulsionForceX += p * h, c.repulsionForceY += p * u;
1246
+ } else
1247
+ this.uniformLeafNodeSizes && n.getChild() == null && c.getChild() == null ? (L = E.getCenterX() - l.getCenterX(), O = E.getCenterY() - l.getCenterY()) : (o.getIntersection(l, E, D), L = D[2] - D[0], O = D[3] - D[1]), Math.abs(L) < e.MIN_REPULSION_DIST && (L = g.sign(L) * e.MIN_REPULSION_DIST), Math.abs(O) < e.MIN_REPULSION_DIST && (O = g.sign(O) * e.MIN_REPULSION_DIST), d = L * L + O * O, N = Math.sqrt(d), s = this.repulsionConstant * n.noOfChildren * c.noOfChildren / d, h = s * L / N, u = s * O / N, n.repulsionForceX -= h, n.repulsionForceY -= u, c.repulsionForceX += h, c.repulsionForceY += u;
1248
+ }, a.prototype.calcGravitationalForce = function(n) {
1249
+ var c, l, E, T, D, L, O, d;
1250
+ c = n.getOwner(), l = (c.getRight() + c.getLeft()) / 2, E = (c.getTop() + c.getBottom()) / 2, T = n.getCenterX() - l, D = n.getCenterY() - E, L = Math.abs(T) + n.getWidth() / 2, O = Math.abs(D) + n.getHeight() / 2, n.getOwner() == this.graphManager.getRoot() ? (d = c.getEstimatedSize() * this.gravityRangeFactor, (L > d || O > d) && (n.gravitationForceX = -this.gravityConstant * T, n.gravitationForceY = -this.gravityConstant * D)) : (d = c.getEstimatedSize() * this.compoundGravityRangeFactor, (L > d || O > d) && (n.gravitationForceX = -this.gravityConstant * T * this.compoundGravityConstant, n.gravitationForceY = -this.gravityConstant * D * this.compoundGravityConstant));
1251
+ }, a.prototype.isConverged = function() {
1252
+ var n, c = !1;
1253
+ return this.totalIterations > this.maxIterations / 3 && (c = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), n = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, n || c;
1254
+ }, a.prototype.animate = function() {
1255
+ this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1256
+ }, a.prototype.calcNoOfChildrenForAllNodes = function() {
1257
+ for (var n, c = this.graphManager.getAllNodes(), l = 0; l < c.length; l++)
1258
+ n = c[l], n.noOfChildren = n.getNoOfChildren();
1259
+ }, a.prototype.calcGrid = function(n) {
1260
+ var c = 0, l = 0;
1261
+ c = parseInt(Math.ceil((n.getRight() - n.getLeft()) / this.repulsionRange)), l = parseInt(Math.ceil((n.getBottom() - n.getTop()) / this.repulsionRange));
1262
+ for (var E = new Array(c), T = 0; T < c; T++)
1263
+ E[T] = new Array(l);
1264
+ for (var T = 0; T < c; T++)
1265
+ for (var D = 0; D < l; D++)
1266
+ E[T][D] = new Array();
1267
+ return E;
1268
+ }, a.prototype.addNodeToGrid = function(n, c, l) {
1269
+ var E = 0, T = 0, D = 0, L = 0;
1270
+ E = parseInt(Math.floor((n.getRect().x - c) / this.repulsionRange)), T = parseInt(Math.floor((n.getRect().width + n.getRect().x - c) / this.repulsionRange)), D = parseInt(Math.floor((n.getRect().y - l) / this.repulsionRange)), L = parseInt(Math.floor((n.getRect().height + n.getRect().y - l) / this.repulsionRange));
1271
+ for (var O = E; O <= T; O++)
1272
+ for (var d = D; d <= L; d++)
1273
+ this.grid[O][d].push(n), n.setGridCoordinates(E, T, D, L);
1274
+ }, a.prototype.updateGrid = function() {
1275
+ var n, c, l = this.getAllNodes();
1276
+ for (this.grid = this.calcGrid(this.graphManager.getRoot()), n = 0; n < l.length; n++)
1277
+ c = l[n], this.addNodeToGrid(c, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1278
+ }, a.prototype.calculateRepulsionForceOfANode = function(n, c, l, E) {
1279
+ if (this.totalIterations % e.GRID_CALCULATION_CHECK_PERIOD == 1 && l || E) {
1280
+ var T = /* @__PURE__ */ new Set();
1281
+ n.surrounding = new Array();
1282
+ for (var D, L = this.grid, O = n.startX - 1; O < n.finishX + 2; O++)
1283
+ for (var d = n.startY - 1; d < n.finishY + 2; d++)
1284
+ if (!(O < 0 || d < 0 || O >= L.length || d >= L[0].length)) {
1285
+ for (var N = 0; N < L[O][d].length; N++)
1286
+ if (D = L[O][d][N], !(n.getOwner() != D.getOwner() || n == D) && !c.has(D) && !T.has(D)) {
1287
+ var s = Math.abs(n.getCenterX() - D.getCenterX()) - (n.getWidth() / 2 + D.getWidth() / 2), h = Math.abs(n.getCenterY() - D.getCenterY()) - (n.getHeight() / 2 + D.getHeight() / 2);
1288
+ s <= this.repulsionRange && h <= this.repulsionRange && T.add(D);
1289
+ }
1290
+ }
1291
+ n.surrounding = [].concat(r(T));
1292
+ }
1293
+ for (O = 0; O < n.surrounding.length; O++)
1294
+ this.calcRepulsionForce(n, n.surrounding[O]);
1295
+ }, a.prototype.calcRepulsionRange = function() {
1296
+ return 0;
1297
+ }, f.exports = a;
1298
+ },
1299
+ /* 19 */
1300
+ /***/
1301
+ function(f, m, v) {
1302
+ var r = v(1), t = v(7);
1303
+ function e(o, g, a) {
1304
+ r.call(this, o, g, a), this.idealLength = t.DEFAULT_EDGE_LENGTH;
1305
+ }
1306
+ e.prototype = Object.create(r.prototype);
1307
+ for (var i in r)
1308
+ e[i] = r[i];
1309
+ f.exports = e;
1310
+ },
1311
+ /* 20 */
1312
+ /***/
1313
+ function(f, m, v) {
1314
+ var r = v(3);
1315
+ function t(i, o, g, a) {
1316
+ r.call(this, i, o, g, a), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0, this.startX = 0, this.finishX = 0, this.startY = 0, this.finishY = 0, this.surrounding = [];
1317
+ }
1318
+ t.prototype = Object.create(r.prototype);
1319
+ for (var e in r)
1320
+ t[e] = r[e];
1321
+ t.prototype.setGridCoordinates = function(i, o, g, a) {
1322
+ this.startX = i, this.finishX = o, this.startY = g, this.finishY = a;
1323
+ }, f.exports = t;
1324
+ },
1325
+ /* 21 */
1326
+ /***/
1327
+ function(f, m, v) {
1328
+ function r(t, e) {
1329
+ this.width = 0, this.height = 0, t !== null && e !== null && (this.height = e, this.width = t);
1330
+ }
1331
+ r.prototype.getWidth = function() {
1332
+ return this.width;
1333
+ }, r.prototype.setWidth = function(t) {
1334
+ this.width = t;
1335
+ }, r.prototype.getHeight = function() {
1336
+ return this.height;
1337
+ }, r.prototype.setHeight = function(t) {
1338
+ this.height = t;
1339
+ }, f.exports = r;
1340
+ },
1341
+ /* 22 */
1342
+ /***/
1343
+ function(f, m, v) {
1344
+ var r = v(14);
1345
+ function t() {
1346
+ this.map = {}, this.keys = [];
1347
+ }
1348
+ t.prototype.put = function(e, i) {
1349
+ var o = r.createID(e);
1350
+ this.contains(o) || (this.map[o] = i, this.keys.push(e));
1351
+ }, t.prototype.contains = function(e) {
1352
+ return r.createID(e), this.map[e] != null;
1353
+ }, t.prototype.get = function(e) {
1354
+ var i = r.createID(e);
1355
+ return this.map[i];
1356
+ }, t.prototype.keySet = function() {
1357
+ return this.keys;
1358
+ }, f.exports = t;
1359
+ },
1360
+ /* 23 */
1361
+ /***/
1362
+ function(f, m, v) {
1363
+ var r = v(14);
1364
+ function t() {
1365
+ this.set = {};
1366
+ }
1367
+ t.prototype.add = function(e) {
1368
+ var i = r.createID(e);
1369
+ this.contains(i) || (this.set[i] = e);
1370
+ }, t.prototype.remove = function(e) {
1371
+ delete this.set[r.createID(e)];
1372
+ }, t.prototype.clear = function() {
1373
+ this.set = {};
1374
+ }, t.prototype.contains = function(e) {
1375
+ return this.set[r.createID(e)] == e;
1376
+ }, t.prototype.isEmpty = function() {
1377
+ return this.size() === 0;
1378
+ }, t.prototype.size = function() {
1379
+ return Object.keys(this.set).length;
1380
+ }, t.prototype.addAllTo = function(e) {
1381
+ for (var i = Object.keys(this.set), o = i.length, g = 0; g < o; g++)
1382
+ e.push(this.set[i[g]]);
1383
+ }, t.prototype.size = function() {
1384
+ return Object.keys(this.set).length;
1385
+ }, t.prototype.addAll = function(e) {
1386
+ for (var i = e.length, o = 0; o < i; o++) {
1387
+ var g = e[o];
1388
+ this.add(g);
1389
+ }
1390
+ }, f.exports = t;
1391
+ },
1392
+ /* 24 */
1393
+ /***/
1394
+ function(f, m, v) {
1395
+ var r = /* @__PURE__ */ function() {
1396
+ function o(g, a) {
1397
+ for (var y = 0; y < a.length; y++) {
1398
+ var n = a[y];
1399
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(g, n.key, n);
1400
+ }
1401
+ }
1402
+ return function(g, a, y) {
1403
+ return a && o(g.prototype, a), y && o(g, y), g;
1404
+ };
1405
+ }();
1406
+ function t(o, g) {
1407
+ if (!(o instanceof g))
1408
+ throw new TypeError("Cannot call a class as a function");
1409
+ }
1410
+ var e = v(11), i = function() {
1411
+ function o(g, a) {
1412
+ t(this, o), (a !== null || a !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1413
+ var y = void 0;
1414
+ g instanceof e ? y = g.size() : y = g.length, this._quicksort(g, 0, y - 1);
1415
+ }
1416
+ return r(o, [{
1417
+ key: "_quicksort",
1418
+ value: function(a, y, n) {
1419
+ if (y < n) {
1420
+ var c = this._partition(a, y, n);
1421
+ this._quicksort(a, y, c), this._quicksort(a, c + 1, n);
1422
+ }
1423
+ }
1424
+ }, {
1425
+ key: "_partition",
1426
+ value: function(a, y, n) {
1427
+ for (var c = this._get(a, y), l = y, E = n; ; ) {
1428
+ for (; this.compareFunction(c, this._get(a, E)); )
1429
+ E--;
1430
+ for (; this.compareFunction(this._get(a, l), c); )
1431
+ l++;
1432
+ if (l < E)
1433
+ this._swap(a, l, E), l++, E--;
1434
+ else return E;
1435
+ }
1436
+ }
1437
+ }, {
1438
+ key: "_get",
1439
+ value: function(a, y) {
1440
+ return a instanceof e ? a.get_object_at(y) : a[y];
1441
+ }
1442
+ }, {
1443
+ key: "_set",
1444
+ value: function(a, y, n) {
1445
+ a instanceof e ? a.set_object_at(y, n) : a[y] = n;
1446
+ }
1447
+ }, {
1448
+ key: "_swap",
1449
+ value: function(a, y, n) {
1450
+ var c = this._get(a, y);
1451
+ this._set(a, y, this._get(a, n)), this._set(a, n, c);
1452
+ }
1453
+ }, {
1454
+ key: "_defaultCompareFunction",
1455
+ value: function(a, y) {
1456
+ return y > a;
1457
+ }
1458
+ }]), o;
1459
+ }();
1460
+ f.exports = i;
1461
+ },
1462
+ /* 25 */
1463
+ /***/
1464
+ function(f, m, v) {
1465
+ var r = /* @__PURE__ */ function() {
1466
+ function i(o, g) {
1467
+ for (var a = 0; a < g.length; a++) {
1468
+ var y = g[a];
1469
+ y.enumerable = y.enumerable || !1, y.configurable = !0, "value" in y && (y.writable = !0), Object.defineProperty(o, y.key, y);
1470
+ }
1471
+ }
1472
+ return function(o, g, a) {
1473
+ return g && i(o.prototype, g), a && i(o, a), o;
1474
+ };
1475
+ }();
1476
+ function t(i, o) {
1477
+ if (!(i instanceof o))
1478
+ throw new TypeError("Cannot call a class as a function");
1479
+ }
1480
+ var e = function() {
1481
+ function i(o, g) {
1482
+ var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, y = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1483
+ t(this, i), this.sequence1 = o, this.sequence2 = g, this.match_score = a, this.mismatch_penalty = y, this.gap_penalty = n, this.iMax = o.length + 1, this.jMax = g.length + 1, this.grid = new Array(this.iMax);
1484
+ for (var c = 0; c < this.iMax; c++) {
1485
+ this.grid[c] = new Array(this.jMax);
1486
+ for (var l = 0; l < this.jMax; l++)
1487
+ this.grid[c][l] = 0;
1488
+ }
1489
+ this.tracebackGrid = new Array(this.iMax);
1490
+ for (var E = 0; E < this.iMax; E++) {
1491
+ this.tracebackGrid[E] = new Array(this.jMax);
1492
+ for (var T = 0; T < this.jMax; T++)
1493
+ this.tracebackGrid[E][T] = [null, null, null];
1494
+ }
1495
+ this.alignments = [], this.score = -1, this.computeGrids();
1496
+ }
1497
+ return r(i, [{
1498
+ key: "getScore",
1499
+ value: function() {
1500
+ return this.score;
1501
+ }
1502
+ }, {
1503
+ key: "getAlignments",
1504
+ value: function() {
1505
+ return this.alignments;
1506
+ }
1507
+ // Main dynamic programming procedure
1508
+ }, {
1509
+ key: "computeGrids",
1510
+ value: function() {
1511
+ for (var g = 1; g < this.jMax; g++)
1512
+ this.grid[0][g] = this.grid[0][g - 1] + this.gap_penalty, this.tracebackGrid[0][g] = [!1, !1, !0];
1513
+ for (var a = 1; a < this.iMax; a++)
1514
+ this.grid[a][0] = this.grid[a - 1][0] + this.gap_penalty, this.tracebackGrid[a][0] = [!1, !0, !1];
1515
+ for (var y = 1; y < this.iMax; y++)
1516
+ for (var n = 1; n < this.jMax; n++) {
1517
+ var c = void 0;
1518
+ this.sequence1[y - 1] === this.sequence2[n - 1] ? c = this.grid[y - 1][n - 1] + this.match_score : c = this.grid[y - 1][n - 1] + this.mismatch_penalty;
1519
+ var l = this.grid[y - 1][n] + this.gap_penalty, E = this.grid[y][n - 1] + this.gap_penalty, T = [c, l, E], D = this.arrayAllMaxIndexes(T);
1520
+ this.grid[y][n] = T[D[0]], this.tracebackGrid[y][n] = [D.includes(0), D.includes(1), D.includes(2)];
1521
+ }
1522
+ this.score = this.grid[this.iMax - 1][this.jMax - 1];
1523
+ }
1524
+ // Gets all possible valid sequence combinations
1525
+ }, {
1526
+ key: "alignmentTraceback",
1527
+ value: function() {
1528
+ var g = [];
1529
+ for (g.push({
1530
+ pos: [this.sequence1.length, this.sequence2.length],
1531
+ seq1: "",
1532
+ seq2: ""
1533
+ }); g[0]; ) {
1534
+ var a = g[0], y = this.tracebackGrid[a.pos[0]][a.pos[1]];
1535
+ y[0] && g.push({
1536
+ pos: [a.pos[0] - 1, a.pos[1] - 1],
1537
+ seq1: this.sequence1[a.pos[0] - 1] + a.seq1,
1538
+ seq2: this.sequence2[a.pos[1] - 1] + a.seq2
1539
+ }), y[1] && g.push({
1540
+ pos: [a.pos[0] - 1, a.pos[1]],
1541
+ seq1: this.sequence1[a.pos[0] - 1] + a.seq1,
1542
+ seq2: "-" + a.seq2
1543
+ }), y[2] && g.push({
1544
+ pos: [a.pos[0], a.pos[1] - 1],
1545
+ seq1: "-" + a.seq1,
1546
+ seq2: this.sequence2[a.pos[1] - 1] + a.seq2
1547
+ }), a.pos[0] === 0 && a.pos[1] === 0 && this.alignments.push({
1548
+ sequence1: a.seq1,
1549
+ sequence2: a.seq2
1550
+ }), g.shift();
1551
+ }
1552
+ return this.alignments;
1553
+ }
1554
+ // Helper Functions
1555
+ }, {
1556
+ key: "getAllIndexes",
1557
+ value: function(g, a) {
1558
+ for (var y = [], n = -1; (n = g.indexOf(a, n + 1)) !== -1; )
1559
+ y.push(n);
1560
+ return y;
1561
+ }
1562
+ }, {
1563
+ key: "arrayAllMaxIndexes",
1564
+ value: function(g) {
1565
+ return this.getAllIndexes(g, Math.max.apply(null, g));
1566
+ }
1567
+ }]), i;
1568
+ }();
1569
+ f.exports = e;
1570
+ },
1571
+ /* 26 */
1572
+ /***/
1573
+ function(f, m, v) {
1574
+ var r = function() {
1575
+ };
1576
+ r.FDLayout = v(18), r.FDLayoutConstants = v(7), r.FDLayoutEdge = v(19), r.FDLayoutNode = v(20), r.DimensionD = v(21), r.HashMap = v(22), r.HashSet = v(23), r.IGeometry = v(8), r.IMath = v(9), r.Integer = v(10), r.Point = v(12), r.PointD = v(4), r.RandomSeed = v(16), r.RectangleD = v(13), r.Transform = v(17), r.UniqueIDGeneretor = v(14), r.Quicksort = v(24), r.LinkedList = v(11), r.LGraphObject = v(2), r.LGraph = v(5), r.LEdge = v(1), r.LGraphManager = v(6), r.LNode = v(3), r.Layout = v(15), r.LayoutConstants = v(0), r.NeedlemanWunsch = v(25), f.exports = r;
1577
+ },
1578
+ /* 27 */
1579
+ /***/
1580
+ function(f, m, v) {
1581
+ function r() {
1582
+ this.listeners = [];
1583
+ }
1584
+ var t = r.prototype;
1585
+ t.addListener = function(e, i) {
1586
+ this.listeners.push({
1587
+ event: e,
1588
+ callback: i
1589
+ });
1590
+ }, t.removeListener = function(e, i) {
1591
+ for (var o = this.listeners.length; o >= 0; o--) {
1592
+ var g = this.listeners[o];
1593
+ g.event === e && g.callback === i && this.listeners.splice(o, 1);
1594
+ }
1595
+ }, t.emit = function(e, i) {
1596
+ for (var o = 0; o < this.listeners.length; o++) {
1597
+ var g = this.listeners[o];
1598
+ e === g.event && g.callback(i);
1599
+ }
1600
+ }, f.exports = r;
1601
+ }
1602
+ /******/
1603
+ ])
1604
+ );
1605
+ });
1606
+ }(nt)), nt.exports;
1607
+ }
1608
+ var ft;
1609
+ function wt() {
1610
+ return ft || (ft = 1, function(I, w) {
1611
+ (function(m, v) {
1612
+ I.exports = v(Mt());
1613
+ })(ot, function(f) {
1614
+ return (
1615
+ /******/
1616
+ function(m) {
1617
+ var v = {};
1618
+ function r(t) {
1619
+ if (v[t])
1620
+ return v[t].exports;
1621
+ var e = v[t] = {
1622
+ /******/
1623
+ i: t,
1624
+ /******/
1625
+ l: !1,
1626
+ /******/
1627
+ exports: {}
1628
+ /******/
1629
+ };
1630
+ return m[t].call(e.exports, e, e.exports, r), e.l = !0, e.exports;
1631
+ }
1632
+ return r.m = m, r.c = v, r.i = function(t) {
1633
+ return t;
1634
+ }, r.d = function(t, e, i) {
1635
+ r.o(t, e) || Object.defineProperty(t, e, {
1636
+ /******/
1637
+ configurable: !1,
1638
+ /******/
1639
+ enumerable: !0,
1640
+ /******/
1641
+ get: i
1642
+ /******/
1643
+ });
1644
+ }, r.n = function(t) {
1645
+ var e = t && t.__esModule ? (
1646
+ /******/
1647
+ function() {
1648
+ return t.default;
1649
+ }
1650
+ ) : (
1651
+ /******/
1652
+ function() {
1653
+ return t;
1654
+ }
1655
+ );
1656
+ return r.d(e, "a", e), e;
1657
+ }, r.o = function(t, e) {
1658
+ return Object.prototype.hasOwnProperty.call(t, e);
1659
+ }, r.p = "", r(r.s = 7);
1660
+ }([
1661
+ /* 0 */
1662
+ /***/
1663
+ function(m, v) {
1664
+ m.exports = f;
1665
+ },
1666
+ /* 1 */
1667
+ /***/
1668
+ function(m, v, r) {
1669
+ var t = r(0).FDLayoutConstants;
1670
+ function e() {
1671
+ }
1672
+ for (var i in t)
1673
+ e[i] = t[i];
1674
+ e.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, e.DEFAULT_RADIAL_SEPARATION = t.DEFAULT_EDGE_LENGTH, e.DEFAULT_COMPONENT_SEPERATION = 60, e.TILE = !0, e.TILING_PADDING_VERTICAL = 10, e.TILING_PADDING_HORIZONTAL = 10, e.TREE_REDUCTION_ON_INCREMENTAL = !1, m.exports = e;
1675
+ },
1676
+ /* 2 */
1677
+ /***/
1678
+ function(m, v, r) {
1679
+ var t = r(0).FDLayoutEdge;
1680
+ function e(o, g, a) {
1681
+ t.call(this, o, g, a);
1682
+ }
1683
+ e.prototype = Object.create(t.prototype);
1684
+ for (var i in t)
1685
+ e[i] = t[i];
1686
+ m.exports = e;
1687
+ },
1688
+ /* 3 */
1689
+ /***/
1690
+ function(m, v, r) {
1691
+ var t = r(0).LGraph;
1692
+ function e(o, g, a) {
1693
+ t.call(this, o, g, a);
1694
+ }
1695
+ e.prototype = Object.create(t.prototype);
1696
+ for (var i in t)
1697
+ e[i] = t[i];
1698
+ m.exports = e;
1699
+ },
1700
+ /* 4 */
1701
+ /***/
1702
+ function(m, v, r) {
1703
+ var t = r(0).LGraphManager;
1704
+ function e(o) {
1705
+ t.call(this, o);
1706
+ }
1707
+ e.prototype = Object.create(t.prototype);
1708
+ for (var i in t)
1709
+ e[i] = t[i];
1710
+ m.exports = e;
1711
+ },
1712
+ /* 5 */
1713
+ /***/
1714
+ function(m, v, r) {
1715
+ var t = r(0).FDLayoutNode, e = r(0).IMath;
1716
+ function i(g, a, y, n) {
1717
+ t.call(this, g, a, y, n);
1718
+ }
1719
+ i.prototype = Object.create(t.prototype);
1720
+ for (var o in t)
1721
+ i[o] = t[o];
1722
+ i.prototype.move = function() {
1723
+ var g = this.graphManager.getLayout();
1724
+ this.displacementX = g.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY = g.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren, Math.abs(this.displacementX) > g.coolingFactor * g.maxNodeDisplacement && (this.displacementX = g.coolingFactor * g.maxNodeDisplacement * e.sign(this.displacementX)), Math.abs(this.displacementY) > g.coolingFactor * g.maxNodeDisplacement && (this.displacementY = g.coolingFactor * g.maxNodeDisplacement * e.sign(this.displacementY)), this.child == null ? this.moveBy(this.displacementX, this.displacementY) : this.child.getNodes().length == 0 ? this.moveBy(this.displacementX, this.displacementY) : this.propogateDisplacementToChildren(this.displacementX, this.displacementY), g.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0;
1725
+ }, i.prototype.propogateDisplacementToChildren = function(g, a) {
1726
+ for (var y = this.getChild().getNodes(), n, c = 0; c < y.length; c++)
1727
+ n = y[c], n.getChild() == null ? (n.moveBy(g, a), n.displacementX += g, n.displacementY += a) : n.propogateDisplacementToChildren(g, a);
1728
+ }, i.prototype.setPred1 = function(g) {
1729
+ this.pred1 = g;
1730
+ }, i.prototype.getPred1 = function() {
1731
+ return pred1;
1732
+ }, i.prototype.getPred2 = function() {
1733
+ return pred2;
1734
+ }, i.prototype.setNext = function(g) {
1735
+ this.next = g;
1736
+ }, i.prototype.getNext = function() {
1737
+ return next;
1738
+ }, i.prototype.setProcessed = function(g) {
1739
+ this.processed = g;
1740
+ }, i.prototype.isProcessed = function() {
1741
+ return processed;
1742
+ }, m.exports = i;
1743
+ },
1744
+ /* 6 */
1745
+ /***/
1746
+ function(m, v, r) {
1747
+ var t = r(0).FDLayout, e = r(4), i = r(3), o = r(5), g = r(2), a = r(1), y = r(0).FDLayoutConstants, n = r(0).LayoutConstants, c = r(0).Point, l = r(0).PointD, E = r(0).Layout, T = r(0).Integer, D = r(0).IGeometry, L = r(0).LGraph, O = r(0).Transform;
1748
+ function d() {
1749
+ t.call(this), this.toBeTiled = {};
1750
+ }
1751
+ d.prototype = Object.create(t.prototype);
1752
+ for (var N in t)
1753
+ d[N] = t[N];
1754
+ d.prototype.newGraphManager = function() {
1755
+ var s = new e(this);
1756
+ return this.graphManager = s, s;
1757
+ }, d.prototype.newGraph = function(s) {
1758
+ return new i(null, this.graphManager, s);
1759
+ }, d.prototype.newNode = function(s) {
1760
+ return new o(this.graphManager, s);
1761
+ }, d.prototype.newEdge = function(s) {
1762
+ return new g(null, null, s);
1763
+ }, d.prototype.initParameters = function() {
1764
+ t.prototype.initParameters.call(this, arguments), this.isSubLayout || (a.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = a.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.springConstant = y.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = y.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = y.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = y.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = y.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = y.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1, this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / y.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = y.CONVERGENCE_CHECK_PERIOD / this.maxIterations, this.coolingAdjuster = 1);
1765
+ }, d.prototype.layout = function() {
1766
+ var s = n.DEFAULT_CREATE_BENDS_AS_NEEDED;
1767
+ return s && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
1768
+ }, d.prototype.classicLayout = function() {
1769
+ if (this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(), this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity), this.calcNoOfChildrenForAllNodes(), this.graphManager.calcLowestCommonAncestors(), this.graphManager.calcInclusionTreeDepths(), this.graphManager.getRoot().calcEstimatedSize(), this.calcIdealEdgeLengths(), this.incremental) {
1770
+ if (a.TREE_REDUCTION_ON_INCREMENTAL) {
1771
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1772
+ var h = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(C) {
1773
+ return h.has(C);
1774
+ });
1775
+ this.graphManager.setAllNodesToApplyGravitation(u);
1776
+ }
1777
+ } else {
1778
+ var s = this.getFlatForest();
1779
+ if (s.length > 0)
1780
+ this.positionNodesRadially(s);
1781
+ else {
1782
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1783
+ var h = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(p) {
1784
+ return h.has(p);
1785
+ });
1786
+ this.graphManager.setAllNodesToApplyGravitation(u), this.positionNodesRandomly();
1787
+ }
1788
+ }
1789
+ return this.initSpringEmbedder(), this.runSpringEmbedder(), !0;
1790
+ }, d.prototype.tick = function() {
1791
+ if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished)
1792
+ if (this.prunedNodesAll.length > 0)
1793
+ this.isTreeGrowing = !0;
1794
+ else
1795
+ return !0;
1796
+ if (this.totalIterations % y.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
1797
+ if (this.isConverged())
1798
+ if (this.prunedNodesAll.length > 0)
1799
+ this.isTreeGrowing = !0;
1800
+ else
1801
+ return !0;
1802
+ this.coolingCycle++, this.layoutQuality == 0 ? this.coolingAdjuster = this.coolingCycle : this.layoutQuality == 1 && (this.coolingAdjuster = this.coolingCycle / 3), this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature), this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));
1803
+ }
1804
+ if (this.isTreeGrowing) {
1805
+ if (this.growTreeIterations % 10 == 0)
1806
+ if (this.prunedNodesAll.length > 0) {
1807
+ this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
1808
+ var s = new Set(this.getAllNodes()), h = this.nodesWithGravity.filter(function(A) {
1809
+ return s.has(A);
1810
+ });
1811
+ this.graphManager.setAllNodesToApplyGravitation(h), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = y.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1812
+ } else
1813
+ this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1814
+ this.growTreeIterations++;
1815
+ }
1816
+ if (this.isGrowthFinished) {
1817
+ if (this.isConverged())
1818
+ return !0;
1819
+ this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = y.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1820
+ }
1821
+ var u = !this.isTreeGrowing && !this.isGrowthFinished, p = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
1822
+ return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(u, p), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
1823
+ }, d.prototype.getPositionsData = function() {
1824
+ for (var s = this.graphManager.getAllNodes(), h = {}, u = 0; u < s.length; u++) {
1825
+ var p = s[u].rect, A = s[u].id;
1826
+ h[A] = {
1827
+ id: A,
1828
+ x: p.getCenterX(),
1829
+ y: p.getCenterY(),
1830
+ w: p.width,
1831
+ h: p.height
1832
+ };
1833
+ }
1834
+ return h;
1835
+ }, d.prototype.runSpringEmbedder = function() {
1836
+ this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
1837
+ var s = !1;
1838
+ if (y.ANIMATE === "during")
1839
+ this.emit("layoutstarted");
1840
+ else {
1841
+ for (; !s; )
1842
+ s = this.tick();
1843
+ this.graphManager.updateBounds();
1844
+ }
1845
+ }, d.prototype.calculateNodesToApplyGravitationTo = function() {
1846
+ var s = [], h, u = this.graphManager.getGraphs(), p = u.length, A;
1847
+ for (A = 0; A < p; A++)
1848
+ h = u[A], h.updateConnected(), h.isConnected || (s = s.concat(h.getNodes()));
1849
+ return s;
1850
+ }, d.prototype.createBendpoints = function() {
1851
+ var s = [];
1852
+ s = s.concat(this.graphManager.getAllEdges());
1853
+ var h = /* @__PURE__ */ new Set(), u;
1854
+ for (u = 0; u < s.length; u++) {
1855
+ var p = s[u];
1856
+ if (!h.has(p)) {
1857
+ var A = p.getSource(), C = p.getTarget();
1858
+ if (A == C)
1859
+ p.getBendpoints().push(new l()), p.getBendpoints().push(new l()), this.createDummyNodesForBendpoints(p), h.add(p);
1860
+ else {
1861
+ var R = [];
1862
+ if (R = R.concat(A.getEdgeListToNode(C)), R = R.concat(C.getEdgeListToNode(A)), !h.has(R[0])) {
1863
+ if (R.length > 1) {
1864
+ var x;
1865
+ for (x = 0; x < R.length; x++) {
1866
+ var _ = R[x];
1867
+ _.getBendpoints().push(new l()), this.createDummyNodesForBendpoints(_);
1868
+ }
1869
+ }
1870
+ R.forEach(function(U) {
1871
+ h.add(U);
1872
+ });
1873
+ }
1874
+ }
1875
+ }
1876
+ if (h.size == s.length)
1877
+ break;
1878
+ }
1879
+ }, d.prototype.positionNodesRadially = function(s) {
1880
+ for (var h = new c(0, 0), u = Math.ceil(Math.sqrt(s.length)), p = 0, A = 0, C = 0, R = new l(0, 0), x = 0; x < s.length; x++) {
1881
+ x % u == 0 && (C = 0, A = p, x != 0 && (A += a.DEFAULT_COMPONENT_SEPERATION), p = 0);
1882
+ var _ = s[x], U = E.findCenterOfTree(_);
1883
+ h.x = C, h.y = A, R = d.radialLayout(_, U, h), R.y > p && (p = Math.floor(R.y)), C = Math.floor(R.x + a.DEFAULT_COMPONENT_SEPERATION);
1884
+ }
1885
+ this.transform(new l(n.WORLD_CENTER_X - R.x / 2, n.WORLD_CENTER_Y - R.y / 2));
1886
+ }, d.radialLayout = function(s, h, u) {
1887
+ var p = Math.max(this.maxDiagonalInTree(s), a.DEFAULT_RADIAL_SEPARATION);
1888
+ d.branchRadialLayout(h, null, 0, 359, 0, p);
1889
+ var A = L.calculateBounds(s), C = new O();
1890
+ C.setDeviceOrgX(A.getMinX()), C.setDeviceOrgY(A.getMinY()), C.setWorldOrgX(u.x), C.setWorldOrgY(u.y);
1891
+ for (var R = 0; R < s.length; R++) {
1892
+ var x = s[R];
1893
+ x.transform(C);
1894
+ }
1895
+ var _ = new l(A.getMaxX(), A.getMaxY());
1896
+ return C.inverseTransformPoint(_);
1897
+ }, d.branchRadialLayout = function(s, h, u, p, A, C) {
1898
+ var R = (p - u + 1) / 2;
1899
+ R < 0 && (R += 180);
1900
+ var x = (R + u) % 360, _ = x * D.TWO_PI / 360, U = A * Math.cos(_), X = A * Math.sin(_);
1901
+ s.setCenter(U, X);
1902
+ var M = [];
1903
+ M = M.concat(s.getEdges());
1904
+ var G = M.length;
1905
+ h != null && G--;
1906
+ for (var F = 0, b = M.length, Y, k = s.getEdgesBetween(h); k.length > 1; ) {
1907
+ var H = k[0];
1908
+ k.splice(0, 1);
1909
+ var P = M.indexOf(H);
1910
+ P >= 0 && M.splice(P, 1), b--, G--;
1911
+ }
1912
+ h != null ? Y = (M.indexOf(k[0]) + 1) % b : Y = 0;
1913
+ for (var B = Math.abs(p - u) / G, $ = Y; F != G; $ = ++$ % b) {
1914
+ var K = M[$].getOtherEnd(s);
1915
+ if (K != h) {
1916
+ var Q = (u + F * B) % 360, J = (Q + B) % 360;
1917
+ d.branchRadialLayout(K, s, Q, J, A + C, C), F++;
1918
+ }
1919
+ }
1920
+ }, d.maxDiagonalInTree = function(s) {
1921
+ for (var h = T.MIN_VALUE, u = 0; u < s.length; u++) {
1922
+ var p = s[u], A = p.getDiagonal();
1923
+ A > h && (h = A);
1924
+ }
1925
+ return h;
1926
+ }, d.prototype.calcRepulsionRange = function() {
1927
+ return 2 * (this.level + 1) * this.idealEdgeLength;
1928
+ }, d.prototype.groupZeroDegreeMembers = function() {
1929
+ var s = this, h = {};
1930
+ this.memberGroups = {}, this.idToDummyNode = {};
1931
+ for (var u = [], p = this.graphManager.getAllNodes(), A = 0; A < p.length; A++) {
1932
+ var C = p[A], R = C.getParent();
1933
+ this.getNodeDegreeWithChildren(C) === 0 && (R.id == null || !this.getToBeTiled(R)) && u.push(C);
1934
+ }
1935
+ for (var A = 0; A < u.length; A++) {
1936
+ var C = u[A], x = C.getParent().id;
1937
+ typeof h[x] > "u" && (h[x] = []), h[x] = h[x].concat(C);
1938
+ }
1939
+ Object.keys(h).forEach(function(_) {
1940
+ if (h[_].length > 1) {
1941
+ var U = "DummyCompound_" + _;
1942
+ s.memberGroups[U] = h[_];
1943
+ var X = h[_][0].getParent(), M = new o(s.graphManager);
1944
+ M.id = U, M.paddingLeft = X.paddingLeft || 0, M.paddingRight = X.paddingRight || 0, M.paddingBottom = X.paddingBottom || 0, M.paddingTop = X.paddingTop || 0, s.idToDummyNode[U] = M;
1945
+ var G = s.getGraphManager().add(s.newGraph(), M), F = X.getChild();
1946
+ F.add(M);
1947
+ for (var b = 0; b < h[_].length; b++) {
1948
+ var Y = h[_][b];
1949
+ F.remove(Y), G.add(Y);
1950
+ }
1951
+ }
1952
+ });
1953
+ }, d.prototype.clearCompounds = function() {
1954
+ var s = {}, h = {};
1955
+ this.performDFSOnCompounds();
1956
+ for (var u = 0; u < this.compoundOrder.length; u++)
1957
+ h[this.compoundOrder[u].id] = this.compoundOrder[u], s[this.compoundOrder[u].id] = [].concat(this.compoundOrder[u].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[u].getChild()), this.compoundOrder[u].child = null;
1958
+ this.graphManager.resetAllNodes(), this.tileCompoundMembers(s, h);
1959
+ }, d.prototype.clearZeroDegreeMembers = function() {
1960
+ var s = this, h = this.tiledZeroDegreePack = [];
1961
+ Object.keys(this.memberGroups).forEach(function(u) {
1962
+ var p = s.idToDummyNode[u];
1963
+ h[u] = s.tileNodes(s.memberGroups[u], p.paddingLeft + p.paddingRight), p.rect.width = h[u].width, p.rect.height = h[u].height;
1964
+ });
1965
+ }, d.prototype.repopulateCompounds = function() {
1966
+ for (var s = this.compoundOrder.length - 1; s >= 0; s--) {
1967
+ var h = this.compoundOrder[s], u = h.id, p = h.paddingLeft, A = h.paddingTop;
1968
+ this.adjustLocations(this.tiledMemberPack[u], h.rect.x, h.rect.y, p, A);
1969
+ }
1970
+ }, d.prototype.repopulateZeroDegreeMembers = function() {
1971
+ var s = this, h = this.tiledZeroDegreePack;
1972
+ Object.keys(h).forEach(function(u) {
1973
+ var p = s.idToDummyNode[u], A = p.paddingLeft, C = p.paddingTop;
1974
+ s.adjustLocations(h[u], p.rect.x, p.rect.y, A, C);
1975
+ });
1976
+ }, d.prototype.getToBeTiled = function(s) {
1977
+ var h = s.id;
1978
+ if (this.toBeTiled[h] != null)
1979
+ return this.toBeTiled[h];
1980
+ var u = s.getChild();
1981
+ if (u == null)
1982
+ return this.toBeTiled[h] = !1, !1;
1983
+ for (var p = u.getNodes(), A = 0; A < p.length; A++) {
1984
+ var C = p[A];
1985
+ if (this.getNodeDegree(C) > 0)
1986
+ return this.toBeTiled[h] = !1, !1;
1987
+ if (C.getChild() == null) {
1988
+ this.toBeTiled[C.id] = !1;
1989
+ continue;
1990
+ }
1991
+ if (!this.getToBeTiled(C))
1992
+ return this.toBeTiled[h] = !1, !1;
1993
+ }
1994
+ return this.toBeTiled[h] = !0, !0;
1995
+ }, d.prototype.getNodeDegree = function(s) {
1996
+ s.id;
1997
+ for (var h = s.getEdges(), u = 0, p = 0; p < h.length; p++) {
1998
+ var A = h[p];
1999
+ A.getSource().id !== A.getTarget().id && (u = u + 1);
2000
+ }
2001
+ return u;
2002
+ }, d.prototype.getNodeDegreeWithChildren = function(s) {
2003
+ var h = this.getNodeDegree(s);
2004
+ if (s.getChild() == null)
2005
+ return h;
2006
+ for (var u = s.getChild().getNodes(), p = 0; p < u.length; p++) {
2007
+ var A = u[p];
2008
+ h += this.getNodeDegreeWithChildren(A);
2009
+ }
2010
+ return h;
2011
+ }, d.prototype.performDFSOnCompounds = function() {
2012
+ this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
2013
+ }, d.prototype.fillCompexOrderByDFS = function(s) {
2014
+ for (var h = 0; h < s.length; h++) {
2015
+ var u = s[h];
2016
+ u.getChild() != null && this.fillCompexOrderByDFS(u.getChild().getNodes()), this.getToBeTiled(u) && this.compoundOrder.push(u);
2017
+ }
2018
+ }, d.prototype.adjustLocations = function(s, h, u, p, A) {
2019
+ h += p, u += A;
2020
+ for (var C = h, R = 0; R < s.rows.length; R++) {
2021
+ var x = s.rows[R];
2022
+ h = C;
2023
+ for (var _ = 0, U = 0; U < x.length; U++) {
2024
+ var X = x[U];
2025
+ X.rect.x = h, X.rect.y = u, h += X.rect.width + s.horizontalPadding, X.rect.height > _ && (_ = X.rect.height);
2026
+ }
2027
+ u += _ + s.verticalPadding;
2028
+ }
2029
+ }, d.prototype.tileCompoundMembers = function(s, h) {
2030
+ var u = this;
2031
+ this.tiledMemberPack = [], Object.keys(s).forEach(function(p) {
2032
+ var A = h[p];
2033
+ u.tiledMemberPack[p] = u.tileNodes(s[p], A.paddingLeft + A.paddingRight), A.rect.width = u.tiledMemberPack[p].width, A.rect.height = u.tiledMemberPack[p].height;
2034
+ });
2035
+ }, d.prototype.tileNodes = function(s, h) {
2036
+ var u = a.TILING_PADDING_VERTICAL, p = a.TILING_PADDING_HORIZONTAL, A = {
2037
+ rows: [],
2038
+ rowWidth: [],
2039
+ rowHeight: [],
2040
+ width: 0,
2041
+ height: h,
2042
+ // assume minHeight equals to minWidth
2043
+ verticalPadding: u,
2044
+ horizontalPadding: p
2045
+ };
2046
+ s.sort(function(x, _) {
2047
+ return x.rect.width * x.rect.height > _.rect.width * _.rect.height ? -1 : x.rect.width * x.rect.height < _.rect.width * _.rect.height ? 1 : 0;
2048
+ });
2049
+ for (var C = 0; C < s.length; C++) {
2050
+ var R = s[C];
2051
+ A.rows.length == 0 ? this.insertNodeToRow(A, R, 0, h) : this.canAddHorizontal(A, R.rect.width, R.rect.height) ? this.insertNodeToRow(A, R, this.getShortestRowIndex(A), h) : this.insertNodeToRow(A, R, A.rows.length, h), this.shiftToLastRow(A);
2052
+ }
2053
+ return A;
2054
+ }, d.prototype.insertNodeToRow = function(s, h, u, p) {
2055
+ var A = p;
2056
+ if (u == s.rows.length) {
2057
+ var C = [];
2058
+ s.rows.push(C), s.rowWidth.push(A), s.rowHeight.push(0);
2059
+ }
2060
+ var R = s.rowWidth[u] + h.rect.width;
2061
+ s.rows[u].length > 0 && (R += s.horizontalPadding), s.rowWidth[u] = R, s.width < R && (s.width = R);
2062
+ var x = h.rect.height;
2063
+ u > 0 && (x += s.verticalPadding);
2064
+ var _ = 0;
2065
+ x > s.rowHeight[u] && (_ = s.rowHeight[u], s.rowHeight[u] = x, _ = s.rowHeight[u] - _), s.height += _, s.rows[u].push(h);
2066
+ }, d.prototype.getShortestRowIndex = function(s) {
2067
+ for (var h = -1, u = Number.MAX_VALUE, p = 0; p < s.rows.length; p++)
2068
+ s.rowWidth[p] < u && (h = p, u = s.rowWidth[p]);
2069
+ return h;
2070
+ }, d.prototype.getLongestRowIndex = function(s) {
2071
+ for (var h = -1, u = Number.MIN_VALUE, p = 0; p < s.rows.length; p++)
2072
+ s.rowWidth[p] > u && (h = p, u = s.rowWidth[p]);
2073
+ return h;
2074
+ }, d.prototype.canAddHorizontal = function(s, h, u) {
2075
+ var p = this.getShortestRowIndex(s);
2076
+ if (p < 0)
2077
+ return !0;
2078
+ var A = s.rowWidth[p];
2079
+ if (A + s.horizontalPadding + h <= s.width) return !0;
2080
+ var C = 0;
2081
+ s.rowHeight[p] < u && p > 0 && (C = u + s.verticalPadding - s.rowHeight[p]);
2082
+ var R;
2083
+ s.width - A >= h + s.horizontalPadding ? R = (s.height + C) / (A + h + s.horizontalPadding) : R = (s.height + C) / s.width, C = u + s.verticalPadding;
2084
+ var x;
2085
+ return s.width < h ? x = (s.height + C) / h : x = (s.height + C) / s.width, x < 1 && (x = 1 / x), R < 1 && (R = 1 / R), R < x;
2086
+ }, d.prototype.shiftToLastRow = function(s) {
2087
+ var h = this.getLongestRowIndex(s), u = s.rowWidth.length - 1, p = s.rows[h], A = p[p.length - 1], C = A.width + s.horizontalPadding;
2088
+ if (s.width - s.rowWidth[u] > C && h != u) {
2089
+ p.splice(-1, 1), s.rows[u].push(A), s.rowWidth[h] = s.rowWidth[h] - C, s.rowWidth[u] = s.rowWidth[u] + C, s.width = s.rowWidth[instance.getLongestRowIndex(s)];
2090
+ for (var R = Number.MIN_VALUE, x = 0; x < p.length; x++)
2091
+ p[x].height > R && (R = p[x].height);
2092
+ h > 0 && (R += s.verticalPadding);
2093
+ var _ = s.rowHeight[h] + s.rowHeight[u];
2094
+ s.rowHeight[h] = R, s.rowHeight[u] < A.height + s.verticalPadding && (s.rowHeight[u] = A.height + s.verticalPadding);
2095
+ var U = s.rowHeight[h] + s.rowHeight[u];
2096
+ s.height += U - _, this.shiftToLastRow(s);
2097
+ }
2098
+ }, d.prototype.tilingPreLayout = function() {
2099
+ a.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
2100
+ }, d.prototype.tilingPostLayout = function() {
2101
+ a.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
2102
+ }, d.prototype.reduceTrees = function() {
2103
+ for (var s = [], h = !0, u; h; ) {
2104
+ var p = this.graphManager.getAllNodes(), A = [];
2105
+ h = !1;
2106
+ for (var C = 0; C < p.length; C++)
2107
+ u = p[C], u.getEdges().length == 1 && !u.getEdges()[0].isInterGraph && u.getChild() == null && (A.push([u, u.getEdges()[0], u.getOwner()]), h = !0);
2108
+ if (h == !0) {
2109
+ for (var R = [], x = 0; x < A.length; x++)
2110
+ A[x][0].getEdges().length == 1 && (R.push(A[x]), A[x][0].getOwner().remove(A[x][0]));
2111
+ s.push(R), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2112
+ }
2113
+ }
2114
+ this.prunedNodesAll = s;
2115
+ }, d.prototype.growTree = function(s) {
2116
+ for (var h = s.length, u = s[h - 1], p, A = 0; A < u.length; A++)
2117
+ p = u[A], this.findPlaceforPrunedNode(p), p[2].add(p[0]), p[2].add(p[1], p[1].source, p[1].target);
2118
+ s.splice(s.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2119
+ }, d.prototype.findPlaceforPrunedNode = function(s) {
2120
+ var h, u, p = s[0];
2121
+ p == s[1].source ? u = s[1].target : u = s[1].source;
2122
+ var A = u.startX, C = u.finishX, R = u.startY, x = u.finishY, _ = 0, U = 0, X = 0, M = 0, G = [_, X, U, M];
2123
+ if (R > 0)
2124
+ for (var F = A; F <= C; F++)
2125
+ G[0] += this.grid[F][R - 1].length + this.grid[F][R].length - 1;
2126
+ if (C < this.grid.length - 1)
2127
+ for (var F = R; F <= x; F++)
2128
+ G[1] += this.grid[C + 1][F].length + this.grid[C][F].length - 1;
2129
+ if (x < this.grid[0].length - 1)
2130
+ for (var F = A; F <= C; F++)
2131
+ G[2] += this.grid[F][x + 1].length + this.grid[F][x].length - 1;
2132
+ if (A > 0)
2133
+ for (var F = R; F <= x; F++)
2134
+ G[3] += this.grid[A - 1][F].length + this.grid[A][F].length - 1;
2135
+ for (var b = T.MAX_VALUE, Y, k, H = 0; H < G.length; H++)
2136
+ G[H] < b ? (b = G[H], Y = 1, k = H) : G[H] == b && Y++;
2137
+ if (Y == 3 && b == 0)
2138
+ G[0] == 0 && G[1] == 0 && G[2] == 0 ? h = 1 : G[0] == 0 && G[1] == 0 && G[3] == 0 ? h = 0 : G[0] == 0 && G[2] == 0 && G[3] == 0 ? h = 3 : G[1] == 0 && G[2] == 0 && G[3] == 0 && (h = 2);
2139
+ else if (Y == 2 && b == 0) {
2140
+ var P = Math.floor(Math.random() * 2);
2141
+ G[0] == 0 && G[1] == 0 ? P == 0 ? h = 0 : h = 1 : G[0] == 0 && G[2] == 0 ? P == 0 ? h = 0 : h = 2 : G[0] == 0 && G[3] == 0 ? P == 0 ? h = 0 : h = 3 : G[1] == 0 && G[2] == 0 ? P == 0 ? h = 1 : h = 2 : G[1] == 0 && G[3] == 0 ? P == 0 ? h = 1 : h = 3 : P == 0 ? h = 2 : h = 3;
2142
+ } else if (Y == 4 && b == 0) {
2143
+ var P = Math.floor(Math.random() * 4);
2144
+ h = P;
2145
+ } else
2146
+ h = k;
2147
+ h == 0 ? p.setCenter(u.getCenterX(), u.getCenterY() - u.getHeight() / 2 - y.DEFAULT_EDGE_LENGTH - p.getHeight() / 2) : h == 1 ? p.setCenter(u.getCenterX() + u.getWidth() / 2 + y.DEFAULT_EDGE_LENGTH + p.getWidth() / 2, u.getCenterY()) : h == 2 ? p.setCenter(u.getCenterX(), u.getCenterY() + u.getHeight() / 2 + y.DEFAULT_EDGE_LENGTH + p.getHeight() / 2) : p.setCenter(u.getCenterX() - u.getWidth() / 2 - y.DEFAULT_EDGE_LENGTH - p.getWidth() / 2, u.getCenterY());
2148
+ }, m.exports = d;
2149
+ },
2150
+ /* 7 */
2151
+ /***/
2152
+ function(m, v, r) {
2153
+ var t = {};
2154
+ t.layoutBase = r(0), t.CoSEConstants = r(1), t.CoSEEdge = r(2), t.CoSEGraph = r(3), t.CoSEGraphManager = r(4), t.CoSELayout = r(6), t.CoSENode = r(5), m.exports = t;
2155
+ }
2156
+ /******/
2157
+ ])
2158
+ );
2159
+ });
2160
+ }(it)), it.exports;
2161
+ }
2162
+ (function(I, w) {
2163
+ (function(m, v) {
2164
+ I.exports = v(wt());
2165
+ })(ot, function(f) {
2166
+ return (
2167
+ /******/
2168
+ function(m) {
2169
+ var v = {};
2170
+ function r(t) {
2171
+ if (v[t])
2172
+ return v[t].exports;
2173
+ var e = v[t] = {
2174
+ /******/
2175
+ i: t,
2176
+ /******/
2177
+ l: !1,
2178
+ /******/
2179
+ exports: {}
2180
+ /******/
2181
+ };
2182
+ return m[t].call(e.exports, e, e.exports, r), e.l = !0, e.exports;
2183
+ }
2184
+ return r.m = m, r.c = v, r.i = function(t) {
2185
+ return t;
2186
+ }, r.d = function(t, e, i) {
2187
+ r.o(t, e) || Object.defineProperty(t, e, {
2188
+ /******/
2189
+ configurable: !1,
2190
+ /******/
2191
+ enumerable: !0,
2192
+ /******/
2193
+ get: i
2194
+ /******/
2195
+ });
2196
+ }, r.n = function(t) {
2197
+ var e = t && t.__esModule ? (
2198
+ /******/
2199
+ function() {
2200
+ return t.default;
2201
+ }
2202
+ ) : (
2203
+ /******/
2204
+ function() {
2205
+ return t;
2206
+ }
2207
+ );
2208
+ return r.d(e, "a", e), e;
2209
+ }, r.o = function(t, e) {
2210
+ return Object.prototype.hasOwnProperty.call(t, e);
2211
+ }, r.p = "", r(r.s = 1);
2212
+ }([
2213
+ /* 0 */
2214
+ /***/
2215
+ function(m, v) {
2216
+ m.exports = f;
2217
+ },
2218
+ /* 1 */
2219
+ /***/
2220
+ function(m, v, r) {
2221
+ var t = r(0).layoutBase.LayoutConstants, e = r(0).layoutBase.FDLayoutConstants, i = r(0).CoSEConstants, o = r(0).CoSELayout, g = r(0).CoSENode, a = r(0).layoutBase.PointD, y = r(0).layoutBase.DimensionD, n = {
2222
+ // Called on `layoutready`
2223
+ ready: function() {
2224
+ },
2225
+ // Called on `layoutstop`
2226
+ stop: function() {
2227
+ },
2228
+ // 'draft', 'default' or 'proof"
2229
+ // - 'draft' fast cooling rate
2230
+ // - 'default' moderate cooling rate
2231
+ // - "proof" slow cooling rate
2232
+ quality: "default",
2233
+ // include labels in node dimensions
2234
+ nodeDimensionsIncludeLabels: !1,
2235
+ // number of ticks per frame; higher is faster but more jerky
2236
+ refresh: 30,
2237
+ // Whether to fit the network view after when done
2238
+ fit: !0,
2239
+ // Padding on fit
2240
+ padding: 10,
2241
+ // Whether to enable incremental mode
2242
+ randomize: !0,
2243
+ // Node repulsion (non overlapping) multiplier
2244
+ nodeRepulsion: 4500,
2245
+ // Ideal edge (non nested) length
2246
+ idealEdgeLength: 50,
2247
+ // Divisor to compute edge forces
2248
+ edgeElasticity: 0.45,
2249
+ // Nesting factor (multiplier) to compute ideal edge length for nested edges
2250
+ nestingFactor: 0.1,
2251
+ // Gravity force (constant)
2252
+ gravity: 0.25,
2253
+ // Maximum number of iterations to perform
2254
+ numIter: 2500,
2255
+ // For enabling tiling
2256
+ tile: !0,
2257
+ // Type of layout animation. The option set is {'during', 'end', false}
2258
+ animate: "end",
2259
+ // Duration for animate:end
2260
+ animationDuration: 500,
2261
+ // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
2262
+ tilingPaddingVertical: 10,
2263
+ // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
2264
+ tilingPaddingHorizontal: 10,
2265
+ // Gravity range (constant) for compounds
2266
+ gravityRangeCompound: 1.5,
2267
+ // Gravity force (constant) for compounds
2268
+ gravityCompound: 1,
2269
+ // Gravity range (constant)
2270
+ gravityRange: 3.8,
2271
+ // Initial cooling factor for incremental layout
2272
+ initialEnergyOnIncremental: 0.5
2273
+ };
2274
+ function c(D, L) {
2275
+ var O = {};
2276
+ for (var d in D)
2277
+ O[d] = D[d];
2278
+ for (var d in L)
2279
+ O[d] = L[d];
2280
+ return O;
2281
+ }
2282
+ function l(D) {
2283
+ this.options = c(n, D), E(this.options);
2284
+ }
2285
+ var E = function(L) {
2286
+ L.nodeRepulsion != null && (i.DEFAULT_REPULSION_STRENGTH = e.DEFAULT_REPULSION_STRENGTH = L.nodeRepulsion), L.idealEdgeLength != null && (i.DEFAULT_EDGE_LENGTH = e.DEFAULT_EDGE_LENGTH = L.idealEdgeLength), L.edgeElasticity != null && (i.DEFAULT_SPRING_STRENGTH = e.DEFAULT_SPRING_STRENGTH = L.edgeElasticity), L.nestingFactor != null && (i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = L.nestingFactor), L.gravity != null && (i.DEFAULT_GRAVITY_STRENGTH = e.DEFAULT_GRAVITY_STRENGTH = L.gravity), L.numIter != null && (i.MAX_ITERATIONS = e.MAX_ITERATIONS = L.numIter), L.gravityRange != null && (i.DEFAULT_GRAVITY_RANGE_FACTOR = e.DEFAULT_GRAVITY_RANGE_FACTOR = L.gravityRange), L.gravityCompound != null && (i.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.DEFAULT_COMPOUND_GRAVITY_STRENGTH = L.gravityCompound), L.gravityRangeCompound != null && (i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = L.gravityRangeCompound), L.initialEnergyOnIncremental != null && (i.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.DEFAULT_COOLING_FACTOR_INCREMENTAL = L.initialEnergyOnIncremental), L.quality == "draft" ? t.QUALITY = 0 : L.quality == "proof" ? t.QUALITY = 2 : t.QUALITY = 1, i.NODE_DIMENSIONS_INCLUDE_LABELS = e.NODE_DIMENSIONS_INCLUDE_LABELS = t.NODE_DIMENSIONS_INCLUDE_LABELS = L.nodeDimensionsIncludeLabels, i.DEFAULT_INCREMENTAL = e.DEFAULT_INCREMENTAL = t.DEFAULT_INCREMENTAL = !L.randomize, i.ANIMATE = e.ANIMATE = t.ANIMATE = L.animate, i.TILE = L.tile, i.TILING_PADDING_VERTICAL = typeof L.tilingPaddingVertical == "function" ? L.tilingPaddingVertical.call() : L.tilingPaddingVertical, i.TILING_PADDING_HORIZONTAL = typeof L.tilingPaddingHorizontal == "function" ? L.tilingPaddingHorizontal.call() : L.tilingPaddingHorizontal;
2287
+ };
2288
+ l.prototype.run = function() {
2289
+ var D, L, O = this.options;
2290
+ this.idToLNode = {};
2291
+ var d = this.layout = new o(), N = this;
2292
+ N.stopped = !1, this.cy = this.options.cy, this.cy.trigger({ type: "layoutstart", layout: this });
2293
+ var s = d.newGraphManager();
2294
+ this.gm = s;
2295
+ var h = this.options.eles.nodes(), u = this.options.eles.edges();
2296
+ this.root = s.addRoot(), this.processChildrenList(this.root, this.getTopMostNodes(h), d);
2297
+ for (var p = 0; p < u.length; p++) {
2298
+ var A = u[p], C = this.idToLNode[A.data("source")], R = this.idToLNode[A.data("target")];
2299
+ if (C !== R && C.getEdgesBetween(R).length == 0) {
2300
+ var x = s.add(d.newEdge(), C, R);
2301
+ x.id = A.id();
2302
+ }
2303
+ }
2304
+ var _ = function(M, G) {
2305
+ typeof M == "number" && (M = G);
2306
+ var F = M.data("id"), b = N.idToLNode[F];
2307
+ return {
2308
+ x: b.getRect().getCenterX(),
2309
+ y: b.getRect().getCenterY()
2310
+ };
2311
+ }, U = function X() {
2312
+ for (var M = function() {
2313
+ O.fit && O.cy.fit(O.eles, O.padding), D || (D = !0, N.cy.one("layoutready", O.ready), N.cy.trigger({ type: "layoutready", layout: N }));
2314
+ }, G = N.options.refresh, F, b = 0; b < G && !F; b++)
2315
+ F = N.stopped || N.layout.tick();
2316
+ if (F) {
2317
+ d.checkLayoutSuccess() && !d.isSubLayout && d.doPostLayout(), d.tilingPostLayout && d.tilingPostLayout(), d.isLayoutFinished = !0, N.options.eles.nodes().positions(_), M(), N.cy.one("layoutstop", N.options.stop), N.cy.trigger({ type: "layoutstop", layout: N }), L && cancelAnimationFrame(L), D = !1;
2318
+ return;
2319
+ }
2320
+ var Y = N.layout.getPositionsData();
2321
+ O.eles.nodes().positions(function(k, H) {
2322
+ if (typeof k == "number" && (k = H), !k.isParent()) {
2323
+ for (var P = k.id(), B = Y[P], $ = k; B == null && (B = Y[$.data("parent")] || Y["DummyCompound_" + $.data("parent")], Y[P] = B, $ = $.parent()[0], $ != null); )
2324
+ ;
2325
+ return B != null ? {
2326
+ x: B.x,
2327
+ y: B.y
2328
+ } : {
2329
+ x: k.position("x"),
2330
+ y: k.position("y")
2331
+ };
2332
+ }
2333
+ }), M(), L = requestAnimationFrame(X);
2334
+ };
2335
+ return d.addListener("layoutstarted", function() {
2336
+ N.options.animate === "during" && (L = requestAnimationFrame(U));
2337
+ }), d.runLayout(), this.options.animate !== "during" && (N.options.eles.nodes().not(":parent").layoutPositions(N, N.options, _), D = !1), this;
2338
+ }, l.prototype.getTopMostNodes = function(D) {
2339
+ for (var L = {}, O = 0; O < D.length; O++)
2340
+ L[D[O].id()] = !0;
2341
+ var d = D.filter(function(N, s) {
2342
+ typeof N == "number" && (N = s);
2343
+ for (var h = N.parent()[0]; h != null; ) {
2344
+ if (L[h.id()])
2345
+ return !1;
2346
+ h = h.parent()[0];
2347
+ }
2348
+ return !0;
2349
+ });
2350
+ return d;
2351
+ }, l.prototype.processChildrenList = function(D, L, O) {
2352
+ for (var d = L.length, N = 0; N < d; N++) {
2353
+ var s = L[N], h = s.children(), u, p = s.layoutDimensions({
2354
+ nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels
2355
+ });
2356
+ if (s.outerWidth() != null && s.outerHeight() != null ? u = D.add(new g(O.graphManager, new a(s.position("x") - p.w / 2, s.position("y") - p.h / 2), new y(parseFloat(p.w), parseFloat(p.h)))) : u = D.add(new g(this.graphManager)), u.id = s.data("id"), u.paddingLeft = parseInt(s.css("padding")), u.paddingTop = parseInt(s.css("padding")), u.paddingRight = parseInt(s.css("padding")), u.paddingBottom = parseInt(s.css("padding")), this.options.nodeDimensionsIncludeLabels && s.isParent()) {
2357
+ var A = s.boundingBox({ includeLabels: !0, includeNodes: !1 }).w, C = s.boundingBox({ includeLabels: !0, includeNodes: !1 }).h, R = s.css("text-halign");
2358
+ u.labelWidth = A, u.labelHeight = C, u.labelPos = R;
2359
+ }
2360
+ if (this.idToLNode[s.data("id")] = u, isNaN(u.rect.x) && (u.rect.x = 0), isNaN(u.rect.y) && (u.rect.y = 0), h != null && h.length > 0) {
2361
+ var x;
2362
+ x = O.getGraphManager().add(O.newGraph(), u), this.processChildrenList(x, h, O);
2363
+ }
2364
+ }
2365
+ }, l.prototype.stop = function() {
2366
+ return this.stopped = !0, this;
2367
+ };
2368
+ var T = function(L) {
2369
+ L("layout", "cose-bilkent", l);
2370
+ };
2371
+ typeof cytoscape < "u" && T(cytoscape), m.exports = T;
2372
+ }
2373
+ /******/
2374
+ ])
2375
+ );
2376
+ });
2377
+ })(dt);
2378
+ var St = dt.exports;
2379
+ const Gt = /* @__PURE__ */ xt(St);
2380
+ var st = function() {
2381
+ var I = /* @__PURE__ */ S(function(O, d, N, s) {
2382
+ for (N = N || {}, s = O.length; s--; N[O[s]] = d) ;
2383
+ return N;
2384
+ }, "o"), w = [1, 4], f = [1, 13], m = [1, 12], v = [1, 15], r = [1, 16], t = [1, 20], e = [1, 19], i = [6, 7, 8], o = [1, 26], g = [1, 24], a = [1, 25], y = [6, 7, 11], n = [1, 6, 13, 15, 16, 19, 22], c = [1, 33], l = [1, 34], E = [1, 6, 7, 11, 13, 15, 16, 19, 22], T = {
2385
+ trace: /* @__PURE__ */ S(function() {
2386
+ }, "trace"),
2387
+ yy: {},
2388
+ symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, MINDMAP: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, ICON: 15, CLASS: 16, nodeWithId: 17, nodeWithoutId: 18, NODE_DSTART: 19, NODE_DESCR: 20, NODE_DEND: 21, NODE_ID: 22, $accept: 0, $end: 1 },
2389
+ terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" },
2390
+ productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]],
2391
+ performAction: /* @__PURE__ */ S(function(d, N, s, h, u, p, A) {
2392
+ var C = p.length - 1;
2393
+ switch (u) {
2394
+ case 6:
2395
+ case 7:
2396
+ return h;
2397
+ case 8:
2398
+ h.getLogger().trace("Stop NL ");
2399
+ break;
2400
+ case 9:
2401
+ h.getLogger().trace("Stop EOF ");
2402
+ break;
2403
+ case 11:
2404
+ h.getLogger().trace("Stop NL2 ");
2405
+ break;
2406
+ case 12:
2407
+ h.getLogger().trace("Stop EOF2 ");
2408
+ break;
2409
+ case 15:
2410
+ h.getLogger().info("Node: ", p[C].id), h.addNode(p[C - 1].length, p[C].id, p[C].descr, p[C].type);
2411
+ break;
2412
+ case 16:
2413
+ h.getLogger().trace("Icon: ", p[C]), h.decorateNode({ icon: p[C] });
2414
+ break;
2415
+ case 17:
2416
+ case 21:
2417
+ h.decorateNode({ class: p[C] });
2418
+ break;
2419
+ case 18:
2420
+ h.getLogger().trace("SPACELIST");
2421
+ break;
2422
+ case 19:
2423
+ h.getLogger().trace("Node: ", p[C].id), h.addNode(0, p[C].id, p[C].descr, p[C].type);
2424
+ break;
2425
+ case 20:
2426
+ h.decorateNode({ icon: p[C] });
2427
+ break;
2428
+ case 25:
2429
+ h.getLogger().trace("node found ..", p[C - 2]), this.$ = { id: p[C - 1], descr: p[C - 1], type: h.getType(p[C - 2], p[C]) };
2430
+ break;
2431
+ case 26:
2432
+ this.$ = { id: p[C], descr: p[C], type: h.nodeType.DEFAULT };
2433
+ break;
2434
+ case 27:
2435
+ h.getLogger().trace("node found ..", p[C - 3]), this.$ = { id: p[C - 3], descr: p[C - 1], type: h.getType(p[C - 2], p[C]) };
2436
+ break;
2437
+ }
2438
+ }, "anonymous"),
2439
+ table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: w }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: w }, { 6: f, 7: [1, 10], 9: 9, 12: 11, 13: m, 14: 14, 15: v, 16: r, 17: 17, 18: 18, 19: t, 22: e }, I(i, [2, 3]), { 1: [2, 2] }, I(i, [2, 4]), I(i, [2, 5]), { 1: [2, 6], 6: f, 12: 21, 13: m, 14: 14, 15: v, 16: r, 17: 17, 18: 18, 19: t, 22: e }, { 6: f, 9: 22, 12: 11, 13: m, 14: 14, 15: v, 16: r, 17: 17, 18: 18, 19: t, 22: e }, { 6: o, 7: g, 10: 23, 11: a }, I(y, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: t, 22: e }), I(y, [2, 18]), I(y, [2, 19]), I(y, [2, 20]), I(y, [2, 21]), I(y, [2, 23]), I(y, [2, 24]), I(y, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: o, 7: g, 10: 32, 11: a }, { 1: [2, 7], 6: f, 12: 21, 13: m, 14: 14, 15: v, 16: r, 17: 17, 18: 18, 19: t, 22: e }, I(n, [2, 14], { 7: c, 11: l }), I(E, [2, 8]), I(E, [2, 9]), I(E, [2, 10]), I(y, [2, 15]), I(y, [2, 16]), I(y, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, I(n, [2, 13], { 7: c, 11: l }), I(E, [2, 11]), I(E, [2, 12]), { 21: [1, 37] }, I(y, [2, 25]), I(y, [2, 27])],
2440
+ defaultActions: { 2: [2, 1], 6: [2, 2] },
2441
+ parseError: /* @__PURE__ */ S(function(d, N) {
2442
+ if (N.recoverable)
2443
+ this.trace(d);
2444
+ else {
2445
+ var s = new Error(d);
2446
+ throw s.hash = N, s;
2447
+ }
2448
+ }, "parseError"),
2449
+ parse: /* @__PURE__ */ S(function(d) {
2450
+ var N = this, s = [0], h = [], u = [null], p = [], A = this.table, C = "", R = 0, x = 0, _ = 2, U = 1, X = p.slice.call(arguments, 1), M = Object.create(this.lexer), G = { yy: {} };
2451
+ for (var F in this.yy)
2452
+ Object.prototype.hasOwnProperty.call(this.yy, F) && (G.yy[F] = this.yy[F]);
2453
+ M.setInput(d, G.yy), G.yy.lexer = M, G.yy.parser = this, typeof M.yylloc > "u" && (M.yylloc = {});
2454
+ var b = M.yylloc;
2455
+ p.push(b);
2456
+ var Y = M.options && M.options.ranges;
2457
+ typeof G.yy.parseError == "function" ? this.parseError = G.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
2458
+ function k(V) {
2459
+ s.length = s.length - 2 * V, u.length = u.length - V, p.length = p.length - V;
2460
+ }
2461
+ S(k, "popStack");
2462
+ function H() {
2463
+ var V;
2464
+ return V = h.pop() || M.lex() || U, typeof V != "number" && (V instanceof Array && (h = V, V = h.pop()), V = N.symbols_[V] || V), V;
2465
+ }
2466
+ S(H, "lex");
2467
+ for (var P, B, $, K, Q = {}, J, j, gt, q; ; ) {
2468
+ if (B = s[s.length - 1], this.defaultActions[B] ? $ = this.defaultActions[B] : ((P === null || typeof P > "u") && (P = H()), $ = A[B] && A[B][P]), typeof $ > "u" || !$.length || !$[0]) {
2469
+ var rt = "";
2470
+ q = [];
2471
+ for (J in A[B])
2472
+ this.terminals_[J] && J > _ && q.push("'" + this.terminals_[J] + "'");
2473
+ M.showPosition ? rt = "Parse error on line " + (R + 1) + `:
2474
+ ` + M.showPosition() + `
2475
+ Expecting ` + q.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : rt = "Parse error on line " + (R + 1) + ": Unexpected " + (P == U ? "end of input" : "'" + (this.terminals_[P] || P) + "'"), this.parseError(rt, {
2476
+ text: M.match,
2477
+ token: this.terminals_[P] || P,
2478
+ line: M.yylineno,
2479
+ loc: b,
2480
+ expected: q
2481
+ });
2482
+ }
2483
+ if ($[0] instanceof Array && $.length > 1)
2484
+ throw new Error("Parse Error: multiple actions possible at state: " + B + ", token: " + P);
2485
+ switch ($[0]) {
2486
+ case 1:
2487
+ s.push(P), u.push(M.yytext), p.push(M.yylloc), s.push($[1]), P = null, x = M.yyleng, C = M.yytext, R = M.yylineno, b = M.yylloc;
2488
+ break;
2489
+ case 2:
2490
+ if (j = this.productions_[$[1]][1], Q.$ = u[u.length - j], Q._$ = {
2491
+ first_line: p[p.length - (j || 1)].first_line,
2492
+ last_line: p[p.length - 1].last_line,
2493
+ first_column: p[p.length - (j || 1)].first_column,
2494
+ last_column: p[p.length - 1].last_column
2495
+ }, Y && (Q._$.range = [
2496
+ p[p.length - (j || 1)].range[0],
2497
+ p[p.length - 1].range[1]
2498
+ ]), K = this.performAction.apply(Q, [
2499
+ C,
2500
+ x,
2501
+ R,
2502
+ G.yy,
2503
+ $[1],
2504
+ u,
2505
+ p
2506
+ ].concat(X)), typeof K < "u")
2507
+ return K;
2508
+ j && (s = s.slice(0, -1 * j * 2), u = u.slice(0, -1 * j), p = p.slice(0, -1 * j)), s.push(this.productions_[$[1]][0]), u.push(Q.$), p.push(Q._$), gt = A[s[s.length - 2]][s[s.length - 1]], s.push(gt);
2509
+ break;
2510
+ case 3:
2511
+ return !0;
2512
+ }
2513
+ }
2514
+ return !0;
2515
+ }, "parse")
2516
+ }, D = /* @__PURE__ */ function() {
2517
+ var O = {
2518
+ EOF: 1,
2519
+ parseError: /* @__PURE__ */ S(function(N, s) {
2520
+ if (this.yy.parser)
2521
+ this.yy.parser.parseError(N, s);
2522
+ else
2523
+ throw new Error(N);
2524
+ }, "parseError"),
2525
+ // resets the lexer, sets new input
2526
+ setInput: /* @__PURE__ */ S(function(d, N) {
2527
+ return this.yy = N || this.yy || {}, this._input = d, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
2528
+ first_line: 1,
2529
+ first_column: 0,
2530
+ last_line: 1,
2531
+ last_column: 0
2532
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
2533
+ }, "setInput"),
2534
+ // consumes and returns one char from the input
2535
+ input: /* @__PURE__ */ S(function() {
2536
+ var d = this._input[0];
2537
+ this.yytext += d, this.yyleng++, this.offset++, this.match += d, this.matched += d;
2538
+ var N = d.match(/(?:\r\n?|\n).*/g);
2539
+ return N ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), d;
2540
+ }, "input"),
2541
+ // unshifts one char (or a string) into the input
2542
+ unput: /* @__PURE__ */ S(function(d) {
2543
+ var N = d.length, s = d.split(/(?:\r\n?|\n)/g);
2544
+ this._input = d + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - N), this.offset -= N;
2545
+ var h = this.match.split(/(?:\r\n?|\n)/g);
2546
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), s.length - 1 && (this.yylineno -= s.length - 1);
2547
+ var u = this.yylloc.range;
2548
+ return this.yylloc = {
2549
+ first_line: this.yylloc.first_line,
2550
+ last_line: this.yylineno + 1,
2551
+ first_column: this.yylloc.first_column,
2552
+ last_column: s ? (s.length === h.length ? this.yylloc.first_column : 0) + h[h.length - s.length].length - s[0].length : this.yylloc.first_column - N
2553
+ }, this.options.ranges && (this.yylloc.range = [u[0], u[0] + this.yyleng - N]), this.yyleng = this.yytext.length, this;
2554
+ }, "unput"),
2555
+ // When called from action, caches matched text and appends it on next action
2556
+ more: /* @__PURE__ */ S(function() {
2557
+ return this._more = !0, this;
2558
+ }, "more"),
2559
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
2560
+ reject: /* @__PURE__ */ S(function() {
2561
+ if (this.options.backtrack_lexer)
2562
+ this._backtrack = !0;
2563
+ else
2564
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
2565
+ ` + this.showPosition(), {
2566
+ text: "",
2567
+ token: null,
2568
+ line: this.yylineno
2569
+ });
2570
+ return this;
2571
+ }, "reject"),
2572
+ // retain first n characters of the match
2573
+ less: /* @__PURE__ */ S(function(d) {
2574
+ this.unput(this.match.slice(d));
2575
+ }, "less"),
2576
+ // displays already matched input, i.e. for error messages
2577
+ pastInput: /* @__PURE__ */ S(function() {
2578
+ var d = this.matched.substr(0, this.matched.length - this.match.length);
2579
+ return (d.length > 20 ? "..." : "") + d.substr(-20).replace(/\n/g, "");
2580
+ }, "pastInput"),
2581
+ // displays upcoming input, i.e. for error messages
2582
+ upcomingInput: /* @__PURE__ */ S(function() {
2583
+ var d = this.match;
2584
+ return d.length < 20 && (d += this._input.substr(0, 20 - d.length)), (d.substr(0, 20) + (d.length > 20 ? "..." : "")).replace(/\n/g, "");
2585
+ }, "upcomingInput"),
2586
+ // displays the character position where the lexing error occurred, i.e. for error messages
2587
+ showPosition: /* @__PURE__ */ S(function() {
2588
+ var d = this.pastInput(), N = new Array(d.length + 1).join("-");
2589
+ return d + this.upcomingInput() + `
2590
+ ` + N + "^";
2591
+ }, "showPosition"),
2592
+ // test the lexed token: return FALSE when not a match, otherwise return token
2593
+ test_match: /* @__PURE__ */ S(function(d, N) {
2594
+ var s, h, u;
2595
+ if (this.options.backtrack_lexer && (u = {
2596
+ yylineno: this.yylineno,
2597
+ yylloc: {
2598
+ first_line: this.yylloc.first_line,
2599
+ last_line: this.last_line,
2600
+ first_column: this.yylloc.first_column,
2601
+ last_column: this.yylloc.last_column
2602
+ },
2603
+ yytext: this.yytext,
2604
+ match: this.match,
2605
+ matches: this.matches,
2606
+ matched: this.matched,
2607
+ yyleng: this.yyleng,
2608
+ offset: this.offset,
2609
+ _more: this._more,
2610
+ _input: this._input,
2611
+ yy: this.yy,
2612
+ conditionStack: this.conditionStack.slice(0),
2613
+ done: this.done
2614
+ }, this.options.ranges && (u.yylloc.range = this.yylloc.range.slice(0))), h = d[0].match(/(?:\r\n?|\n).*/g), h && (this.yylineno += h.length), this.yylloc = {
2615
+ first_line: this.yylloc.last_line,
2616
+ last_line: this.yylineno + 1,
2617
+ first_column: this.yylloc.last_column,
2618
+ last_column: h ? h[h.length - 1].length - h[h.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + d[0].length
2619
+ }, this.yytext += d[0], this.match += d[0], this.matches = d, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(d[0].length), this.matched += d[0], s = this.performAction.call(this, this.yy, this, N, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), s)
2620
+ return s;
2621
+ if (this._backtrack) {
2622
+ for (var p in u)
2623
+ this[p] = u[p];
2624
+ return !1;
2625
+ }
2626
+ return !1;
2627
+ }, "test_match"),
2628
+ // return next match in input
2629
+ next: /* @__PURE__ */ S(function() {
2630
+ if (this.done)
2631
+ return this.EOF;
2632
+ this._input || (this.done = !0);
2633
+ var d, N, s, h;
2634
+ this._more || (this.yytext = "", this.match = "");
2635
+ for (var u = this._currentRules(), p = 0; p < u.length; p++)
2636
+ if (s = this._input.match(this.rules[u[p]]), s && (!N || s[0].length > N[0].length)) {
2637
+ if (N = s, h = p, this.options.backtrack_lexer) {
2638
+ if (d = this.test_match(s, u[p]), d !== !1)
2639
+ return d;
2640
+ if (this._backtrack) {
2641
+ N = !1;
2642
+ continue;
2643
+ } else
2644
+ return !1;
2645
+ } else if (!this.options.flex)
2646
+ break;
2647
+ }
2648
+ return N ? (d = this.test_match(N, u[h]), d !== !1 ? d : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
2649
+ ` + this.showPosition(), {
2650
+ text: "",
2651
+ token: null,
2652
+ line: this.yylineno
2653
+ });
2654
+ }, "next"),
2655
+ // return next match that has a token
2656
+ lex: /* @__PURE__ */ S(function() {
2657
+ var N = this.next();
2658
+ return N || this.lex();
2659
+ }, "lex"),
2660
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
2661
+ begin: /* @__PURE__ */ S(function(N) {
2662
+ this.conditionStack.push(N);
2663
+ }, "begin"),
2664
+ // pop the previously active lexer condition state off the condition stack
2665
+ popState: /* @__PURE__ */ S(function() {
2666
+ var N = this.conditionStack.length - 1;
2667
+ return N > 0 ? this.conditionStack.pop() : this.conditionStack[0];
2668
+ }, "popState"),
2669
+ // produce the lexer rule set which is active for the currently active lexer condition state
2670
+ _currentRules: /* @__PURE__ */ S(function() {
2671
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
2672
+ }, "_currentRules"),
2673
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
2674
+ topState: /* @__PURE__ */ S(function(N) {
2675
+ return N = this.conditionStack.length - 1 - Math.abs(N || 0), N >= 0 ? this.conditionStack[N] : "INITIAL";
2676
+ }, "topState"),
2677
+ // alias for begin(condition)
2678
+ pushState: /* @__PURE__ */ S(function(N) {
2679
+ this.begin(N);
2680
+ }, "pushState"),
2681
+ // return the number of states currently on the stack
2682
+ stateStackSize: /* @__PURE__ */ S(function() {
2683
+ return this.conditionStack.length;
2684
+ }, "stateStackSize"),
2685
+ options: { "case-insensitive": !0 },
2686
+ performAction: /* @__PURE__ */ S(function(N, s, h, u) {
2687
+ switch (h) {
2688
+ case 0:
2689
+ return N.getLogger().trace("Found comment", s.yytext), 6;
2690
+ case 1:
2691
+ return 8;
2692
+ case 2:
2693
+ this.begin("CLASS");
2694
+ break;
2695
+ case 3:
2696
+ return this.popState(), 16;
2697
+ case 4:
2698
+ this.popState();
2699
+ break;
2700
+ case 5:
2701
+ N.getLogger().trace("Begin icon"), this.begin("ICON");
2702
+ break;
2703
+ case 6:
2704
+ return N.getLogger().trace("SPACELINE"), 6;
2705
+ case 7:
2706
+ return 7;
2707
+ case 8:
2708
+ return 15;
2709
+ case 9:
2710
+ N.getLogger().trace("end icon"), this.popState();
2711
+ break;
2712
+ case 10:
2713
+ return N.getLogger().trace("Exploding node"), this.begin("NODE"), 19;
2714
+ case 11:
2715
+ return N.getLogger().trace("Cloud"), this.begin("NODE"), 19;
2716
+ case 12:
2717
+ return N.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19;
2718
+ case 13:
2719
+ return N.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19;
2720
+ case 14:
2721
+ return this.begin("NODE"), 19;
2722
+ case 15:
2723
+ return this.begin("NODE"), 19;
2724
+ case 16:
2725
+ return this.begin("NODE"), 19;
2726
+ case 17:
2727
+ return this.begin("NODE"), 19;
2728
+ case 18:
2729
+ return 13;
2730
+ case 19:
2731
+ return 22;
2732
+ case 20:
2733
+ return 11;
2734
+ case 21:
2735
+ this.begin("NSTR2");
2736
+ break;
2737
+ case 22:
2738
+ return "NODE_DESCR";
2739
+ case 23:
2740
+ this.popState();
2741
+ break;
2742
+ case 24:
2743
+ N.getLogger().trace("Starting NSTR"), this.begin("NSTR");
2744
+ break;
2745
+ case 25:
2746
+ return N.getLogger().trace("description:", s.yytext), "NODE_DESCR";
2747
+ case 26:
2748
+ this.popState();
2749
+ break;
2750
+ case 27:
2751
+ return this.popState(), N.getLogger().trace("node end ))"), "NODE_DEND";
2752
+ case 28:
2753
+ return this.popState(), N.getLogger().trace("node end )"), "NODE_DEND";
2754
+ case 29:
2755
+ return this.popState(), N.getLogger().trace("node end ...", s.yytext), "NODE_DEND";
2756
+ case 30:
2757
+ return this.popState(), N.getLogger().trace("node end (("), "NODE_DEND";
2758
+ case 31:
2759
+ return this.popState(), N.getLogger().trace("node end (-"), "NODE_DEND";
2760
+ case 32:
2761
+ return this.popState(), N.getLogger().trace("node end (-"), "NODE_DEND";
2762
+ case 33:
2763
+ return this.popState(), N.getLogger().trace("node end (("), "NODE_DEND";
2764
+ case 34:
2765
+ return this.popState(), N.getLogger().trace("node end (("), "NODE_DEND";
2766
+ case 35:
2767
+ return N.getLogger().trace("Long description:", s.yytext), 20;
2768
+ case 36:
2769
+ return N.getLogger().trace("Long description:", s.yytext), 20;
2770
+ }
2771
+ }, "anonymous"),
2772
+ rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
2773
+ conditions: { CLASS: { rules: [3, 4], inclusive: !1 }, ICON: { rules: [8, 9], inclusive: !1 }, NSTR2: { rules: [22, 23], inclusive: !1 }, NSTR: { rules: [25, 26], inclusive: !1 }, NODE: { rules: [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], inclusive: !0 } }
2774
+ };
2775
+ return O;
2776
+ }();
2777
+ T.lexer = D;
2778
+ function L() {
2779
+ this.yy = {};
2780
+ }
2781
+ return S(L, "Parser"), L.prototype = T, T.Parser = L, new L();
2782
+ }();
2783
+ st.parser = st;
2784
+ var _t = st, Z = [], vt = 0, ht = {}, Ft = /* @__PURE__ */ S(() => {
2785
+ Z = [], vt = 0, ht = {};
2786
+ }, "clear"), bt = /* @__PURE__ */ S(function(I) {
2787
+ for (let w = Z.length - 1; w >= 0; w--)
2788
+ if (Z[w].level < I)
2789
+ return Z[w];
2790
+ return null;
2791
+ }, "getParent"), Ut = /* @__PURE__ */ S(() => Z.length > 0 ? Z[0] : null, "getMindmap"), Pt = /* @__PURE__ */ S((I, w, f, m) => {
2792
+ z.info("addNode", I, w, f, m);
2793
+ const v = at();
2794
+ let r = v.mindmap?.padding ?? tt.mindmap.padding;
2795
+ switch (m) {
2796
+ case W.ROUNDED_RECT:
2797
+ case W.RECT:
2798
+ case W.HEXAGON:
2799
+ r *= 2;
2800
+ }
2801
+ const t = {
2802
+ id: vt++,
2803
+ nodeId: et(w, v),
2804
+ level: I,
2805
+ descr: et(f, v),
2806
+ type: m,
2807
+ children: [],
2808
+ width: v.mindmap?.maxNodeWidth ?? tt.mindmap.maxNodeWidth,
2809
+ padding: r
2810
+ }, e = bt(I);
2811
+ if (e)
2812
+ e.children.push(t), Z.push(t);
2813
+ else if (Z.length === 0)
2814
+ Z.push(t);
2815
+ else
2816
+ throw new Error(
2817
+ 'There can be only one root. No parent could be found for ("' + t.descr + '")'
2818
+ );
2819
+ }, "addNode"), W = {
2820
+ DEFAULT: 0,
2821
+ NO_BORDER: 0,
2822
+ ROUNDED_RECT: 1,
2823
+ RECT: 2,
2824
+ CIRCLE: 3,
2825
+ CLOUD: 4,
2826
+ BANG: 5,
2827
+ HEXAGON: 6
2828
+ }, Yt = /* @__PURE__ */ S((I, w) => {
2829
+ switch (z.debug("In get type", I, w), I) {
2830
+ case "[":
2831
+ return W.RECT;
2832
+ case "(":
2833
+ return w === ")" ? W.ROUNDED_RECT : W.CLOUD;
2834
+ case "((":
2835
+ return W.CIRCLE;
2836
+ case ")":
2837
+ return W.CLOUD;
2838
+ case "))":
2839
+ return W.BANG;
2840
+ case "{{":
2841
+ return W.HEXAGON;
2842
+ default:
2843
+ return W.DEFAULT;
2844
+ }
2845
+ }, "getType"), Xt = /* @__PURE__ */ S((I, w) => {
2846
+ ht[I] = w;
2847
+ }, "setElementForId"), kt = /* @__PURE__ */ S((I) => {
2848
+ if (!I)
2849
+ return;
2850
+ const w = at(), f = Z[Z.length - 1];
2851
+ I.icon && (f.icon = et(I.icon, w)), I.class && (f.class = et(I.class, w));
2852
+ }, "decorateNode"), Ht = /* @__PURE__ */ S((I) => {
2853
+ switch (I) {
2854
+ case W.DEFAULT:
2855
+ return "no-border";
2856
+ case W.RECT:
2857
+ return "rect";
2858
+ case W.ROUNDED_RECT:
2859
+ return "rounded-rect";
2860
+ case W.CIRCLE:
2861
+ return "circle";
2862
+ case W.CLOUD:
2863
+ return "cloud";
2864
+ case W.BANG:
2865
+ return "bang";
2866
+ case W.HEXAGON:
2867
+ return "hexgon";
2868
+ default:
2869
+ return "no-border";
2870
+ }
2871
+ }, "type2Str"), $t = /* @__PURE__ */ S(() => z, "getLogger"), Wt = /* @__PURE__ */ S((I) => ht[I], "getElementById"), Bt = {
2872
+ clear: Ft,
2873
+ addNode: Pt,
2874
+ getMindmap: Ut,
2875
+ nodeType: W,
2876
+ getType: Yt,
2877
+ setElementForId: Xt,
2878
+ decorateNode: kt,
2879
+ type2Str: Ht,
2880
+ getLogger: $t,
2881
+ getElementById: Wt
2882
+ }, Vt = Bt, Zt = 12, Qt = /* @__PURE__ */ S(function(I, w, f, m) {
2883
+ w.append("path").attr("id", "node-" + f.id).attr("class", "node-bkg node-" + I.type2Str(f.type)).attr(
2884
+ "d",
2885
+ `M0 ${f.height - 5} v${-f.height + 2 * 5} q0,-5 5,-5 h${f.width - 2 * 5} q5,0 5,5 v${f.height - 5} H0 Z`
2886
+ ), w.append("line").attr("class", "node-line-" + m).attr("x1", 0).attr("y1", f.height).attr("x2", f.width).attr("y2", f.height);
2887
+ }, "defaultBkg"), jt = /* @__PURE__ */ S(function(I, w, f) {
2888
+ w.append("rect").attr("id", "node-" + f.id).attr("class", "node-bkg node-" + I.type2Str(f.type)).attr("height", f.height).attr("width", f.width);
2889
+ }, "rectBkg"), zt = /* @__PURE__ */ S(function(I, w, f) {
2890
+ const m = f.width, v = f.height, r = 0.15 * m, t = 0.25 * m, e = 0.35 * m, i = 0.2 * m;
2891
+ w.append("path").attr("id", "node-" + f.id).attr("class", "node-bkg node-" + I.type2Str(f.type)).attr(
2892
+ "d",
2893
+ `M0 0 a${r},${r} 0 0,1 ${m * 0.25},${-1 * m * 0.1}
2894
+ a${e},${e} 1 0,1 ${m * 0.4},${-1 * m * 0.1}
2895
+ a${t},${t} 1 0,1 ${m * 0.35},${1 * m * 0.2}
2896
+
2897
+ a${r},${r} 1 0,1 ${m * 0.15},${1 * v * 0.35}
2898
+ a${i},${i} 1 0,1 ${-1 * m * 0.15},${1 * v * 0.65}
2899
+
2900
+ a${t},${r} 1 0,1 ${-1 * m * 0.25},${m * 0.15}
2901
+ a${e},${e} 1 0,1 ${-1 * m * 0.5},0
2902
+ a${r},${r} 1 0,1 ${-1 * m * 0.25},${-1 * m * 0.15}
2903
+
2904
+ a${r},${r} 1 0,1 ${-1 * m * 0.1},${-1 * v * 0.35}
2905
+ a${i},${i} 1 0,1 ${m * 0.1},${-1 * v * 0.65}
2906
+
2907
+ H0 V0 Z`
2908
+ );
2909
+ }, "cloudBkg"), Kt = /* @__PURE__ */ S(function(I, w, f) {
2910
+ const m = f.width, v = f.height, r = 0.15 * m;
2911
+ w.append("path").attr("id", "node-" + f.id).attr("class", "node-bkg node-" + I.type2Str(f.type)).attr(
2912
+ "d",
2913
+ `M0 0 a${r},${r} 1 0,0 ${m * 0.25},${-1 * v * 0.1}
2914
+ a${r},${r} 1 0,0 ${m * 0.25},0
2915
+ a${r},${r} 1 0,0 ${m * 0.25},0
2916
+ a${r},${r} 1 0,0 ${m * 0.25},${1 * v * 0.1}
2917
+
2918
+ a${r},${r} 1 0,0 ${m * 0.15},${1 * v * 0.33}
2919
+ a${r * 0.8},${r * 0.8} 1 0,0 0,${1 * v * 0.34}
2920
+ a${r},${r} 1 0,0 ${-1 * m * 0.15},${1 * v * 0.33}
2921
+
2922
+ a${r},${r} 1 0,0 ${-1 * m * 0.25},${v * 0.15}
2923
+ a${r},${r} 1 0,0 ${-1 * m * 0.25},0
2924
+ a${r},${r} 1 0,0 ${-1 * m * 0.25},0
2925
+ a${r},${r} 1 0,0 ${-1 * m * 0.25},${-1 * v * 0.15}
2926
+
2927
+ a${r},${r} 1 0,0 ${-1 * m * 0.1},${-1 * v * 0.33}
2928
+ a${r * 0.8},${r * 0.8} 1 0,0 0,${-1 * v * 0.34}
2929
+ a${r},${r} 1 0,0 ${m * 0.1},${-1 * v * 0.33}
2930
+
2931
+ H0 V0 Z`
2932
+ );
2933
+ }, "bangBkg"), Jt = /* @__PURE__ */ S(function(I, w, f) {
2934
+ w.append("circle").attr("id", "node-" + f.id).attr("class", "node-bkg node-" + I.type2Str(f.type)).attr("r", f.width / 2);
2935
+ }, "circleBkg");
2936
+ function yt(I, w, f, m, v) {
2937
+ return I.insert("polygon", ":first-child").attr(
2938
+ "points",
2939
+ m.map(function(r) {
2940
+ return r.x + "," + r.y;
2941
+ }).join(" ")
2942
+ ).attr("transform", "translate(" + (v.width - w) / 2 + ", " + f + ")");
2943
+ }
2944
+ S(yt, "insertPolygonShape");
2945
+ var qt = /* @__PURE__ */ S(function(I, w, f) {
2946
+ const m = f.height, r = m / 4, t = f.width - f.padding + 2 * r, e = [
2947
+ { x: r, y: 0 },
2948
+ { x: t - r, y: 0 },
2949
+ { x: t, y: -m / 2 },
2950
+ { x: t - r, y: -m },
2951
+ { x: r, y: -m },
2952
+ { x: 0, y: -m / 2 }
2953
+ ];
2954
+ yt(w, t, m, e, f);
2955
+ }, "hexagonBkg"), te = /* @__PURE__ */ S(function(I, w, f) {
2956
+ w.append("rect").attr("id", "node-" + f.id).attr("class", "node-bkg node-" + I.type2Str(f.type)).attr("height", f.height).attr("rx", f.padding).attr("ry", f.padding).attr("width", f.width);
2957
+ }, "roundedRectBkg"), ee = /* @__PURE__ */ S(async function(I, w, f, m, v) {
2958
+ const r = v.htmlLabels, t = m % (Zt - 1), e = w.append("g");
2959
+ f.section = t;
2960
+ let i = "section-" + t;
2961
+ t < 0 && (i += " section-root"), e.attr("class", (f.class ? f.class + " " : "") + "mindmap-node " + i);
2962
+ const o = e.append("g"), g = e.append("g"), a = f.descr.replace(/(<br\/*>)/g, `
2963
+ `);
2964
+ await Dt(
2965
+ g,
2966
+ a,
2967
+ {
2968
+ useHtmlLabels: r,
2969
+ width: f.width,
2970
+ classes: "mindmap-node-label"
2971
+ },
2972
+ v
2973
+ ), r || g.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle");
2974
+ const y = g.node().getBBox(), [n] = mt(v.fontSize);
2975
+ if (f.height = y.height + n * 1.1 * 0.5 + f.padding, f.width = y.width + 2 * f.padding, f.icon)
2976
+ if (f.type === I.nodeType.CIRCLE)
2977
+ f.height += 50, f.width += 50, e.append("foreignObject").attr("height", "50px").attr("width", f.width).attr("style", "text-align: center;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + t + " " + f.icon), g.attr(
2978
+ "transform",
2979
+ "translate(" + f.width / 2 + ", " + (f.height / 2 - 1.5 * f.padding) + ")"
2980
+ );
2981
+ else {
2982
+ f.width += 50;
2983
+ const c = f.height;
2984
+ f.height = Math.max(c, 60);
2985
+ const l = Math.abs(f.height - c);
2986
+ e.append("foreignObject").attr("width", "60px").attr("height", f.height).attr("style", "text-align: center;margin-top:" + l / 2 + "px;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + t + " " + f.icon), g.attr(
2987
+ "transform",
2988
+ "translate(" + (25 + f.width / 2) + ", " + (l / 2 + f.padding / 2) + ")"
2989
+ );
2990
+ }
2991
+ else if (r) {
2992
+ const c = (f.width - y.width) / 2, l = (f.height - y.height) / 2;
2993
+ g.attr("transform", "translate(" + c + ", " + l + ")");
2994
+ } else {
2995
+ const c = f.width / 2, l = f.padding / 2;
2996
+ g.attr("transform", "translate(" + c + ", " + l + ")");
2997
+ }
2998
+ switch (f.type) {
2999
+ case I.nodeType.DEFAULT:
3000
+ Qt(I, o, f, t);
3001
+ break;
3002
+ case I.nodeType.ROUNDED_RECT:
3003
+ te(I, o, f, t);
3004
+ break;
3005
+ case I.nodeType.RECT:
3006
+ jt(I, o, f, t);
3007
+ break;
3008
+ case I.nodeType.CIRCLE:
3009
+ o.attr("transform", "translate(" + f.width / 2 + ", " + +f.height / 2 + ")"), Jt(I, o, f, t);
3010
+ break;
3011
+ case I.nodeType.CLOUD:
3012
+ zt(I, o, f, t);
3013
+ break;
3014
+ case I.nodeType.BANG:
3015
+ Kt(I, o, f, t);
3016
+ break;
3017
+ case I.nodeType.HEXAGON:
3018
+ qt(I, o, f, t);
3019
+ break;
3020
+ }
3021
+ return I.setElementForId(f.id, e), f.height;
3022
+ }, "drawNode"), re = /* @__PURE__ */ S(function(I, w) {
3023
+ const f = I.getElementById(w.id), m = w.x || 0, v = w.y || 0;
3024
+ f.attr("transform", "translate(" + m + "," + v + ")");
3025
+ }, "positionNode");
3026
+ pt.use(Gt);
3027
+ async function lt(I, w, f, m, v) {
3028
+ await ee(I, w, f, m, v), f.children && await Promise.all(
3029
+ f.children.map(
3030
+ (r, t) => lt(I, w, r, m < 0 ? t : m, v)
3031
+ )
3032
+ );
3033
+ }
3034
+ S(lt, "drawNodes");
3035
+ function Et(I, w) {
3036
+ w.edges().map((f, m) => {
3037
+ const v = f.data();
3038
+ if (f[0]._private.bodyBounds) {
3039
+ const r = f[0]._private.rscratch;
3040
+ z.trace("Edge: ", m, v), I.insert("path").attr(
3041
+ "d",
3042
+ `M ${r.startX},${r.startY} L ${r.midX},${r.midY} L${r.endX},${r.endY} `
3043
+ ).attr("class", "edge section-edge-" + v.section + " edge-depth-" + v.depth);
3044
+ }
3045
+ });
3046
+ }
3047
+ S(Et, "drawEdges");
3048
+ function ct(I, w, f, m) {
3049
+ w.add({
3050
+ group: "nodes",
3051
+ data: {
3052
+ id: I.id.toString(),
3053
+ labelText: I.descr,
3054
+ height: I.height,
3055
+ width: I.width,
3056
+ level: m,
3057
+ nodeId: I.id,
3058
+ padding: I.padding,
3059
+ type: I.type
3060
+ },
3061
+ position: {
3062
+ x: I.x,
3063
+ y: I.y
3064
+ }
3065
+ }), I.children && I.children.forEach((v) => {
3066
+ ct(v, w, f, m + 1), w.add({
3067
+ group: "edges",
3068
+ data: {
3069
+ id: `${I.id}_${v.id}`,
3070
+ source: I.id,
3071
+ target: v.id,
3072
+ depth: m,
3073
+ section: v.section
3074
+ }
3075
+ });
3076
+ });
3077
+ }
3078
+ S(ct, "addNodes");
3079
+ function Lt(I, w) {
3080
+ return new Promise((f) => {
3081
+ const m = Nt("body").append("div").attr("id", "cy").attr("style", "display:none"), v = pt({
3082
+ container: document.getElementById("cy"),
3083
+ // container to render in
3084
+ style: [
3085
+ {
3086
+ selector: "edge",
3087
+ style: {
3088
+ "curve-style": "bezier"
3089
+ }
3090
+ }
3091
+ ]
3092
+ });
3093
+ m.remove(), ct(I, v, w, 0), v.nodes().forEach(function(r) {
3094
+ r.layoutDimensions = () => {
3095
+ const t = r.data();
3096
+ return { w: t.width, h: t.height };
3097
+ };
3098
+ }), v.layout({
3099
+ name: "cose-bilkent",
3100
+ // @ts-ignore Types for cose-bilkent are not correct?
3101
+ quality: "proof",
3102
+ styleEnabled: !1,
3103
+ animate: !1
3104
+ }).run(), v.ready((r) => {
3105
+ z.info("Ready", r), f(v);
3106
+ });
3107
+ });
3108
+ }
3109
+ S(Lt, "layoutMindmap");
3110
+ function Tt(I, w) {
3111
+ w.nodes().map((f, m) => {
3112
+ const v = f.data();
3113
+ v.x = f.position().x, v.y = f.position().y, re(I, v);
3114
+ const r = I.getElementById(v.nodeId);
3115
+ z.info("id:", m, "Position: (", f.position().x, ", ", f.position().y, ")", v), r.attr(
3116
+ "transform",
3117
+ `translate(${f.position().x - v.width / 2}, ${f.position().y - v.height / 2})`
3118
+ ), r.attr("attr", `apa-${m})`);
3119
+ });
3120
+ }
3121
+ S(Tt, "positionNodes");
3122
+ var ie = /* @__PURE__ */ S(async (I, w, f, m) => {
3123
+ z.debug(`Rendering mindmap diagram
3124
+ ` + I);
3125
+ const v = m.db, r = v.getMindmap();
3126
+ if (!r)
3127
+ return;
3128
+ const t = at();
3129
+ t.htmlLabels = !1;
3130
+ const e = Ot(w), i = e.append("g");
3131
+ i.attr("class", "mindmap-edges");
3132
+ const o = e.append("g");
3133
+ o.attr("class", "mindmap-nodes"), await lt(v, o, r, -1, t);
3134
+ const g = await Lt(r, t);
3135
+ Et(i, g), Tt(v, g), At(
3136
+ void 0,
3137
+ e,
3138
+ t.mindmap?.padding ?? tt.mindmap.padding,
3139
+ t.mindmap?.useMaxWidth ?? tt.mindmap.useMaxWidth
3140
+ );
3141
+ }, "draw"), ne = {
3142
+ draw: ie
3143
+ }, se = /* @__PURE__ */ S((I) => {
3144
+ let w = "";
3145
+ for (let f = 0; f < I.THEME_COLOR_LIMIT; f++)
3146
+ I["lineColor" + f] = I["lineColor" + f] || I["cScaleInv" + f], It(I["lineColor" + f]) ? I["lineColor" + f] = Ct(I["lineColor" + f], 20) : I["lineColor" + f] = Rt(I["lineColor" + f], 20);
3147
+ for (let f = 0; f < I.THEME_COLOR_LIMIT; f++) {
3148
+ const m = "" + (17 - 3 * f);
3149
+ w += `
3150
+ .section-${f - 1} rect, .section-${f - 1} path, .section-${f - 1} circle, .section-${f - 1} polygon, .section-${f - 1} path {
3151
+ fill: ${I["cScale" + f]};
3152
+ }
3153
+ .section-${f - 1} text {
3154
+ fill: ${I["cScaleLabel" + f]};
3155
+ }
3156
+ .node-icon-${f - 1} {
3157
+ font-size: 40px;
3158
+ color: ${I["cScaleLabel" + f]};
3159
+ }
3160
+ .section-edge-${f - 1}{
3161
+ stroke: ${I["cScale" + f]};
3162
+ }
3163
+ .edge-depth-${f - 1}{
3164
+ stroke-width: ${m};
3165
+ }
3166
+ .section-${f - 1} line {
3167
+ stroke: ${I["cScaleInv" + f]} ;
3168
+ stroke-width: 3;
3169
+ }
3170
+
3171
+ .disabled, .disabled circle, .disabled text {
3172
+ fill: lightgray;
3173
+ }
3174
+ .disabled text {
3175
+ fill: #efefef;
3176
+ }
3177
+ `;
3178
+ }
3179
+ return w;
3180
+ }, "genSections"), ae = /* @__PURE__ */ S((I) => `
3181
+ .edge {
3182
+ stroke-width: 3;
3183
+ }
3184
+ ${se(I)}
3185
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
3186
+ fill: ${I.git0};
3187
+ }
3188
+ .section-root text {
3189
+ fill: ${I.gitBranchLabel0};
3190
+ }
3191
+ .icon-container {
3192
+ height:100%;
3193
+ display: flex;
3194
+ justify-content: center;
3195
+ align-items: center;
3196
+ }
3197
+ .edge {
3198
+ fill: none;
3199
+ }
3200
+ .mindmap-node-label {
3201
+ dy: 1em;
3202
+ alignment-baseline: middle;
3203
+ text-anchor: middle;
3204
+ dominant-baseline: middle;
3205
+ text-align: center;
3206
+ }
3207
+ `, "getStyles"), oe = ae, ge = {
3208
+ db: Vt,
3209
+ renderer: ne,
3210
+ parser: _t,
3211
+ styles: oe
3212
+ };
3213
+ export {
3214
+ ge as diagram
3215
+ };