@layers-app/editor 0.7.44 → 0.7.46

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 (248) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +5 -4
  3. package/dist/index.js +3 -3
  4. package/dist/{layers.Bt5BEQ6h.js → layers.B88sQYuh.js} +1 -1
  5. package/dist/layers.BgMykHnn.js +154 -0
  6. package/dist/{layers.CsTbIH2o.js → layers.BtvuN20E.js} +8988 -9641
  7. package/dist/{layers.8AV9TJ5y.js → layers.Cfvta__C.js} +1 -1
  8. package/dist/{layers.b9B2NY7n.js → layers.CsQlovyR.js} +2191 -1950
  9. package/dist/layers.Ct1ojjl3.js +1 -0
  10. package/dist/{layers.BPwGnx6H.js → layers.Hq0pIRX3.js} +24 -24
  11. package/dist/layers.JT_kEFH5.js +129 -0
  12. package/dist/{layers.D5EnJuSD.js → layers.NW1lST7i.js} +1 -1
  13. package/dist/layers.pwc3O6Es.js +261 -0
  14. package/package.json +1 -1
  15. package/dist/layers.03rOzGz6.js +0 -1
  16. package/dist/layers.2ki87-LU.js +0 -5
  17. package/dist/layers.2o06iRgp.js +0 -504
  18. package/dist/layers.52famHy6.js +0 -1
  19. package/dist/layers.5oOWOsbG.js +0 -39
  20. package/dist/layers.7JqFgE4-.js +0 -15
  21. package/dist/layers.8KaGKAU3.js +0 -271
  22. package/dist/layers.9URcRock.js +0 -1
  23. package/dist/layers.9pNaFvaX.js +0 -1
  24. package/dist/layers.B-dneuft.js +0 -373
  25. package/dist/layers.B19hGmey.js +0 -1
  26. package/dist/layers.B1fchoGW.js +0 -1
  27. package/dist/layers.B2cspFhx.js +0 -1034
  28. package/dist/layers.B3D4g2HH.js +0 -1
  29. package/dist/layers.B6soS223.js +0 -8
  30. package/dist/layers.B780IvgC.js +0 -84
  31. package/dist/layers.B7K7JjK6.js +0 -1510
  32. package/dist/layers.B9UunCzG.js +0 -39
  33. package/dist/layers.B9rQcczY.js +0 -14
  34. package/dist/layers.BAtv1CM7.js +0 -1
  35. package/dist/layers.BBcDfITy.js +0 -40
  36. package/dist/layers.BBhmfZot.js +0 -39
  37. package/dist/layers.BDqHBDOj.js +0 -9
  38. package/dist/layers.BFRbDTjY.js +0 -160
  39. package/dist/layers.BIUiVID4.js +0 -10
  40. package/dist/layers.BIeVwYKL.js +0 -1
  41. package/dist/layers.BJDrjORS.js +0 -244
  42. package/dist/layers.BKamPs3H.js +0 -1
  43. package/dist/layers.BLd2spTm.js +0 -1
  44. package/dist/layers.BMWMvKH-.js +0 -806
  45. package/dist/layers.BMxAun-L.js +0 -6
  46. package/dist/layers.BOMgDmQW.js +0 -1
  47. package/dist/layers.BQX_W7-N.js +0 -41
  48. package/dist/layers.BRBbDnyO.js +0 -32
  49. package/dist/layers.BRU1WOyl.js +0 -65
  50. package/dist/layers.BSTBZrFn.js +0 -1
  51. package/dist/layers.BUP7J0N1.js +0 -198
  52. package/dist/layers.BWYHKKSc.js +0 -9
  53. package/dist/layers.B_5Gf5vh.js +0 -7
  54. package/dist/layers.BbCfEXyj.js +0 -55
  55. package/dist/layers.Be7sKoi1.js +0 -36
  56. package/dist/layers.BewWHVmc.js +0 -10
  57. package/dist/layers.Bhbf4Voy.js +0 -1286
  58. package/dist/layers.BhgyYcry.js +0 -2966
  59. package/dist/layers.BjqXvHbh.js +0 -38
  60. package/dist/layers.Bl153Elb.js +0 -772
  61. package/dist/layers.BlVr0EB6.js +0 -35
  62. package/dist/layers.BmBx-JQP.js +0 -9
  63. package/dist/layers.BnDdlKo4.js +0 -39
  64. package/dist/layers.BnWlIV7l.js +0 -9
  65. package/dist/layers.BpilXLfW.js +0 -6
  66. package/dist/layers.BpxcN2Id.js +0 -118
  67. package/dist/layers.Bva7u9LH.js +0 -41
  68. package/dist/layers.Bw9PyPP3.js +0 -40
  69. package/dist/layers.BxxWjVSm.js +0 -7
  70. package/dist/layers.ByfnxHEU.js +0 -11
  71. package/dist/layers.BzrUktHE.js +0 -40
  72. package/dist/layers.Bzx6XYuC.js +0 -1
  73. package/dist/layers.C-oUoVP8.js +0 -11
  74. package/dist/layers.C-v8184a.js +0 -10
  75. package/dist/layers.C2DLU3k6.js +0 -205
  76. package/dist/layers.C4n-fEss.js +0 -9
  77. package/dist/layers.C8LHt7Vy.js +0 -35
  78. package/dist/layers.C8_lu5UH.js +0 -23
  79. package/dist/layers.C8i9MTMT.js +0 -1089
  80. package/dist/layers.C8sUTigy.js +0 -1
  81. package/dist/layers.C9xAxi33.js +0 -2
  82. package/dist/layers.CBBwxyeE.js +0 -36
  83. package/dist/layers.CD1cqEz5.js +0 -40
  84. package/dist/layers.CDMZWhfy.js +0 -61
  85. package/dist/layers.CEGoZtyz.js +0 -42
  86. package/dist/layers.CF5fav1y.js +0 -42
  87. package/dist/layers.CHZsXQcr.js +0 -1
  88. package/dist/layers.CL2zU9v_.js +0 -8
  89. package/dist/layers.CMF1lFeu.js +0 -2482
  90. package/dist/layers.CN4h4dWv.js +0 -40
  91. package/dist/layers.COskFe6S.js +0 -39
  92. package/dist/layers.CPYfnqn5.js +0 -37
  93. package/dist/layers.CQGa02SB.js +0 -8
  94. package/dist/layers.CS1a09mB.js +0 -2
  95. package/dist/layers.CSABgVEk.js +0 -13
  96. package/dist/layers.CSPqTpuh.js +0 -1
  97. package/dist/layers.CUJquY9u.js +0 -40
  98. package/dist/layers.CVpmcvSk.js +0 -425
  99. package/dist/layers.CXNwKrxy.js +0 -2
  100. package/dist/layers.CXbg7PbM.js +0 -32
  101. package/dist/layers.CXtLmfFd.js +0 -4
  102. package/dist/layers.CYQ-eDkR.js +0 -36
  103. package/dist/layers.CYlMzZJI.js +0 -223
  104. package/dist/layers.C_6t44t9.js +0 -7
  105. package/dist/layers.C_AqJZgj.js +0 -1
  106. package/dist/layers.C_IvrzZ3.js +0 -7
  107. package/dist/layers.C_JAqhrY.js +0 -76
  108. package/dist/layers.C_l6mWJZ.js +0 -3
  109. package/dist/layers.Cbn9kFtP.js +0 -22
  110. package/dist/layers.CdC2YLb3.js +0 -189
  111. package/dist/layers.Ce68IynP.js +0 -8
  112. package/dist/layers.Ced46X3q.js +0 -6
  113. package/dist/layers.CgAndu8u.js +0 -437
  114. package/dist/layers.CgKZ3PQQ.js +0 -1
  115. package/dist/layers.CjF61D9D.js +0 -32
  116. package/dist/layers.Ck_mYNSX.js +0 -38
  117. package/dist/layers.Ckb_FqEw.js +0 -9
  118. package/dist/layers.ClK-YSEj.js +0 -10
  119. package/dist/layers.ClPMD0vL.js +0 -1619
  120. package/dist/layers.Cq3WhnzE.js +0 -41
  121. package/dist/layers.CqVTtuYm.js +0 -6
  122. package/dist/layers.CrM-3BQr.js +0 -4
  123. package/dist/layers.CsJQzt0K.js +0 -805
  124. package/dist/layers.Cux05MKl.js +0 -8
  125. package/dist/layers.CwZFs1PA.js +0 -10
  126. package/dist/layers.Cxlebi7D.js +0 -122
  127. package/dist/layers.Cy9EF2DN.js +0 -8
  128. package/dist/layers.Cyzu9PKQ.js +0 -1
  129. package/dist/layers.D0zn4_Mx.js +0 -1
  130. package/dist/layers.D1hB76Bq.js +0 -11
  131. package/dist/layers.D3RHWYgt.js +0 -8
  132. package/dist/layers.D3qdetie.js +0 -9
  133. package/dist/layers.D3xtqcGm.js +0 -42
  134. package/dist/layers.D4T8fTcj.js +0 -1223
  135. package/dist/layers.D54e-Khu.js +0 -9
  136. package/dist/layers.D661e9Xc.js +0 -1225
  137. package/dist/layers.D7cIx_9y.js +0 -7
  138. package/dist/layers.D7jGxypv.js +0 -8
  139. package/dist/layers.D7v-bI_M.js +0 -796
  140. package/dist/layers.DA37YYAX.js +0 -1
  141. package/dist/layers.DBFtWsLd.js +0 -32
  142. package/dist/layers.DBspJRLt.js +0 -9
  143. package/dist/layers.DCYPhLVi.js +0 -139
  144. package/dist/layers.DCeGyOw0.js +0 -32
  145. package/dist/layers.DDBS2bZp.js +0 -10
  146. package/dist/layers.DEV2RzXF.js +0 -35
  147. package/dist/layers.DFOzrTFb.js +0 -6
  148. package/dist/layers.DGbx9JE5.js +0 -70
  149. package/dist/layers.DH1xK3c2.js +0 -48149
  150. package/dist/layers.DH2Fx227.js +0 -38
  151. package/dist/layers.DH7NXYKd.js +0 -21941
  152. package/dist/layers.DHOsMTqa.js +0 -41
  153. package/dist/layers.DJIT4Yuh.js +0 -1
  154. package/dist/layers.DJteL1WD.js +0 -33
  155. package/dist/layers.DLwuMfdd.js +0 -84
  156. package/dist/layers.DMkBISW1.js +0 -1
  157. package/dist/layers.DN58BT2N.js +0 -129
  158. package/dist/layers.DN9HoVxI.js +0 -18
  159. package/dist/layers.DNRniJ59.js +0 -33
  160. package/dist/layers.DOZhGFQj.js +0 -40
  161. package/dist/layers.DOrgOHBr.js +0 -1
  162. package/dist/layers.DP6Pb86W.js +0 -4
  163. package/dist/layers.DQpfAS9_.js +0 -84
  164. package/dist/layers.DSBfJxui.js +0 -2238
  165. package/dist/layers.DUulRicy.js +0 -213
  166. package/dist/layers.DXLQ2q0o.js +0 -794
  167. package/dist/layers.DXqg60IE.js +0 -1
  168. package/dist/layers.DZkyqPUI.js +0 -41
  169. package/dist/layers.D_MAZnF5.js +0 -11
  170. package/dist/layers.DbMx76Zo.js +0 -1
  171. package/dist/layers.DbaKVP5e.js +0 -1
  172. package/dist/layers.DcYYTMWk.js +0 -5
  173. package/dist/layers.DenHSAM-.js +0 -423
  174. package/dist/layers.Dfg_GwXo.js +0 -41
  175. package/dist/layers.Dfv6IVuG.js +0 -39
  176. package/dist/layers.Di5XQ7RG.js +0 -5
  177. package/dist/layers.DiLG4f1T.js +0 -41
  178. package/dist/layers.DjUOC4st.js +0 -16
  179. package/dist/layers.Dksb8xWL.js +0 -21620
  180. package/dist/layers.DnTHkHku.js +0 -1
  181. package/dist/layers.DnbGJb7n.js +0 -10
  182. package/dist/layers.Dp8hIITu.js +0 -39
  183. package/dist/layers.DrGILrJe.js +0 -1
  184. package/dist/layers.DrPZhd4b.js +0 -8
  185. package/dist/layers.DsCDPcQF.js +0 -52
  186. package/dist/layers.DsLXYKq7.js +0 -139
  187. package/dist/layers.DssLE6Ze.js +0 -42
  188. package/dist/layers.DtK0Svqg.js +0 -36
  189. package/dist/layers.DtNKNbtb.js +0 -1268
  190. package/dist/layers.DuuzgAVb.js +0 -7
  191. package/dist/layers.DuyNXGEO.js +0 -5
  192. package/dist/layers.DvSwjIBG.js +0 -37
  193. package/dist/layers.DwPc2_v9.js +0 -1088
  194. package/dist/layers.DxA6ocdw.js +0 -70
  195. package/dist/layers.Dy1naDTQ.js +0 -14
  196. package/dist/layers.DyK8xvHc.js +0 -1
  197. package/dist/layers.G5fXkV2g.js +0 -40
  198. package/dist/layers.GRwgnZ0K.js +0 -1126
  199. package/dist/layers.H9GbooLl.js +0 -11
  200. package/dist/layers.Ii0kosET.js +0 -10
  201. package/dist/layers.IsBK41F6.js +0 -960
  202. package/dist/layers.JFRyjmr3.js +0 -295
  203. package/dist/layers.JWCLFILJ.js +0 -1
  204. package/dist/layers.L1EEfd1U.js +0 -323
  205. package/dist/layers.LgOKQKa4.js +0 -39
  206. package/dist/layers.NsxwBYck.js +0 -907
  207. package/dist/layers.OqunHjml.js +0 -51
  208. package/dist/layers.OziSx6JY.js +0 -8583
  209. package/dist/layers.PW9J5Jxo.js +0 -37
  210. package/dist/layers.R8mPlCA0.js +0 -261
  211. package/dist/layers.S2akqscS.js +0 -1
  212. package/dist/layers.SGT8YAPE.js +0 -7
  213. package/dist/layers.TD8A7YjM.js +0 -44
  214. package/dist/layers.UtIqQK19.js +0 -276
  215. package/dist/layers.VIZ2Xa30.js +0 -1
  216. package/dist/layers.WAvmJfLV.js +0 -7
  217. package/dist/layers.XQpyNRW5.js +0 -116
  218. package/dist/layers.Xco5GVBh.js +0 -40
  219. package/dist/layers.Y0BjACCI.js +0 -39
  220. package/dist/layers.YTMr1YyH.js +0 -42
  221. package/dist/layers._bAvXI7Q.js +0 -934
  222. package/dist/layers._mqWoKOG.js +0 -1
  223. package/dist/layers.al8Vg6zt.js +0 -6
  224. package/dist/layers.b0h5ZBmD.js +0 -61
  225. package/dist/layers.dyRJvH-s.js +0 -6
  226. package/dist/layers.eB1U5Jl6.js +0 -8
  227. package/dist/layers.euNtZlgm.js +0 -37
  228. package/dist/layers.fChmSQjC.js +0 -1
  229. package/dist/layers.feSI_7Kx.js +0 -1
  230. package/dist/layers.frthGoDK.js +0 -9
  231. package/dist/layers.gqLoI9xW.js +0 -5
  232. package/dist/layers.hpuqkyYN.js +0 -257
  233. package/dist/layers.iN3mYsr5.js +0 -34
  234. package/dist/layers.jjNsAaLS.js +0 -10
  235. package/dist/layers.l6EuAdoo.js +0 -7
  236. package/dist/layers.lCpg7dOn.js +0 -21
  237. package/dist/layers.lXs3RYd3.js +0 -10
  238. package/dist/layers.liB8aZ3C.js +0 -207
  239. package/dist/layers.qffllMmW.js +0 -41
  240. package/dist/layers.r1jKcKBb.js +0 -4
  241. package/dist/layers.rFy6_B28.js +0 -32
  242. package/dist/layers.rq1vUYAs.js +0 -6
  243. package/dist/layers.sIeIPQd4.js +0 -40
  244. package/dist/layers.sdxt2Nuu.js +0 -8
  245. package/dist/layers.t8MaTGN8.js +0 -1
  246. package/dist/layers.wKJ5yZVV.js +0 -96
  247. package/dist/layers.x9brO2TV.js +0 -1
  248. package/dist/layers.xQ1jNHSB.js +0 -1583
