@layers-app/editor 0.5.1 → 0.5.2

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 (240) hide show
  1. package/dist/index.cjs +2 -0
  2. package/dist/index.d.ts +315 -0
  3. package/dist/index.js +13 -0
  4. package/dist/layers.-TbWEgSf.js +425 -0
  5. package/dist/layers.0aivjg14.js +202 -0
  6. package/dist/layers.1kchl9Fg.js +33 -0
  7. package/dist/layers.2RmTpOSe.js +65 -0
  8. package/dist/layers.37cL7YbN.js +40 -0
  9. package/dist/layers.4q_x5roN.js +5 -0
  10. package/dist/layers.52famHy6.js +1 -0
  11. package/dist/layers.68ma6K6f.js +1 -0
  12. package/dist/layers.6HZckrJk.js +1 -0
  13. package/dist/layers.7JqFgE4-.js +15 -0
  14. package/dist/layers.8xliMm_4.js +14 -0
  15. package/dist/layers.9pNaFvaX.js +1 -0
  16. package/dist/layers.A7FX8Cpf.js +220 -0
  17. package/dist/layers.B-MfAaIy.js +1 -0
  18. package/dist/layers.B17DijoR.js +6 -0
  19. package/dist/layers.B1970UjZ.js +282 -0
  20. package/dist/layers.B19hGmey.js +1 -0
  21. package/dist/layers.B1IP0xF5.js +122 -0
  22. package/dist/layers.B1TVCKFc.js +423 -0
  23. package/dist/layers.B2wb1BnV.js +1 -0
  24. package/dist/layers.B3D4g2HH.js +1 -0
  25. package/dist/layers.B3QZKSP7.js +4 -0
  26. package/dist/layers.B4cctrKy.js +2235 -0
  27. package/dist/layers.B5eIpqUm.js +5 -0
  28. package/dist/layers.B5fhqRqQ.js +32 -0
  29. package/dist/layers.B5o5YNLY.js +41 -0
  30. package/dist/layers.B7QKbjTP.js +1 -0
  31. package/dist/layers.B7R5e9nb.js +39 -0
  32. package/dist/layers.B9H_VqGH.js +38 -0
  33. package/dist/layers.B9gDt0mt.js +2 -0
  34. package/dist/layers.BAtv1CM7.js +1 -0
  35. package/dist/layers.BAx1rxXM.js +1 -0
  36. package/dist/layers.BBu8KTxD.js +40 -0
  37. package/dist/layers.BC0UHUHZ.js +6 -0
  38. package/dist/layers.BEsDNARG.js +2966 -0
  39. package/dist/layers.BIFfWqjp.js +6 -0
  40. package/dist/layers.BIRO82v2.js +1 -0
  41. package/dist/layers.BIXkxpJg.js +7 -0
  42. package/dist/layers.BIeVwYKL.js +1 -0
  43. package/dist/layers.BJDrjORS.js +244 -0
  44. package/dist/layers.BJWQnQ1b.js +931 -0
  45. package/dist/layers.BKA3G4tE.js +8 -0
  46. package/dist/layers.BKcOrB7G.js +8 -0
  47. package/dist/layers.BLd2spTm.js +1 -0
  48. package/dist/layers.BLomL8Y1.js +40 -0
  49. package/dist/layers.BOGcxS4S.js +11 -0
  50. package/dist/layers.BPpqQ2zl.js +10 -0
  51. package/dist/layers.BQGV7_aP.js +7 -0
  52. package/dist/layers.BQvMgKOV.js +257 -0
  53. package/dist/layers.BRVeeDcH.js +802 -0
  54. package/dist/layers.BSB9eX8_.js +96 -0
  55. package/dist/layers.BSDp4pjf.js +160 -0
  56. package/dist/layers.BSTBZrFn.js +1 -0
  57. package/dist/layers.BWwCeuKP.js +39 -0
  58. package/dist/layers.BXYVnzZo.js +10 -0
  59. package/dist/layers.BYxlPasW.js +9 -0
  60. package/dist/layers.B_C8Ox8-.js +320 -0
  61. package/dist/layers.B_rZy9ZE.js +10 -0
  62. package/dist/layers.BbCfEXyj.js +55 -0
  63. package/dist/layers.Becl7PvM.js +1 -0
  64. package/dist/layers.BekArbNQ.js +501 -0
  65. package/dist/layers.BgOa2ZQq.js +7 -0
  66. package/dist/layers.BhZmc2PE.js +1 -0
  67. package/dist/layers.BhaSD27u.js +8 -0
  68. package/dist/layers.BiJ8hfRt.js +1510 -0
  69. package/dist/layers.Bm7EN78W.js +5 -0
  70. package/dist/layers.BocrFl_z.js +1265 -0
  71. package/dist/layers.BpilXLfW.js +6 -0
  72. package/dist/layers.BrBnUsI5.js +41 -0
  73. package/dist/layers.BrhJtZkc.js +84 -0
  74. package/dist/layers.Bsxy-Zmv.js +7 -0
  75. package/dist/layers.Bu9go6nF.js +10 -0
  76. package/dist/layers.BuJFmhxG.js +1 -0
  77. package/dist/layers.BuNBio9d.js +10 -0
  78. package/dist/layers.BufbpNF2.js +35 -0
  79. package/dist/layers.Bv6t74Ng.js +37 -0
  80. package/dist/layers.Bw7AFM_C.js +39 -0
  81. package/dist/layers.ByEhw12k.js +40 -0
  82. package/dist/layers.Bz8CGnnD.js +32 -0
  83. package/dist/layers.BzfTuld3.js +304 -0
  84. package/dist/layers.C-f2Ts9u.js +32 -0
  85. package/dist/layers.C0Lgw_Sx.js +11688 -0
  86. package/dist/layers.C0xLKPSB.js +7 -0
  87. package/dist/layers.C8_lu5UH.js +23 -0
  88. package/dist/layers.C8d9V9GQ.js +1619 -0
  89. package/dist/layers.C9KUAI3S.js +9 -0
  90. package/dist/layers.C9Qm4iyY.js +51 -0
  91. package/dist/layers.CAAtHbGC.js +1034 -0
  92. package/dist/layers.CBTk7340.js +41 -0
  93. package/dist/layers.CCGTXI7t.js +37 -0
  94. package/dist/layers.CDnEPiFS.js +13 -0
  95. package/dist/layers.CF0jHwg8.js +36 -0
  96. package/dist/layers.CFEmW02q.js +189 -0
  97. package/dist/layers.CFpY72SE.js +1 -0
  98. package/dist/layers.CG-pQKxy.js +32 -0
  99. package/dist/layers.CHZsXQcr.js +1 -0
  100. package/dist/layers.CIBiA4cp.js +9 -0
  101. package/dist/layers.CJ5oFhK5.js +9 -0
  102. package/dist/layers.CLG-12Ft.js +803 -0
  103. package/dist/layers.CLQVPEWO.js +70 -0
  104. package/dist/layers.CNAZOY0z.js +42 -0
  105. package/dist/layers.CNAp0agL.js +11 -0
  106. package/dist/layers.CNNAjKqx.js +42 -0
  107. package/dist/layers.CO0NalVl.js +1283 -0
  108. package/dist/layers.COTtcXWr.js +38 -0
  109. package/dist/layers.COsJBDU8.js +11 -0
  110. package/dist/layers.CPdjh9hT.js +373 -0
  111. package/dist/layers.CSFyrYzY.js +118 -0
  112. package/dist/layers.CX_ayh7E.js +42 -0
  113. package/dist/layers.CeNyh2LV.js +41 -0
  114. package/dist/layers.Ce_CBSin.js +9 -0
  115. package/dist/layers.CfjCZzg8.js +33 -0
  116. package/dist/layers.CfsQNfbN.js +35 -0
  117. package/dist/layers.CgqehJlq.js +268 -0
  118. package/dist/layers.CildyhOW.js +1 -0
  119. package/dist/layers.CjBfNqWg.js +207 -0
  120. package/dist/layers.CjZ_56YO.js +39 -0
  121. package/dist/layers.CqVTtuYm.js +6 -0
  122. package/dist/layers.Ct7y2KbU.js +1 -0
  123. package/dist/layers.CtASemAs.js +1 -0
  124. package/dist/layers.CvCe_XZO.js +44 -0
  125. package/dist/layers.CvF4WyAB.js +8 -0
  126. package/dist/layers.CvgnifSj.js +10 -0
  127. package/dist/layers.CyGuH0wW.js +84 -0
  128. package/dist/layers.Cyzu9PKQ.js +1 -0
  129. package/dist/layers.CzZCiNn3.js +1 -0
  130. package/dist/layers.Cz_HcKZR.js +9 -0
  131. package/dist/layers.CzqAzeMM.js +295 -0
  132. package/dist/layers.D-0DKizI.js +36 -0
  133. package/dist/layers.D-4uOpUj.js +2479 -0
  134. package/dist/layers.D-P1auk3.js +40 -0
  135. package/dist/layers.D-z4IZwp.js +139 -0
  136. package/dist/layers.D0zn4_Mx.js +1 -0
  137. package/dist/layers.D176Y7Vo.js +437 -0
  138. package/dist/layers.D1TLKJdE.js +2 -0
  139. package/dist/layers.D4SM8Ihn.js +10 -0
  140. package/dist/layers.D4T8fTcj.js +1223 -0
  141. package/dist/layers.D7jGxypv.js +8 -0
  142. package/dist/layers.D819V-1U.js +5 -0
  143. package/dist/layers.D92dwfZm.js +9 -0
  144. package/dist/layers.D9oxm2Q3.js +36 -0
  145. package/dist/layers.DAUiVpfA.js +41 -0
  146. package/dist/layers.DAgjLyi0.js +21938 -0
  147. package/dist/layers.DG5DkMsX.js +4 -0
  148. package/dist/layers.DG5nJvev.js +41 -0
  149. package/dist/layers.DGIvTJgm.js +1 -0
  150. package/dist/layers.DGKHsEgL.js +37 -0
  151. package/dist/layers.DJINSxsc.js +1 -0
  152. package/dist/layers.DJJF7QHv.js +39 -0
  153. package/dist/layers.DLK9DV2V.js +40 -0
  154. package/dist/layers.DLNMmOF6.js +10 -0
  155. package/dist/layers.DLwuMfdd.js +84 -0
  156. package/dist/layers.DMkBISW1.js +1 -0
  157. package/dist/layers.DN9HoVxI.js +18 -0
  158. package/dist/layers.DO3jf13r.js +139 -0
  159. package/dist/layers.DOrgOHBr.js +1 -0
  160. package/dist/layers.DRi0nv8t.js +769 -0
  161. package/dist/layers.DTEtUQ-N.js +11 -0
  162. package/dist/layers.DXM-M_t4.js +904 -0
  163. package/dist/layers.DZ4rueAA.js +1126 -0
  164. package/dist/layers.DZAc2rlA.js +19 -0
  165. package/dist/layers.DZAwluRX.js +7 -0
  166. package/dist/layers.D__Ge0jR.js +1580 -0
  167. package/dist/layers.D_qBxnuW.js +6 -0
  168. package/dist/layers.Da7N3t0o.js +59 -0
  169. package/dist/layers.DbCde96z.js +61 -0
  170. package/dist/layers.DbaKVP5e.js +1 -0
  171. package/dist/layers.Deuxf8WS.js +37 -0
  172. package/dist/layers.DgQ6wjQ6.js +1089 -0
  173. package/dist/layers.Dhs3Sikn.js +230 -0
  174. package/dist/layers.DizdRJDv.js +10 -0
  175. package/dist/layers.DjUOC4st.js +16 -0
  176. package/dist/layers.DkRaFpYI.js +39 -0
  177. package/dist/layers.Dn0j_OK5.js +8 -0
  178. package/dist/layers.DneF9QFl.js +39 -0
  179. package/dist/layers.DnohNr8z.js +2 -0
  180. package/dist/layers.DtjaV33P.js +4 -0
  181. package/dist/layers.DtwPvqvM.js +1359 -0
  182. package/dist/layers.DuQS64hQ.js +35 -0
  183. package/dist/layers.DvcL-c1J.js +10 -0
  184. package/dist/layers.DwGEUGi4.js +1 -0
  185. package/dist/layers.Dwf-cmfl.js +1 -0
  186. package/dist/layers.DxA6ocdw.js +70 -0
  187. package/dist/layers.DxuaZtRi.js +116 -0
  188. package/dist/layers.Dy1naDTQ.js +14 -0
  189. package/dist/layers.DyVeJ5nq.js +41 -0
  190. package/dist/layers.Dz5Fekdu.js +8 -0
  191. package/dist/layers.DzTjTsrg.js +52 -0
  192. package/dist/layers.DzWSztoe.js +8 -0
  193. package/dist/layers.DzWUGmmi.js +21763 -0
  194. package/dist/layers.Fv2UzX_J.js +40 -0
  195. package/dist/layers.GGg0Uela.js +48146 -0
  196. package/dist/layers.HISmbvvZ.js +41 -0
  197. package/dist/layers.J-SBicA2.js +39 -0
  198. package/dist/layers.JWCLFILJ.js +1 -0
  199. package/dist/layers.Jy2BJnrD.js +7 -0
  200. package/dist/layers.KNG61fVD.js +32 -0
  201. package/dist/layers.KZKDnGbd.js +9166 -0
  202. package/dist/layers.Kcxw1ZN5.js +8 -0
  203. package/dist/layers.LG7pZboq.js +42 -0
  204. package/dist/layers.N7uLiJJF.js +791 -0
  205. package/dist/layers.P0mMn9V6.js +4 -0
  206. package/dist/layers.RY1Pc_vI.js +39 -0
  207. package/dist/layers.T5F5IY6f.js +38 -0
  208. package/dist/layers.UBsT16id.js +9 -0
  209. package/dist/layers.Ww9bBIaA.js +32 -0
  210. package/dist/layers.YUbPYUxB.js +1088 -0
  211. package/dist/layers.YejPlmok.js +34 -0
  212. package/dist/layers.YsjMDe1Z.js +8 -0
  213. package/dist/layers._IMfh4Om.js +1 -0
  214. package/dist/layers.b0h5ZBmD.js +61 -0
  215. package/dist/layers.cXShihLV.js +793 -0
  216. package/dist/layers.dBCFbDUQ.js +5 -0
  217. package/dist/layers.dsZSDggl.js +1 -0
  218. package/dist/layers.dzPD2Tq6.js +8 -0
  219. package/dist/layers.fdHV7i_n.js +47540 -0
  220. package/dist/layers.g0MJEmgM.js +36 -0
  221. package/dist/layers.g6KGAlYG.js +7 -0
  222. package/dist/layers.gAwY5NlW.js +6 -0
  223. package/dist/layers.hJXmn9h9.js +3 -0
  224. package/dist/layers.hMr_bHrn.js +1 -0
  225. package/dist/layers.hweLqW3I.js +261 -0
  226. package/dist/layers.ifrGR0tH.js +1 -0
  227. package/dist/layers.jS5D2j9k.js +186 -0
  228. package/dist/layers.k5zSy7kx.js +40 -0
  229. package/dist/layers.ku7sc5w7.js +40 -0
  230. package/dist/layers.l0OsrJxT.js +9 -0
  231. package/dist/layers.lCpg7dOn.js +21 -0
  232. package/dist/layers.mcrEJ5IL.js +1 -0
  233. package/dist/layers.mkPf05Ff.js +960 -0
  234. package/dist/layers.n8BNeBDu.js +40 -0
  235. package/dist/layers.nesKhKqv.js +9 -0
  236. package/dist/layers.o8uxn2z6.js +6 -0
  237. package/dist/layers.qKFGZSrv.js +42 -0
  238. package/dist/layers.tehvhFRL.js +11 -0
  239. package/dist/layers.yaVCGcoo.js +7 -0
  240. package/package.json +1 -1
