lowcoder-comps 0.0.7 → 0.0.8

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 (79) hide show
  1. package/icons/icon-chart.svg +15 -0
  2. package/icons/icon-comp-calendar.svg +22 -0
  3. package/index.html +26 -0
  4. package/index.tsx +19 -0
  5. package/jest.config.js +5 -0
  6. package/package/012a06bb.js +34 -0
  7. package/package/06481cb7.js +1060 -0
  8. package/package/0c8b29d5.js +6 -0
  9. package/package/114884df.js +805 -0
  10. package/package/1264ddb2.js +194 -0
  11. package/package/1cee31ec.js +1095 -0
  12. package/package/269c3ba3.js +46662 -0
  13. package/package/2a2c2e55.js +799 -0
  14. package/package/2b3ab1e4.js +98763 -0
  15. package/package/37590a81.js +967 -0
  16. package/package/3cd7980e.js +184 -0
  17. package/package/40112498.js +424 -0
  18. package/package/4b6e1d6f.js +24 -0
  19. package/package/4bc1082b.js +86 -0
  20. package/package/53e49f9b.js +1600 -0
  21. package/package/55bd5c26.js +266 -0
  22. package/package/591684c8.js +2071 -0
  23. package/package/6c000872.js +16 -0
  24. package/package/756addec.js +775 -0
  25. package/package/7668124e.js +8 -0
  26. package/package/79e8eeeb.js +949 -0
  27. package/package/926fbfec.js +91 -0
  28. package/package/945eefb3.js +2665 -0
  29. package/package/a35f148e.js +1228 -0
  30. package/package/a4d12a43.js +175 -0
  31. package/package/a60de5d1.js +804 -0
  32. package/package/a8dde1ea.js +589 -0
  33. package/package/b4148642.js +7 -0
  34. package/package/b7dd22a2.js +847 -0
  35. package/package/d4f3a2c4.js +18046 -0
  36. package/package/e0f479f3.js +91 -0
  37. package/package/eaa160c9.js +341 -0
  38. package/package/f1bfd8b5.js +311 -0
  39. package/package/f1f9ba79.js +900 -0
  40. package/package/fba61f63.js +2868 -0
  41. package/package/icons/icon-chart.svg +15 -0
  42. package/package/icons/icon-comp-calendar.svg +22 -0
  43. package/package/index.js +5 -0
  44. package/package/package.json +73 -0
  45. package/package.json +1 -4
  46. package/src/__test__/allComp.test.tsx +61 -0
  47. package/src/app-env.d.ts +3 -0
  48. package/src/comps/calendarComp/calendarComp.tsx +442 -0
  49. package/src/comps/calendarComp/calendarConstants.tsx +897 -0
  50. package/src/comps/chartComp/chartComp.tsx +249 -0
  51. package/src/comps/chartComp/chartConfigs/barChartConfig.tsx +51 -0
  52. package/src/comps/chartComp/chartConfigs/cartesianAxisConfig.tsx +307 -0
  53. package/src/comps/chartComp/chartConfigs/chartUrls.tsx +6 -0
  54. package/src/comps/chartComp/chartConfigs/legendConfig.tsx +55 -0
  55. package/src/comps/chartComp/chartConfigs/lineChartConfig.tsx +96 -0
  56. package/src/comps/chartComp/chartConfigs/pieChartConfig.tsx +83 -0
  57. package/src/comps/chartComp/chartConfigs/scatterChartConfig.tsx +62 -0
  58. package/src/comps/chartComp/chartConstants.tsx +243 -0
  59. package/src/comps/chartComp/chartPropertyView.tsx +161 -0
  60. package/src/comps/chartComp/chartUtils.ts +240 -0
  61. package/src/comps/chartComp/reactEcharts/core.tsx +187 -0
  62. package/src/comps/chartComp/reactEcharts/index.ts +20 -0
  63. package/src/comps/chartComp/reactEcharts/types.ts +70 -0
  64. package/src/comps/chartComp/seriesComp.tsx +119 -0
  65. package/src/comps/imageEditorComp/imageEditorClass.tsx +52 -0
  66. package/src/comps/imageEditorComp/imageEditorConstants.tsx +109 -0
  67. package/src/comps/imageEditorComp/index.tsx +184 -0
  68. package/src/comps/mermaidComp/index.tsx +44 -0
  69. package/src/comps/mermaidComp/mermaid.tsx +29 -0
  70. package/src/global.ts +1 -0
  71. package/src/i18n/comps/index.tsx +29 -0
  72. package/src/i18n/comps/locales/en.ts +142 -0
  73. package/src/i18n/comps/locales/enObj.tsx +120 -0
  74. package/src/i18n/comps/locales/index.ts +7 -0
  75. package/src/i18n/comps/locales/types.tsx +9 -0
  76. package/src/i18n/comps/locales/zh.ts +4 -0
  77. package/src/i18n/comps/locales/zhObj.tsx +4 -0
  78. package/src/index.ts +11 -0
  79. package/vite.config.js +10 -0