@@ -1,934 +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.OziSx6JY.js";
2
- import { G as Mt } from "./layers.BJDrjORS.js";
3
- import "lodash-es";
4
- import { l as St } from "./layers.D4T8fTcj.js";
5
- import "./layers.Dksb8xWL.js";
6
- import "lodash-es/memoize.js";
7
- import "lodash-es/merge.js";
8
- import "lodash-es/isEmpty.js";
9
- import { l as wt } from "./layers.DNRniJ59.js";
10
- 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;
11
- function Dt(t) {
12
- return typeof t == "string" && It.test(t);
13
- }
14
- const A = [];
15
- for (let t = 0; t < 256; ++t)
16
- A.push((t + 256).toString(16).slice(1));
17
- function vt(t, e = 0) {
18
- 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]];
19
- }
20
- function Lt(t) {
21
- if (!Dt(t))
22
- throw TypeError("Invalid UUID");
23
- let e;
24
- const r = new Uint8Array(16);
25
- 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;
26
- }
27
- function Bt(t) {
28
- t = unescape(encodeURIComponent(t));
29
- const e = [];
30
- for (let r = 0; r < t.length; ++r)
31
- e.push(t.charCodeAt(r));
32
- return e;
33
- }
34
- const Ct = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", Pt = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
35
- function Yt(t, e, r) {
36
- function u(l, p, f, o) {
37
- var h;
38
- if (typeof l == "string" && (l = Bt(l)), typeof p == "string" && (p = Lt(p)), ((h = p) === null || h === void 0 ? void 0 : h.length) !== 16)
39
- throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
40
- let _ = new Uint8Array(16 + l.length);
41
- if (_.set(p), _.set(l, p.length), _ = r(_), _[6] = _[6] & 15 | e, _[8] = _[8] & 63 | 128, f) {
42
- o = o || 0;
43
- for (let m = 0; m < 16; ++m)
44
- f[o + m] = _[m];
45
- return f;
46
- }
47
- return vt(_);
48
- }
49
- try {
50
- u.name = t;
51
- } catch {
52
- }
53
- return u.DNS = Ct, u.URL = Pt, u;
54
- }
55
- function Zt(t, e, r, u) {
56
- switch (t) {
57
- case 0:
58
- return e & r ^ ~e & u;
59
- case 1:
60
- return e ^ r ^ u;
61
- case 2:
62
- return e & r ^ e & u ^ r & u;
63
- case 3:
64
- return e ^ r ^ u;
65
- }
66
- }
67
- function it(t, e) {
68
- return t << e | t >>> 32 - e;
69
- }
70
- function Ft(t) {
71
- const e = [1518500249, 1859775393, 2400959708, 3395469782], r = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
72
- if (typeof t == "string") {
73
- const f = unescape(encodeURIComponent(t));
74
- t = [];
75
- for (let o = 0; o < f.length; ++o)
76
- t.push(f.charCodeAt(o));
77
- } else Array.isArray(t) || (t = Array.prototype.slice.call(t));
78
- t.push(128);
79
- const u = t.length / 4 + 2, l = Math.ceil(u / 16), p = new Array(l);
80
- for (let f = 0; f < l; ++f) {
81
- const o = new Uint32Array(16);
82
- for (let h = 0; h < 16; ++h)
83
- 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];
84
- p[f] = o;
85
- }
86
- 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;
87
- for (let f = 0; f < l; ++f) {
88
- const o = new Uint32Array(80);
89
- for (let y = 0; y < 16; ++y)
90
- o[y] = p[f][y];
91
- for (let y = 16; y < 80; ++y)
92
- o[y] = it(o[y - 3] ^ o[y - 8] ^ o[y - 14] ^ o[y - 16], 1);
93
- let h = r[0], _ = r[1], m = r[2], g = r[3], x = r[4];
94
- for (let y = 0; y < 80; ++y) {
95
- const N = Math.floor(y / 20), I = it(h, 5) + Zt(N, _, m, g) + x + e[N] + o[y] >>> 0;
96
- x = g, g = m, m = it(_, 30) >>> 0, _ = h, h = I;
97
- }
98
- 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;
99
- }
100
- 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];
101
- }
102
- const Wt = Yt("v5", 80, Ft);
103
- var at = (function() {
104
- var t = function(S, a, n, c) {
105
- for (n = n || {}, c = S.length; c--; n[S[c]] = a)
106
- ;
107
- return n;
108
- }, 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 = {
109
- trace: function() {
110
- },
111
- yy: {},
112
- 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 },
113
- 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" },
114
- 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]],
115
- performAction: function(a, n, c, d, E, i, K) {
116
- var s = i.length - 1;
117
- switch (E) {
118
- case 1:
119
- break;
120
- case 2:
121
- this.$ = [];
122
- break;
123
- case 3:
124
- i[s - 1].push(i[s]), this.$ = i[s - 1];
125
- break;
126
- case 4:
127
- case 5:
128
- this.$ = i[s];
129
- break;
130
- case 6:
131
- case 7:
132
- this.$ = [];
133
- break;
134
- case 8:
135
- d.addEntity(i[s - 4]), d.addEntity(i[s - 2]), d.addRelationship(i[s - 4], i[s], i[s - 2], i[s - 3]);
136
- break;
137
- case 9:
138
- d.addEntity(i[s - 3]), d.addAttributes(i[s - 3], i[s - 1]);
139
- break;
140
- case 10:
141
- d.addEntity(i[s - 2]);
142
- break;
143
- case 11:
144
- d.addEntity(i[s]);
145
- break;
146
- case 12:
147
- d.addEntity(i[s - 6], i[s - 4]), d.addAttributes(i[s - 6], i[s - 1]);
148
- break;
149
- case 13:
150
- d.addEntity(i[s - 5], i[s - 3]);
151
- break;
152
- case 14:
153
- d.addEntity(i[s - 3], i[s - 1]);
154
- break;
155
- case 15:
156
- case 16:
157
- this.$ = i[s].trim(), d.setAccTitle(this.$);
158
- break;
159
- case 17:
160
- case 18:
161
- this.$ = i[s].trim(), d.setAccDescription(this.$);
162
- break;
163
- case 19:
164
- case 43:
165
- this.$ = i[s];
166
- break;
167
- case 20:
168
- case 41:
169
- case 42:
170
- this.$ = i[s].replace(/"/g, "");
171
- break;
172
- case 21:
173
- case 29:
174
- this.$ = [i[s]];
175
- break;
176
- case 22:
177
- i[s].push(i[s - 1]), this.$ = i[s];
178
- break;
179
- case 23:
180
- this.$ = { attributeType: i[s - 1], attributeName: i[s] };
181
- break;
182
- case 24:
183
- this.$ = { attributeType: i[s - 2], attributeName: i[s - 1], attributeKeyTypeList: i[s] };
184
- break;
185
- case 25:
186
- this.$ = { attributeType: i[s - 2], attributeName: i[s - 1], attributeComment: i[s] };
187
- break;
188
- case 26:
189
- this.$ = { attributeType: i[s - 3], attributeName: i[s - 2], attributeKeyTypeList: i[s - 1], attributeComment: i[s] };
190
- break;
191
- case 27:
192
- case 28:
193
- case 31:
194
- this.$ = i[s];
195
- break;
196
- case 30:
197
- i[s - 2].push(i[s]), this.$ = i[s - 2];
198
- break;
199
- case 32:
200
- this.$ = i[s].replace(/"/g, "");
201
- break;
202
- case 33:
203
- this.$ = { cardA: i[s], relType: i[s - 1], cardB: i[s - 2] };
204
- break;
205
- case 34:
206
- this.$ = d.Cardinality.ZERO_OR_ONE;
207
- break;
208
- case 35:
209
- this.$ = d.Cardinality.ZERO_OR_MORE;
210
- break;
211
- case 36:
212
- this.$ = d.Cardinality.ONE_OR_MORE;
213
- break;
214
- case 37:
215
- this.$ = d.Cardinality.ONLY_ONE;
216
- break;
217
- case 38:
218
- this.$ = d.Cardinality.MD_PARENT;
219
- break;
220
- case 39:
221
- this.$ = d.Identification.NON_IDENTIFYING;
222
- break;
223
- case 40:
224
- this.$ = d.Identification.IDENTIFYING;
225
- break;
226
- }
227
- },
228
- 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])],
229
- defaultActions: { 34: [2, 27], 41: [2, 22] },
230
- parseError: function(a, n) {
231
- if (n.recoverable)
232
- this.trace(a);
233
- else {
234
- var c = new Error(a);
235
- throw c.hash = n, c;
236
- }
237
- },
238
- parse: function(a) {
239
- 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: {} };
240
- for (var J in this.yy)
241
- Object.prototype.hasOwnProperty.call(this.yy, J) && (H.yy[J] = this.yy[J]);
242
- b.setInput(a, H.yy), H.yy.lexer = b, H.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
243
- var $ = b.yylloc;
244
- i.push($);
245
- var pt = b.options && b.options.ranges;
246
- typeof H.yy.parseError == "function" ? this.parseError = H.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
247
- function _t() {
248
- var Y;
249
- return Y = d.pop() || b.lex() || ot, typeof Y != "number" && (Y instanceof Array && (d = Y, Y = d.pop()), Y = n.symbols_[Y] || Y), Y;
250
- }
251
- for (var w, z, D, tt, G = {}, q, P, lt, j; ; ) {
252
- 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]) {
253
- var et = "";
254
- j = [];
255
- for (q in K[z])
256
- this.terminals_[q] && q > ft && j.push("'" + this.terminals_[q] + "'");
257
- b.showPosition ? et = "Parse error on line " + (Q + 1) + `:
258
- ` + b.showPosition() + `
259
- 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, {
260
- text: b.match,
261
- token: this.terminals_[w] || w,
262
- line: b.yylineno,
263
- loc: $,
264
- expected: j
265
- });
266
- }
267
- if (D[0] instanceof Array && D.length > 1)
268
- throw new Error("Parse Error: multiple actions possible at state: " + z + ", token: " + w);
269
- switch (D[0]) {
270
- case 1:
271
- 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;
272
- break;
273
- case 2:
274
- if (P = this.productions_[D[1]][1], G.$ = E[E.length - P], G._$ = {
275
- first_line: i[i.length - (P || 1)].first_line,
276
- last_line: i[i.length - 1].last_line,
277
- first_column: i[i.length - (P || 1)].first_column,
278
- last_column: i[i.length - 1].last_column
279
- }, pt && (G._$.range = [
280
- i[i.length - (P || 1)].range[0],
281
- i[i.length - 1].range[1]
282
- ]), tt = this.performAction.apply(G, [
283
- s,
284
- st,
285
- Q,
286
- H.yy,
287
- D[1],
288
- E,
289
- i
290
- ].concat(yt)), typeof tt < "u")
291
- return tt;
292
- 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);
293
- break;
294
- case 3:
295
- return !0;
296
- }
297
- }
298
- return !0;
299
- }
300
- }, O = /* @__PURE__ */ (function() {
301
- var S = {
302
- EOF: 1,
303
- parseError: function(n, c) {
304
- if (this.yy.parser)
305
- this.yy.parser.parseError(n, c);
306
- else
307
- throw new Error(n);
308
- },
309
- // resets the lexer, sets new input
310
- setInput: function(a, n) {
311
- 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 = {
312
- first_line: 1,
313
- first_column: 0,
314
- last_line: 1,
315
- last_column: 0
316
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
317
- },
318
- // consumes and returns one char from the input
319
- input: function() {
320
- var a = this._input[0];
321
- this.yytext += a, this.yyleng++, this.offset++, this.match += a, this.matched += a;
322
- var n = a.match(/(?:\r\n?|\n).*/g);
323
- 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;
324
- },
325
- // unshifts one char (or a string) into the input
326
- unput: function(a) {
327
- var n = a.length, c = a.split(/(?:\r\n?|\n)/g);
328
- this._input = a + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - n), this.offset -= n;
329
- var d = this.match.split(/(?:\r\n?|\n)/g);
330
- 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);
331
- var E = this.yylloc.range;
332
- return this.yylloc = {
333
- first_line: this.yylloc.first_line,
334
- last_line: this.yylineno + 1,
335
- first_column: this.yylloc.first_column,
336
- 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
337
- }, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - n]), this.yyleng = this.yytext.length, this;
338
- },
339
- // When called from action, caches matched text and appends it on next action
340
- more: function() {
341
- return this._more = !0, this;
342
- },
343
- // 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.
344
- reject: function() {
345
- if (this.options.backtrack_lexer)
346
- this._backtrack = !0;
347
- else
348
- 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).
349
- ` + this.showPosition(), {
350
- text: "",
351
- token: null,
352
- line: this.yylineno
353
- });
354
- return this;
355
- },
356
- // retain first n characters of the match
357
- less: function(a) {
358
- this.unput(this.match.slice(a));
359
- },
360
- // displays already matched input, i.e. for error messages
361
- pastInput: function() {
362
- var a = this.matched.substr(0, this.matched.length - this.match.length);
363
- return (a.length > 20 ? "..." : "") + a.substr(-20).replace(/\n/g, "");
364
- },
365
- // displays upcoming input, i.e. for error messages
366
- upcomingInput: function() {
367
- var a = this.match;
368
- return a.length < 20 && (a += this._input.substr(0, 20 - a.length)), (a.substr(0, 20) + (a.length > 20 ? "..." : "")).replace(/\n/g, "");
369
- },
370
- // displays the character position where the lexing error occurred, i.e. for error messages
371
- showPosition: function() {
372
- var a = this.pastInput(), n = new Array(a.length + 1).join("-");
373
- return a + this.upcomingInput() + `
374
- ` + n + "^";
375
- },
376
- // test the lexed token: return FALSE when not a match, otherwise return token
377
- test_match: function(a, n) {
378
- var c, d, E;
379
- if (this.options.backtrack_lexer && (E = {
380
- yylineno: this.yylineno,
381
- yylloc: {
382
- first_line: this.yylloc.first_line,
383
- last_line: this.last_line,
384
- first_column: this.yylloc.first_column,
385
- last_column: this.yylloc.last_column
386
- },
387
- yytext: this.yytext,
388
- match: this.match,
389
- matches: this.matches,
390
- matched: this.matched,
391
- yyleng: this.yyleng,
392
- offset: this.offset,
393
- _more: this._more,
394
- _input: this._input,
395
- yy: this.yy,
396
- conditionStack: this.conditionStack.slice(0),
397
- done: this.done
398
- }, 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 = {
399
- first_line: this.yylloc.last_line,
400
- last_line: this.yylineno + 1,
401
- first_column: this.yylloc.last_column,
402
- last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + a[0].length
403
- }, 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)
404
- return c;
405
- if (this._backtrack) {
406
- for (var i in E)
407
- this[i] = E[i];
408
- return !1;
409
- }
410
- return !1;
411
- },
412
- // return next match in input
413
- next: function() {
414
- if (this.done)
415
- return this.EOF;
416
- this._input || (this.done = !0);
417
- var a, n, c, d;
418
- this._more || (this.yytext = "", this.match = "");
419
- for (var E = this._currentRules(), i = 0; i < E.length; i++)
420
- if (c = this._input.match(this.rules[E[i]]), c && (!n || c[0].length > n[0].length)) {
421
- if (n = c, d = i, this.options.backtrack_lexer) {
422
- if (a = this.test_match(c, E[i]), a !== !1)
423
- return a;
424
- if (this._backtrack) {
425
- n = !1;
426
- continue;
427
- } else
428
- return !1;
429
- } else if (!this.options.flex)
430
- break;
431
- }
432
- 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.
433
- ` + this.showPosition(), {
434
- text: "",
435
- token: null,
436
- line: this.yylineno
437
- });
438
- },
439
- // return next match that has a token
440
- lex: function() {
441
- var n = this.next();
442
- return n || this.lex();
443
- },
444
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
445
- begin: function(n) {
446
- this.conditionStack.push(n);
447
- },
448
- // pop the previously active lexer condition state off the condition stack
449
- popState: function() {
450
- var n = this.conditionStack.length - 1;
451
- return n > 0 ? this.conditionStack.pop() : this.conditionStack[0];
452
- },
453
- // produce the lexer rule set which is active for the currently active lexer condition state
454
- _currentRules: function() {
455
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
456
- },
457
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
458
- topState: function(n) {
459
- return n = this.conditionStack.length - 1 - Math.abs(n || 0), n >= 0 ? this.conditionStack[n] : "INITIAL";
460
- },
461
- // alias for begin(condition)
462
- pushState: function(n) {
463
- this.begin(n);
464
- },
465
- // return the number of states currently on the stack
466
- stateStackSize: function() {
467
- return this.conditionStack.length;
468
- },
469
- options: { "case-insensitive": !0 },
470
- performAction: function(n, c, d, E) {
471
- switch (d) {
472
- case 0:
473
- return this.begin("acc_title"), 22;
474
- case 1:
475
- return this.popState(), "acc_title_value";
476
- case 2:
477
- return this.begin("acc_descr"), 24;
478
- case 3:
479
- return this.popState(), "acc_descr_value";
480
- case 4:
481
- this.begin("acc_descr_multiline");
482
- break;
483
- case 5:
484
- this.popState();
485
- break;
486
- case 6:
487
- return "acc_descr_multiline_value";
488
- case 7:
489
- return 10;
490
- case 8:
491
- break;
492
- case 9:
493
- return 8;
494
- case 10:
495
- return 28;
496
- case 11:
497
- return 48;
498
- case 12:
499
- return 4;
500
- case 13:
501
- return this.begin("block"), 15;
502
- case 14:
503
- return 36;
504
- case 15:
505
- break;
506
- case 16:
507
- return 37;
508
- case 17:
509
- return 34;
510
- case 18:
511
- return 34;
512
- case 19:
513
- return 38;
514
- case 20:
515
- break;
516
- case 21:
517
- return this.popState(), 17;
518
- case 22:
519
- return c.yytext[0];
520
- case 23:
521
- return 18;
522
- case 24:
523
- return 19;
524
- case 25:
525
- return 41;
526
- case 26:
527
- return 43;
528
- case 27:
529
- return 43;
530
- case 28:
531
- return 43;
532
- case 29:
533
- return 41;
534
- case 30:
535
- return 41;
536
- case 31:
537
- return 42;
538
- case 32:
539
- return 42;
540
- case 33:
541
- return 42;
542
- case 34:
543
- return 42;
544
- case 35:
545
- return 42;
546
- case 36:
547
- return 43;
548
- case 37:
549
- return 42;
550
- case 38:
551
- return 43;
552
- case 39:
553
- return 44;
554
- case 40:
555
- return 44;
556
- case 41:
557
- return 44;
558
- case 42:
559
- return 44;
560
- case 43:
561
- return 41;
562
- case 44:
563
- return 42;
564
- case 45:
565
- return 43;
566
- case 46:
567
- return 45;
568
- case 47:
569
- return 46;
570
- case 48:
571
- return 47;
572
- case 49:
573
- return 47;
574
- case 50:
575
- return 46;
576
- case 51:
577
- return 46;
578
- case 52:
579
- return 46;
580
- case 53:
581
- return 27;
582
- case 54:
583
- return c.yytext[0];
584
- case 55:
585
- return 6;
586
- }
587
- },
588
- 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],
589
- 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 } }
590
- };
591
- return S;
592
- })();
593
- R.lexer = O;
594
- function v() {
595
- this.yy = {};
596
- }
597
- return v.prototype = R, R.Parser = v, new v();
598
- })();
599
- at.parser = at;
600
- const Ut = at;
601
- let U = {}, nt = [];
602
- const Ht = {
603
- ZERO_OR_ONE: "ZERO_OR_ONE",
604
- ZERO_OR_MORE: "ZERO_OR_MORE",
605
- ONE_OR_MORE: "ONE_OR_MORE",
606
- ONLY_ONE: "ONLY_ONE",
607
- MD_PARENT: "MD_PARENT"
608
- }, zt = {
609
- NON_IDENTIFYING: "NON_IDENTIFYING",
610
- IDENTIFYING: "IDENTIFYING"
611
- }, dt = function(t, e = void 0) {
612
- 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];
613
- }, Gt = () => U, Kt = function(t, e) {
614
- let r = dt(t), u;
615
- for (u = e.length - 1; u >= 0; u--)
616
- r.attributes.push(e[u]), V.debug("Added attribute ", e[u].attributeName);
617
- }, Vt = function(t, e, r, u) {
618
- let l = {
619
- entityA: t,
620
- roleA: e,
621
- entityB: r,
622
- relSpec: u
623
- };
624
- nt.push(l), V.debug("Added new relationship :", l);
625
- }, Xt = () => nt, Qt = function() {
626
- U = {}, nt = [], Nt();
627
- }, qt = {
628
- Cardinality: Ht,
629
- Identification: zt,
630
- getConfig: () => Z().er,
631
- addEntity: dt,
632
- addAttributes: Kt,
633
- getEntities: Gt,
634
- addRelationship: Vt,
635
- getRelationships: Xt,
636
- clear: Qt,
637
- setAccTitle: Rt,
638
- getAccTitle: xt,
639
- setAccDescription: kt,
640
- getAccDescription: gt,
641
- setDiagramTitle: mt,
642
- getDiagramTitle: Et
643
- }, L = {
644
- ONLY_ONE_START: "ONLY_ONE_START",
645
- ONLY_ONE_END: "ONLY_ONE_END",
646
- ZERO_OR_ONE_START: "ZERO_OR_ONE_START",
647
- ZERO_OR_ONE_END: "ZERO_OR_ONE_END",
648
- ONE_OR_MORE_START: "ONE_OR_MORE_START",
649
- ONE_OR_MORE_END: "ONE_OR_MORE_END",
650
- ZERO_OR_MORE_START: "ZERO_OR_MORE_START",
651
- ZERO_OR_MORE_END: "ZERO_OR_MORE_END",
652
- MD_PARENT_END: "MD_PARENT_END",
653
- MD_PARENT_START: "MD_PARENT_START"
654
- }, jt = function(t, e) {
655
- let r;
656
- 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");
657
- }, B = {
658
- ERMarkers: L,
659
- insertMarkers: jt
660
- }, Jt = /[^\dA-Za-z](\W)*/g;
661
- let k = {}, X = /* @__PURE__ */ new Map();
662
- const $t = function(t) {
663
- const e = Object.keys(t);
664
- for (const r of e)
665
- k[r] = t[r];
666
- }, te = (t, e, r) => {
667
- const u = k.entityPadding / 3, l = k.entityPadding / 3, p = k.fontSize * 0.85, f = e.node().getBBox(), o = [];
668
- let h = !1, _ = !1, m = 0, g = 0, x = 0, y = 0, N = f.height + u * 2, I = 1;
669
- r.forEach((T) => {
670
- T.attributeKeyTypeList !== void 0 && T.attributeKeyTypeList.length > 0 && (h = !0), T.attributeComment !== void 0 && (_ = !0);
671
- }), r.forEach((T) => {
672
- const M = `${e.node().id}-attr-${I}`;
673
- let R = 0;
674
- 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 = {};
675
- a.tn = v, a.nn = S;
676
- const n = v.node().getBBox(), c = S.node().getBBox();
677
- if (m = Math.max(m, n.width), g = Math.max(g, c.width), R = Math.max(n.height, c.height), h) {
678
- 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);
679
- a.kn = E;
680
- const i = E.node().getBBox();
681
- x = Math.max(x, i.width), R = Math.max(R, i.height);
682
- }
683
- if (_) {
684
- 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 || "");
685
- a.cn = d;
686
- const E = d.node().getBBox();
687
- y = Math.max(y, E.width), R = Math.max(R, E.height);
688
- }
689
- a.height = R, o.push(a), N += R + u * 2, I += 1;
690
- });
691
- let F = 4;
692
- h && (F += 2), _ && (F += 2);
693
- const W = m + g + x + y, C = {
694
- width: Math.max(
695
- k.minEntityWidth,
696
- Math.max(
697
- f.width + k.entityPadding * 2,
698
- W + l * F
699
- )
700
- ),
701
- height: r.length > 0 ? N : Math.max(k.minEntityHeight, f.height + k.entityPadding * 2)
702
- };
703
- if (r.length > 0) {
704
- const T = Math.max(
705
- 0,
706
- (C.width - W - l * F) / (F / 2)
707
- );
708
- e.attr(
709
- "transform",
710
- "translate(" + C.width / 2 + "," + (u + f.height / 2) + ")"
711
- );
712
- let M = f.height + u * 2, R = "attributeBoxOdd";
713
- o.forEach((O) => {
714
- const v = M + u + O.height / 2;
715
- O.tn.attr("transform", "translate(" + l + "," + v + ")");
716
- 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"));
717
- O.nn.attr(
718
- "transform",
719
- "translate(" + (a + l) + "," + v + ")"
720
- );
721
- 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);
722
- let c = parseFloat(n.attr("x")) + parseFloat(n.attr("width"));
723
- if (h) {
724
- O.kn.attr(
725
- "transform",
726
- "translate(" + (c + l) + "," + v + ")"
727
- );
728
- 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);
729
- c = parseFloat(d.attr("x")) + parseFloat(d.attr("width"));
730
- }
731
- _ && (O.cn.attr(
732
- "transform",
733
- "translate(" + (c + l) + "," + v + ")"
734
- ), 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";
735
- });
736
- } else
737
- C.height = Math.max(k.minEntityHeight, N), e.attr("transform", "translate(" + C.width / 2 + "," + C.height / 2 + ")");
738
- return C;
739
- }, ee = function(t, e, r) {
740
- const u = Object.keys(e);
741
- let l;
742
- return u.forEach(function(p) {
743
- const f = oe(p, "entity");
744
- X.set(p, f);
745
- const o = t.append("g").attr("id", f);
746
- l = l === void 0 ? f : l;
747
- 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(
748
- o,
749
- _,
750
- e[p].attributes
751
- ), y = o.insert("rect", "#" + h).classed("er entityBox", !0).attr("x", 0).attr("y", 0).attr("width", m).attr("height", g).node().getBBox();
752
- r.setNode(f, {
753
- width: y.width,
754
- height: y.height,
755
- shape: "rect",
756
- id: f
757
- });
758
- }), l;
759
- }, re = function(t, e) {
760
- e.nodes().forEach(function(r) {
761
- r !== void 0 && e.node(r) !== void 0 && t.select("#" + r).attr(
762
- "transform",
763
- "translate(" + (e.node(r).x - e.node(r).width / 2) + "," + (e.node(r).y - e.node(r).height / 2) + " )"
764
- );
765
- });
766
- }, ut = function(t) {
767
- return (t.entityA + t.roleA + t.entityB).replace(/\s/g, "");
768
- }, ie = function(t, e) {
769
- return t.forEach(function(r) {
770
- e.setEdge(
771
- X.get(r.entityA),
772
- X.get(r.entityB),
773
- { relationship: r },
774
- ut(r)
775
- );
776
- }), t;
777
- };
778
- let ct = 0;
779
- const ae = function(t, e, r, u, l) {
780
- ct++;
781
- const p = r.edge(
782
- X.get(e.entityA),
783
- X.get(e.entityB),
784
- ut(e)
785
- ), f = wt().x(function(N) {
786
- return N.x;
787
- }).y(function(N) {
788
- return N.y;
789
- }).curve(Tt), o = t.insert("path", "#" + u).classed("er relationshipLine", !0).attr("d", f(p.points)).style("stroke", k.stroke).style("fill", "none");
790
- e.relSpec.relType === l.db.Identification.NON_IDENTIFYING && o.attr("stroke-dasharray", "8,8");
791
- let h = "";
792
- 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) {
793
- case l.db.Cardinality.ZERO_OR_ONE:
794
- o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.ZERO_OR_ONE_END + ")");
795
- break;
796
- case l.db.Cardinality.ZERO_OR_MORE:
797
- o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.ZERO_OR_MORE_END + ")");
798
- break;
799
- case l.db.Cardinality.ONE_OR_MORE:
800
- o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.ONE_OR_MORE_END + ")");
801
- break;
802
- case l.db.Cardinality.ONLY_ONE:
803
- o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.ONLY_ONE_END + ")");
804
- break;
805
- case l.db.Cardinality.MD_PARENT:
806
- o.attr("marker-end", "url(" + h + "#" + B.ERMarkers.MD_PARENT_END + ")");
807
- break;
808
- }
809
- switch (e.relSpec.cardB) {
810
- case l.db.Cardinality.ZERO_OR_ONE:
811
- o.attr(
812
- "marker-start",
813
- "url(" + h + "#" + B.ERMarkers.ZERO_OR_ONE_START + ")"
814
- );
815
- break;
816
- case l.db.Cardinality.ZERO_OR_MORE:
817
- o.attr(
818
- "marker-start",
819
- "url(" + h + "#" + B.ERMarkers.ZERO_OR_MORE_START + ")"
820
- );
821
- break;
822
- case l.db.Cardinality.ONE_OR_MORE:
823
- o.attr(
824
- "marker-start",
825
- "url(" + h + "#" + B.ERMarkers.ONE_OR_MORE_START + ")"
826
- );
827
- break;
828
- case l.db.Cardinality.ONLY_ONE:
829
- o.attr("marker-start", "url(" + h + "#" + B.ERMarkers.ONLY_ONE_START + ")");
830
- break;
831
- case l.db.Cardinality.MD_PARENT:
832
- o.attr("marker-start", "url(" + h + "#" + B.ERMarkers.MD_PARENT_START + ")");
833
- break;
834
- }
835
- 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();
836
- 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);
837
- }, ne = function(t, e, r, u) {
838
- k = Z().er, V.info("Drawing ER diagram");
839
- const l = Z().securityLevel;
840
- let p;
841
- l === "sandbox" && (p = rt("#i" + e));
842
- const o = (l === "sandbox" ? rt(p.nodes()[0].contentDocument.body) : rt("body")).select(`[id='${e}']`);
843
- B.insertMarkers(o, k);
844
- let h;
845
- h = new Mt({
846
- multigraph: !0,
847
- directed: !0,
848
- compound: !1
849
- }).setGraph({
850
- rankdir: k.layoutDirection,
851
- marginx: 20,
852
- marginy: 20,
853
- nodesep: 100,
854
- edgesep: 100,
855
- ranksep: 100
856
- }).setDefaultEdgeLabel(function() {
857
- return {};
858
- });
859
- const _ = ee(o, u.db.getEntities(), h), m = ie(u.db.getRelationships(), h);
860
- St(h), re(o, h), m.forEach(function(I) {
861
- ae(o, I, h, _, u);
862
- });
863
- const g = k.diagramPadding;
864
- Ot.insertTitle(o, "entityTitleText", k.titleTopMargin, u.db.getDiagramTitle());
865
- const x = o.node().getBBox(), y = x.width + g * 2, N = x.height + g * 2;
866
- bt(o, N, y, k.useMaxWidth), o.attr("viewBox", `${x.x - g} ${x.y - g} ${y} ${N}`);
867
- }, se = "28e9f9db-3c8d-5aa5-9faf-44286ae5937c";
868
- function oe(t = "", e = "") {
869
- const r = t.replace(Jt, "");
870
- return `${ht(e)}${ht(r)}${Wt(
871
- t,
872
- se
873
- )}`;
874
- }
875
- function ht(t = "") {
876
- return t.length > 0 ? `${t}-` : "";
877
- }
878
- const le = {
879
- setConf: $t,
880
- draw: ne
881
- }, ce = (t) => `
882
- .entityBox {
883
- fill: ${t.mainBkg};
884
- stroke: ${t.nodeBorder};
885
- }
886
-
887
- .attributeBoxOdd {
888
- fill: ${t.attributeBackgroundColorOdd};
889
- stroke: ${t.nodeBorder};
890
- }
891
-
892
- .attributeBoxEven {
893
- fill: ${t.attributeBackgroundColorEven};
894
- stroke: ${t.nodeBorder};
895
- }
896
-
897
- .relationshipLabelBox {
898
- fill: ${t.tertiaryColor};
899
- opacity: 0.7;
900
- background-color: ${t.tertiaryColor};
901
- rect {
902
- opacity: 0.5;
903
- }
904
- }
905
-
906
- .relationshipLine {
907
- stroke: ${t.lineColor};
908
- }
909
-
910
- .entityTitleText {
911
- text-anchor: middle;
912
- font-size: 18px;
913
- fill: ${t.textColor};
914
- }
915
- #MD_PARENT_START {
916
- fill: #f5f5f5 !important;
917
- stroke: ${t.lineColor} !important;
918
- stroke-width: 1;
919
- }
920
- #MD_PARENT_END {
921
- fill: #f5f5f5 !important;
922
- stroke: ${t.lineColor} !important;
923
- stroke-width: 1;
924
- }
925
-
926
- `, he = ce, ke = {
927
- parser: Ut,
928
- db: qt,
929
- renderer: le,
930
- styles: he
931
- };
932
- export {
933
- ke as diagram
934
- };