import { a6 as An, a5 as Un, ao as En, an as In, a7 as Ln, a8 as On, _ as f, g as _t, a9 as jt, aa as Hn, aG as nt, l as qt, ag as Wn, ae as Pn, at as zn, am as Bn, aH as ne, aI as en, aJ as Vn, aK as nn, aL as rn, aM as an, aN as jn, aO as xe } from "./index-DeBlJN4f.js";
import { f as Gn, u as Nn, e as Rn, R as Xn, E as Le } from "./linear-Bkwca0xU-DC0DlB3Q.js";
import { t as qn } from "./init-DjUOC4st-C8Nwz6AJ.js";
function Jn(t, e) {
  let n;
  if (e === void 0)
    for (const r of t)
      r != null && (n < r || n === void 0 && r >= r) && (n = r);
  else {
    let r = -1;
    for (let a of t)
      (a = e(a, ++r, t)) != null && (n < a || n === void 0 && a >= a) && (n = a);
  }
  return n;
}
function Kn(t, e) {
  let n;
  if (e === void 0)
    for (const r of t)
      r != null && (n > r || n === void 0 && r >= r) && (n = r);
  else {
    let r = -1;
    for (let a of t)
      (a = e(a, ++r, t)) != null && (n > a || n === void 0 && a >= a) && (n = a);
  }
  return n;
}
function Qn(t) {
  return t;
}
var Nt = 1, re = 2, he = 3, Gt = 4, Oe = 1e-6;
function Zn(t) {
  return "translate(" + t + ",0)";
}
function tr(t) {
  return "translate(0," + t + ")";
}
function er(t) {
  return (e) => +t(e);
}
function nr(t, e) {
  return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (n) => +t(n) + e;
}
function rr() {
  return !this.__axis;
}
function sn(t, e) {
  var n = [], r = null, a = null, s = 6, o = 6, y = 3, _ = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, m = t === Nt || t === Gt ? -1 : 1, g = t === Gt || t === re ? "x" : "y", Y = t === Nt || t === he ? Zn : tr;
  function x(w) {
    var R = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), I = a ?? (e.tickFormat ? e.tickFormat.apply(e, n) : Qn), D = Math.max(s, 0) + y, U = e.range(), z = +U[0] + _, E = +U[U.length - 1] + _, G = (e.bandwidth ? nr : er)(e.copy(), _), q = w.selection ? w.selection() : w, C = q.selectAll(".domain").data([null]), W = q.selectAll(".tick").data(R, e).order(), b = W.exit(), F = W.enter().append("g").attr("class", "tick"), $ = W.select("line"), M = W.select("text");
    C = C.merge(C.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), W = W.merge(F), $ = $.merge(F.append("line").attr("stroke", "currentColor").attr(g + "2", m * s)), M = M.merge(F.append("text").attr("fill", "currentColor").attr(g, m * D).attr("dy", t === Nt ? "0em" : t === he ? "0.71em" : "0.32em")), w !== q && (C = C.transition(w), W = W.transition(w), $ = $.transition(w), M = M.transition(w), b = b.transition(w).attr("opacity", Oe).attr("transform", function(p) {
      return isFinite(p = G(p)) ? Y(p + _) : this.getAttribute("transform");
    }), F.attr("opacity", Oe).attr("transform", function(p) {
      var S = this.parentNode.__axis;
      return Y((S && isFinite(S = S(p)) ? S : G(p)) + _);
    })), b.remove(), C.attr("d", t === Gt || t === re ? o ? "M" + m * o + "," + z + "H" + _ + "V" + E + "H" + m * o : "M" + _ + "," + z + "V" + E : o ? "M" + z + "," + m * o + "V" + _ + "H" + E + "V" + m * o : "M" + z + "," + _ + "H" + E), W.attr("opacity", 1).attr("transform", function(p) {
      return Y(G(p) + _);
    }), $.attr(g + "2", m * s), M.attr(g, m * D).text(I), q.filter(rr).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === re ? "start" : t === Gt ? "end" : "middle"), q.each(function() {
      this.__axis = G;
    });
  }
  return x.scale = function(w) {
    return arguments.length ? (e = w, x) : e;
  }, x.ticks = function() {
    return n = Array.from(arguments), x;
  }, x.tickArguments = function(w) {
    return arguments.length ? (n = w == null ? [] : Array.from(w), x) : n.slice();
  }, x.tickValues = function(w) {
    return arguments.length ? (r = w == null ? null : Array.from(w), x) : r && r.slice();
  }, x.tickFormat = function(w) {
    return arguments.length ? (a = w, x) : a;
  }, x.tickSize = function(w) {
    return arguments.length ? (s = o = +w, x) : s;
  }, x.tickSizeInner = function(w) {
    return arguments.length ? (s = +w, x) : s;
  }, x.tickSizeOuter = function(w) {
    return arguments.length ? (o = +w, x) : o;
  }, x.tickPadding = function(w) {
    return arguments.length ? (y = +w, x) : y;
  }, x.offset = function(w) {
    return arguments.length ? (_ = +w, x) : _;
  }, x;
}
function ir(t) {
  return sn(Nt, t);
}
function ar(t) {
  return sn(he, t);
}
const sr = Math.PI / 180, or = 180 / Math.PI, Jt = 18, on = 0.96422, cn = 1, ln = 0.82521, un = 4 / 29, Mt = 6 / 29, dn = 3 * Mt * Mt, cr = Mt * Mt * Mt;
function fn(t) {
  if (t instanceof lt) return new lt(t.l, t.a, t.b, t.opacity);
  if (t instanceof dt) return hn(t);
  t instanceof en || (t = Vn(t));
  var e = oe(t.r), n = oe(t.g), r = oe(t.b), a = ie((0.2225045 * e + 0.7168786 * n + 0.0606169 * r) / cn), s, o;
  return e === n && n === r ? s = o = a : (s = ie((0.4360747 * e + 0.3850649 * n + 0.1430804 * r) / on), o = ie((0.0139322 * e + 0.0971045 * n + 0.7141733 * r) / ln)), new lt(116 * a - 16, 500 * (s - a), 200 * (a - o), t.opacity);
}
function lr(t, e, n, r) {
  return arguments.length === 1 ? fn(t) : new lt(t, e, n, r ?? 1);
}
function lt(t, e, n, r) {
  this.l = +t, this.a = +e, this.b = +n, this.opacity = +r;
}
nn(lt, lr, rn(an, {
  brighter(t) {
    return new lt(this.l + Jt * (t ?? 1), this.a, this.b, this.opacity);
  },
  darker(t) {
    return new lt(this.l - Jt * (t ?? 1), this.a, this.b, this.opacity);
  },
  rgb() {
    var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, n = isNaN(this.b) ? t : t - this.b / 200;
    return e = on * ae(e), t = cn * ae(t), n = ln * ae(n), new en(
      se(3.1338561 * e - 1.6168667 * t - 0.4906146 * n),
      se(-0.9787684 * e + 1.9161415 * t + 0.033454 * n),
      se(0.0719453 * e - 0.2289914 * t + 1.4052427 * n),
      this.opacity
    );
  }
}));
function ie(t) {
  return t > cr ? Math.pow(t, 1 / 3) : t / dn + un;
}
function ae(t) {
  return t > Mt ? t * t * t : dn * (t - un);
}
function se(t) {
  return 255 * (t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055);
}
function oe(t) {
  return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
}
function ur(t) {
  if (t instanceof dt) return new dt(t.h, t.c, t.l, t.opacity);
  if (t instanceof lt || (t = fn(t)), t.a === 0 && t.b === 0) return new dt(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
  var e = Math.atan2(t.b, t.a) * or;
  return new dt(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
}
function ge(t, e, n, r) {
  return arguments.length === 1 ? ur(t) : new dt(t, e, n, r ?? 1);
}
function dt(t, e, n, r) {
  this.h = +t, this.c = +e, this.l = +n, this.opacity = +r;
}
function hn(t) {
  if (isNaN(t.h)) return new lt(t.l, 0, 0, t.opacity);
  var e = t.h * sr;
  return new lt(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
}
nn(dt, ge, rn(an, {
  brighter(t) {
    return new dt(this.h, this.c, this.l + Jt * (t ?? 1), this.opacity);
  },
  darker(t) {
    return new dt(this.h, this.c, this.l - Jt * (t ?? 1), this.opacity);
  },
  rgb() {
    return hn(this).rgb();
  }
}));
function dr(t) {
  return function(e, n) {
    var r = t((e = ge(e)).h, (n = ge(n)).h), a = ne(e.c, n.c), s = ne(e.l, n.l), o = ne(e.opacity, n.opacity);
    return function(y) {
      return e.h = r(y), e.c = a(y), e.l = s(y), e.opacity = o(y), e + "";
    };
  };
}
const fr = dr(jn);
function hr(t, e) {
  t = t.slice();
  var n = 0, r = t.length - 1, a = t[n], s = t[r], o;
  return s < a && (o = n, n = r, r = o, o = a, a = s, s = o), t[n] = e.floor(a), t[r] = e.ceil(s), t;
}
const ce = /* @__PURE__ */ new Date(), le = /* @__PURE__ */ new Date();
function Z(t, e, n, r) {
  function a(s) {
    return t(s = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+s)), s;
  }
  return a.floor = (s) => (t(s = /* @__PURE__ */ new Date(+s)), s), a.ceil = (s) => (t(s = new Date(s - 1)), e(s, 1), t(s), s), a.round = (s) => {
    const o = a(s), y = a.ceil(s);
    return s - o < y - s ? o : y;
  }, a.offset = (s, o) => (e(s = /* @__PURE__ */ new Date(+s), o == null ? 1 : Math.floor(o)), s), a.range = (s, o, y) => {
    const _ = [];
    if (s = a.ceil(s), y = y == null ? 1 : Math.floor(y), !(s < o) || !(y > 0)) return _;
    let m;
    do
      _.push(m = /* @__PURE__ */ new Date(+s)), e(s, y), t(s);
    while (m < s && s < o);
    return _;
  }, a.filter = (s) => Z((o) => {
    if (o >= o) for (; t(o), !s(o); ) o.setTime(o - 1);
  }, (o, y) => {
    if (o >= o)
      if (y < 0) for (; ++y <= 0; )
        for (; e(o, -1), !s(o); )
          ;
      else for (; --y >= 0; )
        for (; e(o, 1), !s(o); )
          ;
  }), n && (a.count = (s, o) => (ce.setTime(+s), le.setTime(+o), t(ce), t(le), Math.floor(n(ce, le))), a.every = (s) => (s = Math.floor(s), !isFinite(s) || !(s > 0) ? null : s > 1 ? a.filter(r ? (o) => r(o) % s === 0 : (o) => a.count(0, o) % s === 0) : a)), a;
}
const $t = Z(() => {
}, (t, e) => {
  t.setTime(+t + e);
}, (t, e) => e - t);
$t.every = (t) => (t = Math.floor(t), !isFinite(t) || !(t > 0) ? null : t > 1 ? Z((e) => {
  e.setTime(Math.floor(e / t) * t);
}, (e, n) => {
  e.setTime(+e + n * t);
}, (e, n) => (n - e) / t) : $t);
$t.range;
const ft = 1e3, at = ft * 60, ht = at * 60, gt = ht * 24, we = gt * 7, He = gt * 30, ue = gt * 365, mt = Z((t) => {
  t.setTime(t - t.getMilliseconds());
}, (t, e) => {
  t.setTime(+t + e * ft);
}, (t, e) => (e - t) / ft, (t) => t.getUTCSeconds());
mt.range;
const It = Z((t) => {
  t.setTime(t - t.getMilliseconds() - t.getSeconds() * ft);
}, (t, e) => {
  t.setTime(+t + e * at);
}, (t, e) => (e - t) / at, (t) => t.getMinutes());
It.range;
const gr = Z((t) => {
  t.setUTCSeconds(0, 0);
}, (t, e) => {
  t.setTime(+t + e * at);
}, (t, e) => (e - t) / at, (t) => t.getUTCMinutes());
gr.range;
const Lt = Z((t) => {
  t.setTime(t - t.getMilliseconds() - t.getSeconds() * ft - t.getMinutes() * at);
}, (t, e) => {
  t.setTime(+t + e * ht);
}, (t, e) => (e - t) / ht, (t) => t.getHours());
Lt.range;
const yr = Z((t) => {
  t.setUTCMinutes(0, 0, 0);
}, (t, e) => {
  t.setTime(+t + e * ht);
}, (t, e) => (e - t) / ht, (t) => t.getUTCHours());
yr.range;
const Tt = Z(
  (t) => t.setHours(0, 0, 0, 0),
  (t, e) => t.setDate(t.getDate() + e),
  (t, e) => (e - t - (e.getTimezoneOffset() - t.getTimezoneOffset()) * at) / gt,
  (t) => t.getDate() - 1
);
Tt.range;
const Ce = Z((t) => {
  t.setUTCHours(0, 0, 0, 0);
}, (t, e) => {
  t.setUTCDate(t.getUTCDate() + e);
}, (t, e) => (e - t) / gt, (t) => t.getUTCDate() - 1);
Ce.range;
const mr = Z((t) => {
  t.setUTCHours(0, 0, 0, 0);
}, (t, e) => {
  t.setUTCDate(t.getUTCDate() + e);
}, (t, e) => (e - t) / gt, (t) => Math.floor(t / gt));
mr.range;
function xt(t) {
  return Z((e) => {
    e.setDate(e.getDate() - (e.getDay() + 7 - t) % 7), e.setHours(0, 0, 0, 0);
  }, (e, n) => {
    e.setDate(e.getDate() + n * 7);
  }, (e, n) => (n - e - (n.getTimezoneOffset() - e.getTimezoneOffset()) * at) / we);
}
const Wt = xt(0), Ot = xt(1), gn = xt(2), yn = xt(3), vt = xt(4), mn = xt(5), kn = xt(6);
Wt.range;
Ot.range;
gn.range;
yn.range;
vt.range;
mn.range;
kn.range;
function wt(t) {
  return Z((e) => {
    e.setUTCDate(e.getUTCDate() - (e.getUTCDay() + 7 - t) % 7), e.setUTCHours(0, 0, 0, 0);
  }, (e, n) => {
    e.setUTCDate(e.getUTCDate() + n * 7);
  }, (e, n) => (n - e) / we);
}
const pn = wt(0), Kt = wt(1), kr = wt(2), pr = wt(3), Ft = wt(4), Tr = wt(5), vr = wt(6);
pn.range;
Kt.range;
kr.range;
pr.range;
Ft.range;
Tr.range;
vr.range;
const Ht = Z((t) => {
  t.setDate(1), t.setHours(0, 0, 0, 0);
}, (t, e) => {
  t.setMonth(t.getMonth() + e);
}, (t, e) => e.getMonth() - t.getMonth() + (e.getFullYear() - t.getFullYear()) * 12, (t) => t.getMonth());
Ht.range;
const br = Z((t) => {
  t.setUTCDate(1), t.setUTCHours(0, 0, 0, 0);
}, (t, e) => {
  t.setUTCMonth(t.getUTCMonth() + e);
}, (t, e) => e.getUTCMonth() - t.getUTCMonth() + (e.getUTCFullYear() - t.getUTCFullYear()) * 12, (t) => t.getUTCMonth());
br.range;
const yt = Z((t) => {
  t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
}, (t, e) => {
  t.setFullYear(t.getFullYear() + e);
}, (t, e) => e.getFullYear() - t.getFullYear(), (t) => t.getFullYear());
yt.every = (t) => !isFinite(t = Math.floor(t)) || !(t > 0) ? null : Z((e) => {
  e.setFullYear(Math.floor(e.getFullYear() / t) * t), e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
}, (e, n) => {
  e.setFullYear(e.getFullYear() + n * t);
});
yt.range;
const bt = Z((t) => {
  t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
}, (t, e) => {
  t.setUTCFullYear(t.getUTCFullYear() + e);
}, (t, e) => e.getUTCFullYear() - t.getUTCFullYear(), (t) => t.getUTCFullYear());
bt.every = (t) => !isFinite(t = Math.floor(t)) || !(t > 0) ? null : Z((e) => {
  e.setUTCFullYear(Math.floor(e.getUTCFullYear() / t) * t), e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
}, (e, n) => {
  e.setUTCFullYear(e.getUTCFullYear() + n * t);
});
bt.range;
function xr(t, e, n, r, a, s) {
  const o = [
    [mt, 1, ft],
    [mt, 5, 5 * ft],
    [mt, 15, 15 * ft],
    [mt, 30, 30 * ft],
    [s, 1, at],
    [s, 5, 5 * at],
    [s, 15, 15 * at],
    [s, 30, 30 * at],
    [a, 1, ht],
    [a, 3, 3 * ht],
    [a, 6, 6 * ht],
    [a, 12, 12 * ht],
    [r, 1, gt],
    [r, 2, 2 * gt],
    [n, 1, we],
    [e, 1, He],
    [e, 3, 3 * He],
    [t, 1, ue]
  ];
  function y(m, g, Y) {
    const x = g < m;
    x && ([m, g] = [g, m]);
    const w = Y && typeof Y.range == "function" ? Y : _(m, g, Y), R = w ? w.range(m, +g + 1) : [];
    return x ? R.reverse() : R;
  }
  function _(m, g, Y) {
    const x = Math.abs(g - m) / Y, w = Xn(([, , D]) => D).right(o, x);
    if (w === o.length) return t.every(Le(m / ue, g / ue, Y));
    if (w === 0) return $t.every(Math.max(Le(m, g, Y), 1));
    const [R, I] = o[x / o[w - 1][2] < o[w][2] / x ? w - 1 : w];
    return R.every(I);
  }
  return [y, _];
}
const [wr, Cr] = xr(yt, Ht, Wt, Tt, Lt, It);
function de(t) {
  if (0 <= t.y && t.y < 100) {
    var e = new Date(-1, t.m, t.d, t.H, t.M, t.S, t.L);
    return e.setFullYear(t.y), e;
  }
  return new Date(t.y, t.m, t.d, t.H, t.M, t.S, t.L);
}
function fe(t) {
  if (0 <= t.y && t.y < 100) {
    var e = new Date(Date.UTC(-1, t.m, t.d, t.H, t.M, t.S, t.L));
    return e.setUTCFullYear(t.y), e;
  }
  return new Date(Date.UTC(t.y, t.m, t.d, t.H, t.M, t.S, t.L));
}
function At(t, e, n) {
  return { y: t, m: e, d: n, H: 0, M: 0, S: 0, L: 0 };
}
function Dr(t) {
  var e = t.dateTime, n = t.date, r = t.time, a = t.periods, s = t.days, o = t.shortDays, y = t.months, _ = t.shortMonths, m = Ut(a), g = Et(a), Y = Ut(s), x = Et(s), w = Ut(o), R = Et(o), I = Ut(y), D = Et(y), U = Ut(_), z = Et(_), E = {
    a: v,
    A: i,
    b: T,
    B: c,
    c: null,
    d: je,
    e: je,
    f: Xr,
    g: ii,
    G: si,
    H: Gr,
    I: Nr,
    j: Rr,
    L: Tn,
    m: qr,
    M: Jr,
    p: L,
    q: A,
    Q: Re,
    s: Xe,
    S: Kr,
    u: Qr,
    U: Zr,
    V: ti,
    w: ei,
    W: ni,
    x: null,
    X: null,
    y: ri,
    Y: ai,
    Z: oi,
    "%": Ne
  }, G = {
    a: X,
    A: N,
    b: kt,
    B: J,
    c: null,
    d: Ge,
    e: Ge,
    f: di,
    g: bi,
    G: wi,
    H: ci,
    I: li,
    j: ui,
    L: bn,
    m: fi,
    M: hi,
    p: st,
    q: pt,
    Q: Re,
    s: Xe,
    S: gi,
    u: yi,
    U: mi,
    V: ki,
    w: pi,
    W: Ti,
    x: null,
    X: null,
    y: vi,
    Y: xi,
    Z: Ci,
    "%": Ne
  }, q = {
    a: $,
    A: M,
    b: p,
    B: S,
    c: l,
    d: Be,
    e: Be,
    f: zr,
    g: ze,
    G: Pe,
    H: Ve,
    I: Ve,
    j: Or,
    L: Pr,
    m: Lr,
    M: Hr,
    p: F,
    q: Ir,
    Q: Vr,
    s: jr,
    S: Wr,
    u: Fr,
    U: Yr,
    V: Ar,
    w: $r,
    W: Ur,
    x: h,
    X: d,
    y: ze,
    Y: Pe,
    Z: Er,
    "%": Br
  };
  E.x = C(n, E), E.X = C(r, E), E.c = C(e, E), G.x = C(n, G), G.X = C(r, G), G.c = C(e, G);
  function C(k, O) {
    return function(P) {
      var u = [], B = -1, H = 0, j = k.length, K, tt, ot;
      for (P instanceof Date || (P = /* @__PURE__ */ new Date(+P)); ++B < j; )
        k.charCodeAt(B) === 37 && (u.push(k.slice(H, B)), (tt = We[K = k.charAt(++B)]) != null ? K = k.charAt(++B) : tt = K === "e" ? " " : "0", (ot = O[K]) && (K = ot(P, tt)), u.push(K), H = B + 1);
      return u.push(k.slice(H, B)), u.join("");
    };
  }
  function W(k, O) {
    return function(P) {
      var u = At(1900, void 0, 1), B = b(u, k, P += "", 0), H, j;
      if (B != P.length) return null;
      if ("Q" in u) return new Date(u.Q);
      if ("s" in u) return new Date(u.s * 1e3 + ("L" in u ? u.L : 0));
      if (O && !("Z" in u) && (u.Z = 0), "p" in u && (u.H = u.H % 12 + u.p * 12), u.m === void 0 && (u.m = "q" in u ? u.q : 0), "V" in u) {
        if (u.V < 1 || u.V > 53) return null;
        "w" in u || (u.w = 1), "Z" in u ? (H = fe(At(u.y, 0, 1)), j = H.getUTCDay(), H = j > 4 || j === 0 ? Kt.ceil(H) : Kt(H), H = Ce.offset(H, (u.V - 1) * 7), u.y = H.getUTCFullYear(), u.m = H.getUTCMonth(), u.d = H.getUTCDate() + (u.w + 6) % 7) : (H = de(At(u.y, 0, 1)), j = H.getDay(), H = j > 4 || j === 0 ? Ot.ceil(H) : Ot(H), H = Tt.offset(H, (u.V - 1) * 7), u.y = H.getFullYear(), u.m = H.getMonth(), u.d = H.getDate() + (u.w + 6) % 7);
      } else ("W" in u || "U" in u) && ("w" in u || (u.w = "u" in u ? u.u % 7 : "W" in u ? 1 : 0), j = "Z" in u ? fe(At(u.y, 0, 1)).getUTCDay() : de(At(u.y, 0, 1)).getDay(), u.m = 0, u.d = "W" in u ? (u.w + 6) % 7 + u.W * 7 - (j + 5) % 7 : u.w + u.U * 7 - (j + 6) % 7);
      return "Z" in u ? (u.H += u.Z / 100 | 0, u.M += u.Z % 100, fe(u)) : de(u);
    };
  }
  function b(k, O, P, u) {
    for (var B = 0, H = O.length, j = P.length, K, tt; B < H; ) {
      if (u >= j) return -1;
      if (K = O.charCodeAt(B++), K === 37) {
        if (K = O.charAt(B++), tt = q[K in We ? O.charAt(B++) : K], !tt || (u = tt(k, P, u)) < 0) return -1;
      } else if (K != P.charCodeAt(u++))
        return -1;
    }
    return u;
  }
  function F(k, O, P) {
    var u = m.exec(O.slice(P));
    return u ? (k.p = g.get(u[0].toLowerCase()), P + u[0].length) : -1;
  }
  function $(k, O, P) {
    var u = w.exec(O.slice(P));
    return u ? (k.w = R.get(u[0].toLowerCase()), P + u[0].length) : -1;
  }
  function M(k, O, P) {
    var u = Y.exec(O.slice(P));
    return u ? (k.w = x.get(u[0].toLowerCase()), P + u[0].length) : -1;
  }
  function p(k, O, P) {
    var u = U.exec(O.slice(P));
    return u ? (k.m = z.get(u[0].toLowerCase()), P + u[0].length) : -1;
  }
  function S(k, O, P) {
    var u = I.exec(O.slice(P));
    return u ? (k.m = D.get(u[0].toLowerCase()), P + u[0].length) : -1;
  }
  function l(k, O, P) {
    return b(k, e, O, P);
  }
  function h(k, O, P) {
    return b(k, n, O, P);
  }
  function d(k, O, P) {
    return b(k, r, O, P);
  }
  function v(k) {
    return o[k.getDay()];
  }
  function i(k) {
    return s[k.getDay()];
  }
  function T(k) {
    return _[k.getMonth()];
  }
  function c(k) {
    return y[k.getMonth()];
  }
  function L(k) {
    return a[+(k.getHours() >= 12)];
  }
  function A(k) {
    return 1 + ~~(k.getMonth() / 3);
  }
  function X(k) {
    return o[k.getUTCDay()];
  }
  function N(k) {
    return s[k.getUTCDay()];
  }
  function kt(k) {
    return _[k.getUTCMonth()];
  }
  function J(k) {
    return y[k.getUTCMonth()];
  }
  function st(k) {
    return a[+(k.getUTCHours() >= 12)];
  }
  function pt(k) {
    return 1 + ~~(k.getUTCMonth() / 3);
  }
  return {
    format: function(k) {
      var O = C(k += "", E);
      return O.toString = function() {
        return k;
      }, O;
    },
    parse: function(k) {
      var O = W(k += "", !1);
      return O.toString = function() {
        return k;
      }, O;
    },
    utcFormat: function(k) {
      var O = C(k += "", G);
      return O.toString = function() {
        return k;
      }, O;
    },
    utcParse: function(k) {
      var O = W(k += "", !0);
      return O.toString = function() {
        return k;
      }, O;
    }
  };
}
var We = { "-": "", _: " ", 0: "0" }, et = /^\s*\d+/, _r = /^%/, Mr = /[\\^$*+?|[\]().{}]/g;
function V(t, e, n) {
  var r = t < 0 ? "-" : "", a = (r ? -t : t) + "", s = a.length;
  return r + (s < n ? new Array(n - s + 1).join(e) + a : a);
}
function Sr(t) {
  return t.replace(Mr, "\\$&");
}
function Ut(t) {
  return new RegExp("^(?:" + t.map(Sr).join("|") + ")", "i");
}
function Et(t) {
  return new Map(t.map((e, n) => [e.toLowerCase(), n]));
}
function $r(t, e, n) {
  var r = et.exec(e.slice(n, n + 1));
  return r ? (t.w = +r[0], n + r[0].length) : -1;
}
function Fr(t, e, n) {
  var r = et.exec(e.slice(n, n + 1));
  return r ? (t.u = +r[0], n + r[0].length) : -1;
}
function Yr(t, e, n) {
  var r = et.exec(e.slice(n, n + 2));
  return r ? (t.U = +r[0], n + r[0].length) : -1;
}
function Ar(t, e, n) {
  var r = et.exec(e.slice(n, n + 2));
  return r ? (t.V = +r[0], n + r[0].length) : -1;
}
function Ur(t, e, n) {
  var r = et.exec(e.slice(n, n + 2));
  return r ? (t.W = +r[0], n + r[0].length) : -1;
}
function Pe(t, e, n) {
  var r = et.exec(e.slice(n, n + 4));
  return r ? (t.y = +r[0], n + r[0].length) : -1;
}
function ze(t, e, n) {
  var r = et.exec(e.slice(n, n + 2));
  return r ? (t.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1;
}
function Er(t, e, n) {
  var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n, n + 6));
  return r ? (t.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1;
}
function Ir(t, e, n) {
  var r = et.exec(e.slice(n, n + 1));
  return r ? (t.q = r[0] * 3 - 3, n + r[0].length) : -1;
}
function Lr(t, e, n) {
  var r = et.exec(e.slice(n, n + 2));
  return r ? (t.m = r[0] - 1, n + r[0].length) : -1;
}
function Be(t, e, n) {
  var r = et.exec(e.slice(n, n + 2));
  return r ? (t.d = +r[0], n + r[0].length) : -1;
}
function Or(t, e, n) {
  var r = et.exec(e.slice(n, n + 3));
  return r ? (t.m = 0, t.d = +r[0], n + r[0].length) : -1;
}
function Ve(t, e, n) {
  var r = et.exec(e.slice(n, n + 2));
  return r ? (t.H = +r[0], n + r[0].length) : -1;
}
function Hr(t, e, n) {
  var r = et.exec(e.slice(n, n + 2));
  return r ? (t.M = +r[0], n + r[0].length) : -1;
}
function Wr(t, e, n) {
  var r = et.exec(e.slice(n, n + 2));
  return r ? (t.S = +r[0], n + r[0].length) : -1;
}
function Pr(t, e, n) {
  var r = et.exec(e.slice(n, n + 3));
  return r ? (t.L = +r[0], n + r[0].length) : -1;
}
function zr(t, e, n) {
  var r = et.exec(e.slice(n, n + 6));
  return r ? (t.L = Math.floor(r[0] / 1e3), n + r[0].length) : -1;
}
function Br(t, e, n) {
  var r = _r.exec(e.slice(n, n + 1));
  return r ? n + r[0].length : -1;
}
function Vr(t, e, n) {
  var r = et.exec(e.slice(n));
  return r ? (t.Q = +r[0], n + r[0].length) : -1;
}
function jr(t, e, n) {
  var r = et.exec(e.slice(n));
  return r ? (t.s = +r[0], n + r[0].length) : -1;
}
function je(t, e) {
  return V(t.getDate(), e, 2);
}
function Gr(t, e) {
  return V(t.getHours(), e, 2);
}
function Nr(t, e) {
  return V(t.getHours() % 12 || 12, e, 2);
}
function Rr(t, e) {
  return V(1 + Tt.count(yt(t), t), e, 3);
}
function Tn(t, e) {
  return V(t.getMilliseconds(), e, 3);
}
function Xr(t, e) {
  return Tn(t, e) + "000";
}
function qr(t, e) {
  return V(t.getMonth() + 1, e, 2);
}
function Jr(t, e) {
  return V(t.getMinutes(), e, 2);
}
function Kr(t, e) {
  return V(t.getSeconds(), e, 2);
}
function Qr(t) {
  var e = t.getDay();
  return e === 0 ? 7 : e;
}
function Zr(t, e) {
  return V(Wt.count(yt(t) - 1, t), e, 2);
}
function vn(t) {
  var e = t.getDay();
  return e >= 4 || e === 0 ? vt(t) : vt.ceil(t);
}
function ti(t, e) {
  return t = vn(t), V(vt.count(yt(t), t) + (yt(t).getDay() === 4), e, 2);
}
function ei(t) {
  return t.getDay();
}
function ni(t, e) {
  return V(Ot.count(yt(t) - 1, t), e, 2);
}
function ri(t, e) {
  return V(t.getFullYear() % 100, e, 2);
}
function ii(t, e) {
  return t = vn(t), V(t.getFullYear() % 100, e, 2);
}
function ai(t, e) {
  return V(t.getFullYear() % 1e4, e, 4);
}
function si(t, e) {
  var n = t.getDay();
  return t = n >= 4 || n === 0 ? vt(t) : vt.ceil(t), V(t.getFullYear() % 1e4, e, 4);
}
function oi(t) {
  var e = t.getTimezoneOffset();
  return (e > 0 ? "-" : (e *= -1, "+")) + V(e / 60 | 0, "0", 2) + V(e % 60, "0", 2);
}
function Ge(t, e) {
  return V(t.getUTCDate(), e, 2);
}
function ci(t, e) {
  return V(t.getUTCHours(), e, 2);
}
function li(t, e) {
  return V(t.getUTCHours() % 12 || 12, e, 2);
}
function ui(t, e) {
  return V(1 + Ce.count(bt(t), t), e, 3);
}
function bn(t, e) {
  return V(t.getUTCMilliseconds(), e, 3);
}
function di(t, e) {
  return bn(t, e) + "000";
}
function fi(t, e) {
  return V(t.getUTCMonth() + 1, e, 2);
}
function hi(t, e) {
  return V(t.getUTCMinutes(), e, 2);
}
function gi(t, e) {
  return V(t.getUTCSeconds(), e, 2);
}
function yi(t) {
  var e = t.getUTCDay();
  return e === 0 ? 7 : e;
}
function mi(t, e) {
  return V(pn.count(bt(t) - 1, t), e, 2);
}
function xn(t) {
  var e = t.getUTCDay();
  return e >= 4 || e === 0 ? Ft(t) : Ft.ceil(t);
}
function ki(t, e) {
  return t = xn(t), V(Ft.count(bt(t), t) + (bt(t).getUTCDay() === 4), e, 2);
}
function pi(t) {
  return t.getUTCDay();
}
function Ti(t, e) {
  return V(Kt.count(bt(t) - 1, t), e, 2);
}
function vi(t, e) {
  return V(t.getUTCFullYear() % 100, e, 2);
}
function bi(t, e) {
  return t = xn(t), V(t.getUTCFullYear() % 100, e, 2);
}
function xi(t, e) {
  return V(t.getUTCFullYear() % 1e4, e, 4);
}
function wi(t, e) {
  var n = t.getUTCDay();
  return t = n >= 4 || n === 0 ? Ft(t) : Ft.ceil(t), V(t.getUTCFullYear() % 1e4, e, 4);
}
function Ci() {
  return "+0000";
}
function Ne() {
  return "%";
}
function Re(t) {
  return +t;
}
function Xe(t) {
  return Math.floor(+t / 1e3);
}
var Dt, Qt;
Di({
  dateTime: "%x, %X",
  date: "%-m/%-d/%Y",
  time: "%-I:%M:%S %p",
  periods: ["AM", "PM"],
  days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
});
function Di(t) {
  return Dt = Dr(t), Qt = Dt.format, Dt.parse, Dt.utcFormat, Dt.utcParse, Dt;
}
function _i(t) {
  return new Date(t);
}
function Mi(t) {
  return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
}
function wn(t, e, n, r, a, s, o, y, _, m) {
  var g = Nn(), Y = g.invert, x = g.domain, w = m(".%L"), R = m(":%S"), I = m("%I:%M"), D = m("%I %p"), U = m("%a %d"), z = m("%b %d"), E = m("%B"), G = m("%Y");
  function q(C) {
    return (_(C) < C ? w : y(C) < C ? R : o(C) < C ? I : s(C) < C ? D : r(C) < C ? a(C) < C ? U : z : n(C) < C ? E : G)(C);
  }
  return g.invert = function(C) {
    return new Date(Y(C));
  }, g.domain = function(C) {
    return arguments.length ? x(Array.from(C, Mi)) : x().map(_i);
  }, g.ticks = function(C) {
    var W = x();
    return t(W[0], W[W.length - 1], C ?? 10);
  }, g.tickFormat = function(C, W) {
    return W == null ? q : m(W);
  }, g.nice = function(C) {
    var W = x();
    return (!C || typeof C.range != "function") && (C = e(W[0], W[W.length - 1], C ?? 10)), C ? x(hr(W, C)) : g;
  }, g.copy = function() {
    return Rn(g, wn(t, e, n, r, a, s, o, y, _, m));
  }, g;
}
function Si() {
  return qn.apply(wn(wr, Cr, yt, Ht, Wt, Tt, Lt, It, mt, Qt).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
}
var ye = { exports: {} }, $i = ye.exports, qe;
function Fi() {
  return qe || (qe = 1, function(t, e) {
    (function(n, r) {
      t.exports = r();
    })($i, function() {
      var n = "day";
      return function(r, a, s) {
        var o = function(m) {
          return m.add(4 - m.isoWeekday(), n);
        }, y = a.prototype;
        y.isoWeekYear = function() {
          return o(this).year();
        }, y.isoWeek = function(m) {
          if (!this.$utils().u(m)) return this.add(7 * (m - this.isoWeek()), n);
          var g, Y, x, w, R = o(this), I = (g = this.isoWeekYear(), Y = this.$u, x = (Y ? s.utc : s)().year(g).startOf("year"), w = 4 - x.isoWeekday(), x.isoWeekday() > 4 && (w += 7), x.add(w, n));
          return R.diff(I, "week") + 1;
        }, y.isoWeekday = function(m) {
          return this.$utils().u(m) ? this.day() || 7 : this.day(this.day() % 7 ? m : m - 7);
        };
        var _ = y.startOf;
        y.startOf = function(m, g) {
          var Y = this.$utils(), x = !!Y.u(g) || g;
          return Y.p(m) === "isoweek" ? x ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : _.bind(this)(m, g);
        };
      };
    });
  }(ye)), ye.exports;
}
var Yi = Fi();
const Ai = /* @__PURE__ */ xe(Yi);
var me = { exports: {} }, Ui = me.exports, Je;
function Ei() {
  return Je || (Je = 1, function(t, e) {
    (function(n, r) {
      t.exports = r();
    })(Ui, function() {
      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/, s = /\d\d/, o = /\d\d?/, y = /\d*[^-_:/,()\s\d]+/, _ = {}, m = function(D) {
        return (D = +D) + (D > 68 ? 1900 : 2e3);
      }, g = function(D) {
        return function(U) {
          this[D] = +U;
        };
      }, Y = [/[+-]\d\d:?(\d\d)?|Z/, function(D) {
        (this.zone || (this.zone = {})).offset = function(U) {
          if (!U || U === "Z") return 0;
          var z = U.match(/([+-]|\d\d)/g), E = 60 * z[1] + (+z[2] || 0);
          return E === 0 ? 0 : z[0] === "+" ? -E : E;
        }(D);
      }], x = function(D) {
        var U = _[D];
        return U && (U.indexOf ? U : U.s.concat(U.f));
      }, w = function(D, U) {
        var z, E = _.meridiem;
        if (E) {
          for (var G = 1; G <= 24; G += 1) if (D.indexOf(E(G, 0, U)) > -1) {
            z = G > 12;
            break;
          }
        } else z = D === (U ? "pm" : "PM");
        return z;
      }, R = { A: [y, function(D) {
        this.afternoon = w(D, !1);
      }], a: [y, function(D) {
        this.afternoon = w(D, !0);
      }], Q: [a, function(D) {
        this.month = 3 * (D - 1) + 1;
      }], S: [a, function(D) {
        this.milliseconds = 100 * +D;
      }], SS: [s, function(D) {
        this.milliseconds = 10 * +D;
      }], SSS: [/\d{3}/, function(D) {
        this.milliseconds = +D;
      }], s: [o, g("seconds")], ss: [o, g("seconds")], m: [o, g("minutes")], mm: [o, g("minutes")], H: [o, g("hours")], h: [o, g("hours")], HH: [o, g("hours")], hh: [o, g("hours")], D: [o, g("day")], DD: [s, g("day")], Do: [y, function(D) {
        var U = _.ordinal, z = D.match(/\d+/);
        if (this.day = z[0], U) for (var E = 1; E <= 31; E += 1) U(E).replace(/\[|\]/g, "") === D && (this.day = E);
      }], w: [o, g("week")], ww: [s, g("week")], M: [o, g("month")], MM: [s, g("month")], MMM: [y, function(D) {
        var U = x("months"), z = (x("monthsShort") || U.map(function(E) {
          return E.slice(0, 3);
        })).indexOf(D) + 1;
        if (z < 1) throw new Error();
        this.month = z % 12 || z;
      }], MMMM: [y, function(D) {
        var U = x("months").indexOf(D) + 1;
        if (U < 1) throw new Error();
        this.month = U % 12 || U;
      }], Y: [/[+-]?\d+/, g("year")], YY: [s, function(D) {
        this.year = m(D);
      }], YYYY: [/\d{4}/, g("year")], Z: Y, ZZ: Y };
      function I(D) {
        var U, z;
        U = D, z = _ && _.formats;
        for (var E = (D = U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function($, M, p) {
          var S = p && p.toUpperCase();
          return M || z[p] || n[p] || z[S].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(l, h, d) {
            return h || d.slice(1);
          });
        })).match(r), G = E.length, q = 0; q < G; q += 1) {
          var C = E[q], W = R[C], b = W && W[0], F = W && W[1];
          E[q] = F ? { regex: b, parser: F } : C.replace(/^\[|\]$/g, "");
        }
        return function($) {
          for (var M = {}, p = 0, S = 0; p < G; p += 1) {
            var l = E[p];
            if (typeof l == "string") S += l.length;
            else {
              var h = l.regex, d = l.parser, v = $.slice(S), i = h.exec(v)[0];
              d.call(M, i), $ = $.replace(i, "");
            }
          }
          return function(T) {
            var c = T.afternoon;
            if (c !== void 0) {
              var L = T.hours;
              c ? L < 12 && (T.hours += 12) : L === 12 && (T.hours = 0), delete T.afternoon;
            }
          }(M), M;
        };
      }
      return function(D, U, z) {
        z.p.customParseFormat = !0, D && D.parseTwoDigitYear && (m = D.parseTwoDigitYear);
        var E = U.prototype, G = E.parse;
        E.parse = function(q) {
          var C = q.date, W = q.utc, b = q.args;
          this.$u = W;
          var F = b[1];
          if (typeof F == "string") {
            var $ = b[2] === !0, M = b[3] === !0, p = $ || M, S = b[2];
            M && (S = b[2]), _ = this.$locale(), !$ && S && (_ = z.Ls[S]), this.$d = function(v, i, T, c) {
              try {
                if (["x", "X"].indexOf(i) > -1) return new Date((i === "X" ? 1e3 : 1) * v);
                var L = I(i)(v), A = L.year, X = L.month, N = L.day, kt = L.hours, J = L.minutes, st = L.seconds, pt = L.milliseconds, k = L.zone, O = L.week, P = /* @__PURE__ */ new Date(), u = N || (A || X ? 1 : P.getDate()), B = A || P.getFullYear(), H = 0;
                A && !X || (H = X > 0 ? X - 1 : P.getMonth());
                var j, K = kt || 0, tt = J || 0, ot = st || 0, rt = pt || 0;
                return k ? new Date(Date.UTC(B, H, u, K, tt, ot, rt + 60 * k.offset * 1e3)) : T ? new Date(Date.UTC(B, H, u, K, tt, ot, rt)) : (j = new Date(B, H, u, K, tt, ot, rt), O && (j = c(j).week(O).toDate()), j);
              } catch {
                return /* @__PURE__ */ new Date("");
              }
            }(C, F, W, z), this.init(), S && S !== !0 && (this.$L = this.locale(S).$L), p && C != this.format(F) && (this.$d = /* @__PURE__ */ new Date("")), _ = {};
          } else if (F instanceof Array) for (var l = F.length, h = 1; h <= l; h += 1) {
            b[1] = F[h - 1];
            var d = z.apply(this, b);
            if (d.isValid()) {
              this.$d = d.$d, this.$L = d.$L, this.init();
              break;
            }
            h === l && (this.$d = /* @__PURE__ */ new Date(""));
          }
          else G.call(this, q);
        };
      };
    });
  }(me)), me.exports;
}
var Ii = Ei();
const Li = /* @__PURE__ */ xe(Ii);
var ke = { exports: {} }, Oi = ke.exports, Ke;
function Hi() {
  return Ke || (Ke = 1, function(t, e) {
    (function(n, r) {
      t.exports = r();
    })(Oi, function() {
      return function(n, r) {
        var a = r.prototype, s = a.format;
        a.format = function(o) {
          var y = this, _ = this.$locale();
          if (!this.isValid()) return s.bind(this)(o);
          var m = this.$utils(), g = (o || "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(Y) {
            switch (Y) {
              case "Q":
                return Math.ceil((y.$M + 1) / 3);
              case "Do":
                return _.ordinal(y.$D);
              case "gggg":
                return y.weekYear();
              case "GGGG":
                return y.isoWeekYear();
              case "wo":
                return _.ordinal(y.week(), "W");
              case "w":
              case "ww":
                return m.s(y.week(), Y === "w" ? 1 : 2, "0");
              case "W":
              case "WW":
                return m.s(y.isoWeek(), Y === "W" ? 1 : 2, "0");
              case "k":
              case "kk":
                return m.s(String(y.$H === 0 ? 24 : y.$H), Y === "k" ? 1 : 2, "0");
              case "X":
                return Math.floor(y.$d.getTime() / 1e3);
              case "x":
                return y.$d.getTime();
              case "z":
                return "[" + y.offsetName() + "]";
              case "zzz":
                return "[" + y.offsetName("long") + "]";
              default:
                return Y;
            }
          });
          return s.bind(this)(g);
        };
      };
    });
  }(ke)), ke.exports;
}
var Wi = Hi();
const Pi = /* @__PURE__ */ xe(Wi);
var pe = function() {
  var t = /* @__PURE__ */ f(function(S, l, h, d) {
    for (h = h || {}, d = S.length; d--; h[S[d]] = l) ;
    return h;
  }, "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], s = [1, 29], o = [1, 30], y = [1, 31], _ = [1, 32], m = [1, 33], g = [1, 34], Y = [1, 9], x = [1, 10], w = [1, 11], R = [1, 12], I = [1, 13], D = [1, 14], U = [1, 15], z = [1, 16], E = [1, 19], G = [1, 20], q = [1, 21], C = [1, 22], W = [1, 23], b = [1, 25], F = [1, 35], $ = {
    trace: /* @__PURE__ */ f(function() {
    }, "trace"),
    yy: {},
    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 },
    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" },
    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]],
    performAction: /* @__PURE__ */ f(function(S, l, h, d, v, i, T) {
      var c = i.length - 1;
      switch (v) {
        case 1:
          return i[c - 1];
        case 2:
          this.$ = [];
          break;
        case 3:
          i[c - 1].push(i[c]), this.$ = i[c - 1];
          break;
        case 4:
        case 5:
          this.$ = i[c];
          break;
        case 6:
        case 7:
          this.$ = [];
          break;
        case 8:
          d.setWeekday("monday");
          break;
        case 9:
          d.setWeekday("tuesday");
          break;
        case 10:
          d.setWeekday("wednesday");
          break;
        case 11:
          d.setWeekday("thursday");
          break;
        case 12:
          d.setWeekday("friday");
          break;
        case 13:
          d.setWeekday("saturday");
          break;
        case 14:
          d.setWeekday("sunday");
          break;
        case 15:
          d.setWeekend("friday");
          break;
        case 16:
          d.setWeekend("saturday");
          break;
        case 17:
          d.setDateFormat(i[c].substr(11)), this.$ = i[c].substr(11);
          break;
        case 18:
          d.enableInclusiveEndDates(), this.$ = i[c].substr(18);
          break;
        case 19:
          d.TopAxis(), this.$ = i[c].substr(8);
          break;
        case 20:
          d.setAxisFormat(i[c].substr(11)), this.$ = i[c].substr(11);
          break;
        case 21:
          d.setTickInterval(i[c].substr(13)), this.$ = i[c].substr(13);
          break;
        case 22:
          d.setExcludes(i[c].substr(9)), this.$ = i[c].substr(9);
          break;
        case 23:
          d.setIncludes(i[c].substr(9)), this.$ = i[c].substr(9);
          break;
        case 24:
          d.setTodayMarker(i[c].substr(12)), this.$ = i[c].substr(12);
          break;
        case 27:
          d.setDiagramTitle(i[c].substr(6)), this.$ = i[c].substr(6);
          break;
        case 28:
          this.$ = i[c].trim(), d.setAccTitle(this.$);
          break;
        case 29:
        case 30:
          this.$ = i[c].trim(), d.setAccDescription(this.$);
          break;
        case 31:
          d.addSection(i[c].substr(8)), this.$ = i[c].substr(8);
          break;
        case 33:
          d.addTask(i[c - 1], i[c]), this.$ = "task";
          break;
        case 34:
          this.$ = i[c - 1], d.setClickEvent(i[c - 1], i[c], null);
          break;
        case 35:
          this.$ = i[c - 2], d.setClickEvent(i[c - 2], i[c - 1], i[c]);
          break;
        case 36:
          this.$ = i[c - 2], d.setClickEvent(i[c - 2], i[c - 1], null), d.setLink(i[c - 2], i[c]);
          break;
        case 37:
          this.$ = i[c - 3], d.setClickEvent(i[c - 3], i[c - 2], i[c - 1]), d.setLink(i[c - 3], i[c]);
          break;
        case 38:
          this.$ = i[c - 2], d.setClickEvent(i[c - 2], i[c], null), d.setLink(i[c - 2], i[c - 1]);
          break;
        case 39:
          this.$ = i[c - 3], d.setClickEvent(i[c - 3], i[c - 1], i[c]), d.setLink(i[c - 3], i[c - 2]);
          break;
        case 40:
          this.$ = i[c - 1], d.setLink(i[c - 1], i[c]);
          break;
        case 41:
        case 47:
          this.$ = i[c - 1] + " " + i[c];
          break;
        case 42:
        case 43:
        case 45:
          this.$ = i[c - 2] + " " + i[c - 1] + " " + i[c];
          break;
        case 44:
        case 46:
          this.$ = i[c - 3] + " " + i[c - 2] + " " + i[c - 1] + " " + i[c];
          break;
      }
    }, "anonymous"),
    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: s, 16: o, 17: y, 18: _, 19: 18, 20: m, 21: g, 22: Y, 23: x, 24: w, 25: R, 26: I, 27: D, 28: U, 29: z, 30: E, 31: G, 33: q, 35: C, 36: W, 37: 24, 38: b, 40: F }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 36, 11: 17, 12: n, 13: r, 14: a, 15: s, 16: o, 17: y, 18: _, 19: 18, 20: m, 21: g, 22: Y, 23: x, 24: w, 25: R, 26: I, 27: D, 28: U, 29: z, 30: E, 31: G, 33: q, 35: C, 36: W, 37: 24, 38: b, 40: F }, 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])],
    defaultActions: {},
    parseError: /* @__PURE__ */ f(function(S, l) {
      if (l.recoverable)
        this.trace(S);
      else {
        var h = new Error(S);
        throw h.hash = l, h;
      }
    }, "parseError"),
    parse: /* @__PURE__ */ f(function(S) {
      var l = this, h = [0], d = [], v = [null], i = [], T = this.table, c = "", L = 0, A = 0, X = 2, N = 1, kt = i.slice.call(arguments, 1), J = Object.create(this.lexer), st = { yy: {} };
      for (var pt in this.yy)
        Object.prototype.hasOwnProperty.call(this.yy, pt) && (st.yy[pt] = this.yy[pt]);
      J.setInput(S, st.yy), st.yy.lexer = J, st.yy.parser = this, typeof J.yylloc > "u" && (J.yylloc = {});
      var k = J.yylloc;
      i.push(k);
      var O = J.options && J.options.ranges;
      typeof st.yy.parseError == "function" ? this.parseError = st.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
      function P(it) {
        h.length = h.length - 2 * it, v.length = v.length - it, i.length = i.length - it;
      }
      f(P, "popStack");
      function u() {
        var it;
        return it = d.pop() || J.lex() || N, typeof it != "number" && (it instanceof Array && (d = it, it = d.pop()), it = l.symbols_[it] || it), it;
      }
      f(u, "lex");
      for (var B, H, j, K, tt = {}, ot, rt, Ie, Vt; ; ) {
        if (H = h[h.length - 1], this.defaultActions[H] ? j = this.defaultActions[H] : ((B === null || typeof B > "u") && (B = u()), j = T[H] && T[H][B]), typeof j > "u" || !j.length || !j[0]) {
          var ee = "";
          Vt = [];
          for (ot in T[H])
            this.terminals_[ot] && ot > X && Vt.push("'" + this.terminals_[ot] + "'");
          J.showPosition ? ee = "Parse error on line " + (L + 1) + `:
` + J.showPosition() + `
Expecting ` + Vt.join(", ") + ", got '" + (this.terminals_[B] || B) + "'" : ee = "Parse error on line " + (L + 1) + ": Unexpected " + (B == N ? "end of input" : "'" + (this.terminals_[B] || B) + "'"), this.parseError(ee, {
            text: J.match,
            token: this.terminals_[B] || B,
            line: J.yylineno,
            loc: k,
            expected: Vt
          });
        }
        if (j[0] instanceof Array && j.length > 1)
          throw new Error("Parse Error: multiple actions possible at state: " + H + ", token: " + B);
        switch (j[0]) {
          case 1:
            h.push(B), v.push(J.yytext), i.push(J.yylloc), h.push(j[1]), B = null, A = J.yyleng, c = J.yytext, L = J.yylineno, k = J.yylloc;
            break;
          case 2:
            if (rt = this.productions_[j[1]][1], tt.$ = v[v.length - rt], tt._$ = {
              first_line: i[i.length - (rt || 1)].first_line,
              last_line: i[i.length - 1].last_line,
              first_column: i[i.length - (rt || 1)].first_column,
              last_column: i[i.length - 1].last_column
            }, O && (tt._$.range = [
              i[i.length - (rt || 1)].range[0],
              i[i.length - 1].range[1]
            ]), K = this.performAction.apply(tt, [
              c,
              A,
              L,
              st.yy,
              j[1],
              v,
              i
            ].concat(kt)), typeof K < "u")
              return K;
            rt && (h = h.slice(0, -1 * rt * 2), v = v.slice(0, -1 * rt), i = i.slice(0, -1 * rt)), h.push(this.productions_[j[1]][0]), v.push(tt.$), i.push(tt._$), Ie = T[h[h.length - 2]][h[h.length - 1]], h.push(Ie);
            break;
          case 3:
            return !0;
        }
      }
      return !0;
    }, "parse")
  }, M = /* @__PURE__ */ function() {
    var S = {
      EOF: 1,
      parseError: /* @__PURE__ */ f(function(l, h) {
        if (this.yy.parser)
          this.yy.parser.parseError(l, h);
        else
          throw new Error(l);
      }, "parseError"),
      // resets the lexer, sets new input
      setInput: /* @__PURE__ */ f(function(l, h) {
        return this.yy = h || this.yy || {}, this._input = l, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
          first_line: 1,
          first_column: 0,
          last_line: 1,
          last_column: 0
        }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
      }, "setInput"),
      // consumes and returns one char from the input
      input: /* @__PURE__ */ f(function() {
        var l = this._input[0];
        this.yytext += l, this.yyleng++, this.offset++, this.match += l, this.matched += l;
        var h = l.match(/(?:\r\n?|\n).*/g);
        return h ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), l;
      }, "input"),
      // unshifts one char (or a string) into the input
      unput: /* @__PURE__ */ f(function(l) {
        var h = l.length, d = l.split(/(?:\r\n?|\n)/g);
        this._input = l + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - h), this.offset -= h;
        var v = this.match.split(/(?:\r\n?|\n)/g);
        this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), d.length - 1 && (this.yylineno -= d.length - 1);
        var i = this.yylloc.range;
        return this.yylloc = {
          first_line: this.yylloc.first_line,
          last_line: this.yylineno + 1,
          first_column: this.yylloc.first_column,
          last_column: d ? (d.length === v.length ? this.yylloc.first_column : 0) + v[v.length - d.length].length - d[0].length : this.yylloc.first_column - h
        }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - h]), this.yyleng = this.yytext.length, this;
      }, "unput"),
      // When called from action, caches matched text and appends it on next action
      more: /* @__PURE__ */ f(function() {
        return this._more = !0, this;
      }, "more"),
      // 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.
      reject: /* @__PURE__ */ f(function() {
        if (this.options.backtrack_lexer)
          this._backtrack = !0;
        else
          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).
` + this.showPosition(), {
            text: "",
            token: null,
            line: this.yylineno
          });
        return this;
      }, "reject"),
      // retain first n characters of the match
      less: /* @__PURE__ */ f(function(l) {
        this.unput(this.match.slice(l));
      }, "less"),
      // displays already matched input, i.e. for error messages
      pastInput: /* @__PURE__ */ f(function() {
        var l = this.matched.substr(0, this.matched.length - this.match.length);
        return (l.length > 20 ? "..." : "") + l.substr(-20).replace(/\n/g, "");
      }, "pastInput"),
      // displays upcoming input, i.e. for error messages
      upcomingInput: /* @__PURE__ */ f(function() {
        var l = this.match;
        return l.length < 20 && (l += this._input.substr(0, 20 - l.length)), (l.substr(0, 20) + (l.length > 20 ? "..." : "")).replace(/\n/g, "");
      }, "upcomingInput"),
      // displays the character position where the lexing error occurred, i.e. for error messages
      showPosition: /* @__PURE__ */ f(function() {
        var l = this.pastInput(), h = new Array(l.length + 1).join("-");
        return l + this.upcomingInput() + `
` + h + "^";
      }, "showPosition"),
      // test the lexed token: return FALSE when not a match, otherwise return token
      test_match: /* @__PURE__ */ f(function(l, h) {
        var d, v, i;
        if (this.options.backtrack_lexer && (i = {
          yylineno: this.yylineno,
          yylloc: {
            first_line: this.yylloc.first_line,
            last_line: this.last_line,
            first_column: this.yylloc.first_column,
            last_column: this.yylloc.last_column
          },
          yytext: this.yytext,
          match: this.match,
          matches: this.matches,
          matched: this.matched,
          yyleng: this.yyleng,
          offset: this.offset,
          _more: this._more,
          _input: this._input,
          yy: this.yy,
          conditionStack: this.conditionStack.slice(0),
          done: this.done
        }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), v = l[0].match(/(?:\r\n?|\n).*/g), v && (this.yylineno += v.length), this.yylloc = {
          first_line: this.yylloc.last_line,
          last_line: this.yylineno + 1,
          first_column: this.yylloc.last_column,
          last_column: v ? v[v.length - 1].length - v[v.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + l[0].length
        }, this.yytext += l[0], this.match += l[0], this.matches = l, 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(l[0].length), this.matched += l[0], d = this.performAction.call(this, this.yy, this, h, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), d)
          return d;
        if (this._backtrack) {
          for (var T in i)
            this[T] = i[T];
          return !1;
        }
        return !1;
      }, "test_match"),
      // return next match in input
      next: /* @__PURE__ */ f(function() {
        if (this.done)
          return this.EOF;
        this._input || (this.done = !0);
        var l, h, d, v;
        this._more || (this.yytext = "", this.match = "");
        for (var i = this._currentRules(), T = 0; T < i.length; T++)
          if (d = this._input.match(this.rules[i[T]]), d && (!h || d[0].length > h[0].length)) {
            if (h = d, v = T, this.options.backtrack_lexer) {
              if (l = this.test_match(d, i[T]), l !== !1)
                return l;
              if (this._backtrack) {
                h = !1;
                continue;
              } else
                return !1;
            } else if (!this.options.flex)
              break;
          }
        return h ? (l = this.test_match(h, i[v]), l !== !1 ? l : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
          text: "",
          token: null,
          line: this.yylineno
        });
      }, "next"),
      // return next match that has a token
      lex: /* @__PURE__ */ f(function() {
        var l = this.next();
        return l || this.lex();
      }, "lex"),
      // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
      begin: /* @__PURE__ */ f(function(l) {
        this.conditionStack.push(l);
      }, "begin"),
      // pop the previously active lexer condition state off the condition stack
      popState: /* @__PURE__ */ f(function() {
        var l = this.conditionStack.length - 1;
        return l > 0 ? this.conditionStack.pop() : this.conditionStack[0];
      }, "popState"),
      // produce the lexer rule set which is active for the currently active lexer condition state
      _currentRules: /* @__PURE__ */ f(function() {
        return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
      }, "_currentRules"),
      // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
      topState: /* @__PURE__ */ f(function(l) {
        return l = this.conditionStack.length - 1 - Math.abs(l || 0), l >= 0 ? this.conditionStack[l] : "INITIAL";
      }, "topState"),
      // alias for begin(condition)
      pushState: /* @__PURE__ */ f(function(l) {
        this.begin(l);
      }, "pushState"),
      // return the number of states currently on the stack
      stateStackSize: /* @__PURE__ */ f(function() {
        return this.conditionStack.length;
      }, "stateStackSize"),
      options: { "case-insensitive": !0 },
      performAction: /* @__PURE__ */ f(function(l, h, d, v) {
        switch (d) {
          case 0:
            return this.begin("open_directive"), "open_directive";
          case 1:
            return this.begin("acc_title"), 31;
          case 2:
            return this.popState(), "acc_title_value";
          case 3:
            return this.begin("acc_descr"), 33;
          case 4:
            return this.popState(), "acc_descr_value";
          case 5:
            this.begin("acc_descr_multiline");
            break;
          case 6:
            this.popState();
            break;
          case 7:
            return "acc_descr_multiline_value";
          case 8:
            break;
          case 9:
            break;
          case 10:
            break;
          case 11:
            return 10;
          case 12:
            break;
          case 13:
            break;
          case 14:
            this.begin("href");
            break;
          case 15:
            this.popState();
            break;
          case 16:
            return 43;
          case 17:
            this.begin("callbackname");
            break;
          case 18:
            this.popState();
            break;
          case 19:
            this.popState(), this.begin("callbackargs");
            break;
          case 20:
            return 41;
          case 21:
            this.popState();
            break;
          case 22:
            return 42;
          case 23:
            this.begin("click");
            break;
          case 24:
            this.popState();
            break;
          case 25:
            return 40;
          case 26:
            return 4;
          case 27:
            return 22;
          case 28:
            return 23;
          case 29:
            return 24;
          case 30:
            return 25;
          case 31:
            return 26;
          case 32:
            return 28;
          case 33:
            return 27;
          case 34:
            return 29;
          case 35:
            return 12;
          case 36:
            return 13;
          case 37:
            return 14;
          case 38:
            return 15;
          case 39:
            return 16;
          case 40:
            return 17;
          case 41:
            return 18;
          case 42:
            return 20;
          case 43:
            return 21;
          case 44:
            return "date";
          case 45:
            return 30;
          case 46:
            return "accDescription";
          case 47:
            return 36;
          case 48:
            return 38;
          case 49:
            return 39;
          case 50:
            return ":";
          case 51:
            return 6;
          case 52:
            return "INVALID";
        }
      }, "anonymous"),
      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],
      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 } }
    };
    return S;
  }();
  $.lexer = M;
  function p() {
    this.yy = {};
  }
  return f(p, "Parser"), p.prototype = $, $.Parser = p, new p();
}();
pe.parser = pe;
var zi = pe;
nt.extend(Ai);
nt.extend(Li);
nt.extend(Pi);
var Qe = { friday: 5, saturday: 6 }, ct = "", De = "", _e = void 0, Me = "", Pt = [], zt = [], Se = /* @__PURE__ */ new Map(), $e = [], Zt = [], Yt = "", Fe = "", Cn = ["active", "done", "crit", "milestone", "vert"], Ye = [], Bt = !1, Ae = !1, Ue = "sunday", te = "saturday", Te = 0, Bi = /* @__PURE__ */ f(function() {
  $e = [], Zt = [], Yt = "", Ye = [], Rt = 0, be = void 0, Xt = void 0, Q = [], ct = "", De = "", Fe = "", _e = void 0, Me = "", Pt = [], zt = [], Bt = !1, Ae = !1, Te = 0, Se = /* @__PURE__ */ new Map(), zn(), Ue = "sunday", te = "saturday";
}, "clear"), Vi = /* @__PURE__ */ f(function(t) {
  De = t;
}, "setAxisFormat"), ji = /* @__PURE__ */ f(function() {
  return De;
}, "getAxisFormat"), Gi = /* @__PURE__ */ f(function(t) {
  _e = t;
}, "setTickInterval"), Ni = /* @__PURE__ */ f(function() {
  return _e;
}, "getTickInterval"), Ri = /* @__PURE__ */ f(function(t) {
  Me = t;
}, "setTodayMarker"), Xi = /* @__PURE__ */ f(function() {
  return Me;
}, "getTodayMarker"), qi = /* @__PURE__ */ f(function(t) {
  ct = t;
}, "setDateFormat"), Ji = /* @__PURE__ */ f(function() {
  Bt = !0;
}, "enableInclusiveEndDates"), Ki = /* @__PURE__ */ f(function() {
  return Bt;
}, "endDatesAreInclusive"), Qi = /* @__PURE__ */ f(function() {
  Ae = !0;
}, "enableTopAxis"), Zi = /* @__PURE__ */ f(function() {
  return Ae;
}, "topAxisEnabled"), ta = /* @__PURE__ */ f(function(t) {
  Fe = t;
}, "setDisplayMode"), ea = /* @__PURE__ */ f(function() {
  return Fe;
}, "getDisplayMode"), na = /* @__PURE__ */ f(function() {
  return ct;
}, "getDateFormat"), ra = /* @__PURE__ */ f(function(t) {
  Pt = t.toLowerCase().split(/[\s,]+/);
}, "setIncludes"), ia = /* @__PURE__ */ f(function() {
  return Pt;
}, "getIncludes"), aa = /* @__PURE__ */ f(function(t) {
  zt = t.toLowerCase().split(/[\s,]+/);
}, "setExcludes"), sa = /* @__PURE__ */ f(function() {
  return zt;
}, "getExcludes"), oa = /* @__PURE__ */ f(function() {
  return Se;
}, "getLinks"), ca = /* @__PURE__ */ f(function(t) {
  Yt = t, $e.push(t);
}, "addSection"), la = /* @__PURE__ */ f(function() {
  return $e;
}, "getSections"), ua = /* @__PURE__ */ f(function() {
  let t = Ze();
  const e = 10;
  let n = 0;
  for (; !t && n < e; )
    t = Ze(), n++;
  return Zt = Q, Zt;
}, "getTasks"), Dn = /* @__PURE__ */ f(function(t, e, n, r) {
  const a = t.format(e.trim()), s = t.format("YYYY-MM-DD");
  return r.includes(a) || r.includes(s) ? !1 : n.includes("weekends") && (t.isoWeekday() === Qe[te] || t.isoWeekday() === Qe[te] + 1) || n.includes(t.format("dddd").toLowerCase()) ? !0 : n.includes(a) || n.includes(s);
}, "isInvalidDate"), da = /* @__PURE__ */ f(function(t) {
  Ue = t;
}, "setWeekday"), fa = /* @__PURE__ */ f(function() {
  return Ue;
}, "getWeekday"), ha = /* @__PURE__ */ f(function(t) {
  te = t;
}, "setWeekend"), _n = /* @__PURE__ */ f(function(t, e, n, r) {
  if (!n.length || t.manualEndTime)
    return;
  let a;
  t.startTime instanceof Date ? a = nt(t.startTime) : a = nt(t.startTime, e, !0), a = a.add(1, "d");
  let s;
  t.endTime instanceof Date ? s = nt(t.endTime) : s = nt(t.endTime, e, !0);
  const [o, y] = ga(
    a,
    s,
    e,
    n,
    r
  );
  t.endTime = o.toDate(), t.renderEndTime = y;
}, "checkTaskDates"), ga = /* @__PURE__ */ f(function(t, e, n, r, a) {
  let s = !1, o = null;
  for (; t <= e; )
    s || (o = e.toDate()), s = Dn(t, n, r, a), s && (e = e.add(1, "d")), t = t.add(1, "d");
  return [e, o];
}, "fixTaskDates"), ve = /* @__PURE__ */ f(function(t, e, n) {
  n = n.trim();
  const r = /^after\s+(?<ids>[\d\w- ]+)/.exec(n);
  if (r !== null) {
    let s = null;
    for (const y of r.groups.ids.split(" ")) {
      let _ = Ct(y);
      _ !== void 0 && (!s || _.endTime > s.endTime) && (s = _);
    }
    if (s)
      return s.endTime;
    const o = /* @__PURE__ */ new Date();
    return o.setHours(0, 0, 0, 0), o;
  }
  let a = nt(n, e.trim(), !0);
  if (a.isValid())
    return a.toDate();
  {
    qt.debug("Invalid date:" + n), qt.debug("With date format:" + e.trim());
    const s = new Date(n);
    if (s === void 0 || isNaN(s.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously
    // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.
    // This can cause virtually infinite loops while rendering, so for the
    // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as
    // invalid.
    s.getFullYear() < -1e4 || s.getFullYear() > 1e4)
      throw new Error("Invalid date:" + n);
    return s;
  }
}, "getStartDate"), Mn = /* @__PURE__ */ f(function(t) {
  const e = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());
  return e !== null ? [Number.parseFloat(e[1]), e[2]] : [NaN, "ms"];
}, "parseDuration"), Sn = /* @__PURE__ */ f(function(t, e, n, r = !1) {
  n = n.trim();
  const a = /^until\s+(?<ids>[\d\w- ]+)/.exec(n);
  if (a !== null) {
    let m = null;
    for (const Y of a.groups.ids.split(" ")) {
      let x = Ct(Y);
      x !== void 0 && (!m || x.startTime < m.startTime) && (m = x);
    }
    if (m)
      return m.startTime;
    const g = /* @__PURE__ */ new Date();
    return g.setHours(0, 0, 0, 0), g;
  }
  let s = nt(n, e.trim(), !0);
  if (s.isValid())
    return r && (s = s.add(1, "d")), s.toDate();
  let o = nt(t);
  const [y, _] = Mn(n);
  if (!Number.isNaN(y)) {
    const m = o.add(y, _);
    m.isValid() && (o = m);
  }
  return o.toDate();
}, "getEndDate"), Rt = 0, St = /* @__PURE__ */ f(function(t) {
  return t === void 0 ? (Rt = Rt + 1, "task" + Rt) : t;
}, "parseId"), ya = /* @__PURE__ */ f(function(t, e) {
  let n;
  e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
  const r = n.split(","), a = {};
  Ee(r, a, Cn);
  for (let o = 0; o < r.length; o++)
    r[o] = r[o].trim();
  let s = "";
  switch (r.length) {
    case 1:
      a.id = St(), a.startTime = t.endTime, s = r[0];
      break;
    case 2:
      a.id = St(), a.startTime = ve(void 0, ct, r[0]), s = r[1];
      break;
    case 3:
      a.id = St(r[0]), a.startTime = ve(void 0, ct, r[1]), s = r[2];
      break;
  }
  return s && (a.endTime = Sn(a.startTime, ct, s, Bt), a.manualEndTime = nt(s, "YYYY-MM-DD", !0).isValid(), _n(a, ct, zt, Pt)), a;
}, "compileData"), ma = /* @__PURE__ */ f(function(t, e) {
  let n;
  e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
  const r = n.split(","), a = {};
  Ee(r, a, Cn);
  for (let s = 0; s < r.length; s++)
    r[s] = r[s].trim();
  switch (r.length) {
    case 1:
      a.id = St(), a.startTime = {
        type: "prevTaskEnd",
        id: t
      }, a.endTime = {
        data: r[0]
      };
      break;
    case 2:
      a.id = St(), a.startTime = {
        type: "getStartDate",
        startData: r[0]
      }, a.endTime = {
        data: r[1]
      };
      break;
    case 3:
      a.id = St(r[0]), a.startTime = {
        type: "getStartDate",
        startData: r[1]
      }, a.endTime = {
        data: r[2]
      };
      break;
  }
  return a;
}, "parseData"), be, Xt, Q = [], $n = {}, ka = /* @__PURE__ */ f(function(t, e) {
  const n = {
    section: Yt,
    type: Yt,
    processed: !1,
    manualEndTime: !1,
    renderEndTime: null,
    raw: { data: e },
    task: t,
    classes: []
  }, r = ma(Xt, e);
  n.raw.startTime = r.startTime, n.raw.endTime = r.endTime, n.id = r.id, n.prevTaskId = Xt, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, n.vert = r.vert, n.order = Te, Te++;
  const a = Q.push(n);
  Xt = n.id, $n[n.id] = a - 1;
}, "addTask"), Ct = /* @__PURE__ */ f(function(t) {
  const e = $n[t];
  return Q[e];
}, "findTaskById"), pa = /* @__PURE__ */ f(function(t, e) {
  const n = {
    section: Yt,
    type: Yt,
    description: t,
    task: t,
    classes: []
  }, r = ya(be, e);
  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, be = n, Zt.push(n);
}, "addTaskOrg"), Ze = /* @__PURE__ */ f(function() {
  const t = /* @__PURE__ */ f(function(n) {
    const r = Q[n];
    let a = "";
    switch (Q[n].raw.startTime.type) {
      case "prevTaskEnd": {
        const s = Ct(r.prevTaskId);
        r.startTime = s.endTime;
        break;
      }
      case "getStartDate":
        a = ve(void 0, ct, Q[n].raw.startTime.startData), a && (Q[n].startTime = a);
        break;
    }
    return Q[n].startTime && (Q[n].endTime = Sn(
      Q[n].startTime,
      ct,
      Q[n].raw.endTime.data,
      Bt
    ), Q[n].endTime && (Q[n].processed = !0, Q[n].manualEndTime = nt(
      Q[n].raw.endTime.data,
      "YYYY-MM-DD",
      !0
    ).isValid(), _n(Q[n], ct, zt, Pt))), Q[n].processed;
  }, "compileTask");
  let e = !0;
  for (const [n, r] of Q.entries())
    t(n), e = e && r.processed;
  return e;
}, "compileTasks"), Ta = /* @__PURE__ */ f(function(t, e) {
  let n = e;
  _t().securityLevel !== "loose" && (n = Pn.sanitizeUrl(e)), t.split(",").forEach(function(r) {
    Ct(r) !== void 0 && (Yn(r, () => {
      window.open(n, "_self");
    }), Se.set(r, n));
  }), Fn(t, "clickable");
}, "setLink"), Fn = /* @__PURE__ */ f(function(t, e) {
  t.split(",").forEach(function(n) {
    let r = Ct(n);
    r !== void 0 && r.classes.push(e);
  });
}, "setClass"), va = /* @__PURE__ */ f(function(t, e, n) {
  if (_t().securityLevel !== "loose" || e === void 0)
    return;
  let r = [];
  if (typeof n == "string") {
    r = n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
    for (let a = 0; a < r.length; a++) {
      let s = r[a].trim();
      s.startsWith('"') && s.endsWith('"') && (s = s.substr(1, s.length - 2)), r[a] = s;
    }
  }
  r.length === 0 && r.push(t), Ct(t) !== void 0 && Yn(t, () => {
    Bn.runFunc(e, ...r);
  });
}, "setClickFun"), Yn = /* @__PURE__ */ f(function(t, e) {
  Ye.push(
    function() {
      const n = document.querySelector(`[id="${t}"]`);
      n !== null && n.addEventListener("click", function() {
        e();
      });
    },
    function() {
      const n = document.querySelector(`[id="${t}-text"]`);
      n !== null && n.addEventListener("click", function() {
        e();
      });
    }
  );
}, "pushFun"), ba = /* @__PURE__ */ f(function(t, e, n) {
  t.split(",").forEach(function(r) {
    va(r, e, n);
  }), Fn(t, "clickable");
}, "setClickEvent"), xa = /* @__PURE__ */ f(function(t) {
  Ye.forEach(function(e) {
    e(t);
  });
}, "bindFunctions"), wa = {
  getConfig: /* @__PURE__ */ f(() => _t().gantt, "getConfig"),
  clear: Bi,
  setDateFormat: qi,
  getDateFormat: na,
  enableInclusiveEndDates: Ji,
  endDatesAreInclusive: Ki,
  enableTopAxis: Qi,
  topAxisEnabled: Zi,
  setAxisFormat: Vi,
  getAxisFormat: ji,
  setTickInterval: Gi,
  getTickInterval: Ni,
  setTodayMarker: Ri,
  getTodayMarker: Xi,
  setAccTitle: On,
  getAccTitle: Ln,
  setDiagramTitle: In,
  getDiagramTitle: En,
  setDisplayMode: ta,
  getDisplayMode: ea,
  setAccDescription: Un,
  getAccDescription: An,
  addSection: ca,
  getSections: la,
  getTasks: ua,
  addTask: ka,
  findTaskById: Ct,
  addTaskOrg: pa,
  setIncludes: ra,
  getIncludes: ia,
  setExcludes: aa,
  getExcludes: sa,
  setClickEvent: ba,
  setLink: Ta,
  getLinks: oa,
  bindFunctions: xa,
  parseDuration: Mn,
  isInvalidDate: Dn,
  setWeekday: da,
  getWeekday: fa,
  setWeekend: ha
};
function Ee(t, e, n) {
  let r = !0;
  for (; r; )
    r = !1, n.forEach(function(a) {
      const s = "^\\s*" + a + "\\s*$", o = new RegExp(s);
      t[0].match(o) && (e[a] = !0, t.shift(1), r = !0);
    });
}
f(Ee, "getTaskTags");
var Ca = /* @__PURE__ */ f(function() {
  qt.debug("Something is calling, setConf, remove the call");
}, "setConf"), tn = {
  monday: Ot,
  tuesday: gn,
  wednesday: yn,
  thursday: vt,
  friday: mn,
  saturday: kn,
  sunday: Wt
}, Da = /* @__PURE__ */ f((t, e) => {
  let n = [...t].map(() => -1 / 0), r = [...t].sort((s, o) => s.startTime - o.startTime || s.order - o.order), a = 0;
  for (const s of r)
    for (let o = 0; o < n.length; o++)
      if (s.startTime >= n[o]) {
        n[o] = s.endTime, s.order = o + e, o > a && (a = o);
        break;
      }
  return a;
}, "getMaxIntersections"), ut, _a = /* @__PURE__ */ f(function(t, e, n, r) {
  const a = _t().gantt, s = _t().securityLevel;
  let o;
  s === "sandbox" && (o = jt("#i" + e));
  const y = s === "sandbox" ? jt(o.nodes()[0].contentDocument.body) : jt("body"), _ = s === "sandbox" ? o.nodes()[0].contentDocument : document, m = _.getElementById(e);
  ut = m.parentElement.offsetWidth, ut === void 0 && (ut = 1200), a.useWidth !== void 0 && (ut = a.useWidth);
  const g = r.db.getTasks();
  let Y = [];
  for (const b of g)
    Y.push(b.type);
  Y = W(Y);
  const x = {};
  let w = 2 * a.topPadding;
  if (r.db.getDisplayMode() === "compact" || a.displayMode === "compact") {
    const b = {};
    for (const $ of g)
      b[$.section] === void 0 ? b[$.section] = [$] : b[$.section].push($);
    let F = 0;
    for (const $ of Object.keys(b)) {
      const M = Da(b[$], F) + 1;
      F += M, w += M * (a.barHeight + a.barGap), x[$] = M;
    }
  } else {
    w += g.length * (a.barHeight + a.barGap);
    for (const b of Y)
      x[b] = g.filter((F) => F.type === b).length;
  }
  m.setAttribute("viewBox", "0 0 " + ut + " " + w);
  const R = y.select(`[id="${e}"]`), I = Si().domain([
    Kn(g, function(b) {
      return b.startTime;
    }),
    Jn(g, function(b) {
      return b.endTime;
    })
  ]).rangeRound([0, ut - a.leftPadding - a.rightPadding]);
  function D(b, F) {
    const $ = b.startTime, M = F.startTime;
    let p = 0;
    return $ > M ? p = 1 : $ < M && (p = -1), p;
  }
  f(D, "taskCompare"), g.sort(D), U(g, ut, w), Hn(R, w, ut, a.useMaxWidth), R.append("text").text(r.db.getDiagramTitle()).attr("x", ut / 2).attr("y", a.titleTopMargin).attr("class", "titleText");
  function U(b, F, $) {
    const M = a.barHeight, p = M + a.barGap, S = a.topPadding, l = a.leftPadding, h = Gn().domain([0, Y.length]).range(["#00B9FA", "#F95002"]).interpolate(fr);
    E(
      p,
      S,
      l,
      F,
      $,
      b,
      r.db.getExcludes(),
      r.db.getIncludes()
    ), G(l, S, F, $), z(b, p, S, l, M, h, F), q(p, S), C(l, S, F, $);
  }
  f(U, "makeGantt");
  function z(b, F, $, M, p, S, l) {
    b.sort((i, T) => i.vert === T.vert ? 0 : i.vert ? 1 : -1);
    const h = [...new Set(b.map((i) => i.order))].map((i) => b.find((T) => T.order === i));
    R.append("g").selectAll("rect").data(h).enter().append("rect").attr("x", 0).attr("y", function(i, T) {
      return T = i.order, T * F + $ - 2;
    }).attr("width", function() {
      return l - a.rightPadding / 2;
    }).attr("height", F).attr("class", function(i) {
      for (const [T, c] of Y.entries())
        if (i.type === c)
          return "section section" + T % a.numberSectionStyles;
      return "section section0";
    }).enter();
    const d = R.append("g").selectAll("rect").data(b).enter(), v = r.db.getLinks();
    if (d.append("rect").attr("id", function(i) {
      return i.id;
    }).attr("rx", 3).attr("ry", 3).attr("x", function(i) {
      return i.milestone ? I(i.startTime) + M + 0.5 * (I(i.endTime) - I(i.startTime)) - 0.5 * p : I(i.startTime) + M;
    }).attr("y", function(i, T) {
      return T = i.order, i.vert ? a.gridLineStartPadding : T * F + $;
    }).attr("width", function(i) {
      return i.milestone ? p : i.vert ? 0.08 * p : I(i.renderEndTime || i.endTime) - I(i.startTime);
    }).attr("height", function(i) {
      return i.vert ? g.length * (a.barHeight + a.barGap) + a.barHeight * 2 : p;
    }).attr("transform-origin", function(i, T) {
      return T = i.order, (I(i.startTime) + M + 0.5 * (I(i.endTime) - I(i.startTime))).toString() + "px " + (T * F + $ + 0.5 * p).toString() + "px";
    }).attr("class", function(i) {
      const T = "task";
      let c = "";
      i.classes.length > 0 && (c = i.classes.join(" "));
      let L = 0;
      for (const [X, N] of Y.entries())
        i.type === N && (L = X % a.numberSectionStyles);
      let A = "";
      return i.active ? i.crit ? A += " activeCrit" : A = " active" : i.done ? i.crit ? A = " doneCrit" : A = " done" : i.crit && (A += " crit"), A.length === 0 && (A = " task"), i.milestone && (A = " milestone " + A), i.vert && (A = " vert " + A), A += L, A += " " + c, T + A;
    }), d.append("text").attr("id", function(i) {
      return i.id + "-text";
    }).text(function(i) {
      return i.task;
    }).attr("font-size", a.fontSize).attr("x", function(i) {
      let T = I(i.startTime), c = I(i.renderEndTime || i.endTime);
      if (i.milestone && (T += 0.5 * (I(i.endTime) - I(i.startTime)) - 0.5 * p, c = T + p), i.vert)
        return I(i.startTime) + M;
      const L = this.getBBox().width;
      return L > c - T ? c + L + 1.5 * a.leftPadding > l ? T + M - 5 : c + M + 5 : (c - T) / 2 + T + M;
    }).attr("y", function(i, T) {
      return i.vert ? a.gridLineStartPadding + g.length * (a.barHeight + a.barGap) + 60 : (T = i.order, T * F + a.barHeight / 2 + (a.fontSize / 2 - 2) + $);
    }).attr("text-height", p).attr("class", function(i) {
      const T = I(i.startTime);
      let c = I(i.endTime);
      i.milestone && (c = T + p);
      const L = this.getBBox().width;
      let A = "";
      i.classes.length > 0 && (A = i.classes.join(" "));
      let X = 0;
      for (const [kt, J] of Y.entries())
        i.type === J && (X = kt % a.numberSectionStyles);
      let N = "";
      return i.active && (i.crit ? N = "activeCritText" + X : N = "activeText" + X), i.done ? i.crit ? N = N + " doneCritText" + X : N = N + " doneText" + X : i.crit && (N = N + " critText" + X), i.milestone && (N += " milestoneText"), i.vert && (N += " vertText"), L > c - T ? c + L + 1.5 * a.leftPadding > l ? A + " taskTextOutsideLeft taskTextOutside" + X + " " + N : A + " taskTextOutsideRight taskTextOutside" + X + " " + N + " width-" + L : A + " taskText taskText" + X + " " + N + " width-" + L;
    }), _t().securityLevel === "sandbox") {
      let i;
      i = jt("#i" + e);
      const T = i.nodes()[0].contentDocument;
      d.filter(function(c) {
        return v.has(c.id);
      }).each(function(c) {
        var L = T.querySelector("#" + c.id), A = T.querySelector("#" + c.id + "-text");
        const X = L.parentNode;
        var N = T.createElement("a");
        N.setAttribute("xlink:href", v.get(c.id)), N.setAttribute("target", "_top"), X.appendChild(N), N.appendChild(L), N.appendChild(A);
      });
    }
  }
  f(z, "drawRects");
  function E(b, F, $, M, p, S, l, h) {
    if (l.length === 0 && h.length === 0)
      return;
    let d, v;
    for (const { startTime: A, endTime: X } of S)
      (d === void 0 || A < d) && (d = A), (v === void 0 || X > v) && (v = X);
    if (!d || !v)
      return;
    if (nt(v).diff(nt(d), "year") > 5) {
      qt.warn(
        "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days."
      );
      return;
    }
    const i = r.db.getDateFormat(), T = [];
    let c = null, L = nt(d);
    for (; L.valueOf() <= v; )
      r.db.isInvalidDate(L, i, l, h) ? c ? c.end = L : c = {
        start: L,
        end: L
      } : c && (T.push(c), c = null), L = L.add(1, "d");
    R.append("g").selectAll("rect").data(T).enter().append("rect").attr("id", (A) => "exclude-" + A.start.format("YYYY-MM-DD")).attr("x", (A) => I(A.start.startOf("day")) + $).attr("y", a.gridLineStartPadding).attr("width", (A) => I(A.end.endOf("day")) - I(A.start.startOf("day"))).attr("height", p - F - a.gridLineStartPadding).attr("transform-origin", function(A, X) {
      return (I(A.start) + $ + 0.5 * (I(A.end) - I(A.start))).toString() + "px " + (X * b + 0.5 * p).toString() + "px";
    }).attr("class", "exclude-range");
  }
  f(E, "drawExcludeDays");
  function G(b, F, $, M) {
    const p = r.db.getDateFormat(), S = r.db.getAxisFormat();
    let l;
    S ? l = S : p === "D" ? l = "%d" : l = a.axisFormat ?? "%Y-%m-%d";
    let h = ar(I).tickSize(-M + F + a.gridLineStartPadding).tickFormat(Qt(l));
    const d = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(
      r.db.getTickInterval() || a.tickInterval
    );
    if (d !== null) {
      const v = d[1], i = d[2], T = r.db.getWeekday() || a.weekday;
      switch (i) {
        case "millisecond":
          h.ticks($t.every(v));
          break;
        case "second":
          h.ticks(mt.every(v));
          break;
        case "minute":
          h.ticks(It.every(v));
          break;
        case "hour":
          h.ticks(Lt.every(v));
          break;
        case "day":
          h.ticks(Tt.every(v));
          break;
        case "week":
          h.ticks(tn[T].every(v));
          break;
        case "month":
          h.ticks(Ht.every(v));
          break;
      }
    }
    if (R.append("g").attr("class", "grid").attr("transform", "translate(" + b + ", " + (M - 50) + ")").call(h).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), r.db.topAxisEnabled() || a.topAxis) {
      let v = ir(I).tickSize(-M + F + a.gridLineStartPadding).tickFormat(Qt(l));
      if (d !== null) {
        const i = d[1], T = d[2], c = r.db.getWeekday() || a.weekday;
        switch (T) {
          case "millisecond":
            v.ticks($t.every(i));
            break;
          case "second":
            v.ticks(mt.every(i));
            break;
          case "minute":
            v.ticks(It.every(i));
            break;
          case "hour":
            v.ticks(Lt.every(i));
            break;
          case "day":
            v.ticks(Tt.every(i));
            break;
          case "week":
            v.ticks(tn[c].every(i));
            break;
          case "month":
            v.ticks(Ht.every(i));
            break;
        }
      }
      R.append("g").attr("class", "grid").attr("transform", "translate(" + b + ", " + F + ")").call(v).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
    }
  }
  f(G, "makeGrid");
  function q(b, F) {
    let $ = 0;
    const M = Object.keys(x).map((p) => [p, x[p]]);
    R.append("g").selectAll("text").data(M).enter().append(function(p) {
      const S = p[0].split(Wn.lineBreakRegex), l = -(S.length - 1) / 2, h = _.createElementNS("http://www.w3.org/2000/svg", "text");
      h.setAttribute("dy", l + "em");
      for (const [d, v] of S.entries()) {
        const i = _.createElementNS("http://www.w3.org/2000/svg", "tspan");
        i.setAttribute("alignment-baseline", "central"), i.setAttribute("x", "10"), d > 0 && i.setAttribute("dy", "1em"), i.textContent = v, h.appendChild(i);
      }
      return h;
    }).attr("x", 10).attr("y", function(p, S) {
      if (S > 0)
        for (let l = 0; l < S; l++)
          return $ += M[S - 1][1], p[1] * b / 2 + $ * b + F;
      else
        return p[1] * b / 2 + F;
    }).attr("font-size", a.sectionFontSize).attr("class", function(p) {
      for (const [S, l] of Y.entries())
        if (p[0] === l)
          return "sectionTitle sectionTitle" + S % a.numberSectionStyles;
      return "sectionTitle";
    });
  }
  f(q, "vertLabels");
  function C(b, F, $, M) {
    const p = r.db.getTodayMarker();
    if (p === "off")
      return;
    const S = R.append("g").attr("class", "today"), l = /* @__PURE__ */ new Date(), h = S.append("line");
    h.attr("x1", I(l) + b).attr("x2", I(l) + b).attr("y1", a.titleTopMargin).attr("y2", M - a.titleTopMargin).attr("class", "today"), p !== "" && h.attr("style", p.replace(/,/g, ";"));
  }
  f(C, "drawToday");
  function W(b) {
    const F = {}, $ = [];
    for (let M = 0, p = b.length; M < p; ++M)
      Object.prototype.hasOwnProperty.call(F, b[M]) || (F[b[M]] = !0, $.push(b[M]));
    return $;
  }
  f(W, "checkUnique");
}, "draw"), Ma = {
  setConf: Ca,
  draw: _a
}, Sa = /* @__PURE__ */ f((t) => `
  .mermaid-main-font {
        font-family: ${t.fontFamily};
  }

  .exclude-range {
    fill: ${t.excludeBkgColor};
  }

  .section {
    stroke: none;
    opacity: 0.2;
  }

  .section0 {
    fill: ${t.sectionBkgColor};
  }

  .section2 {
    fill: ${t.sectionBkgColor2};
  }

  .section1,
  .section3 {
    fill: ${t.altSectionBkgColor};
    opacity: 0.2;
  }

  .sectionTitle0 {
    fill: ${t.titleColor};
  }

  .sectionTitle1 {
    fill: ${t.titleColor};
  }

  .sectionTitle2 {
    fill: ${t.titleColor};
  }

  .sectionTitle3 {
    fill: ${t.titleColor};
  }

  .sectionTitle {
    text-anchor: start;
    font-family: ${t.fontFamily};
  }


  /* Grid and axis */

  .grid .tick {
    stroke: ${t.gridColor};
    opacity: 0.8;
    shape-rendering: crispEdges;
  }

  .grid .tick text {
    font-family: ${t.fontFamily};
    fill: ${t.textColor};
  }

  .grid path {
    stroke-width: 0;
  }


  /* Today line */

  .today {
    fill: none;
    stroke: ${t.todayLineColor};
    stroke-width: 2px;
  }


  /* Task styling */

  /* Default task */

  .task {
    stroke-width: 2;
  }

  .taskText {
    text-anchor: middle;
    font-family: ${t.fontFamily};
  }

  .taskTextOutsideRight {
    fill: ${t.taskTextDarkColor};
    text-anchor: start;
    font-family: ${t.fontFamily};
  }

  .taskTextOutsideLeft {
    fill: ${t.taskTextDarkColor};
    text-anchor: end;
  }


  /* Special case clickable */

  .task.clickable {
    cursor: pointer;
  }

  .taskText.clickable {
    cursor: pointer;
    fill: ${t.taskTextClickableColor} !important;
    font-weight: bold;
  }

  .taskTextOutsideLeft.clickable {
    cursor: pointer;
    fill: ${t.taskTextClickableColor} !important;
    font-weight: bold;
  }

  .taskTextOutsideRight.clickable {
    cursor: pointer;
    fill: ${t.taskTextClickableColor} !important;
    font-weight: bold;
  }


  /* Specific task settings for the sections*/

  .taskText0,
  .taskText1,
  .taskText2,
  .taskText3 {
    fill: ${t.taskTextColor};
  }

  .task0,
  .task1,
  .task2,
  .task3 {
    fill: ${t.taskBkgColor};
    stroke: ${t.taskBorderColor};
  }

  .taskTextOutside0,
  .taskTextOutside2
  {
    fill: ${t.taskTextOutsideColor};
  }

  .taskTextOutside1,
  .taskTextOutside3 {
    fill: ${t.taskTextOutsideColor};
  }


  /* Active task */

  .active0,
  .active1,
  .active2,
  .active3 {
    fill: ${t.activeTaskBkgColor};
    stroke: ${t.activeTaskBorderColor};
  }

  .activeText0,
  .activeText1,
  .activeText2,
  .activeText3 {
    fill: ${t.taskTextDarkColor} !important;
  }


  /* Completed task */

  .done0,
  .done1,
  .done2,
  .done3 {
    stroke: ${t.doneTaskBorderColor};
    fill: ${t.doneTaskBkgColor};
    stroke-width: 2;
  }

  .doneText0,
  .doneText1,
  .doneText2,
  .doneText3 {
    fill: ${t.taskTextDarkColor} !important;
  }


  /* Tasks on the critical line */

  .crit0,
  .crit1,
  .crit2,
  .crit3 {
    stroke: ${t.critBorderColor};
    fill: ${t.critBkgColor};
    stroke-width: 2;
  }

  .activeCrit0,
  .activeCrit1,
  .activeCrit2,
  .activeCrit3 {
    stroke: ${t.critBorderColor};
    fill: ${t.activeTaskBkgColor};
    stroke-width: 2;
  }

  .doneCrit0,
  .doneCrit1,
  .doneCrit2,
  .doneCrit3 {
    stroke: ${t.critBorderColor};
    fill: ${t.doneTaskBkgColor};
    stroke-width: 2;
    cursor: pointer;
    shape-rendering: crispEdges;
  }

  .milestone {
    transform: rotate(45deg) scale(0.8,0.8);
  }

  .milestoneText {
    font-style: italic;
  }
  .doneCritText0,
  .doneCritText1,
  .doneCritText2,
  .doneCritText3 {
    fill: ${t.taskTextDarkColor} !important;
  }

  .vert {
    stroke: ${t.vertLineColor};
  }

  .vertText {
    font-size: 15px;
    text-anchor: middle;
    fill: ${t.vertLineColor} !important;
  }

  .activeCritText0,
  .activeCritText1,
  .activeCritText2,
  .activeCritText3 {
    fill: ${t.taskTextDarkColor} !important;
  }

  .titleText {
    text-anchor: middle;
    font-size: 18px;
    fill: ${t.titleColor || t.textColor};
    font-family: ${t.fontFamily};
  }
`, "getStyles"), $a = Sa, Ua = {
  parser: zi,
  db: wa,
  renderer: Ma,
  styles: $a
};
export {
  Ua as diagram
};