@@ -0,0 +1,184 @@
1
+ import { p as Q, d as B, s as X, D as H, a as Z, S as F, b as j, c as I } from "./37590a81.js";
2
+ import { G as tt } from "./945eefb3.js";
3
+ import { l, c as g, h as x, y as et, i as ot, k as G } from "./2b3ab1e4.js";
4
+ import { r as st } from "./eaa160c9.js";
5
+ import "./06481cb7.js";
6
+ import "./a60de5d1.js";
7
+ import "./a4d12a43.js";
8
+ import "./012a06bb.js";
9
+ import "./0c8b29d5.js";
10
+ import "./e0f479f3.js";
11
+ const A = "rect", C = "rectWithTitle", nt = "start", ct = "end", it = "divider", rt = "roundedWithTitle", lt = "note", at = "noteGroup", _ = "statediagram", dt = "state", Et = `${_}-${dt}`, U = "transition", St = "note", Tt = "note-edge", pt = `${U} ${Tt}`, _t = `${_}-${St}`, ut = "cluster", Dt = `${_}-${ut}`, ft = "cluster-alt", bt = `${_}-${ft}`, V = "parent", Y = "note", ht = "state", N = "----", At = `${N}${Y}`, M = `${N}${V}`, W = "fill:none", z = "fill: #333", m = "c", q = "text", K = "normal";
12
+ let y = {}, E = 0;
13
+ const yt = function(t) {
14
+ const n = Object.keys(t);
15
+ for (const e of n)
16
+ t[e];
17
+ }, gt = function(t, n) {
18
+ l.trace("Extracting classes"), n.db.clear();
19
+ try {
20
+ return n.parser.parse(t), n.db.extract(n.db.getRootDocV2()), n.db.getClasses();
21
+ } catch (e) {
22
+ return e;
23
+ }
24
+ };
25
+ function $t(t) {
26
+ return t == null ? "" : t.classes ? t.classes.join(" ") : "";
27
+ }
28
+ function R(t = "", n = 0, e = "", c = N) {
29
+ const i = e !== null && e.length > 0 ? `${c}${e}` : "";
30
+ return `${ht}-${t}${i}-${n}`;
31
+ }
32
+ const h = (t, n, e, c, i, r) => {
33
+ const o = e.id, u = $t(c[o]);
34
+ if (o !== "root") {
35
+ let T = A;
36
+ e.start === !0 && (T = nt), e.start === !1 && (T = ct), e.type !== H && (T = e.type), y[o] || (y[o] = {
37
+ id: o,
38
+ shape: T,
39
+ description: G.sanitizeText(o, g()),
40
+ classes: `${u} ${Et}`
41
+ });
42
+ const s = y[o];
43
+ e.description && (Array.isArray(s.description) ? (s.shape = C, s.description.push(e.description)) : s.description.length > 0 ? (s.shape = C, s.description === o ? s.description = [e.description] : s.description = [s.description, e.description]) : (s.shape = A, s.description = e.description), s.description = G.sanitizeTextOrArray(s.description, g())), s.description.length === 1 && s.shape === C && (s.shape = A), !s.type && e.doc && (l.info("Setting cluster for ", o, w(e)), s.type = "group", s.dir = w(e), s.shape = e.type === Z ? it : rt, s.classes = s.classes + " " + Dt + " " + (r ? bt : ""));
44
+ const p = {
45
+ labelStyle: "",
46
+ shape: s.shape,
47
+ labelText: s.description,
48
+ classes: s.classes,
49
+ style: "",
50
+ id: o,
51
+ dir: s.dir,
52
+ domId: R(o, E),
53
+ type: s.type,
54
+ padding: 15
55
+ };
56
+ if (p.centerLabel = !0, e.note) {
57
+ const a = {
58
+ labelStyle: "",
59
+ shape: lt,
60
+ labelText: e.note.text,
61
+ classes: _t,
62
+ style: "",
63
+ id: o + At + "-" + E,
64
+ domId: R(o, E, Y),
65
+ type: s.type,
66
+ padding: 15
67
+ }, d = {
68
+ labelStyle: "",
69
+ shape: at,
70
+ labelText: e.note.text,
71
+ classes: s.classes,
72
+ style: "",
73
+ id: o + M,
74
+ domId: R(o, E, V),
75
+ type: "group",
76
+ padding: 0
77
+ };
78
+ E++;
79
+ const D = o + M;
80
+ t.setNode(D, d), t.setNode(a.id, a), t.setNode(o, p), t.setParent(o, D), t.setParent(a.id, D);
81
+ let S = o, f = a.id;
82
+ e.note.position === "left of" && (S = a.id, f = o), t.setEdge(S, f, {
83
+ arrowhead: "none",
84
+ arrowType: "",
85
+ style: W,
86
+ labelStyle: "",
87
+ classes: pt,
88
+ arrowheadStyle: z,
89
+ labelpos: m,
90
+ labelType: q,
91
+ thickness: K
92
+ });
93
+ } else
94
+ t.setNode(o, p);
95
+ }
96
+ n && n.id !== "root" && (l.trace("Setting node ", o, " to be child of its parent ", n.id), t.setParent(o, n.id)), e.doc && (l.trace("Adding nodes children "), xt(t, e, e.doc, c, i, !r));
97
+ }, xt = (t, n, e, c, i, r) => {
98
+ l.trace("items", e), e.forEach((o) => {
99
+ switch (o.stmt) {
100
+ case j:
101
+ h(t, n, o, c, i, r);
102
+ break;
103
+ case H:
104
+ h(t, n, o, c, i, r);
105
+ break;
106
+ case F:
107
+ {
108
+ h(t, n, o.state1, c, i, r), h(t, n, o.state2, c, i, r);
109
+ const u = {
110
+ id: "edge" + E,
111
+ arrowhead: "normal",
112
+ arrowTypeEnd: "arrow_barb",
113
+ style: W,
114
+ labelStyle: "",
115
+ label: G.sanitizeText(o.description, g()),
116
+ arrowheadStyle: z,
117
+ labelpos: m,
118
+ labelType: q,
119
+ thickness: K,
120
+ classes: U
121
+ };
122
+ t.setEdge(o.state1.id, o.state2.id, u, E), E++;
123
+ }
124
+ break;
125
+ }
126
+ });
127
+ }, w = (t, n = I) => {
128
+ let e = n;
129
+ if (t.doc)
130
+ for (let c = 0; c < t.doc.length; c++) {
131
+ const i = t.doc[c];
132
+ i.stmt === "dir" && (e = i.value);
133
+ }
134
+ return e;
135
+ }, Ct = function(t, n, e, c) {
136
+ l.info("Drawing state diagram (v2)", n), y = {}, c.db.getDirection();
137
+ const { securityLevel: i, state: r } = g(), o = r.nodeSpacing || 50, u = r.rankSpacing || 50;
138
+ l.info(c.db.getRootDocV2()), c.db.extract(c.db.getRootDocV2()), l.info(c.db.getRootDocV2());
139
+ const T = c.db.getStates(), s = new tt({
140
+ multigraph: !0,
141
+ compound: !0
142
+ }).setGraph({
143
+ rankdir: w(c.db.getRootDocV2()),
144
+ nodesep: o,
145
+ ranksep: u,
146
+ marginx: 8,
147
+ marginy: 8
148
+ }).setDefaultEdgeLabel(function() {
149
+ return {};
150
+ });
151
+ h(s, void 0, c.db.getRootDocV2(), T, c.db, !0);
152
+ let p;
153
+ i === "sandbox" && (p = x("#i" + n));
154
+ const a = i === "sandbox" ? x(p.nodes()[0].contentDocument.body) : x("body"), d = a.select(`[id="${n}"]`), D = a.select("#" + n + " g");
155
+ st(D, s, ["barb"], _, n);
156
+ const S = 8;
157
+ et.insertTitle(d, "statediagramTitleText", r.titleTopMargin, c.db.getDiagramTitle());
158
+ const f = d.node().getBBox(), L = f.width + S * 2, P = f.height + S * 2;
159
+ d.attr("class", _);
160
+ const k = d.node().getBBox();
161
+ ot(d, P, L, r.useMaxWidth);
162
+ const v = `${k.x - S} ${k.y - S} ${L} ${P}`;
163
+ l.debug(`viewBox ${v}`), d.attr("viewBox", v);
164
+ const J = document.querySelectorAll('[id="' + n + '"] .edgeLabel .label');
165
+ for (const $ of J) {
166
+ const O = $.getBBox(), b = document.createElementNS("http://www.w3.org/2000/svg", A);
167
+ b.setAttribute("rx", 0), b.setAttribute("ry", 0), b.setAttribute("width", O.width), b.setAttribute("height", O.height), $.insertBefore(b, $.firstChild);
168
+ }
169
+ }, Rt = {
170
+ setConf: yt,
171
+ getClasses: gt,
172
+ draw: Ct
173
+ }, Ht = {
174
+ parser: Q,
175
+ db: B,
176
+ renderer: Rt,
177
+ styles: X,
178
+ init: (t) => {
179
+ t.state || (t.state = {}), t.state.arrowMarkerAbsolute = t.arrowMarkerAbsolute, B.clear();
180
+ }
181
+ };
182
+ export {
183
+ Ht as diagram
184
+ };
@@ -0,0 +1,424 @@
1
+ import { i as V, G as q } from "./945eefb3.js";
2
+ import { X as M, p as N, l as u, q as R, c as C, k as I, r as $, o as E, h as _, y as F, t as U } from "./2b3ab1e4.js";
3
+ import { f as X } from "./1cee31ec.js";
4
+ import { r as H } from "./eaa160c9.js";
5
+ import { s as W } from "./b4148642.js";
6
+ function se(e, l) {
7
+ return !!e.children(l).length;
8
+ }
9
+ function ne(e) {
10
+ return L(e.v) + ":" + L(e.w) + ":" + L(e.name);
11
+ }
12
+ var J = /:/g;
13
+ function L(e) {
14
+ return e ? String(e).replace(J, "\\:") : "";
15
+ }
16
+ function K(e, l) {
17
+ l && e.attr("style", l);
18
+ }
19
+ function ie(e, l, c) {
20
+ l && e.attr("class", l).attr("class", c + " " + e.attr("class"));
21
+ }
22
+ function ce(e, l) {
23
+ var c = l.graph();
24
+ if (V(c)) {
25
+ var a = c.transition;
26
+ if (M(a))
27
+ return a(e);
28
+ }
29
+ return e;
30
+ }
31
+ function Q(e, l) {
32
+ var c = e.append("foreignObject").attr("width", "100000"), a = c.append("xhtml:div");
33
+ a.attr("xmlns", "http://www.w3.org/1999/xhtml");
34
+ var i = l.label;
35
+ switch (typeof i) {
36
+ case "function":
37
+ a.insert(i);
38
+ break;
39
+ case "object":
40
+ a.insert(function() {
41
+ return i;
42
+ });
43
+ break;
44
+ default:
45
+ a.html(i);
46
+ }
47
+ K(a, l.labelStyle), a.style("display", "inline-block"), a.style("white-space", "nowrap");
48
+ var d = a.node().getBoundingClientRect();
49
+ return c.attr("width", d.width).attr("height", d.height), c;
50
+ }
51
+ const G = {}, Y = function(e) {
52
+ const l = Object.keys(e);
53
+ for (const c of l)
54
+ G[c] = e[c];
55
+ }, z = function(e, l, c, a, i, d) {
56
+ const w = a.select(`[id="${c}"]`);
57
+ Object.keys(e).forEach(function(p) {
58
+ const r = e[p];
59
+ let k = "default";
60
+ r.classes.length > 0 && (k = r.classes.join(" ")), k = k + " flowchart-label";
61
+ const h = N(r.styles);
62
+ let t = r.text !== void 0 ? r.text : r.id, n;
63
+ if (u.info("vertex", r, r.labelType), r.labelType === "markdown")
64
+ u.info("vertex", r, r.labelType);
65
+ else if (R(C().flowchart.htmlLabels)) {
66
+ const v = {
67
+ label: t.replace(
68
+ /fa[blrs]?:fa-[\w-]+/g,
69
+ (g) => `<i class='${g.replace(":", " ")}'></i>`
70
+ )
71
+ };
72
+ n = Q(w, v).node(), n.parentNode.removeChild(n);
73
+ } else {
74
+ const v = i.createElementNS("http://www.w3.org/2000/svg", "text");
75
+ v.setAttribute("style", h.labelStyle.replace("color:", "fill:"));
76
+ const g = t.split(I.lineBreakRegex);
77
+ for (const T of g) {
78
+ const m = i.createElementNS("http://www.w3.org/2000/svg", "tspan");
79
+ m.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), m.setAttribute("dy", "1em"), m.setAttribute("x", "1"), m.textContent = T, v.appendChild(m);
80
+ }
81
+ n = v;
82
+ }
83
+ let f = 0, o = "";
84
+ switch (r.type) {
85
+ case "round":
86
+ f = 5, o = "rect";
87
+ break;
88
+ case "square":
89
+ o = "rect";
90
+ break;
91
+ case "diamond":
92
+ o = "question";
93
+ break;
94
+ case "hexagon":
95
+ o = "hexagon";
96
+ break;
97
+ case "odd":
98
+ o = "rect_left_inv_arrow";
99
+ break;
100
+ case "lean_right":
101
+ o = "lean_right";
102
+ break;
103
+ case "lean_left":
104
+ o = "lean_left";
105
+ break;
106
+ case "trapezoid":
107
+ o = "trapezoid";
108
+ break;
109
+ case "inv_trapezoid":
110
+ o = "inv_trapezoid";
111
+ break;
112
+ case "odd_right":
113
+ o = "rect_left_inv_arrow";
114
+ break;
115
+ case "circle":
116
+ o = "circle";
117
+ break;
118
+ case "ellipse":
119
+ o = "ellipse";
120
+ break;
121
+ case "stadium":
122
+ o = "stadium";
123
+ break;
124
+ case "subroutine":
125
+ o = "subroutine";
126
+ break;
127
+ case "cylinder":
128
+ o = "cylinder";
129
+ break;
130
+ case "group":
131
+ o = "rect";
132
+ break;
133
+ case "doublecircle":
134
+ o = "doublecircle";
135
+ break;
136
+ default:
137
+ o = "rect";
138
+ }
139
+ l.setNode(r.id, {
140
+ labelStyle: h.labelStyle,
141
+ shape: o,
142
+ labelText: t,
143
+ labelType: r.labelType,
144
+ rx: f,
145
+ ry: f,
146
+ class: k,
147
+ style: h.style,
148
+ id: r.id,
149
+ link: r.link,
150
+ linkTarget: r.linkTarget,
151
+ tooltip: d.db.getTooltip(r.id) || "",
152
+ domId: d.db.lookUpDomId(r.id),
153
+ haveCallback: r.haveCallback,
154
+ width: r.type === "group" ? 500 : void 0,
155
+ dir: r.dir,
156
+ type: r.type,
157
+ props: r.props,
158
+ padding: C().flowchart.padding
159
+ }), u.info("setNode", {
160
+ labelStyle: h.labelStyle,
161
+ labelType: r.labelType,
162
+ shape: o,
163
+ labelText: t,
164
+ rx: f,
165
+ ry: f,
166
+ class: k,
167
+ style: h.style,
168
+ id: r.id,
169
+ domId: d.db.lookUpDomId(r.id),
170
+ width: r.type === "group" ? 500 : void 0,
171
+ type: r.type,
172
+ dir: r.dir,
173
+ props: r.props,
174
+ padding: C().flowchart.padding
175
+ });
176
+ });
177
+ }, P = function(e, l, c) {
178
+ u.info("abc78 edges = ", e);
179
+ let a = 0, i = {}, d, w;
180
+ if (e.defaultStyle !== void 0) {
181
+ const s = N(e.defaultStyle);
182
+ d = s.style, w = s.labelStyle;
183
+ }
184
+ e.forEach(function(s) {
185
+ a++;
186
+ var p = "L-" + s.start + "-" + s.end;
187
+ i[p] === void 0 ? (i[p] = 0, u.info("abc78 new entry", p, i[p])) : (i[p]++, u.info("abc78 new entry", p, i[p]));
188
+ let r = p + "-" + i[p];
189
+ u.info("abc78 new link id to be used is", p, r, i[p]);
190
+ var k = "LS-" + s.start, h = "LE-" + s.end;
191
+ const t = { style: "", labelStyle: "" };
192
+ switch (t.minlen = s.length || 1, s.type === "arrow_open" ? t.arrowhead = "none" : t.arrowhead = "normal", t.arrowTypeStart = "arrow_open", t.arrowTypeEnd = "arrow_open", s.type) {
193
+ case "double_arrow_cross":
194
+ t.arrowTypeStart = "arrow_cross";
195
+ case "arrow_cross":
196
+ t.arrowTypeEnd = "arrow_cross";
197
+ break;
198
+ case "double_arrow_point":
199
+ t.arrowTypeStart = "arrow_point";
200
+ case "arrow_point":
201
+ t.arrowTypeEnd = "arrow_point";
202
+ break;
203
+ case "double_arrow_circle":
204
+ t.arrowTypeStart = "arrow_circle";
205
+ case "arrow_circle":
206
+ t.arrowTypeEnd = "arrow_circle";
207
+ break;
208
+ }
209
+ let n = "", f = "";
210
+ switch (s.stroke) {
211
+ case "normal":
212
+ n = "fill:none;", d !== void 0 && (n = d), w !== void 0 && (f = w), t.thickness = "normal", t.pattern = "solid";
213
+ break;
214
+ case "dotted":
215
+ t.thickness = "normal", t.pattern = "dotted", t.style = "fill:none;stroke-width:2px;stroke-dasharray:3;";
216
+ break;
217
+ case "thick":
218
+ t.thickness = "thick", t.pattern = "solid", t.style = "stroke-width: 3.5px;fill:none;";
219
+ break;
220
+ case "invisible":
221
+ t.thickness = "invisible", t.pattern = "solid", t.style = "stroke-width: 0;fill:none;";
222
+ break;
223
+ }
224
+ if (s.style !== void 0) {
225
+ const o = N(s.style);
226
+ n = o.style, f = o.labelStyle;
227
+ }
228
+ t.style = t.style += n, t.labelStyle = t.labelStyle += f, s.interpolate !== void 0 ? t.curve = $(s.interpolate, E) : e.defaultInterpolate !== void 0 ? t.curve = $(e.defaultInterpolate, E) : t.curve = $(G.curve, E), s.text === void 0 ? s.style !== void 0 && (t.arrowheadStyle = "fill: #333") : (t.arrowheadStyle = "fill: #333", t.labelpos = "c"), t.labelType = s.labelType, t.label = s.text.replace(I.lineBreakRegex, `
229
+ `), s.style === void 0 && (t.style = t.style || "stroke: #333; stroke-width: 1.5px;fill:none;"), t.labelStyle = t.labelStyle.replace("color:", "fill:"), t.id = r, t.classes = "flowchart-link " + k + " " + h, l.setEdge(s.start, s.end, t, a);
230
+ });
231
+ }, Z = function(e, l) {
232
+ u.info("Extracting classes"), l.db.clear();
233
+ try {
234
+ return l.parse(e), l.db.getClasses();
235
+ } catch (c) {
236
+ return;
237
+ }
238
+ }, j = function(e, l, c, a) {
239
+ u.info("Drawing flowchart"), a.db.clear(), X.setGen("gen-2"), a.parser.parse(e);
240
+ let i = a.db.getDirection();
241
+ i === void 0 && (i = "TD");
242
+ const { securityLevel: d, flowchart: w } = C(), s = w.nodeSpacing || 50, p = w.rankSpacing || 50;
243
+ let r;
244
+ d === "sandbox" && (r = _("#i" + l));
245
+ const k = d === "sandbox" ? _(r.nodes()[0].contentDocument.body) : _("body"), h = d === "sandbox" ? r.nodes()[0].contentDocument : document, t = new q({
246
+ multigraph: !0,
247
+ compound: !0
248
+ }).setGraph({
249
+ rankdir: i,
250
+ nodesep: s,
251
+ ranksep: p,
252
+ marginx: 0,
253
+ marginy: 0
254
+ }).setDefaultEdgeLabel(function() {
255
+ return {};
256
+ });
257
+ let n;
258
+ const f = a.db.getSubGraphs();
259
+ u.info("Subgraphs - ", f);
260
+ for (let b = f.length - 1; b >= 0; b--)
261
+ n = f[b], u.info("Subgraph - ", n), a.db.addVertex(
262
+ n.id,
263
+ { text: n.title, type: n.labelType },
264
+ "group",
265
+ void 0,
266
+ n.classes,
267
+ n.dir
268
+ );
269
+ const o = a.db.getVertices(), v = a.db.getEdges();
270
+ u.info("Edges", v);
271
+ let g = 0;
272
+ for (g = f.length - 1; g >= 0; g--) {
273
+ n = f[g], W("cluster").append("text");
274
+ for (let b = 0; b < n.nodes.length; b++)
275
+ u.info("Setting up subgraphs", n.nodes[b], n.id), t.setParent(n.nodes[b], n.id);
276
+ }
277
+ z(o, t, l, k, h, a), P(v, t);
278
+ const T = k.select(`[id="${l}"]`), m = k.select("#" + l + " g");
279
+ if (H(m, t, ["point", "circle", "cross"], "flowchart", l), F.insertTitle(T, "flowchartTitleText", w.titleTopMargin, a.db.getDiagramTitle()), U(t, T, w.diagramPadding, w.useMaxWidth), a.db.indexNodes("subGraph" + g), !w.htmlLabels) {
280
+ const b = h.querySelectorAll('[id="' + l + '"] .edgeLabel .label');
281
+ for (const x of b) {
282
+ const S = x.getBBox(), y = h.createElementNS("http://www.w3.org/2000/svg", "rect");
283
+ y.setAttribute("rx", 0), y.setAttribute("ry", 0), y.setAttribute("width", S.width), y.setAttribute("height", S.height), x.insertBefore(y, x.firstChild);
284
+ }
285
+ }
286
+ Object.keys(o).forEach(function(b) {
287
+ const x = o[b];
288
+ if (x.link) {
289
+ const S = _("#" + l + ' [id="' + b + '"]');
290
+ if (S) {
291
+ const y = h.createElementNS("http://www.w3.org/2000/svg", "a");
292
+ y.setAttributeNS("http://www.w3.org/2000/svg", "class", x.classes.join(" ")), y.setAttributeNS("http://www.w3.org/2000/svg", "href", x.link), y.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), d === "sandbox" ? y.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : x.linkTarget && y.setAttributeNS("http://www.w3.org/2000/svg", "target", x.linkTarget);
293
+ const A = S.insert(function() {
294
+ return y;
295
+ }, ":first-child"), B = S.select(".label-container");
296
+ B && A.append(function() {
297
+ return B.node();
298
+ });
299
+ const D = S.select(".label");
300
+ D && A.append(function() {
301
+ return D.node();
302
+ });
303
+ }
304
+ }
305
+ });
306
+ }, de = {
307
+ setConf: Y,
308
+ addVertices: z,
309
+ addEdges: P,
310
+ getClasses: Z,
311
+ draw: j
312
+ }, O = (e) => `.label {
313
+ font-family: ${e.fontFamily};
314
+ color: ${e.nodeTextColor || e.textColor};
315
+ }
316
+ .cluster-label text {
317
+ fill: ${e.titleColor};
318
+ }
319
+ .cluster-label span,p {
320
+ color: ${e.titleColor};
321
+ }
322
+
323
+ .label text,span,p {
324
+ fill: ${e.nodeTextColor || e.textColor};
325
+ color: ${e.nodeTextColor || e.textColor};
326
+ }
327
+
328
+ .node rect,
329
+ .node circle,
330
+ .node ellipse,
331
+ .node polygon,
332
+ .node path {
333
+ fill: ${e.mainBkg};
334
+ stroke: ${e.nodeBorder};
335
+ stroke-width: 1px;
336
+ }
337
+ .flowchart-label text {
338
+ text-anchor: middle;
339
+ }
340
+ // .flowchart-label .text-outer-tspan {
341
+ // text-anchor: middle;
342
+ // }
343
+ // .flowchart-label .text-inner-tspan {
344
+ // text-anchor: start;
345
+ // }
346
+
347
+ .node .label {
348
+ text-align: center;
349
+ }
350
+ .node.clickable {
351
+ cursor: pointer;
352
+ }
353
+
354
+ .arrowheadPath {
355
+ fill: ${e.arrowheadColor};
356
+ }
357
+
358
+ .edgePath .path {
359
+ stroke: ${e.lineColor};
360
+ stroke-width: 2.0px;
361
+ }
362
+
363
+ .flowchart-link {
364
+ stroke: ${e.lineColor};
365
+ fill: none;
366
+ }
367
+
368
+ .edgeLabel {
369
+ background-color: ${e.edgeLabelBackground};
370
+ rect {
371
+ opacity: 0.5;
372
+ background-color: ${e.edgeLabelBackground};
373
+ fill: ${e.edgeLabelBackground};
374
+ }
375
+ text-align: center;
376
+ }
377
+
378
+ .cluster rect {
379
+ fill: ${e.clusterBkg};
380
+ stroke: ${e.clusterBorder};
381
+ stroke-width: 1px;
382
+ }
383
+
384
+ .cluster text {
385
+ fill: ${e.titleColor};
386
+ }
387
+
388
+ .cluster span,p {
389
+ color: ${e.titleColor};
390
+ }
391
+ /* .cluster div {
392
+ color: ${e.titleColor};
393
+ } */
394
+
395
+ div.mermaidTooltip {
396
+ position: absolute;
397
+ text-align: center;
398
+ max-width: 200px;
399
+ padding: 2px;
400
+ font-family: ${e.fontFamily};
401
+ font-size: 12px;
402
+ background: ${e.tertiaryColor};
403
+ border: 1px solid ${e.border2};
404
+ border-radius: 2px;
405
+ pointer-events: none;
406
+ z-index: 100;
407
+ }
408
+
409
+ .flowchartTitleText {
410
+ text-anchor: middle;
411
+ font-size: 18px;
412
+ fill: ${e.textColor};
413
+ }
414
+ `, pe = O;
415
+ export {
416
+ K as a,
417
+ Q as b,
418
+ ce as c,
419
+ ie as d,
420
+ ne as e,
421
+ de as f,
422
+ pe as g,
423
+ se as i
424
+ };
@@ -0,0 +1,24 @@
1
+ import { p as e, f as o } from "./1cee31ec.js";
2
+ import { f as t, g as a } from "./40112498.js";
3
+ import { a4 as s } from "./2b3ab1e4.js";
4
+ import "./945eefb3.js";
5
+ import "./06481cb7.js";
6
+ import "./eaa160c9.js";
7
+ import "./a60de5d1.js";
8
+ import "./a4d12a43.js";
9
+ import "./012a06bb.js";
10
+ import "./0c8b29d5.js";
11
+ import "./e0f479f3.js";
12
+ import "./b4148642.js";
13
+ const A = {
14
+ parser: e,
15
+ db: o,
16
+ renderer: t,
17
+ styles: a,
18
+ init: (r) => {
19
+ r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, s({ flowchart: { arrowMarkerAbsolute: r.arrowMarkerAbsolute } }), t.setConf(r.flowchart), o.clear(), o.setGen("gen-2");
20
+ }
21
+ };
22
+ export {
23
+ A as diagram
24
+ };