//#region \0rolldown/runtime.js
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
	if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
		get: ((e) => i[e]).bind(null, d),
		enumerable: !(s = n(i, d)) || s.enumerable
	});
	return e;
}, c = (n, r, a) => (a = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule ? t(a, "default", {
	value: n,
	enumerable: !0
}) : a, n)), l = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
	if (typeof require < "u") return require.apply(this, arguments);
	throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
}), u = { value: () => {} };
function d() {
	for (var e = 0, t = arguments.length, n = {}, r; e < t; ++e) {
		if (!(r = arguments[e] + "") || r in n || /[\s.]/.test(r)) throw Error("illegal type: " + r);
		n[r] = [];
	}
	return new f(n);
}
function f(e) {
	this._ = e;
}
function p(e, t) {
	return e.trim().split(/^|\s+/).map(function(e) {
		var n = "", r = e.indexOf(".");
		if (r >= 0 && (n = e.slice(r + 1), e = e.slice(0, r)), e && !t.hasOwnProperty(e)) throw Error("unknown type: " + e);
		return {
			type: e,
			name: n
		};
	});
}
f.prototype = d.prototype = {
	constructor: f,
	on: function(e, t) {
		var n = this._, r = p(e + "", n), i, a = -1, o = r.length;
		if (arguments.length < 2) {
			for (; ++a < o;) if ((i = (e = r[a]).type) && (i = m(n[i], e.name))) return i;
			return;
		}
		if (t != null && typeof t != "function") throw Error("invalid callback: " + t);
		for (; ++a < o;) if (i = (e = r[a]).type) n[i] = h(n[i], e.name, t);
		else if (t == null) for (i in n) n[i] = h(n[i], e.name, null);
		return this;
	},
	copy: function() {
		var e = {}, t = this._;
		for (var n in t) e[n] = t[n].slice();
		return new f(e);
	},
	call: function(e, t) {
		if ((i = arguments.length - 2) > 0) for (var n = Array(i), r = 0, i, a; r < i; ++r) n[r] = arguments[r + 2];
		if (!this._.hasOwnProperty(e)) throw Error("unknown type: " + e);
		for (a = this._[e], r = 0, i = a.length; r < i; ++r) a[r].value.apply(t, n);
	},
	apply: function(e, t, n) {
		if (!this._.hasOwnProperty(e)) throw Error("unknown type: " + e);
		for (var r = this._[e], i = 0, a = r.length; i < a; ++i) r[i].value.apply(t, n);
	}
};
function m(e, t) {
	for (var n = 0, r = e.length, i; n < r; ++n) if ((i = e[n]).name === t) return i.value;
}
function h(e, t, n) {
	for (var r = 0, i = e.length; r < i; ++r) if (e[r].name === t) {
		e[r] = u, e = e.slice(0, r).concat(e.slice(r + 1));
		break;
	}
	return n != null && e.push({
		name: t,
		value: n
	}), e;
}
var g = {
	svg: "http://www.w3.org/2000/svg",
	xhtml: "http://www.w3.org/1999/xhtml",
	xlink: "http://www.w3.org/1999/xlink",
	xml: "http://www.w3.org/XML/1998/namespace",
	xmlns: "http://www.w3.org/2000/xmlns/"
};
//#endregion
//#region node_modules/d3-selection/src/namespace.js
function _(e) {
	var t = e += "", n = t.indexOf(":");
	return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), g.hasOwnProperty(t) ? {
		space: g[t],
		local: e
	} : e;
}
//#endregion
//#region node_modules/d3-selection/src/creator.js
function v(e) {
	return function() {
		var t = this.ownerDocument, n = this.namespaceURI;
		return n === "http://www.w3.org/1999/xhtml" && t.documentElement.namespaceURI === "http://www.w3.org/1999/xhtml" ? t.createElement(e) : t.createElementNS(n, e);
	};
}
function y(e) {
	return function() {
		return this.ownerDocument.createElementNS(e.space, e.local);
	};
}
function b(e) {
	var t = _(e);
	return (t.local ? y : v)(t);
}
//#endregion
//#region node_modules/d3-selection/src/selector.js
function ee() {}
function x(e) {
	return e == null ? ee : function() {
		return this.querySelector(e);
	};
}
//#endregion
//#region node_modules/d3-selection/src/selection/select.js
function S(e) {
	typeof e != "function" && (e = x(e));
	for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = Array(o), c, l, u = 0; u < o; ++u) (c = a[u]) && (l = e.call(c, c.__data__, u, a)) && ("__data__" in c && (l.__data__ = c.__data__), s[u] = l);
	return new T(r, this._parents);
}
//#endregion
//#region node_modules/d3-selection/src/array.js
function te(e) {
	return e == null ? [] : Array.isArray(e) ? e : Array.from(e);
}
//#endregion
//#region node_modules/d3-selection/src/selectorAll.js
function ne() {
	return [];
}
function re(e) {
	return e == null ? ne : function() {
		return this.querySelectorAll(e);
	};
}
//#endregion
//#region node_modules/d3-selection/src/selection/selectAll.js
function ie(e) {
	return function() {
		return te(e.apply(this, arguments));
	};
}
function ae(e) {
	e = typeof e == "function" ? ie(e) : re(e);
	for (var t = this._groups, n = t.length, r = [], i = [], a = 0; a < n; ++a) for (var o = t[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) && (r.push(e.call(c, c.__data__, l, o)), i.push(c));
	return new T(r, i);
}
//#endregion
//#region node_modules/d3-selection/src/matcher.js
function oe(e) {
	return function() {
		return this.matches(e);
	};
}
function se(e) {
	return function(t) {
		return t.matches(e);
	};
}
//#endregion
//#region node_modules/d3-selection/src/selection/selectChild.js
var ce = Array.prototype.find;
function le(e) {
	return function() {
		return ce.call(this.children, e);
	};
}
function ue() {
	return this.firstElementChild;
}
function de(e) {
	return this.select(e == null ? ue : le(typeof e == "function" ? e : se(e)));
}
//#endregion
//#region node_modules/d3-selection/src/selection/selectChildren.js
var fe = Array.prototype.filter;
function pe() {
	return Array.from(this.children);
}
function me(e) {
	return function() {
		return fe.call(this.children, e);
	};
}
function he(e) {
	return this.selectAll(e == null ? pe : me(typeof e == "function" ? e : se(e)));
}
//#endregion
//#region node_modules/d3-selection/src/selection/filter.js
function ge(e) {
	typeof e != "function" && (e = oe(e));
	for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = [], c, l = 0; l < o; ++l) (c = a[l]) && e.call(c, c.__data__, l, a) && s.push(c);
	return new T(r, this._parents);
}
//#endregion
//#region node_modules/d3-selection/src/selection/sparse.js
function _e(e) {
	return Array(e.length);
}
//#endregion
//#region node_modules/d3-selection/src/selection/enter.js
function ve() {
	return new T(this._enter || this._groups.map(_e), this._parents);
}
function C(e, t) {
	this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;
}
C.prototype = {
	constructor: C,
	appendChild: function(e) {
		return this._parent.insertBefore(e, this._next);
	},
	insertBefore: function(e, t) {
		return this._parent.insertBefore(e, t);
	},
	querySelector: function(e) {
		return this._parent.querySelector(e);
	},
	querySelectorAll: function(e) {
		return this._parent.querySelectorAll(e);
	}
};
//#endregion
//#region node_modules/d3-selection/src/constant.js
function ye(e) {
	return function() {
		return e;
	};
}
//#endregion
//#region node_modules/d3-selection/src/selection/data.js
function be(e, t, n, r, i, a) {
	for (var o = 0, s, c = t.length, l = a.length; o < l; ++o) (s = t[o]) ? (s.__data__ = a[o], r[o] = s) : n[o] = new C(e, a[o]);
	for (; o < c; ++o) (s = t[o]) && (i[o] = s);
}
function xe(e, t, n, r, i, a, o) {
	var s, c, l = /* @__PURE__ */ new Map(), u = t.length, d = a.length, f = Array(u), p;
	for (s = 0; s < u; ++s) (c = t[s]) && (f[s] = p = o.call(c, c.__data__, s, t) + "", l.has(p) ? i[s] = c : l.set(p, c));
	for (s = 0; s < d; ++s) p = o.call(e, a[s], s, a) + "", (c = l.get(p)) ? (r[s] = c, c.__data__ = a[s], l.delete(p)) : n[s] = new C(e, a[s]);
	for (s = 0; s < u; ++s) (c = t[s]) && l.get(f[s]) === c && (i[s] = c);
}
function Se(e) {
	return e.__data__;
}
function Ce(e, t) {
	if (!arguments.length) return Array.from(this, Se);
	var n = t ? xe : be, r = this._parents, i = this._groups;
	typeof e != "function" && (e = ye(e));
	for (var a = i.length, o = Array(a), s = Array(a), c = Array(a), l = 0; l < a; ++l) {
		var u = r[l], d = i[l], f = d.length, p = we(e.call(u, u && u.__data__, l, r)), m = p.length, h = s[l] = Array(m), g = o[l] = Array(m);
		n(u, d, h, g, c[l] = Array(f), p, t);
		for (var _ = 0, v = 0, y, b; _ < m; ++_) if (y = h[_]) {
			for (_ >= v && (v = _ + 1); !(b = g[v]) && ++v < m;);
			y._next = b || null;
		}
	}
	return o = new T(o, r), o._enter = s, o._exit = c, o;
}
function we(e) {
	return typeof e == "object" && "length" in e ? e : Array.from(e);
}
//#endregion
//#region node_modules/d3-selection/src/selection/exit.js
function Te() {
	return new T(this._exit || this._groups.map(_e), this._parents);
}
//#endregion
//#region node_modules/d3-selection/src/selection/join.js
function Ee(e, t, n) {
	var r = this.enter(), i = this, a = this.exit();
	return typeof e == "function" ? (r = e(r), r &&= r.selection()) : r = r.append(e + ""), t != null && (i = t(i), i &&= i.selection()), n == null ? a.remove() : n(a), r && i ? r.merge(i).order() : i;
}
//#endregion
//#region node_modules/d3-selection/src/selection/merge.js
function De(e) {
	for (var t = e.selection ? e.selection() : e, n = this._groups, r = t._groups, i = n.length, a = r.length, o = Math.min(i, a), s = Array(i), c = 0; c < o; ++c) for (var l = n[c], u = r[c], d = l.length, f = s[c] = Array(d), p, m = 0; m < d; ++m) (p = l[m] || u[m]) && (f[m] = p);
	for (; c < i; ++c) s[c] = n[c];
	return new T(s, this._parents);
}
//#endregion
//#region node_modules/d3-selection/src/selection/order.js
function Oe() {
	for (var e = this._groups, t = -1, n = e.length; ++t < n;) for (var r = e[t], i = r.length - 1, a = r[i], o; --i >= 0;) (o = r[i]) && (a && o.compareDocumentPosition(a) ^ 4 && a.parentNode.insertBefore(o, a), a = o);
	return this;
}
//#endregion
//#region node_modules/d3-selection/src/selection/sort.js
function ke(e) {
	e ||= Ae;
	function t(t, n) {
		return t && n ? e(t.__data__, n.__data__) : !t - !n;
	}
	for (var n = this._groups, r = n.length, i = Array(r), a = 0; a < r; ++a) {
		for (var o = n[a], s = o.length, c = i[a] = Array(s), l, u = 0; u < s; ++u) (l = o[u]) && (c[u] = l);
		c.sort(t);
	}
	return new T(i, this._parents).order();
}
function Ae(e, t) {
	return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
}
//#endregion
//#region node_modules/d3-selection/src/selection/call.js
function je() {
	var e = arguments[0];
	return arguments[0] = this, e.apply(null, arguments), this;
}
//#endregion
//#region node_modules/d3-selection/src/selection/nodes.js
function Me() {
	return Array.from(this);
}
//#endregion
//#region node_modules/d3-selection/src/selection/node.js
function Ne() {
	for (var e = this._groups, t = 0, n = e.length; t < n; ++t) for (var r = e[t], i = 0, a = r.length; i < a; ++i) {
		var o = r[i];
		if (o) return o;
	}
	return null;
}
//#endregion
//#region node_modules/d3-selection/src/selection/size.js
function Pe() {
	let e = 0;
	for (let t of this) ++e;
	return e;
}
//#endregion
//#region node_modules/d3-selection/src/selection/empty.js
function Fe() {
	return !this.node();
}
//#endregion
//#region node_modules/d3-selection/src/selection/each.js
function Ie(e) {
	for (var t = this._groups, n = 0, r = t.length; n < r; ++n) for (var i = t[n], a = 0, o = i.length, s; a < o; ++a) (s = i[a]) && e.call(s, s.__data__, a, i);
	return this;
}
//#endregion
//#region node_modules/d3-selection/src/selection/attr.js
function Le(e) {
	return function() {
		this.removeAttribute(e);
	};
}
function Re(e) {
	return function() {
		this.removeAttributeNS(e.space, e.local);
	};
}
function ze(e, t) {
	return function() {
		this.setAttribute(e, t);
	};
}
function Be(e, t) {
	return function() {
		this.setAttributeNS(e.space, e.local, t);
	};
}
function Ve(e, t) {
	return function() {
		var n = t.apply(this, arguments);
		n == null ? this.removeAttribute(e) : this.setAttribute(e, n);
	};
}
function He(e, t) {
	return function() {
		var n = t.apply(this, arguments);
		n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n);
	};
}
function Ue(e, t) {
	var n = _(e);
	if (arguments.length < 2) {
		var r = this.node();
		return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
	}
	return this.each((t == null ? n.local ? Re : Le : typeof t == "function" ? n.local ? He : Ve : n.local ? Be : ze)(n, t));
}
//#endregion
//#region node_modules/d3-selection/src/window.js
function We(e) {
	return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;
}
//#endregion
//#region node_modules/d3-selection/src/selection/style.js
function Ge(e) {
	return function() {
		this.style.removeProperty(e);
	};
}
function Ke(e, t, n) {
	return function() {
		this.style.setProperty(e, t, n);
	};
}
function qe(e, t, n) {
	return function() {
		var r = t.apply(this, arguments);
		r == null ? this.style.removeProperty(e) : this.style.setProperty(e, r, n);
	};
}
function Je(e, t, n) {
	return arguments.length > 1 ? this.each((t == null ? Ge : typeof t == "function" ? qe : Ke)(e, t, n ?? "")) : w(this.node(), e);
}
function w(e, t) {
	return e.style.getPropertyValue(t) || We(e).getComputedStyle(e, null).getPropertyValue(t);
}
//#endregion
//#region node_modules/d3-selection/src/selection/property.js
function Ye(e) {
	return function() {
		delete this[e];
	};
}
function Xe(e, t) {
	return function() {
		this[e] = t;
	};
}
function Ze(e, t) {
	return function() {
		var n = t.apply(this, arguments);
		n == null ? delete this[e] : this[e] = n;
	};
}
function Qe(e, t) {
	return arguments.length > 1 ? this.each((t == null ? Ye : typeof t == "function" ? Ze : Xe)(e, t)) : this.node()[e];
}
//#endregion
//#region node_modules/d3-selection/src/selection/classed.js
function $e(e) {
	return e.trim().split(/^|\s+/);
}
function et(e) {
	return e.classList || new tt(e);
}
function tt(e) {
	this._node = e, this._names = $e(e.getAttribute("class") || "");
}
tt.prototype = {
	add: function(e) {
		this._names.indexOf(e) < 0 && (this._names.push(e), this._node.setAttribute("class", this._names.join(" ")));
	},
	remove: function(e) {
		var t = this._names.indexOf(e);
		t >= 0 && (this._names.splice(t, 1), this._node.setAttribute("class", this._names.join(" ")));
	},
	contains: function(e) {
		return this._names.indexOf(e) >= 0;
	}
};
function nt(e, t) {
	for (var n = et(e), r = -1, i = t.length; ++r < i;) n.add(t[r]);
}
function rt(e, t) {
	for (var n = et(e), r = -1, i = t.length; ++r < i;) n.remove(t[r]);
}
function it(e) {
	return function() {
		nt(this, e);
	};
}
function at(e) {
	return function() {
		rt(this, e);
	};
}
function ot(e, t) {
	return function() {
		(t.apply(this, arguments) ? nt : rt)(this, e);
	};
}
function st(e, t) {
	var n = $e(e + "");
	if (arguments.length < 2) {
		for (var r = et(this.node()), i = -1, a = n.length; ++i < a;) if (!r.contains(n[i])) return !1;
		return !0;
	}
	return this.each((typeof t == "function" ? ot : t ? it : at)(n, t));
}
//#endregion
//#region node_modules/d3-selection/src/selection/text.js
function ct() {
	this.textContent = "";
}
function lt(e) {
	return function() {
		this.textContent = e;
	};
}
function ut(e) {
	return function() {
		var t = e.apply(this, arguments);
		this.textContent = t ?? "";
	};
}
function dt(e) {
	return arguments.length ? this.each(e == null ? ct : (typeof e == "function" ? ut : lt)(e)) : this.node().textContent;
}
//#endregion
//#region node_modules/d3-selection/src/selection/html.js
function ft() {
	this.innerHTML = "";
}
function pt(e) {
	return function() {
		this.innerHTML = e;
	};
}
function mt(e) {
	return function() {
		var t = e.apply(this, arguments);
		this.innerHTML = t ?? "";
	};
}
function ht(e) {
	return arguments.length ? this.each(e == null ? ft : (typeof e == "function" ? mt : pt)(e)) : this.node().innerHTML;
}
//#endregion
//#region node_modules/d3-selection/src/selection/raise.js
function gt() {
	this.nextSibling && this.parentNode.appendChild(this);
}
function _t() {
	return this.each(gt);
}
//#endregion
//#region node_modules/d3-selection/src/selection/lower.js
function vt() {
	this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
}
function yt() {
	return this.each(vt);
}
//#endregion
//#region node_modules/d3-selection/src/selection/append.js
function bt(e) {
	var t = typeof e == "function" ? e : b(e);
	return this.select(function() {
		return this.appendChild(t.apply(this, arguments));
	});
}
//#endregion
//#region node_modules/d3-selection/src/selection/insert.js
function xt() {
	return null;
}
function St(e, t) {
	var n = typeof e == "function" ? e : b(e), r = t == null ? xt : typeof t == "function" ? t : x(t);
	return this.select(function() {
		return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
	});
}
//#endregion
//#region node_modules/d3-selection/src/selection/remove.js
function Ct() {
	var e = this.parentNode;
	e && e.removeChild(this);
}
function wt() {
	return this.each(Ct);
}
//#endregion
//#region node_modules/d3-selection/src/selection/clone.js
function Tt() {
	var e = this.cloneNode(!1), t = this.parentNode;
	return t ? t.insertBefore(e, this.nextSibling) : e;
}
function Et() {
	var e = this.cloneNode(!0), t = this.parentNode;
	return t ? t.insertBefore(e, this.nextSibling) : e;
}
function Dt(e) {
	return this.select(e ? Et : Tt);
}
//#endregion
//#region node_modules/d3-selection/src/selection/datum.js
function Ot(e) {
	return arguments.length ? this.property("__data__", e) : this.node().__data__;
}
//#endregion
//#region node_modules/d3-selection/src/selection/on.js
function kt(e) {
	return function(t) {
		e.call(this, t, this.__data__);
	};
}
function At(e) {
	return e.trim().split(/^|\s+/).map(function(e) {
		var t = "", n = e.indexOf(".");
		return n >= 0 && (t = e.slice(n + 1), e = e.slice(0, n)), {
			type: e,
			name: t
		};
	});
}
function jt(e) {
	return function() {
		var t = this.__on;
		if (t) {
			for (var n = 0, r = -1, i = t.length, a; n < i; ++n) a = t[n], (!e.type || a.type === e.type) && a.name === e.name ? this.removeEventListener(a.type, a.listener, a.options) : t[++r] = a;
			++r ? t.length = r : delete this.__on;
		}
	};
}
function Mt(e, t, n) {
	return function() {
		var r = this.__on, i, a = kt(t);
		if (r) {
			for (var o = 0, s = r.length; o < s; ++o) if ((i = r[o]).type === e.type && i.name === e.name) {
				this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = a, i.options = n), i.value = t;
				return;
			}
		}
		this.addEventListener(e.type, a, n), i = {
			type: e.type,
			name: e.name,
			value: t,
			listener: a,
			options: n
		}, r ? r.push(i) : this.__on = [i];
	};
}
function Nt(e, t, n) {
	var r = At(e + ""), i, a = r.length, o;
	if (arguments.length < 2) {
		var s = this.node().__on;
		if (s) {
			for (var c = 0, l = s.length, u; c < l; ++c) for (i = 0, u = s[c]; i < a; ++i) if ((o = r[i]).type === u.type && o.name === u.name) return u.value;
		}
		return;
	}
	for (s = t ? Mt : jt, i = 0; i < a; ++i) this.each(s(r[i], t, n));
	return this;
}
//#endregion
//#region node_modules/d3-selection/src/selection/dispatch.js
function Pt(e, t, n) {
	var r = We(e), i = r.CustomEvent;
	typeof i == "function" ? i = new i(t, n) : (i = r.document.createEvent("Event"), n ? (i.initEvent(t, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i);
}
function Ft(e, t) {
	return function() {
		return Pt(this, e, t);
	};
}
function It(e, t) {
	return function() {
		return Pt(this, e, t.apply(this, arguments));
	};
}
function Lt(e, t) {
	return this.each((typeof t == "function" ? It : Ft)(e, t));
}
//#endregion
//#region node_modules/d3-selection/src/selection/iterator.js
function* Rt() {
	for (var e = this._groups, t = 0, n = e.length; t < n; ++t) for (var r = e[t], i = 0, a = r.length, o; i < a; ++i) (o = r[i]) && (yield o);
}
//#endregion
//#region node_modules/d3-selection/src/selection/index.js
var zt = [null];
function T(e, t) {
	this._groups = e, this._parents = t;
}
function E() {
	return new T([[document.documentElement]], zt);
}
function Bt() {
	return this;
}
T.prototype = E.prototype = {
	constructor: T,
	select: S,
	selectAll: ae,
	selectChild: de,
	selectChildren: he,
	filter: ge,
	data: Ce,
	enter: ve,
	exit: Te,
	join: Ee,
	merge: De,
	selection: Bt,
	order: Oe,
	sort: ke,
	call: je,
	nodes: Me,
	node: Ne,
	size: Pe,
	empty: Fe,
	each: Ie,
	attr: Ue,
	style: Je,
	property: Qe,
	classed: st,
	text: dt,
	html: ht,
	raise: _t,
	lower: yt,
	append: bt,
	insert: St,
	remove: wt,
	clone: Dt,
	datum: Ot,
	on: Nt,
	dispatch: Lt,
	[Symbol.iterator]: Rt
};
//#endregion
//#region node_modules/d3-selection/src/select.js
function D(e) {
	return typeof e == "string" ? new T([[document.querySelector(e)]], [document.documentElement]) : new T([[e]], zt);
}
//#endregion
//#region node_modules/d3-selection/src/sourceEvent.js
function Vt(e) {
	let t;
	for (; t = e.sourceEvent;) e = t;
	return e;
}
//#endregion
//#region node_modules/d3-selection/src/pointer.js
function O(e, t) {
	if (e = Vt(e), t === void 0 && (t = e.currentTarget), t) {
		var n = t.ownerSVGElement || t;
		if (n.createSVGPoint) {
			var r = n.createSVGPoint();
			return r.x = e.clientX, r.y = e.clientY, r = r.matrixTransform(t.getScreenCTM().inverse()), [r.x, r.y];
		}
		if (t.getBoundingClientRect) {
			var i = t.getBoundingClientRect();
			return [e.clientX - i.left - t.clientLeft, e.clientY - i.top - t.clientTop];
		}
	}
	return [e.pageX, e.pageY];
}
//#endregion
//#region node_modules/d3-drag/src/noevent.js
var Ht = { passive: !1 }, Ut = {
	capture: !0,
	passive: !1
};
function Wt(e) {
	e.stopImmediatePropagation();
}
function Gt(e) {
	e.preventDefault(), e.stopImmediatePropagation();
}
//#endregion
//#region node_modules/d3-drag/src/nodrag.js
function Kt(e) {
	var t = e.document.documentElement, n = D(e).on("dragstart.drag", Gt, Ut);
	"onselectstart" in t ? n.on("selectstart.drag", Gt, Ut) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
}
function qt(e, t) {
	var n = e.document.documentElement, r = D(e).on("dragstart.drag", null);
	t && (r.on("click.drag", Gt, Ut), setTimeout(function() {
		r.on("click.drag", null);
	}, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
}
//#endregion
//#region node_modules/d3-color/src/define.js
function Jt(e, t, n) {
	e.prototype = t.prototype = n, n.constructor = e;
}
function Yt(e, t) {
	var n = Object.create(e.prototype);
	for (var r in t) n[r] = t[r];
	return n;
}
//#endregion
//#region node_modules/d3-color/src/color.js
function k() {}
var A = .7, j = 1 / A, M = "\\s*([+-]?\\d+)\\s*", N = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", P = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Xt = /^#([0-9a-f]{3,8})$/, Zt = RegExp(`^rgb\\(${M},${M},${M}\\)$`), Qt = RegExp(`^rgb\\(${P},${P},${P}\\)$`), $t = RegExp(`^rgba\\(${M},${M},${M},${N}\\)$`), en = RegExp(`^rgba\\(${P},${P},${P},${N}\\)$`), tn = RegExp(`^hsl\\(${N},${P},${P}\\)$`), nn = RegExp(`^hsla\\(${N},${P},${P},${N}\\)$`), rn = {
	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
};
Jt(k, F, {
	copy(e) {
		return Object.assign(new this.constructor(), this, e);
	},
	displayable() {
		return this.rgb().displayable();
	},
	hex: an,
	formatHex: an,
	formatHex8: on,
	formatHsl: sn,
	formatRgb: cn,
	toString: cn
});
function an() {
	return this.rgb().formatHex();
}
function on() {
	return this.rgb().formatHex8();
}
function sn() {
	return gn(this).formatHsl();
}
function cn() {
	return this.rgb().formatRgb();
}
function F(e) {
	var t, n;
	return e = (e + "").trim().toLowerCase(), (t = Xt.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? ln(t) : n === 3 ? new L(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? I(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? I(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Zt.exec(e)) ? new L(t[1], t[2], t[3], 1) : (t = Qt.exec(e)) ? new L(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = $t.exec(e)) ? I(t[1], t[2], t[3], t[4]) : (t = en.exec(e)) ? I(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = tn.exec(e)) ? hn(t[1], t[2] / 100, t[3] / 100, 1) : (t = nn.exec(e)) ? hn(t[1], t[2] / 100, t[3] / 100, t[4]) : rn.hasOwnProperty(e) ? ln(rn[e]) : e === "transparent" ? new L(NaN, NaN, NaN, 0) : null;
}
function ln(e) {
	return new L(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
}
function I(e, t, n, r) {
	return r <= 0 && (e = t = n = NaN), new L(e, t, n, r);
}
function un(e) {
	return e instanceof k || (e = F(e)), e ? (e = e.rgb(), new L(e.r, e.g, e.b, e.opacity)) : new L();
}
function dn(e, t, n, r) {
	return arguments.length === 1 ? un(e) : new L(e, t, n, r ?? 1);
}
function L(e, t, n, r) {
	this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
}
Jt(L, dn, Yt(k, {
	brighter(e) {
		return e = e == null ? j : j ** +e, new L(this.r * e, this.g * e, this.b * e, this.opacity);
	},
	darker(e) {
		return e = e == null ? A : A ** +e, new L(this.r * e, this.g * e, this.b * e, this.opacity);
	},
	rgb() {
		return this;
	},
	clamp() {
		return new L(z(this.r), z(this.g), z(this.b), R(this.opacity));
	},
	displayable() {
		return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
	},
	hex: fn,
	formatHex: fn,
	formatHex8: pn,
	formatRgb: mn,
	toString: mn
}));
function fn() {
	return `#${B(this.r)}${B(this.g)}${B(this.b)}`;
}
function pn() {
	return `#${B(this.r)}${B(this.g)}${B(this.b)}${B((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
}
function mn() {
	let e = R(this.opacity);
	return `${e === 1 ? "rgb(" : "rgba("}${z(this.r)}, ${z(this.g)}, ${z(this.b)}${e === 1 ? ")" : `, ${e})`}`;
}
function R(e) {
	return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
}
function z(e) {
	return Math.max(0, Math.min(255, Math.round(e) || 0));
}
function B(e) {
	return e = z(e), (e < 16 ? "0" : "") + e.toString(16);
}
function hn(e, t, n, r) {
	return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new V(e, t, n, r);
}
function gn(e) {
	if (e instanceof V) return new V(e.h, e.s, e.l, e.opacity);
	if (e instanceof k || (e = F(e)), !e) return new V();
	if (e instanceof V) return e;
	e = e.rgb();
	var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), o = NaN, s = a - i, c = (a + i) / 2;
	return s ? (o = t === a ? (n - r) / s + (n < r) * 6 : n === a ? (r - t) / s + 2 : (t - n) / s + 4, s /= c < .5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new V(o, s, c, e.opacity);
}
function _n(e, t, n, r) {
	return arguments.length === 1 ? gn(e) : new V(e, t, n, r ?? 1);
}
function V(e, t, n, r) {
	this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
}
Jt(V, _n, Yt(k, {
	brighter(e) {
		return e = e == null ? j : j ** +e, new V(this.h, this.s, this.l * e, this.opacity);
	},
	darker(e) {
		return e = e == null ? A : A ** +e, new V(this.h, this.s, this.l * e, this.opacity);
	},
	rgb() {
		var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < .5 ? n : 1 - n) * t, i = 2 * n - r;
		return new L(yn(e >= 240 ? e - 240 : e + 120, i, r), yn(e, i, r), yn(e < 120 ? e + 240 : e - 120, i, r), this.opacity);
	},
	clamp() {
		return new V(vn(this.h), H(this.s), H(this.l), R(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() {
		let e = R(this.opacity);
		return `${e === 1 ? "hsl(" : "hsla("}${vn(this.h)}, ${H(this.s) * 100}%, ${H(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
	}
}));
function vn(e) {
	return e = (e || 0) % 360, e < 0 ? e + 360 : e;
}
function H(e) {
	return Math.max(0, Math.min(1, e || 0));
}
function yn(e, t, n) {
	return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
}
//#endregion
//#region node_modules/d3-interpolate/src/constant.js
var bn = (e) => () => e;
//#endregion
//#region node_modules/d3-interpolate/src/color.js
function xn(e, t) {
	return function(n) {
		return e + n * t;
	};
}
function Sn(e, t, n) {
	return e **= +n, t = t ** +n - e, n = 1 / n, function(r) {
		return (e + r * t) ** +n;
	};
}
function Cn(e, t) {
	var n = t - e;
	return n ? xn(e, n > 180 || n < -180 ? n - 360 * Math.round(n / 360) : n) : bn(isNaN(e) ? t : e);
}
function wn(e) {
	return (e = +e) == 1 ? Tn : function(t, n) {
		return n - t ? Sn(t, n, e) : bn(isNaN(t) ? n : t);
	};
}
function Tn(e, t) {
	var n = t - e;
	return n ? xn(e, n) : bn(isNaN(e) ? t : e);
}
//#endregion
//#region node_modules/d3-interpolate/src/rgb.js
var En = (function e(t) {
	var n = wn(t);
	function r(e, t) {
		var r = n((e = dn(e)).r, (t = dn(t)).r), i = n(e.g, t.g), a = n(e.b, t.b), o = Tn(e.opacity, t.opacity);
		return function(t) {
			return e.r = r(t), e.g = i(t), e.b = a(t), e.opacity = o(t), e + "";
		};
	}
	return r.gamma = e, r;
})(1);
//#endregion
//#region node_modules/d3-interpolate/src/number.js
function U(e, t) {
	return e = +e, t = +t, function(n) {
		return e * (1 - n) + t * n;
	};
}
//#endregion
//#region node_modules/d3-interpolate/src/string.js
var Dn = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, On = new RegExp(Dn.source, "g");
function kn(e) {
	return function() {
		return e;
	};
}
function An(e) {
	return function(t) {
		return e(t) + "";
	};
}
function jn(e, t) {
	var n = Dn.lastIndex = On.lastIndex = 0, r, i, a, o = -1, s = [], c = [];
	for (e += "", t += ""; (r = Dn.exec(e)) && (i = On.exec(t));) (a = i.index) > n && (a = t.slice(n, a), s[o] ? s[o] += a : s[++o] = a), (r = r[0]) === (i = i[0]) ? s[o] ? s[o] += i : s[++o] = i : (s[++o] = null, c.push({
		i: o,
		x: U(r, i)
	})), n = On.lastIndex;
	return n < t.length && (a = t.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ? An(c[0].x) : kn(t) : (t = c.length, function(e) {
		for (var n = 0, r; n < t; ++n) s[(r = c[n]).i] = r.x(e);
		return s.join("");
	});
}
//#endregion
//#region node_modules/d3-interpolate/src/transform/decompose.js
var Mn = 180 / Math.PI, Nn = {
	translateX: 0,
	translateY: 0,
	rotate: 0,
	skewX: 0,
	scaleX: 1,
	scaleY: 1
};
function Pn(e, t, n, r, i, a) {
	var o, s, c;
	return (o = Math.sqrt(e * e + t * t)) && (e /= o, t /= o), (c = e * n + t * r) && (n -= e * c, r -= t * c), (s = Math.sqrt(n * n + r * r)) && (n /= s, r /= s, c /= s), e * r < t * n && (e = -e, t = -t, c = -c, o = -o), {
		translateX: i,
		translateY: a,
		rotate: Math.atan2(t, e) * Mn,
		skewX: Math.atan(c) * Mn,
		scaleX: o,
		scaleY: s
	};
}
//#endregion
//#region node_modules/d3-interpolate/src/transform/parse.js
var Fn;
function In(e) {
	let t = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(e + "");
	return t.isIdentity ? Nn : Pn(t.a, t.b, t.c, t.d, t.e, t.f);
}
function Ln(e) {
	return e == null || (Fn ||= document.createElementNS("http://www.w3.org/2000/svg", "g"), Fn.setAttribute("transform", e), !(e = Fn.transform.baseVal.consolidate())) ? Nn : (e = e.matrix, Pn(e.a, e.b, e.c, e.d, e.e, e.f));
}
//#endregion
//#region node_modules/d3-interpolate/src/transform/index.js
function Rn(e, t, n, r) {
	function i(e) {
		return e.length ? e.pop() + " " : "";
	}
	function a(e, r, i, a, o, s) {
		if (e !== i || r !== a) {
			var c = o.push("translate(", null, t, null, n);
			s.push({
				i: c - 4,
				x: U(e, i)
			}, {
				i: c - 2,
				x: U(r, a)
			});
		} else (i || a) && o.push("translate(" + i + t + a + n);
	}
	function o(e, t, n, a) {
		e === t ? t && n.push(i(n) + "rotate(" + t + r) : (e - t > 180 ? t += 360 : t - e > 180 && (e += 360), a.push({
			i: n.push(i(n) + "rotate(", null, r) - 2,
			x: U(e, t)
		}));
	}
	function s(e, t, n, a) {
		e === t ? t && n.push(i(n) + "skewX(" + t + r) : a.push({
			i: n.push(i(n) + "skewX(", null, r) - 2,
			x: U(e, t)
		});
	}
	function c(e, t, n, r, a, o) {
		if (e !== n || t !== r) {
			var s = a.push(i(a) + "scale(", null, ",", null, ")");
			o.push({
				i: s - 4,
				x: U(e, n)
			}, {
				i: s - 2,
				x: U(t, r)
			});
		} else (n !== 1 || r !== 1) && a.push(i(a) + "scale(" + n + "," + r + ")");
	}
	return function(t, n) {
		var r = [], i = [];
		return t = e(t), n = e(n), a(t.translateX, t.translateY, n.translateX, n.translateY, r, i), o(t.rotate, n.rotate, r, i), s(t.skewX, n.skewX, r, i), c(t.scaleX, t.scaleY, n.scaleX, n.scaleY, r, i), t = n = null, function(e) {
			for (var t = -1, n = i.length, a; ++t < n;) r[(a = i[t]).i] = a.x(e);
			return r.join("");
		};
	};
}
var zn = Rn(In, "px, ", "px)", "deg)"), Bn = Rn(Ln, ", ", ")", ")"), Vn = 1e-12;
function Hn(e) {
	return ((e = Math.exp(e)) + 1 / e) / 2;
}
function Un(e) {
	return ((e = Math.exp(e)) - 1 / e) / 2;
}
function Wn(e) {
	return ((e = Math.exp(2 * e)) - 1) / (e + 1);
}
var Gn = (function e(t, n, r) {
	function i(e, i) {
		var a = e[0], o = e[1], s = e[2], c = i[0], l = i[1], u = i[2], d = c - a, f = l - o, p = d * d + f * f, m, h;
		if (p < Vn) h = Math.log(u / s) / t, m = function(e) {
			return [
				a + e * d,
				o + e * f,
				s * Math.exp(t * e * h)
			];
		};
		else {
			var g = Math.sqrt(p), _ = (u * u - s * s + r * p) / (2 * s * n * g), v = (u * u - s * s - r * p) / (2 * u * n * g), y = Math.log(Math.sqrt(_ * _ + 1) - _);
			h = (Math.log(Math.sqrt(v * v + 1) - v) - y) / t, m = function(e) {
				var r = e * h, i = Hn(y), c = s / (n * g) * (i * Wn(t * r + y) - Un(y));
				return [
					a + c * d,
					o + c * f,
					s * i / Hn(t * r + y)
				];
			};
		}
		return m.duration = h * 1e3 * t / Math.SQRT2, m;
	}
	return i.rho = function(t) {
		var n = Math.max(.001, +t), r = n * n;
		return e(n, r, r * r);
	}, i;
})(Math.SQRT2, 2, 4), W = 0, Kn = 0, qn = 0, Jn = 1e3, Yn, G, Xn = 0, K = 0, Zn = 0, q = typeof performance == "object" && performance.now ? performance : Date, Qn = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
	setTimeout(e, 17);
};
function $n() {
	return K ||= (Qn(er), q.now() + Zn);
}
function er() {
	K = 0;
}
function tr() {
	this._call = this._time = this._next = null;
}
tr.prototype = nr.prototype = {
	constructor: tr,
	restart: function(e, t, n) {
		if (typeof e != "function") throw TypeError("callback is not a function");
		n = (n == null ? $n() : +n) + (t == null ? 0 : +t), !this._next && G !== this && (G ? G._next = this : Yn = this, G = this), this._call = e, this._time = n, sr();
	},
	stop: function() {
		this._call && (this._call = null, this._time = Infinity, sr());
	}
};
function nr(e, t, n) {
	var r = new tr();
	return r.restart(e, t, n), r;
}
function rr() {
	$n(), ++W;
	for (var e = Yn, t; e;) (t = K - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
	--W;
}
function ir() {
	K = (Xn = q.now()) + Zn, W = Kn = 0;
	try {
		rr();
	} finally {
		W = 0, or(), K = 0;
	}
}
function ar() {
	var e = q.now(), t = e - Xn;
	t > Jn && (Zn -= t, Xn = e);
}
function or() {
	for (var e, t = Yn, n, r = Infinity; t;) t._call ? (r > t._time && (r = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : Yn = n);
	G = e, sr(r);
}
function sr(e) {
	W || (Kn &&= clearTimeout(Kn), e - K > 24 ? (e < Infinity && (Kn = setTimeout(ir, e - q.now() - Zn)), qn &&= clearInterval(qn)) : (qn ||= (Xn = q.now(), setInterval(ar, Jn)), W = 1, Qn(ir)));
}
//#endregion
//#region node_modules/d3-timer/src/timeout.js
function cr(e, t, n) {
	var r = new tr();
	return t = t == null ? 0 : +t, r.restart((n) => {
		r.stop(), e(n + t);
	}, t, n), r;
}
//#endregion
//#region node_modules/d3-transition/src/transition/schedule.js
var lr = d("start", "end", "cancel", "interrupt"), ur = [];
function dr(e, t, n, r, i, a) {
	var o = e.__transition;
	if (!o) e.__transition = {};
	else if (n in o) return;
	pr(e, n, {
		name: t,
		index: r,
		group: i,
		on: lr,
		tween: ur,
		time: a.time,
		delay: a.delay,
		duration: a.duration,
		ease: a.ease,
		timer: null,
		state: 0
	});
}
function fr(e, t) {
	var n = Y(e, t);
	if (n.state > 0) throw Error("too late; already scheduled");
	return n;
}
function J(e, t) {
	var n = Y(e, t);
	if (n.state > 3) throw Error("too late; already running");
	return n;
}
function Y(e, t) {
	var n = e.__transition;
	if (!n || !(n = n[t])) throw Error("transition not found");
	return n;
}
function pr(e, t, n) {
	var r = e.__transition, i;
	r[t] = n, n.timer = nr(a, 0, n.time);
	function a(e) {
		n.state = 1, n.timer.restart(o, n.delay, n.time), n.delay <= e && o(e - n.delay);
	}
	function o(a) {
		var l, u, d, f;
		if (n.state !== 1) return c();
		for (l in r) if (f = r[l], f.name === n.name) {
			if (f.state === 3) return cr(o);
			f.state === 4 ? (f.state = 6, f.timer.stop(), f.on.call("interrupt", e, e.__data__, f.index, f.group), delete r[l]) : +l < t && (f.state = 6, f.timer.stop(), f.on.call("cancel", e, e.__data__, f.index, f.group), delete r[l]);
		}
		if (cr(function() {
			n.state === 3 && (n.state = 4, n.timer.restart(s, n.delay, n.time), s(a));
		}), n.state = 2, n.on.call("start", e, e.__data__, n.index, n.group), n.state === 2) {
			for (n.state = 3, i = Array(d = n.tween.length), l = 0, u = -1; l < d; ++l) (f = n.tween[l].value.call(e, e.__data__, n.index, n.group)) && (i[++u] = f);
			i.length = u + 1;
		}
	}
	function s(t) {
		for (var r = t < n.duration ? n.ease.call(null, t / n.duration) : (n.timer.restart(c), n.state = 5, 1), a = -1, o = i.length; ++a < o;) i[a].call(e, r);
		n.state === 5 && (n.on.call("end", e, e.__data__, n.index, n.group), c());
	}
	function c() {
		for (var i in n.state = 6, n.timer.stop(), delete r[t], r) return;
		delete e.__transition;
	}
}
//#endregion
//#region node_modules/d3-transition/src/interrupt.js
function mr(e, t) {
	var n = e.__transition, r, i, a = !0, o;
	if (n) {
		for (o in t = t == null ? null : t + "", n) {
			if ((r = n[o]).name !== t) {
				a = !1;
				continue;
			}
			i = r.state > 2 && r.state < 5, r.state = 6, r.timer.stop(), r.on.call(i ? "interrupt" : "cancel", e, e.__data__, r.index, r.group), delete n[o];
		}
		a && delete e.__transition;
	}
}
//#endregion
//#region node_modules/d3-transition/src/selection/interrupt.js
function hr(e) {
	return this.each(function() {
		mr(this, e);
	});
}
//#endregion
//#region node_modules/d3-transition/src/transition/tween.js
function gr(e, t) {
	var n, r;
	return function() {
		var i = J(this, e), a = i.tween;
		if (a !== n) {
			r = n = a;
			for (var o = 0, s = r.length; o < s; ++o) if (r[o].name === t) {
				r = r.slice(), r.splice(o, 1);
				break;
			}
		}
		i.tween = r;
	};
}
function _r(e, t, n) {
	var r, i;
	if (typeof n != "function") throw Error();
	return function() {
		var a = J(this, e), o = a.tween;
		if (o !== r) {
			i = (r = o).slice();
			for (var s = {
				name: t,
				value: n
			}, c = 0, l = i.length; c < l; ++c) if (i[c].name === t) {
				i[c] = s;
				break;
			}
			c === l && i.push(s);
		}
		a.tween = i;
	};
}
function vr(e, t) {
	var n = this._id;
	if (e += "", arguments.length < 2) {
		for (var r = Y(this.node(), n).tween, i = 0, a = r.length, o; i < a; ++i) if ((o = r[i]).name === e) return o.value;
		return null;
	}
	return this.each((t == null ? gr : _r)(n, e, t));
}
function yr(e, t, n) {
	var r = e._id;
	return e.each(function() {
		var e = J(this, r);
		(e.value ||= {})[t] = n.apply(this, arguments);
	}), function(e) {
		return Y(e, r).value[t];
	};
}
//#endregion
//#region node_modules/d3-transition/src/transition/interpolate.js
function br(e, t) {
	var n;
	return (typeof t == "number" ? U : t instanceof F ? En : (n = F(t)) ? (t = n, En) : jn)(e, t);
}
//#endregion
//#region node_modules/d3-transition/src/transition/attr.js
function xr(e) {
	return function() {
		this.removeAttribute(e);
	};
}
function Sr(e) {
	return function() {
		this.removeAttributeNS(e.space, e.local);
	};
}
function Cr(e, t, n) {
	var r, i = n + "", a;
	return function() {
		var o = this.getAttribute(e);
		return o === i ? null : o === r ? a : a = t(r = o, n);
	};
}
function wr(e, t, n) {
	var r, i = n + "", a;
	return function() {
		var o = this.getAttributeNS(e.space, e.local);
		return o === i ? null : o === r ? a : a = t(r = o, n);
	};
}
function Tr(e, t, n) {
	var r, i, a;
	return function() {
		var o, s = n(this), c;
		return s == null ? void this.removeAttribute(e) : (o = this.getAttribute(e), c = s + "", o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s)));
	};
}
function Er(e, t, n) {
	var r, i, a;
	return function() {
		var o, s = n(this), c;
		return s == null ? void this.removeAttributeNS(e.space, e.local) : (o = this.getAttributeNS(e.space, e.local), c = s + "", o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s)));
	};
}
function Dr(e, t) {
	var n = _(e), r = n === "transform" ? Bn : br;
	return this.attrTween(e, typeof t == "function" ? (n.local ? Er : Tr)(n, r, yr(this, "attr." + e, t)) : t == null ? (n.local ? Sr : xr)(n) : (n.local ? wr : Cr)(n, r, t));
}
//#endregion
//#region node_modules/d3-transition/src/transition/attrTween.js
function Or(e, t) {
	return function(n) {
		this.setAttribute(e, t.call(this, n));
	};
}
function kr(e, t) {
	return function(n) {
		this.setAttributeNS(e.space, e.local, t.call(this, n));
	};
}
function Ar(e, t) {
	var n, r;
	function i() {
		var i = t.apply(this, arguments);
		return i !== r && (n = (r = i) && kr(e, i)), n;
	}
	return i._value = t, i;
}
function jr(e, t) {
	var n, r;
	function i() {
		var i = t.apply(this, arguments);
		return i !== r && (n = (r = i) && Or(e, i)), n;
	}
	return i._value = t, i;
}
function Mr(e, t) {
	var n = "attr." + e;
	if (arguments.length < 2) return (n = this.tween(n)) && n._value;
	if (t == null) return this.tween(n, null);
	if (typeof t != "function") throw Error();
	var r = _(e);
	return this.tween(n, (r.local ? Ar : jr)(r, t));
}
//#endregion
//#region node_modules/d3-transition/src/transition/delay.js
function Nr(e, t) {
	return function() {
		fr(this, e).delay = +t.apply(this, arguments);
	};
}
function Pr(e, t) {
	return t = +t, function() {
		fr(this, e).delay = t;
	};
}
function Fr(e) {
	var t = this._id;
	return arguments.length ? this.each((typeof e == "function" ? Nr : Pr)(t, e)) : Y(this.node(), t).delay;
}
//#endregion
//#region node_modules/d3-transition/src/transition/duration.js
function Ir(e, t) {
	return function() {
		J(this, e).duration = +t.apply(this, arguments);
	};
}
function Lr(e, t) {
	return t = +t, function() {
		J(this, e).duration = t;
	};
}
function Rr(e) {
	var t = this._id;
	return arguments.length ? this.each((typeof e == "function" ? Ir : Lr)(t, e)) : Y(this.node(), t).duration;
}
//#endregion
//#region node_modules/d3-transition/src/transition/ease.js
function zr(e, t) {
	if (typeof t != "function") throw Error();
	return function() {
		J(this, e).ease = t;
	};
}
function Br(e) {
	var t = this._id;
	return arguments.length ? this.each(zr(t, e)) : Y(this.node(), t).ease;
}
//#endregion
//#region node_modules/d3-transition/src/transition/easeVarying.js
function Vr(e, t) {
	return function() {
		var n = t.apply(this, arguments);
		if (typeof n != "function") throw Error();
		J(this, e).ease = n;
	};
}
function Hr(e) {
	if (typeof e != "function") throw Error();
	return this.each(Vr(this._id, e));
}
//#endregion
//#region node_modules/d3-transition/src/transition/filter.js
function Ur(e) {
	typeof e != "function" && (e = oe(e));
	for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = [], c, l = 0; l < o; ++l) (c = a[l]) && e.call(c, c.__data__, l, a) && s.push(c);
	return new X(r, this._parents, this._name, this._id);
}
//#endregion
//#region node_modules/d3-transition/src/transition/merge.js
function Wr(e) {
	if (e._id !== this._id) throw Error();
	for (var t = this._groups, n = e._groups, r = t.length, i = n.length, a = Math.min(r, i), o = Array(r), s = 0; s < a; ++s) for (var c = t[s], l = n[s], u = c.length, d = o[s] = Array(u), f, p = 0; p < u; ++p) (f = c[p] || l[p]) && (d[p] = f);
	for (; s < r; ++s) o[s] = t[s];
	return new X(o, this._parents, this._name, this._id);
}
//#endregion
//#region node_modules/d3-transition/src/transition/on.js
function Gr(e) {
	return (e + "").trim().split(/^|\s+/).every(function(e) {
		var t = e.indexOf(".");
		return t >= 0 && (e = e.slice(0, t)), !e || e === "start";
	});
}
function Kr(e, t, n) {
	var r, i, a = Gr(t) ? fr : J;
	return function() {
		var o = a(this, e), s = o.on;
		s !== r && (i = (r = s).copy()).on(t, n), o.on = i;
	};
}
function qr(e, t) {
	var n = this._id;
	return arguments.length < 2 ? Y(this.node(), n).on.on(e) : this.each(Kr(n, e, t));
}
//#endregion
//#region node_modules/d3-transition/src/transition/remove.js
function Jr(e) {
	return function() {
		var t = this.parentNode;
		for (var n in this.__transition) if (+n !== e) return;
		t && t.removeChild(this);
	};
}
function Yr() {
	return this.on("end.remove", Jr(this._id));
}
//#endregion
//#region node_modules/d3-transition/src/transition/select.js
function Xr(e) {
	var t = this._name, n = this._id;
	typeof e != "function" && (e = x(e));
	for (var r = this._groups, i = r.length, a = Array(i), o = 0; o < i; ++o) for (var s = r[o], c = s.length, l = a[o] = Array(c), u, d, f = 0; f < c; ++f) (u = s[f]) && (d = e.call(u, u.__data__, f, s)) && ("__data__" in u && (d.__data__ = u.__data__), l[f] = d, dr(l[f], t, n, f, l, Y(u, n)));
	return new X(a, this._parents, t, n);
}
//#endregion
//#region node_modules/d3-transition/src/transition/selectAll.js
function Zr(e) {
	var t = this._name, n = this._id;
	typeof e != "function" && (e = re(e));
	for (var r = this._groups, i = r.length, a = [], o = [], s = 0; s < i; ++s) for (var c = r[s], l = c.length, u, d = 0; d < l; ++d) if (u = c[d]) {
		for (var f = e.call(u, u.__data__, d, c), p, m = Y(u, n), h = 0, g = f.length; h < g; ++h) (p = f[h]) && dr(p, t, n, h, f, m);
		a.push(f), o.push(u);
	}
	return new X(a, o, t, n);
}
//#endregion
//#region node_modules/d3-transition/src/transition/selection.js
var Qr = E.prototype.constructor;
function $r() {
	return new Qr(this._groups, this._parents);
}
//#endregion
//#region node_modules/d3-transition/src/transition/style.js
function ei(e, t) {
	var n, r, i;
	return function() {
		var a = w(this, e), o = (this.style.removeProperty(e), w(this, e));
		return a === o ? null : a === n && o === r ? i : i = t(n = a, r = o);
	};
}
function ti(e) {
	return function() {
		this.style.removeProperty(e);
	};
}
function ni(e, t, n) {
	var r, i = n + "", a;
	return function() {
		var o = w(this, e);
		return o === i ? null : o === r ? a : a = t(r = o, n);
	};
}
function ri(e, t, n) {
	var r, i, a;
	return function() {
		var o = w(this, e), s = n(this), c = s + "";
		return s ?? (c = s = (this.style.removeProperty(e), w(this, e))), o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s));
	};
}
function ii(e, t) {
	var n, r, i, a = "style." + t, o = "end." + a, s;
	return function() {
		var c = J(this, e), l = c.on, u = c.value[a] == null ? s ||= ti(t) : void 0;
		(l !== n || i !== u) && (r = (n = l).copy()).on(o, i = u), c.on = r;
	};
}
function ai(e, t, n) {
	var r = (e += "") == "transform" ? zn : br;
	return t == null ? this.styleTween(e, ei(e, r)).on("end.style." + e, ti(e)) : typeof t == "function" ? this.styleTween(e, ri(e, r, yr(this, "style." + e, t))).each(ii(this._id, e)) : this.styleTween(e, ni(e, r, t), n).on("end.style." + e, null);
}
//#endregion
//#region node_modules/d3-transition/src/transition/styleTween.js
function oi(e, t, n) {
	return function(r) {
		this.style.setProperty(e, t.call(this, r), n);
	};
}
function si(e, t, n) {
	var r, i;
	function a() {
		var a = t.apply(this, arguments);
		return a !== i && (r = (i = a) && oi(e, a, n)), r;
	}
	return a._value = t, a;
}
function ci(e, t, n) {
	var r = "style." + (e += "");
	if (arguments.length < 2) return (r = this.tween(r)) && r._value;
	if (t == null) return this.tween(r, null);
	if (typeof t != "function") throw Error();
	return this.tween(r, si(e, t, n ?? ""));
}
//#endregion
//#region node_modules/d3-transition/src/transition/text.js
function li(e) {
	return function() {
		this.textContent = e;
	};
}
function ui(e) {
	return function() {
		var t = e(this);
		this.textContent = t ?? "";
	};
}
function di(e) {
	return this.tween("text", typeof e == "function" ? ui(yr(this, "text", e)) : li(e == null ? "" : e + ""));
}
//#endregion
//#region node_modules/d3-transition/src/transition/textTween.js
function fi(e) {
	return function(t) {
		this.textContent = e.call(this, t);
	};
}
function pi(e) {
	var t, n;
	function r() {
		var r = e.apply(this, arguments);
		return r !== n && (t = (n = r) && fi(r)), t;
	}
	return r._value = e, r;
}
function mi(e) {
	var t = "text";
	if (arguments.length < 1) return (t = this.tween(t)) && t._value;
	if (e == null) return this.tween(t, null);
	if (typeof e != "function") throw Error();
	return this.tween(t, pi(e));
}
//#endregion
//#region node_modules/d3-transition/src/transition/transition.js
function hi() {
	for (var e = this._name, t = this._id, n = yi(), r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) if (c = o[l]) {
		var u = Y(c, t);
		dr(c, e, n, l, o, {
			time: u.time + u.delay + u.duration,
			delay: 0,
			duration: u.duration,
			ease: u.ease
		});
	}
	return new X(r, this._parents, e, n);
}
//#endregion
//#region node_modules/d3-transition/src/transition/end.js
function gi() {
	var e, t, n = this, r = n._id, i = n.size();
	return new Promise(function(a, o) {
		var s = { value: o }, c = { value: function() {
			--i === 0 && a();
		} };
		n.each(function() {
			var n = J(this, r), i = n.on;
			i !== e && (t = (e = i).copy(), t._.cancel.push(s), t._.interrupt.push(s), t._.end.push(c)), n.on = t;
		}), i === 0 && a();
	});
}
//#endregion
//#region node_modules/d3-transition/src/transition/index.js
var _i = 0;
function X(e, t, n, r) {
	this._groups = e, this._parents = t, this._name = n, this._id = r;
}
function vi(e) {
	return E().transition(e);
}
function yi() {
	return ++_i;
}
var Z = E.prototype;
X.prototype = vi.prototype = {
	constructor: X,
	select: Xr,
	selectAll: Zr,
	selectChild: Z.selectChild,
	selectChildren: Z.selectChildren,
	filter: Ur,
	merge: Wr,
	selection: $r,
	transition: hi,
	call: Z.call,
	nodes: Z.nodes,
	node: Z.node,
	size: Z.size,
	empty: Z.empty,
	each: Z.each,
	on: qr,
	attr: Dr,
	attrTween: Mr,
	style: ai,
	styleTween: ci,
	text: di,
	textTween: mi,
	remove: Yr,
	tween: vr,
	delay: Fr,
	duration: Rr,
	ease: Br,
	easeVarying: Hr,
	end: gi,
	[Symbol.iterator]: Z[Symbol.iterator]
};
//#endregion
//#region node_modules/d3-ease/src/cubic.js
function bi(e) {
	return ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2;
}
//#endregion
//#region node_modules/d3-transition/src/selection/transition.js
var xi = {
	time: null,
	delay: 0,
	duration: 250,
	ease: bi
};
function Si(e, t) {
	for (var n; !(n = e.__transition) || !(n = n[t]);) if (!(e = e.parentNode)) throw Error(`transition ${t} not found`);
	return n;
}
function Ci(e) {
	var t, n;
	e instanceof X ? (t = e._id, e = e._name) : (t = yi(), (n = xi).time = $n(), e = e == null ? null : e + "");
	for (var r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) && dr(c, e, t, l, o, n || Si(c, t));
	return new X(r, this._parents, e, t);
}
E.prototype.interrupt = hr, E.prototype.transition = Ci;
//#endregion
//#region node_modules/d3-zoom/src/constant.js
var wi = (e) => () => e;
//#endregion
//#region node_modules/d3-zoom/src/event.js
function Ti(e, { sourceEvent: t, target: n, transform: r, dispatch: i }) {
	Object.defineProperties(this, {
		type: {
			value: e,
			enumerable: !0,
			configurable: !0
		},
		sourceEvent: {
			value: t,
			enumerable: !0,
			configurable: !0
		},
		target: {
			value: n,
			enumerable: !0,
			configurable: !0
		},
		transform: {
			value: r,
			enumerable: !0,
			configurable: !0
		},
		_: { value: i }
	});
}
//#endregion
//#region node_modules/d3-zoom/src/transform.js
function Q(e, t, n) {
	this.k = e, this.x = t, this.y = n;
}
Q.prototype = {
	constructor: Q,
	scale: function(e) {
		return e === 1 ? this : new Q(this.k * e, this.x, this.y);
	},
	translate: function(e, t) {
		return e === 0 & t === 0 ? this : new Q(this.k, this.x + this.k * e, this.y + this.k * t);
	},
	apply: function(e) {
		return [e[0] * this.k + this.x, e[1] * this.k + this.y];
	},
	applyX: function(e) {
		return e * this.k + this.x;
	},
	applyY: function(e) {
		return e * this.k + this.y;
	},
	invert: function(e) {
		return [(e[0] - this.x) / this.k, (e[1] - this.y) / this.k];
	},
	invertX: function(e) {
		return (e - this.x) / this.k;
	},
	invertY: function(e) {
		return (e - this.y) / this.k;
	},
	rescaleX: function(e) {
		return e.copy().domain(e.range().map(this.invertX, this).map(e.invert, e));
	},
	rescaleY: function(e) {
		return e.copy().domain(e.range().map(this.invertY, this).map(e.invert, e));
	},
	toString: function() {
		return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
	}
};
var Ei = new Q(1, 0, 0);
Di.prototype = Q.prototype;
function Di(e) {
	for (; !e.__zoom;) if (!(e = e.parentNode)) return Ei;
	return e.__zoom;
}
//#endregion
//#region node_modules/d3-zoom/src/noevent.js
function Oi(e) {
	e.stopImmediatePropagation();
}
function $(e) {
	e.preventDefault(), e.stopImmediatePropagation();
}
//#endregion
//#region node_modules/d3-zoom/src/zoom.js
function ki(e) {
	return (!e.ctrlKey || e.type === "wheel") && !e.button;
}
function Ai() {
	var e = this;
	return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute("viewBox") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];
}
function ji() {
	return this.__zoom || Ei;
}
function Mi(e) {
	return -e.deltaY * (e.deltaMode === 1 ? .05 : e.deltaMode ? 1 : .002) * (e.ctrlKey ? 10 : 1);
}
function Ni() {
	return navigator.maxTouchPoints || "ontouchstart" in this;
}
function Pi(e, t, n) {
	var r = e.invertX(t[0][0]) - n[0][0], i = e.invertX(t[1][0]) - n[1][0], a = e.invertY(t[0][1]) - n[0][1], o = e.invertY(t[1][1]) - n[1][1];
	return e.translate(i > r ? (r + i) / 2 : Math.min(0, r) || Math.max(0, i), o > a ? (a + o) / 2 : Math.min(0, a) || Math.max(0, o));
}
function Fi() {
	var e = ki, t = Ai, n = Pi, r = Mi, i = Ni, a = [0, Infinity], o = [[-Infinity, -Infinity], [Infinity, Infinity]], s = 250, c = Gn, l = d("start", "zoom", "end"), u, f, p, m = 500, h = 150, g = 0, _ = 10;
	function v(e) {
		e.property("__zoom", ji).on("wheel.zoom", ne, { passive: !1 }).on("mousedown.zoom", re).on("dblclick.zoom", ie).filter(i).on("touchstart.zoom", ae).on("touchmove.zoom", oe).on("touchend.zoom touchcancel.zoom", se).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
	}
	v.transform = function(e, t, n, r) {
		var i = e.selection ? e.selection() : e;
		i.property("__zoom", ji), e === i ? i.interrupt().each(function() {
			S(this, arguments).event(r).start().zoom(null, typeof t == "function" ? t.apply(this, arguments) : t).end();
		}) : x(e, t, n, r);
	}, v.scaleBy = function(e, t, n, r) {
		v.scaleTo(e, function() {
			return this.__zoom.k * (typeof t == "function" ? t.apply(this, arguments) : t);
		}, n, r);
	}, v.scaleTo = function(e, r, i, a) {
		v.transform(e, function() {
			var e = t.apply(this, arguments), a = this.__zoom, s = i == null ? ee(e) : typeof i == "function" ? i.apply(this, arguments) : i, c = a.invert(s), l = typeof r == "function" ? r.apply(this, arguments) : r;
			return n(b(y(a, l), s, c), e, o);
		}, i, a);
	}, v.translateBy = function(e, r, i, a) {
		v.transform(e, function() {
			return n(this.__zoom.translate(typeof r == "function" ? r.apply(this, arguments) : r, typeof i == "function" ? i.apply(this, arguments) : i), t.apply(this, arguments), o);
		}, null, a);
	}, v.translateTo = function(e, r, i, a, s) {
		v.transform(e, function() {
			var e = t.apply(this, arguments), s = this.__zoom, c = a == null ? ee(e) : typeof a == "function" ? a.apply(this, arguments) : a;
			return n(Ei.translate(c[0], c[1]).scale(s.k).translate(typeof r == "function" ? -r.apply(this, arguments) : -r, typeof i == "function" ? -i.apply(this, arguments) : -i), e, o);
		}, a, s);
	};
	function y(e, t) {
		return t = Math.max(a[0], Math.min(a[1], t)), t === e.k ? e : new Q(t, e.x, e.y);
	}
	function b(e, t, n) {
		var r = t[0] - n[0] * e.k, i = t[1] - n[1] * e.k;
		return r === e.x && i === e.y ? e : new Q(e.k, r, i);
	}
	function ee(e) {
		return [(+e[0][0] + +e[1][0]) / 2, (+e[0][1] + +e[1][1]) / 2];
	}
	function x(e, n, r, i) {
		e.on("start.zoom", function() {
			S(this, arguments).event(i).start();
		}).on("interrupt.zoom end.zoom", function() {
			S(this, arguments).event(i).end();
		}).tween("zoom", function() {
			var e = this, a = arguments, o = S(e, a).event(i), s = t.apply(e, a), l = r == null ? ee(s) : typeof r == "function" ? r.apply(e, a) : r, u = Math.max(s[1][0] - s[0][0], s[1][1] - s[0][1]), d = e.__zoom, f = typeof n == "function" ? n.apply(e, a) : n, p = c(d.invert(l).concat(u / d.k), f.invert(l).concat(u / f.k));
			return function(e) {
				if (e === 1) e = f;
				else {
					var t = p(e), n = u / t[2];
					e = new Q(n, l[0] - t[0] * n, l[1] - t[1] * n);
				}
				o.zoom(null, e);
			};
		});
	}
	function S(e, t, n) {
		return !n && e.__zooming || new te(e, t);
	}
	function te(e, n) {
		this.that = e, this.args = n, this.active = 0, this.sourceEvent = null, this.extent = t.apply(e, n), this.taps = 0;
	}
	te.prototype = {
		event: function(e) {
			return e && (this.sourceEvent = e), this;
		},
		start: function() {
			return ++this.active === 1 && (this.that.__zooming = this, this.emit("start")), this;
		},
		zoom: function(e, t) {
			return this.mouse && e !== "mouse" && (this.mouse[1] = t.invert(this.mouse[0])), this.touch0 && e !== "touch" && (this.touch0[1] = t.invert(this.touch0[0])), this.touch1 && e !== "touch" && (this.touch1[1] = t.invert(this.touch1[0])), this.that.__zoom = t, this.emit("zoom"), this;
		},
		end: function() {
			return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
		},
		emit: function(e) {
			var t = D(this.that).datum();
			l.call(e, this.that, new Ti(e, {
				sourceEvent: this.sourceEvent,
				target: v,
				type: e,
				transform: this.that.__zoom,
				dispatch: l
			}), t);
		}
	};
	function ne(t, ...i) {
		if (!e.apply(this, arguments)) return;
		var s = S(this, i).event(t), c = this.__zoom, l = Math.max(a[0], Math.min(a[1], c.k * 2 ** r.apply(this, arguments))), u = O(t);
		if (s.wheel) (s.mouse[0][0] !== u[0] || s.mouse[0][1] !== u[1]) && (s.mouse[1] = c.invert(s.mouse[0] = u)), clearTimeout(s.wheel);
		else if (c.k === l) return;
		else s.mouse = [u, c.invert(u)], mr(this), s.start();
		$(t), s.wheel = setTimeout(d, h), s.zoom("mouse", n(b(y(c, l), s.mouse[0], s.mouse[1]), s.extent, o));
		function d() {
			s.wheel = null, s.end();
		}
	}
	function re(t, ...r) {
		if (p || !e.apply(this, arguments)) return;
		var i = t.currentTarget, a = S(this, r, !0).event(t), s = D(t.view).on("mousemove.zoom", d, !0).on("mouseup.zoom", f, !0), c = O(t, i), l = t.clientX, u = t.clientY;
		Kt(t.view), Oi(t), a.mouse = [c, this.__zoom.invert(c)], mr(this), a.start();
		function d(e) {
			if ($(e), !a.moved) {
				var t = e.clientX - l, r = e.clientY - u;
				a.moved = t * t + r * r > g;
			}
			a.event(e).zoom("mouse", n(b(a.that.__zoom, a.mouse[0] = O(e, i), a.mouse[1]), a.extent, o));
		}
		function f(e) {
			s.on("mousemove.zoom mouseup.zoom", null), qt(e.view, a.moved), $(e), a.event(e).end();
		}
	}
	function ie(r, ...i) {
		if (e.apply(this, arguments)) {
			var a = this.__zoom, c = O(r.changedTouches ? r.changedTouches[0] : r, this), l = a.invert(c), u = a.k * (r.shiftKey ? .5 : 2), d = n(b(y(a, u), c, l), t.apply(this, i), o);
			$(r), s > 0 ? D(this).transition().duration(s).call(x, d, c, r) : D(this).call(v.transform, d, c, r);
		}
	}
	function ae(t, ...n) {
		if (e.apply(this, arguments)) {
			var r = t.touches, i = r.length, a = S(this, n, t.changedTouches.length === i).event(t), o, s, c, l;
			for (Oi(t), s = 0; s < i; ++s) c = r[s], l = O(c, this), l = [
				l,
				this.__zoom.invert(l),
				c.identifier
			], a.touch0 ? !a.touch1 && a.touch0[2] !== l[2] && (a.touch1 = l, a.taps = 0) : (a.touch0 = l, o = !0, a.taps = 1 + !!u);
			u &&= clearTimeout(u), o && (a.taps < 2 && (f = l[0], u = setTimeout(function() {
				u = null;
			}, m)), mr(this), a.start());
		}
	}
	function oe(e, ...t) {
		if (this.__zooming) {
			var r = S(this, t).event(e), i = e.changedTouches, a = i.length, s, c, l, u;
			for ($(e), s = 0; s < a; ++s) c = i[s], l = O(c, this), r.touch0 && r.touch0[2] === c.identifier ? r.touch0[0] = l : r.touch1 && r.touch1[2] === c.identifier && (r.touch1[0] = l);
			if (c = r.that.__zoom, r.touch1) {
				var d = r.touch0[0], f = r.touch0[1], p = r.touch1[0], m = r.touch1[1], h = (h = p[0] - d[0]) * h + (h = p[1] - d[1]) * h, g = (g = m[0] - f[0]) * g + (g = m[1] - f[1]) * g;
				c = y(c, Math.sqrt(h / g)), l = [(d[0] + p[0]) / 2, (d[1] + p[1]) / 2], u = [(f[0] + m[0]) / 2, (f[1] + m[1]) / 2];
			} else if (r.touch0) l = r.touch0[0], u = r.touch0[1];
			else return;
			r.zoom("touch", n(b(c, l, u), r.extent, o));
		}
	}
	function se(e, ...t) {
		if (this.__zooming) {
			var n = S(this, t).event(e), r = e.changedTouches, i = r.length, a, o;
			for (Oi(e), p && clearTimeout(p), p = setTimeout(function() {
				p = null;
			}, m), a = 0; a < i; ++a) o = r[a], n.touch0 && n.touch0[2] === o.identifier ? delete n.touch0 : n.touch1 && n.touch1[2] === o.identifier && delete n.touch1;
			if (n.touch1 && !n.touch0 && (n.touch0 = n.touch1, delete n.touch1), n.touch0) n.touch0[1] = this.__zoom.invert(n.touch0[0]);
			else if (n.end(), n.taps === 2 && (o = O(o, this), Math.hypot(f[0] - o[0], f[1] - o[1]) < _)) {
				var s = D(this).on("dblclick.zoom");
				s && s.apply(this, arguments);
			}
		}
	}
	return v.wheelDelta = function(e) {
		return arguments.length ? (r = typeof e == "function" ? e : wi(+e), v) : r;
	}, v.filter = function(t) {
		return arguments.length ? (e = typeof t == "function" ? t : wi(!!t), v) : e;
	}, v.touchable = function(e) {
		return arguments.length ? (i = typeof e == "function" ? e : wi(!!e), v) : i;
	}, v.extent = function(e) {
		return arguments.length ? (t = typeof e == "function" ? e : wi([[+e[0][0], +e[0][1]], [+e[1][0], +e[1][1]]]), v) : t;
	}, v.scaleExtent = function(e) {
		return arguments.length ? (a[0] = +e[0], a[1] = +e[1], v) : [a[0], a[1]];
	}, v.translateExtent = function(e) {
		return arguments.length ? (o[0][0] = +e[0][0], o[1][0] = +e[1][0], o[0][1] = +e[0][1], o[1][1] = +e[1][1], v) : [[o[0][0], o[0][1]], [o[1][0], o[1][1]]];
	}, v.constrain = function(e) {
		return arguments.length ? (n = e, v) : n;
	}, v.duration = function(e) {
		return arguments.length ? (s = +e, v) : s;
	}, v.interpolate = function(e) {
		return arguments.length ? (c = e, v) : c;
	}, v.on = function() {
		var e = l.on.apply(l, arguments);
		return e === l ? v : e;
	}, v.clickDistance = function(e) {
		return arguments.length ? (g = (e = +e) * e, v) : Math.sqrt(g);
	}, v.tapDistance = function(e) {
		return arguments.length ? (_ = +e, v) : _;
	}, v;
}
//#endregion
export { O as C, l as D, o as E, c as O, Wt as S, d as T, Kt as _, jn as a, Ht as b, Cn as c, k as d, L as f, Yt as g, Jt as h, Gn as i, Tn as l, un as m, Ei as n, U as o, F as p, Di as r, En as s, Fi as t, bn as u, qt as v, D as w, Ut as x, Gt as y };

//# sourceMappingURL=src-9kyTNi70.js.map