bg-editor 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +51 -0
  3. package/README.zh-CN.md +51 -0
  4. package/dist/_basePickBy-4kmg42pS.js +158 -0
  5. package/dist/_baseUniq-WOvvCHTI.js +621 -0
  6. package/dist/arc-wItjmL5I.js +90 -0
  7. package/dist/architecture-U656AL7Q-FYDwFSxk.js +12 -0
  8. package/dist/architectureDiagram-VXUJARFQ-iG5MkBjx.js +4666 -0
  9. package/dist/blockDiagram-VD42YOAC-i2GlXmWy.js +2268 -0
  10. package/dist/c4Diagram-YG6GDRKO-IufO7T1R.js +1587 -0
  11. package/dist/channel-Dah4F59k.js +12 -0
  12. package/dist/chunk-4BX2VUAB-5_v9rnje.js +15 -0
  13. package/dist/chunk-55IACEB6-BDNtSypP.js +15 -0
  14. package/dist/chunk-B4BG7PRW-DzaYPsfW.js +1382 -0
  15. package/dist/chunk-DI55MBZ5-Buwrprkw.js +1377 -0
  16. package/dist/chunk-FMBD7UC4-BaEPEIWb.js +26 -0
  17. package/dist/chunk-QN33PNHL-DhbA7i5G.js +26 -0
  18. package/dist/chunk-QZHKN3VN-BAb_D1oz.js +22 -0
  19. package/dist/chunk-TZMSLE5B-OU1MJ2do.js +71 -0
  20. package/dist/classDiagram-2ON5EDUG-KStC8v09.js +23 -0
  21. package/dist/classDiagram-v2-WZHVMYZB-KStC8v09.js +23 -0
  22. package/dist/clone-C74UiRbr.js +15 -0
  23. package/dist/cose-bilkent-S5V4N54A-eRXCoix2.js +2612 -0
  24. package/dist/cytoscape.esm-BG3R4uVs.js +18738 -0
  25. package/dist/dagre-6UL2VRFP-Bi83jPQf.js +451 -0
  26. package/dist/defaultLocale-DgmhL6Re.js +178 -0
  27. package/dist/diagram-PSM6KHXK-aW98k2-4.js +539 -0
  28. package/dist/diagram-QEK2KX5R-BR--iNM5.js +224 -0
  29. package/dist/diagram-S2PKOQOG-NTnEy5_O.js +149 -0
  30. package/dist/erDiagram-Q2GNP2WA-C8oZ5c-S.js +848 -0
  31. package/dist/flowDiagram-NV44I4VS-DiKad3Bb.js +1627 -0
  32. package/dist/ganttDiagram-LVOFAZNH-CthzjjJq.js +2506 -0
  33. package/dist/gitGraph-F6HP7TQM-CuXAC0XT.js +12 -0
  34. package/dist/gitGraphDiagram-NY62KEGX-d4KszKqi.js +706 -0
  35. package/dist/graph-CnOTx4E0.js +254 -0
  36. package/dist/index-D6-Wf75-.js +122127 -0
  37. package/dist/info-NVLQJR56-Dhmtdc7O.js +12 -0
  38. package/dist/infoDiagram-ER5ION4S-DedidjTu.js +31 -0
  39. package/dist/init-d639unba.js +23 -0
  40. package/dist/journeyDiagram-XKPGCS4Q-BylvmUWL.js +843 -0
  41. package/dist/kanban-definition-3W4ZIXB7-DGV_aVgU.js +725 -0
  42. package/dist/layout-OXk4OSoz.js +1342 -0
  43. package/dist/linear-CO_vz87n.js +266 -0
  44. package/dist/mermaid-parser.core-CYtF6phW.js +12928 -0
  45. package/dist/mindmap-definition-VGOIOE7T-BU05Y6Vz.js +790 -0
  46. package/dist/ordinal-CofNqUw2.js +68 -0
  47. package/dist/packet-BFZMPI3H-D7H_8Q-U.js +12 -0
  48. package/dist/pie-7BOR55EZ-BNWNcO5Z.js +12 -0
  49. package/dist/pieDiagram-ADFJNKIX-reGTUsiW.js +168 -0
  50. package/dist/quadrantDiagram-AYHSOK5B-NeHOJ0lX.js +1029 -0
  51. package/dist/radar-NHE76QYJ-DrVEcvh1.js +12 -0
  52. package/dist/requirementDiagram-UZGBJVZJ-BE76XNaT.js +857 -0
  53. package/dist/sankeyDiagram-TZEHDZUN-UHfMLEKl.js +817 -0
  54. package/dist/sequenceDiagram-WL72ISMW-62KWnVbh.js +2518 -0
  55. package/dist/stateDiagram-FKZM4ZOC--_CkWvu6.js +270 -0
  56. package/dist/stateDiagram-v2-4FDKWEC3-Dj7ZjAmI.js +23 -0
  57. package/dist/style.css +1 -0
  58. package/dist/timeline-definition-IT6M3QCI-C3Wb0xMN.js +804 -0
  59. package/dist/treemap-KMMF4GRG-Bc8F2dFd.js +12 -0
  60. package/dist/umo-editor.js +16 -0
  61. package/dist/xychartDiagram-PRI3JC2R-D2J307cO.js +1347 -0
  62. package/package.json +200 -0
  63. package/types/index.d.ts +277 -0
  64. package/types/src/components/index.d.ts +9 -0
  65. package/types/src/components/menus/button.vue.d.ts +583 -0
  66. package/types/src/components/modal.vue.d.ts +2 -0
  67. package/types/src/components/tooltip.vue.d.ts +27 -0
