@layers-app/editor 0.4.1 → 0.5.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 (241) hide show
  1. package/README.md +37 -1
  2. package/package.json +10 -10
  3. package/dist/index.cjs +0 -2
  4. package/dist/index.d.ts +0 -315
  5. package/dist/index.js +0 -13
  6. package/dist/layers.-23sKdPr.js +0 -10
  7. package/dist/layers.2Zh_Eqge.js +0 -118
  8. package/dist/layers.52famHy6.js +0 -1
  9. package/dist/layers.6xiY7Dmk.js +0 -10
  10. package/dist/layers.7JqFgE4-.js +0 -15
  11. package/dist/layers.7aWFCBDk.js +0 -36
  12. package/dist/layers.9--aZzKT.js +0 -41
  13. package/dist/layers.99J97lec.js +0 -40
  14. package/dist/layers.9QK1wiQj.js +0 -1
  15. package/dist/layers.9pNaFvaX.js +0 -1
  16. package/dist/layers.B16HCOzz.js +0 -11
  17. package/dist/layers.B19hGmey.js +0 -1
  18. package/dist/layers.B1GsQlw2.js +0 -202
  19. package/dist/layers.B1VWPJr7.js +0 -61
  20. package/dist/layers.B2AGu32C.js +0 -11692
  21. package/dist/layers.B3D4g2HH.js +0 -1
  22. package/dist/layers.B4Jcovwh.js +0 -160
  23. package/dist/layers.B4o4Yght.js +0 -39
  24. package/dist/layers.B51TBzz6.js +0 -1
  25. package/dist/layers.B5HV5CkN.js +0 -6
  26. package/dist/layers.B5VQ5ysd.js +0 -230
  27. package/dist/layers.B7uv8aVq.js +0 -39
  28. package/dist/layers.B9ypkXfB.js +0 -1
  29. package/dist/layers.BATSJhNp.js +0 -10
  30. package/dist/layers.BAe6u370.js +0 -793
  31. package/dist/layers.BAtv1CM7.js +0 -1
  32. package/dist/layers.BCMyc6dl.js +0 -1
  33. package/dist/layers.BChBzZgi.js +0 -139
  34. package/dist/layers.BCtnSgBi.js +0 -139
  35. package/dist/layers.BGXN8iGN.js +0 -36
  36. package/dist/layers.BH9NvW2c.js +0 -1
  37. package/dist/layers.BHEN4Zl8.js +0 -9
  38. package/dist/layers.BI-S-U1z.js +0 -34
  39. package/dist/layers.BIATzXuT.js +0 -5
  40. package/dist/layers.BId9R-tt.js +0 -9
  41. package/dist/layers.BIeVwYKL.js +0 -1
  42. package/dist/layers.BIj1zRV6.js +0 -8
  43. package/dist/layers.BK7Umu5k.js +0 -40
  44. package/dist/layers.BL7PsAnh.js +0 -40
  45. package/dist/layers.BLha5Ags.js +0 -1
  46. package/dist/layers.BNcxqXDY.js +0 -2
  47. package/dist/layers.BOY6DvLj.js +0 -41
  48. package/dist/layers.BQ5pHr1t.js +0 -9
  49. package/dist/layers.BR9erYvc.js +0 -425
  50. package/dist/layers.BSTBZrFn.js +0 -1
  51. package/dist/layers.BTjqsj2D.js +0 -32
  52. package/dist/layers.BU0ouPbJ.js +0 -40
  53. package/dist/layers.BVLHr0fv.js +0 -21938
  54. package/dist/layers.BVhV_yLo.js +0 -59
  55. package/dist/layers.BWppdp8z.js +0 -37
  56. package/dist/layers.BXGZ-IPG.js +0 -37
  57. package/dist/layers.BXIQjroR.js +0 -8
  58. package/dist/layers.BXe2f2v0.js +0 -10
  59. package/dist/layers.BaREUEpY.js +0 -1
  60. package/dist/layers.BbCfEXyj.js +0 -55
  61. package/dist/layers.BdxgA5Mh.js +0 -40
  62. package/dist/layers.BeXV53PI.js +0 -38
  63. package/dist/layers.Bf4maS9l.js +0 -41
  64. package/dist/layers.BgOa2ZQq.js +0 -7
  65. package/dist/layers.BgXRgBMD.js +0 -9
  66. package/dist/layers.Bgx4q6Yl.js +0 -1
  67. package/dist/layers.BiJ8hfRt.js +0 -1510
  68. package/dist/layers.BiK_NhRx.js +0 -13
  69. package/dist/layers.BjIrZvhA.js +0 -41
  70. package/dist/layers.BkDwnhF3.js +0 -39
  71. package/dist/layers.BkZl0e9Y.js +0 -10
  72. package/dist/layers.BkkBEMI4.js +0 -122
  73. package/dist/layers.Bl2uWPK5.js +0 -35
  74. package/dist/layers.BldgpPoA.js +0 -21763
  75. package/dist/layers.BmdNYA8O.js +0 -39
  76. package/dist/layers.BoUDsd20.js +0 -84
  77. package/dist/layers.BpilXLfW.js +0 -6
  78. package/dist/layers.Bqy_BDRk.js +0 -960
  79. package/dist/layers.BvQfT02S.js +0 -9
  80. package/dist/layers.BxCLnc_z.js +0 -52
  81. package/dist/layers.Bxuc5Ku1.js +0 -6
  82. package/dist/layers.Bxx3QiqH.js +0 -5
  83. package/dist/layers.BzufRV9o.js +0 -4
  84. package/dist/layers.C-S1uftF.js +0 -1
  85. package/dist/layers.C00McVdb.js +0 -116
  86. package/dist/layers.C3-Awt80.js +0 -186
  87. package/dist/layers.C46xOyCn.js +0 -1
  88. package/dist/layers.C4Z2eV4H.js +0 -437
  89. package/dist/layers.C5fqgGR6.js +0 -33
  90. package/dist/layers.C5pjkDUm.js +0 -8
  91. package/dist/layers.C5th-3Bk.js +0 -4
  92. package/dist/layers.C5vdiuk-.js +0 -1
  93. package/dist/layers.C6FZDcP0.js +0 -5
  94. package/dist/layers.C6ueRaWn.js +0 -1
  95. package/dist/layers.C6vMG-T6.js +0 -39
  96. package/dist/layers.C7lIplJU.js +0 -247
  97. package/dist/layers.C7md-mpb.js +0 -373
  98. package/dist/layers.C8Lyyff8.js +0 -39
  99. package/dist/layers.C8WU47YC.js +0 -7
  100. package/dist/layers.C8_lu5UH.js +0 -23
  101. package/dist/layers.CAZF51iw.js +0 -769
  102. package/dist/layers.CDmsB9ui.js +0 -9
  103. package/dist/layers.CENOzW4d.js +0 -32
  104. package/dist/layers.CESONz7C.js +0 -35
  105. package/dist/layers.CEW7Z5oj.js +0 -40
  106. package/dist/layers.CHE9Vv0w.js +0 -2966
  107. package/dist/layers.CHMDrzTP.js +0 -1
  108. package/dist/layers.CHZsXQcr.js +0 -1
  109. package/dist/layers.CIkcRflS.js +0 -32
  110. package/dist/layers.CJdGap0M.js +0 -40
  111. package/dist/layers.CJgtfrlM.js +0 -9
  112. package/dist/layers.CK15u90j.js +0 -32
  113. package/dist/layers.CKyZ6fil.js +0 -220
  114. package/dist/layers.COAF7f8g.js +0 -1
  115. package/dist/layers.CP7ZgLdQ.js +0 -802
  116. package/dist/layers.CQ_KfkMs.js +0 -1
  117. package/dist/layers.CSKgny-q.js +0 -1359
  118. package/dist/layers.CX4-2iW9.js +0 -8
  119. package/dist/layers.CX4mdDUE.js +0 -40
  120. package/dist/layers.CXFcyuib.js +0 -51
  121. package/dist/layers.CXnC6LGK.js +0 -1
  122. package/dist/layers.CXoz8wje.js +0 -11
  123. package/dist/layers.CZianMah.js +0 -33
  124. package/dist/layers.CbrkK8Nl.js +0 -6
  125. package/dist/layers.CdPjGs2x.js +0 -32
  126. package/dist/layers.CdZEenM8.js +0 -8
  127. package/dist/layers.CeESKes4.js +0 -37
  128. package/dist/layers.CebNnxUV.js +0 -185
  129. package/dist/layers.Cg0Puk92.js +0 -40
  130. package/dist/layers.ChG4YWfr.js +0 -1034
  131. package/dist/layers.ChLLCYeV.js +0 -7
  132. package/dist/layers.Cj5o49qm.js +0 -7
  133. package/dist/layers.Ck_m9yBu.js +0 -41
  134. package/dist/layers.Cl9YbTGP.js +0 -1
  135. package/dist/layers.Clo5oIEO.js +0 -70
  136. package/dist/layers.Cmeg2JEe.js +0 -10
  137. package/dist/layers.CqVTtuYm.js +0 -6
  138. package/dist/layers.Cs24L6er.js +0 -261
  139. package/dist/layers.Ctcl9I58.js +0 -10
  140. package/dist/layers.Cuf8LL65.js +0 -4
  141. package/dist/layers.CusXQPSP.js +0 -41
  142. package/dist/layers.CyaiBxcg.js +0 -1
  143. package/dist/layers.D-4MyOv6.js +0 -1126
  144. package/dist/layers.D0fuzbA_.js +0 -1580
  145. package/dist/layers.D0t24lyP.js +0 -1619
  146. package/dist/layers.D0zn4_Mx.js +0 -1
  147. package/dist/layers.D37kPodI.js +0 -7
  148. package/dist/layers.D3PBqBbY.js +0 -4
  149. package/dist/layers.D3eSioXs.js +0 -1
  150. package/dist/layers.D4fGb2cV.js +0 -1272
  151. package/dist/layers.D56jgM5P.js +0 -803
  152. package/dist/layers.D7jGxypv.js +0 -8
  153. package/dist/layers.DBgQS_TD.js +0 -39
  154. package/dist/layers.DE8kdoob.js +0 -8
  155. package/dist/layers.DEMbeDH5.js +0 -96
  156. package/dist/layers.DGfERl47.js +0 -39
  157. package/dist/layers.DGhEo4ps.js +0 -6
  158. package/dist/layers.DHbgl38J.js +0 -1
  159. package/dist/layers.DIW19mY0.js +0 -2235
  160. package/dist/layers.DIsd_eLu.js +0 -931
  161. package/dist/layers.DKhnUElF.js +0 -3
  162. package/dist/layers.DLwuMfdd.js +0 -84
  163. package/dist/layers.DMXwnUhk.js +0 -10
  164. package/dist/layers.DMkBISW1.js +0 -1
  165. package/dist/layers.DN9HoVxI.js +0 -18
  166. package/dist/layers.DOjcR2u6.js +0 -44
  167. package/dist/layers.DOrgOHBr.js +0 -1
  168. package/dist/layers.DRd1i4Pe.js +0 -2
  169. package/dist/layers.DSiVxrm-.js +0 -9
  170. package/dist/layers.DV0u_-wO.js +0 -1
  171. package/dist/layers.DYJhYqR2.js +0 -1089
  172. package/dist/layers.DYR-z4Xd.js +0 -65
  173. package/dist/layers.D_KjhW7m.js +0 -9
  174. package/dist/layers.DaA4pT9g.js +0 -42
  175. package/dist/layers.DbaKVP5e.js +0 -1
  176. package/dist/layers.DcGuLvyP.js +0 -1
  177. package/dist/layers.DczwzPio.js +0 -1
  178. package/dist/layers.DdULzc5-.js +0 -42
  179. package/dist/layers.De4i5Pzr.js +0 -423
  180. package/dist/layers.Dg_ubB5o.js +0 -38
  181. package/dist/layers.DhtUpSvn.js +0 -7
  182. package/dist/layers.DiAtOpGJ.js +0 -38
  183. package/dist/layers.DjUOC4st.js +0 -16
  184. package/dist/layers.DlH0lUyY.js +0 -7
  185. package/dist/layers.Dms1jgA7.js +0 -7
  186. package/dist/layers.DnvdN9TC.js +0 -9
  187. package/dist/layers.Doo3HAhr.js +0 -42
  188. package/dist/layers.Dpl-_pRd.js +0 -282
  189. package/dist/layers.Dq7WsWG1.js +0 -8
  190. package/dist/layers.Dr-_us97.js +0 -5
  191. package/dist/layers.Dr9AgtBT.js +0 -1265
  192. package/dist/layers.DsIrXvQc.js +0 -36
  193. package/dist/layers.DuC5Q-Uc.js +0 -1
  194. package/dist/layers.Dwrpihyi.js +0 -9148
  195. package/dist/layers.Dx7QSKbZ.js +0 -257
  196. package/dist/layers.DxA6ocdw.js +0 -70
  197. package/dist/layers.Dy1naDTQ.js +0 -14
  198. package/dist/layers.DyIa2FAJ.js +0 -501
  199. package/dist/layers.DyrpParn.js +0 -42
  200. package/dist/layers.G0qyEFRn.js +0 -7
  201. package/dist/layers.HnnZ9X3g.js +0 -41
  202. package/dist/layers.Ih_DycCa.js +0 -904
  203. package/dist/layers.JWCLFILJ.js +0 -1
  204. package/dist/layers.MXTL7J0X.js +0 -45828
  205. package/dist/layers.N0KTyT8H.js +0 -10
  206. package/dist/layers.NLvydYLt.js +0 -19
  207. package/dist/layers.NQOujqxE.js +0 -207
  208. package/dist/layers.O7rgjuxq.js +0 -35
  209. package/dist/layers.OF4XgnEn.js +0 -320
  210. package/dist/layers.OqM7Ogm0.js +0 -6
  211. package/dist/layers.P0RFt4vw.js +0 -10
  212. package/dist/layers.PWkD3FXd.js +0 -32
  213. package/dist/layers.Q933nYVT.js +0 -14
  214. package/dist/layers.ShoHTpWp.js +0 -11
  215. package/dist/layers.TP-LPR2e.js +0 -1283
  216. package/dist/layers.U8d2vvil.js +0 -11
  217. package/dist/layers.UHdtuNW7.js +0 -6
  218. package/dist/layers.UPBrkQqm.js +0 -1088
  219. package/dist/layers.Y1n_hIuc.js +0 -1
  220. package/dist/layers._uHasBFO.js +0 -40
  221. package/dist/layers._uJVChzG.js +0 -48146
  222. package/dist/layers.b0h5ZBmD.js +0 -61
  223. package/dist/layers.b_l02tem.js +0 -319
  224. package/dist/layers.d0donhTp.js +0 -36
  225. package/dist/layers.fjvgvmUK.js +0 -37
  226. package/dist/layers.gSOgK4cv.js +0 -41
  227. package/dist/layers.h2SsCt7w.js +0 -8
  228. package/dist/layers.hzJoyUwS.js +0 -268
  229. package/dist/layers.j4D7aRnj.js +0 -42
  230. package/dist/layers.l7Uj4NoM.js +0 -8
  231. package/dist/layers.lCpg7dOn.js +0 -21
  232. package/dist/layers.mS0YwpDF.js +0 -2479
  233. package/dist/layers.oLym9I6R.js +0 -8
  234. package/dist/layers.pGJnLNqj.js +0 -285
  235. package/dist/layers.pRFngToG.js +0 -1
  236. package/dist/layers.rK-vslvx.js +0 -2
  237. package/dist/layers.rSvdeOjc.js +0 -84
  238. package/dist/layers.rwvkqrdF.js +0 -11
  239. package/dist/layers.wRnSjyfZ.js +0 -5
  240. package/dist/layers.xbymChc4.js +0 -790
  241. package/dist/layers.xlbtHZsv.js +0 -39
