import {
purify
} from "./chunk-CJRZFFQO.js";
import {
cubehelix,
cubehelixLong,
number_default,
rgb,
rgbBasis,
round_default,
select_default,
value_default
} from "./chunk-5KLUPWDV.js";
import {
require_dayjs_min
} from "./chunk-V3IZG5IE.js";
import {
__commonJS,
__toESM
} from "./chunk-TNDHKS54.js";
// node_modules/@braintree/sanitize-url/dist/index.js
var require_dist = __commonJS({
"node_modules/@braintree/sanitize-url/dist/index.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.sanitizeUrl = exports2.BLANK_URL = void 0;
var invalidProtocolRegex = /^([^\w]*)(javascript|data|vbscript)/im;
var htmlEntitiesRegex = /(\w+)(^\w|;)?/g;
var htmlCtrlEntityRegex = /&(newline|tab);/gi;
var ctrlCharactersRegex = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;
var urlSchemeRegex = /^.+(:|:)/gim;
var relativeFirstCharacters = [".", "/"];
exports2.BLANK_URL = "about:blank";
function isRelativeUrlWithoutProtocol(url) {
return relativeFirstCharacters.indexOf(url[0]) > -1;
}
function decodeHtmlCharacters(str2) {
var removedNullByte = str2.replace(ctrlCharactersRegex, "");
return removedNullByte.replace(htmlEntitiesRegex, function(match2, dec) {
return String.fromCharCode(dec);
});
}
function sanitizeUrl2(url) {
if (!url) {
return exports2.BLANK_URL;
}
var sanitizedUrl = decodeHtmlCharacters(url).replace(htmlCtrlEntityRegex, "").replace(ctrlCharactersRegex, "").trim();
if (!sanitizedUrl) {
return exports2.BLANK_URL;
}
if (isRelativeUrlWithoutProtocol(sanitizedUrl)) {
return sanitizedUrl;
}
var urlSchemeParseResults = sanitizedUrl.match(urlSchemeRegex);
if (!urlSchemeParseResults) {
return sanitizedUrl;
}
var urlScheme = urlSchemeParseResults[0];
if (invalidProtocolRegex.test(urlScheme)) {
return exports2.BLANK_URL;
}
return sanitizedUrl;
}
exports2.sanitizeUrl = sanitizeUrl2;
}
});
// node_modules/ts-dedent/esm/index.js
function dedent(templ) {
var values = [];
for (var _i = 1; _i < arguments.length; _i++) {
values[_i - 1] = arguments[_i];
}
var strings = Array.from(typeof templ === "string" ? [templ] : templ);
strings[strings.length - 1] = strings[strings.length - 1].replace(/\r?\n([\t ]*)$/, "");
var indentLengths = strings.reduce(function(arr, str2) {
var matches = str2.match(/\n([\t ]+|(?!\s).)/g);
if (matches) {
return arr.concat(matches.map(function(match2) {
var _a, _b;
return (_b = (_a = match2.match(/[\t ]/g)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
}));
}
return arr;
}, []);
if (indentLengths.length) {
var pattern_1 = new RegExp("\n[ ]{" + Math.min.apply(Math, indentLengths) + "}", "g");
strings = strings.map(function(str2) {
return str2.replace(pattern_1, "\n");
});
}
strings[0] = strings[0].replace(/^\r?\n/, "");
var string = strings[0];
values.forEach(function(value, i) {
var endentations = string.match(/(?:^|\n)( *)$/);
var endentation = endentations ? endentations[1] : "";
var indentedValue = value;
if (typeof value === "string" && value.includes("\n")) {
indentedValue = String(value).split("\n").map(function(str2, i2) {
return i2 === 0 ? str2 : "" + endentation + str2;
}).join("\n");
}
string += indentedValue + strings[i + 1];
});
return string;
}
// node_modules/d3-array/src/max.js
function max(values, valueof) {
let max5;
if (valueof === void 0) {
for (const value of values) {
if (value != null && (max5 < value || max5 === void 0 && value >= value)) {
max5 = value;
}
}
} else {
let index2 = -1;
for (let value of values) {
if ((value = valueof(value, ++index2, values)) != null && (max5 < value || max5 === void 0 && value >= value)) {
max5 = value;
}
}
}
return max5;
}
// node_modules/d3-array/src/min.js
function min(values, valueof) {
let min4;
if (valueof === void 0) {
for (const value of values) {
if (value != null && (min4 > value || min4 === void 0 && value >= value)) {
min4 = value;
}
}
} else {
let index2 = -1;
for (let value of values) {
if ((value = valueof(value, ++index2, values)) != null && (min4 > value || min4 === void 0 && value >= value)) {
min4 = value;
}
}
}
return min4;
}
// node_modules/d3-array/src/ascending.js
function ascending(a2, b) {
return a2 == null || b == null ? NaN : a2 < b ? -1 : a2 > b ? 1 : a2 >= b ? 0 : NaN;
}
// node_modules/d3-array/src/descending.js
function descending(a2, b) {
return a2 == null || b == null ? NaN : b < a2 ? -1 : b > a2 ? 1 : b >= a2 ? 0 : NaN;
}
// node_modules/d3-array/src/bisector.js
function bisector(f) {
let compare1, compare2, delta;
if (f.length !== 2) {
compare1 = ascending;
compare2 = (d, x3) => ascending(f(d), x3);
delta = (d, x3) => f(d) - x3;
} else {
compare1 = f === ascending || f === descending ? f : zero;
compare2 = f;
delta = f;
}
function left2(a2, x3, lo = 0, hi = a2.length) {
if (lo < hi) {
if (compare1(x3, x3) !== 0) return hi;
do {
const mid = lo + hi >>> 1;
if (compare2(a2[mid], x3) < 0) lo = mid + 1;
else hi = mid;
} while (lo < hi);
}
return lo;
}
function right2(a2, x3, lo = 0, hi = a2.length) {
if (lo < hi) {
if (compare1(x3, x3) !== 0) return hi;
do {
const mid = lo + hi >>> 1;
if (compare2(a2[mid], x3) <= 0) lo = mid + 1;
else hi = mid;
} while (lo < hi);
}
return lo;
}
function center2(a2, x3, lo = 0, hi = a2.length) {
const i = left2(a2, x3, lo, hi - 1);
return i > lo && delta(a2[i - 1], x3) > -delta(a2[i], x3) ? i - 1 : i;
}
return { left: left2, center: center2, right: right2 };
}
function zero() {
return 0;
}
// node_modules/d3-array/src/number.js
function number(x3) {
return x3 === null ? NaN : +x3;
}
// node_modules/d3-array/src/bisect.js
var ascendingBisect = bisector(ascending);
var bisectRight = ascendingBisect.right;
var bisectLeft = ascendingBisect.left;
var bisectCenter = bisector(number).center;
var bisect_default = bisectRight;
// node_modules/d3-array/src/blur.js
var blur2 = Blur2(blurf);
var blurImage = Blur2(blurfImage);
function Blur2(blur3) {
return function(data, rx, ry = rx) {
if (!((rx = +rx) >= 0)) throw new RangeError("invalid rx");
if (!((ry = +ry) >= 0)) throw new RangeError("invalid ry");
let { data: values, width, height } = data;
if (!((width = Math.floor(width)) >= 0)) throw new RangeError("invalid width");
if (!((height = Math.floor(height !== void 0 ? height : values.length / width)) >= 0)) throw new RangeError("invalid height");
if (!width || !height || !rx && !ry) return data;
const blurx = rx && blur3(rx);
const blury = ry && blur3(ry);
const temp = values.slice();
if (blurx && blury) {
blurh(blurx, temp, values, width, height);
blurh(blurx, values, temp, width, height);
blurh(blurx, temp, values, width, height);
blurv(blury, values, temp, width, height);
blurv(blury, temp, values, width, height);
blurv(blury, values, temp, width, height);
} else if (blurx) {
blurh(blurx, values, temp, width, height);
blurh(blurx, temp, values, width, height);
blurh(blurx, values, temp, width, height);
} else if (blury) {
blurv(blury, values, temp, width, height);
blurv(blury, temp, values, width, height);
blurv(blury, values, temp, width, height);
}
return data;
};
}
function blurh(blur3, T, S, w, h) {
for (let y3 = 0, n = w * h; y3 < n; ) {
blur3(T, S, y3, y3 += w, 1);
}
}
function blurv(blur3, T, S, w, h) {
for (let x3 = 0, n = w * h; x3 < w; ++x3) {
blur3(T, S, x3, x3 + n, w);
}
}
function blurfImage(radius) {
const blur3 = blurf(radius);
return (T, S, start, stop, step) => {
start <<= 2, stop <<= 2, step <<= 2;
blur3(T, S, start + 0, stop + 0, step);
blur3(T, S, start + 1, stop + 1, step);
blur3(T, S, start + 2, stop + 2, step);
blur3(T, S, start + 3, stop + 3, step);
};
}
function blurf(radius) {
const radius0 = Math.floor(radius);
if (radius0 === radius) return bluri(radius);
const t = radius - radius0;
const w = 2 * radius + 1;
return (T, S, start, stop, step) => {
if (!((stop -= step) >= start)) return;
let sum4 = radius0 * S[start];
const s0 = step * radius0;
const s1 = s0 + step;
for (let i = start, j = start + s0; i < j; i += step) {
sum4 += S[Math.min(stop, i)];
}
for (let i = start, j = stop; i <= j; i += step) {
sum4 += S[Math.min(stop, i + s0)];
T[i] = (sum4 + t * (S[Math.max(start, i - s1)] + S[Math.min(stop, i + s1)])) / w;
sum4 -= S[Math.max(start, i - s0)];
}
};
}
function bluri(radius) {
const w = 2 * radius + 1;
return (T, S, start, stop, step) => {
if (!((stop -= step) >= start)) return;
let sum4 = radius * S[start];
const s2 = step * radius;
for (let i = start, j = start + s2; i < j; i += step) {
sum4 += S[Math.min(stop, i)];
}
for (let i = start, j = stop; i <= j; i += step) {
sum4 += S[Math.min(stop, i + s2)];
T[i] = sum4 / w;
sum4 -= S[Math.max(start, i - s2)];
}
};
}
// node_modules/d3-array/src/fsum.js
var Adder = class {
constructor() {
this._partials = new Float64Array(32);
this._n = 0;
}
add(x3) {
const p = this._partials;
let i = 0;
for (let j = 0; j < this._n && j < 32; j++) {
const y3 = p[j], hi = x3 + y3, lo = Math.abs(x3) < Math.abs(y3) ? x3 - (hi - y3) : y3 - (hi - x3);
if (lo) p[i++] = lo;
x3 = hi;
}
p[i] = x3;
this._n = i + 1;
return this;
}
valueOf() {
const p = this._partials;
let n = this._n, x3, y3, lo, hi = 0;
if (n > 0) {
hi = p[--n];
while (n > 0) {
x3 = hi;
y3 = p[--n];
hi = x3 + y3;
lo = y3 - (hi - x3);
if (lo) break;
}
if (n > 0 && (lo < 0 && p[n - 1] < 0 || lo > 0 && p[n - 1] > 0)) {
y3 = lo * 2;
x3 = hi + y3;
if (y3 == x3 - hi) hi = x3;
}
}
return hi;
}
};
// node_modules/internmap/src/index.js
var InternMap = class extends Map {
constructor(entries, key = keyof) {
super();
Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: key } });
if (entries != null) for (const [key2, value] of entries) this.set(key2, value);
}
get(key) {
return super.get(intern_get(this, key));
}
has(key) {
return super.has(intern_get(this, key));
}
set(key, value) {
return super.set(intern_set(this, key), value);
}
delete(key) {
return super.delete(intern_delete(this, key));
}
};
function intern_get({ _intern, _key }, value) {
const key = _key(value);
return _intern.has(key) ? _intern.get(key) : value;
}
function intern_set({ _intern, _key }, value) {
const key = _key(value);
if (_intern.has(key)) return _intern.get(key);
_intern.set(key, value);
return value;
}
function intern_delete({ _intern, _key }, value) {
const key = _key(value);
if (_intern.has(key)) {
value = _intern.get(key);
_intern.delete(key);
}
return value;
}
function keyof(value) {
return value !== null && typeof value === "object" ? value.valueOf() : value;
}
// node_modules/d3-array/src/array.js
var array = Array.prototype;
var slice = array.slice;
var map = array.map;
// node_modules/d3-array/src/ticks.js
var e10 = Math.sqrt(50);
var e5 = Math.sqrt(10);
var e2 = Math.sqrt(2);
function tickSpec(start, stop, count3) {
const step = (stop - start) / Math.max(0, count3), power = Math.floor(Math.log10(step)), error = step / Math.pow(10, power), factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;
let i1, i2, inc;
if (power < 0) {
inc = Math.pow(10, -power) / factor;
i1 = Math.round(start * inc);
i2 = Math.round(stop * inc);
if (i1 / inc < start) ++i1;
if (i2 / inc > stop) --i2;
inc = -inc;
} else {
inc = Math.pow(10, power) * factor;
i1 = Math.round(start / inc);
i2 = Math.round(stop / inc);
if (i1 * inc < start) ++i1;
if (i2 * inc > stop) --i2;
}
if (i2 < i1 && 0.5 <= count3 && count3 < 2) return tickSpec(start, stop, count3 * 2);
return [i1, i2, inc];
}
function ticks(start, stop, count3) {
stop = +stop, start = +start, count3 = +count3;
if (!(count3 > 0)) return [];
if (start === stop) return [start];
const reverse2 = stop < start, [i1, i2, inc] = reverse2 ? tickSpec(stop, start, count3) : tickSpec(start, stop, count3);
if (!(i2 >= i1)) return [];
const n = i2 - i1 + 1, ticks2 = new Array(n);
if (reverse2) {
if (inc < 0) for (let i = 0; i < n; ++i) ticks2[i] = (i2 - i) / -inc;
else for (let i = 0; i < n; ++i) ticks2[i] = (i2 - i) * inc;
} else {
if (inc < 0) for (let i = 0; i < n; ++i) ticks2[i] = (i1 + i) / -inc;
else for (let i = 0; i < n; ++i) ticks2[i] = (i1 + i) * inc;
}
return ticks2;
}
function tickIncrement(start, stop, count3) {
stop = +stop, start = +start, count3 = +count3;
return tickSpec(start, stop, count3)[2];
}
function tickStep(start, stop, count3) {
stop = +stop, start = +start, count3 = +count3;
const reverse2 = stop < start, inc = reverse2 ? tickIncrement(stop, start, count3) : tickIncrement(start, stop, count3);
return (reverse2 ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
}
// node_modules/d3-array/src/merge.js
function* flatten(arrays) {
for (const array3 of arrays) {
yield* array3;
}
}
function merge(arrays) {
return Array.from(flatten(arrays));
}
// node_modules/d3-array/src/range.js
function range(start, stop, step) {
start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
var i = -1, n = Math.max(0, Math.ceil((stop - start) / step)) | 0, range2 = new Array(n);
while (++i < n) {
range2[i] = start + i * step;
}
return range2;
}
// node_modules/d3-array/src/shuffle.js
var shuffle_default = shuffler(Math.random);
function shuffler(random2) {
return function shuffle2(array3, i0 = 0, i1 = array3.length) {
let m = i1 - (i0 = +i0);
while (m) {
const i = random2() * m-- | 0, t = array3[m + i0];
array3[m + i0] = array3[i + i0];
array3[i + i0] = t;
}
return array3;
};
}
// node_modules/d3-axis/src/identity.js
function identity_default(x3) {
return x3;
}
// node_modules/d3-axis/src/axis.js
var top = 1;
var right = 2;
var bottom = 3;
var left = 4;
var epsilon = 1e-6;
function translateX(x3) {
return "translate(" + x3 + ",0)";
}
function translateY(y3) {
return "translate(0," + y3 + ")";
}
function number2(scale2) {
return (d) => +scale2(d);
}
function center(scale2, offset) {
offset = Math.max(0, scale2.bandwidth() - offset * 2) / 2;
if (scale2.round()) offset = Math.round(offset);
return (d) => +scale2(d) + offset;
}
function entering() {
return !this.__axis;
}
function axis(orient, scale2) {
var tickArguments = [], tickValues = null, tickFormat2 = null, tickSizeInner = 6, tickSizeOuter = 6, tickPadding = 3, offset = typeof window !== "undefined" && window.devicePixelRatio > 1 ? 0 : 0.5, k2 = orient === top || orient === left ? -1 : 1, x3 = orient === left || orient === right ? "x" : "y", transform = orient === top || orient === bottom ? translateX : translateY;
function axis2(context) {
var values = tickValues == null ? scale2.ticks ? scale2.ticks.apply(scale2, tickArguments) : scale2.domain() : tickValues, format3 = tickFormat2 == null ? scale2.tickFormat ? scale2.tickFormat.apply(scale2, tickArguments) : identity_default : tickFormat2, spacing = Math.max(tickSizeInner, 0) + tickPadding, range2 = scale2.range(), range0 = +range2[0] + offset, range1 = +range2[range2.length - 1] + offset, position2 = (scale2.bandwidth ? center : number2)(scale2.copy(), offset), selection = context.selection ? context.selection() : context, path2 = selection.selectAll(".domain").data([null]), tick = selection.selectAll(".tick").data(values, scale2).order(), tickExit = tick.exit(), tickEnter = tick.enter().append("g").attr("class", "tick"), line2 = tick.select("line"), text = tick.select("text");
path2 = path2.merge(path2.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor"));
tick = tick.merge(tickEnter);
line2 = line2.merge(tickEnter.append("line").attr("stroke", "currentColor").attr(x3 + "2", k2 * tickSizeInner));
text = text.merge(tickEnter.append("text").attr("fill", "currentColor").attr(x3, k2 * spacing).attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em"));
if (context !== selection) {
path2 = path2.transition(context);
tick = tick.transition(context);
line2 = line2.transition(context);
text = text.transition(context);
tickExit = tickExit.transition(context).attr("opacity", epsilon).attr("transform", function(d) {
return isFinite(d = position2(d)) ? transform(d + offset) : this.getAttribute("transform");
});
tickEnter.attr("opacity", epsilon).attr("transform", function(d) {
var p = this.parentNode.__axis;
return transform((p && isFinite(p = p(d)) ? p : position2(d)) + offset);
});
}
tickExit.remove();
path2.attr("d", orient === left || orient === right ? tickSizeOuter ? "M" + k2 * tickSizeOuter + "," + range0 + "H" + offset + "V" + range1 + "H" + k2 * tickSizeOuter : "M" + offset + "," + range0 + "V" + range1 : tickSizeOuter ? "M" + range0 + "," + k2 * tickSizeOuter + "V" + offset + "H" + range1 + "V" + k2 * tickSizeOuter : "M" + range0 + "," + offset + "H" + range1);
tick.attr("opacity", 1).attr("transform", function(d) {
return transform(position2(d) + offset);
});
line2.attr(x3 + "2", k2 * tickSizeInner);
text.attr(x3, k2 * spacing).text(format3);
selection.filter(entering).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle");
selection.each(function() {
this.__axis = position2;
});
}
axis2.scale = function(_) {
return arguments.length ? (scale2 = _, axis2) : scale2;
};
axis2.ticks = function() {
return tickArguments = Array.from(arguments), axis2;
};
axis2.tickArguments = function(_) {
return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis2) : tickArguments.slice();
};
axis2.tickValues = function(_) {
return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis2) : tickValues && tickValues.slice();
};
axis2.tickFormat = function(_) {
return arguments.length ? (tickFormat2 = _, axis2) : tickFormat2;
};
axis2.tickSize = function(_) {
return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis2) : tickSizeInner;
};
axis2.tickSizeInner = function(_) {
return arguments.length ? (tickSizeInner = +_, axis2) : tickSizeInner;
};
axis2.tickSizeOuter = function(_) {
return arguments.length ? (tickSizeOuter = +_, axis2) : tickSizeOuter;
};
axis2.tickPadding = function(_) {
return arguments.length ? (tickPadding = +_, axis2) : tickPadding;
};
axis2.offset = function(_) {
return arguments.length ? (offset = +_, axis2) : offset;
};
return axis2;
}
function axisTop(scale2) {
return axis(top, scale2);
}
function axisBottom(scale2) {
return axis(bottom, scale2);
}
// node_modules/d3-scale/src/init.js
function initRange(domain, range2) {
switch (arguments.length) {
case 0:
break;
case 1:
this.range(domain);
break;
default:
this.range(range2).domain(domain);
break;
}
return this;
}
// node_modules/d3-scale/src/ordinal.js
var implicit = Symbol("implicit");
function ordinal() {
var index2 = new InternMap(), domain = [], range2 = [], unknown = implicit;
function scale2(d) {
let i = index2.get(d);
if (i === void 0) {
if (unknown !== implicit) return unknown;
index2.set(d, i = domain.push(d) - 1);
}
return range2[i % range2.length];
}
scale2.domain = function(_) {
if (!arguments.length) return domain.slice();
domain = [], index2 = new InternMap();
for (const value of _) {
if (index2.has(value)) continue;
index2.set(value, domain.push(value) - 1);
}
return scale2;
};
scale2.range = function(_) {
return arguments.length ? (range2 = Array.from(_), scale2) : range2.slice();
};
scale2.unknown = function(_) {
return arguments.length ? (unknown = _, scale2) : unknown;
};
scale2.copy = function() {
return ordinal(domain, range2).unknown(unknown);
};
initRange.apply(scale2, arguments);
return scale2;
}
// node_modules/d3-scale/src/band.js
function band() {
var scale2 = ordinal().unknown(void 0), domain = scale2.domain, ordinalRange = scale2.range, r0 = 0, r1 = 1, step, bandwidth, round = false, paddingInner = 0, paddingOuter = 0, align = 0.5;
delete scale2.unknown;
function rescale() {
var n = domain().length, reverse2 = r1 < r0, start = reverse2 ? r1 : r0, stop = reverse2 ? r0 : r1;
step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);
if (round) step = Math.floor(step);
start += (stop - start - step * (n - paddingInner)) * align;
bandwidth = step * (1 - paddingInner);
if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);
var values = range(n).map(function(i) {
return start + step * i;
});
return ordinalRange(reverse2 ? values.reverse() : values);
}
scale2.domain = function(_) {
return arguments.length ? (domain(_), rescale()) : domain();
};
scale2.range = function(_) {
return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];
};
scale2.rangeRound = function(_) {
return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();
};
scale2.bandwidth = function() {
return bandwidth;
};
scale2.step = function() {
return step;
};
scale2.round = function(_) {
return arguments.length ? (round = !!_, rescale()) : round;
};
scale2.padding = function(_) {
return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;
};
scale2.paddingInner = function(_) {
return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;
};
scale2.paddingOuter = function(_) {
return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;
};
scale2.align = function(_) {
return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;
};
scale2.copy = function() {
return band(domain(), [r0, r1]).round(round).paddingInner(paddingInner).paddingOuter(paddingOuter).align(align);
};
return initRange.apply(rescale(), arguments);
}
// node_modules/d3-scale/src/constant.js
function constants(x3) {
return function() {
return x3;
};
}
// node_modules/d3-scale/src/number.js
function number3(x3) {
return +x3;
}
// node_modules/d3-scale/src/continuous.js
var unit = [0, 1];
function identity2(x3) {
return x3;
}
function normalize(a2, b) {
return (b -= a2 = +a2) ? function(x3) {
return (x3 - a2) / b;
} : constants(isNaN(b) ? NaN : 0.5);
}
function clamper(a2, b) {
var t;
if (a2 > b) t = a2, a2 = b, b = t;
return function(x3) {
return Math.max(a2, Math.min(b, x3));
};
}
function bimap(domain, range2, interpolate) {
var d0 = domain[0], d1 = domain[1], r0 = range2[0], r1 = range2[1];
if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
return function(x3) {
return r0(d0(x3));
};
}
function polymap(domain, range2, interpolate) {
var j = Math.min(domain.length, range2.length) - 1, d = new Array(j), r = new Array(j), i = -1;
if (domain[j] < domain[0]) {
domain = domain.slice().reverse();
range2 = range2.slice().reverse();
}
while (++i < j) {
d[i] = normalize(domain[i], domain[i + 1]);
r[i] = interpolate(range2[i], range2[i + 1]);
}
return function(x3) {
var i2 = bisect_default(domain, x3, 1, j) - 1;
return r[i2](d[i2](x3));
};
}
function copy(source, target) {
return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown());
}
function transformer() {
var domain = unit, range2 = unit, interpolate = value_default, transform, untransform, unknown, clamp = identity2, piecewise2, output, input;
function rescale() {
var n = Math.min(domain.length, range2.length);
if (clamp !== identity2) clamp = clamper(domain[0], domain[n - 1]);
piecewise2 = n > 2 ? polymap : bimap;
output = input = null;
return scale2;
}
function scale2(x3) {
return x3 == null || isNaN(x3 = +x3) ? unknown : (output || (output = piecewise2(domain.map(transform), range2, interpolate)))(transform(clamp(x3)));
}
scale2.invert = function(y3) {
return clamp(untransform((input || (input = piecewise2(range2, domain.map(transform), number_default)))(y3)));
};
scale2.domain = function(_) {
return arguments.length ? (domain = Array.from(_, number3), rescale()) : domain.slice();
};
scale2.range = function(_) {
return arguments.length ? (range2 = Array.from(_), rescale()) : range2.slice();
};
scale2.rangeRound = function(_) {
return range2 = Array.from(_), interpolate = round_default, rescale();
};
scale2.clamp = function(_) {
return arguments.length ? (clamp = _ ? true : identity2, rescale()) : clamp !== identity2;
};
scale2.interpolate = function(_) {
return arguments.length ? (interpolate = _, rescale()) : interpolate;
};
scale2.unknown = function(_) {
return arguments.length ? (unknown = _, scale2) : unknown;
};
return function(t, u4) {
transform = t, untransform = u4;
return rescale();
};
}
function continuous() {
return transformer()(identity2, identity2);
}
// node_modules/d3-format/src/formatDecimal.js
function formatDecimal_default(x3) {
return Math.abs(x3 = Math.round(x3)) >= 1e21 ? x3.toLocaleString("en").replace(/,/g, "") : x3.toString(10);
}
function formatDecimalParts(x3, p) {
if ((i = (x3 = p ? x3.toExponential(p - 1) : x3.toExponential()).indexOf("e")) < 0) return null;
var i, coefficient = x3.slice(0, i);
return [
coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
+x3.slice(i + 1)
];
}
// node_modules/d3-format/src/exponent.js
function exponent_default(x3) {
return x3 = formatDecimalParts(Math.abs(x3)), x3 ? x3[1] : NaN;
}
// node_modules/d3-format/src/formatGroup.js
function formatGroup_default(grouping, thousands) {
return function(value, width) {
var i = value.length, t = [], j = 0, g = grouping[0], length2 = 0;
while (i > 0 && g > 0) {
if (length2 + g + 1 > width) g = Math.max(1, width - length2);
t.push(value.substring(i -= g, i + g));
if ((length2 += g + 1) > width) break;
g = grouping[j = (j + 1) % grouping.length];
}
return t.reverse().join(thousands);
};
}
// node_modules/d3-format/src/formatNumerals.js
function formatNumerals_default(numerals) {
return function(value) {
return value.replace(/[0-9]/g, function(i) {
return numerals[+i];
});
};
}
// node_modules/d3-format/src/formatSpecifier.js
var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
function formatSpecifier(specifier) {
if (!(match2 = re.exec(specifier))) throw new Error("invalid format: " + specifier);
var match2;
return new FormatSpecifier({
fill: match2[1],
align: match2[2],
sign: match2[3],
symbol: match2[4],
zero: match2[5],
width: match2[6],
comma: match2[7],
precision: match2[8] && match2[8].slice(1),
trim: match2[9],
type: match2[10]
});
}
formatSpecifier.prototype = FormatSpecifier.prototype;
function FormatSpecifier(specifier) {
this.fill = specifier.fill === void 0 ? " " : specifier.fill + "";
this.align = specifier.align === void 0 ? ">" : specifier.align + "";
this.sign = specifier.sign === void 0 ? "-" : specifier.sign + "";
this.symbol = specifier.symbol === void 0 ? "" : specifier.symbol + "";
this.zero = !!specifier.zero;
this.width = specifier.width === void 0 ? void 0 : +specifier.width;
this.comma = !!specifier.comma;
this.precision = specifier.precision === void 0 ? void 0 : +specifier.precision;
this.trim = !!specifier.trim;
this.type = specifier.type === void 0 ? "" : specifier.type + "";
}
FormatSpecifier.prototype.toString = function() {
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
};
// node_modules/d3-format/src/formatTrim.js
function formatTrim_default(s2) {
out: for (var n = s2.length, i = 1, i0 = -1, i1; i < n; ++i) {
switch (s2[i]) {
case ".":
i0 = i1 = i;
break;
case "0":
if (i0 === 0) i0 = i;
i1 = i;
break;
default:
if (!+s2[i]) break out;
if (i0 > 0) i0 = 0;
break;
}
}
return i0 > 0 ? s2.slice(0, i0) + s2.slice(i1 + 1) : s2;
}
// node_modules/d3-format/src/formatPrefixAuto.js
var prefixExponent;
function formatPrefixAuto_default(x3, p) {
var d = formatDecimalParts(x3, p);
if (!d) return x3 + "";
var coefficient = d[0], exponent = d[1], i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, n = coefficient.length;
return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimalParts(x3, Math.max(0, p + i - 1))[0];
}
// node_modules/d3-format/src/formatRounded.js
function formatRounded_default(x3, p) {
var d = formatDecimalParts(x3, p);
if (!d) return x3 + "";
var coefficient = d[0], exponent = d[1];
return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join("0");
}
// node_modules/d3-format/src/formatTypes.js
var formatTypes_default = {
"%": (x3, p) => (x3 * 100).toFixed(p),
"b": (x3) => Math.round(x3).toString(2),
"c": (x3) => x3 + "",
"d": formatDecimal_default,
"e": (x3, p) => x3.toExponential(p),
"f": (x3, p) => x3.toFixed(p),
"g": (x3, p) => x3.toPrecision(p),
"o": (x3) => Math.round(x3).toString(8),
"p": (x3, p) => formatRounded_default(x3 * 100, p),
"r": formatRounded_default,
"s": formatPrefixAuto_default,
"X": (x3) => Math.round(x3).toString(16).toUpperCase(),
"x": (x3) => Math.round(x3).toString(16)
};
// node_modules/d3-format/src/identity.js
function identity_default2(x3) {
return x3;
}
// node_modules/d3-format/src/locale.js
var map3 = Array.prototype.map;
var prefixes = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
function locale_default(locale3) {
var group2 = locale3.grouping === void 0 || locale3.thousands === void 0 ? identity_default2 : formatGroup_default(map3.call(locale3.grouping, Number), locale3.thousands + ""), currencyPrefix = locale3.currency === void 0 ? "" : locale3.currency[0] + "", currencySuffix = locale3.currency === void 0 ? "" : locale3.currency[1] + "", decimal = locale3.decimal === void 0 ? "." : locale3.decimal + "", numerals = locale3.numerals === void 0 ? identity_default2 : formatNumerals_default(map3.call(locale3.numerals, String)), percent = locale3.percent === void 0 ? "%" : locale3.percent + "", minus = locale3.minus === void 0 ? "−" : locale3.minus + "", nan = locale3.nan === void 0 ? "NaN" : locale3.nan + "";
function newFormat(specifier) {
specifier = formatSpecifier(specifier);
var fill = specifier.fill, align = specifier.align, sign3 = specifier.sign, symbol = specifier.symbol, zero2 = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim2 = specifier.trim, type3 = specifier.type;
if (type3 === "n") comma = true, type3 = "g";
else if (!formatTypes_default[type3]) precision === void 0 && (precision = 12), trim2 = true, type3 = "g";
if (zero2 || fill === "0" && align === "=") zero2 = true, fill = "0", align = "=";
var prefix2 = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type3) ? "0" + type3.toLowerCase() : "", suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type3) ? percent : "";
var formatType = formatTypes_default[type3], maybeSuffix = /[defgprs%]/.test(type3);
precision = precision === void 0 ? 6 : /[gprs]/.test(type3) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
function format3(value) {
var valuePrefix = prefix2, valueSuffix = suffix, i, n, c3;
if (type3 === "c") {
valueSuffix = formatType(value) + valueSuffix;
value = "";
} else {
value = +value;
var valueNegative = value < 0 || 1 / value < 0;
value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
if (trim2) value = formatTrim_default(value);
if (valueNegative && +value === 0 && sign3 !== "+") valueNegative = false;
valuePrefix = (valueNegative ? sign3 === "(" ? sign3 : minus : sign3 === "-" || sign3 === "(" ? "" : sign3) + valuePrefix;
valueSuffix = (type3 === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign3 === "(" ? ")" : "");
if (maybeSuffix) {
i = -1, n = value.length;
while (++i < n) {
if (c3 = value.charCodeAt(i), 48 > c3 || c3 > 57) {
valueSuffix = (c3 === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
value = value.slice(0, i);
break;
}
}
}
}
if (comma && !zero2) value = group2(value, Infinity);
var length2 = valuePrefix.length + value.length + valueSuffix.length, padding = length2 < width ? new Array(width - length2 + 1).join(fill) : "";
if (comma && zero2) value = group2(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
switch (align) {
case "<":
value = valuePrefix + value + valueSuffix + padding;
break;
case "=":
value = valuePrefix + padding + value + valueSuffix;
break;
case "^":
value = padding.slice(0, length2 = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length2);
break;
default:
value = padding + valuePrefix + value + valueSuffix;
break;
}
return numerals(value);
}
format3.toString = function() {
return specifier + "";
};
return format3;
}
function formatPrefix2(specifier, value) {
var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), e = Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3, k2 = Math.pow(10, -e), prefix2 = prefixes[8 + e / 3];
return function(value2) {
return f(k2 * value2) + prefix2;
};
}
return {
format: newFormat,
formatPrefix: formatPrefix2
};
}
// node_modules/d3-format/src/defaultLocale.js
var locale;
var format;
var formatPrefix;
defaultLocale({
thousands: ",",
grouping: [3],
currency: ["$", ""]
});
function defaultLocale(definition) {
locale = locale_default(definition);
format = locale.format;
formatPrefix = locale.formatPrefix;
return locale;
}
// node_modules/d3-format/src/precisionFixed.js
function precisionFixed_default(step) {
return Math.max(0, -exponent_default(Math.abs(step)));
}
// node_modules/d3-format/src/precisionPrefix.js
function precisionPrefix_default(step, value) {
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3 - exponent_default(Math.abs(step)));
}
// node_modules/d3-format/src/precisionRound.js
function precisionRound_default(step, max5) {
step = Math.abs(step), max5 = Math.abs(max5) - step;
return Math.max(0, exponent_default(max5) - exponent_default(step)) + 1;
}
// node_modules/d3-scale/src/tickFormat.js
function tickFormat(start, stop, count3, specifier) {
var step = tickStep(start, stop, count3), precision;
specifier = formatSpecifier(specifier == null ? ",f" : specifier);
switch (specifier.type) {
case "s": {
var value = Math.max(Math.abs(start), Math.abs(stop));
if (specifier.precision == null && !isNaN(precision = precisionPrefix_default(step, value))) specifier.precision = precision;
return formatPrefix(specifier, value);
}
case "":
case "e":
case "g":
case "p":
case "r": {
if (specifier.precision == null && !isNaN(precision = precisionRound_default(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
break;
}
case "f":
case "%": {
if (specifier.precision == null && !isNaN(precision = precisionFixed_default(step))) specifier.precision = precision - (specifier.type === "%") * 2;
break;
}
}
return format(specifier);
}
// node_modules/d3-scale/src/linear.js
function linearish(scale2) {
var domain = scale2.domain;
scale2.ticks = function(count3) {
var d = domain();
return ticks(d[0], d[d.length - 1], count3 == null ? 10 : count3);
};
scale2.tickFormat = function(count3, specifier) {
var d = domain();
return tickFormat(d[0], d[d.length - 1], count3 == null ? 10 : count3, specifier);
};
scale2.nice = function(count3) {
if (count3 == null) count3 = 10;
var d = domain();
var i0 = 0;
var i1 = d.length - 1;
var start = d[i0];
var stop = d[i1];
var prestep;
var step;
var maxIter = 10;
if (stop < start) {
step = start, start = stop, stop = step;
step = i0, i0 = i1, i1 = step;
}
while (maxIter-- > 0) {
step = tickIncrement(start, stop, count3);
if (step === prestep) {
d[i0] = start;
d[i1] = stop;
return domain(d);
} else if (step > 0) {
start = Math.floor(start / step) * step;
stop = Math.ceil(stop / step) * step;
} else if (step < 0) {
start = Math.ceil(start * step) / step;
stop = Math.floor(stop * step) / step;
} else {
break;
}
prestep = step;
}
return scale2;
};
return scale2;
}
function linear() {
var scale2 = continuous();
scale2.copy = function() {
return copy(scale2, linear());
};
initRange.apply(scale2, arguments);
return linearish(scale2);
}
// node_modules/d3-time/src/interval.js
var t0 = /* @__PURE__ */ new Date();
var t1 = /* @__PURE__ */ new Date();
function timeInterval(floori, offseti, count3, field) {
function interval(date2) {
return floori(date2 = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+date2)), date2;
}
interval.floor = (date2) => {
return floori(date2 = /* @__PURE__ */ new Date(+date2)), date2;
};
interval.ceil = (date2) => {
return floori(date2 = new Date(date2 - 1)), offseti(date2, 1), floori(date2), date2;
};
interval.round = (date2) => {
const d0 = interval(date2), d1 = interval.ceil(date2);
return date2 - d0 < d1 - date2 ? d0 : d1;
};
interval.offset = (date2, step) => {
return offseti(date2 = /* @__PURE__ */ new Date(+date2), step == null ? 1 : Math.floor(step)), date2;
};
interval.range = (start, stop, step) => {
const range2 = [];
start = interval.ceil(start);
step = step == null ? 1 : Math.floor(step);
if (!(start < stop) || !(step > 0)) return range2;
let previous;
do
range2.push(previous = /* @__PURE__ */ new Date(+start)), offseti(start, step), floori(start);
while (previous < start && start < stop);
return range2;
};
interval.filter = (test) => {
return timeInterval((date2) => {
if (date2 >= date2) while (floori(date2), !test(date2)) date2.setTime(date2 - 1);
}, (date2, step) => {
if (date2 >= date2) {
if (step < 0) while (++step <= 0) {
while (offseti(date2, -1), !test(date2)) {
}
}
else while (--step >= 0) {
while (offseti(date2, 1), !test(date2)) {
}
}
}
});
};
if (count3) {
interval.count = (start, end) => {
t0.setTime(+start), t1.setTime(+end);
floori(t0), floori(t1);
return Math.floor(count3(t0, t1));
};
interval.every = (step) => {
step = Math.floor(step);
return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? (d) => field(d) % step === 0 : (d) => interval.count(0, d) % step === 0);
};
}
return interval;
}
// node_modules/d3-time/src/millisecond.js
var millisecond = timeInterval(() => {
}, (date2, step) => {
date2.setTime(+date2 + step);
}, (start, end) => {
return end - start;
});
millisecond.every = (k2) => {
k2 = Math.floor(k2);
if (!isFinite(k2) || !(k2 > 0)) return null;
if (!(k2 > 1)) return millisecond;
return timeInterval((date2) => {
date2.setTime(Math.floor(date2 / k2) * k2);
}, (date2, step) => {
date2.setTime(+date2 + step * k2);
}, (start, end) => {
return (end - start) / k2;
});
};
var milliseconds = millisecond.range;
// node_modules/d3-time/src/duration.js
var durationSecond = 1e3;
var durationMinute = durationSecond * 60;
var durationHour = durationMinute * 60;
var durationDay = durationHour * 24;
var durationWeek = durationDay * 7;
var durationMonth = durationDay * 30;
var durationYear = durationDay * 365;
// node_modules/d3-time/src/second.js
var second = timeInterval((date2) => {
date2.setTime(date2 - date2.getMilliseconds());
}, (date2, step) => {
date2.setTime(+date2 + step * durationSecond);
}, (start, end) => {
return (end - start) / durationSecond;
}, (date2) => {
return date2.getUTCSeconds();
});
var seconds = second.range;
// node_modules/d3-time/src/minute.js
var timeMinute = timeInterval((date2) => {
date2.setTime(date2 - date2.getMilliseconds() - date2.getSeconds() * durationSecond);
}, (date2, step) => {
date2.setTime(+date2 + step * durationMinute);
}, (start, end) => {
return (end - start) / durationMinute;
}, (date2) => {
return date2.getMinutes();
});
var timeMinutes = timeMinute.range;
var utcMinute = timeInterval((date2) => {
date2.setUTCSeconds(0, 0);
}, (date2, step) => {
date2.setTime(+date2 + step * durationMinute);
}, (start, end) => {
return (end - start) / durationMinute;
}, (date2) => {
return date2.getUTCMinutes();
});
var utcMinutes = utcMinute.range;
// node_modules/d3-time/src/hour.js
var timeHour = timeInterval((date2) => {
date2.setTime(date2 - date2.getMilliseconds() - date2.getSeconds() * durationSecond - date2.getMinutes() * durationMinute);
}, (date2, step) => {
date2.setTime(+date2 + step * durationHour);
}, (start, end) => {
return (end - start) / durationHour;
}, (date2) => {
return date2.getHours();
});
var timeHours = timeHour.range;
var utcHour = timeInterval((date2) => {
date2.setUTCMinutes(0, 0, 0);
}, (date2, step) => {
date2.setTime(+date2 + step * durationHour);
}, (start, end) => {
return (end - start) / durationHour;
}, (date2) => {
return date2.getUTCHours();
});
var utcHours = utcHour.range;
// node_modules/d3-time/src/day.js
var timeDay = timeInterval(
(date2) => date2.setHours(0, 0, 0, 0),
(date2, step) => date2.setDate(date2.getDate() + step),
(start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,
(date2) => date2.getDate() - 1
);
var timeDays = timeDay.range;
var utcDay = timeInterval((date2) => {
date2.setUTCHours(0, 0, 0, 0);
}, (date2, step) => {
date2.setUTCDate(date2.getUTCDate() + step);
}, (start, end) => {
return (end - start) / durationDay;
}, (date2) => {
return date2.getUTCDate() - 1;
});
var utcDays = utcDay.range;
var unixDay = timeInterval((date2) => {
date2.setUTCHours(0, 0, 0, 0);
}, (date2, step) => {
date2.setUTCDate(date2.getUTCDate() + step);
}, (start, end) => {
return (end - start) / durationDay;
}, (date2) => {
return Math.floor(date2 / durationDay);
});
var unixDays = unixDay.range;
// node_modules/d3-time/src/week.js
function timeWeekday(i) {
return timeInterval((date2) => {
date2.setDate(date2.getDate() - (date2.getDay() + 7 - i) % 7);
date2.setHours(0, 0, 0, 0);
}, (date2, step) => {
date2.setDate(date2.getDate() + step * 7);
}, (start, end) => {
return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;
});
}
var timeSunday = timeWeekday(0);
var timeMonday = timeWeekday(1);
var timeTuesday = timeWeekday(2);
var timeWednesday = timeWeekday(3);
var timeThursday = timeWeekday(4);
var timeFriday = timeWeekday(5);
var timeSaturday = timeWeekday(6);
var timeSundays = timeSunday.range;
var timeMondays = timeMonday.range;
var timeTuesdays = timeTuesday.range;
var timeWednesdays = timeWednesday.range;
var timeThursdays = timeThursday.range;
var timeFridays = timeFriday.range;
var timeSaturdays = timeSaturday.range;
function utcWeekday(i) {
return timeInterval((date2) => {
date2.setUTCDate(date2.getUTCDate() - (date2.getUTCDay() + 7 - i) % 7);
date2.setUTCHours(0, 0, 0, 0);
}, (date2, step) => {
date2.setUTCDate(date2.getUTCDate() + step * 7);
}, (start, end) => {
return (end - start) / durationWeek;
});
}
var utcSunday = utcWeekday(0);
var utcMonday = utcWeekday(1);
var utcTuesday = utcWeekday(2);
var utcWednesday = utcWeekday(3);
var utcThursday = utcWeekday(4);
var utcFriday = utcWeekday(5);
var utcSaturday = utcWeekday(6);
var utcSundays = utcSunday.range;
var utcMondays = utcMonday.range;
var utcTuesdays = utcTuesday.range;
var utcWednesdays = utcWednesday.range;
var utcThursdays = utcThursday.range;
var utcFridays = utcFriday.range;
var utcSaturdays = utcSaturday.range;
// node_modules/d3-time/src/month.js
var timeMonth = timeInterval((date2) => {
date2.setDate(1);
date2.setHours(0, 0, 0, 0);
}, (date2, step) => {
date2.setMonth(date2.getMonth() + step);
}, (start, end) => {
return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;
}, (date2) => {
return date2.getMonth();
});
var timeMonths = timeMonth.range;
var utcMonth = timeInterval((date2) => {
date2.setUTCDate(1);
date2.setUTCHours(0, 0, 0, 0);
}, (date2, step) => {
date2.setUTCMonth(date2.getUTCMonth() + step);
}, (start, end) => {
return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;
}, (date2) => {
return date2.getUTCMonth();
});
var utcMonths = utcMonth.range;
// node_modules/d3-time/src/year.js
var timeYear = timeInterval((date2) => {
date2.setMonth(0, 1);
date2.setHours(0, 0, 0, 0);
}, (date2, step) => {
date2.setFullYear(date2.getFullYear() + step);
}, (start, end) => {
return end.getFullYear() - start.getFullYear();
}, (date2) => {
return date2.getFullYear();
});
timeYear.every = (k2) => {
return !isFinite(k2 = Math.floor(k2)) || !(k2 > 0) ? null : timeInterval((date2) => {
date2.setFullYear(Math.floor(date2.getFullYear() / k2) * k2);
date2.setMonth(0, 1);
date2.setHours(0, 0, 0, 0);
}, (date2, step) => {
date2.setFullYear(date2.getFullYear() + step * k2);
});
};
var timeYears = timeYear.range;
var utcYear = timeInterval((date2) => {
date2.setUTCMonth(0, 1);
date2.setUTCHours(0, 0, 0, 0);
}, (date2, step) => {
date2.setUTCFullYear(date2.getUTCFullYear() + step);
}, (start, end) => {
return end.getUTCFullYear() - start.getUTCFullYear();
}, (date2) => {
return date2.getUTCFullYear();
});
utcYear.every = (k2) => {
return !isFinite(k2 = Math.floor(k2)) || !(k2 > 0) ? null : timeInterval((date2) => {
date2.setUTCFullYear(Math.floor(date2.getUTCFullYear() / k2) * k2);
date2.setUTCMonth(0, 1);
date2.setUTCHours(0, 0, 0, 0);
}, (date2, step) => {
date2.setUTCFullYear(date2.getUTCFullYear() + step * k2);
});
};
var utcYears = utcYear.range;
// node_modules/d3-time/src/ticks.js
function ticker(year, month, week, day, hour, minute) {
const tickIntervals = [
[second, 1, durationSecond],
[second, 5, 5 * durationSecond],
[second, 15, 15 * durationSecond],
[second, 30, 30 * durationSecond],
[minute, 1, durationMinute],
[minute, 5, 5 * durationMinute],
[minute, 15, 15 * durationMinute],
[minute, 30, 30 * durationMinute],
[hour, 1, durationHour],
[hour, 3, 3 * durationHour],
[hour, 6, 6 * durationHour],
[hour, 12, 12 * durationHour],
[day, 1, durationDay],
[day, 2, 2 * durationDay],
[week, 1, durationWeek],
[month, 1, durationMonth],
[month, 3, 3 * durationMonth],
[year, 1, durationYear]
];
function ticks2(start, stop, count3) {
const reverse2 = stop < start;
if (reverse2) [start, stop] = [stop, start];
const interval = count3 && typeof count3.range === "function" ? count3 : tickInterval(start, stop, count3);
const ticks3 = interval ? interval.range(start, +stop + 1) : [];
return reverse2 ? ticks3.reverse() : ticks3;
}
function tickInterval(start, stop, count3) {
const target = Math.abs(stop - start) / count3;
const i = bisector(([, , step2]) => step2).right(tickIntervals, target);
if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count3));
if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count3), 1));
const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
return t.every(step);
}
return [ticks2, tickInterval];
}
var [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);
var [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);
// node_modules/d3-time-format/src/locale.js
function localDate(d) {
if (0 <= d.y && d.y < 100) {
var date2 = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);
date2.setFullYear(d.y);
return date2;
}
return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);
}
function utcDate(d) {
if (0 <= d.y && d.y < 100) {
var date2 = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));
date2.setUTCFullYear(d.y);
return date2;
}
return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));
}
function newDate(y3, m, d) {
return { y: y3, m, d, H: 0, M: 0, S: 0, L: 0 };
}
function formatLocale(locale3) {
var locale_dateTime = locale3.dateTime, locale_date = locale3.date, locale_time = locale3.time, locale_periods = locale3.periods, locale_weekdays = locale3.days, locale_shortWeekdays = locale3.shortDays, locale_months = locale3.months, locale_shortMonths = locale3.shortMonths;
var periodRe = formatRe(locale_periods), periodLookup = formatLookup(locale_periods), weekdayRe = formatRe(locale_weekdays), weekdayLookup = formatLookup(locale_weekdays), shortWeekdayRe = formatRe(locale_shortWeekdays), shortWeekdayLookup = formatLookup(locale_shortWeekdays), monthRe = formatRe(locale_months), monthLookup = formatLookup(locale_months), shortMonthRe = formatRe(locale_shortMonths), shortMonthLookup = formatLookup(locale_shortMonths);
var formats = {
"a": formatShortWeekday,
"A": formatWeekday,
"b": formatShortMonth,
"B": formatMonth,
"c": null,
"d": formatDayOfMonth,
"e": formatDayOfMonth,
"f": formatMicroseconds,
"g": formatYearISO,
"G": formatFullYearISO,
"H": formatHour24,
"I": formatHour12,
"j": formatDayOfYear,
"L": formatMilliseconds,
"m": formatMonthNumber,
"M": formatMinutes,
"p": formatPeriod,
"q": formatQuarter,
"Q": formatUnixTimestamp,
"s": formatUnixTimestampSeconds,
"S": formatSeconds,
"u": formatWeekdayNumberMonday,
"U": formatWeekNumberSunday,
"V": formatWeekNumberISO,
"w": formatWeekdayNumberSunday,
"W": formatWeekNumberMonday,
"x": null,
"X": null,
"y": formatYear,
"Y": formatFullYear,
"Z": formatZone,
"%": formatLiteralPercent
};
var utcFormats = {
"a": formatUTCShortWeekday,
"A": formatUTCWeekday,
"b": formatUTCShortMonth,
"B": formatUTCMonth,
"c": null,
"d": formatUTCDayOfMonth,
"e": formatUTCDayOfMonth,
"f": formatUTCMicroseconds,
"g": formatUTCYearISO,
"G": formatUTCFullYearISO,
"H": formatUTCHour24,
"I": formatUTCHour12,
"j": formatUTCDayOfYear,
"L": formatUTCMilliseconds,
"m": formatUTCMonthNumber,
"M": formatUTCMinutes,
"p": formatUTCPeriod,
"q": formatUTCQuarter,
"Q": formatUnixTimestamp,
"s": formatUnixTimestampSeconds,
"S": formatUTCSeconds,
"u": formatUTCWeekdayNumberMonday,
"U": formatUTCWeekNumberSunday,
"V": formatUTCWeekNumberISO,
"w": formatUTCWeekdayNumberSunday,
"W": formatUTCWeekNumberMonday,
"x": null,
"X": null,
"y": formatUTCYear,
"Y": formatUTCFullYear,
"Z": formatUTCZone,
"%": formatLiteralPercent
};
var parses = {
"a": parseShortWeekday,
"A": parseWeekday,
"b": parseShortMonth,
"B": parseMonth,
"c": parseLocaleDateTime,
"d": parseDayOfMonth,
"e": parseDayOfMonth,
"f": parseMicroseconds,
"g": parseYear,
"G": parseFullYear,
"H": parseHour24,
"I": parseHour24,
"j": parseDayOfYear,
"L": parseMilliseconds,
"m": parseMonthNumber,
"M": parseMinutes,
"p": parsePeriod,
"q": parseQuarter,
"Q": parseUnixTimestamp,
"s": parseUnixTimestampSeconds,
"S": parseSeconds,
"u": parseWeekdayNumberMonday,
"U": parseWeekNumberSunday,
"V": parseWeekNumberISO,
"w": parseWeekdayNumberSunday,
"W": parseWeekNumberMonday,
"x": parseLocaleDate,
"X": parseLocaleTime,
"y": parseYear,
"Y": parseFullYear,
"Z": parseZone,
"%": parseLiteralPercent
};
formats.x = newFormat(locale_date, formats);
formats.X = newFormat(locale_time, formats);
formats.c = newFormat(locale_dateTime, formats);
utcFormats.x = newFormat(locale_date, utcFormats);
utcFormats.X = newFormat(locale_time, utcFormats);
utcFormats.c = newFormat(locale_dateTime, utcFormats);
function newFormat(specifier, formats2) {
return function(date2) {
var string = [], i = -1, j = 0, n = specifier.length, c3, pad3, format3;
if (!(date2 instanceof Date)) date2 = /* @__PURE__ */ new Date(+date2);
while (++i < n) {
if (specifier.charCodeAt(i) === 37) {
string.push(specifier.slice(j, i));
if ((pad3 = pads[c3 = specifier.charAt(++i)]) != null) c3 = specifier.charAt(++i);
else pad3 = c3 === "e" ? " " : "0";
if (format3 = formats2[c3]) c3 = format3(date2, pad3);
string.push(c3);
j = i + 1;
}
}
string.push(specifier.slice(j, i));
return string.join("");
};
}
function newParse(specifier, Z) {
return function(string) {
var d = newDate(1900, void 0, 1), i = parseSpecifier(d, specifier, string += "", 0), week, day;
if (i != string.length) return null;
if ("Q" in d) return new Date(d.Q);
if ("s" in d) return new Date(d.s * 1e3 + ("L" in d ? d.L : 0));
if (Z && !("Z" in d)) d.Z = 0;
if ("p" in d) d.H = d.H % 12 + d.p * 12;
if (d.m === void 0) d.m = "q" in d ? d.q : 0;
if ("V" in d) {
if (d.V < 1 || d.V > 53) return null;
if (!("w" in d)) d.w = 1;
if ("Z" in d) {
week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();
week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);
week = utcDay.offset(week, (d.V - 1) * 7);
d.y = week.getUTCFullYear();
d.m = week.getUTCMonth();
d.d = week.getUTCDate() + (d.w + 6) % 7;
} else {
week = localDate(newDate(d.y, 0, 1)), day = week.getDay();
week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);
week = timeDay.offset(week, (d.V - 1) * 7);
d.y = week.getFullYear();
d.m = week.getMonth();
d.d = week.getDate() + (d.w + 6) % 7;
}
} else if ("W" in d || "U" in d) {
if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();
d.m = 0;
d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;
}
if ("Z" in d) {
d.H += d.Z / 100 | 0;
d.M += d.Z % 100;
return utcDate(d);
}
return localDate(d);
};
}
function parseSpecifier(d, specifier, string, j) {
var i = 0, n = specifier.length, m = string.length, c3, parse3;
while (i < n) {
if (j >= m) return -1;
c3 = specifier.charCodeAt(i++);
if (c3 === 37) {
c3 = specifier.charAt(i++);
parse3 = parses[c3 in pads ? specifier.charAt(i++) : c3];
if (!parse3 || (j = parse3(d, string, j)) < 0) return -1;
} else if (c3 != string.charCodeAt(j++)) {
return -1;
}
}
return j;
}
function parsePeriod(d, string, i) {
var n = periodRe.exec(string.slice(i));
return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
}
function parseShortWeekday(d, string, i) {
var n = shortWeekdayRe.exec(string.slice(i));
return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
}
function parseWeekday(d, string, i) {
var n = weekdayRe.exec(string.slice(i));
return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
}
function parseShortMonth(d, string, i) {
var n = shortMonthRe.exec(string.slice(i));
return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
}
function parseMonth(d, string, i) {
var n = monthRe.exec(string.slice(i));
return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;
}
function parseLocaleDateTime(d, string, i) {
return parseSpecifier(d, locale_dateTime, string, i);
}
function parseLocaleDate(d, string, i) {
return parseSpecifier(d, locale_date, string, i);
}
function parseLocaleTime(d, string, i) {
return parseSpecifier(d, locale_time, string, i);
}
function formatShortWeekday(d) {
return locale_shortWeekdays[d.getDay()];
}
function formatWeekday(d) {
return locale_weekdays[d.getDay()];
}
function formatShortMonth(d) {
return locale_shortMonths[d.getMonth()];
}
function formatMonth(d) {
return locale_months[d.getMonth()];
}
function formatPeriod(d) {
return locale_periods[+(d.getHours() >= 12)];
}
function formatQuarter(d) {
return 1 + ~~(d.getMonth() / 3);
}
function formatUTCShortWeekday(d) {
return locale_shortWeekdays[d.getUTCDay()];
}
function formatUTCWeekday(d) {
return locale_weekdays[d.getUTCDay()];
}
function formatUTCShortMonth(d) {
return locale_shortMonths[d.getUTCMonth()];
}
function formatUTCMonth(d) {
return locale_months[d.getUTCMonth()];
}
function formatUTCPeriod(d) {
return locale_periods[+(d.getUTCHours() >= 12)];
}
function formatUTCQuarter(d) {
return 1 + ~~(d.getUTCMonth() / 3);
}
return {
format: function(specifier) {
var f = newFormat(specifier += "", formats);
f.toString = function() {
return specifier;
};
return f;
},
parse: function(specifier) {
var p = newParse(specifier += "", false);
p.toString = function() {
return specifier;
};
return p;
},
utcFormat: function(specifier) {
var f = newFormat(specifier += "", utcFormats);
f.toString = function() {
return specifier;
};
return f;
},
utcParse: function(specifier) {
var p = newParse(specifier += "", true);
p.toString = function() {
return specifier;
};
return p;
}
};
}
var pads = { "-": "", "_": " ", "0": "0" };
var numberRe = /^\s*\d+/;
var percentRe = /^%/;
var requoteRe = /[\\^$*+?|[\]().{}]/g;
function pad(value, fill, width) {
var sign3 = value < 0 ? "-" : "", string = (sign3 ? -value : value) + "", length2 = string.length;
return sign3 + (length2 < width ? new Array(width - length2 + 1).join(fill) + string : string);
}
function requote(s2) {
return s2.replace(requoteRe, "\\$&");
}
function formatRe(names) {
return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i");
}
function formatLookup(names) {
return new Map(names.map((name, i) => [name.toLowerCase(), i]));
}
function parseWeekdayNumberSunday(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 1));
return n ? (d.w = +n[0], i + n[0].length) : -1;
}
function parseWeekdayNumberMonday(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 1));
return n ? (d.u = +n[0], i + n[0].length) : -1;
}
function parseWeekNumberSunday(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.U = +n[0], i + n[0].length) : -1;
}
function parseWeekNumberISO(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.V = +n[0], i + n[0].length) : -1;
}
function parseWeekNumberMonday(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.W = +n[0], i + n[0].length) : -1;
}
function parseFullYear(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 4));
return n ? (d.y = +n[0], i + n[0].length) : -1;
}
function parseYear(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), i + n[0].length) : -1;
}
function parseZone(d, string, i) {
var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6));
return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
}
function parseQuarter(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 1));
return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;
}
function parseMonthNumber(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.m = n[0] - 1, i + n[0].length) : -1;
}
function parseDayOfMonth(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.d = +n[0], i + n[0].length) : -1;
}
function parseDayOfYear(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 3));
return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;
}
function parseHour24(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.H = +n[0], i + n[0].length) : -1;
}
function parseMinutes(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.M = +n[0], i + n[0].length) : -1;
}
function parseSeconds(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 2));
return n ? (d.S = +n[0], i + n[0].length) : -1;
}
function parseMilliseconds(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 3));
return n ? (d.L = +n[0], i + n[0].length) : -1;
}
function parseMicroseconds(d, string, i) {
var n = numberRe.exec(string.slice(i, i + 6));
return n ? (d.L = Math.floor(n[0] / 1e3), i + n[0].length) : -1;
}
function parseLiteralPercent(d, string, i) {
var n = percentRe.exec(string.slice(i, i + 1));
return n ? i + n[0].length : -1;
}
function parseUnixTimestamp(d, string, i) {
var n = numberRe.exec(string.slice(i));
return n ? (d.Q = +n[0], i + n[0].length) : -1;
}
function parseUnixTimestampSeconds(d, string, i) {
var n = numberRe.exec(string.slice(i));
return n ? (d.s = +n[0], i + n[0].length) : -1;
}
function formatDayOfMonth(d, p) {
return pad(d.getDate(), p, 2);
}
function formatHour24(d, p) {
return pad(d.getHours(), p, 2);
}
function formatHour12(d, p) {
return pad(d.getHours() % 12 || 12, p, 2);
}
function formatDayOfYear(d, p) {
return pad(1 + timeDay.count(timeYear(d), d), p, 3);
}
function formatMilliseconds(d, p) {
return pad(d.getMilliseconds(), p, 3);
}
function formatMicroseconds(d, p) {
return formatMilliseconds(d, p) + "000";
}
function formatMonthNumber(d, p) {
return pad(d.getMonth() + 1, p, 2);
}
function formatMinutes(d, p) {
return pad(d.getMinutes(), p, 2);
}
function formatSeconds(d, p) {
return pad(d.getSeconds(), p, 2);
}
function formatWeekdayNumberMonday(d) {
var day = d.getDay();
return day === 0 ? 7 : day;
}
function formatWeekNumberSunday(d, p) {
return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);
}
function dISO(d) {
var day = d.getDay();
return day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);
}
function formatWeekNumberISO(d, p) {
d = dISO(d);
return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);
}
function formatWeekdayNumberSunday(d) {
return d.getDay();
}
function formatWeekNumberMonday(d, p) {
return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);
}
function formatYear(d, p) {
return pad(d.getFullYear() % 100, p, 2);
}
function formatYearISO(d, p) {
d = dISO(d);
return pad(d.getFullYear() % 100, p, 2);
}
function formatFullYear(d, p) {
return pad(d.getFullYear() % 1e4, p, 4);
}
function formatFullYearISO(d, p) {
var day = d.getDay();
d = day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);
return pad(d.getFullYear() % 1e4, p, 4);
}
function formatZone(d) {
var z = d.getTimezoneOffset();
return (z > 0 ? "-" : (z *= -1, "+")) + pad(z / 60 | 0, "0", 2) + pad(z % 60, "0", 2);
}
function formatUTCDayOfMonth(d, p) {
return pad(d.getUTCDate(), p, 2);
}
function formatUTCHour24(d, p) {
return pad(d.getUTCHours(), p, 2);
}
function formatUTCHour12(d, p) {
return pad(d.getUTCHours() % 12 || 12, p, 2);
}
function formatUTCDayOfYear(d, p) {
return pad(1 + utcDay.count(utcYear(d), d), p, 3);
}
function formatUTCMilliseconds(d, p) {
return pad(d.getUTCMilliseconds(), p, 3);
}
function formatUTCMicroseconds(d, p) {
return formatUTCMilliseconds(d, p) + "000";
}
function formatUTCMonthNumber(d, p) {
return pad(d.getUTCMonth() + 1, p, 2);
}
function formatUTCMinutes(d, p) {
return pad(d.getUTCMinutes(), p, 2);
}
function formatUTCSeconds(d, p) {
return pad(d.getUTCSeconds(), p, 2);
}
function formatUTCWeekdayNumberMonday(d) {
var dow = d.getUTCDay();
return dow === 0 ? 7 : dow;
}
function formatUTCWeekNumberSunday(d, p) {
return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);
}
function UTCdISO(d) {
var day = d.getUTCDay();
return day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);
}
function formatUTCWeekNumberISO(d, p) {
d = UTCdISO(d);
return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);
}
function formatUTCWeekdayNumberSunday(d) {
return d.getUTCDay();
}
function formatUTCWeekNumberMonday(d, p) {
return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);
}
function formatUTCYear(d, p) {
return pad(d.getUTCFullYear() % 100, p, 2);
}
function formatUTCYearISO(d, p) {
d = UTCdISO(d);
return pad(d.getUTCFullYear() % 100, p, 2);
}
function formatUTCFullYear(d, p) {
return pad(d.getUTCFullYear() % 1e4, p, 4);
}
function formatUTCFullYearISO(d, p) {
var day = d.getUTCDay();
d = day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);
return pad(d.getUTCFullYear() % 1e4, p, 4);
}
function formatUTCZone() {
return "+0000";
}
function formatLiteralPercent() {
return "%";
}
function formatUnixTimestamp(d) {
return +d;
}
function formatUnixTimestampSeconds(d) {
return Math.floor(+d / 1e3);
}
// node_modules/d3-time-format/src/defaultLocale.js
var locale2;
var timeFormat;
var timeParse;
var utcFormat;
var utcParse;
defaultLocale2({
dateTime: "%x, %X",
date: "%-m/%-d/%Y",
time: "%-I:%M:%S %p",
periods: ["AM", "PM"],
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
});
function defaultLocale2(definition) {
locale2 = formatLocale(definition);
timeFormat = locale2.format;
timeParse = locale2.parse;
utcFormat = locale2.utcFormat;
utcParse = locale2.utcParse;
return locale2;
}
// node_modules/d3-time-format/src/isoFormat.js
var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ";
function formatIsoNative(date2) {
return date2.toISOString();
}
var formatIso = Date.prototype.toISOString ? formatIsoNative : utcFormat(isoSpecifier);
// node_modules/d3-time-format/src/isoParse.js
function parseIsoNative(string) {
var date2 = new Date(string);
return isNaN(date2) ? null : date2;
}
var parseIso = +/* @__PURE__ */ new Date("2000-01-01T00:00:00.000Z") ? parseIsoNative : utcParse(isoSpecifier);
// node_modules/d3-scale/src/nice.js
function nice2(domain, interval) {
domain = domain.slice();
var i0 = 0, i1 = domain.length - 1, x02 = domain[i0], x12 = domain[i1], t;
if (x12 < x02) {
t = i0, i0 = i1, i1 = t;
t = x02, x02 = x12, x12 = t;
}
domain[i0] = interval.floor(x02);
domain[i1] = interval.ceil(x12);
return domain;
}
// node_modules/d3-scale/src/time.js
function date(t) {
return new Date(t);
}
function number4(t) {
return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
}
function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format3) {
var scale2 = continuous(), invert2 = scale2.invert, domain = scale2.domain;
var formatMillisecond = format3(".%L"), formatSecond = format3(":%S"), formatMinute = format3("%I:%M"), formatHour = format3("%I %p"), formatDay = format3("%a %d"), formatWeek = format3("%b %d"), formatMonth = format3("%B"), formatYear3 = format3("%Y");
function tickFormat2(date2) {
return (second2(date2) < date2 ? formatMillisecond : minute(date2) < date2 ? formatSecond : hour(date2) < date2 ? formatMinute : day(date2) < date2 ? formatHour : month(date2) < date2 ? week(date2) < date2 ? formatDay : formatWeek : year(date2) < date2 ? formatMonth : formatYear3)(date2);
}
scale2.invert = function(y3) {
return new Date(invert2(y3));
};
scale2.domain = function(_) {
return arguments.length ? domain(Array.from(_, number4)) : domain().map(date);
};
scale2.ticks = function(interval) {
var d = domain();
return ticks2(d[0], d[d.length - 1], interval == null ? 10 : interval);
};
scale2.tickFormat = function(count3, specifier) {
return specifier == null ? tickFormat2 : format3(specifier);
};
scale2.nice = function(interval) {
var d = domain();
if (!interval || typeof interval.range !== "function") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);
return interval ? domain(nice2(d, interval)) : scale2;
};
scale2.copy = function() {
return copy(scale2, calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format3));
};
return scale2;
}
function time() {
return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute, second, timeFormat).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
}
// node_modules/d3-scale-chromatic/src/colors.js
function colors_default(specifier) {
var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;
while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6);
return colors;
}
// node_modules/d3-scale-chromatic/src/categorical/Tableau10.js
var Tableau10_default = colors_default("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
// node_modules/d3-scale-chromatic/src/categorical/category10.js
var category10_default = colors_default("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");
// node_modules/d3-scale-chromatic/src/categorical/Accent.js
var Accent_default = colors_default("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");
// node_modules/d3-scale-chromatic/src/categorical/Dark2.js
var Dark2_default = colors_default("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");
// node_modules/d3-scale-chromatic/src/categorical/observable10.js
var observable10_default = colors_default("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0");
// node_modules/d3-scale-chromatic/src/categorical/Paired.js
var Paired_default = colors_default("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");
// node_modules/d3-scale-chromatic/src/categorical/Pastel1.js
var Pastel1_default = colors_default("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");
// node_modules/d3-scale-chromatic/src/categorical/Pastel2.js
var Pastel2_default = colors_default("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");
// node_modules/d3-scale-chromatic/src/categorical/Set1.js
var Set1_default = colors_default("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");
// node_modules/d3-scale-chromatic/src/categorical/Set2.js
var Set2_default = colors_default("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");
// node_modules/d3-scale-chromatic/src/categorical/Set3.js
var Set3_default = colors_default("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");
// node_modules/d3-scale-chromatic/src/ramp.js
var ramp_default = (scheme28) => rgbBasis(scheme28[scheme28.length - 1]);
// node_modules/d3-scale-chromatic/src/diverging/BrBG.js
var scheme = new Array(3).concat(
"d8b365f5f5f55ab4ac",
"a6611adfc27d80cdc1018571",
"a6611adfc27df5f5f580cdc1018571",
"8c510ad8b365f6e8c3c7eae55ab4ac01665e",
"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e",
"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e",
"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e",
"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30",
"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30"
).map(colors_default);
var BrBG_default = ramp_default(scheme);
// node_modules/d3-scale-chromatic/src/diverging/PRGn.js
var scheme2 = new Array(3).concat(
"af8dc3f7f7f77fbf7b",
"7b3294c2a5cfa6dba0008837",
"7b3294c2a5cff7f7f7a6dba0008837",
"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837",
"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837",
"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837",
"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837",
"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b",
"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b"
).map(colors_default);
var PRGn_default = ramp_default(scheme2);
// node_modules/d3-scale-chromatic/src/diverging/PiYG.js
var scheme3 = new Array(3).concat(
"e9a3c9f7f7f7a1d76a",
"d01c8bf1b6dab8e1864dac26",
"d01c8bf1b6daf7f7f7b8e1864dac26",
"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221",
"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221",
"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221",
"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221",
"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419",
"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419"
).map(colors_default);
var PiYG_default = ramp_default(scheme3);
// node_modules/d3-scale-chromatic/src/diverging/PuOr.js
var scheme4 = new Array(3).concat(
"998ec3f7f7f7f1a340",
"5e3c99b2abd2fdb863e66101",
"5e3c99b2abd2f7f7f7fdb863e66101",
"542788998ec3d8daebfee0b6f1a340b35806",
"542788998ec3d8daebf7f7f7fee0b6f1a340b35806",
"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806",
"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806",
"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08",
"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08"
).map(colors_default);
var PuOr_default = ramp_default(scheme4);
// node_modules/d3-scale-chromatic/src/diverging/RdBu.js
var scheme5 = new Array(3).concat(
"ef8a62f7f7f767a9cf",
"ca0020f4a58292c5de0571b0",
"ca0020f4a582f7f7f792c5de0571b0",
"b2182bef8a62fddbc7d1e5f067a9cf2166ac",
"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac",
"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac",
"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac",
"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061",
"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061"
).map(colors_default);
var RdBu_default = ramp_default(scheme5);
// node_modules/d3-scale-chromatic/src/diverging/RdGy.js
var scheme6 = new Array(3).concat(
"ef8a62ffffff999999",
"ca0020f4a582bababa404040",
"ca0020f4a582ffffffbababa404040",
"b2182bef8a62fddbc7e0e0e09999994d4d4d",
"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d",
"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d",
"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d",
"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a",
"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a"
).map(colors_default);
var RdGy_default = ramp_default(scheme6);
// node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js
var scheme7 = new Array(3).concat(
"fc8d59ffffbf91bfdb",
"d7191cfdae61abd9e92c7bb6",
"d7191cfdae61ffffbfabd9e92c7bb6",
"d73027fc8d59fee090e0f3f891bfdb4575b4",
"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4",
"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4",
"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4",
"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695",
"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695"
).map(colors_default);
var RdYlBu_default = ramp_default(scheme7);
// node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js
var scheme8 = new Array(3).concat(
"fc8d59ffffbf91cf60",
"d7191cfdae61a6d96a1a9641",
"d7191cfdae61ffffbfa6d96a1a9641",
"d73027fc8d59fee08bd9ef8b91cf601a9850",
"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850",
"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850",
"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850",
"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837",
"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837"
).map(colors_default);
var RdYlGn_default = ramp_default(scheme8);
// node_modules/d3-scale-chromatic/src/diverging/Spectral.js
var scheme9 = new Array(3).concat(
"fc8d59ffffbf99d594",
"d7191cfdae61abdda42b83ba",
"d7191cfdae61ffffbfabdda42b83ba",
"d53e4ffc8d59fee08be6f59899d5943288bd",
"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd",
"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd",
"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd",
"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2",
"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2"
).map(colors_default);
var Spectral_default = ramp_default(scheme9);
// node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js
var scheme10 = new Array(3).concat(
"e5f5f999d8c92ca25f",
"edf8fbb2e2e266c2a4238b45",
"edf8fbb2e2e266c2a42ca25f006d2c",
"edf8fbccece699d8c966c2a42ca25f006d2c",
"edf8fbccece699d8c966c2a441ae76238b45005824",
"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824",
"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b"
).map(colors_default);
var BuGn_default = ramp_default(scheme10);
// node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js
var scheme11 = new Array(3).concat(
"e0ecf49ebcda8856a7",
"edf8fbb3cde38c96c688419d",
"edf8fbb3cde38c96c68856a7810f7c",
"edf8fbbfd3e69ebcda8c96c68856a7810f7c",
"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b",
"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b",
"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b"
).map(colors_default);
var BuPu_default = ramp_default(scheme11);
// node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js
var scheme12 = new Array(3).concat(
"e0f3dba8ddb543a2ca",
"f0f9e8bae4bc7bccc42b8cbe",
"f0f9e8bae4bc7bccc443a2ca0868ac",
"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac",
"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e",
"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e",
"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081"
).map(colors_default);
var GnBu_default = ramp_default(scheme12);
// node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js
var scheme13 = new Array(3).concat(
"fee8c8fdbb84e34a33",
"fef0d9fdcc8afc8d59d7301f",
"fef0d9fdcc8afc8d59e34a33b30000",
"fef0d9fdd49efdbb84fc8d59e34a33b30000",
"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000",
"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000",
"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000"
).map(colors_default);
var OrRd_default = ramp_default(scheme13);
// node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js
var scheme14 = new Array(3).concat(
"ece2f0a6bddb1c9099",
"f6eff7bdc9e167a9cf02818a",
"f6eff7bdc9e167a9cf1c9099016c59",
"f6eff7d0d1e6a6bddb67a9cf1c9099016c59",
"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450",
"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450",
"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636"
).map(colors_default);
var PuBuGn_default = ramp_default(scheme14);
// node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js
var scheme15 = new Array(3).concat(
"ece7f2a6bddb2b8cbe",
"f1eef6bdc9e174a9cf0570b0",
"f1eef6bdc9e174a9cf2b8cbe045a8d",
"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d",
"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b",
"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b",
"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858"
).map(colors_default);
var PuBu_default = ramp_default(scheme15);
// node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js
var scheme16 = new Array(3).concat(
"e7e1efc994c7dd1c77",
"f1eef6d7b5d8df65b0ce1256",
"f1eef6d7b5d8df65b0dd1c77980043",
"f1eef6d4b9dac994c7df65b0dd1c77980043",
"f1eef6d4b9dac994c7df65b0e7298ace125691003f",
"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f",
"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f"
).map(colors_default);
var PuRd_default = ramp_default(scheme16);
// node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js
var scheme17 = new Array(3).concat(
"fde0ddfa9fb5c51b8a",
"feebe2fbb4b9f768a1ae017e",
"feebe2fbb4b9f768a1c51b8a7a0177",
"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177",
"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177",
"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177",
"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a"
).map(colors_default);
var RdPu_default = ramp_default(scheme17);
// node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js
var scheme18 = new Array(3).concat(
"edf8b17fcdbb2c7fb8",
"ffffcca1dab441b6c4225ea8",
"ffffcca1dab441b6c42c7fb8253494",
"ffffccc7e9b47fcdbb41b6c42c7fb8253494",
"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84",
"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84",
"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58"
).map(colors_default);
var YlGnBu_default = ramp_default(scheme18);
// node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js
var scheme19 = new Array(3).concat(
"f7fcb9addd8e31a354",
"ffffccc2e69978c679238443",
"ffffccc2e69978c67931a354006837",
"ffffccd9f0a3addd8e78c67931a354006837",
"ffffccd9f0a3addd8e78c67941ab5d238443005a32",
"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32",
"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529"
).map(colors_default);
var YlGn_default = ramp_default(scheme19);
// node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js
var scheme20 = new Array(3).concat(
"fff7bcfec44fd95f0e",
"ffffd4fed98efe9929cc4c02",
"ffffd4fed98efe9929d95f0e993404",
"ffffd4fee391fec44ffe9929d95f0e993404",
"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04",
"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04",
"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506"
).map(colors_default);
var YlOrBr_default = ramp_default(scheme20);
// node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js
var scheme21 = new Array(3).concat(
"ffeda0feb24cf03b20",
"ffffb2fecc5cfd8d3ce31a1c",
"ffffb2fecc5cfd8d3cf03b20bd0026",
"ffffb2fed976feb24cfd8d3cf03b20bd0026",
"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026",
"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026",
"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026"
).map(colors_default);
var YlOrRd_default = ramp_default(scheme21);
// node_modules/d3-scale-chromatic/src/sequential-single/Blues.js
var scheme22 = new Array(3).concat(
"deebf79ecae13182bd",
"eff3ffbdd7e76baed62171b5",
"eff3ffbdd7e76baed63182bd08519c",
"eff3ffc6dbef9ecae16baed63182bd08519c",
"eff3ffc6dbef9ecae16baed64292c62171b5084594",
"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594",
"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b"
).map(colors_default);
var Blues_default = ramp_default(scheme22);
// node_modules/d3-scale-chromatic/src/sequential-single/Greens.js
var scheme23 = new Array(3).concat(
"e5f5e0a1d99b31a354",
"edf8e9bae4b374c476238b45",
"edf8e9bae4b374c47631a354006d2c",
"edf8e9c7e9c0a1d99b74c47631a354006d2c",
"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32",
"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32",
"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b"
).map(colors_default);
var Greens_default = ramp_default(scheme23);
// node_modules/d3-scale-chromatic/src/sequential-single/Greys.js
var scheme24 = new Array(3).concat(
"f0f0f0bdbdbd636363",
"f7f7f7cccccc969696525252",
"f7f7f7cccccc969696636363252525",
"f7f7f7d9d9d9bdbdbd969696636363252525",
"f7f7f7d9d9d9bdbdbd969696737373525252252525",
"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525",
"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000"
).map(colors_default);
var Greys_default = ramp_default(scheme24);
// node_modules/d3-scale-chromatic/src/sequential-single/Purples.js
var scheme25 = new Array(3).concat(
"efedf5bcbddc756bb1",
"f2f0f7cbc9e29e9ac86a51a3",
"f2f0f7cbc9e29e9ac8756bb154278f",
"f2f0f7dadaebbcbddc9e9ac8756bb154278f",
"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486",
"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486",
"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d"
).map(colors_default);
var Purples_default = ramp_default(scheme25);
// node_modules/d3-scale-chromatic/src/sequential-single/Reds.js
var scheme26 = new Array(3).concat(
"fee0d2fc9272de2d26",
"fee5d9fcae91fb6a4acb181d",
"fee5d9fcae91fb6a4ade2d26a50f15",
"fee5d9fcbba1fc9272fb6a4ade2d26a50f15",
"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d",
"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d",
"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d"
).map(colors_default);
var Reds_default = ramp_default(scheme26);
// node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js
var scheme27 = new Array(3).concat(
"fee6cefdae6be6550d",
"feeddefdbe85fd8d3cd94701",
"feeddefdbe85fd8d3ce6550da63603",
"feeddefdd0a2fdae6bfd8d3ce6550da63603",
"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04",
"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04",
"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704"
).map(colors_default);
var Oranges_default = ramp_default(scheme27);
// node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js
var cubehelix_default = cubehelixLong(cubehelix(300, 0.5, 0), cubehelix(-240, 0.5, 1));
// node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js
var warm = cubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.5, 0.8));
var cool = cubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.5, 0.8));
var c = cubehelix();
// node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js
var c2 = rgb();
var pi_1_3 = Math.PI / 3;
var pi_2_3 = Math.PI * 2 / 3;
// node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js
function ramp(range2) {
var n = range2.length;
return function(t) {
return range2[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
};
}
var viridis_default = ramp(colors_default("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));
var magma = ramp(colors_default("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));
var inferno = ramp(colors_default("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));
var plasma = ramp(colors_default("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));
// node_modules/d3-shape/src/constant.js
function constant_default(x3) {
return function constant3() {
return x3;
};
}
// node_modules/d3-shape/src/math.js
var abs = Math.abs;
var atan2 = Math.atan2;
var cos = Math.cos;
var max2 = Math.max;
var min2 = Math.min;
var sin = Math.sin;
var sqrt2 = Math.sqrt;
var epsilon2 = 1e-12;
var pi = Math.PI;
var halfPi = pi / 2;
var tau = 2 * pi;
function acos(x3) {
return x3 > 1 ? 0 : x3 < -1 ? pi : Math.acos(x3);
}
function asin(x3) {
return x3 >= 1 ? halfPi : x3 <= -1 ? -halfPi : Math.asin(x3);
}
// node_modules/d3-path/src/path.js
var pi2 = Math.PI;
var tau2 = 2 * pi2;
var epsilon3 = 1e-6;
var tauEpsilon = tau2 - epsilon3;
function append(strings) {
this._ += strings[0];
for (let i = 1, n = strings.length; i < n; ++i) {
this._ += arguments[i] + strings[i];
}
}
function appendRound(digits) {
let d = Math.floor(digits);
if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);
if (d > 15) return append;
const k2 = 10 ** d;
return function(strings) {
this._ += strings[0];
for (let i = 1, n = strings.length; i < n; ++i) {
this._ += Math.round(arguments[i] * k2) / k2 + strings[i];
}
};
}
var Path = class {
constructor(digits) {
this._x0 = this._y0 = // start of current subpath
this._x1 = this._y1 = null;
this._ = "";
this._append = digits == null ? append : appendRound(digits);
}
moveTo(x3, y3) {
this._append`M${this._x0 = this._x1 = +x3},${this._y0 = this._y1 = +y3}`;
}
closePath() {
if (this._x1 !== null) {
this._x1 = this._x0, this._y1 = this._y0;
this._append`Z`;
}
}
lineTo(x3, y3) {
this._append`L${this._x1 = +x3},${this._y1 = +y3}`;
}
quadraticCurveTo(x12, y1, x3, y3) {
this._append`Q${+x12},${+y1},${this._x1 = +x3},${this._y1 = +y3}`;
}
bezierCurveTo(x12, y1, x22, y22, x3, y3) {
this._append`C${+x12},${+y1},${+x22},${+y22},${this._x1 = +x3},${this._y1 = +y3}`;
}
arcTo(x12, y1, x22, y22, r) {
x12 = +x12, y1 = +y1, x22 = +x22, y22 = +y22, r = +r;
if (r < 0) throw new Error(`negative radius: ${r}`);
let x02 = this._x1, y0 = this._y1, x21 = x22 - x12, y21 = y22 - y1, x01 = x02 - x12, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01;
if (this._x1 === null) {
this._append`M${this._x1 = x12},${this._y1 = y1}`;
} else if (!(l01_2 > epsilon3)) ;
else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon3) || !r) {
this._append`L${this._x1 = x12},${this._y1 = y1}`;
} else {
let x20 = x22 - x02, y20 = y22 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi2 - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21;
if (Math.abs(t01 - 1) > epsilon3) {
this._append`L${x12 + t01 * x01},${y1 + t01 * y01}`;
}
this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x12 + t21 * x21},${this._y1 = y1 + t21 * y21}`;
}
}
arc(x3, y3, r, a0, a1, ccw) {
x3 = +x3, y3 = +y3, r = +r, ccw = !!ccw;
if (r < 0) throw new Error(`negative radius: ${r}`);
let dx = r * Math.cos(a0), dy = r * Math.sin(a0), x02 = x3 + dx, y0 = y3 + dy, cw = 1 ^ ccw, da2 = ccw ? a0 - a1 : a1 - a0;
if (this._x1 === null) {
this._append`M${x02},${y0}`;
} else if (Math.abs(this._x1 - x02) > epsilon3 || Math.abs(this._y1 - y0) > epsilon3) {
this._append`L${x02},${y0}`;
}
if (!r) return;
if (da2 < 0) da2 = da2 % tau2 + tau2;
if (da2 > tauEpsilon) {
this._append`A${r},${r},0,1,${cw},${x3 - dx},${y3 - dy}A${r},${r},0,1,${cw},${this._x1 = x02},${this._y1 = y0}`;
} else if (da2 > epsilon3) {
this._append`A${r},${r},0,${+(da2 >= pi2)},${cw},${this._x1 = x3 + r * Math.cos(a1)},${this._y1 = y3 + r * Math.sin(a1)}`;
}
}
rect(x3, y3, w, h) {
this._append`M${this._x0 = this._x1 = +x3},${this._y0 = this._y1 = +y3}h${w = +w}v${+h}h${-w}Z`;
}
toString() {
return this._;
}
};
function path() {
return new Path();
}
path.prototype = Path.prototype;
// node_modules/d3-shape/src/path.js
function withPath(shape) {
let digits = 3;
shape.digits = function(_) {
if (!arguments.length) return digits;
if (_ == null) {
digits = null;
} else {
const d = Math.floor(_);
if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
digits = d;
}
return shape;
};
return () => new Path(digits);
}
// node_modules/d3-shape/src/arc.js
function arcInnerRadius(d) {
return d.innerRadius;
}
function arcOuterRadius(d) {
return d.outerRadius;
}
function arcStartAngle(d) {
return d.startAngle;
}
function arcEndAngle(d) {
return d.endAngle;
}
function arcPadAngle(d) {
return d && d.padAngle;
}
function intersect(x02, y0, x12, y1, x22, y22, x3, y3) {
var x10 = x12 - x02, y10 = y1 - y0, x32 = x3 - x22, y32 = y3 - y22, t = y32 * x10 - x32 * y10;
if (t * t < epsilon2) return;
t = (x32 * (y0 - y22) - y32 * (x02 - x22)) / t;
return [x02 + t * x10, y0 + t * y10];
}
function cornerTangents(x02, y0, x12, y1, r1, rc, cw) {
var x01 = x02 - x12, y01 = y0 - y1, lo = (cw ? rc : -rc) / sqrt2(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x02 + ox, y11 = y0 + oy, x10 = x12 + ox, y10 = y1 + oy, x00 = (x11 + x10) / 2, y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r = r1 - rc, D2 = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * sqrt2(max2(0, r * r * d2 - D2 * D2)), cx0 = (D2 * dy - dx * d) / d2, cy0 = (-D2 * dx - dy * d) / d2, cx1 = (D2 * dy + dx * d) / d2, cy1 = (-D2 * dx + dy * d) / d2, dx0 = cx0 - x00, dy0 = cy0 - y00, dx1 = cx1 - x00, dy1 = cy1 - y00;
if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;
return {
cx: cx0,
cy: cy0,
x01: -ox,
y01: -oy,
x11: cx0 * (r1 / r - 1),
y11: cy0 * (r1 / r - 1)
};
}
function arc_default() {
var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = constant_default(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null, path2 = withPath(arc);
function arc() {
var buffer, r, r0 = +innerRadius.apply(this, arguments), r1 = +outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) - halfPi, a1 = endAngle.apply(this, arguments) - halfPi, da2 = abs(a1 - a0), cw = a1 > a0;
if (!context) context = buffer = path2();
if (r1 < r0) r = r1, r1 = r0, r0 = r;
if (!(r1 > epsilon2)) context.moveTo(0, 0);
else if (da2 > tau - epsilon2) {
context.moveTo(r1 * cos(a0), r1 * sin(a0));
context.arc(0, 0, r1, a0, a1, !cw);
if (r0 > epsilon2) {
context.moveTo(r0 * cos(a1), r0 * sin(a1));
context.arc(0, 0, r0, a1, a0, cw);
}
} else {
var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da2, da1 = da2, ap = padAngle.apply(this, arguments) / 2, rp = ap > epsilon2 && (padRadius ? +padRadius.apply(this, arguments) : sqrt2(r0 * r0 + r1 * r1)), rc = min2(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t02, t12;
if (rp > epsilon2) {
var p0 = asin(rp / r0 * sin(ap)), p1 = asin(rp / r1 * sin(ap));
if ((da0 -= p0 * 2) > epsilon2) p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0;
else da0 = 0, a00 = a10 = (a0 + a1) / 2;
if ((da1 -= p1 * 2) > epsilon2) p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1;
else da1 = 0, a01 = a11 = (a0 + a1) / 2;
}
var x01 = r1 * cos(a01), y01 = r1 * sin(a01), x10 = r0 * cos(a10), y10 = r0 * sin(a10);
if (rc > epsilon2) {
var x11 = r1 * cos(a11), y11 = r1 * sin(a11), x00 = r0 * cos(a00), y00 = r0 * sin(a00), oc;
if (da2 < pi) {
if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {
var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt2(ax * ax + ay * ay) * sqrt2(bx * bx + by * by))) / 2), lc = sqrt2(oc[0] * oc[0] + oc[1] * oc[1]);
rc0 = min2(rc, (r0 - lc) / (kc - 1));
rc1 = min2(rc, (r1 - lc) / (kc + 1));
} else {
rc0 = rc1 = 0;
}
}
}
if (!(da1 > epsilon2)) context.moveTo(x01, y01);
else if (rc1 > epsilon2) {
t02 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
t12 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
context.moveTo(t02.cx + t02.x01, t02.cy + t02.y01);
if (rc1 < rc) context.arc(t02.cx, t02.cy, rc1, atan2(t02.y01, t02.x01), atan2(t12.y01, t12.x01), !cw);
else {
context.arc(t02.cx, t02.cy, rc1, atan2(t02.y01, t02.x01), atan2(t02.y11, t02.x11), !cw);
context.arc(0, 0, r1, atan2(t02.cy + t02.y11, t02.cx + t02.x11), atan2(t12.cy + t12.y11, t12.cx + t12.x11), !cw);
context.arc(t12.cx, t12.cy, rc1, atan2(t12.y11, t12.x11), atan2(t12.y01, t12.x01), !cw);
}
} else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
if (!(r0 > epsilon2) || !(da0 > epsilon2)) context.lineTo(x10, y10);
else if (rc0 > epsilon2) {
t02 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
t12 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
context.lineTo(t02.cx + t02.x01, t02.cy + t02.y01);
if (rc0 < rc) context.arc(t02.cx, t02.cy, rc0, atan2(t02.y01, t02.x01), atan2(t12.y01, t12.x01), !cw);
else {
context.arc(t02.cx, t02.cy, rc0, atan2(t02.y01, t02.x01), atan2(t02.y11, t02.x11), !cw);
context.arc(0, 0, r0, atan2(t02.cy + t02.y11, t02.cx + t02.x11), atan2(t12.cy + t12.y11, t12.cx + t12.x11), cw);
context.arc(t12.cx, t12.cy, rc0, atan2(t12.y11, t12.x11), atan2(t12.y01, t12.x01), !cw);
}
} else context.arc(0, 0, r0, a10, a00, cw);
}
context.closePath();
if (buffer) return context = null, buffer + "" || null;
}
arc.centroid = function() {
var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a2 = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;
return [cos(a2) * r, sin(a2) * r];
};
arc.innerRadius = function(_) {
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant_default(+_), arc) : innerRadius;
};
arc.outerRadius = function(_) {
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant_default(+_), arc) : outerRadius;
};
arc.cornerRadius = function(_) {
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant_default(+_), arc) : cornerRadius;
};
arc.padRadius = function(_) {
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant_default(+_), arc) : padRadius;
};
arc.startAngle = function(_) {
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant_default(+_), arc) : startAngle;
};
arc.endAngle = function(_) {
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant_default(+_), arc) : endAngle;
};
arc.padAngle = function(_) {
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant_default(+_), arc) : padAngle;
};
arc.context = function(_) {
return arguments.length ? (context = _ == null ? null : _, arc) : context;
};
return arc;
}
// node_modules/d3-shape/src/curve/linear.js
function Linear(context) {
this._context = context;
}
Linear.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x3, y3) {
x3 = +x3, y3 = +y3;
switch (this._point) {
case 0:
this._point = 1;
this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3);
break;
case 1:
this._point = 2;
default:
this._context.lineTo(x3, y3);
break;
}
}
};
function linear_default(context) {
return new Linear(context);
}
// node_modules/d3-shape/src/array.js
var slice2 = Array.prototype.slice;
function array_default(x3) {
return typeof x3 === "object" && "length" in x3 ? x3 : Array.from(x3);
}
// node_modules/d3-shape/src/point.js
function x(p) {
return p[0];
}
function y(p) {
return p[1];
}
// node_modules/d3-shape/src/line.js
function line_default(x3, y3) {
var defined = constant_default(true), context = null, curve = linear_default, output = null, path2 = withPath(line2);
x3 = typeof x3 === "function" ? x3 : x3 === void 0 ? x : constant_default(x3);
y3 = typeof y3 === "function" ? y3 : y3 === void 0 ? y : constant_default(y3);
function line2(data) {
var i, n = (data = array_default(data)).length, d, defined0 = false, buffer;
if (context == null) output = curve(buffer = path2());
for (i = 0; i <= n; ++i) {
if (!(i < n && defined(d = data[i], i, data)) === defined0) {
if (defined0 = !defined0) output.lineStart();
else output.lineEnd();
}
if (defined0) output.point(+x3(d, i, data), +y3(d, i, data));
}
if (buffer) return output = null, buffer + "" || null;
}
line2.x = function(_) {
return arguments.length ? (x3 = typeof _ === "function" ? _ : constant_default(+_), line2) : x3;
};
line2.y = function(_) {
return arguments.length ? (y3 = typeof _ === "function" ? _ : constant_default(+_), line2) : y3;
};
line2.defined = function(_) {
return arguments.length ? (defined = typeof _ === "function" ? _ : constant_default(!!_), line2) : defined;
};
line2.curve = function(_) {
return arguments.length ? (curve = _, context != null && (output = curve(context)), line2) : curve;
};
line2.context = function(_) {
return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line2) : context;
};
return line2;
}
// node_modules/d3-shape/src/descending.js
function descending_default(a2, b) {
return b < a2 ? -1 : b > a2 ? 1 : b >= a2 ? 0 : NaN;
}
// node_modules/d3-shape/src/identity.js
function identity_default3(d) {
return d;
}
// node_modules/d3-shape/src/pie.js
function pie_default() {
var value = identity_default3, sortValues = descending_default, sort2 = null, startAngle = constant_default(0), endAngle = constant_default(tau), padAngle = constant_default(0);
function pie2(data) {
var i, n = (data = array_default(data)).length, j, k2, sum4 = 0, index2 = new Array(n), arcs = new Array(n), a0 = +startAngle.apply(this, arguments), da2 = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)), a1, p = Math.min(Math.abs(da2) / n, padAngle.apply(this, arguments)), pa = p * (da2 < 0 ? -1 : 1), v2;
for (i = 0; i < n; ++i) {
if ((v2 = arcs[index2[i] = i] = +value(data[i], i, data)) > 0) {
sum4 += v2;
}
}
if (sortValues != null) index2.sort(function(i2, j2) {
return sortValues(arcs[i2], arcs[j2]);
});
else if (sort2 != null) index2.sort(function(i2, j2) {
return sort2(data[i2], data[j2]);
});
for (i = 0, k2 = sum4 ? (da2 - n * pa) / sum4 : 0; i < n; ++i, a0 = a1) {
j = index2[i], v2 = arcs[j], a1 = a0 + (v2 > 0 ? v2 * k2 : 0) + pa, arcs[j] = {
data: data[j],
index: i,
value: v2,
startAngle: a0,
endAngle: a1,
padAngle: p
};
}
return arcs;
}
pie2.value = function(_) {
return arguments.length ? (value = typeof _ === "function" ? _ : constant_default(+_), pie2) : value;
};
pie2.sortValues = function(_) {
return arguments.length ? (sortValues = _, sort2 = null, pie2) : sortValues;
};
pie2.sort = function(_) {
return arguments.length ? (sort2 = _, sortValues = null, pie2) : sort2;
};
pie2.startAngle = function(_) {
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant_default(+_), pie2) : startAngle;
};
pie2.endAngle = function(_) {
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant_default(+_), pie2) : endAngle;
};
pie2.padAngle = function(_) {
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant_default(+_), pie2) : padAngle;
};
return pie2;
}
// node_modules/d3-shape/src/curve/basis.js
function point2(that, x3, y3) {
that._context.bezierCurveTo(
(2 * that._x0 + that._x1) / 3,
(2 * that._y0 + that._y1) / 3,
(that._x0 + 2 * that._x1) / 3,
(that._y0 + 2 * that._y1) / 3,
(that._x0 + 4 * that._x1 + x3) / 6,
(that._y0 + 4 * that._y1 + y3) / 6
);
}
function Basis(context) {
this._context = context;
}
Basis.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._y0 = this._y1 = NaN;
this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 3:
point2(this, this._x1, this._y1);
case 2:
this._context.lineTo(this._x1, this._y1);
break;
}
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x3, y3) {
x3 = +x3, y3 = +y3;
switch (this._point) {
case 0:
this._point = 1;
this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3);
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3;
this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
default:
point2(this, x3, y3);
break;
}
this._x0 = this._x1, this._x1 = x3;
this._y0 = this._y1, this._y1 = y3;
}
};
function basis_default(context) {
return new Basis(context);
}
// node_modules/d3-shape/src/curve/radial.js
var curveRadialLinear = curveRadial(linear_default);
function Radial(curve) {
this._curve = curve;
}
Radial.prototype = {
areaStart: function() {
this._curve.areaStart();
},
areaEnd: function() {
this._curve.areaEnd();
},
lineStart: function() {
this._curve.lineStart();
},
lineEnd: function() {
this._curve.lineEnd();
},
point: function(a2, r) {
this._curve.point(r * Math.sin(a2), r * -Math.cos(a2));
}
};
function curveRadial(curve) {
function radial2(context) {
return new Radial(curve(context));
}
radial2._curve = curve;
return radial2;
}
// node_modules/d3-shape/src/curve/bump.js
var Bump = class {
constructor(context, x3) {
this._context = context;
this._x = x3;
}
areaStart() {
this._line = 0;
}
areaEnd() {
this._line = NaN;
}
lineStart() {
this._point = 0;
}
lineEnd() {
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
this._line = 1 - this._line;
}
point(x3, y3) {
x3 = +x3, y3 = +y3;
switch (this._point) {
case 0: {
this._point = 1;
if (this._line) this._context.lineTo(x3, y3);
else this._context.moveTo(x3, y3);
break;
}
case 1:
this._point = 2;
default: {
if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x3) / 2, this._y0, this._x0, y3, x3, y3);
else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y3) / 2, x3, this._y0, x3, y3);
break;
}
}
this._x0 = x3, this._y0 = y3;
}
};
function bumpX(context) {
return new Bump(context, true);
}
function bumpY(context) {
return new Bump(context, false);
}
// node_modules/d3-shape/src/symbol/asterisk.js
var sqrt3 = sqrt2(3);
// node_modules/d3-shape/src/symbol/diamond.js
var tan30 = sqrt2(1 / 3);
var tan30_2 = tan30 * 2;
// node_modules/d3-shape/src/symbol/star.js
var kr = sin(pi / 10) / sin(7 * pi / 10);
var kx = sin(tau / 10) * kr;
var ky = -cos(tau / 10) * kr;
// node_modules/d3-shape/src/symbol/triangle.js
var sqrt32 = sqrt2(3);
// node_modules/d3-shape/src/symbol/triangle2.js
var sqrt33 = sqrt2(3);
// node_modules/d3-shape/src/symbol/wye.js
var s = sqrt2(3) / 2;
var k = 1 / sqrt2(12);
var a = (k / 2 + 1) * 3;
// node_modules/d3-shape/src/noop.js
function noop_default() {
}
// node_modules/d3-shape/src/curve/basisClosed.js
function BasisClosed(context) {
this._context = context;
}
BasisClosed.prototype = {
areaStart: noop_default,
areaEnd: noop_default,
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;
this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 1: {
this._context.moveTo(this._x2, this._y2);
this._context.closePath();
break;
}
case 2: {
this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);
this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);
this._context.closePath();
break;
}
case 3: {
this.point(this._x2, this._y2);
this.point(this._x3, this._y3);
this.point(this._x4, this._y4);
break;
}
}
},
point: function(x3, y3) {
x3 = +x3, y3 = +y3;
switch (this._point) {
case 0:
this._point = 1;
this._x2 = x3, this._y2 = y3;
break;
case 1:
this._point = 2;
this._x3 = x3, this._y3 = y3;
break;
case 2:
this._point = 3;
this._x4 = x3, this._y4 = y3;
this._context.moveTo((this._x0 + 4 * this._x1 + x3) / 6, (this._y0 + 4 * this._y1 + y3) / 6);
break;
default:
point2(this, x3, y3);
break;
}
this._x0 = this._x1, this._x1 = x3;
this._y0 = this._y1, this._y1 = y3;
}
};
function basisClosed_default(context) {
return new BasisClosed(context);
}
// node_modules/d3-shape/src/curve/basisOpen.js
function BasisOpen(context) {
this._context = context;
}
BasisOpen.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._y0 = this._y1 = NaN;
this._point = 0;
},
lineEnd: function() {
if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x3, y3) {
x3 = +x3, y3 = +y3;
switch (this._point) {
case 0:
this._point = 1;
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3;
var x02 = (this._x0 + 4 * this._x1 + x3) / 6, y0 = (this._y0 + 4 * this._y1 + y3) / 6;
this._line ? this._context.lineTo(x02, y0) : this._context.moveTo(x02, y0);
break;
case 3:
this._point = 4;
default:
point2(this, x3, y3);
break;
}
this._x0 = this._x1, this._x1 = x3;
this._y0 = this._y1, this._y1 = y3;
}
};
function basisOpen_default(context) {
return new BasisOpen(context);
}
// node_modules/d3-shape/src/curve/bundle.js
function Bundle(context, beta) {
this._basis = new Basis(context);
this._beta = beta;
}
Bundle.prototype = {
lineStart: function() {
this._x = [];
this._y = [];
this._basis.lineStart();
},
lineEnd: function() {
var x3 = this._x, y3 = this._y, j = x3.length - 1;
if (j > 0) {
var x02 = x3[0], y0 = y3[0], dx = x3[j] - x02, dy = y3[j] - y0, i = -1, t;
while (++i <= j) {
t = i / j;
this._basis.point(
this._beta * x3[i] + (1 - this._beta) * (x02 + t * dx),
this._beta * y3[i] + (1 - this._beta) * (y0 + t * dy)
);
}
}
this._x = this._y = null;
this._basis.lineEnd();
},
point: function(x3, y3) {
this._x.push(+x3);
this._y.push(+y3);
}
};
var bundle_default = function custom(beta) {
function bundle(context) {
return beta === 1 ? new Basis(context) : new Bundle(context, beta);
}
bundle.beta = function(beta2) {
return custom(+beta2);
};
return bundle;
}(0.85);
// node_modules/d3-shape/src/curve/cardinal.js
function point3(that, x3, y3) {
that._context.bezierCurveTo(
that._x1 + that._k * (that._x2 - that._x0),
that._y1 + that._k * (that._y2 - that._y0),
that._x2 + that._k * (that._x1 - x3),
that._y2 + that._k * (that._y1 - y3),
that._x2,
that._y2
);
}
function Cardinal(context, tension) {
this._context = context;
this._k = (1 - tension) / 6;
}
Cardinal.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 2:
this._context.lineTo(this._x2, this._y2);
break;
case 3:
point3(this, this._x1, this._y1);
break;
}
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x3, y3) {
x3 = +x3, y3 = +y3;
switch (this._point) {
case 0:
this._point = 1;
this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3);
break;
case 1:
this._point = 2;
this._x1 = x3, this._y1 = y3;
break;
case 2:
this._point = 3;
default:
point3(this, x3, y3);
break;
}
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3;
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3;
}
};
var cardinal_default = function custom2(tension) {
function cardinal(context) {
return new Cardinal(context, tension);
}
cardinal.tension = function(tension2) {
return custom2(+tension2);
};
return cardinal;
}(0);
// node_modules/d3-shape/src/curve/cardinalClosed.js
function CardinalClosed(context, tension) {
this._context = context;
this._k = (1 - tension) / 6;
}
CardinalClosed.prototype = {
areaStart: noop_default,
areaEnd: noop_default,
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 1: {
this._context.moveTo(this._x3, this._y3);
this._context.closePath();
break;
}
case 2: {
this._context.lineTo(this._x3, this._y3);
this._context.closePath();
break;
}
case 3: {
this.point(this._x3, this._y3);
this.point(this._x4, this._y4);
this.point(this._x5, this._y5);
break;
}
}
},
point: function(x3, y3) {
x3 = +x3, y3 = +y3;
switch (this._point) {
case 0:
this._point = 1;
this._x3 = x3, this._y3 = y3;
break;
case 1:
this._point = 2;
this._context.moveTo(this._x4 = x3, this._y4 = y3);
break;
case 2:
this._point = 3;
this._x5 = x3, this._y5 = y3;
break;
default:
point3(this, x3, y3);
break;
}
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3;
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3;
}
};
var cardinalClosed_default = function custom3(tension) {
function cardinal(context) {
return new CardinalClosed(context, tension);
}
cardinal.tension = function(tension2) {
return custom3(+tension2);
};
return cardinal;
}(0);
// node_modules/d3-shape/src/curve/cardinalOpen.js
function CardinalOpen(context, tension) {
this._context = context;
this._k = (1 - tension) / 6;
}
CardinalOpen.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
this._point = 0;
},
lineEnd: function() {
if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x3, y3) {
x3 = +x3, y3 = +y3;
switch (this._point) {
case 0:
this._point = 1;
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3;
this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
break;
case 3:
this._point = 4;
default:
point3(this, x3, y3);
break;
}
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3;
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3;
}
};
var cardinalOpen_default = function custom4(tension) {
function cardinal(context) {
return new CardinalOpen(context, tension);
}
cardinal.tension = function(tension2) {
return custom4(+tension2);
};
return cardinal;
}(0);
// node_modules/d3-shape/src/curve/catmullRom.js
function point4(that, x3, y3) {
var x12 = that._x1, y1 = that._y1, x22 = that._x2, y22 = that._y2;
if (that._l01_a > epsilon2) {
var a2 = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, n = 3 * that._l01_a * (that._l01_a + that._l12_a);
x12 = (x12 * a2 - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;
y1 = (y1 * a2 - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;
}
if (that._l23_a > epsilon2) {
var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, m = 3 * that._l23_a * (that._l23_a + that._l12_a);
x22 = (x22 * b + that._x1 * that._l23_2a - x3 * that._l12_2a) / m;
y22 = (y22 * b + that._y1 * that._l23_2a - y3 * that._l12_2a) / m;
}
that._context.bezierCurveTo(x12, y1, x22, y22, that._x2, that._y2);
}
function CatmullRom(context, alpha) {
this._context = context;
this._alpha = alpha;
}
CatmullRom.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 2:
this._context.lineTo(this._x2, this._y2);
break;
case 3:
this.point(this._x2, this._y2);
break;
}
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x3, y3) {
x3 = +x3, y3 = +y3;
if (this._point) {
var x23 = this._x2 - x3, y23 = this._y2 - y3;
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
}
switch (this._point) {
case 0:
this._point = 1;
this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3);
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3;
default:
point4(this, x3, y3);
break;
}
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3;
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3;
}
};
var catmullRom_default = function custom5(alpha) {
function catmullRom(context) {
return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);
}
catmullRom.alpha = function(alpha2) {
return custom5(+alpha2);
};
return catmullRom;
}(0.5);
// node_modules/d3-shape/src/curve/catmullRomClosed.js
function CatmullRomClosed(context, alpha) {
this._context = context;
this._alpha = alpha;
}
CatmullRomClosed.prototype = {
areaStart: noop_default,
areaEnd: noop_default,
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 1: {
this._context.moveTo(this._x3, this._y3);
this._context.closePath();
break;
}
case 2: {
this._context.lineTo(this._x3, this._y3);
this._context.closePath();
break;
}
case 3: {
this.point(this._x3, this._y3);
this.point(this._x4, this._y4);
this.point(this._x5, this._y5);
break;
}
}
},
point: function(x3, y3) {
x3 = +x3, y3 = +y3;
if (this._point) {
var x23 = this._x2 - x3, y23 = this._y2 - y3;
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
}
switch (this._point) {
case 0:
this._point = 1;
this._x3 = x3, this._y3 = y3;
break;
case 1:
this._point = 2;
this._context.moveTo(this._x4 = x3, this._y4 = y3);
break;
case 2:
this._point = 3;
this._x5 = x3, this._y5 = y3;
break;
default:
point4(this, x3, y3);
break;
}
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3;
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3;
}
};
var catmullRomClosed_default = function custom6(alpha) {
function catmullRom(context) {
return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);
}
catmullRom.alpha = function(alpha2) {
return custom6(+alpha2);
};
return catmullRom;
}(0.5);
// node_modules/d3-shape/src/curve/catmullRomOpen.js
function CatmullRomOpen(context, alpha) {
this._context = context;
this._alpha = alpha;
}
CatmullRomOpen.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;
this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
},
lineEnd: function() {
if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x3, y3) {
x3 = +x3, y3 = +y3;
if (this._point) {
var x23 = this._x2 - x3, y23 = this._y2 - y3;
this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
}
switch (this._point) {
case 0:
this._point = 1;
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3;
this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);
break;
case 3:
this._point = 4;
default:
point4(this, x3, y3);
break;
}
this._l01_a = this._l12_a, this._l12_a = this._l23_a;
this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
this._x0 = this._x1, this._x1 = this._x2, this._x2 = x3;
this._y0 = this._y1, this._y1 = this._y2, this._y2 = y3;
}
};
var catmullRomOpen_default = function custom7(alpha) {
function catmullRom(context) {
return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);
}
catmullRom.alpha = function(alpha2) {
return custom7(+alpha2);
};
return catmullRom;
}(0.5);
// node_modules/d3-shape/src/curve/linearClosed.js
function LinearClosed(context) {
this._context = context;
}
LinearClosed.prototype = {
areaStart: noop_default,
areaEnd: noop_default,
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
if (this._point) this._context.closePath();
},
point: function(x3, y3) {
x3 = +x3, y3 = +y3;
if (this._point) this._context.lineTo(x3, y3);
else this._point = 1, this._context.moveTo(x3, y3);
}
};
function linearClosed_default(context) {
return new LinearClosed(context);
}
// node_modules/d3-shape/src/curve/monotone.js
function sign(x3) {
return x3 < 0 ? -1 : 1;
}
function slope3(that, x22, y22) {
var h0 = that._x1 - that._x0, h1 = x22 - that._x1, s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), s1 = (y22 - that._y1) / (h1 || h0 < 0 && -0), p = (s0 * h1 + s1 * h0) / (h0 + h1);
return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
}
function slope2(that, t) {
var h = that._x1 - that._x0;
return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
}
function point5(that, t02, t12) {
var x02 = that._x0, y0 = that._y0, x12 = that._x1, y1 = that._y1, dx = (x12 - x02) / 3;
that._context.bezierCurveTo(x02 + dx, y0 + dx * t02, x12 - dx, y1 - dx * t12, x12, y1);
}
function MonotoneX(context) {
this._context = context;
}
MonotoneX.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN;
this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 2:
this._context.lineTo(this._x1, this._y1);
break;
case 3:
point5(this, this._t0, slope2(this, this._t0));
break;
}
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x3, y3) {
var t12 = NaN;
x3 = +x3, y3 = +y3;
if (x3 === this._x1 && y3 === this._y1) return;
switch (this._point) {
case 0:
this._point = 1;
this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3);
break;
case 1:
this._point = 2;
break;
case 2:
this._point = 3;
point5(this, slope2(this, t12 = slope3(this, x3, y3)), t12);
break;
default:
point5(this, this._t0, t12 = slope3(this, x3, y3));
break;
}
this._x0 = this._x1, this._x1 = x3;
this._y0 = this._y1, this._y1 = y3;
this._t0 = t12;
}
};
function MonotoneY(context) {
this._context = new ReflectContext(context);
}
(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x3, y3) {
MonotoneX.prototype.point.call(this, y3, x3);
};
function ReflectContext(context) {
this._context = context;
}
ReflectContext.prototype = {
moveTo: function(x3, y3) {
this._context.moveTo(y3, x3);
},
closePath: function() {
this._context.closePath();
},
lineTo: function(x3, y3) {
this._context.lineTo(y3, x3);
},
bezierCurveTo: function(x12, y1, x22, y22, x3, y3) {
this._context.bezierCurveTo(y1, x12, y22, x22, y3, x3);
}
};
function monotoneX(context) {
return new MonotoneX(context);
}
function monotoneY(context) {
return new MonotoneY(context);
}
// node_modules/d3-shape/src/curve/natural.js
function Natural(context) {
this._context = context;
}
Natural.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x = [];
this._y = [];
},
lineEnd: function() {
var x3 = this._x, y3 = this._y, n = x3.length;
if (n) {
this._line ? this._context.lineTo(x3[0], y3[0]) : this._context.moveTo(x3[0], y3[0]);
if (n === 2) {
this._context.lineTo(x3[1], y3[1]);
} else {
var px = controlPoints(x3), py = controlPoints(y3);
for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {
this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x3[i1], y3[i1]);
}
}
}
if (this._line || this._line !== 0 && n === 1) this._context.closePath();
this._line = 1 - this._line;
this._x = this._y = null;
},
point: function(x3, y3) {
this._x.push(+x3);
this._y.push(+y3);
}
};
function controlPoints(x3) {
var i, n = x3.length - 1, m, a2 = new Array(n), b = new Array(n), r = new Array(n);
a2[0] = 0, b[0] = 2, r[0] = x3[0] + 2 * x3[1];
for (i = 1; i < n - 1; ++i) a2[i] = 1, b[i] = 4, r[i] = 4 * x3[i] + 2 * x3[i + 1];
a2[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x3[n - 1] + x3[n];
for (i = 1; i < n; ++i) m = a2[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];
a2[n - 1] = r[n - 1] / b[n - 1];
for (i = n - 2; i >= 0; --i) a2[i] = (r[i] - a2[i + 1]) / b[i];
b[n - 1] = (x3[n] + a2[n - 1]) / 2;
for (i = 0; i < n - 1; ++i) b[i] = 2 * x3[i + 1] - a2[i + 1];
return [a2, b];
}
function natural_default(context) {
return new Natural(context);
}
// node_modules/d3-shape/src/curve/step.js
function Step(context, t) {
this._context = context;
this._t = t;
}
Step.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x = this._y = NaN;
this._point = 0;
},
lineEnd: function() {
if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);
if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;
},
point: function(x3, y3) {
x3 = +x3, y3 = +y3;
switch (this._point) {
case 0:
this._point = 1;
this._line ? this._context.lineTo(x3, y3) : this._context.moveTo(x3, y3);
break;
case 1:
this._point = 2;
default: {
if (this._t <= 0) {
this._context.lineTo(this._x, y3);
this._context.lineTo(x3, y3);
} else {
var x12 = this._x * (1 - this._t) + x3 * this._t;
this._context.lineTo(x12, this._y);
this._context.lineTo(x12, y3);
}
break;
}
}
this._x = x3, this._y = y3;
}
};
function step_default(context) {
return new Step(context, 0.5);
}
function stepBefore(context) {
return new Step(context, 0);
}
function stepAfter(context) {
return new Step(context, 1);
}
// node_modules/d3-brush/src/brush.js
var { abs: abs2, max: max3, min: min3 } = Math;
function number1(e) {
return [+e[0], +e[1]];
}
function number22(e) {
return [number1(e[0]), number1(e[1])];
}
var X = {
name: "x",
handles: ["w", "e"].map(type),
input: function(x3, e) {
return x3 == null ? null : [[+x3[0], e[0][1]], [+x3[1], e[1][1]]];
},
output: function(xy) {
return xy && [xy[0][0], xy[1][0]];
}
};
var Y = {
name: "y",
handles: ["n", "s"].map(type),
input: function(y3, e) {
return y3 == null ? null : [[e[0][0], +y3[0]], [e[1][0], +y3[1]]];
},
output: function(xy) {
return xy && [xy[0][1], xy[1][1]];
}
};
var XY = {
name: "xy",
handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(type),
input: function(xy) {
return xy == null ? null : number22(xy);
},
output: function(xy) {
return xy;
}
};
function type(t) {
return { type: t };
}
// node_modules/d3-chord/src/math.js
var pi3 = Math.PI;
var halfPi2 = pi3 / 2;
var tau3 = pi3 * 2;
// node_modules/d3-chord/src/array.js
var slice3 = Array.prototype.slice;
// node_modules/d3-contour/src/array.js
var array2 = Array.prototype;
var slice4 = array2.slice;
// node_modules/robust-predicates/esm/util.js
var epsilon5 = 11102230246251565e-32;
var resulterrbound = (3 + 8 * epsilon5) * epsilon5;
function vec(n) {
return new Float64Array(n);
}
// node_modules/robust-predicates/esm/orient2d.js
var ccwerrboundA = (3 + 16 * epsilon5) * epsilon5;
var ccwerrboundB = (2 + 12 * epsilon5) * epsilon5;
var ccwerrboundC = (9 + 64 * epsilon5) * epsilon5 * epsilon5;
var B = vec(4);
var C1 = vec(8);
var C2 = vec(12);
var D = vec(16);
var u = vec(4);
// node_modules/robust-predicates/esm/orient3d.js
var o3derrboundA = (7 + 56 * epsilon5) * epsilon5;
var o3derrboundB = (3 + 28 * epsilon5) * epsilon5;
var o3derrboundC = (26 + 288 * epsilon5) * epsilon5 * epsilon5;
var bc = vec(4);
var ca = vec(4);
var ab = vec(4);
var at_b = vec(4);
var at_c = vec(4);
var bt_c = vec(4);
var bt_a = vec(4);
var ct_a = vec(4);
var ct_b = vec(4);
var bct = vec(8);
var cat = vec(8);
var abt = vec(8);
var u2 = vec(4);
var _8 = vec(8);
var _8b = vec(8);
var _16 = vec(8);
var _12 = vec(12);
var fin = vec(192);
var fin2 = vec(192);
// node_modules/robust-predicates/esm/incircle.js
var iccerrboundA = (10 + 96 * epsilon5) * epsilon5;
var iccerrboundB = (4 + 48 * epsilon5) * epsilon5;
var iccerrboundC = (44 + 576 * epsilon5) * epsilon5 * epsilon5;
var bc2 = vec(4);
var ca2 = vec(4);
var ab2 = vec(4);
var aa = vec(4);
var bb = vec(4);
var cc = vec(4);
var u3 = vec(4);
var v = vec(4);
var axtbc = vec(8);
var aytbc = vec(8);
var bxtca = vec(8);
var bytca = vec(8);
var cxtab = vec(8);
var cytab = vec(8);
var abt2 = vec(8);
var bct2 = vec(8);
var cat2 = vec(8);
var abtt = vec(4);
var bctt = vec(4);
var catt = vec(4);
var _82 = vec(8);
var _162 = vec(16);
var _16b = vec(16);
var _16c = vec(16);
var _32 = vec(32);
var _32b = vec(32);
var _48 = vec(48);
var _64 = vec(64);
var fin3 = vec(1152);
var fin22 = vec(1152);
// node_modules/robust-predicates/esm/insphere.js
var isperrboundA = (16 + 224 * epsilon5) * epsilon5;
var isperrboundB = (5 + 72 * epsilon5) * epsilon5;
var isperrboundC = (71 + 1408 * epsilon5) * epsilon5 * epsilon5;
var ab3 = vec(4);
var bc3 = vec(4);
var cd = vec(4);
var de = vec(4);
var ea = vec(4);
var ac = vec(4);
var bd = vec(4);
var ce = vec(4);
var da = vec(4);
var eb = vec(4);
var abc = vec(24);
var bcd = vec(24);
var cde = vec(24);
var dea = vec(24);
var eab = vec(24);
var abd = vec(24);
var bce = vec(24);
var cda = vec(24);
var deb = vec(24);
var eac = vec(24);
var adet = vec(1152);
var bdet = vec(1152);
var cdet = vec(1152);
var ddet = vec(1152);
var edet = vec(1152);
var abdet = vec(2304);
var cddet = vec(2304);
var cdedet = vec(3456);
var deter = vec(5760);
var _83 = vec(8);
var _8b2 = vec(8);
var _8c = vec(8);
var _163 = vec(16);
var _24 = vec(24);
var _482 = vec(48);
var _48b = vec(48);
var _96 = vec(96);
var _192 = vec(192);
var _384x = vec(384);
var _384y = vec(384);
var _384z = vec(384);
var _768 = vec(768);
var xdet = vec(96);
var ydet = vec(96);
var zdet = vec(96);
var fin4 = vec(1152);
// node_modules/delaunator/index.js
var EPSILON = Math.pow(2, -52);
var EDGE_STACK = new Uint32Array(512);
// node_modules/d3-delaunay/src/delaunay.js
var tau4 = 2 * Math.PI;
// node_modules/d3-dsv/src/dsv.js
var EOL = {};
var EOF = {};
var QUOTE = 34;
var NEWLINE = 10;
var RETURN = 13;
function objectConverter(columns) {
return new Function("d", "return {" + columns.map(function(name, i) {
return JSON.stringify(name) + ": d[" + i + '] || ""';
}).join(",") + "}");
}
function customConverter(columns, f) {
var object = objectConverter(columns);
return function(row, i) {
return f(object(row), i, columns);
};
}
function inferColumns(rows) {
var columnSet = /* @__PURE__ */ Object.create(null), columns = [];
rows.forEach(function(row) {
for (var column2 in row) {
if (!(column2 in columnSet)) {
columns.push(columnSet[column2] = column2);
}
}
});
return columns;
}
function pad2(value, width) {
var s2 = value + "", length2 = s2.length;
return length2 < width ? new Array(width - length2 + 1).join(0) + s2 : s2;
}
function formatYear2(year) {
return year < 0 ? "-" + pad2(-year, 6) : year > 9999 ? "+" + pad2(year, 6) : pad2(year, 4);
}
function formatDate(date2) {
var hours = date2.getUTCHours(), minutes = date2.getUTCMinutes(), seconds2 = date2.getUTCSeconds(), milliseconds2 = date2.getUTCMilliseconds();
return isNaN(date2) ? "Invalid Date" : formatYear2(date2.getUTCFullYear(), 4) + "-" + pad2(date2.getUTCMonth() + 1, 2) + "-" + pad2(date2.getUTCDate(), 2) + (milliseconds2 ? "T" + pad2(hours, 2) + ":" + pad2(minutes, 2) + ":" + pad2(seconds2, 2) + "." + pad2(milliseconds2, 3) + "Z" : seconds2 ? "T" + pad2(hours, 2) + ":" + pad2(minutes, 2) + ":" + pad2(seconds2, 2) + "Z" : minutes || hours ? "T" + pad2(hours, 2) + ":" + pad2(minutes, 2) + "Z" : "");
}
function dsv_default(delimiter2) {
var reFormat = new RegExp('["' + delimiter2 + "\n\r]"), DELIMITER = delimiter2.charCodeAt(0);
function parse3(text, f) {
var convert, columns, rows = parseRows(text, function(row, i) {
if (convert) return convert(row, i - 1);
columns = row, convert = f ? customConverter(row, f) : objectConverter(row);
});
rows.columns = columns || [];
return rows;
}
function parseRows(text, f) {
var rows = [], N = text.length, I = 0, n = 0, t, eof = N <= 0, eol = false;
if (text.charCodeAt(N - 1) === NEWLINE) --N;
if (text.charCodeAt(N - 1) === RETURN) --N;
function token2() {
if (eof) return EOF;
if (eol) return eol = false, EOL;
var i, j = I, c3;
if (text.charCodeAt(j) === QUOTE) {
while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE) ;
if ((i = I) >= N) eof = true;
else if ((c3 = text.charCodeAt(I++)) === NEWLINE) eol = true;
else if (c3 === RETURN) {
eol = true;
if (text.charCodeAt(I) === NEWLINE) ++I;
}
return text.slice(j + 1, i - 1).replace(/""/g, '"');
}
while (I < N) {
if ((c3 = text.charCodeAt(i = I++)) === NEWLINE) eol = true;
else if (c3 === RETURN) {
eol = true;
if (text.charCodeAt(I) === NEWLINE) ++I;
} else if (c3 !== DELIMITER) continue;
return text.slice(j, i);
}
return eof = true, text.slice(j, N);
}
while ((t = token2()) !== EOF) {
var row = [];
while (t !== EOL && t !== EOF) row.push(t), t = token2();
if (f && (row = f(row, n++)) == null) continue;
rows.push(row);
}
return rows;
}
function preformatBody(rows, columns) {
return rows.map(function(row) {
return columns.map(function(column2) {
return formatValue(row[column2]);
}).join(delimiter2);
});
}
function format3(rows, columns) {
if (columns == null) columns = inferColumns(rows);
return [columns.map(formatValue).join(delimiter2)].concat(preformatBody(rows, columns)).join("\n");
}
function formatBody(rows, columns) {
if (columns == null) columns = inferColumns(rows);
return preformatBody(rows, columns).join("\n");
}
function formatRows(rows) {
return rows.map(formatRow).join("\n");
}
function formatRow(row) {
return row.map(formatValue).join(delimiter2);
}
function formatValue(value) {
return value == null ? "" : value instanceof Date ? formatDate(value) : reFormat.test(value += "") ? '"' + value.replace(/"/g, '""') + '"' : value;
}
return {
parse: parse3,
parseRows,
format: format3,
formatBody,
formatRows,
formatRow,
formatValue
};
}
// node_modules/d3-dsv/src/csv.js
var csv = dsv_default(",");
var csvParse = csv.parse;
var csvParseRows = csv.parseRows;
var csvFormat = csv.format;
var csvFormatBody = csv.formatBody;
var csvFormatRows = csv.formatRows;
var csvFormatRow = csv.formatRow;
var csvFormatValue = csv.formatValue;
// node_modules/d3-dsv/src/tsv.js
var tsv = dsv_default(" ");
var tsvParse = tsv.parse;
var tsvParseRows = tsv.parseRows;
var tsvFormat = tsv.format;
var tsvFormatBody = tsv.formatBody;
var tsvFormatRows = tsv.formatRows;
var tsvFormatRow = tsv.formatRow;
var tsvFormatValue = tsv.formatValue;
// node_modules/d3-dsv/src/autoType.js
var fixtz = (/* @__PURE__ */ new Date("2019-01-01T00:00")).getHours() || (/* @__PURE__ */ new Date("2019-07-01T00:00")).getHours();
// node_modules/d3-fetch/src/text.js
function responseText(response) {
if (!response.ok) throw new Error(response.status + " " + response.statusText);
return response.text();
}
function text_default(input, init2) {
return fetch(input, init2).then(responseText);
}
// node_modules/d3-fetch/src/dsv.js
function dsvParse(parse3) {
return function(input, init2, row) {
if (arguments.length === 2 && typeof init2 === "function") row = init2, init2 = void 0;
return text_default(input, init2).then(function(response) {
return parse3(response, row);
});
};
}
var csv2 = dsvParse(csvParse);
var tsv2 = dsvParse(tsvParse);
// node_modules/d3-fetch/src/xml.js
function parser(type3) {
return (input, init2) => text_default(input, init2).then((text) => new DOMParser().parseFromString(text, type3));
}
var xml_default = parser("application/xml");
var html = parser("text/html");
var svg = parser("image/svg+xml");
// node_modules/d3-quadtree/src/add.js
function add_default(d) {
const x3 = +this._x.call(null, d), y3 = +this._y.call(null, d);
return add(this.cover(x3, y3), x3, y3, d);
}
function add(tree, x3, y3, d) {
if (isNaN(x3) || isNaN(y3)) return tree;
var parent, node2 = tree._root, leaf = { data: d }, x02 = tree._x0, y0 = tree._y0, x12 = tree._x1, y1 = tree._y1, xm, ym, xp, yp, right2, bottom2, i, j;
if (!node2) return tree._root = leaf, tree;
while (node2.length) {
if (right2 = x3 >= (xm = (x02 + x12) / 2)) x02 = xm;
else x12 = xm;
if (bottom2 = y3 >= (ym = (y0 + y1) / 2)) y0 = ym;
else y1 = ym;
if (parent = node2, !(node2 = node2[i = bottom2 << 1 | right2])) return parent[i] = leaf, tree;
}
xp = +tree._x.call(null, node2.data);
yp = +tree._y.call(null, node2.data);
if (x3 === xp && y3 === yp) return leaf.next = node2, parent ? parent[i] = leaf : tree._root = leaf, tree;
do {
parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);
if (right2 = x3 >= (xm = (x02 + x12) / 2)) x02 = xm;
else x12 = xm;
if (bottom2 = y3 >= (ym = (y0 + y1) / 2)) y0 = ym;
else y1 = ym;
} while ((i = bottom2 << 1 | right2) === (j = (yp >= ym) << 1 | xp >= xm));
return parent[j] = node2, parent[i] = leaf, tree;
}
function addAll(data) {
var d, i, n = data.length, x3, y3, xz = new Array(n), yz = new Array(n), x02 = Infinity, y0 = Infinity, x12 = -Infinity, y1 = -Infinity;
for (i = 0; i < n; ++i) {
if (isNaN(x3 = +this._x.call(null, d = data[i])) || isNaN(y3 = +this._y.call(null, d))) continue;
xz[i] = x3;
yz[i] = y3;
if (x3 < x02) x02 = x3;
if (x3 > x12) x12 = x3;
if (y3 < y0) y0 = y3;
if (y3 > y1) y1 = y3;
}
if (x02 > x12 || y0 > y1) return this;
this.cover(x02, y0).cover(x12, y1);
for (i = 0; i < n; ++i) {
add(this, xz[i], yz[i], data[i]);
}
return this;
}
// node_modules/d3-quadtree/src/cover.js
function cover_default(x3, y3) {
if (isNaN(x3 = +x3) || isNaN(y3 = +y3)) return this;
var x02 = this._x0, y0 = this._y0, x12 = this._x1, y1 = this._y1;
if (isNaN(x02)) {
x12 = (x02 = Math.floor(x3)) + 1;
y1 = (y0 = Math.floor(y3)) + 1;
} else {
var z = x12 - x02 || 1, node2 = this._root, parent, i;
while (x02 > x3 || x3 >= x12 || y0 > y3 || y3 >= y1) {
i = (y3 < y0) << 1 | x3 < x02;
parent = new Array(4), parent[i] = node2, node2 = parent, z *= 2;
switch (i) {
case 0:
x12 = x02 + z, y1 = y0 + z;
break;
case 1:
x02 = x12 - z, y1 = y0 + z;
break;
case 2:
x12 = x02 + z, y0 = y1 - z;
break;
case 3:
x02 = x12 - z, y0 = y1 - z;
break;
}
}
if (this._root && this._root.length) this._root = node2;
}
this._x0 = x02;
this._y0 = y0;
this._x1 = x12;
this._y1 = y1;
return this;
}
// node_modules/d3-quadtree/src/data.js
function data_default() {
var data = [];
this.visit(function(node2) {
if (!node2.length) do
data.push(node2.data);
while (node2 = node2.next);
});
return data;
}
// node_modules/d3-quadtree/src/extent.js
function extent_default(_) {
return arguments.length ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
}
// node_modules/d3-quadtree/src/quad.js
function quad_default(node2, x02, y0, x12, y1) {
this.node = node2;
this.x0 = x02;
this.y0 = y0;
this.x1 = x12;
this.y1 = y1;
}
// node_modules/d3-quadtree/src/find.js
function find_default(x3, y3, radius) {
var data, x02 = this._x0, y0 = this._y0, x12, y1, x22, y22, x32 = this._x1, y32 = this._y1, quads = [], node2 = this._root, q, i;
if (node2) quads.push(new quad_default(node2, x02, y0, x32, y32));
if (radius == null) radius = Infinity;
else {
x02 = x3 - radius, y0 = y3 - radius;
x32 = x3 + radius, y32 = y3 + radius;
radius *= radius;
}
while (q = quads.pop()) {
if (!(node2 = q.node) || (x12 = q.x0) > x32 || (y1 = q.y0) > y32 || (x22 = q.x1) < x02 || (y22 = q.y1) < y0) continue;
if (node2.length) {
var xm = (x12 + x22) / 2, ym = (y1 + y22) / 2;
quads.push(
new quad_default(node2[3], xm, ym, x22, y22),
new quad_default(node2[2], x12, ym, xm, y22),
new quad_default(node2[1], xm, y1, x22, ym),
new quad_default(node2[0], x12, y1, xm, ym)
);
if (i = (y3 >= ym) << 1 | x3 >= xm) {
q = quads[quads.length - 1];
quads[quads.length - 1] = quads[quads.length - 1 - i];
quads[quads.length - 1 - i] = q;
}
} else {
var dx = x3 - +this._x.call(null, node2.data), dy = y3 - +this._y.call(null, node2.data), d2 = dx * dx + dy * dy;
if (d2 < radius) {
var d = Math.sqrt(radius = d2);
x02 = x3 - d, y0 = y3 - d;
x32 = x3 + d, y32 = y3 + d;
data = node2.data;
}
}
}
return data;
}
// node_modules/d3-quadtree/src/remove.js
function remove_default(d) {
if (isNaN(x3 = +this._x.call(null, d)) || isNaN(y3 = +this._y.call(null, d))) return this;
var parent, node2 = this._root, retainer, previous, next2, x02 = this._x0, y0 = this._y0, x12 = this._x1, y1 = this._y1, x3, y3, xm, ym, right2, bottom2, i, j;
if (!node2) return this;
if (node2.length) while (true) {
if (right2 = x3 >= (xm = (x02 + x12) / 2)) x02 = xm;
else x12 = xm;
if (bottom2 = y3 >= (ym = (y0 + y1) / 2)) y0 = ym;
else y1 = ym;
if (!(parent = node2, node2 = node2[i = bottom2 << 1 | right2])) return this;
if (!node2.length) break;
if (parent[i + 1 & 3] || parent[i + 2 & 3] || parent[i + 3 & 3]) retainer = parent, j = i;
}
while (node2.data !== d) if (!(previous = node2, node2 = node2.next)) return this;
if (next2 = node2.next) delete node2.next;
if (previous) return next2 ? previous.next = next2 : delete previous.next, this;
if (!parent) return this._root = next2, this;
next2 ? parent[i] = next2 : delete parent[i];
if ((node2 = parent[0] || parent[1] || parent[2] || parent[3]) && node2 === (parent[3] || parent[2] || parent[1] || parent[0]) && !node2.length) {
if (retainer) retainer[j] = node2;
else this._root = node2;
}
return this;
}
function removeAll(data) {
for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);
return this;
}
// node_modules/d3-quadtree/src/root.js
function root_default() {
return this._root;
}
// node_modules/d3-quadtree/src/size.js
function size_default() {
var size = 0;
this.visit(function(node2) {
if (!node2.length) do
++size;
while (node2 = node2.next);
});
return size;
}
// node_modules/d3-quadtree/src/visit.js
function visit_default(callback) {
var quads = [], q, node2 = this._root, child, x02, y0, x12, y1;
if (node2) quads.push(new quad_default(node2, this._x0, this._y0, this._x1, this._y1));
while (q = quads.pop()) {
if (!callback(node2 = q.node, x02 = q.x0, y0 = q.y0, x12 = q.x1, y1 = q.y1) && node2.length) {
var xm = (x02 + x12) / 2, ym = (y0 + y1) / 2;
if (child = node2[3]) quads.push(new quad_default(child, xm, ym, x12, y1));
if (child = node2[2]) quads.push(new quad_default(child, x02, ym, xm, y1));
if (child = node2[1]) quads.push(new quad_default(child, xm, y0, x12, ym));
if (child = node2[0]) quads.push(new quad_default(child, x02, y0, xm, ym));
}
}
return this;
}
// node_modules/d3-quadtree/src/visitAfter.js
function visitAfter_default(callback) {
var quads = [], next2 = [], q;
if (this._root) quads.push(new quad_default(this._root, this._x0, this._y0, this._x1, this._y1));
while (q = quads.pop()) {
var node2 = q.node;
if (node2.length) {
var child, x02 = q.x0, y0 = q.y0, x12 = q.x1, y1 = q.y1, xm = (x02 + x12) / 2, ym = (y0 + y1) / 2;
if (child = node2[0]) quads.push(new quad_default(child, x02, y0, xm, ym));
if (child = node2[1]) quads.push(new quad_default(child, xm, y0, x12, ym));
if (child = node2[2]) quads.push(new quad_default(child, x02, ym, xm, y1));
if (child = node2[3]) quads.push(new quad_default(child, xm, ym, x12, y1));
}
next2.push(q);
}
while (q = next2.pop()) {
callback(q.node, q.x0, q.y0, q.x1, q.y1);
}
return this;
}
// node_modules/d3-quadtree/src/x.js
function defaultX(d) {
return d[0];
}
function x_default(_) {
return arguments.length ? (this._x = _, this) : this._x;
}
// node_modules/d3-quadtree/src/y.js
function defaultY(d) {
return d[1];
}
function y_default(_) {
return arguments.length ? (this._y = _, this) : this._y;
}
// node_modules/d3-quadtree/src/quadtree.js
function quadtree(nodes, x3, y3) {
var tree = new Quadtree(x3 == null ? defaultX : x3, y3 == null ? defaultY : y3, NaN, NaN, NaN, NaN);
return nodes == null ? tree : tree.addAll(nodes);
}
function Quadtree(x3, y3, x02, y0, x12, y1) {
this._x = x3;
this._y = y3;
this._x0 = x02;
this._y0 = y0;
this._x1 = x12;
this._y1 = y1;
this._root = void 0;
}
function leaf_copy(leaf) {
var copy4 = { data: leaf.data }, next2 = copy4;
while (leaf = leaf.next) next2 = next2.next = { data: leaf.data };
return copy4;
}
var treeProto = quadtree.prototype = Quadtree.prototype;
treeProto.copy = function() {
var copy4 = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), node2 = this._root, nodes, child;
if (!node2) return copy4;
if (!node2.length) return copy4._root = leaf_copy(node2), copy4;
nodes = [{ source: node2, target: copy4._root = new Array(4) }];
while (node2 = nodes.pop()) {
for (var i = 0; i < 4; ++i) {
if (child = node2.source[i]) {
if (child.length) nodes.push({ source: child, target: node2.target[i] = new Array(4) });
else node2.target[i] = leaf_copy(child);
}
}
}
return copy4;
};
treeProto.add = add_default;
treeProto.addAll = addAll;
treeProto.cover = cover_default;
treeProto.data = data_default;
treeProto.extent = extent_default;
treeProto.find = find_default;
treeProto.remove = remove_default;
treeProto.removeAll = removeAll;
treeProto.root = root_default;
treeProto.size = size_default;
treeProto.visit = visit_default;
treeProto.visitAfter = visitAfter_default;
treeProto.x = x_default;
treeProto.y = y_default;
// node_modules/d3-force/src/simulation.js
var initialAngle = Math.PI * (3 - Math.sqrt(5));
// node_modules/d3-geo/src/math.js
var epsilon6 = 1e-6;
var epsilon22 = 1e-12;
var pi4 = Math.PI;
var halfPi3 = pi4 / 2;
var quarterPi = pi4 / 4;
var tau5 = pi4 * 2;
var degrees = 180 / pi4;
var radians = pi4 / 180;
var abs4 = Math.abs;
var atan = Math.atan;
var atan22 = Math.atan2;
var cos3 = Math.cos;
var exp = Math.exp;
var log2 = Math.log;
var sin3 = Math.sin;
var sign2 = Math.sign || function(x3) {
return x3 > 0 ? 1 : x3 < 0 ? -1 : 0;
};
var sqrt4 = Math.sqrt;
var tan = Math.tan;
function acos2(x3) {
return x3 > 1 ? 0 : x3 < -1 ? pi4 : Math.acos(x3);
}
function asin2(x3) {
return x3 > 1 ? halfPi3 : x3 < -1 ? -halfPi3 : Math.asin(x3);
}
// node_modules/d3-geo/src/noop.js
function noop() {
}
// node_modules/d3-geo/src/area.js
var areaRingSum = new Adder();
var areaSum = new Adder();
// node_modules/d3-geo/src/cartesian.js
function cartesian(spherical2) {
var lambda = spherical2[0], phi2 = spherical2[1], cosPhi = cos3(phi2);
return [cosPhi * cos3(lambda), cosPhi * sin3(lambda), sin3(phi2)];
}
function cartesianCross(a2, b) {
return [a2[1] * b[2] - a2[2] * b[1], a2[2] * b[0] - a2[0] * b[2], a2[0] * b[1] - a2[1] * b[0]];
}
function cartesianNormalizeInPlace(d) {
var l = sqrt4(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
d[0] /= l, d[1] /= l, d[2] /= l;
}
// node_modules/d3-geo/src/rotation.js
function rotationIdentity(lambda, phi2) {
if (abs4(lambda) > pi4) lambda -= Math.round(lambda / tau5) * tau5;
return [lambda, phi2];
}
rotationIdentity.invert = rotationIdentity;
// node_modules/d3-geo/src/clip/buffer.js
function buffer_default2() {
var lines = [], line2;
return {
point: function(x3, y3, m) {
line2.push([x3, y3, m]);
},
lineStart: function() {
lines.push(line2 = []);
},
lineEnd: noop,
rejoin: function() {
if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));
},
result: function() {
var result = lines;
lines = [];
line2 = null;
return result;
}
};
}
// node_modules/d3-geo/src/pointEqual.js
function pointEqual_default(a2, b) {
return abs4(a2[0] - b[0]) < epsilon6 && abs4(a2[1] - b[1]) < epsilon6;
}
// node_modules/d3-geo/src/clip/rejoin.js
function Intersection(point6, points, other, entry) {
this.x = point6;
this.z = points;
this.o = other;
this.e = entry;
this.v = false;
this.n = this.p = null;
}
function rejoin_default(segments, compareIntersection2, startInside, interpolate, stream) {
var subject = [], clip = [], i, n;
segments.forEach(function(segment) {
if ((n2 = segment.length - 1) <= 0) return;
var n2, p0 = segment[0], p1 = segment[n2], x3;
if (pointEqual_default(p0, p1)) {
if (!p0[2] && !p1[2]) {
stream.lineStart();
for (i = 0; i < n2; ++i) stream.point((p0 = segment[i])[0], p0[1]);
stream.lineEnd();
return;
}
p1[0] += 2 * epsilon6;
}
subject.push(x3 = new Intersection(p0, segment, null, true));
clip.push(x3.o = new Intersection(p0, null, x3, false));
subject.push(x3 = new Intersection(p1, segment, null, false));
clip.push(x3.o = new Intersection(p1, null, x3, true));
});
if (!subject.length) return;
clip.sort(compareIntersection2);
link2(subject);
link2(clip);
for (i = 0, n = clip.length; i < n; ++i) {
clip[i].e = startInside = !startInside;
}
var start = subject[0], points, point6;
while (1) {
var current = start, isSubject = true;
while (current.v) if ((current = current.n) === start) return;
points = current.z;
stream.lineStart();
do {
current.v = current.o.v = true;
if (current.e) {
if (isSubject) {
for (i = 0, n = points.length; i < n; ++i) stream.point((point6 = points[i])[0], point6[1]);
} else {
interpolate(current.x, current.n.x, 1, stream);
}
current = current.n;
} else {
if (isSubject) {
points = current.p.z;
for (i = points.length - 1; i >= 0; --i) stream.point((point6 = points[i])[0], point6[1]);
} else {
interpolate(current.x, current.p.x, -1, stream);
}
current = current.p;
}
current = current.o;
points = current.z;
isSubject = !isSubject;
} while (!current.v);
stream.lineEnd();
}
}
function link2(array3) {
if (!(n = array3.length)) return;
var n, i = 0, a2 = array3[0], b;
while (++i < n) {
a2.n = b = array3[i];
b.p = a2;
a2 = b;
}
a2.n = b = array3[0];
b.p = a2;
}
// node_modules/d3-geo/src/polygonContains.js
function longitude(point6) {
return abs4(point6[0]) <= pi4 ? point6[0] : sign2(point6[0]) * ((abs4(point6[0]) + pi4) % tau5 - pi4);
}
function polygonContains_default(polygon, point6) {
var lambda = longitude(point6), phi2 = point6[1], sinPhi = sin3(phi2), normal = [sin3(lambda), -cos3(lambda), 0], angle = 0, winding = 0;
var sum4 = new Adder();
if (sinPhi === 1) phi2 = halfPi3 + epsilon6;
else if (sinPhi === -1) phi2 = -halfPi3 - epsilon6;
for (var i = 0, n = polygon.length; i < n; ++i) {
if (!(m = (ring = polygon[i]).length)) continue;
var ring, m, point0 = ring[m - 1], lambda0 = longitude(point0), phi0 = point0[1] / 2 + quarterPi, sinPhi0 = sin3(phi0), cosPhi0 = cos3(phi0);
for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {
var point1 = ring[j], lambda1 = longitude(point1), phi1 = point1[1] / 2 + quarterPi, sinPhi1 = sin3(phi1), cosPhi1 = cos3(phi1), delta = lambda1 - lambda0, sign3 = delta >= 0 ? 1 : -1, absDelta = sign3 * delta, antimeridian = absDelta > pi4, k2 = sinPhi0 * sinPhi1;
sum4.add(atan22(k2 * sign3 * sin3(absDelta), cosPhi0 * cosPhi1 + k2 * cos3(absDelta)));
angle += antimeridian ? delta + sign3 * tau5 : delta;
if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {
var arc = cartesianCross(cartesian(point0), cartesian(point1));
cartesianNormalizeInPlace(arc);
var intersection2 = cartesianCross(normal, arc);
cartesianNormalizeInPlace(intersection2);
var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin2(intersection2[2]);
if (phi2 > phiArc || phi2 === phiArc && (arc[0] || arc[1])) {
winding += antimeridian ^ delta >= 0 ? 1 : -1;
}
}
}
}
return (angle < -epsilon6 || angle < epsilon6 && sum4 < -epsilon22) ^ winding & 1;
}
// node_modules/d3-geo/src/clip/index.js
function clip_default(pointVisible, clipLine, interpolate, start) {
return function(sink) {
var line2 = clipLine(sink), ringBuffer = buffer_default2(), ringSink = clipLine(ringBuffer), polygonStarted = false, polygon, segments, ring;
var clip = {
point: point6,
lineStart,
lineEnd,
polygonStart: function() {
clip.point = pointRing;
clip.lineStart = ringStart;
clip.lineEnd = ringEnd;
segments = [];
polygon = [];
},
polygonEnd: function() {
clip.point = point6;
clip.lineStart = lineStart;
clip.lineEnd = lineEnd;
segments = merge(segments);
var startInside = polygonContains_default(polygon, start);
if (segments.length) {
if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
rejoin_default(segments, compareIntersection, startInside, interpolate, sink);
} else if (startInside) {
if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
sink.lineStart();
interpolate(null, null, 1, sink);
sink.lineEnd();
}
if (polygonStarted) sink.polygonEnd(), polygonStarted = false;
segments = polygon = null;
},
sphere: function() {
sink.polygonStart();
sink.lineStart();
interpolate(null, null, 1, sink);
sink.lineEnd();
sink.polygonEnd();
}
};
function point6(lambda, phi2) {
if (pointVisible(lambda, phi2)) sink.point(lambda, phi2);
}
function pointLine(lambda, phi2) {
line2.point(lambda, phi2);
}
function lineStart() {
clip.point = pointLine;
line2.lineStart();
}
function lineEnd() {
clip.point = point6;
line2.lineEnd();
}
function pointRing(lambda, phi2) {
ring.push([lambda, phi2]);
ringSink.point(lambda, phi2);
}
function ringStart() {
ringSink.lineStart();
ring = [];
}
function ringEnd() {
pointRing(ring[0][0], ring[0][1]);
ringSink.lineEnd();
var clean = ringSink.clean(), ringSegments = ringBuffer.result(), i, n = ringSegments.length, m, segment, point7;
ring.pop();
polygon.push(ring);
ring = null;
if (!n) return;
if (clean & 1) {
segment = ringSegments[0];
if ((m = segment.length - 1) > 0) {
if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
sink.lineStart();
for (i = 0; i < m; ++i) sink.point((point7 = segment[i])[0], point7[1]);
sink.lineEnd();
}
return;
}
if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));
segments.push(ringSegments.filter(validSegment));
}
return clip;
};
}
function validSegment(segment) {
return segment.length > 1;
}
function compareIntersection(a2, b) {
return ((a2 = a2.x)[0] < 0 ? a2[1] - halfPi3 - epsilon6 : halfPi3 - a2[1]) - ((b = b.x)[0] < 0 ? b[1] - halfPi3 - epsilon6 : halfPi3 - b[1]);
}
// node_modules/d3-geo/src/clip/antimeridian.js
var antimeridian_default = clip_default(
function() {
return true;
},
clipAntimeridianLine,
clipAntimeridianInterpolate,
[-pi4, -halfPi3]
);
function clipAntimeridianLine(stream) {
var lambda0 = NaN, phi0 = NaN, sign0 = NaN, clean;
return {
lineStart: function() {
stream.lineStart();
clean = 1;
},
point: function(lambda1, phi1) {
var sign1 = lambda1 > 0 ? pi4 : -pi4, delta = abs4(lambda1 - lambda0);
if (abs4(delta - pi4) < epsilon6) {
stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi3 : -halfPi3);
stream.point(sign0, phi0);
stream.lineEnd();
stream.lineStart();
stream.point(sign1, phi0);
stream.point(lambda1, phi0);
clean = 0;
} else if (sign0 !== sign1 && delta >= pi4) {
if (abs4(lambda0 - sign0) < epsilon6) lambda0 -= sign0 * epsilon6;
if (abs4(lambda1 - sign1) < epsilon6) lambda1 -= sign1 * epsilon6;
phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);
stream.point(sign0, phi0);
stream.lineEnd();
stream.lineStart();
stream.point(sign1, phi0);
clean = 0;
}
stream.point(lambda0 = lambda1, phi0 = phi1);
sign0 = sign1;
},
lineEnd: function() {
stream.lineEnd();
lambda0 = phi0 = NaN;
},
clean: function() {
return 2 - clean;
}
};
}
function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {
var cosPhi0, cosPhi1, sinLambda0Lambda1 = sin3(lambda0 - lambda1);
return abs4(sinLambda0Lambda1) > epsilon6 ? atan((sin3(phi0) * (cosPhi1 = cos3(phi1)) * sin3(lambda1) - sin3(phi1) * (cosPhi0 = cos3(phi0)) * sin3(lambda0)) / (cosPhi0 * cosPhi1 * sinLambda0Lambda1)) : (phi0 + phi1) / 2;
}
function clipAntimeridianInterpolate(from2, to, direction, stream) {
var phi2;
if (from2 == null) {
phi2 = direction * halfPi3;
stream.point(-pi4, phi2);
stream.point(0, phi2);
stream.point(pi4, phi2);
stream.point(pi4, 0);
stream.point(pi4, -phi2);
stream.point(0, -phi2);
stream.point(-pi4, -phi2);
stream.point(-pi4, 0);
stream.point(-pi4, phi2);
} else if (abs4(from2[0] - to[0]) > epsilon6) {
var lambda = from2[0] < to[0] ? pi4 : -pi4;
phi2 = direction * lambda / 2;
stream.point(-lambda, phi2);
stream.point(0, phi2);
stream.point(lambda, phi2);
} else {
stream.point(to[0], to[1]);
}
}
// node_modules/d3-geo/src/clip/rectangle.js
var clipMax = 1e9;
var clipMin = -clipMax;
// node_modules/d3-geo/src/path/area.js
var areaSum2 = new Adder();
var areaRingSum2 = new Adder();
// node_modules/d3-geo/src/path/bounds.js
var x0 = Infinity;
var x1 = -x0;
// node_modules/d3-geo/src/path/context.js
function PathContext(context) {
this._context = context;
}
PathContext.prototype = {
_radius: 4.5,
pointRadius: function(_) {
return this._radius = _, this;
},
polygonStart: function() {
this._line = 0;
},
polygonEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
if (this._line === 0) this._context.closePath();
this._point = NaN;
},
point: function(x3, y3) {
switch (this._point) {
case 0: {
this._context.moveTo(x3, y3);
this._point = 1;
break;
}
case 1: {
this._context.lineTo(x3, y3);
break;
}
default: {
this._context.moveTo(x3 + this._radius, y3);
this._context.arc(x3, y3, this._radius, 0, tau5);
break;
}
}
},
result: noop
};
// node_modules/d3-geo/src/path/measure.js
var lengthSum = new Adder();
// node_modules/d3-geo/src/transform.js
function transformer2(methods) {
return function(stream) {
var s2 = new TransformStream();
for (var key in methods) s2[key] = methods[key];
s2.stream = stream;
return s2;
};
}
function TransformStream() {
}
TransformStream.prototype = {
constructor: TransformStream,
point: function(x3, y3) {
this.stream.point(x3, y3);
},
sphere: function() {
this.stream.sphere();
},
lineStart: function() {
this.stream.lineStart();
},
lineEnd: function() {
this.stream.lineEnd();
},
polygonStart: function() {
this.stream.polygonStart();
},
polygonEnd: function() {
this.stream.polygonEnd();
}
};
// node_modules/d3-geo/src/projection/resample.js
var cosMinDistance = cos3(30 * radians);
// node_modules/d3-geo/src/projection/index.js
var transformRadians = transformer2({
point: function(x3, y3) {
this.stream.point(x3 * radians, y3 * radians);
}
});
// node_modules/d3-geo/src/projection/azimuthal.js
function azimuthalRaw(scale2) {
return function(x3, y3) {
var cx = cos3(x3), cy = cos3(y3), k2 = scale2(cx * cy);
if (k2 === Infinity) return [2, 0];
return [
k2 * cy * sin3(x3),
k2 * sin3(y3)
];
};
}
function azimuthalInvert(angle) {
return function(x3, y3) {
var z = sqrt4(x3 * x3 + y3 * y3), c3 = angle(z), sc = sin3(c3), cc2 = cos3(c3);
return [
atan22(x3 * sc, z * cc2),
asin2(z && y3 * sc / z)
];
};
}
// node_modules/d3-geo/src/projection/azimuthalEqualArea.js
var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) {
return sqrt4(2 / (1 + cxcy));
});
azimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) {
return 2 * asin2(z / 2);
});
// node_modules/d3-geo/src/projection/azimuthalEquidistant.js
var azimuthalEquidistantRaw = azimuthalRaw(function(c3) {
return (c3 = acos2(c3)) && c3 / sin3(c3);
});
azimuthalEquidistantRaw.invert = azimuthalInvert(function(z) {
return z;
});
// node_modules/d3-geo/src/projection/mercator.js
function mercatorRaw(lambda, phi2) {
return [lambda, log2(tan((halfPi3 + phi2) / 2))];
}
mercatorRaw.invert = function(x3, y3) {
return [x3, 2 * atan(exp(y3)) - halfPi3];
};
// node_modules/d3-geo/src/projection/equirectangular.js
function equirectangularRaw(lambda, phi2) {
return [lambda, phi2];
}
equirectangularRaw.invert = equirectangularRaw;
// node_modules/d3-geo/src/projection/equalEarth.js
var A1 = 1.340264;
var A2 = -0.081106;
var A3 = 893e-6;
var A4 = 3796e-6;
var M = sqrt4(3) / 2;
var iterations = 12;
function equalEarthRaw(lambda, phi2) {
var l = asin2(M * sin3(phi2)), l2 = l * l, l6 = l2 * l2 * l2;
return [
lambda * cos3(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),
l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))
];
}
equalEarthRaw.invert = function(x3, y3) {
var l = y3, l2 = l * l, l6 = l2 * l2 * l2;
for (var i = 0, delta, fy, fpy; i < iterations; ++i) {
fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y3;
fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);
l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;
if (abs4(delta) < epsilon22) break;
}
return [
M * x3 * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos3(l),
asin2(sin3(l) / M)
];
};
// node_modules/d3-geo/src/projection/gnomonic.js
function gnomonicRaw(x3, y3) {
var cy = cos3(y3), k2 = cos3(x3) * cy;
return [cy * sin3(x3) / k2, sin3(y3) / k2];
}
gnomonicRaw.invert = azimuthalInvert(atan);
// node_modules/d3-geo/src/projection/naturalEarth1.js
function naturalEarth1Raw(lambda, phi2) {
var phi22 = phi2 * phi2, phi4 = phi22 * phi22;
return [
lambda * (0.8707 - 0.131979 * phi22 + phi4 * (-0.013791 + phi4 * (3971e-6 * phi22 - 1529e-6 * phi4))),
phi2 * (1.007226 + phi22 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi22 - 5916e-6 * phi4)))
];
}
naturalEarth1Raw.invert = function(x3, y3) {
var phi2 = y3, i = 25, delta;
do {
var phi22 = phi2 * phi2, phi4 = phi22 * phi22;
phi2 -= delta = (phi2 * (1.007226 + phi22 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi22 - 5916e-6 * phi4))) - y3) / (1.007226 + phi22 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi22 - 5916e-6 * 11 * phi4)));
} while (abs4(delta) > epsilon6 && --i > 0);
return [
x3 / (0.8707 + (phi22 = phi2 * phi2) * (-0.131979 + phi22 * (-0.013791 + phi22 * phi22 * phi22 * (3971e-6 - 1529e-6 * phi22)))),
phi2
];
};
// node_modules/d3-geo/src/projection/orthographic.js
function orthographicRaw(x3, y3) {
return [cos3(y3) * sin3(x3), sin3(y3)];
}
orthographicRaw.invert = azimuthalInvert(asin2);
// node_modules/d3-geo/src/projection/stereographic.js
function stereographicRaw(x3, y3) {
var cy = cos3(y3), k2 = 1 + cos3(x3) * cy;
return [cy * sin3(x3) / k2, sin3(y3) / k2];
}
stereographicRaw.invert = azimuthalInvert(function(z) {
return 2 * atan(z);
});
// node_modules/d3-geo/src/projection/transverseMercator.js
function transverseMercatorRaw(lambda, phi2) {
return [log2(tan((halfPi3 + phi2) / 2)), -lambda];
}
transverseMercatorRaw.invert = function(x3, y3) {
return [-y3, 2 * atan(exp(x3)) - halfPi3];
};
// node_modules/d3-hierarchy/src/hierarchy/count.js
function count2(node2) {
var sum4 = 0, children = node2.children, i = children && children.length;
if (!i) sum4 = 1;
else while (--i >= 0) sum4 += children[i].value;
node2.value = sum4;
}
function count_default() {
return this.eachAfter(count2);
}
// node_modules/d3-hierarchy/src/hierarchy/each.js
function each_default(callback, that) {
let index2 = -1;
for (const node2 of this) {
callback.call(that, node2, ++index2, this);
}
return this;
}
// node_modules/d3-hierarchy/src/hierarchy/eachBefore.js
function eachBefore_default(callback, that) {
var node2 = this, nodes = [node2], children, i, index2 = -1;
while (node2 = nodes.pop()) {
callback.call(that, node2, ++index2, this);
if (children = node2.children) {
for (i = children.length - 1; i >= 0; --i) {
nodes.push(children[i]);
}
}
}
return this;
}
// node_modules/d3-hierarchy/src/hierarchy/eachAfter.js
function eachAfter_default(callback, that) {
var node2 = this, nodes = [node2], next2 = [], children, i, n, index2 = -1;
while (node2 = nodes.pop()) {
next2.push(node2);
if (children = node2.children) {
for (i = 0, n = children.length; i < n; ++i) {
nodes.push(children[i]);
}
}
}
while (node2 = next2.pop()) {
callback.call(that, node2, ++index2, this);
}
return this;
}
// node_modules/d3-hierarchy/src/hierarchy/find.js
function find_default2(callback, that) {
let index2 = -1;
for (const node2 of this) {
if (callback.call(that, node2, ++index2, this)) {
return node2;
}
}
}
// node_modules/d3-hierarchy/src/hierarchy/sum.js
function sum_default(value) {
return this.eachAfter(function(node2) {
var sum4 = +value(node2.data) || 0, children = node2.children, i = children && children.length;
while (--i >= 0) sum4 += children[i].value;
node2.value = sum4;
});
}
// node_modules/d3-hierarchy/src/hierarchy/sort.js
function sort_default(compare) {
return this.eachBefore(function(node2) {
if (node2.children) {
node2.children.sort(compare);
}
});
}
// node_modules/d3-hierarchy/src/hierarchy/path.js
function path_default2(end) {
var start = this, ancestor = leastCommonAncestor(start, end), nodes = [start];
while (start !== ancestor) {
start = start.parent;
nodes.push(start);
}
var k2 = nodes.length;
while (end !== ancestor) {
nodes.splice(k2, 0, end);
end = end.parent;
}
return nodes;
}
function leastCommonAncestor(a2, b) {
if (a2 === b) return a2;
var aNodes = a2.ancestors(), bNodes = b.ancestors(), c3 = null;
a2 = aNodes.pop();
b = bNodes.pop();
while (a2 === b) {
c3 = a2;
a2 = aNodes.pop();
b = bNodes.pop();
}
return c3;
}
// node_modules/d3-hierarchy/src/hierarchy/ancestors.js
function ancestors_default() {
var node2 = this, nodes = [node2];
while (node2 = node2.parent) {
nodes.push(node2);
}
return nodes;
}
// node_modules/d3-hierarchy/src/hierarchy/descendants.js
function descendants_default() {
return Array.from(this);
}
// node_modules/d3-hierarchy/src/hierarchy/leaves.js
function leaves_default() {
var leaves = [];
this.eachBefore(function(node2) {
if (!node2.children) {
leaves.push(node2);
}
});
return leaves;
}
// node_modules/d3-hierarchy/src/hierarchy/links.js
function links_default() {
var root2 = this, links = [];
root2.each(function(node2) {
if (node2 !== root2) {
links.push({ source: node2.parent, target: node2 });
}
});
return links;
}
// node_modules/d3-hierarchy/src/hierarchy/iterator.js
function* iterator_default() {
var node2 = this, current, next2 = [node2], children, i, n;
do {
current = next2.reverse(), next2 = [];
while (node2 = current.pop()) {
yield node2;
if (children = node2.children) {
for (i = 0, n = children.length; i < n; ++i) {
next2.push(children[i]);
}
}
}
} while (next2.length);
}
// node_modules/d3-hierarchy/src/hierarchy/index.js
function hierarchy(data, children) {
if (data instanceof Map) {
data = [void 0, data];
if (children === void 0) children = mapChildren;
} else if (children === void 0) {
children = objectChildren;
}
var root2 = new Node(data), node2, nodes = [root2], child, childs, i, n;
while (node2 = nodes.pop()) {
if ((childs = children(node2.data)) && (n = (childs = Array.from(childs)).length)) {
node2.children = childs;
for (i = n - 1; i >= 0; --i) {
nodes.push(child = childs[i] = new Node(childs[i]));
child.parent = node2;
child.depth = node2.depth + 1;
}
}
}
return root2.eachBefore(computeHeight);
}
function node_copy() {
return hierarchy(this).eachBefore(copyData);
}
function objectChildren(d) {
return d.children;
}
function mapChildren(d) {
return Array.isArray(d) ? d[1] : null;
}
function copyData(node2) {
if (node2.data.value !== void 0) node2.value = node2.data.value;
node2.data = node2.data.data;
}
function computeHeight(node2) {
var height = 0;
do
node2.height = height;
while ((node2 = node2.parent) && node2.height < ++height);
}
function Node(data) {
this.data = data;
this.depth = this.height = 0;
this.parent = null;
}
Node.prototype = hierarchy.prototype = {
constructor: Node,
count: count_default,
each: each_default,
eachAfter: eachAfter_default,
eachBefore: eachBefore_default,
find: find_default2,
sum: sum_default,
sort: sort_default,
path: path_default2,
ancestors: ancestors_default,
descendants: descendants_default,
leaves: leaves_default,
links: links_default,
copy: node_copy,
[Symbol.iterator]: iterator_default
};
// node_modules/d3-hierarchy/src/treemap/dice.js
function dice_default(parent, x02, y0, x12, y1) {
var nodes = parent.children, node2, i = -1, n = nodes.length, k2 = parent.value && (x12 - x02) / parent.value;
while (++i < n) {
node2 = nodes[i], node2.y0 = y0, node2.y1 = y1;
node2.x0 = x02, node2.x1 = x02 += node2.value * k2;
}
}
// node_modules/d3-hierarchy/src/tree.js
function TreeNode(node2, i) {
this._ = node2;
this.parent = null;
this.children = null;
this.A = null;
this.a = this;
this.z = 0;
this.m = 0;
this.c = 0;
this.s = 0;
this.t = null;
this.i = i;
}
TreeNode.prototype = Object.create(Node.prototype);
// node_modules/d3-hierarchy/src/treemap/slice.js
function slice_default(parent, x02, y0, x12, y1) {
var nodes = parent.children, node2, i = -1, n = nodes.length, k2 = parent.value && (y1 - y0) / parent.value;
while (++i < n) {
node2 = nodes[i], node2.x0 = x02, node2.x1 = x12;
node2.y0 = y0, node2.y1 = y0 += node2.value * k2;
}
}
// node_modules/d3-hierarchy/src/treemap/squarify.js
var phi = (1 + Math.sqrt(5)) / 2;
function squarifyRatio(ratio, parent, x02, y0, x12, y1) {
var rows = [], nodes = parent.children, row, nodeValue, i0 = 0, i1 = 0, n = nodes.length, dx, dy, value = parent.value, sumValue, minValue, maxValue, newRatio, minRatio, alpha, beta;
while (i0 < n) {
dx = x12 - x02, dy = y1 - y0;
do
sumValue = nodes[i1++].value;
while (!sumValue && i1 < n);
minValue = maxValue = sumValue;
alpha = Math.max(dy / dx, dx / dy) / (value * ratio);
beta = sumValue * sumValue * alpha;
minRatio = Math.max(maxValue / beta, beta / minValue);
for (; i1 < n; ++i1) {
sumValue += nodeValue = nodes[i1].value;
if (nodeValue < minValue) minValue = nodeValue;
if (nodeValue > maxValue) maxValue = nodeValue;
beta = sumValue * sumValue * alpha;
newRatio = Math.max(maxValue / beta, beta / minValue);
if (newRatio > minRatio) {
sumValue -= nodeValue;
break;
}
minRatio = newRatio;
}
rows.push(row = { value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1) });
if (row.dice) dice_default(row, x02, y0, x12, value ? y0 += dy * sumValue / value : y1);
else slice_default(row, x02, y0, value ? x02 += dx * sumValue / value : x12, y1);
value -= sumValue, i0 = i1;
}
return rows;
}
var squarify_default = function custom8(ratio) {
function squarify(parent, x02, y0, x12, y1) {
squarifyRatio(ratio, parent, x02, y0, x12, y1);
}
squarify.ratio = function(x3) {
return custom8((x3 = +x3) > 1 ? x3 : 1);
};
return squarify;
}(phi);
// node_modules/d3-hierarchy/src/treemap/resquarify.js
var resquarify_default = function custom9(ratio) {
function resquarify(parent, x02, y0, x12, y1) {
if ((rows = parent._squarify) && rows.ratio === ratio) {
var rows, row, nodes, i, j = -1, n, m = rows.length, value = parent.value;
while (++j < m) {
row = rows[j], nodes = row.children;
for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;
if (row.dice) dice_default(row, x02, y0, x12, value ? y0 += (y1 - y0) * row.value / value : y1);
else slice_default(row, x02, y0, value ? x02 += (x12 - x02) * row.value / value : x12, y1);
value -= row.value;
}
} else {
parent._squarify = rows = squarifyRatio(ratio, parent, x02, y0, x12, y1);
rows.ratio = ratio;
}
}
resquarify.ratio = function(x3) {
return custom9((x3 = +x3) > 1 ? x3 : 1);
};
return resquarify;
}(phi);
// node_modules/d3-random/src/defaultSource.js
var defaultSource_default = Math.random;
// node_modules/d3-random/src/uniform.js
var uniform_default = function sourceRandomUniform(source) {
function randomUniform(min4, max5) {
min4 = min4 == null ? 0 : +min4;
max5 = max5 == null ? 1 : +max5;
if (arguments.length === 1) max5 = min4, min4 = 0;
else max5 -= min4;
return function() {
return source() * max5 + min4;
};
}
randomUniform.source = sourceRandomUniform;
return randomUniform;
}(defaultSource_default);
// node_modules/d3-random/src/int.js
var int_default = function sourceRandomInt(source) {
function randomInt(min4, max5) {
if (arguments.length < 2) max5 = min4, min4 = 0;
min4 = Math.floor(min4);
max5 = Math.floor(max5) - min4;
return function() {
return Math.floor(source() * max5 + min4);
};
}
randomInt.source = sourceRandomInt;
return randomInt;
}(defaultSource_default);
// node_modules/d3-random/src/normal.js
var normal_default = function sourceRandomNormal(source) {
function randomNormal(mu, sigma) {
var x3, r;
mu = mu == null ? 0 : +mu;
sigma = sigma == null ? 1 : +sigma;
return function() {
var y3;
if (x3 != null) y3 = x3, x3 = null;
else do {
x3 = source() * 2 - 1;
y3 = source() * 2 - 1;
r = x3 * x3 + y3 * y3;
} while (!r || r > 1);
return mu + sigma * y3 * Math.sqrt(-2 * Math.log(r) / r);
};
}
randomNormal.source = sourceRandomNormal;
return randomNormal;
}(defaultSource_default);
// node_modules/d3-random/src/logNormal.js
var logNormal_default = function sourceRandomLogNormal(source) {
var N = normal_default.source(source);
function randomLogNormal() {
var randomNormal = N.apply(this, arguments);
return function() {
return Math.exp(randomNormal());
};
}
randomLogNormal.source = sourceRandomLogNormal;
return randomLogNormal;
}(defaultSource_default);
// node_modules/d3-random/src/irwinHall.js
var irwinHall_default = function sourceRandomIrwinHall(source) {
function randomIrwinHall(n) {
if ((n = +n) <= 0) return () => 0;
return function() {
for (var sum4 = 0, i = n; i > 1; --i) sum4 += source();
return sum4 + i * source();
};
}
randomIrwinHall.source = sourceRandomIrwinHall;
return randomIrwinHall;
}(defaultSource_default);
// node_modules/d3-random/src/bates.js
var bates_default = function sourceRandomBates(source) {
var I = irwinHall_default.source(source);
function randomBates(n) {
if ((n = +n) === 0) return source;
var randomIrwinHall = I(n);
return function() {
return randomIrwinHall() / n;
};
}
randomBates.source = sourceRandomBates;
return randomBates;
}(defaultSource_default);
// node_modules/d3-random/src/exponential.js
var exponential_default = function sourceRandomExponential(source) {
function randomExponential(lambda) {
return function() {
return -Math.log1p(-source()) / lambda;
};
}
randomExponential.source = sourceRandomExponential;
return randomExponential;
}(defaultSource_default);
// node_modules/d3-random/src/pareto.js
var pareto_default = function sourceRandomPareto(source) {
function randomPareto(alpha) {
if ((alpha = +alpha) < 0) throw new RangeError("invalid alpha");
alpha = 1 / -alpha;
return function() {
return Math.pow(1 - source(), alpha);
};
}
randomPareto.source = sourceRandomPareto;
return randomPareto;
}(defaultSource_default);
// node_modules/d3-random/src/bernoulli.js
var bernoulli_default = function sourceRandomBernoulli(source) {
function randomBernoulli(p) {
if ((p = +p) < 0 || p > 1) throw new RangeError("invalid p");
return function() {
return Math.floor(source() + p);
};
}
randomBernoulli.source = sourceRandomBernoulli;
return randomBernoulli;
}(defaultSource_default);
// node_modules/d3-random/src/geometric.js
var geometric_default = function sourceRandomGeometric(source) {
function randomGeometric(p) {
if ((p = +p) < 0 || p > 1) throw new RangeError("invalid p");
if (p === 0) return () => Infinity;
if (p === 1) return () => 1;
p = Math.log1p(-p);
return function() {
return 1 + Math.floor(Math.log1p(-source()) / p);
};
}
randomGeometric.source = sourceRandomGeometric;
return randomGeometric;
}(defaultSource_default);
// node_modules/d3-random/src/gamma.js
var gamma_default = function sourceRandomGamma(source) {
var randomNormal = normal_default.source(source)();
function randomGamma(k2, theta) {
if ((k2 = +k2) < 0) throw new RangeError("invalid k");
if (k2 === 0) return () => 0;
theta = theta == null ? 1 : +theta;
if (k2 === 1) return () => -Math.log1p(-source()) * theta;
var d = (k2 < 1 ? k2 + 1 : k2) - 1 / 3, c3 = 1 / (3 * Math.sqrt(d)), multiplier = k2 < 1 ? () => Math.pow(source(), 1 / k2) : () => 1;
return function() {
do {
do {
var x3 = randomNormal(), v2 = 1 + c3 * x3;
} while (v2 <= 0);
v2 *= v2 * v2;
var u4 = 1 - source();
} while (u4 >= 1 - 0.0331 * x3 * x3 * x3 * x3 && Math.log(u4) >= 0.5 * x3 * x3 + d * (1 - v2 + Math.log(v2)));
return d * v2 * multiplier() * theta;
};
}
randomGamma.source = sourceRandomGamma;
return randomGamma;
}(defaultSource_default);
// node_modules/d3-random/src/beta.js
var beta_default = function sourceRandomBeta(source) {
var G = gamma_default.source(source);
function randomBeta(alpha, beta) {
var X2 = G(alpha), Y2 = G(beta);
return function() {
var x3 = X2();
return x3 === 0 ? 0 : x3 / (x3 + Y2());
};
}
randomBeta.source = sourceRandomBeta;
return randomBeta;
}(defaultSource_default);
// node_modules/d3-random/src/binomial.js
var binomial_default = function sourceRandomBinomial(source) {
var G = geometric_default.source(source), B2 = beta_default.source(source);
function randomBinomial(n, p) {
n = +n;
if ((p = +p) >= 1) return () => n;
if (p <= 0) return () => 0;
return function() {
var acc = 0, nn = n, pp = p;
while (nn * pp > 16 && nn * (1 - pp) > 16) {
var i = Math.floor((nn + 1) * pp), y3 = B2(i, nn - i + 1)();
if (y3 <= pp) {
acc += i;
nn -= i;
pp = (pp - y3) / (1 - y3);
} else {
nn = i - 1;
pp /= y3;
}
}
var sign3 = pp < 0.5, pFinal = sign3 ? pp : 1 - pp, g = G(pFinal);
for (var s2 = g(), k2 = 0; s2 <= nn; ++k2) s2 += g();
return acc + (sign3 ? k2 : nn - k2);
};
}
randomBinomial.source = sourceRandomBinomial;
return randomBinomial;
}(defaultSource_default);
// node_modules/d3-random/src/weibull.js
var weibull_default = function sourceRandomWeibull(source) {
function randomWeibull(k2, a2, b) {
var outerFunc;
if ((k2 = +k2) === 0) {
outerFunc = (x3) => -Math.log(x3);
} else {
k2 = 1 / k2;
outerFunc = (x3) => Math.pow(x3, k2);
}
a2 = a2 == null ? 0 : +a2;
b = b == null ? 1 : +b;
return function() {
return a2 + b * outerFunc(-Math.log1p(-source()));
};
}
randomWeibull.source = sourceRandomWeibull;
return randomWeibull;
}(defaultSource_default);
// node_modules/d3-random/src/cauchy.js
var cauchy_default = function sourceRandomCauchy(source) {
function randomCauchy(a2, b) {
a2 = a2 == null ? 0 : +a2;
b = b == null ? 1 : +b;
return function() {
return a2 + b * Math.tan(Math.PI * source());
};
}
randomCauchy.source = sourceRandomCauchy;
return randomCauchy;
}(defaultSource_default);
// node_modules/d3-random/src/logistic.js
var logistic_default = function sourceRandomLogistic(source) {
function randomLogistic(a2, b) {
a2 = a2 == null ? 0 : +a2;
b = b == null ? 1 : +b;
return function() {
var u4 = source();
return a2 + b * Math.log(u4 / (1 - u4));
};
}
randomLogistic.source = sourceRandomLogistic;
return randomLogistic;
}(defaultSource_default);
// node_modules/d3-random/src/poisson.js
var poisson_default = function sourceRandomPoisson(source) {
var G = gamma_default.source(source), B2 = binomial_default.source(source);
function randomPoisson(lambda) {
return function() {
var acc = 0, l = lambda;
while (l > 16) {
var n = Math.floor(0.875 * l), t = G(n)();
if (t > l) return acc + B2(n - 1, l / t)();
acc += n;
l -= t;
}
for (var s2 = -Math.log1p(-source()), k2 = 0; s2 <= l; ++k2) s2 -= Math.log1p(-source());
return acc + k2;
};
}
randomPoisson.source = sourceRandomPoisson;
return randomPoisson;
}(defaultSource_default);
// node_modules/d3-random/src/lcg.js
var eps = 1 / 4294967296;
// node_modules/khroma/dist/utils/channel.js
var Channel = {
/* CLAMP */
min: {
r: 0,
g: 0,
b: 0,
s: 0,
l: 0,
a: 0
},
max: {
r: 255,
g: 255,
b: 255,
h: 360,
s: 100,
l: 100,
a: 1
},
clamp: {
r: (r) => r >= 255 ? 255 : r < 0 ? 0 : r,
g: (g) => g >= 255 ? 255 : g < 0 ? 0 : g,
b: (b) => b >= 255 ? 255 : b < 0 ? 0 : b,
h: (h) => h % 360,
s: (s2) => s2 >= 100 ? 100 : s2 < 0 ? 0 : s2,
l: (l) => l >= 100 ? 100 : l < 0 ? 0 : l,
a: (a2) => a2 >= 1 ? 1 : a2 < 0 ? 0 : a2
},
/* CONVERSION */
//SOURCE: https://planetcalc.com/7779
toLinear: (c3) => {
const n = c3 / 255;
return c3 > 0.03928 ? Math.pow((n + 0.055) / 1.055, 2.4) : n / 12.92;
},
//SOURCE: https://gist.github.com/mjackson/5311256
hue2rgb: (p, q, t) => {
if (t < 0)
t += 1;
if (t > 1)
t -= 1;
if (t < 1 / 6)
return p + (q - p) * 6 * t;
if (t < 1 / 2)
return q;
if (t < 2 / 3)
return p + (q - p) * (2 / 3 - t) * 6;
return p;
},
hsl2rgb: ({ h, s: s2, l }, channel2) => {
if (!s2)
return l * 2.55;
h /= 360;
s2 /= 100;
l /= 100;
const q = l < 0.5 ? l * (1 + s2) : l + s2 - l * s2;
const p = 2 * l - q;
switch (channel2) {
case "r":
return Channel.hue2rgb(p, q, h + 1 / 3) * 255;
case "g":
return Channel.hue2rgb(p, q, h) * 255;
case "b":
return Channel.hue2rgb(p, q, h - 1 / 3) * 255;
}
},
rgb2hsl: ({ r, g, b }, channel2) => {
r /= 255;
g /= 255;
b /= 255;
const max5 = Math.max(r, g, b);
const min4 = Math.min(r, g, b);
const l = (max5 + min4) / 2;
if (channel2 === "l")
return l * 100;
if (max5 === min4)
return 0;
const d = max5 - min4;
const s2 = l > 0.5 ? d / (2 - max5 - min4) : d / (max5 + min4);
if (channel2 === "s")
return s2 * 100;
switch (max5) {
case r:
return ((g - b) / d + (g < b ? 6 : 0)) * 60;
case g:
return ((b - r) / d + 2) * 60;
case b:
return ((r - g) / d + 4) * 60;
default:
return -1;
}
}
};
var channel_default = Channel;
// node_modules/khroma/dist/utils/lang.js
var Lang = {
/* API */
clamp: (number5, lower, upper) => {
if (lower > upper)
return Math.min(lower, Math.max(upper, number5));
return Math.min(upper, Math.max(lower, number5));
},
round: (number5) => {
return Math.round(number5 * 1e10) / 1e10;
}
};
var lang_default = Lang;
// node_modules/khroma/dist/utils/unit.js
var Unit = {
/* API */
dec2hex: (dec) => {
const hex = Math.round(dec).toString(16);
return hex.length > 1 ? hex : `0${hex}`;
}
};
var unit_default = Unit;
// node_modules/khroma/dist/utils/index.js
var Utils = {
channel: channel_default,
lang: lang_default,
unit: unit_default
};
var utils_default = Utils;
// node_modules/khroma/dist/constants.js
var DEC2HEX = {};
for (let i = 0; i <= 255; i++)
DEC2HEX[i] = utils_default.unit.dec2hex(i);
var TYPE = {
ALL: 0,
RGB: 1,
HSL: 2
};
// node_modules/khroma/dist/channels/type.js
var Type = class {
constructor() {
this.type = TYPE.ALL;
}
/* API */
get() {
return this.type;
}
set(type3) {
if (this.type && this.type !== type3)
throw new Error("Cannot change both RGB and HSL channels at the same time");
this.type = type3;
}
reset() {
this.type = TYPE.ALL;
}
is(type3) {
return this.type === type3;
}
};
var type_default = Type;
// node_modules/khroma/dist/channels/index.js
var Channels = class {
/* CONSTRUCTOR */
constructor(data, color) {
this.color = color;
this.changed = false;
this.data = data;
this.type = new type_default();
}
/* API */
set(data, color) {
this.color = color;
this.changed = false;
this.data = data;
this.type.type = TYPE.ALL;
return this;
}
/* HELPERS */
_ensureHSL() {
const data = this.data;
const { h, s: s2, l } = data;
if (h === void 0)
data.h = utils_default.channel.rgb2hsl(data, "h");
if (s2 === void 0)
data.s = utils_default.channel.rgb2hsl(data, "s");
if (l === void 0)
data.l = utils_default.channel.rgb2hsl(data, "l");
}
_ensureRGB() {
const data = this.data;
const { r, g, b } = data;
if (r === void 0)
data.r = utils_default.channel.hsl2rgb(data, "r");
if (g === void 0)
data.g = utils_default.channel.hsl2rgb(data, "g");
if (b === void 0)
data.b = utils_default.channel.hsl2rgb(data, "b");
}
/* GETTERS */
get r() {
const data = this.data;
const r = data.r;
if (!this.type.is(TYPE.HSL) && r !== void 0)
return r;
this._ensureHSL();
return utils_default.channel.hsl2rgb(data, "r");
}
get g() {
const data = this.data;
const g = data.g;
if (!this.type.is(TYPE.HSL) && g !== void 0)
return g;
this._ensureHSL();
return utils_default.channel.hsl2rgb(data, "g");
}
get b() {
const data = this.data;
const b = data.b;
if (!this.type.is(TYPE.HSL) && b !== void 0)
return b;
this._ensureHSL();
return utils_default.channel.hsl2rgb(data, "b");
}
get h() {
const data = this.data;
const h = data.h;
if (!this.type.is(TYPE.RGB) && h !== void 0)
return h;
this._ensureRGB();
return utils_default.channel.rgb2hsl(data, "h");
}
get s() {
const data = this.data;
const s2 = data.s;
if (!this.type.is(TYPE.RGB) && s2 !== void 0)
return s2;
this._ensureRGB();
return utils_default.channel.rgb2hsl(data, "s");
}
get l() {
const data = this.data;
const l = data.l;
if (!this.type.is(TYPE.RGB) && l !== void 0)
return l;
this._ensureRGB();
return utils_default.channel.rgb2hsl(data, "l");
}
get a() {
return this.data.a;
}
/* SETTERS */
set r(r) {
this.type.set(TYPE.RGB);
this.changed = true;
this.data.r = r;
}
set g(g) {
this.type.set(TYPE.RGB);
this.changed = true;
this.data.g = g;
}
set b(b) {
this.type.set(TYPE.RGB);
this.changed = true;
this.data.b = b;
}
set h(h) {
this.type.set(TYPE.HSL);
this.changed = true;
this.data.h = h;
}
set s(s2) {
this.type.set(TYPE.HSL);
this.changed = true;
this.data.s = s2;
}
set l(l) {
this.type.set(TYPE.HSL);
this.changed = true;
this.data.l = l;
}
set a(a2) {
this.changed = true;
this.data.a = a2;
}
};
var channels_default = Channels;
// node_modules/khroma/dist/channels/reusable.js
var channels = new channels_default({ r: 0, g: 0, b: 0, a: 0 }, "transparent");
var reusable_default = channels;
// node_modules/khroma/dist/color/hex.js
var Hex = {
/* VARIABLES */
re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,
/* API */
parse: (color) => {
if (color.charCodeAt(0) !== 35)
return;
const match2 = color.match(Hex.re);
if (!match2)
return;
const hex = match2[1];
const dec = parseInt(hex, 16);
const length2 = hex.length;
const hasAlpha = length2 % 4 === 0;
const isFullLength = length2 > 4;
const multiplier = isFullLength ? 1 : 17;
const bits = isFullLength ? 8 : 4;
const bitsOffset = hasAlpha ? 0 : -1;
const mask = isFullLength ? 255 : 15;
return reusable_default.set({
r: (dec >> bits * (bitsOffset + 3) & mask) * multiplier,
g: (dec >> bits * (bitsOffset + 2) & mask) * multiplier,
b: (dec >> bits * (bitsOffset + 1) & mask) * multiplier,
a: hasAlpha ? (dec & mask) * multiplier / 255 : 1
}, color);
},
stringify: (channels2) => {
const { r, g, b, a: a2 } = channels2;
if (a2 < 1) {
return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}${DEC2HEX[Math.round(a2 * 255)]}`;
} else {
return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}`;
}
}
};
var hex_default = Hex;
// node_modules/khroma/dist/color/hsl.js
var HSL = {
/* VARIABLES */
re: /^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,
hueRe: /^(.+?)(deg|grad|rad|turn)$/i,
/* HELPERS */
_hue2deg: (hue) => {
const match2 = hue.match(HSL.hueRe);
if (match2) {
const [, number5, unit2] = match2;
switch (unit2) {
case "grad":
return utils_default.channel.clamp.h(parseFloat(number5) * 0.9);
case "rad":
return utils_default.channel.clamp.h(parseFloat(number5) * 180 / Math.PI);
case "turn":
return utils_default.channel.clamp.h(parseFloat(number5) * 360);
}
}
return utils_default.channel.clamp.h(parseFloat(hue));
},
/* API */
parse: (color) => {
const charCode = color.charCodeAt(0);
if (charCode !== 104 && charCode !== 72)
return;
const match2 = color.match(HSL.re);
if (!match2)
return;
const [, h, s2, l, a2, isAlphaPercentage] = match2;
return reusable_default.set({
h: HSL._hue2deg(h),
s: utils_default.channel.clamp.s(parseFloat(s2)),
l: utils_default.channel.clamp.l(parseFloat(l)),
a: a2 ? utils_default.channel.clamp.a(isAlphaPercentage ? parseFloat(a2) / 100 : parseFloat(a2)) : 1
}, color);
},
stringify: (channels2) => {
const { h, s: s2, l, a: a2 } = channels2;
if (a2 < 1) {
return `hsla(${utils_default.lang.round(h)}, ${utils_default.lang.round(s2)}%, ${utils_default.lang.round(l)}%, ${a2})`;
} else {
return `hsl(${utils_default.lang.round(h)}, ${utils_default.lang.round(s2)}%, ${utils_default.lang.round(l)}%)`;
}
}
};
var hsl_default = HSL;
// node_modules/khroma/dist/color/keyword.js
var Keyword = {
/* VARIABLES */
colors: {
aliceblue: "#f0f8ff",
antiquewhite: "#faebd7",
aqua: "#00ffff",
aquamarine: "#7fffd4",
azure: "#f0ffff",
beige: "#f5f5dc",
bisque: "#ffe4c4",
black: "#000000",
blanchedalmond: "#ffebcd",
blue: "#0000ff",
blueviolet: "#8a2be2",
brown: "#a52a2a",
burlywood: "#deb887",
cadetblue: "#5f9ea0",
chartreuse: "#7fff00",
chocolate: "#d2691e",
coral: "#ff7f50",
cornflowerblue: "#6495ed",
cornsilk: "#fff8dc",
crimson: "#dc143c",
cyanaqua: "#00ffff",
darkblue: "#00008b",
darkcyan: "#008b8b",
darkgoldenrod: "#b8860b",
darkgray: "#a9a9a9",
darkgreen: "#006400",
darkgrey: "#a9a9a9",
darkkhaki: "#bdb76b",
darkmagenta: "#8b008b",
darkolivegreen: "#556b2f",
darkorange: "#ff8c00",
darkorchid: "#9932cc",
darkred: "#8b0000",
darksalmon: "#e9967a",
darkseagreen: "#8fbc8f",
darkslateblue: "#483d8b",
darkslategray: "#2f4f4f",
darkslategrey: "#2f4f4f",
darkturquoise: "#00ced1",
darkviolet: "#9400d3",
deeppink: "#ff1493",
deepskyblue: "#00bfff",
dimgray: "#696969",
dimgrey: "#696969",
dodgerblue: "#1e90ff",
firebrick: "#b22222",
floralwhite: "#fffaf0",
forestgreen: "#228b22",
fuchsia: "#ff00ff",
gainsboro: "#dcdcdc",
ghostwhite: "#f8f8ff",
gold: "#ffd700",
goldenrod: "#daa520",
gray: "#808080",
green: "#008000",
greenyellow: "#adff2f",
grey: "#808080",
honeydew: "#f0fff0",
hotpink: "#ff69b4",
indianred: "#cd5c5c",
indigo: "#4b0082",
ivory: "#fffff0",
khaki: "#f0e68c",
lavender: "#e6e6fa",
lavenderblush: "#fff0f5",
lawngreen: "#7cfc00",
lemonchiffon: "#fffacd",
lightblue: "#add8e6",
lightcoral: "#f08080",
lightcyan: "#e0ffff",
lightgoldenrodyellow: "#fafad2",
lightgray: "#d3d3d3",
lightgreen: "#90ee90",
lightgrey: "#d3d3d3",
lightpink: "#ffb6c1",
lightsalmon: "#ffa07a",
lightseagreen: "#20b2aa",
lightskyblue: "#87cefa",
lightslategray: "#778899",
lightslategrey: "#778899",
lightsteelblue: "#b0c4de",
lightyellow: "#ffffe0",
lime: "#00ff00",
limegreen: "#32cd32",
linen: "#faf0e6",
magenta: "#ff00ff",
maroon: "#800000",
mediumaquamarine: "#66cdaa",
mediumblue: "#0000cd",
mediumorchid: "#ba55d3",
mediumpurple: "#9370db",
mediumseagreen: "#3cb371",
mediumslateblue: "#7b68ee",
mediumspringgreen: "#00fa9a",
mediumturquoise: "#48d1cc",
mediumvioletred: "#c71585",
midnightblue: "#191970",
mintcream: "#f5fffa",
mistyrose: "#ffe4e1",
moccasin: "#ffe4b5",
navajowhite: "#ffdead",
navy: "#000080",
oldlace: "#fdf5e6",
olive: "#808000",
olivedrab: "#6b8e23",
orange: "#ffa500",
orangered: "#ff4500",
orchid: "#da70d6",
palegoldenrod: "#eee8aa",
palegreen: "#98fb98",
paleturquoise: "#afeeee",
palevioletred: "#db7093",
papayawhip: "#ffefd5",
peachpuff: "#ffdab9",
peru: "#cd853f",
pink: "#ffc0cb",
plum: "#dda0dd",
powderblue: "#b0e0e6",
purple: "#800080",
rebeccapurple: "#663399",
red: "#ff0000",
rosybrown: "#bc8f8f",
royalblue: "#4169e1",
saddlebrown: "#8b4513",
salmon: "#fa8072",
sandybrown: "#f4a460",
seagreen: "#2e8b57",
seashell: "#fff5ee",
sienna: "#a0522d",
silver: "#c0c0c0",
skyblue: "#87ceeb",
slateblue: "#6a5acd",
slategray: "#708090",
slategrey: "#708090",
snow: "#fffafa",
springgreen: "#00ff7f",
tan: "#d2b48c",
teal: "#008080",
thistle: "#d8bfd8",
transparent: "#00000000",
turquoise: "#40e0d0",
violet: "#ee82ee",
wheat: "#f5deb3",
white: "#ffffff",
whitesmoke: "#f5f5f5",
yellow: "#ffff00",
yellowgreen: "#9acd32"
},
/* API */
parse: (color) => {
color = color.toLowerCase();
const hex = Keyword.colors[color];
if (!hex)
return;
return hex_default.parse(hex);
},
stringify: (channels2) => {
const hex = hex_default.stringify(channels2);
for (const name in Keyword.colors) {
if (Keyword.colors[name] === hex)
return name;
}
return;
}
};
var keyword_default = Keyword;
// node_modules/khroma/dist/color/rgb.js
var RGB = {
/* VARIABLES */
re: /^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,
/* API */
parse: (color) => {
const charCode = color.charCodeAt(0);
if (charCode !== 114 && charCode !== 82)
return;
const match2 = color.match(RGB.re);
if (!match2)
return;
const [, r, isRedPercentage, g, isGreenPercentage, b, isBluePercentage, a2, isAlphaPercentage] = match2;
return reusable_default.set({
r: utils_default.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)),
g: utils_default.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)),
b: utils_default.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)),
a: a2 ? utils_default.channel.clamp.a(isAlphaPercentage ? parseFloat(a2) / 100 : parseFloat(a2)) : 1
}, color);
},
stringify: (channels2) => {
const { r, g, b, a: a2 } = channels2;
if (a2 < 1) {
return `rgba(${utils_default.lang.round(r)}, ${utils_default.lang.round(g)}, ${utils_default.lang.round(b)}, ${utils_default.lang.round(a2)})`;
} else {
return `rgb(${utils_default.lang.round(r)}, ${utils_default.lang.round(g)}, ${utils_default.lang.round(b)})`;
}
}
};
var rgb_default = RGB;
// node_modules/khroma/dist/color/index.js
var Color = {
/* VARIABLES */
format: {
keyword: keyword_default,
hex: hex_default,
rgb: rgb_default,
rgba: rgb_default,
hsl: hsl_default,
hsla: hsl_default
},
/* API */
parse: (color) => {
if (typeof color !== "string")
return color;
const channels2 = hex_default.parse(color) || rgb_default.parse(color) || hsl_default.parse(color) || keyword_default.parse(color);
if (channels2)
return channels2;
throw new Error(`Unsupported color format: "${color}"`);
},
stringify: (channels2) => {
if (!channels2.changed && channels2.color)
return channels2.color;
if (channels2.type.is(TYPE.HSL) || channels2.data.r === void 0) {
return hsl_default.stringify(channels2);
} else if (channels2.a < 1 || !Number.isInteger(channels2.r) || !Number.isInteger(channels2.g) || !Number.isInteger(channels2.b)) {
return rgb_default.stringify(channels2);
} else {
return hex_default.stringify(channels2);
}
}
};
var color_default = Color;
// node_modules/khroma/dist/methods/change.js
var change = (color, channels2) => {
const ch = color_default.parse(color);
for (const c3 in channels2) {
ch[c3] = utils_default.channel.clamp[c3](channels2[c3]);
}
return color_default.stringify(ch);
};
var change_default = change;
// node_modules/khroma/dist/methods/rgba.js
var rgba = (r, g, b = 0, a2 = 1) => {
if (typeof r !== "number")
return change_default(r, { a: g });
const channels2 = reusable_default.set({
r: utils_default.channel.clamp.r(r),
g: utils_default.channel.clamp.g(g),
b: utils_default.channel.clamp.b(b),
a: utils_default.channel.clamp.a(a2)
});
return color_default.stringify(channels2);
};
var rgba_default = rgba;
// node_modules/khroma/dist/methods/channel.js
var channel = (color, channel2) => {
return utils_default.lang.round(color_default.parse(color)[channel2]);
};
var channel_default2 = channel;
// node_modules/khroma/dist/methods/luminance.js
var luminance = (color) => {
const { r, g, b } = color_default.parse(color);
const luminance2 = 0.2126 * utils_default.channel.toLinear(r) + 0.7152 * utils_default.channel.toLinear(g) + 0.0722 * utils_default.channel.toLinear(b);
return utils_default.lang.round(luminance2);
};
var luminance_default = luminance;
// node_modules/khroma/dist/methods/is_light.js
var isLight = (color) => {
return luminance_default(color) >= 0.5;
};
var is_light_default = isLight;
// node_modules/khroma/dist/methods/is_dark.js
var isDark = (color) => {
return !is_light_default(color);
};
var is_dark_default = isDark;
// node_modules/khroma/dist/methods/adjust_channel.js
var adjustChannel = (color, channel2, amount) => {
const channels2 = color_default.parse(color);
const amountCurrent = channels2[channel2];
const amountNext = utils_default.channel.clamp[channel2](amountCurrent + amount);
if (amountCurrent !== amountNext)
channels2[channel2] = amountNext;
return color_default.stringify(channels2);
};
var adjust_channel_default = adjustChannel;
// node_modules/khroma/dist/methods/lighten.js
var lighten = (color, amount) => {
return adjust_channel_default(color, "l", amount);
};
var lighten_default = lighten;
// node_modules/khroma/dist/methods/darken.js
var darken = (color, amount) => {
return adjust_channel_default(color, "l", -amount);
};
var darken_default = darken;
// node_modules/khroma/dist/methods/adjust.js
var adjust = (color, channels2) => {
const ch = color_default.parse(color);
const changes = {};
for (const c3 in channels2) {
if (!channels2[c3])
continue;
changes[c3] = ch[c3] + channels2[c3];
}
return change_default(color, changes);
};
var adjust_default = adjust;
// node_modules/khroma/dist/methods/mix.js
var mix = (color1, color2, weight = 50) => {
const { r: r1, g: g1, b: b1, a: a1 } = color_default.parse(color1);
const { r: r2, g: g2, b: b2, a: a2 } = color_default.parse(color2);
const weightScale = weight / 100;
const weightNormalized = weightScale * 2 - 1;
const alphaDelta = a1 - a2;
const weight1combined = weightNormalized * alphaDelta === -1 ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta);
const weight1 = (weight1combined + 1) / 2;
const weight2 = 1 - weight1;
const r = r1 * weight1 + r2 * weight2;
const g = g1 * weight1 + g2 * weight2;
const b = b1 * weight1 + b2 * weight2;
const a3 = a1 * weightScale + a2 * (1 - weightScale);
return rgba_default(r, g, b, a3);
};
var mix_default = mix;
// node_modules/khroma/dist/methods/invert.js
var invert = (color, weight = 100) => {
const inverse = color_default.parse(color);
inverse.r = 255 - inverse.r;
inverse.g = 255 - inverse.g;
inverse.b = 255 - inverse.b;
return mix_default(inverse, color, weight);
};
var invert_default = invert;
// node_modules/lodash-es/_freeGlobal.js
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
var freeGlobal_default = freeGlobal;
// node_modules/lodash-es/_root.js
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var root = freeGlobal_default || freeSelf || Function("return this")();
var root_default2 = root;
// node_modules/lodash-es/_Symbol.js
var Symbol3 = root_default2.Symbol;
var Symbol_default = Symbol3;
// node_modules/lodash-es/_getRawTag.js
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
var nativeObjectToString = objectProto.toString;
var symToStringTag = Symbol_default ? Symbol_default.toStringTag : void 0;
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
try {
value[symToStringTag] = void 0;
var unmasked = true;
} catch (e) {
}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
}
var getRawTag_default = getRawTag;
// node_modules/lodash-es/_objectToString.js
var objectProto2 = Object.prototype;
var nativeObjectToString2 = objectProto2.toString;
function objectToString(value) {
return nativeObjectToString2.call(value);
}
var objectToString_default = objectToString;
// node_modules/lodash-es/_baseGetTag.js
var nullTag = "[object Null]";
var undefinedTag = "[object Undefined]";
var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
function baseGetTag(value) {
if (value == null) {
return value === void 0 ? undefinedTag : nullTag;
}
return symToStringTag2 && symToStringTag2 in Object(value) ? getRawTag_default(value) : objectToString_default(value);
}
var baseGetTag_default = baseGetTag;
// node_modules/lodash-es/isObject.js
function isObject(value) {
var type3 = typeof value;
return value != null && (type3 == "object" || type3 == "function");
}
var isObject_default = isObject;
// node_modules/lodash-es/isFunction.js
var asyncTag = "[object AsyncFunction]";
var funcTag = "[object Function]";
var genTag = "[object GeneratorFunction]";
var proxyTag = "[object Proxy]";
function isFunction(value) {
if (!isObject_default(value)) {
return false;
}
var tag = baseGetTag_default(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
var isFunction_default = isFunction;
// node_modules/lodash-es/_coreJsData.js
var coreJsData = root_default2["__core-js_shared__"];
var coreJsData_default = coreJsData;
// node_modules/lodash-es/_isMasked.js
var maskSrcKey = function() {
var uid = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
}();
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
var isMasked_default = isMasked;
// node_modules/lodash-es/_toSource.js
var funcProto = Function.prototype;
var funcToString = funcProto.toString;
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {
}
try {
return func + "";
} catch (e) {
}
}
return "";
}
var toSource_default = toSource;
// node_modules/lodash-es/_baseIsNative.js
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var funcProto2 = Function.prototype;
var objectProto3 = Object.prototype;
var funcToString2 = funcProto2.toString;
var hasOwnProperty2 = objectProto3.hasOwnProperty;
var reIsNative = RegExp(
"^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
function baseIsNative(value) {
if (!isObject_default(value) || isMasked_default(value)) {
return false;
}
var pattern = isFunction_default(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource_default(value));
}
var baseIsNative_default = baseIsNative;
// node_modules/lodash-es/_getValue.js
function getValue(object, key) {
return object == null ? void 0 : object[key];
}
var getValue_default = getValue;
// node_modules/lodash-es/_getNative.js
function getNative(object, key) {
var value = getValue_default(object, key);
return baseIsNative_default(value) ? value : void 0;
}
var getNative_default = getNative;
// node_modules/lodash-es/_nativeCreate.js
var nativeCreate = getNative_default(Object, "create");
var nativeCreate_default = nativeCreate;
// node_modules/lodash-es/_hashClear.js
function hashClear() {
this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {};
this.size = 0;
}
var hashClear_default = hashClear;
// node_modules/lodash-es/_hashDelete.js
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
var hashDelete_default = hashDelete;
// node_modules/lodash-es/_hashGet.js
var HASH_UNDEFINED = "__lodash_hash_undefined__";
var objectProto4 = Object.prototype;
var hasOwnProperty3 = objectProto4.hasOwnProperty;
function hashGet(key) {
var data = this.__data__;
if (nativeCreate_default) {
var result = data[key];
return result === HASH_UNDEFINED ? void 0 : result;
}
return hasOwnProperty3.call(data, key) ? data[key] : void 0;
}
var hashGet_default = hashGet;
// node_modules/lodash-es/_hashHas.js
var objectProto5 = Object.prototype;
var hasOwnProperty4 = objectProto5.hasOwnProperty;
function hashHas(key) {
var data = this.__data__;
return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty4.call(data, key);
}
var hashHas_default = hashHas;
// node_modules/lodash-es/_hashSet.js
var HASH_UNDEFINED2 = "__lodash_hash_undefined__";
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = nativeCreate_default && value === void 0 ? HASH_UNDEFINED2 : value;
return this;
}
var hashSet_default = hashSet;
// node_modules/lodash-es/_Hash.js
function Hash(entries) {
var index2 = -1, length2 = entries == null ? 0 : entries.length;
this.clear();
while (++index2 < length2) {
var entry = entries[index2];
this.set(entry[0], entry[1]);
}
}
Hash.prototype.clear = hashClear_default;
Hash.prototype["delete"] = hashDelete_default;
Hash.prototype.get = hashGet_default;
Hash.prototype.has = hashHas_default;
Hash.prototype.set = hashSet_default;
var Hash_default = Hash;
// node_modules/lodash-es/_listCacheClear.js
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
var listCacheClear_default = listCacheClear;
// node_modules/lodash-es/eq.js
function eq(value, other) {
return value === other || value !== value && other !== other;
}
var eq_default = eq;
// node_modules/lodash-es/_assocIndexOf.js
function assocIndexOf(array3, key) {
var length2 = array3.length;
while (length2--) {
if (eq_default(array3[length2][0], key)) {
return length2;
}
}
return -1;
}
var assocIndexOf_default = assocIndexOf;
// node_modules/lodash-es/_listCacheDelete.js
var arrayProto = Array.prototype;
var splice = arrayProto.splice;
function listCacheDelete(key) {
var data = this.__data__, index2 = assocIndexOf_default(data, key);
if (index2 < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index2 == lastIndex) {
data.pop();
} else {
splice.call(data, index2, 1);
}
--this.size;
return true;
}
var listCacheDelete_default = listCacheDelete;
// node_modules/lodash-es/_listCacheGet.js
function listCacheGet(key) {
var data = this.__data__, index2 = assocIndexOf_default(data, key);
return index2 < 0 ? void 0 : data[index2][1];
}
var listCacheGet_default = listCacheGet;
// node_modules/lodash-es/_listCacheHas.js
function listCacheHas(key) {
return assocIndexOf_default(this.__data__, key) > -1;
}
var listCacheHas_default = listCacheHas;
// node_modules/lodash-es/_listCacheSet.js
function listCacheSet(key, value) {
var data = this.__data__, index2 = assocIndexOf_default(data, key);
if (index2 < 0) {
++this.size;
data.push([key, value]);
} else {
data[index2][1] = value;
}
return this;
}
var listCacheSet_default = listCacheSet;
// node_modules/lodash-es/_ListCache.js
function ListCache(entries) {
var index2 = -1, length2 = entries == null ? 0 : entries.length;
this.clear();
while (++index2 < length2) {
var entry = entries[index2];
this.set(entry[0], entry[1]);
}
}
ListCache.prototype.clear = listCacheClear_default;
ListCache.prototype["delete"] = listCacheDelete_default;
ListCache.prototype.get = listCacheGet_default;
ListCache.prototype.has = listCacheHas_default;
ListCache.prototype.set = listCacheSet_default;
var ListCache_default = ListCache;
// node_modules/lodash-es/_Map.js
var Map2 = getNative_default(root_default2, "Map");
var Map_default = Map2;
// node_modules/lodash-es/_mapCacheClear.js
function mapCacheClear() {
this.size = 0;
this.__data__ = {
"hash": new Hash_default(),
"map": new (Map_default || ListCache_default)(),
"string": new Hash_default()
};
}
var mapCacheClear_default = mapCacheClear;
// node_modules/lodash-es/_isKeyable.js
function isKeyable(value) {
var type3 = typeof value;
return type3 == "string" || type3 == "number" || type3 == "symbol" || type3 == "boolean" ? value !== "__proto__" : value === null;
}
var isKeyable_default = isKeyable;
// node_modules/lodash-es/_getMapData.js
function getMapData(map5, key) {
var data = map5.__data__;
return isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
}
var getMapData_default = getMapData;
// node_modules/lodash-es/_mapCacheDelete.js
function mapCacheDelete(key) {
var result = getMapData_default(this, key)["delete"](key);
this.size -= result ? 1 : 0;
return result;
}
var mapCacheDelete_default = mapCacheDelete;
// node_modules/lodash-es/_mapCacheGet.js
function mapCacheGet(key) {
return getMapData_default(this, key).get(key);
}
var mapCacheGet_default = mapCacheGet;
// node_modules/lodash-es/_mapCacheHas.js
function mapCacheHas(key) {
return getMapData_default(this, key).has(key);
}
var mapCacheHas_default = mapCacheHas;
// node_modules/lodash-es/_mapCacheSet.js
function mapCacheSet(key, value) {
var data = getMapData_default(this, key), size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
var mapCacheSet_default = mapCacheSet;
// node_modules/lodash-es/_MapCache.js
function MapCache(entries) {
var index2 = -1, length2 = entries == null ? 0 : entries.length;
this.clear();
while (++index2 < length2) {
var entry = entries[index2];
this.set(entry[0], entry[1]);
}
}
MapCache.prototype.clear = mapCacheClear_default;
MapCache.prototype["delete"] = mapCacheDelete_default;
MapCache.prototype.get = mapCacheGet_default;
MapCache.prototype.has = mapCacheHas_default;
MapCache.prototype.set = mapCacheSet_default;
var MapCache_default = MapCache;
// node_modules/lodash-es/memoize.js
var FUNC_ERROR_TEXT = "Expected a function";
function memoize(func, resolver) {
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result) || cache;
return result;
};
memoized.cache = new (memoize.Cache || MapCache_default)();
return memoized;
}
memoize.Cache = MapCache_default;
var memoize_default = memoize;
// node_modules/lodash-es/_stackClear.js
function stackClear() {
this.__data__ = new ListCache_default();
this.size = 0;
}
var stackClear_default = stackClear;
// node_modules/lodash-es/_stackDelete.js
function stackDelete(key) {
var data = this.__data__, result = data["delete"](key);
this.size = data.size;
return result;
}
var stackDelete_default = stackDelete;
// node_modules/lodash-es/_stackGet.js
function stackGet(key) {
return this.__data__.get(key);
}
var stackGet_default = stackGet;
// node_modules/lodash-es/_stackHas.js
function stackHas(key) {
return this.__data__.has(key);
}
var stackHas_default = stackHas;
// node_modules/lodash-es/_stackSet.js
var LARGE_ARRAY_SIZE = 200;
function stackSet(key, value) {
var data = this.__data__;
if (data instanceof ListCache_default) {
var pairs3 = data.__data__;
if (!Map_default || pairs3.length < LARGE_ARRAY_SIZE - 1) {
pairs3.push([key, value]);
this.size = ++data.size;
return this;
}
data = this.__data__ = new MapCache_default(pairs3);
}
data.set(key, value);
this.size = data.size;
return this;
}
var stackSet_default = stackSet;
// node_modules/lodash-es/_Stack.js
function Stack(entries) {
var data = this.__data__ = new ListCache_default(entries);
this.size = data.size;
}
Stack.prototype.clear = stackClear_default;
Stack.prototype["delete"] = stackDelete_default;
Stack.prototype.get = stackGet_default;
Stack.prototype.has = stackHas_default;
Stack.prototype.set = stackSet_default;
var Stack_default = Stack;
// node_modules/lodash-es/_defineProperty.js
var defineProperty = function() {
try {
var func = getNative_default(Object, "defineProperty");
func({}, "", {});
return func;
} catch (e) {
}
}();
var defineProperty_default = defineProperty;
// node_modules/lodash-es/_baseAssignValue.js
function baseAssignValue(object, key, value) {
if (key == "__proto__" && defineProperty_default) {
defineProperty_default(object, key, {
"configurable": true,
"enumerable": true,
"value": value,
"writable": true
});
} else {
object[key] = value;
}
}
var baseAssignValue_default = baseAssignValue;
// node_modules/lodash-es/_assignMergeValue.js
function assignMergeValue(object, key, value) {
if (value !== void 0 && !eq_default(object[key], value) || value === void 0 && !(key in object)) {
baseAssignValue_default(object, key, value);
}
}
var assignMergeValue_default = assignMergeValue;
// node_modules/lodash-es/_createBaseFor.js
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
var index2 = -1, iterable = Object(object), props = keysFunc(object), length2 = props.length;
while (length2--) {
var key = props[fromRight ? length2 : ++index2];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
var createBaseFor_default = createBaseFor;
// node_modules/lodash-es/_baseFor.js
var baseFor = createBaseFor_default();
var baseFor_default = baseFor;
// node_modules/lodash-es/_cloneBuffer.js
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
var moduleExports = freeModule && freeModule.exports === freeExports;
var Buffer = moduleExports ? root_default2.Buffer : void 0;
var allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var length2 = buffer.length, result = allocUnsafe ? allocUnsafe(length2) : new buffer.constructor(length2);
buffer.copy(result);
return result;
}
var cloneBuffer_default = cloneBuffer;
// node_modules/lodash-es/_Uint8Array.js
var Uint8Array2 = root_default2.Uint8Array;
var Uint8Array_default = Uint8Array2;
// node_modules/lodash-es/_cloneArrayBuffer.js
function cloneArrayBuffer(arrayBuffer) {
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array_default(result).set(new Uint8Array_default(arrayBuffer));
return result;
}
var cloneArrayBuffer_default = cloneArrayBuffer;
// node_modules/lodash-es/_cloneTypedArray.js
function cloneTypedArray(typedArray, isDeep) {
var buffer = isDeep ? cloneArrayBuffer_default(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
var cloneTypedArray_default = cloneTypedArray;
// node_modules/lodash-es/_copyArray.js
function copyArray(source, array3) {
var index2 = -1, length2 = source.length;
array3 || (array3 = Array(length2));
while (++index2 < length2) {
array3[index2] = source[index2];
}
return array3;
}
var copyArray_default = copyArray;
// node_modules/lodash-es/_baseCreate.js
var objectCreate = Object.create;
var baseCreate = /* @__PURE__ */ function() {
function object() {
}
return function(proto) {
if (!isObject_default(proto)) {
return {};
}
if (objectCreate) {
return objectCreate(proto);
}
object.prototype = proto;
var result = new object();
object.prototype = void 0;
return result;
};
}();
var baseCreate_default = baseCreate;
// node_modules/lodash-es/_overArg.js
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
var overArg_default = overArg;
// node_modules/lodash-es/_getPrototype.js
var getPrototype = overArg_default(Object.getPrototypeOf, Object);
var getPrototype_default = getPrototype;
// node_modules/lodash-es/_isPrototype.js
var objectProto6 = Object.prototype;
function isPrototype(value) {
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto6;
return value === proto;
}
var isPrototype_default = isPrototype;
// node_modules/lodash-es/_initCloneObject.js
function initCloneObject(object) {
return typeof object.constructor == "function" && !isPrototype_default(object) ? baseCreate_default(getPrototype_default(object)) : {};
}
var initCloneObject_default = initCloneObject;
// node_modules/lodash-es/isObjectLike.js
function isObjectLike(value) {
return value != null && typeof value == "object";
}
var isObjectLike_default = isObjectLike;
// node_modules/lodash-es/_baseIsArguments.js
var argsTag = "[object Arguments]";
function baseIsArguments(value) {
return isObjectLike_default(value) && baseGetTag_default(value) == argsTag;
}
var baseIsArguments_default = baseIsArguments;
// node_modules/lodash-es/isArguments.js
var objectProto7 = Object.prototype;
var hasOwnProperty5 = objectProto7.hasOwnProperty;
var propertyIsEnumerable = objectProto7.propertyIsEnumerable;
var isArguments = baseIsArguments_default(/* @__PURE__ */ function() {
return arguments;
}()) ? baseIsArguments_default : function(value) {
return isObjectLike_default(value) && hasOwnProperty5.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
};
var isArguments_default = isArguments;
// node_modules/lodash-es/isArray.js
var isArray = Array.isArray;
var isArray_default = isArray;
// node_modules/lodash-es/isLength.js
var MAX_SAFE_INTEGER = 9007199254740991;
function isLength(value) {
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
var isLength_default = isLength;
// node_modules/lodash-es/isArrayLike.js
function isArrayLike(value) {
return value != null && isLength_default(value.length) && !isFunction_default(value);
}
var isArrayLike_default = isArrayLike;
// node_modules/lodash-es/isArrayLikeObject.js
function isArrayLikeObject(value) {
return isObjectLike_default(value) && isArrayLike_default(value);
}
var isArrayLikeObject_default = isArrayLikeObject;
// node_modules/lodash-es/stubFalse.js
function stubFalse() {
return false;
}
var stubFalse_default = stubFalse;
// node_modules/lodash-es/isBuffer.js
var freeExports2 = typeof exports == "object" && exports && !exports.nodeType && exports;
var freeModule2 = freeExports2 && typeof module == "object" && module && !module.nodeType && module;
var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;
var Buffer2 = moduleExports2 ? root_default2.Buffer : void 0;
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
var isBuffer = nativeIsBuffer || stubFalse_default;
var isBuffer_default = isBuffer;
// node_modules/lodash-es/isPlainObject.js
var objectTag = "[object Object]";
var funcProto3 = Function.prototype;
var objectProto8 = Object.prototype;
var funcToString3 = funcProto3.toString;
var hasOwnProperty6 = objectProto8.hasOwnProperty;
var objectCtorString = funcToString3.call(Object);
function isPlainObject(value) {
if (!isObjectLike_default(value) || baseGetTag_default(value) != objectTag) {
return false;
}
var proto = getPrototype_default(value);
if (proto === null) {
return true;
}
var Ctor = hasOwnProperty6.call(proto, "constructor") && proto.constructor;
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString3.call(Ctor) == objectCtorString;
}
var isPlainObject_default = isPlainObject;
// node_modules/lodash-es/_baseIsTypedArray.js
var argsTag2 = "[object Arguments]";
var arrayTag = "[object Array]";
var boolTag = "[object Boolean]";
var dateTag = "[object Date]";
var errorTag = "[object Error]";
var funcTag2 = "[object Function]";
var mapTag = "[object Map]";
var numberTag = "[object Number]";
var objectTag2 = "[object Object]";
var regexpTag = "[object RegExp]";
var setTag = "[object Set]";
var stringTag = "[object String]";
var weakMapTag = "[object WeakMap]";
var arrayBufferTag = "[object ArrayBuffer]";
var dataViewTag = "[object DataView]";
var float32Tag = "[object Float32Array]";
var float64Tag = "[object Float64Array]";
var int8Tag = "[object Int8Array]";
var int16Tag = "[object Int16Array]";
var int32Tag = "[object Int32Array]";
var uint8Tag = "[object Uint8Array]";
var uint8ClampedTag = "[object Uint8ClampedArray]";
var uint16Tag = "[object Uint16Array]";
var uint32Tag = "[object Uint32Array]";
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag2] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag2] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag2] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
function baseIsTypedArray(value) {
return isObjectLike_default(value) && isLength_default(value.length) && !!typedArrayTags[baseGetTag_default(value)];
}
var baseIsTypedArray_default = baseIsTypedArray;
// node_modules/lodash-es/_baseUnary.js
function baseUnary(func) {
return function(value) {
return func(value);
};
}
var baseUnary_default = baseUnary;
// node_modules/lodash-es/_nodeUtil.js
var freeExports3 = typeof exports == "object" && exports && !exports.nodeType && exports;
var freeModule3 = freeExports3 && typeof module == "object" && module && !module.nodeType && module;
var moduleExports3 = freeModule3 && freeModule3.exports === freeExports3;
var freeProcess = moduleExports3 && freeGlobal_default.process;
var nodeUtil = function() {
try {
var types = freeModule3 && freeModule3.require && freeModule3.require("util").types;
if (types) {
return types;
}
return freeProcess && freeProcess.binding && freeProcess.binding("util");
} catch (e) {
}
}();
var nodeUtil_default = nodeUtil;
// node_modules/lodash-es/isTypedArray.js
var nodeIsTypedArray = nodeUtil_default && nodeUtil_default.isTypedArray;
var isTypedArray = nodeIsTypedArray ? baseUnary_default(nodeIsTypedArray) : baseIsTypedArray_default;
var isTypedArray_default = isTypedArray;
// node_modules/lodash-es/_safeGet.js
function safeGet(object, key) {
if (key === "constructor" && typeof object[key] === "function") {
return;
}
if (key == "__proto__") {
return;
}
return object[key];
}
var safeGet_default = safeGet;
// node_modules/lodash-es/_assignValue.js
var objectProto9 = Object.prototype;
var hasOwnProperty7 = objectProto9.hasOwnProperty;
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty7.call(object, key) && eq_default(objValue, value)) || value === void 0 && !(key in object)) {
baseAssignValue_default(object, key, value);
}
}
var assignValue_default = assignValue;
// node_modules/lodash-es/_copyObject.js
function copyObject(source, props, object, customizer) {
var isNew = !object;
object || (object = {});
var index2 = -1, length2 = props.length;
while (++index2 < length2) {
var key = props[index2];
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
if (newValue === void 0) {
newValue = source[key];
}
if (isNew) {
baseAssignValue_default(object, key, newValue);
} else {
assignValue_default(object, key, newValue);
}
}
return object;
}
var copyObject_default = copyObject;
// node_modules/lodash-es/_baseTimes.js
function baseTimes(n, iteratee) {
var index2 = -1, result = Array(n);
while (++index2 < n) {
result[index2] = iteratee(index2);
}
return result;
}
var baseTimes_default = baseTimes;
// node_modules/lodash-es/_isIndex.js
var MAX_SAFE_INTEGER2 = 9007199254740991;
var reIsUint = /^(?:0|[1-9]\d*)$/;
function isIndex(value, length2) {
var type3 = typeof value;
length2 = length2 == null ? MAX_SAFE_INTEGER2 : length2;
return !!length2 && (type3 == "number" || type3 != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length2);
}
var isIndex_default = isIndex;
// node_modules/lodash-es/_arrayLikeKeys.js
var objectProto10 = Object.prototype;
var hasOwnProperty8 = objectProto10.hasOwnProperty;
function arrayLikeKeys(value, inherited) {
var isArr = isArray_default(value), isArg = !isArr && isArguments_default(value), isBuff = !isArr && !isArg && isBuffer_default(value), isType = !isArr && !isArg && !isBuff && isTypedArray_default(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes_default(value.length, String) : [], length2 = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty8.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
isIndex_default(key, length2)))) {
result.push(key);
}
}
return result;
}
var arrayLikeKeys_default = arrayLikeKeys;
// node_modules/lodash-es/_nativeKeysIn.js
function nativeKeysIn(object) {
var result = [];
if (object != null) {
for (var key in Object(object)) {
result.push(key);
}
}
return result;
}
var nativeKeysIn_default = nativeKeysIn;
// node_modules/lodash-es/_baseKeysIn.js
var objectProto11 = Object.prototype;
var hasOwnProperty9 = objectProto11.hasOwnProperty;
function baseKeysIn(object) {
if (!isObject_default(object)) {
return nativeKeysIn_default(object);
}
var isProto = isPrototype_default(object), result = [];
for (var key in object) {
if (!(key == "constructor" && (isProto || !hasOwnProperty9.call(object, key)))) {
result.push(key);
}
}
return result;
}
var baseKeysIn_default = baseKeysIn;
// node_modules/lodash-es/keysIn.js
function keysIn(object) {
return isArrayLike_default(object) ? arrayLikeKeys_default(object, true) : baseKeysIn_default(object);
}
var keysIn_default = keysIn;
// node_modules/lodash-es/toPlainObject.js
function toPlainObject(value) {
return copyObject_default(value, keysIn_default(value));
}
var toPlainObject_default = toPlainObject;
// node_modules/lodash-es/_baseMergeDeep.js
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = safeGet_default(object, key), srcValue = safeGet_default(source, key), stacked = stack.get(srcValue);
if (stacked) {
assignMergeValue_default(object, key, stacked);
return;
}
var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
var isCommon = newValue === void 0;
if (isCommon) {
var isArr = isArray_default(srcValue), isBuff = !isArr && isBuffer_default(srcValue), isTyped = !isArr && !isBuff && isTypedArray_default(srcValue);
newValue = srcValue;
if (isArr || isBuff || isTyped) {
if (isArray_default(objValue)) {
newValue = objValue;
} else if (isArrayLikeObject_default(objValue)) {
newValue = copyArray_default(objValue);
} else if (isBuff) {
isCommon = false;
newValue = cloneBuffer_default(srcValue, true);
} else if (isTyped) {
isCommon = false;
newValue = cloneTypedArray_default(srcValue, true);
} else {
newValue = [];
}
} else if (isPlainObject_default(srcValue) || isArguments_default(srcValue)) {
newValue = objValue;
if (isArguments_default(objValue)) {
newValue = toPlainObject_default(objValue);
} else if (!isObject_default(objValue) || isFunction_default(objValue)) {
newValue = initCloneObject_default(srcValue);
}
} else {
isCommon = false;
}
}
if (isCommon) {
stack.set(srcValue, newValue);
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
stack["delete"](srcValue);
}
assignMergeValue_default(object, key, newValue);
}
var baseMergeDeep_default = baseMergeDeep;
// node_modules/lodash-es/_baseMerge.js
function baseMerge(object, source, srcIndex, customizer, stack) {
if (object === source) {
return;
}
baseFor_default(source, function(srcValue, key) {
stack || (stack = new Stack_default());
if (isObject_default(srcValue)) {
baseMergeDeep_default(object, source, key, srcIndex, baseMerge, customizer, stack);
} else {
var newValue = customizer ? customizer(safeGet_default(object, key), srcValue, key + "", object, source, stack) : void 0;
if (newValue === void 0) {
newValue = srcValue;
}
assignMergeValue_default(object, key, newValue);
}
}, keysIn_default);
}
var baseMerge_default = baseMerge;
// node_modules/lodash-es/identity.js
function identity4(value) {
return value;
}
var identity_default6 = identity4;
// node_modules/lodash-es/_apply.js
function apply(func, thisArg, args) {
switch (args.length) {
case 0:
return func.call(thisArg);
case 1:
return func.call(thisArg, args[0]);
case 2:
return func.call(thisArg, args[0], args[1]);
case 3:
return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
var apply_default = apply;
// node_modules/lodash-es/_overRest.js
var nativeMax = Math.max;
function overRest(func, start, transform) {
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
return function() {
var args = arguments, index2 = -1, length2 = nativeMax(args.length - start, 0), array3 = Array(length2);
while (++index2 < length2) {
array3[index2] = args[start + index2];
}
index2 = -1;
var otherArgs = Array(start + 1);
while (++index2 < start) {
otherArgs[index2] = args[index2];
}
otherArgs[start] = transform(array3);
return apply_default(func, this, otherArgs);
};
}
var overRest_default = overRest;
// node_modules/lodash-es/constant.js
function constant2(value) {
return function() {
return value;
};
}
var constant_default8 = constant2;
// node_modules/lodash-es/_baseSetToString.js
var baseSetToString = !defineProperty_default ? identity_default6 : function(func, string) {
return defineProperty_default(func, "toString", {
"configurable": true,
"enumerable": false,
"value": constant_default8(string),
"writable": true
});
};
var baseSetToString_default = baseSetToString;
// node_modules/lodash-es/_shortOut.js
var HOT_COUNT = 800;
var HOT_SPAN = 16;
var nativeNow = Date.now;
function shortOut(func) {
var count3 = 0, lastCalled = 0;
return function() {
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
if (++count3 >= HOT_COUNT) {
return arguments[0];
}
} else {
count3 = 0;
}
return func.apply(void 0, arguments);
};
}
var shortOut_default = shortOut;
// node_modules/lodash-es/_setToString.js
var setToString = shortOut_default(baseSetToString_default);
var setToString_default = setToString;
// node_modules/lodash-es/_baseRest.js
function baseRest(func, start) {
return setToString_default(overRest_default(func, start, identity_default6), func + "");
}
var baseRest_default = baseRest;
// node_modules/lodash-es/_isIterateeCall.js
function isIterateeCall(value, index2, object) {
if (!isObject_default(object)) {
return false;
}
var type3 = typeof index2;
if (type3 == "number" ? isArrayLike_default(object) && isIndex_default(index2, object.length) : type3 == "string" && index2 in object) {
return eq_default(object[index2], value);
}
return false;
}
var isIterateeCall_default = isIterateeCall;
// node_modules/lodash-es/_createAssigner.js
function createAssigner(assigner) {
return baseRest_default(function(object, sources) {
var index2 = -1, length2 = sources.length, customizer = length2 > 1 ? sources[length2 - 1] : void 0, guard = length2 > 2 ? sources[2] : void 0;
customizer = assigner.length > 3 && typeof customizer == "function" ? (length2--, customizer) : void 0;
if (guard && isIterateeCall_default(sources[0], sources[1], guard)) {
customizer = length2 < 3 ? void 0 : customizer;
length2 = 1;
}
object = Object(object);
while (++index2 < length2) {
var source = sources[index2];
if (source) {
assigner(object, source, index2, customizer);
}
}
return object;
});
}
var createAssigner_default = createAssigner;
// node_modules/lodash-es/merge.js
var merge2 = createAssigner_default(function(object, source, srcIndex) {
baseMerge_default(object, source, srcIndex);
});
var merge_default = merge2;
// node_modules/stylis/src/Enum.js
var COMMENT = "comm";
var RULESET = "rule";
var DECLARATION = "decl";
var IMPORT = "@import";
var KEYFRAMES = "@keyframes";
var LAYER = "@layer";
// node_modules/stylis/src/Utility.js
var abs5 = Math.abs;
var from = String.fromCharCode;
function trim(value) {
return value.trim();
}
function replace(value, pattern, replacement) {
return value.replace(pattern, replacement);
}
function indexof(value, search, position2) {
return value.indexOf(search, position2);
}
function charat(value, index2) {
return value.charCodeAt(index2) | 0;
}
function substr(value, begin, end) {
return value.slice(begin, end);
}
function strlen(value) {
return value.length;
}
function sizeof(value) {
return value.length;
}
function append2(value, array3) {
return array3.push(value), value;
}
// node_modules/stylis/src/Tokenizer.js
var line = 1;
var column = 1;
var length = 0;
var position = 0;
var character = 0;
var characters = "";
function node(value, root2, parent, type3, props, children, length2, siblings) {
return { value, root: root2, parent, type: type3, props, children, line, column, length: length2, return: "", siblings };
}
function char() {
return character;
}
function prev() {
character = position > 0 ? charat(characters, --position) : 0;
if (column--, character === 10)
column = 1, line--;
return character;
}
function next() {
character = position < length ? charat(characters, position++) : 0;
if (column++, character === 10)
column = 1, line++;
return character;
}
function peek() {
return charat(characters, position);
}
function caret() {
return position;
}
function slice5(begin, end) {
return substr(characters, begin, end);
}
function token(type3) {
switch (type3) {
case 0:
case 9:
case 10:
case 13:
case 32:
return 5;
case 33:
case 43:
case 44:
case 47:
case 62:
case 64:
case 126:
case 59:
case 123:
case 125:
return 4;
case 58:
return 3;
case 34:
case 39:
case 40:
case 91:
return 2;
case 41:
case 93:
return 1;
}
return 0;
}
function alloc(value) {
return line = column = 1, length = strlen(characters = value), position = 0, [];
}
function dealloc(value) {
return characters = "", value;
}
function delimit(type3) {
return trim(slice5(position - 1, delimiter(type3 === 91 ? type3 + 2 : type3 === 40 ? type3 + 1 : type3)));
}
function whitespace(type3) {
while (character = peek())
if (character < 33)
next();
else
break;
return token(type3) > 2 || token(character) > 3 ? "" : " ";
}
function escaping(index2, count3) {
while (--count3 && next())
if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
break;
return slice5(index2, caret() + (count3 < 6 && peek() == 32 && next() == 32));
}
function delimiter(type3) {
while (next())
switch (character) {
case type3:
return position;
case 34:
case 39:
if (type3 !== 34 && type3 !== 39)
delimiter(character);
break;
case 40:
if (type3 === 41)
delimiter(type3);
break;
case 92:
next();
break;
}
return position;
}
function commenter(type3, index2) {
while (next())
if (type3 + character === 47 + 10)
break;
else if (type3 + character === 42 + 42 && peek() === 47)
break;
return "/*" + slice5(index2, position - 1) + "*" + from(type3 === 47 ? type3 : next());
}
function identifier(index2) {
while (!token(peek()))
next();
return slice5(index2, position);
}
// node_modules/stylis/src/Parser.js
function compile(value) {
return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
}
function parse(value, root2, parent, rule, rules, rulesets, pseudo, points, declarations) {
var index2 = 0;
var offset = 0;
var length2 = pseudo;
var atrule = 0;
var property = 0;
var previous = 0;
var variable = 1;
var scanning = 1;
var ampersand = 1;
var character2 = 0;
var type3 = "";
var props = rules;
var children = rulesets;
var reference = rule;
var characters2 = type3;
while (scanning)
switch (previous = character2, character2 = next()) {
case 40:
if (previous != 108 && charat(characters2, length2 - 1) == 58) {
if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f", abs5(index2 ? points[index2 - 1] : 0)) != -1)
ampersand = -1;
break;
}
case 34:
case 39:
case 91:
characters2 += delimit(character2);
break;
case 9:
case 10:
case 13:
case 32:
characters2 += whitespace(previous);
break;
case 92:
characters2 += escaping(caret() - 1, 7);
continue;
case 47:
switch (peek()) {
case 42:
case 47:
append2(comment(commenter(next(), caret()), root2, parent, declarations), declarations);
break;
default:
characters2 += "/";
}
break;
case 123 * variable:
points[index2++] = strlen(characters2) * ampersand;
case 125 * variable:
case 59:
case 0:
switch (character2) {
case 0:
case 125:
scanning = 0;
case 59 + offset:
if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
if (property > 0 && strlen(characters2) - length2)
append2(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1, declarations) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2, declarations), declarations);
break;
case 59:
characters2 += ";";
default:
append2(reference = ruleset(characters2, root2, parent, index2, offset, rules, points, type3, props = [], children = [], length2, rulesets), rulesets);
if (character2 === 123)
if (offset === 0)
parse(characters2, root2, reference, reference, props, rulesets, length2, points, children);
else
switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
case 100:
case 108:
case 109:
case 115:
parse(value, reference, reference, rule && append2(ruleset(value, reference, reference, 0, 0, rules, points, type3, rules, props = [], length2, children), children), rules, children, length2, points, rule ? props : children);
break;
default:
parse(characters2, reference, reference, reference, [""], children, 0, points, children);
}
}
index2 = offset = property = 0, variable = ampersand = 1, type3 = characters2 = "", length2 = pseudo;
break;
case 58:
length2 = 1 + strlen(characters2), property = previous;
default:
if (variable < 1) {
if (character2 == 123)
--variable;
else if (character2 == 125 && variable++ == 0 && prev() == 125)
continue;
}
switch (characters2 += from(character2), character2 * variable) {
case 38:
ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
break;
case 44:
points[index2++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
break;
case 64:
if (peek() === 45)
characters2 += delimit(next());
atrule = peek(), offset = length2 = strlen(type3 = characters2 += identifier(caret())), character2++;
break;
case 45:
if (previous === 45 && strlen(characters2) == 2)
variable = 0;
}
}
return rulesets;
}
function ruleset(value, root2, parent, index2, offset, rules, points, type3, props, children, length2, siblings) {
var post = offset - 1;
var rule = offset === 0 ? rules : [""];
var size = sizeof(rule);
for (var i = 0, j = 0, k2 = 0; i < index2; ++i)
for (var x3 = 0, y3 = substr(value, post + 1, post = abs5(j = points[i])), z = value; x3 < size; ++x3)
if (z = trim(j > 0 ? rule[x3] + " " + y3 : replace(y3, /&\f/g, rule[x3])))
props[k2++] = z;
return node(value, root2, parent, offset === 0 ? RULESET : type3, props, children, length2, siblings);
}
function comment(value, root2, parent, siblings) {
return node(value, root2, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings);
}
function declaration(value, root2, parent, length2, siblings) {
return node(value, root2, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2, siblings);
}
// node_modules/stylis/src/Serializer.js
function serialize(children, callback) {
var output = "";
for (var i = 0; i < children.length; i++)
output += callback(children[i], i, children, callback) || "";
return output;
}
function stringify(element, index2, children, callback) {
switch (element.type) {
case LAYER:
if (element.children.length) break;
case IMPORT:
case DECLARATION:
return element.return = element.return || element.value;
case COMMENT:
return "";
case KEYFRAMES:
return element.return = element.value + "{" + serialize(element.children, callback) + "}";
case RULESET:
if (!strlen(element.value = element.props.join(","))) return "";
}
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
}
// node_modules/lodash-es/_nativeKeys.js
var nativeKeys = overArg_default(Object.keys, Object);
var nativeKeys_default = nativeKeys;
// node_modules/lodash-es/_baseKeys.js
var objectProto12 = Object.prototype;
var hasOwnProperty10 = objectProto12.hasOwnProperty;
function baseKeys(object) {
if (!isPrototype_default(object)) {
return nativeKeys_default(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty10.call(object, key) && key != "constructor") {
result.push(key);
}
}
return result;
}
var baseKeys_default = baseKeys;
// node_modules/lodash-es/_DataView.js
var DataView = getNative_default(root_default2, "DataView");
var DataView_default = DataView;
// node_modules/lodash-es/_Promise.js
var Promise2 = getNative_default(root_default2, "Promise");
var Promise_default = Promise2;
// node_modules/lodash-es/_Set.js
var Set2 = getNative_default(root_default2, "Set");
var Set_default = Set2;
// node_modules/lodash-es/_WeakMap.js
var WeakMap = getNative_default(root_default2, "WeakMap");
var WeakMap_default = WeakMap;
// node_modules/lodash-es/_getTag.js
var mapTag2 = "[object Map]";
var objectTag3 = "[object Object]";
var promiseTag = "[object Promise]";
var setTag2 = "[object Set]";
var weakMapTag2 = "[object WeakMap]";
var dataViewTag2 = "[object DataView]";
var dataViewCtorString = toSource_default(DataView_default);
var mapCtorString = toSource_default(Map_default);
var promiseCtorString = toSource_default(Promise_default);
var setCtorString = toSource_default(Set_default);
var weakMapCtorString = toSource_default(WeakMap_default);
var getTag = baseGetTag_default;
if (DataView_default && getTag(new DataView_default(new ArrayBuffer(1))) != dataViewTag2 || Map_default && getTag(new Map_default()) != mapTag2 || Promise_default && getTag(Promise_default.resolve()) != promiseTag || Set_default && getTag(new Set_default()) != setTag2 || WeakMap_default && getTag(new WeakMap_default()) != weakMapTag2) {
getTag = function(value) {
var result = baseGetTag_default(value), Ctor = result == objectTag3 ? value.constructor : void 0, ctorString = Ctor ? toSource_default(Ctor) : "";
if (ctorString) {
switch (ctorString) {
case dataViewCtorString:
return dataViewTag2;
case mapCtorString:
return mapTag2;
case promiseCtorString:
return promiseTag;
case setCtorString:
return setTag2;
case weakMapCtorString:
return weakMapTag2;
}
}
return result;
};
}
var getTag_default = getTag;
// node_modules/lodash-es/isEmpty.js
var mapTag3 = "[object Map]";
var setTag3 = "[object Set]";
var objectProto13 = Object.prototype;
var hasOwnProperty11 = objectProto13.hasOwnProperty;
function isEmpty(value) {
if (value == null) {
return true;
}
if (isArrayLike_default(value) && (isArray_default(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer_default(value) || isTypedArray_default(value) || isArguments_default(value))) {
return !value.length;
}
var tag = getTag_default(value);
if (tag == mapTag3 || tag == setTag3) {
return !value.size;
}
if (isPrototype_default(value)) {
return !baseKeys_default(value).length;
}
for (var key in value) {
if (hasOwnProperty11.call(value, key)) {
return false;
}
}
return true;
}
var isEmpty_default = isEmpty;
// node_modules/mermaid/dist/mermaid-6dc72991.js
var import_dayjs = __toESM(require_dayjs_min(), 1);
var import_sanitize_url = __toESM(require_dist(), 1);
var LEVELS = {
trace: 0,
debug: 1,
info: 2,
warn: 3,
error: 4,
fatal: 5
};
var log$1 = {
trace: (..._args) => {
},
debug: (..._args) => {
},
info: (..._args) => {
},
warn: (..._args) => {
},
error: (..._args) => {
},
fatal: (..._args) => {
}
};
var setLogLevel$1 = function(level = "fatal") {
let numericLevel = LEVELS.fatal;
if (typeof level === "string") {
level = level.toLowerCase();
if (level in LEVELS) {
numericLevel = LEVELS[level];
}
} else if (typeof level === "number") {
numericLevel = level;
}
log$1.trace = () => {
};
log$1.debug = () => {
};
log$1.info = () => {
};
log$1.warn = () => {
};
log$1.error = () => {
};
log$1.fatal = () => {
};
if (numericLevel <= LEVELS.fatal) {
log$1.fatal = console.error ? console.error.bind(console, format2("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", format2("FATAL"));
}
if (numericLevel <= LEVELS.error) {
log$1.error = console.error ? console.error.bind(console, format2("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", format2("ERROR"));
}
if (numericLevel <= LEVELS.warn) {
log$1.warn = console.warn ? console.warn.bind(console, format2("WARN"), "color: orange") : console.log.bind(console, `\x1B[33m`, format2("WARN"));
}
if (numericLevel <= LEVELS.info) {
log$1.info = console.info ? console.info.bind(console, format2("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", format2("INFO"));
}
if (numericLevel <= LEVELS.debug) {
log$1.debug = console.debug ? console.debug.bind(console, format2("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format2("DEBUG"));
}
if (numericLevel <= LEVELS.trace) {
log$1.trace = console.debug ? console.debug.bind(console, format2("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", format2("TRACE"));
}
};
var format2 = (level) => {
const time2 = (0, import_dayjs.default)().format("ss.SSS");
return `%c${time2} : ${level} : `;
};
var lineBreakRegex = /
/gi;
var getRows = (s2) => {
if (!s2) {
return [""];
}
const str2 = breakToPlaceholder(s2).replace(/\\n/g, "#br#");
return str2.split("#br#");
};
var setupDompurifyHooksIfNotSetup = /* @__PURE__ */ (() => {
let setup = false;
return () => {
if (!setup) {
setupDompurifyHooks();
setup = true;
}
};
})();
function setupDompurifyHooks() {
const TEMPORARY_ATTRIBUTE = "data-temp-href-target";
purify.addHook("beforeSanitizeAttributes", (node2) => {
if (node2.tagName === "A" && node2.hasAttribute("target")) {
node2.setAttribute(TEMPORARY_ATTRIBUTE, node2.getAttribute("target") || "");
}
});
purify.addHook("afterSanitizeAttributes", (node2) => {
if (node2.tagName === "A" && node2.hasAttribute(TEMPORARY_ATTRIBUTE)) {
node2.setAttribute("target", node2.getAttribute(TEMPORARY_ATTRIBUTE) || "");
node2.removeAttribute(TEMPORARY_ATTRIBUTE);
if (node2.getAttribute("target") === "_blank") {
node2.setAttribute("rel", "noopener");
}
}
});
}
var removeScript = (txt) => {
setupDompurifyHooksIfNotSetup();
const sanitizedText = purify.sanitize(txt);
return sanitizedText;
};
var sanitizeMore = (text, config2) => {
var _a;
if (((_a = config2.flowchart) == null ? void 0 : _a.htmlLabels) !== false) {
const level = config2.securityLevel;
if (level === "antiscript" || level === "strict") {
text = removeScript(text);
} else if (level !== "loose") {
text = breakToPlaceholder(text);
text = text.replace(//g, ">");
text = text.replace(/=/g, "=");
text = placeholderToBreak(text);
}
}
return text;
};
var sanitizeText$2 = (text, config2) => {
if (!text) {
return text;
}
if (config2.dompurifyConfig) {
text = purify.sanitize(sanitizeMore(text, config2), config2.dompurifyConfig).toString();
} else {
text = purify.sanitize(sanitizeMore(text, config2), {
FORBID_TAGS: ["style"]
}).toString();
}
return text;
};
var sanitizeTextOrArray = (a2, config2) => {
if (typeof a2 === "string") {
return sanitizeText$2(a2, config2);
}
return a2.flat().map((x3) => sanitizeText$2(x3, config2));
};
var hasBreaks = (text) => {
return lineBreakRegex.test(text);
};
var splitBreaks = (text) => {
return text.split(lineBreakRegex);
};
var placeholderToBreak = (s2) => {
return s2.replace(/#br#/g, "
");
};
var breakToPlaceholder = (s2) => {
return s2.replace(lineBreakRegex, "#br#");
};
var getUrl = (useAbsolute) => {
let url = "";
if (useAbsolute) {
url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
url = url.replaceAll(/\(/g, "\\(");
url = url.replaceAll(/\)/g, "\\)");
}
return url;
};
var evaluate = (val) => val === false || ["false", "null", "0"].includes(String(val).trim().toLowerCase()) ? false : true;
var getMax = function(...values) {
const newValues = values.filter((value) => {
return !isNaN(value);
});
return Math.max(...newValues);
};
var getMin = function(...values) {
const newValues = values.filter((value) => {
return !isNaN(value);
});
return Math.min(...newValues);
};
var parseGenericTypes = function(input) {
const inputSets = input.split(/(,)/);
const output = [];
for (let i = 0; i < inputSets.length; i++) {
let thisSet = inputSets[i];
if (thisSet === "," && i > 0 && i + 1 < inputSets.length) {
const previousSet = inputSets[i - 1];
const nextSet = inputSets[i + 1];
if (shouldCombineSets(previousSet, nextSet)) {
thisSet = previousSet + "," + nextSet;
i++;
output.pop();
}
}
output.push(processSet(thisSet));
}
return output.join("");
};
var countOccurrence = (string, substring) => {
return Math.max(0, string.split(substring).length - 1);
};
var shouldCombineSets = (previousSet, nextSet) => {
const prevCount = countOccurrence(previousSet, "~");
const nextCount = countOccurrence(nextSet, "~");
return prevCount === 1 && nextCount === 1;
};
var processSet = (input) => {
const tildeCount = countOccurrence(input, "~");
let hasStartingTilde = false;
if (tildeCount <= 1) {
return input;
}
if (tildeCount % 2 !== 0 && input.startsWith("~")) {
input = input.substring(1);
hasStartingTilde = true;
}
const chars = [...input];
let first = chars.indexOf("~");
let last = chars.lastIndexOf("~");
while (first !== -1 && last !== -1 && first !== last) {
chars[first] = "<";
chars[last] = ">";
first = chars.indexOf("~");
last = chars.lastIndexOf("~");
}
if (hasStartingTilde) {
chars.unshift("~");
}
return chars.join("");
};
var isMathMLSupported = () => window.MathMLElement !== void 0;
var katexRegex = /\$\$(.*)\$\$/g;
var hasKatex = (text) => {
var _a;
return (((_a = text.match(katexRegex)) == null ? void 0 : _a.length) ?? 0) > 0;
};
var calculateMathMLDimensions = async (text, config2) => {
text = await renderKatex(text, config2);
const divElem = document.createElement("div");
divElem.innerHTML = text;
divElem.id = "katex-temp";
divElem.style.visibility = "hidden";
divElem.style.position = "absolute";
divElem.style.top = "0";
const body = document.querySelector("body");
body == null ? void 0 : body.insertAdjacentElement("beforeend", divElem);
const dim = { width: divElem.clientWidth, height: divElem.clientHeight };
divElem.remove();
return dim;
};
var renderKatex = async (text, config2) => {
if (!hasKatex(text)) {
return text;
}
if (!isMathMLSupported() && !config2.legacyMathML) {
return text.replace(katexRegex, "MathML is unsupported in this environment.");
}
const { default: katex } = await import("./katex.js");
return text.split(lineBreakRegex).map(
(line2) => hasKatex(line2) ? `