@readme/markdown 9.3.0 → 9.3.1

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 (122) hide show
  1. package/dist/10.node.js +20064 -19229
  2. package/dist/10.node.js.map +1 -1
  3. package/dist/122.node.js +23 -0
  4. package/dist/122.node.js.map +1 -0
  5. package/dist/{17.node.js → 135.node.js} +109 -110
  6. package/dist/135.node.js.map +1 -0
  7. package/dist/136.node.js +23 -0
  8. package/dist/136.node.js.map +1 -0
  9. package/dist/{52.node.js → 188.node.js} +211 -196
  10. package/dist/188.node.js.map +1 -0
  11. package/dist/214.node.js +1280 -0
  12. package/dist/214.node.js.map +1 -0
  13. package/dist/23.node.js +2563 -0
  14. package/dist/23.node.js.map +1 -0
  15. package/dist/{867.node.js → 311.node.js} +95 -95
  16. package/dist/{867.node.js.map → 311.node.js.map} +1 -1
  17. package/dist/{940.node.js → 339.node.js} +3 -75
  18. package/dist/339.node.js.map +1 -0
  19. package/dist/354.node.js +23 -0
  20. package/dist/354.node.js.map +1 -0
  21. package/dist/359.node.js +2001 -0
  22. package/dist/359.node.js.map +1 -0
  23. package/dist/364.node.js +4435 -0
  24. package/dist/364.node.js.map +1 -0
  25. package/dist/{429.node.js → 371.node.js} +196 -139
  26. package/dist/371.node.js.map +1 -0
  27. package/dist/{687.node.js → 38.node.js} +761 -761
  28. package/dist/38.node.js.map +1 -0
  29. package/dist/391.node.js +522 -0
  30. package/dist/391.node.js.map +1 -0
  31. package/dist/462.node.js +23 -0
  32. package/dist/462.node.js.map +1 -0
  33. package/dist/48.node.js +57 -0
  34. package/dist/48.node.js.map +1 -0
  35. package/dist/486.node.js +16267 -14851
  36. package/dist/486.node.js.map +1 -1
  37. package/dist/537.node.js +59 -0
  38. package/dist/537.node.js.map +1 -0
  39. package/dist/550.node.js +201 -1408
  40. package/dist/550.node.js.map +1 -1
  41. package/dist/{403.node.js → 572.node.js} +118 -118
  42. package/dist/572.node.js.map +1 -0
  43. package/dist/580.node.js +1324 -0
  44. package/dist/580.node.js.map +1 -0
  45. package/dist/{952.node.js → 649.node.js} +39 -39
  46. package/dist/{952.node.js.map → 649.node.js.map} +1 -1
  47. package/dist/740.node.js +23 -0
  48. package/dist/740.node.js.map +1 -0
  49. package/dist/741.node.js +23 -0
  50. package/dist/741.node.js.map +1 -0
  51. package/dist/779.node.js +57 -0
  52. package/dist/779.node.js.map +1 -0
  53. package/dist/805.node.js +1355 -0
  54. package/dist/805.node.js.map +1 -0
  55. package/dist/{246.node.js → 855.node.js} +671 -495
  56. package/dist/855.node.js.map +1 -0
  57. package/dist/{11.node.js → 870.node.js} +70 -63
  58. package/dist/870.node.js.map +1 -0
  59. package/dist/874.node.js +57 -0
  60. package/dist/874.node.js.map +1 -0
  61. package/dist/881.node.js +1344 -720
  62. package/dist/881.node.js.map +1 -1
  63. package/dist/{906.node.js → 890.node.js} +147 -147
  64. package/dist/{906.node.js.map → 890.node.js.map} +1 -1
  65. package/dist/898.node.js +361 -0
  66. package/dist/898.node.js.map +1 -0
  67. package/dist/{551.node.js → 912.node.js} +133 -133
  68. package/dist/{551.node.js.map → 912.node.js.map} +1 -1
  69. package/dist/{745.node.js → 915.node.js} +86 -85
  70. package/dist/915.node.js.map +1 -0
  71. package/dist/982.node.js +1132 -0
  72. package/dist/982.node.js.map +1 -0
  73. package/dist/995.node.js +189 -159
  74. package/dist/995.node.js.map +1 -1
  75. package/dist/lib/plain.d.ts +1 -1
  76. package/dist/main.js +1881 -331
  77. package/dist/main.node.js +1872 -332
  78. package/dist/main.node.js.map +1 -1
  79. package/package.json +1 -2
  80. package/dist/11.node.js.map +0 -1
  81. package/dist/120.node.js +0 -23
  82. package/dist/120.node.js.map +0 -1
  83. package/dist/134.node.js +0 -23
  84. package/dist/134.node.js.map +0 -1
  85. package/dist/150.node.js +0 -1892
  86. package/dist/150.node.js.map +0 -1
  87. package/dist/17.node.js.map +0 -1
  88. package/dist/246.node.js.map +0 -1
  89. package/dist/351.node.js +0 -2404
  90. package/dist/351.node.js.map +0 -1
  91. package/dist/366.node.js +0 -1185
  92. package/dist/366.node.js.map +0 -1
  93. package/dist/403.node.js.map +0 -1
  94. package/dist/429.node.js.map +0 -1
  95. package/dist/485.node.js +0 -518
  96. package/dist/485.node.js.map +0 -1
  97. package/dist/488.node.js +0 -59
  98. package/dist/488.node.js.map +0 -1
  99. package/dist/510.node.js +0 -250
  100. package/dist/510.node.js.map +0 -1
  101. package/dist/52.node.js.map +0 -1
  102. package/dist/617.node.js +0 -23
  103. package/dist/617.node.js.map +0 -1
  104. package/dist/687.node.js.map +0 -1
  105. package/dist/745.node.js.map +0 -1
  106. package/dist/775.node.js +0 -1904
  107. package/dist/775.node.js.map +0 -1
  108. package/dist/788.node.js +0 -1025
  109. package/dist/788.node.js.map +0 -1
  110. package/dist/81.node.js +0 -386
  111. package/dist/81.node.js.map +0 -1
  112. package/dist/849.node.js +0 -2590
  113. package/dist/849.node.js.map +0 -1
  114. package/dist/863.node.js +0 -23
  115. package/dist/863.node.js.map +0 -1
  116. package/dist/885.node.js +0 -52
  117. package/dist/885.node.js.map +0 -1
  118. package/dist/896.node.js +0 -1617
  119. package/dist/896.node.js.map +0 -1
  120. package/dist/91.node.js +0 -23
  121. package/dist/91.node.js.map +0 -1
  122. package/dist/940.node.js.map +0 -1
