@prefecthq/prefab-ui-docs 0.16.3 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/_renderer/_basePickBy-fiErwOTY.mjs +151 -0
  2. package/dist/_renderer/_baseUniq-Iy7gOYgw.mjs +614 -0
  3. package/dist/_renderer/arc-BYm2F1-h.mjs +83 -0
  4. package/dist/_renderer/architectureDiagram-2XIMDMQ5-BKR0-ZSX.mjs +4683 -0
  5. package/dist/_renderer/band-TE_TbDmh.mjs +56 -0
  6. package/dist/_renderer/blockDiagram-WCTKOSBZ-BruGG_9M.mjs +2298 -0
  7. package/dist/_renderer/c4Diagram-IC4MRINW-K4nxeBNU.mjs +1581 -0
  8. package/dist/_renderer/channel-D4_UYSAN.mjs +5 -0
  9. package/dist/_renderer/charts-Bwny4UB2.mjs +19169 -0
  10. package/dist/_renderer/chunk-4BX2VUAB-mqLb5fm9.mjs +9 -0
  11. package/dist/_renderer/chunk-55IACEB6-Bxgi9T70.mjs +8 -0
  12. package/dist/_renderer/chunk-FMBD7UC4-Dsah75wQ.mjs +19 -0
  13. package/dist/_renderer/chunk-JSJVCQXG-Bsg6dsjU.mjs +68 -0
  14. package/dist/_renderer/chunk-KX2RTZJC-DvDXsxvC.mjs +20 -0
  15. package/dist/_renderer/chunk-NQ4KR5QH-CwFlbBfF.mjs +1384 -0
  16. package/dist/_renderer/chunk-QZHKN3VN-CYPyScRI.mjs +15 -0
  17. package/dist/_renderer/chunk-WL4C6EOR-2eYOPJVd.mjs +1430 -0
  18. package/dist/_renderer/classDiagram-VBA2DB6C-Dj8h8-wl.mjs +16 -0
  19. package/dist/_renderer/classDiagram-v2-RAHNMMFH-Dj8h8-wl.mjs +16 -0
  20. package/dist/_renderer/clone-BmajYOc3.mjs +8 -0
  21. package/dist/_renderer/{compound-calendar-Cn18AoRs.mjs → compound-calendar-Bmz7kTAd.mjs} +3 -3
  22. package/dist/_renderer/{content-e43PvxaF.mjs → content-Bd8N98h-.mjs} +6 -6
  23. package/dist/_renderer/cose-bilkent-S5V4N54A-BLhD0lt7.mjs +2609 -0
  24. package/dist/_renderer/cytoscape.esm-CjI2IsL8.mjs +18735 -0
  25. package/dist/_renderer/dagre-KLK3FWXG-DCIde85z.mjs +447 -0
  26. package/dist/_renderer/defaultLocale-BgPVtth8.mjs +171 -0
  27. package/dist/_renderer/diagram-E7M64L7V-BbWs-jbo.mjs +533 -0
  28. package/dist/_renderer/diagram-IFDJBPK2-Sfx8kanl.mjs +221 -0
  29. package/dist/_renderer/diagram-P4PSJMXO-DCqYaW3Z.mjs +143 -0
  30. package/dist/_renderer/{embed-DRE2wKZJ.mjs → embed-BCPaWfQN.mjs} +1119 -1114
  31. package/dist/_renderer/embed.mjs +1 -1
  32. package/dist/_renderer/erDiagram-INFDFZHY-D8cdLSCi.mjs +863 -0
  33. package/dist/_renderer/flowDiagram-PKNHOUZH-B_rW2Xww.mjs +1647 -0
  34. package/dist/_renderer/ganttDiagram-A5KZAMGK-Be_Svnat.mjs +1964 -0
  35. package/dist/_renderer/gitGraphDiagram-K3NZZRJ6--wMgYsSv.mjs +709 -0
  36. package/dist/_renderer/graph-alLjIojU.mjs +604 -0
  37. package/dist/_renderer/{icons-CImNZgDa.mjs → icons-w8tvN_30.mjs} +155 -135
  38. package/dist/_renderer/infoDiagram-LFFYTUFH-QW1PzgNF.mjs +24 -0
  39. package/dist/_renderer/init-DxzjmxYy.mjs +32 -0
  40. package/dist/_renderer/ishikawaDiagram-PHBUUO56-xY8fsGh3.mjs +621 -0
  41. package/dist/_renderer/journeyDiagram-4ABVD52K-7XeHSH9G.mjs +834 -0
  42. package/dist/_renderer/kanban-definition-K7BYSVSG-Cn7INDI0.mjs +723 -0
  43. package/dist/_renderer/katex-AQJr8RMF.mjs +11623 -0
  44. package/dist/_renderer/layout-Bspk8k85.mjs +1335 -0
  45. package/dist/_renderer/linear-CVnzSbdA.mjs +275 -0
  46. package/dist/_renderer/mermaid-DjgBUZ1W.mjs +48 -0
  47. package/dist/_renderer/mermaid.core-BzbdT8_O.mjs +13838 -0
  48. package/dist/_renderer/mindmap-definition-YRQLILUH-CVIMKVZI.mjs +788 -0
  49. package/dist/_renderer/ordinal-Bq0KrZxK.mjs +62 -0
  50. package/dist/_renderer/pieDiagram-SKSYHLDU-CL_luPJM.mjs +162 -0
  51. package/dist/_renderer/{svg-BL0kMZ_p.mjs → purify.es-M2Bspgo5.mjs} +222 -240
  52. package/dist/_renderer/quadrantDiagram-337W2JSQ-BQWFWFNU.mjs +1024 -0
  53. package/dist/_renderer/requirementDiagram-Z7DCOOCP-Di29RxJ6.mjs +862 -0
  54. package/dist/_renderer/sankeyDiagram-WA2Y5GQK-DY4kgDbR.mjs +810 -0
  55. package/dist/_renderer/sequenceDiagram-2WXFIKYE-vjbD37pn.mjs +2823 -0
  56. package/dist/_renderer/stateDiagram-RAJIS63D-BQ9BAuO6.mjs +264 -0
  57. package/dist/_renderer/stateDiagram-v2-FVOUBMTO-Bs26kEor.mjs +16 -0
  58. package/dist/_renderer/string-kGvNrjOo.mjs +934 -0
  59. package/dist/_renderer/svg-qTs_3V9p.mjs +22 -0
  60. package/dist/_renderer/time-sQ_UKgU4.mjs +765 -0
  61. package/dist/_renderer/timeline-definition-YZTLITO2-CJfaRgME.mjs +799 -0
  62. package/dist/_renderer/treemap-KZPCXAKY-DQq6TCTm.mjs +17996 -0
  63. package/dist/_renderer/vennDiagram-LZ73GAT5-BkBksHrj.mjs +1564 -0
  64. package/dist/_renderer/xychartDiagram-JWTSCODW-Boo1R-nF.mjs +1299 -0
  65. package/package.json +1 -1
  66. package/dist/_renderer/charts-Dr57vKmb.mjs +0 -21311
