|
|
"use strict";
|
|
|
(self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([[5321],{
|
|
|
|
|
|
/***/ 35321:
|
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Nb1: () => (/* reexport */ arc/* default */.Z),
|
|
|
LLu: () => (/* reexport */ axisBottom),
|
|
|
F5q: () => (/* reexport */ axisTop),
|
|
|
$0Z: () => (/* reexport */ basis/* default */.ZP),
|
|
|
Dts: () => (/* reexport */ basisClosed/* default */.Z),
|
|
|
WQY: () => (/* reexport */ basisOpen/* default */.Z),
|
|
|
qpX: () => (/* reexport */ bumpX),
|
|
|
u93: () => (/* reexport */ bumpY),
|
|
|
tFB: () => (/* reexport */ bundle/* default */.Z),
|
|
|
YY7: () => (/* reexport */ cardinal/* default */.ZP),
|
|
|
OvA: () => (/* reexport */ cardinalClosed/* default */.Z),
|
|
|
dCK: () => (/* reexport */ cardinalOpen/* default */.Z),
|
|
|
zgE: () => (/* reexport */ catmullRom/* default */.Z),
|
|
|
fGX: () => (/* reexport */ catmullRomClosed/* default */.Z),
|
|
|
$m7: () => (/* reexport */ catmullRomOpen/* default */.Z),
|
|
|
c_6: () => (/* reexport */ curve_linear/* default */.Z),
|
|
|
fxm: () => (/* reexport */ linearClosed/* default */.Z),
|
|
|
FdL: () => (/* reexport */ monotone/* monotoneX */.Z),
|
|
|
ak_: () => (/* reexport */ monotone/* monotoneY */.s),
|
|
|
SxZ: () => (/* reexport */ natural/* default */.Z),
|
|
|
eA_: () => (/* reexport */ step/* default */.ZP),
|
|
|
jsv: () => (/* reexport */ step/* stepAfter */.cD),
|
|
|
iJ: () => (/* reexport */ step/* stepBefore */.RN),
|
|
|
WUZ: () => (/* reexport */ defaultLocale/* format */.WU),
|
|
|
bT9: () => (/* reexport */ hierarchy/* default */.ZP),
|
|
|
JHv: () => (/* reexport */ src.interpolateHcl),
|
|
|
jvg: () => (/* reexport */ line/* default */.Z),
|
|
|
Fp7: () => (/* reexport */ max/* default */.Z),
|
|
|
VV$: () => (/* reexport */ min/* default */.Z),
|
|
|
ve8: () => (/* reexport */ pie),
|
|
|
tiA: () => (/* reexport */ band),
|
|
|
BYU: () => (/* reexport */ linear/* default */.Z),
|
|
|
PKp: () => (/* reexport */ ordinal/* default */.Z),
|
|
|
Xf: () => (/* reexport */ time/* default */.Z),
|
|
|
K2I: () => (/* reexport */ Tableau10),
|
|
|
Ys: () => (/* reexport */ src_select),
|
|
|
rr1: () => (/* reexport */ day/* timeDay */.rr),
|
|
|
i$Z: () => (/* reexport */ src_defaultLocale/* timeFormat */.i$),
|
|
|
y2j: () => (/* reexport */ week/* timeFriday */.y2),
|
|
|
WQD: () => (/* reexport */ hour/* timeHour */.WQ),
|
|
|
U8T: () => (/* reexport */ millisecond/* millisecond */.A),
|
|
|
Z_i: () => (/* reexport */ minute/* timeMinute */.Z_),
|
|
|
Ox9: () => (/* reexport */ week/* timeMonday */.Ox),
|
|
|
F0B: () => (/* reexport */ month/* timeMonth */.F0),
|
|
|
LqH: () => (/* reexport */ week/* timeSaturday */.Lq),
|
|
|
S1K: () => (/* reexport */ second/* second */.E),
|
|
|
Zyz: () => (/* reexport */ week/* timeSunday */.Zy),
|
|
|
Igq: () => (/* reexport */ week/* timeThursday */.Ig),
|
|
|
YDX: () => (/* reexport */ week/* timeTuesday */.YD),
|
|
|
EFj: () => (/* reexport */ week/* timeWednesday */.EF),
|
|
|
pNI: () => (/* reexport */ treemap/* default */.Z)
|
|
|
});
|
|
|
|
|
|
// UNUSED EXPORTS: Adder, Delaunay, FormatSpecifier, InternMap, InternSet, Node, Path, Voronoi, ZoomTransform, active, area, areaRadial, ascending, autoType, axisLeft, axisRight, bin, bisect, bisectCenter, bisectLeft, bisectRight, bisector, blob, blur, blur2, blurImage, brush, brushSelection, brushX, brushY, buffer, chord, chordDirected, chordTranspose, cluster, color, contourDensity, contours, count, create, creator, cross, csv, csvFormat, csvFormatBody, csvFormatRow, csvFormatRows, csvFormatValue, csvParse, csvParseRows, cubehelix, cumsum, descending, deviation, difference, disjoint, dispatch, drag, dragDisable, dragEnable, dsv, dsvFormat, easeBack, easeBackIn, easeBackInOut, easeBackOut, easeBounce, easeBounceIn, easeBounceInOut, easeBounceOut, easeCircle, easeCircleIn, easeCircleInOut, easeCircleOut, easeCubic, easeCubicIn, easeCubicInOut, easeCubicOut, easeElastic, easeElasticIn, easeElasticInOut, easeElasticOut, easeExp, easeExpIn, easeExpInOut, easeExpOut, easeLinear, easePoly, easePolyIn, easePolyInOut, easePolyOut, easeQuad, easeQuadIn, easeQuadInOut, easeQuadOut, easeSin, easeSinIn, easeSinInOut, easeSinOut, every, extent, fcumsum, filter, flatGroup, flatRollup, forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY, formatDefaultLocale, formatLocale, formatPrefix, formatSpecifier, fsum, geoAlbers, geoAlbersUsa, geoArea, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoContains, geoDistance, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoGraticule, geoGraticule10, geoIdentity, geoInterpolate, geoLength, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoPath, geoProjection, geoProjectionMutator, geoRotation, geoStereographic, geoStereographicRaw, geoStream, geoTransform, geoTransverseMercator, geoTransverseMercatorRaw, gray, greatest, greatestIndex, group, groupSort, groups, hcl, histogram, hsl, html, image, index, indexes, interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateBlues, interpolateBrBG, interpolateBuGn, interpolateBuPu, interpolateCividis, interpolateCool, interpolateCubehelix, interpolateCubehelixDefault, interpolateCubehelixLong, interpolateDate, interpolateDiscrete, interpolateGnBu, interpolateGreens, interpolateGreys, interpolateHclLong, interpolateHsl, interpolateHslLong, interpolateHue, interpolateInferno, interpolateLab, interpolateMagma, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateOrRd, interpolateOranges, interpolatePRGn, interpolatePiYG, interpolatePlasma, interpolatePuBu, interpolatePuBuGn, interpolatePuOr, interpolatePuRd, interpolatePurples, interpolateRainbow, interpolateRdBu, interpolateRdGy, interpolateRdPu, interpolateRdYlBu, interpolateRdYlGn, interpolateReds, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateRound, interpolateSinebow, interpolateSpectral, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateTurbo, interpolateViridis, interpolateWarm, interpolateYlGn, interpolateYlGnBu, interpolateYlOrBr, interpolateYlOrRd, interpolateZoom, interrupt, intersection, interval, isoFormat, isoParse, json, lab, lch, least, leastIndex, lineRadial, link, linkHorizontal, linkRadial, linkVertical, local, map, matcher, maxIndex, mean, median, medianIndex, merge, minIndex, mode, namespace, namespaces, nice, now, pack, packEnclose, packSiblings, pairs, partition, path, pathRound, permute, piecewise, pointRadial, pointer, pointers, polygonArea, polygonCentroid, polygonContains, polygonHull, polygonLength, precisionFixed, precisionPrefix, precisionRound, quadtree, quantile, quantileIndex, quantileSorted, quantize, quickselect, radialArea, radialLine, randomBates, randomBernoulli, randomBeta, randomBinomial, randomCauchy, randomExponential, randomGamma, randomGeometric, randomInt, randomIrwinHall, randomLcg, randomLogNormal, randomLogistic, randomNormal, randomPareto, randomPoisson, randomUniform, randomWeibull, range, rank, reduce, reverse, rgb, ribbon, ribbonArrow, rollup, rollups, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, scaleIdentity, scaleImplicit, scaleLog, scalePoint, scalePow, scaleQuantile, scaleQuantize, scaleRadial, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialQuantile, scaleSequentialSqrt, scaleSequentialSymlog, scaleSqrt, scaleSymlog, scaleThreshold, scaleUtc, scan, schemeAccent, schemeBlues, schemeBrBG, schemeBuGn, schemeBuPu, schemeCategory10, schemeDark2, schemeGnBu, schemeGreens, schemeGreys, schemeObservable10, schemeOrRd, schemeOranges, schemePRGn, schemePaired, schemePastel1, schemePastel2, schemePiYG, schemePuBu, schemePuBuGn, schemePuOr, schemePuRd, schemePurples, schemeRdBu, schemeRdGy, schemeRdPu, schemeRdYlBu, schemeRdYlGn, schemeReds, schemeSet1, schemeSet2, schemeSet3, schemeSpectral, schemeYlGn, schemeYlGnBu, schemeYlOrBr, schemeYlOrRd, selectAll, selection, selector, selectorAll, shuffle, shuffler, some, sort, stack, stackOffsetDiverging, stackOffsetExpand, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, stratify, style, subset, sum, superset, svg, symbol, symbolAsterisk, symbolCircle, symbolCross, symbolDiamond, symbolDiamond2, symbolPlus, symbolSquare, symbolSquare2, symbolStar, symbolTimes, symbolTriangle, symbolTriangle2, symbolWye, symbolX, symbols, symbolsFill, symbolsStroke, text, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, tickFormat, tickIncrement, tickStep, ticks, timeDays, timeFormatDefaultLocale, timeFormatLocale, timeFridays, timeHours, timeInterval, timeMilliseconds, timeMinutes, timeMondays, timeMonths, timeParse, timeSaturdays, timeSeconds, timeSundays, timeThursdays, timeTickInterval, timeTicks, timeTuesdays, timeWednesdays, timeWeek, timeWeeks, timeYear, timeYears, timeout, timer, timerFlush, transition, transpose, tree, treemapBinary, treemapDice, treemapResquarify, treemapSlice, treemapSliceDice, treemapSquarify, tsv, tsvFormat, tsvFormatBody, tsvFormatRow, tsvFormatRows, tsvFormatValue, tsvParse, tsvParseRows, union, unixDay, unixDays, utcDay, utcDays, utcFormat, utcFriday, utcFridays, utcHour, utcHours, utcMillisecond, utcMilliseconds, utcMinute, utcMinutes, utcMonday, utcMondays, utcMonth, utcMonths, utcParse, utcSaturday, utcSaturdays, utcSecond, utcSeconds, utcSunday, utcSundays, utcThursday, utcThursdays, utcTickInterval, utcTicks, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcWeek, utcWeeks, utcYear, utcYears, variance, window, xml, zip, zoom, zoomIdentity, zoomTransform
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-array/src/max.js
|
|
|
var max = __webpack_require__(53856);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-array/src/min.js
|
|
|
var min = __webpack_require__(93571);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-array/src/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Deprecated; use bin.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Deprecated; use leastIndex.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-axis/src/identity.js
|
|
|
/* harmony default export */ function src_identity(x) {
|
|
|
return x;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-axis/src/axis.js
|
|
|
|
|
|
|
|
|
var axis_top = 1,
|
|
|
right = 2,
|
|
|
bottom = 3,
|
|
|
left = 4,
|
|
|
epsilon = 1e-6;
|
|
|
|
|
|
function translateX(x) {
|
|
|
return "translate(" + x + ",0)";
|
|
|
}
|
|
|
|
|
|
function translateY(y) {
|
|
|
return "translate(0," + y + ")";
|
|
|
}
|
|
|
|
|
|
function number(scale) {
|
|
|
return d => +scale(d);
|
|
|
}
|
|
|
|
|
|
function center(scale, offset) {
|
|
|
offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;
|
|
|
if (scale.round()) offset = Math.round(offset);
|
|
|
return d => +scale(d) + offset;
|
|
|
}
|
|
|
|
|
|
function entering() {
|
|
|
return !this.__axis;
|
|
|
}
|
|
|
|
|
|
function axis(orient, scale) {
|
|
|
var tickArguments = [],
|
|
|
tickValues = null,
|
|
|
tickFormat = null,
|
|
|
tickSizeInner = 6,
|
|
|
tickSizeOuter = 6,
|
|
|
tickPadding = 3,
|
|
|
offset = typeof window !== "undefined" && window.devicePixelRatio > 1 ? 0 : 0.5,
|
|
|
k = orient === axis_top || orient === left ? -1 : 1,
|
|
|
x = orient === left || orient === right ? "x" : "y",
|
|
|
transform = orient === axis_top || orient === bottom ? translateX : translateY;
|
|
|
|
|
|
function axis(context) {
|
|
|
var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,
|
|
|
format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : src_identity) : tickFormat,
|
|
|
spacing = Math.max(tickSizeInner, 0) + tickPadding,
|
|
|
range = scale.range(),
|
|
|
range0 = +range[0] + offset,
|
|
|
range1 = +range[range.length - 1] + offset,
|
|
|
position = (scale.bandwidth ? center : number)(scale.copy(), offset),
|
|
|
selection = context.selection ? context.selection() : context,
|
|
|
path = selection.selectAll(".domain").data([null]),
|
|
|
tick = selection.selectAll(".tick").data(values, scale).order(),
|
|
|
tickExit = tick.exit(),
|
|
|
tickEnter = tick.enter().append("g").attr("class", "tick"),
|
|
|
line = tick.select("line"),
|
|
|
text = tick.select("text");
|
|
|
|
|
|
path = path.merge(path.enter().insert("path", ".tick")
|
|
|
.attr("class", "domain")
|
|
|
.attr("stroke", "currentColor"));
|
|
|
|
|
|
tick = tick.merge(tickEnter);
|
|
|
|
|
|
line = line.merge(tickEnter.append("line")
|
|
|
.attr("stroke", "currentColor")
|
|
|
.attr(x + "2", k * tickSizeInner));
|
|
|
|
|
|
text = text.merge(tickEnter.append("text")
|
|
|
.attr("fill", "currentColor")
|
|
|
.attr(x, k * spacing)
|
|
|
.attr("dy", orient === axis_top ? "0em" : orient === bottom ? "0.71em" : "0.32em"));
|
|
|
|
|
|
if (context !== selection) {
|
|
|
path = path.transition(context);
|
|
|
tick = tick.transition(context);
|
|
|
line = line.transition(context);
|
|
|
text = text.transition(context);
|
|
|
|
|
|
tickExit = tickExit.transition(context)
|
|
|
.attr("opacity", epsilon)
|
|
|
.attr("transform", function(d) { return isFinite(d = position(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 : position(d)) + offset); });
|
|
|
}
|
|
|
|
|
|
tickExit.remove();
|
|
|
|
|
|
path
|
|
|
.attr("d", orient === left || orient === right
|
|
|
? (tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H" + offset + "V" + range1 + "H" + k * tickSizeOuter : "M" + offset + "," + range0 + "V" + range1)
|
|
|
: (tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V" + offset + "H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + "," + offset + "H" + range1));
|
|
|
|
|
|
tick
|
|
|
.attr("opacity", 1)
|
|
|
.attr("transform", function(d) { return transform(position(d) + offset); });
|
|
|
|
|
|
line
|
|
|
.attr(x + "2", k * tickSizeInner);
|
|
|
|
|
|
text
|
|
|
.attr(x, k * spacing)
|
|
|
.text(format);
|
|
|
|
|
|
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 = position; });
|
|
|
}
|
|
|
|
|
|
axis.scale = function(_) {
|
|
|
return arguments.length ? (scale = _, axis) : scale;
|
|
|
};
|
|
|
|
|
|
axis.ticks = function() {
|
|
|
return tickArguments = Array.from(arguments), axis;
|
|
|
};
|
|
|
|
|
|
axis.tickArguments = function(_) {
|
|
|
return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis) : tickArguments.slice();
|
|
|
};
|
|
|
|
|
|
axis.tickValues = function(_) {
|
|
|
return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis) : tickValues && tickValues.slice();
|
|
|
};
|
|
|
|
|
|
axis.tickFormat = function(_) {
|
|
|
return arguments.length ? (tickFormat = _, axis) : tickFormat;
|
|
|
};
|
|
|
|
|
|
axis.tickSize = function(_) {
|
|
|
return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;
|
|
|
};
|
|
|
|
|
|
axis.tickSizeInner = function(_) {
|
|
|
return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;
|
|
|
};
|
|
|
|
|
|
axis.tickSizeOuter = function(_) {
|
|
|
return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;
|
|
|
};
|
|
|
|
|
|
axis.tickPadding = function(_) {
|
|
|
return arguments.length ? (tickPadding = +_, axis) : tickPadding;
|
|
|
};
|
|
|
|
|
|
axis.offset = function(_) {
|
|
|
return arguments.length ? (offset = +_, axis) : offset;
|
|
|
};
|
|
|
|
|
|
return axis;
|
|
|
}
|
|
|
|
|
|
function axisTop(scale) {
|
|
|
return axis(axis_top, scale);
|
|
|
}
|
|
|
|
|
|
function axisRight(scale) {
|
|
|
return axis(right, scale);
|
|
|
}
|
|
|
|
|
|
function axisBottom(scale) {
|
|
|
return axis(bottom, scale);
|
|
|
}
|
|
|
|
|
|
function axisLeft(scale) {
|
|
|
return axis(left, scale);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-axis/src/index.js
|
|
|
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selector.js
|
|
|
function none() {}
|
|
|
|
|
|
/* harmony default export */ function selector(selector) {
|
|
|
return selector == null ? none : function() {
|
|
|
return this.querySelector(selector);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/select.js
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ function selection_select(select) {
|
|
|
if (typeof select !== "function") select = selector(select);
|
|
|
|
|
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
|
if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
|
|
|
if ("__data__" in node) subnode.__data__ = node.__data__;
|
|
|
subgroup[i] = subnode;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return new Selection(subgroups, this._parents);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/array.js
|
|
|
// Given something array like (or null), returns something that is strictly an
|
|
|
// array. This is used to ensure that array-like objects passed to d3.selectAll
|
|
|
// or selection.selectAll are converted into proper arrays when creating a
|
|
|
// selection; we don’t ever want to create a selection backed by a live
|
|
|
// HTMLCollection or NodeList. However, note that selection.selectAll will use a
|
|
|
// static NodeList as a group, since it safely derived from querySelectorAll.
|
|
|
function array(x) {
|
|
|
return x == null ? [] : Array.isArray(x) ? x : Array.from(x);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selectorAll.js
|
|
|
function empty() {
|
|
|
return [];
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function selectorAll(selector) {
|
|
|
return selector == null ? empty : function() {
|
|
|
return this.querySelectorAll(selector);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/selectAll.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function arrayAll(select) {
|
|
|
return function() {
|
|
|
return array(select.apply(this, arguments));
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function selectAll(select) {
|
|
|
if (typeof select === "function") select = arrayAll(select);
|
|
|
else select = selectorAll(select);
|
|
|
|
|
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
|
if (node = group[i]) {
|
|
|
subgroups.push(select.call(node, node.__data__, i, group));
|
|
|
parents.push(node);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return new Selection(subgroups, parents);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/matcher.js
|
|
|
/* harmony default export */ function matcher(selector) {
|
|
|
return function() {
|
|
|
return this.matches(selector);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function childMatcher(selector) {
|
|
|
return function(node) {
|
|
|
return node.matches(selector);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/selectChild.js
|
|
|
|
|
|
|
|
|
var find = Array.prototype.find;
|
|
|
|
|
|
function childFind(match) {
|
|
|
return function() {
|
|
|
return find.call(this.children, match);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function childFirst() {
|
|
|
return this.firstElementChild;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function selectChild(match) {
|
|
|
return this.select(match == null ? childFirst
|
|
|
: childFind(typeof match === "function" ? match : childMatcher(match)));
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/selectChildren.js
|
|
|
|
|
|
|
|
|
var filter = Array.prototype.filter;
|
|
|
|
|
|
function children() {
|
|
|
return Array.from(this.children);
|
|
|
}
|
|
|
|
|
|
function childrenFilter(match) {
|
|
|
return function() {
|
|
|
return filter.call(this.children, match);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function selectChildren(match) {
|
|
|
return this.selectAll(match == null ? children
|
|
|
: childrenFilter(typeof match === "function" ? match : childMatcher(match)));
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/filter.js
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ function selection_filter(match) {
|
|
|
if (typeof match !== "function") match = matcher(match);
|
|
|
|
|
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
|
if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
|
|
|
subgroup.push(node);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return new Selection(subgroups, this._parents);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/sparse.js
|
|
|
/* harmony default export */ function sparse(update) {
|
|
|
return new Array(update.length);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/enter.js
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ function enter() {
|
|
|
return new Selection(this._enter || this._groups.map(sparse), this._parents);
|
|
|
}
|
|
|
|
|
|
function EnterNode(parent, datum) {
|
|
|
this.ownerDocument = parent.ownerDocument;
|
|
|
this.namespaceURI = parent.namespaceURI;
|
|
|
this._next = null;
|
|
|
this._parent = parent;
|
|
|
this.__data__ = datum;
|
|
|
}
|
|
|
|
|
|
EnterNode.prototype = {
|
|
|
constructor: EnterNode,
|
|
|
appendChild: function(child) { return this._parent.insertBefore(child, this._next); },
|
|
|
insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },
|
|
|
querySelector: function(selector) { return this._parent.querySelector(selector); },
|
|
|
querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }
|
|
|
};
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/constant.js
|
|
|
/* harmony default export */ function src_constant(x) {
|
|
|
return function() {
|
|
|
return x;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/data.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function bindIndex(parent, group, enter, update, exit, data) {
|
|
|
var i = 0,
|
|
|
node,
|
|
|
groupLength = group.length,
|
|
|
dataLength = data.length;
|
|
|
|
|
|
// Put any non-null nodes that fit into update.
|
|
|
// Put any null nodes into enter.
|
|
|
// Put any remaining data into enter.
|
|
|
for (; i < dataLength; ++i) {
|
|
|
if (node = group[i]) {
|
|
|
node.__data__ = data[i];
|
|
|
update[i] = node;
|
|
|
} else {
|
|
|
enter[i] = new EnterNode(parent, data[i]);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Put any non-null nodes that don’t fit into exit.
|
|
|
for (; i < groupLength; ++i) {
|
|
|
if (node = group[i]) {
|
|
|
exit[i] = node;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function bindKey(parent, group, enter, update, exit, data, key) {
|
|
|
var i,
|
|
|
node,
|
|
|
nodeByKeyValue = new Map,
|
|
|
groupLength = group.length,
|
|
|
dataLength = data.length,
|
|
|
keyValues = new Array(groupLength),
|
|
|
keyValue;
|
|
|
|
|
|
// Compute the key for each node.
|
|
|
// If multiple nodes have the same key, the duplicates are added to exit.
|
|
|
for (i = 0; i < groupLength; ++i) {
|
|
|
if (node = group[i]) {
|
|
|
keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + "";
|
|
|
if (nodeByKeyValue.has(keyValue)) {
|
|
|
exit[i] = node;
|
|
|
} else {
|
|
|
nodeByKeyValue.set(keyValue, node);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Compute the key for each datum.
|
|
|
// If there a node associated with this key, join and add it to update.
|
|
|
// If there is not (or the key is a duplicate), add it to enter.
|
|
|
for (i = 0; i < dataLength; ++i) {
|
|
|
keyValue = key.call(parent, data[i], i, data) + "";
|
|
|
if (node = nodeByKeyValue.get(keyValue)) {
|
|
|
update[i] = node;
|
|
|
node.__data__ = data[i];
|
|
|
nodeByKeyValue.delete(keyValue);
|
|
|
} else {
|
|
|
enter[i] = new EnterNode(parent, data[i]);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Add any remaining nodes that were not bound to data to exit.
|
|
|
for (i = 0; i < groupLength; ++i) {
|
|
|
if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {
|
|
|
exit[i] = node;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function datum(node) {
|
|
|
return node.__data__;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function data(value, key) {
|
|
|
if (!arguments.length) return Array.from(this, datum);
|
|
|
|
|
|
var bind = key ? bindKey : bindIndex,
|
|
|
parents = this._parents,
|
|
|
groups = this._groups;
|
|
|
|
|
|
if (typeof value !== "function") value = src_constant(value);
|
|
|
|
|
|
for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
|
|
|
var parent = parents[j],
|
|
|
group = groups[j],
|
|
|
groupLength = group.length,
|
|
|
data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),
|
|
|
dataLength = data.length,
|
|
|
enterGroup = enter[j] = new Array(dataLength),
|
|
|
updateGroup = update[j] = new Array(dataLength),
|
|
|
exitGroup = exit[j] = new Array(groupLength);
|
|
|
|
|
|
bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
|
|
|
|
|
|
// Now connect the enter nodes to their following update node, such that
|
|
|
// appendChild can insert the materialized enter node before this node,
|
|
|
// rather than at the end of the parent node.
|
|
|
for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
|
|
|
if (previous = enterGroup[i0]) {
|
|
|
if (i0 >= i1) i1 = i0 + 1;
|
|
|
while (!(next = updateGroup[i1]) && ++i1 < dataLength);
|
|
|
previous._next = next || null;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
update = new Selection(update, parents);
|
|
|
update._enter = enter;
|
|
|
update._exit = exit;
|
|
|
return update;
|
|
|
}
|
|
|
|
|
|
// Given some data, this returns an array-like view of it: an object that
|
|
|
// exposes a length property and allows numeric indexing. Note that unlike
|
|
|
// selectAll, this isn’t worried about “live” collections because the resulting
|
|
|
// array will only be used briefly while data is being bound. (It is possible to
|
|
|
// cause the data to change while iterating by using a key function, but please
|
|
|
// don’t; we’d rather avoid a gratuitous copy.)
|
|
|
function arraylike(data) {
|
|
|
return typeof data === "object" && "length" in data
|
|
|
? data // Array, TypedArray, NodeList, array-like
|
|
|
: Array.from(data); // Map, Set, iterable, string, or anything else
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/exit.js
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ function exit() {
|
|
|
return new Selection(this._exit || this._groups.map(sparse), this._parents);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/join.js
|
|
|
/* harmony default export */ function join(onenter, onupdate, onexit) {
|
|
|
var enter = this.enter(), update = this, exit = this.exit();
|
|
|
if (typeof onenter === "function") {
|
|
|
enter = onenter(enter);
|
|
|
if (enter) enter = enter.selection();
|
|
|
} else {
|
|
|
enter = enter.append(onenter + "");
|
|
|
}
|
|
|
if (onupdate != null) {
|
|
|
update = onupdate(update);
|
|
|
if (update) update = update.selection();
|
|
|
}
|
|
|
if (onexit == null) exit.remove(); else onexit(exit);
|
|
|
return enter && update ? enter.merge(update).order() : update;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/merge.js
|
|
|
|
|
|
|
|
|
/* harmony default export */ function merge(context) {
|
|
|
var selection = context.selection ? context.selection() : context;
|
|
|
|
|
|
for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
|
|
|
for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
|
if (node = group0[i] || group1[i]) {
|
|
|
merge[i] = node;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
for (; j < m0; ++j) {
|
|
|
merges[j] = groups0[j];
|
|
|
}
|
|
|
|
|
|
return new Selection(merges, this._parents);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/order.js
|
|
|
/* harmony default export */ function order() {
|
|
|
|
|
|
for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {
|
|
|
for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {
|
|
|
if (node = group[i]) {
|
|
|
if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
|
|
|
next = node;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/sort.js
|
|
|
|
|
|
|
|
|
/* harmony default export */ function sort(compare) {
|
|
|
if (!compare) compare = ascending;
|
|
|
|
|
|
function compareNode(a, b) {
|
|
|
return a && b ? compare(a.__data__, b.__data__) : !a - !b;
|
|
|
}
|
|
|
|
|
|
for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
|
|
|
for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
|
if (node = group[i]) {
|
|
|
sortgroup[i] = node;
|
|
|
}
|
|
|
}
|
|
|
sortgroup.sort(compareNode);
|
|
|
}
|
|
|
|
|
|
return new Selection(sortgroups, this._parents).order();
|
|
|
}
|
|
|
|
|
|
function ascending(a, b) {
|
|
|
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/call.js
|
|
|
/* harmony default export */ function call() {
|
|
|
var callback = arguments[0];
|
|
|
arguments[0] = this;
|
|
|
callback.apply(null, arguments);
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/nodes.js
|
|
|
/* harmony default export */ function nodes() {
|
|
|
return Array.from(this);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/node.js
|
|
|
/* harmony default export */ function node() {
|
|
|
|
|
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
|
for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
|
|
|
var node = group[i];
|
|
|
if (node) return node;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/size.js
|
|
|
/* harmony default export */ function size() {
|
|
|
let size = 0;
|
|
|
for (const node of this) ++size; // eslint-disable-line no-unused-vars
|
|
|
return size;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/empty.js
|
|
|
/* harmony default export */ function selection_empty() {
|
|
|
return !this.node();
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/each.js
|
|
|
/* harmony default export */ function each(callback) {
|
|
|
|
|
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
|
for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
|
|
|
if (node = group[i]) callback.call(node, node.__data__, i, group);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/namespaces.js
|
|
|
var xhtml = "http://www.w3.org/1999/xhtml";
|
|
|
|
|
|
/* harmony default export */ const namespaces = ({
|
|
|
svg: "http://www.w3.org/2000/svg",
|
|
|
xhtml: xhtml,
|
|
|
xlink: "http://www.w3.org/1999/xlink",
|
|
|
xml: "http://www.w3.org/XML/1998/namespace",
|
|
|
xmlns: "http://www.w3.org/2000/xmlns/"
|
|
|
});
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/namespace.js
|
|
|
|
|
|
|
|
|
/* harmony default export */ function namespace(name) {
|
|
|
var prefix = name += "", i = prefix.indexOf(":");
|
|
|
if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
|
|
|
return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/attr.js
|
|
|
|
|
|
|
|
|
function attrRemove(name) {
|
|
|
return function() {
|
|
|
this.removeAttribute(name);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function attrRemoveNS(fullname) {
|
|
|
return function() {
|
|
|
this.removeAttributeNS(fullname.space, fullname.local);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function attrConstant(name, value) {
|
|
|
return function() {
|
|
|
this.setAttribute(name, value);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function attrConstantNS(fullname, value) {
|
|
|
return function() {
|
|
|
this.setAttributeNS(fullname.space, fullname.local, value);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function attrFunction(name, value) {
|
|
|
return function() {
|
|
|
var v = value.apply(this, arguments);
|
|
|
if (v == null) this.removeAttribute(name);
|
|
|
else this.setAttribute(name, v);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function attrFunctionNS(fullname, value) {
|
|
|
return function() {
|
|
|
var v = value.apply(this, arguments);
|
|
|
if (v == null) this.removeAttributeNS(fullname.space, fullname.local);
|
|
|
else this.setAttributeNS(fullname.space, fullname.local, v);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function attr(name, value) {
|
|
|
var fullname = namespace(name);
|
|
|
|
|
|
if (arguments.length < 2) {
|
|
|
var node = this.node();
|
|
|
return fullname.local
|
|
|
? node.getAttributeNS(fullname.space, fullname.local)
|
|
|
: node.getAttribute(fullname);
|
|
|
}
|
|
|
|
|
|
return this.each((value == null
|
|
|
? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function"
|
|
|
? (fullname.local ? attrFunctionNS : attrFunction)
|
|
|
: (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/window.js
|
|
|
/* harmony default export */ function src_window(node) {
|
|
|
return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node
|
|
|
|| (node.document && node) // node is a Window
|
|
|
|| node.defaultView; // node is a Document
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/style.js
|
|
|
|
|
|
|
|
|
function styleRemove(name) {
|
|
|
return function() {
|
|
|
this.style.removeProperty(name);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function styleConstant(name, value, priority) {
|
|
|
return function() {
|
|
|
this.style.setProperty(name, value, priority);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function styleFunction(name, value, priority) {
|
|
|
return function() {
|
|
|
var v = value.apply(this, arguments);
|
|
|
if (v == null) this.style.removeProperty(name);
|
|
|
else this.style.setProperty(name, v, priority);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function style(name, value, priority) {
|
|
|
return arguments.length > 1
|
|
|
? this.each((value == null
|
|
|
? styleRemove : typeof value === "function"
|
|
|
? styleFunction
|
|
|
: styleConstant)(name, value, priority == null ? "" : priority))
|
|
|
: styleValue(this.node(), name);
|
|
|
}
|
|
|
|
|
|
function styleValue(node, name) {
|
|
|
return node.style.getPropertyValue(name)
|
|
|
|| src_window(node).getComputedStyle(node, null).getPropertyValue(name);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/property.js
|
|
|
function propertyRemove(name) {
|
|
|
return function() {
|
|
|
delete this[name];
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function propertyConstant(name, value) {
|
|
|
return function() {
|
|
|
this[name] = value;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function propertyFunction(name, value) {
|
|
|
return function() {
|
|
|
var v = value.apply(this, arguments);
|
|
|
if (v == null) delete this[name];
|
|
|
else this[name] = v;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function property(name, value) {
|
|
|
return arguments.length > 1
|
|
|
? this.each((value == null
|
|
|
? propertyRemove : typeof value === "function"
|
|
|
? propertyFunction
|
|
|
: propertyConstant)(name, value))
|
|
|
: this.node()[name];
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/classed.js
|
|
|
function classArray(string) {
|
|
|
return string.trim().split(/^|\s+/);
|
|
|
}
|
|
|
|
|
|
function classList(node) {
|
|
|
return node.classList || new ClassList(node);
|
|
|
}
|
|
|
|
|
|
function ClassList(node) {
|
|
|
this._node = node;
|
|
|
this._names = classArray(node.getAttribute("class") || "");
|
|
|
}
|
|
|
|
|
|
ClassList.prototype = {
|
|
|
add: function(name) {
|
|
|
var i = this._names.indexOf(name);
|
|
|
if (i < 0) {
|
|
|
this._names.push(name);
|
|
|
this._node.setAttribute("class", this._names.join(" "));
|
|
|
}
|
|
|
},
|
|
|
remove: function(name) {
|
|
|
var i = this._names.indexOf(name);
|
|
|
if (i >= 0) {
|
|
|
this._names.splice(i, 1);
|
|
|
this._node.setAttribute("class", this._names.join(" "));
|
|
|
}
|
|
|
},
|
|
|
contains: function(name) {
|
|
|
return this._names.indexOf(name) >= 0;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
function classedAdd(node, names) {
|
|
|
var list = classList(node), i = -1, n = names.length;
|
|
|
while (++i < n) list.add(names[i]);
|
|
|
}
|
|
|
|
|
|
function classedRemove(node, names) {
|
|
|
var list = classList(node), i = -1, n = names.length;
|
|
|
while (++i < n) list.remove(names[i]);
|
|
|
}
|
|
|
|
|
|
function classedTrue(names) {
|
|
|
return function() {
|
|
|
classedAdd(this, names);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function classedFalse(names) {
|
|
|
return function() {
|
|
|
classedRemove(this, names);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function classedFunction(names, value) {
|
|
|
return function() {
|
|
|
(value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function classed(name, value) {
|
|
|
var names = classArray(name + "");
|
|
|
|
|
|
if (arguments.length < 2) {
|
|
|
var list = classList(this.node()), i = -1, n = names.length;
|
|
|
while (++i < n) if (!list.contains(names[i])) return false;
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
return this.each((typeof value === "function"
|
|
|
? classedFunction : value
|
|
|
? classedTrue
|
|
|
: classedFalse)(names, value));
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/text.js
|
|
|
function textRemove() {
|
|
|
this.textContent = "";
|
|
|
}
|
|
|
|
|
|
function textConstant(value) {
|
|
|
return function() {
|
|
|
this.textContent = value;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function textFunction(value) {
|
|
|
return function() {
|
|
|
var v = value.apply(this, arguments);
|
|
|
this.textContent = v == null ? "" : v;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function selection_text(value) {
|
|
|
return arguments.length
|
|
|
? this.each(value == null
|
|
|
? textRemove : (typeof value === "function"
|
|
|
? textFunction
|
|
|
: textConstant)(value))
|
|
|
: this.node().textContent;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/html.js
|
|
|
function htmlRemove() {
|
|
|
this.innerHTML = "";
|
|
|
}
|
|
|
|
|
|
function htmlConstant(value) {
|
|
|
return function() {
|
|
|
this.innerHTML = value;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function htmlFunction(value) {
|
|
|
return function() {
|
|
|
var v = value.apply(this, arguments);
|
|
|
this.innerHTML = v == null ? "" : v;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function html(value) {
|
|
|
return arguments.length
|
|
|
? this.each(value == null
|
|
|
? htmlRemove : (typeof value === "function"
|
|
|
? htmlFunction
|
|
|
: htmlConstant)(value))
|
|
|
: this.node().innerHTML;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/raise.js
|
|
|
function raise() {
|
|
|
if (this.nextSibling) this.parentNode.appendChild(this);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function selection_raise() {
|
|
|
return this.each(raise);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/lower.js
|
|
|
function lower() {
|
|
|
if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function selection_lower() {
|
|
|
return this.each(lower);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/creator.js
|
|
|
|
|
|
|
|
|
|
|
|
function creatorInherit(name) {
|
|
|
return function() {
|
|
|
var document = this.ownerDocument,
|
|
|
uri = this.namespaceURI;
|
|
|
return uri === xhtml && document.documentElement.namespaceURI === xhtml
|
|
|
? document.createElement(name)
|
|
|
: document.createElementNS(uri, name);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function creatorFixed(fullname) {
|
|
|
return function() {
|
|
|
return this.ownerDocument.createElementNS(fullname.space, fullname.local);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function creator(name) {
|
|
|
var fullname = namespace(name);
|
|
|
return (fullname.local
|
|
|
? creatorFixed
|
|
|
: creatorInherit)(fullname);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/append.js
|
|
|
|
|
|
|
|
|
/* harmony default export */ function append(name) {
|
|
|
var create = typeof name === "function" ? name : creator(name);
|
|
|
return this.select(function() {
|
|
|
return this.appendChild(create.apply(this, arguments));
|
|
|
});
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/insert.js
|
|
|
|
|
|
|
|
|
|
|
|
function constantNull() {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function insert(name, before) {
|
|
|
var create = typeof name === "function" ? name : creator(name),
|
|
|
select = before == null ? constantNull : typeof before === "function" ? before : selector(before);
|
|
|
return this.select(function() {
|
|
|
return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/remove.js
|
|
|
function remove() {
|
|
|
var parent = this.parentNode;
|
|
|
if (parent) parent.removeChild(this);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function selection_remove() {
|
|
|
return this.each(remove);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/clone.js
|
|
|
function selection_cloneShallow() {
|
|
|
var clone = this.cloneNode(false), parent = this.parentNode;
|
|
|
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
|
|
|
}
|
|
|
|
|
|
function selection_cloneDeep() {
|
|
|
var clone = this.cloneNode(true), parent = this.parentNode;
|
|
|
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function clone(deep) {
|
|
|
return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/datum.js
|
|
|
/* harmony default export */ function selection_datum(value) {
|
|
|
return arguments.length
|
|
|
? this.property("__data__", value)
|
|
|
: this.node().__data__;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/on.js
|
|
|
function contextListener(listener) {
|
|
|
return function(event) {
|
|
|
listener.call(this, event, this.__data__);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function parseTypenames(typenames) {
|
|
|
return typenames.trim().split(/^|\s+/).map(function(t) {
|
|
|
var name = "", i = t.indexOf(".");
|
|
|
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
|
|
return {type: t, name: name};
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function onRemove(typename) {
|
|
|
return function() {
|
|
|
var on = this.__on;
|
|
|
if (!on) return;
|
|
|
for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
|
|
|
if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
|
|
|
this.removeEventListener(o.type, o.listener, o.options);
|
|
|
} else {
|
|
|
on[++i] = o;
|
|
|
}
|
|
|
}
|
|
|
if (++i) on.length = i;
|
|
|
else delete this.__on;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function onAdd(typename, value, options) {
|
|
|
return function() {
|
|
|
var on = this.__on, o, listener = contextListener(value);
|
|
|
if (on) for (var j = 0, m = on.length; j < m; ++j) {
|
|
|
if ((o = on[j]).type === typename.type && o.name === typename.name) {
|
|
|
this.removeEventListener(o.type, o.listener, o.options);
|
|
|
this.addEventListener(o.type, o.listener = listener, o.options = options);
|
|
|
o.value = value;
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
this.addEventListener(typename.type, listener, options);
|
|
|
o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};
|
|
|
if (!on) this.__on = [o];
|
|
|
else on.push(o);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function on(typename, value, options) {
|
|
|
var typenames = parseTypenames(typename + ""), i, n = typenames.length, t;
|
|
|
|
|
|
if (arguments.length < 2) {
|
|
|
var on = this.node().__on;
|
|
|
if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
|
|
|
for (i = 0, o = on[j]; i < n; ++i) {
|
|
|
if ((t = typenames[i]).type === o.type && t.name === o.name) {
|
|
|
return o.value;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
on = value ? onAdd : onRemove;
|
|
|
for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/dispatch.js
|
|
|
|
|
|
|
|
|
function dispatchEvent(node, type, params) {
|
|
|
var window = src_window(node),
|
|
|
event = window.CustomEvent;
|
|
|
|
|
|
if (typeof event === "function") {
|
|
|
event = new event(type, params);
|
|
|
} else {
|
|
|
event = window.document.createEvent("Event");
|
|
|
if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;
|
|
|
else event.initEvent(type, false, false);
|
|
|
}
|
|
|
|
|
|
node.dispatchEvent(event);
|
|
|
}
|
|
|
|
|
|
function dispatchConstant(type, params) {
|
|
|
return function() {
|
|
|
return dispatchEvent(this, type, params);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function dispatchFunction(type, params) {
|
|
|
return function() {
|
|
|
return dispatchEvent(this, type, params.apply(this, arguments));
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function selection_dispatch(type, params) {
|
|
|
return this.each((typeof params === "function"
|
|
|
? dispatchFunction
|
|
|
: dispatchConstant)(type, params));
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/iterator.js
|
|
|
/* harmony default export */ function* iterator() {
|
|
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
|
for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
|
|
|
if (node = group[i]) yield node;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/selection/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var root = [null];
|
|
|
|
|
|
function Selection(groups, parents) {
|
|
|
this._groups = groups;
|
|
|
this._parents = parents;
|
|
|
}
|
|
|
|
|
|
function selection() {
|
|
|
return new Selection([[document.documentElement]], root);
|
|
|
}
|
|
|
|
|
|
function selection_selection() {
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
Selection.prototype = selection.prototype = {
|
|
|
constructor: Selection,
|
|
|
select: selection_select,
|
|
|
selectAll: selectAll,
|
|
|
selectChild: selectChild,
|
|
|
selectChildren: selectChildren,
|
|
|
filter: selection_filter,
|
|
|
data: data,
|
|
|
enter: enter,
|
|
|
exit: exit,
|
|
|
join: join,
|
|
|
merge: merge,
|
|
|
selection: selection_selection,
|
|
|
order: order,
|
|
|
sort: sort,
|
|
|
call: call,
|
|
|
nodes: nodes,
|
|
|
node: node,
|
|
|
size: size,
|
|
|
empty: selection_empty,
|
|
|
each: each,
|
|
|
attr: attr,
|
|
|
style: style,
|
|
|
property: property,
|
|
|
classed: classed,
|
|
|
text: selection_text,
|
|
|
html: html,
|
|
|
raise: selection_raise,
|
|
|
lower: selection_lower,
|
|
|
append: append,
|
|
|
insert: insert,
|
|
|
remove: selection_remove,
|
|
|
clone: clone,
|
|
|
datum: selection_datum,
|
|
|
on: on,
|
|
|
dispatch: selection_dispatch,
|
|
|
[Symbol.iterator]: iterator
|
|
|
};
|
|
|
|
|
|
/* harmony default export */ const src_selection = (selection);
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-dispatch/src/dispatch.js
|
|
|
var src_dispatch = __webpack_require__(65043);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-timer/src/timer.js
|
|
|
var timer = __webpack_require__(11647);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-timer/src/timeout.js
|
|
|
|
|
|
|
|
|
/* harmony default export */ function timeout(callback, delay, time) {
|
|
|
var t = new timer/* Timer */.B7;
|
|
|
delay = delay == null ? 0 : +delay;
|
|
|
t.restart(elapsed => {
|
|
|
t.stop();
|
|
|
callback(elapsed + delay);
|
|
|
}, delay, time);
|
|
|
return t;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/schedule.js
|
|
|
|
|
|
|
|
|
|
|
|
var emptyOn = (0,src_dispatch/* default */.Z)("start", "end", "cancel", "interrupt");
|
|
|
var emptyTween = [];
|
|
|
|
|
|
var CREATED = 0;
|
|
|
var SCHEDULED = 1;
|
|
|
var STARTING = 2;
|
|
|
var STARTED = 3;
|
|
|
var RUNNING = 4;
|
|
|
var ENDING = 5;
|
|
|
var ENDED = 6;
|
|
|
|
|
|
/* harmony default export */ function schedule(node, name, id, index, group, timing) {
|
|
|
var schedules = node.__transition;
|
|
|
if (!schedules) node.__transition = {};
|
|
|
else if (id in schedules) return;
|
|
|
create(node, id, {
|
|
|
name: name,
|
|
|
index: index, // For context during callback.
|
|
|
group: group, // For context during callback.
|
|
|
on: emptyOn,
|
|
|
tween: emptyTween,
|
|
|
time: timing.time,
|
|
|
delay: timing.delay,
|
|
|
duration: timing.duration,
|
|
|
ease: timing.ease,
|
|
|
timer: null,
|
|
|
state: CREATED
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function init(node, id) {
|
|
|
var schedule = get(node, id);
|
|
|
if (schedule.state > CREATED) throw new Error("too late; already scheduled");
|
|
|
return schedule;
|
|
|
}
|
|
|
|
|
|
function set(node, id) {
|
|
|
var schedule = get(node, id);
|
|
|
if (schedule.state > STARTED) throw new Error("too late; already running");
|
|
|
return schedule;
|
|
|
}
|
|
|
|
|
|
function get(node, id) {
|
|
|
var schedule = node.__transition;
|
|
|
if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found");
|
|
|
return schedule;
|
|
|
}
|
|
|
|
|
|
function create(node, id, self) {
|
|
|
var schedules = node.__transition,
|
|
|
tween;
|
|
|
|
|
|
// Initialize the self timer when the transition is created.
|
|
|
// Note the actual delay is not known until the first callback!
|
|
|
schedules[id] = self;
|
|
|
self.timer = (0,timer/* timer */.HT)(schedule, 0, self.time);
|
|
|
|
|
|
function schedule(elapsed) {
|
|
|
self.state = SCHEDULED;
|
|
|
self.timer.restart(start, self.delay, self.time);
|
|
|
|
|
|
// If the elapsed delay is less than our first sleep, start immediately.
|
|
|
if (self.delay <= elapsed) start(elapsed - self.delay);
|
|
|
}
|
|
|
|
|
|
function start(elapsed) {
|
|
|
var i, j, n, o;
|
|
|
|
|
|
// If the state is not SCHEDULED, then we previously errored on start.
|
|
|
if (self.state !== SCHEDULED) return stop();
|
|
|
|
|
|
for (i in schedules) {
|
|
|
o = schedules[i];
|
|
|
if (o.name !== self.name) continue;
|
|
|
|
|
|
// While this element already has a starting transition during this frame,
|
|
|
// defer starting an interrupting transition until that transition has a
|
|
|
// chance to tick (and possibly end); see d3/d3-transition#54!
|
|
|
if (o.state === STARTED) return timeout(start);
|
|
|
|
|
|
// Interrupt the active transition, if any.
|
|
|
if (o.state === RUNNING) {
|
|
|
o.state = ENDED;
|
|
|
o.timer.stop();
|
|
|
o.on.call("interrupt", node, node.__data__, o.index, o.group);
|
|
|
delete schedules[i];
|
|
|
}
|
|
|
|
|
|
// Cancel any pre-empted transitions.
|
|
|
else if (+i < id) {
|
|
|
o.state = ENDED;
|
|
|
o.timer.stop();
|
|
|
o.on.call("cancel", node, node.__data__, o.index, o.group);
|
|
|
delete schedules[i];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Defer the first tick to end of the current frame; see d3/d3#1576.
|
|
|
// Note the transition may be canceled after start and before the first tick!
|
|
|
// Note this must be scheduled before the start event; see d3/d3-transition#16!
|
|
|
// Assuming this is successful, subsequent callbacks go straight to tick.
|
|
|
timeout(function() {
|
|
|
if (self.state === STARTED) {
|
|
|
self.state = RUNNING;
|
|
|
self.timer.restart(tick, self.delay, self.time);
|
|
|
tick(elapsed);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// Dispatch the start event.
|
|
|
// Note this must be done before the tween are initialized.
|
|
|
self.state = STARTING;
|
|
|
self.on.call("start", node, node.__data__, self.index, self.group);
|
|
|
if (self.state !== STARTING) return; // interrupted
|
|
|
self.state = STARTED;
|
|
|
|
|
|
// Initialize the tween, deleting null tween.
|
|
|
tween = new Array(n = self.tween.length);
|
|
|
for (i = 0, j = -1; i < n; ++i) {
|
|
|
if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {
|
|
|
tween[++j] = o;
|
|
|
}
|
|
|
}
|
|
|
tween.length = j + 1;
|
|
|
}
|
|
|
|
|
|
function tick(elapsed) {
|
|
|
var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),
|
|
|
i = -1,
|
|
|
n = tween.length;
|
|
|
|
|
|
while (++i < n) {
|
|
|
tween[i].call(node, t);
|
|
|
}
|
|
|
|
|
|
// Dispatch the end event.
|
|
|
if (self.state === ENDING) {
|
|
|
self.on.call("end", node, node.__data__, self.index, self.group);
|
|
|
stop();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function stop() {
|
|
|
self.state = ENDED;
|
|
|
self.timer.stop();
|
|
|
delete schedules[id];
|
|
|
for (var i in schedules) return; // eslint-disable-line no-unused-vars
|
|
|
delete node.__transition;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/interrupt.js
|
|
|
|
|
|
|
|
|
/* harmony default export */ function src_interrupt(node, name) {
|
|
|
var schedules = node.__transition,
|
|
|
schedule,
|
|
|
active,
|
|
|
empty = true,
|
|
|
i;
|
|
|
|
|
|
if (!schedules) return;
|
|
|
|
|
|
name = name == null ? null : name + "";
|
|
|
|
|
|
for (i in schedules) {
|
|
|
if ((schedule = schedules[i]).name !== name) { empty = false; continue; }
|
|
|
active = schedule.state > STARTING && schedule.state < ENDING;
|
|
|
schedule.state = ENDED;
|
|
|
schedule.timer.stop();
|
|
|
schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
|
|
|
delete schedules[i];
|
|
|
}
|
|
|
|
|
|
if (empty) delete node.__transition;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/selection/interrupt.js
|
|
|
|
|
|
|
|
|
/* harmony default export */ function selection_interrupt(name) {
|
|
|
return this.each(function() {
|
|
|
src_interrupt(this, name);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-interpolate/src/transform/index.js + 2 modules
|
|
|
var transform = __webpack_require__(52087);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/tween.js
|
|
|
|
|
|
|
|
|
function tweenRemove(id, name) {
|
|
|
var tween0, tween1;
|
|
|
return function() {
|
|
|
var schedule = set(this, id),
|
|
|
tween = schedule.tween;
|
|
|
|
|
|
// If this node shared tween with the previous node,
|
|
|
// just assign the updated shared tween and we’re done!
|
|
|
// Otherwise, copy-on-write.
|
|
|
if (tween !== tween0) {
|
|
|
tween1 = tween0 = tween;
|
|
|
for (var i = 0, n = tween1.length; i < n; ++i) {
|
|
|
if (tween1[i].name === name) {
|
|
|
tween1 = tween1.slice();
|
|
|
tween1.splice(i, 1);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
schedule.tween = tween1;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function tweenFunction(id, name, value) {
|
|
|
var tween0, tween1;
|
|
|
if (typeof value !== "function") throw new Error;
|
|
|
return function() {
|
|
|
var schedule = set(this, id),
|
|
|
tween = schedule.tween;
|
|
|
|
|
|
// If this node shared tween with the previous node,
|
|
|
// just assign the updated shared tween and we’re done!
|
|
|
// Otherwise, copy-on-write.
|
|
|
if (tween !== tween0) {
|
|
|
tween1 = (tween0 = tween).slice();
|
|
|
for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {
|
|
|
if (tween1[i].name === name) {
|
|
|
tween1[i] = t;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
if (i === n) tween1.push(t);
|
|
|
}
|
|
|
|
|
|
schedule.tween = tween1;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function tween(name, value) {
|
|
|
var id = this._id;
|
|
|
|
|
|
name += "";
|
|
|
|
|
|
if (arguments.length < 2) {
|
|
|
var tween = get(this.node(), id).tween;
|
|
|
for (var i = 0, n = tween.length, t; i < n; ++i) {
|
|
|
if ((t = tween[i]).name === name) {
|
|
|
return t.value;
|
|
|
}
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));
|
|
|
}
|
|
|
|
|
|
function tweenValue(transition, name, value) {
|
|
|
var id = transition._id;
|
|
|
|
|
|
transition.each(function() {
|
|
|
var schedule = set(this, id);
|
|
|
(schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);
|
|
|
});
|
|
|
|
|
|
return function(node) {
|
|
|
return get(node, id).value[name];
|
|
|
};
|
|
|
}
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-color/src/color.js
|
|
|
var color = __webpack_require__(12738);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-interpolate/src/number.js
|
|
|
var src_number = __webpack_require__(75381);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-interpolate/src/rgb.js
|
|
|
var rgb = __webpack_require__(32278);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-interpolate/src/string.js
|
|
|
var string = __webpack_require__(39493);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/interpolate.js
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ function transition_interpolate(a, b) {
|
|
|
var c;
|
|
|
return (typeof b === "number" ? src_number/* default */.Z
|
|
|
: b instanceof color/* default */.ZP ? rgb/* default */.ZP
|
|
|
: (c = (0,color/* default */.ZP)(b)) ? (b = c, rgb/* default */.ZP)
|
|
|
: string/* default */.Z)(a, b);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/attr.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function attr_attrRemove(name) {
|
|
|
return function() {
|
|
|
this.removeAttribute(name);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function attr_attrRemoveNS(fullname) {
|
|
|
return function() {
|
|
|
this.removeAttributeNS(fullname.space, fullname.local);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function attr_attrConstant(name, interpolate, value1) {
|
|
|
var string00,
|
|
|
string1 = value1 + "",
|
|
|
interpolate0;
|
|
|
return function() {
|
|
|
var string0 = this.getAttribute(name);
|
|
|
return string0 === string1 ? null
|
|
|
: string0 === string00 ? interpolate0
|
|
|
: interpolate0 = interpolate(string00 = string0, value1);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function attr_attrConstantNS(fullname, interpolate, value1) {
|
|
|
var string00,
|
|
|
string1 = value1 + "",
|
|
|
interpolate0;
|
|
|
return function() {
|
|
|
var string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
|
return string0 === string1 ? null
|
|
|
: string0 === string00 ? interpolate0
|
|
|
: interpolate0 = interpolate(string00 = string0, value1);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function attr_attrFunction(name, interpolate, value) {
|
|
|
var string00,
|
|
|
string10,
|
|
|
interpolate0;
|
|
|
return function() {
|
|
|
var string0, value1 = value(this), string1;
|
|
|
if (value1 == null) return void this.removeAttribute(name);
|
|
|
string0 = this.getAttribute(name);
|
|
|
string1 = value1 + "";
|
|
|
return string0 === string1 ? null
|
|
|
: string0 === string00 && string1 === string10 ? interpolate0
|
|
|
: (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function attr_attrFunctionNS(fullname, interpolate, value) {
|
|
|
var string00,
|
|
|
string10,
|
|
|
interpolate0;
|
|
|
return function() {
|
|
|
var string0, value1 = value(this), string1;
|
|
|
if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
|
|
|
string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
|
string1 = value1 + "";
|
|
|
return string0 === string1 ? null
|
|
|
: string0 === string00 && string1 === string10 ? interpolate0
|
|
|
: (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function transition_attr(name, value) {
|
|
|
var fullname = namespace(name), i = fullname === "transform" ? transform/* interpolateTransformSvg */.w : transition_interpolate;
|
|
|
return this.attrTween(name, typeof value === "function"
|
|
|
? (fullname.local ? attr_attrFunctionNS : attr_attrFunction)(fullname, i, tweenValue(this, "attr." + name, value))
|
|
|
: value == null ? (fullname.local ? attr_attrRemoveNS : attr_attrRemove)(fullname)
|
|
|
: (fullname.local ? attr_attrConstantNS : attr_attrConstant)(fullname, i, value));
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/attrTween.js
|
|
|
|
|
|
|
|
|
function attrInterpolate(name, i) {
|
|
|
return function(t) {
|
|
|
this.setAttribute(name, i.call(this, t));
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function attrInterpolateNS(fullname, i) {
|
|
|
return function(t) {
|
|
|
this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function attrTweenNS(fullname, value) {
|
|
|
var t0, i0;
|
|
|
function tween() {
|
|
|
var i = value.apply(this, arguments);
|
|
|
if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
|
|
|
return t0;
|
|
|
}
|
|
|
tween._value = value;
|
|
|
return tween;
|
|
|
}
|
|
|
|
|
|
function attrTween(name, value) {
|
|
|
var t0, i0;
|
|
|
function tween() {
|
|
|
var i = value.apply(this, arguments);
|
|
|
if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
|
|
|
return t0;
|
|
|
}
|
|
|
tween._value = value;
|
|
|
return tween;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function transition_attrTween(name, value) {
|
|
|
var key = "attr." + name;
|
|
|
if (arguments.length < 2) return (key = this.tween(key)) && key._value;
|
|
|
if (value == null) return this.tween(key, null);
|
|
|
if (typeof value !== "function") throw new Error;
|
|
|
var fullname = namespace(name);
|
|
|
return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/delay.js
|
|
|
|
|
|
|
|
|
function delayFunction(id, value) {
|
|
|
return function() {
|
|
|
init(this, id).delay = +value.apply(this, arguments);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function delayConstant(id, value) {
|
|
|
return value = +value, function() {
|
|
|
init(this, id).delay = value;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function delay(value) {
|
|
|
var id = this._id;
|
|
|
|
|
|
return arguments.length
|
|
|
? this.each((typeof value === "function"
|
|
|
? delayFunction
|
|
|
: delayConstant)(id, value))
|
|
|
: get(this.node(), id).delay;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/duration.js
|
|
|
|
|
|
|
|
|
function durationFunction(id, value) {
|
|
|
return function() {
|
|
|
set(this, id).duration = +value.apply(this, arguments);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function durationConstant(id, value) {
|
|
|
return value = +value, function() {
|
|
|
set(this, id).duration = value;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function duration(value) {
|
|
|
var id = this._id;
|
|
|
|
|
|
return arguments.length
|
|
|
? this.each((typeof value === "function"
|
|
|
? durationFunction
|
|
|
: durationConstant)(id, value))
|
|
|
: get(this.node(), id).duration;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/ease.js
|
|
|
|
|
|
|
|
|
function easeConstant(id, value) {
|
|
|
if (typeof value !== "function") throw new Error;
|
|
|
return function() {
|
|
|
set(this, id).ease = value;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function ease(value) {
|
|
|
var id = this._id;
|
|
|
|
|
|
return arguments.length
|
|
|
? this.each(easeConstant(id, value))
|
|
|
: get(this.node(), id).ease;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/easeVarying.js
|
|
|
|
|
|
|
|
|
function easeVarying(id, value) {
|
|
|
return function() {
|
|
|
var v = value.apply(this, arguments);
|
|
|
if (typeof v !== "function") throw new Error;
|
|
|
set(this, id).ease = v;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function transition_easeVarying(value) {
|
|
|
if (typeof value !== "function") throw new Error;
|
|
|
return this.each(easeVarying(this._id, value));
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/filter.js
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ function transition_filter(match) {
|
|
|
if (typeof match !== "function") match = matcher(match);
|
|
|
|
|
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
|
if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
|
|
|
subgroup.push(node);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return new Transition(subgroups, this._parents, this._name, this._id);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/merge.js
|
|
|
|
|
|
|
|
|
/* harmony default export */ function transition_merge(transition) {
|
|
|
if (transition._id !== this._id) throw new Error;
|
|
|
|
|
|
for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
|
|
|
for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
|
if (node = group0[i] || group1[i]) {
|
|
|
merge[i] = node;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
for (; j < m0; ++j) {
|
|
|
merges[j] = groups0[j];
|
|
|
}
|
|
|
|
|
|
return new Transition(merges, this._parents, this._name, this._id);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/on.js
|
|
|
|
|
|
|
|
|
function start(name) {
|
|
|
return (name + "").trim().split(/^|\s+/).every(function(t) {
|
|
|
var i = t.indexOf(".");
|
|
|
if (i >= 0) t = t.slice(0, i);
|
|
|
return !t || t === "start";
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function onFunction(id, name, listener) {
|
|
|
var on0, on1, sit = start(name) ? init : set;
|
|
|
return function() {
|
|
|
var schedule = sit(this, id),
|
|
|
on = schedule.on;
|
|
|
|
|
|
// If this node shared a dispatch with the previous node,
|
|
|
// just assign the updated shared dispatch and we’re done!
|
|
|
// Otherwise, copy-on-write.
|
|
|
if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
|
|
|
|
|
|
schedule.on = on1;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function transition_on(name, listener) {
|
|
|
var id = this._id;
|
|
|
|
|
|
return arguments.length < 2
|
|
|
? get(this.node(), id).on.on(name)
|
|
|
: this.each(onFunction(id, name, listener));
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/remove.js
|
|
|
function removeFunction(id) {
|
|
|
return function() {
|
|
|
var parent = this.parentNode;
|
|
|
for (var i in this.__transition) if (+i !== id) return;
|
|
|
if (parent) parent.removeChild(this);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function transition_remove() {
|
|
|
return this.on("end.remove", removeFunction(this._id));
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/select.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ function transition_select(select) {
|
|
|
var name = this._name,
|
|
|
id = this._id;
|
|
|
|
|
|
if (typeof select !== "function") select = selector(select);
|
|
|
|
|
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
|
if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
|
|
|
if ("__data__" in node) subnode.__data__ = node.__data__;
|
|
|
subgroup[i] = subnode;
|
|
|
schedule(subgroup[i], name, id, i, subgroup, get(node, id));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return new Transition(subgroups, this._parents, name, id);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/selectAll.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ function transition_selectAll(select) {
|
|
|
var name = this._name,
|
|
|
id = this._id;
|
|
|
|
|
|
if (typeof select !== "function") select = selectorAll(select);
|
|
|
|
|
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
|
if (node = group[i]) {
|
|
|
for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {
|
|
|
if (child = children[k]) {
|
|
|
schedule(child, name, id, k, children, inherit);
|
|
|
}
|
|
|
}
|
|
|
subgroups.push(children);
|
|
|
parents.push(node);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return new Transition(subgroups, parents, name, id);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/selection.js
|
|
|
|
|
|
|
|
|
var selection_Selection = src_selection.prototype.constructor;
|
|
|
|
|
|
/* harmony default export */ function transition_selection() {
|
|
|
return new selection_Selection(this._groups, this._parents);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/style.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function styleNull(name, interpolate) {
|
|
|
var string00,
|
|
|
string10,
|
|
|
interpolate0;
|
|
|
return function() {
|
|
|
var string0 = styleValue(this, name),
|
|
|
string1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
|
return string0 === string1 ? null
|
|
|
: string0 === string00 && string1 === string10 ? interpolate0
|
|
|
: interpolate0 = interpolate(string00 = string0, string10 = string1);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function style_styleRemove(name) {
|
|
|
return function() {
|
|
|
this.style.removeProperty(name);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function style_styleConstant(name, interpolate, value1) {
|
|
|
var string00,
|
|
|
string1 = value1 + "",
|
|
|
interpolate0;
|
|
|
return function() {
|
|
|
var string0 = styleValue(this, name);
|
|
|
return string0 === string1 ? null
|
|
|
: string0 === string00 ? interpolate0
|
|
|
: interpolate0 = interpolate(string00 = string0, value1);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function style_styleFunction(name, interpolate, value) {
|
|
|
var string00,
|
|
|
string10,
|
|
|
interpolate0;
|
|
|
return function() {
|
|
|
var string0 = styleValue(this, name),
|
|
|
value1 = value(this),
|
|
|
string1 = value1 + "";
|
|
|
if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
|
return string0 === string1 ? null
|
|
|
: string0 === string00 && string1 === string10 ? interpolate0
|
|
|
: (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function styleMaybeRemove(id, name) {
|
|
|
var on0, on1, listener0, key = "style." + name, event = "end." + key, remove;
|
|
|
return function() {
|
|
|
var schedule = set(this, id),
|
|
|
on = schedule.on,
|
|
|
listener = schedule.value[key] == null ? remove || (remove = style_styleRemove(name)) : undefined;
|
|
|
|
|
|
// If this node shared a dispatch with the previous node,
|
|
|
// just assign the updated shared dispatch and we’re done!
|
|
|
// Otherwise, copy-on-write.
|
|
|
if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
|
|
|
|
|
|
schedule.on = on1;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function transition_style(name, value, priority) {
|
|
|
var i = (name += "") === "transform" ? transform/* interpolateTransformCss */.Y : transition_interpolate;
|
|
|
return value == null ? this
|
|
|
.styleTween(name, styleNull(name, i))
|
|
|
.on("end.style." + name, style_styleRemove(name))
|
|
|
: typeof value === "function" ? this
|
|
|
.styleTween(name, style_styleFunction(name, i, tweenValue(this, "style." + name, value)))
|
|
|
.each(styleMaybeRemove(this._id, name))
|
|
|
: this
|
|
|
.styleTween(name, style_styleConstant(name, i, value), priority)
|
|
|
.on("end.style." + name, null);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/styleTween.js
|
|
|
function styleInterpolate(name, i, priority) {
|
|
|
return function(t) {
|
|
|
this.style.setProperty(name, i.call(this, t), priority);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function styleTween(name, value, priority) {
|
|
|
var t, i0;
|
|
|
function tween() {
|
|
|
var i = value.apply(this, arguments);
|
|
|
if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
|
|
|
return t;
|
|
|
}
|
|
|
tween._value = value;
|
|
|
return tween;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function transition_styleTween(name, value, priority) {
|
|
|
var key = "style." + (name += "");
|
|
|
if (arguments.length < 2) return (key = this.tween(key)) && key._value;
|
|
|
if (value == null) return this.tween(key, null);
|
|
|
if (typeof value !== "function") throw new Error;
|
|
|
return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/text.js
|
|
|
|
|
|
|
|
|
function text_textConstant(value) {
|
|
|
return function() {
|
|
|
this.textContent = value;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function text_textFunction(value) {
|
|
|
return function() {
|
|
|
var value1 = value(this);
|
|
|
this.textContent = value1 == null ? "" : value1;
|
|
|
};
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function transition_text(value) {
|
|
|
return this.tween("text", typeof value === "function"
|
|
|
? text_textFunction(tweenValue(this, "text", value))
|
|
|
: text_textConstant(value == null ? "" : value + ""));
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/textTween.js
|
|
|
function textInterpolate(i) {
|
|
|
return function(t) {
|
|
|
this.textContent = i.call(this, t);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
function textTween(value) {
|
|
|
var t0, i0;
|
|
|
function tween() {
|
|
|
var i = value.apply(this, arguments);
|
|
|
if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
|
|
|
return t0;
|
|
|
}
|
|
|
tween._value = value;
|
|
|
return tween;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function transition_textTween(value) {
|
|
|
var key = "text";
|
|
|
if (arguments.length < 1) return (key = this.tween(key)) && key._value;
|
|
|
if (value == null) return this.tween(key, null);
|
|
|
if (typeof value !== "function") throw new Error;
|
|
|
return this.tween(key, textTween(value));
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/transition.js
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ function transition() {
|
|
|
var name = this._name,
|
|
|
id0 = this._id,
|
|
|
id1 = newId();
|
|
|
|
|
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
|
if (node = group[i]) {
|
|
|
var inherit = get(node, id0);
|
|
|
schedule(node, name, id1, i, group, {
|
|
|
time: inherit.time + inherit.delay + inherit.duration,
|
|
|
delay: 0,
|
|
|
duration: inherit.duration,
|
|
|
ease: inherit.ease
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return new Transition(groups, this._parents, name, id1);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/end.js
|
|
|
|
|
|
|
|
|
/* harmony default export */ function end() {
|
|
|
var on0, on1, that = this, id = that._id, size = that.size();
|
|
|
return new Promise(function(resolve, reject) {
|
|
|
var cancel = {value: reject},
|
|
|
end = {value: function() { if (--size === 0) resolve(); }};
|
|
|
|
|
|
that.each(function() {
|
|
|
var schedule = set(this, id),
|
|
|
on = schedule.on;
|
|
|
|
|
|
// If this node shared a dispatch with the previous node,
|
|
|
// just assign the updated shared dispatch and we’re done!
|
|
|
// Otherwise, copy-on-write.
|
|
|
if (on !== on0) {
|
|
|
on1 = (on0 = on).copy();
|
|
|
on1._.cancel.push(cancel);
|
|
|
on1._.interrupt.push(cancel);
|
|
|
on1._.end.push(end);
|
|
|
}
|
|
|
|
|
|
schedule.on = on1;
|
|
|
});
|
|
|
|
|
|
// The selection was empty, resolve end immediately
|
|
|
if (size === 0) resolve();
|
|
|
});
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/transition/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var id = 0;
|
|
|
|
|
|
function Transition(groups, parents, name, id) {
|
|
|
this._groups = groups;
|
|
|
this._parents = parents;
|
|
|
this._name = name;
|
|
|
this._id = id;
|
|
|
}
|
|
|
|
|
|
function transition_transition(name) {
|
|
|
return src_selection().transition(name);
|
|
|
}
|
|
|
|
|
|
function newId() {
|
|
|
return ++id;
|
|
|
}
|
|
|
|
|
|
var selection_prototype = src_selection.prototype;
|
|
|
|
|
|
Transition.prototype = transition_transition.prototype = {
|
|
|
constructor: Transition,
|
|
|
select: transition_select,
|
|
|
selectAll: transition_selectAll,
|
|
|
selectChild: selection_prototype.selectChild,
|
|
|
selectChildren: selection_prototype.selectChildren,
|
|
|
filter: transition_filter,
|
|
|
merge: transition_merge,
|
|
|
selection: transition_selection,
|
|
|
transition: transition,
|
|
|
call: selection_prototype.call,
|
|
|
nodes: selection_prototype.nodes,
|
|
|
node: selection_prototype.node,
|
|
|
size: selection_prototype.size,
|
|
|
empty: selection_prototype.empty,
|
|
|
each: selection_prototype.each,
|
|
|
on: transition_on,
|
|
|
attr: transition_attr,
|
|
|
attrTween: transition_attrTween,
|
|
|
style: transition_style,
|
|
|
styleTween: transition_styleTween,
|
|
|
text: transition_text,
|
|
|
textTween: transition_textTween,
|
|
|
remove: transition_remove,
|
|
|
tween: tween,
|
|
|
delay: delay,
|
|
|
duration: duration,
|
|
|
ease: ease,
|
|
|
easeVarying: transition_easeVarying,
|
|
|
end: end,
|
|
|
[Symbol.iterator]: selection_prototype[Symbol.iterator]
|
|
|
};
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-ease/src/cubic.js
|
|
|
function cubicIn(t) {
|
|
|
return t * t * t;
|
|
|
}
|
|
|
|
|
|
function cubicOut(t) {
|
|
|
return --t * t * t + 1;
|
|
|
}
|
|
|
|
|
|
function cubicInOut(t) {
|
|
|
return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/selection/transition.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var defaultTiming = {
|
|
|
time: null, // Set on use.
|
|
|
delay: 0,
|
|
|
duration: 250,
|
|
|
ease: cubicInOut
|
|
|
};
|
|
|
|
|
|
function inherit(node, id) {
|
|
|
var timing;
|
|
|
while (!(timing = node.__transition) || !(timing = timing[id])) {
|
|
|
if (!(node = node.parentNode)) {
|
|
|
throw new Error(`transition ${id} not found`);
|
|
|
}
|
|
|
}
|
|
|
return timing;
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function selection_transition(name) {
|
|
|
var id,
|
|
|
timing;
|
|
|
|
|
|
if (name instanceof Transition) {
|
|
|
id = name._id, name = name._name;
|
|
|
} else {
|
|
|
id = newId(), (timing = defaultTiming).time = (0,timer/* now */.zO)(), name = name == null ? null : name + "";
|
|
|
}
|
|
|
|
|
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
|
if (node = group[i]) {
|
|
|
schedule(node, name, id, i, group, timing || inherit(node, id));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return new Transition(groups, this._parents, name, id);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/selection/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src_selection.prototype.interrupt = selection_interrupt;
|
|
|
src_selection.prototype.transition = selection_transition;
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-transition/src/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-brush/src/brush.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var MODE_DRAG = {name: "drag"},
|
|
|
MODE_SPACE = {name: "space"},
|
|
|
MODE_HANDLE = {name: "handle"},
|
|
|
MODE_CENTER = {name: "center"};
|
|
|
|
|
|
const {abs, max: brush_max, min: brush_min} = Math;
|
|
|
|
|
|
function number1(e) {
|
|
|
return [+e[0], +e[1]];
|
|
|
}
|
|
|
|
|
|
function number2(e) {
|
|
|
return [number1(e[0]), number1(e[1])];
|
|
|
}
|
|
|
|
|
|
var X = {
|
|
|
name: "x",
|
|
|
handles: ["w", "e"].map(type),
|
|
|
input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[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(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[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 : number2(xy); },
|
|
|
output: function(xy) { return xy; }
|
|
|
};
|
|
|
|
|
|
var cursors = {
|
|
|
overlay: "crosshair",
|
|
|
selection: "move",
|
|
|
n: "ns-resize",
|
|
|
e: "ew-resize",
|
|
|
s: "ns-resize",
|
|
|
w: "ew-resize",
|
|
|
nw: "nwse-resize",
|
|
|
ne: "nesw-resize",
|
|
|
se: "nwse-resize",
|
|
|
sw: "nesw-resize"
|
|
|
};
|
|
|
|
|
|
var flipX = {
|
|
|
e: "w",
|
|
|
w: "e",
|
|
|
nw: "ne",
|
|
|
ne: "nw",
|
|
|
se: "sw",
|
|
|
sw: "se"
|
|
|
};
|
|
|
|
|
|
var flipY = {
|
|
|
n: "s",
|
|
|
s: "n",
|
|
|
nw: "sw",
|
|
|
ne: "se",
|
|
|
se: "ne",
|
|
|
sw: "nw"
|
|
|
};
|
|
|
|
|
|
var signsX = {
|
|
|
overlay: +1,
|
|
|
selection: +1,
|
|
|
n: null,
|
|
|
e: +1,
|
|
|
s: null,
|
|
|
w: -1,
|
|
|
nw: -1,
|
|
|
ne: +1,
|
|
|
se: +1,
|
|
|
sw: -1
|
|
|
};
|
|
|
|
|
|
var signsY = {
|
|
|
overlay: +1,
|
|
|
selection: +1,
|
|
|
n: -1,
|
|
|
e: null,
|
|
|
s: +1,
|
|
|
w: null,
|
|
|
nw: -1,
|
|
|
ne: -1,
|
|
|
se: +1,
|
|
|
sw: +1
|
|
|
};
|
|
|
|
|
|
function type(t) {
|
|
|
return {type: t};
|
|
|
}
|
|
|
|
|
|
// Ignore right-click, since that should open the context menu.
|
|
|
function defaultFilter(event) {
|
|
|
return !event.ctrlKey && !event.button;
|
|
|
}
|
|
|
|
|
|
function defaultExtent() {
|
|
|
var svg = this.ownerSVGElement || this;
|
|
|
if (svg.hasAttribute("viewBox")) {
|
|
|
svg = svg.viewBox.baseVal;
|
|
|
return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];
|
|
|
}
|
|
|
return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];
|
|
|
}
|
|
|
|
|
|
function defaultTouchable() {
|
|
|
return navigator.maxTouchPoints || ("ontouchstart" in this);
|
|
|
}
|
|
|
|
|
|
// Like d3.local, but with the name “__brush” rather than auto-generated.
|
|
|
function local(node) {
|
|
|
while (!node.__brush) if (!(node = node.parentNode)) return;
|
|
|
return node.__brush;
|
|
|
}
|
|
|
|
|
|
function brush_empty(extent) {
|
|
|
return extent[0][0] === extent[1][0]
|
|
|
|| extent[0][1] === extent[1][1];
|
|
|
}
|
|
|
|
|
|
function brushSelection(node) {
|
|
|
var state = node.__brush;
|
|
|
return state ? state.dim.output(state.selection) : null;
|
|
|
}
|
|
|
|
|
|
function brushX() {
|
|
|
return brush_brush(X);
|
|
|
}
|
|
|
|
|
|
function brushY() {
|
|
|
return brush_brush(Y);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function brush() {
|
|
|
return brush_brush(XY);
|
|
|
}
|
|
|
|
|
|
function brush_brush(dim) {
|
|
|
var extent = defaultExtent,
|
|
|
filter = defaultFilter,
|
|
|
touchable = defaultTouchable,
|
|
|
keys = true,
|
|
|
listeners = dispatch("start", "brush", "end"),
|
|
|
handleSize = 6,
|
|
|
touchending;
|
|
|
|
|
|
function brush(group) {
|
|
|
var overlay = group
|
|
|
.property("__brush", initialize)
|
|
|
.selectAll(".overlay")
|
|
|
.data([type("overlay")]);
|
|
|
|
|
|
overlay.enter().append("rect")
|
|
|
.attr("class", "overlay")
|
|
|
.attr("pointer-events", "all")
|
|
|
.attr("cursor", cursors.overlay)
|
|
|
.merge(overlay)
|
|
|
.each(function() {
|
|
|
var extent = local(this).extent;
|
|
|
select(this)
|
|
|
.attr("x", extent[0][0])
|
|
|
.attr("y", extent[0][1])
|
|
|
.attr("width", extent[1][0] - extent[0][0])
|
|
|
.attr("height", extent[1][1] - extent[0][1]);
|
|
|
});
|
|
|
|
|
|
group.selectAll(".selection")
|
|
|
.data([type("selection")])
|
|
|
.enter().append("rect")
|
|
|
.attr("class", "selection")
|
|
|
.attr("cursor", cursors.selection)
|
|
|
.attr("fill", "#777")
|
|
|
.attr("fill-opacity", 0.3)
|
|
|
.attr("stroke", "#fff")
|
|
|
.attr("shape-rendering", "crispEdges");
|
|
|
|
|
|
var handle = group.selectAll(".handle")
|
|
|
.data(dim.handles, function(d) { return d.type; });
|
|
|
|
|
|
handle.exit().remove();
|
|
|
|
|
|
handle.enter().append("rect")
|
|
|
.attr("class", function(d) { return "handle handle--" + d.type; })
|
|
|
.attr("cursor", function(d) { return cursors[d.type]; });
|
|
|
|
|
|
group
|
|
|
.each(redraw)
|
|
|
.attr("fill", "none")
|
|
|
.attr("pointer-events", "all")
|
|
|
.on("mousedown.brush", started)
|
|
|
.filter(touchable)
|
|
|
.on("touchstart.brush", started)
|
|
|
.on("touchmove.brush", touchmoved)
|
|
|
.on("touchend.brush touchcancel.brush", touchended)
|
|
|
.style("touch-action", "none")
|
|
|
.style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
|
}
|
|
|
|
|
|
brush.move = function(group, selection, event) {
|
|
|
if (group.tween) {
|
|
|
group
|
|
|
.on("start.brush", function(event) { emitter(this, arguments).beforestart().start(event); })
|
|
|
.on("interrupt.brush end.brush", function(event) { emitter(this, arguments).end(event); })
|
|
|
.tween("brush", function() {
|
|
|
var that = this,
|
|
|
state = that.__brush,
|
|
|
emit = emitter(that, arguments),
|
|
|
selection0 = state.selection,
|
|
|
selection1 = dim.input(typeof selection === "function" ? selection.apply(this, arguments) : selection, state.extent),
|
|
|
i = interpolate(selection0, selection1);
|
|
|
|
|
|
function tween(t) {
|
|
|
state.selection = t === 1 && selection1 === null ? null : i(t);
|
|
|
redraw.call(that);
|
|
|
emit.brush();
|
|
|
}
|
|
|
|
|
|
return selection0 !== null && selection1 !== null ? tween : tween(1);
|
|
|
});
|
|
|
} else {
|
|
|
group
|
|
|
.each(function() {
|
|
|
var that = this,
|
|
|
args = arguments,
|
|
|
state = that.__brush,
|
|
|
selection1 = dim.input(typeof selection === "function" ? selection.apply(that, args) : selection, state.extent),
|
|
|
emit = emitter(that, args).beforestart();
|
|
|
|
|
|
interrupt(that);
|
|
|
state.selection = selection1 === null ? null : selection1;
|
|
|
redraw.call(that);
|
|
|
emit.start(event).brush(event).end(event);
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
|
|
|
brush.clear = function(group, event) {
|
|
|
brush.move(group, null, event);
|
|
|
};
|
|
|
|
|
|
function redraw() {
|
|
|
var group = select(this),
|
|
|
selection = local(this).selection;
|
|
|
|
|
|
if (selection) {
|
|
|
group.selectAll(".selection")
|
|
|
.style("display", null)
|
|
|
.attr("x", selection[0][0])
|
|
|
.attr("y", selection[0][1])
|
|
|
.attr("width", selection[1][0] - selection[0][0])
|
|
|
.attr("height", selection[1][1] - selection[0][1]);
|
|
|
|
|
|
group.selectAll(".handle")
|
|
|
.style("display", null)
|
|
|
.attr("x", function(d) { return d.type[d.type.length - 1] === "e" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })
|
|
|
.attr("y", function(d) { return d.type[0] === "s" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })
|
|
|
.attr("width", function(d) { return d.type === "n" || d.type === "s" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })
|
|
|
.attr("height", function(d) { return d.type === "e" || d.type === "w" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
group.selectAll(".selection,.handle")
|
|
|
.style("display", "none")
|
|
|
.attr("x", null)
|
|
|
.attr("y", null)
|
|
|
.attr("width", null)
|
|
|
.attr("height", null);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function emitter(that, args, clean) {
|
|
|
var emit = that.__brush.emitter;
|
|
|
return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);
|
|
|
}
|
|
|
|
|
|
function Emitter(that, args, clean) {
|
|
|
this.that = that;
|
|
|
this.args = args;
|
|
|
this.state = that.__brush;
|
|
|
this.active = 0;
|
|
|
this.clean = clean;
|
|
|
}
|
|
|
|
|
|
Emitter.prototype = {
|
|
|
beforestart: function() {
|
|
|
if (++this.active === 1) this.state.emitter = this, this.starting = true;
|
|
|
return this;
|
|
|
},
|
|
|
start: function(event, mode) {
|
|
|
if (this.starting) this.starting = false, this.emit("start", event, mode);
|
|
|
else this.emit("brush", event);
|
|
|
return this;
|
|
|
},
|
|
|
brush: function(event, mode) {
|
|
|
this.emit("brush", event, mode);
|
|
|
return this;
|
|
|
},
|
|
|
end: function(event, mode) {
|
|
|
if (--this.active === 0) delete this.state.emitter, this.emit("end", event, mode);
|
|
|
return this;
|
|
|
},
|
|
|
emit: function(type, event, mode) {
|
|
|
var d = select(this.that).datum();
|
|
|
listeners.call(
|
|
|
type,
|
|
|
this.that,
|
|
|
new BrushEvent(type, {
|
|
|
sourceEvent: event,
|
|
|
target: brush,
|
|
|
selection: dim.output(this.state.selection),
|
|
|
mode,
|
|
|
dispatch: listeners
|
|
|
}),
|
|
|
d
|
|
|
);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
function started(event) {
|
|
|
if (touchending && !event.touches) return;
|
|
|
if (!filter.apply(this, arguments)) return;
|
|
|
|
|
|
var that = this,
|
|
|
type = event.target.__data__.type,
|
|
|
mode = (keys && event.metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE),
|
|
|
signX = dim === Y ? null : signsX[type],
|
|
|
signY = dim === X ? null : signsY[type],
|
|
|
state = local(that),
|
|
|
extent = state.extent,
|
|
|
selection = state.selection,
|
|
|
W = extent[0][0], w0, w1,
|
|
|
N = extent[0][1], n0, n1,
|
|
|
E = extent[1][0], e0, e1,
|
|
|
S = extent[1][1], s0, s1,
|
|
|
dx = 0,
|
|
|
dy = 0,
|
|
|
moving,
|
|
|
shifting = signX && signY && keys && event.shiftKey,
|
|
|
lockX,
|
|
|
lockY,
|
|
|
points = Array.from(event.touches || [event], t => {
|
|
|
const i = t.identifier;
|
|
|
t = pointer(t, that);
|
|
|
t.point0 = t.slice();
|
|
|
t.identifier = i;
|
|
|
return t;
|
|
|
});
|
|
|
|
|
|
interrupt(that);
|
|
|
var emit = emitter(that, arguments, true).beforestart();
|
|
|
|
|
|
if (type === "overlay") {
|
|
|
if (selection) moving = true;
|
|
|
const pts = [points[0], points[1] || points[0]];
|
|
|
state.selection = selection = [[
|
|
|
w0 = dim === Y ? W : brush_min(pts[0][0], pts[1][0]),
|
|
|
n0 = dim === X ? N : brush_min(pts[0][1], pts[1][1])
|
|
|
], [
|
|
|
e0 = dim === Y ? E : brush_max(pts[0][0], pts[1][0]),
|
|
|
s0 = dim === X ? S : brush_max(pts[0][1], pts[1][1])
|
|
|
]];
|
|
|
if (points.length > 1) move(event);
|
|
|
} else {
|
|
|
w0 = selection[0][0];
|
|
|
n0 = selection[0][1];
|
|
|
e0 = selection[1][0];
|
|
|
s0 = selection[1][1];
|
|
|
}
|
|
|
|
|
|
w1 = w0;
|
|
|
n1 = n0;
|
|
|
e1 = e0;
|
|
|
s1 = s0;
|
|
|
|
|
|
var group = select(that)
|
|
|
.attr("pointer-events", "none");
|
|
|
|
|
|
var overlay = group.selectAll(".overlay")
|
|
|
.attr("cursor", cursors[type]);
|
|
|
|
|
|
if (event.touches) {
|
|
|
emit.moved = moved;
|
|
|
emit.ended = ended;
|
|
|
} else {
|
|
|
var view = select(event.view)
|
|
|
.on("mousemove.brush", moved, true)
|
|
|
.on("mouseup.brush", ended, true);
|
|
|
if (keys) view
|
|
|
.on("keydown.brush", keydowned, true)
|
|
|
.on("keyup.brush", keyupped, true)
|
|
|
|
|
|
dragDisable(event.view);
|
|
|
}
|
|
|
|
|
|
redraw.call(that);
|
|
|
emit.start(event, mode.name);
|
|
|
|
|
|
function moved(event) {
|
|
|
for (const p of event.changedTouches || [event]) {
|
|
|
for (const d of points)
|
|
|
if (d.identifier === p.identifier) d.cur = pointer(p, that);
|
|
|
}
|
|
|
if (shifting && !lockX && !lockY && points.length === 1) {
|
|
|
const point = points[0];
|
|
|
if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1]))
|
|
|
lockY = true;
|
|
|
else
|
|
|
lockX = true;
|
|
|
}
|
|
|
for (const point of points)
|
|
|
if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];
|
|
|
moving = true;
|
|
|
noevent(event);
|
|
|
move(event);
|
|
|
}
|
|
|
|
|
|
function move(event) {
|
|
|
const point = points[0], point0 = point.point0;
|
|
|
var t;
|
|
|
|
|
|
dx = point[0] - point0[0];
|
|
|
dy = point[1] - point0[1];
|
|
|
|
|
|
switch (mode) {
|
|
|
case MODE_SPACE:
|
|
|
case MODE_DRAG: {
|
|
|
if (signX) dx = brush_max(W - w0, brush_min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;
|
|
|
if (signY) dy = brush_max(N - n0, brush_min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;
|
|
|
break;
|
|
|
}
|
|
|
case MODE_HANDLE: {
|
|
|
if (points[1]) {
|
|
|
if (signX) w1 = brush_max(W, brush_min(E, points[0][0])), e1 = brush_max(W, brush_min(E, points[1][0])), signX = 1;
|
|
|
if (signY) n1 = brush_max(N, brush_min(S, points[0][1])), s1 = brush_max(N, brush_min(S, points[1][1])), signY = 1;
|
|
|
} else {
|
|
|
if (signX < 0) dx = brush_max(W - w0, brush_min(E - w0, dx)), w1 = w0 + dx, e1 = e0;
|
|
|
else if (signX > 0) dx = brush_max(W - e0, brush_min(E - e0, dx)), w1 = w0, e1 = e0 + dx;
|
|
|
if (signY < 0) dy = brush_max(N - n0, brush_min(S - n0, dy)), n1 = n0 + dy, s1 = s0;
|
|
|
else if (signY > 0) dy = brush_max(N - s0, brush_min(S - s0, dy)), n1 = n0, s1 = s0 + dy;
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
case MODE_CENTER: {
|
|
|
if (signX) w1 = brush_max(W, brush_min(E, w0 - dx * signX)), e1 = brush_max(W, brush_min(E, e0 + dx * signX));
|
|
|
if (signY) n1 = brush_max(N, brush_min(S, n0 - dy * signY)), s1 = brush_max(N, brush_min(S, s0 + dy * signY));
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (e1 < w1) {
|
|
|
signX *= -1;
|
|
|
t = w0, w0 = e0, e0 = t;
|
|
|
t = w1, w1 = e1, e1 = t;
|
|
|
if (type in flipX) overlay.attr("cursor", cursors[type = flipX[type]]);
|
|
|
}
|
|
|
|
|
|
if (s1 < n1) {
|
|
|
signY *= -1;
|
|
|
t = n0, n0 = s0, s0 = t;
|
|
|
t = n1, n1 = s1, s1 = t;
|
|
|
if (type in flipY) overlay.attr("cursor", cursors[type = flipY[type]]);
|
|
|
}
|
|
|
|
|
|
if (state.selection) selection = state.selection; // May be set by brush.move!
|
|
|
if (lockX) w1 = selection[0][0], e1 = selection[1][0];
|
|
|
if (lockY) n1 = selection[0][1], s1 = selection[1][1];
|
|
|
|
|
|
if (selection[0][0] !== w1
|
|
|
|| selection[0][1] !== n1
|
|
|
|| selection[1][0] !== e1
|
|
|
|| selection[1][1] !== s1) {
|
|
|
state.selection = [[w1, n1], [e1, s1]];
|
|
|
redraw.call(that);
|
|
|
emit.brush(event, mode.name);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function ended(event) {
|
|
|
nopropagation(event);
|
|
|
if (event.touches) {
|
|
|
if (event.touches.length) return;
|
|
|
if (touchending) clearTimeout(touchending);
|
|
|
touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!
|
|
|
} else {
|
|
|
dragEnable(event.view, moving);
|
|
|
view.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null);
|
|
|
}
|
|
|
group.attr("pointer-events", "all");
|
|
|
overlay.attr("cursor", cursors.overlay);
|
|
|
if (state.selection) selection = state.selection; // May be set by brush.move (on start)!
|
|
|
if (brush_empty(selection)) state.selection = null, redraw.call(that);
|
|
|
emit.end(event, mode.name);
|
|
|
}
|
|
|
|
|
|
function keydowned(event) {
|
|
|
switch (event.keyCode) {
|
|
|
case 16: { // SHIFT
|
|
|
shifting = signX && signY;
|
|
|
break;
|
|
|
}
|
|
|
case 18: { // ALT
|
|
|
if (mode === MODE_HANDLE) {
|
|
|
if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;
|
|
|
if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;
|
|
|
mode = MODE_CENTER;
|
|
|
move(event);
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
case 32: { // SPACE; takes priority over ALT
|
|
|
if (mode === MODE_HANDLE || mode === MODE_CENTER) {
|
|
|
if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;
|
|
|
if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;
|
|
|
mode = MODE_SPACE;
|
|
|
overlay.attr("cursor", cursors.selection);
|
|
|
move(event);
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
default: return;
|
|
|
}
|
|
|
noevent(event);
|
|
|
}
|
|
|
|
|
|
function keyupped(event) {
|
|
|
switch (event.keyCode) {
|
|
|
case 16: { // SHIFT
|
|
|
if (shifting) {
|
|
|
lockX = lockY = shifting = false;
|
|
|
move(event);
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
case 18: { // ALT
|
|
|
if (mode === MODE_CENTER) {
|
|
|
if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;
|
|
|
if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;
|
|
|
mode = MODE_HANDLE;
|
|
|
move(event);
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
case 32: { // SPACE
|
|
|
if (mode === MODE_SPACE) {
|
|
|
if (event.altKey) {
|
|
|
if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;
|
|
|
if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;
|
|
|
mode = MODE_CENTER;
|
|
|
} else {
|
|
|
if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;
|
|
|
if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;
|
|
|
mode = MODE_HANDLE;
|
|
|
}
|
|
|
overlay.attr("cursor", cursors[type]);
|
|
|
move(event);
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
default: return;
|
|
|
}
|
|
|
noevent(event);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function touchmoved(event) {
|
|
|
emitter(this, arguments).moved(event);
|
|
|
}
|
|
|
|
|
|
function touchended(event) {
|
|
|
emitter(this, arguments).ended(event);
|
|
|
}
|
|
|
|
|
|
function initialize() {
|
|
|
var state = this.__brush || {selection: null};
|
|
|
state.extent = number2(extent.apply(this, arguments));
|
|
|
state.dim = dim;
|
|
|
return state;
|
|
|
}
|
|
|
|
|
|
brush.extent = function(_) {
|
|
|
return arguments.length ? (extent = typeof _ === "function" ? _ : constant(number2(_)), brush) : extent;
|
|
|
};
|
|
|
|
|
|
brush.filter = function(_) {
|
|
|
return arguments.length ? (filter = typeof _ === "function" ? _ : constant(!!_), brush) : filter;
|
|
|
};
|
|
|
|
|
|
brush.touchable = function(_) {
|
|
|
return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), brush) : touchable;
|
|
|
};
|
|
|
|
|
|
brush.handleSize = function(_) {
|
|
|
return arguments.length ? (handleSize = +_, brush) : handleSize;
|
|
|
};
|
|
|
|
|
|
brush.keyModifiers = function(_) {
|
|
|
return arguments.length ? (keys = !!_, brush) : keys;
|
|
|
};
|
|
|
|
|
|
brush.on = function() {
|
|
|
var value = listeners.on.apply(listeners, arguments);
|
|
|
return value === listeners ? brush : value;
|
|
|
};
|
|
|
|
|
|
return brush;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-brush/src/index.js
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-format/src/defaultLocale.js
|
|
|
var defaultLocale = __webpack_require__(90741);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-format/src/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-hierarchy/src/hierarchy/index.js + 13 modules
|
|
|
var hierarchy = __webpack_require__(68775);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-hierarchy/src/treemap/index.js
|
|
|
var treemap = __webpack_require__(99375);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-hierarchy/src/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-interpolate/src/index.js + 9 modules
|
|
|
var src = __webpack_require__(69004);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-array/src/range.js
|
|
|
var range = __webpack_require__(53353);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-scale/src/init.js
|
|
|
var src_init = __webpack_require__(42287);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-scale/src/ordinal.js
|
|
|
var ordinal = __webpack_require__(81406);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-scale/src/band.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function band() {
|
|
|
var scale = (0,ordinal/* default */.Z)().unknown(undefined),
|
|
|
domain = scale.domain,
|
|
|
ordinalRange = scale.range,
|
|
|
r0 = 0,
|
|
|
r1 = 1,
|
|
|
step,
|
|
|
bandwidth,
|
|
|
round = false,
|
|
|
paddingInner = 0,
|
|
|
paddingOuter = 0,
|
|
|
align = 0.5;
|
|
|
|
|
|
delete scale.unknown;
|
|
|
|
|
|
function rescale() {
|
|
|
var n = domain().length,
|
|
|
reverse = r1 < r0,
|
|
|
start = reverse ? r1 : r0,
|
|
|
stop = reverse ? 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 = (0,range/* default */.Z)(n).map(function(i) { return start + step * i; });
|
|
|
return ordinalRange(reverse ? values.reverse() : values);
|
|
|
}
|
|
|
|
|
|
scale.domain = function(_) {
|
|
|
return arguments.length ? (domain(_), rescale()) : domain();
|
|
|
};
|
|
|
|
|
|
scale.range = function(_) {
|
|
|
return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];
|
|
|
};
|
|
|
|
|
|
scale.rangeRound = function(_) {
|
|
|
return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();
|
|
|
};
|
|
|
|
|
|
scale.bandwidth = function() {
|
|
|
return bandwidth;
|
|
|
};
|
|
|
|
|
|
scale.step = function() {
|
|
|
return step;
|
|
|
};
|
|
|
|
|
|
scale.round = function(_) {
|
|
|
return arguments.length ? (round = !!_, rescale()) : round;
|
|
|
};
|
|
|
|
|
|
scale.padding = function(_) {
|
|
|
return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;
|
|
|
};
|
|
|
|
|
|
scale.paddingInner = function(_) {
|
|
|
return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;
|
|
|
};
|
|
|
|
|
|
scale.paddingOuter = function(_) {
|
|
|
return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;
|
|
|
};
|
|
|
|
|
|
scale.align = function(_) {
|
|
|
return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;
|
|
|
};
|
|
|
|
|
|
scale.copy = function() {
|
|
|
return band(domain(), [r0, r1])
|
|
|
.round(round)
|
|
|
.paddingInner(paddingInner)
|
|
|
.paddingOuter(paddingOuter)
|
|
|
.align(align);
|
|
|
};
|
|
|
|
|
|
return src_init/* initRange */.o.apply(rescale(), arguments);
|
|
|
}
|
|
|
|
|
|
function pointish(scale) {
|
|
|
var copy = scale.copy;
|
|
|
|
|
|
scale.padding = scale.paddingOuter;
|
|
|
delete scale.paddingInner;
|
|
|
delete scale.paddingOuter;
|
|
|
|
|
|
scale.copy = function() {
|
|
|
return pointish(copy());
|
|
|
};
|
|
|
|
|
|
return scale;
|
|
|
}
|
|
|
|
|
|
function point() {
|
|
|
return pointish(band.apply(null, arguments).paddingInner(1));
|
|
|
}
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-scale/src/linear.js
|
|
|
var linear = __webpack_require__(29387);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-scale/src/time.js
|
|
|
var time = __webpack_require__(61941);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-scale/src/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-scale-chromatic/src/colors.js
|
|
|
var colors = __webpack_require__(37505);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-scale-chromatic/src/categorical/Tableau10.js
|
|
|
|
|
|
|
|
|
/* harmony default export */ const Tableau10 = ((0,colors/* default */.Z)("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"));
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-scale-chromatic/src/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/select.js
|
|
|
|
|
|
|
|
|
/* harmony default export */ function src_select(selector) {
|
|
|
return typeof selector === "string"
|
|
|
? new Selection([[document.querySelector(selector)]], [document.documentElement])
|
|
|
: new Selection([[selector]], root);
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-selection/src/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/arc.js
|
|
|
var arc = __webpack_require__(87826);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/line.js
|
|
|
var line = __webpack_require__(40652);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/array.js
|
|
|
var src_array = __webpack_require__(89555);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/constant.js
|
|
|
var d3_shape_src_constant = __webpack_require__(17728);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-shape/src/descending.js
|
|
|
/* harmony default export */ function descending(a, b) {
|
|
|
return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-shape/src/identity.js
|
|
|
/* harmony default export */ function d3_shape_src_identity(d) {
|
|
|
return d;
|
|
|
}
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/math.js
|
|
|
var math = __webpack_require__(90596);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-shape/src/pie.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ function pie() {
|
|
|
var value = d3_shape_src_identity,
|
|
|
sortValues = descending,
|
|
|
sort = null,
|
|
|
startAngle = (0,d3_shape_src_constant/* default */.Z)(0),
|
|
|
endAngle = (0,d3_shape_src_constant/* default */.Z)(math/* tau */.BZ),
|
|
|
padAngle = (0,d3_shape_src_constant/* default */.Z)(0);
|
|
|
|
|
|
function pie(data) {
|
|
|
var i,
|
|
|
n = (data = (0,src_array/* default */.Z)(data)).length,
|
|
|
j,
|
|
|
k,
|
|
|
sum = 0,
|
|
|
index = new Array(n),
|
|
|
arcs = new Array(n),
|
|
|
a0 = +startAngle.apply(this, arguments),
|
|
|
da = Math.min(math/* tau */.BZ, Math.max(-math/* tau */.BZ, endAngle.apply(this, arguments) - a0)),
|
|
|
a1,
|
|
|
p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),
|
|
|
pa = p * (da < 0 ? -1 : 1),
|
|
|
v;
|
|
|
|
|
|
for (i = 0; i < n; ++i) {
|
|
|
if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {
|
|
|
sum += v;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// Optionally sort the arcs by previously-computed values or by data.
|
|
|
if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });
|
|
|
else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });
|
|
|
|
|
|
// Compute the arcs! They are stored in the original data's order.
|
|
|
for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {
|
|
|
j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {
|
|
|
data: data[j],
|
|
|
index: i,
|
|
|
value: v,
|
|
|
startAngle: a0,
|
|
|
endAngle: a1,
|
|
|
padAngle: p
|
|
|
};
|
|
|
}
|
|
|
|
|
|
return arcs;
|
|
|
}
|
|
|
|
|
|
pie.value = function(_) {
|
|
|
return arguments.length ? (value = typeof _ === "function" ? _ : (0,d3_shape_src_constant/* default */.Z)(+_), pie) : value;
|
|
|
};
|
|
|
|
|
|
pie.sortValues = function(_) {
|
|
|
return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;
|
|
|
};
|
|
|
|
|
|
pie.sort = function(_) {
|
|
|
return arguments.length ? (sort = _, sortValues = null, pie) : sort;
|
|
|
};
|
|
|
|
|
|
pie.startAngle = function(_) {
|
|
|
return arguments.length ? (startAngle = typeof _ === "function" ? _ : (0,d3_shape_src_constant/* default */.Z)(+_), pie) : startAngle;
|
|
|
};
|
|
|
|
|
|
pie.endAngle = function(_) {
|
|
|
return arguments.length ? (endAngle = typeof _ === "function" ? _ : (0,d3_shape_src_constant/* default */.Z)(+_), pie) : endAngle;
|
|
|
};
|
|
|
|
|
|
pie.padAngle = function(_) {
|
|
|
return arguments.length ? (padAngle = typeof _ === "function" ? _ : (0,d3_shape_src_constant/* default */.Z)(+_), pie) : padAngle;
|
|
|
};
|
|
|
|
|
|
return pie;
|
|
|
}
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/basisClosed.js
|
|
|
var basisClosed = __webpack_require__(88973);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/basisOpen.js
|
|
|
var basisOpen = __webpack_require__(74372);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/basis.js
|
|
|
var basis = __webpack_require__(73021);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-shape/src/curve/bump.js
|
|
|
|
|
|
|
|
|
class Bump {
|
|
|
constructor(context, x) {
|
|
|
this._context = context;
|
|
|
this._x = x;
|
|
|
}
|
|
|
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(x, y) {
|
|
|
x = +x, y = +y;
|
|
|
switch (this._point) {
|
|
|
case 0: {
|
|
|
this._point = 1;
|
|
|
if (this._line) this._context.lineTo(x, y);
|
|
|
else this._context.moveTo(x, y);
|
|
|
break;
|
|
|
}
|
|
|
case 1: this._point = 2; // falls through
|
|
|
default: {
|
|
|
if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y);
|
|
|
else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
this._x0 = x, this._y0 = y;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
class BumpRadial {
|
|
|
constructor(context) {
|
|
|
this._context = context;
|
|
|
}
|
|
|
lineStart() {
|
|
|
this._point = 0;
|
|
|
}
|
|
|
lineEnd() {}
|
|
|
point(x, y) {
|
|
|
x = +x, y = +y;
|
|
|
if (this._point === 0) {
|
|
|
this._point = 1;
|
|
|
} else {
|
|
|
const p0 = pointRadial(this._x0, this._y0);
|
|
|
const p1 = pointRadial(this._x0, this._y0 = (this._y0 + y) / 2);
|
|
|
const p2 = pointRadial(x, this._y0);
|
|
|
const p3 = pointRadial(x, y);
|
|
|
this._context.moveTo(...p0);
|
|
|
this._context.bezierCurveTo(...p1, ...p2, ...p3);
|
|
|
}
|
|
|
this._x0 = x, this._y0 = y;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function bumpX(context) {
|
|
|
return new Bump(context, true);
|
|
|
}
|
|
|
|
|
|
function bumpY(context) {
|
|
|
return new Bump(context, false);
|
|
|
}
|
|
|
|
|
|
function bumpRadial(context) {
|
|
|
return new BumpRadial(context);
|
|
|
}
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/bundle.js
|
|
|
var bundle = __webpack_require__(32830);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/cardinalClosed.js
|
|
|
var cardinalClosed = __webpack_require__(91390);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/cardinalOpen.js
|
|
|
var cardinalOpen = __webpack_require__(41599);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/cardinal.js
|
|
|
var cardinal = __webpack_require__(88800);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/catmullRomClosed.js
|
|
|
var catmullRomClosed = __webpack_require__(7391);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/catmullRomOpen.js
|
|
|
var catmullRomOpen = __webpack_require__(63703);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/catmullRom.js
|
|
|
var catmullRom = __webpack_require__(48917);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/linearClosed.js
|
|
|
var linearClosed = __webpack_require__(29458);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/linear.js
|
|
|
var curve_linear = __webpack_require__(4224);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/monotone.js
|
|
|
var monotone = __webpack_require__(78509);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/natural.js
|
|
|
var natural = __webpack_require__(3499);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-shape/src/curve/step.js
|
|
|
var step = __webpack_require__(21468);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-shape/src/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Note: radialArea is deprecated!
|
|
|
// Note: radialLine is deprecated!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-time/src/millisecond.js
|
|
|
var millisecond = __webpack_require__(17540);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-time/src/second.js
|
|
|
var second = __webpack_require__(58887);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-time/src/minute.js
|
|
|
var minute = __webpack_require__(5957);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-time/src/hour.js
|
|
|
var hour = __webpack_require__(75458);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-time/src/day.js
|
|
|
var day = __webpack_require__(6054);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-time/src/week.js
|
|
|
var week = __webpack_require__(24645);
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-time/src/month.js
|
|
|
var month = __webpack_require__(43155);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-time/src/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ../node_modules/d3-time-format/src/defaultLocale.js
|
|
|
var src_defaultLocale = __webpack_require__(94031);
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-time-format/src/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-zoom/src/transform.js
|
|
|
function transform_Transform(k, x, y) {
|
|
|
this.k = k;
|
|
|
this.x = x;
|
|
|
this.y = y;
|
|
|
}
|
|
|
|
|
|
transform_Transform.prototype = {
|
|
|
constructor: transform_Transform,
|
|
|
scale: function(k) {
|
|
|
return k === 1 ? this : new transform_Transform(this.k * k, this.x, this.y);
|
|
|
},
|
|
|
translate: function(x, y) {
|
|
|
return x === 0 & y === 0 ? this : new transform_Transform(this.k, this.x + this.k * x, this.y + this.k * y);
|
|
|
},
|
|
|
apply: function(point) {
|
|
|
return [point[0] * this.k + this.x, point[1] * this.k + this.y];
|
|
|
},
|
|
|
applyX: function(x) {
|
|
|
return x * this.k + this.x;
|
|
|
},
|
|
|
applyY: function(y) {
|
|
|
return y * this.k + this.y;
|
|
|
},
|
|
|
invert: function(location) {
|
|
|
return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];
|
|
|
},
|
|
|
invertX: function(x) {
|
|
|
return (x - this.x) / this.k;
|
|
|
},
|
|
|
invertY: function(y) {
|
|
|
return (y - this.y) / this.k;
|
|
|
},
|
|
|
rescaleX: function(x) {
|
|
|
return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));
|
|
|
},
|
|
|
rescaleY: function(y) {
|
|
|
return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));
|
|
|
},
|
|
|
toString: function() {
|
|
|
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
|
|
|
}
|
|
|
};
|
|
|
|
|
|
var transform_identity = new transform_Transform(1, 0, 0);
|
|
|
|
|
|
transform_transform.prototype = transform_Transform.prototype;
|
|
|
|
|
|
function transform_transform(node) {
|
|
|
while (!node.__zoom) if (!(node = node.parentNode)) return transform_identity;
|
|
|
return node.__zoom;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-zoom/src/zoom.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Ignore right-click, since that should open the context menu.
|
|
|
// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event
|
|
|
function zoom_defaultFilter(event) {
|
|
|
return (!event.ctrlKey || event.type === 'wheel') && !event.button;
|
|
|
}
|
|
|
|
|
|
function zoom_defaultExtent() {
|
|
|
var e = this;
|
|
|
if (e instanceof SVGElement) {
|
|
|
e = e.ownerSVGElement || e;
|
|
|
if (e.hasAttribute("viewBox")) {
|
|
|
e = e.viewBox.baseVal;
|
|
|
return [[e.x, e.y], [e.x + e.width, e.y + e.height]];
|
|
|
}
|
|
|
return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];
|
|
|
}
|
|
|
return [[0, 0], [e.clientWidth, e.clientHeight]];
|
|
|
}
|
|
|
|
|
|
function defaultTransform() {
|
|
|
return this.__zoom || identity;
|
|
|
}
|
|
|
|
|
|
function defaultWheelDelta(event) {
|
|
|
return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1);
|
|
|
}
|
|
|
|
|
|
function zoom_defaultTouchable() {
|
|
|
return navigator.maxTouchPoints || ("ontouchstart" in this);
|
|
|
}
|
|
|
|
|
|
function defaultConstrain(transform, extent, translateExtent) {
|
|
|
var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],
|
|
|
dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],
|
|
|
dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],
|
|
|
dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];
|
|
|
return transform.translate(
|
|
|
dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),
|
|
|
dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)
|
|
|
);
|
|
|
}
|
|
|
|
|
|
/* harmony default export */ function zoom() {
|
|
|
var filter = zoom_defaultFilter,
|
|
|
extent = zoom_defaultExtent,
|
|
|
constrain = defaultConstrain,
|
|
|
wheelDelta = defaultWheelDelta,
|
|
|
touchable = zoom_defaultTouchable,
|
|
|
scaleExtent = [0, Infinity],
|
|
|
translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],
|
|
|
duration = 250,
|
|
|
interpolate = interpolateZoom,
|
|
|
listeners = dispatch("start", "zoom", "end"),
|
|
|
touchstarting,
|
|
|
touchfirst,
|
|
|
touchending,
|
|
|
touchDelay = 500,
|
|
|
wheelDelay = 150,
|
|
|
clickDistance2 = 0,
|
|
|
tapDistance = 10;
|
|
|
|
|
|
function zoom(selection) {
|
|
|
selection
|
|
|
.property("__zoom", defaultTransform)
|
|
|
.on("wheel.zoom", wheeled, {passive: false})
|
|
|
.on("mousedown.zoom", mousedowned)
|
|
|
.on("dblclick.zoom", dblclicked)
|
|
|
.filter(touchable)
|
|
|
.on("touchstart.zoom", touchstarted)
|
|
|
.on("touchmove.zoom", touchmoved)
|
|
|
.on("touchend.zoom touchcancel.zoom", touchended)
|
|
|
.style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
|
}
|
|
|
|
|
|
zoom.transform = function(collection, transform, point, event) {
|
|
|
var selection = collection.selection ? collection.selection() : collection;
|
|
|
selection.property("__zoom", defaultTransform);
|
|
|
if (collection !== selection) {
|
|
|
schedule(collection, transform, point, event);
|
|
|
} else {
|
|
|
selection.interrupt().each(function() {
|
|
|
gesture(this, arguments)
|
|
|
.event(event)
|
|
|
.start()
|
|
|
.zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform)
|
|
|
.end();
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
|
|
|
zoom.scaleBy = function(selection, k, p, event) {
|
|
|
zoom.scaleTo(selection, function() {
|
|
|
var k0 = this.__zoom.k,
|
|
|
k1 = typeof k === "function" ? k.apply(this, arguments) : k;
|
|
|
return k0 * k1;
|
|
|
}, p, event);
|
|
|
};
|
|
|
|
|
|
zoom.scaleTo = function(selection, k, p, event) {
|
|
|
zoom.transform(selection, function() {
|
|
|
var e = extent.apply(this, arguments),
|
|
|
t0 = this.__zoom,
|
|
|
p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p,
|
|
|
p1 = t0.invert(p0),
|
|
|
k1 = typeof k === "function" ? k.apply(this, arguments) : k;
|
|
|
return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);
|
|
|
}, p, event);
|
|
|
};
|
|
|
|
|
|
zoom.translateBy = function(selection, x, y, event) {
|
|
|
zoom.transform(selection, function() {
|
|
|
return constrain(this.__zoom.translate(
|
|
|
typeof x === "function" ? x.apply(this, arguments) : x,
|
|
|
typeof y === "function" ? y.apply(this, arguments) : y
|
|
|
), extent.apply(this, arguments), translateExtent);
|
|
|
}, null, event);
|
|
|
};
|
|
|
|
|
|
zoom.translateTo = function(selection, x, y, p, event) {
|
|
|
zoom.transform(selection, function() {
|
|
|
var e = extent.apply(this, arguments),
|
|
|
t = this.__zoom,
|
|
|
p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p;
|
|
|
return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(
|
|
|
typeof x === "function" ? -x.apply(this, arguments) : -x,
|
|
|
typeof y === "function" ? -y.apply(this, arguments) : -y
|
|
|
), e, translateExtent);
|
|
|
}, p, event);
|
|
|
};
|
|
|
|
|
|
function scale(transform, k) {
|
|
|
k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));
|
|
|
return k === transform.k ? transform : new Transform(k, transform.x, transform.y);
|
|
|
}
|
|
|
|
|
|
function translate(transform, p0, p1) {
|
|
|
var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;
|
|
|
return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);
|
|
|
}
|
|
|
|
|
|
function centroid(extent) {
|
|
|
return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];
|
|
|
}
|
|
|
|
|
|
function schedule(transition, transform, point, event) {
|
|
|
transition
|
|
|
.on("start.zoom", function() { gesture(this, arguments).event(event).start(); })
|
|
|
.on("interrupt.zoom end.zoom", function() { gesture(this, arguments).event(event).end(); })
|
|
|
.tween("zoom", function() {
|
|
|
var that = this,
|
|
|
args = arguments,
|
|
|
g = gesture(that, args).event(event),
|
|
|
e = extent.apply(that, args),
|
|
|
p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point,
|
|
|
w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),
|
|
|
a = that.__zoom,
|
|
|
b = typeof transform === "function" ? transform.apply(that, args) : transform,
|
|
|
i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));
|
|
|
return function(t) {
|
|
|
if (t === 1) t = b; // Avoid rounding error on end.
|
|
|
else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); }
|
|
|
g.zoom(null, t);
|
|
|
};
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function gesture(that, args, clean) {
|
|
|
return (!clean && that.__zooming) || new Gesture(that, args);
|
|
|
}
|
|
|
|
|
|
function Gesture(that, args) {
|
|
|
this.that = that;
|
|
|
this.args = args;
|
|
|
this.active = 0;
|
|
|
this.sourceEvent = null;
|
|
|
this.extent = extent.apply(that, args);
|
|
|
this.taps = 0;
|
|
|
}
|
|
|
|
|
|
Gesture.prototype = {
|
|
|
event: function(event) {
|
|
|
if (event) this.sourceEvent = event;
|
|
|
return this;
|
|
|
},
|
|
|
start: function() {
|
|
|
if (++this.active === 1) {
|
|
|
this.that.__zooming = this;
|
|
|
this.emit("start");
|
|
|
}
|
|
|
return this;
|
|
|
},
|
|
|
zoom: function(key, transform) {
|
|
|
if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]);
|
|
|
if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]);
|
|
|
if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]);
|
|
|
this.that.__zoom = transform;
|
|
|
this.emit("zoom");
|
|
|
return this;
|
|
|
},
|
|
|
end: function() {
|
|
|
if (--this.active === 0) {
|
|
|
delete this.that.__zooming;
|
|
|
this.emit("end");
|
|
|
}
|
|
|
return this;
|
|
|
},
|
|
|
emit: function(type) {
|
|
|
var d = select(this.that).datum();
|
|
|
listeners.call(
|
|
|
type,
|
|
|
this.that,
|
|
|
new ZoomEvent(type, {
|
|
|
sourceEvent: this.sourceEvent,
|
|
|
target: zoom,
|
|
|
type,
|
|
|
transform: this.that.__zoom,
|
|
|
dispatch: listeners
|
|
|
}),
|
|
|
d
|
|
|
);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
function wheeled(event, ...args) {
|
|
|
if (!filter.apply(this, arguments)) return;
|
|
|
var g = gesture(this, args).event(event),
|
|
|
t = this.__zoom,
|
|
|
k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),
|
|
|
p = pointer(event);
|
|
|
|
|
|
// If the mouse is in the same location as before, reuse it.
|
|
|
// If there were recent wheel events, reset the wheel idle timeout.
|
|
|
if (g.wheel) {
|
|
|
if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {
|
|
|
g.mouse[1] = t.invert(g.mouse[0] = p);
|
|
|
}
|
|
|
clearTimeout(g.wheel);
|
|
|
}
|
|
|
|
|
|
// If this wheel event won’t trigger a transform change, ignore it.
|
|
|
else if (t.k === k) return;
|
|
|
|
|
|
// Otherwise, capture the mouse point and location at the start.
|
|
|
else {
|
|
|
g.mouse = [p, t.invert(p)];
|
|
|
interrupt(this);
|
|
|
g.start();
|
|
|
}
|
|
|
|
|
|
noevent(event);
|
|
|
g.wheel = setTimeout(wheelidled, wheelDelay);
|
|
|
g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));
|
|
|
|
|
|
function wheelidled() {
|
|
|
g.wheel = null;
|
|
|
g.end();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function mousedowned(event, ...args) {
|
|
|
if (touchending || !filter.apply(this, arguments)) return;
|
|
|
var currentTarget = event.currentTarget,
|
|
|
g = gesture(this, args, true).event(event),
|
|
|
v = select(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true),
|
|
|
p = pointer(event, currentTarget),
|
|
|
x0 = event.clientX,
|
|
|
y0 = event.clientY;
|
|
|
|
|
|
dragDisable(event.view);
|
|
|
nopropagation(event);
|
|
|
g.mouse = [p, this.__zoom.invert(p)];
|
|
|
interrupt(this);
|
|
|
g.start();
|
|
|
|
|
|
function mousemoved(event) {
|
|
|
noevent(event);
|
|
|
if (!g.moved) {
|
|
|
var dx = event.clientX - x0, dy = event.clientY - y0;
|
|
|
g.moved = dx * dx + dy * dy > clickDistance2;
|
|
|
}
|
|
|
g.event(event)
|
|
|
.zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent));
|
|
|
}
|
|
|
|
|
|
function mouseupped(event) {
|
|
|
v.on("mousemove.zoom mouseup.zoom", null);
|
|
|
dragEnable(event.view, g.moved);
|
|
|
noevent(event);
|
|
|
g.event(event).end();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function dblclicked(event, ...args) {
|
|
|
if (!filter.apply(this, arguments)) return;
|
|
|
var t0 = this.__zoom,
|
|
|
p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this),
|
|
|
p1 = t0.invert(p0),
|
|
|
k1 = t0.k * (event.shiftKey ? 0.5 : 2),
|
|
|
t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);
|
|
|
|
|
|
noevent(event);
|
|
|
if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0, event);
|
|
|
else select(this).call(zoom.transform, t1, p0, event);
|
|
|
}
|
|
|
|
|
|
function touchstarted(event, ...args) {
|
|
|
if (!filter.apply(this, arguments)) return;
|
|
|
var touches = event.touches,
|
|
|
n = touches.length,
|
|
|
g = gesture(this, args, event.changedTouches.length === n).event(event),
|
|
|
started, i, t, p;
|
|
|
|
|
|
nopropagation(event);
|
|
|
for (i = 0; i < n; ++i) {
|
|
|
t = touches[i], p = pointer(t, this);
|
|
|
p = [p, this.__zoom.invert(p), t.identifier];
|
|
|
if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;
|
|
|
else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;
|
|
|
}
|
|
|
|
|
|
if (touchstarting) touchstarting = clearTimeout(touchstarting);
|
|
|
|
|
|
if (started) {
|
|
|
if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);
|
|
|
interrupt(this);
|
|
|
g.start();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function touchmoved(event, ...args) {
|
|
|
if (!this.__zooming) return;
|
|
|
var g = gesture(this, args).event(event),
|
|
|
touches = event.changedTouches,
|
|
|
n = touches.length, i, t, p, l;
|
|
|
|
|
|
noevent(event);
|
|
|
for (i = 0; i < n; ++i) {
|
|
|
t = touches[i], p = pointer(t, this);
|
|
|
if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;
|
|
|
else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;
|
|
|
}
|
|
|
t = g.that.__zoom;
|
|
|
if (g.touch1) {
|
|
|
var p0 = g.touch0[0], l0 = g.touch0[1],
|
|
|
p1 = g.touch1[0], l1 = g.touch1[1],
|
|
|
dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,
|
|
|
dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;
|
|
|
t = scale(t, Math.sqrt(dp / dl));
|
|
|
p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];
|
|
|
l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];
|
|
|
}
|
|
|
else if (g.touch0) p = g.touch0[0], l = g.touch0[1];
|
|
|
else return;
|
|
|
|
|
|
g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent));
|
|
|
}
|
|
|
|
|
|
function touchended(event, ...args) {
|
|
|
if (!this.__zooming) return;
|
|
|
var g = gesture(this, args).event(event),
|
|
|
touches = event.changedTouches,
|
|
|
n = touches.length, i, t;
|
|
|
|
|
|
nopropagation(event);
|
|
|
if (touchending) clearTimeout(touchending);
|
|
|
touchending = setTimeout(function() { touchending = null; }, touchDelay);
|
|
|
for (i = 0; i < n; ++i) {
|
|
|
t = touches[i];
|
|
|
if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;
|
|
|
else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;
|
|
|
}
|
|
|
if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;
|
|
|
if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);
|
|
|
else {
|
|
|
g.end();
|
|
|
// If this was a dbltap, reroute to the (optional) dblclick.zoom handler.
|
|
|
if (g.taps === 2) {
|
|
|
t = pointer(t, this);
|
|
|
if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {
|
|
|
var p = select(this).on("dblclick.zoom");
|
|
|
if (p) p.apply(this, arguments);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
zoom.wheelDelta = function(_) {
|
|
|
return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : constant(+_), zoom) : wheelDelta;
|
|
|
};
|
|
|
|
|
|
zoom.filter = function(_) {
|
|
|
return arguments.length ? (filter = typeof _ === "function" ? _ : constant(!!_), zoom) : filter;
|
|
|
};
|
|
|
|
|
|
zoom.touchable = function(_) {
|
|
|
return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), zoom) : touchable;
|
|
|
};
|
|
|
|
|
|
zoom.extent = function(_) {
|
|
|
return arguments.length ? (extent = typeof _ === "function" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;
|
|
|
};
|
|
|
|
|
|
zoom.scaleExtent = function(_) {
|
|
|
return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];
|
|
|
};
|
|
|
|
|
|
zoom.translateExtent = function(_) {
|
|
|
return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];
|
|
|
};
|
|
|
|
|
|
zoom.constrain = function(_) {
|
|
|
return arguments.length ? (constrain = _, zoom) : constrain;
|
|
|
};
|
|
|
|
|
|
zoom.duration = function(_) {
|
|
|
return arguments.length ? (duration = +_, zoom) : duration;
|
|
|
};
|
|
|
|
|
|
zoom.interpolate = function(_) {
|
|
|
return arguments.length ? (interpolate = _, zoom) : interpolate;
|
|
|
};
|
|
|
|
|
|
zoom.on = function() {
|
|
|
var value = listeners.on.apply(listeners, arguments);
|
|
|
return value === listeners ? zoom : value;
|
|
|
};
|
|
|
|
|
|
zoom.clickDistance = function(_) {
|
|
|
return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);
|
|
|
};
|
|
|
|
|
|
zoom.tapDistance = function(_) {
|
|
|
return arguments.length ? (tapDistance = +_, zoom) : tapDistance;
|
|
|
};
|
|
|
|
|
|
return zoom;
|
|
|
}
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3-zoom/src/index.js
|
|
|
|
|
|
|
|
|
|
|
|
;// CONCATENATED MODULE: ../node_modules/d3/src/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]);
|
|
|
//# sourceMappingURL=5321.f606e1e3a9ba8d782268.js.map?v=f606e1e3a9ba8d782268
|