@data_wise/hyper-markdown 1.0.0

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