@digipair/skill-web-chatbot 0.3.0

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 (100) hide show
  1. package/SAP-icons.cjs.js +2489 -0
  2. package/SAP-icons.cjs2.js +2489 -0
  3. package/SAP-icons.esm.js +2482 -0
  4. package/SAP-icons.esm2.js +2482 -0
  5. package/arc-da8fd8d8.cjs.js +88 -0
  6. package/arc-da8fd8d8.esm.js +86 -0
  7. package/array-2ff2c7a6.cjs.js +7 -0
  8. package/array-2ff2c7a6.esm.js +5 -0
  9. package/c4Diagram-1bdb45a8.cjs.js +4613 -0
  10. package/c4Diagram-1bdb45a8.esm.js +4611 -0
  11. package/classDiagram-185c1a10.cjs.js +96 -0
  12. package/classDiagram-185c1a10.esm.js +94 -0
  13. package/classDiagram-v2-6dc3b9c3.cjs.js +403 -0
  14. package/classDiagram-v2-6dc3b9c3.esm.js +401 -0
  15. package/constant-2fe7eae5.cjs.js +58 -0
  16. package/constant-2fe7eae5.esm.js +55 -0
  17. package/createText-94e3ebbf.cjs.js +2775 -0
  18. package/createText-94e3ebbf.esm.js +2773 -0
  19. package/debug.html +18 -0
  20. package/edges-558884ee.cjs.js +1450 -0
  21. package/edges-558884ee.esm.js +1436 -0
  22. package/erDiagram-97139f44.cjs.js +1949 -0
  23. package/erDiagram-97139f44.esm.js +1947 -0
  24. package/flowDb-a4faf166.cjs.js +6918 -0
  25. package/flowDb-a4faf166.esm.js +6914 -0
  26. package/flowDiagram-ccbbb58d.cjs.js +999 -0
  27. package/flowDiagram-ccbbb58d.esm.js +997 -0
  28. package/flowDiagram-v2-79ccd6da.cjs.js +29 -0
  29. package/flowDiagram-v2-79ccd6da.esm.js +27 -0
  30. package/flowchart-elk-definition-7863a61f.cjs.js +48577 -0
  31. package/flowchart-elk-definition-7863a61f.esm.js +48575 -0
  32. package/ganttDiagram-3eff0dd8.cjs.js +3855 -0
  33. package/ganttDiagram-3eff0dd8.esm.js +3853 -0
  34. package/gitGraphDiagram-c3fe571f.cjs.js +3863 -0
  35. package/gitGraphDiagram-c3fe571f.esm.js +3861 -0
  36. package/index-d0b453e2.cjs.js +609 -0
  37. package/index-d0b453e2.esm.js +607 -0
  38. package/index.cjs.d.ts +1 -0
  39. package/index.cjs.js +17 -0
  40. package/index.cjs2.js +43619 -0
  41. package/index.d.ts +1 -0
  42. package/index.esm.js +1 -0
  43. package/index.esm2.js +43493 -0
  44. package/infoDiagram-9c10eab1.cjs.js +467 -0
  45. package/infoDiagram-9c10eab1.esm.js +465 -0
  46. package/init-f9637058.cjs.js +17 -0
  47. package/init-f9637058.esm.js +15 -0
  48. package/journeyDiagram-b6904cec.cjs.js +1292 -0
  49. package/journeyDiagram-b6904cec.esm.js +1290 -0
  50. package/layout-c5a37d74.cjs.js +2808 -0
  51. package/layout-c5a37d74.esm.js +2795 -0
  52. package/libs/engine/src/index.d.ts +2 -0
  53. package/libs/engine/src/lib/engine.d.ts +27 -0
  54. package/libs/engine/src/lib/pins-settings.interface.d.ts +20 -0
  55. package/libs/skill-web-chatbot/src/index.d.ts +3 -0
  56. package/libs/skill-web-chatbot/src/lib/chat.element.d.ts +23 -0
  57. package/libs/skill-web-chatbot/src/lib/common.data.d.ts +1 -0
  58. package/libs/skill-web-chatbot/src/lib/config.d.ts +9 -0
  59. package/libs/skill-web-chatbot/src/lib/digipair-full.data.d.ts +1 -0
  60. package/libs/skill-web-chatbot/src/lib/digipair-full.element.d.ts +32 -0
  61. package/libs/skill-web-chatbot/src/lib/digipair.data.d.ts +1 -0
  62. package/libs/skill-web-chatbot/src/lib/digipair.element.d.ts +39 -0
  63. package/libs/skill-web-chatbot/src/lib/inputs.element.d.ts +9 -0
  64. package/libs/skill-web-chatbot/src/lib/pins/chatbot.actions.d.ts +5 -0
  65. package/libs/skill-web-chatbot/src/lib/tools/css-selector.d.ts +1 -0
  66. package/line-ce5d1152.cjs.js +34 -0
  67. package/line-ce5d1152.esm.js +32 -0
  68. package/linear-db016d0c.cjs.js +485 -0
  69. package/linear-db016d0c.esm.js +479 -0
  70. package/mindmap-definition-a9d0f378.cjs.js +20225 -0
  71. package/mindmap-definition-a9d0f378.esm.js +20223 -0
  72. package/ordinal-5695958c.cjs.js +331 -0
  73. package/ordinal-5695958c.esm.js +329 -0
  74. package/package.json +8 -0
  75. package/pieDiagram-fd367f1f.cjs.js +1157 -0
  76. package/pieDiagram-fd367f1f.esm.js +1155 -0
  77. package/quadrantDiagram-1763608a.cjs.js +2633 -0
  78. package/quadrantDiagram-1763608a.esm.js +2631 -0
  79. package/requirementDiagram-779d93b3.cjs.js +2451 -0
  80. package/requirementDiagram-779d93b3.esm.js +2449 -0
  81. package/sankeyDiagram-86a66bae.cjs.js +1850 -0
  82. package/sankeyDiagram-86a66bae.esm.js +1848 -0
  83. package/sequenceDiagram-169f11ec.cjs.js +4805 -0
  84. package/sequenceDiagram-169f11ec.esm.js +4803 -0
  85. package/stateDiagram-6f4bb19d.cjs.js +282 -0
  86. package/stateDiagram-6f4bb19d.esm.js +280 -0
  87. package/stateDiagram-v2-d72c79bd.cjs.js +377 -0
  88. package/stateDiagram-v2-d72c79bd.esm.js +375 -0
  89. package/styles-3814544c.cjs.js +534 -0
  90. package/styles-3814544c.esm.js +524 -0
  91. package/styles-3fb7b9cf.cjs.js +2377 -0
  92. package/styles-3fb7b9cf.esm.js +2368 -0
  93. package/styles-659d7242.cjs.js +3919 -0
  94. package/styles-659d7242.esm.js +3915 -0
  95. package/svgDraw-af99a425.cjs.js +144 -0
  96. package/svgDraw-af99a425.esm.js +141 -0
  97. package/svgDrawCommon-ebe6c236.cjs.js +70 -0
  98. package/svgDrawCommon-ebe6c236.esm.js +62 -0
  99. package/timeline-definition-65183566.cjs.js +1394 -0
  100. package/timeline-definition-65183566.esm.js +1392 -0
