cl-react-graph
Version:
1 lines • 247 kB
JavaScript
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("cl-react-graph",["react","react-dom"],n):"object"==typeof exports?exports["cl-react-graph"]=n(require("react"),require("react-dom")):t["cl-react-graph"]=n(t.React,t.ReactDOM)}(window,function(t,n){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="/",e(e.s=19)}([function(t,n,e){"use strict";var r=new Date,i=new Date;function o(t,n,e,a){function u(n){return t(n=new Date(+n)),n}return u.floor=u,u.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},u.round=function(t){var n=u(t),e=u.ceil(t);return t-n<e-t?n:e},u.offset=function(t,e){return n(t=new Date(+t),null==e?1:Math.floor(e)),t},u.range=function(e,r,i){var o,a=[];if(e=u.ceil(e),i=null==i?1:Math.floor(i),!(e<r&&i>0))return a;do{a.push(o=new Date(+e)),n(e,i),t(e)}while(o<e&&e<r);return a},u.filter=function(e){return o(function(n){if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););})},e&&(u.count=function(n,o){return r.setTime(+n),i.setTime(+o),t(r),t(i),Math.floor(e(r,i))},u.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?u.filter(a?function(n){return a(n)%t==0}:function(n){return u.count(0,n)%t==0}):u:null}),u}var a=o(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});a.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?o(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):a:null};var u=a,s=(a.range,6e4),c=6048e5,l=o(function(t){t.setTime(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()}),h=l,f=(l.range,o(function(t){t.setTime(Math.floor(t/s)*s)},function(t,n){t.setTime(+t+n*s)},function(t,n){return(n-t)/s},function(t){return t.getMinutes()})),p=f,d=(f.range,o(function(t){var n=t.getTimezoneOffset()*s%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()})),g=d,v=(d.range,o(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*s)/864e5},function(t){return t.getDate()-1})),y=v;v.range;function m(t){return o(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*s)/c})}var _=m(0),x=m(1),b=m(2),w=m(3),M=m(4),k=m(5),S=m(6),O=(_.range,x.range,b.range,w.range,M.range,k.range,S.range,o(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()})),A=O,N=(O.range,o(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()}));N.every=function(t){return isFinite(t=Math.floor(t))&&t>0?o(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};var E=N,C=(N.range,o(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*s)},function(t,n){return(n-t)/s},function(t){return t.getUTCMinutes()})),T=C,j=(C.range,o(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getUTCHours()})),P=j,D=(j.range,o(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1})),z=D;D.range;function R(t){return o(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/c})}var F=R(0),L=R(1),U=R(2),W=R(3),q=R(4),I=R(5),H=R(6),Y=(F.range,L.range,U.range,W.range,q.range,I.range,H.range,o(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()})),B=Y,X=(Y.range,o(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()}));X.every=function(t){return isFinite(t=Math.floor(t))&&t>0?o(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};var $=X;X.range;e.d(n,!1,function(){return o}),e.d(n,"c",function(){return u}),e.d(n,!1,function(){}),e.d(n,"n",function(){return u}),e.d(n,!1,function(){}),e.d(n,"g",function(){return h}),e.d(n,!1,function(){}),e.d(n,"r",function(){return h}),e.d(n,!1,function(){}),e.d(n,"d",function(){return p}),e.d(n,!1,function(){}),e.d(n,"b",function(){return g}),e.d(n,!1,function(){}),e.d(n,"a",function(){return y}),e.d(n,!1,function(){}),e.d(n,"j",function(){return _}),e.d(n,!1,function(){}),e.d(n,"h",function(){return _}),e.d(n,!1,function(){}),e.d(n,"e",function(){return x}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,"i",function(){return M}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,"f",function(){return A}),e.d(n,!1,function(){}),e.d(n,"k",function(){return E}),e.d(n,!1,function(){}),e.d(n,"o",function(){return T}),e.d(n,!1,function(){}),e.d(n,"m",function(){return P}),e.d(n,!1,function(){}),e.d(n,"l",function(){return z}),e.d(n,!1,function(){}),e.d(n,"u",function(){return F}),e.d(n,!1,function(){}),e.d(n,"s",function(){return F}),e.d(n,!1,function(){}),e.d(n,"p",function(){return L}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,"t",function(){return q}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,!1,function(){}),e.d(n,"q",function(){return B}),e.d(n,!1,function(){}),e.d(n,"v",function(){return $}),e.d(n,!1,function(){})},function(t,n,e){"use strict";e.r(n);var r=function(t,n){return t<n?-1:t>n?1:t>=n?0:NaN},i=function(t){return 1===t.length&&(t=function(t){return function(n,e){return r(t(n),e)}}(t)),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)>0?i=o:r=o+1}return r}}};var o=i(r),a=o.right,u=o.left,s=a,c=function(t,n){null==n&&(n=l);for(var e=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);e<r;)o[e]=n(i,i=t[++e]);return o};function l(t,n){return[t,n]}var h=function(t,n,e){var r,i,o,a,u=t.length,s=n.length,c=new Array(u*s);for(null==e&&(e=l),r=o=0;r<u;++r)for(a=t[r],i=0;i<s;++i,++o)c[o]=e(a,n[i]);return c},f=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},p=function(t){return null===t?NaN:+t},d=function(t,n){var e,r,i=t.length,o=0,a=-1,u=0,s=0;if(null==n)for(;++a<i;)isNaN(e=p(t[a]))||(s+=(r=e-u)*(e-(u+=r/++o)));else for(;++a<i;)isNaN(e=p(n(t[a],a,t)))||(s+=(r=e-u)*(e-(u+=r/++o)));if(o>1)return s/(o-1)},g=function(t,n){var e=d(t,n);return e?Math.sqrt(e):e},v=function(t,n){var e,r,i,o=t.length,a=-1;if(null==n){for(;++a<o;)if(null!=(e=t[a])&&e>=e)for(r=i=e;++a<o;)null!=(e=t[a])&&(r>e&&(r=e),i<e&&(i=e))}else for(;++a<o;)if(null!=(e=n(t[a],a,t))&&e>=e)for(r=i=e;++a<o;)null!=(e=n(t[a],a,t))&&(r>e&&(r=e),i<e&&(i=e));return[r,i]},y=Array.prototype,m=y.slice,_=y.map,x=function(t){return function(){return t}},b=function(t){return t},w=function(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r<i;)o[r]=t+r*e;return o},M=Math.sqrt(50),k=Math.sqrt(10),S=Math.sqrt(2),O=function(t,n,e){var r,i,o,a,u=-1;if(e=+e,(t=+t)===(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(a=A(t,n,e))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),n=Math.floor(n/a),o=new Array(i=Math.ceil(n-t+1));++u<i;)o[u]=(t+u)*a;else for(t=Math.floor(t*a),n=Math.ceil(n*a),o=new Array(i=Math.ceil(t-n+1));++u<i;)o[u]=(t-u)/a;return r&&o.reverse(),o};function A(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=M?10:o>=k?5:o>=S?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=M?10:o>=k?5:o>=S?2:1)}function N(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=M?i*=10:o>=k?i*=5:o>=S&&(i*=2),n<t?-i:i}var E=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},C=function(){var t=b,n=v,e=E;function r(r){var i,o,a=r.length,u=new Array(a);for(i=0;i<a;++i)u[i]=t(r[i],i,r);var c=n(u),l=c[0],h=c[1],f=e(u,l,h);Array.isArray(f)||(f=N(l,h,f),f=w(Math.ceil(l/f)*f,Math.floor(h/f)*f,f));for(var p=f.length;f[0]<=l;)f.shift(),--p;for(;f[p-1]>h;)f.pop(),--p;var d,g=new Array(p+1);for(i=0;i<=p;++i)(d=g[i]=[]).x0=i>0?f[i-1]:l,d.x1=i<p?f[i]:h;for(i=0;i<a;++i)l<=(o=u[i])&&o<=h&&g[s(f,o,0,p)].push(r[i]);return g}return r.value=function(n){return arguments.length?(t="function"==typeof n?n:x(n),r):t},r.domain=function(t){return arguments.length?(n="function"==typeof t?t:x([t[0],t[1]]),r):n},r.thresholds=function(t){return arguments.length?(e="function"==typeof t?t:Array.isArray(t)?x(m.call(t)):x(t),r):e},r},T=function(t,n,e){if(null==e&&(e=p),r=t.length){if((n=+n)<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),a=+e(t[o],o,t);return a+(+e(t[o+1],o+1,t)-a)*(i-o)}},j=function(t,n,e){return t=_.call(t,p).sort(r),Math.ceil((e-n)/(2*(T(t,.75)-T(t,.25))*Math.pow(t.length,-1/3)))},P=function(t,n,e){return Math.ceil((e-n)/(3.5*g(t)*Math.pow(t.length,-1/3)))},D=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o<i;)if(null!=(e=t[o])&&e>=e)for(r=e;++o<i;)null!=(e=t[o])&&e>r&&(r=e)}else for(;++o<i;)if(null!=(e=n(t[o],o,t))&&e>=e)for(r=e;++o<i;)null!=(e=n(t[o],o,t))&&e>r&&(r=e);return r},z=function(t,n){var e,r=t.length,i=r,o=-1,a=0;if(null==n)for(;++o<r;)isNaN(e=p(t[o]))?--i:a+=e;else for(;++o<r;)isNaN(e=p(n(t[o],o,t)))?--i:a+=e;if(i)return a/i},R=function(t,n){var e,i=t.length,o=-1,a=[];if(null==n)for(;++o<i;)isNaN(e=p(t[o]))||a.push(e);else for(;++o<i;)isNaN(e=p(n(t[o],o,t)))||a.push(e);return T(a.sort(r),.5)},F=function(t){for(var n,e,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(e=new Array(a);--i>=0;)for(n=(r=t[i]).length;--n>=0;)e[--a]=r[n];return e},L=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o<i;)if(null!=(e=t[o])&&e>=e)for(r=e;++o<i;)null!=(e=t[o])&&r>e&&(r=e)}else for(;++o<i;)if(null!=(e=n(t[o],o,t))&&e>=e)for(r=e;++o<i;)null!=(e=n(t[o],o,t))&&r>e&&(r=e);return r},U=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},W=function(t,n){if(e=t.length){var e,i,o=0,a=0,u=t[a];for(null==n&&(n=r);++o<e;)(n(i=t[o],u)<0||0!==n(u,u))&&(u=i,a=o);return 0===n(u,u)?a:void 0}},q=function(t,n,e){for(var r,i,o=(null==e?t.length:e)-(n=null==n?0:+n);o;)i=Math.random()*o--|0,r=t[o+n],t[o+n]=t[i+n],t[i+n]=r;return t},I=function(t,n){var e,r=t.length,i=-1,o=0;if(null==n)for(;++i<r;)(e=+t[i])&&(o+=e);else for(;++i<r;)(e=+n(t[i],i,t))&&(o+=e);return o},H=function(t){if(!(i=t.length))return[];for(var n=-1,e=L(t,Y),r=new Array(e);++n<e;)for(var i,o=-1,a=r[n]=new Array(i);++o<i;)a[o]=t[o][n];return r};function Y(t){return t.length}var B=function(){return H(arguments)};e.d(n,"bisect",function(){return s}),e.d(n,"bisectRight",function(){return a}),e.d(n,"bisectLeft",function(){return u}),e.d(n,"ascending",function(){return r}),e.d(n,"bisector",function(){return i}),e.d(n,"cross",function(){return h}),e.d(n,"descending",function(){return f}),e.d(n,"deviation",function(){return g}),e.d(n,"extent",function(){return v}),e.d(n,"histogram",function(){return C}),e.d(n,"thresholdFreedmanDiaconis",function(){return j}),e.d(n,"thresholdScott",function(){return P}),e.d(n,"thresholdSturges",function(){return E}),e.d(n,"max",function(){return D}),e.d(n,"mean",function(){return z}),e.d(n,"median",function(){return R}),e.d(n,"merge",function(){return F}),e.d(n,"min",function(){return L}),e.d(n,"pairs",function(){return c}),e.d(n,"permute",function(){return U}),e.d(n,"quantile",function(){return T}),e.d(n,"range",function(){return w}),e.d(n,"scan",function(){return W}),e.d(n,"shuffle",function(){return q}),e.d(n,"sum",function(){return I}),e.d(n,"ticks",function(){return O}),e.d(n,"tickIncrement",function(){return A}),e.d(n,"tickStep",function(){return N}),e.d(n,"transpose",function(){return H}),e.d(n,"variance",function(){return d}),e.d(n,"zip",function(){return B})},function(t,n,e){"use strict";e.r(n);var r="http://www.w3.org/1999/xhtml",i={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},o=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),i.hasOwnProperty(n)?{space:i[n],local:t}:t};var a=function(t){var n=o(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===r&&n.documentElement.namespaceURI===r?n.createElement(t):n.createElementNS(e,t)}})(n)};function u(){}var s=function(t){return null==t?u:function(){return this.querySelector(t)}};function c(){return[]}var l=function(t){return null==t?c:function(){return this.querySelectorAll(t)}},h=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var f=document.documentElement;if(!f.matches){var p=f.webkitMatchesSelector||f.msMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector;h=function(t){return function(){return p.call(this,t)}}}}var d=h,g=function(t){return new Array(t.length)};function v(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}v.prototype={constructor:v,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var y="$";function m(t,n,e,r,i,o){for(var a,u=0,s=n.length,c=o.length;u<c;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new v(t,o[u]);for(;u<s;++u)(a=n[u])&&(i[u]=a)}function _(t,n,e,r,i,o,a){var u,s,c,l={},h=n.length,f=o.length,p=new Array(h);for(u=0;u<h;++u)(s=n[u])&&(p[u]=c=y+a.call(s,s.__data__,u,n),c in l?i[u]=s:l[c]=s);for(u=0;u<f;++u)(s=l[c=y+a.call(t,o[u],u,o)])?(r[u]=s,s.__data__=o[u],l[c]=null):e[u]=new v(t,o[u]);for(u=0;u<h;++u)(s=n[u])&&l[p[u]]===s&&(i[u]=s)}function x(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var b=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function w(t,n){return t.style.getPropertyValue(n)||b(t).getComputedStyle(t,null).getPropertyValue(n)}function M(t){return t.trim().split(/^|\s+/)}function k(t){return t.classList||new S(t)}function S(t){this._node=t,this._names=M(t.getAttribute("class")||"")}function O(t,n){for(var e=k(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function A(t,n){for(var e=k(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}S.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function N(){this.textContent=""}function E(){this.innerHTML=""}function C(){this.nextSibling&&this.parentNode.appendChild(this)}function T(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function j(){return null}function P(){var t=this.parentNode;t&&t.removeChild(this)}function D(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function z(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var R={},F=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(R={mouseenter:"mouseover",mouseleave:"mouseout"}));function L(t,n,e){return t=U(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function U(t,n,e){return function(r){var i=F;F=r;try{t.call(this,this.__data__,n,e)}finally{F=i}}}function W(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function q(t,n,e){var r=R.hasOwnProperty(t.type)?L:U;return function(i,o,a){var u,s=this.__on,c=r(n,o,a);if(s)for(var l=0,h=s.length;l<h;++l)if((u=s[l]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=c,u.capture=e),void(u.value=n);this.addEventListener(t.type,c,e),u={type:t.type,name:t.name,value:n,listener:c,capture:e},s?s.push(u):this.__on=[u]}}function I(t,n,e,r){var i=F;t.sourceEvent=F,F=t;try{return n.apply(e,r)}finally{F=i}}function H(t,n,e){var r=b(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}var Y=[null];function B(t,n){this._groups=t,this._parents=n}function X(){return new B([[document.documentElement]],Y)}B.prototype=X.prototype={constructor:B,select:function(t){"function"!=typeof t&&(t=s(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a,u=n[i],c=u.length,l=r[i]=new Array(c),h=0;h<c;++h)(o=u[h])&&(a=t.call(o,o.__data__,h,u))&&("__data__"in o&&(a.__data__=o.__data__),l[h]=a);return new B(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=l(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,u=n[o],s=u.length,c=0;c<s;++c)(a=u[c])&&(r.push(t.call(a,a.__data__,c,u)),i.push(a));return new B(r,i)},filter:function(t){"function"!=typeof t&&(t=d(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,s=r[i]=[],c=0;c<u;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&s.push(o);return new B(r,this._parents)},data:function(t,n){if(!t)return p=new Array(this.size()),c=-1,this.each(function(t){p[++c]=t}),p;var e=n?_:m,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),u=new Array(o),s=new Array(o),c=0;c<o;++c){var l=r[c],h=i[c],f=h.length,p=t.call(l,l&&l.__data__,c,r),d=p.length,g=u[c]=new Array(d),v=a[c]=new Array(d);e(l,h,g,v,s[c]=new Array(f),p,n);for(var y,x,b=0,w=0;b<d;++b)if(y=g[b]){for(b>=w&&(w=b+1);!(x=v[w])&&++w<d;);y._next=x||null}}return(a=new B(a,r))._enter=u,a._exit=s,a},enter:function(){return new B(this._enter||this._groups.map(g),this._parents)},exit:function(){return new B(this._exit||this._groups.map(g),this._parents)},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var s,c=n[u],l=e[u],h=c.length,f=a[u]=new Array(h),p=0;p<h;++p)(s=c[p]||l[p])&&(f[p]=s);for(;u<r;++u)a[u]=n[u];return new B(a,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=x);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a,u=e[o],s=u.length,c=i[o]=new Array(s),l=0;l<s;++l)(a=u[l])&&(c[l]=a);c.sort(n)}return new B(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,n){var e=o(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof n?e.local?function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}:function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}:e.local?function(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}:function(t,n){return function(){this.setAttribute(t,n)}})(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):w(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=M(t+"");if(arguments.length<2){for(var r=k(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?function(t,n){return function(){(n.apply(this,arguments)?O:A)(this,t)}}:n?function(t){return function(){O(this,t)}}:function(t){return function(){A(this,t)}})(e,n))},text:function(t){return arguments.length?this.each(null==t?N:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?E:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(C)},lower:function(){return this.each(T)},append:function(t){var n="function"==typeof t?t:a(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e="function"==typeof t?t:a(t),r=null==n?j:"function"==typeof n?n:s(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(P)},clone:function(t){return this.select(t?z:D)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?q:W,null==e&&(e=!1),r=0;r<a;++r)this.each(u(o[r],n,e));return this}var u=this.node().__on;if(u)for(var s,c=0,l=u.length;c<l;++c)for(r=0,s=u[c];r<a;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?function(t,n){return function(){return H(this,t,n.apply(this,arguments))}}:function(t,n){return function(){return H(this,t,n)}})(t,n))}};var $=X,V=function(t){return"string"==typeof t?new B([[document.querySelector(t)]],[document.documentElement]):new B([[t]],Y)},G=function(t){return V(a(t).call(document.documentElement))},Z=0;function Q(){return new J}function J(){this._="@"+(++Z).toString(36)}J.prototype=Q.prototype={constructor:J,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var K=function(){for(var t,n=F;t=n.sourceEvent;)n=t;return n},tt=function(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]},nt=function(t){var n=K();return n.changedTouches&&(n=n.changedTouches[0]),tt(t,n)},et=function(t){return"string"==typeof t?new B([document.querySelectorAll(t)],[document.documentElement]):new B([null==t?[]:t],Y)},rt=function(t,n,e){arguments.length<3&&(e=n,n=K().changedTouches);for(var r,i=0,o=n?n.length:0;i<o;++i)if((r=n[i]).identifier===e)return tt(t,r);return null},it=function(t,n){null==n&&(n=K().touches);for(var e=0,r=n?n.length:0,i=new Array(r);e<r;++e)i[e]=tt(t,n[e]);return i};e.d(n,"create",function(){return G}),e.d(n,"creator",function(){return a}),e.d(n,"local",function(){return Q}),e.d(n,"matcher",function(){return d}),e.d(n,"mouse",function(){return nt}),e.d(n,"namespace",function(){return o}),e.d(n,"namespaces",function(){return i}),e.d(n,"clientPoint",function(){return tt}),e.d(n,"select",function(){return V}),e.d(n,"selectAll",function(){return et}),e.d(n,"selection",function(){return $}),e.d(n,"selector",function(){return s}),e.d(n,"selectorAll",function(){return l}),e.d(n,"style",function(){return w}),e.d(n,"touch",function(){return rt}),e.d(n,"touches",function(){return it}),e.d(n,"window",function(){return b}),e.d(n,"event",function(){return F}),e.d(n,"customEvent",function(){return I})},function(t,n,e){"use strict";e.r(n);var r=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t};function i(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function o(){}var a="\\s*([+-]?\\d+)\\s*",u="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c=/^#([0-9a-f]{3})$/,l=/^#([0-9a-f]{6})$/,h=new RegExp("^rgb\\("+[a,a,a]+"\\)$"),f=new RegExp("^rgb\\("+[s,s,s]+"\\)$"),p=new RegExp("^rgba\\("+[a,a,a,u]+"\\)$"),d=new RegExp("^rgba\\("+[s,s,s,u]+"\\)$"),g=new RegExp("^hsl\\("+[u,s,s]+"\\)$"),v=new RegExp("^hsla\\("+[u,s,s,u]+"\\)$"),y={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 m(t){var n;return t=(t+"").trim().toLowerCase(),(n=c.exec(t))?new M((n=parseInt(n[1],16))>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=l.exec(t))?_(parseInt(n[1],16)):(n=h.exec(t))?new M(n[1],n[2],n[3],1):(n=f.exec(t))?new M(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=p.exec(t))?x(n[1],n[2],n[3],n[4]):(n=d.exec(t))?x(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=g.exec(t))?S(n[1],n[2]/100,n[3]/100,1):(n=v.exec(t))?S(n[1],n[2]/100,n[3]/100,n[4]):y.hasOwnProperty(t)?_(y[t]):"transparent"===t?new M(NaN,NaN,NaN,0):null}function _(t){return new M(t>>16&255,t>>8&255,255&t,1)}function x(t,n,e,r){return r<=0&&(t=n=e=NaN),new M(t,n,e,r)}function b(t){return t instanceof o||(t=m(t)),t?new M((t=t.rgb()).r,t.g,t.b,t.opacity):new M}function w(t,n,e,r){return 1===arguments.length?b(t):new M(t,n,e,null==r?1:r)}function M(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function k(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function S(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new A(t,n,e,r)}function O(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof A)return new A(t.h,t.s,t.l,t.opacity);if(t instanceof o||(t=m(t)),!t)return new A;if(t instanceof A)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),a=Math.max(n,e,r),u=NaN,s=a-i,c=(a+i)/2;return s?(u=n===a?(e-r)/s+6*(e<r):e===a?(r-n)/s+2:(n-e)/s+4,s/=c<.5?a+i:2-a-i,u*=60):s=c>0&&c<1?0:u,new A(u,s,c,t.opacity)}(t):new A(t,n,e,null==r?1:r)}function A(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function N(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}r(o,m,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),r(M,w,i(o,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new M(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new M(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+k(this.r)+k(this.g)+k(this.b)},toString:function(){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+")")}})),r(A,O,i(o,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new A(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new A(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new M(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}}));var E=Math.PI/180,C=180/Math.PI,T=.96422,j=1,P=.82521,D=4/29,z=6/29,R=3*z*z,F=z*z*z;function L(t){if(t instanceof q)return new q(t.l,t.a,t.b,t.opacity);if(t instanceof G){if(isNaN(t.h))return new q(t.l,0,0,t.opacity);var n=t.h*E;return new q(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof M||(t=b(t));var e,r,i=B(t.r),o=B(t.g),a=B(t.b),u=I((.2225045*i+.7168786*o+.0606169*a)/j);return i===o&&o===a?e=r=u:(e=I((.4360747*i+.3850649*o+.1430804*a)/T),r=I((.0139322*i+.0971045*o+.7141733*a)/P)),new q(116*u-16,500*(e-u),200*(u-r),t.opacity)}function U(t,n){return new q(t,0,0,null==n?1:n)}function W(t,n,e,r){return 1===arguments.length?L(t):new q(t,n,e,null==r?1:r)}function q(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function I(t){return t>F?Math.pow(t,1/3):t/R+D}function H(t){return t>z?t*t*t:R*(t-D)}function Y(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function B(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function X(t){if(t instanceof G)return new G(t.h,t.c,t.l,t.opacity);if(t instanceof q||(t=L(t)),0===t.a&&0===t.b)return new G(NaN,0,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*C;return new G(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function $(t,n,e,r){return 1===arguments.length?X(t):new G(e,n,t,null==r?1:r)}function V(t,n,e,r){return 1===arguments.length?X(t):new G(t,n,e,null==r?1:r)}function G(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}r(q,W,i(o,{brighter:function(t){return new q(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new q(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return new M(Y(3.1338561*(n=T*H(n))-1.6168667*(t=j*H(t))-.4906146*(e=P*H(e))),Y(-.9787684*n+1.9161415*t+.033454*e),Y(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}})),r(G,V,i(o,{brighter:function(t){return new G(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new G(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return L(this).rgb()}}));var Z=-.14861,Q=1.78277,J=-.29227,K=-.90649,tt=1.97294,nt=tt*K,et=tt*Q,rt=Q*J-K*Z;function it(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof ot)return new ot(t.h,t.s,t.l,t.opacity);t instanceof M||(t=b(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(rt*r+nt*n-et*e)/(rt+nt-et),o=r-i,a=(tt*(e-i)-J*o)/K,u=Math.sqrt(a*a+o*o)/(tt*i*(1-i)),s=u?Math.atan2(a,o)*C-120:NaN;return new ot(s<0?s+360:s,u,i,t.opacity)}(t):new ot(t,n,e,null==r?1:r)}function ot(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}r(ot,it,i(o,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ot(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ot(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*E,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new M(255*(n+e*(Z*r+Q*i)),255*(n+e*(J*r+K*i)),255*(n+e*(tt*r)),this.opacity)}})),e.d(n,"color",function(){return m}),e.d(n,"rgb",function(){return w}),e.d(n,"hsl",function(){return O}),e.d(n,"lab",function(){return W}),e.d(n,"hcl",function(){return V}),e.d(n,"lch",function(){return $}),e.d(n,"gray",function(){return U}),e.d(n,"cubehelix",function(){return it})},function(t,n,e){"use strict";e.r(n);var r=e(3);function i(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}var o=function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),o=t[r],a=t[r+1],u=r>0?t[r-1]:2*o-a,s=r<n-1?t[r+2]:2*a-o;return i((e-r/n)*n,u,o,a,s)}},a=function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),o=t[(r+n-1)%n],a=t[r%n],u=t[(r+1)%n],s=t[(r+2)%n];return i((e-r/n)*n,o,a,u,s)}},u=function(t){return function(){return t}};function s(t,n){return function(e){return t+e*n}}function c(t,n){var e=n-t;return e?s(t,e>180||e<-180?e-360*Math.round(e/360):e):u(isNaN(t)?n:t)}function l(t){return 1==(t=+t)?h:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):u(isNaN(n)?e:n)}}function h(t,n){var e=n-t;return e?s(t,e):u(isNaN(t)?n:t)}var f=function t(n){var e=l(n);function i(t,n){var i=e((t=Object(r.rgb)(t)).r,(n=Object(r.rgb)(n)).r),o=e(t.g,n.g),a=e(t.b,n.b),u=h(t.opacity,n.opacity);return function(n){return t.r=i(n),t.g=o(n),t.b=a(n),t.opacity=u(n),t+""}}return i.gamma=t,i}(1);function p(t){return function(n){var e,i,o=n.length,a=new Array(o),u=new Array(o),s=new Array(o);for(e=0;e<o;++e)i=Object(r.rgb)(n[e]),a[e]=i.r||0,u[e]=i.g||0,s[e]=i.b||0;return a=t(a),u=t(u),s=t(s),i.opacity=1,function(t){return i.r=a(t),i.g=u(t),i.b=s(t),i+""}}}var d=p(o),g=p(a),v=function(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(e=0;e<i;++e)o[e]=A(t[e],n[e]);for(;e<r;++e)a[e]=n[e];return function(t){for(e=0;e<i;++e)a[e]=o[e](t);return a}},y=function(t,n){var e=new Date;return n-=t=+t,function(r){return e.setTime(t+n*r),e}},m=function(t,n){return n-=t=+t,function(e){return t+n*e}},_=function(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=A(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}},x=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,b=new RegExp(x.source,"g");var w,M,k,S,O=function(t,n){var e,r,i,o=x.lastIndex=b.lastIndex=0,a=-1,u=[],s=[];for(t+="",n+="";(e=x.exec(t))&&(r=b.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:m(e,r)})),o=b.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?s[0]?function(t){return function(n){return t(n)+""}}(s[0].x):function(t){return function(){return t}}(n):(n=s.length,function(t){for(var e,r=0;r<n;++r)u[(e=s[r]).i]=e.x(t);return u.join("")})},A=function(t,n){var e,i=typeof n;return null==n||"boolean"===i?u(n):("number"===i?m:"string"===i?(e=Object(r.color)(n))?(n=e,f):O:n instanceof r.color?f:n instanceof Date?y:Array.isArray(n)?v:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?_:m)(t,n)},N=function(t,n){return n-=t=+t,function(e){return Math.round(t+n*e)}},E=180/Math.PI,C={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},T=function(t,n,e,r,i,o){var a,u,s;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,s/=u),t*r<n*e&&(t=-t,n=-n,s=-s,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*E,skewX:Math.atan(s)*E,scaleX:a,scaleY:u}};function j(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var u=[],s=[];return o=t(o),a=t(a),function(t,r,i,o,a,u){if(t!==i||r!==o){var s=a.push("translate(",null,n,null,e);u.push({i:s-4,x:m(t,i)},{i:s-2,x:m(r,o)})}else(i||o)&&a.push("translate("+i+n+o+e)}(o.translateX,o.translateY,a.translateX,a.translateY,u,s),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:m(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,u,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:m(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,u,s),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:m(t,e)},{i:u-2,x:m(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,s),o=a=null,function(t){for(var n,e=-1,r=s.length;++e<r;)u[(n=s[e]).i]=n.x(t);return u.join("")}}}var P=j(function(t){return"none"===t?C:(w||(w=document.createElement("DIV"),M=document.documentElement,k=document.defaultView),w.style.transform=t,t=k.getComputedStyle(M.appendChild(w),null).getPropertyValue("transform"),M.removeChild(w),t=t.slice(7,-1).split(","),T(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},"px, ","px)","deg)"),D=j(function(t){return null==t?C:(S||(S=document.createElementNS("http://www.w3.org/2000/svg","g")),S.setAttribute("transform",t),(t=S.transform.baseVal.consolidate())?(t=t.matrix,T(t.a,t.b,t.c,t.d,t.e,t.f)):C)},", ",")",")"),z=Math.SQRT2;function R(t){return((t=Math.exp(t))+1/t)/2}var F=function(t,n){var e,r,i=t[0],o=t[1],a=t[2],u=n[0],s=n[1],c=n[2],l=u-i,h=s-o,f=l*l+h*h;if(f<1e-12)r=Math.log(c/a)/z,e=function(t){return[i+t*l,o+t*h,a*Math.exp(z*t*r)]};else{var p=Math.sqrt(f),d=(c*c-a*a+4*f)/(2*a*2*p),g=(c*c-a*a-4*f)/(2*c*2*p),v=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);r=(y-v)/z,e=function(t){var n=t*r,e=R(v),u=a/(2*p)*(e*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(z*n+v)-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[i+u*l,o+u*h,a*e/R(z*n+v)]}}return e.duration=1e3*r,e};function L(t){return function(n,e){var i=t((n=Object(r.hsl)(n)).h,(e=Object(r.hsl)(e)).h),o=h(n.s,e.s),a=h(n.l,e.l),u=h(n.opacity,e.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=a(t),n.opacity=u(t),n+""}}}var U=L(c),W=L(h);function q(t,n){var e=h((t=Object(r.lab)(t)).l,(n=Object(r.lab)(n)).l),i=h(t.a,n.a),o=h(t.b,n.b),a=h(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=i(n),t.b=o(n),t.opacity=a(n),t+""}}function I(t){return function(n,e){var i=t((n=Object(r.hcl)(n)).h,(e=Object(r.hcl)(e)).h),o=h(n.c,e.c),a=h(n.l,e.l),u=h(n.opacity,e.opacity);return function(t){return n.h=i(t),n.c=o(t),n.l=a(t),n.opacity=u(t),n+""}}}var H=I(c),Y=I(h);function B(t){return function n(e){function i(n,i){var o=t((n=Object(r.cubehelix)(n)).h,(i=Object(r.cubehelix)(i)).h),a=h(n.s,i.s),u=h(n.l,i.l),s=h(n.opacity,i.opacity);return function(t){return n.h=o(t),n.s=a(t),n.l=u(Math.pow(t,e)),n.opacity=s(t),n+""}}return e=+e,i.gamma=n,i}(1)}var X=B(c),$=B(h);function V(t,n){for(var e=0,r=n.length-1,i=n[0],o=new Array(r<0?0:r);e<r;)o[e]=t(i,i=n[++e]);return function(t){var n=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return o[n](t-n)}}var G=function(t,n){for(var e=new Array(n),r=0;r<n;++r)e[r]=t(r/(n-1));return e};e.d(n,"interpolate",function(){return A}),e.d(n,"interpolateArray",function(){return v}),e.d(n,"interpolateBasis",function(){return o}),e.d(n,"interpolateBasisClosed",function(){return a}),e.d(n,"interpolateDate",function(){return y}),e.d(n,"interpolateNumber",function(){return m}),e.d(n,"interpolateObject",function(){return _}),e.d(n,"interpolateRound",function(){return N}),e.d(n,"interpolateString",function(){return O}),e.d(n,"interpolateTransformCss",function(){return P}),e.d(n,"interpolateTransformSvg",function(){return D}),e.d(n,"interpolateZoom",function(){return F}),e.d(n,"interpolateRgb",function(){return f}),e.d(n,"interpolateRgbBasis",function(){return d}),e.d(n,"interpolateRgbBasisClosed",function(){return g}),e.d(n,"interpolateHsl",function(){return U}),e.d(n,"interpolateHslLong",function(){return W}),e.d(n,"interpolateLab",function(){return q}),e.d(n,"interpolateHcl",function(){return H}),e.d(n,"interpolateHclLong",function(){return Y}),e.d(n,"interpolateCubehelix",function(){return X}),e.d(n,"interpolateCubehelixLong",function(){return $}),e.d(n,"piecewise",function(){return V}),e.d(n,"quantize",function(){return G})},function(n,e){n.exports=t},function(t,e){t.exports=n},function(t,n,e){"use strict";e.r(n);var r=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var n=Object.prototype.toString.call(t);return"[object RegExp]"===n||"[object Date]"===n||function(t){return t.$$typeof===i}(t)}(t)};var i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(t,n){return!1!==n.clone&&n.isMergeableObject(t)?u(function(t){return Array.isArray(t)?[]:{}}(t),t,n):t}function a(t,n,e){return t.concat(n).map(function(t){return o(t,e)})}function u(t,n,e){(e=e||{}).arrayMerge=e.arrayMerge||a,e.isMergeableObject=e.isMergeableObject||r;var i=Array.isArray(n);return i===Array.isArray(t)?i?e.arrayMerge(t,n,e):function(t,n,e){var r={};return e.isMergeableObject(t)&&Object.keys(t).forEach(function(n){r[n]=o(t[n],e)}),Object.keys(n).forEach(function(i){e.isMergeableObject(n[i])&&t[i]?r[i]=u(t[i],n[i],e):r[i]=o(n[i],e)}),r}(t,n,e):o(n,e)}u.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(t,e){return u(t,e,n)},{})};var s=u;n.default=s},function(t,n,e){"use strict";e.r(n);var r=e(1);function i(){}function o(t,n){var e=new i;if(t instanceof i)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var r,o=-1,a=t.length;if(null==n)for(;++o<a;)e.set(o,t[o]);else for(;++o<a;)e.set(n(r=t[o],o,t),r)}else if(t)for(var u in t)e.set(u,t[u]);return e}i.prototype=o.prototype={constructor:i,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,n){return this["$"+t]=n,this},remove:function(t){var n="$"+t;return n in this&&delete this[n]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)"$"===n[0]&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)"$"===n[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var n in this)"$"===n[0]&&t(this[n],n.slice(1),this)}};var a=o;function u(){}var s=a.prototype;function c(t,n){var e=new u;if(t instanceof u)t.each(function(t){e.add(t)});else if(t){var r=-1,i=t.length;if(null==n)for(;++r<i;)e.add(t[r]);else for(;++r<i;)e.add(n(t[r],r,t))}return e}u.prototype=c.prototype={constructor:u,has:s.has,add:function(t){return this["$"+(t+="")]=t,this},remove:s.remove,clear:s.clear,values:s.keys,size:s.size,empty:s.empty,each:s.each};var l=Array.prototype,h=l.map,f=l.slice,p={name:"implicit"};function d(t){var n=a(),e=[],r=p;function i(i){var o=i+"",a=n.get(o);if(!a){if(r!==p)return r;n.set(o,a=e.push(i))}return t[(a-1)%t.length]}return t=null==t?[]:f.call(t),i.domain=function(t){if(!arguments.length)return e.slice();e=[],n=a();for(var r,o,u=-1,s=t.length;++u<s;)n.has(o=(r=t[u])+"")||n.set(o,e.push(r));return i},i.range=function(n){return arguments.length?(t=f.call(n),i):t.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return d().domain(e).range(t).unknown(r)},i}function g(){var t,n,e=d().unknown(void 0),i=e.domain,o=e.range,a=[0,1],u=!1,s=0,c=0,l=.5;function h(){var e=i().length,h=a[1]<a[0],f=a[h-0],p=a[1-h];t=(p-f)/Math.max(1,e-s+2*c),u&&(t=Math.floor(t)),f+=(p-f-t*(e-s))*l,n=t*(1-s),u&&(f=Math.round(f),n=Math.round(n));var d=Object(r.range)(e).map(function(n){return f+t*n});return o(h?d.reverse():d)}return delete e.unknown,e.domain=function(t){return arguments.length?(i(t),h()):i()},e.range=function(t){return arguments.length?(a=[+t[0],+t[1]],h()):a.slice()},e.rangeRound=function(t){return a=[+t[0],+t[1]],u=!0,h()},e.bandwidth=function(){return n},e.step=function(){return t},e.round=function(t){return arguments.length?(u=!!t,h()):u},e.padding=function(t){return arguments.length?(s=c=Math.max(0,Math.min(1,t)),h()):s},e.paddingInner=function(t){return arguments.length?(s=Math.max(0,Math.min(1,t)),h()):s},e.paddingOuter=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),h()):c},e.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),h()):l},e.copy=function(){return g().domain(i()).range(a).round(u).paddingInner(s).paddingOuter(c).align(l)},h()}function v(){return function t(n){var e=n.copy;return n.padding=n.paddingOuter,delete n.paddingInner,delete n.paddingOuter,n.copy=function(){return t(e())},n}(g().paddingInner(1))}var y=e(4),m=function(t){return function(){return t}},_=function(t){return+t},x=[0,1];function b(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:m(n)}function w(t,n,e,r){var i=t[0],o=t[1],a=n[0],u=n[1];return o<i?(i=e(o,i),a=r(u,a)):(i=e(i,o),a=r(a,u)),function(t){return a(i(t))}}function M(t,n,e,i){var o=Math.min(t.length,n.length)-1,a=new Array(o),u=new Array(o),s=-1;for(t[o]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++s<o;)a[s]=e(t[s],t[s+1]),u[s]=i(n[s],n[s+1]);return function(n){var e=Object(r.bisect)(t,n,1,o)-1;return u[e](a[e](n))}}function k(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function S(t,n){var e,r,i,o=x,a=x,u=y.interpolate,s=!1;function c(){return e=Math.min(o.length,a.length)>2?M