cl-react-graph
Version:
1 lines • 352 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("cl-react-graph",["react","react-dom"],e):"object"==typeof exports?exports["cl-react-graph"]=e(require("react"),require("react-dom")):t["cl-react-graph"]=e(t.React,t.ReactDOM)}(window,(function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=138)}([function(e,n){e.exports=t},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=new Date,i=new Date;function a(t,e,n,o){function u(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return u.floor=function(e){return t(e=new Date(+e)),e},u.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},u.round=function(t){var e=u(t),n=u.ceil(t);return t-e<n-t?e:n},u.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},u.range=function(n,r,i){var a,o=[];if(n=u.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return o;do{o.push(a=new Date(+n)),e(n,i),t(n)}while(a<n&&n<r);return o},u.filter=function(n){return a((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(u.count=function(e,a){return r.setTime(+e),i.setTime(+a),t(r),t(i),Math.floor(n(r,i))},u.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?u.filter(o?function(e){return o(e)%t==0}:function(e){return u.count(0,e)%t==0}):u:null}),u}},function(t,e,n){"use strict";n.r(e),n.d(e,"interpolate",(function(){return S})),n.d(e,"interpolateArray",(function(){return v})),n.d(e,"interpolateBasis",(function(){return a})),n.d(e,"interpolateBasisClosed",(function(){return o})),n.d(e,"interpolateDate",(function(){return g})),n.d(e,"interpolateDiscrete",(function(){return A})),n.d(e,"interpolateHue",(function(){return E})),n.d(e,"interpolateNumber",(function(){return y})),n.d(e,"interpolateObject",(function(){return m})),n.d(e,"interpolateRound",(function(){return C})),n.d(e,"interpolateString",(function(){return k})),n.d(e,"interpolateTransformCss",(function(){return L})),n.d(e,"interpolateTransformSvg",(function(){return z})),n.d(e,"interpolateZoom",(function(){return B})),n.d(e,"interpolateRgb",(function(){return d})),n.d(e,"interpolateRgbBasis",(function(){return p})),n.d(e,"interpolateRgbBasisClosed",(function(){return b})),n.d(e,"interpolateHsl",(function(){return V})),n.d(e,"interpolateHslLong",(function(){return W})),n.d(e,"interpolateLab",(function(){return q})),n.d(e,"interpolateHcl",(function(){return H})),n.d(e,"interpolateHclLong",(function(){return Y})),n.d(e,"interpolateCubehelix",(function(){return Z})),n.d(e,"interpolateCubehelixLong",(function(){return K})),n.d(e,"piecewise",(function(){return Q})),n.d(e,"quantize",(function(){return J}));var r=n(6);function i(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}var a=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),a=t[r],o=t[r+1],u=r>0?t[r-1]:2*a-o,c=r<e-1?t[r+2]:2*o-a;return i((n-r/e)*e,u,a,o,c)}},o=function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),a=t[(r+e-1)%e],o=t[r%e],u=t[(r+1)%e],c=t[(r+2)%e];return i((n-r/e)*e,a,o,u,c)}},u=function(t){return function(){return t}};function c(t,e){return function(n){return t+n*e}}function s(t,e){var n=e-t;return n?c(t,n>180||n<-180?n-360*Math.round(n/360):n):u(isNaN(t)?e:t)}function f(t){return 1==(t=+t)?l:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):u(isNaN(e)?n:e)}}function l(t,e){var n=e-t;return n?c(t,n):u(isNaN(t)?e:t)}var d=function t(e){var n=f(e);function i(t,e){var i=n((t=Object(r.g)(t)).r,(e=Object(r.g)(e)).r),a=n(t.g,e.g),o=n(t.b,e.b),u=l(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=a(e),t.b=o(e),t.opacity=u(e),t+""}}return i.gamma=t,i}(1);function h(t){return function(e){var n,i,a=e.length,o=new Array(a),u=new Array(a),c=new Array(a);for(n=0;n<a;++n)i=Object(r.g)(e[n]),o[n]=i.r||0,u[n]=i.g||0,c[n]=i.b||0;return o=t(o),u=t(u),c=t(c),i.opacity=1,function(t){return i.r=o(t),i.g=u(t),i.b=c(t),i+""}}}var p=h(a),b=h(o),v=function(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=S(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}},g=function(t,e){var n=new Date;return e-=t=+t,function(r){return n.setTime(t+e*r),n}},y=function(t,e){return e-=t=+t,function(n){return t+e*n}},m=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=S(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,x=new RegExp(_.source,"g");var w,O,M,j,k=function(t,e){var n,r,i,a=_.lastIndex=x.lastIndex=0,o=-1,u=[],c=[];for(t+="",e+="";(n=_.exec(t))&&(r=x.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),u[o]?u[o]+=i:u[++o]=i),(n=n[0])===(r=r[0])?u[o]?u[o]+=r:u[++o]=r:(u[++o]=null,c.push({i:o,x:y(n,r)})),a=x.lastIndex;return a<e.length&&(i=e.slice(a),u[o]?u[o]+=i:u[++o]=i),u.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)u[(n=c[r]).i]=n.x(t);return u.join("")})},S=function(t,e){var n,i=typeof e;return null==e||"boolean"===i?u(e):("number"===i?y:"string"===i?(n=Object(r.e)(e))?(e=n,d):k:e instanceof r.e?d:e instanceof Date?g:Array.isArray(e)?v:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?m:y)(t,e)},A=function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},E=function(t,e){var n=s(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},C=function(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}},P=180/Math.PI,T={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},N=function(t,e,n,r,i,a){var o,u,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,c/=u),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*P,skewX:Math.atan(c)*P,scaleX:o,scaleY:u}};function D(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var u=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,u){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);u.push({i:c-4,x:y(t,i)},{i:c-2,x:y(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,u,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:y(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,u,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:y(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,u,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var u=a.push(i(a)+"scale(",null,",",null,")");o.push({i:u-4,x:y(t,n)},{i:u-2,x:y(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,u,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)u[(e=c[n]).i]=e.x(t);return u.join("")}}}var L=D((function(t){return"none"===t?T:(w||(w=document.createElement("DIV"),O=document.documentElement,M=document.defaultView),w.style.transform=t,t=M.getComputedStyle(O.appendChild(w),null).getPropertyValue("transform"),O.removeChild(w),t=t.slice(7,-1).split(","),N(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),z=D((function(t){return null==t?T:(j||(j=document.createElementNS("http://www.w3.org/2000/svg","g")),j.setAttribute("transform",t),(t=j.transform.baseVal.consolidate())?(t=t.matrix,N(t.a,t.b,t.c,t.d,t.e,t.f)):T)}),", ",")",")"),R=Math.SQRT2;function F(t){return((t=Math.exp(t))+1/t)/2}var B=function(t,e){var n,r,i=t[0],a=t[1],o=t[2],u=e[0],c=e[1],s=e[2],f=u-i,l=c-a,d=f*f+l*l;if(d<1e-12)r=Math.log(s/o)/R,n=function(t){return[i+t*f,a+t*l,o*Math.exp(R*t*r)]};else{var h=Math.sqrt(d),p=(s*s-o*o+4*d)/(2*o*2*h),b=(s*s-o*o-4*d)/(2*s*2*h),v=Math.log(Math.sqrt(p*p+1)-p),g=Math.log(Math.sqrt(b*b+1)-b);r=(g-v)/R,n=function(t){var e,n=t*r,u=F(v),c=o/(2*h)*(u*(e=R*n+v,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[i+c*f,a+c*l,o*u/F(R*n+v)]}}return n.duration=1e3*r,n};function I(t){return function(e,n){var i=t((e=Object(r.f)(e)).h,(n=Object(r.f)(n)).h),a=l(e.s,n.s),o=l(e.l,n.l),u=l(e.opacity,n.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(t),e.opacity=u(t),e+""}}}var V=I(s),W=I(l),U=n(41);function q(t,e){var n=l((t=Object(U.a)(t)).l,(e=Object(U.a)(e)).l),r=l(t.a,e.a),i=l(t.b,e.b),a=l(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function G(t){return function(e,n){var r=t((e=Object(U.c)(e)).h,(n=Object(U.c)(n)).h),i=l(e.c,n.c),a=l(e.l,n.l),o=l(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var H=G(s),Y=G(l),X=n(102);function $(t){return function e(n){function r(e,r){var i=t((e=Object(X.a)(e)).h,(r=Object(X.a)(r)).h),a=l(e.s,r.s),o=l(e.l,r.l),u=l(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=u(t),e+""}}return n=+n,r.gamma=e,r}(1)}var Z=$(s),K=$(l);function Q(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}}var J=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}},function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return o})),n.d(e,"e",(function(){return u}));var r=1e3,i=6e4,a=36e5,o=864e5,u=6048e5},function(t,e,n){"use strict";e.a=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}},function(t,e,n){"use strict";n.r(e),n.d(e,"bisect",(function(){return r.c})),n.d(e,"bisectRight",(function(){return r.b})),n.d(e,"bisectLeft",(function(){return r.a})),n.d(e,"ascending",(function(){return i.a})),n.d(e,"bisector",(function(){return a.a})),n.d(e,"count",(function(){return o})),n.d(e,"cross",(function(){return f})),n.d(e,"cumsum",(function(){return l})),n.d(e,"descending",(function(){return d})),n.d(e,"deviation",(function(){return p})),n.d(e,"extent",(function(){return b})),n.d(e,"group",(function(){return g})),n.d(e,"groups",(function(){return y})),n.d(e,"rollup",(function(){return m})),n.d(e,"rollups",(function(){return _})),n.d(e,"bin",(function(){return A})),n.d(e,"histogram",(function(){return A})),n.d(e,"thresholdFreedmanDiaconis",(function(){return C})),n.d(e,"thresholdScott",(function(){return P})),n.d(e,"thresholdSturges",(function(){return S})),n.d(e,"max",(function(){return T.a})),n.d(e,"maxIndex",(function(){return N})),n.d(e,"mean",(function(){return D})),n.d(e,"median",(function(){return L})),n.d(e,"merge",(function(){return z})),n.d(e,"min",(function(){return R.a})),n.d(e,"minIndex",(function(){return F})),n.d(e,"pairs",(function(){return B})),n.d(e,"permute",(function(){return V})),n.d(e,"quantile",(function(){return E.a})),n.d(e,"quantileSorted",(function(){return E.b})),n.d(e,"quickselect",(function(){return W.a})),n.d(e,"range",(function(){return j.a})),n.d(e,"least",(function(){return U})),n.d(e,"leastIndex",(function(){return q})),n.d(e,"greatest",(function(){return G})),n.d(e,"greatestIndex",(function(){return H})),n.d(e,"scan",(function(){return Y})),n.d(e,"shuffle",(function(){return X})),n.d(e,"sum",(function(){return $})),n.d(e,"ticks",(function(){return k.a})),n.d(e,"tickIncrement",(function(){return k.b})),n.d(e,"tickStep",(function(){return k.c})),n.d(e,"transpose",(function(){return Z})),n.d(e,"variance",(function(){return h})),n.d(e,"zip",(function(){return Q}));var r=n(35),i=n(4),a=n(72);function o(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}function u(t){return 0|t.length}function c(t){return!(t>0)}function s(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function f(...t){const e="function"==typeof t[t.length-1]&&function(t){return e=>t(...e)}(t.pop()),n=(t=t.map(s)).map(u),r=t.length-1,i=new Array(r+1).fill(0),a=[];if(r<0||n.some(c))return a;for(;;){a.push(i.map((e,n)=>t[n][e]));let o=r;for(;++i[o]===n[o];){if(0===o)return e?a.map(e):a;i[o--]=0}}}function l(t,e){var n=0,r=0;return Float64Array.from(t,void 0===e?t=>n+=+t||0:i=>n+=+e(i,r++,t)||0)}var d=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN};function h(t,e){let n,r=0,i=0,a=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,a+=n*(e-i));else{let o=-1;for(let u of t)null!=(u=e(u,++o,t))&&(u=+u)>=u&&(n=u-i,i+=n/++r,a+=n*(u-i))}if(r>1)return a/(r-1)}function p(t,e){const n=h(t,e);return n?Math.sqrt(n):n}var b=function(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let a of t)null!=(a=e(a,++i,t))&&(void 0===n?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]},v=function(t){return t};function g(t,...e){return x(t,v,v,e)}function y(t,...e){return x(t,Array.from,v,e)}function m(t,e,...n){return x(t,v,e,n)}function _(t,e,...n){return x(t,Array.from,e,n)}function x(t,e,n,r){return function t(i,a){if(a>=r.length)return n(i);const o=new Map,u=r[a++];let c=-1;for(const t of i){const e=u(t,++c,i),n=o.get(e);n?n.push(t):o.set(e,[t])}for(const[e,n]of o)o.set(e,t(n,a));return e(o)}(t,0)}var w=Array.prototype,O=w.slice,M=(w.map,function(t){return function(){return t}}),j=n(71),k=n(34),S=function(t){return Math.ceil(Math.log(o(t))/Math.LN2)+1},A=function(){var t=v,e=b,n=S;function i(i){Array.isArray(i)||(i=Array.from(i));var a,o,u=i.length,c=new Array(u);for(a=0;a<u;++a)c[a]=t(i[a],a,i);var s=e(c),f=s[0],l=s[1],d=n(c,f,l);Array.isArray(d)||(d=Object(k.c)(f,l,d),d=Object(j.a)(Math.ceil(f/d)*d,l,d));for(var h=d.length;d[0]<=f;)d.shift(),--h;for(;d[h-1]>l;)d.pop(),--h;var p,b=new Array(h+1);for(a=0;a<=h;++a)(p=b[a]=[]).x0=a>0?d[a-1]:f,p.x1=a<h?d[a]:l;for(a=0;a<u;++a)f<=(o=c[a])&&o<=l&&b[Object(r.c)(d,o,0,h)].push(i[a]);return b}return i.value=function(e){return arguments.length?(t="function"==typeof e?e:M(e),i):t},i.domain=function(t){return arguments.length?(e="function"==typeof t?t:M([t[0],t[1]]),i):e},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?M(O.call(t)):M(t),i):n},i},E=n(19),C=function(t,e,n){return Math.ceil((n-e)/(2*(Object(E.a)(t,.75)-Object(E.a)(t,.25))*Math.pow(o(t),-1/3)))},P=function(t,e,n){return Math.ceil((n-e)/(3.5*p(t)*Math.pow(o(t),-1/3)))},T=n(50);function N(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n<e||void 0===n&&e>=e)&&(n=e,r=i);else for(let a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function D(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else{let i=-1;for(let a of t)null!=(a=e(a,++i,t))&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}var L=function(t,e){return Object(E.a)(t,.5,e)};function z(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}var R=n(26);function F(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}function B(t,e=I){const n=[];let r,i=!1;for(const a of t)i&&n.push(e(r,a)),r=a,i=!0;return n}function I(t,e){return[t,e]}var V=function(t,e){return Array.from(e,e=>t[e])},W=n(73);function U(t,e=i.a){let n,r=!1;if(1===e.length){let a;for(const o of t){const t=e(o);(r?Object(i.a)(t,a)<0:0===Object(i.a)(t,t))&&(n=o,a=t,r=!0)}}else for(const i of t)(r?e(i,n)<0:0===e(i,i))&&(n=i,r=!0);return n}function q(t,e=i.a){if(1===e.length)return F(t,e);let n,r=-1,a=-1;for(const i of t)++a,(r<0?0===e(i,i):e(i,n)<0)&&(n=i,r=a);return r}function G(t,e=i.a){let n,r=!1;if(1===e.length){let a;for(const o of t){const t=e(o);(r?Object(i.a)(t,a)>0:0===Object(i.a)(t,t))&&(n=o,a=t,r=!0)}}else for(const i of t)(r?e(i,n)>0:0===e(i,i))&&(n=i,r=!0);return n}function H(t,e=i.a){if(1===e.length)return N(t,e);let n,r=-1,a=-1;for(const i of t)++a,(r<0?0===e(i,i):e(i,n)>0)&&(n=i,r=a);return r}function Y(t,e){const n=q(t,e);return n<0?void 0:n}function X(t,e=0,n=t.length){for(var r,i,a=n-(e=+e);a;)i=Math.random()*a--|0,r=t[a+e],t[a+e]=t[i+e],t[i+e]=r;return t}function $(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}var Z=function(t){if(!(i=t.length))return[];for(var e=-1,n=Object(R.a)(t,K),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r};function K(t){return t.length}var Q=function(){return Z(arguments)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return o})),n.d(e,"e",(function(){return _})),n.d(e,"h",(function(){return O})),n.d(e,"g",(function(){return M})),n.d(e,"b",(function(){return j})),n.d(e,"f",(function(){return P}));var r=n(8);function i(){}var a=.7,o=1/a,u="\\s*([+-]?\\d+)\\s*",c="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f=/^#([0-9a-f]{3,8})$/,l=new RegExp("^rgb\\("+[u,u,u]+"\\)$"),d=new RegExp("^rgb\\("+[s,s,s]+"\\)$"),h=new RegExp("^rgba\\("+[u,u,u,c]+"\\)$"),p=new RegExp("^rgba\\("+[s,s,s,c]+"\\)$"),b=new RegExp("^hsl\\("+[c,s,s]+"\\)$"),v=new RegExp("^hsla\\("+[c,s,s,c]+"\\)$"),g={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function y(){return this.rgb().formatHex()}function m(){return this.rgb().formatRgb()}function _(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=f.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?x(e):3===n?new j(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?w(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?w(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=l.exec(t))?new j(e[1],e[2],e[3],1):(e=d.exec(t))?new j(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=h.exec(t))?w(e[1],e[2],e[3],e[4]):(e=p.exec(t))?w(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=b.exec(t))?E(e[1],e[2]/100,e[3]/100,1):(e=v.exec(t))?E(e[1],e[2]/100,e[3]/100,e[4]):g.hasOwnProperty(t)?x(g[t]):"transparent"===t?new j(NaN,NaN,NaN,0):null}function x(t){return new j(t>>16&255,t>>8&255,255&t,1)}function w(t,e,n,r){return r<=0&&(t=e=n=NaN),new j(t,e,n,r)}function O(t){return t instanceof i||(t=_(t)),t?new j((t=t.rgb()).r,t.g,t.b,t.opacity):new j}function M(t,e,n,r){return 1===arguments.length?O(t):new j(t,e,n,null==r?1:r)}function j(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function k(){return"#"+A(this.r)+A(this.g)+A(this.b)}function S(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function A(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function E(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new T(t,e,n,r)}function C(t){if(t instanceof T)return new T(t.h,t.s,t.l,t.opacity);if(t instanceof i||(t=_(t)),!t)return new T;if(t instanceof T)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,a=Math.min(e,n,r),o=Math.max(e,n,r),u=NaN,c=o-a,s=(o+a)/2;return c?(u=e===o?(n-r)/c+6*(n<r):n===o?(r-e)/c+2:(e-n)/c+4,c/=s<.5?o+a:2-o-a,u*=60):c=s>0&&s<1?0:u,new T(u,c,s,t.opacity)}function P(t,e,n,r){return 1===arguments.length?C(t):new T(t,e,n,null==r?1:r)}function T(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function N(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Object(r.a)(i,_,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:y,formatHex:y,formatHsl:function(){return C(this).formatHsl()},formatRgb:m,toString:m}),Object(r.a)(j,M,Object(r.b)(i,{brighter:function(t){return t=null==t?o:Math.pow(o,t),new j(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?a:Math.pow(a,t),new j(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:k,formatHex:k,formatRgb:S,toString:S})),Object(r.a)(T,P,Object(r.b)(i,{brighter:function(t){return t=null==t?o:Math.pow(o,t),new T(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?a:Math.pow(a,t),new T(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new j(N(t>=240?t-240:t+120,i,r),N(t,i,r),N(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}))},function(t,e,n){"use strict";n.r(e),n.d(e,"create",(function(){return o})),n.d(e,"creator",(function(){return r.a})),n.d(e,"local",(function(){return c})),n.d(e,"matcher",(function(){return f.a})),n.d(e,"mouse",(function(){return p})),n.d(e,"namespace",(function(){return b.a})),n.d(e,"namespaces",(function(){return v.a})),n.d(e,"clientPoint",(function(){return h})),n.d(e,"select",(function(){return a})),n.d(e,"selectAll",(function(){return g})),n.d(e,"selection",(function(){return i.b})),n.d(e,"selector",(function(){return y.a})),n.d(e,"selectorAll",(function(){return m.a})),n.d(e,"style",(function(){return _.b})),n.d(e,"touch",(function(){return x})),n.d(e,"touches",(function(){return w})),n.d(e,"window",(function(){return O.a})),n.d(e,"event",(function(){return l.c})),n.d(e,"customEvent",(function(){return l.a}));var r=n(18),i=n(15),a=function(t){return"string"==typeof t?new i.a([[document.querySelector(t)]],[document.documentElement]):new i.a([[t]],i.c)},o=function(t){return a(Object(r.a)(t).call(document.documentElement))},u=0;function c(){return new s}function s(){this._="@"+(++u).toString(36)}s.prototype=c.prototype={constructor:s,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var f=n(76),l=n(25),d=function(){for(var t,e=l.c;t=e.sourceEvent;)e=t;return e},h=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]},p=function(t){var e=d();return e.changedTouches&&(e=e.changedTouches[0]),h(t,e)},b=n(38),v=n(20),g=function(t){return"string"==typeof t?new i.a([document.querySelectorAll(t)],[document.documentElement]):new i.a([null==t?[]:t],i.c)},y=n(37),m=n(75),_=n(77),x=function(t,e,n){arguments.length<3&&(n=e,e=d().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return h(t,r);return null},w=function(t,e){null==e&&(e=d().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=h(t,e[n]);return i},O=n(39)},function(t,e,n){"use strict";function r(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}n.d(e,"b",(function(){return r})),e.a=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t}},function(t,e,n){"use strict";n.r(e);var r=n(6);n.d(e,"color",(function(){return r.e})),n.d(e,"rgb",(function(){return r.g})),n.d(e,"hsl",(function(){return r.f}));var i=n(41);n.d(e,"lab",(function(){return i.a})),n.d(e,"hcl",(function(){return i.c})),n.d(e,"lch",(function(){return i.d})),n.d(e,"gray",(function(){return i.b}));var a=n(102);n.d(e,"cubehelix",(function(){return a.a}))},function(t,e,n){"use strict";n.r(e),n.d(e,"scaleBand",(function(){return c})),n.d(e,"scalePoint",(function(){return f})),n.d(e,"scaleIdentity",(function(){return P})),n.d(e,"scaleLinear",(function(){return C})),n.d(e,"scaleLog",(function(){return I})),n.d(e,"scaleSymlog",(function(){return q})),n.d(e,"scaleOrdinal",(function(){return u})),n.d(e,"scaleImplicit",(function(){return o})),n.d(e,"scalePow",(function(){return $})),n.d(e,"scaleSqrt",(function(){return Z})),n.d(e,"scaleRadial",(function(){return J})),n.d(e,"scaleQuantile",(function(){return nt})),n.d(e,"scaleQuantize",(function(){return rt})),n.d(e,"scaleThreshold",(function(){return it})),n.d(e,"scaleTime",(function(){return jt})),n.d(e,"scaleUtc",(function(){return Lt})),n.d(e,"scaleSequential",(function(){return Ft})),n.d(e,"scaleSequentialLog",(function(){return Bt})),n.d(e,"scaleSequentialPow",(function(){return Vt})),n.d(e,"scaleSequentialSqrt",(function(){return Wt})),n.d(e,"scaleSequentialSymlog",(function(){return It})),n.d(e,"scaleSequentialQuantile",(function(){return Ut})),n.d(e,"scaleDiverging",(function(){return Gt})),n.d(e,"scaleDivergingLog",(function(){return Ht})),n.d(e,"scaleDivergingPow",(function(){return Xt})),n.d(e,"scaleDivergingSqrt",(function(){return $t})),n.d(e,"scaleDivergingSymlog",(function(){return Yt})),n.d(e,"tickFormat",(function(){return A}));var r=n(71);function i(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function a(t,e){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof e?this.interpolator(e):this.range(e)}return this}const o=Symbol("implicit");function u(){var t=new Map,e=[],n=[],r=o;function a(i){var a=i+"",u=t.get(a);if(!u){if(r!==o)return r;t.set(a,u=e.push(i))}return n[(u-1)%n.length]}return a.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Map;for(const r of n){const n=r+"";t.has(n)||t.set(n,e.push(r))}return a},a.range=function(t){return arguments.length?(n=Array.from(t),a):n.slice()},a.unknown=function(t){return arguments.length?(r=t,a):r},a.copy=function(){return u(e,n).unknown(r)},i.apply(a,arguments),a}function c(){var t,e,n=u().unknown(void 0),a=n.domain,o=n.range,s=0,f=1,l=!1,d=0,h=0,p=.5;function b(){var n=a().length,i=f<s,u=i?f:s,c=i?s:f;t=(c-u)/Math.max(1,n-d+2*h),l&&(t=Math.floor(t)),u+=(c-u-t*(n-d))*p,e=t*(1-d),l&&(u=Math.round(u),e=Math.round(e));var b=Object(r.a)(n).map((function(e){return u+t*e}));return o(i?b.reverse():b)}return delete n.unknown,n.domain=function(t){return arguments.length?(a(t),b()):a()},n.range=function(t){return arguments.length?([s,f]=t,s=+s,f=+f,b()):[s,f]},n.rangeRound=function(t){return[s,f]=t,s=+s,f=+f,l=!0,b()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(l=!!t,b()):l},n.padding=function(t){return arguments.length?(d=Math.min(1,h=+t),b()):d},n.paddingInner=function(t){return arguments.length?(d=Math.min(1,t),b()):d},n.paddingOuter=function(t){return arguments.length?(h=+t,b()):h},n.align=function(t){return arguments.length?(p=Math.max(0,Math.min(1,t)),b()):p},n.copy=function(){return c(a(),[s,f]).round(l).paddingInner(d).paddingOuter(h).align(p)},i.apply(b(),arguments)}function s(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return s(e())},t}function f(){return s(c.apply(null,arguments).paddingInner(1))}var l=n(34),d=n(35),h=n(2),p=function(t){return+t},b=[0,1];function v(t){return t}function g(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function y(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=g(i,r),a=n(o,a)):(r=g(r,i),a=n(a,o)),function(t){return a(r(t))}}function m(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=g(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=Object(d.c)(t,e,1,r)-1;return a[n](i[n](e))}}function _(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function x(){var t,e,n,r,i,a,o=b,u=b,c=h.interpolate,s=v;function f(){var t,e,n,c=Math.min(o.length,u.length);return s!==v&&(t=o[0],e=o[c-1],t>e&&(n=t,t=e,e=n),s=function(n){return Math.max(t,Math.min(e,n))}),r=c>2?m:y,i=a=null,l}function l(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),u,c)))(t(s(e)))}return l.invert=function(n){return s(e((a||(a=r(u,o.map(t),h.interpolateNumber)))(n)))},l.domain=function(t){return arguments.length?(o=Array.from(t,p),f()):o.slice()},l.range=function(t){return arguments.length?(u=Array.from(t),f()):u.slice()},l.rangeRound=function(t){return u=Array.from(t),c=h.interpolateRound,f()},l.clamp=function(t){return arguments.length?(s=!!t||v,f()):s!==v},l.interpolate=function(t){return arguments.length?(c=t,f()):c},l.unknown=function(t){return arguments.length?(n=t,l):n},function(n,r){return t=n,e=r,f()}}function w(){return x()(v,v)}var O=n(36),M=n(99),j=n(54),k=n(100),S=n(101),A=function(t,e,n,r){var i,a=Object(l.c)(t,e,n);switch((r=Object(O.b)(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=Object(M.a)(a,o))||(r.precision=i),Object(j.c)(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=Object(k.a)(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=Object(S.a)(a))||(r.precision=i-2*("%"===r.type))}return Object(j.b)(r)};function E(t){var e=t.domain;return t.ticks=function(t){var n=e();return Object(l.a)(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return A(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,u=i[a],c=i[o];return c<u&&(r=u,u=c,c=r,r=a,a=o,o=r),(r=Object(l.b)(u,c,n))>0?(u=Math.floor(u/r)*r,c=Math.ceil(c/r)*r,r=Object(l.b)(u,c,n)):r<0&&(u=Math.ceil(u*r)/r,c=Math.floor(c*r)/r,r=Object(l.b)(u,c,n)),r>0?(i[a]=Math.floor(u/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(u*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function C(){var t=w();return t.copy=function(){return _(t,C())},i.apply(t,arguments),E(t)}function P(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Array.from(e,p),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return P(t).unknown(e)},t=arguments.length?Array.from(t,p):[0,1],E(n)}var T=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t};function N(t){return Math.log(t)}function D(t){return Math.exp(t)}function L(t){return-Math.log(-t)}function z(t){return-Math.exp(-t)}function R(t){return isFinite(t)?+("1e"+t):t<0?0:t}function F(t){return function(e){return-t(-e)}}function B(t){var e,n,r=t(N,D),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?R:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=F(e),n=F(n),t(L,z)):t(N,D),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),u=o[0],c=o[o.length-1];(r=c<u)&&(h=u,u=c,c=h);var s,f,d,h=e(u),p=e(c),b=null==t?10:+t,v=[];if(!(a%1)&&p-h<b){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;++h)for(f=1,s=n(h);f<a;++f)if(!((d=s*f)<u)){if(d>c)break;v.push(d)}}else for(;h<=p;++h)for(f=a-1,s=n(h);f>=1;--f)if(!((d=s*f)<u)){if(d>c)break;v.push(d)}2*v.length<b&&(v=Object(l.a)(u,c,b))}else v=Object(l.a)(h,p,Math.min(p-h,b)).map(n);return r?v.reverse():v},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Object(j.b)(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(T(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function I(){var t=B(x()).domain([1,10]);return t.copy=function(){return _(t,I()).base(t.base())},i.apply(t,arguments),t}function V(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function W(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function U(t){var e=1,n=t(V(e),W(e));return n.constant=function(n){return arguments.length?t(V(e=+n),W(e)):e},E(n)}function q(){var t=U(x());return t.copy=function(){return _(t,q()).constant(t.constant())},i.apply(t,arguments)}function G(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function H(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Y(t){return t<0?-t*t:t*t}function X(t){var e=t(v,v),n=1;function r(){return 1===n?t(v,v):.5===n?t(H,Y):t(G(n),G(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},E(e)}function $(){var t=X(x());return t.copy=function(){return _(t,$()).exponent(t.exponent())},i.apply(t,arguments),t}function Z(){return $.apply(null,arguments).exponent(.5)}function K(t){return Math.sign(t)*t*t}function Q(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function J(){var t,e=w(),n=[0,1],r=!1;function a(n){var i=Q(e(n));return isNaN(i)?t:r?Math.round(i):i}return a.invert=function(t){return e.invert(K(t))},a.domain=function(t){return arguments.length?(e.domain(t),a):e.domain()},a.range=function(t){return arguments.length?(e.range((n=Array.from(t,p)).map(K)),a):n.slice()},a.rangeRound=function(t){return a.range(t).round(!0)},a.round=function(t){return arguments.length?(r=!!t,a):r},a.clamp=function(t){return arguments.length?(e.clamp(t),a):e.clamp()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.copy=function(){return J(e.domain(),n).round(r).clamp(e.clamp()).unknown(t)},i.apply(a,arguments),E(a)}var tt=n(19),et=n(4);function nt(){var t,e=[],n=[],r=[];function a(){var t=0,i=Math.max(1,n.length);for(r=new Array(i-1);++t<i;)r[t-1]=Object(tt.a)(e,t/i);return o}function o(e){return isNaN(e=+e)?t:n[Object(d.c)(r,e)]}return o.invertExtent=function(t){var i=n.indexOf(t);return i<0?[NaN,NaN]:[i>0?r[i-1]:e[0],i<r.length?r[i]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(et.a),a()},o.range=function(t){return arguments.length?(n=Array.from(t),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return r.slice()},o.copy=function(){return nt().domain(e).range(n).unknown(t)},i.apply(o,arguments)}function rt(){var t,e=0,n=1,r=1,a=[.5],o=[0,1];function u(e){return e<=e?o[Object(d.c)(a,e,0,r)]:t}function c(){var t=-1;for(a=new Array(r);++t<r;)a[t]=((t+1)*n-(t-r)*e)/(r+1);return u}return u.domain=function(t){return arguments.length?([e,n]=t,e=+e,n=+n,c()):[e,n]},u.range=function(t){return arguments.length?(r=(o=Array.from(t)).length-1,c()):o.slice()},u.invertExtent=function(t){var i=o.indexOf(t);return i<0?[NaN,NaN]:i<1?[e,a[0]]:i>=r?[a[r-1],n]:[a[i-1],a[i]]},u.unknown=function(e){return arguments.length?(t=e,u):u},u.thresholds=function(){return a.slice()},u.copy=function(){return rt().domain([e,n]).range(o).unknown(t)},i.apply(E(u),arguments)}function it(){var t,e=[.5],n=[0,1],r=1;function a(i){return i<=i?n[Object(d.c)(e,i,0,r)]:t}return a.domain=function(t){return arguments.length?(e=Array.from(t),r=Math.min(e.length,n.length-1),a):e.slice()},a.range=function(t){return arguments.length?(n=Array.from(t),r=Math.min(e.length,n.length-1),a):n.slice()},a.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},a.unknown=function(e){return arguments.length?(t=e,a):t},a.copy=function(){return it().domain(e).range(n).unknown(t)},i.apply(a,arguments)}var at=n(72),ot=n(51),ut=n(1),ct=Object(ut.a)((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),st=ct,ft=(ct.range,n(28)),lt=n(135),dt=n(3),ht=Object(ut.a)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*dt.d-t.getMinutes()*dt.c)}),(function(t,e){t.setTime(+t+e*dt.b)}),(function(t,e){return(e-t)/dt.b}),(function(t){return t.getHours()})),pt=ht,bt=(ht.range,Object(ut.a)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*dt.d)}),(function(t,e){t.setTime(+t+e*dt.c)}),(function(t,e){return(e-t)/dt.c}),(function(t){return t.getMinutes()}))),vt=bt,gt=(bt.range,Object(ut.a)((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*dt.d)}),(function(t,e){return(e-t)/dt.d}),(function(t){return t.getUTCSeconds()}))),yt=gt,mt=(gt.range,Object(ut.a)((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t})));mt.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Object(ut.a)((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):mt:null};var _t=mt,xt=(mt.range,n(13));function wt(t){return new Date(t)}function Ot(t){return t instanceof Date?+t:+new Date(+t)}function Mt(t,e,n,r,i,a,o,u,c){var s=w(),f=s.invert,d=s.domain,h=c(".%L"),p=c(":%S"),b=c("%I:%M"),v=c("%I %p"),g=c("%a %d"),y=c("%b %d"),m=c("%B"),x=c("%Y"),O=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function M(u){return(o(u)<u?h:a(u)<u?p:i(u)<u?b:r(u)<u?v:e(u)<u?n(u)<u?g:y:t(u)<u?m:x)(u)}function j(e,n,r){if(null==e&&(e=10),"number"==typeof e){var i,a=Math.abs(r-n)/e,o=Object(at.a)((function(t){return t[2]})).right(O,a);return o===O.length?(i=Object(l.c)(n/31536e6,r/31536e6,e),e=t):o?(i=(o=O[a/O[o-1][2]<O[o][2]/a?o-1:o])[1],e=o[0]):(i=Math.max(Object(l.c)(n,r,e),1),e=u),e.every(i)}return e}return s.invert=function(t){return new Date(f(t))},s.domain=function(t){return arguments.length?d(Array.from(t,Ot)):d().map(wt)},s.ticks=function(t){var e,n=d(),r=n[0],i=n[n.length-1],a=i<r;return a&&(e=r,r=i,i=e),e=(e=j(t,r,i))?e.range(r,i+1):[],a?e.reverse():e},s.tickFormat=function(t,e){return null==e?M:c(e)},s.nice=function(t){var e=d();return(t=j(t,e[0],e[e.length-1]))?d(T(e,t)):s},s.copy=function(){return _(s,Mt(t,e,n,r,i,a,o,u,c))},s}var jt=function(){return i.apply(Mt(ot.a,st,ft.b,lt.a,pt,vt,yt,_t,xt.b).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},kt=n(52),St=Object(ut.a)((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),At=St,Et=(St.range,n(29)),Ct=n(136),Pt=Object(ut.a)((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*dt.b)}),(function(t,e){return(e-t)/dt.b}),(function(t){return t.getUTCHours()})),Tt=Pt,Nt=(Pt.range,Object(ut.a)((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*dt.c)}),(function(t,e){return(e-t)/dt.c}),(function(t){return t.getUTCMinutes()}))),Dt=Nt,Lt=(Nt.range,function(){return i.apply(Mt(kt.a,At,Et.b,Ct.a,Tt,Dt,yt,_t,xt.d).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)});function zt(){var t,e,n,r,i,a=0,o=1,u=v,c=!1;function s(e){return isNaN(e=+e)?i:u(0===n?.5:(e=(r(e)-t)*n,c?Math.max(0,Math.min(1,e)):e))}function f(t){return function(e){var n,r;return arguments.length?([n,r]=e,u=t(n,r),s):[u(0),u(1)]}}return s.domain=function(i){return arguments.length?([a,o]=i,t=r(a=+a),e=r(o=+o),n=t===e?0:1/(e-t),s):[a,o]},s.clamp=function(t){return arguments.length?(c=!!t,s):c},s.interpolator=function(t){return arguments.length?(u=t,s):u},s.range=f(h.interpolate),s.rangeRound=f(h.interpolateRound),s.unknown=function(t){return arguments.length?(i=t,s):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),s}}function Rt(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Ft(){var t=E(zt()(v));return t.copy=function(){return Rt(t,Ft())},a.apply(t,arguments)}function Bt(){var t=B(zt()).domain([1,10]);return t.copy=function(){return Rt(t,Bt()).base(t.base())},a.apply(t,arguments)}function It(){var t=U(zt());return t.copy=function(){return Rt(t,It()).constant(t.constant())},a.apply(t,arguments)}function Vt(){var t=X(zt());return t.copy=function(){return Rt(t,Vt()).exponent(t.exponent())},a.apply(t,arguments)}function Wt(){return Vt.apply(null,arguments).exponent(.5)}function Ut(){var t=[],e=v;function n(n){if(!isNaN(n=+n))return e((Object(d.c)(t,n,1)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(et.a),n},n.interpolator=function(t){return arguments.length?(e=t,n):e},n.range=function(){return t.map((n,r)=>e(r/(t.length-1)))},n.quantiles=function(e){return Array.from({length:e+1},(n,r)=>Object(tt.a)(t,r/e))},n.copy=function(){return Ut(e).domain(t)},a.apply(n,arguments)}function qt(){var t,e,n,r,i,a,o,u=0,c=.5,s=1,f=1,l=v,d=!1;function p(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(f*t<f*e?r:i),l(d?Math.max(0,Math.min(1,t)):t))}function b(t){return function(e){var n,r,i;return arguments.length?([n,r,i]=e,l=Object(h.piecewise)(t,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.domain=function(o){return arguments.length?([u,c,s]=o,t=a(u=+u),e=a(c=+c),n=a(s=+s),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f=e<t?-1:1,p):[u,c,s]},p.clamp=function(t){return arguments.length?(d=!!t,p):d},p.interpolator=function(t){return arguments.length?(l=t,p):l},p.range=b(h.interpolate),p.rangeRound=b(h.interpolateRound),p.unknown=function(t){return arguments.length?(o=t,p):o},function(o){return a=o,t=o(u),e=o(c),n=o(s),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f=e<t?-1:1,p}}function Gt(){var t=E(qt()(v));return t.copy=function(){return Rt(t,Gt())},a.apply(t,arguments)}function Ht(){var t=B(qt()).domain([.1,1,10]);return t.copy=function(){return Rt(t,Ht()).base(t.base())},a.apply(t,arguments)}function Yt(){var t=U(qt());return t.copy=function(){return Rt(t,Yt()).constant(t.constant())},a.apply(t,arguments)}function Xt(){var t=X(qt());return t.copy=function(){return Rt(t,Xt()).exponent(t.exponent())},a.apply(t,arguments)}function $t(){return Xt.apply(null,arguments).exponent(.5)}},function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),u=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),c=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&o(e,t,n);return u(e,t),e},s=this&&this.__rest||function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n},f=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.EGroupedBarLayout=e.EColorManipulations=void 0;var l=c(n(0)),d=f(n(17)),h=n(140);!function(t){t.negate="negate",t.lighten="lighten",t.darken="darken",t.saturate="saturate",t.desaturate="desaturate",t.whiten="whiten",t.blacken="blacken",t.fade="fade",t.opaquer="opaquer",t.rotate="rotate"}(e.EColorManipulations||(e.EColorManipulations={})),function(t){t[t.GROUPED=0]="GROUPED",t[t.STACKED=1]="STACKED",t[t.OVERLAID=2]="OVERLAID"}(e.EGroupedBarLayout||(e.EGroupedBarLayout={}));var p=function(t){function e(e){var n=t.call(this,e)||this;return n.ref=null,n.chart=new h.HistogramD3,n.state={parentWidth:300},n}return i(e,t),e.prototype.handleResize=function(){var t=this;if(this.getDOMNode()){var e=this.ref&&this.ref.offsetWidth?this.ref.offsetWidth:0;this.setState({parentWidth:e},(function(){return t.chart.update(t.getChartState())}))}},e.prototype.componentDidMount=function(){var t=this,e=this.getDOMNode();e&&(this.chart.create(e,this.getChartState()),"100%"===this.props.width&&(window.addEventListener("resize",(function(e){return t.handleResize()})),this.handleResize()))},e.prototype.componentDidUpdate=function(){this.getDOMNode()&&this.chart.update(this.getChartState())},e.prototype.getChartState=function(){var t=this.props.width,e=this.props,n=(e.children,s(e,["children"]));return"100%"===t&&(t=this.state.parentWidth||300),a(a({},n),{width:t})},e.prototype.componentWillUnmount=function(){this.getDOMNode()&&("100%"===this.props.width&&window.removeEventListener("resize",this.handleResize),this.chart.destroy())},e.prototype.getDOMNode=function(){var t=d.default.findDOMNode(this.ref);try{if(t instanceof Text)return;return t}catch(e){return t}},e.prototype.render=function(){var t=this;return l.default.createElement("div",{ref:function(e){return t.ref=e},className:"histogram-chart-container"})},e}(l.Component);e.default=p},function(t,e,n){var r=n(105),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return o})),n.d(e,"e",(function(){return u})),n.d(e,"a",(function(){return s}));var r,i,a,o,u,c=n(74);function s(t){return r=Object(c.a)(t),i=r.format,a=r.parse,o=r.utcForm