@@ -1,931 +0,0 @@
1
- import { n as Et, o as mt, a as gt, s as kt, b as xt, c as Rt, g as Z, l as V, d as rt, u as Ot, e as bt, q as Nt, r as Tt, X as At } from "./layers.Dwrpihyi.js";
2
- import { G as Mt } from "./layers.C7lIplJU.js";
3
- import "lodash-es";
4
- import { l as St } from "./layers.D4fGb2cV.js";
5
- import "./layers.BldgpPoA.js";
6
- import { l as wt } from "./layers.CZianMah.js";
7
- const It = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
8
- function Dt(t) {
9
- return typeof t == "string" && It.test(t);
10
- }
11
- const A = [];
12
- for (let t = 0; t < 256; ++t)
13
- A.push((t + 256).toString(16).slice(1));
14
- function vt(t, e = 0) {
15
- return A[t[e + 0]] + A[t[e + 1]] + A[t[e + 2]] + A[t[e + 3]] + "-" + A[t[e + 4]] + A[t[e + 5]] + "-" + A[t[e + 6]] + A[t[e + 7]] + "-" + A[t[e + 8]] + A[t[e + 9]] + "-" + A[t[e + 10]] + A[t[e + 11]] + A[t[e + 12]] + A[t[e + 13]] + A[t[e + 14]] + A[t[e + 15]];
16
- }
17
- function Lt(t) {
18
- if (!Dt(t))
19
- throw TypeError("Invalid UUID");
20
- let e;
21
- const r = new Uint8Array(16);
22
- return r[0] = (e = parseInt(t.slice(0, 8), 16)) >>> 24, r[1] = e >>> 16 & 255, r[2] = e >>> 8 & 255, r[3] = e & 255, r[4] = (e = parseInt(t.slice(9, 13), 16)) >>> 8, r[5] = e & 255, r[6] = (e = parseInt(t.slice(14, 18), 16)) >>> 8, r[7] = e & 255, r[8] = (e = parseInt(t.slice(19, 23), 16)) >>> 8, r[9] = e & 255, r[10] = (e = parseInt(t.slice(24, 36), 16)) / 1099511627776 & 255, r[11] = e / 4294967296 & 255, r[12] = e >>> 24 & 255, r[13] = e >>> 16 & 255, r[14] = e >>> 8 & 255, r[15] = e & 255, r;
23
- }
24
- function Bt(t) {
25
- t = unescape(encodeURIComponent(t));
26
- const e = [];
27
- for (let r = 0; r < t.length; ++r)
28
- e.push(t.charCodeAt(r));
29
- return e;
30
- }
31
- const Ct = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", Pt = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
32
- function Yt(t, e, r) {
33
- function u(l, p, f, o) {
34
- var h;
35
- if (typeof l == "string" && (l = Bt(l)), typeof p == "string" && (p = Lt(p)), ((h = p) === null || h === void 0 ? void 0 : h.length) !== 16)
36
- throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
37
- let _ = new Uint8Array(16 + l.length);
38
- if (_.set(p), _.set(l, p.length), _ = r(_), _[6] = _[6] & 15 | e, _[8] = _[8] & 63 | 128, f) {
39
- o = o || 0;
40
- for (let m = 0; m < 16; ++m)
41
- f[o + m] = _[m];
42
- return f;
43
- }
44
- return vt(_);
45
- }
46
- try {
47
- u.name = t;
48
- } catch {
49
- }
50
- return u.DNS = Ct, u.URL = Pt, u;
51
- }
52
- function Zt(t, e, r, u) {
53
- switch (t) {
54
- case 0:
55
- return e & r ^ ~e & u;
56
- case 1:
57
- return e ^ r ^ u;
58
- case 2:
59
- return e & r ^ e & u ^ r & u;
60
- case 3:
61
- return e ^ r ^ u;
62
- }
63
- }
64
- function it(t, e) {
65
- return t << e | t >>> 32 - e;
66
- }
67
- function Ft(t) {
68
- const e = [1518500249, 1859775393, 2400959708, 3395469782], r = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
69
- if (typeof t == "string") {
70
- const f = unescape(encodeURIComponent(t));
71
- t = [];
72
- for (let o = 0; o < f.length; ++o)
73
- t.push(f.charCodeAt(o));
74
- } else Array.isArray(t) || (t = Array.prototype.slice.call(t));
75
- t.push(128);
76
- const u = t.length / 4 + 2, l = Math.ceil(u / 16), p = new Array(l);
77
- for (let f = 0; f < l; ++f) {
78
- const o = new Uint32Array(16);
79
- for (let h = 0; h < 16; ++h)
80
- o[h] = t[f * 64 + h * 4] << 24 | t[f * 64 + h * 4 + 1] << 16 | t[f * 64 + h * 4 + 2] << 8 | t[f * 64 + h * 4 + 3];
81
- p[f] = o;
82
- }
83
- p[l - 1][14] = (t.length - 1) * 8 / Math.pow(2, 32), p[l - 1][14] = Math.floor(p[l - 1][14]), p[l - 1][15] = (t.length - 1) * 8 & 4294967295;
84
- for (let f = 0; f < l; ++f) {
85
- const o = new Uint32Array(80);
86
- for (let y = 0; y < 16; ++y)
87
- o[y] = p[f][y];
88
- for (let y = 16; y < 80; ++y)
89
- o[y] = it(o[y - 3] ^ o[y - 8] ^ o[y - 14] ^ o[y - 16], 1);
90
- let h = r[0], _ = r[1], m = r[2], g = r[3], x = r[4];
91
- for (let y = 0; y < 80; ++y) {
92
- const N = Math.floor(y / 20), I = it(h, 5) + Zt(N, _, m, g) + x + e[N] + o[y] >>> 0;
93
- x = g, g = m, m = it(_, 30) >>> 0, _ = h, h = I;
94
- }
95
- r[0] = r[0] + h >>> 0, r[1] = r[1] + _ >>> 0, r[2] = r[2] + m >>> 0, r[3] = r[3] + g >>> 0, r[4] = r[4] + x >>> 0;
96
- }
97
- return [r[0] >> 24 & 255, r[0] >> 16 & 255, r[0] >> 8 & 255, r[0] & 255, r[1] >> 24 & 255, r[1] >> 16 & 255, r[1] >> 8 & 255, r[1] & 255, r[2] >> 24 & 255, r[2] >> 16 & 255, r[2] >> 8 & 255, r[2] & 255, r[3] >> 24 & 255, r[3] >> 16 & 255, r[3] >> 8 & 255, r[3] & 255, r[4] >> 24 & 255, r[4] >> 16 & 255, r[4] >> 8 & 255, r[4] & 255];
98
- }
99
- const Wt = Yt("v5", 80, Ft);
100
- var at = (function() {
101
- var t = function(S, a, n, c) {
102
- for (n = n || {}, c = S.length; c--; n[S[c]] = a)
103
- ;
104
- return n;
105
- }, e = [6, 8, 10, 20, 22, 24, 26, 27, 28], r = [1, 10], u = [1, 11], l = [1, 12], p = [1, 13], f = [1, 14], o = [1, 15], h = [1, 21], _ = [1, 22], m = [1, 23], g = [1, 24], x = [1, 25], y = [6, 8, 10, 13, 15, 18, 19, 20, 22, 24, 26, 27, 28, 41, 42, 43, 44, 45], N = [1, 34], I = [27, 28, 46, 47], F = [41, 42, 43, 44, 45], W = [17, 34], C = [1, 54], T = [1, 53], M = [17, 34, 36, 38], R = {
106
- trace: function() {
107
- },
108
- yy: {},
109
- symbols_: { error: 2, start: 3, ER_DIAGRAM: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, entityName: 11, relSpec: 12, ":": 13, role: 14, BLOCK_START: 15, attributes: 16, BLOCK_STOP: 17, SQS: 18, SQE: 19, title: 20, title_value: 21, acc_title: 22, acc_title_value: 23, acc_descr: 24, acc_descr_value: 25, acc_descr_multiline_value: 26, ALPHANUM: 27, ENTITY_NAME: 28, attribute: 29, attributeType: 30, attributeName: 31, attributeKeyTypeList: 32, attributeComment: 33, ATTRIBUTE_WORD: 34, attributeKeyType: 35, COMMA: 36, ATTRIBUTE_KEY: 37, COMMENT: 38, cardinality: 39, relType: 40, ZERO_OR_ONE: 41, ZERO_OR_MORE: 42, ONE_OR_MORE: 43, ONLY_ONE: 44, MD_PARENT: 45, NON_IDENTIFYING: 46, IDENTIFYING: 47, WORD: 48, $accept: 0, $end: 1 },
110
- terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 13: ":", 15: "BLOCK_START", 17: "BLOCK_STOP", 18: "SQS", 19: "SQE", 20: "title", 21: "title_value", 22: "acc_title", 23: "acc_title_value", 24: "acc_descr", 25: "acc_descr_value", 26: "acc_descr_multiline_value", 27: "ALPHANUM", 28: "ENTITY_NAME", 34: "ATTRIBUTE_WORD", 36: "COMMA", 37: "ATTRIBUTE_KEY", 38: "COMMENT", 41: "ZERO_OR_ONE", 42: "ZERO_OR_MORE", 43: "ONE_OR_MORE", 44: "ONLY_ONE", 45: "MD_PARENT", 46: "NON_IDENTIFYING", 47: "IDENTIFYING", 48: "WORD" },
111
- productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 5], [9, 4], [9, 3], [9, 1], [9, 7], [9, 6], [9, 4], [9, 2], [9, 2], [9, 2], [9, 1], [11, 1], [11, 1], [16, 1], [16, 2], [29, 2], [29, 3], [29, 3], [29, 4], [30, 1], [31, 1], [32, 1], [32, 3], [35, 1], [33, 1], [12, 3], [39, 1], [39, 1], [39, 1], [39, 1], [39, 1], [40, 1], [40, 1], [14, 1], [14, 1], [14, 1]],
112
- performAction: function(a, n, c, d, E, i, K) {
113
- var s = i.length - 1;
114
- switch (E) {
115
- case 1:
116
- break;
117
- case 2:
118
- this.$ = [];
119
- break;
120
- case 3:
121
- i[s - 1].push(i[s]), this.$ = i[s - 1];
122
- break;
123
- case 4:
124
- case 5:
125
- this.$ = i[s];
126
- break;
127
- case 6:
128
- case 7:
129
- this.$ = [];
130
- break;
131
- case 8:
132
- d.addEntity(i[s - 4]), d.addEntity(i[s - 2]), d.addRelationship(i[s - 4], i[s], i[s - 2], i[s - 3]);
133
- break;
134
- case 9:
135
- d.addEntity(i[s - 3]), d.addAttributes(i[s - 3], i[s - 1]);
136
- break;
137
- case 10:
138
- d.addEntity(i[s - 2]);
139
- break;
140
- case 11:
141
- d.addEntity(i[s]);
142
- break;
143
- case 12:
144
- d.addEntity(i[s - 6], i[s - 4]), d.addAttributes(i[s - 6], i[s - 1]);
145
- break;
146
- case 13:
147
- d.addEntity(i[s - 5], i[s - 3]);
148
- break;
149
- case 14:
150
- d.addEntity(i[s - 3], i[s - 1]);
151
- break;
152
- case 15:
153
- case 16:
154
- this.$ = i[s].trim(), d.setAccTitle(this.$);
155
- break;
156
- case 17:
157
- case 18:
158
- this.$ = i[s].trim(), d.setAccDescription(this.$);
159
- break;
160
- case 19:
161
- case 43:
162
- this.$ = i[s];
163
- break;
164
- case 20:
165
- case 41:
166
- case 42:
167
- this.$ = i[s].replace(/"/g, "");
168
- break;
169
- case 21:
170
- case 29:
171
- this.$ = [i[s]];
172
- break;
173
- case 22:
174
- i[s].push(i[s - 1]), this.$ = i[s];
175
- break;
176
- case 23:
177
- this.$ = { attributeType: i[s - 1], attributeName: i[s] };
178
- break;
179
- case 24:
180
- this.$ = { attributeType: i[s - 2], attributeName: i[s - 1], attributeKeyTypeList: i[s] };
181
- break;
182
- case 25:
183
- this.$ = { attributeType: i[s - 2], attributeName: i[s - 1], attributeComment: i[s] };
184
- break;
185
- case 26:
186
- this.$ = { attributeType: i[s - 3], attributeName: i[s - 2], attributeKeyTypeList: i[s - 1], attributeComment: i[s] };
187
- break;
188
- case 27:
189
- case 28:
190
- case 31:
191
- this.$ = i[s];
192
- break;
193
- case 30:
194
- i[s - 2].push(i[s]), this.$ = i[s - 2];
195
- break;
196
- case 32:
197
- this.$ = i[s].replace(/"/g, "");
198
- break;
199
- case 33:
200
- this.$ = { cardA: i[s], relType: i[s - 1], cardB: i[s - 2] };
201
- break;
202
- case 34:
203
- this.$ = d.Cardinality.ZERO_OR_ONE;
204
- break;
205
- case 35:
206
- this.$ = d.Cardinality.ZERO_OR_MORE;
207
- break;
208
- case 36:
209
- this.$ = d.Cardinality.ONE_OR_MORE;
210
- break;
211
- case 37:
212
- this.$ = d.Cardinality.ONLY_ONE;
213
- break;
214
- case 38:
215
- this.$ = d.Cardinality.MD_PARENT;
216
- break;
217
- case 39:
218
- this.$ = d.Identification.NON_IDENTIFYING;
219
- break;
220
- case 40:
221
- this.$ = d.Identification.IDENTIFYING;
222
- break;
223
- }
224
- },
225
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 20: r, 22: u, 24: l, 26: p, 27: f, 28: o }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 16, 11: 9, 20: r, 22: u, 24: l, 26: p, 27: f, 28: o }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 11], { 12: 17, 39: 20, 15: [1, 18], 18: [1, 19], 41: h, 42: _, 43: m, 44: g, 45: x }), { 21: [1, 26] }, { 23: [1, 27] }, { 25: [1, 28] }, t(e, [2, 18]), t(y, [2, 19]), t(y, [2, 20]), t(e, [2, 4]), { 11: 29, 27: f, 28: o }, { 16: 30, 17: [1, 31], 29: 32, 30: 33, 34: N }, { 11: 35, 27: f, 28: o }, { 40: 36, 46: [1, 37], 47: [1, 38] }, t(I, [2, 34]), t(I, [2, 35]), t(I, [2, 36]), t(I, [2, 37]), t(I, [2, 38]), t(e, [2, 15]), t(e, [2, 16]), t(e, [2, 17]), { 13: [1, 39] }, { 17: [1, 40] }, t(e, [2, 10]), { 16: 41, 17: [2, 21], 29: 32, 30: 33, 34: N }, { 31: 42, 34: [1, 43] }, { 34: [2, 27] }, { 19: [1, 44] }, { 39: 45, 41: h, 42: _, 43: m, 44: g, 45: x }, t(F, [2, 39]), t(F, [2, 40]), { 14: 46, 27: [1, 49], 28: [1, 48], 48: [1, 47] }, t(e, [2, 9]), { 17: [2, 22] }, t(W, [2, 23], { 32: 50, 33: 51, 35: 52, 37: C, 38: T }), t([17, 34, 37, 38], [2, 28]), t(e, [2, 14], { 15: [1, 55] }), t([27, 28], [2, 33]), t(e, [2, 8]), t(e, [2, 41]), t(e, [2, 42]), t(e, [2, 43]), t(W, [2, 24], { 33: 56, 36: [1, 57], 38: T }), t(W, [2, 25]), t(M, [2, 29]), t(W, [2, 32]), t(M, [2, 31]), { 16: 58, 17: [1, 59], 29: 32, 30: 33, 34: N }, t(W, [2, 26]), { 35: 60, 37: C }, { 17: [1, 61] }, t(e, [2, 13]), t(M, [2, 30]), t(e, [2, 12])],
226
- defaultActions: { 34: [2, 27], 41: [2, 22] },
227
- parseError: function(a, n) {
228
- if (n.recoverable)
229
- this.trace(a);
230
- else {
231
- var c = new Error(a);
232
- throw c.hash = n, c;
233
- }
234
- },
235
- parse: function(a) {
236
- var n = this, c = [0], d = [], E = [null], i = [], K = this.table, s = "", Q = 0, st = 0, ft = 2, ot = 1, yt = i.slice.call(arguments, 1), b = Object.create(this.lexer), H = { yy: {} };
237
- for (var J in this.yy)
238
- Object.prototype.hasOwnProperty.call(this.yy, J) && (H.yy[J] = this.yy[J]);
239
- b.setInput(a, H.yy), H.yy.lexer = b, H.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
240
- var $ = b.yylloc;
241
- i.push($);
242
- var pt = b.options && b.options.ranges;
243
- typeof H.yy.parseError == "function" ? this.parseError = H.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
244
- function _t() {
245
- var Y;
246
- return Y = d.pop() || b.lex() || ot, typeof Y != "number" && (Y instanceof Array && (d = Y, Y = d.pop()), Y = n.symbols_[Y] || Y), Y;
247
- }
248
- for (var w, z, D, tt, G = {}, q, P, lt, j; ; ) {
249
- if (z = c[c.length - 1], this.defaultActions[z] ? D = this.defaultActions[z] : ((w === null || typeof w > "u") && (w = _t()), D = K[z] && K[z][w]), typeof D > "u" || !D.length || !D[0]) {
250
- var et = "";
251
- j = [];
252
- for (q in K[z])
253
- this.terminals_[q] && q > ft && j.push("'" + this.terminals_[q] + "'");
254
- b.showPosition ? et = "Parse error on line " + (Q + 1) + `:
255
- ` + b.showPosition() + `
256
- Expecting ` + j.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : et = "Parse error on line " + (Q + 1) + ": Unexpected " + (w == ot ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(et, {
257
- text: b.match,
258
- token: this.terminals_[w] || w,
259
- line: b.yylineno,
260
- loc: $,
261
- expected: j
262
- });
263
- }
264
- if (D[0] instanceof Array && D.length > 1)
265
- throw new Error("Parse Error: multiple actions possible at state: " + z + ", token: " + w);
266
- switch (D[0]) {
267
- case 1:
268
- c.push(w), E.push(b.yytext), i.push(b.yylloc), c.push(D[1]), w = null, st = b.yyleng, s = b.yytext, Q = b.yylineno, $ = b.yylloc;
269
- break;
270
- case 2:
271
- if (P = this.productions_[D[1]][1], G.$ = E[E.length - P], G._$ = {
272
- first_line: i[i.length - (P || 1)].first_line,
273
- last_line: i[i.length - 1].last_line,
274
- first_column: i[i.length - (P || 1)].first_column,
275
- last_column: i[i.length - 1].last_column
276
- }, pt && (G._$.range = [
277
- i[i.length - (P || 1)].range[0],
278
- i[i.length - 1].range[1]
279
- ]), tt = this.performAction.apply(G, [
280
- s,
281
- st,
282
- Q,
283
- H.yy,
284
- D[1],
285
- E,
286
- i
287
- ].concat(yt)), typeof tt < "u")
288
- return tt;
289
- P && (c = c.slice(0, -1 * P * 2), E = E.slice(0, -1 * P), i = i.slice(0, -1 * P)), c.push(this.productions_[D[1]][0]), E.push(G.$), i.push(G._$), lt = K[c[c.length - 2]][c[c.length - 1]], c.push(lt);
290
- break;
291
- case 3:
292
- return !0;
293
- }
294
- }
295
- return !0;
296
- }
297
- }, O = /* @__PURE__ */ (function() {
298
- var S = {
299
- EOF: 1,
300
- parseError: function(n, c) {
301
- if (this.yy.parser)
302
- this.yy.parser.parseError(n, c);
303
- else
304
- throw new Error(n);
305
- },
306
- // resets the lexer, sets new input
307
- setInput: function(a, n) {
308
- return this.yy = n || this.yy || {}, this._input = a, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
309
- first_line: 1,
310
- first_column: 0,
311
- last_line: 1,
312
- last_column: 0
313
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
314
- },
315
- // consumes and returns one char from the input
316
- input: function() {
317
- var a = this._input[0];
318
- this.yytext += a, this.yyleng++, this.offset++, this.match += a, this.matched += a;
319
- var n = a.match(/(?:\r\n?|\n).*/g);
320
- return n ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), a;
321
- },
322
- // unshifts one char (or a string) into the input
323
- unput: function(a) {
324
- var n = a.length, c = a.split(/(?:\r\n?|\n)/g);
325
- this._input = a + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - n), this.offset -= n;
326
- var d = this.match.split(/(?:\r\n?|\n)/g);
327
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), c.length - 1 && (this.yylineno -= c.length - 1);
328
- var E = this.yylloc.range;
329
- return this.yylloc = {
330
- first_line: this.yylloc.first_line,
331
- last_line: this.yylineno + 1,
332
- first_column: this.yylloc.first_column,
333
- last_column: c ? (c.length === d.length ? this.yylloc.first_column : 0) + d[d.length - c.length].length - c[0].length : this.yylloc.first_column - n
334
- }, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - n]), this.yyleng = this.yytext.length, this;
335
- },
336
- // When called from action, caches matched text and appends it on next action
337
- more: function() {
338
- return this._more = !0, this;
339
- },
340
- // 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.
341
- reject: function() {
342
- if (this.options.backtrack_lexer)
343
- this._backtrack = !0;
344
- else
345
- 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).
346
- ` + this.showPosition(), {
347
- text: "",
348
- token: null,
349
- line: this.yylineno
350
- });
351
- return this;
352
- },
353
- // retain first n characters of the match
354
- less: function(a) {
355
- this.unput(this.match.slice(a));
356
- },
357
- // displays already matched input, i.e. for error messages
358
- pastInput: function() {
359
- var a = this.matched.substr(0, this.matched.length - this.match.length);
360
- return (a.length > 20 ? "..." : "") + a.substr(-20).replace(/\n/g, "");
361
- },
362
- // displays upcoming input, i.e. for error messages
363
- upcomingInput: function() {
364
- var a = this.match;
365
- return a.length < 20 && (a += this._input.substr(0, 20 - a.length)), (a.substr(0, 20) + (a.length > 20 ? "..." : "")).replace(/\n/g, "");
366
- },
367
- // displays the character position where the lexing error occurred, i.e. for error messages
368
- showPosition: function() {
369
- var a = this.pastInput(), n = new Array(a.length + 1).join("-");
370
- return a + this.upcomingInput() + `
371
- ` + n + "^";
372
- },
373
- // test the lexed token: return FALSE when not a match, otherwise return token
374
- test_match: function(a, n) {
375
- var c, d, E;
376
- if (this.options.backtrack_lexer && (E = {
377
- yylineno: this.yylineno,
378
- yylloc: {
379
- first_line: this.yylloc.first_line,
380
- last_line: this.last_line,
381
- first_column: this.yylloc.first_column,
382
- last_column: this.yylloc.last_column
383
- },
384
- yytext: this.yytext,
385
- match: this.match,
386
- matches: this.matches,
387
- matched: this.matched,
388
- yyleng: this.yyleng,
389
- offset: this.offset,
390
- _more: this._more,
391
- _input: this._input,
392
- yy: this.yy,
393
- conditionStack: this.conditionStack.slice(0),
394
- done: this.done
395
- }, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), d = a[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
396
- first_line: this.yylloc.last_line,
397
- last_line: this.yylineno + 1,
398
- first_column: this.yylloc.last_column,
399
- last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + a[0].length
400
- }, this.yytext += a[0], this.match += a[0], this.matches = a, 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(a[0].length), this.matched += a[0], c = this.performAction.call(this, this.yy, this, n, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
401
- return c;
402
- if (this._backtrack) {
403
- for (var i in E)
404
- this[i] = E[i];
405
- return !1;
406
- }
407
- return !1;
408
- },
409
- // return next match in input
410
- next: function() {
411
- if (this.done)
412
- return this.EOF;
413
- this._input || (this.done = !0);
414
- var a, n, c, d;
415
- this._more || (this.yytext = "", this.match = "");
416
- for (var E = this._currentRules(), i = 0; i < E.length; i++)
417
- if (c = this._input.match(this.rules[E[i]]), c && (!n || c[0].length > n[0].length)) {
418
- if (n = c, d = i, this.options.backtrack_lexer) {
419
- if (a = this.test_match(c, E[i]), a !== !1)
420
- return a;
421
- if (this._backtrack) {
422
- n = !1;
423
- continue;
424
- } else
425
- return !1;
426
- } else if (!this.options.flex)
427
- break;
428
- }
429
- return n ? (a = this.test_match(n, E[d]), a !== !1 ? a : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
430
- ` + this.showPosition(), {
431
- text: "",
432
- token: null,
433
- line: this.yylineno
434
- });
435
- },
436
- // return next match that has a token
437
- lex: function() {
438
- var n = this.next();
439
- return n || this.lex();
440
- },
441
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
442
- begin: function(n) {
443
- this.conditionStack.push(n);
444
- },
445
- // pop the previously active lexer condition state off the condition stack
446
- popState: function() {
447
- var n = this.conditionStack.length - 1;
448
- return n > 0 ? this.conditionStack.pop() : this.conditionStack[0];
449
- },
450
- // produce the lexer rule set which is active for the currently active lexer condition state
451
- _currentRules: function() {
452
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
453
- },
454
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
455
- topState: function(n) {
456
- return n = this.conditionStack.length - 1 - Math.abs(n || 0), n >= 0 ? this.conditionStack[n] : "INITIAL";
457
- },
458
- // alias for begin(condition)
459
- pushState: function(n) {
460
- this.begin(n);
461
- },
462
- // return the number of states currently on the stack
463
- stateStackSize: function() {
464
- return this.conditionStack.length;
465
- },
466
- options: { "case-insensitive": !0 },
467
- performAction: function(n, c, d, E) {
468
- switch (d) {
469
- case 0:
470
- return this.begin("acc_title"), 22;
471
- case 1:
472
- return this.popState(), "acc_title_value";
473
- case 2:
474
- return this.begin("acc_descr"), 24;
475
- case 3:
476
- return this.popState(), "acc_descr_value";
477
- case 4:
478
- this.begin("acc_descr_multiline");
479
- break;
480
- case 5:
481
- this.popState();
482
- break;
483
- case 6:
484
- return "acc_descr_multiline_value";
485
- case 7:
486
- return 10;
487
- case 8:
488
- break;
489
- case 9:
490
- return 8;
491
- case 10:
492
- return 28;
493
- case 11:
494
- return 48;
495
- case 12:
496
- return 4;
497
- case 13:
498
- return this.begin("block"), 15;
499
- case 14:
500
- return 36;
501
- case 15:
502
- break;
503
- case 16:
504
- return 37;
505
- case 17:
506
- return 34;
507
- case 18:
508
- return 34;
509
- case 19:
510
- return 38;
511
- case 20:
512
- break;
513
- case 21:
514
- return this.popState(), 17;
515
- case 22:
516
- return c.yytext[0];
517
- case 23:
518
- return 18;
519
- case 24:
520
- return 19;
521
- case 25:
522
- return 41;
523
- case 26:
524
- return 43;
525
- case 27:
526
- return 43;
527
- case 28:
528
- return 43;
529
- case 29:
530
- return 41;
531
- case 30:
532
- return 41;
533
- case 31:
534
- return 42;
535
- case 32:
536
- return 42;
537
- case 33:
538
- return 42;
539
- case 34:
540
- return 42;
541
- case 35:
542
- return 42;
543
- case 36:
544
- return 43;
545
- case 37:
546
- return 42;
547
- case 38:
548
- return 43;
549
- case 39:
550
- return 44;
551
- case 40:
552
- return 44;
553
- case 41:
554
- return 44;
555
- case 42:
556
- return 44;
557
- case 43:
558
- return 41;
559
- case 44:
560
- return 42;
561
- case 45:
562
- return 43;
563
- case 46:
564
- return 45;
565
- case 47:
566
- return 46;
567
- case 48:
568
- return 47;
569
- case 49:
570
- return 47;
571
- case 50:
572
- return 46;
573
- case 51:
574
- return 46;
575
- case 52:
576
- return 46;
577
- case 53:
578
- return 27;
579
- case 54:
580
- return c.yytext[0];
581
- case 55:
582
- return 6;
583
- }
584
- },
585
- rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:,)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i, /^(?:(.*?)[~](.*?)*[~])/i, /^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\[)/i, /^(?:\])/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, /^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i, /^(?:.)/i, /^(?:$)/i],
586
- conditions: { acc_descr_multiline: { rules: [5, 6], inclusive: !1 }, acc_descr: { rules: [3], inclusive: !1 }, acc_title: { rules: [1], inclusive: !1 }, block: { rules: [14, 15, 16, 17, 18, 19, 20, 21, 22], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55], inclusive: !0 } }
587
- };
588
- return S;
589
- })();
590
- R.lexer = O;
591
- function v() {
592
- this.yy = {};
593
- }
594
- return v.prototype = R, R.Parser = v, new v();
595
- })();
596
- at.parser = at;
597
- const Ut = at;
598
- let U = {}, nt = [];
599
- const Ht = {
600
- ZERO_OR_ONE: "ZERO_OR_ONE",
601
- ZERO_OR_MORE: "ZERO_OR_MORE",
602
- ONE_OR_MORE: "ONE_OR_MORE",
603
- ONLY_ONE: "ONLY_ONE",
604
- MD_PARENT: "MD_PARENT"
605
- }, zt = {
606
- NON_IDENTIFYING: "NON_IDENTIFYING",
607
- IDENTIFYING: "IDENTIFYING"
608
- }, dt = function(t, e = void 0) {
609
- return U[t] === void 0 ? (U[t] = { attributes: [], alias: e }, V.info("Added new entity :", t)) : U[t] && !U[t].alias && e && (U[t].alias = e, V.info(`Add alias '${e}' to entity '${t}'`)), U[t];
610
- }, Gt = () => U, Kt = function(t, e) {
611
- let r = dt(t), u;
612
- for (u = e.length - 1; u >= 0; u--)
613
- r.attributes.push(e[u]), V.debug("Added attribute ", e[u].attributeName);
614
- }, Vt = function(t, e, r, u) {
615
- let l = {
616
- entityA: t,
617
- roleA: e,
618
- entityB: r,
619
- relSpec: u
620
- };
621
- nt.push(l), V.debug("Added new relationship :", l);
622
- }, Xt = () => nt, Qt = function() {
623
- U = {}, nt = [], Nt();
624
- }, qt = {
625
- Cardinality: Ht,
626
- Identification: zt,
627
- getConfig: () => Z().er,
628
- addEntity: dt,
629
- addAttributes: Kt,
630
- getEntities: Gt,
631
- addRelationship: Vt,
632
- getRelationships: Xt,
633
- clear: Qt,
634
- setAccTitle: Rt,
635
- getAccTitle: xt,
636
- setAccDescription: kt,
637
- getAccDescription: gt,
638
- setDiagramTitle: mt,
639
- getDiagramTitle: Et
640
- }, L = {
641
- ONLY_ONE_START: "ONLY_ONE_START",
642
- ONLY_ONE_END: "ONLY_ONE_END",
643
- ZERO_OR_ONE_START: "ZERO_OR_ONE_START",
644
- ZERO_OR_ONE_END: "ZERO_OR_ONE_END",
645
- ONE_OR_MORE_START: "ONE_OR_MORE_START",
646
- ONE_OR_MORE_END: "ONE_OR_MORE_END",
647
- ZERO_OR_MORE_START: "ZERO_OR_MORE_START",
648
- ZERO_OR_MORE_END: "ZERO_OR_MORE_END",
649
- MD_PARENT_END: "MD_PARENT_END",
650
- MD_PARENT_START: "MD_PARENT_START"
651
- }, jt = function(t, e) {
652
- let r;
653
- t.append("defs").append("marker").attr("id", L.MD_PARENT_START).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", L.MD_PARENT_END).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", L.ONLY_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M9,0 L9,18 M15,0 L15,18"), t.append("defs").append("marker").attr("id", L.ONLY_ONE_END).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M3,0 L3,18 M9,0 L9,18"), r = t.append("defs").append("marker").attr("id", L.ZERO_OR_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M9,0 L9,18"), r = t.append("defs").append("marker").attr("id", L.ZERO_OR_ONE_END).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M21,0 L21,18"), t.append("defs").append("marker").attr("id", L.ONE_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"), t.append("defs").append("marker").attr("id", L.ONE_OR_MORE_END).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"), r = t.append("defs").append("marker").attr("id", L.ZERO_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18"), r = t.append("defs").append("marker").attr("id", L.ZERO_OR_MORE_END).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto"), r.append("circle").attr("stroke", e.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6), r.append("path").attr("stroke", e.stroke).attr("fill", "none").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
654
- }, B = {
655
- ERMarkers: L,
656
- insertMarkers: jt
657
- }, Jt = /[^\dA-Za-z](\W)*/g;
658
- let k = {}, X = /* @__PURE__ */ new Map();
659
- const $t = function(t) {
660
- const e = Object.keys(t);
661
- for (const r of e)
662
- k[r] = t[r];
663
- }, te = (t, e, r) => {
664
- const u = k.entityPadding / 3, l = k.entityPadding / 3, p = k.fontSize * 0.85, f = e.node().getBBox(), o = [];
665
- let h = !1, _ = !1, m = 0, g = 0, x = 0, y = 0, N = f.height + u * 2, I = 1;
666
- r.forEach((T) => {
667
- T.attributeKeyTypeList !== void 0 && T.attributeKeyTypeList.length > 0 && (h = !0), T.attributeComment !== void 0 && (_ = !0);
668
- }), r.forEach((T) => {
669
- const M = `${e.node().id}-attr-${I}`;
670
- let R = 0;
671
- const O = At(T.attributeType), v = t.append("text").classed("er entityLabel", !0).attr("id", `${M}-type`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", Z().fontFamily).style("font-size", p + "px").text(O), S = t.append("text").classed("er entityLabel", !0).attr("id", `${M}-name`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", Z().fontFamily).style("font-size", p + "px").text(T.attributeName), a = {};
672
- a.tn = v, a.nn = S;
673
- const n = v.node().getBBox(), c = S.node().getBBox();
674
- if (m = Math.max(m, n.width), g = Math.max(g, c.width), R = Math.max(n.height, c.height), h) {
675
- const d = T.attributeKeyTypeList !== void 0 ? T.attributeKeyTypeList.join(",") : "", E = t.append("text").classed("er entityLabel", !0).attr("id", `${M}-key`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", Z().fontFamily).style("font-size", p + "px").text(d);
676
- a.kn = E;
677
- const i = E.node().getBBox();
678
- x = Math.max(x, i.width), R = Math.max(R, i.height);
679
- }
680
- if (_) {
681
- const d = t.append("text").classed("er entityLabel", !0).attr("id", `${M}-comment`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", Z().fontFamily).style("font-size", p + "px").text(T.attributeComment || "");
682
- a.cn = d;
683
- const E = d.node().getBBox();
684
- y = Math.max(y, E.width), R = Math.max(R, E.height);
685
- }
686
- a.height = R, o.push(a), N += R + u * 2, I += 1;
687
- });
688
- let F = 4;
689
- h && (F += 2), _ && (F += 2);
690
- const W = m + g + x + y, C = {
691
- width: Math.max(
692
- k.minEntityWidth,
693
- Math.max(
694
- f.width + k.entityPadding * 2,
695
- W + l * F
696
- )
697
- ),
698
- height: r.length > 0 ? N : Math.max(k.minEntityHeight, f.height + k.entityPadding * 2)
699
- };
700
- if (r.length > 0) {
701
- const T = Math.max(
702
- 0,
703
- (C.width - W - l * F) / (F / 2)
704
- );
705
- e.attr(
706
- "transform",
707
- "translate(" + C.width / 2 + "," + (u + f.height / 2) + ")"
708
- );
709
- let M = f.height + u * 2, R = "attributeBoxOdd";
710
- o.forEach((O) => {
711
- const v = M + u + O.height / 2;
712
- O.tn.attr("transform", "translate(" + l + "," + v + ")");
713
- const S = t.insert("rect", "#" + O.tn.node().id).classed(`er ${R}`, !0).attr("x", 0).attr("y", M).attr("width", m + l * 2 + T).attr("height", O.height + u * 2), a = parseFloat(S.attr("x")) + parseFloat(S.attr("width"));
714
- O.nn.attr(
715
- "transform",
716
- "translate(" + (a + l) + "," + v + ")"
717
- );
718
- const n = t.insert("rect", "#" + O.nn.node().id).classed(`er ${R}`, !0).attr("x", a).attr("y", M).attr("width", g + l * 2 + T).attr("height", O.height + u * 2);
719
- let c = parseFloat(n.attr("x")) + parseFloat(n.attr("width"));
720
- if (h) {
721
- O.kn.attr(
722
- "transform",
723
- "translate(" + (c + l) + "," + v + ")"
724
- );
725
- const d = t.insert("rect", "#" + O.kn.node().id).classed(`er ${R}`, !0).attr("x", c).attr("y", M).attr("width", x + l * 2 + T).attr("height", O.height + u * 2);
726
- c = parseFloat(d.attr("x")) + parseFloat(d.attr("width"));
727
- }
728
- _ && (O.cn.attr(
729
- "transform",
730
- "translate(" + (c + l) + "," + v + ")"
731
- ), t.insert("rect", "#" + O.cn.node().id).classed(`er ${R}`, "true").attr("x", c).attr("y", M).attr("width", y + l * 2 + T).attr("height", O.height + u * 2)), M += O.height + u * 2, R = R === "attributeBoxOdd" ? "attributeBoxEven" : "attributeBoxOdd";
732
- });
733
- } else
734
- C.height = Math.max(k.minEntityHeight, N), e.attr("transform", "translate(" + C.width / 2 + "," + C.height / 2 + ")");
735
- return C;
736
- }, ee = function(t, e, r) {
737
- const u = Object.keys(e);
738
- let l;
739
- return u.forEach(function(p) {
740
- const f = oe(p, "entity");
741
- X.set(p, f);
742
- const o = t.append("g").attr("id", f);
743
- l = l === void 0 ? f : l;
744
- const h = "text-" + f, _ = o.append("text").classed("er entityLabel", !0).attr("id", h).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "middle").style("font-family", Z().fontFamily).style("font-size", k.fontSize + "px").text(e[p].alias ?? p), { width: m, height: g } = te(
745
- o,
746
- _,
747
- e[p].attributes
748
- ), y = o.insert("rect", "#" + h).classed("er entityBox", !0).attr("x", 0).attr("y", 0).attr("width", m).attr("height", g).node().getBBox();
749
- r.setNode(f, {
750
- width: y.width,
751
- height: y.height,
752
- shape: "rect",
753
- id: f
754
- });
755
- }), l;
756
- }, re = function(t, e) {
757
- e.nodes().forEach(function(r) {
758
- r !== void 0 && e.node(r) !== void 0 && t.select("#" + r).attr(
759
- "transform",
760
- "translate(" + (e.node(r).x - e.node(r).width / 2) + "," + (e.node(r).y - e.node(r).height / 2) + " )"
761
- );
762
- });
763
- }, ut = function(t) {
764
- return (t.entityA + t.roleA + t.entityB).replace(/\s/g, "");
765
- }, ie = function(t, e) {
766
- return t.forEach(function(r) {
767
- e.setEdge(
768
- X.get(r.entityA),
769
- X.get(r.entityB),
770
- { relationship: r },
771
- ut(r)
772
- );
773
- }), t;
774
- };
775
- let ct = 0;
776
- const ae = function(t, e, r, u, l) {
777
- ct++;
778
- const p = r.edge(
779
- X.get(e.entityA),
780
- X.get(e.entityB),
781
- ut(e)
782
- ), f = wt().x(function(N) {
783
- return N.x;
784
- }).y(function(N) {
785
- return N.y;
786
- }).curve(Tt), o = t.insert("path", "#" + u).classed("er relationshipLine", !0).attr("d", f(p.points)).style("stroke", k.stroke).style("fill", "none");
787
- e.relSpec.relType === l.db.Identification.NON_IDENTIFYING && o.attr("stroke-dasharray", "8,8");
788
- let h = "";
789
- switch (k.arrowMarkerAbsolute && (h = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, h = h.replace(/\(/g, "\\("), h = h.replace(/\)/g, "\\)")), e.relSpec.cardA) {
790
- case l.db.Cardinality.ZERO_OR_ONE:
791
- o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.ZERO_OR_ONE_END + ")");
792
- break;
793
- case l.db.Cardinality.ZERO_OR_MORE:
794
- o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.ZERO_OR_MORE_END + ")");
795
- break;
796
- case l.db.Cardinality.ONE_OR_MORE:
797
- o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.ONE_OR_MORE_END + ")");
798
- break;
799
- case l.db.Cardinality.ONLY_ONE:
800
- o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.ONLY_ONE_END + ")");
801
- break;
802
- case l.db.Cardinality.MD_PARENT:
803
- o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.MD_PARENT_END + ")");
804
- break;
805
- }
806
- switch (e.relSpec.cardB) {
807
- case l.db.Cardinality.ZERO_OR_ONE:
808
- o.attr(
809
- "marker-start",
810
- "url(" + h + "#" + B.ERMarkers.ZERO_OR_ONE_START + ")"
811
- );
812
- break;
813
- case l.db.Cardinality.ZERO_OR_MORE:
814
- o.attr(
815
- "marker-start",
816
- "url(" + h + "#" + B.ERMarkers.ZERO_OR_MORE_START + ")"
817
- );
818
- break;
819
- case l.db.Cardinality.ONE_OR_MORE:
820
- o.attr(
821
- "marker-start",
822
- "url(" + h + "#" + B.ERMarkers.ONE_OR_MORE_START + ")"
823
- );
824
- break;
825
- case l.db.Cardinality.ONLY_ONE:
826
- o.attr("marker-start", "url(" + h + "#" + B.ERMarkers.ONLY_ONE_START + ")");
827
- break;
828
- case l.db.Cardinality.MD_PARENT:
829
- o.attr("marker-start", "url(" + h + "#" + B.ERMarkers.MD_PARENT_START + ")");
830
- break;
831
- }
832
- const _ = o.node().getTotalLength(), m = o.node().getPointAtLength(_ * 0.5), g = "rel" + ct, y = t.append("text").classed("er relationshipLabel", !0).attr("id", g).attr("x", m.x).attr("y", m.y).style("text-anchor", "middle").style("dominant-baseline", "middle").style("font-family", Z().fontFamily).style("font-size", k.fontSize + "px").text(e.roleA).node().getBBox();
833
- t.insert("rect", "#" + g).classed("er relationshipLabelBox", !0).attr("x", m.x - y.width / 2).attr("y", m.y - y.height / 2).attr("width", y.width).attr("height", y.height);
834
- }, ne = function(t, e, r, u) {
835
- k = Z().er, V.info("Drawing ER diagram");
836
- const l = Z().securityLevel;
837
- let p;
838
- l === "sandbox" && (p = rt("#i" + e));
839
- const o = (l === "sandbox" ? rt(p.nodes()[0].contentDocument.body) : rt("body")).select(`[id='${e}']`);
840
- B.insertMarkers(o, k);
841
- let h;
842
- h = new Mt({
843
- multigraph: !0,
844
- directed: !0,
845
- compound: !1
846
- }).setGraph({
847
- rankdir: k.layoutDirection,
848
- marginx: 20,
849
- marginy: 20,
850
- nodesep: 100,
851
- edgesep: 100,
852
- ranksep: 100
853
- }).setDefaultEdgeLabel(function() {
854
- return {};
855
- });
856
- const _ = ee(o, u.db.getEntities(), h), m = ie(u.db.getRelationships(), h);
857
- St(h), re(o, h), m.forEach(function(I) {
858
- ae(o, I, h, _, u);
859
- });
860
- const g = k.diagramPadding;
861
- Ot.insertTitle(o, "entityTitleText", k.titleTopMargin, u.db.getDiagramTitle());
862
- const x = o.node().getBBox(), y = x.width + g * 2, N = x.height + g * 2;
863
- bt(o, N, y, k.useMaxWidth), o.attr("viewBox", `${x.x - g} ${x.y - g} ${y} ${N}`);
864
- }, se = "28e9f9db-3c8d-5aa5-9faf-44286ae5937c";
865
- function oe(t = "", e = "") {
866
- const r = t.replace(Jt, "");
867
- return `${ht(e)}${ht(r)}${Wt(
868
- t,
869
- se
870
- )}`;
871
- }
872
- function ht(t = "") {
873
- return t.length > 0 ? `${t}-` : "";
874
- }
875
- const le = {
876
- setConf: $t,
877
- draw: ne
878
- }, ce = (t) => `
879
- .entityBox {
880
- fill: ${t.mainBkg};
881
- stroke: ${t.nodeBorder};
882
- }
883
-
884
- .attributeBoxOdd {
885
- fill: ${t.attributeBackgroundColorOdd};
886
- stroke: ${t.nodeBorder};
887
- }
888
-
889
- .attributeBoxEven {
890
- fill: ${t.attributeBackgroundColorEven};
891
- stroke: ${t.nodeBorder};
892
- }
893
-
894
- .relationshipLabelBox {
895
- fill: ${t.tertiaryColor};
896
- opacity: 0.7;
897
- background-color: ${t.tertiaryColor};
898
- rect {
899
- opacity: 0.5;
900
- }
901
- }
902
-
903
- .relationshipLine {
904
- stroke: ${t.lineColor};
905
- }
906
-
907
- .entityTitleText {
908
- text-anchor: middle;
909
- font-size: 18px;
910
- fill: ${t.textColor};
911
- }
912
- #MD_PARENT_START {
913
- fill: #f5f5f5 !important;
914
- stroke: ${t.lineColor} !important;
915
- stroke-width: 1;
916
- }
917
- #MD_PARENT_END {
918
- fill: #f5f5f5 !important;
919
- stroke: ${t.lineColor} !important;
920
- stroke-width: 1;
921
- }
922
-
923
- `, he = ce, Ee = {
924
- parser: Ut,
925
- db: qt,
926
- renderer: le,
927
- styles: he
928
- };
929
- export {
930
- Ee as diagram
931
- };