From cbac5f5c02a3808c17f0ed10ca937d97adc251e9 Mon Sep 17 00:00:00 2001 From: Mike Metcalfe Date: Sun, 12 Jan 2025 08:07:03 +0200 Subject: [PATCH] Cleanup unused code --- .../cement/browser/static/js/timeseries.js | 62 +--------------- .../browser/static/js/timeseries.js.map | 2 +- webpack/app/TimeSeries.coffee | 73 +------------------ 3 files changed, 7 insertions(+), 130 deletions(-) diff --git a/src/bika/cement/browser/static/js/timeseries.js b/src/bika/cement/browser/static/js/timeseries.js index 553c730..d915e52 100644 --- a/src/bika/cement/browser/static/js/timeseries.js +++ b/src/bika/cement/browser/static/js/timeseries.js @@ -40942,9 +40942,8 @@ TimeSeries = function () { }, { key: "build_graph", value: function build_graph() { - var col_types, columns, data, headers, height, index, legend, legendItems, line_configs, margin, maxY, minY, svg, test_svg, values, width, x, y; + var col_types, columns, data, headers, height, index, legend, legendItems, line_configs, margin, maxY, minY, svg, values, width, x, y; console.log("TimeSeries::build_graph: entered"); - console.log("TimeSeries::build_graph: is current"); values = this.state.value; if (values === "") { console.log("TimeSeries::build_graph: exit because no data"); @@ -40971,7 +40970,7 @@ TimeSeries = function () { symbol: d3.symbolCircle }; } - console.log(line_configs); + console.debug(line_configs); // Set up dimensions margin = { top: 40, @@ -41025,11 +41024,9 @@ TimeSeries = function () { // Draw axes svg.append("g").attr("transform", "translate(0,".concat(height, ")")).call(d3.axisBottom(x)); svg.append("g").call(d3.axisLeft(y)); - console.log(headers); - console.log(data); headers.slice(1).forEach(function (key, i) { var lineGen, validData; - console.log("Main loop: " + key + " " + i); + console.debug("Main loop: " + key + " " + i); // Filter data to exclude rows with null, undefined, or non-numeric values for the current key validData = data.filter(function (d) { return d[key] != null && !isNaN(d[key]); @@ -41075,58 +41072,7 @@ TimeSeries = function () { legendItems.append("text").attr("x", 24).attr("y", 9).attr("dy", "0.35em").style("font-size", "12px").text(function (d) { return d; }); - console.log("TimeSeries::build_graph: svg done"); - // # Convert SVG to PNG and replace it in the container - // d3ToPng(svg.node(), 'my-image', { scale: 2, download: false, format: 'png' }) - // .then (fileData) => - // # Create an image element and set its source to the generated PNG - // d3.select(@container).selectAll('svg').remove() # Remove existing SVG - // d3.select(@container).selectAll('img').remove() # Remove existing SVG - // d3.select(@container).append('div') - // .attr('id', 'test') - // d3.select(@container).append('img') - // .attr('id', 'mike') - // .attr('src', fileData) - // .attr('alt', 'Generated Image') - - // Convert SVG to PNG using a canvas - console.log("Container:", this.container); - test_svg = d3.select(this.container).append('svg').attr('width', 100).attr('height', 100).attr('xmlns', 'http://www.w3.org/2000/svg'); // Ensure correct namespace - test_svg.append('circle').attr('cx', 50).attr('cy', 50).attr('r', 40).attr('fill', 'red'); - // svgString = new XMLSerializer().serializeToString(test_svg.node()) - // console.log('svgString: ' + svgString) - - // # Create canvas with same dimensions as SVG - // canvas = document.createElement 'canvas' - // canvas.width = width - // canvas.height = height - - // parent = @container - // # Ensure container has the canvas - // parent.innerHTML = '' - // parent.appendChild canvas - - // # Directly log canvas and Canvg for debugging - // console.log 'Canvas:', canvas - // console.log 'Canvg:', Canvg - // console.log 'SVG outerHTML:', test_svg.node().outerHTML - - // try - // # Convert SVG to PNG - // Canvg.from(canvas, test_svg.node().outerHTML).then (canvg) -> - // canvg.render() - - // # Convert to image and replace SVG - // img = document.createElement 'img' - // img.src = canvas.toDataURL 'image/png' - // container.innerHTML = '' - // container.appendChild img - - // .catch (error) -> - // console.error 'SVG to PNG conversion failed:', error - // catch err - // console.error 'Canvas creation error:', err - return console.log("TimeSeries::build_graph: png done"); + return console.log("TimeSeries::build_graph: svg done"); } }]); }(); diff --git a/src/bika/cement/browser/static/js/timeseries.js.map b/src/bika/cement/browser/static/js/timeseries.js.map index cfd08ba..6ec6df9 100644 --- a/src/bika/cement/browser/static/js/timeseries.js.map +++ b/src/bika/cement/browser/static/js/timeseries.js.map @@ -1 +1 @@ -{"version":3,"file":"timeseries.js","mappings":";;;;;;;;;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;ACnCA,UAAU,mBAAO,CAAC,8EAAiB;AACnC,2CAA2C,qBAAM;AACjD;AACA;AACA;AACA;;AAEA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA,cAAc;AACd,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yCAAyC;AACzC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B,IAAI,SAAS,IAAI,SAAS,IAAI;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,2BAA2B,IAAI,SAAS,IAAI,SAAS,IAAI;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,+BAA+B,EAAE,cAAc,EAAE,cAAc,EAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,+BAA+B,EAAE,cAAc,EAAE,cAAc,EAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,oDAAoD;AACpD,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA;;AAEA;;AAEA;;;;;;;;;;;;;;;;;;;;;AC7SA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,uGAAuG;AAC1G;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,0BAA0B;AACrC,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,aAAa;AACb;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,YAAY;AACZ,aAAa,WAAW,KAAK;AAC7B;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa;AACb;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa;AACb;;;AAGA;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAoB,WAAW;AAC/B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,eAAe;AACrC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,aAAa;AAClC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa;AACb;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa;AACb;;;AAGA;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAoB,aAAa;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,cAAc;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEwL;;;;;;;;;;;;AC9nB3K;;AAEb,8CAA6C,EAAE,aAAa,EAAC;;AAE7D,4BAA4B,mBAAO,CAAC,wCAAK;AACzC,eAAe,mBAAO,CAAC,kDAAU;AACjC,kBAAkB,mBAAO,CAAC,qEAAc;AACxC,sBAAsB,mBAAO,CAAC,8EAAkB;;AAEhD,qCAAqC,4DAA4D;;AAEjG;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gCAAgC;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,8BAA8B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,6CAA6C;AAC7D,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,0BAA0B;AAC1C;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gBAAgB,0BAA0B;AAC1C;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,sJAAsJ;AACpK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iLAAiL;AAC/L,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iDAAiD,IAAI;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,QAAQ,gBAAgB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAqD,IAAI;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,uCAAuC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,SAAS,SAAS,uBAAuB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS,SAAS,uBAAuB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA,yCAAyC,2BAA2B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA,0CAA0C,mBAAmB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW,iBAAiB,aAAa,oBAAoB;AAC7E;AACA;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA,uBAAuB,SAAS;AAChC;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,SAAS;AACzB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,mBAAmB;AACnC,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,mBAAmB;AACnC,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,mBAAmB;AACnC,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,yCAAyC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,yCAAyC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC,cAAc,yCAAyC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,wEAAwE;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gBAAgB,IAAI,gBAAgB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,UAAU;AAC1B,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,oBAAoB,YAAY;AAChC,oBAAoB,sBAAsB;AAC1C,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gBAAgB;AAChC,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,oCAAoC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA,oBAAoB,0CAA0C;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,cAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2CAA2C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC;AACvD;AACA;AACA;AACA,gBAAgB,uCAAuC;AACvD;AACA;AACA;AACA;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,cAAc,yDAAyD;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA,sBAAsB;AACtB,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sCAAsC,SAAS,OAAO,KAAK,QAAQ,YAAY;AAC/E;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2BAA2B;AAC3C;AACA,uBAAuB,YAAY;AACnC,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,yBAAyB,yLAAyL,IAAI;AACtN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mDAAmD;AACnE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB,2BAA2B;AAC3B,sBAAsB;AACtB,+BAA+B;AAC/B,mBAAmB;AACnB,WAAW;AACX,WAAW;AACX,WAAW;AACX,WAAW;AACX,aAAa;AACb,qBAAqB;AACrB,uBAAuB;AACvB,mBAAmB;AACnB,mBAAmB;AACnB,gBAAgB;AAChB,eAAe;AACf,sBAAsB;AACtB,4BAA4B;AAC5B,0BAA0B;AAC1B,2BAA2B;AAC3B,6BAA6B;AAC7B,2BAA2B;AAC3B,qBAAqB;AACrB,YAAY;AACZ,mBAAmB;AACnB,uBAAuB;AACvB,gBAAgB;AAChB,oBAAoB;AACpB,uBAAuB;AACvB,oBAAoB;AACpB,mBAAmB;AACnB,6BAA6B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AAC,kDAAM;AAC3C,iEAAe,WAAW,EAAC;;;;;;;;;;;;;;;;;;ACRY;AACE;;AAE1B;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qDAAS;AACxB,yBAAyB,yDAAS;AAClC;AACA,IAAI;AACJ,qBAAqB,qDAAS,UAAU,sDAAU;AAClD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;ACvDO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;;AAEA;;AAEP;AACA;AACA;AACA;AACA,SAAS,6BAA6B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6BAA6B,MAAM;AACnC;AACA;AACA;;AAEA;AACA,6BAA6B,OAAO;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,+BAA+B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,4CAA4C;AAC5C;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC;AACxC,4CAA4C;AAC5C;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AClHe;AACf;AACA;;;;;;;;;;;;;;;;ACFe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACjBA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AChCe;AACf;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACLe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACNqC;;AAEtB;AACf,YAAY,wDAAQ;AACpB;AACA;;;;;;;;;;;;;;;;;ACLoC;;AAErB;AACf,eAAe,gDAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACVoC;;AAErB;AACf,uDAAuD,gDAAS;AAChE;AACA;AACA;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACde;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACTe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC5Be;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACVA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;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;;;;;;;;;;;;;;;;;;;;;;;;;;;ACFqF;AACjC;AACF;AACD;AACL;AACA;AACE;AACQ;AACF;AACN;AACC;AAC6D;AACxD;AACU,CAAC,eAAe;AACO;AACtB;AACI;AAC3B;AACU;AACR;AACiB;AACf;AACJ;AACU;AACR;AACA;AACE;AACI;AACiC;AACzB;AACZ;AACF;AACE;AACU;AACJ;AACU;AAClB,CAAC,eAAe;AACA;AAClB;AAC6B;AACjB;AACF;AACV;AACI;AACF;AACI;AACN;AACM;AACE;AACN;AACY;AACJ;AACQ;AACZ;AACI;AACN;AACG;;;;;;;;;;;;;;;;;ACxDX;;AAErB;AACf,eAAe,gDAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,gDAAS,gBAAgB,gDAAS;AAC7D;;;;;;;;;;;;;;;;;AClBuC;;AAExB,iCAAiC,qDAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yDAAS;AACrB,YAAY,yDAAS;AACrB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC5BuC;AACF;;AAEtB,sCAAsC,qDAAS;AAC9D,mCAAmC,wDAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AClBe;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACJe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACnBe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACrBe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AClBsD;;AAEvC;AACf,SAAS,wDAAQ;AACjB;;AAEO;AACP,SAAS,2DAAa;AACtB;;;;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;;AAEe;AACf;AACA;;;;;;;;;;;;;;;;ACRe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACnBe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACrBoC;;AAErB;AACf,qBAAqB,gDAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC3ByC;;AAE1B;AACf;AACA;AACA,iBAAiB,wDAAa;AAC9B;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACjBe;AACf;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACnBe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;ACde;AACf;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACF2B;AACU;AACV;AACU;AACM;AACC;AACD;AACN;;AAEtB;AACf,6BAA6B,mDAAO;AACpC;AACA,8BAA8B,mDAAG;AACjC,qBAAqB,mDAAG;AACxB;AACA;AACA;AACA,eAAe,mDAAG,CAAC,2DA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AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACTuC;AACJ;;AAEpB;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA,WAAW,uDAAO;AAClB;AACA;AACA;;AAEO,kCAAkC,qDAAS;AAClD,kBAAkB,qDAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;;ACtCqC;;AAEtB;AACf,SAAS,wDAAQ;AACjB;;;;;;;;;;;;;;;;ACJe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACjBe;AACf;AACA;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;AClBgC;AACM;;AAEvB;AACf,YAAY,qDAAK,cAAc,wDAAQ,iBAAiB,wDAAQ;AAChE;AACA;;;;;;;;;;;;;;;;;;ACNgC;AACQ;;AAEzB;AACf,YAAY,qDAAK,cAAc,yDAAS;AACxC;AACA;;;;;;;;;;;;;;;;;ACNgC;;AAEjB;AACf,wCAAwC,qDAAK;AAC7C;;;;;;;;;;;;;;;;;;ACJA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,OAAO;AACxC,yBAAyB,OAAO;AAChC,IAAI;AACJ,iCAAiC,OAAO;AACxC,yBAAyB,OAAO;AAChC;AACA;AACA;;AAEO;AACP;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACtD2B;;AAEZ;AACf;AACA,uBAAuB,mDAAG,4CAA4C,QAAQ;AAC9E,2DAA2D,QAAQ;AACnE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;ACdoC;;AAErB;AACf,kBAAkB,gDAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACVe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACxBuC;;AAExB;AACf,SAAS,yDAAS;AAClB;;;;;;;;;;;;;;;;;;;;ACJqC;;AAErC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yGAAyG,oDAAQ;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2CAA2C,4FAA4F;;AAEvI;AACA;AACA,2CAA2C,gCAAgC,yEAAyE;AACpJ;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,yCAAyC;;AAElF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,yBAAyB;AACpD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;AC7KA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;;;;ACGmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACLkB;AACW;AACL;AACE;AACL;AACH;AACD;AACgB;;AAEpD,iBAAiB,aAAa;AAC9B,kBAAkB,cAAc;AAChC,mBAAmB,eAAe;AAClC,mBAAmB;;AAEnB,OAAO,eAAe;;AAEtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAA0B,iEAAiE;AAC3F,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA,0BAA0B,iEAAiE;AAC3F,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA,wBAAwB,yCAAyC;AACjE,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uDAAQ;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,wDAAM;AAChB;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAuC,gBAAgB;;AAEvD;;AAEA;AACA,qCAAqC,oCAAoC;AACzE,sCAAsC,yBAAyB;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C,sDAAsD;AACrG,6DAA6D,sCAAsC;AACnG;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,0DAAW;;AAE/B;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW;AACX,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAgB,wDAAM;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,iHAAiH;AACpJ,mCAAmC,iGAAiG;AACpI,uCAAuC,wGAAwG;AAC/I,wCAAwC,wGAAwG;AAChJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA,cAAc,wDAAM;AACpB;AACA;AACA;AACA,YAAY,iDAAU;AACtB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,wDAAO;AACrB;AACA;AACA;AACA,SAAS;;AAET,IAAI,wDAAS;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB,wDAAM;AACtB;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN,iBAAiB,wDAAM;AACvB;AACA;AACA;AACA;AACA;;AAEA,MAAM,oDAAW;AACjB;;AAEA;AACA;;AAEA;AACA;AACA;AACA,qDAAqD,wDAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,uDAAO;AACb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,wDAAwD;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,0DAAa;AACnB;AACA;AACA;AACA,8CAA8C,qBAAqB,QAAQ;AAC3E,QAAQ;AACR,QAAQ,gDAAU;AAClB;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,UAAU;AAC7B;AACA,yCAAyC;AACzC,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,uDAAO;AACb;;AAEA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,oCAAoC;AACpC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,uDAAO;AACb;AACA;;AAEA;AACA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ACA,2FAA2F,wDAAQ;AACnG;;AAEA;AACA,4EAA4E,wDAAQ;AACpF;;AAEA;AACA,4EAA4E,wDAAQ;AACpF;;AAEA;AACA,0EAA0E,wDAAQ;AAClF;;AAEA;AACA,wEAAwE,wDAAQ;AAChF;;AAEA;AACA,wEAAwE,wDAAQ;AAChF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;;;;;;;;;;ACrI2C;;AAEpC;;AAEA;AACA;;AAEP;AACA;AACA;AACA,yBAAyB,IAAI;AAC7B,wCAAwC,IAAI,GAAG,IAAI,GAAG,IAAI;AAC1D,wCAAwC,IAAI,GAAG,IAAI,GAAG,IAAI;AAC1D,0CAA0C,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;AACnE,0CAA0C,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;AACnE,wCAAwC,IAAI,GAAG,IAAI,GAAG,IAAI;AAC1D,0CAA0C,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sDAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA,sDAAM,WAAW,kDAAM;AACvB;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,aAAa,YAAY,EAAE,YAAY,EAAE,YAAY;AACrD;;AAEA;AACA,aAAa,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,oDAAoD;AAC3G;;AAEA;AACA;AACA,YAAY,2BAA2B,EAAE,eAAe,IAAI,eAAe,IAAI,eAAe,EAAE,qBAAqB,EAAE,GAAG;AAC1H;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,sDAAM,WAAW,kDAAM;AACvB;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,cAAc,2BAA2B,EAAE,eAAe,IAAI,qBAAqB,KAAK,qBAAqB,GAAG,qBAAqB,EAAE,GAAG;AAC1I;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AC3Y2C;AACyB;AACzB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,0CAAG,OAAO,qDAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,6CAAO;AACzC;AACA;;AAEe;AACf;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA,sDAAM,uBAAuB,kDAAM,CAAC,4CAAK;AACzC;AACA,oBAAoB,+CAAQ,YAAY,+CAAQ;AAChD;AACA,GAAG;AACH;AACA,oBAAoB,6CAAM,YAAY,6CAAM;AAC5C;AACA,GAAG;AACH;AACA,iDAAiD,6CAAO;AACxD;AACA;AACA;AACA;AACA,eAAe,0CAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;;;;;AC5DD,6BAAe,oCAAS;AACxB;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACTsD;AACE;AACJ;;;;;;;;;;;;;;;;;;;;;;;;ACFT;AACO;AACP;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,0CAAG,OAAO,qDAAU;AACzC;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEe;AACf;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA,sDAAM,WAAW,kDAAM,CAAC,4CAAK;AAC7B;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iCAAiC,6CAAO;AACxC;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,6CAAO;AACvB;AACA;;AAEA,sDAAM,WAAW,kDAAM,CAAC,4CAAK;AAC7B;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;;;;;AC1HM;AACA;;;;;;;;;;;;;;;;ACDP,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACJA;;AAEO;;;;;;;;;;;;;;;;ACFP,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;ACFA,iEAAe,YAAY,EAAC;;;;;;;;;;;;;;;;ACA5B,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AC1B+D;AAC9B;AACM;AACV;AACQ;AACA;AACR;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA,kBAAkB,gDAAgB;AAClC;;AAEA;AACA;;AAEA;AACA;AACA,gBAAgB,oDAAM;AACtB,WAAW,oDAAK,IAAI,oDAAI;AACxB;AACA;AACA,MAAM;AACN,2BAA2B,qDAAS;AACpC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD,MAAM;;AAE1D;AACA;;AAEA;AACA;AACA,UAAU,oDAAI;AACd;AACA,KAAK;;AAEL;AACA,oDAAoD,OAAO;AAC3D,YAAY,wDAAQ;AACpB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,+DAA+D;AAC/D;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,+DAA+D;AAC/D;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,QAAQ;AACR,iEAAiE;AACjE;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4FAA4F,wDAAQ,CAAC,4CAAK,YAAY,wDAAQ;AAC9H;;AAEA;AACA,2DAA2D,gDAAI;AAC/D;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;AChO2C;AACV;AACI;AACA;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,wDAAQ;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,+CAAK,EAAE,kCAAkC;AAC7C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,oDAAK,mBAAmB,oDAAG;AACtC;;AAEA,WAAW,wDAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,wDAAQ;AAC3B;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,2CAA2C,WAAW,oDAAG,iBAAiB;AAC1E;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iEAAiE,wDAAQ;AACzE;;AAEA;AACA,iEAAiE,wDAAQ;AACzE;;AAEA;AACA,sEAAsE,wDAAQ;AAC9E;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,4FAA4F,wDAAQ,CAAC,4CAAK,YAAY,wDAAQ;AAC9H;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;ACpJkD;AACK;;;;;;;;;;;;;;;;ACDvD,6BAAe,sCAAW;;;;;;;;;;;;;;;;;;;;ACAU;AACP;AACM;AACA;;AAEnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS,mBAAmB;AAC5B,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kDAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,wBAAwB;AAChE,iGAAiG;AACjG;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA,6BAA6B,kDAAU;AACvC,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,sDAAsD;AACtD;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mDAAO;AACtB;AACA;AACA,WAAW,4DAA4D;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yDAAyD;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,mDAAmD,gDAAI;AACvD,WAAW,8BAA8B;AACzC,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gDAAI;AACvD,WAAW,QAAQ;AACnB,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gDAAI;AACvD,WAAW,cAAc;AACzB;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mDAAO;AAC/B;AACA;AACA;AACA;AACA,mDAAmD,gDAAI;AACvD,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA,wBAAwB,mDAAO;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACvPkD;AACF;;;;;;;;;;;;;;;;ACDhD;;AAEe;AACf;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,kBAAkB,yBAAyB,GAAG,yBAAyB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,GAAG,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,GAAG,GAAG,GAAG;AAClD;AACA;AACA,kBAAkB,EAAE,GAAG,EAAE,SAAS,MAAM,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,cAAc,GAAG,cAAc;AAC/F;AACA;AACA,kBAAkB,yBAAyB,GAAG,yBAAyB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG;AACzF;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACpCe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AChB6B;AACM;;AAEpB;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW,wBAAwB,WAAW;AACzD,gBAAgB;;AAEhB;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gDAAI;AACvD,WAAW,WAAW,yBAAyB,0BAA0B;AACzE;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gDAAI;AACvD;AACA;AACA;AACA;AACA,mDAAmD,gDAAI;AACvD;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW,SAAS;AAC/B,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA,wBAAwB,mDAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D,yCAAyC,SAAS;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,0BAA0B,gCAAgC;AACrE;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,OAAO;AACxF;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C,gEAAgE,OAAO;AACvE,kCAAkC,UAAU;AAC5C,gEAAgE,OAAO;AACvE,kCAAkC,UAAU;AAC5C,gEAAgE,OAAO;AACvE,kCAAkC,UAAU;AAC5C,gEAAgE,OAAO;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,MAAM,mBAAmB;AACzB;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,MAAM,mBAAmB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,cAAc;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC3UA,YAAY;;AAEZ;AACA,8CAA8C,KAAK,OAAO;AAC1D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA,iBAAiB;AACjB;AACA;AACA,GAAG;AACH;AACA,mFAAmF,OAAO;AAC1F;AACA,gDAAgD,OAAO;AACvD,GAAG;AACH;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;;AAEA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA,mCAAmC,4BAA4B;AAC/D;AACA;;AAEA,iEAAe,QAAQ,EAAC;;;;;;;;;;;;;;;;;ACnF0B;;;;;;;;;;;;;;;;ACAlD,iEAAe,YAAY,EAAC;;;;;;;;;;;;;;;;;;;;;;;ACAS;AACQ;AACD;AACuC;AAC9C;AACF;;AAEnC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB,wBAAwB;AAC9C;;AAEA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;AACA,mBAAmB;AACnB,kBAAkB,uDAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0CAA0C,mDAAU;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,wDAAM;AACV,wCAAwC,0DAAiB;AACzD,sCAAsC,0DAAiB;AACvD,IAAI,sDAAM;AACV,IAAI,0DAAa;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,uDAAO;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI,wDAAM;AACV,IAAI,mDAAO;AACX,IAAI,uDAAO;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,OAAO;AACvB;AACA,QAAQ,0DAAa;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,gBAAgB,OAAO;AACvB;AACA,QAAQ,uDAAO;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0CAA0C,qBAAqB,QAAQ;AACvE,gBAAgB,OAAO;AACvB;AACA,QAAQ,0DAAa;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,wDAAO;AACnB;;AAEA,oCAAoC,iDAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;AACA;AACA;AACA,oEAAoE;AACpE,2DAA2D;AAC3D,yBAAyB,wDAAO,yCAAyC;AACzE;AACA;AACA;AACA;AACA,YAAY,iDAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA,sEAAsE,wDAAQ;AAC9E;;AAEA;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;;;;ACnB2B;;AAE3B,UAAU,mDAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACVP,YAAY;AACZ,YAAY;AACZ;AACA;AACA;;AAEA;AACA,oCAAoC;AACpC;AACA,GAAG,gBAAgB;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,YAAY;AAC7C;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,YAAY;AAC7C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACnK8C;AACyE;AACA;AACrE;;;;;;;;;;;;;;;;;;;;;;;ACHvB;;AAE3B,UAAU,mDAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACVP;;AAEO;AACP;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,CAAC;;AAEM;AACP;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,CAAC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;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;;AAEA,6CAA6C,wDAAQ;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,gBAAgB;AACpC,aAAa,uDAAQ;AACrB,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,sDAAM;AACnC,6BAA6B,sDAAM;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B,OAAO;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sEAAsE,wDAAQ;AAC9E;;AAEA;AACA;;;;;;;;;;;;;;;;ACnGA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACJmD;AACE;AACN;AACQ;AACJ;AACQ;AAClB;AACA;;;;;;;;;;;;;;;;ACPzC,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;ACFA;AACA;AACA;AACA,sBAAsB;;AAEtB,6BAAe,sCAAW;AAC1B;AACA;AACA;;;;;;;;;;;;;;;;;;ACRqC;AACJ;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA,iBAAiB,wDAAQ;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,sCAAsC,gBAAgB;AACtD,wDAAwD,OAAO;AAC/D;AACA,2DAA2D,sDAAM;AACjE,2DAA2D,sDAAM;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,s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EA,6CAA6C,wDAAQ;AACrD;AACA;;AAEA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wEAAwE,wDAAQ;AAChF;;AAEA;AACA,sEAAsE,wDAAQ;AAC9E;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;ACxDqC;AACN;AACJ;;AAEpB;AACP;AACA;;AAEO;AACP;AACA;;AAEA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAAK;AACrB,cAAc,uDAAQ;AACtB,eAAe,mDAAG;;AAElB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,oBAAoB,gBAAgB;AACpC;;AAEA;AACA;AACA,OAAO;;AAEP,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC3J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C5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,qEAAkB,gCAAgC;AAC9F;;;;;;;;;;;;;;;;;ACfsD;;AAEtD,6BAAe,oCAAS;AACxB,UAAU,qEAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACVA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA,uDAAuD;;AAEhD;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC9CA;AACA,6BAAe,oCAAS;AACxB,kDAAkD,OAAO;AACzD;AACA,6BAA6B;AAC7B,sCAAsC,QAAQ;AAC9C,sCAAsC,oBAAoB;AAC1D;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACV+C;AACM;AACN;;AAE/C,iEAAe;AACf;AACA;AACA;AACA,OAAO,yDAAa;AACpB;AACA;AACA;AACA;AACA,iBAAiB,6DAAa;AAC9B,OAAO,yDAAa;AACpB,OAAO,4DAAgB;AACvB;AACA;AACA,CAAC,EAAC;;;;;;;;;;;;;;;;AClBF,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACFwF;AACpC;AAC6B;AACnB;AACE;AACF;;;;;;;;;;;;;;;;;;;;;;;;ACLzB;AACM;AACM;AACE;AACV;AACE;AACU;AAChB;;AAErC;AACA;;AAEA,6BAAe,oCAAS;AACxB,gFAAgF,oDAAQ,GAAG,2DAAW;AACtG;AACA;AACA;AACA,iDAAiD,oDAAQ,GAAG,8DAAc;AAC1E;AACA;AACA;;AAEA;AACA,gBAAgB,+DAAe;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,cAAc,uDAAW;;AAE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ACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,6CAAG;AACpB,IAAI;AACJ;AACA;AACA,EAAE,gDAAU;AACZ;AACA;;AAEA;AACA,EAAE,gDAAU;AACZ;;AAEA;AACA;AACA,EAAE,gDAAU;AACZ,MAAM,6CAAG,aAAa,6CAAO;AAC7B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA;AACA,EAAE,sDAAM;;AAER;AACA;AACA;;AAEA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA,4EAA4E,QAAQ;AACpF;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AClLsD;;AAE/C;AACP,UAAU,+CAAK,8BAA8B,8CAAI;AACjD;;AAEO;AACP,0DAA0D,6CAAG;AAC7D,mBAAmB,6CAAG,mBAAmB,6CAAG,UAAU,6CAAG;AACzD;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEA;AACO;AACP;AACA;;AAEO;AACP;AACA;;AAEA;AACO;AACP,UAAU,8CAAI;AACd;AACA;;;;;;;;;;;;;;;;;;;;AChC+B;AACmE;AACrE;AACI;;AAEjC;AACA;AACA;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA,UAAU,gDAAI;AACd;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,6CAAO,SAAS,6CAAO;AACnC,eAAe,6CAAG;AAClB,kCAAkC,6CAAG,mBAAmB,6CAAG,UAAU,6CAAG;AACxE;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,YAAY,6CAAO,SAAS,6CAAO;AACnC,eAAe,6CAAG;AAClB,gBAAgB,6CAAG;AACnB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A;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACnBqC;AACA;AACM;AACS;AACrB;;AAE/B,6BAAe,oCAAS;AACxB;AACA;AACA,qBAAqB,sDAAU;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,mBAAmB,oDAAK;AACxB,0BAA0B,+DAAe;AACzC;AACA;AACA,UAAU,sDAAU;AACpB,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,oCAAoC,4CAAM,GAAG,6CAAO,GAAG,4CAAM;AAC7D,oCAAoC,4CAAM,GAAG,6CAAO,GAAG,4CAAM;AAC7D;;;;;;;;;;;;;;;;AClIA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AC1DwC;AACH;AACJ;AACI;AACN;;AAE/B;;AAEA;AACA;;AAEe;;AAEf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,WAAW,6CAAG,cAAc,6CAAO;AACnC,UAAU,6CAAG,cAAc,6CAAO;AAClC,UAAU,6CAAG,cAAc,6CAAO;AAClC,iCAAiC;AACjC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,sDAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,0CAA0C,OAAO;AACjD,mHAAmH,OAAO;AAC1H;AACA,0BAA0B;AAC1B,iBAAiB;AACjB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,oDAAK;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,sDAAU;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,cAAc,oDAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;ACvK0C;AACP;;AAEnC;AACA;AACA;AACA,kBAAkB;AAClB,kBAAkB;AAClB,kBAAkB;AAClB,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,QAAQ,0DAAU;AAClB;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA,mBAAmB,6CAAO;AAC1B;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;;AAEA,+BAA+B,OAAO;AACtC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,sCAAsC,QAAQ;AAC9C,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACtGA,6BAAe,oCAAS;;AAExB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACXA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACJgE;AACd;AACN;;AAE5C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS,wDAAQ;AACjB;;AAEA;AACA;AACA,0CAA0C,OAAO;AACjD,SAAS,wDAAQ;AACjB;AACA;AACA,WAAW,wDAAQ;AACnB;AACA;AACA;AACA;AACA,6DAA6D,8CAAQ;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,+DAAe;AAC1B;;AAEA;AACA;AACA;;AAEA;AACA,qBAAqB,6CAAO,aAAa,6CAAO;AAChD;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;;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;;AAEA,6BAAe,oCAAS;AACxB,kBAAkB,2CAAK;AACvB,EAAE,sDAAM;AACR;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpDO;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;;AAEA;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;ACnCe;;;;;;;;;;;;;;;;;;;ACAgB;AACA;AACD;;AAE9B,kBAAkB,2CAAK;AACvB,sBAAsB,2CAAK;AAC3B;AACA;AACA;AACA;;AAEA;AACA,SAAS,gDAAI;AACb,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf;AACA;AACA;AACA,GAAG;AACH;AACA,mEAAmE,gDAAI;AACvE,gBAAgB,6CAAG;AACnB,sBAAsB,2CAAK;AAC3B,GAAG;AACH;AACA;AACA,kBAAkB,2CAAK;AACvB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,UAAU,EAAC;;;;;;;;;;;;;;;;;ACjDI;;AAE9B;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf,gBAAgB,gDAAI;AACpB,cAAc,gDAAI;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,YAAY,EAAC;;;;;;;;;;;;;;;;;AC3BI;;AAEhC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,8CAAI;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU,8CAAI;;AAEd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,cAAc,EAAC;;;;;;;;;;;;;;;;;;ACnGC;AACD;;AAEf;AACf;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,yCAAG;AACpD;AACA;AACA;AACA,GAAG;AACH,UAAU,gDAAI;AACd;;;;;;;;;;;;;;;;;;;;;;;;AC5CsC;AACJ;AACD;AACI;AACI;AACF;AACA;AACF;;AAErC,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,sDAAM;AACZ;AACA;AACA;;AAEA;AACA,IAAI,sDAAM,0BAA0B,gDAAQ;AAC5C,WAAW,gDAAQ;AACnB;;AAEA;AACA,IAAI,sDAAM,0BAA0B,mDAAW;AAC/C,WAAW,mDAAW;AACtB;;AAEA;AACA,IAAI,sDAAM,0BAA0B,kDAAU;AAC9C,WAAW,kDAAU;AACrB;;AAEA;AACA,IAAI,sDAAM,0BAA0B,oDAAY;AAChD,WAAW,oDAAY;AACvB;;AAEA;AACA;AACA,uDAAuD,oDAAQ;AAC/D;AACA;;AAEA;AACA;AACA,qDAAqD,kDAAU,gBAAgB,mDAAW;AAC1F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6DAA6D,EAAE;AAC/D;AACA;AACA,8CAA8C,kDAAU;AACxD;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;AC3E+B;AACC;AACF;;AAE9B,oBAAoB,2CAAK;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS,gDAAI;AACb;AACA;AACA,GAAG;AACH;AACA;AACA,yBAAyB,gDAAI;AAC7B,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,oBAAoB,2CAAK;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,8CAAI;AACpB;AACA;;AAEA,iEAAe,YAAY,EAAC;;;;;;;;;;;;;;;;AC5C5B;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,EAAE,GAAG,EAAE;AAC/B;AACA;AACA;AACA;AACA,wBAAwB,EAAE,GAAG,EAAE;AAC/B;AACA;AACA;AACA,wBAAwB,EAAE,GAAG,EAAE;AAC/B;AACA;AACA;AACA,uBAAuB;AACvB,4BAA4B,EAAE,GAAG,EAAE,GAAG,GAAG,UAAU,OAAO,GAAG,EAAE,GAAG,GAAG,UAAU,MAAM;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,OAAO;AACxC;AACA;AACA;;AAEA;AACA;AACA,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACrFuC;;AAEvC,6BAAe,oCAAS;AACxB,SAAS,6CAAG,gBAAgB,6CAAO,IAAI,6CAAG,gBAAgB,6CAAO;AACjE;;;;;;;;;;;;;;;;;;;ACJ+B;AACqD;AACsB;;AAE1G;AACA,SAAS,6CAAG,cAAc,wCAAE,cAAc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AAe,sCAAW;AAC1B,SAAS,qDAAU;AACnB;AACA;;;;;;;;;;;;;;;;;;;;;ACXkD;AACL;;AAE7C;AACA;AACA;AACA;AACA,EAAE,sDAAS,2BAA2B,uDAAY;AAClD,YAAY,uDAAY;AACxB;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEO;AACP;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;;AC9C0C;AACK;AACX;;AAE7B;AACP,WAAW,6CAAG,SAAS,6CAAG;AAC1B,eAAe,6CAAG,SAAS,6CAAG;AAC9B;;AAEA,qBAAqB,8DAAe,CAAC,0CAAI;;AAEzC,6BAAe,sCAAW;AAC1B,SAAS,qDAAU;AACnB;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACfiD;AACX;AACM;AACqB;AACX;;AAEtD,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;AACA,kBAAkB,0DAAW;AAC7B;AACA;AACA;AACA;AACA,OAAO;AACP,iBAAiB,oDAAQ;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,oDAAQ,IAAI,8DAAa;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6CAAO,OAAO,6CAAG,cAAc,6CAAG,4BAA4B,6CAAO;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kDAAS;AACpB;AACA;AACA,WAAW,gDAAO;AAClB;AACA;AACA,WAAW,iDAAQ;AACnB;AACA;AACA,WAAW,kDAAS;AACpB;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;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AS;AACxB;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;;;ACpEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,0BAA0B,0BAA0B;AACpD,uBAAuB,uBAAuB;AAC9C,0BAA0B,0BAA0B;AACpD,wBAAwB,wBAAwB;AAChD,6BAA6B,6BAA6B;AAC1D,2BAA2B;AAC3B;;;;;;;;;;;;;;;;;ACzBO;AACP;AACA;;AAEO;AACP;AACA;AACA;;;;;;;;;;;;;;;;;ACPA,6BAAe,oCAAS;AACxB;AACA;AACA,qBAAqB;AACrB;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACnBA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACnFO;AACP;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACRA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;;;;;;;;;;;;;;;;ACXA,6BAAe,sCAAW;AAC1B;AACA;;;;;;;;;;;;;;;;ACFA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACNA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACdA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACXA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPoC;AACF;AACY;AACF;AACV;AACF;AACE;AACA;AACU;AACI;AACV;AACF;AACM;;AAE3B;AACf;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,iDAAU;AACnB,QAAQ,gDAAS;AACjB,aAAa,qDAAc;AAC3B,cAAc,sDAAe;AAC7B,QAAQ,gDAAS;AACjB,OAAO,+CAAQ;AACf,QAAQ,gDAAS;AACjB,QAAQ,gDAAS;AACjB,aAAa,qDAAc;AAC3B,eAAe,uDAAgB;AAC/B,UAAU,mDAAW;AACrB,SAAS,kDAAU;AACnB;AACA,qBAAqB,qDAAa;AAClC;;;;;;;;;;;;;;;;AC1FA,6BAAe,uCAAY;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA,IAAI;AACJ;;;;;;;;;;;;;;;;ACbA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;;;;ACRA,6BAAe,sCAAW;AAC1B;AACA;AACA,yBAAyB;AACzB,kBAAkB,kCAAkC;AACpD;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;;;;ACRA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC7BA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;ACNA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACRgD;AACgB;AAChB;AACW;AACF;AACL;AACF;AACR;AACY;AACO;AACJ;AACE;AACQ;AACF;AACI;;;;;;;;;;;;;;;;ACdrE;AACA;AACA;AACA,sBAAsB;;AAEtB,6BAAe,sCAAW;AAC1B;AACA;AACA;;;;;;;;;;;;;;;;;;;ACRoC;AACR;;AAE5B,6BAAe,oCAAS;AACxB,oCAAoC,mDAAG;AACvC;;AAEO;AACP,4BAA4B,kDAAO;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,kBAAkB;AAChC,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AC1HyC;AACa;AAC1B;AACqB;;AAEjD;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA,gBAAgB,sDAAY;;AAE5B;AACA,mBAAmB,mDAAG;AACtB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,wCAAwC,sDAAY;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,uDAAQ;AAChD;;AAEA;AACA;AACA;;AAEA;AACA,uEAAuE,wDAAQ;AAC/E;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yBAAyB,OAAO;AAChC,UAAU,gEAAkB;AAC5B,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AChFgC;AACJ;AACmB;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEO;AACP,uBAAuB,qDAAK;;AAE5B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,OAAO;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,wCAAwC,IAAI,8DAAiB;;AAEjF;AACA,cAAc,OAAO;;AAErB;AACA;;AAEA,6BAAe,oCAAS;AACxB,8BAA8B,mDAAG;AACjC;AACA;;;;;;;;;;;;;;;;;;ACvH2C;AACC;;AAE5C,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,yDAAS;AACxC;AACA;;AAEA;AACA;AACA;AACA,QAAQ,4DAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACnDwC;AACiB;;AAEzD,eAAe,UAAU;AACzB,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC,0CAA0C,qDAAI;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,oCAAoC,MAAM,aAAa,8DAAa;AACzG;AACA;;AAEA;AACA;;AAEA;AACA,oCAAoC,uDAAQ;AAC5C;;AAEA;AACA,0CAA0C,uDAAQ;AAClD;;AAEA;AACA,sCAAsC,uDAAQ;AAC9C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB;AACA;AACA,sCAAsC,KAAK;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AChJ0C;;AAE1C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,iBAAiB;AACjB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,iBAAiB;AACjB,cAAc;AACd;;AAEA,mCAAmC,qDAAI;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;AC5OA,6BAAe,oCAAS;AACxB;AACA;AACA;;AAEA,8BAA8B,OAAO;AACrC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC7CA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACXmC;AACE;AACI;AACa;;AAEtD,6BAAe,sCAAW;AAC1B,aAAa,oDAAQ;AACrB;AACA;AACA;AACA;AACA,qBAAqB,sDAAY;AACjC,mBAAmB,sDAAY;AAC/B,qBAAqB,sDAAY;AACjC,sBAAsB,sDAAY;AAClC,oBAAoB,sDAAY;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iDAAS;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sCAAsC,uDAAQ;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA,4EAA4E,wDAAQ;AACpF;;AAEA;AACA;AACA;;AAEA;AACA,0EAA0E,wDAAQ;AAClF;;AAEA;AACA,4EAA4E,wDAAQ;AACpF;;AAEA;AACA,6EAA6E,wDAAQ;AACrF;;AAEA;AACA,2EAA2E,wDAAQ;AACnF;;AAEA;AACA;;;;;;;;;;;;;;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2BAA2B,6CAAQ,mBAAmB,6CAAQ;AAC9D;AACA;AACA,kBAAkB,qDAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,CAAC,IAAI,EAAC;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB,cAAc,6CAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,yBAAyB,iDAAK;AAC9B,+BAA+B,uDAAW;;;;;;;;;;;;;;;;ACtDjD,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACJiC;;AAEjC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA;;AAEA;AACA;AACA;AACA,gCAAgC;AAChC;AACA,4BAA4B;AAC5B;AACA;AACA,yCAAyC;AACzC,4BAA4B;AAC5B;AACA,MAAM,OAAO;AACb;AACA,cAAc,SAAS,sDAAM,SAAS;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,OAAO;AACpC;AACA,SAAS;AACT;;;;;;;;;;;;;;;;;AC/DA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACzBkC;AACY;;AAE9C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,aAAa,sDAAM,SAAS,GAAG,aAAa,sDAAM,SAAS;AACzE,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,gCAAgC;AACjE,cAAc,sDAAsD,sDAAM,OAAO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ACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACtBA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA,yCAAyC;;AAEzC;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,oDAAoD;AACpD,qDAAqD;AACrD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oDAAoD;AACpD,qDAAqD;AACrD,IAAI;AACJ;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACnFA,6BAAe,oCAAS;AACxB,mDAAmD;;AAEnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,0CAA0C;AAC1C,0CAA0C;AAC1C,0CAA0C;AAC1C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC1CA,6BAAe,sCAAW;AAC1B;AACA;AACA,+CAA+C;AAC/C,GAAG;AACH;AACA;;;;;;;;;;;;;;;;ACNA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACJ6B;;AAE7B,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,gDAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,YAAY,gDA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;AAClB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;ACpGe;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;ACJgC;AACoE;AAC/D;AACJ;;AAEjC;;AAEO;AACP;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB,QAAQ,wDAAQ;AAChB;;AAEA;AACA;AACA;AACA,uBAAuB;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,YAAY,oDAAM;AAClB;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA,oBAAoB,sDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wFAAwF,sDAAiB;AACzG;;AAEA;AACA,sDAAsD,kDAAM;AAC5D;;AAEA;AACA;AACA;;AAEA;AACA,gDAAgD,sDAAgB;AAChE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEe;AACf;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5HwE;AAC/B;AACE;AACL;AACL;AACI;AACC;AACN;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oDAAQ;AAC7B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kEAAkE,0DAAS;AAC3E;AACA;;AAEA,sBAAsB,sDAAW;;AAEjC,2BAA2B,sDAAgB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEe;A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A;AACA;;AAEA;AACA;;AAEA;AACA;;AAEe;AACf,cAAc,0DAAU;;AAExB;AACA,WAAW,oDAAI;AACf;;AAEA,EAAE,+CAAS;;AAEX;AACA;;;;;;;;;;;;;;;;;;;;;;;ACrE+B;AACmB;AACrB;AACqB;AACd;;AAEpC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,QAAQ;AAChC,oBAAoB,UAAU;AAC9B;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY,QAAQ;AAC5B,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oDAAK;AACrC,MAAM;AACN,UAAU,oDAAK;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sCAAsC,qDAAe;AACrD,kBAAkB,iDAAM;AACxB;AACA;AACA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,oDAAI;AACtB;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEe;AACf,wBAAwB,2DAAW;AACnC,qBAAqB,oDAAI;AACzB,EAAE,+CAAS;AACX;AACA;;;;;;;;;;;;;;;;AC3Ie;AACf;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACjBe;AACf;AACA;;;;;;;;;;;;;;;;;;;ACFmC;AACC;;AAE7B;;AAEQ;AACf,kBAAkB,+CAAS;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B,+CAAS;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,EAAE,+CAAS;;AAEX;AACA;;;;;;;;;;;;;;;;;;;;;AC7CsC;AACsB;AACxB;;AAEpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEO;AACP,wBAAwB,oDAAQ,EAAE,oDAAQ;AAC1C;;AAEA;AACA,sCAAsC,oDAAQ,EAAE,oDAAQ;AACxD;AACA;AACA;;AAEA;AACA;AACA;;AAEA,SAAS,qDAAS;AAClB;;AAEe;AACf,qBAAqB,2DAAW;;AAEhC;AACA,WAAW,oDAAI;AACf;;AAEA,EAAE,+CAAS;;AAEX;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;;;;;ACjDwE;AACpC;;AAErB;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,wDAAS;AACjD;AACA;;AAEA;AACA,wDAAwD,oDAAM;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB,gDAAS;AACzB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,+CAAS;AAClB;;;;;;;;;;;;;;;;;;;ACxDgC;AACM;AACF;;AAErB;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAuC,oDAAM;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,+CAAS,OAAO,qDAAS;AAClC;;;;;;;;;;;;;;;;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A;AACA,uBAAuB,cAAc,YAAY,oDAAQ;AACzD;;AAEA;AACA;AACA;;AAEA,SAAS,sDAAgB;AACzB;;;;;;;;;;;;;;;;;;;;ACrCsC;AACY;AACd;;AAEpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEO;AACP;;AAEA;AACA;AACA;;AAEA,SAAS,qDAAS;AAClB;;AAEe;AACf,wBAAwB,2DAAW;;AAEnC;AACA,WAAW,oDAAI;AACf;;AAEA,SAAS,+CAAS;AAClB;;;;;;;;;;;;;;;;;;AClCgC;AACI;;AAErB;AACf;AACA;AACA;AACA;;AAEA;AACA,uCAAuC,oDAAM;AAC7C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,+CAAS;AAClB;;;;;;;;;;;;;;;;;;;;;;ACtCkC;AAC+E;;AAElG;AACf,aAAa,kDAAQ;AACrB;AACA,cAAc,qDAAe;AAC7B;AACA;AACA;AACA,4DAA4D,qDAAe;AAC3E,aAAa,uDAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,qDAAc;AAC1E;AACA;AACA;AACA;AACA,4DAA4D,qDAAc;AAC1E;AACA;AACA;AACA,SAAS,iDAAM;AACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5B8H;AACpF;AACO;AACb;AACP;;AAE7B;AACA;AACA;;AAEA;AACA;AACA;;AAEO;AACP,cAAc,0DAAU;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,6BAA6B,oDAAI;AACjC;;AAEA;AACA,WAAW,oDAAI;AACf;;AAEA;AACA;;AAEe;AACf,SAAS,+CAAS,g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AEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC1EA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;;;ACZqC;AACA;AACC;;AAEtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB;AACA;AACA;AACA,MAAM;AACN,qBAAqB,gDAAS;AAC9B;AACA;;AAEA;AACA,SAAS,iBAAiB;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,qBAAqB,gDAAS;AAC9B;AACA;;AAEA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA;AACA;;AAEA,2CAA2C,wDAAQ;;AAEnD,uGAAuG,OAAO;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,6CAA6C,iBAAiB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,gDAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,wBAA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;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;;;;;;;;;;;;;;;;ACdA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;;;;;;;;;;;;;;;;;ACNqC;;AAErC,6BAAe,oCAAS;AACxB;;AAEA,+JAA+J,OAAO;AACtK,yHAAyH,OAAO;AAChI;AACA;AACA;AACA;AACA;;AAEA,SAAS,QAAQ;AACjB;AACA;;AAEA,aAAa,gDAAS;AACtB;;;;;;;;;;;;;;;;AClBA,6BAAe,sCAAW;;AAE1B,4DAA4D,OAAO;AACnE,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACVA,6BAAe,sCAAW;AAC1B;AACA;;;;;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA;AACA,8CAA8C,OAAO;AACrD,6BAA6B,OAAO;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;;;;;;;;;;;;;;;;AClEA,6BAAe,sCAAW;;AAE1B,6DAA6D,QAAQ;AACrE,6EAA6E,SAAS;AACtF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC3BA;AACA;AACA;;AAEA,6BAAe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ACA;AACA;AACA;AACA;;AAEO;AACP;AACA,SAAS,sDAAW;AACpB;;;;;;;;;;;;;;;;AClCA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACxBA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACNA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACRA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACJA,6BAAe,oCAAS;AACxB;AACA;AACA,2BAA2B;AAC3B;;;;;;;;;;;;;;;;;;;ACJqC;AACgE;AAClE;;AAEnC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA,cAAc,6CAAO;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6BAA6B,8CAAI;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,8CAAI,CAAC,6CAAG;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA,qBAAqB,wDAAQ;AAC7B;AACA;AACA;AACA;AACA;AACA,aAAa,kDAAQ;;AAErB;AACA;AACA;AACA;AACA;AACA,iDAAiD,4CAAM;AACvD,+CAA+C,4CAAM;AACrD,aAAa,6CAAG;AAChB;;AAEA;;AAEA;AACA;;AAEA;AACA,eAAe,6CAAO;;AAEtB;AACA,kBAAkB,yCAAG,GAAG,6CAAO;AAC/B,0BAA0B,6CAAG,WAAW,6CAAG;A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;AAC7F;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uEAAuE,wDAAQ;AAC/E;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;AC/GiE;AACpC;AACc;;AAE3C,6BAAe,sCAAW;AAC1B,UAAU,oDAAI,SAAS,+DAAiB;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,OAAO,0DAAU,SAAS;AAC5D,gCAAgC,OAAO,0DAAU,SAAS;AAC1D,mCAAmC,OAAO,0DAAU,SAAS;AAC7D,mCAAmC,OAAO,0DAAU,SAAS;;AAE7D;AACA,gCAAgC,4DAAW;AAC3C;;AAEA;AACA;;;;;;;;;;;;;;;;;AC5BO;;AAEP,6BAAe,oCAAS;AACxB;AACA;AACA,qBAAqB;AACrB;;;;;;;;;;;;;;;;ACNA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACJO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,+CAA+C;AAC/C,wDAAwD;AACxD;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B,sEAAsE;AACrG,+BAA+B;AAC/B,+BAA+B,oFAAoF;AACnH,kCAAkC;AAClC;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;;AClD8B;AACG;;AAEjC;AACA;AACA;;AAEA;AACA,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D,+BAA+B,4BAA4B;AAC3D,+BAA+B,4BAA4B,4FAA4F;AACvJ,eAAe,gDAAK,cAAc;AAClC;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;ACnDiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B,oFAAoF,0EAA0E;AAC7L,+BAA+B;AAC/B,eAAe,gDAAK,cAAc;AAClC;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;;;ACtC4C;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,iBAAiB,2DAAW;AAC5B,iBAAiB,2DAAW;AAC5B,iBAAiB,2DAAW;AAC5B,iBAAiB,2DAAW;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;;AC1EiC;;AAEjC;AACA,oBAAoB,4CAAK;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA,iEAAe;;AAEf;AACA,4BAA4B,4CAAK;AACjC;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,OAAO,EAAC;;;;;;;;;;;;;;;;;;ACvDF;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,wDAAwD;AACxD,+CAA+C;AAC/C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B,sEAAsE;AACrG,+BAA+B,4BAA4B;AAC3D,+BAA+B;AAC/B,kCAAkC;AAClC;AACA;AACA;AACA;AACA;;AAEA,iEAAe;;AAEf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,IAAI,EAAC;;;;;;;;;;;;;;;;;;;AC5DwB;AACM;;AAE7B;AACP;AACA;AACA;;AAEA;AACA,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D,+BAA+B,kDAAkD;AACjF,+BAA+B,4BAA4B;AAC3D,eAAe,mDAAK,cAAc;AAClC;AACA;AACA;AACA;AACA;;AAEA,iEAAe;;AAEf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,IAAI,EAAC;;;;;;;;;;;;;;;;;;AC5D8B;;AAE7B;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B,kGAAkG;AACjI,+BAA+B;AAC/B,eAAe,mDAAK,cAAc;AAClC;AACA;AACA;AACA;AACA;;AAEA,iEAAe;;AAEf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,IAAI,EAAC;;;;;;;;;;;;;;;;;;;AChD6B;AACI;;AAEhC;AACP;AACA;AACA;AACA;;AAEA,oBAAoB,6CAAO;AAC3B;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,6CAAO;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,wDAAwD;AACxD,8CAA8C;AAC9C;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,sEAAsE;AACrG,+BAA+B;AAC/B,+BAA+B;AAC/B,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe;;AAEf;AACA,wDAAwD,kDAAQ;AAChE;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,MAAM,EAAC;;;;;;;;;;;;;;;;;;;ACvF2C;AACrB;AACQ;;AAEtC;AACA;AACA;AACA;;AAEA;AACA,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,4BAA4B;AAC3D,+BAA+B,kDAAkD;AACjF,+BAA+B,4BAA4B;AAC3D,eAAe,qDAAK,cAAc;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe;;AAEf;AACA,8DAA8D,8DAAc;AAC5E;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,MAAM,EAAC;;;;;;;;;;;;;;;;;;ACzEuC;AACT;;AAEtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B,kGAAkG;AACjI,+BAA+B;AAC/B,eAAe,qDAAK,cAAc;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe;;AAEf;AACA,4DAA4D,0DAAY;AACxE;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,MAAM,EAAC;;;;;;;;;;;;;;;;AC7DR;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B,sEAAsE;AACrG,+BAA+B;AAC/B,2CAA2C;AAC3C;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;AC9B8B;;AAE9B;AACA;AACA;;AAEA;AACA,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;ACxBA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,wDAAwD;AACxD,6DAA6D;AAC7D;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,kDAAkD;AAClD;AACA,+BAA+B,sEAAsE;AACrG,+BAA+B;AAC/B,+BAA+B,wDAAwD;AACvF,+DAA+D;AAC/D;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,2BAA2B,6BAA6B;AACxD,0BAA0B,4BAA4B;AACtD,2BAA2B,6BAA6B;AACxD,kDAAkD;AAClD;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;ACvGA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,WAAW;AACzB;AACA,cAAc,OAAO;AACrB;AACA,kBAAkB,QAAQ;AAC1B;AACA,cAAc,WAAW;AACzB;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;;AChEsC;;AAE/B,oCAAoC,kDAAW;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEe;;AAEf;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B,sEAAsE;AACrG,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6B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;;;;ACxBqC;;AAEvC;AACO;AACA;AACA;AACA;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAEc;AACf,WAAW,sDAAY;AACvB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1BkH;AAC1D;AACJ;AACF;;;;;;;;;;;;;;;;;;ACHL;;AAEtC;;AAEP;AACA;AACA;;AAEA;AACA;AACA,MAAM,4DAAS;;AAEf,iEAAe,SAAS,EAAC;;;;;;;;;;;;;;;;;;ACZmB;AACA;;AAE5C;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,2DAAQ,CAAC,uDAAY;;AAE3B,iEAAe,QAAQ,EAAC;;;;;;;;;;;;;;;;;;;ACDP;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;AACV;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8CAAS,cAAc,kDAAS;AACxE,iBAAiB,2CAAM;AACvB;AACA;AACA;AACA,UAAU;AACV;AACA,wCAAwC,+CAAU,cAAc,mDAAU;AAC1E,iBAAiB,4CAAO;AACxB;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;;AAEA,YAAY,4BAA4B;AACxC;AACA;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,4CAAO,OAAO,iDAAQ;AACvC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,+CAAU,OAAO,iDAAQ;AACtC;;AAEA;AACA;AACA,mCAAmC,qDAAY,MAAM,iDAAY;AACjE;;AAEA;AACA;AACA,aAAa,iDAAY,OAAO,iDAAQ,WAAW,iDAAQ;AAC3D;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,+CAAU,OAAO,iDAAQ;AACtC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,qDAAY,MAAM,iDAAY;AAC9D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,2CAAM,OAAO,gDAAO;AACrC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA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AY;AAChH,GAAG;AACH;;AAEO;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEP;AACA,SAAS,0DAAY;AACrB;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH,2BAA2B,sDAAY;AACvC,GAAG;AACH;;AAEO;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACvDoC;;AAEpC,iBAAiB,0DAAY;AACpC;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,CAAC;;AAED;AACA;AACA,2DAA2D,0DAAY;AACvE;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEO;;AAEA,gBAAgB,0DAAY;AACnC;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,CAAC;;AAED;AACA;AACA,2DAA2D,0DAAY;AACvE;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEO;;;;;;;;;;;;;;;;;;;;;;;AC5Ca;;AAIE;;AAIC;;;;;;;;;;;;;;;;;ACZe;;AAEtC,6BAAe,oCAAS;AACxB,cAAc,4CAAK;AACnB;AACA;AACA;AACA,0CAA0C,8CAAG;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AChBiC;;AAEjC,6BAAe,oCAAS;AACxB,cAAc,4CAAK;AACnB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sIAAsI;;AAE/H;AACP;AACA;;AAEA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;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nE,+DAA+D,OAAO;AACtE;AACA,QAAQ,mEAAQ;AAChB;AACA;AACA;;AAEA,aAAa,4DAAU;AACvB;;;;;;;;;;;;;;;;;;;;ACzC+E;AACxC;AACD;AACK;;AAE3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB,iBAAiB,wDAAS,uCAAuC,mEAAoB,GAAG,uDAAW;AACnG;AACA,sEAAsE,qDAAU;AAChF;AACA;AACA;;;;;;;;;;;;;;;;;AC7EuC;;AAEvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA,iBAAiB,wDAAS;AAC1B;AACA;;;;;;;;;;;;;;;;;AC3CwC;;AAExC;AACA;AACA,IAAI,kDAAI;AACR;AACA;;AAEA;AACA;AACA,IAAI,kDAAI;AACR;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA;AACA;AACA;AACA,QAAQ,iDAAG;AACX;;;;;;;;;;;;;;;;;ACtBuC;;AAEvC;AACA;AACA,IAAI,iDAAG;AACP;AACA;;AAEA;AACA;AACA,IAAI,iDAAG;AACP;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA;AACA;AACA;AACA,QAAQ,iDAAG;AACX;;;;;;;;;;;;;;;;;ACtBuC;;AAEvC;AACA;AACA;AACA,IAAI,iD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A;AACA;AACA,4CAA4C;AAC5C,sCAAsC,oDAAO;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yDAAyD;AACzD;AACA,2DAA2D;AAC3D;AACA,IAAI,oDAAO;AACX;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,yCAAyC;AACzC;;AAEA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;;;;;;;;;;;;;;;;;;;ACxJsC;AACA;AACM;;AAE5C,6BAAe,oCAAS;AACxB;AACA;;AAEA,6CAA6C,wDAAQ;;AAErD,sFAAsF,OAAO;AAC7F,gHAAgH,OAAO;AACvH;AACA;AACA;AACA,QAAQ,wDAAQ,qCAAqC,iDAAG;AACxD;AACA;AACA;;AAEA,aAAa,iDAAU;AACvB;;;;;;;;;;;;;;;;;;;ACrByC;AACH;AACM;;AAE5C,6BAAe,oCAAS;AACxB;AACA;;AAEA,6CAA6C,wDAAW;;AAExD,0FAA0F,OAAO;AACjG,+DAA+D,OAAO;AACtE;AACA,yFAAyF,iDAAG,wCAAwC,OAAO;AAC3I;AACA,YAAY,wDAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,iDAAU;AACvB;;;;;;;;;;;;;;;;;ACzBuC;;AAEvC,gBAAgB,oDAAS;;AAEzB,6BAAe,sCAAW;AAC1B;AACA;;;;;;;;;;;;;;;;;;;;;ACN+E;AAC5C;AACD;AACI;AACK;;AAE3C;AACA;AACA;AACA;AACA;AACA,kBAAkB,wDAAK;AACvB,oDAAoD,wDAAK;AACzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,wDAAK;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,wDAAK;AACvB;AACA;AACA,6EAA6E,wDAAK;AAClF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB,iDAAG;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB,yCAAyC,mEAAoB,GAAG,uDAAW;AAC3E;AACA;AACA;AACA;AACA,+CAA+C,qDAAU;AACzD;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACvBsC;;AAEtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA,qBAAqB,qDAAU;AAC/B;AACA;;;;;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACvB6C;AACD;;AAE5C,6BAAe,sCAAW;AAC1B;AACA;AACA,YAAY,gDAAK;;AAEjB,4DAA4D,OAAO;AACnE,+DAA+D,OAAO;AACtE;AACA,sBAAsB,iDAAG;AACzB,QAAQ,wDAAQ;AAChB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA,aAAa,iDAAU;AACvB;;;;;;;;;;;;;;;;;;ACvBuC;;AAEvC;AACA;AACA;AACA,mBAAmB,iDAAG;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,iDAAG;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB,4BAA4B,OAAO;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;;AAEA;AACA,gBAAgB,iDAAG;AACnB,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;;AAEA;AACA,mBAAmB,iDAAG;AACtB,2CAA2C;AAC3C,GAAG;;AAEH;AACA,WAAW,iDAAG;AACd;AACA;;;;;;;;;;;;;;;;AChFA,iEAAe,YAAY,EAAC;;;;;;;;;;;;;;;;ACAb;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,WAAW,kDAAkD;AAC7D,kBAAkB,yDAAyD;AAC3E,aAAa,oDAAoD;AACjE,gBAAgB,uDAAuD;AACvE,QAAQ;AACR,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;ACb0C;AACoE;;;;;;;;;;;;;;;;;ACDvG;AACP;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;;;;;;;;;;;;;;;;;;ACPO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEO;;AAEP;;AAEe;AACf;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AClDqC;AACW;AACD;AACF;AACL;AACH;AACF;AACgB;AACC;;AAEpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,mDAAQ;AAChC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sDAAe;AACnC,kBAAkB,uDAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oCAAoC,eAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mDAAQ;AAC/B;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,+CAA+C,oDAAS;AACxD;;AAEA;AACA;AACA,oEAAoE,oDAAS;AAC7E;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uCAAuC,gDAAgD;AACvF,oDAAoD,8CAA8C;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,mBAAmB,4BAA4B,QAAQ,oDAAS;AAChE;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,cAAc,wDAAM;AACpB;AACA;AACA;AACA,YAAY,iDAAS;AACrB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,wDAAO;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM,wDAAS;AACf;AACA;;AAEA,IAAI,uDAAO;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,wDAAM;AAClB,YAAY,wDAAO;AACnB;AACA;;AAEA,IAAI,mDAAW;AACf,IAAI,0DAAa;AACjB;AACA,IAAI,wDAAS;AACb;;AAEA;AACA,MAAM,uDAAO;AACb;AACA;AACA;AACA;AACA;AACA,sEAAsE,wDAAO;AAC7E;;AAEA;AACA;AACA,MAAM,gDAAU;AAChB,MAAM,uDAAO;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,wDAAO;AACpB;AACA;AACA;;AAEA,IAAI,uDAAO;AACX,sBAAsB,wDAAM;AAC5B,SAAS,wDAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,0DAAa;AACjB,gBAAgB,OAAO;AACvB,0BAA0B,wDAAO;AACjC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,iFAAiF,uBAAuB;AACxG,MAAM,wDAAS;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,IAAI,uDAAO;AACX,gBAAgB,OAAO;AACvB,0BAA0B,wDAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,IAAI,0DAAa;AACjB;AACA,0CAA0C,qBAAqB;AAC/D,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,wDAAO;AACnB;AACA,kBAAkB,wDAAM;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA,0EAA0E,wDAAQ;AAClF;;AAEA;AACA,sEAAsE,wDAAQ;AAC9E;;AAEA;AACA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AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,6CAA6C;AAC7C,6CAA6C;AAC7C,4CAA4C;AAC5C,yDAAyD;;AAEzD;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,0FAA0F;AACzG;;AAEA,+CAA+C;AAC/C;AACA;AACA;AACA;;AAEA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,2DAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB,OAAO;AAC/B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gCAAgC,sBAAsB;AACtD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uDAAuD,oBAAoB;AAC3E;AACA;AACA;;AAEA;AACA;AACA,oCAAoC,2DAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,kCAAkC;;AAEtE;AACA;;AAEA;AACA;AACA,4BAA4B;AAC5B;;AAEA;AACA;AACA,oCAAoC,2DAAQ;AAC5C;AACA;AACA,iCAAiC;AACjC;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,2DAAQ;AAChD;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C,cAAc;AAC3D;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,eAAe,sDAAsD;;AAErE;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4BAA4B;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,sEAAsE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC;AACzC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,YAAY;AACZ;;AAEA;AACA;AACA,+BAA+B,YAAY;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB;AACpB,oBAAoB;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA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EA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,6CAAG;AAChB,QAAQ,6CAAG;AACX,YAAY,6CAAG;AACf,gBAAgB,+CAAK,CAAC,+CAAK;AAC3B,gBAAgB,+CAAK,CAAC,+CAAK;AAC3B,YAAY,6CAAG;AACf,gBAAgB,+CAAK,CAAC,+CAAK;AAC3B,gBAAgB,+CAAK,CAAC,+CAAK;AAC3B,QAAQ,6CAAG;AACX,YAAY,+CAAK,CAAC,+CAAK;AACvB,YAAY,+CAAK,CAAC,+CAAK;;AAEvB,cAAc,kDAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,oDAAc;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,+CAAK;AACxB,gCAAgC,mDAAS;AACzC,YAAY,+CAAK;AACjB,YAAY,+CAAK,CAAC,+CAAK;AACvB,YAAY,+CAAK,CAAC,+CAAK;AACvB;AACA;AACA,mBAAmB,+CAAK;AACxB,gCAAgC,mDAAS;AACzC,YAAY,+CAAK;AACjB,YAAY,+CAAK,CAAC,+CAAK;AACvB,YAAY,+CAAK,CAAC,+CAAK;AACvB;AACA;AACA,mBAAmB,+CAAK;AACxB,gCAAgC,mDAAS;AACzC,YAAY,+CAAK;AACjB,YAAY,+CAAK,CAAC,+CAAK;AACvB,YAAY,+CAAK,CAAC,+CAAK;AACvB;AACA;AACA,mBAAmB,+CAAK;AACxB,gCAAgC,mDAAS;AACzC,YAAY,+CAAK;AACjB,YAAY,+CAAK,CAAC,+CAAK;AACvB,YAAY,+CAAK,CAAC,+CAAK;AACvB;AACA;AACA,mBAAmB,+CAAK;AACxB,gCAAgC,mDAAS;AACzC,YAAY,+CAAK;AACjB,YAAY,+CAAK,CAAC,+CAAK;AACvB,YAAY,+CAAK,CAAC,+CAAK;AACvB;AACA;AACA,mBAAmB,+CAAK;AACxB,gCAAgC,mDAAS;AACzC,YAAY,+CAAK;AACjB,YAAY,+CAAK,CAAC,+CAAK;AACvB,YAAY,+CAAK,CAAC,+CAAK;AACvB;;AAEA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6CAAG;AACxB;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+CAAK;AAC7B,oCAAoC,6CAAG;AACvC,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB,yBAAyB,+CAAK;AAC9B,oCAAoC,mDAAS;AAC7C,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB;AACA,wCAAwC,+CAAK,CAAC,+CAAK;AACnD;AACA;AACA,wCAAwC,+CAAK,CAAC,+CAAK;AACnD;AACA;AACA;AACA,wBAAwB,+CAAK;AAC7B,oCAAoC,6CAAG;AACvC,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB,yBAAyB,+CAAK;AAC9B,oCAAoC,mDAAS;AAC7C,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6CAAG;AACxB;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+CAAK;AAC7B,oCAAoC,6CAAG;AACvC,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB,yBAAyB,+CAAK;AAC9B,oCAAoC,mDAAS;AAC7C,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB;AACA,wCAAwC,+CAAK,CAAC,+CAAK;AACnD;AACA;AACA,wCAAwC,+CAAK,CAAC,+CAAK;AACnD;AACA;AACA;AACA,wBAAwB,+CAAK;AAC7B,oCAAoC,6CAAG;AACvC,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB,yBAAyB,+CAAK;AAC9B,oCAAoC,mDAAS;AAC7C,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6CAAG;AACxB;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+CAAK;AAC7B,oCAAoC,6CAAG;AACvC,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB,yBAAyB,+CAAK;AAC9B,oCAAoC,mDAAS;AAC7C,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB;AACA,wCAAwC,+CAAK,CAAC,+CAAK;AACnD;AACA;AACA,wCAAwC,+CAAK,CAAC,+CAAK;AACnD;AACA;AACA;AACA,wBAAwB,+CAAK;AAC7B,oCAAoC,6CAAG;AACvC,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB,yBAAyB,+CAAK;AAC9B,oCAAoC,mDAAS;AAC7C,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB;AACA;;AAEA;AAC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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,mDAAS;AAC9B;AACA;AACA,QAAQ,mDAAS;AACjB;AACA;AACA;;AAEA;AACA;;AAEA,aAAa,6CAAG;AAChB,aAAa,6CAAG;AAChB,aAAa,6CAAG;AAChB,YAAY,6CAAG;;AAEf;AACA;AACA,WAAW,mDAAS;AACpB,QAAQ,+CAAK,CAAC,+CAAK;AACnB,QAAQ,+CAAK,CAAC,+CAAK;AACnB,QAAQ,+CAAK,CAAC,+CAAK;AACnB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,6CAAG;AACtB,QAAQ,6CAAG;AACX,YAAY,gDAAM;AAClB;AACA,QAAQ,6CAAG;AACX,YAAY,gDAAM;AAClB;;AAEA,cAAc,kDAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,oDAAc;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;AC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gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,6CAAG;AAChB,QAAQ,6CAAG;AACX,YAAY,+CAAK;AACjB,YAAY,+CAAK;AACjB,QAAQ,+CAAK;;AAEb,cAAc,kDAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,oDAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,6CAAG;AACtB,4BAA4B,+CAAK;;AAEjC,mBAAmB,6CAAG;AACtB,4BAA4B,+CAAK;;AAEjC,mBAAmB,6CAAG;AACtB,4BAA4B,+CAAK;;AAEjC;AACA,gCAAgC,+CAAK;AACrC,gCAAgC,+CAAK;AACrC;AACA;AACA,gCAAgC,+CAAK;AACrC,gCAAgC,+CAAK;AACrC;AACA;AACA,gCAAgC,+CAAK;AACrC,gCAAgC,+CAAK;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AC7cO;AACA;AACA;;AAEP;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEA;AACO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP,oBAAoB,UAAU;AAC9B;AACA;;AAEO;AACP;AACA,oBAAoB,UAAU;AAC9B;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxIyD;AACA;AACA;AACA;;;;;;;UCJzD;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;ACNA,IAAAA,EAAA,GAAAC,uBAAA,CAAAC,mBAAA;AACA,IAAAC,MAAA,GAAAD,mBAAA;AAAA,SAAAE,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OA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D;IACnB,IAAAC,OAAA;IAAIA,OAAA,GAAU,CACR;MAAClD,KAAA,EAAO,SAAR;MAAmBE,OAAA,EAAS,GAA5B;MAAiCC,MAAA,EAAQ3F,EAAE,CAAC4F,YAA5C;MAA0DH,IAAA,EAAM;IAAhE,CADQ,EAER;MAACD,KAAA,EAAO,SAAR;MAAmBE,OAAA,EAAS,GAA5B;MAAiCC,MAAA,EAAQ3F,EAAE,CAAC4F,YAA5C;MAA0DH,IAAA,EAAM;IAAhE,CAFQ,EAGR;MAACD,KAAA,EAAO,SAAR;MAAmBE,OAAA,EAAS,GAA5B;MAAiCC,MAAA,EAAQ3F,EAAE,CAAC4F,YAA5C;MAA0DH,IAAA,EAAM;IAAhE,CAHQ,EAIR;MAACD,KAAA,EAAO,SAAR;MAAmBE,OAAA,EAAS,GAA5B;MAAiCC,MAAA,EAAQ3F,EAAE,CAAC4F,YAA5C;MAA0DH,IAAA,EAAM;IAAhE,CAJQ,EAKR;MAACD,KAAA,EAAO,SAAR;MAAmBE,OAAA,EAAS,GAA5B;MAAiCC,MAAA,EAAQ3F,EAAE,CAAC4F,YAA5C;MAA0DH,IAAA,EAAM;IAAhE,CALQ;WAOViD,OAAO,CAAClC,KAAR,CAAc,CAAd,EAAiBiC,KAAjB;EARe;;;EAWjBN,eAAA,GAAkBnI,EAAE,CAAC2F,MAAH,EAAW,CAACgD,IAAZ,CAAiB,EAAjB;;;;AA8RpBC,MAAM,CAACjG,UAAP,GAAoBA,UAAA,C","sources":["webpack://bika.cement/./node_modules/performance-now/lib/performance-now.js","webpack://bika.cement/./node_modules/raf/index.js","webpack://bika.cement/./node_modules/rgbcolor/index.js","webpack://bika.cement/./node_modules/stackblur-canvas/dist/stackblur-es.js","webpack://bika.cement/./node_modules/canvg/dist/index.cjs","webpack://bika.cement/./node_modules/svg-pathdata/lib/SVGPathData.cjs","webpack://bika.cement/./node_modules/d3-array/src/array.js","webpack://bika.cement/./node_modules/d3-array/src/ascending.js","webpack://bika.cement/./node_modules/d3-array/src/bin.js","webpack://bika.cement/./node_modules/d3-array/src/bisect.js","webpack://bika.cement/./node_modules/d3-array/src/bisector.js","webpack://bika.cement/./node_modules/d3-array/src/blur.js","webpack://bika.cement/./node_modules/d3-array/src/constant.js","webpack://bika.cement/./node_modules/d3-array/src/count.js","webpack://bika.cement/./node_modules/d3-array/src/cross.js","webpack://bika.cement/./node_modules/d3-array/src/cumsum.js","webpack://bika.cement/./node_modules/d3-array/src/descending.js","webpack://bika.cement/./node_modules/d3-array/src/deviation.js","webpack://bika.cement/./node_modules/d3-array/src/difference.js","webpack://bika.cement/./node_modules/d3-array/src/disjoint.js","webpack://bika.cement/./node_modules/d3-array/src/every.js","webpack://bika.cement/./node_modules/d3-array/src/extent.js","webpack://bika.cement/./node_modules/d3-array/src/filter.js","webpack://bika.cement/./node_modules/d3-array/src/fsum.js","webpack://bika.cement/./node_modules/d3-array/src/greatest.js","webpack://bika.cement/./node_modules/d3-array/src/greatestIndex.js","webpack://bika.cement/./node_modules/d3-array/src/group.js","webpack://bika.cement/./node_modules/d3-array/src/groupSort.js","webpack://bika.cement/./node_modules/d3-array/src/identity.js","webpack://bika.cement/./node_modules/d3-array/src/index.js","webpack://bika.cement/./node_modules/d3-array/src/intersection.js","webpack://bika.cement/./node_modules/d3-array/src/least.js","webpack://bika.cement/./node_modules/d3-array/src/leastIndex.js","webpack://bika.cement/./node_modules/d3-array/src/map.js","webpack://bika.cement/./node_modules/d3-array/src/max.js","webpack://bika.cement/./node_modules/d3-array/src/maxIndex.js","webpack://bika.cement/./node_modules/d3-array/src/mean.js","webpack://bika.cement/./node_modules/d3-array/src/median.js","webpack://bika.cement/./node_modules/d3-array/src/merge.js","webpack://bika.cement/./node_modules/d3-array/src/min.js","webpack://bika.cement/./node_modules/d3-array/src/minIndex.js","webpack://bika.cement/./node_modules/d3-array/src/mode.js","webpack://bika.cement/./node_modules/d3-array/src/nice.js","webpack://bika.cement/./node_modules/d3-array/src/number.js","webpack://bika.cement/./node_modules/d3-array/src/pairs.js","webpack://bika.cement/./node_modules/d3-array/src/permute.js","webpack://bika.cement/./node_modules/d3-array/src/quantile.js","webpack://bika.cement/./node_modules/d3-array/src/quickselect.js","webpack://bika.cement/./node_modules/d3-array/src/range.js","webpack://bika.cement/./node_modules/d3-array/src/rank.js","webpack://bika.cement/./node_modules/d3-array/src/reduce.js","webpack://bika.cement/./node_modules/d3-array/src/reverse.js","webpack://bika.cement/./node_modules/d3-array/src/scan.js","webpack://bika.cement/./node_modules/d3-array/src/shuffle.js","webpack://bika.cement/./node_modules/d3-array/src/some.js","webpack://bika.cement/./node_modules/d3-array/src/sort.js","webpack://bika.cement/./node_modules/d3-array/src/subset.js","webpack://bika.cement/./node_modules/d3-array/src/sum.js","webpack://bika.cement/./node_modules/d3-array/src/superset.js","webpack://bika.cement/./node_modules/d3-array/src/threshold/freedmanDiaconis.js","webpack://bika.cement/./node_modules/d3-array/src/threshold/scott.js","webpack://bika.cement/./node_modules/d3-array/src/threshold/sturges.js","webpack://bika.cement/./node_modules/d3-array/src/ticks.js","webpack://bika.cement/./node_modules/d3-array/src/transpose.js","webpack://bika.cement/./node_modules/d3-array/src/union.js","webpack://bika.cement/./node_modules/d3-array/src/variance.js","webpack://bika.cement/./node_modules/d3-array/src/zip.js","webpack://bika.cement/./node_modules/d3-axis/src/axis.js","webpack://bika.cement/./node_modules/d3-axis/src/identity.js","webpack://bika.cement/./node_modules/d3-axis/src/index.js","webpack://bika.cement/./node_modules/d3-brush/src/brush.js","webpack://bika.cement/./node_modules/d3-brush/src/constant.js","webpack://bika.cement/./node_modules/d3-brush/src/event.js","webpack://bika.cement/./node_modules/d3-brush/src/index.js","webpack://bika.cement/./node_modules/d3-brush/src/noevent.js","webpack://bika.cement/./node_modules/d3-chord/src/array.js","webpack://bika.cement/./node_modules/d3-chord/src/chord.js","webpack://bika.cement/./node_modules/d3-chord/src/constant.js","webpack://bika.cement/./node_modules/d3-chord/src/index.js","webpack://bika.cement/./node_modules/d3-chord/src/math.js","webpack://bika.cement/./node_modules/d3-chord/src/ribbon.js","webpack://bika.cement/./node_modules/d3-color/src/color.js","webpack://bika.cement/./node_modules/d3-color/src/cubehelix.js","webpack://bika.cement/./node_modules/d3-color/src/define.js","webpack://bika.cement/./node_modules/d3-color/src/index.js","webpack://bika.cement/./node_modules/d3-color/src/lab.js","webpack://bika.cement/./node_modules/d3-color/src/math.js","webpack://bika.cement/./node_modules/d3-contour/src/area.js","webpack://bika.cement/./node_modules/d3-contour/src/array.js","webpack://bika.cement/./node_modules/d3-contour/src/ascending.js","webpack://bika.cement/./node_modules/d3-contour/src/constant.js","webpack://bika.cement/./node_modules/d3-contour/src/contains.js","webpack://bika.cement/./node_modules/d3-contour/src/contours.js","webpack://bika.cement/./node_modules/d3-contour/src/density.js","webpack://bika.cement/./node_modules/d3-contour/src/index.js","webpack://bika.cement/./node_modules/d3-contour/src/noop.js","webpack://bika.cement/./node_modules/d3-delaunay/src/delaunay.js","webpack://bika.cement/./node_modules/d3-delaunay/src/index.js","webpack://bika.cement/./node_modules/d3-delaunay/src/path.js","webpack://bika.cement/./node_modules/d3-delaunay/src/polygon.js","webpack://bika.cement/./node_modules/d3-delaunay/src/voronoi.js","webpack://bika.cement/./node_modules/d3-dispatch/src/dispatch.js","webpack://bika.cement/./node_modules/d3-dispatch/src/index.js","webpack://bika.cement/./node_modules/d3-drag/src/constant.js","webpack://bika.cement/./node_modules/d3-drag/src/drag.js","webpack://bika.cement/./node_modules/d3-drag/src/event.js","webpack://bika.cement/./node_modules/d3-drag/src/index.js","webpack://bika.cement/./node_modules/d3-drag/src/nodrag.js","webpack://bika.cement/./node_modules/d3-drag/src/noevent.js","webpack://bika.cement/./node_modules/d3-dsv/src/autoType.js","webpack://bika.cement/./node_modules/d3-dsv/src/csv.js","webpack://bika.cement/./node_modules/d3-dsv/src/dsv.js","webpack://bika.cement/./node_modules/d3-dsv/src/index.js","webpack://bika.cement/./node_modules/d3-dsv/src/tsv.js","webpack://bika.cement/./node_modules/d3-ease/src/back.js","webpack://bika.cement/./node_modules/d3-ease/src/bounce.js","webpack://bika.cement/./node_modules/d3-ease/src/circle.js","webpack://bika.cement/./node_modules/d3-ease/src/cubic.js","webpack://bika.cement/./node_modules/d3-ease/src/elastic.js","webpack://bika.cement/./node_modules/d3-ease/src/exp.js","webpack://bika.cement/./node_modules/d3-ease/src/index.js","webpack://bika.cement/./node_modules/d3-ease/src/linear.js","webpack://bika.cement/./node_modules/d3-ease/src/math.js","webpack://bika.cement/./node_modules/d3-ease/src/poly.js","webpack://bika.cement/./node_modules/d3-ease/src/quad.js","webpack://bika.cement/./node_modules/d3-ease/src/sin.js","webpack://bika.cement/./node_modules/d3-fetch/src/blob.js","webpack://bika.cement/./node_modules/d3-fetch/src/buffer.js","webpack://bika.cement/./node_modules/d3-fetch/src/dsv.js","webpack://bika.cement/./node_modules/d3-fetch/src/image.js","webpack://bika.cement/./node_modules/d3-fetch/src/index.js","webpack://bika.cement/./node_modules/d3-fetch/src/json.js","webpack://bika.cement/./node_modules/d3-fetch/src/text.js","webpack://bika.cement/./node_modules/d3-fetch/src/xml.js","webpack://bika.cement/./node_modules/d3-force/src/center.js","webpack://bika.cement/./node_modules/d3-force/src/collide.js","webpack://bika.cement/./node_modules/d3-force/src/constant.js","webpack://bika.cement/./node_modules/d3-force/src/index.js","webpack://bika.cement/./node_modules/d3-force/src/jiggle.js","webpack://bika.cement/./node_modules/d3-force/src/lcg.js","webpack://bika.cement/./node_modules/d3-force/src/link.js","webpack://bika.cement/./node_modules/d3-force/src/manyBody.js","webpack://bika.cement/./node_modules/d3-force/src/radial.js","webpack://bika.cement/./node_modules/d3-force/src/simulation.js","webpack://bika.cement/./node_modules/d3-force/src/x.js","webpack://bika.cement/./node_modules/d3-force/src/y.js","webpack://bika.cement/./node_modules/d3-format/src/defaultLocale.js","webpack://bika.cement/./node_modules/d3-format/src/exponent.js","webpack://bika.cement/./node_modules/d3-format/src/formatDecimal.js","webpack://bika.cement/./node_modules/d3-format/src/formatGroup.js","webpack://bika.cement/./node_modules/d3-format/src/formatNumerals.js","webpack://bika.cement/./node_modules/d3-format/src/formatPrefixAuto.js","webpack://bika.cement/./node_modules/d3-format/src/formatRounded.js","webpack://bika.cement/./node_modules/d3-format/src/formatSpecifier.js","webpack://bika.cement/./node_modules/d3-format/src/formatTrim.js","webpack://bika.cement/./node_modules/d3-format/src/formatTypes.js","webpack://bika.cement/./node_modules/d3-format/src/identity.js","webpack://bika.cement/./node_modules/d3-format/src/index.js","webpack://bika.cement/./node_modules/d3-format/src/locale.js","webpack://bika.cement/./node_modules/d3-format/src/precisionFixed.js","webpack://bika.cement/./node_modules/d3-format/src/precisionPrefix.js","webpack://bika.cement/./node_modules/d3-format/src/precisionRound.js","webpack://bika.cement/./node_modules/d3-geo/src/area.js","webpack://bika.cement/./node_modules/d3-geo/src/bounds.js","webpack://bika.cement/./node_modules/d3-geo/src/cartesian.js","webpack://bika.cement/./node_modules/d3-geo/src/centroid.js","webpack://bika.cement/./node_modules/d3-geo/src/circle.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/antimeridian.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/buffer.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/circle.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/extent.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/index.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/line.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/rectangle.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/rejoin.js","webpack://bika.cement/./node_modules/d3-geo/src/compose.js","webpack://bika.cement/./node_modules/d3-geo/src/constant.js","webpack://bika.cement/./node_modules/d3-geo/src/contains.js","webpack://bika.cement/./node_modules/d3-geo/src/distance.js","webpack://bika.cement/./node_modules/d3-geo/src/graticule.js","webpack://bika.cement/./node_modules/d3-geo/src/identity.js","webpack://bika.cement/./node_modules/d3-geo/src/index.js","webpack://bika.cement/./node_modules/d3-geo/src/interpolate.js","webpack://bika.cement/./node_modules/d3-geo/src/length.js","webpack://bika.cement/./node_modules/d3-geo/src/math.js","webpack://bika.cement/./node_modules/d3-geo/src/noop.js","webpack://bika.cement/./node_modules/d3-geo/src/path/area.js","webpack://bika.cement/./node_modules/d3-geo/src/path/bounds.js","webpack://bika.cement/./node_modules/d3-geo/src/path/centroid.js","webpack://bika.cement/./node_modules/d3-geo/src/path/context.js","webpack://bika.cement/./node_modules/d3-geo/src/path/index.js","webpack://bika.cement/./node_modules/d3-geo/src/path/measure.js","webpack://bika.cement/./node_modules/d3-geo/src/path/string.js","webpack://bika.cement/./node_modules/d3-geo/src/pointEqual.js","webpack://bika.cement/./node_modules/d3-geo/src/polygonContains.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/albers.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/albersUsa.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/azimuthal.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/azimuthalEqualArea.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/azimuthalEquidistant.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/conic.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/conicConformal.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/conicEqualArea.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/conicEquidistant.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/cylindricalEqualArea.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/equalEarth.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/equirectangular.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/fit.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/gnomonic.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/identity.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/index.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/mercator.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/naturalEarth1.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/orthographic.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/resample.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/stereographic.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/transverseMercator.js","webpack://bika.cement/./node_modules/d3-geo/src/rotation.js","webpack://bika.cement/./node_modules/d3-geo/src/stream.js","webpack://bika.cement/./node_modules/d3-geo/src/transform.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/accessors.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/array.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/cluster.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/constant.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/ancestors.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/count.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/descendants.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/each.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/find.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/index.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/iterator.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/leaves.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/links.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/path.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/sort.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/sum.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/index.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/lcg.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/pack/enclose.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/pack/index.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/pack/siblings.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/partition.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/stratify.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/tree.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/binary.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/dice.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/index.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/resquarify.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/round.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/slice.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/sliceDice.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/squarify.js","webpack://bika.cement/./node_modules/d3-interpolate/src/array.js","webpack://bika.cement/./node_modules/d3-interpolate/src/basis.js","webpack://bika.cement/./node_modules/d3-interpolate/src/basisClosed.js","webpack://bika.cement/./node_modules/d3-interpolate/src/color.js","webpack://bika.cement/./node_modules/d3-interpolate/src/constant.js","webpack://bika.cement/./node_modules/d3-interpolate/src/cubehelix.js","webpack://bika.cement/./node_modules/d3-interpolate/src/date.js","webpack://bika.cement/./node_modules/d3-interpolate/src/discrete.js","webpack://bika.cement/./node_modules/d3-interpolate/src/hcl.js","webpack://bika.cement/./node_modules/d3-interpolate/src/hsl.js","webpack://bika.cement/./node_modules/d3-interpolate/src/hue.js","webpack://bika.cement/./node_modules/d3-interpolate/src/index.js","webpack://bika.cement/./node_modules/d3-interpolate/src/lab.js","webpack://bika.cement/./node_modules/d3-interpolate/src/number.js","webpack://bika.cement/./node_modules/d3-interpolate/src/numberArray.js","webpack://bika.cement/./node_modules/d3-interpolate/src/object.js","webpack://bika.cement/./node_modules/d3-interpolate/src/piecewise.js","webpack://bika.cement/./node_modules/d3-interpolate/src/quantize.js","webpack://bika.cement/./node_modules/d3-interpolate/src/rgb.js","webpack://bika.cement/./node_modules/d3-interpolate/src/round.js","webpack://bika.cement/./node_modules/d3-interpolate/src/string.js","webpack://bika.cement/./node_modules/d3-interpolate/src/transform/decompose.js","webpack://bika.cement/./node_modules/d3-interpolate/src/transform/index.js","webpack://bika.cement/./node_modules/d3-interpolate/src/transform/parse.js","webpack://bika.cement/./node_modules/d3-interpolate/src/value.js","webpack://bika.cement/./node_modules/d3-interpolate/src/zoom.js","webpack://bika.cement/./node_modules/d3-path/src/index.js","webpack://bika.cement/./node_modules/d3-path/src/path.js","webpack://bika.cement/./node_modules/d3-polygon/src/area.js","webpack://bika.cement/./node_modules/d3-polygon/src/centroid.js","webpack://bika.cement/./node_modules/d3-polygon/src/contains.js","webpack://bika.cement/./node_modules/d3-polygon/src/cross.js","webpack://bika.cement/./node_modules/d3-polygon/src/hull.js","webpack://bika.cement/./node_modules/d3-polygon/src/index.js","webpack://bika.cement/./node_modules/d3-polygon/src/length.js","webpack://bika.cement/./node_modules/d3-quadtree/src/add.js","webpack://bika.cement/./node_modules/d3-quadtree/src/cover.js","webpack://bika.cement/./node_modules/d3-quadtree/src/data.js","webpack://bika.cement/./node_modules/d3-quadtree/src/extent.js","webpack://bika.cement/./node_modules/d3-quadtree/src/find.js","webpack://bika.cement/./node_modules/d3-quadtree/src/index.js","webpack://bika.cement/./node_modules/d3-quadtree/src/quad.js","webpack://bika.cement/./node_modules/d3-quadtree/src/quadtree.js","webpack://bika.cement/./node_modules/d3-quadtree/src/remove.js","webpack://bika.cement/./node_modules/d3-quadtree/src/root.js","webpack://bika.cement/./node_modules/d3-quadtree/src/size.js","webpack://bika.cement/./node_modules/d3-quadtree/src/visit.js","webpack://bika.cement/./node_modules/d3-quadtree/src/visitAfter.js","webpack://bika.cement/./node_modules/d3-quadtree/src/x.js","webpack://bika.cement/./node_modules/d3-quadtree/src/y.js","webpack://bika.cement/./node_modules/d3-random/src/bates.js","webpack://bika.cement/./node_modules/d3-random/src/bernoulli.js","webpack://bika.cement/./node_modules/d3-random/src/beta.js","webpack://bika.cement/./node_modules/d3-random/src/binomial.js","webpack://bika.cement/./node_modules/d3-random/src/cauchy.js","webpack://bika.cement/./node_modules/d3-random/src/defaultSource.js","webpack://bika.cement/./node_modules/d3-random/src/exponential.js","webpack://bika.cement/./node_modules/d3-random/src/gamma.js","webpack://bika.cement/./node_modules/d3-random/src/geometric.js","webpack://bika.cement/./node_modules/d3-random/src/index.js","webpack://bika.cement/./node_modules/d3-random/src/int.js","webpack://bika.cement/./node_modules/d3-random/src/irwinHall.js","webpack://bika.cement/./node_modules/d3-random/src/lcg.js","webpack://bika.cement/./node_modules/d3-random/src/logNormal.js","webpack://bika.cement/./node_modules/d3-random/src/logistic.js","webpack://bika.cement/./node_modules/d3-random/src/normal.js","webpack://bika.cement/./node_modules/d3-random/src/pareto.js","webpack://bika.cement/./node_modules/d3-random/src/poisson.js","webpack://bika.cement/./node_modules/d3-random/src/uniform.js","webpack://bika.cement/./node_modules/d3-random/src/weibull.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Accent.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Dark2.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Paired.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Set1.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Set2.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Set3.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/category10.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/observable10.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/colors.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/BrBG.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/PRGn.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/PiYG.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/PuOr.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/RdBu.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/RdGy.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/Spectral.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/index.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/ramp.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js","webpack://bika.cement/./node_modules/d3-scale/src/band.js","webpack://bika.cement/./node_modules/d3-scale/src/constant.js","webpack://bika.cement/./node_modules/d3-scale/src/continuous.js","webpack://bika.cement/./node_modules/d3-scale/src/diverging.js","webpack://bika.cement/./node_modules/d3-scale/src/identity.js","webpack://bika.cement/./node_modules/d3-scale/src/index.js","webpack://bika.cement/./node_modules/d3-scale/src/init.js","webpack://bika.cement/./node_modules/d3-scale/src/linear.js","webpack://bika.cement/./node_modules/d3-scale/src/log.js","webpack://bika.cement/./node_modules/d3-scale/src/nice.js","webpack://bika.cement/./node_modules/d3-scale/src/number.js","webpack://bika.cement/./node_modules/d3-scale/src/ordinal.js","webpack://bika.cement/./node_modules/d3-scale/src/pow.js","webpack://bika.cement/./node_modules/d3-scale/src/quantile.js","webpack://bika.cement/./node_modules/d3-scale/src/quantize.js","webpack://bika.cement/./node_modules/d3-scale/src/radial.js","webpack://bika.cement/./node_modules/d3-scale/src/sequential.js","webpack://bika.cement/./node_modules/d3-scale/src/sequentialQuantile.js","webpack://bika.cement/./node_modules/d3-scale/src/symlog.js","webpack://bika.cement/./node_modules/d3-scale/src/threshold.js","webpack://bika.cement/./node_modules/d3-scale/src/tickFormat.js","webpack://bika.cement/./node_modules/d3-scale/src/time.js","webpack://bika.cement/./node_modules/d3-scale/src/utcTime.js","webpack://bika.cement/./node_modules/d3-selection/src/array.js","webpack://bika.cement/./node_modules/d3-selection/src/constant.js","webpack://bika.cement/./node_modules/d3-selection/src/create.js","webpack://bika.cement/./node_modules/d3-selection/src/creator.js","webpack://bika.cement/./node_modules/d3-selection/src/index.js","webpack://bika.cement/./node_modules/d3-selection/src/local.js","webpack://bika.cement/./node_modules/d3-selection/src/matcher.js","webpack://bika.cement/./node_modules/d3-selection/src/namespace.js","webpack://bika.cement/./node_modules/d3-selection/src/namespaces.js","webpack://bika.cement/./node_modules/d3-selection/src/pointer.js","webpack://bika.cement/./node_modules/d3-selection/src/pointers.js","webpack://bika.cement/./node_modules/d3-selection/src/select.js","webpack://bika.cement/./node_modules/d3-selection/src/selectAll.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/append.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/attr.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/call.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/classed.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/clone.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/data.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/datum.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/dispatch.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/each.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/empty.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/enter.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/exit.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/filter.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/html.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/index.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/insert.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/iterator.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/join.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/lower.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/merge.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/node.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/nodes.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/on.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/order.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/property.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/raise.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/remove.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/select.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/selectAll.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/selectChild.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/selectChildren.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/size.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/sort.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/sparse.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/style.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/text.js","webpack://bika.cement/./node_modules/d3-selection/src/selector.js","webpack://bika.cement/./node_modules/d3-selection/src/selectorAll.js","webpack://bika.cement/./node_modules/d3-selection/src/sourceEvent.js","webpack://bika.cement/./node_modules/d3-selection/src/window.js","webpack://bika.cement/./node_modules/d3-shape/src/arc.js","webpack://bika.cement/./node_modules/d3-shape/src/area.js","webpack://bika.cement/./node_modules/d3-shape/src/areaRadial.js","webpack://bika.cement/./node_modules/d3-shape/src/array.js","webpack://bika.cement/./node_modules/d3-shape/src/constant.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/basis.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/basisClosed.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/basisOpen.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/bump.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/bundle.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/cardinal.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/cardinalClosed.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/cardinalOpen.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/catmullRom.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/catmullRomClosed.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/catmullRomOpen.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/linear.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/linearClosed.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/monotone.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/natural.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/radial.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/step.js","webpack://bika.cement/./node_modules/d3-shape/src/descending.js","webpack://bika.cement/./node_modules/d3-shape/src/identity.js","webpack://bika.cement/./node_modules/d3-shape/src/index.js","webpack://bika.cement/./node_modules/d3-shape/src/line.js","webpack://bika.cement/./node_modules/d3-shape/src/lineRadial.js","webpack://bika.cement/./node_modules/d3-shape/src/link.js","webpack://bika.cement/./node_modules/d3-shape/src/math.js","webpack://bika.cement/./node_modules/d3-shape/src/noop.js","webpack://bika.cement/./node_modules/d3-shape/src/offset/diverging.js","webpack://bika.cement/./node_modules/d3-shape/src/offset/expand.js","webpack://bika.cement/./node_modules/d3-shape/src/offset/none.js","webpack://bika.cement/./node_modules/d3-shape/src/offset/silhouette.js","webpack://bika.cement/./node_modules/d3-shape/src/offset/wiggle.js","webpack://bika.cement/./node_modules/d3-shape/src/order/appearance.js","webpack://bika.cement/./node_modules/d3-shape/src/order/ascending.js","webpack://bika.cement/./node_modules/d3-shape/src/order/descending.js","webpack://bika.cement/./node_modules/d3-shape/src/order/insideOut.js","webpack://bika.cement/./node_modules/d3-shape/src/order/none.js","webpack://bika.cement/./node_modules/d3-shape/src/order/reverse.js","webpack://bika.cement/./node_modules/d3-shape/src/path.js","webpack://bika.cement/./node_modules/d3-shape/src/pie.js","webpack://bika.cement/./node_modules/d3-shape/src/point.js","webpack://bika.cement/./node_modules/d3-shape/src/pointRadial.js","webpack://bika.cement/./node_modules/d3-shape/src/stack.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/asterisk.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/circle.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/cross.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/diamond.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/diamond2.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/plus.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/square.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/square2.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/star.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/times.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/triangle.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/triangle2.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/wye.js","webpack://bika.cement/./node_modules/d3-time-format/src/defaultLocale.js","webpack://bika.cement/./node_modules/d3-time-format/src/index.js","webpack://bika.cement/./node_modules/d3-time-format/src/isoFormat.js","webpack://bika.cement/./node_modules/d3-time-format/src/isoParse.js","webpack://bika.cement/./node_modules/d3-time-format/src/locale.js","webpack://bika.cement/./node_modules/d3-time/src/day.js","webpack://bika.cement/./node_modules/d3-time/src/duration.js","webpack://bika.cement/./node_modules/d3-time/src/hour.js","webpack://bika.cement/./node_modules/d3-time/src/index.js","webpack://bika.cement/./node_modules/d3-time/src/interval.js","webpack://bika.cement/./node_modules/d3-time/src/millisecond.js","webpack://bika.cement/./node_modules/d3-time/src/minute.js","webpack://bika.cement/./node_modules/d3-time/src/month.js","webpack://bika.cement/./node_modules/d3-time/src/second.js","webpack://bika.cement/./node_modules/d3-time/src/ticks.js","webpack://bika.cement/./node_modules/d3-time/src/week.js","webpack://bika.cement/./node_modules/d3-time/src/year.js","webpack://bika.cement/./node_modules/d3-timer/src/index.js","webpack://bika.cement/./node_modules/d3-timer/src/interval.js","webpack://bika.cement/./node_modules/d3-timer/src/timeout.js","webpack://bika.cement/./node_modules/d3-timer/src/timer.js","webpack://bika.cement/./node_modules/d3-transition/src/active.js","webpack://bika.cement/./node_modules/d3-transition/src/index.js","webpack://bika.cement/./node_modules/d3-transition/src/interrupt.js","webpack://bika.cement/./node_modules/d3-transition/src/selection/index.js","webpack://bika.cement/./node_modules/d3-transition/src/selection/interrupt.js","webpack://bika.cement/./node_modules/d3-transition/src/selection/transition.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/attr.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/attrTween.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/delay.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/duration.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/ease.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/easeVarying.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/end.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/filter.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/index.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/interpolate.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/merge.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/on.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/remove.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/schedule.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/select.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/selectAll.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/selection.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/style.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/styleTween.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/text.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/textTween.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/transition.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/tween.js","webpack://bika.cement/./node_modules/d3-zoom/src/constant.js","webpack://bika.cement/./node_modules/d3-zoom/src/event.js","webpack://bika.cement/./node_modules/d3-zoom/src/index.js","webpack://bika.cement/./node_modules/d3-zoom/src/noevent.js","webpack://bika.cement/./node_modules/d3-zoom/src/transform.js","webpack://bika.cement/./node_modules/d3-zoom/src/zoom.js","webpack://bika.cement/./node_modules/d3/src/index.js","webpack://bika.cement/./node_modules/delaunator/index.js","webpack://bika.cement/./node_modules/internmap/src/index.js","webpack://bika.cement/./node_modules/robust-predicates/esm/incircle.js","webpack://bika.cement/./node_modules/robust-predicates/esm/insphere.js","webpack://bika.cement/./node_modules/robust-predicates/esm/orient2d.js","webpack://bika.cement/./node_modules/robust-predicates/esm/orient3d.js","webpack://bika.cement/./node_modules/robust-predicates/esm/util.js","webpack://bika.cement/./node_modules/robust-predicates/index.js","webpack://bika.cement/webpack/bootstrap","webpack://bika.cement/webpack/runtime/define property getters","webpack://bika.cement/webpack/runtime/global","webpack://bika.cement/webpack/runtime/hasOwnProperty shorthand","webpack://bika.cement/webpack/runtime/make namespace object","webpack://bika.cement/./app/TimeSeries.coffee"],"sourcesContent":["// Generated by CoffeeScript 1.12.2\n(function() {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function(object) {\n if (!object) {\n object = root;\n }\n object.requestAnimationFrame = raf\n object.cancelAnimationFrame = caf\n}\n","/*\n\tBased on rgbcolor.js by Stoyan Stefanov \n\thttp://www.phpied.com/rgb-color-parser-in-javascript/\n*/\n\nmodule.exports = function(color_string) {\n this.ok = false;\n this.alpha = 1.0;\n\n // strip any leading #\n if (color_string.charAt(0) == '#') { // remove # if any\n color_string = color_string.substr(1,6);\n }\n\n color_string = color_string.replace(/ /g,'');\n color_string = color_string.toLowerCase();\n\n // before getting into regexps, try simple matches\n // and overwrite the input\n var simple_colors = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000000',\n blanchedalmond: 'ffebcd',\n blue: '0000ff',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '00ffff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dodgerblue: '1e90ff',\n feldspar: 'd19275',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'ff00ff',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred : 'cd5c5c',\n indigo : '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgrey: 'd3d3d3',\n lightgreen: '90ee90',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslateblue: '8470ff',\n lightslategray: '778899',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '00ff00',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'ff00ff',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370d8',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'd87093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '663399',\n red: 'ff0000',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n violetred: 'd02090',\n wheat: 'f5deb3',\n white: 'ffffff',\n whitesmoke: 'f5f5f5',\n yellow: 'ffff00',\n yellowgreen: '9acd32'\n };\n color_string = simple_colors[color_string] || color_string;\n // emd of simple type-in colors\n\n // array of color definition objects\n var color_defs = [\n {\n re: /^rgba\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3}),\\s*((?:\\d?\\.)?\\d)\\)$/,\n example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],\n process: function (bits){\n return [\n parseInt(bits[1]),\n parseInt(bits[2]),\n parseInt(bits[3]),\n parseFloat(bits[4])\n ];\n }\n },\n {\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],\n process: function (bits){\n return [\n parseInt(bits[1]),\n parseInt(bits[2]),\n parseInt(bits[3])\n ];\n }\n },\n {\n re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n example: ['#00ff00', '336699'],\n process: function (bits){\n return [\n parseInt(bits[1], 16),\n parseInt(bits[2], 16),\n parseInt(bits[3], 16)\n ];\n }\n },\n {\n re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n example: ['#fb0', 'f0f'],\n process: function (bits){\n return [\n parseInt(bits[1] + bits[1], 16),\n parseInt(bits[2] + bits[2], 16),\n parseInt(bits[3] + bits[3], 16)\n ];\n }\n }\n ];\n\n // search through the definitions to find a match\n for (var i = 0; i < color_defs.length; i++) {\n var re = color_defs[i].re;\n var processor = color_defs[i].process;\n var bits = re.exec(color_string);\n if (bits) {\n var channels = processor(bits);\n this.r = channels[0];\n this.g = channels[1];\n this.b = channels[2];\n if (channels.length > 3) {\n this.alpha = channels[3];\n }\n this.ok = true;\n }\n\n }\n\n // validate/cleanup values\n this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);\n this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);\n this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);\n this.alpha = (this.alpha < 0) ? 0 : ((this.alpha > 1.0 || isNaN(this.alpha)) ? 1.0 : this.alpha);\n\n // some getters\n this.toRGB = function () {\n return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';\n }\n this.toRGBA = function () {\n return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';\n }\n this.toHex = function () {\n var r = this.r.toString(16);\n var g = this.g.toString(16);\n var b = this.b.toString(16);\n if (r.length == 1) r = '0' + r;\n if (g.length == 1) g = '0' + g;\n if (b.length == 1) b = '0' + b;\n return '#' + r + g + b;\n }\n\n // help\n this.getHelpXML = function () {\n\n var examples = new Array();\n // add regexps\n for (var i = 0; i < color_defs.length; i++) {\n var example = color_defs[i].example;\n for (var j = 0; j < example.length; j++) {\n examples[examples.length] = example[j];\n }\n }\n // add type-in colors\n for (var sc in simple_colors) {\n examples[examples.length] = sc;\n }\n\n var xml = document.createElement('ul');\n xml.setAttribute('id', 'rgbcolor-examples');\n for (var i = 0; i < examples.length; i++) {\n try {\n var list_item = document.createElement('li');\n var list_color = new RGBColor(examples[i]);\n var example_div = document.createElement('div');\n example_div.style.cssText =\n 'margin: 3px; '\n + 'border: 1px solid black; '\n + 'background:' + list_color.toHex() + '; '\n + 'color:' + list_color.toHex()\n ;\n example_div.appendChild(document.createTextNode('test'));\n var list_item_value = document.createTextNode(\n ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()\n );\n list_item.appendChild(example_div);\n list_item.appendChild(list_item_value);\n xml.appendChild(list_item);\n\n } catch(e){}\n }\n return xml;\n\n }\n\n}\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\n/* eslint-disable no-bitwise -- used for calculations */\n\n/* eslint-disable unicorn/prefer-query-selector -- aiming at\n backward-compatibility */\n\n/**\n* StackBlur - a fast almost Gaussian Blur For Canvas\n*\n* In case you find this class useful - especially in commercial projects -\n* I am not totally unhappy for a small donation to my PayPal account\n* mario@quasimondo.de\n*\n* Or support me on flattr:\n* {@link https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript}.\n*\n* @module StackBlur\n* @author Mario Klingemann\n* Contact: mario@quasimondo.com\n* Website: {@link http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html}\n* Twitter: @quasimondo\n*\n* @copyright (c) 2010 Mario Klingemann\n*\n* Permission is hereby granted, free of charge, to any person\n* obtaining a copy of this software and associated documentation\n* files (the \"Software\"), to deal in the Software without\n* restriction, including without limitation the rights to use,\n* copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the\n* Software is furnished to do so, subject to the following\n* conditions:\n*\n* The above copyright notice and this permission notice shall be\n* included in all copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n* OTHER DEALINGS IN THE SOFTWARE.\n*/\nvar mulTable = [512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456, 451, 446, 442, 437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388, 385, 381, 377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335, 332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292, 289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259];\nvar shgTable = [9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24];\n/**\n * @param {string|HTMLImageElement} img\n * @param {string|HTMLCanvasElement} canvas\n * @param {Float} radius\n * @param {boolean} blurAlphaChannel\n * @param {boolean} useOffset\n * @param {boolean} skipStyles\n * @returns {undefined}\n */\n\nfunction processImage(img, canvas, radius, blurAlphaChannel, useOffset, skipStyles) {\n if (typeof img === 'string') {\n img = document.getElementById(img);\n }\n\n if (!img || Object.prototype.toString.call(img).slice(8, -1) === 'HTMLImageElement' && !('naturalWidth' in img)) {\n return;\n }\n\n var dimensionType = useOffset ? 'offset' : 'natural';\n var w = img[dimensionType + 'Width'];\n var h = img[dimensionType + 'Height']; // add ImageBitmap support,can blur texture source\n\n if (Object.prototype.toString.call(img).slice(8, -1) === 'ImageBitmap') {\n w = img.width;\n h = img.height;\n }\n\n if (typeof canvas === 'string') {\n canvas = document.getElementById(canvas);\n }\n\n if (!canvas || !('getContext' in canvas)) {\n return;\n }\n\n if (!skipStyles) {\n canvas.style.width = w + 'px';\n canvas.style.height = h + 'px';\n }\n\n canvas.width = w;\n canvas.height = h;\n var context = canvas.getContext('2d');\n context.clearRect(0, 0, w, h);\n context.drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight, 0, 0, w, h);\n\n if (isNaN(radius) || radius < 1) {\n return;\n }\n\n if (blurAlphaChannel) {\n processCanvasRGBA(canvas, 0, 0, w, h, radius);\n } else {\n processCanvasRGB(canvas, 0, 0, w, h, radius);\n }\n}\n/**\n * @param {string|HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @throws {Error|TypeError}\n * @returns {ImageData} See {@link https://html.spec.whatwg.org/multipage/canvas.html#imagedata}\n */\n\n\nfunction getImageDataFromCanvas(canvas, topX, topY, width, height) {\n if (typeof canvas === 'string') {\n canvas = document.getElementById(canvas);\n }\n\n if (!canvas || _typeof(canvas) !== 'object' || !('getContext' in canvas)) {\n throw new TypeError('Expecting canvas with `getContext` method ' + 'in processCanvasRGB(A) calls!');\n }\n\n var context = canvas.getContext('2d');\n\n try {\n return context.getImageData(topX, topY, width, height);\n } catch (e) {\n throw new Error('unable to access image data: ' + e);\n }\n}\n/**\n * @param {HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {undefined}\n */\n\n\nfunction processCanvasRGBA(canvas, topX, topY, width, height, radius) {\n if (isNaN(radius) || radius < 1) {\n return;\n }\n\n radius |= 0;\n var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);\n imageData = processImageDataRGBA(imageData, topX, topY, width, height, radius);\n canvas.getContext('2d').putImageData(imageData, topX, topY);\n}\n/**\n * @param {ImageData} imageData\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {ImageData}\n */\n\n\nfunction processImageDataRGBA(imageData, topX, topY, width, height, radius) {\n var pixels = imageData.data;\n var div = 2 * radius + 1; // const w4 = width << 2;\n\n var widthMinus1 = width - 1;\n var heightMinus1 = height - 1;\n var radiusPlus1 = radius + 1;\n var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;\n var stackStart = new BlurStack();\n var stack = stackStart;\n var stackEnd;\n\n for (var i = 1; i < div; i++) {\n stack = stack.next = new BlurStack();\n\n if (i === radiusPlus1) {\n stackEnd = stack;\n }\n }\n\n stack.next = stackStart;\n var stackIn = null,\n stackOut = null,\n yw = 0,\n yi = 0;\n var mulSum = mulTable[radius];\n var shgSum = shgTable[radius];\n\n for (var y = 0; y < height; y++) {\n stack = stackStart;\n var pr = pixels[yi],\n pg = pixels[yi + 1],\n pb = pixels[yi + 2],\n pa = pixels[yi + 3];\n\n for (var _i = 0; _i < radiusPlus1; _i++) {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack.a = pa;\n stack = stack.next;\n }\n\n var rInSum = 0,\n gInSum = 0,\n bInSum = 0,\n aInSum = 0,\n rOutSum = radiusPlus1 * pr,\n gOutSum = radiusPlus1 * pg,\n bOutSum = radiusPlus1 * pb,\n aOutSum = radiusPlus1 * pa,\n rSum = sumFactor * pr,\n gSum = sumFactor * pg,\n bSum = sumFactor * pb,\n aSum = sumFactor * pa;\n\n for (var _i2 = 1; _i2 < radiusPlus1; _i2++) {\n var p = yi + ((widthMinus1 < _i2 ? widthMinus1 : _i2) << 2);\n var r = pixels[p],\n g = pixels[p + 1],\n b = pixels[p + 2],\n a = pixels[p + 3];\n var rbs = radiusPlus1 - _i2;\n rSum += (stack.r = r) * rbs;\n gSum += (stack.g = g) * rbs;\n bSum += (stack.b = b) * rbs;\n aSum += (stack.a = a) * rbs;\n rInSum += r;\n gInSum += g;\n bInSum += b;\n aInSum += a;\n stack = stack.next;\n }\n\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var x = 0; x < width; x++) {\n var paInitial = aSum * mulSum >>> shgSum;\n pixels[yi + 3] = paInitial;\n\n if (paInitial !== 0) {\n var _a2 = 255 / paInitial;\n\n pixels[yi] = (rSum * mulSum >>> shgSum) * _a2;\n pixels[yi + 1] = (gSum * mulSum >>> shgSum) * _a2;\n pixels[yi + 2] = (bSum * mulSum >>> shgSum) * _a2;\n } else {\n pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;\n }\n\n rSum -= rOutSum;\n gSum -= gOutSum;\n bSum -= bOutSum;\n aSum -= aOutSum;\n rOutSum -= stackIn.r;\n gOutSum -= stackIn.g;\n bOutSum -= stackIn.b;\n aOutSum -= stackIn.a;\n\n var _p = x + radius + 1;\n\n _p = yw + (_p < widthMinus1 ? _p : widthMinus1) << 2;\n rInSum += stackIn.r = pixels[_p];\n gInSum += stackIn.g = pixels[_p + 1];\n bInSum += stackIn.b = pixels[_p + 2];\n aInSum += stackIn.a = pixels[_p + 3];\n rSum += rInSum;\n gSum += gInSum;\n bSum += bInSum;\n aSum += aInSum;\n stackIn = stackIn.next;\n var _stackOut = stackOut,\n _r = _stackOut.r,\n _g = _stackOut.g,\n _b = _stackOut.b,\n _a = _stackOut.a;\n rOutSum += _r;\n gOutSum += _g;\n bOutSum += _b;\n aOutSum += _a;\n rInSum -= _r;\n gInSum -= _g;\n bInSum -= _b;\n aInSum -= _a;\n stackOut = stackOut.next;\n yi += 4;\n }\n\n yw += width;\n }\n\n for (var _x = 0; _x < width; _x++) {\n yi = _x << 2;\n\n var _pr = pixels[yi],\n _pg = pixels[yi + 1],\n _pb = pixels[yi + 2],\n _pa = pixels[yi + 3],\n _rOutSum = radiusPlus1 * _pr,\n _gOutSum = radiusPlus1 * _pg,\n _bOutSum = radiusPlus1 * _pb,\n _aOutSum = radiusPlus1 * _pa,\n _rSum = sumFactor * _pr,\n _gSum = sumFactor * _pg,\n _bSum = sumFactor * _pb,\n _aSum = sumFactor * _pa;\n\n stack = stackStart;\n\n for (var _i3 = 0; _i3 < radiusPlus1; _i3++) {\n stack.r = _pr;\n stack.g = _pg;\n stack.b = _pb;\n stack.a = _pa;\n stack = stack.next;\n }\n\n var yp = width;\n var _gInSum = 0,\n _bInSum = 0,\n _aInSum = 0,\n _rInSum = 0;\n\n for (var _i4 = 1; _i4 <= radius; _i4++) {\n yi = yp + _x << 2;\n\n var _rbs = radiusPlus1 - _i4;\n\n _rSum += (stack.r = _pr = pixels[yi]) * _rbs;\n _gSum += (stack.g = _pg = pixels[yi + 1]) * _rbs;\n _bSum += (stack.b = _pb = pixels[yi + 2]) * _rbs;\n _aSum += (stack.a = _pa = pixels[yi + 3]) * _rbs;\n _rInSum += _pr;\n _gInSum += _pg;\n _bInSum += _pb;\n _aInSum += _pa;\n stack = stack.next;\n\n if (_i4 < heightMinus1) {\n yp += width;\n }\n }\n\n yi = _x;\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var _y = 0; _y < height; _y++) {\n var _p2 = yi << 2;\n\n pixels[_p2 + 3] = _pa = _aSum * mulSum >>> shgSum;\n\n if (_pa > 0) {\n _pa = 255 / _pa;\n pixels[_p2] = (_rSum * mulSum >>> shgSum) * _pa;\n pixels[_p2 + 1] = (_gSum * mulSum >>> shgSum) * _pa;\n pixels[_p2 + 2] = (_bSum * mulSum >>> shgSum) * _pa;\n } else {\n pixels[_p2] = pixels[_p2 + 1] = pixels[_p2 + 2] = 0;\n }\n\n _rSum -= _rOutSum;\n _gSum -= _gOutSum;\n _bSum -= _bOutSum;\n _aSum -= _aOutSum;\n _rOutSum -= stackIn.r;\n _gOutSum -= stackIn.g;\n _bOutSum -= stackIn.b;\n _aOutSum -= stackIn.a;\n _p2 = _x + ((_p2 = _y + radiusPlus1) < heightMinus1 ? _p2 : heightMinus1) * width << 2;\n _rSum += _rInSum += stackIn.r = pixels[_p2];\n _gSum += _gInSum += stackIn.g = pixels[_p2 + 1];\n _bSum += _bInSum += stackIn.b = pixels[_p2 + 2];\n _aSum += _aInSum += stackIn.a = pixels[_p2 + 3];\n stackIn = stackIn.next;\n _rOutSum += _pr = stackOut.r;\n _gOutSum += _pg = stackOut.g;\n _bOutSum += _pb = stackOut.b;\n _aOutSum += _pa = stackOut.a;\n _rInSum -= _pr;\n _gInSum -= _pg;\n _bInSum -= _pb;\n _aInSum -= _pa;\n stackOut = stackOut.next;\n yi += width;\n }\n }\n\n return imageData;\n}\n/**\n * @param {HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {undefined}\n */\n\n\nfunction processCanvasRGB(canvas, topX, topY, width, height, radius) {\n if (isNaN(radius) || radius < 1) {\n return;\n }\n\n radius |= 0;\n var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);\n imageData = processImageDataRGB(imageData, topX, topY, width, height, radius);\n canvas.getContext('2d').putImageData(imageData, topX, topY);\n}\n/**\n * @param {ImageData} imageData\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {ImageData}\n */\n\n\nfunction processImageDataRGB(imageData, topX, topY, width, height, radius) {\n var pixels = imageData.data;\n var div = 2 * radius + 1; // const w4 = width << 2;\n\n var widthMinus1 = width - 1;\n var heightMinus1 = height - 1;\n var radiusPlus1 = radius + 1;\n var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;\n var stackStart = new BlurStack();\n var stack = stackStart;\n var stackEnd;\n\n for (var i = 1; i < div; i++) {\n stack = stack.next = new BlurStack();\n\n if (i === radiusPlus1) {\n stackEnd = stack;\n }\n }\n\n stack.next = stackStart;\n var stackIn = null;\n var stackOut = null;\n var mulSum = mulTable[radius];\n var shgSum = shgTable[radius];\n var p, rbs;\n var yw = 0,\n yi = 0;\n\n for (var y = 0; y < height; y++) {\n var pr = pixels[yi],\n pg = pixels[yi + 1],\n pb = pixels[yi + 2],\n rOutSum = radiusPlus1 * pr,\n gOutSum = radiusPlus1 * pg,\n bOutSum = radiusPlus1 * pb,\n rSum = sumFactor * pr,\n gSum = sumFactor * pg,\n bSum = sumFactor * pb;\n stack = stackStart;\n\n for (var _i5 = 0; _i5 < radiusPlus1; _i5++) {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack = stack.next;\n }\n\n var rInSum = 0,\n gInSum = 0,\n bInSum = 0;\n\n for (var _i6 = 1; _i6 < radiusPlus1; _i6++) {\n p = yi + ((widthMinus1 < _i6 ? widthMinus1 : _i6) << 2);\n rSum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - _i6);\n gSum += (stack.g = pg = pixels[p + 1]) * rbs;\n bSum += (stack.b = pb = pixels[p + 2]) * rbs;\n rInSum += pr;\n gInSum += pg;\n bInSum += pb;\n stack = stack.next;\n }\n\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var x = 0; x < width; x++) {\n pixels[yi] = rSum * mulSum >>> shgSum;\n pixels[yi + 1] = gSum * mulSum >>> shgSum;\n pixels[yi + 2] = bSum * mulSum >>> shgSum;\n rSum -= rOutSum;\n gSum -= gOutSum;\n bSum -= bOutSum;\n rOutSum -= stackIn.r;\n gOutSum -= stackIn.g;\n bOutSum -= stackIn.b;\n p = yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1) << 2;\n rInSum += stackIn.r = pixels[p];\n gInSum += stackIn.g = pixels[p + 1];\n bInSum += stackIn.b = pixels[p + 2];\n rSum += rInSum;\n gSum += gInSum;\n bSum += bInSum;\n stackIn = stackIn.next;\n rOutSum += pr = stackOut.r;\n gOutSum += pg = stackOut.g;\n bOutSum += pb = stackOut.b;\n rInSum -= pr;\n gInSum -= pg;\n bInSum -= pb;\n stackOut = stackOut.next;\n yi += 4;\n }\n\n yw += width;\n }\n\n for (var _x2 = 0; _x2 < width; _x2++) {\n yi = _x2 << 2;\n\n var _pr2 = pixels[yi],\n _pg2 = pixels[yi + 1],\n _pb2 = pixels[yi + 2],\n _rOutSum2 = radiusPlus1 * _pr2,\n _gOutSum2 = radiusPlus1 * _pg2,\n _bOutSum2 = radiusPlus1 * _pb2,\n _rSum2 = sumFactor * _pr2,\n _gSum2 = sumFactor * _pg2,\n _bSum2 = sumFactor * _pb2;\n\n stack = stackStart;\n\n for (var _i7 = 0; _i7 < radiusPlus1; _i7++) {\n stack.r = _pr2;\n stack.g = _pg2;\n stack.b = _pb2;\n stack = stack.next;\n }\n\n var _rInSum2 = 0,\n _gInSum2 = 0,\n _bInSum2 = 0;\n\n for (var _i8 = 1, yp = width; _i8 <= radius; _i8++) {\n yi = yp + _x2 << 2;\n _rSum2 += (stack.r = _pr2 = pixels[yi]) * (rbs = radiusPlus1 - _i8);\n _gSum2 += (stack.g = _pg2 = pixels[yi + 1]) * rbs;\n _bSum2 += (stack.b = _pb2 = pixels[yi + 2]) * rbs;\n _rInSum2 += _pr2;\n _gInSum2 += _pg2;\n _bInSum2 += _pb2;\n stack = stack.next;\n\n if (_i8 < heightMinus1) {\n yp += width;\n }\n }\n\n yi = _x2;\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var _y2 = 0; _y2 < height; _y2++) {\n p = yi << 2;\n pixels[p] = _rSum2 * mulSum >>> shgSum;\n pixels[p + 1] = _gSum2 * mulSum >>> shgSum;\n pixels[p + 2] = _bSum2 * mulSum >>> shgSum;\n _rSum2 -= _rOutSum2;\n _gSum2 -= _gOutSum2;\n _bSum2 -= _bOutSum2;\n _rOutSum2 -= stackIn.r;\n _gOutSum2 -= stackIn.g;\n _bOutSum2 -= stackIn.b;\n p = _x2 + ((p = _y2 + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width << 2;\n _rSum2 += _rInSum2 += stackIn.r = pixels[p];\n _gSum2 += _gInSum2 += stackIn.g = pixels[p + 1];\n _bSum2 += _bInSum2 += stackIn.b = pixels[p + 2];\n stackIn = stackIn.next;\n _rOutSum2 += _pr2 = stackOut.r;\n _gOutSum2 += _pg2 = stackOut.g;\n _bOutSum2 += _pb2 = stackOut.b;\n _rInSum2 -= _pr2;\n _gInSum2 -= _pg2;\n _bInSum2 -= _pb2;\n stackOut = stackOut.next;\n yi += width;\n }\n }\n\n return imageData;\n}\n/**\n *\n */\n\n\nvar BlurStack =\n/**\n * Set properties.\n */\nfunction BlurStack() {\n _classCallCheck(this, BlurStack);\n\n this.r = 0;\n this.g = 0;\n this.b = 0;\n this.a = 0;\n this.next = null;\n};\n\nexport { BlurStack, processCanvasRGB as canvasRGB, processCanvasRGBA as canvasRGBA, processImage as image, processImageDataRGB as imageDataRGB, processImageDataRGBA as imageDataRGBA };\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar requestAnimationFrame = require('raf');\nvar RGBColor = require('rgbcolor');\nvar svgPathdata = require('svg-pathdata');\nvar stackblurCanvas = require('stackblur-canvas');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nvar requestAnimationFrame__default = /*#__PURE__*/_interopDefaultLegacy(requestAnimationFrame);\nvar RGBColor__default = /*#__PURE__*/_interopDefaultLegacy(RGBColor);\n\n/**\n * Options preset for `OffscreenCanvas`.\n * @param config - Preset requirements.\n * @param config.DOMParser - XML/HTML parser from string into DOM Document.\n * @returns Preset object.\n */ function offscreen() {\n let { DOMParser: DOMParserFallback } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n const preset = {\n window: null,\n ignoreAnimation: true,\n ignoreMouse: true,\n DOMParser: DOMParserFallback,\n createCanvas (width, height) {\n return new OffscreenCanvas(width, height);\n },\n async createImage (url) {\n const response = await fetch(url);\n const blob = await response.blob();\n const img = await createImageBitmap(blob);\n return img;\n }\n };\n if (typeof globalThis.DOMParser !== 'undefined' || typeof DOMParserFallback === 'undefined') {\n Reflect.deleteProperty(preset, 'DOMParser');\n }\n return preset;\n}\n\n/**\n * Options preset for `node-canvas`.\n * @param config - Preset requirements.\n * @param config.DOMParser - XML/HTML parser from string into DOM Document.\n * @param config.canvas - `node-canvas` exports.\n * @param config.fetch - WHATWG-compatible `fetch` function.\n * @returns Preset object.\n */ function node(param) {\n let { DOMParser , canvas , fetch } = param;\n return {\n window: null,\n ignoreAnimation: true,\n ignoreMouse: true,\n DOMParser,\n fetch,\n createCanvas: canvas.createCanvas,\n createImage: canvas.loadImage\n };\n}\n\nvar index = /*#__PURE__*/Object.freeze({\n __proto__: null,\n offscreen: offscreen,\n node: node\n});\n\n/**\n * HTML-safe compress white-spaces.\n * @param str - String to compress.\n * @returns String.\n */ function compressSpaces(str) {\n return str.replace(/(?!\\u3000)\\s+/gm, ' ');\n}\n/**\n * HTML-safe left trim.\n * @param str - String to trim.\n * @returns String.\n */ function trimLeft(str) {\n return str.replace(/^[\\n \\t]+/, '');\n}\n/**\n * HTML-safe right trim.\n * @param str - String to trim.\n * @returns String.\n */ function trimRight(str) {\n return str.replace(/[\\n \\t]+$/, '');\n}\n/**\n * String to numbers array.\n * @param str - Numbers string.\n * @returns Numbers array.\n */ function toNumbers(str) {\n const matches = str.match(/-?(\\d+(?:\\.\\d*(?:[eE][+-]?\\d+)?)?|\\.\\d+)(?=\\D|$)/gm);\n return matches ? matches.map(parseFloat) : [];\n}\n/**\n * String to matrix value.\n * @param str - Numbers string.\n * @returns Matrix value.\n */ function toMatrixValue(str) {\n const numbers = toNumbers(str);\n const matrix = [\n numbers[0] || 0,\n numbers[1] || 0,\n numbers[2] || 0,\n numbers[3] || 0,\n numbers[4] || 0,\n numbers[5] || 0\n ];\n return matrix;\n}\n// Microsoft Edge fix\nconst allUppercase = /^[A-Z-]+$/;\n/**\n * Normalize attribute name.\n * @param name - Attribute name.\n * @returns Normalized attribute name.\n */ function normalizeAttributeName(name) {\n if (allUppercase.test(name)) {\n return name.toLowerCase();\n }\n return name;\n}\n/**\n * Parse external URL.\n * @param url - CSS url string.\n * @returns Parsed URL.\n */ function parseExternalUrl(url) {\n // single quotes [2]\n // v double quotes [3]\n // v v no quotes [4]\n // v v v\n const urlMatch = /url\\(('([^']+)'|\"([^\"]+)\"|([^'\")]+))\\)/.exec(url);\n if (!urlMatch) {\n return '';\n }\n return urlMatch[2] || urlMatch[3] || urlMatch[4] || '';\n}\n/**\n * Transform floats to integers in rgb colors.\n * @param color - Color to normalize.\n * @returns Normalized color.\n */ function normalizeColor(color) {\n if (!color.startsWith('rgb')) {\n return color;\n }\n let rgbParts = 3;\n const normalizedColor = color.replace(/\\d+(\\.\\d+)?/g, (num, isFloat)=>(rgbParts--) && isFloat ? String(Math.round(parseFloat(num))) : num\n );\n return normalizedColor;\n}\n\n// slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js\nconst attributeRegex = /(\\[[^\\]]+\\])/g;\nconst idRegex = /(#[^\\s+>~.[:]+)/g;\nconst classRegex = /(\\.[^\\s+>~.[:]+)/g;\nconst pseudoElementRegex = /(::[^\\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi;\nconst pseudoClassWithBracketsRegex = /(:[\\w-]+\\([^)]*\\))/gi;\nconst pseudoClassRegex = /(:[^\\s+>~.[:]+)/g;\nconst elementRegex = /([^\\s+>~.[:]+)/g;\nfunction findSelectorMatch(selector, regex) {\n const matches = regex.exec(selector);\n if (!matches) {\n return [\n selector,\n 0\n ];\n }\n return [\n selector.replace(regex, ' '),\n matches.length\n ];\n}\n/**\n * Measure selector specificity.\n * @param selector - Selector to measure.\n * @returns Specificity.\n */ function getSelectorSpecificity(selector) {\n const specificity = [\n 0,\n 0,\n 0\n ];\n let currentSelector = selector.replace(/:not\\(([^)]*)\\)/g, ' $1 ').replace(/{[\\s\\S]*/gm, ' ');\n let delta = 0;\n [currentSelector, delta] = findSelectorMatch(currentSelector, attributeRegex);\n specificity[1] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, idRegex);\n specificity[0] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, classRegex);\n specificity[1] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoElementRegex);\n specificity[2] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoClassWithBracketsRegex);\n specificity[1] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoClassRegex);\n specificity[1] += delta;\n currentSelector = currentSelector.replace(/[*\\s+>~]/g, ' ').replace(/[#.]/g, ' ');\n [currentSelector, delta] = findSelectorMatch(currentSelector, elementRegex) // lgtm [js/useless-assignment-to-local]\n ;\n specificity[2] += delta;\n return specificity.join('');\n}\n\nconst PSEUDO_ZERO = 0.00000001;\n/**\n * Vector magnitude.\n * @param v\n * @returns Number result.\n */ function vectorMagnitude(v) {\n return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));\n}\n/**\n * Ratio between two vectors.\n * @param u\n * @param v\n * @returns Number result.\n */ function vectorsRatio(u, v) {\n return (u[0] * v[0] + u[1] * v[1]) / (vectorMagnitude(u) * vectorMagnitude(v));\n}\n/**\n * Angle between two vectors.\n * @param u\n * @param v\n * @returns Number result.\n */ function vectorsAngle(u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vectorsRatio(u, v));\n}\nfunction CB1(t) {\n return t * t * t;\n}\nfunction CB2(t) {\n return 3 * t * t * (1 - t);\n}\nfunction CB3(t) {\n return 3 * t * (1 - t) * (1 - t);\n}\nfunction CB4(t) {\n return (1 - t) * (1 - t) * (1 - t);\n}\nfunction QB1(t) {\n return t * t;\n}\nfunction QB2(t) {\n return 2 * t * (1 - t);\n}\nfunction QB3(t) {\n return (1 - t) * (1 - t);\n}\n\nclass Property {\n static empty(document) {\n return new Property(document, 'EMPTY', '');\n }\n split() {\n let separator = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ' ';\n const { document , name } = this;\n return compressSpaces(this.getString()).trim().split(separator).map((value)=>new Property(document, name, value)\n );\n }\n hasValue(zeroIsValue) {\n const value = this.value;\n return value !== null && value !== '' && (zeroIsValue || value !== 0) && typeof value !== 'undefined';\n }\n isString(regexp) {\n const { value } = this;\n const result = typeof value === 'string';\n if (!result || !regexp) {\n return result;\n }\n return regexp.test(value);\n }\n isUrlDefinition() {\n return this.isString(/^url\\(/);\n }\n isPixels() {\n if (!this.hasValue()) {\n return false;\n }\n const asString = this.getString();\n switch(true){\n case asString.endsWith('px'):\n case /^[0-9]+$/.test(asString):\n return true;\n default:\n return false;\n }\n }\n setValue(value) {\n this.value = value;\n return this;\n }\n getValue(def) {\n if (typeof def === 'undefined' || this.hasValue()) {\n return this.value;\n }\n return def;\n }\n getNumber(def) {\n if (!this.hasValue()) {\n if (typeof def === 'undefined') {\n return 0;\n }\n // @ts-expect-error Parse unknown value.\n return parseFloat(def);\n }\n const { value } = this;\n // @ts-expect-error Parse unknown value.\n let n = parseFloat(value);\n if (this.isString(/%$/)) {\n n /= 100;\n }\n return n;\n }\n getString(def) {\n if (typeof def === 'undefined' || this.hasValue()) {\n return typeof this.value === 'undefined' ? '' : String(this.value);\n }\n return String(def);\n }\n getColor(def) {\n let color = this.getString(def);\n if (this.isNormalizedColor) {\n return color;\n }\n this.isNormalizedColor = true;\n color = normalizeColor(color);\n this.value = color;\n return color;\n }\n getDpi() {\n return 96 // TODO: compute?\n ;\n }\n getRem() {\n return this.document.rootEmSize;\n }\n getEm() {\n return this.document.emSize;\n }\n getUnits() {\n return this.getString().replace(/[0-9.-]/g, '');\n }\n getPixels(axisOrIsFontSize) {\n let processPercent = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n if (!this.hasValue()) {\n return 0;\n }\n const [axis, isFontSize] = typeof axisOrIsFontSize === 'boolean' ? [\n undefined,\n axisOrIsFontSize\n ] : [\n axisOrIsFontSize\n ];\n const { viewPort } = this.document.screen;\n switch(true){\n case this.isString(/vmin$/):\n return this.getNumber() / 100 * Math.min(viewPort.computeSize('x'), viewPort.computeSize('y'));\n case this.isString(/vmax$/):\n return this.getNumber() / 100 * Math.max(viewPort.computeSize('x'), viewPort.computeSize('y'));\n case this.isString(/vw$/):\n return this.getNumber() / 100 * viewPort.computeSize('x');\n case this.isString(/vh$/):\n return this.getNumber() / 100 * viewPort.computeSize('y');\n case this.isString(/rem$/):\n return this.getNumber() * this.getRem();\n case this.isString(/em$/):\n return this.getNumber() * this.getEm();\n case this.isString(/ex$/):\n return this.getNumber() * this.getEm() / 2;\n case this.isString(/px$/):\n return this.getNumber();\n case this.isString(/pt$/):\n return this.getNumber() * this.getDpi() * (1 / 72);\n case this.isString(/pc$/):\n return this.getNumber() * 15;\n case this.isString(/cm$/):\n return this.getNumber() * this.getDpi() / 2.54;\n case this.isString(/mm$/):\n return this.getNumber() * this.getDpi() / 25.4;\n case this.isString(/in$/):\n return this.getNumber() * this.getDpi();\n case this.isString(/%$/) && isFontSize:\n return this.getNumber() * this.getEm();\n case this.isString(/%$/):\n return this.getNumber() * viewPort.computeSize(axis);\n default:\n {\n const n = this.getNumber();\n if (processPercent && n < 1) {\n return n * viewPort.computeSize(axis);\n }\n return n;\n }\n }\n }\n getMilliseconds() {\n if (!this.hasValue()) {\n return 0;\n }\n if (this.isString(/ms$/)) {\n return this.getNumber();\n }\n return this.getNumber() * 1000;\n }\n getRadians() {\n if (!this.hasValue()) {\n return 0;\n }\n switch(true){\n case this.isString(/deg$/):\n return this.getNumber() * (Math.PI / 180);\n case this.isString(/grad$/):\n return this.getNumber() * (Math.PI / 200);\n case this.isString(/rad$/):\n return this.getNumber();\n default:\n return this.getNumber() * (Math.PI / 180);\n }\n }\n getDefinition() {\n const asString = this.getString();\n const match = /#([^)'\"]+)/.exec(asString);\n const name = (match === null || match === void 0 ? void 0 : match[1]) || asString;\n return this.document.definitions[name];\n }\n getFillStyleDefinition(element, opacity) {\n let def = this.getDefinition();\n if (!def) {\n return null;\n }\n // gradient\n if (typeof def.createGradient === 'function' && 'getBoundingBox' in element) {\n return def.createGradient(this.document.ctx, element, opacity);\n }\n // pattern\n if (typeof def.createPattern === 'function') {\n if (def.getHrefAttribute().hasValue()) {\n const patternTransform = def.getAttribute('patternTransform');\n def = def.getHrefAttribute().getDefinition();\n if (def && patternTransform.hasValue()) {\n def.getAttribute('patternTransform', true).setValue(patternTransform.value);\n }\n }\n if (def) {\n return def.createPattern(this.document.ctx, element, opacity);\n }\n }\n return null;\n }\n getTextBaseline() {\n if (!this.hasValue()) {\n return null;\n }\n const key = this.getString();\n return Property.textBaselineMapping[key] || null;\n }\n addOpacity(opacity) {\n let value = this.getColor();\n const len = value.length;\n let commas = 0;\n // Simulate old RGBColor version, which can't parse rgba.\n for(let i = 0; i < len; i++){\n if (value[i] === ',') {\n commas++;\n }\n if (commas === 3) {\n break;\n }\n }\n if (opacity.hasValue() && this.isString() && commas !== 3) {\n const color = new RGBColor__default[\"default\"](value);\n if (color.ok) {\n color.alpha = opacity.getNumber();\n value = color.toRGBA();\n }\n }\n return new Property(this.document, this.name, value);\n }\n constructor(document, name, value){\n this.document = document;\n this.name = name;\n this.value = value;\n this.isNormalizedColor = false;\n }\n}\nProperty.textBaselineMapping = {\n 'baseline': 'alphabetic',\n 'before-edge': 'top',\n 'text-before-edge': 'top',\n 'middle': 'middle',\n 'central': 'middle',\n 'after-edge': 'bottom',\n 'text-after-edge': 'bottom',\n 'ideographic': 'ideographic',\n 'alphabetic': 'alphabetic',\n 'hanging': 'hanging',\n 'mathematical': 'alphabetic'\n};\n\nclass ViewPort {\n clear() {\n this.viewPorts = [];\n }\n setCurrent(width, height) {\n this.viewPorts.push({\n width,\n height\n });\n }\n removeCurrent() {\n this.viewPorts.pop();\n }\n getRoot() {\n const [root] = this.viewPorts;\n if (!root) {\n return getDefault();\n }\n return root;\n }\n getCurrent() {\n const { viewPorts } = this;\n const current = viewPorts[viewPorts.length - 1];\n if (!current) {\n return getDefault();\n }\n return current;\n }\n get width() {\n return this.getCurrent().width;\n }\n get height() {\n return this.getCurrent().height;\n }\n computeSize(d) {\n if (typeof d === 'number') {\n return d;\n }\n if (d === 'x') {\n return this.width;\n }\n if (d === 'y') {\n return this.height;\n }\n return Math.sqrt(Math.pow(this.width, 2) + Math.pow(this.height, 2)) / Math.sqrt(2);\n }\n constructor(){\n this.viewPorts = [];\n }\n}\nViewPort.DEFAULT_VIEWPORT_WIDTH = 800;\nViewPort.DEFAULT_VIEWPORT_HEIGHT = 600;\nfunction getDefault() {\n return {\n width: ViewPort.DEFAULT_VIEWPORT_WIDTH,\n height: ViewPort.DEFAULT_VIEWPORT_HEIGHT\n };\n}\n\nclass Point {\n static parse(point) {\n let defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;\n const [x = defaultValue, y = defaultValue] = toNumbers(point);\n return new Point(x, y);\n }\n static parseScale(scale) {\n let defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;\n const [x = defaultValue, y = x] = toNumbers(scale);\n return new Point(x, y);\n }\n static parsePath(path) {\n const points = toNumbers(path);\n const len = points.length;\n const pathPoints = [];\n for(let i = 0; i < len; i += 2){\n pathPoints.push(new Point(points[i], points[i + 1]));\n }\n return pathPoints;\n }\n angleTo(point) {\n return Math.atan2(point.y - this.y, point.x - this.x);\n }\n applyTransform(transform) {\n const { x , y } = this;\n const xp = x * transform[0] + y * transform[2] + transform[4];\n const yp = x * transform[1] + y * transform[3] + transform[5];\n this.x = xp;\n this.y = yp;\n }\n constructor(x, y){\n this.x = x;\n this.y = y;\n }\n}\n\nclass Mouse {\n isWorking() {\n return this.working;\n }\n start() {\n if (this.working) {\n return;\n }\n const { screen , onClick , onMouseMove } = this;\n const canvas = screen.ctx.canvas;\n canvas.onclick = onClick;\n canvas.onmousemove = onMouseMove;\n this.working = true;\n }\n stop() {\n if (!this.working) {\n return;\n }\n const canvas = this.screen.ctx.canvas;\n this.working = false;\n canvas.onclick = null;\n canvas.onmousemove = null;\n }\n hasEvents() {\n return this.working && this.events.length > 0;\n }\n runEvents() {\n if (!this.working) {\n return;\n }\n const { screen: document , events , eventElements } = this;\n const { style } = document.ctx.canvas;\n let element;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (style) {\n style.cursor = '';\n }\n events.forEach((param, i)=>{\n let { run } = param;\n element = eventElements[i];\n while(element){\n run(element);\n element = element.parent;\n }\n });\n // done running, clear\n this.events = [];\n this.eventElements = [];\n }\n checkPath(element, ctx) {\n if (!this.working || !ctx) {\n return;\n }\n const { events , eventElements } = this;\n events.forEach((param, i)=>{\n let { x , y } = param;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!eventElements[i] && ctx.isPointInPath && ctx.isPointInPath(x, y)) {\n eventElements[i] = element;\n }\n });\n }\n checkBoundingBox(element, boundingBox) {\n if (!this.working || !boundingBox) {\n return;\n }\n const { events , eventElements } = this;\n events.forEach((param, i)=>{\n let { x , y } = param;\n if (!eventElements[i] && boundingBox.isPointInBox(x, y)) {\n eventElements[i] = element;\n }\n });\n }\n mapXY(x, y) {\n const { window , ctx } = this.screen;\n const point = new Point(x, y);\n let element = ctx.canvas;\n while(element){\n point.x -= element.offsetLeft;\n point.y -= element.offsetTop;\n element = element.offsetParent;\n }\n if (window === null || window === void 0 ? void 0 : window.scrollX) {\n point.x += window.scrollX;\n }\n if (window === null || window === void 0 ? void 0 : window.scrollY) {\n point.y += window.scrollY;\n }\n return point;\n }\n onClick(event) {\n const { x , y } = this.mapXY(event.clientX, event.clientY);\n this.events.push({\n type: 'onclick',\n x,\n y,\n run (eventTarget) {\n if (eventTarget.onClick) {\n eventTarget.onClick();\n }\n }\n });\n }\n onMouseMove(event) {\n const { x , y } = this.mapXY(event.clientX, event.clientY);\n this.events.push({\n type: 'onmousemove',\n x,\n y,\n run (eventTarget) {\n if (eventTarget.onMouseMove) {\n eventTarget.onMouseMove();\n }\n }\n });\n }\n constructor(screen){\n this.screen = screen;\n this.working = false;\n this.events = [];\n this.eventElements = [];\n this.onClick = this.onClick.bind(this);\n this.onMouseMove = this.onMouseMove.bind(this);\n }\n}\n\nconst defaultWindow = typeof window !== 'undefined' ? window : null;\nconst defaultFetch$1 = typeof fetch !== 'undefined' ? fetch.bind(undefined) // `fetch` depends on context: `someObject.fetch(...)` will throw error.\n : undefined;\nclass Screen {\n wait(checker) {\n this.waits.push(checker);\n }\n ready() {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (!this.readyPromise) {\n return Promise.resolve();\n }\n return this.readyPromise;\n }\n isReady() {\n if (this.isReadyLock) {\n return true;\n }\n const isReadyLock = this.waits.every((_)=>_()\n );\n if (isReadyLock) {\n this.waits = [];\n if (this.resolveReady) {\n this.resolveReady();\n }\n }\n this.isReadyLock = isReadyLock;\n return isReadyLock;\n }\n setDefaults(ctx) {\n // initial values and defaults\n ctx.strokeStyle = 'rgba(0,0,0,0)';\n ctx.lineCap = 'butt';\n ctx.lineJoin = 'miter';\n ctx.miterLimit = 4;\n }\n setViewBox(param) {\n let { document , ctx , aspectRatio , width , desiredWidth , height , desiredHeight , minX =0 , minY =0 , refX , refY , clip =false , clipX =0 , clipY =0 } = param;\n // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute\n const cleanAspectRatio = compressSpaces(aspectRatio).replace(/^defer\\s/, '') // ignore defer\n ;\n const [aspectRatioAlign, aspectRatioMeetOrSlice] = cleanAspectRatio.split(' ');\n const align = aspectRatioAlign || 'xMidYMid';\n const meetOrSlice = aspectRatioMeetOrSlice || 'meet';\n // calculate scale\n const scaleX = width / desiredWidth;\n const scaleY = height / desiredHeight;\n const scaleMin = Math.min(scaleX, scaleY);\n const scaleMax = Math.max(scaleX, scaleY);\n let finalDesiredWidth = desiredWidth;\n let finalDesiredHeight = desiredHeight;\n if (meetOrSlice === 'meet') {\n finalDesiredWidth *= scaleMin;\n finalDesiredHeight *= scaleMin;\n }\n if (meetOrSlice === 'slice') {\n finalDesiredWidth *= scaleMax;\n finalDesiredHeight *= scaleMax;\n }\n const refXProp = new Property(document, 'refX', refX);\n const refYProp = new Property(document, 'refY', refY);\n const hasRefs = refXProp.hasValue() && refYProp.hasValue();\n if (hasRefs) {\n ctx.translate(-scaleMin * refXProp.getPixels('x'), -scaleMin * refYProp.getPixels('y'));\n }\n if (clip) {\n const scaledClipX = scaleMin * clipX;\n const scaledClipY = scaleMin * clipY;\n ctx.beginPath();\n ctx.moveTo(scaledClipX, scaledClipY);\n ctx.lineTo(width, scaledClipY);\n ctx.lineTo(width, height);\n ctx.lineTo(scaledClipX, height);\n ctx.closePath();\n ctx.clip();\n }\n if (!hasRefs) {\n const isMeetMinY = meetOrSlice === 'meet' && scaleMin === scaleY;\n const isSliceMaxY = meetOrSlice === 'slice' && scaleMax === scaleY;\n const isMeetMinX = meetOrSlice === 'meet' && scaleMin === scaleX;\n const isSliceMaxX = meetOrSlice === 'slice' && scaleMax === scaleX;\n if (align.startsWith('xMid') && (isMeetMinY || isSliceMaxY)) {\n ctx.translate(width / 2 - finalDesiredWidth / 2, 0);\n }\n if (align.endsWith('YMid') && (isMeetMinX || isSliceMaxX)) {\n ctx.translate(0, height / 2 - finalDesiredHeight / 2);\n }\n if (align.startsWith('xMax') && (isMeetMinY || isSliceMaxY)) {\n ctx.translate(width - finalDesiredWidth, 0);\n }\n if (align.endsWith('YMax') && (isMeetMinX || isSliceMaxX)) {\n ctx.translate(0, height - finalDesiredHeight);\n }\n }\n // scale\n switch(true){\n case align === 'none':\n ctx.scale(scaleX, scaleY);\n break;\n case meetOrSlice === 'meet':\n ctx.scale(scaleMin, scaleMin);\n break;\n case meetOrSlice === 'slice':\n ctx.scale(scaleMax, scaleMax);\n break;\n }\n // translate\n ctx.translate(-minX, -minY);\n }\n start(element) {\n let { enableRedraw =false , ignoreMouse =false , ignoreAnimation =false , ignoreDimensions =false , ignoreClear =false , forceRedraw , scaleWidth , scaleHeight , offsetX , offsetY } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n const { mouse } = this;\n const frameDuration = 1000 / Screen.FRAMERATE;\n this.isReadyLock = false;\n this.frameDuration = frameDuration;\n this.readyPromise = new Promise((resolve)=>{\n this.resolveReady = resolve;\n });\n if (this.isReady()) {\n this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);\n }\n if (!enableRedraw) {\n return;\n }\n let now = Date.now();\n let then = now;\n let delta = 0;\n const tick = ()=>{\n now = Date.now();\n delta = now - then;\n if (delta >= frameDuration) {\n then = now - delta % frameDuration;\n if (this.shouldUpdate(ignoreAnimation, forceRedraw)) {\n this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);\n mouse.runEvents();\n }\n }\n this.intervalId = requestAnimationFrame__default[\"default\"](tick);\n };\n if (!ignoreMouse) {\n mouse.start();\n }\n this.intervalId = requestAnimationFrame__default[\"default\"](tick);\n }\n stop() {\n if (this.intervalId) {\n requestAnimationFrame__default[\"default\"].cancel(this.intervalId);\n this.intervalId = null;\n }\n this.mouse.stop();\n }\n shouldUpdate(ignoreAnimation, forceRedraw) {\n // need update from animations?\n if (!ignoreAnimation) {\n const { frameDuration } = this;\n const shouldUpdate1 = this.animations.reduce((shouldUpdate, animation)=>animation.update(frameDuration) || shouldUpdate\n , false);\n if (shouldUpdate1) {\n return true;\n }\n }\n // need update from redraw?\n if (typeof forceRedraw === 'function' && forceRedraw()) {\n return true;\n }\n if (!this.isReadyLock && this.isReady()) {\n return true;\n }\n // need update from mouse events?\n if (this.mouse.hasEvents()) {\n return true;\n }\n return false;\n }\n render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY) {\n const { viewPort , ctx , isFirstRender } = this;\n const canvas = ctx.canvas;\n viewPort.clear();\n if (canvas.width && canvas.height) {\n viewPort.setCurrent(canvas.width, canvas.height);\n }\n const widthStyle = element.getStyle('width');\n const heightStyle = element.getStyle('height');\n if (!ignoreDimensions && (isFirstRender || typeof scaleWidth !== 'number' && typeof scaleHeight !== 'number')) {\n // set canvas size\n if (widthStyle.hasValue()) {\n canvas.width = widthStyle.getPixels('x');\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (canvas.style) {\n canvas.style.width = \"\".concat(canvas.width, \"px\");\n }\n }\n if (heightStyle.hasValue()) {\n canvas.height = heightStyle.getPixels('y');\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (canvas.style) {\n canvas.style.height = \"\".concat(canvas.height, \"px\");\n }\n }\n }\n let cWidth = canvas.clientWidth || canvas.width;\n let cHeight = canvas.clientHeight || canvas.height;\n if (ignoreDimensions && widthStyle.hasValue() && heightStyle.hasValue()) {\n cWidth = widthStyle.getPixels('x');\n cHeight = heightStyle.getPixels('y');\n }\n viewPort.setCurrent(cWidth, cHeight);\n if (typeof offsetX === 'number') {\n element.getAttribute('x', true).setValue(offsetX);\n }\n if (typeof offsetY === 'number') {\n element.getAttribute('y', true).setValue(offsetY);\n }\n if (typeof scaleWidth === 'number' || typeof scaleHeight === 'number') {\n const viewBox = toNumbers(element.getAttribute('viewBox').getString());\n let xRatio = 0;\n let yRatio = 0;\n if (typeof scaleWidth === 'number') {\n const widthStyle = element.getStyle('width');\n if (widthStyle.hasValue()) {\n xRatio = widthStyle.getPixels('x') / scaleWidth;\n } else if (viewBox[2] && !isNaN(viewBox[2])) {\n xRatio = viewBox[2] / scaleWidth;\n }\n }\n if (typeof scaleHeight === 'number') {\n const heightStyle = element.getStyle('height');\n if (heightStyle.hasValue()) {\n yRatio = heightStyle.getPixels('y') / scaleHeight;\n } else if (viewBox[3] && !isNaN(viewBox[3])) {\n yRatio = viewBox[3] / scaleHeight;\n }\n }\n if (!xRatio) {\n xRatio = yRatio;\n }\n if (!yRatio) {\n yRatio = xRatio;\n }\n element.getAttribute('width', true).setValue(scaleWidth);\n element.getAttribute('height', true).setValue(scaleHeight);\n const transformStyle = element.getStyle('transform', true, true);\n transformStyle.setValue(\"\".concat(transformStyle.getString(), \" scale(\").concat(1 / xRatio, \", \").concat(1 / yRatio, \")\"));\n }\n // clear and render\n if (!ignoreClear) {\n ctx.clearRect(0, 0, cWidth, cHeight);\n }\n element.render(ctx);\n if (isFirstRender) {\n this.isFirstRender = false;\n }\n }\n constructor(ctx, { fetch =defaultFetch$1 , window =defaultWindow } = {}){\n this.ctx = ctx;\n this.viewPort = new ViewPort();\n this.mouse = new Mouse(this);\n this.animations = [];\n this.waits = [];\n this.frameDuration = 0;\n this.isReadyLock = false;\n this.isFirstRender = true;\n this.intervalId = null;\n this.window = window;\n if (!fetch) {\n throw new Error(\"Can't find 'fetch' in 'globalThis', please provide it via options\");\n }\n this.fetch = fetch;\n }\n}\nScreen.defaultWindow = defaultWindow;\nScreen.defaultFetch = defaultFetch$1;\nScreen.FRAMERATE = 30;\nScreen.MAX_VIRTUAL_PIXELS = 30000;\n\nconst { defaultFetch } = Screen;\nconst DefaultDOMParser = typeof DOMParser !== 'undefined' ? DOMParser : undefined;\nclass Parser {\n async parse(resource) {\n if (resource.startsWith('<')) {\n return this.parseFromString(resource);\n }\n return this.load(resource);\n }\n parseFromString(xml) {\n const parser = new this.DOMParser();\n try {\n return this.checkDocument(parser.parseFromString(xml, 'image/svg+xml'));\n } catch (err) {\n return this.checkDocument(parser.parseFromString(xml, 'text/xml'));\n }\n }\n checkDocument(document) {\n const parserError = document.getElementsByTagName('parsererror')[0];\n if (parserError) {\n throw new Error(parserError.textContent || 'Unknown parse error');\n }\n return document;\n }\n async load(url) {\n const response = await this.fetch(url);\n const xml = await response.text();\n return this.parseFromString(xml);\n }\n constructor({ fetch =defaultFetch , DOMParser =DefaultDOMParser } = {}){\n if (!fetch) {\n throw new Error(\"Can't find 'fetch' in 'globalThis', please provide it via options\");\n }\n if (!DOMParser) {\n throw new Error(\"Can't find 'DOMParser' in 'globalThis', please provide it via options\");\n }\n this.fetch = fetch;\n this.DOMParser = DOMParser;\n }\n}\n\nclass Translate {\n apply(ctx) {\n const { x , y } = this.point;\n ctx.translate(x || 0, y || 0);\n }\n unapply(ctx) {\n const { x , y } = this.point;\n ctx.translate(-1 * x || 0, -1 * y || 0);\n }\n applyToPoint(point) {\n const { x , y } = this.point;\n point.applyTransform([\n 1,\n 0,\n 0,\n 1,\n x || 0,\n y || 0\n ]);\n }\n constructor(_, point){\n this.type = 'translate';\n this.point = Point.parse(point);\n }\n}\n\nclass Rotate {\n apply(ctx) {\n const { cx , cy , originX , originY , angle } = this;\n const tx = cx + originX.getPixels('x');\n const ty = cy + originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.rotate(angle.getRadians());\n ctx.translate(-tx, -ty);\n }\n unapply(ctx) {\n const { cx , cy , originX , originY , angle } = this;\n const tx = cx + originX.getPixels('x');\n const ty = cy + originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.rotate(-1 * angle.getRadians());\n ctx.translate(-tx, -ty);\n }\n applyToPoint(point) {\n const { cx , cy , angle } = this;\n const rad = angle.getRadians();\n point.applyTransform([\n 1,\n 0,\n 0,\n 1,\n cx || 0,\n cy || 0 // this.p.y\n ]);\n point.applyTransform([\n Math.cos(rad),\n Math.sin(rad),\n -Math.sin(rad),\n Math.cos(rad),\n 0,\n 0\n ]);\n point.applyTransform([\n 1,\n 0,\n 0,\n 1,\n -cx || 0,\n -cy || 0 // -this.p.y\n ]);\n }\n constructor(document, rotate, transformOrigin){\n this.type = 'rotate';\n const numbers = toNumbers(rotate);\n this.angle = new Property(document, 'angle', numbers[0]);\n this.originX = transformOrigin[0];\n this.originY = transformOrigin[1];\n this.cx = numbers[1] || 0;\n this.cy = numbers[2] || 0;\n }\n}\n\nclass Scale {\n apply(ctx) {\n const { scale: { x , y } , originX , originY } = this;\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.scale(x, y || x);\n ctx.translate(-tx, -ty);\n }\n unapply(ctx) {\n const { scale: { x , y } , originX , originY } = this;\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.scale(1 / x, 1 / y || x);\n ctx.translate(-tx, -ty);\n }\n applyToPoint(point) {\n const { x , y } = this.scale;\n point.applyTransform([\n x || 0,\n 0,\n 0,\n y || 0,\n 0,\n 0\n ]);\n }\n constructor(_, scale, transformOrigin){\n this.type = 'scale';\n const scaleSize = Point.parseScale(scale);\n // Workaround for node-canvas\n if (scaleSize.x === 0 || scaleSize.y === 0) {\n scaleSize.x = PSEUDO_ZERO;\n scaleSize.y = PSEUDO_ZERO;\n }\n this.scale = scaleSize;\n this.originX = transformOrigin[0];\n this.originY = transformOrigin[1];\n }\n}\n\nclass Matrix {\n apply(ctx) {\n const { originX , originY , matrix } = this;\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n ctx.translate(-tx, -ty);\n }\n unapply(ctx) {\n const { originX , originY , matrix } = this;\n const a = matrix[0];\n const b = matrix[2];\n const c = matrix[4];\n const d = matrix[1];\n const e = matrix[3];\n const f = matrix[5];\n const g = 0;\n const h = 0;\n const i = 1;\n const det = 1 / (a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g));\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.transform(det * (e * i - f * h), det * (f * g - d * i), det * (c * h - b * i), det * (a * i - c * g), det * (b * f - c * e), det * (c * d - a * f));\n ctx.translate(-tx, -ty);\n }\n applyToPoint(point) {\n point.applyTransform(this.matrix);\n }\n constructor(_, matrix, transformOrigin){\n this.type = 'matrix';\n this.matrix = toMatrixValue(matrix);\n this.originX = transformOrigin[0];\n this.originY = transformOrigin[1];\n }\n}\n\nclass Skew extends Matrix {\n constructor(document, skew, transformOrigin){\n super(document, skew, transformOrigin);\n this.type = 'skew';\n this.angle = new Property(document, 'angle', skew);\n }\n}\n\nclass SkewX extends Skew {\n constructor(document, skew, transformOrigin){\n super(document, skew, transformOrigin);\n this.type = 'skewX';\n this.matrix = [\n 1,\n 0,\n Math.tan(this.angle.getRadians()),\n 1,\n 0,\n 0\n ];\n }\n}\n\nclass SkewY extends Skew {\n constructor(document, skew, transformOrigin){\n super(document, skew, transformOrigin);\n this.type = 'skewY';\n this.matrix = [\n 1,\n Math.tan(this.angle.getRadians()),\n 0,\n 1,\n 0,\n 0\n ];\n }\n}\n\nfunction parseTransforms(transform) {\n return compressSpaces(transform).trim().replace(/\\)([a-zA-Z])/g, ') $1').replace(/\\)(\\s?,\\s?)/g, ') ').split(/\\s(?=[a-z])/);\n}\nfunction parseTransform(transform) {\n const [type = '', value = ''] = transform.split('(');\n return [\n type.trim(),\n value.trim().replace(')', '')\n ];\n}\nclass Transform {\n static fromElement(document, element) {\n const transformStyle = element.getStyle('transform', false, true);\n if (transformStyle.hasValue()) {\n const [transformOriginXProperty, transformOriginYProperty = transformOriginXProperty] = element.getStyle('transform-origin', false, true).split();\n if (transformOriginXProperty && transformOriginYProperty) {\n const transformOrigin = [\n transformOriginXProperty,\n transformOriginYProperty\n ];\n return new Transform(document, transformStyle.getString(), transformOrigin);\n }\n }\n return null;\n }\n apply(ctx) {\n this.transforms.forEach((transform)=>transform.apply(ctx)\n );\n }\n unapply(ctx) {\n this.transforms.forEach((transform)=>transform.unapply(ctx)\n );\n }\n // TODO: applyToPoint unused ... remove?\n applyToPoint(point) {\n this.transforms.forEach((transform)=>transform.applyToPoint(point)\n );\n }\n constructor(document, transform1, transformOrigin){\n this.document = document;\n this.transforms = [];\n const data = parseTransforms(transform1);\n data.forEach((transform)=>{\n if (transform === 'none') {\n return;\n }\n const [type, value] = parseTransform(transform);\n const TransformType = Transform.transformTypes[type];\n if (TransformType) {\n this.transforms.push(new TransformType(this.document, value, transformOrigin));\n }\n });\n }\n}\nTransform.transformTypes = {\n translate: Translate,\n rotate: Rotate,\n scale: Scale,\n matrix: Matrix,\n skewX: SkewX,\n skewY: SkewY\n};\n\nclass Element {\n getAttribute(name) {\n let createIfNotExists = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n const attr = this.attributes[name];\n if (!attr && createIfNotExists) {\n const attr = new Property(this.document, name, '');\n this.attributes[name] = attr;\n return attr;\n }\n return attr || Property.empty(this.document);\n }\n getHrefAttribute() {\n let href;\n for(const key in this.attributes){\n if (key === 'href' || key.endsWith(':href')) {\n href = this.attributes[key];\n break;\n }\n }\n return href || Property.empty(this.document);\n }\n getStyle(name) {\n let createIfNotExists = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, skipAncestors = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n const style = this.styles[name];\n if (style) {\n return style;\n }\n const attr = this.getAttribute(name);\n if (attr.hasValue()) {\n this.styles[name] = attr // move up to me to cache\n ;\n return attr;\n }\n if (!skipAncestors) {\n const { parent } = this;\n if (parent) {\n const parentStyle = parent.getStyle(name);\n if (parentStyle.hasValue()) {\n return parentStyle;\n }\n }\n }\n if (createIfNotExists) {\n const style = new Property(this.document, name, '');\n this.styles[name] = style;\n return style;\n }\n return Property.empty(this.document);\n }\n render(ctx) {\n // don't render display=none\n // don't render visibility=hidden\n if (this.getStyle('display').getString() === 'none' || this.getStyle('visibility').getString() === 'hidden') {\n return;\n }\n ctx.save();\n if (this.getStyle('mask').hasValue()) {\n const mask = this.getStyle('mask').getDefinition();\n if (mask) {\n this.applyEffects(ctx);\n mask.apply(ctx, this);\n }\n } else if (this.getStyle('filter').getValue('none') !== 'none') {\n const filter = this.getStyle('filter').getDefinition();\n if (filter) {\n this.applyEffects(ctx);\n filter.apply(ctx, this);\n }\n } else {\n this.setContext(ctx);\n this.renderChildren(ctx);\n this.clearContext(ctx);\n }\n ctx.restore();\n }\n setContext(_) {\n // NO RENDER\n }\n applyEffects(ctx) {\n // transform\n const transform = Transform.fromElement(this.document, this);\n if (transform) {\n transform.apply(ctx);\n }\n // clip\n const clipPathStyleProp = this.getStyle('clip-path', false, true);\n if (clipPathStyleProp.hasValue()) {\n const clip = clipPathStyleProp.getDefinition();\n if (clip) {\n clip.apply(ctx);\n }\n }\n }\n clearContext(_) {\n // NO RENDER\n }\n renderChildren(ctx) {\n this.children.forEach((child)=>{\n child.render(ctx);\n });\n }\n addChild(childNode) {\n const child = childNode instanceof Element ? childNode : this.document.createElement(childNode);\n child.parent = this;\n if (!Element.ignoreChildTypes.includes(child.type)) {\n this.children.push(child);\n }\n }\n matchesSelector(selector) {\n var ref;\n const { node } = this;\n if (typeof node.matches === 'function') {\n return node.matches(selector);\n }\n const styleClasses = (ref = node.getAttribute) === null || ref === void 0 ? void 0 : ref.call(node, 'class');\n if (!styleClasses || styleClasses === '') {\n return false;\n }\n return styleClasses.split(' ').some((styleClass)=>\".\".concat(styleClass) === selector\n );\n }\n addStylesFromStyleDefinition() {\n const { styles , stylesSpecificity } = this.document;\n let styleProp;\n for(const selector in styles){\n if (!selector.startsWith('@') && this.matchesSelector(selector)) {\n const style = styles[selector];\n const specificity = stylesSpecificity[selector];\n if (style) {\n for(const name in style){\n let existingSpecificity = this.stylesSpecificity[name];\n if (typeof existingSpecificity === 'undefined') {\n existingSpecificity = '000';\n }\n if (specificity && specificity >= existingSpecificity) {\n styleProp = style[name];\n if (styleProp) {\n this.styles[name] = styleProp;\n }\n this.stylesSpecificity[name] = specificity;\n }\n }\n }\n }\n }\n }\n removeStyles(element, ignoreStyles) {\n const toRestore1 = ignoreStyles.reduce((toRestore, name)=>{\n const styleProp = element.getStyle(name);\n if (!styleProp.hasValue()) {\n return toRestore;\n }\n const value = styleProp.getString();\n styleProp.setValue('');\n return [\n ...toRestore,\n [\n name,\n value\n ]\n ];\n }, []);\n return toRestore1;\n }\n restoreStyles(element, styles) {\n styles.forEach((param)=>{\n let [name, value] = param;\n element.getStyle(name, true).setValue(value);\n });\n }\n isFirstChild() {\n var ref;\n return ((ref = this.parent) === null || ref === void 0 ? void 0 : ref.children.indexOf(this)) === 0;\n }\n constructor(document, node, captureTextNodes = false){\n this.document = document;\n this.node = node;\n this.captureTextNodes = captureTextNodes;\n this.type = '';\n this.attributes = {};\n this.styles = {};\n this.stylesSpecificity = {};\n this.animationFrozen = false;\n this.animationFrozenValue = '';\n this.parent = null;\n this.children = [];\n if (!node || node.nodeType !== 1) {\n return;\n }\n // add attributes\n Array.from(node.attributes).forEach((attribute)=>{\n const nodeName = normalizeAttributeName(attribute.nodeName);\n this.attributes[nodeName] = new Property(document, nodeName, attribute.value);\n });\n this.addStylesFromStyleDefinition();\n // add inline styles\n if (this.getAttribute('style').hasValue()) {\n const styles = this.getAttribute('style').getString().split(';').map((_)=>_.trim()\n );\n styles.forEach((style)=>{\n if (!style) {\n return;\n }\n const [name, value] = style.split(':').map((_)=>_.trim()\n );\n if (name) {\n this.styles[name] = new Property(document, name, value);\n }\n });\n }\n const { definitions } = document;\n const id = this.getAttribute('id');\n // add id\n if (id.hasValue()) {\n if (!definitions[id.getString()]) {\n definitions[id.getString()] = this;\n }\n }\n Array.from(node.childNodes).forEach((childNode)=>{\n if (childNode.nodeType === 1) {\n this.addChild(childNode) // ELEMENT_NODE\n ;\n } else if (captureTextNodes && (childNode.nodeType === 3 || childNode.nodeType === 4)) {\n const textNode = document.createTextNode(childNode);\n if (textNode.getText().length > 0) {\n this.addChild(textNode) // TEXT_NODE\n ;\n }\n }\n });\n }\n}\nElement.ignoreChildTypes = [\n 'title'\n];\n\nclass UnknownElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n }\n}\n\nfunction wrapFontFamily(fontFamily) {\n const trimmed = fontFamily.trim();\n return /^('|\")/.test(trimmed) ? trimmed : \"\\\"\".concat(trimmed, \"\\\"\");\n}\nfunction prepareFontFamily(fontFamily) {\n return typeof process === 'undefined' ? fontFamily : fontFamily.trim().split(',').map(wrapFontFamily).join(',');\n}\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style\n * @param fontStyle\n * @returns CSS font style.\n */ function prepareFontStyle(fontStyle) {\n if (!fontStyle) {\n return '';\n }\n const targetFontStyle = fontStyle.trim().toLowerCase();\n switch(targetFontStyle){\n case 'normal':\n case 'italic':\n case 'oblique':\n case 'inherit':\n case 'initial':\n case 'unset':\n return targetFontStyle;\n default:\n if (/^oblique\\s+(-|)\\d+deg$/.test(targetFontStyle)) {\n return targetFontStyle;\n }\n return '';\n }\n}\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight\n * @param fontWeight\n * @returns CSS font weight.\n */ function prepareFontWeight(fontWeight) {\n if (!fontWeight) {\n return '';\n }\n const targetFontWeight = fontWeight.trim().toLowerCase();\n switch(targetFontWeight){\n case 'normal':\n case 'bold':\n case 'lighter':\n case 'bolder':\n case 'inherit':\n case 'initial':\n case 'unset':\n return targetFontWeight;\n default:\n if (/^[\\d.]+$/.test(targetFontWeight)) {\n return targetFontWeight;\n }\n return '';\n }\n}\nclass Font {\n static parse() {\n let font = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : '', inherit = arguments.length > 1 ? arguments[1] : void 0;\n let fontStyle = '';\n let fontVariant = '';\n let fontWeight = '';\n let fontSize = '';\n let fontFamily = '';\n const parts = compressSpaces(font).trim().split(' ');\n const set = {\n fontSize: false,\n fontStyle: false,\n fontWeight: false,\n fontVariant: false\n };\n parts.forEach((part)=>{\n switch(true){\n case !set.fontStyle && Font.styles.includes(part):\n if (part !== 'inherit') {\n fontStyle = part;\n }\n set.fontStyle = true;\n break;\n case !set.fontVariant && Font.variants.includes(part):\n if (part !== 'inherit') {\n fontVariant = part;\n }\n set.fontStyle = true;\n set.fontVariant = true;\n break;\n case !set.fontWeight && Font.weights.includes(part):\n if (part !== 'inherit') {\n fontWeight = part;\n }\n set.fontStyle = true;\n set.fontVariant = true;\n set.fontWeight = true;\n break;\n case !set.fontSize:\n if (part !== 'inherit') {\n fontSize = part.split('/')[0] || '';\n }\n set.fontStyle = true;\n set.fontVariant = true;\n set.fontWeight = true;\n set.fontSize = true;\n break;\n default:\n if (part !== 'inherit') {\n fontFamily += part;\n }\n }\n });\n return new Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit);\n }\n toString() {\n return [\n prepareFontStyle(this.fontStyle),\n this.fontVariant,\n prepareFontWeight(this.fontWeight),\n this.fontSize,\n // Wrap fontFamily only on nodejs and only for canvas.ctx\n prepareFontFamily(this.fontFamily)\n ].join(' ').trim();\n }\n constructor(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit){\n const inheritFont = inherit ? typeof inherit === 'string' ? Font.parse(inherit) : inherit : {};\n this.fontFamily = fontFamily || inheritFont.fontFamily;\n this.fontSize = fontSize || inheritFont.fontSize;\n this.fontStyle = fontStyle || inheritFont.fontStyle;\n this.fontWeight = fontWeight || inheritFont.fontWeight;\n this.fontVariant = fontVariant || inheritFont.fontVariant;\n }\n}\nFont.styles = 'normal|italic|oblique|inherit';\nFont.variants = 'normal|small-caps|inherit';\nFont.weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';\n\nclass BoundingBox {\n get x() {\n return this.x1;\n }\n get y() {\n return this.y1;\n }\n get width() {\n return this.x2 - this.x1;\n }\n get height() {\n return this.y2 - this.y1;\n }\n addPoint(x, y) {\n if (typeof x !== 'undefined') {\n if (isNaN(this.x1) || isNaN(this.x2)) {\n this.x1 = x;\n this.x2 = x;\n }\n if (x < this.x1) {\n this.x1 = x;\n }\n if (x > this.x2) {\n this.x2 = x;\n }\n }\n if (typeof y !== 'undefined') {\n if (isNaN(this.y1) || isNaN(this.y2)) {\n this.y1 = y;\n this.y2 = y;\n }\n if (y < this.y1) {\n this.y1 = y;\n }\n if (y > this.y2) {\n this.y2 = y;\n }\n }\n }\n addX(x) {\n this.addPoint(x, 0);\n }\n addY(y) {\n this.addPoint(0, y);\n }\n addBoundingBox(boundingBox) {\n if (!boundingBox) {\n return;\n }\n const { x1 , y1 , x2 , y2 } = boundingBox;\n this.addPoint(x1, y1);\n this.addPoint(x2, y2);\n }\n sumCubic(t, p0, p1, p2, p3) {\n return Math.pow(1 - t, 3) * p0 + 3 * Math.pow(1 - t, 2) * t * p1 + 3 * (1 - t) * Math.pow(t, 2) * p2 + Math.pow(t, 3) * p3;\n }\n bezierCurveAdd(forX, p0, p1, p2, p3) {\n const b = 6 * p0 - 12 * p1 + 6 * p2;\n const a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;\n const c = 3 * p1 - 3 * p0;\n if (a === 0) {\n if (b === 0) {\n return;\n }\n const t = -c / b;\n if (0 < t && t < 1) {\n if (forX) {\n this.addX(this.sumCubic(t, p0, p1, p2, p3));\n } else {\n this.addY(this.sumCubic(t, p0, p1, p2, p3));\n }\n }\n return;\n }\n const b2ac = Math.pow(b, 2) - 4 * c * a;\n if (b2ac < 0) {\n return;\n }\n const t1 = (-b + Math.sqrt(b2ac)) / (2 * a);\n if (0 < t1 && t1 < 1) {\n if (forX) {\n this.addX(this.sumCubic(t1, p0, p1, p2, p3));\n } else {\n this.addY(this.sumCubic(t1, p0, p1, p2, p3));\n }\n }\n const t2 = (-b - Math.sqrt(b2ac)) / (2 * a);\n if (0 < t2 && t2 < 1) {\n if (forX) {\n this.addX(this.sumCubic(t2, p0, p1, p2, p3));\n } else {\n this.addY(this.sumCubic(t2, p0, p1, p2, p3));\n }\n }\n }\n // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html\n addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {\n this.addPoint(p0x, p0y);\n this.addPoint(p3x, p3y);\n this.bezierCurveAdd(true, p0x, p1x, p2x, p3x);\n this.bezierCurveAdd(false, p0y, p1y, p2y, p3y);\n }\n addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y) {\n const cp1x = p0x + 2 / 3 * (p1x - p0x) // CP1 = QP0 + 2/3 *(QP1-QP0)\n ;\n const cp1y = p0y + 2 / 3 * (p1y - p0y) // CP1 = QP0 + 2/3 *(QP1-QP0)\n ;\n const cp2x = cp1x + 1 / 3 * (p2x - p0x) // CP2 = CP1 + 1/3 *(QP2-QP0)\n ;\n const cp2y = cp1y + 1 / 3 * (p2y - p0y) // CP2 = CP1 + 1/3 *(QP2-QP0)\n ;\n this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);\n }\n isPointInBox(x, y) {\n const { x1 , y1 , x2 , y2 } = this;\n return x1 <= x && x <= x2 && y1 <= y && y <= y2;\n }\n constructor(x1 = Number.NaN, y1 = Number.NaN, x2 = Number.NaN, y2 = Number.NaN){\n this.x1 = x1;\n this.y1 = y1;\n this.x2 = x2;\n this.y2 = y2;\n this.addPoint(x1, y1);\n this.addPoint(x2, y2);\n }\n}\n\nclass RenderedElement extends Element {\n calculateOpacity() {\n let opacity = 1;\n // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n let element = this;\n while(element){\n const opacityStyle = element.getStyle('opacity', false, true) // no ancestors on style call\n ;\n if (opacityStyle.hasValue(true)) {\n opacity *= opacityStyle.getNumber();\n }\n element = element.parent;\n }\n return opacity;\n }\n setContext(ctx) {\n let fromMeasure = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n if (!fromMeasure) {\n // fill\n const fillStyleProp = this.getStyle('fill');\n const fillOpacityStyleProp = this.getStyle('fill-opacity');\n const strokeStyleProp = this.getStyle('stroke');\n const strokeOpacityProp = this.getStyle('stroke-opacity');\n if (fillStyleProp.isUrlDefinition()) {\n const fillStyle = fillStyleProp.getFillStyleDefinition(this, fillOpacityStyleProp);\n if (fillStyle) {\n ctx.fillStyle = fillStyle;\n }\n } else if (fillStyleProp.hasValue()) {\n if (fillStyleProp.getString() === 'currentColor') {\n fillStyleProp.setValue(this.getStyle('color').getColor());\n }\n const fillStyle = fillStyleProp.getColor();\n if (fillStyle !== 'inherit') {\n ctx.fillStyle = fillStyle === 'none' ? 'rgba(0,0,0,0)' : fillStyle;\n }\n }\n if (fillOpacityStyleProp.hasValue()) {\n const fillStyle = new Property(this.document, 'fill', ctx.fillStyle).addOpacity(fillOpacityStyleProp).getColor();\n ctx.fillStyle = fillStyle;\n }\n // stroke\n if (strokeStyleProp.isUrlDefinition()) {\n const strokeStyle = strokeStyleProp.getFillStyleDefinition(this, strokeOpacityProp);\n if (strokeStyle) {\n ctx.strokeStyle = strokeStyle;\n }\n } else if (strokeStyleProp.hasValue()) {\n if (strokeStyleProp.getString() === 'currentColor') {\n strokeStyleProp.setValue(this.getStyle('color').getColor());\n }\n const strokeStyle = strokeStyleProp.getString();\n if (strokeStyle !== 'inherit') {\n ctx.strokeStyle = strokeStyle === 'none' ? 'rgba(0,0,0,0)' : strokeStyle;\n }\n }\n if (strokeOpacityProp.hasValue()) {\n const strokeStyle = new Property(this.document, 'stroke', ctx.strokeStyle).addOpacity(strokeOpacityProp).getString();\n ctx.strokeStyle = strokeStyle;\n }\n const strokeWidthStyleProp = this.getStyle('stroke-width');\n if (strokeWidthStyleProp.hasValue()) {\n const newLineWidth = strokeWidthStyleProp.getPixels();\n ctx.lineWidth = !newLineWidth ? PSEUDO_ZERO // browsers don't respect 0 (or node-canvas? :-)\n : newLineWidth;\n }\n const strokeLinecapStyleProp = this.getStyle('stroke-linecap');\n const strokeLinejoinStyleProp = this.getStyle('stroke-linejoin');\n const strokeMiterlimitProp = this.getStyle('stroke-miterlimit');\n // NEED TEST\n // const pointOrderStyleProp = this.getStyle('paint-order');\n const strokeDasharrayStyleProp = this.getStyle('stroke-dasharray');\n const strokeDashoffsetProp = this.getStyle('stroke-dashoffset');\n if (strokeLinecapStyleProp.hasValue()) {\n ctx.lineCap = strokeLinecapStyleProp.getString();\n }\n if (strokeLinejoinStyleProp.hasValue()) {\n ctx.lineJoin = strokeLinejoinStyleProp.getString();\n }\n if (strokeMiterlimitProp.hasValue()) {\n ctx.miterLimit = strokeMiterlimitProp.getNumber();\n }\n // NEED TEST\n // if (pointOrderStyleProp.hasValue()) {\n // // ?\n // ctx.paintOrder = pointOrderStyleProp.getValue();\n // }\n if (strokeDasharrayStyleProp.hasValue() && strokeDasharrayStyleProp.getString() !== 'none') {\n const gaps = toNumbers(strokeDasharrayStyleProp.getString());\n if (typeof ctx.setLineDash !== 'undefined') {\n ctx.setLineDash(gaps);\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.webkitLineDash !== 'undefined') {\n // @ts-expect-error Handle browser prefix.\n ctx.webkitLineDash = gaps;\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.mozDash !== 'undefined' && !(gaps.length === 1 && gaps[0] === 0)) {\n // @ts-expect-error Handle browser prefix.\n ctx.mozDash = gaps;\n }\n const offset = strokeDashoffsetProp.getPixels();\n if (typeof ctx.lineDashOffset !== 'undefined') {\n ctx.lineDashOffset = offset;\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.webkitLineDashOffset !== 'undefined') {\n // @ts-expect-error Handle browser prefix.\n ctx.webkitLineDashOffset = offset;\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.mozDashOffset !== 'undefined') {\n // @ts-expect-error Handle browser prefix.\n ctx.mozDashOffset = offset;\n }\n }\n }\n // font\n this.modifiedEmSizeStack = false;\n if (typeof ctx.font !== 'undefined') {\n const fontStyleProp = this.getStyle('font');\n const fontStyleStyleProp = this.getStyle('font-style');\n const fontVariantStyleProp = this.getStyle('font-variant');\n const fontWeightStyleProp = this.getStyle('font-weight');\n const fontSizeStyleProp = this.getStyle('font-size');\n const fontFamilyStyleProp = this.getStyle('font-family');\n const font = new Font(fontStyleStyleProp.getString(), fontVariantStyleProp.getString(), fontWeightStyleProp.getString(), fontSizeStyleProp.hasValue() ? \"\".concat(fontSizeStyleProp.getPixels(true), \"px\") : '', fontFamilyStyleProp.getString(), Font.parse(fontStyleProp.getString(), ctx.font));\n fontStyleStyleProp.setValue(font.fontStyle);\n fontVariantStyleProp.setValue(font.fontVariant);\n fontWeightStyleProp.setValue(font.fontWeight);\n fontSizeStyleProp.setValue(font.fontSize);\n fontFamilyStyleProp.setValue(font.fontFamily);\n ctx.font = font.toString();\n if (fontSizeStyleProp.isPixels()) {\n this.document.emSize = fontSizeStyleProp.getPixels();\n this.modifiedEmSizeStack = true;\n }\n }\n if (!fromMeasure) {\n // effects\n this.applyEffects(ctx);\n // opacity\n ctx.globalAlpha = this.calculateOpacity();\n }\n }\n clearContext(ctx) {\n super.clearContext(ctx);\n if (this.modifiedEmSizeStack) {\n this.document.popEmSize();\n }\n }\n constructor(...args){\n super(...args);\n this.modifiedEmSizeStack = false;\n }\n}\n\nclass TextElement extends RenderedElement {\n setContext(ctx) {\n let fromMeasure = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n super.setContext(ctx, fromMeasure);\n const textBaseline = this.getStyle('dominant-baseline').getTextBaseline() || this.getStyle('alignment-baseline').getTextBaseline();\n if (textBaseline) {\n ctx.textBaseline = textBaseline;\n }\n }\n initializeCoordinates() {\n this.x = 0;\n this.y = 0;\n this.leafTexts = [];\n this.textChunkStart = 0;\n this.minX = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n }\n getBoundingBox(ctx) {\n if (this.type !== 'text') {\n return this.getTElementBoundingBox(ctx);\n }\n // first, calculate child positions\n this.initializeCoordinates();\n this.adjustChildCoordinatesRecursive(ctx);\n let boundingBox = null;\n // then calculate bounding box\n this.children.forEach((_, i)=>{\n const childBoundingBox = this.getChildBoundingBox(ctx, this, this, i);\n if (!boundingBox) {\n boundingBox = childBoundingBox;\n } else {\n boundingBox.addBoundingBox(childBoundingBox);\n }\n });\n return boundingBox;\n }\n getFontSize() {\n const { document , parent } = this;\n const inheritFontSize = Font.parse(document.ctx.font).fontSize;\n const fontSize = parent.getStyle('font-size').getNumber(inheritFontSize);\n return fontSize;\n }\n getTElementBoundingBox(ctx) {\n const fontSize = this.getFontSize();\n return new BoundingBox(this.x, this.y - fontSize, this.x + this.measureText(ctx), this.y);\n }\n getGlyph(font, text, i) {\n const char = text[i];\n let glyph;\n if (font.isArabic) {\n var ref;\n const len = text.length;\n const prevChar = text[i - 1];\n const nextChar = text[i + 1];\n let arabicForm = 'isolated';\n if ((i === 0 || prevChar === ' ') && i < len - 1 && nextChar !== ' ') {\n arabicForm = 'terminal';\n }\n if (i > 0 && prevChar !== ' ' && i < len - 1 && nextChar !== ' ') {\n arabicForm = 'medial';\n }\n if (i > 0 && prevChar !== ' ' && (i === len - 1 || nextChar === ' ')) {\n arabicForm = 'initial';\n }\n glyph = ((ref = font.arabicGlyphs[char]) === null || ref === void 0 ? void 0 : ref[arabicForm]) || font.glyphs[char];\n } else {\n glyph = font.glyphs[char];\n }\n if (!glyph) {\n glyph = font.missingGlyph;\n }\n return glyph;\n }\n getText() {\n return '';\n }\n getTextFromNode(node) {\n const textNode = node || this.node;\n const childNodes = Array.from(textNode.parentNode.childNodes);\n const index = childNodes.indexOf(textNode);\n const lastIndex = childNodes.length - 1;\n let text = compressSpaces(// textNode.value\n // || textNode.text\n textNode.textContent || '');\n if (index === 0) {\n text = trimLeft(text);\n }\n if (index === lastIndex) {\n text = trimRight(text);\n }\n return text;\n }\n renderChildren(ctx) {\n if (this.type !== 'text') {\n this.renderTElementChildren(ctx);\n return;\n }\n // first, calculate child positions\n this.initializeCoordinates();\n this.adjustChildCoordinatesRecursive(ctx);\n // then render\n this.children.forEach((_, i)=>{\n this.renderChild(ctx, this, this, i);\n });\n const { mouse } = this.document.screen;\n // Do not calc bounding box if mouse is not working.\n if (mouse.isWorking()) {\n mouse.checkBoundingBox(this, this.getBoundingBox(ctx));\n }\n }\n renderTElementChildren(ctx) {\n const { document , parent } = this;\n const renderText = this.getText();\n const customFont = parent.getStyle('font-family').getDefinition();\n if (customFont) {\n const { unitsPerEm } = customFont.fontFace;\n const ctxFont = Font.parse(document.ctx.font);\n const fontSize = parent.getStyle('font-size').getNumber(ctxFont.fontSize);\n const fontStyle = parent.getStyle('font-style').getString(ctxFont.fontStyle);\n const scale = fontSize / unitsPerEm;\n const text = customFont.isRTL ? renderText.split('').reverse().join('') : renderText;\n const dx = toNumbers(parent.getAttribute('dx').getString());\n const len = text.length;\n for(let i = 0; i < len; i++){\n const glyph = this.getGlyph(customFont, text, i);\n ctx.translate(this.x, this.y);\n ctx.scale(scale, -scale);\n const lw = ctx.lineWidth;\n ctx.lineWidth = ctx.lineWidth * unitsPerEm / fontSize;\n if (fontStyle === 'italic') {\n ctx.transform(1, 0, 0.4, 1, 0, 0);\n }\n glyph.render(ctx);\n if (fontStyle === 'italic') {\n ctx.transform(1, 0, -0.4, 1, 0, 0);\n }\n ctx.lineWidth = lw;\n ctx.scale(1 / scale, -1 / scale);\n ctx.translate(-this.x, -this.y);\n this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / unitsPerEm;\n if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {\n this.x += dx[i];\n }\n }\n return;\n }\n const { x , y } = this;\n // NEED TEST\n // if (ctx.paintOrder === 'stroke') {\n // if (ctx.strokeStyle) {\n // ctx.strokeText(renderText, x, y);\n // }\n // if (ctx.fillStyle) {\n // ctx.fillText(renderText, x, y);\n // }\n // } else {\n if (ctx.fillStyle) {\n ctx.fillText(renderText, x, y);\n }\n if (ctx.strokeStyle) {\n ctx.strokeText(renderText, x, y);\n }\n // }\n }\n applyAnchoring() {\n if (this.textChunkStart >= this.leafTexts.length) {\n return;\n }\n // This is basically the \"Apply anchoring\" part of https://www.w3.org/TR/SVG2/text.html#TextLayoutAlgorithm.\n // The difference is that we apply the anchoring as soon as a chunk is finished. This saves some extra looping.\n // Vertical text is not supported.\n const firstElement = this.leafTexts[this.textChunkStart];\n const textAnchor = firstElement.getStyle('text-anchor').getString('start');\n const isRTL = false // we treat RTL like LTR\n ;\n let shift = 0;\n if (textAnchor === 'start' && !isRTL || textAnchor === 'end' && isRTL) {\n shift = firstElement.x - this.minX;\n } else if (textAnchor === 'end' && !isRTL || textAnchor === 'start' && isRTL) {\n shift = firstElement.x - this.maxX;\n } else {\n shift = firstElement.x - (this.minX + this.maxX) / 2;\n }\n for(let i = this.textChunkStart; i < this.leafTexts.length; i++){\n this.leafTexts[i].x += shift;\n }\n // start new chunk\n this.minX = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n this.textChunkStart = this.leafTexts.length;\n }\n adjustChildCoordinatesRecursive(ctx) {\n this.children.forEach((_, i)=>{\n this.adjustChildCoordinatesRecursiveCore(ctx, this, this, i);\n });\n this.applyAnchoring();\n }\n adjustChildCoordinatesRecursiveCore(ctx, textParent, parent, i1) {\n const child = parent.children[i1];\n if (child.children.length > 0) {\n child.children.forEach((_, i)=>{\n textParent.adjustChildCoordinatesRecursiveCore(ctx, textParent, child, i);\n });\n } else {\n // only leafs are relevant\n this.adjustChildCoordinates(ctx, textParent, parent, i1);\n }\n }\n adjustChildCoordinates(ctx, textParent, parent, i) {\n const child = parent.children[i];\n if (typeof child.measureText !== 'function') {\n return child;\n }\n ctx.save();\n child.setContext(ctx, true);\n const xAttr = child.getAttribute('x');\n const yAttr = child.getAttribute('y');\n const dxAttr = child.getAttribute('dx');\n const dyAttr = child.getAttribute('dy');\n const customFont = child.getStyle('font-family').getDefinition();\n const isRTL = Boolean(customFont === null || customFont === void 0 ? void 0 : customFont.isRTL);\n if (i === 0) {\n // First children inherit attributes from parent(s). Positional attributes\n // are only inherited from a parent to it's first child.\n if (!xAttr.hasValue()) {\n xAttr.setValue(child.getInheritedAttribute('x'));\n }\n if (!yAttr.hasValue()) {\n yAttr.setValue(child.getInheritedAttribute('y'));\n }\n if (!dxAttr.hasValue()) {\n dxAttr.setValue(child.getInheritedAttribute('dx'));\n }\n if (!dyAttr.hasValue()) {\n dyAttr.setValue(child.getInheritedAttribute('dy'));\n }\n }\n const width = child.measureText(ctx);\n if (isRTL) {\n textParent.x -= width;\n }\n if (xAttr.hasValue()) {\n // an \"x\" attribute marks the start of a new chunk\n textParent.applyAnchoring();\n child.x = xAttr.getPixels('x');\n if (dxAttr.hasValue()) {\n child.x += dxAttr.getPixels('x');\n }\n } else {\n if (dxAttr.hasValue()) {\n textParent.x += dxAttr.getPixels('x');\n }\n child.x = textParent.x;\n }\n textParent.x = child.x;\n if (!isRTL) {\n textParent.x += width;\n }\n if (yAttr.hasValue()) {\n child.y = yAttr.getPixels('y');\n if (dyAttr.hasValue()) {\n child.y += dyAttr.getPixels('y');\n }\n } else {\n if (dyAttr.hasValue()) {\n textParent.y += dyAttr.getPixels('y');\n }\n child.y = textParent.y;\n }\n textParent.y = child.y;\n // update the current chunk and it's bounds\n textParent.leafTexts.push(child);\n textParent.minX = Math.min(textParent.minX, child.x, child.x + width);\n textParent.maxX = Math.max(textParent.maxX, child.x, child.x + width);\n child.clearContext(ctx);\n ctx.restore();\n return child;\n }\n getChildBoundingBox(ctx, textParent, parent, i2) {\n const child = parent.children[i2];\n // not a text node?\n if (typeof child.getBoundingBox !== 'function') {\n return null;\n }\n const boundingBox = child.getBoundingBox(ctx);\n if (boundingBox) {\n child.children.forEach((_, i)=>{\n const childBoundingBox = textParent.getChildBoundingBox(ctx, textParent, child, i);\n boundingBox.addBoundingBox(childBoundingBox);\n });\n }\n return boundingBox;\n }\n renderChild(ctx, textParent, parent, i3) {\n const child = parent.children[i3];\n child.render(ctx);\n child.children.forEach((_, i)=>{\n textParent.renderChild(ctx, textParent, child, i);\n });\n }\n measureText(ctx) {\n const { measureCache } = this;\n if (~measureCache) {\n return measureCache;\n }\n const renderText = this.getText();\n const measure = this.measureTargetText(ctx, renderText);\n this.measureCache = measure;\n return measure;\n }\n measureTargetText(ctx, targetText) {\n if (!targetText.length) {\n return 0;\n }\n const { parent } = this;\n const customFont = parent.getStyle('font-family').getDefinition();\n if (customFont) {\n const fontSize = this.getFontSize();\n const text = customFont.isRTL ? targetText.split('').reverse().join('') : targetText;\n const dx = toNumbers(parent.getAttribute('dx').getString());\n const len = text.length;\n let measure = 0;\n for(let i = 0; i < len; i++){\n const glyph = this.getGlyph(customFont, text, i);\n measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;\n if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {\n measure += dx[i];\n }\n }\n return measure;\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!ctx.measureText) {\n return targetText.length * 10;\n }\n ctx.save();\n this.setContext(ctx, true);\n const { width: measure } = ctx.measureText(targetText);\n this.clearContext(ctx);\n ctx.restore();\n return measure;\n }\n /**\n * Inherits positional attributes from {@link TextElement} parent(s). Attributes\n * are only inherited from a parent to its first child.\n * @param name - The attribute name.\n * @returns The attribute value or null.\n */ getInheritedAttribute(name) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias,consistent-this\n let current = this;\n while(current instanceof TextElement && current.isFirstChild() && current.parent){\n const parentAttr = current.parent.getAttribute(name);\n if (parentAttr.hasValue(true)) {\n return parentAttr.getString('0');\n }\n current = current.parent;\n }\n return null;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, new.target === TextElement ? true : captureTextNodes);\n this.type = 'text';\n this.x = 0;\n this.y = 0;\n this.leafTexts = [];\n this.textChunkStart = 0;\n this.minX = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n this.measureCache = -1;\n }\n}\n\nclass TSpanElement extends TextElement {\n getText() {\n return this.text;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, new.target === TSpanElement ? true : captureTextNodes);\n this.type = 'tspan';\n // if this node has children, then they own the text\n this.text = this.children.length > 0 ? '' : this.getTextFromNode();\n }\n}\n\nclass TextNode extends TSpanElement {\n constructor(...args){\n super(...args);\n this.type = 'textNode';\n }\n}\n\nclass PathParser extends svgPathdata.SVGPathData {\n reset() {\n this.i = -1;\n this.command = null;\n this.previousCommand = null;\n this.start = new Point(0, 0);\n this.control = new Point(0, 0);\n this.current = new Point(0, 0);\n this.points = [];\n this.angles = [];\n }\n isEnd() {\n const { i , commands } = this;\n return i >= commands.length - 1;\n }\n next() {\n const command = this.commands[++this.i];\n this.previousCommand = this.command;\n this.command = command;\n return command;\n }\n getPoint() {\n let xProp = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'x', yProp = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 'y';\n const point = new Point(this.command[xProp], this.command[yProp]);\n return this.makeAbsolute(point);\n }\n getAsControlPoint(xProp, yProp) {\n const point = this.getPoint(xProp, yProp);\n this.control = point;\n return point;\n }\n getAsCurrentPoint(xProp, yProp) {\n const point = this.getPoint(xProp, yProp);\n this.current = point;\n return point;\n }\n getReflectedControlPoint() {\n const previousCommand = this.previousCommand.type;\n if (previousCommand !== svgPathdata.SVGPathData.CURVE_TO && previousCommand !== svgPathdata.SVGPathData.SMOOTH_CURVE_TO && previousCommand !== svgPathdata.SVGPathData.QUAD_TO && previousCommand !== svgPathdata.SVGPathData.SMOOTH_QUAD_TO) {\n return this.current;\n }\n // reflect point\n const { current: { x: cx , y: cy } , control: { x: ox , y: oy } } = this;\n const point = new Point(2 * cx - ox, 2 * cy - oy);\n return point;\n }\n makeAbsolute(point) {\n if (this.command.relative) {\n const { x , y } = this.current;\n point.x += x;\n point.y += y;\n }\n return point;\n }\n addMarker(point, from, priorTo) {\n const { points , angles } = this;\n // if the last angle isn't filled in because we didn't have this point yet ...\n if (priorTo && angles.length > 0 && !angles[angles.length - 1]) {\n angles[angles.length - 1] = points[points.length - 1].angleTo(priorTo);\n }\n this.addMarkerAngle(point, from ? from.angleTo(point) : null);\n }\n addMarkerAngle(point, angle) {\n this.points.push(point);\n this.angles.push(angle);\n }\n getMarkerPoints() {\n return this.points;\n }\n getMarkerAngles() {\n const { angles } = this;\n const len = angles.length;\n for(let i = 0; i < len; i++){\n if (!angles[i]) {\n for(let j = i + 1; j < len; j++){\n if (angles[j]) {\n angles[i] = angles[j];\n break;\n }\n }\n }\n }\n return angles;\n }\n constructor(path){\n super(path// Fix spaces after signs.\n .replace(/([+\\-.])\\s+/gm, '$1')// Remove invalid part.\n .replace(/[^MmZzLlHhVvCcSsQqTtAae\\d\\s.,+-].*/g, ''));\n this.control = new Point(0, 0);\n this.start = new Point(0, 0);\n this.current = new Point(0, 0);\n this.command = null;\n this.commands = this.commands;\n this.i = -1;\n this.previousCommand = null;\n this.points = [];\n this.angles = [];\n }\n}\n\nclass PathElement extends RenderedElement {\n path(ctx) {\n const { pathParser } = this;\n const boundingBox = new BoundingBox();\n pathParser.reset();\n if (ctx) {\n ctx.beginPath();\n }\n while(!pathParser.isEnd()){\n switch(pathParser.next().type){\n case PathParser.MOVE_TO:\n this.pathM(ctx, boundingBox);\n break;\n case PathParser.LINE_TO:\n this.pathL(ctx, boundingBox);\n break;\n case PathParser.HORIZ_LINE_TO:\n this.pathH(ctx, boundingBox);\n break;\n case PathParser.VERT_LINE_TO:\n this.pathV(ctx, boundingBox);\n break;\n case PathParser.CURVE_TO:\n this.pathC(ctx, boundingBox);\n break;\n case PathParser.SMOOTH_CURVE_TO:\n this.pathS(ctx, boundingBox);\n break;\n case PathParser.QUAD_TO:\n this.pathQ(ctx, boundingBox);\n break;\n case PathParser.SMOOTH_QUAD_TO:\n this.pathT(ctx, boundingBox);\n break;\n case PathParser.ARC:\n this.pathA(ctx, boundingBox);\n break;\n case PathParser.CLOSE_PATH:\n this.pathZ(ctx, boundingBox);\n break;\n }\n }\n return boundingBox;\n }\n getBoundingBox(_ctx) {\n return this.path();\n }\n getMarkers() {\n const { pathParser } = this;\n const points = pathParser.getMarkerPoints();\n const angles = pathParser.getMarkerAngles();\n const markers = points.map((point, i)=>[\n point,\n angles[i]\n ]\n );\n return markers;\n }\n renderChildren(ctx) {\n this.path(ctx);\n this.document.screen.mouse.checkPath(this, ctx);\n const fillRuleStyleProp = this.getStyle('fill-rule');\n if (ctx.fillStyle !== '') {\n if (fillRuleStyleProp.getString('inherit') !== 'inherit') {\n ctx.fill(fillRuleStyleProp.getString());\n } else {\n ctx.fill();\n }\n }\n if (ctx.strokeStyle !== '') {\n if (this.getAttribute('vector-effect').getString() === 'non-scaling-stroke') {\n ctx.save();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.stroke();\n ctx.restore();\n } else {\n ctx.stroke();\n }\n }\n const markers = this.getMarkers();\n if (markers) {\n const markersLastIndex = markers.length - 1;\n const markerStartStyleProp = this.getStyle('marker-start');\n const markerMidStyleProp = this.getStyle('marker-mid');\n const markerEndStyleProp = this.getStyle('marker-end');\n if (markerStartStyleProp.isUrlDefinition()) {\n const marker = markerStartStyleProp.getDefinition();\n const [point, angle] = markers[0];\n marker.render(ctx, point, angle);\n }\n if (markerMidStyleProp.isUrlDefinition()) {\n const marker = markerMidStyleProp.getDefinition();\n for(let i = 1; i < markersLastIndex; i++){\n const [point, angle] = markers[i];\n marker.render(ctx, point, angle);\n }\n }\n if (markerEndStyleProp.isUrlDefinition()) {\n const marker = markerEndStyleProp.getDefinition();\n const [point, angle] = markers[markersLastIndex];\n marker.render(ctx, point, angle);\n }\n }\n }\n static pathM(pathParser) {\n const point = pathParser.getAsCurrentPoint();\n pathParser.start = pathParser.current;\n return {\n point\n };\n }\n pathM(ctx, boundingBox) {\n const { pathParser } = this;\n const { point } = PathElement.pathM(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.moveTo(x, y);\n }\n }\n static pathL(pathParser) {\n const { current } = pathParser;\n const point = pathParser.getAsCurrentPoint();\n return {\n current,\n point\n };\n }\n pathL(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point } = PathElement.pathL(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point, current);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n }\n static pathH(pathParser) {\n const { current , command } = pathParser;\n const point = new Point((command.relative ? current.x : 0) + command.x, current.y);\n pathParser.current = point;\n return {\n current,\n point\n };\n }\n pathH(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point } = PathElement.pathH(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point, current);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n }\n static pathV(pathParser) {\n const { current , command } = pathParser;\n const point = new Point(current.x, (command.relative ? current.y : 0) + command.y);\n pathParser.current = point;\n return {\n current,\n point\n };\n }\n pathV(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point } = PathElement.pathV(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point, current);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n }\n static pathC(pathParser) {\n const { current } = pathParser;\n const point = pathParser.getPoint('x1', 'y1');\n const controlPoint = pathParser.getAsControlPoint('x2', 'y2');\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n point,\n controlPoint,\n currentPoint\n };\n }\n pathC(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point , controlPoint , currentPoint } = PathElement.pathC(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, point);\n boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathS(pathParser) {\n const { current } = pathParser;\n const point = pathParser.getReflectedControlPoint();\n const controlPoint = pathParser.getAsControlPoint('x2', 'y2');\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n point,\n controlPoint,\n currentPoint\n };\n }\n pathS(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point , controlPoint , currentPoint } = PathElement.pathS(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, point);\n boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathQ(pathParser) {\n const { current } = pathParser;\n const controlPoint = pathParser.getAsControlPoint('x1', 'y1');\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n controlPoint,\n currentPoint\n };\n }\n pathQ(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , controlPoint , currentPoint } = PathElement.pathQ(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, controlPoint);\n boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathT(pathParser) {\n const { current } = pathParser;\n const controlPoint = pathParser.getReflectedControlPoint();\n pathParser.control = controlPoint;\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n controlPoint,\n currentPoint\n };\n }\n pathT(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , controlPoint , currentPoint } = PathElement.pathT(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, controlPoint);\n boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathA(pathParser) {\n const { current , command } = pathParser;\n let { rX , rY , xRot , lArcFlag , sweepFlag } = command;\n const xAxisRotation = xRot * (Math.PI / 180);\n const currentPoint = pathParser.getAsCurrentPoint();\n // Conversion from endpoint to center parameterization\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n // x1', y1'\n const currp = new Point(Math.cos(xAxisRotation) * (current.x - currentPoint.x) / 2 + Math.sin(xAxisRotation) * (current.y - currentPoint.y) / 2, -Math.sin(xAxisRotation) * (current.x - currentPoint.x) / 2 + Math.cos(xAxisRotation) * (current.y - currentPoint.y) / 2);\n // adjust radii\n const l = Math.pow(currp.x, 2) / Math.pow(rX, 2) + Math.pow(currp.y, 2) / Math.pow(rY, 2);\n if (l > 1) {\n rX *= Math.sqrt(l);\n rY *= Math.sqrt(l);\n }\n // cx', cy'\n let s = (lArcFlag === sweepFlag ? -1 : 1) * Math.sqrt((Math.pow(rX, 2) * Math.pow(rY, 2) - Math.pow(rX, 2) * Math.pow(currp.y, 2) - Math.pow(rY, 2) * Math.pow(currp.x, 2)) / (Math.pow(rX, 2) * Math.pow(currp.y, 2) + Math.pow(rY, 2) * Math.pow(currp.x, 2)));\n if (isNaN(s)) {\n s = 0;\n }\n const cpp = new Point(s * rX * currp.y / rY, s * -rY * currp.x / rX);\n // cx, cy\n const centp = new Point((current.x + currentPoint.x) / 2 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, (current.y + currentPoint.y) / 2 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y);\n // initial angle\n const a1 = vectorsAngle([\n 1,\n 0\n ], [\n (currp.x - cpp.x) / rX,\n (currp.y - cpp.y) / rY\n ]) // θ1\n ;\n // angle delta\n const u = [\n (currp.x - cpp.x) / rX,\n (currp.y - cpp.y) / rY\n ];\n const v = [\n (-currp.x - cpp.x) / rX,\n (-currp.y - cpp.y) / rY\n ];\n let ad = vectorsAngle(u, v) // Δθ\n ;\n if (vectorsRatio(u, v) <= -1) {\n ad = Math.PI;\n }\n if (vectorsRatio(u, v) >= 1) {\n ad = 0;\n }\n return {\n currentPoint,\n rX,\n rY,\n sweepFlag,\n xAxisRotation,\n centp,\n a1,\n ad\n };\n }\n pathA(ctx, boundingBox) {\n const { pathParser } = this;\n const { currentPoint , rX , rY , sweepFlag , xAxisRotation , centp , a1 , ad } = PathElement.pathA(pathParser);\n // for markers\n const dir = 1 - sweepFlag ? 1 : -1;\n const ah = a1 + dir * (ad / 2);\n const halfWay = new Point(centp.x + rX * Math.cos(ah), centp.y + rY * Math.sin(ah));\n pathParser.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);\n pathParser.addMarkerAngle(currentPoint, ah - dir * Math.PI);\n boundingBox.addPoint(currentPoint.x, currentPoint.y) // TODO: this is too naive, make it better\n ;\n if (ctx && !isNaN(a1) && !isNaN(ad)) {\n const r = rX > rY ? rX : rY;\n const sx = rX > rY ? 1 : rX / rY;\n const sy = rX > rY ? rY / rX : 1;\n ctx.translate(centp.x, centp.y);\n ctx.rotate(xAxisRotation);\n ctx.scale(sx, sy);\n ctx.arc(0, 0, r, a1, a1 + ad, Boolean(1 - sweepFlag));\n ctx.scale(1 / sx, 1 / sy);\n ctx.rotate(-xAxisRotation);\n ctx.translate(-centp.x, -centp.y);\n }\n }\n static pathZ(pathParser) {\n pathParser.current = pathParser.start;\n }\n pathZ(ctx, boundingBox) {\n PathElement.pathZ(this.pathParser);\n if (ctx) {\n // only close path if it is not a straight line\n if (boundingBox.x1 !== boundingBox.x2 && boundingBox.y1 !== boundingBox.y2) {\n ctx.closePath();\n }\n }\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'path';\n this.pathParser = new PathParser(this.getAttribute('d').getString());\n }\n}\n\nclass SVGElement extends RenderedElement {\n setContext(ctx) {\n var ref;\n const { document } = this;\n const { screen , window } = document;\n const canvas = ctx.canvas;\n screen.setDefaults(ctx);\n if ('style' in canvas && typeof ctx.font !== 'undefined' && window && typeof window.getComputedStyle !== 'undefined') {\n ctx.font = window.getComputedStyle(canvas).getPropertyValue('font');\n const fontSizeProp = new Property(document, 'fontSize', Font.parse(ctx.font).fontSize);\n if (fontSizeProp.hasValue()) {\n document.rootEmSize = fontSizeProp.getPixels('y');\n document.emSize = document.rootEmSize;\n }\n }\n // create new view port\n if (!this.getAttribute('x').hasValue()) {\n this.getAttribute('x', true).setValue(0);\n }\n if (!this.getAttribute('y').hasValue()) {\n this.getAttribute('y', true).setValue(0);\n }\n let { width , height } = screen.viewPort;\n if (!this.getStyle('width').hasValue()) {\n this.getStyle('width', true).setValue('100%');\n }\n if (!this.getStyle('height').hasValue()) {\n this.getStyle('height', true).setValue('100%');\n }\n if (!this.getStyle('color').hasValue()) {\n this.getStyle('color', true).setValue('black');\n }\n const refXAttr = this.getAttribute('refX');\n const refYAttr = this.getAttribute('refY');\n const viewBoxAttr = this.getAttribute('viewBox');\n const viewBox = viewBoxAttr.hasValue() ? toNumbers(viewBoxAttr.getString()) : null;\n const clip = !this.root && this.getStyle('overflow').getValue('hidden') !== 'visible';\n let minX = 0;\n let minY = 0;\n let clipX = 0;\n let clipY = 0;\n if (viewBox) {\n minX = viewBox[0];\n minY = viewBox[1];\n }\n if (!this.root) {\n width = this.getStyle('width').getPixels('x');\n height = this.getStyle('height').getPixels('y');\n if (this.type === 'marker') {\n clipX = minX;\n clipY = minY;\n minX = 0;\n minY = 0;\n }\n }\n screen.viewPort.setCurrent(width, height);\n // Default value of transform-origin is center only for root SVG elements\n // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform-origin\n if (this.node // is not temporary SVGElement\n && (!this.parent || ((ref = this.node.parentNode) === null || ref === void 0 ? void 0 : ref.nodeName) === 'foreignObject') && this.getStyle('transform', false, true).hasValue() && !this.getStyle('transform-origin', false, true).hasValue()) {\n this.getStyle('transform-origin', true, true).setValue('50% 50%');\n }\n super.setContext(ctx);\n ctx.translate(this.getAttribute('x').getPixels('x'), this.getAttribute('y').getPixels('y'));\n if (viewBox) {\n width = viewBox[2];\n height = viewBox[3];\n }\n document.setViewBox({\n ctx,\n aspectRatio: this.getAttribute('preserveAspectRatio').getString(),\n width: screen.viewPort.width,\n desiredWidth: width,\n height: screen.viewPort.height,\n desiredHeight: height,\n minX,\n minY,\n refX: refXAttr.getValue(),\n refY: refYAttr.getValue(),\n clip,\n clipX,\n clipY\n });\n if (viewBox) {\n screen.viewPort.removeCurrent();\n screen.viewPort.setCurrent(width, height);\n }\n }\n clearContext(ctx) {\n super.clearContext(ctx);\n this.document.screen.viewPort.removeCurrent();\n }\n /**\n * Resize SVG to fit in given size.\n * @param width\n * @param height\n * @param preserveAspectRatio\n */ resize(width) {\n let height = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : width, preserveAspectRatio = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n const widthAttr = this.getAttribute('width', true);\n const heightAttr = this.getAttribute('height', true);\n const viewBoxAttr = this.getAttribute('viewBox');\n const styleAttr = this.getAttribute('style');\n const originWidth = widthAttr.getNumber(0);\n const originHeight = heightAttr.getNumber(0);\n if (preserveAspectRatio) {\n if (typeof preserveAspectRatio === 'string') {\n this.getAttribute('preserveAspectRatio', true).setValue(preserveAspectRatio);\n } else {\n const preserveAspectRatioAttr = this.getAttribute('preserveAspectRatio');\n if (preserveAspectRatioAttr.hasValue()) {\n preserveAspectRatioAttr.setValue(preserveAspectRatioAttr.getString().replace(/^\\s*(\\S.*\\S)\\s*$/, '$1'));\n }\n }\n }\n widthAttr.setValue(width);\n heightAttr.setValue(height);\n if (!viewBoxAttr.hasValue()) {\n viewBoxAttr.setValue(\"0 0 \".concat(originWidth || width, \" \").concat(originHeight || height));\n }\n if (styleAttr.hasValue()) {\n const widthStyle = this.getStyle('width');\n const heightStyle = this.getStyle('height');\n if (widthStyle.hasValue()) {\n widthStyle.setValue(\"\".concat(width, \"px\"));\n }\n if (heightStyle.hasValue()) {\n heightStyle.setValue(\"\".concat(height, \"px\"));\n }\n }\n }\n constructor(...args){\n super(...args);\n this.type = 'svg';\n this.root = false;\n }\n}\n\nclass RectElement extends PathElement {\n path(ctx) {\n const x = this.getAttribute('x').getPixels('x');\n const y = this.getAttribute('y').getPixels('y');\n const width = this.getStyle('width', false, true).getPixels('x');\n const height = this.getStyle('height', false, true).getPixels('y');\n const rxAttr = this.getAttribute('rx');\n const ryAttr = this.getAttribute('ry');\n let rx = rxAttr.getPixels('x');\n let ry = ryAttr.getPixels('y');\n if (rxAttr.hasValue() && !ryAttr.hasValue()) {\n ry = rx;\n }\n if (ryAttr.hasValue() && !rxAttr.hasValue()) {\n rx = ry;\n }\n rx = Math.min(rx, width / 2);\n ry = Math.min(ry, height / 2);\n if (ctx) {\n const KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);\n ctx.beginPath() // always start the path so we don't fill prior paths\n ;\n if (height > 0 && width > 0) {\n ctx.moveTo(x + rx, y);\n ctx.lineTo(x + width - rx, y);\n ctx.bezierCurveTo(x + width - rx + KAPPA * rx, y, x + width, y + ry - KAPPA * ry, x + width, y + ry);\n ctx.lineTo(x + width, y + height - ry);\n ctx.bezierCurveTo(x + width, y + height - ry + KAPPA * ry, x + width - rx + KAPPA * rx, y + height, x + width - rx, y + height);\n ctx.lineTo(x + rx, y + height);\n ctx.bezierCurveTo(x + rx - KAPPA * rx, y + height, x, y + height - ry + KAPPA * ry, x, y + height - ry);\n ctx.lineTo(x, y + ry);\n ctx.bezierCurveTo(x, y + ry - KAPPA * ry, x + rx - KAPPA * rx, y, x + rx, y);\n ctx.closePath();\n }\n }\n return new BoundingBox(x, y, x + width, y + height);\n }\n getMarkers() {\n return null;\n }\n constructor(...args){\n super(...args);\n this.type = 'rect';\n }\n}\n\nclass CircleElement extends PathElement {\n path(ctx) {\n const cx = this.getAttribute('cx').getPixels('x');\n const cy = this.getAttribute('cy').getPixels('y');\n const r = this.getAttribute('r').getPixels();\n if (ctx && r > 0) {\n ctx.beginPath();\n ctx.arc(cx, cy, r, 0, Math.PI * 2, false);\n ctx.closePath();\n }\n return new BoundingBox(cx - r, cy - r, cx + r, cy + r);\n }\n getMarkers() {\n return null;\n }\n constructor(...args){\n super(...args);\n this.type = 'circle';\n }\n}\n\nclass EllipseElement extends PathElement {\n path(ctx) {\n const KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);\n const rx = this.getAttribute('rx').getPixels('x');\n const ry = this.getAttribute('ry').getPixels('y');\n const cx = this.getAttribute('cx').getPixels('x');\n const cy = this.getAttribute('cy').getPixels('y');\n if (ctx && rx > 0 && ry > 0) {\n ctx.beginPath();\n ctx.moveTo(cx + rx, cy);\n ctx.bezierCurveTo(cx + rx, cy + KAPPA * ry, cx + KAPPA * rx, cy + ry, cx, cy + ry);\n ctx.bezierCurveTo(cx - KAPPA * rx, cy + ry, cx - rx, cy + KAPPA * ry, cx - rx, cy);\n ctx.bezierCurveTo(cx - rx, cy - KAPPA * ry, cx - KAPPA * rx, cy - ry, cx, cy - ry);\n ctx.bezierCurveTo(cx + KAPPA * rx, cy - ry, cx + rx, cy - KAPPA * ry, cx + rx, cy);\n ctx.closePath();\n }\n return new BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);\n }\n getMarkers() {\n return null;\n }\n constructor(...args){\n super(...args);\n this.type = 'ellipse';\n }\n}\n\nclass LineElement extends PathElement {\n getPoints() {\n return [\n new Point(this.getAttribute('x1').getPixels('x'), this.getAttribute('y1').getPixels('y')),\n new Point(this.getAttribute('x2').getPixels('x'), this.getAttribute('y2').getPixels('y'))\n ];\n }\n path(ctx) {\n const [{ x: x0 , y: y0 }, { x: x1 , y: y1 }] = this.getPoints();\n if (ctx) {\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n ctx.lineTo(x1, y1);\n }\n return new BoundingBox(x0, y0, x1, y1);\n }\n getMarkers() {\n const [p0, p1] = this.getPoints();\n const a = p0.angleTo(p1);\n return [\n [\n p0,\n a\n ],\n [\n p1,\n a\n ]\n ];\n }\n constructor(...args){\n super(...args);\n this.type = 'line';\n }\n}\n\nclass PolylineElement extends PathElement {\n path(ctx) {\n const { points } = this;\n const [{ x: x0 , y: y0 }] = points;\n const boundingBox = new BoundingBox(x0, y0);\n if (ctx) {\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n }\n points.forEach((param)=>{\n let { x , y } = param;\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n });\n return boundingBox;\n }\n getMarkers() {\n const { points } = this;\n const lastIndex = points.length - 1;\n const markers = [];\n points.forEach((point, i)=>{\n if (i === lastIndex) {\n return;\n }\n markers.push([\n point,\n point.angleTo(points[i + 1])\n ]);\n });\n if (markers.length > 0) {\n markers.push([\n points[points.length - 1],\n markers[markers.length - 1][1]\n ]);\n }\n return markers;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'polyline';\n this.points = [];\n this.points = Point.parsePath(this.getAttribute('points').getString());\n }\n}\n\nclass PolygonElement extends PolylineElement {\n path(ctx) {\n const boundingBox = super.path(ctx);\n const [{ x , y }] = this.points;\n if (ctx) {\n ctx.lineTo(x, y);\n ctx.closePath();\n }\n return boundingBox;\n }\n constructor(...args){\n super(...args);\n this.type = 'polygon';\n }\n}\n\nclass PatternElement extends Element {\n createPattern(ctx, _, parentOpacityProp) {\n const width = this.getStyle('width').getPixels('x', true);\n const height = this.getStyle('height').getPixels('y', true);\n // render me using a temporary svg element\n const patternSvg = new SVGElement(this.document, null);\n patternSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());\n patternSvg.attributes.width = new Property(this.document, 'width', \"\".concat(width, \"px\"));\n patternSvg.attributes.height = new Property(this.document, 'height', \"\".concat(height, \"px\"));\n patternSvg.attributes.transform = new Property(this.document, 'transform', this.getAttribute('patternTransform').getValue());\n patternSvg.children = this.children;\n const patternCanvas = this.document.createCanvas(width, height);\n const patternCtx = patternCanvas.getContext('2d');\n const xAttr = this.getAttribute('x');\n const yAttr = this.getAttribute('y');\n if (xAttr.hasValue() && yAttr.hasValue()) {\n patternCtx.translate(xAttr.getPixels('x', true), yAttr.getPixels('y', true));\n }\n if (parentOpacityProp.hasValue()) {\n this.styles['fill-opacity'] = parentOpacityProp;\n } else {\n Reflect.deleteProperty(this.styles, 'fill-opacity');\n }\n // render 3x3 grid so when we transform there's no white space on edges\n for(let x = -1; x <= 1; x++){\n for(let y = -1; y <= 1; y++){\n patternCtx.save();\n patternSvg.attributes.x = new Property(this.document, 'x', x * patternCanvas.width);\n patternSvg.attributes.y = new Property(this.document, 'y', y * patternCanvas.height);\n patternSvg.render(patternCtx);\n patternCtx.restore();\n }\n }\n const pattern = ctx.createPattern(patternCanvas, 'repeat');\n return pattern;\n }\n constructor(...args){\n super(...args);\n this.type = 'pattern';\n }\n}\n\nclass MarkerElement extends Element {\n render(ctx, point, angle) {\n if (!point) {\n return;\n }\n const { x , y } = point;\n const orient = this.getAttribute('orient').getString('auto');\n const markerUnits = this.getAttribute('markerUnits').getString('strokeWidth');\n ctx.translate(x, y);\n if (orient === 'auto') {\n ctx.rotate(angle);\n }\n if (markerUnits === 'strokeWidth') {\n ctx.scale(ctx.lineWidth, ctx.lineWidth);\n }\n ctx.save();\n // render me using a temporary svg element\n const markerSvg = new SVGElement(this.document);\n markerSvg.type = this.type;\n markerSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());\n markerSvg.attributes.refX = new Property(this.document, 'refX', this.getAttribute('refX').getValue());\n markerSvg.attributes.refY = new Property(this.document, 'refY', this.getAttribute('refY').getValue());\n markerSvg.attributes.width = new Property(this.document, 'width', this.getAttribute('markerWidth').getValue());\n markerSvg.attributes.height = new Property(this.document, 'height', this.getAttribute('markerHeight').getValue());\n markerSvg.attributes.overflow = new Property(this.document, 'overflow', this.getAttribute('overflow').getValue());\n markerSvg.attributes.fill = new Property(this.document, 'fill', this.getAttribute('fill').getColor('black'));\n markerSvg.attributes.stroke = new Property(this.document, 'stroke', this.getAttribute('stroke').getValue('none'));\n markerSvg.children = this.children;\n markerSvg.render(ctx);\n ctx.restore();\n if (markerUnits === 'strokeWidth') {\n ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);\n }\n if (orient === 'auto') {\n ctx.rotate(-angle);\n }\n ctx.translate(-x, -y);\n }\n constructor(...args){\n super(...args);\n this.type = 'marker';\n }\n}\n\nclass DefsElement extends Element {\n render() {\n // NOOP\n }\n constructor(...args){\n super(...args);\n this.type = 'defs';\n }\n}\n\nclass GElement extends RenderedElement {\n getBoundingBox(ctx) {\n const boundingBox = new BoundingBox();\n this.children.forEach((child)=>{\n boundingBox.addBoundingBox(child.getBoundingBox(ctx));\n });\n return boundingBox;\n }\n constructor(...args){\n super(...args);\n this.type = 'g';\n }\n}\n\nclass GradientElement extends Element {\n getGradientUnits() {\n return this.getAttribute('gradientUnits').getString('objectBoundingBox');\n }\n createGradient(ctx, element, parentOpacityProp) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n let stopsContainer = this;\n if (this.getHrefAttribute().hasValue()) {\n stopsContainer = this.getHrefAttribute().getDefinition();\n this.inheritStopContainer(stopsContainer);\n }\n const { stops } = stopsContainer;\n const gradient = this.getGradient(ctx, element);\n if (!gradient) {\n return this.addParentOpacity(parentOpacityProp, stops[stops.length - 1].color);\n }\n stops.forEach((stop)=>{\n gradient.addColorStop(stop.offset, this.addParentOpacity(parentOpacityProp, stop.color));\n });\n if (this.getAttribute('gradientTransform').hasValue()) {\n // render as transformed pattern on temporary canvas\n const { document } = this;\n const { MAX_VIRTUAL_PIXELS } = Screen;\n const { viewPort } = document.screen;\n const rootView = viewPort.getRoot();\n const rect = new RectElement(document);\n rect.attributes.x = new Property(document, 'x', -MAX_VIRTUAL_PIXELS / 3);\n rect.attributes.y = new Property(document, 'y', -MAX_VIRTUAL_PIXELS / 3);\n rect.attributes.width = new Property(document, 'width', MAX_VIRTUAL_PIXELS);\n rect.attributes.height = new Property(document, 'height', MAX_VIRTUAL_PIXELS);\n const group = new GElement(document);\n group.attributes.transform = new Property(document, 'transform', this.getAttribute('gradientTransform').getValue());\n group.children = [\n rect\n ];\n const patternSvg = new SVGElement(document);\n patternSvg.attributes.x = new Property(document, 'x', 0);\n patternSvg.attributes.y = new Property(document, 'y', 0);\n patternSvg.attributes.width = new Property(document, 'width', rootView.width);\n patternSvg.attributes.height = new Property(document, 'height', rootView.height);\n patternSvg.children = [\n group\n ];\n const patternCanvas = document.createCanvas(rootView.width, rootView.height);\n const patternCtx = patternCanvas.getContext('2d');\n patternCtx.fillStyle = gradient;\n patternSvg.render(patternCtx);\n return patternCtx.createPattern(patternCanvas, 'no-repeat');\n }\n return gradient;\n }\n inheritStopContainer(stopsContainer) {\n this.attributesToInherit.forEach((attributeToInherit)=>{\n if (!this.getAttribute(attributeToInherit).hasValue() && stopsContainer.getAttribute(attributeToInherit).hasValue()) {\n this.getAttribute(attributeToInherit, true).setValue(stopsContainer.getAttribute(attributeToInherit).getValue());\n }\n });\n }\n addParentOpacity(parentOpacityProp, color) {\n if (parentOpacityProp.hasValue()) {\n const colorProp = new Property(this.document, 'color', color);\n return colorProp.addOpacity(parentOpacityProp).getColor();\n }\n return color;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.attributesToInherit = [\n 'gradientUnits'\n ];\n this.stops = [];\n const { stops , children } = this;\n children.forEach((child)=>{\n if (child.type === 'stop') {\n stops.push(child);\n }\n });\n }\n}\n\nclass LinearGradientElement extends GradientElement {\n getGradient(ctx, element) {\n const isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';\n const boundingBox = isBoundingBoxUnits ? element.getBoundingBox(ctx) : null;\n if (isBoundingBoxUnits && !boundingBox) {\n return null;\n }\n if (!this.getAttribute('x1').hasValue() && !this.getAttribute('y1').hasValue() && !this.getAttribute('x2').hasValue() && !this.getAttribute('y2').hasValue()) {\n this.getAttribute('x1', true).setValue(0);\n this.getAttribute('y1', true).setValue(0);\n this.getAttribute('x2', true).setValue(1);\n this.getAttribute('y2', true).setValue(0);\n }\n const x1 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x1').getNumber() : this.getAttribute('x1').getPixels('x');\n const y1 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y1').getNumber() : this.getAttribute('y1').getPixels('y');\n const x2 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x2').getNumber() : this.getAttribute('x2').getPixels('x');\n const y2 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y2').getNumber() : this.getAttribute('y2').getPixels('y');\n if (x1 === x2 && y1 === y2) {\n return null;\n }\n return ctx.createLinearGradient(x1, y1, x2, y2);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'linearGradient';\n this.attributesToInherit.push('x1', 'y1', 'x2', 'y2');\n }\n}\n\nclass RadialGradientElement extends GradientElement {\n getGradient(ctx, element) {\n const isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';\n const boundingBox = element.getBoundingBox(ctx);\n if (isBoundingBoxUnits && !boundingBox) {\n return null;\n }\n if (!this.getAttribute('cx').hasValue()) {\n this.getAttribute('cx', true).setValue('50%');\n }\n if (!this.getAttribute('cy').hasValue()) {\n this.getAttribute('cy', true).setValue('50%');\n }\n if (!this.getAttribute('r').hasValue()) {\n this.getAttribute('r', true).setValue('50%');\n }\n const cx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('cx').getNumber() : this.getAttribute('cx').getPixels('x');\n const cy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('cy').getNumber() : this.getAttribute('cy').getPixels('y');\n let fx = cx;\n let fy = cy;\n if (this.getAttribute('fx').hasValue()) {\n fx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('fx').getNumber() : this.getAttribute('fx').getPixels('x');\n }\n if (this.getAttribute('fy').hasValue()) {\n fy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('fy').getNumber() : this.getAttribute('fy').getPixels('y');\n }\n const r = isBoundingBoxUnits ? (boundingBox.width + boundingBox.height) / 2 * this.getAttribute('r').getNumber() : this.getAttribute('r').getPixels();\n const fr = this.getAttribute('fr').getPixels();\n return ctx.createRadialGradient(fx, fy, fr, cx, cy, r);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'radialGradient';\n this.attributesToInherit.push('cx', 'cy', 'r', 'fx', 'fy', 'fr');\n }\n}\n\nclass StopElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'stop';\n const offset = Math.max(0, Math.min(1, this.getAttribute('offset').getNumber()));\n const stopOpacity = this.getStyle('stop-opacity');\n let stopColor = this.getStyle('stop-color', true);\n if (stopColor.getString() === '') {\n stopColor.setValue('#000');\n }\n if (stopOpacity.hasValue()) {\n stopColor = stopColor.addOpacity(stopOpacity);\n }\n this.offset = offset;\n this.color = stopColor.getColor();\n }\n}\n\nclass AnimateElement extends Element {\n getProperty() {\n const attributeType = this.getAttribute('attributeType').getString();\n const attributeName = this.getAttribute('attributeName').getString();\n if (attributeType === 'CSS') {\n return this.parent.getStyle(attributeName, true);\n }\n return this.parent.getAttribute(attributeName, true);\n }\n calcValue() {\n const { initialUnits } = this;\n const { progress , from , to } = this.getProgress();\n // tween value linearly\n let newValue = from.getNumber() + (to.getNumber() - from.getNumber()) * progress;\n if (initialUnits === '%') {\n newValue *= 100 // numValue() returns 0-1 whereas properties are 0-100\n ;\n }\n return \"\".concat(newValue).concat(initialUnits);\n }\n update(delta) {\n const { parent } = this;\n const prop = this.getProperty();\n // set initial value\n if (!this.initialValue) {\n this.initialValue = prop.getString();\n this.initialUnits = prop.getUnits();\n }\n // if we're past the end time\n if (this.duration > this.maxDuration) {\n const fill = this.getAttribute('fill').getString('remove');\n // loop for indefinitely repeating animations\n if (this.getAttribute('repeatCount').getString() === 'indefinite' || this.getAttribute('repeatDur').getString() === 'indefinite') {\n this.duration = 0;\n } else if (fill === 'freeze' && !this.frozen) {\n this.frozen = true;\n if (parent && prop) {\n parent.animationFrozen = true;\n parent.animationFrozenValue = prop.getString();\n }\n } else if (fill === 'remove' && !this.removed) {\n this.removed = true;\n if (parent && prop) {\n prop.setValue(parent.animationFrozen ? parent.animationFrozenValue : this.initialValue);\n }\n return true;\n }\n return false;\n }\n this.duration += delta;\n // if we're past the begin time\n let updated = false;\n if (this.begin < this.duration) {\n let newValue = this.calcValue() // tween\n ;\n const typeAttr = this.getAttribute('type');\n if (typeAttr.hasValue()) {\n // for transform, etc.\n const type = typeAttr.getString();\n newValue = \"\".concat(type, \"(\").concat(newValue, \")\");\n }\n prop.setValue(newValue);\n updated = true;\n }\n return updated;\n }\n getProgress() {\n const { document , values } = this;\n let progress = (this.duration - this.begin) / (this.maxDuration - this.begin);\n let from;\n let to;\n if (values.hasValue()) {\n const p = progress * (values.getValue().length - 1);\n const lb = Math.floor(p);\n const ub = Math.ceil(p);\n let value;\n value = values.getValue()[lb];\n from = new Property(document, 'from', value ? parseFloat(value) : 0);\n value = values.getValue()[ub];\n to = new Property(document, 'to', value ? parseFloat(value) : 0);\n progress = (p - lb) / (ub - lb);\n } else {\n from = this.from;\n to = this.to;\n }\n return {\n progress,\n from,\n to\n };\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'animate';\n this.duration = 0;\n this.initialUnits = '';\n this.removed = false;\n this.frozen = false;\n document.screen.animations.push(this);\n this.begin = this.getAttribute('begin').getMilliseconds();\n this.maxDuration = this.begin + this.getAttribute('dur').getMilliseconds();\n this.from = this.getAttribute('from');\n this.to = this.getAttribute('to');\n this.values = new Property(document, 'values', null);\n const valuesAttr = this.getAttribute('values');\n if (valuesAttr.hasValue()) {\n this.values.setValue(valuesAttr.getString().split(';'));\n }\n }\n}\n\nclass AnimateColorElement extends AnimateElement {\n calcValue() {\n const { progress , from , to } = this.getProgress();\n const colorFrom = new RGBColor__default[\"default\"](from.getColor());\n const colorTo = new RGBColor__default[\"default\"](to.getColor());\n if (colorFrom.ok && colorTo.ok) {\n // tween color linearly\n const r = colorFrom.r + (colorTo.r - colorFrom.r) * progress;\n const g = colorFrom.g + (colorTo.g - colorFrom.g) * progress;\n const b = colorFrom.b + (colorTo.b - colorFrom.b) * progress;\n // ? alpha\n return \"rgb(\".concat(Math.floor(r), \", \").concat(Math.floor(g), \", \").concat(Math.floor(b), \")\");\n }\n return this.getAttribute('from').getColor();\n }\n constructor(...args){\n super(...args);\n this.type = 'animateColor';\n }\n}\n\nclass AnimateTransformElement extends AnimateElement {\n calcValue() {\n const { progress , from: from1 , to: to1 } = this.getProgress();\n // tween value linearly\n const transformFrom = toNumbers(from1.getString());\n const transformTo = toNumbers(to1.getString());\n const newValue = transformFrom.map((from, i)=>{\n const to = transformTo[i];\n return from + (to - from) * progress;\n }).join(' ');\n return newValue;\n }\n constructor(...args){\n super(...args);\n this.type = 'animateTransform';\n }\n}\n\nclass FontFaceElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'font-face';\n this.ascent = this.getAttribute('ascent').getNumber();\n this.descent = this.getAttribute('descent').getNumber();\n this.unitsPerEm = this.getAttribute('units-per-em').getNumber();\n }\n}\n\nclass GlyphElement extends PathElement {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'glyph';\n this.horizAdvX = this.getAttribute('horiz-adv-x').getNumber();\n this.unicode = this.getAttribute('unicode').getString();\n this.arabicForm = this.getAttribute('arabic-form').getString();\n }\n}\n\nclass MissingGlyphElement extends GlyphElement {\n constructor(...args){\n super(...args);\n this.type = 'missing-glyph';\n this.horizAdvX = 0;\n }\n}\n\nclass FontElement extends Element {\n render() {\n // NO RENDER\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'font';\n this.isArabic = false;\n this.glyphs = {};\n this.arabicGlyphs = {};\n this.isRTL = false;\n this.horizAdvX = this.getAttribute('horiz-adv-x').getNumber();\n const { definitions } = document;\n const { children } = this;\n for (const child of children){\n if (child instanceof FontFaceElement) {\n this.fontFace = child;\n const fontFamilyStyle = child.getStyle('font-family');\n if (fontFamilyStyle.hasValue()) {\n definitions[fontFamilyStyle.getString()] = this;\n }\n } else if (child instanceof MissingGlyphElement) {\n this.missingGlyph = child;\n } else if (child instanceof GlyphElement) {\n if (child.arabicForm) {\n this.isRTL = true;\n this.isArabic = true;\n const arabicGlyph = this.arabicGlyphs[child.unicode];\n if (typeof arabicGlyph === 'undefined') {\n this.arabicGlyphs[child.unicode] = {\n [child.arabicForm]: child\n };\n } else {\n arabicGlyph[child.arabicForm] = child;\n }\n } else {\n this.glyphs[child.unicode] = child;\n }\n }\n }\n }\n}\n\nclass TRefElement extends TextElement {\n getText() {\n const element = this.getHrefAttribute().getDefinition();\n if (element) {\n const firstChild = element.children[0];\n if (firstChild) {\n return firstChild.getText();\n }\n }\n return '';\n }\n constructor(...args){\n super(...args);\n this.type = 'tref';\n }\n}\n\nclass AElement extends TextElement {\n getText() {\n return this.text;\n }\n renderChildren(ctx) {\n if (this.hasText) {\n // render as text element\n super.renderChildren(ctx);\n const { document , x , y } = this;\n const { mouse } = document.screen;\n const fontSize = new Property(document, 'fontSize', Font.parse(document.ctx.font).fontSize);\n // Do not calc bounding box if mouse is not working.\n if (mouse.isWorking()) {\n mouse.checkBoundingBox(this, new BoundingBox(x, y - fontSize.getPixels('y'), x + this.measureText(ctx), y));\n }\n } else if (this.children.length > 0) {\n // render as temporary group\n const g = new GElement(this.document);\n g.children = this.children;\n g.parent = this;\n g.render(ctx);\n }\n }\n onClick() {\n const { window } = this.document;\n if (window) {\n window.open(this.getHrefAttribute().getString());\n }\n }\n onMouseMove() {\n const ctx = this.document.ctx;\n ctx.canvas.style.cursor = 'pointer';\n }\n constructor(document, node1, captureTextNodes){\n super(document, node1, captureTextNodes);\n this.type = 'a';\n const { childNodes } = node1;\n const firstChild = childNodes[0];\n const hasText = childNodes.length > 0 && Array.from(childNodes).every((node)=>node.nodeType === 3\n );\n this.hasText = hasText;\n this.text = hasText ? this.getTextFromNode(firstChild) : '';\n }\n}\n\nclass TextPathElement extends TextElement {\n getText() {\n return this.text;\n }\n path(ctx) {\n const { dataArray } = this;\n if (ctx) {\n ctx.beginPath();\n }\n dataArray.forEach((param)=>{\n let { type , points } = param;\n switch(type){\n case PathParser.LINE_TO:\n if (ctx) {\n ctx.lineTo(points[0], points[1]);\n }\n break;\n case PathParser.MOVE_TO:\n if (ctx) {\n ctx.moveTo(points[0], points[1]);\n }\n break;\n case PathParser.CURVE_TO:\n if (ctx) {\n ctx.bezierCurveTo(points[0], points[1], points[2], points[3], points[4], points[5]);\n }\n break;\n case PathParser.QUAD_TO:\n if (ctx) {\n ctx.quadraticCurveTo(points[0], points[1], points[2], points[3]);\n }\n break;\n case PathParser.ARC:\n {\n const [cx, cy, rx, ry, theta, dTheta, psi, fs] = points;\n const r = rx > ry ? rx : ry;\n const scaleX = rx > ry ? 1 : rx / ry;\n const scaleY = rx > ry ? ry / rx : 1;\n if (ctx) {\n ctx.translate(cx, cy);\n ctx.rotate(psi);\n ctx.scale(scaleX, scaleY);\n ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs));\n ctx.scale(1 / scaleX, 1 / scaleY);\n ctx.rotate(-psi);\n ctx.translate(-cx, -cy);\n }\n break;\n }\n case PathParser.CLOSE_PATH:\n if (ctx) {\n ctx.closePath();\n }\n break;\n }\n });\n }\n renderChildren(ctx) {\n this.setTextData(ctx);\n ctx.save();\n const textDecoration = this.parent.getStyle('text-decoration').getString();\n const fontSize = this.getFontSize();\n const { glyphInfo } = this;\n const fill = ctx.fillStyle;\n if (textDecoration === 'underline') {\n ctx.beginPath();\n }\n glyphInfo.forEach((glyph, i)=>{\n const { p0 , p1 , rotation , text: partialText } = glyph;\n ctx.save();\n ctx.translate(p0.x, p0.y);\n ctx.rotate(rotation);\n if (ctx.fillStyle) {\n ctx.fillText(partialText, 0, 0);\n }\n if (ctx.strokeStyle) {\n ctx.strokeText(partialText, 0, 0);\n }\n ctx.restore();\n if (textDecoration === 'underline') {\n if (i === 0) {\n ctx.moveTo(p0.x, p0.y + fontSize / 8);\n }\n ctx.lineTo(p1.x, p1.y + fontSize / 5);\n }\n // // To assist with debugging visually, uncomment following\n //\n // ctx.beginPath();\n // if (i % 2)\n // ctx.strokeStyle = 'red';\n // else\n // ctx.strokeStyle = 'green';\n // ctx.moveTo(p0.x, p0.y);\n // ctx.lineTo(p1.x, p1.y);\n // ctx.stroke();\n // ctx.closePath();\n });\n if (textDecoration === 'underline') {\n ctx.lineWidth = fontSize / 20;\n ctx.strokeStyle = fill;\n ctx.stroke();\n ctx.closePath();\n }\n ctx.restore();\n }\n getLetterSpacingAt() {\n let idx = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;\n return this.letterSpacingCache[idx] || 0;\n }\n findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, inputOffset, dy, c, charI) {\n let offset = inputOffset;\n let glyphWidth = this.measureText(ctx, c);\n if (c === ' ' && anchor === 'justify' && textFullWidth < fullPathWidth) {\n glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;\n }\n if (charI > -1) {\n offset += this.getLetterSpacingAt(charI);\n }\n const splineStep = this.textHeight / 20;\n const p0 = this.getEquidistantPointOnPath(offset, splineStep, 0);\n const p1 = this.getEquidistantPointOnPath(offset + glyphWidth, splineStep, 0);\n const segment = {\n p0,\n p1\n };\n const rotation = p0 && p1 ? Math.atan2(p1.y - p0.y, p1.x - p0.x) : 0;\n if (dy) {\n const dyX = Math.cos(Math.PI / 2 + rotation) * dy;\n const dyY = Math.cos(-rotation) * dy;\n segment.p0 = {\n ...p0,\n x: p0.x + dyX,\n y: p0.y + dyY\n };\n segment.p1 = {\n ...p1,\n x: p1.x + dyX,\n y: p1.y + dyY\n };\n }\n offset += glyphWidth;\n return {\n offset,\n segment,\n rotation\n };\n }\n measureText(ctx, text) {\n const { measuresCache } = this;\n const targetText = text || this.getText();\n if (measuresCache.has(targetText)) {\n return measuresCache.get(targetText);\n }\n const measure = this.measureTargetText(ctx, targetText);\n measuresCache.set(targetText, measure);\n return measure;\n }\n // This method supposes what all custom fonts already loaded.\n // If some font will be loaded after this method call, will not be rendered correctly.\n // You need to call this method manually to update glyphs cache.\n setTextData(ctx) {\n if (this.glyphInfo) {\n return;\n }\n const renderText = this.getText();\n const chars = renderText.split('');\n const spacesNumber = renderText.split(' ').length - 1;\n const dx = this.parent.getAttribute('dx').split().map((_)=>_.getPixels('x')\n );\n const dy = this.parent.getAttribute('dy').getPixels('y');\n const anchor = this.parent.getStyle('text-anchor').getString('start');\n const thisSpacing = this.getStyle('letter-spacing');\n const parentSpacing = this.parent.getStyle('letter-spacing');\n let letterSpacing = 0;\n if (!thisSpacing.hasValue() || thisSpacing.getValue() === 'inherit') {\n letterSpacing = parentSpacing.getPixels();\n } else if (thisSpacing.hasValue()) {\n if (thisSpacing.getValue() !== 'initial' && thisSpacing.getValue() !== 'unset') {\n letterSpacing = thisSpacing.getPixels();\n }\n }\n // fill letter-spacing cache\n const letterSpacingCache = [];\n const textLen = renderText.length;\n this.letterSpacingCache = letterSpacingCache;\n for(let i1 = 0; i1 < textLen; i1++){\n letterSpacingCache.push(typeof dx[i1] !== 'undefined' ? dx[i1] : letterSpacing);\n }\n const dxSum = letterSpacingCache.reduce((acc, cur, i)=>i === 0 ? 0 : acc + cur || 0\n , 0);\n const textWidth = this.measureText(ctx);\n const textFullWidth = Math.max(textWidth + dxSum, 0);\n this.textWidth = textWidth;\n this.textHeight = this.getFontSize();\n this.glyphInfo = [];\n const fullPathWidth = this.getPathLength();\n const startOffset = this.getStyle('startOffset').getNumber(0) * fullPathWidth;\n let offset = 0;\n if (anchor === 'middle' || anchor === 'center') {\n offset = -textFullWidth / 2;\n }\n if (anchor === 'end' || anchor === 'right') {\n offset = -textFullWidth;\n }\n offset += startOffset;\n chars.forEach((char, i)=>{\n // Find such segment what distance between p0 and p1 is approx. width of glyph\n const { offset: nextOffset , segment , rotation } = this.findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, offset, dy, char, i);\n offset = nextOffset;\n if (!segment.p0 || !segment.p1) {\n return;\n }\n // const width = this.getLineLength(\n // segment.p0.x,\n // segment.p0.y,\n // segment.p1.x,\n // segment.p1.y\n // );\n // Note: Since glyphs are rendered one at a time, any kerning pair data built into the font will not be used.\n // Can foresee having a rough pair table built in that the developer can override as needed.\n // Or use \"dx\" attribute of the node as a naive replacement\n // const kern = 0;\n // placeholder for future implementation\n // const midpoint = this.getPointOnLine(\n // kern + width / 2.0,\n // segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y\n // );\n this.glyphInfo.push({\n // transposeX: midpoint.x,\n // transposeY: midpoint.y,\n text: chars[i],\n p0: segment.p0,\n p1: segment.p1,\n rotation\n });\n });\n }\n parsePathData(path) {\n this.pathLength = -1 // reset path length\n ;\n if (!path) {\n return [];\n }\n const pathCommands = [];\n const { pathParser } = path;\n pathParser.reset();\n // convert l, H, h, V, and v to L\n while(!pathParser.isEnd()){\n const { current } = pathParser;\n const startX = current ? current.x : 0;\n const startY = current ? current.y : 0;\n const command = pathParser.next();\n let nextCommandType = command.type;\n let points = [];\n switch(command.type){\n case PathParser.MOVE_TO:\n this.pathM(pathParser, points);\n break;\n case PathParser.LINE_TO:\n nextCommandType = this.pathL(pathParser, points);\n break;\n case PathParser.HORIZ_LINE_TO:\n nextCommandType = this.pathH(pathParser, points);\n break;\n case PathParser.VERT_LINE_TO:\n nextCommandType = this.pathV(pathParser, points);\n break;\n case PathParser.CURVE_TO:\n this.pathC(pathParser, points);\n break;\n case PathParser.SMOOTH_CURVE_TO:\n nextCommandType = this.pathS(pathParser, points);\n break;\n case PathParser.QUAD_TO:\n this.pathQ(pathParser, points);\n break;\n case PathParser.SMOOTH_QUAD_TO:\n nextCommandType = this.pathT(pathParser, points);\n break;\n case PathParser.ARC:\n points = this.pathA(pathParser);\n break;\n case PathParser.CLOSE_PATH:\n PathElement.pathZ(pathParser);\n break;\n }\n if (command.type !== PathParser.CLOSE_PATH) {\n pathCommands.push({\n type: nextCommandType,\n points,\n start: {\n x: startX,\n y: startY\n },\n pathLength: this.calcLength(startX, startY, nextCommandType, points)\n });\n } else {\n pathCommands.push({\n type: PathParser.CLOSE_PATH,\n points: [],\n pathLength: 0\n });\n }\n }\n return pathCommands;\n }\n pathM(pathParser, points) {\n const { x , y } = PathElement.pathM(pathParser).point;\n points.push(x, y);\n }\n pathL(pathParser, points) {\n const { x , y } = PathElement.pathL(pathParser).point;\n points.push(x, y);\n return PathParser.LINE_TO;\n }\n pathH(pathParser, points) {\n const { x , y } = PathElement.pathH(pathParser).point;\n points.push(x, y);\n return PathParser.LINE_TO;\n }\n pathV(pathParser, points) {\n const { x , y } = PathElement.pathV(pathParser).point;\n points.push(x, y);\n return PathParser.LINE_TO;\n }\n pathC(pathParser, points) {\n const { point , controlPoint , currentPoint } = PathElement.pathC(pathParser);\n points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n pathS(pathParser, points) {\n const { point , controlPoint , currentPoint } = PathElement.pathS(pathParser);\n points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n return PathParser.CURVE_TO;\n }\n pathQ(pathParser, points) {\n const { controlPoint , currentPoint } = PathElement.pathQ(pathParser);\n points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n pathT(pathParser, points) {\n const { controlPoint , currentPoint } = PathElement.pathT(pathParser);\n points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n return PathParser.QUAD_TO;\n }\n pathA(pathParser) {\n let { rX , rY , sweepFlag , xAxisRotation , centp , a1 , ad } = PathElement.pathA(pathParser);\n if (sweepFlag === 0 && ad > 0) {\n ad -= 2 * Math.PI;\n }\n if (sweepFlag === 1 && ad < 0) {\n ad += 2 * Math.PI;\n }\n return [\n centp.x,\n centp.y,\n rX,\n rY,\n a1,\n ad,\n xAxisRotation,\n sweepFlag\n ];\n }\n calcLength(x, y, commandType, points) {\n let len = 0;\n let p1 = null;\n let p2 = null;\n let t = 0;\n switch(commandType){\n case PathParser.LINE_TO:\n return this.getLineLength(x, y, points[0], points[1]);\n case PathParser.CURVE_TO:\n // Approximates by breaking curve into 100 line segments\n len = 0;\n p1 = this.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n for(t = 0.01; t <= 1; t += 0.01){\n p2 = this.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n return len;\n case PathParser.QUAD_TO:\n // Approximates by breaking curve into 100 line segments\n len = 0;\n p1 = this.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);\n for(t = 0.01; t <= 1; t += 0.01){\n p2 = this.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n return len;\n case PathParser.ARC:\n {\n // Approximates by breaking curve into line segments\n len = 0;\n const start = points[4];\n // 4 = theta\n const dTheta = points[5];\n // 5 = dTheta\n const end = points[4] + dTheta;\n let inc = Math.PI / 180;\n // 1 degree resolution\n if (Math.abs(start - end) < inc) {\n inc = Math.abs(start - end);\n }\n // Note: for purpose of calculating arc length, not going to worry about rotating X-axis by angle psi\n p1 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);\n if (dTheta < 0) {\n for(t = start - inc; t > end; t -= inc){\n p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n } else {\n for(t = start + inc; t < end; t += inc){\n p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n }\n p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n return len;\n }\n }\n return 0;\n }\n getPointOnLine(dist, p1x, p1y, p2x, p2y) {\n let fromX = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : p1x, fromY = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : p1y;\n const m = (p2y - p1y) / (p2x - p1x + PSEUDO_ZERO);\n let run = Math.sqrt(dist * dist / (1 + m * m));\n if (p2x < p1x) {\n run *= -1;\n }\n let rise = m * run;\n let pt = null;\n if (p2x === p1x) {\n pt = {\n x: fromX,\n y: fromY + rise\n };\n } else if ((fromY - p1y) / (fromX - p1x + PSEUDO_ZERO) === m) {\n pt = {\n x: fromX + run,\n y: fromY + rise\n };\n } else {\n let ix = 0;\n let iy = 0;\n const len = this.getLineLength(p1x, p1y, p2x, p2y);\n if (len < PSEUDO_ZERO) {\n return null;\n }\n let u = (fromX - p1x) * (p2x - p1x) + (fromY - p1y) * (p2y - p1y);\n u /= len * len;\n ix = p1x + u * (p2x - p1x);\n iy = p1y + u * (p2y - p1y);\n const pRise = this.getLineLength(fromX, fromY, ix, iy);\n const pRun = Math.sqrt(dist * dist - pRise * pRise);\n run = Math.sqrt(pRun * pRun / (1 + m * m));\n if (p2x < p1x) {\n run *= -1;\n }\n rise = m * run;\n pt = {\n x: ix + run,\n y: iy + rise\n };\n }\n return pt;\n }\n getPointOnPath(distance) {\n const fullLen = this.getPathLength();\n let cumulativePathLength = 0;\n let p = null;\n if (distance < -0.00005 || distance - 0.00005 > fullLen) {\n return null;\n }\n const { dataArray } = this;\n for (const command of dataArray){\n if (command && (command.pathLength < 0.00005 || cumulativePathLength + command.pathLength + 0.00005 < distance)) {\n cumulativePathLength += command.pathLength;\n continue;\n }\n const delta = distance - cumulativePathLength;\n let currentT = 0;\n switch(command.type){\n case PathParser.LINE_TO:\n p = this.getPointOnLine(delta, command.start.x, command.start.y, command.points[0], command.points[1], command.start.x, command.start.y);\n break;\n case PathParser.ARC:\n {\n const start = command.points[4];\n // 4 = theta\n const dTheta = command.points[5];\n // 5 = dTheta\n const end = command.points[4] + dTheta;\n currentT = start + delta / command.pathLength * dTheta;\n if (dTheta < 0 && currentT < end || dTheta >= 0 && currentT > end) {\n break;\n }\n p = this.getPointOnEllipticalArc(command.points[0], command.points[1], command.points[2], command.points[3], currentT, command.points[6]);\n break;\n }\n case PathParser.CURVE_TO:\n currentT = delta / command.pathLength;\n if (currentT > 1) {\n currentT = 1;\n }\n p = this.getPointOnCubicBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3], command.points[4], command.points[5]);\n break;\n case PathParser.QUAD_TO:\n currentT = delta / command.pathLength;\n if (currentT > 1) {\n currentT = 1;\n }\n p = this.getPointOnQuadraticBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3]);\n break;\n }\n if (p) {\n return p;\n }\n break;\n }\n return null;\n }\n getLineLength(x1, y1, x2, y2) {\n return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }\n getPathLength() {\n if (this.pathLength === -1) {\n this.pathLength = this.dataArray.reduce((length, command)=>command.pathLength > 0 ? length + command.pathLength : length\n , 0);\n }\n return this.pathLength;\n }\n getPointOnCubicBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y, p4x, p4y) {\n const x = p4x * CB1(pct) + p3x * CB2(pct) + p2x * CB3(pct) + p1x * CB4(pct);\n const y = p4y * CB1(pct) + p3y * CB2(pct) + p2y * CB3(pct) + p1y * CB4(pct);\n return {\n x,\n y\n };\n }\n getPointOnQuadraticBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y) {\n const x = p3x * QB1(pct) + p2x * QB2(pct) + p1x * QB3(pct);\n const y = p3y * QB1(pct) + p2y * QB2(pct) + p1y * QB3(pct);\n return {\n x,\n y\n };\n }\n getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {\n const cosPsi = Math.cos(psi);\n const sinPsi = Math.sin(psi);\n const pt = {\n x: rx * Math.cos(theta),\n y: ry * Math.sin(theta)\n };\n return {\n x: cx + (pt.x * cosPsi - pt.y * sinPsi),\n y: cy + (pt.x * sinPsi + pt.y * cosPsi)\n };\n }\n // TODO need some optimisations. possibly build cache only for curved segments?\n buildEquidistantCache(inputStep, inputPrecision) {\n const fullLen = this.getPathLength();\n const precision = inputPrecision || 0.25 // accuracy vs performance\n ;\n const step = inputStep || fullLen / 100;\n if (!this.equidistantCache || this.equidistantCache.step !== step || this.equidistantCache.precision !== precision) {\n // Prepare cache\n this.equidistantCache = {\n step,\n precision,\n points: []\n };\n // Calculate points\n let s = 0;\n for(let l = 0; l <= fullLen; l += precision){\n const p0 = this.getPointOnPath(l);\n const p1 = this.getPointOnPath(l + precision);\n if (!p0 || !p1) {\n continue;\n }\n s += this.getLineLength(p0.x, p0.y, p1.x, p1.y);\n if (s >= step) {\n this.equidistantCache.points.push({\n x: p0.x,\n y: p0.y,\n distance: l\n });\n s -= step;\n }\n }\n }\n }\n getEquidistantPointOnPath(targetDistance, step, precision) {\n this.buildEquidistantCache(step, precision);\n if (targetDistance < 0 || targetDistance - this.getPathLength() > 0.00005) {\n return null;\n }\n const idx = Math.round(targetDistance / this.getPathLength() * (this.equidistantCache.points.length - 1));\n return this.equidistantCache.points[idx] || null;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'textPath';\n this.textWidth = 0;\n this.textHeight = 0;\n this.pathLength = -1;\n this.glyphInfo = null;\n this.letterSpacingCache = [];\n this.measuresCache = new Map([\n [\n '',\n 0\n ]\n ]);\n const pathElement = this.getHrefAttribute().getDefinition();\n this.text = this.getTextFromNode();\n this.dataArray = this.parsePathData(pathElement);\n }\n}\n\n// groups: 1: mime-type (+ charset), 2: mime-type (w/o charset), 3: charset, 4: base64?, 5: body\nconst dataUriRegex = /^\\s*data:(([^/,;]+\\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;\nclass ImageElement extends RenderedElement {\n async loadImage(href) {\n try {\n const image = await this.document.createImage(href);\n this.image = image;\n } catch (err) {\n console.error(\"Error while loading image \\\"\".concat(href, \"\\\":\"), err);\n }\n this.loaded = true;\n }\n async loadSvg(href) {\n const match = dataUriRegex.exec(href);\n if (match) {\n const data = match[5];\n if (data) {\n if (match[4] === 'base64') {\n this.image = atob(data);\n } else {\n this.image = decodeURIComponent(data);\n }\n }\n } else {\n try {\n const response = await this.document.fetch(href);\n const svg = await response.text();\n this.image = svg;\n } catch (err) {\n console.error(\"Error while loading image \\\"\".concat(href, \"\\\":\"), err);\n }\n }\n this.loaded = true;\n }\n renderChildren(ctx) {\n const { document , image , loaded } = this;\n const x = this.getAttribute('x').getPixels('x');\n const y = this.getAttribute('y').getPixels('y');\n const width = this.getStyle('width').getPixels('x');\n const height = this.getStyle('height').getPixels('y');\n if (!loaded || !image || !width || !height) {\n return;\n }\n ctx.save();\n ctx.translate(x, y);\n if (typeof image === 'string') {\n const subDocument = document.canvg.forkString(ctx, image, {\n ignoreMouse: true,\n ignoreAnimation: true,\n ignoreDimensions: true,\n ignoreClear: true,\n offsetX: 0,\n offsetY: 0,\n scaleWidth: width,\n scaleHeight: height\n });\n const { documentElement } = subDocument.document;\n if (documentElement) {\n documentElement.parent = this;\n }\n void subDocument.render();\n } else {\n document.setViewBox({\n ctx,\n aspectRatio: this.getAttribute('preserveAspectRatio').getString(),\n width,\n desiredWidth: image.width,\n height,\n desiredHeight: image.height\n });\n if (this.loaded) {\n if (!('complete' in image) || image.complete) {\n ctx.drawImage(image, 0, 0);\n }\n }\n }\n ctx.restore();\n }\n getBoundingBox() {\n const x = this.getAttribute('x').getPixels('x');\n const y = this.getAttribute('y').getPixels('y');\n const width = this.getStyle('width').getPixels('x');\n const height = this.getStyle('height').getPixels('y');\n return new BoundingBox(x, y, x + width, y + height);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'image';\n this.loaded = false;\n const href = this.getHrefAttribute().getString();\n if (!href) {\n return;\n }\n const isSvg = href.endsWith('.svg') || /^\\s*data:image\\/svg\\+xml/i.test(href);\n document.images.push(this);\n if (!isSvg) {\n void this.loadImage(href);\n } else {\n void this.loadSvg(href);\n }\n }\n}\n\nclass SymbolElement extends RenderedElement {\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'symbol';\n }\n}\n\nclass SVGFontLoader {\n async load(fontFamily, url) {\n try {\n const { document } = this;\n const svgDocument = await document.canvg.parser.load(url);\n const fonts = svgDocument.getElementsByTagName('font');\n Array.from(fonts).forEach((fontNode)=>{\n const font = document.createElement(fontNode);\n document.definitions[fontFamily] = font;\n });\n } catch (err) {\n console.error(\"Error while loading font \\\"\".concat(url, \"\\\":\"), err);\n }\n this.loaded = true;\n }\n constructor(document){\n this.document = document;\n this.loaded = false;\n document.fonts.push(this);\n }\n}\n\nclass StyleElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'style';\n const css = compressSpaces(Array.from(node.childNodes)// NEED TEST\n .map((_)=>_.textContent\n ).join('').replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm, '') // remove comments\n .replace(/@import.*;/g, '') // remove imports\n );\n const cssDefs = css.split('}');\n cssDefs.forEach((_1)=>{\n const def = _1.trim();\n if (!def) {\n return;\n }\n const cssParts = def.split('{');\n const cssClasses = cssParts[0].split(',');\n const cssProps = cssParts[1].split(';');\n cssClasses.forEach((_)=>{\n const cssClass = _.trim();\n if (!cssClass) {\n return;\n }\n const props = document.styles[cssClass] || {};\n cssProps.forEach((cssProp)=>{\n const prop = cssProp.indexOf(':');\n const name = cssProp.substr(0, prop).trim();\n const value = cssProp.substr(prop + 1, cssProp.length - prop).trim();\n if (name && value) {\n props[name] = new Property(document, name, value);\n }\n });\n document.styles[cssClass] = props;\n document.stylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);\n if (cssClass === '@font-face') {\n const fontFamily = props['font-family'].getString().replace(/\"|'/g, '');\n const srcs = props.src.getString().split(',');\n srcs.forEach((src)=>{\n if (src.indexOf('format(\"svg\")') > 0) {\n const url = parseExternalUrl(src);\n if (url) {\n void new SVGFontLoader(document).load(fontFamily, url);\n }\n }\n });\n }\n });\n });\n }\n}\nStyleElement.parseExternalUrl = parseExternalUrl;\n\nclass UseElement extends RenderedElement {\n setContext(ctx) {\n super.setContext(ctx);\n const xAttr = this.getAttribute('x');\n const yAttr = this.getAttribute('y');\n if (xAttr.hasValue()) {\n ctx.translate(xAttr.getPixels('x'), 0);\n }\n if (yAttr.hasValue()) {\n ctx.translate(0, yAttr.getPixels('y'));\n }\n }\n path(ctx) {\n const { element } = this;\n if (element) {\n element.path(ctx);\n }\n }\n renderChildren(ctx) {\n const { document , element } = this;\n if (element) {\n let tempSvg = element;\n if (element.type === 'symbol') {\n // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)\n tempSvg = new SVGElement(document);\n tempSvg.attributes.viewBox = new Property(document, 'viewBox', element.getAttribute('viewBox').getString());\n tempSvg.attributes.preserveAspectRatio = new Property(document, 'preserveAspectRatio', element.getAttribute('preserveAspectRatio').getString());\n tempSvg.attributes.overflow = new Property(document, 'overflow', element.getAttribute('overflow').getString());\n tempSvg.children = element.children;\n // element is still the parent of the children\n element.styles.opacity = new Property(document, 'opacity', this.calculateOpacity());\n }\n if (tempSvg.type === 'svg') {\n const widthStyle = this.getStyle('width', false, true);\n const heightStyle = this.getStyle('height', false, true);\n // if symbol or svg, inherit width/height from me\n if (widthStyle.hasValue()) {\n tempSvg.attributes.width = new Property(document, 'width', widthStyle.getString());\n }\n if (heightStyle.hasValue()) {\n tempSvg.attributes.height = new Property(document, 'height', heightStyle.getString());\n }\n }\n const oldParent = tempSvg.parent;\n tempSvg.parent = this;\n tempSvg.render(ctx);\n tempSvg.parent = oldParent;\n }\n }\n getBoundingBox(ctx) {\n const { element } = this;\n if (element) {\n return element.getBoundingBox(ctx);\n }\n return null;\n }\n elementTransform() {\n const { document , element } = this;\n if (!element) {\n return null;\n }\n return Transform.fromElement(document, element);\n }\n get element() {\n if (!this.cachedElement) {\n this.cachedElement = this.getHrefAttribute().getDefinition();\n }\n return this.cachedElement;\n }\n constructor(...args){\n super(...args);\n this.type = 'use';\n }\n}\n\nfunction imGet(img, x, y, width, _height, rgba) {\n return img[y * width * 4 + x * 4 + rgba];\n}\nfunction imSet(img, x, y, width, _height, rgba, val) {\n img[y * width * 4 + x * 4 + rgba] = val;\n}\nfunction m(matrix, i, v) {\n const mi = matrix[i];\n return mi * v;\n}\nfunction c(a, m1, m2, m3) {\n return m1 + Math.cos(a) * m2 + Math.sin(a) * m3;\n}\nclass FeColorMatrixElement extends Element {\n apply(ctx, _x, _y, width, height) {\n // assuming x==0 && y==0 for now\n const { includeOpacity , matrix } = this;\n const srcData = ctx.getImageData(0, 0, width, height);\n for(let y = 0; y < height; y++){\n for(let x = 0; x < width; x++){\n const r = imGet(srcData.data, x, y, width, height, 0);\n const g = imGet(srcData.data, x, y, width, height, 1);\n const b = imGet(srcData.data, x, y, width, height, 2);\n const a = imGet(srcData.data, x, y, width, height, 3);\n let nr = m(matrix, 0, r) + m(matrix, 1, g) + m(matrix, 2, b) + m(matrix, 3, a) + m(matrix, 4, 1);\n let ng = m(matrix, 5, r) + m(matrix, 6, g) + m(matrix, 7, b) + m(matrix, 8, a) + m(matrix, 9, 1);\n let nb = m(matrix, 10, r) + m(matrix, 11, g) + m(matrix, 12, b) + m(matrix, 13, a) + m(matrix, 14, 1);\n let na = m(matrix, 15, r) + m(matrix, 16, g) + m(matrix, 17, b) + m(matrix, 18, a) + m(matrix, 19, 1);\n if (includeOpacity) {\n nr = 0;\n ng = 0;\n nb = 0;\n na *= a / 255;\n }\n imSet(srcData.data, x, y, width, height, 0, nr);\n imSet(srcData.data, x, y, width, height, 1, ng);\n imSet(srcData.data, x, y, width, height, 2, nb);\n imSet(srcData.data, x, y, width, height, 3, na);\n }\n }\n ctx.clearRect(0, 0, width, height);\n ctx.putImageData(srcData, 0, 0);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'feColorMatrix';\n let matrix = toNumbers(this.getAttribute('values').getString());\n switch(this.getAttribute('type').getString('matrix')){\n case 'saturate':\n {\n const s = matrix[0];\n /* eslint-disable array-element-newline */ matrix = [\n 0.213 + 0.787 * s,\n 0.715 - 0.715 * s,\n 0.072 - 0.072 * s,\n 0,\n 0,\n 0.213 - 0.213 * s,\n 0.715 + 0.285 * s,\n 0.072 - 0.072 * s,\n 0,\n 0,\n 0.213 - 0.213 * s,\n 0.715 - 0.715 * s,\n 0.072 + 0.928 * s,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1\n ];\n break;\n }\n case 'hueRotate':\n {\n const a = matrix[0] * Math.PI / 180;\n /* eslint-disable array-element-newline */ matrix = [\n c(a, 0.213, 0.787, -0.213),\n c(a, 0.715, -0.715, -0.715),\n c(a, 0.072, -0.072, 0.928),\n 0,\n 0,\n c(a, 0.213, -0.213, 0.143),\n c(a, 0.715, 0.285, 0.14),\n c(a, 0.072, -0.072, -0.283),\n 0,\n 0,\n c(a, 0.213, -0.213, -0.787),\n c(a, 0.715, -0.715, 0.715),\n c(a, 0.072, 0.928, 0.072),\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1\n ];\n break;\n }\n case 'luminanceToAlpha':\n /* eslint-disable array-element-newline */ matrix = [\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0.2125,\n 0.7154,\n 0.0721,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1\n ];\n break;\n }\n this.matrix = matrix;\n this.includeOpacity = this.getAttribute('includeOpacity').hasValue();\n }\n}\n\nclass MaskElement extends Element {\n apply(ctx, element) {\n const { document } = this;\n // render as temp svg\n let x = this.getAttribute('x').getPixels('x');\n let y = this.getAttribute('y').getPixels('y');\n let width = this.getStyle('width').getPixels('x');\n let height = this.getStyle('height').getPixels('y');\n if (!width && !height) {\n const boundingBox = new BoundingBox();\n this.children.forEach((child)=>{\n boundingBox.addBoundingBox(child.getBoundingBox(ctx));\n });\n x = Math.floor(boundingBox.x1);\n y = Math.floor(boundingBox.y1);\n width = Math.floor(boundingBox.width);\n height = Math.floor(boundingBox.height);\n }\n const ignoredStyles = this.removeStyles(element, MaskElement.ignoreStyles);\n const maskCanvas = document.createCanvas(x + width, y + height);\n const maskCtx = maskCanvas.getContext('2d');\n document.screen.setDefaults(maskCtx);\n this.renderChildren(maskCtx);\n // convert mask to alpha with a fake node\n // TODO: refactor out apply from feColorMatrix\n new FeColorMatrixElement(document, {\n nodeType: 1,\n childNodes: [],\n attributes: [\n {\n nodeName: 'type',\n value: 'luminanceToAlpha'\n },\n {\n nodeName: 'includeOpacity',\n value: 'true'\n }\n ]\n }).apply(maskCtx, 0, 0, x + width, y + height);\n const tmpCanvas = document.createCanvas(x + width, y + height);\n const tmpCtx = tmpCanvas.getContext('2d');\n document.screen.setDefaults(tmpCtx);\n element.render(tmpCtx);\n tmpCtx.globalCompositeOperation = 'destination-in';\n tmpCtx.fillStyle = maskCtx.createPattern(maskCanvas, 'no-repeat');\n tmpCtx.fillRect(0, 0, x + width, y + height);\n ctx.fillStyle = tmpCtx.createPattern(tmpCanvas, 'no-repeat');\n ctx.fillRect(0, 0, x + width, y + height);\n // reassign mask\n this.restoreStyles(element, ignoredStyles);\n }\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'mask';\n }\n}\nMaskElement.ignoreStyles = [\n 'mask',\n 'transform',\n 'clip-path'\n];\n\nconst noop = ()=>{\n// NOOP\n};\nclass ClipPathElement extends Element {\n apply(ctx) {\n const { document } = this;\n const contextProto = Reflect.getPrototypeOf(ctx);\n const { beginPath , closePath } = ctx;\n if (contextProto) {\n contextProto.beginPath = noop;\n contextProto.closePath = noop;\n }\n Reflect.apply(beginPath, ctx, []);\n this.children.forEach((child)=>{\n if (!('path' in child)) {\n return;\n }\n let transform = 'elementTransform' in child ? child.elementTransform() : null // handle \n ;\n if (!transform) {\n transform = Transform.fromElement(document, child);\n }\n if (transform) {\n transform.apply(ctx);\n }\n child.path(ctx);\n if (contextProto) {\n contextProto.closePath = closePath;\n }\n if (transform) {\n transform.unapply(ctx);\n }\n });\n Reflect.apply(closePath, ctx, []);\n ctx.clip();\n if (contextProto) {\n contextProto.beginPath = beginPath;\n contextProto.closePath = closePath;\n }\n }\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'clipPath';\n }\n}\n\nclass FilterElement extends Element {\n apply(ctx, element) {\n // render as temp svg\n const { document , children } = this;\n const boundingBox = 'getBoundingBox' in element ? element.getBoundingBox(ctx) : null;\n if (!boundingBox) {\n return;\n }\n let px = 0;\n let py = 0;\n children.forEach((child)=>{\n const efd = child.extraFilterDistance || 0;\n px = Math.max(px, efd);\n py = Math.max(py, efd);\n });\n const width = Math.floor(boundingBox.width);\n const height = Math.floor(boundingBox.height);\n const tmpCanvasWidth = width + 2 * px;\n const tmpCanvasHeight = height + 2 * py;\n if (tmpCanvasWidth < 1 || tmpCanvasHeight < 1) {\n return;\n }\n const x = Math.floor(boundingBox.x);\n const y = Math.floor(boundingBox.y);\n const ignoredStyles = this.removeStyles(element, FilterElement.ignoreStyles);\n const tmpCanvas = document.createCanvas(tmpCanvasWidth, tmpCanvasHeight);\n const tmpCtx = tmpCanvas.getContext('2d');\n document.screen.setDefaults(tmpCtx);\n tmpCtx.translate(-x + px, -y + py);\n element.render(tmpCtx);\n // apply filters\n children.forEach((child)=>{\n if (typeof child.apply === 'function') {\n child.apply(tmpCtx, 0, 0, tmpCanvasWidth, tmpCanvasHeight);\n }\n });\n // render on me\n ctx.drawImage(tmpCanvas, 0, 0, tmpCanvasWidth, tmpCanvasHeight, x - px, y - py, tmpCanvasWidth, tmpCanvasHeight);\n this.restoreStyles(element, ignoredStyles);\n }\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'filter';\n }\n}\nFilterElement.ignoreStyles = [\n 'filter',\n 'transform',\n 'clip-path'\n];\n\nclass FeDropShadowElement extends Element {\n apply(_, _x, _y, _width, _height) {\n // TODO: implement\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'feDropShadow';\n this.addStylesFromStyleDefinition();\n }\n}\n\nclass FeMorphologyElement extends Element {\n apply(_, _x, _y, _width, _height) {\n // TODO: implement\n }\n constructor(...args){\n super(...args);\n this.type = 'feMorphology';\n }\n}\n\nclass FeCompositeElement extends Element {\n apply(_, _x, _y, _width, _height) {\n // TODO: implement\n }\n constructor(...args){\n super(...args);\n this.type = 'feComposite';\n }\n}\n\nclass FeGaussianBlurElement extends Element {\n apply(ctx, x, y, width, height) {\n const { document , blurRadius } = this;\n const body = document.window ? document.window.document.body : null;\n const canvas = ctx.canvas;\n // StackBlur requires canvas be on document\n canvas.id = document.getUniqueId();\n if (body) {\n canvas.style.display = 'none';\n body.appendChild(canvas);\n }\n stackblurCanvas.canvasRGBA(canvas, x, y, width, height, blurRadius);\n if (body) {\n body.removeChild(canvas);\n }\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'feGaussianBlur';\n this.blurRadius = Math.floor(this.getAttribute('stdDeviation').getNumber());\n this.extraFilterDistance = this.blurRadius;\n }\n}\n\nclass TitleElement extends Element {\n constructor(...args){\n super(...args);\n this.type = 'title';\n }\n}\n\nclass DescElement extends Element {\n constructor(...args){\n super(...args);\n this.type = 'desc';\n }\n}\n\nconst elements = {\n 'svg': SVGElement,\n 'rect': RectElement,\n 'circle': CircleElement,\n 'ellipse': EllipseElement,\n 'line': LineElement,\n 'polyline': PolylineElement,\n 'polygon': PolygonElement,\n 'path': PathElement,\n 'pattern': PatternElement,\n 'marker': MarkerElement,\n 'defs': DefsElement,\n 'linearGradient': LinearGradientElement,\n 'radialGradient': RadialGradientElement,\n 'stop': StopElement,\n 'animate': AnimateElement,\n 'animateColor': AnimateColorElement,\n 'animateTransform': AnimateTransformElement,\n 'font': FontElement,\n 'font-face': FontFaceElement,\n 'missing-glyph': MissingGlyphElement,\n 'glyph': GlyphElement,\n 'text': TextElement,\n 'tspan': TSpanElement,\n 'tref': TRefElement,\n 'a': AElement,\n 'textPath': TextPathElement,\n 'image': ImageElement,\n 'g': GElement,\n 'symbol': SymbolElement,\n 'style': StyleElement,\n 'use': UseElement,\n 'mask': MaskElement,\n 'clipPath': ClipPathElement,\n 'filter': FilterElement,\n 'feDropShadow': FeDropShadowElement,\n 'feMorphology': FeMorphologyElement,\n 'feComposite': FeCompositeElement,\n 'feColorMatrix': FeColorMatrixElement,\n 'feGaussianBlur': FeGaussianBlurElement,\n 'title': TitleElement,\n 'desc': DescElement\n};\n\nfunction createCanvas(width, height) {\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n return canvas;\n}\nasync function createImage(src) {\n let anonymousCrossOrigin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n const image = document.createElement('img');\n if (anonymousCrossOrigin) {\n image.crossOrigin = 'Anonymous';\n }\n return new Promise((resolve, reject)=>{\n image.onload = ()=>{\n resolve(image);\n };\n image.onerror = (_event, _source, _lineno, _colno, error)=>{\n reject(error);\n };\n image.src = src;\n });\n}\nconst DEFAULT_EM_SIZE = 12;\nclass Document {\n bindCreateImage(createImage1, anonymousCrossOrigin) {\n if (typeof anonymousCrossOrigin === 'boolean') {\n return (source, forceAnonymousCrossOrigin)=>createImage1(source, typeof forceAnonymousCrossOrigin === 'boolean' ? forceAnonymousCrossOrigin : anonymousCrossOrigin)\n ;\n }\n return createImage1;\n }\n get window() {\n return this.screen.window;\n }\n get fetch() {\n return this.screen.fetch;\n }\n get ctx() {\n return this.screen.ctx;\n }\n get emSize() {\n const { emSizeStack } = this;\n return emSizeStack[emSizeStack.length - 1] || DEFAULT_EM_SIZE;\n }\n set emSize(value) {\n const { emSizeStack } = this;\n emSizeStack.push(value);\n }\n popEmSize() {\n const { emSizeStack } = this;\n emSizeStack.pop();\n }\n getUniqueId() {\n return \"canvg\".concat(++this.uniqueId);\n }\n isImagesLoaded() {\n return this.images.every((_)=>_.loaded\n );\n }\n isFontsLoaded() {\n return this.fonts.every((_)=>_.loaded\n );\n }\n createDocumentElement(document) {\n const documentElement = this.createElement(document.documentElement);\n documentElement.root = true;\n documentElement.addStylesFromStyleDefinition();\n this.documentElement = documentElement;\n return documentElement;\n }\n createElement(node) {\n const elementType = node.nodeName.replace(/^[^:]+:/, '');\n const ElementType = Document.elementTypes[elementType];\n if (ElementType) {\n return new ElementType(this, node);\n }\n return new UnknownElement(this, node);\n }\n createTextNode(node) {\n return new TextNode(this, node);\n }\n setViewBox(config) {\n this.screen.setViewBox({\n document: this,\n ...config\n });\n }\n constructor(canvg, { rootEmSize =DEFAULT_EM_SIZE , emSize =DEFAULT_EM_SIZE , createCanvas: createCanvas1 = Document.createCanvas , createImage: createImage2 = Document.createImage , anonymousCrossOrigin } = {}){\n this.canvg = canvg;\n this.definitions = {};\n this.styles = {};\n this.stylesSpecificity = {};\n this.images = [];\n this.fonts = [];\n this.emSizeStack = [];\n this.uniqueId = 0;\n this.screen = canvg.screen;\n this.rootEmSize = rootEmSize;\n this.emSize = emSize;\n this.createCanvas = createCanvas1;\n this.createImage = this.bindCreateImage(createImage2, anonymousCrossOrigin);\n this.screen.wait(()=>this.isImagesLoaded()\n );\n this.screen.wait(()=>this.isFontsLoaded()\n );\n }\n}\nDocument.createCanvas = createCanvas;\nDocument.createImage = createImage;\nDocument.elementTypes = elements;\n\n/**\n * SVG renderer on canvas.\n */ class Canvg {\n /**\n * Create Canvg instance from SVG source string or URL.\n * @param ctx - Rendering context.\n * @param svg - SVG source string or URL.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ static async from(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n const parser = new Parser(options);\n const svgDocument = await parser.parse(svg);\n return new Canvg(ctx, svgDocument, options);\n }\n /**\n * Create Canvg instance from SVG source string.\n * @param ctx - Rendering context.\n * @param svg - SVG source string.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ static fromString(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n const parser = new Parser(options);\n const svgDocument = parser.parseFromString(svg);\n return new Canvg(ctx, svgDocument, options);\n }\n /**\n * Create new Canvg instance with inherited options.\n * @param ctx - Rendering context.\n * @param svg - SVG source string or URL.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ fork(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n return Canvg.from(ctx, svg, {\n ...this.options,\n ...options\n });\n }\n /**\n * Create new Canvg instance with inherited options.\n * @param ctx - Rendering context.\n * @param svg - SVG source string.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ forkString(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n return Canvg.fromString(ctx, svg, {\n ...this.options,\n ...options\n });\n }\n /**\n * Document is ready promise.\n * @returns Ready promise.\n */ ready() {\n return this.screen.ready();\n }\n /**\n * Document is ready value.\n * @returns Is ready or not.\n */ isReady() {\n return this.screen.isReady();\n }\n /**\n * Render only first frame, ignoring animations and mouse.\n * @param options - Rendering options.\n */ async render() {\n let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n this.start({\n enableRedraw: true,\n ignoreAnimation: true,\n ignoreMouse: true,\n ...options\n });\n await this.ready();\n this.stop();\n }\n /**\n * Start rendering.\n * @param options - Render options.\n */ start() {\n let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n const { documentElement , screen , options: baseOptions } = this;\n screen.start(documentElement, {\n enableRedraw: true,\n ...baseOptions,\n ...options\n });\n }\n /**\n * Stop rendering.\n */ stop() {\n this.screen.stop();\n }\n /**\n * Resize SVG to fit in given size.\n * @param width\n * @param height\n * @param preserveAspectRatio\n */ resize(width) {\n let height = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : width, preserveAspectRatio = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n this.documentElement.resize(width, height, preserveAspectRatio);\n }\n /**\n * Main constructor.\n * @param ctx - Rendering context.\n * @param svg - SVG Document.\n * @param options - Rendering options.\n */ constructor(ctx, svg, options = {}){\n this.parser = new Parser(options);\n this.screen = new Screen(ctx, options);\n this.options = options;\n const document = new Document(this, options);\n const documentElement = document.createDocumentElement(svg);\n this.document = document;\n this.documentElement = documentElement;\n }\n}\n\nexports.AElement = AElement;\nexports.AnimateColorElement = AnimateColorElement;\nexports.AnimateElement = AnimateElement;\nexports.AnimateTransformElement = AnimateTransformElement;\nexports.BoundingBox = BoundingBox;\nexports.CB1 = CB1;\nexports.CB2 = CB2;\nexports.CB3 = CB3;\nexports.CB4 = CB4;\nexports.Canvg = Canvg;\nexports.CircleElement = CircleElement;\nexports.ClipPathElement = ClipPathElement;\nexports.DefsElement = DefsElement;\nexports.DescElement = DescElement;\nexports.Document = Document;\nexports.Element = Element;\nexports.EllipseElement = EllipseElement;\nexports.FeColorMatrixElement = FeColorMatrixElement;\nexports.FeCompositeElement = FeCompositeElement;\nexports.FeDropShadowElement = FeDropShadowElement;\nexports.FeGaussianBlurElement = FeGaussianBlurElement;\nexports.FeMorphologyElement = FeMorphologyElement;\nexports.FilterElement = FilterElement;\nexports.Font = Font;\nexports.FontElement = FontElement;\nexports.FontFaceElement = FontFaceElement;\nexports.GElement = GElement;\nexports.GlyphElement = GlyphElement;\nexports.GradientElement = GradientElement;\nexports.ImageElement = ImageElement;\nexports.LineElement = LineElement;\nexports.LinearGradientElement = LinearGradientElement;\nexports.MarkerElement = MarkerElement;\nexports.MaskElement = MaskElement;\nexports.Matrix = Matrix;\nexports.MissingGlyphElement = MissingGlyphElement;\nexports.Mouse = Mouse;\nexports.PSEUDO_ZERO = PSEUDO_ZERO;\nexports.Parser = Parser;\nexports.PathElement = PathElement;\nexports.PathParser = PathParser;\nexports.PatternElement = PatternElement;\nexports.Point = Point;\nexports.PolygonElement = PolygonElement;\nexports.PolylineElement = PolylineElement;\nexports.Property = Property;\nexports.QB1 = QB1;\nexports.QB2 = QB2;\nexports.QB3 = QB3;\nexports.RadialGradientElement = RadialGradientElement;\nexports.RectElement = RectElement;\nexports.RenderedElement = RenderedElement;\nexports.Rotate = Rotate;\nexports.SVGElement = SVGElement;\nexports.SVGFontLoader = SVGFontLoader;\nexports.Scale = Scale;\nexports.Screen = Screen;\nexports.Skew = Skew;\nexports.SkewX = SkewX;\nexports.SkewY = SkewY;\nexports.StopElement = StopElement;\nexports.StyleElement = StyleElement;\nexports.SymbolElement = SymbolElement;\nexports.TRefElement = TRefElement;\nexports.TSpanElement = TSpanElement;\nexports.TextElement = TextElement;\nexports.TextPathElement = TextPathElement;\nexports.TitleElement = TitleElement;\nexports.Transform = Transform;\nexports.Translate = Translate;\nexports.UnknownElement = UnknownElement;\nexports.UseElement = UseElement;\nexports.ViewPort = ViewPort;\nexports.compressSpaces = compressSpaces;\nexports.elements = elements;\nexports.getSelectorSpecificity = getSelectorSpecificity;\nexports.normalizeAttributeName = normalizeAttributeName;\nexports.normalizeColor = normalizeColor;\nexports.parseExternalUrl = parseExternalUrl;\nexports.presets = index;\nexports.toMatrixValue = toMatrixValue;\nexports.toNumbers = toNumbers;\nexports.trimLeft = trimLeft;\nexports.trimRight = trimRight;\nexports.vectorMagnitude = vectorMagnitude;\nexports.vectorsAngle = vectorsAngle;\nexports.vectorsRatio = vectorsRatio;\n//# sourceMappingURL=index.cjs.map\n","!function(t,r){\"object\"==typeof exports&&\"undefined\"!=typeof module?r(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],r):r((t=\"undefined\"!=typeof globalThis?globalThis:t||self).svgpathdata={})}(this,(function(t){\"use strict\";\n/*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])})(t,e)};function e(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function a(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}var a=\" \";function i(t){var r=\"\";Array.isArray(t)||(t=[t]);for(var e=0;et.phi1&&(t.phi2-=2*s),1===t.sweepFlag&&t.phi2a)return[];if(0===a)return[[t*e/(t*t+r*r),r*e/(t*t+r*r)]];var i=Math.sqrt(a);return[[(t*e+r*i)/(t*t+r*r),(r*e-t*i)/(t*t+r*r)],[(t*e-r*i)/(t*t+r*r),(r*e+t*i)/(t*t+r*r)]]}var c=Math.PI/180;function m(t,r,e){return(1-e)*t+e*r}function y(t,r,e,a){return t+Math.cos(a/180*s)*r+Math.sin(a/180*s)*e}function p(t,r,e,a){var i=1e-6,n=r-t,o=e-r,s=3*n+3*(a-e)-6*o,u=6*(o-n),h=3*n;return Math.abs(s)O&&(i.sweepFlag=+!i.sweepFlag),i}))}function T(){return function(t){var r={};for(var e in t)r[e]=t[e];return r}}t.ROUND=function(t){function r(r){return Math.round(r*t)/t}return void 0===t&&(t=1e13),o(t),function(t){return void 0!==t.x1&&(t.x1=r(t.x1)),void 0!==t.y1&&(t.y1=r(t.y1)),void 0!==t.x2&&(t.x2=r(t.x2)),void 0!==t.y2&&(t.y2=r(t.y2)),void 0!==t.x&&(t.x=r(t.x)),void 0!==t.y&&(t.y=r(t.y)),void 0!==t.rX&&(t.rX=r(t.rX)),void 0!==t.rY&&(t.rY=r(t.rY)),t}},t.TO_ABS=r,t.TO_REL=function(){return i((function(t,r,e){return t.relative||(void 0!==t.x1&&(t.x1-=r),void 0!==t.y1&&(t.y1-=e),void 0!==t.x2&&(t.x2-=r),void 0!==t.y2&&(t.y2-=e),void 0!==t.x&&(t.x-=r),void 0!==t.y&&(t.y-=e),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,r,e){return void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===e&&(e=!0),i((function(a,i,n,o,s){if(isNaN(o)&&!(a.type&N.MOVE_TO))throw new Error(\"path must start with moveto\");return r&&a.type&N.HORIZ_LINE_TO&&(a.type=N.LINE_TO,a.y=a.relative?0:n),e&&a.type&N.VERT_LINE_TO&&(a.type=N.LINE_TO,a.x=a.relative?0:i),t&&a.type&N.CLOSE_PATH&&(a.type=N.LINE_TO,a.x=a.relative?o-i:o,a.y=a.relative?s-n:s),a.type&N.ARC&&(0===a.rX||0===a.rY)&&(a.type=N.LINE_TO,delete a.rX,delete a.rY,delete a.xRot,delete a.lArcFlag,delete a.sweepFlag),a}))},t.NORMALIZE_ST=e,t.QT_TO_C=a,t.INFO=i,t.SANITIZE=function(t){void 0===t&&(t=0),o(t);var r=NaN,e=NaN,a=NaN,n=NaN;return i((function(i,o,s,u,h){var c=Math.abs,m=!1,y=0,p=0;if(i.type&N.SMOOTH_CURVE_TO&&(y=isNaN(r)?0:o-r,p=isNaN(e)?0:s-e),i.type&(N.CURVE_TO|N.SMOOTH_CURVE_TO)?(r=i.relative?o+i.x2:i.x2,e=i.relative?s+i.y2:i.y2):(r=NaN,e=NaN),i.type&N.SMOOTH_QUAD_TO?(a=isNaN(a)?o:2*o-a,n=isNaN(n)?s:2*s-n):i.type&N.QUAD_TO?(a=i.relative?o+i.x1:i.x1,n=i.relative?s+i.y1:i.y2):(a=NaN,n=NaN),i.type&N.LINE_COMMANDS||i.type&N.ARC&&(0===i.rX||0===i.rY||!i.lArcFlag)||i.type&N.CURVE_TO||i.type&N.SMOOTH_CURVE_TO||i.type&N.QUAD_TO||i.type&N.SMOOTH_QUAD_TO){var f=void 0===i.x?0:i.relative?i.x:i.x-o,T=void 0===i.y?0:i.relative?i.y:i.y-s;y=isNaN(a)?void 0===i.x1?y:i.relative?i.x:i.x1-o:a-o,p=isNaN(n)?void 0===i.y1?p:i.relative?i.y:i.y1-s:n-s;var O=void 0===i.x2?0:i.relative?i.x:i.x2-o,l=void 0===i.y2?0:i.relative?i.y:i.y2-s;c(f)<=t&&c(T)<=t&&c(y)<=t&&c(p)<=t&&c(O)<=t&&c(l)<=t&&(m=!0)}return i.type&N.CLOSE_PATH&&c(o-u)<=t&&c(s-h)<=t&&(m=!0),m?[]:i}))},t.MATRIX=s,t.ROTATE=function(t,r,e){void 0===r&&(r=0),void 0===e&&(e=0),o(t,r,e);var a=Math.sin(t),i=Math.cos(t);return s(i,a,-a,i,r-r*i+e*a,e-r*a-e*i)},t.TRANSLATE=function(t,r){return void 0===r&&(r=0),o(t,r),s(1,0,0,1,t,r)},t.SCALE=function(t,r){return void 0===r&&(r=t),o(t,r),s(t,0,0,r,0,0)},t.SKEW_X=function(t){return o(t),s(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return o(t),s(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),o(t),s(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),o(t),s(1,0,0,-1,0,t)},t.A_TO_C=function(){return i((function(t,r,e){return N.ARC===t.type?function(t,r,e){var a,i,o,s;t.cX||u(t,r,e);for(var h=Math.min(t.phi1,t.phi2),y=Math.max(t.phi1,t.phi2)-h,p=Math.ceil(y/90),f=new Array(p),T=r,O=e,l=0;lc.maxX&&(c.maxX=t),tc.maxY&&(c.maxY=t),tH&&m(f(e,i.x1,i.x2,i.x,H))}for(var v=0,_=p(a,i.y1,i.y2,i.y);v<_.length;v++){0<(H=_[v])&&1>H&&T(f(a,i.y1,i.y2,i.y,H))}}if(i.type&N.ARC){m(i.x),T(i.y),u(i,e,a);for(var d=i.xRot/180*Math.PI,x=Math.cos(d)*i.rX,A=Math.sin(d)*i.rX,E=-Math.sin(d)*i.rY,C=Math.cos(d)*i.rY,M=i.phi1i.phi2?[i.phi2+360,i.phi1+360]:[i.phi2,i.phi1],R=M[0],S=M[1],g=function(t){var r=t[0],e=t[1],a=180*Math.atan2(e,r)/Math.PI;return aR&&HR&&Hu)throw new SyntaxError('Expected positive number, got \"'+u+'\" at index \"'+i+'\"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&\"0\"!==this.curNumber&&\"1\"!==this.curNumber)throw new SyntaxError('Expected a flag, got \"'+this.curNumber+'\" at index \"'+i+'\"');this.curArgs.push(u),this.curArgs.length===d[this.curCommandType]&&(N.HORIZ_LINE_TO===this.curCommandType?a({type:N.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):N.VERT_LINE_TO===this.curCommandType?a({type:N.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===N.MOVE_TO||this.curCommandType===N.LINE_TO||this.curCommandType===N.SMOOTH_QUAD_TO?(a({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),N.MOVE_TO===this.curCommandType&&(this.curCommandType=N.LINE_TO)):this.curCommandType===N.CURVE_TO?a({type:N.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===N.SMOOTH_CURVE_TO?a({type:N.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===N.QUAD_TO?a({type:N.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===N.ARC&&a({type:N.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber=\"\",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!l(n))if(\",\"===n&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(\"+\"!==n&&\"-\"!==n&&\".\"!==n)if(s)this.curNumber=n,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError(\"Unterminated command at index \"+i+\".\");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character \"'+n+'\" at index '+i+\". Command cannot follow comma\");if(this.canParseCommandOrComma=!1,\"z\"!==n&&\"Z\"!==n)if(\"h\"===n||\"H\"===n)this.curCommandType=N.HORIZ_LINE_TO,this.curCommandRelative=\"h\"===n;else if(\"v\"===n||\"V\"===n)this.curCommandType=N.VERT_LINE_TO,this.curCommandRelative=\"v\"===n;else if(\"m\"===n||\"M\"===n)this.curCommandType=N.MOVE_TO,this.curCommandRelative=\"m\"===n;else if(\"l\"===n||\"L\"===n)this.curCommandType=N.LINE_TO,this.curCommandRelative=\"l\"===n;else if(\"c\"===n||\"C\"===n)this.curCommandType=N.CURVE_TO,this.curCommandRelative=\"c\"===n;else if(\"s\"===n||\"S\"===n)this.curCommandType=N.SMOOTH_CURVE_TO,this.curCommandRelative=\"s\"===n;else if(\"q\"===n||\"Q\"===n)this.curCommandType=N.QUAD_TO,this.curCommandRelative=\"q\"===n;else if(\"t\"===n||\"T\"===n)this.curCommandType=N.SMOOTH_QUAD_TO,this.curCommandRelative=\"t\"===n;else{if(\"a\"!==n&&\"A\"!==n)throw new SyntaxError('Unexpected character \"'+n+'\" at index '+i+\".\");this.curCommandType=N.ARC,this.curCommandRelative=\"a\"===n}else r.push({type:N.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=n,this.curNumberHasDecimal=\".\"===n}else this.curNumber+=n,this.curNumberHasDecimal=!0;else this.curNumber+=n;else this.curNumber+=n,this.curNumberHasExp=!0;else this.curNumber+=n,this.curNumberHasExpDigits=this.curNumberHasExp}return r},r.prototype.transform=function(t){return Object.create(this,{parse:{value:function(r,e){void 0===e&&(e=[]);for(var a=0,i=Object.getPrototypeOf(this).parse.call(this,r);a b ? 1 : a >= b ? 0 : NaN;\n}\n","import {slice} from \"./array.js\";\nimport bisect from \"./bisect.js\";\nimport constant from \"./constant.js\";\nimport extent from \"./extent.js\";\nimport identity from \"./identity.js\";\nimport nice from \"./nice.js\";\nimport ticks, {tickIncrement} from \"./ticks.js\";\nimport sturges from \"./threshold/sturges.js\";\n\nexport default function bin() {\n var value = identity,\n domain = extent,\n threshold = sturges;\n\n function histogram(data) {\n if (!Array.isArray(data)) data = Array.from(data);\n\n var i,\n n = data.length,\n x,\n step,\n values = new Array(n);\n\n for (i = 0; i < n; ++i) {\n values[i] = value(data[i], i, data);\n }\n\n var xz = domain(values),\n x0 = xz[0],\n x1 = xz[1],\n tz = threshold(values, x0, x1);\n\n // Convert number of thresholds into uniform thresholds, and nice the\n // default domain accordingly.\n if (!Array.isArray(tz)) {\n const max = x1, tn = +tz;\n if (domain === extent) [x0, x1] = nice(x0, x1, tn);\n tz = ticks(x0, x1, tn);\n\n // If the domain is aligned with the first tick (which it will by\n // default), then we can use quantization rather than bisection to bin\n // values, which is substantially faster.\n if (tz[0] <= x0) step = tickIncrement(x0, x1, tn);\n\n // If the last threshold is coincident with the domain’s upper bound, the\n // last bin will be zero-width. If the default domain is used, and this\n // last threshold is coincident with the maximum input value, we can\n // extend the niced upper bound by one tick to ensure uniform bin widths;\n // otherwise, we simply remove the last threshold. Note that we don’t\n // coerce values or the domain to numbers, and thus must be careful to\n // compare order (>=) rather than strict equality (===)!\n if (tz[tz.length - 1] >= x1) {\n if (max >= x1 && domain === extent) {\n const step = tickIncrement(x0, x1, tn);\n if (isFinite(step)) {\n if (step > 0) {\n x1 = (Math.floor(x1 / step) + 1) * step;\n } else if (step < 0) {\n x1 = (Math.ceil(x1 * -step) + 1) / -step;\n }\n }\n } else {\n tz.pop();\n }\n }\n }\n\n // Remove any thresholds outside the domain.\n // Be careful not to mutate an array owned by the user!\n var m = tz.length, a = 0, b = m;\n while (tz[a] <= x0) ++a;\n while (tz[b - 1] > x1) --b;\n if (a || b < m) tz = tz.slice(a, b), m = b - a;\n\n var bins = new Array(m + 1),\n bin;\n\n // Initialize bins.\n for (i = 0; i <= m; ++i) {\n bin = bins[i] = [];\n bin.x0 = i > 0 ? tz[i - 1] : x0;\n bin.x1 = i < m ? tz[i] : x1;\n }\n\n // Assign data to bins by value, ignoring any outside the domain.\n if (isFinite(step)) {\n if (step > 0) {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n bins[Math.min(m, Math.floor((x - x0) / step))].push(data[i]);\n }\n }\n } else if (step < 0) {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n const j = Math.floor((x0 - x) * step);\n bins[Math.min(m, j + (tz[j] <= x))].push(data[i]); // handle off-by-one due to rounding\n }\n }\n }\n } else {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n bins[bisect(tz, x, 0, m)].push(data[i]);\n }\n }\n }\n\n return bins;\n }\n\n histogram.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(_), histogram) : value;\n };\n\n histogram.domain = function(_) {\n return arguments.length ? (domain = typeof _ === \"function\" ? _ : constant([_[0], _[1]]), histogram) : domain;\n };\n\n histogram.thresholds = function(_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : constant(Array.isArray(_) ? slice.call(_) : _), histogram) : threshold;\n };\n\n return histogram;\n}\n","import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n","import ascending from \"./ascending.js\";\nimport descending from \"./descending.js\";\n\nexport default function bisector(f) {\n let compare1, compare2, delta;\n\n // If an accessor is specified, promote it to a comparator. In this case we\n // can test whether the search value is (self-) comparable. We can’t do this\n // for a comparator (except for specific, known comparators) because we can’t\n // tell if the comparator is symmetric, and an asymmetric comparator can’t be\n // used to test whether a single value is comparable.\n if (f.length !== 2) {\n compare1 = ascending;\n compare2 = (d, x) => ascending(f(d), x);\n delta = (d, x) => f(d) - x;\n } else {\n compare1 = f === ascending || f === descending ? f : zero;\n compare2 = f;\n delta = f;\n }\n\n function left(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function right(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) <= 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function center(a, x, lo = 0, hi = a.length) {\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction zero() {\n return 0;\n}\n","export function blur(values, r) {\n if (!((r = +r) >= 0)) throw new RangeError(\"invalid r\");\n let length = values.length;\n if (!((length = Math.floor(length)) >= 0)) throw new RangeError(\"invalid length\");\n if (!length || !r) return values;\n const blur = blurf(r);\n const temp = values.slice();\n blur(values, temp, 0, length, 1);\n blur(temp, values, 0, length, 1);\n blur(values, temp, 0, length, 1);\n return values;\n}\n\nexport const blur2 = Blur2(blurf);\n\nexport const blurImage = Blur2(blurfImage);\n\nfunction Blur2(blur) {\n return function(data, rx, ry = rx) {\n if (!((rx = +rx) >= 0)) throw new RangeError(\"invalid rx\");\n if (!((ry = +ry) >= 0)) throw new RangeError(\"invalid ry\");\n let {data: values, width, height} = data;\n if (!((width = Math.floor(width)) >= 0)) throw new RangeError(\"invalid width\");\n if (!((height = Math.floor(height !== undefined ? height : values.length / width)) >= 0)) throw new RangeError(\"invalid height\");\n if (!width || !height || (!rx && !ry)) return data;\n const blurx = rx && blur(rx);\n const blury = ry && blur(ry);\n const temp = values.slice();\n if (blurx && blury) {\n blurh(blurx, temp, values, width, height);\n blurh(blurx, values, temp, width, height);\n blurh(blurx, temp, values, width, height);\n blurv(blury, values, temp, width, height);\n blurv(blury, temp, values, width, height);\n blurv(blury, values, temp, width, height);\n } else if (blurx) {\n blurh(blurx, values, temp, width, height);\n blurh(blurx, temp, values, width, height);\n blurh(blurx, values, temp, width, height);\n } else if (blury) {\n blurv(blury, values, temp, width, height);\n blurv(blury, temp, values, width, height);\n blurv(blury, values, temp, width, height);\n }\n return data;\n };\n}\n\nfunction blurh(blur, T, S, w, h) {\n for (let y = 0, n = w * h; y < n;) {\n blur(T, S, y, y += w, 1);\n }\n}\n\nfunction blurv(blur, T, S, w, h) {\n for (let x = 0, n = w * h; x < w; ++x) {\n blur(T, S, x, x + n, w);\n }\n}\n\nfunction blurfImage(radius) {\n const blur = blurf(radius);\n return (T, S, start, stop, step) => {\n start <<= 2, stop <<= 2, step <<= 2;\n blur(T, S, start + 0, stop + 0, step);\n blur(T, S, start + 1, stop + 1, step);\n blur(T, S, start + 2, stop + 2, step);\n blur(T, S, start + 3, stop + 3, step);\n };\n}\n\n// Given a target array T, a source array S, sets each value T[i] to the average\n// of {S[i - r], …, S[i], …, S[i + r]}, where r = ⌊radius⌋, start <= i < stop,\n// for each i, i + step, i + 2 * step, etc., and where S[j] is clamped between\n// S[start] (inclusive) and S[stop] (exclusive). If the given radius is not an\n// integer, S[i - r - 1] and S[i + r + 1] are added to the sum, each weighted\n// according to r - ⌊radius⌋.\nfunction blurf(radius) {\n const radius0 = Math.floor(radius);\n if (radius0 === radius) return bluri(radius);\n const t = radius - radius0;\n const w = 2 * radius + 1;\n return (T, S, start, stop, step) => { // stop must be aligned!\n if (!((stop -= step) >= start)) return; // inclusive stop\n let sum = radius0 * S[start];\n const s0 = step * radius0;\n const s1 = s0 + step;\n for (let i = start, j = start + s0; i < j; i += step) {\n sum += S[Math.min(stop, i)];\n }\n for (let i = start, j = stop; i <= j; i += step) {\n sum += S[Math.min(stop, i + s0)];\n T[i] = (sum + t * (S[Math.max(start, i - s1)] + S[Math.min(stop, i + s1)])) / w;\n sum -= S[Math.max(start, i - s0)];\n }\n };\n}\n\n// Like blurf, but optimized for integer radius.\nfunction bluri(radius) {\n const w = 2 * radius + 1;\n return (T, S, start, stop, step) => { // stop must be aligned!\n if (!((stop -= step) >= start)) return; // inclusive stop\n let sum = radius * S[start];\n const s = step * radius;\n for (let i = start, j = start + s; i < j; i += step) {\n sum += S[Math.min(stop, i)];\n }\n for (let i = start, j = stop; i <= j; i += step) {\n sum += S[Math.min(stop, i + s)];\n T[i] = sum / w;\n sum -= S[Math.max(start, i - s)];\n }\n };\n}\n","export default function constant(x) {\n return () => x;\n}\n","export default function count(values, valueof) {\n let count = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n ++count;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n ++count;\n }\n }\n }\n return count;\n}\n","function length(array) {\n return array.length | 0;\n}\n\nfunction empty(length) {\n return !(length > 0);\n}\n\nfunction arrayify(values) {\n return typeof values !== \"object\" || \"length\" in values ? values : Array.from(values);\n}\n\nfunction reducer(reduce) {\n return values => reduce(...values);\n}\n\nexport default function cross(...values) {\n const reduce = typeof values[values.length - 1] === \"function\" && reducer(values.pop());\n values = values.map(arrayify);\n const lengths = values.map(length);\n const j = values.length - 1;\n const index = new Array(j + 1).fill(0);\n const product = [];\n if (j < 0 || lengths.some(empty)) return product;\n while (true) {\n product.push(index.map((j, i) => values[i][j]));\n let i = j;\n while (++index[i] === lengths[i]) {\n if (i === 0) return reduce ? product.map(reduce) : product;\n index[i--] = 0;\n }\n }\n}\n","export default function cumsum(values, valueof) {\n var sum = 0, index = 0;\n return Float64Array.from(values, valueof === undefined\n ? v => (sum += +v || 0)\n : v => (sum += +valueof(v, index++, values) || 0));\n}","export default function descending(a, b) {\n return a == null || b == null ? NaN\n : b < a ? -1\n : b > a ? 1\n : b >= a ? 0\n : NaN;\n}\n","import variance from \"./variance.js\";\n\nexport default function deviation(values, valueof) {\n const v = variance(values, valueof);\n return v ? Math.sqrt(v) : v;\n}\n","import {InternSet} from \"internmap\";\n\nexport default function difference(values, ...others) {\n values = new InternSet(values);\n for (const other of others) {\n for (const value of other) {\n values.delete(value);\n }\n }\n return values;\n}\n","import {InternSet} from \"internmap\";\n\nexport default function disjoint(values, other) {\n const iterator = other[Symbol.iterator](), set = new InternSet();\n for (const v of values) {\n if (set.has(v)) return false;\n let value, done;\n while (({value, done} = iterator.next())) {\n if (done) break;\n if (Object.is(v, value)) return false;\n set.add(value);\n }\n }\n return true;\n}\n","export default function every(values, test) {\n if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n let index = -1;\n for (const value of values) {\n if (!test(value, ++index, values)) {\n return false;\n }\n }\n return true;\n}\n","export default function extent(values, valueof) {\n let min;\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n }\n return [min, max];\n}\n","export default function filter(values, test) {\n if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n const array = [];\n let index = -1;\n for (const value of values) {\n if (test(value, ++index, values)) {\n array.push(value);\n }\n }\n return array;\n}\n","// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n constructor() {\n this._partials = new Float64Array(32);\n this._n = 0;\n }\n add(x) {\n const p = this._partials;\n let i = 0;\n for (let j = 0; j < this._n && j < 32; j++) {\n const y = p[j],\n hi = x + y,\n lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n if (lo) p[i++] = lo;\n x = hi;\n }\n p[i] = x;\n this._n = i + 1;\n return this;\n }\n valueOf() {\n const p = this._partials;\n let n = this._n, x, y, lo, hi = 0;\n if (n > 0) {\n hi = p[--n];\n while (n > 0) {\n x = hi;\n y = p[--n];\n hi = x + y;\n lo = y - (hi - x);\n if (lo) break;\n }\n if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n y = lo * 2;\n x = hi + y;\n if (y == x - hi) hi = x;\n }\n }\n return hi;\n }\n}\n\nexport function fsum(values, valueof) {\n const adder = new Adder();\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n adder.add(value);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n adder.add(value);\n }\n }\n }\n return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n const adder = new Adder();\n let index = -1;\n return Float64Array.from(values, valueof === undefined\n ? v => adder.add(+v || 0)\n : v => adder.add(+valueof(v, ++index, values) || 0)\n );\n}\n","import ascending from \"./ascending.js\";\n\nexport default function greatest(values, compare = ascending) {\n let max;\n let defined = false;\n if (compare.length === 1) {\n let maxValue;\n for (const element of values) {\n const value = compare(element);\n if (defined\n ? ascending(value, maxValue) > 0\n : ascending(value, value) === 0) {\n max = element;\n maxValue = value;\n defined = true;\n }\n }\n } else {\n for (const value of values) {\n if (defined\n ? compare(value, max) > 0\n : compare(value, value) === 0) {\n max = value;\n defined = true;\n }\n }\n }\n return max;\n}\n","import ascending from \"./ascending.js\";\nimport maxIndex from \"./maxIndex.js\";\n\nexport default function greatestIndex(values, compare = ascending) {\n if (compare.length === 1) return maxIndex(values, compare);\n let maxValue;\n let max = -1;\n let index = -1;\n for (const value of values) {\n ++index;\n if (max < 0\n ? compare(value, value) === 0\n : compare(value, maxValue) > 0) {\n maxValue = value;\n max = index;\n }\n }\n return max;\n}\n","import {InternMap} from \"internmap\";\nimport identity from \"./identity.js\";\n\nexport default function group(values, ...keys) {\n return nest(values, identity, identity, keys);\n}\n\nexport function groups(values, ...keys) {\n return nest(values, Array.from, identity, keys);\n}\n\nfunction flatten(groups, keys) {\n for (let i = 1, n = keys.length; i < n; ++i) {\n groups = groups.flatMap(g => g.pop().map(([key, value]) => [...g, key, value]));\n }\n return groups;\n}\n\nexport function flatGroup(values, ...keys) {\n return flatten(groups(values, ...keys), keys);\n}\n\nexport function flatRollup(values, reduce, ...keys) {\n return flatten(rollups(values, reduce, ...keys), keys);\n}\n\nexport function rollup(values, reduce, ...keys) {\n return nest(values, identity, reduce, keys);\n}\n\nexport function rollups(values, reduce, ...keys) {\n return nest(values, Array.from, reduce, keys);\n}\n\nexport function index(values, ...keys) {\n return nest(values, identity, unique, keys);\n}\n\nexport function indexes(values, ...keys) {\n return nest(values, Array.from, unique, keys);\n}\n\nfunction unique(values) {\n if (values.length !== 1) throw new Error(\"duplicate key\");\n return values[0];\n}\n\nfunction nest(values, map, reduce, keys) {\n return (function regroup(values, i) {\n if (i >= keys.length) return reduce(values);\n const groups = new InternMap();\n const keyof = keys[i++];\n let index = -1;\n for (const value of values) {\n const key = keyof(value, ++index, values);\n const group = groups.get(key);\n if (group) group.push(value);\n else groups.set(key, [value]);\n }\n for (const [key, values] of groups) {\n groups.set(key, regroup(values, i));\n }\n return map(groups);\n })(values, 0);\n}\n","import ascending from \"./ascending.js\";\nimport group, {rollup} from \"./group.js\";\nimport sort from \"./sort.js\";\n\nexport default function groupSort(values, reduce, key) {\n return (reduce.length !== 2\n ? sort(rollup(values, reduce, key), (([ak, av], [bk, bv]) => ascending(av, bv) || ascending(ak, bk)))\n : sort(group(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || ascending(ak, bk))))\n .map(([key]) => key);\n}\n","export default function identity(x) {\n return x;\n}\n","export {default as bisect, bisectRight, bisectLeft, bisectCenter} from \"./bisect.js\";\nexport {default as ascending} from \"./ascending.js\";\nexport {default as bisector} from \"./bisector.js\";\nexport {blur, blur2, blurImage} from \"./blur.js\";\nexport {default as count} from \"./count.js\";\nexport {default as cross} from \"./cross.js\";\nexport {default as cumsum} from \"./cumsum.js\";\nexport {default as descending} from \"./descending.js\";\nexport {default as deviation} from \"./deviation.js\";\nexport {default as extent} from \"./extent.js\";\nexport {Adder, fsum, fcumsum} from \"./fsum.js\";\nexport {default as group, flatGroup, flatRollup, groups, index, indexes, rollup, rollups} from \"./group.js\";\nexport {default as groupSort} from \"./groupSort.js\";\nexport {default as bin, default as histogram} from \"./bin.js\"; // Deprecated; use bin.\nexport {default as thresholdFreedmanDiaconis} from \"./threshold/freedmanDiaconis.js\";\nexport {default as thresholdScott} from \"./threshold/scott.js\";\nexport {default as thresholdSturges} from \"./threshold/sturges.js\";\nexport {default as max} from \"./max.js\";\nexport {default as maxIndex} from \"./maxIndex.js\";\nexport {default as mean} from \"./mean.js\";\nexport {default as median, medianIndex} from \"./median.js\";\nexport {default as merge} from \"./merge.js\";\nexport {default as min} from \"./min.js\";\nexport {default as minIndex} from \"./minIndex.js\";\nexport {default as mode} from \"./mode.js\";\nexport {default as nice} from \"./nice.js\";\nexport {default as pairs} from \"./pairs.js\";\nexport {default as permute} from \"./permute.js\";\nexport {default as quantile, quantileIndex, quantileSorted} from \"./quantile.js\";\nexport {default as quickselect} from \"./quickselect.js\";\nexport {default as range} from \"./range.js\";\nexport {default as rank} from \"./rank.js\";\nexport {default as least} from \"./least.js\";\nexport {default as leastIndex} from \"./leastIndex.js\";\nexport {default as greatest} from \"./greatest.js\";\nexport {default as greatestIndex} from \"./greatestIndex.js\";\nexport {default as scan} from \"./scan.js\"; // Deprecated; use leastIndex.\nexport {default as shuffle, shuffler} from \"./shuffle.js\";\nexport {default as sum} from \"./sum.js\";\nexport {default as ticks, tickIncrement, tickStep} from \"./ticks.js\";\nexport {default as transpose} from \"./transpose.js\";\nexport {default as variance} from \"./variance.js\";\nexport {default as zip} from \"./zip.js\";\nexport {default as every} from \"./every.js\";\nexport {default as some} from \"./some.js\";\nexport {default as filter} from \"./filter.js\";\nexport {default as map} from \"./map.js\";\nexport {default as reduce} from \"./reduce.js\";\nexport {default as reverse} from \"./reverse.js\";\nexport {default as sort} from \"./sort.js\";\nexport {default as difference} from \"./difference.js\";\nexport {default as disjoint} from \"./disjoint.js\";\nexport {default as intersection} from \"./intersection.js\";\nexport {default as subset} from \"./subset.js\";\nexport {default as superset} from \"./superset.js\";\nexport {default as union} from \"./union.js\";\nexport {InternMap, InternSet} from \"internmap\";\n","import {InternSet} from \"internmap\";\n\nexport default function intersection(values, ...others) {\n values = new InternSet(values);\n others = others.map(set);\n out: for (const value of values) {\n for (const other of others) {\n if (!other.has(value)) {\n values.delete(value);\n continue out;\n }\n }\n }\n return values;\n}\n\nfunction set(values) {\n return values instanceof InternSet ? values : new InternSet(values);\n}\n","import ascending from \"./ascending.js\";\n\nexport default function least(values, compare = ascending) {\n let min;\n let defined = false;\n if (compare.length === 1) {\n let minValue;\n for (const element of values) {\n const value = compare(element);\n if (defined\n ? ascending(value, minValue) < 0\n : ascending(value, value) === 0) {\n min = element;\n minValue = value;\n defined = true;\n }\n }\n } else {\n for (const value of values) {\n if (defined\n ? compare(value, min) < 0\n : compare(value, value) === 0) {\n min = value;\n defined = true;\n }\n }\n }\n return min;\n}\n","import ascending from \"./ascending.js\";\nimport minIndex from \"./minIndex.js\";\n\nexport default function leastIndex(values, compare = ascending) {\n if (compare.length === 1) return minIndex(values, compare);\n let minValue;\n let min = -1;\n let index = -1;\n for (const value of values) {\n ++index;\n if (min < 0\n ? compare(value, value) === 0\n : compare(value, minValue) < 0) {\n minValue = value;\n min = index;\n }\n }\n return min;\n}\n","export default function map(values, mapper) {\n if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n if (typeof mapper !== \"function\") throw new TypeError(\"mapper is not a function\");\n return Array.from(values, (value, index) => mapper(value, index, values));\n}\n","export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n","export default function maxIndex(values, valueof) {\n let max;\n let maxIndex = -1;\n let index = -1;\n if (valueof === undefined) {\n for (const value of values) {\n ++index;\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value, maxIndex = index;\n }\n }\n } else {\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value, maxIndex = index;\n }\n }\n }\n return maxIndex;\n}\n","export default function mean(values, valueof) {\n let count = 0;\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n ++count, sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n ++count, sum += value;\n }\n }\n }\n if (count) return sum / count;\n}\n","import quantile, {quantileIndex} from \"./quantile.js\";\n\nexport default function median(values, valueof) {\n return quantile(values, 0.5, valueof);\n}\n\nexport function medianIndex(values, valueof) {\n return quantileIndex(values, 0.5, valueof);\n}\n","function* flatten(arrays) {\n for (const array of arrays) {\n yield* array;\n }\n}\n\nexport default function merge(arrays) {\n return Array.from(flatten(arrays));\n}\n","export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n","export default function minIndex(values, valueof) {\n let min;\n let minIndex = -1;\n let index = -1;\n if (valueof === undefined) {\n for (const value of values) {\n ++index;\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value, minIndex = index;\n }\n }\n } else {\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value, minIndex = index;\n }\n }\n }\n return minIndex;\n}\n","import {InternMap} from \"internmap\";\n\nexport default function mode(values, valueof) {\n const counts = new InternMap();\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && value >= value) {\n counts.set(value, (counts.get(value) || 0) + 1);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && value >= value) {\n counts.set(value, (counts.get(value) || 0) + 1);\n }\n }\n }\n let modeValue;\n let modeCount = 0;\n for (const [value, count] of counts) {\n if (count > modeCount) {\n modeCount = count;\n modeValue = value;\n }\n }\n return modeValue;\n}\n","import {tickIncrement} from \"./ticks.js\";\n\nexport default function nice(start, stop, count) {\n let prestep;\n while (true) {\n const step = tickIncrement(start, stop, count);\n if (step === prestep || step === 0 || !isFinite(step)) {\n return [start, stop];\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n }\n prestep = step;\n }\n}\n","export default function number(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n","export default function pairs(values, pairof = pair) {\n const pairs = [];\n let previous;\n let first = false;\n for (const value of values) {\n if (first) pairs.push(pairof(previous, value));\n previous = value;\n first = true;\n }\n return pairs;\n}\n\nexport function pair(a, b) {\n return [a, b];\n}\n","export default function permute(source, keys) {\n return Array.from(keys, key => source[key]);\n}\n","import max from \"./max.js\";\nimport maxIndex from \"./maxIndex.js\";\nimport min from \"./min.js\";\nimport minIndex from \"./minIndex.js\";\nimport quickselect from \"./quickselect.js\";\nimport number, {numbers} from \"./number.js\";\nimport {ascendingDefined} from \"./sort.js\";\nimport greatest from \"./greatest.js\";\n\nexport default function quantile(values, p, valueof) {\n values = Float64Array.from(numbers(values, valueof));\n if (!(n = values.length) || isNaN(p = +p)) return;\n if (p <= 0 || n < 2) return min(values);\n if (p >= 1) return max(values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),\n value1 = min(values.subarray(i0 + 1));\n return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileSorted(values, p, valueof = number) {\n if (!(n = values.length) || isNaN(p = +p)) return;\n if (p <= 0 || n < 2) return +valueof(values[0], 0, values);\n if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = +valueof(values[i0], i0, values),\n value1 = +valueof(values[i0 + 1], i0 + 1, values);\n return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileIndex(values, p, valueof = number) {\n if (isNaN(p = +p)) return;\n numbers = Float64Array.from(values, (_, i) => number(valueof(values[i], i, values)));\n if (p <= 0) return minIndex(numbers);\n if (p >= 1) return maxIndex(numbers);\n var numbers,\n index = Uint32Array.from(values, (_, i) => i),\n j = numbers.length - 1,\n i = Math.floor(j * p);\n quickselect(index, i, 0, j, (i, j) => ascendingDefined(numbers[i], numbers[j]));\n i = greatest(index.subarray(0, i + 1), (i) => numbers[i]);\n return i >= 0 ? i : -1;\n}\n","import {ascendingDefined, compareDefined} from \"./sort.js\";\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nexport default function quickselect(array, k, left = 0, right = Infinity, compare) {\n k = Math.floor(k);\n left = Math.floor(Math.max(0, left));\n right = Math.floor(Math.min(array.length - 1, right));\n\n if (!(left <= k && k <= right)) return array;\n\n compare = compare === undefined ? ascendingDefined : compareDefined(compare);\n\n while (right > left) {\n if (right - left > 600) {\n const n = right - left + 1;\n const m = k - left + 1;\n const z = Math.log(n);\n const s = 0.5 * Math.exp(2 * z / 3);\n const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n quickselect(array, k, newLeft, newRight, compare);\n }\n\n const t = array[k];\n let i = left;\n let j = right;\n\n swap(array, left, k);\n if (compare(array[right], t) > 0) swap(array, left, right);\n\n while (i < j) {\n swap(array, i, j), ++i, --j;\n while (compare(array[i], t) < 0) ++i;\n while (compare(array[j], t) > 0) --j;\n }\n\n if (compare(array[left], t) === 0) swap(array, left, j);\n else ++j, swap(array, j, right);\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n\n return array;\n}\n\nfunction swap(array, i, j) {\n const t = array[i];\n array[i] = array[j];\n array[j] = t;\n}\n","export default function range(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n","import ascending from \"./ascending.js\";\nimport {ascendingDefined, compareDefined} from \"./sort.js\";\n\nexport default function rank(values, valueof = ascending) {\n if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n let V = Array.from(values);\n const R = new Float64Array(V.length);\n if (valueof.length !== 2) V = V.map(valueof), valueof = ascending;\n const compareIndex = (i, j) => valueof(V[i], V[j]);\n let k, r;\n values = Uint32Array.from(V, (_, i) => i);\n // Risky chaining due to Safari 14 https://github.com/d3/d3-array/issues/123\n values.sort(valueof === ascending ? (i, j) => ascendingDefined(V[i], V[j]) : compareDefined(compareIndex));\n values.forEach((j, i) => {\n const c = compareIndex(j, k === undefined ? j : k);\n if (c >= 0) {\n if (k === undefined || c > 0) k = j, r = i;\n R[j] = r;\n } else {\n R[j] = NaN;\n }\n });\n return R;\n}\n","export default function reduce(values, reducer, value) {\n if (typeof reducer !== \"function\") throw new TypeError(\"reducer is not a function\");\n const iterator = values[Symbol.iterator]();\n let done, next, index = -1;\n if (arguments.length < 3) {\n ({done, value} = iterator.next());\n if (done) return;\n ++index;\n }\n while (({done, value: next} = iterator.next()), !done) {\n value = reducer(value, next, ++index, values);\n }\n return value;\n}\n","export default function reverse(values) {\n if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n return Array.from(values).reverse();\n}\n","import leastIndex from \"./leastIndex.js\";\n\nexport default function scan(values, compare) {\n const index = leastIndex(values, compare);\n return index < 0 ? undefined : index;\n}\n","export default shuffler(Math.random);\n\nexport function shuffler(random) {\n return function shuffle(array, i0 = 0, i1 = array.length) {\n let m = i1 - (i0 = +i0);\n while (m) {\n const i = random() * m-- | 0, t = array[m + i0];\n array[m + i0] = array[i + i0];\n array[i + i0] = t;\n }\n return array;\n };\n}\n","export default function some(values, test) {\n if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n let index = -1;\n for (const value of values) {\n if (test(value, ++index, values)) {\n return true;\n }\n }\n return false;\n}\n","import ascending from \"./ascending.js\";\nimport permute from \"./permute.js\";\n\nexport default function sort(values, ...F) {\n if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n values = Array.from(values);\n let [f] = F;\n if ((f && f.length !== 2) || F.length > 1) {\n const index = Uint32Array.from(values, (d, i) => i);\n if (F.length > 1) {\n F = F.map(f => values.map(f));\n index.sort((i, j) => {\n for (const f of F) {\n const c = ascendingDefined(f[i], f[j]);\n if (c) return c;\n }\n });\n } else {\n f = values.map(f);\n index.sort((i, j) => ascendingDefined(f[i], f[j]));\n }\n return permute(values, index);\n }\n return values.sort(compareDefined(f));\n}\n\nexport function compareDefined(compare = ascending) {\n if (compare === ascending) return ascendingDefined;\n if (typeof compare !== \"function\") throw new TypeError(\"compare is not a function\");\n return (a, b) => {\n const x = compare(a, b);\n if (x || x === 0) return x;\n return (compare(b, b) === 0) - (compare(a, a) === 0);\n };\n}\n\nexport function ascendingDefined(a, b) {\n return (a == null || !(a >= a)) - (b == null || !(b >= b)) || (a < b ? -1 : a > b ? 1 : 0);\n}\n","import superset from \"./superset.js\";\n\nexport default function subset(values, other) {\n return superset(other, values);\n}\n","export default function sum(values, valueof) {\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n sum += value;\n }\n }\n }\n return sum;\n}\n","export default function superset(values, other) {\n const iterator = values[Symbol.iterator](), set = new Set();\n for (const o of other) {\n const io = intern(o);\n if (set.has(io)) continue;\n let value, done;\n while (({value, done} = iterator.next())) {\n if (done) return false;\n const ivalue = intern(value);\n set.add(ivalue);\n if (Object.is(io, ivalue)) break;\n }\n }\n return true;\n}\n\nfunction intern(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n","import count from \"../count.js\";\nimport quantile from \"../quantile.js\";\n\nexport default function thresholdFreedmanDiaconis(values, min, max) {\n const c = count(values), d = quantile(values, 0.75) - quantile(values, 0.25);\n return c && d ? Math.ceil((max - min) / (2 * d * Math.pow(c, -1 / 3))) : 1;\n}\n","import count from \"../count.js\";\nimport deviation from \"../deviation.js\";\n\nexport default function thresholdScott(values, min, max) {\n const c = count(values), d = deviation(values);\n return c && d ? Math.ceil((max - min) * Math.cbrt(c) / (3.49 * d)) : 1;\n}\n","import count from \"../count.js\";\n\nexport default function thresholdSturges(values) {\n return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);\n}\n","const e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nfunction tickSpec(start, stop, count) {\n const step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log10(step)),\n error = step / Math.pow(10, power),\n factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;\n let i1, i2, inc;\n if (power < 0) {\n inc = Math.pow(10, -power) / factor;\n i1 = Math.round(start * inc);\n i2 = Math.round(stop * inc);\n if (i1 / inc < start) ++i1;\n if (i2 / inc > stop) --i2;\n inc = -inc;\n } else {\n inc = Math.pow(10, power) * factor;\n i1 = Math.round(start / inc);\n i2 = Math.round(stop / inc);\n if (i1 * inc < start) ++i1;\n if (i2 * inc > stop) --i2;\n }\n if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);\n return [i1, i2, inc];\n}\n\nexport default function ticks(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n if (!(count > 0)) return [];\n if (start === stop) return [start];\n const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);\n if (!(i2 >= i1)) return [];\n const n = i2 - i1 + 1, ticks = new Array(n);\n if (reverse) {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;\n } else {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;\n }\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n return tickSpec(start, stop, count)[2];\n}\n\nexport function tickStep(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);\n return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);\n}\n","import min from \"./min.js\";\n\nexport default function transpose(matrix) {\n if (!(n = matrix.length)) return [];\n for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) {\n for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n row[j] = matrix[j][i];\n }\n }\n return transpose;\n}\n\nfunction length(d) {\n return d.length;\n}\n","import {InternSet} from \"internmap\";\n\nexport default function union(...others) {\n const set = new InternSet();\n for (const other of others) {\n for (const o of other) {\n set.add(o);\n }\n }\n return set;\n}\n","export default function variance(values, valueof) {\n let count = 0;\n let delta;\n let mean = 0;\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n delta = value - mean;\n mean += delta / ++count;\n sum += delta * (value - mean);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n delta = value - mean;\n mean += delta / ++count;\n sum += delta * (value - mean);\n }\n }\n }\n if (count > 1) return sum / (count - 1);\n}\n","import transpose from \"./transpose.js\";\n\nexport default function zip() {\n return transpose(arguments);\n}\n","import identity from \"./identity.js\";\n\nvar top = 1,\n right = 2,\n bottom = 3,\n left = 4,\n epsilon = 1e-6;\n\nfunction translateX(x) {\n return \"translate(\" + x + \",0)\";\n}\n\nfunction translateY(y) {\n return \"translate(0,\" + y + \")\";\n}\n\nfunction number(scale) {\n return d => +scale(d);\n}\n\nfunction center(scale, offset) {\n offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;\n if (scale.round()) offset = Math.round(offset);\n return d => +scale(d) + offset;\n}\n\nfunction entering() {\n return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n var tickArguments = [],\n tickValues = null,\n tickFormat = null,\n tickSizeInner = 6,\n tickSizeOuter = 6,\n tickPadding = 3,\n offset = typeof window !== \"undefined\" && window.devicePixelRatio > 1 ? 0 : 0.5,\n k = orient === top || orient === left ? -1 : 1,\n x = orient === left || orient === right ? \"x\" : \"y\",\n transform = orient === top || orient === bottom ? translateX : translateY;\n\n function axis(context) {\n var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,\n format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity) : tickFormat,\n spacing = Math.max(tickSizeInner, 0) + tickPadding,\n range = scale.range(),\n range0 = +range[0] + offset,\n range1 = +range[range.length - 1] + offset,\n position = (scale.bandwidth ? center : number)(scale.copy(), offset),\n selection = context.selection ? context.selection() : context,\n path = selection.selectAll(\".domain\").data([null]),\n tick = selection.selectAll(\".tick\").data(values, scale).order(),\n tickExit = tick.exit(),\n tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n line = tick.select(\"line\"),\n text = tick.select(\"text\");\n\n path = path.merge(path.enter().insert(\"path\", \".tick\")\n .attr(\"class\", \"domain\")\n .attr(\"stroke\", \"currentColor\"));\n\n tick = tick.merge(tickEnter);\n\n line = line.merge(tickEnter.append(\"line\")\n .attr(\"stroke\", \"currentColor\")\n .attr(x + \"2\", k * tickSizeInner));\n\n text = text.merge(tickEnter.append(\"text\")\n .attr(\"fill\", \"currentColor\")\n .attr(x, k * spacing)\n .attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n if (context !== selection) {\n path = path.transition(context);\n tick = tick.transition(context);\n line = line.transition(context);\n text = text.transition(context);\n\n tickExit = tickExit.transition(context)\n .attr(\"opacity\", epsilon)\n .attr(\"transform\", function(d) { return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute(\"transform\"); });\n\n tickEnter\n .attr(\"opacity\", epsilon)\n .attr(\"transform\", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); });\n }\n\n tickExit.remove();\n\n path\n .attr(\"d\", orient === left || orient === right\n ? (tickSizeOuter ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H\" + offset + \"V\" + range1 + \"H\" + k * tickSizeOuter : \"M\" + offset + \",\" + range0 + \"V\" + range1)\n : (tickSizeOuter ? \"M\" + range0 + \",\" + k * tickSizeOuter + \"V\" + offset + \"H\" + range1 + \"V\" + k * tickSizeOuter : \"M\" + range0 + \",\" + offset + \"H\" + range1));\n\n tick\n .attr(\"opacity\", 1)\n .attr(\"transform\", function(d) { return transform(position(d) + offset); });\n\n line\n .attr(x + \"2\", k * tickSizeInner);\n\n text\n .attr(x, k * spacing)\n .text(format);\n\n selection.filter(entering)\n .attr(\"fill\", \"none\")\n .attr(\"font-size\", 10)\n .attr(\"font-family\", \"sans-serif\")\n .attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n\n selection\n .each(function() { this.__axis = position; });\n }\n\n axis.scale = function(_) {\n return arguments.length ? (scale = _, axis) : scale;\n };\n\n axis.ticks = function() {\n return tickArguments = Array.from(arguments), axis;\n };\n\n axis.tickArguments = function(_) {\n return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis) : tickArguments.slice();\n };\n\n axis.tickValues = function(_) {\n return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis) : tickValues && tickValues.slice();\n };\n\n axis.tickFormat = function(_) {\n return arguments.length ? (tickFormat = _, axis) : tickFormat;\n };\n\n axis.tickSize = function(_) {\n return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeInner = function(_) {\n return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeOuter = function(_) {\n return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n };\n\n axis.tickPadding = function(_) {\n return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n };\n\n axis.offset = function(_) {\n return arguments.length ? (offset = +_, axis) : offset;\n };\n\n return axis;\n}\n\nexport function axisTop(scale) {\n return axis(top, scale);\n}\n\nexport function axisRight(scale) {\n return axis(right, scale);\n}\n\nexport function axisBottom(scale) {\n return axis(bottom, scale);\n}\n\nexport function axisLeft(scale) {\n return axis(left, scale);\n}\n","export default function(x) {\n return x;\n}\n","export {\n axisTop,\n axisRight,\n axisBottom,\n axisLeft\n} from \"./axis.js\";\n","import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolate} from \"d3-interpolate\";\nimport {pointer, select} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport BrushEvent from \"./event.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\nvar MODE_DRAG = {name: \"drag\"},\n MODE_SPACE = {name: \"space\"},\n MODE_HANDLE = {name: \"handle\"},\n MODE_CENTER = {name: \"center\"};\n\nconst {abs, max, min} = Math;\n\nfunction number1(e) {\n return [+e[0], +e[1]];\n}\n\nfunction number2(e) {\n return [number1(e[0]), number1(e[1])];\n}\n\nvar X = {\n name: \"x\",\n handles: [\"w\", \"e\"].map(type),\n input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },\n output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n name: \"y\",\n handles: [\"n\", \"s\"].map(type),\n input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },\n output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n name: \"xy\",\n handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n input: function(xy) { return xy == null ? null : number2(xy); },\n output: function(xy) { return xy; }\n};\n\nvar cursors = {\n overlay: \"crosshair\",\n selection: \"move\",\n n: \"ns-resize\",\n e: \"ew-resize\",\n s: \"ns-resize\",\n w: \"ew-resize\",\n nw: \"nwse-resize\",\n ne: \"nesw-resize\",\n se: \"nwse-resize\",\n sw: \"nesw-resize\"\n};\n\nvar flipX = {\n e: \"w\",\n w: \"e\",\n nw: \"ne\",\n ne: \"nw\",\n se: \"sw\",\n sw: \"se\"\n};\n\nvar flipY = {\n n: \"s\",\n s: \"n\",\n nw: \"sw\",\n ne: \"se\",\n se: \"ne\",\n sw: \"nw\"\n};\n\nvar signsX = {\n overlay: +1,\n selection: +1,\n n: null,\n e: +1,\n s: null,\n w: -1,\n nw: -1,\n ne: +1,\n se: +1,\n sw: -1\n};\n\nvar signsY = {\n overlay: +1,\n selection: +1,\n n: -1,\n e: null,\n s: +1,\n w: null,\n nw: -1,\n ne: -1,\n se: +1,\n sw: +1\n};\n\nfunction type(t) {\n return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n var svg = this.ownerSVGElement || this;\n if (svg.hasAttribute(\"viewBox\")) {\n svg = svg.viewBox.baseVal;\n return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n }\n return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n// Like d3.local, but with the name “__brush” rather than auto-generated.\nfunction local(node) {\n while (!node.__brush) if (!(node = node.parentNode)) return;\n return node.__brush;\n}\n\nfunction empty(extent) {\n return extent[0][0] === extent[1][0]\n || extent[0][1] === extent[1][1];\n}\n\nexport function brushSelection(node) {\n var state = node.__brush;\n return state ? state.dim.output(state.selection) : null;\n}\n\nexport function brushX() {\n return brush(X);\n}\n\nexport function brushY() {\n return brush(Y);\n}\n\nexport default function() {\n return brush(XY);\n}\n\nfunction brush(dim) {\n var extent = defaultExtent,\n filter = defaultFilter,\n touchable = defaultTouchable,\n keys = true,\n listeners = dispatch(\"start\", \"brush\", \"end\"),\n handleSize = 6,\n touchending;\n\n function brush(group) {\n var overlay = group\n .property(\"__brush\", initialize)\n .selectAll(\".overlay\")\n .data([type(\"overlay\")]);\n\n overlay.enter().append(\"rect\")\n .attr(\"class\", \"overlay\")\n .attr(\"pointer-events\", \"all\")\n .attr(\"cursor\", cursors.overlay)\n .merge(overlay)\n .each(function() {\n var extent = local(this).extent;\n select(this)\n .attr(\"x\", extent[0][0])\n .attr(\"y\", extent[0][1])\n .attr(\"width\", extent[1][0] - extent[0][0])\n .attr(\"height\", extent[1][1] - extent[0][1]);\n });\n\n group.selectAll(\".selection\")\n .data([type(\"selection\")])\n .enter().append(\"rect\")\n .attr(\"class\", \"selection\")\n .attr(\"cursor\", cursors.selection)\n .attr(\"fill\", \"#777\")\n .attr(\"fill-opacity\", 0.3)\n .attr(\"stroke\", \"#fff\")\n .attr(\"shape-rendering\", \"crispEdges\");\n\n var handle = group.selectAll(\".handle\")\n .data(dim.handles, function(d) { return d.type; });\n\n handle.exit().remove();\n\n handle.enter().append(\"rect\")\n .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n group\n .each(redraw)\n .attr(\"fill\", \"none\")\n .attr(\"pointer-events\", \"all\")\n .on(\"mousedown.brush\", started)\n .filter(touchable)\n .on(\"touchstart.brush\", started)\n .on(\"touchmove.brush\", touchmoved)\n .on(\"touchend.brush touchcancel.brush\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n brush.move = function(group, selection, event) {\n if (group.tween) {\n group\n .on(\"start.brush\", function(event) { emitter(this, arguments).beforestart().start(event); })\n .on(\"interrupt.brush end.brush\", function(event) { emitter(this, arguments).end(event); })\n .tween(\"brush\", function() {\n var that = this,\n state = that.__brush,\n emit = emitter(that, arguments),\n selection0 = state.selection,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n i = interpolate(selection0, selection1);\n\n function tween(t) {\n state.selection = t === 1 && selection1 === null ? null : i(t);\n redraw.call(that);\n emit.brush();\n }\n\n return selection0 !== null && selection1 !== null ? tween : tween(1);\n });\n } else {\n group\n .each(function() {\n var that = this,\n args = arguments,\n state = that.__brush,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n emit = emitter(that, args).beforestart();\n\n interrupt(that);\n state.selection = selection1 === null ? null : selection1;\n redraw.call(that);\n emit.start(event).brush(event).end(event);\n });\n }\n };\n\n brush.clear = function(group, event) {\n brush.move(group, null, event);\n };\n\n function redraw() {\n var group = select(this),\n selection = local(this).selection;\n\n if (selection) {\n group.selectAll(\".selection\")\n .style(\"display\", null)\n .attr(\"x\", selection[0][0])\n .attr(\"y\", selection[0][1])\n .attr(\"width\", selection[1][0] - selection[0][0])\n .attr(\"height\", selection[1][1] - selection[0][1]);\n\n group.selectAll(\".handle\")\n .style(\"display\", null)\n .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n }\n\n else {\n group.selectAll(\".selection,.handle\")\n .style(\"display\", \"none\")\n .attr(\"x\", null)\n .attr(\"y\", null)\n .attr(\"width\", null)\n .attr(\"height\", null);\n }\n }\n\n function emitter(that, args, clean) {\n var emit = that.__brush.emitter;\n return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n }\n\n function Emitter(that, args, clean) {\n this.that = that;\n this.args = args;\n this.state = that.__brush;\n this.active = 0;\n this.clean = clean;\n }\n\n Emitter.prototype = {\n beforestart: function() {\n if (++this.active === 1) this.state.emitter = this, this.starting = true;\n return this;\n },\n start: function(event, mode) {\n if (this.starting) this.starting = false, this.emit(\"start\", event, mode);\n else this.emit(\"brush\", event);\n return this;\n },\n brush: function(event, mode) {\n this.emit(\"brush\", event, mode);\n return this;\n },\n end: function(event, mode) {\n if (--this.active === 0) delete this.state.emitter, this.emit(\"end\", event, mode);\n return this;\n },\n emit: function(type, event, mode) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new BrushEvent(type, {\n sourceEvent: event,\n target: brush,\n selection: dim.output(this.state.selection),\n mode,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function started(event) {\n if (touchending && !event.touches) return;\n if (!filter.apply(this, arguments)) return;\n\n var that = this,\n type = event.target.__data__.type,\n mode = (keys && event.metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE),\n signX = dim === Y ? null : signsX[type],\n signY = dim === X ? null : signsY[type],\n state = local(that),\n extent = state.extent,\n selection = state.selection,\n W = extent[0][0], w0, w1,\n N = extent[0][1], n0, n1,\n E = extent[1][0], e0, e1,\n S = extent[1][1], s0, s1,\n dx = 0,\n dy = 0,\n moving,\n shifting = signX && signY && keys && event.shiftKey,\n lockX,\n lockY,\n points = Array.from(event.touches || [event], t => {\n const i = t.identifier;\n t = pointer(t, that);\n t.point0 = t.slice();\n t.identifier = i;\n return t;\n });\n\n interrupt(that);\n var emit = emitter(that, arguments, true).beforestart();\n\n if (type === \"overlay\") {\n if (selection) moving = true;\n const pts = [points[0], points[1] || points[0]];\n state.selection = selection = [[\n w0 = dim === Y ? W : min(pts[0][0], pts[1][0]),\n n0 = dim === X ? N : min(pts[0][1], pts[1][1])\n ], [\n e0 = dim === Y ? E : max(pts[0][0], pts[1][0]),\n s0 = dim === X ? S : max(pts[0][1], pts[1][1])\n ]];\n if (points.length > 1) move(event);\n } else {\n w0 = selection[0][0];\n n0 = selection[0][1];\n e0 = selection[1][0];\n s0 = selection[1][1];\n }\n\n w1 = w0;\n n1 = n0;\n e1 = e0;\n s1 = s0;\n\n var group = select(that)\n .attr(\"pointer-events\", \"none\");\n\n var overlay = group.selectAll(\".overlay\")\n .attr(\"cursor\", cursors[type]);\n\n if (event.touches) {\n emit.moved = moved;\n emit.ended = ended;\n } else {\n var view = select(event.view)\n .on(\"mousemove.brush\", moved, true)\n .on(\"mouseup.brush\", ended, true);\n if (keys) view\n .on(\"keydown.brush\", keydowned, true)\n .on(\"keyup.brush\", keyupped, true)\n\n dragDisable(event.view);\n }\n\n redraw.call(that);\n emit.start(event, mode.name);\n\n function moved(event) {\n for (const p of event.changedTouches || [event]) {\n for (const d of points)\n if (d.identifier === p.identifier) d.cur = pointer(p, that);\n }\n if (shifting && !lockX && !lockY && points.length === 1) {\n const point = points[0];\n if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1]))\n lockY = true;\n else\n lockX = true;\n }\n for (const point of points)\n if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];\n moving = true;\n noevent(event);\n move(event);\n }\n\n function move(event) {\n const point = points[0], point0 = point.point0;\n var t;\n\n dx = point[0] - point0[0];\n dy = point[1] - point0[1];\n\n switch (mode) {\n case MODE_SPACE:\n case MODE_DRAG: {\n if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n break;\n }\n case MODE_HANDLE: {\n if (points[1]) {\n if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;\n if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;\n } else {\n if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n }\n break;\n }\n case MODE_CENTER: {\n if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));\n if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));\n break;\n }\n }\n\n if (e1 < w1) {\n signX *= -1;\n t = w0, w0 = e0, e0 = t;\n t = w1, w1 = e1, e1 = t;\n if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n }\n\n if (s1 < n1) {\n signY *= -1;\n t = n0, n0 = s0, s0 = t;\n t = n1, n1 = s1, s1 = t;\n if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n }\n\n if (state.selection) selection = state.selection; // May be set by brush.move!\n if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n if (selection[0][0] !== w1\n || selection[0][1] !== n1\n || selection[1][0] !== e1\n || selection[1][1] !== s1) {\n state.selection = [[w1, n1], [e1, s1]];\n redraw.call(that);\n emit.brush(event, mode.name);\n }\n }\n\n function ended(event) {\n nopropagation(event);\n if (event.touches) {\n if (event.touches.length) return;\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n } else {\n dragEnable(event.view, moving);\n view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n }\n group.attr(\"pointer-events\", \"all\");\n overlay.attr(\"cursor\", cursors.overlay);\n if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n if (empty(selection)) state.selection = null, redraw.call(that);\n emit.end(event, mode.name);\n }\n\n function keydowned(event) {\n switch (event.keyCode) {\n case 16: { // SHIFT\n shifting = signX && signY;\n break;\n }\n case 18: { // ALT\n if (mode === MODE_HANDLE) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n move(event);\n }\n break;\n }\n case 32: { // SPACE; takes priority over ALT\n if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n mode = MODE_SPACE;\n overlay.attr(\"cursor\", cursors.selection);\n move(event);\n }\n break;\n }\n default: return;\n }\n noevent(event);\n }\n\n function keyupped(event) {\n switch (event.keyCode) {\n case 16: { // SHIFT\n if (shifting) {\n lockX = lockY = shifting = false;\n move(event);\n }\n break;\n }\n case 18: { // ALT\n if (mode === MODE_CENTER) {\n if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n move(event);\n }\n break;\n }\n case 32: { // SPACE\n if (mode === MODE_SPACE) {\n if (event.altKey) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n } else {\n if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n }\n overlay.attr(\"cursor\", cursors[type]);\n move(event);\n }\n break;\n }\n default: return;\n }\n noevent(event);\n }\n }\n\n function touchmoved(event) {\n emitter(this, arguments).moved(event);\n }\n\n function touchended(event) {\n emitter(this, arguments).ended(event);\n }\n\n function initialize() {\n var state = this.__brush || {selection: null};\n state.extent = number2(extent.apply(this, arguments));\n state.dim = dim;\n return state;\n }\n\n brush.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant(number2(_)), brush) : extent;\n };\n\n brush.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), brush) : filter;\n };\n\n brush.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), brush) : touchable;\n };\n\n brush.handleSize = function(_) {\n return arguments.length ? (handleSize = +_, brush) : handleSize;\n };\n\n brush.keyModifiers = function(_) {\n return arguments.length ? (keys = !!_, brush) : keys;\n };\n\n brush.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? brush : value;\n };\n\n return brush;\n}\n","export default x => () => x;\n","export default function BrushEvent(type, {\n sourceEvent,\n target,\n selection,\n mode,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n selection: {value: selection, enumerable: true, configurable: true},\n mode: {value: mode, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n","export {\n default as brush,\n brushX,\n brushY,\n brushSelection\n} from \"./brush.js\";\n","export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","export var slice = Array.prototype.slice;\n","import {max, tau} from \"./math.js\";\n\nfunction range(i, j) {\n return Array.from({length: j - i}, (_, k) => i + k);\n}\n\nfunction compareValue(compare) {\n return function(a, b) {\n return compare(\n a.source.value + a.target.value,\n b.source.value + b.target.value\n );\n };\n}\n\nexport default function() {\n return chord(false, false);\n}\n\nexport function chordTranspose() {\n return chord(false, true);\n}\n\nexport function chordDirected() {\n return chord(true, false);\n}\n\nfunction chord(directed, transpose) {\n var padAngle = 0,\n sortGroups = null,\n sortSubgroups = null,\n sortChords = null;\n\n function chord(matrix) {\n var n = matrix.length,\n groupSums = new Array(n),\n groupIndex = range(0, n),\n chords = new Array(n * n),\n groups = new Array(n),\n k = 0, dx;\n\n matrix = Float64Array.from({length: n * n}, transpose\n ? (_, i) => matrix[i % n][i / n | 0]\n : (_, i) => matrix[i / n | 0][i % n]);\n\n // Compute the scaling factor from value to angle in [0, 2pi].\n for (let i = 0; i < n; ++i) {\n let x = 0;\n for (let j = 0; j < n; ++j) x += matrix[i * n + j] + directed * matrix[j * n + i];\n k += groupSums[i] = x;\n }\n k = max(0, tau - padAngle * n) / k;\n dx = k ? padAngle : tau / n;\n\n // Compute the angles for each group and constituent chord.\n {\n let x = 0;\n if (sortGroups) groupIndex.sort((a, b) => sortGroups(groupSums[a], groupSums[b]));\n for (const i of groupIndex) {\n const x0 = x;\n if (directed) {\n const subgroupIndex = range(~n + 1, n).filter(j => j < 0 ? matrix[~j * n + i] : matrix[i * n + j]);\n if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(a < 0 ? -matrix[~a * n + i] : matrix[i * n + a], b < 0 ? -matrix[~b * n + i] : matrix[i * n + b]));\n for (const j of subgroupIndex) {\n if (j < 0) {\n const chord = chords[~j * n + i] || (chords[~j * n + i] = {source: null, target: null});\n chord.target = {index: i, startAngle: x, endAngle: x += matrix[~j * n + i] * k, value: matrix[~j * n + i]};\n } else {\n const chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null});\n chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]};\n }\n }\n groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]};\n } else {\n const subgroupIndex = range(0, n).filter(j => matrix[i * n + j] || matrix[j * n + i]);\n if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(matrix[i * n + a], matrix[i * n + b]));\n for (const j of subgroupIndex) {\n let chord;\n if (i < j) {\n chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null});\n chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]};\n } else {\n chord = chords[j * n + i] || (chords[j * n + i] = {source: null, target: null});\n chord.target = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]};\n if (i === j) chord.source = chord.target;\n }\n if (chord.source && chord.target && chord.source.value < chord.target.value) {\n const source = chord.source;\n chord.source = chord.target;\n chord.target = source;\n }\n }\n groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]};\n }\n x += dx;\n }\n }\n\n // Remove empty chords.\n chords = Object.values(chords);\n chords.groups = groups;\n return sortChords ? chords.sort(sortChords) : chords;\n }\n\n chord.padAngle = function(_) {\n return arguments.length ? (padAngle = max(0, _), chord) : padAngle;\n };\n\n chord.sortGroups = function(_) {\n return arguments.length ? (sortGroups = _, chord) : sortGroups;\n };\n\n chord.sortSubgroups = function(_) {\n return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups;\n };\n\n chord.sortChords = function(_) {\n return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._;\n };\n\n return chord;\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export {default as chord, chordTranspose, chordDirected} from \"./chord.js\";\nexport {default as ribbon, ribbonArrow} from \"./ribbon.js\";\n","export var abs = Math.abs;\nexport var cos = Math.cos;\nexport var sin = Math.sin;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var tau = pi * 2;\nexport var max = Math.max;\nexport var epsilon = 1e-12;\n","import {path} from \"d3-path\";\nimport {slice} from \"./array.js\";\nimport constant from \"./constant.js\";\nimport {abs, cos, epsilon, halfPi, sin} from \"./math.js\";\n\nfunction defaultSource(d) {\n return d.source;\n}\n\nfunction defaultTarget(d) {\n return d.target;\n}\n\nfunction defaultRadius(d) {\n return d.radius;\n}\n\nfunction defaultStartAngle(d) {\n return d.startAngle;\n}\n\nfunction defaultEndAngle(d) {\n return d.endAngle;\n}\n\nfunction defaultPadAngle() {\n return 0;\n}\n\nfunction defaultArrowheadRadius() {\n return 10;\n}\n\nfunction ribbon(headRadius) {\n var source = defaultSource,\n target = defaultTarget,\n sourceRadius = defaultRadius,\n targetRadius = defaultRadius,\n startAngle = defaultStartAngle,\n endAngle = defaultEndAngle,\n padAngle = defaultPadAngle,\n context = null;\n\n function ribbon() {\n var buffer,\n s = source.apply(this, arguments),\n t = target.apply(this, arguments),\n ap = padAngle.apply(this, arguments) / 2,\n argv = slice.call(arguments),\n sr = +sourceRadius.apply(this, (argv[0] = s, argv)),\n sa0 = startAngle.apply(this, argv) - halfPi,\n sa1 = endAngle.apply(this, argv) - halfPi,\n tr = +targetRadius.apply(this, (argv[0] = t, argv)),\n ta0 = startAngle.apply(this, argv) - halfPi,\n ta1 = endAngle.apply(this, argv) - halfPi;\n\n if (!context) context = buffer = path();\n\n if (ap > epsilon) {\n if (abs(sa1 - sa0) > ap * 2 + epsilon) sa1 > sa0 ? (sa0 += ap, sa1 -= ap) : (sa0 -= ap, sa1 += ap);\n else sa0 = sa1 = (sa0 + sa1) / 2;\n if (abs(ta1 - ta0) > ap * 2 + epsilon) ta1 > ta0 ? (ta0 += ap, ta1 -= ap) : (ta0 -= ap, ta1 += ap);\n else ta0 = ta1 = (ta0 + ta1) / 2;\n }\n\n context.moveTo(sr * cos(sa0), sr * sin(sa0));\n context.arc(0, 0, sr, sa0, sa1);\n if (sa0 !== ta0 || sa1 !== ta1) {\n if (headRadius) {\n var hr = +headRadius.apply(this, arguments), tr2 = tr - hr, ta2 = (ta0 + ta1) / 2;\n context.quadraticCurveTo(0, 0, tr2 * cos(ta0), tr2 * sin(ta0));\n context.lineTo(tr * cos(ta2), tr * sin(ta2));\n context.lineTo(tr2 * cos(ta1), tr2 * sin(ta1));\n } else {\n context.quadraticCurveTo(0, 0, tr * cos(ta0), tr * sin(ta0));\n context.arc(0, 0, tr, ta0, ta1);\n }\n }\n context.quadraticCurveTo(0, 0, sr * cos(sa0), sr * sin(sa0));\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n if (headRadius) ribbon.headRadius = function(_) {\n return arguments.length ? (headRadius = typeof _ === \"function\" ? _ : constant(+_), ribbon) : headRadius;\n };\n\n ribbon.radius = function(_) {\n return arguments.length ? (sourceRadius = targetRadius = typeof _ === \"function\" ? _ : constant(+_), ribbon) : sourceRadius;\n };\n\n ribbon.sourceRadius = function(_) {\n return arguments.length ? (sourceRadius = typeof _ === \"function\" ? _ : constant(+_), ribbon) : sourceRadius;\n };\n\n ribbon.targetRadius = function(_) {\n return arguments.length ? (targetRadius = typeof _ === \"function\" ? _ : constant(+_), ribbon) : targetRadius;\n };\n\n ribbon.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), ribbon) : startAngle;\n };\n\n ribbon.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), ribbon) : endAngle;\n };\n\n ribbon.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), ribbon) : padAngle;\n };\n\n ribbon.source = function(_) {\n return arguments.length ? (source = _, ribbon) : source;\n };\n\n ribbon.target = function(_) {\n return arguments.length ? (target = _, ribbon) : target;\n };\n\n ribbon.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), ribbon) : context;\n };\n\n return ribbon;\n}\n\nexport default function() {\n return ribbon();\n}\n\nexport function ribbonArrow() {\n return ribbon(defaultArrowheadRadius);\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHex8: color_formatHex8,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n },\n displayable() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatHex8: rgb_formatHex8,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n value = clampi(value);\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n clamp() {\n return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n }\n}));\n\nfunction clamph(value) {\n value = (value || 0) % 360;\n return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb, darker, brighter} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\nvar A = -0.14861,\n B = +1.78277,\n C = -0.29227,\n D = -0.90649,\n E = +1.97294,\n ED = E * D,\n EB = E * B,\n BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n bl = b - l,\n k = (E * (g - l) - C * bl) / D,\n s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n h = s ? Math.atan2(k, bl) * degrees - 120 : NaN;\n return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nexport default function cubehelix(h, s, l, opacity) {\n return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nexport function Cubehelix(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Cubehelix, cubehelix, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,\n l = +this.l,\n a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n cosh = Math.cos(h),\n sinh = Math.sin(h);\n return new Rgb(\n 255 * (l + a * (A * cosh + B * sinh)),\n 255 * (l + a * (C * cosh + D * sinh)),\n 255 * (l + a * (E * cosh)),\n this.opacity\n );\n }\n}));\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","export {default as color, rgb, hsl} from \"./color.js\";\nexport {default as lab, hcl, lch, gray} from \"./lab.js\";\nexport {default as cubehelix} from \"./cubehelix.js\";\n","import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n Xn = 0.96422,\n Yn = 1,\n Zn = 0.82521,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n if (o instanceof Hcl) return hcl2lab(o);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = rgb2lrgb(o.r),\n g = rgb2lrgb(o.g),\n b = rgb2lrgb(o.b),\n y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n if (r === g && g === b) x = z = y; else {\n x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n }\n return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n brighter(k) {\n return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n darker(k) {\n return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n rgb() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n x = Xn * lab2xyz(x);\n y = Yn * lab2xyz(y);\n z = Zn * lab2xyz(z);\n return new Rgb(\n lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n this.opacity\n );\n }\n}));\n\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n if (!(o instanceof Lab)) o = labConvert(o);\n if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n var h = Math.atan2(o.b, o.a) * degrees;\n return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n var h = o.h * radians;\n return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n brighter(k) {\n return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n },\n darker(k) {\n return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n },\n rgb() {\n return hcl2lab(this).rgb();\n }\n}));\n","export const radians = Math.PI / 180;\nexport const degrees = 180 / Math.PI;\n","export default function(ring) {\n var i = 0, n = ring.length, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1];\n while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1];\n return area;\n}\n","var array = Array.prototype;\n\nexport var slice = array.slice;\n","export default function(a, b) {\n return a - b;\n}\n","export default x => () => x;\n","export default function(ring, hole) {\n var i = -1, n = hole.length, c;\n while (++i < n) if (c = ringContains(ring, hole[i])) return c;\n return 0;\n}\n\nfunction ringContains(ring, point) {\n var x = point[0], y = point[1], contains = -1;\n for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {\n var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1];\n if (segmentContains(pi, pj, point)) return 0;\n if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) contains = -contains;\n }\n return contains;\n}\n\nfunction segmentContains(a, b, c) {\n var i; return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]);\n}\n\nfunction collinear(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]);\n}\n\nfunction within(p, q, r) {\n return p <= q && q <= r || r <= q && q <= p;\n}\n","import {extent, nice, thresholdSturges, ticks} from \"d3-array\";\nimport {slice} from \"./array.js\";\nimport ascending from \"./ascending.js\";\nimport area from \"./area.js\";\nimport constant from \"./constant.js\";\nimport contains from \"./contains.js\";\nimport noop from \"./noop.js\";\n\nvar cases = [\n [],\n [[[1.0, 1.5], [0.5, 1.0]]],\n [[[1.5, 1.0], [1.0, 1.5]]],\n [[[1.5, 1.0], [0.5, 1.0]]],\n [[[1.0, 0.5], [1.5, 1.0]]],\n [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]],\n [[[1.0, 0.5], [1.0, 1.5]]],\n [[[1.0, 0.5], [0.5, 1.0]]],\n [[[0.5, 1.0], [1.0, 0.5]]],\n [[[1.0, 1.5], [1.0, 0.5]]],\n [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]],\n [[[1.5, 1.0], [1.0, 0.5]]],\n [[[0.5, 1.0], [1.5, 1.0]]],\n [[[1.0, 1.5], [1.5, 1.0]]],\n [[[0.5, 1.0], [1.0, 1.5]]],\n []\n];\n\nexport default function() {\n var dx = 1,\n dy = 1,\n threshold = thresholdSturges,\n smooth = smoothLinear;\n\n function contours(values) {\n var tz = threshold(values);\n\n // Convert number of thresholds into uniform thresholds.\n if (!Array.isArray(tz)) {\n const e = extent(values, finite);\n tz = ticks(...nice(e[0], e[1], tz), tz);\n while (tz[tz.length - 1] >= e[1]) tz.pop();\n while (tz[1] < e[0]) tz.shift();\n } else {\n tz = tz.slice().sort(ascending);\n }\n\n return tz.map(value => contour(values, value));\n }\n\n // Accumulate, smooth contour rings, assign holes to exterior rings.\n // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js\n function contour(values, value) {\n const v = value == null ? NaN : +value;\n if (isNaN(v)) throw new Error(`invalid value: ${value}`);\n\n var polygons = [],\n holes = [];\n\n isorings(values, v, function(ring) {\n smooth(ring, values, v);\n if (area(ring) > 0) polygons.push([ring]);\n else holes.push(ring);\n });\n\n holes.forEach(function(hole) {\n for (var i = 0, n = polygons.length, polygon; i < n; ++i) {\n if (contains((polygon = polygons[i])[0], hole) !== -1) {\n polygon.push(hole);\n return;\n }\n }\n });\n\n return {\n type: \"MultiPolygon\",\n value: value,\n coordinates: polygons\n };\n }\n\n // Marching squares with isolines stitched into rings.\n // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js\n function isorings(values, value, callback) {\n var fragmentByStart = new Array,\n fragmentByEnd = new Array,\n x, y, t0, t1, t2, t3;\n\n // Special case for the first row (y = -1, t2 = t3 = 0).\n x = y = -1;\n t1 = above(values[0], value);\n cases[t1 << 1].forEach(stitch);\n while (++x < dx - 1) {\n t0 = t1, t1 = above(values[x + 1], value);\n cases[t0 | t1 << 1].forEach(stitch);\n }\n cases[t1 << 0].forEach(stitch);\n\n // General case for the intermediate rows.\n while (++y < dy - 1) {\n x = -1;\n t1 = above(values[y * dx + dx], value);\n t2 = above(values[y * dx], value);\n cases[t1 << 1 | t2 << 2].forEach(stitch);\n while (++x < dx - 1) {\n t0 = t1, t1 = above(values[y * dx + dx + x + 1], value);\n t3 = t2, t2 = above(values[y * dx + x + 1], value);\n cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch);\n }\n cases[t1 | t2 << 3].forEach(stitch);\n }\n\n // Special case for the last row (y = dy - 1, t0 = t1 = 0).\n x = -1;\n t2 = values[y * dx] >= value;\n cases[t2 << 2].forEach(stitch);\n while (++x < dx - 1) {\n t3 = t2, t2 = above(values[y * dx + x + 1], value);\n cases[t2 << 2 | t3 << 3].forEach(stitch);\n }\n cases[t2 << 3].forEach(stitch);\n\n function stitch(line) {\n var start = [line[0][0] + x, line[0][1] + y],\n end = [line[1][0] + x, line[1][1] + y],\n startIndex = index(start),\n endIndex = index(end),\n f, g;\n if (f = fragmentByEnd[startIndex]) {\n if (g = fragmentByStart[endIndex]) {\n delete fragmentByEnd[f.end];\n delete fragmentByStart[g.start];\n if (f === g) {\n f.ring.push(end);\n callback(f.ring);\n } else {\n fragmentByStart[f.start] = fragmentByEnd[g.end] = {start: f.start, end: g.end, ring: f.ring.concat(g.ring)};\n }\n } else {\n delete fragmentByEnd[f.end];\n f.ring.push(end);\n fragmentByEnd[f.end = endIndex] = f;\n }\n } else if (f = fragmentByStart[endIndex]) {\n if (g = fragmentByEnd[startIndex]) {\n delete fragmentByStart[f.start];\n delete fragmentByEnd[g.end];\n if (f === g) {\n f.ring.push(end);\n callback(f.ring);\n } else {\n fragmentByStart[g.start] = fragmentByEnd[f.end] = {start: g.start, end: f.end, ring: g.ring.concat(f.ring)};\n }\n } else {\n delete fragmentByStart[f.start];\n f.ring.unshift(start);\n fragmentByStart[f.start = startIndex] = f;\n }\n } else {\n fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {start: startIndex, end: endIndex, ring: [start, end]};\n }\n }\n }\n\n function index(point) {\n return point[0] * 2 + point[1] * (dx + 1) * 4;\n }\n\n function smoothLinear(ring, values, value) {\n ring.forEach(function(point) {\n var x = point[0],\n y = point[1],\n xt = x | 0,\n yt = y | 0,\n v1 = valid(values[yt * dx + xt]);\n if (x > 0 && x < dx && xt === x) {\n point[0] = smooth1(x, valid(values[yt * dx + xt - 1]), v1, value);\n }\n if (y > 0 && y < dy && yt === y) {\n point[1] = smooth1(y, valid(values[(yt - 1) * dx + xt]), v1, value);\n }\n });\n }\n\n contours.contour = contour;\n\n contours.size = function(_) {\n if (!arguments.length) return [dx, dy];\n var _0 = Math.floor(_[0]), _1 = Math.floor(_[1]);\n if (!(_0 >= 0 && _1 >= 0)) throw new Error(\"invalid size\");\n return dx = _0, dy = _1, contours;\n };\n\n contours.thresholds = function(_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), contours) : threshold;\n };\n\n contours.smooth = function(_) {\n return arguments.length ? (smooth = _ ? smoothLinear : noop, contours) : smooth === smoothLinear;\n };\n\n return contours;\n}\n\n// When computing the extent, ignore infinite values (as well as invalid ones).\nfunction finite(x) {\n return isFinite(x) ? x : NaN;\n}\n\n// Is the (possibly invalid) x greater than or equal to the (known valid) value?\n// Treat any invalid value as below negative infinity.\nfunction above(x, value) {\n return x == null ? false : +x >= value;\n}\n\n// During smoothing, treat any invalid value as negative infinity.\nfunction valid(v) {\n return v == null || isNaN(v = +v) ? -Infinity : v;\n}\n\nfunction smooth1(x, v0, v1, value) {\n const a = value - v0;\n const b = v1 - v0;\n const d = isFinite(a) || isFinite(b) ? a / b : Math.sign(a) / Math.sign(b);\n return isNaN(d) ? x : x + d - 0.5;\n}\n","import {blur2, max, ticks} from \"d3-array\";\nimport {slice} from \"./array.js\";\nimport constant from \"./constant.js\";\nimport Contours from \"./contours.js\";\n\nfunction defaultX(d) {\n return d[0];\n}\n\nfunction defaultY(d) {\n return d[1];\n}\n\nfunction defaultWeight() {\n return 1;\n}\n\nexport default function() {\n var x = defaultX,\n y = defaultY,\n weight = defaultWeight,\n dx = 960,\n dy = 500,\n r = 20, // blur radius\n k = 2, // log2(grid cell size)\n o = r * 3, // grid offset, to pad for blur\n n = (dx + o * 2) >> k, // grid width\n m = (dy + o * 2) >> k, // grid height\n threshold = constant(20);\n\n function grid(data) {\n var values = new Float32Array(n * m),\n pow2k = Math.pow(2, -k),\n i = -1;\n\n for (const d of data) {\n var xi = (x(d, ++i, data) + o) * pow2k,\n yi = (y(d, i, data) + o) * pow2k,\n wi = +weight(d, i, data);\n if (wi && xi >= 0 && xi < n && yi >= 0 && yi < m) {\n var x0 = Math.floor(xi),\n y0 = Math.floor(yi),\n xt = xi - x0 - 0.5,\n yt = yi - y0 - 0.5;\n values[x0 + y0 * n] += (1 - xt) * (1 - yt) * wi;\n values[x0 + 1 + y0 * n] += xt * (1 - yt) * wi;\n values[x0 + 1 + (y0 + 1) * n] += xt * yt * wi;\n values[x0 + (y0 + 1) * n] += (1 - xt) * yt * wi;\n }\n }\n\n blur2({data: values, width: n, height: m}, r * pow2k);\n return values;\n }\n\n function density(data) {\n var values = grid(data),\n tz = threshold(values),\n pow4k = Math.pow(2, 2 * k);\n\n // Convert number of thresholds into uniform thresholds.\n if (!Array.isArray(tz)) {\n tz = ticks(Number.MIN_VALUE, max(values) / pow4k, tz);\n }\n\n return Contours()\n .size([n, m])\n .thresholds(tz.map(d => d * pow4k))\n (values)\n .map((c, i) => (c.value = +tz[i], transform(c)));\n }\n\n density.contours = function(data) {\n var values = grid(data),\n contours = Contours().size([n, m]),\n pow4k = Math.pow(2, 2 * k),\n contour = value => {\n value = +value;\n var c = transform(contours.contour(values, value * pow4k));\n c.value = value; // preserve exact threshold value\n return c;\n };\n Object.defineProperty(contour, \"max\", {get: () => max(values) / pow4k});\n return contour;\n };\n\n function transform(geometry) {\n geometry.coordinates.forEach(transformPolygon);\n return geometry;\n }\n\n function transformPolygon(coordinates) {\n coordinates.forEach(transformRing);\n }\n\n function transformRing(coordinates) {\n coordinates.forEach(transformPoint);\n }\n\n // TODO Optimize.\n function transformPoint(coordinates) {\n coordinates[0] = coordinates[0] * Math.pow(2, k) - o;\n coordinates[1] = coordinates[1] * Math.pow(2, k) - o;\n }\n\n function resize() {\n o = r * 3;\n n = (dx + o * 2) >> k;\n m = (dy + o * 2) >> k;\n return density;\n }\n\n density.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), density) : x;\n };\n\n density.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), density) : y;\n };\n\n density.weight = function(_) {\n return arguments.length ? (weight = typeof _ === \"function\" ? _ : constant(+_), density) : weight;\n };\n\n density.size = function(_) {\n if (!arguments.length) return [dx, dy];\n var _0 = +_[0], _1 = +_[1];\n if (!(_0 >= 0 && _1 >= 0)) throw new Error(\"invalid size\");\n return dx = _0, dy = _1, resize();\n };\n\n density.cellSize = function(_) {\n if (!arguments.length) return 1 << k;\n if (!((_ = +_) >= 1)) throw new Error(\"invalid cell size\");\n return k = Math.floor(Math.log(_) / Math.LN2), resize();\n };\n\n density.thresholds = function(_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), density) : threshold;\n };\n\n density.bandwidth = function(_) {\n if (!arguments.length) return Math.sqrt(r * (r + 1));\n if (!((_ = +_) >= 0)) throw new Error(\"invalid bandwidth\");\n return r = (Math.sqrt(4 * _ * _ + 1) - 1) / 2, resize();\n };\n\n return density;\n}\n","export {default as contours} from \"./contours.js\";\nexport {default as contourDensity} from \"./density.js\";\n","export default function() {}\n","import Delaunator from \"delaunator\";\nimport Path from \"./path.js\";\nimport Polygon from \"./polygon.js\";\nimport Voronoi from \"./voronoi.js\";\n\nconst tau = 2 * Math.PI, pow = Math.pow;\n\nfunction pointX(p) {\n return p[0];\n}\n\nfunction pointY(p) {\n return p[1];\n}\n\n// A triangulation is collinear if all its triangles have a non-null area\nfunction collinear(d) {\n const {triangles, coords} = d;\n for (let i = 0; i < triangles.length; i += 3) {\n const a = 2 * triangles[i],\n b = 2 * triangles[i + 1],\n c = 2 * triangles[i + 2],\n cross = (coords[c] - coords[a]) * (coords[b + 1] - coords[a + 1])\n - (coords[b] - coords[a]) * (coords[c + 1] - coords[a + 1]);\n if (cross > 1e-10) return false;\n }\n return true;\n}\n\nfunction jitter(x, y, r) {\n return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r];\n}\n\nexport default class Delaunay {\n static from(points, fx = pointX, fy = pointY, that) {\n return new Delaunay(\"length\" in points\n ? flatArray(points, fx, fy, that)\n : Float64Array.from(flatIterable(points, fx, fy, that)));\n }\n constructor(points) {\n this._delaunator = new Delaunator(points);\n this.inedges = new Int32Array(points.length / 2);\n this._hullIndex = new Int32Array(points.length / 2);\n this.points = this._delaunator.coords;\n this._init();\n }\n update() {\n this._delaunator.update();\n this._init();\n return this;\n }\n _init() {\n const d = this._delaunator, points = this.points;\n\n // check for collinear\n if (d.hull && d.hull.length > 2 && collinear(d)) {\n this.collinear = Int32Array.from({length: points.length/2}, (_,i) => i)\n .sort((i, j) => points[2 * i] - points[2 * j] || points[2 * i + 1] - points[2 * j + 1]); // for exact neighbors\n const e = this.collinear[0], f = this.collinear[this.collinear.length - 1],\n bounds = [ points[2 * e], points[2 * e + 1], points[2 * f], points[2 * f + 1] ],\n r = 1e-8 * Math.hypot(bounds[3] - bounds[1], bounds[2] - bounds[0]);\n for (let i = 0, n = points.length / 2; i < n; ++i) {\n const p = jitter(points[2 * i], points[2 * i + 1], r);\n points[2 * i] = p[0];\n points[2 * i + 1] = p[1];\n }\n this._delaunator = new Delaunator(points);\n } else {\n delete this.collinear;\n }\n\n const halfedges = this.halfedges = this._delaunator.halfedges;\n const hull = this.hull = this._delaunator.hull;\n const triangles = this.triangles = this._delaunator.triangles;\n const inedges = this.inedges.fill(-1);\n const hullIndex = this._hullIndex.fill(-1);\n\n // Compute an index from each point to an (arbitrary) incoming halfedge\n // Used to give the first neighbor of each point; for this reason,\n // on the hull we give priority to exterior halfedges\n for (let e = 0, n = halfedges.length; e < n; ++e) {\n const p = triangles[e % 3 === 2 ? e - 2 : e + 1];\n if (halfedges[e] === -1 || inedges[p] === -1) inedges[p] = e;\n }\n for (let i = 0, n = hull.length; i < n; ++i) {\n hullIndex[hull[i]] = i;\n }\n\n // degenerate case: 1 or 2 (distinct) points\n if (hull.length <= 2 && hull.length > 0) {\n this.triangles = new Int32Array(3).fill(-1);\n this.halfedges = new Int32Array(3).fill(-1);\n this.triangles[0] = hull[0];\n inedges[hull[0]] = 1;\n if (hull.length === 2) {\n inedges[hull[1]] = 0;\n this.triangles[1] = hull[1];\n this.triangles[2] = hull[1];\n }\n }\n }\n voronoi(bounds) {\n return new Voronoi(this, bounds);\n }\n *neighbors(i) {\n const {inedges, hull, _hullIndex, halfedges, triangles, collinear} = this;\n\n // degenerate case with several collinear points\n if (collinear) {\n const l = collinear.indexOf(i);\n if (l > 0) yield collinear[l - 1];\n if (l < collinear.length - 1) yield collinear[l + 1];\n return;\n }\n\n const e0 = inedges[i];\n if (e0 === -1) return; // coincident point\n let e = e0, p0 = -1;\n do {\n yield p0 = triangles[e];\n e = e % 3 === 2 ? e - 2 : e + 1;\n if (triangles[e] !== i) return; // bad triangulation\n e = halfedges[e];\n if (e === -1) {\n const p = hull[(_hullIndex[i] + 1) % hull.length];\n if (p !== p0) yield p;\n return;\n }\n } while (e !== e0);\n }\n find(x, y, i = 0) {\n if ((x = +x, x !== x) || (y = +y, y !== y)) return -1;\n const i0 = i;\n let c;\n while ((c = this._step(i, x, y)) >= 0 && c !== i && c !== i0) i = c;\n return c;\n }\n _step(i, x, y) {\n const {inedges, hull, _hullIndex, halfedges, triangles, points} = this;\n if (inedges[i] === -1 || !points.length) return (i + 1) % (points.length >> 1);\n let c = i;\n let dc = pow(x - points[i * 2], 2) + pow(y - points[i * 2 + 1], 2);\n const e0 = inedges[i];\n let e = e0;\n do {\n let t = triangles[e];\n const dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2);\n if (dt < dc) dc = dt, c = t;\n e = e % 3 === 2 ? e - 2 : e + 1;\n if (triangles[e] !== i) break; // bad triangulation\n e = halfedges[e];\n if (e === -1) {\n e = hull[(_hullIndex[i] + 1) % hull.length];\n if (e !== t) {\n if (pow(x - points[e * 2], 2) + pow(y - points[e * 2 + 1], 2) < dc) return e;\n }\n break;\n }\n } while (e !== e0);\n return c;\n }\n render(context) {\n const buffer = context == null ? context = new Path : undefined;\n const {points, halfedges, triangles} = this;\n for (let i = 0, n = halfedges.length; i < n; ++i) {\n const j = halfedges[i];\n if (j < i) continue;\n const ti = triangles[i] * 2;\n const tj = triangles[j] * 2;\n context.moveTo(points[ti], points[ti + 1]);\n context.lineTo(points[tj], points[tj + 1]);\n }\n this.renderHull(context);\n return buffer && buffer.value();\n }\n renderPoints(context, r) {\n if (r === undefined && (!context || typeof context.moveTo !== \"function\")) r = context, context = null;\n r = r == undefined ? 2 : +r;\n const buffer = context == null ? context = new Path : undefined;\n const {points} = this;\n for (let i = 0, n = points.length; i < n; i += 2) {\n const x = points[i], y = points[i + 1];\n context.moveTo(x + r, y);\n context.arc(x, y, r, 0, tau);\n }\n return buffer && buffer.value();\n }\n renderHull(context) {\n const buffer = context == null ? context = new Path : undefined;\n const {hull, points} = this;\n const h = hull[0] * 2, n = hull.length;\n context.moveTo(points[h], points[h + 1]);\n for (let i = 1; i < n; ++i) {\n const h = 2 * hull[i];\n context.lineTo(points[h], points[h + 1]);\n }\n context.closePath();\n return buffer && buffer.value();\n }\n hullPolygon() {\n const polygon = new Polygon;\n this.renderHull(polygon);\n return polygon.value();\n }\n renderTriangle(i, context) {\n const buffer = context == null ? context = new Path : undefined;\n const {points, triangles} = this;\n const t0 = triangles[i *= 3] * 2;\n const t1 = triangles[i + 1] * 2;\n const t2 = triangles[i + 2] * 2;\n context.moveTo(points[t0], points[t0 + 1]);\n context.lineTo(points[t1], points[t1 + 1]);\n context.lineTo(points[t2], points[t2 + 1]);\n context.closePath();\n return buffer && buffer.value();\n }\n *trianglePolygons() {\n const {triangles} = this;\n for (let i = 0, n = triangles.length / 3; i < n; ++i) {\n yield this.trianglePolygon(i);\n }\n }\n trianglePolygon(i) {\n const polygon = new Polygon;\n this.renderTriangle(i, polygon);\n return polygon.value();\n }\n}\n\nfunction flatArray(points, fx, fy, that) {\n const n = points.length;\n const array = new Float64Array(n * 2);\n for (let i = 0; i < n; ++i) {\n const p = points[i];\n array[i * 2] = fx.call(that, p, i, points);\n array[i * 2 + 1] = fy.call(that, p, i, points);\n }\n return array;\n}\n\nfunction* flatIterable(points, fx, fy, that) {\n let i = 0;\n for (const p of points) {\n yield fx.call(that, p, i, points);\n yield fy.call(that, p, i, points);\n ++i;\n }\n}\n","export {default as Delaunay} from \"./delaunay.js\";\nexport {default as Voronoi} from \"./voronoi.js\";\n","const epsilon = 1e-6;\n\nexport default class Path {\n constructor() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n }\n moveTo(x, y) {\n this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n }\n lineTo(x, y) {\n this._ += `L${this._x1 = +x},${this._y1 = +y}`;\n }\n arc(x, y, r) {\n x = +x, y = +y, r = +r;\n const x0 = x + r;\n const y0 = y;\n if (r < 0) throw new Error(\"negative radius\");\n if (this._x1 === null) this._ += `M${x0},${y0}`;\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) this._ += \"L\" + x0 + \",\" + y0;\n if (!r) return;\n this._ += `A${r},${r},0,1,1,${x - r},${y}A${r},${r},0,1,1,${this._x1 = x0},${this._y1 = y0}`;\n }\n rect(x, y, w, h) {\n this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${+w}v${+h}h${-w}Z`;\n }\n value() {\n return this._ || null;\n }\n}\n","export default class Polygon {\n constructor() {\n this._ = [];\n }\n moveTo(x, y) {\n this._.push([x, y]);\n }\n closePath() {\n this._.push(this._[0].slice());\n }\n lineTo(x, y) {\n this._.push([x, y]);\n }\n value() {\n return this._.length ? this._ : null;\n }\n}\n","import Path from \"./path.js\";\nimport Polygon from \"./polygon.js\";\n\nexport default class Voronoi {\n constructor(delaunay, [xmin, ymin, xmax, ymax] = [0, 0, 960, 500]) {\n if (!((xmax = +xmax) >= (xmin = +xmin)) || !((ymax = +ymax) >= (ymin = +ymin))) throw new Error(\"invalid bounds\");\n this.delaunay = delaunay;\n this._circumcenters = new Float64Array(delaunay.points.length * 2);\n this.vectors = new Float64Array(delaunay.points.length * 2);\n this.xmax = xmax, this.xmin = xmin;\n this.ymax = ymax, this.ymin = ymin;\n this._init();\n }\n update() {\n this.delaunay.update();\n this._init();\n return this;\n }\n _init() {\n const {delaunay: {points, hull, triangles}, vectors} = this;\n let bx, by; // lazily computed barycenter of the hull\n\n // Compute circumcenters.\n const circumcenters = this.circumcenters = this._circumcenters.subarray(0, triangles.length / 3 * 2);\n for (let i = 0, j = 0, n = triangles.length, x, y; i < n; i += 3, j += 2) {\n const t1 = triangles[i] * 2;\n const t2 = triangles[i + 1] * 2;\n const t3 = triangles[i + 2] * 2;\n const x1 = points[t1];\n const y1 = points[t1 + 1];\n const x2 = points[t2];\n const y2 = points[t2 + 1];\n const x3 = points[t3];\n const y3 = points[t3 + 1];\n\n const dx = x2 - x1;\n const dy = y2 - y1;\n const ex = x3 - x1;\n const ey = y3 - y1;\n const ab = (dx * ey - dy * ex) * 2;\n\n if (Math.abs(ab) < 1e-9) {\n // For a degenerate triangle, the circumcenter is at the infinity, in a\n // direction orthogonal to the halfedge and away from the “center” of\n // the diagram , defined as the hull’s barycenter.\n if (bx === undefined) {\n bx = by = 0;\n for (const i of hull) bx += points[i * 2], by += points[i * 2 + 1];\n bx /= hull.length, by /= hull.length;\n }\n const a = 1e9 * Math.sign((bx - x1) * ey - (by - y1) * ex);\n x = (x1 + x3) / 2 - a * ey;\n y = (y1 + y3) / 2 + a * ex;\n } else {\n const d = 1 / ab;\n const bl = dx * dx + dy * dy;\n const cl = ex * ex + ey * ey;\n x = x1 + (ey * bl - dy * cl) * d;\n y = y1 + (dx * cl - ex * bl) * d;\n }\n circumcenters[j] = x;\n circumcenters[j + 1] = y;\n }\n\n // Compute exterior cell rays.\n let h = hull[hull.length - 1];\n let p0, p1 = h * 4;\n let x0, x1 = points[2 * h];\n let y0, y1 = points[2 * h + 1];\n vectors.fill(0);\n for (let i = 0; i < hull.length; ++i) {\n h = hull[i];\n p0 = p1, x0 = x1, y0 = y1;\n p1 = h * 4, x1 = points[2 * h], y1 = points[2 * h + 1];\n vectors[p0 + 2] = vectors[p1] = y0 - y1;\n vectors[p0 + 3] = vectors[p1 + 1] = x1 - x0;\n }\n }\n render(context) {\n const buffer = context == null ? context = new Path : undefined;\n const {delaunay: {halfedges, inedges, hull}, circumcenters, vectors} = this;\n if (hull.length <= 1) return null;\n for (let i = 0, n = halfedges.length; i < n; ++i) {\n const j = halfedges[i];\n if (j < i) continue;\n const ti = Math.floor(i / 3) * 2;\n const tj = Math.floor(j / 3) * 2;\n const xi = circumcenters[ti];\n const yi = circumcenters[ti + 1];\n const xj = circumcenters[tj];\n const yj = circumcenters[tj + 1];\n this._renderSegment(xi, yi, xj, yj, context);\n }\n let h0, h1 = hull[hull.length - 1];\n for (let i = 0; i < hull.length; ++i) {\n h0 = h1, h1 = hull[i];\n const t = Math.floor(inedges[h1] / 3) * 2;\n const x = circumcenters[t];\n const y = circumcenters[t + 1];\n const v = h0 * 4;\n const p = this._project(x, y, vectors[v + 2], vectors[v + 3]);\n if (p) this._renderSegment(x, y, p[0], p[1], context);\n }\n return buffer && buffer.value();\n }\n renderBounds(context) {\n const buffer = context == null ? context = new Path : undefined;\n context.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin);\n return buffer && buffer.value();\n }\n renderCell(i, context) {\n const buffer = context == null ? context = new Path : undefined;\n const points = this._clip(i);\n if (points === null || !points.length) return;\n context.moveTo(points[0], points[1]);\n let n = points.length;\n while (points[0] === points[n-2] && points[1] === points[n-1] && n > 1) n -= 2;\n for (let i = 2; i < n; i += 2) {\n if (points[i] !== points[i-2] || points[i+1] !== points[i-1])\n context.lineTo(points[i], points[i + 1]);\n }\n context.closePath();\n return buffer && buffer.value();\n }\n *cellPolygons() {\n const {delaunay: {points}} = this;\n for (let i = 0, n = points.length / 2; i < n; ++i) {\n const cell = this.cellPolygon(i);\n if (cell) cell.index = i, yield cell;\n }\n }\n cellPolygon(i) {\n const polygon = new Polygon;\n this.renderCell(i, polygon);\n return polygon.value();\n }\n _renderSegment(x0, y0, x1, y1, context) {\n let S;\n const c0 = this._regioncode(x0, y0);\n const c1 = this._regioncode(x1, y1);\n if (c0 === 0 && c1 === 0) {\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n } else if (S = this._clipSegment(x0, y0, x1, y1, c0, c1)) {\n context.moveTo(S[0], S[1]);\n context.lineTo(S[2], S[3]);\n }\n }\n contains(i, x, y) {\n if ((x = +x, x !== x) || (y = +y, y !== y)) return false;\n return this.delaunay._step(i, x, y) === i;\n }\n *neighbors(i) {\n const ci = this._clip(i);\n if (ci) for (const j of this.delaunay.neighbors(i)) {\n const cj = this._clip(j);\n // find the common edge\n if (cj) loop: for (let ai = 0, li = ci.length; ai < li; ai += 2) {\n for (let aj = 0, lj = cj.length; aj < lj; aj += 2) {\n if (ci[ai] === cj[aj]\n && ci[ai + 1] === cj[aj + 1]\n && ci[(ai + 2) % li] === cj[(aj + lj - 2) % lj]\n && ci[(ai + 3) % li] === cj[(aj + lj - 1) % lj]) {\n yield j;\n break loop;\n }\n }\n }\n }\n }\n _cell(i) {\n const {circumcenters, delaunay: {inedges, halfedges, triangles}} = this;\n const e0 = inedges[i];\n if (e0 === -1) return null; // coincident point\n const points = [];\n let e = e0;\n do {\n const t = Math.floor(e / 3);\n points.push(circumcenters[t * 2], circumcenters[t * 2 + 1]);\n e = e % 3 === 2 ? e - 2 : e + 1;\n if (triangles[e] !== i) break; // bad triangulation\n e = halfedges[e];\n } while (e !== e0 && e !== -1);\n return points;\n }\n _clip(i) {\n // degenerate case (1 valid point: return the box)\n if (i === 0 && this.delaunay.hull.length === 1) {\n return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];\n }\n const points = this._cell(i);\n if (points === null) return null;\n const {vectors: V} = this;\n const v = i * 4;\n return this._simplify(V[v] || V[v + 1]\n ? this._clipInfinite(i, points, V[v], V[v + 1], V[v + 2], V[v + 3])\n : this._clipFinite(i, points));\n }\n _clipFinite(i, points) {\n const n = points.length;\n let P = null;\n let x0, y0, x1 = points[n - 2], y1 = points[n - 1];\n let c0, c1 = this._regioncode(x1, y1);\n let e0, e1 = 0;\n for (let j = 0; j < n; j += 2) {\n x0 = x1, y0 = y1, x1 = points[j], y1 = points[j + 1];\n c0 = c1, c1 = this._regioncode(x1, y1);\n if (c0 === 0 && c1 === 0) {\n e0 = e1, e1 = 0;\n if (P) P.push(x1, y1);\n else P = [x1, y1];\n } else {\n let S, sx0, sy0, sx1, sy1;\n if (c0 === 0) {\n if ((S = this._clipSegment(x0, y0, x1, y1, c0, c1)) === null) continue;\n [sx0, sy0, sx1, sy1] = S;\n } else {\n if ((S = this._clipSegment(x1, y1, x0, y0, c1, c0)) === null) continue;\n [sx1, sy1, sx0, sy0] = S;\n e0 = e1, e1 = this._edgecode(sx0, sy0);\n if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n if (P) P.push(sx0, sy0);\n else P = [sx0, sy0];\n }\n e0 = e1, e1 = this._edgecode(sx1, sy1);\n if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n if (P) P.push(sx1, sy1);\n else P = [sx1, sy1];\n }\n }\n if (P) {\n e0 = e1, e1 = this._edgecode(P[0], P[1]);\n if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) {\n return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];\n }\n return P;\n }\n _clipSegment(x0, y0, x1, y1, c0, c1) {\n // for more robustness, always consider the segment in the same order\n const flip = c0 < c1;\n if (flip) [x0, y0, x1, y1, c0, c1] = [x1, y1, x0, y0, c1, c0];\n while (true) {\n if (c0 === 0 && c1 === 0) return flip ? [x1, y1, x0, y0] : [x0, y0, x1, y1];\n if (c0 & c1) return null;\n let x, y, c = c0 || c1;\n if (c & 0b1000) x = x0 + (x1 - x0) * (this.ymax - y0) / (y1 - y0), y = this.ymax;\n else if (c & 0b0100) x = x0 + (x1 - x0) * (this.ymin - y0) / (y1 - y0), y = this.ymin;\n else if (c & 0b0010) y = y0 + (y1 - y0) * (this.xmax - x0) / (x1 - x0), x = this.xmax;\n else y = y0 + (y1 - y0) * (this.xmin - x0) / (x1 - x0), x = this.xmin;\n if (c0) x0 = x, y0 = y, c0 = this._regioncode(x0, y0);\n else x1 = x, y1 = y, c1 = this._regioncode(x1, y1);\n }\n }\n _clipInfinite(i, points, vx0, vy0, vxn, vyn) {\n let P = Array.from(points), p;\n if (p = this._project(P[0], P[1], vx0, vy0)) P.unshift(p[0], p[1]);\n if (p = this._project(P[P.length - 2], P[P.length - 1], vxn, vyn)) P.push(p[0], p[1]);\n if (P = this._clipFinite(i, P)) {\n for (let j = 0, n = P.length, c0, c1 = this._edgecode(P[n - 2], P[n - 1]); j < n; j += 2) {\n c0 = c1, c1 = this._edgecode(P[j], P[j + 1]);\n if (c0 && c1) j = this._edge(i, c0, c1, P, j), n = P.length;\n }\n } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) {\n P = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax];\n }\n return P;\n }\n _edge(i, e0, e1, P, j) {\n while (e0 !== e1) {\n let x, y;\n switch (e0) {\n case 0b0101: e0 = 0b0100; continue; // top-left\n case 0b0100: e0 = 0b0110, x = this.xmax, y = this.ymin; break; // top\n case 0b0110: e0 = 0b0010; continue; // top-right\n case 0b0010: e0 = 0b1010, x = this.xmax, y = this.ymax; break; // right\n case 0b1010: e0 = 0b1000; continue; // bottom-right\n case 0b1000: e0 = 0b1001, x = this.xmin, y = this.ymax; break; // bottom\n case 0b1001: e0 = 0b0001; continue; // bottom-left\n case 0b0001: e0 = 0b0101, x = this.xmin, y = this.ymin; break; // left\n }\n // Note: this implicitly checks for out of bounds: if P[j] or P[j+1] are\n // undefined, the conditional statement will be executed.\n if ((P[j] !== x || P[j + 1] !== y) && this.contains(i, x, y)) {\n P.splice(j, 0, x, y), j += 2;\n }\n }\n return j;\n }\n _project(x0, y0, vx, vy) {\n let t = Infinity, c, x, y;\n if (vy < 0) { // top\n if (y0 <= this.ymin) return null;\n if ((c = (this.ymin - y0) / vy) < t) y = this.ymin, x = x0 + (t = c) * vx;\n } else if (vy > 0) { // bottom\n if (y0 >= this.ymax) return null;\n if ((c = (this.ymax - y0) / vy) < t) y = this.ymax, x = x0 + (t = c) * vx;\n }\n if (vx > 0) { // right\n if (x0 >= this.xmax) return null;\n if ((c = (this.xmax - x0) / vx) < t) x = this.xmax, y = y0 + (t = c) * vy;\n } else if (vx < 0) { // left\n if (x0 <= this.xmin) return null;\n if ((c = (this.xmin - x0) / vx) < t) x = this.xmin, y = y0 + (t = c) * vy;\n }\n return [x, y];\n }\n _edgecode(x, y) {\n return (x === this.xmin ? 0b0001\n : x === this.xmax ? 0b0010 : 0b0000)\n | (y === this.ymin ? 0b0100\n : y === this.ymax ? 0b1000 : 0b0000);\n }\n _regioncode(x, y) {\n return (x < this.xmin ? 0b0001\n : x > this.xmax ? 0b0010 : 0b0000)\n | (y < this.ymin ? 0b0100\n : y > this.ymax ? 0b1000 : 0b0000);\n }\n _simplify(P) {\n if (P && P.length > 4) {\n for (let i = 0; i < P.length; i+= 2) {\n const j = (i + 2) % P.length, k = (i + 4) % P.length;\n if (P[i] === P[j] && P[j] === P[k] || P[i + 1] === P[j + 1] && P[j + 1] === P[k + 1]) {\n P.splice(j, 2), i -= 2;\n }\n }\n if (!P.length) P = null;\n }\n return P;\n }\n}\n","var noop = {value: () => {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n","export {default as dispatch} from \"./dispatch.js\";\n","export default x => () => x;\n","import {dispatch} from \"d3-dispatch\";\nimport {select, pointer} from \"d3-selection\";\nimport nodrag, {yesdrag} from \"./nodrag.js\";\nimport noevent, {nonpassive, nonpassivecapture, nopropagation} from \"./noevent.js\";\nimport constant from \"./constant.js\";\nimport DragEvent from \"./event.js\";\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultContainer() {\n return this.parentNode;\n}\n\nfunction defaultSubject(event, d) {\n return d == null ? {x: event.x, y: event.y} : d;\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nexport default function() {\n var filter = defaultFilter,\n container = defaultContainer,\n subject = defaultSubject,\n touchable = defaultTouchable,\n gestures = {},\n listeners = dispatch(\"start\", \"drag\", \"end\"),\n active = 0,\n mousedownx,\n mousedowny,\n mousemoving,\n touchending,\n clickDistance2 = 0;\n\n function drag(selection) {\n selection\n .on(\"mousedown.drag\", mousedowned)\n .filter(touchable)\n .on(\"touchstart.drag\", touchstarted)\n .on(\"touchmove.drag\", touchmoved, nonpassive)\n .on(\"touchend.drag touchcancel.drag\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n function mousedowned(event, d) {\n if (touchending || !filter.call(this, event, d)) return;\n var gesture = beforestart(this, container.call(this, event, d), event, d, \"mouse\");\n if (!gesture) return;\n select(event.view)\n .on(\"mousemove.drag\", mousemoved, nonpassivecapture)\n .on(\"mouseup.drag\", mouseupped, nonpassivecapture);\n nodrag(event.view);\n nopropagation(event);\n mousemoving = false;\n mousedownx = event.clientX;\n mousedowny = event.clientY;\n gesture(\"start\", event);\n }\n\n function mousemoved(event) {\n noevent(event);\n if (!mousemoving) {\n var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;\n mousemoving = dx * dx + dy * dy > clickDistance2;\n }\n gestures.mouse(\"drag\", event);\n }\n\n function mouseupped(event) {\n select(event.view).on(\"mousemove.drag mouseup.drag\", null);\n yesdrag(event.view, mousemoving);\n noevent(event);\n gestures.mouse(\"end\", event);\n }\n\n function touchstarted(event, d) {\n if (!filter.call(this, event, d)) return;\n var touches = event.changedTouches,\n c = container.call(this, event, d),\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) {\n nopropagation(event);\n gesture(\"start\", event, touches[i]);\n }\n }\n }\n\n function touchmoved(event) {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n noevent(event);\n gesture(\"drag\", event, touches[i]);\n }\n }\n }\n\n function touchended(event) {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n nopropagation(event);\n gesture(\"end\", event, touches[i]);\n }\n }\n }\n\n function beforestart(that, container, event, d, identifier, touch) {\n var dispatch = listeners.copy(),\n p = pointer(touch || event, container), dx, dy,\n s;\n\n if ((s = subject.call(that, new DragEvent(\"beforestart\", {\n sourceEvent: event,\n target: drag,\n identifier,\n active,\n x: p[0],\n y: p[1],\n dx: 0,\n dy: 0,\n dispatch\n }), d)) == null) return;\n\n dx = s.x - p[0] || 0;\n dy = s.y - p[1] || 0;\n\n return function gesture(type, event, touch) {\n var p0 = p, n;\n switch (type) {\n case \"start\": gestures[identifier] = gesture, n = active++; break;\n case \"end\": delete gestures[identifier], --active; // falls through\n case \"drag\": p = pointer(touch || event, container), n = active; break;\n }\n dispatch.call(\n type,\n that,\n new DragEvent(type, {\n sourceEvent: event,\n subject: s,\n target: drag,\n identifier,\n active: n,\n x: p[0] + dx,\n y: p[1] + dy,\n dx: p[0] - p0[0],\n dy: p[1] - p0[1],\n dispatch\n }),\n d\n );\n };\n }\n\n drag.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), drag) : filter;\n };\n\n drag.container = function(_) {\n return arguments.length ? (container = typeof _ === \"function\" ? _ : constant(_), drag) : container;\n };\n\n drag.subject = function(_) {\n return arguments.length ? (subject = typeof _ === \"function\" ? _ : constant(_), drag) : subject;\n };\n\n drag.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), drag) : touchable;\n };\n\n drag.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? drag : value;\n };\n\n drag.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n };\n\n return drag;\n}\n","export default function DragEvent(type, {\n sourceEvent,\n subject,\n target,\n identifier,\n active,\n x, y, dx, dy,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n subject: {value: subject, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n identifier: {value: identifier, enumerable: true, configurable: true},\n active: {value: active, enumerable: true, configurable: true},\n x: {value: x, enumerable: true, configurable: true},\n y: {value: y, enumerable: true, configurable: true},\n dx: {value: dx, enumerable: true, configurable: true},\n dy: {value: dy, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n\nDragEvent.prototype.on = function() {\n var value = this._.on.apply(this._, arguments);\n return value === this._ ? this : value;\n};\n","export {default as drag} from \"./drag.js\";\nexport {default as dragDisable, yesdrag as dragEnable} from \"./nodrag.js\";\n","import {select} from \"d3-selection\";\nimport noevent, {nonpassivecapture} from \"./noevent.js\";\n\nexport default function(view) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", noevent, nonpassivecapture);\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", noevent, nonpassivecapture);\n } else {\n root.__noselect = root.style.MozUserSelect;\n root.style.MozUserSelect = \"none\";\n }\n}\n\nexport function yesdrag(view, noclick) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", null);\n if (noclick) {\n selection.on(\"click.drag\", noevent, nonpassivecapture);\n setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n }\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", null);\n } else {\n root.style.MozUserSelect = root.__noselect;\n delete root.__noselect;\n }\n}\n","// These are typically used in conjunction with noevent to ensure that we can\n// preventDefault on the event.\nexport const nonpassive = {passive: false};\nexport const nonpassivecapture = {capture: true, passive: false};\n\nexport function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","export default function autoType(object) {\n for (var key in object) {\n var value = object[key].trim(), number, m;\n if (!value) value = null;\n else if (value === \"true\") value = true;\n else if (value === \"false\") value = false;\n else if (value === \"NaN\") value = NaN;\n else if (!isNaN(number = +value)) value = number;\n else if (m = value.match(/^([-+]\\d{2})?\\d{4}(-\\d{2}(-\\d{2})?)?(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{3})?)?(Z|[-+]\\d{2}:\\d{2})?)?$/)) {\n if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, \"/\").replace(/T/, \" \");\n value = new Date(value);\n }\n else continue;\n object[key] = value;\n }\n return object;\n}\n\n// https://github.com/d3/d3-dsv/issues/45\nconst fixtz = new Date(\"2019-01-01T00:00\").getHours() || new Date(\"2019-07-01T00:00\").getHours();","import dsv from \"./dsv.js\";\n\nvar csv = dsv(\",\");\n\nexport var csvParse = csv.parse;\nexport var csvParseRows = csv.parseRows;\nexport var csvFormat = csv.format;\nexport var csvFormatBody = csv.formatBody;\nexport var csvFormatRows = csv.formatRows;\nexport var csvFormatRow = csv.formatRow;\nexport var csvFormatValue = csv.formatValue;\n","var EOL = {},\n EOF = {},\n QUOTE = 34,\n NEWLINE = 10,\n RETURN = 13;\n\nfunction objectConverter(columns) {\n return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n return JSON.stringify(name) + \": d[\" + i + \"] || \\\"\\\"\";\n }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n var object = objectConverter(columns);\n return function(row, i) {\n return f(object(row), i, columns);\n };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n var columnSet = Object.create(null),\n columns = [];\n\n rows.forEach(function(row) {\n for (var column in row) {\n if (!(column in columnSet)) {\n columns.push(columnSet[column] = column);\n }\n }\n });\n\n return columns;\n}\n\nfunction pad(value, width) {\n var s = value + \"\", length = s.length;\n return length < width ? new Array(width - length + 1).join(0) + s : s;\n}\n\nfunction formatYear(year) {\n return year < 0 ? \"-\" + pad(-year, 6)\n : year > 9999 ? \"+\" + pad(year, 6)\n : pad(year, 4);\n}\n\nfunction formatDate(date) {\n var hours = date.getUTCHours(),\n minutes = date.getUTCMinutes(),\n seconds = date.getUTCSeconds(),\n milliseconds = date.getUTCMilliseconds();\n return isNaN(date) ? \"Invalid Date\"\n : formatYear(date.getUTCFullYear(), 4) + \"-\" + pad(date.getUTCMonth() + 1, 2) + \"-\" + pad(date.getUTCDate(), 2)\n + (milliseconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \".\" + pad(milliseconds, 3) + \"Z\"\n : seconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \"Z\"\n : minutes || hours ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \"Z\"\n : \"\");\n}\n\nexport default function(delimiter) {\n var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n DELIMITER = delimiter.charCodeAt(0);\n\n function parse(text, f) {\n var convert, columns, rows = parseRows(text, function(row, i) {\n if (convert) return convert(row, i - 1);\n columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n });\n rows.columns = columns || [];\n return rows;\n }\n\n function parseRows(text, f) {\n var rows = [], // output rows\n N = text.length,\n I = 0, // current character index\n n = 0, // current line number\n t, // current token\n eof = N <= 0, // current token followed by EOF?\n eol = false; // current token followed by EOL?\n\n // Strip the trailing newline.\n if (text.charCodeAt(N - 1) === NEWLINE) --N;\n if (text.charCodeAt(N - 1) === RETURN) --N;\n\n function token() {\n if (eof) return EOF;\n if (eol) return eol = false, EOL;\n\n // Unescape quotes.\n var i, j = I, c;\n if (text.charCodeAt(j) === QUOTE) {\n while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n if ((i = I) >= N) eof = true;\n else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n }\n\n // Find next delimiter or newline.\n while (I < N) {\n if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n else if (c !== DELIMITER) continue;\n return text.slice(j, i);\n }\n\n // Return last token before EOF.\n return eof = true, text.slice(j, N);\n }\n\n while ((t = token()) !== EOF) {\n var row = [];\n while (t !== EOL && t !== EOF) row.push(t), t = token();\n if (f && (row = f(row, n++)) == null) continue;\n rows.push(row);\n }\n\n return rows;\n }\n\n function preformatBody(rows, columns) {\n return rows.map(function(row) {\n return columns.map(function(column) {\n return formatValue(row[column]);\n }).join(delimiter);\n });\n }\n\n function format(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join(\"\\n\");\n }\n\n function formatBody(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return preformatBody(rows, columns).join(\"\\n\");\n }\n\n function formatRows(rows) {\n return rows.map(formatRow).join(\"\\n\");\n }\n\n function formatRow(row) {\n return row.map(formatValue).join(delimiter);\n }\n\n function formatValue(value) {\n return value == null ? \"\"\n : value instanceof Date ? formatDate(value)\n : reFormat.test(value += \"\") ? \"\\\"\" + value.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n : value;\n }\n\n return {\n parse: parse,\n parseRows: parseRows,\n format: format,\n formatBody: formatBody,\n formatRows: formatRows,\n formatRow: formatRow,\n formatValue: formatValue\n };\n}\n","export {default as dsvFormat} from \"./dsv.js\";\nexport {csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue} from \"./csv.js\";\nexport {tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue} from \"./tsv.js\";\nexport {default as autoType} from \"./autoType.js\";\n","import dsv from \"./dsv.js\";\n\nvar tsv = dsv(\"\\t\");\n\nexport var tsvParse = tsv.parse;\nexport var tsvParseRows = tsv.parseRows;\nexport var tsvFormat = tsv.format;\nexport var tsvFormatBody = tsv.formatBody;\nexport var tsvFormatRows = tsv.formatRows;\nexport var tsvFormatRow = tsv.formatRow;\nexport var tsvFormatValue = tsv.formatValue;\n","var overshoot = 1.70158;\n\nexport var backIn = (function custom(s) {\n s = +s;\n\n function backIn(t) {\n return (t = +t) * t * (s * (t - 1) + t);\n }\n\n backIn.overshoot = custom;\n\n return backIn;\n})(overshoot);\n\nexport var backOut = (function custom(s) {\n s = +s;\n\n function backOut(t) {\n return --t * t * ((t + 1) * s + t) + 1;\n }\n\n backOut.overshoot = custom;\n\n return backOut;\n})(overshoot);\n\nexport var backInOut = (function custom(s) {\n s = +s;\n\n function backInOut(t) {\n return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;\n }\n\n backInOut.overshoot = custom;\n\n return backInOut;\n})(overshoot);\n","var b1 = 4 / 11,\n b2 = 6 / 11,\n b3 = 8 / 11,\n b4 = 3 / 4,\n b5 = 9 / 11,\n b6 = 10 / 11,\n b7 = 15 / 16,\n b8 = 21 / 22,\n b9 = 63 / 64,\n b0 = 1 / b1 / b1;\n\nexport function bounceIn(t) {\n return 1 - bounceOut(1 - t);\n}\n\nexport function bounceOut(t) {\n return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;\n}\n\nexport function bounceInOut(t) {\n return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\n}\n","export function circleIn(t) {\n return 1 - Math.sqrt(1 - t * t);\n}\n\nexport function circleOut(t) {\n return Math.sqrt(1 - --t * t);\n}\n\nexport function circleInOut(t) {\n return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;\n}\n","export function cubicIn(t) {\n return t * t * t;\n}\n\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n","import {tpmt} from \"./math.js\";\n\nvar tau = 2 * Math.PI,\n amplitude = 1,\n period = 0.3;\n\nexport var elasticIn = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticIn(t) {\n return a * tpmt(-(--t)) * Math.sin((s - t) / p);\n }\n\n elasticIn.amplitude = function(a) { return custom(a, p * tau); };\n elasticIn.period = function(p) { return custom(a, p); };\n\n return elasticIn;\n})(amplitude, period);\n\nexport var elasticOut = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticOut(t) {\n return 1 - a * tpmt(t = +t) * Math.sin((t + s) / p);\n }\n\n elasticOut.amplitude = function(a) { return custom(a, p * tau); };\n elasticOut.period = function(p) { return custom(a, p); };\n\n return elasticOut;\n})(amplitude, period);\n\nexport var elasticInOut = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticInOut(t) {\n return ((t = t * 2 - 1) < 0\n ? a * tpmt(-t) * Math.sin((s - t) / p)\n : 2 - a * tpmt(t) * Math.sin((s + t) / p)) / 2;\n }\n\n elasticInOut.amplitude = function(a) { return custom(a, p * tau); };\n elasticInOut.period = function(p) { return custom(a, p); };\n\n return elasticInOut;\n})(amplitude, period);\n","import {tpmt} from \"./math.js\";\n\nexport function expIn(t) {\n return tpmt(1 - +t);\n}\n\nexport function expOut(t) {\n return 1 - tpmt(t);\n}\n\nexport function expInOut(t) {\n return ((t *= 2) <= 1 ? tpmt(1 - t) : 2 - tpmt(t - 1)) / 2;\n}\n","export {\n linear as easeLinear\n} from \"./linear.js\";\n\nexport {\n quadInOut as easeQuad,\n quadIn as easeQuadIn,\n quadOut as easeQuadOut,\n quadInOut as easeQuadInOut\n} from \"./quad.js\";\n\nexport {\n cubicInOut as easeCubic,\n cubicIn as easeCubicIn,\n cubicOut as easeCubicOut,\n cubicInOut as easeCubicInOut\n} from \"./cubic.js\";\n\nexport {\n polyInOut as easePoly,\n polyIn as easePolyIn,\n polyOut as easePolyOut,\n polyInOut as easePolyInOut\n} from \"./poly.js\";\n\nexport {\n sinInOut as easeSin,\n sinIn as easeSinIn,\n sinOut as easeSinOut,\n sinInOut as easeSinInOut\n} from \"./sin.js\";\n\nexport {\n expInOut as easeExp,\n expIn as easeExpIn,\n expOut as easeExpOut,\n expInOut as easeExpInOut\n} from \"./exp.js\";\n\nexport {\n circleInOut as easeCircle,\n circleIn as easeCircleIn,\n circleOut as easeCircleOut,\n circleInOut as easeCircleInOut\n} from \"./circle.js\";\n\nexport {\n bounceOut as easeBounce,\n bounceIn as easeBounceIn,\n bounceOut as easeBounceOut,\n bounceInOut as easeBounceInOut\n} from \"./bounce.js\";\n\nexport {\n backInOut as easeBack,\n backIn as easeBackIn,\n backOut as easeBackOut,\n backInOut as easeBackInOut\n} from \"./back.js\";\n\nexport {\n elasticOut as easeElastic,\n elasticIn as easeElasticIn,\n elasticOut as easeElasticOut,\n elasticInOut as easeElasticInOut\n} from \"./elastic.js\";\n","export const linear = t => +t;\n","// tpmt is two power minus ten times t scaled to [0,1]\nexport function tpmt(x) {\n return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;\n}\n","var exponent = 3;\n\nexport var polyIn = (function custom(e) {\n e = +e;\n\n function polyIn(t) {\n return Math.pow(t, e);\n }\n\n polyIn.exponent = custom;\n\n return polyIn;\n})(exponent);\n\nexport var polyOut = (function custom(e) {\n e = +e;\n\n function polyOut(t) {\n return 1 - Math.pow(1 - t, e);\n }\n\n polyOut.exponent = custom;\n\n return polyOut;\n})(exponent);\n\nexport var polyInOut = (function custom(e) {\n e = +e;\n\n function polyInOut(t) {\n return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n }\n\n polyInOut.exponent = custom;\n\n return polyInOut;\n})(exponent);\n","export function quadIn(t) {\n return t * t;\n}\n\nexport function quadOut(t) {\n return t * (2 - t);\n}\n\nexport function quadInOut(t) {\n return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;\n}\n","var pi = Math.PI,\n halfPi = pi / 2;\n\nexport function sinIn(t) {\n return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);\n}\n\nexport function sinOut(t) {\n return Math.sin(t * halfPi);\n}\n\nexport function sinInOut(t) {\n return (1 - Math.cos(pi * t)) / 2;\n}\n","function responseBlob(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n return response.blob();\n}\n\nexport default function(input, init) {\n return fetch(input, init).then(responseBlob);\n}\n","function responseArrayBuffer(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n return response.arrayBuffer();\n}\n\nexport default function(input, init) {\n return fetch(input, init).then(responseArrayBuffer);\n}\n","import {csvParse, dsvFormat, tsvParse} from \"d3-dsv\";\nimport text from \"./text.js\";\n\nfunction dsvParse(parse) {\n return function(input, init, row) {\n if (arguments.length === 2 && typeof init === \"function\") row = init, init = undefined;\n return text(input, init).then(function(response) {\n return parse(response, row);\n });\n };\n}\n\nexport default function dsv(delimiter, input, init, row) {\n if (arguments.length === 3 && typeof init === \"function\") row = init, init = undefined;\n var format = dsvFormat(delimiter);\n return text(input, init).then(function(response) {\n return format.parse(response, row);\n });\n}\n\nexport var csv = dsvParse(csvParse);\nexport var tsv = dsvParse(tsvParse);\n","export default function(input, init) {\n return new Promise(function(resolve, reject) {\n var image = new Image;\n for (var key in init) image[key] = init[key];\n image.onerror = reject;\n image.onload = function() { resolve(image); };\n image.src = input;\n });\n}\n","export {default as blob} from \"./blob.js\";\nexport {default as buffer} from \"./buffer.js\";\nexport {default as dsv, csv, tsv} from \"./dsv.js\";\nexport {default as image} from \"./image.js\";\nexport {default as json} from \"./json.js\";\nexport {default as text} from \"./text.js\";\nexport {default as xml, html, svg} from \"./xml.js\";\n","function responseJson(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n if (response.status === 204 || response.status === 205) return;\n return response.json();\n}\n\nexport default function(input, init) {\n return fetch(input, init).then(responseJson);\n}\n","function responseText(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n return response.text();\n}\n\nexport default function(input, init) {\n return fetch(input, init).then(responseText);\n}\n","import text from \"./text.js\";\n\nfunction parser(type) {\n return (input, init) => text(input, init)\n .then(text => (new DOMParser).parseFromString(text, type));\n}\n\nexport default parser(\"application/xml\");\n\nexport var html = parser(\"text/html\");\n\nexport var svg = parser(\"image/svg+xml\");\n","export default function(x, y) {\n var nodes, strength = 1;\n\n if (x == null) x = 0;\n if (y == null) y = 0;\n\n function force() {\n var i,\n n = nodes.length,\n node,\n sx = 0,\n sy = 0;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i], sx += node.x, sy += node.y;\n }\n\n for (sx = (sx / n - x) * strength, sy = (sy / n - y) * strength, i = 0; i < n; ++i) {\n node = nodes[i], node.x -= sx, node.y -= sy;\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n return force;\n}\n","import {quadtree} from \"d3-quadtree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction x(d) {\n return d.x + d.vx;\n}\n\nfunction y(d) {\n return d.y + d.vy;\n}\n\nexport default function(radius) {\n var nodes,\n radii,\n random,\n strength = 1,\n iterations = 1;\n\n if (typeof radius !== \"function\") radius = constant(radius == null ? 1 : +radius);\n\n function force() {\n var i, n = nodes.length,\n tree,\n node,\n xi,\n yi,\n ri,\n ri2;\n\n for (var k = 0; k < iterations; ++k) {\n tree = quadtree(nodes, x, y).visitAfter(prepare);\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n ri = radii[node.index], ri2 = ri * ri;\n xi = node.x + node.vx;\n yi = node.y + node.vy;\n tree.visit(apply);\n }\n }\n\n function apply(quad, x0, y0, x1, y1) {\n var data = quad.data, rj = quad.r, r = ri + rj;\n if (data) {\n if (data.index > node.index) {\n var x = xi - data.x - data.vx,\n y = yi - data.y - data.vy,\n l = x * x + y * y;\n if (l < r * r) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n l = (r - (l = Math.sqrt(l))) / l * strength;\n node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));\n node.vy += (y *= l) * r;\n data.vx -= x * (r = 1 - r);\n data.vy -= y * r;\n }\n }\n return;\n }\n return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;\n }\n }\n\n function prepare(quad) {\n if (quad.data) return quad.r = radii[quad.data.index];\n for (var i = quad.r = 0; i < 4; ++i) {\n if (quad[i] && quad[i].r > quad.r) {\n quad.r = quad[i].r;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n radii = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n force.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n return force;\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export {default as forceCenter} from \"./center.js\";\nexport {default as forceCollide} from \"./collide.js\";\nexport {default as forceLink} from \"./link.js\";\nexport {default as forceManyBody} from \"./manyBody.js\";\nexport {default as forceRadial} from \"./radial.js\";\nexport {default as forceSimulation} from \"./simulation.js\";\nexport {default as forceX} from \"./x.js\";\nexport {default as forceY} from \"./y.js\";\n","export default function(random) {\n return (random() - 0.5) * 1e-6;\n}\n","// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst a = 1664525;\nconst c = 1013904223;\nconst m = 4294967296; // 2^32\n\nexport default function() {\n let s = 1;\n return () => (s = (a * s + c) % m) / m;\n}\n","import constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction index(d) {\n return d.index;\n}\n\nfunction find(nodeById, nodeId) {\n var node = nodeById.get(nodeId);\n if (!node) throw new Error(\"node not found: \" + nodeId);\n return node;\n}\n\nexport default function(links) {\n var id = index,\n strength = defaultStrength,\n strengths,\n distance = constant(30),\n distances,\n nodes,\n count,\n bias,\n random,\n iterations = 1;\n\n if (links == null) links = [];\n\n function defaultStrength(link) {\n return 1 / Math.min(count[link.source.index], count[link.target.index]);\n }\n\n function force(alpha) {\n for (var k = 0, n = links.length; k < iterations; ++k) {\n for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {\n link = links[i], source = link.source, target = link.target;\n x = target.x + target.vx - source.x - source.vx || jiggle(random);\n y = target.y + target.vy - source.y - source.vy || jiggle(random);\n l = Math.sqrt(x * x + y * y);\n l = (l - distances[i]) / l * alpha * strengths[i];\n x *= l, y *= l;\n target.vx -= x * (b = bias[i]);\n target.vy -= y * b;\n source.vx += x * (b = 1 - b);\n source.vy += y * b;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n\n var i,\n n = nodes.length,\n m = links.length,\n nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])),\n link;\n\n for (i = 0, count = new Array(n); i < m; ++i) {\n link = links[i], link.index = i;\n if (typeof link.source !== \"object\") link.source = find(nodeById, link.source);\n if (typeof link.target !== \"object\") link.target = find(nodeById, link.target);\n count[link.source.index] = (count[link.source.index] || 0) + 1;\n count[link.target.index] = (count[link.target.index] || 0) + 1;\n }\n\n for (i = 0, bias = new Array(m); i < m; ++i) {\n link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);\n }\n\n strengths = new Array(m), initializeStrength();\n distances = new Array(m), initializeDistance();\n }\n\n function initializeStrength() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n strengths[i] = +strength(links[i], i, links);\n }\n }\n\n function initializeDistance() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n distances[i] = +distance(links[i], i, links);\n }\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.links = function(_) {\n return arguments.length ? (links = _, initialize(), force) : links;\n };\n\n force.id = function(_) {\n return arguments.length ? (id = _, force) : id;\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initializeStrength(), force) : strength;\n };\n\n force.distance = function(_) {\n return arguments.length ? (distance = typeof _ === \"function\" ? _ : constant(+_), initializeDistance(), force) : distance;\n };\n\n return force;\n}\n","import {quadtree} from \"d3-quadtree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\nimport {x, y} from \"./simulation.js\";\n\nexport default function() {\n var nodes,\n node,\n random,\n alpha,\n strength = constant(-30),\n strengths,\n distanceMin2 = 1,\n distanceMax2 = Infinity,\n theta2 = 0.81;\n\n function force(_) {\n var i, n = nodes.length, tree = quadtree(nodes, x, y).visitAfter(accumulate);\n for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n strengths = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);\n }\n\n function accumulate(quad) {\n var strength = 0, q, c, weight = 0, x, y, i;\n\n // For internal nodes, accumulate forces from child quadrants.\n if (quad.length) {\n for (x = y = i = 0; i < 4; ++i) {\n if ((q = quad[i]) && (c = Math.abs(q.value))) {\n strength += q.value, weight += c, x += c * q.x, y += c * q.y;\n }\n }\n quad.x = x / weight;\n quad.y = y / weight;\n }\n\n // For leaf nodes, accumulate forces from coincident quadrants.\n else {\n q = quad;\n q.x = q.data.x;\n q.y = q.data.y;\n do strength += strengths[q.data.index];\n while (q = q.next);\n }\n\n quad.value = strength;\n }\n\n function apply(quad, x1, _, x2) {\n if (!quad.value) return true;\n\n var x = quad.x - node.x,\n y = quad.y - node.y,\n w = x2 - x1,\n l = x * x + y * y;\n\n // Apply the Barnes-Hut approximation if possible.\n // Limit forces for very close nodes; randomize direction if coincident.\n if (w * w / theta2 < l) {\n if (l < distanceMax2) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n node.vx += x * quad.value * alpha / l;\n node.vy += y * quad.value * alpha / l;\n }\n return true;\n }\n\n // Otherwise, process points directly.\n else if (quad.length || l >= distanceMax2) return;\n\n // Limit forces for very close nodes; randomize direction if coincident.\n if (quad.data !== node || quad.next) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n }\n\n do if (quad.data !== node) {\n w = strengths[quad.data.index] * alpha / l;\n node.vx += x * w;\n node.vy += y * w;\n } while (quad = quad.next);\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.distanceMin = function(_) {\n return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);\n };\n\n force.distanceMax = function(_) {\n return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);\n };\n\n force.theta = function(_) {\n return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(radius, x, y) {\n var nodes,\n strength = constant(0.1),\n strengths,\n radiuses;\n\n if (typeof radius !== \"function\") radius = constant(+radius);\n if (x == null) x = 0;\n if (y == null) y = 0;\n\n function force(alpha) {\n for (var i = 0, n = nodes.length; i < n; ++i) {\n var node = nodes[i],\n dx = node.x - x || 1e-6,\n dy = node.y - y || 1e-6,\n r = Math.sqrt(dx * dx + dy * dy),\n k = (radiuses[i] - r) * strengths[i] * alpha / r;\n node.vx += dx * k;\n node.vy += dy * k;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n radiuses = new Array(n);\n for (i = 0; i < n; ++i) {\n radiuses[i] = +radius(nodes[i], i, nodes);\n strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _, initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n return force;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer} from \"d3-timer\";\nimport lcg from \"./lcg.js\";\n\nexport function x(d) {\n return d.x;\n}\n\nexport function y(d) {\n return d.y;\n}\n\nvar initialRadius = 10,\n initialAngle = Math.PI * (3 - Math.sqrt(5));\n\nexport default function(nodes) {\n var simulation,\n alpha = 1,\n alphaMin = 0.001,\n alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),\n alphaTarget = 0,\n velocityDecay = 0.6,\n forces = new Map(),\n stepper = timer(step),\n event = dispatch(\"tick\", \"end\"),\n random = lcg();\n\n if (nodes == null) nodes = [];\n\n function step() {\n tick();\n event.call(\"tick\", simulation);\n if (alpha < alphaMin) {\n stepper.stop();\n event.call(\"end\", simulation);\n }\n }\n\n function tick(iterations) {\n var i, n = nodes.length, node;\n\n if (iterations === undefined) iterations = 1;\n\n for (var k = 0; k < iterations; ++k) {\n alpha += (alphaTarget - alpha) * alphaDecay;\n\n forces.forEach(function(force) {\n force(alpha);\n });\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (node.fx == null) node.x += node.vx *= velocityDecay;\n else node.x = node.fx, node.vx = 0;\n if (node.fy == null) node.y += node.vy *= velocityDecay;\n else node.y = node.fy, node.vy = 0;\n }\n }\n\n return simulation;\n }\n\n function initializeNodes() {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.index = i;\n if (node.fx != null) node.x = node.fx;\n if (node.fy != null) node.y = node.fy;\n if (isNaN(node.x) || isNaN(node.y)) {\n var radius = initialRadius * Math.sqrt(0.5 + i), angle = i * initialAngle;\n node.x = radius * Math.cos(angle);\n node.y = radius * Math.sin(angle);\n }\n if (isNaN(node.vx) || isNaN(node.vy)) {\n node.vx = node.vy = 0;\n }\n }\n }\n\n function initializeForce(force) {\n if (force.initialize) force.initialize(nodes, random);\n return force;\n }\n\n initializeNodes();\n\n return simulation = {\n tick: tick,\n\n restart: function() {\n return stepper.restart(step), simulation;\n },\n\n stop: function() {\n return stepper.stop(), simulation;\n },\n\n nodes: function(_) {\n return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;\n },\n\n alpha: function(_) {\n return arguments.length ? (alpha = +_, simulation) : alpha;\n },\n\n alphaMin: function(_) {\n return arguments.length ? (alphaMin = +_, simulation) : alphaMin;\n },\n\n alphaDecay: function(_) {\n return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;\n },\n\n alphaTarget: function(_) {\n return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;\n },\n\n velocityDecay: function(_) {\n return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;\n },\n\n randomSource: function(_) {\n return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random;\n },\n\n force: function(name, _) {\n return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);\n },\n\n find: function(x, y, radius) {\n var i = 0,\n n = nodes.length,\n dx,\n dy,\n d2,\n node,\n closest;\n\n if (radius == null) radius = Infinity;\n else radius *= radius;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n dx = x - node.x;\n dy = y - node.y;\n d2 = dx * dx + dy * dy;\n if (d2 < radius) closest = node, radius = d2;\n }\n\n return closest;\n },\n\n on: function(name, _) {\n return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n }\n };\n}\n","import constant from \"./constant.js\";\n\nexport default function(x) {\n var strength = constant(0.1),\n nodes,\n strengths,\n xz;\n\n if (typeof x !== \"function\") x = constant(x == null ? 0 : +x);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n xz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : x;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(y) {\n var strength = constant(0.1),\n nodes,\n strengths,\n yz;\n\n if (typeof y !== \"function\") y = constant(y == null ? 0 : +y);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n yz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : y;\n };\n\n return force;\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n","export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}\n","export default function(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}\n","export default function(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n};\n","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": (x, p) => (x * 100).toFixed(p),\n \"b\": (x) => Math.round(x).toString(2),\n \"c\": (x) => x + \"\",\n \"d\": formatDecimal,\n \"e\": (x, p) => x.toExponential(p),\n \"f\": (x, p) => x.toFixed(p),\n \"g\": (x, p) => x.toPrecision(p),\n \"o\": (x) => Math.round(x).toString(8),\n \"p\": (x, p) => formatRounded(x * 100, p),\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n \"x\": (x) => Math.round(x).toString(16)\n};\n","export default function(x) {\n return x;\n}\n","export {default as formatDefaultLocale, format, formatPrefix} from \"./defaultLocale.js\";\nexport {default as formatLocale} from \"./locale.js\";\nexport {default as formatSpecifier, FormatSpecifier} from \"./formatSpecifier.js\";\nexport {default as precisionFixed} from \"./precisionFixed.js\";\nexport {default as precisionPrefix} from \"./precisionPrefix.js\";\nexport {default as precisionRound} from \"./precisionRound.js\";\n","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"−\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n","import {Adder} from \"d3-array\";\nimport {atan2, cos, quarterPi, radians, sin, tau} from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\n\nexport var areaRingSum = new Adder();\n\n// hello?\n\nvar areaSum = new Adder(),\n lambda00,\n phi00,\n lambda0,\n cosPhi0,\n sinPhi0;\n\nexport var areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaRingSum = new Adder();\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n var areaRing = +areaRingSum;\n areaSum.add(areaRing < 0 ? tau + areaRing : areaRing);\n this.lineStart = this.lineEnd = this.point = noop;\n },\n sphere: function() {\n areaSum.add(tau);\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaRingEnd() {\n areaPoint(lambda00, phi00);\n}\n\nfunction areaPointFirst(lambda, phi) {\n areaStream.point = areaPoint;\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n lambda0 = lambda, cosPhi0 = cos(phi = phi / 2 + quarterPi), sinPhi0 = sin(phi);\n}\n\nfunction areaPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n phi = phi / 2 + quarterPi; // half the angular distance from south pole\n\n // Spherical excess E for a spherical triangle with vertices: south pole,\n // previous point, current point. Uses a formula derived from Cagnoli’s\n // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).\n var dLambda = lambda - lambda0,\n sdLambda = dLambda >= 0 ? 1 : -1,\n adLambda = sdLambda * dLambda,\n cosPhi = cos(phi),\n sinPhi = sin(phi),\n k = sinPhi0 * sinPhi,\n u = cosPhi0 * cosPhi + k * cos(adLambda),\n v = k * sdLambda * sin(adLambda);\n areaRingSum.add(atan2(v, u));\n\n // Advance the previous points.\n lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;\n}\n\nexport default function(object) {\n areaSum = new Adder();\n stream(object, areaStream);\n return areaSum * 2;\n}\n","import {Adder} from \"d3-array\";\nimport {areaStream, areaRingSum} from \"./area.js\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport {abs, degrees, epsilon, radians} from \"./math.js\";\nimport stream from \"./stream.js\";\n\nvar lambda0, phi0, lambda1, phi1, // bounds\n lambda2, // previous lambda-coordinate\n lambda00, phi00, // first point\n p0, // previous 3D point\n deltaSum,\n ranges,\n range;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: boundsLineStart,\n lineEnd: boundsLineEnd,\n polygonStart: function() {\n boundsStream.point = boundsRingPoint;\n boundsStream.lineStart = boundsRingStart;\n boundsStream.lineEnd = boundsRingEnd;\n deltaSum = new Adder();\n areaStream.polygonStart();\n },\n polygonEnd: function() {\n areaStream.polygonEnd();\n boundsStream.point = boundsPoint;\n boundsStream.lineStart = boundsLineStart;\n boundsStream.lineEnd = boundsLineEnd;\n if (areaRingSum < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n else if (deltaSum > epsilon) phi1 = 90;\n else if (deltaSum < -epsilon) phi0 = -90;\n range[0] = lambda0, range[1] = lambda1;\n },\n sphere: function() {\n lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n }\n};\n\nfunction boundsPoint(lambda, phi) {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n}\n\nfunction linePoint(lambda, phi) {\n var p = cartesian([lambda * radians, phi * radians]);\n if (p0) {\n var normal = cartesianCross(p0, p),\n equatorial = [normal[1], -normal[0], 0],\n inflection = cartesianCross(equatorial, normal);\n cartesianNormalizeInPlace(inflection);\n inflection = spherical(inflection);\n var delta = lambda - lambda2,\n sign = delta > 0 ? 1 : -1,\n lambdai = inflection[0] * degrees * sign,\n phii,\n antimeridian = abs(delta) > 180;\n if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = inflection[1] * degrees;\n if (phii > phi1) phi1 = phii;\n } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = -inflection[1] * degrees;\n if (phii < phi0) phi0 = phii;\n } else {\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n }\n if (antimeridian) {\n if (lambda < lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n } else {\n if (lambda1 >= lambda0) {\n if (lambda < lambda0) lambda0 = lambda;\n if (lambda > lambda1) lambda1 = lambda;\n } else {\n if (lambda > lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n }\n }\n } else {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n }\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n p0 = p, lambda2 = lambda;\n}\n\nfunction boundsLineStart() {\n boundsStream.point = linePoint;\n}\n\nfunction boundsLineEnd() {\n range[0] = lambda0, range[1] = lambda1;\n boundsStream.point = boundsPoint;\n p0 = null;\n}\n\nfunction boundsRingPoint(lambda, phi) {\n if (p0) {\n var delta = lambda - lambda2;\n deltaSum.add(abs(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);\n } else {\n lambda00 = lambda, phi00 = phi;\n }\n areaStream.point(lambda, phi);\n linePoint(lambda, phi);\n}\n\nfunction boundsRingStart() {\n areaStream.lineStart();\n}\n\nfunction boundsRingEnd() {\n boundsRingPoint(lambda00, phi00);\n areaStream.lineEnd();\n if (abs(deltaSum) > epsilon) lambda0 = -(lambda1 = 180);\n range[0] = lambda0, range[1] = lambda1;\n p0 = null;\n}\n\n// Finds the left-right distance between two longitudes.\n// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want\n// the distance between ±180° to be 360°.\nfunction angle(lambda0, lambda1) {\n return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;\n}\n\nfunction rangeCompare(a, b) {\n return a[0] - b[0];\n}\n\nfunction rangeContains(range, x) {\n return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n}\n\nexport default function(feature) {\n var i, n, a, b, merged, deltaMax, delta;\n\n phi1 = lambda1 = -(lambda0 = phi0 = Infinity);\n ranges = [];\n stream(feature, boundsStream);\n\n // First, sort ranges by their minimum longitudes.\n if (n = ranges.length) {\n ranges.sort(rangeCompare);\n\n // Then, merge any ranges that overlap.\n for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {\n b = ranges[i];\n if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {\n if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n } else {\n merged.push(a = b);\n }\n }\n\n // Finally, find the largest gap between the merged ranges.\n // The final bounding box will be the inverse of this gap.\n for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {\n b = merged[i];\n if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1];\n }\n }\n\n ranges = range = null;\n\n return lambda0 === Infinity || phi0 === Infinity\n ? [[NaN, NaN], [NaN, NaN]]\n : [[lambda0, phi0], [lambda1, phi1]];\n}\n","import {asin, atan2, cos, sin, sqrt} from \"./math.js\";\n\nexport function spherical(cartesian) {\n return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n d[0] /= l, d[1] /= l, d[2] /= l;\n}\n","import {Adder} from \"d3-array\";\nimport {asin, atan2, cos, degrees, epsilon, epsilon2, hypot, radians, sin, sqrt} from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\n\nvar W0, W1,\n X0, Y0, Z0,\n X1, Y1, Z1,\n X2, Y2, Z2,\n lambda00, phi00, // first point\n x0, y0, z0; // previous point\n\nvar centroidStream = {\n sphere: noop,\n point: centroidPoint,\n lineStart: centroidLineStart,\n lineEnd: centroidLineEnd,\n polygonStart: function() {\n centroidStream.lineStart = centroidRingStart;\n centroidStream.lineEnd = centroidRingEnd;\n },\n polygonEnd: function() {\n centroidStream.lineStart = centroidLineStart;\n centroidStream.lineEnd = centroidLineEnd;\n }\n};\n\n// Arithmetic mean of Cartesian vectors.\nfunction centroidPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi);\n centroidPointCartesian(cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi));\n}\n\nfunction centroidPointCartesian(x, y, z) {\n ++W0;\n X0 += (x - X0) / W0;\n Y0 += (y - Y0) / W0;\n Z0 += (z - Z0) / W0;\n}\n\nfunction centroidLineStart() {\n centroidStream.point = centroidLinePointFirst;\n}\n\nfunction centroidLinePointFirst(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi);\n x0 = cosPhi * cos(lambda);\n y0 = cosPhi * sin(lambda);\n z0 = sin(phi);\n centroidStream.point = centroidLinePoint;\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLinePoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi),\n x = cosPhi * cos(lambda),\n y = cosPhi * sin(lambda),\n z = sin(phi),\n w = atan2(sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);\n W1 += w;\n X1 += w * (x0 + (x0 = x));\n Y1 += w * (y0 + (y0 = y));\n Z1 += w * (z0 + (z0 = z));\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLineEnd() {\n centroidStream.point = centroidPoint;\n}\n\n// See J. E. Brock, The Inertia Tensor for a Spherical Triangle,\n// J. Applied Mechanics 42, 239 (1975).\nfunction centroidRingStart() {\n centroidStream.point = centroidRingPointFirst;\n}\n\nfunction centroidRingEnd() {\n centroidRingPoint(lambda00, phi00);\n centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingPointFirst(lambda, phi) {\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n centroidStream.point = centroidRingPoint;\n var cosPhi = cos(phi);\n x0 = cosPhi * cos(lambda);\n y0 = cosPhi * sin(lambda);\n z0 = sin(phi);\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidRingPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi),\n x = cosPhi * cos(lambda),\n y = cosPhi * sin(lambda),\n z = sin(phi),\n cx = y0 * z - z0 * y,\n cy = z0 * x - x0 * z,\n cz = x0 * y - y0 * x,\n m = hypot(cx, cy, cz),\n w = asin(m), // line weight = angle\n v = m && -w / m; // area weight multiplier\n X2.add(v * cx);\n Y2.add(v * cy);\n Z2.add(v * cz);\n W1 += w;\n X1 += w * (x0 + (x0 = x));\n Y1 += w * (y0 + (y0 = y));\n Z1 += w * (z0 + (z0 = z));\n centroidPointCartesian(x0, y0, z0);\n}\n\nexport default function(object) {\n W0 = W1 =\n X0 = Y0 = Z0 =\n X1 = Y1 = Z1 = 0;\n X2 = new Adder();\n Y2 = new Adder();\n Z2 = new Adder();\n stream(object, centroidStream);\n\n var x = +X2,\n y = +Y2,\n z = +Z2,\n m = hypot(x, y, z);\n\n // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid.\n if (m < epsilon2) {\n x = X1, y = Y1, z = Z1;\n // If the feature has zero length, fall back to arithmetic mean of point vectors.\n if (W1 < epsilon) x = X0, y = Y0, z = Z0;\n m = hypot(x, y, z);\n // If the feature still has an undefined ccentroid, then return.\n if (m < epsilon2) return [NaN, NaN];\n }\n\n return [atan2(y, x) * degrees, asin(z / m) * degrees];\n}\n","import {cartesian, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport constant from \"./constant.js\";\nimport {acos, cos, degrees, epsilon, radians, sin, tau} from \"./math.js\";\nimport {rotateRadians} from \"./rotation.js\";\n\n// Generates a circle centered at [0°, 0°], with a given radius and precision.\nexport function circleStream(stream, radius, delta, direction, t0, t1) {\n if (!delta) return;\n var cosRadius = cos(radius),\n sinRadius = sin(radius),\n step = direction * delta;\n if (t0 == null) {\n t0 = radius + direction * tau;\n t1 = radius - step / 2;\n } else {\n t0 = circleRadius(cosRadius, t0);\n t1 = circleRadius(cosRadius, t1);\n if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;\n }\n for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]);\n stream.point(point[0], point[1]);\n }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n point = cartesian(point), point[0] -= cosRadius;\n cartesianNormalizeInPlace(point);\n var radius = acos(-point[1]);\n return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau;\n}\n\nexport default function() {\n var center = constant([0, 0]),\n radius = constant(90),\n precision = constant(2),\n ring,\n rotate,\n stream = {point: point};\n\n function point(x, y) {\n ring.push(x = rotate(x, y));\n x[0] *= degrees, x[1] *= degrees;\n }\n\n function circle() {\n var c = center.apply(this, arguments),\n r = radius.apply(this, arguments) * radians,\n p = precision.apply(this, arguments) * radians;\n ring = [];\n rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;\n circleStream(stream, r, p, 1);\n c = {type: \"Polygon\", coordinates: [ring]};\n ring = rotate = null;\n return c;\n }\n\n circle.center = function(_) {\n return arguments.length ? (center = typeof _ === \"function\" ? _ : constant([+_[0], +_[1]]), circle) : center;\n };\n\n circle.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), circle) : radius;\n };\n\n circle.precision = function(_) {\n return arguments.length ? (precision = typeof _ === \"function\" ? _ : constant(+_), circle) : precision;\n };\n\n return circle;\n}\n","import clip from \"./index.js\";\nimport {abs, atan, cos, epsilon, halfPi, pi, sin} from \"../math.js\";\n\nexport default clip(\n function() { return true; },\n clipAntimeridianLine,\n clipAntimeridianInterpolate,\n [-pi, -halfPi]\n);\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n var lambda0 = NaN,\n phi0 = NaN,\n sign0 = NaN,\n clean; // no intersections\n\n return {\n lineStart: function() {\n stream.lineStart();\n clean = 1;\n },\n point: function(lambda1, phi1) {\n var sign1 = lambda1 > 0 ? pi : -pi,\n delta = abs(lambda1 - lambda0);\n if (abs(delta - pi) < epsilon) { // line crosses a pole\n stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n stream.point(lambda1, phi0);\n clean = 0;\n } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian\n if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n clean = 0;\n }\n stream.point(lambda0 = lambda1, phi0 = phi1);\n sign0 = sign1;\n },\n lineEnd: function() {\n stream.lineEnd();\n lambda0 = phi0 = NaN;\n },\n clean: function() {\n return 2 - clean; // if intersections, rejoin first and last segments\n }\n };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n var cosPhi0,\n cosPhi1,\n sinLambda0Lambda1 = sin(lambda0 - lambda1);\n return abs(sinLambda0Lambda1) > epsilon\n ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1)\n - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0))\n / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n var phi;\n if (from == null) {\n phi = direction * halfPi;\n stream.point(-pi, phi);\n stream.point(0, phi);\n stream.point(pi, phi);\n stream.point(pi, 0);\n stream.point(pi, -phi);\n stream.point(0, -phi);\n stream.point(-pi, -phi);\n stream.point(-pi, 0);\n stream.point(-pi, phi);\n } else if (abs(from[0] - to[0]) > epsilon) {\n var lambda = from[0] < to[0] ? pi : -pi;\n phi = direction * lambda / 2;\n stream.point(-lambda, phi);\n stream.point(0, phi);\n stream.point(lambda, phi);\n } else {\n stream.point(to[0], to[1]);\n }\n}\n","import noop from \"../noop.js\";\n\nexport default function() {\n var lines = [],\n line;\n return {\n point: function(x, y, m) {\n line.push([x, y, m]);\n },\n lineStart: function() {\n lines.push(line = []);\n },\n lineEnd: noop,\n rejoin: function() {\n if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n },\n result: function() {\n var result = lines;\n lines = [];\n line = null;\n return result;\n }\n };\n}\n","import {cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical} from \"../cartesian.js\";\nimport {circleStream} from \"../circle.js\";\nimport {abs, cos, epsilon, pi, radians, sqrt} from \"../math.js\";\nimport pointEqual from \"../pointEqual.js\";\nimport clip from \"./index.js\";\n\nexport default function(radius) {\n var cr = cos(radius),\n delta = 2 * radians,\n smallRadius = cr > 0,\n notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case\n\n function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }\n\n function visible(lambda, phi) {\n return cos(lambda) * cos(phi) > cr;\n }\n\n // Takes a line and cuts into visible segments. Return values used for polygon\n // clipping: 0 - there were intersections or the line was empty; 1 - no\n // intersections 2 - there were intersections, and the first and last segments\n // should be rejoined.\n function clipLine(stream) {\n var point0, // previous point\n c0, // code for previous point\n v0, // visibility of previous point\n v00, // visibility of first point\n clean; // no intersections\n return {\n lineStart: function() {\n v00 = v0 = false;\n clean = 1;\n },\n point: function(lambda, phi) {\n var point1 = [lambda, phi],\n point2,\n v = visible(lambda, phi),\n c = smallRadius\n ? v ? 0 : code(lambda, phi)\n : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0;\n if (!point0 && (v00 = v0 = v)) stream.lineStart();\n if (v !== v0) {\n point2 = intersect(point0, point1);\n if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2))\n point1[2] = 1;\n }\n if (v !== v0) {\n clean = 0;\n if (v) {\n // outside going in\n stream.lineStart();\n point2 = intersect(point1, point0);\n stream.point(point2[0], point2[1]);\n } else {\n // inside going out\n point2 = intersect(point0, point1);\n stream.point(point2[0], point2[1], 2);\n stream.lineEnd();\n }\n point0 = point2;\n } else if (notHemisphere && point0 && smallRadius ^ v) {\n var t;\n // If the codes for two points are different, or are both zero,\n // and there this segment intersects with the small circle.\n if (!(c & c0) && (t = intersect(point1, point0, true))) {\n clean = 0;\n if (smallRadius) {\n stream.lineStart();\n stream.point(t[0][0], t[0][1]);\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n } else {\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n stream.lineStart();\n stream.point(t[0][0], t[0][1], 3);\n }\n }\n }\n if (v && (!point0 || !pointEqual(point0, point1))) {\n stream.point(point1[0], point1[1]);\n }\n point0 = point1, v0 = v, c0 = c;\n },\n lineEnd: function() {\n if (v0) stream.lineEnd();\n point0 = null;\n },\n // Rejoin first and last segments if there were intersections and the first\n // and last points were visible.\n clean: function() {\n return clean | ((v00 && v0) << 1);\n }\n };\n }\n\n // Intersects the great circle between a and b with the clip circle.\n function intersect(a, b, two) {\n var pa = cartesian(a),\n pb = cartesian(b);\n\n // We have two planes, n1.p = d1 and n2.p = d2.\n // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).\n var n1 = [1, 0, 0], // normal\n n2 = cartesianCross(pa, pb),\n n2n2 = cartesianDot(n2, n2),\n n1n2 = n2[0], // cartesianDot(n1, n2),\n determinant = n2n2 - n1n2 * n1n2;\n\n // Two polar points.\n if (!determinant) return !two && a;\n\n var c1 = cr * n2n2 / determinant,\n c2 = -cr * n1n2 / determinant,\n n1xn2 = cartesianCross(n1, n2),\n A = cartesianScale(n1, c1),\n B = cartesianScale(n2, c2);\n cartesianAddInPlace(A, B);\n\n // Solve |p(t)|^2 = 1.\n var u = n1xn2,\n w = cartesianDot(A, u),\n uu = cartesianDot(u, u),\n t2 = w * w - uu * (cartesianDot(A, A) - 1);\n\n if (t2 < 0) return;\n\n var t = sqrt(t2),\n q = cartesianScale(u, (-w - t) / uu);\n cartesianAddInPlace(q, A);\n q = spherical(q);\n\n if (!two) return q;\n\n // Two intersection points.\n var lambda0 = a[0],\n lambda1 = b[0],\n phi0 = a[1],\n phi1 = b[1],\n z;\n\n if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n var delta = lambda1 - lambda0,\n polar = abs(delta - pi) < epsilon,\n meridian = polar || delta < epsilon;\n\n if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n // Check that the first point is between a and b.\n if (meridian\n ? polar\n ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1)\n : phi0 <= q[1] && q[1] <= phi1\n : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n var q1 = cartesianScale(u, (-w + t) / uu);\n cartesianAddInPlace(q1, A);\n return [q, spherical(q1)];\n }\n }\n\n // Generates a 4-bit vector representing the location of a point relative to\n // the small circle's bounding box.\n function code(lambda, phi) {\n var r = smallRadius ? radius : pi - radius,\n code = 0;\n if (lambda < -r) code |= 1; // left\n else if (lambda > r) code |= 2; // right\n if (phi < -r) code |= 4; // below\n else if (phi > r) code |= 8; // above\n return code;\n }\n\n return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]);\n}\n","import clipRectangle from \"./rectangle.js\";\n\nexport default function() {\n var x0 = 0,\n y0 = 0,\n x1 = 960,\n y1 = 500,\n cache,\n cacheStream,\n clip;\n\n return clip = {\n stream: function(stream) {\n return cache && cacheStream === stream ? cache : cache = clipRectangle(x0, y0, x1, y1)(cacheStream = stream);\n },\n extent: function(_) {\n return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]];\n }\n };\n}\n","import clipBuffer from \"./buffer.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {epsilon, halfPi} from \"../math.js\";\nimport polygonContains from \"../polygonContains.js\";\nimport {merge} from \"d3-array\";\n\nexport default function(pointVisible, clipLine, interpolate, start) {\n return function(sink) {\n var line = clipLine(sink),\n ringBuffer = clipBuffer(),\n ringSink = clipLine(ringBuffer),\n polygonStarted = false,\n polygon,\n segments,\n ring;\n\n var clip = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() {\n clip.point = pointRing;\n clip.lineStart = ringStart;\n clip.lineEnd = ringEnd;\n segments = [];\n polygon = [];\n },\n polygonEnd: function() {\n clip.point = point;\n clip.lineStart = lineStart;\n clip.lineEnd = lineEnd;\n segments = merge(segments);\n var startInside = polygonContains(polygon, start);\n if (segments.length) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n clipRejoin(segments, compareIntersection, startInside, interpolate, sink);\n } else if (startInside) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n }\n if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n segments = polygon = null;\n },\n sphere: function() {\n sink.polygonStart();\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n sink.polygonEnd();\n }\n };\n\n function point(lambda, phi) {\n if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n }\n\n function pointLine(lambda, phi) {\n line.point(lambda, phi);\n }\n\n function lineStart() {\n clip.point = pointLine;\n line.lineStart();\n }\n\n function lineEnd() {\n clip.point = point;\n line.lineEnd();\n }\n\n function pointRing(lambda, phi) {\n ring.push([lambda, phi]);\n ringSink.point(lambda, phi);\n }\n\n function ringStart() {\n ringSink.lineStart();\n ring = [];\n }\n\n function ringEnd() {\n pointRing(ring[0][0], ring[0][1]);\n ringSink.lineEnd();\n\n var clean = ringSink.clean(),\n ringSegments = ringBuffer.result(),\n i, n = ringSegments.length, m,\n segment,\n point;\n\n ring.pop();\n polygon.push(ring);\n ring = null;\n\n if (!n) return;\n\n // No intersections.\n if (clean & 1) {\n segment = ringSegments[0];\n if ((m = segment.length - 1) > 0) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n sink.lineEnd();\n }\n return;\n }\n\n // Rejoin connected segments.\n // TODO reuse ringBuffer.rejoin()?\n if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n segments.push(ringSegments.filter(validSegment));\n }\n\n return clip;\n };\n}\n\nfunction validSegment(segment) {\n return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1])\n - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}\n","export default function(a, b, x0, y0, x1, y1) {\n var ax = a[0],\n ay = a[1],\n bx = b[0],\n by = b[1],\n t0 = 0,\n t1 = 1,\n dx = bx - ax,\n dy = by - ay,\n r;\n\n r = x0 - ax;\n if (!dx && r > 0) return;\n r /= dx;\n if (dx < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dx > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = x1 - ax;\n if (!dx && r < 0) return;\n r /= dx;\n if (dx < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dx > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n r = y0 - ay;\n if (!dy && r > 0) return;\n r /= dy;\n if (dy < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dy > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = y1 - ay;\n if (!dy && r < 0) return;\n r /= dy;\n if (dy < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dy > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n return true;\n}\n","import {abs, epsilon} from \"../math.js\";\nimport clipBuffer from \"./buffer.js\";\nimport clipLine from \"./line.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {merge} from \"d3-array\";\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon’s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport default function clipRectangle(x0, y0, x1, y1) {\n\n function visible(x, y) {\n return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n }\n\n function interpolate(from, to, direction, stream) {\n var a = 0, a1 = 0;\n if (from == null\n || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n || comparePoint(from, to) < 0 ^ direction > 0) {\n do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n while ((a = (a + direction + 4) % 4) !== a1);\n } else {\n stream.point(to[0], to[1]);\n }\n }\n\n function corner(p, direction) {\n return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3\n : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1\n : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0\n : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n }\n\n function compareIntersection(a, b) {\n return comparePoint(a.x, b.x);\n }\n\n function comparePoint(a, b) {\n var ca = corner(a, 1),\n cb = corner(b, 1);\n return ca !== cb ? ca - cb\n : ca === 0 ? b[1] - a[1]\n : ca === 1 ? a[0] - b[0]\n : ca === 2 ? a[1] - b[1]\n : b[0] - a[0];\n }\n\n return function(stream) {\n var activeStream = stream,\n bufferStream = clipBuffer(),\n segments,\n polygon,\n ring,\n x__, y__, v__, // first point\n x_, y_, v_, // previous point\n first,\n clean;\n\n var clipStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: polygonStart,\n polygonEnd: polygonEnd\n };\n\n function point(x, y) {\n if (visible(x, y)) activeStream.point(x, y);\n }\n\n function polygonInside() {\n var winding = 0;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n }\n }\n\n return winding;\n }\n\n // Buffer geometry within a polygon and then clip it en masse.\n function polygonStart() {\n activeStream = bufferStream, segments = [], polygon = [], clean = true;\n }\n\n function polygonEnd() {\n var startInside = polygonInside(),\n cleanInside = clean && startInside,\n visible = (segments = merge(segments)).length;\n if (cleanInside || visible) {\n stream.polygonStart();\n if (cleanInside) {\n stream.lineStart();\n interpolate(null, null, 1, stream);\n stream.lineEnd();\n }\n if (visible) {\n clipRejoin(segments, compareIntersection, startInside, interpolate, stream);\n }\n stream.polygonEnd();\n }\n activeStream = stream, segments = polygon = ring = null;\n }\n\n function lineStart() {\n clipStream.point = linePoint;\n if (polygon) polygon.push(ring = []);\n first = true;\n v_ = false;\n x_ = y_ = NaN;\n }\n\n // TODO rather than special-case polygons, simply handle them separately.\n // Ideally, coincident intersection points should be jittered to avoid\n // clipping issues.\n function lineEnd() {\n if (segments) {\n linePoint(x__, y__);\n if (v__ && v_) bufferStream.rejoin();\n segments.push(bufferStream.result());\n }\n clipStream.point = point;\n if (v_) activeStream.lineEnd();\n }\n\n function linePoint(x, y) {\n var v = visible(x, y);\n if (polygon) ring.push([x, y]);\n if (first) {\n x__ = x, y__ = y, v__ = v;\n first = false;\n if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n }\n } else {\n if (v && v_) activeStream.point(x, y);\n else {\n var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n if (clipLine(a, b, x0, y0, x1, y1)) {\n if (!v_) {\n activeStream.lineStart();\n activeStream.point(a[0], a[1]);\n }\n activeStream.point(b[0], b[1]);\n if (!v) activeStream.lineEnd();\n clean = false;\n } else if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n clean = false;\n }\n }\n }\n x_ = x, y_ = y, v_ = v;\n }\n\n return clipStream;\n };\n}\n","import pointEqual from \"../pointEqual.js\";\nimport {epsilon} from \"../math.js\";\n\nfunction Intersection(point, points, other, entry) {\n this.x = point;\n this.z = points;\n this.o = other; // another intersection\n this.e = entry; // is an entry?\n this.v = false; // visited\n this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\nexport default function(segments, compareIntersection, startInside, interpolate, stream) {\n var subject = [],\n clip = [],\n i,\n n;\n\n segments.forEach(function(segment) {\n if ((n = segment.length - 1) <= 0) return;\n var n, p0 = segment[0], p1 = segment[n], x;\n\n if (pointEqual(p0, p1)) {\n if (!p0[2] && !p1[2]) {\n stream.lineStart();\n for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n stream.lineEnd();\n return;\n }\n // handle degenerate cases by moving the point\n p1[0] += 2 * epsilon;\n }\n\n subject.push(x = new Intersection(p0, segment, null, true));\n clip.push(x.o = new Intersection(p0, null, x, false));\n subject.push(x = new Intersection(p1, segment, null, false));\n clip.push(x.o = new Intersection(p1, null, x, true));\n });\n\n if (!subject.length) return;\n\n clip.sort(compareIntersection);\n link(subject);\n link(clip);\n\n for (i = 0, n = clip.length; i < n; ++i) {\n clip[i].e = startInside = !startInside;\n }\n\n var start = subject[0],\n points,\n point;\n\n while (1) {\n // Find first unvisited intersection.\n var current = start,\n isSubject = true;\n while (current.v) if ((current = current.n) === start) return;\n points = current.z;\n stream.lineStart();\n do {\n current.v = current.o.v = true;\n if (current.e) {\n if (isSubject) {\n for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.n.x, 1, stream);\n }\n current = current.n;\n } else {\n if (isSubject) {\n points = current.p.z;\n for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.p.x, -1, stream);\n }\n current = current.p;\n }\n current = current.o;\n points = current.z;\n isSubject = !isSubject;\n } while (!current.v);\n stream.lineEnd();\n }\n}\n\nfunction link(array) {\n if (!(n = array.length)) return;\n var n,\n i = 0,\n a = array[0],\n b;\n while (++i < n) {\n a.n = b = array[i];\n b.p = a;\n a = b;\n }\n a.n = b = array[0];\n b.p = a;\n}\n","export default function(a, b) {\n\n function compose(x, y) {\n return x = a(x, y), b(x[0], x[1]);\n }\n\n if (a.invert && b.invert) compose.invert = function(x, y) {\n return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n };\n\n return compose;\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","import {default as polygonContains} from \"./polygonContains.js\";\nimport {default as distance} from \"./distance.js\";\nimport {epsilon2, radians} from \"./math.js\";\n\nvar containsObjectType = {\n Feature: function(object, point) {\n return containsGeometry(object.geometry, point);\n },\n FeatureCollection: function(object, point) {\n var features = object.features, i = -1, n = features.length;\n while (++i < n) if (containsGeometry(features[i].geometry, point)) return true;\n return false;\n }\n};\n\nvar containsGeometryType = {\n Sphere: function() {\n return true;\n },\n Point: function(object, point) {\n return containsPoint(object.coordinates, point);\n },\n MultiPoint: function(object, point) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) if (containsPoint(coordinates[i], point)) return true;\n return false;\n },\n LineString: function(object, point) {\n return containsLine(object.coordinates, point);\n },\n MultiLineString: function(object, point) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) if (containsLine(coordinates[i], point)) return true;\n return false;\n },\n Polygon: function(object, point) {\n return containsPolygon(object.coordinates, point);\n },\n MultiPolygon: function(object, point) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) if (containsPolygon(coordinates[i], point)) return true;\n return false;\n },\n GeometryCollection: function(object, point) {\n var geometries = object.geometries, i = -1, n = geometries.length;\n while (++i < n) if (containsGeometry(geometries[i], point)) return true;\n return false;\n }\n};\n\nfunction containsGeometry(geometry, point) {\n return geometry && containsGeometryType.hasOwnProperty(geometry.type)\n ? containsGeometryType[geometry.type](geometry, point)\n : false;\n}\n\nfunction containsPoint(coordinates, point) {\n return distance(coordinates, point) === 0;\n}\n\nfunction containsLine(coordinates, point) {\n var ao, bo, ab;\n for (var i = 0, n = coordinates.length; i < n; i++) {\n bo = distance(coordinates[i], point);\n if (bo === 0) return true;\n if (i > 0) {\n ab = distance(coordinates[i], coordinates[i - 1]);\n if (\n ab > 0 &&\n ao <= ab &&\n bo <= ab &&\n (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < epsilon2 * ab\n )\n return true;\n }\n ao = bo;\n }\n return false;\n}\n\nfunction containsPolygon(coordinates, point) {\n return !!polygonContains(coordinates.map(ringRadians), pointRadians(point));\n}\n\nfunction ringRadians(ring) {\n return ring = ring.map(pointRadians), ring.pop(), ring;\n}\n\nfunction pointRadians(point) {\n return [point[0] * radians, point[1] * radians];\n}\n\nexport default function(object, point) {\n return (object && containsObjectType.hasOwnProperty(object.type)\n ? containsObjectType[object.type]\n : containsGeometry)(object, point);\n}\n","import length from \"./length.js\";\n\nvar coordinates = [null, null],\n object = {type: \"LineString\", coordinates: coordinates};\n\nexport default function(a, b) {\n coordinates[0] = a;\n coordinates[1] = b;\n return length(object);\n}\n","import {range} from \"d3-array\";\nimport {abs, ceil, epsilon} from \"./math.js\";\n\nfunction graticuleX(y0, y1, dy) {\n var y = range(y0, y1 - epsilon, dy).concat(y1);\n return function(x) { return y.map(function(y) { return [x, y]; }); };\n}\n\nfunction graticuleY(x0, x1, dx) {\n var x = range(x0, x1 - epsilon, dx).concat(x1);\n return function(y) { return x.map(function(x) { return [x, y]; }); };\n}\n\nexport default function graticule() {\n var x1, x0, X1, X0,\n y1, y0, Y1, Y0,\n dx = 10, dy = dx, DX = 90, DY = 360,\n x, y, X, Y,\n precision = 2.5;\n\n function graticule() {\n return {type: \"MultiLineString\", coordinates: lines()};\n }\n\n function lines() {\n return range(ceil(X0 / DX) * DX, X1, DX).map(X)\n .concat(range(ceil(Y0 / DY) * DY, Y1, DY).map(Y))\n .concat(range(ceil(x0 / dx) * dx, x1, dx).filter(function(x) { return abs(x % DX) > epsilon; }).map(x))\n .concat(range(ceil(y0 / dy) * dy, y1, dy).filter(function(y) { return abs(y % DY) > epsilon; }).map(y));\n }\n\n graticule.lines = function() {\n return lines().map(function(coordinates) { return {type: \"LineString\", coordinates: coordinates}; });\n };\n\n graticule.outline = function() {\n return {\n type: \"Polygon\",\n coordinates: [\n X(X0).concat(\n Y(Y1).slice(1),\n X(X1).reverse().slice(1),\n Y(Y0).reverse().slice(1))\n ]\n };\n };\n\n graticule.extent = function(_) {\n if (!arguments.length) return graticule.extentMinor();\n return graticule.extentMajor(_).extentMinor(_);\n };\n\n graticule.extentMajor = function(_) {\n if (!arguments.length) return [[X0, Y0], [X1, Y1]];\n X0 = +_[0][0], X1 = +_[1][0];\n Y0 = +_[0][1], Y1 = +_[1][1];\n if (X0 > X1) _ = X0, X0 = X1, X1 = _;\n if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;\n return graticule.precision(precision);\n };\n\n graticule.extentMinor = function(_) {\n if (!arguments.length) return [[x0, y0], [x1, y1]];\n x0 = +_[0][0], x1 = +_[1][0];\n y0 = +_[0][1], y1 = +_[1][1];\n if (x0 > x1) _ = x0, x0 = x1, x1 = _;\n if (y0 > y1) _ = y0, y0 = y1, y1 = _;\n return graticule.precision(precision);\n };\n\n graticule.step = function(_) {\n if (!arguments.length) return graticule.stepMinor();\n return graticule.stepMajor(_).stepMinor(_);\n };\n\n graticule.stepMajor = function(_) {\n if (!arguments.length) return [DX, DY];\n DX = +_[0], DY = +_[1];\n return graticule;\n };\n\n graticule.stepMinor = function(_) {\n if (!arguments.length) return [dx, dy];\n dx = +_[0], dy = +_[1];\n return graticule;\n };\n\n graticule.precision = function(_) {\n if (!arguments.length) return precision;\n precision = +_;\n x = graticuleX(y0, y1, 90);\n y = graticuleY(x0, x1, precision);\n X = graticuleX(Y0, Y1, 90);\n Y = graticuleY(X0, X1, precision);\n return graticule;\n };\n\n return graticule\n .extentMajor([[-180, -90 + epsilon], [180, 90 - epsilon]])\n .extentMinor([[-180, -80 - epsilon], [180, 80 + epsilon]]);\n}\n\nexport function graticule10() {\n return graticule()();\n}\n","export default x => x;\n","export {default as geoArea} from \"./area.js\";\nexport {default as geoBounds} from \"./bounds.js\";\nexport {default as geoCentroid} from \"./centroid.js\";\nexport {default as geoCircle} from \"./circle.js\";\nexport {default as geoClipAntimeridian} from \"./clip/antimeridian.js\";\nexport {default as geoClipCircle} from \"./clip/circle.js\";\nexport {default as geoClipExtent} from \"./clip/extent.js\"; // DEPRECATED! Use d3.geoIdentity().clipExtent(…).\nexport {default as geoClipRectangle} from \"./clip/rectangle.js\";\nexport {default as geoContains} from \"./contains.js\";\nexport {default as geoDistance} from \"./distance.js\";\nexport {default as geoGraticule, graticule10 as geoGraticule10} from \"./graticule.js\";\nexport {default as geoInterpolate} from \"./interpolate.js\";\nexport {default as geoLength} from \"./length.js\";\nexport {default as geoPath} from \"./path/index.js\";\nexport {default as geoAlbers} from \"./projection/albers.js\";\nexport {default as geoAlbersUsa} from \"./projection/albersUsa.js\";\nexport {default as geoAzimuthalEqualArea, azimuthalEqualAreaRaw as geoAzimuthalEqualAreaRaw} from \"./projection/azimuthalEqualArea.js\";\nexport {default as geoAzimuthalEquidistant, azimuthalEquidistantRaw as geoAzimuthalEquidistantRaw} from \"./projection/azimuthalEquidistant.js\";\nexport {default as geoConicConformal, conicConformalRaw as geoConicConformalRaw} from \"./projection/conicConformal.js\";\nexport {default as geoConicEqualArea, conicEqualAreaRaw as geoConicEqualAreaRaw} from \"./projection/conicEqualArea.js\";\nexport {default as geoConicEquidistant, conicEquidistantRaw as geoConicEquidistantRaw} from \"./projection/conicEquidistant.js\";\nexport {default as geoEqualEarth, equalEarthRaw as geoEqualEarthRaw} from \"./projection/equalEarth.js\";\nexport {default as geoEquirectangular, equirectangularRaw as geoEquirectangularRaw} from \"./projection/equirectangular.js\";\nexport {default as geoGnomonic, gnomonicRaw as geoGnomonicRaw} from \"./projection/gnomonic.js\";\nexport {default as geoIdentity} from \"./projection/identity.js\";\nexport {default as geoProjection, projectionMutator as geoProjectionMutator} from \"./projection/index.js\";\nexport {default as geoMercator, mercatorRaw as geoMercatorRaw} from \"./projection/mercator.js\";\nexport {default as geoNaturalEarth1, naturalEarth1Raw as geoNaturalEarth1Raw} from \"./projection/naturalEarth1.js\";\nexport {default as geoOrthographic, orthographicRaw as geoOrthographicRaw} from \"./projection/orthographic.js\";\nexport {default as geoStereographic, stereographicRaw as geoStereographicRaw} from \"./projection/stereographic.js\";\nexport {default as geoTransverseMercator, transverseMercatorRaw as geoTransverseMercatorRaw} from \"./projection/transverseMercator.js\";\nexport {default as geoRotation} from \"./rotation.js\";\nexport {default as geoStream} from \"./stream.js\";\nexport {default as geoTransform} from \"./transform.js\";\n","import {asin, atan2, cos, degrees, haversin, radians, sin, sqrt} from \"./math.js\";\n\nexport default function(a, b) {\n var x0 = a[0] * radians,\n y0 = a[1] * radians,\n x1 = b[0] * radians,\n y1 = b[1] * radians,\n cy0 = cos(y0),\n sy0 = sin(y0),\n cy1 = cos(y1),\n sy1 = sin(y1),\n kx0 = cy0 * cos(x0),\n ky0 = cy0 * sin(x0),\n kx1 = cy1 * cos(x1),\n ky1 = cy1 * sin(x1),\n d = 2 * asin(sqrt(haversin(y1 - y0) + cy0 * cy1 * haversin(x1 - x0))),\n k = sin(d);\n\n var interpolate = d ? function(t) {\n var B = sin(t *= d) / k,\n A = sin(d - t) / k,\n x = A * kx0 + B * kx1,\n y = A * ky0 + B * ky1,\n z = A * sy0 + B * sy1;\n return [\n atan2(y, x) * degrees,\n atan2(z, sqrt(x * x + y * y)) * degrees\n ];\n } : function() {\n return [x0 * degrees, y0 * degrees];\n };\n\n interpolate.distance = d;\n\n return interpolate;\n}\n","import {Adder} from \"d3-array\";\nimport {abs, atan2, cos, radians, sin, sqrt} from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\n\nvar lengthSum,\n lambda0,\n sinPhi0,\n cosPhi0;\n\nvar lengthStream = {\n sphere: noop,\n point: noop,\n lineStart: lengthLineStart,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop\n};\n\nfunction lengthLineStart() {\n lengthStream.point = lengthPointFirst;\n lengthStream.lineEnd = lengthLineEnd;\n}\n\nfunction lengthLineEnd() {\n lengthStream.point = lengthStream.lineEnd = noop;\n}\n\nfunction lengthPointFirst(lambda, phi) {\n lambda *= radians, phi *= radians;\n lambda0 = lambda, sinPhi0 = sin(phi), cosPhi0 = cos(phi);\n lengthStream.point = lengthPoint;\n}\n\nfunction lengthPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var sinPhi = sin(phi),\n cosPhi = cos(phi),\n delta = abs(lambda - lambda0),\n cosDelta = cos(delta),\n sinDelta = sin(delta),\n x = cosPhi * sinDelta,\n y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,\n z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;\n lengthSum.add(atan2(sqrt(x * x + y * y), z));\n lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;\n}\n\nexport default function(object) {\n lengthSum = new Adder();\n stream(object, lengthStream);\n return +lengthSum;\n}\n","export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n return (x = sin(x / 2)) * x;\n}\n","export default function noop() {}\n","import {Adder} from \"d3-array\";\nimport {abs} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar areaSum = new Adder(),\n areaRingSum = new Adder(),\n x00,\n y00,\n x0,\n y0;\n\nvar areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n areaSum.add(abs(areaRingSum));\n areaRingSum = new Adder();\n },\n result: function() {\n var area = areaSum / 2;\n areaSum = new Adder();\n return area;\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n areaStream.point = areaPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n areaRingSum.add(y0 * x - x0 * y);\n x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n areaPoint(x00, y00);\n}\n\nexport default areaStream;\n","import noop from \"../noop.js\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n","import {sqrt} from \"../math.js\";\n\n// TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n Y0 = 0,\n Z0 = 0,\n X1 = 0,\n Y1 = 0,\n Z1 = 0,\n X2 = 0,\n Y2 = 0,\n Z2 = 0,\n x00,\n y00,\n x0,\n y0;\n\nvar centroidStream = {\n point: centroidPoint,\n lineStart: centroidLineStart,\n lineEnd: centroidLineEnd,\n polygonStart: function() {\n centroidStream.lineStart = centroidRingStart;\n centroidStream.lineEnd = centroidRingEnd;\n },\n polygonEnd: function() {\n centroidStream.point = centroidPoint;\n centroidStream.lineStart = centroidLineStart;\n centroidStream.lineEnd = centroidLineEnd;\n },\n result: function() {\n var centroid = Z2 ? [X2 / Z2, Y2 / Z2]\n : Z1 ? [X1 / Z1, Y1 / Z1]\n : Z0 ? [X0 / Z0, Y0 / Z0]\n : [NaN, NaN];\n X0 = Y0 = Z0 =\n X1 = Y1 = Z1 =\n X2 = Y2 = Z2 = 0;\n return centroid;\n }\n};\n\nfunction centroidPoint(x, y) {\n X0 += x;\n Y0 += y;\n ++Z0;\n}\n\nfunction centroidLineStart() {\n centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n centroidStream.point = centroidPointLine;\n centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n var dx = x - x0, dy = y - y0, z = sqrt(dx * dx + dy * dy);\n X1 += z * (x0 + x) / 2;\n Y1 += z * (y0 + y) / 2;\n Z1 += z;\n centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n centroidStream.point = centroidPointRing;\n centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n var dx = x - x0,\n dy = y - y0,\n z = sqrt(dx * dx + dy * dy);\n\n X1 += z * (x0 + x) / 2;\n Y1 += z * (y0 + y) / 2;\n Z1 += z;\n\n z = y0 * x - x0 * y;\n X2 += z * (x0 + x);\n Y2 += z * (y0 + y);\n Z2 += z * 3;\n centroidPoint(x0 = x, y0 = y);\n}\n\nexport default centroidStream;\n","import {tau} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nexport default function PathContext(context) {\n this._context = context;\n}\n\nPathContext.prototype = {\n _radius: 4.5,\n pointRadius: function(_) {\n return this._radius = _, this;\n },\n polygonStart: function() {\n this._line = 0;\n },\n polygonEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line === 0) this._context.closePath();\n this._point = NaN;\n },\n point: function(x, y) {\n switch (this._point) {\n case 0: {\n this._context.moveTo(x, y);\n this._point = 1;\n break;\n }\n case 1: {\n this._context.lineTo(x, y);\n break;\n }\n default: {\n this._context.moveTo(x + this._radius, y);\n this._context.arc(x, y, this._radius, 0, tau);\n break;\n }\n }\n },\n result: noop\n};\n","import identity from \"../identity.js\";\nimport stream from \"../stream.js\";\nimport pathArea from \"./area.js\";\nimport pathBounds from \"./bounds.js\";\nimport pathCentroid from \"./centroid.js\";\nimport PathContext from \"./context.js\";\nimport pathMeasure from \"./measure.js\";\nimport PathString from \"./string.js\";\n\nexport default function(projection, context) {\n let digits = 3,\n pointRadius = 4.5,\n projectionStream,\n contextStream;\n\n function path(object) {\n if (object) {\n if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n stream(object, projectionStream(contextStream));\n }\n return contextStream.result();\n }\n\n path.area = function(object) {\n stream(object, projectionStream(pathArea));\n return pathArea.result();\n };\n\n path.measure = function(object) {\n stream(object, projectionStream(pathMeasure));\n return pathMeasure.result();\n };\n\n path.bounds = function(object) {\n stream(object, projectionStream(pathBounds));\n return pathBounds.result();\n };\n\n path.centroid = function(object) {\n stream(object, projectionStream(pathCentroid));\n return pathCentroid.result();\n };\n\n path.projection = function(_) {\n if (!arguments.length) return projection;\n projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream;\n return path;\n };\n\n path.context = function(_) {\n if (!arguments.length) return context;\n contextStream = _ == null ? (context = null, new PathString(digits)) : new PathContext(context = _);\n if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n return path;\n };\n\n path.pointRadius = function(_) {\n if (!arguments.length) return pointRadius;\n pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n return path;\n };\n\n path.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) digits = null;\n else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n if (context === null) contextStream = new PathString(digits);\n return path;\n };\n\n return path.projection(projection).digits(digits).context(context);\n}\n","import {Adder} from \"d3-array\";\nimport {sqrt} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar lengthSum = new Adder(),\n lengthRing,\n x00,\n y00,\n x0,\n y0;\n\nvar lengthStream = {\n point: noop,\n lineStart: function() {\n lengthStream.point = lengthPointFirst;\n },\n lineEnd: function() {\n if (lengthRing) lengthPoint(x00, y00);\n lengthStream.point = noop;\n },\n polygonStart: function() {\n lengthRing = true;\n },\n polygonEnd: function() {\n lengthRing = null;\n },\n result: function() {\n var length = +lengthSum;\n lengthSum = new Adder();\n return length;\n }\n};\n\nfunction lengthPointFirst(x, y) {\n lengthStream.point = lengthPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n x0 -= x, y0 -= y;\n lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n","// Simple caching for constant-radius points.\nlet cacheDigits, cacheAppend, cacheRadius, cacheCircle;\n\nexport default class PathString {\n constructor(digits) {\n this._append = digits == null ? append : appendRound(digits);\n this._radius = 4.5;\n this._ = \"\";\n }\n pointRadius(_) {\n this._radius = +_;\n return this;\n }\n polygonStart() {\n this._line = 0;\n }\n polygonEnd() {\n this._line = NaN;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {\n if (this._line === 0) this._ += \"Z\";\n this._point = NaN;\n }\n point(x, y) {\n switch (this._point) {\n case 0: {\n this._append`M${x},${y}`;\n this._point = 1;\n break;\n }\n case 1: {\n this._append`L${x},${y}`;\n break;\n }\n default: {\n this._append`M${x},${y}`;\n if (this._radius !== cacheRadius || this._append !== cacheAppend) {\n const r = this._radius;\n const s = this._;\n this._ = \"\"; // stash the old string so we can cache the circle path fragment\n this._append`m0,${r}a${r},${r} 0 1,1 0,${-2 * r}a${r},${r} 0 1,1 0,${2 * r}z`;\n cacheRadius = r;\n cacheAppend = this._append;\n cacheCircle = this._;\n this._ = s;\n }\n this._ += cacheCircle;\n break;\n }\n }\n }\n result() {\n const result = this._;\n this._ = \"\";\n return result.length ? result : null;\n }\n}\n\nfunction append(strings) {\n let i = 1;\n this._ += strings[0];\n for (const j = strings.length; i < j; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n const d = Math.floor(digits);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${digits}`);\n if (d > 15) return append;\n if (d !== cacheDigits) {\n const k = 10 ** d;\n cacheDigits = d;\n cacheAppend = function append(strings) {\n let i = 1;\n this._ += strings[0];\n for (const j = strings.length; i < j; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n }\n return cacheAppend;\n}\n","import {abs, epsilon} from \"./math.js\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n","import {Adder} from \"d3-array\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from \"./math.js\";\n\nfunction longitude(point) {\n return abs(point[0]) <= pi ? point[0] : sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);\n}\n\nexport default function(polygon, point) {\n var lambda = longitude(point),\n phi = point[1],\n sinPhi = sin(phi),\n normal = [sin(lambda), -cos(lambda), 0],\n angle = 0,\n winding = 0;\n\n var sum = new Adder();\n\n if (sinPhi === 1) phi = halfPi + epsilon;\n else if (sinPhi === -1) phi = -halfPi - epsilon;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n if (!(m = (ring = polygon[i]).length)) continue;\n var ring,\n m,\n point0 = ring[m - 1],\n lambda0 = longitude(point0),\n phi0 = point0[1] / 2 + quarterPi,\n sinPhi0 = sin(phi0),\n cosPhi0 = cos(phi0);\n\n for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n var point1 = ring[j],\n lambda1 = longitude(point1),\n phi1 = point1[1] / 2 + quarterPi,\n sinPhi1 = sin(phi1),\n cosPhi1 = cos(phi1),\n delta = lambda1 - lambda0,\n sign = delta >= 0 ? 1 : -1,\n absDelta = sign * delta,\n antimeridian = absDelta > pi,\n k = sinPhi0 * sinPhi1;\n\n sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n angle += antimeridian ? delta + sign * tau : delta;\n\n // Are the longitudes either side of the point’s meridian (lambda),\n // and are the latitudes smaller than the parallel (phi)?\n if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n var arc = cartesianCross(cartesian(point0), cartesian(point1));\n cartesianNormalizeInPlace(arc);\n var intersection = cartesianCross(normal, arc);\n cartesianNormalizeInPlace(intersection);\n var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n winding += antimeridian ^ delta >= 0 ? 1 : -1;\n }\n }\n }\n }\n\n // First, determine whether the South pole is inside or outside:\n //\n // It is inside if:\n // * the polygon winds around it in a clockwise direction.\n // * the polygon does not (cumulatively) wind around it, but has a negative\n // (counter-clockwise) area.\n //\n // Second, count the (signed) number of times a segment crosses a lambda\n // from the point to the South pole. If it is zero, then the point is the\n // same side as the South pole.\n\n return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1);\n}\n","import conicEqualArea from \"./conicEqualArea.js\";\n\nexport default function() {\n return conicEqualArea()\n .parallels([29.5, 45.5])\n .scale(1070)\n .translate([480, 250])\n .rotate([96, 0])\n .center([-0.6, 38.7]);\n}\n","import {epsilon} from \"../math.js\";\nimport albers from \"./albers.js\";\nimport conicEqualArea from \"./conicEqualArea.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\n\n// The projections must have mutually exclusive clip regions on the sphere,\n// as this will avoid emitting interleaving lines and polygons.\nfunction multiplex(streams) {\n var n = streams.length;\n return {\n point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },\n sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },\n lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },\n lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },\n polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },\n polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }\n };\n}\n\n// A composite projection for the United States, configured by default for\n// 960×500. The projection also works quite well at 960×600 if you change the\n// scale to 1285 and adjust the translate accordingly. The set of standard\n// parallels for each region comes from USGS, which is published here:\n// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers\nexport default function() {\n var cache,\n cacheStream,\n lower48 = albers(), lower48Point,\n alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338\n hawaii = conicEqualArea().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007\n point, pointStream = {point: function(x, y) { point = [x, y]; }};\n\n function albersUsa(coordinates) {\n var x = coordinates[0], y = coordinates[1];\n return point = null,\n (lower48Point.point(x, y), point)\n || (alaskaPoint.point(x, y), point)\n || (hawaiiPoint.point(x, y), point);\n }\n\n albersUsa.invert = function(coordinates) {\n var k = lower48.scale(),\n t = lower48.translate(),\n x = (coordinates[0] - t[0]) / k,\n y = (coordinates[1] - t[1]) / k;\n return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska\n : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii\n : lower48).invert(coordinates);\n };\n\n albersUsa.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);\n };\n\n albersUsa.precision = function(_) {\n if (!arguments.length) return lower48.precision();\n lower48.precision(_), alaska.precision(_), hawaii.precision(_);\n return reset();\n };\n\n albersUsa.scale = function(_) {\n if (!arguments.length) return lower48.scale();\n lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);\n return albersUsa.translate(lower48.translate());\n };\n\n albersUsa.translate = function(_) {\n if (!arguments.length) return lower48.translate();\n var k = lower48.scale(), x = +_[0], y = +_[1];\n\n lower48Point = lower48\n .translate(_)\n .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])\n .stream(pointStream);\n\n alaskaPoint = alaska\n .translate([x - 0.307 * k, y + 0.201 * k])\n .clipExtent([[x - 0.425 * k + epsilon, y + 0.120 * k + epsilon], [x - 0.214 * k - epsilon, y + 0.234 * k - epsilon]])\n .stream(pointStream);\n\n hawaiiPoint = hawaii\n .translate([x - 0.205 * k, y + 0.212 * k])\n .clipExtent([[x - 0.214 * k + epsilon, y + 0.166 * k + epsilon], [x - 0.115 * k - epsilon, y + 0.234 * k - epsilon]])\n .stream(pointStream);\n\n return reset();\n };\n\n albersUsa.fitExtent = function(extent, object) {\n return fitExtent(albersUsa, extent, object);\n };\n\n albersUsa.fitSize = function(size, object) {\n return fitSize(albersUsa, size, object);\n };\n\n albersUsa.fitWidth = function(width, object) {\n return fitWidth(albersUsa, width, object);\n };\n\n albersUsa.fitHeight = function(height, object) {\n return fitHeight(albersUsa, height, object);\n };\n\n function reset() {\n cache = cacheStream = null;\n return albersUsa;\n }\n\n return albersUsa.scale(1070);\n}\n","import {asin, atan2, cos, sin, sqrt} from \"../math.js\";\n\nexport function azimuthalRaw(scale) {\n return function(x, y) {\n var cx = cos(x),\n cy = cos(y),\n k = scale(cx * cy);\n if (k === Infinity) return [2, 0];\n return [\n k * cy * sin(x),\n k * sin(y)\n ];\n }\n}\n\nexport function azimuthalInvert(angle) {\n return function(x, y) {\n var z = sqrt(x * x + y * y),\n c = angle(z),\n sc = sin(c),\n cc = cos(c);\n return [\n atan2(x * sc, z * cc),\n asin(z && y * sc / z)\n ];\n }\n}\n","import {asin, sqrt} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) {\n return sqrt(2 / (1 + cxcy));\n});\n\nazimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) {\n return 2 * asin(z / 2);\n});\n\nexport default function() {\n return projection(azimuthalEqualAreaRaw)\n .scale(124.75)\n .clipAngle(180 - 1e-3);\n}\n","import {acos, sin} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEquidistantRaw = azimuthalRaw(function(c) {\n return (c = acos(c)) && c / sin(c);\n});\n\nazimuthalEquidistantRaw.invert = azimuthalInvert(function(z) {\n return z;\n});\n\nexport default function() {\n return projection(azimuthalEquidistantRaw)\n .scale(79.4188)\n .clipAngle(180 - 1e-3);\n}\n","import {degrees, pi, radians} from \"../math.js\";\nimport {projectionMutator} from \"./index.js\";\n\nexport function conicProjection(projectAt) {\n var phi0 = 0,\n phi1 = pi / 3,\n m = projectionMutator(projectAt),\n p = m(phi0, phi1);\n\n p.parallels = function(_) {\n return arguments.length ? m(phi0 = _[0] * radians, phi1 = _[1] * radians) : [phi0 * degrees, phi1 * degrees];\n };\n\n return p;\n}\n","import {abs, atan, atan2, cos, epsilon, halfPi, log, pi, pow, sign, sin, sqrt, tan} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {mercatorRaw} from \"./mercator.js\";\n\nfunction tany(y) {\n return tan((halfPi + y) / 2);\n}\n\nexport function conicConformalRaw(y0, y1) {\n var cy0 = cos(y0),\n n = y0 === y1 ? sin(y0) : log(cy0 / cos(y1)) / log(tany(y1) / tany(y0)),\n f = cy0 * pow(tany(y0), n) / n;\n\n if (!n) return mercatorRaw;\n\n function project(x, y) {\n if (f > 0) { if (y < -halfPi + epsilon) y = -halfPi + epsilon; }\n else { if (y > halfPi - epsilon) y = halfPi - epsilon; }\n var r = f / pow(tany(y), n);\n return [r * sin(n * x), f - r * cos(n * x)];\n }\n\n project.invert = function(x, y) {\n var fy = f - y, r = sign(n) * sqrt(x * x + fy * fy),\n l = atan2(x, abs(fy)) * sign(fy);\n if (fy * n < 0)\n l -= pi * sign(x) * sign(fy);\n return [l / n, 2 * atan(pow(f / r, 1 / n)) - halfPi];\n };\n\n return project;\n}\n\nexport default function() {\n return conicProjection(conicConformalRaw)\n .scale(109.5)\n .parallels([30, 30]);\n}\n","import {abs, asin, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {cylindricalEqualAreaRaw} from \"./cylindricalEqualArea.js\";\n\nexport function conicEqualAreaRaw(y0, y1) {\n var sy0 = sin(y0), n = (sy0 + sin(y1)) / 2;\n\n // Are the parallels symmetrical around the Equator?\n if (abs(n) < epsilon) return cylindricalEqualAreaRaw(y0);\n\n var c = 1 + sy0 * (2 * n - sy0), r0 = sqrt(c) / n;\n\n function project(x, y) {\n var r = sqrt(c - 2 * n * sin(y)) / n;\n return [r * sin(x *= n), r0 - r * cos(x)];\n }\n\n project.invert = function(x, y) {\n var r0y = r0 - y,\n l = atan2(x, abs(r0y)) * sign(r0y);\n if (r0y * n < 0)\n l -= pi * sign(x) * sign(r0y);\n return [l / n, asin((c - (x * x + r0y * r0y) * n * n) / (2 * n))];\n };\n\n return project;\n}\n\nexport default function() {\n return conicProjection(conicEqualAreaRaw)\n .scale(155.424)\n .center([0, 33.6442]);\n}\n","import {abs, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {equirectangularRaw} from \"./equirectangular.js\";\n\nexport function conicEquidistantRaw(y0, y1) {\n var cy0 = cos(y0),\n n = y0 === y1 ? sin(y0) : (cy0 - cos(y1)) / (y1 - y0),\n g = cy0 / n + y0;\n\n if (abs(n) < epsilon) return equirectangularRaw;\n\n function project(x, y) {\n var gy = g - y, nx = n * x;\n return [gy * sin(nx), g - gy * cos(nx)];\n }\n\n project.invert = function(x, y) {\n var gy = g - y,\n l = atan2(x, abs(gy)) * sign(gy);\n if (gy * n < 0)\n l -= pi * sign(x) * sign(gy);\n return [l / n, g - sign(n) * sqrt(x * x + gy * gy)];\n };\n\n return project;\n}\n\nexport default function() {\n return conicProjection(conicEquidistantRaw)\n .scale(131.154)\n .center([0, 13.9389]);\n}\n","import {asin, cos, sin} from \"../math.js\";\n\nexport function cylindricalEqualAreaRaw(phi0) {\n var cosPhi0 = cos(phi0);\n\n function forward(lambda, phi) {\n return [lambda * cosPhi0, sin(phi) / cosPhi0];\n }\n\n forward.invert = function(x, y) {\n return [x / cosPhi0, asin(y * cosPhi0)];\n };\n\n return forward;\n}\n","import projection from \"./index.js\";\nimport {abs, asin, cos, epsilon2, sin, sqrt} from \"../math.js\";\n\nvar A1 = 1.340264,\n A2 = -0.081106,\n A3 = 0.000893,\n A4 = 0.003796,\n M = sqrt(3) / 2,\n iterations = 12;\n\nexport function equalEarthRaw(lambda, phi) {\n var l = asin(M * sin(phi)), l2 = l * l, l6 = l2 * l2 * l2;\n return [\n lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),\n l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))\n ];\n}\n\nequalEarthRaw.invert = function(x, y) {\n var l = y, l2 = l * l, l6 = l2 * l2 * l2;\n for (var i = 0, delta, fy, fpy; i < iterations; ++i) {\n fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;\n fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);\n l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;\n if (abs(delta) < epsilon2) break;\n }\n return [\n M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l),\n asin(sin(l) / M)\n ];\n};\n\nexport default function() {\n return projection(equalEarthRaw)\n .scale(177.158);\n}\n","import projection from \"./index.js\";\n\nexport function equirectangularRaw(lambda, phi) {\n return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\nexport default function() {\n return projection(equirectangularRaw)\n .scale(152.63);\n}\n","import {default as geoStream} from \"../stream.js\";\nimport boundsStream from \"../path/bounds.js\";\n\nfunction fit(projection, fitBounds, object) {\n var clip = projection.clipExtent && projection.clipExtent();\n projection.scale(150).translate([0, 0]);\n if (clip != null) projection.clipExtent(null);\n geoStream(object, projection.stream(boundsStream));\n fitBounds(boundsStream.result());\n if (clip != null) projection.clipExtent(clip);\n return projection;\n}\n\nexport function fitExtent(projection, extent, object) {\n return fit(projection, function(b) {\n var w = extent[1][0] - extent[0][0],\n h = extent[1][1] - extent[0][1],\n k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n\nexport function fitSize(projection, size, object) {\n return fitExtent(projection, [[0, 0], size], object);\n}\n\nexport function fitWidth(projection, width, object) {\n return fit(projection, function(b) {\n var w = +width,\n k = w / (b[1][0] - b[0][0]),\n x = (w - k * (b[1][0] + b[0][0])) / 2,\n y = -k * b[0][1];\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n\nexport function fitHeight(projection, height, object) {\n return fit(projection, function(b) {\n var h = +height,\n k = h / (b[1][1] - b[0][1]),\n x = -k * b[0][0],\n y = (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n","import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function gnomonicRaw(x, y) {\n var cy = cos(y), k = cos(x) * cy;\n return [cy * sin(x) / k, sin(y) / k];\n}\n\ngnomonicRaw.invert = azimuthalInvert(atan);\n\nexport default function() {\n return projection(gnomonicRaw)\n .scale(144.049)\n .clipAngle(60);\n}\n","import clipRectangle from \"../clip/rectangle.js\";\nimport identity from \"../identity.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport {cos, degrees, radians, sin} from \"../math.js\";\n\nexport default function() {\n var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, // scale, translate and reflect\n alpha = 0, ca, sa, // angle\n x0 = null, y0, x1, y1, // clip extent\n kx = 1, ky = 1,\n transform = transformer({\n point: function(x, y) {\n var p = projection([x, y])\n this.stream.point(p[0], p[1]);\n }\n }),\n postclip = identity,\n cache,\n cacheStream;\n\n function reset() {\n kx = k * sx;\n ky = k * sy;\n cache = cacheStream = null;\n return projection;\n }\n\n function projection (p) {\n var x = p[0] * kx, y = p[1] * ky;\n if (alpha) {\n var t = y * ca - x * sa;\n x = x * ca + y * sa;\n y = t;\n } \n return [x + tx, y + ty];\n }\n projection.invert = function(p) {\n var x = p[0] - tx, y = p[1] - ty;\n if (alpha) {\n var t = y * ca + x * sa;\n x = x * ca - y * sa;\n y = t;\n }\n return [x / kx, y / ky];\n };\n projection.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream));\n };\n projection.postclip = function(_) {\n return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n };\n projection.clipExtent = function(_) {\n return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n projection.scale = function(_) {\n return arguments.length ? (k = +_, reset()) : k;\n };\n projection.translate = function(_) {\n return arguments.length ? (tx = +_[0], ty = +_[1], reset()) : [tx, ty];\n }\n projection.angle = function(_) {\n return arguments.length ? (alpha = _ % 360 * radians, sa = sin(alpha), ca = cos(alpha), reset()) : alpha * degrees;\n };\n projection.reflectX = function(_) {\n return arguments.length ? (sx = _ ? -1 : 1, reset()) : sx < 0;\n };\n projection.reflectY = function(_) {\n return arguments.length ? (sy = _ ? -1 : 1, reset()) : sy < 0;\n };\n projection.fitExtent = function(extent, object) {\n return fitExtent(projection, extent, object);\n };\n projection.fitSize = function(size, object) {\n return fitSize(projection, size, object);\n };\n projection.fitWidth = function(width, object) {\n return fitWidth(projection, width, object);\n };\n projection.fitHeight = function(height, object) {\n return fitHeight(projection, height, object);\n };\n\n return projection;\n}\n","import clipAntimeridian from \"../clip/antimeridian.js\";\nimport clipCircle from \"../clip/circle.js\";\nimport clipRectangle from \"../clip/rectangle.js\";\nimport compose from \"../compose.js\";\nimport identity from \"../identity.js\";\nimport {cos, degrees, radians, sin, sqrt} from \"../math.js\";\nimport {rotateRadians} from \"../rotation.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport resample from \"./resample.js\";\n\nvar transformRadians = transformer({\n point: function(x, y) {\n this.stream.point(x * radians, y * radians);\n }\n});\n\nfunction transformRotate(rotate) {\n return transformer({\n point: function(x, y) {\n var r = rotate(x, y);\n return this.stream.point(r[0], r[1]);\n }\n });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n function transform(x, y) {\n x *= sx; y *= sy;\n return [dx + k * x, dy - k * y];\n }\n transform.invert = function(x, y) {\n return [(x - dx) / k * sx, (dy - y) / k * sy];\n };\n return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n if (!alpha) return scaleTranslate(k, dx, dy, sx, sy);\n var cosAlpha = cos(alpha),\n sinAlpha = sin(alpha),\n a = cosAlpha * k,\n b = sinAlpha * k,\n ai = cosAlpha / k,\n bi = sinAlpha / k,\n ci = (sinAlpha * dy - cosAlpha * dx) / k,\n fi = (sinAlpha * dx + cosAlpha * dy) / k;\n function transform(x, y) {\n x *= sx; y *= sy;\n return [a * x - b * y + dx, dy - b * x - a * y];\n }\n transform.invert = function(x, y) {\n return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n };\n return transform;\n}\n\nexport default function projection(project) {\n return projectionMutator(function() { return project; })();\n}\n\nexport function projectionMutator(projectAt) {\n var project,\n k = 150, // scale\n x = 480, y = 250, // translate\n lambda = 0, phi = 0, // center\n deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n alpha = 0, // post-rotate angle\n sx = 1, // reflectX\n sy = 1, // reflectX\n theta = null, preclip = clipAntimeridian, // pre-clip angle\n x0 = null, y0, x1, y1, postclip = identity, // post-clip extent\n delta2 = 0.5, // precision\n projectResample,\n projectTransform,\n projectRotateTransform,\n cache,\n cacheStream;\n\n function projection(point) {\n return projectRotateTransform(point[0] * radians, point[1] * radians);\n }\n\n function invert(point) {\n point = projectRotateTransform.invert(point[0], point[1]);\n return point && [point[0] * degrees, point[1] * degrees];\n }\n\n projection.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n };\n\n projection.preclip = function(_) {\n return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n };\n\n projection.postclip = function(_) {\n return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n };\n\n projection.clipAngle = function(_) {\n return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n };\n\n projection.clipExtent = function(_) {\n return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n projection.scale = function(_) {\n return arguments.length ? (k = +_, recenter()) : k;\n };\n\n projection.translate = function(_) {\n return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n };\n\n projection.center = function(_) {\n return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n };\n\n projection.rotate = function(_) {\n return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n };\n\n projection.angle = function(_) {\n return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees;\n };\n\n projection.reflectX = function(_) {\n return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n };\n\n projection.reflectY = function(_) {\n return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n };\n\n projection.precision = function(_) {\n return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n };\n\n projection.fitExtent = function(extent, object) {\n return fitExtent(projection, extent, object);\n };\n\n projection.fitSize = function(size, object) {\n return fitSize(projection, size, object);\n };\n\n projection.fitWidth = function(width, object) {\n return fitWidth(projection, width, object);\n };\n\n projection.fitHeight = function(height, object) {\n return fitHeight(projection, height, object);\n };\n\n function recenter() {\n var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha);\n rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);\n projectTransform = compose(project, transform);\n projectRotateTransform = compose(rotate, projectTransform);\n projectResample = resample(projectTransform, delta2);\n return reset();\n }\n\n function reset() {\n cache = cacheStream = null;\n return projection;\n }\n\n return function() {\n project = projectAt.apply(this, arguments);\n projection.invert = project.invert && invert;\n return recenter();\n };\n}\n","import {atan, exp, halfPi, log, pi, tan, tau} from \"../math.js\";\nimport rotation from \"../rotation.js\";\nimport projection from \"./index.js\";\n\nexport function mercatorRaw(lambda, phi) {\n return [lambda, log(tan((halfPi + phi) / 2))];\n}\n\nmercatorRaw.invert = function(x, y) {\n return [x, 2 * atan(exp(y)) - halfPi];\n};\n\nexport default function() {\n return mercatorProjection(mercatorRaw)\n .scale(961 / tau);\n}\n\nexport function mercatorProjection(project) {\n var m = projection(project),\n center = m.center,\n scale = m.scale,\n translate = m.translate,\n clipExtent = m.clipExtent,\n x0 = null, y0, x1, y1; // clip extent\n\n m.scale = function(_) {\n return arguments.length ? (scale(_), reclip()) : scale();\n };\n\n m.translate = function(_) {\n return arguments.length ? (translate(_), reclip()) : translate();\n };\n\n m.center = function(_) {\n return arguments.length ? (center(_), reclip()) : center();\n };\n\n m.clipExtent = function(_) {\n return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n function reclip() {\n var k = pi * scale(),\n t = m(rotation(m.rotate()).invert([0, 0]));\n return clipExtent(x0 == null\n ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw\n ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]\n : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n }\n\n return reclip();\n}\n","import projection from \"./index.js\";\nimport {abs, epsilon} from \"../math.js\";\n\nexport function naturalEarth1Raw(lambda, phi) {\n var phi2 = phi * phi, phi4 = phi2 * phi2;\n return [\n lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))),\n phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4)))\n ];\n}\n\nnaturalEarth1Raw.invert = function(x, y) {\n var phi = y, i = 25, delta;\n do {\n var phi2 = phi * phi, phi4 = phi2 * phi2;\n phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) /\n (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4)));\n } while (abs(delta) > epsilon && --i > 0);\n return [\n x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))),\n phi\n ];\n};\n\nexport default function() {\n return projection(naturalEarth1Raw)\n .scale(175.295);\n}\n","import {asin, cos, epsilon, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function orthographicRaw(x, y) {\n return [cos(y) * sin(x), sin(y)];\n}\n\northographicRaw.invert = azimuthalInvert(asin);\n\nexport default function() {\n return projection(orthographicRaw)\n .scale(249.5)\n .clipAngle(90 + epsilon);\n}\n","import {cartesian} from \"../cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math.js\";\nimport {transformer} from \"../transform.js\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n return transformer({\n point: function(x, y) {\n x = project(x, y);\n this.stream.point(x[0], x[1]);\n }\n });\n}\n\nfunction resample(project, delta2) {\n\n function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n var dx = x1 - x0,\n dy = y1 - y0,\n d2 = dx * dx + dy * dy;\n if (d2 > 4 * delta2 && depth--) {\n var a = a0 + a1,\n b = b0 + b1,\n c = c0 + c1,\n m = sqrt(a * a + b * b + c * c),\n phi2 = asin(c /= m),\n lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n p = project(lambda2, phi2),\n x2 = p[0],\n y2 = p[1],\n dx2 = x2 - x0,\n dy2 = y2 - y0,\n dz = dy * dx2 - dx * dy2;\n if (dz * dz / d2 > delta2 // perpendicular projected distance\n || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n stream.point(x2, y2);\n resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n }\n }\n }\n return function(stream) {\n var lambda00, x00, y00, a00, b00, c00, // first point\n lambda0, x0, y0, a0, b0, c0; // previous point\n\n var resampleStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n };\n\n function point(x, y) {\n x = project(x, y);\n stream.point(x[0], x[1]);\n }\n\n function lineStart() {\n x0 = NaN;\n resampleStream.point = linePoint;\n stream.lineStart();\n }\n\n function linePoint(lambda, phi) {\n var c = cartesian([lambda, phi]), p = project(lambda, phi);\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n stream.point(x0, y0);\n }\n\n function lineEnd() {\n resampleStream.point = point;\n stream.lineEnd();\n }\n\n function ringStart() {\n lineStart();\n resampleStream.point = ringPoint;\n resampleStream.lineEnd = ringEnd;\n }\n\n function ringPoint(lambda, phi) {\n linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n resampleStream.point = linePoint;\n }\n\n function ringEnd() {\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n resampleStream.lineEnd = lineEnd;\n lineEnd();\n }\n\n return resampleStream;\n };\n}\n","import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function stereographicRaw(x, y) {\n var cy = cos(y), k = 1 + cos(x) * cy;\n return [cy * sin(x) / k, sin(y) / k];\n}\n\nstereographicRaw.invert = azimuthalInvert(function(z) {\n return 2 * atan(z);\n});\n\nexport default function() {\n return projection(stereographicRaw)\n .scale(250)\n .clipAngle(142);\n}\n","import {atan, exp, halfPi, log, tan} from \"../math.js\";\nimport {mercatorProjection} from \"./mercator.js\";\n\nexport function transverseMercatorRaw(lambda, phi) {\n return [log(tan((halfPi + phi) / 2)), -lambda];\n}\n\ntransverseMercatorRaw.invert = function(x, y) {\n return [-y, 2 * atan(exp(x)) - halfPi];\n};\n\nexport default function() {\n var m = mercatorProjection(transverseMercatorRaw),\n center = m.center,\n rotate = m.rotate;\n\n m.center = function(_) {\n return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);\n };\n\n m.rotate = function(_) {\n return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);\n };\n\n return rotate([0, 0, 90])\n .scale(159.155);\n}\n","import compose from \"./compose.js\";\nimport {abs, asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math.js\";\n\nfunction rotationIdentity(lambda, phi) {\n if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n return [lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n : rotationLambda(deltaLambda))\n : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n return function(lambda, phi) {\n lambda += deltaLambda;\n if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n return [lambda, phi];\n };\n}\n\nfunction rotationLambda(deltaLambda) {\n var rotation = forwardRotationLambda(deltaLambda);\n rotation.invert = forwardRotationLambda(-deltaLambda);\n return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n var cosDeltaPhi = cos(deltaPhi),\n sinDeltaPhi = sin(deltaPhi),\n cosDeltaGamma = cos(deltaGamma),\n sinDeltaGamma = sin(deltaGamma);\n\n function rotation(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaPhi + x * sinDeltaPhi;\n return [\n atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n asin(k * cosDeltaGamma + y * sinDeltaGamma)\n ];\n }\n\n rotation.invert = function(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaGamma - y * sinDeltaGamma;\n return [\n atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n asin(k * cosDeltaPhi - x * sinDeltaPhi)\n ];\n };\n\n return rotation;\n}\n\nexport default function(rotate) {\n rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n function forward(coordinates) {\n coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n }\n\n forward.invert = function(coordinates) {\n coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n };\n\n return forward;\n}\n","function streamGeometry(geometry, stream) {\n if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n streamGeometryType[geometry.type](geometry, stream);\n }\n}\n\nvar streamObjectType = {\n Feature: function(object, stream) {\n streamGeometry(object.geometry, stream);\n },\n FeatureCollection: function(object, stream) {\n var features = object.features, i = -1, n = features.length;\n while (++i < n) streamGeometry(features[i].geometry, stream);\n }\n};\n\nvar streamGeometryType = {\n Sphere: function(object, stream) {\n stream.sphere();\n },\n Point: function(object, stream) {\n object = object.coordinates;\n stream.point(object[0], object[1], object[2]);\n },\n MultiPoint: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n },\n LineString: function(object, stream) {\n streamLine(object.coordinates, stream, 0);\n },\n MultiLineString: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamLine(coordinates[i], stream, 0);\n },\n Polygon: function(object, stream) {\n streamPolygon(object.coordinates, stream);\n },\n MultiPolygon: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamPolygon(coordinates[i], stream);\n },\n GeometryCollection: function(object, stream) {\n var geometries = object.geometries, i = -1, n = geometries.length;\n while (++i < n) streamGeometry(geometries[i], stream);\n }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n var i = -1, n = coordinates.length - closed, coordinate;\n stream.lineStart();\n while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n var i = -1, n = coordinates.length;\n stream.polygonStart();\n while (++i < n) streamLine(coordinates[i], stream, 1);\n stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n if (object && streamObjectType.hasOwnProperty(object.type)) {\n streamObjectType[object.type](object, stream);\n } else {\n streamGeometry(object, stream);\n }\n}\n","export default function(methods) {\n return {\n stream: transformer(methods)\n };\n}\n\nexport function transformer(methods) {\n return function(stream) {\n var s = new TransformStream;\n for (var key in methods) s[key] = methods[key];\n s.stream = stream;\n return s;\n };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n constructor: TransformStream,\n point: function(x, y) { this.stream.point(x, y); },\n sphere: function() { this.stream.sphere(); },\n lineStart: function() { this.stream.lineStart(); },\n lineEnd: function() { this.stream.lineEnd(); },\n polygonStart: function() { this.stream.polygonStart(); },\n polygonEnd: function() { this.stream.polygonEnd(); }\n};\n","export function optional(f) {\n return f == null ? null : required(f);\n}\n\nexport function required(f) {\n if (typeof f !== \"function\") throw new Error;\n return f;\n}\n","export default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n\nexport function shuffle(array, random) {\n let m = array.length,\n t,\n i;\n\n while (m) {\n i = random() * m-- | 0;\n t = array[m];\n array[m] = array[i];\n array[i] = t;\n }\n\n return array;\n}\n","function defaultSeparation(a, b) {\n return a.parent === b.parent ? 1 : 2;\n}\n\nfunction meanX(children) {\n return children.reduce(meanXReduce, 0) / children.length;\n}\n\nfunction meanXReduce(x, c) {\n return x + c.x;\n}\n\nfunction maxY(children) {\n return 1 + children.reduce(maxYReduce, 0);\n}\n\nfunction maxYReduce(y, c) {\n return Math.max(y, c.y);\n}\n\nfunction leafLeft(node) {\n var children;\n while (children = node.children) node = children[0];\n return node;\n}\n\nfunction leafRight(node) {\n var children;\n while (children = node.children) node = children[children.length - 1];\n return node;\n}\n\nexport default function() {\n var separation = defaultSeparation,\n dx = 1,\n dy = 1,\n nodeSize = false;\n\n function cluster(root) {\n var previousNode,\n x = 0;\n\n // First walk, computing the initial x & y values.\n root.eachAfter(function(node) {\n var children = node.children;\n if (children) {\n node.x = meanX(children);\n node.y = maxY(children);\n } else {\n node.x = previousNode ? x += separation(node, previousNode) : 0;\n node.y = 0;\n previousNode = node;\n }\n });\n\n var left = leafLeft(root),\n right = leafRight(root),\n x0 = left.x - separation(left, right) / 2,\n x1 = right.x + separation(right, left) / 2;\n\n // Second walk, normalizing x & y to the desired size.\n return root.eachAfter(nodeSize ? function(node) {\n node.x = (node.x - root.x) * dx;\n node.y = (root.y - node.y) * dy;\n } : function(node) {\n node.x = (node.x - x0) / (x1 - x0) * dx;\n node.y = (1 - (root.y ? node.y / root.y : 1)) * dy;\n });\n }\n\n cluster.separation = function(x) {\n return arguments.length ? (separation = x, cluster) : separation;\n };\n\n cluster.size = function(x) {\n return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]);\n };\n\n cluster.nodeSize = function(x) {\n return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null);\n };\n\n return cluster;\n}\n","export function constantZero() {\n return 0;\n}\n\nexport default function(x) {\n return function() {\n return x;\n };\n}\n","export default function() {\n var node = this, nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\n}\n","function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;\n else while (--i >= 0) sum += children[i].value;\n node.value = sum;\n}\n\nexport default function() {\n return this.eachAfter(count);\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], next = [], children, i, n, index = -1;\n while (node = nodes.pop()) {\n next.push(node);\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n }\n while (node = next.pop()) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], children, i, index = -1;\n while (node = nodes.pop()) {\n callback.call(that, node, ++index, this);\n if (children = node.children) {\n for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n }\n return this;\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n if (callback.call(that, node, ++index, this)) {\n return node;\n }\n }\n}\n","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_find from \"./find.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nimport node_iterator from \"./iterator.js\";\n\nexport default function hierarchy(data, children) {\n if (data instanceof Map) {\n data = [undefined, data];\n if (children === undefined) children = mapChildren;\n } else if (children === undefined) {\n children = objectChildren;\n }\n\n var root = new Node(data),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n\n while (node = nodes.pop()) {\n if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n node.children = childs;\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = childs[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n return d.children;\n}\n\nfunction mapChildren(d) {\n return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n if (node.data.value !== undefined) node.value = node.data.value;\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n do node.height = height;\n while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n this.data = data;\n this.depth =\n this.height = 0;\n this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n find: node_find,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy,\n [Symbol.iterator]: node_iterator\n};\n","export default function*() {\n var node = this, current, next = [node], children, i, n;\n do {\n current = next.reverse(), next = [];\n while (node = current.pop()) {\n yield node;\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n }\n } while (next.length);\n}\n","export default function() {\n var leaves = [];\n this.eachBefore(function(node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}\n","export default function() {\n var root = this, links = [];\n root.each(function(node) {\n if (node !== root) { // Don’t include the root’s parent, if any.\n links.push({source: node.parent, target: node});\n }\n });\n return links;\n}\n","export default function(end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n var k = nodes.length;\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n return c;\n}\n","export default function(compare) {\n return this.eachBefore(function(node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}\n","export default function(value) {\n return this.eachAfter(function(node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n while (--i >= 0) sum += children[i].value;\n node.value = sum;\n });\n}\n","export {default as cluster} from \"./cluster.js\";\nexport {default as hierarchy, Node} from \"./hierarchy/index.js\";\nexport {default as pack} from \"./pack/index.js\";\nexport {default as packSiblings} from \"./pack/siblings.js\";\nexport {default as packEnclose} from \"./pack/enclose.js\";\nexport {default as partition} from \"./partition.js\";\nexport {default as stratify} from \"./stratify.js\";\nexport {default as tree} from \"./tree.js\";\nexport {default as treemap} from \"./treemap/index.js\";\nexport {default as treemapBinary} from \"./treemap/binary.js\";\nexport {default as treemapDice} from \"./treemap/dice.js\";\nexport {default as treemapSlice} from \"./treemap/slice.js\";\nexport {default as treemapSliceDice} from \"./treemap/sliceDice.js\";\nexport {default as treemapSquarify} from \"./treemap/squarify.js\";\nexport {default as treemapResquarify} from \"./treemap/resquarify.js\";\n","// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst a = 1664525;\nconst c = 1013904223;\nconst m = 4294967296; // 2^32\n\nexport default function() {\n let s = 1;\n return () => (s = (a * s + c) % m) / m;\n}\n","import {shuffle} from \"../array.js\";\nimport lcg from \"../lcg.js\";\n\nexport default function(circles) {\n return packEncloseRandom(circles, lcg());\n}\n\nexport function packEncloseRandom(circles, random) {\n var i = 0, n = (circles = shuffle(Array.from(circles), random)).length, B = [], p, e;\n\n while (i < n) {\n p = circles[i];\n if (e && enclosesWeak(e, p)) ++i;\n else e = encloseBasis(B = extendBasis(B, p)), i = 0;\n }\n\n return e;\n}\n\nfunction extendBasis(B, p) {\n var i, j;\n\n if (enclosesWeakAll(p, B)) return [p];\n\n // If we get here then B must have at least one element.\n for (i = 0; i < B.length; ++i) {\n if (enclosesNot(p, B[i])\n && enclosesWeakAll(encloseBasis2(B[i], p), B)) {\n return [B[i], p];\n }\n }\n\n // If we get here then B must have at least two elements.\n for (i = 0; i < B.length - 1; ++i) {\n for (j = i + 1; j < B.length; ++j) {\n if (enclosesNot(encloseBasis2(B[i], B[j]), p)\n && enclosesNot(encloseBasis2(B[i], p), B[j])\n && enclosesNot(encloseBasis2(B[j], p), B[i])\n && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {\n return [B[i], B[j], p];\n }\n }\n }\n\n // If we get here then something is very wrong.\n throw new Error;\n}\n\nfunction enclosesNot(a, b) {\n var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y;\n return dr < 0 || dr * dr < dx * dx + dy * dy;\n}\n\nfunction enclosesWeak(a, b) {\n var dr = a.r - b.r + Math.max(a.r, b.r, 1) * 1e-9, dx = b.x - a.x, dy = b.y - a.y;\n return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction enclosesWeakAll(a, B) {\n for (var i = 0; i < B.length; ++i) {\n if (!enclosesWeak(a, B[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction encloseBasis(B) {\n switch (B.length) {\n case 1: return encloseBasis1(B[0]);\n case 2: return encloseBasis2(B[0], B[1]);\n case 3: return encloseBasis3(B[0], B[1], B[2]);\n }\n}\n\nfunction encloseBasis1(a) {\n return {\n x: a.x,\n y: a.y,\n r: a.r\n };\n}\n\nfunction encloseBasis2(a, b) {\n var x1 = a.x, y1 = a.y, r1 = a.r,\n x2 = b.x, y2 = b.y, r2 = b.r,\n x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1,\n l = Math.sqrt(x21 * x21 + y21 * y21);\n return {\n x: (x1 + x2 + x21 / l * r21) / 2,\n y: (y1 + y2 + y21 / l * r21) / 2,\n r: (l + r1 + r2) / 2\n };\n}\n\nfunction encloseBasis3(a, b, c) {\n var x1 = a.x, y1 = a.y, r1 = a.r,\n x2 = b.x, y2 = b.y, r2 = b.r,\n x3 = c.x, y3 = c.y, r3 = c.r,\n a2 = x1 - x2,\n a3 = x1 - x3,\n b2 = y1 - y2,\n b3 = y1 - y3,\n c2 = r2 - r1,\n c3 = r3 - r1,\n d1 = x1 * x1 + y1 * y1 - r1 * r1,\n d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2,\n d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3,\n ab = a3 * b2 - a2 * b3,\n xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1,\n xb = (b3 * c2 - b2 * c3) / ab,\n ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1,\n yb = (a2 * c3 - a3 * c2) / ab,\n A = xb * xb + yb * yb - 1,\n B = 2 * (r1 + xa * xb + ya * yb),\n C = xa * xa + ya * ya - r1 * r1,\n r = -(Math.abs(A) > 1e-6 ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);\n return {\n x: x1 + xa + xb * r,\n y: y1 + ya + yb * r,\n r: r\n };\n}\n","import {optional} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\nimport lcg from \"../lcg.js\";\nimport {packSiblingsRandom} from \"./siblings.js\";\n\nfunction defaultRadius(d) {\n return Math.sqrt(d.value);\n}\n\nexport default function() {\n var radius = null,\n dx = 1,\n dy = 1,\n padding = constantZero;\n\n function pack(root) {\n const random = lcg();\n root.x = dx / 2, root.y = dy / 2;\n if (radius) {\n root.eachBefore(radiusLeaf(radius))\n .eachAfter(packChildrenRandom(padding, 0.5, random))\n .eachBefore(translateChild(1));\n } else {\n root.eachBefore(radiusLeaf(defaultRadius))\n .eachAfter(packChildrenRandom(constantZero, 1, random))\n .eachAfter(packChildrenRandom(padding, root.r / Math.min(dx, dy), random))\n .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));\n }\n return root;\n }\n\n pack.radius = function(x) {\n return arguments.length ? (radius = optional(x), pack) : radius;\n };\n\n pack.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];\n };\n\n pack.padding = function(x) {\n return arguments.length ? (padding = typeof x === \"function\" ? x : constant(+x), pack) : padding;\n };\n\n return pack;\n}\n\nfunction radiusLeaf(radius) {\n return function(node) {\n if (!node.children) {\n node.r = Math.max(0, +radius(node) || 0);\n }\n };\n}\n\nfunction packChildrenRandom(padding, k, random) {\n return function(node) {\n if (children = node.children) {\n var children,\n i,\n n = children.length,\n r = padding(node) * k || 0,\n e;\n\n if (r) for (i = 0; i < n; ++i) children[i].r += r;\n e = packSiblingsRandom(children, random);\n if (r) for (i = 0; i < n; ++i) children[i].r -= r;\n node.r = e + r;\n }\n };\n}\n\nfunction translateChild(k) {\n return function(node) {\n var parent = node.parent;\n node.r *= k;\n if (parent) {\n node.x = parent.x + k * node.x;\n node.y = parent.y + k * node.y;\n }\n };\n}\n","import array from \"../array.js\";\nimport lcg from \"../lcg.js\";\nimport {packEncloseRandom} from \"./enclose.js\";\n\nfunction place(b, a, c) {\n var dx = b.x - a.x, x, a2,\n dy = b.y - a.y, y, b2,\n d2 = dx * dx + dy * dy;\n if (d2) {\n a2 = a.r + c.r, a2 *= a2;\n b2 = b.r + c.r, b2 *= b2;\n if (a2 > b2) {\n x = (d2 + b2 - a2) / (2 * d2);\n y = Math.sqrt(Math.max(0, b2 / d2 - x * x));\n c.x = b.x - x * dx - y * dy;\n c.y = b.y - x * dy + y * dx;\n } else {\n x = (d2 + a2 - b2) / (2 * d2);\n y = Math.sqrt(Math.max(0, a2 / d2 - x * x));\n c.x = a.x + x * dx - y * dy;\n c.y = a.y + x * dy + y * dx;\n }\n } else {\n c.x = a.x + c.r;\n c.y = a.y;\n }\n}\n\nfunction intersects(a, b) {\n var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y;\n return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction score(node) {\n var a = node._,\n b = node.next._,\n ab = a.r + b.r,\n dx = (a.x * b.r + b.x * a.r) / ab,\n dy = (a.y * b.r + b.y * a.r) / ab;\n return dx * dx + dy * dy;\n}\n\nfunction Node(circle) {\n this._ = circle;\n this.next = null;\n this.previous = null;\n}\n\nexport function packSiblingsRandom(circles, random) {\n if (!(n = (circles = array(circles)).length)) return 0;\n\n var a, b, c, n, aa, ca, i, j, k, sj, sk;\n\n // Place the first circle.\n a = circles[0], a.x = 0, a.y = 0;\n if (!(n > 1)) return a.r;\n\n // Place the second circle.\n b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;\n if (!(n > 2)) return a.r + b.r;\n\n // Place the third circle.\n place(b, a, c = circles[2]);\n\n // Initialize the front-chain using the first three circles a, b and c.\n a = new Node(a), b = new Node(b), c = new Node(c);\n a.next = c.previous = b;\n b.next = a.previous = c;\n c.next = b.previous = a;\n\n // Attempt to place each remaining circle…\n pack: for (i = 3; i < n; ++i) {\n place(a._, b._, c = circles[i]), c = new Node(c);\n\n // Find the closest intersecting circle on the front-chain, if any.\n // “Closeness” is determined by linear distance along the front-chain.\n // “Ahead” or “behind” is likewise determined by linear distance.\n j = b.next, k = a.previous, sj = b._.r, sk = a._.r;\n do {\n if (sj <= sk) {\n if (intersects(j._, c._)) {\n b = j, a.next = b, b.previous = a, --i;\n continue pack;\n }\n sj += j._.r, j = j.next;\n } else {\n if (intersects(k._, c._)) {\n a = k, a.next = b, b.previous = a, --i;\n continue pack;\n }\n sk += k._.r, k = k.previous;\n }\n } while (j !== k.next);\n\n // Success! Insert the new circle c between a and b.\n c.previous = a, c.next = b, a.next = b.previous = b = c;\n\n // Compute the new closest circle pair to the centroid.\n aa = score(a);\n while ((c = c.next) !== b) {\n if ((ca = score(c)) < aa) {\n a = c, aa = ca;\n }\n }\n b = a.next;\n }\n\n // Compute the enclosing circle of the front chain.\n a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = packEncloseRandom(a, random);\n\n // Translate the circles to put the enclosing circle around the origin.\n for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y;\n\n return c.r;\n}\n\nexport default function(circles) {\n packSiblingsRandom(circles, lcg());\n return circles;\n}\n","import roundNode from \"./treemap/round.js\";\nimport treemapDice from \"./treemap/dice.js\";\n\nexport default function() {\n var dx = 1,\n dy = 1,\n padding = 0,\n round = false;\n\n function partition(root) {\n var n = root.height + 1;\n root.x0 =\n root.y0 = padding;\n root.x1 = dx;\n root.y1 = dy / n;\n root.eachBefore(positionNode(dy, n));\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(dy, n) {\n return function(node) {\n if (node.children) {\n treemapDice(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n);\n }\n var x0 = node.x0,\n y0 = node.y0,\n x1 = node.x1 - padding,\n y1 = node.y1 - padding;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n };\n }\n\n partition.round = function(x) {\n return arguments.length ? (round = !!x, partition) : round;\n };\n\n partition.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy];\n };\n\n partition.padding = function(x) {\n return arguments.length ? (padding = +x, partition) : padding;\n };\n\n return partition;\n}\n","import {optional} from \"./accessors.js\";\nimport {Node, computeHeight} from \"./hierarchy/index.js\";\n\nvar preroot = {depth: -1},\n ambiguous = {},\n imputed = {};\n\nfunction defaultId(d) {\n return d.id;\n}\n\nfunction defaultParentId(d) {\n return d.parentId;\n}\n\nexport default function() {\n var id = defaultId,\n parentId = defaultParentId,\n path;\n\n function stratify(data) {\n var nodes = Array.from(data),\n currentId = id,\n currentParentId = parentId,\n n,\n d,\n i,\n root,\n parent,\n node,\n nodeId,\n nodeKey,\n nodeByKey = new Map;\n\n if (path != null) {\n const I = nodes.map((d, i) => normalize(path(d, i, data)));\n const P = I.map(parentof);\n const S = new Set(I).add(\"\");\n for (const i of P) {\n if (!S.has(i)) {\n S.add(i);\n I.push(i);\n P.push(parentof(i));\n nodes.push(imputed);\n }\n }\n currentId = (_, i) => I[i];\n currentParentId = (_, i) => P[i];\n }\n\n for (i = 0, n = nodes.length; i < n; ++i) {\n d = nodes[i], node = nodes[i] = new Node(d);\n if ((nodeId = currentId(d, i, data)) != null && (nodeId += \"\")) {\n nodeKey = node.id = nodeId;\n nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node);\n }\n if ((nodeId = currentParentId(d, i, data)) != null && (nodeId += \"\")) {\n node.parent = nodeId;\n }\n }\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (nodeId = node.parent) {\n parent = nodeByKey.get(nodeId);\n if (!parent) throw new Error(\"missing: \" + nodeId);\n if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n if (parent.children) parent.children.push(node);\n else parent.children = [node];\n node.parent = parent;\n } else {\n if (root) throw new Error(\"multiple roots\");\n root = node;\n }\n }\n\n if (!root) throw new Error(\"no root\");\n\n // When imputing internal nodes, only introduce roots if needed.\n // Then replace the imputed marker data with null.\n if (path != null) {\n while (root.data === imputed && root.children.length === 1) {\n root = root.children[0], --n;\n }\n for (let i = nodes.length - 1; i >= 0; --i) {\n node = nodes[i];\n if (node.data !== imputed) break;\n node.data = null;\n }\n }\n\n root.parent = preroot;\n root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight);\n root.parent = null;\n if (n > 0) throw new Error(\"cycle\");\n\n return root;\n }\n\n stratify.id = function(x) {\n return arguments.length ? (id = optional(x), stratify) : id;\n };\n\n stratify.parentId = function(x) {\n return arguments.length ? (parentId = optional(x), stratify) : parentId;\n };\n\n stratify.path = function(x) {\n return arguments.length ? (path = optional(x), stratify) : path;\n };\n\n return stratify;\n}\n\n// To normalize a path, we coerce to a string, strip the trailing slash if any\n// (as long as the trailing slash is not immediately preceded by another slash),\n// and add leading slash if missing.\nfunction normalize(path) {\n path = `${path}`;\n let i = path.length;\n if (slash(path, i - 1) && !slash(path, i - 2)) path = path.slice(0, -1);\n return path[0] === \"/\" ? path : `/${path}`;\n}\n\n// Walk backwards to find the first slash that is not the leading slash, e.g.:\n// \"/foo/bar\" ⇥ \"/foo\", \"/foo\" ⇥ \"/\", \"/\" ↦ \"\". (The root is special-cased\n// because the id of the root must be a truthy value.)\nfunction parentof(path) {\n let i = path.length;\n if (i < 2) return \"\";\n while (--i > 1) if (slash(path, i)) break;\n return path.slice(0, i);\n}\n\n// Slashes can be escaped; to determine whether a slash is a path delimiter, we\n// count the number of preceding backslashes escaping the forward slash: an odd\n// number indicates an escaped forward slash.\nfunction slash(path, i) {\n if (path[i] === \"/\") {\n let k = 0;\n while (i > 0 && path[--i] === \"\\\\\") ++k;\n if ((k & 1) === 0) return true;\n }\n return false;\n}\n","import {Node} from \"./hierarchy/index.js\";\n\nfunction defaultSeparation(a, b) {\n return a.parent === b.parent ? 1 : 2;\n}\n\n// function radialSeparation(a, b) {\n// return (a.parent === b.parent ? 1 : 2) / a.depth;\n// }\n\n// This function is used to traverse the left contour of a subtree (or\n// subforest). It returns the successor of v on this contour. This successor is\n// either given by the leftmost child of v or by the thread of v. The function\n// returns null if and only if v is on the highest level of its subtree.\nfunction nextLeft(v) {\n var children = v.children;\n return children ? children[0] : v.t;\n}\n\n// This function works analogously to nextLeft.\nfunction nextRight(v) {\n var children = v.children;\n return children ? children[children.length - 1] : v.t;\n}\n\n// Shifts the current subtree rooted at w+. This is done by increasing\n// prelim(w+) and mod(w+) by shift.\nfunction moveSubtree(wm, wp, shift) {\n var change = shift / (wp.i - wm.i);\n wp.c -= change;\n wp.s += shift;\n wm.c += change;\n wp.z += shift;\n wp.m += shift;\n}\n\n// All other shifts, applied to the smaller subtrees between w- and w+, are\n// performed by this function. To prepare the shifts, we have to adjust\n// change(w+), shift(w+), and change(w-).\nfunction executeShifts(v) {\n var shift = 0,\n change = 0,\n children = v.children,\n i = children.length,\n w;\n while (--i >= 0) {\n w = children[i];\n w.z += shift;\n w.m += shift;\n shift += w.s + (change += w.c);\n }\n}\n\n// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,\n// returns the specified (default) ancestor.\nfunction nextAncestor(vim, v, ancestor) {\n return vim.a.parent === v.parent ? vim.a : ancestor;\n}\n\nfunction TreeNode(node, i) {\n this._ = node;\n this.parent = null;\n this.children = null;\n this.A = null; // default ancestor\n this.a = this; // ancestor\n this.z = 0; // prelim\n this.m = 0; // mod\n this.c = 0; // change\n this.s = 0; // shift\n this.t = null; // thread\n this.i = i; // number\n}\n\nTreeNode.prototype = Object.create(Node.prototype);\n\nfunction treeRoot(root) {\n var tree = new TreeNode(root, 0),\n node,\n nodes = [tree],\n child,\n children,\n i,\n n;\n\n while (node = nodes.pop()) {\n if (children = node._.children) {\n node.children = new Array(n = children.length);\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = node.children[i] = new TreeNode(children[i], i));\n child.parent = node;\n }\n }\n }\n\n (tree.parent = new TreeNode(null, 0)).children = [tree];\n return tree;\n}\n\n// Node-link tree diagram using the Reingold-Tilford \"tidy\" algorithm\nexport default function() {\n var separation = defaultSeparation,\n dx = 1,\n dy = 1,\n nodeSize = null;\n\n function tree(root) {\n var t = treeRoot(root);\n\n // Compute the layout using Buchheim et al.’s algorithm.\n t.eachAfter(firstWalk), t.parent.m = -t.z;\n t.eachBefore(secondWalk);\n\n // If a fixed node size is specified, scale x and y.\n if (nodeSize) root.eachBefore(sizeNode);\n\n // If a fixed tree size is specified, scale x and y based on the extent.\n // Compute the left-most, right-most, and depth-most nodes for extents.\n else {\n var left = root,\n right = root,\n bottom = root;\n root.eachBefore(function(node) {\n if (node.x < left.x) left = node;\n if (node.x > right.x) right = node;\n if (node.depth > bottom.depth) bottom = node;\n });\n var s = left === right ? 1 : separation(left, right) / 2,\n tx = s - left.x,\n kx = dx / (right.x + s + tx),\n ky = dy / (bottom.depth || 1);\n root.eachBefore(function(node) {\n node.x = (node.x + tx) * kx;\n node.y = node.depth * ky;\n });\n }\n\n return root;\n }\n\n // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is\n // applied recursively to the children of v, as well as the function\n // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the\n // node v is placed to the midpoint of its outermost children.\n function firstWalk(v) {\n var children = v.children,\n siblings = v.parent.children,\n w = v.i ? siblings[v.i - 1] : null;\n if (children) {\n executeShifts(v);\n var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n if (w) {\n v.z = w.z + separation(v._, w._);\n v.m = v.z - midpoint;\n } else {\n v.z = midpoint;\n }\n } else if (w) {\n v.z = w.z + separation(v._, w._);\n }\n v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n }\n\n // Computes all real x-coordinates by summing up the modifiers recursively.\n function secondWalk(v) {\n v._.x = v.z + v.parent.m;\n v.m += v.parent.m;\n }\n\n // The core of the algorithm. Here, a new subtree is combined with the\n // previous subtrees. Threads are used to traverse the inside and outside\n // contours of the left and right subtree up to the highest common level. The\n // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the\n // superscript o means outside and i means inside, the subscript - means left\n // subtree and + means right subtree. For summing up the modifiers along the\n // contour, we use respective variables si+, si-, so-, and so+. Whenever two\n // nodes of the inside contours conflict, we compute the left one of the\n // greatest uncommon ancestors using the function ANCESTOR and call MOVE\n // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.\n // Finally, we add a new thread (if necessary).\n function apportion(v, w, ancestor) {\n if (w) {\n var vip = v,\n vop = v,\n vim = w,\n vom = vip.parent.children[0],\n sip = vip.m,\n sop = vop.m,\n sim = vim.m,\n som = vom.m,\n shift;\n while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {\n vom = nextLeft(vom);\n vop = nextRight(vop);\n vop.a = v;\n shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n if (shift > 0) {\n moveSubtree(nextAncestor(vim, v, ancestor), v, shift);\n sip += shift;\n sop += shift;\n }\n sim += vim.m;\n sip += vip.m;\n som += vom.m;\n sop += vop.m;\n }\n if (vim && !nextRight(vop)) {\n vop.t = vim;\n vop.m += sim - sop;\n }\n if (vip && !nextLeft(vom)) {\n vom.t = vip;\n vom.m += sip - som;\n ancestor = v;\n }\n }\n return ancestor;\n }\n\n function sizeNode(node) {\n node.x *= dx;\n node.y = node.depth * dy;\n }\n\n tree.separation = function(x) {\n return arguments.length ? (separation = x, tree) : separation;\n };\n\n tree.size = function(x) {\n return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);\n };\n\n tree.nodeSize = function(x) {\n return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);\n };\n\n return tree;\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n i, n = nodes.length,\n sum, sums = new Array(n + 1);\n\n for (sums[0] = sum = i = 0; i < n; ++i) {\n sums[i + 1] = sum += nodes[i].value;\n }\n\n partition(0, n, parent.value, x0, y0, x1, y1);\n\n function partition(i, j, value, x0, y0, x1, y1) {\n if (i >= j - 1) {\n var node = nodes[i];\n node.x0 = x0, node.y0 = y0;\n node.x1 = x1, node.y1 = y1;\n return;\n }\n\n var valueOffset = sums[i],\n valueTarget = (value / 2) + valueOffset,\n k = i + 1,\n hi = j - 1;\n\n while (k < hi) {\n var mid = k + hi >>> 1;\n if (sums[mid] < valueTarget) k = mid + 1;\n else hi = mid;\n }\n\n if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k;\n\n var valueLeft = sums[k] - valueOffset,\n valueRight = value - valueLeft;\n\n if ((x1 - x0) > (y1 - y0)) {\n var xk = value ? (x0 * valueRight + x1 * valueLeft) / value : x1;\n partition(i, k, valueLeft, x0, y0, xk, y1);\n partition(k, j, valueRight, xk, y0, x1, y1);\n } else {\n var yk = value ? (y0 * valueRight + y1 * valueLeft) / value : y1;\n partition(i, k, valueLeft, x0, y0, x1, yk);\n partition(k, j, valueRight, x0, yk, x1, y1);\n }\n }\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.y0 = y0, node.y1 = y1;\n node.x0 = x0, node.x1 = x0 += node.value * k;\n }\n}\n","import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport {required} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nexport default function() {\n var tile = squarify,\n round = false,\n dx = 1,\n dy = 1,\n paddingStack = [0],\n paddingInner = constantZero,\n paddingTop = constantZero,\n paddingRight = constantZero,\n paddingBottom = constantZero,\n paddingLeft = constantZero;\n\n function treemap(root) {\n root.x0 =\n root.y0 = 0;\n root.x1 = dx;\n root.y1 = dy;\n root.eachBefore(positionNode);\n paddingStack = [0];\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(node) {\n var p = paddingStack[node.depth],\n x0 = node.x0 + p,\n y0 = node.y0 + p,\n x1 = node.x1 - p,\n y1 = node.y1 - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n if (node.children) {\n p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n x0 += paddingLeft(node) - p;\n y0 += paddingTop(node) - p;\n x1 -= paddingRight(node) - p;\n y1 -= paddingBottom(node) - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n tile(node, x0, y0, x1, y1);\n }\n }\n\n treemap.round = function(x) {\n return arguments.length ? (round = !!x, treemap) : round;\n };\n\n treemap.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n };\n\n treemap.tile = function(x) {\n return arguments.length ? (tile = required(x), treemap) : tile;\n };\n\n treemap.padding = function(x) {\n return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n };\n\n treemap.paddingInner = function(x) {\n return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n };\n\n treemap.paddingOuter = function(x) {\n return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n };\n\n treemap.paddingTop = function(x) {\n return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n };\n\n treemap.paddingRight = function(x) {\n return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n };\n\n treemap.paddingBottom = function(x) {\n return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n };\n\n treemap.paddingLeft = function(x) {\n return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n };\n\n return treemap;\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\nimport {phi, squarifyRatio} from \"./squarify.js\";\n\nexport default (function custom(ratio) {\n\n function resquarify(parent, x0, y0, x1, y1) {\n if ((rows = parent._squarify) && (rows.ratio === ratio)) {\n var rows,\n row,\n nodes,\n i,\n j = -1,\n n,\n m = rows.length,\n value = parent.value;\n\n while (++j < m) {\n row = rows[j], nodes = row.children;\n for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1);\n value -= row.value;\n }\n } else {\n parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);\n rows.ratio = ratio;\n }\n }\n\n resquarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return resquarify;\n})(phi);\n","export default function(node) {\n node.x0 = Math.round(node.x0);\n node.y0 = Math.round(node.y0);\n node.x1 = Math.round(node.x1);\n node.y1 = Math.round(node.y1);\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (y1 - y0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.x0 = x0, node.x1 = x1;\n node.y0 = y0, node.y1 = y0 += node.value * k;\n }\n}\n","import dice from \"./dice.js\";\nimport slice from \"./slice.js\";\n\nexport default function(parent, x0, y0, x1, y1) {\n (parent.depth & 1 ? slice : dice)(parent, x0, y0, x1, y1);\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [],\n nodes = parent.children,\n row,\n nodeValue,\n i0 = 0,\n i1 = 0,\n n = nodes.length,\n dx, dy,\n value = parent.value,\n sumValue,\n minValue,\n maxValue,\n newRatio,\n minRatio,\n alpha,\n beta;\n\n while (i0 < n) {\n dx = x1 - x0, dy = y1 - y0;\n\n // Find the next non-empty node.\n do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue);\n\n // Keep adding nodes while the aspect ratio maintains or improves.\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes[i1].value;\n if (nodeValue < minValue) minValue = nodeValue;\n if (nodeValue > maxValue) maxValue = nodeValue;\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n minRatio = newRatio;\n }\n\n // Position and record the row orientation.\n rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n value -= sumValue, i0 = i1;\n }\n\n return rows;\n}\n\nexport default (function custom(ratio) {\n\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n\n squarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return squarify;\n})(phi);\n","import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","export default x => () => x;\n","import {cubehelix as colorCubehelix} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction cubehelix(hue) {\n return (function cubehelixGamma(y) {\n y = +y;\n\n function cubehelix(start, end) {\n var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(Math.pow(t, y));\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n cubehelix.gamma = cubehelixGamma;\n\n return cubehelix;\n })(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);\n","export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n","export default function(range) {\n var n = range.length;\n return function(t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n}\n","import {hcl as colorHcl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hcl(hue) {\n return function(start, end) {\n var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n c = color(start.c, end.c),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);\n","import {hsl as colorHsl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hsl(hue) {\n return function(start, end) {\n var h = hue((start = colorHsl(start)).h, (end = colorHsl(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hsl(hue);\nexport var hslLong = hsl(color);\n","import {hue} from \"./color.js\";\n\nexport default function(a, b) {\n var i = hue(+a, +b);\n return function(t) {\n var x = i(t);\n return x - 360 * Math.floor(x / 360);\n };\n}\n","export {default as interpolate} from \"./value.js\";\nexport {default as interpolateArray} from \"./array.js\";\nexport {default as interpolateBasis} from \"./basis.js\";\nexport {default as interpolateBasisClosed} from \"./basisClosed.js\";\nexport {default as interpolateDate} from \"./date.js\";\nexport {default as interpolateDiscrete} from \"./discrete.js\";\nexport {default as interpolateHue} from \"./hue.js\";\nexport {default as interpolateNumber} from \"./number.js\";\nexport {default as interpolateNumberArray} from \"./numberArray.js\";\nexport {default as interpolateObject} from \"./object.js\";\nexport {default as interpolateRound} from \"./round.js\";\nexport {default as interpolateString} from \"./string.js\";\nexport {interpolateTransformCss, interpolateTransformSvg} from \"./transform/index.js\";\nexport {default as interpolateZoom} from \"./zoom.js\";\nexport {default as interpolateRgb, rgbBasis as interpolateRgbBasis, rgbBasisClosed as interpolateRgbBasisClosed} from \"./rgb.js\";\nexport {default as interpolateHsl, hslLong as interpolateHslLong} from \"./hsl.js\";\nexport {default as interpolateLab} from \"./lab.js\";\nexport {default as interpolateHcl, hclLong as interpolateHclLong} from \"./hcl.js\";\nexport {default as interpolateCubehelix, cubehelixLong as interpolateCubehelixLong} from \"./cubehelix.js\";\nexport {default as piecewise} from \"./piecewise.js\";\nexport {default as quantize} from \"./quantize.js\";\n","import {lab as colorLab} from \"d3-color\";\nimport color from \"./color.js\";\n\nexport default function lab(start, end) {\n var l = color((start = colorLab(start)).l, (end = colorLab(end)).l),\n a = color(start.a, end.a),\n b = color(start.b, end.b),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.l = l(t);\n start.a = a(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n","import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n","import {default as value} from \"./value.js\";\n\nexport default function piecewise(interpolate, values) {\n if (values === undefined) values = interpolate, interpolate = value;\n var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n while (i < n) I[i] = interpolate(v, v = values[++i]);\n return function(t) {\n var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n return I[i](t - i);\n };\n}\n","export default function(interpolator, n) {\n var samples = new Array(n);\n for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n return samples;\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","var degrees = 180 / Math.PI;\n\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\n","import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function(a, b) {\n var s = [], // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n","import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n","import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n","var epsilon2 = 1e-12;\n\nfunction cosh(x) {\n return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\nexport default (function zoomRho(rho, rho2, rho4) {\n\n // p0 = [ux0, uy0, w0]\n // p1 = [ux1, uy1, w1]\n function zoom(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000 * rho / Math.SQRT2;\n\n return i;\n }\n\n zoom.rho = function(_) {\n var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n return zoomRho(_1, _2, _4);\n };\n\n return zoom;\n})(Math.SQRT2, 2, 4);\n","export {Path, path, pathRound} from \"./path.js\";\n","const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n let d = Math.floor(digits);\n if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n if (d > 15) return append;\n const k = 10 ** d;\n return function(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n}\n\nexport class Path {\n constructor(digits) {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n this._append = digits == null ? append : appendRound(digits);\n }\n moveTo(x, y) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._append`Z`;\n }\n }\n lineTo(x, y) {\n this._append`L${this._x1 = +x},${this._y1 = +y}`;\n }\n quadraticCurveTo(x1, y1, x, y) {\n this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n }\n bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n }\n arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._append`M${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._append`L${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Otherwise, draw an arc!\n else {\n let x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n }\n\n this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n }\n }\n arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._append`M${x0},${y0}`;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._append`L${x0},${y0}`;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n }\n }\n rect(x, y, w, h) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n }\n toString() {\n return this._;\n }\n}\n\nexport function path() {\n return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n return new Path(+digits);\n}\n","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n a,\n b = polygon[n - 1],\n area = 0;\n\n while (++i < n) {\n a = b;\n b = polygon[i];\n area += a[1] * b[0] - a[0] * b[1];\n }\n\n return area / 2;\n}\n","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n x = 0,\n y = 0,\n a,\n b = polygon[n - 1],\n c,\n k = 0;\n\n while (++i < n) {\n a = b;\n b = polygon[i];\n k += c = a[0] * b[1] - b[0] * a[1];\n x += (a[0] + b[0]) * c;\n y += (a[1] + b[1]) * c;\n }\n\n return k *= 3, [x / k, y / k];\n}\n","export default function(polygon, point) {\n var n = polygon.length,\n p = polygon[n - 1],\n x = point[0], y = point[1],\n x0 = p[0], y0 = p[1],\n x1, y1,\n inside = false;\n\n for (var i = 0; i < n; ++i) {\n p = polygon[i], x1 = p[0], y1 = p[1];\n if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;\n x0 = x1, y0 = y1;\n }\n\n return inside;\n}\n","// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of\n// the 3D cross product in a quadrant I Cartesian coordinate system (+x is\n// right, +y is up). Returns a positive value if ABC is counter-clockwise,\n// negative if clockwise, and zero if the points are collinear.\nexport default function(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n}\n","import cross from \"./cross.js\";\n\nfunction lexicographicOrder(a, b) {\n return a[0] - b[0] || a[1] - b[1];\n}\n\n// Computes the upper convex hull per the monotone chain algorithm.\n// Assumes points.length >= 3, is sorted by x, unique in y.\n// Returns an array of indices into points in left-to-right order.\nfunction computeUpperHullIndexes(points) {\n const n = points.length,\n indexes = [0, 1];\n let size = 2, i;\n\n for (i = 2; i < n; ++i) {\n while (size > 1 && cross(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;\n indexes[size++] = i;\n }\n\n return indexes.slice(0, size); // remove popped points\n}\n\nexport default function(points) {\n if ((n = points.length) < 3) return null;\n\n var i,\n n,\n sortedPoints = new Array(n),\n flippedPoints = new Array(n);\n\n for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];\n sortedPoints.sort(lexicographicOrder);\n for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];\n\n var upperIndexes = computeUpperHullIndexes(sortedPoints),\n lowerIndexes = computeUpperHullIndexes(flippedPoints);\n\n // Construct the hull polygon, removing possible duplicate endpoints.\n var skipLeft = lowerIndexes[0] === upperIndexes[0],\n skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],\n hull = [];\n\n // Add upper hull in right-to-l order.\n // Then add lower hull in left-to-right order.\n for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);\n for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);\n\n return hull;\n}\n","export {default as polygonArea} from \"./area.js\";\nexport {default as polygonCentroid} from \"./centroid.js\";\nexport {default as polygonHull} from \"./hull.js\";\nexport {default as polygonContains} from \"./contains.js\";\nexport {default as polygonLength} from \"./length.js\";\n","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n b = polygon[n - 1],\n xa,\n ya,\n xb = b[0],\n yb = b[1],\n perimeter = 0;\n\n while (++i < n) {\n xa = xb;\n ya = yb;\n b = polygon[i];\n xb = b[0];\n yb = b[1];\n xa -= xb;\n ya -= yb;\n perimeter += Math.hypot(xa, ya);\n }\n\n return perimeter;\n}\n","export default function(d) {\n const x = +this._x.call(null, d),\n y = +this._y.call(null, d);\n return add(this.cover(x, y), x, y, d);\n}\n\nfunction add(tree, x, y, d) {\n if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {data: d},\n x0 = tree._x0,\n y0 = tree._y0,\n x1 = tree._x1,\n y1 = tree._y1,\n xm,\n ym,\n xp,\n yp,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return tree._root = leaf, tree;\n\n // Find the existing leaf for the new point, or add it.\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n }\n\n // Is the new point is exactly coincident with the existing point?\n xp = +tree._x.call(null, node.data);\n yp = +tree._y.call(null, node.data);\n if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n // Otherwise, split the leaf node until the old and new point are separated.\n do {\n parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var d, i, n = data.length,\n x,\n y,\n xz = new Array(n),\n yz = new Array(n),\n x0 = Infinity,\n y0 = Infinity,\n x1 = -Infinity,\n y1 = -Infinity;\n\n // Compute the points and their extent.\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n xz[i] = x;\n yz[i] = y;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n }\n\n // If there were no (valid) points, abort.\n if (x0 > x1 || y0 > y1) return this;\n\n // Expand the tree to cover the new points.\n this.cover(x0, y0).cover(x1, y1);\n\n // Add the new points.\n for (i = 0; i < n; ++i) {\n add(this, xz[i], yz[i], data[i]);\n }\n\n return this;\n}\n","export default function(x, y) {\n if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n var x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1;\n\n // If the quadtree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing quadrant boundaries don’t change due to floating point error!\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n y1 = (y0 = Math.floor(y)) + 1;\n }\n\n // Otherwise, double repeatedly to cover.\n else {\n var z = x1 - x0 || 1,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1 || y0 > y || y >= y1) {\n i = (y < y0) << 1 | (x < x0);\n parent = new Array(4), parent[i] = node, node = parent, z *= 2;\n switch (i) {\n case 0: x1 = x0 + z, y1 = y0 + z; break;\n case 1: x0 = x1 - z, y1 = y0 + z; break;\n case 2: x1 = x0 + z, y0 = y1 - z; break;\n case 3: x0 = x1 - z, y0 = y1 - z; break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n return this;\n}\n","export default function() {\n var data = [];\n this.visit(function(node) {\n if (!node.length) do data.push(node.data); while (node = node.next)\n });\n return data;\n}\n","export default function(_) {\n return arguments.length\n ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n}\n","import Quad from \"./quad.js\";\n\nexport default function(x, y, radius) {\n var data,\n x0 = this._x0,\n y0 = this._y0,\n x1,\n y1,\n x2,\n y2,\n x3 = this._x1,\n y3 = this._y1,\n quads = [],\n node = this._root,\n q,\n i;\n\n if (node) quads.push(new Quad(node, x0, y0, x3, y3));\n if (radius == null) radius = Infinity;\n else {\n x0 = x - radius, y0 = y - radius;\n x3 = x + radius, y3 = y + radius;\n radius *= radius;\n }\n\n while (q = quads.pop()) {\n\n // Stop searching if this quadrant can’t contain a closer node.\n if (!(node = q.node)\n || (x1 = q.x0) > x3\n || (y1 = q.y0) > y3\n || (x2 = q.x1) < x0\n || (y2 = q.y1) < y0) continue;\n\n // Bisect the current quadrant.\n if (node.length) {\n var xm = (x1 + x2) / 2,\n ym = (y1 + y2) / 2;\n\n quads.push(\n new Quad(node[3], xm, ym, x2, y2),\n new Quad(node[2], x1, ym, xm, y2),\n new Quad(node[1], xm, y1, x2, ym),\n new Quad(node[0], x1, y1, xm, ym)\n );\n\n // Visit the closest quadrant first.\n if (i = (y >= ym) << 1 | (x >= xm)) {\n q = quads[quads.length - 1];\n quads[quads.length - 1] = quads[quads.length - 1 - i];\n quads[quads.length - 1 - i] = q;\n }\n }\n\n // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var dx = x - +this._x.call(null, node.data),\n dy = y - +this._y.call(null, node.data),\n d2 = dx * dx + dy * dy;\n if (d2 < radius) {\n var d = Math.sqrt(radius = d2);\n x0 = x - d, y0 = y - d;\n x3 = x + d, y3 = y + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}\n","export {default as quadtree} from \"./quadtree.js\";\n","export default function(node, x0, y0, x1, y1) {\n this.node = node;\n this.x0 = x0;\n this.y0 = y0;\n this.x1 = x1;\n this.y1 = y1;\n}\n","import tree_add, {addAll as tree_addAll} from \"./add.js\";\nimport tree_cover from \"./cover.js\";\nimport tree_data from \"./data.js\";\nimport tree_extent from \"./extent.js\";\nimport tree_find from \"./find.js\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove.js\";\nimport tree_root from \"./root.js\";\nimport tree_size from \"./size.js\";\nimport tree_visit from \"./visit.js\";\nimport tree_visitAfter from \"./visitAfter.js\";\nimport tree_x, {defaultX} from \"./x.js\";\nimport tree_y, {defaultY} from \"./y.js\";\n\nexport default function quadtree(nodes, x, y) {\n var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n this._x = x;\n this._y = y;\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {data: leaf.data}, next = copy;\n while (leaf = leaf.next) next = next.next = {data: leaf.data};\n return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n node = this._root,\n nodes,\n child;\n\n if (!node) return copy;\n\n if (!node.length) return copy._root = leaf_copy(node), copy;\n\n nodes = [{source: node, target: copy._root = new Array(4)}];\n while (node = nodes.pop()) {\n for (var i = 0; i < 4; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;\n","export default function(d) {\n if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1,\n x,\n y,\n xm,\n ym,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return this;\n\n // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n if (!node.length) break;\n if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n }\n\n // Find the point to remove.\n while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n if (next = node.next) delete node.next;\n\n // If there are multiple coincident points, remove just the point.\n if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n // If this is the root point, remove it.\n if (!parent) return this._root = next, this;\n\n // Remove this leaf.\n next ? parent[i] = next : delete parent[i];\n\n // If the parent now contains exactly one leaf, collapse superfluous parents.\n if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n && node === (parent[3] || parent[2] || parent[1] || parent[0])\n && !node.length) {\n if (retainer) retainer[j] = node;\n else this._root = node;\n }\n\n return this;\n}\n\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n return this;\n}\n","export default function() {\n return this._root;\n}\n","export default function() {\n var size = 0;\n this.visit(function(node) {\n if (!node.length) do ++size; while (node = node.next)\n });\n return size;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n }\n }\n return this;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], next = [], q;\n if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n var node = q.node;\n if (node.length) {\n var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n }\n next.push(q);\n }\n while (q = next.pop()) {\n callback(q.node, q.x0, q.y0, q.x1, q.y1);\n }\n return this;\n}\n","export function defaultX(d) {\n return d[0];\n}\n\nexport default function(_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}\n","export function defaultY(d) {\n return d[1];\n}\n\nexport default function(_) {\n return arguments.length ? (this._y = _, this) : this._y;\n}\n","import defaultSource from \"./defaultSource.js\";\nimport irwinHall from \"./irwinHall.js\";\n\nexport default (function sourceRandomBates(source) {\n var I = irwinHall.source(source);\n\n function randomBates(n) {\n // use limiting distribution at n === 0\n if ((n = +n) === 0) return source;\n var randomIrwinHall = I(n);\n return function() {\n return randomIrwinHall() / n;\n };\n }\n\n randomBates.source = sourceRandomBates;\n\n return randomBates;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomBernoulli(source) {\n function randomBernoulli(p) {\n if ((p = +p) < 0 || p > 1) throw new RangeError(\"invalid p\");\n return function() {\n return Math.floor(source() + p);\n };\n }\n\n randomBernoulli.source = sourceRandomBernoulli;\n\n return randomBernoulli;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\nimport gamma from \"./gamma.js\";\n\nexport default (function sourceRandomBeta(source) {\n var G = gamma.source(source);\n\n function randomBeta(alpha, beta) {\n var X = G(alpha),\n Y = G(beta);\n return function() {\n var x = X();\n return x === 0 ? 0 : x / (x + Y());\n };\n }\n\n randomBeta.source = sourceRandomBeta;\n\n return randomBeta;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\nimport beta from \"./beta.js\";\nimport geometric from \"./geometric.js\";\n\nexport default (function sourceRandomBinomial(source) {\n var G = geometric.source(source),\n B = beta.source(source);\n\n function randomBinomial(n, p) {\n n = +n;\n if ((p = +p) >= 1) return () => n;\n if (p <= 0) return () => 0;\n return function() {\n var acc = 0, nn = n, pp = p;\n while (nn * pp > 16 && nn * (1 - pp) > 16) {\n var i = Math.floor((nn + 1) * pp),\n y = B(i, nn - i + 1)();\n if (y <= pp) {\n acc += i;\n nn -= i;\n pp = (pp - y) / (1 - y);\n } else {\n nn = i - 1;\n pp /= y;\n }\n }\n var sign = pp < 0.5,\n pFinal = sign ? pp : 1 - pp,\n g = G(pFinal);\n for (var s = g(), k = 0; s <= nn; ++k) s += g();\n return acc + (sign ? k : nn - k);\n };\n }\n\n randomBinomial.source = sourceRandomBinomial;\n\n return randomBinomial;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomCauchy(source) {\n function randomCauchy(a, b) {\n a = a == null ? 0 : +a;\n b = b == null ? 1 : +b;\n return function() {\n return a + b * Math.tan(Math.PI * source());\n };\n }\n\n randomCauchy.source = sourceRandomCauchy;\n\n return randomCauchy;\n})(defaultSource);\n","export default Math.random;\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomExponential(source) {\n function randomExponential(lambda) {\n return function() {\n return -Math.log1p(-source()) / lambda;\n };\n }\n\n randomExponential.source = sourceRandomExponential;\n\n return randomExponential;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\nimport normal from \"./normal.js\";\n\nexport default (function sourceRandomGamma(source) {\n var randomNormal = normal.source(source)();\n\n function randomGamma(k, theta) {\n if ((k = +k) < 0) throw new RangeError(\"invalid k\");\n // degenerate distribution if k === 0\n if (k === 0) return () => 0;\n theta = theta == null ? 1 : +theta;\n // exponential distribution if k === 1\n if (k === 1) return () => -Math.log1p(-source()) * theta;\n\n var d = (k < 1 ? k + 1 : k) - 1 / 3,\n c = 1 / (3 * Math.sqrt(d)),\n multiplier = k < 1 ? () => Math.pow(source(), 1 / k) : () => 1;\n return function() {\n do {\n do {\n var x = randomNormal(),\n v = 1 + c * x;\n } while (v <= 0);\n v *= v * v;\n var u = 1 - source();\n } while (u >= 1 - 0.0331 * x * x * x * x && Math.log(u) >= 0.5 * x * x + d * (1 - v + Math.log(v)));\n return d * v * multiplier() * theta;\n };\n }\n\n randomGamma.source = sourceRandomGamma;\n\n return randomGamma;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomGeometric(source) {\n function randomGeometric(p) {\n if ((p = +p) < 0 || p > 1) throw new RangeError(\"invalid p\");\n if (p === 0) return () => Infinity;\n if (p === 1) return () => 1;\n p = Math.log1p(-p);\n return function() {\n return 1 + Math.floor(Math.log1p(-source()) / p);\n };\n }\n\n randomGeometric.source = sourceRandomGeometric;\n\n return randomGeometric;\n})(defaultSource);\n","export {default as randomUniform} from \"./uniform.js\";\nexport {default as randomInt} from \"./int.js\";\nexport {default as randomNormal} from \"./normal.js\";\nexport {default as randomLogNormal} from \"./logNormal.js\";\nexport {default as randomBates} from \"./bates.js\";\nexport {default as randomIrwinHall} from \"./irwinHall.js\";\nexport {default as randomExponential} from \"./exponential.js\";\nexport {default as randomPareto} from \"./pareto.js\";\nexport {default as randomBernoulli} from \"./bernoulli.js\";\nexport {default as randomGeometric} from \"./geometric.js\";\nexport {default as randomBinomial} from \"./binomial.js\";\nexport {default as randomGamma} from \"./gamma.js\";\nexport {default as randomBeta} from \"./beta.js\";\nexport {default as randomWeibull} from \"./weibull.js\";\nexport {default as randomCauchy} from \"./cauchy.js\";\nexport {default as randomLogistic} from \"./logistic.js\";\nexport {default as randomPoisson} from \"./poisson.js\";\nexport {default as randomLcg} from \"./lcg.js\";\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomInt(source) {\n function randomInt(min, max) {\n if (arguments.length < 2) max = min, min = 0;\n min = Math.floor(min);\n max = Math.floor(max) - min;\n return function() {\n return Math.floor(source() * max + min);\n };\n }\n\n randomInt.source = sourceRandomInt;\n\n return randomInt;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomIrwinHall(source) {\n function randomIrwinHall(n) {\n if ((n = +n) <= 0) return () => 0;\n return function() {\n for (var sum = 0, i = n; i > 1; --i) sum += source();\n return sum + i * source();\n };\n }\n\n randomIrwinHall.source = sourceRandomIrwinHall;\n\n return randomIrwinHall;\n})(defaultSource);\n","// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst mul = 0x19660D;\nconst inc = 0x3C6EF35F;\nconst eps = 1 / 0x100000000;\n\nexport default function lcg(seed = Math.random()) {\n let state = (0 <= seed && seed < 1 ? seed / eps : Math.abs(seed)) | 0;\n return () => (state = mul * state + inc | 0, eps * (state >>> 0));\n}\n","import defaultSource from \"./defaultSource.js\";\nimport normal from \"./normal.js\";\n\nexport default (function sourceRandomLogNormal(source) {\n var N = normal.source(source);\n\n function randomLogNormal() {\n var randomNormal = N.apply(this, arguments);\n return function() {\n return Math.exp(randomNormal());\n };\n }\n\n randomLogNormal.source = sourceRandomLogNormal;\n\n return randomLogNormal;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomLogistic(source) {\n function randomLogistic(a, b) {\n a = a == null ? 0 : +a;\n b = b == null ? 1 : +b;\n return function() {\n var u = source();\n return a + b * Math.log(u / (1 - u));\n };\n }\n\n randomLogistic.source = sourceRandomLogistic;\n\n return randomLogistic;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomNormal(source) {\n function randomNormal(mu, sigma) {\n var x, r;\n mu = mu == null ? 0 : +mu;\n sigma = sigma == null ? 1 : +sigma;\n return function() {\n var y;\n\n // If available, use the second previously-generated uniform random.\n if (x != null) y = x, x = null;\n\n // Otherwise, generate a new x and y.\n else do {\n x = source() * 2 - 1;\n y = source() * 2 - 1;\n r = x * x + y * y;\n } while (!r || r > 1);\n\n return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r);\n };\n }\n\n randomNormal.source = sourceRandomNormal;\n\n return randomNormal;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomPareto(source) {\n function randomPareto(alpha) {\n if ((alpha = +alpha) < 0) throw new RangeError(\"invalid alpha\");\n alpha = 1 / -alpha;\n return function() {\n return Math.pow(1 - source(), alpha);\n };\n }\n\n randomPareto.source = sourceRandomPareto;\n\n return randomPareto;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\nimport binomial from \"./binomial.js\";\nimport gamma from \"./gamma.js\";\n\nexport default (function sourceRandomPoisson(source) {\n var G = gamma.source(source),\n B = binomial.source(source);\n\n function randomPoisson(lambda) {\n return function() {\n var acc = 0, l = lambda;\n while (l > 16) {\n var n = Math.floor(0.875 * l),\n t = G(n)();\n if (t > l) return acc + B(n - 1, l / t)();\n acc += n;\n l -= t;\n }\n for (var s = -Math.log1p(-source()), k = 0; s <= l; ++k) s -= Math.log1p(-source());\n return acc + k;\n };\n }\n\n randomPoisson.source = sourceRandomPoisson;\n\n return randomPoisson;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomUniform(source) {\n function randomUniform(min, max) {\n min = min == null ? 0 : +min;\n max = max == null ? 1 : +max;\n if (arguments.length === 1) max = min, min = 0;\n else max -= min;\n return function() {\n return source() * max + min;\n };\n }\n\n randomUniform.source = sourceRandomUniform;\n\n return randomUniform;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomWeibull(source) {\n function randomWeibull(k, a, b) {\n var outerFunc;\n if ((k = +k) === 0) {\n outerFunc = x => -Math.log(x);\n } else {\n k = 1 / k;\n outerFunc = x => Math.pow(x, k);\n }\n a = a == null ? 0 : +a;\n b = b == null ? 1 : +b;\n return function() {\n return a + b * outerFunc(-Math.log1p(-source()));\n };\n }\n\n randomWeibull.source = sourceRandomWeibull;\n\n return randomWeibull;\n})(defaultSource);\n","import colors from \"../colors.js\";\n\nexport default colors(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0\");\n","export default function(specifier) {\n var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n return colors;\n}\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"d8b365f5f5f55ab4ac\",\n \"a6611adfc27d80cdc1018571\",\n \"a6611adfc27df5f5f580cdc1018571\",\n \"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\n \"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\n \"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\n \"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\n \"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\n \"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"af8dc3f7f7f77fbf7b\",\n \"7b3294c2a5cfa6dba0008837\",\n \"7b3294c2a5cff7f7f7a6dba0008837\",\n \"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\n \"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\n \"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\n \"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\n \"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\n \"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e9a3c9f7f7f7a1d76a\",\n \"d01c8bf1b6dab8e1864dac26\",\n \"d01c8bf1b6daf7f7f7b8e1864dac26\",\n \"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\n \"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\n \"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\n \"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\n \"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\n \"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"998ec3f7f7f7f1a340\",\n \"5e3c99b2abd2fdb863e66101\",\n \"5e3c99b2abd2f7f7f7fdb863e66101\",\n \"542788998ec3d8daebfee0b6f1a340b35806\",\n \"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\n \"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\n \"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\n \"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\n \"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ef8a62f7f7f767a9cf\",\n \"ca0020f4a58292c5de0571b0\",\n \"ca0020f4a582f7f7f792c5de0571b0\",\n \"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\n \"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\n \"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\n \"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\n \"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\n \"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ef8a62ffffff999999\",\n \"ca0020f4a582bababa404040\",\n \"ca0020f4a582ffffffbababa404040\",\n \"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\n \"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\n \"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\n \"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\n \"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\n \"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fc8d59ffffbf91bfdb\",\n \"d7191cfdae61abd9e92c7bb6\",\n \"d7191cfdae61ffffbfabd9e92c7bb6\",\n \"d73027fc8d59fee090e0f3f891bfdb4575b4\",\n \"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\n \"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\n \"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\n \"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\n \"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fc8d59ffffbf91cf60\",\n \"d7191cfdae61a6d96a1a9641\",\n \"d7191cfdae61ffffbfa6d96a1a9641\",\n \"d73027fc8d59fee08bd9ef8b91cf601a9850\",\n \"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\n \"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\n \"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\n \"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\n \"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fc8d59ffffbf99d594\",\n \"d7191cfdae61abdda42b83ba\",\n \"d7191cfdae61ffffbfabdda42b83ba\",\n \"d53e4ffc8d59fee08be6f59899d5943288bd\",\n \"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\n \"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\n \"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\n \"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\n \"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\"\n).map(colors);\n\nexport default ramp(scheme);\n","export {default as schemeCategory10} from \"./categorical/category10.js\";\nexport {default as schemeAccent} from \"./categorical/Accent.js\";\nexport {default as schemeDark2} from \"./categorical/Dark2.js\";\nexport {default as schemeObservable10} from \"./categorical/observable10.js\";\nexport {default as schemePaired} from \"./categorical/Paired.js\";\nexport {default as schemePastel1} from \"./categorical/Pastel1.js\";\nexport {default as schemePastel2} from \"./categorical/Pastel2.js\";\nexport {default as schemeSet1} from \"./categorical/Set1.js\";\nexport {default as schemeSet2} from \"./categorical/Set2.js\";\nexport {default as schemeSet3} from \"./categorical/Set3.js\";\nexport {default as schemeTableau10} from \"./categorical/Tableau10.js\";\nexport {default as interpolateBrBG, scheme as schemeBrBG} from \"./diverging/BrBG.js\";\nexport {default as interpolatePRGn, scheme as schemePRGn} from \"./diverging/PRGn.js\";\nexport {default as interpolatePiYG, scheme as schemePiYG} from \"./diverging/PiYG.js\";\nexport {default as interpolatePuOr, scheme as schemePuOr} from \"./diverging/PuOr.js\";\nexport {default as interpolateRdBu, scheme as schemeRdBu} from \"./diverging/RdBu.js\";\nexport {default as interpolateRdGy, scheme as schemeRdGy} from \"./diverging/RdGy.js\";\nexport {default as interpolateRdYlBu, scheme as schemeRdYlBu} from \"./diverging/RdYlBu.js\";\nexport {default as interpolateRdYlGn, scheme as schemeRdYlGn} from \"./diverging/RdYlGn.js\";\nexport {default as interpolateSpectral, scheme as schemeSpectral} from \"./diverging/Spectral.js\";\nexport {default as interpolateBuGn, scheme as schemeBuGn} from \"./sequential-multi/BuGn.js\";\nexport {default as interpolateBuPu, scheme as schemeBuPu} from \"./sequential-multi/BuPu.js\";\nexport {default as interpolateGnBu, scheme as schemeGnBu} from \"./sequential-multi/GnBu.js\";\nexport {default as interpolateOrRd, scheme as schemeOrRd} from \"./sequential-multi/OrRd.js\";\nexport {default as interpolatePuBuGn, scheme as schemePuBuGn} from \"./sequential-multi/PuBuGn.js\";\nexport {default as interpolatePuBu, scheme as schemePuBu} from \"./sequential-multi/PuBu.js\";\nexport {default as interpolatePuRd, scheme as schemePuRd} from \"./sequential-multi/PuRd.js\";\nexport {default as interpolateRdPu, scheme as schemeRdPu} from \"./sequential-multi/RdPu.js\";\nexport {default as interpolateYlGnBu, scheme as schemeYlGnBu} from \"./sequential-multi/YlGnBu.js\";\nexport {default as interpolateYlGn, scheme as schemeYlGn} from \"./sequential-multi/YlGn.js\";\nexport {default as interpolateYlOrBr, scheme as schemeYlOrBr} from \"./sequential-multi/YlOrBr.js\";\nexport {default as interpolateYlOrRd, scheme as schemeYlOrRd} from \"./sequential-multi/YlOrRd.js\";\nexport {default as interpolateBlues, scheme as schemeBlues} from \"./sequential-single/Blues.js\";\nexport {default as interpolateGreens, scheme as schemeGreens} from \"./sequential-single/Greens.js\";\nexport {default as interpolateGreys, scheme as schemeGreys} from \"./sequential-single/Greys.js\";\nexport {default as interpolatePurples, scheme as schemePurples} from \"./sequential-single/Purples.js\";\nexport {default as interpolateReds, scheme as schemeReds} from \"./sequential-single/Reds.js\";\nexport {default as interpolateOranges, scheme as schemeOranges} from \"./sequential-single/Oranges.js\";\nexport {default as interpolateCividis} from \"./sequential-multi/cividis.js\";\nexport {default as interpolateCubehelixDefault} from \"./sequential-multi/cubehelix.js\";\nexport {default as interpolateRainbow, warm as interpolateWarm, cool as interpolateCool} from \"./sequential-multi/rainbow.js\";\nexport {default as interpolateSinebow} from \"./sequential-multi/sinebow.js\";\nexport {default as interpolateTurbo} from \"./sequential-multi/turbo.js\";\nexport {default as interpolateViridis, magma as interpolateMagma, inferno as interpolateInferno, plasma as interpolatePlasma} from \"./sequential-multi/viridis.js\";\n","import {interpolateRgbBasis} from \"d3-interpolate\";\n\nexport default scheme => interpolateRgbBasis(scheme[scheme.length - 1]);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e5f5f999d8c92ca25f\",\n \"edf8fbb2e2e266c2a4238b45\",\n \"edf8fbb2e2e266c2a42ca25f006d2c\",\n \"edf8fbccece699d8c966c2a42ca25f006d2c\",\n \"edf8fbccece699d8c966c2a441ae76238b45005824\",\n \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\n \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e0ecf49ebcda8856a7\",\n \"edf8fbb3cde38c96c688419d\",\n \"edf8fbb3cde38c96c68856a7810f7c\",\n \"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\n \"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\n \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\n \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e0f3dba8ddb543a2ca\",\n \"f0f9e8bae4bc7bccc42b8cbe\",\n \"f0f9e8bae4bc7bccc443a2ca0868ac\",\n \"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\n \"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fee8c8fdbb84e34a33\",\n \"fef0d9fdcc8afc8d59d7301f\",\n \"fef0d9fdcc8afc8d59e34a33b30000\",\n \"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\n \"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\n \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\n \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ece7f2a6bddb2b8cbe\",\n \"f1eef6bdc9e174a9cf0570b0\",\n \"f1eef6bdc9e174a9cf2b8cbe045a8d\",\n \"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\n \"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ece2f0a6bddb1c9099\",\n \"f6eff7bdc9e167a9cf02818a\",\n \"f6eff7bdc9e167a9cf1c9099016c59\",\n \"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\n \"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\n \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\n \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e7e1efc994c7dd1c77\",\n \"f1eef6d7b5d8df65b0ce1256\",\n \"f1eef6d7b5d8df65b0dd1c77980043\",\n \"f1eef6d4b9dac994c7df65b0dd1c77980043\",\n \"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\n \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\n \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fde0ddfa9fb5c51b8a\",\n \"feebe2fbb4b9f768a1ae017e\",\n \"feebe2fbb4b9f768a1c51b8a7a0177\",\n \"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\n \"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"f7fcb9addd8e31a354\",\n \"ffffccc2e69978c679238443\",\n \"ffffccc2e69978c67931a354006837\",\n \"ffffccd9f0a3addd8e78c67931a354006837\",\n \"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\n \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\n \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"edf8b17fcdbb2c7fb8\",\n \"ffffcca1dab441b6c4225ea8\",\n \"ffffcca1dab441b6c42c7fb8253494\",\n \"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\n \"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fff7bcfec44fd95f0e\",\n \"ffffd4fed98efe9929cc4c02\",\n \"ffffd4fed98efe9929d95f0e993404\",\n \"ffffd4fee391fec44ffe9929d95f0e993404\",\n \"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\n \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\n \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ffeda0feb24cf03b20\",\n \"ffffb2fecc5cfd8d3ce31a1c\",\n \"ffffb2fecc5cfd8d3cf03b20bd0026\",\n \"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\n \"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\"\n).map(colors);\n\nexport default ramp(scheme);\n","export default function(t) {\n t = Math.max(0, Math.min(1, t));\n return \"rgb(\"\n + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67)))))))\n + \")\";\n}\n","import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport default interpolateCubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));\n","import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport var warm = interpolateCubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nexport var cool = interpolateCubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nvar c = cubehelix();\n\nexport default function(t) {\n if (t < 0 || t > 1) t -= Math.floor(t);\n var ts = Math.abs(t - 0.5);\n c.h = 360 * t - 100;\n c.s = 1.5 - 1.5 * ts;\n c.l = 0.8 - 0.9 * ts;\n return c + \"\";\n}\n","import {rgb} from \"d3-color\";\n\nvar c = rgb(),\n pi_1_3 = Math.PI / 3,\n pi_2_3 = Math.PI * 2 / 3;\n\nexport default function(t) {\n var x;\n t = (0.5 - t) * Math.PI;\n c.r = 255 * (x = Math.sin(t)) * x;\n c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;\n c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;\n return c + \"\";\n}\n","export default function(t) {\n t = Math.max(0, Math.min(1, t));\n return \"rgb(\"\n + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66)))))))\n + \")\";\n}\n","import colors from \"../colors.js\";\n\nfunction ramp(range) {\n var n = range.length;\n return function(t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n}\n\nexport default ramp(colors(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\"));\n\nexport var magma = ramp(colors(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nexport var inferno = ramp(colors(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nexport var plasma = ramp(colors(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"deebf79ecae13182bd\",\n \"eff3ffbdd7e76baed62171b5\",\n \"eff3ffbdd7e76baed63182bd08519c\",\n \"eff3ffc6dbef9ecae16baed63182bd08519c\",\n \"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\n \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\n \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e5f5e0a1d99b31a354\",\n \"edf8e9bae4b374c476238b45\",\n \"edf8e9bae4b374c47631a354006d2c\",\n \"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\n \"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\n \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\n \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"f0f0f0bdbdbd636363\",\n \"f7f7f7cccccc969696525252\",\n \"f7f7f7cccccc969696636363252525\",\n \"f7f7f7d9d9d9bdbdbd969696636363252525\",\n \"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\n \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\n \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fee6cefdae6be6550d\",\n \"feeddefdbe85fd8d3cd94701\",\n \"feeddefdbe85fd8d3ce6550da63603\",\n \"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\n \"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"efedf5bcbddc756bb1\",\n \"f2f0f7cbc9e29e9ac86a51a3\",\n \"f2f0f7cbc9e29e9ac8756bb154278f\",\n \"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\n \"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fee0d2fc9272de2d26\",\n \"fee5d9fcae91fb6a4acb181d\",\n \"fee5d9fcae91fb6a4ade2d26a50f15\",\n \"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\n \"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\"\n).map(colors);\n\nexport default ramp(scheme);\n","import {range as sequence} from \"d3-array\";\nimport {initRange} from \"./init.js\";\nimport ordinal from \"./ordinal.js\";\n\nexport default function band() {\n var scale = ordinal().unknown(undefined),\n domain = scale.domain,\n ordinalRange = scale.range,\n r0 = 0,\n r1 = 1,\n step,\n bandwidth,\n round = false,\n paddingInner = 0,\n paddingOuter = 0,\n align = 0.5;\n\n delete scale.unknown;\n\n function rescale() {\n var n = domain().length,\n reverse = r1 < r0,\n start = reverse ? r1 : r0,\n stop = reverse ? r0 : r1;\n step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n if (round) step = Math.floor(step);\n start += (stop - start - step * (n - paddingInner)) * align;\n bandwidth = step * (1 - paddingInner);\n if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n var values = sequence(n).map(function(i) { return start + step * i; });\n return ordinalRange(reverse ? values.reverse() : values);\n }\n\n scale.domain = function(_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.range = function(_) {\n return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];\n };\n\n scale.rangeRound = function(_) {\n return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();\n };\n\n scale.bandwidth = function() {\n return bandwidth;\n };\n\n scale.step = function() {\n return step;\n };\n\n scale.round = function(_) {\n return arguments.length ? (round = !!_, rescale()) : round;\n };\n\n scale.padding = function(_) {\n return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n };\n\n scale.paddingInner = function(_) {\n return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n };\n\n scale.paddingOuter = function(_) {\n return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n };\n\n scale.align = function(_) {\n return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n };\n\n scale.copy = function() {\n return band(domain(), [r0, r1])\n .round(round)\n .paddingInner(paddingInner)\n .paddingOuter(paddingOuter)\n .align(align);\n };\n\n return initRange.apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n var copy = scale.copy;\n\n scale.padding = scale.paddingOuter;\n delete scale.paddingInner;\n delete scale.paddingOuter;\n\n scale.copy = function() {\n return pointish(copy());\n };\n\n return scale;\n}\n\nexport function point() {\n return pointish(band.apply(null, arguments).paddingInner(1));\n}\n","export default function constants(x) {\n return function() {\n return x;\n };\n}\n","import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n return x;\n}\n\nfunction normalize(a, b) {\n return (b -= (a = +a))\n ? function(x) { return (x - a) / b; }\n : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n var t;\n if (a > b) t = a, a = b, b = t;\n return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1;\n\n // Reverse descending domains.\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n\n return function(x) {\n var i = bisect(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .range(source.range())\n .interpolate(source.interpolate())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport function transformer() {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n\n function rescale() {\n var n = Math.min(domain.length, range.length);\n if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n piecewise = n > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n }\n\n scale.invert = function(y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = Array.from(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n}\n\nexport default function continuous() {\n return transformer()(identity, identity);\n}\n","import {interpolate, interpolateRound, piecewise} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {copy} from \"./sequential.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 0.5,\n x2 = 1,\n s = 1,\n t0,\n t1,\n t2,\n k10,\n k21,\n interpolator = identity,\n transform,\n clamp = false,\n unknown;\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function(_) {\n return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2];\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n function range(interpolate) {\n return function(_) {\n var r0, r1, r2;\n return arguments.length ? ([r0, r1, r2] = _, interpolator = piecewise(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)];\n };\n }\n\n scale.range = range(interpolate);\n\n scale.rangeRound = range(interpolateRound);\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t) {\n transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1;\n return scale;\n };\n}\n\nexport default function diverging() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function() {\n return copy(scale, diverging());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingLog() {\n var scale = loggish(transformer()).domain([0.1, 1, 10]);\n\n scale.copy = function() {\n return copy(scale, divergingLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, divergingSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingPow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, divergingPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSqrt() {\n return divergingPow.apply(null, arguments).exponent(0.5);\n}\n","import {linearish} from \"./linear.js\";\nimport number from \"./number.js\";\n\nexport default function identity(domain) {\n var unknown;\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : x;\n }\n\n scale.invert = scale;\n\n scale.domain = scale.range = function(_) {\n return arguments.length ? (domain = Array.from(_, number), scale) : domain.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return identity(domain).unknown(unknown);\n };\n\n domain = arguments.length ? Array.from(domain, number) : [0, 1];\n\n return linearish(scale);\n}\n","export {\n default as scaleBand,\n point as scalePoint\n} from \"./band.js\";\n\nexport {\n default as scaleIdentity\n} from \"./identity.js\";\n\nexport {\n default as scaleLinear\n} from \"./linear.js\";\n\nexport {\n default as scaleLog\n} from \"./log.js\";\n\nexport {\n default as scaleSymlog\n} from \"./symlog.js\";\n\nexport {\n default as scaleOrdinal,\n implicit as scaleImplicit\n} from \"./ordinal.js\";\n\nexport {\n default as scalePow,\n sqrt as scaleSqrt\n} from \"./pow.js\";\n\nexport {\n default as scaleRadial\n} from \"./radial.js\";\n\nexport {\n default as scaleQuantile\n} from \"./quantile.js\";\n\nexport {\n default as scaleQuantize\n} from \"./quantize.js\";\n\nexport {\n default as scaleThreshold\n} from \"./threshold.js\";\n\nexport {\n default as scaleTime\n} from \"./time.js\";\n\nexport {\n default as scaleUtc\n} from \"./utcTime.js\";\n\nexport {\n default as scaleSequential,\n sequentialLog as scaleSequentialLog,\n sequentialPow as scaleSequentialPow,\n sequentialSqrt as scaleSequentialSqrt,\n sequentialSymlog as scaleSequentialSymlog\n} from \"./sequential.js\";\n\nexport {\n default as scaleSequentialQuantile\n} from \"./sequentialQuantile.js\";\n\nexport {\n default as scaleDiverging,\n divergingLog as scaleDivergingLog,\n divergingPow as scaleDivergingPow,\n divergingSqrt as scaleDivergingSqrt,\n divergingSymlog as scaleDivergingSymlog\n} from \"./diverging.js\";\n\nexport {\n default as tickFormat\n} from \"./tickFormat.js\";\n","export function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0: break;\n case 1: {\n if (typeof domain === \"function\") this.interpolator(domain);\n else this.range(domain);\n break;\n }\n default: {\n this.domain(domain);\n if (typeof interpolator === \"function\") this.interpolator(interpolator);\n else this.range(interpolator);\n break;\n }\n }\n return this;\n}\n","import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function(count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function(count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function(count) {\n if (count == null) count = 10;\n\n var d = domain();\n var i0 = 0;\n var i1 = d.length - 1;\n var start = d[i0];\n var stop = d[i1];\n var prestep;\n var step;\n var maxIter = 10;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n \n while (maxIter-- > 0) {\n step = tickIncrement(start, stop, count);\n if (step === prestep) {\n d[i0] = start\n d[i1] = stop\n return domain(d);\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n } else {\n break;\n }\n prestep = step;\n }\n\n return scale;\n };\n\n return scale;\n}\n\nexport default function linear() {\n var scale = continuous();\n\n scale.copy = function() {\n return copy(scale, linear());\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n","import {ticks} from \"d3-array\";\nimport {format, formatSpecifier} from \"d3-format\";\nimport nice from \"./nice.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformLog(x) {\n return Math.log(x);\n}\n\nfunction transformExp(x) {\n return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n return base === 10 ? pow10\n : base === Math.E ? Math.exp\n : x => Math.pow(base, x);\n}\n\nfunction logp(base) {\n return base === Math.E ? Math.log\n : base === 10 && Math.log10\n || base === 2 && Math.log2\n || (base = Math.log(base), x => Math.log(x) / base);\n}\n\nfunction reflect(f) {\n return (x, k) => -f(-x, k);\n}\n\nexport function loggish(transform) {\n const scale = transform(transformLog, transformExp);\n const domain = scale.domain;\n let base = 10;\n let logs;\n let pows;\n\n function rescale() {\n logs = logp(base), pows = powp(base);\n if (domain()[0] < 0) {\n logs = reflect(logs), pows = reflect(pows);\n transform(transformLogn, transformExpn);\n } else {\n transform(transformLog, transformExp);\n }\n return scale;\n }\n\n scale.base = function(_) {\n return arguments.length ? (base = +_, rescale()) : base;\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.ticks = count => {\n const d = domain();\n let u = d[0];\n let v = d[d.length - 1];\n const r = v < u;\n\n if (r) ([u, v] = [v, u]);\n\n let i = logs(u);\n let j = logs(v);\n let k;\n let t;\n const n = count == null ? 10 : +count;\n let z = [];\n\n if (!(base % 1) && j - i < n) {\n i = Math.floor(i), j = Math.ceil(j);\n if (u > 0) for (; i <= j; ++i) {\n for (k = 1; k < base; ++k) {\n t = i < 0 ? k / pows(-i) : k * pows(i);\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n } else for (; i <= j; ++i) {\n for (k = base - 1; k >= 1; --k) {\n t = i > 0 ? k / pows(-i) : k * pows(i);\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n }\n if (z.length * 2 < n) z = ticks(u, v, n);\n } else {\n z = ticks(i, j, Math.min(j - i, n)).map(pows);\n }\n return r ? z.reverse() : z;\n };\n\n scale.tickFormat = (count, specifier) => {\n if (count == null) count = 10;\n if (specifier == null) specifier = base === 10 ? \"s\" : \",\";\n if (typeof specifier !== \"function\") {\n if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;\n specifier = format(specifier);\n }\n if (count === Infinity) return specifier;\n const k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n return d => {\n let i = d / pows(Math.round(logs(d)));\n if (i * base < base - 0.5) i *= base;\n return i <= k ? specifier(d) : \"\";\n };\n };\n\n scale.nice = () => {\n return domain(nice(domain(), {\n floor: x => pows(Math.floor(logs(x))),\n ceil: x => pows(Math.ceil(logs(x)))\n }));\n };\n\n return scale;\n}\n\nexport default function log() {\n const scale = loggish(transformer()).domain([1, 10]);\n scale.copy = () => copy(scale, log()).base(scale.base());\n initRange.apply(scale, arguments);\n return scale;\n}\n","export default function nice(domain, interval) {\n domain = domain.slice();\n\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n t;\n\n if (x1 < x0) {\n t = i0, i0 = i1, i1 = t;\n t = x0, x0 = x1, x1 = t;\n }\n\n domain[i0] = interval.floor(x0);\n domain[i1] = interval.ceil(x1);\n return domain;\n}\n","export default function number(x) {\n return +x;\n}\n","import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n var index = new InternMap(),\n domain = [],\n range = [],\n unknown = implicit;\n\n function scale(d) {\n let i = index.get(d);\n if (i === undefined) {\n if (unknown !== implicit) return unknown;\n index.set(d, i = domain.push(d) - 1);\n }\n return range[i % range.length];\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = new InternMap();\n for (const value of _) {\n if (index.has(value)) continue;\n index.set(value, domain.push(value) - 1);\n }\n return scale;\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), scale) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return ordinal(domain, range).unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n","import {linearish} from \"./linear.js\";\nimport {copy, identity, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformPow(exponent) {\n return function(x) {\n return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n };\n}\n\nfunction transformSqrt(x) {\n return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n return x < 0 ? -x * x : x * x;\n}\n\nexport function powish(transform) {\n var scale = transform(identity, identity),\n exponent = 1;\n\n function rescale() {\n return exponent === 1 ? transform(identity, identity)\n : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n : transform(transformPow(exponent), transformPow(1 / exponent));\n }\n\n scale.exponent = function(_) {\n return arguments.length ? (exponent = +_, rescale()) : exponent;\n };\n\n return linearish(scale);\n}\n\nexport default function pow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, pow()).exponent(scale.exponent());\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n\nexport function sqrt() {\n return pow.apply(null, arguments).exponent(0.5);\n}\n","import {ascending, bisect, quantileSorted as threshold} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantile() {\n var domain = [],\n range = [],\n thresholds = [],\n unknown;\n\n function rescale() {\n var i = 0, n = Math.max(1, range.length);\n thresholds = new Array(n - 1);\n while (++i < n) thresholds[i - 1] = threshold(domain, i / n);\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];\n }\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN] : [\n i > 0 ? thresholds[i - 1] : domain[0],\n i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n ];\n };\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n domain.sort(ascending);\n return rescale();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.quantiles = function() {\n return thresholds.slice();\n };\n\n scale.copy = function() {\n return quantile()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\n","import {bisect} from \"d3-array\";\nimport {linearish} from \"./linear.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantize() {\n var x0 = 0,\n x1 = 1,\n n = 1,\n domain = [0.5],\n range = [0, 1],\n unknown;\n\n function scale(x) {\n return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n function rescale() {\n var i = -1;\n domain = new Array(n);\n while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);\n return scale;\n }\n\n scale.domain = function(_) {\n return arguments.length ? ([x0, x1] = _, x0 = +x0, x1 = +x1, rescale()) : [x0, x1];\n };\n\n scale.range = function(_) {\n return arguments.length ? (n = (range = Array.from(_)).length - 1, rescale()) : range.slice();\n };\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN]\n : i < 1 ? [x0, domain[0]]\n : i >= n ? [domain[n - 1], x1]\n : [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : scale;\n };\n\n scale.thresholds = function() {\n return domain.slice();\n };\n\n scale.copy = function() {\n return quantize()\n .domain([x0, x1])\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(linearish(scale), arguments);\n}\n","import continuous from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport number from \"./number.js\";\n\nfunction square(x) {\n return Math.sign(x) * x * x;\n}\n\nfunction unsquare(x) {\n return Math.sign(x) * Math.sqrt(Math.abs(x));\n}\n\nexport default function radial() {\n var squared = continuous(),\n range = [0, 1],\n round = false,\n unknown;\n\n function scale(x) {\n var y = unsquare(squared(x));\n return isNaN(y) ? unknown : round ? Math.round(y) : y;\n }\n\n scale.invert = function(y) {\n return squared.invert(square(y));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (squared.domain(_), scale) : squared.domain();\n };\n\n scale.range = function(_) {\n return arguments.length ? (squared.range((range = Array.from(_, number)).map(square)), scale) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return scale.range(_).round(true);\n };\n\n scale.round = function(_) {\n return arguments.length ? (round = !!_, scale) : round;\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (squared.clamp(_), scale) : squared.clamp();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return radial(squared.domain(), range)\n .round(round)\n .clamp(squared.clamp())\n .unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n","import {interpolate, interpolateRound} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 1,\n t0,\n t1,\n k10,\n transform,\n interpolator = identity,\n clamp = false,\n unknown;\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function(_) {\n return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n function range(interpolate) {\n return function(_) {\n var r0, r1;\n return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];\n };\n }\n\n scale.range = range(interpolate);\n\n scale.rangeRound = range(interpolateRound);\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t) {\n transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n return scale;\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .interpolator(source.interpolator())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport default function sequential() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function() {\n return copy(scale, sequential());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialLog() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function() {\n return copy(scale, sequentialLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialPow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSqrt() {\n return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n","import {ascending, bisect, quantile} from \"d3-array\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\n\nexport default function sequentialQuantile() {\n var domain = [],\n interpolator = identity;\n\n function scale(x) {\n if (x != null && !isNaN(x = +x)) return interpolator((bisect(domain, x, 1) - 1) / (domain.length - 1));\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n domain.sort(ascending);\n return scale;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n scale.range = function() {\n return domain.map((d, i) => interpolator(i / (domain.length - 1)));\n };\n\n scale.quantiles = function(n) {\n return Array.from({length: n + 1}, (_, i) => quantile(domain, i / n));\n };\n\n scale.copy = function() {\n return sequentialQuantile(interpolator).domain(domain);\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n","import {linearish} from \"./linear.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformSymlog(c) {\n return function(x) {\n return Math.sign(x) * Math.log1p(Math.abs(x / c));\n };\n}\n\nfunction transformSymexp(c) {\n return function(x) {\n return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n };\n}\n\nexport function symlogish(transform) {\n var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n scale.constant = function(_) {\n return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n };\n\n return linearish(scale);\n}\n\nexport default function symlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, symlog()).constant(scale.constant());\n };\n\n return initRange.apply(scale, arguments);\n}\n","import {bisect} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function threshold() {\n var domain = [0.5],\n range = [0, 1],\n unknown,\n n = 1;\n\n function scale(x) {\n return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n };\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return threshold()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\n","import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n switch (specifier.type) {\n case \"s\": {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\": {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n case \"f\":\n case \"%\": {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n return format(specifier);\n}\n","import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nfunction date(t) {\n return new Date(t);\n}\n\nfunction number(t) {\n return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n var scale = continuous(),\n invert = scale.invert,\n domain = scale.domain;\n\n var formatMillisecond = format(\".%L\"),\n formatSecond = format(\":%S\"),\n formatMinute = format(\"%I:%M\"),\n formatHour = format(\"%I %p\"),\n formatDay = format(\"%a %d\"),\n formatWeek = format(\"%b %d\"),\n formatMonth = format(\"%B\"),\n formatYear = format(\"%Y\");\n\n function tickFormat(date) {\n return (second(date) < date ? formatMillisecond\n : minute(date) < date ? formatSecond\n : hour(date) < date ? formatMinute\n : day(date) < date ? formatHour\n : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n : year(date) < date ? formatMonth\n : formatYear)(date);\n }\n\n scale.invert = function(y) {\n return new Date(invert(y));\n };\n\n scale.domain = function(_) {\n return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n };\n\n scale.ticks = function(interval) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n };\n\n scale.tickFormat = function(count, specifier) {\n return specifier == null ? tickFormat : format(specifier);\n };\n\n scale.nice = function(interval) {\n var d = domain();\n if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n return interval ? domain(nice(d, interval)) : scale;\n };\n\n scale.copy = function() {\n return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n };\n\n return scale;\n}\n\nexport default function time() {\n return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n","import {utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcTicks, utcTickInterval} from \"d3-time\";\nimport {utcFormat} from \"d3-time-format\";\nimport {calendar} from \"./time.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function utcTime() {\n return initRange.apply(calendar(utcTicks, utcTickInterval, utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n}\n","// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don’t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","import creator from \"./creator.js\";\nimport select from \"./select.js\";\n\nexport default function(name) {\n return select(creator(name).call(document.documentElement));\n}\n","import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n}\n\nfunction creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\n\nexport default function(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n}\n","export {default as create} from \"./create.js\";\nexport {default as creator} from \"./creator.js\";\nexport {default as local} from \"./local.js\";\nexport {default as matcher} from \"./matcher.js\";\nexport {default as namespace} from \"./namespace.js\";\nexport {default as namespaces} from \"./namespaces.js\";\nexport {default as pointer} from \"./pointer.js\";\nexport {default as pointers} from \"./pointers.js\";\nexport {default as select} from \"./select.js\";\nexport {default as selectAll} from \"./selectAll.js\";\nexport {default as selection} from \"./selection/index.js\";\nexport {default as selector} from \"./selector.js\";\nexport {default as selectorAll} from \"./selectorAll.js\";\nexport {styleValue as style} from \"./selection/style.js\";\nexport {default as window} from \"./window.js\";\n","var nextId = 0;\n\nexport default function local() {\n return new Local;\n}\n\nfunction Local() {\n this._ = \"@\" + (++nextId).toString(36);\n}\n\nLocal.prototype = local.prototype = {\n constructor: Local,\n get: function(node) {\n var id = this._;\n while (!(id in node)) if (!(node = node.parentNode)) return;\n return node[id];\n },\n set: function(node, value) {\n return node[this._] = value;\n },\n remove: function(node) {\n return this._ in node && delete node[this._];\n },\n toString: function() {\n return this._;\n }\n};\n","export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n\nexport function childMatcher(selector) {\n return function(node) {\n return node.matches(selector);\n };\n}\n\n","import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n","export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n","import sourceEvent from \"./sourceEvent.js\";\n\nexport default function(event, node) {\n event = sourceEvent(event);\n if (node === undefined) node = event.currentTarget;\n if (node) {\n var svg = node.ownerSVGElement || node;\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.clientX, point.y = event.clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n if (node.getBoundingClientRect) {\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n }\n }\n return [event.pageX, event.pageY];\n}\n","import pointer from \"./pointer.js\";\nimport sourceEvent from \"./sourceEvent.js\";\n\nexport default function(events, node) {\n if (events.target) { // i.e., instanceof Event, not TouchList or iterable\n events = sourceEvent(events);\n if (node === undefined) node = events.currentTarget;\n events = events.touches || [events];\n }\n return Array.from(events, event => pointer(event, node));\n}\n","import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n}\n","import array from \"./array.js\";\nimport {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([document.querySelectorAll(selector)], [document.documentElement])\n : new Selection([array(selector)], root);\n}\n","import creator from \"../creator.js\";\n\nexport default function(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n}\n","import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n}\n\nfunction attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\n\nfunction attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n}\n\nfunction attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n","export default function() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}\n","function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\n\nfunction classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n}\n\nfunction classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n}\n\nfunction classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\n\nexport default function(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n}\n","function selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n","import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don’t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = new Map,\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n exit[i] = node;\n }\n }\n}\n\nfunction datum(node) {\n return node.__data__;\n}\n\nexport default function(value, key) {\n if (!arguments.length) return Array.from(this, datum);\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn’t worried about “live” collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don’t; we’d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n return typeof data === \"object\" && \"length\" in data\n ? data // Array, TypedArray, NodeList, array-like\n : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n","export default function(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n}\n","import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n}\n\nfunction dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\n\nexport default function(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n}\n","export default function(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n}\n","export default function() {\n return !this.node();\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n","import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","function htmlRemove() {\n this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n}\n\nfunction htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n}\n","import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\n\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n return this;\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n selection: selection_selection,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch,\n [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n","import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n return null;\n}\n\nexport default function(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}\n","export default function*() {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) yield node;\n }\n }\n}\n","export default function(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n if (typeof onenter === \"function\") {\n enter = onenter(enter);\n if (enter) enter = enter.selection();\n } else {\n enter = enter.append(onenter + \"\");\n }\n if (onupdate != null) {\n update = onupdate(update);\n if (update) update = update.selection();\n }\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\n","function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n return this.each(lower);\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(context) {\n var selection = context.selection ? context.selection() : context;\n\n 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) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n}\n","export default function() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}\n","export default function() {\n return Array.from(this);\n}\n","function contextListener(listener) {\n return function(event) {\n listener.call(this, event, this.__data__);\n };\n}\n\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n}\n\nfunction onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n}\n\nfunction onAdd(typename, value, options) {\n return function() {\n var on = this.__on, o, listener = contextListener(value);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, options) {\n var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n return this;\n}\n","export default function() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n}\n","function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n}\n\nfunction propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n}\n\nfunction propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n}\n\nexport default function(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n}\n","function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n return this.each(raise);\n}\n","function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n return this.each(remove);\n}\n","import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n return function() {\n return array(select.apply(this, arguments));\n };\n}\n\nexport default function(select) {\n if (typeof select === \"function\") select = arrayAll(select);\n else select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n}\n","import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n return function() {\n return find.call(this.children, match);\n };\n}\n\nfunction childFirst() {\n return this.firstElementChild;\n}\n\nexport default function(match) {\n return this.select(match == null ? childFirst\n : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n return function() {\n return filter.call(this.children, match);\n };\n}\n\nexport default function(match) {\n return this.selectAll(match == null ? children\n : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","export default function() {\n let size = 0;\n for (const node of this) ++size; // eslint-disable-line no-unused-vars\n return size;\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n if (!compare) compare = ascending;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","export default function(update) {\n return new Array(update.length);\n}\n","import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n}\n\nfunction styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n}\n\nexport default function(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n","function textRemove() {\n this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n}\n","function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n","function empty() {\n return [];\n}\n\nexport default function(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n}\n","export default function(event) {\n let sourceEvent;\n while (sourceEvent = event.sourceEvent) event = sourceEvent;\n return event;\n}\n","export default function(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n}\n","import constant from \"./constant.js\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math.js\";\nimport {withPath} from \"./path.js\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null,\n path = withPath(arc);\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc;\n\n // Restrict the corner radius according to the sector angle. If this\n // intersection fails, it’s probably because the arc is too small, so\n // disable the corner radius entirely.\n if (da < pi) {\n if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = min(rc, (r0 - lc) / (kc - 1));\n rc1 = min(rc, (r1 - lc) / (kc + 1));\n } else {\n rc0 = rc1 = 0;\n }\n }\n }\n\n // Is the sector collapsed to a line?\n if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n // Does the sector’s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n // Does the sector’s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function() {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [cos(a) * r, sin(a) * r];\n };\n\n arc.innerRadius = function(_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function(_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function(_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function(_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n };\n\n return arc;\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport line from \"./line.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x0, y0, y1) {\n var x1 = null,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(area);\n\n x0 = typeof x0 === \"function\" ? x0 : (x0 === undefined) ? pointX : constant(+x0);\n y0 = typeof y0 === \"function\" ? y0 : (y0 === undefined) ? constant(0) : constant(+y0);\n y1 = typeof y1 === \"function\" ? y1 : (y1 === undefined) ? pointY : constant(+y1);\n\n function area(data) {\n var i,\n j,\n k,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer,\n x0z = new Array(n),\n y0z = new Array(n);\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) {\n j = i;\n output.areaStart();\n output.lineStart();\n } else {\n output.lineEnd();\n output.lineStart();\n for (k = i - 1; k >= j; --k) {\n output.point(x0z[k], y0z[k]);\n }\n output.lineEnd();\n output.areaEnd();\n }\n }\n if (defined0) {\n x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n }\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n function arealine() {\n return line().defined(defined).curve(curve).context(context);\n }\n\n area.x = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), x1 = null, area) : x0;\n };\n\n area.x0 = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), area) : x0;\n };\n\n area.x1 = function(_) {\n return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : x1;\n };\n\n area.y = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), y1 = null, area) : y0;\n };\n\n area.y0 = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), area) : y0;\n };\n\n area.y1 = function(_) {\n return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : y1;\n };\n\n area.lineX0 =\n area.lineY0 = function() {\n return arealine().x(x0).y(y0);\n };\n\n area.lineY1 = function() {\n return arealine().x(x0).y(y1);\n };\n\n area.lineX1 = function() {\n return arealine().x(x1).y(y0);\n };\n\n area.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), area) : defined;\n };\n\n area.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n };\n\n area.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n };\n\n return area;\n}\n","import curveRadial, {curveRadialLinear} from \"./curve/radial.js\";\nimport area from \"./area.js\";\nimport {lineRadial} from \"./lineRadial.js\";\n\nexport default function() {\n var a = area().curve(curveRadialLinear),\n c = a.curve,\n x0 = a.lineX0,\n x1 = a.lineX1,\n y0 = a.lineY0,\n y1 = a.lineY1;\n\n a.angle = a.x, delete a.x;\n a.startAngle = a.x0, delete a.x0;\n a.endAngle = a.x1, delete a.x1;\n a.radius = a.y, delete a.y;\n a.innerRadius = a.y0, delete a.y0;\n a.outerRadius = a.y1, delete a.y1;\n a.lineStartAngle = function() { return lineRadial(x0()); }, delete a.lineX0;\n a.lineEndAngle = function() { return lineRadial(x1()); }, delete a.lineX1;\n a.lineInnerRadius = function() { return lineRadial(y0()); }, delete a.lineY0;\n a.lineOuterRadius = function() { return lineRadial(y1()); }, delete a.lineY1;\n\n a.curve = function(_) {\n return arguments.length ? c(curveRadial(_)) : c()._curve;\n };\n\n return a;\n}\n","export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n (2 * that._x0 + that._x1) / 3,\n (2 * that._y0 + that._y1) / 3,\n (that._x0 + 2 * that._x1) / 3,\n (that._y0 + 2 * that._y1) / 3,\n (that._x0 + 4 * that._x1 + x) / 6,\n (that._y0 + 4 * that._y1 + y) / 6\n );\n}\n\nexport function Basis(context) {\n this._context = context;\n}\n\nBasis.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 3: point(this, this._x1, this._y1); // falls through\n case 2: this._context.lineTo(this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new Basis(context);\n}\n","import noop from \"../noop.js\";\nimport {point} from \"./basis.js\";\n\nfunction BasisClosed(context) {\n this._context = context;\n}\n\nBasisClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x2, this._y2);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x2, this._y2);\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisClosed(context);\n}\n","import {point} from \"./basis.js\";\n\nfunction BasisOpen(context) {\n this._context = context;\n}\n\nBasisOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisOpen(context);\n}\n","import pointRadial from \"../pointRadial.js\";\n\nclass Bump {\n constructor(context, x) {\n this._context = context;\n this._x = x;\n }\n areaStart() {\n this._line = 0;\n }\n areaEnd() {\n this._line = NaN;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n }\n point(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: {\n this._point = 1;\n if (this._line) this._context.lineTo(x, y);\n else this._context.moveTo(x, y);\n break;\n }\n case 1: this._point = 2; // falls through\n default: {\n if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y);\n else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y);\n break;\n }\n }\n this._x0 = x, this._y0 = y;\n }\n}\n\nclass BumpRadial {\n constructor(context) {\n this._context = context;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {}\n point(x, y) {\n x = +x, y = +y;\n if (this._point === 0) {\n this._point = 1;\n } else {\n const p0 = pointRadial(this._x0, this._y0);\n const p1 = pointRadial(this._x0, this._y0 = (this._y0 + y) / 2);\n const p2 = pointRadial(x, this._y0);\n const p3 = pointRadial(x, y);\n this._context.moveTo(...p0);\n this._context.bezierCurveTo(...p1, ...p2, ...p3);\n }\n this._x0 = x, this._y0 = y;\n }\n}\n\nexport function bumpX(context) {\n return new Bump(context, true);\n}\n\nexport function bumpY(context) {\n return new Bump(context, false);\n}\n\nexport function bumpRadial(context) {\n return new BumpRadial(context);\n}\n","import {Basis} from \"./basis.js\";\n\nfunction Bundle(context, beta) {\n this._basis = new Basis(context);\n this._beta = beta;\n}\n\nBundle.prototype = {\n lineStart: function() {\n this._x = [];\n this._y = [];\n this._basis.lineStart();\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n j = x.length - 1;\n\n if (j > 0) {\n var x0 = x[0],\n y0 = y[0],\n dx = x[j] - x0,\n dy = y[j] - y0,\n i = -1,\n t;\n\n while (++i <= j) {\n t = i / j;\n this._basis.point(\n this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n );\n }\n }\n\n this._x = this._y = null;\n this._basis.lineEnd();\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\nexport default (function custom(beta) {\n\n function bundle(context) {\n return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n }\n\n bundle.beta = function(beta) {\n return custom(+beta);\n };\n\n return bundle;\n})(0.85);\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import noop from \"../noop.js\";\nimport {point} from \"./cardinal.js\";\n\nexport function CardinalClosed(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalClosed(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {point} from \"./cardinal.js\";\n\nexport function CardinalOpen(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalOpen(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {epsilon} from \"../math.js\";\nimport {Cardinal} from \"./cardinal.js\";\n\nexport function point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: this.point(this._x2, this._y2); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; // falls through\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalClosed} from \"./cardinalClosed.js\";\nimport noop from \"../noop.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomClosed(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalOpen} from \"./cardinalOpen.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomOpen(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","import noop from \"../noop.js\";\n\nfunction LinearClosed(context) {\n this._context = context;\n}\n\nLinearClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._point) this._context.closePath();\n },\n point: function(x, y) {\n x = +x, y = +y;\n if (this._point) this._context.lineTo(x, y);\n else this._point = 1, this._context.moveTo(x, y);\n }\n};\n\nexport default function(context) {\n return new LinearClosed(context);\n}\n","function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n","function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n a[n - 1] = r[n - 1] / b[n - 1];\n for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n return [a, b];\n}\n\nexport default function(context) {\n return new Natural(context);\n}\n","import curveLinear from \"./linear.js\";\n\nexport var curveRadialLinear = curveRadial(curveLinear);\n\nfunction Radial(curve) {\n this._curve = curve;\n}\n\nRadial.prototype = {\n areaStart: function() {\n this._curve.areaStart();\n },\n areaEnd: function() {\n this._curve.areaEnd();\n },\n lineStart: function() {\n this._curve.lineStart();\n },\n lineEnd: function() {\n this._curve.lineEnd();\n },\n point: function(a, r) {\n this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n }\n};\n\nexport default function curveRadial(curve) {\n\n function radial(context) {\n return new Radial(curve(context));\n }\n\n radial._curve = curve;\n\n return radial;\n}\n","function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\n}\n","export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","export default function(d) {\n return d;\n}\n","export {default as arc} from \"./arc.js\";\nexport {default as area} from \"./area.js\";\nexport {default as line} from \"./line.js\";\nexport {default as pie} from \"./pie.js\";\nexport {default as areaRadial, default as radialArea} from \"./areaRadial.js\"; // Note: radialArea is deprecated!\nexport {default as lineRadial, default as radialLine} from \"./lineRadial.js\"; // Note: radialLine is deprecated!\nexport {default as pointRadial} from \"./pointRadial.js\";\nexport {link, linkHorizontal, linkVertical, linkRadial} from \"./link.js\";\n\nexport {default as symbol, symbolsStroke, symbolsFill, symbolsFill as symbols} from \"./symbol.js\";\nexport {default as symbolAsterisk} from \"./symbol/asterisk.js\";\nexport {default as symbolCircle} from \"./symbol/circle.js\";\nexport {default as symbolCross} from \"./symbol/cross.js\";\nexport {default as symbolDiamond} from \"./symbol/diamond.js\";\nexport {default as symbolDiamond2} from \"./symbol/diamond2.js\";\nexport {default as symbolPlus} from \"./symbol/plus.js\";\nexport {default as symbolSquare} from \"./symbol/square.js\";\nexport {default as symbolSquare2} from \"./symbol/square2.js\";\nexport {default as symbolStar} from \"./symbol/star.js\";\nexport {default as symbolTriangle} from \"./symbol/triangle.js\";\nexport {default as symbolTriangle2} from \"./symbol/triangle2.js\";\nexport {default as symbolWye} from \"./symbol/wye.js\";\nexport {default as symbolTimes, default as symbolX} from \"./symbol/times.js\";\n\nexport {default as curveBasisClosed} from \"./curve/basisClosed.js\";\nexport {default as curveBasisOpen} from \"./curve/basisOpen.js\";\nexport {default as curveBasis} from \"./curve/basis.js\";\nexport {bumpX as curveBumpX, bumpY as curveBumpY} from \"./curve/bump.js\";\nexport {default as curveBundle} from \"./curve/bundle.js\";\nexport {default as curveCardinalClosed} from \"./curve/cardinalClosed.js\";\nexport {default as curveCardinalOpen} from \"./curve/cardinalOpen.js\";\nexport {default as curveCardinal} from \"./curve/cardinal.js\";\nexport {default as curveCatmullRomClosed} from \"./curve/catmullRomClosed.js\";\nexport {default as curveCatmullRomOpen} from \"./curve/catmullRomOpen.js\";\nexport {default as curveCatmullRom} from \"./curve/catmullRom.js\";\nexport {default as curveLinearClosed} from \"./curve/linearClosed.js\";\nexport {default as curveLinear} from \"./curve/linear.js\";\nexport {monotoneX as curveMonotoneX, monotoneY as curveMonotoneY} from \"./curve/monotone.js\";\nexport {default as curveNatural} from \"./curve/natural.js\";\nexport {default as curveStep, stepAfter as curveStepAfter, stepBefore as curveStepBefore} from \"./curve/step.js\";\n\nexport {default as stack} from \"./stack.js\";\nexport {default as stackOffsetExpand} from \"./offset/expand.js\";\nexport {default as stackOffsetDiverging} from \"./offset/diverging.js\";\nexport {default as stackOffsetNone} from \"./offset/none.js\";\nexport {default as stackOffsetSilhouette} from \"./offset/silhouette.js\";\nexport {default as stackOffsetWiggle} from \"./offset/wiggle.js\";\nexport {default as stackOrderAppearance} from \"./order/appearance.js\";\nexport {default as stackOrderAscending} from \"./order/ascending.js\";\nexport {default as stackOrderDescending} from \"./order/descending.js\";\nexport {default as stackOrderInsideOut} from \"./order/insideOut.js\";\nexport {default as stackOrderNone} from \"./order/none.js\";\nexport {default as stackOrderReverse} from \"./order/reverse.js\";\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n","import curveRadial, {curveRadialLinear} from \"./curve/radial.js\";\nimport line from \"./line.js\";\n\nexport function lineRadial(l) {\n var c = l.curve;\n\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n\n l.curve = function(_) {\n return arguments.length ? c(curveRadial(_)) : c()._curve;\n };\n\n return l;\n}\n\nexport default function() {\n return lineRadial(line().curve(curveRadialLinear));\n}\n","import {slice} from \"./array.js\";\nimport constant from \"./constant.js\";\nimport {bumpX, bumpY, bumpRadial} from \"./curve/bump.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nfunction linkSource(d) {\n return d.source;\n}\n\nfunction linkTarget(d) {\n return d.target;\n}\n\nexport function link(curve) {\n let source = linkSource,\n target = linkTarget,\n x = pointX,\n y = pointY,\n context = null,\n output = null,\n path = withPath(link);\n\n function link() {\n let buffer;\n const argv = slice.call(arguments);\n const s = source.apply(this, argv);\n const t = target.apply(this, argv);\n if (context == null) output = curve(buffer = path());\n output.lineStart();\n argv[0] = s, output.point(+x.apply(this, argv), +y.apply(this, argv));\n argv[0] = t, output.point(+x.apply(this, argv), +y.apply(this, argv));\n output.lineEnd();\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n link.source = function(_) {\n return arguments.length ? (source = _, link) : source;\n };\n\n link.target = function(_) {\n return arguments.length ? (target = _, link) : target;\n };\n\n link.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), link) : x;\n };\n\n link.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), link) : y;\n };\n\n link.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), link) : context;\n };\n\n return link;\n}\n\nexport function linkHorizontal() {\n return link(bumpX);\n}\n\nexport function linkVertical() {\n return link(bumpY);\n}\n\nexport function linkRadial() {\n const l = link(bumpRadial);\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n return l;\n}\n","export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","export default function() {}\n","export default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {\n for (yp = yn = 0, i = 0; i < n; ++i) {\n if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) {\n d[0] = yp, d[1] = yp += dy;\n } else if (dy < 0) {\n d[1] = yn, d[0] = yn += dy;\n } else {\n d[0] = 0, d[1] = dy;\n }\n }\n }\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;\n if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;\n }\n none(series, order);\n}\n","export default function(series, order) {\n if (!((n = series.length) > 1)) return;\n for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {\n s0 = s1, s1 = series[order[i]];\n for (j = 0; j < m; ++j) {\n s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];\n }\n }\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;\n s0[j][1] += s0[j][0] = -y / 2;\n }\n none(series, order);\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n var si = series[order[i]],\n sij0 = si[j][1] || 0,\n sij1 = si[j - 1][1] || 0,\n s3 = (sij0 - sij1) / 2;\n for (var k = 0; k < i; ++k) {\n var sk = series[order[k]],\n skj0 = sk[j][1] || 0,\n skj1 = sk[j - 1][1] || 0;\n s3 += skj0 - skj1;\n }\n s1 += sij0, s2 += s3 * sij0;\n }\n s0[j - 1][1] += s0[j - 1][0] = y;\n if (s1) y -= s2 / s1;\n }\n s0[j - 1][1] += s0[j - 1][0] = y;\n none(series, order);\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n var peaks = series.map(peak);\n return none(series).sort(function(a, b) { return peaks[a] - peaks[b]; });\n}\n\nfunction peak(series) {\n var i = -1, j = 0, n = series.length, vi, vj = -Infinity;\n while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i;\n return j;\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n var sums = series.map(sum);\n return none(series).sort(function(a, b) { return sums[a] - sums[b]; });\n}\n\nexport function sum(series) {\n var s = 0, i = -1, n = series.length, v;\n while (++i < n) if (v = +series[i][1]) s += v;\n return s;\n}\n","import ascending from \"./ascending.js\";\n\nexport default function(series) {\n return ascending(series).reverse();\n}\n","import appearance from \"./appearance.js\";\nimport {sum} from \"./ascending.js\";\n\nexport default function(series) {\n var n = series.length,\n i,\n j,\n sums = series.map(sum),\n order = appearance(series),\n top = 0,\n bottom = 0,\n tops = [],\n bottoms = [];\n\n for (i = 0; i < n; ++i) {\n j = order[i];\n if (top < bottom) {\n top += sums[j];\n tops.push(j);\n } else {\n bottom += sums[j];\n bottoms.push(j);\n }\n }\n\n return bottoms.reverse().concat(tops);\n}\n","export default function(series) {\n var n = series.length, o = new Array(n);\n while (--n >= 0) o[n] = n;\n return o;\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n return none(series).reverse();\n}\n","import {Path} from \"d3-path\";\n\nexport function withPath(shape) {\n let digits = 3;\n\n shape.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) {\n digits = null;\n } else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n return shape;\n };\n\n return () => new Path(digits);\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = (data = array(data)).length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","export default function(x, y) {\n return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport offsetNone from \"./offset/none.js\";\nimport orderNone from \"./order/none.js\";\n\nfunction stackValue(d, key) {\n return d[key];\n}\n\nfunction stackSeries(key) {\n const series = [];\n series.key = key;\n return series;\n}\n\nexport default function() {\n var keys = constant([]),\n order = orderNone,\n offset = offsetNone,\n value = stackValue;\n\n function stack(data) {\n var sz = Array.from(keys.apply(this, arguments), stackSeries),\n i, n = sz.length, j = -1,\n oz;\n\n for (const d of data) {\n for (i = 0, ++j; i < n; ++i) {\n (sz[i][j] = [0, +value(d, sz[i].key, j, data)]).data = d;\n }\n }\n\n for (i = 0, oz = array(order(sz)); i < n; ++i) {\n sz[oz[i]].index = i;\n }\n\n offset(sz, oz);\n return sz;\n }\n\n stack.keys = function(_) {\n return arguments.length ? (keys = typeof _ === \"function\" ? _ : constant(Array.from(_)), stack) : keys;\n };\n\n stack.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), stack) : value;\n };\n\n stack.order = function(_) {\n return arguments.length ? (order = _ == null ? orderNone : typeof _ === \"function\" ? _ : constant(Array.from(_)), stack) : order;\n };\n\n stack.offset = function(_) {\n return arguments.length ? (offset = _ == null ? offsetNone : _, stack) : offset;\n };\n\n return stack;\n}\n","import constant from \"./constant.js\";\nimport {withPath} from \"./path.js\";\nimport asterisk from \"./symbol/asterisk.js\";\nimport circle from \"./symbol/circle.js\";\nimport cross from \"./symbol/cross.js\";\nimport diamond from \"./symbol/diamond.js\";\nimport diamond2 from \"./symbol/diamond2.js\";\nimport plus from \"./symbol/plus.js\";\nimport square from \"./symbol/square.js\";\nimport square2 from \"./symbol/square2.js\";\nimport star from \"./symbol/star.js\";\nimport triangle from \"./symbol/triangle.js\";\nimport triangle2 from \"./symbol/triangle2.js\";\nimport wye from \"./symbol/wye.js\";\nimport times from \"./symbol/times.js\";\n\n// These symbols are designed to be filled.\nexport const symbolsFill = [\n circle,\n cross,\n diamond,\n square,\n star,\n triangle,\n wye\n];\n\n// These symbols are designed to be stroked (with a width of 1.5px and round caps).\nexport const symbolsStroke = [\n circle,\n plus,\n times,\n triangle2,\n asterisk,\n square2,\n diamond2\n];\n\nexport default function Symbol(type, size) {\n let context = null,\n path = withPath(symbol);\n\n type = typeof type === \"function\" ? type : constant(type || circle);\n size = typeof size === \"function\" ? size : constant(size === undefined ? 64 : +size);\n\n function symbol() {\n let buffer;\n if (!context) context = buffer = path();\n type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n symbol.type = function(_) {\n return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n };\n\n symbol.size = function(_) {\n return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n };\n\n symbol.context = function(_) {\n return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n };\n\n return symbol;\n}\n","import {min, sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n draw(context, size) {\n const r = sqrt(size + min(size / 28, 0.75)) * 0.59436;\n const t = r / 2;\n const u = t * sqrt3;\n context.moveTo(0, r);\n context.lineTo(0, -r);\n context.moveTo(-u, -t);\n context.lineTo(u, t);\n context.moveTo(-u, t);\n context.lineTo(u, -t);\n }\n};\n","import {pi, sqrt, tau} from \"../math.js\";\n\nexport default {\n draw(context, size) {\n const r = sqrt(size / pi);\n context.moveTo(r, 0);\n context.arc(0, 0, r, 0, tau);\n }\n};\n","import {sqrt} from \"../math.js\";\n\nexport default {\n draw(context, size) {\n const r = sqrt(size / 5) / 2;\n context.moveTo(-3 * r, -r);\n context.lineTo(-r, -r);\n context.lineTo(-r, -3 * r);\n context.lineTo(r, -3 * r);\n context.lineTo(r, -r);\n context.lineTo(3 * r, -r);\n context.lineTo(3 * r, r);\n context.lineTo(r, r);\n context.lineTo(r, 3 * r);\n context.lineTo(-r, 3 * r);\n context.lineTo(-r, r);\n context.lineTo(-3 * r, r);\n context.closePath();\n }\n};\n","import {sqrt} from \"../math.js\";\n\nconst tan30 = sqrt(1 / 3);\nconst tan30_2 = tan30 * 2;\n\nexport default {\n draw(context, size) {\n const y = sqrt(size / tan30_2);\n const x = y * tan30;\n context.moveTo(0, -y);\n context.lineTo(x, 0);\n context.lineTo(0, y);\n context.lineTo(-x, 0);\n context.closePath();\n }\n};\n","import {sqrt} from \"../math.js\";\n\nexport default {\n draw(context, size) {\n const r = sqrt(size) * 0.62625;\n context.moveTo(0, -r);\n context.lineTo(r, 0);\n context.lineTo(0, r);\n context.lineTo(-r, 0);\n context.closePath();\n }\n};\n","import {min, sqrt} from \"../math.js\";\n\nexport default {\n draw(context, size) {\n const r = sqrt(size - min(size / 7, 2)) * 0.87559;\n context.moveTo(-r, 0);\n context.lineTo(r, 0);\n context.moveTo(0, r);\n context.lineTo(0, -r);\n }\n};\n","import {sqrt} from \"../math.js\";\n\nexport default {\n draw(context, size) {\n const w = sqrt(size);\n const x = -w / 2;\n context.rect(x, x, w, w);\n }\n};\n","import {sqrt} from \"../math.js\";\n\nexport default {\n draw(context, size) {\n const r = sqrt(size) * 0.4431;\n context.moveTo(r, r);\n context.lineTo(r, -r);\n context.lineTo(-r, -r);\n context.lineTo(-r, r);\n context.closePath();\n }\n};\n","import {sin, cos, sqrt, pi, tau} from \"../math.js\";\n\nconst ka = 0.89081309152928522810;\nconst kr = sin(pi / 10) / sin(7 * pi / 10);\nconst kx = sin(tau / 10) * kr;\nconst ky = -cos(tau / 10) * kr;\n\nexport default {\n draw(context, size) {\n const r = sqrt(size * ka);\n const x = kx * r;\n const y = ky * r;\n context.moveTo(0, -r);\n context.lineTo(x, y);\n for (let i = 1; i < 5; ++i) {\n const a = tau * i / 5;\n const c = cos(a);\n const s = sin(a);\n context.lineTo(s * r, -c * r);\n context.lineTo(c * x - s * y, s * x + c * y);\n }\n context.closePath();\n }\n};\n","import {min, sqrt} from \"../math.js\";\n\nexport default {\n draw(context, size) {\n const r = sqrt(size - min(size / 6, 1.7)) * 0.6189;\n context.moveTo(-r, -r);\n context.lineTo(r, r);\n context.moveTo(-r, r);\n context.lineTo(r, -r);\n }\n};\n","import {sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n draw(context, size) {\n const y = -sqrt(size / (sqrt3 * 3));\n context.moveTo(0, y * 2);\n context.lineTo(-sqrt3 * y, -y);\n context.lineTo(sqrt3 * y, -y);\n context.closePath();\n }\n};\n","import {sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n draw(context, size) {\n const s = sqrt(size) * 0.6824;\n const t = s / 2;\n const u = (s * sqrt3) / 2; // cos(Math.PI / 6)\n context.moveTo(0, -s);\n context.lineTo(u, t);\n context.lineTo(-u, t);\n context.closePath();\n }\n};\n","import {sqrt} from \"../math.js\";\n\nconst c = -0.5;\nconst s = sqrt(3) / 2;\nconst k = 1 / sqrt(12);\nconst a = (k / 2 + 1) * 3;\n\nexport default {\n draw(context, size) {\n const r = sqrt(size / a);\n const x0 = r / 2, y0 = r * k;\n const x1 = x0, y1 = r * k + r;\n const x2 = -x1, y2 = y1;\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n context.lineTo(x2, y2);\n context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n context.closePath();\n }\n};\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}\n","export {default as timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse} from \"./defaultLocale.js\";\nexport {default as timeFormatLocale} from \"./locale.js\";\nexport {default as isoFormat} from \"./isoFormat.js\";\nexport {default as isoParse} from \"./isoParse.js\";\n","import {utcFormat} from \"./defaultLocale.js\";\n\nexport var isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\nfunction formatIsoNative(date) {\n return date.toISOString();\n}\n\nvar formatIso = Date.prototype.toISOString\n ? formatIsoNative\n : utcFormat(isoSpecifier);\n\nexport default formatIso;\n","import {isoSpecifier} from \"./isoFormat.js\";\nimport {utcParse} from \"./defaultLocale.js\";\n\nfunction parseIsoNative(string) {\n var date = new Date(string);\n return isNaN(date) ? null : date;\n}\n\nvar parseIso = +new Date(\"2000-01-01T00:00:00.000Z\")\n ? parseIsoNative\n : utcParse(isoSpecifier);\n\nexport default parseIso;\n","import {\n timeDay,\n timeSunday,\n timeMonday,\n timeThursday,\n timeYear,\n utcDay,\n utcSunday,\n utcMonday,\n utcThursday,\n utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}\n","import {timeInterval} from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nexport const timeDay = timeInterval(\n date => date.setHours(0, 0, 0, 0),\n (date, step) => date.setDate(date.getDate() + step),\n (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n date => date.getDate() - 1\n);\n\nexport const timeDays = timeDay.range;\n\nexport const utcDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return date.getUTCDate() - 1;\n});\n\nexport const utcDays = utcDay.range;\n\nexport const unixDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return Math.floor(date / durationDay);\n});\n\nexport const unixDays = unixDay.range;\n","export const durationSecond = 1000;\nexport const durationMinute = durationSecond * 60;\nexport const durationHour = durationMinute * 60;\nexport const durationDay = durationHour * 24;\nexport const durationWeek = durationDay * 7;\nexport const durationMonth = durationDay * 30;\nexport const durationYear = durationDay * 365;\n","import {timeInterval} from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeHour = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, (date) => {\n return date.getHours();\n});\n\nexport const timeHours = timeHour.range;\n\nexport const utcHour = timeInterval((date) => {\n date.setUTCMinutes(0, 0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, (date) => {\n return date.getUTCHours();\n});\n\nexport const utcHours = utcHour.range;\n","export {\n timeInterval\n} from \"./interval.js\";\n\nexport {\n millisecond as utcMillisecond,\n milliseconds as utcMilliseconds,\n millisecond as timeMillisecond,\n milliseconds as timeMilliseconds\n} from \"./millisecond.js\";\n\nexport {\n second as utcSecond,\n seconds as utcSeconds,\n second as timeSecond,\n seconds as timeSeconds\n} from \"./second.js\";\n\nexport {\n timeMinute,\n timeMinutes,\n utcMinute,\n utcMinutes\n} from \"./minute.js\";\n\nexport {\n timeHour,\n timeHours,\n utcHour,\n utcHours\n} from \"./hour.js\";\n\nexport {\n timeDay,\n timeDays,\n utcDay,\n utcDays,\n unixDay,\n unixDays\n} from \"./day.js\";\n\nexport {\n timeSunday as timeWeek,\n timeSundays as timeWeeks,\n timeSunday,\n timeSundays,\n timeMonday,\n timeMondays,\n timeTuesday,\n timeTuesdays,\n timeWednesday,\n timeWednesdays,\n timeThursday,\n timeThursdays,\n timeFriday,\n timeFridays,\n timeSaturday,\n timeSaturdays,\n utcSunday as utcWeek,\n utcSundays as utcWeeks,\n utcSunday,\n utcSundays,\n utcMonday,\n utcMondays,\n utcTuesday,\n utcTuesdays,\n utcWednesday,\n utcWednesdays,\n utcThursday,\n utcThursdays,\n utcFriday,\n utcFridays,\n utcSaturday,\n utcSaturdays\n} from \"./week.js\";\n\nexport {\n timeMonth,\n timeMonths,\n utcMonth,\n utcMonths\n} from \"./month.js\";\n\nexport {\n timeYear,\n timeYears,\n utcYear,\n utcYears\n} from \"./year.js\";\n\nexport {\n utcTicks,\n utcTickInterval,\n timeTicks,\n timeTickInterval\n} from \"./ticks.js\";\n","const t0 = new Date, t1 = new Date;\n\nexport function timeInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = (date) => {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = (date) => {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = (date) => {\n const d0 = interval(date), d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = (date, step) => {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = (start, stop, step) => {\n const range = [];\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n let previous;\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = (test) => {\n return timeInterval((date) => {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, (date, step) => {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = (start, end) => {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = (step) => {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? (d) => field(d) % step === 0\n : (d) => interval.count(0, d) % step === 0);\n };\n }\n\n return interval;\n}\n","import {timeInterval} from \"./interval.js\";\n\nexport const millisecond = timeInterval(() => {\n // noop\n}, (date, step) => {\n date.setTime(+date + step);\n}, (start, end) => {\n return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = (k) => {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return timeInterval((date) => {\n date.setTime(Math.floor(date / k) * k);\n }, (date, step) => {\n date.setTime(+date + step * k);\n }, (start, end) => {\n return (end - start) / k;\n });\n};\n\nexport const milliseconds = millisecond.range;\n","import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeMinute = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, (date) => {\n return date.getMinutes();\n});\n\nexport const timeMinutes = timeMinute.range;\n\nexport const utcMinute = timeInterval((date) => {\n date.setUTCSeconds(0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, (date) => {\n return date.getUTCMinutes();\n});\n\nexport const utcMinutes = utcMinute.range;\n","import {timeInterval} from \"./interval.js\";\n\nexport const timeMonth = timeInterval((date) => {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setMonth(date.getMonth() + step);\n}, (start, end) => {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, (date) => {\n return date.getMonth();\n});\n\nexport const timeMonths = timeMonth.range;\n\nexport const utcMonth = timeInterval((date) => {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, (start, end) => {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, (date) => {\n return date.getUTCMonth();\n});\n\nexport const utcMonths = utcMonth.range;\n","import {timeInterval} from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nexport const second = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds());\n}, (date, step) => {\n date.setTime(+date + step * durationSecond);\n}, (start, end) => {\n return (end - start) / durationSecond;\n}, (date) => {\n return date.getUTCSeconds();\n});\n\nexport const seconds = second.range;\n","import {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport {millisecond} from \"./millisecond.js\";\nimport {second} from \"./second.js\";\nimport {timeMinute, utcMinute} from \"./minute.js\";\nimport {timeHour, utcHour} from \"./hour.js\";\nimport {timeDay, unixDay} from \"./day.js\";\nimport {timeSunday, utcSunday} from \"./week.js\";\nimport {timeMonth, utcMonth} from \"./month.js\";\nimport {timeYear, utcYear} from \"./year.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n const tickIntervals = [\n [second, 1, durationSecond],\n [second, 5, 5 * durationSecond],\n [second, 15, 15 * durationSecond],\n [second, 30, 30 * durationSecond],\n [minute, 1, durationMinute],\n [minute, 5, 5 * durationMinute],\n [minute, 15, 15 * durationMinute],\n [minute, 30, 30 * durationMinute],\n [ hour, 1, durationHour ],\n [ hour, 3, 3 * durationHour ],\n [ hour, 6, 6 * durationHour ],\n [ hour, 12, 12 * durationHour ],\n [ day, 1, durationDay ],\n [ day, 2, 2 * durationDay ],\n [ week, 1, durationWeek ],\n [ month, 1, durationMonth ],\n [ month, 3, 3 * durationMonth ],\n [ year, 1, durationYear ]\n ];\n\n function ticks(start, stop, count) {\n const reverse = stop < start;\n if (reverse) [start, stop] = [stop, start];\n const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n return reverse ? ticks.reverse() : ticks;\n }\n\n function tickInterval(start, stop, count) {\n const target = Math.abs(stop - start) / count;\n const i = bisector(([,, step]) => step).right(tickIntervals, target);\n if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n return t.every(step);\n }\n\n return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n","import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction timeWeekday(i) {\n return timeInterval((date) => {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setDate(date.getDate() + step * 7);\n }, (start, end) => {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport const timeSunday = timeWeekday(0);\nexport const timeMonday = timeWeekday(1);\nexport const timeTuesday = timeWeekday(2);\nexport const timeWednesday = timeWeekday(3);\nexport const timeThursday = timeWeekday(4);\nexport const timeFriday = timeWeekday(5);\nexport const timeSaturday = timeWeekday(6);\n\nexport const timeSundays = timeSunday.range;\nexport const timeMondays = timeMonday.range;\nexport const timeTuesdays = timeTuesday.range;\nexport const timeWednesdays = timeWednesday.range;\nexport const timeThursdays = timeThursday.range;\nexport const timeFridays = timeFriday.range;\nexport const timeSaturdays = timeSaturday.range;\n\nfunction utcWeekday(i) {\n return timeInterval((date) => {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, (start, end) => {\n return (end - start) / durationWeek;\n });\n}\n\nexport const utcSunday = utcWeekday(0);\nexport const utcMonday = utcWeekday(1);\nexport const utcTuesday = utcWeekday(2);\nexport const utcWednesday = utcWeekday(3);\nexport const utcThursday = utcWeekday(4);\nexport const utcFriday = utcWeekday(5);\nexport const utcSaturday = utcWeekday(6);\n\nexport const utcSundays = utcSunday.range;\nexport const utcMondays = utcMonday.range;\nexport const utcTuesdays = utcTuesday.range;\nexport const utcWednesdays = utcWednesday.range;\nexport const utcThursdays = utcThursday.range;\nexport const utcFridays = utcFriday.range;\nexport const utcSaturdays = utcSaturday.range;\n","import {timeInterval} from \"./interval.js\";\n\nexport const timeYear = timeInterval((date) => {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setFullYear(date.getFullYear() + step);\n}, (start, end) => {\n return end.getFullYear() - start.getFullYear();\n}, (date) => {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\ntimeYear.every = (k) => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport const timeYears = timeYear.range;\n\nexport const utcYear = timeInterval((date) => {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, (start, end) => {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, (date) => {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = (k) => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport const utcYears = utcYear.range;\n","export {\n now,\n timer,\n timerFlush\n} from \"./timer.js\";\n\nexport {\n default as timeout\n} from \"./timeout.js\";\n\nexport {\n default as interval\n} from \"./interval.js\";\n","import {Timer, now} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer, total = delay;\n if (delay == null) return t.restart(callback, delay, time), t;\n t._restart = t.restart;\n t.restart = function(callback, delay, time) {\n delay = +delay, time = time == null ? now() : +time;\n t._restart(function tick(elapsed) {\n elapsed += total;\n t._restart(tick, total += delay, time);\n callback(elapsed);\n }, delay, time);\n }\n t.restart(callback, delay, time);\n return t;\n}\n","import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer;\n delay = delay == null ? 0 : +delay;\n t.restart(elapsed => {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}\n","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n","import {Transition} from \"./transition/index.js\";\nimport {SCHEDULED} from \"./transition/schedule.js\";\n\nvar root = [null];\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n i;\n\n if (schedules) {\n name = name == null ? null : name + \"\";\n for (i in schedules) {\n if ((schedule = schedules[i]).state > SCHEDULED && schedule.name === name) {\n return new Transition([[node]], root, name, +i);\n }\n }\n }\n\n return null;\n}\n","import \"./selection/index.js\";\nexport {default as transition} from \"./transition/index.js\";\nexport {default as active} from \"./active.js\";\nexport {default as interrupt} from \"./interrupt.js\";\n","import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n active,\n empty = true,\n i;\n\n if (!schedules) return;\n\n name = name == null ? null : name + \"\";\n\n for (i in schedules) {\n if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n active = schedule.state > STARTING && schedule.state < ENDING;\n schedule.state = ENDED;\n schedule.timer.stop();\n schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n delete schedules[i];\n }\n\n if (empty) delete node.__transition;\n}\n","import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n","import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n return this.each(function() {\n interrupt(this, name);\n });\n}\n","import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n time: null, // Set on use.\n delay: 0,\n duration: 250,\n ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n var timing;\n while (!(timing = node.__transition) || !(timing = timing[id])) {\n if (!(node = node.parentNode)) {\n throw new Error(`transition ${id} not found`);\n }\n }\n return timing;\n}\n\nexport default function(name) {\n var id,\n timing;\n\n if (name instanceof Transition) {\n id = name._id, name = name._name;\n } else {\n id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id, i, group, timing || inherit(node, id));\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id);\n}\n","import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n return this.attrTween(name, typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n","import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n return function(t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n return function(t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\n\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nfunction attrTween(name, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n","import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n return function() {\n init(this, id).delay = +value.apply(this, arguments);\n };\n}\n\nfunction delayConstant(id, value) {\n return value = +value, function() {\n init(this, id).delay = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? delayFunction\n : delayConstant)(id, value))\n : get(this.node(), id).delay;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n return function() {\n set(this, id).duration = +value.apply(this, arguments);\n };\n}\n\nfunction durationConstant(id, value) {\n return value = +value, function() {\n set(this, id).duration = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? durationFunction\n : durationConstant)(id, value))\n : get(this.node(), id).duration;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n if (typeof value !== \"function\") throw new Error;\n return function() {\n set(this, id).ease = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each(easeConstant(id, value))\n : get(this.node(), id).ease;\n}\n","import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (typeof v !== \"function\") throw new Error;\n set(this, id).ease = v;\n };\n}\n\nexport default function(value) {\n if (typeof value !== \"function\") throw new Error;\n return this.each(easeVarying(this._id, value));\n}\n","import {set} from \"./schedule.js\";\n\nexport default function() {\n var on0, on1, that = this, id = that._id, size = that.size();\n return new Promise(function(resolve, reject) {\n var cancel = {value: reject},\n end = {value: function() { if (--size === 0) resolve(); }};\n\n that.each(function() {\n var schedule = set(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) {\n on1 = (on0 = on).copy();\n on1._.cancel.push(cancel);\n on1._.interrupt.push(cancel);\n on1._.end.push(end);\n }\n\n schedule.on = on1;\n });\n\n // The selection was empty, resolve end immediately\n if (size === 0) resolve();\n });\n}\n","import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Transition(subgroups, this._parents, this._name, this._id);\n}\n","import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id;\n}\n\nexport default function transition(name) {\n return selection().transition(name);\n}\n\nexport function newId() {\n return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n selectChild: selection_prototype.selectChild,\n selectChildren: selection_prototype.selectChildren,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n easeVarying: transition_easeVarying,\n end: transition_end,\n [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n","import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber\n : b instanceof color ? interpolateRgb\n : (c = color(b)) ? (b = c, interpolateRgb)\n : interpolateString)(a, b);\n}\n","import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n if (transition._id !== this._id) throw new Error;\n\n 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) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Transition(merges, this._parents, this._name, this._id);\n}\n","import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n var i = t.indexOf(\".\");\n if (i >= 0) t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\n\nfunction onFunction(id, name, listener) {\n var on0, on1, sit = start(name) ? init : set;\n return function() {\n var schedule = sit(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, listener) {\n var id = this._id;\n\n return arguments.length < 2\n ? get(this.node(), id).on.on(name)\n : this.each(onFunction(id, name, listener));\n}\n","function removeFunction(id) {\n return function() {\n var parent = this.parentNode;\n for (var i in this.__transition) if (+i !== id) return;\n if (parent) parent.removeChild(this);\n };\n}\n\nexport default function() {\n return this.on(\"end.remove\", removeFunction(this._id));\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules) node.__transition = {};\n else if (id in schedules) return;\n create(node, id, {\n name: name,\n index: index, // For context during callback.\n group: group, // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\n\nexport function init(node, id) {\n var schedule = get(node, id);\n if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n return schedule;\n}\n\nexport function set(node, id) {\n var schedule = get(node, id);\n if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n return schedule;\n}\n\nexport function get(node, id) {\n var schedule = node.__transition;\n if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n return schedule;\n}\n\nfunction create(node, id, self) {\n var schedules = node.__transition,\n tween;\n\n // Initialize the self timer when the transition is created.\n // Note the actual delay is not known until the first callback!\n schedules[id] = self;\n self.timer = timer(schedule, 0, self.time);\n\n function schedule(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start, self.delay, self.time);\n\n // If the elapsed delay is less than our first sleep, start immediately.\n if (self.delay <= elapsed) start(elapsed - self.delay);\n }\n\n function start(elapsed) {\n var i, j, n, o;\n\n // If the state is not SCHEDULED, then we previously errored on start.\n if (self.state !== SCHEDULED) return stop();\n\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name) continue;\n\n // While this element already has a starting transition during this frame,\n // defer starting an interrupting transition until that transition has a\n // chance to tick (and possibly end); see d3/d3-transition#54!\n if (o.state === STARTED) return timeout(start);\n\n // Interrupt the active transition, if any.\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n\n // Cancel any pre-empted transitions.\n else if (+i < id) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n }\n\n // Defer the first tick to end of the current frame; see d3/d3#1576.\n // Note the transition may be canceled after start and before the first tick!\n // Note this must be scheduled before the start event; see d3/d3-transition#16!\n // Assuming this is successful, subsequent callbacks go straight to tick.\n timeout(function() {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n });\n\n // Dispatch the start event.\n // Note this must be done before the tween are initialized.\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING) return; // interrupted\n self.state = STARTED;\n\n // Initialize the tween, deleting null tween.\n tween = new Array(n = self.tween.length);\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n tween.length = j + 1;\n }\n\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n i = -1,\n n = tween.length;\n\n while (++i < n) {\n tween[i].call(node, t);\n }\n\n // Dispatch the end event.\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id];\n for (var i in schedules) return; // eslint-disable-line no-unused-vars\n delete node.__transition;\n }\n}\n","import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n }\n }\n }\n\n return new Transition(subgroups, this._parents, name, id);\n}\n","import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n if (child = children[k]) {\n schedule(child, name, id, k, children, inherit);\n }\n }\n subgroups.push(children);\n parents.push(node);\n }\n }\n }\n\n return new Transition(subgroups, parents, name, id);\n}\n","import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n return new Selection(this._groups, this._parents);\n}\n","import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n string1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, string10 = string1);\n };\n}\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = style(this, name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction styleFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n value1 = value(this),\n string1 = value1 + \"\";\n if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction styleMaybeRemove(id, name) {\n var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n return function() {\n var schedule = set(this, id),\n on = schedule.on,\n listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n return value == null ? this\n .styleTween(name, styleNull(name, i))\n .on(\"end.style.\" + name, styleRemove(name))\n : typeof value === \"function\" ? this\n .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n .each(styleMaybeRemove(this._id, name))\n : this\n .styleTween(name, styleConstant(name, i, value), priority)\n .on(\"end.style.\" + name, null);\n}\n","function styleInterpolate(name, i, priority) {\n return function(t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\n\nfunction styleTween(name, value, priority) {\n var t, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n","import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\n\nexport default function(value) {\n return this.tween(\"text\", typeof value === \"function\"\n ? textFunction(tweenValue(this, \"text\", value))\n : textConstant(value == null ? \"\" : value + \"\"));\n}\n","function textInterpolate(i) {\n return function(t) {\n this.textContent = i.call(this, t);\n };\n}\n\nfunction textTween(value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(value) {\n var key = \"text\";\n if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, textTween(value));\n}\n","import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n var name = this._name,\n id0 = this._id,\n id1 = newId();\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit.time + inherit.delay + inherit.duration,\n delay: 0,\n duration: inherit.duration,\n ease: inherit.ease\n });\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id1);\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n var tween0, tween1;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n\n schedule.tween = tween1;\n };\n}\n\nfunction tweenFunction(id, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\") throw new Error;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n if (i === n) tween1.push(t);\n }\n\n schedule.tween = tween1;\n };\n}\n\nexport default function(name, value) {\n var id = this._id;\n\n name += \"\";\n\n if (arguments.length < 2) {\n var tween = get(this.node(), id).tween;\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n return null;\n }\n\n return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n var id = transition._id;\n\n transition.each(function() {\n var schedule = set(this, id);\n (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n });\n\n return function(node) {\n return get(node, id).value[name];\n };\n}\n","export default x => () => x;\n","export default function ZoomEvent(type, {\n sourceEvent,\n target,\n transform,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n transform: {value: transform, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n","export {default as zoom} from \"./zoom.js\";\nexport {default as zoomTransform, identity as zoomIdentity, Transform as ZoomTransform} from \"./transform.js\";\n","export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","export function Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}\n\nTransform.prototype = {\n constructor: Transform,\n scale: function(k) {\n return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n },\n translate: function(x, y) {\n return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n },\n apply: function(point) {\n return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n },\n applyX: function(x) {\n return x * this.k + this.x;\n },\n applyY: function(y) {\n return y * this.k + this.y;\n },\n invert: function(location) {\n return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n },\n invertX: function(x) {\n return (x - this.x) / this.k;\n },\n invertY: function(y) {\n return (y - this.y) / this.k;\n },\n rescaleX: function(x) {\n return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n },\n rescaleY: function(y) {\n return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n return node.__zoom;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolateZoom} from \"d3-interpolate\";\nimport {select, pointer} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport ZoomEvent from \"./event.js\";\nimport {Transform, identity} from \"./transform.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\n// Ignore right-click, since that should open the context menu.\n// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event\nfunction defaultFilter(event) {\n return (!event.ctrlKey || event.type === 'wheel') && !event.button;\n}\n\nfunction defaultExtent() {\n var e = this;\n if (e instanceof SVGElement) {\n e = e.ownerSVGElement || e;\n if (e.hasAttribute(\"viewBox\")) {\n e = e.viewBox.baseVal;\n return [[e.x, e.y], [e.x + e.width, e.y + e.height]];\n }\n return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];\n }\n return [[0, 0], [e.clientWidth, e.clientHeight]];\n}\n\nfunction defaultTransform() {\n return this.__zoom || identity;\n}\n\nfunction defaultWheelDelta(event) {\n return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1);\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n return transform.translate(\n dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n );\n}\n\nexport default function() {\n var filter = defaultFilter,\n extent = defaultExtent,\n constrain = defaultConstrain,\n wheelDelta = defaultWheelDelta,\n touchable = defaultTouchable,\n scaleExtent = [0, Infinity],\n translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n duration = 250,\n interpolate = interpolateZoom,\n listeners = dispatch(\"start\", \"zoom\", \"end\"),\n touchstarting,\n touchfirst,\n touchending,\n touchDelay = 500,\n wheelDelay = 150,\n clickDistance2 = 0,\n tapDistance = 10;\n\n function zoom(selection) {\n selection\n .property(\"__zoom\", defaultTransform)\n .on(\"wheel.zoom\", wheeled, {passive: false})\n .on(\"mousedown.zoom\", mousedowned)\n .on(\"dblclick.zoom\", dblclicked)\n .filter(touchable)\n .on(\"touchstart.zoom\", touchstarted)\n .on(\"touchmove.zoom\", touchmoved)\n .on(\"touchend.zoom touchcancel.zoom\", touchended)\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n zoom.transform = function(collection, transform, point, event) {\n var selection = collection.selection ? collection.selection() : collection;\n selection.property(\"__zoom\", defaultTransform);\n if (collection !== selection) {\n schedule(collection, transform, point, event);\n } else {\n selection.interrupt().each(function() {\n gesture(this, arguments)\n .event(event)\n .start()\n .zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform)\n .end();\n });\n }\n };\n\n zoom.scaleBy = function(selection, k, p, event) {\n zoom.scaleTo(selection, function() {\n var k0 = this.__zoom.k,\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return k0 * k1;\n }, p, event);\n };\n\n zoom.scaleTo = function(selection, k, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t0 = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p,\n p1 = t0.invert(p0),\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n }, p, event);\n };\n\n zoom.translateBy = function(selection, x, y, event) {\n zoom.transform(selection, function() {\n return constrain(this.__zoom.translate(\n typeof x === \"function\" ? x.apply(this, arguments) : x,\n typeof y === \"function\" ? y.apply(this, arguments) : y\n ), extent.apply(this, arguments), translateExtent);\n }, null, event);\n };\n\n zoom.translateTo = function(selection, x, y, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p;\n return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(\n typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n typeof y === \"function\" ? -y.apply(this, arguments) : -y\n ), e, translateExtent);\n }, p, event);\n };\n\n function scale(transform, k) {\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n return k === transform.k ? transform : new Transform(k, transform.x, transform.y);\n }\n\n function translate(transform, p0, p1) {\n var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);\n }\n\n function centroid(extent) {\n return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n }\n\n function schedule(transition, transform, point, event) {\n transition\n .on(\"start.zoom\", function() { gesture(this, arguments).event(event).start(); })\n .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).event(event).end(); })\n .tween(\"zoom\", function() {\n var that = this,\n args = arguments,\n g = gesture(that, args).event(event),\n e = extent.apply(that, args),\n p = point == null ? centroid(e) : typeof point === \"function\" ? point.apply(that, args) : point,\n w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n a = that.__zoom,\n b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n return function(t) {\n if (t === 1) t = b; // Avoid rounding error on end.\n else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); }\n g.zoom(null, t);\n };\n });\n }\n\n function gesture(that, args, clean) {\n return (!clean && that.__zooming) || new Gesture(that, args);\n }\n\n function Gesture(that, args) {\n this.that = that;\n this.args = args;\n this.active = 0;\n this.sourceEvent = null;\n this.extent = extent.apply(that, args);\n this.taps = 0;\n }\n\n Gesture.prototype = {\n event: function(event) {\n if (event) this.sourceEvent = event;\n return this;\n },\n start: function() {\n if (++this.active === 1) {\n this.that.__zooming = this;\n this.emit(\"start\");\n }\n return this;\n },\n zoom: function(key, transform) {\n if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n this.that.__zoom = transform;\n this.emit(\"zoom\");\n return this;\n },\n end: function() {\n if (--this.active === 0) {\n delete this.that.__zooming;\n this.emit(\"end\");\n }\n return this;\n },\n emit: function(type) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new ZoomEvent(type, {\n sourceEvent: this.sourceEvent,\n target: zoom,\n type,\n transform: this.that.__zoom,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function wheeled(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var g = gesture(this, args).event(event),\n t = this.__zoom,\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n p = pointer(event);\n\n // If the mouse is in the same location as before, reuse it.\n // If there were recent wheel events, reset the wheel idle timeout.\n if (g.wheel) {\n if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n g.mouse[1] = t.invert(g.mouse[0] = p);\n }\n clearTimeout(g.wheel);\n }\n\n // If this wheel event won’t trigger a transform change, ignore it.\n else if (t.k === k) return;\n\n // Otherwise, capture the mouse point and location at the start.\n else {\n g.mouse = [p, t.invert(p)];\n interrupt(this);\n g.start();\n }\n\n noevent(event);\n g.wheel = setTimeout(wheelidled, wheelDelay);\n g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n function wheelidled() {\n g.wheel = null;\n g.end();\n }\n }\n\n function mousedowned(event, ...args) {\n if (touchending || !filter.apply(this, arguments)) return;\n var currentTarget = event.currentTarget,\n g = gesture(this, args, true).event(event),\n v = select(event.view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n p = pointer(event, currentTarget),\n x0 = event.clientX,\n y0 = event.clientY;\n\n dragDisable(event.view);\n nopropagation(event);\n g.mouse = [p, this.__zoom.invert(p)];\n interrupt(this);\n g.start();\n\n function mousemoved(event) {\n noevent(event);\n if (!g.moved) {\n var dx = event.clientX - x0, dy = event.clientY - y0;\n g.moved = dx * dx + dy * dy > clickDistance2;\n }\n g.event(event)\n .zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent));\n }\n\n function mouseupped(event) {\n v.on(\"mousemove.zoom mouseup.zoom\", null);\n dragEnable(event.view, g.moved);\n noevent(event);\n g.event(event).end();\n }\n }\n\n function dblclicked(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var t0 = this.__zoom,\n p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this),\n p1 = t0.invert(p0),\n k1 = t0.k * (event.shiftKey ? 0.5 : 2),\n t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);\n\n noevent(event);\n if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0, event);\n else select(this).call(zoom.transform, t1, p0, event);\n }\n\n function touchstarted(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var touches = event.touches,\n n = touches.length,\n g = gesture(this, args, event.changedTouches.length === n).event(event),\n started, i, t, p;\n\n nopropagation(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n p = [p, this.__zoom.invert(p), t.identifier];\n if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;\n else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;\n }\n\n if (touchstarting) touchstarting = clearTimeout(touchstarting);\n\n if (started) {\n if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n interrupt(this);\n g.start();\n }\n }\n\n function touchmoved(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t, p, l;\n\n noevent(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;\n else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n }\n t = g.that.__zoom;\n if (g.touch1) {\n var p0 = g.touch0[0], l0 = g.touch0[1],\n p1 = g.touch1[0], l1 = g.touch1[1],\n dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n t = scale(t, Math.sqrt(dp / dl));\n p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n }\n else if (g.touch0) p = g.touch0[0], l = g.touch0[1];\n else return;\n\n g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n }\n\n function touchended(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t;\n\n nopropagation(event);\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, touchDelay);\n for (i = 0; i < n; ++i) {\n t = touches[i];\n if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;\n else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n }\n if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n else {\n g.end();\n // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.\n if (g.taps === 2) {\n t = pointer(t, this);\n if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {\n var p = select(this).on(\"dblclick.zoom\");\n if (p) p.apply(this, arguments);\n }\n }\n }\n }\n\n zoom.wheelDelta = function(_) {\n return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : constant(+_), zoom) : wheelDelta;\n };\n\n zoom.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), zoom) : filter;\n };\n\n zoom.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), zoom) : touchable;\n };\n\n zoom.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n };\n\n zoom.scaleExtent = function(_) {\n return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n };\n\n zoom.translateExtent = function(_) {\n 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]]];\n };\n\n zoom.constrain = function(_) {\n return arguments.length ? (constrain = _, zoom) : constrain;\n };\n\n zoom.duration = function(_) {\n return arguments.length ? (duration = +_, zoom) : duration;\n };\n\n zoom.interpolate = function(_) {\n return arguments.length ? (interpolate = _, zoom) : interpolate;\n };\n\n zoom.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? zoom : value;\n };\n\n zoom.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n };\n\n zoom.tapDistance = function(_) {\n return arguments.length ? (tapDistance = +_, zoom) : tapDistance;\n };\n\n return zoom;\n}\n","export * from \"d3-array\";\nexport * from \"d3-axis\";\nexport * from \"d3-brush\";\nexport * from \"d3-chord\";\nexport * from \"d3-color\";\nexport * from \"d3-contour\";\nexport * from \"d3-delaunay\";\nexport * from \"d3-dispatch\";\nexport * from \"d3-drag\";\nexport * from \"d3-dsv\";\nexport * from \"d3-ease\";\nexport * from \"d3-fetch\";\nexport * from \"d3-force\";\nexport * from \"d3-format\";\nexport * from \"d3-geo\";\nexport * from \"d3-hierarchy\";\nexport * from \"d3-interpolate\";\nexport * from \"d3-path\";\nexport * from \"d3-polygon\";\nexport * from \"d3-quadtree\";\nexport * from \"d3-random\";\nexport * from \"d3-scale\";\nexport * from \"d3-scale-chromatic\";\nexport * from \"d3-selection\";\nexport * from \"d3-shape\";\nexport * from \"d3-time\";\nexport * from \"d3-time-format\";\nexport * from \"d3-timer\";\nexport * from \"d3-transition\";\nexport * from \"d3-zoom\";\n","\nconst EPSILON = Math.pow(2, -52);\nconst EDGE_STACK = new Uint32Array(512);\n\nimport {orient2d} from 'robust-predicates';\n\nexport default class Delaunator {\n\n static from(points, getX = defaultGetX, getY = defaultGetY) {\n const n = points.length;\n const coords = new Float64Array(n * 2);\n\n for (let i = 0; i < n; i++) {\n const p = points[i];\n coords[2 * i] = getX(p);\n coords[2 * i + 1] = getY(p);\n }\n\n return new Delaunator(coords);\n }\n\n constructor(coords) {\n const n = coords.length >> 1;\n if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.');\n\n this.coords = coords;\n\n // arrays that will store the triangulation graph\n const maxTriangles = Math.max(2 * n - 5, 0);\n this._triangles = new Uint32Array(maxTriangles * 3);\n this._halfedges = new Int32Array(maxTriangles * 3);\n\n // temporary arrays for tracking the edges of the advancing convex hull\n this._hashSize = Math.ceil(Math.sqrt(n));\n this._hullPrev = new Uint32Array(n); // edge to prev edge\n this._hullNext = new Uint32Array(n); // edge to next edge\n this._hullTri = new Uint32Array(n); // edge to adjacent triangle\n this._hullHash = new Int32Array(this._hashSize); // angular edge hash\n\n // temporary arrays for sorting points\n this._ids = new Uint32Array(n);\n this._dists = new Float64Array(n);\n\n this.update();\n }\n\n update() {\n const {coords, _hullPrev: hullPrev, _hullNext: hullNext, _hullTri: hullTri, _hullHash: hullHash} = this;\n const n = coords.length >> 1;\n\n // populate an array of point indices; calculate input data bbox\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n\n for (let i = 0; i < n; i++) {\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n this._ids[i] = i;\n }\n const cx = (minX + maxX) / 2;\n const cy = (minY + maxY) / 2;\n\n let i0, i1, i2;\n\n // pick a seed point close to the center\n for (let i = 0, minDist = Infinity; i < n; i++) {\n const d = dist(cx, cy, coords[2 * i], coords[2 * i + 1]);\n if (d < minDist) {\n i0 = i;\n minDist = d;\n }\n }\n const i0x = coords[2 * i0];\n const i0y = coords[2 * i0 + 1];\n\n // find the point closest to the seed\n for (let i = 0, minDist = Infinity; i < n; i++) {\n if (i === i0) continue;\n const d = dist(i0x, i0y, coords[2 * i], coords[2 * i + 1]);\n if (d < minDist && d > 0) {\n i1 = i;\n minDist = d;\n }\n }\n let i1x = coords[2 * i1];\n let i1y = coords[2 * i1 + 1];\n\n let minRadius = Infinity;\n\n // find the third point which forms the smallest circumcircle with the first two\n for (let i = 0; i < n; i++) {\n if (i === i0 || i === i1) continue;\n const r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i], coords[2 * i + 1]);\n if (r < minRadius) {\n i2 = i;\n minRadius = r;\n }\n }\n let i2x = coords[2 * i2];\n let i2y = coords[2 * i2 + 1];\n\n if (minRadius === Infinity) {\n // order collinear points by dx (or dy if all x are identical)\n // and return the list as a hull\n for (let i = 0; i < n; i++) {\n this._dists[i] = (coords[2 * i] - coords[0]) || (coords[2 * i + 1] - coords[1]);\n }\n quicksort(this._ids, this._dists, 0, n - 1);\n const hull = new Uint32Array(n);\n let j = 0;\n for (let i = 0, d0 = -Infinity; i < n; i++) {\n const id = this._ids[i];\n const d = this._dists[id];\n if (d > d0) {\n hull[j++] = id;\n d0 = d;\n }\n }\n this.hull = hull.subarray(0, j);\n this.triangles = new Uint32Array(0);\n this.halfedges = new Uint32Array(0);\n return;\n }\n\n // swap the order of the seed points for counter-clockwise orientation\n if (orient2d(i0x, i0y, i1x, i1y, i2x, i2y) < 0) {\n const i = i1;\n const x = i1x;\n const y = i1y;\n i1 = i2;\n i1x = i2x;\n i1y = i2y;\n i2 = i;\n i2x = x;\n i2y = y;\n }\n\n const center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y);\n this._cx = center.x;\n this._cy = center.y;\n\n for (let i = 0; i < n; i++) {\n this._dists[i] = dist(coords[2 * i], coords[2 * i + 1], center.x, center.y);\n }\n\n // sort the points by distance from the seed triangle circumcenter\n quicksort(this._ids, this._dists, 0, n - 1);\n\n // set up the seed triangle as the starting hull\n this._hullStart = i0;\n let hullSize = 3;\n\n hullNext[i0] = hullPrev[i2] = i1;\n hullNext[i1] = hullPrev[i0] = i2;\n hullNext[i2] = hullPrev[i1] = i0;\n\n hullTri[i0] = 0;\n hullTri[i1] = 1;\n hullTri[i2] = 2;\n\n hullHash.fill(-1);\n hullHash[this._hashKey(i0x, i0y)] = i0;\n hullHash[this._hashKey(i1x, i1y)] = i1;\n hullHash[this._hashKey(i2x, i2y)] = i2;\n\n this.trianglesLen = 0;\n this._addTriangle(i0, i1, i2, -1, -1, -1);\n\n for (let k = 0, xp, yp; k < this._ids.length; k++) {\n const i = this._ids[k];\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n\n // skip near-duplicate points\n if (k > 0 && Math.abs(x - xp) <= EPSILON && Math.abs(y - yp) <= EPSILON) continue;\n xp = x;\n yp = y;\n\n // skip seed triangle points\n if (i === i0 || i === i1 || i === i2) continue;\n\n // find a visible edge on the convex hull using edge hash\n let start = 0;\n for (let j = 0, key = this._hashKey(x, y); j < this._hashSize; j++) {\n start = hullHash[(key + j) % this._hashSize];\n if (start !== -1 && start !== hullNext[start]) break;\n }\n\n start = hullPrev[start];\n let e = start, q;\n while (q = hullNext[e], orient2d(x, y, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1]) >= 0) {\n e = q;\n if (e === start) {\n e = -1;\n break;\n }\n }\n if (e === -1) continue; // likely a near-duplicate point; skip it\n\n // add the first triangle from the point\n let t = this._addTriangle(e, i, hullNext[e], -1, -1, hullTri[e]);\n\n // recursively flip triangles from the point until they satisfy the Delaunay condition\n hullTri[i] = this._legalize(t + 2);\n hullTri[e] = t; // keep track of boundary triangles on the hull\n hullSize++;\n\n // walk forward through the hull, adding more triangles and flipping recursively\n let n = hullNext[e];\n while (q = hullNext[n], orient2d(x, y, coords[2 * n], coords[2 * n + 1], coords[2 * q], coords[2 * q + 1]) < 0) {\n t = this._addTriangle(n, i, q, hullTri[i], -1, hullTri[n]);\n hullTri[i] = this._legalize(t + 2);\n hullNext[n] = n; // mark as removed\n hullSize--;\n n = q;\n }\n\n // walk backward from the other side, adding more triangles and flipping\n if (e === start) {\n while (q = hullPrev[e], orient2d(x, y, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1]) < 0) {\n t = this._addTriangle(q, i, e, -1, hullTri[e], hullTri[q]);\n this._legalize(t + 2);\n hullTri[q] = t;\n hullNext[e] = e; // mark as removed\n hullSize--;\n e = q;\n }\n }\n\n // update the hull indices\n this._hullStart = hullPrev[i] = e;\n hullNext[e] = hullPrev[n] = i;\n hullNext[i] = n;\n\n // save the two new edges in the hash table\n hullHash[this._hashKey(x, y)] = i;\n hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e;\n }\n\n this.hull = new Uint32Array(hullSize);\n for (let i = 0, e = this._hullStart; i < hullSize; i++) {\n this.hull[i] = e;\n e = hullNext[e];\n }\n\n // trim typed triangle mesh arrays\n this.triangles = this._triangles.subarray(0, this.trianglesLen);\n this.halfedges = this._halfedges.subarray(0, this.trianglesLen);\n }\n\n _hashKey(x, y) {\n return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize;\n }\n\n _legalize(a) {\n const {_triangles: triangles, _halfedges: halfedges, coords} = this;\n\n let i = 0;\n let ar = 0;\n\n // recursion eliminated with a fixed-size stack\n while (true) {\n const b = halfedges[a];\n\n /* if the pair of triangles doesn't satisfy the Delaunay condition\n * (p1 is inside the circumcircle of [p0, pl, pr]), flip them,\n * then do the same check/flip recursively for the new pair of triangles\n *\n * pl pl\n * /||\\ / \\\n * al/ || \\bl al/ \\a\n * / || \\ / \\\n * / a||b \\ flip /___ar___\\\n * p0\\ || /p1 => p0\\---bl---/p1\n * \\ || / \\ /\n * ar\\ || /br b\\ /br\n * \\||/ \\ /\n * pr pr\n */\n const a0 = a - a % 3;\n ar = a0 + (a + 2) % 3;\n\n if (b === -1) { // convex hull edge\n if (i === 0) break;\n a = EDGE_STACK[--i];\n continue;\n }\n\n const b0 = b - b % 3;\n const al = a0 + (a + 1) % 3;\n const bl = b0 + (b + 2) % 3;\n\n const p0 = triangles[ar];\n const pr = triangles[a];\n const pl = triangles[al];\n const p1 = triangles[bl];\n\n const illegal = inCircle(\n coords[2 * p0], coords[2 * p0 + 1],\n coords[2 * pr], coords[2 * pr + 1],\n coords[2 * pl], coords[2 * pl + 1],\n coords[2 * p1], coords[2 * p1 + 1]);\n\n if (illegal) {\n triangles[a] = p1;\n triangles[b] = p0;\n\n const hbl = halfedges[bl];\n\n // edge swapped on the other side of the hull (rare); fix the halfedge reference\n if (hbl === -1) {\n let e = this._hullStart;\n do {\n if (this._hullTri[e] === bl) {\n this._hullTri[e] = a;\n break;\n }\n e = this._hullPrev[e];\n } while (e !== this._hullStart);\n }\n this._link(a, hbl);\n this._link(b, halfedges[ar]);\n this._link(ar, bl);\n\n const br = b0 + (b + 1) % 3;\n\n // don't worry about hitting the cap: it can only happen on extremely degenerate input\n if (i < EDGE_STACK.length) {\n EDGE_STACK[i++] = br;\n }\n } else {\n if (i === 0) break;\n a = EDGE_STACK[--i];\n }\n }\n\n return ar;\n }\n\n _link(a, b) {\n this._halfedges[a] = b;\n if (b !== -1) this._halfedges[b] = a;\n }\n\n // add a new triangle given vertex indices and adjacent half-edge ids\n _addTriangle(i0, i1, i2, a, b, c) {\n const t = this.trianglesLen;\n\n this._triangles[t] = i0;\n this._triangles[t + 1] = i1;\n this._triangles[t + 2] = i2;\n\n this._link(t, a);\n this._link(t + 1, b);\n this._link(t + 2, c);\n\n this.trianglesLen += 3;\n\n return t;\n }\n}\n\n// monotonically increases with real angle, but doesn't need expensive trigonometry\nfunction pseudoAngle(dx, dy) {\n const p = dx / (Math.abs(dx) + Math.abs(dy));\n return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1]\n}\n\nfunction dist(ax, ay, bx, by) {\n const dx = ax - bx;\n const dy = ay - by;\n return dx * dx + dy * dy;\n}\n\nfunction inCircle(ax, ay, bx, by, cx, cy, px, py) {\n const dx = ax - px;\n const dy = ay - py;\n const ex = bx - px;\n const ey = by - py;\n const fx = cx - px;\n const fy = cy - py;\n\n const ap = dx * dx + dy * dy;\n const bp = ex * ex + ey * ey;\n const cp = fx * fx + fy * fy;\n\n return dx * (ey * cp - bp * fy) -\n dy * (ex * cp - bp * fx) +\n ap * (ex * fy - ey * fx) < 0;\n}\n\nfunction circumradius(ax, ay, bx, by, cx, cy) {\n const dx = bx - ax;\n const dy = by - ay;\n const ex = cx - ax;\n const ey = cy - ay;\n\n const bl = dx * dx + dy * dy;\n const cl = ex * ex + ey * ey;\n const d = 0.5 / (dx * ey - dy * ex);\n\n const x = (ey * bl - dy * cl) * d;\n const y = (dx * cl - ex * bl) * d;\n\n return x * x + y * y;\n}\n\nfunction circumcenter(ax, ay, bx, by, cx, cy) {\n const dx = bx - ax;\n const dy = by - ay;\n const ex = cx - ax;\n const ey = cy - ay;\n\n const bl = dx * dx + dy * dy;\n const cl = ex * ex + ey * ey;\n const d = 0.5 / (dx * ey - dy * ex);\n\n const x = ax + (ey * bl - dy * cl) * d;\n const y = ay + (dx * cl - ex * bl) * d;\n\n return {x, y};\n}\n\nfunction quicksort(ids, dists, left, right) {\n if (right - left <= 20) {\n for (let i = left + 1; i <= right; i++) {\n const temp = ids[i];\n const tempDist = dists[temp];\n let j = i - 1;\n while (j >= left && dists[ids[j]] > tempDist) ids[j + 1] = ids[j--];\n ids[j + 1] = temp;\n }\n } else {\n const median = (left + right) >> 1;\n let i = left + 1;\n let j = right;\n swap(ids, median, i);\n if (dists[ids[left]] > dists[ids[right]]) swap(ids, left, right);\n if (dists[ids[i]] > dists[ids[right]]) swap(ids, i, right);\n if (dists[ids[left]] > dists[ids[i]]) swap(ids, left, i);\n\n const temp = ids[i];\n const tempDist = dists[temp];\n while (true) {\n do i++; while (dists[ids[i]] < tempDist);\n do j--; while (dists[ids[j]] > tempDist);\n if (j < i) break;\n swap(ids, i, j);\n }\n ids[left + 1] = ids[j];\n ids[j] = temp;\n\n if (right - i + 1 >= j - left) {\n quicksort(ids, dists, i, right);\n quicksort(ids, dists, left, j - 1);\n } else {\n quicksort(ids, dists, left, j - 1);\n quicksort(ids, dists, i, right);\n }\n }\n}\n\nfunction swap(arr, i, j) {\n const tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultGetX(p) {\n return p[0];\n}\nfunction defaultGetY(p) {\n return p[1];\n}\n","export class InternMap extends Map {\n constructor(entries, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (entries != null) for (const [key, value] of entries) this.set(key, value);\n }\n get(key) {\n return super.get(intern_get(this, key));\n }\n has(key) {\n return super.has(intern_get(this, key));\n }\n set(key, value) {\n return super.set(intern_set(this, key), value);\n }\n delete(key) {\n return super.delete(intern_delete(this, key));\n }\n}\n\nexport class InternSet extends Set {\n constructor(values, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (values != null) for (const value of values) this.add(value);\n }\n has(value) {\n return super.has(intern_get(this, value));\n }\n add(value) {\n return super.add(intern_set(this, value));\n }\n delete(value) {\n return super.delete(intern_delete(this, value));\n }\n}\n\nfunction intern_get({_intern, _key}, value) {\n const key = _key(value);\n return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) return _intern.get(key);\n _intern.set(key, value);\n return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) {\n value = _intern.get(key);\n _intern.delete(key);\n }\n return value;\n}\n\nfunction keyof(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n","import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale} from './util.js';\n\nconst iccerrboundA = (10 + 96 * epsilon) * epsilon;\nconst iccerrboundB = (4 + 48 * epsilon) * epsilon;\nconst iccerrboundC = (44 + 576 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst aa = vec(4);\nconst bb = vec(4);\nconst cc = vec(4);\nconst u = vec(4);\nconst v = vec(4);\nconst axtbc = vec(8);\nconst aytbc = vec(8);\nconst bxtca = vec(8);\nconst bytca = vec(8);\nconst cxtab = vec(8);\nconst cytab = vec(8);\nconst abt = vec(8);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abtt = vec(4);\nconst bctt = vec(4);\nconst catt = vec(4);\n\nconst _8 = vec(8);\nconst _16 = vec(16);\nconst _16b = vec(16);\nconst _16c = vec(16);\nconst _32 = vec(32);\nconst _32b = vec(32);\nconst _48 = vec(48);\nconst _64 = vec(64);\n\nlet fin = vec(1152);\nlet fin2 = vec(1152);\n\nfunction finadd(finlen, a, alen) {\n finlen = sum(finlen, fin, a, alen, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail;\n let axtbclen, aytbclen, bxtcalen, bytcalen, cxtablen, cytablen;\n let abtlen, bctlen, catlen;\n let abttlen, bcttlen, cattlen;\n let n1, n0;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n sum(\n scale(scale(4, bc, adx, _8), _8, adx, _16), _16,\n scale(scale(4, bc, ady, _8), _8, ady, _16b), _16b, _32), _32,\n sum(\n scale(scale(4, ca, bdx, _8), _8, bdx, _16), _16,\n scale(scale(4, ca, bdy, _8), _8, bdy, _16b), _16b, _32b), _32b, _64), _64,\n sum(\n scale(scale(4, ab, cdx, _8), _8, cdx, _16), _16,\n scale(scale(4, ab, cdy, _8), _8, cdy, _16b), _16b, _32), _32, fin);\n\n let det = estimate(finlen, fin);\n let errbound = iccerrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0) {\n return det;\n }\n\n errbound = iccerrboundC * permanent + resulterrbound * Math.abs(det);\n det += ((adx * adx + ady * ady) * ((bdx * cdytail + cdy * bdxtail) - (bdy * cdxtail + cdx * bdytail)) +\n 2 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx)) +\n ((bdx * bdx + bdy * bdy) * ((cdx * adytail + ady * cdxtail) - (cdy * adxtail + adx * cdytail)) +\n 2 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx)) +\n ((cdx * cdx + cdy * cdy) * ((adx * bdytail + bdy * adxtail) - (ady * bdxtail + bdx * adytail)) +\n 2 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = adx * adx;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = ady * ady;\n c = splitter * ady;\n ahi = c - (c - ady);\n alo = ady - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n aa[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n aa[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n aa[2] = _j - (u3 - bvirt) + (_i - bvirt);\n aa[3] = u3;\n }\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = bdx * bdx;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = bdy * bdy;\n c = splitter * bdy;\n ahi = c - (c - bdy);\n alo = bdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n bb[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n bb[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bb[3] = u3;\n }\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = cdx * cdx;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = cdy * cdy;\n c = splitter * cdy;\n ahi = c - (c - cdy);\n alo = cdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n cc[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n cc[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cc[3] = u3;\n }\n\n if (adxtail !== 0) {\n axtbclen = scale(4, bc, adxtail, axtbc);\n finlen = finadd(finlen, sum_three(\n scale(axtbclen, axtbc, 2 * adx, _16), _16,\n scale(scale(4, cc, adxtail, _8), _8, bdy, _16b), _16b,\n scale(scale(4, bb, adxtail, _8), _8, -cdy, _16c), _16c, _32, _48), _48);\n }\n if (adytail !== 0) {\n aytbclen = scale(4, bc, adytail, aytbc);\n finlen = finadd(finlen, sum_three(\n scale(aytbclen, aytbc, 2 * ady, _16), _16,\n scale(scale(4, bb, adytail, _8), _8, cdx, _16b), _16b,\n scale(scale(4, cc, adytail, _8), _8, -bdx, _16c), _16c, _32, _48), _48);\n }\n if (bdxtail !== 0) {\n bxtcalen = scale(4, ca, bdxtail, bxtca);\n finlen = finadd(finlen, sum_three(\n scale(bxtcalen, bxtca, 2 * bdx, _16), _16,\n scale(scale(4, aa, bdxtail, _8), _8, cdy, _16b), _16b,\n scale(scale(4, cc, bdxtail, _8), _8, -ady, _16c), _16c, _32, _48), _48);\n }\n if (bdytail !== 0) {\n bytcalen = scale(4, ca, bdytail, bytca);\n finlen = finadd(finlen, sum_three(\n scale(bytcalen, bytca, 2 * bdy, _16), _16,\n scale(scale(4, cc, bdytail, _8), _8, adx, _16b), _16b,\n scale(scale(4, aa, bdytail, _8), _8, -cdx, _16c), _16c, _32, _48), _48);\n }\n if (cdxtail !== 0) {\n cxtablen = scale(4, ab, cdxtail, cxtab);\n finlen = finadd(finlen, sum_three(\n scale(cxtablen, cxtab, 2 * cdx, _16), _16,\n scale(scale(4, bb, cdxtail, _8), _8, ady, _16b), _16b,\n scale(scale(4, aa, cdxtail, _8), _8, -bdy, _16c), _16c, _32, _48), _48);\n }\n if (cdytail !== 0) {\n cytablen = scale(4, ab, cdytail, cytab);\n finlen = finadd(finlen, sum_three(\n scale(cytablen, cytab, 2 * cdy, _16), _16,\n scale(scale(4, aa, cdytail, _8), _8, bdx, _16b), _16b,\n scale(scale(4, bb, cdytail, _8), _8, -adx, _16c), _16c, _32, _48), _48);\n }\n\n if (adxtail !== 0 || adytail !== 0) {\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = bdxtail * cdy;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * cdytail;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n s1 = cdxtail * -bdy;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * -bdy;\n bhi = c - (c - -bdy);\n blo = -bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * -bdytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * -bdytail;\n bhi = c - (c - -bdytail);\n blo = -bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n bctlen = sum(4, u, 4, v, bct);\n s1 = bdxtail * cdytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdxtail * bdytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bctt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bctt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bctt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bctt[3] = u3;\n bcttlen = 4;\n } else {\n bct[0] = 0;\n bctlen = 1;\n bctt[0] = 0;\n bcttlen = 1;\n }\n if (adxtail !== 0) {\n const len = scale(bctlen, bct, adxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(axtbclen, axtbc, adxtail, _16), _16,\n scale(len, _16c, 2 * adx, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * adx, _16), _16,\n scale(len2, _8, adxtail, _16b), _16b,\n scale(len, _16c, adxtail, _32), _32, _32b, _64), _64);\n\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, adxtail, _8), _8, bdytail, _16), _16);\n }\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, -adxtail, _8), _8, cdytail, _16), _16);\n }\n }\n if (adytail !== 0) {\n const len = scale(bctlen, bct, adytail, _16c);\n finlen = finadd(finlen, sum(\n scale(aytbclen, aytbc, adytail, _16), _16,\n scale(len, _16c, 2 * ady, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * ady, _16), _16,\n scale(len2, _8, adytail, _16b), _16b,\n scale(len, _16c, adytail, _32), _32, _32b, _64), _64);\n }\n }\n if (bdxtail !== 0 || bdytail !== 0) {\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = cdxtail * ady;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * adytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -cdy;\n n0 = -cdytail;\n s1 = adxtail * n1;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * n0;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n catlen = sum(4, u, 4, v, cat);\n s1 = cdxtail * adytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adxtail * cdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n catt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n catt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n catt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n catt[3] = u3;\n cattlen = 4;\n } else {\n cat[0] = 0;\n catlen = 1;\n catt[0] = 0;\n cattlen = 1;\n }\n if (bdxtail !== 0) {\n const len = scale(catlen, cat, bdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(bxtcalen, bxtca, bdxtail, _16), _16,\n scale(len, _16c, 2 * bdx, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdx, _16), _16,\n scale(len2, _8, bdxtail, _16b), _16b,\n scale(len, _16c, bdxtail, _32), _32, _32b, _64), _64);\n\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, bdxtail, _8), _8, cdytail, _16), _16);\n }\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, -bdxtail, _8), _8, adytail, _16), _16);\n }\n }\n if (bdytail !== 0) {\n const len = scale(catlen, cat, bdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(bytcalen, bytca, bdytail, _16), _16,\n scale(len, _16c, 2 * bdy, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdy, _16), _16,\n scale(len2, _8, bdytail, _16b), _16b,\n scale(len, _16c, bdytail, _32), _32, _32b, _64), _64);\n }\n }\n if (cdxtail !== 0 || cdytail !== 0) {\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = adxtail * bdy;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * bdytail;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -ady;\n n0 = -adytail;\n s1 = bdxtail * n1;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * n0;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n abtlen = sum(4, u, 4, v, abt);\n s1 = adxtail * bdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdxtail * adytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n abtt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n abtt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n abtt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n abtt[3] = u3;\n abttlen = 4;\n } else {\n abt[0] = 0;\n abtlen = 1;\n abtt[0] = 0;\n abttlen = 1;\n }\n if (cdxtail !== 0) {\n const len = scale(abtlen, abt, cdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(cxtablen, cxtab, cdxtail, _16), _16,\n scale(len, _16c, 2 * cdx, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdx, _16), _16,\n scale(len2, _8, cdxtail, _16b), _16b,\n scale(len, _16c, cdxtail, _32), _32, _32b, _64), _64);\n\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, cdxtail, _8), _8, adytail, _16), _16);\n }\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, -cdxtail, _8), _8, bdytail, _16), _16);\n }\n }\n if (cdytail !== 0) {\n const len = scale(abtlen, abt, cdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(cytablen, cytab, cdytail, _16), _16,\n scale(len, _16c, 2 * cdy, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdy, _16), _16,\n scale(len2, _8, cdytail, _16b), _16b,\n scale(len, _16c, cdytail, _32), _32, _32b, _64), _64);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function incircle(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n const alift = adx * adx + ady * ady;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n const blift = bdx * bdx + bdy * bdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n const clift = cdx * cdx + cdy * cdy;\n\n const det =\n alift * (bdxcdy - cdxbdy) +\n blift * (cdxady - adxcdy) +\n clift * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * alift +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * blift +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * clift;\n\n const errbound = iccerrboundA * permanent;\n\n if (det > errbound || -det > errbound) {\n return det;\n }\n return incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent);\n}\n\nexport function incirclefast(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const ady = ay - dy;\n const bdx = bx - dx;\n const bdy = by - dy;\n const cdx = cx - dx;\n const cdy = cy - dy;\n\n const abdet = adx * bdy - bdx * ady;\n const bcdet = bdx * cdy - cdx * bdy;\n const cadet = cdx * ady - adx * cdy;\n const alift = adx * adx + ady * ady;\n const blift = bdx * bdx + bdy * bdy;\n const clift = cdx * cdx + cdy * cdy;\n\n return alift * bcdet + blift * cadet + clift * abdet;\n}\n","import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale, negate} from './util.js';\n\nconst isperrboundA = (16 + 224 * epsilon) * epsilon;\nconst isperrboundB = (5 + 72 * epsilon) * epsilon;\nconst isperrboundC = (71 + 1408 * epsilon) * epsilon * epsilon;\n\nconst ab = vec(4);\nconst bc = vec(4);\nconst cd = vec(4);\nconst de = vec(4);\nconst ea = vec(4);\nconst ac = vec(4);\nconst bd = vec(4);\nconst ce = vec(4);\nconst da = vec(4);\nconst eb = vec(4);\n\nconst abc = vec(24);\nconst bcd = vec(24);\nconst cde = vec(24);\nconst dea = vec(24);\nconst eab = vec(24);\nconst abd = vec(24);\nconst bce = vec(24);\nconst cda = vec(24);\nconst deb = vec(24);\nconst eac = vec(24);\n\nconst adet = vec(1152);\nconst bdet = vec(1152);\nconst cdet = vec(1152);\nconst ddet = vec(1152);\nconst edet = vec(1152);\nconst abdet = vec(2304);\nconst cddet = vec(2304);\nconst cdedet = vec(3456);\nconst deter = vec(5760);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _8c = vec(8);\nconst _16 = vec(16);\nconst _24 = vec(24);\nconst _48 = vec(48);\nconst _48b = vec(48);\nconst _96 = vec(96);\nconst _192 = vec(192);\nconst _384x = vec(384);\nconst _384y = vec(384);\nconst _384z = vec(384);\nconst _768 = vec(768);\n\nfunction sum_three_scale(a, b, c, az, bz, cz, out) {\n return sum_three(\n scale(4, a, az, _8), _8,\n scale(4, b, bz, _8b), _8b,\n scale(4, c, cz, _8c), _8c, _16, out);\n}\n\nfunction liftexact(alen, a, blen, b, clen, c, dlen, d, x, y, z, out) {\n const len = sum(\n sum(alen, a, blen, b, _48), _48,\n negate(sum(clen, c, dlen, d, _48b), _48b), _48b, _96);\n\n return sum_three(\n scale(scale(len, _96, x, _192), _192, x, _384x), _384x,\n scale(scale(len, _96, y, _192), _192, y, _384y), _384y,\n scale(scale(len, _96, z, _192), _192, z, _384z), _384z, _768, out);\n}\n\nfunction insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n s1 = ax * by;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ay;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n s1 = bx * cy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * by;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cx * dy;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * cy;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cd[3] = u3;\n s1 = dx * ey;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * dy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n de[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n de[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n de[2] = _j - (u3 - bvirt) + (_i - bvirt);\n de[3] = u3;\n s1 = ex * ay;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * ey;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ea[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ea[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ea[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ea[3] = u3;\n s1 = ax * cy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * ay;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ac[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ac[3] = u3;\n s1 = bx * dy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * by;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bd[3] = u3;\n s1 = cx * ey;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * cy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ce[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ce[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ce[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ce[3] = u3;\n s1 = dx * ay;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * dy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n da[2] = _j - (u3 - bvirt) + (_i - bvirt);\n da[3] = u3;\n s1 = ex * by;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ey;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n eb[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n eb[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n eb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n eb[3] = u3;\n\n const abclen = sum_three_scale(ab, bc, ac, cz, az, -bz, abc);\n const bcdlen = sum_three_scale(bc, cd, bd, dz, bz, -cz, bcd);\n const cdelen = sum_three_scale(cd, de, ce, ez, cz, -dz, cde);\n const dealen = sum_three_scale(de, ea, da, az, dz, -ez, dea);\n const eablen = sum_three_scale(ea, ab, eb, bz, ez, -az, eab);\n const abdlen = sum_three_scale(ab, bd, da, dz, az, bz, abd);\n const bcelen = sum_three_scale(bc, ce, eb, ez, bz, cz, bce);\n const cdalen = sum_three_scale(cd, da, ac, az, cz, dz, cda);\n const deblen = sum_three_scale(de, eb, bd, bz, dz, ez, deb);\n const eaclen = sum_three_scale(ea, ac, ce, cz, ez, az, eac);\n\n const deterlen = sum_three(\n liftexact(cdelen, cde, bcelen, bce, deblen, deb, bcdlen, bcd, ax, ay, az, adet), adet,\n liftexact(dealen, dea, cdalen, cda, eaclen, eac, cdelen, cde, bx, by, bz, bdet), bdet,\n sum_three(\n liftexact(eablen, eab, deblen, deb, abdlen, abd, dealen, dea, cx, cy, cz, cdet), cdet,\n liftexact(abclen, abc, eaclen, eac, bcelen, bce, eablen, eab, dx, dy, dz, ddet), ddet,\n liftexact(bcdlen, bcd, abdlen, abd, cdalen, cda, abclen, abc, ex, ey, ez, edet), edet, cddet, cdedet), cdedet, abdet, deter);\n\n return deter[deterlen - 1];\n}\n\nconst xdet = vec(96);\nconst ydet = vec(96);\nconst zdet = vec(96);\nconst fin = vec(1152);\n\nfunction liftadapt(a, b, c, az, bz, cz, x, y, z, out) {\n const len = sum_three_scale(a, b, c, az, bz, cz, _24);\n return sum_three(\n scale(scale(len, _24, x, _48), _48, x, xdet), xdet,\n scale(scale(len, _24, y, _48), _48, y, ydet), ydet,\n scale(scale(len, _24, z, _48), _48, z, zdet), zdet, _192, out);\n}\n\nfunction insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent) {\n let ab3, bc3, cd3, da3, ac3, bd3;\n\n let aextail, bextail, cextail, dextail;\n let aeytail, beytail, ceytail, deytail;\n let aeztail, beztail, ceztail, deztail;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0;\n\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n s1 = aex * bey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bex * aey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ab3 = _j + _i;\n bvirt = ab3 - _j;\n ab[2] = _j - (ab3 - bvirt) + (_i - bvirt);\n ab[3] = ab3;\n s1 = bex * cey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * bey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bc3 = _j + _i;\n bvirt = bc3 - _j;\n bc[2] = _j - (bc3 - bvirt) + (_i - bvirt);\n bc[3] = bc3;\n s1 = cex * dey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * cey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n cd3 = _j + _i;\n bvirt = cd3 - _j;\n cd[2] = _j - (cd3 - bvirt) + (_i - bvirt);\n cd[3] = cd3;\n s1 = dex * aey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = aex * dey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n da3 = _j + _i;\n bvirt = da3 - _j;\n da[2] = _j - (da3 - bvirt) + (_i - bvirt);\n da[3] = da3;\n s1 = aex * cey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * aey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ac3 = _j + _i;\n bvirt = ac3 - _j;\n ac[2] = _j - (ac3 - bvirt) + (_i - bvirt);\n ac[3] = ac3;\n s1 = bex * dey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * bey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bd3 = _j + _i;\n bvirt = bd3 - _j;\n bd[2] = _j - (bd3 - bvirt) + (_i - bvirt);\n bd[3] = bd3;\n\n const finlen = sum(\n sum(\n negate(liftadapt(bc, cd, bd, dez, bez, -cez, aex, aey, aez, adet), adet), adet,\n liftadapt(cd, da, ac, aez, cez, dez, bex, bey, bez, bdet), bdet, abdet), abdet,\n sum(\n negate(liftadapt(da, ab, bd, bez, dez, aez, cex, cey, cez, cdet), cdet), cdet,\n liftadapt(ab, bc, ac, cez, aez, -bez, dex, dey, dez, ddet), ddet, cddet), cddet, fin);\n\n let det = estimate(finlen, fin);\n let errbound = isperrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - aex;\n aextail = ax - (aex + bvirt) + (bvirt - ex);\n bvirt = ay - aey;\n aeytail = ay - (aey + bvirt) + (bvirt - ey);\n bvirt = az - aez;\n aeztail = az - (aez + bvirt) + (bvirt - ez);\n bvirt = bx - bex;\n bextail = bx - (bex + bvirt) + (bvirt - ex);\n bvirt = by - bey;\n beytail = by - (bey + bvirt) + (bvirt - ey);\n bvirt = bz - bez;\n beztail = bz - (bez + bvirt) + (bvirt - ez);\n bvirt = cx - cex;\n cextail = cx - (cex + bvirt) + (bvirt - ex);\n bvirt = cy - cey;\n ceytail = cy - (cey + bvirt) + (bvirt - ey);\n bvirt = cz - cez;\n ceztail = cz - (cez + bvirt) + (bvirt - ez);\n bvirt = dx - dex;\n dextail = dx - (dex + bvirt) + (bvirt - ex);\n bvirt = dy - dey;\n deytail = dy - (dey + bvirt) + (bvirt - ey);\n bvirt = dz - dez;\n deztail = dz - (dez + bvirt) + (bvirt - ez);\n if (aextail === 0 && aeytail === 0 && aeztail === 0 &&\n bextail === 0 && beytail === 0 && beztail === 0 &&\n cextail === 0 && ceytail === 0 && ceztail === 0 &&\n dextail === 0 && deytail === 0 && deztail === 0) {\n return det;\n }\n\n errbound = isperrboundC * permanent + resulterrbound * Math.abs(det);\n\n const abeps = (aex * beytail + bey * aextail) - (aey * bextail + bex * aeytail);\n const bceps = (bex * ceytail + cey * bextail) - (bey * cextail + cex * beytail);\n const cdeps = (cex * deytail + dey * cextail) - (cey * dextail + dex * ceytail);\n const daeps = (dex * aeytail + aey * dextail) - (dey * aextail + aex * deytail);\n const aceps = (aex * ceytail + cey * aextail) - (aey * cextail + cex * aeytail);\n const bdeps = (bex * deytail + dey * bextail) - (bey * dextail + dex * beytail);\n det +=\n (((bex * bex + bey * bey + bez * bez) * ((cez * daeps + dez * aceps + aez * cdeps) +\n (ceztail * da3 + deztail * ac3 + aeztail * cd3)) + (dex * dex + dey * dey + dez * dez) *\n ((aez * bceps - bez * aceps + cez * abeps) + (aeztail * bc3 - beztail * ac3 + ceztail * ab3))) -\n ((aex * aex + aey * aey + aez * aez) * ((bez * cdeps - cez * bdeps + dez * bceps) +\n (beztail * cd3 - ceztail * bd3 + deztail * bc3)) + (cex * cex + cey * cey + cez * cez) *\n ((dez * abeps + aez * bdeps + bez * daeps) + (deztail * ab3 + aeztail * bd3 + beztail * da3)))) +\n 2 * (((bex * bextail + bey * beytail + bez * beztail) * (cez * da3 + dez * ac3 + aez * cd3) +\n (dex * dextail + dey * deytail + dez * deztail) * (aez * bc3 - bez * ac3 + cez * ab3)) -\n ((aex * aextail + aey * aeytail + aez * aeztail) * (bez * cd3 - cez * bd3 + dez * bc3) +\n (cex * cextail + cey * ceytail + cez * ceztail) * (dez * ab3 + aez * bd3 + bez * da3)));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n return insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez);\n}\n\nexport function insphere(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n const aexbey = aex * bey;\n const bexaey = bex * aey;\n const ab = aexbey - bexaey;\n const bexcey = bex * cey;\n const cexbey = cex * bey;\n const bc = bexcey - cexbey;\n const cexdey = cex * dey;\n const dexcey = dex * cey;\n const cd = cexdey - dexcey;\n const dexaey = dex * aey;\n const aexdey = aex * dey;\n const da = dexaey - aexdey;\n const aexcey = aex * cey;\n const cexaey = cex * aey;\n const ac = aexcey - cexaey;\n const bexdey = bex * dey;\n const dexbey = dex * bey;\n const bd = bexdey - dexbey;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n const det =\n (clift * (dez * ab + aez * bd + bez * da) - dlift * (aez * bc - bez * ac + cez * ab)) +\n (alift * (bez * cd - cez * bd + dez * bc) - blift * (cez * da + dez * ac + aez * cd));\n\n const aezplus = Math.abs(aez);\n const bezplus = Math.abs(bez);\n const cezplus = Math.abs(cez);\n const dezplus = Math.abs(dez);\n const aexbeyplus = Math.abs(aexbey) + Math.abs(bexaey);\n const bexceyplus = Math.abs(bexcey) + Math.abs(cexbey);\n const cexdeyplus = Math.abs(cexdey) + Math.abs(dexcey);\n const dexaeyplus = Math.abs(dexaey) + Math.abs(aexdey);\n const aexceyplus = Math.abs(aexcey) + Math.abs(cexaey);\n const bexdeyplus = Math.abs(bexdey) + Math.abs(dexbey);\n const permanent =\n (cexdeyplus * bezplus + bexdeyplus * cezplus + bexceyplus * dezplus) * alift +\n (dexaeyplus * cezplus + aexceyplus * dezplus + cexdeyplus * aezplus) * blift +\n (aexbeyplus * dezplus + bexdeyplus * aezplus + dexaeyplus * bezplus) * clift +\n (bexceyplus * aezplus + aexceyplus * bezplus + aexbeyplus * cezplus) * dlift;\n\n const errbound = isperrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n return -insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent);\n}\n\nexport function inspherefast(pax, pay, paz, pbx, pby, pbz, pcx, pcy, pcz, pdx, pdy, pdz, pex, pey, pez) {\n const aex = pax - pex;\n const bex = pbx - pex;\n const cex = pcx - pex;\n const dex = pdx - pex;\n const aey = pay - pey;\n const bey = pby - pey;\n const cey = pcy - pey;\n const dey = pdy - pey;\n const aez = paz - pez;\n const bez = pbz - pez;\n const cez = pcz - pez;\n const dez = pdz - pez;\n\n const ab = aex * bey - bex * aey;\n const bc = bex * cey - cex * bey;\n const cd = cex * dey - dex * cey;\n const da = dex * aey - aex * dey;\n const ac = aex * cey - cex * aey;\n const bd = bex * dey - dex * bey;\n\n const abc = aez * bc - bez * ac + cez * ab;\n const bcd = bez * cd - cez * bd + dez * bc;\n const cda = cez * da + dez * ac + aez * cd;\n const dab = dez * ab + aez * bd + bez * da;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n return (clift * dab - dlift * abc) + (alift * bcd - blift * cda);\n}\n","import {epsilon, splitter, resulterrbound, estimate, vec, sum} from './util.js';\n\nconst ccwerrboundA = (3 + 16 * epsilon) * epsilon;\nconst ccwerrboundB = (2 + 12 * epsilon) * epsilon;\nconst ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon;\n\nconst B = vec(4);\nconst C1 = vec(8);\nconst C2 = vec(12);\nconst D = vec(16);\nconst u = vec(4);\n\nfunction orient2dadapt(ax, ay, bx, by, cx, cy, detsum) {\n let acxtail, acytail, bcxtail, bcytail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const acx = ax - cx;\n const bcx = bx - cx;\n const acy = ay - cy;\n const bcy = by - cy;\n\n s1 = acx * bcy;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcx;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n B[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n B[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n B[2] = _j - (u3 - bvirt) + (_i - bvirt);\n B[3] = u3;\n\n let det = estimate(4, B);\n let errbound = ccwerrboundB * detsum;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - acx;\n acxtail = ax - (acx + bvirt) + (bvirt - cx);\n bvirt = bx - bcx;\n bcxtail = bx - (bcx + bvirt) + (bvirt - cx);\n bvirt = ay - acy;\n acytail = ay - (acy + bvirt) + (bvirt - cy);\n bvirt = by - bcy;\n bcytail = by - (bcy + bvirt) + (bvirt - cy);\n\n if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) {\n return det;\n }\n\n errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det);\n det += (acx * bcytail + bcy * acxtail) - (acy * bcxtail + bcx * acytail);\n if (det >= errbound || -det >= errbound) return det;\n\n s1 = acxtail * bcy;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcx;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C1len = sum(4, B, 4, u, C1);\n\n s1 = acx * bcytail;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcxtail;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C2len = sum(C1len, C1, 4, u, C2);\n\n s1 = acxtail * bcytail;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcxtail;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const Dlen = sum(C2len, C2, 4, u, D);\n\n return D[Dlen - 1];\n}\n\nexport function orient2d(ax, ay, bx, by, cx, cy) {\n const detleft = (ay - cy) * (bx - cx);\n const detright = (ax - cx) * (by - cy);\n const det = detleft - detright;\n\n const detsum = Math.abs(detleft + detright);\n if (Math.abs(det) >= ccwerrboundA * detsum) return det;\n\n return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum);\n}\n\nexport function orient2dfast(ax, ay, bx, by, cx, cy) {\n return (ay - cy) * (bx - cx) - (ax - cx) * (by - cy);\n}\n","import {epsilon, splitter, resulterrbound, estimate, vec, sum, scale} from './util.js';\n\nconst o3derrboundA = (7 + 56 * epsilon) * epsilon;\nconst o3derrboundB = (3 + 28 * epsilon) * epsilon;\nconst o3derrboundC = (26 + 288 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst at_b = vec(4);\nconst at_c = vec(4);\nconst bt_c = vec(4);\nconst bt_a = vec(4);\nconst ct_a = vec(4);\nconst ct_b = vec(4);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abt = vec(8);\nconst u = vec(4);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _16 = vec(8);\nconst _12 = vec(12);\n\nlet fin = vec(192);\nlet fin2 = vec(192);\n\nfunction finadd(finlen, alen, a) {\n finlen = sum(finlen, fin, alen, a, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction tailinit(xtail, ytail, ax, ay, bx, by, a, b) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3, negate;\n if (xtail === 0) {\n if (ytail === 0) {\n a[0] = 0;\n b[0] = 0;\n return 1;\n } else {\n negate = -ytail;\n s1 = negate * ax;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n }\n } else {\n if (ytail === 0) {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n negate = -xtail;\n s1 = negate * by;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n } else {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ytail * ax;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n a[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n a[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n a[2] = _j - (u3 - bvirt) + (_i - bvirt);\n a[3] = u3;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = xtail * by;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n b[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n b[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n b[2] = _j - (u3 - bvirt) + (_i - bvirt);\n b[3] = u3;\n return 4;\n }\n }\n}\n\nfunction tailadd(finlen, a, b, k, z) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, u3;\n s1 = a * b;\n c = splitter * a;\n ahi = c - (c - a);\n alo = a - ahi;\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n c = splitter * k;\n bhi = c - (c - k);\n blo = k - bhi;\n _i = s0 * k;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * k;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n if (z !== 0) {\n c = splitter * z;\n bhi = c - (c - z);\n blo = z - bhi;\n _i = s0 * z;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * z;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n }\n return finlen;\n}\n\nfunction orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail;\n let adytail, bdytail, cdytail;\n let adztail, bdztail, cdztail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n scale(4, bc, adz, _8), _8,\n scale(4, ca, bdz, _8b), _8b, _16), _16,\n scale(4, ab, cdz, _8), _8, fin);\n\n let det = estimate(finlen, fin);\n let errbound = o3derrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n bvirt = az - adz;\n adztail = az - (adz + bvirt) + (bvirt - dz);\n bvirt = bz - bdz;\n bdztail = bz - (bdz + bvirt) + (bvirt - dz);\n bvirt = cz - cdz;\n cdztail = cz - (cdz + bvirt) + (bvirt - dz);\n\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 &&\n adytail === 0 && bdytail === 0 && cdytail === 0 &&\n adztail === 0 && bdztail === 0 && cdztail === 0) {\n return det;\n }\n\n errbound = o3derrboundC * permanent + resulterrbound * Math.abs(det);\n det +=\n adz * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + adztail * (bdx * cdy - bdy * cdx) +\n bdz * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + bdztail * (cdx * ady - cdy * adx) +\n cdz * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + cdztail * (adx * bdy - ady * bdx);\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n const at_len = tailinit(adxtail, adytail, bdx, bdy, cdx, cdy, at_b, at_c);\n const bt_len = tailinit(bdxtail, bdytail, cdx, cdy, adx, ady, bt_c, bt_a);\n const ct_len = tailinit(cdxtail, cdytail, adx, ady, bdx, bdy, ct_a, ct_b);\n\n const bctlen = sum(bt_len, bt_c, ct_len, ct_b, bct);\n finlen = finadd(finlen, scale(bctlen, bct, adz, _16), _16);\n\n const catlen = sum(ct_len, ct_a, at_len, at_c, cat);\n finlen = finadd(finlen, scale(catlen, cat, bdz, _16), _16);\n\n const abtlen = sum(at_len, at_b, bt_len, bt_a, abt);\n finlen = finadd(finlen, scale(abtlen, abt, cdz, _16), _16);\n\n if (adztail !== 0) {\n finlen = finadd(finlen, scale(4, bc, adztail, _12), _12);\n finlen = finadd(finlen, scale(bctlen, bct, adztail, _16), _16);\n }\n if (bdztail !== 0) {\n finlen = finadd(finlen, scale(4, ca, bdztail, _12), _12);\n finlen = finadd(finlen, scale(catlen, cat, bdztail, _16), _16);\n }\n if (cdztail !== 0) {\n finlen = finadd(finlen, scale(4, ab, cdztail, _12), _12);\n finlen = finadd(finlen, scale(abtlen, abt, cdztail, _16), _16);\n }\n\n if (adxtail !== 0) {\n if (bdytail !== 0) {\n finlen = tailadd(finlen, adxtail, bdytail, cdz, cdztail);\n }\n if (cdytail !== 0) {\n finlen = tailadd(finlen, -adxtail, cdytail, bdz, bdztail);\n }\n }\n if (bdxtail !== 0) {\n if (cdytail !== 0) {\n finlen = tailadd(finlen, bdxtail, cdytail, adz, adztail);\n }\n if (adytail !== 0) {\n finlen = tailadd(finlen, -bdxtail, adytail, cdz, cdztail);\n }\n }\n if (cdxtail !== 0) {\n if (adytail !== 0) {\n finlen = tailadd(finlen, cdxtail, adytail, bdz, bdztail);\n }\n if (bdytail !== 0) {\n finlen = tailadd(finlen, -cdxtail, bdytail, adz, adztail);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function orient3d(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n\n const det =\n adz * (bdxcdy - cdxbdy) +\n bdz * (cdxady - adxcdy) +\n cdz * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * Math.abs(adz) +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * Math.abs(bdz) +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * Math.abs(cdz);\n\n const errbound = o3derrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n\n return orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent);\n}\n\nexport function orient3dfast(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n return adx * (bdy * cdz - bdz * cdy) +\n bdx * (cdy * adz - cdz * ady) +\n cdx * (ady * bdz - adz * bdy);\n}\n","export const epsilon = 1.1102230246251565e-16;\nexport const splitter = 134217729;\nexport const resulterrbound = (3 + 8 * epsilon) * epsilon;\n\n// fast_expansion_sum_zeroelim routine from oritinal code\nexport function sum(elen, e, flen, f, h) {\n let Q, Qnew, hh, bvirt;\n let enow = e[0];\n let fnow = f[0];\n let eindex = 0;\n let findex = 0;\n if ((fnow > enow) === (fnow > -enow)) {\n Q = enow;\n enow = e[++eindex];\n } else {\n Q = fnow;\n fnow = f[++findex];\n }\n let hindex = 0;\n if (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = enow + Q;\n hh = Q - (Qnew - enow);\n enow = e[++eindex];\n } else {\n Qnew = fnow + Q;\n hh = Q - (Qnew - fnow);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n while (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n } else {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n }\n while (eindex < elen) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n while (findex < flen) {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function sum_three(alen, a, blen, b, clen, c, tmp, out) {\n return sum(sum(alen, a, blen, b, tmp), tmp, clen, c, out);\n}\n\n// scale_expansion_zeroelim routine from oritinal code\nexport function scale(elen, e, b, h) {\n let Q, sum, hh, product1, product0;\n let bvirt, c, ahi, alo, bhi, blo;\n\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n let enow = e[0];\n Q = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n hh = alo * blo - (Q - ahi * bhi - alo * bhi - ahi * blo);\n let hindex = 0;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n for (let i = 1; i < elen; i++) {\n enow = e[i];\n product1 = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n product0 = alo * blo - (product1 - ahi * bhi - alo * bhi - ahi * blo);\n sum = Q + product0;\n bvirt = sum - Q;\n hh = Q - (sum - bvirt) + (product0 - bvirt);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n Q = product1 + sum;\n hh = sum - (Q - product1);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function negate(elen, e) {\n for (let i = 0; i < elen; i++) e[i] = -e[i];\n return elen;\n}\n\nexport function estimate(elen, e) {\n let Q = e[0];\n for (let i = 1; i < elen; i++) Q += e[i];\n return Q;\n}\n\nexport function vec(n) {\n return new Float64Array(n);\n}\n","\nexport {orient2d, orient2dfast} from './esm/orient2d.js';\nexport {orient3d, orient3dfast} from './esm/orient3d.js';\nexport {incircle, incirclefast} from './esm/incircle.js';\nexport {insphere, inspherefast} from './esm/insphere.js';\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import * as d3 from \"d3\"\nimport { Canvg } from 'canvg';\n\nclass TimeSeries \n\n ###*\n * TimeSeries Field for the Listing Table\n *\n * A multi value field is identified by the column type \"timeseries\" in the\n * listing view, e.g. `self.columns = {\"Result\": {\"type\": \"timeseries\"}, ... }`\n *\n ###\n constructor: (element) ->\n \n @container = element;\n # remember the initial value\n this.state =\n value: element.state.value\n\n this.props = element.props\n\n console.log('constructor complete')\n\n ###\n * Converts the string value to an array\n ###\n to_matrix: (listString, headers) ->\n # No values yet\n if listString == \"\"\n return \"\"\n\n # Parse the string version of the list of lists into an array\n # list = JSON.parse(listString)\n list = listString\n\n # Map each inner list to an object using the headers\n matrix = list.map (innerList) ->\n obj = {}\n headers.forEach (header, index) ->\n obj[header] = innerList[index]\n obj\n\n matrix.map (row) ->\n headers.forEach (header, index) ->\n if index = 0\n row[header] = row[header]\n else\n row[header] = parseFloat(row[header])\n matrix\n\n\n getLineConfigs = (count) ->\n configs = [\n {color: \"#666666\", opacity: 1.0, symbol: d3.symbolCircle, dash: \"\"}\n {color: \"#666666\", opacity: 0.8, symbol: d3.symbolCircle, dash: \"\"}\n {color: \"#666666\", opacity: 0.6, symbol: d3.symbolCircle, dash: \"\"}\n {color: \"#666666\", opacity: 0.4, symbol: d3.symbolCircle, dash: \"\"}\n {color: \"#666666\", opacity: 0.2, symbol: d3.symbolCircle, dash: \"\"}\n ]\n configs.slice(0, count)\n\n # Create symbol generator\n symbolGenerator = d3.symbol().size(24) # Adjust size as needed\n\n ###\n * Inputs table builder. Generates a table of inputs as matrix\n ###\n build_graph: ->\n console.log \"TimeSeries::build_graph: entered\"\n\n console.log \"TimeSeries::build_graph: is current\"\n values = this.state.value\n\n if values == \"\"\n console.log \"TimeSeries::build_graph: exit because no data\"\n @container.current.appendChild([])\n return\n\n # Get datasets\n columns = this.props.item.time_series_columns\n col_types = columns.map (i) -> i.ColumnType\n headers = columns.map (i) -> i.ColumnTitle\n index = headers[0]\n data = @to_matrix(values, headers)\n\n # Generate the line colors (exclude index)\n line_configs = getLineConfigs(headers.length - 1)\n if col_types[col_types.length - 1] == \"average\"\n line_configs[line_configs.length - 1] = {\n color: \"#000000\",\n dash: \"\",\n opacity: \"1.0\",\n symbol: d3.symbolCircle\n }\n console.log(line_configs)\n\n # Set up dimensions\n margin = {top: 40, right: 80, bottom: 50, left: 60}\n width = 700 - margin.left - margin.right\n height = 400 - margin.top - margin.bottom + 50\n\n # Set up scales\n x = d3.scaleLinear()\n .domain(d3.extent(data, (d) -> parseFloat(d[index])))\n .range([0, width])\n\n # Set up Y scale with trimmed domain\n minY = d3.min(data.flatMap((row) -> headers.slice(1).map((header) -> parseFloat(row[header]))))\n minY = minY- (minY * 0.1)\n maxY = d3.max(data.flatMap((row) -> headers.slice(1).map((header) -> parseFloat(row[header]))))\n # maxY = maxY + (maxY * 0.1)\n\n y = d3.scaleLinear()\n .domain([Math.floor(minY), Math.ceil(maxY)]) # Trim domain to just cover data range\n .range([height, 0])\n\n # Create SVG container\n svg = d3.select(@container)\n .append('svg')\n .style(\"height\", \"#{height+120}px\")\n\n # Remove any previous SVG content\n svg.selectAll('*').remove()\n\n svg = svg\n .attr(\"width\", width + margin.left + margin.right)\n .attr(\"height\", height + margin.top + margin.bottom)\n .attr('xmlns', 'http://www.w3.org/2000/svg')\n .append(\"g\")\n .attr(\"transform\", \"translate(#{margin.left},#{margin.top})\")\n\n # Graph title\n svg.append(\"text\")\n .attr(\"x\", width / 2)\n .attr(\"y\", -margin.top / 2)\n .attr(\"text-anchor\", \"middle\")\n .style(\"font-size\", \"16px\")\n .style(\"font-weight\", \"bold\")\n .text(this.props.item.time_series_graph_title)\n\n # X-axis\n svg.append(\"g\")\n .attr(\"transform\", \"translate(0,#{height})\")\n .call(d3.axisBottom(x))\n\n # X-axis label\n svg.append(\"text\")\n .attr(\"x\", width / 2)\n .attr(\"y\", height + margin.bottom - 10)\n .attr(\"text-anchor\", \"middle\")\n .style(\"font-size\", \"12px\")\n .text(this.props.item.time_series_graph_xaxis)\n\n # Y-axis\n svg.append(\"g\")\n .call(d3.axisLeft(y))\n\n # Y-axis label\n svg.append(\"text\")\n .attr(\"transform\", \"rotate(-90)\")\n .attr(\"x\", -height / 2)\n .attr(\"y\", -margin.left + 15)\n .attr(\"text-anchor\", \"middle\")\n .style(\"font-size\", \"12px\")\n .text(this.props.item.time_series_graph_yaxis)\n\n # Add horizontal grid lines\n svg.append(\"g\")\n .attr(\"class\", \"grid horizontal\")\n .attr(\"transform\", \"translate(0, 0)\")\n .call(\n d3.axisLeft(y)\n .tickSize(-width) # Extend ticks across the chart width\n .tickFormat(\"\") # Remove tick labels\n )\n .selectAll(\"line\")\n .style(\"stroke\", \"#999\") # Lighter gray\n # .style(\"stroke-dasharray\", \"2,2\")\n .style(\"opacity\", 0.8) # Adjust transparency\n\n # Add vertical grid lines\n svg.append(\"g\")\n .attr(\"class\", \"grid vertical\")\n .attr(\"transform\", \"translate(0, #{height})\")\n .call(\n d3.axisBottom(x)\n .tickSize(-height) # Extend ticks across the chart height\n .tickFormat(\"\") # Remove tick labels\n )\n .selectAll(\"line\")\n .style(\"stroke\", \"#999\") # Lighter gray\n .style(\"stroke-dasharray\", \"2,2\")\n .style(\"opacity\", 0.8) # Adjust transparency\n\n # Draw axes\n svg.append(\"g\")\n .attr(\"transform\", \"translate(0,#{height})\")\n .call(d3.axisBottom(x))\n\n svg.append(\"g\")\n .call(d3.axisLeft(y))\n\n console.log(headers)\n console.log(data)\n\n headers.slice(1).forEach((key, i) ->\n console.log(\"Main loop: \" + key + \" \" + i)\n\n # Filter data to exclude rows with null, undefined, or non-numeric values for the current key\n validData = data.filter((d) ->\n d[key]? and not isNaN(d[key]) # Ensure value exists and is numeric\n )\n\n # Line generator\n lineGen = d3.line()\n .x((d) ->\n x(d[index])\n )\n .y((d) ->\n y(d[key])\n )\n\n svg.append(\"path\")\n .datum(validData) # Use filtered data\n .attr(\"fill\", \"none\")\n .attr(\"stroke-width\", 2)\n .attr(\"stroke\", line_configs[i].color)\n .attr(\"opacity\", line_configs[i].opacity)\n .attr(\"stroke-dasharray\", line_configs[i].dash)\n .attr(\"d\", lineGen)\n\n # Add data points with different symbols\n svg.selectAll(\".symbol-#{i}\")\n .data(validData) # Use filtered data\n .enter().append(\"path\")\n .attr(\"class\", \"symbol symbol-#{i}\")\n .attr(\"d\", symbolGenerator.type(line_configs[i].symbol))\n .attr(\"transform\", (d) ->\n # Ensure valid x and y before applying transform\n xVal = parseFloat(d[index])\n yVal = parseFloat(d[key])\n if not isNaN(xVal) and not isNaN(yVal)\n \"translate(#{x(xVal)}, #{y(yVal)})\"\n else\n null # Skip invalid points\n )\n .style(\"fill\", line_configs[i].color)\n .style(\"opacity\", line_configs[i].opacity)\n )\n\n # Add legend\n legend = svg.append(\"g\")\n .attr(\"class\", \"legend\")\n .attr(\"transform\", \"translate(50, #{height + 50})\") # Move legend below the graph\n\n # Add legend items\n legendItems = legend.selectAll(\"g\")\n .data(headers.slice(1))\n .enter().append(\"g\")\n .attr(\"transform\", (d, i) ->\n xOffset = parseFloat((i % Math.floor(width / 100)) * 100) # Horizontal spacing\n yOffset = parseFloat(Math.floor(i / Math.floor(width / 100)) * 20) # Vertical spacing\n \"translate(#{xOffset}, #{yOffset})\"\n )\n\n\n # Add legend color squares\n legendItems.append(\"rect\")\n .attr(\"x\", 0)\n .attr(\"width\", 18)\n .attr(\"height\", 18)\n .style(\"fill\", (d, i) -> line_configs[i].color)\n .style(\"opacity\", (d, i) -> line_configs[i].opacity)\n\n # Add legend text\n legendItems.append(\"text\")\n .attr(\"x\", 24)\n .attr(\"y\", 9)\n .attr(\"dy\", \"0.35em\")\n .style(\"font-size\", \"12px\")\n .text((d) -> d)\n\n console.log \"TimeSeries::build_graph: svg done\"\n\n # # Convert SVG to PNG and replace it in the container\n # d3ToPng(svg.node(), 'my-image', { scale: 2, download: false, format: 'png' })\n # .then (fileData) =>\n # # Create an image element and set its source to the generated PNG\n # d3.select(@container).selectAll('svg').remove() # Remove existing SVG\n # d3.select(@container).selectAll('img').remove() # Remove existing SVG\n # d3.select(@container).append('div')\n # .attr('id', 'test')\n # d3.select(@container).append('img')\n # .attr('id', 'mike')\n # .attr('src', fileData)\n # .attr('alt', 'Generated Image')\n\n # Convert SVG to PNG using a canvas\n console.log(\"Container:\", @container)\n \n test_svg = d3.select(@container).append('svg')\n .attr('width', 100)\n .attr('height', 100)\n .attr('xmlns', 'http://www.w3.org/2000/svg') # Ensure correct namespace\n\n test_svg.append('circle')\n .attr('cx', 50)\n .attr('cy', 50)\n .attr('r', 40)\n .attr('fill', 'red')\n\n # svgString = new XMLSerializer().serializeToString(test_svg.node())\n # console.log('svgString: ' + svgString)\n\n # # Create canvas with same dimensions as SVG\n # canvas = document.createElement 'canvas'\n # canvas.width = width\n # canvas.height = height\n # \n # parent = @container\n # # Ensure container has the canvas\n # parent.innerHTML = ''\n # parent.appendChild canvas\n\n # # Directly log canvas and Canvg for debugging\n # console.log 'Canvas:', canvas\n # console.log 'Canvg:', Canvg\n # console.log 'SVG outerHTML:', test_svg.node().outerHTML\n\n # try\n # # Convert SVG to PNG\n # Canvg.from(canvas, test_svg.node().outerHTML).then (canvg) ->\n # canvg.render()\n # \n # # Convert to image and replace SVG\n # img = document.createElement 'img'\n # img.src = canvas.toDataURL 'image/png'\n # container.innerHTML = ''\n # container.appendChild img\n\n # .catch (error) ->\n # console.error 'SVG to PNG conversion failed:', error\n # catch err\n # console.error 'Canvas creation error:', err\n\n\n console.log \"TimeSeries::build_graph: png done\"\n\nwindow.TimeSeries = TimeSeries\n\n"],"names":["d3","_interopRequireWildcard","require","_canvg","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","o","Symbol","iterator","constructor","prototype","_classCallCheck","TypeError","_defineProperties","length","enumerable","configurable","writable","_toPropertyKey","key","_createClass","_toPrimitive","toPrimitive","String","Number","TimeSeries","element","container","state","value","props","console","log","to_matrix","listString","headers","list","matrix","map","innerList","obj","forEach","header","index","row","parseFloat","build_graph","col_types","columns","data","height","legend","legendItems","line_configs","margin","maxY","minY","svg","test_svg","values","width","x","y","current","appendChild","item","time_series_columns","ColumnType","ColumnTitle","getLineConfigs","color","dash","opacity","symbol","symbolCircle","top","right","bottom","left","scaleLinear","domain","extent","d","range","min","flatMap","slice","max","Math","floor","ceil","select","append","style","concat","selectAll","remove","attr","text","time_series_graph_title","axisBottom","time_series_graph_xaxis","axisLeft","time_series_graph_yaxis","tickSize","tickFormat","lineGen","validData","filter","isNaN","line","datum","enter","symbolGenerator","type","xVal","yVal","xOffset","yOffset","count","configs","size","window"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"timeseries.js","mappings":";;;;;;;;;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA,CAAC;;AAED;;;;;;;;;;;ACnCA,UAAU,mBAAO,CAAC,8EAAiB;AACnC,2CAA2C,qBAAM;AACjD;AACA;AACA;AACA;;AAEA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA,cAAc;AACd,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1EA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yCAAyC;AACzC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B,IAAI,SAAS,IAAI,SAAS,IAAI;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,2BAA2B,IAAI,SAAS,IAAI,SAAS,IAAI;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,+BAA+B,EAAE,cAAc,EAAE,cAAc,EAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,+BAA+B,EAAE,cAAc,EAAE,cAAc,EAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,oDAAoD;AACpD,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc;AACd;AACA;;AAEA;;AAEA;;;;;;;;;;;;;;;;;;;;;AC7SA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,uGAAuG;AAC1G;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,0BAA0B;AACrC,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,aAAa;AACb;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC;;AAEzC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,WAAW,0BAA0B;AACrC,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,YAAY;AACZ,aAAa,WAAW,KAAK;AAC7B;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa;AACb;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa;AACb;;;AAGA;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAoB,WAAW;AAC/B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,YAAY;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,eAAe;AACrC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,aAAa;AAClC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa;AACb;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa;AACb;;;AAGA;AACA;AACA,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,oBAAoB,aAAa;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB,cAAc;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEwL;;;;;;;;;;;;AC9nB3K;;AAEb,8CAA6C,EAAE,aAAa,EAAC;;AAE7D,4BAA4B,mBAAO,CAAC,wCAAK;AACzC,eAAe,mBAAO,CAAC,kDAAU;AACjC,kBAAkB,mBAAO,CAAC,qEAAc;AACxC,sBAAsB,mBAAO,CAAC,8EAAkB;;AAEhD,qCAAqC,4DAA4D;;AAEjG;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,gCAAgC;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,8BAA8B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,6CAA6C;AAC7D,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,0BAA0B;AAC1C;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gBAAgB,0BAA0B;AAC1C;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,sJAAsJ;AACpK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iLAAiL;AAC/L,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kCAAkC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iDAAiD,IAAI;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,QAAQ,gBAAgB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qDAAqD,IAAI;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,uCAAuC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,SAAS,SAAS,uBAAuB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS,SAAS,uBAAuB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8BAA8B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA,yCAAyC,2BAA2B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA,0CAA0C,mBAAmB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW,iBAAiB,aAAa,oBAAoB;AAC7E;AACA;AACA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA,uBAAuB,SAAS;AAChC;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,SAAS;AACzB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,mBAAmB;AACnC,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,mBAAmB;AACnC,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,mBAAmB;AACnC,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,iDAAiD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,yCAAyC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,yCAAyC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC,cAAc,yCAAyC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,gBAAgB,wEAAwE;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gBAAgB,IAAI,gBAAgB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,UAAU;AAC1B,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,wBAAwB,QAAQ;AAChC,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,oBAAoB,YAAY;AAChC,oBAAoB,sBAAsB;AAC1C,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gBAAgB;AAChC,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,wBAAwB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,oCAAoC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA,oBAAoB,0CAA0C;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,cAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2CAA2C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC;AACvD;AACA;AACA;AACA,gBAAgB,uCAAuC;AACvD;AACA;AACA;AACA;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA,gBAAgB,+BAA+B;AAC/C;AACA;AACA;AACA;AACA,cAAc,yDAAyD;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA,sBAAsB;AACtB,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sCAAsC,SAAS,OAAO,KAAK,QAAQ,YAAY;AAC/E;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,6BAA6B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2BAA2B;AAC3C;AACA,uBAAuB,YAAY;AACnC,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,yBAAyB,yLAAyL,IAAI;AACtN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mDAAmD;AACnE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB,2BAA2B;AAC3B,sBAAsB;AACtB,+BAA+B;AAC/B,mBAAmB;AACnB,WAAW;AACX,WAAW;AACX,WAAW;AACX,WAAW;AACX,aAAa;AACb,qBAAqB;AACrB,uBAAuB;AACvB,mBAAmB;AACnB,mBAAmB;AACnB,gBAAgB;AAChB,eAAe;AACf,sBAAsB;AACtB,4BAA4B;AAC5B,0BAA0B;AAC1B,2BAA2B;AAC3B,6BAA6B;AAC7B,2BAA2B;AAC3B,qBAAqB;AACrB,YAAY;AACZ,mBAAmB;AACnB,uBAAuB;AACvB,gBAAgB;AAChB,oBAAoB;AACpB,uBAAuB;AACvB,oBAAoB;AACpB,mBAAmB;AACnB,6BAA6B;AAC7B,qBAAqB;AACrB,mBAAmB;AACnB,cAAc;AACd,2BAA2B;AAC3B,aAAa;AACb,mBAAmB;AACnB,cAAc;AACd,mBAAmB;AACnB,kBAAkB;AAClB,sBAAsB;AACtB,aAAa;AACb,sBAAsB;AACtB,uBAAuB;AACvB,gBAAgB;AAChB,WAAW;AACX,WAAW;AACX,WAAW;AACX,6BAA6B;AAC7B,mBAAmB;AACnB,uBAAuB;AACvB,cAAc;AACd,kBAAkB;AAClB,qBAAqB;AACrB,aAAa;AACb,cAAc;AACd,YAAY;AACZ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;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;ACvDO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;;AAEA;;AAEP;AACA;AACA;AACA;AACA,SAAS,6BAA6B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6BAA6B,MAAM;AACnC;AACA;AACA;;AAEA;AACA,6BAA6B,OAAO;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,+BAA+B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,4CAA4C;AAC5C;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC;AACxC,4CAA4C;AAC5C;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AClHe;AACf;AACA;;;;;;;;;;;;;;;;ACFe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACjBA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AChCe;AACf;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACLe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACNqC;;AAEtB;AACf,YAAY,wDAAQ;AACpB;AACA;;;;;;;;;;;;;;;;;ACLoC;;AAErB;AACf,eAAe,gDAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACVoC;;AAErB;AACf,uDAAuD,gDAAS;AAChE;AACA;AACA;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACde;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACTe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC5Be;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACVA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACpEuC;;AAExB,oCAAoC,qDAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yDAAS;AACrB,YAAY,yDAAS;AACrB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC5BuC;AACF;;AAEtB,yCAAyC,qDAAS;AACjE,mCA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ACI;AACN;AACG;;;;;;;;;;;;;;;;;ACxDX;;AAErB;AACf,eAAe,gDAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,gDAAS,gBAAgB,gDAAS;AAC7D;;;;;;;;;;;;;;;;;AClBuC;;AAExB,iCAAiC,qDAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yDAAS;AACrB,YAAY,yDAAS;AACrB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC5BuC;AACF;;AAEtB,sCAAsC,qDAAS;AAC9D,mCAAmC,wDAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AClBe;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACJe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACnBe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACrBe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AClBsD;;AAEvC;AACf,SAAS,wDAAQ;AACjB;;AAEO;AACP,SAAS,2DAAa;AACtB;;;;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;;AAEe;AACf;AACA;;;;;;;;;;;;;;;;ACRe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACnBe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACrBoC;;AAErB;AACf,qBAAqB,gDAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC3ByC;;AAE1B;AACf;AACA;AACA,iBAAiB,wDAAa;AAC9B;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACjBe;AACf;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACnBe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;ACde;AACf;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACF2B;AACU;AACV;AACU;AACM;AACC;AACD;AACN;;AAEtB;AACf,6BAA6B,mDAAO;AACpC;AACA,8BAA8B,mDAAG;AACjC,qBAAqB,mDAAG;AACxB;AACA;AACA;AACA,eAAe,mDAAG,CAAC,2DAAW;AAC9B,eAAe,mDAAG;AAClB;AACA;;AAEO,6CAA6C,kDAAM;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,4CAA4C,kDAAM;AACzD;AACA,gDAAgD,sDAAM;AACtD,qBAAqB,wDAAQ;AAC7B,qBAAqB,wDAAQ;AAC7B;AACA;AACA;AACA;AACA,EAAE,2DAAW,2BAA2B,0DAAgB;AACxD,MAAM,wDAAQ;AACd;AACA;;;;;;;;;;;;;;;;;AC9C2D;;AAE3D;AACA;AACe;AACf;AACA;AACA;;AAEA;;AAEA,oCAAoC,sDAAgB,GAAG,wDAAc;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACpDe;AACf;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACZuC;AACoB;;AAE5C,gCAAgC,qDAAS;AACxD;AACA;AACA;AACA,0DAA0D,qDAAS;AACnE;AACA;AACA;AACA;AACA,0BAA0B,qDAAS,aAAa,0DAAgB,eAAe,wDAAc;AAC7F;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;;ACvBe;AACf;AACA;AACA;AACA;AACA,MAAM,aAAa;AACnB;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACbe;AACf;AACA;AACA;;;;;;;;;;;;;;;;;ACHyC;;AAE1B;AACf,gBAAgB,0DAAU;AAC1B;AACA;;;;;;;;;;;;;;;;;ACLA,iEAAe,qBAAqB,EAAC;;AAE9B;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACZe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACTuC;AACJ;;AAEpB;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA,WAAW,uDAAO;AAClB;AACA;AACA;;AAEO,kCAAkC,qDAAS;AAClD,kBAAkB,qDAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;;ACtCqC;;AAEtB;AACf,SAAS,wDAAQ;AACjB;;;;;;;;;;;;;;;;ACJe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACjBe;AACf;AACA;AACA;AACA;AACA;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;AClBgC;AACM;;AAEvB;AACf,YAAY,qDAAK,cAAc,wDAAQ,iBAAiB,wDAAQ;AAChE;AACA;;;;;;;;;;;;;;;;;;ACNgC;AACQ;;AAEzB;AACf,YAAY,qDAAK,cAAc,yDAAS;AACxC;AACA;;;;;;;;;;;;;;;;;ACNgC;;AAEjB;AACf,wCAAwC,qDAAK;AAC7C;;;;;;;;;;;;;;;;;;ACJA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,OAAO;AACxC,yBAAyB,OAAO;AAChC,IAAI;AACJ,iCAAiC,OAAO;AACxC,yBAAyB,OAAO;AAChC;AACA;AACA;;AAEO;AACP;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACtD2B;;AAEZ;AACf;AACA,uBAAuB,mDAAG,4CAA4C,QAAQ;AAC9E,2DAA2D,QAAQ;AACnE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;ACdoC;;AAErB;AACf,kBAAkB,gDAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACVe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACxBuC;;AAExB;AACf,SAAS,yDAAS;AAClB;;;;;;;;;;;;;;;;;;;;ACJqC;;AAErC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yGAAyG,oDAAQ;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2CAA2C,4FAA4F;;AAEvI;AACA;AACA,2CAA2C,gCAAgC,yEAAyE;AACpJ;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,yCAAyC;;AAElF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,yBAAyB;AACpD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;AC7KA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;;;;ACGmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACLkB;AACW;AACL;AACE;AACL;AACH;AACD;AACgB;;AAEpD,iBAAiB,aAAa;AAC9B,kBAAkB,cAAc;AAChC,mBAAmB,eAAe;AAClC,mBAAmB;;AAEnB,OAAO,eAAe;;AAEtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAA0B,iEAAiE;AAC3F,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA,0BAA0B,iEAAiE;AAC3F,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA,wBAAwB,yCAAyC;AACjE,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,uDAAQ;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,wDAAM;AAChB;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAuC,gBAAgB;;AAEvD;;AAEA;AACA,qCAAqC,oCAAoC;AACzE,sCAAsC,yBAAyB;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C,sDAAsD;AACrG,6DAA6D,sCAAsC;AACnG;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,0DAAW;;AAE/B;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW;AACX,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAgB,wDAAM;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,iHAAiH;AACpJ,mCAAmC,iGAAiG;AACpI,uCAAuC,wGAAwG;AAC/I,wCAAwC,wGAAwG;AAChJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA,cAAc,wDAAM;AACpB;AACA;AACA;AACA,YAAY,iDAAU;AACtB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,wDAAO;AACrB;AACA;AACA;AACA,SAAS;;AAET,IAAI,wDAAS;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB,wDAAM;AACtB;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN,iBAAiB,wDAAM;AACvB;AACA;AACA;AACA;AACA;;AAEA,MAAM,oDAAW;AACjB;;AAEA;AACA;;AAEA;AACA;AACA;AACA,qDAAqD,wDAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,uDAAO;AACb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,wDAAwD;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,0DAAa;AACnB;AACA;AACA;AACA,8CAA8C,qBAAqB,QAAQ;AAC3E,QAAQ;AACR,QAAQ,gDAAU;AAClB;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;;AAEA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,UAAU;AAC7B;AACA,yCAAyC;AACzC,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,uDAAO;AACb;;AAEA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,oCAAoC;AACpC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,uDAAO;AACb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;;AAEA;AACA,sEAAsE,wDAAQ;AAC9E;;AAEA;AACA,sEAAsE,wDAAQ;AAC9E;;AAEA;AACA,yEAAyE,wDAAQ;AACjF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;AC5mBA,iEAAe,YAAY,EAAC;;;;;;;;;;;;;;;;ACAb;AACf;AACA;AACA;AACA;AACA;AACA,CAAC;AACD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I2C;;AAEpC;;AAEA;AACA;;AAEP;AACA;AACA;AACA,yBAAyB,IAAI;AAC7B,wCAAwC,IAAI,GAAG,IAAI,GAAG,IAAI;AAC1D,wCAAwC,IAAI,GAAG,IAAI,GAAG,IAAI;AAC1D,0CAA0C,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;AACnE,0CAA0C,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;AACnE,wCAAwC,IAAI,GAAG,IAAI,GAAG,IAAI;AAC1D,0CAA0C,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sDAAM;AACN;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA,sDAAM,WAAW,kDAAM;AACvB;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,aAAa,YAAY,EAAE,YAAY,EAAE,YAAY;AACrD;;AAEA;AACA,aAAa,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,oDAAoD;AAC3G;;AAEA;AACA;AACA,YAAY,2BAA2B,EAAE,eAAe,IAAI,eAAe,IAAI,eAAe,EAAE,qBAAqB,EAAE,GAAG;AAC1H;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,sDAAM,WAAW,kDAAM;AACvB;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,cAAc,2BAA2B,EAAE,eAAe,IAAI,qBAAqB,KAAK,qBAAqB,GAAG,qBAAqB,EAAE,GAAG;AAC1I;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AC3Y2C;AACyB;AACzB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,0CAAG,OAAO,qDAAU;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,6CAAO;AACzC;AACA;;AAEe;AACf;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA,sDAAM,uBAAuB,kDAAM,CAAC,4CAAK;AACzC;AACA,oBAAoB,+CAAQ,YAAY,+CAAQ;AAChD;AACA,GAAG;AACH;AACA,oBAAoB,6CAAM,YAAY,6CAAM;AAC5C;AACA,GAAG;AACH;AACA,iDAAiD,6CAAO;AACxD;AACA;AACA;AACA;AACA,eAAe,0CAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;;;;;AC5DD,6BAAe,oCAAS;AACxB;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACTsD;AACE;AACJ;;;;;;;;;;;;;;;;;;;;;;;;ACFT;AACO;AACP;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,0CAAG,OAAO,qDAAU;AACzC;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEe;AACf;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA,sDAAM,WAAW,kDAAM,CAAC,4CAAK;AAC7B;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0CAAG;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iCAAiC,6CAAO;AACxC;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,6CAAO;AACvB;AACA;;AAEA,sDAAM,WAAW,kDAAM,CAAC,4CAAK;AAC7B;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;;;;;AC1HM;AACA;;;;;;;;;;;;;;;;ACDP,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACJA;;AAEO;;;;;;;;;;;;;;;;ACFP,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;ACFA,iEAAe,YAAY,EAAC;;;;;;;;;;;;;;;;ACA5B,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AC1B+D;AAC9B;AACM;AACV;AACQ;AACA;AACR;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA,kBAAkB,gDAAgB;AAClC;;AAEA;AACA;;AAEA;AACA;AACA,gBAAgB,oDAAM;AACtB,WAAW,oDAAK,IAAI,oDAAI;AACxB;AACA;AACA,MAAM;AACN,2BAA2B,qDAAS;AACpC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,oDAAoD,MAAM;;AAE1D;AACA;;AAEA;AACA;AACA,UAAU,oDAAI;AACd;AACA,KAAK;;AAEL;AACA,oDAAoD,OAAO;AAC3D,YAAY,wDAAQ;AACpB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,+DAA+D;AAC/D;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,+DAA+D;AAC/D;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,QAAQ;AACR,iEAAiE;AACjE;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4FAA4F,wDAAQ,CAAC,4CAAK,YAAY,wDAAQ;AAC9H;;AAEA;AACA,2DAA2D,gDAAI;AAC/D;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;AChO2C;AACV;AACI;AACA;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,wDAAQ;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,+CAAK,EAAE,kCAAkC;AAC7C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,oDAAK,mBAAmB,oDAAG;AACtC;;AAEA,WAAW,wDAAQ;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,wDAAQ;AAC3B;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA,2CAA2C,WAAW,oDAAG,iBAAiB;AAC1E;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iEAAiE,wDAAQ;AACzE;;AAEA;AACA,iEAAiE,wDAAQ;AACzE;;AAEA;AACA,sEAAsE,wDAAQ;AAC9E;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,4FAA4F,wDAAQ,CAAC,4CAAK,YAAY,wDAAQ;AAC9H;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;ACpJkD;AACK;;;;;;;;;;;;;;;;ACDvD,6BAAe,sCAAW;;;;;;;;;;;;;;;;;;;;ACAU;AACP;AACM;AACA;;AAEnC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS,mBAAmB;AAC5B,kBAAkB,sBAAsB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kDAAU;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,wBAAwB;AAChE,iGAAiG;AACjG;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA,6BAA6B,kDAAU;AACvC,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,sDAAsD;AACtD;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA,qCAAqC,OAAO;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mDAAO;AACtB;AACA;AACA,WAAW,4DAA4D;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yDAAyD;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,mDAAmD,gDAAI;AACvD,WAAW,8BAA8B;AACzC,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gDAAI;AACvD,WAAW,QAAQ;AACnB,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gDAAI;AACvD,WAAW,cAAc;AACzB;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mDAAO;AAC/B;AACA;AACA;AACA;AACA,mDAAmD,gDAAI;AACvD,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,8CAA8C,OAAO;AACrD;AACA;AACA;AACA;AACA,wBAAwB,mDAAO;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACvPkD;AACF;;;;;;;;;;;;;;;;ACDhD;;AAEe;AACf;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,kBAAkB,yBAAyB,GAAG,yBAAyB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,cAAc,GAAG,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,GAAG,GAAG,GAAG;AAClD;AACA;AACA,kBAAkB,EAAE,GAAG,EAAE,SAAS,MAAM,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,cAAc,GAAG,cAAc;AAC/F;AACA;AACA,kBAAkB,yBAAyB,GAAG,yBAAyB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG;AACzF;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACpCe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AChB6B;AACM;;AAEpB;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW,wBAAwB,WAAW;AACzD,gBAAgB;;AAEhB;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gDAAI;AACvD,WAAW,WAAW,yBAAyB,0BAA0B;AACzE;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,gDAAI;AACvD;AACA;AACA;AACA;AACA,mDAAmD,gDAAI;AACvD;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW,SAAS;AAC/B,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA,wBAAwB,mDAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,SAAS;AAC9D,yCAAyC,SAAS;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,0BAA0B,gCAAgC;AACrE;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,OAAO;AACxF;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C,gEAAgE,OAAO;AACvE,kCAAkC,UAAU;AAC5C,gEAAgE,OAAO;AACvE,kCAAkC,UAAU;AAC5C,gEAAgE,OAAO;AACvE,kCAAkC,UAAU;AAC5C,gEAAgE,OAAO;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,MAAM,mBAAmB;AACzB;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,MAAM,mBAAmB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,cAAc;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC3UA,YAAY;;AAEZ;AACA,8CAA8C,KAAK,OAAO;AAC1D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA,iBAAiB;AACjB;AACA;AACA,GAAG;AACH;AACA,mFAAmF,OAAO;AAC1F;AACA,gDAAgD,OAAO;AACvD,GAAG;AACH;AACA;AACA,oDAAoD,OAAO;AAC3D;AACA;;AAEA;AACA,sCAAsC,OAAO;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA,mCAAmC,4BAA4B;AAC/D;AACA;;AAEA,iEAAe,QAAQ,EAAC;;;;;;;;;;;;;;;;;ACnF0B;;;;;;;;;;;;;;;;ACAlD,iEAAe,YAAY,EAAC;;;;;;;;;;;;;;;;;;;;;;;ACAS;AACQ;AACD;AACuC;AAC9C;AACF;;AAEnC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB,wBAAwB;AAC9C;;AAEA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;AACA,mBAAmB;AACnB,kBAAkB,uDAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0CAA0C,mDAAU;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,wDAAM;AACV,wC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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,YAAY;AAC7C;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,YAAY;AAC7C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACnK8C;AACyE;AACA;AACrE;;;;;;;;;;;;;;;;;;;;;;;ACHvB;;AAE3B,UAAU,mDAAG;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACVP;;AAEO;AACP;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,CAAC;;AAEM;AACP;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,CAAC;;AAEM;AACP;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,CAAC;;;;;;;;;;;;;;;;;;ACpCD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;;;ACrBO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;;;ACVO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;;;;ACV+B;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;AAEpB;AACP;AACA;;AAEO;AACP;AACA;;AAEA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,+CAAK;AACrB,cAAc,uDAAQ;AACtB,eAAe,mDAAG;;AAElB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,oBAAoB,gBAAgB;AACpC;;AAEA;AACA;AACA,OAAO;;AAEP,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC3JqC;;AAErC,6BAAe,oCAAS;AACxB,iBAAiB,wDAAQ;AACzB;AACA;AACA;;AAEA,mCAAmC,wDAAQ;;AAE3C;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wEAAwE,wDAAQ;AAChF;;AAEA;AACA,iEAAiE,wDAAQ;AACzE;;AAEA;AACA;;;;;;;;;;;;;;;;;ACxCqC;;AAErC,6BAAe,oCAAS;AACxB,iBAAiB,wDAAQ;AACzB;AACA;AACA;;AAEA,mCAAmC,wDAAQ;;AAE3C;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wEAAwE,wDAAQ;AAChF;;AAEA;AACA,iEAAiE,wDAAQ;AACzE;;AAEA;AACA;;;;;;;;;;;;;;;;;;;ACxCuC;;AAEvC;AACO;AACA;;AAEP;AACA;AACA;AACA;AACA,CAAC;;AAEc;AACf,WAAW,sDAAY;AACvB;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACjBsD;;AAEtD,6BAAe,oCAAS;AACxB,aAAa,qEAAkB;AAC/B;;;;;;;;;;;;;;;;;ACJA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO;AACP,gGAAgG;AAChG;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACnBA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;ACjBA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;;;;ACNsD;;AAE/C;;AAEP,6BAAe,oCAAS;AACxB,UAAU,qEAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,qEAAkB,gCAAgC;AAC9F;;;;;;;;;;;;;;;;;ACfsD;;AAEtD,6BAAe,oCAAS;AACxB,UAAU,qEAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACVA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA,uDAAuD;;AAEhD;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC9CA;AACA,6BAAe,oCAAS;AACxB,kDAAkD,OAAO;AACzD;AACA,6BAA6B;AAC7B,sCAAsC,QAAQ;AAC9C,sCAAsC,oBAAoB;AAC1D;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACV+C;AACM;AACN;;AAE/C,iEAAe;AACf;AACA;AACA;AACA,OAAO,yDAAa;AACpB;AACA;AACA;AACA;AACA,iBAAiB,6DAAa;AAC9B,OAAO,yDAAa;AACpB,OAAO,4DAAgB;AACvB;AACA;AACA,CAAC,EAAC;;;;;;;;;;;;;;;;AClBF,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACFwF;AACpC;AAC6B;AACnB;AACE;AACF;;;;;;;;;;;;;;;;;;;;;;;;ACLzB;AACM;AACM;AACE;AACV;AACE;AACU;AAChB;;AAErC;AACA;;AAEA,6BAAe,oCAAS;AACxB,gFAAgF,oDAAQ,GAAG,2DAAW;AACtG;AACA;AACA;AACA,iDAAiD,oDAAQ,GAAG,8DAAc;AAC1E;AACA;AACA;;AAEA;AACA,gBAAgB,+DAAe;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,cAAc,uDAAW;;AAEzB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,uDAAW;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,0BAA0B,0DAAU;;AAEpC;AACA;;AAEA;AACA;AACA,mDAAmD,gEAAc;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA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AAe,oCAAS;AACxB,gBAAgB,2CAAK;AACrB,EAAE,sDAAM;AACR;AACA;;;;;;;;;;;;;;;;;;;;;AC3E+B;AACmB;AAC6C;AACtC;AACxB;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2CAAK;AACxB,IAAI,gDAAU;AACd,GAAG;AACH;AACA,IAAI,gDAAU;AACd;AACA;AACA;AACA,QAAQ,iDAAW;AACnB,wBAAwB,6CAAO;AAC/B,yBAAyB,6CAAO;AAChC;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,wDAAS,WAAW,6CAAO,QAAQ,6CAAO;AACpD;AACA,iBAAiB,6DAAc;AAC/B;AACA,qBAAqB,6DAAc;AACnC,IAAI,wEAAyB;AAC7B,iBAAiB,wDAAS;AAC1B;AACA;AACA,kCAAkC,6CAAO;AACzC;AACA,uBAAuB,6CAAG;AAC1B;AACA,6BAA6B,6CAAO;AACpC;AACA,MAAM;AACN,8BAA8B,6CAAO;AACrC;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,6CAAG;AACpB,IAAI;AACJ;AACA;AACA,EAAE,gDAAU;AACZ;AACA;;AAEA;AACA,EAAE,gDAAU;AACZ;;AAEA;AACA;AACA,EAAE,gDAAU;AACZ,MAAM,6CAAG,aAAa,6CAAO;AAC7B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA;AACA,EAAE,sDAAM;;AAER;AACA;AACA;;AAEA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA,4EAA4E,QAAQ;AACpF;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AClLsD;;AAE/C;AACP,UAAU,+CAAK,8BAA8B,8CAAI;AACjD;;AAEO;AACP,0DAA0D,6CAAG;AAC7D,mBAAmB,6CAAG,mBAAmB,6CAAG,UAAU,6CAAG;AACzD;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEA;AACO;AACP;AACA;;AAEO;AACP;AACA;;AAEA;AACO;AACP,UAAU,8CAAI;AACd;AACA;;;;;;;;;;;;;;;;;;;;AChC+B;AACmE;AACrE;AACI;;AAEjC;AACA;AACA;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA,UAAU,gDAAI;AACd;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,6CAAO,SAAS,6CAAO;AACnC,eAAe,6CAAG;AAClB,kCAAkC,6CAAG,mBAAmB,6CAAG,UAAU,6CAAG;AACxE;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,YAAY,6CAAO,SAAS,6CAAO;AACnC,eAAe,6CAAG;AAClB,gBAAgB,6CAAG;AACnB,gBAAgB,6CAAG;AACnB,OAAO,6CAAG;AACV;AACA;AACA;;AAEA;AACA,YAAY,6CAAO,SAAS,6CAAO;AACnC,eAAe,6CAAG;AAClB,mBAAmB,6CAAG;AACtB,mBAAmB,6CAAG;AACtB,UAAU,6CAAG;AACb,UAAU,+CAAK,CAAC,8CAAI;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,6CAAO,SAAS,6CAAO;AACnC;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E;AACnB;AACA,kBAAkB,wCAAE;AACpB,kBAAkB,wCAAE;AACpB,kBAAkB,wCAAE;AACpB,IAAI,SAAS,6CAAG,oBAAoB,6CAAO;AAC3C,mCAAmC,wCAAE,IAAI,wCAAE;AAC3C;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;;;AC3F8B;;AAE9B,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,aAAa,gDAAI;AACjB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACvBwH;AAC9E;AACsB;AACtB;AACZ;;AAE9B,6BAAe,oCAAS;AACxB,WAAW,6CAAG;AACd,kBAAkB,6CAAO;AACzB;AACA,sBAAsB,6CAAG,OAAO,6CAAO,EAAE;;AAEzC;AACA,IAAI,wDAAY;AAChB;;AAEA;AACA,WAAW,6CAAG,WAAW,6CAAG;AAC5B;;AAEA;AACA,mEAAmE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,wCAAE,IAAI,wCAAE;AACxD;AACA;AACA;AACA,yBAAyB,0DAAU,oBAAoB,0DAAU;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0DAAU;AACxC;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,wDAAS;AACtB,aAAa,wDAAS;;AAEtB;AACA;AACA;AACA,aAAa,6DAAc;AAC3B,eAAe,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,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,oCAAoC,4CAAM,GAAG,6CAAO,GAAG,4CAAM;AAC7D,oCAAoC,4CAAM,GAAG,6CAAO,GAAG,4CAAM;AAC7D;;;;;;;;;;;;;;;;AClIA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AC1DwC;AACH;AACJ;AACI;AACN;;AAE/B;;AAEA;AACA;;AAEe;;AAEf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA,WAAW,6CAAG,cAAc,6CAAO;AACnC,UAAU,6CAAG,cAAc,6CAAO;AAClC,UAAU,6CAAG,cAAc,6CAAO;AAClC,iCAAiC;AACjC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB,sDAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,0CAA0C,OAAO;AACjD,mHAAmH,OAAO;AAC1H;AACA,0BAA0B;AAC1B,iBAAiB;AACjB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,oDAAK;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,sDAAU;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,cAAc,oDAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;ACvK0C;AACP;;AAEnC;AACA;AACA;AACA,kBAAkB;AAClB,kBAAkB;AAClB,kBAAkB;AAClB,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,QAAQ,0DAAU;AAClB;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA,mBAAmB,6CAAO;AAC1B;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;;AAEA,+BAA+B,OAAO;AACtC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD,UAAU;AACV;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,sCAAsC,QAAQ;AAC9C,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACtGA,6BAAe,oCAAS;;AAExB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACXA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACJgE;AACd;AACN;;AAE5C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS,wDAAQ;AACjB;;AAEA;AACA;AACA,0CAA0C,OAAO;AACjD,SAAS,wDAAQ;AACjB;AACA;AACA,WAAW,wDAAQ;AACnB;AACA;AACA;AACA;AACA,6DAA6D,8CAAQ;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,+DAAe;AAC1B;;AAEA;AACA;AACA;;AAEA;AACA,qBAAqB,6CAAO,aAAa,6CAAO;AAChD;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AChGiC;;AAEjC;AACA,cAAc;;AAEd,6BAAe,oCAAS;AACxB;AACA;AACA,SAAS,sDAAM;AACf;;;;;;;;;;;;;;;;;;;ACT+B;AACc;;AAE7C;AACA,UAAU,oDAAK,UAAU,6CAAO;AAChC,uBAAuB,2BAA2B,gBAAgB;AAClE;;AAEA;AACA,UAAU,oDAAK,UAAU,6CAAO;AAChC,uBAAuB,2BAA2B,gBAAgB;AAClE;;AAEe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA,WAAW,oDAA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;AACA;AACD;;AAE9B,kBAAkB,2CAAK;AACvB,sBAAsB,2CAAK;AAC3B;AACA;AACA;AACA;;AAEA;AACA,SAAS,gDAAI;AACb,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf;AACA;AACA;AACA,GAAG;AACH;AACA,mEAAmE,gDAAI;AACvE,gBAAgB,6CAAG;AACnB,sBAAsB,2CAAK;AAC3B,GAAG;AACH;AACA;AACA,kBAAkB,2CAAK;AACvB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iEAAe,UAAU,EAAC;;;;;;;;;;;;;;;;;ACjDI;;AAE9B;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf,gBAAgB,gDAAI;AACpB,cAAc,gDAAI;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,YAAY,EAAC;;;;;;;;;;;;;;;;;AC3BI;;AAEhC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,8CAAI;AACxC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU,8CAAI;;AAEd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,cAAc,EAAC;;;;;;;;;;;;;;;;;;ACnGC;AACD;;AAEf;AACf;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,yCAAG;AACpD;AACA;AACA;AACA,GAAG;AACH,UAAU,gDAAI;AACd;;;;;;;;;;;;;;;;;;;;;;;;AC5CsC;AACJ;AACD;AACI;AACI;AACF;AACA;AACF;;AAErC,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,sDAAM;AACZ;AACA;AACA;;AAEA;AACA,IAAI,sDAAM,0BAA0B,gDAAQ;AAC5C,WAAW,gDAAQ;AACnB;;AAEA;AACA,IAAI,sDAAM,0BAA0B,mDAAW;AAC/C,WAAW,mDAAW;AACtB;;AAEA;AACA,IAAI,sDAAM,0BAA0B,kDAAU;AAC9C,WAAW,kDAAU;AACrB;;AAEA;AACA,IAAI,sDAAM,0BAA0B,oDAAY;AAChD,WAAW,oDAAY;AACvB;;AAEA;AACA;AACA,uDAAuD,oDAAQ;AAC/D;AACA;;AAEA;AACA;AACA,qDAAqD,kDAAU,gBAAgB,mDAAW;AAC1F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6DAA6D,EAAE;AAC/D;AACA;AACA,8CAA8C,kDAAU;AACxD;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;AC3E+B;AACC;AACF;;AAE9B,oBAAoB,2CAAK;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS,gDAAI;AACb;AACA;AACA,GAAG;AACH;AACA;AACA,yBAAyB,gDAAI;AAC7B,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,oBAAoB,2CAAK;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,8CAAI;AACpB;AACA;;AAEA,i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;;;;;;;;;;;;;;;;;;;;AC9C0C;AACK;AACX;;AAE7B;AACP,WAAW,6CAAG,SAAS,6CAAG;AAC1B,eAAe,6CAAG,SAAS,6CAAG;AAC9B;;AAEA,qBAAqB,8DAAe,CAAC,0CAAI;;AAEzC,6BAAe,sCAAW;AAC1B,SAAS,qDAAU;AACnB;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACfiD;AACX;AACM;AACqB;AACX;;AAEtD,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;AACA,kBAAkB,0DAAW;AAC7B;AACA;AACA;AACA;AACA,OAAO;AACP,iBAAiB,oDAAQ;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,oDAAQ,IAAI,8DAAa;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6CAAO,OAAO,6CAAG,cAAc,6CAAG,4BAA4B,6CAAO;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kDAAS;AACpB;AACA;AACA,WAAW,gDAAO;AAClB;AACA;AACA,WAAW,iDAAQ;AACnB;AACA;AACA,WAAW,kDAAS;AACpB;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpFuD;AACZ;AACM;AACb;AACE;AACsB;AACf;AACD;AACqB;AAC5B;;AAErC,uBAAuB,0DAAW;AAClC;AACA,0BAA0B,6CAAO,MAAM,6CAAO;AAC9C;AACA,CAAC;;AAED;AACA,SAAS,0DAAW;AACpB;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,6CAAG;AACpB,iBAAiB,6CAAG;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;A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;AACA;AACA;;;;;;;;;;;;;;;;;ACPA,6BAAe,oCAAS;AACxB;AACA;AACA,qBAAqB;AACrB;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACnBA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACnFO;AACP;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACRA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;;;;;;;;;;;;;;;;ACXA,6BAAe,sCAAW;AAC1B;AACA;;;;;;;;;;;;;;;;ACFA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACNA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACdA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACXA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPoC;AACF;AACY;AACF;AACV;AACF;AACE;AACA;AACU;AACI;AACV;AACF;AACM;;AAE3B;AACf;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,iDAAU;AACnB,QAAQ,gDAAS;AACjB,aAAa,qDAAc;AAC3B,cAAc,sDAAe;AAC7B,QAAQ,gDAAS;AACjB,OAAO,+CAAQ;AACf,QAAQ,gDAAS;AACjB,QAAQ,gDAAS;AACjB,aAAa,qDAAc;AAC3B,eAAe,uDAAgB;AAC/B,UAAU,mDAAW;AACrB,SAAS,kDAAU;AACnB;AACA,qBAAqB,qDAAa;AAClC;;;;;;;;;;;;;;;;AC1FA,6BAAe,uCAAY;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA,IAAI;AACJ;;;;;;;;;;;;;;;;ACbA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;;;;ACRA,6BAAe,sCAAW;AAC1B;AACA;AACA,yBAAyB;AACzB,kBAAkB,kCAAkC;AACpD;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;;;;ACRA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC7BA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;ACNA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACRgD;AACgB;AAChB;AACW;AACF;AACL;AACF;AACR;AACY;AACO;AACJ;AACE;AACQ;AACF;AACI;;;;;;;;;;;;;;;;ACdrE;AACA;AACA;AACA,sBAAsB;;AAEtB,6BAAe,sCAAW;AAC1B;AACA;AACA;;;;;;;;;;;;;;;;;;;ACRoC;AACR;;AAE5B,6BAAe,oCAAS;AACxB,oCAAoC,mDAAG;AACvC;;AAEO;AACP,4BAA4B,kDAAO;;AAEnC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,kBAAkB;AAChC,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,cAAc;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AC1HyC;AACa;AAC1B;AACqB;;AAEjD;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA,gBAAgB,sDAAY;;AAE5B;AACA,mBAAmB,mDAAG;AACtB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,wCAAwC,sDAAY;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA,wCAAwC,uDAAQ;AAChD;;AAEA;AACA;AACA;;AAEA;AACA,uEAAuE,wDAAQ;AAC/E;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yBAAyB,OAAO;AAChC,UAAU,gEAAkB;AAC5B,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AChFgC;AACJ;AACmB;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEO;AACP,uBAAuB,qDAAK;;AAE5B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,OAAO;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;;AAEN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,wCAAwC,IAAI,8DAAiB;;AAEjF;AACA,cAAc,OAAO;;AAErB;AACA;;AAEA,6BAAe,oCAAS;AACxB,8BAA8B,mDAAG;AACjC;AACA;;;;;;;;;;;;;;;;;;ACvH2C;AACC;;AAE5C,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,yDAAS;AACxC;AACA;;AAEA;AACA;AACA;AACA,QAAQ,4DAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACnDwC;AACiB;;AAEzD,eAAe,UAAU;AACzB,kBAAkB;AAClB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC,0CAA0C,qDAAI;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,oCAAoC,MAAM,aAAa,8DAAa;AACzG;AACA;;AAEA;AACA;;AAEA;AACA,oCAAoC,uDAAQ;AAC5C;;AAEA;AACA,0CAA0C,uDAAQ;AAClD;;AAEA;AACA,sCAAsC,uDAAQ;AAC9C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,KAAK;AACjB;AACA;AACA,sCAAsC,KAAK;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AChJ0C;;AAE1C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,iBAAiB;AACjB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,iBAAiB;AACjB,cAAc;AACd;;AAEA,mCAAmC,qDAAI;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;AC5OA,6BAAe,oCAAS;AACxB;AACA;AACA;;AAEA,8BAA8B,OAAO;AACrC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC7CA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACXmC;AACE;AACI;AACa;;AAEtD,6BAAe,sCAAW;AAC1B,aAAa,oDAAQ;AACrB;AACA;AACA;AACA;AACA,qBAAqB,sDAAY;AACjC,mBAAmB,sDAAY;AAC/B,qBAAqB,sDAAY;AACjC,sBAAsB,sDAAY;AAClC,oBAAoB,sDAAY;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iDAAS;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sCAAsC,uDAAQ;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA,4EAA4E,wDAAQ;AACpF;;AAEA;AACA;AACA;;AAEA;AACA,0EAA0E,wDAAQ;AAClF;;AAEA;AACA,4EAA4E,wDAAQ;AACpF;;AAEA;AACA,6EAA6E,wDAAQ;AACrF;;AAEA;AACA,2EAA2E,wDAAQ;AACnF;;AAEA;AACA;;;;;;;;;;;;;;;;;;;AC7FoC;AACE;AACW;;AAEjD,iEAAe;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kDAAkD,OAAO;AACzD,sBAAsB,oDAAW;AACjC,aAAa,qDAAY;AACzB;AACA;AACA,MAAM;AACN,gCAAgC,2DAAa;AAC7C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,EAAE,6CAAG,CAAC,EAAC;;;;;;;;;;;;;;;;ACnCR,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;ACtDjD,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACJiC;;AAEjC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd;AACA;;AAEA;AACA;AACA;AACA,gCAAgC;AAChC;AACA,4BAA4B;AAC5B;AACA;AACA,yCAAyC;AACzC,4BAA4B;AAC5B;AACA,MAAM,OAAO;AACb;AACA,cAAc,SAAS,sDAAM,SAAS;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,OAAO;AACpC;AACA,SAAS;AACT;;;;;;;;;;;;;;;;;AC/DA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACzBkC;AACY;;AAE9C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,aAAa,sDAAM,SAAS,GAAG,aAAa,sDAAM,SAAS;AACzE,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,gCAAgC;AACjE,cAAc,sDAAsD,sDAAM,OAAO;AACjF,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,cAAc,qDAAqD,sDAAM,OAAO;AAChF,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,aAAa,sDAAM,SAAS,GAAG,aAAa,sDAAM,SAAS;AACzE,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,mDAAmD,+CAAQ;AAC3D,mDAAmD,+CAAQ;;;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B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACdA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACnBA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;ACN+B;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,OAAO;AACrB,uBAAuB,qDAAK;AAC5B;AACA;;AAEA,iCAAiC;AACjC;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA;AACA;AACA;;AAEA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;;AAErB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAoC,QAAQ;AAC5C,sBAAsB,qCAAqC;;AAE3D;AACA;;;;;;;;;;;;;;;;;;;;;;;;;AChDiD;AACQ;AACR;AACQ;AACJ;;;;;;;;;;;;;;;;ACJrD,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACtBA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA,yCAAyC;;AAEzC;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,oDAAoD;AACpD,qDAAqD;AACrD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oDAAoD;AACpD,qDAAqD;AACrD,IAAI;AACJ;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACnFA,6BAAe,oCAAS;AACxB,mDAAmD;;AAEnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C,0CAA0C;AAC1C,0CAA0C;AAC1C,0CAA0C;AAC1C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC1CA,6BAAe,sCAAW;AAC1B;AACA;AACA,+CAA+C;AAC/C,GAAG;AACH;AACA;;;;;;;;;;;;;;;;ACNA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACJ6B;;AAE7B,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,gDAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,YAAY,gDAAI;AAChB,YAAY,gDAAI;AAChB,YAAY,gDAAI;AAChB,YAAY,gDAAI;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACrEkD;;;;;;;;;;;;;;;;ACAlD,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACNyD;AACrB;AACF;AACI;AACJ;AACmC;A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;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,YAAY,oDAAM;AAClB;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA,oBAAoB,sDAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wFAAwF,sDAAiB;AACzG;;AAEA;AACA,sDAAsD,kDAAM;AAC5D;;AAEA;AACA;AACA;;AAEA;AACA,gDAAgD,sDAAgB;AAChE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEe;AACf;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5HwE;AAC/B;AACE;AACL;AACL;AACI;AACC;AACN;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oDAAQ;AAC7B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kEAAkE,0DAAS;AAC3E;AACA;;AAEA,sBAAsB,sDAAW;;AAEjC,2BAA2B,sDAAgB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEe;AACf,cAAc,qDAAS,eAAe,oDAAQ;;AAE9C;AACA,WAAW,oDAAI;AACf;;AAEA,SAAS,sDAAgB;AACzB;;AAEO;AACP,cAAc,gDAAO;;AAErB;AACA,WAAW,oDAAI;AACf;;AAEA,SAAS,sDAAgB;AACzB;;AAEO;AACP,cAAc,qDAAS;;AAEvB;AACA,WAAW,oDAAI;AACf;;AAEA,SAAS,sDAAgB;AACzB;;AAEO;AACP,cAAc,+CAAM;;AAEpB;AACA,WAAW,oDAAI;AACf;;AAEA,SAAS,sDAAgB;AACzB;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;;;ACvGsC;AACL;;AAElB;AACf;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,sDAAsD,kDAAM;AAC5D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iDAAiD,kDAAM;;AAEvD,SAAS,qDAAS;AAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxBmB;;AAII;;AAIF;;AAIH;;AAIG;;AAKC;;AAKJ;;AAIG;;AAIE;;AAIA;;AAIC;;AAIL;;AAIG;;AAQG;;AAIQ;;AAQT;;AAIC;;;;;;;;;;;;;;;;;AC7ElB;AACP;AACA;AACA,gCAAgC;AAChC,+CAA+C;AAC/C;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACzB8C;AACG;AACb;AACK;;AAElC;AACP;;AAEA;AACA;AACA,WAAW,oDAAK;AAChB;;AAEA;AACA;AACA,WAAW,0DAAU;AACrB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uDAAa;AAC1B;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEe;AACf,cAAc,0DAAU;;AAExB;AACA,WAAW,oDAAI;AACf;;AAEA,EAAE,+CAAS;;AAEX;AACA;;;;;;;;;;;;;;;;;;;;;;;ACrE+B;AACmB;AACrB;AACqB;AACd;;AAEpC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,QAAQ;AAChC,oBAAoB,UAAU;AAC9B;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY,QAAQ;AAC5B,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oDAAK;AACrC,MAAM;AACN,UAAU,oDAAK;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sCAAsC,qDAAe;AACrD,kBAAkB,iDAAM;AACxB;AACA;AACA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,oDAAI;AACtB;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEe;AACf,wBAAwB,2DAAW;AACnC,qBAAqB,oDAAI;AACzB,EAAE,+CAAS;AACX;AACA;;;;;;;;;;;;;;;;AC3Ie;AACf;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACjBe;AACf;AACA;;;;;;;;;;;;;;;;;;;ACFmC;AACC;;AAE7B;;AAEQ;AACf,kBAAkB,+CAAS;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B,+CAAS;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,EAAE,+CAAS;;AAEX;AACA;;;;;;;;;;;;;;;;;;;;;AC7CsC;AACsB;AACxB;;AAEpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEO;AACP,wBAAwB,oDAAQ,EAAE,oDAAQ;AAC1C;;AAEA;AACA,sCAAsC,oDAAQ,EAAE,oDAAQ;AACxD;AACA;AACA;;AAEA;AACA;AACA;;AAEA,SAAS,qDAAS;AAClB;;AAEe;AACf,qBAAqB,2DAAW;;AAEhC;AACA,WAAW,oDAAI;AACf;;AAEA,EAAE,+CAAS;;AAEX;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;;;;;ACjDwE;AACpC;;AAErB;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wCAAwC,wDAAS;AACjD;AACA;;AAEA;AACA,wDAAwD,oDAAM;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB,gDAAS;AACzB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,+CAAS;AAClB;;;;;;;;;;;;;;;;;;;ACxDgC;AACM;AACF;;AAErB;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uCAAuC,oDAAM;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,+CAAS,OAAO,qDAAS;AAClC;;;;;;;;;;;;;;;;;;;;ACvDyC;AACL;AACE;AACL;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;;AAEe;AACf,gBAAgB,0DAAU;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oEAAoE,kDAAM;AAC1E;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAE,+CAAS;;AAEX,SAAS,qDAAS;AAClB;;;;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E3C,6BAAe,oCAAS;AACxB,uBAAuB;AACvB,aAAa,2DAAW;AACxB;AACA;AACA;AACA,qCAAqC,uDAAO;AAC5C;;;;;;;;;;;;;;;;;ACVqD;;AAErD,6BAAe,oCAAS;AACxB;AACA,YAAY,0DAAS;AACrB,YAAY,0DAAS,eAAe,qDAAI;AACxC;;;;;;;;;;;;;;;;;;ACN+B;AACsB;;AAErD,6BAAe,oCAAS;AACxB;AACA,YAAY,0DAAS;AACrB,YAAY,0DAAS,EAAE,qDAAK,aAAa,qDAAI;AAC7C;;;;;;;;;;;;;;;;;ACPoC;;AAEpC,6BAAe,oCAAS;AACxB,mDAAmD,uDAAO;AAC1D;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;ACPwC;;AAExC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB,iBAAiB,yDAAS;;AAE1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACxDA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACLA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC1EA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;;;ACZqC;AACA;AACC;;AAEtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB;AACA;AACA;AACA,MAAM;AACN,qBAAqB,gDAAS;AAC9B;AACA;;AAEA;AACA,SAAS,iBAAiB;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,qBAAqB,gDAAS;AAC9B;AACA;;AAEA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA;AACA;;AAEA,2CAA2C,wDAAQ;;AAEnD,uGAAuG,OAAO;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,6CAA6C,iBAAiB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,gDAAS;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,wBAAwB;AACxB;;;;;;;;;;;;;;;;AC/HA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACJuC;;AAEvC;AACA,eAAe,sDAAW;AAC1B;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACjCA,6BAAe,oCAAS;;AAExB,4DAA4D,OAAO;AACnE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;AACnE,yDAAyD,OAAO;AAChE;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACVA,6BAAe,sCAAW;AAC1B;AACA;;;;;;;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY;AACZ,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,8CAA8C,OAAO;AACrD;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA;AACA,8CAA8C,OAAO;AACrD,6BAA6B,OAAO;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;;;;;;;;;;;;;;;;AClEA,6BAAe,sCAAW;;AAE1B,6DAA6D,QAAQ;AACrE,6EAA6E,SAAS;AACtF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC3BA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;;;;;;;;;;;;;;;;;;ACPqC;AACC;;AAEtC,6BAAe,oCAAS;AACxB,6CAA6C,wDAAQ;;AAErD,sFAAsF,OAAO;AAC7F,gHAAgH,OAAO;AACvH;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,gDAAS;AACtB;;;;;;;;;;;;;;;;;;;AChBqC;AACL;AACY;;AAE5C;AACA;AACA,WAAW,qDAAK;AAChB;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;;;;;;;;;;;;;;ACRA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACJA,6BAAe,oCAAS;AACxB;AACA;AACA,2BAA2B;AAC3B;;;;;;;;;;;;;;;;;;;ACJqC;AACgE;AAClE;;AAEnC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;;AAEA;AACA;AACA;AACA;AACA,cAAc,6CAAO;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6BAA6B,8CAAI;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,8CAAI,CAAC,6CAAG;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA,qBAAqB,wDAAQ;AAC7B;AACA;AACA;AACA;AACA;AACA,aAAa,kDAAQ;;AAErB;AACA;AACA;AACA;AACA;AACA,iDAAiD,4CAAM;AACvD,+CAA+C,4CAAM;AACrD,aAAa,6CAAG;AAChB;;AAEA;;AAEA;AACA;;AAEA;AACA,eAAe,6CAAO;;AAEtB;AACA,kBAAkB,yCAAG,GAAG,6CAAO;AAC/B,0BAA0B,6CAAG,WAAW,6CAAG;AAC3C;AACA,eAAe,6CAAO;AACtB,4BAA4B,6CAAG,WAAW,6CAAG;AAC7C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6CAAO,sDAAsD,8CAAI;AACtF,eAAe,6CAAG,CAAC,6CAAG;AACtB;AACA;AACA;AACA;;AAEA;AACA,eAAe,6CAAO;AACtB,iBAAiB,8CAAI,WAAW,6CAAG;AACnC,iBAAiB,8CAAI,WAAW,6CAAG;AACnC,8BAA8B,6CAAO;AACrC;AACA,8BAA8B,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C,OAAO,0DAAU,SAAS;AAC1D,mCAAmC,OAAO,0DAAU,SAAS;AAC7D,mCAAmC,OAAO,0DAAU,SAAS;;AAE7D;AACA,gCAAgC,4DAAW;AAC3C;;AAEA;AACA;;;;;;;;;;;;;;;;;AC5BO;;AAEP,6BAAe,oCAAS;AACxB;AACA;AACA,qBAAqB;AACrB;;;;;;;;;;;;;;;;ACNA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACJO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,+CAA+C;AAC/C,wDAAwD;AACxD;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B,sEAAsE;AACrG,+BAA+B;AAC/B,+BAA+B,oFAAoF;AACnH,kCAAkC;AAClC;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;;AClD8B;AACG;;AAEjC;AACA;AACA;;AAEA;AACA,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D,+BAA+B,4BAA4B;AAC3D,+BAA+B,4BAA4B,4FAA4F;AACvJ,eAAe,gDAAK,cAAc;AAClC;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;ACnDiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B,oFAAoF,0EAA0E;AAC7L,+BAA+B;AAC/B,eAAe,gDAAK,cAAc;AAClC;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;;;ACtC4C;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,iBAAiB,2DAAW;AAC5B,iBAAiB,2DAAW;AAC5B,iBAAiB,2DAAW;AAC5B,iBAAiB,2DAAW;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;;AC1EiC;;AAEjC;AACA,oBAAoB,4CAAK;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA,iEAAe;;AAEf;AACA,4BAA4B,4CAAK;AACjC;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,OAAO,EAAC;;;;;;;;;;;;;;;;;;ACvDF;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,wDAAwD;AACxD,+CAA+C;AAC/C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B,sEAAsE;AACrG,+BAA+B,4BAA4B;AAC3D,+BAA+B;AAC/B,kCAAkC;AAClC;AACA;AACA;AACA;AACA;;AAEA,iEAAe;;AAEf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,IAAI,EAAC;;;;;;;;;;;;;;;;;;;AC5DwB;AACM;;AAE7B;AACP;AACA;AACA;;AAEA;AACA,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D,+BAA+B,kDAAkD;AACjF,+BAA+B,4BAA4B;AAC3D,eAAe,mDAAK,cAAc;AAClC;AACA;AACA;AACA;AACA;;AAEA,iEAAe;;AAEf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,IAAI,EAAC;;;;;;;;;;;;;;;;;;AC5D8B;;AAE7B;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B,kGAAkG;AACjI,+BAA+B;AAC/B,eAAe,mDAAK,cAAc;AAClC;AACA;AACA;AACA;AACA;;AAEA,iEAAe;;AAEf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,IAAI,EAAC;;;;;;;;;;;;;;;;;;;AChD6B;AACI;;AAEhC;AACP;AACA;AACA;AACA;;AAEA,oBAAoB,6CAAO;AAC3B;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,6CAAO;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,wDAAwD;AACxD,8CAA8C;AAC9C;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,sEAAsE;AACrG,+BAA+B;AAC/B,+BAA+B;AAC/B,kCAAkC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe;;AAEf;AACA,wDAAwD,kDAAQ;AAChE;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,MAAM,EAAC;;;;;;;;;;;;;;;;;;;ACvF2C;AACrB;AACQ;;AAEtC;AACA;AACA;AACA;;AAEA;AACA,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,4BAA4B;AAC3D,+BAA+B,kDAAkD;AACjF,+BAA+B,4BAA4B;AAC3D,eAAe,qDAAK,cAAc;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe;;AAEf;AACA,8DAA8D,8DAAc;AAC5E;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,MAAM,EAAC;;;;;;;;;;;;;;;;;;ACzEuC;AACT;;AAEtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,+BAA+B,kGAAkG;AACjI,+BAA+B;AAC/B,eAAe,qDAAK,cAAc;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe;;AAEf;AACA,4DAA4D,0DAAY;AACxE;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,MAAM,EAAC;;;;;;;;;;;;;;;;AC7DR;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B,sEAAsE;AACrG,+BAA+B;AAC/B,2CAA2C;AAC3C;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;AC9B8B;;AAE9B;AACA;AACA;;AAEA;AACA,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;ACxBA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,wDAAwD;AACxD,6DAA6D;AAC7D;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,kDAAkD;AAClD;AACA,+BAA+B,sEAAsE;AACrG,+BAA+B;AAC/B,+BAA+B,wDAAwD;AACvF,+DAA+D;AAC/D;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,2BAA2B,6BAA6B;AACxD,0BAA0B,4BAA4B;AACtD,2BAA2B,6BAA6B;AACxD,kDAAkD;AAClD;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;ACvGA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,WAAW;AACzB;AACA,cAAc,OAAO;AACrB;AACA,kBAAkB,QAAQ;AAC1B;AACA,cAAc,WAAW;AACzB;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;;AChEsC;;AAE/B,oCAAoC,kDAAW;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEe;;AAEf;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,+BAA+B,sEAAsE;AACrG,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;ACpDA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;ACFA,6BAAe,oCAAS;AACxB;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACFwC;AACE;AACA;AACF;AACqC,CAAC;AACD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AACA;;AAE5C;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,2DAAQ,CAAC,uDAAY;;AAE3B,iEAAe,QAAQ,EAAC;;;;;;;;;;;;;;;;;;;ACDP;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;AACV;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8CAAS,cAAc,kDAAS;AACxE,iBAAiB,2CAAM;AACvB;AACA;AACA;AACA,UAAU;AACV;AACA,wCAAwC,+CAAU,cAAc,mDAAU;AAC1E,iBAAiB,4CAAO;AACxB;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;;AAEA,YAAY,4BAA4B;AACxC;AACA;AACA,kCAAkC;;AAElC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;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AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,CAAC;;AAED;AACA;AACA,2DAA2D,0DAAY;AACvE;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEO;;AAEA,gBAAgB,0DAAY;AACnC;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,CAAC;;AAED;AACA;AACA,2DAA2D,0DAAY;AACvE;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEO;;;;;;;;;;;;;;;;;;;;;;;AC5Ca;;AAIE;;AAIC;;;;;;;;;;;;;;;;;ACZe;;AAEtC,6BAAe,oCAAS;AACxB,cAAc,4CAAK;AACnB;AACA;AACA;AACA,0CAA0C,8CAAG;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AChBiC;;AAEjC,6BAAe,oCAAS;AACxB,cAAc,4CAAK;AACnB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sIAAsI;;AAE/H;AACP;AACA;;AAEA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;;AAEO;AACP,SAAS;AACT,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;;;;;;;;;;;;;;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A;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB,iBAAiB,wDAAS,uCAAuC,mEAAoB,GAAG,uDAAW;AACnG;AACA,sEAAsE,qDAAU;AAChF;AACA;AACA;;;;;;;;;;;;;;;;;AC7EuC;;AAEvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA,iBAAiB,wDAAS;AAC1B;AACA;;;;;;;;;;;;;;;;;AC3CwC;;AAExC;AACA;AACA,IAAI,kDAAI;AACR;AACA;;AAEA;AACA;AACA,IAAI,kDAAI;AACR;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA;AACA;AACA;AACA,QAAQ,iDAAG;AACX;;;;;;;;;;;;;;;;;ACtBuC;;AAEvC;AACA;AACA,IAAI,iDAAG;AACP;AACA;;AAEA;AACA;AACA,IAAI,iDAAG;AACP;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA;AACA;AACA;AACA,QAAQ,iDAAG;AACX;;;;;;;;;;;;;;;;;ACtBuC;;AAEvC;AACA;AACA;AACA,IAAI,iDAAG;AACP;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA;AACA,QAAQ,iDAAG;AACX;;;;;;;;;;;;;;;;;ACfkC;;AAElC;AACA;AACA;AACA;AACA,IAAI,iDAAG;AACP;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;;;;;;;;;;;;;;;;;ACbkC;;AAElC,6BAAe,sCAAW;AAC1B;AACA;AACA,kBAAkB,cAAc;AAChC,eAAe,oBAAoB;;AAEnC;AACA,qBAAqB,iDAAG;AACxB;;AAEA;AACA;AACA;AACA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AgK,OAAO;AACvK,yHAAyH,OAAO;AAChI;AACA;AACA;AACA;AACA;;AAEA,SAAS,QAAQ;AACjB;AACA;;AAEA,aAAa,iDAAU;AACvB;;;;;;;;;;;;;;;;;AClB6C;;AAE7C;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA,oCAAoC,8CAAI,GAAG,6CAAG;AAC9C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;AACA,QAAQ,iDAAG;AACX;AACA;;;;;;;;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVqC;AACG;;AAExC,cAAc,uDAAQ;AACtB;;AAEO;AACA;AACA;AACA;AACA;AACA;AACA;;AAEP,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEO;AACP;AACA,2DAA2D;AAC3D;AACA;;AAEO;AACP;AACA,2DAA2D;AAC3D;AACA;;AAEO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,+CAAK;;AAEpB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;AAC5C,sCAAsC,oDAAO;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yDAAyD;AACzD;AACA,2DAA2D;AAC3D;AACA,IAAI,oDAAO;AACX;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,yCAAyC;AACzC;;AAEA;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAE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;AACA;AACA;;;;;;;;;;;;;;;;AC/EA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACvBsC;;AAEtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA,qBAAqB,qDAAU;AAC/B;AACA;;;;;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACvB6C;AACD;;AAE5C,6BAAe,sCAAW;AAC1B;AACA;AACA,YAAY,gDAAK;;AAEjB,4DAA4D,OAAO;AACnE,+DAA+D,OAAO;AACtE;AACA,sBAAsB,iDAAG;AACzB,QAAQ,wDAAQ;AAChB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA,aAAa,iDAAU;AACvB;;;;;;;;;;;;;;;;;;ACvBuC;;AAEvC;AACA;AACA;AACA,mBAAmB,iDAAG;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,iDAAG;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB,4BAA4B,OAAO;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAAe,oCAAS;AACxB;;AAEA;;AAEA;AACA,gBAAgB,iDAAG;AACnB,yCAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;;AAEA;AACA,mBAAmB,iDAAG;AACtB,2CAA2C;AAC3C,GAAG;;AAEH;AACA,WAAW,iDAAG;AACd;AACA;;;;;;;;;;;;;;;;AChFA,iEAAe,YAAY,EAAC;;;;;;;;;;;;;;;;ACAb;AACf;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,WAAW,kDAAkD;AAC7D,kBAAkB,yDAAyD;AAC3E,aAAa,oDAAoD;AACjE,gBAAgB,uDAAuD;AACvE,QAAQ;AACR,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;ACb0C;AACoE;;;;;;;;;;;;;;;;;ACDvG;AACP;AACA;;AAEA,6BAAe,oCAAS;AACxB;AACA;AACA;;;;;;;;;;;;;;;;;;ACPO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEO;;AAEP;;AAEe;AACf;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AClDqC;AACW;AACD;AACF;AACL;AACH;AACF;AACgB;AACC;;AAEpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,mDAAQ;AAChC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAAe,sCAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sDAAe;AACnC,kBAAkB,uDAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oCAAoC,eAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mDAAQ;AAC/B;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,+CAA+C,oDAAS;AACxD;;AAEA;AACA;AACA,oEAAoE,oDAAS;AAC7E;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uCAAuC,gDAAgD;AACvF,oDAAoD,8CAA8C;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,mBAAmB,4BAA4B,QAAQ,oDAAS;AAChE;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,cAAc,wDAAM;AACpB;AACA;AACA;AACA,YAAY,iDAAS;AACrB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,wDAAO;;AAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM,wDAAS;AACf;AACA;;AAEA,IAAI,uDAAO;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,wDAAM;AAClB,YAAY,wDAAO;AACnB;AACA;;AAEA,IAAI,mDAAW;AACf,IAAI,0DAAa;AACjB;AACA,IAAI,wDAAS;AACb;;AAEA;AACA,MAAM,uDAAO;A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;AACA;AACA;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B,OAAO;AACnC;AACA;AACA;AACA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,2DAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wBAAwB,OAAO;AAC/B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gCAAgC,sBAAsB;AACtD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uDAAuD,oBAAoB;AAC3E;AACA;AACA;;AAEA;AACA;AACA,oCAAoC,2DAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,kCAAkC;;AAEtE;AACA;;AAEA;AACA;AACA,4BAA4B;AAC5B;;AAEA;AACA;AACA,oCAAoC,2DAAQ;AAC5C;AACA;AACA,iCAAiC;AACjC;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,2DAAQ;AAChD;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C,cAAc;AAC3D;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,eAAe,sDAAsD;;AAErE;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4BAA4B;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,sEAAsE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC;AACzC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,YAAY;AACZ;;AAEA;AACA;AACA,+BAA+B,YAAY;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB;AACpB,oBAAoB;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC/dO;AACP;AACA;AACA,mCAAmC,UAAU,iBAAiB,SAAS,YAAY;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA,mCAAmC,UAAU,iBAAiB,SAAS,YAAY;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,cAAc;AACnC;AACA;AACA;;AAEA,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;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,6CAAG;AAChB,QAAQ,6CAAG;AACX,YAAY,6CAAG;AACf,gBAAgB,+CAAK,CAAC,+CAAK;AAC3B,gBAAgB,+CAAK,CAAC,+CAAK;AAC3B,YAAY,6CAAG;AACf,gBAAgB,+CAAK,CAAC,+CAAK;AAC3B,gBAAgB,+CAAK,CAAC,+CAAK;AAC3B,QAAQ,6CAAG;AACX,YAAY,+CAAK,CAAC,+CAAK;AACvB,YAAY,+CAAK,CAAC,+CAAK;;AAEvB,cAAc,kDAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,oDAAc;AACxD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AAC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BAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6CAAG;AACxB;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+CAAK;AAC7B,oCAAoC,6CAAG;AACvC,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB,yBAAyB,+CAAK;AAC9B,oCAAoC,mDAAS;AAC7C,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB;AACA,wCAAwC,+CAAK,CAAC,+CAAK;AACnD;AACA;AACA,wCAAwC,+CAAK,CAAC,+CAAK;AACnD;AACA;AACA;AACA,wBAAwB,+CAAK;AAC7B,oCAAoC,6CAAG;AACvC,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB,yBAAyB,+CAAK;AAC9B,oCAAoC,mDAAS;AAC7C,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6CAAG;AACxB;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+CAAK;AAC7B,oCAAoC,6CAAG;AACvC,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB,yBAAyB,+CAAK;AAC9B,oCAAoC,mDAAS;AAC7C,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB;AACA,wCAAwC,+CAAK,CAAC,+CAAK;AACnD;AACA;AACA,wCAAwC,+CAAK,CAAC,+CAAK;AACnD;AACA;AACA;AACA,wBAAwB,+CAAK;AAC7B,oCAAoC,6CAAG;AACvC,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB,yBAAyB,+CAAK;AAC9B,oCAAoC,mDAAS;AAC7C,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6CAAG;AACxB;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+CAAK;AAC7B,oCAAoC,6CAAG;AACvC,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB,yBAAyB,+CAAK;AAC9B,oCAAoC,mDAAS;AAC7C,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB;AACA,wCAAwC,+CAAK,CAAC,+CAAK;AACnD;AACA;AACA,wCAAwC,+CAAK,CAAC,+CAAK;AACnD;AACA;AACA;AACA,wBAAwB,+CAAK;AAC7B,oCAAoC,6CAAG;AACvC,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;;AAErB,yBAAyB,+CAAK;AAC9B,oCAAoC,mDAAS;AAC7C,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB,gBAAgB,+CAAK;AACrB;AACA;;AAEA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;AC5vB0G;;AAE1G,iCAAiC,6CAAO,IAAI,6CAAO;AACnD,+BAA+B,6CAAO,IAAI,6CAAO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AQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,mDAAS;AAC9B;AACA;AACA,QAAQ,mDAAS;AACjB;AACA;AACA;;AAEA;AACA;;AAEA,aAAa,6CAAG;AAChB,aAAa,6CAAG;AAChB,aAAa,6CAAG;AAChB,YAAY,6CAAG;;AAEf;AACA;AACA,WAAW,mDAAS;AACpB,QAAQ,+CAAK,CAAC,+CAAK;AACnB,QAAQ,+CAAK,CAAC,+CAAK;AACnB,QAAQ,+CAAK,CAAC,+CAAK;AACnB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,6CAAG;AACtB,QAAQ,6CAAG;AACX,YAAY,gDAAM;AAClB;AACA,QAAQ,6CAAG;AACX,YAAY,gDAAM;AAClB;;AAEA,cAAc,kDAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,oDAAc;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;AC7vBgF;;AAEhF,+BAA+B,6CAAO,IAAI,6CAAO;AACjD,+BAA+B,6CAAO,IAAI,6CAAO;AACjD,+BAA+B,6CAAO,IAAI,6CAAO,GAAG,6CAAO;;AAE3D,UAAU,6CAAG;AACb,WAAW,6CAAG;AACd,WAAW,6CAAG;AACd,UAAU,6CAAG;AACb,UAAU,6CAAG;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,kDAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,uCAAuC,oDAAc;AACrD;AACA;;AAEA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6CAAG;;AAErB;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,6CAAG;;AAErB;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,6CAAG;;AAEpB;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;;;;;;ACvLuF;;AAEvF,+BAA+B,6CAAO,IAAI,6CAAO;AACjD,+BAA+B,6CAAO,IAAI,6CAAO;AACjD,iCAAiC,6CAAO,IAAI,6CAAO,GAAG,6CAAO;;AAE7D,WAAW,6CAAG;AACd,WAAW,6CAAG;AACd,WAAW,6CAAG;AACd,aAAa,6CAAG;AAChB,aAAa,6CAAG;AAChB,aAAa,6CAAG;AAChB,aAAa,6CAAG;AAChB,aAAa,6CAAG;AAChB,aAAa,6CAAG;AAChB,YAAY,6CAAG;AACf,YAAY,6CAAG;AACf,YAAY,6CAAG;AACf,UAAU,6CAAG;;AAEb,WAAW,6CAAG;AACd,YAAY,6CAAG;AACf,YAAY,6CAAG;AACf,YAAY,6CAAG;;AAEf,UAAU,6CAAG;AACb,WAAW,6CAAG;;AAEd;AACA,aAAa,6CAAG;AAChB,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA,gBAAgB,8CAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,8CAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA,QAAQ,8CAAQ;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,6CAAG;AAChB,QAAQ,6CAAG;AACX,YAAY,+CAAK;AACjB,YAAY,+CAAK;AACjB,QAAQ,+CAAK;;AAEb,cAAc,kDAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,0CAA0C,oDAAc;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,6CAAG;AACtB,4BAA4B,+CAAK;;AAEjC,mBAAmB,6CAAG;AACtB,4BAA4B,+CAAK;;AAEjC,mBAAmB,6CAAG;AACtB,4BAA4B,+CAAK;;AAEjC;AACA,gCAAgC,+CAAK;AACrC,gCAAgC,+CAAK;AACrC;AACA;AACA,gCAAgC,+CAAK;AACrC,gCAAgC,+CAAK;AACrC;AACA;AACA,gCAAgC,+CAAK;AACrC,gCAAgC,+CAAK;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AC7cO;AACA;AACA;;AAEP;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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ChB,CAAD;iBAAOA,CAAA;QAAP,CALR;eAOAnD,OAAO,CAACC,GAAR,CAAY,mCAAZ;MAnNW;IAAA;EAAA;EAhEf;EAgDEoC,cAAA,GAAiB,SAAjBA,eAAkBmD,KAAD;IACnB,IAAAC,OAAA;IAAIA,OAAA,GAAU,CACR;MAACnD,KAAA,EAAO,SAAR;MAAmBE,OAAA,EAAS,GAA5B;MAAiCC,MAAA,EAAQ1F,EAAE,CAAC2F,YAA5C;MAA0DH,IAAA,EAAM;IAAhE,CADQ,EAER;MAACD,KAAA,EAAO,SAAR;MAAmBE,OAAA,EAAS,GAA5B;MAAiCC,MAAA,EAAQ1F,EAAE,CAAC2F,YAA5C;MAA0DH,IAAA,EAAM;IAAhE,CAFQ,EAGR;MAACD,KAAA,EAAO,SAAR;MAAmBE,OAAA,EAAS,GAA5B;MAAiCC,MAAA,EAAQ1F,EAAE,CAAC2F,YAA5C;MAA0DH,IAAA,EAAM;IAAhE,CAHQ,EAIR;MAACD,KAAA,EAAO,SAAR;MAAmBE,OAAA,EAAS,GAA5B;MAAiCC,MAAA,EAAQ1F,EAAE,CAAC2F,YAA5C;MAA0DH,IAAA,EAAM;IAAhE,CAJQ,EAKR;MAACD,KAAA,EAAO,SAAR;MAAmBE,OAAA,EAAS,GAA5B;MAAiCC,MAAA,EAAQ1F,EAAE,CAAC2F,YAA5C;MAA0DH,IAAA,EAAM;IAAhE,CALQ;WAOVkD,OAAO,CAAClC,KAAR,CAAc,CAAd,EAAiBiC,KAAjB;EARe;;;EAWjBN,eAAA,GAAkBnI,EAAE,CAAC0F,MAAH,EAAW,CAACiD,IAAZ,CAAiB,EAAjB;;;;AA0NpBC,MAAM,CAACjG,UAAP,GAAoBA,UAAA,C","sources":["webpack://bika.cement/./node_modules/performance-now/lib/performance-now.js","webpack://bika.cement/./node_modules/raf/index.js","webpack://bika.cement/./node_modules/rgbcolor/index.js","webpack://bika.cement/./node_modules/stackblur-canvas/dist/stackblur-es.js","webpack://bika.cement/./node_modules/canvg/dist/index.cjs","webpack://bika.cement/./node_modules/svg-pathdata/lib/SVGPathData.cjs","webpack://bika.cement/./node_modules/d3-array/src/array.js","webpack://bika.cement/./node_modules/d3-array/src/ascending.js","webpack://bika.cement/./node_modules/d3-array/src/bin.js","webpack://bika.cement/./node_modules/d3-array/src/bisect.js","webpack://bika.cement/./node_modules/d3-array/src/bisector.js","webpack://bika.cement/./node_modules/d3-array/src/blur.js","webpack://bika.cement/./node_modules/d3-array/src/constant.js","webpack://bika.cement/./node_modules/d3-array/src/count.js","webpack://bika.cement/./node_modules/d3-array/src/cross.js","webpack://bika.cement/./node_modules/d3-array/src/cumsum.js","webpack://bika.cement/./node_modules/d3-array/src/descending.js","webpack://bika.cement/./node_modules/d3-array/src/deviation.js","webpack://bika.cement/./node_modules/d3-array/src/difference.js","webpack://bika.cement/./node_modules/d3-array/src/disjoint.js","webpack://bika.cement/./node_modules/d3-array/src/every.js","webpack://bika.cement/./node_modules/d3-array/src/extent.js","webpack://bika.cement/./node_modules/d3-array/src/filter.js","webpack://bika.cement/./node_modules/d3-array/src/fsum.js","webpack://bika.cement/./node_modules/d3-array/src/greatest.js","webpack://bika.cement/./node_modules/d3-array/src/greatestIndex.js","webpack://bika.cement/./node_modules/d3-array/src/group.js","webpack://bika.cement/./node_modules/d3-array/src/groupSort.js","webpack://bika.cement/./node_modules/d3-array/src/identity.js","webpack://bika.cement/./node_modules/d3-array/src/index.js","webpack://bika.cement/./node_modules/d3-array/src/intersection.js","webpack://bika.cement/./node_modules/d3-array/src/least.js","webpack://bika.cement/./node_modules/d3-array/src/leastIndex.js","webpack://bika.cement/./node_modules/d3-array/src/map.js","webpack://bika.cement/./node_modules/d3-array/src/max.js","webpack://bika.cement/./node_modules/d3-array/src/maxIndex.js","webpack://bika.cement/./node_modules/d3-array/src/mean.js","webpack://bika.cement/./node_modules/d3-array/src/median.js","webpack://bika.cement/./node_modules/d3-array/src/merge.js","webpack://bika.cement/./node_modules/d3-array/src/min.js","webpack://bika.cement/./node_modules/d3-array/src/minIndex.js","webpack://bika.cement/./node_modules/d3-array/src/mode.js","webpack://bika.cement/./node_modules/d3-array/src/nice.js","webpack://bika.cement/./node_modules/d3-array/src/number.js","webpack://bika.cement/./node_modules/d3-array/src/pairs.js","webpack://bika.cement/./node_modules/d3-array/src/permute.js","webpack://bika.cement/./node_modules/d3-array/src/quantile.js","webpack://bika.cement/./node_modules/d3-array/src/quickselect.js","webpack://bika.cement/./node_modules/d3-array/src/range.js","webpack://bika.cement/./node_modules/d3-array/src/rank.js","webpack://bika.cement/./node_modules/d3-array/src/reduce.js","webpack://bika.cement/./node_modules/d3-array/src/reverse.js","webpack://bika.cement/./node_modules/d3-array/src/scan.js","webpack://bika.cement/./node_modules/d3-array/src/shuffle.js","webpack://bika.cement/./node_modules/d3-array/src/some.js","webpack://bika.cement/./node_modules/d3-array/src/sort.js","webpack://bika.cement/./node_modules/d3-array/src/subset.js","webpack://bika.cement/./node_modules/d3-array/src/sum.js","webpack://bika.cement/./node_modules/d3-array/src/superset.js","webpack://bika.cement/./node_modules/d3-array/src/threshold/freedmanDiaconis.js","webpack://bika.cement/./node_modules/d3-array/src/threshold/scott.js","webpack://bika.cement/./node_modules/d3-array/src/threshold/sturges.js","webpack://bika.cement/./node_modules/d3-array/src/ticks.js","webpack://bika.cement/./node_modules/d3-array/src/transpose.js","webpack://bika.cement/./node_modules/d3-array/src/union.js","webpack://bika.cement/./node_modules/d3-array/src/variance.js","webpack://bika.cement/./node_modules/d3-array/src/zip.js","webpack://bika.cement/./node_modules/d3-axis/src/axis.js","webpack://bika.cement/./node_modules/d3-axis/src/identity.js","webpack://bika.cement/./node_modules/d3-axis/src/index.js","webpack://bika.cement/./node_modules/d3-brush/src/brush.js","webpack://bika.cement/./node_modules/d3-brush/src/constant.js","webpack://bika.cement/./node_modules/d3-brush/src/event.js","webpack://bika.cement/./node_modules/d3-brush/src/index.js","webpack://bika.cement/./node_modules/d3-brush/src/noevent.js","webpack://bika.cement/./node_modules/d3-chord/src/array.js","webpack://bika.cement/./node_modules/d3-chord/src/chord.js","webpack://bika.cement/./node_modules/d3-chord/src/constant.js","webpack://bika.cement/./node_modules/d3-chord/src/index.js","webpack://bika.cement/./node_modules/d3-chord/src/math.js","webpack://bika.cement/./node_modules/d3-chord/src/ribbon.js","webpack://bika.cement/./node_modules/d3-color/src/color.js","webpack://bika.cement/./node_modules/d3-color/src/cubehelix.js","webpack://bika.cement/./node_modules/d3-color/src/define.js","webpack://bika.cement/./node_modules/d3-color/src/index.js","webpack://bika.cement/./node_modules/d3-color/src/lab.js","webpack://bika.cement/./node_modules/d3-color/src/math.js","webpack://bika.cement/./node_modules/d3-contour/src/area.js","webpack://bika.cement/./node_modules/d3-contour/src/array.js","webpack://bika.cement/./node_modules/d3-contour/src/ascending.js","webpack://bika.cement/./node_modules/d3-contour/src/constant.js","webpack://bika.cement/./node_modules/d3-contour/src/contains.js","webpack://bika.cement/./node_modules/d3-contour/src/contours.js","webpack://bika.cement/./node_modules/d3-contour/src/density.js","webpack://bika.cement/./node_modules/d3-contour/src/index.js","webpack://bika.cement/./node_modules/d3-contour/src/noop.js","webpack://bika.cement/./node_modules/d3-delaunay/src/delaunay.js","webpack://bika.cement/./node_modules/d3-delaunay/src/index.js","webpack://bika.cement/./node_modules/d3-delaunay/src/path.js","webpack://bika.cement/./node_modules/d3-delaunay/src/polygon.js","webpack://bika.cement/./node_modules/d3-delaunay/src/voronoi.js","webpack://bika.cement/./node_modules/d3-dispatch/src/dispatch.js","webpack://bika.cement/./node_modules/d3-dispatch/src/index.js","webpack://bika.cement/./node_modules/d3-drag/src/constant.js","webpack://bika.cement/./node_modules/d3-drag/src/drag.js","webpack://bika.cement/./node_modules/d3-drag/src/event.js","webpack://bika.cement/./node_modules/d3-drag/src/index.js","webpack://bika.cement/./node_modules/d3-drag/src/nodrag.js","webpack://bika.cement/./node_modules/d3-drag/src/noevent.js","webpack://bika.cement/./node_modules/d3-dsv/src/autoType.js","webpack://bika.cement/./node_modules/d3-dsv/src/csv.js","webpack://bika.cement/./node_modules/d3-dsv/src/dsv.js","webpack://bika.cement/./node_modules/d3-dsv/src/index.js","webpack://bika.cement/./node_modules/d3-dsv/src/tsv.js","webpack://bika.cement/./node_modules/d3-ease/src/back.js","webpack://bika.cement/./node_modules/d3-ease/src/bounce.js","webpack://bika.cement/./node_modules/d3-ease/src/circle.js","webpack://bika.cement/./node_modules/d3-ease/src/cubic.js","webpack://bika.cement/./node_modules/d3-ease/src/elastic.js","webpack://bika.cement/./node_modules/d3-ease/src/exp.js","webpack://bika.cement/./node_modules/d3-ease/src/index.js","webpack://bika.cement/./node_modules/d3-ease/src/linear.js","webpack://bika.cement/./node_modules/d3-ease/src/math.js","webpack://bika.cement/./node_modules/d3-ease/src/poly.js","webpack://bika.cement/./node_modules/d3-ease/src/quad.js","webpack://bika.cement/./node_modules/d3-ease/src/sin.js","webpack://bika.cement/./node_modules/d3-fetch/src/blob.js","webpack://bika.cement/./node_modules/d3-fetch/src/buffer.js","webpack://bika.cement/./node_modules/d3-fetch/src/dsv.js","webpack://bika.cement/./node_modules/d3-fetch/src/image.js","webpack://bika.cement/./node_modules/d3-fetch/src/index.js","webpack://bika.cement/./node_modules/d3-fetch/src/json.js","webpack://bika.cement/./node_modules/d3-fetch/src/text.js","webpack://bika.cement/./node_modules/d3-fetch/src/xml.js","webpack://bika.cement/./node_modules/d3-force/src/center.js","webpack://bika.cement/./node_modules/d3-force/src/collide.js","webpack://bika.cement/./node_modules/d3-force/src/constant.js","webpack://bika.cement/./node_modules/d3-force/src/index.js","webpack://bika.cement/./node_modules/d3-force/src/jiggle.js","webpack://bika.cement/./node_modules/d3-force/src/lcg.js","webpack://bika.cement/./node_modules/d3-force/src/link.js","webpack://bika.cement/./node_modules/d3-force/src/manyBody.js","webpack://bika.cement/./node_modules/d3-force/src/radial.js","webpack://bika.cement/./node_modules/d3-force/src/simulation.js","webpack://bika.cement/./node_modules/d3-force/src/x.js","webpack://bika.cement/./node_modules/d3-force/src/y.js","webpack://bika.cement/./node_modules/d3-format/src/defaultLocale.js","webpack://bika.cement/./node_modules/d3-format/src/exponent.js","webpack://bika.cement/./node_modules/d3-format/src/formatDecimal.js","webpack://bika.cement/./node_modules/d3-format/src/formatGroup.js","webpack://bika.cement/./node_modules/d3-format/src/formatNumerals.js","webpack://bika.cement/./node_modules/d3-format/src/formatPrefixAuto.js","webpack://bika.cement/./node_modules/d3-format/src/formatRounded.js","webpack://bika.cement/./node_modules/d3-format/src/formatSpecifier.js","webpack://bika.cement/./node_modules/d3-format/src/formatTrim.js","webpack://bika.cement/./node_modules/d3-format/src/formatTypes.js","webpack://bika.cement/./node_modules/d3-format/src/identity.js","webpack://bika.cement/./node_modules/d3-format/src/index.js","webpack://bika.cement/./node_modules/d3-format/src/locale.js","webpack://bika.cement/./node_modules/d3-format/src/precisionFixed.js","webpack://bika.cement/./node_modules/d3-format/src/precisionPrefix.js","webpack://bika.cement/./node_modules/d3-format/src/precisionRound.js","webpack://bika.cement/./node_modules/d3-geo/src/area.js","webpack://bika.cement/./node_modules/d3-geo/src/bounds.js","webpack://bika.cement/./node_modules/d3-geo/src/cartesian.js","webpack://bika.cement/./node_modules/d3-geo/src/centroid.js","webpack://bika.cement/./node_modules/d3-geo/src/circle.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/antimeridian.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/buffer.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/circle.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/extent.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/index.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/line.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/rectangle.js","webpack://bika.cement/./node_modules/d3-geo/src/clip/rejoin.js","webpack://bika.cement/./node_modules/d3-geo/src/compose.js","webpack://bika.cement/./node_modules/d3-geo/src/constant.js","webpack://bika.cement/./node_modules/d3-geo/src/contains.js","webpack://bika.cement/./node_modules/d3-geo/src/distance.js","webpack://bika.cement/./node_modules/d3-geo/src/graticule.js","webpack://bika.cement/./node_modules/d3-geo/src/identity.js","webpack://bika.cement/./node_modules/d3-geo/src/index.js","webpack://bika.cement/./node_modules/d3-geo/src/interpolate.js","webpack://bika.cement/./node_modules/d3-geo/src/length.js","webpack://bika.cement/./node_modules/d3-geo/src/math.js","webpack://bika.cement/./node_modules/d3-geo/src/noop.js","webpack://bika.cement/./node_modules/d3-geo/src/path/area.js","webpack://bika.cement/./node_modules/d3-geo/src/path/bounds.js","webpack://bika.cement/./node_modules/d3-geo/src/path/centroid.js","webpack://bika.cement/./node_modules/d3-geo/src/path/context.js","webpack://bika.cement/./node_modules/d3-geo/src/path/index.js","webpack://bika.cement/./node_modules/d3-geo/src/path/measure.js","webpack://bika.cement/./node_modules/d3-geo/src/path/string.js","webpack://bika.cement/./node_modules/d3-geo/src/pointEqual.js","webpack://bika.cement/./node_modules/d3-geo/src/polygonContains.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/albers.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/albersUsa.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/azimuthal.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/azimuthalEqualArea.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/azimuthalEquidistant.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/conic.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/conicConformal.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/conicEqualArea.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/conicEquidistant.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/cylindricalEqualArea.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/equalEarth.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/equirectangular.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/fit.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/gnomonic.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/identity.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/index.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/mercator.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/naturalEarth1.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/orthographic.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/resample.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/stereographic.js","webpack://bika.cement/./node_modules/d3-geo/src/projection/transverseMercator.js","webpack://bika.cement/./node_modules/d3-geo/src/rotation.js","webpack://bika.cement/./node_modules/d3-geo/src/stream.js","webpack://bika.cement/./node_modules/d3-geo/src/transform.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/accessors.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/array.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/cluster.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/constant.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/ancestors.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/count.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/descendants.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/each.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/find.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/index.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/iterator.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/leaves.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/links.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/path.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/sort.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/hierarchy/sum.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/index.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/lcg.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/pack/enclose.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/pack/index.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/pack/siblings.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/partition.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/stratify.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/tree.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/binary.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/dice.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/index.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/resquarify.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/round.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/slice.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/sliceDice.js","webpack://bika.cement/./node_modules/d3-hierarchy/src/treemap/squarify.js","webpack://bika.cement/./node_modules/d3-interpolate/src/array.js","webpack://bika.cement/./node_modules/d3-interpolate/src/basis.js","webpack://bika.cement/./node_modules/d3-interpolate/src/basisClosed.js","webpack://bika.cement/./node_modules/d3-interpolate/src/color.js","webpack://bika.cement/./node_modules/d3-interpolate/src/constant.js","webpack://bika.cement/./node_modules/d3-interpolate/src/cubehelix.js","webpack://bika.cement/./node_modules/d3-interpolate/src/date.js","webpack://bika.cement/./node_modules/d3-interpolate/src/discrete.js","webpack://bika.cement/./node_modules/d3-interpolate/src/hcl.js","webpack://bika.cement/./node_modules/d3-interpolate/src/hsl.js","webpack://bika.cement/./node_modules/d3-interpolate/src/hue.js","webpack://bika.cement/./node_modules/d3-interpolate/src/index.js","webpack://bika.cement/./node_modules/d3-interpolate/src/lab.js","webpack://bika.cement/./node_modules/d3-interpolate/src/number.js","webpack://bika.cement/./node_modules/d3-interpolate/src/numberArray.js","webpack://bika.cement/./node_modules/d3-interpolate/src/object.js","webpack://bika.cement/./node_modules/d3-interpolate/src/piecewise.js","webpack://bika.cement/./node_modules/d3-interpolate/src/quantize.js","webpack://bika.cement/./node_modules/d3-interpolate/src/rgb.js","webpack://bika.cement/./node_modules/d3-interpolate/src/round.js","webpack://bika.cement/./node_modules/d3-interpolate/src/string.js","webpack://bika.cement/./node_modules/d3-interpolate/src/transform/decompose.js","webpack://bika.cement/./node_modules/d3-interpolate/src/transform/index.js","webpack://bika.cement/./node_modules/d3-interpolate/src/transform/parse.js","webpack://bika.cement/./node_modules/d3-interpolate/src/value.js","webpack://bika.cement/./node_modules/d3-interpolate/src/zoom.js","webpack://bika.cement/./node_modules/d3-path/src/index.js","webpack://bika.cement/./node_modules/d3-path/src/path.js","webpack://bika.cement/./node_modules/d3-polygon/src/area.js","webpack://bika.cement/./node_modules/d3-polygon/src/centroid.js","webpack://bika.cement/./node_modules/d3-polygon/src/contains.js","webpack://bika.cement/./node_modules/d3-polygon/src/cross.js","webpack://bika.cement/./node_modules/d3-polygon/src/hull.js","webpack://bika.cement/./node_modules/d3-polygon/src/index.js","webpack://bika.cement/./node_modules/d3-polygon/src/length.js","webpack://bika.cement/./node_modules/d3-quadtree/src/add.js","webpack://bika.cement/./node_modules/d3-quadtree/src/cover.js","webpack://bika.cement/./node_modules/d3-quadtree/src/data.js","webpack://bika.cement/./node_modules/d3-quadtree/src/extent.js","webpack://bika.cement/./node_modules/d3-quadtree/src/find.js","webpack://bika.cement/./node_modules/d3-quadtree/src/index.js","webpack://bika.cement/./node_modules/d3-quadtree/src/quad.js","webpack://bika.cement/./node_modules/d3-quadtree/src/quadtree.js","webpack://bika.cement/./node_modules/d3-quadtree/src/remove.js","webpack://bika.cement/./node_modules/d3-quadtree/src/root.js","webpack://bika.cement/./node_modules/d3-quadtree/src/size.js","webpack://bika.cement/./node_modules/d3-quadtree/src/visit.js","webpack://bika.cement/./node_modules/d3-quadtree/src/visitAfter.js","webpack://bika.cement/./node_modules/d3-quadtree/src/x.js","webpack://bika.cement/./node_modules/d3-quadtree/src/y.js","webpack://bika.cement/./node_modules/d3-random/src/bates.js","webpack://bika.cement/./node_modules/d3-random/src/bernoulli.js","webpack://bika.cement/./node_modules/d3-random/src/beta.js","webpack://bika.cement/./node_modules/d3-random/src/binomial.js","webpack://bika.cement/./node_modules/d3-random/src/cauchy.js","webpack://bika.cement/./node_modules/d3-random/src/defaultSource.js","webpack://bika.cement/./node_modules/d3-random/src/exponential.js","webpack://bika.cement/./node_modules/d3-random/src/gamma.js","webpack://bika.cement/./node_modules/d3-random/src/geometric.js","webpack://bika.cement/./node_modules/d3-random/src/index.js","webpack://bika.cement/./node_modules/d3-random/src/int.js","webpack://bika.cement/./node_modules/d3-random/src/irwinHall.js","webpack://bika.cement/./node_modules/d3-random/src/lcg.js","webpack://bika.cement/./node_modules/d3-random/src/logNormal.js","webpack://bika.cement/./node_modules/d3-random/src/logistic.js","webpack://bika.cement/./node_modules/d3-random/src/normal.js","webpack://bika.cement/./node_modules/d3-random/src/pareto.js","webpack://bika.cement/./node_modules/d3-random/src/poisson.js","webpack://bika.cement/./node_modules/d3-random/src/uniform.js","webpack://bika.cement/./node_modules/d3-random/src/weibull.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Accent.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Dark2.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Paired.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Set1.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Set2.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Set3.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/category10.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/categorical/observable10.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/colors.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/BrBG.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/PRGn.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/PiYG.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/PuOr.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/RdBu.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/RdGy.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/diverging/Spectral.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/index.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/ramp.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js","webpack://bika.cement/./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js","webpack://bika.cement/./node_modules/d3-scale/src/band.js","webpack://bika.cement/./node_modules/d3-scale/src/constant.js","webpack://bika.cement/./node_modules/d3-scale/src/continuous.js","webpack://bika.cement/./node_modules/d3-scale/src/diverging.js","webpack://bika.cement/./node_modules/d3-scale/src/identity.js","webpack://bika.cement/./node_modules/d3-scale/src/index.js","webpack://bika.cement/./node_modules/d3-scale/src/init.js","webpack://bika.cement/./node_modules/d3-scale/src/linear.js","webpack://bika.cement/./node_modules/d3-scale/src/log.js","webpack://bika.cement/./node_modules/d3-scale/src/nice.js","webpack://bika.cement/./node_modules/d3-scale/src/number.js","webpack://bika.cement/./node_modules/d3-scale/src/ordinal.js","webpack://bika.cement/./node_modules/d3-scale/src/pow.js","webpack://bika.cement/./node_modules/d3-scale/src/quantile.js","webpack://bika.cement/./node_modules/d3-scale/src/quantize.js","webpack://bika.cement/./node_modules/d3-scale/src/radial.js","webpack://bika.cement/./node_modules/d3-scale/src/sequential.js","webpack://bika.cement/./node_modules/d3-scale/src/sequentialQuantile.js","webpack://bika.cement/./node_modules/d3-scale/src/symlog.js","webpack://bika.cement/./node_modules/d3-scale/src/threshold.js","webpack://bika.cement/./node_modules/d3-scale/src/tickFormat.js","webpack://bika.cement/./node_modules/d3-scale/src/time.js","webpack://bika.cement/./node_modules/d3-scale/src/utcTime.js","webpack://bika.cement/./node_modules/d3-selection/src/array.js","webpack://bika.cement/./node_modules/d3-selection/src/constant.js","webpack://bika.cement/./node_modules/d3-selection/src/create.js","webpack://bika.cement/./node_modules/d3-selection/src/creator.js","webpack://bika.cement/./node_modules/d3-selection/src/index.js","webpack://bika.cement/./node_modules/d3-selection/src/local.js","webpack://bika.cement/./node_modules/d3-selection/src/matcher.js","webpack://bika.cement/./node_modules/d3-selection/src/namespace.js","webpack://bika.cement/./node_modules/d3-selection/src/namespaces.js","webpack://bika.cement/./node_modules/d3-selection/src/pointer.js","webpack://bika.cement/./node_modules/d3-selection/src/pointers.js","webpack://bika.cement/./node_modules/d3-selection/src/select.js","webpack://bika.cement/./node_modules/d3-selection/src/selectAll.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/append.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/attr.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/call.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/classed.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/clone.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/data.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/datum.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/dispatch.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/each.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/empty.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/enter.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/exit.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/filter.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/html.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/index.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/insert.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/iterator.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/join.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/lower.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/merge.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/node.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/nodes.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/on.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/order.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/property.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/raise.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/remove.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/select.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/selectAll.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/selectChild.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/selectChildren.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/size.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/sort.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/sparse.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/style.js","webpack://bika.cement/./node_modules/d3-selection/src/selection/text.js","webpack://bika.cement/./node_modules/d3-selection/src/selector.js","webpack://bika.cement/./node_modules/d3-selection/src/selectorAll.js","webpack://bika.cement/./node_modules/d3-selection/src/sourceEvent.js","webpack://bika.cement/./node_modules/d3-selection/src/window.js","webpack://bika.cement/./node_modules/d3-shape/src/arc.js","webpack://bika.cement/./node_modules/d3-shape/src/area.js","webpack://bika.cement/./node_modules/d3-shape/src/areaRadial.js","webpack://bika.cement/./node_modules/d3-shape/src/array.js","webpack://bika.cement/./node_modules/d3-shape/src/constant.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/basis.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/basisClosed.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/basisOpen.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/bump.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/bundle.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/cardinal.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/cardinalClosed.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/cardinalOpen.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/catmullRom.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/catmullRomClosed.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/catmullRomOpen.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/linear.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/linearClosed.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/monotone.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/natural.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/radial.js","webpack://bika.cement/./node_modules/d3-shape/src/curve/step.js","webpack://bika.cement/./node_modules/d3-shape/src/descending.js","webpack://bika.cement/./node_modules/d3-shape/src/identity.js","webpack://bika.cement/./node_modules/d3-shape/src/index.js","webpack://bika.cement/./node_modules/d3-shape/src/line.js","webpack://bika.cement/./node_modules/d3-shape/src/lineRadial.js","webpack://bika.cement/./node_modules/d3-shape/src/link.js","webpack://bika.cement/./node_modules/d3-shape/src/math.js","webpack://bika.cement/./node_modules/d3-shape/src/noop.js","webpack://bika.cement/./node_modules/d3-shape/src/offset/diverging.js","webpack://bika.cement/./node_modules/d3-shape/src/offset/expand.js","webpack://bika.cement/./node_modules/d3-shape/src/offset/none.js","webpack://bika.cement/./node_modules/d3-shape/src/offset/silhouette.js","webpack://bika.cement/./node_modules/d3-shape/src/offset/wiggle.js","webpack://bika.cement/./node_modules/d3-shape/src/order/appearance.js","webpack://bika.cement/./node_modules/d3-shape/src/order/ascending.js","webpack://bika.cement/./node_modules/d3-shape/src/order/descending.js","webpack://bika.cement/./node_modules/d3-shape/src/order/insideOut.js","webpack://bika.cement/./node_modules/d3-shape/src/order/none.js","webpack://bika.cement/./node_modules/d3-shape/src/order/reverse.js","webpack://bika.cement/./node_modules/d3-shape/src/path.js","webpack://bika.cement/./node_modules/d3-shape/src/pie.js","webpack://bika.cement/./node_modules/d3-shape/src/point.js","webpack://bika.cement/./node_modules/d3-shape/src/pointRadial.js","webpack://bika.cement/./node_modules/d3-shape/src/stack.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/asterisk.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/circle.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/cross.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/diamond.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/diamond2.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/plus.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/square.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/square2.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/star.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/times.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/triangle.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/triangle2.js","webpack://bika.cement/./node_modules/d3-shape/src/symbol/wye.js","webpack://bika.cement/./node_modules/d3-time-format/src/defaultLocale.js","webpack://bika.cement/./node_modules/d3-time-format/src/index.js","webpack://bika.cement/./node_modules/d3-time-format/src/isoFormat.js","webpack://bika.cement/./node_modules/d3-time-format/src/isoParse.js","webpack://bika.cement/./node_modules/d3-time-format/src/locale.js","webpack://bika.cement/./node_modules/d3-time/src/day.js","webpack://bika.cement/./node_modules/d3-time/src/duration.js","webpack://bika.cement/./node_modules/d3-time/src/hour.js","webpack://bika.cement/./node_modules/d3-time/src/index.js","webpack://bika.cement/./node_modules/d3-time/src/interval.js","webpack://bika.cement/./node_modules/d3-time/src/millisecond.js","webpack://bika.cement/./node_modules/d3-time/src/minute.js","webpack://bika.cement/./node_modules/d3-time/src/month.js","webpack://bika.cement/./node_modules/d3-time/src/second.js","webpack://bika.cement/./node_modules/d3-time/src/ticks.js","webpack://bika.cement/./node_modules/d3-time/src/week.js","webpack://bika.cement/./node_modules/d3-time/src/year.js","webpack://bika.cement/./node_modules/d3-timer/src/index.js","webpack://bika.cement/./node_modules/d3-timer/src/interval.js","webpack://bika.cement/./node_modules/d3-timer/src/timeout.js","webpack://bika.cement/./node_modules/d3-timer/src/timer.js","webpack://bika.cement/./node_modules/d3-transition/src/active.js","webpack://bika.cement/./node_modules/d3-transition/src/index.js","webpack://bika.cement/./node_modules/d3-transition/src/interrupt.js","webpack://bika.cement/./node_modules/d3-transition/src/selection/index.js","webpack://bika.cement/./node_modules/d3-transition/src/selection/interrupt.js","webpack://bika.cement/./node_modules/d3-transition/src/selection/transition.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/attr.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/attrTween.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/delay.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/duration.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/ease.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/easeVarying.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/end.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/filter.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/index.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/interpolate.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/merge.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/on.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/remove.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/schedule.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/select.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/selectAll.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/selection.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/style.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/styleTween.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/text.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/textTween.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/transition.js","webpack://bika.cement/./node_modules/d3-transition/src/transition/tween.js","webpack://bika.cement/./node_modules/d3-zoom/src/constant.js","webpack://bika.cement/./node_modules/d3-zoom/src/event.js","webpack://bika.cement/./node_modules/d3-zoom/src/index.js","webpack://bika.cement/./node_modules/d3-zoom/src/noevent.js","webpack://bika.cement/./node_modules/d3-zoom/src/transform.js","webpack://bika.cement/./node_modules/d3-zoom/src/zoom.js","webpack://bika.cement/./node_modules/d3/src/index.js","webpack://bika.cement/./node_modules/delaunator/index.js","webpack://bika.cement/./node_modules/internmap/src/index.js","webpack://bika.cement/./node_modules/robust-predicates/esm/incircle.js","webpack://bika.cement/./node_modules/robust-predicates/esm/insphere.js","webpack://bika.cement/./node_modules/robust-predicates/esm/orient2d.js","webpack://bika.cement/./node_modules/robust-predicates/esm/orient3d.js","webpack://bika.cement/./node_modules/robust-predicates/esm/util.js","webpack://bika.cement/./node_modules/robust-predicates/index.js","webpack://bika.cement/webpack/bootstrap","webpack://bika.cement/webpack/runtime/define property getters","webpack://bika.cement/webpack/runtime/global","webpack://bika.cement/webpack/runtime/hasOwnProperty shorthand","webpack://bika.cement/webpack/runtime/make namespace object","webpack://bika.cement/./app/TimeSeries.coffee"],"sourcesContent":["// Generated by CoffeeScript 1.12.2\n(function() {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function(object) {\n if (!object) {\n object = root;\n }\n object.requestAnimationFrame = raf\n object.cancelAnimationFrame = caf\n}\n","/*\n\tBased on rgbcolor.js by Stoyan Stefanov \n\thttp://www.phpied.com/rgb-color-parser-in-javascript/\n*/\n\nmodule.exports = function(color_string) {\n this.ok = false;\n this.alpha = 1.0;\n\n // strip any leading #\n if (color_string.charAt(0) == '#') { // remove # if any\n color_string = color_string.substr(1,6);\n }\n\n color_string = color_string.replace(/ /g,'');\n color_string = color_string.toLowerCase();\n\n // before getting into regexps, try simple matches\n // and overwrite the input\n var simple_colors = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000000',\n blanchedalmond: 'ffebcd',\n blue: '0000ff',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '00ffff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dodgerblue: '1e90ff',\n feldspar: 'd19275',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'ff00ff',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred : 'cd5c5c',\n indigo : '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgrey: 'd3d3d3',\n lightgreen: '90ee90',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslateblue: '8470ff',\n lightslategray: '778899',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '00ff00',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'ff00ff',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370d8',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'd87093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '663399',\n red: 'ff0000',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n violetred: 'd02090',\n wheat: 'f5deb3',\n white: 'ffffff',\n whitesmoke: 'f5f5f5',\n yellow: 'ffff00',\n yellowgreen: '9acd32'\n };\n color_string = simple_colors[color_string] || color_string;\n // emd of simple type-in colors\n\n // array of color definition objects\n var color_defs = [\n {\n re: /^rgba\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3}),\\s*((?:\\d?\\.)?\\d)\\)$/,\n example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],\n process: function (bits){\n return [\n parseInt(bits[1]),\n parseInt(bits[2]),\n parseInt(bits[3]),\n parseFloat(bits[4])\n ];\n }\n },\n {\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],\n process: function (bits){\n return [\n parseInt(bits[1]),\n parseInt(bits[2]),\n parseInt(bits[3])\n ];\n }\n },\n {\n re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n example: ['#00ff00', '336699'],\n process: function (bits){\n return [\n parseInt(bits[1], 16),\n parseInt(bits[2], 16),\n parseInt(bits[3], 16)\n ];\n }\n },\n {\n re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n example: ['#fb0', 'f0f'],\n process: function (bits){\n return [\n parseInt(bits[1] + bits[1], 16),\n parseInt(bits[2] + bits[2], 16),\n parseInt(bits[3] + bits[3], 16)\n ];\n }\n }\n ];\n\n // search through the definitions to find a match\n for (var i = 0; i < color_defs.length; i++) {\n var re = color_defs[i].re;\n var processor = color_defs[i].process;\n var bits = re.exec(color_string);\n if (bits) {\n var channels = processor(bits);\n this.r = channels[0];\n this.g = channels[1];\n this.b = channels[2];\n if (channels.length > 3) {\n this.alpha = channels[3];\n }\n this.ok = true;\n }\n\n }\n\n // validate/cleanup values\n this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);\n this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);\n this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);\n this.alpha = (this.alpha < 0) ? 0 : ((this.alpha > 1.0 || isNaN(this.alpha)) ? 1.0 : this.alpha);\n\n // some getters\n this.toRGB = function () {\n return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';\n }\n this.toRGBA = function () {\n return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';\n }\n this.toHex = function () {\n var r = this.r.toString(16);\n var g = this.g.toString(16);\n var b = this.b.toString(16);\n if (r.length == 1) r = '0' + r;\n if (g.length == 1) g = '0' + g;\n if (b.length == 1) b = '0' + b;\n return '#' + r + g + b;\n }\n\n // help\n this.getHelpXML = function () {\n\n var examples = new Array();\n // add regexps\n for (var i = 0; i < color_defs.length; i++) {\n var example = color_defs[i].example;\n for (var j = 0; j < example.length; j++) {\n examples[examples.length] = example[j];\n }\n }\n // add type-in colors\n for (var sc in simple_colors) {\n examples[examples.length] = sc;\n }\n\n var xml = document.createElement('ul');\n xml.setAttribute('id', 'rgbcolor-examples');\n for (var i = 0; i < examples.length; i++) {\n try {\n var list_item = document.createElement('li');\n var list_color = new RGBColor(examples[i]);\n var example_div = document.createElement('div');\n example_div.style.cssText =\n 'margin: 3px; '\n + 'border: 1px solid black; '\n + 'background:' + list_color.toHex() + '; '\n + 'color:' + list_color.toHex()\n ;\n example_div.appendChild(document.createTextNode('test'));\n var list_item_value = document.createTextNode(\n ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()\n );\n list_item.appendChild(example_div);\n list_item.appendChild(list_item_value);\n xml.appendChild(list_item);\n\n } catch(e){}\n }\n return xml;\n\n }\n\n}\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\n/* eslint-disable no-bitwise -- used for calculations */\n\n/* eslint-disable unicorn/prefer-query-selector -- aiming at\n backward-compatibility */\n\n/**\n* StackBlur - a fast almost Gaussian Blur For Canvas\n*\n* In case you find this class useful - especially in commercial projects -\n* I am not totally unhappy for a small donation to my PayPal account\n* mario@quasimondo.de\n*\n* Or support me on flattr:\n* {@link https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript}.\n*\n* @module StackBlur\n* @author Mario Klingemann\n* Contact: mario@quasimondo.com\n* Website: {@link http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html}\n* Twitter: @quasimondo\n*\n* @copyright (c) 2010 Mario Klingemann\n*\n* Permission is hereby granted, free of charge, to any person\n* obtaining a copy of this software and associated documentation\n* files (the \"Software\"), to deal in the Software without\n* restriction, including without limitation the rights to use,\n* copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the\n* Software is furnished to do so, subject to the following\n* conditions:\n*\n* The above copyright notice and this permission notice shall be\n* included in all copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n* OTHER DEALINGS IN THE SOFTWARE.\n*/\nvar mulTable = [512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456, 451, 446, 442, 437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388, 385, 381, 377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335, 332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292, 289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259];\nvar shgTable = [9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24];\n/**\n * @param {string|HTMLImageElement} img\n * @param {string|HTMLCanvasElement} canvas\n * @param {Float} radius\n * @param {boolean} blurAlphaChannel\n * @param {boolean} useOffset\n * @param {boolean} skipStyles\n * @returns {undefined}\n */\n\nfunction processImage(img, canvas, radius, blurAlphaChannel, useOffset, skipStyles) {\n if (typeof img === 'string') {\n img = document.getElementById(img);\n }\n\n if (!img || Object.prototype.toString.call(img).slice(8, -1) === 'HTMLImageElement' && !('naturalWidth' in img)) {\n return;\n }\n\n var dimensionType = useOffset ? 'offset' : 'natural';\n var w = img[dimensionType + 'Width'];\n var h = img[dimensionType + 'Height']; // add ImageBitmap support,can blur texture source\n\n if (Object.prototype.toString.call(img).slice(8, -1) === 'ImageBitmap') {\n w = img.width;\n h = img.height;\n }\n\n if (typeof canvas === 'string') {\n canvas = document.getElementById(canvas);\n }\n\n if (!canvas || !('getContext' in canvas)) {\n return;\n }\n\n if (!skipStyles) {\n canvas.style.width = w + 'px';\n canvas.style.height = h + 'px';\n }\n\n canvas.width = w;\n canvas.height = h;\n var context = canvas.getContext('2d');\n context.clearRect(0, 0, w, h);\n context.drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight, 0, 0, w, h);\n\n if (isNaN(radius) || radius < 1) {\n return;\n }\n\n if (blurAlphaChannel) {\n processCanvasRGBA(canvas, 0, 0, w, h, radius);\n } else {\n processCanvasRGB(canvas, 0, 0, w, h, radius);\n }\n}\n/**\n * @param {string|HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @throws {Error|TypeError}\n * @returns {ImageData} See {@link https://html.spec.whatwg.org/multipage/canvas.html#imagedata}\n */\n\n\nfunction getImageDataFromCanvas(canvas, topX, topY, width, height) {\n if (typeof canvas === 'string') {\n canvas = document.getElementById(canvas);\n }\n\n if (!canvas || _typeof(canvas) !== 'object' || !('getContext' in canvas)) {\n throw new TypeError('Expecting canvas with `getContext` method ' + 'in processCanvasRGB(A) calls!');\n }\n\n var context = canvas.getContext('2d');\n\n try {\n return context.getImageData(topX, topY, width, height);\n } catch (e) {\n throw new Error('unable to access image data: ' + e);\n }\n}\n/**\n * @param {HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {undefined}\n */\n\n\nfunction processCanvasRGBA(canvas, topX, topY, width, height, radius) {\n if (isNaN(radius) || radius < 1) {\n return;\n }\n\n radius |= 0;\n var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);\n imageData = processImageDataRGBA(imageData, topX, topY, width, height, radius);\n canvas.getContext('2d').putImageData(imageData, topX, topY);\n}\n/**\n * @param {ImageData} imageData\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {ImageData}\n */\n\n\nfunction processImageDataRGBA(imageData, topX, topY, width, height, radius) {\n var pixels = imageData.data;\n var div = 2 * radius + 1; // const w4 = width << 2;\n\n var widthMinus1 = width - 1;\n var heightMinus1 = height - 1;\n var radiusPlus1 = radius + 1;\n var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;\n var stackStart = new BlurStack();\n var stack = stackStart;\n var stackEnd;\n\n for (var i = 1; i < div; i++) {\n stack = stack.next = new BlurStack();\n\n if (i === radiusPlus1) {\n stackEnd = stack;\n }\n }\n\n stack.next = stackStart;\n var stackIn = null,\n stackOut = null,\n yw = 0,\n yi = 0;\n var mulSum = mulTable[radius];\n var shgSum = shgTable[radius];\n\n for (var y = 0; y < height; y++) {\n stack = stackStart;\n var pr = pixels[yi],\n pg = pixels[yi + 1],\n pb = pixels[yi + 2],\n pa = pixels[yi + 3];\n\n for (var _i = 0; _i < radiusPlus1; _i++) {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack.a = pa;\n stack = stack.next;\n }\n\n var rInSum = 0,\n gInSum = 0,\n bInSum = 0,\n aInSum = 0,\n rOutSum = radiusPlus1 * pr,\n gOutSum = radiusPlus1 * pg,\n bOutSum = radiusPlus1 * pb,\n aOutSum = radiusPlus1 * pa,\n rSum = sumFactor * pr,\n gSum = sumFactor * pg,\n bSum = sumFactor * pb,\n aSum = sumFactor * pa;\n\n for (var _i2 = 1; _i2 < radiusPlus1; _i2++) {\n var p = yi + ((widthMinus1 < _i2 ? widthMinus1 : _i2) << 2);\n var r = pixels[p],\n g = pixels[p + 1],\n b = pixels[p + 2],\n a = pixels[p + 3];\n var rbs = radiusPlus1 - _i2;\n rSum += (stack.r = r) * rbs;\n gSum += (stack.g = g) * rbs;\n bSum += (stack.b = b) * rbs;\n aSum += (stack.a = a) * rbs;\n rInSum += r;\n gInSum += g;\n bInSum += b;\n aInSum += a;\n stack = stack.next;\n }\n\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var x = 0; x < width; x++) {\n var paInitial = aSum * mulSum >>> shgSum;\n pixels[yi + 3] = paInitial;\n\n if (paInitial !== 0) {\n var _a2 = 255 / paInitial;\n\n pixels[yi] = (rSum * mulSum >>> shgSum) * _a2;\n pixels[yi + 1] = (gSum * mulSum >>> shgSum) * _a2;\n pixels[yi + 2] = (bSum * mulSum >>> shgSum) * _a2;\n } else {\n pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;\n }\n\n rSum -= rOutSum;\n gSum -= gOutSum;\n bSum -= bOutSum;\n aSum -= aOutSum;\n rOutSum -= stackIn.r;\n gOutSum -= stackIn.g;\n bOutSum -= stackIn.b;\n aOutSum -= stackIn.a;\n\n var _p = x + radius + 1;\n\n _p = yw + (_p < widthMinus1 ? _p : widthMinus1) << 2;\n rInSum += stackIn.r = pixels[_p];\n gInSum += stackIn.g = pixels[_p + 1];\n bInSum += stackIn.b = pixels[_p + 2];\n aInSum += stackIn.a = pixels[_p + 3];\n rSum += rInSum;\n gSum += gInSum;\n bSum += bInSum;\n aSum += aInSum;\n stackIn = stackIn.next;\n var _stackOut = stackOut,\n _r = _stackOut.r,\n _g = _stackOut.g,\n _b = _stackOut.b,\n _a = _stackOut.a;\n rOutSum += _r;\n gOutSum += _g;\n bOutSum += _b;\n aOutSum += _a;\n rInSum -= _r;\n gInSum -= _g;\n bInSum -= _b;\n aInSum -= _a;\n stackOut = stackOut.next;\n yi += 4;\n }\n\n yw += width;\n }\n\n for (var _x = 0; _x < width; _x++) {\n yi = _x << 2;\n\n var _pr = pixels[yi],\n _pg = pixels[yi + 1],\n _pb = pixels[yi + 2],\n _pa = pixels[yi + 3],\n _rOutSum = radiusPlus1 * _pr,\n _gOutSum = radiusPlus1 * _pg,\n _bOutSum = radiusPlus1 * _pb,\n _aOutSum = radiusPlus1 * _pa,\n _rSum = sumFactor * _pr,\n _gSum = sumFactor * _pg,\n _bSum = sumFactor * _pb,\n _aSum = sumFactor * _pa;\n\n stack = stackStart;\n\n for (var _i3 = 0; _i3 < radiusPlus1; _i3++) {\n stack.r = _pr;\n stack.g = _pg;\n stack.b = _pb;\n stack.a = _pa;\n stack = stack.next;\n }\n\n var yp = width;\n var _gInSum = 0,\n _bInSum = 0,\n _aInSum = 0,\n _rInSum = 0;\n\n for (var _i4 = 1; _i4 <= radius; _i4++) {\n yi = yp + _x << 2;\n\n var _rbs = radiusPlus1 - _i4;\n\n _rSum += (stack.r = _pr = pixels[yi]) * _rbs;\n _gSum += (stack.g = _pg = pixels[yi + 1]) * _rbs;\n _bSum += (stack.b = _pb = pixels[yi + 2]) * _rbs;\n _aSum += (stack.a = _pa = pixels[yi + 3]) * _rbs;\n _rInSum += _pr;\n _gInSum += _pg;\n _bInSum += _pb;\n _aInSum += _pa;\n stack = stack.next;\n\n if (_i4 < heightMinus1) {\n yp += width;\n }\n }\n\n yi = _x;\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var _y = 0; _y < height; _y++) {\n var _p2 = yi << 2;\n\n pixels[_p2 + 3] = _pa = _aSum * mulSum >>> shgSum;\n\n if (_pa > 0) {\n _pa = 255 / _pa;\n pixels[_p2] = (_rSum * mulSum >>> shgSum) * _pa;\n pixels[_p2 + 1] = (_gSum * mulSum >>> shgSum) * _pa;\n pixels[_p2 + 2] = (_bSum * mulSum >>> shgSum) * _pa;\n } else {\n pixels[_p2] = pixels[_p2 + 1] = pixels[_p2 + 2] = 0;\n }\n\n _rSum -= _rOutSum;\n _gSum -= _gOutSum;\n _bSum -= _bOutSum;\n _aSum -= _aOutSum;\n _rOutSum -= stackIn.r;\n _gOutSum -= stackIn.g;\n _bOutSum -= stackIn.b;\n _aOutSum -= stackIn.a;\n _p2 = _x + ((_p2 = _y + radiusPlus1) < heightMinus1 ? _p2 : heightMinus1) * width << 2;\n _rSum += _rInSum += stackIn.r = pixels[_p2];\n _gSum += _gInSum += stackIn.g = pixels[_p2 + 1];\n _bSum += _bInSum += stackIn.b = pixels[_p2 + 2];\n _aSum += _aInSum += stackIn.a = pixels[_p2 + 3];\n stackIn = stackIn.next;\n _rOutSum += _pr = stackOut.r;\n _gOutSum += _pg = stackOut.g;\n _bOutSum += _pb = stackOut.b;\n _aOutSum += _pa = stackOut.a;\n _rInSum -= _pr;\n _gInSum -= _pg;\n _bInSum -= _pb;\n _aInSum -= _pa;\n stackOut = stackOut.next;\n yi += width;\n }\n }\n\n return imageData;\n}\n/**\n * @param {HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {undefined}\n */\n\n\nfunction processCanvasRGB(canvas, topX, topY, width, height, radius) {\n if (isNaN(radius) || radius < 1) {\n return;\n }\n\n radius |= 0;\n var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);\n imageData = processImageDataRGB(imageData, topX, topY, width, height, radius);\n canvas.getContext('2d').putImageData(imageData, topX, topY);\n}\n/**\n * @param {ImageData} imageData\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {ImageData}\n */\n\n\nfunction processImageDataRGB(imageData, topX, topY, width, height, radius) {\n var pixels = imageData.data;\n var div = 2 * radius + 1; // const w4 = width << 2;\n\n var widthMinus1 = width - 1;\n var heightMinus1 = height - 1;\n var radiusPlus1 = radius + 1;\n var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;\n var stackStart = new BlurStack();\n var stack = stackStart;\n var stackEnd;\n\n for (var i = 1; i < div; i++) {\n stack = stack.next = new BlurStack();\n\n if (i === radiusPlus1) {\n stackEnd = stack;\n }\n }\n\n stack.next = stackStart;\n var stackIn = null;\n var stackOut = null;\n var mulSum = mulTable[radius];\n var shgSum = shgTable[radius];\n var p, rbs;\n var yw = 0,\n yi = 0;\n\n for (var y = 0; y < height; y++) {\n var pr = pixels[yi],\n pg = pixels[yi + 1],\n pb = pixels[yi + 2],\n rOutSum = radiusPlus1 * pr,\n gOutSum = radiusPlus1 * pg,\n bOutSum = radiusPlus1 * pb,\n rSum = sumFactor * pr,\n gSum = sumFactor * pg,\n bSum = sumFactor * pb;\n stack = stackStart;\n\n for (var _i5 = 0; _i5 < radiusPlus1; _i5++) {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack = stack.next;\n }\n\n var rInSum = 0,\n gInSum = 0,\n bInSum = 0;\n\n for (var _i6 = 1; _i6 < radiusPlus1; _i6++) {\n p = yi + ((widthMinus1 < _i6 ? widthMinus1 : _i6) << 2);\n rSum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - _i6);\n gSum += (stack.g = pg = pixels[p + 1]) * rbs;\n bSum += (stack.b = pb = pixels[p + 2]) * rbs;\n rInSum += pr;\n gInSum += pg;\n bInSum += pb;\n stack = stack.next;\n }\n\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var x = 0; x < width; x++) {\n pixels[yi] = rSum * mulSum >>> shgSum;\n pixels[yi + 1] = gSum * mulSum >>> shgSum;\n pixels[yi + 2] = bSum * mulSum >>> shgSum;\n rSum -= rOutSum;\n gSum -= gOutSum;\n bSum -= bOutSum;\n rOutSum -= stackIn.r;\n gOutSum -= stackIn.g;\n bOutSum -= stackIn.b;\n p = yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1) << 2;\n rInSum += stackIn.r = pixels[p];\n gInSum += stackIn.g = pixels[p + 1];\n bInSum += stackIn.b = pixels[p + 2];\n rSum += rInSum;\n gSum += gInSum;\n bSum += bInSum;\n stackIn = stackIn.next;\n rOutSum += pr = stackOut.r;\n gOutSum += pg = stackOut.g;\n bOutSum += pb = stackOut.b;\n rInSum -= pr;\n gInSum -= pg;\n bInSum -= pb;\n stackOut = stackOut.next;\n yi += 4;\n }\n\n yw += width;\n }\n\n for (var _x2 = 0; _x2 < width; _x2++) {\n yi = _x2 << 2;\n\n var _pr2 = pixels[yi],\n _pg2 = pixels[yi + 1],\n _pb2 = pixels[yi + 2],\n _rOutSum2 = radiusPlus1 * _pr2,\n _gOutSum2 = radiusPlus1 * _pg2,\n _bOutSum2 = radiusPlus1 * _pb2,\n _rSum2 = sumFactor * _pr2,\n _gSum2 = sumFactor * _pg2,\n _bSum2 = sumFactor * _pb2;\n\n stack = stackStart;\n\n for (var _i7 = 0; _i7 < radiusPlus1; _i7++) {\n stack.r = _pr2;\n stack.g = _pg2;\n stack.b = _pb2;\n stack = stack.next;\n }\n\n var _rInSum2 = 0,\n _gInSum2 = 0,\n _bInSum2 = 0;\n\n for (var _i8 = 1, yp = width; _i8 <= radius; _i8++) {\n yi = yp + _x2 << 2;\n _rSum2 += (stack.r = _pr2 = pixels[yi]) * (rbs = radiusPlus1 - _i8);\n _gSum2 += (stack.g = _pg2 = pixels[yi + 1]) * rbs;\n _bSum2 += (stack.b = _pb2 = pixels[yi + 2]) * rbs;\n _rInSum2 += _pr2;\n _gInSum2 += _pg2;\n _bInSum2 += _pb2;\n stack = stack.next;\n\n if (_i8 < heightMinus1) {\n yp += width;\n }\n }\n\n yi = _x2;\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var _y2 = 0; _y2 < height; _y2++) {\n p = yi << 2;\n pixels[p] = _rSum2 * mulSum >>> shgSum;\n pixels[p + 1] = _gSum2 * mulSum >>> shgSum;\n pixels[p + 2] = _bSum2 * mulSum >>> shgSum;\n _rSum2 -= _rOutSum2;\n _gSum2 -= _gOutSum2;\n _bSum2 -= _bOutSum2;\n _rOutSum2 -= stackIn.r;\n _gOutSum2 -= stackIn.g;\n _bOutSum2 -= stackIn.b;\n p = _x2 + ((p = _y2 + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width << 2;\n _rSum2 += _rInSum2 += stackIn.r = pixels[p];\n _gSum2 += _gInSum2 += stackIn.g = pixels[p + 1];\n _bSum2 += _bInSum2 += stackIn.b = pixels[p + 2];\n stackIn = stackIn.next;\n _rOutSum2 += _pr2 = stackOut.r;\n _gOutSum2 += _pg2 = stackOut.g;\n _bOutSum2 += _pb2 = stackOut.b;\n _rInSum2 -= _pr2;\n _gInSum2 -= _pg2;\n _bInSum2 -= _pb2;\n stackOut = stackOut.next;\n yi += width;\n }\n }\n\n return imageData;\n}\n/**\n *\n */\n\n\nvar BlurStack =\n/**\n * Set properties.\n */\nfunction BlurStack() {\n _classCallCheck(this, BlurStack);\n\n this.r = 0;\n this.g = 0;\n this.b = 0;\n this.a = 0;\n this.next = null;\n};\n\nexport { BlurStack, processCanvasRGB as canvasRGB, processCanvasRGBA as canvasRGBA, processImage as image, processImageDataRGB as imageDataRGB, processImageDataRGBA as imageDataRGBA };\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar requestAnimationFrame = require('raf');\nvar RGBColor = require('rgbcolor');\nvar svgPathdata = require('svg-pathdata');\nvar stackblurCanvas = require('stackblur-canvas');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nvar requestAnimationFrame__default = /*#__PURE__*/_interopDefaultLegacy(requestAnimationFrame);\nvar RGBColor__default = /*#__PURE__*/_interopDefaultLegacy(RGBColor);\n\n/**\n * Options preset for `OffscreenCanvas`.\n * @param config - Preset requirements.\n * @param config.DOMParser - XML/HTML parser from string into DOM Document.\n * @returns Preset object.\n */ function offscreen() {\n let { DOMParser: DOMParserFallback } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n const preset = {\n window: null,\n ignoreAnimation: true,\n ignoreMouse: true,\n DOMParser: DOMParserFallback,\n createCanvas (width, height) {\n return new OffscreenCanvas(width, height);\n },\n async createImage (url) {\n const response = await fetch(url);\n const blob = await response.blob();\n const img = await createImageBitmap(blob);\n return img;\n }\n };\n if (typeof globalThis.DOMParser !== 'undefined' || typeof DOMParserFallback === 'undefined') {\n Reflect.deleteProperty(preset, 'DOMParser');\n }\n return preset;\n}\n\n/**\n * Options preset for `node-canvas`.\n * @param config - Preset requirements.\n * @param config.DOMParser - XML/HTML parser from string into DOM Document.\n * @param config.canvas - `node-canvas` exports.\n * @param config.fetch - WHATWG-compatible `fetch` function.\n * @returns Preset object.\n */ function node(param) {\n let { DOMParser , canvas , fetch } = param;\n return {\n window: null,\n ignoreAnimation: true,\n ignoreMouse: true,\n DOMParser,\n fetch,\n createCanvas: canvas.createCanvas,\n createImage: canvas.loadImage\n };\n}\n\nvar index = /*#__PURE__*/Object.freeze({\n __proto__: null,\n offscreen: offscreen,\n node: node\n});\n\n/**\n * HTML-safe compress white-spaces.\n * @param str - String to compress.\n * @returns String.\n */ function compressSpaces(str) {\n return str.replace(/(?!\\u3000)\\s+/gm, ' ');\n}\n/**\n * HTML-safe left trim.\n * @param str - String to trim.\n * @returns String.\n */ function trimLeft(str) {\n return str.replace(/^[\\n \\t]+/, '');\n}\n/**\n * HTML-safe right trim.\n * @param str - String to trim.\n * @returns String.\n */ function trimRight(str) {\n return str.replace(/[\\n \\t]+$/, '');\n}\n/**\n * String to numbers array.\n * @param str - Numbers string.\n * @returns Numbers array.\n */ function toNumbers(str) {\n const matches = str.match(/-?(\\d+(?:\\.\\d*(?:[eE][+-]?\\d+)?)?|\\.\\d+)(?=\\D|$)/gm);\n return matches ? matches.map(parseFloat) : [];\n}\n/**\n * String to matrix value.\n * @param str - Numbers string.\n * @returns Matrix value.\n */ function toMatrixValue(str) {\n const numbers = toNumbers(str);\n const matrix = [\n numbers[0] || 0,\n numbers[1] || 0,\n numbers[2] || 0,\n numbers[3] || 0,\n numbers[4] || 0,\n numbers[5] || 0\n ];\n return matrix;\n}\n// Microsoft Edge fix\nconst allUppercase = /^[A-Z-]+$/;\n/**\n * Normalize attribute name.\n * @param name - Attribute name.\n * @returns Normalized attribute name.\n */ function normalizeAttributeName(name) {\n if (allUppercase.test(name)) {\n return name.toLowerCase();\n }\n return name;\n}\n/**\n * Parse external URL.\n * @param url - CSS url string.\n * @returns Parsed URL.\n */ function parseExternalUrl(url) {\n // single quotes [2]\n // v double quotes [3]\n // v v no quotes [4]\n // v v v\n const urlMatch = /url\\(('([^']+)'|\"([^\"]+)\"|([^'\")]+))\\)/.exec(url);\n if (!urlMatch) {\n return '';\n }\n return urlMatch[2] || urlMatch[3] || urlMatch[4] || '';\n}\n/**\n * Transform floats to integers in rgb colors.\n * @param color - Color to normalize.\n * @returns Normalized color.\n */ function normalizeColor(color) {\n if (!color.startsWith('rgb')) {\n return color;\n }\n let rgbParts = 3;\n const normalizedColor = color.replace(/\\d+(\\.\\d+)?/g, (num, isFloat)=>(rgbParts--) && isFloat ? String(Math.round(parseFloat(num))) : num\n );\n return normalizedColor;\n}\n\n// slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js\nconst attributeRegex = /(\\[[^\\]]+\\])/g;\nconst idRegex = /(#[^\\s+>~.[:]+)/g;\nconst classRegex = /(\\.[^\\s+>~.[:]+)/g;\nconst pseudoElementRegex = /(::[^\\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi;\nconst pseudoClassWithBracketsRegex = /(:[\\w-]+\\([^)]*\\))/gi;\nconst pseudoClassRegex = /(:[^\\s+>~.[:]+)/g;\nconst elementRegex = /([^\\s+>~.[:]+)/g;\nfunction findSelectorMatch(selector, regex) {\n const matches = regex.exec(selector);\n if (!matches) {\n return [\n selector,\n 0\n ];\n }\n return [\n selector.replace(regex, ' '),\n matches.length\n ];\n}\n/**\n * Measure selector specificity.\n * @param selector - Selector to measure.\n * @returns Specificity.\n */ function getSelectorSpecificity(selector) {\n const specificity = [\n 0,\n 0,\n 0\n ];\n let currentSelector = selector.replace(/:not\\(([^)]*)\\)/g, ' $1 ').replace(/{[\\s\\S]*/gm, ' ');\n let delta = 0;\n [currentSelector, delta] = findSelectorMatch(currentSelector, attributeRegex);\n specificity[1] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, idRegex);\n specificity[0] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, classRegex);\n specificity[1] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoElementRegex);\n specificity[2] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoClassWithBracketsRegex);\n specificity[1] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoClassRegex);\n specificity[1] += delta;\n currentSelector = currentSelector.replace(/[*\\s+>~]/g, ' ').replace(/[#.]/g, ' ');\n [currentSelector, delta] = findSelectorMatch(currentSelector, elementRegex) // lgtm [js/useless-assignment-to-local]\n ;\n specificity[2] += delta;\n return specificity.join('');\n}\n\nconst PSEUDO_ZERO = 0.00000001;\n/**\n * Vector magnitude.\n * @param v\n * @returns Number result.\n */ function vectorMagnitude(v) {\n return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));\n}\n/**\n * Ratio between two vectors.\n * @param u\n * @param v\n * @returns Number result.\n */ function vectorsRatio(u, v) {\n return (u[0] * v[0] + u[1] * v[1]) / (vectorMagnitude(u) * vectorMagnitude(v));\n}\n/**\n * Angle between two vectors.\n * @param u\n * @param v\n * @returns Number result.\n */ function vectorsAngle(u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vectorsRatio(u, v));\n}\nfunction CB1(t) {\n return t * t * t;\n}\nfunction CB2(t) {\n return 3 * t * t * (1 - t);\n}\nfunction CB3(t) {\n return 3 * t * (1 - t) * (1 - t);\n}\nfunction CB4(t) {\n return (1 - t) * (1 - t) * (1 - t);\n}\nfunction QB1(t) {\n return t * t;\n}\nfunction QB2(t) {\n return 2 * t * (1 - t);\n}\nfunction QB3(t) {\n return (1 - t) * (1 - t);\n}\n\nclass Property {\n static empty(document) {\n return new Property(document, 'EMPTY', '');\n }\n split() {\n let separator = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ' ';\n const { document , name } = this;\n return compressSpaces(this.getString()).trim().split(separator).map((value)=>new Property(document, name, value)\n );\n }\n hasValue(zeroIsValue) {\n const value = this.value;\n return value !== null && value !== '' && (zeroIsValue || value !== 0) && typeof value !== 'undefined';\n }\n isString(regexp) {\n const { value } = this;\n const result = typeof value === 'string';\n if (!result || !regexp) {\n return result;\n }\n return regexp.test(value);\n }\n isUrlDefinition() {\n return this.isString(/^url\\(/);\n }\n isPixels() {\n if (!this.hasValue()) {\n return false;\n }\n const asString = this.getString();\n switch(true){\n case asString.endsWith('px'):\n case /^[0-9]+$/.test(asString):\n return true;\n default:\n return false;\n }\n }\n setValue(value) {\n this.value = value;\n return this;\n }\n getValue(def) {\n if (typeof def === 'undefined' || this.hasValue()) {\n return this.value;\n }\n return def;\n }\n getNumber(def) {\n if (!this.hasValue()) {\n if (typeof def === 'undefined') {\n return 0;\n }\n // @ts-expect-error Parse unknown value.\n return parseFloat(def);\n }\n const { value } = this;\n // @ts-expect-error Parse unknown value.\n let n = parseFloat(value);\n if (this.isString(/%$/)) {\n n /= 100;\n }\n return n;\n }\n getString(def) {\n if (typeof def === 'undefined' || this.hasValue()) {\n return typeof this.value === 'undefined' ? '' : String(this.value);\n }\n return String(def);\n }\n getColor(def) {\n let color = this.getString(def);\n if (this.isNormalizedColor) {\n return color;\n }\n this.isNormalizedColor = true;\n color = normalizeColor(color);\n this.value = color;\n return color;\n }\n getDpi() {\n return 96 // TODO: compute?\n ;\n }\n getRem() {\n return this.document.rootEmSize;\n }\n getEm() {\n return this.document.emSize;\n }\n getUnits() {\n return this.getString().replace(/[0-9.-]/g, '');\n }\n getPixels(axisOrIsFontSize) {\n let processPercent = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n if (!this.hasValue()) {\n return 0;\n }\n const [axis, isFontSize] = typeof axisOrIsFontSize === 'boolean' ? [\n undefined,\n axisOrIsFontSize\n ] : [\n axisOrIsFontSize\n ];\n const { viewPort } = this.document.screen;\n switch(true){\n case this.isString(/vmin$/):\n return this.getNumber() / 100 * Math.min(viewPort.computeSize('x'), viewPort.computeSize('y'));\n case this.isString(/vmax$/):\n return this.getNumber() / 100 * Math.max(viewPort.computeSize('x'), viewPort.computeSize('y'));\n case this.isString(/vw$/):\n return this.getNumber() / 100 * viewPort.computeSize('x');\n case this.isString(/vh$/):\n return this.getNumber() / 100 * viewPort.computeSize('y');\n case this.isString(/rem$/):\n return this.getNumber() * this.getRem();\n case this.isString(/em$/):\n return this.getNumber() * this.getEm();\n case this.isString(/ex$/):\n return this.getNumber() * this.getEm() / 2;\n case this.isString(/px$/):\n return this.getNumber();\n case this.isString(/pt$/):\n return this.getNumber() * this.getDpi() * (1 / 72);\n case this.isString(/pc$/):\n return this.getNumber() * 15;\n case this.isString(/cm$/):\n return this.getNumber() * this.getDpi() / 2.54;\n case this.isString(/mm$/):\n return this.getNumber() * this.getDpi() / 25.4;\n case this.isString(/in$/):\n return this.getNumber() * this.getDpi();\n case this.isString(/%$/) && isFontSize:\n return this.getNumber() * this.getEm();\n case this.isString(/%$/):\n return this.getNumber() * viewPort.computeSize(axis);\n default:\n {\n const n = this.getNumber();\n if (processPercent && n < 1) {\n return n * viewPort.computeSize(axis);\n }\n return n;\n }\n }\n }\n getMilliseconds() {\n if (!this.hasValue()) {\n return 0;\n }\n if (this.isString(/ms$/)) {\n return this.getNumber();\n }\n return this.getNumber() * 1000;\n }\n getRadians() {\n if (!this.hasValue()) {\n return 0;\n }\n switch(true){\n case this.isString(/deg$/):\n return this.getNumber() * (Math.PI / 180);\n case this.isString(/grad$/):\n return this.getNumber() * (Math.PI / 200);\n case this.isString(/rad$/):\n return this.getNumber();\n default:\n return this.getNumber() * (Math.PI / 180);\n }\n }\n getDefinition() {\n const asString = this.getString();\n const match = /#([^)'\"]+)/.exec(asString);\n const name = (match === null || match === void 0 ? void 0 : match[1]) || asString;\n return this.document.definitions[name];\n }\n getFillStyleDefinition(element, opacity) {\n let def = this.getDefinition();\n if (!def) {\n return null;\n }\n // gradient\n if (typeof def.createGradient === 'function' && 'getBoundingBox' in element) {\n return def.createGradient(this.document.ctx, element, opacity);\n }\n // pattern\n if (typeof def.createPattern === 'function') {\n if (def.getHrefAttribute().hasValue()) {\n const patternTransform = def.getAttribute('patternTransform');\n def = def.getHrefAttribute().getDefinition();\n if (def && patternTransform.hasValue()) {\n def.getAttribute('patternTransform', true).setValue(patternTransform.value);\n }\n }\n if (def) {\n return def.createPattern(this.document.ctx, element, opacity);\n }\n }\n return null;\n }\n getTextBaseline() {\n if (!this.hasValue()) {\n return null;\n }\n const key = this.getString();\n return Property.textBaselineMapping[key] || null;\n }\n addOpacity(opacity) {\n let value = this.getColor();\n const len = value.length;\n let commas = 0;\n // Simulate old RGBColor version, which can't parse rgba.\n for(let i = 0; i < len; i++){\n if (value[i] === ',') {\n commas++;\n }\n if (commas === 3) {\n break;\n }\n }\n if (opacity.hasValue() && this.isString() && commas !== 3) {\n const color = new RGBColor__default[\"default\"](value);\n if (color.ok) {\n color.alpha = opacity.getNumber();\n value = color.toRGBA();\n }\n }\n return new Property(this.document, this.name, value);\n }\n constructor(document, name, value){\n this.document = document;\n this.name = name;\n this.value = value;\n this.isNormalizedColor = false;\n }\n}\nProperty.textBaselineMapping = {\n 'baseline': 'alphabetic',\n 'before-edge': 'top',\n 'text-before-edge': 'top',\n 'middle': 'middle',\n 'central': 'middle',\n 'after-edge': 'bottom',\n 'text-after-edge': 'bottom',\n 'ideographic': 'ideographic',\n 'alphabetic': 'alphabetic',\n 'hanging': 'hanging',\n 'mathematical': 'alphabetic'\n};\n\nclass ViewPort {\n clear() {\n this.viewPorts = [];\n }\n setCurrent(width, height) {\n this.viewPorts.push({\n width,\n height\n });\n }\n removeCurrent() {\n this.viewPorts.pop();\n }\n getRoot() {\n const [root] = this.viewPorts;\n if (!root) {\n return getDefault();\n }\n return root;\n }\n getCurrent() {\n const { viewPorts } = this;\n const current = viewPorts[viewPorts.length - 1];\n if (!current) {\n return getDefault();\n }\n return current;\n }\n get width() {\n return this.getCurrent().width;\n }\n get height() {\n return this.getCurrent().height;\n }\n computeSize(d) {\n if (typeof d === 'number') {\n return d;\n }\n if (d === 'x') {\n return this.width;\n }\n if (d === 'y') {\n return this.height;\n }\n return Math.sqrt(Math.pow(this.width, 2) + Math.pow(this.height, 2)) / Math.sqrt(2);\n }\n constructor(){\n this.viewPorts = [];\n }\n}\nViewPort.DEFAULT_VIEWPORT_WIDTH = 800;\nViewPort.DEFAULT_VIEWPORT_HEIGHT = 600;\nfunction getDefault() {\n return {\n width: ViewPort.DEFAULT_VIEWPORT_WIDTH,\n height: ViewPort.DEFAULT_VIEWPORT_HEIGHT\n };\n}\n\nclass Point {\n static parse(point) {\n let defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;\n const [x = defaultValue, y = defaultValue] = toNumbers(point);\n return new Point(x, y);\n }\n static parseScale(scale) {\n let defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;\n const [x = defaultValue, y = x] = toNumbers(scale);\n return new Point(x, y);\n }\n static parsePath(path) {\n const points = toNumbers(path);\n const len = points.length;\n const pathPoints = [];\n for(let i = 0; i < len; i += 2){\n pathPoints.push(new Point(points[i], points[i + 1]));\n }\n return pathPoints;\n }\n angleTo(point) {\n return Math.atan2(point.y - this.y, point.x - this.x);\n }\n applyTransform(transform) {\n const { x , y } = this;\n const xp = x * transform[0] + y * transform[2] + transform[4];\n const yp = x * transform[1] + y * transform[3] + transform[5];\n this.x = xp;\n this.y = yp;\n }\n constructor(x, y){\n this.x = x;\n this.y = y;\n }\n}\n\nclass Mouse {\n isWorking() {\n return this.working;\n }\n start() {\n if (this.working) {\n return;\n }\n const { screen , onClick , onMouseMove } = this;\n const canvas = screen.ctx.canvas;\n canvas.onclick = onClick;\n canvas.onmousemove = onMouseMove;\n this.working = true;\n }\n stop() {\n if (!this.working) {\n return;\n }\n const canvas = this.screen.ctx.canvas;\n this.working = false;\n canvas.onclick = null;\n canvas.onmousemove = null;\n }\n hasEvents() {\n return this.working && this.events.length > 0;\n }\n runEvents() {\n if (!this.working) {\n return;\n }\n const { screen: document , events , eventElements } = this;\n const { style } = document.ctx.canvas;\n let element;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (style) {\n style.cursor = '';\n }\n events.forEach((param, i)=>{\n let { run } = param;\n element = eventElements[i];\n while(element){\n run(element);\n element = element.parent;\n }\n });\n // done running, clear\n this.events = [];\n this.eventElements = [];\n }\n checkPath(element, ctx) {\n if (!this.working || !ctx) {\n return;\n }\n const { events , eventElements } = this;\n events.forEach((param, i)=>{\n let { x , y } = param;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!eventElements[i] && ctx.isPointInPath && ctx.isPointInPath(x, y)) {\n eventElements[i] = element;\n }\n });\n }\n checkBoundingBox(element, boundingBox) {\n if (!this.working || !boundingBox) {\n return;\n }\n const { events , eventElements } = this;\n events.forEach((param, i)=>{\n let { x , y } = param;\n if (!eventElements[i] && boundingBox.isPointInBox(x, y)) {\n eventElements[i] = element;\n }\n });\n }\n mapXY(x, y) {\n const { window , ctx } = this.screen;\n const point = new Point(x, y);\n let element = ctx.canvas;\n while(element){\n point.x -= element.offsetLeft;\n point.y -= element.offsetTop;\n element = element.offsetParent;\n }\n if (window === null || window === void 0 ? void 0 : window.scrollX) {\n point.x += window.scrollX;\n }\n if (window === null || window === void 0 ? void 0 : window.scrollY) {\n point.y += window.scrollY;\n }\n return point;\n }\n onClick(event) {\n const { x , y } = this.mapXY(event.clientX, event.clientY);\n this.events.push({\n type: 'onclick',\n x,\n y,\n run (eventTarget) {\n if (eventTarget.onClick) {\n eventTarget.onClick();\n }\n }\n });\n }\n onMouseMove(event) {\n const { x , y } = this.mapXY(event.clientX, event.clientY);\n this.events.push({\n type: 'onmousemove',\n x,\n y,\n run (eventTarget) {\n if (eventTarget.onMouseMove) {\n eventTarget.onMouseMove();\n }\n }\n });\n }\n constructor(screen){\n this.screen = screen;\n this.working = false;\n this.events = [];\n this.eventElements = [];\n this.onClick = this.onClick.bind(this);\n this.onMouseMove = this.onMouseMove.bind(this);\n }\n}\n\nconst defaultWindow = typeof window !== 'undefined' ? window : null;\nconst defaultFetch$1 = typeof fetch !== 'undefined' ? fetch.bind(undefined) // `fetch` depends on context: `someObject.fetch(...)` will throw error.\n : undefined;\nclass Screen {\n wait(checker) {\n this.waits.push(checker);\n }\n ready() {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (!this.readyPromise) {\n return Promise.resolve();\n }\n return this.readyPromise;\n }\n isReady() {\n if (this.isReadyLock) {\n return true;\n }\n const isReadyLock = this.waits.every((_)=>_()\n );\n if (isReadyLock) {\n this.waits = [];\n if (this.resolveReady) {\n this.resolveReady();\n }\n }\n this.isReadyLock = isReadyLock;\n return isReadyLock;\n }\n setDefaults(ctx) {\n // initial values and defaults\n ctx.strokeStyle = 'rgba(0,0,0,0)';\n ctx.lineCap = 'butt';\n ctx.lineJoin = 'miter';\n ctx.miterLimit = 4;\n }\n setViewBox(param) {\n let { document , ctx , aspectRatio , width , desiredWidth , height , desiredHeight , minX =0 , minY =0 , refX , refY , clip =false , clipX =0 , clipY =0 } = param;\n // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute\n const cleanAspectRatio = compressSpaces(aspectRatio).replace(/^defer\\s/, '') // ignore defer\n ;\n const [aspectRatioAlign, aspectRatioMeetOrSlice] = cleanAspectRatio.split(' ');\n const align = aspectRatioAlign || 'xMidYMid';\n const meetOrSlice = aspectRatioMeetOrSlice || 'meet';\n // calculate scale\n const scaleX = width / desiredWidth;\n const scaleY = height / desiredHeight;\n const scaleMin = Math.min(scaleX, scaleY);\n const scaleMax = Math.max(scaleX, scaleY);\n let finalDesiredWidth = desiredWidth;\n let finalDesiredHeight = desiredHeight;\n if (meetOrSlice === 'meet') {\n finalDesiredWidth *= scaleMin;\n finalDesiredHeight *= scaleMin;\n }\n if (meetOrSlice === 'slice') {\n finalDesiredWidth *= scaleMax;\n finalDesiredHeight *= scaleMax;\n }\n const refXProp = new Property(document, 'refX', refX);\n const refYProp = new Property(document, 'refY', refY);\n const hasRefs = refXProp.hasValue() && refYProp.hasValue();\n if (hasRefs) {\n ctx.translate(-scaleMin * refXProp.getPixels('x'), -scaleMin * refYProp.getPixels('y'));\n }\n if (clip) {\n const scaledClipX = scaleMin * clipX;\n const scaledClipY = scaleMin * clipY;\n ctx.beginPath();\n ctx.moveTo(scaledClipX, scaledClipY);\n ctx.lineTo(width, scaledClipY);\n ctx.lineTo(width, height);\n ctx.lineTo(scaledClipX, height);\n ctx.closePath();\n ctx.clip();\n }\n if (!hasRefs) {\n const isMeetMinY = meetOrSlice === 'meet' && scaleMin === scaleY;\n const isSliceMaxY = meetOrSlice === 'slice' && scaleMax === scaleY;\n const isMeetMinX = meetOrSlice === 'meet' && scaleMin === scaleX;\n const isSliceMaxX = meetOrSlice === 'slice' && scaleMax === scaleX;\n if (align.startsWith('xMid') && (isMeetMinY || isSliceMaxY)) {\n ctx.translate(width / 2 - finalDesiredWidth / 2, 0);\n }\n if (align.endsWith('YMid') && (isMeetMinX || isSliceMaxX)) {\n ctx.translate(0, height / 2 - finalDesiredHeight / 2);\n }\n if (align.startsWith('xMax') && (isMeetMinY || isSliceMaxY)) {\n ctx.translate(width - finalDesiredWidth, 0);\n }\n if (align.endsWith('YMax') && (isMeetMinX || isSliceMaxX)) {\n ctx.translate(0, height - finalDesiredHeight);\n }\n }\n // scale\n switch(true){\n case align === 'none':\n ctx.scale(scaleX, scaleY);\n break;\n case meetOrSlice === 'meet':\n ctx.scale(scaleMin, scaleMin);\n break;\n case meetOrSlice === 'slice':\n ctx.scale(scaleMax, scaleMax);\n break;\n }\n // translate\n ctx.translate(-minX, -minY);\n }\n start(element) {\n let { enableRedraw =false , ignoreMouse =false , ignoreAnimation =false , ignoreDimensions =false , ignoreClear =false , forceRedraw , scaleWidth , scaleHeight , offsetX , offsetY } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n const { mouse } = this;\n const frameDuration = 1000 / Screen.FRAMERATE;\n this.isReadyLock = false;\n this.frameDuration = frameDuration;\n this.readyPromise = new Promise((resolve)=>{\n this.resolveReady = resolve;\n });\n if (this.isReady()) {\n this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);\n }\n if (!enableRedraw) {\n return;\n }\n let now = Date.now();\n let then = now;\n let delta = 0;\n const tick = ()=>{\n now = Date.now();\n delta = now - then;\n if (delta >= frameDuration) {\n then = now - delta % frameDuration;\n if (this.shouldUpdate(ignoreAnimation, forceRedraw)) {\n this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);\n mouse.runEvents();\n }\n }\n this.intervalId = requestAnimationFrame__default[\"default\"](tick);\n };\n if (!ignoreMouse) {\n mouse.start();\n }\n this.intervalId = requestAnimationFrame__default[\"default\"](tick);\n }\n stop() {\n if (this.intervalId) {\n requestAnimationFrame__default[\"default\"].cancel(this.intervalId);\n this.intervalId = null;\n }\n this.mouse.stop();\n }\n shouldUpdate(ignoreAnimation, forceRedraw) {\n // need update from animations?\n if (!ignoreAnimation) {\n const { frameDuration } = this;\n const shouldUpdate1 = this.animations.reduce((shouldUpdate, animation)=>animation.update(frameDuration) || shouldUpdate\n , false);\n if (shouldUpdate1) {\n return true;\n }\n }\n // need update from redraw?\n if (typeof forceRedraw === 'function' && forceRedraw()) {\n return true;\n }\n if (!this.isReadyLock && this.isReady()) {\n return true;\n }\n // need update from mouse events?\n if (this.mouse.hasEvents()) {\n return true;\n }\n return false;\n }\n render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY) {\n const { viewPort , ctx , isFirstRender } = this;\n const canvas = ctx.canvas;\n viewPort.clear();\n if (canvas.width && canvas.height) {\n viewPort.setCurrent(canvas.width, canvas.height);\n }\n const widthStyle = element.getStyle('width');\n const heightStyle = element.getStyle('height');\n if (!ignoreDimensions && (isFirstRender || typeof scaleWidth !== 'number' && typeof scaleHeight !== 'number')) {\n // set canvas size\n if (widthStyle.hasValue()) {\n canvas.width = widthStyle.getPixels('x');\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (canvas.style) {\n canvas.style.width = \"\".concat(canvas.width, \"px\");\n }\n }\n if (heightStyle.hasValue()) {\n canvas.height = heightStyle.getPixels('y');\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (canvas.style) {\n canvas.style.height = \"\".concat(canvas.height, \"px\");\n }\n }\n }\n let cWidth = canvas.clientWidth || canvas.width;\n let cHeight = canvas.clientHeight || canvas.height;\n if (ignoreDimensions && widthStyle.hasValue() && heightStyle.hasValue()) {\n cWidth = widthStyle.getPixels('x');\n cHeight = heightStyle.getPixels('y');\n }\n viewPort.setCurrent(cWidth, cHeight);\n if (typeof offsetX === 'number') {\n element.getAttribute('x', true).setValue(offsetX);\n }\n if (typeof offsetY === 'number') {\n element.getAttribute('y', true).setValue(offsetY);\n }\n if (typeof scaleWidth === 'number' || typeof scaleHeight === 'number') {\n const viewBox = toNumbers(element.getAttribute('viewBox').getString());\n let xRatio = 0;\n let yRatio = 0;\n if (typeof scaleWidth === 'number') {\n const widthStyle = element.getStyle('width');\n if (widthStyle.hasValue()) {\n xRatio = widthStyle.getPixels('x') / scaleWidth;\n } else if (viewBox[2] && !isNaN(viewBox[2])) {\n xRatio = viewBox[2] / scaleWidth;\n }\n }\n if (typeof scaleHeight === 'number') {\n const heightStyle = element.getStyle('height');\n if (heightStyle.hasValue()) {\n yRatio = heightStyle.getPixels('y') / scaleHeight;\n } else if (viewBox[3] && !isNaN(viewBox[3])) {\n yRatio = viewBox[3] / scaleHeight;\n }\n }\n if (!xRatio) {\n xRatio = yRatio;\n }\n if (!yRatio) {\n yRatio = xRatio;\n }\n element.getAttribute('width', true).setValue(scaleWidth);\n element.getAttribute('height', true).setValue(scaleHeight);\n const transformStyle = element.getStyle('transform', true, true);\n transformStyle.setValue(\"\".concat(transformStyle.getString(), \" scale(\").concat(1 / xRatio, \", \").concat(1 / yRatio, \")\"));\n }\n // clear and render\n if (!ignoreClear) {\n ctx.clearRect(0, 0, cWidth, cHeight);\n }\n element.render(ctx);\n if (isFirstRender) {\n this.isFirstRender = false;\n }\n }\n constructor(ctx, { fetch =defaultFetch$1 , window =defaultWindow } = {}){\n this.ctx = ctx;\n this.viewPort = new ViewPort();\n this.mouse = new Mouse(this);\n this.animations = [];\n this.waits = [];\n this.frameDuration = 0;\n this.isReadyLock = false;\n this.isFirstRender = true;\n this.intervalId = null;\n this.window = window;\n if (!fetch) {\n throw new Error(\"Can't find 'fetch' in 'globalThis', please provide it via options\");\n }\n this.fetch = fetch;\n }\n}\nScreen.defaultWindow = defaultWindow;\nScreen.defaultFetch = defaultFetch$1;\nScreen.FRAMERATE = 30;\nScreen.MAX_VIRTUAL_PIXELS = 30000;\n\nconst { defaultFetch } = Screen;\nconst DefaultDOMParser = typeof DOMParser !== 'undefined' ? DOMParser : undefined;\nclass Parser {\n async parse(resource) {\n if (resource.startsWith('<')) {\n return this.parseFromString(resource);\n }\n return this.load(resource);\n }\n parseFromString(xml) {\n const parser = new this.DOMParser();\n try {\n return this.checkDocument(parser.parseFromString(xml, 'image/svg+xml'));\n } catch (err) {\n return this.checkDocument(parser.parseFromString(xml, 'text/xml'));\n }\n }\n checkDocument(document) {\n const parserError = document.getElementsByTagName('parsererror')[0];\n if (parserError) {\n throw new Error(parserError.textContent || 'Unknown parse error');\n }\n return document;\n }\n async load(url) {\n const response = await this.fetch(url);\n const xml = await response.text();\n return this.parseFromString(xml);\n }\n constructor({ fetch =defaultFetch , DOMParser =DefaultDOMParser } = {}){\n if (!fetch) {\n throw new Error(\"Can't find 'fetch' in 'globalThis', please provide it via options\");\n }\n if (!DOMParser) {\n throw new Error(\"Can't find 'DOMParser' in 'globalThis', please provide it via options\");\n }\n this.fetch = fetch;\n this.DOMParser = DOMParser;\n }\n}\n\nclass Translate {\n apply(ctx) {\n const { x , y } = this.point;\n ctx.translate(x || 0, y || 0);\n }\n unapply(ctx) {\n const { x , y } = this.point;\n ctx.translate(-1 * x || 0, -1 * y || 0);\n }\n applyToPoint(point) {\n const { x , y } = this.point;\n point.applyTransform([\n 1,\n 0,\n 0,\n 1,\n x || 0,\n y || 0\n ]);\n }\n constructor(_, point){\n this.type = 'translate';\n this.point = Point.parse(point);\n }\n}\n\nclass Rotate {\n apply(ctx) {\n const { cx , cy , originX , originY , angle } = this;\n const tx = cx + originX.getPixels('x');\n const ty = cy + originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.rotate(angle.getRadians());\n ctx.translate(-tx, -ty);\n }\n unapply(ctx) {\n const { cx , cy , originX , originY , angle } = this;\n const tx = cx + originX.getPixels('x');\n const ty = cy + originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.rotate(-1 * angle.getRadians());\n ctx.translate(-tx, -ty);\n }\n applyToPoint(point) {\n const { cx , cy , angle } = this;\n const rad = angle.getRadians();\n point.applyTransform([\n 1,\n 0,\n 0,\n 1,\n cx || 0,\n cy || 0 // this.p.y\n ]);\n point.applyTransform([\n Math.cos(rad),\n Math.sin(rad),\n -Math.sin(rad),\n Math.cos(rad),\n 0,\n 0\n ]);\n point.applyTransform([\n 1,\n 0,\n 0,\n 1,\n -cx || 0,\n -cy || 0 // -this.p.y\n ]);\n }\n constructor(document, rotate, transformOrigin){\n this.type = 'rotate';\n const numbers = toNumbers(rotate);\n this.angle = new Property(document, 'angle', numbers[0]);\n this.originX = transformOrigin[0];\n this.originY = transformOrigin[1];\n this.cx = numbers[1] || 0;\n this.cy = numbers[2] || 0;\n }\n}\n\nclass Scale {\n apply(ctx) {\n const { scale: { x , y } , originX , originY } = this;\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.scale(x, y || x);\n ctx.translate(-tx, -ty);\n }\n unapply(ctx) {\n const { scale: { x , y } , originX , originY } = this;\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.scale(1 / x, 1 / y || x);\n ctx.translate(-tx, -ty);\n }\n applyToPoint(point) {\n const { x , y } = this.scale;\n point.applyTransform([\n x || 0,\n 0,\n 0,\n y || 0,\n 0,\n 0\n ]);\n }\n constructor(_, scale, transformOrigin){\n this.type = 'scale';\n const scaleSize = Point.parseScale(scale);\n // Workaround for node-canvas\n if (scaleSize.x === 0 || scaleSize.y === 0) {\n scaleSize.x = PSEUDO_ZERO;\n scaleSize.y = PSEUDO_ZERO;\n }\n this.scale = scaleSize;\n this.originX = transformOrigin[0];\n this.originY = transformOrigin[1];\n }\n}\n\nclass Matrix {\n apply(ctx) {\n const { originX , originY , matrix } = this;\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n ctx.translate(-tx, -ty);\n }\n unapply(ctx) {\n const { originX , originY , matrix } = this;\n const a = matrix[0];\n const b = matrix[2];\n const c = matrix[4];\n const d = matrix[1];\n const e = matrix[3];\n const f = matrix[5];\n const g = 0;\n const h = 0;\n const i = 1;\n const det = 1 / (a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g));\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.transform(det * (e * i - f * h), det * (f * g - d * i), det * (c * h - b * i), det * (a * i - c * g), det * (b * f - c * e), det * (c * d - a * f));\n ctx.translate(-tx, -ty);\n }\n applyToPoint(point) {\n point.applyTransform(this.matrix);\n }\n constructor(_, matrix, transformOrigin){\n this.type = 'matrix';\n this.matrix = toMatrixValue(matrix);\n this.originX = transformOrigin[0];\n this.originY = transformOrigin[1];\n }\n}\n\nclass Skew extends Matrix {\n constructor(document, skew, transformOrigin){\n super(document, skew, transformOrigin);\n this.type = 'skew';\n this.angle = new Property(document, 'angle', skew);\n }\n}\n\nclass SkewX extends Skew {\n constructor(document, skew, transformOrigin){\n super(document, skew, transformOrigin);\n this.type = 'skewX';\n this.matrix = [\n 1,\n 0,\n Math.tan(this.angle.getRadians()),\n 1,\n 0,\n 0\n ];\n }\n}\n\nclass SkewY extends Skew {\n constructor(document, skew, transformOrigin){\n super(document, skew, transformOrigin);\n this.type = 'skewY';\n this.matrix = [\n 1,\n Math.tan(this.angle.getRadians()),\n 0,\n 1,\n 0,\n 0\n ];\n }\n}\n\nfunction parseTransforms(transform) {\n return compressSpaces(transform).trim().replace(/\\)([a-zA-Z])/g, ') $1').replace(/\\)(\\s?,\\s?)/g, ') ').split(/\\s(?=[a-z])/);\n}\nfunction parseTransform(transform) {\n const [type = '', value = ''] = transform.split('(');\n return [\n type.trim(),\n value.trim().replace(')', '')\n ];\n}\nclass Transform {\n static fromElement(document, element) {\n const transformStyle = element.getStyle('transform', false, true);\n if (transformStyle.hasValue()) {\n const [transformOriginXProperty, transformOriginYProperty = transformOriginXProperty] = element.getStyle('transform-origin', false, true).split();\n if (transformOriginXProperty && transformOriginYProperty) {\n const transformOrigin = [\n transformOriginXProperty,\n transformOriginYProperty\n ];\n return new Transform(document, transformStyle.getString(), transformOrigin);\n }\n }\n return null;\n }\n apply(ctx) {\n this.transforms.forEach((transform)=>transform.apply(ctx)\n );\n }\n unapply(ctx) {\n this.transforms.forEach((transform)=>transform.unapply(ctx)\n );\n }\n // TODO: applyToPoint unused ... remove?\n applyToPoint(point) {\n this.transforms.forEach((transform)=>transform.applyToPoint(point)\n );\n }\n constructor(document, transform1, transformOrigin){\n this.document = document;\n this.transforms = [];\n const data = parseTransforms(transform1);\n data.forEach((transform)=>{\n if (transform === 'none') {\n return;\n }\n const [type, value] = parseTransform(transform);\n const TransformType = Transform.transformTypes[type];\n if (TransformType) {\n this.transforms.push(new TransformType(this.document, value, transformOrigin));\n }\n });\n }\n}\nTransform.transformTypes = {\n translate: Translate,\n rotate: Rotate,\n scale: Scale,\n matrix: Matrix,\n skewX: SkewX,\n skewY: SkewY\n};\n\nclass Element {\n getAttribute(name) {\n let createIfNotExists = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n const attr = this.attributes[name];\n if (!attr && createIfNotExists) {\n const attr = new Property(this.document, name, '');\n this.attributes[name] = attr;\n return attr;\n }\n return attr || Property.empty(this.document);\n }\n getHrefAttribute() {\n let href;\n for(const key in this.attributes){\n if (key === 'href' || key.endsWith(':href')) {\n href = this.attributes[key];\n break;\n }\n }\n return href || Property.empty(this.document);\n }\n getStyle(name) {\n let createIfNotExists = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, skipAncestors = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n const style = this.styles[name];\n if (style) {\n return style;\n }\n const attr = this.getAttribute(name);\n if (attr.hasValue()) {\n this.styles[name] = attr // move up to me to cache\n ;\n return attr;\n }\n if (!skipAncestors) {\n const { parent } = this;\n if (parent) {\n const parentStyle = parent.getStyle(name);\n if (parentStyle.hasValue()) {\n return parentStyle;\n }\n }\n }\n if (createIfNotExists) {\n const style = new Property(this.document, name, '');\n this.styles[name] = style;\n return style;\n }\n return Property.empty(this.document);\n }\n render(ctx) {\n // don't render display=none\n // don't render visibility=hidden\n if (this.getStyle('display').getString() === 'none' || this.getStyle('visibility').getString() === 'hidden') {\n return;\n }\n ctx.save();\n if (this.getStyle('mask').hasValue()) {\n const mask = this.getStyle('mask').getDefinition();\n if (mask) {\n this.applyEffects(ctx);\n mask.apply(ctx, this);\n }\n } else if (this.getStyle('filter').getValue('none') !== 'none') {\n const filter = this.getStyle('filter').getDefinition();\n if (filter) {\n this.applyEffects(ctx);\n filter.apply(ctx, this);\n }\n } else {\n this.setContext(ctx);\n this.renderChildren(ctx);\n this.clearContext(ctx);\n }\n ctx.restore();\n }\n setContext(_) {\n // NO RENDER\n }\n applyEffects(ctx) {\n // transform\n const transform = Transform.fromElement(this.document, this);\n if (transform) {\n transform.apply(ctx);\n }\n // clip\n const clipPathStyleProp = this.getStyle('clip-path', false, true);\n if (clipPathStyleProp.hasValue()) {\n const clip = clipPathStyleProp.getDefinition();\n if (clip) {\n clip.apply(ctx);\n }\n }\n }\n clearContext(_) {\n // NO RENDER\n }\n renderChildren(ctx) {\n this.children.forEach((child)=>{\n child.render(ctx);\n });\n }\n addChild(childNode) {\n const child = childNode instanceof Element ? childNode : this.document.createElement(childNode);\n child.parent = this;\n if (!Element.ignoreChildTypes.includes(child.type)) {\n this.children.push(child);\n }\n }\n matchesSelector(selector) {\n var ref;\n const { node } = this;\n if (typeof node.matches === 'function') {\n return node.matches(selector);\n }\n const styleClasses = (ref = node.getAttribute) === null || ref === void 0 ? void 0 : ref.call(node, 'class');\n if (!styleClasses || styleClasses === '') {\n return false;\n }\n return styleClasses.split(' ').some((styleClass)=>\".\".concat(styleClass) === selector\n );\n }\n addStylesFromStyleDefinition() {\n const { styles , stylesSpecificity } = this.document;\n let styleProp;\n for(const selector in styles){\n if (!selector.startsWith('@') && this.matchesSelector(selector)) {\n const style = styles[selector];\n const specificity = stylesSpecificity[selector];\n if (style) {\n for(const name in style){\n let existingSpecificity = this.stylesSpecificity[name];\n if (typeof existingSpecificity === 'undefined') {\n existingSpecificity = '000';\n }\n if (specificity && specificity >= existingSpecificity) {\n styleProp = style[name];\n if (styleProp) {\n this.styles[name] = styleProp;\n }\n this.stylesSpecificity[name] = specificity;\n }\n }\n }\n }\n }\n }\n removeStyles(element, ignoreStyles) {\n const toRestore1 = ignoreStyles.reduce((toRestore, name)=>{\n const styleProp = element.getStyle(name);\n if (!styleProp.hasValue()) {\n return toRestore;\n }\n const value = styleProp.getString();\n styleProp.setValue('');\n return [\n ...toRestore,\n [\n name,\n value\n ]\n ];\n }, []);\n return toRestore1;\n }\n restoreStyles(element, styles) {\n styles.forEach((param)=>{\n let [name, value] = param;\n element.getStyle(name, true).setValue(value);\n });\n }\n isFirstChild() {\n var ref;\n return ((ref = this.parent) === null || ref === void 0 ? void 0 : ref.children.indexOf(this)) === 0;\n }\n constructor(document, node, captureTextNodes = false){\n this.document = document;\n this.node = node;\n this.captureTextNodes = captureTextNodes;\n this.type = '';\n this.attributes = {};\n this.styles = {};\n this.stylesSpecificity = {};\n this.animationFrozen = false;\n this.animationFrozenValue = '';\n this.parent = null;\n this.children = [];\n if (!node || node.nodeType !== 1) {\n return;\n }\n // add attributes\n Array.from(node.attributes).forEach((attribute)=>{\n const nodeName = normalizeAttributeName(attribute.nodeName);\n this.attributes[nodeName] = new Property(document, nodeName, attribute.value);\n });\n this.addStylesFromStyleDefinition();\n // add inline styles\n if (this.getAttribute('style').hasValue()) {\n const styles = this.getAttribute('style').getString().split(';').map((_)=>_.trim()\n );\n styles.forEach((style)=>{\n if (!style) {\n return;\n }\n const [name, value] = style.split(':').map((_)=>_.trim()\n );\n if (name) {\n this.styles[name] = new Property(document, name, value);\n }\n });\n }\n const { definitions } = document;\n const id = this.getAttribute('id');\n // add id\n if (id.hasValue()) {\n if (!definitions[id.getString()]) {\n definitions[id.getString()] = this;\n }\n }\n Array.from(node.childNodes).forEach((childNode)=>{\n if (childNode.nodeType === 1) {\n this.addChild(childNode) // ELEMENT_NODE\n ;\n } else if (captureTextNodes && (childNode.nodeType === 3 || childNode.nodeType === 4)) {\n const textNode = document.createTextNode(childNode);\n if (textNode.getText().length > 0) {\n this.addChild(textNode) // TEXT_NODE\n ;\n }\n }\n });\n }\n}\nElement.ignoreChildTypes = [\n 'title'\n];\n\nclass UnknownElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n }\n}\n\nfunction wrapFontFamily(fontFamily) {\n const trimmed = fontFamily.trim();\n return /^('|\")/.test(trimmed) ? trimmed : \"\\\"\".concat(trimmed, \"\\\"\");\n}\nfunction prepareFontFamily(fontFamily) {\n return typeof process === 'undefined' ? fontFamily : fontFamily.trim().split(',').map(wrapFontFamily).join(',');\n}\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style\n * @param fontStyle\n * @returns CSS font style.\n */ function prepareFontStyle(fontStyle) {\n if (!fontStyle) {\n return '';\n }\n const targetFontStyle = fontStyle.trim().toLowerCase();\n switch(targetFontStyle){\n case 'normal':\n case 'italic':\n case 'oblique':\n case 'inherit':\n case 'initial':\n case 'unset':\n return targetFontStyle;\n default:\n if (/^oblique\\s+(-|)\\d+deg$/.test(targetFontStyle)) {\n return targetFontStyle;\n }\n return '';\n }\n}\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight\n * @param fontWeight\n * @returns CSS font weight.\n */ function prepareFontWeight(fontWeight) {\n if (!fontWeight) {\n return '';\n }\n const targetFontWeight = fontWeight.trim().toLowerCase();\n switch(targetFontWeight){\n case 'normal':\n case 'bold':\n case 'lighter':\n case 'bolder':\n case 'inherit':\n case 'initial':\n case 'unset':\n return targetFontWeight;\n default:\n if (/^[\\d.]+$/.test(targetFontWeight)) {\n return targetFontWeight;\n }\n return '';\n }\n}\nclass Font {\n static parse() {\n let font = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : '', inherit = arguments.length > 1 ? arguments[1] : void 0;\n let fontStyle = '';\n let fontVariant = '';\n let fontWeight = '';\n let fontSize = '';\n let fontFamily = '';\n const parts = compressSpaces(font).trim().split(' ');\n const set = {\n fontSize: false,\n fontStyle: false,\n fontWeight: false,\n fontVariant: false\n };\n parts.forEach((part)=>{\n switch(true){\n case !set.fontStyle && Font.styles.includes(part):\n if (part !== 'inherit') {\n fontStyle = part;\n }\n set.fontStyle = true;\n break;\n case !set.fontVariant && Font.variants.includes(part):\n if (part !== 'inherit') {\n fontVariant = part;\n }\n set.fontStyle = true;\n set.fontVariant = true;\n break;\n case !set.fontWeight && Font.weights.includes(part):\n if (part !== 'inherit') {\n fontWeight = part;\n }\n set.fontStyle = true;\n set.fontVariant = true;\n set.fontWeight = true;\n break;\n case !set.fontSize:\n if (part !== 'inherit') {\n fontSize = part.split('/')[0] || '';\n }\n set.fontStyle = true;\n set.fontVariant = true;\n set.fontWeight = true;\n set.fontSize = true;\n break;\n default:\n if (part !== 'inherit') {\n fontFamily += part;\n }\n }\n });\n return new Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit);\n }\n toString() {\n return [\n prepareFontStyle(this.fontStyle),\n this.fontVariant,\n prepareFontWeight(this.fontWeight),\n this.fontSize,\n // Wrap fontFamily only on nodejs and only for canvas.ctx\n prepareFontFamily(this.fontFamily)\n ].join(' ').trim();\n }\n constructor(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit){\n const inheritFont = inherit ? typeof inherit === 'string' ? Font.parse(inherit) : inherit : {};\n this.fontFamily = fontFamily || inheritFont.fontFamily;\n this.fontSize = fontSize || inheritFont.fontSize;\n this.fontStyle = fontStyle || inheritFont.fontStyle;\n this.fontWeight = fontWeight || inheritFont.fontWeight;\n this.fontVariant = fontVariant || inheritFont.fontVariant;\n }\n}\nFont.styles = 'normal|italic|oblique|inherit';\nFont.variants = 'normal|small-caps|inherit';\nFont.weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';\n\nclass BoundingBox {\n get x() {\n return this.x1;\n }\n get y() {\n return this.y1;\n }\n get width() {\n return this.x2 - this.x1;\n }\n get height() {\n return this.y2 - this.y1;\n }\n addPoint(x, y) {\n if (typeof x !== 'undefined') {\n if (isNaN(this.x1) || isNaN(this.x2)) {\n this.x1 = x;\n this.x2 = x;\n }\n if (x < this.x1) {\n this.x1 = x;\n }\n if (x > this.x2) {\n this.x2 = x;\n }\n }\n if (typeof y !== 'undefined') {\n if (isNaN(this.y1) || isNaN(this.y2)) {\n this.y1 = y;\n this.y2 = y;\n }\n if (y < this.y1) {\n this.y1 = y;\n }\n if (y > this.y2) {\n this.y2 = y;\n }\n }\n }\n addX(x) {\n this.addPoint(x, 0);\n }\n addY(y) {\n this.addPoint(0, y);\n }\n addBoundingBox(boundingBox) {\n if (!boundingBox) {\n return;\n }\n const { x1 , y1 , x2 , y2 } = boundingBox;\n this.addPoint(x1, y1);\n this.addPoint(x2, y2);\n }\n sumCubic(t, p0, p1, p2, p3) {\n return Math.pow(1 - t, 3) * p0 + 3 * Math.pow(1 - t, 2) * t * p1 + 3 * (1 - t) * Math.pow(t, 2) * p2 + Math.pow(t, 3) * p3;\n }\n bezierCurveAdd(forX, p0, p1, p2, p3) {\n const b = 6 * p0 - 12 * p1 + 6 * p2;\n const a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;\n const c = 3 * p1 - 3 * p0;\n if (a === 0) {\n if (b === 0) {\n return;\n }\n const t = -c / b;\n if (0 < t && t < 1) {\n if (forX) {\n this.addX(this.sumCubic(t, p0, p1, p2, p3));\n } else {\n this.addY(this.sumCubic(t, p0, p1, p2, p3));\n }\n }\n return;\n }\n const b2ac = Math.pow(b, 2) - 4 * c * a;\n if (b2ac < 0) {\n return;\n }\n const t1 = (-b + Math.sqrt(b2ac)) / (2 * a);\n if (0 < t1 && t1 < 1) {\n if (forX) {\n this.addX(this.sumCubic(t1, p0, p1, p2, p3));\n } else {\n this.addY(this.sumCubic(t1, p0, p1, p2, p3));\n }\n }\n const t2 = (-b - Math.sqrt(b2ac)) / (2 * a);\n if (0 < t2 && t2 < 1) {\n if (forX) {\n this.addX(this.sumCubic(t2, p0, p1, p2, p3));\n } else {\n this.addY(this.sumCubic(t2, p0, p1, p2, p3));\n }\n }\n }\n // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html\n addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {\n this.addPoint(p0x, p0y);\n this.addPoint(p3x, p3y);\n this.bezierCurveAdd(true, p0x, p1x, p2x, p3x);\n this.bezierCurveAdd(false, p0y, p1y, p2y, p3y);\n }\n addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y) {\n const cp1x = p0x + 2 / 3 * (p1x - p0x) // CP1 = QP0 + 2/3 *(QP1-QP0)\n ;\n const cp1y = p0y + 2 / 3 * (p1y - p0y) // CP1 = QP0 + 2/3 *(QP1-QP0)\n ;\n const cp2x = cp1x + 1 / 3 * (p2x - p0x) // CP2 = CP1 + 1/3 *(QP2-QP0)\n ;\n const cp2y = cp1y + 1 / 3 * (p2y - p0y) // CP2 = CP1 + 1/3 *(QP2-QP0)\n ;\n this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);\n }\n isPointInBox(x, y) {\n const { x1 , y1 , x2 , y2 } = this;\n return x1 <= x && x <= x2 && y1 <= y && y <= y2;\n }\n constructor(x1 = Number.NaN, y1 = Number.NaN, x2 = Number.NaN, y2 = Number.NaN){\n this.x1 = x1;\n this.y1 = y1;\n this.x2 = x2;\n this.y2 = y2;\n this.addPoint(x1, y1);\n this.addPoint(x2, y2);\n }\n}\n\nclass RenderedElement extends Element {\n calculateOpacity() {\n let opacity = 1;\n // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n let element = this;\n while(element){\n const opacityStyle = element.getStyle('opacity', false, true) // no ancestors on style call\n ;\n if (opacityStyle.hasValue(true)) {\n opacity *= opacityStyle.getNumber();\n }\n element = element.parent;\n }\n return opacity;\n }\n setContext(ctx) {\n let fromMeasure = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n if (!fromMeasure) {\n // fill\n const fillStyleProp = this.getStyle('fill');\n const fillOpacityStyleProp = this.getStyle('fill-opacity');\n const strokeStyleProp = this.getStyle('stroke');\n const strokeOpacityProp = this.getStyle('stroke-opacity');\n if (fillStyleProp.isUrlDefinition()) {\n const fillStyle = fillStyleProp.getFillStyleDefinition(this, fillOpacityStyleProp);\n if (fillStyle) {\n ctx.fillStyle = fillStyle;\n }\n } else if (fillStyleProp.hasValue()) {\n if (fillStyleProp.getString() === 'currentColor') {\n fillStyleProp.setValue(this.getStyle('color').getColor());\n }\n const fillStyle = fillStyleProp.getColor();\n if (fillStyle !== 'inherit') {\n ctx.fillStyle = fillStyle === 'none' ? 'rgba(0,0,0,0)' : fillStyle;\n }\n }\n if (fillOpacityStyleProp.hasValue()) {\n const fillStyle = new Property(this.document, 'fill', ctx.fillStyle).addOpacity(fillOpacityStyleProp).getColor();\n ctx.fillStyle = fillStyle;\n }\n // stroke\n if (strokeStyleProp.isUrlDefinition()) {\n const strokeStyle = strokeStyleProp.getFillStyleDefinition(this, strokeOpacityProp);\n if (strokeStyle) {\n ctx.strokeStyle = strokeStyle;\n }\n } else if (strokeStyleProp.hasValue()) {\n if (strokeStyleProp.getString() === 'currentColor') {\n strokeStyleProp.setValue(this.getStyle('color').getColor());\n }\n const strokeStyle = strokeStyleProp.getString();\n if (strokeStyle !== 'inherit') {\n ctx.strokeStyle = strokeStyle === 'none' ? 'rgba(0,0,0,0)' : strokeStyle;\n }\n }\n if (strokeOpacityProp.hasValue()) {\n const strokeStyle = new Property(this.document, 'stroke', ctx.strokeStyle).addOpacity(strokeOpacityProp).getString();\n ctx.strokeStyle = strokeStyle;\n }\n const strokeWidthStyleProp = this.getStyle('stroke-width');\n if (strokeWidthStyleProp.hasValue()) {\n const newLineWidth = strokeWidthStyleProp.getPixels();\n ctx.lineWidth = !newLineWidth ? PSEUDO_ZERO // browsers don't respect 0 (or node-canvas? :-)\n : newLineWidth;\n }\n const strokeLinecapStyleProp = this.getStyle('stroke-linecap');\n const strokeLinejoinStyleProp = this.getStyle('stroke-linejoin');\n const strokeMiterlimitProp = this.getStyle('stroke-miterlimit');\n // NEED TEST\n // const pointOrderStyleProp = this.getStyle('paint-order');\n const strokeDasharrayStyleProp = this.getStyle('stroke-dasharray');\n const strokeDashoffsetProp = this.getStyle('stroke-dashoffset');\n if (strokeLinecapStyleProp.hasValue()) {\n ctx.lineCap = strokeLinecapStyleProp.getString();\n }\n if (strokeLinejoinStyleProp.hasValue()) {\n ctx.lineJoin = strokeLinejoinStyleProp.getString();\n }\n if (strokeMiterlimitProp.hasValue()) {\n ctx.miterLimit = strokeMiterlimitProp.getNumber();\n }\n // NEED TEST\n // if (pointOrderStyleProp.hasValue()) {\n // // ?\n // ctx.paintOrder = pointOrderStyleProp.getValue();\n // }\n if (strokeDasharrayStyleProp.hasValue() && strokeDasharrayStyleProp.getString() !== 'none') {\n const gaps = toNumbers(strokeDasharrayStyleProp.getString());\n if (typeof ctx.setLineDash !== 'undefined') {\n ctx.setLineDash(gaps);\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.webkitLineDash !== 'undefined') {\n // @ts-expect-error Handle browser prefix.\n ctx.webkitLineDash = gaps;\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.mozDash !== 'undefined' && !(gaps.length === 1 && gaps[0] === 0)) {\n // @ts-expect-error Handle browser prefix.\n ctx.mozDash = gaps;\n }\n const offset = strokeDashoffsetProp.getPixels();\n if (typeof ctx.lineDashOffset !== 'undefined') {\n ctx.lineDashOffset = offset;\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.webkitLineDashOffset !== 'undefined') {\n // @ts-expect-error Handle browser prefix.\n ctx.webkitLineDashOffset = offset;\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.mozDashOffset !== 'undefined') {\n // @ts-expect-error Handle browser prefix.\n ctx.mozDashOffset = offset;\n }\n }\n }\n // font\n this.modifiedEmSizeStack = false;\n if (typeof ctx.font !== 'undefined') {\n const fontStyleProp = this.getStyle('font');\n const fontStyleStyleProp = this.getStyle('font-style');\n const fontVariantStyleProp = this.getStyle('font-variant');\n const fontWeightStyleProp = this.getStyle('font-weight');\n const fontSizeStyleProp = this.getStyle('font-size');\n const fontFamilyStyleProp = this.getStyle('font-family');\n const font = new Font(fontStyleStyleProp.getString(), fontVariantStyleProp.getString(), fontWeightStyleProp.getString(), fontSizeStyleProp.hasValue() ? \"\".concat(fontSizeStyleProp.getPixels(true), \"px\") : '', fontFamilyStyleProp.getString(), Font.parse(fontStyleProp.getString(), ctx.font));\n fontStyleStyleProp.setValue(font.fontStyle);\n fontVariantStyleProp.setValue(font.fontVariant);\n fontWeightStyleProp.setValue(font.fontWeight);\n fontSizeStyleProp.setValue(font.fontSize);\n fontFamilyStyleProp.setValue(font.fontFamily);\n ctx.font = font.toString();\n if (fontSizeStyleProp.isPixels()) {\n this.document.emSize = fontSizeStyleProp.getPixels();\n this.modifiedEmSizeStack = true;\n }\n }\n if (!fromMeasure) {\n // effects\n this.applyEffects(ctx);\n // opacity\n ctx.globalAlpha = this.calculateOpacity();\n }\n }\n clearContext(ctx) {\n super.clearContext(ctx);\n if (this.modifiedEmSizeStack) {\n this.document.popEmSize();\n }\n }\n constructor(...args){\n super(...args);\n this.modifiedEmSizeStack = false;\n }\n}\n\nclass TextElement extends RenderedElement {\n setContext(ctx) {\n let fromMeasure = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n super.setContext(ctx, fromMeasure);\n const textBaseline = this.getStyle('dominant-baseline').getTextBaseline() || this.getStyle('alignment-baseline').getTextBaseline();\n if (textBaseline) {\n ctx.textBaseline = textBaseline;\n }\n }\n initializeCoordinates() {\n this.x = 0;\n this.y = 0;\n this.leafTexts = [];\n this.textChunkStart = 0;\n this.minX = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n }\n getBoundingBox(ctx) {\n if (this.type !== 'text') {\n return this.getTElementBoundingBox(ctx);\n }\n // first, calculate child positions\n this.initializeCoordinates();\n this.adjustChildCoordinatesRecursive(ctx);\n let boundingBox = null;\n // then calculate bounding box\n this.children.forEach((_, i)=>{\n const childBoundingBox = this.getChildBoundingBox(ctx, this, this, i);\n if (!boundingBox) {\n boundingBox = childBoundingBox;\n } else {\n boundingBox.addBoundingBox(childBoundingBox);\n }\n });\n return boundingBox;\n }\n getFontSize() {\n const { document , parent } = this;\n const inheritFontSize = Font.parse(document.ctx.font).fontSize;\n const fontSize = parent.getStyle('font-size').getNumber(inheritFontSize);\n return fontSize;\n }\n getTElementBoundingBox(ctx) {\n const fontSize = this.getFontSize();\n return new BoundingBox(this.x, this.y - fontSize, this.x + this.measureText(ctx), this.y);\n }\n getGlyph(font, text, i) {\n const char = text[i];\n let glyph;\n if (font.isArabic) {\n var ref;\n const len = text.length;\n const prevChar = text[i - 1];\n const nextChar = text[i + 1];\n let arabicForm = 'isolated';\n if ((i === 0 || prevChar === ' ') && i < len - 1 && nextChar !== ' ') {\n arabicForm = 'terminal';\n }\n if (i > 0 && prevChar !== ' ' && i < len - 1 && nextChar !== ' ') {\n arabicForm = 'medial';\n }\n if (i > 0 && prevChar !== ' ' && (i === len - 1 || nextChar === ' ')) {\n arabicForm = 'initial';\n }\n glyph = ((ref = font.arabicGlyphs[char]) === null || ref === void 0 ? void 0 : ref[arabicForm]) || font.glyphs[char];\n } else {\n glyph = font.glyphs[char];\n }\n if (!glyph) {\n glyph = font.missingGlyph;\n }\n return glyph;\n }\n getText() {\n return '';\n }\n getTextFromNode(node) {\n const textNode = node || this.node;\n const childNodes = Array.from(textNode.parentNode.childNodes);\n const index = childNodes.indexOf(textNode);\n const lastIndex = childNodes.length - 1;\n let text = compressSpaces(// textNode.value\n // || textNode.text\n textNode.textContent || '');\n if (index === 0) {\n text = trimLeft(text);\n }\n if (index === lastIndex) {\n text = trimRight(text);\n }\n return text;\n }\n renderChildren(ctx) {\n if (this.type !== 'text') {\n this.renderTElementChildren(ctx);\n return;\n }\n // first, calculate child positions\n this.initializeCoordinates();\n this.adjustChildCoordinatesRecursive(ctx);\n // then render\n this.children.forEach((_, i)=>{\n this.renderChild(ctx, this, this, i);\n });\n const { mouse } = this.document.screen;\n // Do not calc bounding box if mouse is not working.\n if (mouse.isWorking()) {\n mouse.checkBoundingBox(this, this.getBoundingBox(ctx));\n }\n }\n renderTElementChildren(ctx) {\n const { document , parent } = this;\n const renderText = this.getText();\n const customFont = parent.getStyle('font-family').getDefinition();\n if (customFont) {\n const { unitsPerEm } = customFont.fontFace;\n const ctxFont = Font.parse(document.ctx.font);\n const fontSize = parent.getStyle('font-size').getNumber(ctxFont.fontSize);\n const fontStyle = parent.getStyle('font-style').getString(ctxFont.fontStyle);\n const scale = fontSize / unitsPerEm;\n const text = customFont.isRTL ? renderText.split('').reverse().join('') : renderText;\n const dx = toNumbers(parent.getAttribute('dx').getString());\n const len = text.length;\n for(let i = 0; i < len; i++){\n const glyph = this.getGlyph(customFont, text, i);\n ctx.translate(this.x, this.y);\n ctx.scale(scale, -scale);\n const lw = ctx.lineWidth;\n ctx.lineWidth = ctx.lineWidth * unitsPerEm / fontSize;\n if (fontStyle === 'italic') {\n ctx.transform(1, 0, 0.4, 1, 0, 0);\n }\n glyph.render(ctx);\n if (fontStyle === 'italic') {\n ctx.transform(1, 0, -0.4, 1, 0, 0);\n }\n ctx.lineWidth = lw;\n ctx.scale(1 / scale, -1 / scale);\n ctx.translate(-this.x, -this.y);\n this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / unitsPerEm;\n if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {\n this.x += dx[i];\n }\n }\n return;\n }\n const { x , y } = this;\n // NEED TEST\n // if (ctx.paintOrder === 'stroke') {\n // if (ctx.strokeStyle) {\n // ctx.strokeText(renderText, x, y);\n // }\n // if (ctx.fillStyle) {\n // ctx.fillText(renderText, x, y);\n // }\n // } else {\n if (ctx.fillStyle) {\n ctx.fillText(renderText, x, y);\n }\n if (ctx.strokeStyle) {\n ctx.strokeText(renderText, x, y);\n }\n // }\n }\n applyAnchoring() {\n if (this.textChunkStart >= this.leafTexts.length) {\n return;\n }\n // This is basically the \"Apply anchoring\" part of https://www.w3.org/TR/SVG2/text.html#TextLayoutAlgorithm.\n // The difference is that we apply the anchoring as soon as a chunk is finished. This saves some extra looping.\n // Vertical text is not supported.\n const firstElement = this.leafTexts[this.textChunkStart];\n const textAnchor = firstElement.getStyle('text-anchor').getString('start');\n const isRTL = false // we treat RTL like LTR\n ;\n let shift = 0;\n if (textAnchor === 'start' && !isRTL || textAnchor === 'end' && isRTL) {\n shift = firstElement.x - this.minX;\n } else if (textAnchor === 'end' && !isRTL || textAnchor === 'start' && isRTL) {\n shift = firstElement.x - this.maxX;\n } else {\n shift = firstElement.x - (this.minX + this.maxX) / 2;\n }\n for(let i = this.textChunkStart; i < this.leafTexts.length; i++){\n this.leafTexts[i].x += shift;\n }\n // start new chunk\n this.minX = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n this.textChunkStart = this.leafTexts.length;\n }\n adjustChildCoordinatesRecursive(ctx) {\n this.children.forEach((_, i)=>{\n this.adjustChildCoordinatesRecursiveCore(ctx, this, this, i);\n });\n this.applyAnchoring();\n }\n adjustChildCoordinatesRecursiveCore(ctx, textParent, parent, i1) {\n const child = parent.children[i1];\n if (child.children.length > 0) {\n child.children.forEach((_, i)=>{\n textParent.adjustChildCoordinatesRecursiveCore(ctx, textParent, child, i);\n });\n } else {\n // only leafs are relevant\n this.adjustChildCoordinates(ctx, textParent, parent, i1);\n }\n }\n adjustChildCoordinates(ctx, textParent, parent, i) {\n const child = parent.children[i];\n if (typeof child.measureText !== 'function') {\n return child;\n }\n ctx.save();\n child.setContext(ctx, true);\n const xAttr = child.getAttribute('x');\n const yAttr = child.getAttribute('y');\n const dxAttr = child.getAttribute('dx');\n const dyAttr = child.getAttribute('dy');\n const customFont = child.getStyle('font-family').getDefinition();\n const isRTL = Boolean(customFont === null || customFont === void 0 ? void 0 : customFont.isRTL);\n if (i === 0) {\n // First children inherit attributes from parent(s). Positional attributes\n // are only inherited from a parent to it's first child.\n if (!xAttr.hasValue()) {\n xAttr.setValue(child.getInheritedAttribute('x'));\n }\n if (!yAttr.hasValue()) {\n yAttr.setValue(child.getInheritedAttribute('y'));\n }\n if (!dxAttr.hasValue()) {\n dxAttr.setValue(child.getInheritedAttribute('dx'));\n }\n if (!dyAttr.hasValue()) {\n dyAttr.setValue(child.getInheritedAttribute('dy'));\n }\n }\n const width = child.measureText(ctx);\n if (isRTL) {\n textParent.x -= width;\n }\n if (xAttr.hasValue()) {\n // an \"x\" attribute marks the start of a new chunk\n textParent.applyAnchoring();\n child.x = xAttr.getPixels('x');\n if (dxAttr.hasValue()) {\n child.x += dxAttr.getPixels('x');\n }\n } else {\n if (dxAttr.hasValue()) {\n textParent.x += dxAttr.getPixels('x');\n }\n child.x = textParent.x;\n }\n textParent.x = child.x;\n if (!isRTL) {\n textParent.x += width;\n }\n if (yAttr.hasValue()) {\n child.y = yAttr.getPixels('y');\n if (dyAttr.hasValue()) {\n child.y += dyAttr.getPixels('y');\n }\n } else {\n if (dyAttr.hasValue()) {\n textParent.y += dyAttr.getPixels('y');\n }\n child.y = textParent.y;\n }\n textParent.y = child.y;\n // update the current chunk and it's bounds\n textParent.leafTexts.push(child);\n textParent.minX = Math.min(textParent.minX, child.x, child.x + width);\n textParent.maxX = Math.max(textParent.maxX, child.x, child.x + width);\n child.clearContext(ctx);\n ctx.restore();\n return child;\n }\n getChildBoundingBox(ctx, textParent, parent, i2) {\n const child = parent.children[i2];\n // not a text node?\n if (typeof child.getBoundingBox !== 'function') {\n return null;\n }\n const boundingBox = child.getBoundingBox(ctx);\n if (boundingBox) {\n child.children.forEach((_, i)=>{\n const childBoundingBox = textParent.getChildBoundingBox(ctx, textParent, child, i);\n boundingBox.addBoundingBox(childBoundingBox);\n });\n }\n return boundingBox;\n }\n renderChild(ctx, textParent, parent, i3) {\n const child = parent.children[i3];\n child.render(ctx);\n child.children.forEach((_, i)=>{\n textParent.renderChild(ctx, textParent, child, i);\n });\n }\n measureText(ctx) {\n const { measureCache } = this;\n if (~measureCache) {\n return measureCache;\n }\n const renderText = this.getText();\n const measure = this.measureTargetText(ctx, renderText);\n this.measureCache = measure;\n return measure;\n }\n measureTargetText(ctx, targetText) {\n if (!targetText.length) {\n return 0;\n }\n const { parent } = this;\n const customFont = parent.getStyle('font-family').getDefinition();\n if (customFont) {\n const fontSize = this.getFontSize();\n const text = customFont.isRTL ? targetText.split('').reverse().join('') : targetText;\n const dx = toNumbers(parent.getAttribute('dx').getString());\n const len = text.length;\n let measure = 0;\n for(let i = 0; i < len; i++){\n const glyph = this.getGlyph(customFont, text, i);\n measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;\n if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {\n measure += dx[i];\n }\n }\n return measure;\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!ctx.measureText) {\n return targetText.length * 10;\n }\n ctx.save();\n this.setContext(ctx, true);\n const { width: measure } = ctx.measureText(targetText);\n this.clearContext(ctx);\n ctx.restore();\n return measure;\n }\n /**\n * Inherits positional attributes from {@link TextElement} parent(s). Attributes\n * are only inherited from a parent to its first child.\n * @param name - The attribute name.\n * @returns The attribute value or null.\n */ getInheritedAttribute(name) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias,consistent-this\n let current = this;\n while(current instanceof TextElement && current.isFirstChild() && current.parent){\n const parentAttr = current.parent.getAttribute(name);\n if (parentAttr.hasValue(true)) {\n return parentAttr.getString('0');\n }\n current = current.parent;\n }\n return null;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, new.target === TextElement ? true : captureTextNodes);\n this.type = 'text';\n this.x = 0;\n this.y = 0;\n this.leafTexts = [];\n this.textChunkStart = 0;\n this.minX = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n this.measureCache = -1;\n }\n}\n\nclass TSpanElement extends TextElement {\n getText() {\n return this.text;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, new.target === TSpanElement ? true : captureTextNodes);\n this.type = 'tspan';\n // if this node has children, then they own the text\n this.text = this.children.length > 0 ? '' : this.getTextFromNode();\n }\n}\n\nclass TextNode extends TSpanElement {\n constructor(...args){\n super(...args);\n this.type = 'textNode';\n }\n}\n\nclass PathParser extends svgPathdata.SVGPathData {\n reset() {\n this.i = -1;\n this.command = null;\n this.previousCommand = null;\n this.start = new Point(0, 0);\n this.control = new Point(0, 0);\n this.current = new Point(0, 0);\n this.points = [];\n this.angles = [];\n }\n isEnd() {\n const { i , commands } = this;\n return i >= commands.length - 1;\n }\n next() {\n const command = this.commands[++this.i];\n this.previousCommand = this.command;\n this.command = command;\n return command;\n }\n getPoint() {\n let xProp = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'x', yProp = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 'y';\n const point = new Point(this.command[xProp], this.command[yProp]);\n return this.makeAbsolute(point);\n }\n getAsControlPoint(xProp, yProp) {\n const point = this.getPoint(xProp, yProp);\n this.control = point;\n return point;\n }\n getAsCurrentPoint(xProp, yProp) {\n const point = this.getPoint(xProp, yProp);\n this.current = point;\n return point;\n }\n getReflectedControlPoint() {\n const previousCommand = this.previousCommand.type;\n if (previousCommand !== svgPathdata.SVGPathData.CURVE_TO && previousCommand !== svgPathdata.SVGPathData.SMOOTH_CURVE_TO && previousCommand !== svgPathdata.SVGPathData.QUAD_TO && previousCommand !== svgPathdata.SVGPathData.SMOOTH_QUAD_TO) {\n return this.current;\n }\n // reflect point\n const { current: { x: cx , y: cy } , control: { x: ox , y: oy } } = this;\n const point = new Point(2 * cx - ox, 2 * cy - oy);\n return point;\n }\n makeAbsolute(point) {\n if (this.command.relative) {\n const { x , y } = this.current;\n point.x += x;\n point.y += y;\n }\n return point;\n }\n addMarker(point, from, priorTo) {\n const { points , angles } = this;\n // if the last angle isn't filled in because we didn't have this point yet ...\n if (priorTo && angles.length > 0 && !angles[angles.length - 1]) {\n angles[angles.length - 1] = points[points.length - 1].angleTo(priorTo);\n }\n this.addMarkerAngle(point, from ? from.angleTo(point) : null);\n }\n addMarkerAngle(point, angle) {\n this.points.push(point);\n this.angles.push(angle);\n }\n getMarkerPoints() {\n return this.points;\n }\n getMarkerAngles() {\n const { angles } = this;\n const len = angles.length;\n for(let i = 0; i < len; i++){\n if (!angles[i]) {\n for(let j = i + 1; j < len; j++){\n if (angles[j]) {\n angles[i] = angles[j];\n break;\n }\n }\n }\n }\n return angles;\n }\n constructor(path){\n super(path// Fix spaces after signs.\n .replace(/([+\\-.])\\s+/gm, '$1')// Remove invalid part.\n .replace(/[^MmZzLlHhVvCcSsQqTtAae\\d\\s.,+-].*/g, ''));\n this.control = new Point(0, 0);\n this.start = new Point(0, 0);\n this.current = new Point(0, 0);\n this.command = null;\n this.commands = this.commands;\n this.i = -1;\n this.previousCommand = null;\n this.points = [];\n this.angles = [];\n }\n}\n\nclass PathElement extends RenderedElement {\n path(ctx) {\n const { pathParser } = this;\n const boundingBox = new BoundingBox();\n pathParser.reset();\n if (ctx) {\n ctx.beginPath();\n }\n while(!pathParser.isEnd()){\n switch(pathParser.next().type){\n case PathParser.MOVE_TO:\n this.pathM(ctx, boundingBox);\n break;\n case PathParser.LINE_TO:\n this.pathL(ctx, boundingBox);\n break;\n case PathParser.HORIZ_LINE_TO:\n this.pathH(ctx, boundingBox);\n break;\n case PathParser.VERT_LINE_TO:\n this.pathV(ctx, boundingBox);\n break;\n case PathParser.CURVE_TO:\n this.pathC(ctx, boundingBox);\n break;\n case PathParser.SMOOTH_CURVE_TO:\n this.pathS(ctx, boundingBox);\n break;\n case PathParser.QUAD_TO:\n this.pathQ(ctx, boundingBox);\n break;\n case PathParser.SMOOTH_QUAD_TO:\n this.pathT(ctx, boundingBox);\n break;\n case PathParser.ARC:\n this.pathA(ctx, boundingBox);\n break;\n case PathParser.CLOSE_PATH:\n this.pathZ(ctx, boundingBox);\n break;\n }\n }\n return boundingBox;\n }\n getBoundingBox(_ctx) {\n return this.path();\n }\n getMarkers() {\n const { pathParser } = this;\n const points = pathParser.getMarkerPoints();\n const angles = pathParser.getMarkerAngles();\n const markers = points.map((point, i)=>[\n point,\n angles[i]\n ]\n );\n return markers;\n }\n renderChildren(ctx) {\n this.path(ctx);\n this.document.screen.mouse.checkPath(this, ctx);\n const fillRuleStyleProp = this.getStyle('fill-rule');\n if (ctx.fillStyle !== '') {\n if (fillRuleStyleProp.getString('inherit') !== 'inherit') {\n ctx.fill(fillRuleStyleProp.getString());\n } else {\n ctx.fill();\n }\n }\n if (ctx.strokeStyle !== '') {\n if (this.getAttribute('vector-effect').getString() === 'non-scaling-stroke') {\n ctx.save();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.stroke();\n ctx.restore();\n } else {\n ctx.stroke();\n }\n }\n const markers = this.getMarkers();\n if (markers) {\n const markersLastIndex = markers.length - 1;\n const markerStartStyleProp = this.getStyle('marker-start');\n const markerMidStyleProp = this.getStyle('marker-mid');\n const markerEndStyleProp = this.getStyle('marker-end');\n if (markerStartStyleProp.isUrlDefinition()) {\n const marker = markerStartStyleProp.getDefinition();\n const [point, angle] = markers[0];\n marker.render(ctx, point, angle);\n }\n if (markerMidStyleProp.isUrlDefinition()) {\n const marker = markerMidStyleProp.getDefinition();\n for(let i = 1; i < markersLastIndex; i++){\n const [point, angle] = markers[i];\n marker.render(ctx, point, angle);\n }\n }\n if (markerEndStyleProp.isUrlDefinition()) {\n const marker = markerEndStyleProp.getDefinition();\n const [point, angle] = markers[markersLastIndex];\n marker.render(ctx, point, angle);\n }\n }\n }\n static pathM(pathParser) {\n const point = pathParser.getAsCurrentPoint();\n pathParser.start = pathParser.current;\n return {\n point\n };\n }\n pathM(ctx, boundingBox) {\n const { pathParser } = this;\n const { point } = PathElement.pathM(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.moveTo(x, y);\n }\n }\n static pathL(pathParser) {\n const { current } = pathParser;\n const point = pathParser.getAsCurrentPoint();\n return {\n current,\n point\n };\n }\n pathL(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point } = PathElement.pathL(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point, current);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n }\n static pathH(pathParser) {\n const { current , command } = pathParser;\n const point = new Point((command.relative ? current.x : 0) + command.x, current.y);\n pathParser.current = point;\n return {\n current,\n point\n };\n }\n pathH(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point } = PathElement.pathH(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point, current);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n }\n static pathV(pathParser) {\n const { current , command } = pathParser;\n const point = new Point(current.x, (command.relative ? current.y : 0) + command.y);\n pathParser.current = point;\n return {\n current,\n point\n };\n }\n pathV(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point } = PathElement.pathV(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point, current);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n }\n static pathC(pathParser) {\n const { current } = pathParser;\n const point = pathParser.getPoint('x1', 'y1');\n const controlPoint = pathParser.getAsControlPoint('x2', 'y2');\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n point,\n controlPoint,\n currentPoint\n };\n }\n pathC(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point , controlPoint , currentPoint } = PathElement.pathC(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, point);\n boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathS(pathParser) {\n const { current } = pathParser;\n const point = pathParser.getReflectedControlPoint();\n const controlPoint = pathParser.getAsControlPoint('x2', 'y2');\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n point,\n controlPoint,\n currentPoint\n };\n }\n pathS(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point , controlPoint , currentPoint } = PathElement.pathS(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, point);\n boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathQ(pathParser) {\n const { current } = pathParser;\n const controlPoint = pathParser.getAsControlPoint('x1', 'y1');\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n controlPoint,\n currentPoint\n };\n }\n pathQ(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , controlPoint , currentPoint } = PathElement.pathQ(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, controlPoint);\n boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathT(pathParser) {\n const { current } = pathParser;\n const controlPoint = pathParser.getReflectedControlPoint();\n pathParser.control = controlPoint;\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n controlPoint,\n currentPoint\n };\n }\n pathT(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , controlPoint , currentPoint } = PathElement.pathT(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, controlPoint);\n boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathA(pathParser) {\n const { current , command } = pathParser;\n let { rX , rY , xRot , lArcFlag , sweepFlag } = command;\n const xAxisRotation = xRot * (Math.PI / 180);\n const currentPoint = pathParser.getAsCurrentPoint();\n // Conversion from endpoint to center parameterization\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n // x1', y1'\n const currp = new Point(Math.cos(xAxisRotation) * (current.x - currentPoint.x) / 2 + Math.sin(xAxisRotation) * (current.y - currentPoint.y) / 2, -Math.sin(xAxisRotation) * (current.x - currentPoint.x) / 2 + Math.cos(xAxisRotation) * (current.y - currentPoint.y) / 2);\n // adjust radii\n const l = Math.pow(currp.x, 2) / Math.pow(rX, 2) + Math.pow(currp.y, 2) / Math.pow(rY, 2);\n if (l > 1) {\n rX *= Math.sqrt(l);\n rY *= Math.sqrt(l);\n }\n // cx', cy'\n let s = (lArcFlag === sweepFlag ? -1 : 1) * Math.sqrt((Math.pow(rX, 2) * Math.pow(rY, 2) - Math.pow(rX, 2) * Math.pow(currp.y, 2) - Math.pow(rY, 2) * Math.pow(currp.x, 2)) / (Math.pow(rX, 2) * Math.pow(currp.y, 2) + Math.pow(rY, 2) * Math.pow(currp.x, 2)));\n if (isNaN(s)) {\n s = 0;\n }\n const cpp = new Point(s * rX * currp.y / rY, s * -rY * currp.x / rX);\n // cx, cy\n const centp = new Point((current.x + currentPoint.x) / 2 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, (current.y + currentPoint.y) / 2 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y);\n // initial angle\n const a1 = vectorsAngle([\n 1,\n 0\n ], [\n (currp.x - cpp.x) / rX,\n (currp.y - cpp.y) / rY\n ]) // θ1\n ;\n // angle delta\n const u = [\n (currp.x - cpp.x) / rX,\n (currp.y - cpp.y) / rY\n ];\n const v = [\n (-currp.x - cpp.x) / rX,\n (-currp.y - cpp.y) / rY\n ];\n let ad = vectorsAngle(u, v) // Δθ\n ;\n if (vectorsRatio(u, v) <= -1) {\n ad = Math.PI;\n }\n if (vectorsRatio(u, v) >= 1) {\n ad = 0;\n }\n return {\n currentPoint,\n rX,\n rY,\n sweepFlag,\n xAxisRotation,\n centp,\n a1,\n ad\n };\n }\n pathA(ctx, boundingBox) {\n const { pathParser } = this;\n const { currentPoint , rX , rY , sweepFlag , xAxisRotation , centp , a1 , ad } = PathElement.pathA(pathParser);\n // for markers\n const dir = 1 - sweepFlag ? 1 : -1;\n const ah = a1 + dir * (ad / 2);\n const halfWay = new Point(centp.x + rX * Math.cos(ah), centp.y + rY * Math.sin(ah));\n pathParser.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);\n pathParser.addMarkerAngle(currentPoint, ah - dir * Math.PI);\n boundingBox.addPoint(currentPoint.x, currentPoint.y) // TODO: this is too naive, make it better\n ;\n if (ctx && !isNaN(a1) && !isNaN(ad)) {\n const r = rX > rY ? rX : rY;\n const sx = rX > rY ? 1 : rX / rY;\n const sy = rX > rY ? rY / rX : 1;\n ctx.translate(centp.x, centp.y);\n ctx.rotate(xAxisRotation);\n ctx.scale(sx, sy);\n ctx.arc(0, 0, r, a1, a1 + ad, Boolean(1 - sweepFlag));\n ctx.scale(1 / sx, 1 / sy);\n ctx.rotate(-xAxisRotation);\n ctx.translate(-centp.x, -centp.y);\n }\n }\n static pathZ(pathParser) {\n pathParser.current = pathParser.start;\n }\n pathZ(ctx, boundingBox) {\n PathElement.pathZ(this.pathParser);\n if (ctx) {\n // only close path if it is not a straight line\n if (boundingBox.x1 !== boundingBox.x2 && boundingBox.y1 !== boundingBox.y2) {\n ctx.closePath();\n }\n }\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'path';\n this.pathParser = new PathParser(this.getAttribute('d').getString());\n }\n}\n\nclass SVGElement extends RenderedElement {\n setContext(ctx) {\n var ref;\n const { document } = this;\n const { screen , window } = document;\n const canvas = ctx.canvas;\n screen.setDefaults(ctx);\n if ('style' in canvas && typeof ctx.font !== 'undefined' && window && typeof window.getComputedStyle !== 'undefined') {\n ctx.font = window.getComputedStyle(canvas).getPropertyValue('font');\n const fontSizeProp = new Property(document, 'fontSize', Font.parse(ctx.font).fontSize);\n if (fontSizeProp.hasValue()) {\n document.rootEmSize = fontSizeProp.getPixels('y');\n document.emSize = document.rootEmSize;\n }\n }\n // create new view port\n if (!this.getAttribute('x').hasValue()) {\n this.getAttribute('x', true).setValue(0);\n }\n if (!this.getAttribute('y').hasValue()) {\n this.getAttribute('y', true).setValue(0);\n }\n let { width , height } = screen.viewPort;\n if (!this.getStyle('width').hasValue()) {\n this.getStyle('width', true).setValue('100%');\n }\n if (!this.getStyle('height').hasValue()) {\n this.getStyle('height', true).setValue('100%');\n }\n if (!this.getStyle('color').hasValue()) {\n this.getStyle('color', true).setValue('black');\n }\n const refXAttr = this.getAttribute('refX');\n const refYAttr = this.getAttribute('refY');\n const viewBoxAttr = this.getAttribute('viewBox');\n const viewBox = viewBoxAttr.hasValue() ? toNumbers(viewBoxAttr.getString()) : null;\n const clip = !this.root && this.getStyle('overflow').getValue('hidden') !== 'visible';\n let minX = 0;\n let minY = 0;\n let clipX = 0;\n let clipY = 0;\n if (viewBox) {\n minX = viewBox[0];\n minY = viewBox[1];\n }\n if (!this.root) {\n width = this.getStyle('width').getPixels('x');\n height = this.getStyle('height').getPixels('y');\n if (this.type === 'marker') {\n clipX = minX;\n clipY = minY;\n minX = 0;\n minY = 0;\n }\n }\n screen.viewPort.setCurrent(width, height);\n // Default value of transform-origin is center only for root SVG elements\n // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform-origin\n if (this.node // is not temporary SVGElement\n && (!this.parent || ((ref = this.node.parentNode) === null || ref === void 0 ? void 0 : ref.nodeName) === 'foreignObject') && this.getStyle('transform', false, true).hasValue() && !this.getStyle('transform-origin', false, true).hasValue()) {\n this.getStyle('transform-origin', true, true).setValue('50% 50%');\n }\n super.setContext(ctx);\n ctx.translate(this.getAttribute('x').getPixels('x'), this.getAttribute('y').getPixels('y'));\n if (viewBox) {\n width = viewBox[2];\n height = viewBox[3];\n }\n document.setViewBox({\n ctx,\n aspectRatio: this.getAttribute('preserveAspectRatio').getString(),\n width: screen.viewPort.width,\n desiredWidth: width,\n height: screen.viewPort.height,\n desiredHeight: height,\n minX,\n minY,\n refX: refXAttr.getValue(),\n refY: refYAttr.getValue(),\n clip,\n clipX,\n clipY\n });\n if (viewBox) {\n screen.viewPort.removeCurrent();\n screen.viewPort.setCurrent(width, height);\n }\n }\n clearContext(ctx) {\n super.clearContext(ctx);\n this.document.screen.viewPort.removeCurrent();\n }\n /**\n * Resize SVG to fit in given size.\n * @param width\n * @param height\n * @param preserveAspectRatio\n */ resize(width) {\n let height = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : width, preserveAspectRatio = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n const widthAttr = this.getAttribute('width', true);\n const heightAttr = this.getAttribute('height', true);\n const viewBoxAttr = this.getAttribute('viewBox');\n const styleAttr = this.getAttribute('style');\n const originWidth = widthAttr.getNumber(0);\n const originHeight = heightAttr.getNumber(0);\n if (preserveAspectRatio) {\n if (typeof preserveAspectRatio === 'string') {\n this.getAttribute('preserveAspectRatio', true).setValue(preserveAspectRatio);\n } else {\n const preserveAspectRatioAttr = this.getAttribute('preserveAspectRatio');\n if (preserveAspectRatioAttr.hasValue()) {\n preserveAspectRatioAttr.setValue(preserveAspectRatioAttr.getString().replace(/^\\s*(\\S.*\\S)\\s*$/, '$1'));\n }\n }\n }\n widthAttr.setValue(width);\n heightAttr.setValue(height);\n if (!viewBoxAttr.hasValue()) {\n viewBoxAttr.setValue(\"0 0 \".concat(originWidth || width, \" \").concat(originHeight || height));\n }\n if (styleAttr.hasValue()) {\n const widthStyle = this.getStyle('width');\n const heightStyle = this.getStyle('height');\n if (widthStyle.hasValue()) {\n widthStyle.setValue(\"\".concat(width, \"px\"));\n }\n if (heightStyle.hasValue()) {\n heightStyle.setValue(\"\".concat(height, \"px\"));\n }\n }\n }\n constructor(...args){\n super(...args);\n this.type = 'svg';\n this.root = false;\n }\n}\n\nclass RectElement extends PathElement {\n path(ctx) {\n const x = this.getAttribute('x').getPixels('x');\n const y = this.getAttribute('y').getPixels('y');\n const width = this.getStyle('width', false, true).getPixels('x');\n const height = this.getStyle('height', false, true).getPixels('y');\n const rxAttr = this.getAttribute('rx');\n const ryAttr = this.getAttribute('ry');\n let rx = rxAttr.getPixels('x');\n let ry = ryAttr.getPixels('y');\n if (rxAttr.hasValue() && !ryAttr.hasValue()) {\n ry = rx;\n }\n if (ryAttr.hasValue() && !rxAttr.hasValue()) {\n rx = ry;\n }\n rx = Math.min(rx, width / 2);\n ry = Math.min(ry, height / 2);\n if (ctx) {\n const KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);\n ctx.beginPath() // always start the path so we don't fill prior paths\n ;\n if (height > 0 && width > 0) {\n ctx.moveTo(x + rx, y);\n ctx.lineTo(x + width - rx, y);\n ctx.bezierCurveTo(x + width - rx + KAPPA * rx, y, x + width, y + ry - KAPPA * ry, x + width, y + ry);\n ctx.lineTo(x + width, y + height - ry);\n ctx.bezierCurveTo(x + width, y + height - ry + KAPPA * ry, x + width - rx + KAPPA * rx, y + height, x + width - rx, y + height);\n ctx.lineTo(x + rx, y + height);\n ctx.bezierCurveTo(x + rx - KAPPA * rx, y + height, x, y + height - ry + KAPPA * ry, x, y + height - ry);\n ctx.lineTo(x, y + ry);\n ctx.bezierCurveTo(x, y + ry - KAPPA * ry, x + rx - KAPPA * rx, y, x + rx, y);\n ctx.closePath();\n }\n }\n return new BoundingBox(x, y, x + width, y + height);\n }\n getMarkers() {\n return null;\n }\n constructor(...args){\n super(...args);\n this.type = 'rect';\n }\n}\n\nclass CircleElement extends PathElement {\n path(ctx) {\n const cx = this.getAttribute('cx').getPixels('x');\n const cy = this.getAttribute('cy').getPixels('y');\n const r = this.getAttribute('r').getPixels();\n if (ctx && r > 0) {\n ctx.beginPath();\n ctx.arc(cx, cy, r, 0, Math.PI * 2, false);\n ctx.closePath();\n }\n return new BoundingBox(cx - r, cy - r, cx + r, cy + r);\n }\n getMarkers() {\n return null;\n }\n constructor(...args){\n super(...args);\n this.type = 'circle';\n }\n}\n\nclass EllipseElement extends PathElement {\n path(ctx) {\n const KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);\n const rx = this.getAttribute('rx').getPixels('x');\n const ry = this.getAttribute('ry').getPixels('y');\n const cx = this.getAttribute('cx').getPixels('x');\n const cy = this.getAttribute('cy').getPixels('y');\n if (ctx && rx > 0 && ry > 0) {\n ctx.beginPath();\n ctx.moveTo(cx + rx, cy);\n ctx.bezierCurveTo(cx + rx, cy + KAPPA * ry, cx + KAPPA * rx, cy + ry, cx, cy + ry);\n ctx.bezierCurveTo(cx - KAPPA * rx, cy + ry, cx - rx, cy + KAPPA * ry, cx - rx, cy);\n ctx.bezierCurveTo(cx - rx, cy - KAPPA * ry, cx - KAPPA * rx, cy - ry, cx, cy - ry);\n ctx.bezierCurveTo(cx + KAPPA * rx, cy - ry, cx + rx, cy - KAPPA * ry, cx + rx, cy);\n ctx.closePath();\n }\n return new BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);\n }\n getMarkers() {\n return null;\n }\n constructor(...args){\n super(...args);\n this.type = 'ellipse';\n }\n}\n\nclass LineElement extends PathElement {\n getPoints() {\n return [\n new Point(this.getAttribute('x1').getPixels('x'), this.getAttribute('y1').getPixels('y')),\n new Point(this.getAttribute('x2').getPixels('x'), this.getAttribute('y2').getPixels('y'))\n ];\n }\n path(ctx) {\n const [{ x: x0 , y: y0 }, { x: x1 , y: y1 }] = this.getPoints();\n if (ctx) {\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n ctx.lineTo(x1, y1);\n }\n return new BoundingBox(x0, y0, x1, y1);\n }\n getMarkers() {\n const [p0, p1] = this.getPoints();\n const a = p0.angleTo(p1);\n return [\n [\n p0,\n a\n ],\n [\n p1,\n a\n ]\n ];\n }\n constructor(...args){\n super(...args);\n this.type = 'line';\n }\n}\n\nclass PolylineElement extends PathElement {\n path(ctx) {\n const { points } = this;\n const [{ x: x0 , y: y0 }] = points;\n const boundingBox = new BoundingBox(x0, y0);\n if (ctx) {\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n }\n points.forEach((param)=>{\n let { x , y } = param;\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n });\n return boundingBox;\n }\n getMarkers() {\n const { points } = this;\n const lastIndex = points.length - 1;\n const markers = [];\n points.forEach((point, i)=>{\n if (i === lastIndex) {\n return;\n }\n markers.push([\n point,\n point.angleTo(points[i + 1])\n ]);\n });\n if (markers.length > 0) {\n markers.push([\n points[points.length - 1],\n markers[markers.length - 1][1]\n ]);\n }\n return markers;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'polyline';\n this.points = [];\n this.points = Point.parsePath(this.getAttribute('points').getString());\n }\n}\n\nclass PolygonElement extends PolylineElement {\n path(ctx) {\n const boundingBox = super.path(ctx);\n const [{ x , y }] = this.points;\n if (ctx) {\n ctx.lineTo(x, y);\n ctx.closePath();\n }\n return boundingBox;\n }\n constructor(...args){\n super(...args);\n this.type = 'polygon';\n }\n}\n\nclass PatternElement extends Element {\n createPattern(ctx, _, parentOpacityProp) {\n const width = this.getStyle('width').getPixels('x', true);\n const height = this.getStyle('height').getPixels('y', true);\n // render me using a temporary svg element\n const patternSvg = new SVGElement(this.document, null);\n patternSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());\n patternSvg.attributes.width = new Property(this.document, 'width', \"\".concat(width, \"px\"));\n patternSvg.attributes.height = new Property(this.document, 'height', \"\".concat(height, \"px\"));\n patternSvg.attributes.transform = new Property(this.document, 'transform', this.getAttribute('patternTransform').getValue());\n patternSvg.children = this.children;\n const patternCanvas = this.document.createCanvas(width, height);\n const patternCtx = patternCanvas.getContext('2d');\n const xAttr = this.getAttribute('x');\n const yAttr = this.getAttribute('y');\n if (xAttr.hasValue() && yAttr.hasValue()) {\n patternCtx.translate(xAttr.getPixels('x', true), yAttr.getPixels('y', true));\n }\n if (parentOpacityProp.hasValue()) {\n this.styles['fill-opacity'] = parentOpacityProp;\n } else {\n Reflect.deleteProperty(this.styles, 'fill-opacity');\n }\n // render 3x3 grid so when we transform there's no white space on edges\n for(let x = -1; x <= 1; x++){\n for(let y = -1; y <= 1; y++){\n patternCtx.save();\n patternSvg.attributes.x = new Property(this.document, 'x', x * patternCanvas.width);\n patternSvg.attributes.y = new Property(this.document, 'y', y * patternCanvas.height);\n patternSvg.render(patternCtx);\n patternCtx.restore();\n }\n }\n const pattern = ctx.createPattern(patternCanvas, 'repeat');\n return pattern;\n }\n constructor(...args){\n super(...args);\n this.type = 'pattern';\n }\n}\n\nclass MarkerElement extends Element {\n render(ctx, point, angle) {\n if (!point) {\n return;\n }\n const { x , y } = point;\n const orient = this.getAttribute('orient').getString('auto');\n const markerUnits = this.getAttribute('markerUnits').getString('strokeWidth');\n ctx.translate(x, y);\n if (orient === 'auto') {\n ctx.rotate(angle);\n }\n if (markerUnits === 'strokeWidth') {\n ctx.scale(ctx.lineWidth, ctx.lineWidth);\n }\n ctx.save();\n // render me using a temporary svg element\n const markerSvg = new SVGElement(this.document);\n markerSvg.type = this.type;\n markerSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());\n markerSvg.attributes.refX = new Property(this.document, 'refX', this.getAttribute('refX').getValue());\n markerSvg.attributes.refY = new Property(this.document, 'refY', this.getAttribute('refY').getValue());\n markerSvg.attributes.width = new Property(this.document, 'width', this.getAttribute('markerWidth').getValue());\n markerSvg.attributes.height = new Property(this.document, 'height', this.getAttribute('markerHeight').getValue());\n markerSvg.attributes.overflow = new Property(this.document, 'overflow', this.getAttribute('overflow').getValue());\n markerSvg.attributes.fill = new Property(this.document, 'fill', this.getAttribute('fill').getColor('black'));\n markerSvg.attributes.stroke = new Property(this.document, 'stroke', this.getAttribute('stroke').getValue('none'));\n markerSvg.children = this.children;\n markerSvg.render(ctx);\n ctx.restore();\n if (markerUnits === 'strokeWidth') {\n ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);\n }\n if (orient === 'auto') {\n ctx.rotate(-angle);\n }\n ctx.translate(-x, -y);\n }\n constructor(...args){\n super(...args);\n this.type = 'marker';\n }\n}\n\nclass DefsElement extends Element {\n render() {\n // NOOP\n }\n constructor(...args){\n super(...args);\n this.type = 'defs';\n }\n}\n\nclass GElement extends RenderedElement {\n getBoundingBox(ctx) {\n const boundingBox = new BoundingBox();\n this.children.forEach((child)=>{\n boundingBox.addBoundingBox(child.getBoundingBox(ctx));\n });\n return boundingBox;\n }\n constructor(...args){\n super(...args);\n this.type = 'g';\n }\n}\n\nclass GradientElement extends Element {\n getGradientUnits() {\n return this.getAttribute('gradientUnits').getString('objectBoundingBox');\n }\n createGradient(ctx, element, parentOpacityProp) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n let stopsContainer = this;\n if (this.getHrefAttribute().hasValue()) {\n stopsContainer = this.getHrefAttribute().getDefinition();\n this.inheritStopContainer(stopsContainer);\n }\n const { stops } = stopsContainer;\n const gradient = this.getGradient(ctx, element);\n if (!gradient) {\n return this.addParentOpacity(parentOpacityProp, stops[stops.length - 1].color);\n }\n stops.forEach((stop)=>{\n gradient.addColorStop(stop.offset, this.addParentOpacity(parentOpacityProp, stop.color));\n });\n if (this.getAttribute('gradientTransform').hasValue()) {\n // render as transformed pattern on temporary canvas\n const { document } = this;\n const { MAX_VIRTUAL_PIXELS } = Screen;\n const { viewPort } = document.screen;\n const rootView = viewPort.getRoot();\n const rect = new RectElement(document);\n rect.attributes.x = new Property(document, 'x', -MAX_VIRTUAL_PIXELS / 3);\n rect.attributes.y = new Property(document, 'y', -MAX_VIRTUAL_PIXELS / 3);\n rect.attributes.width = new Property(document, 'width', MAX_VIRTUAL_PIXELS);\n rect.attributes.height = new Property(document, 'height', MAX_VIRTUAL_PIXELS);\n const group = new GElement(document);\n group.attributes.transform = new Property(document, 'transform', this.getAttribute('gradientTransform').getValue());\n group.children = [\n rect\n ];\n const patternSvg = new SVGElement(document);\n patternSvg.attributes.x = new Property(document, 'x', 0);\n patternSvg.attributes.y = new Property(document, 'y', 0);\n patternSvg.attributes.width = new Property(document, 'width', rootView.width);\n patternSvg.attributes.height = new Property(document, 'height', rootView.height);\n patternSvg.children = [\n group\n ];\n const patternCanvas = document.createCanvas(rootView.width, rootView.height);\n const patternCtx = patternCanvas.getContext('2d');\n patternCtx.fillStyle = gradient;\n patternSvg.render(patternCtx);\n return patternCtx.createPattern(patternCanvas, 'no-repeat');\n }\n return gradient;\n }\n inheritStopContainer(stopsContainer) {\n this.attributesToInherit.forEach((attributeToInherit)=>{\n if (!this.getAttribute(attributeToInherit).hasValue() && stopsContainer.getAttribute(attributeToInherit).hasValue()) {\n this.getAttribute(attributeToInherit, true).setValue(stopsContainer.getAttribute(attributeToInherit).getValue());\n }\n });\n }\n addParentOpacity(parentOpacityProp, color) {\n if (parentOpacityProp.hasValue()) {\n const colorProp = new Property(this.document, 'color', color);\n return colorProp.addOpacity(parentOpacityProp).getColor();\n }\n return color;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.attributesToInherit = [\n 'gradientUnits'\n ];\n this.stops = [];\n const { stops , children } = this;\n children.forEach((child)=>{\n if (child.type === 'stop') {\n stops.push(child);\n }\n });\n }\n}\n\nclass LinearGradientElement extends GradientElement {\n getGradient(ctx, element) {\n const isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';\n const boundingBox = isBoundingBoxUnits ? element.getBoundingBox(ctx) : null;\n if (isBoundingBoxUnits && !boundingBox) {\n return null;\n }\n if (!this.getAttribute('x1').hasValue() && !this.getAttribute('y1').hasValue() && !this.getAttribute('x2').hasValue() && !this.getAttribute('y2').hasValue()) {\n this.getAttribute('x1', true).setValue(0);\n this.getAttribute('y1', true).setValue(0);\n this.getAttribute('x2', true).setValue(1);\n this.getAttribute('y2', true).setValue(0);\n }\n const x1 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x1').getNumber() : this.getAttribute('x1').getPixels('x');\n const y1 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y1').getNumber() : this.getAttribute('y1').getPixels('y');\n const x2 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x2').getNumber() : this.getAttribute('x2').getPixels('x');\n const y2 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y2').getNumber() : this.getAttribute('y2').getPixels('y');\n if (x1 === x2 && y1 === y2) {\n return null;\n }\n return ctx.createLinearGradient(x1, y1, x2, y2);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'linearGradient';\n this.attributesToInherit.push('x1', 'y1', 'x2', 'y2');\n }\n}\n\nclass RadialGradientElement extends GradientElement {\n getGradient(ctx, element) {\n const isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';\n const boundingBox = element.getBoundingBox(ctx);\n if (isBoundingBoxUnits && !boundingBox) {\n return null;\n }\n if (!this.getAttribute('cx').hasValue()) {\n this.getAttribute('cx', true).setValue('50%');\n }\n if (!this.getAttribute('cy').hasValue()) {\n this.getAttribute('cy', true).setValue('50%');\n }\n if (!this.getAttribute('r').hasValue()) {\n this.getAttribute('r', true).setValue('50%');\n }\n const cx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('cx').getNumber() : this.getAttribute('cx').getPixels('x');\n const cy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('cy').getNumber() : this.getAttribute('cy').getPixels('y');\n let fx = cx;\n let fy = cy;\n if (this.getAttribute('fx').hasValue()) {\n fx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('fx').getNumber() : this.getAttribute('fx').getPixels('x');\n }\n if (this.getAttribute('fy').hasValue()) {\n fy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('fy').getNumber() : this.getAttribute('fy').getPixels('y');\n }\n const r = isBoundingBoxUnits ? (boundingBox.width + boundingBox.height) / 2 * this.getAttribute('r').getNumber() : this.getAttribute('r').getPixels();\n const fr = this.getAttribute('fr').getPixels();\n return ctx.createRadialGradient(fx, fy, fr, cx, cy, r);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'radialGradient';\n this.attributesToInherit.push('cx', 'cy', 'r', 'fx', 'fy', 'fr');\n }\n}\n\nclass StopElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'stop';\n const offset = Math.max(0, Math.min(1, this.getAttribute('offset').getNumber()));\n const stopOpacity = this.getStyle('stop-opacity');\n let stopColor = this.getStyle('stop-color', true);\n if (stopColor.getString() === '') {\n stopColor.setValue('#000');\n }\n if (stopOpacity.hasValue()) {\n stopColor = stopColor.addOpacity(stopOpacity);\n }\n this.offset = offset;\n this.color = stopColor.getColor();\n }\n}\n\nclass AnimateElement extends Element {\n getProperty() {\n const attributeType = this.getAttribute('attributeType').getString();\n const attributeName = this.getAttribute('attributeName').getString();\n if (attributeType === 'CSS') {\n return this.parent.getStyle(attributeName, true);\n }\n return this.parent.getAttribute(attributeName, true);\n }\n calcValue() {\n const { initialUnits } = this;\n const { progress , from , to } = this.getProgress();\n // tween value linearly\n let newValue = from.getNumber() + (to.getNumber() - from.getNumber()) * progress;\n if (initialUnits === '%') {\n newValue *= 100 // numValue() returns 0-1 whereas properties are 0-100\n ;\n }\n return \"\".concat(newValue).concat(initialUnits);\n }\n update(delta) {\n const { parent } = this;\n const prop = this.getProperty();\n // set initial value\n if (!this.initialValue) {\n this.initialValue = prop.getString();\n this.initialUnits = prop.getUnits();\n }\n // if we're past the end time\n if (this.duration > this.maxDuration) {\n const fill = this.getAttribute('fill').getString('remove');\n // loop for indefinitely repeating animations\n if (this.getAttribute('repeatCount').getString() === 'indefinite' || this.getAttribute('repeatDur').getString() === 'indefinite') {\n this.duration = 0;\n } else if (fill === 'freeze' && !this.frozen) {\n this.frozen = true;\n if (parent && prop) {\n parent.animationFrozen = true;\n parent.animationFrozenValue = prop.getString();\n }\n } else if (fill === 'remove' && !this.removed) {\n this.removed = true;\n if (parent && prop) {\n prop.setValue(parent.animationFrozen ? parent.animationFrozenValue : this.initialValue);\n }\n return true;\n }\n return false;\n }\n this.duration += delta;\n // if we're past the begin time\n let updated = false;\n if (this.begin < this.duration) {\n let newValue = this.calcValue() // tween\n ;\n const typeAttr = this.getAttribute('type');\n if (typeAttr.hasValue()) {\n // for transform, etc.\n const type = typeAttr.getString();\n newValue = \"\".concat(type, \"(\").concat(newValue, \")\");\n }\n prop.setValue(newValue);\n updated = true;\n }\n return updated;\n }\n getProgress() {\n const { document , values } = this;\n let progress = (this.duration - this.begin) / (this.maxDuration - this.begin);\n let from;\n let to;\n if (values.hasValue()) {\n const p = progress * (values.getValue().length - 1);\n const lb = Math.floor(p);\n const ub = Math.ceil(p);\n let value;\n value = values.getValue()[lb];\n from = new Property(document, 'from', value ? parseFloat(value) : 0);\n value = values.getValue()[ub];\n to = new Property(document, 'to', value ? parseFloat(value) : 0);\n progress = (p - lb) / (ub - lb);\n } else {\n from = this.from;\n to = this.to;\n }\n return {\n progress,\n from,\n to\n };\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'animate';\n this.duration = 0;\n this.initialUnits = '';\n this.removed = false;\n this.frozen = false;\n document.screen.animations.push(this);\n this.begin = this.getAttribute('begin').getMilliseconds();\n this.maxDuration = this.begin + this.getAttribute('dur').getMilliseconds();\n this.from = this.getAttribute('from');\n this.to = this.getAttribute('to');\n this.values = new Property(document, 'values', null);\n const valuesAttr = this.getAttribute('values');\n if (valuesAttr.hasValue()) {\n this.values.setValue(valuesAttr.getString().split(';'));\n }\n }\n}\n\nclass AnimateColorElement extends AnimateElement {\n calcValue() {\n const { progress , from , to } = this.getProgress();\n const colorFrom = new RGBColor__default[\"default\"](from.getColor());\n const colorTo = new RGBColor__default[\"default\"](to.getColor());\n if (colorFrom.ok && colorTo.ok) {\n // tween color linearly\n const r = colorFrom.r + (colorTo.r - colorFrom.r) * progress;\n const g = colorFrom.g + (colorTo.g - colorFrom.g) * progress;\n const b = colorFrom.b + (colorTo.b - colorFrom.b) * progress;\n // ? alpha\n return \"rgb(\".concat(Math.floor(r), \", \").concat(Math.floor(g), \", \").concat(Math.floor(b), \")\");\n }\n return this.getAttribute('from').getColor();\n }\n constructor(...args){\n super(...args);\n this.type = 'animateColor';\n }\n}\n\nclass AnimateTransformElement extends AnimateElement {\n calcValue() {\n const { progress , from: from1 , to: to1 } = this.getProgress();\n // tween value linearly\n const transformFrom = toNumbers(from1.getString());\n const transformTo = toNumbers(to1.getString());\n const newValue = transformFrom.map((from, i)=>{\n const to = transformTo[i];\n return from + (to - from) * progress;\n }).join(' ');\n return newValue;\n }\n constructor(...args){\n super(...args);\n this.type = 'animateTransform';\n }\n}\n\nclass FontFaceElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'font-face';\n this.ascent = this.getAttribute('ascent').getNumber();\n this.descent = this.getAttribute('descent').getNumber();\n this.unitsPerEm = this.getAttribute('units-per-em').getNumber();\n }\n}\n\nclass GlyphElement extends PathElement {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'glyph';\n this.horizAdvX = this.getAttribute('horiz-adv-x').getNumber();\n this.unicode = this.getAttribute('unicode').getString();\n this.arabicForm = this.getAttribute('arabic-form').getString();\n }\n}\n\nclass MissingGlyphElement extends GlyphElement {\n constructor(...args){\n super(...args);\n this.type = 'missing-glyph';\n this.horizAdvX = 0;\n }\n}\n\nclass FontElement extends Element {\n render() {\n // NO RENDER\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'font';\n this.isArabic = false;\n this.glyphs = {};\n this.arabicGlyphs = {};\n this.isRTL = false;\n this.horizAdvX = this.getAttribute('horiz-adv-x').getNumber();\n const { definitions } = document;\n const { children } = this;\n for (const child of children){\n if (child instanceof FontFaceElement) {\n this.fontFace = child;\n const fontFamilyStyle = child.getStyle('font-family');\n if (fontFamilyStyle.hasValue()) {\n definitions[fontFamilyStyle.getString()] = this;\n }\n } else if (child instanceof MissingGlyphElement) {\n this.missingGlyph = child;\n } else if (child instanceof GlyphElement) {\n if (child.arabicForm) {\n this.isRTL = true;\n this.isArabic = true;\n const arabicGlyph = this.arabicGlyphs[child.unicode];\n if (typeof arabicGlyph === 'undefined') {\n this.arabicGlyphs[child.unicode] = {\n [child.arabicForm]: child\n };\n } else {\n arabicGlyph[child.arabicForm] = child;\n }\n } else {\n this.glyphs[child.unicode] = child;\n }\n }\n }\n }\n}\n\nclass TRefElement extends TextElement {\n getText() {\n const element = this.getHrefAttribute().getDefinition();\n if (element) {\n const firstChild = element.children[0];\n if (firstChild) {\n return firstChild.getText();\n }\n }\n return '';\n }\n constructor(...args){\n super(...args);\n this.type = 'tref';\n }\n}\n\nclass AElement extends TextElement {\n getText() {\n return this.text;\n }\n renderChildren(ctx) {\n if (this.hasText) {\n // render as text element\n super.renderChildren(ctx);\n const { document , x , y } = this;\n const { mouse } = document.screen;\n const fontSize = new Property(document, 'fontSize', Font.parse(document.ctx.font).fontSize);\n // Do not calc bounding box if mouse is not working.\n if (mouse.isWorking()) {\n mouse.checkBoundingBox(this, new BoundingBox(x, y - fontSize.getPixels('y'), x + this.measureText(ctx), y));\n }\n } else if (this.children.length > 0) {\n // render as temporary group\n const g = new GElement(this.document);\n g.children = this.children;\n g.parent = this;\n g.render(ctx);\n }\n }\n onClick() {\n const { window } = this.document;\n if (window) {\n window.open(this.getHrefAttribute().getString());\n }\n }\n onMouseMove() {\n const ctx = this.document.ctx;\n ctx.canvas.style.cursor = 'pointer';\n }\n constructor(document, node1, captureTextNodes){\n super(document, node1, captureTextNodes);\n this.type = 'a';\n const { childNodes } = node1;\n const firstChild = childNodes[0];\n const hasText = childNodes.length > 0 && Array.from(childNodes).every((node)=>node.nodeType === 3\n );\n this.hasText = hasText;\n this.text = hasText ? this.getTextFromNode(firstChild) : '';\n }\n}\n\nclass TextPathElement extends TextElement {\n getText() {\n return this.text;\n }\n path(ctx) {\n const { dataArray } = this;\n if (ctx) {\n ctx.beginPath();\n }\n dataArray.forEach((param)=>{\n let { type , points } = param;\n switch(type){\n case PathParser.LINE_TO:\n if (ctx) {\n ctx.lineTo(points[0], points[1]);\n }\n break;\n case PathParser.MOVE_TO:\n if (ctx) {\n ctx.moveTo(points[0], points[1]);\n }\n break;\n case PathParser.CURVE_TO:\n if (ctx) {\n ctx.bezierCurveTo(points[0], points[1], points[2], points[3], points[4], points[5]);\n }\n break;\n case PathParser.QUAD_TO:\n if (ctx) {\n ctx.quadraticCurveTo(points[0], points[1], points[2], points[3]);\n }\n break;\n case PathParser.ARC:\n {\n const [cx, cy, rx, ry, theta, dTheta, psi, fs] = points;\n const r = rx > ry ? rx : ry;\n const scaleX = rx > ry ? 1 : rx / ry;\n const scaleY = rx > ry ? ry / rx : 1;\n if (ctx) {\n ctx.translate(cx, cy);\n ctx.rotate(psi);\n ctx.scale(scaleX, scaleY);\n ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs));\n ctx.scale(1 / scaleX, 1 / scaleY);\n ctx.rotate(-psi);\n ctx.translate(-cx, -cy);\n }\n break;\n }\n case PathParser.CLOSE_PATH:\n if (ctx) {\n ctx.closePath();\n }\n break;\n }\n });\n }\n renderChildren(ctx) {\n this.setTextData(ctx);\n ctx.save();\n const textDecoration = this.parent.getStyle('text-decoration').getString();\n const fontSize = this.getFontSize();\n const { glyphInfo } = this;\n const fill = ctx.fillStyle;\n if (textDecoration === 'underline') {\n ctx.beginPath();\n }\n glyphInfo.forEach((glyph, i)=>{\n const { p0 , p1 , rotation , text: partialText } = glyph;\n ctx.save();\n ctx.translate(p0.x, p0.y);\n ctx.rotate(rotation);\n if (ctx.fillStyle) {\n ctx.fillText(partialText, 0, 0);\n }\n if (ctx.strokeStyle) {\n ctx.strokeText(partialText, 0, 0);\n }\n ctx.restore();\n if (textDecoration === 'underline') {\n if (i === 0) {\n ctx.moveTo(p0.x, p0.y + fontSize / 8);\n }\n ctx.lineTo(p1.x, p1.y + fontSize / 5);\n }\n // // To assist with debugging visually, uncomment following\n //\n // ctx.beginPath();\n // if (i % 2)\n // ctx.strokeStyle = 'red';\n // else\n // ctx.strokeStyle = 'green';\n // ctx.moveTo(p0.x, p0.y);\n // ctx.lineTo(p1.x, p1.y);\n // ctx.stroke();\n // ctx.closePath();\n });\n if (textDecoration === 'underline') {\n ctx.lineWidth = fontSize / 20;\n ctx.strokeStyle = fill;\n ctx.stroke();\n ctx.closePath();\n }\n ctx.restore();\n }\n getLetterSpacingAt() {\n let idx = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;\n return this.letterSpacingCache[idx] || 0;\n }\n findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, inputOffset, dy, c, charI) {\n let offset = inputOffset;\n let glyphWidth = this.measureText(ctx, c);\n if (c === ' ' && anchor === 'justify' && textFullWidth < fullPathWidth) {\n glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;\n }\n if (charI > -1) {\n offset += this.getLetterSpacingAt(charI);\n }\n const splineStep = this.textHeight / 20;\n const p0 = this.getEquidistantPointOnPath(offset, splineStep, 0);\n const p1 = this.getEquidistantPointOnPath(offset + glyphWidth, splineStep, 0);\n const segment = {\n p0,\n p1\n };\n const rotation = p0 && p1 ? Math.atan2(p1.y - p0.y, p1.x - p0.x) : 0;\n if (dy) {\n const dyX = Math.cos(Math.PI / 2 + rotation) * dy;\n const dyY = Math.cos(-rotation) * dy;\n segment.p0 = {\n ...p0,\n x: p0.x + dyX,\n y: p0.y + dyY\n };\n segment.p1 = {\n ...p1,\n x: p1.x + dyX,\n y: p1.y + dyY\n };\n }\n offset += glyphWidth;\n return {\n offset,\n segment,\n rotation\n };\n }\n measureText(ctx, text) {\n const { measuresCache } = this;\n const targetText = text || this.getText();\n if (measuresCache.has(targetText)) {\n return measuresCache.get(targetText);\n }\n const measure = this.measureTargetText(ctx, targetText);\n measuresCache.set(targetText, measure);\n return measure;\n }\n // This method supposes what all custom fonts already loaded.\n // If some font will be loaded after this method call, will not be rendered correctly.\n // You need to call this method manually to update glyphs cache.\n setTextData(ctx) {\n if (this.glyphInfo) {\n return;\n }\n const renderText = this.getText();\n const chars = renderText.split('');\n const spacesNumber = renderText.split(' ').length - 1;\n const dx = this.parent.getAttribute('dx').split().map((_)=>_.getPixels('x')\n );\n const dy = this.parent.getAttribute('dy').getPixels('y');\n const anchor = this.parent.getStyle('text-anchor').getString('start');\n const thisSpacing = this.getStyle('letter-spacing');\n const parentSpacing = this.parent.getStyle('letter-spacing');\n let letterSpacing = 0;\n if (!thisSpacing.hasValue() || thisSpacing.getValue() === 'inherit') {\n letterSpacing = parentSpacing.getPixels();\n } else if (thisSpacing.hasValue()) {\n if (thisSpacing.getValue() !== 'initial' && thisSpacing.getValue() !== 'unset') {\n letterSpacing = thisSpacing.getPixels();\n }\n }\n // fill letter-spacing cache\n const letterSpacingCache = [];\n const textLen = renderText.length;\n this.letterSpacingCache = letterSpacingCache;\n for(let i1 = 0; i1 < textLen; i1++){\n letterSpacingCache.push(typeof dx[i1] !== 'undefined' ? dx[i1] : letterSpacing);\n }\n const dxSum = letterSpacingCache.reduce((acc, cur, i)=>i === 0 ? 0 : acc + cur || 0\n , 0);\n const textWidth = this.measureText(ctx);\n const textFullWidth = Math.max(textWidth + dxSum, 0);\n this.textWidth = textWidth;\n this.textHeight = this.getFontSize();\n this.glyphInfo = [];\n const fullPathWidth = this.getPathLength();\n const startOffset = this.getStyle('startOffset').getNumber(0) * fullPathWidth;\n let offset = 0;\n if (anchor === 'middle' || anchor === 'center') {\n offset = -textFullWidth / 2;\n }\n if (anchor === 'end' || anchor === 'right') {\n offset = -textFullWidth;\n }\n offset += startOffset;\n chars.forEach((char, i)=>{\n // Find such segment what distance between p0 and p1 is approx. width of glyph\n const { offset: nextOffset , segment , rotation } = this.findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, offset, dy, char, i);\n offset = nextOffset;\n if (!segment.p0 || !segment.p1) {\n return;\n }\n // const width = this.getLineLength(\n // segment.p0.x,\n // segment.p0.y,\n // segment.p1.x,\n // segment.p1.y\n // );\n // Note: Since glyphs are rendered one at a time, any kerning pair data built into the font will not be used.\n // Can foresee having a rough pair table built in that the developer can override as needed.\n // Or use \"dx\" attribute of the node as a naive replacement\n // const kern = 0;\n // placeholder for future implementation\n // const midpoint = this.getPointOnLine(\n // kern + width / 2.0,\n // segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y\n // );\n this.glyphInfo.push({\n // transposeX: midpoint.x,\n // transposeY: midpoint.y,\n text: chars[i],\n p0: segment.p0,\n p1: segment.p1,\n rotation\n });\n });\n }\n parsePathData(path) {\n this.pathLength = -1 // reset path length\n ;\n if (!path) {\n return [];\n }\n const pathCommands = [];\n const { pathParser } = path;\n pathParser.reset();\n // convert l, H, h, V, and v to L\n while(!pathParser.isEnd()){\n const { current } = pathParser;\n const startX = current ? current.x : 0;\n const startY = current ? current.y : 0;\n const command = pathParser.next();\n let nextCommandType = command.type;\n let points = [];\n switch(command.type){\n case PathParser.MOVE_TO:\n this.pathM(pathParser, points);\n break;\n case PathParser.LINE_TO:\n nextCommandType = this.pathL(pathParser, points);\n break;\n case PathParser.HORIZ_LINE_TO:\n nextCommandType = this.pathH(pathParser, points);\n break;\n case PathParser.VERT_LINE_TO:\n nextCommandType = this.pathV(pathParser, points);\n break;\n case PathParser.CURVE_TO:\n this.pathC(pathParser, points);\n break;\n case PathParser.SMOOTH_CURVE_TO:\n nextCommandType = this.pathS(pathParser, points);\n break;\n case PathParser.QUAD_TO:\n this.pathQ(pathParser, points);\n break;\n case PathParser.SMOOTH_QUAD_TO:\n nextCommandType = this.pathT(pathParser, points);\n break;\n case PathParser.ARC:\n points = this.pathA(pathParser);\n break;\n case PathParser.CLOSE_PATH:\n PathElement.pathZ(pathParser);\n break;\n }\n if (command.type !== PathParser.CLOSE_PATH) {\n pathCommands.push({\n type: nextCommandType,\n points,\n start: {\n x: startX,\n y: startY\n },\n pathLength: this.calcLength(startX, startY, nextCommandType, points)\n });\n } else {\n pathCommands.push({\n type: PathParser.CLOSE_PATH,\n points: [],\n pathLength: 0\n });\n }\n }\n return pathCommands;\n }\n pathM(pathParser, points) {\n const { x , y } = PathElement.pathM(pathParser).point;\n points.push(x, y);\n }\n pathL(pathParser, points) {\n const { x , y } = PathElement.pathL(pathParser).point;\n points.push(x, y);\n return PathParser.LINE_TO;\n }\n pathH(pathParser, points) {\n const { x , y } = PathElement.pathH(pathParser).point;\n points.push(x, y);\n return PathParser.LINE_TO;\n }\n pathV(pathParser, points) {\n const { x , y } = PathElement.pathV(pathParser).point;\n points.push(x, y);\n return PathParser.LINE_TO;\n }\n pathC(pathParser, points) {\n const { point , controlPoint , currentPoint } = PathElement.pathC(pathParser);\n points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n pathS(pathParser, points) {\n const { point , controlPoint , currentPoint } = PathElement.pathS(pathParser);\n points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n return PathParser.CURVE_TO;\n }\n pathQ(pathParser, points) {\n const { controlPoint , currentPoint } = PathElement.pathQ(pathParser);\n points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n pathT(pathParser, points) {\n const { controlPoint , currentPoint } = PathElement.pathT(pathParser);\n points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n return PathParser.QUAD_TO;\n }\n pathA(pathParser) {\n let { rX , rY , sweepFlag , xAxisRotation , centp , a1 , ad } = PathElement.pathA(pathParser);\n if (sweepFlag === 0 && ad > 0) {\n ad -= 2 * Math.PI;\n }\n if (sweepFlag === 1 && ad < 0) {\n ad += 2 * Math.PI;\n }\n return [\n centp.x,\n centp.y,\n rX,\n rY,\n a1,\n ad,\n xAxisRotation,\n sweepFlag\n ];\n }\n calcLength(x, y, commandType, points) {\n let len = 0;\n let p1 = null;\n let p2 = null;\n let t = 0;\n switch(commandType){\n case PathParser.LINE_TO:\n return this.getLineLength(x, y, points[0], points[1]);\n case PathParser.CURVE_TO:\n // Approximates by breaking curve into 100 line segments\n len = 0;\n p1 = this.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n for(t = 0.01; t <= 1; t += 0.01){\n p2 = this.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n return len;\n case PathParser.QUAD_TO:\n // Approximates by breaking curve into 100 line segments\n len = 0;\n p1 = this.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);\n for(t = 0.01; t <= 1; t += 0.01){\n p2 = this.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n return len;\n case PathParser.ARC:\n {\n // Approximates by breaking curve into line segments\n len = 0;\n const start = points[4];\n // 4 = theta\n const dTheta = points[5];\n // 5 = dTheta\n const end = points[4] + dTheta;\n let inc = Math.PI / 180;\n // 1 degree resolution\n if (Math.abs(start - end) < inc) {\n inc = Math.abs(start - end);\n }\n // Note: for purpose of calculating arc length, not going to worry about rotating X-axis by angle psi\n p1 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);\n if (dTheta < 0) {\n for(t = start - inc; t > end; t -= inc){\n p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n } else {\n for(t = start + inc; t < end; t += inc){\n p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n }\n p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n return len;\n }\n }\n return 0;\n }\n getPointOnLine(dist, p1x, p1y, p2x, p2y) {\n let fromX = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : p1x, fromY = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : p1y;\n const m = (p2y - p1y) / (p2x - p1x + PSEUDO_ZERO);\n let run = Math.sqrt(dist * dist / (1 + m * m));\n if (p2x < p1x) {\n run *= -1;\n }\n let rise = m * run;\n let pt = null;\n if (p2x === p1x) {\n pt = {\n x: fromX,\n y: fromY + rise\n };\n } else if ((fromY - p1y) / (fromX - p1x + PSEUDO_ZERO) === m) {\n pt = {\n x: fromX + run,\n y: fromY + rise\n };\n } else {\n let ix = 0;\n let iy = 0;\n const len = this.getLineLength(p1x, p1y, p2x, p2y);\n if (len < PSEUDO_ZERO) {\n return null;\n }\n let u = (fromX - p1x) * (p2x - p1x) + (fromY - p1y) * (p2y - p1y);\n u /= len * len;\n ix = p1x + u * (p2x - p1x);\n iy = p1y + u * (p2y - p1y);\n const pRise = this.getLineLength(fromX, fromY, ix, iy);\n const pRun = Math.sqrt(dist * dist - pRise * pRise);\n run = Math.sqrt(pRun * pRun / (1 + m * m));\n if (p2x < p1x) {\n run *= -1;\n }\n rise = m * run;\n pt = {\n x: ix + run,\n y: iy + rise\n };\n }\n return pt;\n }\n getPointOnPath(distance) {\n const fullLen = this.getPathLength();\n let cumulativePathLength = 0;\n let p = null;\n if (distance < -0.00005 || distance - 0.00005 > fullLen) {\n return null;\n }\n const { dataArray } = this;\n for (const command of dataArray){\n if (command && (command.pathLength < 0.00005 || cumulativePathLength + command.pathLength + 0.00005 < distance)) {\n cumulativePathLength += command.pathLength;\n continue;\n }\n const delta = distance - cumulativePathLength;\n let currentT = 0;\n switch(command.type){\n case PathParser.LINE_TO:\n p = this.getPointOnLine(delta, command.start.x, command.start.y, command.points[0], command.points[1], command.start.x, command.start.y);\n break;\n case PathParser.ARC:\n {\n const start = command.points[4];\n // 4 = theta\n const dTheta = command.points[5];\n // 5 = dTheta\n const end = command.points[4] + dTheta;\n currentT = start + delta / command.pathLength * dTheta;\n if (dTheta < 0 && currentT < end || dTheta >= 0 && currentT > end) {\n break;\n }\n p = this.getPointOnEllipticalArc(command.points[0], command.points[1], command.points[2], command.points[3], currentT, command.points[6]);\n break;\n }\n case PathParser.CURVE_TO:\n currentT = delta / command.pathLength;\n if (currentT > 1) {\n currentT = 1;\n }\n p = this.getPointOnCubicBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3], command.points[4], command.points[5]);\n break;\n case PathParser.QUAD_TO:\n currentT = delta / command.pathLength;\n if (currentT > 1) {\n currentT = 1;\n }\n p = this.getPointOnQuadraticBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3]);\n break;\n }\n if (p) {\n return p;\n }\n break;\n }\n return null;\n }\n getLineLength(x1, y1, x2, y2) {\n return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }\n getPathLength() {\n if (this.pathLength === -1) {\n this.pathLength = this.dataArray.reduce((length, command)=>command.pathLength > 0 ? length + command.pathLength : length\n , 0);\n }\n return this.pathLength;\n }\n getPointOnCubicBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y, p4x, p4y) {\n const x = p4x * CB1(pct) + p3x * CB2(pct) + p2x * CB3(pct) + p1x * CB4(pct);\n const y = p4y * CB1(pct) + p3y * CB2(pct) + p2y * CB3(pct) + p1y * CB4(pct);\n return {\n x,\n y\n };\n }\n getPointOnQuadraticBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y) {\n const x = p3x * QB1(pct) + p2x * QB2(pct) + p1x * QB3(pct);\n const y = p3y * QB1(pct) + p2y * QB2(pct) + p1y * QB3(pct);\n return {\n x,\n y\n };\n }\n getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {\n const cosPsi = Math.cos(psi);\n const sinPsi = Math.sin(psi);\n const pt = {\n x: rx * Math.cos(theta),\n y: ry * Math.sin(theta)\n };\n return {\n x: cx + (pt.x * cosPsi - pt.y * sinPsi),\n y: cy + (pt.x * sinPsi + pt.y * cosPsi)\n };\n }\n // TODO need some optimisations. possibly build cache only for curved segments?\n buildEquidistantCache(inputStep, inputPrecision) {\n const fullLen = this.getPathLength();\n const precision = inputPrecision || 0.25 // accuracy vs performance\n ;\n const step = inputStep || fullLen / 100;\n if (!this.equidistantCache || this.equidistantCache.step !== step || this.equidistantCache.precision !== precision) {\n // Prepare cache\n this.equidistantCache = {\n step,\n precision,\n points: []\n };\n // Calculate points\n let s = 0;\n for(let l = 0; l <= fullLen; l += precision){\n const p0 = this.getPointOnPath(l);\n const p1 = this.getPointOnPath(l + precision);\n if (!p0 || !p1) {\n continue;\n }\n s += this.getLineLength(p0.x, p0.y, p1.x, p1.y);\n if (s >= step) {\n this.equidistantCache.points.push({\n x: p0.x,\n y: p0.y,\n distance: l\n });\n s -= step;\n }\n }\n }\n }\n getEquidistantPointOnPath(targetDistance, step, precision) {\n this.buildEquidistantCache(step, precision);\n if (targetDistance < 0 || targetDistance - this.getPathLength() > 0.00005) {\n return null;\n }\n const idx = Math.round(targetDistance / this.getPathLength() * (this.equidistantCache.points.length - 1));\n return this.equidistantCache.points[idx] || null;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'textPath';\n this.textWidth = 0;\n this.textHeight = 0;\n this.pathLength = -1;\n this.glyphInfo = null;\n this.letterSpacingCache = [];\n this.measuresCache = new Map([\n [\n '',\n 0\n ]\n ]);\n const pathElement = this.getHrefAttribute().getDefinition();\n this.text = this.getTextFromNode();\n this.dataArray = this.parsePathData(pathElement);\n }\n}\n\n// groups: 1: mime-type (+ charset), 2: mime-type (w/o charset), 3: charset, 4: base64?, 5: body\nconst dataUriRegex = /^\\s*data:(([^/,;]+\\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;\nclass ImageElement extends RenderedElement {\n async loadImage(href) {\n try {\n const image = await this.document.createImage(href);\n this.image = image;\n } catch (err) {\n console.error(\"Error while loading image \\\"\".concat(href, \"\\\":\"), err);\n }\n this.loaded = true;\n }\n async loadSvg(href) {\n const match = dataUriRegex.exec(href);\n if (match) {\n const data = match[5];\n if (data) {\n if (match[4] === 'base64') {\n this.image = atob(data);\n } else {\n this.image = decodeURIComponent(data);\n }\n }\n } else {\n try {\n const response = await this.document.fetch(href);\n const svg = await response.text();\n this.image = svg;\n } catch (err) {\n console.error(\"Error while loading image \\\"\".concat(href, \"\\\":\"), err);\n }\n }\n this.loaded = true;\n }\n renderChildren(ctx) {\n const { document , image , loaded } = this;\n const x = this.getAttribute('x').getPixels('x');\n const y = this.getAttribute('y').getPixels('y');\n const width = this.getStyle('width').getPixels('x');\n const height = this.getStyle('height').getPixels('y');\n if (!loaded || !image || !width || !height) {\n return;\n }\n ctx.save();\n ctx.translate(x, y);\n if (typeof image === 'string') {\n const subDocument = document.canvg.forkString(ctx, image, {\n ignoreMouse: true,\n ignoreAnimation: true,\n ignoreDimensions: true,\n ignoreClear: true,\n offsetX: 0,\n offsetY: 0,\n scaleWidth: width,\n scaleHeight: height\n });\n const { documentElement } = subDocument.document;\n if (documentElement) {\n documentElement.parent = this;\n }\n void subDocument.render();\n } else {\n document.setViewBox({\n ctx,\n aspectRatio: this.getAttribute('preserveAspectRatio').getString(),\n width,\n desiredWidth: image.width,\n height,\n desiredHeight: image.height\n });\n if (this.loaded) {\n if (!('complete' in image) || image.complete) {\n ctx.drawImage(image, 0, 0);\n }\n }\n }\n ctx.restore();\n }\n getBoundingBox() {\n const x = this.getAttribute('x').getPixels('x');\n const y = this.getAttribute('y').getPixels('y');\n const width = this.getStyle('width').getPixels('x');\n const height = this.getStyle('height').getPixels('y');\n return new BoundingBox(x, y, x + width, y + height);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'image';\n this.loaded = false;\n const href = this.getHrefAttribute().getString();\n if (!href) {\n return;\n }\n const isSvg = href.endsWith('.svg') || /^\\s*data:image\\/svg\\+xml/i.test(href);\n document.images.push(this);\n if (!isSvg) {\n void this.loadImage(href);\n } else {\n void this.loadSvg(href);\n }\n }\n}\n\nclass SymbolElement extends RenderedElement {\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'symbol';\n }\n}\n\nclass SVGFontLoader {\n async load(fontFamily, url) {\n try {\n const { document } = this;\n const svgDocument = await document.canvg.parser.load(url);\n const fonts = svgDocument.getElementsByTagName('font');\n Array.from(fonts).forEach((fontNode)=>{\n const font = document.createElement(fontNode);\n document.definitions[fontFamily] = font;\n });\n } catch (err) {\n console.error(\"Error while loading font \\\"\".concat(url, \"\\\":\"), err);\n }\n this.loaded = true;\n }\n constructor(document){\n this.document = document;\n this.loaded = false;\n document.fonts.push(this);\n }\n}\n\nclass StyleElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'style';\n const css = compressSpaces(Array.from(node.childNodes)// NEED TEST\n .map((_)=>_.textContent\n ).join('').replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm, '') // remove comments\n .replace(/@import.*;/g, '') // remove imports\n );\n const cssDefs = css.split('}');\n cssDefs.forEach((_1)=>{\n const def = _1.trim();\n if (!def) {\n return;\n }\n const cssParts = def.split('{');\n const cssClasses = cssParts[0].split(',');\n const cssProps = cssParts[1].split(';');\n cssClasses.forEach((_)=>{\n const cssClass = _.trim();\n if (!cssClass) {\n return;\n }\n const props = document.styles[cssClass] || {};\n cssProps.forEach((cssProp)=>{\n const prop = cssProp.indexOf(':');\n const name = cssProp.substr(0, prop).trim();\n const value = cssProp.substr(prop + 1, cssProp.length - prop).trim();\n if (name && value) {\n props[name] = new Property(document, name, value);\n }\n });\n document.styles[cssClass] = props;\n document.stylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);\n if (cssClass === '@font-face') {\n const fontFamily = props['font-family'].getString().replace(/\"|'/g, '');\n const srcs = props.src.getString().split(',');\n srcs.forEach((src)=>{\n if (src.indexOf('format(\"svg\")') > 0) {\n const url = parseExternalUrl(src);\n if (url) {\n void new SVGFontLoader(document).load(fontFamily, url);\n }\n }\n });\n }\n });\n });\n }\n}\nStyleElement.parseExternalUrl = parseExternalUrl;\n\nclass UseElement extends RenderedElement {\n setContext(ctx) {\n super.setContext(ctx);\n const xAttr = this.getAttribute('x');\n const yAttr = this.getAttribute('y');\n if (xAttr.hasValue()) {\n ctx.translate(xAttr.getPixels('x'), 0);\n }\n if (yAttr.hasValue()) {\n ctx.translate(0, yAttr.getPixels('y'));\n }\n }\n path(ctx) {\n const { element } = this;\n if (element) {\n element.path(ctx);\n }\n }\n renderChildren(ctx) {\n const { document , element } = this;\n if (element) {\n let tempSvg = element;\n if (element.type === 'symbol') {\n // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)\n tempSvg = new SVGElement(document);\n tempSvg.attributes.viewBox = new Property(document, 'viewBox', element.getAttribute('viewBox').getString());\n tempSvg.attributes.preserveAspectRatio = new Property(document, 'preserveAspectRatio', element.getAttribute('preserveAspectRatio').getString());\n tempSvg.attributes.overflow = new Property(document, 'overflow', element.getAttribute('overflow').getString());\n tempSvg.children = element.children;\n // element is still the parent of the children\n element.styles.opacity = new Property(document, 'opacity', this.calculateOpacity());\n }\n if (tempSvg.type === 'svg') {\n const widthStyle = this.getStyle('width', false, true);\n const heightStyle = this.getStyle('height', false, true);\n // if symbol or svg, inherit width/height from me\n if (widthStyle.hasValue()) {\n tempSvg.attributes.width = new Property(document, 'width', widthStyle.getString());\n }\n if (heightStyle.hasValue()) {\n tempSvg.attributes.height = new Property(document, 'height', heightStyle.getString());\n }\n }\n const oldParent = tempSvg.parent;\n tempSvg.parent = this;\n tempSvg.render(ctx);\n tempSvg.parent = oldParent;\n }\n }\n getBoundingBox(ctx) {\n const { element } = this;\n if (element) {\n return element.getBoundingBox(ctx);\n }\n return null;\n }\n elementTransform() {\n const { document , element } = this;\n if (!element) {\n return null;\n }\n return Transform.fromElement(document, element);\n }\n get element() {\n if (!this.cachedElement) {\n this.cachedElement = this.getHrefAttribute().getDefinition();\n }\n return this.cachedElement;\n }\n constructor(...args){\n super(...args);\n this.type = 'use';\n }\n}\n\nfunction imGet(img, x, y, width, _height, rgba) {\n return img[y * width * 4 + x * 4 + rgba];\n}\nfunction imSet(img, x, y, width, _height, rgba, val) {\n img[y * width * 4 + x * 4 + rgba] = val;\n}\nfunction m(matrix, i, v) {\n const mi = matrix[i];\n return mi * v;\n}\nfunction c(a, m1, m2, m3) {\n return m1 + Math.cos(a) * m2 + Math.sin(a) * m3;\n}\nclass FeColorMatrixElement extends Element {\n apply(ctx, _x, _y, width, height) {\n // assuming x==0 && y==0 for now\n const { includeOpacity , matrix } = this;\n const srcData = ctx.getImageData(0, 0, width, height);\n for(let y = 0; y < height; y++){\n for(let x = 0; x < width; x++){\n const r = imGet(srcData.data, x, y, width, height, 0);\n const g = imGet(srcData.data, x, y, width, height, 1);\n const b = imGet(srcData.data, x, y, width, height, 2);\n const a = imGet(srcData.data, x, y, width, height, 3);\n let nr = m(matrix, 0, r) + m(matrix, 1, g) + m(matrix, 2, b) + m(matrix, 3, a) + m(matrix, 4, 1);\n let ng = m(matrix, 5, r) + m(matrix, 6, g) + m(matrix, 7, b) + m(matrix, 8, a) + m(matrix, 9, 1);\n let nb = m(matrix, 10, r) + m(matrix, 11, g) + m(matrix, 12, b) + m(matrix, 13, a) + m(matrix, 14, 1);\n let na = m(matrix, 15, r) + m(matrix, 16, g) + m(matrix, 17, b) + m(matrix, 18, a) + m(matrix, 19, 1);\n if (includeOpacity) {\n nr = 0;\n ng = 0;\n nb = 0;\n na *= a / 255;\n }\n imSet(srcData.data, x, y, width, height, 0, nr);\n imSet(srcData.data, x, y, width, height, 1, ng);\n imSet(srcData.data, x, y, width, height, 2, nb);\n imSet(srcData.data, x, y, width, height, 3, na);\n }\n }\n ctx.clearRect(0, 0, width, height);\n ctx.putImageData(srcData, 0, 0);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'feColorMatrix';\n let matrix = toNumbers(this.getAttribute('values').getString());\n switch(this.getAttribute('type').getString('matrix')){\n case 'saturate':\n {\n const s = matrix[0];\n /* eslint-disable array-element-newline */ matrix = [\n 0.213 + 0.787 * s,\n 0.715 - 0.715 * s,\n 0.072 - 0.072 * s,\n 0,\n 0,\n 0.213 - 0.213 * s,\n 0.715 + 0.285 * s,\n 0.072 - 0.072 * s,\n 0,\n 0,\n 0.213 - 0.213 * s,\n 0.715 - 0.715 * s,\n 0.072 + 0.928 * s,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1\n ];\n break;\n }\n case 'hueRotate':\n {\n const a = matrix[0] * Math.PI / 180;\n /* eslint-disable array-element-newline */ matrix = [\n c(a, 0.213, 0.787, -0.213),\n c(a, 0.715, -0.715, -0.715),\n c(a, 0.072, -0.072, 0.928),\n 0,\n 0,\n c(a, 0.213, -0.213, 0.143),\n c(a, 0.715, 0.285, 0.14),\n c(a, 0.072, -0.072, -0.283),\n 0,\n 0,\n c(a, 0.213, -0.213, -0.787),\n c(a, 0.715, -0.715, 0.715),\n c(a, 0.072, 0.928, 0.072),\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1\n ];\n break;\n }\n case 'luminanceToAlpha':\n /* eslint-disable array-element-newline */ matrix = [\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0.2125,\n 0.7154,\n 0.0721,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1\n ];\n break;\n }\n this.matrix = matrix;\n this.includeOpacity = this.getAttribute('includeOpacity').hasValue();\n }\n}\n\nclass MaskElement extends Element {\n apply(ctx, element) {\n const { document } = this;\n // render as temp svg\n let x = this.getAttribute('x').getPixels('x');\n let y = this.getAttribute('y').getPixels('y');\n let width = this.getStyle('width').getPixels('x');\n let height = this.getStyle('height').getPixels('y');\n if (!width && !height) {\n const boundingBox = new BoundingBox();\n this.children.forEach((child)=>{\n boundingBox.addBoundingBox(child.getBoundingBox(ctx));\n });\n x = Math.floor(boundingBox.x1);\n y = Math.floor(boundingBox.y1);\n width = Math.floor(boundingBox.width);\n height = Math.floor(boundingBox.height);\n }\n const ignoredStyles = this.removeStyles(element, MaskElement.ignoreStyles);\n const maskCanvas = document.createCanvas(x + width, y + height);\n const maskCtx = maskCanvas.getContext('2d');\n document.screen.setDefaults(maskCtx);\n this.renderChildren(maskCtx);\n // convert mask to alpha with a fake node\n // TODO: refactor out apply from feColorMatrix\n new FeColorMatrixElement(document, {\n nodeType: 1,\n childNodes: [],\n attributes: [\n {\n nodeName: 'type',\n value: 'luminanceToAlpha'\n },\n {\n nodeName: 'includeOpacity',\n value: 'true'\n }\n ]\n }).apply(maskCtx, 0, 0, x + width, y + height);\n const tmpCanvas = document.createCanvas(x + width, y + height);\n const tmpCtx = tmpCanvas.getContext('2d');\n document.screen.setDefaults(tmpCtx);\n element.render(tmpCtx);\n tmpCtx.globalCompositeOperation = 'destination-in';\n tmpCtx.fillStyle = maskCtx.createPattern(maskCanvas, 'no-repeat');\n tmpCtx.fillRect(0, 0, x + width, y + height);\n ctx.fillStyle = tmpCtx.createPattern(tmpCanvas, 'no-repeat');\n ctx.fillRect(0, 0, x + width, y + height);\n // reassign mask\n this.restoreStyles(element, ignoredStyles);\n }\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'mask';\n }\n}\nMaskElement.ignoreStyles = [\n 'mask',\n 'transform',\n 'clip-path'\n];\n\nconst noop = ()=>{\n// NOOP\n};\nclass ClipPathElement extends Element {\n apply(ctx) {\n const { document } = this;\n const contextProto = Reflect.getPrototypeOf(ctx);\n const { beginPath , closePath } = ctx;\n if (contextProto) {\n contextProto.beginPath = noop;\n contextProto.closePath = noop;\n }\n Reflect.apply(beginPath, ctx, []);\n this.children.forEach((child)=>{\n if (!('path' in child)) {\n return;\n }\n let transform = 'elementTransform' in child ? child.elementTransform() : null // handle \n ;\n if (!transform) {\n transform = Transform.fromElement(document, child);\n }\n if (transform) {\n transform.apply(ctx);\n }\n child.path(ctx);\n if (contextProto) {\n contextProto.closePath = closePath;\n }\n if (transform) {\n transform.unapply(ctx);\n }\n });\n Reflect.apply(closePath, ctx, []);\n ctx.clip();\n if (contextProto) {\n contextProto.beginPath = beginPath;\n contextProto.closePath = closePath;\n }\n }\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'clipPath';\n }\n}\n\nclass FilterElement extends Element {\n apply(ctx, element) {\n // render as temp svg\n const { document , children } = this;\n const boundingBox = 'getBoundingBox' in element ? element.getBoundingBox(ctx) : null;\n if (!boundingBox) {\n return;\n }\n let px = 0;\n let py = 0;\n children.forEach((child)=>{\n const efd = child.extraFilterDistance || 0;\n px = Math.max(px, efd);\n py = Math.max(py, efd);\n });\n const width = Math.floor(boundingBox.width);\n const height = Math.floor(boundingBox.height);\n const tmpCanvasWidth = width + 2 * px;\n const tmpCanvasHeight = height + 2 * py;\n if (tmpCanvasWidth < 1 || tmpCanvasHeight < 1) {\n return;\n }\n const x = Math.floor(boundingBox.x);\n const y = Math.floor(boundingBox.y);\n const ignoredStyles = this.removeStyles(element, FilterElement.ignoreStyles);\n const tmpCanvas = document.createCanvas(tmpCanvasWidth, tmpCanvasHeight);\n const tmpCtx = tmpCanvas.getContext('2d');\n document.screen.setDefaults(tmpCtx);\n tmpCtx.translate(-x + px, -y + py);\n element.render(tmpCtx);\n // apply filters\n children.forEach((child)=>{\n if (typeof child.apply === 'function') {\n child.apply(tmpCtx, 0, 0, tmpCanvasWidth, tmpCanvasHeight);\n }\n });\n // render on me\n ctx.drawImage(tmpCanvas, 0, 0, tmpCanvasWidth, tmpCanvasHeight, x - px, y - py, tmpCanvasWidth, tmpCanvasHeight);\n this.restoreStyles(element, ignoredStyles);\n }\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'filter';\n }\n}\nFilterElement.ignoreStyles = [\n 'filter',\n 'transform',\n 'clip-path'\n];\n\nclass FeDropShadowElement extends Element {\n apply(_, _x, _y, _width, _height) {\n // TODO: implement\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'feDropShadow';\n this.addStylesFromStyleDefinition();\n }\n}\n\nclass FeMorphologyElement extends Element {\n apply(_, _x, _y, _width, _height) {\n // TODO: implement\n }\n constructor(...args){\n super(...args);\n this.type = 'feMorphology';\n }\n}\n\nclass FeCompositeElement extends Element {\n apply(_, _x, _y, _width, _height) {\n // TODO: implement\n }\n constructor(...args){\n super(...args);\n this.type = 'feComposite';\n }\n}\n\nclass FeGaussianBlurElement extends Element {\n apply(ctx, x, y, width, height) {\n const { document , blurRadius } = this;\n const body = document.window ? document.window.document.body : null;\n const canvas = ctx.canvas;\n // StackBlur requires canvas be on document\n canvas.id = document.getUniqueId();\n if (body) {\n canvas.style.display = 'none';\n body.appendChild(canvas);\n }\n stackblurCanvas.canvasRGBA(canvas, x, y, width, height, blurRadius);\n if (body) {\n body.removeChild(canvas);\n }\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'feGaussianBlur';\n this.blurRadius = Math.floor(this.getAttribute('stdDeviation').getNumber());\n this.extraFilterDistance = this.blurRadius;\n }\n}\n\nclass TitleElement extends Element {\n constructor(...args){\n super(...args);\n this.type = 'title';\n }\n}\n\nclass DescElement extends Element {\n constructor(...args){\n super(...args);\n this.type = 'desc';\n }\n}\n\nconst elements = {\n 'svg': SVGElement,\n 'rect': RectElement,\n 'circle': CircleElement,\n 'ellipse': EllipseElement,\n 'line': LineElement,\n 'polyline': PolylineElement,\n 'polygon': PolygonElement,\n 'path': PathElement,\n 'pattern': PatternElement,\n 'marker': MarkerElement,\n 'defs': DefsElement,\n 'linearGradient': LinearGradientElement,\n 'radialGradient': RadialGradientElement,\n 'stop': StopElement,\n 'animate': AnimateElement,\n 'animateColor': AnimateColorElement,\n 'animateTransform': AnimateTransformElement,\n 'font': FontElement,\n 'font-face': FontFaceElement,\n 'missing-glyph': MissingGlyphElement,\n 'glyph': GlyphElement,\n 'text': TextElement,\n 'tspan': TSpanElement,\n 'tref': TRefElement,\n 'a': AElement,\n 'textPath': TextPathElement,\n 'image': ImageElement,\n 'g': GElement,\n 'symbol': SymbolElement,\n 'style': StyleElement,\n 'use': UseElement,\n 'mask': MaskElement,\n 'clipPath': ClipPathElement,\n 'filter': FilterElement,\n 'feDropShadow': FeDropShadowElement,\n 'feMorphology': FeMorphologyElement,\n 'feComposite': FeCompositeElement,\n 'feColorMatrix': FeColorMatrixElement,\n 'feGaussianBlur': FeGaussianBlurElement,\n 'title': TitleElement,\n 'desc': DescElement\n};\n\nfunction createCanvas(width, height) {\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n return canvas;\n}\nasync function createImage(src) {\n let anonymousCrossOrigin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n const image = document.createElement('img');\n if (anonymousCrossOrigin) {\n image.crossOrigin = 'Anonymous';\n }\n return new Promise((resolve, reject)=>{\n image.onload = ()=>{\n resolve(image);\n };\n image.onerror = (_event, _source, _lineno, _colno, error)=>{\n reject(error);\n };\n image.src = src;\n });\n}\nconst DEFAULT_EM_SIZE = 12;\nclass Document {\n bindCreateImage(createImage1, anonymousCrossOrigin) {\n if (typeof anonymousCrossOrigin === 'boolean') {\n return (source, forceAnonymousCrossOrigin)=>createImage1(source, typeof forceAnonymousCrossOrigin === 'boolean' ? forceAnonymousCrossOrigin : anonymousCrossOrigin)\n ;\n }\n return createImage1;\n }\n get window() {\n return this.screen.window;\n }\n get fetch() {\n return this.screen.fetch;\n }\n get ctx() {\n return this.screen.ctx;\n }\n get emSize() {\n const { emSizeStack } = this;\n return emSizeStack[emSizeStack.length - 1] || DEFAULT_EM_SIZE;\n }\n set emSize(value) {\n const { emSizeStack } = this;\n emSizeStack.push(value);\n }\n popEmSize() {\n const { emSizeStack } = this;\n emSizeStack.pop();\n }\n getUniqueId() {\n return \"canvg\".concat(++this.uniqueId);\n }\n isImagesLoaded() {\n return this.images.every((_)=>_.loaded\n );\n }\n isFontsLoaded() {\n return this.fonts.every((_)=>_.loaded\n );\n }\n createDocumentElement(document) {\n const documentElement = this.createElement(document.documentElement);\n documentElement.root = true;\n documentElement.addStylesFromStyleDefinition();\n this.documentElement = documentElement;\n return documentElement;\n }\n createElement(node) {\n const elementType = node.nodeName.replace(/^[^:]+:/, '');\n const ElementType = Document.elementTypes[elementType];\n if (ElementType) {\n return new ElementType(this, node);\n }\n return new UnknownElement(this, node);\n }\n createTextNode(node) {\n return new TextNode(this, node);\n }\n setViewBox(config) {\n this.screen.setViewBox({\n document: this,\n ...config\n });\n }\n constructor(canvg, { rootEmSize =DEFAULT_EM_SIZE , emSize =DEFAULT_EM_SIZE , createCanvas: createCanvas1 = Document.createCanvas , createImage: createImage2 = Document.createImage , anonymousCrossOrigin } = {}){\n this.canvg = canvg;\n this.definitions = {};\n this.styles = {};\n this.stylesSpecificity = {};\n this.images = [];\n this.fonts = [];\n this.emSizeStack = [];\n this.uniqueId = 0;\n this.screen = canvg.screen;\n this.rootEmSize = rootEmSize;\n this.emSize = emSize;\n this.createCanvas = createCanvas1;\n this.createImage = this.bindCreateImage(createImage2, anonymousCrossOrigin);\n this.screen.wait(()=>this.isImagesLoaded()\n );\n this.screen.wait(()=>this.isFontsLoaded()\n );\n }\n}\nDocument.createCanvas = createCanvas;\nDocument.createImage = createImage;\nDocument.elementTypes = elements;\n\n/**\n * SVG renderer on canvas.\n */ class Canvg {\n /**\n * Create Canvg instance from SVG source string or URL.\n * @param ctx - Rendering context.\n * @param svg - SVG source string or URL.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ static async from(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n const parser = new Parser(options);\n const svgDocument = await parser.parse(svg);\n return new Canvg(ctx, svgDocument, options);\n }\n /**\n * Create Canvg instance from SVG source string.\n * @param ctx - Rendering context.\n * @param svg - SVG source string.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ static fromString(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n const parser = new Parser(options);\n const svgDocument = parser.parseFromString(svg);\n return new Canvg(ctx, svgDocument, options);\n }\n /**\n * Create new Canvg instance with inherited options.\n * @param ctx - Rendering context.\n * @param svg - SVG source string or URL.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ fork(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n return Canvg.from(ctx, svg, {\n ...this.options,\n ...options\n });\n }\n /**\n * Create new Canvg instance with inherited options.\n * @param ctx - Rendering context.\n * @param svg - SVG source string.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ forkString(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n return Canvg.fromString(ctx, svg, {\n ...this.options,\n ...options\n });\n }\n /**\n * Document is ready promise.\n * @returns Ready promise.\n */ ready() {\n return this.screen.ready();\n }\n /**\n * Document is ready value.\n * @returns Is ready or not.\n */ isReady() {\n return this.screen.isReady();\n }\n /**\n * Render only first frame, ignoring animations and mouse.\n * @param options - Rendering options.\n */ async render() {\n let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n this.start({\n enableRedraw: true,\n ignoreAnimation: true,\n ignoreMouse: true,\n ...options\n });\n await this.ready();\n this.stop();\n }\n /**\n * Start rendering.\n * @param options - Render options.\n */ start() {\n let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n const { documentElement , screen , options: baseOptions } = this;\n screen.start(documentElement, {\n enableRedraw: true,\n ...baseOptions,\n ...options\n });\n }\n /**\n * Stop rendering.\n */ stop() {\n this.screen.stop();\n }\n /**\n * Resize SVG to fit in given size.\n * @param width\n * @param height\n * @param preserveAspectRatio\n */ resize(width) {\n let height = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : width, preserveAspectRatio = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n this.documentElement.resize(width, height, preserveAspectRatio);\n }\n /**\n * Main constructor.\n * @param ctx - Rendering context.\n * @param svg - SVG Document.\n * @param options - Rendering options.\n */ constructor(ctx, svg, options = {}){\n this.parser = new Parser(options);\n this.screen = new Screen(ctx, options);\n this.options = options;\n const document = new Document(this, options);\n const documentElement = document.createDocumentElement(svg);\n this.document = document;\n this.documentElement = documentElement;\n }\n}\n\nexports.AElement = AElement;\nexports.AnimateColorElement = AnimateColorElement;\nexports.AnimateElement = AnimateElement;\nexports.AnimateTransformElement = AnimateTransformElement;\nexports.BoundingBox = BoundingBox;\nexports.CB1 = CB1;\nexports.CB2 = CB2;\nexports.CB3 = CB3;\nexports.CB4 = CB4;\nexports.Canvg = Canvg;\nexports.CircleElement = CircleElement;\nexports.ClipPathElement = ClipPathElement;\nexports.DefsElement = DefsElement;\nexports.DescElement = DescElement;\nexports.Document = Document;\nexports.Element = Element;\nexports.EllipseElement = EllipseElement;\nexports.FeColorMatrixElement = FeColorMatrixElement;\nexports.FeCompositeElement = FeCompositeElement;\nexports.FeDropShadowElement = FeDropShadowElement;\nexports.FeGaussianBlurElement = FeGaussianBlurElement;\nexports.FeMorphologyElement = FeMorphologyElement;\nexports.FilterElement = FilterElement;\nexports.Font = Font;\nexports.FontElement = FontElement;\nexports.FontFaceElement = FontFaceElement;\nexports.GElement = GElement;\nexports.GlyphElement = GlyphElement;\nexports.GradientElement = GradientElement;\nexports.ImageElement = ImageElement;\nexports.LineElement = LineElement;\nexports.LinearGradientElement = LinearGradientElement;\nexports.MarkerElement = MarkerElement;\nexports.MaskElement = MaskElement;\nexports.Matrix = Matrix;\nexports.MissingGlyphElement = MissingGlyphElement;\nexports.Mouse = Mouse;\nexports.PSEUDO_ZERO = PSEUDO_ZERO;\nexports.Parser = Parser;\nexports.PathElement = PathElement;\nexports.PathParser = PathParser;\nexports.PatternElement = PatternElement;\nexports.Point = Point;\nexports.PolygonElement = PolygonElement;\nexports.PolylineElement = PolylineElement;\nexports.Property = Property;\nexports.QB1 = QB1;\nexports.QB2 = QB2;\nexports.QB3 = QB3;\nexports.RadialGradientElement = RadialGradientElement;\nexports.RectElement = RectElement;\nexports.RenderedElement = RenderedElement;\nexports.Rotate = Rotate;\nexports.SVGElement = SVGElement;\nexports.SVGFontLoader = SVGFontLoader;\nexports.Scale = Scale;\nexports.Screen = Screen;\nexports.Skew = Skew;\nexports.SkewX = SkewX;\nexports.SkewY = SkewY;\nexports.StopElement = StopElement;\nexports.StyleElement = StyleElement;\nexports.SymbolElement = SymbolElement;\nexports.TRefElement = TRefElement;\nexports.TSpanElement = TSpanElement;\nexports.TextElement = TextElement;\nexports.TextPathElement = TextPathElement;\nexports.TitleElement = TitleElement;\nexports.Transform = Transform;\nexports.Translate = Translate;\nexports.UnknownElement = UnknownElement;\nexports.UseElement = UseElement;\nexports.ViewPort = ViewPort;\nexports.compressSpaces = compressSpaces;\nexports.elements = elements;\nexports.getSelectorSpecificity = getSelectorSpecificity;\nexports.normalizeAttributeName = normalizeAttributeName;\nexports.normalizeColor = normalizeColor;\nexports.parseExternalUrl = parseExternalUrl;\nexports.presets = index;\nexports.toMatrixValue = toMatrixValue;\nexports.toNumbers = toNumbers;\nexports.trimLeft = trimLeft;\nexports.trimRight = trimRight;\nexports.vectorMagnitude = vectorMagnitude;\nexports.vectorsAngle = vectorsAngle;\nexports.vectorsRatio = vectorsRatio;\n//# sourceMappingURL=index.cjs.map\n","!function(t,r){\"object\"==typeof exports&&\"undefined\"!=typeof module?r(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],r):r((t=\"undefined\"!=typeof globalThis?globalThis:t||self).svgpathdata={})}(this,(function(t){\"use strict\";\n/*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])})(t,e)};function e(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function a(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}var a=\" \";function i(t){var r=\"\";Array.isArray(t)||(t=[t]);for(var e=0;et.phi1&&(t.phi2-=2*s),1===t.sweepFlag&&t.phi2a)return[];if(0===a)return[[t*e/(t*t+r*r),r*e/(t*t+r*r)]];var i=Math.sqrt(a);return[[(t*e+r*i)/(t*t+r*r),(r*e-t*i)/(t*t+r*r)],[(t*e-r*i)/(t*t+r*r),(r*e+t*i)/(t*t+r*r)]]}var c=Math.PI/180;function m(t,r,e){return(1-e)*t+e*r}function y(t,r,e,a){return t+Math.cos(a/180*s)*r+Math.sin(a/180*s)*e}function p(t,r,e,a){var i=1e-6,n=r-t,o=e-r,s=3*n+3*(a-e)-6*o,u=6*(o-n),h=3*n;return Math.abs(s)O&&(i.sweepFlag=+!i.sweepFlag),i}))}function T(){return function(t){var r={};for(var e in t)r[e]=t[e];return r}}t.ROUND=function(t){function r(r){return Math.round(r*t)/t}return void 0===t&&(t=1e13),o(t),function(t){return void 0!==t.x1&&(t.x1=r(t.x1)),void 0!==t.y1&&(t.y1=r(t.y1)),void 0!==t.x2&&(t.x2=r(t.x2)),void 0!==t.y2&&(t.y2=r(t.y2)),void 0!==t.x&&(t.x=r(t.x)),void 0!==t.y&&(t.y=r(t.y)),void 0!==t.rX&&(t.rX=r(t.rX)),void 0!==t.rY&&(t.rY=r(t.rY)),t}},t.TO_ABS=r,t.TO_REL=function(){return i((function(t,r,e){return t.relative||(void 0!==t.x1&&(t.x1-=r),void 0!==t.y1&&(t.y1-=e),void 0!==t.x2&&(t.x2-=r),void 0!==t.y2&&(t.y2-=e),void 0!==t.x&&(t.x-=r),void 0!==t.y&&(t.y-=e),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,r,e){return void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===e&&(e=!0),i((function(a,i,n,o,s){if(isNaN(o)&&!(a.type&N.MOVE_TO))throw new Error(\"path must start with moveto\");return r&&a.type&N.HORIZ_LINE_TO&&(a.type=N.LINE_TO,a.y=a.relative?0:n),e&&a.type&N.VERT_LINE_TO&&(a.type=N.LINE_TO,a.x=a.relative?0:i),t&&a.type&N.CLOSE_PATH&&(a.type=N.LINE_TO,a.x=a.relative?o-i:o,a.y=a.relative?s-n:s),a.type&N.ARC&&(0===a.rX||0===a.rY)&&(a.type=N.LINE_TO,delete a.rX,delete a.rY,delete a.xRot,delete a.lArcFlag,delete a.sweepFlag),a}))},t.NORMALIZE_ST=e,t.QT_TO_C=a,t.INFO=i,t.SANITIZE=function(t){void 0===t&&(t=0),o(t);var r=NaN,e=NaN,a=NaN,n=NaN;return i((function(i,o,s,u,h){var c=Math.abs,m=!1,y=0,p=0;if(i.type&N.SMOOTH_CURVE_TO&&(y=isNaN(r)?0:o-r,p=isNaN(e)?0:s-e),i.type&(N.CURVE_TO|N.SMOOTH_CURVE_TO)?(r=i.relative?o+i.x2:i.x2,e=i.relative?s+i.y2:i.y2):(r=NaN,e=NaN),i.type&N.SMOOTH_QUAD_TO?(a=isNaN(a)?o:2*o-a,n=isNaN(n)?s:2*s-n):i.type&N.QUAD_TO?(a=i.relative?o+i.x1:i.x1,n=i.relative?s+i.y1:i.y2):(a=NaN,n=NaN),i.type&N.LINE_COMMANDS||i.type&N.ARC&&(0===i.rX||0===i.rY||!i.lArcFlag)||i.type&N.CURVE_TO||i.type&N.SMOOTH_CURVE_TO||i.type&N.QUAD_TO||i.type&N.SMOOTH_QUAD_TO){var f=void 0===i.x?0:i.relative?i.x:i.x-o,T=void 0===i.y?0:i.relative?i.y:i.y-s;y=isNaN(a)?void 0===i.x1?y:i.relative?i.x:i.x1-o:a-o,p=isNaN(n)?void 0===i.y1?p:i.relative?i.y:i.y1-s:n-s;var O=void 0===i.x2?0:i.relative?i.x:i.x2-o,l=void 0===i.y2?0:i.relative?i.y:i.y2-s;c(f)<=t&&c(T)<=t&&c(y)<=t&&c(p)<=t&&c(O)<=t&&c(l)<=t&&(m=!0)}return i.type&N.CLOSE_PATH&&c(o-u)<=t&&c(s-h)<=t&&(m=!0),m?[]:i}))},t.MATRIX=s,t.ROTATE=function(t,r,e){void 0===r&&(r=0),void 0===e&&(e=0),o(t,r,e);var a=Math.sin(t),i=Math.cos(t);return s(i,a,-a,i,r-r*i+e*a,e-r*a-e*i)},t.TRANSLATE=function(t,r){return void 0===r&&(r=0),o(t,r),s(1,0,0,1,t,r)},t.SCALE=function(t,r){return void 0===r&&(r=t),o(t,r),s(t,0,0,r,0,0)},t.SKEW_X=function(t){return o(t),s(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return o(t),s(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),o(t),s(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),o(t),s(1,0,0,-1,0,t)},t.A_TO_C=function(){return i((function(t,r,e){return N.ARC===t.type?function(t,r,e){var a,i,o,s;t.cX||u(t,r,e);for(var h=Math.min(t.phi1,t.phi2),y=Math.max(t.phi1,t.phi2)-h,p=Math.ceil(y/90),f=new Array(p),T=r,O=e,l=0;lc.maxX&&(c.maxX=t),tc.maxY&&(c.maxY=t),tH&&m(f(e,i.x1,i.x2,i.x,H))}for(var v=0,_=p(a,i.y1,i.y2,i.y);v<_.length;v++){0<(H=_[v])&&1>H&&T(f(a,i.y1,i.y2,i.y,H))}}if(i.type&N.ARC){m(i.x),T(i.y),u(i,e,a);for(var d=i.xRot/180*Math.PI,x=Math.cos(d)*i.rX,A=Math.sin(d)*i.rX,E=-Math.sin(d)*i.rY,C=Math.cos(d)*i.rY,M=i.phi1i.phi2?[i.phi2+360,i.phi1+360]:[i.phi2,i.phi1],R=M[0],S=M[1],g=function(t){var r=t[0],e=t[1],a=180*Math.atan2(e,r)/Math.PI;return aR&&HR&&Hu)throw new SyntaxError('Expected positive number, got \"'+u+'\" at index \"'+i+'\"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&\"0\"!==this.curNumber&&\"1\"!==this.curNumber)throw new SyntaxError('Expected a flag, got \"'+this.curNumber+'\" at index \"'+i+'\"');this.curArgs.push(u),this.curArgs.length===d[this.curCommandType]&&(N.HORIZ_LINE_TO===this.curCommandType?a({type:N.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):N.VERT_LINE_TO===this.curCommandType?a({type:N.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===N.MOVE_TO||this.curCommandType===N.LINE_TO||this.curCommandType===N.SMOOTH_QUAD_TO?(a({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),N.MOVE_TO===this.curCommandType&&(this.curCommandType=N.LINE_TO)):this.curCommandType===N.CURVE_TO?a({type:N.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===N.SMOOTH_CURVE_TO?a({type:N.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===N.QUAD_TO?a({type:N.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===N.ARC&&a({type:N.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber=\"\",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!l(n))if(\",\"===n&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(\"+\"!==n&&\"-\"!==n&&\".\"!==n)if(s)this.curNumber=n,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError(\"Unterminated command at index \"+i+\".\");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character \"'+n+'\" at index '+i+\". Command cannot follow comma\");if(this.canParseCommandOrComma=!1,\"z\"!==n&&\"Z\"!==n)if(\"h\"===n||\"H\"===n)this.curCommandType=N.HORIZ_LINE_TO,this.curCommandRelative=\"h\"===n;else if(\"v\"===n||\"V\"===n)this.curCommandType=N.VERT_LINE_TO,this.curCommandRelative=\"v\"===n;else if(\"m\"===n||\"M\"===n)this.curCommandType=N.MOVE_TO,this.curCommandRelative=\"m\"===n;else if(\"l\"===n||\"L\"===n)this.curCommandType=N.LINE_TO,this.curCommandRelative=\"l\"===n;else if(\"c\"===n||\"C\"===n)this.curCommandType=N.CURVE_TO,this.curCommandRelative=\"c\"===n;else if(\"s\"===n||\"S\"===n)this.curCommandType=N.SMOOTH_CURVE_TO,this.curCommandRelative=\"s\"===n;else if(\"q\"===n||\"Q\"===n)this.curCommandType=N.QUAD_TO,this.curCommandRelative=\"q\"===n;else if(\"t\"===n||\"T\"===n)this.curCommandType=N.SMOOTH_QUAD_TO,this.curCommandRelative=\"t\"===n;else{if(\"a\"!==n&&\"A\"!==n)throw new SyntaxError('Unexpected character \"'+n+'\" at index '+i+\".\");this.curCommandType=N.ARC,this.curCommandRelative=\"a\"===n}else r.push({type:N.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=n,this.curNumberHasDecimal=\".\"===n}else this.curNumber+=n,this.curNumberHasDecimal=!0;else this.curNumber+=n;else this.curNumber+=n,this.curNumberHasExp=!0;else this.curNumber+=n,this.curNumberHasExpDigits=this.curNumberHasExp}return r},r.prototype.transform=function(t){return Object.create(this,{parse:{value:function(r,e){void 0===e&&(e=[]);for(var a=0,i=Object.getPrototypeOf(this).parse.call(this,r);a b ? 1 : a >= b ? 0 : NaN;\n}\n","import {slice} from \"./array.js\";\nimport bisect from \"./bisect.js\";\nimport constant from \"./constant.js\";\nimport extent from \"./extent.js\";\nimport identity from \"./identity.js\";\nimport nice from \"./nice.js\";\nimport ticks, {tickIncrement} from \"./ticks.js\";\nimport sturges from \"./threshold/sturges.js\";\n\nexport default function bin() {\n var value = identity,\n domain = extent,\n threshold = sturges;\n\n function histogram(data) {\n if (!Array.isArray(data)) data = Array.from(data);\n\n var i,\n n = data.length,\n x,\n step,\n values = new Array(n);\n\n for (i = 0; i < n; ++i) {\n values[i] = value(data[i], i, data);\n }\n\n var xz = domain(values),\n x0 = xz[0],\n x1 = xz[1],\n tz = threshold(values, x0, x1);\n\n // Convert number of thresholds into uniform thresholds, and nice the\n // default domain accordingly.\n if (!Array.isArray(tz)) {\n const max = x1, tn = +tz;\n if (domain === extent) [x0, x1] = nice(x0, x1, tn);\n tz = ticks(x0, x1, tn);\n\n // If the domain is aligned with the first tick (which it will by\n // default), then we can use quantization rather than bisection to bin\n // values, which is substantially faster.\n if (tz[0] <= x0) step = tickIncrement(x0, x1, tn);\n\n // If the last threshold is coincident with the domain’s upper bound, the\n // last bin will be zero-width. If the default domain is used, and this\n // last threshold is coincident with the maximum input value, we can\n // extend the niced upper bound by one tick to ensure uniform bin widths;\n // otherwise, we simply remove the last threshold. Note that we don’t\n // coerce values or the domain to numbers, and thus must be careful to\n // compare order (>=) rather than strict equality (===)!\n if (tz[tz.length - 1] >= x1) {\n if (max >= x1 && domain === extent) {\n const step = tickIncrement(x0, x1, tn);\n if (isFinite(step)) {\n if (step > 0) {\n x1 = (Math.floor(x1 / step) + 1) * step;\n } else if (step < 0) {\n x1 = (Math.ceil(x1 * -step) + 1) / -step;\n }\n }\n } else {\n tz.pop();\n }\n }\n }\n\n // Remove any thresholds outside the domain.\n // Be careful not to mutate an array owned by the user!\n var m = tz.length, a = 0, b = m;\n while (tz[a] <= x0) ++a;\n while (tz[b - 1] > x1) --b;\n if (a || b < m) tz = tz.slice(a, b), m = b - a;\n\n var bins = new Array(m + 1),\n bin;\n\n // Initialize bins.\n for (i = 0; i <= m; ++i) {\n bin = bins[i] = [];\n bin.x0 = i > 0 ? tz[i - 1] : x0;\n bin.x1 = i < m ? tz[i] : x1;\n }\n\n // Assign data to bins by value, ignoring any outside the domain.\n if (isFinite(step)) {\n if (step > 0) {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n bins[Math.min(m, Math.floor((x - x0) / step))].push(data[i]);\n }\n }\n } else if (step < 0) {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n const j = Math.floor((x0 - x) * step);\n bins[Math.min(m, j + (tz[j] <= x))].push(data[i]); // handle off-by-one due to rounding\n }\n }\n }\n } else {\n for (i = 0; i < n; ++i) {\n if ((x = values[i]) != null && x0 <= x && x <= x1) {\n bins[bisect(tz, x, 0, m)].push(data[i]);\n }\n }\n }\n\n return bins;\n }\n\n histogram.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(_), histogram) : value;\n };\n\n histogram.domain = function(_) {\n return arguments.length ? (domain = typeof _ === \"function\" ? _ : constant([_[0], _[1]]), histogram) : domain;\n };\n\n histogram.thresholds = function(_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : constant(Array.isArray(_) ? slice.call(_) : _), histogram) : threshold;\n };\n\n return histogram;\n}\n","import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n","import ascending from \"./ascending.js\";\nimport descending from \"./descending.js\";\n\nexport default function bisector(f) {\n let compare1, compare2, delta;\n\n // If an accessor is specified, promote it to a comparator. In this case we\n // can test whether the search value is (self-) comparable. We can’t do this\n // for a comparator (except for specific, known comparators) because we can’t\n // tell if the comparator is symmetric, and an asymmetric comparator can’t be\n // used to test whether a single value is comparable.\n if (f.length !== 2) {\n compare1 = ascending;\n compare2 = (d, x) => ascending(f(d), x);\n delta = (d, x) => f(d) - x;\n } else {\n compare1 = f === ascending || f === descending ? f : zero;\n compare2 = f;\n delta = f;\n }\n\n function left(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function right(a, x, lo = 0, hi = a.length) {\n if (lo < hi) {\n if (compare1(x, x) !== 0) return hi;\n do {\n const mid = (lo + hi) >>> 1;\n if (compare2(a[mid], x) <= 0) lo = mid + 1;\n else hi = mid;\n } while (lo < hi);\n }\n return lo;\n }\n\n function center(a, x, lo = 0, hi = a.length) {\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction zero() {\n return 0;\n}\n","export function blur(values, r) {\n if (!((r = +r) >= 0)) throw new RangeError(\"invalid r\");\n let length = values.length;\n if (!((length = Math.floor(length)) >= 0)) throw new RangeError(\"invalid length\");\n if (!length || !r) return values;\n const blur = blurf(r);\n const temp = values.slice();\n blur(values, temp, 0, length, 1);\n blur(temp, values, 0, length, 1);\n blur(values, temp, 0, length, 1);\n return values;\n}\n\nexport const blur2 = Blur2(blurf);\n\nexport const blurImage = Blur2(blurfImage);\n\nfunction Blur2(blur) {\n return function(data, rx, ry = rx) {\n if (!((rx = +rx) >= 0)) throw new RangeError(\"invalid rx\");\n if (!((ry = +ry) >= 0)) throw new RangeError(\"invalid ry\");\n let {data: values, width, height} = data;\n if (!((width = Math.floor(width)) >= 0)) throw new RangeError(\"invalid width\");\n if (!((height = Math.floor(height !== undefined ? height : values.length / width)) >= 0)) throw new RangeError(\"invalid height\");\n if (!width || !height || (!rx && !ry)) return data;\n const blurx = rx && blur(rx);\n const blury = ry && blur(ry);\n const temp = values.slice();\n if (blurx && blury) {\n blurh(blurx, temp, values, width, height);\n blurh(blurx, values, temp, width, height);\n blurh(blurx, temp, values, width, height);\n blurv(blury, values, temp, width, height);\n blurv(blury, temp, values, width, height);\n blurv(blury, values, temp, width, height);\n } else if (blurx) {\n blurh(blurx, values, temp, width, height);\n blurh(blurx, temp, values, width, height);\n blurh(blurx, values, temp, width, height);\n } else if (blury) {\n blurv(blury, values, temp, width, height);\n blurv(blury, temp, values, width, height);\n blurv(blury, values, temp, width, height);\n }\n return data;\n };\n}\n\nfunction blurh(blur, T, S, w, h) {\n for (let y = 0, n = w * h; y < n;) {\n blur(T, S, y, y += w, 1);\n }\n}\n\nfunction blurv(blur, T, S, w, h) {\n for (let x = 0, n = w * h; x < w; ++x) {\n blur(T, S, x, x + n, w);\n }\n}\n\nfunction blurfImage(radius) {\n const blur = blurf(radius);\n return (T, S, start, stop, step) => {\n start <<= 2, stop <<= 2, step <<= 2;\n blur(T, S, start + 0, stop + 0, step);\n blur(T, S, start + 1, stop + 1, step);\n blur(T, S, start + 2, stop + 2, step);\n blur(T, S, start + 3, stop + 3, step);\n };\n}\n\n// Given a target array T, a source array S, sets each value T[i] to the average\n// of {S[i - r], …, S[i], …, S[i + r]}, where r = ⌊radius⌋, start <= i < stop,\n// for each i, i + step, i + 2 * step, etc., and where S[j] is clamped between\n// S[start] (inclusive) and S[stop] (exclusive). If the given radius is not an\n// integer, S[i - r - 1] and S[i + r + 1] are added to the sum, each weighted\n// according to r - ⌊radius⌋.\nfunction blurf(radius) {\n const radius0 = Math.floor(radius);\n if (radius0 === radius) return bluri(radius);\n const t = radius - radius0;\n const w = 2 * radius + 1;\n return (T, S, start, stop, step) => { // stop must be aligned!\n if (!((stop -= step) >= start)) return; // inclusive stop\n let sum = radius0 * S[start];\n const s0 = step * radius0;\n const s1 = s0 + step;\n for (let i = start, j = start + s0; i < j; i += step) {\n sum += S[Math.min(stop, i)];\n }\n for (let i = start, j = stop; i <= j; i += step) {\n sum += S[Math.min(stop, i + s0)];\n T[i] = (sum + t * (S[Math.max(start, i - s1)] + S[Math.min(stop, i + s1)])) / w;\n sum -= S[Math.max(start, i - s0)];\n }\n };\n}\n\n// Like blurf, but optimized for integer radius.\nfunction bluri(radius) {\n const w = 2 * radius + 1;\n return (T, S, start, stop, step) => { // stop must be aligned!\n if (!((stop -= step) >= start)) return; // inclusive stop\n let sum = radius * S[start];\n const s = step * radius;\n for (let i = start, j = start + s; i < j; i += step) {\n sum += S[Math.min(stop, i)];\n }\n for (let i = start, j = stop; i <= j; i += step) {\n sum += S[Math.min(stop, i + s)];\n T[i] = sum / w;\n sum -= S[Math.max(start, i - s)];\n }\n };\n}\n","export default function constant(x) {\n return () => x;\n}\n","export default function count(values, valueof) {\n let count = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n ++count;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n ++count;\n }\n }\n }\n return count;\n}\n","function length(array) {\n return array.length | 0;\n}\n\nfunction empty(length) {\n return !(length > 0);\n}\n\nfunction arrayify(values) {\n return typeof values !== \"object\" || \"length\" in values ? values : Array.from(values);\n}\n\nfunction reducer(reduce) {\n return values => reduce(...values);\n}\n\nexport default function cross(...values) {\n const reduce = typeof values[values.length - 1] === \"function\" && reducer(values.pop());\n values = values.map(arrayify);\n const lengths = values.map(length);\n const j = values.length - 1;\n const index = new Array(j + 1).fill(0);\n const product = [];\n if (j < 0 || lengths.some(empty)) return product;\n while (true) {\n product.push(index.map((j, i) => values[i][j]));\n let i = j;\n while (++index[i] === lengths[i]) {\n if (i === 0) return reduce ? product.map(reduce) : product;\n index[i--] = 0;\n }\n }\n}\n","export default function cumsum(values, valueof) {\n var sum = 0, index = 0;\n return Float64Array.from(values, valueof === undefined\n ? v => (sum += +v || 0)\n : v => (sum += +valueof(v, index++, values) || 0));\n}","export default function descending(a, b) {\n return a == null || b == null ? NaN\n : b < a ? -1\n : b > a ? 1\n : b >= a ? 0\n : NaN;\n}\n","import variance from \"./variance.js\";\n\nexport default function deviation(values, valueof) {\n const v = variance(values, valueof);\n return v ? Math.sqrt(v) : v;\n}\n","import {InternSet} from \"internmap\";\n\nexport default function difference(values, ...others) {\n values = new InternSet(values);\n for (const other of others) {\n for (const value of other) {\n values.delete(value);\n }\n }\n return values;\n}\n","import {InternSet} from \"internmap\";\n\nexport default function disjoint(values, other) {\n const iterator = other[Symbol.iterator](), set = new InternSet();\n for (const v of values) {\n if (set.has(v)) return false;\n let value, done;\n while (({value, done} = iterator.next())) {\n if (done) break;\n if (Object.is(v, value)) return false;\n set.add(value);\n }\n }\n return true;\n}\n","export default function every(values, test) {\n if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n let index = -1;\n for (const value of values) {\n if (!test(value, ++index, values)) {\n return false;\n }\n }\n return true;\n}\n","export default function extent(values, valueof) {\n let min;\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n }\n return [min, max];\n}\n","export default function filter(values, test) {\n if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n const array = [];\n let index = -1;\n for (const value of values) {\n if (test(value, ++index, values)) {\n array.push(value);\n }\n }\n return array;\n}\n","// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n constructor() {\n this._partials = new Float64Array(32);\n this._n = 0;\n }\n add(x) {\n const p = this._partials;\n let i = 0;\n for (let j = 0; j < this._n && j < 32; j++) {\n const y = p[j],\n hi = x + y,\n lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n if (lo) p[i++] = lo;\n x = hi;\n }\n p[i] = x;\n this._n = i + 1;\n return this;\n }\n valueOf() {\n const p = this._partials;\n let n = this._n, x, y, lo, hi = 0;\n if (n > 0) {\n hi = p[--n];\n while (n > 0) {\n x = hi;\n y = p[--n];\n hi = x + y;\n lo = y - (hi - x);\n if (lo) break;\n }\n if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n y = lo * 2;\n x = hi + y;\n if (y == x - hi) hi = x;\n }\n }\n return hi;\n }\n}\n\nexport function fsum(values, valueof) {\n const adder = new Adder();\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n adder.add(value);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n adder.add(value);\n }\n }\n }\n return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n const adder = new Adder();\n let index = -1;\n return Float64Array.from(values, valueof === undefined\n ? v => adder.add(+v || 0)\n : v => adder.add(+valueof(v, ++index, values) || 0)\n );\n}\n","import ascending from \"./ascending.js\";\n\nexport default function greatest(values, compare = ascending) {\n let max;\n let defined = false;\n if (compare.length === 1) {\n let maxValue;\n for (const element of values) {\n const value = compare(element);\n if (defined\n ? ascending(value, maxValue) > 0\n : ascending(value, value) === 0) {\n max = element;\n maxValue = value;\n defined = true;\n }\n }\n } else {\n for (const value of values) {\n if (defined\n ? compare(value, max) > 0\n : compare(value, value) === 0) {\n max = value;\n defined = true;\n }\n }\n }\n return max;\n}\n","import ascending from \"./ascending.js\";\nimport maxIndex from \"./maxIndex.js\";\n\nexport default function greatestIndex(values, compare = ascending) {\n if (compare.length === 1) return maxIndex(values, compare);\n let maxValue;\n let max = -1;\n let index = -1;\n for (const value of values) {\n ++index;\n if (max < 0\n ? compare(value, value) === 0\n : compare(value, maxValue) > 0) {\n maxValue = value;\n max = index;\n }\n }\n return max;\n}\n","import {InternMap} from \"internmap\";\nimport identity from \"./identity.js\";\n\nexport default function group(values, ...keys) {\n return nest(values, identity, identity, keys);\n}\n\nexport function groups(values, ...keys) {\n return nest(values, Array.from, identity, keys);\n}\n\nfunction flatten(groups, keys) {\n for (let i = 1, n = keys.length; i < n; ++i) {\n groups = groups.flatMap(g => g.pop().map(([key, value]) => [...g, key, value]));\n }\n return groups;\n}\n\nexport function flatGroup(values, ...keys) {\n return flatten(groups(values, ...keys), keys);\n}\n\nexport function flatRollup(values, reduce, ...keys) {\n return flatten(rollups(values, reduce, ...keys), keys);\n}\n\nexport function rollup(values, reduce, ...keys) {\n return nest(values, identity, reduce, keys);\n}\n\nexport function rollups(values, reduce, ...keys) {\n return nest(values, Array.from, reduce, keys);\n}\n\nexport function index(values, ...keys) {\n return nest(values, identity, unique, keys);\n}\n\nexport function indexes(values, ...keys) {\n return nest(values, Array.from, unique, keys);\n}\n\nfunction unique(values) {\n if (values.length !== 1) throw new Error(\"duplicate key\");\n return values[0];\n}\n\nfunction nest(values, map, reduce, keys) {\n return (function regroup(values, i) {\n if (i >= keys.length) return reduce(values);\n const groups = new InternMap();\n const keyof = keys[i++];\n let index = -1;\n for (const value of values) {\n const key = keyof(value, ++index, values);\n const group = groups.get(key);\n if (group) group.push(value);\n else groups.set(key, [value]);\n }\n for (const [key, values] of groups) {\n groups.set(key, regroup(values, i));\n }\n return map(groups);\n })(values, 0);\n}\n","import ascending from \"./ascending.js\";\nimport group, {rollup} from \"./group.js\";\nimport sort from \"./sort.js\";\n\nexport default function groupSort(values, reduce, key) {\n return (reduce.length !== 2\n ? sort(rollup(values, reduce, key), (([ak, av], [bk, bv]) => ascending(av, bv) || ascending(ak, bk)))\n : sort(group(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || ascending(ak, bk))))\n .map(([key]) => key);\n}\n","export default function identity(x) {\n return x;\n}\n","export {default as bisect, bisectRight, bisectLeft, bisectCenter} from \"./bisect.js\";\nexport {default as ascending} from \"./ascending.js\";\nexport {default as bisector} from \"./bisector.js\";\nexport {blur, blur2, blurImage} from \"./blur.js\";\nexport {default as count} from \"./count.js\";\nexport {default as cross} from \"./cross.js\";\nexport {default as cumsum} from \"./cumsum.js\";\nexport {default as descending} from \"./descending.js\";\nexport {default as deviation} from \"./deviation.js\";\nexport {default as extent} from \"./extent.js\";\nexport {Adder, fsum, fcumsum} from \"./fsum.js\";\nexport {default as group, flatGroup, flatRollup, groups, index, indexes, rollup, rollups} from \"./group.js\";\nexport {default as groupSort} from \"./groupSort.js\";\nexport {default as bin, default as histogram} from \"./bin.js\"; // Deprecated; use bin.\nexport {default as thresholdFreedmanDiaconis} from \"./threshold/freedmanDiaconis.js\";\nexport {default as thresholdScott} from \"./threshold/scott.js\";\nexport {default as thresholdSturges} from \"./threshold/sturges.js\";\nexport {default as max} from \"./max.js\";\nexport {default as maxIndex} from \"./maxIndex.js\";\nexport {default as mean} from \"./mean.js\";\nexport {default as median, medianIndex} from \"./median.js\";\nexport {default as merge} from \"./merge.js\";\nexport {default as min} from \"./min.js\";\nexport {default as minIndex} from \"./minIndex.js\";\nexport {default as mode} from \"./mode.js\";\nexport {default as nice} from \"./nice.js\";\nexport {default as pairs} from \"./pairs.js\";\nexport {default as permute} from \"./permute.js\";\nexport {default as quantile, quantileIndex, quantileSorted} from \"./quantile.js\";\nexport {default as quickselect} from \"./quickselect.js\";\nexport {default as range} from \"./range.js\";\nexport {default as rank} from \"./rank.js\";\nexport {default as least} from \"./least.js\";\nexport {default as leastIndex} from \"./leastIndex.js\";\nexport {default as greatest} from \"./greatest.js\";\nexport {default as greatestIndex} from \"./greatestIndex.js\";\nexport {default as scan} from \"./scan.js\"; // Deprecated; use leastIndex.\nexport {default as shuffle, shuffler} from \"./shuffle.js\";\nexport {default as sum} from \"./sum.js\";\nexport {default as ticks, tickIncrement, tickStep} from \"./ticks.js\";\nexport {default as transpose} from \"./transpose.js\";\nexport {default as variance} from \"./variance.js\";\nexport {default as zip} from \"./zip.js\";\nexport {default as every} from \"./every.js\";\nexport {default as some} from \"./some.js\";\nexport {default as filter} from \"./filter.js\";\nexport {default as map} from \"./map.js\";\nexport {default as reduce} from \"./reduce.js\";\nexport {default as reverse} from \"./reverse.js\";\nexport {default as sort} from \"./sort.js\";\nexport {default as difference} from \"./difference.js\";\nexport {default as disjoint} from \"./disjoint.js\";\nexport {default as intersection} from \"./intersection.js\";\nexport {default as subset} from \"./subset.js\";\nexport {default as superset} from \"./superset.js\";\nexport {default as union} from \"./union.js\";\nexport {InternMap, InternSet} from \"internmap\";\n","import {InternSet} from \"internmap\";\n\nexport default function intersection(values, ...others) {\n values = new InternSet(values);\n others = others.map(set);\n out: for (const value of values) {\n for (const other of others) {\n if (!other.has(value)) {\n values.delete(value);\n continue out;\n }\n }\n }\n return values;\n}\n\nfunction set(values) {\n return values instanceof InternSet ? values : new InternSet(values);\n}\n","import ascending from \"./ascending.js\";\n\nexport default function least(values, compare = ascending) {\n let min;\n let defined = false;\n if (compare.length === 1) {\n let minValue;\n for (const element of values) {\n const value = compare(element);\n if (defined\n ? ascending(value, minValue) < 0\n : ascending(value, value) === 0) {\n min = element;\n minValue = value;\n defined = true;\n }\n }\n } else {\n for (const value of values) {\n if (defined\n ? compare(value, min) < 0\n : compare(value, value) === 0) {\n min = value;\n defined = true;\n }\n }\n }\n return min;\n}\n","import ascending from \"./ascending.js\";\nimport minIndex from \"./minIndex.js\";\n\nexport default function leastIndex(values, compare = ascending) {\n if (compare.length === 1) return minIndex(values, compare);\n let minValue;\n let min = -1;\n let index = -1;\n for (const value of values) {\n ++index;\n if (min < 0\n ? compare(value, value) === 0\n : compare(value, minValue) < 0) {\n minValue = value;\n min = index;\n }\n }\n return min;\n}\n","export default function map(values, mapper) {\n if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n if (typeof mapper !== \"function\") throw new TypeError(\"mapper is not a function\");\n return Array.from(values, (value, index) => mapper(value, index, values));\n}\n","export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n","export default function maxIndex(values, valueof) {\n let max;\n let maxIndex = -1;\n let index = -1;\n if (valueof === undefined) {\n for (const value of values) {\n ++index;\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value, maxIndex = index;\n }\n }\n } else {\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value, maxIndex = index;\n }\n }\n }\n return maxIndex;\n}\n","export default function mean(values, valueof) {\n let count = 0;\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n ++count, sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n ++count, sum += value;\n }\n }\n }\n if (count) return sum / count;\n}\n","import quantile, {quantileIndex} from \"./quantile.js\";\n\nexport default function median(values, valueof) {\n return quantile(values, 0.5, valueof);\n}\n\nexport function medianIndex(values, valueof) {\n return quantileIndex(values, 0.5, valueof);\n}\n","function* flatten(arrays) {\n for (const array of arrays) {\n yield* array;\n }\n}\n\nexport default function merge(arrays) {\n return Array.from(flatten(arrays));\n}\n","export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n","export default function minIndex(values, valueof) {\n let min;\n let minIndex = -1;\n let index = -1;\n if (valueof === undefined) {\n for (const value of values) {\n ++index;\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value, minIndex = index;\n }\n }\n } else {\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value, minIndex = index;\n }\n }\n }\n return minIndex;\n}\n","import {InternMap} from \"internmap\";\n\nexport default function mode(values, valueof) {\n const counts = new InternMap();\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && value >= value) {\n counts.set(value, (counts.get(value) || 0) + 1);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && value >= value) {\n counts.set(value, (counts.get(value) || 0) + 1);\n }\n }\n }\n let modeValue;\n let modeCount = 0;\n for (const [value, count] of counts) {\n if (count > modeCount) {\n modeCount = count;\n modeValue = value;\n }\n }\n return modeValue;\n}\n","import {tickIncrement} from \"./ticks.js\";\n\nexport default function nice(start, stop, count) {\n let prestep;\n while (true) {\n const step = tickIncrement(start, stop, count);\n if (step === prestep || step === 0 || !isFinite(step)) {\n return [start, stop];\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n }\n prestep = step;\n }\n}\n","export default function number(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n","export default function pairs(values, pairof = pair) {\n const pairs = [];\n let previous;\n let first = false;\n for (const value of values) {\n if (first) pairs.push(pairof(previous, value));\n previous = value;\n first = true;\n }\n return pairs;\n}\n\nexport function pair(a, b) {\n return [a, b];\n}\n","export default function permute(source, keys) {\n return Array.from(keys, key => source[key]);\n}\n","import max from \"./max.js\";\nimport maxIndex from \"./maxIndex.js\";\nimport min from \"./min.js\";\nimport minIndex from \"./minIndex.js\";\nimport quickselect from \"./quickselect.js\";\nimport number, {numbers} from \"./number.js\";\nimport {ascendingDefined} from \"./sort.js\";\nimport greatest from \"./greatest.js\";\n\nexport default function quantile(values, p, valueof) {\n values = Float64Array.from(numbers(values, valueof));\n if (!(n = values.length) || isNaN(p = +p)) return;\n if (p <= 0 || n < 2) return min(values);\n if (p >= 1) return max(values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),\n value1 = min(values.subarray(i0 + 1));\n return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileSorted(values, p, valueof = number) {\n if (!(n = values.length) || isNaN(p = +p)) return;\n if (p <= 0 || n < 2) return +valueof(values[0], 0, values);\n if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = +valueof(values[i0], i0, values),\n value1 = +valueof(values[i0 + 1], i0 + 1, values);\n return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileIndex(values, p, valueof = number) {\n if (isNaN(p = +p)) return;\n numbers = Float64Array.from(values, (_, i) => number(valueof(values[i], i, values)));\n if (p <= 0) return minIndex(numbers);\n if (p >= 1) return maxIndex(numbers);\n var numbers,\n index = Uint32Array.from(values, (_, i) => i),\n j = numbers.length - 1,\n i = Math.floor(j * p);\n quickselect(index, i, 0, j, (i, j) => ascendingDefined(numbers[i], numbers[j]));\n i = greatest(index.subarray(0, i + 1), (i) => numbers[i]);\n return i >= 0 ? i : -1;\n}\n","import {ascendingDefined, compareDefined} from \"./sort.js\";\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nexport default function quickselect(array, k, left = 0, right = Infinity, compare) {\n k = Math.floor(k);\n left = Math.floor(Math.max(0, left));\n right = Math.floor(Math.min(array.length - 1, right));\n\n if (!(left <= k && k <= right)) return array;\n\n compare = compare === undefined ? ascendingDefined : compareDefined(compare);\n\n while (right > left) {\n if (right - left > 600) {\n const n = right - left + 1;\n const m = k - left + 1;\n const z = Math.log(n);\n const s = 0.5 * Math.exp(2 * z / 3);\n const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n quickselect(array, k, newLeft, newRight, compare);\n }\n\n const t = array[k];\n let i = left;\n let j = right;\n\n swap(array, left, k);\n if (compare(array[right], t) > 0) swap(array, left, right);\n\n while (i < j) {\n swap(array, i, j), ++i, --j;\n while (compare(array[i], t) < 0) ++i;\n while (compare(array[j], t) > 0) --j;\n }\n\n if (compare(array[left], t) === 0) swap(array, left, j);\n else ++j, swap(array, j, right);\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n\n return array;\n}\n\nfunction swap(array, i, j) {\n const t = array[i];\n array[i] = array[j];\n array[j] = t;\n}\n","export default function range(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n","import ascending from \"./ascending.js\";\nimport {ascendingDefined, compareDefined} from \"./sort.js\";\n\nexport default function rank(values, valueof = ascending) {\n if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n let V = Array.from(values);\n const R = new Float64Array(V.length);\n if (valueof.length !== 2) V = V.map(valueof), valueof = ascending;\n const compareIndex = (i, j) => valueof(V[i], V[j]);\n let k, r;\n values = Uint32Array.from(V, (_, i) => i);\n // Risky chaining due to Safari 14 https://github.com/d3/d3-array/issues/123\n values.sort(valueof === ascending ? (i, j) => ascendingDefined(V[i], V[j]) : compareDefined(compareIndex));\n values.forEach((j, i) => {\n const c = compareIndex(j, k === undefined ? j : k);\n if (c >= 0) {\n if (k === undefined || c > 0) k = j, r = i;\n R[j] = r;\n } else {\n R[j] = NaN;\n }\n });\n return R;\n}\n","export default function reduce(values, reducer, value) {\n if (typeof reducer !== \"function\") throw new TypeError(\"reducer is not a function\");\n const iterator = values[Symbol.iterator]();\n let done, next, index = -1;\n if (arguments.length < 3) {\n ({done, value} = iterator.next());\n if (done) return;\n ++index;\n }\n while (({done, value: next} = iterator.next()), !done) {\n value = reducer(value, next, ++index, values);\n }\n return value;\n}\n","export default function reverse(values) {\n if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n return Array.from(values).reverse();\n}\n","import leastIndex from \"./leastIndex.js\";\n\nexport default function scan(values, compare) {\n const index = leastIndex(values, compare);\n return index < 0 ? undefined : index;\n}\n","export default shuffler(Math.random);\n\nexport function shuffler(random) {\n return function shuffle(array, i0 = 0, i1 = array.length) {\n let m = i1 - (i0 = +i0);\n while (m) {\n const i = random() * m-- | 0, t = array[m + i0];\n array[m + i0] = array[i + i0];\n array[i + i0] = t;\n }\n return array;\n };\n}\n","export default function some(values, test) {\n if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n let index = -1;\n for (const value of values) {\n if (test(value, ++index, values)) {\n return true;\n }\n }\n return false;\n}\n","import ascending from \"./ascending.js\";\nimport permute from \"./permute.js\";\n\nexport default function sort(values, ...F) {\n if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n values = Array.from(values);\n let [f] = F;\n if ((f && f.length !== 2) || F.length > 1) {\n const index = Uint32Array.from(values, (d, i) => i);\n if (F.length > 1) {\n F = F.map(f => values.map(f));\n index.sort((i, j) => {\n for (const f of F) {\n const c = ascendingDefined(f[i], f[j]);\n if (c) return c;\n }\n });\n } else {\n f = values.map(f);\n index.sort((i, j) => ascendingDefined(f[i], f[j]));\n }\n return permute(values, index);\n }\n return values.sort(compareDefined(f));\n}\n\nexport function compareDefined(compare = ascending) {\n if (compare === ascending) return ascendingDefined;\n if (typeof compare !== \"function\") throw new TypeError(\"compare is not a function\");\n return (a, b) => {\n const x = compare(a, b);\n if (x || x === 0) return x;\n return (compare(b, b) === 0) - (compare(a, a) === 0);\n };\n}\n\nexport function ascendingDefined(a, b) {\n return (a == null || !(a >= a)) - (b == null || !(b >= b)) || (a < b ? -1 : a > b ? 1 : 0);\n}\n","import superset from \"./superset.js\";\n\nexport default function subset(values, other) {\n return superset(other, values);\n}\n","export default function sum(values, valueof) {\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n sum += value;\n }\n }\n }\n return sum;\n}\n","export default function superset(values, other) {\n const iterator = values[Symbol.iterator](), set = new Set();\n for (const o of other) {\n const io = intern(o);\n if (set.has(io)) continue;\n let value, done;\n while (({value, done} = iterator.next())) {\n if (done) return false;\n const ivalue = intern(value);\n set.add(ivalue);\n if (Object.is(io, ivalue)) break;\n }\n }\n return true;\n}\n\nfunction intern(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n","import count from \"../count.js\";\nimport quantile from \"../quantile.js\";\n\nexport default function thresholdFreedmanDiaconis(values, min, max) {\n const c = count(values), d = quantile(values, 0.75) - quantile(values, 0.25);\n return c && d ? Math.ceil((max - min) / (2 * d * Math.pow(c, -1 / 3))) : 1;\n}\n","import count from \"../count.js\";\nimport deviation from \"../deviation.js\";\n\nexport default function thresholdScott(values, min, max) {\n const c = count(values), d = deviation(values);\n return c && d ? Math.ceil((max - min) * Math.cbrt(c) / (3.49 * d)) : 1;\n}\n","import count from \"../count.js\";\n\nexport default function thresholdSturges(values) {\n return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);\n}\n","const e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nfunction tickSpec(start, stop, count) {\n const step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log10(step)),\n error = step / Math.pow(10, power),\n factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;\n let i1, i2, inc;\n if (power < 0) {\n inc = Math.pow(10, -power) / factor;\n i1 = Math.round(start * inc);\n i2 = Math.round(stop * inc);\n if (i1 / inc < start) ++i1;\n if (i2 / inc > stop) --i2;\n inc = -inc;\n } else {\n inc = Math.pow(10, power) * factor;\n i1 = Math.round(start / inc);\n i2 = Math.round(stop / inc);\n if (i1 * inc < start) ++i1;\n if (i2 * inc > stop) --i2;\n }\n if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);\n return [i1, i2, inc];\n}\n\nexport default function ticks(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n if (!(count > 0)) return [];\n if (start === stop) return [start];\n const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);\n if (!(i2 >= i1)) return [];\n const n = i2 - i1 + 1, ticks = new Array(n);\n if (reverse) {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;\n } else {\n if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;\n else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;\n }\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n return tickSpec(start, stop, count)[2];\n}\n\nexport function tickStep(start, stop, count) {\n stop = +stop, start = +start, count = +count;\n const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);\n return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);\n}\n","import min from \"./min.js\";\n\nexport default function transpose(matrix) {\n if (!(n = matrix.length)) return [];\n for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) {\n for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n row[j] = matrix[j][i];\n }\n }\n return transpose;\n}\n\nfunction length(d) {\n return d.length;\n}\n","import {InternSet} from \"internmap\";\n\nexport default function union(...others) {\n const set = new InternSet();\n for (const other of others) {\n for (const o of other) {\n set.add(o);\n }\n }\n return set;\n}\n","export default function variance(values, valueof) {\n let count = 0;\n let delta;\n let mean = 0;\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n delta = value - mean;\n mean += delta / ++count;\n sum += delta * (value - mean);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n delta = value - mean;\n mean += delta / ++count;\n sum += delta * (value - mean);\n }\n }\n }\n if (count > 1) return sum / (count - 1);\n}\n","import transpose from \"./transpose.js\";\n\nexport default function zip() {\n return transpose(arguments);\n}\n","import identity from \"./identity.js\";\n\nvar top = 1,\n right = 2,\n bottom = 3,\n left = 4,\n epsilon = 1e-6;\n\nfunction translateX(x) {\n return \"translate(\" + x + \",0)\";\n}\n\nfunction translateY(y) {\n return \"translate(0,\" + y + \")\";\n}\n\nfunction number(scale) {\n return d => +scale(d);\n}\n\nfunction center(scale, offset) {\n offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;\n if (scale.round()) offset = Math.round(offset);\n return d => +scale(d) + offset;\n}\n\nfunction entering() {\n return !this.__axis;\n}\n\nfunction axis(orient, scale) {\n var tickArguments = [],\n tickValues = null,\n tickFormat = null,\n tickSizeInner = 6,\n tickSizeOuter = 6,\n tickPadding = 3,\n offset = typeof window !== \"undefined\" && window.devicePixelRatio > 1 ? 0 : 0.5,\n k = orient === top || orient === left ? -1 : 1,\n x = orient === left || orient === right ? \"x\" : \"y\",\n transform = orient === top || orient === bottom ? translateX : translateY;\n\n function axis(context) {\n var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,\n format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity) : tickFormat,\n spacing = Math.max(tickSizeInner, 0) + tickPadding,\n range = scale.range(),\n range0 = +range[0] + offset,\n range1 = +range[range.length - 1] + offset,\n position = (scale.bandwidth ? center : number)(scale.copy(), offset),\n selection = context.selection ? context.selection() : context,\n path = selection.selectAll(\".domain\").data([null]),\n tick = selection.selectAll(\".tick\").data(values, scale).order(),\n tickExit = tick.exit(),\n tickEnter = tick.enter().append(\"g\").attr(\"class\", \"tick\"),\n line = tick.select(\"line\"),\n text = tick.select(\"text\");\n\n path = path.merge(path.enter().insert(\"path\", \".tick\")\n .attr(\"class\", \"domain\")\n .attr(\"stroke\", \"currentColor\"));\n\n tick = tick.merge(tickEnter);\n\n line = line.merge(tickEnter.append(\"line\")\n .attr(\"stroke\", \"currentColor\")\n .attr(x + \"2\", k * tickSizeInner));\n\n text = text.merge(tickEnter.append(\"text\")\n .attr(\"fill\", \"currentColor\")\n .attr(x, k * spacing)\n .attr(\"dy\", orient === top ? \"0em\" : orient === bottom ? \"0.71em\" : \"0.32em\"));\n\n if (context !== selection) {\n path = path.transition(context);\n tick = tick.transition(context);\n line = line.transition(context);\n text = text.transition(context);\n\n tickExit = tickExit.transition(context)\n .attr(\"opacity\", epsilon)\n .attr(\"transform\", function(d) { return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute(\"transform\"); });\n\n tickEnter\n .attr(\"opacity\", epsilon)\n .attr(\"transform\", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); });\n }\n\n tickExit.remove();\n\n path\n .attr(\"d\", orient === left || orient === right\n ? (tickSizeOuter ? \"M\" + k * tickSizeOuter + \",\" + range0 + \"H\" + offset + \"V\" + range1 + \"H\" + k * tickSizeOuter : \"M\" + offset + \",\" + range0 + \"V\" + range1)\n : (tickSizeOuter ? \"M\" + range0 + \",\" + k * tickSizeOuter + \"V\" + offset + \"H\" + range1 + \"V\" + k * tickSizeOuter : \"M\" + range0 + \",\" + offset + \"H\" + range1));\n\n tick\n .attr(\"opacity\", 1)\n .attr(\"transform\", function(d) { return transform(position(d) + offset); });\n\n line\n .attr(x + \"2\", k * tickSizeInner);\n\n text\n .attr(x, k * spacing)\n .text(format);\n\n selection.filter(entering)\n .attr(\"fill\", \"none\")\n .attr(\"font-size\", 10)\n .attr(\"font-family\", \"sans-serif\")\n .attr(\"text-anchor\", orient === right ? \"start\" : orient === left ? \"end\" : \"middle\");\n\n selection\n .each(function() { this.__axis = position; });\n }\n\n axis.scale = function(_) {\n return arguments.length ? (scale = _, axis) : scale;\n };\n\n axis.ticks = function() {\n return tickArguments = Array.from(arguments), axis;\n };\n\n axis.tickArguments = function(_) {\n return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis) : tickArguments.slice();\n };\n\n axis.tickValues = function(_) {\n return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis) : tickValues && tickValues.slice();\n };\n\n axis.tickFormat = function(_) {\n return arguments.length ? (tickFormat = _, axis) : tickFormat;\n };\n\n axis.tickSize = function(_) {\n return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeInner = function(_) {\n return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;\n };\n\n axis.tickSizeOuter = function(_) {\n return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;\n };\n\n axis.tickPadding = function(_) {\n return arguments.length ? (tickPadding = +_, axis) : tickPadding;\n };\n\n axis.offset = function(_) {\n return arguments.length ? (offset = +_, axis) : offset;\n };\n\n return axis;\n}\n\nexport function axisTop(scale) {\n return axis(top, scale);\n}\n\nexport function axisRight(scale) {\n return axis(right, scale);\n}\n\nexport function axisBottom(scale) {\n return axis(bottom, scale);\n}\n\nexport function axisLeft(scale) {\n return axis(left, scale);\n}\n","export default function(x) {\n return x;\n}\n","export {\n axisTop,\n axisRight,\n axisBottom,\n axisLeft\n} from \"./axis.js\";\n","import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolate} from \"d3-interpolate\";\nimport {pointer, select} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport BrushEvent from \"./event.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\nvar MODE_DRAG = {name: \"drag\"},\n MODE_SPACE = {name: \"space\"},\n MODE_HANDLE = {name: \"handle\"},\n MODE_CENTER = {name: \"center\"};\n\nconst {abs, max, min} = Math;\n\nfunction number1(e) {\n return [+e[0], +e[1]];\n}\n\nfunction number2(e) {\n return [number1(e[0]), number1(e[1])];\n}\n\nvar X = {\n name: \"x\",\n handles: [\"w\", \"e\"].map(type),\n input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },\n output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }\n};\n\nvar Y = {\n name: \"y\",\n handles: [\"n\", \"s\"].map(type),\n input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },\n output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }\n};\n\nvar XY = {\n name: \"xy\",\n handles: [\"n\", \"w\", \"e\", \"s\", \"nw\", \"ne\", \"sw\", \"se\"].map(type),\n input: function(xy) { return xy == null ? null : number2(xy); },\n output: function(xy) { return xy; }\n};\n\nvar cursors = {\n overlay: \"crosshair\",\n selection: \"move\",\n n: \"ns-resize\",\n e: \"ew-resize\",\n s: \"ns-resize\",\n w: \"ew-resize\",\n nw: \"nwse-resize\",\n ne: \"nesw-resize\",\n se: \"nwse-resize\",\n sw: \"nesw-resize\"\n};\n\nvar flipX = {\n e: \"w\",\n w: \"e\",\n nw: \"ne\",\n ne: \"nw\",\n se: \"sw\",\n sw: \"se\"\n};\n\nvar flipY = {\n n: \"s\",\n s: \"n\",\n nw: \"sw\",\n ne: \"se\",\n se: \"ne\",\n sw: \"nw\"\n};\n\nvar signsX = {\n overlay: +1,\n selection: +1,\n n: null,\n e: +1,\n s: null,\n w: -1,\n nw: -1,\n ne: +1,\n se: +1,\n sw: -1\n};\n\nvar signsY = {\n overlay: +1,\n selection: +1,\n n: -1,\n e: null,\n s: +1,\n w: null,\n nw: -1,\n ne: -1,\n se: +1,\n sw: +1\n};\n\nfunction type(t) {\n return {type: t};\n}\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultExtent() {\n var svg = this.ownerSVGElement || this;\n if (svg.hasAttribute(\"viewBox\")) {\n svg = svg.viewBox.baseVal;\n return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];\n }\n return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\n// Like d3.local, but with the name “__brush” rather than auto-generated.\nfunction local(node) {\n while (!node.__brush) if (!(node = node.parentNode)) return;\n return node.__brush;\n}\n\nfunction empty(extent) {\n return extent[0][0] === extent[1][0]\n || extent[0][1] === extent[1][1];\n}\n\nexport function brushSelection(node) {\n var state = node.__brush;\n return state ? state.dim.output(state.selection) : null;\n}\n\nexport function brushX() {\n return brush(X);\n}\n\nexport function brushY() {\n return brush(Y);\n}\n\nexport default function() {\n return brush(XY);\n}\n\nfunction brush(dim) {\n var extent = defaultExtent,\n filter = defaultFilter,\n touchable = defaultTouchable,\n keys = true,\n listeners = dispatch(\"start\", \"brush\", \"end\"),\n handleSize = 6,\n touchending;\n\n function brush(group) {\n var overlay = group\n .property(\"__brush\", initialize)\n .selectAll(\".overlay\")\n .data([type(\"overlay\")]);\n\n overlay.enter().append(\"rect\")\n .attr(\"class\", \"overlay\")\n .attr(\"pointer-events\", \"all\")\n .attr(\"cursor\", cursors.overlay)\n .merge(overlay)\n .each(function() {\n var extent = local(this).extent;\n select(this)\n .attr(\"x\", extent[0][0])\n .attr(\"y\", extent[0][1])\n .attr(\"width\", extent[1][0] - extent[0][0])\n .attr(\"height\", extent[1][1] - extent[0][1]);\n });\n\n group.selectAll(\".selection\")\n .data([type(\"selection\")])\n .enter().append(\"rect\")\n .attr(\"class\", \"selection\")\n .attr(\"cursor\", cursors.selection)\n .attr(\"fill\", \"#777\")\n .attr(\"fill-opacity\", 0.3)\n .attr(\"stroke\", \"#fff\")\n .attr(\"shape-rendering\", \"crispEdges\");\n\n var handle = group.selectAll(\".handle\")\n .data(dim.handles, function(d) { return d.type; });\n\n handle.exit().remove();\n\n handle.enter().append(\"rect\")\n .attr(\"class\", function(d) { return \"handle handle--\" + d.type; })\n .attr(\"cursor\", function(d) { return cursors[d.type]; });\n\n group\n .each(redraw)\n .attr(\"fill\", \"none\")\n .attr(\"pointer-events\", \"all\")\n .on(\"mousedown.brush\", started)\n .filter(touchable)\n .on(\"touchstart.brush\", started)\n .on(\"touchmove.brush\", touchmoved)\n .on(\"touchend.brush touchcancel.brush\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n brush.move = function(group, selection, event) {\n if (group.tween) {\n group\n .on(\"start.brush\", function(event) { emitter(this, arguments).beforestart().start(event); })\n .on(\"interrupt.brush end.brush\", function(event) { emitter(this, arguments).end(event); })\n .tween(\"brush\", function() {\n var that = this,\n state = that.__brush,\n emit = emitter(that, arguments),\n selection0 = state.selection,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(this, arguments) : selection, state.extent),\n i = interpolate(selection0, selection1);\n\n function tween(t) {\n state.selection = t === 1 && selection1 === null ? null : i(t);\n redraw.call(that);\n emit.brush();\n }\n\n return selection0 !== null && selection1 !== null ? tween : tween(1);\n });\n } else {\n group\n .each(function() {\n var that = this,\n args = arguments,\n state = that.__brush,\n selection1 = dim.input(typeof selection === \"function\" ? selection.apply(that, args) : selection, state.extent),\n emit = emitter(that, args).beforestart();\n\n interrupt(that);\n state.selection = selection1 === null ? null : selection1;\n redraw.call(that);\n emit.start(event).brush(event).end(event);\n });\n }\n };\n\n brush.clear = function(group, event) {\n brush.move(group, null, event);\n };\n\n function redraw() {\n var group = select(this),\n selection = local(this).selection;\n\n if (selection) {\n group.selectAll(\".selection\")\n .style(\"display\", null)\n .attr(\"x\", selection[0][0])\n .attr(\"y\", selection[0][1])\n .attr(\"width\", selection[1][0] - selection[0][0])\n .attr(\"height\", selection[1][1] - selection[0][1]);\n\n group.selectAll(\".handle\")\n .style(\"display\", null)\n .attr(\"x\", function(d) { return d.type[d.type.length - 1] === \"e\" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })\n .attr(\"y\", function(d) { return d.type[0] === \"s\" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })\n .attr(\"width\", function(d) { return d.type === \"n\" || d.type === \"s\" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })\n .attr(\"height\", function(d) { return d.type === \"e\" || d.type === \"w\" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });\n }\n\n else {\n group.selectAll(\".selection,.handle\")\n .style(\"display\", \"none\")\n .attr(\"x\", null)\n .attr(\"y\", null)\n .attr(\"width\", null)\n .attr(\"height\", null);\n }\n }\n\n function emitter(that, args, clean) {\n var emit = that.__brush.emitter;\n return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean);\n }\n\n function Emitter(that, args, clean) {\n this.that = that;\n this.args = args;\n this.state = that.__brush;\n this.active = 0;\n this.clean = clean;\n }\n\n Emitter.prototype = {\n beforestart: function() {\n if (++this.active === 1) this.state.emitter = this, this.starting = true;\n return this;\n },\n start: function(event, mode) {\n if (this.starting) this.starting = false, this.emit(\"start\", event, mode);\n else this.emit(\"brush\", event);\n return this;\n },\n brush: function(event, mode) {\n this.emit(\"brush\", event, mode);\n return this;\n },\n end: function(event, mode) {\n if (--this.active === 0) delete this.state.emitter, this.emit(\"end\", event, mode);\n return this;\n },\n emit: function(type, event, mode) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new BrushEvent(type, {\n sourceEvent: event,\n target: brush,\n selection: dim.output(this.state.selection),\n mode,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function started(event) {\n if (touchending && !event.touches) return;\n if (!filter.apply(this, arguments)) return;\n\n var that = this,\n type = event.target.__data__.type,\n mode = (keys && event.metaKey ? type = \"overlay\" : type) === \"selection\" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE),\n signX = dim === Y ? null : signsX[type],\n signY = dim === X ? null : signsY[type],\n state = local(that),\n extent = state.extent,\n selection = state.selection,\n W = extent[0][0], w0, w1,\n N = extent[0][1], n0, n1,\n E = extent[1][0], e0, e1,\n S = extent[1][1], s0, s1,\n dx = 0,\n dy = 0,\n moving,\n shifting = signX && signY && keys && event.shiftKey,\n lockX,\n lockY,\n points = Array.from(event.touches || [event], t => {\n const i = t.identifier;\n t = pointer(t, that);\n t.point0 = t.slice();\n t.identifier = i;\n return t;\n });\n\n interrupt(that);\n var emit = emitter(that, arguments, true).beforestart();\n\n if (type === \"overlay\") {\n if (selection) moving = true;\n const pts = [points[0], points[1] || points[0]];\n state.selection = selection = [[\n w0 = dim === Y ? W : min(pts[0][0], pts[1][0]),\n n0 = dim === X ? N : min(pts[0][1], pts[1][1])\n ], [\n e0 = dim === Y ? E : max(pts[0][0], pts[1][0]),\n s0 = dim === X ? S : max(pts[0][1], pts[1][1])\n ]];\n if (points.length > 1) move(event);\n } else {\n w0 = selection[0][0];\n n0 = selection[0][1];\n e0 = selection[1][0];\n s0 = selection[1][1];\n }\n\n w1 = w0;\n n1 = n0;\n e1 = e0;\n s1 = s0;\n\n var group = select(that)\n .attr(\"pointer-events\", \"none\");\n\n var overlay = group.selectAll(\".overlay\")\n .attr(\"cursor\", cursors[type]);\n\n if (event.touches) {\n emit.moved = moved;\n emit.ended = ended;\n } else {\n var view = select(event.view)\n .on(\"mousemove.brush\", moved, true)\n .on(\"mouseup.brush\", ended, true);\n if (keys) view\n .on(\"keydown.brush\", keydowned, true)\n .on(\"keyup.brush\", keyupped, true)\n\n dragDisable(event.view);\n }\n\n redraw.call(that);\n emit.start(event, mode.name);\n\n function moved(event) {\n for (const p of event.changedTouches || [event]) {\n for (const d of points)\n if (d.identifier === p.identifier) d.cur = pointer(p, that);\n }\n if (shifting && !lockX && !lockY && points.length === 1) {\n const point = points[0];\n if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1]))\n lockY = true;\n else\n lockX = true;\n }\n for (const point of points)\n if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];\n moving = true;\n noevent(event);\n move(event);\n }\n\n function move(event) {\n const point = points[0], point0 = point.point0;\n var t;\n\n dx = point[0] - point0[0];\n dy = point[1] - point0[1];\n\n switch (mode) {\n case MODE_SPACE:\n case MODE_DRAG: {\n if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;\n if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;\n break;\n }\n case MODE_HANDLE: {\n if (points[1]) {\n if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;\n if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;\n } else {\n if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;\n else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;\n if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;\n else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;\n }\n break;\n }\n case MODE_CENTER: {\n if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));\n if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));\n break;\n }\n }\n\n if (e1 < w1) {\n signX *= -1;\n t = w0, w0 = e0, e0 = t;\n t = w1, w1 = e1, e1 = t;\n if (type in flipX) overlay.attr(\"cursor\", cursors[type = flipX[type]]);\n }\n\n if (s1 < n1) {\n signY *= -1;\n t = n0, n0 = s0, s0 = t;\n t = n1, n1 = s1, s1 = t;\n if (type in flipY) overlay.attr(\"cursor\", cursors[type = flipY[type]]);\n }\n\n if (state.selection) selection = state.selection; // May be set by brush.move!\n if (lockX) w1 = selection[0][0], e1 = selection[1][0];\n if (lockY) n1 = selection[0][1], s1 = selection[1][1];\n\n if (selection[0][0] !== w1\n || selection[0][1] !== n1\n || selection[1][0] !== e1\n || selection[1][1] !== s1) {\n state.selection = [[w1, n1], [e1, s1]];\n redraw.call(that);\n emit.brush(event, mode.name);\n }\n }\n\n function ended(event) {\n nopropagation(event);\n if (event.touches) {\n if (event.touches.length) return;\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n } else {\n dragEnable(event.view, moving);\n view.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\", null);\n }\n group.attr(\"pointer-events\", \"all\");\n overlay.attr(\"cursor\", cursors.overlay);\n if (state.selection) selection = state.selection; // May be set by brush.move (on start)!\n if (empty(selection)) state.selection = null, redraw.call(that);\n emit.end(event, mode.name);\n }\n\n function keydowned(event) {\n switch (event.keyCode) {\n case 16: { // SHIFT\n shifting = signX && signY;\n break;\n }\n case 18: { // ALT\n if (mode === MODE_HANDLE) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n move(event);\n }\n break;\n }\n case 32: { // SPACE; takes priority over ALT\n if (mode === MODE_HANDLE || mode === MODE_CENTER) {\n if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;\n if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;\n mode = MODE_SPACE;\n overlay.attr(\"cursor\", cursors.selection);\n move(event);\n }\n break;\n }\n default: return;\n }\n noevent(event);\n }\n\n function keyupped(event) {\n switch (event.keyCode) {\n case 16: { // SHIFT\n if (shifting) {\n lockX = lockY = shifting = false;\n move(event);\n }\n break;\n }\n case 18: { // ALT\n if (mode === MODE_CENTER) {\n if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n move(event);\n }\n break;\n }\n case 32: { // SPACE\n if (mode === MODE_SPACE) {\n if (event.altKey) {\n if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;\n if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;\n mode = MODE_CENTER;\n } else {\n if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;\n if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;\n mode = MODE_HANDLE;\n }\n overlay.attr(\"cursor\", cursors[type]);\n move(event);\n }\n break;\n }\n default: return;\n }\n noevent(event);\n }\n }\n\n function touchmoved(event) {\n emitter(this, arguments).moved(event);\n }\n\n function touchended(event) {\n emitter(this, arguments).ended(event);\n }\n\n function initialize() {\n var state = this.__brush || {selection: null};\n state.extent = number2(extent.apply(this, arguments));\n state.dim = dim;\n return state;\n }\n\n brush.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant(number2(_)), brush) : extent;\n };\n\n brush.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), brush) : filter;\n };\n\n brush.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), brush) : touchable;\n };\n\n brush.handleSize = function(_) {\n return arguments.length ? (handleSize = +_, brush) : handleSize;\n };\n\n brush.keyModifiers = function(_) {\n return arguments.length ? (keys = !!_, brush) : keys;\n };\n\n brush.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? brush : value;\n };\n\n return brush;\n}\n","export default x => () => x;\n","export default function BrushEvent(type, {\n sourceEvent,\n target,\n selection,\n mode,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n selection: {value: selection, enumerable: true, configurable: true},\n mode: {value: mode, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n","export {\n default as brush,\n brushX,\n brushY,\n brushSelection\n} from \"./brush.js\";\n","export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","export var slice = Array.prototype.slice;\n","import {max, tau} from \"./math.js\";\n\nfunction range(i, j) {\n return Array.from({length: j - i}, (_, k) => i + k);\n}\n\nfunction compareValue(compare) {\n return function(a, b) {\n return compare(\n a.source.value + a.target.value,\n b.source.value + b.target.value\n );\n };\n}\n\nexport default function() {\n return chord(false, false);\n}\n\nexport function chordTranspose() {\n return chord(false, true);\n}\n\nexport function chordDirected() {\n return chord(true, false);\n}\n\nfunction chord(directed, transpose) {\n var padAngle = 0,\n sortGroups = null,\n sortSubgroups = null,\n sortChords = null;\n\n function chord(matrix) {\n var n = matrix.length,\n groupSums = new Array(n),\n groupIndex = range(0, n),\n chords = new Array(n * n),\n groups = new Array(n),\n k = 0, dx;\n\n matrix = Float64Array.from({length: n * n}, transpose\n ? (_, i) => matrix[i % n][i / n | 0]\n : (_, i) => matrix[i / n | 0][i % n]);\n\n // Compute the scaling factor from value to angle in [0, 2pi].\n for (let i = 0; i < n; ++i) {\n let x = 0;\n for (let j = 0; j < n; ++j) x += matrix[i * n + j] + directed * matrix[j * n + i];\n k += groupSums[i] = x;\n }\n k = max(0, tau - padAngle * n) / k;\n dx = k ? padAngle : tau / n;\n\n // Compute the angles for each group and constituent chord.\n {\n let x = 0;\n if (sortGroups) groupIndex.sort((a, b) => sortGroups(groupSums[a], groupSums[b]));\n for (const i of groupIndex) {\n const x0 = x;\n if (directed) {\n const subgroupIndex = range(~n + 1, n).filter(j => j < 0 ? matrix[~j * n + i] : matrix[i * n + j]);\n if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(a < 0 ? -matrix[~a * n + i] : matrix[i * n + a], b < 0 ? -matrix[~b * n + i] : matrix[i * n + b]));\n for (const j of subgroupIndex) {\n if (j < 0) {\n const chord = chords[~j * n + i] || (chords[~j * n + i] = {source: null, target: null});\n chord.target = {index: i, startAngle: x, endAngle: x += matrix[~j * n + i] * k, value: matrix[~j * n + i]};\n } else {\n const chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null});\n chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]};\n }\n }\n groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]};\n } else {\n const subgroupIndex = range(0, n).filter(j => matrix[i * n + j] || matrix[j * n + i]);\n if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(matrix[i * n + a], matrix[i * n + b]));\n for (const j of subgroupIndex) {\n let chord;\n if (i < j) {\n chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null});\n chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]};\n } else {\n chord = chords[j * n + i] || (chords[j * n + i] = {source: null, target: null});\n chord.target = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]};\n if (i === j) chord.source = chord.target;\n }\n if (chord.source && chord.target && chord.source.value < chord.target.value) {\n const source = chord.source;\n chord.source = chord.target;\n chord.target = source;\n }\n }\n groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]};\n }\n x += dx;\n }\n }\n\n // Remove empty chords.\n chords = Object.values(chords);\n chords.groups = groups;\n return sortChords ? chords.sort(sortChords) : chords;\n }\n\n chord.padAngle = function(_) {\n return arguments.length ? (padAngle = max(0, _), chord) : padAngle;\n };\n\n chord.sortGroups = function(_) {\n return arguments.length ? (sortGroups = _, chord) : sortGroups;\n };\n\n chord.sortSubgroups = function(_) {\n return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups;\n };\n\n chord.sortChords = function(_) {\n return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._;\n };\n\n return chord;\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export {default as chord, chordTranspose, chordDirected} from \"./chord.js\";\nexport {default as ribbon, ribbonArrow} from \"./ribbon.js\";\n","export var abs = Math.abs;\nexport var cos = Math.cos;\nexport var sin = Math.sin;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var tau = pi * 2;\nexport var max = Math.max;\nexport var epsilon = 1e-12;\n","import {path} from \"d3-path\";\nimport {slice} from \"./array.js\";\nimport constant from \"./constant.js\";\nimport {abs, cos, epsilon, halfPi, sin} from \"./math.js\";\n\nfunction defaultSource(d) {\n return d.source;\n}\n\nfunction defaultTarget(d) {\n return d.target;\n}\n\nfunction defaultRadius(d) {\n return d.radius;\n}\n\nfunction defaultStartAngle(d) {\n return d.startAngle;\n}\n\nfunction defaultEndAngle(d) {\n return d.endAngle;\n}\n\nfunction defaultPadAngle() {\n return 0;\n}\n\nfunction defaultArrowheadRadius() {\n return 10;\n}\n\nfunction ribbon(headRadius) {\n var source = defaultSource,\n target = defaultTarget,\n sourceRadius = defaultRadius,\n targetRadius = defaultRadius,\n startAngle = defaultStartAngle,\n endAngle = defaultEndAngle,\n padAngle = defaultPadAngle,\n context = null;\n\n function ribbon() {\n var buffer,\n s = source.apply(this, arguments),\n t = target.apply(this, arguments),\n ap = padAngle.apply(this, arguments) / 2,\n argv = slice.call(arguments),\n sr = +sourceRadius.apply(this, (argv[0] = s, argv)),\n sa0 = startAngle.apply(this, argv) - halfPi,\n sa1 = endAngle.apply(this, argv) - halfPi,\n tr = +targetRadius.apply(this, (argv[0] = t, argv)),\n ta0 = startAngle.apply(this, argv) - halfPi,\n ta1 = endAngle.apply(this, argv) - halfPi;\n\n if (!context) context = buffer = path();\n\n if (ap > epsilon) {\n if (abs(sa1 - sa0) > ap * 2 + epsilon) sa1 > sa0 ? (sa0 += ap, sa1 -= ap) : (sa0 -= ap, sa1 += ap);\n else sa0 = sa1 = (sa0 + sa1) / 2;\n if (abs(ta1 - ta0) > ap * 2 + epsilon) ta1 > ta0 ? (ta0 += ap, ta1 -= ap) : (ta0 -= ap, ta1 += ap);\n else ta0 = ta1 = (ta0 + ta1) / 2;\n }\n\n context.moveTo(sr * cos(sa0), sr * sin(sa0));\n context.arc(0, 0, sr, sa0, sa1);\n if (sa0 !== ta0 || sa1 !== ta1) {\n if (headRadius) {\n var hr = +headRadius.apply(this, arguments), tr2 = tr - hr, ta2 = (ta0 + ta1) / 2;\n context.quadraticCurveTo(0, 0, tr2 * cos(ta0), tr2 * sin(ta0));\n context.lineTo(tr * cos(ta2), tr * sin(ta2));\n context.lineTo(tr2 * cos(ta1), tr2 * sin(ta1));\n } else {\n context.quadraticCurveTo(0, 0, tr * cos(ta0), tr * sin(ta0));\n context.arc(0, 0, tr, ta0, ta1);\n }\n }\n context.quadraticCurveTo(0, 0, sr * cos(sa0), sr * sin(sa0));\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n if (headRadius) ribbon.headRadius = function(_) {\n return arguments.length ? (headRadius = typeof _ === \"function\" ? _ : constant(+_), ribbon) : headRadius;\n };\n\n ribbon.radius = function(_) {\n return arguments.length ? (sourceRadius = targetRadius = typeof _ === \"function\" ? _ : constant(+_), ribbon) : sourceRadius;\n };\n\n ribbon.sourceRadius = function(_) {\n return arguments.length ? (sourceRadius = typeof _ === \"function\" ? _ : constant(+_), ribbon) : sourceRadius;\n };\n\n ribbon.targetRadius = function(_) {\n return arguments.length ? (targetRadius = typeof _ === \"function\" ? _ : constant(+_), ribbon) : targetRadius;\n };\n\n ribbon.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), ribbon) : startAngle;\n };\n\n ribbon.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), ribbon) : endAngle;\n };\n\n ribbon.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), ribbon) : padAngle;\n };\n\n ribbon.source = function(_) {\n return arguments.length ? (source = _, ribbon) : source;\n };\n\n ribbon.target = function(_) {\n return arguments.length ? (target = _, ribbon) : target;\n };\n\n ribbon.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), ribbon) : context;\n };\n\n return ribbon;\n}\n\nexport default function() {\n return ribbon();\n}\n\nexport function ribbonArrow() {\n return ribbon(defaultArrowheadRadius);\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHex8: color_formatHex8,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n },\n displayable() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatHex8: rgb_formatHex8,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n value = clampi(value);\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n clamp() {\n return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n }\n}));\n\nfunction clamph(value) {\n value = (value || 0) % 360;\n return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb, darker, brighter} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\nvar A = -0.14861,\n B = +1.78277,\n C = -0.29227,\n D = -0.90649,\n E = +1.97294,\n ED = E * D,\n EB = E * B,\n BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n bl = b - l,\n k = (E * (g - l) - C * bl) / D,\n s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n h = s ? Math.atan2(k, bl) * degrees - 120 : NaN;\n return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nexport default function cubehelix(h, s, l, opacity) {\n return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nexport function Cubehelix(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Cubehelix, cubehelix, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,\n l = +this.l,\n a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n cosh = Math.cos(h),\n sinh = Math.sin(h);\n return new Rgb(\n 255 * (l + a * (A * cosh + B * sinh)),\n 255 * (l + a * (C * cosh + D * sinh)),\n 255 * (l + a * (E * cosh)),\n this.opacity\n );\n }\n}));\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","export {default as color, rgb, hsl} from \"./color.js\";\nexport {default as lab, hcl, lch, gray} from \"./lab.js\";\nexport {default as cubehelix} from \"./cubehelix.js\";\n","import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n Xn = 0.96422,\n Yn = 1,\n Zn = 0.82521,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n if (o instanceof Hcl) return hcl2lab(o);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = rgb2lrgb(o.r),\n g = rgb2lrgb(o.g),\n b = rgb2lrgb(o.b),\n y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n if (r === g && g === b) x = z = y; else {\n x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n }\n return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n brighter(k) {\n return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n darker(k) {\n return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n rgb() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n x = Xn * lab2xyz(x);\n y = Yn * lab2xyz(y);\n z = Zn * lab2xyz(z);\n return new Rgb(\n lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n this.opacity\n );\n }\n}));\n\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n if (!(o instanceof Lab)) o = labConvert(o);\n if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n var h = Math.atan2(o.b, o.a) * degrees;\n return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n var h = o.h * radians;\n return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n brighter(k) {\n return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n },\n darker(k) {\n return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n },\n rgb() {\n return hcl2lab(this).rgb();\n }\n}));\n","export const radians = Math.PI / 180;\nexport const degrees = 180 / Math.PI;\n","export default function(ring) {\n var i = 0, n = ring.length, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1];\n while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1];\n return area;\n}\n","var array = Array.prototype;\n\nexport var slice = array.slice;\n","export default function(a, b) {\n return a - b;\n}\n","export default x => () => x;\n","export default function(ring, hole) {\n var i = -1, n = hole.length, c;\n while (++i < n) if (c = ringContains(ring, hole[i])) return c;\n return 0;\n}\n\nfunction ringContains(ring, point) {\n var x = point[0], y = point[1], contains = -1;\n for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {\n var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1];\n if (segmentContains(pi, pj, point)) return 0;\n if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) contains = -contains;\n }\n return contains;\n}\n\nfunction segmentContains(a, b, c) {\n var i; return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]);\n}\n\nfunction collinear(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]);\n}\n\nfunction within(p, q, r) {\n return p <= q && q <= r || r <= q && q <= p;\n}\n","import {extent, nice, thresholdSturges, ticks} from \"d3-array\";\nimport {slice} from \"./array.js\";\nimport ascending from \"./ascending.js\";\nimport area from \"./area.js\";\nimport constant from \"./constant.js\";\nimport contains from \"./contains.js\";\nimport noop from \"./noop.js\";\n\nvar cases = [\n [],\n [[[1.0, 1.5], [0.5, 1.0]]],\n [[[1.5, 1.0], [1.0, 1.5]]],\n [[[1.5, 1.0], [0.5, 1.0]]],\n [[[1.0, 0.5], [1.5, 1.0]]],\n [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]],\n [[[1.0, 0.5], [1.0, 1.5]]],\n [[[1.0, 0.5], [0.5, 1.0]]],\n [[[0.5, 1.0], [1.0, 0.5]]],\n [[[1.0, 1.5], [1.0, 0.5]]],\n [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]],\n [[[1.5, 1.0], [1.0, 0.5]]],\n [[[0.5, 1.0], [1.5, 1.0]]],\n [[[1.0, 1.5], [1.5, 1.0]]],\n [[[0.5, 1.0], [1.0, 1.5]]],\n []\n];\n\nexport default function() {\n var dx = 1,\n dy = 1,\n threshold = thresholdSturges,\n smooth = smoothLinear;\n\n function contours(values) {\n var tz = threshold(values);\n\n // Convert number of thresholds into uniform thresholds.\n if (!Array.isArray(tz)) {\n const e = extent(values, finite);\n tz = ticks(...nice(e[0], e[1], tz), tz);\n while (tz[tz.length - 1] >= e[1]) tz.pop();\n while (tz[1] < e[0]) tz.shift();\n } else {\n tz = tz.slice().sort(ascending);\n }\n\n return tz.map(value => contour(values, value));\n }\n\n // Accumulate, smooth contour rings, assign holes to exterior rings.\n // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js\n function contour(values, value) {\n const v = value == null ? NaN : +value;\n if (isNaN(v)) throw new Error(`invalid value: ${value}`);\n\n var polygons = [],\n holes = [];\n\n isorings(values, v, function(ring) {\n smooth(ring, values, v);\n if (area(ring) > 0) polygons.push([ring]);\n else holes.push(ring);\n });\n\n holes.forEach(function(hole) {\n for (var i = 0, n = polygons.length, polygon; i < n; ++i) {\n if (contains((polygon = polygons[i])[0], hole) !== -1) {\n polygon.push(hole);\n return;\n }\n }\n });\n\n return {\n type: \"MultiPolygon\",\n value: value,\n coordinates: polygons\n };\n }\n\n // Marching squares with isolines stitched into rings.\n // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js\n function isorings(values, value, callback) {\n var fragmentByStart = new Array,\n fragmentByEnd = new Array,\n x, y, t0, t1, t2, t3;\n\n // Special case for the first row (y = -1, t2 = t3 = 0).\n x = y = -1;\n t1 = above(values[0], value);\n cases[t1 << 1].forEach(stitch);\n while (++x < dx - 1) {\n t0 = t1, t1 = above(values[x + 1], value);\n cases[t0 | t1 << 1].forEach(stitch);\n }\n cases[t1 << 0].forEach(stitch);\n\n // General case for the intermediate rows.\n while (++y < dy - 1) {\n x = -1;\n t1 = above(values[y * dx + dx], value);\n t2 = above(values[y * dx], value);\n cases[t1 << 1 | t2 << 2].forEach(stitch);\n while (++x < dx - 1) {\n t0 = t1, t1 = above(values[y * dx + dx + x + 1], value);\n t3 = t2, t2 = above(values[y * dx + x + 1], value);\n cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch);\n }\n cases[t1 | t2 << 3].forEach(stitch);\n }\n\n // Special case for the last row (y = dy - 1, t0 = t1 = 0).\n x = -1;\n t2 = values[y * dx] >= value;\n cases[t2 << 2].forEach(stitch);\n while (++x < dx - 1) {\n t3 = t2, t2 = above(values[y * dx + x + 1], value);\n cases[t2 << 2 | t3 << 3].forEach(stitch);\n }\n cases[t2 << 3].forEach(stitch);\n\n function stitch(line) {\n var start = [line[0][0] + x, line[0][1] + y],\n end = [line[1][0] + x, line[1][1] + y],\n startIndex = index(start),\n endIndex = index(end),\n f, g;\n if (f = fragmentByEnd[startIndex]) {\n if (g = fragmentByStart[endIndex]) {\n delete fragmentByEnd[f.end];\n delete fragmentByStart[g.start];\n if (f === g) {\n f.ring.push(end);\n callback(f.ring);\n } else {\n fragmentByStart[f.start] = fragmentByEnd[g.end] = {start: f.start, end: g.end, ring: f.ring.concat(g.ring)};\n }\n } else {\n delete fragmentByEnd[f.end];\n f.ring.push(end);\n fragmentByEnd[f.end = endIndex] = f;\n }\n } else if (f = fragmentByStart[endIndex]) {\n if (g = fragmentByEnd[startIndex]) {\n delete fragmentByStart[f.start];\n delete fragmentByEnd[g.end];\n if (f === g) {\n f.ring.push(end);\n callback(f.ring);\n } else {\n fragmentByStart[g.start] = fragmentByEnd[f.end] = {start: g.start, end: f.end, ring: g.ring.concat(f.ring)};\n }\n } else {\n delete fragmentByStart[f.start];\n f.ring.unshift(start);\n fragmentByStart[f.start = startIndex] = f;\n }\n } else {\n fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {start: startIndex, end: endIndex, ring: [start, end]};\n }\n }\n }\n\n function index(point) {\n return point[0] * 2 + point[1] * (dx + 1) * 4;\n }\n\n function smoothLinear(ring, values, value) {\n ring.forEach(function(point) {\n var x = point[0],\n y = point[1],\n xt = x | 0,\n yt = y | 0,\n v1 = valid(values[yt * dx + xt]);\n if (x > 0 && x < dx && xt === x) {\n point[0] = smooth1(x, valid(values[yt * dx + xt - 1]), v1, value);\n }\n if (y > 0 && y < dy && yt === y) {\n point[1] = smooth1(y, valid(values[(yt - 1) * dx + xt]), v1, value);\n }\n });\n }\n\n contours.contour = contour;\n\n contours.size = function(_) {\n if (!arguments.length) return [dx, dy];\n var _0 = Math.floor(_[0]), _1 = Math.floor(_[1]);\n if (!(_0 >= 0 && _1 >= 0)) throw new Error(\"invalid size\");\n return dx = _0, dy = _1, contours;\n };\n\n contours.thresholds = function(_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), contours) : threshold;\n };\n\n contours.smooth = function(_) {\n return arguments.length ? (smooth = _ ? smoothLinear : noop, contours) : smooth === smoothLinear;\n };\n\n return contours;\n}\n\n// When computing the extent, ignore infinite values (as well as invalid ones).\nfunction finite(x) {\n return isFinite(x) ? x : NaN;\n}\n\n// Is the (possibly invalid) x greater than or equal to the (known valid) value?\n// Treat any invalid value as below negative infinity.\nfunction above(x, value) {\n return x == null ? false : +x >= value;\n}\n\n// During smoothing, treat any invalid value as negative infinity.\nfunction valid(v) {\n return v == null || isNaN(v = +v) ? -Infinity : v;\n}\n\nfunction smooth1(x, v0, v1, value) {\n const a = value - v0;\n const b = v1 - v0;\n const d = isFinite(a) || isFinite(b) ? a / b : Math.sign(a) / Math.sign(b);\n return isNaN(d) ? x : x + d - 0.5;\n}\n","import {blur2, max, ticks} from \"d3-array\";\nimport {slice} from \"./array.js\";\nimport constant from \"./constant.js\";\nimport Contours from \"./contours.js\";\n\nfunction defaultX(d) {\n return d[0];\n}\n\nfunction defaultY(d) {\n return d[1];\n}\n\nfunction defaultWeight() {\n return 1;\n}\n\nexport default function() {\n var x = defaultX,\n y = defaultY,\n weight = defaultWeight,\n dx = 960,\n dy = 500,\n r = 20, // blur radius\n k = 2, // log2(grid cell size)\n o = r * 3, // grid offset, to pad for blur\n n = (dx + o * 2) >> k, // grid width\n m = (dy + o * 2) >> k, // grid height\n threshold = constant(20);\n\n function grid(data) {\n var values = new Float32Array(n * m),\n pow2k = Math.pow(2, -k),\n i = -1;\n\n for (const d of data) {\n var xi = (x(d, ++i, data) + o) * pow2k,\n yi = (y(d, i, data) + o) * pow2k,\n wi = +weight(d, i, data);\n if (wi && xi >= 0 && xi < n && yi >= 0 && yi < m) {\n var x0 = Math.floor(xi),\n y0 = Math.floor(yi),\n xt = xi - x0 - 0.5,\n yt = yi - y0 - 0.5;\n values[x0 + y0 * n] += (1 - xt) * (1 - yt) * wi;\n values[x0 + 1 + y0 * n] += xt * (1 - yt) * wi;\n values[x0 + 1 + (y0 + 1) * n] += xt * yt * wi;\n values[x0 + (y0 + 1) * n] += (1 - xt) * yt * wi;\n }\n }\n\n blur2({data: values, width: n, height: m}, r * pow2k);\n return values;\n }\n\n function density(data) {\n var values = grid(data),\n tz = threshold(values),\n pow4k = Math.pow(2, 2 * k);\n\n // Convert number of thresholds into uniform thresholds.\n if (!Array.isArray(tz)) {\n tz = ticks(Number.MIN_VALUE, max(values) / pow4k, tz);\n }\n\n return Contours()\n .size([n, m])\n .thresholds(tz.map(d => d * pow4k))\n (values)\n .map((c, i) => (c.value = +tz[i], transform(c)));\n }\n\n density.contours = function(data) {\n var values = grid(data),\n contours = Contours().size([n, m]),\n pow4k = Math.pow(2, 2 * k),\n contour = value => {\n value = +value;\n var c = transform(contours.contour(values, value * pow4k));\n c.value = value; // preserve exact threshold value\n return c;\n };\n Object.defineProperty(contour, \"max\", {get: () => max(values) / pow4k});\n return contour;\n };\n\n function transform(geometry) {\n geometry.coordinates.forEach(transformPolygon);\n return geometry;\n }\n\n function transformPolygon(coordinates) {\n coordinates.forEach(transformRing);\n }\n\n function transformRing(coordinates) {\n coordinates.forEach(transformPoint);\n }\n\n // TODO Optimize.\n function transformPoint(coordinates) {\n coordinates[0] = coordinates[0] * Math.pow(2, k) - o;\n coordinates[1] = coordinates[1] * Math.pow(2, k) - o;\n }\n\n function resize() {\n o = r * 3;\n n = (dx + o * 2) >> k;\n m = (dy + o * 2) >> k;\n return density;\n }\n\n density.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), density) : x;\n };\n\n density.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), density) : y;\n };\n\n density.weight = function(_) {\n return arguments.length ? (weight = typeof _ === \"function\" ? _ : constant(+_), density) : weight;\n };\n\n density.size = function(_) {\n if (!arguments.length) return [dx, dy];\n var _0 = +_[0], _1 = +_[1];\n if (!(_0 >= 0 && _1 >= 0)) throw new Error(\"invalid size\");\n return dx = _0, dy = _1, resize();\n };\n\n density.cellSize = function(_) {\n if (!arguments.length) return 1 << k;\n if (!((_ = +_) >= 1)) throw new Error(\"invalid cell size\");\n return k = Math.floor(Math.log(_) / Math.LN2), resize();\n };\n\n density.thresholds = function(_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), density) : threshold;\n };\n\n density.bandwidth = function(_) {\n if (!arguments.length) return Math.sqrt(r * (r + 1));\n if (!((_ = +_) >= 0)) throw new Error(\"invalid bandwidth\");\n return r = (Math.sqrt(4 * _ * _ + 1) - 1) / 2, resize();\n };\n\n return density;\n}\n","export {default as contours} from \"./contours.js\";\nexport {default as contourDensity} from \"./density.js\";\n","export default function() {}\n","import Delaunator from \"delaunator\";\nimport Path from \"./path.js\";\nimport Polygon from \"./polygon.js\";\nimport Voronoi from \"./voronoi.js\";\n\nconst tau = 2 * Math.PI, pow = Math.pow;\n\nfunction pointX(p) {\n return p[0];\n}\n\nfunction pointY(p) {\n return p[1];\n}\n\n// A triangulation is collinear if all its triangles have a non-null area\nfunction collinear(d) {\n const {triangles, coords} = d;\n for (let i = 0; i < triangles.length; i += 3) {\n const a = 2 * triangles[i],\n b = 2 * triangles[i + 1],\n c = 2 * triangles[i + 2],\n cross = (coords[c] - coords[a]) * (coords[b + 1] - coords[a + 1])\n - (coords[b] - coords[a]) * (coords[c + 1] - coords[a + 1]);\n if (cross > 1e-10) return false;\n }\n return true;\n}\n\nfunction jitter(x, y, r) {\n return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r];\n}\n\nexport default class Delaunay {\n static from(points, fx = pointX, fy = pointY, that) {\n return new Delaunay(\"length\" in points\n ? flatArray(points, fx, fy, that)\n : Float64Array.from(flatIterable(points, fx, fy, that)));\n }\n constructor(points) {\n this._delaunator = new Delaunator(points);\n this.inedges = new Int32Array(points.length / 2);\n this._hullIndex = new Int32Array(points.length / 2);\n this.points = this._delaunator.coords;\n this._init();\n }\n update() {\n this._delaunator.update();\n this._init();\n return this;\n }\n _init() {\n const d = this._delaunator, points = this.points;\n\n // check for collinear\n if (d.hull && d.hull.length > 2 && collinear(d)) {\n this.collinear = Int32Array.from({length: points.length/2}, (_,i) => i)\n .sort((i, j) => points[2 * i] - points[2 * j] || points[2 * i + 1] - points[2 * j + 1]); // for exact neighbors\n const e = this.collinear[0], f = this.collinear[this.collinear.length - 1],\n bounds = [ points[2 * e], points[2 * e + 1], points[2 * f], points[2 * f + 1] ],\n r = 1e-8 * Math.hypot(bounds[3] - bounds[1], bounds[2] - bounds[0]);\n for (let i = 0, n = points.length / 2; i < n; ++i) {\n const p = jitter(points[2 * i], points[2 * i + 1], r);\n points[2 * i] = p[0];\n points[2 * i + 1] = p[1];\n }\n this._delaunator = new Delaunator(points);\n } else {\n delete this.collinear;\n }\n\n const halfedges = this.halfedges = this._delaunator.halfedges;\n const hull = this.hull = this._delaunator.hull;\n const triangles = this.triangles = this._delaunator.triangles;\n const inedges = this.inedges.fill(-1);\n const hullIndex = this._hullIndex.fill(-1);\n\n // Compute an index from each point to an (arbitrary) incoming halfedge\n // Used to give the first neighbor of each point; for this reason,\n // on the hull we give priority to exterior halfedges\n for (let e = 0, n = halfedges.length; e < n; ++e) {\n const p = triangles[e % 3 === 2 ? e - 2 : e + 1];\n if (halfedges[e] === -1 || inedges[p] === -1) inedges[p] = e;\n }\n for (let i = 0, n = hull.length; i < n; ++i) {\n hullIndex[hull[i]] = i;\n }\n\n // degenerate case: 1 or 2 (distinct) points\n if (hull.length <= 2 && hull.length > 0) {\n this.triangles = new Int32Array(3).fill(-1);\n this.halfedges = new Int32Array(3).fill(-1);\n this.triangles[0] = hull[0];\n inedges[hull[0]] = 1;\n if (hull.length === 2) {\n inedges[hull[1]] = 0;\n this.triangles[1] = hull[1];\n this.triangles[2] = hull[1];\n }\n }\n }\n voronoi(bounds) {\n return new Voronoi(this, bounds);\n }\n *neighbors(i) {\n const {inedges, hull, _hullIndex, halfedges, triangles, collinear} = this;\n\n // degenerate case with several collinear points\n if (collinear) {\n const l = collinear.indexOf(i);\n if (l > 0) yield collinear[l - 1];\n if (l < collinear.length - 1) yield collinear[l + 1];\n return;\n }\n\n const e0 = inedges[i];\n if (e0 === -1) return; // coincident point\n let e = e0, p0 = -1;\n do {\n yield p0 = triangles[e];\n e = e % 3 === 2 ? e - 2 : e + 1;\n if (triangles[e] !== i) return; // bad triangulation\n e = halfedges[e];\n if (e === -1) {\n const p = hull[(_hullIndex[i] + 1) % hull.length];\n if (p !== p0) yield p;\n return;\n }\n } while (e !== e0);\n }\n find(x, y, i = 0) {\n if ((x = +x, x !== x) || (y = +y, y !== y)) return -1;\n const i0 = i;\n let c;\n while ((c = this._step(i, x, y)) >= 0 && c !== i && c !== i0) i = c;\n return c;\n }\n _step(i, x, y) {\n const {inedges, hull, _hullIndex, halfedges, triangles, points} = this;\n if (inedges[i] === -1 || !points.length) return (i + 1) % (points.length >> 1);\n let c = i;\n let dc = pow(x - points[i * 2], 2) + pow(y - points[i * 2 + 1], 2);\n const e0 = inedges[i];\n let e = e0;\n do {\n let t = triangles[e];\n const dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2);\n if (dt < dc) dc = dt, c = t;\n e = e % 3 === 2 ? e - 2 : e + 1;\n if (triangles[e] !== i) break; // bad triangulation\n e = halfedges[e];\n if (e === -1) {\n e = hull[(_hullIndex[i] + 1) % hull.length];\n if (e !== t) {\n if (pow(x - points[e * 2], 2) + pow(y - points[e * 2 + 1], 2) < dc) return e;\n }\n break;\n }\n } while (e !== e0);\n return c;\n }\n render(context) {\n const buffer = context == null ? context = new Path : undefined;\n const {points, halfedges, triangles} = this;\n for (let i = 0, n = halfedges.length; i < n; ++i) {\n const j = halfedges[i];\n if (j < i) continue;\n const ti = triangles[i] * 2;\n const tj = triangles[j] * 2;\n context.moveTo(points[ti], points[ti + 1]);\n context.lineTo(points[tj], points[tj + 1]);\n }\n this.renderHull(context);\n return buffer && buffer.value();\n }\n renderPoints(context, r) {\n if (r === undefined && (!context || typeof context.moveTo !== \"function\")) r = context, context = null;\n r = r == undefined ? 2 : +r;\n const buffer = context == null ? context = new Path : undefined;\n const {points} = this;\n for (let i = 0, n = points.length; i < n; i += 2) {\n const x = points[i], y = points[i + 1];\n context.moveTo(x + r, y);\n context.arc(x, y, r, 0, tau);\n }\n return buffer && buffer.value();\n }\n renderHull(context) {\n const buffer = context == null ? context = new Path : undefined;\n const {hull, points} = this;\n const h = hull[0] * 2, n = hull.length;\n context.moveTo(points[h], points[h + 1]);\n for (let i = 1; i < n; ++i) {\n const h = 2 * hull[i];\n context.lineTo(points[h], points[h + 1]);\n }\n context.closePath();\n return buffer && buffer.value();\n }\n hullPolygon() {\n const polygon = new Polygon;\n this.renderHull(polygon);\n return polygon.value();\n }\n renderTriangle(i, context) {\n const buffer = context == null ? context = new Path : undefined;\n const {points, triangles} = this;\n const t0 = triangles[i *= 3] * 2;\n const t1 = triangles[i + 1] * 2;\n const t2 = triangles[i + 2] * 2;\n context.moveTo(points[t0], points[t0 + 1]);\n context.lineTo(points[t1], points[t1 + 1]);\n context.lineTo(points[t2], points[t2 + 1]);\n context.closePath();\n return buffer && buffer.value();\n }\n *trianglePolygons() {\n const {triangles} = this;\n for (let i = 0, n = triangles.length / 3; i < n; ++i) {\n yield this.trianglePolygon(i);\n }\n }\n trianglePolygon(i) {\n const polygon = new Polygon;\n this.renderTriangle(i, polygon);\n return polygon.value();\n }\n}\n\nfunction flatArray(points, fx, fy, that) {\n const n = points.length;\n const array = new Float64Array(n * 2);\n for (let i = 0; i < n; ++i) {\n const p = points[i];\n array[i * 2] = fx.call(that, p, i, points);\n array[i * 2 + 1] = fy.call(that, p, i, points);\n }\n return array;\n}\n\nfunction* flatIterable(points, fx, fy, that) {\n let i = 0;\n for (const p of points) {\n yield fx.call(that, p, i, points);\n yield fy.call(that, p, i, points);\n ++i;\n }\n}\n","export {default as Delaunay} from \"./delaunay.js\";\nexport {default as Voronoi} from \"./voronoi.js\";\n","const epsilon = 1e-6;\n\nexport default class Path {\n constructor() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n }\n moveTo(x, y) {\n this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n }\n lineTo(x, y) {\n this._ += `L${this._x1 = +x},${this._y1 = +y}`;\n }\n arc(x, y, r) {\n x = +x, y = +y, r = +r;\n const x0 = x + r;\n const y0 = y;\n if (r < 0) throw new Error(\"negative radius\");\n if (this._x1 === null) this._ += `M${x0},${y0}`;\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) this._ += \"L\" + x0 + \",\" + y0;\n if (!r) return;\n this._ += `A${r},${r},0,1,1,${x - r},${y}A${r},${r},0,1,1,${this._x1 = x0},${this._y1 = y0}`;\n }\n rect(x, y, w, h) {\n this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${+w}v${+h}h${-w}Z`;\n }\n value() {\n return this._ || null;\n }\n}\n","export default class Polygon {\n constructor() {\n this._ = [];\n }\n moveTo(x, y) {\n this._.push([x, y]);\n }\n closePath() {\n this._.push(this._[0].slice());\n }\n lineTo(x, y) {\n this._.push([x, y]);\n }\n value() {\n return this._.length ? this._ : null;\n }\n}\n","import Path from \"./path.js\";\nimport Polygon from \"./polygon.js\";\n\nexport default class Voronoi {\n constructor(delaunay, [xmin, ymin, xmax, ymax] = [0, 0, 960, 500]) {\n if (!((xmax = +xmax) >= (xmin = +xmin)) || !((ymax = +ymax) >= (ymin = +ymin))) throw new Error(\"invalid bounds\");\n this.delaunay = delaunay;\n this._circumcenters = new Float64Array(delaunay.points.length * 2);\n this.vectors = new Float64Array(delaunay.points.length * 2);\n this.xmax = xmax, this.xmin = xmin;\n this.ymax = ymax, this.ymin = ymin;\n this._init();\n }\n update() {\n this.delaunay.update();\n this._init();\n return this;\n }\n _init() {\n const {delaunay: {points, hull, triangles}, vectors} = this;\n let bx, by; // lazily computed barycenter of the hull\n\n // Compute circumcenters.\n const circumcenters = this.circumcenters = this._circumcenters.subarray(0, triangles.length / 3 * 2);\n for (let i = 0, j = 0, n = triangles.length, x, y; i < n; i += 3, j += 2) {\n const t1 = triangles[i] * 2;\n const t2 = triangles[i + 1] * 2;\n const t3 = triangles[i + 2] * 2;\n const x1 = points[t1];\n const y1 = points[t1 + 1];\n const x2 = points[t2];\n const y2 = points[t2 + 1];\n const x3 = points[t3];\n const y3 = points[t3 + 1];\n\n const dx = x2 - x1;\n const dy = y2 - y1;\n const ex = x3 - x1;\n const ey = y3 - y1;\n const ab = (dx * ey - dy * ex) * 2;\n\n if (Math.abs(ab) < 1e-9) {\n // For a degenerate triangle, the circumcenter is at the infinity, in a\n // direction orthogonal to the halfedge and away from the “center” of\n // the diagram , defined as the hull’s barycenter.\n if (bx === undefined) {\n bx = by = 0;\n for (const i of hull) bx += points[i * 2], by += points[i * 2 + 1];\n bx /= hull.length, by /= hull.length;\n }\n const a = 1e9 * Math.sign((bx - x1) * ey - (by - y1) * ex);\n x = (x1 + x3) / 2 - a * ey;\n y = (y1 + y3) / 2 + a * ex;\n } else {\n const d = 1 / ab;\n const bl = dx * dx + dy * dy;\n const cl = ex * ex + ey * ey;\n x = x1 + (ey * bl - dy * cl) * d;\n y = y1 + (dx * cl - ex * bl) * d;\n }\n circumcenters[j] = x;\n circumcenters[j + 1] = y;\n }\n\n // Compute exterior cell rays.\n let h = hull[hull.length - 1];\n let p0, p1 = h * 4;\n let x0, x1 = points[2 * h];\n let y0, y1 = points[2 * h + 1];\n vectors.fill(0);\n for (let i = 0; i < hull.length; ++i) {\n h = hull[i];\n p0 = p1, x0 = x1, y0 = y1;\n p1 = h * 4, x1 = points[2 * h], y1 = points[2 * h + 1];\n vectors[p0 + 2] = vectors[p1] = y0 - y1;\n vectors[p0 + 3] = vectors[p1 + 1] = x1 - x0;\n }\n }\n render(context) {\n const buffer = context == null ? context = new Path : undefined;\n const {delaunay: {halfedges, inedges, hull}, circumcenters, vectors} = this;\n if (hull.length <= 1) return null;\n for (let i = 0, n = halfedges.length; i < n; ++i) {\n const j = halfedges[i];\n if (j < i) continue;\n const ti = Math.floor(i / 3) * 2;\n const tj = Math.floor(j / 3) * 2;\n const xi = circumcenters[ti];\n const yi = circumcenters[ti + 1];\n const xj = circumcenters[tj];\n const yj = circumcenters[tj + 1];\n this._renderSegment(xi, yi, xj, yj, context);\n }\n let h0, h1 = hull[hull.length - 1];\n for (let i = 0; i < hull.length; ++i) {\n h0 = h1, h1 = hull[i];\n const t = Math.floor(inedges[h1] / 3) * 2;\n const x = circumcenters[t];\n const y = circumcenters[t + 1];\n const v = h0 * 4;\n const p = this._project(x, y, vectors[v + 2], vectors[v + 3]);\n if (p) this._renderSegment(x, y, p[0], p[1], context);\n }\n return buffer && buffer.value();\n }\n renderBounds(context) {\n const buffer = context == null ? context = new Path : undefined;\n context.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin);\n return buffer && buffer.value();\n }\n renderCell(i, context) {\n const buffer = context == null ? context = new Path : undefined;\n const points = this._clip(i);\n if (points === null || !points.length) return;\n context.moveTo(points[0], points[1]);\n let n = points.length;\n while (points[0] === points[n-2] && points[1] === points[n-1] && n > 1) n -= 2;\n for (let i = 2; i < n; i += 2) {\n if (points[i] !== points[i-2] || points[i+1] !== points[i-1])\n context.lineTo(points[i], points[i + 1]);\n }\n context.closePath();\n return buffer && buffer.value();\n }\n *cellPolygons() {\n const {delaunay: {points}} = this;\n for (let i = 0, n = points.length / 2; i < n; ++i) {\n const cell = this.cellPolygon(i);\n if (cell) cell.index = i, yield cell;\n }\n }\n cellPolygon(i) {\n const polygon = new Polygon;\n this.renderCell(i, polygon);\n return polygon.value();\n }\n _renderSegment(x0, y0, x1, y1, context) {\n let S;\n const c0 = this._regioncode(x0, y0);\n const c1 = this._regioncode(x1, y1);\n if (c0 === 0 && c1 === 0) {\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n } else if (S = this._clipSegment(x0, y0, x1, y1, c0, c1)) {\n context.moveTo(S[0], S[1]);\n context.lineTo(S[2], S[3]);\n }\n }\n contains(i, x, y) {\n if ((x = +x, x !== x) || (y = +y, y !== y)) return false;\n return this.delaunay._step(i, x, y) === i;\n }\n *neighbors(i) {\n const ci = this._clip(i);\n if (ci) for (const j of this.delaunay.neighbors(i)) {\n const cj = this._clip(j);\n // find the common edge\n if (cj) loop: for (let ai = 0, li = ci.length; ai < li; ai += 2) {\n for (let aj = 0, lj = cj.length; aj < lj; aj += 2) {\n if (ci[ai] === cj[aj]\n && ci[ai + 1] === cj[aj + 1]\n && ci[(ai + 2) % li] === cj[(aj + lj - 2) % lj]\n && ci[(ai + 3) % li] === cj[(aj + lj - 1) % lj]) {\n yield j;\n break loop;\n }\n }\n }\n }\n }\n _cell(i) {\n const {circumcenters, delaunay: {inedges, halfedges, triangles}} = this;\n const e0 = inedges[i];\n if (e0 === -1) return null; // coincident point\n const points = [];\n let e = e0;\n do {\n const t = Math.floor(e / 3);\n points.push(circumcenters[t * 2], circumcenters[t * 2 + 1]);\n e = e % 3 === 2 ? e - 2 : e + 1;\n if (triangles[e] !== i) break; // bad triangulation\n e = halfedges[e];\n } while (e !== e0 && e !== -1);\n return points;\n }\n _clip(i) {\n // degenerate case (1 valid point: return the box)\n if (i === 0 && this.delaunay.hull.length === 1) {\n return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];\n }\n const points = this._cell(i);\n if (points === null) return null;\n const {vectors: V} = this;\n const v = i * 4;\n return this._simplify(V[v] || V[v + 1]\n ? this._clipInfinite(i, points, V[v], V[v + 1], V[v + 2], V[v + 3])\n : this._clipFinite(i, points));\n }\n _clipFinite(i, points) {\n const n = points.length;\n let P = null;\n let x0, y0, x1 = points[n - 2], y1 = points[n - 1];\n let c0, c1 = this._regioncode(x1, y1);\n let e0, e1 = 0;\n for (let j = 0; j < n; j += 2) {\n x0 = x1, y0 = y1, x1 = points[j], y1 = points[j + 1];\n c0 = c1, c1 = this._regioncode(x1, y1);\n if (c0 === 0 && c1 === 0) {\n e0 = e1, e1 = 0;\n if (P) P.push(x1, y1);\n else P = [x1, y1];\n } else {\n let S, sx0, sy0, sx1, sy1;\n if (c0 === 0) {\n if ((S = this._clipSegment(x0, y0, x1, y1, c0, c1)) === null) continue;\n [sx0, sy0, sx1, sy1] = S;\n } else {\n if ((S = this._clipSegment(x1, y1, x0, y0, c1, c0)) === null) continue;\n [sx1, sy1, sx0, sy0] = S;\n e0 = e1, e1 = this._edgecode(sx0, sy0);\n if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n if (P) P.push(sx0, sy0);\n else P = [sx0, sy0];\n }\n e0 = e1, e1 = this._edgecode(sx1, sy1);\n if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n if (P) P.push(sx1, sy1);\n else P = [sx1, sy1];\n }\n }\n if (P) {\n e0 = e1, e1 = this._edgecode(P[0], P[1]);\n if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) {\n return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];\n }\n return P;\n }\n _clipSegment(x0, y0, x1, y1, c0, c1) {\n // for more robustness, always consider the segment in the same order\n const flip = c0 < c1;\n if (flip) [x0, y0, x1, y1, c0, c1] = [x1, y1, x0, y0, c1, c0];\n while (true) {\n if (c0 === 0 && c1 === 0) return flip ? [x1, y1, x0, y0] : [x0, y0, x1, y1];\n if (c0 & c1) return null;\n let x, y, c = c0 || c1;\n if (c & 0b1000) x = x0 + (x1 - x0) * (this.ymax - y0) / (y1 - y0), y = this.ymax;\n else if (c & 0b0100) x = x0 + (x1 - x0) * (this.ymin - y0) / (y1 - y0), y = this.ymin;\n else if (c & 0b0010) y = y0 + (y1 - y0) * (this.xmax - x0) / (x1 - x0), x = this.xmax;\n else y = y0 + (y1 - y0) * (this.xmin - x0) / (x1 - x0), x = this.xmin;\n if (c0) x0 = x, y0 = y, c0 = this._regioncode(x0, y0);\n else x1 = x, y1 = y, c1 = this._regioncode(x1, y1);\n }\n }\n _clipInfinite(i, points, vx0, vy0, vxn, vyn) {\n let P = Array.from(points), p;\n if (p = this._project(P[0], P[1], vx0, vy0)) P.unshift(p[0], p[1]);\n if (p = this._project(P[P.length - 2], P[P.length - 1], vxn, vyn)) P.push(p[0], p[1]);\n if (P = this._clipFinite(i, P)) {\n for (let j = 0, n = P.length, c0, c1 = this._edgecode(P[n - 2], P[n - 1]); j < n; j += 2) {\n c0 = c1, c1 = this._edgecode(P[j], P[j + 1]);\n if (c0 && c1) j = this._edge(i, c0, c1, P, j), n = P.length;\n }\n } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) {\n P = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax];\n }\n return P;\n }\n _edge(i, e0, e1, P, j) {\n while (e0 !== e1) {\n let x, y;\n switch (e0) {\n case 0b0101: e0 = 0b0100; continue; // top-left\n case 0b0100: e0 = 0b0110, x = this.xmax, y = this.ymin; break; // top\n case 0b0110: e0 = 0b0010; continue; // top-right\n case 0b0010: e0 = 0b1010, x = this.xmax, y = this.ymax; break; // right\n case 0b1010: e0 = 0b1000; continue; // bottom-right\n case 0b1000: e0 = 0b1001, x = this.xmin, y = this.ymax; break; // bottom\n case 0b1001: e0 = 0b0001; continue; // bottom-left\n case 0b0001: e0 = 0b0101, x = this.xmin, y = this.ymin; break; // left\n }\n // Note: this implicitly checks for out of bounds: if P[j] or P[j+1] are\n // undefined, the conditional statement will be executed.\n if ((P[j] !== x || P[j + 1] !== y) && this.contains(i, x, y)) {\n P.splice(j, 0, x, y), j += 2;\n }\n }\n return j;\n }\n _project(x0, y0, vx, vy) {\n let t = Infinity, c, x, y;\n if (vy < 0) { // top\n if (y0 <= this.ymin) return null;\n if ((c = (this.ymin - y0) / vy) < t) y = this.ymin, x = x0 + (t = c) * vx;\n } else if (vy > 0) { // bottom\n if (y0 >= this.ymax) return null;\n if ((c = (this.ymax - y0) / vy) < t) y = this.ymax, x = x0 + (t = c) * vx;\n }\n if (vx > 0) { // right\n if (x0 >= this.xmax) return null;\n if ((c = (this.xmax - x0) / vx) < t) x = this.xmax, y = y0 + (t = c) * vy;\n } else if (vx < 0) { // left\n if (x0 <= this.xmin) return null;\n if ((c = (this.xmin - x0) / vx) < t) x = this.xmin, y = y0 + (t = c) * vy;\n }\n return [x, y];\n }\n _edgecode(x, y) {\n return (x === this.xmin ? 0b0001\n : x === this.xmax ? 0b0010 : 0b0000)\n | (y === this.ymin ? 0b0100\n : y === this.ymax ? 0b1000 : 0b0000);\n }\n _regioncode(x, y) {\n return (x < this.xmin ? 0b0001\n : x > this.xmax ? 0b0010 : 0b0000)\n | (y < this.ymin ? 0b0100\n : y > this.ymax ? 0b1000 : 0b0000);\n }\n _simplify(P) {\n if (P && P.length > 4) {\n for (let i = 0; i < P.length; i+= 2) {\n const j = (i + 2) % P.length, k = (i + 4) % P.length;\n if (P[i] === P[j] && P[j] === P[k] || P[i + 1] === P[j + 1] && P[j + 1] === P[k + 1]) {\n P.splice(j, 2), i -= 2;\n }\n }\n if (!P.length) P = null;\n }\n return P;\n }\n}\n","var noop = {value: () => {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n","export {default as dispatch} from \"./dispatch.js\";\n","export default x => () => x;\n","import {dispatch} from \"d3-dispatch\";\nimport {select, pointer} from \"d3-selection\";\nimport nodrag, {yesdrag} from \"./nodrag.js\";\nimport noevent, {nonpassive, nonpassivecapture, nopropagation} from \"./noevent.js\";\nimport constant from \"./constant.js\";\nimport DragEvent from \"./event.js\";\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultContainer() {\n return this.parentNode;\n}\n\nfunction defaultSubject(event, d) {\n return d == null ? {x: event.x, y: event.y} : d;\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nexport default function() {\n var filter = defaultFilter,\n container = defaultContainer,\n subject = defaultSubject,\n touchable = defaultTouchable,\n gestures = {},\n listeners = dispatch(\"start\", \"drag\", \"end\"),\n active = 0,\n mousedownx,\n mousedowny,\n mousemoving,\n touchending,\n clickDistance2 = 0;\n\n function drag(selection) {\n selection\n .on(\"mousedown.drag\", mousedowned)\n .filter(touchable)\n .on(\"touchstart.drag\", touchstarted)\n .on(\"touchmove.drag\", touchmoved, nonpassive)\n .on(\"touchend.drag touchcancel.drag\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n function mousedowned(event, d) {\n if (touchending || !filter.call(this, event, d)) return;\n var gesture = beforestart(this, container.call(this, event, d), event, d, \"mouse\");\n if (!gesture) return;\n select(event.view)\n .on(\"mousemove.drag\", mousemoved, nonpassivecapture)\n .on(\"mouseup.drag\", mouseupped, nonpassivecapture);\n nodrag(event.view);\n nopropagation(event);\n mousemoving = false;\n mousedownx = event.clientX;\n mousedowny = event.clientY;\n gesture(\"start\", event);\n }\n\n function mousemoved(event) {\n noevent(event);\n if (!mousemoving) {\n var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;\n mousemoving = dx * dx + dy * dy > clickDistance2;\n }\n gestures.mouse(\"drag\", event);\n }\n\n function mouseupped(event) {\n select(event.view).on(\"mousemove.drag mouseup.drag\", null);\n yesdrag(event.view, mousemoving);\n noevent(event);\n gestures.mouse(\"end\", event);\n }\n\n function touchstarted(event, d) {\n if (!filter.call(this, event, d)) return;\n var touches = event.changedTouches,\n c = container.call(this, event, d),\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) {\n nopropagation(event);\n gesture(\"start\", event, touches[i]);\n }\n }\n }\n\n function touchmoved(event) {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n noevent(event);\n gesture(\"drag\", event, touches[i]);\n }\n }\n }\n\n function touchended(event) {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n nopropagation(event);\n gesture(\"end\", event, touches[i]);\n }\n }\n }\n\n function beforestart(that, container, event, d, identifier, touch) {\n var dispatch = listeners.copy(),\n p = pointer(touch || event, container), dx, dy,\n s;\n\n if ((s = subject.call(that, new DragEvent(\"beforestart\", {\n sourceEvent: event,\n target: drag,\n identifier,\n active,\n x: p[0],\n y: p[1],\n dx: 0,\n dy: 0,\n dispatch\n }), d)) == null) return;\n\n dx = s.x - p[0] || 0;\n dy = s.y - p[1] || 0;\n\n return function gesture(type, event, touch) {\n var p0 = p, n;\n switch (type) {\n case \"start\": gestures[identifier] = gesture, n = active++; break;\n case \"end\": delete gestures[identifier], --active; // falls through\n case \"drag\": p = pointer(touch || event, container), n = active; break;\n }\n dispatch.call(\n type,\n that,\n new DragEvent(type, {\n sourceEvent: event,\n subject: s,\n target: drag,\n identifier,\n active: n,\n x: p[0] + dx,\n y: p[1] + dy,\n dx: p[0] - p0[0],\n dy: p[1] - p0[1],\n dispatch\n }),\n d\n );\n };\n }\n\n drag.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), drag) : filter;\n };\n\n drag.container = function(_) {\n return arguments.length ? (container = typeof _ === \"function\" ? _ : constant(_), drag) : container;\n };\n\n drag.subject = function(_) {\n return arguments.length ? (subject = typeof _ === \"function\" ? _ : constant(_), drag) : subject;\n };\n\n drag.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), drag) : touchable;\n };\n\n drag.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? drag : value;\n };\n\n drag.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n };\n\n return drag;\n}\n","export default function DragEvent(type, {\n sourceEvent,\n subject,\n target,\n identifier,\n active,\n x, y, dx, dy,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n subject: {value: subject, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n identifier: {value: identifier, enumerable: true, configurable: true},\n active: {value: active, enumerable: true, configurable: true},\n x: {value: x, enumerable: true, configurable: true},\n y: {value: y, enumerable: true, configurable: true},\n dx: {value: dx, enumerable: true, configurable: true},\n dy: {value: dy, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n\nDragEvent.prototype.on = function() {\n var value = this._.on.apply(this._, arguments);\n return value === this._ ? this : value;\n};\n","export {default as drag} from \"./drag.js\";\nexport {default as dragDisable, yesdrag as dragEnable} from \"./nodrag.js\";\n","import {select} from \"d3-selection\";\nimport noevent, {nonpassivecapture} from \"./noevent.js\";\n\nexport default function(view) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", noevent, nonpassivecapture);\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", noevent, nonpassivecapture);\n } else {\n root.__noselect = root.style.MozUserSelect;\n root.style.MozUserSelect = \"none\";\n }\n}\n\nexport function yesdrag(view, noclick) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", null);\n if (noclick) {\n selection.on(\"click.drag\", noevent, nonpassivecapture);\n setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n }\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", null);\n } else {\n root.style.MozUserSelect = root.__noselect;\n delete root.__noselect;\n }\n}\n","// These are typically used in conjunction with noevent to ensure that we can\n// preventDefault on the event.\nexport const nonpassive = {passive: false};\nexport const nonpassivecapture = {capture: true, passive: false};\n\nexport function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","export default function autoType(object) {\n for (var key in object) {\n var value = object[key].trim(), number, m;\n if (!value) value = null;\n else if (value === \"true\") value = true;\n else if (value === \"false\") value = false;\n else if (value === \"NaN\") value = NaN;\n else if (!isNaN(number = +value)) value = number;\n else if (m = value.match(/^([-+]\\d{2})?\\d{4}(-\\d{2}(-\\d{2})?)?(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{3})?)?(Z|[-+]\\d{2}:\\d{2})?)?$/)) {\n if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, \"/\").replace(/T/, \" \");\n value = new Date(value);\n }\n else continue;\n object[key] = value;\n }\n return object;\n}\n\n// https://github.com/d3/d3-dsv/issues/45\nconst fixtz = new Date(\"2019-01-01T00:00\").getHours() || new Date(\"2019-07-01T00:00\").getHours();","import dsv from \"./dsv.js\";\n\nvar csv = dsv(\",\");\n\nexport var csvParse = csv.parse;\nexport var csvParseRows = csv.parseRows;\nexport var csvFormat = csv.format;\nexport var csvFormatBody = csv.formatBody;\nexport var csvFormatRows = csv.formatRows;\nexport var csvFormatRow = csv.formatRow;\nexport var csvFormatValue = csv.formatValue;\n","var EOL = {},\n EOF = {},\n QUOTE = 34,\n NEWLINE = 10,\n RETURN = 13;\n\nfunction objectConverter(columns) {\n return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n return JSON.stringify(name) + \": d[\" + i + \"] || \\\"\\\"\";\n }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n var object = objectConverter(columns);\n return function(row, i) {\n return f(object(row), i, columns);\n };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n var columnSet = Object.create(null),\n columns = [];\n\n rows.forEach(function(row) {\n for (var column in row) {\n if (!(column in columnSet)) {\n columns.push(columnSet[column] = column);\n }\n }\n });\n\n return columns;\n}\n\nfunction pad(value, width) {\n var s = value + \"\", length = s.length;\n return length < width ? new Array(width - length + 1).join(0) + s : s;\n}\n\nfunction formatYear(year) {\n return year < 0 ? \"-\" + pad(-year, 6)\n : year > 9999 ? \"+\" + pad(year, 6)\n : pad(year, 4);\n}\n\nfunction formatDate(date) {\n var hours = date.getUTCHours(),\n minutes = date.getUTCMinutes(),\n seconds = date.getUTCSeconds(),\n milliseconds = date.getUTCMilliseconds();\n return isNaN(date) ? \"Invalid Date\"\n : formatYear(date.getUTCFullYear(), 4) + \"-\" + pad(date.getUTCMonth() + 1, 2) + \"-\" + pad(date.getUTCDate(), 2)\n + (milliseconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \".\" + pad(milliseconds, 3) + \"Z\"\n : seconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \"Z\"\n : minutes || hours ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \"Z\"\n : \"\");\n}\n\nexport default function(delimiter) {\n var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n DELIMITER = delimiter.charCodeAt(0);\n\n function parse(text, f) {\n var convert, columns, rows = parseRows(text, function(row, i) {\n if (convert) return convert(row, i - 1);\n columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n });\n rows.columns = columns || [];\n return rows;\n }\n\n function parseRows(text, f) {\n var rows = [], // output rows\n N = text.length,\n I = 0, // current character index\n n = 0, // current line number\n t, // current token\n eof = N <= 0, // current token followed by EOF?\n eol = false; // current token followed by EOL?\n\n // Strip the trailing newline.\n if (text.charCodeAt(N - 1) === NEWLINE) --N;\n if (text.charCodeAt(N - 1) === RETURN) --N;\n\n function token() {\n if (eof) return EOF;\n if (eol) return eol = false, EOL;\n\n // Unescape quotes.\n var i, j = I, c;\n if (text.charCodeAt(j) === QUOTE) {\n while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n if ((i = I) >= N) eof = true;\n else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n }\n\n // Find next delimiter or newline.\n while (I < N) {\n if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n else if (c !== DELIMITER) continue;\n return text.slice(j, i);\n }\n\n // Return last token before EOF.\n return eof = true, text.slice(j, N);\n }\n\n while ((t = token()) !== EOF) {\n var row = [];\n while (t !== EOL && t !== EOF) row.push(t), t = token();\n if (f && (row = f(row, n++)) == null) continue;\n rows.push(row);\n }\n\n return rows;\n }\n\n function preformatBody(rows, columns) {\n return rows.map(function(row) {\n return columns.map(function(column) {\n return formatValue(row[column]);\n }).join(delimiter);\n });\n }\n\n function format(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join(\"\\n\");\n }\n\n function formatBody(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return preformatBody(rows, columns).join(\"\\n\");\n }\n\n function formatRows(rows) {\n return rows.map(formatRow).join(\"\\n\");\n }\n\n function formatRow(row) {\n return row.map(formatValue).join(delimiter);\n }\n\n function formatValue(value) {\n return value == null ? \"\"\n : value instanceof Date ? formatDate(value)\n : reFormat.test(value += \"\") ? \"\\\"\" + value.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n : value;\n }\n\n return {\n parse: parse,\n parseRows: parseRows,\n format: format,\n formatBody: formatBody,\n formatRows: formatRows,\n formatRow: formatRow,\n formatValue: formatValue\n };\n}\n","export {default as dsvFormat} from \"./dsv.js\";\nexport {csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue} from \"./csv.js\";\nexport {tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue} from \"./tsv.js\";\nexport {default as autoType} from \"./autoType.js\";\n","import dsv from \"./dsv.js\";\n\nvar tsv = dsv(\"\\t\");\n\nexport var tsvParse = tsv.parse;\nexport var tsvParseRows = tsv.parseRows;\nexport var tsvFormat = tsv.format;\nexport var tsvFormatBody = tsv.formatBody;\nexport var tsvFormatRows = tsv.formatRows;\nexport var tsvFormatRow = tsv.formatRow;\nexport var tsvFormatValue = tsv.formatValue;\n","var overshoot = 1.70158;\n\nexport var backIn = (function custom(s) {\n s = +s;\n\n function backIn(t) {\n return (t = +t) * t * (s * (t - 1) + t);\n }\n\n backIn.overshoot = custom;\n\n return backIn;\n})(overshoot);\n\nexport var backOut = (function custom(s) {\n s = +s;\n\n function backOut(t) {\n return --t * t * ((t + 1) * s + t) + 1;\n }\n\n backOut.overshoot = custom;\n\n return backOut;\n})(overshoot);\n\nexport var backInOut = (function custom(s) {\n s = +s;\n\n function backInOut(t) {\n return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;\n }\n\n backInOut.overshoot = custom;\n\n return backInOut;\n})(overshoot);\n","var b1 = 4 / 11,\n b2 = 6 / 11,\n b3 = 8 / 11,\n b4 = 3 / 4,\n b5 = 9 / 11,\n b6 = 10 / 11,\n b7 = 15 / 16,\n b8 = 21 / 22,\n b9 = 63 / 64,\n b0 = 1 / b1 / b1;\n\nexport function bounceIn(t) {\n return 1 - bounceOut(1 - t);\n}\n\nexport function bounceOut(t) {\n return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;\n}\n\nexport function bounceInOut(t) {\n return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;\n}\n","export function circleIn(t) {\n return 1 - Math.sqrt(1 - t * t);\n}\n\nexport function circleOut(t) {\n return Math.sqrt(1 - --t * t);\n}\n\nexport function circleInOut(t) {\n return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;\n}\n","export function cubicIn(t) {\n return t * t * t;\n}\n\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n","import {tpmt} from \"./math.js\";\n\nvar tau = 2 * Math.PI,\n amplitude = 1,\n period = 0.3;\n\nexport var elasticIn = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticIn(t) {\n return a * tpmt(-(--t)) * Math.sin((s - t) / p);\n }\n\n elasticIn.amplitude = function(a) { return custom(a, p * tau); };\n elasticIn.period = function(p) { return custom(a, p); };\n\n return elasticIn;\n})(amplitude, period);\n\nexport var elasticOut = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticOut(t) {\n return 1 - a * tpmt(t = +t) * Math.sin((t + s) / p);\n }\n\n elasticOut.amplitude = function(a) { return custom(a, p * tau); };\n elasticOut.period = function(p) { return custom(a, p); };\n\n return elasticOut;\n})(amplitude, period);\n\nexport var elasticInOut = (function custom(a, p) {\n var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);\n\n function elasticInOut(t) {\n return ((t = t * 2 - 1) < 0\n ? a * tpmt(-t) * Math.sin((s - t) / p)\n : 2 - a * tpmt(t) * Math.sin((s + t) / p)) / 2;\n }\n\n elasticInOut.amplitude = function(a) { return custom(a, p * tau); };\n elasticInOut.period = function(p) { return custom(a, p); };\n\n return elasticInOut;\n})(amplitude, period);\n","import {tpmt} from \"./math.js\";\n\nexport function expIn(t) {\n return tpmt(1 - +t);\n}\n\nexport function expOut(t) {\n return 1 - tpmt(t);\n}\n\nexport function expInOut(t) {\n return ((t *= 2) <= 1 ? tpmt(1 - t) : 2 - tpmt(t - 1)) / 2;\n}\n","export {\n linear as easeLinear\n} from \"./linear.js\";\n\nexport {\n quadInOut as easeQuad,\n quadIn as easeQuadIn,\n quadOut as easeQuadOut,\n quadInOut as easeQuadInOut\n} from \"./quad.js\";\n\nexport {\n cubicInOut as easeCubic,\n cubicIn as easeCubicIn,\n cubicOut as easeCubicOut,\n cubicInOut as easeCubicInOut\n} from \"./cubic.js\";\n\nexport {\n polyInOut as easePoly,\n polyIn as easePolyIn,\n polyOut as easePolyOut,\n polyInOut as easePolyInOut\n} from \"./poly.js\";\n\nexport {\n sinInOut as easeSin,\n sinIn as easeSinIn,\n sinOut as easeSinOut,\n sinInOut as easeSinInOut\n} from \"./sin.js\";\n\nexport {\n expInOut as easeExp,\n expIn as easeExpIn,\n expOut as easeExpOut,\n expInOut as easeExpInOut\n} from \"./exp.js\";\n\nexport {\n circleInOut as easeCircle,\n circleIn as easeCircleIn,\n circleOut as easeCircleOut,\n circleInOut as easeCircleInOut\n} from \"./circle.js\";\n\nexport {\n bounceOut as easeBounce,\n bounceIn as easeBounceIn,\n bounceOut as easeBounceOut,\n bounceInOut as easeBounceInOut\n} from \"./bounce.js\";\n\nexport {\n backInOut as easeBack,\n backIn as easeBackIn,\n backOut as easeBackOut,\n backInOut as easeBackInOut\n} from \"./back.js\";\n\nexport {\n elasticOut as easeElastic,\n elasticIn as easeElasticIn,\n elasticOut as easeElasticOut,\n elasticInOut as easeElasticInOut\n} from \"./elastic.js\";\n","export const linear = t => +t;\n","// tpmt is two power minus ten times t scaled to [0,1]\nexport function tpmt(x) {\n return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;\n}\n","var exponent = 3;\n\nexport var polyIn = (function custom(e) {\n e = +e;\n\n function polyIn(t) {\n return Math.pow(t, e);\n }\n\n polyIn.exponent = custom;\n\n return polyIn;\n})(exponent);\n\nexport var polyOut = (function custom(e) {\n e = +e;\n\n function polyOut(t) {\n return 1 - Math.pow(1 - t, e);\n }\n\n polyOut.exponent = custom;\n\n return polyOut;\n})(exponent);\n\nexport var polyInOut = (function custom(e) {\n e = +e;\n\n function polyInOut(t) {\n return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;\n }\n\n polyInOut.exponent = custom;\n\n return polyInOut;\n})(exponent);\n","export function quadIn(t) {\n return t * t;\n}\n\nexport function quadOut(t) {\n return t * (2 - t);\n}\n\nexport function quadInOut(t) {\n return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;\n}\n","var pi = Math.PI,\n halfPi = pi / 2;\n\nexport function sinIn(t) {\n return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi);\n}\n\nexport function sinOut(t) {\n return Math.sin(t * halfPi);\n}\n\nexport function sinInOut(t) {\n return (1 - Math.cos(pi * t)) / 2;\n}\n","function responseBlob(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n return response.blob();\n}\n\nexport default function(input, init) {\n return fetch(input, init).then(responseBlob);\n}\n","function responseArrayBuffer(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n return response.arrayBuffer();\n}\n\nexport default function(input, init) {\n return fetch(input, init).then(responseArrayBuffer);\n}\n","import {csvParse, dsvFormat, tsvParse} from \"d3-dsv\";\nimport text from \"./text.js\";\n\nfunction dsvParse(parse) {\n return function(input, init, row) {\n if (arguments.length === 2 && typeof init === \"function\") row = init, init = undefined;\n return text(input, init).then(function(response) {\n return parse(response, row);\n });\n };\n}\n\nexport default function dsv(delimiter, input, init, row) {\n if (arguments.length === 3 && typeof init === \"function\") row = init, init = undefined;\n var format = dsvFormat(delimiter);\n return text(input, init).then(function(response) {\n return format.parse(response, row);\n });\n}\n\nexport var csv = dsvParse(csvParse);\nexport var tsv = dsvParse(tsvParse);\n","export default function(input, init) {\n return new Promise(function(resolve, reject) {\n var image = new Image;\n for (var key in init) image[key] = init[key];\n image.onerror = reject;\n image.onload = function() { resolve(image); };\n image.src = input;\n });\n}\n","export {default as blob} from \"./blob.js\";\nexport {default as buffer} from \"./buffer.js\";\nexport {default as dsv, csv, tsv} from \"./dsv.js\";\nexport {default as image} from \"./image.js\";\nexport {default as json} from \"./json.js\";\nexport {default as text} from \"./text.js\";\nexport {default as xml, html, svg} from \"./xml.js\";\n","function responseJson(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n if (response.status === 204 || response.status === 205) return;\n return response.json();\n}\n\nexport default function(input, init) {\n return fetch(input, init).then(responseJson);\n}\n","function responseText(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n return response.text();\n}\n\nexport default function(input, init) {\n return fetch(input, init).then(responseText);\n}\n","import text from \"./text.js\";\n\nfunction parser(type) {\n return (input, init) => text(input, init)\n .then(text => (new DOMParser).parseFromString(text, type));\n}\n\nexport default parser(\"application/xml\");\n\nexport var html = parser(\"text/html\");\n\nexport var svg = parser(\"image/svg+xml\");\n","export default function(x, y) {\n var nodes, strength = 1;\n\n if (x == null) x = 0;\n if (y == null) y = 0;\n\n function force() {\n var i,\n n = nodes.length,\n node,\n sx = 0,\n sy = 0;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i], sx += node.x, sy += node.y;\n }\n\n for (sx = (sx / n - x) * strength, sy = (sy / n - y) * strength, i = 0; i < n; ++i) {\n node = nodes[i], node.x -= sx, node.y -= sy;\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n return force;\n}\n","import {quadtree} from \"d3-quadtree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction x(d) {\n return d.x + d.vx;\n}\n\nfunction y(d) {\n return d.y + d.vy;\n}\n\nexport default function(radius) {\n var nodes,\n radii,\n random,\n strength = 1,\n iterations = 1;\n\n if (typeof radius !== \"function\") radius = constant(radius == null ? 1 : +radius);\n\n function force() {\n var i, n = nodes.length,\n tree,\n node,\n xi,\n yi,\n ri,\n ri2;\n\n for (var k = 0; k < iterations; ++k) {\n tree = quadtree(nodes, x, y).visitAfter(prepare);\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n ri = radii[node.index], ri2 = ri * ri;\n xi = node.x + node.vx;\n yi = node.y + node.vy;\n tree.visit(apply);\n }\n }\n\n function apply(quad, x0, y0, x1, y1) {\n var data = quad.data, rj = quad.r, r = ri + rj;\n if (data) {\n if (data.index > node.index) {\n var x = xi - data.x - data.vx,\n y = yi - data.y - data.vy,\n l = x * x + y * y;\n if (l < r * r) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n l = (r - (l = Math.sqrt(l))) / l * strength;\n node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));\n node.vy += (y *= l) * r;\n data.vx -= x * (r = 1 - r);\n data.vy -= y * r;\n }\n }\n return;\n }\n return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;\n }\n }\n\n function prepare(quad) {\n if (quad.data) return quad.r = radii[quad.data.index];\n for (var i = quad.r = 0; i < 4; ++i) {\n if (quad[i] && quad[i].r > quad.r) {\n quad.r = quad[i].r;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n radii = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n force.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n return force;\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export {default as forceCenter} from \"./center.js\";\nexport {default as forceCollide} from \"./collide.js\";\nexport {default as forceLink} from \"./link.js\";\nexport {default as forceManyBody} from \"./manyBody.js\";\nexport {default as forceRadial} from \"./radial.js\";\nexport {default as forceSimulation} from \"./simulation.js\";\nexport {default as forceX} from \"./x.js\";\nexport {default as forceY} from \"./y.js\";\n","export default function(random) {\n return (random() - 0.5) * 1e-6;\n}\n","// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst a = 1664525;\nconst c = 1013904223;\nconst m = 4294967296; // 2^32\n\nexport default function() {\n let s = 1;\n return () => (s = (a * s + c) % m) / m;\n}\n","import constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction index(d) {\n return d.index;\n}\n\nfunction find(nodeById, nodeId) {\n var node = nodeById.get(nodeId);\n if (!node) throw new Error(\"node not found: \" + nodeId);\n return node;\n}\n\nexport default function(links) {\n var id = index,\n strength = defaultStrength,\n strengths,\n distance = constant(30),\n distances,\n nodes,\n count,\n bias,\n random,\n iterations = 1;\n\n if (links == null) links = [];\n\n function defaultStrength(link) {\n return 1 / Math.min(count[link.source.index], count[link.target.index]);\n }\n\n function force(alpha) {\n for (var k = 0, n = links.length; k < iterations; ++k) {\n for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {\n link = links[i], source = link.source, target = link.target;\n x = target.x + target.vx - source.x - source.vx || jiggle(random);\n y = target.y + target.vy - source.y - source.vy || jiggle(random);\n l = Math.sqrt(x * x + y * y);\n l = (l - distances[i]) / l * alpha * strengths[i];\n x *= l, y *= l;\n target.vx -= x * (b = bias[i]);\n target.vy -= y * b;\n source.vx += x * (b = 1 - b);\n source.vy += y * b;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n\n var i,\n n = nodes.length,\n m = links.length,\n nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])),\n link;\n\n for (i = 0, count = new Array(n); i < m; ++i) {\n link = links[i], link.index = i;\n if (typeof link.source !== \"object\") link.source = find(nodeById, link.source);\n if (typeof link.target !== \"object\") link.target = find(nodeById, link.target);\n count[link.source.index] = (count[link.source.index] || 0) + 1;\n count[link.target.index] = (count[link.target.index] || 0) + 1;\n }\n\n for (i = 0, bias = new Array(m); i < m; ++i) {\n link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);\n }\n\n strengths = new Array(m), initializeStrength();\n distances = new Array(m), initializeDistance();\n }\n\n function initializeStrength() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n strengths[i] = +strength(links[i], i, links);\n }\n }\n\n function initializeDistance() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n distances[i] = +distance(links[i], i, links);\n }\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.links = function(_) {\n return arguments.length ? (links = _, initialize(), force) : links;\n };\n\n force.id = function(_) {\n return arguments.length ? (id = _, force) : id;\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initializeStrength(), force) : strength;\n };\n\n force.distance = function(_) {\n return arguments.length ? (distance = typeof _ === \"function\" ? _ : constant(+_), initializeDistance(), force) : distance;\n };\n\n return force;\n}\n","import {quadtree} from \"d3-quadtree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\nimport {x, y} from \"./simulation.js\";\n\nexport default function() {\n var nodes,\n node,\n random,\n alpha,\n strength = constant(-30),\n strengths,\n distanceMin2 = 1,\n distanceMax2 = Infinity,\n theta2 = 0.81;\n\n function force(_) {\n var i, n = nodes.length, tree = quadtree(nodes, x, y).visitAfter(accumulate);\n for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n strengths = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);\n }\n\n function accumulate(quad) {\n var strength = 0, q, c, weight = 0, x, y, i;\n\n // For internal nodes, accumulate forces from child quadrants.\n if (quad.length) {\n for (x = y = i = 0; i < 4; ++i) {\n if ((q = quad[i]) && (c = Math.abs(q.value))) {\n strength += q.value, weight += c, x += c * q.x, y += c * q.y;\n }\n }\n quad.x = x / weight;\n quad.y = y / weight;\n }\n\n // For leaf nodes, accumulate forces from coincident quadrants.\n else {\n q = quad;\n q.x = q.data.x;\n q.y = q.data.y;\n do strength += strengths[q.data.index];\n while (q = q.next);\n }\n\n quad.value = strength;\n }\n\n function apply(quad, x1, _, x2) {\n if (!quad.value) return true;\n\n var x = quad.x - node.x,\n y = quad.y - node.y,\n w = x2 - x1,\n l = x * x + y * y;\n\n // Apply the Barnes-Hut approximation if possible.\n // Limit forces for very close nodes; randomize direction if coincident.\n if (w * w / theta2 < l) {\n if (l < distanceMax2) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n node.vx += x * quad.value * alpha / l;\n node.vy += y * quad.value * alpha / l;\n }\n return true;\n }\n\n // Otherwise, process points directly.\n else if (quad.length || l >= distanceMax2) return;\n\n // Limit forces for very close nodes; randomize direction if coincident.\n if (quad.data !== node || quad.next) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n }\n\n do if (quad.data !== node) {\n w = strengths[quad.data.index] * alpha / l;\n node.vx += x * w;\n node.vy += y * w;\n } while (quad = quad.next);\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.distanceMin = function(_) {\n return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);\n };\n\n force.distanceMax = function(_) {\n return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);\n };\n\n force.theta = function(_) {\n return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(radius, x, y) {\n var nodes,\n strength = constant(0.1),\n strengths,\n radiuses;\n\n if (typeof radius !== \"function\") radius = constant(+radius);\n if (x == null) x = 0;\n if (y == null) y = 0;\n\n function force(alpha) {\n for (var i = 0, n = nodes.length; i < n; ++i) {\n var node = nodes[i],\n dx = node.x - x || 1e-6,\n dy = node.y - y || 1e-6,\n r = Math.sqrt(dx * dx + dy * dy),\n k = (radiuses[i] - r) * strengths[i] * alpha / r;\n node.vx += dx * k;\n node.vy += dy * k;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n radiuses = new Array(n);\n for (i = 0; i < n; ++i) {\n radiuses[i] = +radius(nodes[i], i, nodes);\n strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _, initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n return force;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer} from \"d3-timer\";\nimport lcg from \"./lcg.js\";\n\nexport function x(d) {\n return d.x;\n}\n\nexport function y(d) {\n return d.y;\n}\n\nvar initialRadius = 10,\n initialAngle = Math.PI * (3 - Math.sqrt(5));\n\nexport default function(nodes) {\n var simulation,\n alpha = 1,\n alphaMin = 0.001,\n alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),\n alphaTarget = 0,\n velocityDecay = 0.6,\n forces = new Map(),\n stepper = timer(step),\n event = dispatch(\"tick\", \"end\"),\n random = lcg();\n\n if (nodes == null) nodes = [];\n\n function step() {\n tick();\n event.call(\"tick\", simulation);\n if (alpha < alphaMin) {\n stepper.stop();\n event.call(\"end\", simulation);\n }\n }\n\n function tick(iterations) {\n var i, n = nodes.length, node;\n\n if (iterations === undefined) iterations = 1;\n\n for (var k = 0; k < iterations; ++k) {\n alpha += (alphaTarget - alpha) * alphaDecay;\n\n forces.forEach(function(force) {\n force(alpha);\n });\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (node.fx == null) node.x += node.vx *= velocityDecay;\n else node.x = node.fx, node.vx = 0;\n if (node.fy == null) node.y += node.vy *= velocityDecay;\n else node.y = node.fy, node.vy = 0;\n }\n }\n\n return simulation;\n }\n\n function initializeNodes() {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.index = i;\n if (node.fx != null) node.x = node.fx;\n if (node.fy != null) node.y = node.fy;\n if (isNaN(node.x) || isNaN(node.y)) {\n var radius = initialRadius * Math.sqrt(0.5 + i), angle = i * initialAngle;\n node.x = radius * Math.cos(angle);\n node.y = radius * Math.sin(angle);\n }\n if (isNaN(node.vx) || isNaN(node.vy)) {\n node.vx = node.vy = 0;\n }\n }\n }\n\n function initializeForce(force) {\n if (force.initialize) force.initialize(nodes, random);\n return force;\n }\n\n initializeNodes();\n\n return simulation = {\n tick: tick,\n\n restart: function() {\n return stepper.restart(step), simulation;\n },\n\n stop: function() {\n return stepper.stop(), simulation;\n },\n\n nodes: function(_) {\n return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;\n },\n\n alpha: function(_) {\n return arguments.length ? (alpha = +_, simulation) : alpha;\n },\n\n alphaMin: function(_) {\n return arguments.length ? (alphaMin = +_, simulation) : alphaMin;\n },\n\n alphaDecay: function(_) {\n return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;\n },\n\n alphaTarget: function(_) {\n return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;\n },\n\n velocityDecay: function(_) {\n return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;\n },\n\n randomSource: function(_) {\n return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random;\n },\n\n force: function(name, _) {\n return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);\n },\n\n find: function(x, y, radius) {\n var i = 0,\n n = nodes.length,\n dx,\n dy,\n d2,\n node,\n closest;\n\n if (radius == null) radius = Infinity;\n else radius *= radius;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n dx = x - node.x;\n dy = y - node.y;\n d2 = dx * dx + dy * dy;\n if (d2 < radius) closest = node, radius = d2;\n }\n\n return closest;\n },\n\n on: function(name, _) {\n return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n }\n };\n}\n","import constant from \"./constant.js\";\n\nexport default function(x) {\n var strength = constant(0.1),\n nodes,\n strengths,\n xz;\n\n if (typeof x !== \"function\") x = constant(x == null ? 0 : +x);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n xz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : x;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(y) {\n var strength = constant(0.1),\n nodes,\n strengths,\n yz;\n\n if (typeof y !== \"function\") y = constant(y == null ? 0 : +y);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n yz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : y;\n };\n\n return force;\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n","export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}\n","export default function(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}\n","export default function(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n};\n","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": (x, p) => (x * 100).toFixed(p),\n \"b\": (x) => Math.round(x).toString(2),\n \"c\": (x) => x + \"\",\n \"d\": formatDecimal,\n \"e\": (x, p) => x.toExponential(p),\n \"f\": (x, p) => x.toFixed(p),\n \"g\": (x, p) => x.toPrecision(p),\n \"o\": (x) => Math.round(x).toString(8),\n \"p\": (x, p) => formatRounded(x * 100, p),\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n \"x\": (x) => Math.round(x).toString(16)\n};\n","export default function(x) {\n return x;\n}\n","export {default as formatDefaultLocale, format, formatPrefix} from \"./defaultLocale.js\";\nexport {default as formatLocale} from \"./locale.js\";\nexport {default as formatSpecifier, FormatSpecifier} from \"./formatSpecifier.js\";\nexport {default as precisionFixed} from \"./precisionFixed.js\";\nexport {default as precisionPrefix} from \"./precisionPrefix.js\";\nexport {default as precisionRound} from \"./precisionRound.js\";\n","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"−\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n","import {Adder} from \"d3-array\";\nimport {atan2, cos, quarterPi, radians, sin, tau} from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\n\nexport var areaRingSum = new Adder();\n\n// hello?\n\nvar areaSum = new Adder(),\n lambda00,\n phi00,\n lambda0,\n cosPhi0,\n sinPhi0;\n\nexport var areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaRingSum = new Adder();\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n var areaRing = +areaRingSum;\n areaSum.add(areaRing < 0 ? tau + areaRing : areaRing);\n this.lineStart = this.lineEnd = this.point = noop;\n },\n sphere: function() {\n areaSum.add(tau);\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaRingEnd() {\n areaPoint(lambda00, phi00);\n}\n\nfunction areaPointFirst(lambda, phi) {\n areaStream.point = areaPoint;\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n lambda0 = lambda, cosPhi0 = cos(phi = phi / 2 + quarterPi), sinPhi0 = sin(phi);\n}\n\nfunction areaPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n phi = phi / 2 + quarterPi; // half the angular distance from south pole\n\n // Spherical excess E for a spherical triangle with vertices: south pole,\n // previous point, current point. Uses a formula derived from Cagnoli’s\n // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).\n var dLambda = lambda - lambda0,\n sdLambda = dLambda >= 0 ? 1 : -1,\n adLambda = sdLambda * dLambda,\n cosPhi = cos(phi),\n sinPhi = sin(phi),\n k = sinPhi0 * sinPhi,\n u = cosPhi0 * cosPhi + k * cos(adLambda),\n v = k * sdLambda * sin(adLambda);\n areaRingSum.add(atan2(v, u));\n\n // Advance the previous points.\n lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;\n}\n\nexport default function(object) {\n areaSum = new Adder();\n stream(object, areaStream);\n return areaSum * 2;\n}\n","import {Adder} from \"d3-array\";\nimport {areaStream, areaRingSum} from \"./area.js\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport {abs, degrees, epsilon, radians} from \"./math.js\";\nimport stream from \"./stream.js\";\n\nvar lambda0, phi0, lambda1, phi1, // bounds\n lambda2, // previous lambda-coordinate\n lambda00, phi00, // first point\n p0, // previous 3D point\n deltaSum,\n ranges,\n range;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: boundsLineStart,\n lineEnd: boundsLineEnd,\n polygonStart: function() {\n boundsStream.point = boundsRingPoint;\n boundsStream.lineStart = boundsRingStart;\n boundsStream.lineEnd = boundsRingEnd;\n deltaSum = new Adder();\n areaStream.polygonStart();\n },\n polygonEnd: function() {\n areaStream.polygonEnd();\n boundsStream.point = boundsPoint;\n boundsStream.lineStart = boundsLineStart;\n boundsStream.lineEnd = boundsLineEnd;\n if (areaRingSum < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n else if (deltaSum > epsilon) phi1 = 90;\n else if (deltaSum < -epsilon) phi0 = -90;\n range[0] = lambda0, range[1] = lambda1;\n },\n sphere: function() {\n lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n }\n};\n\nfunction boundsPoint(lambda, phi) {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n}\n\nfunction linePoint(lambda, phi) {\n var p = cartesian([lambda * radians, phi * radians]);\n if (p0) {\n var normal = cartesianCross(p0, p),\n equatorial = [normal[1], -normal[0], 0],\n inflection = cartesianCross(equatorial, normal);\n cartesianNormalizeInPlace(inflection);\n inflection = spherical(inflection);\n var delta = lambda - lambda2,\n sign = delta > 0 ? 1 : -1,\n lambdai = inflection[0] * degrees * sign,\n phii,\n antimeridian = abs(delta) > 180;\n if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = inflection[1] * degrees;\n if (phii > phi1) phi1 = phii;\n } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = -inflection[1] * degrees;\n if (phii < phi0) phi0 = phii;\n } else {\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n }\n if (antimeridian) {\n if (lambda < lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n } else {\n if (lambda1 >= lambda0) {\n if (lambda < lambda0) lambda0 = lambda;\n if (lambda > lambda1) lambda1 = lambda;\n } else {\n if (lambda > lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n }\n }\n } else {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n }\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n p0 = p, lambda2 = lambda;\n}\n\nfunction boundsLineStart() {\n boundsStream.point = linePoint;\n}\n\nfunction boundsLineEnd() {\n range[0] = lambda0, range[1] = lambda1;\n boundsStream.point = boundsPoint;\n p0 = null;\n}\n\nfunction boundsRingPoint(lambda, phi) {\n if (p0) {\n var delta = lambda - lambda2;\n deltaSum.add(abs(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);\n } else {\n lambda00 = lambda, phi00 = phi;\n }\n areaStream.point(lambda, phi);\n linePoint(lambda, phi);\n}\n\nfunction boundsRingStart() {\n areaStream.lineStart();\n}\n\nfunction boundsRingEnd() {\n boundsRingPoint(lambda00, phi00);\n areaStream.lineEnd();\n if (abs(deltaSum) > epsilon) lambda0 = -(lambda1 = 180);\n range[0] = lambda0, range[1] = lambda1;\n p0 = null;\n}\n\n// Finds the left-right distance between two longitudes.\n// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want\n// the distance between ±180° to be 360°.\nfunction angle(lambda0, lambda1) {\n return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;\n}\n\nfunction rangeCompare(a, b) {\n return a[0] - b[0];\n}\n\nfunction rangeContains(range, x) {\n return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n}\n\nexport default function(feature) {\n var i, n, a, b, merged, deltaMax, delta;\n\n phi1 = lambda1 = -(lambda0 = phi0 = Infinity);\n ranges = [];\n stream(feature, boundsStream);\n\n // First, sort ranges by their minimum longitudes.\n if (n = ranges.length) {\n ranges.sort(rangeCompare);\n\n // Then, merge any ranges that overlap.\n for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {\n b = ranges[i];\n if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {\n if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n } else {\n merged.push(a = b);\n }\n }\n\n // Finally, find the largest gap between the merged ranges.\n // The final bounding box will be the inverse of this gap.\n for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {\n b = merged[i];\n if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1];\n }\n }\n\n ranges = range = null;\n\n return lambda0 === Infinity || phi0 === Infinity\n ? [[NaN, NaN], [NaN, NaN]]\n : [[lambda0, phi0], [lambda1, phi1]];\n}\n","import {asin, atan2, cos, sin, sqrt} from \"./math.js\";\n\nexport function spherical(cartesian) {\n return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n d[0] /= l, d[1] /= l, d[2] /= l;\n}\n","import {Adder} from \"d3-array\";\nimport {asin, atan2, cos, degrees, epsilon, epsilon2, hypot, radians, sin, sqrt} from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\n\nvar W0, W1,\n X0, Y0, Z0,\n X1, Y1, Z1,\n X2, Y2, Z2,\n lambda00, phi00, // first point\n x0, y0, z0; // previous point\n\nvar centroidStream = {\n sphere: noop,\n point: centroidPoint,\n lineStart: centroidLineStart,\n lineEnd: centroidLineEnd,\n polygonStart: function() {\n centroidStream.lineStart = centroidRingStart;\n centroidStream.lineEnd = centroidRingEnd;\n },\n polygonEnd: function() {\n centroidStream.lineStart = centroidLineStart;\n centroidStream.lineEnd = centroidLineEnd;\n }\n};\n\n// Arithmetic mean of Cartesian vectors.\nfunction centroidPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi);\n centroidPointCartesian(cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi));\n}\n\nfunction centroidPointCartesian(x, y, z) {\n ++W0;\n X0 += (x - X0) / W0;\n Y0 += (y - Y0) / W0;\n Z0 += (z - Z0) / W0;\n}\n\nfunction centroidLineStart() {\n centroidStream.point = centroidLinePointFirst;\n}\n\nfunction centroidLinePointFirst(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi);\n x0 = cosPhi * cos(lambda);\n y0 = cosPhi * sin(lambda);\n z0 = sin(phi);\n centroidStream.point = centroidLinePoint;\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLinePoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi),\n x = cosPhi * cos(lambda),\n y = cosPhi * sin(lambda),\n z = sin(phi),\n w = atan2(sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);\n W1 += w;\n X1 += w * (x0 + (x0 = x));\n Y1 += w * (y0 + (y0 = y));\n Z1 += w * (z0 + (z0 = z));\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLineEnd() {\n centroidStream.point = centroidPoint;\n}\n\n// See J. E. Brock, The Inertia Tensor for a Spherical Triangle,\n// J. Applied Mechanics 42, 239 (1975).\nfunction centroidRingStart() {\n centroidStream.point = centroidRingPointFirst;\n}\n\nfunction centroidRingEnd() {\n centroidRingPoint(lambda00, phi00);\n centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingPointFirst(lambda, phi) {\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n centroidStream.point = centroidRingPoint;\n var cosPhi = cos(phi);\n x0 = cosPhi * cos(lambda);\n y0 = cosPhi * sin(lambda);\n z0 = sin(phi);\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidRingPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi),\n x = cosPhi * cos(lambda),\n y = cosPhi * sin(lambda),\n z = sin(phi),\n cx = y0 * z - z0 * y,\n cy = z0 * x - x0 * z,\n cz = x0 * y - y0 * x,\n m = hypot(cx, cy, cz),\n w = asin(m), // line weight = angle\n v = m && -w / m; // area weight multiplier\n X2.add(v * cx);\n Y2.add(v * cy);\n Z2.add(v * cz);\n W1 += w;\n X1 += w * (x0 + (x0 = x));\n Y1 += w * (y0 + (y0 = y));\n Z1 += w * (z0 + (z0 = z));\n centroidPointCartesian(x0, y0, z0);\n}\n\nexport default function(object) {\n W0 = W1 =\n X0 = Y0 = Z0 =\n X1 = Y1 = Z1 = 0;\n X2 = new Adder();\n Y2 = new Adder();\n Z2 = new Adder();\n stream(object, centroidStream);\n\n var x = +X2,\n y = +Y2,\n z = +Z2,\n m = hypot(x, y, z);\n\n // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid.\n if (m < epsilon2) {\n x = X1, y = Y1, z = Z1;\n // If the feature has zero length, fall back to arithmetic mean of point vectors.\n if (W1 < epsilon) x = X0, y = Y0, z = Z0;\n m = hypot(x, y, z);\n // If the feature still has an undefined ccentroid, then return.\n if (m < epsilon2) return [NaN, NaN];\n }\n\n return [atan2(y, x) * degrees, asin(z / m) * degrees];\n}\n","import {cartesian, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport constant from \"./constant.js\";\nimport {acos, cos, degrees, epsilon, radians, sin, tau} from \"./math.js\";\nimport {rotateRadians} from \"./rotation.js\";\n\n// Generates a circle centered at [0°, 0°], with a given radius and precision.\nexport function circleStream(stream, radius, delta, direction, t0, t1) {\n if (!delta) return;\n var cosRadius = cos(radius),\n sinRadius = sin(radius),\n step = direction * delta;\n if (t0 == null) {\n t0 = radius + direction * tau;\n t1 = radius - step / 2;\n } else {\n t0 = circleRadius(cosRadius, t0);\n t1 = circleRadius(cosRadius, t1);\n if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;\n }\n for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]);\n stream.point(point[0], point[1]);\n }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n point = cartesian(point), point[0] -= cosRadius;\n cartesianNormalizeInPlace(point);\n var radius = acos(-point[1]);\n return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau;\n}\n\nexport default function() {\n var center = constant([0, 0]),\n radius = constant(90),\n precision = constant(2),\n ring,\n rotate,\n stream = {point: point};\n\n function point(x, y) {\n ring.push(x = rotate(x, y));\n x[0] *= degrees, x[1] *= degrees;\n }\n\n function circle() {\n var c = center.apply(this, arguments),\n r = radius.apply(this, arguments) * radians,\n p = precision.apply(this, arguments) * radians;\n ring = [];\n rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;\n circleStream(stream, r, p, 1);\n c = {type: \"Polygon\", coordinates: [ring]};\n ring = rotate = null;\n return c;\n }\n\n circle.center = function(_) {\n return arguments.length ? (center = typeof _ === \"function\" ? _ : constant([+_[0], +_[1]]), circle) : center;\n };\n\n circle.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), circle) : radius;\n };\n\n circle.precision = function(_) {\n return arguments.length ? (precision = typeof _ === \"function\" ? _ : constant(+_), circle) : precision;\n };\n\n return circle;\n}\n","import clip from \"./index.js\";\nimport {abs, atan, cos, epsilon, halfPi, pi, sin} from \"../math.js\";\n\nexport default clip(\n function() { return true; },\n clipAntimeridianLine,\n clipAntimeridianInterpolate,\n [-pi, -halfPi]\n);\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n var lambda0 = NaN,\n phi0 = NaN,\n sign0 = NaN,\n clean; // no intersections\n\n return {\n lineStart: function() {\n stream.lineStart();\n clean = 1;\n },\n point: function(lambda1, phi1) {\n var sign1 = lambda1 > 0 ? pi : -pi,\n delta = abs(lambda1 - lambda0);\n if (abs(delta - pi) < epsilon) { // line crosses a pole\n stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n stream.point(lambda1, phi0);\n clean = 0;\n } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian\n if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n clean = 0;\n }\n stream.point(lambda0 = lambda1, phi0 = phi1);\n sign0 = sign1;\n },\n lineEnd: function() {\n stream.lineEnd();\n lambda0 = phi0 = NaN;\n },\n clean: function() {\n return 2 - clean; // if intersections, rejoin first and last segments\n }\n };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n var cosPhi0,\n cosPhi1,\n sinLambda0Lambda1 = sin(lambda0 - lambda1);\n return abs(sinLambda0Lambda1) > epsilon\n ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1)\n - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0))\n / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n var phi;\n if (from == null) {\n phi = direction * halfPi;\n stream.point(-pi, phi);\n stream.point(0, phi);\n stream.point(pi, phi);\n stream.point(pi, 0);\n stream.point(pi, -phi);\n stream.point(0, -phi);\n stream.point(-pi, -phi);\n stream.point(-pi, 0);\n stream.point(-pi, phi);\n } else if (abs(from[0] - to[0]) > epsilon) {\n var lambda = from[0] < to[0] ? pi : -pi;\n phi = direction * lambda / 2;\n stream.point(-lambda, phi);\n stream.point(0, phi);\n stream.point(lambda, phi);\n } else {\n stream.point(to[0], to[1]);\n }\n}\n","import noop from \"../noop.js\";\n\nexport default function() {\n var lines = [],\n line;\n return {\n point: function(x, y, m) {\n line.push([x, y, m]);\n },\n lineStart: function() {\n lines.push(line = []);\n },\n lineEnd: noop,\n rejoin: function() {\n if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n },\n result: function() {\n var result = lines;\n lines = [];\n line = null;\n return result;\n }\n };\n}\n","import {cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical} from \"../cartesian.js\";\nimport {circleStream} from \"../circle.js\";\nimport {abs, cos, epsilon, pi, radians, sqrt} from \"../math.js\";\nimport pointEqual from \"../pointEqual.js\";\nimport clip from \"./index.js\";\n\nexport default function(radius) {\n var cr = cos(radius),\n delta = 2 * radians,\n smallRadius = cr > 0,\n notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case\n\n function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }\n\n function visible(lambda, phi) {\n return cos(lambda) * cos(phi) > cr;\n }\n\n // Takes a line and cuts into visible segments. Return values used for polygon\n // clipping: 0 - there were intersections or the line was empty; 1 - no\n // intersections 2 - there were intersections, and the first and last segments\n // should be rejoined.\n function clipLine(stream) {\n var point0, // previous point\n c0, // code for previous point\n v0, // visibility of previous point\n v00, // visibility of first point\n clean; // no intersections\n return {\n lineStart: function() {\n v00 = v0 = false;\n clean = 1;\n },\n point: function(lambda, phi) {\n var point1 = [lambda, phi],\n point2,\n v = visible(lambda, phi),\n c = smallRadius\n ? v ? 0 : code(lambda, phi)\n : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0;\n if (!point0 && (v00 = v0 = v)) stream.lineStart();\n if (v !== v0) {\n point2 = intersect(point0, point1);\n if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2))\n point1[2] = 1;\n }\n if (v !== v0) {\n clean = 0;\n if (v) {\n // outside going in\n stream.lineStart();\n point2 = intersect(point1, point0);\n stream.point(point2[0], point2[1]);\n } else {\n // inside going out\n point2 = intersect(point0, point1);\n stream.point(point2[0], point2[1], 2);\n stream.lineEnd();\n }\n point0 = point2;\n } else if (notHemisphere && point0 && smallRadius ^ v) {\n var t;\n // If the codes for two points are different, or are both zero,\n // and there this segment intersects with the small circle.\n if (!(c & c0) && (t = intersect(point1, point0, true))) {\n clean = 0;\n if (smallRadius) {\n stream.lineStart();\n stream.point(t[0][0], t[0][1]);\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n } else {\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n stream.lineStart();\n stream.point(t[0][0], t[0][1], 3);\n }\n }\n }\n if (v && (!point0 || !pointEqual(point0, point1))) {\n stream.point(point1[0], point1[1]);\n }\n point0 = point1, v0 = v, c0 = c;\n },\n lineEnd: function() {\n if (v0) stream.lineEnd();\n point0 = null;\n },\n // Rejoin first and last segments if there were intersections and the first\n // and last points were visible.\n clean: function() {\n return clean | ((v00 && v0) << 1);\n }\n };\n }\n\n // Intersects the great circle between a and b with the clip circle.\n function intersect(a, b, two) {\n var pa = cartesian(a),\n pb = cartesian(b);\n\n // We have two planes, n1.p = d1 and n2.p = d2.\n // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).\n var n1 = [1, 0, 0], // normal\n n2 = cartesianCross(pa, pb),\n n2n2 = cartesianDot(n2, n2),\n n1n2 = n2[0], // cartesianDot(n1, n2),\n determinant = n2n2 - n1n2 * n1n2;\n\n // Two polar points.\n if (!determinant) return !two && a;\n\n var c1 = cr * n2n2 / determinant,\n c2 = -cr * n1n2 / determinant,\n n1xn2 = cartesianCross(n1, n2),\n A = cartesianScale(n1, c1),\n B = cartesianScale(n2, c2);\n cartesianAddInPlace(A, B);\n\n // Solve |p(t)|^2 = 1.\n var u = n1xn2,\n w = cartesianDot(A, u),\n uu = cartesianDot(u, u),\n t2 = w * w - uu * (cartesianDot(A, A) - 1);\n\n if (t2 < 0) return;\n\n var t = sqrt(t2),\n q = cartesianScale(u, (-w - t) / uu);\n cartesianAddInPlace(q, A);\n q = spherical(q);\n\n if (!two) return q;\n\n // Two intersection points.\n var lambda0 = a[0],\n lambda1 = b[0],\n phi0 = a[1],\n phi1 = b[1],\n z;\n\n if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n var delta = lambda1 - lambda0,\n polar = abs(delta - pi) < epsilon,\n meridian = polar || delta < epsilon;\n\n if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n // Check that the first point is between a and b.\n if (meridian\n ? polar\n ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1)\n : phi0 <= q[1] && q[1] <= phi1\n : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n var q1 = cartesianScale(u, (-w + t) / uu);\n cartesianAddInPlace(q1, A);\n return [q, spherical(q1)];\n }\n }\n\n // Generates a 4-bit vector representing the location of a point relative to\n // the small circle's bounding box.\n function code(lambda, phi) {\n var r = smallRadius ? radius : pi - radius,\n code = 0;\n if (lambda < -r) code |= 1; // left\n else if (lambda > r) code |= 2; // right\n if (phi < -r) code |= 4; // below\n else if (phi > r) code |= 8; // above\n return code;\n }\n\n return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]);\n}\n","import clipRectangle from \"./rectangle.js\";\n\nexport default function() {\n var x0 = 0,\n y0 = 0,\n x1 = 960,\n y1 = 500,\n cache,\n cacheStream,\n clip;\n\n return clip = {\n stream: function(stream) {\n return cache && cacheStream === stream ? cache : cache = clipRectangle(x0, y0, x1, y1)(cacheStream = stream);\n },\n extent: function(_) {\n return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]];\n }\n };\n}\n","import clipBuffer from \"./buffer.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {epsilon, halfPi} from \"../math.js\";\nimport polygonContains from \"../polygonContains.js\";\nimport {merge} from \"d3-array\";\n\nexport default function(pointVisible, clipLine, interpolate, start) {\n return function(sink) {\n var line = clipLine(sink),\n ringBuffer = clipBuffer(),\n ringSink = clipLine(ringBuffer),\n polygonStarted = false,\n polygon,\n segments,\n ring;\n\n var clip = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() {\n clip.point = pointRing;\n clip.lineStart = ringStart;\n clip.lineEnd = ringEnd;\n segments = [];\n polygon = [];\n },\n polygonEnd: function() {\n clip.point = point;\n clip.lineStart = lineStart;\n clip.lineEnd = lineEnd;\n segments = merge(segments);\n var startInside = polygonContains(polygon, start);\n if (segments.length) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n clipRejoin(segments, compareIntersection, startInside, interpolate, sink);\n } else if (startInside) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n }\n if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n segments = polygon = null;\n },\n sphere: function() {\n sink.polygonStart();\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n sink.polygonEnd();\n }\n };\n\n function point(lambda, phi) {\n if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n }\n\n function pointLine(lambda, phi) {\n line.point(lambda, phi);\n }\n\n function lineStart() {\n clip.point = pointLine;\n line.lineStart();\n }\n\n function lineEnd() {\n clip.point = point;\n line.lineEnd();\n }\n\n function pointRing(lambda, phi) {\n ring.push([lambda, phi]);\n ringSink.point(lambda, phi);\n }\n\n function ringStart() {\n ringSink.lineStart();\n ring = [];\n }\n\n function ringEnd() {\n pointRing(ring[0][0], ring[0][1]);\n ringSink.lineEnd();\n\n var clean = ringSink.clean(),\n ringSegments = ringBuffer.result(),\n i, n = ringSegments.length, m,\n segment,\n point;\n\n ring.pop();\n polygon.push(ring);\n ring = null;\n\n if (!n) return;\n\n // No intersections.\n if (clean & 1) {\n segment = ringSegments[0];\n if ((m = segment.length - 1) > 0) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n sink.lineEnd();\n }\n return;\n }\n\n // Rejoin connected segments.\n // TODO reuse ringBuffer.rejoin()?\n if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n segments.push(ringSegments.filter(validSegment));\n }\n\n return clip;\n };\n}\n\nfunction validSegment(segment) {\n return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1])\n - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}\n","export default function(a, b, x0, y0, x1, y1) {\n var ax = a[0],\n ay = a[1],\n bx = b[0],\n by = b[1],\n t0 = 0,\n t1 = 1,\n dx = bx - ax,\n dy = by - ay,\n r;\n\n r = x0 - ax;\n if (!dx && r > 0) return;\n r /= dx;\n if (dx < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dx > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = x1 - ax;\n if (!dx && r < 0) return;\n r /= dx;\n if (dx < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dx > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n r = y0 - ay;\n if (!dy && r > 0) return;\n r /= dy;\n if (dy < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dy > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = y1 - ay;\n if (!dy && r < 0) return;\n r /= dy;\n if (dy < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dy > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n return true;\n}\n","import {abs, epsilon} from \"../math.js\";\nimport clipBuffer from \"./buffer.js\";\nimport clipLine from \"./line.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {merge} from \"d3-array\";\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon’s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport default function clipRectangle(x0, y0, x1, y1) {\n\n function visible(x, y) {\n return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n }\n\n function interpolate(from, to, direction, stream) {\n var a = 0, a1 = 0;\n if (from == null\n || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n || comparePoint(from, to) < 0 ^ direction > 0) {\n do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n while ((a = (a + direction + 4) % 4) !== a1);\n } else {\n stream.point(to[0], to[1]);\n }\n }\n\n function corner(p, direction) {\n return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3\n : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1\n : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0\n : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n }\n\n function compareIntersection(a, b) {\n return comparePoint(a.x, b.x);\n }\n\n function comparePoint(a, b) {\n var ca = corner(a, 1),\n cb = corner(b, 1);\n return ca !== cb ? ca - cb\n : ca === 0 ? b[1] - a[1]\n : ca === 1 ? a[0] - b[0]\n : ca === 2 ? a[1] - b[1]\n : b[0] - a[0];\n }\n\n return function(stream) {\n var activeStream = stream,\n bufferStream = clipBuffer(),\n segments,\n polygon,\n ring,\n x__, y__, v__, // first point\n x_, y_, v_, // previous point\n first,\n clean;\n\n var clipStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: polygonStart,\n polygonEnd: polygonEnd\n };\n\n function point(x, y) {\n if (visible(x, y)) activeStream.point(x, y);\n }\n\n function polygonInside() {\n var winding = 0;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n }\n }\n\n return winding;\n }\n\n // Buffer geometry within a polygon and then clip it en masse.\n function polygonStart() {\n activeStream = bufferStream, segments = [], polygon = [], clean = true;\n }\n\n function polygonEnd() {\n var startInside = polygonInside(),\n cleanInside = clean && startInside,\n visible = (segments = merge(segments)).length;\n if (cleanInside || visible) {\n stream.polygonStart();\n if (cleanInside) {\n stream.lineStart();\n interpolate(null, null, 1, stream);\n stream.lineEnd();\n }\n if (visible) {\n clipRejoin(segments, compareIntersection, startInside, interpolate, stream);\n }\n stream.polygonEnd();\n }\n activeStream = stream, segments = polygon = ring = null;\n }\n\n function lineStart() {\n clipStream.point = linePoint;\n if (polygon) polygon.push(ring = []);\n first = true;\n v_ = false;\n x_ = y_ = NaN;\n }\n\n // TODO rather than special-case polygons, simply handle them separately.\n // Ideally, coincident intersection points should be jittered to avoid\n // clipping issues.\n function lineEnd() {\n if (segments) {\n linePoint(x__, y__);\n if (v__ && v_) bufferStream.rejoin();\n segments.push(bufferStream.result());\n }\n clipStream.point = point;\n if (v_) activeStream.lineEnd();\n }\n\n function linePoint(x, y) {\n var v = visible(x, y);\n if (polygon) ring.push([x, y]);\n if (first) {\n x__ = x, y__ = y, v__ = v;\n first = false;\n if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n }\n } else {\n if (v && v_) activeStream.point(x, y);\n else {\n var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n if (clipLine(a, b, x0, y0, x1, y1)) {\n if (!v_) {\n activeStream.lineStart();\n activeStream.point(a[0], a[1]);\n }\n activeStream.point(b[0], b[1]);\n if (!v) activeStream.lineEnd();\n clean = false;\n } else if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n clean = false;\n }\n }\n }\n x_ = x, y_ = y, v_ = v;\n }\n\n return clipStream;\n };\n}\n","import pointEqual from \"../pointEqual.js\";\nimport {epsilon} from \"../math.js\";\n\nfunction Intersection(point, points, other, entry) {\n this.x = point;\n this.z = points;\n this.o = other; // another intersection\n this.e = entry; // is an entry?\n this.v = false; // visited\n this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\nexport default function(segments, compareIntersection, startInside, interpolate, stream) {\n var subject = [],\n clip = [],\n i,\n n;\n\n segments.forEach(function(segment) {\n if ((n = segment.length - 1) <= 0) return;\n var n, p0 = segment[0], p1 = segment[n], x;\n\n if (pointEqual(p0, p1)) {\n if (!p0[2] && !p1[2]) {\n stream.lineStart();\n for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n stream.lineEnd();\n return;\n }\n // handle degenerate cases by moving the point\n p1[0] += 2 * epsilon;\n }\n\n subject.push(x = new Intersection(p0, segment, null, true));\n clip.push(x.o = new Intersection(p0, null, x, false));\n subject.push(x = new Intersection(p1, segment, null, false));\n clip.push(x.o = new Intersection(p1, null, x, true));\n });\n\n if (!subject.length) return;\n\n clip.sort(compareIntersection);\n link(subject);\n link(clip);\n\n for (i = 0, n = clip.length; i < n; ++i) {\n clip[i].e = startInside = !startInside;\n }\n\n var start = subject[0],\n points,\n point;\n\n while (1) {\n // Find first unvisited intersection.\n var current = start,\n isSubject = true;\n while (current.v) if ((current = current.n) === start) return;\n points = current.z;\n stream.lineStart();\n do {\n current.v = current.o.v = true;\n if (current.e) {\n if (isSubject) {\n for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.n.x, 1, stream);\n }\n current = current.n;\n } else {\n if (isSubject) {\n points = current.p.z;\n for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.p.x, -1, stream);\n }\n current = current.p;\n }\n current = current.o;\n points = current.z;\n isSubject = !isSubject;\n } while (!current.v);\n stream.lineEnd();\n }\n}\n\nfunction link(array) {\n if (!(n = array.length)) return;\n var n,\n i = 0,\n a = array[0],\n b;\n while (++i < n) {\n a.n = b = array[i];\n b.p = a;\n a = b;\n }\n a.n = b = array[0];\n b.p = a;\n}\n","export default function(a, b) {\n\n function compose(x, y) {\n return x = a(x, y), b(x[0], x[1]);\n }\n\n if (a.invert && b.invert) compose.invert = function(x, y) {\n return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n };\n\n return compose;\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","import {default as polygonContains} from \"./polygonContains.js\";\nimport {default as distance} from \"./distance.js\";\nimport {epsilon2, radians} from \"./math.js\";\n\nvar containsObjectType = {\n Feature: function(object, point) {\n return containsGeometry(object.geometry, point);\n },\n FeatureCollection: function(object, point) {\n var features = object.features, i = -1, n = features.length;\n while (++i < n) if (containsGeometry(features[i].geometry, point)) return true;\n return false;\n }\n};\n\nvar containsGeometryType = {\n Sphere: function() {\n return true;\n },\n Point: function(object, point) {\n return containsPoint(object.coordinates, point);\n },\n MultiPoint: function(object, point) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) if (containsPoint(coordinates[i], point)) return true;\n return false;\n },\n LineString: function(object, point) {\n return containsLine(object.coordinates, point);\n },\n MultiLineString: function(object, point) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) if (containsLine(coordinates[i], point)) return true;\n return false;\n },\n Polygon: function(object, point) {\n return containsPolygon(object.coordinates, point);\n },\n MultiPolygon: function(object, point) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) if (containsPolygon(coordinates[i], point)) return true;\n return false;\n },\n GeometryCollection: function(object, point) {\n var geometries = object.geometries, i = -1, n = geometries.length;\n while (++i < n) if (containsGeometry(geometries[i], point)) return true;\n return false;\n }\n};\n\nfunction containsGeometry(geometry, point) {\n return geometry && containsGeometryType.hasOwnProperty(geometry.type)\n ? containsGeometryType[geometry.type](geometry, point)\n : false;\n}\n\nfunction containsPoint(coordinates, point) {\n return distance(coordinates, point) === 0;\n}\n\nfunction containsLine(coordinates, point) {\n var ao, bo, ab;\n for (var i = 0, n = coordinates.length; i < n; i++) {\n bo = distance(coordinates[i], point);\n if (bo === 0) return true;\n if (i > 0) {\n ab = distance(coordinates[i], coordinates[i - 1]);\n if (\n ab > 0 &&\n ao <= ab &&\n bo <= ab &&\n (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < epsilon2 * ab\n )\n return true;\n }\n ao = bo;\n }\n return false;\n}\n\nfunction containsPolygon(coordinates, point) {\n return !!polygonContains(coordinates.map(ringRadians), pointRadians(point));\n}\n\nfunction ringRadians(ring) {\n return ring = ring.map(pointRadians), ring.pop(), ring;\n}\n\nfunction pointRadians(point) {\n return [point[0] * radians, point[1] * radians];\n}\n\nexport default function(object, point) {\n return (object && containsObjectType.hasOwnProperty(object.type)\n ? containsObjectType[object.type]\n : containsGeometry)(object, point);\n}\n","import length from \"./length.js\";\n\nvar coordinates = [null, null],\n object = {type: \"LineString\", coordinates: coordinates};\n\nexport default function(a, b) {\n coordinates[0] = a;\n coordinates[1] = b;\n return length(object);\n}\n","import {range} from \"d3-array\";\nimport {abs, ceil, epsilon} from \"./math.js\";\n\nfunction graticuleX(y0, y1, dy) {\n var y = range(y0, y1 - epsilon, dy).concat(y1);\n return function(x) { return y.map(function(y) { return [x, y]; }); };\n}\n\nfunction graticuleY(x0, x1, dx) {\n var x = range(x0, x1 - epsilon, dx).concat(x1);\n return function(y) { return x.map(function(x) { return [x, y]; }); };\n}\n\nexport default function graticule() {\n var x1, x0, X1, X0,\n y1, y0, Y1, Y0,\n dx = 10, dy = dx, DX = 90, DY = 360,\n x, y, X, Y,\n precision = 2.5;\n\n function graticule() {\n return {type: \"MultiLineString\", coordinates: lines()};\n }\n\n function lines() {\n return range(ceil(X0 / DX) * DX, X1, DX).map(X)\n .concat(range(ceil(Y0 / DY) * DY, Y1, DY).map(Y))\n .concat(range(ceil(x0 / dx) * dx, x1, dx).filter(function(x) { return abs(x % DX) > epsilon; }).map(x))\n .concat(range(ceil(y0 / dy) * dy, y1, dy).filter(function(y) { return abs(y % DY) > epsilon; }).map(y));\n }\n\n graticule.lines = function() {\n return lines().map(function(coordinates) { return {type: \"LineString\", coordinates: coordinates}; });\n };\n\n graticule.outline = function() {\n return {\n type: \"Polygon\",\n coordinates: [\n X(X0).concat(\n Y(Y1).slice(1),\n X(X1).reverse().slice(1),\n Y(Y0).reverse().slice(1))\n ]\n };\n };\n\n graticule.extent = function(_) {\n if (!arguments.length) return graticule.extentMinor();\n return graticule.extentMajor(_).extentMinor(_);\n };\n\n graticule.extentMajor = function(_) {\n if (!arguments.length) return [[X0, Y0], [X1, Y1]];\n X0 = +_[0][0], X1 = +_[1][0];\n Y0 = +_[0][1], Y1 = +_[1][1];\n if (X0 > X1) _ = X0, X0 = X1, X1 = _;\n if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;\n return graticule.precision(precision);\n };\n\n graticule.extentMinor = function(_) {\n if (!arguments.length) return [[x0, y0], [x1, y1]];\n x0 = +_[0][0], x1 = +_[1][0];\n y0 = +_[0][1], y1 = +_[1][1];\n if (x0 > x1) _ = x0, x0 = x1, x1 = _;\n if (y0 > y1) _ = y0, y0 = y1, y1 = _;\n return graticule.precision(precision);\n };\n\n graticule.step = function(_) {\n if (!arguments.length) return graticule.stepMinor();\n return graticule.stepMajor(_).stepMinor(_);\n };\n\n graticule.stepMajor = function(_) {\n if (!arguments.length) return [DX, DY];\n DX = +_[0], DY = +_[1];\n return graticule;\n };\n\n graticule.stepMinor = function(_) {\n if (!arguments.length) return [dx, dy];\n dx = +_[0], dy = +_[1];\n return graticule;\n };\n\n graticule.precision = function(_) {\n if (!arguments.length) return precision;\n precision = +_;\n x = graticuleX(y0, y1, 90);\n y = graticuleY(x0, x1, precision);\n X = graticuleX(Y0, Y1, 90);\n Y = graticuleY(X0, X1, precision);\n return graticule;\n };\n\n return graticule\n .extentMajor([[-180, -90 + epsilon], [180, 90 - epsilon]])\n .extentMinor([[-180, -80 - epsilon], [180, 80 + epsilon]]);\n}\n\nexport function graticule10() {\n return graticule()();\n}\n","export default x => x;\n","export {default as geoArea} from \"./area.js\";\nexport {default as geoBounds} from \"./bounds.js\";\nexport {default as geoCentroid} from \"./centroid.js\";\nexport {default as geoCircle} from \"./circle.js\";\nexport {default as geoClipAntimeridian} from \"./clip/antimeridian.js\";\nexport {default as geoClipCircle} from \"./clip/circle.js\";\nexport {default as geoClipExtent} from \"./clip/extent.js\"; // DEPRECATED! Use d3.geoIdentity().clipExtent(…).\nexport {default as geoClipRectangle} from \"./clip/rectangle.js\";\nexport {default as geoContains} from \"./contains.js\";\nexport {default as geoDistance} from \"./distance.js\";\nexport {default as geoGraticule, graticule10 as geoGraticule10} from \"./graticule.js\";\nexport {default as geoInterpolate} from \"./interpolate.js\";\nexport {default as geoLength} from \"./length.js\";\nexport {default as geoPath} from \"./path/index.js\";\nexport {default as geoAlbers} from \"./projection/albers.js\";\nexport {default as geoAlbersUsa} from \"./projection/albersUsa.js\";\nexport {default as geoAzimuthalEqualArea, azimuthalEqualAreaRaw as geoAzimuthalEqualAreaRaw} from \"./projection/azimuthalEqualArea.js\";\nexport {default as geoAzimuthalEquidistant, azimuthalEquidistantRaw as geoAzimuthalEquidistantRaw} from \"./projection/azimuthalEquidistant.js\";\nexport {default as geoConicConformal, conicConformalRaw as geoConicConformalRaw} from \"./projection/conicConformal.js\";\nexport {default as geoConicEqualArea, conicEqualAreaRaw as geoConicEqualAreaRaw} from \"./projection/conicEqualArea.js\";\nexport {default as geoConicEquidistant, conicEquidistantRaw as geoConicEquidistantRaw} from \"./projection/conicEquidistant.js\";\nexport {default as geoEqualEarth, equalEarthRaw as geoEqualEarthRaw} from \"./projection/equalEarth.js\";\nexport {default as geoEquirectangular, equirectangularRaw as geoEquirectangularRaw} from \"./projection/equirectangular.js\";\nexport {default as geoGnomonic, gnomonicRaw as geoGnomonicRaw} from \"./projection/gnomonic.js\";\nexport {default as geoIdentity} from \"./projection/identity.js\";\nexport {default as geoProjection, projectionMutator as geoProjectionMutator} from \"./projection/index.js\";\nexport {default as geoMercator, mercatorRaw as geoMercatorRaw} from \"./projection/mercator.js\";\nexport {default as geoNaturalEarth1, naturalEarth1Raw as geoNaturalEarth1Raw} from \"./projection/naturalEarth1.js\";\nexport {default as geoOrthographic, orthographicRaw as geoOrthographicRaw} from \"./projection/orthographic.js\";\nexport {default as geoStereographic, stereographicRaw as geoStereographicRaw} from \"./projection/stereographic.js\";\nexport {default as geoTransverseMercator, transverseMercatorRaw as geoTransverseMercatorRaw} from \"./projection/transverseMercator.js\";\nexport {default as geoRotation} from \"./rotation.js\";\nexport {default as geoStream} from \"./stream.js\";\nexport {default as geoTransform} from \"./transform.js\";\n","import {asin, atan2, cos, degrees, haversin, radians, sin, sqrt} from \"./math.js\";\n\nexport default function(a, b) {\n var x0 = a[0] * radians,\n y0 = a[1] * radians,\n x1 = b[0] * radians,\n y1 = b[1] * radians,\n cy0 = cos(y0),\n sy0 = sin(y0),\n cy1 = cos(y1),\n sy1 = sin(y1),\n kx0 = cy0 * cos(x0),\n ky0 = cy0 * sin(x0),\n kx1 = cy1 * cos(x1),\n ky1 = cy1 * sin(x1),\n d = 2 * asin(sqrt(haversin(y1 - y0) + cy0 * cy1 * haversin(x1 - x0))),\n k = sin(d);\n\n var interpolate = d ? function(t) {\n var B = sin(t *= d) / k,\n A = sin(d - t) / k,\n x = A * kx0 + B * kx1,\n y = A * ky0 + B * ky1,\n z = A * sy0 + B * sy1;\n return [\n atan2(y, x) * degrees,\n atan2(z, sqrt(x * x + y * y)) * degrees\n ];\n } : function() {\n return [x0 * degrees, y0 * degrees];\n };\n\n interpolate.distance = d;\n\n return interpolate;\n}\n","import {Adder} from \"d3-array\";\nimport {abs, atan2, cos, radians, sin, sqrt} from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\n\nvar lengthSum,\n lambda0,\n sinPhi0,\n cosPhi0;\n\nvar lengthStream = {\n sphere: noop,\n point: noop,\n lineStart: lengthLineStart,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop\n};\n\nfunction lengthLineStart() {\n lengthStream.point = lengthPointFirst;\n lengthStream.lineEnd = lengthLineEnd;\n}\n\nfunction lengthLineEnd() {\n lengthStream.point = lengthStream.lineEnd = noop;\n}\n\nfunction lengthPointFirst(lambda, phi) {\n lambda *= radians, phi *= radians;\n lambda0 = lambda, sinPhi0 = sin(phi), cosPhi0 = cos(phi);\n lengthStream.point = lengthPoint;\n}\n\nfunction lengthPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var sinPhi = sin(phi),\n cosPhi = cos(phi),\n delta = abs(lambda - lambda0),\n cosDelta = cos(delta),\n sinDelta = sin(delta),\n x = cosPhi * sinDelta,\n y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,\n z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;\n lengthSum.add(atan2(sqrt(x * x + y * y), z));\n lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;\n}\n\nexport default function(object) {\n lengthSum = new Adder();\n stream(object, lengthStream);\n return +lengthSum;\n}\n","export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n return (x = sin(x / 2)) * x;\n}\n","export default function noop() {}\n","import {Adder} from \"d3-array\";\nimport {abs} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar areaSum = new Adder(),\n areaRingSum = new Adder(),\n x00,\n y00,\n x0,\n y0;\n\nvar areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n areaSum.add(abs(areaRingSum));\n areaRingSum = new Adder();\n },\n result: function() {\n var area = areaSum / 2;\n areaSum = new Adder();\n return area;\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n areaStream.point = areaPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n areaRingSum.add(y0 * x - x0 * y);\n x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n areaPoint(x00, y00);\n}\n\nexport default areaStream;\n","import noop from \"../noop.js\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n","import {sqrt} from \"../math.js\";\n\n// TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n Y0 = 0,\n Z0 = 0,\n X1 = 0,\n Y1 = 0,\n Z1 = 0,\n X2 = 0,\n Y2 = 0,\n Z2 = 0,\n x00,\n y00,\n x0,\n y0;\n\nvar centroidStream = {\n point: centroidPoint,\n lineStart: centroidLineStart,\n lineEnd: centroidLineEnd,\n polygonStart: function() {\n centroidStream.lineStart = centroidRingStart;\n centroidStream.lineEnd = centroidRingEnd;\n },\n polygonEnd: function() {\n centroidStream.point = centroidPoint;\n centroidStream.lineStart = centroidLineStart;\n centroidStream.lineEnd = centroidLineEnd;\n },\n result: function() {\n var centroid = Z2 ? [X2 / Z2, Y2 / Z2]\n : Z1 ? [X1 / Z1, Y1 / Z1]\n : Z0 ? [X0 / Z0, Y0 / Z0]\n : [NaN, NaN];\n X0 = Y0 = Z0 =\n X1 = Y1 = Z1 =\n X2 = Y2 = Z2 = 0;\n return centroid;\n }\n};\n\nfunction centroidPoint(x, y) {\n X0 += x;\n Y0 += y;\n ++Z0;\n}\n\nfunction centroidLineStart() {\n centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n centroidStream.point = centroidPointLine;\n centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n var dx = x - x0, dy = y - y0, z = sqrt(dx * dx + dy * dy);\n X1 += z * (x0 + x) / 2;\n Y1 += z * (y0 + y) / 2;\n Z1 += z;\n centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n centroidStream.point = centroidPointRing;\n centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n var dx = x - x0,\n dy = y - y0,\n z = sqrt(dx * dx + dy * dy);\n\n X1 += z * (x0 + x) / 2;\n Y1 += z * (y0 + y) / 2;\n Z1 += z;\n\n z = y0 * x - x0 * y;\n X2 += z * (x0 + x);\n Y2 += z * (y0 + y);\n Z2 += z * 3;\n centroidPoint(x0 = x, y0 = y);\n}\n\nexport default centroidStream;\n","import {tau} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nexport default function PathContext(context) {\n this._context = context;\n}\n\nPathContext.prototype = {\n _radius: 4.5,\n pointRadius: function(_) {\n return this._radius = _, this;\n },\n polygonStart: function() {\n this._line = 0;\n },\n polygonEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line === 0) this._context.closePath();\n this._point = NaN;\n },\n point: function(x, y) {\n switch (this._point) {\n case 0: {\n this._context.moveTo(x, y);\n this._point = 1;\n break;\n }\n case 1: {\n this._context.lineTo(x, y);\n break;\n }\n default: {\n this._context.moveTo(x + this._radius, y);\n this._context.arc(x, y, this._radius, 0, tau);\n break;\n }\n }\n },\n result: noop\n};\n","import identity from \"../identity.js\";\nimport stream from \"../stream.js\";\nimport pathArea from \"./area.js\";\nimport pathBounds from \"./bounds.js\";\nimport pathCentroid from \"./centroid.js\";\nimport PathContext from \"./context.js\";\nimport pathMeasure from \"./measure.js\";\nimport PathString from \"./string.js\";\n\nexport default function(projection, context) {\n let digits = 3,\n pointRadius = 4.5,\n projectionStream,\n contextStream;\n\n function path(object) {\n if (object) {\n if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n stream(object, projectionStream(contextStream));\n }\n return contextStream.result();\n }\n\n path.area = function(object) {\n stream(object, projectionStream(pathArea));\n return pathArea.result();\n };\n\n path.measure = function(object) {\n stream(object, projectionStream(pathMeasure));\n return pathMeasure.result();\n };\n\n path.bounds = function(object) {\n stream(object, projectionStream(pathBounds));\n return pathBounds.result();\n };\n\n path.centroid = function(object) {\n stream(object, projectionStream(pathCentroid));\n return pathCentroid.result();\n };\n\n path.projection = function(_) {\n if (!arguments.length) return projection;\n projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream;\n return path;\n };\n\n path.context = function(_) {\n if (!arguments.length) return context;\n contextStream = _ == null ? (context = null, new PathString(digits)) : new PathContext(context = _);\n if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n return path;\n };\n\n path.pointRadius = function(_) {\n if (!arguments.length) return pointRadius;\n pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n return path;\n };\n\n path.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) digits = null;\n else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n if (context === null) contextStream = new PathString(digits);\n return path;\n };\n\n return path.projection(projection).digits(digits).context(context);\n}\n","import {Adder} from \"d3-array\";\nimport {sqrt} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar lengthSum = new Adder(),\n lengthRing,\n x00,\n y00,\n x0,\n y0;\n\nvar lengthStream = {\n point: noop,\n lineStart: function() {\n lengthStream.point = lengthPointFirst;\n },\n lineEnd: function() {\n if (lengthRing) lengthPoint(x00, y00);\n lengthStream.point = noop;\n },\n polygonStart: function() {\n lengthRing = true;\n },\n polygonEnd: function() {\n lengthRing = null;\n },\n result: function() {\n var length = +lengthSum;\n lengthSum = new Adder();\n return length;\n }\n};\n\nfunction lengthPointFirst(x, y) {\n lengthStream.point = lengthPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n x0 -= x, y0 -= y;\n lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n","// Simple caching for constant-radius points.\nlet cacheDigits, cacheAppend, cacheRadius, cacheCircle;\n\nexport default class PathString {\n constructor(digits) {\n this._append = digits == null ? append : appendRound(digits);\n this._radius = 4.5;\n this._ = \"\";\n }\n pointRadius(_) {\n this._radius = +_;\n return this;\n }\n polygonStart() {\n this._line = 0;\n }\n polygonEnd() {\n this._line = NaN;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {\n if (this._line === 0) this._ += \"Z\";\n this._point = NaN;\n }\n point(x, y) {\n switch (this._point) {\n case 0: {\n this._append`M${x},${y}`;\n this._point = 1;\n break;\n }\n case 1: {\n this._append`L${x},${y}`;\n break;\n }\n default: {\n this._append`M${x},${y}`;\n if (this._radius !== cacheRadius || this._append !== cacheAppend) {\n const r = this._radius;\n const s = this._;\n this._ = \"\"; // stash the old string so we can cache the circle path fragment\n this._append`m0,${r}a${r},${r} 0 1,1 0,${-2 * r}a${r},${r} 0 1,1 0,${2 * r}z`;\n cacheRadius = r;\n cacheAppend = this._append;\n cacheCircle = this._;\n this._ = s;\n }\n this._ += cacheCircle;\n break;\n }\n }\n }\n result() {\n const result = this._;\n this._ = \"\";\n return result.length ? result : null;\n }\n}\n\nfunction append(strings) {\n let i = 1;\n this._ += strings[0];\n for (const j = strings.length; i < j; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n const d = Math.floor(digits);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${digits}`);\n if (d > 15) return append;\n if (d !== cacheDigits) {\n const k = 10 ** d;\n cacheDigits = d;\n cacheAppend = function append(strings) {\n let i = 1;\n this._ += strings[0];\n for (const j = strings.length; i < j; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n }\n return cacheAppend;\n}\n","import {abs, epsilon} from \"./math.js\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n","import {Adder} from \"d3-array\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from \"./math.js\";\n\nfunction longitude(point) {\n return abs(point[0]) <= pi ? point[0] : sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);\n}\n\nexport default function(polygon, point) {\n var lambda = longitude(point),\n phi = point[1],\n sinPhi = sin(phi),\n normal = [sin(lambda), -cos(lambda), 0],\n angle = 0,\n winding = 0;\n\n var sum = new Adder();\n\n if (sinPhi === 1) phi = halfPi + epsilon;\n else if (sinPhi === -1) phi = -halfPi - epsilon;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n if (!(m = (ring = polygon[i]).length)) continue;\n var ring,\n m,\n point0 = ring[m - 1],\n lambda0 = longitude(point0),\n phi0 = point0[1] / 2 + quarterPi,\n sinPhi0 = sin(phi0),\n cosPhi0 = cos(phi0);\n\n for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n var point1 = ring[j],\n lambda1 = longitude(point1),\n phi1 = point1[1] / 2 + quarterPi,\n sinPhi1 = sin(phi1),\n cosPhi1 = cos(phi1),\n delta = lambda1 - lambda0,\n sign = delta >= 0 ? 1 : -1,\n absDelta = sign * delta,\n antimeridian = absDelta > pi,\n k = sinPhi0 * sinPhi1;\n\n sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n angle += antimeridian ? delta + sign * tau : delta;\n\n // Are the longitudes either side of the point’s meridian (lambda),\n // and are the latitudes smaller than the parallel (phi)?\n if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n var arc = cartesianCross(cartesian(point0), cartesian(point1));\n cartesianNormalizeInPlace(arc);\n var intersection = cartesianCross(normal, arc);\n cartesianNormalizeInPlace(intersection);\n var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n winding += antimeridian ^ delta >= 0 ? 1 : -1;\n }\n }\n }\n }\n\n // First, determine whether the South pole is inside or outside:\n //\n // It is inside if:\n // * the polygon winds around it in a clockwise direction.\n // * the polygon does not (cumulatively) wind around it, but has a negative\n // (counter-clockwise) area.\n //\n // Second, count the (signed) number of times a segment crosses a lambda\n // from the point to the South pole. If it is zero, then the point is the\n // same side as the South pole.\n\n return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1);\n}\n","import conicEqualArea from \"./conicEqualArea.js\";\n\nexport default function() {\n return conicEqualArea()\n .parallels([29.5, 45.5])\n .scale(1070)\n .translate([480, 250])\n .rotate([96, 0])\n .center([-0.6, 38.7]);\n}\n","import {epsilon} from \"../math.js\";\nimport albers from \"./albers.js\";\nimport conicEqualArea from \"./conicEqualArea.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\n\n// The projections must have mutually exclusive clip regions on the sphere,\n// as this will avoid emitting interleaving lines and polygons.\nfunction multiplex(streams) {\n var n = streams.length;\n return {\n point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },\n sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },\n lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },\n lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },\n polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },\n polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }\n };\n}\n\n// A composite projection for the United States, configured by default for\n// 960×500. The projection also works quite well at 960×600 if you change the\n// scale to 1285 and adjust the translate accordingly. The set of standard\n// parallels for each region comes from USGS, which is published here:\n// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers\nexport default function() {\n var cache,\n cacheStream,\n lower48 = albers(), lower48Point,\n alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338\n hawaii = conicEqualArea().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007\n point, pointStream = {point: function(x, y) { point = [x, y]; }};\n\n function albersUsa(coordinates) {\n var x = coordinates[0], y = coordinates[1];\n return point = null,\n (lower48Point.point(x, y), point)\n || (alaskaPoint.point(x, y), point)\n || (hawaiiPoint.point(x, y), point);\n }\n\n albersUsa.invert = function(coordinates) {\n var k = lower48.scale(),\n t = lower48.translate(),\n x = (coordinates[0] - t[0]) / k,\n y = (coordinates[1] - t[1]) / k;\n return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska\n : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii\n : lower48).invert(coordinates);\n };\n\n albersUsa.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);\n };\n\n albersUsa.precision = function(_) {\n if (!arguments.length) return lower48.precision();\n lower48.precision(_), alaska.precision(_), hawaii.precision(_);\n return reset();\n };\n\n albersUsa.scale = function(_) {\n if (!arguments.length) return lower48.scale();\n lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);\n return albersUsa.translate(lower48.translate());\n };\n\n albersUsa.translate = function(_) {\n if (!arguments.length) return lower48.translate();\n var k = lower48.scale(), x = +_[0], y = +_[1];\n\n lower48Point = lower48\n .translate(_)\n .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])\n .stream(pointStream);\n\n alaskaPoint = alaska\n .translate([x - 0.307 * k, y + 0.201 * k])\n .clipExtent([[x - 0.425 * k + epsilon, y + 0.120 * k + epsilon], [x - 0.214 * k - epsilon, y + 0.234 * k - epsilon]])\n .stream(pointStream);\n\n hawaiiPoint = hawaii\n .translate([x - 0.205 * k, y + 0.212 * k])\n .clipExtent([[x - 0.214 * k + epsilon, y + 0.166 * k + epsilon], [x - 0.115 * k - epsilon, y + 0.234 * k - epsilon]])\n .stream(pointStream);\n\n return reset();\n };\n\n albersUsa.fitExtent = function(extent, object) {\n return fitExtent(albersUsa, extent, object);\n };\n\n albersUsa.fitSize = function(size, object) {\n return fitSize(albersUsa, size, object);\n };\n\n albersUsa.fitWidth = function(width, object) {\n return fitWidth(albersUsa, width, object);\n };\n\n albersUsa.fitHeight = function(height, object) {\n return fitHeight(albersUsa, height, object);\n };\n\n function reset() {\n cache = cacheStream = null;\n return albersUsa;\n }\n\n return albersUsa.scale(1070);\n}\n","import {asin, atan2, cos, sin, sqrt} from \"../math.js\";\n\nexport function azimuthalRaw(scale) {\n return function(x, y) {\n var cx = cos(x),\n cy = cos(y),\n k = scale(cx * cy);\n if (k === Infinity) return [2, 0];\n return [\n k * cy * sin(x),\n k * sin(y)\n ];\n }\n}\n\nexport function azimuthalInvert(angle) {\n return function(x, y) {\n var z = sqrt(x * x + y * y),\n c = angle(z),\n sc = sin(c),\n cc = cos(c);\n return [\n atan2(x * sc, z * cc),\n asin(z && y * sc / z)\n ];\n }\n}\n","import {asin, sqrt} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) {\n return sqrt(2 / (1 + cxcy));\n});\n\nazimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) {\n return 2 * asin(z / 2);\n});\n\nexport default function() {\n return projection(azimuthalEqualAreaRaw)\n .scale(124.75)\n .clipAngle(180 - 1e-3);\n}\n","import {acos, sin} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEquidistantRaw = azimuthalRaw(function(c) {\n return (c = acos(c)) && c / sin(c);\n});\n\nazimuthalEquidistantRaw.invert = azimuthalInvert(function(z) {\n return z;\n});\n\nexport default function() {\n return projection(azimuthalEquidistantRaw)\n .scale(79.4188)\n .clipAngle(180 - 1e-3);\n}\n","import {degrees, pi, radians} from \"../math.js\";\nimport {projectionMutator} from \"./index.js\";\n\nexport function conicProjection(projectAt) {\n var phi0 = 0,\n phi1 = pi / 3,\n m = projectionMutator(projectAt),\n p = m(phi0, phi1);\n\n p.parallels = function(_) {\n return arguments.length ? m(phi0 = _[0] * radians, phi1 = _[1] * radians) : [phi0 * degrees, phi1 * degrees];\n };\n\n return p;\n}\n","import {abs, atan, atan2, cos, epsilon, halfPi, log, pi, pow, sign, sin, sqrt, tan} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {mercatorRaw} from \"./mercator.js\";\n\nfunction tany(y) {\n return tan((halfPi + y) / 2);\n}\n\nexport function conicConformalRaw(y0, y1) {\n var cy0 = cos(y0),\n n = y0 === y1 ? sin(y0) : log(cy0 / cos(y1)) / log(tany(y1) / tany(y0)),\n f = cy0 * pow(tany(y0), n) / n;\n\n if (!n) return mercatorRaw;\n\n function project(x, y) {\n if (f > 0) { if (y < -halfPi + epsilon) y = -halfPi + epsilon; }\n else { if (y > halfPi - epsilon) y = halfPi - epsilon; }\n var r = f / pow(tany(y), n);\n return [r * sin(n * x), f - r * cos(n * x)];\n }\n\n project.invert = function(x, y) {\n var fy = f - y, r = sign(n) * sqrt(x * x + fy * fy),\n l = atan2(x, abs(fy)) * sign(fy);\n if (fy * n < 0)\n l -= pi * sign(x) * sign(fy);\n return [l / n, 2 * atan(pow(f / r, 1 / n)) - halfPi];\n };\n\n return project;\n}\n\nexport default function() {\n return conicProjection(conicConformalRaw)\n .scale(109.5)\n .parallels([30, 30]);\n}\n","import {abs, asin, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {cylindricalEqualAreaRaw} from \"./cylindricalEqualArea.js\";\n\nexport function conicEqualAreaRaw(y0, y1) {\n var sy0 = sin(y0), n = (sy0 + sin(y1)) / 2;\n\n // Are the parallels symmetrical around the Equator?\n if (abs(n) < epsilon) return cylindricalEqualAreaRaw(y0);\n\n var c = 1 + sy0 * (2 * n - sy0), r0 = sqrt(c) / n;\n\n function project(x, y) {\n var r = sqrt(c - 2 * n * sin(y)) / n;\n return [r * sin(x *= n), r0 - r * cos(x)];\n }\n\n project.invert = function(x, y) {\n var r0y = r0 - y,\n l = atan2(x, abs(r0y)) * sign(r0y);\n if (r0y * n < 0)\n l -= pi * sign(x) * sign(r0y);\n return [l / n, asin((c - (x * x + r0y * r0y) * n * n) / (2 * n))];\n };\n\n return project;\n}\n\nexport default function() {\n return conicProjection(conicEqualAreaRaw)\n .scale(155.424)\n .center([0, 33.6442]);\n}\n","import {abs, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {equirectangularRaw} from \"./equirectangular.js\";\n\nexport function conicEquidistantRaw(y0, y1) {\n var cy0 = cos(y0),\n n = y0 === y1 ? sin(y0) : (cy0 - cos(y1)) / (y1 - y0),\n g = cy0 / n + y0;\n\n if (abs(n) < epsilon) return equirectangularRaw;\n\n function project(x, y) {\n var gy = g - y, nx = n * x;\n return [gy * sin(nx), g - gy * cos(nx)];\n }\n\n project.invert = function(x, y) {\n var gy = g - y,\n l = atan2(x, abs(gy)) * sign(gy);\n if (gy * n < 0)\n l -= pi * sign(x) * sign(gy);\n return [l / n, g - sign(n) * sqrt(x * x + gy * gy)];\n };\n\n return project;\n}\n\nexport default function() {\n return conicProjection(conicEquidistantRaw)\n .scale(131.154)\n .center([0, 13.9389]);\n}\n","import {asin, cos, sin} from \"../math.js\";\n\nexport function cylindricalEqualAreaRaw(phi0) {\n var cosPhi0 = cos(phi0);\n\n function forward(lambda, phi) {\n return [lambda * cosPhi0, sin(phi) / cosPhi0];\n }\n\n forward.invert = function(x, y) {\n return [x / cosPhi0, asin(y * cosPhi0)];\n };\n\n return forward;\n}\n","import projection from \"./index.js\";\nimport {abs, asin, cos, epsilon2, sin, sqrt} from \"../math.js\";\n\nvar A1 = 1.340264,\n A2 = -0.081106,\n A3 = 0.000893,\n A4 = 0.003796,\n M = sqrt(3) / 2,\n iterations = 12;\n\nexport function equalEarthRaw(lambda, phi) {\n var l = asin(M * sin(phi)), l2 = l * l, l6 = l2 * l2 * l2;\n return [\n lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),\n l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))\n ];\n}\n\nequalEarthRaw.invert = function(x, y) {\n var l = y, l2 = l * l, l6 = l2 * l2 * l2;\n for (var i = 0, delta, fy, fpy; i < iterations; ++i) {\n fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;\n fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);\n l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;\n if (abs(delta) < epsilon2) break;\n }\n return [\n M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l),\n asin(sin(l) / M)\n ];\n};\n\nexport default function() {\n return projection(equalEarthRaw)\n .scale(177.158);\n}\n","import projection from \"./index.js\";\n\nexport function equirectangularRaw(lambda, phi) {\n return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\nexport default function() {\n return projection(equirectangularRaw)\n .scale(152.63);\n}\n","import {default as geoStream} from \"../stream.js\";\nimport boundsStream from \"../path/bounds.js\";\n\nfunction fit(projection, fitBounds, object) {\n var clip = projection.clipExtent && projection.clipExtent();\n projection.scale(150).translate([0, 0]);\n if (clip != null) projection.clipExtent(null);\n geoStream(object, projection.stream(boundsStream));\n fitBounds(boundsStream.result());\n if (clip != null) projection.clipExtent(clip);\n return projection;\n}\n\nexport function fitExtent(projection, extent, object) {\n return fit(projection, function(b) {\n var w = extent[1][0] - extent[0][0],\n h = extent[1][1] - extent[0][1],\n k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n\nexport function fitSize(projection, size, object) {\n return fitExtent(projection, [[0, 0], size], object);\n}\n\nexport function fitWidth(projection, width, object) {\n return fit(projection, function(b) {\n var w = +width,\n k = w / (b[1][0] - b[0][0]),\n x = (w - k * (b[1][0] + b[0][0])) / 2,\n y = -k * b[0][1];\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n\nexport function fitHeight(projection, height, object) {\n return fit(projection, function(b) {\n var h = +height,\n k = h / (b[1][1] - b[0][1]),\n x = -k * b[0][0],\n y = (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n","import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function gnomonicRaw(x, y) {\n var cy = cos(y), k = cos(x) * cy;\n return [cy * sin(x) / k, sin(y) / k];\n}\n\ngnomonicRaw.invert = azimuthalInvert(atan);\n\nexport default function() {\n return projection(gnomonicRaw)\n .scale(144.049)\n .clipAngle(60);\n}\n","import clipRectangle from \"../clip/rectangle.js\";\nimport identity from \"../identity.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport {cos, degrees, radians, sin} from \"../math.js\";\n\nexport default function() {\n var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, // scale, translate and reflect\n alpha = 0, ca, sa, // angle\n x0 = null, y0, x1, y1, // clip extent\n kx = 1, ky = 1,\n transform = transformer({\n point: function(x, y) {\n var p = projection([x, y])\n this.stream.point(p[0], p[1]);\n }\n }),\n postclip = identity,\n cache,\n cacheStream;\n\n function reset() {\n kx = k * sx;\n ky = k * sy;\n cache = cacheStream = null;\n return projection;\n }\n\n function projection (p) {\n var x = p[0] * kx, y = p[1] * ky;\n if (alpha) {\n var t = y * ca - x * sa;\n x = x * ca + y * sa;\n y = t;\n } \n return [x + tx, y + ty];\n }\n projection.invert = function(p) {\n var x = p[0] - tx, y = p[1] - ty;\n if (alpha) {\n var t = y * ca + x * sa;\n x = x * ca - y * sa;\n y = t;\n }\n return [x / kx, y / ky];\n };\n projection.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream));\n };\n projection.postclip = function(_) {\n return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n };\n projection.clipExtent = function(_) {\n return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n projection.scale = function(_) {\n return arguments.length ? (k = +_, reset()) : k;\n };\n projection.translate = function(_) {\n return arguments.length ? (tx = +_[0], ty = +_[1], reset()) : [tx, ty];\n }\n projection.angle = function(_) {\n return arguments.length ? (alpha = _ % 360 * radians, sa = sin(alpha), ca = cos(alpha), reset()) : alpha * degrees;\n };\n projection.reflectX = function(_) {\n return arguments.length ? (sx = _ ? -1 : 1, reset()) : sx < 0;\n };\n projection.reflectY = function(_) {\n return arguments.length ? (sy = _ ? -1 : 1, reset()) : sy < 0;\n };\n projection.fitExtent = function(extent, object) {\n return fitExtent(projection, extent, object);\n };\n projection.fitSize = function(size, object) {\n return fitSize(projection, size, object);\n };\n projection.fitWidth = function(width, object) {\n return fitWidth(projection, width, object);\n };\n projection.fitHeight = function(height, object) {\n return fitHeight(projection, height, object);\n };\n\n return projection;\n}\n","import clipAntimeridian from \"../clip/antimeridian.js\";\nimport clipCircle from \"../clip/circle.js\";\nimport clipRectangle from \"../clip/rectangle.js\";\nimport compose from \"../compose.js\";\nimport identity from \"../identity.js\";\nimport {cos, degrees, radians, sin, sqrt} from \"../math.js\";\nimport {rotateRadians} from \"../rotation.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport resample from \"./resample.js\";\n\nvar transformRadians = transformer({\n point: function(x, y) {\n this.stream.point(x * radians, y * radians);\n }\n});\n\nfunction transformRotate(rotate) {\n return transformer({\n point: function(x, y) {\n var r = rotate(x, y);\n return this.stream.point(r[0], r[1]);\n }\n });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n function transform(x, y) {\n x *= sx; y *= sy;\n return [dx + k * x, dy - k * y];\n }\n transform.invert = function(x, y) {\n return [(x - dx) / k * sx, (dy - y) / k * sy];\n };\n return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n if (!alpha) return scaleTranslate(k, dx, dy, sx, sy);\n var cosAlpha = cos(alpha),\n sinAlpha = sin(alpha),\n a = cosAlpha * k,\n b = sinAlpha * k,\n ai = cosAlpha / k,\n bi = sinAlpha / k,\n ci = (sinAlpha * dy - cosAlpha * dx) / k,\n fi = (sinAlpha * dx + cosAlpha * dy) / k;\n function transform(x, y) {\n x *= sx; y *= sy;\n return [a * x - b * y + dx, dy - b * x - a * y];\n }\n transform.invert = function(x, y) {\n return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n };\n return transform;\n}\n\nexport default function projection(project) {\n return projectionMutator(function() { return project; })();\n}\n\nexport function projectionMutator(projectAt) {\n var project,\n k = 150, // scale\n x = 480, y = 250, // translate\n lambda = 0, phi = 0, // center\n deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n alpha = 0, // post-rotate angle\n sx = 1, // reflectX\n sy = 1, // reflectX\n theta = null, preclip = clipAntimeridian, // pre-clip angle\n x0 = null, y0, x1, y1, postclip = identity, // post-clip extent\n delta2 = 0.5, // precision\n projectResample,\n projectTransform,\n projectRotateTransform,\n cache,\n cacheStream;\n\n function projection(point) {\n return projectRotateTransform(point[0] * radians, point[1] * radians);\n }\n\n function invert(point) {\n point = projectRotateTransform.invert(point[0], point[1]);\n return point && [point[0] * degrees, point[1] * degrees];\n }\n\n projection.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n };\n\n projection.preclip = function(_) {\n return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n };\n\n projection.postclip = function(_) {\n return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n };\n\n projection.clipAngle = function(_) {\n return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n };\n\n projection.clipExtent = function(_) {\n return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n projection.scale = function(_) {\n return arguments.length ? (k = +_, recenter()) : k;\n };\n\n projection.translate = function(_) {\n return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n };\n\n projection.center = function(_) {\n return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n };\n\n projection.rotate = function(_) {\n return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n };\n\n projection.angle = function(_) {\n return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees;\n };\n\n projection.reflectX = function(_) {\n return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n };\n\n projection.reflectY = function(_) {\n return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n };\n\n projection.precision = function(_) {\n return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n };\n\n projection.fitExtent = function(extent, object) {\n return fitExtent(projection, extent, object);\n };\n\n projection.fitSize = function(size, object) {\n return fitSize(projection, size, object);\n };\n\n projection.fitWidth = function(width, object) {\n return fitWidth(projection, width, object);\n };\n\n projection.fitHeight = function(height, object) {\n return fitHeight(projection, height, object);\n };\n\n function recenter() {\n var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha);\n rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);\n projectTransform = compose(project, transform);\n projectRotateTransform = compose(rotate, projectTransform);\n projectResample = resample(projectTransform, delta2);\n return reset();\n }\n\n function reset() {\n cache = cacheStream = null;\n return projection;\n }\n\n return function() {\n project = projectAt.apply(this, arguments);\n projection.invert = project.invert && invert;\n return recenter();\n };\n}\n","import {atan, exp, halfPi, log, pi, tan, tau} from \"../math.js\";\nimport rotation from \"../rotation.js\";\nimport projection from \"./index.js\";\n\nexport function mercatorRaw(lambda, phi) {\n return [lambda, log(tan((halfPi + phi) / 2))];\n}\n\nmercatorRaw.invert = function(x, y) {\n return [x, 2 * atan(exp(y)) - halfPi];\n};\n\nexport default function() {\n return mercatorProjection(mercatorRaw)\n .scale(961 / tau);\n}\n\nexport function mercatorProjection(project) {\n var m = projection(project),\n center = m.center,\n scale = m.scale,\n translate = m.translate,\n clipExtent = m.clipExtent,\n x0 = null, y0, x1, y1; // clip extent\n\n m.scale = function(_) {\n return arguments.length ? (scale(_), reclip()) : scale();\n };\n\n m.translate = function(_) {\n return arguments.length ? (translate(_), reclip()) : translate();\n };\n\n m.center = function(_) {\n return arguments.length ? (center(_), reclip()) : center();\n };\n\n m.clipExtent = function(_) {\n return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n function reclip() {\n var k = pi * scale(),\n t = m(rotation(m.rotate()).invert([0, 0]));\n return clipExtent(x0 == null\n ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw\n ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]\n : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n }\n\n return reclip();\n}\n","import projection from \"./index.js\";\nimport {abs, epsilon} from \"../math.js\";\n\nexport function naturalEarth1Raw(lambda, phi) {\n var phi2 = phi * phi, phi4 = phi2 * phi2;\n return [\n lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))),\n phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4)))\n ];\n}\n\nnaturalEarth1Raw.invert = function(x, y) {\n var phi = y, i = 25, delta;\n do {\n var phi2 = phi * phi, phi4 = phi2 * phi2;\n phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) /\n (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4)));\n } while (abs(delta) > epsilon && --i > 0);\n return [\n x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))),\n phi\n ];\n};\n\nexport default function() {\n return projection(naturalEarth1Raw)\n .scale(175.295);\n}\n","import {asin, cos, epsilon, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function orthographicRaw(x, y) {\n return [cos(y) * sin(x), sin(y)];\n}\n\northographicRaw.invert = azimuthalInvert(asin);\n\nexport default function() {\n return projection(orthographicRaw)\n .scale(249.5)\n .clipAngle(90 + epsilon);\n}\n","import {cartesian} from \"../cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math.js\";\nimport {transformer} from \"../transform.js\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n return transformer({\n point: function(x, y) {\n x = project(x, y);\n this.stream.point(x[0], x[1]);\n }\n });\n}\n\nfunction resample(project, delta2) {\n\n function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n var dx = x1 - x0,\n dy = y1 - y0,\n d2 = dx * dx + dy * dy;\n if (d2 > 4 * delta2 && depth--) {\n var a = a0 + a1,\n b = b0 + b1,\n c = c0 + c1,\n m = sqrt(a * a + b * b + c * c),\n phi2 = asin(c /= m),\n lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n p = project(lambda2, phi2),\n x2 = p[0],\n y2 = p[1],\n dx2 = x2 - x0,\n dy2 = y2 - y0,\n dz = dy * dx2 - dx * dy2;\n if (dz * dz / d2 > delta2 // perpendicular projected distance\n || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n stream.point(x2, y2);\n resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n }\n }\n }\n return function(stream) {\n var lambda00, x00, y00, a00, b00, c00, // first point\n lambda0, x0, y0, a0, b0, c0; // previous point\n\n var resampleStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n };\n\n function point(x, y) {\n x = project(x, y);\n stream.point(x[0], x[1]);\n }\n\n function lineStart() {\n x0 = NaN;\n resampleStream.point = linePoint;\n stream.lineStart();\n }\n\n function linePoint(lambda, phi) {\n var c = cartesian([lambda, phi]), p = project(lambda, phi);\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n stream.point(x0, y0);\n }\n\n function lineEnd() {\n resampleStream.point = point;\n stream.lineEnd();\n }\n\n function ringStart() {\n lineStart();\n resampleStream.point = ringPoint;\n resampleStream.lineEnd = ringEnd;\n }\n\n function ringPoint(lambda, phi) {\n linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n resampleStream.point = linePoint;\n }\n\n function ringEnd() {\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n resampleStream.lineEnd = lineEnd;\n lineEnd();\n }\n\n return resampleStream;\n };\n}\n","import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function stereographicRaw(x, y) {\n var cy = cos(y), k = 1 + cos(x) * cy;\n return [cy * sin(x) / k, sin(y) / k];\n}\n\nstereographicRaw.invert = azimuthalInvert(function(z) {\n return 2 * atan(z);\n});\n\nexport default function() {\n return projection(stereographicRaw)\n .scale(250)\n .clipAngle(142);\n}\n","import {atan, exp, halfPi, log, tan} from \"../math.js\";\nimport {mercatorProjection} from \"./mercator.js\";\n\nexport function transverseMercatorRaw(lambda, phi) {\n return [log(tan((halfPi + phi) / 2)), -lambda];\n}\n\ntransverseMercatorRaw.invert = function(x, y) {\n return [-y, 2 * atan(exp(x)) - halfPi];\n};\n\nexport default function() {\n var m = mercatorProjection(transverseMercatorRaw),\n center = m.center,\n rotate = m.rotate;\n\n m.center = function(_) {\n return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);\n };\n\n m.rotate = function(_) {\n return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);\n };\n\n return rotate([0, 0, 90])\n .scale(159.155);\n}\n","import compose from \"./compose.js\";\nimport {abs, asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math.js\";\n\nfunction rotationIdentity(lambda, phi) {\n if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n return [lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n : rotationLambda(deltaLambda))\n : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n return function(lambda, phi) {\n lambda += deltaLambda;\n if (abs(lambda) > pi) lambda -= Math.round(lambda / tau) * tau;\n return [lambda, phi];\n };\n}\n\nfunction rotationLambda(deltaLambda) {\n var rotation = forwardRotationLambda(deltaLambda);\n rotation.invert = forwardRotationLambda(-deltaLambda);\n return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n var cosDeltaPhi = cos(deltaPhi),\n sinDeltaPhi = sin(deltaPhi),\n cosDeltaGamma = cos(deltaGamma),\n sinDeltaGamma = sin(deltaGamma);\n\n function rotation(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaPhi + x * sinDeltaPhi;\n return [\n atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n asin(k * cosDeltaGamma + y * sinDeltaGamma)\n ];\n }\n\n rotation.invert = function(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaGamma - y * sinDeltaGamma;\n return [\n atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n asin(k * cosDeltaPhi - x * sinDeltaPhi)\n ];\n };\n\n return rotation;\n}\n\nexport default function(rotate) {\n rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n function forward(coordinates) {\n coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n }\n\n forward.invert = function(coordinates) {\n coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n };\n\n return forward;\n}\n","function streamGeometry(geometry, stream) {\n if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n streamGeometryType[geometry.type](geometry, stream);\n }\n}\n\nvar streamObjectType = {\n Feature: function(object, stream) {\n streamGeometry(object.geometry, stream);\n },\n FeatureCollection: function(object, stream) {\n var features = object.features, i = -1, n = features.length;\n while (++i < n) streamGeometry(features[i].geometry, stream);\n }\n};\n\nvar streamGeometryType = {\n Sphere: function(object, stream) {\n stream.sphere();\n },\n Point: function(object, stream) {\n object = object.coordinates;\n stream.point(object[0], object[1], object[2]);\n },\n MultiPoint: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n },\n LineString: function(object, stream) {\n streamLine(object.coordinates, stream, 0);\n },\n MultiLineString: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamLine(coordinates[i], stream, 0);\n },\n Polygon: function(object, stream) {\n streamPolygon(object.coordinates, stream);\n },\n MultiPolygon: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamPolygon(coordinates[i], stream);\n },\n GeometryCollection: function(object, stream) {\n var geometries = object.geometries, i = -1, n = geometries.length;\n while (++i < n) streamGeometry(geometries[i], stream);\n }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n var i = -1, n = coordinates.length - closed, coordinate;\n stream.lineStart();\n while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n var i = -1, n = coordinates.length;\n stream.polygonStart();\n while (++i < n) streamLine(coordinates[i], stream, 1);\n stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n if (object && streamObjectType.hasOwnProperty(object.type)) {\n streamObjectType[object.type](object, stream);\n } else {\n streamGeometry(object, stream);\n }\n}\n","export default function(methods) {\n return {\n stream: transformer(methods)\n };\n}\n\nexport function transformer(methods) {\n return function(stream) {\n var s = new TransformStream;\n for (var key in methods) s[key] = methods[key];\n s.stream = stream;\n return s;\n };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n constructor: TransformStream,\n point: function(x, y) { this.stream.point(x, y); },\n sphere: function() { this.stream.sphere(); },\n lineStart: function() { this.stream.lineStart(); },\n lineEnd: function() { this.stream.lineEnd(); },\n polygonStart: function() { this.stream.polygonStart(); },\n polygonEnd: function() { this.stream.polygonEnd(); }\n};\n","export function optional(f) {\n return f == null ? null : required(f);\n}\n\nexport function required(f) {\n if (typeof f !== \"function\") throw new Error;\n return f;\n}\n","export default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n\nexport function shuffle(array, random) {\n let m = array.length,\n t,\n i;\n\n while (m) {\n i = random() * m-- | 0;\n t = array[m];\n array[m] = array[i];\n array[i] = t;\n }\n\n return array;\n}\n","function defaultSeparation(a, b) {\n return a.parent === b.parent ? 1 : 2;\n}\n\nfunction meanX(children) {\n return children.reduce(meanXReduce, 0) / children.length;\n}\n\nfunction meanXReduce(x, c) {\n return x + c.x;\n}\n\nfunction maxY(children) {\n return 1 + children.reduce(maxYReduce, 0);\n}\n\nfunction maxYReduce(y, c) {\n return Math.max(y, c.y);\n}\n\nfunction leafLeft(node) {\n var children;\n while (children = node.children) node = children[0];\n return node;\n}\n\nfunction leafRight(node) {\n var children;\n while (children = node.children) node = children[children.length - 1];\n return node;\n}\n\nexport default function() {\n var separation = defaultSeparation,\n dx = 1,\n dy = 1,\n nodeSize = false;\n\n function cluster(root) {\n var previousNode,\n x = 0;\n\n // First walk, computing the initial x & y values.\n root.eachAfter(function(node) {\n var children = node.children;\n if (children) {\n node.x = meanX(children);\n node.y = maxY(children);\n } else {\n node.x = previousNode ? x += separation(node, previousNode) : 0;\n node.y = 0;\n previousNode = node;\n }\n });\n\n var left = leafLeft(root),\n right = leafRight(root),\n x0 = left.x - separation(left, right) / 2,\n x1 = right.x + separation(right, left) / 2;\n\n // Second walk, normalizing x & y to the desired size.\n return root.eachAfter(nodeSize ? function(node) {\n node.x = (node.x - root.x) * dx;\n node.y = (root.y - node.y) * dy;\n } : function(node) {\n node.x = (node.x - x0) / (x1 - x0) * dx;\n node.y = (1 - (root.y ? node.y / root.y : 1)) * dy;\n });\n }\n\n cluster.separation = function(x) {\n return arguments.length ? (separation = x, cluster) : separation;\n };\n\n cluster.size = function(x) {\n return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]);\n };\n\n cluster.nodeSize = function(x) {\n return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null);\n };\n\n return cluster;\n}\n","export function constantZero() {\n return 0;\n}\n\nexport default function(x) {\n return function() {\n return x;\n };\n}\n","export default function() {\n var node = this, nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\n}\n","function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;\n else while (--i >= 0) sum += children[i].value;\n node.value = sum;\n}\n\nexport default function() {\n return this.eachAfter(count);\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], next = [], children, i, n, index = -1;\n while (node = nodes.pop()) {\n next.push(node);\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n }\n while (node = next.pop()) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], children, i, index = -1;\n while (node = nodes.pop()) {\n callback.call(that, node, ++index, this);\n if (children = node.children) {\n for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n }\n return this;\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n if (callback.call(that, node, ++index, this)) {\n return node;\n }\n }\n}\n","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_find from \"./find.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nimport node_iterator from \"./iterator.js\";\n\nexport default function hierarchy(data, children) {\n if (data instanceof Map) {\n data = [undefined, data];\n if (children === undefined) children = mapChildren;\n } else if (children === undefined) {\n children = objectChildren;\n }\n\n var root = new Node(data),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n\n while (node = nodes.pop()) {\n if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n node.children = childs;\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = childs[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n return d.children;\n}\n\nfunction mapChildren(d) {\n return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n if (node.data.value !== undefined) node.value = node.data.value;\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n do node.height = height;\n while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n this.data = data;\n this.depth =\n this.height = 0;\n this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n find: node_find,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy,\n [Symbol.iterator]: node_iterator\n};\n","export default function*() {\n var node = this, current, next = [node], children, i, n;\n do {\n current = next.reverse(), next = [];\n while (node = current.pop()) {\n yield node;\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n }\n } while (next.length);\n}\n","export default function() {\n var leaves = [];\n this.eachBefore(function(node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}\n","export default function() {\n var root = this, links = [];\n root.each(function(node) {\n if (node !== root) { // Don’t include the root’s parent, if any.\n links.push({source: node.parent, target: node});\n }\n });\n return links;\n}\n","export default function(end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n var k = nodes.length;\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n return c;\n}\n","export default function(compare) {\n return this.eachBefore(function(node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}\n","export default function(value) {\n return this.eachAfter(function(node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n while (--i >= 0) sum += children[i].value;\n node.value = sum;\n });\n}\n","export {default as cluster} from \"./cluster.js\";\nexport {default as hierarchy, Node} from \"./hierarchy/index.js\";\nexport {default as pack} from \"./pack/index.js\";\nexport {default as packSiblings} from \"./pack/siblings.js\";\nexport {default as packEnclose} from \"./pack/enclose.js\";\nexport {default as partition} from \"./partition.js\";\nexport {default as stratify} from \"./stratify.js\";\nexport {default as tree} from \"./tree.js\";\nexport {default as treemap} from \"./treemap/index.js\";\nexport {default as treemapBinary} from \"./treemap/binary.js\";\nexport {default as treemapDice} from \"./treemap/dice.js\";\nexport {default as treemapSlice} from \"./treemap/slice.js\";\nexport {default as treemapSliceDice} from \"./treemap/sliceDice.js\";\nexport {default as treemapSquarify} from \"./treemap/squarify.js\";\nexport {default as treemapResquarify} from \"./treemap/resquarify.js\";\n","// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst a = 1664525;\nconst c = 1013904223;\nconst m = 4294967296; // 2^32\n\nexport default function() {\n let s = 1;\n return () => (s = (a * s + c) % m) / m;\n}\n","import {shuffle} from \"../array.js\";\nimport lcg from \"../lcg.js\";\n\nexport default function(circles) {\n return packEncloseRandom(circles, lcg());\n}\n\nexport function packEncloseRandom(circles, random) {\n var i = 0, n = (circles = shuffle(Array.from(circles), random)).length, B = [], p, e;\n\n while (i < n) {\n p = circles[i];\n if (e && enclosesWeak(e, p)) ++i;\n else e = encloseBasis(B = extendBasis(B, p)), i = 0;\n }\n\n return e;\n}\n\nfunction extendBasis(B, p) {\n var i, j;\n\n if (enclosesWeakAll(p, B)) return [p];\n\n // If we get here then B must have at least one element.\n for (i = 0; i < B.length; ++i) {\n if (enclosesNot(p, B[i])\n && enclosesWeakAll(encloseBasis2(B[i], p), B)) {\n return [B[i], p];\n }\n }\n\n // If we get here then B must have at least two elements.\n for (i = 0; i < B.length - 1; ++i) {\n for (j = i + 1; j < B.length; ++j) {\n if (enclosesNot(encloseBasis2(B[i], B[j]), p)\n && enclosesNot(encloseBasis2(B[i], p), B[j])\n && enclosesNot(encloseBasis2(B[j], p), B[i])\n && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {\n return [B[i], B[j], p];\n }\n }\n }\n\n // If we get here then something is very wrong.\n throw new Error;\n}\n\nfunction enclosesNot(a, b) {\n var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y;\n return dr < 0 || dr * dr < dx * dx + dy * dy;\n}\n\nfunction enclosesWeak(a, b) {\n var dr = a.r - b.r + Math.max(a.r, b.r, 1) * 1e-9, dx = b.x - a.x, dy = b.y - a.y;\n return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction enclosesWeakAll(a, B) {\n for (var i = 0; i < B.length; ++i) {\n if (!enclosesWeak(a, B[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction encloseBasis(B) {\n switch (B.length) {\n case 1: return encloseBasis1(B[0]);\n case 2: return encloseBasis2(B[0], B[1]);\n case 3: return encloseBasis3(B[0], B[1], B[2]);\n }\n}\n\nfunction encloseBasis1(a) {\n return {\n x: a.x,\n y: a.y,\n r: a.r\n };\n}\n\nfunction encloseBasis2(a, b) {\n var x1 = a.x, y1 = a.y, r1 = a.r,\n x2 = b.x, y2 = b.y, r2 = b.r,\n x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1,\n l = Math.sqrt(x21 * x21 + y21 * y21);\n return {\n x: (x1 + x2 + x21 / l * r21) / 2,\n y: (y1 + y2 + y21 / l * r21) / 2,\n r: (l + r1 + r2) / 2\n };\n}\n\nfunction encloseBasis3(a, b, c) {\n var x1 = a.x, y1 = a.y, r1 = a.r,\n x2 = b.x, y2 = b.y, r2 = b.r,\n x3 = c.x, y3 = c.y, r3 = c.r,\n a2 = x1 - x2,\n a3 = x1 - x3,\n b2 = y1 - y2,\n b3 = y1 - y3,\n c2 = r2 - r1,\n c3 = r3 - r1,\n d1 = x1 * x1 + y1 * y1 - r1 * r1,\n d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2,\n d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3,\n ab = a3 * b2 - a2 * b3,\n xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1,\n xb = (b3 * c2 - b2 * c3) / ab,\n ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1,\n yb = (a2 * c3 - a3 * c2) / ab,\n A = xb * xb + yb * yb - 1,\n B = 2 * (r1 + xa * xb + ya * yb),\n C = xa * xa + ya * ya - r1 * r1,\n r = -(Math.abs(A) > 1e-6 ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);\n return {\n x: x1 + xa + xb * r,\n y: y1 + ya + yb * r,\n r: r\n };\n}\n","import {optional} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\nimport lcg from \"../lcg.js\";\nimport {packSiblingsRandom} from \"./siblings.js\";\n\nfunction defaultRadius(d) {\n return Math.sqrt(d.value);\n}\n\nexport default function() {\n var radius = null,\n dx = 1,\n dy = 1,\n padding = constantZero;\n\n function pack(root) {\n const random = lcg();\n root.x = dx / 2, root.y = dy / 2;\n if (radius) {\n root.eachBefore(radiusLeaf(radius))\n .eachAfter(packChildrenRandom(padding, 0.5, random))\n .eachBefore(translateChild(1));\n } else {\n root.eachBefore(radiusLeaf(defaultRadius))\n .eachAfter(packChildrenRandom(constantZero, 1, random))\n .eachAfter(packChildrenRandom(padding, root.r / Math.min(dx, dy), random))\n .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));\n }\n return root;\n }\n\n pack.radius = function(x) {\n return arguments.length ? (radius = optional(x), pack) : radius;\n };\n\n pack.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];\n };\n\n pack.padding = function(x) {\n return arguments.length ? (padding = typeof x === \"function\" ? x : constant(+x), pack) : padding;\n };\n\n return pack;\n}\n\nfunction radiusLeaf(radius) {\n return function(node) {\n if (!node.children) {\n node.r = Math.max(0, +radius(node) || 0);\n }\n };\n}\n\nfunction packChildrenRandom(padding, k, random) {\n return function(node) {\n if (children = node.children) {\n var children,\n i,\n n = children.length,\n r = padding(node) * k || 0,\n e;\n\n if (r) for (i = 0; i < n; ++i) children[i].r += r;\n e = packSiblingsRandom(children, random);\n if (r) for (i = 0; i < n; ++i) children[i].r -= r;\n node.r = e + r;\n }\n };\n}\n\nfunction translateChild(k) {\n return function(node) {\n var parent = node.parent;\n node.r *= k;\n if (parent) {\n node.x = parent.x + k * node.x;\n node.y = parent.y + k * node.y;\n }\n };\n}\n","import array from \"../array.js\";\nimport lcg from \"../lcg.js\";\nimport {packEncloseRandom} from \"./enclose.js\";\n\nfunction place(b, a, c) {\n var dx = b.x - a.x, x, a2,\n dy = b.y - a.y, y, b2,\n d2 = dx * dx + dy * dy;\n if (d2) {\n a2 = a.r + c.r, a2 *= a2;\n b2 = b.r + c.r, b2 *= b2;\n if (a2 > b2) {\n x = (d2 + b2 - a2) / (2 * d2);\n y = Math.sqrt(Math.max(0, b2 / d2 - x * x));\n c.x = b.x - x * dx - y * dy;\n c.y = b.y - x * dy + y * dx;\n } else {\n x = (d2 + a2 - b2) / (2 * d2);\n y = Math.sqrt(Math.max(0, a2 / d2 - x * x));\n c.x = a.x + x * dx - y * dy;\n c.y = a.y + x * dy + y * dx;\n }\n } else {\n c.x = a.x + c.r;\n c.y = a.y;\n }\n}\n\nfunction intersects(a, b) {\n var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y;\n return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction score(node) {\n var a = node._,\n b = node.next._,\n ab = a.r + b.r,\n dx = (a.x * b.r + b.x * a.r) / ab,\n dy = (a.y * b.r + b.y * a.r) / ab;\n return dx * dx + dy * dy;\n}\n\nfunction Node(circle) {\n this._ = circle;\n this.next = null;\n this.previous = null;\n}\n\nexport function packSiblingsRandom(circles, random) {\n if (!(n = (circles = array(circles)).length)) return 0;\n\n var a, b, c, n, aa, ca, i, j, k, sj, sk;\n\n // Place the first circle.\n a = circles[0], a.x = 0, a.y = 0;\n if (!(n > 1)) return a.r;\n\n // Place the second circle.\n b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;\n if (!(n > 2)) return a.r + b.r;\n\n // Place the third circle.\n place(b, a, c = circles[2]);\n\n // Initialize the front-chain using the first three circles a, b and c.\n a = new Node(a), b = new Node(b), c = new Node(c);\n a.next = c.previous = b;\n b.next = a.previous = c;\n c.next = b.previous = a;\n\n // Attempt to place each remaining circle…\n pack: for (i = 3; i < n; ++i) {\n place(a._, b._, c = circles[i]), c = new Node(c);\n\n // Find the closest intersecting circle on the front-chain, if any.\n // “Closeness” is determined by linear distance along the front-chain.\n // “Ahead” or “behind” is likewise determined by linear distance.\n j = b.next, k = a.previous, sj = b._.r, sk = a._.r;\n do {\n if (sj <= sk) {\n if (intersects(j._, c._)) {\n b = j, a.next = b, b.previous = a, --i;\n continue pack;\n }\n sj += j._.r, j = j.next;\n } else {\n if (intersects(k._, c._)) {\n a = k, a.next = b, b.previous = a, --i;\n continue pack;\n }\n sk += k._.r, k = k.previous;\n }\n } while (j !== k.next);\n\n // Success! Insert the new circle c between a and b.\n c.previous = a, c.next = b, a.next = b.previous = b = c;\n\n // Compute the new closest circle pair to the centroid.\n aa = score(a);\n while ((c = c.next) !== b) {\n if ((ca = score(c)) < aa) {\n a = c, aa = ca;\n }\n }\n b = a.next;\n }\n\n // Compute the enclosing circle of the front chain.\n a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = packEncloseRandom(a, random);\n\n // Translate the circles to put the enclosing circle around the origin.\n for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y;\n\n return c.r;\n}\n\nexport default function(circles) {\n packSiblingsRandom(circles, lcg());\n return circles;\n}\n","import roundNode from \"./treemap/round.js\";\nimport treemapDice from \"./treemap/dice.js\";\n\nexport default function() {\n var dx = 1,\n dy = 1,\n padding = 0,\n round = false;\n\n function partition(root) {\n var n = root.height + 1;\n root.x0 =\n root.y0 = padding;\n root.x1 = dx;\n root.y1 = dy / n;\n root.eachBefore(positionNode(dy, n));\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(dy, n) {\n return function(node) {\n if (node.children) {\n treemapDice(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n);\n }\n var x0 = node.x0,\n y0 = node.y0,\n x1 = node.x1 - padding,\n y1 = node.y1 - padding;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n };\n }\n\n partition.round = function(x) {\n return arguments.length ? (round = !!x, partition) : round;\n };\n\n partition.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy];\n };\n\n partition.padding = function(x) {\n return arguments.length ? (padding = +x, partition) : padding;\n };\n\n return partition;\n}\n","import {optional} from \"./accessors.js\";\nimport {Node, computeHeight} from \"./hierarchy/index.js\";\n\nvar preroot = {depth: -1},\n ambiguous = {},\n imputed = {};\n\nfunction defaultId(d) {\n return d.id;\n}\n\nfunction defaultParentId(d) {\n return d.parentId;\n}\n\nexport default function() {\n var id = defaultId,\n parentId = defaultParentId,\n path;\n\n function stratify(data) {\n var nodes = Array.from(data),\n currentId = id,\n currentParentId = parentId,\n n,\n d,\n i,\n root,\n parent,\n node,\n nodeId,\n nodeKey,\n nodeByKey = new Map;\n\n if (path != null) {\n const I = nodes.map((d, i) => normalize(path(d, i, data)));\n const P = I.map(parentof);\n const S = new Set(I).add(\"\");\n for (const i of P) {\n if (!S.has(i)) {\n S.add(i);\n I.push(i);\n P.push(parentof(i));\n nodes.push(imputed);\n }\n }\n currentId = (_, i) => I[i];\n currentParentId = (_, i) => P[i];\n }\n\n for (i = 0, n = nodes.length; i < n; ++i) {\n d = nodes[i], node = nodes[i] = new Node(d);\n if ((nodeId = currentId(d, i, data)) != null && (nodeId += \"\")) {\n nodeKey = node.id = nodeId;\n nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node);\n }\n if ((nodeId = currentParentId(d, i, data)) != null && (nodeId += \"\")) {\n node.parent = nodeId;\n }\n }\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (nodeId = node.parent) {\n parent = nodeByKey.get(nodeId);\n if (!parent) throw new Error(\"missing: \" + nodeId);\n if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n if (parent.children) parent.children.push(node);\n else parent.children = [node];\n node.parent = parent;\n } else {\n if (root) throw new Error(\"multiple roots\");\n root = node;\n }\n }\n\n if (!root) throw new Error(\"no root\");\n\n // When imputing internal nodes, only introduce roots if needed.\n // Then replace the imputed marker data with null.\n if (path != null) {\n while (root.data === imputed && root.children.length === 1) {\n root = root.children[0], --n;\n }\n for (let i = nodes.length - 1; i >= 0; --i) {\n node = nodes[i];\n if (node.data !== imputed) break;\n node.data = null;\n }\n }\n\n root.parent = preroot;\n root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight);\n root.parent = null;\n if (n > 0) throw new Error(\"cycle\");\n\n return root;\n }\n\n stratify.id = function(x) {\n return arguments.length ? (id = optional(x), stratify) : id;\n };\n\n stratify.parentId = function(x) {\n return arguments.length ? (parentId = optional(x), stratify) : parentId;\n };\n\n stratify.path = function(x) {\n return arguments.length ? (path = optional(x), stratify) : path;\n };\n\n return stratify;\n}\n\n// To normalize a path, we coerce to a string, strip the trailing slash if any\n// (as long as the trailing slash is not immediately preceded by another slash),\n// and add leading slash if missing.\nfunction normalize(path) {\n path = `${path}`;\n let i = path.length;\n if (slash(path, i - 1) && !slash(path, i - 2)) path = path.slice(0, -1);\n return path[0] === \"/\" ? path : `/${path}`;\n}\n\n// Walk backwards to find the first slash that is not the leading slash, e.g.:\n// \"/foo/bar\" ⇥ \"/foo\", \"/foo\" ⇥ \"/\", \"/\" ↦ \"\". (The root is special-cased\n// because the id of the root must be a truthy value.)\nfunction parentof(path) {\n let i = path.length;\n if (i < 2) return \"\";\n while (--i > 1) if (slash(path, i)) break;\n return path.slice(0, i);\n}\n\n// Slashes can be escaped; to determine whether a slash is a path delimiter, we\n// count the number of preceding backslashes escaping the forward slash: an odd\n// number indicates an escaped forward slash.\nfunction slash(path, i) {\n if (path[i] === \"/\") {\n let k = 0;\n while (i > 0 && path[--i] === \"\\\\\") ++k;\n if ((k & 1) === 0) return true;\n }\n return false;\n}\n","import {Node} from \"./hierarchy/index.js\";\n\nfunction defaultSeparation(a, b) {\n return a.parent === b.parent ? 1 : 2;\n}\n\n// function radialSeparation(a, b) {\n// return (a.parent === b.parent ? 1 : 2) / a.depth;\n// }\n\n// This function is used to traverse the left contour of a subtree (or\n// subforest). It returns the successor of v on this contour. This successor is\n// either given by the leftmost child of v or by the thread of v. The function\n// returns null if and only if v is on the highest level of its subtree.\nfunction nextLeft(v) {\n var children = v.children;\n return children ? children[0] : v.t;\n}\n\n// This function works analogously to nextLeft.\nfunction nextRight(v) {\n var children = v.children;\n return children ? children[children.length - 1] : v.t;\n}\n\n// Shifts the current subtree rooted at w+. This is done by increasing\n// prelim(w+) and mod(w+) by shift.\nfunction moveSubtree(wm, wp, shift) {\n var change = shift / (wp.i - wm.i);\n wp.c -= change;\n wp.s += shift;\n wm.c += change;\n wp.z += shift;\n wp.m += shift;\n}\n\n// All other shifts, applied to the smaller subtrees between w- and w+, are\n// performed by this function. To prepare the shifts, we have to adjust\n// change(w+), shift(w+), and change(w-).\nfunction executeShifts(v) {\n var shift = 0,\n change = 0,\n children = v.children,\n i = children.length,\n w;\n while (--i >= 0) {\n w = children[i];\n w.z += shift;\n w.m += shift;\n shift += w.s + (change += w.c);\n }\n}\n\n// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,\n// returns the specified (default) ancestor.\nfunction nextAncestor(vim, v, ancestor) {\n return vim.a.parent === v.parent ? vim.a : ancestor;\n}\n\nfunction TreeNode(node, i) {\n this._ = node;\n this.parent = null;\n this.children = null;\n this.A = null; // default ancestor\n this.a = this; // ancestor\n this.z = 0; // prelim\n this.m = 0; // mod\n this.c = 0; // change\n this.s = 0; // shift\n this.t = null; // thread\n this.i = i; // number\n}\n\nTreeNode.prototype = Object.create(Node.prototype);\n\nfunction treeRoot(root) {\n var tree = new TreeNode(root, 0),\n node,\n nodes = [tree],\n child,\n children,\n i,\n n;\n\n while (node = nodes.pop()) {\n if (children = node._.children) {\n node.children = new Array(n = children.length);\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = node.children[i] = new TreeNode(children[i], i));\n child.parent = node;\n }\n }\n }\n\n (tree.parent = new TreeNode(null, 0)).children = [tree];\n return tree;\n}\n\n// Node-link tree diagram using the Reingold-Tilford \"tidy\" algorithm\nexport default function() {\n var separation = defaultSeparation,\n dx = 1,\n dy = 1,\n nodeSize = null;\n\n function tree(root) {\n var t = treeRoot(root);\n\n // Compute the layout using Buchheim et al.’s algorithm.\n t.eachAfter(firstWalk), t.parent.m = -t.z;\n t.eachBefore(secondWalk);\n\n // If a fixed node size is specified, scale x and y.\n if (nodeSize) root.eachBefore(sizeNode);\n\n // If a fixed tree size is specified, scale x and y based on the extent.\n // Compute the left-most, right-most, and depth-most nodes for extents.\n else {\n var left = root,\n right = root,\n bottom = root;\n root.eachBefore(function(node) {\n if (node.x < left.x) left = node;\n if (node.x > right.x) right = node;\n if (node.depth > bottom.depth) bottom = node;\n });\n var s = left === right ? 1 : separation(left, right) / 2,\n tx = s - left.x,\n kx = dx / (right.x + s + tx),\n ky = dy / (bottom.depth || 1);\n root.eachBefore(function(node) {\n node.x = (node.x + tx) * kx;\n node.y = node.depth * ky;\n });\n }\n\n return root;\n }\n\n // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is\n // applied recursively to the children of v, as well as the function\n // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the\n // node v is placed to the midpoint of its outermost children.\n function firstWalk(v) {\n var children = v.children,\n siblings = v.parent.children,\n w = v.i ? siblings[v.i - 1] : null;\n if (children) {\n executeShifts(v);\n var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n if (w) {\n v.z = w.z + separation(v._, w._);\n v.m = v.z - midpoint;\n } else {\n v.z = midpoint;\n }\n } else if (w) {\n v.z = w.z + separation(v._, w._);\n }\n v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n }\n\n // Computes all real x-coordinates by summing up the modifiers recursively.\n function secondWalk(v) {\n v._.x = v.z + v.parent.m;\n v.m += v.parent.m;\n }\n\n // The core of the algorithm. Here, a new subtree is combined with the\n // previous subtrees. Threads are used to traverse the inside and outside\n // contours of the left and right subtree up to the highest common level. The\n // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the\n // superscript o means outside and i means inside, the subscript - means left\n // subtree and + means right subtree. For summing up the modifiers along the\n // contour, we use respective variables si+, si-, so-, and so+. Whenever two\n // nodes of the inside contours conflict, we compute the left one of the\n // greatest uncommon ancestors using the function ANCESTOR and call MOVE\n // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.\n // Finally, we add a new thread (if necessary).\n function apportion(v, w, ancestor) {\n if (w) {\n var vip = v,\n vop = v,\n vim = w,\n vom = vip.parent.children[0],\n sip = vip.m,\n sop = vop.m,\n sim = vim.m,\n som = vom.m,\n shift;\n while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {\n vom = nextLeft(vom);\n vop = nextRight(vop);\n vop.a = v;\n shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n if (shift > 0) {\n moveSubtree(nextAncestor(vim, v, ancestor), v, shift);\n sip += shift;\n sop += shift;\n }\n sim += vim.m;\n sip += vip.m;\n som += vom.m;\n sop += vop.m;\n }\n if (vim && !nextRight(vop)) {\n vop.t = vim;\n vop.m += sim - sop;\n }\n if (vip && !nextLeft(vom)) {\n vom.t = vip;\n vom.m += sip - som;\n ancestor = v;\n }\n }\n return ancestor;\n }\n\n function sizeNode(node) {\n node.x *= dx;\n node.y = node.depth * dy;\n }\n\n tree.separation = function(x) {\n return arguments.length ? (separation = x, tree) : separation;\n };\n\n tree.size = function(x) {\n return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);\n };\n\n tree.nodeSize = function(x) {\n return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);\n };\n\n return tree;\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n i, n = nodes.length,\n sum, sums = new Array(n + 1);\n\n for (sums[0] = sum = i = 0; i < n; ++i) {\n sums[i + 1] = sum += nodes[i].value;\n }\n\n partition(0, n, parent.value, x0, y0, x1, y1);\n\n function partition(i, j, value, x0, y0, x1, y1) {\n if (i >= j - 1) {\n var node = nodes[i];\n node.x0 = x0, node.y0 = y0;\n node.x1 = x1, node.y1 = y1;\n return;\n }\n\n var valueOffset = sums[i],\n valueTarget = (value / 2) + valueOffset,\n k = i + 1,\n hi = j - 1;\n\n while (k < hi) {\n var mid = k + hi >>> 1;\n if (sums[mid] < valueTarget) k = mid + 1;\n else hi = mid;\n }\n\n if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k;\n\n var valueLeft = sums[k] - valueOffset,\n valueRight = value - valueLeft;\n\n if ((x1 - x0) > (y1 - y0)) {\n var xk = value ? (x0 * valueRight + x1 * valueLeft) / value : x1;\n partition(i, k, valueLeft, x0, y0, xk, y1);\n partition(k, j, valueRight, xk, y0, x1, y1);\n } else {\n var yk = value ? (y0 * valueRight + y1 * valueLeft) / value : y1;\n partition(i, k, valueLeft, x0, y0, x1, yk);\n partition(k, j, valueRight, x0, yk, x1, y1);\n }\n }\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.y0 = y0, node.y1 = y1;\n node.x0 = x0, node.x1 = x0 += node.value * k;\n }\n}\n","import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport {required} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nexport default function() {\n var tile = squarify,\n round = false,\n dx = 1,\n dy = 1,\n paddingStack = [0],\n paddingInner = constantZero,\n paddingTop = constantZero,\n paddingRight = constantZero,\n paddingBottom = constantZero,\n paddingLeft = constantZero;\n\n function treemap(root) {\n root.x0 =\n root.y0 = 0;\n root.x1 = dx;\n root.y1 = dy;\n root.eachBefore(positionNode);\n paddingStack = [0];\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(node) {\n var p = paddingStack[node.depth],\n x0 = node.x0 + p,\n y0 = node.y0 + p,\n x1 = node.x1 - p,\n y1 = node.y1 - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n if (node.children) {\n p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n x0 += paddingLeft(node) - p;\n y0 += paddingTop(node) - p;\n x1 -= paddingRight(node) - p;\n y1 -= paddingBottom(node) - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n tile(node, x0, y0, x1, y1);\n }\n }\n\n treemap.round = function(x) {\n return arguments.length ? (round = !!x, treemap) : round;\n };\n\n treemap.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n };\n\n treemap.tile = function(x) {\n return arguments.length ? (tile = required(x), treemap) : tile;\n };\n\n treemap.padding = function(x) {\n return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n };\n\n treemap.paddingInner = function(x) {\n return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n };\n\n treemap.paddingOuter = function(x) {\n return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n };\n\n treemap.paddingTop = function(x) {\n return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n };\n\n treemap.paddingRight = function(x) {\n return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n };\n\n treemap.paddingBottom = function(x) {\n return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n };\n\n treemap.paddingLeft = function(x) {\n return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n };\n\n return treemap;\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\nimport {phi, squarifyRatio} from \"./squarify.js\";\n\nexport default (function custom(ratio) {\n\n function resquarify(parent, x0, y0, x1, y1) {\n if ((rows = parent._squarify) && (rows.ratio === ratio)) {\n var rows,\n row,\n nodes,\n i,\n j = -1,\n n,\n m = rows.length,\n value = parent.value;\n\n while (++j < m) {\n row = rows[j], nodes = row.children;\n for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1);\n value -= row.value;\n }\n } else {\n parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);\n rows.ratio = ratio;\n }\n }\n\n resquarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return resquarify;\n})(phi);\n","export default function(node) {\n node.x0 = Math.round(node.x0);\n node.y0 = Math.round(node.y0);\n node.x1 = Math.round(node.x1);\n node.y1 = Math.round(node.y1);\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (y1 - y0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.x0 = x0, node.x1 = x1;\n node.y0 = y0, node.y1 = y0 += node.value * k;\n }\n}\n","import dice from \"./dice.js\";\nimport slice from \"./slice.js\";\n\nexport default function(parent, x0, y0, x1, y1) {\n (parent.depth & 1 ? slice : dice)(parent, x0, y0, x1, y1);\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [],\n nodes = parent.children,\n row,\n nodeValue,\n i0 = 0,\n i1 = 0,\n n = nodes.length,\n dx, dy,\n value = parent.value,\n sumValue,\n minValue,\n maxValue,\n newRatio,\n minRatio,\n alpha,\n beta;\n\n while (i0 < n) {\n dx = x1 - x0, dy = y1 - y0;\n\n // Find the next non-empty node.\n do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue);\n\n // Keep adding nodes while the aspect ratio maintains or improves.\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes[i1].value;\n if (nodeValue < minValue) minValue = nodeValue;\n if (nodeValue > maxValue) maxValue = nodeValue;\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n minRatio = newRatio;\n }\n\n // Position and record the row orientation.\n rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n value -= sumValue, i0 = i1;\n }\n\n return rows;\n}\n\nexport default (function custom(ratio) {\n\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n\n squarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return squarify;\n})(phi);\n","import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","export default x => () => x;\n","import {cubehelix as colorCubehelix} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction cubehelix(hue) {\n return (function cubehelixGamma(y) {\n y = +y;\n\n function cubehelix(start, end) {\n var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(Math.pow(t, y));\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n cubehelix.gamma = cubehelixGamma;\n\n return cubehelix;\n })(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);\n","export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n","export default function(range) {\n var n = range.length;\n return function(t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n}\n","import {hcl as colorHcl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hcl(hue) {\n return function(start, end) {\n var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n c = color(start.c, end.c),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);\n","import {hsl as colorHsl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hsl(hue) {\n return function(start, end) {\n var h = hue((start = colorHsl(start)).h, (end = colorHsl(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hsl(hue);\nexport var hslLong = hsl(color);\n","import {hue} from \"./color.js\";\n\nexport default function(a, b) {\n var i = hue(+a, +b);\n return function(t) {\n var x = i(t);\n return x - 360 * Math.floor(x / 360);\n };\n}\n","export {default as interpolate} from \"./value.js\";\nexport {default as interpolateArray} from \"./array.js\";\nexport {default as interpolateBasis} from \"./basis.js\";\nexport {default as interpolateBasisClosed} from \"./basisClosed.js\";\nexport {default as interpolateDate} from \"./date.js\";\nexport {default as interpolateDiscrete} from \"./discrete.js\";\nexport {default as interpolateHue} from \"./hue.js\";\nexport {default as interpolateNumber} from \"./number.js\";\nexport {default as interpolateNumberArray} from \"./numberArray.js\";\nexport {default as interpolateObject} from \"./object.js\";\nexport {default as interpolateRound} from \"./round.js\";\nexport {default as interpolateString} from \"./string.js\";\nexport {interpolateTransformCss, interpolateTransformSvg} from \"./transform/index.js\";\nexport {default as interpolateZoom} from \"./zoom.js\";\nexport {default as interpolateRgb, rgbBasis as interpolateRgbBasis, rgbBasisClosed as interpolateRgbBasisClosed} from \"./rgb.js\";\nexport {default as interpolateHsl, hslLong as interpolateHslLong} from \"./hsl.js\";\nexport {default as interpolateLab} from \"./lab.js\";\nexport {default as interpolateHcl, hclLong as interpolateHclLong} from \"./hcl.js\";\nexport {default as interpolateCubehelix, cubehelixLong as interpolateCubehelixLong} from \"./cubehelix.js\";\nexport {default as piecewise} from \"./piecewise.js\";\nexport {default as quantize} from \"./quantize.js\";\n","import {lab as colorLab} from \"d3-color\";\nimport color from \"./color.js\";\n\nexport default function lab(start, end) {\n var l = color((start = colorLab(start)).l, (end = colorLab(end)).l),\n a = color(start.a, end.a),\n b = color(start.b, end.b),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.l = l(t);\n start.a = a(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n","import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n","import {default as value} from \"./value.js\";\n\nexport default function piecewise(interpolate, values) {\n if (values === undefined) values = interpolate, interpolate = value;\n var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n while (i < n) I[i] = interpolate(v, v = values[++i]);\n return function(t) {\n var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n return I[i](t - i);\n };\n}\n","export default function(interpolator, n) {\n var samples = new Array(n);\n for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n return samples;\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","var degrees = 180 / Math.PI;\n\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\n","import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function(a, b) {\n var s = [], // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n","import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n","import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n","var epsilon2 = 1e-12;\n\nfunction cosh(x) {\n return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\nexport default (function zoomRho(rho, rho2, rho4) {\n\n // p0 = [ux0, uy0, w0]\n // p1 = [ux1, uy1, w1]\n function zoom(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000 * rho / Math.SQRT2;\n\n return i;\n }\n\n zoom.rho = function(_) {\n var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n return zoomRho(_1, _2, _4);\n };\n\n return zoom;\n})(Math.SQRT2, 2, 4);\n","export {Path, path, pathRound} from \"./path.js\";\n","const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction append(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += arguments[i] + strings[i];\n }\n}\n\nfunction appendRound(digits) {\n let d = Math.floor(digits);\n if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);\n if (d > 15) return append;\n const k = 10 ** d;\n return function(strings) {\n this._ += strings[0];\n for (let i = 1, n = strings.length; i < n; ++i) {\n this._ += Math.round(arguments[i] * k) / k + strings[i];\n }\n };\n}\n\nexport class Path {\n constructor(digits) {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n this._append = digits == null ? append : appendRound(digits);\n }\n moveTo(x, y) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._append`Z`;\n }\n }\n lineTo(x, y) {\n this._append`L${this._x1 = +x},${this._y1 = +y}`;\n }\n quadraticCurveTo(x1, y1, x, y) {\n this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;\n }\n bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;\n }\n arcTo(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._append`M${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._append`L${this._x1 = x1},${this._y1 = y1}`;\n }\n\n // Otherwise, draw an arc!\n else {\n let x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;\n }\n\n this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;\n }\n }\n arc(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(`negative radius: ${r}`);\n\n let dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._append`M${x0},${y0}`;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._append`L${x0},${y0}`;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._append`A${r},${r},0,${+(da >= pi)},${cw},${this._x1 = x + r * Math.cos(a1)},${this._y1 = y + r * Math.sin(a1)}`;\n }\n }\n rect(x, y, w, h) {\n this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;\n }\n toString() {\n return this._;\n }\n}\n\nexport function path() {\n return new Path;\n}\n\n// Allow instanceof d3.path\npath.prototype = Path.prototype;\n\nexport function pathRound(digits = 3) {\n return new Path(+digits);\n}\n","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n a,\n b = polygon[n - 1],\n area = 0;\n\n while (++i < n) {\n a = b;\n b = polygon[i];\n area += a[1] * b[0] - a[0] * b[1];\n }\n\n return area / 2;\n}\n","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n x = 0,\n y = 0,\n a,\n b = polygon[n - 1],\n c,\n k = 0;\n\n while (++i < n) {\n a = b;\n b = polygon[i];\n k += c = a[0] * b[1] - b[0] * a[1];\n x += (a[0] + b[0]) * c;\n y += (a[1] + b[1]) * c;\n }\n\n return k *= 3, [x / k, y / k];\n}\n","export default function(polygon, point) {\n var n = polygon.length,\n p = polygon[n - 1],\n x = point[0], y = point[1],\n x0 = p[0], y0 = p[1],\n x1, y1,\n inside = false;\n\n for (var i = 0; i < n; ++i) {\n p = polygon[i], x1 = p[0], y1 = p[1];\n if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;\n x0 = x1, y0 = y1;\n }\n\n return inside;\n}\n","// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of\n// the 3D cross product in a quadrant I Cartesian coordinate system (+x is\n// right, +y is up). Returns a positive value if ABC is counter-clockwise,\n// negative if clockwise, and zero if the points are collinear.\nexport default function(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n}\n","import cross from \"./cross.js\";\n\nfunction lexicographicOrder(a, b) {\n return a[0] - b[0] || a[1] - b[1];\n}\n\n// Computes the upper convex hull per the monotone chain algorithm.\n// Assumes points.length >= 3, is sorted by x, unique in y.\n// Returns an array of indices into points in left-to-right order.\nfunction computeUpperHullIndexes(points) {\n const n = points.length,\n indexes = [0, 1];\n let size = 2, i;\n\n for (i = 2; i < n; ++i) {\n while (size > 1 && cross(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;\n indexes[size++] = i;\n }\n\n return indexes.slice(0, size); // remove popped points\n}\n\nexport default function(points) {\n if ((n = points.length) < 3) return null;\n\n var i,\n n,\n sortedPoints = new Array(n),\n flippedPoints = new Array(n);\n\n for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];\n sortedPoints.sort(lexicographicOrder);\n for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];\n\n var upperIndexes = computeUpperHullIndexes(sortedPoints),\n lowerIndexes = computeUpperHullIndexes(flippedPoints);\n\n // Construct the hull polygon, removing possible duplicate endpoints.\n var skipLeft = lowerIndexes[0] === upperIndexes[0],\n skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],\n hull = [];\n\n // Add upper hull in right-to-l order.\n // Then add lower hull in left-to-right order.\n for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);\n for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);\n\n return hull;\n}\n","export {default as polygonArea} from \"./area.js\";\nexport {default as polygonCentroid} from \"./centroid.js\";\nexport {default as polygonHull} from \"./hull.js\";\nexport {default as polygonContains} from \"./contains.js\";\nexport {default as polygonLength} from \"./length.js\";\n","export default function(polygon) {\n var i = -1,\n n = polygon.length,\n b = polygon[n - 1],\n xa,\n ya,\n xb = b[0],\n yb = b[1],\n perimeter = 0;\n\n while (++i < n) {\n xa = xb;\n ya = yb;\n b = polygon[i];\n xb = b[0];\n yb = b[1];\n xa -= xb;\n ya -= yb;\n perimeter += Math.hypot(xa, ya);\n }\n\n return perimeter;\n}\n","export default function(d) {\n const x = +this._x.call(null, d),\n y = +this._y.call(null, d);\n return add(this.cover(x, y), x, y, d);\n}\n\nfunction add(tree, x, y, d) {\n if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {data: d},\n x0 = tree._x0,\n y0 = tree._y0,\n x1 = tree._x1,\n y1 = tree._y1,\n xm,\n ym,\n xp,\n yp,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return tree._root = leaf, tree;\n\n // Find the existing leaf for the new point, or add it.\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n }\n\n // Is the new point is exactly coincident with the existing point?\n xp = +tree._x.call(null, node.data);\n yp = +tree._y.call(null, node.data);\n if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n // Otherwise, split the leaf node until the old and new point are separated.\n do {\n parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var d, i, n = data.length,\n x,\n y,\n xz = new Array(n),\n yz = new Array(n),\n x0 = Infinity,\n y0 = Infinity,\n x1 = -Infinity,\n y1 = -Infinity;\n\n // Compute the points and their extent.\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n xz[i] = x;\n yz[i] = y;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n }\n\n // If there were no (valid) points, abort.\n if (x0 > x1 || y0 > y1) return this;\n\n // Expand the tree to cover the new points.\n this.cover(x0, y0).cover(x1, y1);\n\n // Add the new points.\n for (i = 0; i < n; ++i) {\n add(this, xz[i], yz[i], data[i]);\n }\n\n return this;\n}\n","export default function(x, y) {\n if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n var x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1;\n\n // If the quadtree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing quadrant boundaries don’t change due to floating point error!\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n y1 = (y0 = Math.floor(y)) + 1;\n }\n\n // Otherwise, double repeatedly to cover.\n else {\n var z = x1 - x0 || 1,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1 || y0 > y || y >= y1) {\n i = (y < y0) << 1 | (x < x0);\n parent = new Array(4), parent[i] = node, node = parent, z *= 2;\n switch (i) {\n case 0: x1 = x0 + z, y1 = y0 + z; break;\n case 1: x0 = x1 - z, y1 = y0 + z; break;\n case 2: x1 = x0 + z, y0 = y1 - z; break;\n case 3: x0 = x1 - z, y0 = y1 - z; break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n return this;\n}\n","export default function() {\n var data = [];\n this.visit(function(node) {\n if (!node.length) do data.push(node.data); while (node = node.next)\n });\n return data;\n}\n","export default function(_) {\n return arguments.length\n ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n}\n","import Quad from \"./quad.js\";\n\nexport default function(x, y, radius) {\n var data,\n x0 = this._x0,\n y0 = this._y0,\n x1,\n y1,\n x2,\n y2,\n x3 = this._x1,\n y3 = this._y1,\n quads = [],\n node = this._root,\n q,\n i;\n\n if (node) quads.push(new Quad(node, x0, y0, x3, y3));\n if (radius == null) radius = Infinity;\n else {\n x0 = x - radius, y0 = y - radius;\n x3 = x + radius, y3 = y + radius;\n radius *= radius;\n }\n\n while (q = quads.pop()) {\n\n // Stop searching if this quadrant can’t contain a closer node.\n if (!(node = q.node)\n || (x1 = q.x0) > x3\n || (y1 = q.y0) > y3\n || (x2 = q.x1) < x0\n || (y2 = q.y1) < y0) continue;\n\n // Bisect the current quadrant.\n if (node.length) {\n var xm = (x1 + x2) / 2,\n ym = (y1 + y2) / 2;\n\n quads.push(\n new Quad(node[3], xm, ym, x2, y2),\n new Quad(node[2], x1, ym, xm, y2),\n new Quad(node[1], xm, y1, x2, ym),\n new Quad(node[0], x1, y1, xm, ym)\n );\n\n // Visit the closest quadrant first.\n if (i = (y >= ym) << 1 | (x >= xm)) {\n q = quads[quads.length - 1];\n quads[quads.length - 1] = quads[quads.length - 1 - i];\n quads[quads.length - 1 - i] = q;\n }\n }\n\n // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var dx = x - +this._x.call(null, node.data),\n dy = y - +this._y.call(null, node.data),\n d2 = dx * dx + dy * dy;\n if (d2 < radius) {\n var d = Math.sqrt(radius = d2);\n x0 = x - d, y0 = y - d;\n x3 = x + d, y3 = y + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}\n","export {default as quadtree} from \"./quadtree.js\";\n","export default function(node, x0, y0, x1, y1) {\n this.node = node;\n this.x0 = x0;\n this.y0 = y0;\n this.x1 = x1;\n this.y1 = y1;\n}\n","import tree_add, {addAll as tree_addAll} from \"./add.js\";\nimport tree_cover from \"./cover.js\";\nimport tree_data from \"./data.js\";\nimport tree_extent from \"./extent.js\";\nimport tree_find from \"./find.js\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove.js\";\nimport tree_root from \"./root.js\";\nimport tree_size from \"./size.js\";\nimport tree_visit from \"./visit.js\";\nimport tree_visitAfter from \"./visitAfter.js\";\nimport tree_x, {defaultX} from \"./x.js\";\nimport tree_y, {defaultY} from \"./y.js\";\n\nexport default function quadtree(nodes, x, y) {\n var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n this._x = x;\n this._y = y;\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {data: leaf.data}, next = copy;\n while (leaf = leaf.next) next = next.next = {data: leaf.data};\n return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n node = this._root,\n nodes,\n child;\n\n if (!node) return copy;\n\n if (!node.length) return copy._root = leaf_copy(node), copy;\n\n nodes = [{source: node, target: copy._root = new Array(4)}];\n while (node = nodes.pop()) {\n for (var i = 0; i < 4; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;\n","export default function(d) {\n if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1,\n x,\n y,\n xm,\n ym,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return this;\n\n // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n if (!node.length) break;\n if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n }\n\n // Find the point to remove.\n while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n if (next = node.next) delete node.next;\n\n // If there are multiple coincident points, remove just the point.\n if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n // If this is the root point, remove it.\n if (!parent) return this._root = next, this;\n\n // Remove this leaf.\n next ? parent[i] = next : delete parent[i];\n\n // If the parent now contains exactly one leaf, collapse superfluous parents.\n if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n && node === (parent[3] || parent[2] || parent[1] || parent[0])\n && !node.length) {\n if (retainer) retainer[j] = node;\n else this._root = node;\n }\n\n return this;\n}\n\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n return this;\n}\n","export default function() {\n return this._root;\n}\n","export default function() {\n var size = 0;\n this.visit(function(node) {\n if (!node.length) do ++size; while (node = node.next)\n });\n return size;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n }\n }\n return this;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], next = [], q;\n if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n var node = q.node;\n if (node.length) {\n var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n }\n next.push(q);\n }\n while (q = next.pop()) {\n callback(q.node, q.x0, q.y0, q.x1, q.y1);\n }\n return this;\n}\n","export function defaultX(d) {\n return d[0];\n}\n\nexport default function(_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}\n","export function defaultY(d) {\n return d[1];\n}\n\nexport default function(_) {\n return arguments.length ? (this._y = _, this) : this._y;\n}\n","import defaultSource from \"./defaultSource.js\";\nimport irwinHall from \"./irwinHall.js\";\n\nexport default (function sourceRandomBates(source) {\n var I = irwinHall.source(source);\n\n function randomBates(n) {\n // use limiting distribution at n === 0\n if ((n = +n) === 0) return source;\n var randomIrwinHall = I(n);\n return function() {\n return randomIrwinHall() / n;\n };\n }\n\n randomBates.source = sourceRandomBates;\n\n return randomBates;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomBernoulli(source) {\n function randomBernoulli(p) {\n if ((p = +p) < 0 || p > 1) throw new RangeError(\"invalid p\");\n return function() {\n return Math.floor(source() + p);\n };\n }\n\n randomBernoulli.source = sourceRandomBernoulli;\n\n return randomBernoulli;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\nimport gamma from \"./gamma.js\";\n\nexport default (function sourceRandomBeta(source) {\n var G = gamma.source(source);\n\n function randomBeta(alpha, beta) {\n var X = G(alpha),\n Y = G(beta);\n return function() {\n var x = X();\n return x === 0 ? 0 : x / (x + Y());\n };\n }\n\n randomBeta.source = sourceRandomBeta;\n\n return randomBeta;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\nimport beta from \"./beta.js\";\nimport geometric from \"./geometric.js\";\n\nexport default (function sourceRandomBinomial(source) {\n var G = geometric.source(source),\n B = beta.source(source);\n\n function randomBinomial(n, p) {\n n = +n;\n if ((p = +p) >= 1) return () => n;\n if (p <= 0) return () => 0;\n return function() {\n var acc = 0, nn = n, pp = p;\n while (nn * pp > 16 && nn * (1 - pp) > 16) {\n var i = Math.floor((nn + 1) * pp),\n y = B(i, nn - i + 1)();\n if (y <= pp) {\n acc += i;\n nn -= i;\n pp = (pp - y) / (1 - y);\n } else {\n nn = i - 1;\n pp /= y;\n }\n }\n var sign = pp < 0.5,\n pFinal = sign ? pp : 1 - pp,\n g = G(pFinal);\n for (var s = g(), k = 0; s <= nn; ++k) s += g();\n return acc + (sign ? k : nn - k);\n };\n }\n\n randomBinomial.source = sourceRandomBinomial;\n\n return randomBinomial;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomCauchy(source) {\n function randomCauchy(a, b) {\n a = a == null ? 0 : +a;\n b = b == null ? 1 : +b;\n return function() {\n return a + b * Math.tan(Math.PI * source());\n };\n }\n\n randomCauchy.source = sourceRandomCauchy;\n\n return randomCauchy;\n})(defaultSource);\n","export default Math.random;\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomExponential(source) {\n function randomExponential(lambda) {\n return function() {\n return -Math.log1p(-source()) / lambda;\n };\n }\n\n randomExponential.source = sourceRandomExponential;\n\n return randomExponential;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\nimport normal from \"./normal.js\";\n\nexport default (function sourceRandomGamma(source) {\n var randomNormal = normal.source(source)();\n\n function randomGamma(k, theta) {\n if ((k = +k) < 0) throw new RangeError(\"invalid k\");\n // degenerate distribution if k === 0\n if (k === 0) return () => 0;\n theta = theta == null ? 1 : +theta;\n // exponential distribution if k === 1\n if (k === 1) return () => -Math.log1p(-source()) * theta;\n\n var d = (k < 1 ? k + 1 : k) - 1 / 3,\n c = 1 / (3 * Math.sqrt(d)),\n multiplier = k < 1 ? () => Math.pow(source(), 1 / k) : () => 1;\n return function() {\n do {\n do {\n var x = randomNormal(),\n v = 1 + c * x;\n } while (v <= 0);\n v *= v * v;\n var u = 1 - source();\n } while (u >= 1 - 0.0331 * x * x * x * x && Math.log(u) >= 0.5 * x * x + d * (1 - v + Math.log(v)));\n return d * v * multiplier() * theta;\n };\n }\n\n randomGamma.source = sourceRandomGamma;\n\n return randomGamma;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomGeometric(source) {\n function randomGeometric(p) {\n if ((p = +p) < 0 || p > 1) throw new RangeError(\"invalid p\");\n if (p === 0) return () => Infinity;\n if (p === 1) return () => 1;\n p = Math.log1p(-p);\n return function() {\n return 1 + Math.floor(Math.log1p(-source()) / p);\n };\n }\n\n randomGeometric.source = sourceRandomGeometric;\n\n return randomGeometric;\n})(defaultSource);\n","export {default as randomUniform} from \"./uniform.js\";\nexport {default as randomInt} from \"./int.js\";\nexport {default as randomNormal} from \"./normal.js\";\nexport {default as randomLogNormal} from \"./logNormal.js\";\nexport {default as randomBates} from \"./bates.js\";\nexport {default as randomIrwinHall} from \"./irwinHall.js\";\nexport {default as randomExponential} from \"./exponential.js\";\nexport {default as randomPareto} from \"./pareto.js\";\nexport {default as randomBernoulli} from \"./bernoulli.js\";\nexport {default as randomGeometric} from \"./geometric.js\";\nexport {default as randomBinomial} from \"./binomial.js\";\nexport {default as randomGamma} from \"./gamma.js\";\nexport {default as randomBeta} from \"./beta.js\";\nexport {default as randomWeibull} from \"./weibull.js\";\nexport {default as randomCauchy} from \"./cauchy.js\";\nexport {default as randomLogistic} from \"./logistic.js\";\nexport {default as randomPoisson} from \"./poisson.js\";\nexport {default as randomLcg} from \"./lcg.js\";\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomInt(source) {\n function randomInt(min, max) {\n if (arguments.length < 2) max = min, min = 0;\n min = Math.floor(min);\n max = Math.floor(max) - min;\n return function() {\n return Math.floor(source() * max + min);\n };\n }\n\n randomInt.source = sourceRandomInt;\n\n return randomInt;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomIrwinHall(source) {\n function randomIrwinHall(n) {\n if ((n = +n) <= 0) return () => 0;\n return function() {\n for (var sum = 0, i = n; i > 1; --i) sum += source();\n return sum + i * source();\n };\n }\n\n randomIrwinHall.source = sourceRandomIrwinHall;\n\n return randomIrwinHall;\n})(defaultSource);\n","// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst mul = 0x19660D;\nconst inc = 0x3C6EF35F;\nconst eps = 1 / 0x100000000;\n\nexport default function lcg(seed = Math.random()) {\n let state = (0 <= seed && seed < 1 ? seed / eps : Math.abs(seed)) | 0;\n return () => (state = mul * state + inc | 0, eps * (state >>> 0));\n}\n","import defaultSource from \"./defaultSource.js\";\nimport normal from \"./normal.js\";\n\nexport default (function sourceRandomLogNormal(source) {\n var N = normal.source(source);\n\n function randomLogNormal() {\n var randomNormal = N.apply(this, arguments);\n return function() {\n return Math.exp(randomNormal());\n };\n }\n\n randomLogNormal.source = sourceRandomLogNormal;\n\n return randomLogNormal;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomLogistic(source) {\n function randomLogistic(a, b) {\n a = a == null ? 0 : +a;\n b = b == null ? 1 : +b;\n return function() {\n var u = source();\n return a + b * Math.log(u / (1 - u));\n };\n }\n\n randomLogistic.source = sourceRandomLogistic;\n\n return randomLogistic;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomNormal(source) {\n function randomNormal(mu, sigma) {\n var x, r;\n mu = mu == null ? 0 : +mu;\n sigma = sigma == null ? 1 : +sigma;\n return function() {\n var y;\n\n // If available, use the second previously-generated uniform random.\n if (x != null) y = x, x = null;\n\n // Otherwise, generate a new x and y.\n else do {\n x = source() * 2 - 1;\n y = source() * 2 - 1;\n r = x * x + y * y;\n } while (!r || r > 1);\n\n return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r);\n };\n }\n\n randomNormal.source = sourceRandomNormal;\n\n return randomNormal;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomPareto(source) {\n function randomPareto(alpha) {\n if ((alpha = +alpha) < 0) throw new RangeError(\"invalid alpha\");\n alpha = 1 / -alpha;\n return function() {\n return Math.pow(1 - source(), alpha);\n };\n }\n\n randomPareto.source = sourceRandomPareto;\n\n return randomPareto;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\nimport binomial from \"./binomial.js\";\nimport gamma from \"./gamma.js\";\n\nexport default (function sourceRandomPoisson(source) {\n var G = gamma.source(source),\n B = binomial.source(source);\n\n function randomPoisson(lambda) {\n return function() {\n var acc = 0, l = lambda;\n while (l > 16) {\n var n = Math.floor(0.875 * l),\n t = G(n)();\n if (t > l) return acc + B(n - 1, l / t)();\n acc += n;\n l -= t;\n }\n for (var s = -Math.log1p(-source()), k = 0; s <= l; ++k) s -= Math.log1p(-source());\n return acc + k;\n };\n }\n\n randomPoisson.source = sourceRandomPoisson;\n\n return randomPoisson;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomUniform(source) {\n function randomUniform(min, max) {\n min = min == null ? 0 : +min;\n max = max == null ? 1 : +max;\n if (arguments.length === 1) max = min, min = 0;\n else max -= min;\n return function() {\n return source() * max + min;\n };\n }\n\n randomUniform.source = sourceRandomUniform;\n\n return randomUniform;\n})(defaultSource);\n","import defaultSource from \"./defaultSource.js\";\n\nexport default (function sourceRandomWeibull(source) {\n function randomWeibull(k, a, b) {\n var outerFunc;\n if ((k = +k) === 0) {\n outerFunc = x => -Math.log(x);\n } else {\n k = 1 / k;\n outerFunc = x => Math.pow(x, k);\n }\n a = a == null ? 0 : +a;\n b = b == null ? 1 : +b;\n return function() {\n return a + b * outerFunc(-Math.log1p(-source()));\n };\n }\n\n randomWeibull.source = sourceRandomWeibull;\n\n return randomWeibull;\n})(defaultSource);\n","import colors from \"../colors.js\";\n\nexport default colors(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\");\n","import colors from \"../colors.js\";\n\nexport default colors(\"4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0\");\n","export default function(specifier) {\n var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n return colors;\n}\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"d8b365f5f5f55ab4ac\",\n \"a6611adfc27d80cdc1018571\",\n \"a6611adfc27df5f5f580cdc1018571\",\n \"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\n \"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\n \"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\n \"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\n \"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\n \"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"af8dc3f7f7f77fbf7b\",\n \"7b3294c2a5cfa6dba0008837\",\n \"7b3294c2a5cff7f7f7a6dba0008837\",\n \"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\n \"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\n \"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\n \"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\n \"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\n \"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e9a3c9f7f7f7a1d76a\",\n \"d01c8bf1b6dab8e1864dac26\",\n \"d01c8bf1b6daf7f7f7b8e1864dac26\",\n \"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\n \"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\n \"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\n \"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\n \"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\n \"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"998ec3f7f7f7f1a340\",\n \"5e3c99b2abd2fdb863e66101\",\n \"5e3c99b2abd2f7f7f7fdb863e66101\",\n \"542788998ec3d8daebfee0b6f1a340b35806\",\n \"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\n \"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\n \"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\n \"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\n \"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ef8a62f7f7f767a9cf\",\n \"ca0020f4a58292c5de0571b0\",\n \"ca0020f4a582f7f7f792c5de0571b0\",\n \"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\n \"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\n \"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\n \"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\n \"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\n \"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ef8a62ffffff999999\",\n \"ca0020f4a582bababa404040\",\n \"ca0020f4a582ffffffbababa404040\",\n \"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\n \"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\n \"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\n \"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\n \"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\n \"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fc8d59ffffbf91bfdb\",\n \"d7191cfdae61abd9e92c7bb6\",\n \"d7191cfdae61ffffbfabd9e92c7bb6\",\n \"d73027fc8d59fee090e0f3f891bfdb4575b4\",\n \"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\n \"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\n \"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\n \"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\n \"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fc8d59ffffbf91cf60\",\n \"d7191cfdae61a6d96a1a9641\",\n \"d7191cfdae61ffffbfa6d96a1a9641\",\n \"d73027fc8d59fee08bd9ef8b91cf601a9850\",\n \"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\n \"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\n \"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\n \"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\n \"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fc8d59ffffbf99d594\",\n \"d7191cfdae61abdda42b83ba\",\n \"d7191cfdae61ffffbfabdda42b83ba\",\n \"d53e4ffc8d59fee08be6f59899d5943288bd\",\n \"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\n \"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\n \"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\n \"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\n \"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\"\n).map(colors);\n\nexport default ramp(scheme);\n","export {default as schemeCategory10} from \"./categorical/category10.js\";\nexport {default as schemeAccent} from \"./categorical/Accent.js\";\nexport {default as schemeDark2} from \"./categorical/Dark2.js\";\nexport {default as schemeObservable10} from \"./categorical/observable10.js\";\nexport {default as schemePaired} from \"./categorical/Paired.js\";\nexport {default as schemePastel1} from \"./categorical/Pastel1.js\";\nexport {default as schemePastel2} from \"./categorical/Pastel2.js\";\nexport {default as schemeSet1} from \"./categorical/Set1.js\";\nexport {default as schemeSet2} from \"./categorical/Set2.js\";\nexport {default as schemeSet3} from \"./categorical/Set3.js\";\nexport {default as schemeTableau10} from \"./categorical/Tableau10.js\";\nexport {default as interpolateBrBG, scheme as schemeBrBG} from \"./diverging/BrBG.js\";\nexport {default as interpolatePRGn, scheme as schemePRGn} from \"./diverging/PRGn.js\";\nexport {default as interpolatePiYG, scheme as schemePiYG} from \"./diverging/PiYG.js\";\nexport {default as interpolatePuOr, scheme as schemePuOr} from \"./diverging/PuOr.js\";\nexport {default as interpolateRdBu, scheme as schemeRdBu} from \"./diverging/RdBu.js\";\nexport {default as interpolateRdGy, scheme as schemeRdGy} from \"./diverging/RdGy.js\";\nexport {default as interpolateRdYlBu, scheme as schemeRdYlBu} from \"./diverging/RdYlBu.js\";\nexport {default as interpolateRdYlGn, scheme as schemeRdYlGn} from \"./diverging/RdYlGn.js\";\nexport {default as interpolateSpectral, scheme as schemeSpectral} from \"./diverging/Spectral.js\";\nexport {default as interpolateBuGn, scheme as schemeBuGn} from \"./sequential-multi/BuGn.js\";\nexport {default as interpolateBuPu, scheme as schemeBuPu} from \"./sequential-multi/BuPu.js\";\nexport {default as interpolateGnBu, scheme as schemeGnBu} from \"./sequential-multi/GnBu.js\";\nexport {default as interpolateOrRd, scheme as schemeOrRd} from \"./sequential-multi/OrRd.js\";\nexport {default as interpolatePuBuGn, scheme as schemePuBuGn} from \"./sequential-multi/PuBuGn.js\";\nexport {default as interpolatePuBu, scheme as schemePuBu} from \"./sequential-multi/PuBu.js\";\nexport {default as interpolatePuRd, scheme as schemePuRd} from \"./sequential-multi/PuRd.js\";\nexport {default as interpolateRdPu, scheme as schemeRdPu} from \"./sequential-multi/RdPu.js\";\nexport {default as interpolateYlGnBu, scheme as schemeYlGnBu} from \"./sequential-multi/YlGnBu.js\";\nexport {default as interpolateYlGn, scheme as schemeYlGn} from \"./sequential-multi/YlGn.js\";\nexport {default as interpolateYlOrBr, scheme as schemeYlOrBr} from \"./sequential-multi/YlOrBr.js\";\nexport {default as interpolateYlOrRd, scheme as schemeYlOrRd} from \"./sequential-multi/YlOrRd.js\";\nexport {default as interpolateBlues, scheme as schemeBlues} from \"./sequential-single/Blues.js\";\nexport {default as interpolateGreens, scheme as schemeGreens} from \"./sequential-single/Greens.js\";\nexport {default as interpolateGreys, scheme as schemeGreys} from \"./sequential-single/Greys.js\";\nexport {default as interpolatePurples, scheme as schemePurples} from \"./sequential-single/Purples.js\";\nexport {default as interpolateReds, scheme as schemeReds} from \"./sequential-single/Reds.js\";\nexport {default as interpolateOranges, scheme as schemeOranges} from \"./sequential-single/Oranges.js\";\nexport {default as interpolateCividis} from \"./sequential-multi/cividis.js\";\nexport {default as interpolateCubehelixDefault} from \"./sequential-multi/cubehelix.js\";\nexport {default as interpolateRainbow, warm as interpolateWarm, cool as interpolateCool} from \"./sequential-multi/rainbow.js\";\nexport {default as interpolateSinebow} from \"./sequential-multi/sinebow.js\";\nexport {default as interpolateTurbo} from \"./sequential-multi/turbo.js\";\nexport {default as interpolateViridis, magma as interpolateMagma, inferno as interpolateInferno, plasma as interpolatePlasma} from \"./sequential-multi/viridis.js\";\n","import {interpolateRgbBasis} from \"d3-interpolate\";\n\nexport default scheme => interpolateRgbBasis(scheme[scheme.length - 1]);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e5f5f999d8c92ca25f\",\n \"edf8fbb2e2e266c2a4238b45\",\n \"edf8fbb2e2e266c2a42ca25f006d2c\",\n \"edf8fbccece699d8c966c2a42ca25f006d2c\",\n \"edf8fbccece699d8c966c2a441ae76238b45005824\",\n \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\n \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e0ecf49ebcda8856a7\",\n \"edf8fbb3cde38c96c688419d\",\n \"edf8fbb3cde38c96c68856a7810f7c\",\n \"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\n \"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\n \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\n \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e0f3dba8ddb543a2ca\",\n \"f0f9e8bae4bc7bccc42b8cbe\",\n \"f0f9e8bae4bc7bccc443a2ca0868ac\",\n \"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\n \"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\n \"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fee8c8fdbb84e34a33\",\n \"fef0d9fdcc8afc8d59d7301f\",\n \"fef0d9fdcc8afc8d59e34a33b30000\",\n \"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\n \"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\n \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\n \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ece7f2a6bddb2b8cbe\",\n \"f1eef6bdc9e174a9cf0570b0\",\n \"f1eef6bdc9e174a9cf2b8cbe045a8d\",\n \"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\n \"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\n \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ece2f0a6bddb1c9099\",\n \"f6eff7bdc9e167a9cf02818a\",\n \"f6eff7bdc9e167a9cf1c9099016c59\",\n \"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\n \"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\n \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\n \"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e7e1efc994c7dd1c77\",\n \"f1eef6d7b5d8df65b0ce1256\",\n \"f1eef6d7b5d8df65b0dd1c77980043\",\n \"f1eef6d4b9dac994c7df65b0dd1c77980043\",\n \"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\n \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\n \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fde0ddfa9fb5c51b8a\",\n \"feebe2fbb4b9f768a1ae017e\",\n \"feebe2fbb4b9f768a1c51b8a7a0177\",\n \"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\n \"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\n \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"f7fcb9addd8e31a354\",\n \"ffffccc2e69978c679238443\",\n \"ffffccc2e69978c67931a354006837\",\n \"ffffccd9f0a3addd8e78c67931a354006837\",\n \"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\n \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\n \"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"edf8b17fcdbb2c7fb8\",\n \"ffffcca1dab441b6c4225ea8\",\n \"ffffcca1dab441b6c42c7fb8253494\",\n \"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\n \"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\n \"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fff7bcfec44fd95f0e\",\n \"ffffd4fed98efe9929cc4c02\",\n \"ffffd4fed98efe9929d95f0e993404\",\n \"ffffd4fee391fec44ffe9929d95f0e993404\",\n \"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\n \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\n \"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"ffeda0feb24cf03b20\",\n \"ffffb2fecc5cfd8d3ce31a1c\",\n \"ffffb2fecc5cfd8d3cf03b20bd0026\",\n \"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\n \"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\n \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\"\n).map(colors);\n\nexport default ramp(scheme);\n","export default function(t) {\n t = Math.max(0, Math.min(1, t));\n return \"rgb(\"\n + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67)))))))\n + \")\";\n}\n","import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport default interpolateCubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));\n","import {cubehelix} from \"d3-color\";\nimport {interpolateCubehelixLong} from \"d3-interpolate\";\n\nexport var warm = interpolateCubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nexport var cool = interpolateCubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\n\nvar c = cubehelix();\n\nexport default function(t) {\n if (t < 0 || t > 1) t -= Math.floor(t);\n var ts = Math.abs(t - 0.5);\n c.h = 360 * t - 100;\n c.s = 1.5 - 1.5 * ts;\n c.l = 0.8 - 0.9 * ts;\n return c + \"\";\n}\n","import {rgb} from \"d3-color\";\n\nvar c = rgb(),\n pi_1_3 = Math.PI / 3,\n pi_2_3 = Math.PI * 2 / 3;\n\nexport default function(t) {\n var x;\n t = (0.5 - t) * Math.PI;\n c.r = 255 * (x = Math.sin(t)) * x;\n c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;\n c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;\n return c + \"\";\n}\n","export default function(t) {\n t = Math.max(0, Math.min(1, t));\n return \"rgb(\"\n + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + \", \"\n + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66)))))))\n + \")\";\n}\n","import colors from \"../colors.js\";\n\nfunction ramp(range) {\n var n = range.length;\n return function(t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n}\n\nexport default ramp(colors(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\"));\n\nexport var magma = ramp(colors(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\n\nexport var inferno = ramp(colors(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\n\nexport var plasma = ramp(colors(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"deebf79ecae13182bd\",\n \"eff3ffbdd7e76baed62171b5\",\n \"eff3ffbdd7e76baed63182bd08519c\",\n \"eff3ffc6dbef9ecae16baed63182bd08519c\",\n \"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\n \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\n \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"e5f5e0a1d99b31a354\",\n \"edf8e9bae4b374c476238b45\",\n \"edf8e9bae4b374c47631a354006d2c\",\n \"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\n \"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\n \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\n \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"f0f0f0bdbdbd636363\",\n \"f7f7f7cccccc969696525252\",\n \"f7f7f7cccccc969696636363252525\",\n \"f7f7f7d9d9d9bdbdbd969696636363252525\",\n \"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\n \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\n \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fee6cefdae6be6550d\",\n \"feeddefdbe85fd8d3cd94701\",\n \"feeddefdbe85fd8d3ce6550da63603\",\n \"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\n \"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\n \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"efedf5bcbddc756bb1\",\n \"f2f0f7cbc9e29e9ac86a51a3\",\n \"f2f0f7cbc9e29e9ac8756bb154278f\",\n \"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\n \"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\n \"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\"\n).map(colors);\n\nexport default ramp(scheme);\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\n\nexport var scheme = new Array(3).concat(\n \"fee0d2fc9272de2d26\",\n \"fee5d9fcae91fb6a4acb181d\",\n \"fee5d9fcae91fb6a4ade2d26a50f15\",\n \"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\n \"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\n \"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\"\n).map(colors);\n\nexport default ramp(scheme);\n","import {range as sequence} from \"d3-array\";\nimport {initRange} from \"./init.js\";\nimport ordinal from \"./ordinal.js\";\n\nexport default function band() {\n var scale = ordinal().unknown(undefined),\n domain = scale.domain,\n ordinalRange = scale.range,\n r0 = 0,\n r1 = 1,\n step,\n bandwidth,\n round = false,\n paddingInner = 0,\n paddingOuter = 0,\n align = 0.5;\n\n delete scale.unknown;\n\n function rescale() {\n var n = domain().length,\n reverse = r1 < r0,\n start = reverse ? r1 : r0,\n stop = reverse ? r0 : r1;\n step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n if (round) step = Math.floor(step);\n start += (stop - start - step * (n - paddingInner)) * align;\n bandwidth = step * (1 - paddingInner);\n if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n var values = sequence(n).map(function(i) { return start + step * i; });\n return ordinalRange(reverse ? values.reverse() : values);\n }\n\n scale.domain = function(_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.range = function(_) {\n return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1];\n };\n\n scale.rangeRound = function(_) {\n return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale();\n };\n\n scale.bandwidth = function() {\n return bandwidth;\n };\n\n scale.step = function() {\n return step;\n };\n\n scale.round = function(_) {\n return arguments.length ? (round = !!_, rescale()) : round;\n };\n\n scale.padding = function(_) {\n return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n };\n\n scale.paddingInner = function(_) {\n return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n };\n\n scale.paddingOuter = function(_) {\n return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n };\n\n scale.align = function(_) {\n return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n };\n\n scale.copy = function() {\n return band(domain(), [r0, r1])\n .round(round)\n .paddingInner(paddingInner)\n .paddingOuter(paddingOuter)\n .align(align);\n };\n\n return initRange.apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n var copy = scale.copy;\n\n scale.padding = scale.paddingOuter;\n delete scale.paddingInner;\n delete scale.paddingOuter;\n\n scale.copy = function() {\n return pointish(copy());\n };\n\n return scale;\n}\n\nexport function point() {\n return pointish(band.apply(null, arguments).paddingInner(1));\n}\n","export default function constants(x) {\n return function() {\n return x;\n };\n}\n","import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n return x;\n}\n\nfunction normalize(a, b) {\n return (b -= (a = +a))\n ? function(x) { return (x - a) / b; }\n : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n var t;\n if (a > b) t = a, a = b, b = t;\n return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1;\n\n // Reverse descending domains.\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n\n return function(x) {\n var i = bisect(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .range(source.range())\n .interpolate(source.interpolate())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport function transformer() {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n\n function rescale() {\n var n = Math.min(domain.length, range.length);\n if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n piecewise = n > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n }\n\n scale.invert = function(y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = Array.from(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n}\n\nexport default function continuous() {\n return transformer()(identity, identity);\n}\n","import {interpolate, interpolateRound, piecewise} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {copy} from \"./sequential.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 0.5,\n x2 = 1,\n s = 1,\n t0,\n t1,\n t2,\n k10,\n k21,\n interpolator = identity,\n transform,\n clamp = false,\n unknown;\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function(_) {\n return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2];\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n function range(interpolate) {\n return function(_) {\n var r0, r1, r2;\n return arguments.length ? ([r0, r1, r2] = _, interpolator = piecewise(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)];\n };\n }\n\n scale.range = range(interpolate);\n\n scale.rangeRound = range(interpolateRound);\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t) {\n transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1;\n return scale;\n };\n}\n\nexport default function diverging() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function() {\n return copy(scale, diverging());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingLog() {\n var scale = loggish(transformer()).domain([0.1, 1, 10]);\n\n scale.copy = function() {\n return copy(scale, divergingLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, divergingSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingPow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, divergingPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSqrt() {\n return divergingPow.apply(null, arguments).exponent(0.5);\n}\n","import {linearish} from \"./linear.js\";\nimport number from \"./number.js\";\n\nexport default function identity(domain) {\n var unknown;\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : x;\n }\n\n scale.invert = scale;\n\n scale.domain = scale.range = function(_) {\n return arguments.length ? (domain = Array.from(_, number), scale) : domain.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return identity(domain).unknown(unknown);\n };\n\n domain = arguments.length ? Array.from(domain, number) : [0, 1];\n\n return linearish(scale);\n}\n","export {\n default as scaleBand,\n point as scalePoint\n} from \"./band.js\";\n\nexport {\n default as scaleIdentity\n} from \"./identity.js\";\n\nexport {\n default as scaleLinear\n} from \"./linear.js\";\n\nexport {\n default as scaleLog\n} from \"./log.js\";\n\nexport {\n default as scaleSymlog\n} from \"./symlog.js\";\n\nexport {\n default as scaleOrdinal,\n implicit as scaleImplicit\n} from \"./ordinal.js\";\n\nexport {\n default as scalePow,\n sqrt as scaleSqrt\n} from \"./pow.js\";\n\nexport {\n default as scaleRadial\n} from \"./radial.js\";\n\nexport {\n default as scaleQuantile\n} from \"./quantile.js\";\n\nexport {\n default as scaleQuantize\n} from \"./quantize.js\";\n\nexport {\n default as scaleThreshold\n} from \"./threshold.js\";\n\nexport {\n default as scaleTime\n} from \"./time.js\";\n\nexport {\n default as scaleUtc\n} from \"./utcTime.js\";\n\nexport {\n default as scaleSequential,\n sequentialLog as scaleSequentialLog,\n sequentialPow as scaleSequentialPow,\n sequentialSqrt as scaleSequentialSqrt,\n sequentialSymlog as scaleSequentialSymlog\n} from \"./sequential.js\";\n\nexport {\n default as scaleSequentialQuantile\n} from \"./sequentialQuantile.js\";\n\nexport {\n default as scaleDiverging,\n divergingLog as scaleDivergingLog,\n divergingPow as scaleDivergingPow,\n divergingSqrt as scaleDivergingSqrt,\n divergingSymlog as scaleDivergingSymlog\n} from \"./diverging.js\";\n\nexport {\n default as tickFormat\n} from \"./tickFormat.js\";\n","export function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0: break;\n case 1: {\n if (typeof domain === \"function\") this.interpolator(domain);\n else this.range(domain);\n break;\n }\n default: {\n this.domain(domain);\n if (typeof interpolator === \"function\") this.interpolator(interpolator);\n else this.range(interpolator);\n break;\n }\n }\n return this;\n}\n","import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function(count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function(count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function(count) {\n if (count == null) count = 10;\n\n var d = domain();\n var i0 = 0;\n var i1 = d.length - 1;\n var start = d[i0];\n var stop = d[i1];\n var prestep;\n var step;\n var maxIter = 10;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n \n while (maxIter-- > 0) {\n step = tickIncrement(start, stop, count);\n if (step === prestep) {\n d[i0] = start\n d[i1] = stop\n return domain(d);\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n } else {\n break;\n }\n prestep = step;\n }\n\n return scale;\n };\n\n return scale;\n}\n\nexport default function linear() {\n var scale = continuous();\n\n scale.copy = function() {\n return copy(scale, linear());\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n","import {ticks} from \"d3-array\";\nimport {format, formatSpecifier} from \"d3-format\";\nimport nice from \"./nice.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformLog(x) {\n return Math.log(x);\n}\n\nfunction transformExp(x) {\n return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n return base === 10 ? pow10\n : base === Math.E ? Math.exp\n : x => Math.pow(base, x);\n}\n\nfunction logp(base) {\n return base === Math.E ? Math.log\n : base === 10 && Math.log10\n || base === 2 && Math.log2\n || (base = Math.log(base), x => Math.log(x) / base);\n}\n\nfunction reflect(f) {\n return (x, k) => -f(-x, k);\n}\n\nexport function loggish(transform) {\n const scale = transform(transformLog, transformExp);\n const domain = scale.domain;\n let base = 10;\n let logs;\n let pows;\n\n function rescale() {\n logs = logp(base), pows = powp(base);\n if (domain()[0] < 0) {\n logs = reflect(logs), pows = reflect(pows);\n transform(transformLogn, transformExpn);\n } else {\n transform(transformLog, transformExp);\n }\n return scale;\n }\n\n scale.base = function(_) {\n return arguments.length ? (base = +_, rescale()) : base;\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.ticks = count => {\n const d = domain();\n let u = d[0];\n let v = d[d.length - 1];\n const r = v < u;\n\n if (r) ([u, v] = [v, u]);\n\n let i = logs(u);\n let j = logs(v);\n let k;\n let t;\n const n = count == null ? 10 : +count;\n let z = [];\n\n if (!(base % 1) && j - i < n) {\n i = Math.floor(i), j = Math.ceil(j);\n if (u > 0) for (; i <= j; ++i) {\n for (k = 1; k < base; ++k) {\n t = i < 0 ? k / pows(-i) : k * pows(i);\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n } else for (; i <= j; ++i) {\n for (k = base - 1; k >= 1; --k) {\n t = i > 0 ? k / pows(-i) : k * pows(i);\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n }\n if (z.length * 2 < n) z = ticks(u, v, n);\n } else {\n z = ticks(i, j, Math.min(j - i, n)).map(pows);\n }\n return r ? z.reverse() : z;\n };\n\n scale.tickFormat = (count, specifier) => {\n if (count == null) count = 10;\n if (specifier == null) specifier = base === 10 ? \"s\" : \",\";\n if (typeof specifier !== \"function\") {\n if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;\n specifier = format(specifier);\n }\n if (count === Infinity) return specifier;\n const k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n return d => {\n let i = d / pows(Math.round(logs(d)));\n if (i * base < base - 0.5) i *= base;\n return i <= k ? specifier(d) : \"\";\n };\n };\n\n scale.nice = () => {\n return domain(nice(domain(), {\n floor: x => pows(Math.floor(logs(x))),\n ceil: x => pows(Math.ceil(logs(x)))\n }));\n };\n\n return scale;\n}\n\nexport default function log() {\n const scale = loggish(transformer()).domain([1, 10]);\n scale.copy = () => copy(scale, log()).base(scale.base());\n initRange.apply(scale, arguments);\n return scale;\n}\n","export default function nice(domain, interval) {\n domain = domain.slice();\n\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n t;\n\n if (x1 < x0) {\n t = i0, i0 = i1, i1 = t;\n t = x0, x0 = x1, x1 = t;\n }\n\n domain[i0] = interval.floor(x0);\n domain[i1] = interval.ceil(x1);\n return domain;\n}\n","export default function number(x) {\n return +x;\n}\n","import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n var index = new InternMap(),\n domain = [],\n range = [],\n unknown = implicit;\n\n function scale(d) {\n let i = index.get(d);\n if (i === undefined) {\n if (unknown !== implicit) return unknown;\n index.set(d, i = domain.push(d) - 1);\n }\n return range[i % range.length];\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = new InternMap();\n for (const value of _) {\n if (index.has(value)) continue;\n index.set(value, domain.push(value) - 1);\n }\n return scale;\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), scale) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return ordinal(domain, range).unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n","import {linearish} from \"./linear.js\";\nimport {copy, identity, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformPow(exponent) {\n return function(x) {\n return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n };\n}\n\nfunction transformSqrt(x) {\n return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n return x < 0 ? -x * x : x * x;\n}\n\nexport function powish(transform) {\n var scale = transform(identity, identity),\n exponent = 1;\n\n function rescale() {\n return exponent === 1 ? transform(identity, identity)\n : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n : transform(transformPow(exponent), transformPow(1 / exponent));\n }\n\n scale.exponent = function(_) {\n return arguments.length ? (exponent = +_, rescale()) : exponent;\n };\n\n return linearish(scale);\n}\n\nexport default function pow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, pow()).exponent(scale.exponent());\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n\nexport function sqrt() {\n return pow.apply(null, arguments).exponent(0.5);\n}\n","import {ascending, bisect, quantileSorted as threshold} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantile() {\n var domain = [],\n range = [],\n thresholds = [],\n unknown;\n\n function rescale() {\n var i = 0, n = Math.max(1, range.length);\n thresholds = new Array(n - 1);\n while (++i < n) thresholds[i - 1] = threshold(domain, i / n);\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];\n }\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN] : [\n i > 0 ? thresholds[i - 1] : domain[0],\n i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n ];\n };\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n domain.sort(ascending);\n return rescale();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.quantiles = function() {\n return thresholds.slice();\n };\n\n scale.copy = function() {\n return quantile()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\n","import {bisect} from \"d3-array\";\nimport {linearish} from \"./linear.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantize() {\n var x0 = 0,\n x1 = 1,\n n = 1,\n domain = [0.5],\n range = [0, 1],\n unknown;\n\n function scale(x) {\n return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n function rescale() {\n var i = -1;\n domain = new Array(n);\n while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);\n return scale;\n }\n\n scale.domain = function(_) {\n return arguments.length ? ([x0, x1] = _, x0 = +x0, x1 = +x1, rescale()) : [x0, x1];\n };\n\n scale.range = function(_) {\n return arguments.length ? (n = (range = Array.from(_)).length - 1, rescale()) : range.slice();\n };\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN]\n : i < 1 ? [x0, domain[0]]\n : i >= n ? [domain[n - 1], x1]\n : [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : scale;\n };\n\n scale.thresholds = function() {\n return domain.slice();\n };\n\n scale.copy = function() {\n return quantize()\n .domain([x0, x1])\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(linearish(scale), arguments);\n}\n","import continuous from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport number from \"./number.js\";\n\nfunction square(x) {\n return Math.sign(x) * x * x;\n}\n\nfunction unsquare(x) {\n return Math.sign(x) * Math.sqrt(Math.abs(x));\n}\n\nexport default function radial() {\n var squared = continuous(),\n range = [0, 1],\n round = false,\n unknown;\n\n function scale(x) {\n var y = unsquare(squared(x));\n return isNaN(y) ? unknown : round ? Math.round(y) : y;\n }\n\n scale.invert = function(y) {\n return squared.invert(square(y));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (squared.domain(_), scale) : squared.domain();\n };\n\n scale.range = function(_) {\n return arguments.length ? (squared.range((range = Array.from(_, number)).map(square)), scale) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return scale.range(_).round(true);\n };\n\n scale.round = function(_) {\n return arguments.length ? (round = !!_, scale) : round;\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (squared.clamp(_), scale) : squared.clamp();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return radial(squared.domain(), range)\n .round(round)\n .clamp(squared.clamp())\n .unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n","import {interpolate, interpolateRound} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 1,\n t0,\n t1,\n k10,\n transform,\n interpolator = identity,\n clamp = false,\n unknown;\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function(_) {\n return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n function range(interpolate) {\n return function(_) {\n var r0, r1;\n return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];\n };\n }\n\n scale.range = range(interpolate);\n\n scale.rangeRound = range(interpolateRound);\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t) {\n transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n return scale;\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .interpolator(source.interpolator())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport default function sequential() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function() {\n return copy(scale, sequential());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialLog() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function() {\n return copy(scale, sequentialLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialPow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSqrt() {\n return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n","import {ascending, bisect, quantile} from \"d3-array\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\n\nexport default function sequentialQuantile() {\n var domain = [],\n interpolator = identity;\n\n function scale(x) {\n if (x != null && !isNaN(x = +x)) return interpolator((bisect(domain, x, 1) - 1) / (domain.length - 1));\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n domain.sort(ascending);\n return scale;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n scale.range = function() {\n return domain.map((d, i) => interpolator(i / (domain.length - 1)));\n };\n\n scale.quantiles = function(n) {\n return Array.from({length: n + 1}, (_, i) => quantile(domain, i / n));\n };\n\n scale.copy = function() {\n return sequentialQuantile(interpolator).domain(domain);\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n","import {linearish} from \"./linear.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformSymlog(c) {\n return function(x) {\n return Math.sign(x) * Math.log1p(Math.abs(x / c));\n };\n}\n\nfunction transformSymexp(c) {\n return function(x) {\n return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n };\n}\n\nexport function symlogish(transform) {\n var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n scale.constant = function(_) {\n return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n };\n\n return linearish(scale);\n}\n\nexport default function symlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, symlog()).constant(scale.constant());\n };\n\n return initRange.apply(scale, arguments);\n}\n","import {bisect} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function threshold() {\n var domain = [0.5],\n range = [0, 1],\n unknown,\n n = 1;\n\n function scale(x) {\n return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n };\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return threshold()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\n","import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n switch (specifier.type) {\n case \"s\": {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\": {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n case \"f\":\n case \"%\": {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n return format(specifier);\n}\n","import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nfunction date(t) {\n return new Date(t);\n}\n\nfunction number(t) {\n return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n var scale = continuous(),\n invert = scale.invert,\n domain = scale.domain;\n\n var formatMillisecond = format(\".%L\"),\n formatSecond = format(\":%S\"),\n formatMinute = format(\"%I:%M\"),\n formatHour = format(\"%I %p\"),\n formatDay = format(\"%a %d\"),\n formatWeek = format(\"%b %d\"),\n formatMonth = format(\"%B\"),\n formatYear = format(\"%Y\");\n\n function tickFormat(date) {\n return (second(date) < date ? formatMillisecond\n : minute(date) < date ? formatSecond\n : hour(date) < date ? formatMinute\n : day(date) < date ? formatHour\n : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n : year(date) < date ? formatMonth\n : formatYear)(date);\n }\n\n scale.invert = function(y) {\n return new Date(invert(y));\n };\n\n scale.domain = function(_) {\n return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n };\n\n scale.ticks = function(interval) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n };\n\n scale.tickFormat = function(count, specifier) {\n return specifier == null ? tickFormat : format(specifier);\n };\n\n scale.nice = function(interval) {\n var d = domain();\n if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n return interval ? domain(nice(d, interval)) : scale;\n };\n\n scale.copy = function() {\n return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n };\n\n return scale;\n}\n\nexport default function time() {\n return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n","import {utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcTicks, utcTickInterval} from \"d3-time\";\nimport {utcFormat} from \"d3-time-format\";\nimport {calendar} from \"./time.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function utcTime() {\n return initRange.apply(calendar(utcTicks, utcTickInterval, utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n}\n","// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don’t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","import creator from \"./creator.js\";\nimport select from \"./select.js\";\n\nexport default function(name) {\n return select(creator(name).call(document.documentElement));\n}\n","import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n}\n\nfunction creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\n\nexport default function(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n}\n","export {default as create} from \"./create.js\";\nexport {default as creator} from \"./creator.js\";\nexport {default as local} from \"./local.js\";\nexport {default as matcher} from \"./matcher.js\";\nexport {default as namespace} from \"./namespace.js\";\nexport {default as namespaces} from \"./namespaces.js\";\nexport {default as pointer} from \"./pointer.js\";\nexport {default as pointers} from \"./pointers.js\";\nexport {default as select} from \"./select.js\";\nexport {default as selectAll} from \"./selectAll.js\";\nexport {default as selection} from \"./selection/index.js\";\nexport {default as selector} from \"./selector.js\";\nexport {default as selectorAll} from \"./selectorAll.js\";\nexport {styleValue as style} from \"./selection/style.js\";\nexport {default as window} from \"./window.js\";\n","var nextId = 0;\n\nexport default function local() {\n return new Local;\n}\n\nfunction Local() {\n this._ = \"@\" + (++nextId).toString(36);\n}\n\nLocal.prototype = local.prototype = {\n constructor: Local,\n get: function(node) {\n var id = this._;\n while (!(id in node)) if (!(node = node.parentNode)) return;\n return node[id];\n },\n set: function(node, value) {\n return node[this._] = value;\n },\n remove: function(node) {\n return this._ in node && delete node[this._];\n },\n toString: function() {\n return this._;\n }\n};\n","export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n\nexport function childMatcher(selector) {\n return function(node) {\n return node.matches(selector);\n };\n}\n\n","import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n","export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n","import sourceEvent from \"./sourceEvent.js\";\n\nexport default function(event, node) {\n event = sourceEvent(event);\n if (node === undefined) node = event.currentTarget;\n if (node) {\n var svg = node.ownerSVGElement || node;\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.clientX, point.y = event.clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n if (node.getBoundingClientRect) {\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n }\n }\n return [event.pageX, event.pageY];\n}\n","import pointer from \"./pointer.js\";\nimport sourceEvent from \"./sourceEvent.js\";\n\nexport default function(events, node) {\n if (events.target) { // i.e., instanceof Event, not TouchList or iterable\n events = sourceEvent(events);\n if (node === undefined) node = events.currentTarget;\n events = events.touches || [events];\n }\n return Array.from(events, event => pointer(event, node));\n}\n","import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n}\n","import array from \"./array.js\";\nimport {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([document.querySelectorAll(selector)], [document.documentElement])\n : new Selection([array(selector)], root);\n}\n","import creator from \"../creator.js\";\n\nexport default function(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n}\n","import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n}\n\nfunction attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\n\nfunction attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n}\n\nfunction attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n","export default function() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}\n","function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\n\nfunction classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n}\n\nfunction classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n}\n\nfunction classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\n\nexport default function(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n}\n","function selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n","import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don’t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = new Map,\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n exit[i] = node;\n }\n }\n}\n\nfunction datum(node) {\n return node.__data__;\n}\n\nexport default function(value, key) {\n if (!arguments.length) return Array.from(this, datum);\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn’t worried about “live” collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don’t; we’d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n return typeof data === \"object\" && \"length\" in data\n ? data // Array, TypedArray, NodeList, array-like\n : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n","export default function(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n}\n","import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n}\n\nfunction dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\n\nexport default function(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n}\n","export default function(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n}\n","export default function() {\n return !this.node();\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n","import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","function htmlRemove() {\n this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n}\n\nfunction htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n}\n","import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\n\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n return this;\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n selection: selection_selection,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch,\n [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n","import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n return null;\n}\n\nexport default function(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}\n","export default function*() {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) yield node;\n }\n }\n}\n","export default function(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n if (typeof onenter === \"function\") {\n enter = onenter(enter);\n if (enter) enter = enter.selection();\n } else {\n enter = enter.append(onenter + \"\");\n }\n if (onupdate != null) {\n update = onupdate(update);\n if (update) update = update.selection();\n }\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\n","function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n return this.each(lower);\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(context) {\n var selection = context.selection ? context.selection() : context;\n\n 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) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n}\n","export default function() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}\n","export default function() {\n return Array.from(this);\n}\n","function contextListener(listener) {\n return function(event) {\n listener.call(this, event, this.__data__);\n };\n}\n\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n}\n\nfunction onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n}\n\nfunction onAdd(typename, value, options) {\n return function() {\n var on = this.__on, o, listener = contextListener(value);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, options) {\n var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n return this;\n}\n","export default function() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n}\n","function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n}\n\nfunction propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n}\n\nfunction propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n}\n\nexport default function(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n}\n","function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n return this.each(raise);\n}\n","function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n return this.each(remove);\n}\n","import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n return function() {\n return array(select.apply(this, arguments));\n };\n}\n\nexport default function(select) {\n if (typeof select === \"function\") select = arrayAll(select);\n else select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n}\n","import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n return function() {\n return find.call(this.children, match);\n };\n}\n\nfunction childFirst() {\n return this.firstElementChild;\n}\n\nexport default function(match) {\n return this.select(match == null ? childFirst\n : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n return function() {\n return filter.call(this.children, match);\n };\n}\n\nexport default function(match) {\n return this.selectAll(match == null ? children\n : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","export default function() {\n let size = 0;\n for (const node of this) ++size; // eslint-disable-line no-unused-vars\n return size;\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n if (!compare) compare = ascending;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","export default function(update) {\n return new Array(update.length);\n}\n","import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n}\n\nfunction styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n}\n\nexport default function(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n","function textRemove() {\n this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n}\n","function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n","function empty() {\n return [];\n}\n\nexport default function(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n}\n","export default function(event) {\n let sourceEvent;\n while (sourceEvent = event.sourceEvent) event = sourceEvent;\n return event;\n}\n","export default function(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n}\n","import constant from \"./constant.js\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math.js\";\nimport {withPath} from \"./path.js\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null,\n path = withPath(arc);\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc;\n\n // Restrict the corner radius according to the sector angle. If this\n // intersection fails, it’s probably because the arc is too small, so\n // disable the corner radius entirely.\n if (da < pi) {\n if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = min(rc, (r0 - lc) / (kc - 1));\n rc1 = min(rc, (r1 - lc) / (kc + 1));\n } else {\n rc0 = rc1 = 0;\n }\n }\n }\n\n // Is the sector collapsed to a line?\n if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n // Does the sector’s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n // Does the sector’s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function() {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [cos(a) * r, sin(a) * r];\n };\n\n arc.innerRadius = function(_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function(_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function(_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function(_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n };\n\n return arc;\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport line from \"./line.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x0, y0, y1) {\n var x1 = null,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(area);\n\n x0 = typeof x0 === \"function\" ? x0 : (x0 === undefined) ? pointX : constant(+x0);\n y0 = typeof y0 === \"function\" ? y0 : (y0 === undefined) ? constant(0) : constant(+y0);\n y1 = typeof y1 === \"function\" ? y1 : (y1 === undefined) ? pointY : constant(+y1);\n\n function area(data) {\n var i,\n j,\n k,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer,\n x0z = new Array(n),\n y0z = new Array(n);\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) {\n j = i;\n output.areaStart();\n output.lineStart();\n } else {\n output.lineEnd();\n output.lineStart();\n for (k = i - 1; k >= j; --k) {\n output.point(x0z[k], y0z[k]);\n }\n output.lineEnd();\n output.areaEnd();\n }\n }\n if (defined0) {\n x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n }\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n function arealine() {\n return line().defined(defined).curve(curve).context(context);\n }\n\n area.x = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), x1 = null, area) : x0;\n };\n\n area.x0 = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), area) : x0;\n };\n\n area.x1 = function(_) {\n return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : x1;\n };\n\n area.y = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), y1 = null, area) : y0;\n };\n\n area.y0 = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), area) : y0;\n };\n\n area.y1 = function(_) {\n return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : y1;\n };\n\n area.lineX0 =\n area.lineY0 = function() {\n return arealine().x(x0).y(y0);\n };\n\n area.lineY1 = function() {\n return arealine().x(x0).y(y1);\n };\n\n area.lineX1 = function() {\n return arealine().x(x1).y(y0);\n };\n\n area.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), area) : defined;\n };\n\n area.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n };\n\n area.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n };\n\n return area;\n}\n","import curveRadial, {curveRadialLinear} from \"./curve/radial.js\";\nimport area from \"./area.js\";\nimport {lineRadial} from \"./lineRadial.js\";\n\nexport default function() {\n var a = area().curve(curveRadialLinear),\n c = a.curve,\n x0 = a.lineX0,\n x1 = a.lineX1,\n y0 = a.lineY0,\n y1 = a.lineY1;\n\n a.angle = a.x, delete a.x;\n a.startAngle = a.x0, delete a.x0;\n a.endAngle = a.x1, delete a.x1;\n a.radius = a.y, delete a.y;\n a.innerRadius = a.y0, delete a.y0;\n a.outerRadius = a.y1, delete a.y1;\n a.lineStartAngle = function() { return lineRadial(x0()); }, delete a.lineX0;\n a.lineEndAngle = function() { return lineRadial(x1()); }, delete a.lineX1;\n a.lineInnerRadius = function() { return lineRadial(y0()); }, delete a.lineY0;\n a.lineOuterRadius = function() { return lineRadial(y1()); }, delete a.lineY1;\n\n a.curve = function(_) {\n return arguments.length ? c(curveRadial(_)) : c()._curve;\n };\n\n return a;\n}\n","export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n (2 * that._x0 + that._x1) / 3,\n (2 * that._y0 + that._y1) / 3,\n (that._x0 + 2 * that._x1) / 3,\n (that._y0 + 2 * that._y1) / 3,\n (that._x0 + 4 * that._x1 + x) / 6,\n (that._y0 + 4 * that._y1 + y) / 6\n );\n}\n\nexport function Basis(context) {\n this._context = context;\n}\n\nBasis.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 3: point(this, this._x1, this._y1); // falls through\n case 2: this._context.lineTo(this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new Basis(context);\n}\n","import noop from \"../noop.js\";\nimport {point} from \"./basis.js\";\n\nfunction BasisClosed(context) {\n this._context = context;\n}\n\nBasisClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x2, this._y2);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x2, this._y2);\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisClosed(context);\n}\n","import {point} from \"./basis.js\";\n\nfunction BasisOpen(context) {\n this._context = context;\n}\n\nBasisOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisOpen(context);\n}\n","import pointRadial from \"../pointRadial.js\";\n\nclass Bump {\n constructor(context, x) {\n this._context = context;\n this._x = x;\n }\n areaStart() {\n this._line = 0;\n }\n areaEnd() {\n this._line = NaN;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n }\n point(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: {\n this._point = 1;\n if (this._line) this._context.lineTo(x, y);\n else this._context.moveTo(x, y);\n break;\n }\n case 1: this._point = 2; // falls through\n default: {\n if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y);\n else this._context.bezierCurveTo(this._x0, this._y0 = (this._y0 + y) / 2, x, this._y0, x, y);\n break;\n }\n }\n this._x0 = x, this._y0 = y;\n }\n}\n\nclass BumpRadial {\n constructor(context) {\n this._context = context;\n }\n lineStart() {\n this._point = 0;\n }\n lineEnd() {}\n point(x, y) {\n x = +x, y = +y;\n if (this._point === 0) {\n this._point = 1;\n } else {\n const p0 = pointRadial(this._x0, this._y0);\n const p1 = pointRadial(this._x0, this._y0 = (this._y0 + y) / 2);\n const p2 = pointRadial(x, this._y0);\n const p3 = pointRadial(x, y);\n this._context.moveTo(...p0);\n this._context.bezierCurveTo(...p1, ...p2, ...p3);\n }\n this._x0 = x, this._y0 = y;\n }\n}\n\nexport function bumpX(context) {\n return new Bump(context, true);\n}\n\nexport function bumpY(context) {\n return new Bump(context, false);\n}\n\nexport function bumpRadial(context) {\n return new BumpRadial(context);\n}\n","import {Basis} from \"./basis.js\";\n\nfunction Bundle(context, beta) {\n this._basis = new Basis(context);\n this._beta = beta;\n}\n\nBundle.prototype = {\n lineStart: function() {\n this._x = [];\n this._y = [];\n this._basis.lineStart();\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n j = x.length - 1;\n\n if (j > 0) {\n var x0 = x[0],\n y0 = y[0],\n dx = x[j] - x0,\n dy = y[j] - y0,\n i = -1,\n t;\n\n while (++i <= j) {\n t = i / j;\n this._basis.point(\n this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n );\n }\n }\n\n this._x = this._y = null;\n this._basis.lineEnd();\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\nexport default (function custom(beta) {\n\n function bundle(context) {\n return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n }\n\n bundle.beta = function(beta) {\n return custom(+beta);\n };\n\n return bundle;\n})(0.85);\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import noop from \"../noop.js\";\nimport {point} from \"./cardinal.js\";\n\nexport function CardinalClosed(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalClosed(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {point} from \"./cardinal.js\";\n\nexport function CardinalOpen(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalOpen(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {epsilon} from \"../math.js\";\nimport {Cardinal} from \"./cardinal.js\";\n\nexport function point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: this.point(this._x2, this._y2); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; // falls through\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalClosed} from \"./cardinalClosed.js\";\nimport noop from \"../noop.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomClosed(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalOpen} from \"./cardinalOpen.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomOpen(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // falls through\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","import noop from \"../noop.js\";\n\nfunction LinearClosed(context) {\n this._context = context;\n}\n\nLinearClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._point) this._context.closePath();\n },\n point: function(x, y) {\n x = +x, y = +y;\n if (this._point) this._context.lineTo(x, y);\n else this._point = 1, this._context.moveTo(x, y);\n }\n};\n\nexport default function(context) {\n return new LinearClosed(context);\n}\n","function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n","function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n a[n - 1] = r[n - 1] / b[n - 1];\n for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n return [a, b];\n}\n\nexport default function(context) {\n return new Natural(context);\n}\n","import curveLinear from \"./linear.js\";\n\nexport var curveRadialLinear = curveRadial(curveLinear);\n\nfunction Radial(curve) {\n this._curve = curve;\n}\n\nRadial.prototype = {\n areaStart: function() {\n this._curve.areaStart();\n },\n areaEnd: function() {\n this._curve.areaEnd();\n },\n lineStart: function() {\n this._curve.lineStart();\n },\n lineEnd: function() {\n this._curve.lineEnd();\n },\n point: function(a, r) {\n this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n }\n};\n\nexport default function curveRadial(curve) {\n\n function radial(context) {\n return new Radial(curve(context));\n }\n\n radial._curve = curve;\n\n return radial;\n}\n","function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // falls through\n default: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\n}\n","export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","export default function(d) {\n return d;\n}\n","export {default as arc} from \"./arc.js\";\nexport {default as area} from \"./area.js\";\nexport {default as line} from \"./line.js\";\nexport {default as pie} from \"./pie.js\";\nexport {default as areaRadial, default as radialArea} from \"./areaRadial.js\"; // Note: radialArea is deprecated!\nexport {default as lineRadial, default as radialLine} from \"./lineRadial.js\"; // Note: radialLine is deprecated!\nexport {default as pointRadial} from \"./pointRadial.js\";\nexport {link, linkHorizontal, linkVertical, linkRadial} from \"./link.js\";\n\nexport {default as symbol, symbolsStroke, symbolsFill, symbolsFill as symbols} from \"./symbol.js\";\nexport {default as symbolAsterisk} from \"./symbol/asterisk.js\";\nexport {default as symbolCircle} from \"./symbol/circle.js\";\nexport {default as symbolCross} from \"./symbol/cross.js\";\nexport {default as symbolDiamond} from \"./symbol/diamond.js\";\nexport {default as symbolDiamond2} from \"./symbol/diamond2.js\";\nexport {default as symbolPlus} from \"./symbol/plus.js\";\nexport {default as symbolSquare} from \"./symbol/square.js\";\nexport {default as symbolSquare2} from \"./symbol/square2.js\";\nexport {default as symbolStar} from \"./symbol/star.js\";\nexport {default as symbolTriangle} from \"./symbol/triangle.js\";\nexport {default as symbolTriangle2} from \"./symbol/triangle2.js\";\nexport {default as symbolWye} from \"./symbol/wye.js\";\nexport {default as symbolTimes, default as symbolX} from \"./symbol/times.js\";\n\nexport {default as curveBasisClosed} from \"./curve/basisClosed.js\";\nexport {default as curveBasisOpen} from \"./curve/basisOpen.js\";\nexport {default as curveBasis} from \"./curve/basis.js\";\nexport {bumpX as curveBumpX, bumpY as curveBumpY} from \"./curve/bump.js\";\nexport {default as curveBundle} from \"./curve/bundle.js\";\nexport {default as curveCardinalClosed} from \"./curve/cardinalClosed.js\";\nexport {default as curveCardinalOpen} from \"./curve/cardinalOpen.js\";\nexport {default as curveCardinal} from \"./curve/cardinal.js\";\nexport {default as curveCatmullRomClosed} from \"./curve/catmullRomClosed.js\";\nexport {default as curveCatmullRomOpen} from \"./curve/catmullRomOpen.js\";\nexport {default as curveCatmullRom} from \"./curve/catmullRom.js\";\nexport {default as curveLinearClosed} from \"./curve/linearClosed.js\";\nexport {default as curveLinear} from \"./curve/linear.js\";\nexport {monotoneX as curveMonotoneX, monotoneY as curveMonotoneY} from \"./curve/monotone.js\";\nexport {default as curveNatural} from \"./curve/natural.js\";\nexport {default as curveStep, stepAfter as curveStepAfter, stepBefore as curveStepBefore} from \"./curve/step.js\";\n\nexport {default as stack} from \"./stack.js\";\nexport {default as stackOffsetExpand} from \"./offset/expand.js\";\nexport {default as stackOffsetDiverging} from \"./offset/diverging.js\";\nexport {default as stackOffsetNone} from \"./offset/none.js\";\nexport {default as stackOffsetSilhouette} from \"./offset/silhouette.js\";\nexport {default as stackOffsetWiggle} from \"./offset/wiggle.js\";\nexport {default as stackOrderAppearance} from \"./order/appearance.js\";\nexport {default as stackOrderAscending} from \"./order/ascending.js\";\nexport {default as stackOrderDescending} from \"./order/descending.js\";\nexport {default as stackOrderInsideOut} from \"./order/insideOut.js\";\nexport {default as stackOrderNone} from \"./order/none.js\";\nexport {default as stackOrderReverse} from \"./order/reverse.js\";\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null,\n path = withPath(line);\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n","import curveRadial, {curveRadialLinear} from \"./curve/radial.js\";\nimport line from \"./line.js\";\n\nexport function lineRadial(l) {\n var c = l.curve;\n\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n\n l.curve = function(_) {\n return arguments.length ? c(curveRadial(_)) : c()._curve;\n };\n\n return l;\n}\n\nexport default function() {\n return lineRadial(line().curve(curveRadialLinear));\n}\n","import {slice} from \"./array.js\";\nimport constant from \"./constant.js\";\nimport {bumpX, bumpY, bumpRadial} from \"./curve/bump.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nfunction linkSource(d) {\n return d.source;\n}\n\nfunction linkTarget(d) {\n return d.target;\n}\n\nexport function link(curve) {\n let source = linkSource,\n target = linkTarget,\n x = pointX,\n y = pointY,\n context = null,\n output = null,\n path = withPath(link);\n\n function link() {\n let buffer;\n const argv = slice.call(arguments);\n const s = source.apply(this, argv);\n const t = target.apply(this, argv);\n if (context == null) output = curve(buffer = path());\n output.lineStart();\n argv[0] = s, output.point(+x.apply(this, argv), +y.apply(this, argv));\n argv[0] = t, output.point(+x.apply(this, argv), +y.apply(this, argv));\n output.lineEnd();\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n link.source = function(_) {\n return arguments.length ? (source = _, link) : source;\n };\n\n link.target = function(_) {\n return arguments.length ? (target = _, link) : target;\n };\n\n link.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), link) : x;\n };\n\n link.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), link) : y;\n };\n\n link.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), link) : context;\n };\n\n return link;\n}\n\nexport function linkHorizontal() {\n return link(bumpX);\n}\n\nexport function linkVertical() {\n return link(bumpY);\n}\n\nexport function linkRadial() {\n const l = link(bumpRadial);\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n return l;\n}\n","export const abs = Math.abs;\nexport const atan2 = Math.atan2;\nexport const cos = Math.cos;\nexport const max = Math.max;\nexport const min = Math.min;\nexport const sin = Math.sin;\nexport const sqrt = Math.sqrt;\n\nexport const epsilon = 1e-12;\nexport const pi = Math.PI;\nexport const halfPi = pi / 2;\nexport const tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","export default function() {}\n","export default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {\n for (yp = yn = 0, i = 0; i < n; ++i) {\n if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) {\n d[0] = yp, d[1] = yp += dy;\n } else if (dy < 0) {\n d[1] = yn, d[0] = yn += dy;\n } else {\n d[0] = 0, d[1] = dy;\n }\n }\n }\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;\n if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;\n }\n none(series, order);\n}\n","export default function(series, order) {\n if (!((n = series.length) > 1)) return;\n for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {\n s0 = s1, s1 = series[order[i]];\n for (j = 0; j < m; ++j) {\n s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];\n }\n }\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;\n s0[j][1] += s0[j][0] = -y / 2;\n }\n none(series, order);\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n var si = series[order[i]],\n sij0 = si[j][1] || 0,\n sij1 = si[j - 1][1] || 0,\n s3 = (sij0 - sij1) / 2;\n for (var k = 0; k < i; ++k) {\n var sk = series[order[k]],\n skj0 = sk[j][1] || 0,\n skj1 = sk[j - 1][1] || 0;\n s3 += skj0 - skj1;\n }\n s1 += sij0, s2 += s3 * sij0;\n }\n s0[j - 1][1] += s0[j - 1][0] = y;\n if (s1) y -= s2 / s1;\n }\n s0[j - 1][1] += s0[j - 1][0] = y;\n none(series, order);\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n var peaks = series.map(peak);\n return none(series).sort(function(a, b) { return peaks[a] - peaks[b]; });\n}\n\nfunction peak(series) {\n var i = -1, j = 0, n = series.length, vi, vj = -Infinity;\n while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i;\n return j;\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n var sums = series.map(sum);\n return none(series).sort(function(a, b) { return sums[a] - sums[b]; });\n}\n\nexport function sum(series) {\n var s = 0, i = -1, n = series.length, v;\n while (++i < n) if (v = +series[i][1]) s += v;\n return s;\n}\n","import ascending from \"./ascending.js\";\n\nexport default function(series) {\n return ascending(series).reverse();\n}\n","import appearance from \"./appearance.js\";\nimport {sum} from \"./ascending.js\";\n\nexport default function(series) {\n var n = series.length,\n i,\n j,\n sums = series.map(sum),\n order = appearance(series),\n top = 0,\n bottom = 0,\n tops = [],\n bottoms = [];\n\n for (i = 0; i < n; ++i) {\n j = order[i];\n if (top < bottom) {\n top += sums[j];\n tops.push(j);\n } else {\n bottom += sums[j];\n bottoms.push(j);\n }\n }\n\n return bottoms.reverse().concat(tops);\n}\n","export default function(series) {\n var n = series.length, o = new Array(n);\n while (--n >= 0) o[n] = n;\n return o;\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n return none(series).reverse();\n}\n","import {Path} from \"d3-path\";\n\nexport function withPath(shape) {\n let digits = 3;\n\n shape.digits = function(_) {\n if (!arguments.length) return digits;\n if (_ == null) {\n digits = null;\n } else {\n const d = Math.floor(_);\n if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);\n digits = d;\n }\n return shape;\n };\n\n return () => new Path(digits);\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = (data = array(data)).length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","export default function(x, y) {\n return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport offsetNone from \"./offset/none.js\";\nimport orderNone from \"./order/none.js\";\n\nfunction stackValue(d, key) {\n return d[key];\n}\n\nfunction stackSeries(key) {\n const series = [];\n series.key = key;\n return series;\n}\n\nexport default function() {\n var keys = constant([]),\n order = orderNone,\n offset = offsetNone,\n value = stackValue;\n\n function stack(data) {\n var sz = Array.from(keys.apply(this, arguments), stackSeries),\n i, n = sz.length, j = -1,\n oz;\n\n for (const d of data) {\n for (i = 0, ++j; i < n; ++i) {\n (sz[i][j] = [0, +value(d, sz[i].key, j, data)]).data = d;\n }\n }\n\n for (i = 0, oz = array(order(sz)); i < n; ++i) {\n sz[oz[i]].index = i;\n }\n\n offset(sz, oz);\n return sz;\n }\n\n stack.keys = function(_) {\n return arguments.length ? (keys = typeof _ === \"function\" ? _ : constant(Array.from(_)), stack) : keys;\n };\n\n stack.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), stack) : value;\n };\n\n stack.order = function(_) {\n return arguments.length ? (order = _ == null ? orderNone : typeof _ === \"function\" ? _ : constant(Array.from(_)), stack) : order;\n };\n\n stack.offset = function(_) {\n return arguments.length ? (offset = _ == null ? offsetNone : _, stack) : offset;\n };\n\n return stack;\n}\n","import constant from \"./constant.js\";\nimport {withPath} from \"./path.js\";\nimport asterisk from \"./symbol/asterisk.js\";\nimport circle from \"./symbol/circle.js\";\nimport cross from \"./symbol/cross.js\";\nimport diamond from \"./symbol/diamond.js\";\nimport diamond2 from \"./symbol/diamond2.js\";\nimport plus from \"./symbol/plus.js\";\nimport square from \"./symbol/square.js\";\nimport square2 from \"./symbol/square2.js\";\nimport star from \"./symbol/star.js\";\nimport triangle from \"./symbol/triangle.js\";\nimport triangle2 from \"./symbol/triangle2.js\";\nimport wye from \"./symbol/wye.js\";\nimport times from \"./symbol/times.js\";\n\n// These symbols are designed to be filled.\nexport const symbolsFill = [\n circle,\n cross,\n diamond,\n square,\n star,\n triangle,\n wye\n];\n\n// These symbols are designed to be stroked (with a width of 1.5px and round caps).\nexport const symbolsStroke = [\n circle,\n plus,\n times,\n triangle2,\n asterisk,\n square2,\n diamond2\n];\n\nexport default function Symbol(type, size) {\n let context = null,\n path = withPath(symbol);\n\n type = typeof type === \"function\" ? type : constant(type || circle);\n size = typeof size === \"function\" ? size : constant(size === undefined ? 64 : +size);\n\n function symbol() {\n let buffer;\n if (!context) context = buffer = path();\n type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n symbol.type = function(_) {\n return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n };\n\n symbol.size = function(_) {\n return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n };\n\n symbol.context = function(_) {\n return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n };\n\n return symbol;\n}\n","import {min, sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n draw(context, size) {\n const r = sqrt(size + min(size / 28, 0.75)) * 0.59436;\n const t = r / 2;\n const u = t * sqrt3;\n context.moveTo(0, r);\n context.lineTo(0, -r);\n context.moveTo(-u, -t);\n context.lineTo(u, t);\n context.moveTo(-u, t);\n context.lineTo(u, -t);\n }\n};\n","import {pi, sqrt, tau} from \"../math.js\";\n\nexport default {\n draw(context, size) {\n const r = sqrt(size / pi);\n context.moveTo(r, 0);\n context.arc(0, 0, r, 0, tau);\n }\n};\n","import {sqrt} from \"../math.js\";\n\nexport default {\n draw(context, size) {\n const r = sqrt(size / 5) / 2;\n context.moveTo(-3 * r, -r);\n context.lineTo(-r, -r);\n context.lineTo(-r, -3 * r);\n context.lineTo(r, -3 * r);\n context.lineTo(r, -r);\n context.lineTo(3 * r, -r);\n context.lineTo(3 * r, r);\n context.lineTo(r, r);\n context.lineTo(r, 3 * r);\n context.lineTo(-r, 3 * r);\n context.lineTo(-r, r);\n context.lineTo(-3 * r, r);\n context.closePath();\n }\n};\n","import {sqrt} from \"../math.js\";\n\nconst tan30 = sqrt(1 / 3);\nconst tan30_2 = tan30 * 2;\n\nexport default {\n draw(context, size) {\n const y = sqrt(size / tan30_2);\n const x = y * tan30;\n context.moveTo(0, -y);\n context.lineTo(x, 0);\n context.lineTo(0, y);\n context.lineTo(-x, 0);\n context.closePath();\n }\n};\n","import {sqrt} from \"../math.js\";\n\nexport default {\n draw(context, size) {\n const r = sqrt(size) * 0.62625;\n context.moveTo(0, -r);\n context.lineTo(r, 0);\n context.lineTo(0, r);\n context.lineTo(-r, 0);\n context.closePath();\n }\n};\n","import {min, sqrt} from \"../math.js\";\n\nexport default {\n draw(context, size) {\n const r = sqrt(size - min(size / 7, 2)) * 0.87559;\n context.moveTo(-r, 0);\n context.lineTo(r, 0);\n context.moveTo(0, r);\n context.lineTo(0, -r);\n }\n};\n","import {sqrt} from \"../math.js\";\n\nexport default {\n draw(context, size) {\n const w = sqrt(size);\n const x = -w / 2;\n context.rect(x, x, w, w);\n }\n};\n","import {sqrt} from \"../math.js\";\n\nexport default {\n draw(context, size) {\n const r = sqrt(size) * 0.4431;\n context.moveTo(r, r);\n context.lineTo(r, -r);\n context.lineTo(-r, -r);\n context.lineTo(-r, r);\n context.closePath();\n }\n};\n","import {sin, cos, sqrt, pi, tau} from \"../math.js\";\n\nconst ka = 0.89081309152928522810;\nconst kr = sin(pi / 10) / sin(7 * pi / 10);\nconst kx = sin(tau / 10) * kr;\nconst ky = -cos(tau / 10) * kr;\n\nexport default {\n draw(context, size) {\n const r = sqrt(size * ka);\n const x = kx * r;\n const y = ky * r;\n context.moveTo(0, -r);\n context.lineTo(x, y);\n for (let i = 1; i < 5; ++i) {\n const a = tau * i / 5;\n const c = cos(a);\n const s = sin(a);\n context.lineTo(s * r, -c * r);\n context.lineTo(c * x - s * y, s * x + c * y);\n }\n context.closePath();\n }\n};\n","import {min, sqrt} from \"../math.js\";\n\nexport default {\n draw(context, size) {\n const r = sqrt(size - min(size / 6, 1.7)) * 0.6189;\n context.moveTo(-r, -r);\n context.lineTo(r, r);\n context.moveTo(-r, r);\n context.lineTo(r, -r);\n }\n};\n","import {sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n draw(context, size) {\n const y = -sqrt(size / (sqrt3 * 3));\n context.moveTo(0, y * 2);\n context.lineTo(-sqrt3 * y, -y);\n context.lineTo(sqrt3 * y, -y);\n context.closePath();\n }\n};\n","import {sqrt} from \"../math.js\";\n\nconst sqrt3 = sqrt(3);\n\nexport default {\n draw(context, size) {\n const s = sqrt(size) * 0.6824;\n const t = s / 2;\n const u = (s * sqrt3) / 2; // cos(Math.PI / 6)\n context.moveTo(0, -s);\n context.lineTo(u, t);\n context.lineTo(-u, t);\n context.closePath();\n }\n};\n","import {sqrt} from \"../math.js\";\n\nconst c = -0.5;\nconst s = sqrt(3) / 2;\nconst k = 1 / sqrt(12);\nconst a = (k / 2 + 1) * 3;\n\nexport default {\n draw(context, size) {\n const r = sqrt(size / a);\n const x0 = r / 2, y0 = r * k;\n const x1 = x0, y1 = r * k + r;\n const x2 = -x1, y2 = y1;\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n context.lineTo(x2, y2);\n context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n context.closePath();\n }\n};\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}\n","export {default as timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse} from \"./defaultLocale.js\";\nexport {default as timeFormatLocale} from \"./locale.js\";\nexport {default as isoFormat} from \"./isoFormat.js\";\nexport {default as isoParse} from \"./isoParse.js\";\n","import {utcFormat} from \"./defaultLocale.js\";\n\nexport var isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\nfunction formatIsoNative(date) {\n return date.toISOString();\n}\n\nvar formatIso = Date.prototype.toISOString\n ? formatIsoNative\n : utcFormat(isoSpecifier);\n\nexport default formatIso;\n","import {isoSpecifier} from \"./isoFormat.js\";\nimport {utcParse} from \"./defaultLocale.js\";\n\nfunction parseIsoNative(string) {\n var date = new Date(string);\n return isNaN(date) ? null : date;\n}\n\nvar parseIso = +new Date(\"2000-01-01T00:00:00.000Z\")\n ? parseIsoNative\n : utcParse(isoSpecifier);\n\nexport default parseIso;\n","import {\n timeDay,\n timeSunday,\n timeMonday,\n timeThursday,\n timeYear,\n utcDay,\n utcSunday,\n utcMonday,\n utcThursday,\n utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}\n","import {timeInterval} from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nexport const timeDay = timeInterval(\n date => date.setHours(0, 0, 0, 0),\n (date, step) => date.setDate(date.getDate() + step),\n (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n date => date.getDate() - 1\n);\n\nexport const timeDays = timeDay.range;\n\nexport const utcDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return date.getUTCDate() - 1;\n});\n\nexport const utcDays = utcDay.range;\n\nexport const unixDay = timeInterval((date) => {\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step);\n}, (start, end) => {\n return (end - start) / durationDay;\n}, (date) => {\n return Math.floor(date / durationDay);\n});\n\nexport const unixDays = unixDay.range;\n","export const durationSecond = 1000;\nexport const durationMinute = durationSecond * 60;\nexport const durationHour = durationMinute * 60;\nexport const durationDay = durationHour * 24;\nexport const durationWeek = durationDay * 7;\nexport const durationMonth = durationDay * 30;\nexport const durationYear = durationDay * 365;\n","import {timeInterval} from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeHour = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, (date) => {\n return date.getHours();\n});\n\nexport const timeHours = timeHour.range;\n\nexport const utcHour = timeInterval((date) => {\n date.setUTCMinutes(0, 0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationHour);\n}, (start, end) => {\n return (end - start) / durationHour;\n}, (date) => {\n return date.getUTCHours();\n});\n\nexport const utcHours = utcHour.range;\n","export {\n timeInterval\n} from \"./interval.js\";\n\nexport {\n millisecond as utcMillisecond,\n milliseconds as utcMilliseconds,\n millisecond as timeMillisecond,\n milliseconds as timeMilliseconds\n} from \"./millisecond.js\";\n\nexport {\n second as utcSecond,\n seconds as utcSeconds,\n second as timeSecond,\n seconds as timeSeconds\n} from \"./second.js\";\n\nexport {\n timeMinute,\n timeMinutes,\n utcMinute,\n utcMinutes\n} from \"./minute.js\";\n\nexport {\n timeHour,\n timeHours,\n utcHour,\n utcHours\n} from \"./hour.js\";\n\nexport {\n timeDay,\n timeDays,\n utcDay,\n utcDays,\n unixDay,\n unixDays\n} from \"./day.js\";\n\nexport {\n timeSunday as timeWeek,\n timeSundays as timeWeeks,\n timeSunday,\n timeSundays,\n timeMonday,\n timeMondays,\n timeTuesday,\n timeTuesdays,\n timeWednesday,\n timeWednesdays,\n timeThursday,\n timeThursdays,\n timeFriday,\n timeFridays,\n timeSaturday,\n timeSaturdays,\n utcSunday as utcWeek,\n utcSundays as utcWeeks,\n utcSunday,\n utcSundays,\n utcMonday,\n utcMondays,\n utcTuesday,\n utcTuesdays,\n utcWednesday,\n utcWednesdays,\n utcThursday,\n utcThursdays,\n utcFriday,\n utcFridays,\n utcSaturday,\n utcSaturdays\n} from \"./week.js\";\n\nexport {\n timeMonth,\n timeMonths,\n utcMonth,\n utcMonths\n} from \"./month.js\";\n\nexport {\n timeYear,\n timeYears,\n utcYear,\n utcYears\n} from \"./year.js\";\n\nexport {\n utcTicks,\n utcTickInterval,\n timeTicks,\n timeTickInterval\n} from \"./ticks.js\";\n","const t0 = new Date, t1 = new Date;\n\nexport function timeInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = (date) => {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = (date) => {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = (date) => {\n const d0 = interval(date), d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = (date, step) => {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = (start, stop, step) => {\n const range = [];\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n let previous;\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = (test) => {\n return timeInterval((date) => {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, (date, step) => {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = (start, end) => {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = (step) => {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? (d) => field(d) % step === 0\n : (d) => interval.count(0, d) % step === 0);\n };\n }\n\n return interval;\n}\n","import {timeInterval} from \"./interval.js\";\n\nexport const millisecond = timeInterval(() => {\n // noop\n}, (date, step) => {\n date.setTime(+date + step);\n}, (start, end) => {\n return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = (k) => {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return timeInterval((date) => {\n date.setTime(Math.floor(date / k) * k);\n }, (date, step) => {\n date.setTime(+date + step * k);\n }, (start, end) => {\n return (end - start) / k;\n });\n};\n\nexport const milliseconds = millisecond.range;\n","import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nexport const timeMinute = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, (date) => {\n return date.getMinutes();\n});\n\nexport const timeMinutes = timeMinute.range;\n\nexport const utcMinute = timeInterval((date) => {\n date.setUTCSeconds(0, 0);\n}, (date, step) => {\n date.setTime(+date + step * durationMinute);\n}, (start, end) => {\n return (end - start) / durationMinute;\n}, (date) => {\n return date.getUTCMinutes();\n});\n\nexport const utcMinutes = utcMinute.range;\n","import {timeInterval} from \"./interval.js\";\n\nexport const timeMonth = timeInterval((date) => {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setMonth(date.getMonth() + step);\n}, (start, end) => {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, (date) => {\n return date.getMonth();\n});\n\nexport const timeMonths = timeMonth.range;\n\nexport const utcMonth = timeInterval((date) => {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, (start, end) => {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, (date) => {\n return date.getUTCMonth();\n});\n\nexport const utcMonths = utcMonth.range;\n","import {timeInterval} from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nexport const second = timeInterval((date) => {\n date.setTime(date - date.getMilliseconds());\n}, (date, step) => {\n date.setTime(+date + step * durationSecond);\n}, (start, end) => {\n return (end - start) / durationSecond;\n}, (date) => {\n return date.getUTCSeconds();\n});\n\nexport const seconds = second.range;\n","import {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport {millisecond} from \"./millisecond.js\";\nimport {second} from \"./second.js\";\nimport {timeMinute, utcMinute} from \"./minute.js\";\nimport {timeHour, utcHour} from \"./hour.js\";\nimport {timeDay, unixDay} from \"./day.js\";\nimport {timeSunday, utcSunday} from \"./week.js\";\nimport {timeMonth, utcMonth} from \"./month.js\";\nimport {timeYear, utcYear} from \"./year.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n const tickIntervals = [\n [second, 1, durationSecond],\n [second, 5, 5 * durationSecond],\n [second, 15, 15 * durationSecond],\n [second, 30, 30 * durationSecond],\n [minute, 1, durationMinute],\n [minute, 5, 5 * durationMinute],\n [minute, 15, 15 * durationMinute],\n [minute, 30, 30 * durationMinute],\n [ hour, 1, durationHour ],\n [ hour, 3, 3 * durationHour ],\n [ hour, 6, 6 * durationHour ],\n [ hour, 12, 12 * durationHour ],\n [ day, 1, durationDay ],\n [ day, 2, 2 * durationDay ],\n [ week, 1, durationWeek ],\n [ month, 1, durationMonth ],\n [ month, 3, 3 * durationMonth ],\n [ year, 1, durationYear ]\n ];\n\n function ticks(start, stop, count) {\n const reverse = stop < start;\n if (reverse) [start, stop] = [stop, start];\n const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n return reverse ? ticks.reverse() : ticks;\n }\n\n function tickInterval(start, stop, count) {\n const target = Math.abs(stop - start) / count;\n const i = bisector(([,, step]) => step).right(tickIntervals, target);\n if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n return t.every(step);\n }\n\n return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n","import {timeInterval} from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction timeWeekday(i) {\n return timeInterval((date) => {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setDate(date.getDate() + step * 7);\n }, (start, end) => {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport const timeSunday = timeWeekday(0);\nexport const timeMonday = timeWeekday(1);\nexport const timeTuesday = timeWeekday(2);\nexport const timeWednesday = timeWeekday(3);\nexport const timeThursday = timeWeekday(4);\nexport const timeFriday = timeWeekday(5);\nexport const timeSaturday = timeWeekday(6);\n\nexport const timeSundays = timeSunday.range;\nexport const timeMondays = timeMonday.range;\nexport const timeTuesdays = timeTuesday.range;\nexport const timeWednesdays = timeWednesday.range;\nexport const timeThursdays = timeThursday.range;\nexport const timeFridays = timeFriday.range;\nexport const timeSaturdays = timeSaturday.range;\n\nfunction utcWeekday(i) {\n return timeInterval((date) => {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, (start, end) => {\n return (end - start) / durationWeek;\n });\n}\n\nexport const utcSunday = utcWeekday(0);\nexport const utcMonday = utcWeekday(1);\nexport const utcTuesday = utcWeekday(2);\nexport const utcWednesday = utcWeekday(3);\nexport const utcThursday = utcWeekday(4);\nexport const utcFriday = utcWeekday(5);\nexport const utcSaturday = utcWeekday(6);\n\nexport const utcSundays = utcSunday.range;\nexport const utcMondays = utcMonday.range;\nexport const utcTuesdays = utcTuesday.range;\nexport const utcWednesdays = utcWednesday.range;\nexport const utcThursdays = utcThursday.range;\nexport const utcFridays = utcFriday.range;\nexport const utcSaturdays = utcSaturday.range;\n","import {timeInterval} from \"./interval.js\";\n\nexport const timeYear = timeInterval((date) => {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setFullYear(date.getFullYear() + step);\n}, (start, end) => {\n return end.getFullYear() - start.getFullYear();\n}, (date) => {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\ntimeYear.every = (k) => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport const timeYears = timeYear.range;\n\nexport const utcYear = timeInterval((date) => {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, (start, end) => {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, (date) => {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = (k) => {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, (date, step) => {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport const utcYears = utcYear.range;\n","export {\n now,\n timer,\n timerFlush\n} from \"./timer.js\";\n\nexport {\n default as timeout\n} from \"./timeout.js\";\n\nexport {\n default as interval\n} from \"./interval.js\";\n","import {Timer, now} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer, total = delay;\n if (delay == null) return t.restart(callback, delay, time), t;\n t._restart = t.restart;\n t.restart = function(callback, delay, time) {\n delay = +delay, time = time == null ? now() : +time;\n t._restart(function tick(elapsed) {\n elapsed += total;\n t._restart(tick, total += delay, time);\n callback(elapsed);\n }, delay, time);\n }\n t.restart(callback, delay, time);\n return t;\n}\n","import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer;\n delay = delay == null ? 0 : +delay;\n t.restart(elapsed => {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}\n","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n","import {Transition} from \"./transition/index.js\";\nimport {SCHEDULED} from \"./transition/schedule.js\";\n\nvar root = [null];\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n i;\n\n if (schedules) {\n name = name == null ? null : name + \"\";\n for (i in schedules) {\n if ((schedule = schedules[i]).state > SCHEDULED && schedule.name === name) {\n return new Transition([[node]], root, name, +i);\n }\n }\n }\n\n return null;\n}\n","import \"./selection/index.js\";\nexport {default as transition} from \"./transition/index.js\";\nexport {default as active} from \"./active.js\";\nexport {default as interrupt} from \"./interrupt.js\";\n","import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n active,\n empty = true,\n i;\n\n if (!schedules) return;\n\n name = name == null ? null : name + \"\";\n\n for (i in schedules) {\n if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n active = schedule.state > STARTING && schedule.state < ENDING;\n schedule.state = ENDED;\n schedule.timer.stop();\n schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n delete schedules[i];\n }\n\n if (empty) delete node.__transition;\n}\n","import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n","import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n return this.each(function() {\n interrupt(this, name);\n });\n}\n","import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n time: null, // Set on use.\n delay: 0,\n duration: 250,\n ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n var timing;\n while (!(timing = node.__transition) || !(timing = timing[id])) {\n if (!(node = node.parentNode)) {\n throw new Error(`transition ${id} not found`);\n }\n }\n return timing;\n}\n\nexport default function(name) {\n var id,\n timing;\n\n if (name instanceof Transition) {\n id = name._id, name = name._name;\n } else {\n id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id, i, group, timing || inherit(node, id));\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id);\n}\n","import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n return this.attrTween(name, typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n","import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n return function(t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n return function(t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\n\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nfunction attrTween(name, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n","import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n return function() {\n init(this, id).delay = +value.apply(this, arguments);\n };\n}\n\nfunction delayConstant(id, value) {\n return value = +value, function() {\n init(this, id).delay = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? delayFunction\n : delayConstant)(id, value))\n : get(this.node(), id).delay;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n return function() {\n set(this, id).duration = +value.apply(this, arguments);\n };\n}\n\nfunction durationConstant(id, value) {\n return value = +value, function() {\n set(this, id).duration = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? durationFunction\n : durationConstant)(id, value))\n : get(this.node(), id).duration;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n if (typeof value !== \"function\") throw new Error;\n return function() {\n set(this, id).ease = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each(easeConstant(id, value))\n : get(this.node(), id).ease;\n}\n","import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (typeof v !== \"function\") throw new Error;\n set(this, id).ease = v;\n };\n}\n\nexport default function(value) {\n if (typeof value !== \"function\") throw new Error;\n return this.each(easeVarying(this._id, value));\n}\n","import {set} from \"./schedule.js\";\n\nexport default function() {\n var on0, on1, that = this, id = that._id, size = that.size();\n return new Promise(function(resolve, reject) {\n var cancel = {value: reject},\n end = {value: function() { if (--size === 0) resolve(); }};\n\n that.each(function() {\n var schedule = set(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) {\n on1 = (on0 = on).copy();\n on1._.cancel.push(cancel);\n on1._.interrupt.push(cancel);\n on1._.end.push(end);\n }\n\n schedule.on = on1;\n });\n\n // The selection was empty, resolve end immediately\n if (size === 0) resolve();\n });\n}\n","import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Transition(subgroups, this._parents, this._name, this._id);\n}\n","import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id;\n}\n\nexport default function transition(name) {\n return selection().transition(name);\n}\n\nexport function newId() {\n return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n selectChild: selection_prototype.selectChild,\n selectChildren: selection_prototype.selectChildren,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n easeVarying: transition_easeVarying,\n end: transition_end,\n [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n","import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber\n : b instanceof color ? interpolateRgb\n : (c = color(b)) ? (b = c, interpolateRgb)\n : interpolateString)(a, b);\n}\n","import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n if (transition._id !== this._id) throw new Error;\n\n 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) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Transition(merges, this._parents, this._name, this._id);\n}\n","import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n var i = t.indexOf(\".\");\n if (i >= 0) t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\n\nfunction onFunction(id, name, listener) {\n var on0, on1, sit = start(name) ? init : set;\n return function() {\n var schedule = sit(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, listener) {\n var id = this._id;\n\n return arguments.length < 2\n ? get(this.node(), id).on.on(name)\n : this.each(onFunction(id, name, listener));\n}\n","function removeFunction(id) {\n return function() {\n var parent = this.parentNode;\n for (var i in this.__transition) if (+i !== id) return;\n if (parent) parent.removeChild(this);\n };\n}\n\nexport default function() {\n return this.on(\"end.remove\", removeFunction(this._id));\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules) node.__transition = {};\n else if (id in schedules) return;\n create(node, id, {\n name: name,\n index: index, // For context during callback.\n group: group, // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\n\nexport function init(node, id) {\n var schedule = get(node, id);\n if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n return schedule;\n}\n\nexport function set(node, id) {\n var schedule = get(node, id);\n if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n return schedule;\n}\n\nexport function get(node, id) {\n var schedule = node.__transition;\n if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n return schedule;\n}\n\nfunction create(node, id, self) {\n var schedules = node.__transition,\n tween;\n\n // Initialize the self timer when the transition is created.\n // Note the actual delay is not known until the first callback!\n schedules[id] = self;\n self.timer = timer(schedule, 0, self.time);\n\n function schedule(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start, self.delay, self.time);\n\n // If the elapsed delay is less than our first sleep, start immediately.\n if (self.delay <= elapsed) start(elapsed - self.delay);\n }\n\n function start(elapsed) {\n var i, j, n, o;\n\n // If the state is not SCHEDULED, then we previously errored on start.\n if (self.state !== SCHEDULED) return stop();\n\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name) continue;\n\n // While this element already has a starting transition during this frame,\n // defer starting an interrupting transition until that transition has a\n // chance to tick (and possibly end); see d3/d3-transition#54!\n if (o.state === STARTED) return timeout(start);\n\n // Interrupt the active transition, if any.\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n\n // Cancel any pre-empted transitions.\n else if (+i < id) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n }\n\n // Defer the first tick to end of the current frame; see d3/d3#1576.\n // Note the transition may be canceled after start and before the first tick!\n // Note this must be scheduled before the start event; see d3/d3-transition#16!\n // Assuming this is successful, subsequent callbacks go straight to tick.\n timeout(function() {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n });\n\n // Dispatch the start event.\n // Note this must be done before the tween are initialized.\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING) return; // interrupted\n self.state = STARTED;\n\n // Initialize the tween, deleting null tween.\n tween = new Array(n = self.tween.length);\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n tween.length = j + 1;\n }\n\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n i = -1,\n n = tween.length;\n\n while (++i < n) {\n tween[i].call(node, t);\n }\n\n // Dispatch the end event.\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id];\n for (var i in schedules) return; // eslint-disable-line no-unused-vars\n delete node.__transition;\n }\n}\n","import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n }\n }\n }\n\n return new Transition(subgroups, this._parents, name, id);\n}\n","import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n if (child = children[k]) {\n schedule(child, name, id, k, children, inherit);\n }\n }\n subgroups.push(children);\n parents.push(node);\n }\n }\n }\n\n return new Transition(subgroups, parents, name, id);\n}\n","import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n return new Selection(this._groups, this._parents);\n}\n","import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n string1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, string10 = string1);\n };\n}\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = style(this, name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction styleFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n value1 = value(this),\n string1 = value1 + \"\";\n if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction styleMaybeRemove(id, name) {\n var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n return function() {\n var schedule = set(this, id),\n on = schedule.on,\n listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n return value == null ? this\n .styleTween(name, styleNull(name, i))\n .on(\"end.style.\" + name, styleRemove(name))\n : typeof value === \"function\" ? this\n .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n .each(styleMaybeRemove(this._id, name))\n : this\n .styleTween(name, styleConstant(name, i, value), priority)\n .on(\"end.style.\" + name, null);\n}\n","function styleInterpolate(name, i, priority) {\n return function(t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\n\nfunction styleTween(name, value, priority) {\n var t, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n","import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\n\nexport default function(value) {\n return this.tween(\"text\", typeof value === \"function\"\n ? textFunction(tweenValue(this, \"text\", value))\n : textConstant(value == null ? \"\" : value + \"\"));\n}\n","function textInterpolate(i) {\n return function(t) {\n this.textContent = i.call(this, t);\n };\n}\n\nfunction textTween(value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(value) {\n var key = \"text\";\n if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, textTween(value));\n}\n","import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n var name = this._name,\n id0 = this._id,\n id1 = newId();\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit.time + inherit.delay + inherit.duration,\n delay: 0,\n duration: inherit.duration,\n ease: inherit.ease\n });\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id1);\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n var tween0, tween1;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n\n schedule.tween = tween1;\n };\n}\n\nfunction tweenFunction(id, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\") throw new Error;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n if (i === n) tween1.push(t);\n }\n\n schedule.tween = tween1;\n };\n}\n\nexport default function(name, value) {\n var id = this._id;\n\n name += \"\";\n\n if (arguments.length < 2) {\n var tween = get(this.node(), id).tween;\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n return null;\n }\n\n return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n var id = transition._id;\n\n transition.each(function() {\n var schedule = set(this, id);\n (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n });\n\n return function(node) {\n return get(node, id).value[name];\n };\n}\n","export default x => () => x;\n","export default function ZoomEvent(type, {\n sourceEvent,\n target,\n transform,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n transform: {value: transform, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n","export {default as zoom} from \"./zoom.js\";\nexport {default as zoomTransform, identity as zoomIdentity, Transform as ZoomTransform} from \"./transform.js\";\n","export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","export function Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}\n\nTransform.prototype = {\n constructor: Transform,\n scale: function(k) {\n return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n },\n translate: function(x, y) {\n return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n },\n apply: function(point) {\n return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n },\n applyX: function(x) {\n return x * this.k + this.x;\n },\n applyY: function(y) {\n return y * this.k + this.y;\n },\n invert: function(location) {\n return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n },\n invertX: function(x) {\n return (x - this.x) / this.k;\n },\n invertY: function(y) {\n return (y - this.y) / this.k;\n },\n rescaleX: function(x) {\n return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n },\n rescaleY: function(y) {\n return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n return node.__zoom;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolateZoom} from \"d3-interpolate\";\nimport {select, pointer} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport ZoomEvent from \"./event.js\";\nimport {Transform, identity} from \"./transform.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\n// Ignore right-click, since that should open the context menu.\n// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event\nfunction defaultFilter(event) {\n return (!event.ctrlKey || event.type === 'wheel') && !event.button;\n}\n\nfunction defaultExtent() {\n var e = this;\n if (e instanceof SVGElement) {\n e = e.ownerSVGElement || e;\n if (e.hasAttribute(\"viewBox\")) {\n e = e.viewBox.baseVal;\n return [[e.x, e.y], [e.x + e.width, e.y + e.height]];\n }\n return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];\n }\n return [[0, 0], [e.clientWidth, e.clientHeight]];\n}\n\nfunction defaultTransform() {\n return this.__zoom || identity;\n}\n\nfunction defaultWheelDelta(event) {\n return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1);\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n return transform.translate(\n dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n );\n}\n\nexport default function() {\n var filter = defaultFilter,\n extent = defaultExtent,\n constrain = defaultConstrain,\n wheelDelta = defaultWheelDelta,\n touchable = defaultTouchable,\n scaleExtent = [0, Infinity],\n translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n duration = 250,\n interpolate = interpolateZoom,\n listeners = dispatch(\"start\", \"zoom\", \"end\"),\n touchstarting,\n touchfirst,\n touchending,\n touchDelay = 500,\n wheelDelay = 150,\n clickDistance2 = 0,\n tapDistance = 10;\n\n function zoom(selection) {\n selection\n .property(\"__zoom\", defaultTransform)\n .on(\"wheel.zoom\", wheeled, {passive: false})\n .on(\"mousedown.zoom\", mousedowned)\n .on(\"dblclick.zoom\", dblclicked)\n .filter(touchable)\n .on(\"touchstart.zoom\", touchstarted)\n .on(\"touchmove.zoom\", touchmoved)\n .on(\"touchend.zoom touchcancel.zoom\", touchended)\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n zoom.transform = function(collection, transform, point, event) {\n var selection = collection.selection ? collection.selection() : collection;\n selection.property(\"__zoom\", defaultTransform);\n if (collection !== selection) {\n schedule(collection, transform, point, event);\n } else {\n selection.interrupt().each(function() {\n gesture(this, arguments)\n .event(event)\n .start()\n .zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform)\n .end();\n });\n }\n };\n\n zoom.scaleBy = function(selection, k, p, event) {\n zoom.scaleTo(selection, function() {\n var k0 = this.__zoom.k,\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return k0 * k1;\n }, p, event);\n };\n\n zoom.scaleTo = function(selection, k, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t0 = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p,\n p1 = t0.invert(p0),\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n }, p, event);\n };\n\n zoom.translateBy = function(selection, x, y, event) {\n zoom.transform(selection, function() {\n return constrain(this.__zoom.translate(\n typeof x === \"function\" ? x.apply(this, arguments) : x,\n typeof y === \"function\" ? y.apply(this, arguments) : y\n ), extent.apply(this, arguments), translateExtent);\n }, null, event);\n };\n\n zoom.translateTo = function(selection, x, y, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p;\n return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(\n typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n typeof y === \"function\" ? -y.apply(this, arguments) : -y\n ), e, translateExtent);\n }, p, event);\n };\n\n function scale(transform, k) {\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n return k === transform.k ? transform : new Transform(k, transform.x, transform.y);\n }\n\n function translate(transform, p0, p1) {\n var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);\n }\n\n function centroid(extent) {\n return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n }\n\n function schedule(transition, transform, point, event) {\n transition\n .on(\"start.zoom\", function() { gesture(this, arguments).event(event).start(); })\n .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).event(event).end(); })\n .tween(\"zoom\", function() {\n var that = this,\n args = arguments,\n g = gesture(that, args).event(event),\n e = extent.apply(that, args),\n p = point == null ? centroid(e) : typeof point === \"function\" ? point.apply(that, args) : point,\n w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n a = that.__zoom,\n b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n return function(t) {\n if (t === 1) t = b; // Avoid rounding error on end.\n else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); }\n g.zoom(null, t);\n };\n });\n }\n\n function gesture(that, args, clean) {\n return (!clean && that.__zooming) || new Gesture(that, args);\n }\n\n function Gesture(that, args) {\n this.that = that;\n this.args = args;\n this.active = 0;\n this.sourceEvent = null;\n this.extent = extent.apply(that, args);\n this.taps = 0;\n }\n\n Gesture.prototype = {\n event: function(event) {\n if (event) this.sourceEvent = event;\n return this;\n },\n start: function() {\n if (++this.active === 1) {\n this.that.__zooming = this;\n this.emit(\"start\");\n }\n return this;\n },\n zoom: function(key, transform) {\n if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n this.that.__zoom = transform;\n this.emit(\"zoom\");\n return this;\n },\n end: function() {\n if (--this.active === 0) {\n delete this.that.__zooming;\n this.emit(\"end\");\n }\n return this;\n },\n emit: function(type) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new ZoomEvent(type, {\n sourceEvent: this.sourceEvent,\n target: zoom,\n type,\n transform: this.that.__zoom,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function wheeled(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var g = gesture(this, args).event(event),\n t = this.__zoom,\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n p = pointer(event);\n\n // If the mouse is in the same location as before, reuse it.\n // If there were recent wheel events, reset the wheel idle timeout.\n if (g.wheel) {\n if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n g.mouse[1] = t.invert(g.mouse[0] = p);\n }\n clearTimeout(g.wheel);\n }\n\n // If this wheel event won’t trigger a transform change, ignore it.\n else if (t.k === k) return;\n\n // Otherwise, capture the mouse point and location at the start.\n else {\n g.mouse = [p, t.invert(p)];\n interrupt(this);\n g.start();\n }\n\n noevent(event);\n g.wheel = setTimeout(wheelidled, wheelDelay);\n g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n function wheelidled() {\n g.wheel = null;\n g.end();\n }\n }\n\n function mousedowned(event, ...args) {\n if (touchending || !filter.apply(this, arguments)) return;\n var currentTarget = event.currentTarget,\n g = gesture(this, args, true).event(event),\n v = select(event.view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n p = pointer(event, currentTarget),\n x0 = event.clientX,\n y0 = event.clientY;\n\n dragDisable(event.view);\n nopropagation(event);\n g.mouse = [p, this.__zoom.invert(p)];\n interrupt(this);\n g.start();\n\n function mousemoved(event) {\n noevent(event);\n if (!g.moved) {\n var dx = event.clientX - x0, dy = event.clientY - y0;\n g.moved = dx * dx + dy * dy > clickDistance2;\n }\n g.event(event)\n .zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent));\n }\n\n function mouseupped(event) {\n v.on(\"mousemove.zoom mouseup.zoom\", null);\n dragEnable(event.view, g.moved);\n noevent(event);\n g.event(event).end();\n }\n }\n\n function dblclicked(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var t0 = this.__zoom,\n p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this),\n p1 = t0.invert(p0),\n k1 = t0.k * (event.shiftKey ? 0.5 : 2),\n t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);\n\n noevent(event);\n if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0, event);\n else select(this).call(zoom.transform, t1, p0, event);\n }\n\n function touchstarted(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var touches = event.touches,\n n = touches.length,\n g = gesture(this, args, event.changedTouches.length === n).event(event),\n started, i, t, p;\n\n nopropagation(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n p = [p, this.__zoom.invert(p), t.identifier];\n if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;\n else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;\n }\n\n if (touchstarting) touchstarting = clearTimeout(touchstarting);\n\n if (started) {\n if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n interrupt(this);\n g.start();\n }\n }\n\n function touchmoved(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t, p, l;\n\n noevent(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;\n else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n }\n t = g.that.__zoom;\n if (g.touch1) {\n var p0 = g.touch0[0], l0 = g.touch0[1],\n p1 = g.touch1[0], l1 = g.touch1[1],\n dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n t = scale(t, Math.sqrt(dp / dl));\n p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n }\n else if (g.touch0) p = g.touch0[0], l = g.touch0[1];\n else return;\n\n g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n }\n\n function touchended(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t;\n\n nopropagation(event);\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, touchDelay);\n for (i = 0; i < n; ++i) {\n t = touches[i];\n if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;\n else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n }\n if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n else {\n g.end();\n // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.\n if (g.taps === 2) {\n t = pointer(t, this);\n if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {\n var p = select(this).on(\"dblclick.zoom\");\n if (p) p.apply(this, arguments);\n }\n }\n }\n }\n\n zoom.wheelDelta = function(_) {\n return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : constant(+_), zoom) : wheelDelta;\n };\n\n zoom.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), zoom) : filter;\n };\n\n zoom.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), zoom) : touchable;\n };\n\n zoom.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n };\n\n zoom.scaleExtent = function(_) {\n return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n };\n\n zoom.translateExtent = function(_) {\n 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]]];\n };\n\n zoom.constrain = function(_) {\n return arguments.length ? (constrain = _, zoom) : constrain;\n };\n\n zoom.duration = function(_) {\n return arguments.length ? (duration = +_, zoom) : duration;\n };\n\n zoom.interpolate = function(_) {\n return arguments.length ? (interpolate = _, zoom) : interpolate;\n };\n\n zoom.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? zoom : value;\n };\n\n zoom.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n };\n\n zoom.tapDistance = function(_) {\n return arguments.length ? (tapDistance = +_, zoom) : tapDistance;\n };\n\n return zoom;\n}\n","export * from \"d3-array\";\nexport * from \"d3-axis\";\nexport * from \"d3-brush\";\nexport * from \"d3-chord\";\nexport * from \"d3-color\";\nexport * from \"d3-contour\";\nexport * from \"d3-delaunay\";\nexport * from \"d3-dispatch\";\nexport * from \"d3-drag\";\nexport * from \"d3-dsv\";\nexport * from \"d3-ease\";\nexport * from \"d3-fetch\";\nexport * from \"d3-force\";\nexport * from \"d3-format\";\nexport * from \"d3-geo\";\nexport * from \"d3-hierarchy\";\nexport * from \"d3-interpolate\";\nexport * from \"d3-path\";\nexport * from \"d3-polygon\";\nexport * from \"d3-quadtree\";\nexport * from \"d3-random\";\nexport * from \"d3-scale\";\nexport * from \"d3-scale-chromatic\";\nexport * from \"d3-selection\";\nexport * from \"d3-shape\";\nexport * from \"d3-time\";\nexport * from \"d3-time-format\";\nexport * from \"d3-timer\";\nexport * from \"d3-transition\";\nexport * from \"d3-zoom\";\n","\nconst EPSILON = Math.pow(2, -52);\nconst EDGE_STACK = new Uint32Array(512);\n\nimport {orient2d} from 'robust-predicates';\n\nexport default class Delaunator {\n\n static from(points, getX = defaultGetX, getY = defaultGetY) {\n const n = points.length;\n const coords = new Float64Array(n * 2);\n\n for (let i = 0; i < n; i++) {\n const p = points[i];\n coords[2 * i] = getX(p);\n coords[2 * i + 1] = getY(p);\n }\n\n return new Delaunator(coords);\n }\n\n constructor(coords) {\n const n = coords.length >> 1;\n if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.');\n\n this.coords = coords;\n\n // arrays that will store the triangulation graph\n const maxTriangles = Math.max(2 * n - 5, 0);\n this._triangles = new Uint32Array(maxTriangles * 3);\n this._halfedges = new Int32Array(maxTriangles * 3);\n\n // temporary arrays for tracking the edges of the advancing convex hull\n this._hashSize = Math.ceil(Math.sqrt(n));\n this._hullPrev = new Uint32Array(n); // edge to prev edge\n this._hullNext = new Uint32Array(n); // edge to next edge\n this._hullTri = new Uint32Array(n); // edge to adjacent triangle\n this._hullHash = new Int32Array(this._hashSize); // angular edge hash\n\n // temporary arrays for sorting points\n this._ids = new Uint32Array(n);\n this._dists = new Float64Array(n);\n\n this.update();\n }\n\n update() {\n const {coords, _hullPrev: hullPrev, _hullNext: hullNext, _hullTri: hullTri, _hullHash: hullHash} = this;\n const n = coords.length >> 1;\n\n // populate an array of point indices; calculate input data bbox\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n\n for (let i = 0; i < n; i++) {\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n this._ids[i] = i;\n }\n const cx = (minX + maxX) / 2;\n const cy = (minY + maxY) / 2;\n\n let i0, i1, i2;\n\n // pick a seed point close to the center\n for (let i = 0, minDist = Infinity; i < n; i++) {\n const d = dist(cx, cy, coords[2 * i], coords[2 * i + 1]);\n if (d < minDist) {\n i0 = i;\n minDist = d;\n }\n }\n const i0x = coords[2 * i0];\n const i0y = coords[2 * i0 + 1];\n\n // find the point closest to the seed\n for (let i = 0, minDist = Infinity; i < n; i++) {\n if (i === i0) continue;\n const d = dist(i0x, i0y, coords[2 * i], coords[2 * i + 1]);\n if (d < minDist && d > 0) {\n i1 = i;\n minDist = d;\n }\n }\n let i1x = coords[2 * i1];\n let i1y = coords[2 * i1 + 1];\n\n let minRadius = Infinity;\n\n // find the third point which forms the smallest circumcircle with the first two\n for (let i = 0; i < n; i++) {\n if (i === i0 || i === i1) continue;\n const r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i], coords[2 * i + 1]);\n if (r < minRadius) {\n i2 = i;\n minRadius = r;\n }\n }\n let i2x = coords[2 * i2];\n let i2y = coords[2 * i2 + 1];\n\n if (minRadius === Infinity) {\n // order collinear points by dx (or dy if all x are identical)\n // and return the list as a hull\n for (let i = 0; i < n; i++) {\n this._dists[i] = (coords[2 * i] - coords[0]) || (coords[2 * i + 1] - coords[1]);\n }\n quicksort(this._ids, this._dists, 0, n - 1);\n const hull = new Uint32Array(n);\n let j = 0;\n for (let i = 0, d0 = -Infinity; i < n; i++) {\n const id = this._ids[i];\n const d = this._dists[id];\n if (d > d0) {\n hull[j++] = id;\n d0 = d;\n }\n }\n this.hull = hull.subarray(0, j);\n this.triangles = new Uint32Array(0);\n this.halfedges = new Uint32Array(0);\n return;\n }\n\n // swap the order of the seed points for counter-clockwise orientation\n if (orient2d(i0x, i0y, i1x, i1y, i2x, i2y) < 0) {\n const i = i1;\n const x = i1x;\n const y = i1y;\n i1 = i2;\n i1x = i2x;\n i1y = i2y;\n i2 = i;\n i2x = x;\n i2y = y;\n }\n\n const center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y);\n this._cx = center.x;\n this._cy = center.y;\n\n for (let i = 0; i < n; i++) {\n this._dists[i] = dist(coords[2 * i], coords[2 * i + 1], center.x, center.y);\n }\n\n // sort the points by distance from the seed triangle circumcenter\n quicksort(this._ids, this._dists, 0, n - 1);\n\n // set up the seed triangle as the starting hull\n this._hullStart = i0;\n let hullSize = 3;\n\n hullNext[i0] = hullPrev[i2] = i1;\n hullNext[i1] = hullPrev[i0] = i2;\n hullNext[i2] = hullPrev[i1] = i0;\n\n hullTri[i0] = 0;\n hullTri[i1] = 1;\n hullTri[i2] = 2;\n\n hullHash.fill(-1);\n hullHash[this._hashKey(i0x, i0y)] = i0;\n hullHash[this._hashKey(i1x, i1y)] = i1;\n hullHash[this._hashKey(i2x, i2y)] = i2;\n\n this.trianglesLen = 0;\n this._addTriangle(i0, i1, i2, -1, -1, -1);\n\n for (let k = 0, xp, yp; k < this._ids.length; k++) {\n const i = this._ids[k];\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n\n // skip near-duplicate points\n if (k > 0 && Math.abs(x - xp) <= EPSILON && Math.abs(y - yp) <= EPSILON) continue;\n xp = x;\n yp = y;\n\n // skip seed triangle points\n if (i === i0 || i === i1 || i === i2) continue;\n\n // find a visible edge on the convex hull using edge hash\n let start = 0;\n for (let j = 0, key = this._hashKey(x, y); j < this._hashSize; j++) {\n start = hullHash[(key + j) % this._hashSize];\n if (start !== -1 && start !== hullNext[start]) break;\n }\n\n start = hullPrev[start];\n let e = start, q;\n while (q = hullNext[e], orient2d(x, y, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1]) >= 0) {\n e = q;\n if (e === start) {\n e = -1;\n break;\n }\n }\n if (e === -1) continue; // likely a near-duplicate point; skip it\n\n // add the first triangle from the point\n let t = this._addTriangle(e, i, hullNext[e], -1, -1, hullTri[e]);\n\n // recursively flip triangles from the point until they satisfy the Delaunay condition\n hullTri[i] = this._legalize(t + 2);\n hullTri[e] = t; // keep track of boundary triangles on the hull\n hullSize++;\n\n // walk forward through the hull, adding more triangles and flipping recursively\n let n = hullNext[e];\n while (q = hullNext[n], orient2d(x, y, coords[2 * n], coords[2 * n + 1], coords[2 * q], coords[2 * q + 1]) < 0) {\n t = this._addTriangle(n, i, q, hullTri[i], -1, hullTri[n]);\n hullTri[i] = this._legalize(t + 2);\n hullNext[n] = n; // mark as removed\n hullSize--;\n n = q;\n }\n\n // walk backward from the other side, adding more triangles and flipping\n if (e === start) {\n while (q = hullPrev[e], orient2d(x, y, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1]) < 0) {\n t = this._addTriangle(q, i, e, -1, hullTri[e], hullTri[q]);\n this._legalize(t + 2);\n hullTri[q] = t;\n hullNext[e] = e; // mark as removed\n hullSize--;\n e = q;\n }\n }\n\n // update the hull indices\n this._hullStart = hullPrev[i] = e;\n hullNext[e] = hullPrev[n] = i;\n hullNext[i] = n;\n\n // save the two new edges in the hash table\n hullHash[this._hashKey(x, y)] = i;\n hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e;\n }\n\n this.hull = new Uint32Array(hullSize);\n for (let i = 0, e = this._hullStart; i < hullSize; i++) {\n this.hull[i] = e;\n e = hullNext[e];\n }\n\n // trim typed triangle mesh arrays\n this.triangles = this._triangles.subarray(0, this.trianglesLen);\n this.halfedges = this._halfedges.subarray(0, this.trianglesLen);\n }\n\n _hashKey(x, y) {\n return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize;\n }\n\n _legalize(a) {\n const {_triangles: triangles, _halfedges: halfedges, coords} = this;\n\n let i = 0;\n let ar = 0;\n\n // recursion eliminated with a fixed-size stack\n while (true) {\n const b = halfedges[a];\n\n /* if the pair of triangles doesn't satisfy the Delaunay condition\n * (p1 is inside the circumcircle of [p0, pl, pr]), flip them,\n * then do the same check/flip recursively for the new pair of triangles\n *\n * pl pl\n * /||\\ / \\\n * al/ || \\bl al/ \\a\n * / || \\ / \\\n * / a||b \\ flip /___ar___\\\n * p0\\ || /p1 => p0\\---bl---/p1\n * \\ || / \\ /\n * ar\\ || /br b\\ /br\n * \\||/ \\ /\n * pr pr\n */\n const a0 = a - a % 3;\n ar = a0 + (a + 2) % 3;\n\n if (b === -1) { // convex hull edge\n if (i === 0) break;\n a = EDGE_STACK[--i];\n continue;\n }\n\n const b0 = b - b % 3;\n const al = a0 + (a + 1) % 3;\n const bl = b0 + (b + 2) % 3;\n\n const p0 = triangles[ar];\n const pr = triangles[a];\n const pl = triangles[al];\n const p1 = triangles[bl];\n\n const illegal = inCircle(\n coords[2 * p0], coords[2 * p0 + 1],\n coords[2 * pr], coords[2 * pr + 1],\n coords[2 * pl], coords[2 * pl + 1],\n coords[2 * p1], coords[2 * p1 + 1]);\n\n if (illegal) {\n triangles[a] = p1;\n triangles[b] = p0;\n\n const hbl = halfedges[bl];\n\n // edge swapped on the other side of the hull (rare); fix the halfedge reference\n if (hbl === -1) {\n let e = this._hullStart;\n do {\n if (this._hullTri[e] === bl) {\n this._hullTri[e] = a;\n break;\n }\n e = this._hullPrev[e];\n } while (e !== this._hullStart);\n }\n this._link(a, hbl);\n this._link(b, halfedges[ar]);\n this._link(ar, bl);\n\n const br = b0 + (b + 1) % 3;\n\n // don't worry about hitting the cap: it can only happen on extremely degenerate input\n if (i < EDGE_STACK.length) {\n EDGE_STACK[i++] = br;\n }\n } else {\n if (i === 0) break;\n a = EDGE_STACK[--i];\n }\n }\n\n return ar;\n }\n\n _link(a, b) {\n this._halfedges[a] = b;\n if (b !== -1) this._halfedges[b] = a;\n }\n\n // add a new triangle given vertex indices and adjacent half-edge ids\n _addTriangle(i0, i1, i2, a, b, c) {\n const t = this.trianglesLen;\n\n this._triangles[t] = i0;\n this._triangles[t + 1] = i1;\n this._triangles[t + 2] = i2;\n\n this._link(t, a);\n this._link(t + 1, b);\n this._link(t + 2, c);\n\n this.trianglesLen += 3;\n\n return t;\n }\n}\n\n// monotonically increases with real angle, but doesn't need expensive trigonometry\nfunction pseudoAngle(dx, dy) {\n const p = dx / (Math.abs(dx) + Math.abs(dy));\n return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1]\n}\n\nfunction dist(ax, ay, bx, by) {\n const dx = ax - bx;\n const dy = ay - by;\n return dx * dx + dy * dy;\n}\n\nfunction inCircle(ax, ay, bx, by, cx, cy, px, py) {\n const dx = ax - px;\n const dy = ay - py;\n const ex = bx - px;\n const ey = by - py;\n const fx = cx - px;\n const fy = cy - py;\n\n const ap = dx * dx + dy * dy;\n const bp = ex * ex + ey * ey;\n const cp = fx * fx + fy * fy;\n\n return dx * (ey * cp - bp * fy) -\n dy * (ex * cp - bp * fx) +\n ap * (ex * fy - ey * fx) < 0;\n}\n\nfunction circumradius(ax, ay, bx, by, cx, cy) {\n const dx = bx - ax;\n const dy = by - ay;\n const ex = cx - ax;\n const ey = cy - ay;\n\n const bl = dx * dx + dy * dy;\n const cl = ex * ex + ey * ey;\n const d = 0.5 / (dx * ey - dy * ex);\n\n const x = (ey * bl - dy * cl) * d;\n const y = (dx * cl - ex * bl) * d;\n\n return x * x + y * y;\n}\n\nfunction circumcenter(ax, ay, bx, by, cx, cy) {\n const dx = bx - ax;\n const dy = by - ay;\n const ex = cx - ax;\n const ey = cy - ay;\n\n const bl = dx * dx + dy * dy;\n const cl = ex * ex + ey * ey;\n const d = 0.5 / (dx * ey - dy * ex);\n\n const x = ax + (ey * bl - dy * cl) * d;\n const y = ay + (dx * cl - ex * bl) * d;\n\n return {x, y};\n}\n\nfunction quicksort(ids, dists, left, right) {\n if (right - left <= 20) {\n for (let i = left + 1; i <= right; i++) {\n const temp = ids[i];\n const tempDist = dists[temp];\n let j = i - 1;\n while (j >= left && dists[ids[j]] > tempDist) ids[j + 1] = ids[j--];\n ids[j + 1] = temp;\n }\n } else {\n const median = (left + right) >> 1;\n let i = left + 1;\n let j = right;\n swap(ids, median, i);\n if (dists[ids[left]] > dists[ids[right]]) swap(ids, left, right);\n if (dists[ids[i]] > dists[ids[right]]) swap(ids, i, right);\n if (dists[ids[left]] > dists[ids[i]]) swap(ids, left, i);\n\n const temp = ids[i];\n const tempDist = dists[temp];\n while (true) {\n do i++; while (dists[ids[i]] < tempDist);\n do j--; while (dists[ids[j]] > tempDist);\n if (j < i) break;\n swap(ids, i, j);\n }\n ids[left + 1] = ids[j];\n ids[j] = temp;\n\n if (right - i + 1 >= j - left) {\n quicksort(ids, dists, i, right);\n quicksort(ids, dists, left, j - 1);\n } else {\n quicksort(ids, dists, left, j - 1);\n quicksort(ids, dists, i, right);\n }\n }\n}\n\nfunction swap(arr, i, j) {\n const tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultGetX(p) {\n return p[0];\n}\nfunction defaultGetY(p) {\n return p[1];\n}\n","export class InternMap extends Map {\n constructor(entries, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (entries != null) for (const [key, value] of entries) this.set(key, value);\n }\n get(key) {\n return super.get(intern_get(this, key));\n }\n has(key) {\n return super.has(intern_get(this, key));\n }\n set(key, value) {\n return super.set(intern_set(this, key), value);\n }\n delete(key) {\n return super.delete(intern_delete(this, key));\n }\n}\n\nexport class InternSet extends Set {\n constructor(values, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (values != null) for (const value of values) this.add(value);\n }\n has(value) {\n return super.has(intern_get(this, value));\n }\n add(value) {\n return super.add(intern_set(this, value));\n }\n delete(value) {\n return super.delete(intern_delete(this, value));\n }\n}\n\nfunction intern_get({_intern, _key}, value) {\n const key = _key(value);\n return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) return _intern.get(key);\n _intern.set(key, value);\n return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) {\n value = _intern.get(key);\n _intern.delete(key);\n }\n return value;\n}\n\nfunction keyof(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n","import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale} from './util.js';\n\nconst iccerrboundA = (10 + 96 * epsilon) * epsilon;\nconst iccerrboundB = (4 + 48 * epsilon) * epsilon;\nconst iccerrboundC = (44 + 576 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst aa = vec(4);\nconst bb = vec(4);\nconst cc = vec(4);\nconst u = vec(4);\nconst v = vec(4);\nconst axtbc = vec(8);\nconst aytbc = vec(8);\nconst bxtca = vec(8);\nconst bytca = vec(8);\nconst cxtab = vec(8);\nconst cytab = vec(8);\nconst abt = vec(8);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abtt = vec(4);\nconst bctt = vec(4);\nconst catt = vec(4);\n\nconst _8 = vec(8);\nconst _16 = vec(16);\nconst _16b = vec(16);\nconst _16c = vec(16);\nconst _32 = vec(32);\nconst _32b = vec(32);\nconst _48 = vec(48);\nconst _64 = vec(64);\n\nlet fin = vec(1152);\nlet fin2 = vec(1152);\n\nfunction finadd(finlen, a, alen) {\n finlen = sum(finlen, fin, a, alen, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail, adytail, bdytail, cdytail;\n let axtbclen, aytbclen, bxtcalen, bytcalen, cxtablen, cytablen;\n let abtlen, bctlen, catlen;\n let abttlen, bcttlen, cattlen;\n let n1, n0;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n sum(\n scale(scale(4, bc, adx, _8), _8, adx, _16), _16,\n scale(scale(4, bc, ady, _8), _8, ady, _16b), _16b, _32), _32,\n sum(\n scale(scale(4, ca, bdx, _8), _8, bdx, _16), _16,\n scale(scale(4, ca, bdy, _8), _8, bdy, _16b), _16b, _32b), _32b, _64), _64,\n sum(\n scale(scale(4, ab, cdx, _8), _8, cdx, _16), _16,\n scale(scale(4, ab, cdy, _8), _8, cdy, _16b), _16b, _32), _32, fin);\n\n let det = estimate(finlen, fin);\n let errbound = iccerrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 && adytail === 0 && bdytail === 0 && cdytail === 0) {\n return det;\n }\n\n errbound = iccerrboundC * permanent + resulterrbound * Math.abs(det);\n det += ((adx * adx + ady * ady) * ((bdx * cdytail + cdy * bdxtail) - (bdy * cdxtail + cdx * bdytail)) +\n 2 * (adx * adxtail + ady * adytail) * (bdx * cdy - bdy * cdx)) +\n ((bdx * bdx + bdy * bdy) * ((cdx * adytail + ady * cdxtail) - (cdy * adxtail + adx * cdytail)) +\n 2 * (bdx * bdxtail + bdy * bdytail) * (cdx * ady - cdy * adx)) +\n ((cdx * cdx + cdy * cdy) * ((adx * bdytail + bdy * adxtail) - (ady * bdxtail + bdx * adytail)) +\n 2 * (cdx * cdxtail + cdy * cdytail) * (adx * bdy - ady * bdx));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = adx * adx;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = ady * ady;\n c = splitter * ady;\n ahi = c - (c - ady);\n alo = ady - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n aa[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n aa[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n aa[2] = _j - (u3 - bvirt) + (_i - bvirt);\n aa[3] = u3;\n }\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = bdx * bdx;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = bdy * bdy;\n c = splitter * bdy;\n ahi = c - (c - bdy);\n alo = bdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n bb[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n bb[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bb[3] = u3;\n }\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = cdx * cdx;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n s0 = alo * alo - (s1 - ahi * ahi - (ahi + ahi) * alo);\n t1 = cdy * cdy;\n c = splitter * cdy;\n ahi = c - (c - cdy);\n alo = cdy - ahi;\n t0 = alo * alo - (t1 - ahi * ahi - (ahi + ahi) * alo);\n _i = s0 + t0;\n bvirt = _i - s0;\n cc[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n cc[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cc[3] = u3;\n }\n\n if (adxtail !== 0) {\n axtbclen = scale(4, bc, adxtail, axtbc);\n finlen = finadd(finlen, sum_three(\n scale(axtbclen, axtbc, 2 * adx, _16), _16,\n scale(scale(4, cc, adxtail, _8), _8, bdy, _16b), _16b,\n scale(scale(4, bb, adxtail, _8), _8, -cdy, _16c), _16c, _32, _48), _48);\n }\n if (adytail !== 0) {\n aytbclen = scale(4, bc, adytail, aytbc);\n finlen = finadd(finlen, sum_three(\n scale(aytbclen, aytbc, 2 * ady, _16), _16,\n scale(scale(4, bb, adytail, _8), _8, cdx, _16b), _16b,\n scale(scale(4, cc, adytail, _8), _8, -bdx, _16c), _16c, _32, _48), _48);\n }\n if (bdxtail !== 0) {\n bxtcalen = scale(4, ca, bdxtail, bxtca);\n finlen = finadd(finlen, sum_three(\n scale(bxtcalen, bxtca, 2 * bdx, _16), _16,\n scale(scale(4, aa, bdxtail, _8), _8, cdy, _16b), _16b,\n scale(scale(4, cc, bdxtail, _8), _8, -ady, _16c), _16c, _32, _48), _48);\n }\n if (bdytail !== 0) {\n bytcalen = scale(4, ca, bdytail, bytca);\n finlen = finadd(finlen, sum_three(\n scale(bytcalen, bytca, 2 * bdy, _16), _16,\n scale(scale(4, cc, bdytail, _8), _8, adx, _16b), _16b,\n scale(scale(4, aa, bdytail, _8), _8, -cdx, _16c), _16c, _32, _48), _48);\n }\n if (cdxtail !== 0) {\n cxtablen = scale(4, ab, cdxtail, cxtab);\n finlen = finadd(finlen, sum_three(\n scale(cxtablen, cxtab, 2 * cdx, _16), _16,\n scale(scale(4, bb, cdxtail, _8), _8, ady, _16b), _16b,\n scale(scale(4, aa, cdxtail, _8), _8, -bdy, _16c), _16c, _32, _48), _48);\n }\n if (cdytail !== 0) {\n cytablen = scale(4, ab, cdytail, cytab);\n finlen = finadd(finlen, sum_three(\n scale(cytablen, cytab, 2 * cdy, _16), _16,\n scale(scale(4, aa, cdytail, _8), _8, bdx, _16b), _16b,\n scale(scale(4, bb, cdytail, _8), _8, -adx, _16c), _16c, _32, _48), _48);\n }\n\n if (adxtail !== 0 || adytail !== 0) {\n if (bdxtail !== 0 || bdytail !== 0 || cdxtail !== 0 || cdytail !== 0) {\n s1 = bdxtail * cdy;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * cdytail;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n s1 = cdxtail * -bdy;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * -bdy;\n bhi = c - (c - -bdy);\n blo = -bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * -bdytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * -bdytail;\n bhi = c - (c - -bdytail);\n blo = -bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n bctlen = sum(4, u, 4, v, bct);\n s1 = bdxtail * cdytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdxtail * bdytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bctt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bctt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bctt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bctt[3] = u3;\n bcttlen = 4;\n } else {\n bct[0] = 0;\n bctlen = 1;\n bctt[0] = 0;\n bcttlen = 1;\n }\n if (adxtail !== 0) {\n const len = scale(bctlen, bct, adxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(axtbclen, axtbc, adxtail, _16), _16,\n scale(len, _16c, 2 * adx, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * adx, _16), _16,\n scale(len2, _8, adxtail, _16b), _16b,\n scale(len, _16c, adxtail, _32), _32, _32b, _64), _64);\n\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, adxtail, _8), _8, bdytail, _16), _16);\n }\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, -adxtail, _8), _8, cdytail, _16), _16);\n }\n }\n if (adytail !== 0) {\n const len = scale(bctlen, bct, adytail, _16c);\n finlen = finadd(finlen, sum(\n scale(aytbclen, aytbc, adytail, _16), _16,\n scale(len, _16c, 2 * ady, _32), _32, _48), _48);\n\n const len2 = scale(bcttlen, bctt, adytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * ady, _16), _16,\n scale(len2, _8, adytail, _16b), _16b,\n scale(len, _16c, adytail, _32), _32, _32b, _64), _64);\n }\n }\n if (bdxtail !== 0 || bdytail !== 0) {\n if (cdxtail !== 0 || cdytail !== 0 || adxtail !== 0 || adytail !== 0) {\n s1 = cdxtail * ady;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * adytail;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -cdy;\n n0 = -cdytail;\n s1 = adxtail * n1;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * n0;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n catlen = sum(4, u, 4, v, cat);\n s1 = cdxtail * adytail;\n c = splitter * cdxtail;\n ahi = c - (c - cdxtail);\n alo = cdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adxtail * cdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * cdytail;\n bhi = c - (c - cdytail);\n blo = cdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n catt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n catt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n catt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n catt[3] = u3;\n cattlen = 4;\n } else {\n cat[0] = 0;\n catlen = 1;\n catt[0] = 0;\n cattlen = 1;\n }\n if (bdxtail !== 0) {\n const len = scale(catlen, cat, bdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(bxtcalen, bxtca, bdxtail, _16), _16,\n scale(len, _16c, 2 * bdx, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdx, _16), _16,\n scale(len2, _8, bdxtail, _16b), _16b,\n scale(len, _16c, bdxtail, _32), _32, _32b, _64), _64);\n\n if (cdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, bdxtail, _8), _8, cdytail, _16), _16);\n }\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, cc, -bdxtail, _8), _8, adytail, _16), _16);\n }\n }\n if (bdytail !== 0) {\n const len = scale(catlen, cat, bdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(bytcalen, bytca, bdytail, _16), _16,\n scale(len, _16c, 2 * bdy, _32), _32, _48), _48);\n\n const len2 = scale(cattlen, catt, bdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * bdy, _16), _16,\n scale(len2, _8, bdytail, _16b), _16b,\n scale(len, _16c, bdytail, _32), _32, _32b, _64), _64);\n }\n }\n if (cdxtail !== 0 || cdytail !== 0) {\n if (adxtail !== 0 || adytail !== 0 || bdxtail !== 0 || bdytail !== 0) {\n s1 = adxtail * bdy;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * bdytail;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n u[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n u[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n n1 = -ady;\n n0 = -adytail;\n s1 = bdxtail * n1;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * n1;\n bhi = c - (c - n1);\n blo = n1 - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * n0;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * n0;\n bhi = c - (c - n0);\n blo = n0 - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 + t0;\n bvirt = _i - s0;\n v[0] = s0 - (_i - bvirt) + (t0 - bvirt);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 + t1;\n bvirt = _i - _0;\n v[1] = _0 - (_i - bvirt) + (t1 - bvirt);\n u3 = _j + _i;\n bvirt = u3 - _j;\n v[2] = _j - (u3 - bvirt) + (_i - bvirt);\n v[3] = u3;\n abtlen = sum(4, u, 4, v, abt);\n s1 = adxtail * bdytail;\n c = splitter * adxtail;\n ahi = c - (c - adxtail);\n alo = adxtail - ahi;\n c = splitter * bdytail;\n bhi = c - (c - bdytail);\n blo = bdytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdxtail * adytail;\n c = splitter * bdxtail;\n ahi = c - (c - bdxtail);\n alo = bdxtail - ahi;\n c = splitter * adytail;\n bhi = c - (c - adytail);\n blo = adytail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n abtt[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n abtt[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n abtt[2] = _j - (u3 - bvirt) + (_i - bvirt);\n abtt[3] = u3;\n abttlen = 4;\n } else {\n abt[0] = 0;\n abtlen = 1;\n abtt[0] = 0;\n abttlen = 1;\n }\n if (cdxtail !== 0) {\n const len = scale(abtlen, abt, cdxtail, _16c);\n finlen = finadd(finlen, sum(\n scale(cxtablen, cxtab, cdxtail, _16), _16,\n scale(len, _16c, 2 * cdx, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdxtail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdx, _16), _16,\n scale(len2, _8, cdxtail, _16b), _16b,\n scale(len, _16c, cdxtail, _32), _32, _32b, _64), _64);\n\n if (adytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, bb, cdxtail, _8), _8, adytail, _16), _16);\n }\n if (bdytail !== 0) {\n finlen = finadd(finlen, scale(scale(4, aa, -cdxtail, _8), _8, bdytail, _16), _16);\n }\n }\n if (cdytail !== 0) {\n const len = scale(abtlen, abt, cdytail, _16c);\n finlen = finadd(finlen, sum(\n scale(cytablen, cytab, cdytail, _16), _16,\n scale(len, _16c, 2 * cdy, _32), _32, _48), _48);\n\n const len2 = scale(abttlen, abtt, cdytail, _8);\n finlen = finadd(finlen, sum_three(\n scale(len2, _8, 2 * cdy, _16), _16,\n scale(len2, _8, cdytail, _16b), _16b,\n scale(len, _16c, cdytail, _32), _32, _32b, _64), _64);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function incircle(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n const alift = adx * adx + ady * ady;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n const blift = bdx * bdx + bdy * bdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n const clift = cdx * cdx + cdy * cdy;\n\n const det =\n alift * (bdxcdy - cdxbdy) +\n blift * (cdxady - adxcdy) +\n clift * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * alift +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * blift +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * clift;\n\n const errbound = iccerrboundA * permanent;\n\n if (det > errbound || -det > errbound) {\n return det;\n }\n return incircleadapt(ax, ay, bx, by, cx, cy, dx, dy, permanent);\n}\n\nexport function incirclefast(ax, ay, bx, by, cx, cy, dx, dy) {\n const adx = ax - dx;\n const ady = ay - dy;\n const bdx = bx - dx;\n const bdy = by - dy;\n const cdx = cx - dx;\n const cdy = cy - dy;\n\n const abdet = adx * bdy - bdx * ady;\n const bcdet = bdx * cdy - cdx * bdy;\n const cadet = cdx * ady - adx * cdy;\n const alift = adx * adx + ady * ady;\n const blift = bdx * bdx + bdy * bdy;\n const clift = cdx * cdx + cdy * cdy;\n\n return alift * bcdet + blift * cadet + clift * abdet;\n}\n","import {epsilon, splitter, resulterrbound, estimate, vec, sum, sum_three, scale, negate} from './util.js';\n\nconst isperrboundA = (16 + 224 * epsilon) * epsilon;\nconst isperrboundB = (5 + 72 * epsilon) * epsilon;\nconst isperrboundC = (71 + 1408 * epsilon) * epsilon * epsilon;\n\nconst ab = vec(4);\nconst bc = vec(4);\nconst cd = vec(4);\nconst de = vec(4);\nconst ea = vec(4);\nconst ac = vec(4);\nconst bd = vec(4);\nconst ce = vec(4);\nconst da = vec(4);\nconst eb = vec(4);\n\nconst abc = vec(24);\nconst bcd = vec(24);\nconst cde = vec(24);\nconst dea = vec(24);\nconst eab = vec(24);\nconst abd = vec(24);\nconst bce = vec(24);\nconst cda = vec(24);\nconst deb = vec(24);\nconst eac = vec(24);\n\nconst adet = vec(1152);\nconst bdet = vec(1152);\nconst cdet = vec(1152);\nconst ddet = vec(1152);\nconst edet = vec(1152);\nconst abdet = vec(2304);\nconst cddet = vec(2304);\nconst cdedet = vec(3456);\nconst deter = vec(5760);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _8c = vec(8);\nconst _16 = vec(16);\nconst _24 = vec(24);\nconst _48 = vec(48);\nconst _48b = vec(48);\nconst _96 = vec(96);\nconst _192 = vec(192);\nconst _384x = vec(384);\nconst _384y = vec(384);\nconst _384z = vec(384);\nconst _768 = vec(768);\n\nfunction sum_three_scale(a, b, c, az, bz, cz, out) {\n return sum_three(\n scale(4, a, az, _8), _8,\n scale(4, b, bz, _8b), _8b,\n scale(4, c, cz, _8c), _8c, _16, out);\n}\n\nfunction liftexact(alen, a, blen, b, clen, c, dlen, d, x, y, z, out) {\n const len = sum(\n sum(alen, a, blen, b, _48), _48,\n negate(sum(clen, c, dlen, d, _48b), _48b), _48b, _96);\n\n return sum_three(\n scale(scale(len, _96, x, _192), _192, x, _384x), _384x,\n scale(scale(len, _96, y, _192), _192, y, _384y), _384y,\n scale(scale(len, _96, z, _192), _192, z, _384z), _384z, _768, out);\n}\n\nfunction insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n s1 = ax * by;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ay;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n s1 = bx * cy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * by;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cx * dy;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * cy;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n cd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n cd[3] = u3;\n s1 = dx * ey;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * dy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n de[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n de[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n de[2] = _j - (u3 - bvirt) + (_i - bvirt);\n de[3] = u3;\n s1 = ex * ay;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * ey;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ea[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ea[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ea[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ea[3] = u3;\n s1 = ax * cy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cx * ay;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ac[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ac[3] = u3;\n s1 = bx * dy;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dx * by;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bd[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bd[3] = u3;\n s1 = cx * ey;\n c = splitter * cx;\n ahi = c - (c - cx);\n alo = cx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ex * cy;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * cy;\n bhi = c - (c - cy);\n blo = cy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ce[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ce[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ce[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ce[3] = u3;\n s1 = dx * ay;\n c = splitter * dx;\n ahi = c - (c - dx);\n alo = dx - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ax * dy;\n c = splitter * ax;\n ahi = c - (c - ax);\n alo = ax - ahi;\n c = splitter * dy;\n bhi = c - (c - dy);\n blo = dy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n da[2] = _j - (u3 - bvirt) + (_i - bvirt);\n da[3] = u3;\n s1 = ex * by;\n c = splitter * ex;\n ahi = c - (c - ex);\n alo = ex - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bx * ey;\n c = splitter * bx;\n ahi = c - (c - bx);\n alo = bx - ahi;\n c = splitter * ey;\n bhi = c - (c - ey);\n blo = ey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n eb[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n eb[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n eb[2] = _j - (u3 - bvirt) + (_i - bvirt);\n eb[3] = u3;\n\n const abclen = sum_three_scale(ab, bc, ac, cz, az, -bz, abc);\n const bcdlen = sum_three_scale(bc, cd, bd, dz, bz, -cz, bcd);\n const cdelen = sum_three_scale(cd, de, ce, ez, cz, -dz, cde);\n const dealen = sum_three_scale(de, ea, da, az, dz, -ez, dea);\n const eablen = sum_three_scale(ea, ab, eb, bz, ez, -az, eab);\n const abdlen = sum_three_scale(ab, bd, da, dz, az, bz, abd);\n const bcelen = sum_three_scale(bc, ce, eb, ez, bz, cz, bce);\n const cdalen = sum_three_scale(cd, da, ac, az, cz, dz, cda);\n const deblen = sum_three_scale(de, eb, bd, bz, dz, ez, deb);\n const eaclen = sum_three_scale(ea, ac, ce, cz, ez, az, eac);\n\n const deterlen = sum_three(\n liftexact(cdelen, cde, bcelen, bce, deblen, deb, bcdlen, bcd, ax, ay, az, adet), adet,\n liftexact(dealen, dea, cdalen, cda, eaclen, eac, cdelen, cde, bx, by, bz, bdet), bdet,\n sum_three(\n liftexact(eablen, eab, deblen, deb, abdlen, abd, dealen, dea, cx, cy, cz, cdet), cdet,\n liftexact(abclen, abc, eaclen, eac, bcelen, bce, eablen, eab, dx, dy, dz, ddet), ddet,\n liftexact(bcdlen, bcd, abdlen, abd, cdalen, cda, abclen, abc, ex, ey, ez, edet), edet, cddet, cdedet), cdedet, abdet, deter);\n\n return deter[deterlen - 1];\n}\n\nconst xdet = vec(96);\nconst ydet = vec(96);\nconst zdet = vec(96);\nconst fin = vec(1152);\n\nfunction liftadapt(a, b, c, az, bz, cz, x, y, z, out) {\n const len = sum_three_scale(a, b, c, az, bz, cz, _24);\n return sum_three(\n scale(scale(len, _24, x, _48), _48, x, xdet), xdet,\n scale(scale(len, _24, y, _48), _48, y, ydet), ydet,\n scale(scale(len, _24, z, _48), _48, z, zdet), zdet, _192, out);\n}\n\nfunction insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent) {\n let ab3, bc3, cd3, da3, ac3, bd3;\n\n let aextail, bextail, cextail, dextail;\n let aeytail, beytail, ceytail, deytail;\n let aeztail, beztail, ceztail, deztail;\n\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0;\n\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n s1 = aex * bey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bex * aey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ab3 = _j + _i;\n bvirt = ab3 - _j;\n ab[2] = _j - (ab3 - bvirt) + (_i - bvirt);\n ab[3] = ab3;\n s1 = bex * cey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * bey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bc3 = _j + _i;\n bvirt = bc3 - _j;\n bc[2] = _j - (bc3 - bvirt) + (_i - bvirt);\n bc[3] = bc3;\n s1 = cex * dey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * cey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n cd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n cd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n cd3 = _j + _i;\n bvirt = cd3 - _j;\n cd[2] = _j - (cd3 - bvirt) + (_i - bvirt);\n cd[3] = cd3;\n s1 = dex * aey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = aex * dey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n da[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n da[1] = _0 - (_i + bvirt) + (bvirt - t1);\n da3 = _j + _i;\n bvirt = da3 - _j;\n da[2] = _j - (da3 - bvirt) + (_i - bvirt);\n da[3] = da3;\n s1 = aex * cey;\n c = splitter * aex;\n ahi = c - (c - aex);\n alo = aex - ahi;\n c = splitter * cey;\n bhi = c - (c - cey);\n blo = cey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cex * aey;\n c = splitter * cex;\n ahi = c - (c - cex);\n alo = cex - ahi;\n c = splitter * aey;\n bhi = c - (c - aey);\n blo = aey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ac[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ac[1] = _0 - (_i + bvirt) + (bvirt - t1);\n ac3 = _j + _i;\n bvirt = ac3 - _j;\n ac[2] = _j - (ac3 - bvirt) + (_i - bvirt);\n ac[3] = ac3;\n s1 = bex * dey;\n c = splitter * bex;\n ahi = c - (c - bex);\n alo = bex - ahi;\n c = splitter * dey;\n bhi = c - (c - dey);\n blo = dey - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = dex * bey;\n c = splitter * dex;\n ahi = c - (c - dex);\n alo = dex - ahi;\n c = splitter * bey;\n bhi = c - (c - bey);\n blo = bey - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bd[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bd[1] = _0 - (_i + bvirt) + (bvirt - t1);\n bd3 = _j + _i;\n bvirt = bd3 - _j;\n bd[2] = _j - (bd3 - bvirt) + (_i - bvirt);\n bd[3] = bd3;\n\n const finlen = sum(\n sum(\n negate(liftadapt(bc, cd, bd, dez, bez, -cez, aex, aey, aez, adet), adet), adet,\n liftadapt(cd, da, ac, aez, cez, dez, bex, bey, bez, bdet), bdet, abdet), abdet,\n sum(\n negate(liftadapt(da, ab, bd, bez, dez, aez, cex, cey, cez, cdet), cdet), cdet,\n liftadapt(ab, bc, ac, cez, aez, -bez, dex, dey, dez, ddet), ddet, cddet), cddet, fin);\n\n let det = estimate(finlen, fin);\n let errbound = isperrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - aex;\n aextail = ax - (aex + bvirt) + (bvirt - ex);\n bvirt = ay - aey;\n aeytail = ay - (aey + bvirt) + (bvirt - ey);\n bvirt = az - aez;\n aeztail = az - (aez + bvirt) + (bvirt - ez);\n bvirt = bx - bex;\n bextail = bx - (bex + bvirt) + (bvirt - ex);\n bvirt = by - bey;\n beytail = by - (bey + bvirt) + (bvirt - ey);\n bvirt = bz - bez;\n beztail = bz - (bez + bvirt) + (bvirt - ez);\n bvirt = cx - cex;\n cextail = cx - (cex + bvirt) + (bvirt - ex);\n bvirt = cy - cey;\n ceytail = cy - (cey + bvirt) + (bvirt - ey);\n bvirt = cz - cez;\n ceztail = cz - (cez + bvirt) + (bvirt - ez);\n bvirt = dx - dex;\n dextail = dx - (dex + bvirt) + (bvirt - ex);\n bvirt = dy - dey;\n deytail = dy - (dey + bvirt) + (bvirt - ey);\n bvirt = dz - dez;\n deztail = dz - (dez + bvirt) + (bvirt - ez);\n if (aextail === 0 && aeytail === 0 && aeztail === 0 &&\n bextail === 0 && beytail === 0 && beztail === 0 &&\n cextail === 0 && ceytail === 0 && ceztail === 0 &&\n dextail === 0 && deytail === 0 && deztail === 0) {\n return det;\n }\n\n errbound = isperrboundC * permanent + resulterrbound * Math.abs(det);\n\n const abeps = (aex * beytail + bey * aextail) - (aey * bextail + bex * aeytail);\n const bceps = (bex * ceytail + cey * bextail) - (bey * cextail + cex * beytail);\n const cdeps = (cex * deytail + dey * cextail) - (cey * dextail + dex * ceytail);\n const daeps = (dex * aeytail + aey * dextail) - (dey * aextail + aex * deytail);\n const aceps = (aex * ceytail + cey * aextail) - (aey * cextail + cex * aeytail);\n const bdeps = (bex * deytail + dey * bextail) - (bey * dextail + dex * beytail);\n det +=\n (((bex * bex + bey * bey + bez * bez) * ((cez * daeps + dez * aceps + aez * cdeps) +\n (ceztail * da3 + deztail * ac3 + aeztail * cd3)) + (dex * dex + dey * dey + dez * dez) *\n ((aez * bceps - bez * aceps + cez * abeps) + (aeztail * bc3 - beztail * ac3 + ceztail * ab3))) -\n ((aex * aex + aey * aey + aez * aez) * ((bez * cdeps - cez * bdeps + dez * bceps) +\n (beztail * cd3 - ceztail * bd3 + deztail * bc3)) + (cex * cex + cey * cey + cez * cez) *\n ((dez * abeps + aez * bdeps + bez * daeps) + (deztail * ab3 + aeztail * bd3 + beztail * da3)))) +\n 2 * (((bex * bextail + bey * beytail + bez * beztail) * (cez * da3 + dez * ac3 + aez * cd3) +\n (dex * dextail + dey * deytail + dez * deztail) * (aez * bc3 - bez * ac3 + cez * ab3)) -\n ((aex * aextail + aey * aeytail + aez * aeztail) * (bez * cd3 - cez * bd3 + dez * bc3) +\n (cex * cextail + cey * ceytail + cez * ceztail) * (dez * ab3 + aez * bd3 + bez * da3)));\n\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n return insphereexact(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez);\n}\n\nexport function insphere(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez) {\n const aex = ax - ex;\n const bex = bx - ex;\n const cex = cx - ex;\n const dex = dx - ex;\n const aey = ay - ey;\n const bey = by - ey;\n const cey = cy - ey;\n const dey = dy - ey;\n const aez = az - ez;\n const bez = bz - ez;\n const cez = cz - ez;\n const dez = dz - ez;\n\n const aexbey = aex * bey;\n const bexaey = bex * aey;\n const ab = aexbey - bexaey;\n const bexcey = bex * cey;\n const cexbey = cex * bey;\n const bc = bexcey - cexbey;\n const cexdey = cex * dey;\n const dexcey = dex * cey;\n const cd = cexdey - dexcey;\n const dexaey = dex * aey;\n const aexdey = aex * dey;\n const da = dexaey - aexdey;\n const aexcey = aex * cey;\n const cexaey = cex * aey;\n const ac = aexcey - cexaey;\n const bexdey = bex * dey;\n const dexbey = dex * bey;\n const bd = bexdey - dexbey;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n const det =\n (clift * (dez * ab + aez * bd + bez * da) - dlift * (aez * bc - bez * ac + cez * ab)) +\n (alift * (bez * cd - cez * bd + dez * bc) - blift * (cez * da + dez * ac + aez * cd));\n\n const aezplus = Math.abs(aez);\n const bezplus = Math.abs(bez);\n const cezplus = Math.abs(cez);\n const dezplus = Math.abs(dez);\n const aexbeyplus = Math.abs(aexbey) + Math.abs(bexaey);\n const bexceyplus = Math.abs(bexcey) + Math.abs(cexbey);\n const cexdeyplus = Math.abs(cexdey) + Math.abs(dexcey);\n const dexaeyplus = Math.abs(dexaey) + Math.abs(aexdey);\n const aexceyplus = Math.abs(aexcey) + Math.abs(cexaey);\n const bexdeyplus = Math.abs(bexdey) + Math.abs(dexbey);\n const permanent =\n (cexdeyplus * bezplus + bexdeyplus * cezplus + bexceyplus * dezplus) * alift +\n (dexaeyplus * cezplus + aexceyplus * dezplus + cexdeyplus * aezplus) * blift +\n (aexbeyplus * dezplus + bexdeyplus * aezplus + dexaeyplus * bezplus) * clift +\n (bexceyplus * aezplus + aexceyplus * bezplus + aexbeyplus * cezplus) * dlift;\n\n const errbound = isperrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n return -insphereadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, ex, ey, ez, permanent);\n}\n\nexport function inspherefast(pax, pay, paz, pbx, pby, pbz, pcx, pcy, pcz, pdx, pdy, pdz, pex, pey, pez) {\n const aex = pax - pex;\n const bex = pbx - pex;\n const cex = pcx - pex;\n const dex = pdx - pex;\n const aey = pay - pey;\n const bey = pby - pey;\n const cey = pcy - pey;\n const dey = pdy - pey;\n const aez = paz - pez;\n const bez = pbz - pez;\n const cez = pcz - pez;\n const dez = pdz - pez;\n\n const ab = aex * bey - bex * aey;\n const bc = bex * cey - cex * bey;\n const cd = cex * dey - dex * cey;\n const da = dex * aey - aex * dey;\n const ac = aex * cey - cex * aey;\n const bd = bex * dey - dex * bey;\n\n const abc = aez * bc - bez * ac + cez * ab;\n const bcd = bez * cd - cez * bd + dez * bc;\n const cda = cez * da + dez * ac + aez * cd;\n const dab = dez * ab + aez * bd + bez * da;\n\n const alift = aex * aex + aey * aey + aez * aez;\n const blift = bex * bex + bey * bey + bez * bez;\n const clift = cex * cex + cey * cey + cez * cez;\n const dlift = dex * dex + dey * dey + dez * dez;\n\n return (clift * dab - dlift * abc) + (alift * bcd - blift * cda);\n}\n","import {epsilon, splitter, resulterrbound, estimate, vec, sum} from './util.js';\n\nconst ccwerrboundA = (3 + 16 * epsilon) * epsilon;\nconst ccwerrboundB = (2 + 12 * epsilon) * epsilon;\nconst ccwerrboundC = (9 + 64 * epsilon) * epsilon * epsilon;\n\nconst B = vec(4);\nconst C1 = vec(8);\nconst C2 = vec(12);\nconst D = vec(16);\nconst u = vec(4);\n\nfunction orient2dadapt(ax, ay, bx, by, cx, cy, detsum) {\n let acxtail, acytail, bcxtail, bcytail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _0, s1, s0, t1, t0, u3;\n\n const acx = ax - cx;\n const bcx = bx - cx;\n const acy = ay - cy;\n const bcy = by - cy;\n\n s1 = acx * bcy;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcx;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n B[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n B[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n B[2] = _j - (u3 - bvirt) + (_i - bvirt);\n B[3] = u3;\n\n let det = estimate(4, B);\n let errbound = ccwerrboundB * detsum;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - acx;\n acxtail = ax - (acx + bvirt) + (bvirt - cx);\n bvirt = bx - bcx;\n bcxtail = bx - (bcx + bvirt) + (bvirt - cx);\n bvirt = ay - acy;\n acytail = ay - (acy + bvirt) + (bvirt - cy);\n bvirt = by - bcy;\n bcytail = by - (bcy + bvirt) + (bvirt - cy);\n\n if (acxtail === 0 && acytail === 0 && bcxtail === 0 && bcytail === 0) {\n return det;\n }\n\n errbound = ccwerrboundC * detsum + resulterrbound * Math.abs(det);\n det += (acx * bcytail + bcy * acxtail) - (acy * bcxtail + bcx * acytail);\n if (det >= errbound || -det >= errbound) return det;\n\n s1 = acxtail * bcy;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcy;\n bhi = c - (c - bcy);\n blo = bcy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcx;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcx;\n bhi = c - (c - bcx);\n blo = bcx - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C1len = sum(4, B, 4, u, C1);\n\n s1 = acx * bcytail;\n c = splitter * acx;\n ahi = c - (c - acx);\n alo = acx - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acy * bcxtail;\n c = splitter * acy;\n ahi = c - (c - acy);\n alo = acy - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const C2len = sum(C1len, C1, 4, u, C2);\n\n s1 = acxtail * bcytail;\n c = splitter * acxtail;\n ahi = c - (c - acxtail);\n alo = acxtail - ahi;\n c = splitter * bcytail;\n bhi = c - (c - bcytail);\n blo = bcytail - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = acytail * bcxtail;\n c = splitter * acytail;\n ahi = c - (c - acytail);\n alo = acytail - ahi;\n c = splitter * bcxtail;\n bhi = c - (c - bcxtail);\n blo = bcxtail - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n u[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n u[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n u[2] = _j - (u3 - bvirt) + (_i - bvirt);\n u[3] = u3;\n const Dlen = sum(C2len, C2, 4, u, D);\n\n return D[Dlen - 1];\n}\n\nexport function orient2d(ax, ay, bx, by, cx, cy) {\n const detleft = (ay - cy) * (bx - cx);\n const detright = (ax - cx) * (by - cy);\n const det = detleft - detright;\n\n const detsum = Math.abs(detleft + detright);\n if (Math.abs(det) >= ccwerrboundA * detsum) return det;\n\n return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum);\n}\n\nexport function orient2dfast(ax, ay, bx, by, cx, cy) {\n return (ay - cy) * (bx - cx) - (ax - cx) * (by - cy);\n}\n","import {epsilon, splitter, resulterrbound, estimate, vec, sum, scale} from './util.js';\n\nconst o3derrboundA = (7 + 56 * epsilon) * epsilon;\nconst o3derrboundB = (3 + 28 * epsilon) * epsilon;\nconst o3derrboundC = (26 + 288 * epsilon) * epsilon * epsilon;\n\nconst bc = vec(4);\nconst ca = vec(4);\nconst ab = vec(4);\nconst at_b = vec(4);\nconst at_c = vec(4);\nconst bt_c = vec(4);\nconst bt_a = vec(4);\nconst ct_a = vec(4);\nconst ct_b = vec(4);\nconst bct = vec(8);\nconst cat = vec(8);\nconst abt = vec(8);\nconst u = vec(4);\n\nconst _8 = vec(8);\nconst _8b = vec(8);\nconst _16 = vec(8);\nconst _12 = vec(12);\n\nlet fin = vec(192);\nlet fin2 = vec(192);\n\nfunction finadd(finlen, alen, a) {\n finlen = sum(finlen, fin, alen, a, fin2);\n const tmp = fin; fin = fin2; fin2 = tmp;\n return finlen;\n}\n\nfunction tailinit(xtail, ytail, ax, ay, bx, by, a, b) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3, negate;\n if (xtail === 0) {\n if (ytail === 0) {\n a[0] = 0;\n b[0] = 0;\n return 1;\n } else {\n negate = -ytail;\n s1 = negate * ax;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n }\n } else {\n if (ytail === 0) {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n a[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n a[1] = s1;\n negate = -xtail;\n s1 = negate * by;\n c = splitter * negate;\n ahi = c - (c - negate);\n alo = negate - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n b[0] = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n b[1] = s1;\n return 2;\n } else {\n s1 = xtail * ay;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * ay;\n bhi = c - (c - ay);\n blo = ay - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = ytail * ax;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * ax;\n bhi = c - (c - ax);\n blo = ax - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n a[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n a[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n a[2] = _j - (u3 - bvirt) + (_i - bvirt);\n a[3] = u3;\n s1 = ytail * bx;\n c = splitter * ytail;\n ahi = c - (c - ytail);\n alo = ytail - ahi;\n c = splitter * bx;\n bhi = c - (c - bx);\n blo = bx - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = xtail * by;\n c = splitter * xtail;\n ahi = c - (c - xtail);\n alo = xtail - ahi;\n c = splitter * by;\n bhi = c - (c - by);\n blo = by - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n b[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n b[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n b[2] = _j - (u3 - bvirt) + (_i - bvirt);\n b[3] = u3;\n return 4;\n }\n }\n}\n\nfunction tailadd(finlen, a, b, k, z) {\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, u3;\n s1 = a * b;\n c = splitter * a;\n ahi = c - (c - a);\n alo = a - ahi;\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n c = splitter * k;\n bhi = c - (c - k);\n blo = k - bhi;\n _i = s0 * k;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * k;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n if (z !== 0) {\n c = splitter * z;\n bhi = c - (c - z);\n blo = z - bhi;\n _i = s0 * z;\n c = splitter * s0;\n ahi = c - (c - s0);\n alo = s0 - ahi;\n u[0] = alo * blo - (_i - ahi * bhi - alo * bhi - ahi * blo);\n _j = s1 * z;\n c = splitter * s1;\n ahi = c - (c - s1);\n alo = s1 - ahi;\n _0 = alo * blo - (_j - ahi * bhi - alo * bhi - ahi * blo);\n _k = _i + _0;\n bvirt = _k - _i;\n u[1] = _i - (_k - bvirt) + (_0 - bvirt);\n u3 = _j + _k;\n u[2] = _k - (u3 - _j);\n u[3] = u3;\n finlen = finadd(finlen, 4, u);\n }\n return finlen;\n}\n\nfunction orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent) {\n let finlen;\n let adxtail, bdxtail, cdxtail;\n let adytail, bdytail, cdytail;\n let adztail, bdztail, cdztail;\n let bvirt, c, ahi, alo, bhi, blo, _i, _j, _k, _0, s1, s0, t1, t0, u3;\n\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n s1 = bdx * cdy;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = cdx * bdy;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n bc[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n bc[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n bc[2] = _j - (u3 - bvirt) + (_i - bvirt);\n bc[3] = u3;\n s1 = cdx * ady;\n c = splitter * cdx;\n ahi = c - (c - cdx);\n alo = cdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = adx * cdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * cdy;\n bhi = c - (c - cdy);\n blo = cdy - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ca[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ca[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ca[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ca[3] = u3;\n s1 = adx * bdy;\n c = splitter * adx;\n ahi = c - (c - adx);\n alo = adx - ahi;\n c = splitter * bdy;\n bhi = c - (c - bdy);\n blo = bdy - bhi;\n s0 = alo * blo - (s1 - ahi * bhi - alo * bhi - ahi * blo);\n t1 = bdx * ady;\n c = splitter * bdx;\n ahi = c - (c - bdx);\n alo = bdx - ahi;\n c = splitter * ady;\n bhi = c - (c - ady);\n blo = ady - bhi;\n t0 = alo * blo - (t1 - ahi * bhi - alo * bhi - ahi * blo);\n _i = s0 - t0;\n bvirt = s0 - _i;\n ab[0] = s0 - (_i + bvirt) + (bvirt - t0);\n _j = s1 + _i;\n bvirt = _j - s1;\n _0 = s1 - (_j - bvirt) + (_i - bvirt);\n _i = _0 - t1;\n bvirt = _0 - _i;\n ab[1] = _0 - (_i + bvirt) + (bvirt - t1);\n u3 = _j + _i;\n bvirt = u3 - _j;\n ab[2] = _j - (u3 - bvirt) + (_i - bvirt);\n ab[3] = u3;\n\n finlen = sum(\n sum(\n scale(4, bc, adz, _8), _8,\n scale(4, ca, bdz, _8b), _8b, _16), _16,\n scale(4, ab, cdz, _8), _8, fin);\n\n let det = estimate(finlen, fin);\n let errbound = o3derrboundB * permanent;\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n bvirt = ax - adx;\n adxtail = ax - (adx + bvirt) + (bvirt - dx);\n bvirt = bx - bdx;\n bdxtail = bx - (bdx + bvirt) + (bvirt - dx);\n bvirt = cx - cdx;\n cdxtail = cx - (cdx + bvirt) + (bvirt - dx);\n bvirt = ay - ady;\n adytail = ay - (ady + bvirt) + (bvirt - dy);\n bvirt = by - bdy;\n bdytail = by - (bdy + bvirt) + (bvirt - dy);\n bvirt = cy - cdy;\n cdytail = cy - (cdy + bvirt) + (bvirt - dy);\n bvirt = az - adz;\n adztail = az - (adz + bvirt) + (bvirt - dz);\n bvirt = bz - bdz;\n bdztail = bz - (bdz + bvirt) + (bvirt - dz);\n bvirt = cz - cdz;\n cdztail = cz - (cdz + bvirt) + (bvirt - dz);\n\n if (adxtail === 0 && bdxtail === 0 && cdxtail === 0 &&\n adytail === 0 && bdytail === 0 && cdytail === 0 &&\n adztail === 0 && bdztail === 0 && cdztail === 0) {\n return det;\n }\n\n errbound = o3derrboundC * permanent + resulterrbound * Math.abs(det);\n det +=\n adz * (bdx * cdytail + cdy * bdxtail - (bdy * cdxtail + cdx * bdytail)) + adztail * (bdx * cdy - bdy * cdx) +\n bdz * (cdx * adytail + ady * cdxtail - (cdy * adxtail + adx * cdytail)) + bdztail * (cdx * ady - cdy * adx) +\n cdz * (adx * bdytail + bdy * adxtail - (ady * bdxtail + bdx * adytail)) + cdztail * (adx * bdy - ady * bdx);\n if (det >= errbound || -det >= errbound) {\n return det;\n }\n\n const at_len = tailinit(adxtail, adytail, bdx, bdy, cdx, cdy, at_b, at_c);\n const bt_len = tailinit(bdxtail, bdytail, cdx, cdy, adx, ady, bt_c, bt_a);\n const ct_len = tailinit(cdxtail, cdytail, adx, ady, bdx, bdy, ct_a, ct_b);\n\n const bctlen = sum(bt_len, bt_c, ct_len, ct_b, bct);\n finlen = finadd(finlen, scale(bctlen, bct, adz, _16), _16);\n\n const catlen = sum(ct_len, ct_a, at_len, at_c, cat);\n finlen = finadd(finlen, scale(catlen, cat, bdz, _16), _16);\n\n const abtlen = sum(at_len, at_b, bt_len, bt_a, abt);\n finlen = finadd(finlen, scale(abtlen, abt, cdz, _16), _16);\n\n if (adztail !== 0) {\n finlen = finadd(finlen, scale(4, bc, adztail, _12), _12);\n finlen = finadd(finlen, scale(bctlen, bct, adztail, _16), _16);\n }\n if (bdztail !== 0) {\n finlen = finadd(finlen, scale(4, ca, bdztail, _12), _12);\n finlen = finadd(finlen, scale(catlen, cat, bdztail, _16), _16);\n }\n if (cdztail !== 0) {\n finlen = finadd(finlen, scale(4, ab, cdztail, _12), _12);\n finlen = finadd(finlen, scale(abtlen, abt, cdztail, _16), _16);\n }\n\n if (adxtail !== 0) {\n if (bdytail !== 0) {\n finlen = tailadd(finlen, adxtail, bdytail, cdz, cdztail);\n }\n if (cdytail !== 0) {\n finlen = tailadd(finlen, -adxtail, cdytail, bdz, bdztail);\n }\n }\n if (bdxtail !== 0) {\n if (cdytail !== 0) {\n finlen = tailadd(finlen, bdxtail, cdytail, adz, adztail);\n }\n if (adytail !== 0) {\n finlen = tailadd(finlen, -bdxtail, adytail, cdz, cdztail);\n }\n }\n if (cdxtail !== 0) {\n if (adytail !== 0) {\n finlen = tailadd(finlen, cdxtail, adytail, bdz, bdztail);\n }\n if (bdytail !== 0) {\n finlen = tailadd(finlen, -cdxtail, bdytail, adz, adztail);\n }\n }\n\n return fin[finlen - 1];\n}\n\nexport function orient3d(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n const bdxcdy = bdx * cdy;\n const cdxbdy = cdx * bdy;\n\n const cdxady = cdx * ady;\n const adxcdy = adx * cdy;\n\n const adxbdy = adx * bdy;\n const bdxady = bdx * ady;\n\n const det =\n adz * (bdxcdy - cdxbdy) +\n bdz * (cdxady - adxcdy) +\n cdz * (adxbdy - bdxady);\n\n const permanent =\n (Math.abs(bdxcdy) + Math.abs(cdxbdy)) * Math.abs(adz) +\n (Math.abs(cdxady) + Math.abs(adxcdy)) * Math.abs(bdz) +\n (Math.abs(adxbdy) + Math.abs(bdxady)) * Math.abs(cdz);\n\n const errbound = o3derrboundA * permanent;\n if (det > errbound || -det > errbound) {\n return det;\n }\n\n return orient3dadapt(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz, permanent);\n}\n\nexport function orient3dfast(ax, ay, az, bx, by, bz, cx, cy, cz, dx, dy, dz) {\n const adx = ax - dx;\n const bdx = bx - dx;\n const cdx = cx - dx;\n const ady = ay - dy;\n const bdy = by - dy;\n const cdy = cy - dy;\n const adz = az - dz;\n const bdz = bz - dz;\n const cdz = cz - dz;\n\n return adx * (bdy * cdz - bdz * cdy) +\n bdx * (cdy * adz - cdz * ady) +\n cdx * (ady * bdz - adz * bdy);\n}\n","export const epsilon = 1.1102230246251565e-16;\nexport const splitter = 134217729;\nexport const resulterrbound = (3 + 8 * epsilon) * epsilon;\n\n// fast_expansion_sum_zeroelim routine from oritinal code\nexport function sum(elen, e, flen, f, h) {\n let Q, Qnew, hh, bvirt;\n let enow = e[0];\n let fnow = f[0];\n let eindex = 0;\n let findex = 0;\n if ((fnow > enow) === (fnow > -enow)) {\n Q = enow;\n enow = e[++eindex];\n } else {\n Q = fnow;\n fnow = f[++findex];\n }\n let hindex = 0;\n if (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = enow + Q;\n hh = Q - (Qnew - enow);\n enow = e[++eindex];\n } else {\n Qnew = fnow + Q;\n hh = Q - (Qnew - fnow);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n while (eindex < elen && findex < flen) {\n if ((fnow > enow) === (fnow > -enow)) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n } else {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n }\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n }\n while (eindex < elen) {\n Qnew = Q + enow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (enow - bvirt);\n enow = e[++eindex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n while (findex < flen) {\n Qnew = Q + fnow;\n bvirt = Qnew - Q;\n hh = Q - (Qnew - bvirt) + (fnow - bvirt);\n fnow = f[++findex];\n Q = Qnew;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function sum_three(alen, a, blen, b, clen, c, tmp, out) {\n return sum(sum(alen, a, blen, b, tmp), tmp, clen, c, out);\n}\n\n// scale_expansion_zeroelim routine from oritinal code\nexport function scale(elen, e, b, h) {\n let Q, sum, hh, product1, product0;\n let bvirt, c, ahi, alo, bhi, blo;\n\n c = splitter * b;\n bhi = c - (c - b);\n blo = b - bhi;\n let enow = e[0];\n Q = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n hh = alo * blo - (Q - ahi * bhi - alo * bhi - ahi * blo);\n let hindex = 0;\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n for (let i = 1; i < elen; i++) {\n enow = e[i];\n product1 = enow * b;\n c = splitter * enow;\n ahi = c - (c - enow);\n alo = enow - ahi;\n product0 = alo * blo - (product1 - ahi * bhi - alo * bhi - ahi * blo);\n sum = Q + product0;\n bvirt = sum - Q;\n hh = Q - (sum - bvirt) + (product0 - bvirt);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n Q = product1 + sum;\n hh = sum - (Q - product1);\n if (hh !== 0) {\n h[hindex++] = hh;\n }\n }\n if (Q !== 0 || hindex === 0) {\n h[hindex++] = Q;\n }\n return hindex;\n}\n\nexport function negate(elen, e) {\n for (let i = 0; i < elen; i++) e[i] = -e[i];\n return elen;\n}\n\nexport function estimate(elen, e) {\n let Q = e[0];\n for (let i = 1; i < elen; i++) Q += e[i];\n return Q;\n}\n\nexport function vec(n) {\n return new Float64Array(n);\n}\n","\nexport {orient2d, orient2dfast} from './esm/orient2d.js';\nexport {orient3d, orient3dfast} from './esm/orient3d.js';\nexport {incircle, incirclefast} from './esm/incircle.js';\nexport {insphere, inspherefast} from './esm/insphere.js';\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import * as d3 from \"d3\"\nimport { Canvg } from 'canvg';\n\nclass TimeSeries \n\n ###*\n * TimeSeries Field for the Listing Table\n *\n * A multi value field is identified by the column type \"timeseries\" in the\n * listing view, e.g. `self.columns = {\"Result\": {\"type\": \"timeseries\"}, ... }`\n *\n ###\n constructor: (element) ->\n \n @container = element;\n # remember the initial value\n this.state =\n value: element.state.value\n\n this.props = element.props\n\n console.log('constructor complete')\n\n ###\n * Converts the string value to an array\n ###\n to_matrix: (listString, headers) ->\n # No values yet\n if listString == \"\"\n return \"\"\n\n # Parse the string version of the list of lists into an array\n # list = JSON.parse(listString)\n list = listString\n\n # Map each inner list to an object using the headers\n matrix = list.map (innerList) ->\n obj = {}\n headers.forEach (header, index) ->\n obj[header] = innerList[index]\n obj\n\n matrix.map (row) ->\n headers.forEach (header, index) ->\n if index = 0\n row[header] = row[header]\n else\n row[header] = parseFloat(row[header])\n matrix\n\n\n getLineConfigs = (count) ->\n configs = [\n {color: \"#666666\", opacity: 1.0, symbol: d3.symbolCircle, dash: \"\"}\n {color: \"#666666\", opacity: 0.8, symbol: d3.symbolCircle, dash: \"\"}\n {color: \"#666666\", opacity: 0.6, symbol: d3.symbolCircle, dash: \"\"}\n {color: \"#666666\", opacity: 0.4, symbol: d3.symbolCircle, dash: \"\"}\n {color: \"#666666\", opacity: 0.2, symbol: d3.symbolCircle, dash: \"\"}\n ]\n configs.slice(0, count)\n\n # Create symbol generator\n symbolGenerator = d3.symbol().size(24) # Adjust size as needed\n\n ###\n * Inputs table builder. Generates a table of inputs as matrix\n ###\n build_graph: ->\n console.log \"TimeSeries::build_graph: entered\"\n\n values = this.state.value\n\n if values == \"\"\n console.log \"TimeSeries::build_graph: exit because no data\"\n @container.current.appendChild([])\n return\n\n # Get datasets\n columns = this.props.item.time_series_columns\n col_types = columns.map (i) -> i.ColumnType\n headers = columns.map (i) -> i.ColumnTitle\n index = headers[0]\n data = @to_matrix(values, headers)\n\n # Generate the line colors (exclude index)\n line_configs = getLineConfigs(headers.length - 1)\n if col_types[col_types.length - 1] == \"average\"\n line_configs[line_configs.length - 1] = {\n color: \"#000000\",\n dash: \"\",\n opacity: \"1.0\",\n symbol: d3.symbolCircle\n }\n console.debug(line_configs)\n\n # Set up dimensions\n margin = {top: 40, right: 80, bottom: 50, left: 60}\n width = 700 - margin.left - margin.right\n height = 400 - margin.top - margin.bottom + 50\n\n # Set up scales\n x = d3.scaleLinear()\n .domain(d3.extent(data, (d) -> parseFloat(d[index])))\n .range([0, width])\n\n # Set up Y scale with trimmed domain\n minY = d3.min(data.flatMap((row) -> headers.slice(1).map((header) -> parseFloat(row[header]))))\n minY = minY- (minY * 0.1)\n maxY = d3.max(data.flatMap((row) -> headers.slice(1).map((header) -> parseFloat(row[header]))))\n # maxY = maxY + (maxY * 0.1)\n\n y = d3.scaleLinear()\n .domain([Math.floor(minY), Math.ceil(maxY)]) # Trim domain to just cover data range\n .range([height, 0])\n\n # Create SVG container\n svg = d3.select(@container)\n .append('svg')\n .style(\"height\", \"#{height+120}px\")\n\n # Remove any previous SVG content\n svg.selectAll('*').remove()\n\n svg = svg\n .attr(\"width\", width + margin.left + margin.right)\n .attr(\"height\", height + margin.top + margin.bottom)\n .attr('xmlns', 'http://www.w3.org/2000/svg')\n .append(\"g\")\n .attr(\"transform\", \"translate(#{margin.left},#{margin.top})\")\n\n # Graph title\n svg.append(\"text\")\n .attr(\"x\", width / 2)\n .attr(\"y\", -margin.top / 2)\n .attr(\"text-anchor\", \"middle\")\n .style(\"font-size\", \"16px\")\n .style(\"font-weight\", \"bold\")\n .text(this.props.item.time_series_graph_title)\n\n # X-axis\n svg.append(\"g\")\n .attr(\"transform\", \"translate(0,#{height})\")\n .call(d3.axisBottom(x))\n\n # X-axis label\n svg.append(\"text\")\n .attr(\"x\", width / 2)\n .attr(\"y\", height + margin.bottom - 10)\n .attr(\"text-anchor\", \"middle\")\n .style(\"font-size\", \"12px\")\n .text(this.props.item.time_series_graph_xaxis)\n\n # Y-axis\n svg.append(\"g\")\n .call(d3.axisLeft(y))\n\n # Y-axis label\n svg.append(\"text\")\n .attr(\"transform\", \"rotate(-90)\")\n .attr(\"x\", -height / 2)\n .attr(\"y\", -margin.left + 15)\n .attr(\"text-anchor\", \"middle\")\n .style(\"font-size\", \"12px\")\n .text(this.props.item.time_series_graph_yaxis)\n\n # Add horizontal grid lines\n svg.append(\"g\")\n .attr(\"class\", \"grid horizontal\")\n .attr(\"transform\", \"translate(0, 0)\")\n .call(\n d3.axisLeft(y)\n .tickSize(-width) # Extend ticks across the chart width\n .tickFormat(\"\") # Remove tick labels\n )\n .selectAll(\"line\")\n .style(\"stroke\", \"#999\") # Lighter gray\n # .style(\"stroke-dasharray\", \"2,2\")\n .style(\"opacity\", 0.8) # Adjust transparency\n\n # Add vertical grid lines\n svg.append(\"g\")\n .attr(\"class\", \"grid vertical\")\n .attr(\"transform\", \"translate(0, #{height})\")\n .call(\n d3.axisBottom(x)\n .tickSize(-height) # Extend ticks across the chart height\n .tickFormat(\"\") # Remove tick labels\n )\n .selectAll(\"line\")\n .style(\"stroke\", \"#999\") # Lighter gray\n .style(\"stroke-dasharray\", \"2,2\")\n .style(\"opacity\", 0.8) # Adjust transparency\n\n # Draw axes\n svg.append(\"g\")\n .attr(\"transform\", \"translate(0,#{height})\")\n .call(d3.axisBottom(x))\n\n svg.append(\"g\")\n .call(d3.axisLeft(y))\n\n headers.slice(1).forEach((key, i) ->\n console.debug(\"Main loop: \" + key + \" \" + i)\n\n # Filter data to exclude rows with null, undefined, or non-numeric values for the current key\n validData = data.filter((d) ->\n d[key]? and not isNaN(d[key]) # Ensure value exists and is numeric\n )\n\n # Line generator\n lineGen = d3.line()\n .x((d) ->\n x(d[index])\n )\n .y((d) ->\n y(d[key])\n )\n\n svg.append(\"path\")\n .datum(validData) # Use filtered data\n .attr(\"fill\", \"none\")\n .attr(\"stroke-width\", 2)\n .attr(\"stroke\", line_configs[i].color)\n .attr(\"opacity\", line_configs[i].opacity)\n .attr(\"stroke-dasharray\", line_configs[i].dash)\n .attr(\"d\", lineGen)\n\n # Add data points with different symbols\n svg.selectAll(\".symbol-#{i}\")\n .data(validData) # Use filtered data\n .enter().append(\"path\")\n .attr(\"class\", \"symbol symbol-#{i}\")\n .attr(\"d\", symbolGenerator.type(line_configs[i].symbol))\n .attr(\"transform\", (d) ->\n # Ensure valid x and y before applying transform\n xVal = parseFloat(d[index])\n yVal = parseFloat(d[key])\n if not isNaN(xVal) and not isNaN(yVal)\n \"translate(#{x(xVal)}, #{y(yVal)})\"\n else\n null # Skip invalid points\n )\n .style(\"fill\", line_configs[i].color)\n .style(\"opacity\", line_configs[i].opacity)\n )\n\n # Add legend\n legend = svg.append(\"g\")\n .attr(\"class\", \"legend\")\n .attr(\"transform\", \"translate(50, #{height + 50})\") # Move legend below the graph\n\n # Add legend items\n legendItems = legend.selectAll(\"g\")\n .data(headers.slice(1))\n .enter().append(\"g\")\n .attr(\"transform\", (d, i) ->\n xOffset = parseFloat((i % Math.floor(width / 100)) * 100) # Horizontal spacing\n yOffset = parseFloat(Math.floor(i / Math.floor(width / 100)) * 20) # Vertical spacing\n \"translate(#{xOffset}, #{yOffset})\"\n )\n\n\n # Add legend color squares\n legendItems.append(\"rect\")\n .attr(\"x\", 0)\n .attr(\"width\", 18)\n .attr(\"height\", 18)\n .style(\"fill\", (d, i) -> line_configs[i].color)\n .style(\"opacity\", (d, i) -> line_configs[i].opacity)\n\n # Add legend text\n legendItems.append(\"text\")\n .attr(\"x\", 24)\n .attr(\"y\", 9)\n .attr(\"dy\", \"0.35em\")\n .style(\"font-size\", \"12px\")\n .text((d) -> d)\n\n console.log \"TimeSeries::build_graph: svg done\"\n\nwindow.TimeSeries = TimeSeries\n"],"names":["d3","_interopRequireWildcard","require","_canvg","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","o","Symbol","iterator","constructor","prototype","_classCallCheck","TypeError","_defineProperties","length","enumerable","configurable","writable","_toPropertyKey","key","_createClass","_toPrimitive","toPrimitive","String","Number","TimeSeries","element","container","state","value","props","console","log","to_matrix","listString","headers","list","matrix","map","innerList","obj","forEach","header","index","row","parseFloat","build_graph","col_types","columns","data","height","legend","legendItems","line_configs","margin","maxY","minY","svg","values","width","x","y","current","appendChild","item","time_series_columns","ColumnType","ColumnTitle","getLineConfigs","color","dash","opacity","symbol","symbolCircle","debug","top","right","bottom","left","scaleLinear","domain","extent","d","range","min","flatMap","slice","max","Math","floor","ceil","select","append","style","concat","selectAll","remove","attr","text","time_series_graph_title","axisBottom","time_series_graph_xaxis","axisLeft","time_series_graph_yaxis","tickSize","tickFormat","lineGen","validData","filter","isNaN","line","datum","enter","symbolGenerator","type","xVal","yVal","xOffset","yOffset","count","configs","size","window"],"sourceRoot":""} \ No newline at end of file diff --git a/webpack/app/TimeSeries.coffee b/webpack/app/TimeSeries.coffee index 451d60b..9c38880 100644 --- a/webpack/app/TimeSeries.coffee +++ b/webpack/app/TimeSeries.coffee @@ -68,7 +68,6 @@ class TimeSeries build_graph: -> console.log "TimeSeries::build_graph: entered" - console.log "TimeSeries::build_graph: is current" values = this.state.value if values == "" @@ -92,7 +91,7 @@ class TimeSeries opacity: "1.0", symbol: d3.symbolCircle } - console.log(line_configs) + console.debug(line_configs) # Set up dimensions margin = {top: 40, right: 80, bottom: 50, left: 60} @@ -200,11 +199,8 @@ class TimeSeries svg.append("g") .call(d3.axisLeft(y)) - console.log(headers) - console.log(data) - headers.slice(1).forEach((key, i) -> - console.log("Main loop: " + key + " " + i) + console.debug("Main loop: " + key + " " + i) # Filter data to exclude rows with null, undefined, or non-numeric values for the current key validData = data.filter((d) -> @@ -282,69 +278,4 @@ class TimeSeries console.log "TimeSeries::build_graph: svg done" - # # Convert SVG to PNG and replace it in the container - # d3ToPng(svg.node(), 'my-image', { scale: 2, download: false, format: 'png' }) - # .then (fileData) => - # # Create an image element and set its source to the generated PNG - # d3.select(@container).selectAll('svg').remove() # Remove existing SVG - # d3.select(@container).selectAll('img').remove() # Remove existing SVG - # d3.select(@container).append('div') - # .attr('id', 'test') - # d3.select(@container).append('img') - # .attr('id', 'mike') - # .attr('src', fileData) - # .attr('alt', 'Generated Image') - - # Convert SVG to PNG using a canvas - console.log("Container:", @container) - - test_svg = d3.select(@container).append('svg') - .attr('width', 100) - .attr('height', 100) - .attr('xmlns', 'http://www.w3.org/2000/svg') # Ensure correct namespace - - test_svg.append('circle') - .attr('cx', 50) - .attr('cy', 50) - .attr('r', 40) - .attr('fill', 'red') - - # svgString = new XMLSerializer().serializeToString(test_svg.node()) - # console.log('svgString: ' + svgString) - - # # Create canvas with same dimensions as SVG - # canvas = document.createElement 'canvas' - # canvas.width = width - # canvas.height = height - # - # parent = @container - # # Ensure container has the canvas - # parent.innerHTML = '' - # parent.appendChild canvas - - # # Directly log canvas and Canvg for debugging - # console.log 'Canvas:', canvas - # console.log 'Canvg:', Canvg - # console.log 'SVG outerHTML:', test_svg.node().outerHTML - - # try - # # Convert SVG to PNG - # Canvg.from(canvas, test_svg.node().outerHTML).then (canvg) -> - # canvg.render() - # - # # Convert to image and replace SVG - # img = document.createElement 'img' - # img.src = canvas.toDataURL 'image/png' - # container.innerHTML = '' - # container.appendChild img - - # .catch (error) -> - # console.error 'SVG to PNG conversion failed:', error - # catch err - # console.error 'Canvas creation error:', err - - - console.log "TimeSeries::build_graph: png done" - window.TimeSeries = TimeSeries -