@@ -0,0 +1,1355 @@
1
+ "use strict";
2
+ exports.id = 805;
3
+ exports.ids = [805];
4
+ exports.modules = {
5
+
6
+ /***/ 7574:
7
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
+
9
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
+ /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
11
+ /* harmony export */ });
12
+ /* harmony import */ var _utils_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1404);
13
+ /* harmony import */ var _color_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9569);
14
+ /* IMPORT */
15
+
16
+
17
+ /* MAIN */
18
+ const channel = (color, channel) => {
19
+ return _utils_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A.lang.round(_color_index_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.parse(color)[channel]);
20
+ };
21
+ /* EXPORT */
22
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (channel);
23
+
24
+
25
+ /***/ }),
26
+
27
+ /***/ 5051:
28
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
29
+
30
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
31
+ /* harmony export */ A: () => (/* binding */ getDiagramElement),
32
+ /* harmony export */ P: () => (/* binding */ setupViewPortForSVG)
33
+ /* harmony export */ });
34
+ /* harmony import */ var _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3804);
35
+ /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8066);
36
+
37
+
38
+ // src/rendering-util/insertElementsForSize.js
39
+
40
+ var getDiagramElement = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((id, securityLevel) => {
41
+ let sandboxElement;
42
+ if (securityLevel === "sandbox") {
43
+ sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#i" + id);
44
+ }
45
+ const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("body");
46
+ const svg = root.select(`[id="${id}"]`);
47
+ return svg;
48
+ }, "getDiagramElement");
49
+
50
+ // src/rendering-util/setupViewPortForSVG.ts
51
+ var setupViewPortForSVG = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((svg, padding, cssDiagram, useMaxWidth) => {
52
+ svg.attr("class", cssDiagram);
53
+ const { width, height, x, y } = calculateDimensionsWithPadding(svg, padding);
54
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_0__/* .configureSvgSize */ .a$)(svg, height, width, useMaxWidth);
55
+ const viewBox = createViewBox(x, y, width, height, padding);
56
+ svg.attr("viewBox", viewBox);
57
+ _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug(`viewBox configured: ${viewBox} with padding: ${padding}`);
58
+ }, "setupViewPortForSVG");
59
+ var calculateDimensionsWithPadding = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((svg, padding) => {
60
+ const bounds = svg.node()?.getBBox() || { width: 0, height: 0, x: 0, y: 0 };
61
+ return {
62
+ width: bounds.width + padding * 2,
63
+ height: bounds.height + padding * 2,
64
+ x: bounds.x,
65
+ y: bounds.y
66
+ };
67
+ }, "calculateDimensionsWithPadding");
68
+ var createViewBox = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((x, y, width, height, padding) => {
69
+ return `${x - padding} ${y - padding} ${width} ${height}`;
70
+ }, "createViewBox");
71
+
72
+
73
+
74
+
75
+ /***/ }),
76
+
77
+ /***/ 805:
78
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
79
+
80
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
81
+ /* harmony export */ diagram: () => (/* binding */ diagram)
82
+ /* harmony export */ });
83
+ /* harmony import */ var _chunk_RZ5BOZE2_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5051);
84
+ /* harmony import */ var _chunk_TYCBKAJE_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4065);
85
+ /* harmony import */ var _chunk_IIMUDSI4_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3416);
86
+ /* harmony import */ var _chunk_VV3M67IP_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4746);
87
+ /* harmony import */ var _chunk_HRU6DDCH_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(778);
88
+ /* harmony import */ var _chunk_K557N5IZ_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7590);
89
+ /* harmony import */ var _chunk_H2D2JQ3I_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4059);
90
+ /* harmony import */ var _chunk_C3MQ5ANM_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6499);
91
+ /* harmony import */ var _chunk_O4NI6UNU_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8430);
92
+ /* harmony import */ var _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(3804);
93
+ /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(8066);
94
+ /* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(7574);
95
+ /* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(3635);
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ // src/diagrams/er/parser/erDiagram.jison
108
+ var parser = function() {
109
+ var o = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function(k, v, o2, l) {
110
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
111
+ return o2;
112
+ }, "o"), $V0 = [6, 8, 10, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 43, 44, 50], $V1 = [1, 10], $V2 = [1, 11], $V3 = [1, 12], $V4 = [1, 13], $V5 = [1, 20], $V6 = [1, 21], $V7 = [1, 22], $V8 = [1, 23], $V9 = [1, 24], $Va = [1, 19], $Vb = [1, 25], $Vc = [1, 26], $Vd = [1, 18], $Ve = [1, 33], $Vf = [1, 34], $Vg = [1, 35], $Vh = [1, 36], $Vi = [1, 37], $Vj = [6, 8, 10, 13, 15, 17, 20, 21, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 43, 44, 50, 63, 64, 65, 66, 67], $Vk = [1, 42], $Vl = [1, 43], $Vm = [1, 52], $Vn = [40, 50, 68, 69], $Vo = [1, 63], $Vp = [1, 61], $Vq = [1, 58], $Vr = [1, 62], $Vs = [1, 64], $Vt = [6, 8, 10, 13, 17, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 41, 42, 43, 44, 48, 49, 50, 63, 64, 65, 66, 67], $Vu = [63, 64, 65, 66, 67], $Vv = [1, 81], $Vw = [1, 80], $Vx = [1, 78], $Vy = [1, 79], $Vz = [6, 10, 42, 47], $VA = [6, 10, 13, 41, 42, 47, 48, 49], $VB = [1, 89], $VC = [1, 88], $VD = [1, 87], $VE = [19, 56], $VF = [1, 98], $VG = [1, 97], $VH = [19, 56, 58, 60];
113
+ var parser2 = {
114
+ trace: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function trace() {
115
+ }, "trace"),
116
+ yy: {},
117
+ symbols_: { "error": 2, "start": 3, "ER_DIAGRAM": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "entityName": 11, "relSpec": 12, "COLON": 13, "role": 14, "STYLE_SEPARATOR": 15, "idList": 16, "BLOCK_START": 17, "attributes": 18, "BLOCK_STOP": 19, "SQS": 20, "SQE": 21, "title": 22, "title_value": 23, "acc_title": 24, "acc_title_value": 25, "acc_descr": 26, "acc_descr_value": 27, "acc_descr_multiline_value": 28, "direction": 29, "classDefStatement": 30, "classStatement": 31, "styleStatement": 32, "direction_tb": 33, "direction_bt": 34, "direction_rl": 35, "direction_lr": 36, "CLASSDEF": 37, "stylesOpt": 38, "separator": 39, "UNICODE_TEXT": 40, "STYLE_TEXT": 41, "COMMA": 42, "CLASS": 43, "STYLE": 44, "style": 45, "styleComponent": 46, "SEMI": 47, "NUM": 48, "BRKT": 49, "ENTITY_NAME": 50, "attribute": 51, "attributeType": 52, "attributeName": 53, "attributeKeyTypeList": 54, "attributeComment": 55, "ATTRIBUTE_WORD": 56, "attributeKeyType": 57, ",": 58, "ATTRIBUTE_KEY": 59, "COMMENT": 60, "cardinality": 61, "relType": 62, "ZERO_OR_ONE": 63, "ZERO_OR_MORE": 64, "ONE_OR_MORE": 65, "ONLY_ONE": 66, "MD_PARENT": 67, "NON_IDENTIFYING": 68, "IDENTIFYING": 69, "WORD": 70, "$accept": 0, "$end": 1 },
118
+ terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 13: "COLON", 15: "STYLE_SEPARATOR", 17: "BLOCK_START", 19: "BLOCK_STOP", 20: "SQS", 21: "SQE", 22: "title", 23: "title_value", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "direction_tb", 34: "direction_bt", 35: "direction_rl", 36: "direction_lr", 37: "CLASSDEF", 40: "UNICODE_TEXT", 41: "STYLE_TEXT", 42: "COMMA", 43: "CLASS", 44: "STYLE", 47: "SEMI", 48: "NUM", 49: "BRKT", 50: "ENTITY_NAME", 56: "ATTRIBUTE_WORD", 58: ",", 59: "ATTRIBUTE_KEY", 60: "COMMENT", 63: "ZERO_OR_ONE", 64: "ZERO_OR_MORE", 65: "ONE_OR_MORE", 66: "ONLY_ONE", 67: "MD_PARENT", 68: "NON_IDENTIFYING", 69: "IDENTIFYING", 70: "WORD" },
119
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 5], [9, 9], [9, 7], [9, 7], [9, 4], [9, 6], [9, 3], [9, 5], [9, 1], [9, 3], [9, 7], [9, 9], [9, 6], [9, 8], [9, 4], [9, 6], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [29, 1], [29, 1], [29, 1], [29, 1], [30, 4], [16, 1], [16, 1], [16, 3], [16, 3], [31, 3], [32, 4], [38, 1], [38, 3], [45, 1], [45, 2], [39, 1], [39, 1], [39, 1], [46, 1], [46, 1], [46, 1], [46, 1], [11, 1], [11, 1], [18, 1], [18, 2], [51, 2], [51, 3], [51, 3], [51, 4], [52, 1], [53, 1], [54, 1], [54, 3], [57, 1], [55, 1], [12, 3], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [62, 1], [62, 1], [14, 1], [14, 1], [14, 1]],
120
+ performAction: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
121
+ var $0 = $$.length - 1;
122
+ switch (yystate) {
123
+ case 1:
124
+ break;
125
+ case 2:
126
+ this.$ = [];
127
+ break;
128
+ case 3:
129
+ $$[$0 - 1].push($$[$0]);
130
+ this.$ = $$[$0 - 1];
131
+ break;
132
+ case 4:
133
+ case 5:
134
+ this.$ = $$[$0];
135
+ break;
136
+ case 6:
137
+ case 7:
138
+ this.$ = [];
139
+ break;
140
+ case 8:
141
+ yy.addEntity($$[$0 - 4]);
142
+ yy.addEntity($$[$0 - 2]);
143
+ yy.addRelationship($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 3]);
144
+ break;
145
+ case 9:
146
+ yy.addEntity($$[$0 - 8]);
147
+ yy.addEntity($$[$0 - 4]);
148
+ yy.addRelationship($$[$0 - 8], $$[$0], $$[$0 - 4], $$[$0 - 5]);
149
+ yy.setClass([$$[$0 - 8]], $$[$0 - 6]);
150
+ yy.setClass([$$[$0 - 4]], $$[$0 - 2]);
151
+ break;
152
+ case 10:
153
+ yy.addEntity($$[$0 - 6]);
154
+ yy.addEntity($$[$0 - 2]);
155
+ yy.addRelationship($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 3]);
156
+ yy.setClass([$$[$0 - 6]], $$[$0 - 4]);
157
+ break;
158
+ case 11:
159
+ yy.addEntity($$[$0 - 6]);
160
+ yy.addEntity($$[$0 - 4]);
161
+ yy.addRelationship($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 5]);
162
+ yy.setClass([$$[$0 - 4]], $$[$0 - 2]);
163
+ break;
164
+ case 12:
165
+ yy.addEntity($$[$0 - 3]);
166
+ yy.addAttributes($$[$0 - 3], $$[$0 - 1]);
167
+ break;
168
+ case 13:
169
+ yy.addEntity($$[$0 - 5]);
170
+ yy.addAttributes($$[$0 - 5], $$[$0 - 1]);
171
+ yy.setClass([$$[$0 - 5]], $$[$0 - 3]);
172
+ break;
173
+ case 14:
174
+ yy.addEntity($$[$0 - 2]);
175
+ break;
176
+ case 15:
177
+ yy.addEntity($$[$0 - 4]);
178
+ yy.setClass([$$[$0 - 4]], $$[$0 - 2]);
179
+ break;
180
+ case 16:
181
+ yy.addEntity($$[$0]);
182
+ break;
183
+ case 17:
184
+ yy.addEntity($$[$0 - 2]);
185
+ yy.setClass([$$[$0 - 2]], $$[$0]);
186
+ break;
187
+ case 18:
188
+ yy.addEntity($$[$0 - 6], $$[$0 - 4]);
189
+ yy.addAttributes($$[$0 - 6], $$[$0 - 1]);
190
+ break;
191
+ case 19:
192
+ yy.addEntity($$[$0 - 8], $$[$0 - 6]);
193
+ yy.addAttributes($$[$0 - 8], $$[$0 - 1]);
194
+ yy.setClass([$$[$0 - 8]], $$[$0 - 3]);
195
+ break;
196
+ case 20:
197
+ yy.addEntity($$[$0 - 5], $$[$0 - 3]);
198
+ break;
199
+ case 21:
200
+ yy.addEntity($$[$0 - 7], $$[$0 - 5]);
201
+ yy.setClass([$$[$0 - 7]], $$[$0 - 2]);
202
+ break;
203
+ case 22:
204
+ yy.addEntity($$[$0 - 3], $$[$0 - 1]);
205
+ break;
206
+ case 23:
207
+ yy.addEntity($$[$0 - 5], $$[$0 - 3]);
208
+ yy.setClass([$$[$0 - 5]], $$[$0]);
209
+ break;
210
+ case 24:
211
+ case 25:
212
+ this.$ = $$[$0].trim();
213
+ yy.setAccTitle(this.$);
214
+ break;
215
+ case 26:
216
+ case 27:
217
+ this.$ = $$[$0].trim();
218
+ yy.setAccDescription(this.$);
219
+ break;
220
+ case 32:
221
+ yy.setDirection("TB");
222
+ break;
223
+ case 33:
224
+ yy.setDirection("BT");
225
+ break;
226
+ case 34:
227
+ yy.setDirection("RL");
228
+ break;
229
+ case 35:
230
+ yy.setDirection("LR");
231
+ break;
232
+ case 36:
233
+ this.$ = $$[$0 - 3];
234
+ yy.addClass($$[$0 - 2], $$[$0 - 1]);
235
+ break;
236
+ case 37:
237
+ case 38:
238
+ case 56:
239
+ case 64:
240
+ this.$ = [$$[$0]];
241
+ break;
242
+ case 39:
243
+ case 40:
244
+ this.$ = $$[$0 - 2].concat([$$[$0]]);
245
+ break;
246
+ case 41:
247
+ this.$ = $$[$0 - 2];
248
+ yy.setClass($$[$0 - 1], $$[$0]);
249
+ break;
250
+ case 42:
251
+ ;
252
+ this.$ = $$[$0 - 3];
253
+ yy.addCssStyles($$[$0 - 2], $$[$0 - 1]);
254
+ break;
255
+ case 43:
256
+ this.$ = [$$[$0]];
257
+ break;
258
+ case 44:
259
+ $$[$0 - 2].push($$[$0]);
260
+ this.$ = $$[$0 - 2];
261
+ break;
262
+ case 46:
263
+ this.$ = $$[$0 - 1] + $$[$0];
264
+ break;
265
+ case 54:
266
+ case 76:
267
+ case 77:
268
+ this.$ = $$[$0].replace(/"/g, "");
269
+ break;
270
+ case 55:
271
+ case 78:
272
+ this.$ = $$[$0];
273
+ break;
274
+ case 57:
275
+ $$[$0].push($$[$0 - 1]);
276
+ this.$ = $$[$0];
277
+ break;
278
+ case 58:
279
+ this.$ = { type: $$[$0 - 1], name: $$[$0] };
280
+ break;
281
+ case 59:
282
+ this.$ = { type: $$[$0 - 2], name: $$[$0 - 1], keys: $$[$0] };
283
+ break;
284
+ case 60:
285
+ this.$ = { type: $$[$0 - 2], name: $$[$0 - 1], comment: $$[$0] };
286
+ break;
287
+ case 61:
288
+ this.$ = { type: $$[$0 - 3], name: $$[$0 - 2], keys: $$[$0 - 1], comment: $$[$0] };
289
+ break;
290
+ case 62:
291
+ case 63:
292
+ case 66:
293
+ this.$ = $$[$0];
294
+ break;
295
+ case 65:
296
+ $$[$0 - 2].push($$[$0]);
297
+ this.$ = $$[$0 - 2];
298
+ break;
299
+ case 67:
300
+ this.$ = $$[$0].replace(/"/g, "");
301
+ break;
302
+ case 68:
303
+ this.$ = { cardA: $$[$0], relType: $$[$0 - 1], cardB: $$[$0 - 2] };
304
+ break;
305
+ case 69:
306
+ this.$ = yy.Cardinality.ZERO_OR_ONE;
307
+ break;
308
+ case 70:
309
+ this.$ = yy.Cardinality.ZERO_OR_MORE;
310
+ break;
311
+ case 71:
312
+ this.$ = yy.Cardinality.ONE_OR_MORE;
313
+ break;
314
+ case 72:
315
+ this.$ = yy.Cardinality.ONLY_ONE;
316
+ break;
317
+ case 73:
318
+ this.$ = yy.Cardinality.MD_PARENT;
319
+ break;
320
+ case 74:
321
+ this.$ = yy.Identification.NON_IDENTIFYING;
322
+ break;
323
+ case 75:
324
+ this.$ = yy.Identification.IDENTIFYING;
325
+ break;
326
+ }
327
+ }, "anonymous"),
328
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 22: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 14, 30: 15, 31: 16, 32: 17, 33: $V5, 34: $V6, 35: $V7, 36: $V8, 37: $V9, 40: $Va, 43: $Vb, 44: $Vc, 50: $Vd }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 27, 11: 9, 22: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 14, 30: 15, 31: 16, 32: 17, 33: $V5, 34: $V6, 35: $V7, 36: $V8, 37: $V9, 40: $Va, 43: $Vb, 44: $Vc, 50: $Vd }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 16], { 12: 28, 61: 32, 15: [1, 29], 17: [1, 30], 20: [1, 31], 63: $Ve, 64: $Vf, 65: $Vg, 66: $Vh, 67: $Vi }), { 23: [1, 38] }, { 25: [1, 39] }, { 27: [1, 40] }, o($V0, [2, 27]), o($V0, [2, 28]), o($V0, [2, 29]), o($V0, [2, 30]), o($V0, [2, 31]), o($Vj, [2, 54]), o($Vj, [2, 55]), o($V0, [2, 32]), o($V0, [2, 33]), o($V0, [2, 34]), o($V0, [2, 35]), { 16: 41, 40: $Vk, 41: $Vl }, { 16: 44, 40: $Vk, 41: $Vl }, { 16: 45, 40: $Vk, 41: $Vl }, o($V0, [2, 4]), { 11: 46, 40: $Va, 50: $Vd }, { 16: 47, 40: $Vk, 41: $Vl }, { 18: 48, 19: [1, 49], 51: 50, 52: 51, 56: $Vm }, { 11: 53, 40: $Va, 50: $Vd }, { 62: 54, 68: [1, 55], 69: [1, 56] }, o($Vn, [2, 69]), o($Vn, [2, 70]), o($Vn, [2, 71]), o($Vn, [2, 72]), o($Vn, [2, 73]), o($V0, [2, 24]), o($V0, [2, 25]), o($V0, [2, 26]), { 13: $Vo, 38: 57, 41: $Vp, 42: $Vq, 45: 59, 46: 60, 48: $Vr, 49: $Vs }, o($Vt, [2, 37]), o($Vt, [2, 38]), { 16: 65, 40: $Vk, 41: $Vl, 42: $Vq }, { 13: $Vo, 38: 66, 41: $Vp, 42: $Vq, 45: 59, 46: 60, 48: $Vr, 49: $Vs }, { 13: [1, 67], 15: [1, 68] }, o($V0, [2, 17], { 61: 32, 12: 69, 17: [1, 70], 42: $Vq, 63: $Ve, 64: $Vf, 65: $Vg, 66: $Vh, 67: $Vi }), { 19: [1, 71] }, o($V0, [2, 14]), { 18: 72, 19: [2, 56], 51: 50, 52: 51, 56: $Vm }, { 53: 73, 56: [1, 74] }, { 56: [2, 62] }, { 21: [1, 75] }, { 61: 76, 63: $Ve, 64: $Vf, 65: $Vg, 66: $Vh, 67: $Vi }, o($Vu, [2, 74]), o($Vu, [2, 75]), { 6: $Vv, 10: $Vw, 39: 77, 42: $Vx, 47: $Vy }, { 40: [1, 82], 41: [1, 83] }, o($Vz, [2, 43], { 46: 84, 13: $Vo, 41: $Vp, 48: $Vr, 49: $Vs }), o($VA, [2, 45]), o($VA, [2, 50]), o($VA, [2, 51]), o($VA, [2, 52]), o($VA, [2, 53]), o($V0, [2, 41], { 42: $Vq }), { 6: $Vv, 10: $Vw, 39: 85, 42: $Vx, 47: $Vy }, { 14: 86, 40: $VB, 50: $VC, 70: $VD }, { 16: 90, 40: $Vk, 41: $Vl }, { 11: 91, 40: $Va, 50: $Vd }, { 18: 92, 19: [1, 93], 51: 50, 52: 51, 56: $Vm }, o($V0, [2, 12]), { 19: [2, 57] }, o($VE, [2, 58], { 54: 94, 55: 95, 57: 96, 59: $VF, 60: $VG }), o([19, 56, 59, 60], [2, 63]), o($V0, [2, 22], { 15: [1, 100], 17: [1, 99] }), o([40, 50], [2, 68]), o($V0, [2, 36]), { 13: $Vo, 41: $Vp, 45: 101, 46: 60, 48: $Vr, 49: $Vs }, o($V0, [2, 47]), o($V0, [2, 48]), o($V0, [2, 49]), o($Vt, [2, 39]), o($Vt, [2, 40]), o($VA, [2, 46]), o($V0, [2, 42]), o($V0, [2, 8]), o($V0, [2, 76]), o($V0, [2, 77]), o($V0, [2, 78]), { 13: [1, 102], 42: $Vq }, { 13: [1, 104], 15: [1, 103] }, { 19: [1, 105] }, o($V0, [2, 15]), o($VE, [2, 59], { 55: 106, 58: [1, 107], 60: $VG }), o($VE, [2, 60]), o($VH, [2, 64]), o($VE, [2, 67]), o($VH, [2, 66]), { 18: 108, 19: [1, 109], 51: 50, 52: 51, 56: $Vm }, { 16: 110, 40: $Vk, 41: $Vl }, o($Vz, [2, 44], { 46: 84, 13: $Vo, 41: $Vp, 48: $Vr, 49: $Vs }), { 14: 111, 40: $VB, 50: $VC, 70: $VD }, { 16: 112, 40: $Vk, 41: $Vl }, { 14: 113, 40: $VB, 50: $VC, 70: $VD }, o($V0, [2, 13]), o($VE, [2, 61]), { 57: 114, 59: $VF }, { 19: [1, 115] }, o($V0, [2, 20]), o($V0, [2, 23], { 17: [1, 116], 42: $Vq }), o($V0, [2, 11]), { 13: [1, 117], 42: $Vq }, o($V0, [2, 10]), o($VH, [2, 65]), o($V0, [2, 18]), { 18: 118, 19: [1, 119], 51: 50, 52: 51, 56: $Vm }, { 14: 120, 40: $VB, 50: $VC, 70: $VD }, { 19: [1, 121] }, o($V0, [2, 21]), o($V0, [2, 9]), o($V0, [2, 19])],
329
+ defaultActions: { 52: [2, 62], 72: [2, 57] },
330
+ parseError: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function parseError(str, hash) {
331
+ if (hash.recoverable) {
332
+ this.trace(str);
333
+ } else {
334
+ var error = new Error(str);
335
+ error.hash = hash;
336
+ throw error;
337
+ }
338
+ }, "parseError"),
339
+ parse: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function parse(input) {
340
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
341
+ var args = lstack.slice.call(arguments, 1);
342
+ var lexer2 = Object.create(this.lexer);
343
+ var sharedState = { yy: {} };
344
+ for (var k in this.yy) {
345
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
346
+ sharedState.yy[k] = this.yy[k];
347
+ }
348
+ }
349
+ lexer2.setInput(input, sharedState.yy);
350
+ sharedState.yy.lexer = lexer2;
351
+ sharedState.yy.parser = this;
352
+ if (typeof lexer2.yylloc == "undefined") {
353
+ lexer2.yylloc = {};
354
+ }
355
+ var yyloc = lexer2.yylloc;
356
+ lstack.push(yyloc);
357
+ var ranges = lexer2.options && lexer2.options.ranges;
358
+ if (typeof sharedState.yy.parseError === "function") {
359
+ this.parseError = sharedState.yy.parseError;
360
+ } else {
361
+ this.parseError = Object.getPrototypeOf(this).parseError;
362
+ }
363
+ function popStack(n) {
364
+ stack.length = stack.length - 2 * n;
365
+ vstack.length = vstack.length - n;
366
+ lstack.length = lstack.length - n;
367
+ }
368
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(popStack, "popStack");
369
+ function lex() {
370
+ var token;
371
+ token = tstack.pop() || lexer2.lex() || EOF;
372
+ if (typeof token !== "number") {
373
+ if (token instanceof Array) {
374
+ tstack = token;
375
+ token = tstack.pop();
376
+ }
377
+ token = self.symbols_[token] || token;
378
+ }
379
+ return token;
380
+ }
381
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(lex, "lex");
382
+ var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
383
+ while (true) {
384
+ state = stack[stack.length - 1];
385
+ if (this.defaultActions[state]) {
386
+ action = this.defaultActions[state];
387
+ } else {
388
+ if (symbol === null || typeof symbol == "undefined") {
389
+ symbol = lex();
390
+ }
391
+ action = table[state] && table[state][symbol];
392
+ }
393
+ if (typeof action === "undefined" || !action.length || !action[0]) {
394
+ var errStr = "";
395
+ expected = [];
396
+ for (p in table[state]) {
397
+ if (this.terminals_[p] && p > TERROR) {
398
+ expected.push("'" + this.terminals_[p] + "'");
399
+ }
400
+ }
401
+ if (lexer2.showPosition) {
402
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
403
+ } else {
404
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
405
+ }
406
+ this.parseError(errStr, {
407
+ text: lexer2.match,
408
+ token: this.terminals_[symbol] || symbol,
409
+ line: lexer2.yylineno,
410
+ loc: yyloc,
411
+ expected
412
+ });
413
+ }
414
+ if (action[0] instanceof Array && action.length > 1) {
415
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
416
+ }
417
+ switch (action[0]) {
418
+ case 1:
419
+ stack.push(symbol);
420
+ vstack.push(lexer2.yytext);
421
+ lstack.push(lexer2.yylloc);
422
+ stack.push(action[1]);
423
+ symbol = null;
424
+ if (!preErrorSymbol) {
425
+ yyleng = lexer2.yyleng;
426
+ yytext = lexer2.yytext;
427
+ yylineno = lexer2.yylineno;
428
+ yyloc = lexer2.yylloc;
429
+ if (recovering > 0) {
430
+ recovering--;
431
+ }
432
+ } else {
433
+ symbol = preErrorSymbol;
434
+ preErrorSymbol = null;
435
+ }
436
+ break;
437
+ case 2:
438
+ len = this.productions_[action[1]][1];
439
+ yyval.$ = vstack[vstack.length - len];
440
+ yyval._$ = {
441
+ first_line: lstack[lstack.length - (len || 1)].first_line,
442
+ last_line: lstack[lstack.length - 1].last_line,
443
+ first_column: lstack[lstack.length - (len || 1)].first_column,
444
+ last_column: lstack[lstack.length - 1].last_column
445
+ };
446
+ if (ranges) {
447
+ yyval._$.range = [
448
+ lstack[lstack.length - (len || 1)].range[0],
449
+ lstack[lstack.length - 1].range[1]
450
+ ];
451
+ }
452
+ r = this.performAction.apply(yyval, [
453
+ yytext,
454
+ yyleng,
455
+ yylineno,
456
+ sharedState.yy,
457
+ action[1],
458
+ vstack,
459
+ lstack
460
+ ].concat(args));
461
+ if (typeof r !== "undefined") {
462
+ return r;
463
+ }
464
+ if (len) {
465
+ stack = stack.slice(0, -1 * len * 2);
466
+ vstack = vstack.slice(0, -1 * len);
467
+ lstack = lstack.slice(0, -1 * len);
468
+ }
469
+ stack.push(this.productions_[action[1]][0]);
470
+ vstack.push(yyval.$);
471
+ lstack.push(yyval._$);
472
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
473
+ stack.push(newState);
474
+ break;
475
+ case 3:
476
+ return true;
477
+ }
478
+ }
479
+ return true;
480
+ }, "parse")
481
+ };
482
+ var lexer = /* @__PURE__ */ function() {
483
+ var lexer2 = {
484
+ EOF: 1,
485
+ parseError: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function parseError(str, hash) {
486
+ if (this.yy.parser) {
487
+ this.yy.parser.parseError(str, hash);
488
+ } else {
489
+ throw new Error(str);
490
+ }
491
+ }, "parseError"),
492
+ // resets the lexer, sets new input
493
+ setInput: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function(input, yy) {
494
+ this.yy = yy || this.yy || {};
495
+ this._input = input;
496
+ this._more = this._backtrack = this.done = false;
497
+ this.yylineno = this.yyleng = 0;
498
+ this.yytext = this.matched = this.match = "";
499
+ this.conditionStack = ["INITIAL"];
500
+ this.yylloc = {
501
+ first_line: 1,
502
+ first_column: 0,
503
+ last_line: 1,
504
+ last_column: 0
505
+ };
506
+ if (this.options.ranges) {
507
+ this.yylloc.range = [0, 0];
508
+ }
509
+ this.offset = 0;
510
+ return this;
511
+ }, "setInput"),
512
+ // consumes and returns one char from the input
513
+ input: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function() {
514
+ var ch = this._input[0];
515
+ this.yytext += ch;
516
+ this.yyleng++;
517
+ this.offset++;
518
+ this.match += ch;
519
+ this.matched += ch;
520
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
521
+ if (lines) {
522
+ this.yylineno++;
523
+ this.yylloc.last_line++;
524
+ } else {
525
+ this.yylloc.last_column++;
526
+ }
527
+ if (this.options.ranges) {
528
+ this.yylloc.range[1]++;
529
+ }
530
+ this._input = this._input.slice(1);
531
+ return ch;
532
+ }, "input"),
533
+ // unshifts one char (or a string) into the input
534
+ unput: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function(ch) {
535
+ var len = ch.length;
536
+ var lines = ch.split(/(?:\r\n?|\n)/g);
537
+ this._input = ch + this._input;
538
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
539
+ this.offset -= len;
540
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
541
+ this.match = this.match.substr(0, this.match.length - 1);
542
+ this.matched = this.matched.substr(0, this.matched.length - 1);
543
+ if (lines.length - 1) {
544
+ this.yylineno -= lines.length - 1;
545
+ }
546
+ var r = this.yylloc.range;
547
+ this.yylloc = {
548
+ first_line: this.yylloc.first_line,
549
+ last_line: this.yylineno + 1,
550
+ first_column: this.yylloc.first_column,
551
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
552
+ };
553
+ if (this.options.ranges) {
554
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
555
+ }
556
+ this.yyleng = this.yytext.length;
557
+ return this;
558
+ }, "unput"),
559
+ // When called from action, caches matched text and appends it on next action
560
+ more: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function() {
561
+ this._more = true;
562
+ return this;
563
+ }, "more"),
564
+ // 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.
565
+ reject: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function() {
566
+ if (this.options.backtrack_lexer) {
567
+ this._backtrack = true;
568
+ } else {
569
+ 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).\n" + this.showPosition(), {
570
+ text: "",
571
+ token: null,
572
+ line: this.yylineno
573
+ });
574
+ }
575
+ return this;
576
+ }, "reject"),
577
+ // retain first n characters of the match
578
+ less: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function(n) {
579
+ this.unput(this.match.slice(n));
580
+ }, "less"),
581
+ // displays already matched input, i.e. for error messages
582
+ pastInput: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function() {
583
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
584
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
585
+ }, "pastInput"),
586
+ // displays upcoming input, i.e. for error messages
587
+ upcomingInput: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function() {
588
+ var next = this.match;
589
+ if (next.length < 20) {
590
+ next += this._input.substr(0, 20 - next.length);
591
+ }
592
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
593
+ }, "upcomingInput"),
594
+ // displays the character position where the lexing error occurred, i.e. for error messages
595
+ showPosition: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function() {
596
+ var pre = this.pastInput();
597
+ var c = new Array(pre.length + 1).join("-");
598
+ return pre + this.upcomingInput() + "\n" + c + "^";
599
+ }, "showPosition"),
600
+ // test the lexed token: return FALSE when not a match, otherwise return token
601
+ test_match: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function(match, indexed_rule) {
602
+ var token, lines, backup;
603
+ if (this.options.backtrack_lexer) {
604
+ backup = {
605
+ yylineno: this.yylineno,
606
+ yylloc: {
607
+ first_line: this.yylloc.first_line,
608
+ last_line: this.last_line,
609
+ first_column: this.yylloc.first_column,
610
+ last_column: this.yylloc.last_column
611
+ },
612
+ yytext: this.yytext,
613
+ match: this.match,
614
+ matches: this.matches,
615
+ matched: this.matched,
616
+ yyleng: this.yyleng,
617
+ offset: this.offset,
618
+ _more: this._more,
619
+ _input: this._input,
620
+ yy: this.yy,
621
+ conditionStack: this.conditionStack.slice(0),
622
+ done: this.done
623
+ };
624
+ if (this.options.ranges) {
625
+ backup.yylloc.range = this.yylloc.range.slice(0);
626
+ }
627
+ }
628
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
629
+ if (lines) {
630
+ this.yylineno += lines.length;
631
+ }
632
+ this.yylloc = {
633
+ first_line: this.yylloc.last_line,
634
+ last_line: this.yylineno + 1,
635
+ first_column: this.yylloc.last_column,
636
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
637
+ };
638
+ this.yytext += match[0];
639
+ this.match += match[0];
640
+ this.matches = match;
641
+ this.yyleng = this.yytext.length;
642
+ if (this.options.ranges) {
643
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
644
+ }
645
+ this._more = false;
646
+ this._backtrack = false;
647
+ this._input = this._input.slice(match[0].length);
648
+ this.matched += match[0];
649
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
650
+ if (this.done && this._input) {
651
+ this.done = false;
652
+ }
653
+ if (token) {
654
+ return token;
655
+ } else if (this._backtrack) {
656
+ for (var k in backup) {
657
+ this[k] = backup[k];
658
+ }
659
+ return false;
660
+ }
661
+ return false;
662
+ }, "test_match"),
663
+ // return next match in input
664
+ next: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function() {
665
+ if (this.done) {
666
+ return this.EOF;
667
+ }
668
+ if (!this._input) {
669
+ this.done = true;
670
+ }
671
+ var token, match, tempMatch, index;
672
+ if (!this._more) {
673
+ this.yytext = "";
674
+ this.match = "";
675
+ }
676
+ var rules = this._currentRules();
677
+ for (var i = 0; i < rules.length; i++) {
678
+ tempMatch = this._input.match(this.rules[rules[i]]);
679
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
680
+ match = tempMatch;
681
+ index = i;
682
+ if (this.options.backtrack_lexer) {
683
+ token = this.test_match(tempMatch, rules[i]);
684
+ if (token !== false) {
685
+ return token;
686
+ } else if (this._backtrack) {
687
+ match = false;
688
+ continue;
689
+ } else {
690
+ return false;
691
+ }
692
+ } else if (!this.options.flex) {
693
+ break;
694
+ }
695
+ }
696
+ }
697
+ if (match) {
698
+ token = this.test_match(match, rules[index]);
699
+ if (token !== false) {
700
+ return token;
701
+ }
702
+ return false;
703
+ }
704
+ if (this._input === "") {
705
+ return this.EOF;
706
+ } else {
707
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
708
+ text: "",
709
+ token: null,
710
+ line: this.yylineno
711
+ });
712
+ }
713
+ }, "next"),
714
+ // return next match that has a token
715
+ lex: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function lex() {
716
+ var r = this.next();
717
+ if (r) {
718
+ return r;
719
+ } else {
720
+ return this.lex();
721
+ }
722
+ }, "lex"),
723
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
724
+ begin: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function begin(condition) {
725
+ this.conditionStack.push(condition);
726
+ }, "begin"),
727
+ // pop the previously active lexer condition state off the condition stack
728
+ popState: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function popState() {
729
+ var n = this.conditionStack.length - 1;
730
+ if (n > 0) {
731
+ return this.conditionStack.pop();
732
+ } else {
733
+ return this.conditionStack[0];
734
+ }
735
+ }, "popState"),
736
+ // produce the lexer rule set which is active for the currently active lexer condition state
737
+ _currentRules: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function _currentRules() {
738
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
739
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
740
+ } else {
741
+ return this.conditions["INITIAL"].rules;
742
+ }
743
+ }, "_currentRules"),
744
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
745
+ topState: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function topState(n) {
746
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
747
+ if (n >= 0) {
748
+ return this.conditionStack[n];
749
+ } else {
750
+ return "INITIAL";
751
+ }
752
+ }, "topState"),
753
+ // alias for begin(condition)
754
+ pushState: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function pushState(condition) {
755
+ this.begin(condition);
756
+ }, "pushState"),
757
+ // return the number of states currently on the stack
758
+ stateStackSize: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function stateStackSize() {
759
+ return this.conditionStack.length;
760
+ }, "stateStackSize"),
761
+ options: { "case-insensitive": true },
762
+ performAction: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
763
+ var YYSTATE = YY_START;
764
+ switch ($avoiding_name_collisions) {
765
+ case 0:
766
+ this.begin("acc_title");
767
+ return 24;
768
+ break;
769
+ case 1:
770
+ this.popState();
771
+ return "acc_title_value";
772
+ break;
773
+ case 2:
774
+ this.begin("acc_descr");
775
+ return 26;
776
+ break;
777
+ case 3:
778
+ this.popState();
779
+ return "acc_descr_value";
780
+ break;
781
+ case 4:
782
+ this.begin("acc_descr_multiline");
783
+ break;
784
+ case 5:
785
+ this.popState();
786
+ break;
787
+ case 6:
788
+ return "acc_descr_multiline_value";
789
+ break;
790
+ case 7:
791
+ return 33;
792
+ break;
793
+ case 8:
794
+ return 34;
795
+ break;
796
+ case 9:
797
+ return 35;
798
+ break;
799
+ case 10:
800
+ return 36;
801
+ break;
802
+ case 11:
803
+ return 10;
804
+ break;
805
+ case 12:
806
+ break;
807
+ case 13:
808
+ return 8;
809
+ break;
810
+ case 14:
811
+ return 50;
812
+ break;
813
+ case 15:
814
+ return 70;
815
+ break;
816
+ case 16:
817
+ return 4;
818
+ break;
819
+ case 17:
820
+ this.begin("block");
821
+ return 17;
822
+ break;
823
+ case 18:
824
+ return 49;
825
+ break;
826
+ case 19:
827
+ return 49;
828
+ break;
829
+ case 20:
830
+ return 42;
831
+ break;
832
+ case 21:
833
+ return 15;
834
+ break;
835
+ case 22:
836
+ return 13;
837
+ break;
838
+ case 23:
839
+ break;
840
+ case 24:
841
+ return 59;
842
+ break;
843
+ case 25:
844
+ return 56;
845
+ break;
846
+ case 26:
847
+ return 56;
848
+ break;
849
+ case 27:
850
+ return 60;
851
+ break;
852
+ case 28:
853
+ break;
854
+ case 29:
855
+ this.popState();
856
+ return 19;
857
+ break;
858
+ case 30:
859
+ return yy_.yytext[0];
860
+ break;
861
+ case 31:
862
+ return 20;
863
+ break;
864
+ case 32:
865
+ return 21;
866
+ break;
867
+ case 33:
868
+ this.begin("style");
869
+ return 44;
870
+ break;
871
+ case 34:
872
+ this.popState();
873
+ return 10;
874
+ break;
875
+ case 35:
876
+ break;
877
+ case 36:
878
+ return 13;
879
+ break;
880
+ case 37:
881
+ return 42;
882
+ break;
883
+ case 38:
884
+ return 49;
885
+ break;
886
+ case 39:
887
+ this.begin("style");
888
+ return 37;
889
+ break;
890
+ case 40:
891
+ return 43;
892
+ break;
893
+ case 41:
894
+ return 63;
895
+ break;
896
+ case 42:
897
+ return 65;
898
+ break;
899
+ case 43:
900
+ return 65;
901
+ break;
902
+ case 44:
903
+ return 65;
904
+ break;
905
+ case 45:
906
+ return 63;
907
+ break;
908
+ case 46:
909
+ return 63;
910
+ break;
911
+ case 47:
912
+ return 64;
913
+ break;
914
+ case 48:
915
+ return 64;
916
+ break;
917
+ case 49:
918
+ return 64;
919
+ break;
920
+ case 50:
921
+ return 64;
922
+ break;
923
+ case 51:
924
+ return 64;
925
+ break;
926
+ case 52:
927
+ return 65;
928
+ break;
929
+ case 53:
930
+ return 64;
931
+ break;
932
+ case 54:
933
+ return 65;
934
+ break;
935
+ case 55:
936
+ return 66;
937
+ break;
938
+ case 56:
939
+ return 66;
940
+ break;
941
+ case 57:
942
+ return 66;
943
+ break;
944
+ case 58:
945
+ return 66;
946
+ break;
947
+ case 59:
948
+ return 63;
949
+ break;
950
+ case 60:
951
+ return 64;
952
+ break;
953
+ case 61:
954
+ return 65;
955
+ break;
956
+ case 62:
957
+ return 67;
958
+ break;
959
+ case 63:
960
+ return 68;
961
+ break;
962
+ case 64:
963
+ return 69;
964
+ break;
965
+ case 65:
966
+ return 69;
967
+ break;
968
+ case 66:
969
+ return 68;
970
+ break;
971
+ case 67:
972
+ return 68;
973
+ break;
974
+ case 68:
975
+ return 68;
976
+ break;
977
+ case 69:
978
+ return 41;
979
+ break;
980
+ case 70:
981
+ return 47;
982
+ break;
983
+ case 71:
984
+ return 40;
985
+ break;
986
+ case 72:
987
+ return 48;
988
+ break;
989
+ case 73:
990
+ return yy_.yytext[0];
991
+ break;
992
+ case 74:
993
+ return 6;
994
+ break;
995
+ }
996
+ }, "anonymous"),
997
+ rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:#)/i, /^(?:#)/i, /^(?:,)/i, /^(?::::)/i, /^(?::)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i, /^(?:([^\s]*)[~].*[~]([^\s]*))/i, /^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:style\b)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?::)/i, /^(?:,)/i, /^(?:#)/i, /^(?:classDef\b)/i, /^(?:class\b)/i, /^(?:one or zero\b)/i, /^(?:one or more\b)/i, /^(?:one or many\b)/i, /^(?:1\+)/i, /^(?:\|o\b)/i, /^(?:zero or one\b)/i, /^(?:zero or more\b)/i, /^(?:zero or many\b)/i, /^(?:0\+)/i, /^(?:\}o\b)/i, /^(?:many\(0\))/i, /^(?:many\(1\))/i, /^(?:many\b)/i, /^(?:\}\|)/i, /^(?:one\b)/i, /^(?:only one\b)/i, /^(?:1\b)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\s*u\b)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:([^\x00-\x7F]|\w|-|\*)+)/i, /^(?:;)/i, /^(?:([^\x00-\x7F]|\w|-|\*)+)/i, /^(?:[0-9])/i, /^(?:.)/i, /^(?:$)/i],
998
+ conditions: { "style": { "rules": [34, 35, 36, 37, 38, 69, 70], "inclusive": false }, "acc_descr_multiline": { "rules": [5, 6], "inclusive": false }, "acc_descr": { "rules": [3], "inclusive": false }, "acc_title": { "rules": [1], "inclusive": false }, "block": { "rules": [23, 24, 25, 26, 27, 28, 29, 30], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 31, 32, 33, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 73, 74], "inclusive": true } }
999
+ };
1000
+ return lexer2;
1001
+ }();
1002
+ parser2.lexer = lexer;
1003
+ function Parser() {
1004
+ this.yy = {};
1005
+ }
1006
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(Parser, "Parser");
1007
+ Parser.prototype = parser2;
1008
+ parser2.Parser = Parser;
1009
+ return new Parser();
1010
+ }();
1011
+ parser.parser = parser;
1012
+ var erDiagram_default = parser;
1013
+
1014
+ // src/diagrams/er/erDb.ts
1015
+ var ErDB = class {
1016
+ constructor() {
1017
+ this.entities = /* @__PURE__ */ new Map();
1018
+ this.relationships = [];
1019
+ this.classes = /* @__PURE__ */ new Map();
1020
+ this.direction = "TB";
1021
+ this.Cardinality = {
1022
+ ZERO_OR_ONE: "ZERO_OR_ONE",
1023
+ ZERO_OR_MORE: "ZERO_OR_MORE",
1024
+ ONE_OR_MORE: "ONE_OR_MORE",
1025
+ ONLY_ONE: "ONLY_ONE",
1026
+ MD_PARENT: "MD_PARENT"
1027
+ };
1028
+ this.Identification = {
1029
+ NON_IDENTIFYING: "NON_IDENTIFYING",
1030
+ IDENTIFYING: "IDENTIFYING"
1031
+ };
1032
+ this.setAccTitle = _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .setAccTitle */ .SV;
1033
+ this.getAccTitle = _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .getAccTitle */ .iN;
1034
+ this.setAccDescription = _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .setAccDescription */ .EI;
1035
+ this.getAccDescription = _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .getAccDescription */ .m7;
1036
+ this.setDiagramTitle = _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .setDiagramTitle */ .ke;
1037
+ this.getDiagramTitle = _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .getDiagramTitle */ .ab;
1038
+ this.getConfig = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(() => (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .getConfig2 */ .D7)().er, "getConfig");
1039
+ this.clear();
1040
+ this.addEntity = this.addEntity.bind(this);
1041
+ this.addAttributes = this.addAttributes.bind(this);
1042
+ this.addRelationship = this.addRelationship.bind(this);
1043
+ this.setDirection = this.setDirection.bind(this);
1044
+ this.addCssStyles = this.addCssStyles.bind(this);
1045
+ this.addClass = this.addClass.bind(this);
1046
+ this.setClass = this.setClass.bind(this);
1047
+ this.setAccTitle = this.setAccTitle.bind(this);
1048
+ this.setAccDescription = this.setAccDescription.bind(this);
1049
+ }
1050
+ static {
1051
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(this, "ErDB");
1052
+ }
1053
+ /**
1054
+ * Add entity
1055
+ * @param name - The name of the entity
1056
+ * @param alias - The alias of the entity
1057
+ */
1058
+ addEntity(name, alias = "") {
1059
+ if (!this.entities.has(name)) {
1060
+ this.entities.set(name, {
1061
+ id: `entity-${name}-${this.entities.size}`,
1062
+ label: name,
1063
+ attributes: [],
1064
+ alias,
1065
+ shape: "erBox",
1066
+ look: (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .getConfig2 */ .D7)().look ?? "default",
1067
+ cssClasses: "default",
1068
+ cssStyles: []
1069
+ });
1070
+ _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .log */ .Rm.info("Added new entity :", name);
1071
+ } else if (!this.entities.get(name)?.alias && alias) {
1072
+ this.entities.get(name).alias = alias;
1073
+ _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .log */ .Rm.info(`Add alias '${alias}' to entity '${name}'`);
1074
+ }
1075
+ return this.entities.get(name);
1076
+ }
1077
+ getEntity(name) {
1078
+ return this.entities.get(name);
1079
+ }
1080
+ getEntities() {
1081
+ return this.entities;
1082
+ }
1083
+ getClasses() {
1084
+ return this.classes;
1085
+ }
1086
+ addAttributes(entityName, attribs) {
1087
+ const entity = this.addEntity(entityName);
1088
+ let i;
1089
+ for (i = attribs.length - 1; i >= 0; i--) {
1090
+ if (!attribs[i].keys) {
1091
+ attribs[i].keys = [];
1092
+ }
1093
+ if (!attribs[i].comment) {
1094
+ attribs[i].comment = "";
1095
+ }
1096
+ entity.attributes.push(attribs[i]);
1097
+ _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .log */ .Rm.debug("Added attribute ", attribs[i].name);
1098
+ }
1099
+ }
1100
+ /**
1101
+ * Add a relationship
1102
+ *
1103
+ * @param entA - The first entity in the relationship
1104
+ * @param rolA - The role played by the first entity in relation to the second
1105
+ * @param entB - The second entity in the relationship
1106
+ * @param rSpec - The details of the relationship between the two entities
1107
+ */
1108
+ addRelationship(entA, rolA, entB, rSpec) {
1109
+ const entityA = this.entities.get(entA);
1110
+ const entityB = this.entities.get(entB);
1111
+ if (!entityA || !entityB) {
1112
+ return;
1113
+ }
1114
+ const rel = {
1115
+ entityA: entityA.id,
1116
+ roleA: rolA,
1117
+ entityB: entityB.id,
1118
+ relSpec: rSpec
1119
+ };
1120
+ this.relationships.push(rel);
1121
+ _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .log */ .Rm.debug("Added new relationship :", rel);
1122
+ }
1123
+ getRelationships() {
1124
+ return this.relationships;
1125
+ }
1126
+ getDirection() {
1127
+ return this.direction;
1128
+ }
1129
+ setDirection(dir) {
1130
+ this.direction = dir;
1131
+ }
1132
+ getCompiledStyles(classDefs) {
1133
+ let compiledStyles = [];
1134
+ for (const customClass of classDefs) {
1135
+ const cssClass = this.classes.get(customClass);
1136
+ if (cssClass?.styles) {
1137
+ compiledStyles = [...compiledStyles, ...cssClass.styles ?? []].map((s) => s.trim());
1138
+ }
1139
+ if (cssClass?.textStyles) {
1140
+ compiledStyles = [...compiledStyles, ...cssClass.textStyles ?? []].map((s) => s.trim());
1141
+ }
1142
+ }
1143
+ return compiledStyles;
1144
+ }
1145
+ addCssStyles(ids, styles) {
1146
+ for (const id of ids) {
1147
+ const entity = this.entities.get(id);
1148
+ if (!styles || !entity) {
1149
+ return;
1150
+ }
1151
+ for (const style of styles) {
1152
+ entity.cssStyles.push(style);
1153
+ }
1154
+ }
1155
+ }
1156
+ addClass(ids, style) {
1157
+ ids.forEach((id) => {
1158
+ let classNode = this.classes.get(id);
1159
+ if (classNode === void 0) {
1160
+ classNode = { id, styles: [], textStyles: [] };
1161
+ this.classes.set(id, classNode);
1162
+ }
1163
+ if (style) {
1164
+ style.forEach(function(s) {
1165
+ if (/color/.exec(s)) {
1166
+ const newStyle = s.replace("fill", "bgFill");
1167
+ classNode.textStyles.push(newStyle);
1168
+ }
1169
+ classNode.styles.push(s);
1170
+ });
1171
+ }
1172
+ });
1173
+ }
1174
+ setClass(ids, classNames) {
1175
+ for (const id of ids) {
1176
+ const entity = this.entities.get(id);
1177
+ if (entity) {
1178
+ for (const className of classNames) {
1179
+ entity.cssClasses += " " + className;
1180
+ }
1181
+ }
1182
+ }
1183
+ }
1184
+ clear() {
1185
+ this.entities = /* @__PURE__ */ new Map();
1186
+ this.classes = /* @__PURE__ */ new Map();
1187
+ this.relationships = [];
1188
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .clear */ .IU)();
1189
+ }
1190
+ getData() {
1191
+ const nodes = [];
1192
+ const edges = [];
1193
+ const config = (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .getConfig2 */ .D7)();
1194
+ for (const entityKey of this.entities.keys()) {
1195
+ const entityNode = this.entities.get(entityKey);
1196
+ if (entityNode) {
1197
+ entityNode.cssCompiledStyles = this.getCompiledStyles(entityNode.cssClasses.split(" "));
1198
+ nodes.push(entityNode);
1199
+ }
1200
+ }
1201
+ let count = 0;
1202
+ for (const relationship of this.relationships) {
1203
+ const edge = {
1204
+ id: (0,_chunk_O4NI6UNU_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getEdgeId */ .rY)(relationship.entityA, relationship.entityB, {
1205
+ prefix: "id",
1206
+ counter: count++
1207
+ }),
1208
+ type: "normal",
1209
+ curve: "basis",
1210
+ start: relationship.entityA,
1211
+ end: relationship.entityB,
1212
+ label: relationship.roleA,
1213
+ labelpos: "c",
1214
+ thickness: "normal",
1215
+ classes: "relationshipLine",
1216
+ arrowTypeStart: relationship.relSpec.cardB.toLowerCase(),
1217
+ arrowTypeEnd: relationship.relSpec.cardA.toLowerCase(),
1218
+ pattern: relationship.relSpec.relType == "IDENTIFYING" ? "solid" : "dashed",
1219
+ look: config.look
1220
+ };
1221
+ edges.push(edge);
1222
+ }
1223
+ return { nodes, edges, other: {}, config, direction: "TB" };
1224
+ }
1225
+ };
1226
+
1227
+ // src/diagrams/er/erRenderer-unified.ts
1228
+ var erRenderer_unified_exports = {};
1229
+ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__export */ .VA)(erRenderer_unified_exports, {
1230
+ draw: () => draw
1231
+ });
1232
+
1233
+ var draw = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)(async function(text, id, _version, diag) {
1234
+ _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .log */ .Rm.info("REF0:");
1235
+ _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .log */ .Rm.info("Drawing er diagram (unified)", id);
1236
+ const { securityLevel, er: conf, layout } = (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .getConfig2 */ .D7)();
1237
+ const data4Layout = diag.db.getData();
1238
+ const svg = (0,_chunk_RZ5BOZE2_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getDiagramElement */ .A)(id, securityLevel);
1239
+ data4Layout.type = diag.type;
1240
+ data4Layout.layoutAlgorithm = (0,_chunk_TYCBKAJE_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getRegisteredLayoutAlgorithm */ .q7)(layout);
1241
+ data4Layout.config.flowchart.nodeSpacing = conf?.nodeSpacing || 140;
1242
+ data4Layout.config.flowchart.rankSpacing = conf?.rankSpacing || 80;
1243
+ data4Layout.direction = diag.db.getDirection();
1244
+ data4Layout.markers = ["only_one", "zero_or_one", "one_or_more", "zero_or_more"];
1245
+ data4Layout.diagramId = id;
1246
+ await (0,_chunk_TYCBKAJE_mjs__WEBPACK_IMPORTED_MODULE_1__/* .render */ .XX)(data4Layout, svg);
1247
+ if (data4Layout.layoutAlgorithm === "elk") {
1248
+ svg.select(".edges").lower();
1249
+ }
1250
+ const backgroundNodes = svg.selectAll('[id*="-background"]');
1251
+ if (Array.from(backgroundNodes).length > 0) {
1252
+ backgroundNodes.each(function() {
1253
+ const backgroundNode = (0,d3__WEBPACK_IMPORTED_MODULE_10__/* .select */ .Ltv)(this);
1254
+ const backgroundId = backgroundNode.attr("id");
1255
+ const nonBackgroundId = backgroundId.replace("-background", "");
1256
+ const nonBackgroundNode = svg.select(`#${CSS.escape(nonBackgroundId)}`);
1257
+ if (!nonBackgroundNode.empty()) {
1258
+ const transform = nonBackgroundNode.attr("transform");
1259
+ backgroundNode.attr("transform", transform);
1260
+ }
1261
+ });
1262
+ }
1263
+ const padding = 8;
1264
+ _chunk_O4NI6UNU_mjs__WEBPACK_IMPORTED_MODULE_8__/* .utils_default */ ._K.insertTitle(
1265
+ svg,
1266
+ "erDiagramTitleText",
1267
+ conf?.titleTopMargin ?? 25,
1268
+ diag.db.getDiagramTitle()
1269
+ );
1270
+ (0,_chunk_RZ5BOZE2_mjs__WEBPACK_IMPORTED_MODULE_0__/* .setupViewPortForSVG */ .P)(svg, padding, "erDiagram", conf?.useMaxWidth ?? true);
1271
+ }, "draw");
1272
+
1273
+ // src/diagrams/er/styles.ts
1274
+
1275
+ var fade = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)((color, opacity) => {
1276
+ const channel2 = khroma__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .A;
1277
+ const r = channel2(color, "r");
1278
+ const g = channel2(color, "g");
1279
+ const b = channel2(color, "b");
1280
+ return khroma__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .A(r, g, b, opacity);
1281
+ }, "fade");
1282
+ var getStyles = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_9__/* .__name */ .K2)((options) => `
1283
+ .entityBox {
1284
+ fill: ${options.mainBkg};
1285
+ stroke: ${options.nodeBorder};
1286
+ }
1287
+
1288
+ .relationshipLabelBox {
1289
+ fill: ${options.tertiaryColor};
1290
+ opacity: 0.7;
1291
+ background-color: ${options.tertiaryColor};
1292
+ rect {
1293
+ opacity: 0.5;
1294
+ }
1295
+ }
1296
+
1297
+ .labelBkg {
1298
+ background-color: ${fade(options.tertiaryColor, 0.5)};
1299
+ }
1300
+
1301
+ .edgeLabel .label {
1302
+ fill: ${options.nodeBorder};
1303
+ font-size: 14px;
1304
+ }
1305
+
1306
+ .label {
1307
+ font-family: ${options.fontFamily};
1308
+ color: ${options.nodeTextColor || options.textColor};
1309
+ }
1310
+
1311
+ .edge-pattern-dashed {
1312
+ stroke-dasharray: 8,8;
1313
+ }
1314
+
1315
+ .node rect,
1316
+ .node circle,
1317
+ .node ellipse,
1318
+ .node polygon
1319
+ {
1320
+ fill: ${options.mainBkg};
1321
+ stroke: ${options.nodeBorder};
1322
+ stroke-width: 1px;
1323
+ }
1324
+
1325
+ .relationshipLine {
1326
+ stroke: ${options.lineColor};
1327
+ stroke-width: 1;
1328
+ fill: none;
1329
+ }
1330
+
1331
+ .marker {
1332
+ fill: none !important;
1333
+ stroke: ${options.lineColor} !important;
1334
+ stroke-width: 1;
1335
+ }
1336
+ `, "getStyles");
1337
+ var styles_default = getStyles;
1338
+
1339
+ // src/diagrams/er/erDiagram.ts
1340
+ var diagram = {
1341
+ parser: erDiagram_default,
1342
+ get db() {
1343
+ return new ErDB();
1344
+ },
1345
+ renderer: erRenderer_unified_exports,
1346
+ styles: styles_default
1347
+ };
1348
+
1349
+
1350
+
1351
+ /***/ })
1352
+
1353
+ };
1354
+ ;
1355
+ //# sourceMappingURL=805.node.js.map