@sme.up/ketchup2 2.0.0-SNAPSHOT-20250905083046 → 2.0.0-SNAPSHOT-20250905085901

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