@life-exe/wiki-engine 0.1.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.
- package/LICENSE +21 -0
- package/README.md +180 -0
- package/dist/analytics/index.d.ts +10 -0
- package/dist/chunks/abnfDiagram-VCTEODGH-DyAP6Aua.js +87 -0
- package/dist/chunks/arc-OroUeRL_.js +83 -0
- package/dist/chunks/architectureDiagram-5GKGNRK7-FjmrDCl4.js +4784 -0
- package/dist/chunks/blockDiagram-I7D4REHJ-BF3oIDlI.js +1416 -0
- package/dist/chunks/c4Diagram-7LVT6UL2-Cmdq0LZr.js +1511 -0
- package/dist/chunks/channel-Bdy1QZHo.js +5 -0
- package/dist/chunks/chunk-2Q5K7J3B-BwxRSEKd.js +15 -0
- package/dist/chunks/chunk-5VM5RSS4-BtHwUU4T.js +19 -0
- package/dist/chunks/chunk-F27PBJKO-DF4TGftR.js +68 -0
- package/dist/chunks/chunk-IMKFNOWR-DkBQ-1aV.js +1421 -0
- package/dist/chunks/chunk-JWPE2WC7-BIokdAUW.js +9 -0
- package/dist/chunks/chunk-POPQ4Y6H-CcjOsf9X.js +20 -0
- package/dist/chunks/chunk-SHT3W25Y-lYp5BdEg.js +1695 -0
- package/dist/chunks/chunk-SVP7TREG-DN-ravNt.js +664 -0
- package/dist/chunks/chunk-TICWLB2K-CtTJ0xaY.js +1534 -0
- package/dist/chunks/chunk-XXDRQBXY-BovkWFC0.js +8 -0
- package/dist/chunks/classDiagram-ZZMXUADV-CMYS0pHw.js +16 -0
- package/dist/chunks/classDiagram-v2-VYDZK3BY-CMYS0pHw.js +16 -0
- package/dist/chunks/common-BJ4q25wy.js +12633 -0
- package/dist/chunks/cose-bilkent-JH36ORCC-CaMqpJY7.js +2608 -0
- package/dist/chunks/cynefin-OW5HDTMX-Bzjecpt-.js +23853 -0
- package/dist/chunks/cynefinDiagram-5FMLGOSQ-C0NuKLt0.js +299 -0
- package/dist/chunks/cytoscape.esm-DmPrb1GM.js +18787 -0
- package/dist/chunks/dagre-GXQ25YYZ-Ds09_NdN.js +461 -0
- package/dist/chunks/defaultLocale-BgPVtth8.js +171 -0
- package/dist/chunks/diagram-S7CK7UJ4-IvSazk1O.js +349 -0
- package/dist/chunks/diagram-UQ7AKVKN-58epdx5V.js +223 -0
- package/dist/chunks/diagram-VSXAHHWV-BrzRGMeV.js +466 -0
- package/dist/chunks/diagram-VX7I27RA-DPL0Nw6d.js +530 -0
- package/dist/chunks/diagram-Z3DM3KII-8VWVu0I5.js +143 -0
- package/dist/chunks/ebnfDiagram-PWID7BFC-DeByR_ze.js +109 -0
- package/dist/chunks/erDiagram-RLTQ6QDP-C9uo9iE1.js +1060 -0
- package/dist/chunks/flowDiagram-HODETNUW-BpoY3OMp.js +7 -0
- package/dist/chunks/ganttDiagram-EL5Y4UJY-psdwnC-T.js +2711 -0
- package/dist/chunks/gitGraphDiagram-WWUBYQGX-vsDfkn_Q.js +828 -0
- package/dist/chunks/index-f7Uzykhj.js +38262 -0
- package/dist/chunks/infoDiagram-27XIBGKW-8K-eQZiU.js +24 -0
- package/dist/chunks/init-DjUOC4st.js +16 -0
- package/dist/chunks/ishikawaDiagram-5VMMS53U-CuqR1k5i.js +622 -0
- package/dist/chunks/journeyDiagram-3NMN7TZE-BPW1nmwZ.js +834 -0
- package/dist/chunks/kanban-definition-UXKFOSKX-iY6-d6jO.js +726 -0
- package/dist/chunks/katex-jHfnQmlp.js +11682 -0
- package/dist/chunks/layout-CgV9vOdp.js +1704 -0
- package/dist/chunks/linear-BzcaSMTS.js +259 -0
- package/dist/chunks/mindmap-definition-YA3MSWOX-CaLfHyv0.js +831 -0
- package/dist/chunks/ordinal-DfAQgscy.js +61 -0
- package/dist/chunks/pegDiagram-XKGWAZYB-6Y28VvVh.js +95 -0
- package/dist/chunks/pieDiagram-E7YTZNPT-OrjeRxhs.js +209 -0
- package/dist/chunks/quadrantDiagram-AXDQQJYC-rgw2lV2J.js +1025 -0
- package/dist/chunks/railroadDiagram-O6MQD6OU-D6QNO5r1.js +77 -0
- package/dist/chunks/requirementDiagram-BXWQKSXE-a8tNRSuE.js +884 -0
- package/dist/chunks/sankeyDiagram-P5KCCOFB-CdaC8rLw.js +847 -0
- package/dist/chunks/sequenceDiagram-WJ2MYXX4-CGLi38Hj.js +2898 -0
- package/dist/chunks/sizeCapture-INFHLROL-g5RJXnik.js +47 -0
- package/dist/chunks/stateDiagram-D77RDMKH-Cou0eVl1.js +262 -0
- package/dist/chunks/stateDiagram-v2-MP3YSRHH-BHQspnUg.js +16 -0
- package/dist/chunks/swimlanes-42K2YHIH-BU7S1WgJ.js +5239 -0
- package/dist/chunks/swimlanesDiagram-VR7AAH4N-BsEplbno.js +13 -0
- package/dist/chunks/timeline-definition-24CTP7MA-BB-IyxWL.js +1066 -0
- package/dist/chunks/vennDiagram-4TSXK5OY-BToYolPI.js +1585 -0
- package/dist/chunks/wardleyDiagram-VM6X3IG4-BgoueOw_.js +684 -0
- package/dist/chunks/xychartDiagram-S5SC5T6Z-CF0fWv-W.js +1492 -0
- package/dist/components/CodeBlock.d.ts +5 -0
- package/dist/components/CommunityLinks.d.ts +21 -0
- package/dist/components/CookieConsent.d.ts +2 -0
- package/dist/components/DocLinkCard.d.ts +6 -0
- package/dist/components/LecturePageView.d.ts +3 -0
- package/dist/components/MermaidDiagram.d.ts +3 -0
- package/dist/components/SearchPopup.d.ts +6 -0
- package/dist/components/WikiApp.d.ts +9 -0
- package/dist/components/WikiLayout.d.ts +2 -0
- package/dist/components/WikiPageView.d.ts +6 -0
- package/dist/components/ZoomableImage.d.ts +2 -0
- package/dist/context/LangContext.d.ts +2 -0
- package/dist/context/WikiContext.d.ts +18 -0
- package/dist/data.d.ts +8 -0
- package/dist/hooks/useLanguage.d.ts +4 -0
- package/dist/hooks/useTheme.d.ts +5 -0
- package/dist/hooks/useWiki.d.ts +2 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +45 -0
- package/dist/languages/ue-cpp.d.ts +7 -0
- package/dist/languages/ue-cpp.js +21 -0
- package/dist/types.d.ts +119 -0
- package/dist/wiki-engine.css +1 -0
- package/package.json +76 -0
|
@@ -0,0 +1,1416 @@
|
|
|
1
|
+
import { g as Pe } from "./chunk-5VM5RSS4-BtHwUU4T.js";
|
|
2
|
+
import { aG as Fe, aH as ye, aI as Me, aJ as Ke, aK as Ye, aL as We, aM as Ve, aN as Ue, aO as He, aP as Xe, aQ as je, aR as Ge, aS as qe, aT as Je, aU as Ze, aV as Qe, aW as $e, aX as et, aY as tt, aZ as st, a_ as rt, a$ as it, b0 as at, b1 as nt, b2 as ot, _ as g, E as j, j as J, b3 as ct, d as lt, l as m, A as ut, C as gt, c as me, T as ht, aC as dt, aB as pt, aD as ft, k as St, b4 as xt, aj as be, ak as Lt } from "./index-f7Uzykhj.js";
|
|
3
|
+
import { c as yt } from "./channel-Bdy1QZHo.js";
|
|
4
|
+
function mt(e) {
|
|
5
|
+
return Array.isArray(e);
|
|
6
|
+
}
|
|
7
|
+
function bt(e) {
|
|
8
|
+
if (Fe(e)) return e;
|
|
9
|
+
const n = ye(e);
|
|
10
|
+
if (!wt(e)) return {};
|
|
11
|
+
if (mt(e)) {
|
|
12
|
+
const s = Array.from(e);
|
|
13
|
+
return e.length > 0 && typeof e[0] == "string" && Object.hasOwn(e, "index") && (s.index = e.index, s.input = e.input), s;
|
|
14
|
+
}
|
|
15
|
+
if (Me(e)) {
|
|
16
|
+
const s = e, c = s.constructor;
|
|
17
|
+
return new c(s.buffer, s.byteOffset, s.length);
|
|
18
|
+
}
|
|
19
|
+
if (n === "[object ArrayBuffer]") return new ArrayBuffer(e.byteLength);
|
|
20
|
+
if (n === "[object DataView]") {
|
|
21
|
+
const s = e, c = s.buffer, p = s.byteOffset, r = s.byteLength, d = new ArrayBuffer(r), x = new Uint8Array(c, p, r);
|
|
22
|
+
return new Uint8Array(d).set(x), new DataView(d);
|
|
23
|
+
}
|
|
24
|
+
if (n === "[object Boolean]" || n === "[object Number]" || n === "[object String]") {
|
|
25
|
+
const s = e.constructor, c = new s(e.valueOf());
|
|
26
|
+
return n === "[object String]" ? _t(c, e) : re(c, e), c;
|
|
27
|
+
}
|
|
28
|
+
if (n === "[object Date]") return new Date(Number(e));
|
|
29
|
+
if (n === "[object RegExp]") {
|
|
30
|
+
const s = e, c = new RegExp(s.source, s.flags);
|
|
31
|
+
return c.lastIndex = s.lastIndex, c;
|
|
32
|
+
}
|
|
33
|
+
if (n === "[object Symbol]") return Object(Symbol.prototype.valueOf.call(e));
|
|
34
|
+
if (n === "[object Map]") {
|
|
35
|
+
const s = e, c = /* @__PURE__ */ new Map();
|
|
36
|
+
return s.forEach((p, r) => {
|
|
37
|
+
c.set(r, p);
|
|
38
|
+
}), c;
|
|
39
|
+
}
|
|
40
|
+
if (n === "[object Set]") {
|
|
41
|
+
const s = e, c = /* @__PURE__ */ new Set();
|
|
42
|
+
return s.forEach((p) => {
|
|
43
|
+
c.add(p);
|
|
44
|
+
}), c;
|
|
45
|
+
}
|
|
46
|
+
if (n === "[object Arguments]") {
|
|
47
|
+
const s = e, c = {};
|
|
48
|
+
return re(c, s), c.length = s.length, c[Symbol.iterator] = s[Symbol.iterator], c;
|
|
49
|
+
}
|
|
50
|
+
const l = {};
|
|
51
|
+
return Dt(l, e), re(l, e), Et(l, e), l;
|
|
52
|
+
}
|
|
53
|
+
function wt(e) {
|
|
54
|
+
switch (ye(e)) {
|
|
55
|
+
case ot:
|
|
56
|
+
case nt:
|
|
57
|
+
case at:
|
|
58
|
+
case it:
|
|
59
|
+
case rt:
|
|
60
|
+
case st:
|
|
61
|
+
case tt:
|
|
62
|
+
case et:
|
|
63
|
+
case $e:
|
|
64
|
+
case Qe:
|
|
65
|
+
case Ze:
|
|
66
|
+
case Je:
|
|
67
|
+
case qe:
|
|
68
|
+
case Ge:
|
|
69
|
+
case je:
|
|
70
|
+
case Xe:
|
|
71
|
+
case He:
|
|
72
|
+
case Ue:
|
|
73
|
+
case Ve:
|
|
74
|
+
case We:
|
|
75
|
+
case Ye:
|
|
76
|
+
case Ke:
|
|
77
|
+
return !0;
|
|
78
|
+
default:
|
|
79
|
+
return !1;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function re(e, n) {
|
|
83
|
+
for (const l in n) Object.hasOwn(n, l) && (e[l] = n[l]);
|
|
84
|
+
}
|
|
85
|
+
function Et(e, n) {
|
|
86
|
+
const l = Object.getOwnPropertySymbols(n);
|
|
87
|
+
for (let s = 0; s < l.length; s++) {
|
|
88
|
+
const c = l[s];
|
|
89
|
+
Object.prototype.propertyIsEnumerable.call(n, c) && (e[c] = n[c]);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function _t(e, n) {
|
|
93
|
+
const l = n.valueOf().length;
|
|
94
|
+
for (const s in n) Object.hasOwn(n, s) && (Number.isNaN(Number(s)) || Number(s) >= l) && (e[s] = n[s]);
|
|
95
|
+
}
|
|
96
|
+
function Dt(e, n) {
|
|
97
|
+
const l = Object.getPrototypeOf(n);
|
|
98
|
+
l !== null && typeof n.constructor == "function" && Object.setPrototypeOf(e, l);
|
|
99
|
+
}
|
|
100
|
+
var ae = (function() {
|
|
101
|
+
var e = /* @__PURE__ */ g(function(T, h, i, o) {
|
|
102
|
+
for (i = i || {}, o = T.length; o--; i[T[o]] = h) ;
|
|
103
|
+
return i;
|
|
104
|
+
}, "o"), n = [1, 15], l = [1, 7], s = [1, 13], c = [1, 14], p = [1, 19], r = [1, 16], d = [1, 17], x = [1, 18], y = [8, 30], S = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], E = [1, 23], A = [1, 24], z = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], _ = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], N = [1, 49], I = {
|
|
105
|
+
trace: /* @__PURE__ */ g(function() {
|
|
106
|
+
}, "trace"),
|
|
107
|
+
yy: {},
|
|
108
|
+
symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, separator: 6, SPACE: 7, EOF: 8, start: 9, BLOCK_DIAGRAM_KEY: 10, document: 11, stop: 12, statement: 13, link: 14, LINK: 15, START_LINK: 16, LINK_LABEL: 17, STR: 18, nodeStatement: 19, columnsStatement: 20, SPACE_BLOCK: 21, blockStatement: 22, classDefStatement: 23, cssClassStatement: 24, styleStatement: 25, node: 26, SIZE: 27, COLUMNS: 28, "id-block": 29, end: 30, NODE_ID: 31, nodeShapeNLabel: 32, dirList: 33, DIR: 34, NODE_DSTART: 35, NODE_DEND: 36, BLOCK_ARROW_START: 37, BLOCK_ARROW_END: 38, classDef: 39, CLASSDEF_ID: 40, CLASSDEF_STYLEOPTS: 41, DEFAULT: 42, class: 43, CLASSENTITY_IDS: 44, STYLECLASS: 45, style: 46, STYLE_ENTITY_IDS: 47, STYLE_DEFINITION_DATA: 48, $accept: 0, $end: 1 },
|
|
109
|
+
terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "NODE_ID", 34: "DIR", 35: "NODE_DSTART", 36: "NODE_DEND", 37: "BLOCK_ARROW_START", 38: "BLOCK_ARROW_END", 39: "classDef", 40: "CLASSDEF_ID", 41: "CLASSDEF_STYLEOPTS", 42: "DEFAULT", 43: "class", 44: "CLASSENTITY_IDS", 45: "STYLECLASS", 46: "style", 47: "STYLE_ENTITY_IDS", 48: "STYLE_DEFINITION_DATA" },
|
|
110
|
+
productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [33, 1], [33, 2], [32, 3], [32, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
|
|
111
|
+
performAction: /* @__PURE__ */ g(function(h, i, o, u, L, t, O) {
|
|
112
|
+
var a = t.length - 1;
|
|
113
|
+
switch (L) {
|
|
114
|
+
case 4:
|
|
115
|
+
u.getLogger().debug("Rule: separator (NL) ");
|
|
116
|
+
break;
|
|
117
|
+
case 5:
|
|
118
|
+
u.getLogger().debug("Rule: separator (Space) ");
|
|
119
|
+
break;
|
|
120
|
+
case 6:
|
|
121
|
+
u.getLogger().debug("Rule: separator (EOF) ");
|
|
122
|
+
break;
|
|
123
|
+
case 7:
|
|
124
|
+
u.getLogger().debug("Rule: hierarchy: ", t[a - 1]), u.setHierarchy(t[a - 1]);
|
|
125
|
+
break;
|
|
126
|
+
case 8:
|
|
127
|
+
u.getLogger().debug("Stop NL ");
|
|
128
|
+
break;
|
|
129
|
+
case 9:
|
|
130
|
+
u.getLogger().debug("Stop EOF ");
|
|
131
|
+
break;
|
|
132
|
+
case 10:
|
|
133
|
+
u.getLogger().debug("Stop NL2 ");
|
|
134
|
+
break;
|
|
135
|
+
case 11:
|
|
136
|
+
u.getLogger().debug("Stop EOF2 ");
|
|
137
|
+
break;
|
|
138
|
+
case 12:
|
|
139
|
+
u.getLogger().debug("Rule: statement: ", t[a]), typeof t[a].length == "number" ? this.$ = t[a] : this.$ = [t[a]];
|
|
140
|
+
break;
|
|
141
|
+
case 13:
|
|
142
|
+
u.getLogger().debug("Rule: statement #2: ", t[a - 1]), this.$ = [t[a - 1]].concat(t[a]);
|
|
143
|
+
break;
|
|
144
|
+
case 14:
|
|
145
|
+
u.getLogger().debug("Rule: link: ", t[a], h), this.$ = { edgeTypeStr: t[a], label: "" };
|
|
146
|
+
break;
|
|
147
|
+
case 15:
|
|
148
|
+
u.getLogger().debug("Rule: LABEL link: ", t[a - 3], t[a - 1], t[a]), this.$ = { edgeTypeStr: t[a], label: t[a - 1] };
|
|
149
|
+
break;
|
|
150
|
+
case 18:
|
|
151
|
+
const f = parseInt(t[a]), w = u.generateId();
|
|
152
|
+
this.$ = { id: w, type: "space", label: "", width: f, children: [] };
|
|
153
|
+
break;
|
|
154
|
+
case 23:
|
|
155
|
+
u.getLogger().debug("Rule: (nodeStatement link node) ", t[a - 2], t[a - 1], t[a], " typestr: ", t[a - 1].edgeTypeStr);
|
|
156
|
+
const C = u.edgeStrToEdgeData(t[a - 1].edgeTypeStr), M = u.edgeStrToEdgeStartData(t[a - 1].edgeTypeStr), K = u.edgeStrToThickness(t[a - 1].edgeTypeStr), b = u.edgeStrToPattern(t[a - 1].edgeTypeStr);
|
|
157
|
+
this.$ = [
|
|
158
|
+
{ id: t[a - 2].id, label: t[a - 2].label, type: t[a - 2].type, directions: t[a - 2].directions },
|
|
159
|
+
{ id: t[a - 2].id + "-" + t[a].id, start: t[a - 2].id, end: t[a].id, label: t[a - 1].label, type: "edge", thickness: K, pattern: b, directions: t[a].directions, arrowTypeEnd: C, arrowTypeStart: M },
|
|
160
|
+
{ id: t[a].id, label: t[a].label, type: u.typeStr2Type(t[a].typeStr), directions: t[a].directions }
|
|
161
|
+
];
|
|
162
|
+
break;
|
|
163
|
+
case 24:
|
|
164
|
+
u.getLogger().debug("Rule: nodeStatement (abc88 node size) ", t[a - 1], t[a]), this.$ = { id: t[a - 1].id, label: t[a - 1].label, type: u.typeStr2Type(t[a - 1].typeStr), directions: t[a - 1].directions, widthInColumns: parseInt(t[a], 10) };
|
|
165
|
+
break;
|
|
166
|
+
case 25:
|
|
167
|
+
u.getLogger().debug("Rule: nodeStatement (node) ", t[a]), this.$ = { id: t[a].id, label: t[a].label, type: u.typeStr2Type(t[a].typeStr), directions: t[a].directions, widthInColumns: 1 };
|
|
168
|
+
break;
|
|
169
|
+
case 26:
|
|
170
|
+
u.getLogger().debug("APA123", this ? this : "na"), u.getLogger().debug("COLUMNS: ", t[a]), this.$ = { type: "column-setting", columns: t[a] === "auto" ? -1 : parseInt(t[a]) };
|
|
171
|
+
break;
|
|
172
|
+
case 27:
|
|
173
|
+
u.getLogger().debug("Rule: id-block statement : ", t[a - 2], t[a - 1]), u.generateId(), this.$ = { ...t[a - 2], type: "composite", children: t[a - 1] };
|
|
174
|
+
break;
|
|
175
|
+
case 28:
|
|
176
|
+
u.getLogger().debug("Rule: blockStatement : ", t[a - 2], t[a - 1], t[a]);
|
|
177
|
+
const R = u.generateId();
|
|
178
|
+
this.$ = { id: R, type: "composite", label: "", children: t[a - 1] };
|
|
179
|
+
break;
|
|
180
|
+
case 29:
|
|
181
|
+
u.getLogger().debug("Rule: node (NODE_ID separator): ", t[a]), this.$ = { id: t[a] };
|
|
182
|
+
break;
|
|
183
|
+
case 30:
|
|
184
|
+
u.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", t[a - 1], t[a]), this.$ = { id: t[a - 1], label: t[a].label, typeStr: t[a].typeStr, directions: t[a].directions };
|
|
185
|
+
break;
|
|
186
|
+
case 31:
|
|
187
|
+
u.getLogger().debug("Rule: dirList: ", t[a]), this.$ = [t[a]];
|
|
188
|
+
break;
|
|
189
|
+
case 32:
|
|
190
|
+
u.getLogger().debug("Rule: dirList: ", t[a - 1], t[a]), this.$ = [t[a - 1]].concat(t[a]);
|
|
191
|
+
break;
|
|
192
|
+
case 33:
|
|
193
|
+
u.getLogger().debug("Rule: nodeShapeNLabel: ", t[a - 2], t[a - 1], t[a]), this.$ = { typeStr: t[a - 2] + t[a], label: t[a - 1] };
|
|
194
|
+
break;
|
|
195
|
+
case 34:
|
|
196
|
+
u.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", t[a - 3], t[a - 2], " #3:", t[a - 1], t[a]), this.$ = { typeStr: t[a - 3] + t[a], label: t[a - 2], directions: t[a - 1] };
|
|
197
|
+
break;
|
|
198
|
+
case 35:
|
|
199
|
+
case 36:
|
|
200
|
+
this.$ = { type: "classDef", id: t[a - 1].trim(), css: t[a].trim() };
|
|
201
|
+
break;
|
|
202
|
+
case 37:
|
|
203
|
+
this.$ = { type: "applyClass", id: t[a - 1].trim(), styleClass: t[a].trim() };
|
|
204
|
+
break;
|
|
205
|
+
case 38:
|
|
206
|
+
this.$ = { type: "applyStyles", id: t[a - 1].trim(), stylesStr: t[a].trim() };
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
}, "anonymous"),
|
|
210
|
+
table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: n, 11: 3, 13: 4, 19: 5, 20: 6, 21: l, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: c, 31: p, 39: r, 43: d, 46: x }, { 8: [1, 20] }, e(y, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: n, 21: l, 28: s, 29: c, 31: p, 39: r, 43: d, 46: x }), e(S, [2, 16], { 14: 22, 15: E, 16: A }), e(S, [2, 17]), e(S, [2, 18]), e(S, [2, 19]), e(S, [2, 20]), e(S, [2, 21]), e(S, [2, 22]), e(z, [2, 25], { 27: [1, 25] }), e(S, [2, 26]), { 19: 26, 26: 12, 31: p }, { 10: n, 11: 27, 13: 4, 19: 5, 20: 6, 21: l, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: c, 31: p, 39: r, 43: d, 46: x }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, e(_, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, e(y, [2, 13]), { 26: 35, 31: p }, { 31: [2, 14] }, { 17: [1, 36] }, e(z, [2, 24]), { 10: n, 11: 37, 13: 4, 14: 22, 15: E, 16: A, 19: 5, 20: 6, 21: l, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: s, 29: c, 31: p, 39: r, 43: d, 46: x }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, e(_, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(z, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(S, [2, 28]), e(S, [2, 35]), e(S, [2, 36]), e(S, [2, 37]), e(S, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: N }, { 15: [1, 50] }, e(S, [2, 27]), e(_, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: N, 38: [2, 31] }, { 31: [2, 15] }, e(_, [2, 34]), { 38: [2, 32] }],
|
|
211
|
+
defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
|
|
212
|
+
parseError: /* @__PURE__ */ g(function(h, i) {
|
|
213
|
+
if (i.recoverable)
|
|
214
|
+
this.trace(h);
|
|
215
|
+
else {
|
|
216
|
+
var o = new Error(h);
|
|
217
|
+
throw o.hash = i, o;
|
|
218
|
+
}
|
|
219
|
+
}, "parseError"),
|
|
220
|
+
parse: /* @__PURE__ */ g(function(h) {
|
|
221
|
+
var i = this, o = [0], u = [], L = [null], t = [], O = this.table, a = "", f = 0, w = 0, C = 2, M = 1, K = t.slice.call(arguments, 1), b = Object.create(this.lexer), R = { yy: {} };
|
|
222
|
+
for (var Y in this.yy)
|
|
223
|
+
Object.prototype.hasOwnProperty.call(this.yy, Y) && (R.yy[Y] = this.yy[Y]);
|
|
224
|
+
b.setInput(h, R.yy), R.yy.lexer = b, R.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
|
|
225
|
+
var H = b.yylloc;
|
|
226
|
+
t.push(H);
|
|
227
|
+
var ee = b.options && b.options.ranges;
|
|
228
|
+
typeof R.yy.parseError == "function" ? this.parseError = R.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
229
|
+
function ke(k) {
|
|
230
|
+
o.length = o.length - 2 * k, L.length = L.length - k, t.length = t.length - k;
|
|
231
|
+
}
|
|
232
|
+
g(ke, "popStack");
|
|
233
|
+
function pe() {
|
|
234
|
+
var k;
|
|
235
|
+
return k = u.pop() || b.lex() || M, typeof k != "number" && (k instanceof Array && (u = k, k = u.pop()), k = i.symbols_[k] || k), k;
|
|
236
|
+
}
|
|
237
|
+
g(pe, "lex");
|
|
238
|
+
for (var B, V, P, te, U = {}, G, W, fe, q; ; ) {
|
|
239
|
+
if (V = o[o.length - 1], this.defaultActions[V] ? P = this.defaultActions[V] : ((B === null || typeof B > "u") && (B = pe()), P = O[V] && O[V][B]), typeof P > "u" || !P.length || !P[0]) {
|
|
240
|
+
var se = "";
|
|
241
|
+
q = [];
|
|
242
|
+
for (G in O[V])
|
|
243
|
+
this.terminals_[G] && G > C && q.push("'" + this.terminals_[G] + "'");
|
|
244
|
+
b.showPosition ? se = "Parse error on line " + (f + 1) + `:
|
|
245
|
+
` + b.showPosition() + `
|
|
246
|
+
Expecting ` + q.join(", ") + ", got '" + (this.terminals_[B] || B) + "'" : se = "Parse error on line " + (f + 1) + ": Unexpected " + (B == M ? "end of input" : "'" + (this.terminals_[B] || B) + "'"), this.parseError(se, {
|
|
247
|
+
text: b.match,
|
|
248
|
+
token: this.terminals_[B] || B,
|
|
249
|
+
line: b.yylineno,
|
|
250
|
+
loc: H,
|
|
251
|
+
expected: q
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
if (P[0] instanceof Array && P.length > 1)
|
|
255
|
+
throw new Error("Parse Error: multiple actions possible at state: " + V + ", token: " + B);
|
|
256
|
+
switch (P[0]) {
|
|
257
|
+
case 1:
|
|
258
|
+
o.push(B), L.push(b.yytext), t.push(b.yylloc), o.push(P[1]), B = null, w = b.yyleng, a = b.yytext, f = b.yylineno, H = b.yylloc;
|
|
259
|
+
break;
|
|
260
|
+
case 2:
|
|
261
|
+
if (W = this.productions_[P[1]][1], U.$ = L[L.length - W], U._$ = {
|
|
262
|
+
first_line: t[t.length - (W || 1)].first_line,
|
|
263
|
+
last_line: t[t.length - 1].last_line,
|
|
264
|
+
first_column: t[t.length - (W || 1)].first_column,
|
|
265
|
+
last_column: t[t.length - 1].last_column
|
|
266
|
+
}, ee && (U._$.range = [
|
|
267
|
+
t[t.length - (W || 1)].range[0],
|
|
268
|
+
t[t.length - 1].range[1]
|
|
269
|
+
]), te = this.performAction.apply(U, [
|
|
270
|
+
a,
|
|
271
|
+
w,
|
|
272
|
+
f,
|
|
273
|
+
R.yy,
|
|
274
|
+
P[1],
|
|
275
|
+
L,
|
|
276
|
+
t
|
|
277
|
+
].concat(K)), typeof te < "u")
|
|
278
|
+
return te;
|
|
279
|
+
W && (o = o.slice(0, -1 * W * 2), L = L.slice(0, -1 * W), t = t.slice(0, -1 * W)), o.push(this.productions_[P[1]][0]), L.push(U.$), t.push(U._$), fe = O[o[o.length - 2]][o[o.length - 1]], o.push(fe);
|
|
280
|
+
break;
|
|
281
|
+
case 3:
|
|
282
|
+
return !0;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return !0;
|
|
286
|
+
}, "parse")
|
|
287
|
+
}, D = /* @__PURE__ */ (function() {
|
|
288
|
+
var T = {
|
|
289
|
+
EOF: 1,
|
|
290
|
+
parseError: /* @__PURE__ */ g(function(i, o) {
|
|
291
|
+
if (this.yy.parser)
|
|
292
|
+
this.yy.parser.parseError(i, o);
|
|
293
|
+
else
|
|
294
|
+
throw new Error(i);
|
|
295
|
+
}, "parseError"),
|
|
296
|
+
// resets the lexer, sets new input
|
|
297
|
+
setInput: /* @__PURE__ */ g(function(h, i) {
|
|
298
|
+
return this.yy = i || this.yy || {}, this._input = h, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
299
|
+
first_line: 1,
|
|
300
|
+
first_column: 0,
|
|
301
|
+
last_line: 1,
|
|
302
|
+
last_column: 0
|
|
303
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
304
|
+
}, "setInput"),
|
|
305
|
+
// consumes and returns one char from the input
|
|
306
|
+
input: /* @__PURE__ */ g(function() {
|
|
307
|
+
var h = this._input[0];
|
|
308
|
+
this.yytext += h, this.yyleng++, this.offset++, this.match += h, this.matched += h;
|
|
309
|
+
var i = h.match(/(?:\r\n?|\n).*/g);
|
|
310
|
+
return i ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), h;
|
|
311
|
+
}, "input"),
|
|
312
|
+
// unshifts one char (or a string) into the input
|
|
313
|
+
unput: /* @__PURE__ */ g(function(h) {
|
|
314
|
+
var i = h.length, o = h.split(/(?:\r\n?|\n)/g);
|
|
315
|
+
this._input = h + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - i), this.offset -= i;
|
|
316
|
+
var u = this.match.split(/(?:\r\n?|\n)/g);
|
|
317
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), o.length - 1 && (this.yylineno -= o.length - 1);
|
|
318
|
+
var L = this.yylloc.range;
|
|
319
|
+
return this.yylloc = {
|
|
320
|
+
first_line: this.yylloc.first_line,
|
|
321
|
+
last_line: this.yylineno + 1,
|
|
322
|
+
first_column: this.yylloc.first_column,
|
|
323
|
+
last_column: o ? (o.length === u.length ? this.yylloc.first_column : 0) + u[u.length - o.length].length - o[0].length : this.yylloc.first_column - i
|
|
324
|
+
}, this.options.ranges && (this.yylloc.range = [L[0], L[0] + this.yyleng - i]), this.yyleng = this.yytext.length, this;
|
|
325
|
+
}, "unput"),
|
|
326
|
+
// When called from action, caches matched text and appends it on next action
|
|
327
|
+
more: /* @__PURE__ */ g(function() {
|
|
328
|
+
return this._more = !0, this;
|
|
329
|
+
}, "more"),
|
|
330
|
+
// 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.
|
|
331
|
+
reject: /* @__PURE__ */ g(function() {
|
|
332
|
+
if (this.options.backtrack_lexer)
|
|
333
|
+
this._backtrack = !0;
|
|
334
|
+
else
|
|
335
|
+
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).
|
|
336
|
+
` + this.showPosition(), {
|
|
337
|
+
text: "",
|
|
338
|
+
token: null,
|
|
339
|
+
line: this.yylineno
|
|
340
|
+
});
|
|
341
|
+
return this;
|
|
342
|
+
}, "reject"),
|
|
343
|
+
// retain first n characters of the match
|
|
344
|
+
less: /* @__PURE__ */ g(function(h) {
|
|
345
|
+
this.unput(this.match.slice(h));
|
|
346
|
+
}, "less"),
|
|
347
|
+
// displays already matched input, i.e. for error messages
|
|
348
|
+
pastInput: /* @__PURE__ */ g(function() {
|
|
349
|
+
var h = this.matched.substr(0, this.matched.length - this.match.length);
|
|
350
|
+
return (h.length > 20 ? "..." : "") + h.substr(-20).replace(/\n/g, "");
|
|
351
|
+
}, "pastInput"),
|
|
352
|
+
// displays upcoming input, i.e. for error messages
|
|
353
|
+
upcomingInput: /* @__PURE__ */ g(function() {
|
|
354
|
+
var h = this.match;
|
|
355
|
+
return h.length < 20 && (h += this._input.substr(0, 20 - h.length)), (h.substr(0, 20) + (h.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
356
|
+
}, "upcomingInput"),
|
|
357
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
358
|
+
showPosition: /* @__PURE__ */ g(function() {
|
|
359
|
+
var h = this.pastInput(), i = new Array(h.length + 1).join("-");
|
|
360
|
+
return h + this.upcomingInput() + `
|
|
361
|
+
` + i + "^";
|
|
362
|
+
}, "showPosition"),
|
|
363
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
364
|
+
test_match: /* @__PURE__ */ g(function(h, i) {
|
|
365
|
+
var o, u, L;
|
|
366
|
+
if (this.options.backtrack_lexer && (L = {
|
|
367
|
+
yylineno: this.yylineno,
|
|
368
|
+
yylloc: {
|
|
369
|
+
first_line: this.yylloc.first_line,
|
|
370
|
+
last_line: this.last_line,
|
|
371
|
+
first_column: this.yylloc.first_column,
|
|
372
|
+
last_column: this.yylloc.last_column
|
|
373
|
+
},
|
|
374
|
+
yytext: this.yytext,
|
|
375
|
+
match: this.match,
|
|
376
|
+
matches: this.matches,
|
|
377
|
+
matched: this.matched,
|
|
378
|
+
yyleng: this.yyleng,
|
|
379
|
+
offset: this.offset,
|
|
380
|
+
_more: this._more,
|
|
381
|
+
_input: this._input,
|
|
382
|
+
yy: this.yy,
|
|
383
|
+
conditionStack: this.conditionStack.slice(0),
|
|
384
|
+
done: this.done
|
|
385
|
+
}, this.options.ranges && (L.yylloc.range = this.yylloc.range.slice(0))), u = h[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
|
|
386
|
+
first_line: this.yylloc.last_line,
|
|
387
|
+
last_line: this.yylineno + 1,
|
|
388
|
+
first_column: this.yylloc.last_column,
|
|
389
|
+
last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + h[0].length
|
|
390
|
+
}, this.yytext += h[0], this.match += h[0], this.matches = h, 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(h[0].length), this.matched += h[0], o = this.performAction.call(this, this.yy, this, i, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), o)
|
|
391
|
+
return o;
|
|
392
|
+
if (this._backtrack) {
|
|
393
|
+
for (var t in L)
|
|
394
|
+
this[t] = L[t];
|
|
395
|
+
return !1;
|
|
396
|
+
}
|
|
397
|
+
return !1;
|
|
398
|
+
}, "test_match"),
|
|
399
|
+
// return next match in input
|
|
400
|
+
next: /* @__PURE__ */ g(function() {
|
|
401
|
+
if (this.done)
|
|
402
|
+
return this.EOF;
|
|
403
|
+
this._input || (this.done = !0);
|
|
404
|
+
var h, i, o, u;
|
|
405
|
+
this._more || (this.yytext = "", this.match = "");
|
|
406
|
+
for (var L = this._currentRules(), t = 0; t < L.length; t++)
|
|
407
|
+
if (o = this._input.match(this.rules[L[t]]), o && (!i || o[0].length > i[0].length)) {
|
|
408
|
+
if (i = o, u = t, this.options.backtrack_lexer) {
|
|
409
|
+
if (h = this.test_match(o, L[t]), h !== !1)
|
|
410
|
+
return h;
|
|
411
|
+
if (this._backtrack) {
|
|
412
|
+
i = !1;
|
|
413
|
+
continue;
|
|
414
|
+
} else
|
|
415
|
+
return !1;
|
|
416
|
+
} else if (!this.options.flex)
|
|
417
|
+
break;
|
|
418
|
+
}
|
|
419
|
+
return i ? (h = this.test_match(i, L[u]), h !== !1 ? h : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
420
|
+
` + this.showPosition(), {
|
|
421
|
+
text: "",
|
|
422
|
+
token: null,
|
|
423
|
+
line: this.yylineno
|
|
424
|
+
});
|
|
425
|
+
}, "next"),
|
|
426
|
+
// return next match that has a token
|
|
427
|
+
lex: /* @__PURE__ */ g(function() {
|
|
428
|
+
var i = this.next();
|
|
429
|
+
return i || this.lex();
|
|
430
|
+
}, "lex"),
|
|
431
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
432
|
+
begin: /* @__PURE__ */ g(function(i) {
|
|
433
|
+
this.conditionStack.push(i);
|
|
434
|
+
}, "begin"),
|
|
435
|
+
// pop the previously active lexer condition state off the condition stack
|
|
436
|
+
popState: /* @__PURE__ */ g(function() {
|
|
437
|
+
var i = this.conditionStack.length - 1;
|
|
438
|
+
return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
439
|
+
}, "popState"),
|
|
440
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
441
|
+
_currentRules: /* @__PURE__ */ g(function() {
|
|
442
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
443
|
+
}, "_currentRules"),
|
|
444
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
445
|
+
topState: /* @__PURE__ */ g(function(i) {
|
|
446
|
+
return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
|
|
447
|
+
}, "topState"),
|
|
448
|
+
// alias for begin(condition)
|
|
449
|
+
pushState: /* @__PURE__ */ g(function(i) {
|
|
450
|
+
this.begin(i);
|
|
451
|
+
}, "pushState"),
|
|
452
|
+
// return the number of states currently on the stack
|
|
453
|
+
stateStackSize: /* @__PURE__ */ g(function() {
|
|
454
|
+
return this.conditionStack.length;
|
|
455
|
+
}, "stateStackSize"),
|
|
456
|
+
options: {},
|
|
457
|
+
performAction: /* @__PURE__ */ g(function(i, o, u, L) {
|
|
458
|
+
switch (u) {
|
|
459
|
+
case 0:
|
|
460
|
+
return i.getLogger().debug("Found block-beta"), 10;
|
|
461
|
+
case 1:
|
|
462
|
+
return i.getLogger().debug("Found id-block"), 29;
|
|
463
|
+
case 2:
|
|
464
|
+
return i.getLogger().debug("Found block"), 10;
|
|
465
|
+
case 3:
|
|
466
|
+
i.getLogger().debug(".", o.yytext);
|
|
467
|
+
break;
|
|
468
|
+
case 4:
|
|
469
|
+
i.getLogger().debug("_", o.yytext);
|
|
470
|
+
break;
|
|
471
|
+
case 5:
|
|
472
|
+
return 5;
|
|
473
|
+
case 6:
|
|
474
|
+
return o.yytext = -1, 28;
|
|
475
|
+
case 7:
|
|
476
|
+
return o.yytext = o.yytext.replace(/columns\s+/, ""), i.getLogger().debug("COLUMNS (LEX)", o.yytext), 28;
|
|
477
|
+
case 8:
|
|
478
|
+
this.pushState("md_string");
|
|
479
|
+
break;
|
|
480
|
+
case 9:
|
|
481
|
+
return "MD_STR";
|
|
482
|
+
case 10:
|
|
483
|
+
this.popState();
|
|
484
|
+
break;
|
|
485
|
+
case 11:
|
|
486
|
+
this.pushState("string");
|
|
487
|
+
break;
|
|
488
|
+
case 12:
|
|
489
|
+
i.getLogger().debug("LEX: POPPING STR:", o.yytext), this.popState();
|
|
490
|
+
break;
|
|
491
|
+
case 13:
|
|
492
|
+
return i.getLogger().debug("LEX: STR end:", o.yytext), "STR";
|
|
493
|
+
case 14:
|
|
494
|
+
return o.yytext = o.yytext.replace(/space\:/, ""), i.getLogger().debug("SPACE NUM (LEX)", o.yytext), 21;
|
|
495
|
+
case 15:
|
|
496
|
+
return o.yytext = "1", i.getLogger().debug("COLUMNS (LEX)", o.yytext), 21;
|
|
497
|
+
case 16:
|
|
498
|
+
return 42;
|
|
499
|
+
case 17:
|
|
500
|
+
return "LINKSTYLE";
|
|
501
|
+
case 18:
|
|
502
|
+
return "INTERPOLATE";
|
|
503
|
+
case 19:
|
|
504
|
+
return this.pushState("CLASSDEF"), 39;
|
|
505
|
+
case 20:
|
|
506
|
+
return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
|
|
507
|
+
case 21:
|
|
508
|
+
return this.popState(), this.pushState("CLASSDEFID"), 40;
|
|
509
|
+
case 22:
|
|
510
|
+
return this.popState(), 41;
|
|
511
|
+
case 23:
|
|
512
|
+
return this.pushState("CLASS"), 43;
|
|
513
|
+
case 24:
|
|
514
|
+
return this.popState(), this.pushState("CLASS_STYLE"), 44;
|
|
515
|
+
case 25:
|
|
516
|
+
return this.popState(), 45;
|
|
517
|
+
case 26:
|
|
518
|
+
return this.pushState("STYLE_STMNT"), 46;
|
|
519
|
+
case 27:
|
|
520
|
+
return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
|
|
521
|
+
case 28:
|
|
522
|
+
return this.popState(), 48;
|
|
523
|
+
case 29:
|
|
524
|
+
return this.pushState("acc_title"), "acc_title";
|
|
525
|
+
case 30:
|
|
526
|
+
return this.popState(), "acc_title_value";
|
|
527
|
+
case 31:
|
|
528
|
+
return this.pushState("acc_descr"), "acc_descr";
|
|
529
|
+
case 32:
|
|
530
|
+
return this.popState(), "acc_descr_value";
|
|
531
|
+
case 33:
|
|
532
|
+
this.pushState("acc_descr_multiline");
|
|
533
|
+
break;
|
|
534
|
+
case 34:
|
|
535
|
+
this.popState();
|
|
536
|
+
break;
|
|
537
|
+
case 35:
|
|
538
|
+
return "acc_descr_multiline_value";
|
|
539
|
+
case 36:
|
|
540
|
+
return 30;
|
|
541
|
+
case 37:
|
|
542
|
+
return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
543
|
+
case 38:
|
|
544
|
+
return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
545
|
+
case 39:
|
|
546
|
+
return this.popState(), i.getLogger().debug("Lex: ))"), "NODE_DEND";
|
|
547
|
+
case 40:
|
|
548
|
+
return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
549
|
+
case 41:
|
|
550
|
+
return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
551
|
+
case 42:
|
|
552
|
+
return this.popState(), i.getLogger().debug("Lex: (-"), "NODE_DEND";
|
|
553
|
+
case 43:
|
|
554
|
+
return this.popState(), i.getLogger().debug("Lex: -)"), "NODE_DEND";
|
|
555
|
+
case 44:
|
|
556
|
+
return this.popState(), i.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
557
|
+
case 45:
|
|
558
|
+
return this.popState(), i.getLogger().debug("Lex: ]]"), "NODE_DEND";
|
|
559
|
+
case 46:
|
|
560
|
+
return this.popState(), i.getLogger().debug("Lex: ("), "NODE_DEND";
|
|
561
|
+
case 47:
|
|
562
|
+
return this.popState(), i.getLogger().debug("Lex: ])"), "NODE_DEND";
|
|
563
|
+
case 48:
|
|
564
|
+
return this.popState(), i.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
565
|
+
case 49:
|
|
566
|
+
return this.popState(), i.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
567
|
+
case 50:
|
|
568
|
+
return this.popState(), i.getLogger().debug("Lex: )]"), "NODE_DEND";
|
|
569
|
+
case 51:
|
|
570
|
+
return this.popState(), i.getLogger().debug("Lex: )"), "NODE_DEND";
|
|
571
|
+
case 52:
|
|
572
|
+
return this.popState(), i.getLogger().debug("Lex: ]>"), "NODE_DEND";
|
|
573
|
+
case 53:
|
|
574
|
+
return this.popState(), i.getLogger().debug("Lex: ]"), "NODE_DEND";
|
|
575
|
+
case 54:
|
|
576
|
+
return i.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
|
|
577
|
+
case 55:
|
|
578
|
+
return i.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
|
|
579
|
+
case 56:
|
|
580
|
+
return i.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
|
|
581
|
+
case 57:
|
|
582
|
+
return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
583
|
+
case 58:
|
|
584
|
+
return i.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
|
|
585
|
+
case 59:
|
|
586
|
+
return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
587
|
+
case 60:
|
|
588
|
+
return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
589
|
+
case 61:
|
|
590
|
+
return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
591
|
+
case 62:
|
|
592
|
+
return i.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
|
|
593
|
+
case 63:
|
|
594
|
+
return i.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
|
|
595
|
+
case 64:
|
|
596
|
+
return i.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
597
|
+
case 65:
|
|
598
|
+
return this.pushState("NODE"), 35;
|
|
599
|
+
case 66:
|
|
600
|
+
return this.pushState("NODE"), 35;
|
|
601
|
+
case 67:
|
|
602
|
+
return this.pushState("NODE"), 35;
|
|
603
|
+
case 68:
|
|
604
|
+
return this.pushState("NODE"), 35;
|
|
605
|
+
case 69:
|
|
606
|
+
return this.pushState("NODE"), 35;
|
|
607
|
+
case 70:
|
|
608
|
+
return this.pushState("NODE"), 35;
|
|
609
|
+
case 71:
|
|
610
|
+
return this.pushState("NODE"), 35;
|
|
611
|
+
case 72:
|
|
612
|
+
return i.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
|
|
613
|
+
case 73:
|
|
614
|
+
return this.pushState("BLOCK_ARROW"), i.getLogger().debug("LEX ARR START"), 37;
|
|
615
|
+
case 74:
|
|
616
|
+
return i.getLogger().debug("Lex: NODE_ID", o.yytext), 31;
|
|
617
|
+
case 75:
|
|
618
|
+
return i.getLogger().debug("Lex: EOF", o.yytext), 8;
|
|
619
|
+
case 76:
|
|
620
|
+
this.pushState("md_string");
|
|
621
|
+
break;
|
|
622
|
+
case 77:
|
|
623
|
+
this.pushState("md_string");
|
|
624
|
+
break;
|
|
625
|
+
case 78:
|
|
626
|
+
return "NODE_DESCR";
|
|
627
|
+
case 79:
|
|
628
|
+
this.popState();
|
|
629
|
+
break;
|
|
630
|
+
case 80:
|
|
631
|
+
i.getLogger().debug("Lex: Starting string"), this.pushState("string");
|
|
632
|
+
break;
|
|
633
|
+
case 81:
|
|
634
|
+
i.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
|
|
635
|
+
break;
|
|
636
|
+
case 82:
|
|
637
|
+
return i.getLogger().debug("LEX: NODE_DESCR:", o.yytext), "NODE_DESCR";
|
|
638
|
+
case 83:
|
|
639
|
+
i.getLogger().debug("LEX POPPING"), this.popState();
|
|
640
|
+
break;
|
|
641
|
+
case 84:
|
|
642
|
+
i.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
|
|
643
|
+
break;
|
|
644
|
+
case 85:
|
|
645
|
+
return o.yytext = o.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (right): dir:", o.yytext), "DIR";
|
|
646
|
+
case 86:
|
|
647
|
+
return o.yytext = o.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (left):", o.yytext), "DIR";
|
|
648
|
+
case 87:
|
|
649
|
+
return o.yytext = o.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (x):", o.yytext), "DIR";
|
|
650
|
+
case 88:
|
|
651
|
+
return o.yytext = o.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (y):", o.yytext), "DIR";
|
|
652
|
+
case 89:
|
|
653
|
+
return o.yytext = o.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (up):", o.yytext), "DIR";
|
|
654
|
+
case 90:
|
|
655
|
+
return o.yytext = o.yytext.replace(/^,\s*/, ""), i.getLogger().debug("Lex (down):", o.yytext), "DIR";
|
|
656
|
+
case 91:
|
|
657
|
+
return o.yytext = "]>", i.getLogger().debug("Lex (ARROW_DIR end):", o.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
|
|
658
|
+
case 92:
|
|
659
|
+
return i.getLogger().debug("Lex: LINK", "#" + o.yytext + "#"), 15;
|
|
660
|
+
case 93:
|
|
661
|
+
return i.getLogger().debug("Lex: LINK", o.yytext), 15;
|
|
662
|
+
case 94:
|
|
663
|
+
return i.getLogger().debug("Lex: LINK", o.yytext), 15;
|
|
664
|
+
case 95:
|
|
665
|
+
return i.getLogger().debug("Lex: LINK", o.yytext), 15;
|
|
666
|
+
case 96:
|
|
667
|
+
return i.getLogger().debug("Lex: START_LINK", o.yytext), this.pushState("LLABEL"), 16;
|
|
668
|
+
case 97:
|
|
669
|
+
return i.getLogger().debug("Lex: START_LINK", o.yytext), this.pushState("LLABEL"), 16;
|
|
670
|
+
case 98:
|
|
671
|
+
return i.getLogger().debug("Lex: START_LINK", o.yytext), this.pushState("LLABEL"), 16;
|
|
672
|
+
case 99:
|
|
673
|
+
this.pushState("md_string");
|
|
674
|
+
break;
|
|
675
|
+
case 100:
|
|
676
|
+
return i.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
|
|
677
|
+
case 101:
|
|
678
|
+
return this.popState(), i.getLogger().debug("Lex: LINK", "#" + o.yytext + "#"), 15;
|
|
679
|
+
case 102:
|
|
680
|
+
return this.popState(), i.getLogger().debug("Lex: LINK", o.yytext), 15;
|
|
681
|
+
case 103:
|
|
682
|
+
return this.popState(), i.getLogger().debug("Lex: LINK", o.yytext), 15;
|
|
683
|
+
case 104:
|
|
684
|
+
return i.getLogger().debug("Lex: COLON", o.yytext), o.yytext = o.yytext.slice(1), 27;
|
|
685
|
+
}
|
|
686
|
+
}, "anonymous"),
|
|
687
|
+
rules: [/^(?:block-beta\b)/, /^(?:block:)/, /^(?:block\b)/, /^(?:[\s]+)/, /^(?:[\n]+)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:columns\s+auto\b)/, /^(?:columns\s+[\d]+)/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:space[:]\d+)/, /^(?:space\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\s+)/, /^(?:DEFAULT\s+)/, /^(?:\w+\s+)/, /^(?:[^\n]*)/, /^(?:class\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:style\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:end\b\s*)/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:[\)]\))/, /^(?:\}\})/, /^(?:\})/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\()/, /^(?:\]\])/, /^(?:\()/, /^(?:\]\))/, /^(?:\\\])/, /^(?:\/\])/, /^(?:\)\])/, /^(?:[\)])/, /^(?:\]>)/, /^(?:[\]])/, /^(?:-\))/, /^(?:\(-)/, /^(?:\)\))/, /^(?:\))/, /^(?:\(\(\()/, /^(?:\(\()/, /^(?:\{\{)/, /^(?:\{)/, /^(?:>)/, /^(?:\(\[)/, /^(?:\()/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\[\\)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:\[)/, /^(?:<\[)/, /^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/, /^(?:$)/, /^(?:["][`])/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:\]>\s*\()/, /^(?:,?\s*right\s*)/, /^(?:,?\s*left\s*)/, /^(?:,?\s*x\s*)/, /^(?:,?\s*y\s*)/, /^(?:,?\s*up\s*)/, /^(?:,?\s*down\s*)/, /^(?:\)\s*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:["][`])/, /^(?:["])/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?::\d+)/],
|
|
688
|
+
conditions: { STYLE_DEFINITION: { rules: [28], inclusive: !1 }, STYLE_STMNT: { rules: [27], inclusive: !1 }, CLASSDEFID: { rules: [22], inclusive: !1 }, CLASSDEF: { rules: [20, 21], inclusive: !1 }, CLASS_STYLE: { rules: [25], inclusive: !1 }, CLASS: { rules: [24], inclusive: !1 }, LLABEL: { rules: [99, 100, 101, 102, 103], inclusive: !1 }, ARROW_DIR: { rules: [85, 86, 87, 88, 89, 90, 91], inclusive: !1 }, BLOCK_ARROW: { rules: [76, 81, 84], inclusive: !1 }, NODE: { rules: [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 77, 80], inclusive: !1 }, md_string: { rules: [9, 10, 78, 79], inclusive: !1 }, space: { rules: [], inclusive: !1 }, string: { rules: [12, 13, 82, 83], inclusive: !1 }, acc_descr_multiline: { rules: [34, 35], inclusive: !1 }, acc_descr: { rules: [32], inclusive: !1 }, acc_title: { rules: [30], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18, 19, 23, 26, 29, 31, 33, 36, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 92, 93, 94, 95, 96, 97, 98, 104], inclusive: !0 } }
|
|
689
|
+
};
|
|
690
|
+
return T;
|
|
691
|
+
})();
|
|
692
|
+
I.lexer = D;
|
|
693
|
+
function v() {
|
|
694
|
+
this.yy = {};
|
|
695
|
+
}
|
|
696
|
+
return g(v, "Parser"), v.prototype = I, I.Parser = v, new v();
|
|
697
|
+
})();
|
|
698
|
+
ae.parser = ae;
|
|
699
|
+
var Tt = ae, F = /* @__PURE__ */ new Map(), ce = [], ne = /* @__PURE__ */ new Map(), Se = "color", xe = "fill", Nt = "bgFill", we = ",", Z = /* @__PURE__ */ new Map(), le = "", It = /* @__PURE__ */ g((e) => St.sanitizeText(e, me()), "sanitizeText"), Ot = /* @__PURE__ */ g(function(e, n = "") {
|
|
700
|
+
let l = Z.get(e);
|
|
701
|
+
l || (l = { id: e, styles: [], textStyles: [] }, Z.set(e, l)), n != null && n.split(we).forEach((s) => {
|
|
702
|
+
const c = s.replace(/([^;]*);/, "$1").trim();
|
|
703
|
+
if (RegExp(Se).exec(s)) {
|
|
704
|
+
const r = c.replace(xe, Nt).replace(Se, xe);
|
|
705
|
+
l.textStyles.push(r);
|
|
706
|
+
}
|
|
707
|
+
l.styles.push(c);
|
|
708
|
+
});
|
|
709
|
+
}, "addStyleClass"), Ct = /* @__PURE__ */ g(function(e, n = "") {
|
|
710
|
+
const l = F.get(e);
|
|
711
|
+
n != null && (l.styles = n.split(we));
|
|
712
|
+
}, "addStyle2Node"), vt = /* @__PURE__ */ g(function(e, n) {
|
|
713
|
+
e.split(",").forEach(function(l) {
|
|
714
|
+
let s = F.get(l);
|
|
715
|
+
if (s === void 0) {
|
|
716
|
+
const c = l.trim();
|
|
717
|
+
s = { id: c, type: "na", children: [] }, F.set(c, s);
|
|
718
|
+
}
|
|
719
|
+
s.classes || (s.classes = []), s.classes.push(n);
|
|
720
|
+
});
|
|
721
|
+
}, "setCssClass"), Ee = /* @__PURE__ */ g((e, n) => {
|
|
722
|
+
const l = e.flat(), s = [], c = l.find((r) => (r == null ? void 0 : r.type) === "column-setting"), p = (c == null ? void 0 : c.columns) ?? -1;
|
|
723
|
+
for (const r of l) {
|
|
724
|
+
if (typeof p == "number" && p > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > p && m.warn(
|
|
725
|
+
`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${p}`
|
|
726
|
+
), r.label && (r.label = It(r.label)), r.type === "classDef") {
|
|
727
|
+
Ot(r.id, r.css);
|
|
728
|
+
continue;
|
|
729
|
+
}
|
|
730
|
+
if (r.type === "applyClass") {
|
|
731
|
+
vt(r.id, (r == null ? void 0 : r.styleClass) ?? "");
|
|
732
|
+
continue;
|
|
733
|
+
}
|
|
734
|
+
if (r.type === "applyStyles") {
|
|
735
|
+
r != null && r.stylesStr && Ct(r.id, r == null ? void 0 : r.stylesStr);
|
|
736
|
+
continue;
|
|
737
|
+
}
|
|
738
|
+
if (r.type === "column-setting")
|
|
739
|
+
n.columns = r.columns ?? -1;
|
|
740
|
+
else if (r.type === "edge") {
|
|
741
|
+
const d = (ne.get(r.id) ?? 0) + 1;
|
|
742
|
+
ne.set(r.id, d), r.id = d + "-" + r.id, ce.push(r);
|
|
743
|
+
} else {
|
|
744
|
+
r.label || (r.type === "composite" ? r.label = "" : r.label = r.id);
|
|
745
|
+
const d = F.get(r.id);
|
|
746
|
+
if (d === void 0 ? F.set(r.id, r) : (r.type !== "na" && (d.type = r.type), r.label !== r.id && (d.label = r.label)), r.children && Ee(r.children, r), r.type === "space") {
|
|
747
|
+
const x = r.width ?? 1;
|
|
748
|
+
for (let y = 0; y < x; y++) {
|
|
749
|
+
const S = bt(r);
|
|
750
|
+
S.id = S.id + "-" + y, F.set(S.id, S), s.push(S);
|
|
751
|
+
}
|
|
752
|
+
} else d === void 0 && s.push(r);
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
n.children = s;
|
|
756
|
+
}, "populateBlockDatabase"), ue = [], X = { id: "root", type: "composite", children: [], columns: -1 }, At = /* @__PURE__ */ g(() => {
|
|
757
|
+
m.debug("Clear called"), ut(), X = { id: "root", type: "composite", children: [], columns: -1 }, F = /* @__PURE__ */ new Map([["root", X]]), ue = [], Z = /* @__PURE__ */ new Map(), ce = [], ne = /* @__PURE__ */ new Map(), le = "";
|
|
758
|
+
}, "clear");
|
|
759
|
+
function _e(e) {
|
|
760
|
+
switch (m.debug("typeStr2Type", e), e) {
|
|
761
|
+
case "[]":
|
|
762
|
+
return "square";
|
|
763
|
+
case "()":
|
|
764
|
+
return m.debug("we have a round"), "round";
|
|
765
|
+
case "(())":
|
|
766
|
+
return "circle";
|
|
767
|
+
case ">]":
|
|
768
|
+
return "rect_left_inv_arrow";
|
|
769
|
+
case "{}":
|
|
770
|
+
return "diamond";
|
|
771
|
+
case "{{}}":
|
|
772
|
+
return "hexagon";
|
|
773
|
+
case "([])":
|
|
774
|
+
return "stadium";
|
|
775
|
+
case "[[]]":
|
|
776
|
+
return "subroutine";
|
|
777
|
+
case "[()]":
|
|
778
|
+
return "cylinder";
|
|
779
|
+
case "((()))":
|
|
780
|
+
return "doublecircle";
|
|
781
|
+
case "[//]":
|
|
782
|
+
return "lean_right";
|
|
783
|
+
case "[\\\\]":
|
|
784
|
+
return "lean_left";
|
|
785
|
+
case "[/\\]":
|
|
786
|
+
return "trapezoid";
|
|
787
|
+
case "[\\/]":
|
|
788
|
+
return "inv_trapezoid";
|
|
789
|
+
case "<[]>":
|
|
790
|
+
return "block_arrow";
|
|
791
|
+
default:
|
|
792
|
+
return "na";
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
g(_e, "typeStr2Type");
|
|
796
|
+
function De(e) {
|
|
797
|
+
switch (m.debug("typeStr2Type", e), e) {
|
|
798
|
+
case "==":
|
|
799
|
+
return "thick";
|
|
800
|
+
default:
|
|
801
|
+
return "normal";
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
g(De, "edgeTypeStr2Type");
|
|
805
|
+
function Te(e) {
|
|
806
|
+
switch (e.trim().slice(-1)) {
|
|
807
|
+
case "x":
|
|
808
|
+
return "arrow_cross";
|
|
809
|
+
case "o":
|
|
810
|
+
return "arrow_circle";
|
|
811
|
+
case ">":
|
|
812
|
+
return "arrow_point";
|
|
813
|
+
default:
|
|
814
|
+
return "";
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
g(Te, "edgeStrToEdgeData");
|
|
818
|
+
function Ne(e) {
|
|
819
|
+
switch (e.trim().charAt(0)) {
|
|
820
|
+
case "x":
|
|
821
|
+
return "arrow_cross";
|
|
822
|
+
case "o":
|
|
823
|
+
return "arrow_circle";
|
|
824
|
+
case "<":
|
|
825
|
+
return "arrow_point";
|
|
826
|
+
default:
|
|
827
|
+
return "arrow_open";
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
g(Ne, "edgeStrToEdgeStartData");
|
|
831
|
+
function Ie(e) {
|
|
832
|
+
return e.includes("==") ? "thick" : "normal";
|
|
833
|
+
}
|
|
834
|
+
g(Ie, "edgeStrToThickness");
|
|
835
|
+
function Oe(e) {
|
|
836
|
+
return e.includes(".-") ? "dotted" : "solid";
|
|
837
|
+
}
|
|
838
|
+
g(Oe, "edgeStrToPattern");
|
|
839
|
+
var Le = 0, zt = /* @__PURE__ */ g(() => (Le++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + Le), "generateId"), Bt = /* @__PURE__ */ g((e) => {
|
|
840
|
+
X.children = e, Ee(e, X), ue = X.children;
|
|
841
|
+
}, "setHierarchy"), Rt = /* @__PURE__ */ g((e) => {
|
|
842
|
+
const n = F.get(e);
|
|
843
|
+
return n ? n.columns ? n.columns : n.children ? n.children.length : -1 : -1;
|
|
844
|
+
}, "getColumns"), kt = /* @__PURE__ */ g(() => [...F.values()], "getBlocksFlat"), Pt = /* @__PURE__ */ g(() => ue || [], "getBlocks"), Ft = /* @__PURE__ */ g(() => ce, "getEdges"), Mt = /* @__PURE__ */ g((e) => F.get(e), "getBlock"), Kt = /* @__PURE__ */ g((e) => {
|
|
845
|
+
F.set(e.id, e);
|
|
846
|
+
}, "setBlock"), Yt = /* @__PURE__ */ g((e) => {
|
|
847
|
+
le = e;
|
|
848
|
+
}, "setDiagramId"), Wt = /* @__PURE__ */ g(() => le, "getDiagramId"), Vt = /* @__PURE__ */ g(() => m, "getLogger"), Ut = /* @__PURE__ */ g(function() {
|
|
849
|
+
return Z;
|
|
850
|
+
}, "getClasses"), Ht = {
|
|
851
|
+
getConfig: /* @__PURE__ */ g(() => j().block, "getConfig"),
|
|
852
|
+
typeStr2Type: _e,
|
|
853
|
+
edgeTypeStr2Type: De,
|
|
854
|
+
edgeStrToEdgeData: Te,
|
|
855
|
+
edgeStrToEdgeStartData: Ne,
|
|
856
|
+
edgeStrToThickness: Ie,
|
|
857
|
+
edgeStrToPattern: Oe,
|
|
858
|
+
getLogger: Vt,
|
|
859
|
+
getBlocksFlat: kt,
|
|
860
|
+
getBlocks: Pt,
|
|
861
|
+
getEdges: Ft,
|
|
862
|
+
setHierarchy: Bt,
|
|
863
|
+
getBlock: Mt,
|
|
864
|
+
setBlock: Kt,
|
|
865
|
+
getColumns: Rt,
|
|
866
|
+
getClasses: Ut,
|
|
867
|
+
clear: At,
|
|
868
|
+
generateId: zt,
|
|
869
|
+
setDiagramId: Yt,
|
|
870
|
+
getDiagramId: Wt
|
|
871
|
+
}, Xt = Ht, ie = /* @__PURE__ */ g((e, n) => {
|
|
872
|
+
const l = yt, s = l(e, "r"), c = l(e, "g"), p = l(e, "b");
|
|
873
|
+
return gt(s, c, p, n);
|
|
874
|
+
}, "fade"), jt = /* @__PURE__ */ g((e) => `.label {
|
|
875
|
+
font-family: ${e.fontFamily};
|
|
876
|
+
color: ${e.nodeTextColor || e.textColor};
|
|
877
|
+
}
|
|
878
|
+
.cluster-label text {
|
|
879
|
+
fill: ${e.titleColor};
|
|
880
|
+
}
|
|
881
|
+
.cluster-label span {
|
|
882
|
+
color: ${e.titleColor};
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
.label text,span {
|
|
888
|
+
fill: ${e.nodeTextColor || e.textColor};
|
|
889
|
+
color: ${e.nodeTextColor || e.textColor};
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
.node rect,
|
|
893
|
+
.node circle,
|
|
894
|
+
.node ellipse,
|
|
895
|
+
.node polygon,
|
|
896
|
+
.node path {
|
|
897
|
+
fill: ${e.mainBkg};
|
|
898
|
+
stroke: ${e.nodeBorder};
|
|
899
|
+
stroke-width: 1px;
|
|
900
|
+
}
|
|
901
|
+
.flowchart-label text {
|
|
902
|
+
text-anchor: middle;
|
|
903
|
+
}
|
|
904
|
+
// .flowchart-label .text-outer-tspan {
|
|
905
|
+
// text-anchor: middle;
|
|
906
|
+
// }
|
|
907
|
+
// .flowchart-label .text-inner-tspan {
|
|
908
|
+
// text-anchor: start;
|
|
909
|
+
// }
|
|
910
|
+
|
|
911
|
+
.node .label {
|
|
912
|
+
text-align: center;
|
|
913
|
+
}
|
|
914
|
+
.node.clickable {
|
|
915
|
+
cursor: pointer;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
.arrowheadPath {
|
|
919
|
+
fill: ${e.arrowheadColor};
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
.edgePaths .path {
|
|
923
|
+
stroke: ${e.lineColor};
|
|
924
|
+
stroke-width: 2.0px;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
.flowchart-link {
|
|
928
|
+
stroke: ${e.lineColor};
|
|
929
|
+
fill: none;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
.edgeLabel {
|
|
933
|
+
background-color: ${e.edgeLabelBackground};
|
|
934
|
+
/*
|
|
935
|
+
* This is for backward compatibility with existing code that didn't
|
|
936
|
+
* add a \`<p>\` around edge labels.
|
|
937
|
+
*
|
|
938
|
+
* TODO: We should probably remove this in a future release.
|
|
939
|
+
*/
|
|
940
|
+
p {
|
|
941
|
+
margin: 0;
|
|
942
|
+
padding: 0;
|
|
943
|
+
display: inline;
|
|
944
|
+
}
|
|
945
|
+
rect {
|
|
946
|
+
opacity: 0.5;
|
|
947
|
+
background-color: ${e.edgeLabelBackground};
|
|
948
|
+
fill: ${e.edgeLabelBackground};
|
|
949
|
+
}
|
|
950
|
+
text-align: center;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/* For html labels only */
|
|
954
|
+
.labelBkg {
|
|
955
|
+
background-color: ${e.edgeLabelBackground};
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
.node .cluster {
|
|
959
|
+
// fill: ${ie(e.mainBkg, 0.5)};
|
|
960
|
+
fill: ${ie(e.clusterBkg, 0.5)};
|
|
961
|
+
stroke: ${ie(e.clusterBorder, 0.2)};
|
|
962
|
+
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
963
|
+
stroke-width: 1px;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
.cluster text {
|
|
967
|
+
fill: ${e.titleColor};
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
.cluster span {
|
|
971
|
+
color: ${e.titleColor};
|
|
972
|
+
}
|
|
973
|
+
/* .cluster div {
|
|
974
|
+
color: ${e.titleColor};
|
|
975
|
+
} */
|
|
976
|
+
|
|
977
|
+
div.mermaidTooltip {
|
|
978
|
+
position: absolute;
|
|
979
|
+
text-align: center;
|
|
980
|
+
max-width: 200px;
|
|
981
|
+
padding: 2px;
|
|
982
|
+
font-family: ${e.fontFamily};
|
|
983
|
+
font-size: 12px;
|
|
984
|
+
background: ${e.tertiaryColor};
|
|
985
|
+
border: 1px solid ${e.border2};
|
|
986
|
+
border-radius: 2px;
|
|
987
|
+
pointer-events: none;
|
|
988
|
+
z-index: 100;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
.flowchartTitleText {
|
|
992
|
+
text-anchor: middle;
|
|
993
|
+
font-size: 18px;
|
|
994
|
+
fill: ${e.textColor};
|
|
995
|
+
}
|
|
996
|
+
${Pe()}
|
|
997
|
+
`, "getStyles"), Gt = jt;
|
|
998
|
+
function oe(e, n) {
|
|
999
|
+
if (e === 0 || !Number.isInteger(e))
|
|
1000
|
+
throw new Error("Columns must be an integer !== 0.");
|
|
1001
|
+
if (n < 0 || !Number.isInteger(n))
|
|
1002
|
+
throw new Error("Position must be a non-negative integer." + n);
|
|
1003
|
+
if (e < 0)
|
|
1004
|
+
return { px: n, py: 0 };
|
|
1005
|
+
if (e === 1)
|
|
1006
|
+
return { px: 0, py: n };
|
|
1007
|
+
const l = n % e, s = Math.floor(n / e);
|
|
1008
|
+
return { px: l, py: s };
|
|
1009
|
+
}
|
|
1010
|
+
g(oe, "calculateBlockPosition");
|
|
1011
|
+
var qt = /* @__PURE__ */ g((e) => {
|
|
1012
|
+
let n = 0, l = 0;
|
|
1013
|
+
for (const s of e.children) {
|
|
1014
|
+
const { width: c, height: p, x: r, y: d } = s.size ?? { width: 0, height: 0, x: 0, y: 0 };
|
|
1015
|
+
if (m.debug(
|
|
1016
|
+
"getMaxChildSize abc95 child:",
|
|
1017
|
+
s.id,
|
|
1018
|
+
"width:",
|
|
1019
|
+
c,
|
|
1020
|
+
"height:",
|
|
1021
|
+
p,
|
|
1022
|
+
"x:",
|
|
1023
|
+
r,
|
|
1024
|
+
"y:",
|
|
1025
|
+
d,
|
|
1026
|
+
s.type
|
|
1027
|
+
), s.type === "space")
|
|
1028
|
+
continue;
|
|
1029
|
+
const x = c / (s.widthInColumns ?? 1);
|
|
1030
|
+
x > n && (n = x), p > l && (l = p);
|
|
1031
|
+
}
|
|
1032
|
+
return { width: n, height: l };
|
|
1033
|
+
}, "getMaxChildSize");
|
|
1034
|
+
function Q(e, n, l = 0, s = 0, c = 8) {
|
|
1035
|
+
var d, x, y, S, E, A, z, _, N, I, D;
|
|
1036
|
+
m.debug(
|
|
1037
|
+
"setBlockSizes abc95 (start)",
|
|
1038
|
+
e.id,
|
|
1039
|
+
(d = e == null ? void 0 : e.size) == null ? void 0 : d.x,
|
|
1040
|
+
"block width =",
|
|
1041
|
+
e == null ? void 0 : e.size,
|
|
1042
|
+
"siblingWidth",
|
|
1043
|
+
l
|
|
1044
|
+
), (x = e == null ? void 0 : e.size) != null && x.width || (e.size = {
|
|
1045
|
+
width: l,
|
|
1046
|
+
height: s,
|
|
1047
|
+
x: 0,
|
|
1048
|
+
y: 0
|
|
1049
|
+
});
|
|
1050
|
+
let p = 0, r = 0;
|
|
1051
|
+
if (((y = e.children) == null ? void 0 : y.length) > 0) {
|
|
1052
|
+
for (const t of e.children)
|
|
1053
|
+
Q(t, n, 0, 0, c);
|
|
1054
|
+
const v = qt(e);
|
|
1055
|
+
p = v.width, r = v.height, m.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", p, r);
|
|
1056
|
+
for (const t of e.children)
|
|
1057
|
+
t.size && (m.debug(
|
|
1058
|
+
`abc95 Setting size of children of ${e.id} id=${t.id} ${p} ${r} ${JSON.stringify(t.size)}`
|
|
1059
|
+
), t.size.width = p * (t.widthInColumns ?? 1) + c * ((t.widthInColumns ?? 1) - 1), t.size.height = r, t.size.x = 0, t.size.y = 0, m.debug(
|
|
1060
|
+
`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${p} maxHeight:${r}`
|
|
1061
|
+
));
|
|
1062
|
+
for (const t of e.children)
|
|
1063
|
+
Q(t, n, p, r, c);
|
|
1064
|
+
const T = e.columns ?? -1;
|
|
1065
|
+
let h = 0;
|
|
1066
|
+
for (const t of e.children)
|
|
1067
|
+
h += t.widthInColumns ?? 1;
|
|
1068
|
+
let i = e.children.length;
|
|
1069
|
+
T > 0 && T < h && (i = T);
|
|
1070
|
+
const o = Math.ceil(h / i);
|
|
1071
|
+
let u = i * (p + c) + c, L = o * (r + c) + c;
|
|
1072
|
+
if (u < l) {
|
|
1073
|
+
m.debug(
|
|
1074
|
+
`Detected to small sibling: abc95 ${e.id} siblingWidth ${l} siblingHeight ${s} width ${u}`
|
|
1075
|
+
), u = l, L = s;
|
|
1076
|
+
const t = (l - i * c - c) / i, O = (s - o * c - c) / o;
|
|
1077
|
+
m.debug("Size indata abc88", e.id, "childWidth", t, "maxWidth", p), m.debug("Size indata abc88", e.id, "childHeight", O, "maxHeight", r), m.debug("Size indata abc88 xSize", i, "padding", c);
|
|
1078
|
+
for (const a of e.children)
|
|
1079
|
+
a.size && (a.size.width = t, a.size.height = O, a.size.x = 0, a.size.y = 0);
|
|
1080
|
+
}
|
|
1081
|
+
if (m.debug(
|
|
1082
|
+
`abc95 (finale calc) ${e.id} xSize ${i} ySize ${o} columns ${T}${e.children.length} width=${Math.max(u, ((S = e.size) == null ? void 0 : S.width) || 0)}`
|
|
1083
|
+
), u < (((E = e == null ? void 0 : e.size) == null ? void 0 : E.width) || 0)) {
|
|
1084
|
+
u = ((A = e == null ? void 0 : e.size) == null ? void 0 : A.width) || 0;
|
|
1085
|
+
const t = T > 0 ? Math.min(e.children.length, T) : e.children.length;
|
|
1086
|
+
if (t > 0) {
|
|
1087
|
+
const O = (u - t * c - c) / t;
|
|
1088
|
+
m.debug("abc95 (growing to fit) width", e.id, u, (z = e.size) == null ? void 0 : z.width, O);
|
|
1089
|
+
for (const a of e.children)
|
|
1090
|
+
a.size && (a.size.width = O);
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
e.size = {
|
|
1094
|
+
width: u,
|
|
1095
|
+
height: L,
|
|
1096
|
+
x: 0,
|
|
1097
|
+
y: 0
|
|
1098
|
+
};
|
|
1099
|
+
}
|
|
1100
|
+
m.debug(
|
|
1101
|
+
"setBlockSizes abc94 (done)",
|
|
1102
|
+
e.id,
|
|
1103
|
+
(_ = e == null ? void 0 : e.size) == null ? void 0 : _.x,
|
|
1104
|
+
(N = e == null ? void 0 : e.size) == null ? void 0 : N.width,
|
|
1105
|
+
(I = e == null ? void 0 : e.size) == null ? void 0 : I.y,
|
|
1106
|
+
(D = e == null ? void 0 : e.size) == null ? void 0 : D.height
|
|
1107
|
+
);
|
|
1108
|
+
}
|
|
1109
|
+
g(Q, "setBlockSizes");
|
|
1110
|
+
function ge(e, n, l = 8) {
|
|
1111
|
+
var c, p, r, d, x, y, S, E, A, z, _, N, I, D, v, T, h;
|
|
1112
|
+
m.debug(
|
|
1113
|
+
`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(c = e == null ? void 0 : e.size) == null ? void 0 : c.x} y: ${(p = e == null ? void 0 : e.size) == null ? void 0 : p.y} width: ${(r = e == null ? void 0 : e.size) == null ? void 0 : r.width}`
|
|
1114
|
+
);
|
|
1115
|
+
const s = e.columns ?? -1;
|
|
1116
|
+
if (m.debug("layoutBlocks columns abc95", e.id, "=>", s, e), e.children && // find max width of children
|
|
1117
|
+
e.children.length > 0) {
|
|
1118
|
+
const i = ((x = (d = e == null ? void 0 : e.children[0]) == null ? void 0 : d.size) == null ? void 0 : x.width) ?? 0, o = e.children.length * i + (e.children.length - 1) * l;
|
|
1119
|
+
m.debug("widthOfChildren 88", o, "posX");
|
|
1120
|
+
const u = /* @__PURE__ */ new Map();
|
|
1121
|
+
{
|
|
1122
|
+
let f = 0;
|
|
1123
|
+
for (const w of e.children) {
|
|
1124
|
+
if (!w.size)
|
|
1125
|
+
continue;
|
|
1126
|
+
const { py: C } = oe(s, f), M = u.get(C) ?? 0;
|
|
1127
|
+
w.size.height > M && u.set(C, w.size.height);
|
|
1128
|
+
let K = (w == null ? void 0 : w.widthInColumns) ?? 1;
|
|
1129
|
+
s > 0 && (K = Math.min(K, s - f % s)), f += K;
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
const L = /* @__PURE__ */ new Map();
|
|
1133
|
+
{
|
|
1134
|
+
let f = 0;
|
|
1135
|
+
const w = [...u.keys()].sort((C, M) => C - M);
|
|
1136
|
+
for (const C of w)
|
|
1137
|
+
L.set(C, f), f += (u.get(C) ?? 0) + l;
|
|
1138
|
+
}
|
|
1139
|
+
let t = 0;
|
|
1140
|
+
m.debug("abc91 block?.size?.x", e.id, (y = e == null ? void 0 : e.size) == null ? void 0 : y.x);
|
|
1141
|
+
let O = (S = e == null ? void 0 : e.size) != null && S.x ? ((E = e == null ? void 0 : e.size) == null ? void 0 : E.x) + (-((A = e == null ? void 0 : e.size) == null ? void 0 : A.width) / 2 || 0) : -l, a = 0;
|
|
1142
|
+
for (const f of e.children) {
|
|
1143
|
+
const w = e;
|
|
1144
|
+
if (!f.size)
|
|
1145
|
+
continue;
|
|
1146
|
+
const { width: C, height: M } = f.size, { px: K, py: b } = oe(s, t);
|
|
1147
|
+
if (b != a && (a = b, O = (z = e == null ? void 0 : e.size) != null && z.x ? ((_ = e == null ? void 0 : e.size) == null ? void 0 : _.x) + (-((N = e == null ? void 0 : e.size) == null ? void 0 : N.width) / 2 || 0) : -l, m.debug("New row in layout for block", e.id, " and child ", f.id, a)), m.debug(
|
|
1148
|
+
`abc89 layout blocks (child) id: ${f.id} Pos: ${t} (px, py) ${K},${b} (${(I = w == null ? void 0 : w.size) == null ? void 0 : I.x},${(D = w == null ? void 0 : w.size) == null ? void 0 : D.y}) parent: ${w.id} width: ${C}${l}`
|
|
1149
|
+
), w.size) {
|
|
1150
|
+
const Y = C / 2;
|
|
1151
|
+
f.size.x = O + l + Y, m.debug(
|
|
1152
|
+
`abc91 layout blocks (calc) px, pyid:${f.id} startingPos=X${O} new startingPosX${f.size.x} ${Y} padding=${l} width=${C} halfWidth=${Y} => x:${f.size.x} y:${f.size.y} ${f.widthInColumns} (width * (child?.w || 1)) / 2 ${C * ((f == null ? void 0 : f.widthInColumns) ?? 1) / 2}`
|
|
1153
|
+
), O = f.size.x + Y;
|
|
1154
|
+
const H = L.get(b) ?? 0, ee = u.get(b) ?? M;
|
|
1155
|
+
f.size.y = w.size.y - w.size.height / 2 + H + ee / 2 + l, m.debug(
|
|
1156
|
+
`abc88 layout blocks (calc) px, pyid:${f.id}startingPosX${O}${l}${Y}=>x:${f.size.x}y:${f.size.y}${f.widthInColumns}(width * (child?.w || 1)) / 2${C * ((f == null ? void 0 : f.widthInColumns) ?? 1) / 2}`
|
|
1157
|
+
);
|
|
1158
|
+
}
|
|
1159
|
+
f.children && ge(f, n, l);
|
|
1160
|
+
let R = (f == null ? void 0 : f.widthInColumns) ?? 1;
|
|
1161
|
+
s > 0 && (R = Math.min(R, s - t % s)), t += R, m.debug("abc88 columnsPos", f, t);
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
m.debug(
|
|
1165
|
+
`layout blocks (<==layoutBlocks) ${e.id} x: ${(v = e == null ? void 0 : e.size) == null ? void 0 : v.x} y: ${(T = e == null ? void 0 : e.size) == null ? void 0 : T.y} width: ${(h = e == null ? void 0 : e.size) == null ? void 0 : h.width}`
|
|
1166
|
+
);
|
|
1167
|
+
}
|
|
1168
|
+
g(ge, "layoutBlocks");
|
|
1169
|
+
function he(e, { minX: n, minY: l, maxX: s, maxY: c } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
|
|
1170
|
+
if (e.size && e.id !== "root") {
|
|
1171
|
+
const { x: p, y: r, width: d, height: x } = e.size;
|
|
1172
|
+
p - d / 2 < n && (n = p - d / 2), r - x / 2 < l && (l = r - x / 2), p + d / 2 > s && (s = p + d / 2), r + x / 2 > c && (c = r + x / 2);
|
|
1173
|
+
}
|
|
1174
|
+
if (e.children)
|
|
1175
|
+
for (const p of e.children)
|
|
1176
|
+
({ minX: n, minY: l, maxX: s, maxY: c } = he(p, { minX: n, minY: l, maxX: s, maxY: c }));
|
|
1177
|
+
return { minX: n, minY: l, maxX: s, maxY: c };
|
|
1178
|
+
}
|
|
1179
|
+
g(he, "findBounds");
|
|
1180
|
+
function Ce(e) {
|
|
1181
|
+
var y, S;
|
|
1182
|
+
const n = e.getBlock("root");
|
|
1183
|
+
if (!n)
|
|
1184
|
+
return;
|
|
1185
|
+
const l = ((S = (y = me()) == null ? void 0 : y.block) == null ? void 0 : S.padding) ?? 8;
|
|
1186
|
+
Q(n, e, 0, 0, l), ge(n, e, l), m.debug("getBlocks", JSON.stringify(n, null, 2));
|
|
1187
|
+
const { minX: s, minY: c, maxX: p, maxY: r } = he(n), d = r - c, x = p - s;
|
|
1188
|
+
return { x: s, y: c, width: x, height: d };
|
|
1189
|
+
}
|
|
1190
|
+
g(Ce, "layout");
|
|
1191
|
+
function de(e, n, l = !1) {
|
|
1192
|
+
var _, N, I;
|
|
1193
|
+
const s = e;
|
|
1194
|
+
let c = "default";
|
|
1195
|
+
(((_ = s == null ? void 0 : s.classes) == null ? void 0 : _.length) || 0) > 0 && (c = ((s == null ? void 0 : s.classes) ?? []).join(" ")), c = c + " flowchart-label";
|
|
1196
|
+
const p = ((s == null ? void 0 : s.classes) ?? []).flatMap(
|
|
1197
|
+
(D) => {
|
|
1198
|
+
var v;
|
|
1199
|
+
return ((v = n.getClasses().get(D)) == null ? void 0 : v.styles) ?? [];
|
|
1200
|
+
}
|
|
1201
|
+
);
|
|
1202
|
+
let r = 0, d = "rect", x;
|
|
1203
|
+
switch (s.type) {
|
|
1204
|
+
case "round":
|
|
1205
|
+
r = 5, d = "rect";
|
|
1206
|
+
break;
|
|
1207
|
+
case "composite":
|
|
1208
|
+
r = 0, d = "composite", x = 0;
|
|
1209
|
+
break;
|
|
1210
|
+
case "square":
|
|
1211
|
+
d = "rect";
|
|
1212
|
+
break;
|
|
1213
|
+
case "diamond":
|
|
1214
|
+
d = "question";
|
|
1215
|
+
break;
|
|
1216
|
+
case "hexagon":
|
|
1217
|
+
d = "hexagon";
|
|
1218
|
+
break;
|
|
1219
|
+
case "block_arrow":
|
|
1220
|
+
d = "block_arrow";
|
|
1221
|
+
break;
|
|
1222
|
+
case "odd":
|
|
1223
|
+
d = "rect_left_inv_arrow";
|
|
1224
|
+
break;
|
|
1225
|
+
case "lean_right":
|
|
1226
|
+
d = "lean_right";
|
|
1227
|
+
break;
|
|
1228
|
+
case "lean_left":
|
|
1229
|
+
d = "lean_left";
|
|
1230
|
+
break;
|
|
1231
|
+
case "trapezoid":
|
|
1232
|
+
d = "trapezoid";
|
|
1233
|
+
break;
|
|
1234
|
+
case "inv_trapezoid":
|
|
1235
|
+
d = "inv_trapezoid";
|
|
1236
|
+
break;
|
|
1237
|
+
case "rect_left_inv_arrow":
|
|
1238
|
+
d = "rect_left_inv_arrow";
|
|
1239
|
+
break;
|
|
1240
|
+
case "circle":
|
|
1241
|
+
d = "circle";
|
|
1242
|
+
break;
|
|
1243
|
+
case "ellipse":
|
|
1244
|
+
d = "ellipse";
|
|
1245
|
+
break;
|
|
1246
|
+
case "stadium":
|
|
1247
|
+
d = "stadium";
|
|
1248
|
+
break;
|
|
1249
|
+
case "subroutine":
|
|
1250
|
+
d = "subroutine";
|
|
1251
|
+
break;
|
|
1252
|
+
case "cylinder":
|
|
1253
|
+
d = "cylinder";
|
|
1254
|
+
break;
|
|
1255
|
+
case "group":
|
|
1256
|
+
d = "rect";
|
|
1257
|
+
break;
|
|
1258
|
+
case "doublecircle":
|
|
1259
|
+
d = "doublecircle";
|
|
1260
|
+
break;
|
|
1261
|
+
default:
|
|
1262
|
+
d = "rect";
|
|
1263
|
+
}
|
|
1264
|
+
const y = xt((s == null ? void 0 : s.styles) ?? []), S = s.label, E = s.size ?? { width: 0, height: 0, x: 0, y: 0 }, A = n.getDiagramId();
|
|
1265
|
+
return {
|
|
1266
|
+
labelStyle: y.labelStyle,
|
|
1267
|
+
shape: d,
|
|
1268
|
+
label: S,
|
|
1269
|
+
labelText: S,
|
|
1270
|
+
rx: r,
|
|
1271
|
+
ry: r,
|
|
1272
|
+
class: c,
|
|
1273
|
+
cssClasses: c,
|
|
1274
|
+
cssStyles: (s == null ? void 0 : s.styles) ?? [],
|
|
1275
|
+
cssCompiledStyles: p,
|
|
1276
|
+
style: y.style,
|
|
1277
|
+
id: s.id,
|
|
1278
|
+
domId: A ? `${A}-${s.id}` : s.id,
|
|
1279
|
+
isGroup: !1,
|
|
1280
|
+
directions: s.directions,
|
|
1281
|
+
width: E.width || void 0,
|
|
1282
|
+
height: E.height || void 0,
|
|
1283
|
+
wrappingWidth: E.width || Number.POSITIVE_INFINITY,
|
|
1284
|
+
x: E.x,
|
|
1285
|
+
y: E.y,
|
|
1286
|
+
positioned: l,
|
|
1287
|
+
intersect: void 0,
|
|
1288
|
+
padding: x ?? ((I = (N = j()) == null ? void 0 : N.block) == null ? void 0 : I.padding) ?? 0,
|
|
1289
|
+
widthInColumns: s.widthInColumns ?? 1
|
|
1290
|
+
};
|
|
1291
|
+
}
|
|
1292
|
+
g(de, "getNodeFromBlock");
|
|
1293
|
+
async function ve(e, n, l) {
|
|
1294
|
+
var x;
|
|
1295
|
+
const s = de(n, l, !1);
|
|
1296
|
+
if (n.type === "group")
|
|
1297
|
+
return;
|
|
1298
|
+
const c = j(), p = await be(e, s, { config: c }), r = ((x = p.node()) == null ? void 0 : x.getBBox()) ?? { width: 0, height: 0 }, d = l.getBlock(s.id);
|
|
1299
|
+
d.size = { width: r.width, height: r.height, x: 0, y: 0, node: p }, l.setBlock(d), p.remove();
|
|
1300
|
+
}
|
|
1301
|
+
g(ve, "calculateBlockSize");
|
|
1302
|
+
async function Ae(e, n, l) {
|
|
1303
|
+
const s = de(n, l, !0);
|
|
1304
|
+
if (l.getBlock(s.id).type !== "space") {
|
|
1305
|
+
const p = j();
|
|
1306
|
+
await be(e, s, { config: p }), n.intersect = s == null ? void 0 : s.intersect, Lt(s);
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
g(Ae, "insertBlockPositioned");
|
|
1310
|
+
async function $(e, n, l, s) {
|
|
1311
|
+
for (const c of n)
|
|
1312
|
+
await s(e, c, l), c.children && await $(e, c.children, l, s);
|
|
1313
|
+
}
|
|
1314
|
+
g($, "performOperations");
|
|
1315
|
+
async function ze(e, n, l) {
|
|
1316
|
+
await $(e, n, l, ve);
|
|
1317
|
+
}
|
|
1318
|
+
g(ze, "calculateBlockSizes");
|
|
1319
|
+
async function Be(e, n, l) {
|
|
1320
|
+
await $(e, n, l, Ae);
|
|
1321
|
+
}
|
|
1322
|
+
g(Be, "insertBlocks");
|
|
1323
|
+
async function Re(e, n, l, s, c) {
|
|
1324
|
+
const p = new ht({
|
|
1325
|
+
multigraph: !0,
|
|
1326
|
+
compound: !0
|
|
1327
|
+
});
|
|
1328
|
+
p.setGraph({
|
|
1329
|
+
rankdir: "TB",
|
|
1330
|
+
nodesep: 10,
|
|
1331
|
+
ranksep: 10,
|
|
1332
|
+
marginx: 8,
|
|
1333
|
+
marginy: 8
|
|
1334
|
+
});
|
|
1335
|
+
for (const r of l)
|
|
1336
|
+
r.size && p.setNode(r.id, {
|
|
1337
|
+
width: r.size.width,
|
|
1338
|
+
height: r.size.height,
|
|
1339
|
+
intersect: r.intersect
|
|
1340
|
+
});
|
|
1341
|
+
for (const r of n)
|
|
1342
|
+
if (r.start && r.end) {
|
|
1343
|
+
const d = s.getBlock(r.start), x = s.getBlock(r.end);
|
|
1344
|
+
if (d != null && d.size && (x != null && x.size)) {
|
|
1345
|
+
const y = d.size, S = x.size, E = [
|
|
1346
|
+
{ x: y.x, y: y.y },
|
|
1347
|
+
{ x: y.x + (S.x - y.x) / 2, y: y.y + (S.y - y.y) / 2 },
|
|
1348
|
+
{ x: S.x, y: S.y }
|
|
1349
|
+
], A = c ? `${c}-${r.id}` : r.id, z = r.thickness === "thick" ? "edge-thickness-thick" : "edge-thickness-normal", _ = r.pattern === "dotted" ? "edge-pattern-dotted" : "edge-pattern-solid", N = `${z} ${_} flowchart-link LS-a1 LE-b1`;
|
|
1350
|
+
dt(
|
|
1351
|
+
e,
|
|
1352
|
+
{
|
|
1353
|
+
...r,
|
|
1354
|
+
id: A,
|
|
1355
|
+
arrowTypeEnd: r.arrowTypeEnd,
|
|
1356
|
+
arrowTypeStart: r.arrowTypeStart,
|
|
1357
|
+
points: E,
|
|
1358
|
+
classes: N
|
|
1359
|
+
},
|
|
1360
|
+
{},
|
|
1361
|
+
"block",
|
|
1362
|
+
p.node(r.start),
|
|
1363
|
+
p.node(r.end),
|
|
1364
|
+
c
|
|
1365
|
+
), r.label && (await pt(e, {
|
|
1366
|
+
...r,
|
|
1367
|
+
label: r.label,
|
|
1368
|
+
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
1369
|
+
arrowTypeEnd: r.arrowTypeEnd,
|
|
1370
|
+
arrowTypeStart: r.arrowTypeStart,
|
|
1371
|
+
points: E,
|
|
1372
|
+
classes: N
|
|
1373
|
+
}), ft(
|
|
1374
|
+
{ ...r, x: E[1].x, y: E[1].y },
|
|
1375
|
+
{
|
|
1376
|
+
originalPath: E
|
|
1377
|
+
}
|
|
1378
|
+
));
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
g(Re, "insertEdges");
|
|
1383
|
+
var Jt = /* @__PURE__ */ g(function(e, n) {
|
|
1384
|
+
return n.db.getClasses();
|
|
1385
|
+
}, "getClasses"), Zt = /* @__PURE__ */ g(async function(e, n, l, s) {
|
|
1386
|
+
var v;
|
|
1387
|
+
const { securityLevel: c, block: p } = j(), r = s.db;
|
|
1388
|
+
r.setDiagramId(n);
|
|
1389
|
+
let d;
|
|
1390
|
+
c === "sandbox" && (d = J("#i" + n));
|
|
1391
|
+
const x = c === "sandbox" ? J(d.nodes()[0].contentDocument.body) : J("body"), y = c === "sandbox" ? x.select(`[id="${n}"]`) : J(`[id="${n}"]`);
|
|
1392
|
+
ct(y, ["point", "circle", "cross"], s.type, n);
|
|
1393
|
+
const E = r.getBlocks(), A = r.getBlocksFlat(), z = r.getEdges(), _ = y.insert("g").attr("class", "block");
|
|
1394
|
+
await ze(_, E, r);
|
|
1395
|
+
const N = Ce(r);
|
|
1396
|
+
await Be(_, E, r), await Re(_, z, A, r, n);
|
|
1397
|
+
const I = (v = _.node()) == null ? void 0 : v.getBBox(), D = I && Number.isFinite(I.width) && Number.isFinite(I.height) ? I : N;
|
|
1398
|
+
if (D) {
|
|
1399
|
+
const T = Math.max(1, Math.round(0.125 * (D.width / D.height))), h = D.height + T + 10, i = D.width + 10, { useMaxWidth: o } = p;
|
|
1400
|
+
lt(y, h, i, !!o), m.debug("Here Bounds", N, D), y.attr(
|
|
1401
|
+
"viewBox",
|
|
1402
|
+
`${D.x - 5} ${D.y - 5} ${D.width + 10} ${D.height + 10}`
|
|
1403
|
+
);
|
|
1404
|
+
}
|
|
1405
|
+
}, "draw"), Qt = {
|
|
1406
|
+
draw: Zt,
|
|
1407
|
+
getClasses: Jt
|
|
1408
|
+
}, ss = {
|
|
1409
|
+
parser: Tt,
|
|
1410
|
+
db: Xt,
|
|
1411
|
+
renderer: Qt,
|
|
1412
|
+
styles: Gt
|
|
1413
|
+
};
|
|
1414
|
+
export {
|
|
1415
|
+
ss as diagram
|
|
1416
|
+
};
|