@@ -0,0 +1,2506 @@
1
+ import "./style.css";
2
+ import { b1 as $e, b2 as Un, b3 as Je, b4 as Ke, b5 as tn, b6 as re, b7 as En, aI as Te, aJ as be, _ as h, g as Ln, s as An, q as In, p as Wn, a as On, b as Hn, c as _t, d as Zt, e as Nn, b8 as it, l as Qt, k as Vn, j as zn, y as Pn, u as Rn } from "./index-D6-Wf75-.js";
3
+ import { b as Bn, t as Ie, c as Zn, a as qn, l as Xn } from "./linear-CO_vz87n.js";
4
+ import { i as Gn } from "./init-d639unba.js";
5
+ /**
6
+ * @umoteam/editor 9.0.1
7
+ * @license MIT
8
+ * @author umodoc https://www.umodoc.com
9
+ * @see https://www.umodoc.com
10
+ **/
11
+ function jn(t, e) {
12
+ let n;
13
+ if (e === void 0)
14
+ for (const r of t)
15
+ r != null && (n < r || n === void 0 && r >= r) && (n = r);
16
+ else {
17
+ let r = -1;
18
+ for (let i of t)
19
+ (i = e(i, ++r, t)) != null && (n < i || n === void 0 && i >= i) && (n = i);
20
+ }
21
+ return n;
22
+ }
23
+ function Qn(t, e) {
24
+ let n;
25
+ if (e === void 0)
26
+ for (const r of t)
27
+ r != null && (n > r || n === void 0 && r >= r) && (n = r);
28
+ else {
29
+ let r = -1;
30
+ for (let i of t)
31
+ (i = e(i, ++r, t)) != null && (n > i || n === void 0 && i >= i) && (n = i);
32
+ }
33
+ return n;
34
+ }
35
+ function $n(t) {
36
+ return t;
37
+ }
38
+ var Xt = 1, ie = 2, me = 3, qt = 4, We = 1e-6;
39
+ function Jn(t) {
40
+ return "translate(" + t + ",0)";
41
+ }
42
+ function Kn(t) {
43
+ return "translate(0," + t + ")";
44
+ }
45
+ function tr(t) {
46
+ return (e) => +t(e);
47
+ }
48
+ function er(t, e) {
49
+ return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (n) => +t(n) + e;
50
+ }
51
+ function nr() {
52
+ return !this.__axis;
53
+ }
54
+ function en(t, e) {
55
+ var n = [], r = null, i = null, a = 6, s = 6, y = 3, _ = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, p = t === Xt || t === qt ? -1 : 1, g = t === qt || t === ie ? "x" : "y", E = t === Xt || t === me ? Jn : Kn;
56
+ function C(b) {
57
+ var X = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), O = i ?? (e.tickFormat ? e.tickFormat.apply(e, n) : $n), M = Math.max(a, 0) + y, I = e.range(), V = +I[0] + _, W = +I[I.length - 1] + _, Z = (e.bandwidth ? er : tr)(e.copy(), _), Q = b.selection ? b.selection() : b, D = Q.selectAll(".domain").data([null]), H = Q.selectAll(".tick").data(X, e).order(), x = H.exit(), Y = H.enter().append("g").attr("class", "tick"), F = H.select("line"), S = H.select("text");
58
+ D = D.merge(D.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), H = H.merge(Y), F = F.merge(Y.append("line").attr("stroke", "currentColor").attr(g + "2", p * a)), S = S.merge(Y.append("text").attr("fill", "currentColor").attr(g, p * M).attr("dy", t === Xt ? "0em" : t === me ? "0.71em" : "0.32em")), b !== Q && (D = D.transition(b), H = H.transition(b), F = F.transition(b), S = S.transition(b), x = x.transition(b).attr("opacity", We).attr("transform", function(v) {
59
+ return isFinite(v = Z(v)) ? E(v + _) : this.getAttribute("transform");
60
+ }), Y.attr("opacity", We).attr("transform", function(v) {
61
+ var U = this.parentNode.__axis;
62
+ return E((U && isFinite(U = U(v)) ? U : Z(v)) + _);
63
+ })), x.remove(), D.attr("d", t === qt || t === ie ? s ? "M" + p * s + "," + V + "H" + _ + "V" + W + "H" + p * s : "M" + _ + "," + V + "V" + W : s ? "M" + V + "," + p * s + "V" + _ + "H" + W + "V" + p * s : "M" + V + "," + _ + "H" + W), H.attr("opacity", 1).attr("transform", function(v) {
64
+ return E(Z(v) + _);
65
+ }), F.attr(g + "2", p * a), S.attr(g, p * M).text(O), Q.filter(nr).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === ie ? "start" : t === qt ? "end" : "middle"), Q.each(function() {
66
+ this.__axis = Z;
67
+ });
68
+ }
69
+ return C.scale = function(b) {
70
+ return arguments.length ? (e = b, C) : e;
71
+ }, C.ticks = function() {
72
+ return n = Array.from(arguments), C;
73
+ }, C.tickArguments = function(b) {
74
+ return arguments.length ? (n = b == null ? [] : Array.from(b), C) : n.slice();
75
+ }, C.tickValues = function(b) {
76
+ return arguments.length ? (r = b == null ? null : Array.from(b), C) : r && r.slice();
77
+ }, C.tickFormat = function(b) {
78
+ return arguments.length ? (i = b, C) : i;
79
+ }, C.tickSize = function(b) {
80
+ return arguments.length ? (a = s = +b, C) : a;
81
+ }, C.tickSizeInner = function(b) {
82
+ return arguments.length ? (a = +b, C) : a;
83
+ }, C.tickSizeOuter = function(b) {
84
+ return arguments.length ? (s = +b, C) : s;
85
+ }, C.tickPadding = function(b) {
86
+ return arguments.length ? (y = +b, C) : y;
87
+ }, C.offset = function(b) {
88
+ return arguments.length ? (_ = +b, C) : _;
89
+ }, C;
90
+ }
91
+ function rr(t) {
92
+ return en(Xt, t);
93
+ }
94
+ function ir(t) {
95
+ return en(me, t);
96
+ }
97
+ const ar = Math.PI / 180, sr = 180 / Math.PI, $t = 18, nn = 0.96422, rn = 1, an = 0.82521, sn = 4 / 29, St = 6 / 29, on = 3 * St * St, or = St * St * St;
98
+ function cn(t) {
99
+ if (t instanceof ft) return new ft(t.l, t.a, t.b, t.opacity);
100
+ if (t instanceof dt) return ln(t);
101
+ t instanceof $e || (t = Un(t));
102
+ var e = ce(t.r), n = ce(t.g), r = ce(t.b), i = ae((0.2225045 * e + 0.7168786 * n + 0.0606169 * r) / rn), a, s;
103
+ return e === n && n === r ? a = s = i : (a = ae((0.4360747 * e + 0.3850649 * n + 0.1430804 * r) / nn), s = ae((0.0139322 * e + 0.0971045 * n + 0.7141733 * r) / an)), new ft(116 * i - 16, 500 * (a - i), 200 * (i - s), t.opacity);
104
+ }
105
+ function cr(t, e, n, r) {
106
+ return arguments.length === 1 ? cn(t) : new ft(t, e, n, r ?? 1);
107
+ }
108
+ function ft(t, e, n, r) {
109
+ this.l = +t, this.a = +e, this.b = +n, this.opacity = +r;
110
+ }
111
+ Je(ft, cr, Ke(tn, {
112
+ brighter(t) {
113
+ return new ft(this.l + $t * (t ?? 1), this.a, this.b, this.opacity);
114
+ },
115
+ darker(t) {
116
+ return new ft(this.l - $t * (t ?? 1), this.a, this.b, this.opacity);
117
+ },
118
+ rgb() {
119
+ var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, n = isNaN(this.b) ? t : t - this.b / 200;
120
+ return e = nn * se(e), t = rn * se(t), n = an * se(n), new $e(
121
+ oe(3.1338561 * e - 1.6168667 * t - 0.4906146 * n),
122
+ oe(-0.9787684 * e + 1.9161415 * t + 0.033454 * n),
123
+ oe(0.0719453 * e - 0.2289914 * t + 1.4052427 * n),
124
+ this.opacity
125
+ );
126
+ }
127
+ }));
128
+ function ae(t) {
129
+ return t > or ? Math.pow(t, 1 / 3) : t / on + sn;
130
+ }
131
+ function se(t) {
132
+ return t > St ? t * t * t : on * (t - sn);
133
+ }
134
+ function oe(t) {
135
+ return 255 * (t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055);
136
+ }
137
+ function ce(t) {
138
+ return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
139
+ }
140
+ function lr(t) {
141
+ if (t instanceof dt) return new dt(t.h, t.c, t.l, t.opacity);
142
+ if (t instanceof ft || (t = cn(t)), t.a === 0 && t.b === 0) return new dt(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
143
+ var e = Math.atan2(t.b, t.a) * sr;
144
+ return new dt(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
145
+ }
146
+ function ge(t, e, n, r) {
147
+ return arguments.length === 1 ? lr(t) : new dt(t, e, n, r ?? 1);
148
+ }
149
+ function dt(t, e, n, r) {
150
+ this.h = +t, this.c = +e, this.l = +n, this.opacity = +r;
151
+ }
152
+ function ln(t) {
153
+ if (isNaN(t.h)) return new ft(t.l, 0, 0, t.opacity);
154
+ var e = t.h * ar;
155
+ return new ft(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
156
+ }
157
+ Je(dt, ge, Ke(tn, {
158
+ brighter(t) {
159
+ return new dt(this.h, this.c, this.l + $t * (t ?? 1), this.opacity);
160
+ },
161
+ darker(t) {
162
+ return new dt(this.h, this.c, this.l - $t * (t ?? 1), this.opacity);
163
+ },
164
+ rgb() {
165
+ return ln(this).rgb();
166
+ }
167
+ }));
168
+ function ur(t) {
169
+ return function(e, n) {
170
+ var r = t((e = ge(e)).h, (n = ge(n)).h), i = re(e.c, n.c), a = re(e.l, n.l), s = re(e.opacity, n.opacity);
171
+ return function(y) {
172
+ return e.h = r(y), e.c = i(y), e.l = a(y), e.opacity = s(y), e + "";
173
+ };
174
+ };
175
+ }
176
+ const fr = ur(En);
177
+ function hr(t, e) {
178
+ t = t.slice();
179
+ var n = 0, r = t.length - 1, i = t[n], a = t[r], s;
180
+ return a < i && (s = n, n = r, r = s, s = i, i = a, a = s), t[n] = e.floor(i), t[r] = e.ceil(a), t;
181
+ }
182
+ const le = /* @__PURE__ */ new Date(), ue = /* @__PURE__ */ new Date();
183
+ function et(t, e, n, r) {
184
+ function i(a) {
185
+ return t(a = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+a)), a;
186
+ }
187
+ return i.floor = (a) => (t(a = /* @__PURE__ */ new Date(+a)), a), i.ceil = (a) => (t(a = new Date(a - 1)), e(a, 1), t(a), a), i.round = (a) => {
188
+ const s = i(a), y = i.ceil(a);
189
+ return a - s < y - a ? s : y;
190
+ }, i.offset = (a, s) => (e(a = /* @__PURE__ */ new Date(+a), s == null ? 1 : Math.floor(s)), a), i.range = (a, s, y) => {
191
+ const _ = [];
192
+ if (a = i.ceil(a), y = y == null ? 1 : Math.floor(y), !(a < s) || !(y > 0)) return _;
193
+ let p;
194
+ do
195
+ _.push(p = /* @__PURE__ */ new Date(+a)), e(a, y), t(a);
196
+ while (p < a && a < s);
197
+ return _;
198
+ }, i.filter = (a) => et((s) => {
199
+ if (s >= s) for (; t(s), !a(s); ) s.setTime(s - 1);
200
+ }, (s, y) => {
201
+ if (s >= s)
202
+ if (y < 0) for (; ++y <= 0; )
203
+ for (; e(s, -1), !a(s); )
204
+ ;
205
+ else for (; --y >= 0; )
206
+ for (; e(s, 1), !a(s); )
207
+ ;
208
+ }), n && (i.count = (a, s) => (le.setTime(+a), ue.setTime(+s), t(le), t(ue), Math.floor(n(le, ue))), i.every = (a) => (a = Math.floor(a), !isFinite(a) || !(a > 0) ? null : a > 1 ? i.filter(r ? (s) => r(s) % a === 0 : (s) => i.count(0, s) % a === 0) : i)), i;
209
+ }
210
+ const Yt = et(() => {
211
+ }, (t, e) => {
212
+ t.setTime(+t + e);
213
+ }, (t, e) => e - t);
214
+ Yt.every = (t) => (t = Math.floor(t), !isFinite(t) || !(t > 0) ? null : t > 1 ? et((e) => {
215
+ e.setTime(Math.floor(e / t) * t);
216
+ }, (e, n) => {
217
+ e.setTime(+e + n * t);
218
+ }, (e, n) => (n - e) / t) : Yt);
219
+ Yt.range;
220
+ const mt = 1e3, ct = mt * 60, gt = ct * 60, yt = gt * 24, xe = yt * 7, Oe = yt * 30, fe = yt * 365, vt = et((t) => {
221
+ t.setTime(t - t.getMilliseconds());
222
+ }, (t, e) => {
223
+ t.setTime(+t + e * mt);
224
+ }, (t, e) => (e - t) / mt, (t) => t.getUTCSeconds());
225
+ vt.range;
226
+ const Wt = et((t) => {
227
+ t.setTime(t - t.getMilliseconds() - t.getSeconds() * mt);
228
+ }, (t, e) => {
229
+ t.setTime(+t + e * ct);
230
+ }, (t, e) => (e - t) / ct, (t) => t.getMinutes());
231
+ Wt.range;
232
+ const dr = et((t) => {
233
+ t.setUTCSeconds(0, 0);
234
+ }, (t, e) => {
235
+ t.setTime(+t + e * ct);
236
+ }, (t, e) => (e - t) / ct, (t) => t.getUTCMinutes());
237
+ dr.range;
238
+ const Ot = et((t) => {
239
+ t.setTime(t - t.getMilliseconds() - t.getSeconds() * mt - t.getMinutes() * ct);
240
+ }, (t, e) => {
241
+ t.setTime(+t + e * gt);
242
+ }, (t, e) => (e - t) / gt, (t) => t.getHours());
243
+ Ot.range;
244
+ const mr = et((t) => {
245
+ t.setUTCMinutes(0, 0, 0);
246
+ }, (t, e) => {
247
+ t.setTime(+t + e * gt);
248
+ }, (t, e) => (e - t) / gt, (t) => t.getUTCHours());
249
+ mr.range;
250
+ const Tt = et(
251
+ (t) => t.setHours(0, 0, 0, 0),
252
+ (t, e) => t.setDate(t.getDate() + e),
253
+ (t, e) => (e - t - (e.getTimezoneOffset() - t.getTimezoneOffset()) * ct) / yt,
254
+ (t) => t.getDate() - 1
255
+ );
256
+ Tt.range;
257
+ const we = et((t) => {
258
+ t.setUTCHours(0, 0, 0, 0);
259
+ }, (t, e) => {
260
+ t.setUTCDate(t.getUTCDate() + e);
261
+ }, (t, e) => (e - t) / yt, (t) => t.getUTCDate() - 1);
262
+ we.range;
263
+ const gr = et((t) => {
264
+ t.setUTCHours(0, 0, 0, 0);
265
+ }, (t, e) => {
266
+ t.setUTCDate(t.getUTCDate() + e);
267
+ }, (t, e) => (e - t) / yt, (t) => Math.floor(t / yt));
268
+ gr.range;
269
+ function wt(t) {
270
+ return et((e) => {
271
+ e.setDate(e.getDate() - (e.getDay() + 7 - t) % 7), e.setHours(0, 0, 0, 0);
272
+ }, (e, n) => {
273
+ e.setDate(e.getDate() + n * 7);
274
+ }, (e, n) => (n - e - (n.getTimezoneOffset() - e.getTimezoneOffset()) * ct) / xe);
275
+ }
276
+ const Vt = wt(0), Ht = wt(1), un = wt(2), fn = wt(3), bt = wt(4), hn = wt(5), dn = wt(6);
277
+ Vt.range;
278
+ Ht.range;
279
+ un.range;
280
+ fn.range;
281
+ bt.range;
282
+ hn.range;
283
+ dn.range;
284
+ function Dt(t) {
285
+ return et((e) => {
286
+ e.setUTCDate(e.getUTCDate() - (e.getUTCDay() + 7 - t) % 7), e.setUTCHours(0, 0, 0, 0);
287
+ }, (e, n) => {
288
+ e.setUTCDate(e.getUTCDate() + n * 7);
289
+ }, (e, n) => (n - e) / xe);
290
+ }
291
+ const mn = Dt(0), Jt = Dt(1), yr = Dt(2), kr = Dt(3), Ut = Dt(4), pr = Dt(5), vr = Dt(6);
292
+ mn.range;
293
+ Jt.range;
294
+ yr.range;
295
+ kr.range;
296
+ Ut.range;
297
+ pr.range;
298
+ vr.range;
299
+ const Nt = et((t) => {
300
+ t.setDate(1), t.setHours(0, 0, 0, 0);
301
+ }, (t, e) => {
302
+ t.setMonth(t.getMonth() + e);
303
+ }, (t, e) => e.getMonth() - t.getMonth() + (e.getFullYear() - t.getFullYear()) * 12, (t) => t.getMonth());
304
+ Nt.range;
305
+ const Tr = et((t) => {
306
+ t.setUTCDate(1), t.setUTCHours(0, 0, 0, 0);
307
+ }, (t, e) => {
308
+ t.setUTCMonth(t.getUTCMonth() + e);
309
+ }, (t, e) => e.getUTCMonth() - t.getUTCMonth() + (e.getUTCFullYear() - t.getUTCFullYear()) * 12, (t) => t.getUTCMonth());
310
+ Tr.range;
311
+ const kt = et((t) => {
312
+ t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
313
+ }, (t, e) => {
314
+ t.setFullYear(t.getFullYear() + e);
315
+ }, (t, e) => e.getFullYear() - t.getFullYear(), (t) => t.getFullYear());
316
+ kt.every = (t) => !isFinite(t = Math.floor(t)) || !(t > 0) ? null : et((e) => {
317
+ e.setFullYear(Math.floor(e.getFullYear() / t) * t), e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
318
+ }, (e, n) => {
319
+ e.setFullYear(e.getFullYear() + n * t);
320
+ });
321
+ kt.range;
322
+ const xt = et((t) => {
323
+ t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
324
+ }, (t, e) => {
325
+ t.setUTCFullYear(t.getUTCFullYear() + e);
326
+ }, (t, e) => e.getUTCFullYear() - t.getUTCFullYear(), (t) => t.getUTCFullYear());
327
+ xt.every = (t) => !isFinite(t = Math.floor(t)) || !(t > 0) ? null : et((e) => {
328
+ e.setUTCFullYear(Math.floor(e.getUTCFullYear() / t) * t), e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
329
+ }, (e, n) => {
330
+ e.setUTCFullYear(e.getUTCFullYear() + n * t);
331
+ });
332
+ xt.range;
333
+ function br(t, e, n, r, i, a) {
334
+ const s = [
335
+ [vt, 1, mt],
336
+ [vt, 5, 5 * mt],
337
+ [vt, 15, 15 * mt],
338
+ [vt, 30, 30 * mt],
339
+ [a, 1, ct],
340
+ [a, 5, 5 * ct],
341
+ [a, 15, 15 * ct],
342
+ [a, 30, 30 * ct],
343
+ [i, 1, gt],
344
+ [i, 3, 3 * gt],
345
+ [i, 6, 6 * gt],
346
+ [i, 12, 12 * gt],
347
+ [r, 1, yt],
348
+ [r, 2, 2 * yt],
349
+ [n, 1, xe],
350
+ [e, 1, Oe],
351
+ [e, 3, 3 * Oe],
352
+ [t, 1, fe]
353
+ ];
354
+ function y(p, g, E) {
355
+ const C = g < p;
356
+ C && ([p, g] = [g, p]);
357
+ const b = E && typeof E.range == "function" ? E : _(p, g, E), X = b ? b.range(p, +g + 1) : [];
358
+ return C ? X.reverse() : X;
359
+ }
360
+ function _(p, g, E) {
361
+ const C = Math.abs(g - p) / E, b = Bn(([, , M]) => M).right(s, C);
362
+ if (b === s.length) return t.every(Ie(p / fe, g / fe, E));
363
+ if (b === 0) return Yt.every(Math.max(Ie(p, g, E), 1));
364
+ const [X, O] = s[C / s[b - 1][2] < s[b][2] / C ? b - 1 : b];
365
+ return X.every(O);
366
+ }
367
+ return [y, _];
368
+ }
369
+ const [xr, wr] = br(kt, Nt, Vt, Tt, Ot, Wt);
370
+ function he(t) {
371
+ if (0 <= t.y && t.y < 100) {
372
+ var e = new Date(-1, t.m, t.d, t.H, t.M, t.S, t.L);
373
+ return e.setFullYear(t.y), e;
374
+ }
375
+ return new Date(t.y, t.m, t.d, t.H, t.M, t.S, t.L);
376
+ }
377
+ function de(t) {
378
+ if (0 <= t.y && t.y < 100) {
379
+ var e = new Date(Date.UTC(-1, t.m, t.d, t.H, t.M, t.S, t.L));
380
+ return e.setUTCFullYear(t.y), e;
381
+ }
382
+ return new Date(Date.UTC(t.y, t.m, t.d, t.H, t.M, t.S, t.L));
383
+ }
384
+ function Lt(t, e, n) {
385
+ return { y: t, m: e, d: n, H: 0, M: 0, S: 0, L: 0 };
386
+ }
387
+ function Dr(t) {
388
+ var e = t.dateTime, n = t.date, r = t.time, i = t.periods, a = t.days, s = t.shortDays, y = t.months, _ = t.shortMonths, p = At(i), g = It(i), E = At(a), C = It(a), b = At(s), X = It(s), O = At(y), M = It(y), I = At(_), V = It(_), W = {
389
+ a: d,
390
+ A: w,
391
+ b: c,
392
+ B: l,
393
+ c: null,
394
+ d: Re,
395
+ e: Re,
396
+ f: Xr,
397
+ g: ri,
398
+ G: ai,
399
+ H: Br,
400
+ I: Zr,
401
+ j: qr,
402
+ L: gn,
403
+ m: Gr,
404
+ M: jr,
405
+ p: o,
406
+ q: P,
407
+ Q: qe,
408
+ s: Xe,
409
+ S: Qr,
410
+ u: $r,
411
+ U: Jr,
412
+ V: Kr,
413
+ w: ti,
414
+ W: ei,
415
+ x: null,
416
+ X: null,
417
+ y: ni,
418
+ Y: ii,
419
+ Z: si,
420
+ "%": Ze
421
+ }, Z = {
422
+ a: z,
423
+ A: R,
424
+ b: K,
425
+ B: G,
426
+ c: null,
427
+ d: Be,
428
+ e: Be,
429
+ f: ui,
430
+ g: Ti,
431
+ G: xi,
432
+ H: oi,
433
+ I: ci,
434
+ j: li,
435
+ L: kn,
436
+ m: fi,
437
+ M: hi,
438
+ p: $,
439
+ q: at,
440
+ Q: qe,
441
+ s: Xe,
442
+ S: di,
443
+ u: mi,
444
+ U: gi,
445
+ V: yi,
446
+ w: ki,
447
+ W: pi,
448
+ x: null,
449
+ X: null,
450
+ y: vi,
451
+ Y: bi,
452
+ Z: wi,
453
+ "%": Ze
454
+ }, Q = {
455
+ a: F,
456
+ A: S,
457
+ b: v,
458
+ B: U,
459
+ c: u,
460
+ d: ze,
461
+ e: ze,
462
+ f: Vr,
463
+ g: Ve,
464
+ G: Ne,
465
+ H: Pe,
466
+ I: Pe,
467
+ j: Wr,
468
+ L: Nr,
469
+ m: Ir,
470
+ M: Or,
471
+ p: Y,
472
+ q: Ar,
473
+ Q: Pr,
474
+ s: Rr,
475
+ S: Hr,
476
+ u: Fr,
477
+ U: Yr,
478
+ V: Ur,
479
+ w: Sr,
480
+ W: Er,
481
+ x: m,
482
+ X: T,
483
+ y: Ve,
484
+ Y: Ne,
485
+ Z: Lr,
486
+ "%": zr
487
+ };
488
+ W.x = D(n, W), W.X = D(r, W), W.c = D(e, W), Z.x = D(n, Z), Z.X = D(r, Z), Z.c = D(e, Z);
489
+ function D(k, A) {
490
+ return function(N) {
491
+ var f = [], J = -1, L = 0, j = k.length, q, rt, st;
492
+ for (N instanceof Date || (N = /* @__PURE__ */ new Date(+N)); ++J < j; )
493
+ k.charCodeAt(J) === 37 && (f.push(k.slice(L, J)), (rt = He[q = k.charAt(++J)]) != null ? q = k.charAt(++J) : rt = q === "e" ? " " : "0", (st = A[q]) && (q = st(N, rt)), f.push(q), L = J + 1);
494
+ return f.push(k.slice(L, J)), f.join("");
495
+ };
496
+ }
497
+ function H(k, A) {
498
+ return function(N) {
499
+ var f = Lt(1900, void 0, 1), J = x(f, k, N += "", 0), L, j;
500
+ if (J != N.length) return null;
501
+ if ("Q" in f) return new Date(f.Q);
502
+ if ("s" in f) return new Date(f.s * 1e3 + ("L" in f ? f.L : 0));
503
+ if (A && !("Z" in f) && (f.Z = 0), "p" in f && (f.H = f.H % 12 + f.p * 12), f.m === void 0 && (f.m = "q" in f ? f.q : 0), "V" in f) {
504
+ if (f.V < 1 || f.V > 53) return null;
505
+ "w" in f || (f.w = 1), "Z" in f ? (L = de(Lt(f.y, 0, 1)), j = L.getUTCDay(), L = j > 4 || j === 0 ? Jt.ceil(L) : Jt(L), L = we.offset(L, (f.V - 1) * 7), f.y = L.getUTCFullYear(), f.m = L.getUTCMonth(), f.d = L.getUTCDate() + (f.w + 6) % 7) : (L = he(Lt(f.y, 0, 1)), j = L.getDay(), L = j > 4 || j === 0 ? Ht.ceil(L) : Ht(L), L = Tt.offset(L, (f.V - 1) * 7), f.y = L.getFullYear(), f.m = L.getMonth(), f.d = L.getDate() + (f.w + 6) % 7);
506
+ } else ("W" in f || "U" in f) && ("w" in f || (f.w = "u" in f ? f.u % 7 : "W" in f ? 1 : 0), j = "Z" in f ? de(Lt(f.y, 0, 1)).getUTCDay() : he(Lt(f.y, 0, 1)).getDay(), f.m = 0, f.d = "W" in f ? (f.w + 6) % 7 + f.W * 7 - (j + 5) % 7 : f.w + f.U * 7 - (j + 6) % 7);
507
+ return "Z" in f ? (f.H += f.Z / 100 | 0, f.M += f.Z % 100, de(f)) : he(f);
508
+ };
509
+ }
510
+ function x(k, A, N, f) {
511
+ for (var J = 0, L = A.length, j = N.length, q, rt; J < L; ) {
512
+ if (f >= j) return -1;
513
+ if (q = A.charCodeAt(J++), q === 37) {
514
+ if (q = A.charAt(J++), rt = Q[q in He ? A.charAt(J++) : q], !rt || (f = rt(k, N, f)) < 0) return -1;
515
+ } else if (q != N.charCodeAt(f++))
516
+ return -1;
517
+ }
518
+ return f;
519
+ }
520
+ function Y(k, A, N) {
521
+ var f = p.exec(A.slice(N));
522
+ return f ? (k.p = g.get(f[0].toLowerCase()), N + f[0].length) : -1;
523
+ }
524
+ function F(k, A, N) {
525
+ var f = b.exec(A.slice(N));
526
+ return f ? (k.w = X.get(f[0].toLowerCase()), N + f[0].length) : -1;
527
+ }
528
+ function S(k, A, N) {
529
+ var f = E.exec(A.slice(N));
530
+ return f ? (k.w = C.get(f[0].toLowerCase()), N + f[0].length) : -1;
531
+ }
532
+ function v(k, A, N) {
533
+ var f = I.exec(A.slice(N));
534
+ return f ? (k.m = V.get(f[0].toLowerCase()), N + f[0].length) : -1;
535
+ }
536
+ function U(k, A, N) {
537
+ var f = O.exec(A.slice(N));
538
+ return f ? (k.m = M.get(f[0].toLowerCase()), N + f[0].length) : -1;
539
+ }
540
+ function u(k, A, N) {
541
+ return x(k, e, A, N);
542
+ }
543
+ function m(k, A, N) {
544
+ return x(k, n, A, N);
545
+ }
546
+ function T(k, A, N) {
547
+ return x(k, r, A, N);
548
+ }
549
+ function d(k) {
550
+ return s[k.getDay()];
551
+ }
552
+ function w(k) {
553
+ return a[k.getDay()];
554
+ }
555
+ function c(k) {
556
+ return _[k.getMonth()];
557
+ }
558
+ function l(k) {
559
+ return y[k.getMonth()];
560
+ }
561
+ function o(k) {
562
+ return i[+(k.getHours() >= 12)];
563
+ }
564
+ function P(k) {
565
+ return 1 + ~~(k.getMonth() / 3);
566
+ }
567
+ function z(k) {
568
+ return s[k.getUTCDay()];
569
+ }
570
+ function R(k) {
571
+ return a[k.getUTCDay()];
572
+ }
573
+ function K(k) {
574
+ return _[k.getUTCMonth()];
575
+ }
576
+ function G(k) {
577
+ return y[k.getUTCMonth()];
578
+ }
579
+ function $(k) {
580
+ return i[+(k.getUTCHours() >= 12)];
581
+ }
582
+ function at(k) {
583
+ return 1 + ~~(k.getUTCMonth() / 3);
584
+ }
585
+ return {
586
+ format: function(k) {
587
+ var A = D(k += "", W);
588
+ return A.toString = function() {
589
+ return k;
590
+ }, A;
591
+ },
592
+ parse: function(k) {
593
+ var A = H(k += "", !1);
594
+ return A.toString = function() {
595
+ return k;
596
+ }, A;
597
+ },
598
+ utcFormat: function(k) {
599
+ var A = D(k += "", Z);
600
+ return A.toString = function() {
601
+ return k;
602
+ }, A;
603
+ },
604
+ utcParse: function(k) {
605
+ var A = H(k += "", !0);
606
+ return A.toString = function() {
607
+ return k;
608
+ }, A;
609
+ }
610
+ };
611
+ }
612
+ var He = { "-": "", _: " ", 0: "0" }, nt = /^\s*\d+/, Cr = /^%/, Mr = /[\\^$*+?|[\]().{}]/g;
613
+ function B(t, e, n) {
614
+ var r = t < 0 ? "-" : "", i = (r ? -t : t) + "", a = i.length;
615
+ return r + (a < n ? new Array(n - a + 1).join(e) + i : i);
616
+ }
617
+ function _r(t) {
618
+ return t.replace(Mr, "\\$&");
619
+ }
620
+ function At(t) {
621
+ return new RegExp("^(?:" + t.map(_r).join("|") + ")", "i");
622
+ }
623
+ function It(t) {
624
+ return new Map(t.map((e, n) => [e.toLowerCase(), n]));
625
+ }
626
+ function Sr(t, e, n) {
627
+ var r = nt.exec(e.slice(n, n + 1));
628
+ return r ? (t.w = +r[0], n + r[0].length) : -1;
629
+ }
630
+ function Fr(t, e, n) {
631
+ var r = nt.exec(e.slice(n, n + 1));
632
+ return r ? (t.u = +r[0], n + r[0].length) : -1;
633
+ }
634
+ function Yr(t, e, n) {
635
+ var r = nt.exec(e.slice(n, n + 2));
636
+ return r ? (t.U = +r[0], n + r[0].length) : -1;
637
+ }
638
+ function Ur(t, e, n) {
639
+ var r = nt.exec(e.slice(n, n + 2));
640
+ return r ? (t.V = +r[0], n + r[0].length) : -1;
641
+ }
642
+ function Er(t, e, n) {
643
+ var r = nt.exec(e.slice(n, n + 2));
644
+ return r ? (t.W = +r[0], n + r[0].length) : -1;
645
+ }
646
+ function Ne(t, e, n) {
647
+ var r = nt.exec(e.slice(n, n + 4));
648
+ return r ? (t.y = +r[0], n + r[0].length) : -1;
649
+ }
650
+ function Ve(t, e, n) {
651
+ var r = nt.exec(e.slice(n, n + 2));
652
+ return r ? (t.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1;
653
+ }
654
+ function Lr(t, e, n) {
655
+ var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n, n + 6));
656
+ return r ? (t.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1;
657
+ }
658
+ function Ar(t, e, n) {
659
+ var r = nt.exec(e.slice(n, n + 1));
660
+ return r ? (t.q = r[0] * 3 - 3, n + r[0].length) : -1;
661
+ }
662
+ function Ir(t, e, n) {
663
+ var r = nt.exec(e.slice(n, n + 2));
664
+ return r ? (t.m = r[0] - 1, n + r[0].length) : -1;
665
+ }
666
+ function ze(t, e, n) {
667
+ var r = nt.exec(e.slice(n, n + 2));
668
+ return r ? (t.d = +r[0], n + r[0].length) : -1;
669
+ }
670
+ function Wr(t, e, n) {
671
+ var r = nt.exec(e.slice(n, n + 3));
672
+ return r ? (t.m = 0, t.d = +r[0], n + r[0].length) : -1;
673
+ }
674
+ function Pe(t, e, n) {
675
+ var r = nt.exec(e.slice(n, n + 2));
676
+ return r ? (t.H = +r[0], n + r[0].length) : -1;
677
+ }
678
+ function Or(t, e, n) {
679
+ var r = nt.exec(e.slice(n, n + 2));
680
+ return r ? (t.M = +r[0], n + r[0].length) : -1;
681
+ }
682
+ function Hr(t, e, n) {
683
+ var r = nt.exec(e.slice(n, n + 2));
684
+ return r ? (t.S = +r[0], n + r[0].length) : -1;
685
+ }
686
+ function Nr(t, e, n) {
687
+ var r = nt.exec(e.slice(n, n + 3));
688
+ return r ? (t.L = +r[0], n + r[0].length) : -1;
689
+ }
690
+ function Vr(t, e, n) {
691
+ var r = nt.exec(e.slice(n, n + 6));
692
+ return r ? (t.L = Math.floor(r[0] / 1e3), n + r[0].length) : -1;
693
+ }
694
+ function zr(t, e, n) {
695
+ var r = Cr.exec(e.slice(n, n + 1));
696
+ return r ? n + r[0].length : -1;
697
+ }
698
+ function Pr(t, e, n) {
699
+ var r = nt.exec(e.slice(n));
700
+ return r ? (t.Q = +r[0], n + r[0].length) : -1;
701
+ }
702
+ function Rr(t, e, n) {
703
+ var r = nt.exec(e.slice(n));
704
+ return r ? (t.s = +r[0], n + r[0].length) : -1;
705
+ }
706
+ function Re(t, e) {
707
+ return B(t.getDate(), e, 2);
708
+ }
709
+ function Br(t, e) {
710
+ return B(t.getHours(), e, 2);
711
+ }
712
+ function Zr(t, e) {
713
+ return B(t.getHours() % 12 || 12, e, 2);
714
+ }
715
+ function qr(t, e) {
716
+ return B(1 + Tt.count(kt(t), t), e, 3);
717
+ }
718
+ function gn(t, e) {
719
+ return B(t.getMilliseconds(), e, 3);
720
+ }
721
+ function Xr(t, e) {
722
+ return gn(t, e) + "000";
723
+ }
724
+ function Gr(t, e) {
725
+ return B(t.getMonth() + 1, e, 2);
726
+ }
727
+ function jr(t, e) {
728
+ return B(t.getMinutes(), e, 2);
729
+ }
730
+ function Qr(t, e) {
731
+ return B(t.getSeconds(), e, 2);
732
+ }
733
+ function $r(t) {
734
+ var e = t.getDay();
735
+ return e === 0 ? 7 : e;
736
+ }
737
+ function Jr(t, e) {
738
+ return B(Vt.count(kt(t) - 1, t), e, 2);
739
+ }
740
+ function yn(t) {
741
+ var e = t.getDay();
742
+ return e >= 4 || e === 0 ? bt(t) : bt.ceil(t);
743
+ }
744
+ function Kr(t, e) {
745
+ return t = yn(t), B(bt.count(kt(t), t) + (kt(t).getDay() === 4), e, 2);
746
+ }
747
+ function ti(t) {
748
+ return t.getDay();
749
+ }
750
+ function ei(t, e) {
751
+ return B(Ht.count(kt(t) - 1, t), e, 2);
752
+ }
753
+ function ni(t, e) {
754
+ return B(t.getFullYear() % 100, e, 2);
755
+ }
756
+ function ri(t, e) {
757
+ return t = yn(t), B(t.getFullYear() % 100, e, 2);
758
+ }
759
+ function ii(t, e) {
760
+ return B(t.getFullYear() % 1e4, e, 4);
761
+ }
762
+ function ai(t, e) {
763
+ var n = t.getDay();
764
+ return t = n >= 4 || n === 0 ? bt(t) : bt.ceil(t), B(t.getFullYear() % 1e4, e, 4);
765
+ }
766
+ function si(t) {
767
+ var e = t.getTimezoneOffset();
768
+ return (e > 0 ? "-" : (e *= -1, "+")) + B(e / 60 | 0, "0", 2) + B(e % 60, "0", 2);
769
+ }
770
+ function Be(t, e) {
771
+ return B(t.getUTCDate(), e, 2);
772
+ }
773
+ function oi(t, e) {
774
+ return B(t.getUTCHours(), e, 2);
775
+ }
776
+ function ci(t, e) {
777
+ return B(t.getUTCHours() % 12 || 12, e, 2);
778
+ }
779
+ function li(t, e) {
780
+ return B(1 + we.count(xt(t), t), e, 3);
781
+ }
782
+ function kn(t, e) {
783
+ return B(t.getUTCMilliseconds(), e, 3);
784
+ }
785
+ function ui(t, e) {
786
+ return kn(t, e) + "000";
787
+ }
788
+ function fi(t, e) {
789
+ return B(t.getUTCMonth() + 1, e, 2);
790
+ }
791
+ function hi(t, e) {
792
+ return B(t.getUTCMinutes(), e, 2);
793
+ }
794
+ function di(t, e) {
795
+ return B(t.getUTCSeconds(), e, 2);
796
+ }
797
+ function mi(t) {
798
+ var e = t.getUTCDay();
799
+ return e === 0 ? 7 : e;
800
+ }
801
+ function gi(t, e) {
802
+ return B(mn.count(xt(t) - 1, t), e, 2);
803
+ }
804
+ function pn(t) {
805
+ var e = t.getUTCDay();
806
+ return e >= 4 || e === 0 ? Ut(t) : Ut.ceil(t);
807
+ }
808
+ function yi(t, e) {
809
+ return t = pn(t), B(Ut.count(xt(t), t) + (xt(t).getUTCDay() === 4), e, 2);
810
+ }
811
+ function ki(t) {
812
+ return t.getUTCDay();
813
+ }
814
+ function pi(t, e) {
815
+ return B(Jt.count(xt(t) - 1, t), e, 2);
816
+ }
817
+ function vi(t, e) {
818
+ return B(t.getUTCFullYear() % 100, e, 2);
819
+ }
820
+ function Ti(t, e) {
821
+ return t = pn(t), B(t.getUTCFullYear() % 100, e, 2);
822
+ }
823
+ function bi(t, e) {
824
+ return B(t.getUTCFullYear() % 1e4, e, 4);
825
+ }
826
+ function xi(t, e) {
827
+ var n = t.getUTCDay();
828
+ return t = n >= 4 || n === 0 ? Ut(t) : Ut.ceil(t), B(t.getUTCFullYear() % 1e4, e, 4);
829
+ }
830
+ function wi() {
831
+ return "+0000";
832
+ }
833
+ function Ze() {
834
+ return "%";
835
+ }
836
+ function qe(t) {
837
+ return +t;
838
+ }
839
+ function Xe(t) {
840
+ return Math.floor(+t / 1e3);
841
+ }
842
+ var Mt, Kt;
843
+ Di({
844
+ dateTime: "%x, %X",
845
+ date: "%-m/%-d/%Y",
846
+ time: "%-I:%M:%S %p",
847
+ periods: ["AM", "PM"],
848
+ days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
849
+ shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
850
+ months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
851
+ shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
852
+ });
853
+ function Di(t) {
854
+ return Mt = Dr(t), Kt = Mt.format, Mt.parse, Mt.utcFormat, Mt.utcParse, Mt;
855
+ }
856
+ function Ci(t) {
857
+ return new Date(t);
858
+ }
859
+ function Mi(t) {
860
+ return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
861
+ }
862
+ function vn(t, e, n, r, i, a, s, y, _, p) {
863
+ var g = Zn(), E = g.invert, C = g.domain, b = p(".%L"), X = p(":%S"), O = p("%I:%M"), M = p("%I %p"), I = p("%a %d"), V = p("%b %d"), W = p("%B"), Z = p("%Y");
864
+ function Q(D) {
865
+ return (_(D) < D ? b : y(D) < D ? X : s(D) < D ? O : a(D) < D ? M : r(D) < D ? i(D) < D ? I : V : n(D) < D ? W : Z)(D);
866
+ }
867
+ return g.invert = function(D) {
868
+ return new Date(E(D));
869
+ }, g.domain = function(D) {
870
+ return arguments.length ? C(Array.from(D, Mi)) : C().map(Ci);
871
+ }, g.ticks = function(D) {
872
+ var H = C();
873
+ return t(H[0], H[H.length - 1], D ?? 10);
874
+ }, g.tickFormat = function(D, H) {
875
+ return H == null ? Q : p(H);
876
+ }, g.nice = function(D) {
877
+ var H = C();
878
+ return (!D || typeof D.range != "function") && (D = e(H[0], H[H.length - 1], D ?? 10)), D ? C(hr(H, D)) : g;
879
+ }, g.copy = function() {
880
+ return qn(g, vn(t, e, n, r, i, a, s, y, _, p));
881
+ }, g;
882
+ }
883
+ function _i() {
884
+ return Gn.apply(vn(xr, wr, kt, Nt, Vt, Tt, Ot, Wt, vt, Kt).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
885
+ }
886
+ var Tn = { exports: {} };
887
+ (function(t, e) {
888
+ (function(n, r) {
889
+ t.exports = r();
890
+ })(Te, function() {
891
+ var n = "day";
892
+ return function(r, i, a) {
893
+ var s = function(p) {
894
+ return p.add(4 - p.isoWeekday(), n);
895
+ }, y = i.prototype;
896
+ y.isoWeekYear = function() {
897
+ return s(this).year();
898
+ }, y.isoWeek = function(p) {
899
+ if (!this.$utils().u(p)) return this.add(7 * (p - this.isoWeek()), n);
900
+ var g, E, C, b, X = s(this), O = (g = this.isoWeekYear(), E = this.$u, C = (E ? a.utc : a)().year(g).startOf("year"), b = 4 - C.isoWeekday(), C.isoWeekday() > 4 && (b += 7), C.add(b, n));
901
+ return X.diff(O, "week") + 1;
902
+ }, y.isoWeekday = function(p) {
903
+ return this.$utils().u(p) ? this.day() || 7 : this.day(this.day() % 7 ? p : p - 7);
904
+ };
905
+ var _ = y.startOf;
906
+ y.startOf = function(p, g) {
907
+ var E = this.$utils(), C = !!E.u(g) || g;
908
+ return E.p(p) === "isoweek" ? C ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : _.bind(this)(p, g);
909
+ };
910
+ };
911
+ });
912
+ })(Tn);
913
+ var Si = Tn.exports;
914
+ const Fi = /* @__PURE__ */ be(Si);
915
+ var bn = { exports: {} };
916
+ (function(t, e) {
917
+ (function(n, r) {
918
+ t.exports = r();
919
+ })(Te, function() {
920
+ var n = { 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" }, r = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, i = /\d/, a = /\d\d/, s = /\d\d?/, y = /\d*[^-_:/,()\s\d]+/, _ = {}, p = function(M) {
921
+ return (M = +M) + (M > 68 ? 1900 : 2e3);
922
+ }, g = function(M) {
923
+ return function(I) {
924
+ this[M] = +I;
925
+ };
926
+ }, E = [/[+-]\d\d:?(\d\d)?|Z/, function(M) {
927
+ (this.zone || (this.zone = {})).offset = function(I) {
928
+ if (!I || I === "Z") return 0;
929
+ var V = I.match(/([+-]|\d\d)/g), W = 60 * V[1] + (+V[2] || 0);
930
+ return W === 0 ? 0 : V[0] === "+" ? -W : W;
931
+ }(M);
932
+ }], C = function(M) {
933
+ var I = _[M];
934
+ return I && (I.indexOf ? I : I.s.concat(I.f));
935
+ }, b = function(M, I) {
936
+ var V, W = _.meridiem;
937
+ if (W) {
938
+ for (var Z = 1; Z <= 24; Z += 1) if (M.indexOf(W(Z, 0, I)) > -1) {
939
+ V = Z > 12;
940
+ break;
941
+ }
942
+ } else V = M === (I ? "pm" : "PM");
943
+ return V;
944
+ }, X = { A: [y, function(M) {
945
+ this.afternoon = b(M, !1);
946
+ }], a: [y, function(M) {
947
+ this.afternoon = b(M, !0);
948
+ }], Q: [i, function(M) {
949
+ this.month = 3 * (M - 1) + 1;
950
+ }], S: [i, function(M) {
951
+ this.milliseconds = 100 * +M;
952
+ }], SS: [a, function(M) {
953
+ this.milliseconds = 10 * +M;
954
+ }], SSS: [/\d{3}/, function(M) {
955
+ this.milliseconds = +M;
956
+ }], s: [s, g("seconds")], ss: [s, g("seconds")], m: [s, g("minutes")], mm: [s, g("minutes")], H: [s, g("hours")], h: [s, g("hours")], HH: [s, g("hours")], hh: [s, g("hours")], D: [s, g("day")], DD: [a, g("day")], Do: [y, function(M) {
957
+ var I = _.ordinal, V = M.match(/\d+/);
958
+ if (this.day = V[0], I) for (var W = 1; W <= 31; W += 1) I(W).replace(/\[|\]/g, "") === M && (this.day = W);
959
+ }], w: [s, g("week")], ww: [a, g("week")], M: [s, g("month")], MM: [a, g("month")], MMM: [y, function(M) {
960
+ var I = C("months"), V = (C("monthsShort") || I.map(function(W) {
961
+ return W.slice(0, 3);
962
+ })).indexOf(M) + 1;
963
+ if (V < 1) throw new Error();
964
+ this.month = V % 12 || V;
965
+ }], MMMM: [y, function(M) {
966
+ var I = C("months").indexOf(M) + 1;
967
+ if (I < 1) throw new Error();
968
+ this.month = I % 12 || I;
969
+ }], Y: [/[+-]?\d+/, g("year")], YY: [a, function(M) {
970
+ this.year = p(M);
971
+ }], YYYY: [/\d{4}/, g("year")], Z: E, ZZ: E };
972
+ function O(M) {
973
+ var I, V;
974
+ I = M, V = _ && _.formats;
975
+ for (var W = (M = I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(F, S, v) {
976
+ var U = v && v.toUpperCase();
977
+ return S || V[v] || n[v] || V[U].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(u, m, T) {
978
+ return m || T.slice(1);
979
+ });
980
+ })).match(r), Z = W.length, Q = 0; Q < Z; Q += 1) {
981
+ var D = W[Q], H = X[D], x = H && H[0], Y = H && H[1];
982
+ W[Q] = Y ? { regex: x, parser: Y } : D.replace(/^\[|\]$/g, "");
983
+ }
984
+ return function(F) {
985
+ for (var S = {}, v = 0, U = 0; v < Z; v += 1) {
986
+ var u = W[v];
987
+ if (typeof u == "string") U += u.length;
988
+ else {
989
+ var m = u.regex, T = u.parser, d = F.slice(U), w = m.exec(d)[0];
990
+ T.call(S, w), F = F.replace(w, "");
991
+ }
992
+ }
993
+ return function(c) {
994
+ var l = c.afternoon;
995
+ if (l !== void 0) {
996
+ var o = c.hours;
997
+ l ? o < 12 && (c.hours += 12) : o === 12 && (c.hours = 0), delete c.afternoon;
998
+ }
999
+ }(S), S;
1000
+ };
1001
+ }
1002
+ return function(M, I, V) {
1003
+ V.p.customParseFormat = !0, M && M.parseTwoDigitYear && (p = M.parseTwoDigitYear);
1004
+ var W = I.prototype, Z = W.parse;
1005
+ W.parse = function(Q) {
1006
+ var D = Q.date, H = Q.utc, x = Q.args;
1007
+ this.$u = H;
1008
+ var Y = x[1];
1009
+ if (typeof Y == "string") {
1010
+ var F = x[2] === !0, S = x[3] === !0, v = F || S, U = x[2];
1011
+ S && (U = x[2]), _ = this.$locale(), !F && U && (_ = V.Ls[U]), this.$d = function(d, w, c, l) {
1012
+ try {
1013
+ if (["x", "X"].indexOf(w) > -1) return new Date((w === "X" ? 1e3 : 1) * d);
1014
+ var o = O(w)(d), P = o.year, z = o.month, R = o.day, K = o.hours, G = o.minutes, $ = o.seconds, at = o.milliseconds, k = o.zone, A = o.week, N = /* @__PURE__ */ new Date(), f = R || (P || z ? 1 : N.getDate()), J = P || N.getFullYear(), L = 0;
1015
+ P && !z || (L = z > 0 ? z - 1 : N.getMonth());
1016
+ var j, q = K || 0, rt = G || 0, st = $ || 0, pt = at || 0;
1017
+ return k ? new Date(Date.UTC(J, L, f, q, rt, st, pt + 60 * k.offset * 1e3)) : c ? new Date(Date.UTC(J, L, f, q, rt, st, pt)) : (j = new Date(J, L, f, q, rt, st, pt), A && (j = l(j).week(A).toDate()), j);
1018
+ } catch {
1019
+ return /* @__PURE__ */ new Date("");
1020
+ }
1021
+ }(D, Y, H, V), this.init(), U && U !== !0 && (this.$L = this.locale(U).$L), v && D != this.format(Y) && (this.$d = /* @__PURE__ */ new Date("")), _ = {};
1022
+ } else if (Y instanceof Array) for (var u = Y.length, m = 1; m <= u; m += 1) {
1023
+ x[1] = Y[m - 1];
1024
+ var T = V.apply(this, x);
1025
+ if (T.isValid()) {
1026
+ this.$d = T.$d, this.$L = T.$L, this.init();
1027
+ break;
1028
+ }
1029
+ m === u && (this.$d = /* @__PURE__ */ new Date(""));
1030
+ }
1031
+ else Z.call(this, Q);
1032
+ };
1033
+ };
1034
+ });
1035
+ })(bn);
1036
+ var Yi = bn.exports;
1037
+ const Ui = /* @__PURE__ */ be(Yi);
1038
+ var xn = { exports: {} };
1039
+ (function(t, e) {
1040
+ (function(n, r) {
1041
+ t.exports = r();
1042
+ })(Te, function() {
1043
+ return function(n, r) {
1044
+ var i = r.prototype, a = i.format;
1045
+ i.format = function(s) {
1046
+ var y = this, _ = this.$locale();
1047
+ if (!this.isValid()) return a.bind(this)(s);
1048
+ var p = this.$utils(), g = (s || "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(E) {
1049
+ switch (E) {
1050
+ case "Q":
1051
+ return Math.ceil((y.$M + 1) / 3);
1052
+ case "Do":
1053
+ return _.ordinal(y.$D);
1054
+ case "gggg":
1055
+ return y.weekYear();
1056
+ case "GGGG":
1057
+ return y.isoWeekYear();
1058
+ case "wo":
1059
+ return _.ordinal(y.week(), "W");
1060
+ case "w":
1061
+ case "ww":
1062
+ return p.s(y.week(), E === "w" ? 1 : 2, "0");
1063
+ case "W":
1064
+ case "WW":
1065
+ return p.s(y.isoWeek(), E === "W" ? 1 : 2, "0");
1066
+ case "k":
1067
+ case "kk":
1068
+ return p.s(String(y.$H === 0 ? 24 : y.$H), E === "k" ? 1 : 2, "0");
1069
+ case "X":
1070
+ return Math.floor(y.$d.getTime() / 1e3);
1071
+ case "x":
1072
+ return y.$d.getTime();
1073
+ case "z":
1074
+ return "[" + y.offsetName() + "]";
1075
+ case "zzz":
1076
+ return "[" + y.offsetName("long") + "]";
1077
+ default:
1078
+ return E;
1079
+ }
1080
+ });
1081
+ return a.bind(this)(g);
1082
+ };
1083
+ };
1084
+ });
1085
+ })(xn);
1086
+ var Ei = xn.exports;
1087
+ const Li = /* @__PURE__ */ be(Ei);
1088
+ var ye = function() {
1089
+ var t = /* @__PURE__ */ h(function(U, u, m, T) {
1090
+ for (m = m || {}, T = U.length; T--; m[U[T]] = u) ;
1091
+ return m;
1092
+ }, "o"), e = [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], n = [1, 26], r = [1, 27], i = [1, 28], a = [1, 29], s = [1, 30], y = [1, 31], _ = [1, 32], p = [1, 33], g = [1, 34], E = [1, 9], C = [1, 10], b = [1, 11], X = [1, 12], O = [1, 13], M = [1, 14], I = [1, 15], V = [1, 16], W = [1, 19], Z = [1, 20], Q = [1, 21], D = [1, 22], H = [1, 23], x = [1, 25], Y = [1, 35], F = {
1093
+ trace: /* @__PURE__ */ h(function() {
1094
+ }, "trace"),
1095
+ yy: {},
1096
+ 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 },
1097
+ 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" },
1098
+ 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]],
1099
+ performAction: /* @__PURE__ */ h(function(u, m, T, d, w, c, l) {
1100
+ var o = c.length - 1;
1101
+ switch (w) {
1102
+ case 1:
1103
+ return c[o - 1];
1104
+ case 2:
1105
+ this.$ = [];
1106
+ break;
1107
+ case 3:
1108
+ c[o - 1].push(c[o]), this.$ = c[o - 1];
1109
+ break;
1110
+ case 4:
1111
+ case 5:
1112
+ this.$ = c[o];
1113
+ break;
1114
+ case 6:
1115
+ case 7:
1116
+ this.$ = [];
1117
+ break;
1118
+ case 8:
1119
+ d.setWeekday("monday");
1120
+ break;
1121
+ case 9:
1122
+ d.setWeekday("tuesday");
1123
+ break;
1124
+ case 10:
1125
+ d.setWeekday("wednesday");
1126
+ break;
1127
+ case 11:
1128
+ d.setWeekday("thursday");
1129
+ break;
1130
+ case 12:
1131
+ d.setWeekday("friday");
1132
+ break;
1133
+ case 13:
1134
+ d.setWeekday("saturday");
1135
+ break;
1136
+ case 14:
1137
+ d.setWeekday("sunday");
1138
+ break;
1139
+ case 15:
1140
+ d.setWeekend("friday");
1141
+ break;
1142
+ case 16:
1143
+ d.setWeekend("saturday");
1144
+ break;
1145
+ case 17:
1146
+ d.setDateFormat(c[o].substr(11)), this.$ = c[o].substr(11);
1147
+ break;
1148
+ case 18:
1149
+ d.enableInclusiveEndDates(), this.$ = c[o].substr(18);
1150
+ break;
1151
+ case 19:
1152
+ d.TopAxis(), this.$ = c[o].substr(8);
1153
+ break;
1154
+ case 20:
1155
+ d.setAxisFormat(c[o].substr(11)), this.$ = c[o].substr(11);
1156
+ break;
1157
+ case 21:
1158
+ d.setTickInterval(c[o].substr(13)), this.$ = c[o].substr(13);
1159
+ break;
1160
+ case 22:
1161
+ d.setExcludes(c[o].substr(9)), this.$ = c[o].substr(9);
1162
+ break;
1163
+ case 23:
1164
+ d.setIncludes(c[o].substr(9)), this.$ = c[o].substr(9);
1165
+ break;
1166
+ case 24:
1167
+ d.setTodayMarker(c[o].substr(12)), this.$ = c[o].substr(12);
1168
+ break;
1169
+ case 27:
1170
+ d.setDiagramTitle(c[o].substr(6)), this.$ = c[o].substr(6);
1171
+ break;
1172
+ case 28:
1173
+ this.$ = c[o].trim(), d.setAccTitle(this.$);
1174
+ break;
1175
+ case 29:
1176
+ case 30:
1177
+ this.$ = c[o].trim(), d.setAccDescription(this.$);
1178
+ break;
1179
+ case 31:
1180
+ d.addSection(c[o].substr(8)), this.$ = c[o].substr(8);
1181
+ break;
1182
+ case 33:
1183
+ d.addTask(c[o - 1], c[o]), this.$ = "task";
1184
+ break;
1185
+ case 34:
1186
+ this.$ = c[o - 1], d.setClickEvent(c[o - 1], c[o], null);
1187
+ break;
1188
+ case 35:
1189
+ this.$ = c[o - 2], d.setClickEvent(c[o - 2], c[o - 1], c[o]);
1190
+ break;
1191
+ case 36:
1192
+ this.$ = c[o - 2], d.setClickEvent(c[o - 2], c[o - 1], null), d.setLink(c[o - 2], c[o]);
1193
+ break;
1194
+ case 37:
1195
+ this.$ = c[o - 3], d.setClickEvent(c[o - 3], c[o - 2], c[o - 1]), d.setLink(c[o - 3], c[o]);
1196
+ break;
1197
+ case 38:
1198
+ this.$ = c[o - 2], d.setClickEvent(c[o - 2], c[o], null), d.setLink(c[o - 2], c[o - 1]);
1199
+ break;
1200
+ case 39:
1201
+ this.$ = c[o - 3], d.setClickEvent(c[o - 3], c[o - 1], c[o]), d.setLink(c[o - 3], c[o - 2]);
1202
+ break;
1203
+ case 40:
1204
+ this.$ = c[o - 1], d.setLink(c[o - 1], c[o]);
1205
+ break;
1206
+ case 41:
1207
+ case 47:
1208
+ this.$ = c[o - 1] + " " + c[o];
1209
+ break;
1210
+ case 42:
1211
+ case 43:
1212
+ case 45:
1213
+ this.$ = c[o - 2] + " " + c[o - 1] + " " + c[o];
1214
+ break;
1215
+ case 44:
1216
+ case 46:
1217
+ this.$ = c[o - 3] + " " + c[o - 2] + " " + c[o - 1] + " " + c[o];
1218
+ break;
1219
+ }
1220
+ }, "anonymous"),
1221
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: n, 13: r, 14: i, 15: a, 16: s, 17: y, 18: _, 19: 18, 20: p, 21: g, 22: E, 23: C, 24: b, 25: X, 26: O, 27: M, 28: I, 29: V, 30: W, 31: Z, 33: Q, 35: D, 36: H, 37: 24, 38: x, 40: Y }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 36, 11: 17, 12: n, 13: r, 14: i, 15: a, 16: s, 17: y, 18: _, 19: 18, 20: p, 21: g, 22: E, 23: C, 24: b, 25: X, 26: O, 27: M, 28: I, 29: V, 30: W, 31: Z, 33: Q, 35: D, 36: H, 37: 24, 38: x, 40: Y }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 17]), t(e, [2, 18]), t(e, [2, 19]), t(e, [2, 20]), t(e, [2, 21]), t(e, [2, 22]), t(e, [2, 23]), t(e, [2, 24]), t(e, [2, 25]), t(e, [2, 26]), t(e, [2, 27]), { 32: [1, 37] }, { 34: [1, 38] }, t(e, [2, 30]), t(e, [2, 31]), t(e, [2, 32]), { 39: [1, 39] }, t(e, [2, 8]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 11]), t(e, [2, 12]), t(e, [2, 13]), t(e, [2, 14]), t(e, [2, 15]), t(e, [2, 16]), { 41: [1, 40], 43: [1, 41] }, t(e, [2, 4]), t(e, [2, 28]), t(e, [2, 29]), t(e, [2, 33]), t(e, [2, 34], { 42: [1, 42], 43: [1, 43] }), t(e, [2, 40], { 41: [1, 44] }), t(e, [2, 35], { 43: [1, 45] }), t(e, [2, 36]), t(e, [2, 38], { 42: [1, 46] }), t(e, [2, 37]), t(e, [2, 39])],
1222
+ defaultActions: {},
1223
+ parseError: /* @__PURE__ */ h(function(u, m) {
1224
+ if (m.recoverable)
1225
+ this.trace(u);
1226
+ else {
1227
+ var T = new Error(u);
1228
+ throw T.hash = m, T;
1229
+ }
1230
+ }, "parseError"),
1231
+ parse: /* @__PURE__ */ h(function(u) {
1232
+ var m = this, T = [0], d = [], w = [null], c = [], l = this.table, o = "", P = 0, z = 0, R = 2, K = 1, G = c.slice.call(arguments, 1), $ = Object.create(this.lexer), at = { yy: {} };
1233
+ for (var k in this.yy)
1234
+ Object.prototype.hasOwnProperty.call(this.yy, k) && (at.yy[k] = this.yy[k]);
1235
+ $.setInput(u, at.yy), at.yy.lexer = $, at.yy.parser = this, typeof $.yylloc > "u" && ($.yylloc = {});
1236
+ var A = $.yylloc;
1237
+ c.push(A);
1238
+ var N = $.options && $.options.ranges;
1239
+ typeof at.yy.parseError == "function" ? this.parseError = at.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
1240
+ function f(ot) {
1241
+ T.length = T.length - 2 * ot, w.length = w.length - ot, c.length = c.length - ot;
1242
+ }
1243
+ h(f, "popStack");
1244
+ function J() {
1245
+ var ot;
1246
+ return ot = d.pop() || $.lex() || K, typeof ot != "number" && (ot instanceof Array && (d = ot, ot = d.pop()), ot = m.symbols_[ot] || ot), ot;
1247
+ }
1248
+ h(J, "lex");
1249
+ for (var L, j, q, rt, st = {}, pt, lt, Ae, Bt; ; ) {
1250
+ if (j = T[T.length - 1], this.defaultActions[j] ? q = this.defaultActions[j] : ((L === null || typeof L > "u") && (L = J()), q = l[j] && l[j][L]), typeof q > "u" || !q.length || !q[0]) {
1251
+ var ne = "";
1252
+ Bt = [];
1253
+ for (pt in l[j])
1254
+ this.terminals_[pt] && pt > R && Bt.push("'" + this.terminals_[pt] + "'");
1255
+ $.showPosition ? ne = "Parse error on line " + (P + 1) + `:
1256
+ ` + $.showPosition() + `
1257
+ Expecting ` + Bt.join(", ") + ", got '" + (this.terminals_[L] || L) + "'" : ne = "Parse error on line " + (P + 1) + ": Unexpected " + (L == K ? "end of input" : "'" + (this.terminals_[L] || L) + "'"), this.parseError(ne, {
1258
+ text: $.match,
1259
+ token: this.terminals_[L] || L,
1260
+ line: $.yylineno,
1261
+ loc: A,
1262
+ expected: Bt
1263
+ });
1264
+ }
1265
+ if (q[0] instanceof Array && q.length > 1)
1266
+ throw new Error("Parse Error: multiple actions possible at state: " + j + ", token: " + L);
1267
+ switch (q[0]) {
1268
+ case 1:
1269
+ T.push(L), w.push($.yytext), c.push($.yylloc), T.push(q[1]), L = null, z = $.yyleng, o = $.yytext, P = $.yylineno, A = $.yylloc;
1270
+ break;
1271
+ case 2:
1272
+ if (lt = this.productions_[q[1]][1], st.$ = w[w.length - lt], st._$ = {
1273
+ first_line: c[c.length - (lt || 1)].first_line,
1274
+ last_line: c[c.length - 1].last_line,
1275
+ first_column: c[c.length - (lt || 1)].first_column,
1276
+ last_column: c[c.length - 1].last_column
1277
+ }, N && (st._$.range = [
1278
+ c[c.length - (lt || 1)].range[0],
1279
+ c[c.length - 1].range[1]
1280
+ ]), rt = this.performAction.apply(st, [
1281
+ o,
1282
+ z,
1283
+ P,
1284
+ at.yy,
1285
+ q[1],
1286
+ w,
1287
+ c
1288
+ ].concat(G)), typeof rt < "u")
1289
+ return rt;
1290
+ lt && (T = T.slice(0, -1 * lt * 2), w = w.slice(0, -1 * lt), c = c.slice(0, -1 * lt)), T.push(this.productions_[q[1]][0]), w.push(st.$), c.push(st._$), Ae = l[T[T.length - 2]][T[T.length - 1]], T.push(Ae);
1291
+ break;
1292
+ case 3:
1293
+ return !0;
1294
+ }
1295
+ }
1296
+ return !0;
1297
+ }, "parse")
1298
+ }, S = /* @__PURE__ */ function() {
1299
+ var U = {
1300
+ EOF: 1,
1301
+ parseError: /* @__PURE__ */ h(function(m, T) {
1302
+ if (this.yy.parser)
1303
+ this.yy.parser.parseError(m, T);
1304
+ else
1305
+ throw new Error(m);
1306
+ }, "parseError"),
1307
+ // resets the lexer, sets new input
1308
+ setInput: /* @__PURE__ */ h(function(u, m) {
1309
+ return this.yy = m || this.yy || {}, this._input = u, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
1310
+ first_line: 1,
1311
+ first_column: 0,
1312
+ last_line: 1,
1313
+ last_column: 0
1314
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
1315
+ }, "setInput"),
1316
+ // consumes and returns one char from the input
1317
+ input: /* @__PURE__ */ h(function() {
1318
+ var u = this._input[0];
1319
+ this.yytext += u, this.yyleng++, this.offset++, this.match += u, this.matched += u;
1320
+ var m = u.match(/(?:\r\n?|\n).*/g);
1321
+ return m ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), u;
1322
+ }, "input"),
1323
+ // unshifts one char (or a string) into the input
1324
+ unput: /* @__PURE__ */ h(function(u) {
1325
+ var m = u.length, T = u.split(/(?:\r\n?|\n)/g);
1326
+ this._input = u + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - m), this.offset -= m;
1327
+ var d = this.match.split(/(?:\r\n?|\n)/g);
1328
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), T.length - 1 && (this.yylineno -= T.length - 1);
1329
+ var w = this.yylloc.range;
1330
+ return this.yylloc = {
1331
+ first_line: this.yylloc.first_line,
1332
+ last_line: this.yylineno + 1,
1333
+ first_column: this.yylloc.first_column,
1334
+ last_column: T ? (T.length === d.length ? this.yylloc.first_column : 0) + d[d.length - T.length].length - T[0].length : this.yylloc.first_column - m
1335
+ }, this.options.ranges && (this.yylloc.range = [w[0], w[0] + this.yyleng - m]), this.yyleng = this.yytext.length, this;
1336
+ }, "unput"),
1337
+ // When called from action, caches matched text and appends it on next action
1338
+ more: /* @__PURE__ */ h(function() {
1339
+ return this._more = !0, this;
1340
+ }, "more"),
1341
+ // 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.
1342
+ reject: /* @__PURE__ */ h(function() {
1343
+ if (this.options.backtrack_lexer)
1344
+ this._backtrack = !0;
1345
+ else
1346
+ 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).
1347
+ ` + this.showPosition(), {
1348
+ text: "",
1349
+ token: null,
1350
+ line: this.yylineno
1351
+ });
1352
+ return this;
1353
+ }, "reject"),
1354
+ // retain first n characters of the match
1355
+ less: /* @__PURE__ */ h(function(u) {
1356
+ this.unput(this.match.slice(u));
1357
+ }, "less"),
1358
+ // displays already matched input, i.e. for error messages
1359
+ pastInput: /* @__PURE__ */ h(function() {
1360
+ var u = this.matched.substr(0, this.matched.length - this.match.length);
1361
+ return (u.length > 20 ? "..." : "") + u.substr(-20).replace(/\n/g, "");
1362
+ }, "pastInput"),
1363
+ // displays upcoming input, i.e. for error messages
1364
+ upcomingInput: /* @__PURE__ */ h(function() {
1365
+ var u = this.match;
1366
+ return u.length < 20 && (u += this._input.substr(0, 20 - u.length)), (u.substr(0, 20) + (u.length > 20 ? "..." : "")).replace(/\n/g, "");
1367
+ }, "upcomingInput"),
1368
+ // displays the character position where the lexing error occurred, i.e. for error messages
1369
+ showPosition: /* @__PURE__ */ h(function() {
1370
+ var u = this.pastInput(), m = new Array(u.length + 1).join("-");
1371
+ return u + this.upcomingInput() + `
1372
+ ` + m + "^";
1373
+ }, "showPosition"),
1374
+ // test the lexed token: return FALSE when not a match, otherwise return token
1375
+ test_match: /* @__PURE__ */ h(function(u, m) {
1376
+ var T, d, w;
1377
+ if (this.options.backtrack_lexer && (w = {
1378
+ yylineno: this.yylineno,
1379
+ yylloc: {
1380
+ first_line: this.yylloc.first_line,
1381
+ last_line: this.last_line,
1382
+ first_column: this.yylloc.first_column,
1383
+ last_column: this.yylloc.last_column
1384
+ },
1385
+ yytext: this.yytext,
1386
+ match: this.match,
1387
+ matches: this.matches,
1388
+ matched: this.matched,
1389
+ yyleng: this.yyleng,
1390
+ offset: this.offset,
1391
+ _more: this._more,
1392
+ _input: this._input,
1393
+ yy: this.yy,
1394
+ conditionStack: this.conditionStack.slice(0),
1395
+ done: this.done
1396
+ }, this.options.ranges && (w.yylloc.range = this.yylloc.range.slice(0))), d = u[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
1397
+ first_line: this.yylloc.last_line,
1398
+ last_line: this.yylineno + 1,
1399
+ first_column: this.yylloc.last_column,
1400
+ last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + u[0].length
1401
+ }, this.yytext += u[0], this.match += u[0], this.matches = u, 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(u[0].length), this.matched += u[0], T = this.performAction.call(this, this.yy, this, m, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), T)
1402
+ return T;
1403
+ if (this._backtrack) {
1404
+ for (var c in w)
1405
+ this[c] = w[c];
1406
+ return !1;
1407
+ }
1408
+ return !1;
1409
+ }, "test_match"),
1410
+ // return next match in input
1411
+ next: /* @__PURE__ */ h(function() {
1412
+ if (this.done)
1413
+ return this.EOF;
1414
+ this._input || (this.done = !0);
1415
+ var u, m, T, d;
1416
+ this._more || (this.yytext = "", this.match = "");
1417
+ for (var w = this._currentRules(), c = 0; c < w.length; c++)
1418
+ if (T = this._input.match(this.rules[w[c]]), T && (!m || T[0].length > m[0].length)) {
1419
+ if (m = T, d = c, this.options.backtrack_lexer) {
1420
+ if (u = this.test_match(T, w[c]), u !== !1)
1421
+ return u;
1422
+ if (this._backtrack) {
1423
+ m = !1;
1424
+ continue;
1425
+ } else
1426
+ return !1;
1427
+ } else if (!this.options.flex)
1428
+ break;
1429
+ }
1430
+ return m ? (u = this.test_match(m, w[d]), u !== !1 ? u : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
1431
+ ` + this.showPosition(), {
1432
+ text: "",
1433
+ token: null,
1434
+ line: this.yylineno
1435
+ });
1436
+ }, "next"),
1437
+ // return next match that has a token
1438
+ lex: /* @__PURE__ */ h(function() {
1439
+ var m = this.next();
1440
+ return m || this.lex();
1441
+ }, "lex"),
1442
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
1443
+ begin: /* @__PURE__ */ h(function(m) {
1444
+ this.conditionStack.push(m);
1445
+ }, "begin"),
1446
+ // pop the previously active lexer condition state off the condition stack
1447
+ popState: /* @__PURE__ */ h(function() {
1448
+ var m = this.conditionStack.length - 1;
1449
+ return m > 0 ? this.conditionStack.pop() : this.conditionStack[0];
1450
+ }, "popState"),
1451
+ // produce the lexer rule set which is active for the currently active lexer condition state
1452
+ _currentRules: /* @__PURE__ */ h(function() {
1453
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
1454
+ }, "_currentRules"),
1455
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
1456
+ topState: /* @__PURE__ */ h(function(m) {
1457
+ return m = this.conditionStack.length - 1 - Math.abs(m || 0), m >= 0 ? this.conditionStack[m] : "INITIAL";
1458
+ }, "topState"),
1459
+ // alias for begin(condition)
1460
+ pushState: /* @__PURE__ */ h(function(m) {
1461
+ this.begin(m);
1462
+ }, "pushState"),
1463
+ // return the number of states currently on the stack
1464
+ stateStackSize: /* @__PURE__ */ h(function() {
1465
+ return this.conditionStack.length;
1466
+ }, "stateStackSize"),
1467
+ options: { "case-insensitive": !0 },
1468
+ performAction: /* @__PURE__ */ h(function(m, T, d, w) {
1469
+ switch (d) {
1470
+ case 0:
1471
+ return this.begin("open_directive"), "open_directive";
1472
+ case 1:
1473
+ return this.begin("acc_title"), 31;
1474
+ case 2:
1475
+ return this.popState(), "acc_title_value";
1476
+ case 3:
1477
+ return this.begin("acc_descr"), 33;
1478
+ case 4:
1479
+ return this.popState(), "acc_descr_value";
1480
+ case 5:
1481
+ this.begin("acc_descr_multiline");
1482
+ break;
1483
+ case 6:
1484
+ this.popState();
1485
+ break;
1486
+ case 7:
1487
+ return "acc_descr_multiline_value";
1488
+ case 8:
1489
+ break;
1490
+ case 9:
1491
+ break;
1492
+ case 10:
1493
+ break;
1494
+ case 11:
1495
+ return 10;
1496
+ case 12:
1497
+ break;
1498
+ case 13:
1499
+ break;
1500
+ case 14:
1501
+ this.begin("href");
1502
+ break;
1503
+ case 15:
1504
+ this.popState();
1505
+ break;
1506
+ case 16:
1507
+ return 43;
1508
+ case 17:
1509
+ this.begin("callbackname");
1510
+ break;
1511
+ case 18:
1512
+ this.popState();
1513
+ break;
1514
+ case 19:
1515
+ this.popState(), this.begin("callbackargs");
1516
+ break;
1517
+ case 20:
1518
+ return 41;
1519
+ case 21:
1520
+ this.popState();
1521
+ break;
1522
+ case 22:
1523
+ return 42;
1524
+ case 23:
1525
+ this.begin("click");
1526
+ break;
1527
+ case 24:
1528
+ this.popState();
1529
+ break;
1530
+ case 25:
1531
+ return 40;
1532
+ case 26:
1533
+ return 4;
1534
+ case 27:
1535
+ return 22;
1536
+ case 28:
1537
+ return 23;
1538
+ case 29:
1539
+ return 24;
1540
+ case 30:
1541
+ return 25;
1542
+ case 31:
1543
+ return 26;
1544
+ case 32:
1545
+ return 28;
1546
+ case 33:
1547
+ return 27;
1548
+ case 34:
1549
+ return 29;
1550
+ case 35:
1551
+ return 12;
1552
+ case 36:
1553
+ return 13;
1554
+ case 37:
1555
+ return 14;
1556
+ case 38:
1557
+ return 15;
1558
+ case 39:
1559
+ return 16;
1560
+ case 40:
1561
+ return 17;
1562
+ case 41:
1563
+ return 18;
1564
+ case 42:
1565
+ return 20;
1566
+ case 43:
1567
+ return 21;
1568
+ case 44:
1569
+ return "date";
1570
+ case 45:
1571
+ return 30;
1572
+ case 46:
1573
+ return "accDescription";
1574
+ case 47:
1575
+ return 36;
1576
+ case 48:
1577
+ return 38;
1578
+ case 49:
1579
+ return 39;
1580
+ case 50:
1581
+ return ":";
1582
+ case 51:
1583
+ return 6;
1584
+ case 52:
1585
+ return "INVALID";
1586
+ }
1587
+ }, "anonymous"),
1588
+ 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],
1589
+ 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 } }
1590
+ };
1591
+ return U;
1592
+ }();
1593
+ F.lexer = S;
1594
+ function v() {
1595
+ this.yy = {};
1596
+ }
1597
+ return h(v, "Parser"), v.prototype = F, F.Parser = v, new v();
1598
+ }();
1599
+ ye.parser = ye;
1600
+ var Ai = ye;
1601
+ it.extend(Fi);
1602
+ it.extend(Ui);
1603
+ it.extend(Li);
1604
+ var Ge = { friday: 5, saturday: 6 }, ut = "", De = "", Ce = void 0, Me = "", zt = [], Pt = [], _e = /* @__PURE__ */ new Map(), Se = [], te = [], Et = "", Fe = "", wn = ["active", "done", "crit", "milestone", "vert"], Ye = [], Rt = !1, Ue = !1, Ee = "sunday", ee = "saturday", ke = 0, Ii = /* @__PURE__ */ h(function() {
1605
+ Se = [], te = [], Et = "", Ye = [], Gt = 0, ve = void 0, jt = void 0, tt = [], ut = "", De = "", Fe = "", Ce = void 0, Me = "", zt = [], Pt = [], Rt = !1, Ue = !1, ke = 0, _e = /* @__PURE__ */ new Map(), Pn(), Ee = "sunday", ee = "saturday";
1606
+ }, "clear"), Wi = /* @__PURE__ */ h(function(t) {
1607
+ De = t;
1608
+ }, "setAxisFormat"), Oi = /* @__PURE__ */ h(function() {
1609
+ return De;
1610
+ }, "getAxisFormat"), Hi = /* @__PURE__ */ h(function(t) {
1611
+ Ce = t;
1612
+ }, "setTickInterval"), Ni = /* @__PURE__ */ h(function() {
1613
+ return Ce;
1614
+ }, "getTickInterval"), Vi = /* @__PURE__ */ h(function(t) {
1615
+ Me = t;
1616
+ }, "setTodayMarker"), zi = /* @__PURE__ */ h(function() {
1617
+ return Me;
1618
+ }, "getTodayMarker"), Pi = /* @__PURE__ */ h(function(t) {
1619
+ ut = t;
1620
+ }, "setDateFormat"), Ri = /* @__PURE__ */ h(function() {
1621
+ Rt = !0;
1622
+ }, "enableInclusiveEndDates"), Bi = /* @__PURE__ */ h(function() {
1623
+ return Rt;
1624
+ }, "endDatesAreInclusive"), Zi = /* @__PURE__ */ h(function() {
1625
+ Ue = !0;
1626
+ }, "enableTopAxis"), qi = /* @__PURE__ */ h(function() {
1627
+ return Ue;
1628
+ }, "topAxisEnabled"), Xi = /* @__PURE__ */ h(function(t) {
1629
+ Fe = t;
1630
+ }, "setDisplayMode"), Gi = /* @__PURE__ */ h(function() {
1631
+ return Fe;
1632
+ }, "getDisplayMode"), ji = /* @__PURE__ */ h(function() {
1633
+ return ut;
1634
+ }, "getDateFormat"), Qi = /* @__PURE__ */ h(function(t) {
1635
+ zt = t.toLowerCase().split(/[\s,]+/);
1636
+ }, "setIncludes"), $i = /* @__PURE__ */ h(function() {
1637
+ return zt;
1638
+ }, "getIncludes"), Ji = /* @__PURE__ */ h(function(t) {
1639
+ Pt = t.toLowerCase().split(/[\s,]+/);
1640
+ }, "setExcludes"), Ki = /* @__PURE__ */ h(function() {
1641
+ return Pt;
1642
+ }, "getExcludes"), ta = /* @__PURE__ */ h(function() {
1643
+ return _e;
1644
+ }, "getLinks"), ea = /* @__PURE__ */ h(function(t) {
1645
+ Et = t, Se.push(t);
1646
+ }, "addSection"), na = /* @__PURE__ */ h(function() {
1647
+ return Se;
1648
+ }, "getSections"), ra = /* @__PURE__ */ h(function() {
1649
+ let t = je();
1650
+ const e = 10;
1651
+ let n = 0;
1652
+ for (; !t && n < e; )
1653
+ t = je(), n++;
1654
+ return te = tt, te;
1655
+ }, "getTasks"), Dn = /* @__PURE__ */ h(function(t, e, n, r) {
1656
+ const i = t.format(e.trim()), a = t.format("YYYY-MM-DD");
1657
+ return r.includes(i) || r.includes(a) ? !1 : n.includes("weekends") && (t.isoWeekday() === Ge[ee] || t.isoWeekday() === Ge[ee] + 1) || n.includes(t.format("dddd").toLowerCase()) ? !0 : n.includes(i) || n.includes(a);
1658
+ }, "isInvalidDate"), ia = /* @__PURE__ */ h(function(t) {
1659
+ Ee = t;
1660
+ }, "setWeekday"), aa = /* @__PURE__ */ h(function() {
1661
+ return Ee;
1662
+ }, "getWeekday"), sa = /* @__PURE__ */ h(function(t) {
1663
+ ee = t;
1664
+ }, "setWeekend"), Cn = /* @__PURE__ */ h(function(t, e, n, r) {
1665
+ if (!n.length || t.manualEndTime)
1666
+ return;
1667
+ let i;
1668
+ t.startTime instanceof Date ? i = it(t.startTime) : i = it(t.startTime, e, !0), i = i.add(1, "d");
1669
+ let a;
1670
+ t.endTime instanceof Date ? a = it(t.endTime) : a = it(t.endTime, e, !0);
1671
+ const [s, y] = oa(
1672
+ i,
1673
+ a,
1674
+ e,
1675
+ n,
1676
+ r
1677
+ );
1678
+ t.endTime = s.toDate(), t.renderEndTime = y;
1679
+ }, "checkTaskDates"), oa = /* @__PURE__ */ h(function(t, e, n, r, i) {
1680
+ let a = !1, s = null;
1681
+ for (; t <= e; )
1682
+ a || (s = e.toDate()), a = Dn(t, n, r, i), a && (e = e.add(1, "d")), t = t.add(1, "d");
1683
+ return [e, s];
1684
+ }, "fixTaskDates"), pe = /* @__PURE__ */ h(function(t, e, n) {
1685
+ if (n = n.trim(), (e.trim() === "x" || e.trim() === "X") && /^\d+$/.test(n))
1686
+ return new Date(Number(n));
1687
+ const i = /^after\s+(?<ids>[\d\w- ]+)/.exec(n);
1688
+ if (i !== null) {
1689
+ let s = null;
1690
+ for (const _ of i.groups.ids.split(" ")) {
1691
+ let p = Ct(_);
1692
+ p !== void 0 && (!s || p.endTime > s.endTime) && (s = p);
1693
+ }
1694
+ if (s)
1695
+ return s.endTime;
1696
+ const y = /* @__PURE__ */ new Date();
1697
+ return y.setHours(0, 0, 0, 0), y;
1698
+ }
1699
+ let a = it(n, e.trim(), !0);
1700
+ if (a.isValid())
1701
+ return a.toDate();
1702
+ {
1703
+ Qt.debug("Invalid date:" + n), Qt.debug("With date format:" + e.trim());
1704
+ const s = new Date(n);
1705
+ if (s === void 0 || isNaN(s.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously
1706
+ // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.
1707
+ // This can cause virtually infinite loops while rendering, so for the
1708
+ // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as
1709
+ // invalid.
1710
+ s.getFullYear() < -1e4 || s.getFullYear() > 1e4)
1711
+ throw new Error("Invalid date:" + n);
1712
+ return s;
1713
+ }
1714
+ }, "getStartDate"), Mn = /* @__PURE__ */ h(function(t) {
1715
+ const e = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());
1716
+ return e !== null ? [Number.parseFloat(e[1]), e[2]] : [NaN, "ms"];
1717
+ }, "parseDuration"), _n = /* @__PURE__ */ h(function(t, e, n, r = !1) {
1718
+ n = n.trim();
1719
+ const a = /^until\s+(?<ids>[\d\w- ]+)/.exec(n);
1720
+ if (a !== null) {
1721
+ let g = null;
1722
+ for (const C of a.groups.ids.split(" ")) {
1723
+ let b = Ct(C);
1724
+ b !== void 0 && (!g || b.startTime < g.startTime) && (g = b);
1725
+ }
1726
+ if (g)
1727
+ return g.startTime;
1728
+ const E = /* @__PURE__ */ new Date();
1729
+ return E.setHours(0, 0, 0, 0), E;
1730
+ }
1731
+ let s = it(n, e.trim(), !0);
1732
+ if (s.isValid())
1733
+ return r && (s = s.add(1, "d")), s.toDate();
1734
+ let y = it(t);
1735
+ const [_, p] = Mn(n);
1736
+ if (!Number.isNaN(_)) {
1737
+ const g = y.add(_, p);
1738
+ g.isValid() && (y = g);
1739
+ }
1740
+ return y.toDate();
1741
+ }, "getEndDate"), Gt = 0, Ft = /* @__PURE__ */ h(function(t) {
1742
+ return t === void 0 ? (Gt = Gt + 1, "task" + Gt) : t;
1743
+ }, "parseId"), ca = /* @__PURE__ */ h(function(t, e) {
1744
+ let n;
1745
+ e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
1746
+ const r = n.split(","), i = {};
1747
+ Le(r, i, wn);
1748
+ for (let s = 0; s < r.length; s++)
1749
+ r[s] = r[s].trim();
1750
+ let a = "";
1751
+ switch (r.length) {
1752
+ case 1:
1753
+ i.id = Ft(), i.startTime = t.endTime, a = r[0];
1754
+ break;
1755
+ case 2:
1756
+ i.id = Ft(), i.startTime = pe(void 0, ut, r[0]), a = r[1];
1757
+ break;
1758
+ case 3:
1759
+ i.id = Ft(r[0]), i.startTime = pe(void 0, ut, r[1]), a = r[2];
1760
+ break;
1761
+ }
1762
+ return a && (i.endTime = _n(i.startTime, ut, a, Rt), i.manualEndTime = it(a, "YYYY-MM-DD", !0).isValid(), Cn(i, ut, Pt, zt)), i;
1763
+ }, "compileData"), la = /* @__PURE__ */ h(function(t, e) {
1764
+ let n;
1765
+ e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
1766
+ const r = n.split(","), i = {};
1767
+ Le(r, i, wn);
1768
+ for (let a = 0; a < r.length; a++)
1769
+ r[a] = r[a].trim();
1770
+ switch (r.length) {
1771
+ case 1:
1772
+ i.id = Ft(), i.startTime = {
1773
+ type: "prevTaskEnd",
1774
+ id: t
1775
+ }, i.endTime = {
1776
+ data: r[0]
1777
+ };
1778
+ break;
1779
+ case 2:
1780
+ i.id = Ft(), i.startTime = {
1781
+ type: "getStartDate",
1782
+ startData: r[0]
1783
+ }, i.endTime = {
1784
+ data: r[1]
1785
+ };
1786
+ break;
1787
+ case 3:
1788
+ i.id = Ft(r[0]), i.startTime = {
1789
+ type: "getStartDate",
1790
+ startData: r[1]
1791
+ }, i.endTime = {
1792
+ data: r[2]
1793
+ };
1794
+ break;
1795
+ }
1796
+ return i;
1797
+ }, "parseData"), ve, jt, tt = [], Sn = {}, ua = /* @__PURE__ */ h(function(t, e) {
1798
+ const n = {
1799
+ section: Et,
1800
+ type: Et,
1801
+ processed: !1,
1802
+ manualEndTime: !1,
1803
+ renderEndTime: null,
1804
+ raw: { data: e },
1805
+ task: t,
1806
+ classes: []
1807
+ }, r = la(jt, e);
1808
+ n.raw.startTime = r.startTime, n.raw.endTime = r.endTime, n.id = r.id, n.prevTaskId = jt, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, n.vert = r.vert, n.order = ke, ke++;
1809
+ const i = tt.push(n);
1810
+ jt = n.id, Sn[n.id] = i - 1;
1811
+ }, "addTask"), Ct = /* @__PURE__ */ h(function(t) {
1812
+ const e = Sn[t];
1813
+ return tt[e];
1814
+ }, "findTaskById"), fa = /* @__PURE__ */ h(function(t, e) {
1815
+ const n = {
1816
+ section: Et,
1817
+ type: Et,
1818
+ description: t,
1819
+ task: t,
1820
+ classes: []
1821
+ }, r = ca(ve, e);
1822
+ n.startTime = r.startTime, n.endTime = r.endTime, n.id = r.id, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, n.vert = r.vert, ve = n, te.push(n);
1823
+ }, "addTaskOrg"), je = /* @__PURE__ */ h(function() {
1824
+ const t = /* @__PURE__ */ h(function(n) {
1825
+ const r = tt[n];
1826
+ let i = "";
1827
+ switch (tt[n].raw.startTime.type) {
1828
+ case "prevTaskEnd": {
1829
+ const a = Ct(r.prevTaskId);
1830
+ r.startTime = a.endTime;
1831
+ break;
1832
+ }
1833
+ case "getStartDate":
1834
+ i = pe(void 0, ut, tt[n].raw.startTime.startData), i && (tt[n].startTime = i);
1835
+ break;
1836
+ }
1837
+ return tt[n].startTime && (tt[n].endTime = _n(
1838
+ tt[n].startTime,
1839
+ ut,
1840
+ tt[n].raw.endTime.data,
1841
+ Rt
1842
+ ), tt[n].endTime && (tt[n].processed = !0, tt[n].manualEndTime = it(
1843
+ tt[n].raw.endTime.data,
1844
+ "YYYY-MM-DD",
1845
+ !0
1846
+ ).isValid(), Cn(tt[n], ut, Pt, zt))), tt[n].processed;
1847
+ }, "compileTask");
1848
+ let e = !0;
1849
+ for (const [n, r] of tt.entries())
1850
+ t(n), e = e && r.processed;
1851
+ return e;
1852
+ }, "compileTasks"), ha = /* @__PURE__ */ h(function(t, e) {
1853
+ let n = e;
1854
+ _t().securityLevel !== "loose" && (n = zn(e)), t.split(",").forEach(function(r) {
1855
+ Ct(r) !== void 0 && (Yn(r, () => {
1856
+ window.open(n, "_self");
1857
+ }), _e.set(r, n));
1858
+ }), Fn(t, "clickable");
1859
+ }, "setLink"), Fn = /* @__PURE__ */ h(function(t, e) {
1860
+ t.split(",").forEach(function(n) {
1861
+ let r = Ct(n);
1862
+ r !== void 0 && r.classes.push(e);
1863
+ });
1864
+ }, "setClass"), da = /* @__PURE__ */ h(function(t, e, n) {
1865
+ if (_t().securityLevel !== "loose" || e === void 0)
1866
+ return;
1867
+ let r = [];
1868
+ if (typeof n == "string") {
1869
+ r = n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
1870
+ for (let a = 0; a < r.length; a++) {
1871
+ let s = r[a].trim();
1872
+ s.startsWith('"') && s.endsWith('"') && (s = s.substr(1, s.length - 2)), r[a] = s;
1873
+ }
1874
+ }
1875
+ r.length === 0 && r.push(t), Ct(t) !== void 0 && Yn(t, () => {
1876
+ Rn.runFunc(e, ...r);
1877
+ });
1878
+ }, "setClickFun"), Yn = /* @__PURE__ */ h(function(t, e) {
1879
+ Ye.push(
1880
+ function() {
1881
+ const n = document.querySelector(`[id="${t}"]`);
1882
+ n !== null && n.addEventListener("click", function() {
1883
+ e();
1884
+ });
1885
+ },
1886
+ function() {
1887
+ const n = document.querySelector(`[id="${t}-text"]`);
1888
+ n !== null && n.addEventListener("click", function() {
1889
+ e();
1890
+ });
1891
+ }
1892
+ );
1893
+ }, "pushFun"), ma = /* @__PURE__ */ h(function(t, e, n) {
1894
+ t.split(",").forEach(function(r) {
1895
+ da(r, e, n);
1896
+ }), Fn(t, "clickable");
1897
+ }, "setClickEvent"), ga = /* @__PURE__ */ h(function(t) {
1898
+ Ye.forEach(function(e) {
1899
+ e(t);
1900
+ });
1901
+ }, "bindFunctions"), ya = {
1902
+ getConfig: /* @__PURE__ */ h(() => _t().gantt, "getConfig"),
1903
+ clear: Ii,
1904
+ setDateFormat: Pi,
1905
+ getDateFormat: ji,
1906
+ enableInclusiveEndDates: Ri,
1907
+ endDatesAreInclusive: Bi,
1908
+ enableTopAxis: Zi,
1909
+ topAxisEnabled: qi,
1910
+ setAxisFormat: Wi,
1911
+ getAxisFormat: Oi,
1912
+ setTickInterval: Hi,
1913
+ getTickInterval: Ni,
1914
+ setTodayMarker: Vi,
1915
+ getTodayMarker: zi,
1916
+ setAccTitle: Hn,
1917
+ getAccTitle: On,
1918
+ setDiagramTitle: Wn,
1919
+ getDiagramTitle: In,
1920
+ setDisplayMode: Xi,
1921
+ getDisplayMode: Gi,
1922
+ setAccDescription: An,
1923
+ getAccDescription: Ln,
1924
+ addSection: ea,
1925
+ getSections: na,
1926
+ getTasks: ra,
1927
+ addTask: ua,
1928
+ findTaskById: Ct,
1929
+ addTaskOrg: fa,
1930
+ setIncludes: Qi,
1931
+ getIncludes: $i,
1932
+ setExcludes: Ji,
1933
+ getExcludes: Ki,
1934
+ setClickEvent: ma,
1935
+ setLink: ha,
1936
+ getLinks: ta,
1937
+ bindFunctions: ga,
1938
+ parseDuration: Mn,
1939
+ isInvalidDate: Dn,
1940
+ setWeekday: ia,
1941
+ getWeekday: aa,
1942
+ setWeekend: sa
1943
+ };
1944
+ function Le(t, e, n) {
1945
+ let r = !0;
1946
+ for (; r; )
1947
+ r = !1, n.forEach(function(i) {
1948
+ const a = "^\\s*" + i + "\\s*$", s = new RegExp(a);
1949
+ t[0].match(s) && (e[i] = !0, t.shift(1), r = !0);
1950
+ });
1951
+ }
1952
+ h(Le, "getTaskTags");
1953
+ var ka = /* @__PURE__ */ h(function() {
1954
+ Qt.debug("Something is calling, setConf, remove the call");
1955
+ }, "setConf"), Qe = {
1956
+ monday: Ht,
1957
+ tuesday: un,
1958
+ wednesday: fn,
1959
+ thursday: bt,
1960
+ friday: hn,
1961
+ saturday: dn,
1962
+ sunday: Vt
1963
+ }, pa = /* @__PURE__ */ h((t, e) => {
1964
+ let n = [...t].map(() => -1 / 0), r = [...t].sort((a, s) => a.startTime - s.startTime || a.order - s.order), i = 0;
1965
+ for (const a of r)
1966
+ for (let s = 0; s < n.length; s++)
1967
+ if (a.startTime >= n[s]) {
1968
+ n[s] = a.endTime, a.order = s + e, s > i && (i = s);
1969
+ break;
1970
+ }
1971
+ return i;
1972
+ }, "getMaxIntersections"), ht, va = /* @__PURE__ */ h(function(t, e, n, r) {
1973
+ const i = _t().gantt, a = _t().securityLevel;
1974
+ let s;
1975
+ a === "sandbox" && (s = Zt("#i" + e));
1976
+ const y = a === "sandbox" ? Zt(s.nodes()[0].contentDocument.body) : Zt("body"), _ = a === "sandbox" ? s.nodes()[0].contentDocument : document, p = _.getElementById(e);
1977
+ ht = p.parentElement.offsetWidth, ht === void 0 && (ht = 1200), i.useWidth !== void 0 && (ht = i.useWidth);
1978
+ const g = r.db.getTasks();
1979
+ let E = [];
1980
+ for (const x of g)
1981
+ E.push(x.type);
1982
+ E = H(E);
1983
+ const C = {};
1984
+ let b = 2 * i.topPadding;
1985
+ if (r.db.getDisplayMode() === "compact" || i.displayMode === "compact") {
1986
+ const x = {};
1987
+ for (const F of g)
1988
+ x[F.section] === void 0 ? x[F.section] = [F] : x[F.section].push(F);
1989
+ let Y = 0;
1990
+ for (const F of Object.keys(x)) {
1991
+ const S = pa(x[F], Y) + 1;
1992
+ Y += S, b += S * (i.barHeight + i.barGap), C[F] = S;
1993
+ }
1994
+ } else {
1995
+ b += g.length * (i.barHeight + i.barGap);
1996
+ for (const x of E)
1997
+ C[x] = g.filter((Y) => Y.type === x).length;
1998
+ }
1999
+ p.setAttribute("viewBox", "0 0 " + ht + " " + b);
2000
+ const X = y.select(`[id="${e}"]`), O = _i().domain([
2001
+ Qn(g, function(x) {
2002
+ return x.startTime;
2003
+ }),
2004
+ jn(g, function(x) {
2005
+ return x.endTime;
2006
+ })
2007
+ ]).rangeRound([0, ht - i.leftPadding - i.rightPadding]);
2008
+ function M(x, Y) {
2009
+ const F = x.startTime, S = Y.startTime;
2010
+ let v = 0;
2011
+ return F > S ? v = 1 : F < S && (v = -1), v;
2012
+ }
2013
+ h(M, "taskCompare"), g.sort(M), I(g, ht, b), Nn(X, b, ht, i.useMaxWidth), X.append("text").text(r.db.getDiagramTitle()).attr("x", ht / 2).attr("y", i.titleTopMargin).attr("class", "titleText");
2014
+ function I(x, Y, F) {
2015
+ const S = i.barHeight, v = S + i.barGap, U = i.topPadding, u = i.leftPadding, m = Xn().domain([0, E.length]).range(["#00B9FA", "#F95002"]).interpolate(fr);
2016
+ W(
2017
+ v,
2018
+ U,
2019
+ u,
2020
+ Y,
2021
+ F,
2022
+ x,
2023
+ r.db.getExcludes(),
2024
+ r.db.getIncludes()
2025
+ ), Z(u, U, Y, F), V(x, v, U, u, S, m, Y), Q(v, U), D(u, U, Y, F);
2026
+ }
2027
+ h(I, "makeGantt");
2028
+ function V(x, Y, F, S, v, U, u) {
2029
+ x.sort((l, o) => l.vert === o.vert ? 0 : l.vert ? 1 : -1);
2030
+ const T = [...new Set(x.map((l) => l.order))].map((l) => x.find((o) => o.order === l));
2031
+ X.append("g").selectAll("rect").data(T).enter().append("rect").attr("x", 0).attr("y", function(l, o) {
2032
+ return o = l.order, o * Y + F - 2;
2033
+ }).attr("width", function() {
2034
+ return u - i.rightPadding / 2;
2035
+ }).attr("height", Y).attr("class", function(l) {
2036
+ for (const [o, P] of E.entries())
2037
+ if (l.type === P)
2038
+ return "section section" + o % i.numberSectionStyles;
2039
+ return "section section0";
2040
+ }).enter();
2041
+ const d = X.append("g").selectAll("rect").data(x).enter(), w = r.db.getLinks();
2042
+ if (d.append("rect").attr("id", function(l) {
2043
+ return l.id;
2044
+ }).attr("rx", 3).attr("ry", 3).attr("x", function(l) {
2045
+ return l.milestone ? O(l.startTime) + S + 0.5 * (O(l.endTime) - O(l.startTime)) - 0.5 * v : O(l.startTime) + S;
2046
+ }).attr("y", function(l, o) {
2047
+ return o = l.order, l.vert ? i.gridLineStartPadding : o * Y + F;
2048
+ }).attr("width", function(l) {
2049
+ return l.milestone ? v : l.vert ? 0.08 * v : O(l.renderEndTime || l.endTime) - O(l.startTime);
2050
+ }).attr("height", function(l) {
2051
+ return l.vert ? g.length * (i.barHeight + i.barGap) + i.barHeight * 2 : v;
2052
+ }).attr("transform-origin", function(l, o) {
2053
+ return o = l.order, (O(l.startTime) + S + 0.5 * (O(l.endTime) - O(l.startTime))).toString() + "px " + (o * Y + F + 0.5 * v).toString() + "px";
2054
+ }).attr("class", function(l) {
2055
+ const o = "task";
2056
+ let P = "";
2057
+ l.classes.length > 0 && (P = l.classes.join(" "));
2058
+ let z = 0;
2059
+ for (const [K, G] of E.entries())
2060
+ l.type === G && (z = K % i.numberSectionStyles);
2061
+ let R = "";
2062
+ return l.active ? l.crit ? R += " activeCrit" : R = " active" : l.done ? l.crit ? R = " doneCrit" : R = " done" : l.crit && (R += " crit"), R.length === 0 && (R = " task"), l.milestone && (R = " milestone " + R), l.vert && (R = " vert " + R), R += z, R += " " + P, o + R;
2063
+ }), d.append("text").attr("id", function(l) {
2064
+ return l.id + "-text";
2065
+ }).text(function(l) {
2066
+ return l.task;
2067
+ }).attr("font-size", i.fontSize).attr("x", function(l) {
2068
+ let o = O(l.startTime), P = O(l.renderEndTime || l.endTime);
2069
+ if (l.milestone && (o += 0.5 * (O(l.endTime) - O(l.startTime)) - 0.5 * v, P = o + v), l.vert)
2070
+ return O(l.startTime) + S;
2071
+ const z = this.getBBox().width;
2072
+ return z > P - o ? P + z + 1.5 * i.leftPadding > u ? o + S - 5 : P + S + 5 : (P - o) / 2 + o + S;
2073
+ }).attr("y", function(l, o) {
2074
+ return l.vert ? i.gridLineStartPadding + g.length * (i.barHeight + i.barGap) + 60 : (o = l.order, o * Y + i.barHeight / 2 + (i.fontSize / 2 - 2) + F);
2075
+ }).attr("text-height", v).attr("class", function(l) {
2076
+ const o = O(l.startTime);
2077
+ let P = O(l.endTime);
2078
+ l.milestone && (P = o + v);
2079
+ const z = this.getBBox().width;
2080
+ let R = "";
2081
+ l.classes.length > 0 && (R = l.classes.join(" "));
2082
+ let K = 0;
2083
+ for (const [$, at] of E.entries())
2084
+ l.type === at && (K = $ % i.numberSectionStyles);
2085
+ let G = "";
2086
+ return l.active && (l.crit ? G = "activeCritText" + K : G = "activeText" + K), l.done ? l.crit ? G = G + " doneCritText" + K : G = G + " doneText" + K : l.crit && (G = G + " critText" + K), l.milestone && (G += " milestoneText"), l.vert && (G += " vertText"), z > P - o ? P + z + 1.5 * i.leftPadding > u ? R + " taskTextOutsideLeft taskTextOutside" + K + " " + G : R + " taskTextOutsideRight taskTextOutside" + K + " " + G + " width-" + z : R + " taskText taskText" + K + " " + G + " width-" + z;
2087
+ }), _t().securityLevel === "sandbox") {
2088
+ let l;
2089
+ l = Zt("#i" + e);
2090
+ const o = l.nodes()[0].contentDocument;
2091
+ d.filter(function(P) {
2092
+ return w.has(P.id);
2093
+ }).each(function(P) {
2094
+ var z = o.querySelector("#" + P.id), R = o.querySelector("#" + P.id + "-text");
2095
+ const K = z.parentNode;
2096
+ var G = o.createElement("a");
2097
+ G.setAttribute("xlink:href", w.get(P.id)), G.setAttribute("target", "_top"), K.appendChild(G), G.appendChild(z), G.appendChild(R);
2098
+ });
2099
+ }
2100
+ }
2101
+ h(V, "drawRects");
2102
+ function W(x, Y, F, S, v, U, u, m) {
2103
+ if (u.length === 0 && m.length === 0)
2104
+ return;
2105
+ let T, d;
2106
+ for (const { startTime: z, endTime: R } of U)
2107
+ (T === void 0 || z < T) && (T = z), (d === void 0 || R > d) && (d = R);
2108
+ if (!T || !d)
2109
+ return;
2110
+ if (it(d).diff(it(T), "year") > 5) {
2111
+ Qt.warn(
2112
+ "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days."
2113
+ );
2114
+ return;
2115
+ }
2116
+ const w = r.db.getDateFormat(), c = [];
2117
+ let l = null, o = it(T);
2118
+ for (; o.valueOf() <= d; )
2119
+ r.db.isInvalidDate(o, w, u, m) ? l ? l.end = o : l = {
2120
+ start: o,
2121
+ end: o
2122
+ } : l && (c.push(l), l = null), o = o.add(1, "d");
2123
+ X.append("g").selectAll("rect").data(c).enter().append("rect").attr("id", (z) => "exclude-" + z.start.format("YYYY-MM-DD")).attr("x", (z) => O(z.start.startOf("day")) + F).attr("y", i.gridLineStartPadding).attr("width", (z) => O(z.end.endOf("day")) - O(z.start.startOf("day"))).attr("height", v - Y - i.gridLineStartPadding).attr("transform-origin", function(z, R) {
2124
+ return (O(z.start) + F + 0.5 * (O(z.end) - O(z.start))).toString() + "px " + (R * x + 0.5 * v).toString() + "px";
2125
+ }).attr("class", "exclude-range");
2126
+ }
2127
+ h(W, "drawExcludeDays");
2128
+ function Z(x, Y, F, S) {
2129
+ const v = r.db.getDateFormat(), U = r.db.getAxisFormat();
2130
+ let u;
2131
+ U ? u = U : v === "D" ? u = "%d" : u = i.axisFormat ?? "%Y-%m-%d";
2132
+ let m = ir(O).tickSize(-S + Y + i.gridLineStartPadding).tickFormat(Kt(u));
2133
+ const d = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(
2134
+ r.db.getTickInterval() || i.tickInterval
2135
+ );
2136
+ if (d !== null) {
2137
+ const w = d[1], c = d[2], l = r.db.getWeekday() || i.weekday;
2138
+ switch (c) {
2139
+ case "millisecond":
2140
+ m.ticks(Yt.every(w));
2141
+ break;
2142
+ case "second":
2143
+ m.ticks(vt.every(w));
2144
+ break;
2145
+ case "minute":
2146
+ m.ticks(Wt.every(w));
2147
+ break;
2148
+ case "hour":
2149
+ m.ticks(Ot.every(w));
2150
+ break;
2151
+ case "day":
2152
+ m.ticks(Tt.every(w));
2153
+ break;
2154
+ case "week":
2155
+ m.ticks(Qe[l].every(w));
2156
+ break;
2157
+ case "month":
2158
+ m.ticks(Nt.every(w));
2159
+ break;
2160
+ }
2161
+ }
2162
+ if (X.append("g").attr("class", "grid").attr("transform", "translate(" + x + ", " + (S - 50) + ")").call(m).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), r.db.topAxisEnabled() || i.topAxis) {
2163
+ let w = rr(O).tickSize(-S + Y + i.gridLineStartPadding).tickFormat(Kt(u));
2164
+ if (d !== null) {
2165
+ const c = d[1], l = d[2], o = r.db.getWeekday() || i.weekday;
2166
+ switch (l) {
2167
+ case "millisecond":
2168
+ w.ticks(Yt.every(c));
2169
+ break;
2170
+ case "second":
2171
+ w.ticks(vt.every(c));
2172
+ break;
2173
+ case "minute":
2174
+ w.ticks(Wt.every(c));
2175
+ break;
2176
+ case "hour":
2177
+ w.ticks(Ot.every(c));
2178
+ break;
2179
+ case "day":
2180
+ w.ticks(Tt.every(c));
2181
+ break;
2182
+ case "week":
2183
+ w.ticks(Qe[o].every(c));
2184
+ break;
2185
+ case "month":
2186
+ w.ticks(Nt.every(c));
2187
+ break;
2188
+ }
2189
+ }
2190
+ X.append("g").attr("class", "grid").attr("transform", "translate(" + x + ", " + Y + ")").call(w).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
2191
+ }
2192
+ }
2193
+ h(Z, "makeGrid");
2194
+ function Q(x, Y) {
2195
+ let F = 0;
2196
+ const S = Object.keys(C).map((v) => [v, C[v]]);
2197
+ X.append("g").selectAll("text").data(S).enter().append(function(v) {
2198
+ const U = v[0].split(Vn.lineBreakRegex), u = -(U.length - 1) / 2, m = _.createElementNS("http://www.w3.org/2000/svg", "text");
2199
+ m.setAttribute("dy", u + "em");
2200
+ for (const [T, d] of U.entries()) {
2201
+ const w = _.createElementNS("http://www.w3.org/2000/svg", "tspan");
2202
+ w.setAttribute("alignment-baseline", "central"), w.setAttribute("x", "10"), T > 0 && w.setAttribute("dy", "1em"), w.textContent = d, m.appendChild(w);
2203
+ }
2204
+ return m;
2205
+ }).attr("x", 10).attr("y", function(v, U) {
2206
+ if (U > 0)
2207
+ for (let u = 0; u < U; u++)
2208
+ return F += S[U - 1][1], v[1] * x / 2 + F * x + Y;
2209
+ else
2210
+ return v[1] * x / 2 + Y;
2211
+ }).attr("font-size", i.sectionFontSize).attr("class", function(v) {
2212
+ for (const [U, u] of E.entries())
2213
+ if (v[0] === u)
2214
+ return "sectionTitle sectionTitle" + U % i.numberSectionStyles;
2215
+ return "sectionTitle";
2216
+ });
2217
+ }
2218
+ h(Q, "vertLabels");
2219
+ function D(x, Y, F, S) {
2220
+ const v = r.db.getTodayMarker();
2221
+ if (v === "off")
2222
+ return;
2223
+ const U = X.append("g").attr("class", "today"), u = /* @__PURE__ */ new Date(), m = U.append("line");
2224
+ m.attr("x1", O(u) + x).attr("x2", O(u) + x).attr("y1", i.titleTopMargin).attr("y2", S - i.titleTopMargin).attr("class", "today"), v !== "" && m.attr("style", v.replace(/,/g, ";"));
2225
+ }
2226
+ h(D, "drawToday");
2227
+ function H(x) {
2228
+ const Y = {}, F = [];
2229
+ for (let S = 0, v = x.length; S < v; ++S)
2230
+ Object.prototype.hasOwnProperty.call(Y, x[S]) || (Y[x[S]] = !0, F.push(x[S]));
2231
+ return F;
2232
+ }
2233
+ h(H, "checkUnique");
2234
+ }, "draw"), Ta = {
2235
+ setConf: ka,
2236
+ draw: va
2237
+ }, ba = /* @__PURE__ */ h((t) => `
2238
+ .mermaid-main-font {
2239
+ font-family: ${t.fontFamily};
2240
+ }
2241
+
2242
+ .exclude-range {
2243
+ fill: ${t.excludeBkgColor};
2244
+ }
2245
+
2246
+ .section {
2247
+ stroke: none;
2248
+ opacity: 0.2;
2249
+ }
2250
+
2251
+ .section0 {
2252
+ fill: ${t.sectionBkgColor};
2253
+ }
2254
+
2255
+ .section2 {
2256
+ fill: ${t.sectionBkgColor2};
2257
+ }
2258
+
2259
+ .section1,
2260
+ .section3 {
2261
+ fill: ${t.altSectionBkgColor};
2262
+ opacity: 0.2;
2263
+ }
2264
+
2265
+ .sectionTitle0 {
2266
+ fill: ${t.titleColor};
2267
+ }
2268
+
2269
+ .sectionTitle1 {
2270
+ fill: ${t.titleColor};
2271
+ }
2272
+
2273
+ .sectionTitle2 {
2274
+ fill: ${t.titleColor};
2275
+ }
2276
+
2277
+ .sectionTitle3 {
2278
+ fill: ${t.titleColor};
2279
+ }
2280
+
2281
+ .sectionTitle {
2282
+ text-anchor: start;
2283
+ font-family: ${t.fontFamily};
2284
+ }
2285
+
2286
+
2287
+ /* Grid and axis */
2288
+
2289
+ .grid .tick {
2290
+ stroke: ${t.gridColor};
2291
+ opacity: 0.8;
2292
+ shape-rendering: crispEdges;
2293
+ }
2294
+
2295
+ .grid .tick text {
2296
+ font-family: ${t.fontFamily};
2297
+ fill: ${t.textColor};
2298
+ }
2299
+
2300
+ .grid path {
2301
+ stroke-width: 0;
2302
+ }
2303
+
2304
+
2305
+ /* Today line */
2306
+
2307
+ .today {
2308
+ fill: none;
2309
+ stroke: ${t.todayLineColor};
2310
+ stroke-width: 2px;
2311
+ }
2312
+
2313
+
2314
+ /* Task styling */
2315
+
2316
+ /* Default task */
2317
+
2318
+ .task {
2319
+ stroke-width: 2;
2320
+ }
2321
+
2322
+ .taskText {
2323
+ text-anchor: middle;
2324
+ font-family: ${t.fontFamily};
2325
+ }
2326
+
2327
+ .taskTextOutsideRight {
2328
+ fill: ${t.taskTextDarkColor};
2329
+ text-anchor: start;
2330
+ font-family: ${t.fontFamily};
2331
+ }
2332
+
2333
+ .taskTextOutsideLeft {
2334
+ fill: ${t.taskTextDarkColor};
2335
+ text-anchor: end;
2336
+ }
2337
+
2338
+
2339
+ /* Special case clickable */
2340
+
2341
+ .task.clickable {
2342
+ cursor: pointer;
2343
+ }
2344
+
2345
+ .taskText.clickable {
2346
+ cursor: pointer;
2347
+ fill: ${t.taskTextClickableColor} !important;
2348
+ font-weight: bold;
2349
+ }
2350
+
2351
+ .taskTextOutsideLeft.clickable {
2352
+ cursor: pointer;
2353
+ fill: ${t.taskTextClickableColor} !important;
2354
+ font-weight: bold;
2355
+ }
2356
+
2357
+ .taskTextOutsideRight.clickable {
2358
+ cursor: pointer;
2359
+ fill: ${t.taskTextClickableColor} !important;
2360
+ font-weight: bold;
2361
+ }
2362
+
2363
+
2364
+ /* Specific task settings for the sections*/
2365
+
2366
+ .taskText0,
2367
+ .taskText1,
2368
+ .taskText2,
2369
+ .taskText3 {
2370
+ fill: ${t.taskTextColor};
2371
+ }
2372
+
2373
+ .task0,
2374
+ .task1,
2375
+ .task2,
2376
+ .task3 {
2377
+ fill: ${t.taskBkgColor};
2378
+ stroke: ${t.taskBorderColor};
2379
+ }
2380
+
2381
+ .taskTextOutside0,
2382
+ .taskTextOutside2
2383
+ {
2384
+ fill: ${t.taskTextOutsideColor};
2385
+ }
2386
+
2387
+ .taskTextOutside1,
2388
+ .taskTextOutside3 {
2389
+ fill: ${t.taskTextOutsideColor};
2390
+ }
2391
+
2392
+
2393
+ /* Active task */
2394
+
2395
+ .active0,
2396
+ .active1,
2397
+ .active2,
2398
+ .active3 {
2399
+ fill: ${t.activeTaskBkgColor};
2400
+ stroke: ${t.activeTaskBorderColor};
2401
+ }
2402
+
2403
+ .activeText0,
2404
+ .activeText1,
2405
+ .activeText2,
2406
+ .activeText3 {
2407
+ fill: ${t.taskTextDarkColor} !important;
2408
+ }
2409
+
2410
+
2411
+ /* Completed task */
2412
+
2413
+ .done0,
2414
+ .done1,
2415
+ .done2,
2416
+ .done3 {
2417
+ stroke: ${t.doneTaskBorderColor};
2418
+ fill: ${t.doneTaskBkgColor};
2419
+ stroke-width: 2;
2420
+ }
2421
+
2422
+ .doneText0,
2423
+ .doneText1,
2424
+ .doneText2,
2425
+ .doneText3 {
2426
+ fill: ${t.taskTextDarkColor} !important;
2427
+ }
2428
+
2429
+
2430
+ /* Tasks on the critical line */
2431
+
2432
+ .crit0,
2433
+ .crit1,
2434
+ .crit2,
2435
+ .crit3 {
2436
+ stroke: ${t.critBorderColor};
2437
+ fill: ${t.critBkgColor};
2438
+ stroke-width: 2;
2439
+ }
2440
+
2441
+ .activeCrit0,
2442
+ .activeCrit1,
2443
+ .activeCrit2,
2444
+ .activeCrit3 {
2445
+ stroke: ${t.critBorderColor};
2446
+ fill: ${t.activeTaskBkgColor};
2447
+ stroke-width: 2;
2448
+ }
2449
+
2450
+ .doneCrit0,
2451
+ .doneCrit1,
2452
+ .doneCrit2,
2453
+ .doneCrit3 {
2454
+ stroke: ${t.critBorderColor};
2455
+ fill: ${t.doneTaskBkgColor};
2456
+ stroke-width: 2;
2457
+ cursor: pointer;
2458
+ shape-rendering: crispEdges;
2459
+ }
2460
+
2461
+ .milestone {
2462
+ transform: rotate(45deg) scale(0.8,0.8);
2463
+ }
2464
+
2465
+ .milestoneText {
2466
+ font-style: italic;
2467
+ }
2468
+ .doneCritText0,
2469
+ .doneCritText1,
2470
+ .doneCritText2,
2471
+ .doneCritText3 {
2472
+ fill: ${t.taskTextDarkColor} !important;
2473
+ }
2474
+
2475
+ .vert {
2476
+ stroke: ${t.vertLineColor};
2477
+ }
2478
+
2479
+ .vertText {
2480
+ font-size: 15px;
2481
+ text-anchor: middle;
2482
+ fill: ${t.vertLineColor} !important;
2483
+ }
2484
+
2485
+ .activeCritText0,
2486
+ .activeCritText1,
2487
+ .activeCritText2,
2488
+ .activeCritText3 {
2489
+ fill: ${t.taskTextDarkColor} !important;
2490
+ }
2491
+
2492
+ .titleText {
2493
+ text-anchor: middle;
2494
+ font-size: 18px;
2495
+ fill: ${t.titleColor || t.textColor};
2496
+ font-family: ${t.fontFamily};
2497
+ }
2498
+ `, "getStyles"), xa = ba, _a = {
2499
+ parser: Ai,
2500
+ db: ya,
2501
+ renderer: Ta,
2502
+ styles: xa
2503
+ };
2504
+ export {
2505
+ _a as diagram
2506
+ };