@@ -0,0 +1,1450 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index.cjs2.js');
4
+ var createText94e3ebbf = require('./createText-94e3ebbf.cjs.js');
5
+ var svgDrawAf99a425 = require('./svgDraw-af99a425.cjs.js');
6
+ var lineCe5d1152 = require('./line-ce5d1152.cjs.js');
7
+
8
+ function _array_like_to_array(arr, len) {
9
+ if (len == null || len > arr.length) len = arr.length;
10
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
11
+ return arr2;
12
+ }
13
+ function _array_without_holes(arr) {
14
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
15
+ }
16
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
17
+ try {
18
+ var info = gen[key](arg);
19
+ var value = info.value;
20
+ } catch (error) {
21
+ reject(error);
22
+ return;
23
+ }
24
+ if (info.done) {
25
+ resolve(value);
26
+ } else {
27
+ Promise.resolve(value).then(_next, _throw);
28
+ }
29
+ }
30
+ function _async_to_generator(fn) {
31
+ return function() {
32
+ var self = this, args = arguments;
33
+ return new Promise(function(resolve, reject) {
34
+ var gen = fn.apply(self, args);
35
+ function _next(value) {
36
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
37
+ }
38
+ function _throw(err) {
39
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
40
+ }
41
+ _next(undefined);
42
+ });
43
+ };
44
+ }
45
+ function _iterable_to_array(iter) {
46
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
47
+ }
48
+ function _non_iterable_spread() {
49
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
50
+ }
51
+ function _to_consumable_array(arr) {
52
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
53
+ }
54
+ function _unsupported_iterable_to_array(o, minLen) {
55
+ if (!o) return;
56
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
57
+ var n = Object.prototype.toString.call(o).slice(8, -1);
58
+ if (n === "Object" && o.constructor) n = o.constructor.name;
59
+ if (n === "Map" || n === "Set") return Array.from(n);
60
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
61
+ }
62
+ function _ts_generator(thisArg, body) {
63
+ var f, y, t, g, _ = {
64
+ label: 0,
65
+ sent: function() {
66
+ if (t[0] & 1) throw t[1];
67
+ return t[1];
68
+ },
69
+ trys: [],
70
+ ops: []
71
+ };
72
+ return g = {
73
+ next: verb(0),
74
+ "throw": verb(1),
75
+ "return": verb(2)
76
+ }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
77
+ return this;
78
+ }), g;
79
+ function verb(n) {
80
+ return function(v) {
81
+ return step([
82
+ n,
83
+ v
84
+ ]);
85
+ };
86
+ }
87
+ function step(op) {
88
+ if (f) throw new TypeError("Generator is already executing.");
89
+ while(_)try {
90
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
91
+ if (y = 0, t) op = [
92
+ op[0] & 2,
93
+ t.value
94
+ ];
95
+ switch(op[0]){
96
+ case 0:
97
+ case 1:
98
+ t = op;
99
+ break;
100
+ case 4:
101
+ _.label++;
102
+ return {
103
+ value: op[1],
104
+ done: false
105
+ };
106
+ case 5:
107
+ _.label++;
108
+ y = op[1];
109
+ op = [
110
+ 0
111
+ ];
112
+ continue;
113
+ case 7:
114
+ op = _.ops.pop();
115
+ _.trys.pop();
116
+ continue;
117
+ default:
118
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
119
+ _ = 0;
120
+ continue;
121
+ }
122
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
123
+ _.label = op[1];
124
+ break;
125
+ }
126
+ if (op[0] === 6 && _.label < t[1]) {
127
+ _.label = t[1];
128
+ t = op;
129
+ break;
130
+ }
131
+ if (t && _.label < t[2]) {
132
+ _.label = t[2];
133
+ _.ops.push(op);
134
+ break;
135
+ }
136
+ if (t[2]) _.ops.pop();
137
+ _.trys.pop();
138
+ continue;
139
+ }
140
+ op = body.call(thisArg, _);
141
+ } catch (e) {
142
+ op = [
143
+ 6,
144
+ e
145
+ ];
146
+ y = 0;
147
+ } finally{
148
+ f = t = 0;
149
+ }
150
+ if (op[0] & 5) throw op[1];
151
+ return {
152
+ value: op[0] ? op[1] : void 0,
153
+ done: true
154
+ };
155
+ }
156
+ }
157
+ var st = function(r, t, e, n) {
158
+ t.forEach(function(a) {
159
+ yt[a](r, e, n);
160
+ });
161
+ }, it = function(r, t, e) {
162
+ index.S.trace("Making markers for ", e), r.append("defs").append("marker").attr("id", t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), r.append("defs").append("marker").attr("id", t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
163
+ }, nt = function(r, t) {
164
+ r.append("defs").append("marker").attr("id", t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), r.append("defs").append("marker").attr("id", t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
165
+ }, lt = function(r, t) {
166
+ r.append("defs").append("marker").attr("id", t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), r.append("defs").append("marker").attr("id", t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
167
+ }, ct = function(r, t) {
168
+ r.append("defs").append("marker").attr("id", t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), r.append("defs").append("marker").attr("id", t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
169
+ }, ht = function(r, t) {
170
+ r.append("defs").append("marker").attr("id", t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "white").attr("cx", 6).attr("cy", 7).attr("r", 6);
171
+ }, ot = function(r, t) {
172
+ r.append("marker").attr("id", t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 10).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), r.append("marker").attr("id", t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 0).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
173
+ }, ft = function(r, t) {
174
+ r.append("marker").attr("id", t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), r.append("marker").attr("id", t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
175
+ }, dt = function(r, t) {
176
+ r.append("marker").attr("id", t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), r.append("marker").attr("id", t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
177
+ }, pt = function(r, t) {
178
+ r.append("defs").append("marker").attr("id", t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
179
+ }, yt = {
180
+ extension: it,
181
+ composition: nt,
182
+ aggregation: lt,
183
+ dependency: ct,
184
+ lollipop: ht,
185
+ point: ot,
186
+ circle: ft,
187
+ cross: dt,
188
+ barb: pt
189
+ }, Kt = st;
190
+ function xt(r, t) {
191
+ t && r.attr("style", t);
192
+ }
193
+ function ut(r) {
194
+ var t = index.At(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), e = t.append("xhtml:div"), n = r.label, a = r.isNode ? "nodeLabel" : "edgeLabel";
195
+ return e.html('<span class="' + a + '" ' + (r.labelStyle ? 'style="' + r.labelStyle + '"' : "") + ">" + n + "</span>"), xt(e, r.labelStyle), e.style("display", "inline-block"), e.style("white-space", "nowrap"), e.attr("xmlns", "http://www.w3.org/1999/xhtml"), t.node();
196
+ }
197
+ var gt = function(r, t, e, n) {
198
+ var a = r || "";
199
+ if (typeof a == "object" && (a = a[0]), index.ia(index.Ut().flowchart.htmlLabels)) {
200
+ a = a.replace(/\\n|\n/g, "<br />"), index.S.info("vertexText" + a);
201
+ var s = {
202
+ isNode: n,
203
+ label: index.cx(a).replace(/fa[blrs]?:fa-[\w-]+/g, function(l) {
204
+ return "<i class='".concat(l.replace(":", " "), "'></i>");
205
+ }),
206
+ labelStyle: t.replace("fill:", "color:")
207
+ };
208
+ return ut(s);
209
+ } else {
210
+ var s1 = document.createElementNS("http://www.w3.org/2000/svg", "text");
211
+ s1.setAttribute("style", t.replace("color:", "fill:"));
212
+ var i = [];
213
+ typeof a == "string" ? i = a.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(a) ? i = a : i = [];
214
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
215
+ try {
216
+ for(var _iterator = i[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
217
+ var l = _step.value;
218
+ var c = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
219
+ c.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), c.setAttribute("dy", "1em"), c.setAttribute("x", "0"), e ? c.setAttribute("class", "title-row") : c.setAttribute("class", "row"), c.textContent = l.trim(), s1.appendChild(c);
220
+ }
221
+ } catch (err) {
222
+ _didIteratorError = true;
223
+ _iteratorError = err;
224
+ } finally{
225
+ try {
226
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
227
+ _iterator.return();
228
+ }
229
+ } finally{
230
+ if (_didIteratorError) {
231
+ throw _iteratorError;
232
+ }
233
+ }
234
+ }
235
+ return s1;
236
+ }
237
+ }, R = gt, B = function() {
238
+ var _ref = _async_to_generator(function(r, t, e, n) {
239
+ var a, s, i, l, c, o, h, f, x, d, p, y, g;
240
+ return _ts_generator(this, function(_state) {
241
+ switch(_state.label){
242
+ case 0:
243
+ s = t.useHtmlLabels || index.ia(index.Ut().flowchart.htmlLabels);
244
+ e ? a = e : a = "node default";
245
+ i = r.insert("g").attr("class", a).attr("id", t.domId || t.id), l = i.insert("g").attr("class", "label").attr("style", t.labelStyle);
246
+ t.labelText === void 0 ? c = "" : c = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
247
+ o = l.node();
248
+ t.labelType === "markdown" ? h = createText94e3ebbf.Rr(l, index.Je(index.cx(c), index.Ut()), {
249
+ useHtmlLabels: s,
250
+ width: t.width || index.Ut().flowchart.wrappingWidth,
251
+ classes: "markdown-node-label"
252
+ }) : h = o.appendChild(R(index.Je(index.cx(c), index.Ut()), t.labelStyle, !1, n));
253
+ f = h.getBBox();
254
+ x = t.padding / 2;
255
+ if (!index.ia(index.Ut().flowchart.htmlLabels)) return [
256
+ 3,
257
+ 3
258
+ ];
259
+ d = h.children[0], p = index.At(h), y = d.getElementsByTagName("img");
260
+ if (!y) return [
261
+ 3,
262
+ 2
263
+ ];
264
+ g = c.replace(/<img[^>]*>/g, "").trim() === "";
265
+ return [
266
+ 4,
267
+ Promise.all(_to_consumable_array(y).map(function(b) {
268
+ return new Promise(function(I) {
269
+ var T = function T() {
270
+ if (b.style.display = "flex", b.style.flexDirection = "column", g) {
271
+ var M = index.Ut().fontSize ? index.Ut().fontSize : window.getComputedStyle(document.body).fontSize, $ = 5;
272
+ b.style.width = parseInt(M, 10) * $ + "px";
273
+ } else b.style.width = "100%";
274
+ I(b);
275
+ };
276
+ setTimeout(function() {
277
+ b.complete && T();
278
+ }), b.addEventListener("error", T), b.addEventListener("load", T);
279
+ });
280
+ }))
281
+ ];
282
+ case 1:
283
+ _state.sent();
284
+ _state.label = 2;
285
+ case 2:
286
+ f = d.getBoundingClientRect(), p.attr("width", f.width), p.attr("height", f.height);
287
+ _state.label = 3;
288
+ case 3:
289
+ return [
290
+ 2,
291
+ (s ? l.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")") : l.attr("transform", "translate(0, " + -f.height / 2 + ")"), t.centerLabel && l.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), l.insert("rect", ":first-child"), {
292
+ shapeSvg: i,
293
+ bbox: f,
294
+ halfPadding: x,
295
+ label: l
296
+ })
297
+ ];
298
+ }
299
+ });
300
+ });
301
+ return function B(r, t, e, n) {
302
+ return _ref.apply(this, arguments);
303
+ };
304
+ }(), v = function(r, t) {
305
+ var e = t.node().getBBox();
306
+ r.width = e.width, r.height = e.height;
307
+ };
308
+ function _(r, t, e, n) {
309
+ return r.insert("polygon", ":first-child").attr("points", n.map(function(a) {
310
+ return a.x + "," + a.y;
311
+ }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + e / 2 + ")");
312
+ }
313
+ function bt(r, t) {
314
+ return r.intersect(t);
315
+ }
316
+ function tt(r, t, e, n) {
317
+ var a = r.x, s = r.y, i = a - n.x, l = s - n.y, c = Math.sqrt(t * t * l * l + e * e * i * i), o = Math.abs(t * e * i / c);
318
+ n.x < a && (o = -o);
319
+ var h = Math.abs(t * e * l / c);
320
+ return n.y < s && (h = -h), {
321
+ x: a + o,
322
+ y: s + h
323
+ };
324
+ }
325
+ function wt(r, t, e) {
326
+ return tt(r, t, t, e);
327
+ }
328
+ function mt(r, t, e, n) {
329
+ var a, s, i, l, c, o, h, f, x, d, p, y, g, b, I;
330
+ if (a = t.y - r.y, i = r.x - t.x, c = t.x * r.y - r.x * t.y, x = a * e.x + i * e.y + c, d = a * n.x + i * n.y + c, !(x !== 0 && d !== 0 && V(x, d)) && (s = n.y - e.y, l = e.x - n.x, o = n.x * e.y - e.x * n.y, h = s * r.x + l * r.y + o, f = s * t.x + l * t.y + o, !(h !== 0 && f !== 0 && V(h, f)) && (p = a * l - s * i, p !== 0))) return y = Math.abs(p / 2), g = i * o - l * c, b = g < 0 ? (g - y) / p : (g + y) / p, g = s * c - a * o, I = g < 0 ? (g - y) / p : (g + y) / p, {
331
+ x: b,
332
+ y: I
333
+ };
334
+ }
335
+ function V(r, t) {
336
+ return r * t > 0;
337
+ }
338
+ function kt(r, t, e) {
339
+ var n = r.x, a = r.y, s = [], i = Number.POSITIVE_INFINITY, l = Number.POSITIVE_INFINITY;
340
+ typeof t.forEach == "function" ? t.forEach(function(p) {
341
+ i = Math.min(i, p.x), l = Math.min(l, p.y);
342
+ }) : (i = Math.min(i, t.x), l = Math.min(l, t.y));
343
+ for(var c = n - r.width / 2 - i, o = a - r.height / 2 - l, h = 0; h < t.length; h++){
344
+ var f = t[h], x = t[h < t.length - 1 ? h + 1 : 0], d = mt(r, e, {
345
+ x: c + f.x,
346
+ y: o + f.y
347
+ }, {
348
+ x: c + x.x,
349
+ y: o + x.y
350
+ });
351
+ d && s.push(d);
352
+ }
353
+ return s.length ? (s.length > 1 && s.sort(function(p, y) {
354
+ var g = p.x - e.x, b = p.y - e.y, I = Math.sqrt(g * g + b * b), T = y.x - e.x, M = y.y - e.y, $ = Math.sqrt(T * T + M * M);
355
+ return I < $ ? -1 : I === $ ? 0 : 1;
356
+ }), s[0]) : r;
357
+ }
358
+ var Lt = function(r, t) {
359
+ var e = r.x, n = r.y, a = t.x - e, s = t.y - n, i = r.width / 2, l = r.height / 2, c, o;
360
+ return Math.abs(s) * i > Math.abs(a) * l ? (s < 0 && (l = -l), c = s === 0 ? 0 : l * a / s, o = l) : (a < 0 && (i = -i), c = i, o = a === 0 ? 0 : i * s / a), {
361
+ x: e + c,
362
+ y: n + o
363
+ };
364
+ }, vt = Lt, m = {
365
+ node: bt,
366
+ circle: wt,
367
+ ellipse: tt,
368
+ polygon: kt,
369
+ rect: vt
370
+ }, St = function() {
371
+ var _ref = _async_to_generator(function(r, t) {
372
+ var _ref, n, a, s, i;
373
+ return _ts_generator(this, function(_state) {
374
+ switch(_state.label){
375
+ case 0:
376
+ t.useHtmlLabels || index.Ut().flowchart.htmlLabels || (t.centerLabel = !0);
377
+ return [
378
+ 4,
379
+ B(r, t, "node " + t.classes, !0)
380
+ ];
381
+ case 1:
382
+ _ref = _state.sent(), n = _ref.shapeSvg, a = _ref.bbox, s = _ref.halfPadding;
383
+ index.S.info("Classes = ", t.classes);
384
+ i = n.insert("rect", ":first-child");
385
+ return [
386
+ 2,
387
+ (i.attr("rx", t.rx).attr("ry", t.ry).attr("x", -a.width / 2 - s).attr("y", -a.height / 2 - s).attr("width", a.width + t.padding).attr("height", a.height + t.padding), v(t, i), t.intersect = function(l) {
388
+ return m.rect(t, l);
389
+ }, n)
390
+ ];
391
+ }
392
+ });
393
+ });
394
+ return function St(r, t) {
395
+ return _ref.apply(this, arguments);
396
+ };
397
+ }(), Et = St, q = function() {
398
+ var _ref = _async_to_generator(function(r, t) {
399
+ var _ref, e, n, a, s, i, l, c;
400
+ return _ts_generator(this, function(_state) {
401
+ switch(_state.label){
402
+ case 0:
403
+ return [
404
+ 4,
405
+ B(r, t, void 0, !0)
406
+ ];
407
+ case 1:
408
+ _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = a + s, l = [
409
+ {
410
+ x: i / 2,
411
+ y: 0
412
+ },
413
+ {
414
+ x: i,
415
+ y: -i / 2
416
+ },
417
+ {
418
+ x: i / 2,
419
+ y: -i
420
+ },
421
+ {
422
+ x: 0,
423
+ y: -i / 2
424
+ }
425
+ ];
426
+ index.S.info("Question main (Circle)");
427
+ c = _(e, i, i, l);
428
+ return [
429
+ 2,
430
+ (c.attr("style", t.style), v(t, c), t.intersect = function(o) {
431
+ return index.S.warn("Intersect called"), m.polygon(t, l, o);
432
+ }, e)
433
+ ];
434
+ }
435
+ });
436
+ });
437
+ return function q(r, t) {
438
+ return _ref.apply(this, arguments);
439
+ };
440
+ }(), Bt = function(r, t) {
441
+ var e = r.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = 28, a = [
442
+ {
443
+ x: 0,
444
+ y: n / 2
445
+ },
446
+ {
447
+ x: n / 2,
448
+ y: 0
449
+ },
450
+ {
451
+ x: 0,
452
+ y: -n / 2
453
+ },
454
+ {
455
+ x: -n / 2,
456
+ y: 0
457
+ }
458
+ ];
459
+ return e.insert("polygon", ":first-child").attr("points", a.map(function(i) {
460
+ return i.x + "," + i.y;
461
+ }).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function Bt(i) {
462
+ return m.circle(t, 14, i);
463
+ }, e;
464
+ }, Mt = function() {
465
+ var _ref = _async_to_generator(function(r, t) {
466
+ var _ref, e, n, a, s, i, l, c, o;
467
+ return _ts_generator(this, function(_state) {
468
+ switch(_state.label){
469
+ case 0:
470
+ return [
471
+ 4,
472
+ B(r, t, void 0, !0)
473
+ ];
474
+ case 1:
475
+ _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = 4, s = n.height + t.padding, i = s / a, l = n.width + 2 * i + t.padding, c = [
476
+ {
477
+ x: i,
478
+ y: 0
479
+ },
480
+ {
481
+ x: l - i,
482
+ y: 0
483
+ },
484
+ {
485
+ x: l,
486
+ y: -s / 2
487
+ },
488
+ {
489
+ x: l - i,
490
+ y: -s
491
+ },
492
+ {
493
+ x: i,
494
+ y: -s
495
+ },
496
+ {
497
+ x: 0,
498
+ y: -s / 2
499
+ }
500
+ ], o = _(e, l, s, c);
501
+ return [
502
+ 2,
503
+ (o.attr("style", t.style), v(t, o), t.intersect = function(h) {
504
+ return m.polygon(t, c, h);
505
+ }, e)
506
+ ];
507
+ }
508
+ });
509
+ });
510
+ return function Mt(r, t) {
511
+ return _ref.apply(this, arguments);
512
+ };
513
+ }(), Ct = function() {
514
+ var _ref = _async_to_generator(function(r, t) {
515
+ var _ref, e, n, a, s, i;
516
+ return _ts_generator(this, function(_state) {
517
+ switch(_state.label){
518
+ case 0:
519
+ return [
520
+ 4,
521
+ B(r, t, void 0, !0)
522
+ ];
523
+ case 1:
524
+ _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = [
525
+ {
526
+ x: -s / 2,
527
+ y: 0
528
+ },
529
+ {
530
+ x: a,
531
+ y: 0
532
+ },
533
+ {
534
+ x: a,
535
+ y: -s
536
+ },
537
+ {
538
+ x: -s / 2,
539
+ y: -s
540
+ },
541
+ {
542
+ x: 0,
543
+ y: -s / 2
544
+ }
545
+ ];
546
+ return [
547
+ 2,
548
+ (_(e, a, s, i).attr("style", t.style), t.width = a + s, t.height = s, t.intersect = function(c) {
549
+ return m.polygon(t, i, c);
550
+ }, e)
551
+ ];
552
+ }
553
+ });
554
+ });
555
+ return function Ct(r, t) {
556
+ return _ref.apply(this, arguments);
557
+ };
558
+ }(), Tt = function() {
559
+ var _ref = _async_to_generator(function(r, t) {
560
+ var _ref, e, n, a, s, i, l;
561
+ return _ts_generator(this, function(_state) {
562
+ switch(_state.label){
563
+ case 0:
564
+ return [
565
+ 4,
566
+ B(r, t, void 0, !0)
567
+ ];
568
+ case 1:
569
+ _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = [
570
+ {
571
+ x: -2 * s / 6,
572
+ y: 0
573
+ },
574
+ {
575
+ x: a - s / 6,
576
+ y: 0
577
+ },
578
+ {
579
+ x: a + 2 * s / 6,
580
+ y: -s
581
+ },
582
+ {
583
+ x: s / 6,
584
+ y: -s
585
+ }
586
+ ], l = _(e, a, s, i);
587
+ return [
588
+ 2,
589
+ (l.attr("style", t.style), v(t, l), t.intersect = function(c) {
590
+ return m.polygon(t, i, c);
591
+ }, e)
592
+ ];
593
+ }
594
+ });
595
+ });
596
+ return function Tt(r, t) {
597
+ return _ref.apply(this, arguments);
598
+ };
599
+ }(), Rt = function() {
600
+ var _ref = _async_to_generator(function(r, t) {
601
+ var _ref, e, n, a, s, i, l;
602
+ return _ts_generator(this, function(_state) {
603
+ switch(_state.label){
604
+ case 0:
605
+ return [
606
+ 4,
607
+ B(r, t, void 0, !0)
608
+ ];
609
+ case 1:
610
+ _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = [
611
+ {
612
+ x: 2 * s / 6,
613
+ y: 0
614
+ },
615
+ {
616
+ x: a + s / 6,
617
+ y: 0
618
+ },
619
+ {
620
+ x: a - 2 * s / 6,
621
+ y: -s
622
+ },
623
+ {
624
+ x: -s / 6,
625
+ y: -s
626
+ }
627
+ ], l = _(e, a, s, i);
628
+ return [
629
+ 2,
630
+ (l.attr("style", t.style), v(t, l), t.intersect = function(c) {
631
+ return m.polygon(t, i, c);
632
+ }, e)
633
+ ];
634
+ }
635
+ });
636
+ });
637
+ return function Rt(r, t) {
638
+ return _ref.apply(this, arguments);
639
+ };
640
+ }(), It = function() {
641
+ var _ref = _async_to_generator(function(r, t) {
642
+ var _ref, e, n, a, s, i, l;
643
+ return _ts_generator(this, function(_state) {
644
+ switch(_state.label){
645
+ case 0:
646
+ return [
647
+ 4,
648
+ B(r, t, void 0, !0)
649
+ ];
650
+ case 1:
651
+ _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = [
652
+ {
653
+ x: -2 * s / 6,
654
+ y: 0
655
+ },
656
+ {
657
+ x: a + 2 * s / 6,
658
+ y: 0
659
+ },
660
+ {
661
+ x: a - s / 6,
662
+ y: -s
663
+ },
664
+ {
665
+ x: s / 6,
666
+ y: -s
667
+ }
668
+ ], l = _(e, a, s, i);
669
+ return [
670
+ 2,
671
+ (l.attr("style", t.style), v(t, l), t.intersect = function(c) {
672
+ return m.polygon(t, i, c);
673
+ }, e)
674
+ ];
675
+ }
676
+ });
677
+ });
678
+ return function It(r, t) {
679
+ return _ref.apply(this, arguments);
680
+ };
681
+ }(), Ht = function() {
682
+ var _ref = _async_to_generator(function(r, t) {
683
+ var _ref, e, n, a, s, i, l;
684
+ return _ts_generator(this, function(_state) {
685
+ switch(_state.label){
686
+ case 0:
687
+ return [
688
+ 4,
689
+ B(r, t, void 0, !0)
690
+ ];
691
+ case 1:
692
+ _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = [
693
+ {
694
+ x: s / 6,
695
+ y: 0
696
+ },
697
+ {
698
+ x: a - s / 6,
699
+ y: 0
700
+ },
701
+ {
702
+ x: a + 2 * s / 6,
703
+ y: -s
704
+ },
705
+ {
706
+ x: -2 * s / 6,
707
+ y: -s
708
+ }
709
+ ], l = _(e, a, s, i);
710
+ return [
711
+ 2,
712
+ (l.attr("style", t.style), v(t, l), t.intersect = function(c) {
713
+ return m.polygon(t, i, c);
714
+ }, e)
715
+ ];
716
+ }
717
+ });
718
+ });
719
+ return function Ht(r, t) {
720
+ return _ref.apply(this, arguments);
721
+ };
722
+ }(), Nt = function() {
723
+ var _ref = _async_to_generator(function(r, t) {
724
+ var _ref, e, n, a, s, i, l;
725
+ return _ts_generator(this, function(_state) {
726
+ switch(_state.label){
727
+ case 0:
728
+ return [
729
+ 4,
730
+ B(r, t, void 0, !0)
731
+ ];
732
+ case 1:
733
+ _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = [
734
+ {
735
+ x: 0,
736
+ y: 0
737
+ },
738
+ {
739
+ x: a + s / 2,
740
+ y: 0
741
+ },
742
+ {
743
+ x: a,
744
+ y: -s / 2
745
+ },
746
+ {
747
+ x: a + s / 2,
748
+ y: -s
749
+ },
750
+ {
751
+ x: 0,
752
+ y: -s
753
+ }
754
+ ], l = _(e, a, s, i);
755
+ return [
756
+ 2,
757
+ (l.attr("style", t.style), v(t, l), t.intersect = function(c) {
758
+ return m.polygon(t, i, c);
759
+ }, e)
760
+ ];
761
+ }
762
+ });
763
+ });
764
+ return function Nt(r, t) {
765
+ return _ref.apply(this, arguments);
766
+ };
767
+ }(), _t = function() {
768
+ var _ref = _async_to_generator(function(r, t) {
769
+ var _ref, e, n, a, s, i, l, c, o;
770
+ return _ts_generator(this, function(_state) {
771
+ switch(_state.label){
772
+ case 0:
773
+ return [
774
+ 4,
775
+ B(r, t, void 0, !0)
776
+ ];
777
+ case 1:
778
+ _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = a / 2, i = s / (2.5 + a / 50), l = n.height + i + t.padding, c = "M 0," + i + " a " + s + "," + i + " 0,0,0 " + a + " 0 a " + s + "," + i + " 0,0,0 " + -a + " 0 l 0," + l + " a " + s + "," + i + " 0,0,0 " + a + " 0 l 0," + -l, o = e.attr("label-offset-y", i).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -a / 2 + "," + -(l / 2 + i) + ")");
779
+ return [
780
+ 2,
781
+ (v(t, o), t.intersect = function(h) {
782
+ var f = m.rect(t, h), x = f.x - t.x;
783
+ if (s != 0 && (Math.abs(x) < t.width / 2 || Math.abs(x) == t.width / 2 && Math.abs(f.y - t.y) > t.height / 2 - i)) {
784
+ var d = i * i * (1 - x * x / (s * s));
785
+ d != 0 && (d = Math.sqrt(d)), d = i - d, h.y - t.y > 0 && (d = -d), f.y += d;
786
+ }
787
+ return f;
788
+ }, e)
789
+ ];
790
+ }
791
+ });
792
+ });
793
+ return function _t(r, t) {
794
+ return _ref.apply(this, arguments);
795
+ };
796
+ }(), $t = function() {
797
+ var _ref = _async_to_generator(function(r, t) {
798
+ var _ref, e, n, a, s, i, l, c;
799
+ return _ts_generator(this, function(_state) {
800
+ switch(_state.label){
801
+ case 0:
802
+ return [
803
+ 4,
804
+ B(r, t, "node " + t.classes, !0)
805
+ ];
806
+ case 1:
807
+ _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = _ref.halfPadding, s = e.insert("rect", ":first-child"), i = n.width + t.padding, l = n.height + t.padding;
808
+ if (s.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", -n.width / 2 - a).attr("y", -n.height / 2 - a).attr("width", i).attr("height", l), t.props) {
809
+ c = new Set(Object.keys(t.props));
810
+ t.props.borders && (rt(s, t.props.borders, i, l), c.delete("borders")), c.forEach(function(o) {
811
+ index.S.warn("Unknown node property ".concat(o));
812
+ });
813
+ }
814
+ return [
815
+ 2,
816
+ (v(t, s), t.intersect = function(c) {
817
+ return m.rect(t, c);
818
+ }, e)
819
+ ];
820
+ }
821
+ });
822
+ });
823
+ return function $t(r, t) {
824
+ return _ref.apply(this, arguments);
825
+ };
826
+ }(), Wt = function() {
827
+ var _ref = _async_to_generator(function(r, t) {
828
+ var _ref, e, n, a, s, i;
829
+ return _ts_generator(this, function(_state) {
830
+ switch(_state.label){
831
+ case 0:
832
+ return [
833
+ 4,
834
+ B(r, t, "label", !0)
835
+ ];
836
+ case 1:
837
+ _ref = _state.sent(), e = _ref.shapeSvg;
838
+ index.S.trace("Classes = ", t.classes);
839
+ n = e.insert("rect", ":first-child"), a = 0, s = 0;
840
+ if (n.attr("width", a).attr("height", s), e.attr("class", "label edgeLabel"), t.props) {
841
+ i = new Set(Object.keys(t.props));
842
+ t.props.borders && (rt(n, t.props.borders, a, s), i.delete("borders")), i.forEach(function(l) {
843
+ index.S.warn("Unknown node property ".concat(l));
844
+ });
845
+ }
846
+ return [
847
+ 2,
848
+ (v(t, n), t.intersect = function(i) {
849
+ return m.rect(t, i);
850
+ }, e)
851
+ ];
852
+ }
853
+ });
854
+ });
855
+ return function Wt(r, t) {
856
+ return _ref.apply(this, arguments);
857
+ };
858
+ }();
859
+ function rt(r, t, e, n) {
860
+ var a = [], s = function(l) {
861
+ a.push(l, 0);
862
+ }, i = function(l) {
863
+ a.push(0, l);
864
+ };
865
+ t.includes("t") ? (index.S.debug("add top border"), s(e)) : i(e), t.includes("r") ? (index.S.debug("add right border"), s(n)) : i(n), t.includes("b") ? (index.S.debug("add bottom border"), s(e)) : i(e), t.includes("l") ? (index.S.debug("add left border"), s(n)) : i(n), r.attr("stroke-dasharray", a.join(" "));
866
+ }
867
+ var Xt = function(r, t) {
868
+ var e;
869
+ t.classes ? e = "node " + t.classes : e = "node default";
870
+ var n = r.insert("g").attr("class", e).attr("id", t.domId || t.id), a = n.insert("rect", ":first-child"), s = n.insert("line"), i = n.insert("g").attr("class", "label"), l = t.labelText.flat ? t.labelText.flat() : t.labelText;
871
+ var c = "";
872
+ typeof l == "object" ? c = l[0] : c = l, index.S.info("Label text abc79", c, l, typeof l == "object");
873
+ var o = i.node().appendChild(R(c, t.labelStyle, !0, !0));
874
+ var h = {
875
+ width: 0,
876
+ height: 0
877
+ };
878
+ if (index.ia(index.Ut().flowchart.htmlLabels)) {
879
+ var y = o.children[0], g = index.At(o);
880
+ h = y.getBoundingClientRect(), g.attr("width", h.width), g.attr("height", h.height);
881
+ }
882
+ index.S.info("Text 2", l);
883
+ var f = l.slice(1, l.length);
884
+ var x = o.getBBox();
885
+ var d = i.node().appendChild(R(f.join ? f.join("<br/>") : f, t.labelStyle, !0, !0));
886
+ if (index.ia(index.Ut().flowchart.htmlLabels)) {
887
+ var y1 = d.children[0], g1 = index.At(d);
888
+ h = y1.getBoundingClientRect(), g1.attr("width", h.width), g1.attr("height", h.height);
889
+ }
890
+ var p = t.padding / 2;
891
+ return index.At(d).attr("transform", "translate( " + // (titleBox.width - bbox.width) / 2 +
892
+ (h.width > x.width ? 0 : (x.width - h.width) / 2) + ", " + (x.height + p + 5) + ")"), index.At(o).attr("transform", "translate( " + // (titleBox.width - bbox.width) / 2 +
893
+ (h.width < x.width ? 0 : -(x.width - h.width) / 2) + ", 0)"), h = i.node().getBBox(), i.attr("transform", "translate(" + -h.width / 2 + ", " + (-h.height / 2 - p + 3) + ")"), a.attr("class", "outer title-state").attr("x", -h.width / 2 - p).attr("y", -h.height / 2 - p).attr("width", h.width + t.padding).attr("height", h.height + t.padding), s.attr("class", "divider").attr("x1", -h.width / 2 - p).attr("x2", h.width / 2 + p).attr("y1", -h.height / 2 - p + x.height + p).attr("y2", -h.height / 2 - p + x.height + p), v(t, a), t.intersect = function Xt(y) {
894
+ return m.rect(t, y);
895
+ }, n;
896
+ }, Yt = function() {
897
+ var _ref = _async_to_generator(function(r, t) {
898
+ var _ref, e, n, a, s, i;
899
+ return _ts_generator(this, function(_state) {
900
+ switch(_state.label){
901
+ case 0:
902
+ return [
903
+ 4,
904
+ B(r, t, void 0, !0)
905
+ ];
906
+ case 1:
907
+ _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.height + t.padding, s = n.width + a / 4 + t.padding, i = e.insert("rect", ":first-child").attr("style", t.style).attr("rx", a / 2).attr("ry", a / 2).attr("x", -s / 2).attr("y", -a / 2).attr("width", s).attr("height", a);
908
+ return [
909
+ 2,
910
+ (v(t, i), t.intersect = function(l) {
911
+ return m.rect(t, l);
912
+ }, e)
913
+ ];
914
+ }
915
+ });
916
+ });
917
+ return function Yt(r, t) {
918
+ return _ref.apply(this, arguments);
919
+ };
920
+ }(), Ut = function() {
921
+ var _ref = _async_to_generator(function(r, t) {
922
+ var _ref, e, n, a, s;
923
+ return _ts_generator(this, function(_state) {
924
+ switch(_state.label){
925
+ case 0:
926
+ return [
927
+ 4,
928
+ B(r, t, void 0, !0)
929
+ ];
930
+ case 1:
931
+ _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = _ref.halfPadding, s = e.insert("circle", ":first-child");
932
+ return [
933
+ 2,
934
+ (s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + a).attr("width", n.width + t.padding).attr("height", n.height + t.padding), index.S.info("Circle main"), v(t, s), t.intersect = function(i) {
935
+ return index.S.info("Circle intersect", t, n.width / 2 + a, i), m.circle(t, n.width / 2 + a, i);
936
+ }, e)
937
+ ];
938
+ }
939
+ });
940
+ });
941
+ return function Ut(r, t) {
942
+ return _ref.apply(this, arguments);
943
+ };
944
+ }(), jt = function() {
945
+ var _ref = _async_to_generator(function(r, t) {
946
+ var _ref, e, n, a, s, i, l, c;
947
+ return _ts_generator(this, function(_state) {
948
+ switch(_state.label){
949
+ case 0:
950
+ return [
951
+ 4,
952
+ B(r, t, void 0, !0)
953
+ ];
954
+ case 1:
955
+ _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = _ref.halfPadding, s = 5, i = e.insert("g", ":first-child"), l = i.insert("circle"), c = i.insert("circle");
956
+ return [
957
+ 2,
958
+ (i.attr("class", t.class), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + a + s).attr("width", n.width + t.padding + s * 2).attr("height", n.height + t.padding + s * 2), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + a).attr("width", n.width + t.padding).attr("height", n.height + t.padding), index.S.info("DoubleCircle main"), v(t, l), t.intersect = function(o) {
959
+ return index.S.info("DoubleCircle intersect", t, n.width / 2 + a + s, o), m.circle(t, n.width / 2 + a + s, o);
960
+ }, e)
961
+ ];
962
+ }
963
+ });
964
+ });
965
+ return function jt(r, t) {
966
+ return _ref.apply(this, arguments);
967
+ };
968
+ }(), At = function() {
969
+ var _ref = _async_to_generator(function(r, t) {
970
+ var _ref, e, n, a, s, i, l;
971
+ return _ts_generator(this, function(_state) {
972
+ switch(_state.label){
973
+ case 0:
974
+ return [
975
+ 4,
976
+ B(r, t, void 0, !0)
977
+ ];
978
+ case 1:
979
+ _ref = _state.sent(), e = _ref.shapeSvg, n = _ref.bbox, a = n.width + t.padding, s = n.height + t.padding, i = [
980
+ {
981
+ x: 0,
982
+ y: 0
983
+ },
984
+ {
985
+ x: a,
986
+ y: 0
987
+ },
988
+ {
989
+ x: a,
990
+ y: -s
991
+ },
992
+ {
993
+ x: 0,
994
+ y: -s
995
+ },
996
+ {
997
+ x: 0,
998
+ y: 0
999
+ },
1000
+ {
1001
+ x: -8,
1002
+ y: 0
1003
+ },
1004
+ {
1005
+ x: a + 8,
1006
+ y: 0
1007
+ },
1008
+ {
1009
+ x: a + 8,
1010
+ y: -s
1011
+ },
1012
+ {
1013
+ x: -8,
1014
+ y: -s
1015
+ },
1016
+ {
1017
+ x: -8,
1018
+ y: 0
1019
+ }
1020
+ ], l = _(e, a, s, i);
1021
+ return [
1022
+ 2,
1023
+ (l.attr("style", t.style), v(t, l), t.intersect = function(c) {
1024
+ return m.polygon(t, i, c);
1025
+ }, e)
1026
+ ];
1027
+ }
1028
+ });
1029
+ });
1030
+ return function At(r, t) {
1031
+ return _ref.apply(this, arguments);
1032
+ };
1033
+ }(), Dt = function(r, t) {
1034
+ var e = r.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = e.insert("circle", ":first-child");
1035
+ return n.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), v(t, n), t.intersect = function Dt(a) {
1036
+ return m.circle(t, 7, a);
1037
+ }, e;
1038
+ }, J = function(r, t, e) {
1039
+ var n = r.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
1040
+ var a = 70, s = 10;
1041
+ e === "LR" && (a = 10, s = 70);
1042
+ var i = n.append("rect").attr("x", -1 * a / 2).attr("y", -1 * s / 2).attr("width", a).attr("height", s).attr("class", "fork-join");
1043
+ return v(t, i), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function J(l) {
1044
+ return m.rect(t, l);
1045
+ }, n;
1046
+ }, Ot = function(r, t) {
1047
+ var e = r.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = e.insert("circle", ":first-child"), a = e.insert("circle", ":first-child");
1048
+ return a.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), n.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), v(t, a), t.intersect = function Ot(s) {
1049
+ return m.circle(t, 7, s);
1050
+ }, e;
1051
+ }, zt = function(r, t) {
1052
+ var e = t.padding / 2, n = 4, a = 8;
1053
+ var s;
1054
+ t.classes ? s = "node " + t.classes : s = "node default";
1055
+ var i = r.insert("g").attr("class", s).attr("id", t.domId || t.id), l = i.insert("rect", ":first-child"), c = i.insert("line"), o = i.insert("line");
1056
+ var h = 0, f = n;
1057
+ var x = i.insert("g").attr("class", "label");
1058
+ var d = 0;
1059
+ var p = t.classData.annotations && t.classData.annotations[0], y = t.classData.annotations[0] ? "\xab" + t.classData.annotations[0] + "\xbb" : "", g = x.node().appendChild(R(y, t.labelStyle, !0, !0));
1060
+ var b = g.getBBox();
1061
+ if (index.ia(index.Ut().flowchart.htmlLabels)) {
1062
+ var k = g.children[0], L = index.At(g);
1063
+ b = k.getBoundingClientRect(), L.attr("width", b.width), L.attr("height", b.height);
1064
+ }
1065
+ t.classData.annotations[0] && (f += b.height + n, h += b.width);
1066
+ var I = t.classData.label;
1067
+ t.classData.type !== void 0 && t.classData.type !== "" && (index.Ut().flowchart.htmlLabels ? I += "&lt;" + t.classData.type + "&gt;" : I += "<" + t.classData.type + ">");
1068
+ var T = x.node().appendChild(R(I, t.labelStyle, !0, !0));
1069
+ index.At(T).attr("class", "classTitle");
1070
+ var M = T.getBBox();
1071
+ if (index.ia(index.Ut().flowchart.htmlLabels)) {
1072
+ var k1 = T.children[0], L1 = index.At(T);
1073
+ M = k1.getBoundingClientRect(), L1.attr("width", M.width), L1.attr("height", M.height);
1074
+ }
1075
+ f += M.height + n, M.width > h && (h = M.width);
1076
+ var $ = [];
1077
+ t.classData.members.forEach(function(k) {
1078
+ var L = svgDrawAf99a425.M(k);
1079
+ var W = L.displayText;
1080
+ index.Ut().flowchart.htmlLabels && (W = W.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
1081
+ var N = x.node().appendChild(R(W, L.cssStyle ? L.cssStyle : t.labelStyle, !0, !0));
1082
+ var C = N.getBBox();
1083
+ if (index.ia(index.Ut().flowchart.htmlLabels)) {
1084
+ var D = N.children[0], Y = index.At(N);
1085
+ C = D.getBoundingClientRect(), Y.attr("width", C.width), Y.attr("height", C.height);
1086
+ }
1087
+ C.width > h && (h = C.width), f += C.height + n, $.push(N);
1088
+ }), f += a;
1089
+ var z = [];
1090
+ if (t.classData.methods.forEach(function(k) {
1091
+ var L = svgDrawAf99a425.M(k);
1092
+ var W = L.displayText;
1093
+ index.Ut().flowchart.htmlLabels && (W = W.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
1094
+ var N = x.node().appendChild(R(W, L.cssStyle ? L.cssStyle : t.labelStyle, !0, !0));
1095
+ var C = N.getBBox();
1096
+ if (index.ia(index.Ut().flowchart.htmlLabels)) {
1097
+ var D = N.children[0], Y = index.At(N);
1098
+ C = D.getBoundingClientRect(), Y.attr("width", C.width), Y.attr("height", C.height);
1099
+ }
1100
+ C.width > h && (h = C.width), f += C.height + n, z.push(N);
1101
+ }), f += a, p) {
1102
+ var k2 = (h - b.width) / 2;
1103
+ index.At(g).attr("transform", "translate( " + (-1 * h / 2 + k2) + ", " + -1 * f / 2 + ")"), d = b.height + n;
1104
+ }
1105
+ var at = (h - M.width) / 2;
1106
+ return index.At(T).attr("transform", "translate( " + (-1 * h / 2 + at) + ", " + (-1 * f / 2 + d) + ")"), d += M.height + n, c.attr("class", "divider").attr("x1", -h / 2 - e).attr("x2", h / 2 + e).attr("y1", -f / 2 - e + a + d).attr("y2", -f / 2 - e + a + d), d += a, $.forEach(function(k) {
1107
+ index.At(k).attr("transform", "translate( " + -h / 2 + ", " + (-1 * f / 2 + d + a / 2) + ")");
1108
+ var L = k == null ? void 0 : k.getBBox();
1109
+ var _ref;
1110
+ d += ((_ref = L == null ? void 0 : L.height) !== null && _ref !== void 0 ? _ref : 0) + n;
1111
+ }), d += a, o.attr("class", "divider").attr("x1", -h / 2 - e).attr("x2", h / 2 + e).attr("y1", -f / 2 - e + a + d).attr("y2", -f / 2 - e + a + d), d += a, z.forEach(function(k) {
1112
+ index.At(k).attr("transform", "translate( " + -h / 2 + ", " + (-1 * f / 2 + d) + ")");
1113
+ var L = k == null ? void 0 : k.getBBox();
1114
+ var _ref;
1115
+ d += ((_ref = L == null ? void 0 : L.height) !== null && _ref !== void 0 ? _ref : 0) + n;
1116
+ }), l.attr("class", "outer title-state").attr("x", -h / 2 - e).attr("y", -(f / 2) - e).attr("width", h + t.padding).attr("height", f + t.padding), v(t, l), t.intersect = function zt(k) {
1117
+ return m.rect(t, k);
1118
+ }, i;
1119
+ }, K = {
1120
+ rhombus: q,
1121
+ question: q,
1122
+ rect: $t,
1123
+ labelRect: Wt,
1124
+ rectWithTitle: Xt,
1125
+ choice: Bt,
1126
+ circle: Ut,
1127
+ doublecircle: jt,
1128
+ stadium: Yt,
1129
+ hexagon: Mt,
1130
+ rect_left_inv_arrow: Ct,
1131
+ lean_right: Tt,
1132
+ lean_left: Rt,
1133
+ trapezoid: It,
1134
+ inv_trapezoid: Ht,
1135
+ rect_right_inv_arrow: Nt,
1136
+ cylinder: _t,
1137
+ start: Dt,
1138
+ end: Ot,
1139
+ note: Et,
1140
+ subroutine: At,
1141
+ fork: J,
1142
+ join: J,
1143
+ class_box: zt
1144
+ };
1145
+ var X = {};
1146
+ var Gt = function() {
1147
+ var _ref = _async_to_generator(function(r, t, e) {
1148
+ var n, a, s;
1149
+ return _ts_generator(this, function(_state) {
1150
+ switch(_state.label){
1151
+ case 0:
1152
+ if (!t.link) return [
1153
+ 3,
1154
+ 2
1155
+ ];
1156
+ index.Ut().securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), n = r.insert("svg:a").attr("xlink:href", t.link).attr("target", s);
1157
+ return [
1158
+ 4,
1159
+ K[t.shape](n, t, e)
1160
+ ];
1161
+ case 1:
1162
+ a = _state.sent();
1163
+ return [
1164
+ 3,
1165
+ 4
1166
+ ];
1167
+ case 2:
1168
+ return [
1169
+ 4,
1170
+ K[t.shape](r, t, e)
1171
+ ];
1172
+ case 3:
1173
+ a = _state.sent(), n = a;
1174
+ _state.label = 4;
1175
+ case 4:
1176
+ return [
1177
+ 2,
1178
+ (t.tooltip && a.attr("title", t.tooltip), t.class && a.attr("class", "node default " + t.class), X[t.id] = n, t.haveCallback && X[t.id].attr("class", X[t.id].attr("class") + " clickable"), n)
1179
+ ];
1180
+ }
1181
+ });
1182
+ });
1183
+ return function Gt(r, t, e) {
1184
+ return _ref.apply(this, arguments);
1185
+ };
1186
+ }(), Pt = function(r, t) {
1187
+ X[t.id] = r;
1188
+ }, tr = function() {
1189
+ X = {};
1190
+ }, rr = function(r) {
1191
+ var t = X[r.id];
1192
+ index.S.trace("Transforming node", r.diff, r, "translate(" + (r.x - r.width / 2 - 5) + ", " + r.width / 2 + ")");
1193
+ var e = 8, n = r.diff || 0;
1194
+ return r.clusterNode ? t.attr("transform", "translate(" + (r.x + n - r.width / 2) + ", " + (r.y - r.height / 2 - e) + ")") : t.attr("transform", "translate(" + r.x + ", " + r.y + ")"), n;
1195
+ };
1196
+ var A = {}, S = {};
1197
+ var ar = function() {
1198
+ A = {}, S = {};
1199
+ }, er = function(r, t) {
1200
+ var e = index.ia(index.Ut().flowchart.htmlLabels), n = t.labelType === "markdown" ? createText94e3ebbf.Rr(r, t.label, {
1201
+ style: t.labelStyle,
1202
+ useHtmlLabels: e,
1203
+ addSvgBackground: !0
1204
+ }) : R(t.label, t.labelStyle);
1205
+ index.S.info("abc82", t, t.labelType);
1206
+ var a = r.insert("g").attr("class", "edgeLabel"), s = a.insert("g").attr("class", "label");
1207
+ s.node().appendChild(n);
1208
+ var i = n.getBBox();
1209
+ if (e) {
1210
+ var c = n.children[0], o = index.At(n);
1211
+ i = c.getBoundingClientRect(), o.attr("width", i.width), o.attr("height", i.height);
1212
+ }
1213
+ s.attr("transform", "translate(" + -i.width / 2 + ", " + -i.height / 2 + ")"), A[t.id] = a, t.width = i.width, t.height = i.height;
1214
+ var l;
1215
+ if (t.startLabelLeft) {
1216
+ var c1 = R(t.startLabelLeft, t.labelStyle), o1 = r.insert("g").attr("class", "edgeTerminals"), h = o1.insert("g").attr("class", "inner");
1217
+ l = h.node().appendChild(c1);
1218
+ var f = c1.getBBox();
1219
+ h.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), S[t.id] || (S[t.id] = {}), S[t.id].startLeft = o1, j(l, t.startLabelLeft);
1220
+ }
1221
+ if (t.startLabelRight) {
1222
+ var c2 = R(t.startLabelRight, t.labelStyle), o2 = r.insert("g").attr("class", "edgeTerminals"), h1 = o2.insert("g").attr("class", "inner");
1223
+ l = o2.node().appendChild(c2), h1.node().appendChild(c2);
1224
+ var f1 = c2.getBBox();
1225
+ h1.attr("transform", "translate(" + -f1.width / 2 + ", " + -f1.height / 2 + ")"), S[t.id] || (S[t.id] = {}), S[t.id].startRight = o2, j(l, t.startLabelRight);
1226
+ }
1227
+ if (t.endLabelLeft) {
1228
+ var c3 = R(t.endLabelLeft, t.labelStyle), o3 = r.insert("g").attr("class", "edgeTerminals"), h2 = o3.insert("g").attr("class", "inner");
1229
+ l = h2.node().appendChild(c3);
1230
+ var f2 = c3.getBBox();
1231
+ h2.attr("transform", "translate(" + -f2.width / 2 + ", " + -f2.height / 2 + ")"), o3.node().appendChild(c3), S[t.id] || (S[t.id] = {}), S[t.id].endLeft = o3, j(l, t.endLabelLeft);
1232
+ }
1233
+ if (t.endLabelRight) {
1234
+ var c4 = R(t.endLabelRight, t.labelStyle), o4 = r.insert("g").attr("class", "edgeTerminals"), h3 = o4.insert("g").attr("class", "inner");
1235
+ l = h3.node().appendChild(c4);
1236
+ var f3 = c4.getBBox();
1237
+ h3.attr("transform", "translate(" + -f3.width / 2 + ", " + -f3.height / 2 + ")"), o4.node().appendChild(c4), S[t.id] || (S[t.id] = {}), S[t.id].endRight = o4, j(l, t.endLabelRight);
1238
+ }
1239
+ return n;
1240
+ };
1241
+ function j(r, t) {
1242
+ index.Ut().flowchart.htmlLabels && r && (r.style.width = t.length * 9 + "px", r.style.height = "12px");
1243
+ }
1244
+ var sr = function(r, t) {
1245
+ index.S.info("Moving label abc78 ", r.id, r.label, A[r.id]);
1246
+ var e = t.updatedPath ? t.updatedPath : t.originalPath;
1247
+ if (r.label) {
1248
+ var n = A[r.id];
1249
+ var a = r.x, s = r.y;
1250
+ if (e) {
1251
+ var i = index.Oi.calcLabelPosition(e);
1252
+ index.S.info("Moving label " + r.label + " from (", a, ",", s, ") to (", i.x, ",", i.y, ") abc78"), t.updatedPath && (a = i.x, s = i.y);
1253
+ }
1254
+ n.attr("transform", "translate(" + a + ", " + s + ")");
1255
+ }
1256
+ if (r.startLabelLeft) {
1257
+ var n1 = S[r.id].startLeft;
1258
+ var a1 = r.x, s1 = r.y;
1259
+ if (e) {
1260
+ var i1 = index.Oi.calcTerminalLabelPosition(r.arrowTypeStart ? 10 : 0, "start_left", e);
1261
+ a1 = i1.x, s1 = i1.y;
1262
+ }
1263
+ n1.attr("transform", "translate(" + a1 + ", " + s1 + ")");
1264
+ }
1265
+ if (r.startLabelRight) {
1266
+ var n2 = S[r.id].startRight;
1267
+ var a2 = r.x, s2 = r.y;
1268
+ if (e) {
1269
+ var i2 = index.Oi.calcTerminalLabelPosition(r.arrowTypeStart ? 10 : 0, "start_right", e);
1270
+ a2 = i2.x, s2 = i2.y;
1271
+ }
1272
+ n2.attr("transform", "translate(" + a2 + ", " + s2 + ")");
1273
+ }
1274
+ if (r.endLabelLeft) {
1275
+ var n3 = S[r.id].endLeft;
1276
+ var a3 = r.x, s3 = r.y;
1277
+ if (e) {
1278
+ var i3 = index.Oi.calcTerminalLabelPosition(r.arrowTypeEnd ? 10 : 0, "end_left", e);
1279
+ a3 = i3.x, s3 = i3.y;
1280
+ }
1281
+ n3.attr("transform", "translate(" + a3 + ", " + s3 + ")");
1282
+ }
1283
+ if (r.endLabelRight) {
1284
+ var n4 = S[r.id].endRight;
1285
+ var a4 = r.x, s4 = r.y;
1286
+ if (e) {
1287
+ var i4 = index.Oi.calcTerminalLabelPosition(r.arrowTypeEnd ? 10 : 0, "end_right", e);
1288
+ a4 = i4.x, s4 = i4.y;
1289
+ }
1290
+ n4.attr("transform", "translate(" + a4 + ", " + s4 + ")");
1291
+ }
1292
+ }, Zt = function(r, t) {
1293
+ var e = r.x, n = r.y, a = Math.abs(t.x - e), s = Math.abs(t.y - n), i = r.width / 2, l = r.height / 2;
1294
+ return a >= i || s >= l;
1295
+ }, Ft = function(r, t, e) {
1296
+ index.S.warn("intersection calc abc89:\n outsidePoint: ".concat(JSON.stringify(t), "\n insidePoint : ").concat(JSON.stringify(e), "\n node : x:").concat(r.x, " y:").concat(r.y, " w:").concat(r.width, " h:").concat(r.height));
1297
+ var n = r.x, a = r.y, s = Math.abs(n - e.x), i = r.width / 2;
1298
+ var l = e.x < t.x ? i - s : i + s;
1299
+ var c = r.height / 2, o = Math.abs(t.y - e.y), h = Math.abs(t.x - e.x);
1300
+ if (Math.abs(a - t.y) * i > Math.abs(n - t.x) * c) {
1301
+ var f = e.y < t.y ? t.y - c - a : a - c - t.y;
1302
+ l = h * f / o;
1303
+ var x = {
1304
+ x: e.x < t.x ? e.x + l : e.x - h + l,
1305
+ y: e.y < t.y ? e.y + o - f : e.y - o + f
1306
+ };
1307
+ return l === 0 && (x.x = t.x, x.y = t.y), h === 0 && (x.x = t.x), o === 0 && (x.y = t.y), index.S.warn("abc89 topp/bott calc, Q ".concat(o, ", q ").concat(f, ", R ").concat(h, ", r ").concat(l), x), x;
1308
+ } else {
1309
+ e.x < t.x ? l = t.x - i - n : l = n - i - t.x;
1310
+ var f1 = o * l / h, x1 = e.x < t.x ? e.x + h - l : e.x - h + l, d = e.y < t.y ? e.y + f1 : e.y - f1;
1311
+ return index.S.warn("sides calc abc89, Q ".concat(o, ", q ").concat(f1, ", R ").concat(h, ", r ").concat(l), {
1312
+ _x: x1,
1313
+ _y: d
1314
+ }), l === 0 && (x1 = t.x, d = t.y), h === 0 && (x1 = t.x), o === 0 && (d = t.y), {
1315
+ x: x1,
1316
+ y: d
1317
+ };
1318
+ }
1319
+ }, G = function(r, t) {
1320
+ index.S.warn("abc88 cutPathAtIntersect", r, t);
1321
+ var e = [], n = r[0], a = !1;
1322
+ return r.forEach(function(s) {
1323
+ if (index.S.info("abc88 checking point", s, t), !Zt(t, s) && !a) {
1324
+ var i = Ft(t, n, s);
1325
+ index.S.warn("abc88 inside", s, n, i), index.S.warn("abc88 intersection", i);
1326
+ var l = !1;
1327
+ e.forEach(function(c) {
1328
+ l = l || c.x === i.x && c.y === i.y;
1329
+ }), e.some(function(c) {
1330
+ return c.x === i.x && c.y === i.y;
1331
+ }) ? index.S.warn("abc88 no intersect", i, e) : e.push(i), a = !0;
1332
+ } else index.S.warn("abc88 outside", s, n), n = s, a || e.push(s);
1333
+ }), index.S.warn("abc88 returning points", e), e;
1334
+ }, ir = function ir(r, t, e, n, a, s) {
1335
+ var i = e.points, l = !1;
1336
+ var c = s.node(t.v);
1337
+ var o = s.node(t.w);
1338
+ index.S.info("abc88 InsertEdge: ", e), o.intersect && c.intersect && (i = i.slice(1, e.points.length - 1), i.unshift(c.intersect(i[0])), index.S.info("Last point", i[i.length - 1], o, o.intersect(i[i.length - 1])), i.push(o.intersect(i[i.length - 1]))), e.toCluster && (index.S.info("to cluster abc88", n[e.toCluster]), i = G(e.points, n[e.toCluster].node), l = !0), e.fromCluster && (index.S.info("from cluster abc88", n[e.fromCluster]), i = G(i.reverse(), n[e.fromCluster].node).reverse(), l = !0);
1339
+ var h = i.filter(function(b) {
1340
+ return !Number.isNaN(b.y);
1341
+ });
1342
+ var f;
1343
+ a === "graph" || a === "flowchart" ? f = e.curve || index.yf : f = index.yf;
1344
+ var x = lineCe5d1152.S().x(function(b) {
1345
+ return b.x;
1346
+ }).y(function(b) {
1347
+ return b.y;
1348
+ }).curve(f);
1349
+ var d;
1350
+ switch(e.thickness){
1351
+ case "normal":
1352
+ d = "edge-thickness-normal";
1353
+ break;
1354
+ case "thick":
1355
+ d = "edge-thickness-thick";
1356
+ break;
1357
+ case "invisible":
1358
+ d = "edge-thickness-thick";
1359
+ break;
1360
+ default:
1361
+ d = "";
1362
+ }
1363
+ switch(e.pattern){
1364
+ case "solid":
1365
+ d += " edge-pattern-solid";
1366
+ break;
1367
+ case "dotted":
1368
+ d += " edge-pattern-dotted";
1369
+ break;
1370
+ case "dashed":
1371
+ d += " edge-pattern-dashed";
1372
+ break;
1373
+ }
1374
+ var p = r.append("path").attr("d", x(h)).attr("id", e.id).attr("class", " " + d + (e.classes ? " " + e.classes : "")).attr("style", e.style);
1375
+ var y = "";
1376
+ switch((index.Ut().flowchart.arrowMarkerAbsolute || index.Ut().state.arrowMarkerAbsolute) && (y = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, y = y.replace(/\(/g, "\\("), y = y.replace(/\)/g, "\\)")), index.S.info("arrowTypeStart", e.arrowTypeStart), index.S.info("arrowTypeEnd", e.arrowTypeEnd), e.arrowTypeStart){
1377
+ case "arrow_cross":
1378
+ p.attr("marker-start", "url(" + y + "#" + a + "-crossStart)");
1379
+ break;
1380
+ case "arrow_point":
1381
+ p.attr("marker-start", "url(" + y + "#" + a + "-pointStart)");
1382
+ break;
1383
+ case "arrow_barb":
1384
+ p.attr("marker-start", "url(" + y + "#" + a + "-barbStart)");
1385
+ break;
1386
+ case "arrow_circle":
1387
+ p.attr("marker-start", "url(" + y + "#" + a + "-circleStart)");
1388
+ break;
1389
+ case "aggregation":
1390
+ p.attr("marker-start", "url(" + y + "#" + a + "-aggregationStart)");
1391
+ break;
1392
+ case "extension":
1393
+ p.attr("marker-start", "url(" + y + "#" + a + "-extensionStart)");
1394
+ break;
1395
+ case "composition":
1396
+ p.attr("marker-start", "url(" + y + "#" + a + "-compositionStart)");
1397
+ break;
1398
+ case "dependency":
1399
+ p.attr("marker-start", "url(" + y + "#" + a + "-dependencyStart)");
1400
+ break;
1401
+ case "lollipop":
1402
+ p.attr("marker-start", "url(" + y + "#" + a + "-lollipopStart)");
1403
+ break;
1404
+ }
1405
+ switch(e.arrowTypeEnd){
1406
+ case "arrow_cross":
1407
+ p.attr("marker-end", "url(" + y + "#" + a + "-crossEnd)");
1408
+ break;
1409
+ case "arrow_point":
1410
+ p.attr("marker-end", "url(" + y + "#" + a + "-pointEnd)");
1411
+ break;
1412
+ case "arrow_barb":
1413
+ p.attr("marker-end", "url(" + y + "#" + a + "-barbEnd)");
1414
+ break;
1415
+ case "arrow_circle":
1416
+ p.attr("marker-end", "url(" + y + "#" + a + "-circleEnd)");
1417
+ break;
1418
+ case "aggregation":
1419
+ p.attr("marker-end", "url(" + y + "#" + a + "-aggregationEnd)");
1420
+ break;
1421
+ case "extension":
1422
+ p.attr("marker-end", "url(" + y + "#" + a + "-extensionEnd)");
1423
+ break;
1424
+ case "composition":
1425
+ p.attr("marker-end", "url(" + y + "#" + a + "-compositionEnd)");
1426
+ break;
1427
+ case "dependency":
1428
+ p.attr("marker-end", "url(" + y + "#" + a + "-dependencyEnd)");
1429
+ break;
1430
+ case "lollipop":
1431
+ p.attr("marker-end", "url(" + y + "#" + a + "-lollipopEnd)");
1432
+ break;
1433
+ }
1434
+ var g = {};
1435
+ return l && (g.updatedPath = i), g.originalPath = e.points, g;
1436
+ };
1437
+
1438
+ exports.B = B;
1439
+ exports.Gt = Gt;
1440
+ exports.Kt = Kt;
1441
+ exports.Pt = Pt;
1442
+ exports.R = R;
1443
+ exports.ar = ar;
1444
+ exports.er = er;
1445
+ exports.ir = ir;
1446
+ exports.rr = rr;
1447
+ exports.sr = sr;
1448
+ exports.tr = tr;
1449
+ exports.v = v;
1450
+ exports.vt = vt;