@@ -0,0 +1,1964 @@
1
+ import { g as ze, s as Ve, q as Re, p as He, a as qe, b as Be, _ as c, c as dt, d as Tt, e as je, av as G, l as ot, k as Ge, j as Xe, y as Ue, u as Ze } from "./mermaid.core-BzbdT8_O.mjs";
2
+ import { g as Ft } from "./icons-w8tvN_30.mjs";
3
+ import { t as Qe, m as Ke, a as Je, b as se, c as ae, d as tr, e as er, f as rr, g as ir, h as nr, i as sr, j as ar, k as oe, l as ce, n as le, s as ue, o as de } from "./time-sQ_UKgU4.mjs";
4
+ import { l as or } from "./linear-CVnzSbdA.mjs";
5
+ import { R as xe, r as cr, o as Te, q as be, C as we, u as Lt, v as lr } from "./string-kGvNrjOo.mjs";
6
+ const ur = Math.PI / 180, dr = 180 / Math.PI, It = 18, _e = 0.96422, De = 1, Ce = 0.82521, Se = 4 / 29, ft = 6 / 29, Me = 3 * ft * ft, fr = ft * ft * ft;
7
+ function Ee(t) {
8
+ if (t instanceof et) return new et(t.l, t.a, t.b, t.opacity);
9
+ if (t instanceof it) return Ie(t);
10
+ t instanceof xe || (t = cr(t));
11
+ var r = Nt(t.r), i = Nt(t.g), n = Nt(t.b), a = Ot((0.2225045 * r + 0.7168786 * i + 0.0606169 * n) / De), f, d;
12
+ return r === i && i === n ? f = d = a : (f = Ot((0.4360747 * r + 0.3850649 * i + 0.1430804 * n) / _e), d = Ot((0.0139322 * r + 0.0971045 * i + 0.7141733 * n) / Ce)), new et(116 * a - 16, 500 * (f - a), 200 * (a - d), t.opacity);
13
+ }
14
+ function hr(t, r, i, n) {
15
+ return arguments.length === 1 ? Ee(t) : new et(t, r, i, n ?? 1);
16
+ }
17
+ function et(t, r, i, n) {
18
+ this.l = +t, this.a = +r, this.b = +i, this.opacity = +n;
19
+ }
20
+ Te(et, hr, be(we, {
21
+ brighter(t) {
22
+ return new et(this.l + It * (t ?? 1), this.a, this.b, this.opacity);
23
+ },
24
+ darker(t) {
25
+ return new et(this.l - It * (t ?? 1), this.a, this.b, this.opacity);
26
+ },
27
+ rgb() {
28
+ var t = (this.l + 16) / 116, r = isNaN(this.a) ? t : t + this.a / 500, i = isNaN(this.b) ? t : t - this.b / 200;
29
+ return r = _e * Wt(r), t = De * Wt(t), i = Ce * Wt(i), new xe(
30
+ Pt(3.1338561 * r - 1.6168667 * t - 0.4906146 * i),
31
+ Pt(-0.9787684 * r + 1.9161415 * t + 0.033454 * i),
32
+ Pt(0.0719453 * r - 0.2289914 * t + 1.4052427 * i),
33
+ this.opacity
34
+ );
35
+ }
36
+ }));
37
+ function Ot(t) {
38
+ return t > fr ? Math.pow(t, 1 / 3) : t / Me + Se;
39
+ }
40
+ function Wt(t) {
41
+ return t > ft ? t * t * t : Me * (t - Se);
42
+ }
43
+ function Pt(t) {
44
+ return 255 * (t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055);
45
+ }
46
+ function Nt(t) {
47
+ return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
48
+ }
49
+ function mr(t) {
50
+ if (t instanceof it) return new it(t.h, t.c, t.l, t.opacity);
51
+ if (t instanceof et || (t = Ee(t)), t.a === 0 && t.b === 0) return new it(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
52
+ var r = Math.atan2(t.b, t.a) * dr;
53
+ return new it(r < 0 ? r + 360 : r, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
54
+ }
55
+ function Rt(t, r, i, n) {
56
+ return arguments.length === 1 ? mr(t) : new it(t, r, i, n ?? 1);
57
+ }
58
+ function it(t, r, i, n) {
59
+ this.h = +t, this.c = +r, this.l = +i, this.opacity = +n;
60
+ }
61
+ function Ie(t) {
62
+ if (isNaN(t.h)) return new et(t.l, 0, 0, t.opacity);
63
+ var r = t.h * ur;
64
+ return new et(t.l, Math.cos(r) * t.c, Math.sin(r) * t.c, t.opacity);
65
+ }
66
+ Te(it, Rt, be(we, {
67
+ brighter(t) {
68
+ return new it(this.h, this.c, this.l + It * (t ?? 1), this.opacity);
69
+ },
70
+ darker(t) {
71
+ return new it(this.h, this.c, this.l - It * (t ?? 1), this.opacity);
72
+ },
73
+ rgb() {
74
+ return Ie(this).rgb();
75
+ }
76
+ }));
77
+ function kr(t) {
78
+ return function(r, i) {
79
+ var n = t((r = Rt(r)).h, (i = Rt(i)).h), a = Lt(r.c, i.c), f = Lt(r.l, i.l), d = Lt(r.opacity, i.opacity);
80
+ return function(T) {
81
+ return r.h = n(T), r.c = a(T), r.l = f(T), r.opacity = d(T), r + "";
82
+ };
83
+ };
84
+ }
85
+ const yr = kr(lr);
86
+ function gr(t) {
87
+ return t;
88
+ }
89
+ var wt = 1, zt = 2, Ht = 3, bt = 4, fe = 1e-6;
90
+ function pr(t) {
91
+ return "translate(" + t + ",0)";
92
+ }
93
+ function vr(t) {
94
+ return "translate(0," + t + ")";
95
+ }
96
+ function xr(t) {
97
+ return (r) => +t(r);
98
+ }
99
+ function Tr(t, r) {
100
+ return r = Math.max(0, t.bandwidth() - r * 2) / 2, t.round() && (r = Math.round(r)), (i) => +t(i) + r;
101
+ }
102
+ function br() {
103
+ return !this.__axis;
104
+ }
105
+ function $e(t, r) {
106
+ var i = [], n = null, a = null, f = 6, d = 6, T = 3, E = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, A = t === wt || t === bt ? -1 : 1, b = t === bt || t === zt ? "x" : "y", L = t === wt || t === Ht ? pr : vr;
107
+ function S(D) {
108
+ var V = n ?? (r.ticks ? r.ticks.apply(r, i) : r.domain()), I = a ?? (r.tickFormat ? r.tickFormat.apply(r, i) : gr), C = Math.max(f, 0) + T, M = r.range(), W = +M[0] + E, Y = +M[M.length - 1] + E, R = (r.bandwidth ? Tr : xr)(r.copy(), E), H = D.selection ? D.selection() : D, $ = H.selectAll(".domain").data([null]), p = H.selectAll(".tick").data(V, r).order(), h = p.exit(), u = p.enter().append("g").attr("class", "tick"), x = p.select("line"), v = p.select("text");
109
+ $ = $.merge($.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), p = p.merge(u), x = x.merge(u.append("line").attr("stroke", "currentColor").attr(b + "2", A * f)), v = v.merge(u.append("text").attr("fill", "currentColor").attr(b, A * C).attr("dy", t === wt ? "0em" : t === Ht ? "0.71em" : "0.32em")), D !== H && ($ = $.transition(D), p = p.transition(D), x = x.transition(D), v = v.transition(D), h = h.transition(D).attr("opacity", fe).attr("transform", function(k) {
110
+ return isFinite(k = R(k)) ? L(k + E) : this.getAttribute("transform");
111
+ }), u.attr("opacity", fe).attr("transform", function(k) {
112
+ var m = this.parentNode.__axis;
113
+ return L((m && isFinite(m = m(k)) ? m : R(k)) + E);
114
+ })), h.remove(), $.attr("d", t === bt || t === zt ? d ? "M" + A * d + "," + W + "H" + E + "V" + Y + "H" + A * d : "M" + E + "," + W + "V" + Y : d ? "M" + W + "," + A * d + "V" + E + "H" + Y + "V" + A * d : "M" + W + "," + E + "H" + Y), p.attr("opacity", 1).attr("transform", function(k) {
115
+ return L(R(k) + E);
116
+ }), x.attr(b + "2", A * f), v.attr(b, A * C).text(I), H.filter(br).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === zt ? "start" : t === bt ? "end" : "middle"), H.each(function() {
117
+ this.__axis = R;
118
+ });
119
+ }
120
+ return S.scale = function(D) {
121
+ return arguments.length ? (r = D, S) : r;
122
+ }, S.ticks = function() {
123
+ return i = Array.from(arguments), S;
124
+ }, S.tickArguments = function(D) {
125
+ return arguments.length ? (i = D == null ? [] : Array.from(D), S) : i.slice();
126
+ }, S.tickValues = function(D) {
127
+ return arguments.length ? (n = D == null ? null : Array.from(D), S) : n && n.slice();
128
+ }, S.tickFormat = function(D) {
129
+ return arguments.length ? (a = D, S) : a;
130
+ }, S.tickSize = function(D) {
131
+ return arguments.length ? (f = d = +D, S) : f;
132
+ }, S.tickSizeInner = function(D) {
133
+ return arguments.length ? (f = +D, S) : f;
134
+ }, S.tickSizeOuter = function(D) {
135
+ return arguments.length ? (d = +D, S) : d;
136
+ }, S.tickPadding = function(D) {
137
+ return arguments.length ? (T = +D, S) : T;
138
+ }, S.offset = function(D) {
139
+ return arguments.length ? (E = +D, S) : E;
140
+ }, S;
141
+ }
142
+ function wr(t) {
143
+ return $e(wt, t);
144
+ }
145
+ function _r(t) {
146
+ return $e(Ht, t);
147
+ }
148
+ var _t = { exports: {} }, Dr = _t.exports, he;
149
+ function Cr() {
150
+ return he || (he = 1, (function(t, r) {
151
+ (function(i, n) {
152
+ t.exports = n();
153
+ })(Dr, (function() {
154
+ var i = "day";
155
+ return function(n, a, f) {
156
+ var d = function(A) {
157
+ return A.add(4 - A.isoWeekday(), i);
158
+ }, T = a.prototype;
159
+ T.isoWeekYear = function() {
160
+ return d(this).year();
161
+ }, T.isoWeek = function(A) {
162
+ if (!this.$utils().u(A)) return this.add(7 * (A - this.isoWeek()), i);
163
+ var b, L, S, D, V = d(this), I = (b = this.isoWeekYear(), L = this.$u, S = (L ? f.utc : f)().year(b).startOf("year"), D = 4 - S.isoWeekday(), S.isoWeekday() > 4 && (D += 7), S.add(D, i));
164
+ return V.diff(I, "week") + 1;
165
+ }, T.isoWeekday = function(A) {
166
+ return this.$utils().u(A) ? this.day() || 7 : this.day(this.day() % 7 ? A : A - 7);
167
+ };
168
+ var E = T.startOf;
169
+ T.startOf = function(A, b) {
170
+ var L = this.$utils(), S = !!L.u(b) || b;
171
+ return L.p(A) === "isoweek" ? S ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : E.bind(this)(A, b);
172
+ };
173
+ };
174
+ }));
175
+ })(_t)), _t.exports;
176
+ }
177
+ var Sr = Cr();
178
+ const Mr = /* @__PURE__ */ Ft(Sr);
179
+ var Dt = { exports: {} }, Er = Dt.exports, me;
180
+ function Ir() {
181
+ return me || (me = 1, (function(t, r) {
182
+ (function(i, n) {
183
+ t.exports = n();
184
+ })(Er, (function() {
185
+ var i = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, n = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, a = /\d/, f = /\d\d/, d = /\d\d?/, T = /\d*[^-_:/,()\s\d]+/, E = {}, A = function(C) {
186
+ return (C = +C) + (C > 68 ? 1900 : 2e3);
187
+ }, b = function(C) {
188
+ return function(M) {
189
+ this[C] = +M;
190
+ };
191
+ }, L = [/[+-]\d\d:?(\d\d)?|Z/, function(C) {
192
+ (this.zone || (this.zone = {})).offset = (function(M) {
193
+ if (!M || M === "Z") return 0;
194
+ var W = M.match(/([+-]|\d\d)/g), Y = 60 * W[1] + (+W[2] || 0);
195
+ return Y === 0 ? 0 : W[0] === "+" ? -Y : Y;
196
+ })(C);
197
+ }], S = function(C) {
198
+ var M = E[C];
199
+ return M && (M.indexOf ? M : M.s.concat(M.f));
200
+ }, D = function(C, M) {
201
+ var W, Y = E.meridiem;
202
+ if (Y) {
203
+ for (var R = 1; R <= 24; R += 1) if (C.indexOf(Y(R, 0, M)) > -1) {
204
+ W = R > 12;
205
+ break;
206
+ }
207
+ } else W = C === (M ? "pm" : "PM");
208
+ return W;
209
+ }, V = { A: [T, function(C) {
210
+ this.afternoon = D(C, !1);
211
+ }], a: [T, function(C) {
212
+ this.afternoon = D(C, !0);
213
+ }], Q: [a, function(C) {
214
+ this.month = 3 * (C - 1) + 1;
215
+ }], S: [a, function(C) {
216
+ this.milliseconds = 100 * +C;
217
+ }], SS: [f, function(C) {
218
+ this.milliseconds = 10 * +C;
219
+ }], SSS: [/\d{3}/, function(C) {
220
+ this.milliseconds = +C;
221
+ }], s: [d, b("seconds")], ss: [d, b("seconds")], m: [d, b("minutes")], mm: [d, b("minutes")], H: [d, b("hours")], h: [d, b("hours")], HH: [d, b("hours")], hh: [d, b("hours")], D: [d, b("day")], DD: [f, b("day")], Do: [T, function(C) {
222
+ var M = E.ordinal, W = C.match(/\d+/);
223
+ if (this.day = W[0], M) for (var Y = 1; Y <= 31; Y += 1) M(Y).replace(/\[|\]/g, "") === C && (this.day = Y);
224
+ }], w: [d, b("week")], ww: [f, b("week")], M: [d, b("month")], MM: [f, b("month")], MMM: [T, function(C) {
225
+ var M = S("months"), W = (S("monthsShort") || M.map((function(Y) {
226
+ return Y.slice(0, 3);
227
+ }))).indexOf(C) + 1;
228
+ if (W < 1) throw new Error();
229
+ this.month = W % 12 || W;
230
+ }], MMMM: [T, function(C) {
231
+ var M = S("months").indexOf(C) + 1;
232
+ if (M < 1) throw new Error();
233
+ this.month = M % 12 || M;
234
+ }], Y: [/[+-]?\d+/, b("year")], YY: [f, function(C) {
235
+ this.year = A(C);
236
+ }], YYYY: [/\d{4}/, b("year")], Z: L, ZZ: L };
237
+ function I(C) {
238
+ var M, W;
239
+ M = C, W = E && E.formats;
240
+ for (var Y = (C = M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(x, v, k) {
241
+ var m = k && k.toUpperCase();
242
+ return v || W[k] || i[k] || W[m].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(o, l, y) {
243
+ return l || y.slice(1);
244
+ }));
245
+ }))).match(n), R = Y.length, H = 0; H < R; H += 1) {
246
+ var $ = Y[H], p = V[$], h = p && p[0], u = p && p[1];
247
+ Y[H] = u ? { regex: h, parser: u } : $.replace(/^\[|\]$/g, "");
248
+ }
249
+ return function(x) {
250
+ for (var v = {}, k = 0, m = 0; k < R; k += 1) {
251
+ var o = Y[k];
252
+ if (typeof o == "string") m += o.length;
253
+ else {
254
+ var l = o.regex, y = o.parser, g = x.slice(m), w = l.exec(g)[0];
255
+ y.call(v, w), x = x.replace(w, "");
256
+ }
257
+ }
258
+ return (function(s) {
259
+ var z = s.afternoon;
260
+ if (z !== void 0) {
261
+ var e = s.hours;
262
+ z ? e < 12 && (s.hours += 12) : e === 12 && (s.hours = 0), delete s.afternoon;
263
+ }
264
+ })(v), v;
265
+ };
266
+ }
267
+ return function(C, M, W) {
268
+ W.p.customParseFormat = !0, C && C.parseTwoDigitYear && (A = C.parseTwoDigitYear);
269
+ var Y = M.prototype, R = Y.parse;
270
+ Y.parse = function(H) {
271
+ var $ = H.date, p = H.utc, h = H.args;
272
+ this.$u = p;
273
+ var u = h[1];
274
+ if (typeof u == "string") {
275
+ var x = h[2] === !0, v = h[3] === !0, k = x || v, m = h[2];
276
+ v && (m = h[2]), E = this.$locale(), !x && m && (E = W.Ls[m]), this.$d = (function(g, w, s, z) {
277
+ try {
278
+ if (["x", "X"].indexOf(w) > -1) return new Date((w === "X" ? 1e3 : 1) * g);
279
+ var e = I(w)(g), _ = e.year, N = e.month, P = e.day, O = e.hours, j = e.minutes, F = e.seconds, Q = e.milliseconds, nt = e.zone, lt = e.week, kt = /* @__PURE__ */ new Date(), yt = P || (_ || N ? 1 : kt.getDate()), ut = _ || kt.getFullYear(), q = 0;
280
+ _ && !N || (q = N > 0 ? N - 1 : kt.getMonth());
281
+ var Z, X = O || 0, at = j || 0, K = F || 0, st = Q || 0;
282
+ return nt ? new Date(Date.UTC(ut, q, yt, X, at, K, st + 60 * nt.offset * 1e3)) : s ? new Date(Date.UTC(ut, q, yt, X, at, K, st)) : (Z = new Date(ut, q, yt, X, at, K, st), lt && (Z = z(Z).week(lt).toDate()), Z);
283
+ } catch {
284
+ return /* @__PURE__ */ new Date("");
285
+ }
286
+ })($, u, p, W), this.init(), m && m !== !0 && (this.$L = this.locale(m).$L), k && $ != this.format(u) && (this.$d = /* @__PURE__ */ new Date("")), E = {};
287
+ } else if (u instanceof Array) for (var o = u.length, l = 1; l <= o; l += 1) {
288
+ h[1] = u[l - 1];
289
+ var y = W.apply(this, h);
290
+ if (y.isValid()) {
291
+ this.$d = y.$d, this.$L = y.$L, this.init();
292
+ break;
293
+ }
294
+ l === o && (this.$d = /* @__PURE__ */ new Date(""));
295
+ }
296
+ else R.call(this, H);
297
+ };
298
+ };
299
+ }));
300
+ })(Dt)), Dt.exports;
301
+ }
302
+ var $r = Ir();
303
+ const Ar = /* @__PURE__ */ Ft($r);
304
+ var Ct = { exports: {} }, Fr = Ct.exports, ke;
305
+ function Yr() {
306
+ return ke || (ke = 1, (function(t, r) {
307
+ (function(i, n) {
308
+ t.exports = n();
309
+ })(Fr, (function() {
310
+ return function(i, n) {
311
+ var a = n.prototype, f = a.format;
312
+ a.format = function(d) {
313
+ var T = this, E = this.$locale();
314
+ if (!this.isValid()) return f.bind(this)(d);
315
+ var A = this.$utils(), b = (d || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, (function(L) {
316
+ switch (L) {
317
+ case "Q":
318
+ return Math.ceil((T.$M + 1) / 3);
319
+ case "Do":
320
+ return E.ordinal(T.$D);
321
+ case "gggg":
322
+ return T.weekYear();
323
+ case "GGGG":
324
+ return T.isoWeekYear();
325
+ case "wo":
326
+ return E.ordinal(T.week(), "W");
327
+ case "w":
328
+ case "ww":
329
+ return A.s(T.week(), L === "w" ? 1 : 2, "0");
330
+ case "W":
331
+ case "WW":
332
+ return A.s(T.isoWeek(), L === "W" ? 1 : 2, "0");
333
+ case "k":
334
+ case "kk":
335
+ return A.s(String(T.$H === 0 ? 24 : T.$H), L === "k" ? 1 : 2, "0");
336
+ case "X":
337
+ return Math.floor(T.$d.getTime() / 1e3);
338
+ case "x":
339
+ return T.$d.getTime();
340
+ case "z":
341
+ return "[" + T.offsetName() + "]";
342
+ case "zzz":
343
+ return "[" + T.offsetName("long") + "]";
344
+ default:
345
+ return L;
346
+ }
347
+ }));
348
+ return f.bind(this)(b);
349
+ };
350
+ };
351
+ }));
352
+ })(Ct)), Ct.exports;
353
+ }
354
+ var Lr = Yr();
355
+ const Or = /* @__PURE__ */ Ft(Lr);
356
+ var St = { exports: {} }, Wr = St.exports, ye;
357
+ function Pr() {
358
+ return ye || (ye = 1, (function(t, r) {
359
+ (function(i, n) {
360
+ t.exports = n();
361
+ })(Wr, (function() {
362
+ var i, n, a = 1e3, f = 6e4, d = 36e5, T = 864e5, E = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, A = 31536e6, b = 2628e6, L = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, S = { years: A, months: b, days: T, hours: d, minutes: f, seconds: a, milliseconds: 1, weeks: 6048e5 }, D = function($) {
363
+ return $ instanceof R;
364
+ }, V = function($, p, h) {
365
+ return new R($, h, p.$l);
366
+ }, I = function($) {
367
+ return n.p($) + "s";
368
+ }, C = function($) {
369
+ return $ < 0;
370
+ }, M = function($) {
371
+ return C($) ? Math.ceil($) : Math.floor($);
372
+ }, W = function($) {
373
+ return Math.abs($);
374
+ }, Y = function($, p) {
375
+ return $ ? C($) ? { negative: !0, format: "" + W($) + p } : { negative: !1, format: "" + $ + p } : { negative: !1, format: "" };
376
+ }, R = (function() {
377
+ function $(h, u, x) {
378
+ var v = this;
379
+ if (this.$d = {}, this.$l = x, h === void 0 && (this.$ms = 0, this.parseFromMilliseconds()), u) return V(h * S[I(u)], this);
380
+ if (typeof h == "number") return this.$ms = h, this.parseFromMilliseconds(), this;
381
+ if (typeof h == "object") return Object.keys(h).forEach((function(o) {
382
+ v.$d[I(o)] = h[o];
383
+ })), this.calMilliseconds(), this;
384
+ if (typeof h == "string") {
385
+ var k = h.match(L);
386
+ if (k) {
387
+ var m = k.slice(2).map((function(o) {
388
+ return o != null ? Number(o) : 0;
389
+ }));
390
+ return this.$d.years = m[0], this.$d.months = m[1], this.$d.weeks = m[2], this.$d.days = m[3], this.$d.hours = m[4], this.$d.minutes = m[5], this.$d.seconds = m[6], this.calMilliseconds(), this;
391
+ }
392
+ }
393
+ return this;
394
+ }
395
+ var p = $.prototype;
396
+ return p.calMilliseconds = function() {
397
+ var h = this;
398
+ this.$ms = Object.keys(this.$d).reduce((function(u, x) {
399
+ return u + (h.$d[x] || 0) * S[x];
400
+ }), 0);
401
+ }, p.parseFromMilliseconds = function() {
402
+ var h = this.$ms;
403
+ this.$d.years = M(h / A), h %= A, this.$d.months = M(h / b), h %= b, this.$d.days = M(h / T), h %= T, this.$d.hours = M(h / d), h %= d, this.$d.minutes = M(h / f), h %= f, this.$d.seconds = M(h / a), h %= a, this.$d.milliseconds = h;
404
+ }, p.toISOString = function() {
405
+ var h = Y(this.$d.years, "Y"), u = Y(this.$d.months, "M"), x = +this.$d.days || 0;
406
+ this.$d.weeks && (x += 7 * this.$d.weeks);
407
+ var v = Y(x, "D"), k = Y(this.$d.hours, "H"), m = Y(this.$d.minutes, "M"), o = this.$d.seconds || 0;
408
+ this.$d.milliseconds && (o += this.$d.milliseconds / 1e3, o = Math.round(1e3 * o) / 1e3);
409
+ var l = Y(o, "S"), y = h.negative || u.negative || v.negative || k.negative || m.negative || l.negative, g = k.format || m.format || l.format ? "T" : "", w = (y ? "-" : "") + "P" + h.format + u.format + v.format + g + k.format + m.format + l.format;
410
+ return w === "P" || w === "-P" ? "P0D" : w;
411
+ }, p.toJSON = function() {
412
+ return this.toISOString();
413
+ }, p.format = function(h) {
414
+ var u = h || "YYYY-MM-DDTHH:mm:ss", x = { Y: this.$d.years, YY: n.s(this.$d.years, 2, "0"), YYYY: n.s(this.$d.years, 4, "0"), M: this.$d.months, MM: n.s(this.$d.months, 2, "0"), D: this.$d.days, DD: n.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: n.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: n.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: n.s(this.$d.seconds, 2, "0"), SSS: n.s(this.$d.milliseconds, 3, "0") };
415
+ return u.replace(E, (function(v, k) {
416
+ return k || String(x[v]);
417
+ }));
418
+ }, p.as = function(h) {
419
+ return this.$ms / S[I(h)];
420
+ }, p.get = function(h) {
421
+ var u = this.$ms, x = I(h);
422
+ return x === "milliseconds" ? u %= 1e3 : u = x === "weeks" ? M(u / S[x]) : this.$d[x], u || 0;
423
+ }, p.add = function(h, u, x) {
424
+ var v;
425
+ return v = u ? h * S[I(u)] : D(h) ? h.$ms : V(h, this).$ms, V(this.$ms + v * (x ? -1 : 1), this);
426
+ }, p.subtract = function(h, u) {
427
+ return this.add(h, u, !0);
428
+ }, p.locale = function(h) {
429
+ var u = this.clone();
430
+ return u.$l = h, u;
431
+ }, p.clone = function() {
432
+ return V(this.$ms, this);
433
+ }, p.humanize = function(h) {
434
+ return i().add(this.$ms, "ms").locale(this.$l).fromNow(!h);
435
+ }, p.valueOf = function() {
436
+ return this.asMilliseconds();
437
+ }, p.milliseconds = function() {
438
+ return this.get("milliseconds");
439
+ }, p.asMilliseconds = function() {
440
+ return this.as("milliseconds");
441
+ }, p.seconds = function() {
442
+ return this.get("seconds");
443
+ }, p.asSeconds = function() {
444
+ return this.as("seconds");
445
+ }, p.minutes = function() {
446
+ return this.get("minutes");
447
+ }, p.asMinutes = function() {
448
+ return this.as("minutes");
449
+ }, p.hours = function() {
450
+ return this.get("hours");
451
+ }, p.asHours = function() {
452
+ return this.as("hours");
453
+ }, p.days = function() {
454
+ return this.get("days");
455
+ }, p.asDays = function() {
456
+ return this.as("days");
457
+ }, p.weeks = function() {
458
+ return this.get("weeks");
459
+ }, p.asWeeks = function() {
460
+ return this.as("weeks");
461
+ }, p.months = function() {
462
+ return this.get("months");
463
+ }, p.asMonths = function() {
464
+ return this.as("months");
465
+ }, p.years = function() {
466
+ return this.get("years");
467
+ }, p.asYears = function() {
468
+ return this.as("years");
469
+ }, $;
470
+ })(), H = function($, p, h) {
471
+ return $.add(p.years() * h, "y").add(p.months() * h, "M").add(p.days() * h, "d").add(p.hours() * h, "h").add(p.minutes() * h, "m").add(p.seconds() * h, "s").add(p.milliseconds() * h, "ms");
472
+ };
473
+ return function($, p, h) {
474
+ i = h, n = h().$utils(), h.duration = function(v, k) {
475
+ var m = h.locale();
476
+ return V(v, { $l: m }, k);
477
+ }, h.isDuration = D;
478
+ var u = p.prototype.add, x = p.prototype.subtract;
479
+ p.prototype.add = function(v, k) {
480
+ return D(v) ? H(this, v, 1) : u.bind(this)(v, k);
481
+ }, p.prototype.subtract = function(v, k) {
482
+ return D(v) ? H(this, v, -1) : x.bind(this)(v, k);
483
+ };
484
+ };
485
+ }));
486
+ })(St)), St.exports;
487
+ }
488
+ var Nr = Pr();
489
+ const zr = /* @__PURE__ */ Ft(Nr);
490
+ var qt = (function() {
491
+ var t = /* @__PURE__ */ c(function(m, o, l, y) {
492
+ for (l = l || {}, y = m.length; y--; l[m[y]] = o) ;
493
+ return l;
494
+ }, "o"), r = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 36, 38, 40], i = [1, 26], n = [1, 27], a = [1, 28], f = [1, 29], d = [1, 30], T = [1, 31], E = [1, 32], A = [1, 33], b = [1, 34], L = [1, 9], S = [1, 10], D = [1, 11], V = [1, 12], I = [1, 13], C = [1, 14], M = [1, 15], W = [1, 16], Y = [1, 19], R = [1, 20], H = [1, 21], $ = [1, 22], p = [1, 23], h = [1, 25], u = [1, 35], x = {
495
+ trace: /* @__PURE__ */ c(function() {
496
+ }, "trace"),
497
+ yy: {},
498
+ symbols_: { error: 2, start: 3, gantt: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NL: 10, weekday: 11, weekday_monday: 12, weekday_tuesday: 13, weekday_wednesday: 14, weekday_thursday: 15, weekday_friday: 16, weekday_saturday: 17, weekday_sunday: 18, weekend: 19, weekend_friday: 20, weekend_saturday: 21, dateFormat: 22, inclusiveEndDates: 23, topAxis: 24, axisFormat: 25, tickInterval: 26, excludes: 27, includes: 28, todayMarker: 29, title: 30, acc_title: 31, acc_title_value: 32, acc_descr: 33, acc_descr_value: 34, acc_descr_multiline_value: 35, section: 36, clickStatement: 37, taskTxt: 38, taskData: 39, click: 40, callbackname: 41, callbackargs: 42, href: 43, clickStatementDebug: 44, $accept: 0, $end: 1 },
499
+ terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 12: "weekday_monday", 13: "weekday_tuesday", 14: "weekday_wednesday", 15: "weekday_thursday", 16: "weekday_friday", 17: "weekday_saturday", 18: "weekday_sunday", 20: "weekend_friday", 21: "weekend_saturday", 22: "dateFormat", 23: "inclusiveEndDates", 24: "topAxis", 25: "axisFormat", 26: "tickInterval", 27: "excludes", 28: "includes", 29: "todayMarker", 30: "title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "section", 38: "taskTxt", 39: "taskData", 40: "click", 41: "callbackname", 42: "callbackargs", 43: "href" },
500
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [19, 1], [19, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [37, 2], [37, 3], [37, 3], [37, 4], [37, 3], [37, 4], [37, 2], [44, 2], [44, 3], [44, 3], [44, 4], [44, 3], [44, 4], [44, 2]],
501
+ performAction: /* @__PURE__ */ c(function(o, l, y, g, w, s, z) {
502
+ var e = s.length - 1;
503
+ switch (w) {
504
+ case 1:
505
+ return s[e - 1];
506
+ case 2:
507
+ this.$ = [];
508
+ break;
509
+ case 3:
510
+ s[e - 1].push(s[e]), this.$ = s[e - 1];
511
+ break;
512
+ case 4:
513
+ case 5:
514
+ this.$ = s[e];
515
+ break;
516
+ case 6:
517
+ case 7:
518
+ this.$ = [];
519
+ break;
520
+ case 8:
521
+ g.setWeekday("monday");
522
+ break;
523
+ case 9:
524
+ g.setWeekday("tuesday");
525
+ break;
526
+ case 10:
527
+ g.setWeekday("wednesday");
528
+ break;
529
+ case 11:
530
+ g.setWeekday("thursday");
531
+ break;
532
+ case 12:
533
+ g.setWeekday("friday");
534
+ break;
535
+ case 13:
536
+ g.setWeekday("saturday");
537
+ break;
538
+ case 14:
539
+ g.setWeekday("sunday");
540
+ break;
541
+ case 15:
542
+ g.setWeekend("friday");
543
+ break;
544
+ case 16:
545
+ g.setWeekend("saturday");
546
+ break;
547
+ case 17:
548
+ g.setDateFormat(s[e].substr(11)), this.$ = s[e].substr(11);
549
+ break;
550
+ case 18:
551
+ g.enableInclusiveEndDates(), this.$ = s[e].substr(18);
552
+ break;
553
+ case 19:
554
+ g.TopAxis(), this.$ = s[e].substr(8);
555
+ break;
556
+ case 20:
557
+ g.setAxisFormat(s[e].substr(11)), this.$ = s[e].substr(11);
558
+ break;
559
+ case 21:
560
+ g.setTickInterval(s[e].substr(13)), this.$ = s[e].substr(13);
561
+ break;
562
+ case 22:
563
+ g.setExcludes(s[e].substr(9)), this.$ = s[e].substr(9);
564
+ break;
565
+ case 23:
566
+ g.setIncludes(s[e].substr(9)), this.$ = s[e].substr(9);
567
+ break;
568
+ case 24:
569
+ g.setTodayMarker(s[e].substr(12)), this.$ = s[e].substr(12);
570
+ break;
571
+ case 27:
572
+ g.setDiagramTitle(s[e].substr(6)), this.$ = s[e].substr(6);
573
+ break;
574
+ case 28:
575
+ this.$ = s[e].trim(), g.setAccTitle(this.$);
576
+ break;
577
+ case 29:
578
+ case 30:
579
+ this.$ = s[e].trim(), g.setAccDescription(this.$);
580
+ break;
581
+ case 31:
582
+ g.addSection(s[e].substr(8)), this.$ = s[e].substr(8);
583
+ break;
584
+ case 33:
585
+ g.addTask(s[e - 1], s[e]), this.$ = "task";
586
+ break;
587
+ case 34:
588
+ this.$ = s[e - 1], g.setClickEvent(s[e - 1], s[e], null);
589
+ break;
590
+ case 35:
591
+ this.$ = s[e - 2], g.setClickEvent(s[e - 2], s[e - 1], s[e]);
592
+ break;
593
+ case 36:
594
+ this.$ = s[e - 2], g.setClickEvent(s[e - 2], s[e - 1], null), g.setLink(s[e - 2], s[e]);
595
+ break;
596
+ case 37:
597
+ this.$ = s[e - 3], g.setClickEvent(s[e - 3], s[e - 2], s[e - 1]), g.setLink(s[e - 3], s[e]);
598
+ break;
599
+ case 38:
600
+ this.$ = s[e - 2], g.setClickEvent(s[e - 2], s[e], null), g.setLink(s[e - 2], s[e - 1]);
601
+ break;
602
+ case 39:
603
+ this.$ = s[e - 3], g.setClickEvent(s[e - 3], s[e - 1], s[e]), g.setLink(s[e - 3], s[e - 2]);
604
+ break;
605
+ case 40:
606
+ this.$ = s[e - 1], g.setLink(s[e - 1], s[e]);
607
+ break;
608
+ case 41:
609
+ case 47:
610
+ this.$ = s[e - 1] + " " + s[e];
611
+ break;
612
+ case 42:
613
+ case 43:
614
+ case 45:
615
+ this.$ = s[e - 2] + " " + s[e - 1] + " " + s[e];
616
+ break;
617
+ case 44:
618
+ case 46:
619
+ this.$ = s[e - 3] + " " + s[e - 2] + " " + s[e - 1] + " " + s[e];
620
+ break;
621
+ }
622
+ }, "anonymous"),
623
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(r, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: i, 13: n, 14: a, 15: f, 16: d, 17: T, 18: E, 19: 18, 20: A, 21: b, 22: L, 23: S, 24: D, 25: V, 26: I, 27: C, 28: M, 29: W, 30: Y, 31: R, 33: H, 35: $, 36: p, 37: 24, 38: h, 40: u }, t(r, [2, 7], { 1: [2, 1] }), t(r, [2, 3]), { 9: 36, 11: 17, 12: i, 13: n, 14: a, 15: f, 16: d, 17: T, 18: E, 19: 18, 20: A, 21: b, 22: L, 23: S, 24: D, 25: V, 26: I, 27: C, 28: M, 29: W, 30: Y, 31: R, 33: H, 35: $, 36: p, 37: 24, 38: h, 40: u }, t(r, [2, 5]), t(r, [2, 6]), t(r, [2, 17]), t(r, [2, 18]), t(r, [2, 19]), t(r, [2, 20]), t(r, [2, 21]), t(r, [2, 22]), t(r, [2, 23]), t(r, [2, 24]), t(r, [2, 25]), t(r, [2, 26]), t(r, [2, 27]), { 32: [1, 37] }, { 34: [1, 38] }, t(r, [2, 30]), t(r, [2, 31]), t(r, [2, 32]), { 39: [1, 39] }, t(r, [2, 8]), t(r, [2, 9]), t(r, [2, 10]), t(r, [2, 11]), t(r, [2, 12]), t(r, [2, 13]), t(r, [2, 14]), t(r, [2, 15]), t(r, [2, 16]), { 41: [1, 40], 43: [1, 41] }, t(r, [2, 4]), t(r, [2, 28]), t(r, [2, 29]), t(r, [2, 33]), t(r, [2, 34], { 42: [1, 42], 43: [1, 43] }), t(r, [2, 40], { 41: [1, 44] }), t(r, [2, 35], { 43: [1, 45] }), t(r, [2, 36]), t(r, [2, 38], { 42: [1, 46] }), t(r, [2, 37]), t(r, [2, 39])],
624
+ defaultActions: {},
625
+ parseError: /* @__PURE__ */ c(function(o, l) {
626
+ if (l.recoverable)
627
+ this.trace(o);
628
+ else {
629
+ var y = new Error(o);
630
+ throw y.hash = l, y;
631
+ }
632
+ }, "parseError"),
633
+ parse: /* @__PURE__ */ c(function(o) {
634
+ var l = this, y = [0], g = [], w = [null], s = [], z = this.table, e = "", _ = 0, N = 0, P = 2, O = 1, j = s.slice.call(arguments, 1), F = Object.create(this.lexer), Q = { yy: {} };
635
+ for (var nt in this.yy)
636
+ Object.prototype.hasOwnProperty.call(this.yy, nt) && (Q.yy[nt] = this.yy[nt]);
637
+ F.setInput(o, Q.yy), Q.yy.lexer = F, Q.yy.parser = this, typeof F.yylloc > "u" && (F.yylloc = {});
638
+ var lt = F.yylloc;
639
+ s.push(lt);
640
+ var kt = F.options && F.options.ranges;
641
+ typeof Q.yy.parseError == "function" ? this.parseError = Q.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
642
+ function yt(U) {
643
+ y.length = y.length - 2 * U, w.length = w.length - U, s.length = s.length - U;
644
+ }
645
+ c(yt, "popStack");
646
+ function ut() {
647
+ var U;
648
+ return U = g.pop() || F.lex() || O, typeof U != "number" && (U instanceof Array && (g = U, U = g.pop()), U = l.symbols_[U] || U), U;
649
+ }
650
+ c(ut, "lex");
651
+ for (var q, Z, X, at, K = {}, st, J, ne, xt; ; ) {
652
+ if (Z = y[y.length - 1], this.defaultActions[Z] ? X = this.defaultActions[Z] : ((q === null || typeof q > "u") && (q = ut()), X = z[Z] && z[Z][q]), typeof X > "u" || !X.length || !X[0]) {
653
+ var Yt = "";
654
+ xt = [];
655
+ for (st in z[Z])
656
+ this.terminals_[st] && st > P && xt.push("'" + this.terminals_[st] + "'");
657
+ F.showPosition ? Yt = "Parse error on line " + (_ + 1) + `:
658
+ ` + F.showPosition() + `
659
+ Expecting ` + xt.join(", ") + ", got '" + (this.terminals_[q] || q) + "'" : Yt = "Parse error on line " + (_ + 1) + ": Unexpected " + (q == O ? "end of input" : "'" + (this.terminals_[q] || q) + "'"), this.parseError(Yt, {
660
+ text: F.match,
661
+ token: this.terminals_[q] || q,
662
+ line: F.yylineno,
663
+ loc: lt,
664
+ expected: xt
665
+ });
666
+ }
667
+ if (X[0] instanceof Array && X.length > 1)
668
+ throw new Error("Parse Error: multiple actions possible at state: " + Z + ", token: " + q);
669
+ switch (X[0]) {
670
+ case 1:
671
+ y.push(q), w.push(F.yytext), s.push(F.yylloc), y.push(X[1]), q = null, N = F.yyleng, e = F.yytext, _ = F.yylineno, lt = F.yylloc;
672
+ break;
673
+ case 2:
674
+ if (J = this.productions_[X[1]][1], K.$ = w[w.length - J], K._$ = {
675
+ first_line: s[s.length - (J || 1)].first_line,
676
+ last_line: s[s.length - 1].last_line,
677
+ first_column: s[s.length - (J || 1)].first_column,
678
+ last_column: s[s.length - 1].last_column
679
+ }, kt && (K._$.range = [
680
+ s[s.length - (J || 1)].range[0],
681
+ s[s.length - 1].range[1]
682
+ ]), at = this.performAction.apply(K, [
683
+ e,
684
+ N,
685
+ _,
686
+ Q.yy,
687
+ X[1],
688
+ w,
689
+ s
690
+ ].concat(j)), typeof at < "u")
691
+ return at;
692
+ J && (y = y.slice(0, -1 * J * 2), w = w.slice(0, -1 * J), s = s.slice(0, -1 * J)), y.push(this.productions_[X[1]][0]), w.push(K.$), s.push(K._$), ne = z[y[y.length - 2]][y[y.length - 1]], y.push(ne);
693
+ break;
694
+ case 3:
695
+ return !0;
696
+ }
697
+ }
698
+ return !0;
699
+ }, "parse")
700
+ }, v = /* @__PURE__ */ (function() {
701
+ var m = {
702
+ EOF: 1,
703
+ parseError: /* @__PURE__ */ c(function(l, y) {
704
+ if (this.yy.parser)
705
+ this.yy.parser.parseError(l, y);
706
+ else
707
+ throw new Error(l);
708
+ }, "parseError"),
709
+ // resets the lexer, sets new input
710
+ setInput: /* @__PURE__ */ c(function(o, l) {
711
+ return this.yy = l || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
712
+ first_line: 1,
713
+ first_column: 0,
714
+ last_line: 1,
715
+ last_column: 0
716
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
717
+ }, "setInput"),
718
+ // consumes and returns one char from the input
719
+ input: /* @__PURE__ */ c(function() {
720
+ var o = this._input[0];
721
+ this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
722
+ var l = o.match(/(?:\r\n?|\n).*/g);
723
+ return l ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
724
+ }, "input"),
725
+ // unshifts one char (or a string) into the input
726
+ unput: /* @__PURE__ */ c(function(o) {
727
+ var l = o.length, y = o.split(/(?:\r\n?|\n)/g);
728
+ this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - l), this.offset -= l;
729
+ var g = this.match.split(/(?:\r\n?|\n)/g);
730
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), y.length - 1 && (this.yylineno -= y.length - 1);
731
+ var w = this.yylloc.range;
732
+ return this.yylloc = {
733
+ first_line: this.yylloc.first_line,
734
+ last_line: this.yylineno + 1,
735
+ first_column: this.yylloc.first_column,
736
+ last_column: y ? (y.length === g.length ? this.yylloc.first_column : 0) + g[g.length - y.length].length - y[0].length : this.yylloc.first_column - l
737
+ }, this.options.ranges && (this.yylloc.range = [w[0], w[0] + this.yyleng - l]), this.yyleng = this.yytext.length, this;
738
+ }, "unput"),
739
+ // When called from action, caches matched text and appends it on next action
740
+ more: /* @__PURE__ */ c(function() {
741
+ return this._more = !0, this;
742
+ }, "more"),
743
+ // 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.
744
+ reject: /* @__PURE__ */ c(function() {
745
+ if (this.options.backtrack_lexer)
746
+ this._backtrack = !0;
747
+ else
748
+ 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).
749
+ ` + this.showPosition(), {
750
+ text: "",
751
+ token: null,
752
+ line: this.yylineno
753
+ });
754
+ return this;
755
+ }, "reject"),
756
+ // retain first n characters of the match
757
+ less: /* @__PURE__ */ c(function(o) {
758
+ this.unput(this.match.slice(o));
759
+ }, "less"),
760
+ // displays already matched input, i.e. for error messages
761
+ pastInput: /* @__PURE__ */ c(function() {
762
+ var o = this.matched.substr(0, this.matched.length - this.match.length);
763
+ return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
764
+ }, "pastInput"),
765
+ // displays upcoming input, i.e. for error messages
766
+ upcomingInput: /* @__PURE__ */ c(function() {
767
+ var o = this.match;
768
+ return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
769
+ }, "upcomingInput"),
770
+ // displays the character position where the lexing error occurred, i.e. for error messages
771
+ showPosition: /* @__PURE__ */ c(function() {
772
+ var o = this.pastInput(), l = new Array(o.length + 1).join("-");
773
+ return o + this.upcomingInput() + `
774
+ ` + l + "^";
775
+ }, "showPosition"),
776
+ // test the lexed token: return FALSE when not a match, otherwise return token
777
+ test_match: /* @__PURE__ */ c(function(o, l) {
778
+ var y, g, w;
779
+ if (this.options.backtrack_lexer && (w = {
780
+ yylineno: this.yylineno,
781
+ yylloc: {
782
+ first_line: this.yylloc.first_line,
783
+ last_line: this.last_line,
784
+ first_column: this.yylloc.first_column,
785
+ last_column: this.yylloc.last_column
786
+ },
787
+ yytext: this.yytext,
788
+ match: this.match,
789
+ matches: this.matches,
790
+ matched: this.matched,
791
+ yyleng: this.yyleng,
792
+ offset: this.offset,
793
+ _more: this._more,
794
+ _input: this._input,
795
+ yy: this.yy,
796
+ conditionStack: this.conditionStack.slice(0),
797
+ done: this.done
798
+ }, this.options.ranges && (w.yylloc.range = this.yylloc.range.slice(0))), g = o[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
799
+ first_line: this.yylloc.last_line,
800
+ last_line: this.yylineno + 1,
801
+ first_column: this.yylloc.last_column,
802
+ last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
803
+ }, this.yytext += o[0], this.match += o[0], this.matches = o, 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(o[0].length), this.matched += o[0], y = this.performAction.call(this, this.yy, this, l, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), y)
804
+ return y;
805
+ if (this._backtrack) {
806
+ for (var s in w)
807
+ this[s] = w[s];
808
+ return !1;
809
+ }
810
+ return !1;
811
+ }, "test_match"),
812
+ // return next match in input
813
+ next: /* @__PURE__ */ c(function() {
814
+ if (this.done)
815
+ return this.EOF;
816
+ this._input || (this.done = !0);
817
+ var o, l, y, g;
818
+ this._more || (this.yytext = "", this.match = "");
819
+ for (var w = this._currentRules(), s = 0; s < w.length; s++)
820
+ if (y = this._input.match(this.rules[w[s]]), y && (!l || y[0].length > l[0].length)) {
821
+ if (l = y, g = s, this.options.backtrack_lexer) {
822
+ if (o = this.test_match(y, w[s]), o !== !1)
823
+ return o;
824
+ if (this._backtrack) {
825
+ l = !1;
826
+ continue;
827
+ } else
828
+ return !1;
829
+ } else if (!this.options.flex)
830
+ break;
831
+ }
832
+ return l ? (o = this.test_match(l, w[g]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
833
+ ` + this.showPosition(), {
834
+ text: "",
835
+ token: null,
836
+ line: this.yylineno
837
+ });
838
+ }, "next"),
839
+ // return next match that has a token
840
+ lex: /* @__PURE__ */ c(function() {
841
+ var l = this.next();
842
+ return l || this.lex();
843
+ }, "lex"),
844
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
845
+ begin: /* @__PURE__ */ c(function(l) {
846
+ this.conditionStack.push(l);
847
+ }, "begin"),
848
+ // pop the previously active lexer condition state off the condition stack
849
+ popState: /* @__PURE__ */ c(function() {
850
+ var l = this.conditionStack.length - 1;
851
+ return l > 0 ? this.conditionStack.pop() : this.conditionStack[0];
852
+ }, "popState"),
853
+ // produce the lexer rule set which is active for the currently active lexer condition state
854
+ _currentRules: /* @__PURE__ */ c(function() {
855
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
856
+ }, "_currentRules"),
857
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
858
+ topState: /* @__PURE__ */ c(function(l) {
859
+ return l = this.conditionStack.length - 1 - Math.abs(l || 0), l >= 0 ? this.conditionStack[l] : "INITIAL";
860
+ }, "topState"),
861
+ // alias for begin(condition)
862
+ pushState: /* @__PURE__ */ c(function(l) {
863
+ this.begin(l);
864
+ }, "pushState"),
865
+ // return the number of states currently on the stack
866
+ stateStackSize: /* @__PURE__ */ c(function() {
867
+ return this.conditionStack.length;
868
+ }, "stateStackSize"),
869
+ options: { "case-insensitive": !0 },
870
+ performAction: /* @__PURE__ */ c(function(l, y, g, w) {
871
+ switch (g) {
872
+ case 0:
873
+ return this.begin("open_directive"), "open_directive";
874
+ case 1:
875
+ return this.begin("acc_title"), 31;
876
+ case 2:
877
+ return this.popState(), "acc_title_value";
878
+ case 3:
879
+ return this.begin("acc_descr"), 33;
880
+ case 4:
881
+ return this.popState(), "acc_descr_value";
882
+ case 5:
883
+ this.begin("acc_descr_multiline");
884
+ break;
885
+ case 6:
886
+ this.popState();
887
+ break;
888
+ case 7:
889
+ return "acc_descr_multiline_value";
890
+ case 8:
891
+ break;
892
+ case 9:
893
+ break;
894
+ case 10:
895
+ break;
896
+ case 11:
897
+ return 10;
898
+ case 12:
899
+ break;
900
+ case 13:
901
+ break;
902
+ case 14:
903
+ this.begin("href");
904
+ break;
905
+ case 15:
906
+ this.popState();
907
+ break;
908
+ case 16:
909
+ return 43;
910
+ case 17:
911
+ this.begin("callbackname");
912
+ break;
913
+ case 18:
914
+ this.popState();
915
+ break;
916
+ case 19:
917
+ this.popState(), this.begin("callbackargs");
918
+ break;
919
+ case 20:
920
+ return 41;
921
+ case 21:
922
+ this.popState();
923
+ break;
924
+ case 22:
925
+ return 42;
926
+ case 23:
927
+ this.begin("click");
928
+ break;
929
+ case 24:
930
+ this.popState();
931
+ break;
932
+ case 25:
933
+ return 40;
934
+ case 26:
935
+ return 4;
936
+ case 27:
937
+ return 22;
938
+ case 28:
939
+ return 23;
940
+ case 29:
941
+ return 24;
942
+ case 30:
943
+ return 25;
944
+ case 31:
945
+ return 26;
946
+ case 32:
947
+ return 28;
948
+ case 33:
949
+ return 27;
950
+ case 34:
951
+ return 29;
952
+ case 35:
953
+ return 12;
954
+ case 36:
955
+ return 13;
956
+ case 37:
957
+ return 14;
958
+ case 38:
959
+ return 15;
960
+ case 39:
961
+ return 16;
962
+ case 40:
963
+ return 17;
964
+ case 41:
965
+ return 18;
966
+ case 42:
967
+ return 20;
968
+ case 43:
969
+ return 21;
970
+ case 44:
971
+ return "date";
972
+ case 45:
973
+ return 30;
974
+ case 46:
975
+ return "accDescription";
976
+ case 47:
977
+ return 36;
978
+ case 48:
979
+ return 38;
980
+ case 49:
981
+ return 39;
982
+ case 50:
983
+ return ":";
984
+ case 51:
985
+ return 6;
986
+ case 52:
987
+ return "INVALID";
988
+ }
989
+ }, "anonymous"),
990
+ rules: [/^(?:%%\{)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:weekend\s+friday\b)/i, /^(?:weekend\s+saturday\b)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^\n]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^\n]+)/i, /^(?:[^:\n]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
991
+ conditions: { acc_descr_multiline: { rules: [6, 7], inclusive: !1 }, acc_descr: { rules: [4], inclusive: !1 }, acc_title: { rules: [2], inclusive: !1 }, callbackargs: { rules: [21, 22], inclusive: !1 }, callbackname: { rules: [18, 19, 20], inclusive: !1 }, href: { rules: [15, 16], inclusive: !1 }, click: { rules: [24, 25], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 17, 23, 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], inclusive: !0 } }
992
+ };
993
+ return m;
994
+ })();
995
+ x.lexer = v;
996
+ function k() {
997
+ this.yy = {};
998
+ }
999
+ return c(k, "Parser"), k.prototype = x, x.Parser = k, new k();
1000
+ })();
1001
+ qt.parser = qt;
1002
+ var Vr = qt;
1003
+ G.extend(Mr);
1004
+ G.extend(Ar);
1005
+ G.extend(Or);
1006
+ var ge = { friday: 5, saturday: 6 }, tt = "", Xt = "", Ut = void 0, Zt = "", gt = [], pt = [], Qt = /* @__PURE__ */ new Map(), Kt = [], $t = [], mt = "", Jt = "", Ae = ["active", "done", "crit", "milestone", "vert"], te = [], vt = !1, ee = !1, re = "sunday", At = "saturday", Bt = 0, Rr = /* @__PURE__ */ c(function() {
1007
+ Kt = [], $t = [], mt = "", te = [], Mt = 0, Gt = void 0, Et = void 0, B = [], tt = "", Xt = "", Jt = "", Ut = void 0, Zt = "", gt = [], pt = [], vt = !1, ee = !1, Bt = 0, Qt = /* @__PURE__ */ new Map(), Ue(), re = "sunday", At = "saturday";
1008
+ }, "clear"), Hr = /* @__PURE__ */ c(function(t) {
1009
+ Xt = t;
1010
+ }, "setAxisFormat"), qr = /* @__PURE__ */ c(function() {
1011
+ return Xt;
1012
+ }, "getAxisFormat"), Br = /* @__PURE__ */ c(function(t) {
1013
+ Ut = t;
1014
+ }, "setTickInterval"), jr = /* @__PURE__ */ c(function() {
1015
+ return Ut;
1016
+ }, "getTickInterval"), Gr = /* @__PURE__ */ c(function(t) {
1017
+ Zt = t;
1018
+ }, "setTodayMarker"), Xr = /* @__PURE__ */ c(function() {
1019
+ return Zt;
1020
+ }, "getTodayMarker"), Ur = /* @__PURE__ */ c(function(t) {
1021
+ tt = t;
1022
+ }, "setDateFormat"), Zr = /* @__PURE__ */ c(function() {
1023
+ vt = !0;
1024
+ }, "enableInclusiveEndDates"), Qr = /* @__PURE__ */ c(function() {
1025
+ return vt;
1026
+ }, "endDatesAreInclusive"), Kr = /* @__PURE__ */ c(function() {
1027
+ ee = !0;
1028
+ }, "enableTopAxis"), Jr = /* @__PURE__ */ c(function() {
1029
+ return ee;
1030
+ }, "topAxisEnabled"), ti = /* @__PURE__ */ c(function(t) {
1031
+ Jt = t;
1032
+ }, "setDisplayMode"), ei = /* @__PURE__ */ c(function() {
1033
+ return Jt;
1034
+ }, "getDisplayMode"), ri = /* @__PURE__ */ c(function() {
1035
+ return tt;
1036
+ }, "getDateFormat"), ii = /* @__PURE__ */ c(function(t) {
1037
+ gt = t.toLowerCase().split(/[\s,]+/);
1038
+ }, "setIncludes"), ni = /* @__PURE__ */ c(function() {
1039
+ return gt;
1040
+ }, "getIncludes"), si = /* @__PURE__ */ c(function(t) {
1041
+ pt = t.toLowerCase().split(/[\s,]+/);
1042
+ }, "setExcludes"), ai = /* @__PURE__ */ c(function() {
1043
+ return pt;
1044
+ }, "getExcludes"), oi = /* @__PURE__ */ c(function() {
1045
+ return Qt;
1046
+ }, "getLinks"), ci = /* @__PURE__ */ c(function(t) {
1047
+ mt = t, Kt.push(t);
1048
+ }, "addSection"), li = /* @__PURE__ */ c(function() {
1049
+ return Kt;
1050
+ }, "getSections"), ui = /* @__PURE__ */ c(function() {
1051
+ let t = pe();
1052
+ const r = 10;
1053
+ let i = 0;
1054
+ for (; !t && i < r; )
1055
+ t = pe(), i++;
1056
+ return $t = B, $t;
1057
+ }, "getTasks"), Fe = /* @__PURE__ */ c(function(t, r, i, n) {
1058
+ const a = t.format(r.trim()), f = t.format("YYYY-MM-DD");
1059
+ return n.includes(a) || n.includes(f) ? !1 : i.includes("weekends") && (t.isoWeekday() === ge[At] || t.isoWeekday() === ge[At] + 1) || i.includes(t.format("dddd").toLowerCase()) ? !0 : i.includes(a) || i.includes(f);
1060
+ }, "isInvalidDate"), di = /* @__PURE__ */ c(function(t) {
1061
+ re = t;
1062
+ }, "setWeekday"), fi = /* @__PURE__ */ c(function() {
1063
+ return re;
1064
+ }, "getWeekday"), hi = /* @__PURE__ */ c(function(t) {
1065
+ At = t;
1066
+ }, "setWeekend"), Ye = /* @__PURE__ */ c(function(t, r, i, n) {
1067
+ if (!i.length || t.manualEndTime)
1068
+ return;
1069
+ let a;
1070
+ t.startTime instanceof Date ? a = G(t.startTime) : a = G(t.startTime, r, !0), a = a.add(1, "d");
1071
+ let f;
1072
+ t.endTime instanceof Date ? f = G(t.endTime) : f = G(t.endTime, r, !0);
1073
+ const [d, T] = mi(
1074
+ a,
1075
+ f,
1076
+ r,
1077
+ i,
1078
+ n
1079
+ );
1080
+ t.endTime = d.toDate(), t.renderEndTime = T;
1081
+ }, "checkTaskDates"), mi = /* @__PURE__ */ c(function(t, r, i, n, a) {
1082
+ let f = !1, d = null;
1083
+ for (; t <= r; )
1084
+ f || (d = r.toDate()), f = Fe(t, i, n, a), f && (r = r.add(1, "d")), t = t.add(1, "d");
1085
+ return [r, d];
1086
+ }, "fixTaskDates"), jt = /* @__PURE__ */ c(function(t, r, i) {
1087
+ if (i = i.trim(), (/* @__PURE__ */ c((T) => {
1088
+ const E = T.trim();
1089
+ return E === "x" || E === "X";
1090
+ }, "isTimestampFormat"))(r) && /^\d+$/.test(i))
1091
+ return new Date(Number(i));
1092
+ const f = /^after\s+(?<ids>[\d\w- ]+)/.exec(i);
1093
+ if (f !== null) {
1094
+ let T = null;
1095
+ for (const A of f.groups.ids.split(" ")) {
1096
+ let b = ct(A);
1097
+ b !== void 0 && (!T || b.endTime > T.endTime) && (T = b);
1098
+ }
1099
+ if (T)
1100
+ return T.endTime;
1101
+ const E = /* @__PURE__ */ new Date();
1102
+ return E.setHours(0, 0, 0, 0), E;
1103
+ }
1104
+ let d = G(i, r.trim(), !0);
1105
+ if (d.isValid())
1106
+ return d.toDate();
1107
+ {
1108
+ ot.debug("Invalid date:" + i), ot.debug("With date format:" + r.trim());
1109
+ const T = new Date(i);
1110
+ if (T === void 0 || isNaN(T.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously
1111
+ // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.
1112
+ // This can cause virtually infinite loops while rendering, so for the
1113
+ // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as
1114
+ // invalid.
1115
+ T.getFullYear() < -1e4 || T.getFullYear() > 1e4)
1116
+ throw new Error("Invalid date:" + i);
1117
+ return T;
1118
+ }
1119
+ }, "getStartDate"), Le = /* @__PURE__ */ c(function(t) {
1120
+ const r = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());
1121
+ return r !== null ? [Number.parseFloat(r[1]), r[2]] : [NaN, "ms"];
1122
+ }, "parseDuration"), Oe = /* @__PURE__ */ c(function(t, r, i, n = !1) {
1123
+ i = i.trim();
1124
+ const f = /^until\s+(?<ids>[\d\w- ]+)/.exec(i);
1125
+ if (f !== null) {
1126
+ let b = null;
1127
+ for (const S of f.groups.ids.split(" ")) {
1128
+ let D = ct(S);
1129
+ D !== void 0 && (!b || D.startTime < b.startTime) && (b = D);
1130
+ }
1131
+ if (b)
1132
+ return b.startTime;
1133
+ const L = /* @__PURE__ */ new Date();
1134
+ return L.setHours(0, 0, 0, 0), L;
1135
+ }
1136
+ let d = G(i, r.trim(), !0);
1137
+ if (d.isValid())
1138
+ return n && (d = d.add(1, "d")), d.toDate();
1139
+ let T = G(t);
1140
+ const [E, A] = Le(i);
1141
+ if (!Number.isNaN(E)) {
1142
+ const b = T.add(E, A);
1143
+ b.isValid() && (T = b);
1144
+ }
1145
+ return T.toDate();
1146
+ }, "getEndDate"), Mt = 0, ht = /* @__PURE__ */ c(function(t) {
1147
+ return t === void 0 ? (Mt = Mt + 1, "task" + Mt) : t;
1148
+ }, "parseId"), ki = /* @__PURE__ */ c(function(t, r) {
1149
+ let i;
1150
+ r.substr(0, 1) === ":" ? i = r.substr(1, r.length) : i = r;
1151
+ const n = i.split(","), a = {};
1152
+ ie(n, a, Ae);
1153
+ for (let d = 0; d < n.length; d++)
1154
+ n[d] = n[d].trim();
1155
+ let f = "";
1156
+ switch (n.length) {
1157
+ case 1:
1158
+ a.id = ht(), a.startTime = t.endTime, f = n[0];
1159
+ break;
1160
+ case 2:
1161
+ a.id = ht(), a.startTime = jt(void 0, tt, n[0]), f = n[1];
1162
+ break;
1163
+ case 3:
1164
+ a.id = ht(n[0]), a.startTime = jt(void 0, tt, n[1]), f = n[2];
1165
+ break;
1166
+ }
1167
+ return f && (a.endTime = Oe(a.startTime, tt, f, vt), a.manualEndTime = G(f, "YYYY-MM-DD", !0).isValid(), Ye(a, tt, pt, gt)), a;
1168
+ }, "compileData"), yi = /* @__PURE__ */ c(function(t, r) {
1169
+ let i;
1170
+ r.substr(0, 1) === ":" ? i = r.substr(1, r.length) : i = r;
1171
+ const n = i.split(","), a = {};
1172
+ ie(n, a, Ae);
1173
+ for (let f = 0; f < n.length; f++)
1174
+ n[f] = n[f].trim();
1175
+ switch (n.length) {
1176
+ case 1:
1177
+ a.id = ht(), a.startTime = {
1178
+ type: "prevTaskEnd",
1179
+ id: t
1180
+ }, a.endTime = {
1181
+ data: n[0]
1182
+ };
1183
+ break;
1184
+ case 2:
1185
+ a.id = ht(), a.startTime = {
1186
+ type: "getStartDate",
1187
+ startData: n[0]
1188
+ }, a.endTime = {
1189
+ data: n[1]
1190
+ };
1191
+ break;
1192
+ case 3:
1193
+ a.id = ht(n[0]), a.startTime = {
1194
+ type: "getStartDate",
1195
+ startData: n[1]
1196
+ }, a.endTime = {
1197
+ data: n[2]
1198
+ };
1199
+ break;
1200
+ }
1201
+ return a;
1202
+ }, "parseData"), Gt, Et, B = [], We = {}, gi = /* @__PURE__ */ c(function(t, r) {
1203
+ const i = {
1204
+ section: mt,
1205
+ type: mt,
1206
+ processed: !1,
1207
+ manualEndTime: !1,
1208
+ renderEndTime: null,
1209
+ raw: { data: r },
1210
+ task: t,
1211
+ classes: []
1212
+ }, n = yi(Et, r);
1213
+ i.raw.startTime = n.startTime, i.raw.endTime = n.endTime, i.id = n.id, i.prevTaskId = Et, i.active = n.active, i.done = n.done, i.crit = n.crit, i.milestone = n.milestone, i.vert = n.vert, i.order = Bt, Bt++;
1214
+ const a = B.push(i);
1215
+ Et = i.id, We[i.id] = a - 1;
1216
+ }, "addTask"), ct = /* @__PURE__ */ c(function(t) {
1217
+ const r = We[t];
1218
+ return B[r];
1219
+ }, "findTaskById"), pi = /* @__PURE__ */ c(function(t, r) {
1220
+ const i = {
1221
+ section: mt,
1222
+ type: mt,
1223
+ description: t,
1224
+ task: t,
1225
+ classes: []
1226
+ }, n = ki(Gt, r);
1227
+ i.startTime = n.startTime, i.endTime = n.endTime, i.id = n.id, i.active = n.active, i.done = n.done, i.crit = n.crit, i.milestone = n.milestone, i.vert = n.vert, Gt = i, $t.push(i);
1228
+ }, "addTaskOrg"), pe = /* @__PURE__ */ c(function() {
1229
+ const t = /* @__PURE__ */ c(function(i) {
1230
+ const n = B[i];
1231
+ let a = "";
1232
+ switch (B[i].raw.startTime.type) {
1233
+ case "prevTaskEnd": {
1234
+ const f = ct(n.prevTaskId);
1235
+ n.startTime = f.endTime;
1236
+ break;
1237
+ }
1238
+ case "getStartDate":
1239
+ a = jt(void 0, tt, B[i].raw.startTime.startData), a && (B[i].startTime = a);
1240
+ break;
1241
+ }
1242
+ return B[i].startTime && (B[i].endTime = Oe(
1243
+ B[i].startTime,
1244
+ tt,
1245
+ B[i].raw.endTime.data,
1246
+ vt
1247
+ ), B[i].endTime && (B[i].processed = !0, B[i].manualEndTime = G(
1248
+ B[i].raw.endTime.data,
1249
+ "YYYY-MM-DD",
1250
+ !0
1251
+ ).isValid(), Ye(B[i], tt, pt, gt))), B[i].processed;
1252
+ }, "compileTask");
1253
+ let r = !0;
1254
+ for (const [i, n] of B.entries())
1255
+ t(i), r = r && n.processed;
1256
+ return r;
1257
+ }, "compileTasks"), vi = /* @__PURE__ */ c(function(t, r) {
1258
+ let i = r;
1259
+ dt().securityLevel !== "loose" && (i = Xe.sanitizeUrl(r)), t.split(",").forEach(function(n) {
1260
+ ct(n) !== void 0 && (Ne(n, () => {
1261
+ window.open(i, "_self");
1262
+ }), Qt.set(n, i));
1263
+ }), Pe(t, "clickable");
1264
+ }, "setLink"), Pe = /* @__PURE__ */ c(function(t, r) {
1265
+ t.split(",").forEach(function(i) {
1266
+ let n = ct(i);
1267
+ n !== void 0 && n.classes.push(r);
1268
+ });
1269
+ }, "setClass"), xi = /* @__PURE__ */ c(function(t, r, i) {
1270
+ if (dt().securityLevel !== "loose" || r === void 0)
1271
+ return;
1272
+ let n = [];
1273
+ if (typeof i == "string") {
1274
+ n = i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
1275
+ for (let f = 0; f < n.length; f++) {
1276
+ let d = n[f].trim();
1277
+ d.startsWith('"') && d.endsWith('"') && (d = d.substr(1, d.length - 2)), n[f] = d;
1278
+ }
1279
+ }
1280
+ n.length === 0 && n.push(t), ct(t) !== void 0 && Ne(t, () => {
1281
+ Ze.runFunc(r, ...n);
1282
+ });
1283
+ }, "setClickFun"), Ne = /* @__PURE__ */ c(function(t, r) {
1284
+ te.push(
1285
+ function() {
1286
+ const i = document.querySelector(`[id="${t}"]`);
1287
+ i !== null && i.addEventListener("click", function() {
1288
+ r();
1289
+ });
1290
+ },
1291
+ function() {
1292
+ const i = document.querySelector(`[id="${t}-text"]`);
1293
+ i !== null && i.addEventListener("click", function() {
1294
+ r();
1295
+ });
1296
+ }
1297
+ );
1298
+ }, "pushFun"), Ti = /* @__PURE__ */ c(function(t, r, i) {
1299
+ t.split(",").forEach(function(n) {
1300
+ xi(n, r, i);
1301
+ }), Pe(t, "clickable");
1302
+ }, "setClickEvent"), bi = /* @__PURE__ */ c(function(t) {
1303
+ te.forEach(function(r) {
1304
+ r(t);
1305
+ });
1306
+ }, "bindFunctions"), wi = {
1307
+ getConfig: /* @__PURE__ */ c(() => dt().gantt, "getConfig"),
1308
+ clear: Rr,
1309
+ setDateFormat: Ur,
1310
+ getDateFormat: ri,
1311
+ enableInclusiveEndDates: Zr,
1312
+ endDatesAreInclusive: Qr,
1313
+ enableTopAxis: Kr,
1314
+ topAxisEnabled: Jr,
1315
+ setAxisFormat: Hr,
1316
+ getAxisFormat: qr,
1317
+ setTickInterval: Br,
1318
+ getTickInterval: jr,
1319
+ setTodayMarker: Gr,
1320
+ getTodayMarker: Xr,
1321
+ setAccTitle: Be,
1322
+ getAccTitle: qe,
1323
+ setDiagramTitle: He,
1324
+ getDiagramTitle: Re,
1325
+ setDisplayMode: ti,
1326
+ getDisplayMode: ei,
1327
+ setAccDescription: Ve,
1328
+ getAccDescription: ze,
1329
+ addSection: ci,
1330
+ getSections: li,
1331
+ getTasks: ui,
1332
+ addTask: gi,
1333
+ findTaskById: ct,
1334
+ addTaskOrg: pi,
1335
+ setIncludes: ii,
1336
+ getIncludes: ni,
1337
+ setExcludes: si,
1338
+ getExcludes: ai,
1339
+ setClickEvent: Ti,
1340
+ setLink: vi,
1341
+ getLinks: oi,
1342
+ bindFunctions: bi,
1343
+ parseDuration: Le,
1344
+ isInvalidDate: Fe,
1345
+ setWeekday: di,
1346
+ getWeekday: fi,
1347
+ setWeekend: hi
1348
+ };
1349
+ function ie(t, r, i) {
1350
+ let n = !0;
1351
+ for (; n; )
1352
+ n = !1, i.forEach(function(a) {
1353
+ const f = "^\\s*" + a + "\\s*$", d = new RegExp(f);
1354
+ t[0].match(d) && (r[a] = !0, t.shift(1), n = !0);
1355
+ });
1356
+ }
1357
+ c(ie, "getTaskTags");
1358
+ G.extend(zr);
1359
+ var _i = /* @__PURE__ */ c(function() {
1360
+ ot.debug("Something is calling, setConf, remove the call");
1361
+ }, "setConf"), ve = {
1362
+ monday: ar,
1363
+ tuesday: sr,
1364
+ wednesday: nr,
1365
+ thursday: ir,
1366
+ friday: rr,
1367
+ saturday: er,
1368
+ sunday: tr
1369
+ }, Di = /* @__PURE__ */ c((t, r) => {
1370
+ let i = [...t].map(() => -1 / 0), n = [...t].sort((f, d) => f.startTime - d.startTime || f.order - d.order), a = 0;
1371
+ for (const f of n)
1372
+ for (let d = 0; d < i.length; d++)
1373
+ if (f.startTime >= i[d]) {
1374
+ i[d] = f.endTime, f.order = d + r, d > a && (a = d);
1375
+ break;
1376
+ }
1377
+ return a;
1378
+ }, "getMaxIntersections"), rt, Vt = 1e4, Ci = /* @__PURE__ */ c(function(t, r, i, n) {
1379
+ const a = dt().gantt, f = dt().securityLevel;
1380
+ let d;
1381
+ f === "sandbox" && (d = Tt("#i" + r));
1382
+ const T = f === "sandbox" ? Tt(d.nodes()[0].contentDocument.body) : Tt("body"), E = f === "sandbox" ? d.nodes()[0].contentDocument : document, A = E.getElementById(r);
1383
+ rt = A.parentElement.offsetWidth, rt === void 0 && (rt = 1200), a.useWidth !== void 0 && (rt = a.useWidth);
1384
+ const b = n.db.getTasks();
1385
+ let L = [];
1386
+ for (const u of b)
1387
+ L.push(u.type);
1388
+ L = h(L);
1389
+ const S = {};
1390
+ let D = 2 * a.topPadding;
1391
+ if (n.db.getDisplayMode() === "compact" || a.displayMode === "compact") {
1392
+ const u = {};
1393
+ for (const v of b)
1394
+ u[v.section] === void 0 ? u[v.section] = [v] : u[v.section].push(v);
1395
+ let x = 0;
1396
+ for (const v of Object.keys(u)) {
1397
+ const k = Di(u[v], x) + 1;
1398
+ x += k, D += k * (a.barHeight + a.barGap), S[v] = k;
1399
+ }
1400
+ } else {
1401
+ D += b.length * (a.barHeight + a.barGap);
1402
+ for (const u of L)
1403
+ S[u] = b.filter((x) => x.type === u).length;
1404
+ }
1405
+ A.setAttribute("viewBox", "0 0 " + rt + " " + D);
1406
+ const V = T.select(`[id="${r}"]`), I = Qe().domain([
1407
+ Ke(b, function(u) {
1408
+ return u.startTime;
1409
+ }),
1410
+ Je(b, function(u) {
1411
+ return u.endTime;
1412
+ })
1413
+ ]).rangeRound([0, rt - a.leftPadding - a.rightPadding]);
1414
+ function C(u, x) {
1415
+ const v = u.startTime, k = x.startTime;
1416
+ let m = 0;
1417
+ return v > k ? m = 1 : v < k && (m = -1), m;
1418
+ }
1419
+ c(C, "taskCompare"), b.sort(C), M(b, rt, D), je(V, D, rt, a.useMaxWidth), V.append("text").text(n.db.getDiagramTitle()).attr("x", rt / 2).attr("y", a.titleTopMargin).attr("class", "titleText");
1420
+ function M(u, x, v) {
1421
+ const k = a.barHeight, m = k + a.barGap, o = a.topPadding, l = a.leftPadding, y = or().domain([0, L.length]).range(["#00B9FA", "#F95002"]).interpolate(yr);
1422
+ Y(
1423
+ m,
1424
+ o,
1425
+ l,
1426
+ x,
1427
+ v,
1428
+ u,
1429
+ n.db.getExcludes(),
1430
+ n.db.getIncludes()
1431
+ ), H(l, o, x, v), W(u, m, o, l, k, y, x), $(m, o), p(l, o, x, v);
1432
+ }
1433
+ c(M, "makeGantt");
1434
+ function W(u, x, v, k, m, o, l) {
1435
+ u.sort((e, _) => e.vert === _.vert ? 0 : e.vert ? 1 : -1);
1436
+ const g = [...new Set(u.map((e) => e.order))].map((e) => u.find((_) => _.order === e));
1437
+ V.append("g").selectAll("rect").data(g).enter().append("rect").attr("x", 0).attr("y", function(e, _) {
1438
+ return _ = e.order, _ * x + v - 2;
1439
+ }).attr("width", function() {
1440
+ return l - a.rightPadding / 2;
1441
+ }).attr("height", x).attr("class", function(e) {
1442
+ for (const [_, N] of L.entries())
1443
+ if (e.type === N)
1444
+ return "section section" + _ % a.numberSectionStyles;
1445
+ return "section section0";
1446
+ }).enter();
1447
+ const w = V.append("g").selectAll("rect").data(u).enter(), s = n.db.getLinks();
1448
+ if (w.append("rect").attr("id", function(e) {
1449
+ return e.id;
1450
+ }).attr("rx", 3).attr("ry", 3).attr("x", function(e) {
1451
+ return e.milestone ? I(e.startTime) + k + 0.5 * (I(e.endTime) - I(e.startTime)) - 0.5 * m : I(e.startTime) + k;
1452
+ }).attr("y", function(e, _) {
1453
+ return _ = e.order, e.vert ? a.gridLineStartPadding : _ * x + v;
1454
+ }).attr("width", function(e) {
1455
+ return e.milestone ? m : e.vert ? 0.08 * m : I(e.renderEndTime || e.endTime) - I(e.startTime);
1456
+ }).attr("height", function(e) {
1457
+ return e.vert ? b.length * (a.barHeight + a.barGap) + a.barHeight * 2 : m;
1458
+ }).attr("transform-origin", function(e, _) {
1459
+ return _ = e.order, (I(e.startTime) + k + 0.5 * (I(e.endTime) - I(e.startTime))).toString() + "px " + (_ * x + v + 0.5 * m).toString() + "px";
1460
+ }).attr("class", function(e) {
1461
+ const _ = "task";
1462
+ let N = "";
1463
+ e.classes.length > 0 && (N = e.classes.join(" "));
1464
+ let P = 0;
1465
+ for (const [j, F] of L.entries())
1466
+ e.type === F && (P = j % a.numberSectionStyles);
1467
+ let O = "";
1468
+ return e.active ? e.crit ? O += " activeCrit" : O = " active" : e.done ? e.crit ? O = " doneCrit" : O = " done" : e.crit && (O += " crit"), O.length === 0 && (O = " task"), e.milestone && (O = " milestone " + O), e.vert && (O = " vert " + O), O += P, O += " " + N, _ + O;
1469
+ }), w.append("text").attr("id", function(e) {
1470
+ return e.id + "-text";
1471
+ }).text(function(e) {
1472
+ return e.task;
1473
+ }).attr("font-size", a.fontSize).attr("x", function(e) {
1474
+ let _ = I(e.startTime), N = I(e.renderEndTime || e.endTime);
1475
+ if (e.milestone && (_ += 0.5 * (I(e.endTime) - I(e.startTime)) - 0.5 * m, N = _ + m), e.vert)
1476
+ return I(e.startTime) + k;
1477
+ const P = this.getBBox().width;
1478
+ return P > N - _ ? N + P + 1.5 * a.leftPadding > l ? _ + k - 5 : N + k + 5 : (N - _) / 2 + _ + k;
1479
+ }).attr("y", function(e, _) {
1480
+ return e.vert ? a.gridLineStartPadding + b.length * (a.barHeight + a.barGap) + 60 : (_ = e.order, _ * x + a.barHeight / 2 + (a.fontSize / 2 - 2) + v);
1481
+ }).attr("text-height", m).attr("class", function(e) {
1482
+ const _ = I(e.startTime);
1483
+ let N = I(e.endTime);
1484
+ e.milestone && (N = _ + m);
1485
+ const P = this.getBBox().width;
1486
+ let O = "";
1487
+ e.classes.length > 0 && (O = e.classes.join(" "));
1488
+ let j = 0;
1489
+ for (const [Q, nt] of L.entries())
1490
+ e.type === nt && (j = Q % a.numberSectionStyles);
1491
+ let F = "";
1492
+ return e.active && (e.crit ? F = "activeCritText" + j : F = "activeText" + j), e.done ? e.crit ? F = F + " doneCritText" + j : F = F + " doneText" + j : e.crit && (F = F + " critText" + j), e.milestone && (F += " milestoneText"), e.vert && (F += " vertText"), P > N - _ ? N + P + 1.5 * a.leftPadding > l ? O + " taskTextOutsideLeft taskTextOutside" + j + " " + F : O + " taskTextOutsideRight taskTextOutside" + j + " " + F + " width-" + P : O + " taskText taskText" + j + " " + F + " width-" + P;
1493
+ }), dt().securityLevel === "sandbox") {
1494
+ let e;
1495
+ e = Tt("#i" + r);
1496
+ const _ = e.nodes()[0].contentDocument;
1497
+ w.filter(function(N) {
1498
+ return s.has(N.id);
1499
+ }).each(function(N) {
1500
+ var P = _.querySelector("#" + N.id), O = _.querySelector("#" + N.id + "-text");
1501
+ const j = P.parentNode;
1502
+ var F = _.createElement("a");
1503
+ F.setAttribute("xlink:href", s.get(N.id)), F.setAttribute("target", "_top"), j.appendChild(F), F.appendChild(P), F.appendChild(O);
1504
+ });
1505
+ }
1506
+ }
1507
+ c(W, "drawRects");
1508
+ function Y(u, x, v, k, m, o, l, y) {
1509
+ if (l.length === 0 && y.length === 0)
1510
+ return;
1511
+ let g, w;
1512
+ for (const { startTime: P, endTime: O } of o)
1513
+ (g === void 0 || P < g) && (g = P), (w === void 0 || O > w) && (w = O);
1514
+ if (!g || !w)
1515
+ return;
1516
+ if (G(w).diff(G(g), "year") > 5) {
1517
+ ot.warn(
1518
+ "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days."
1519
+ );
1520
+ return;
1521
+ }
1522
+ const s = n.db.getDateFormat(), z = [];
1523
+ let e = null, _ = G(g);
1524
+ for (; _.valueOf() <= w; )
1525
+ n.db.isInvalidDate(_, s, l, y) ? e ? e.end = _ : e = {
1526
+ start: _,
1527
+ end: _
1528
+ } : e && (z.push(e), e = null), _ = _.add(1, "d");
1529
+ V.append("g").selectAll("rect").data(z).enter().append("rect").attr("id", (P) => "exclude-" + P.start.format("YYYY-MM-DD")).attr("x", (P) => I(P.start.startOf("day")) + v).attr("y", a.gridLineStartPadding).attr("width", (P) => I(P.end.endOf("day")) - I(P.start.startOf("day"))).attr("height", m - x - a.gridLineStartPadding).attr("transform-origin", function(P, O) {
1530
+ return (I(P.start) + v + 0.5 * (I(P.end) - I(P.start))).toString() + "px " + (O * u + 0.5 * m).toString() + "px";
1531
+ }).attr("class", "exclude-range");
1532
+ }
1533
+ c(Y, "drawExcludeDays");
1534
+ function R(u, x, v, k) {
1535
+ if (v <= 0 || u > x)
1536
+ return 1 / 0;
1537
+ const m = x - u, o = G.duration({ [k ?? "day"]: v }).asMilliseconds();
1538
+ return o <= 0 ? 1 / 0 : Math.ceil(m / o);
1539
+ }
1540
+ c(R, "getEstimatedTickCount");
1541
+ function H(u, x, v, k) {
1542
+ const m = n.db.getDateFormat(), o = n.db.getAxisFormat();
1543
+ let l;
1544
+ o ? l = o : m === "D" ? l = "%d" : l = a.axisFormat ?? "%Y-%m-%d";
1545
+ let y = _r(I).tickSize(-k + x + a.gridLineStartPadding).tickFormat(se(l));
1546
+ const w = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(
1547
+ n.db.getTickInterval() || a.tickInterval
1548
+ );
1549
+ if (w !== null) {
1550
+ const s = parseInt(w[1], 10);
1551
+ if (isNaN(s) || s <= 0)
1552
+ ot.warn(
1553
+ `Invalid tick interval value: "${w[1]}". Skipping custom tick interval.`
1554
+ );
1555
+ else {
1556
+ const z = w[2], e = n.db.getWeekday() || a.weekday, _ = I.domain(), N = _[0], P = _[1], O = R(N, P, s, z);
1557
+ if (O > Vt)
1558
+ ot.warn(
1559
+ `The tick interval "${s}${z}" would generate ${O} ticks, which exceeds the maximum allowed (${Vt}). This may indicate an invalid date or time range. Skipping custom tick interval.`
1560
+ );
1561
+ else
1562
+ switch (z) {
1563
+ case "millisecond":
1564
+ y.ticks(de.every(s));
1565
+ break;
1566
+ case "second":
1567
+ y.ticks(ue.every(s));
1568
+ break;
1569
+ case "minute":
1570
+ y.ticks(le.every(s));
1571
+ break;
1572
+ case "hour":
1573
+ y.ticks(ce.every(s));
1574
+ break;
1575
+ case "day":
1576
+ y.ticks(oe.every(s));
1577
+ break;
1578
+ case "week":
1579
+ y.ticks(ve[e].every(s));
1580
+ break;
1581
+ case "month":
1582
+ y.ticks(ae.every(s));
1583
+ break;
1584
+ }
1585
+ }
1586
+ }
1587
+ if (V.append("g").attr("class", "grid").attr("transform", "translate(" + u + ", " + (k - 50) + ")").call(y).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), n.db.topAxisEnabled() || a.topAxis) {
1588
+ let s = wr(I).tickSize(-k + x + a.gridLineStartPadding).tickFormat(se(l));
1589
+ if (w !== null) {
1590
+ const z = parseInt(w[1], 10);
1591
+ if (isNaN(z) || z <= 0)
1592
+ ot.warn(
1593
+ `Invalid tick interval value: "${w[1]}". Skipping custom tick interval.`
1594
+ );
1595
+ else {
1596
+ const e = w[2], _ = n.db.getWeekday() || a.weekday, N = I.domain(), P = N[0], O = N[1];
1597
+ if (R(P, O, z, e) <= Vt)
1598
+ switch (e) {
1599
+ case "millisecond":
1600
+ s.ticks(de.every(z));
1601
+ break;
1602
+ case "second":
1603
+ s.ticks(ue.every(z));
1604
+ break;
1605
+ case "minute":
1606
+ s.ticks(le.every(z));
1607
+ break;
1608
+ case "hour":
1609
+ s.ticks(ce.every(z));
1610
+ break;
1611
+ case "day":
1612
+ s.ticks(oe.every(z));
1613
+ break;
1614
+ case "week":
1615
+ s.ticks(ve[_].every(z));
1616
+ break;
1617
+ case "month":
1618
+ s.ticks(ae.every(z));
1619
+ break;
1620
+ }
1621
+ }
1622
+ }
1623
+ V.append("g").attr("class", "grid").attr("transform", "translate(" + u + ", " + x + ")").call(s).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
1624
+ }
1625
+ }
1626
+ c(H, "makeGrid");
1627
+ function $(u, x) {
1628
+ let v = 0;
1629
+ const k = Object.keys(S).map((m) => [m, S[m]]);
1630
+ V.append("g").selectAll("text").data(k).enter().append(function(m) {
1631
+ const o = m[0].split(Ge.lineBreakRegex), l = -(o.length - 1) / 2, y = E.createElementNS("http://www.w3.org/2000/svg", "text");
1632
+ y.setAttribute("dy", l + "em");
1633
+ for (const [g, w] of o.entries()) {
1634
+ const s = E.createElementNS("http://www.w3.org/2000/svg", "tspan");
1635
+ s.setAttribute("alignment-baseline", "central"), s.setAttribute("x", "10"), g > 0 && s.setAttribute("dy", "1em"), s.textContent = w, y.appendChild(s);
1636
+ }
1637
+ return y;
1638
+ }).attr("x", 10).attr("y", function(m, o) {
1639
+ if (o > 0)
1640
+ for (let l = 0; l < o; l++)
1641
+ return v += k[o - 1][1], m[1] * u / 2 + v * u + x;
1642
+ else
1643
+ return m[1] * u / 2 + x;
1644
+ }).attr("font-size", a.sectionFontSize).attr("class", function(m) {
1645
+ for (const [o, l] of L.entries())
1646
+ if (m[0] === l)
1647
+ return "sectionTitle sectionTitle" + o % a.numberSectionStyles;
1648
+ return "sectionTitle";
1649
+ });
1650
+ }
1651
+ c($, "vertLabels");
1652
+ function p(u, x, v, k) {
1653
+ const m = n.db.getTodayMarker();
1654
+ if (m === "off")
1655
+ return;
1656
+ const o = V.append("g").attr("class", "today"), l = /* @__PURE__ */ new Date(), y = o.append("line");
1657
+ y.attr("x1", I(l) + u).attr("x2", I(l) + u).attr("y1", a.titleTopMargin).attr("y2", k - a.titleTopMargin).attr("class", "today"), m !== "" && y.attr("style", m.replace(/,/g, ";"));
1658
+ }
1659
+ c(p, "drawToday");
1660
+ function h(u) {
1661
+ const x = {}, v = [];
1662
+ for (let k = 0, m = u.length; k < m; ++k)
1663
+ Object.prototype.hasOwnProperty.call(x, u[k]) || (x[u[k]] = !0, v.push(u[k]));
1664
+ return v;
1665
+ }
1666
+ c(h, "checkUnique");
1667
+ }, "draw"), Si = {
1668
+ setConf: _i,
1669
+ draw: Ci
1670
+ }, Mi = /* @__PURE__ */ c((t) => `
1671
+ .mermaid-main-font {
1672
+ font-family: ${t.fontFamily};
1673
+ }
1674
+
1675
+ .exclude-range {
1676
+ fill: ${t.excludeBkgColor};
1677
+ }
1678
+
1679
+ .section {
1680
+ stroke: none;
1681
+ opacity: 0.2;
1682
+ }
1683
+
1684
+ .section0 {
1685
+ fill: ${t.sectionBkgColor};
1686
+ }
1687
+
1688
+ .section2 {
1689
+ fill: ${t.sectionBkgColor2};
1690
+ }
1691
+
1692
+ .section1,
1693
+ .section3 {
1694
+ fill: ${t.altSectionBkgColor};
1695
+ opacity: 0.2;
1696
+ }
1697
+
1698
+ .sectionTitle0 {
1699
+ fill: ${t.titleColor};
1700
+ }
1701
+
1702
+ .sectionTitle1 {
1703
+ fill: ${t.titleColor};
1704
+ }
1705
+
1706
+ .sectionTitle2 {
1707
+ fill: ${t.titleColor};
1708
+ }
1709
+
1710
+ .sectionTitle3 {
1711
+ fill: ${t.titleColor};
1712
+ }
1713
+
1714
+ .sectionTitle {
1715
+ text-anchor: start;
1716
+ font-family: ${t.fontFamily};
1717
+ }
1718
+
1719
+
1720
+ /* Grid and axis */
1721
+
1722
+ .grid .tick {
1723
+ stroke: ${t.gridColor};
1724
+ opacity: 0.8;
1725
+ shape-rendering: crispEdges;
1726
+ }
1727
+
1728
+ .grid .tick text {
1729
+ font-family: ${t.fontFamily};
1730
+ fill: ${t.textColor};
1731
+ }
1732
+
1733
+ .grid path {
1734
+ stroke-width: 0;
1735
+ }
1736
+
1737
+
1738
+ /* Today line */
1739
+
1740
+ .today {
1741
+ fill: none;
1742
+ stroke: ${t.todayLineColor};
1743
+ stroke-width: 2px;
1744
+ }
1745
+
1746
+
1747
+ /* Task styling */
1748
+
1749
+ /* Default task */
1750
+
1751
+ .task {
1752
+ stroke-width: 2;
1753
+ }
1754
+
1755
+ .taskText {
1756
+ text-anchor: middle;
1757
+ font-family: ${t.fontFamily};
1758
+ }
1759
+
1760
+ .taskTextOutsideRight {
1761
+ fill: ${t.taskTextDarkColor};
1762
+ text-anchor: start;
1763
+ font-family: ${t.fontFamily};
1764
+ }
1765
+
1766
+ .taskTextOutsideLeft {
1767
+ fill: ${t.taskTextDarkColor};
1768
+ text-anchor: end;
1769
+ }
1770
+
1771
+
1772
+ /* Special case clickable */
1773
+
1774
+ .task.clickable {
1775
+ cursor: pointer;
1776
+ }
1777
+
1778
+ .taskText.clickable {
1779
+ cursor: pointer;
1780
+ fill: ${t.taskTextClickableColor} !important;
1781
+ font-weight: bold;
1782
+ }
1783
+
1784
+ .taskTextOutsideLeft.clickable {
1785
+ cursor: pointer;
1786
+ fill: ${t.taskTextClickableColor} !important;
1787
+ font-weight: bold;
1788
+ }
1789
+
1790
+ .taskTextOutsideRight.clickable {
1791
+ cursor: pointer;
1792
+ fill: ${t.taskTextClickableColor} !important;
1793
+ font-weight: bold;
1794
+ }
1795
+
1796
+
1797
+ /* Specific task settings for the sections*/
1798
+
1799
+ .taskText0,
1800
+ .taskText1,
1801
+ .taskText2,
1802
+ .taskText3 {
1803
+ fill: ${t.taskTextColor};
1804
+ }
1805
+
1806
+ .task0,
1807
+ .task1,
1808
+ .task2,
1809
+ .task3 {
1810
+ fill: ${t.taskBkgColor};
1811
+ stroke: ${t.taskBorderColor};
1812
+ }
1813
+
1814
+ .taskTextOutside0,
1815
+ .taskTextOutside2
1816
+ {
1817
+ fill: ${t.taskTextOutsideColor};
1818
+ }
1819
+
1820
+ .taskTextOutside1,
1821
+ .taskTextOutside3 {
1822
+ fill: ${t.taskTextOutsideColor};
1823
+ }
1824
+
1825
+
1826
+ /* Active task */
1827
+
1828
+ .active0,
1829
+ .active1,
1830
+ .active2,
1831
+ .active3 {
1832
+ fill: ${t.activeTaskBkgColor};
1833
+ stroke: ${t.activeTaskBorderColor};
1834
+ }
1835
+
1836
+ .activeText0,
1837
+ .activeText1,
1838
+ .activeText2,
1839
+ .activeText3 {
1840
+ fill: ${t.taskTextDarkColor} !important;
1841
+ }
1842
+
1843
+
1844
+ /* Completed task */
1845
+
1846
+ .done0,
1847
+ .done1,
1848
+ .done2,
1849
+ .done3 {
1850
+ stroke: ${t.doneTaskBorderColor};
1851
+ fill: ${t.doneTaskBkgColor};
1852
+ stroke-width: 2;
1853
+ }
1854
+
1855
+ .doneText0,
1856
+ .doneText1,
1857
+ .doneText2,
1858
+ .doneText3 {
1859
+ fill: ${t.taskTextDarkColor} !important;
1860
+ }
1861
+
1862
+ /* Done task text displayed outside the bar sits against the diagram background,
1863
+ not against the done-task bar, so it must use the outside/contrast color. */
1864
+ .doneText0.taskTextOutsideLeft,
1865
+ .doneText0.taskTextOutsideRight,
1866
+ .doneText1.taskTextOutsideLeft,
1867
+ .doneText1.taskTextOutsideRight,
1868
+ .doneText2.taskTextOutsideLeft,
1869
+ .doneText2.taskTextOutsideRight,
1870
+ .doneText3.taskTextOutsideLeft,
1871
+ .doneText3.taskTextOutsideRight {
1872
+ fill: ${t.taskTextOutsideColor} !important;
1873
+ }
1874
+
1875
+
1876
+ /* Tasks on the critical line */
1877
+
1878
+ .crit0,
1879
+ .crit1,
1880
+ .crit2,
1881
+ .crit3 {
1882
+ stroke: ${t.critBorderColor};
1883
+ fill: ${t.critBkgColor};
1884
+ stroke-width: 2;
1885
+ }
1886
+
1887
+ .activeCrit0,
1888
+ .activeCrit1,
1889
+ .activeCrit2,
1890
+ .activeCrit3 {
1891
+ stroke: ${t.critBorderColor};
1892
+ fill: ${t.activeTaskBkgColor};
1893
+ stroke-width: 2;
1894
+ }
1895
+
1896
+ .doneCrit0,
1897
+ .doneCrit1,
1898
+ .doneCrit2,
1899
+ .doneCrit3 {
1900
+ stroke: ${t.critBorderColor};
1901
+ fill: ${t.doneTaskBkgColor};
1902
+ stroke-width: 2;
1903
+ cursor: pointer;
1904
+ shape-rendering: crispEdges;
1905
+ }
1906
+
1907
+ .milestone {
1908
+ transform: rotate(45deg) scale(0.8,0.8);
1909
+ }
1910
+
1911
+ .milestoneText {
1912
+ font-style: italic;
1913
+ }
1914
+ .doneCritText0,
1915
+ .doneCritText1,
1916
+ .doneCritText2,
1917
+ .doneCritText3 {
1918
+ fill: ${t.taskTextDarkColor} !important;
1919
+ }
1920
+
1921
+ /* Done-crit task text outside the bar — same reasoning as doneText above. */
1922
+ .doneCritText0.taskTextOutsideLeft,
1923
+ .doneCritText0.taskTextOutsideRight,
1924
+ .doneCritText1.taskTextOutsideLeft,
1925
+ .doneCritText1.taskTextOutsideRight,
1926
+ .doneCritText2.taskTextOutsideLeft,
1927
+ .doneCritText2.taskTextOutsideRight,
1928
+ .doneCritText3.taskTextOutsideLeft,
1929
+ .doneCritText3.taskTextOutsideRight {
1930
+ fill: ${t.taskTextOutsideColor} !important;
1931
+ }
1932
+
1933
+ .vert {
1934
+ stroke: ${t.vertLineColor};
1935
+ }
1936
+
1937
+ .vertText {
1938
+ font-size: 15px;
1939
+ text-anchor: middle;
1940
+ fill: ${t.vertLineColor} !important;
1941
+ }
1942
+
1943
+ .activeCritText0,
1944
+ .activeCritText1,
1945
+ .activeCritText2,
1946
+ .activeCritText3 {
1947
+ fill: ${t.taskTextDarkColor} !important;
1948
+ }
1949
+
1950
+ .titleText {
1951
+ text-anchor: middle;
1952
+ font-size: 18px;
1953
+ fill: ${t.titleColor || t.textColor};
1954
+ font-family: ${t.fontFamily};
1955
+ }
1956
+ `, "getStyles"), Ei = Mi, Li = {
1957
+ parser: Vr,
1958
+ db: wi,
1959
+ renderer: Si,
1960
+ styles: Ei
1961
+ };
1962
+ export {
1963
+ Li as diagram
1964
+ };