@@ -0,0 +1,793 @@
1
+ import { a2 as gt, a3 as ft, a4 as mt, g as xt, l as E, d as G, Y as _t, a5 as bt, q as kt } from "./layers.KZKDnGbd.js";
2
+ import "./layers.DzWUGmmi.js";
3
+ import { a as D } from "./layers.CyGuH0wW.js";
4
+ var K = (function() {
5
+ var n = function(f, i, r, c) {
6
+ for (r = r || {}, c = f.length; c--; r[f[c]] = i)
7
+ ;
8
+ return r;
9
+ }, t = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], e = [1, 9], a = [1, 10], s = [1, 11], h = [1, 12], l = [1, 13], p = [1, 16], y = [1, 17], g = {
10
+ trace: function() {
11
+ },
12
+ yy: {},
13
+ symbols_: { error: 2, start: 3, timeline: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, title: 11, acc_title: 12, acc_title_value: 13, acc_descr: 14, acc_descr_value: 15, acc_descr_multiline_value: 16, section: 17, period_statement: 18, event_statement: 19, period: 20, event: 21, $accept: 0, $end: 1 },
14
+ terminals_: { 2: "error", 4: "timeline", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 20: "period", 21: "event" },
15
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [18, 1], [19, 1]],
16
+ performAction: function(i, r, c, d, u, o, $) {
17
+ var x = o.length - 1;
18
+ switch (u) {
19
+ case 1:
20
+ return o[x - 1];
21
+ case 2:
22
+ this.$ = [];
23
+ break;
24
+ case 3:
25
+ o[x - 1].push(o[x]), this.$ = o[x - 1];
26
+ break;
27
+ case 4:
28
+ case 5:
29
+ this.$ = o[x];
30
+ break;
31
+ case 6:
32
+ case 7:
33
+ this.$ = [];
34
+ break;
35
+ case 8:
36
+ d.getCommonDb().setDiagramTitle(o[x].substr(6)), this.$ = o[x].substr(6);
37
+ break;
38
+ case 9:
39
+ this.$ = o[x].trim(), d.getCommonDb().setAccTitle(this.$);
40
+ break;
41
+ case 10:
42
+ case 11:
43
+ this.$ = o[x].trim(), d.getCommonDb().setAccDescription(this.$);
44
+ break;
45
+ case 12:
46
+ d.addSection(o[x].substr(8)), this.$ = o[x].substr(8);
47
+ break;
48
+ case 15:
49
+ d.addTask(o[x], 0, ""), this.$ = o[x];
50
+ break;
51
+ case 16:
52
+ d.addEvent(o[x].substr(2)), this.$ = o[x];
53
+ break;
54
+ }
55
+ },
56
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, n(t, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: e, 12: a, 14: s, 16: h, 17: l, 18: 14, 19: 15, 20: p, 21: y }, n(t, [2, 7], { 1: [2, 1] }), n(t, [2, 3]), { 9: 18, 11: e, 12: a, 14: s, 16: h, 17: l, 18: 14, 19: 15, 20: p, 21: y }, n(t, [2, 5]), n(t, [2, 6]), n(t, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, n(t, [2, 11]), n(t, [2, 12]), n(t, [2, 13]), n(t, [2, 14]), n(t, [2, 15]), n(t, [2, 16]), n(t, [2, 4]), n(t, [2, 9]), n(t, [2, 10])],
57
+ defaultActions: {},
58
+ parseError: function(i, r) {
59
+ if (r.recoverable)
60
+ this.trace(i);
61
+ else {
62
+ var c = new Error(i);
63
+ throw c.hash = r, c;
64
+ }
65
+ },
66
+ parse: function(i) {
67
+ var r = this, c = [0], d = [], u = [null], o = [], $ = this.table, x = "", T = 0, W = 0, C = 2, A = 1, B = o.slice.call(arguments, 1), k = Object.create(this.lexer), w = { yy: {} };
68
+ for (var v in this.yy)
69
+ Object.prototype.hasOwnProperty.call(this.yy, v) && (w.yy[v] = this.yy[v]);
70
+ k.setInput(i, w.yy), w.yy.lexer = k, w.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
71
+ var I = k.yylloc;
72
+ o.push(I);
73
+ var H = k.options && k.options.ranges;
74
+ typeof w.yy.parseError == "function" ? this.parseError = w.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
75
+ function z() {
76
+ var M;
77
+ return M = d.pop() || k.lex() || A, typeof M != "number" && (M instanceof Array && (d = M, M = d.pop()), M = r.symbols_[M] || M), M;
78
+ }
79
+ for (var b, L, S, Z, R = {}, O, N, Y, j; ; ) {
80
+ if (L = c[c.length - 1], this.defaultActions[L] ? S = this.defaultActions[L] : ((b === null || typeof b > "u") && (b = z()), S = $[L] && $[L][b]), typeof S > "u" || !S.length || !S[0]) {
81
+ var J = "";
82
+ j = [];
83
+ for (O in $[L])
84
+ this.terminals_[O] && O > C && j.push("'" + this.terminals_[O] + "'");
85
+ k.showPosition ? J = "Parse error on line " + (T + 1) + `:
86
+ ` + k.showPosition() + `
87
+ Expecting ` + j.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : J = "Parse error on line " + (T + 1) + ": Unexpected " + (b == A ? "end of input" : "'" + (this.terminals_[b] || b) + "'"), this.parseError(J, {
88
+ text: k.match,
89
+ token: this.terminals_[b] || b,
90
+ line: k.yylineno,
91
+ loc: I,
92
+ expected: j
93
+ });
94
+ }
95
+ if (S[0] instanceof Array && S.length > 1)
96
+ throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + b);
97
+ switch (S[0]) {
98
+ case 1:
99
+ c.push(b), u.push(k.yytext), o.push(k.yylloc), c.push(S[1]), b = null, W = k.yyleng, x = k.yytext, T = k.yylineno, I = k.yylloc;
100
+ break;
101
+ case 2:
102
+ if (N = this.productions_[S[1]][1], R.$ = u[u.length - N], R._$ = {
103
+ first_line: o[o.length - (N || 1)].first_line,
104
+ last_line: o[o.length - 1].last_line,
105
+ first_column: o[o.length - (N || 1)].first_column,
106
+ last_column: o[o.length - 1].last_column
107
+ }, H && (R._$.range = [
108
+ o[o.length - (N || 1)].range[0],
109
+ o[o.length - 1].range[1]
110
+ ]), Z = this.performAction.apply(R, [
111
+ x,
112
+ W,
113
+ T,
114
+ w.yy,
115
+ S[1],
116
+ u,
117
+ o
118
+ ].concat(B)), typeof Z < "u")
119
+ return Z;
120
+ N && (c = c.slice(0, -1 * N * 2), u = u.slice(0, -1 * N), o = o.slice(0, -1 * N)), c.push(this.productions_[S[1]][0]), u.push(R.$), o.push(R._$), Y = $[c[c.length - 2]][c[c.length - 1]], c.push(Y);
121
+ break;
122
+ case 3:
123
+ return !0;
124
+ }
125
+ }
126
+ return !0;
127
+ }
128
+ }, _ = /* @__PURE__ */ (function() {
129
+ var f = {
130
+ EOF: 1,
131
+ parseError: function(r, c) {
132
+ if (this.yy.parser)
133
+ this.yy.parser.parseError(r, c);
134
+ else
135
+ throw new Error(r);
136
+ },
137
+ // resets the lexer, sets new input
138
+ setInput: function(i, r) {
139
+ return this.yy = r || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
140
+ first_line: 1,
141
+ first_column: 0,
142
+ last_line: 1,
143
+ last_column: 0
144
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
145
+ },
146
+ // consumes and returns one char from the input
147
+ input: function() {
148
+ var i = this._input[0];
149
+ this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
150
+ var r = i.match(/(?:\r\n?|\n).*/g);
151
+ return r ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
152
+ },
153
+ // unshifts one char (or a string) into the input
154
+ unput: function(i) {
155
+ var r = i.length, c = i.split(/(?:\r\n?|\n)/g);
156
+ this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r;
157
+ var d = this.match.split(/(?:\r\n?|\n)/g);
158
+ 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);
159
+ var u = this.yylloc.range;
160
+ return this.yylloc = {
161
+ first_line: this.yylloc.first_line,
162
+ last_line: this.yylineno + 1,
163
+ first_column: this.yylloc.first_column,
164
+ 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 - r
165
+ }, this.options.ranges && (this.yylloc.range = [u[0], u[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this;
166
+ },
167
+ // When called from action, caches matched text and appends it on next action
168
+ more: function() {
169
+ return this._more = !0, this;
170
+ },
171
+ // 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.
172
+ reject: function() {
173
+ if (this.options.backtrack_lexer)
174
+ this._backtrack = !0;
175
+ else
176
+ 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).
177
+ ` + this.showPosition(), {
178
+ text: "",
179
+ token: null,
180
+ line: this.yylineno
181
+ });
182
+ return this;
183
+ },
184
+ // retain first n characters of the match
185
+ less: function(i) {
186
+ this.unput(this.match.slice(i));
187
+ },
188
+ // displays already matched input, i.e. for error messages
189
+ pastInput: function() {
190
+ var i = this.matched.substr(0, this.matched.length - this.match.length);
191
+ return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
192
+ },
193
+ // displays upcoming input, i.e. for error messages
194
+ upcomingInput: function() {
195
+ var i = this.match;
196
+ return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
197
+ },
198
+ // displays the character position where the lexing error occurred, i.e. for error messages
199
+ showPosition: function() {
200
+ var i = this.pastInput(), r = new Array(i.length + 1).join("-");
201
+ return i + this.upcomingInput() + `
202
+ ` + r + "^";
203
+ },
204
+ // test the lexed token: return FALSE when not a match, otherwise return token
205
+ test_match: function(i, r) {
206
+ var c, d, u;
207
+ if (this.options.backtrack_lexer && (u = {
208
+ yylineno: this.yylineno,
209
+ yylloc: {
210
+ first_line: this.yylloc.first_line,
211
+ last_line: this.last_line,
212
+ first_column: this.yylloc.first_column,
213
+ last_column: this.yylloc.last_column
214
+ },
215
+ yytext: this.yytext,
216
+ match: this.match,
217
+ matches: this.matches,
218
+ matched: this.matched,
219
+ yyleng: this.yyleng,
220
+ offset: this.offset,
221
+ _more: this._more,
222
+ _input: this._input,
223
+ yy: this.yy,
224
+ conditionStack: this.conditionStack.slice(0),
225
+ done: this.done
226
+ }, this.options.ranges && (u.yylloc.range = this.yylloc.range.slice(0))), d = i[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
227
+ first_line: this.yylloc.last_line,
228
+ last_line: this.yylineno + 1,
229
+ first_column: this.yylloc.last_column,
230
+ last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
231
+ }, this.yytext += i[0], this.match += i[0], this.matches = i, 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(i[0].length), this.matched += i[0], c = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
232
+ return c;
233
+ if (this._backtrack) {
234
+ for (var o in u)
235
+ this[o] = u[o];
236
+ return !1;
237
+ }
238
+ return !1;
239
+ },
240
+ // return next match in input
241
+ next: function() {
242
+ if (this.done)
243
+ return this.EOF;
244
+ this._input || (this.done = !0);
245
+ var i, r, c, d;
246
+ this._more || (this.yytext = "", this.match = "");
247
+ for (var u = this._currentRules(), o = 0; o < u.length; o++)
248
+ if (c = this._input.match(this.rules[u[o]]), c && (!r || c[0].length > r[0].length)) {
249
+ if (r = c, d = o, this.options.backtrack_lexer) {
250
+ if (i = this.test_match(c, u[o]), i !== !1)
251
+ return i;
252
+ if (this._backtrack) {
253
+ r = !1;
254
+ continue;
255
+ } else
256
+ return !1;
257
+ } else if (!this.options.flex)
258
+ break;
259
+ }
260
+ return r ? (i = this.test_match(r, u[d]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
261
+ ` + this.showPosition(), {
262
+ text: "",
263
+ token: null,
264
+ line: this.yylineno
265
+ });
266
+ },
267
+ // return next match that has a token
268
+ lex: function() {
269
+ var r = this.next();
270
+ return r || this.lex();
271
+ },
272
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
273
+ begin: function(r) {
274
+ this.conditionStack.push(r);
275
+ },
276
+ // pop the previously active lexer condition state off the condition stack
277
+ popState: function() {
278
+ var r = this.conditionStack.length - 1;
279
+ return r > 0 ? this.conditionStack.pop() : this.conditionStack[0];
280
+ },
281
+ // produce the lexer rule set which is active for the currently active lexer condition state
282
+ _currentRules: function() {
283
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
284
+ },
285
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
286
+ topState: function(r) {
287
+ return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL";
288
+ },
289
+ // alias for begin(condition)
290
+ pushState: function(r) {
291
+ this.begin(r);
292
+ },
293
+ // return the number of states currently on the stack
294
+ stateStackSize: function() {
295
+ return this.conditionStack.length;
296
+ },
297
+ options: { "case-insensitive": !0 },
298
+ performAction: function(r, c, d, u) {
299
+ switch (d) {
300
+ case 0:
301
+ break;
302
+ case 1:
303
+ break;
304
+ case 2:
305
+ return 10;
306
+ case 3:
307
+ break;
308
+ case 4:
309
+ break;
310
+ case 5:
311
+ return 4;
312
+ case 6:
313
+ return 11;
314
+ case 7:
315
+ return this.begin("acc_title"), 12;
316
+ case 8:
317
+ return this.popState(), "acc_title_value";
318
+ case 9:
319
+ return this.begin("acc_descr"), 14;
320
+ case 10:
321
+ return this.popState(), "acc_descr_value";
322
+ case 11:
323
+ this.begin("acc_descr_multiline");
324
+ break;
325
+ case 12:
326
+ this.popState();
327
+ break;
328
+ case 13:
329
+ return "acc_descr_multiline_value";
330
+ case 14:
331
+ return 17;
332
+ case 15:
333
+ return 21;
334
+ case 16:
335
+ return 20;
336
+ case 17:
337
+ return 6;
338
+ case 18:
339
+ return "INVALID";
340
+ }
341
+ },
342
+ rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?::\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i],
343
+ conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18], inclusive: !0 } }
344
+ };
345
+ return f;
346
+ })();
347
+ g.lexer = _;
348
+ function m() {
349
+ this.yy = {};
350
+ }
351
+ return m.prototype = g, g.Parser = m, new m();
352
+ })();
353
+ K.parser = K;
354
+ const vt = K;
355
+ let F = "", st = 0;
356
+ const Q = [], q = [], V = [], it = () => bt, rt = function() {
357
+ Q.length = 0, q.length = 0, F = "", V.length = 0, kt();
358
+ }, at = function(n) {
359
+ F = n, Q.push(n);
360
+ }, lt = function() {
361
+ return Q;
362
+ }, ot = function() {
363
+ let n = tt();
364
+ const t = 100;
365
+ let e = 0;
366
+ for (; !n && e < t; )
367
+ n = tt(), e++;
368
+ return q.push(...V), q;
369
+ }, ct = function(n, t, e) {
370
+ const a = {
371
+ id: st++,
372
+ section: F,
373
+ type: F,
374
+ task: n,
375
+ score: t || 0,
376
+ //if event is defined, then add it the events array
377
+ events: e ? [e] : []
378
+ };
379
+ V.push(a);
380
+ }, ht = function(n) {
381
+ V.find((e) => e.id === st - 1).events.push(n);
382
+ }, dt = function(n) {
383
+ const t = {
384
+ section: F,
385
+ type: F,
386
+ description: n,
387
+ task: n,
388
+ classes: []
389
+ };
390
+ q.push(t);
391
+ }, tt = function() {
392
+ const n = function(e) {
393
+ return V[e].processed;
394
+ };
395
+ let t = !0;
396
+ for (const [e, a] of V.entries())
397
+ n(e), t = t && a.processed;
398
+ return t;
399
+ }, wt = {
400
+ clear: rt,
401
+ getCommonDb: it,
402
+ addSection: at,
403
+ getSections: lt,
404
+ getTasks: ot,
405
+ addTask: ct,
406
+ addTaskOrg: dt,
407
+ addEvent: ht
408
+ }, St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
409
+ __proto__: null,
410
+ addEvent: ht,
411
+ addSection: at,
412
+ addTask: ct,
413
+ addTaskOrg: dt,
414
+ clear: rt,
415
+ default: wt,
416
+ getCommonDb: it,
417
+ getSections: lt,
418
+ getTasks: ot
419
+ }, Symbol.toStringTag, { value: "Module" })), Et = 12, U = function(n, t) {
420
+ const e = n.append("rect");
421
+ return e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), e.attr("rx", t.rx), e.attr("ry", t.ry), t.class !== void 0 && e.attr("class", t.class), e;
422
+ }, Tt = function(n, t) {
423
+ const a = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), s = n.append("g");
424
+ s.append("circle").attr("cx", t.cx - 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), s.append("circle").attr("cx", t.cx + 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
425
+ function h(y) {
426
+ const g = D().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
427
+ y.append("path").attr("class", "mouth").attr("d", g).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
428
+ }
429
+ function l(y) {
430
+ const g = D().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
431
+ y.append("path").attr("class", "mouth").attr("d", g).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
432
+ }
433
+ function p(y) {
434
+ y.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", t.cx - 5).attr("y1", t.cy + 7).attr("x2", t.cx + 5).attr("y2", t.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
435
+ }
436
+ return t.score > 3 ? h(s) : t.score < 3 ? l(s) : p(s), a;
437
+ }, It = function(n, t) {
438
+ const e = n.append("circle");
439
+ return e.attr("cx", t.cx), e.attr("cy", t.cy), e.attr("class", "actor-" + t.pos), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("r", t.r), e.class !== void 0 && e.attr("class", e.class), t.title !== void 0 && e.append("title").text(t.title), e;
440
+ }, ut = function(n, t) {
441
+ const e = t.text.replace(/<br\s*\/?>/gi, " "), a = n.append("text");
442
+ a.attr("x", t.x), a.attr("y", t.y), a.attr("class", "legend"), a.style("text-anchor", t.anchor), t.class !== void 0 && a.attr("class", t.class);
443
+ const s = a.append("tspan");
444
+ return s.attr("x", t.x + t.textMargin * 2), s.text(e), a;
445
+ }, $t = function(n, t) {
446
+ function e(s, h, l, p, y) {
447
+ return s + "," + h + " " + (s + l) + "," + h + " " + (s + l) + "," + (h + p - y) + " " + (s + l - y * 1.2) + "," + (h + p) + " " + s + "," + (h + p);
448
+ }
449
+ const a = n.append("polygon");
450
+ a.attr("points", e(t.x, t.y, 50, 20, 7)), a.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, ut(n, t);
451
+ }, Nt = function(n, t, e) {
452
+ const a = n.append("g"), s = X();
453
+ s.x = t.x, s.y = t.y, s.fill = t.fill, s.width = e.width, s.height = e.height, s.class = "journey-section section-type-" + t.num, s.rx = 3, s.ry = 3, U(a, s), pt(e)(
454
+ t.text,
455
+ a,
456
+ s.x,
457
+ s.y,
458
+ s.width,
459
+ s.height,
460
+ { class: "journey-section section-type-" + t.num },
461
+ e,
462
+ t.colour
463
+ );
464
+ };
465
+ let et = -1;
466
+ const Mt = function(n, t, e) {
467
+ const a = t.x + e.width / 2, s = n.append("g");
468
+ et++, s.append("line").attr("id", "task" + et).attr("x1", a).attr("y1", t.y).attr("x2", a).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Tt(s, {
469
+ cx: a,
470
+ cy: 300 + (5 - t.score) * 30,
471
+ score: t.score
472
+ });
473
+ const l = X();
474
+ l.x = t.x, l.y = t.y, l.fill = t.fill, l.width = e.width, l.height = e.height, l.class = "task task-type-" + t.num, l.rx = 3, l.ry = 3, U(s, l), t.x + 14, pt(e)(
475
+ t.task,
476
+ s,
477
+ l.x,
478
+ l.y,
479
+ l.width,
480
+ l.height,
481
+ { class: "task" },
482
+ e,
483
+ t.colour
484
+ );
485
+ }, Lt = function(n, t) {
486
+ U(n, {
487
+ x: t.startx,
488
+ y: t.starty,
489
+ width: t.stopx - t.startx,
490
+ height: t.stopy - t.starty,
491
+ fill: t.fill,
492
+ class: "rect"
493
+ }).lower();
494
+ }, At = function() {
495
+ return {
496
+ x: 0,
497
+ y: 0,
498
+ fill: void 0,
499
+ "text-anchor": "start",
500
+ width: 100,
501
+ height: 100,
502
+ textMargin: 0,
503
+ rx: 0,
504
+ ry: 0
505
+ };
506
+ }, X = function() {
507
+ return {
508
+ x: 0,
509
+ y: 0,
510
+ width: 100,
511
+ anchor: "start",
512
+ height: 100,
513
+ rx: 0,
514
+ ry: 0
515
+ };
516
+ }, pt = /* @__PURE__ */ (function() {
517
+ function n(s, h, l, p, y, g, _, m) {
518
+ const f = h.append("text").attr("x", l + y / 2).attr("y", p + g / 2 + 5).style("font-color", m).style("text-anchor", "middle").text(s);
519
+ a(f, _);
520
+ }
521
+ function t(s, h, l, p, y, g, _, m, f) {
522
+ const { taskFontSize: i, taskFontFamily: r } = m, c = s.split(/<br\s*\/?>/gi);
523
+ for (let d = 0; d < c.length; d++) {
524
+ const u = d * i - i * (c.length - 1) / 2, o = h.append("text").attr("x", l + y / 2).attr("y", p).attr("fill", f).style("text-anchor", "middle").style("font-size", i).style("font-family", r);
525
+ o.append("tspan").attr("x", l + y / 2).attr("dy", u).text(c[d]), o.attr("y", p + g / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(o, _);
526
+ }
527
+ }
528
+ function e(s, h, l, p, y, g, _, m) {
529
+ const f = h.append("switch"), r = f.append("foreignObject").attr("x", l).attr("y", p).attr("width", y).attr("height", g).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
530
+ r.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), t(s, f, l, p, y, g, _, m), a(r, _);
531
+ }
532
+ function a(s, h) {
533
+ for (const l in h)
534
+ l in h && s.attr(l, h[l]);
535
+ }
536
+ return function(s) {
537
+ return s.textPlacement === "fo" ? e : s.textPlacement === "old" ? n : t;
538
+ };
539
+ })(), Ht = function(n) {
540
+ n.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
541
+ };
542
+ function yt(n, t) {
543
+ n.each(function() {
544
+ var e = G(this), a = e.text().split(/(\s+|<br>)/).reverse(), s, h = [], l = 1.1, p = e.attr("y"), y = parseFloat(e.attr("dy")), g = e.text(null).append("tspan").attr("x", 0).attr("y", p).attr("dy", y + "em");
545
+ for (let _ = 0; _ < a.length; _++)
546
+ s = a[a.length - 1 - _], h.push(s), g.text(h.join(" ").trim()), (g.node().getComputedTextLength() > t || s === "<br>") && (h.pop(), g.text(h.join(" ").trim()), s === "<br>" ? h = [""] : h = [s], g = e.append("tspan").attr("x", 0).attr("y", p).attr("dy", l + "em").text(s));
547
+ });
548
+ }
549
+ const Pt = function(n, t, e, a) {
550
+ const s = e % Et - 1, h = n.append("g");
551
+ t.section = s, h.attr(
552
+ "class",
553
+ (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + s)
554
+ );
555
+ const l = h.append("g"), p = h.append("g"), g = p.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(yt, t.width).node().getBBox(), _ = a.fontSize && a.fontSize.replace ? a.fontSize.replace("px", "") : a.fontSize;
556
+ return t.height = g.height + _ * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, p.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), zt(l, t, s), t;
557
+ }, Ct = function(n, t, e) {
558
+ const a = n.append("g"), h = a.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(yt, t.width).node().getBBox(), l = e.fontSize && e.fontSize.replace ? e.fontSize.replace("px", "") : e.fontSize;
559
+ return a.remove(), h.height + l * 1.1 * 0.5 + t.padding;
560
+ }, zt = function(n, t, e) {
561
+ n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
562
+ "d",
563
+ `M0 ${t.height - 5} v${-t.height + 10} q0,-5 5,-5 h${t.width - 10} q5,0 5,5 v${t.height - 5} H0 Z`
564
+ ), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
565
+ }, P = {
566
+ drawRect: U,
567
+ drawCircle: It,
568
+ drawSection: Nt,
569
+ drawText: ut,
570
+ drawLabel: $t,
571
+ drawTask: Mt,
572
+ drawBackgroundRect: Lt,
573
+ getTextObj: At,
574
+ getNoteRect: X,
575
+ initGraphics: Ht,
576
+ drawNode: Pt,
577
+ getVirtualNodeHeight: Ct
578
+ }, Rt = function(n, t, e, a) {
579
+ var s, h;
580
+ const l = xt(), p = l.leftMargin ?? 50;
581
+ E.debug("timeline", a.db);
582
+ const y = l.securityLevel;
583
+ let g;
584
+ y === "sandbox" && (g = G("#i" + t));
585
+ const m = (y === "sandbox" ? G(g.nodes()[0].contentDocument.body) : G("body")).select("#" + t);
586
+ m.append("g");
587
+ const f = a.db.getTasks(), i = a.db.getCommonDb().getDiagramTitle();
588
+ E.debug("task", f), P.initGraphics(m);
589
+ const r = a.db.getSections();
590
+ E.debug("sections", r);
591
+ let c = 0, d = 0, u = 0, o = 0, $ = 50 + p, x = 50;
592
+ o = 50;
593
+ let T = 0, W = !0;
594
+ r.forEach(function(w) {
595
+ const v = {
596
+ number: T,
597
+ descr: w,
598
+ section: T,
599
+ width: 150,
600
+ padding: 20,
601
+ maxHeight: c
602
+ }, I = P.getVirtualNodeHeight(m, v, l);
603
+ E.debug("sectionHeight before draw", I), c = Math.max(c, I + 20);
604
+ });
605
+ let C = 0, A = 0;
606
+ E.debug("tasks.length", f.length);
607
+ for (const [w, v] of f.entries()) {
608
+ const I = {
609
+ number: w,
610
+ descr: v,
611
+ section: v.section,
612
+ width: 150,
613
+ padding: 20,
614
+ maxHeight: d
615
+ }, H = P.getVirtualNodeHeight(m, I, l);
616
+ E.debug("taskHeight before draw", H), d = Math.max(d, H + 20), C = Math.max(C, v.events.length);
617
+ let z = 0;
618
+ for (let b = 0; b < v.events.length; b++) {
619
+ const S = {
620
+ descr: v.events[b],
621
+ section: v.section,
622
+ number: v.section,
623
+ width: 150,
624
+ padding: 20,
625
+ maxHeight: 50
626
+ };
627
+ z += P.getVirtualNodeHeight(m, S, l);
628
+ }
629
+ A = Math.max(A, z);
630
+ }
631
+ E.debug("maxSectionHeight before draw", c), E.debug("maxTaskHeight before draw", d), r && r.length > 0 ? r.forEach((w) => {
632
+ const v = f.filter((b) => b.section === w), I = {
633
+ number: T,
634
+ descr: w,
635
+ section: T,
636
+ width: 200 * Math.max(v.length, 1) - 50,
637
+ padding: 20,
638
+ maxHeight: c
639
+ };
640
+ E.debug("sectionNode", I);
641
+ const H = m.append("g"), z = P.drawNode(H, I, T, l);
642
+ E.debug("sectionNode output", z), H.attr("transform", `translate(${$}, ${o})`), x += c + 50, v.length > 0 && nt(
643
+ m,
644
+ v,
645
+ T,
646
+ $,
647
+ x,
648
+ d,
649
+ l,
650
+ C,
651
+ A,
652
+ c,
653
+ !1
654
+ ), $ += 200 * Math.max(v.length, 1), x = o, T++;
655
+ }) : (W = !1, nt(
656
+ m,
657
+ f,
658
+ T,
659
+ $,
660
+ x,
661
+ d,
662
+ l,
663
+ C,
664
+ A,
665
+ c,
666
+ !0
667
+ ));
668
+ const B = m.node().getBBox();
669
+ E.debug("bounds", B), i && m.append("text").text(i).attr("x", B.width / 2 - p).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), u = W ? c + d + 150 : d + 100, m.append("g").attr("class", "lineWrapper").append("line").attr("x1", p).attr("y1", u).attr("x2", B.width + 3 * p).attr("y2", u).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), _t(
670
+ void 0,
671
+ m,
672
+ ((s = l.timeline) == null ? void 0 : s.padding) ?? 50,
673
+ ((h = l.timeline) == null ? void 0 : h.useMaxWidth) ?? !1
674
+ );
675
+ }, nt = function(n, t, e, a, s, h, l, p, y, g, _) {
676
+ var m;
677
+ for (const f of t) {
678
+ const i = {
679
+ descr: f.task,
680
+ section: e,
681
+ number: e,
682
+ width: 150,
683
+ padding: 20,
684
+ maxHeight: h
685
+ };
686
+ E.debug("taskNode", i);
687
+ const r = n.append("g").attr("class", "taskWrapper"), d = P.drawNode(r, i, e, l).height;
688
+ if (E.debug("taskHeight after draw", d), r.attr("transform", `translate(${a}, ${s})`), h = Math.max(h, d), f.events) {
689
+ const u = n.append("g").attr("class", "lineWrapper");
690
+ let o = h;
691
+ s += 100, o = o + Ft(n, f.events, e, a, s, l), s -= 100, u.append("line").attr("x1", a + 190 / 2).attr("y1", s + h).attr("x2", a + 190 / 2).attr(
692
+ "y2",
693
+ s + h + (_ ? h : g) + y + 120
694
+ ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
695
+ }
696
+ a = a + 200, _ && !((m = l.timeline) != null && m.disableMulticolor) && e++;
697
+ }
698
+ s = s - 10;
699
+ }, Ft = function(n, t, e, a, s, h) {
700
+ let l = 0;
701
+ const p = s;
702
+ s = s + 100;
703
+ for (const y of t) {
704
+ const g = {
705
+ descr: y,
706
+ section: e,
707
+ number: e,
708
+ width: 150,
709
+ padding: 20,
710
+ maxHeight: 50
711
+ };
712
+ E.debug("eventNode", g);
713
+ const _ = n.append("g").attr("class", "eventWrapper"), f = P.drawNode(_, g, e, h).height;
714
+ l = l + f, _.attr("transform", `translate(${a}, ${s})`), s = s + 10 + f;
715
+ }
716
+ return s = p, l;
717
+ }, Vt = {
718
+ setConf: () => {
719
+ },
720
+ draw: Rt
721
+ }, Wt = (n) => {
722
+ let t = "";
723
+ for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
724
+ n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], gt(n["lineColor" + e]) ? n["lineColor" + e] = ft(n["lineColor" + e], 20) : n["lineColor" + e] = mt(n["lineColor" + e], 20);
725
+ for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) {
726
+ const a = "" + (17 - 3 * e);
727
+ t += `
728
+ .section-${e - 1} rect, .section-${e - 1} path, .section-${e - 1} circle, .section-${e - 1} path {
729
+ fill: ${n["cScale" + e]};
730
+ }
731
+ .section-${e - 1} text {
732
+ fill: ${n["cScaleLabel" + e]};
733
+ }
734
+ .node-icon-${e - 1} {
735
+ font-size: 40px;
736
+ color: ${n["cScaleLabel" + e]};
737
+ }
738
+ .section-edge-${e - 1}{
739
+ stroke: ${n["cScale" + e]};
740
+ }
741
+ .edge-depth-${e - 1}{
742
+ stroke-width: ${a};
743
+ }
744
+ .section-${e - 1} line {
745
+ stroke: ${n["cScaleInv" + e]} ;
746
+ stroke-width: 3;
747
+ }
748
+
749
+ .lineWrapper line{
750
+ stroke: ${n["cScaleLabel" + e]} ;
751
+ }
752
+
753
+ .disabled, .disabled circle, .disabled text {
754
+ fill: lightgray;
755
+ }
756
+ .disabled text {
757
+ fill: #efefef;
758
+ }
759
+ `;
760
+ }
761
+ return t;
762
+ }, Bt = (n) => `
763
+ .edge {
764
+ stroke-width: 3;
765
+ }
766
+ ${Wt(n)}
767
+ .section-root rect, .section-root path, .section-root circle {
768
+ fill: ${n.git0};
769
+ }
770
+ .section-root text {
771
+ fill: ${n.gitBranchLabel0};
772
+ }
773
+ .icon-container {
774
+ height:100%;
775
+ display: flex;
776
+ justify-content: center;
777
+ align-items: center;
778
+ }
779
+ .edge {
780
+ fill: none;
781
+ }
782
+ .eventWrapper {
783
+ filter: brightness(120%);
784
+ }
785
+ `, Ot = Bt, Ut = {
786
+ db: St,
787
+ renderer: Vt,
788
+ parser: vt,
789
+ styles: Ot
790
+ };
791
+ export {
792
+ Ut as diagram
793
+ };