mermaid
Version:
Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.
1,590 lines • 328 kB
JavaScript
function mh(t) {
for (var e = [], i = 1; i < arguments.length; i++)
e[i - 1] = arguments[i];
var r = Array.from(typeof t == "string" ? [t] : t);
r[r.length - 1] = r[r.length - 1].replace(/\r?\n([\t ]*)$/, "");
var n = r.reduce(function(a, l) {
var h = l.match(/\n([\t ]+|(?!\s).)/g);
return h ? a.concat(h.map(function(u) {
var f, c;
return (c = (f = u.match(/[\t ]/g)) === null || f === void 0 ? void 0 : f.length) !== null && c !== void 0 ? c : 0;
})) : a;
}, []);
if (n.length) {
var o = new RegExp(`
[ ]{` + Math.min.apply(Math, n) + "}", "g");
r = r.map(function(a) {
return a.replace(o, `
`);
});
}
r[0] = r[0].replace(/^\r?\n/, "");
var s = r[0];
return e.forEach(function(a, l) {
var h = s.match(/(?:^|\n)( *)$/), u = h ? h[1] : "", f = a;
typeof a == "string" && a.includes(`
`) && (f = String(a).split(`
`).map(function(c, d) {
return d === 0 ? c : "" + u + c;
}).join(`
`)), s += f + r[l + 1];
}), s;
}
var yh = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function _h(t) {
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
}
var Ns = { exports: {} };
(function(t, e) {
(function(i, r) {
t.exports = r();
})(yh, function() {
var i = 1e3, r = 6e4, n = 36e5, o = "millisecond", s = "second", a = "minute", l = "hour", h = "day", u = "week", f = "month", c = "quarter", d = "year", m = "date", S = "Invalid Date", O = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, z = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, T = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(M) {
var k = ["th", "st", "nd", "rd"], C = M % 100;
return "[" + M + (k[(C - 20) % 10] || k[C] || k[0]) + "]";
} }, R = function(M, k, C) {
var w = String(M);
return !w || w.length >= k ? M : "" + Array(k + 1 - w.length).join(C) + M;
}, X = { s: R, z: function(M) {
var k = -M.utcOffset(), C = Math.abs(k), w = Math.floor(C / 60), x = C % 60;
return (k <= 0 ? "+" : "-") + R(w, 2, "0") + ":" + R(x, 2, "0");
}, m: function M(k, C) {
if (k.date() < C.date())
return -M(C, k);
var w = 12 * (C.year() - k.year()) + (C.month() - k.month()), x = k.clone().add(w, f), b = C - x < 0, D = k.clone().add(w + (b ? -1 : 1), f);
return +(-(w + (C - x) / (b ? x - D : D - x)) || 0);
}, a: function(M) {
return M < 0 ? Math.ceil(M) || 0 : Math.floor(M);
}, p: function(M) {
return { M: f, y: d, w: u, d: h, D: m, h: l, m: a, s, ms: o, Q: c }[M] || String(M || "").toLowerCase().replace(/s$/, "");
}, u: function(M) {
return M === void 0;
} }, G = "en", V = {};
V[G] = T;
var H = "$isDayjsObject", oe = function(M) {
return M instanceof Ct || !(!M || !M[H]);
}, Kt = function M(k, C, w) {
var x;
if (!k)
return G;
if (typeof k == "string") {
var b = k.toLowerCase();
V[b] && (x = b), C && (V[b] = C, x = b);
var D = k.split("-");
if (!x && D.length > 1)
return M(D[0]);
} else {
var I = k.name;
V[I] = k, x = I;
}
return !w && x && (G = x), x || !w && G;
}, P = function(M, k) {
if (oe(M))
return M.clone();
var C = typeof k == "object" ? k : {};
return C.date = M, C.args = arguments, new Ct(C);
}, W = X;
W.l = Kt, W.i = oe, W.w = function(M, k) {
return P(M, { locale: k.$L, utc: k.$u, x: k.$x, $offset: k.$offset });
};
var Ct = function() {
function M(C) {
this.$L = Kt(C.locale, null, !0), this.parse(C), this.$x = this.$x || C.x || {}, this[H] = !0;
}
var k = M.prototype;
return k.parse = function(C) {
this.$d = function(w) {
var x = w.date, b = w.utc;
if (x === null)
return /* @__PURE__ */ new Date(NaN);
if (W.u(x))
return /* @__PURE__ */ new Date();
if (x instanceof Date)
return new Date(x);
if (typeof x == "string" && !/Z$/i.test(x)) {
var D = x.match(O);
if (D) {
var I = D[2] - 1 || 0, Y = (D[7] || "0").substring(0, 3);
return b ? new Date(Date.UTC(D[1], I, D[3] || 1, D[4] || 0, D[5] || 0, D[6] || 0, Y)) : new Date(D[1], I, D[3] || 1, D[4] || 0, D[5] || 0, D[6] || 0, Y);
}
}
return new Date(x);
}(C), this.init();
}, k.init = function() {
var C = this.$d;
this.$y = C.getFullYear(), this.$M = C.getMonth(), this.$D = C.getDate(), this.$W = C.getDay(), this.$H = C.getHours(), this.$m = C.getMinutes(), this.$s = C.getSeconds(), this.$ms = C.getMilliseconds();
}, k.$utils = function() {
return W;
}, k.isValid = function() {
return this.$d.toString() !== S;
}, k.isSame = function(C, w) {
var x = P(C);
return this.startOf(w) <= x && x <= this.endOf(w);
}, k.isAfter = function(C, w) {
return P(C) < this.startOf(w);
}, k.isBefore = function(C, w) {
return this.endOf(w) < P(C);
}, k.$g = function(C, w, x) {
return W.u(C) ? this[w] : this.set(x, C);
}, k.unix = function() {
return Math.floor(this.valueOf() / 1e3);
}, k.valueOf = function() {
return this.$d.getTime();
}, k.startOf = function(C, w) {
var x = this, b = !!W.u(w) || w, D = W.p(C), I = function(Lt, Z) {
var it = W.w(x.$u ? Date.UTC(x.$y, Z, Lt) : new Date(x.$y, Z, Lt), x);
return b ? it : it.endOf(h);
}, Y = function(Lt, Z) {
return W.w(x.toDate()[Lt].apply(x.toDate("s"), (b ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(Z)), x);
}, N = this.$W, K = this.$M, et = this.$D, Rt = "set" + (this.$u ? "UTC" : "");
switch (D) {
case d:
return b ? I(1, 0) : I(31, 11);
case f:
return b ? I(1, K) : I(0, K + 1);
case u:
var St = this.$locale().weekStart || 0, Zt = (N < St ? N + 7 : N) - St;
return I(b ? et - Zt : et + (6 - Zt), K);
case h:
case m:
return Y(Rt + "Hours", 0);
case l:
return Y(Rt + "Minutes", 1);
case a:
return Y(Rt + "Seconds", 2);
case s:
return Y(Rt + "Milliseconds", 3);
default:
return this.clone();
}
}, k.endOf = function(C) {
return this.startOf(C, !1);
}, k.$set = function(C, w) {
var x, b = W.p(C), D = "set" + (this.$u ? "UTC" : ""), I = (x = {}, x[h] = D + "Date", x[m] = D + "Date", x[f] = D + "Month", x[d] = D + "FullYear", x[l] = D + "Hours", x[a] = D + "Minutes", x[s] = D + "Seconds", x[o] = D + "Milliseconds", x)[b], Y = b === h ? this.$D + (w - this.$W) : w;
if (b === f || b === d) {
var N = this.clone().set(m, 1);
N.$d[I](Y), N.init(), this.$d = N.set(m, Math.min(this.$D, N.daysInMonth())).$d;
} else
I && this.$d[I](Y);
return this.init(), this;
}, k.set = function(C, w) {
return this.clone().$set(C, w);
}, k.get = function(C) {
return this[W.p(C)]();
}, k.add = function(C, w) {
var x, b = this;
C = Number(C);
var D = W.p(w), I = function(K) {
var et = P(b);
return W.w(et.date(et.date() + Math.round(K * C)), b);
};
if (D === f)
return this.set(f, this.$M + C);
if (D === d)
return this.set(d, this.$y + C);
if (D === h)
return I(1);
if (D === u)
return I(7);
var Y = (x = {}, x[a] = r, x[l] = n, x[s] = i, x)[D] || 1, N = this.$d.getTime() + C * Y;
return W.w(N, this);
}, k.subtract = function(C, w) {
return this.add(-1 * C, w);
}, k.format = function(C) {
var w = this, x = this.$locale();
if (!this.isValid())
return x.invalidDate || S;
var b = C || "YYYY-MM-DDTHH:mm:ssZ", D = W.z(this), I = this.$H, Y = this.$m, N = this.$M, K = x.weekdays, et = x.months, Rt = x.meridiem, St = function(Z, it, Pt, Jt) {
return Z && (Z[it] || Z(w, b)) || Pt[it].slice(0, Jt);
}, Zt = function(Z) {
return W.s(I % 12 || 12, Z, "0");
}, Lt = Rt || function(Z, it, Pt) {
var Jt = Z < 12 ? "AM" : "PM";
return Pt ? Jt.toLowerCase() : Jt;
};
return b.replace(z, function(Z, it) {
return it || function(Pt) {
switch (Pt) {
case "YY":
return String(w.$y).slice(-2);
case "YYYY":
return W.s(w.$y, 4, "0");
case "M":
return N + 1;
case "MM":
return W.s(N + 1, 2, "0");
case "MMM":
return St(x.monthsShort, N, et, 3);
case "MMMM":
return St(et, N);
case "D":
return w.$D;
case "DD":
return W.s(w.$D, 2, "0");
case "d":
return String(w.$W);
case "dd":
return St(x.weekdaysMin, w.$W, K, 2);
case "ddd":
return St(x.weekdaysShort, w.$W, K, 3);
case "dddd":
return K[w.$W];
case "H":
return String(I);
case "HH":
return W.s(I, 2, "0");
case "h":
return Zt(1);
case "hh":
return Zt(2);
case "a":
return Lt(I, Y, !0);
case "A":
return Lt(I, Y, !1);
case "m":
return String(Y);
case "mm":
return W.s(Y, 2, "0");
case "s":
return String(w.$s);
case "ss":
return W.s(w.$s, 2, "0");
case "SSS":
return W.s(w.$ms, 3, "0");
case "Z":
return D;
}
return null;
}(Z) || D.replace(":", "");
});
}, k.utcOffset = function() {
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
}, k.diff = function(C, w, x) {
var b, D = this, I = W.p(w), Y = P(C), N = (Y.utcOffset() - this.utcOffset()) * r, K = this - Y, et = function() {
return W.m(D, Y);
};
switch (I) {
case d:
b = et() / 12;
break;
case f:
b = et();
break;
case c:
b = et() / 3;
break;
case u:
b = (K - N) / 6048e5;
break;
case h:
b = (K - N) / 864e5;
break;
case l:
b = K / n;
break;
case a:
b = K / r;
break;
case s:
b = K / i;
break;
default:
b = K;
}
return x ? b : W.a(b);
}, k.daysInMonth = function() {
return this.endOf(f).$D;
}, k.$locale = function() {
return V[this.$L];
}, k.locale = function(C, w) {
if (!C)
return this.$L;
var x = this.clone(), b = Kt(C, w, !0);
return b && (x.$L = b), x;
}, k.clone = function() {
return W.w(this.$d, this);
}, k.toDate = function() {
return new Date(this.valueOf());
}, k.toJSON = function() {
return this.isValid() ? this.toISOString() : null;
}, k.toISOString = function() {
return this.$d.toISOString();
}, k.toString = function() {
return this.$d.toUTCString();
}, M;
}(), Nt = Ct.prototype;
return P.prototype = Nt, [["$ms", o], ["$s", s], ["$m", a], ["$H", l], ["$W", h], ["$M", f], ["$y", d], ["$D", m]].forEach(function(M) {
Nt[M[1]] = function(k) {
return this.$g(k, M[0], M[1]);
};
}), P.extend = function(M, k) {
return M.$i || (M(k, Ct, P), M.$i = !0), P;
}, P.locale = Kt, P.isDayjs = oe, P.unix = function(M) {
return P(1e3 * M);
}, P.en = V[G], P.Ls = V, P.p = {}, P;
});
})(Ns);
var Ch = Ns.exports;
const xh = /* @__PURE__ */ _h(Ch), Wt = {
trace: 0,
debug: 1,
info: 2,
warn: 3,
error: 4,
fatal: 5
}, L = {
trace: (...t) => {
},
debug: (...t) => {
},
info: (...t) => {
},
warn: (...t) => {
},
error: (...t) => {
},
fatal: (...t) => {
}
}, bn = function(t = "fatal") {
let e = Wt.fatal;
typeof t == "string" ? (t = t.toLowerCase(), t in Wt && (e = Wt[t])) : typeof t == "number" && (e = t), L.trace = () => {
}, L.debug = () => {
}, L.info = () => {
}, L.warn = () => {
}, L.error = () => {
}, L.fatal = () => {
}, e <= Wt.fatal && (L.fatal = console.error ? console.error.bind(console, xt("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", xt("FATAL"))), e <= Wt.error && (L.error = console.error ? console.error.bind(console, xt("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", xt("ERROR"))), e <= Wt.warn && (L.warn = console.warn ? console.warn.bind(console, xt("WARN"), "color: orange") : console.log.bind(console, "\x1B[33m", xt("WARN"))), e <= Wt.info && (L.info = console.info ? console.info.bind(console, xt("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", xt("INFO"))), e <= Wt.debug && (L.debug = console.debug ? console.debug.bind(console, xt("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", xt("DEBUG"))), e <= Wt.trace && (L.trace = console.debug ? console.debug.bind(console, xt("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", xt("TRACE")));
}, xt = (t) => `%c${xh().format("ss.SSS")} : ${t} : `;
var Rs = {};
(function(t) {
Object.defineProperty(t, "__esModule", { value: !0 }), t.sanitizeUrl = t.BLANK_URL = void 0;
var e = /^([^\w]*)(javascript|data|vbscript)/im, i = /&#(\w+)(^\w|;)?/g, r = /&(newline|tab);/gi, n = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim, o = /^.+(:|:)/gim, s = [".", "/"];
t.BLANK_URL = "about:blank";
function a(u) {
return s.indexOf(u[0]) > -1;
}
function l(u) {
var f = u.replace(n, "");
return f.replace(i, function(c, d) {
return String.fromCharCode(d);
});
}
function h(u) {
if (!u)
return t.BLANK_URL;
var f = l(u).replace(r, "").replace(n, "").trim();
if (!f)
return t.BLANK_URL;
if (a(f))
return f;
var c = f.match(o);
if (!c)
return f;
var d = c[0];
return e.test(d) ? t.BLANK_URL : f;
}
t.sanitizeUrl = h;
})(Rs);
var bh = { value: () => {
} };
function Ps() {
for (var t = 0, e = arguments.length, i = {}, r; t < e; ++t) {
if (!(r = arguments[t] + "") || r in i || /[\s.]/.test(r))
throw new Error("illegal type: " + r);
i[r] = [];
}
return new Oi(i);
}
function Oi(t) {
this._ = t;
}
function Th(t, e) {
return t.trim().split(/^|\s+/).map(function(i) {
var r = "", n = i.indexOf(".");
if (n >= 0 && (r = i.slice(n + 1), i = i.slice(0, n)), i && !e.hasOwnProperty(i))
throw new Error("unknown type: " + i);
return { type: i, name: r };
});
}
Oi.prototype = Ps.prototype = {
constructor: Oi,
on: function(t, e) {
var i = this._, r = Th(t + "", i), n, o = -1, s = r.length;
if (arguments.length < 2) {
for (; ++o < s; )
if ((n = (t = r[o]).type) && (n = kh(i[n], t.name)))
return n;
return;
}
if (e != null && typeof e != "function")
throw new Error("invalid callback: " + e);
for (; ++o < s; )
if (n = (t = r[o]).type)
i[n] = To(i[n], t.name, e);
else if (e == null)
for (n in i)
i[n] = To(i[n], t.name, null);
return this;
},
copy: function() {
var t = {}, e = this._;
for (var i in e)
t[i] = e[i].slice();
return new Oi(t);
},
call: function(t, e) {
if ((n = arguments.length - 2) > 0)
for (var i = new Array(n), r = 0, n, o; r < n; ++r)
i[r] = arguments[r + 2];
if (!this._.hasOwnProperty(t))
throw new Error("unknown type: " + t);
for (o = this._[t], r = 0, n = o.length; r < n; ++r)
o[r].value.apply(e, i);
},
apply: function(t, e, i) {
if (!this._.hasOwnProperty(t))
throw new Error("unknown type: " + t);
for (var r = this._[t], n = 0, o = r.length; n < o; ++n)
r[n].value.apply(e, i);
}
};
function kh(t, e) {
for (var i = 0, r = t.length, n; i < r; ++i)
if ((n = t[i]).name === e)
return n.value;
}
function To(t, e, i) {
for (var r = 0, n = t.length; r < n; ++r)
if (t[r].name === e) {
t[r] = bh, t = t.slice(0, r).concat(t.slice(r + 1));
break;
}
return i != null && t.push({ name: e, value: i }), t;
}
var Jr = "http://www.w3.org/1999/xhtml";
const ko = {
svg: "http://www.w3.org/2000/svg",
xhtml: Jr,
xlink: "http://www.w3.org/1999/xlink",
xml: "http://www.w3.org/XML/1998/namespace",
xmlns: "http://www.w3.org/2000/xmlns/"
};
function fr(t) {
var e = t += "", i = e.indexOf(":");
return i >= 0 && (e = t.slice(0, i)) !== "xmlns" && (t = t.slice(i + 1)), ko.hasOwnProperty(e) ? { space: ko[e], local: t } : t;
}
function Sh(t) {
return function() {
var e = this.ownerDocument, i = this.namespaceURI;
return i === Jr && e.documentElement.namespaceURI === Jr ? e.createElement(t) : e.createElementNS(i, t);
};
}
function vh(t) {
return function() {
return this.ownerDocument.createElementNS(t.space, t.local);
};
}
function qs(t) {
var e = fr(t);
return (e.local ? vh : Sh)(e);
}
function wh() {
}
function Tn(t) {
return t == null ? wh : function() {
return this.querySelector(t);
};
}
function Bh(t) {
typeof t != "function" && (t = Tn(t));
for (var e = this._groups, i = e.length, r = new Array(i), n = 0; n < i; ++n)
for (var o = e[n], s = o.length, a = r[n] = new Array(s), l, h, u = 0; u < s; ++u)
(l = o[u]) && (h = t.call(l, l.__data__, u, o)) && ("__data__" in l && (h.__data__ = l.__data__), a[u] = h);
return new yt(r, this._parents);
}
function Fh(t) {
return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
}
function Ah() {
return [];
}
function zs(t) {
return t == null ? Ah : function() {
return this.querySelectorAll(t);
};
}
function Lh(t) {
return function() {
return Fh(t.apply(this, arguments));
};
}
function Eh(t) {
typeof t == "function" ? t = Lh(t) : t = zs(t);
for (var e = this._groups, i = e.length, r = [], n = [], o = 0; o < i; ++o)
for (var s = e[o], a = s.length, l, h = 0; h < a; ++h)
(l = s[h]) && (r.push(t.call(l, l.__data__, h, s)), n.push(l));
return new yt(r, n);
}
function Ws(t) {
return function() {
return this.matches(t);
};
}
function Hs(t) {
return function(e) {
return e.matches(t);
};
}
var Mh = Array.prototype.find;
function Oh(t) {
return function() {
return Mh.call(this.children, t);
};
}
function $h() {
return this.firstElementChild;
}
function Ih(t) {
return this.select(t == null ? $h : Oh(typeof t == "function" ? t : Hs(t)));
}
var Dh = Array.prototype.filter;
function Nh() {
return Array.from(this.children);
}
function Rh(t) {
return function() {
return Dh.call(this.children, t);
};
}
function Ph(t) {
return this.selectAll(t == null ? Nh : Rh(typeof t == "function" ? t : Hs(t)));
}
function qh(t) {
typeof t != "function" && (t = Ws(t));
for (var e = this._groups, i = e.length, r = new Array(i), n = 0; n < i; ++n)
for (var o = e[n], s = o.length, a = r[n] = [], l, h = 0; h < s; ++h)
(l = o[h]) && t.call(l, l.__data__, h, o) && a.push(l);
return new yt(r, this._parents);
}
function js(t) {
return new Array(t.length);
}
function zh() {
return new yt(this._enter || this._groups.map(js), this._parents);
}
function ji(t, e) {
this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
}
ji.prototype = {
constructor: ji,
appendChild: function(t) {
return this._parent.insertBefore(t, this._next);
},
insertBefore: function(t, e) {
return this._parent.insertBefore(t, e);
},
querySelector: function(t) {
return this._parent.querySelector(t);
},
querySelectorAll: function(t) {
return this._parent.querySelectorAll(t);
}
};
function Wh(t) {
return function() {
return t;
};
}
function Hh(t, e, i, r, n, o) {
for (var s = 0, a, l = e.length, h = o.length; s < h; ++s)
(a = e[s]) ? (a.__data__ = o[s], r[s] = a) : i[s] = new ji(t, o[s]);
for (; s < l; ++s)
(a = e[s]) && (n[s] = a);
}
function jh(t, e, i, r, n, o, s) {
var a, l, h = /* @__PURE__ */ new Map(), u = e.length, f = o.length, c = new Array(u), d;
for (a = 0; a < u; ++a)
(l = e[a]) && (c[a] = d = s.call(l, l.__data__, a, e) + "", h.has(d) ? n[a] = l : h.set(d, l));
for (a = 0; a < f; ++a)
d = s.call(t, o[a], a, o) + "", (l = h.get(d)) ? (r[a] = l, l.__data__ = o[a], h.delete(d)) : i[a] = new ji(t, o[a]);
for (a = 0; a < u; ++a)
(l = e[a]) && h.get(c[a]) === l && (n[a] = l);
}
function Uh(t) {
return t.__data__;
}
function Yh(t, e) {
if (!arguments.length)
return Array.from(this, Uh);
var i = e ? jh : Hh, r = this._parents, n = this._groups;
typeof t != "function" && (t = Wh(t));
for (var o = n.length, s = new Array(o), a = new Array(o), l = new Array(o), h = 0; h < o; ++h) {
var u = r[h], f = n[h], c = f.length, d = Gh(t.call(u, u && u.__data__, h, r)), m = d.length, S = a[h] = new Array(m), O = s[h] = new Array(m), z = l[h] = new Array(c);
i(u, f, S, O, z, d, e);
for (var T = 0, R = 0, X, G; T < m; ++T)
if (X = S[T]) {
for (T >= R && (R = T + 1); !(G = O[R]) && ++R < m; )
;
X._next = G || null;
}
}
return s = new yt(s, r), s._enter = a, s._exit = l, s;
}
function Gh(t) {
return typeof t == "object" && "length" in t ? t : Array.from(t);
}
function Vh() {
return new yt(this._exit || this._groups.map(js), this._parents);
}
function Xh(t, e, i) {
var r = this.enter(), n = this, o = this.exit();
return typeof t == "function" ? (r = t(r), r && (r = r.selection())) : r = r.append(t + ""), e != null && (n = e(n), n && (n = n.selection())), i == null ? o.remove() : i(o), r && n ? r.merge(n).order() : n;
}
function Kh(t) {
for (var e = t.selection ? t.selection() : t, i = this._groups, r = e._groups, n = i.length, o = r.length, s = Math.min(n, o), a = new Array(n), l = 0; l < s; ++l)
for (var h = i[l], u = r[l], f = h.length, c = a[l] = new Array(f), d, m = 0; m < f; ++m)
(d = h[m] || u[m]) && (c[m] = d);
for (; l < n; ++l)
a[l] = i[l];
return new yt(a, this._parents);
}
function Zh() {
for (var t = this._groups, e = -1, i = t.length; ++e < i; )
for (var r = t[e], n = r.length - 1, o = r[n], s; --n >= 0; )
(s = r[n]) && (o && s.compareDocumentPosition(o) ^ 4 && o.parentNode.insertBefore(s, o), o = s);
return this;
}
function Jh(t) {
t || (t = Qh);
function e(f, c) {
return f && c ? t(f.__data__, c.__data__) : !f - !c;
}
for (var i = this._groups, r = i.length, n = new Array(r), o = 0; o < r; ++o) {
for (var s = i[o], a = s.length, l = n[o] = new Array(a), h, u = 0; u < a; ++u)
(h = s[u]) && (l[u] = h);
l.sort(e);
}
return new yt(n, this._parents).order();
}
function Qh(t, e) {
return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
}
function tc() {
var t = arguments[0];
return arguments[0] = this, t.apply(null, arguments), this;
}
function ec() {
return Array.from(this);
}
function ic() {
for (var t = this._groups, e = 0, i = t.length; e < i; ++e)
for (var r = t[e], n = 0, o = r.length; n < o; ++n) {
var s = r[n];
if (s)
return s;
}
return null;
}
function rc() {
let t = 0;
for (const e of this)
++t;
return t;
}
function nc() {
return !this.node();
}
function oc(t) {
for (var e = this._groups, i = 0, r = e.length; i < r; ++i)
for (var n = e[i], o = 0, s = n.length, a; o < s; ++o)
(a = n[o]) && t.call(a, a.__data__, o, n);
return this;
}
function sc(t) {
return function() {
this.removeAttribute(t);
};
}
function ac(t) {
return function() {
this.removeAttributeNS(t.space, t.local);
};
}
function lc(t, e) {
return function() {
this.setAttribute(t, e);
};
}
function hc(t, e) {
return function() {
this.setAttributeNS(t.space, t.local, e);
};
}
function cc(t, e) {
return function() {
var i = e.apply(this, arguments);
i == null ? this.removeAttribute(t) : this.setAttribute(t, i);
};
}
function uc(t, e) {
return function() {
var i = e.apply(this, arguments);
i == null ? this.removeAttributeNS(t.space, t.local) : this.setAttributeNS(t.space, t.local, i);
};
}
function fc(t, e) {
var i = fr(t);
if (arguments.length < 2) {
var r = this.node();
return i.local ? r.getAttributeNS(i.space, i.local) : r.getAttribute(i);
}
return this.each((e == null ? i.local ? ac : sc : typeof e == "function" ? i.local ? uc : cc : i.local ? hc : lc)(i, e));
}
function Us(t) {
return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView;
}
function dc(t) {
return function() {
this.style.removeProperty(t);
};
}
function pc(t, e, i) {
return function() {
this.style.setProperty(t, e, i);
};
}
function gc(t, e, i) {
return function() {
var r = e.apply(this, arguments);
r == null ? this.style.removeProperty(t) : this.style.setProperty(t, r, i);
};
}
function mc(t, e, i) {
return arguments.length > 1 ? this.each((e == null ? dc : typeof e == "function" ? gc : pc)(t, e, i ?? "")) : Ae(this.node(), t);
}
function Ae(t, e) {
return t.style.getPropertyValue(e) || Us(t).getComputedStyle(t, null).getPropertyValue(e);
}
function yc(t) {
return function() {
delete this[t];
};
}
function _c(t, e) {
return function() {
this[t] = e;
};
}
function Cc(t, e) {
return function() {
var i = e.apply(this, arguments);
i == null ? delete this[t] : this[t] = i;
};
}
function xc(t, e) {
return arguments.length > 1 ? this.each((e == null ? yc : typeof e == "function" ? Cc : _c)(t, e)) : this.node()[t];
}
function Ys(t) {
return t.trim().split(/^|\s+/);
}
function kn(t) {
return t.classList || new Gs(t);
}
function Gs(t) {
this._node = t, this._names = Ys(t.getAttribute("class") || "");
}
Gs.prototype = {
add: function(t) {
var e = this._names.indexOf(t);
e < 0 && (this._names.push(t), this._node.setAttribute("class", this._names.join(" ")));
},
remove: function(t) {
var e = this._names.indexOf(t);
e >= 0 && (this._names.splice(e, 1), this._node.setAttribute("class", this._names.join(" ")));
},
contains: function(t) {
return this._names.indexOf(t) >= 0;
}
};
function Vs(t, e) {
for (var i = kn(t), r = -1, n = e.length; ++r < n; )
i.add(e[r]);
}
function Xs(t, e) {
for (var i = kn(t), r = -1, n = e.length; ++r < n; )
i.remove(e[r]);
}
function bc(t) {
return function() {
Vs(this, t);
};
}
function Tc(t) {
return function() {
Xs(this, t);
};
}
function kc(t, e) {
return function() {
(e.apply(this, arguments) ? Vs : Xs)(this, t);
};
}
function Sc(t, e) {
var i = Ys(t + "");
if (arguments.length < 2) {
for (var r = kn(this.node()), n = -1, o = i.length; ++n < o; )
if (!r.contains(i[n]))
return !1;
return !0;
}
return this.each((typeof e == "function" ? kc : e ? bc : Tc)(i, e));
}
function vc() {
this.textContent = "";
}
function wc(t) {
return function() {
this.textContent = t;
};
}
function Bc(t) {
return function() {
var e = t.apply(this, arguments);
this.textContent = e ?? "";
};
}
function Fc(t) {
return arguments.length ? this.each(t == null ? vc : (typeof t == "function" ? Bc : wc)(t)) : this.node().textContent;
}
function Ac() {
this.innerHTML = "";
}
function Lc(t) {
return function() {
this.innerHTML = t;
};
}
function Ec(t) {
return function() {
var e = t.apply(this, arguments);
this.innerHTML = e ?? "";
};
}
function Mc(t) {
return arguments.length ? this.each(t == null ? Ac : (typeof t == "function" ? Ec : Lc)(t)) : this.node().innerHTML;
}
function Oc() {
this.nextSibling && this.parentNode.appendChild(this);
}
function $c() {
return this.each(Oc);
}
function Ic() {
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
}
function Dc() {
return this.each(Ic);
}
function Nc(t) {
var e = typeof t == "function" ? t : qs(t);
return this.select(function() {
return this.appendChild(e.apply(this, arguments));
});
}
function Rc() {
return null;
}
function Pc(t, e) {
var i = typeof t == "function" ? t : qs(t), r = e == null ? Rc : typeof e == "function" ? e : Tn(e);
return this.select(function() {
return this.insertBefore(i.apply(this, arguments), r.apply(this, arguments) || null);
});
}
function qc() {
var t = this.parentNode;
t && t.removeChild(this);
}
function zc() {
return this.each(qc);
}
function Wc() {
var t = this.cloneNode(!1), e = this.parentNode;
return e ? e.insertBefore(t, this.nextSibling) : t;
}
function Hc() {
var t = this.cloneNode(!0), e = this.parentNode;
return e ? e.insertBefore(t, this.nextSibling) : t;
}
function jc(t) {
return this.select(t ? Hc : Wc);
}
function Uc(t) {
return arguments.length ? this.property("__data__", t) : this.node().__data__;
}
function Yc(t) {
return function(e) {
t.call(this, e, this.__data__);
};
}
function Gc(t) {
return t.trim().split(/^|\s+/).map(function(e) {
var i = "", r = e.indexOf(".");
return r >= 0 && (i = e.slice(r + 1), e = e.slice(0, r)), { type: e, name: i };
});
}
function Vc(t) {
return function() {
var e = this.__on;
if (e) {
for (var i = 0, r = -1, n = e.length, o; i < n; ++i)
o = e[i], (!t.type || o.type === t.type) && o.name === t.name ? this.removeEventListener(o.type, o.listener, o.options) : e[++r] = o;
++r ? e.length = r : delete this.__on;
}
};
}
function Xc(t, e, i) {
return function() {
var r = this.__on, n, o = Yc(e);
if (r) {
for (var s = 0, a = r.length; s < a; ++s)
if ((n = r[s]).type === t.type && n.name === t.name) {
this.removeEventListener(n.type, n.listener, n.options), this.addEventListener(n.type, n.listener = o, n.options = i), n.value = e;
return;
}
}
this.addEventListener(t.type, o, i), n = { type: t.type, name: t.name, value: e, listener: o, options: i }, r ? r.push(n) : this.__on = [n];
};
}
function Kc(t, e, i) {
var r = Gc(t + ""), n, o = r.length, s;
if (arguments.length < 2) {
var a = this.node().__on;
if (a) {
for (var l = 0, h = a.length, u; l < h; ++l)
for (n = 0, u = a[l]; n < o; ++n)
if ((s = r[n]).type === u.type && s.name === u.name)
return u.value;
}
return;
}
for (a = e ? Xc : Vc, n = 0; n < o; ++n)
this.each(a(r[n], e, i));
return this;
}
function Ks(t, e, i) {
var r = Us(t), n = r.CustomEvent;
typeof n == "function" ? n = new n(e, i) : (n = r.document.createEvent("Event"), i ? (n.initEvent(e, i.bubbles, i.cancelable), n.detail = i.detail) : n.initEvent(e, !1, !1)), t.dispatchEvent(n);
}
function Zc(t, e) {
return function() {
return Ks(this, t, e);
};
}
function Jc(t, e) {
return function() {
return Ks(this, t, e.apply(this, arguments));
};
}
function Qc(t, e) {
return this.each((typeof e == "function" ? Jc : Zc)(t, e));
}
function* tu() {
for (var t = this._groups, e = 0, i = t.length; e < i; ++e)
for (var r = t[e], n = 0, o = r.length, s; n < o; ++n)
(s = r[n]) && (yield s);
}
var Zs = [null];
function yt(t, e) {
this._groups = t, this._parents = e;
}
function di() {
return new yt([[document.documentElement]], Zs);
}
function eu() {
return this;
}
yt.prototype = di.prototype = {
constructor: yt,
select: Bh,
selectAll: Eh,
selectChild: Ih,
selectChildren: Ph,
filter: qh,
data: Yh,
enter: zh,
exit: Vh,
join: Xh,
merge: Kh,
selection: eu,
order: Zh,
sort: Jh,
call: tc,
nodes: ec,
node: ic,
size: rc,
empty: nc,
each: oc,
attr: fc,
style: mc,
property: xc,
classed: Sc,
text: Fc,
html: Mc,
raise: $c,
lower: Dc,
append: Nc,
insert: Pc,
remove: zc,
clone: jc,
datum: Uc,
on: Kc,
dispatch: Qc,
[Symbol.iterator]: tu
};
function bt(t) {
return typeof t == "string" ? new yt([[document.querySelector(t)]], [document.documentElement]) : new yt([[t]], Zs);
}
function Sn(t, e, i) {
t.prototype = e.prototype = i, i.constructor = t;
}
function Js(t, e) {
var i = Object.create(t.prototype);
for (var r in e)
i[r] = e[r];
return i;
}
function pi() {
}
var ri = 0.7, Ui = 1 / ri, Fe = "\\s*([+-]?\\d+)\\s*", ni = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Et = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", iu = /^#([0-9a-f]{3,8})$/, ru = new RegExp(`^rgb\\(${Fe},${Fe},${Fe}\\)$`), nu = new RegExp(`^rgb\\(${Et},${Et},${Et}\\)$`), ou = new RegExp(`^rgba\\(${Fe},${Fe},${Fe},${ni}\\)$`), su = new RegExp(`^rgba\\(${Et},${Et},${Et},${ni}\\)$`), au = new RegExp(`^hsl\\(${ni},${Et},${Et}\\)$`), lu = new RegExp(`^hsla\\(${ni},${Et},${Et},${ni}\\)$`), So = {
aliceblue: 15792383,
antiquewhite: 16444375,
aqua: 65535,
aquamarine: 8388564,
azure: 15794175,
beige: 16119260,
bisque: 16770244,
black: 0,
blanchedalmond: 16772045,
blue: 255,
blueviolet: 9055202,
brown: 10824234,
burlywood: 14596231,
cadetblue: 6266528,
chartreuse: 8388352,
chocolate: 13789470,
coral: 16744272,
cornflowerblue: 6591981,
cornsilk: 16775388,
crimson: 14423100,
cyan: 65535,
darkblue: 139,
darkcyan: 35723,
darkgoldenrod: 12092939,
darkgray: 11119017,
darkgreen: 25600,
darkgrey: 11119017,
darkkhaki: 12433259,
darkmagenta: 9109643,
darkolivegreen: 5597999,
darkorange: 16747520,
darkorchid: 10040012,
darkred: 9109504,
darksalmon: 15308410,
darkseagreen: 9419919,
darkslateblue: 4734347,
darkslategray: 3100495,
darkslategrey: 3100495,
darkturquoise: 52945,
darkviolet: 9699539,
deeppink: 16716947,
deepskyblue: 49151,
dimgray: 6908265,
dimgrey: 6908265,
dodgerblue: 2003199,
firebrick: 11674146,
floralwhite: 16775920,
forestgreen: 2263842,
fuchsia: 16711935,
gainsboro: 14474460,
ghostwhite: 16316671,
gold: 16766720,
goldenrod: 14329120,
gray: 8421504,
green: 32768,
greenyellow: 11403055,
grey: 8421504,
honeydew: 15794160,
hotpink: 16738740,
indianred: 13458524,
indigo: 4915330,
ivory: 16777200,
khaki: 15787660,
lavender: 15132410,
lavenderblush: 16773365,
lawngreen: 8190976,
lemonchiffon: 16775885,
lightblue: 11393254,
lightcoral: 15761536,
lightcyan: 14745599,
lightgoldenrodyellow: 16448210,
lightgray: 13882323,
lightgreen: 9498256,
lightgrey: 13882323,
lightpink: 16758465,
lightsalmon: 16752762,
lightseagreen: 2142890,
lightskyblue: 8900346,
lightslategray: 7833753,
lightslategrey: 7833753,
lightsteelblue: 11584734,
lightyellow: 16777184,
lime: 65280,
limegreen: 3329330,
linen: 16445670,
magenta: 16711935,
maroon: 8388608,
mediumaquamarine: 6737322,
mediumblue: 205,
mediumorchid: 12211667,
mediumpurple: 9662683,
mediumseagreen: 3978097,
mediumslateblue: 8087790,
mediumspringgreen: 64154,
mediumturquoise: 4772300,
mediumvioletred: 13047173,
midnightblue: 1644912,
mintcream: 16121850,
mistyrose: 16770273,
moccasin: 16770229,
navajowhite: 16768685,
navy: 128,
oldlace: 16643558,
olive: 8421376,
olivedrab: 7048739,
orange: 16753920,
orangered: 16729344,
orchid: 14315734,
palegoldenrod: 15657130,
palegreen: 10025880,
paleturquoise: 11529966,
palevioletred: 14381203,
papayawhip: 16773077,
peachpuff: 16767673,
peru: 13468991,
pink: 16761035,
plum: 14524637,
powderblue: 11591910,
purple: 8388736,
rebeccapurple: 6697881,
red: 16711680,
rosybrown: 12357519,
royalblue: 4286945,
saddlebrown: 9127187,
salmon: 16416882,
sandybrown: 16032864,
seagreen: 3050327,
seashell: 16774638,
sienna: 10506797,
silver: 12632256,
skyblue: 8900331,
slateblue: 6970061,
slategray: 7372944,
slategrey: 7372944,
snow: 16775930,
springgreen: 65407,
steelblue: 4620980,
tan: 13808780,
teal: 32896,
thistle: 14204888,
tomato: 16737095,
turquoise: 4251856,
violet: 15631086,
wheat: 16113331,
white: 16777215,
whitesmoke: 16119285,
yellow: 16776960,
yellowgreen: 10145074
};
Sn(pi, oi, {
copy(t) {
return Object.assign(new this.constructor(), this, t);
},
displayable() {
return this.rgb().displayable();
},
hex: vo,
// Deprecated! Use color.formatHex.
formatHex: vo,
formatHex8: hu,
formatHsl: cu,
formatRgb: wo,
toString: wo
});
function vo() {
return this.rgb().formatHex();
}
function hu() {
return this.rgb().formatHex8();
}
function cu() {
return Qs(this).formatHsl();
}
function wo() {
return this.rgb().formatRgb();
}
function oi(t) {
var e, i;
return t = (t + "").trim().toLowerCase(), (e = iu.exec(t)) ? (i = e[1].length, e = parseInt(e[1], 16), i === 6 ? Bo(e) : i === 3 ? new pt(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : i === 8 ? ki(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : i === 4 ? ki(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = ru.exec(t)) ? new pt(e[1], e[2], e[3], 1) : (e = nu.exec(t)) ? new pt(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = ou.exec(t)) ? ki(e[1], e[2], e[3], e[4]) : (e = su.exec(t)) ? ki(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = au.exec(t)) ? Lo(e[1], e[2] / 100, e[3] / 100, 1) : (e = lu.exec(t)) ? Lo(e[1], e[2] / 100, e[3] / 100, e[4]) : So.hasOwnProperty(t) ? Bo(So[t]) : t === "transparent" ? new pt(NaN, NaN, NaN, 0) : null;
}
function Bo(t) {
return new pt(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
}
function ki(t, e, i, r) {
return r <= 0 && (t = e = i = NaN), new pt(t, e, i, r);
}
function uu(t) {
return t instanceof pi || (t = oi(t)), t ? (t = t.rgb(), new pt(t.r, t.g, t.b, t.opacity)) : new pt();
}
function Qr(t, e, i, r) {
return arguments.length === 1 ? uu(t) : new pt(t, e, i, r ?? 1);
}
function pt(t, e, i, r) {
this.r = +t, this.g = +e, this.b = +i, this.opacity = +r;
}
Sn(pt, Qr, Js(pi, {
brighter(t) {
return t = t == null ? Ui : Math.pow(Ui, t), new pt(this.r * t, this.g * t, this.b * t, this.opacity);
},
darker(t) {
return t = t == null ? ri : Math.pow(ri, t), new pt(this.r * t, this.g * t, this.b * t, this.opacity);
},
rgb() {
return this;
},
clamp() {
return new pt(ue(this.r), ue(this.g), ue(this.b), Yi(this.opacity));
},
displayable() {
return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
},
hex: Fo,
// Deprecated! Use color.formatHex.
formatHex: Fo,
formatHex8: fu,
formatRgb: Ao,
toString: Ao
}));
function Fo() {
return `#${ce(this.r)}${ce(this.g)}${ce(this.b)}`;
}
function fu() {
return `#${ce(this.r)}${ce(this.g)}${ce(this.b)}${ce((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
}
function Ao() {
const t = Yi(this.opacity);
return `${t === 1 ? "rgb(" : "rgba("}${ue(this.r)}, ${ue(this.g)}, ${ue(this.b)}${t === 1 ? ")" : `, ${t})`}`;
}
function Yi(t) {
return isNaN(t) ? 1 : Math.max(0, Math.min(1, t));
}
function ue(t) {
return Math.max(0, Math.min(255, Math.round(t) || 0));
}
function ce(t) {
return t = ue(t), (t < 16 ? "0" : "") + t.toString(16);
}
function Lo(t, e, i, r) {
return r <= 0 ? t = e = i = NaN : i <= 0 || i >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new wt(t, e, i, r);
}
function Qs(t) {
if (t instanceof wt)
return new wt(t.h, t.s, t.l, t.opacity);
if (t instanceof pi || (t = oi(t)), !t)
return new wt();
if (t instanceof wt)
return t;
t = t.rgb();
var e = t.r / 255, i = t.g / 255, r = t.b / 255, n = Math.min(e, i, r), o = Math.max(e, i, r), s = NaN, a = o - n, l = (o + n) / 2;
return a ? (e === o ? s = (i - r) / a + (i < r) * 6 : i === o ? s = (r - e) / a + 2 : s = (e - i) / a + 4, a /= l < 0.5 ? o + n : 2 - o - n, s *= 60) : a = l > 0 && l < 1 ? 0 : s, new wt(s, a, l, t.opacity);
}
function du(t, e, i, r) {
return arguments.length === 1 ? Qs(t) : new wt(t, e, i, r ?? 1);
}
function wt(t, e, i, r) {
this.h = +t, this.s = +e, this.l = +i, this.opacity = +r;
}
Sn(wt, du, Js(pi, {
brighter(t) {
return t = t == null ? Ui : Math.pow(Ui, t), new wt(this.h, this.s, this.l * t, this.opacity);
},
darker(t) {
return t = t == null ? ri : Math.pow(ri, t), new wt(this.h, this.s, this.l * t, this.opacity);
},
rgb() {
var t = this.h % 360 + (this.h < 0) * 360, e = isNaN(t) || isNaN(this.s) ? 0 : this.s, i = this.l, r = i + (i < 0.5 ? i : 1 - i) * e, n = 2 * i - r;
return new pt(
Dr(t >= 240 ? t - 240 : t + 120, n, r),
Dr(t, n, r),
Dr(t < 120 ? t + 240 : t - 120, n, r),
this.opacity
);
},
clamp() {
return new wt(Eo(this.h), Si(this.s), Si(this.l), Yi(this.opacity));
},
displayable() {
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
},
formatHsl() {
const t = Yi(this.opacity);
return `${t === 1 ? "hsl(" : "hsla("}${Eo(this.h)}, ${Si(this.s) * 100}%, ${Si(this.l) * 100}%${t === 1 ? ")" : `, ${t})`}`;
}
}));
function Eo(t) {
return t = (t || 0) % 360, t < 0 ? t + 360 : t;
}
function Si(t) {
return Math.max(0, Math.min(1, t || 0));
}
function Dr(t, e, i) {
return (t < 60 ? e + (i - e) * t / 60 : t < 180 ? i : t < 240 ? e + (i - e) * (240 - t) / 60 : e) * 255;
}
const vn = (t) => () => t;
function ta(t, e) {
return function(i) {
return t + i * e;
};
}
function pu(t, e, i) {
return t = Math.pow(t, i), e = Math.pow(e, i) - t, i = 1 / i, function(r) {
return Math.pow(t + r * e, i);
};
}
function l1(t, e) {
var i = e - t;
return i ? ta(t, i > 180 || i < -180 ? i - 360 * Math.round(i / 360) : i) : vn(isNaN(t) ? e : t);
}
function gu(t) {
return (t = +t) == 1 ? ea : function(e, i) {
return i - e ? pu(e, i, t) : vn(isNaN(e) ? i : e);
};
}
function ea(t, e) {
var i = e - t;
return i ? ta(t, i) : vn(isNaN(t) ? e : t);
}
const Mo = function t(e) {
var i = gu(e);
function r(n, o) {
var s = i((n = Qr(n)).r, (o = Qr(o)).r), a = i(n.g, o.g), l = i(n.b, o.b), h = ea(n.opacity, o.opacity);
return function(u) {
return n.r = s(u), n.g = a(u), n.b = l(u), n.opacity = h(u), n + "";
};
}
return r.gamma = t, r;
}(1);
function te(t, e) {
return t = +t, e = +e, function(i) {
return t * (1 - i) + e * i;
};
}
var tn = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Nr = new RegExp(tn.source, "g");
function mu(t) {
return function() {
return t;
};
}
function yu(t) {
return function(e) {
return t(e) + "";
};
}
function _u(t, e) {
var i = tn.lastIndex = Nr.lastIndex = 0, r, n, o, s = -1, a = [], l = [];
for (t = t + "", e = e + ""; (r = tn.exec(t)) && (n = Nr.exec(e)); )
(o = n.index) > i && (o = e.slice(i, o), a[s] ? a[s] += o : a[++s] = o), (r = r[0]) === (n = n[0]) ? a[s] ? a[s] += n : a[++s] = n : (a[++s] = null, l.push({ i: s, x: te(r, n) })), i = Nr.lastIndex;
return i < e.length && (o = e.slice(i), a[s] ? a[s] += o : a[++s] = o), a.length < 2 ? l[0] ? yu(l[0].x) : mu(e) : (e = l.length, function(h) {
for (var u = 0, f; u < e; ++u)
a[(f = l[u]).i] = f.x(h);
return a.join("");
});
}
var Oo = 180 / Math.PI, en = {
translateX: 0,
translateY: 0,
rotate: 0,
skewX: 0,
scaleX: 1,
scaleY: 1
};
function ia(t, e, i, r, n, o) {
var s, a, l;
return (s = Math.sqrt(t * t + e * e)) && (t /= s, e /= s), (l = t * i + e * r) && (i -= t * l, r -= e * l), (a = Math.sqrt(i * i + r * r)) && (i /= a, r /= a, l /= a), t * r < e * i && (t = -t, e = -e, l = -l, s = -s), {
translateX: n,
translateY: o,
rotate: Math.atan2(e, t) * Oo,
skewX: Math.atan(l) * Oo,
scaleX: s,
scaleY: a
};
}
var vi;
function Cu(t) {
const e = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(t + "");
return e.isIdentity ? en : ia(e.a, e.b, e.c, e.d, e.e, e.f);
}
function xu(t) {
return t == null || (vi || (vi = document.createElementNS("http://www.w3.org/2000/svg", "g")), vi.setAttribute("transform", t), !(t = vi.transform.baseVal.consolidate())) ? en : (t = t.matrix, ia(t.a, t.b, t.c, t.d, t.e, t.f));
}
function ra(t, e, i, r) {
function n(h) {
return h.length ? h.pop() + " " : "";
}
function o(h, u, f, c, d, m) {
if (h !== f || u !== c) {
var S = d.push("translate(", null, e, null, i);
m.push({ i: S - 4, x: te(h, f) }, { i: S - 2, x: te(u, c) });
} else
(f || c) && d.push("translate(" + f + e + c + i);
}
function s(h, u, f, c) {
h !== u ? (h - u > 180 ? u += 360 : u - h > 180 && (h += 360), c.push({ i: f.push(n(f) + "rotate(", null, r) - 2, x: te(h, u) })) : u && f.push(n(f) + "rotate(" + u + r);
}
function a(h, u, f, c) {
h !== u ? c.push({ i: f.push(n(f) + "skewX(", null, r) - 2, x: te(h, u) }) : u && f.push(n(f) + "skewX(" + u + r);
}
function l(h, u, f, c, d, m) {
if (h !== f || u !== c) {
var S = d.push(n(d) + "scale(", null, ",", null, ")");
m.push({ i: S - 4, x: te(h, f) }, { i: S - 2, x: te(u, c) });
} else
(f !== 1 || c !== 1) && d.push(n(d) + "scale(" + f + "," + c + ")");
}
return function(h, u) {
var f = [], c = [];
return h = t(h), u = t(u), o(h.translateX, h.translateY, u.translateX, u.translateY, f, c), s(h.rotate, u.rotate, f, c), a(h.skewX, u.skewX, f, c), l(h.scaleX, h.scaleY, u.scaleX, u.scaleY, f, c), h = u = null, function(d) {
for (var m = -1, S = c.length, O; ++m < S; )
f[(O = c[m]).i] = O.x(d);
return f.join("");
};
};
}
var bu = ra(Cu, "px, ", "px)", "deg)"), Tu = ra(xu, ", ", ")", ")"), Le = 0, Ve = 0, He = 0, na = 1e3, Gi, Xe, Vi = 0, pe = 0, dr = 0, si = typeof performance == "object" && performance.now ? performance : Date, oa = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(t) {
setTimeout(t, 17);
};
function wn() {
return pe || (oa(ku), pe = si.now() + dr);
}
function ku() {
pe = 0;
}
function Xi() {
this._call = this._time = this._next = null;
}
Xi.prototype = sa.prototype = {
constructor: Xi,
restart: function(t, e, i) {
if (typeof t != "function")
throw new TypeError("callback is not a function");
i = (i == null ? wn() : +i) + (e == null ? 0 : +e), !this._next && Xe !== this && (Xe ? Xe._next = this : Gi = this, Xe = this), this._call = t, this._time = i, rn();
},
stop: function() {
this._call && (this._call = null, this._time = 1 / 0, rn());
}
};
function sa(t, e, i) {
var r = new Xi();
return r.restart(t, e, i), r;
}
function Su() {
wn(), ++Le;
for (var t = Gi, e; t; )
(e = pe - t._time) >= 0 && t._call.call(void 0, e), t = t._next;
--Le;
}
function $o() {
pe = (Vi = si.now()) + dr, Le = Ve = 0;
try {
Su();
} finally {
Le = 0, wu(), pe = 0;
}
}
function vu() {
var t = si.now(), e = t - Vi;
e > na && (dr -= e, Vi = t);
}
function wu() {
for (var t, e = Gi, i, r = 1 / 0; e; )
e._call ? (r > e._time && (r = e._time), t = e, e = e._next) : (i = e._next, e._next = null, e = t ? t._next = i : Gi = i);
Xe = t, rn(r);
}
function rn(t) {
if (!Le) {
Ve && (Ve = clearTimeout(Ve));
var e = t - pe;
e > 24 ? (t < 1 / 0 && (Ve = setTimeout($o, t - si.now() - dr)), He && (He = clearInterval(He))) : (He || (Vi = si.now(), He = setInterval(vu, na)), Le = 1, oa($o));
}
}
function Io(t, e, i) {
var r = new Xi();
return e = e == null ? 0 : +e, r.restart((n) => {
r.stop(), t(n + e);
}, e, i), r;
}
var Bu = Ps("start", "end", "cancel", "interrupt"), Fu = [], aa = 0, Do = 1, nn = 2, $i = 3, No = 4, on = 5, Ii = 6;
function pr(t, e, i, r, n, o) {
var s = t.__transition;
if (!s)
t.__transition = {};
else if (i in s)
return;
Au(t, i, {
name: e,
index: r,
// For context during callback.
group: n,
// For context during callback.
on: Bu,
tween: Fu,
time: o.time,
delay: o.delay,
duration: o.duration,
ease: o.ease,
timer: null,
state: aa
});
}
function Bn(t, e) {
var i = At(t, e);
if (i.state > aa)
throw new Error("too late; already scheduled");
return i;
}
function It(t, e) {
var i = At(t, e);
if (i.state > $i)
throw new Error("too late; already running");
return i;
}
function At(t, e) {
var i = t.__transition;
if (!i || !(i = i[e]))
throw new Error("transition not found");
return i;
}
function Au(t, e, i) {
var r = t.__transition, n;
r[e] = i, i.timer = sa(o, 0, i.time);
function o(h) {
i.state = Do, i.timer.restart(s, i.delay, i.time), i.delay <= h && s(h - i.delay);
}
function s(h) {
var u, f, c, d;
if (i.state !== Do)
return l();
for (u in r)
if (d = r[u], d.name === i.name) {
if (d.state === $i)
return Io(s);
d.state === No ? (d.state = Ii, d.timer.stop(), d.on.call("interrupt", t, t.__data__, d.index, d.group), delete r[u]) : +u < e && (d.state = Ii, d.timer.stop(), d.on.call("canc