c.index){var m=s-a.x-a.vx,g=l-a.y-a.vy,b=m*m+g*g;be.r&&(e.r=e[n].r)}function c(){if(n){var r,o,i=n.length;for(t=new Array(i),r=0;r1?(null==t?c.remove(e):c.set(e,p(t)),n):c.get(e)},find:function(n,t,r){var o,i,a,c,s,l=0,u=e.length;for(null==r?r=1/0:r*=r,l=0;l1?(l.on(e,t),n):l.on(e)}}},to=function(){var e,n,t,r,o=Ir(-30),i=1,a=1/0,c=.81;function s(r){var o,i=e.length,a=Vr(e,_r,$r).visitAfter(u);for(t=r,o=0;o=a)){(e.data!==n||e.next)&&(0===u&&(p+=(u=Rr())*u),0===f&&(p+=(f=Rr())*f),p0?1:e<0?-1:0},So=Math.sqrt,Co=Math.tan;function Po(e){return e>1?0:e<-1?fo:Math.acos(e)}function Do(e){return e>1?po:e<-1?-po:Math.asin(e)}function Lo(e){return(e=Oo(e/2))*e}function jo(){}function No(e,n){e&&Io.hasOwnProperty(e.type)&&Io[e.type](e,n)}var zo={Feature:function(e,n){No(e.geometry,n)},FeatureCollection:function(e,n){for(var t=e.features,r=-1,o=t.length;++r=0?1:-1,o=r*t,i=wo(n=(n*=ho)/2+mo),a=Oo(n),c=Wo*a,s=Vo*i+c*wo(o),l=c*r*Oo(o);Uo.add(xo(l,s)),Ho=e,Vo=i,Wo=a}var _o=function(e){return Xo.reset(),Bo(e,Zo),2*Xo};function $o(e){return[xo(e[1],e[0]),Do(e[2])]}function ei(e){var n=e[0],t=e[1],r=wo(t);return[r*wo(n),r*Oo(n),Oo(t)]}function ni(e,n){return e[0]*n[0]+e[1]*n[1]+e[2]*n[2]}function ti(e,n){return[e[1]*n[2]-e[2]*n[1],e[2]*n[0]-e[0]*n[2],e[0]*n[1]-e[1]*n[0]]}function ri(e,n){e[0]+=n[0],e[1]+=n[1],e[2]+=n[2]}function oi(e,n){return[e[0]*n,e[1]*n,e[2]*n]}function ii(e){var n=So(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=n,e[1]/=n,e[2]/=n}var ai,ci,si,li,ui,fi,di,pi,mi,gi,bi=co(),hi={point:vi,lineStart:xi,lineEnd:wi,polygonStart:function(){hi.point=Ei,hi.lineStart=ki,hi.lineEnd=Ai,bi.reset(),Zo.polygonStart()},polygonEnd:function(){Zo.polygonEnd(),hi.point=vi,hi.lineStart=xi,hi.lineEnd=wi,Uo<0?(ai=-(si=180),ci=-(li=90)):bi>1e-6?li=90:bi<-1e-6&&(ci=-90),gi[0]=ai,gi[1]=si},sphere:function(){ai=-(si=180),ci=-(li=90)}};function vi(e,n){mi.push(gi=[ai=e,si=e]),nli&&(li=n)}function yi(e,n){var t=ei([e*ho,n*ho]);if(pi){var r=ti(pi,t),o=ti([r[1],-r[0],0],r);ii(o),o=$o(o);var i,a=e-ui,c=a>0?1:-1,s=o[0]*bo*c,l=vo(a)>180;l^(c*uili&&(li=i):l^(c*ui<(s=(s+360)%360-180)&&sli&&(li=n)),l?eMi(ai,si)&&(si=e):Mi(e,si)>Mi(ai,si)&&(ai=e):si>=ai?(esi&&(si=e)):e>ui?Mi(ai,e)>Mi(ai,si)&&(si=e):Mi(e,si)>Mi(ai,si)&&(ai=e)}else mi.push(gi=[ai=e,si=e]);nli&&(li=n),pi=t,ui=e}function xi(){hi.point=yi}function wi(){gi[0]=ai,gi[1]=si,hi.point=vi,pi=null}function Ei(e,n){if(pi){var t=e-ui;bi.add(vo(t)>180?t+(t>0?360:-360):t)}else fi=e,di=n;Zo.point(e,n),yi(e,n)}function ki(){Zo.lineStart()}function Ai(){Ei(fi,di),Zo.lineEnd(),vo(bi)>1e-6&&(ai=-(si=180)),gi[0]=ai,gi[1]=si,pi=null}function Mi(e,n){return(n-=e)<0?n+360:n}function Oi(e,n){return e[0]-n[0]}function Ti(e,n){return e[0]<=e[1]?e[0]<=n&&n<=e[1]:nMi(r[0],r[1])&&(r[1]=o[1]),Mi(o[0],r[1])>Mi(r[0],r[1])&&(r[0]=o[0])):i.push(r=o);for(a=-1/0,n=0,r=i[t=i.length-1];n<=t;r=o,++n)o=i[n],(c=Mi(r[1],o[0]))>a&&(a=c,ai=o[0],si=r[1])}return mi=gi=null,ai===1/0||ci===1/0?[[NaN,NaN],[NaN,NaN]]:[[ai,ci],[si,li]]},Ui={sphere:jo,point:Xi,lineStart:Gi,lineEnd:Qi,polygonStart:function(){Ui.lineStart=_i,Ui.lineEnd=$i},polygonEnd:function(){Ui.lineStart=Gi,Ui.lineEnd=Qi}};function Xi(e,n){e*=ho;var t=wo(n*=ho);Zi(t*wo(e),t*Oo(e),Oo(n))}function Zi(e,n,t){++Si,Pi+=(e-Pi)/Si,Di+=(n-Di)/Si,Li+=(t-Li)/Si}function Gi(){Ui.point=Ki}function Ki(e,n){e*=ho;var t=wo(n*=ho);Hi=t*wo(e),Vi=t*Oo(e),Wi=Oo(n),Ui.point=Ji,Zi(Hi,Vi,Wi)}function Ji(e,n){e*=ho;var t=wo(n*=ho),r=t*wo(e),o=t*Oo(e),i=Oo(n),a=xo(So((a=Vi*i-Wi*o)*a+(a=Wi*r-Hi*i)*a+(a=Hi*o-Vi*r)*a),Hi*r+Vi*o+Wi*i);Ci+=a,ji+=a*(Hi+(Hi=r)),Ni+=a*(Vi+(Vi=o)),zi+=a*(Wi+(Wi=i)),Zi(Hi,Vi,Wi)}function Qi(){Ui.point=Xi}function _i(){Ui.point=ea}function $i(){na(Fi,qi),Ui.point=Xi}function ea(e,n){Fi=e,qi=n,e*=ho,n*=ho,Ui.point=na;var t=wo(n);Hi=t*wo(e),Vi=t*Oo(e),Wi=Oo(n),Zi(Hi,Vi,Wi)}function na(e,n){e*=ho;var t=wo(n*=ho),r=t*wo(e),o=t*Oo(e),i=Oo(n),a=Vi*i-Wi*o,c=Wi*r-Hi*i,s=Hi*o-Vi*r,l=So(a*a+c*c+s*s),u=Do(l),f=l&&-u/l;Ii+=f*a,Ri+=f*c,Yi+=f*s,Ci+=u,ji+=u*(Hi+(Hi=r)),Ni+=u*(Vi+(Vi=o)),zi+=u*(Wi+(Wi=i)),Zi(Hi,Vi,Wi)}var ta=function(e){Si=Ci=Pi=Di=Li=ji=Ni=zi=Ii=Ri=Yi=0,Bo(e,Ui);var n=Ii,t=Ri,r=Yi,o=n*n+t*t+r*r;return o<1e-12&&(n=ji,t=Ni,r=zi,Ci<1e-6&&(n=Pi,t=Di,r=Li),(o=n*n+t*t+r*r)<1e-12)?[NaN,NaN]:[xo(t,n)*bo,Do(r/So(o))*bo]},ra=function(e){return function(){return e}},oa=function(e,n){function t(t,r){return t=e(t,r),n(t[0],t[1])}return e.invert&&n.invert&&(t.invert=function(t,r){return(t=n.invert(t,r))&&e.invert(t[0],t[1])}),t};function ia(e,n){return[vo(e)>fo?e+Math.round(-e/go)*go:e,n]}function aa(e,n,t){return(e%=go)?n||t?oa(sa(e),la(n,t)):sa(e):n||t?la(n,t):ia}function ca(e){return function(n,t){return[(n+=e)>fo?n-go:n<-fo?n+go:n,t]}}function sa(e){var n=ca(e);return n.invert=ca(-e),n}function la(e,n){var t=wo(e),r=Oo(e),o=wo(n),i=Oo(n);function a(e,n){var a=wo(n),c=wo(e)*a,s=Oo(e)*a,l=Oo(n),u=l*t+c*r;return[xo(s*o-u*i,c*t-l*r),Do(u*o+s*i)]}return a.invert=function(e,n){var a=wo(n),c=wo(e)*a,s=Oo(e)*a,l=Oo(n),u=l*o-s*i;return[xo(s*o+l*i,c*t+u*r),Do(u*t-c*r)]},a}ia.invert=ia;var ua=function(e){function n(n){return(n=e(n[0]*ho,n[1]*ho))[0]*=bo,n[1]*=bo,n}return e=aa(e[0]*ho,e[1]*ho,e.length>2?e[2]*ho:0),n.invert=function(n){return(n=e.invert(n[0]*ho,n[1]*ho))[0]*=bo,n[1]*=bo,n},n};function fa(e,n,t,r,o,i){if(t){var a=wo(n),c=Oo(n),s=r*t;null==o?(o=n+r*go,i=n-s/2):(o=da(a,o),i=da(a,i),(r>0?oi)&&(o+=r*go));for(var l,u=o;r>0?u>i:u1&&n.push(n.pop().concat(n.shift()))},result:function(){var t=n;return n=[],e=null,t}}},ga=function(e,n){return vo(e[0]-n[0])<1e-6&&vo(e[1]-n[1])<1e-6};function ba(e,n,t,r){this.x=e,this.z=n,this.o=t,this.e=r,this.v=!1,this.n=this.p=null}var ha=function(e,n,t,r,o){var i,a,c=[],s=[];if(e.forEach((function(e){if(!((n=e.length-1)<=0)){var n,t,r=e[0],a=e[n];if(ga(r,a)){if(!r[2]&&!a[2]){for(o.lineStart(),i=0;i=0;--i)o.point((u=l[i])[0],u[1]);else r(d.x,d.p.x,-1,o);d=d.p}l=(d=d.o).z,p=!p}while(!d.v);o.lineEnd()}}};function va(e){if(n=e.length){for(var n,t,r=0,o=e[0];++r=0?1:-1,M=A*k,O=M>fo,T=g*w;if(ya.add(xo(T*A*Oo(M),b*E+T*wo(M))),a+=O?k+A*go:k,O^p>=t^y>=t){var S=ti(ei(d),ei(v));ii(S);var C=ti(i,S);ii(C);var P=(O^k>=0?-1:1)*Do(C[2]);(r>P||r===P&&(S[0]||S[1]))&&(c+=O^k>=0?1:-1)}}return(a<-1e-6||a<1e-6&&ya<-1e-6)^1&c},Ea=function(e,n,t,r){return function(i){var a,c,s,l=n(i),u=ma(),f=n(u),d=!1,p={point:m,lineStart:b,lineEnd:h,polygonStart:function(){p.point=v,p.lineStart=y,p.lineEnd=x,c=[],a=[]},polygonEnd:function(){p.point=m,p.lineStart=b,p.lineEnd=h,c=Object(o.n)(c);var e=wa(a,r);c.length?(d||(i.polygonStart(),d=!0),ha(c,Aa,e,t,i)):e&&(d||(i.polygonStart(),d=!0),i.lineStart(),t(null,null,1,i),i.lineEnd()),d&&(i.polygonEnd(),d=!1),c=a=null},sphere:function(){i.polygonStart(),i.lineStart(),t(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function m(n,t){e(n,t)&&i.point(n,t)}function g(e,n){l.point(e,n)}function b(){p.point=g,l.lineStart()}function h(){p.point=m,l.lineEnd()}function v(e,n){s.push([e,n]),f.point(e,n)}function y(){f.lineStart(),s=[]}function x(){v(s[0][0],s[0][1]),f.lineEnd();var e,n,t,r,o=f.clean(),l=u.result(),p=l.length;if(s.pop(),a.push(s),s=null,p)if(1&o){if((n=(t=l[0]).length-1)>0){for(d||(i.polygonStart(),d=!0),i.lineStart(),e=0;e1&&2&o&&l.push(l.pop().concat(l.shift())),c.push(l.filter(ka))}return p}};function ka(e){return e.length>1}function Aa(e,n){return((e=e.x)[0]<0?e[1]-po-1e-6:po-e[1])-((n=n.x)[0]<0?n[1]-po-1e-6:po-n[1])}var Ma=Ea((function(){return!0}),(function(e){var n,t=NaN,r=NaN,o=NaN;return{lineStart:function(){e.lineStart(),n=1},point:function(i,a){var c=i>0?fo:-fo,s=vo(i-t);vo(s-fo)<1e-6?(e.point(t,r=(r+a)/2>0?po:-po),e.point(o,r),e.lineEnd(),e.lineStart(),e.point(c,r),e.point(i,r),n=0):o!==c&&s>=fo&&(vo(t-o)<1e-6&&(t-=1e-6*o),vo(i-c)<1e-6&&(i-=1e-6*c),r=function(e,n,t,r){var o,i,a=Oo(e-t);return vo(a)>1e-6?yo((Oo(n)*(i=wo(r))*Oo(t)-Oo(r)*(o=wo(n))*Oo(e))/(o*i*a)):(n+r)/2}(t,r,i,a),e.point(o,r),e.lineEnd(),e.lineStart(),e.point(c,r),n=0),e.point(t=i,r=a),o=c},lineEnd:function(){e.lineEnd(),t=r=NaN},clean:function(){return 2-n}}}),(function(e,n,t,r){var o;if(null==e)o=t*po,r.point(-fo,o),r.point(0,o),r.point(fo,o),r.point(fo,0),r.point(fo,-o),r.point(0,-o),r.point(-fo,-o),r.point(-fo,0),r.point(-fo,o);else if(vo(e[0]-n[0])>1e-6){var i=e[0]0,o=vo(n)>1e-6;function i(e,t){return wo(e)*wo(t)>n}function a(e,t,r){var o=[1,0,0],i=ti(ei(e),ei(t)),a=ni(i,i),c=i[0],s=a-c*c;if(!s)return!r&&e;var l=n*a/s,u=-n*c/s,f=ti(o,i),d=oi(o,l);ri(d,oi(i,u));var p=f,m=ni(d,p),g=ni(p,p),b=m*m-g*(ni(d,d)-1);if(!(b<0)){var h=So(b),v=oi(p,(-m-h)/g);if(ri(v,d),v=$o(v),!r)return v;var y,x=e[0],w=t[0],E=e[1],k=t[1];w0^v[1]<(vo(v[0]-x)<1e-6?E:k):E<=v[1]&&v[1]<=k:A>fo^(x<=v[0]&&v[0]<=w)){var O=oi(p,(-m+h)/g);return ri(O,d),[v,$o(O)]}}}function c(n,t){var o=r?e:fo-e,i=0;return n<-o?i|=1:n>o&&(i|=2),t<-o?i|=4:t>o&&(i|=8),i}return Ea(i,(function(e){var n,t,s,l,u;return{lineStart:function(){l=s=!1,u=1},point:function(f,d){var p,m=[f,d],g=i(f,d),b=r?g?0:c(f,d):g?c(f+(f<0?fo:-fo),d):0;if(!n&&(l=s=g)&&e.lineStart(),g!==s&&(!(p=a(n,m))||ga(n,p)||ga(m,p))&&(m[2]=1),g!==s)u=0,g?(e.lineStart(),p=a(m,n),e.point(p[0],p[1])):(p=a(n,m),e.point(p[0],p[1],2),e.lineEnd()),n=p;else if(o&&n&&r^g){var h;b&t||!(h=a(m,n,!0))||(u=0,r?(e.lineStart(),e.point(h[0][0],h[0][1]),e.point(h[1][0],h[1][1]),e.lineEnd()):(e.point(h[1][0],h[1][1]),e.lineEnd(),e.lineStart(),e.point(h[0][0],h[0][1],3)))}!g||n&&ga(n,m)||e.point(m[0],m[1]),n=m,s=g,t=b},lineEnd:function(){s&&e.lineEnd(),n=null},clean:function(){return u|(l&&s)<<1}}}),(function(n,r,o,i){fa(i,e,t,o,n,r)}),r?[0,-e]:[-fo,e-fo])};function Ta(e,n,t,r){function i(o,i){return e<=o&&o<=t&&n<=i&&i<=r}function a(o,i,a,s){var u=0,f=0;if(null==o||(u=c(o,a))!==(f=c(i,a))||l(o,i)<0^a>0)do{s.point(0===u||3===u?e:t,u>1?r:n)}while((u=(u+a+4)%4)!==f);else s.point(i[0],i[1])}function c(r,o){return vo(r[0]-e)<1e-6?o>0?0:3:vo(r[0]-t)<1e-6?o>0?2:1:vo(r[1]-n)<1e-6?o>0?1:0:o>0?3:2}function s(e,n){return l(e.x,n.x)}function l(e,n){var t=c(e,1),r=c(n,1);return t!==r?t-r:0===t?n[1]-e[1]:1===t?e[0]-n[0]:2===t?e[1]-n[1]:n[0]-e[0]}return function(c){var l,u,f,d,p,m,g,b,h,v,y,x=c,w=ma(),E={point:k,lineStart:function(){E.point=A,u&&u.push(f=[]);v=!0,h=!1,g=b=NaN},lineEnd:function(){l&&(A(d,p),m&&h&&w.rejoin(),l.push(w.result()));E.point=k,h&&x.lineEnd()},polygonStart:function(){x=w,l=[],u=[],y=!0},polygonEnd:function(){var n=function(){for(var n=0,t=0,o=u.length;tr&&(d-i)*(r-a)>(p-a)*(e-i)&&++n:p<=r&&(d-i)*(r-a)<(p-a)*(e-i)&&--n;return n}(),t=y&&n,i=(l=Object(o.n)(l)).length;(t||i)&&(c.polygonStart(),t&&(c.lineStart(),a(null,null,1,c),c.lineEnd()),i&&ha(l,s,n,a,c),c.polygonEnd());x=c,l=u=f=null}};function k(e,n){i(e,n)&&x.point(e,n)}function A(o,a){var c=i(o,a);if(u&&f.push([o,a]),v)d=o,p=a,m=c,v=!1,c&&(x.lineStart(),x.point(o,a));else if(c&&h)x.point(o,a);else{var s=[g=Math.max(-1e9,Math.min(1e9,g)),b=Math.max(-1e9,Math.min(1e9,b))],l=[o=Math.max(-1e9,Math.min(1e9,o)),a=Math.max(-1e9,Math.min(1e9,a))];!function(e,n,t,r,o,i){var a,c=e[0],s=e[1],l=0,u=1,f=n[0]-c,d=n[1]-s;if(a=t-c,f||!(a>0)){if(a/=f,f<0){if(a0){if(a>u)return;a>l&&(l=a)}if(a=o-c,f||!(a<0)){if(a/=f,f<0){if(a>u)return;a>l&&(l=a)}else if(f>0){if(a0)){if(a/=d,d<0){if(a0){if(a>u)return;a>l&&(l=a)}if(a=i-s,d||!(a<0)){if(a/=d,d<0){if(a>u)return;a>l&&(l=a)}else if(d>0){if(a0&&(e[0]=c+l*f,e[1]=s+l*d),u<1&&(n[0]=c+u*f,n[1]=s+u*d),!0}}}}}(s,l,e,n,t,r)?c&&(x.lineStart(),x.point(o,a),y=!1):(h||(x.lineStart(),x.point(s[0],s[1])),x.point(l[0],l[1]),c||x.lineEnd(),y=!1)}g=o,b=a,h=c}return E}}var Sa,Ca,Pa,Da=function(){var e,n,t,r=0,o=0,i=960,a=500;return t={stream:function(t){return e&&n===t?e:e=Ta(r,o,i,a)(n=t)},extent:function(c){return arguments.length?(r=+c[0][0],o=+c[0][1],i=+c[1][0],a=+c[1][1],e=n=null,t):[[r,o],[i,a]]}}},La=co(),ja={sphere:jo,point:jo,lineStart:function(){ja.point=za,ja.lineEnd=Na},lineEnd:jo,polygonStart:jo,polygonEnd:jo};function Na(){ja.point=ja.lineEnd=jo}function za(e,n){Sa=e*=ho,Ca=Oo(n*=ho),Pa=wo(n),ja.point=Ia}function Ia(e,n){e*=ho;var t=Oo(n*=ho),r=wo(n),o=vo(e-Sa),i=wo(o),a=r*Oo(o),c=Pa*t-Ca*r*i,s=Ca*t+Pa*r*i;La.add(xo(So(a*a+c*c),s)),Sa=e,Ca=t,Pa=r}var Ra=function(e){return La.reset(),Bo(e,ja),+La},Ya=[null,null],Fa={type:"LineString",coordinates:Ya},qa=function(e,n){return Ya[0]=e,Ya[1]=n,Ra(Fa)},Ha={Feature:function(e,n){return Wa(e.geometry,n)},FeatureCollection:function(e,n){for(var t=e.features,r=-1,o=t.length;++r0&&(o=qa(e[i],e[i-1]))>0&&t<=o&&r<=o&&(t+r-o)*(1-Math.pow((t-r)/o,2))<1e-12*o)return!0;t=r}return!1}function Xa(e,n){return!!wa(e.map(Za),Ga(n))}function Za(e){return(e=e.map(Ga)).pop(),e}function Ga(e){return[e[0]*ho,e[1]*ho]}var Ka=function(e,n){return(e&&Ha.hasOwnProperty(e.type)?Ha[e.type]:Wa)(e,n)};function Ja(e,n,t){var r=Object(o.s)(e,n-1e-6,t).concat(n);return function(e){return r.map((function(n){return[e,n]}))}}function Qa(e,n,t){var r=Object(o.s)(e,n-1e-6,t).concat(n);return function(e){return r.map((function(n){return[n,e]}))}}function _a(){var e,n,t,r,i,a,c,s,l,u,f,d,p=10,m=p,g=90,b=360,h=2.5;function v(){return{type:"MultiLineString",coordinates:y()}}function y(){return Object(o.s)(Eo(r/g)*g,t,g).map(f).concat(Object(o.s)(Eo(s/b)*b,c,b).map(d)).concat(Object(o.s)(Eo(n/p)*p,e,p).filter((function(e){return vo(e%g)>1e-6})).map(l)).concat(Object(o.s)(Eo(a/m)*m,i,m).filter((function(e){return vo(e%b)>1e-6})).map(u))}return v.lines=function(){return y().map((function(e){return{type:"LineString",coordinates:e}}))},v.outline=function(){return{type:"Polygon",coordinates:[f(r).concat(d(c).slice(1),f(t).reverse().slice(1),d(s).reverse().slice(1))]}},v.extent=function(e){return arguments.length?v.extentMajor(e).extentMinor(e):v.extentMinor()},v.extentMajor=function(e){return arguments.length?(r=+e[0][0],t=+e[1][0],s=+e[0][1],c=+e[1][1],r>t&&(e=r,r=t,t=e),s>c&&(e=s,s=c,c=e),v.precision(h)):[[r,s],[t,c]]},v.extentMinor=function(t){return arguments.length?(n=+t[0][0],e=+t[1][0],a=+t[0][1],i=+t[1][1],n>e&&(t=n,n=e,e=t),a>i&&(t=a,a=i,i=t),v.precision(h)):[[n,a],[e,i]]},v.step=function(e){return arguments.length?v.stepMajor(e).stepMinor(e):v.stepMinor()},v.stepMajor=function(e){return arguments.length?(g=+e[0],b=+e[1],v):[g,b]},v.stepMinor=function(e){return arguments.length?(p=+e[0],m=+e[1],v):[p,m]},v.precision=function(o){return arguments.length?(h=+o,l=Ja(a,i,90),u=Qa(n,e,h),f=Ja(s,c,90),d=Qa(r,t,h),v):h},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function $a(){return _a()()}var ec,nc,tc,rc,oc=function(e,n){var t=e[0]*ho,r=e[1]*ho,o=n[0]*ho,i=n[1]*ho,a=wo(r),c=Oo(r),s=wo(i),l=Oo(i),u=a*wo(t),f=a*Oo(t),d=s*wo(o),p=s*Oo(o),m=2*Do(So(Lo(i-r)+a*s*Lo(o-t))),g=Oo(m),b=m?function(e){var n=Oo(e*=m)/g,t=Oo(m-e)/g,r=t*u+n*d,o=t*f+n*p,i=t*c+n*l;return[xo(o,r)*bo,xo(i,So(r*r+o*o))*bo]}:function(){return[t*bo,r*bo]};return b.distance=m,b},ic=function(e){return e},ac=co(),cc=co(),sc={point:jo,lineStart:jo,lineEnd:jo,polygonStart:function(){sc.lineStart=lc,sc.lineEnd=dc},polygonEnd:function(){sc.lineStart=sc.lineEnd=sc.point=jo,ac.add(vo(cc)),cc.reset()},result:function(){var e=ac/2;return ac.reset(),e}};function lc(){sc.point=uc}function uc(e,n){sc.point=fc,ec=tc=e,nc=rc=n}function fc(e,n){cc.add(rc*e-tc*n),tc=e,rc=n}function dc(){fc(ec,nc)}var pc=sc,mc=1/0,gc=mc,bc=-mc,hc=bc;var vc,yc,xc,wc,Ec={point:function(e,n){ebc&&(bc=e);nhc&&(hc=n)},lineStart:jo,lineEnd:jo,polygonStart:jo,polygonEnd:jo,result:function(){var e=[[mc,gc],[bc,hc]];return bc=hc=-(gc=mc=1/0),e}},kc=0,Ac=0,Mc=0,Oc=0,Tc=0,Sc=0,Cc=0,Pc=0,Dc=0,Lc={point:jc,lineStart:Nc,lineEnd:Rc,polygonStart:function(){Lc.lineStart=Yc,Lc.lineEnd=Fc},polygonEnd:function(){Lc.point=jc,Lc.lineStart=Nc,Lc.lineEnd=Rc},result:function(){var e=Dc?[Cc/Dc,Pc/Dc]:Sc?[Oc/Sc,Tc/Sc]:Mc?[kc/Mc,Ac/Mc]:[NaN,NaN];return kc=Ac=Mc=Oc=Tc=Sc=Cc=Pc=Dc=0,e}};function jc(e,n){kc+=e,Ac+=n,++Mc}function Nc(){Lc.point=zc}function zc(e,n){Lc.point=Ic,jc(xc=e,wc=n)}function Ic(e,n){var t=e-xc,r=n-wc,o=So(t*t+r*r);Oc+=o*(xc+e)/2,Tc+=o*(wc+n)/2,Sc+=o,jc(xc=e,wc=n)}function Rc(){Lc.point=jc}function Yc(){Lc.point=qc}function Fc(){Hc(vc,yc)}function qc(e,n){Lc.point=Hc,jc(vc=xc=e,yc=wc=n)}function Hc(e,n){var t=e-xc,r=n-wc,o=So(t*t+r*r);Oc+=o*(xc+e)/2,Tc+=o*(wc+n)/2,Sc+=o,Cc+=(o=wc*e-xc*n)*(xc+e),Pc+=o*(wc+n),Dc+=3*o,jc(xc=e,wc=n)}var Vc=Lc;function Wc(e){this._context=e}Wc.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,n){switch(this._point){case 0:this._context.moveTo(e,n),this._point=1;break;case 1:this._context.lineTo(e,n);break;default:this._context.moveTo(e+this._radius,n),this._context.arc(e,n,this._radius,0,go)}},result:jo};var Bc,Uc,Xc,Zc,Gc,Kc=co(),Jc={point:jo,lineStart:function(){Jc.point=Qc},lineEnd:function(){Bc&&_c(Uc,Xc),Jc.point=jo},polygonStart:function(){Bc=!0},polygonEnd:function(){Bc=null},result:function(){var e=+Kc;return Kc.reset(),e}};function Qc(e,n){Jc.point=_c,Uc=Zc=e,Xc=Gc=n}function _c(e,n){Zc-=e,Gc-=n,Kc.add(So(Zc*Zc+Gc*Gc)),Zc=e,Gc=n}var $c=Jc;function es(){this._string=[]}function ns(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}es.prototype={_radius:4.5,_circle:ns(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,n){switch(this._point){case 0:this._string.push("M",e,",",n),this._point=1;break;case 1:this._string.push("L",e,",",n);break;default:null==this._circle&&(this._circle=ns(this._radius)),this._string.push("M",e,",",n,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}};var ts=function(e,n){var t,r,o=4.5;function i(e){return e&&("function"==typeof o&&r.pointRadius(+o.apply(this,arguments)),Bo(e,t(r))),r.result()}return i.area=function(e){return Bo(e,t(pc)),pc.result()},i.measure=function(e){return Bo(e,t($c)),$c.result()},i.bounds=function(e){return Bo(e,t(Ec)),Ec.result()},i.centroid=function(e){return Bo(e,t(Vc)),Vc.result()},i.projection=function(n){return arguments.length?(t=null==n?(e=null,ic):(e=n).stream,i):e},i.context=function(e){return arguments.length?(r=null==e?(n=null,new es):new Wc(n=e),"function"!=typeof o&&r.pointRadius(o),i):n},i.pointRadius=function(e){return arguments.length?(o="function"==typeof e?e:(r.pointRadius(+e),+e),i):o},i.projection(e).context(n)},rs=function(e){return{stream:os(e)}};function os(e){return function(n){var t=new is;for(var r in e)t[r]=e[r];return t.stream=n,t}}function is(){}function as(e,n,t){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),Bo(t,e.stream(Ec)),n(Ec.result()),null!=r&&e.clipExtent(r),e}function cs(e,n,t){return as(e,(function(t){var r=n[1][0]-n[0][0],o=n[1][1]-n[0][1],i=Math.min(r/(t[1][0]-t[0][0]),o/(t[1][1]-t[0][1])),a=+n[0][0]+(r-i*(t[1][0]+t[0][0]))/2,c=+n[0][1]+(o-i*(t[1][1]+t[0][1]))/2;e.scale(150*i).translate([a,c])}),t)}function ss(e,n,t){return cs(e,[[0,0],n],t)}function ls(e,n,t){return as(e,(function(t){var r=+n,o=r/(t[1][0]-t[0][0]),i=(r-o*(t[1][0]+t[0][0]))/2,a=-o*t[0][1];e.scale(150*o).translate([i,a])}),t)}function us(e,n,t){return as(e,(function(t){var r=+n,o=r/(t[1][1]-t[0][1]),i=-o*t[0][0],a=(r-o*(t[1][1]+t[0][1]))/2;e.scale(150*o).translate([i,a])}),t)}is.prototype={constructor:is,point:function(e,n){this.stream.point(e,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var fs=wo(30*ho),ds=function(e,n){return+n?function(e,n){function t(r,o,i,a,c,s,l,u,f,d,p,m,g,b){var h=l-r,v=u-o,y=h*h+v*v;if(y>4*n&&g--){var x=a+d,w=c+p,E=s+m,k=So(x*x+w*w+E*E),A=Do(E/=k),M=vo(vo(E)-1)<1e-6||vo(i-f)<1e-6?(i+f)/2:xo(w,x),O=e(M,A),T=O[0],S=O[1],C=T-r,P=S-o,D=v*C-h*P;(D*D/y>n||vo((h*C+v*P)/y-.5)>.3||a*d+c*p+s*m2?e[2]%360*ho:0,C()):[b*bo,h*bo,v*bo]},T.angle=function(e){return arguments.length?(y=e%360*ho,C()):y*bo},T.reflectX=function(e){return arguments.length?(x=e?-1:1,C()):x<0},T.reflectY=function(e){return arguments.length?(w=e?-1:1,C()):w<0},T.precision=function(e){return arguments.length?(a=ds(c,O=e*e),P()):So(O)},T.fitExtent=function(e,n){return cs(T,e,n)},T.fitSize=function(e,n){return ss(T,e,n)},T.fitWidth=function(e,n){return ls(T,e,n)},T.fitHeight=function(e,n){return us(T,e,n)},function(){return n=e.apply(this,arguments),T.invert=n.invert&&S,C()}}function vs(e){var n=0,t=fo/3,r=hs(e),o=r(n,t);return o.parallels=function(e){return arguments.length?r(n=e[0]*ho,t=e[1]*ho):[n*bo,t*bo]},o}function ys(e,n){var t=Oo(e),r=(t+Oo(n))/2;if(vo(r)<1e-6)return function(e){var n=wo(e);function t(e,t){return[e*n,Oo(t)/n]}return t.invert=function(e,t){return[e/n,Do(t*n)]},t}(e);var o=1+t*(2*r-t),i=So(o)/r;function a(e,n){var t=So(o-2*r*Oo(n))/r;return[t*Oo(e*=r),i-t*wo(e)]}return a.invert=function(e,n){var t=i-n,a=xo(e,vo(t))*To(t);return t*r<0&&(a-=fo*To(e)*To(t)),[a/r,Do((o-(e*e+t*t)*r*r)/(2*r))]},a}var xs=function(){return vs(ys).scale(155.424).center([0,33.6442])},ws=function(){return xs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var Es=function(){var e,n,t,r,o,i,a=ws(),c=xs().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=xs().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(e,n){i=[e,n]}};function u(e){var n=e[0],a=e[1];return i=null,t.point(n,a),i||(r.point(n,a),i)||(o.point(n,a),i)}function f(){return e=n=null,u}return u.invert=function(e){var n=a.scale(),t=a.translate(),r=(e[0]-t[0])/n,o=(e[1]-t[1])/n;return(o>=.12&&o<.234&&r>=-.425&&r<-.214?c:o>=.166&&o<.234&&r>=-.214&&r<-.115?s:a).invert(e)},u.stream=function(t){return e&&n===t?e:(r=[a.stream(n=t),c.stream(t),s.stream(t)],o=r.length,e={point:function(e,n){for(var t=-1;++t0?n<1e-6-po&&(n=1e-6-po):n>po-1e-6&&(n=po-1e-6);var t=o/Mo(Ls(n),r);return[t*Oo(r*e),o-t*wo(r*e)]}return i.invert=function(e,n){var t=o-n,i=To(r)*So(e*e+t*t),a=xo(e,vo(t))*To(t);return t*r<0&&(a-=fo*To(e)*To(t)),[a/r,2*yo(Mo(o/i,1/r))-po]},i}var Ns=function(){return vs(js).scale(109.5).parallels([30,30])};function zs(e,n){return[e,n]}zs.invert=zs;var Is=function(){return bs(zs).scale(152.63)};function Rs(e,n){var t=wo(e),r=e===n?Oo(e):(t-wo(n))/(n-e),o=t/r+e;if(vo(r)<1e-6)return zs;function i(e,n){var t=o-n,i=r*e;return[t*Oo(i),o-t*wo(i)]}return i.invert=function(e,n){var t=o-n,i=xo(e,vo(t))*To(t);return t*r<0&&(i-=fo*To(e)*To(t)),[i/r,o-To(r)*So(e*e+t*t)]},i}var Ys=function(){return vs(Rs).scale(131.154).center([0,13.9389])},Fs=1.340264,qs=-.081106,Hs=893e-6,Vs=.003796,Ws=So(3)/2;function Bs(e,n){var t=Do(Ws*Oo(n)),r=t*t,o=r*r*r;return[e*wo(t)/(Ws*(Fs+3*qs*r+o*(7*Hs+9*Vs*r))),t*(Fs+qs*r+o*(Hs+Vs*r))]}Bs.invert=function(e,n){for(var t,r=n,o=r*r,i=o*o*o,a=0;a<12&&(i=(o=(r-=t=(r*(Fs+qs*o+i*(Hs+Vs*o))-n)/(Fs+3*qs*o+i*(7*Hs+9*Vs*o)))*r)*o*o,!(vo(t)<1e-12));++a);return[Ws*e*(Fs+3*qs*o+i*(7*Hs+9*Vs*o))/wo(r),Do(Oo(r)/Ws)]};var Us=function(){return bs(Bs).scale(177.158)};function Xs(e,n){var t=wo(n),r=wo(e)*t;return[t*Oo(e)/r,Oo(n)/r]}Xs.invert=As(yo);var Zs=function(){return bs(Xs).scale(144.049).clipAngle(60)},Gs=function(){var e,n,t,r,o,i,a,c=1,s=0,l=0,u=1,f=1,d=0,p=null,m=1,g=1,b=os({point:function(e,n){var t=y([e,n]);this.stream.point(t[0],t[1])}}),h=ic;function v(){return m=c*u,g=c*f,i=a=null,y}function y(t){var r=t[0]*m,o=t[1]*g;if(d){var i=o*e-r*n;r=r*e+o*n,o=i}return[r+s,o+l]}return y.invert=function(t){var r=t[0]-s,o=t[1]-l;if(d){var i=o*e+r*n;r=r*e-o*n,o=i}return[r/m,o/g]},y.stream=function(e){return i&&a===e?i:i=b(h(a=e))},y.postclip=function(e){return arguments.length?(h=e,p=t=r=o=null,v()):h},y.clipExtent=function(e){return arguments.length?(h=null==e?(p=t=r=o=null,ic):Ta(p=+e[0][0],t=+e[0][1],r=+e[1][0],o=+e[1][1]),v()):null==p?null:[[p,t],[r,o]]},y.scale=function(e){return arguments.length?(c=+e,v()):c},y.translate=function(e){return arguments.length?(s=+e[0],l=+e[1],v()):[s,l]},y.angle=function(t){return arguments.length?(n=Oo(d=t%360*ho),e=wo(d),v()):d*bo},y.reflectX=function(e){return arguments.length?(u=e?-1:1,v()):u<0},y.reflectY=function(e){return arguments.length?(f=e?-1:1,v()):f<0},y.fitExtent=function(e,n){return cs(y,e,n)},y.fitSize=function(e,n){return ss(y,e,n)},y.fitWidth=function(e,n){return ls(y,e,n)},y.fitHeight=function(e,n){return us(y,e,n)},y};function Ks(e,n){var t=n*n,r=t*t;return[e*(.8707-.131979*t+r*(r*(.003971*t-.001529*r)-.013791)),n*(1.007226+t*(.015085+r*(.028874*t-.044475-.005916*r)))]}Ks.invert=function(e,n){var t,r=n,o=25;do{var i=r*r,a=i*i;r-=t=(r*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-n)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a)))}while(vo(t)>1e-6&&--o>0);return[e/(.8707+(i=r*r)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),r]};var Js=function(){return bs(Ks).scale(175.295)};function Qs(e,n){return[wo(n)*Oo(e),Oo(n)]}Qs.invert=As(Do);var _s=function(){return bs(Qs).scale(249.5).clipAngle(90.000001)};function $s(e,n){var t=wo(n),r=1+wo(e)*t;return[t*Oo(e)/r,Oo(n)/r]}$s.invert=As((function(e){return 2*yo(e)}));var el=function(){return bs($s).scale(250).clipAngle(142)};function nl(e,n){return[Ao(Co((po+n)/2)),-e]}nl.invert=function(e,n){return[-n,2*yo(ko(e))-po]};var tl=function(){var e=Ds(nl),n=e.center,t=e.rotate;return e.center=function(e){return arguments.length?n([-e[1],e[0]]):[(e=n())[1],-e[0]]},e.rotate=function(e){return arguments.length?t([e[0],e[1],e.length>2?e[2]+90:90]):[(e=t())[0],e[1],e[2]-90]},t([0,0,90]).scale(159.155)};function rl(e,n){return e.parent===n.parent?1:2}function ol(e,n){return e+n.x}function il(e,n){return Math.max(e,n.y)}var al=function(){var e=rl,n=1,t=1,r=!1;function o(o){var i,a=0;o.eachAfter((function(n){var t=n.children;t?(n.x=function(e){return e.reduce(ol,0)/e.length}(t),n.y=function(e){return 1+e.reduce(il,0)}(t)):(n.x=i?a+=e(n,i):0,n.y=0,i=n)}));var c=function(e){for(var n;n=e.children;)e=n[0];return e}(o),s=function(e){for(var n;n=e.children;)e=n[n.length-1];return e}(o),l=c.x-e(c,s)/2,u=s.x+e(s,c)/2;return o.eachAfter(r?function(e){e.x=(e.x-o.x)*n,e.y=(o.y-e.y)*t}:function(e){e.x=(e.x-l)/(u-l)*n,e.y=(1-(o.y?e.y/o.y:1))*t})}return o.separation=function(n){return arguments.length?(e=n,o):e},o.size=function(e){return arguments.length?(r=!1,n=+e[0],t=+e[1],o):r?null:[n,t]},o.nodeSize=function(e){return arguments.length?(r=!0,n=+e[0],t=+e[1],o):r?[n,t]:null},o};function cl(e){var n=0,t=e.children,r=t&&t.length;if(r)for(;--r>=0;)n+=t[r].value;else n=1;e.value=n}function sl(e,n){var t,r,o,i,a,c=new dl(e),s=+e.value&&(c.value=e.value),l=[c];for(null==n&&(n=ll);t=l.pop();)if(s&&(t.value=+t.data.value),(o=n(t.data))&&(a=o.length))for(t.children=new Array(a),i=a-1;i>=0;--i)l.push(r=t.children[i]=new dl(o[i])),r.parent=t,r.depth=t.depth+1;return c.eachBefore(fl)}function ll(e){return e.children}function ul(e){e.data=e.data.data}function fl(e){var n=0;do{e.height=n}while((e=e.parent)&&e.height<++n)}function dl(e){this.data=e,this.depth=this.height=0,this.parent=null}dl.prototype=sl.prototype={constructor:dl,count:function(){return this.eachAfter(cl)},each:function(e){var n,t,r,o,i=this,a=[i];do{for(n=a.reverse(),a=[];i=n.pop();)if(e(i),t=i.children)for(r=0,o=t.length;r=0;--t)o.push(n[t]);return this},sum:function(e){return this.eachAfter((function(n){for(var t=+e(n.data)||0,r=n.children,o=r&&r.length;--o>=0;)t+=r[o].value;n.value=t}))},sort:function(e){return this.eachBefore((function(n){n.children&&n.children.sort(e)}))},path:function(e){for(var n=this,t=function(e,n){if(e===n)return e;var t=e.ancestors(),r=n.ancestors(),o=null;e=t.pop(),n=r.pop();for(;e===n;)o=e,e=t.pop(),n=r.pop();return o}(n,e),r=[n];n!==t;)n=n.parent,r.push(n);for(var o=r.length;e!==t;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,n=[e];e=e.parent;)n.push(e);return n},descendants:function(){var e=[];return this.each((function(n){e.push(n)})),e},leaves:function(){var e=[];return this.eachBefore((function(n){n.children||e.push(n)})),e},links:function(){var e=this,n=[];return e.each((function(t){t!==e&&n.push({source:t.parent,target:t})})),n},copy:function(){return sl(this).eachBefore(ul)}};var pl=Array.prototype.slice;var ml=function(e){for(var n,t,r=0,o=(e=function(e){for(var n,t,r=e.length;r;)t=Math.random()*r--|0,n=e[r],e[r]=e[t],e[t]=n;return e}(pl.call(e))).length,i=[];r0&&t*t>r*r+o*o}function vl(e,n){for(var t=0;t(a*=a)?(r=(l+a-o)/(2*l),i=Math.sqrt(Math.max(0,a/l-r*r)),t.x=e.x-r*c-i*s,t.y=e.y-r*s+i*c):(r=(l+o-a)/(2*l),i=Math.sqrt(Math.max(0,o/l-r*r)),t.x=n.x+r*c-i*s,t.y=n.y+r*s+i*c)):(t.x=n.x+t.r,t.y=n.y)}function kl(e,n){var t=e.r+n.r-1e-6,r=n.x-e.x,o=n.y-e.y;return t>0&&t*t>r*r+o*o}function Al(e){var n=e._,t=e.next._,r=n.r+t.r,o=(n.x*t.r+t.x*n.r)/r,i=(n.y*t.r+t.y*n.r)/r;return o*o+i*i}function Ml(e){this._=e,this.next=null,this.previous=null}function Ol(e){if(!(o=e.length))return 0;var n,t,r,o,i,a,c,s,l,u,f;if((n=e[0]).x=0,n.y=0,!(o>1))return n.r;if(t=e[1],n.x=-t.r,t.x=n.r,t.y=0,!(o>2))return n.r+t.r;El(t,n,r=e[2]),n=new Ml(n),t=new Ml(t),r=new Ml(r),n.next=r.previous=t,t.next=n.previous=r,r.next=t.previous=n;e:for(c=3;c0)throw new Error("cycle");return i}return t.id=function(n){return arguments.length?(e=Cl(n),t):e},t.parentId=function(e){return arguments.length?(n=Cl(e),t):n},t};function Ul(e,n){return e.parent===n.parent?1:2}function Xl(e){var n=e.children;return n?n[0]:e.t}function Zl(e){var n=e.children;return n?n[n.length-1]:e.t}function Gl(e,n,t){var r=t/(n.i-e.i);n.c-=r,n.s+=t,e.c+=r,n.z+=t,n.m+=t}function Kl(e,n,t){return e.a.parent===n.parent?e.a:t}function Jl(e,n){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}Jl.prototype=Object.create(dl.prototype);var Ql=function(){var e=Ul,n=1,t=1,r=null;function o(o){var s=function(e){for(var n,t,r,o,i,a=new Jl(e,0),c=[a];n=c.pop();)if(r=n._.children)for(n.children=new Array(i=r.length),o=i-1;o>=0;--o)c.push(t=n.children[o]=new Jl(r[o],o)),t.parent=n;return(a.parent=new Jl(null,0)).children=[a],a}(o);if(s.eachAfter(i),s.parent.m=-s.z,s.eachBefore(a),r)o.eachBefore(c);else{var l=o,u=o,f=o;o.eachBefore((function(e){e.xu.x&&(u=e),e.depth>f.depth&&(f=e)}));var d=l===u?1:e(l,u)/2,p=d-l.x,m=n/(u.x+d+p),g=t/(f.depth||1);o.eachBefore((function(e){e.x=(e.x+p)*m,e.y=e.depth*g}))}return o}function i(n){var t=n.children,r=n.parent.children,o=n.i?r[n.i-1]:null;if(t){!function(e){for(var n,t=0,r=0,o=e.children,i=o.length;--i>=0;)(n=o[i]).z+=t,n.m+=t,t+=n.s+(r+=n.c)}(n);var i=(t[0].z+t[t.length-1].z)/2;o?(n.z=o.z+e(n._,o._),n.m=n.z-i):n.z=i}else o&&(n.z=o.z+e(n._,o._));n.parent.A=function(n,t,r){if(t){for(var o,i=n,a=n,c=t,s=i.parent.children[0],l=i.m,u=a.m,f=c.m,d=s.m;c=Zl(c),i=Xl(i),c&&i;)s=Xl(s),(a=Zl(a)).a=n,(o=c.z+f-i.z-l+e(c._,i._))>0&&(Gl(Kl(c,n,r),n,o),l+=o,u+=o),f+=c.m,l+=i.m,d+=s.m,u+=a.m;c&&!Zl(a)&&(a.t=c,a.m+=f-u),i&&!Xl(s)&&(s.t=i,s.m+=l-d,r=n)}return r}(n,o,n.parent.A||r[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function c(e){e.x*=n,e.y=e.depth*t}return o.separation=function(n){return arguments.length?(e=n,o):e},o.size=function(e){return arguments.length?(r=!1,n=+e[0],t=+e[1],o):r?null:[n,t]},o.nodeSize=function(e){return arguments.length?(r=!0,n=+e[0],t=+e[1],o):r?[n,t]:null},o},_l=function(e,n,t,r,o){for(var i,a=e.children,c=-1,s=a.length,l=e.value&&(o-t)/e.value;++cd&&(d=c),b=u*u*g,(p=Math.max(d/b,b/f))>m){u-=c;break}m=p}h.push(a={value:u,dice:s1?n:1)},t}($l),tu=function(){var e=nu,n=!1,t=1,r=1,o=[0],i=Pl,a=Pl,c=Pl,s=Pl,l=Pl;function u(e){return e.x0=e.y0=0,e.x1=t,e.y1=r,e.eachBefore(f),o=[0],n&&e.eachBefore(Rl),e}function f(n){var t=o[n.depth],r=n.x0+t,u=n.y0+t,f=n.x1-t,d=n.y1-t;f=t-1){var u=c[n];return u.x0=o,u.y0=i,u.x1=a,void(u.y1=s)}var f=l[n],d=r/2+f,p=n+1,m=t-1;for(;p>>1;l[g]s-i){var v=(o*h+a*b)/r;e(n,p,b,o,i,v,s),e(p,t,h,v,i,a,s)}else{var y=(i*h+s*b)/r;e(n,p,b,o,i,a,y),e(p,t,h,o,y,a,s)}}(0,s,e.value,n,t,r,o)},ou=function(e,n,t,r,o){(1&e.depth?_l:Yl)(e,n,t,r,o)},iu=function e(n){function t(e,t,r,o,i){if((a=e._squarify)&&a.ratio===n)for(var a,c,s,l,u,f=-1,d=a.length,p=e.value;++f1?n:1)},t}($l),au=t(88),cu=t(119),su=function(e){for(var n,t=-1,r=e.length,o=e[r-1],i=0;++t1&&(n=e[i[a-2]],t=e[i[a-1]],r=e[c],(t[0]-n[0])*(r[1]-n[1])-(t[1]-n[1])*(r[0]-n[0])<=0);)--a;i[a++]=c}return i.slice(0,a)}var du=function(e){if((t=e.length)<3)return null;var n,t,r=new Array(t),o=new Array(t);for(n=0;n=0;--n)l.push(e[r[i[n]][2]]);for(n=+c;nc!=l>c&&a<(s-t)*(c-r)/(l-r)+t&&(u=!u),s=t,l=r;return u},mu=function(e){for(var n,t,r=-1,o=e.length,i=e[o-1],a=i[0],c=i[1],s=0;++r1);return e+t*i*Math.sqrt(-2*Math.log(o)/o)}}return t.source=e,t}(gu),vu=function e(n){function t(){var e=hu.source(n).apply(this,arguments);return function(){return Math.exp(e())}}return t.source=e,t}(gu),yu=function e(n){function t(e){return function(){for(var t=0,r=0;r1)&&(e-=Math.floor(e));var n=Math.abs(e-.5);return Vf.h=360*e-100,Vf.s=1.5-1.5*n,Vf.l=.8-.9*n,Vf+""},Bf=Object(fe.g)(),Uf=Math.PI/3,Xf=2*Math.PI/3,Zf=function(e){var n;return e=(.5-e)*Math.PI,Bf.r=255*(n=Math.sin(e))*n,Bf.g=255*(n=Math.sin(e+Uf))*n,Bf.b=255*(n=Math.sin(e+Xf))*n,Bf+""},Gf=function(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"};function Kf(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var Jf=Kf(ku("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),Qf=Kf(ku("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),_f=Kf(ku("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),$f=Kf(ku("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),ed=t(45),nd=t(235),td=t(218),rd=t(298),od=function(e,n,t){var r=new X,o=n;return null==n?(r.restart(e,n,t),r):(n=+n,t=null==t?B():+t,r.restart((function i(a){a+=o,r.restart(i,o+=n,t),e(a)}),n,t),r)},id=function(e){return function(){return e}};function ad(e){return e[0]}function cd(e){return e[1]}function sd(){this._=null}function ld(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function ud(e,n){var t=n,r=n.R,o=t.U;o?o.L===t?o.L=r:o.R=r:e._=r,r.U=o,t.U=r,t.R=r.L,t.R&&(t.R.U=t),r.L=t}function fd(e,n){var t=n,r=n.L,o=t.U;o?o.L===t?o.L=r:o.R=r:e._=r,r.U=o,t.U=r,t.L=r.R,t.L&&(t.L.U=t),r.R=t}function dd(e){for(;e.L;)e=e.L;return e}sd.prototype={constructor:sd,insert:function(e,n){var t,r,o;if(e){if(n.P=e,n.N=e.N,e.N&&(e.N.P=n),e.N=n,e.R){for(e=e.R;e.L;)e=e.L;e.L=n}else e.R=n;t=e}else this._?(e=dd(this._),n.P=null,n.N=e,e.P=e.L=n,t=e):(n.P=n.N=null,this._=n,t=null);for(n.L=n.R=null,n.U=t,n.C=!0,e=n;t&&t.C;)t===(r=t.U).L?(o=r.R)&&o.C?(t.C=o.C=!1,r.C=!0,e=r):(e===t.R&&(ud(this,t),t=(e=t).U),t.C=!1,r.C=!0,fd(this,r)):(o=r.L)&&o.C?(t.C=o.C=!1,r.C=!0,e=r):(e===t.L&&(fd(this,t),t=(e=t).U),t.C=!1,r.C=!0,ud(this,r)),t=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var n,t,r,o=e.U,i=e.L,a=e.R;if(t=i?a?dd(a):i:a,o?o.L===e?o.L=t:o.R=t:this._=t,i&&a?(r=t.C,t.C=e.C,t.L=i,i.U=t,t!==a?(o=t.U,t.U=e.U,e=t.R,o.L=e,t.R=a,a.U=t):(t.U=o,o=t,e=t.R)):(r=e.C,e=t),e&&(e.U=o),!r)if(e&&e.C)e.C=!1;else{do{if(e===this._)break;if(e===o.L){if((n=o.R).C&&(n.C=!1,o.C=!0,ud(this,o),n=o.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,fd(this,n),n=o.R),n.C=o.C,o.C=n.R.C=!1,ud(this,o),e=this._;break}}else if((n=o.L).C&&(n.C=!1,o.C=!0,fd(this,o),n=o.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,ud(this,n),n=o.L),n.C=o.C,o.C=n.L.C=!1,fd(this,o),e=this._;break}n.C=!0,e=o,o=o.U}while(!e.C);e&&(e.C=!1)}}};var pd=sd;function md(e,n,t,r){var o=[null,null],i=Yd.push(o)-1;return o.left=e,o.right=n,t&&bd(o,e,n,t),r&&bd(o,n,e,r),Id[e.index].halfedges.push(i),Id[n.index].halfedges.push(i),o}function gd(e,n,t){var r=[n,t];return r.left=e,r}function bd(e,n,t,r){e[0]||e[1]?e.left===t?e[1]=r:e[0]=r:(e[0]=r,e.left=n,e.right=t)}function hd(e,n,t,r,o){var i,a=e[0],c=e[1],s=a[0],l=a[1],u=0,f=1,d=c[0]-s,p=c[1]-l;if(i=n-s,d||!(i>0)){if(i/=d,d<0){if(i0){if(i>f)return;i>u&&(u=i)}if(i=r-s,d||!(i<0)){if(i/=d,d<0){if(i>f)return;i>u&&(u=i)}else if(d>0){if(i0)){if(i/=p,p<0){if(i0){if(i>f)return;i>u&&(u=i)}if(i=o-l,p||!(i<0)){if(i/=p,p<0){if(i>f)return;i>u&&(u=i)}else if(p>0){if(i0||f<1)||(u>0&&(e[0]=[s+u*d,l+u*p]),f<1&&(e[1]=[s+f*d,l+f*p]),!0)}}}}}function vd(e,n,t,r,o){var i=e[1];if(i)return!0;var a,c,s=e[0],l=e.left,u=e.right,f=l[0],d=l[1],p=u[0],m=u[1],g=(f+p)/2,b=(d+m)/2;if(m===d){if(g=r)return;if(f>p){if(s){if(s[1]>=o)return}else s=[g,t];i=[g,o]}else{if(s){if(s[1]1)if(f>p){if(s){if(s[1]>=o)return}else s=[(t-c)/a,t];i=[(o-c)/a,o]}else{if(s){if(s[1]=r)return}else s=[n,a*n+c];i=[r,a*r+c]}else{if(s){if(s[0]=-qd)){var p=s*s+l*l,m=u*u+f*f,g=(f*p-l*m)/d,b=(s*m-u*p)/d,h=kd.pop()||new Ad;h.arc=e,h.site=o,h.x=g+a,h.y=(h.cy=b+c)+Math.sqrt(g*g+b*b),e.circle=h;for(var v=null,y=Rd._;y;)if(h.yFd)c=c.L;else{if(!((o=i-Nd(c,a))>Fd)){r>-Fd?(n=c.P,t=c):o>-Fd?(n=c,t=c.N):n=t=c;break}if(!c.R){n=c;break}c=c.R}!function(e){Id[e.index]={site:e,halfedges:[]}}(e);var s=Cd(e);if(zd.insert(n,s),n||t){if(n===t)return Od(n),t=Cd(n.site),zd.insert(s,t),s.edge=t.edge=md(n.site,s.site),Md(n),void Md(t);if(t){Od(n),Od(t);var l=n.site,u=l[0],f=l[1],d=e[0]-u,p=e[1]-f,m=t.site,g=m[0]-u,b=m[1]-f,h=2*(d*b-p*g),v=d*d+p*p,y=g*g+b*b,x=[(b*v-p*y)/h+u,(d*y-g*v)/h+f];bd(t.edge,l,m,x),s.edge=md(l,e,null,x),t.edge=md(e,m,null,x),Md(n),Md(t)}else s.edge=md(n.site,s.site)}}function jd(e,n){var t=e.site,r=t[0],o=t[1],i=o-n;if(!i)return r;var a=e.P;if(!a)return-1/0;var c=(t=a.site)[0],s=t[1],l=s-n;if(!l)return c;var u=c-r,f=1/i-1/l,d=u/l;return f?(-d+Math.sqrt(d*d-2*f*(u*u/(-2*l)-s+l/2+o-i/2)))/f+r:(r+c)/2}function Nd(e,n){var t=e.N;if(t)return jd(t,n);var r=e.site;return r[1]===n?r[0]:1/0}var zd,Id,Rd,Yd,Fd=1e-6,qd=1e-12;function Hd(e,n){return n[1]-e[1]||n[0]-e[0]}function Vd(e,n){var t,r,o,i=e.sort(Hd).pop();for(Yd=[],Id=new Array(e.length),zd=new pd,Rd=new pd;;)if(o=Ed,i&&(!o||i[1]Fd||Math.abs(o[0][1]-o[1][1])>Fd)||delete Yd[i]}(a,c,s,l),function(e,n,t,r){var o,i,a,c,s,l,u,f,d,p,m,g,b=Id.length,h=!0;for(o=0;oFd||Math.abs(g-d)>Fd)&&(s.splice(c,0,Yd.push(gd(a,p,Math.abs(m-e)Fd?[e,Math.abs(f-e)Fd?[Math.abs(d-r)Fd?[t,Math.abs(f-t)Fd?[Math.abs(d-n)=c)return null;var s=e-o.site[0],l=n-o.site[1],u=s*s+l*l;do{o=i.cells[r=a],a=null,o.halfedges.forEach((function(t){var r=i.edges[t],c=r.left;if(c!==o.site&&c||(c=r.right)){var s=e-c[0],l=n-c[1],f=s*s+l*l;fr?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}var op=function(){var e,n,t=_d,r=$d,o=rp,i=np,a=tp,c=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,u=Bd.a,f=k("start","zoom","end"),d=0;function p(e){e.property("__zoom",ep).on("wheel.zoom",x).on("mousedown.zoom",w).on("dblclick.zoom",E).filter(a).on("touchstart.zoom",O).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",P).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(e,n){return(n=Math.max(c[0],Math.min(c[1],n)))===e.k?e:new Zd(n,e.x,e.y)}function g(e,n,t){var r=n[0]-t[0]*e.k,o=n[1]-t[1]*e.k;return r===e.x&&o===e.y?e:new Zd(e.k,r,o)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function h(e,n,t){e.on("start.zoom",(function(){v(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){v(this,arguments).end()})).tween("zoom",(function(){var e=this,o=arguments,i=v(e,o),a=r.apply(e,o),c=null==t?b(a):"function"==typeof t?t.apply(e,o):t,s=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),l=e.__zoom,f="function"==typeof n?n.apply(e,o):n,d=u(l.invert(c).concat(s/l.k),f.invert(c).concat(s/f.k));return function(e){if(1===e)e=f;else{var n=d(e),t=s/n[2];e=new Zd(t,c[0]-n[0]*t,c[1]-n[1]*t)}i.zoom(null,e)}}))}function v(e,n,t){return!t&&e.__zooming||new y(e,n)}function y(e,n){this.that=e,this.args=n,this.active=0,this.extent=r.apply(e,n),this.taps=0}function x(){if(t.apply(this,arguments)){var e=v(this,arguments),n=this.__zoom,r=Math.max(c[0],Math.min(c[1],n.k*Math.pow(2,i.apply(this,arguments)))),a=Object(N.a)(this);if(e.wheel)e.mouse[0][0]===a[0]&&e.mouse[0][1]===a[1]||(e.mouse[1]=n.invert(e.mouse[0]=a)),clearTimeout(e.wheel);else{if(n.k===r)return;e.mouse=[a,n.invert(a)],ie(this),e.start()}Qd(),e.wheel=setTimeout(l,150),e.zoom("mouse",o(g(m(n,r),e.mouse[0],e.mouse[1]),e.extent,s))}function l(){e.wheel=null,e.end()}}function w(){if(!n&&t.apply(this,arguments)){var e=v(this,arguments,!0),r=Object(A.a)(M.c.view).on("mousemove.zoom",l,!0).on("mouseup.zoom",u,!0),i=Object(N.a)(this),a=M.c.clientX,c=M.c.clientY;S(M.c.view),Jd(),e.mouse=[i,this.__zoom.invert(i)],ie(this),e.start()}function l(){if(Qd(),!e.moved){var n=M.c.clientX-a,t=M.c.clientY-c;e.moved=n*n+t*t>d}e.zoom("mouse",o(g(e.that.__zoom,e.mouse[0]=Object(N.a)(e.that),e.mouse[1]),e.extent,s))}function u(){r.on("mousemove.zoom mouseup.zoom",null),C(M.c.view,e.moved),Qd(),e.end()}}function E(){if(t.apply(this,arguments)){var e=this.__zoom,n=Object(N.a)(this),i=e.invert(n),a=e.k*(M.c.shiftKey?.5:2),c=o(g(m(e,a),n,i),r.apply(this,arguments),s);Qd(),l>0?Object(A.a)(this).transition().duration(l).call(h,c,n):Object(A.a)(this).call(p.transform,c)}}function O(){if(t.apply(this,arguments)){var n,r,o,i,a=M.c.touches,c=a.length,s=v(this,arguments,M.c.changedTouches.length===c);for(Jd(),r=0;r0?1:-1},T=function(e){return p()(e)&&e.indexOf("%")===e.length-1},S=function(e){return M()(e)&&!k()(e)},C=function(e){return S(e)||p()(e)},P=0,D=function(e){var n=++P;return"".concat(e||"").concat(n)},L=function(e,n){var t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!S(e)&&!p()(e))return r;if(T(e)){var i=e.indexOf("%");t=n*parseFloat(e.slice(0,i))/100}else t=+e;return k()(t)&&(t=r),o&&t>n&&(t=n),t},j=function(e){if(!e)return null;var n=Object.keys(e);return n&&n.length?e[n[0]]:null},N=function(e,n){return S(e)&&S(n)?function(t){return e+t*(n-e)}:function(){return n}},z=function(e,n,t){return e&&e.length?e.find((function(e){return e&&("function"==typeof n?n(e):w()(e,n))===t})):null};function I(e,n){for(var t in e)if({}.hasOwnProperty.call(e,t)&&(!{}.hasOwnProperty.call(n,t)||e[t]!==n[t]))return!1;for(var r in n)if({}.hasOwnProperty.call(n,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function R(e){return function(e){if(Array.isArray(e)){for(var n=0,t=new Array(e.length);n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var F={"aria-current":c.a.string,"aria-details":c.a.any,"aria-disabled":c.a.any,"aria-hidden":c.a.any,"aria-invalid":c.a.any,"aria-keyshortcuts":c.a.any,"aria-label":c.a.any,"aria-roledescription":c.a.any,"aria-autocomplete":c.a.any,"aria-checked":c.a.any,"aria-expanded":c.a.any,"aria-haspopup":c.a.any,"aria-level":c.a.any,"aria-modal":c.a.any,"aria-multiline":c.a.any,"aria-multiselectable":c.a.any,"aria-orientation":c.a.any,"aria-placeholder":c.a.any,"aria-pressed":c.a.any,"aria-readonly":c.a.any,"aria-required":c.a.any,"aria-selected":c.a.any,"aria-sort":c.a.any,"aria-valuemax":c.a.any,"aria-valuemin":c.a.any,"aria-valuenow":c.a.any,"aria-valuetext":c.a.any,"aria-atomic":c.a.any,"aria-busy":c.a.any,"aria-live":c.a.any,"aria-relevant":c.a.any,"aria-dropeffect":c.a.any,"aria-grabbed":c.a.any,"aria-activedescendant":c.a.any,"aria-colcount":c.a.any,"aria-colindex":c.a.any,"aria-colspan":c.a.any,"aria-controls":c.a.any,"aria-describedby":c.a.any,"aria-errormessage":c.a.any,"aria-flowto":c.a.any,"aria-labelledby":c.a.any,"aria-owns":c.a.any,"aria-posinset":c.a.any,"aria-rowcount":c.a.any,"aria-rowindex":c.a.any,"aria-rowspan":c.a.any,"aria-setsize":c.a.any,alignmentBaseline:c.a.string,angle:c.a.number,baselineShift:c.a.string,clip:c.a.string,clipPath:c.a.string,clipRule:c.a.string,color:c.a.string,colorInterpolation:c.a.string,colorInterpolationFilters:c.a.string,colorProfile:c.a.string,colorRendering:c.a.string,cursor:c.a.string,direction:c.a.oneOf(["ltr","rtl","inherit"]),display:c.a.string,dominantBaseline:c.a.string,enableBackground:c.a.string,fill:c.a.string,fillOpacity:c.a.oneOfType([c.a.string,c.a.number]),fillRule:c.a.oneOf(["nonzero","evenodd","inherit"]),filter:c.a.string,floodColor:c.a.string,floodOpacity:c.a.oneOfType([c.a.string,c.a.number]),font:c.a.string,fontFamily:c.a.string,fontSize:c.a.oneOfType([c.a.number,c.a.string]),fontSizeAdjust:c.a.oneOfType([c.a.number,c.a.string]),fontStretch:c.a.oneOf(["normal","wider","narrower","ultra-condensed","extra-condensed","condensed","semi-condensed","semi-expanded","expanded","extra-expanded","ultra-expanded","inherit"]),fontStyle:c.a.oneOf(["normal","italic","oblique","inherit"]),fontVariant:c.a.oneOf(["normal","small-caps","inherit"]),fontWeight:c.a.oneOf(["normal","bold","bolder","lighter",100,200,300,400,500,600,700,800,900,"inherit"]),glyphOrientationHorizontal:c.a.string,glyphOrientationVertical:c.a.string,imageRendering:c.a.oneOf(["auto","optimizeSpeed","optimizeQuality","inherit"]),kerning:c.a.oneOfType([c.a.number,c.a.string]),letterSpacing:c.a.oneOfType([c.a.number,c.a.string]),lightingColor:c.a.string,lineHeight:c.a.oneOfType([c.a.number,c.a.string]),markerEnd:c.a.string,markerMid:c.a.string,markerStart:c.a.string,mask:c.a.string,opacity:c.a.oneOfType([c.a.number,c.a.string]),overflow:c.a.oneOf(["visible","hidden","scroll","auto","inherit"]),pointerEvents:c.a.oneOf(["visiblePainted","visibleFill","visibleStroke","visible","painted","fill","stroke","all","none","inherit"]),shapeRendering:c.a.oneOf(["auto","optimizeSpeed","crispEdges","geometricPrecision","inherit"]),stopColor:c.a.string,stopOpacity:c.a.oneOfType([c.a.number,c.a.string]),stroke:c.a.oneOfType([c.a.number,c.a.string]),strokeDasharray:c.a.string,strokeDashoffset:c.a.oneOfType([c.a.number,c.a.string]),strokeLinecap:c.a.oneOf(["butt","round","square","inherit"]),strokeLinejoin:c.a.oneOf(["miter","round","bevel","inherit"]),strokeMiterlimit:c.a.oneOfType([c.a.number,c.a.string]),strokeOpacity:c.a.oneOfType([c.a.number,c.a.string]),strokeWidth:c.a.oneOfType([c.a.number,c.a.string]),textAnchor:c.a.oneOf(["start","middle","end","inherit"]),textDecoration:c.a.oneOf(["none","underline","overline","line-through","blink","inherit"]),textRendering:c.a.oneOf(["auto","optimizeSpeed","optimizeLegibility","geometricPrecision","inherit"]),unicodeBidi:c.a.oneOf(["normal","embed","bidi-override","inherit"]),visibility:c.a.oneOf(["visible","hidden","collapse","inherit"]),wordSpacing:c.a.oneOfType([c.a.number,c.a.string]),writingMode:c.a.oneOf(["lr-tb","rl-tb","tb-rl","lr","rl","tb","inherit"]),transform:c.a.string,role:c.a.string,focusable:c.a.string,tabIndex:c.a.string,style:c.a.object,width:c.a.number,height:c.a.number,dx:c.a.number,dy:c.a.number,x:c.a.number,y:c.a.number,r:c.a.number,radius:c.a.oneOfType([c.a.number,c.a.array])},q={onClick:c.a.func,onMouseDown:c.a.func,onMouseUp:c.a.func,onMouseOver:c.a.func,onMouseMove:c.a.func,onMouseOut:c.a.func,onMouseEnter:c.a.func,onMouseLeave:c.a.func,onTouchEnd:c.a.func,onTouchMove:c.a.func,onTouchStart:c.a.func,onTouchCancel:c.a.func},H={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},V=["auto","linear","pow","sqrt","log","identity","time","band","point","ordinal","quantile","quantize","utc","sequential","threshold"],W=["plainline","line","square","rect","circle","cross","diamond","star","triangle","wye","none"],B=["none"],U=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},X=function(e,n){var t=[],r=[];return r=y()(n)?n.map((function(e){return U(e)})):[U(n)],i.a.Children.forEach(e,(function(e){var n=e&&e.type&&(e.type.displayName||e.type.name);-1!==r.indexOf(n)&&t.push(e)})),t},Z=function(e,n){var t=X(e,n);return t&&t[0]},G=function(e){if(!e||h()(e))return null;var n=i.a.isValidElement(e)?e.props:e;if(!g()(n))return null;var t=null;for(var r in n)({}).hasOwnProperty.call(n,r)&&F[r]&&(t||(t={}),t[r]=n[r]);return t},K=function(e,n){return function(t){return e(n,t),null}},J=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||h()(e))return null;var r=i.a.isValidElement(e)?e.props:e;if(!g()(r))return null;var o=null;for(var a in r)({}).hasOwnProperty.call(r,a)&&q[a]&&(o||(o={}),o[a]=n||(t?K(r[a],r):r[a]));return o},Q=function(e,n,t){return function(r){return e(n,t,r),null}},_=function(e,n,t){if(!g()(e))return null;var r=null;for(var o in e)({}).hasOwnProperty.call(e,o)&&q[o]&&h()(e[o])&&(r||(r={}),r[o]=Q(e[o],n,t));return r},$=function(e){if(!e||!e.props)return!1;var n=e.props,t=n.width,r=n.height;return!(!S(t)||t<=0||!S(r)||r<=0)},ee=function(){return!("undefined"!=typeof window&&window.document&&window.document.createElement&&window.setTimeout)},ne=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],te=function(e){var n=[];return i.a.Children.forEach(e,(function(e){e&&e.type&&p()(e.type)&&ne.indexOf(e.type)>=0&&n.push(e)})),n},re=function(e,n){if(f()(e)&&f()(n))return!0;if(!f()(e)&&!f()(n)){var t=e.props||{},r=t.children,o=Y(t,["children"]),i=n.props||{},a=i.children,c=Y(i,["children"]);return r&&a?I(o,c)&&oe(r,a):!r&&!a&&I(o,c)}return!1},oe=function e(n,t){if(n===t)return!0;if(o.Children.count(n)!==o.Children.count(t))return!1;var r=o.Children.count(n);if(0===r)return!0;if(1===r)return re(y()(n)?n[0]:n,y()(t)?t[0]:t);for(var i=0;i=0}(e))t.push(e);else if(e&&n[U(e.type)]){var i=U(e.type),a=n[i],c=a.handler,s=a.once;if(s&&!r[i]||!s){var l=c(e,i,o);y()(l)?t=[t].concat(R(l)):t.push(l),r[i]=!0}}})),t};function ae(){return(ae=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var se={width:c.a.number.isRequired,height:c.a.number.isRequired,viewBox:c.a.shape({x:c.a.number,y:c.a.number,width:c.a.number,height:c.a.number}),className:c.a.string,style:c.a.object,children:c.a.oneOfType([c.a.arrayOf(c.a.node),c.a.node])};function le(e){var n=e.children,t=e.width,r=e.height,o=e.viewBox,a=e.className,c=e.style,s=ce(e,["children","width","height","viewBox","className","style"]),u=o||{width:t,height:r,x:0,y:0},f=l()("recharts-surface",a),d=G(s);return i.a.createElement("svg",ae({},d,{className:f,width:t,height:r,style:c,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height),version:"1.1"}),n)}le.propTypes=se;var ue=le;function fe(){return(fe=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var pe={className:c.a.string,children:c.a.oneOfType([c.a.arrayOf(c.a.node),c.a.node])};function me(e){var n=e.children,t=e.className,r=de(e,["children","className"]),o=l()("recharts-layer",t);return i.a.createElement("g",fe({className:o},r),n)}me.propTypes=pe;var ge=me,be=t(196),he=t.n(be),ve=t(238),ye=t(309),xe=t(310),we=t(311),Ee=t(312),ke=t(313),Ae=t(314),Me=t(367);function Oe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Te(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Se(e){return(Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ce(){return(Ce=Object.assign||function(e){for(var n=1;n=0&&t>=0?{width:n,height:t}:null}},{key:"getDefaultPosition",value:function(e){var n,t,r=this.props,o=r.layout,i=r.align,a=r.verticalAlign,c=r.margin,s=r.chartWidth,l=r.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(n="center"===i&&"vertical"===o?{left:((s||0)-(this.getBBox()||{width:0}).width)/2}:"right"===i?{right:c&&c.right||0}:{left:c&&c.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(t="middle"===a?{top:((l||0)-(this.getBBox()||{height:0}).height)/2}:"bottom"===a?{bottom:c&&c.bottom||0}:{top:c&&c.top||0}),_e({},n,{},t)}},{key:"updateBBox",value:function(){var e=this.state,n=e.boxWidth,t=e.boxHeight,r=this.props.onBBoxUpdate;if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var o=this.wrapperNode.getBoundingClientRect();(Math.abs(o.width-n)>1||Math.abs(o.height-t)>1)&&this.setState({boxWidth:o.width,boxHeight:o.height},(function(){r&&r(o)}))}else-1===n&&-1===t||this.setState({boxWidth:-1,boxHeight:-1},(function(){r&&r(null)}))}},{key:"render",value:function(){var e=this,n=this.props,t=n.content,r=n.width,o=n.height,a=n.wrapperStyle,c=n.paylodUniqBy,s=n.payload,l=_e({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(a),{},a);return i.a.createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(n){e.wrapperNode=n}},function(e,n){return i.a.isValidElement(e)?i.a.cloneElement(e,n):h()(e)?e(n):i.a.createElement(Ke,n)}(t,_e({},this.props,{payload:cn(c,s)})))}}])&&nn(t.prototype,r),o&&nn(t,o),n}(o.PureComponent);ln.displayName="Legend",ln.propTypes={content:c.a.oneOfType([c.a.element,c.a.func]),wrapperStyle:c.a.object,chartWidth:c.a.number,chartHeight:c.a.number,width:c.a.number,height:c.a.number,iconSize:c.a.number,iconType:c.a.oneOf(sn),layout:c.a.oneOf(["horizontal","vertical"]),align:c.a.oneOf(["center","left","right"]),verticalAlign:c.a.oneOf(["top","bottom","middle"]),margin:c.a.shape({top:c.a.number,left:c.a.number,bottom:c.a.number,right:c.a.number}),payload:c.a.arrayOf(c.a.shape({value:c.a.any,id:c.a.any,type:c.a.oneOf(W)})),paylodUniqBy:c.a.oneOfType([c.a.func,c.a.bool]),formatter:c.a.func,onMouseEnter:c.a.func,onMouseLeave:c.a.func,onClick:c.a.func,onBBoxUpdate:c.a.func},ln.defaultProps={iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"};var un=ln,fn=t(38),dn=t.n(fn),pn=t(79),mn=t.n(pn);function gn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=-1,r=function r(o){t<0&&(t=o),o-t>n?(e(o),t=-1):mn()(r)};mn()(r)}function bn(e){return(bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hn(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function vn(){var e=function(){return null},n=!1;return{stop:function(){n=!0},start:function(t){n=!1,function t(r){if(!n){if(Array.isArray(r)){if(!r.length)return;var o=hn(r),i=o[0],a=o.slice(1);return"number"==typeof i?void gn(t.bind(null,a),i):(t(i),void gn(t.bind(null,a)))}"object"===bn(r)&&e(r),"function"==typeof r&&r()}}(t)},subscribe:function(n){return e=n,function(){e=function(){return null}}}}}var yn=t(801),xn=t.n(yn);function wn(e){for(var n=1;n=0&&e<=1}));var u=Nn(r,i),f=Nn(o,a),d=zn(r,i),p=function(e){return e>1?1:e<0?0:e},m=function(e){for(var n=e>1?1:e,t=n,r=0;r<8;++r){var o=u(t)-n,i=d(t);if(Math.abs(o-n)<1e-4||i<1e-4)return f(t);t=p(t-o/i)}return f(t)};return m.isStepper=!1,m},Rn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.stiff,t=void 0===n?100:n,r=e.damping,o=void 0===r?8:r,i=e.dt,a=void 0===i?17:i,c=function(e,n,r){var i=r+(-(e-n)*t-r*o)*a/1e3,c=r*a/1e3+e;return Math.abs(c-n)<1e-4&&Math.abs(i)<1e-4?[n,0]:[c,i]};return c.isStepper=!0,c.dt=a,c},Yn=t(802),Fn=t.n(Yn);function qn(e){return function(e){if(Array.isArray(e)){for(var n=0,t=new Array(e.length);n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Kn(e){return function(e){if(Array.isArray(e)){for(var n=0,t=new Array(e.length);n0?t[o-1]:r,d=l||Object.keys(s);if("function"==typeof c||"spring"===c)return Kn(e).concat([n.runJSAnimation.bind(n,{from:f.style,to:s,duration:i,easing:c}),i]);var p=Cn(d,i,c),m=Jn({},f.style,s,{transition:p});return Kn(e).concat([m,i,u]).filter(On)}),[a,Math.max(s,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){this.manager||(this.manager=vn());var n=e.begin,t=e.duration,r=e.attributeName,o=e.to,i=e.easing,a=e.onAnimationStart,c=e.onAnimationEnd,s=e.steps,l=e.children,u=this.manager;if(this.unSubscribe=u.subscribe(this.handleStyleChange),"function"!=typeof i&&"function"!=typeof l&&"spring"!==i)if(s.length>1)this.runStepAnimation(e);else{var f=r?Qn({},r,o):o,d=Cn(Object.keys(f),t,i);u.start([a,n,Jn({},f,{transition:d}),t,c])}else this.runJSAnimation(e)}},{key:"handleStyleChange",value:function(e){this.changeStyle(e)}},{key:"changeStyle",value:function(e){this.mounted&&this.setState({style:e})}},{key:"render",value:function(){var e=this.props,n=e.children,t=(e.begin,e.duration,e.attributeName,e.easing,e.isActive),r=(e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart,Gn(e,["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"])),a=o.Children.count(n),c=Sn(this.state.style);if("function"==typeof n)return n(c);if(!t||0===a)return n;var s=function(e){var n=e.props,t=n.style,i=void 0===t?{}:t,a=n.className;return Object(o.cloneElement)(e,Jn({},r,{style:Jn({},i,c),className:a}))};return 1===a?s(o.Children.only(n)):i.a.createElement("div",null,o.Children.map(n,(function(e){return s(e)})))}}])&&_n(t.prototype,r),a&&_n(t,a),n}(o.PureComponent);rt.displayName="Animate",rt.propTypes={from:c.a.oneOfType([c.a.object,c.a.string]),to:c.a.oneOfType([c.a.object,c.a.string]),attributeName:c.a.string,duration:c.a.number,begin:c.a.number,easing:c.a.oneOfType([c.a.string,c.a.func]),steps:c.a.arrayOf(c.a.shape({duration:c.a.number.isRequired,style:c.a.object.isRequired,easing:c.a.oneOfType([c.a.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),c.a.func]),properties:c.a.arrayOf("string"),onAnimationEnd:c.a.func})),children:c.a.oneOfType([c.a.node,c.a.func]),isActive:c.a.bool,canBegin:c.a.bool,onAnimationEnd:c.a.func,shouldReAnimate:c.a.bool,onAnimationStart:c.a.func,onAnimationReStart:c.a.func},rt.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};var ot=rt,it=t(92);function at(e){return(at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ct(){return(ct=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function lt(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function ut(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ft(e,n){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:{},n=e.steps,t=e.duration;return n&&n.length?n.reduce((function(e,n){return e+(M()(n.duration)&&n.duration>0?n.duration:0)}),0):M()(t)?t:0},bt=function(e){function n(){var e,t;ut(this,n);for(var r=arguments.length,o=new Array(r),i=0;iu[n]+o?Math.max(f,u[n]):Math.max(d,u[n])},t}var t,r,o;return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&Wt(e,n)}(n,e),t=n,(r=[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"updateBBox",value:function(){var e=this.state,n=e.boxWidth,t=e.boxHeight;if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-n)>1||Math.abs(r.height-t)>1)&&this.setState({boxWidth:r.width,boxHeight:r.height})}else-1===n&&-1===t||this.setState({boxWidth:-1,boxHeight:-1})}},{key:"render",value:function(){var e,n,t,r=this,o=this.props,a=o.payload,c=o.isAnimationActive,s=o.animationDuration,u=o.animationEasing,d=o.filterNull,p=function(e,n){return!0===e?he()(n,Ut):h()(e)?he()(n,e):n}(o.paylodUniqBy,d&&a&&a.length?a.filter((function(e){return!f()(e.value)})):a),m=p&&p.length,g=this.props,b=g.content,v=g.viewBox,y=g.coordinate,x=g.position,w=g.active,E=Rt({pointerEvents:"none",visibility:w&&m?"visible":"hidden",position:"absolute",top:0},g.wrapperStyle);if(x&&S(x.x)&&S(x.y))n=x.x,t=x.y;else{var k=this.state,A=k.boxWidth,M=k.boxHeight;A>0&&M>0&&y?(n=this.getTranslate({key:"x",tooltipDimension:A,viewBoxDimension:v.width}),t=this.getTranslate({key:"y",tooltipDimension:M,viewBoxDimension:v.height})):E.visibility="hidden"}E=Rt({},Sn({transform:this.props.useTranslate3d?"translate3d(".concat(n,"px, ").concat(t,"px, 0)"):"translate(".concat(n,"px, ").concat(t,"px)")}),{},E),c&&w&&(E=Rt({},Sn({transition:"transform ".concat(s,"ms ").concat(u)}),{},E));var O=l()(Bt,(Yt(e={},"".concat(Bt,"-right"),S(n)&&y&&S(y.x)&&n>=y.x),Yt(e,"".concat(Bt,"-left"),S(n)&&y&&S(y.x)&&n=y.y),Yt(e,"".concat(Bt,"-top"),S(t)&&y&&S(y.y)&&t0?Qt()(t.updateDimensionsImmediate,e.debounce):t.updateDimensionsImmediate,t}var t,r,o;return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&or(e,n)}(n,e),t=n,(r=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.getContainerSize();e&&this.setState(e)}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"getContainerSize",value:function(){return this.container?{containerWidth:this.container.clientWidth,containerHeight:this.container.clientHeight}:null}},{key:"renderChart",value:function(){var e=this.state,n=e.containerWidth,t=e.containerHeight;if(n<0||t<0)return null;var r=this.props,o=r.aspect,a=r.width,c=r.height,s=(r.minWidth,r.minHeight,r.maxHeight),l=r.children;T(a)||T(c);var u=T(a)?n:a,f=T(c)?t:c;return o&&o>0&&(u?f=u/o:f&&(u=f*o),s&&f>s&&(f=s)),i.a.cloneElement(l,{width:u,height:f})}},{key:"render",value:function(){var e=this,n=this.props,t=n.minWidth,r=n.minHeight,o=n.width,a=n.height,c=n.maxHeight,s=n.id,u=n.className,f={width:o,height:a,minWidth:t,minHeight:r,maxHeight:c};return i.a.createElement("div",{id:s,className:l()("recharts-responsive-container",u),style:f,ref:function(n){e.container=n}},this.renderChart(),i.a.createElement($t.a,{handleWidth:!0,handleHeight:!0,onResize:this.handleResize}))}}])&&nr(t.prototype,r),o&&nr(t,o),n}(o.Component);ir.displayName="ResponsiveContainer",ir.propTypes={aspect:c.a.number,width:c.a.oneOfType([c.a.string,c.a.number]),height:c.a.oneOfType([c.a.string,c.a.number]),minHeight:c.a.oneOfType([c.a.string,c.a.number]),minWidth:c.a.oneOfType([c.a.string,c.a.number]),maxHeight:c.a.oneOfType([c.a.string,c.a.number]),children:c.a.node.isRequired,debounce:c.a.number,id:c.a.oneOfType([c.a.string,c.a.number]),className:c.a.oneOfType([c.a.string,c.a.number])},ir.defaultProps={width:"100%",height:"100%",debounce:0};var ar=ir;function cr(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function sr(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function lr(){return null}lr.propTypes=function(e){for(var n=1;n=0&&o===+o?"".concat(o,"px"):o),";");var r,o,i}),"")},wr=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||ee())return{width:0,height:0};var t="".concat(e),r=xr(n),o="".concat(t,"-").concat(r);if(hr.widthCache[o])return hr.widthCache[o];try{var i=document.getElementById("recharts_measurement_span");i||((i=document.createElement("span")).setAttribute("id","recharts_measurement_span"),document.body.appendChild(i));var a=mr({},vr,{},n);Object.keys(a).map((function(e){return i.style[e]=a[e],e})),i.textContent=t;var c=i.getBoundingClientRect(),s={width:c.width,height:c.height};return hr.widthCache[o]=s,++hr.cacheCount>2e3&&(hr.cacheCount=0,hr.widthCache={}),s}catch(e){return{width:0,height:0}}};function Er(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function kr(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ar(e){return(Ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mr(){return(Mr=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Tr(e,n){for(var t=0;t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function _r(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function $r(e,n){for(var t=0;t=0}));if(i&&i.length){var a=i.map((function(e){return e.props.dataKey}));return e.reduce((function(e,n){var r=lo(n,t,0),o=y()(r)?[Rr()(r),zr()(r)]:[r,r],i=a.reduce((function(e,t){var r=lo(n,t,0),i=o[0]-Math.abs(y()(r)?r[0]:r),a=o[1]+Math.abs(y()(r)?r[1]:r);return[Math.min(i,e[0]),Math.max(a,e[1])]}),[1/0,-1/0]);return[Math.min(i[0],e[0]),Math.max(i[1],e[1])]}),[1/0,-1/0])}return null},go=function(e,n,t,r){var o=n.map((function(n){var o=n.props.dataKey;return"number"===t&&o&&mo(e,n,o)||uo(e,o,t,r)}));if("number"===t)return o.reduce((function(e,n){return[Math.min(e[0],n[0]),Math.max(e[1],n[1])]}),[1/0,-1/0]);var i={};return o.reduce((function(e,n){for(var t=0,r=n.length;t=0||n.indexOf("AreaChart")>=0)?{scale:Hr.scalePoint(),realScaleType:"point"}:"category"===r?{scale:Hr.scaleBand(),realScaleType:"band"}:{scale:Hr.scaleLinear(),realScaleType:"linear"};if(p()(t)){var a="scale".concat(t.slice(0,1).toUpperCase()).concat(t.slice(1));return{scale:(Hr[a]||Hr.scalePoint)(),realScaleType:Hr[a]?a:"point"}}return h()(t)?{scale:t}:{scale:Hr.scalePoint(),realScaleType:"point"}},wo=function(e){var n=e.domain();if(n&&!(n.length<=2)){var t=n.length,r=e.range(),o=Math.min(r[0],r[1])-1e-4,i=Math.max(r[0],r[1])+1e-4,a=e(n[0]),c=e(n[t-1]);(ai||ci)&&e.domain([n[0],n[t-1]])}},Eo=function(e,n){if(!e)return null;for(var t=0,r=e.length;tr)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]=0?(e[a][t][0]=o,e[a][t][1]=o+c,o=e[a][t][1]):(e[a][t][0]=i,e[a][t][1]=i+c,i=e[a][t][1])}},expand:Vr.a,none:Wr.a,silhouette:Br.a,wiggle:Ur.a},Mo=function(e,n,t){var r=n.map((function(e){return e.props.dataKey}));return Object(Xr.a)().keys(r).value((function(e,n){return+lo(e,n,0)})).order(Zr.a).offset(Ao[t])(e)},Oo=function(e,n){var t=n.realScaleType,r=n.type,o=n.tickCount,i=n.originalDomain,a=n.allowDecimals,c=t||n.scale;if("auto"!==c&&"linear"!==c)return null;if(o&&"number"===r&&i&&("auto"===i[0]||"auto"===i[1])){var s=e.domain(),l=Object(qr.getNiceTickValues)(s,o,a);return e.domain(function(e,n){return"number"===n?[Rr()(e),zr()(e)]:e}(l,r)),{niceTicks:l}}if(o&&"number"===r){var u=e.domain();return{niceTicks:Object(qr.getTickValuesFixedDomain)(u,o,a)}}return null},To=function(e){var n=e.axis,t=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if("category"===n.type){if(!n.allowDuplicatedCategory&&n.dataKey&&!f()(o[n.dataKey])){var c=z(t,"value",o[n.dataKey]);if(c)return c.coordinate+r/2}return t[i]?t[i].coordinate+r/2:null}var s=lo(o,f()(a)?n.dataKey:a);return f()(s)?null:n.scale(s)},So=function(e){var n=e.axis,t=e.ticks,r=e.offset,o=e.bandSize,i=e.entry,a=e.index;if("category"===n.type)return t[a]?t[a].coordinate+r:null;var c=lo(i,n.dataKey,n.domain[a]);return f()(c)?null:n.scale(c)-o/2+r},Co=function(e){var n=e.numericAxis,t=n.scale.domain();if("number"===n.type){var r=Math.min(t[0],t[1]),o=Math.max(t[0],t[1]);return r<=0&&o>=0?0:o<0?o:r}return t[0]},Po=function(e,n,t){return Object.keys(e).reduce((function(r,o){var i=e[o].stackedData.reduce((function(e,r){var o=r.slice(n,t+1).reduce((function(e,n){return[Rr()(n.concat([e[0]]).filter(S)),zr()(n.concat([e[1]]).filter(S))]}),[1/0,-1/0]);return[Math.min(e[0],o[0]),Math.max(e[1],o[1])]}),[1/0,-1/0]);return[Math.min(i[0],r[0]),Math.max(i[1],r[1])]}),[1/0,-1/0]).map((function(e){return e===1/0||e===-1/0?0:e}))},Do=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Lo=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,jo=function(e,n,t){if(!y()(e))return n;var r=[];if(S(e[0]))r[0]=t?e[0]:Math.min(e[0],n[0]);else if(Do.test(e[0])){var o=+Do.exec(e[0])[1];r[0]=n[0]-o}else h()(e[0])?r[0]=e[0](n[0]):r[0]=n[0];if(S(e[1]))r[1]=t?e[1]:Math.max(e[1],n[1]);else if(Lo.test(e[1])){var i=+Lo.exec(e[1])[1];r[1]=n[1]+i}else h()(e[1])?r[1]=e[1](n[1]):r[1]=n[1];return r},No=function(e,n){if(e&&e.scale&&e.scale.bandwidth)return e.scale.bandwidth();if(e&&n&&n.length>=2){for(var t=wt()(n,(function(e){return e.coordinate})),r=1/0,o=1,i=t.length;o2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(t.left||0)-(t.right||0)),Math.abs(n-(t.top||0)-(t.bottom||0)))/2},Bo=function(e,n,t,r,o){var i=e.width,a=e.height,c=e.startAngle,s=e.endAngle,l=L(e.cx,i,i/2),u=L(e.cy,a,a/2),d=Wo(i,a,t),p=L(e.innerRadius,d,0),m=L(e.outerRadius,d,.8*d);return Object.keys(n).reduce((function(e,t){var i,a=n[t],d=a.domain,g=a.reversed;if(f()(a.range))"angleAxis"===r?i=[c,s]:"radiusAxis"===r&&(i=[p,m]),g&&(i=[i[1],i[0]]);else{var b=Fo(i=a.range,2);c=b[0],s=b[1]}var h=xo(a,o),v=h.realScaleType,y=h.scale;y.domain(d).range(i),wo(y);var x=Oo(y,Ro({},a,{realScaleType:v})),w=Ro({},a,{},x,{range:i,radius:m,realScaleType:v,scale:y,cx:l,cy:u,innerRadius:p,outerRadius:m,startAngle:c,endAngle:s});return Ro({},e,Yo({},t,w))}),{})},Uo=function(e,n){var t,r,o,i,a,c,s=e.x,l=e.y,u=n.cx,f=n.cy,d=(r={x:u,y:f},o=(t={x:s,y:l}).x,i=t.y,a=r.x,c=r.y,Math.sqrt(Math.pow(o-a,2)+Math.pow(i-c,2)));if(d<=0)return{radius:d};var p=(s-u)/d,m=Math.acos(p);return l>f&&(m=2*Math.PI-m),{radius:d,angle:Ho(m),angleInRadian:m}},Xo=function(e,n){var t=n.startAngle,r=n.endAngle,o=Math.floor(t/360),i=Math.floor(r/360);return e+360*Math.min(o,i)},Zo=function(e,n){var t=e.x,r=e.y,o=Uo({x:t,y:r},n),i=o.radius,a=o.angle,c=n.innerRadius,s=n.outerRadius;if(is)return!1;if(0===i)return!0;var l,u=function(e){var n=e.startAngle,t=e.endAngle,r=Math.floor(n/360),o=Math.floor(t/360),i=Math.min(r,o);return{startAngle:n-360*i,endAngle:t-360*i}}(n),f=u.startAngle,d=u.endAngle,p=a;if(f<=d){for(;p>d;)p-=360;for(;p=f&&p<=d}else{for(;p>f;)p-=360;for(;p=d&&p<=f}return l?Ro({},n,{radius:i,angle:Xo(p,n)}):null};function Go(e){return function(e){if(Array.isArray(e)){for(var n=0,t=new Array(e.length);n=0?1:-1;"insideStart"===a?(r=b+w*s,o=v):"insideEnd"===a?(r=h-w*s,o=!v):"end"===a&&(r=h+w*s,o=v),o=x<=0?o:!o;var E=Vo(d,p,y,r),k=Vo(d,p,y,r+359*(o?1:-1)),A="M".concat(E.x,",").concat(E.y,"\n A").concat(y,",").concat(y,",0,1,").concat(o?0:1,",\n ").concat(k.x,",").concat(k.y),M=f()(e.id)?D("recharts-radial-line-"):e.id;return i.a.createElement("text",Ko({},t,{dominantBaseline:"central",className:l()("recharts-radial-bar-label",u)}),i.a.createElement("defs",null,i.a.createElement("path",{id:M,d:A})),i.a.createElement("textPath",{xlinkHref:"#".concat(M)},n))};function ti(e){var n,t=e.viewBox,r=e.position,a=e.value,c=e.children,s=e.content,u=e.className,d=void 0===u?"":u;if(!t||f()(a)&&f()(c)&&!Object(o.isValidElement)(s)&&!h()(s))return null;if(Object(o.isValidElement)(s))return Object(o.cloneElement)(s,e);if(h()(s)){if(n=s(e),Object(o.isValidElement)(n))return n}else n=function(e){var n=e.value,t=e.formatter,r=f()(e.children)?n:e.children;return h()(t)?t(r):r}(e);var p=function(e){return S(e.cx)}(t),m=G(e),b=J(e);if(p&&("insideStart"===r||"insideEnd"===r||"end"===r))return ni(e,n,m);var v=p?function(e){var n=e.viewBox,t=e.offset,r=e.position,o=n.cx,i=n.cy,a=n.innerRadius,c=n.outerRadius,s=(n.startAngle+n.endAngle)/2;if("outside"===r){var l=Vo(o,i,c+t,s),u=l.x;return{x:u,y:l.y,textAnchor:u>=o?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:o,y:i,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:o,y:i,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:o,y:i,textAnchor:"middle",verticalAnchor:"end"};var f=Vo(o,i,(a+c)/2,s);return{x:f.x,y:f.y,textAnchor:"middle",verticalAnchor:"middle"}}(e):function(e){var n=e.viewBox,t=e.offset,r=e.position,o=n.x,i=n.y,a=n.width,c=n.height,s=c>=0?1:-1;return"top"===r?{x:o+a/2,y:i-s*t,textAnchor:"middle",verticalAnchor:s>0?"end":"start"}:"bottom"===r?{x:o+a/2,y:i+c+s*t,textAnchor:"middle",verticalAnchor:"start"}:"left"===r?{x:o-t,y:i+c/2,textAnchor:"end",verticalAnchor:"middle"}:"right"===r?{x:o+a+t,y:i+c/2,textAnchor:"start",verticalAnchor:"middle"}:"insideLeft"===r?{x:o+t,y:i+c/2,textAnchor:"start",verticalAnchor:"middle"}:"insideRight"===r?{x:o+a-t,y:i+c/2,textAnchor:"end",verticalAnchor:"middle"}:"insideTop"===r?{x:o+a/2,y:i+s*t,textAnchor:"middle",verticalAnchor:"start"}:"insideBottom"===r?{x:o+a/2,y:i+c-s*t,textAnchor:"middle",verticalAnchor:"end"}:"insideTopLeft"===r?{x:o+t,y:i+s*t,textAnchor:"start",verticalAnchor:"start"}:"insideTopRight"===r?{x:o+a-t,y:i+s*t,textAnchor:"end",verticalAnchor:"start"}:"insideBottomLeft"===r?{x:o+t,y:i+c-s*t,textAnchor:"start",verticalAnchor:"end"}:"insideBottomRight"===r?{x:o+a-t,y:i+c-s*t,textAnchor:"end",verticalAnchor:"end"}:g()(r)&&(S(r.x)||T(r.x))&&(S(r.y)||T(r.y))?{x:o+L(r.x,a),y:i+L(r.y,c),textAnchor:"end",verticalAnchor:"end"}:{x:o+a/2,y:i+c/2,textAnchor:"middle",verticalAnchor:"middle"}}(e);return i.a.createElement(jr,Ko({className:l()("recharts-label",d)},m,v,b),n)}ti.displayName="Label",ti.defaultProps={offset:5},ti.propTypes=ei;var ri=function(e){var n=e.cx,t=e.cy,r=e.angle,o=e.startAngle,i=e.endAngle,a=e.r,c=e.radius,s=e.innerRadius,l=e.outerRadius,u=e.x,f=e.y,d=e.top,p=e.left,m=e.width,g=e.height,b=e.clockWise;if(S(m)&&S(g)){if(S(u)&&S(f))return{x:u,y:f,width:m,height:g};if(S(d)&&S(p))return{x:d,y:p,width:m,height:g}}return S(u)&&S(f)?{x:u,y:f,width:0,height:0}:S(n)&&S(t)?{cx:n,cy:t,startAngle:o||r||0,endAngle:i||r||0,innerRadius:s||0,outerRadius:l||c||a||0,clockWise:b}:e.viewBox?e.viewBox:{}},oi=function(e,n){return e?!0===e?i.a.createElement(ti,{key:"label-implicit",viewBox:n}):C(e)?i.a.createElement(ti,{key:"label-implicit",viewBox:n,value:e}):Object(o.isValidElement)(e)?e.type===ti?Object(o.cloneElement)(e,{key:"label-implicit",viewBox:n}):i.a.createElement(ti,{key:"label-implicit",content:e,viewBox:n}):h()(e)?i.a.createElement(ti,{key:"label-implicit",content:e,viewBox:n}):g()(e)?i.a.createElement(ti,Ko({viewBox:n},e,{key:"label-implicit"})):null:null};ti.parseViewBox=ri,ti.renderCallByParent=function(e,n){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&t&&!e.label)return null;var r=e.children,i=ri(e),a=X(r,ti).map((function(e,t){return Object(o.cloneElement)(e,{viewBox:n||i,key:"label-".concat(t)})}));if(!t)return a;var c=oi(e.label,n||i);return[c].concat(Go(a))};var ii=ti,ai=t(447),ci=t.n(ai);function si(e){return function(e){if(Array.isArray(e)){for(var n=0,t=new Array(e.length);n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var mi={id:c.a.string,data:c.a.arrayOf(c.a.object),valueAccessor:c.a.func,clockWise:c.a.bool,dataKey:c.a.oneOfType([c.a.string,c.a.number,c.a.func])},gi={valueAccessor:function(e){return y()(e.value)?ci()(e.value):e.value}};function bi(e){var n=e.data,t=e.valueAccessor,r=e.dataKey,o=e.clockWise,a=e.id,c=pi(e,["data","valueAccessor","dataKey","clockWise","id"]);return n&&n.length?i.a.createElement(ge,{className:"recharts-label-list"},n.map((function(e,n){var s=f()(r)?t(e,n):lo(e&&e.payload,r),l=f()(a)?{}:{id:"".concat(a,"-").concat(n)};return i.a.createElement(ii,li({},G(e),c,l,{index:n,value:s,viewBox:ii.parseViewBox(f()(o)?e:fi({},e,{clockWise:o})),key:"label-".concat(n)}))}))):null}bi.propTypes=mi,bi.displayName="LabelList";var hi=function(e,n){return e?!0===e?i.a.createElement(bi,{key:"labelList-implicit",data:n}):i.a.isValidElement(e)||h()(e)?i.a.createElement(bi,{key:"labelList-implicit",data:n,content:e}):g()(e)?i.a.createElement(bi,li({data:n},e,{key:"labelList-implicit"})):null:null};bi.renderCallByParent=function(e,n){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&t&&!e.label)return null;var r=e.children,i=X(r,bi).map((function(e,t){return Object(o.cloneElement)(e,{data:n,key:"labelList-".concat(t)})}));if(!t)return i;var a=hi(e.label,n);return[a].concat(si(i))},bi.defaultProps=gi;var vi=bi;function yi(e){return(yi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xi(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function wi(e){var n,t=e.component,r=xi(e,["component"]);return Object(o.isValidElement)(t)?n=Object(o.cloneElement)(t,r):h()(t)?n=t(r):yi(t),i.a.createElement(ge,{className:"recharts-customized-wrapper"},n)}function Ei(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ki(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ai(e){return(Ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mi(){return(Mi=Object.assign||function(e){for(var n=1;n180),",").concat(+(i>c),",\n ").concat(l.x,",").concat(l.y,"\n ");if(r>0){var f=Vo(n,t,r,i),d=Vo(n,t,r,c);u+="L ".concat(d.x,",").concat(d.y,"\n A ").concat(r,",").concat(r,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(i<=c),",\n ").concat(f.x,",").concat(f.y," Z")}else u+="L ".concat(n,",").concat(t," Z");return u},ji=function(e){function n(){return Oi(this,n),Si(this,Ci(n).apply(this,arguments))}var t,r,o;return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&Pi(e,n)}(n,e),t=n,(r=[{key:"render",value:function(){var e=this.props,n=e.cx,t=e.cy,r=e.innerRadius,o=e.outerRadius,a=e.cornerRadius,c=e.forceCornerRadius,s=e.cornerIsExternal,u=e.startAngle,f=e.endAngle,d=e.className;if(o0&&Math.abs(u-f)<360?function(e){var n=e.cx,t=e.cy,r=e.innerRadius,o=e.outerRadius,i=e.cornerRadius,a=e.forceCornerRadius,c=e.cornerIsExternal,s=e.startAngle,l=e.endAngle,u=O(l-s),f=Di({cx:n,cy:t,radius:o,angle:s,sign:u,cornerRadius:i,cornerIsExternal:c}),d=f.circleTangency,p=f.lineTangency,m=f.theta,g=Di({cx:n,cy:t,radius:o,angle:l,sign:-u,cornerRadius:i,cornerIsExternal:c}),b=g.circleTangency,h=g.lineTangency,v=g.theta,y=Math.abs(s-l)-m-v;if(y<0)return a?"M ".concat(p.x,",").concat(p.y,"\n a").concat(i,",").concat(i,",0,0,1,").concat(2*i,",0\n a").concat(i,",").concat(i,",0,0,1,").concat(2*-i,",0\n "):Li({cx:n,cy:t,innerRadius:r,outerRadius:o,startAngle:s,endAngle:l});var x="M ".concat(p.x,",").concat(p.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(d.x,",").concat(d.y,"\n A").concat(o,",").concat(o,",0,").concat(+(y>180),",").concat(+(u<0),",").concat(b.x,",").concat(b.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(h.x,",").concat(h.y,"\n ");if(r>0){var w=Di({cx:n,cy:t,radius:r,angle:s,sign:u,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),E=w.circleTangency,k=w.lineTangency,A=w.theta,M=Di({cx:n,cy:t,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),T=M.circleTangency,S=M.lineTangency,C=M.theta,P=Math.abs(s-l)-A-C;if(P<0)return"".concat(x,"L").concat(n,",").concat(t,"Z");x+="L".concat(S.x,",").concat(S.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(T.x,",").concat(T.y,"\n A").concat(r,",").concat(r,",0,").concat(+(P>180),",").concat(+(u>0),",").concat(E.x,",").concat(E.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(k.x,",").concat(k.y,"Z")}else x+="L".concat(n,",").concat(t,"Z");return x}({cx:n,cy:t,innerRadius:r,outerRadius:o,cornerRadius:Math.min(b,g/2),forceCornerRadius:c,cornerIsExternal:s,startAngle:u,endAngle:f}):Li({cx:n,cy:t,innerRadius:r,outerRadius:o,startAngle:u,endAngle:f}),i.a.createElement("path",Mi({},G(this.props),J(this.props),{className:m,d:p}))}}])&&Ti(t.prototype,r),o&&Ti(t,o),n}(o.PureComponent);ji.displayName="Sector",ji.propTypes=function(e){for(var n=1;n=0?1:-1,s=t>=0?1:-1,l=r>=0&&t>=0||r<0&&t<0?1:0;if(a>0&&o instanceof Array){for(var u=[],f=0;f<4;f++)u[f]=o[f]>a?a:o[f];i="M".concat(e,",").concat(n+c*u[0]),u[0]>0&&(i+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(l,",").concat(e+s*u[0],",").concat(n)),i+="L ".concat(e+t-s*u[1],",").concat(n),u[1]>0&&(i+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(l,",\n ").concat(e+t,",").concat(n+c*u[1])),i+="L ".concat(e+t,",").concat(n+r-c*u[2]),u[2]>0&&(i+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(l,",\n ").concat(e+t-s*u[2],",").concat(n+r)),i+="L ".concat(e+s*u[3],",").concat(n+r),u[3]>0&&(i+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(l,",\n ").concat(e,",").concat(n+r-c*u[3])),i+="Z"}else if(a>0&&o===+o&&o>0){var d=Math.min(a,o);i="M ".concat(e,",").concat(n+c*d,"\n A ").concat(d,",").concat(d,",0,0,").concat(l,",").concat(e+s*d,",").concat(n,"\n L ").concat(e+t-s*d,",").concat(n,"\n A ").concat(d,",").concat(d,",0,0,").concat(l,",").concat(e+t,",").concat(n+c*d,"\n L ").concat(e+t,",").concat(n+r-c*d,"\n A ").concat(d,",").concat(d,",0,0,").concat(l,",").concat(e+t-s*d,",").concat(n+r,"\n L ").concat(e+s*d,",").concat(n+r,"\n A ").concat(d,",").concat(d,",0,0,").concat(l,",").concat(e,",").concat(n+r-c*d," Z")}else i="M ".concat(e,",").concat(n," h ").concat(t," v ").concat(r," h ").concat(-t," Z");return i},ha=function(e){function n(){var e,t;fa(this,n);for(var r=arguments.length,o=new Array(r),i=0;i0,from:{width:o,height:a,x:t,y:r},to:{width:o,height:a,x:t,y:r},duration:p,animationEasing:d,isActive:b},(function(n){var t=n.width,r=n.height,o=n.x,a=n.y;return i.a.createElement(yt,{canBegin:u>0,from:"0px ".concat(-1===u?1:u,"px"),to:"".concat(u,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:p,isActive:g,easing:d},i.a.createElement("path",ua({},G(e.props),J(e.props),{className:h,d:ba(o,a,t,r,c),ref:function(n){e.node=n}})))})):i.a.createElement("path",ua({},G(this.props),J(this.props),{className:h,d:ba(t,r,o,a,c)}))}}])&&da(t.prototype,r),o&&da(t,o),n}(o.PureComponent);ha.displayName="Rectangle",ha.propTypes=function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function yc(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function xc(e,n){for(var t=0;t1e-5?"outer"===n?"start":"end":t<-1e-5?"outer"===n?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var e=this.props,n=e.cx,t=e.cy,r=e.radius,o=e.axisLine,a=e.axisLineType,c=Cc({},G(this.props),{fill:"none"},G(o));if("circle"===a)return i.a.createElement(Fa,Tc({className:"recharts-polar-angle-axis-line"},c,{cx:n,cy:t,r:r}));var s=this.props.ticks.map((function(e){return Vo(n,t,r,e.coordinate)}));return i.a.createElement(Pa,Tc({className:"recharts-polar-angle-axis-line"},c,{points:s}))}},{key:"renderTicks",value:function(){var e=this,n=this.props,t=n.ticks,r=n.tick,o=n.tickLine,a=n.tickFormatter,c=n.stroke,s=G(this.props),l=G(r),u=Cc({},s,{fill:"none"},G(o)),f=t.map((function(n,t){var f=e.getTickLineCoord(n),d=Cc({textAnchor:e.getTickTextAnchor(n)},s,{stroke:"none",fill:c},l,{index:t,payload:n,x:f.x2,y:f.y2});return i.a.createElement(ge,Tc({className:"recharts-polar-angle-axis-tick",key:"tick-".concat(t)},_(e.props,n,t)),o&&i.a.createElement("line",Tc({className:"recharts-polar-angle-axis-tick-line"},u,f)),r&&e.constructor.renderTickItem(r,d,a?a(n.value):n.value))}));return i.a.createElement(ge,{className:"recharts-polar-angle-axis-ticks"},f)}},{key:"render",value:function(){var e=this.props,n=e.ticks,t=e.radius,r=e.axisLine;return t<=0||!n||!n.length?null:i.a.createElement(ge,{className:"recharts-polar-angle-axis"},r&&this.renderAxisLine(),this.renderTicks())}}])&&Lc(t.prototype,r),o&&Lc(t,o),n}(o.PureComponent);Rc.displayName="PolarAngleAxis",Rc.axisType="angleAxis",Rc.propTypes=Cc({},F,{},q,{type:c.a.oneOf(["number","category"]),angleAxisId:c.a.oneOfType([c.a.string,c.a.number]),dataKey:c.a.oneOfType([c.a.number,c.a.string,c.a.func]),cx:c.a.number,cy:c.a.number,radius:c.a.oneOfType([c.a.number,c.a.string]),hide:c.a.bool,scale:c.a.oneOfType([c.a.oneOf(V),c.a.func]),axisLine:c.a.oneOfType([c.a.bool,c.a.object]),axisLineType:c.a.oneOf(["polygon","circle"]),tickLine:c.a.oneOfType([c.a.bool,c.a.object]),tick:c.a.oneOfType([c.a.bool,c.a.func,c.a.object,c.a.element]),ticks:c.a.arrayOf(c.a.shape({value:c.a.any,coordinate:c.a.number})),stroke:c.a.string,orientation:c.a.oneOf(["inner","outer"]),tickFormatter:c.a.func,allowDuplicatedCategory:c.a.bool}),Rc.defaultProps={type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,domain:[0,"auto"],orientation:"outer",axisLine:!0,tickLine:!0,tick:!0,hide:!1,allowDuplicatedCategory:!0};var Yc=Rc,Fc=t(240),qc=t.n(Fc);function Hc(e){return(Hc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vc(){return(Vc=Object.assign||function(e){for(var n=1;nn?"start":e0?w()(e,"paddingAngle",0):0;if(t){var c=N(t.endAngle-t.startAngle,e.endAngle-e.startAngle),s=Bc({},e,{startAngle:a+i,endAngle:a+c(r)+i});o.push(s),a=s.endAngle}else{var u=e.endAngle,f=e.startAngle,d=N(0,u-f)(r),p=Bc({},e,{startAngle:a+i,endAngle:a+d+i});o.push(p),a=p.endAngle}})),i.a.createElement(ge,null,e.renderSectorsStatically(o))}))}},{key:"renderSectors",value:function(){var e=this.props,n=e.sectors,t=e.isAnimationActive,r=this.state.prevSectors;return!(t&&n&&n.length)||r&&dn()(r,n)?this.renderSectorsStatically(n):this.renderSectorsWithAnimation()}},{key:"render",value:function(){var e=this.props,n=e.hide,t=e.sectors,r=e.className,o=e.label,a=e.cx,c=e.cy,s=e.innerRadius,u=e.outerRadius,f=e.isAnimationActive,d=e.prevSectors;if(n||!t||!t.length||!S(a)||!S(c)||!S(s)||!S(u))return null;var p=l()("recharts-pie",r);return i.a.createElement(ge,{className:p},this.renderSectors(),o&&this.renderLabels(t),ii.renderCallByParent(this.props,null,!1),(!f||d&&dn()(d,t))&&vi.renderCallByParent(this.props,t,!1))}}])&&Zc(t.prototype,r),o&&Zc(t,o),n}(o.PureComponent);Qc.displayName="Pie",Qc.propTypes=Bc({},F,{},q,{className:c.a.string,animationId:c.a.number,cx:c.a.oneOfType([c.a.number,c.a.string]),cy:c.a.oneOfType([c.a.number,c.a.string]),startAngle:c.a.number,endAngle:c.a.number,paddingAngle:c.a.number,innerRadius:c.a.oneOfType([c.a.number,c.a.string]),outerRadius:c.a.oneOfType([c.a.number,c.a.string]),cornerRadius:c.a.oneOfType([c.a.number,c.a.string]),dataKey:c.a.oneOfType([c.a.string,c.a.number,c.a.func]).isRequired,nameKey:c.a.oneOfType([c.a.string,c.a.number,c.a.func]),valueKey:c.a.oneOfType([c.a.string,c.a.number,c.a.func]),data:c.a.arrayOf(c.a.object),blendStroke:c.a.bool,minAngle:c.a.number,legendType:c.a.oneOf(W),tooltipType:c.a.oneOf(B),maxRadius:c.a.number,sectors:c.a.arrayOf(c.a.object),hide:c.a.bool,labelLine:c.a.oneOfType([c.a.object,c.a.func,c.a.element,c.a.bool]),label:c.a.oneOfType([c.a.shape({offsetRadius:c.a.number}),c.a.func,c.a.element,c.a.bool]),activeShape:c.a.oneOfType([c.a.object,c.a.func,c.a.element]),activeIndex:c.a.oneOfType([c.a.number,c.a.arrayOf(c.a.number)]),onAnimationStart:c.a.func,onAnimationEnd:c.a.func,isAnimationActive:c.a.bool,animationBegin:c.a.number,animationDuration:c.a.number,animationEasing:c.a.oneOf(["ease","ease-in","ease-out","ease-in-out","spring","linear"]),id:c.a.string}),Qc.defaultProps={stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!ee(),animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1},Qc.parseDeltaAngle=function(e){var n=e.startAngle,t=e.endAngle;return O(t-n)*Math.min(Math.abs(t-n),360)},Qc.getRealPieData=function(e){var n=e.props,t=n.data,r=n.children,o=G(e.props),i=X(r,ur);return t&&t.length?t.map((function(e,n){return Bc({payload:e},o,{},e,{},i&&i[n]&&i[n].props)})):i&&i.length?i.map((function(e){return Bc({},o,{},e.props)})):[]},Qc.parseCoordinateOfPie=function(e,n){var t=n.top,r=n.left,o=n.width,i=n.height,a=Wo(o,i);return{cx:r+L(e.props.cx,o,o/2),cy:t+L(e.props.cy,i,i/2),innerRadius:L(e.props.innerRadius,a,0),outerRadius:L(e.props.outerRadius,a,.8*a),maxRadius:e.props.maxRadius||Math.sqrt(o*o+i*i)/2}},Qc.getComposedData=function(e){var n=e.item,t=e.offset,r=e.onItemMouseLeave,o=e.onItemMouseEnter,i=Qc.getRealPieData(n);if(!i||!i.length)return[];var a=n.props,c=a.cornerRadius,s=a.startAngle,l=a.endAngle,u=a.paddingAngle,d=a.dataKey,p=a.nameKey,m=a.valueKey,g=a.tooltipType,b=Math.abs(n.props.minAngle),h=Qc.parseCoordinateOfPie(n,t),v=i.length,y=Qc.parseDeltaAngle({startAngle:s,endAngle:l}),x=Math.abs(y),w=x-v*b-(x>=360?v:v-1)*u,E=d;f()(d)&&f()(m)?E="value":f()(d)&&(E=m);var k,A,M=i.reduce((function(e,n){var t=lo(n,E,0);return e+(S(t)?t:0)}),0);M>0&&(k=i.map((function(e,n){var t,r=lo(e,E,0),o=lo(e,p,n),i=(S(r)?r:0)/M,a=(t=n?A.endAngle+O(y)*u:s)+O(y)*(b+i*w),l=(t+a)/2,f=(h.innerRadius+h.outerRadius)/2,d=[{name:o,value:r,payload:e,dataKey:E,type:g}],m=Vo(h.cx,h.cy,f,l);return A=Bc({percent:i,cornerRadius:c,name:o,tooltipPayload:d,midAngle:l,middleRadius:f,tooltipPosition:m},e,{},h,{value:lo(e,E),startAngle:t,endAngle:a,payload:e,paddingAngle:O(y)*u})})));return Bc({},h,{sectors:k,data:i,onMouseLeave:r,onMouseEnter:o})};var _c=Qc;function $c(e){return($c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function es(){return(es=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function bs(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function hs(e,n){for(var t=0;t0&&Math.abs(T)0&&Math.abs(S)0&&t.handleDrag(e.changedTouches[0])},t.handleDragEnd=function(){t.setState({isTravellerMoving:!1,isSlideMoving:!1})},t.handleLeaveWrapper=function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=setTimeout(t.handleDragEnd,t.props.leaveTimeOut))},t.handleEnterSlideOrTraveller=function(){t.setState({isTextActive:!0})},t.handleLeaveSlideOrTraveller=function(){t.setState({isTextActive:!1})},t.handleSlideDragStart=function(e){var n=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:n.pageX})},t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind(Ns(t),"startX"),endX:t.handleTravellerDragStart.bind(Ns(t),"endX")},t.state=e.data&&e.data.length?t.updateScale(e):{},t}var t,r,a;return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&zs(e,n)}(n,e),t=n,a=[{key:"getIndexInRange",value:function(e,n){for(var t=0,r=e.length-1;r-t>1;){var o=Math.floor((t+r)/2);e[o]>n?r=o:t=o}return n>=e[r]?r:t}}],(r=[{key:"componentWillReceiveProps",value:function(e){var n=this,t=this.props,r=t.data,o=t.width,i=t.x,a=t.travellerWidth,c=t.updateId;(e.data!==r||e.updateId!==c)&&e.data&&e.data.length?this.setState(this.updateScale(e)):e.width===o&&e.x===i&&e.travellerWidth===a||(this.scale.range([e.x,e.x+e.width-e.travellerWidth]),this.scaleValues=this.scale.domain().map((function(e){return n.scale(e)})),this.setState({startX:this.scale(e.startIndex),endX:this.scale(e.endIndex)}))}},{key:"componentWillUnmount",value:function(){this.scale=null,this.scaleValues=null,this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null)}},{key:"getIndex",value:function(e){var n=e.startX,t=e.endX,r=this.props,o=r.gap,i=r.data.length-1,a=Math.min(n,t),c=Math.max(n,t),s=this.constructor.getIndexInRange(this.scaleValues,a),l=this.constructor.getIndexInRange(this.scaleValues,c);return{startIndex:s-s%o,endIndex:l===i?i:l-l%o}}},{key:"getTextOfTick",value:function(e){var n=this.props,t=n.data,r=n.tickFormatter,o=n.dataKey,i=lo(t[e],o,e);return h()(r)?r(i):i}},{key:"handleSlideDrag",value:function(e){var n=this.state,t=n.slideMoveStartX,r=n.startX,o=n.endX,i=this.props,a=i.x,c=i.width,s=i.travellerWidth,l=i.startIndex,u=i.endIndex,f=i.onChange,d=e.pageX-t;d>0?d=Math.min(d,a+c-s-o,a+c-s-r):d<0&&(d=Math.max(d,a-r,a-o));var p=this.getIndex({startX:r+d,endX:o+d});p.startIndex===l&&p.endIndex===u||!f||f(p),this.setState({startX:r+d,endX:o+d,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,n){var t=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:t.pageX})}},{key:"handleTravellerMove",value:function(e){var n,t=this.state,r=t.brushMoveStartX,o=t.movingTravellerId,i=t.endX,a=t.startX,c=this.state[o],s=this.props,l=s.x,u=s.width,f=s.travellerWidth,d=s.onChange,p=s.gap,m=s.data,g={startX:this.state.startX,endX:this.state.endX},b=e.pageX-r;b>0?b=Math.min(b,l+u-f-c):b<0&&(b=Math.max(b,l-c)),g[o]=c+b;var h=this.getIndex(g),v=h.startIndex,y=h.endIndex;this.setState((Ds(n={},o,c+b),Ds(n,"brushMoveStartX",e.pageX),n),(function(){var e;d&&(e=m.length-1,("startX"===o&&(i>a?v%p==0:y%p==0)||ia?y%p==0:v%p==0)||i>a&&y===e)&&d(h))}))}},{key:"updateScale",value:function(e){var n=this,t=e.data,r=e.startIndex,o=e.endIndex,i=e.x,a=e.width,c=e.travellerWidth,s=t.length;return this.scale=Object(Hr.scalePoint)().domain(As()(0,s)).range([i,i+a-c]),this.scaleValues=this.scale.domain().map((function(e){return n.scale(e)})),{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,startX:this.scale(r),endX:this.scale(o)}}},{key:"renderBackground",value:function(){var e=this.props,n=e.x,t=e.y,r=e.width,o=e.height,a=e.fill,c=e.stroke;return i.a.createElement("rect",{stroke:c,fill:a,x:n,y:t,width:r,height:o})}},{key:"renderPanorama",value:function(){var e=this.props,n=e.x,t=e.y,r=e.width,a=e.height,c=e.data,s=e.children,l=e.padding,u=o.Children.only(s);return u?i.a.cloneElement(u,{x:n,y:t,width:r,height:a,margin:l,compact:!0,data:c}):null}},{key:"renderTraveller",value:function(e,n){var t=this.props,r=t.y,o=t.travellerWidth,a=t.height,c=t.stroke,s=Math.floor(r+a/2)-1,l=Math.max(e,this.props.x);return i.a.createElement(ge,{className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[n],onTouchStart:this.travellerDragStartHandlers[n],style:{cursor:"col-resize"}},i.a.createElement("rect",{x:l,y:r,width:o,height:a,fill:c,stroke:"none"}),i.a.createElement("line",{x1:l+1,y1:s,x2:l+o-1,y2:s,fill:"none",stroke:"#fff"}),i.a.createElement("line",{x1:l+1,y1:s+2,x2:l+o-1,y2:s+2,fill:"none",stroke:"#fff"}))}},{key:"renderSlide",value:function(e,n){var t=this.props,r=t.y,o=t.height,a=t.stroke;return i.a.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:a,fillOpacity:.2,x:Math.min(e,n),y:r,width:Math.abs(n-e),height:o})}},{key:"renderText",value:function(){var e=this.props,n=e.startIndex,t=e.endIndex,r=e.y,o=e.height,a=e.travellerWidth,c=e.stroke,s=this.state,l=s.startX,u=s.endX,f={pointerEvents:"none",fill:c};return i.a.createElement(ge,{className:"recharts-brush-texts"},i.a.createElement(jr,Ps({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,u)-5,y:r+o/2},f),this.getTextOfTick(n)),i.a.createElement(jr,Ps({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,u)+a+5,y:r+o/2},f),this.getTextOfTick(t)))}},{key:"render",value:function(){var e=this.props,n=e.data,t=e.className,r=e.children,o=e.x,a=e.y,c=e.width,s=e.height,u=e.alwaysShowText,f=this.state,d=f.startX,p=f.endX,m=f.isTextActive,g=f.isSlideMoving,b=f.isTravellerMoving;if(!n||!n.length||!S(o)||!S(a)||!S(c)||!S(s)||c<=0||s<=0)return null;var h=l()("recharts-brush",t),v=1===i.a.Children.count(r),y=Ss("userSelect","none");return i.a.createElement(ge,{className:h,onMouseMove:this.handleDrag,onMouseLeave:this.handleLeaveWrapper,onMouseUp:this.handleDragEnd,onTouchEnd:this.handleDragEnd,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),v&&this.renderPanorama(),this.renderSlide(d,p),this.renderTraveller(d,"startX"),this.renderTraveller(p,"endX"),(m||g||b||u)&&this.renderText())}}])&&Ls(t.prototype,r),a&&Ls(t,a),n}(o.PureComponent);Is.displayName="Brush",Is.propTypes={className:c.a.string,fill:c.a.string,stroke:c.a.string,x:c.a.number,y:c.a.number,width:c.a.number,height:c.a.number.isRequired,travellerWidth:c.a.number,gap:c.a.number,padding:c.a.shape({top:c.a.number,right:c.a.number,bottom:c.a.number,left:c.a.number}),dataKey:c.a.oneOfType([c.a.string,c.a.number,c.a.func]),data:c.a.array,startIndex:c.a.number,endIndex:c.a.number,tickFormatter:c.a.func,children:c.a.node,onChange:c.a.func,updateId:c.a.oneOfType([c.a.string,c.a.number]),leaveTimeOut:c.a.number,alwaysShowText:c.a.bool},Is.defaultProps={height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1};var Rs=Is,Ys=t(806),Fs=t.n(Ys),qs=function(e,n){var t=e.alwaysShow,r=e.ifOverflow;return t&&(r="extendDomain"),r===n},Hs=t(323),Vs=t.n(Hs),Ws=t(449),Bs=t.n(Ws);function Us(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Xs(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:{},t=n.bandAware,r=n.position;if(void 0!==e){if(r)switch(r){case"start":return this.scale(e);case"middle":var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o;case"end":var i=this.bandwidth?this.bandwidth():0;return this.scale(e)+i;default:return this.scale(e)}if(t){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}},{key:"isInRange",value:function(e){var n=this.range(),t=n[0],r=n[n.length-1];return t<=r?e>=t&&e<=r:e>=r&&e<=t}},{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}}]),e}();$s.EPS=1e-4;var el=function(){function e(n){Us(this,e),this.scales=Bs()(n,$s.create),Object.assign(this,this.scales)}return Zs(e,null,[{key:"create",value:function(e){return new this(e)}}]),Zs(e,[{key:"apply",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.bandAware,r=this.scales;return Bs()(e,(function(e,n){return r[n].apply(e,{bandAware:t})}))}},{key:"isInRange",value:function(e){var n=this.scales;return Vs()(e,(function(e,t){return n[t].isInRange(e)}))}}]),e}();function nl(e){return(nl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tl(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function rl(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Bl(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ul(e,n){for(var t=0;t=2?O(g[1].coordinate-g[0].coordinate):1;if(1===y?(t="width"===m?u:f,r="width"===m?u+d:f+p):(t="width"===m?u+d:f+p,r="width"===m?u:f),n){var x=o[v-1],w=h()(i)?i(x.value):x.value,E=wr(w)[m]+b,k=y*(x.coordinate+y*E/2-r);g[v-1]=x=Hl({},x,{tickCoord:k>0?x.coordinate-k*y:x.coordinate}),y*(x.tickCoord-y*E/2-t)>=0&&y*(x.tickCoord+y*E/2-r)<=0&&(r=x.tickCoord-y*(E/2+s),g[v-1]=Hl({},x,{isShow:!0}))}for(var A=n?v-1:v,M=0;M=0&&y*(T.tickCoord+y*C/2-r)<=0&&(t=T.tickCoord+y*(C/2+s),g[M]=Hl({},T,{isShow:!0}))}return g.filter((function(e){return e.isShow}))}},{key:"getTicksEnd",value:function(e){var n,t,r=e.ticks,o=e.tickFormatter,i=e.viewBox,a=e.orientation,c=e.minTickGap,s=e.unit,l=i.x,u=i.y,f=i.width,d=i.height,p="top"===a||"bottom"===a?"width":"height",m=s&&"width"===p?wr(s)[p]:0,g=(r||[]).slice(),b=g.length,v=b>=2?O(g[1].coordinate-g[0].coordinate):1;1===v?(n="width"===p?l:u,t="width"===p?l+f:u+d):(n="width"===p?l+f:u+d,t="width"===p?l:u);for(var y=b-1;y>=0;y--){var x=g[y],w=h()(o)?o(x.value):x.value,E=wr(w)[p]+m;if(y===b-1){var k=v*(x.coordinate+v*E/2-t);g[y]=x=Hl({},x,{tickCoord:k>0?x.coordinate-k*v:x.coordinate})}else g[y]=x=Hl({},x,{tickCoord:x.coordinate});v*(x.tickCoord-v*E/2-n)>=0&&v*(x.tickCoord+v*E/2-t)<=0&&(t=x.tickCoord-v*(E/2+c),g[y]=Hl({},x,{isShow:!0}))}return g.filter((function(e){return e.isShow}))}},{key:"renderTickItem",value:function(e,n,t){return i.a.isValidElement(e)?i.a.cloneElement(e,n):h()(e)?e(n):i.a.createElement(jr,Fl({},n,{className:"recharts-cartesian-axis-tick-value"}),t)}}],(r=[{key:"shouldComponentUpdate",value:function(e,n){var t=e.viewBox,r=Wl(e,["viewBox"]),o=this.props,i=o.viewBox,a=Wl(o,["viewBox"]);return!I(t,i)||!I(r,a)||!I(n,this.state)}},{key:"getTickLineCoord",value:function(e){var n,t,r,o,i,a,c=this.props,s=c.x,l=c.y,u=c.width,f=c.height,d=c.orientation,p=c.tickSize,m=c.mirror,g=c.tickMargin,b=m?-1:1,h=e.tickSize||p,v=S(e.tickCoord)?e.tickCoord:e.coordinate;switch(d){case"top":n=t=e.coordinate,a=(r=(o=l+!m*f)-b*h)-b*g,i=v;break;case"left":r=o=e.coordinate,i=(n=(t=s+!m*u)-b*h)-b*g,a=v;break;case"right":r=o=e.coordinate,i=(n=(t=s+m*u)+b*h)+b*g,a=v;break;default:n=t=e.coordinate,a=(r=(o=l+m*f)+b*h)+b*g,i=v}return{line:{x1:n,y1:r,x2:t,y2:o},tick:{x:i,y:a}}}},{key:"getTickTextAnchor",value:function(){var e,n=this.props,t=n.orientation,r=n.mirror;switch(t){case"left":e=r?"start":"end";break;case"right":e=r?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,n=e.orientation,t=e.mirror,r="end";switch(n){case"left":case"right":r="middle";break;case"top":r=t?"start":"end";break;default:r=t?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var e=this.props,n=e.x,t=e.y,r=e.width,o=e.height,a=e.orientation,c=e.axisLine,s=e.mirror,l=Hl({},G(this.props),{fill:"none"},G(c));if("top"===a||"bottom"===a){var u="top"===a&&!s||"bottom"===a&&s;l=Hl({},l,{x1:n,y1:t+u*o,x2:n+r,y2:t+u*o})}else{var f="left"===a&&!s||"right"===a&&s;l=Hl({},l,{x1:n+f*r,y1:t,x2:n+f*r,y2:t+o})}return i.a.createElement("line",Fl({className:"recharts-cartesian-axis-line"},l))}},{key:"renderTicks",value:function(e){var t=this,r=this.props,o=r.tickLine,a=r.stroke,c=r.tick,s=r.tickFormatter,l=r.unit,u=n.getTicks(Hl({},this.props,{ticks:e})),f=this.getTickTextAnchor(),d=this.getTickVerticalAnchor(),p=G(this.props),m=G(c),g=Hl({},p,{fill:"none"},G(o)),b=u.map((function(e,n){var r=t.getTickLineCoord(e),b=r.line,v=r.tick,y=Hl({textAnchor:f,verticalAnchor:d},p,{stroke:"none",fill:a},m,{},v,{index:n,payload:e,visibleTicksCount:u.length});return i.a.createElement(ge,Fl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(n)},_(t.props,e,n)),o&&i.a.createElement("line",Fl({className:"recharts-cartesian-axis-tick-line"},g,b)),c&&t.constructor.renderTickItem(c,y,"".concat(h()(s)?s(e.value):e.value).concat(l||"")))}));return i.a.createElement("g",{className:"recharts-cartesian-axis-ticks"},b)}},{key:"render",value:function(){var e=this.props,n=e.axisLine,t=e.width,r=e.height,o=e.ticksGenerator,a=e.className;if(e.hide)return null;var c=this.props,s=c.ticks,u=Wl(c,["ticks"]),f=s;return h()(o)&&(f=s&&s.length>0?o(this.props):o(u)),t<=0||r<=0||!f||!f.length?null:i.a.createElement(ge,{className:l()("recharts-cartesian-axis",a)},n&&this.renderAxisLine(),this.renderTicks(f),ii.renderCallByParent(this.props))}}])&&Ul(t.prototype,r),o&&Ul(t,o),n}(o.Component);Kl.displayName="CartesianAxis",Kl.propTypes=Hl({},F,{},q,{className:c.a.string,x:c.a.number,y:c.a.number,width:c.a.number,height:c.a.number,orientation:c.a.oneOf(["top","bottom","left","right"]),viewBox:c.a.shape({x:c.a.number,y:c.a.number,width:c.a.number,height:c.a.number}),tick:c.a.oneOfType([c.a.bool,c.a.func,c.a.object,c.a.element]),axisLine:c.a.oneOfType([c.a.bool,c.a.object]),tickLine:c.a.oneOfType([c.a.bool,c.a.object]),mirror:c.a.bool,tickMargin:c.a.number.isRequired,minTickGap:c.a.number,ticks:c.a.array,tickSize:c.a.number,stroke:c.a.string,tickFormatter:c.a.func,ticksGenerator:c.a.func,interval:c.a.oneOfType([c.a.number,c.a.oneOf(["preserveStart","preserveEnd","preserveStartEnd"])])}),Kl.defaultProps={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"};var Jl=Kl;function Ql(e){return(Ql="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _l(){return(_l=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function eu(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function nu(e){for(var n=1;ni){c=[].concat(gu(t.slice(0,s)),[i-l]);break}var u=c.length%2==0?[0,a]:[a];return[].concat(gu(this.constructor.repeat(t,o)),gu(c),u).map((function(e){return"".concat(e,"px")})).join(", ")}},{key:"renderErrorBar",value:function(){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var e=this.props,n=e.points,t=e.xAxis,r=e.yAxis,o=e.layout,a=e.children,c=X(a,oo);if(!c)return null;function s(e,n){return{x:e.x,y:e.y,value:e.value,errorVal:lo(e.payload,n)}}return c.map((function(e,a){return i.a.cloneElement(e,{key:a,data:n,xAxis:t,yAxis:r,layout:o,dataPointFormatter:s})}))}},{key:"renderDots",value:function(e,n){var t=this;if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,o=r.dot,a=r.points,c=r.dataKey,s=G(this.props),l=G(o),u=J(o),f=a.map((function(e,n){var r=pu({key:"dot-".concat(n),r:3},s,{},l,{},u,{value:e.value,dataKey:c,cx:e.x,cy:e.y,index:n,payload:e.payload});return t.constructor.renderDotItem(o,r)})),d={clipPath:e?"url(#clipPath-".concat(n,")"):null};return i.a.createElement(ge,fu({className:"recharts-line-dots",key:"dots"},d),f)}},{key:"renderCurveStatically",value:function(e,n,t,r){var o=this.props,a=o.type,c=o.layout,s=o.connectNulls,l=pu({},G(this.props),{},J(this.props),{fill:"none",className:"recharts-line-curve",clipPath:n?"url(#clipPath-".concat(t,")"):null,points:e},r,{type:a,layout:c,connectNulls:s});return i.a.createElement(aa,fu({},l,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,n){var t=this,r=this.props,o=r.points,a=r.strokeDasharray,c=r.isAnimationActive,s=r.animationBegin,l=r.animationDuration,u=r.animationEasing,f=r.animationId,d=r.width,p=r.height,m=this.state,g=m.prevPoints,b=m.totalLength;return i.a.createElement(yt,{begin:s,duration:l,isActive:c,easing:u,from:{t:0},to:{t:1},key:"line-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(r){var i=r.t;if(g){var c=g.length/o.length,s=o.map((function(e,n){var r=Math.floor(n*c);if(g[r]){var o=g[r],a=N(o.x,e.x),s=N(o.y,e.y);return pu({},e,{x:a(i),y:s(i)})}if(t.animateNewValues){var l=N(2*d,e.x),u=N(p/2,e.y);return pu({},e,{x:l(i),y:u(i)})}return pu({},e,{x:e.x,y:e.y})}));return t.renderCurveStatically(s,e,n)}var l,u=N(0,b)(i);if(a){var f=a.split(/[,\s]+/gim).map((function(e){return parseFloat(e)}));l=t.getStrokeDasharray(u,b,f)}else l="".concat(u,"px ").concat(b-u,"px");return t.renderCurveStatically(o,e,n,{strokeDasharray:l})}))}},{key:"renderCurve",value:function(e,n){var t=this.props,r=t.points,o=t.isAnimationActive,i=this.state,a=i.prevPoints,c=i.totalLength;return o&&r&&r.length&&(!a&&c>0||!dn()(a,r))?this.renderCurveWithAnimation(e,n):this.renderCurveStatically(r,e,n)}},{key:"render",value:function(){var e=this.props,n=e.hide,t=e.dot,r=e.points,o=e.className,a=e.xAxis,c=e.yAxis,s=e.top,u=e.left,d=e.width,p=e.height,m=e.isAnimationActive,g=e.id;if(n||!r||!r.length)return null;var b=this.state.isAnimationFinished,h=1===r.length,v=l()("recharts-line",o),y=a&&a.allowDataOverflow||c&&c.allowDataOverflow,x=f()(g)?this.id:g;return i.a.createElement(ge,{className:v},y?i.a.createElement("defs",null,i.a.createElement("clipPath",{id:"clipPath-".concat(x)},i.a.createElement("rect",{x:u,y:s,width:d,height:p}))):null,!h&&this.renderCurve(y,x),this.renderErrorBar(),(h||t)&&this.renderDots(y,x),(!m||b)&&vi.renderCallByParent(this.props,r))}}])&&hu(t.prototype,r),o&&hu(t,o),n}(o.PureComponent);wu.displayName="Line",wu.propTypes=pu({},F,{},q,{className:c.a.string,type:c.a.oneOfType([c.a.oneOf(["basis","basisClosed","basisOpen","linear","linearClosed","natural","monotoneX","monotoneY","monotone","step","stepBefore","stepAfter"]),c.a.func]),unit:c.a.oneOfType([c.a.string,c.a.number]),name:c.a.oneOfType([c.a.string,c.a.number]),yAxisId:c.a.oneOfType([c.a.string,c.a.number]),xAxisId:c.a.oneOfType([c.a.string,c.a.number]),yAxis:c.a.object,xAxis:c.a.object,legendType:c.a.oneOf(W),tooltipType:c.a.oneOf(B),layout:c.a.oneOf(["horizontal","vertical"]),connectNulls:c.a.bool,hide:c.a.bool,activeDot:c.a.oneOfType([c.a.object,c.a.element,c.a.func,c.a.bool]),dot:c.a.oneOfType([c.a.object,c.a.element,c.a.func,c.a.bool]),top:c.a.number,left:c.a.number,width:c.a.number,height:c.a.number,points:c.a.arrayOf(c.a.shape({x:c.a.number,y:c.a.number,value:c.a.value})),onAnimationStart:c.a.func,onAnimationEnd:c.a.func,isAnimationActive:c.a.bool,animateNewValues:c.a.bool,animationBegin:c.a.number,animationDuration:c.a.number,animationEasing:c.a.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),animationId:c.a.number,id:c.a.string}),wu.defaultProps={xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!ee(),animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,onAnimationStart:function(){},onAnimationEnd:function(){}},wu.getComposedData=function(e){var n=e.props,t=e.xAxis,r=e.yAxis,o=e.xAxisTicks,i=e.yAxisTicks,a=e.dataKey,c=e.bandSize,s=e.displayedData,l=e.offset,u=n.layout;return pu({points:s.map((function(e,n){var s=lo(e,a);return"horizontal"===u?{x:To({axis:t,ticks:o,bandSize:c,entry:e,index:n}),y:f()(s)?null:r.scale(s),value:s,payload:e}:{x:f()(s)?null:t.scale(s),y:To({axis:r,ticks:i,bandSize:c,entry:e,index:n}),value:s,payload:e}})),layout:u},l)};var Eu=wu;function ku(e){return(ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Au(){return(Au=Object.assign||function(e){for(var n=1;n0||!dn()(c,r)||!dn()(s,o))?this.renderAreaWithAnimation(e,n):this.renderAreaStatically(r,o,e,n)}},{key:"render",value:function(){var e=this.props,n=e.hide,t=e.dot,r=e.points,o=e.className,a=e.top,c=e.left,s=e.xAxis,u=e.yAxis,d=e.width,p=e.height,m=e.isAnimationActive,g=e.id;if(n||!r||!r.length)return null;var b=this.state.isAnimationFinished,h=1===r.length,v=l()("recharts-area",o),y=s&&s.allowDataOverflow||u&&u.allowDataOverflow,x=f()(g)?this.id:g;return i.a.createElement(ge,{className:v},y?i.a.createElement("defs",null,i.a.createElement("clipPath",{id:"clipPath-".concat(x)},i.a.createElement("rect",{x:c,y:a,width:d,height:parseInt(p,10)}))):null,h?null:this.renderArea(y,x),(t||h)&&this.renderDots(y,x),(!m||b)&&vi.renderCallByParent(this.props,r))}}])&&Cu(t.prototype,r),o&&Cu(t,o),n}(o.PureComponent);ju.displayName="Area",ju.propTypes=Ou({},F,{},q,{className:c.a.string,dataKey:c.a.oneOfType([c.a.string,c.a.number,c.a.func]).isRequired,type:c.a.oneOfType([c.a.oneOf(["basis","basisClosed","basisOpen","linear","linearClosed","natural","monotoneX","monotoneY","monotone","step","stepBefore","stepAfter"]),c.a.func]),unit:c.a.oneOfType([c.a.string,c.a.number]),name:c.a.oneOfType([c.a.string,c.a.number]),yAxisId:c.a.oneOfType([c.a.string,c.a.number]),xAxisId:c.a.oneOfType([c.a.string,c.a.number]),yAxis:c.a.object,xAxis:c.a.object,stackId:c.a.oneOfType([c.a.number,c.a.string]),legendType:c.a.oneOf(W),tooltipType:c.a.oneOf(B),connectNulls:c.a.bool,activeDot:c.a.oneOfType([c.a.object,c.a.element,c.a.func,c.a.bool]),dot:c.a.oneOfType([c.a.func,c.a.element,c.a.object,c.a.bool]),label:c.a.oneOfType([c.a.func,c.a.element,c.a.object,c.a.bool]),hide:c.a.bool,layout:c.a.oneOf(["horizontal","vertical"]),baseLine:c.a.oneOfType([c.a.number,c.a.array]),isRange:c.a.bool,points:c.a.arrayOf(c.a.shape({x:c.a.number,y:c.a.number,value:c.a.oneOfType([c.a.number,c.a.array])})),onAnimationStart:c.a.func,onAnimationEnd:c.a.func,animationId:c.a.number,isAnimationActive:c.a.bool,animationBegin:c.a.number,animationDuration:c.a.number,animationEasing:c.a.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),id:c.a.string}),ju.defaultProps={stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ee(),animationBegin:0,animationDuration:1500,animationEasing:"ease"},ju.getBaseValue=function(e,n,t){var r=e.layout,o=e.baseValue;if(S(o))return o;var i="horizontal"===r?t:n,a=i.scale.domain();if("number"===i.type){var c=Math.max(a[0],a[1]),s=Math.min(a[0],a[1]);return"dataMin"===o?s:"dataMax"===o||c<0?c:Math.max(Math.min(a[0],a[1]),0)}return"dataMin"===o?a[0]:"dataMax"===o?a[1]:a[0]},ju.getComposedData=function(e){var n,t=e.props,r=e.xAxis,o=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,c=e.bandSize,s=e.dataKey,l=e.stackedData,u=e.dataStartIndex,d=e.displayedData,p=e.offset,m=t.layout,g=l&&l.length,b=ju.getBaseValue(t,r,o),h=!1,v=d.map((function(e,n){var t;return g?t=l[u+n]:(t=lo(e,s),y()(t)?h=!0:t=[b,t]),"horizontal"===m?{x:To({axis:r,ticks:i,bandSize:c,entry:e,index:n}),y:f()(t[1])?null:o.scale(t[1]),value:t,payload:e}:{x:f()(t[1])?null:r.scale(t[1]),y:To({axis:o,ticks:a,bandSize:c,entry:e,index:n}),value:t,payload:e}}));return n=g||h?v.map((function(e){return"horizontal"===m?{x:e.x,y:f()(w()(e,"value[0]"))?null:o.scale(w()(e,"value[0]"))}:{x:f()(w()(e,"value[0]"))?null:r.scale(w()(e,"value[0]")),y:e.y}})):"horizontal"===m?o.scale(b):r.scale(b),Ou({points:v,baseLine:n,layout:m,isRange:h},p)},ju.renderDotItem=function(e,n){return i.a.isValidElement(e)?i.a.cloneElement(e,n):h()(e)?e(n):i.a.createElement(Fa,Au({},n,{className:"recharts-area-dot"}))};var Nu=ju;function zu(e){return(zu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Iu(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Ru(){return(Ru=Object.assign||function(e){for(var n=1;n0&&Math.abs(g)0&&Math.abs(d)=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Hf(){return(Hf=Object.assign||function(e){for(var n=1;n0&&t.handleMouseMove(e.changedTouches[0])},t.handleTouchStart=function(e){null!=e.changedTouches&&e.changedTouches.length>0&&t.handleMouseDown(e.changedTouches[0])},t.handleTouchEnd=function(e){null!=e.changedTouches&&e.changedTouches.length>0&&t.handleMouseUp(e.changedTouches[0])},t.verticalCoordinatesGenerator=function(e){var n=e.xAxis,t=e.width,r=e.height,o=e.offset;return ho(Jl.getTicks(Bf({},Jl.defaultProps,{},n,{ticks:vo(n,!0),viewBox:{x:0,y:0,width:t,height:r}})),o.left,o.left+o.width)},t.horizontalCoordinatesGenerator=function(e){var n=e.yAxis,t=e.width,r=e.height,o=e.offset;return ho(Jl.getTicks(Bf({},Jl.defaultProps,{},n,{ticks:vo(n,!0),viewBox:{x:0,y:0,width:t,height:r}})),o.top,o.top+o.height)},t.axesTicksGenerator=function(e){return vo(e,!0)},t.tooltipTicksGenerator=function(e){var n=j(e),t=vo(n,!1,!0);return{tooltipTicks:t,orderedTooltipTicks:wt()(t,(function(e){return e.coordinate})),tooltipAxis:n,tooltipAxisBandSize:No(n)}},t.renderCursor=function(e){var r=t.state,i=r.isTooltipActive,a=r.activeCoordinate,c=r.activePayload,s=r.offset;if(!(e&&e.props.cursor&&i&&a))return null;var l,u=t.props.layout,f=aa;if("ScatterChart"===n)l=a,f=Ja;else if("BarChart"===n)l=t.getCursorRectangle(),f=va;else if("radial"===u){var d=t.getCursorPoints(),p=d.cx,m=d.cy,g=d.radius;l={cx:p,cy:m,startAngle:d.startAngle,endAngle:d.endAngle,innerRadius:g,outerRadius:g},f=Ni}else l={points:t.getCursorPoints()},f=aa;var b=e.key||"_recharts-cursor",h=Bf({stroke:"#ccc",pointerEvents:"none"},s,{},l,{},G(e.props.cursor),{payload:c,key:b,className:"recharts-tooltip-cursor"});return Object(o.isValidElement)(e.props.cursor)?Object(o.cloneElement)(e.props.cursor,h):Object(o.createElement)(f,h)},t.renderPolarAxis=function(e,n,r){var i=e.type.axisType,a=t.state["".concat(i,"Map")][e.props["".concat(i,"Id")]];return Object(o.cloneElement)(e,Bf({},a,{className:i,key:e.key||"".concat(n,"-").concat(r),ticks:vo(a,!0)}))},t.renderXAxis=function(e,n,r){var o=t.state.xAxisMap[e.props.xAxisId];return t.renderAxis(o,e,n,r)},t.renderYAxis=function(e,n,r){var o=t.state.yAxisMap[e.props.yAxisId];return t.renderAxis(o,e,n,r)},t.renderGrid=function(e){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,c=t.props,s=c.width,l=c.height,u=j(r),f=Lf()(i,(function(e){return Vs()(e.domain,Number.isFinite)}))||j(i),d=e.props||{};return Object(o.cloneElement)(e,{key:e.key||"grid",x:S(d.x)?d.x:a.left,y:S(d.y)?d.y:a.top,width:S(d.width)?d.width:a.width,height:S(d.height)?d.height:a.height,xAxis:u,yAxis:f,offset:a,chartWidth:s,chartHeight:l,verticalCoordinatesGenerator:d.verticalCoordinatesGenerator||t.verticalCoordinatesGenerator,horizontalCoordinatesGenerator:d.horizontalCoordinatesGenerator||t.horizontalCoordinatesGenerator})},t.renderPolarGrid=function(e){var n=t.state,r=n.radiusAxisMap,i=n.angleAxisMap,a=j(r),c=j(i),s=c.cx,l=c.cy,u=c.innerRadius,f=c.outerRadius;return Object(o.cloneElement)(e,{polarAngles:vo(c,!0).map((function(e){return e.coordinate})),polarRadius:vo(a,!0).map((function(e){return e.coordinate})),cx:s,cy:l,innerRadius:u,outerRadius:f,key:e.key||"polar-grid"})},t.renderBrush=function(e){var n=t.props,r=n.margin,i=n.data,a=t.state,c=a.offset,s=a.dataStartIndex,l=a.dataEndIndex,u=a.updateId;return Object(o.cloneElement)(e,{key:e.key||"_recharts-brush",onChange:yo(t.handleBrushChange,null,e.props.onChange),data:i,x:S(e.props.x)?e.props.x:c.left,y:S(e.props.y)?e.props.y:c.top+c.height+c.brushBottom-(r.bottom||0),width:S(e.props.width)?e.props.width:c.width,startIndex:s,endIndex:l,updateId:"brush-".concat(u)})},t.renderReferenceElement=function(e,n,r){if(!e)return null;var i=Gf(t).clipPathId,a=t.state,c=a.xAxisMap,s=a.yAxisMap,l=a.offset,u=e.props,f=u.xAxisId,d=u.yAxisId;return Object(o.cloneElement)(e,{key:e.key||"".concat(n,"-").concat(r),xAxis:c[f],yAxis:s[d],viewBox:{x:l.left,y:l.top,width:l.width,height:l.height},clipPathId:i})},t.renderGraphicChild=function(e,n,r){var i=t.filterFormatItem(e,n,r);if(!i)return null;var a=Object(o.cloneElement)(e,i.props),c=t.state,s=c.isTooltipActive,l=c.tooltipAxis,u=c.activeTooltipIndex,d=c.activeLabel,p=t.props.children,m=Z(p,Kt),g=i.props,b=g.points,h=g.isRange,v=g.baseLine,y=i.item.props,x=y.activeDot;if(!y.hide&&s&&m&&x&&u>=0){var w,E;if(l.dataKey&&!l.allowDuplicatedCategory){var k="function"==typeof l.dataKey?function(e){return l.dataKey(e.payload)}:"payload.".concat(l.dataKey);w=z(b,k,d),E=h&&v&&z(v,k,d)}else w=b[u],E=h&&v&&v[u];if(!f()(w))return[a].concat(Vf(t.renderActivePoints({item:i,activePoint:w,basePoint:E,childIndex:u,isRange:h})))}return h?[a,null,null]:[a,null]},t.renderCustomized=function(e){return Object(o.cloneElement)(e,Bf({},t.props,{},t.state))};var i=t.constructor.createDefaultState(e);return t.state=Bf({},i,{updateId:0},t.updateStateOfAxisMapsOffsetAndStackGroups(Bf({props:e},i,{updateId:0}))),t.uniqueChartId=f()(e.id)?D("recharts"):e.id,t.clipPathId="".concat(t.uniqueChartId,"-clip"),e.throttleDelay&&(t.triggeredAfterMouseMove=Nf()(t.triggeredAfterMouseMove,e.throttleDelay)),t}var c,p,m;return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&Kf(e,n)}(r,e),c=r,m=[{key:"getAxisNameByLayout",value:function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}}},{key:"renderActiveDot",value:function(e,n){var t;return t=Object(o.isValidElement)(e)?Object(o.cloneElement)(e,n):h()(e)?e(n):i.a.createElement(Fa,n),i.a.createElement(ge,{className:"recharts-active-dot",key:n.key},t)}}],(p=[{key:"componentDidMount",value:function(){f()(this.props.syncId)||this.addListener()}},{key:"componentWillReceiveProps",value:function(e){var n=this,t=this.props,r=t.data,o=t.children,i=t.width,a=t.height,c=t.layout,s=t.stackOffset,l=t.margin,u=this.state.updateId;if(e.data===r&&e.width===i&&e.height===a&&e.layout===c&&e.stackOffset===s&&I(e.margin,l)){if(!oe(e.children,o)){var d=f()(e.data)?u+1:u;this.setState((function(t){return Bf({updateId:d},n.updateStateOfAxisMapsOffsetAndStackGroups(Bf({props:e},t,{updateId:d})))}))}}else{var p=this.constructor.createDefaultState(e);this.setState(Bf({},p,{updateId:u+1},this.updateStateOfAxisMapsOffsetAndStackGroups(Bf({props:e},p,{updateId:u+1}))))}f()(this.props.syncId)&&!f()(e.syncId)&&this.addListener(),!f()(this.props.syncId)&&f()(e.syncId)&&this.removeListener()}},{key:"componentWillUnmount",value:function(){f()(this.props.syncId)||this.removeListener(),"function"==typeof this.triggeredAfterMouseMove.cancel&&this.triggeredAfterMouseMove.cancel()}},{key:"getAxisMap",value:function(e,n){var t=n.axisType,r=void 0===t?"xAxis":t,o=n.AxisComp,i=n.graphicalItems,a=n.stackGroups,c=n.dataStartIndex,s=n.dataEndIndex,l=e.children,u="".concat(r,"Id"),f=X(l,o),d={};return f&&f.length?d=this.getAxisMapByAxes(e,{axes:f,graphicalItems:i,axisType:r,axisIdKey:u,stackGroups:a,dataStartIndex:c,dataEndIndex:s}):i&&i.length&&(d=this.getAxisMapByItems(e,{Axis:o,graphicalItems:i,axisType:r,axisIdKey:u,stackGroups:a,dataStartIndex:c,dataEndIndex:s})),d}},{key:"getAxisMapByAxes",value:function(e,n){var t=this,r=n.axes,o=n.graphicalItems,i=n.axisType,a=n.axisIdKey,c=n.stackGroups,s=n.dataStartIndex,l=n.dataEndIndex,u=e.layout,d=e.children,p=e.stackOffset,m=bo(u,i);return r.reduce((function(n,r){var g=r.props,b=g.type,h=g.dataKey,v=g.allowDataOverflow,x=g.allowDuplicatedCategory,w=g.scale,E=g.ticks,k=r.props[a],A=t.constructor.getDisplayedData(e,{graphicalItems:o.filter((function(e){return e.props[a]===k})),dataStartIndex:s,dataEndIndex:l}),M=A.length;if(!n[k]){var O,T,S;if(h){if(O=uo(A,h,b),"category"===b&&m){var C=function(e){if(!y()(e))return!1;for(var n=e.length,t={},r=0;r=0?e:[].concat(Vf(e),[n])}),[]))}else if("category"===b)O=x?O.filter((function(e){return""!==e&&!f()(e)})):zo(r.props.domain,O,r).reduce((function(e,n){return e.indexOf(n)>=0||""===n||f()(n)?e:[].concat(Vf(e),[n])}),[]);else if("number"===b){var P=function(e,n,t,r){var o=n.map((function(n){return mo(e,n,t,r)})).filter((function(e){return!f()(e)}));return o&&o.length?o.reduce((function(e,n){return[Math.min(e[0],n[0]),Math.max(e[1],n[1])]}),[1/0,-1/0]):null}(A,o.filter((function(e){return e.props[a]===k&&!e.props.hide})),h,i);P&&(O=P)}!m||"number"!==b&&"auto"===w||(S=uo(A,h,"category"))}else O=m?As()(0,M):c&&c[k]&&c[k].hasStack&&"number"===b?"expand"===p?[0,1]:Po(c[k].stackGroups,s,l):go(A,o.filter((function(e){return e.props[a]===k&&!e.props.hide})),b,!0);return"number"===b&&(O=zf(d,O,k,i,E),r.props.domain&&(O=jo(r.props.domain,O,v))),Bf({},n,Uf({},k,Bf({},r.props,{axisType:i,domain:O,categoricalDomain:S,duplicateDomain:T,originalDomain:r.props.domain,isCategorial:m,layout:u})))}return n}),{})}},{key:"getAxisMapByItems",value:function(e,n){var t=n.graphicalItems,r=n.Axis,o=n.axisType,i=n.axisIdKey,a=n.stackGroups,c=n.dataStartIndex,s=n.dataEndIndex,l=e.layout,u=e.children,f=this.constructor.getDisplayedData(e,{graphicalItems:t,dataStartIndex:c,dataEndIndex:s}),d=f.length,p=bo(l,o),m=-1;return t.reduce((function(e,n){var g,b=n.props[i];return e[b]?e:(m++,p?g=As()(0,d):a&&a[b]&&a[b].hasStack?(g=Po(a[b].stackGroups,c,s),g=zf(u,g,b,o)):(g=jo(r.defaultProps.domain,go(f,t.filter((function(e){return e.props[i]===b&&!e.props.hide})),"number"),r.defaultProps.allowDataOverflow),g=zf(u,g,b,o)),Bf({},e,Uf({},b,Bf({axisType:o},r.defaultProps,{hide:!0,orientation:Jf[o]&&Jf[o][m%2],domain:g,originalDomain:r.defaultProps.domain,isCategorial:p,layout:l}))))}),{})}},{key:"getActiveCoordinate",value:function(e,n,t){var r=this.props.layout,o=e.find((function(e){return e&&e.index===n}));if(o){if("horizontal"===r)return{x:o.coordinate,y:t.y};if("vertical"===r)return{x:t.x,y:o.coordinate};if("centric"===r){var i=o.coordinate,a=t.radius;return Bf({},t,{},Vo(t.cx,t.cy,a,i),{angle:i,radius:a})}var c=o.coordinate,s=t.angle;return Bf({},t,{},Vo(t.cx,t.cy,c,s),{angle:s,radius:c})}return Qf}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var n,t,r,o=function(e,n){return{chartX:Math.round(e.pageX-n.left),chartY:Math.round(e.pageY-n.top)}}(e,(n=this.container,t=n.ownerDocument.documentElement,r={top:0,left:0},void 0!==n.getBoundingClientRect&&(r=n.getBoundingClientRect()),{top:r.top+window.pageYOffset-t.clientTop,left:r.left+window.pageXOffset-t.clientLeft})),i=this.inRange(o.chartX,o.chartY);if(!i)return null;var c=this.state,s=c.xAxisMap,l=c.yAxisMap;if("axis"!==a&&s&&l){var u=j(s).scale,f=j(l).scale;return Bf({},o,{xValue:u&&u.invert?u.invert(o.chartX):null,yValue:f&&f.invert?f.invert(o.chartY):null})}var d=this.state,p=d.orderedTooltipTicks,m=d.tooltipAxis,g=d.tooltipTicks,b=function(e,n,t,r){var o=-1,i=n.length;if(i>1){if(r&&"angleAxis"===r.axisType&&Math.abs(Math.abs(r.range[1]-r.range[0])-360)<=1e-6)for(var a=r.range,c=0;c0?t[c-1].coordinate:t[i-1].coordinate,l=t[c].coordinate,u=c>=i-1?t[0].coordinate:t[c+1].coordinate,f=void 0;if(O(l-s)!==O(u-l)){var d=[];if(O(u-l)===O(a[1]-a[0])){f=u;var p=l+a[1]-a[0];d[0]=Math.min(p,(p+s)/2),d[1]=Math.max(p,(p+s)/2)}else{f=s;var m=u+a[1]-a[0];d[0]=Math.min(l,(m+l)/2),d[1]=Math.max(l,(m+l)/2)}var g=[Math.min(l,(f+l)/2),Math.max(l,(f+l)/2)];if(e>g[0]&&e<=g[1]||e>=d[0]&&e<=d[1]){o=t[c].index;break}}else{var b=Math.min(s,u),h=Math.max(s,u);if(e>(b+l)/2&&e<=(h+l)/2){o=t[c].index;break}}}else for(var v=0;v0&&v(n[v].coordinate+n[v-1].coordinate)/2&&e<=(n[v].coordinate+n[v+1].coordinate)/2||v===i-1&&e>(n[v].coordinate+n[v-1].coordinate)/2){o=n[v].index;break}}else o=0;return o}(this.calculateTooltipPos(i),p,g,m);if(b>=0&&g){var h=g[b]&&g[b].value;return Bf({},o,{activeTooltipIndex:b,activeLabel:h,activePayload:this.getTooltipContent(b,h),activeCoordinate:this.getActiveCoordinate(p,b,i)})}return null}},{key:"getTooltipContent",value:function(e,n){var t=this.state,r=t.graphicalItems,o=t.tooltipAxis,i=this.constructor.getDisplayedData(this.props,this.state);return e<0||!r||!r.length||e>=i.length?null:r.reduce((function(t,r){if(r.props.hide)return t;var a,c=r.props,s=c.dataKey,l=c.name,u=c.unit,f=c.formatter,d=c.data,p=c.tooltipType;return(a=o.dataKey&&!o.allowDuplicatedCategory?z(d||i,o.dataKey,n):d&&d[e]||i[e])?[].concat(Vf(t),[Bf({},G(r),{dataKey:s,unit:u,formatter:f,name:l||s,color:fo(r),value:lo(a,s),type:p,payload:a})]):t}),[])}},{key:"getFormatItems",value:function(e,n){var t=this,r=n.graphicalItems,i=n.stackGroups,a=n.offset,c=n.updateId,l=n.dataStartIndex,u=n.dataEndIndex,d=e.barSize,p=e.layout,m=e.barGap,g=e.barCategoryGap,b=e.maxBarSize,h=this.constructor.getAxisNameByLayout(p),v=h.numericAxisName,y=h.cateAxisName,x=this.constructor.hasBar(r),w=x&&function(e){var n=e.barSize,t=e.stackGroups,r=void 0===t?{}:t;if(!r)return{};for(var o={},i=Object.keys(r),a=0,c=i.length;a=0}));if(b&&b.length){var h=b[0].props.barSize,v=b[0].props[g];o[v]||(o[v]=[]),o[v].push({item:b[0],stackList:b.slice(1),barSize:f()(h)?n:h})}}return o}({barSize:d,stackGroups:i}),E=[];return r.forEach((function(r,d){var h,k,A,M,O=t.constructor.getDisplayedData(e,{dataStartIndex:l,dataEndIndex:u},r),T=r.props,S=T.dataKey,P=T.maxBarSize,D=r.props["".concat(v,"Id")],j=r.props["".concat(y,"Id")],N=s.reduce((function(e,t){var o,i=n["".concat(t.axisType,"Map")],a=r.props["".concat(t.axisType,"Id")],c=i&&i[a];return Bf({},e,(Uf(o={},t.axisType,c),Uf(o,"".concat(t.axisType,"Ticks"),vo(c)),o))}),{}),z=N[y],I=N["".concat(y,"Ticks")],R=i&&i[D]&&i[D].hasStack&&function(e,n){var t=e.props.stackId;if(C(t)){var r=n[t];if(r&&r.items.length){for(var o=-1,i=0,a=r.items.length;i=0?r.stackedData[o]:null}}return null}(r,i[D].stackGroups),Y=No(z,I),F=f()(P)?b:P,q=x&&function(e){var n=e.barGap,t=e.barCategoryGap,r=e.bandSize,o=e.sizeList,i=void 0===o?[]:o,a=e.maxBarSize,c=i.length;if(c<1)return null;var s,l=L(n,r,0,!0);if(i[0].barSize===+i[0].barSize){var u=!1,f=r/c,d=i.reduce((function(e,n){return e+n.barSize||0}),0);(d+=(c-1)*l)>=r&&(d-=(c-1)*l,l=0),d>=r&&f>0&&(u=!0,d=c*(f*=.9));var p={offset:((r-d)/2>>0)-l,size:0};s=i.reduce((function(e,n){var t=[].concat(io(e),[{item:n.item,position:{offset:p.offset+p.size+l,size:u?f:n.barSize}}]);return p=t[t.length-1].position,n.stackList&&n.stackList.length&&n.stackList.forEach((function(e){t.push({item:e,position:p})})),t}),[])}else{var m=L(t,r,0,!0);r-2*m-(c-1)*l<=0&&(l=0);var g=(r-2*m-(c-1)*l)/c;g>1&&(g>>=0);var b=a===+a?Math.min(g,a):g;s=i.reduce((function(e,n,t){var r=[].concat(io(e),[{item:n.item,position:{offset:m+(g+l)*t+(g-b)/2,size:b}}]);return n.stackList&&n.stackList.length&&n.stackList.forEach((function(e){r.push({item:e,position:r[r.length-1].position})})),r}),[])}return s}({barGap:m,barCategoryGap:g,bandSize:Y,sizeList:w[j],maxBarSize:F}),H=r&&r.type&&r.type.getComposedData;H&&E.push({props:Bf({},H(Bf({},N,{displayedData:O,props:e,dataKey:S,item:r,bandSize:Y,barPosition:q,offset:a,stackedData:R,layout:p,dataStartIndex:l,dataEndIndex:u,onItemMouseLeave:yo(t.handleItemMouseLeave,null,r.props.onMouseLeave),onItemMouseEnter:yo(t.handleItemMouseEnter,null,r.props.onMouseEnter)})),(h={key:r.key||"item-".concat(d)},Uf(h,v,N[v]),Uf(h,y,N[y]),Uf(h,"animationId",c),h)),childIndex:(k=r,A=e.children,M=-1,o.Children.forEach(A,(function(e,n){e===k&&(M=n)})),M),item:r})})),E}},{key:"getCursorRectangle",value:function(){var e=this.props.layout,n=this.state,t=n.activeCoordinate,r=n.offset,o=n.tooltipAxisBandSize,i=o/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-i:r.left+.5,y:"horizontal"===e?r.top+.5:t.y-i,width:"horizontal"===e?o:r.width-1,height:"horizontal"===e?r.height-1:o}}},{key:"getCursorPoints",value:function(){var e,n,t,r,o=this.props.layout,i=this.state,a=i.activeCoordinate,c=i.offset;if("horizontal"===o)t=e=a.x,n=c.top,r=c.top+c.height;else if("vertical"===o)r=n=a.y,e=c.left,t=c.left+c.width;else if(!f()(a.cx)||!f()(a.cy)){if("centric"!==o){var s=a.cx,l=a.cy,u=a.radius,d=a.startAngle,p=a.endAngle;return{points:[Vo(s,l,u,d),Vo(s,l,u,p)],cx:s,cy:l,radius:u,startAngle:d,endAngle:p}}var m=a.cx,g=a.cy,b=a.innerRadius,h=a.outerRadius,v=a.angle,y=Vo(m,g,b,v),x=Vo(m,g,h,v);e=y.x,n=y.y,t=x.x,r=x.y}return[{x:e,y:n},{x:t,y:r}]}},{key:"calculateTooltipPos",value:function(e){var n=this.props.layout;return"horizontal"===n?e.x:"vertical"===n?e.y:"centric"===n?e.angle:e.radius}},{key:"inRange",value:function(e,n){var t=this.props.layout;if("horizontal"===t||"vertical"===t){var r=this.state.offset;return e>=r.left&&e<=r.left+r.width&&n>=r.top&&n<=r.top+r.height?{x:e,y:n}:null}var o=this.state,i=o.angleAxisMap,a=o.radiusAxisMap;if(i&&a){var c=j(i);return Zo({x:e,y:n},c)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,n=Z(e,Kt)&&"axis"===a?{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}:{};return Bf({},J(this.props,this.handleOuterEvent),{},n)}},{key:"updateStateOfAxisMapsOffsetAndStackGroups",value:function(e){var r=this,o=e.props,i=e.dataStartIndex,a=e.dataEndIndex,c=e.updateId;if(!$({props:o}))return null;var l=o.children,u=o.layout,f=o.stackOffset,p=o.data,m=o.reverseStackOrder,g=this.constructor.getAxisNameByLayout(u),b=g.numericAxisName,h=g.cateAxisName,v=X(l,t),y=function(e,n,t,r,o,i){if(!e)return null;var a=(i?n.reverse():n).reduce((function(e,n){var o=n.props,i=o.stackId;if(o.hide)return e;var a=n.props[t],c=e[a]||{hasStack:!1,stackGroups:{}};if(C(i)){var s=c.stackGroups[i]||{numericAxisId:t,cateAxisId:r,items:[]};s.items.push(n),c.hasStack=!0,c.stackGroups[i]=s}else c.stackGroups[D("_stackId_")]={numericAxisId:t,cateAxisId:r,items:[n]};return co({},e,so({},a,c))}),{});return Object.keys(a).reduce((function(n,i){var c=a[i];return c.hasStack&&(c.stackGroups=Object.keys(c.stackGroups).reduce((function(n,i){var a=c.stackGroups[i];return co({},n,so({},i,{numericAxisId:t,cateAxisId:r,items:a.items,stackedData:Mo(e,a.items,o)}))}),{})),co({},n,so({},i,c))}),{})}(p,v,"".concat(b,"Id"),"".concat(h,"Id"),f,m),x=s.reduce((function(e,n){return Bf({},e,Uf({},"".concat(n.axisType,"Map"),r.getAxisMap(o,Bf({},n,{graphicalItems:v,stackGroups:n.axisType===b&&y,dataStartIndex:i,dataEndIndex:a}))))}),{}),w=this.calculateOffset(Bf({},x,{props:o,graphicalItems:v}));Object.keys(x).forEach((function(e){x[e]=d(o,x[e],w,e.replace("Map",""),n)}));var E=x["".concat(h,"Map")],k=this.tooltipTicksGenerator(E),A=this.getFormatItems(o,Bf({},x,{dataStartIndex:i,dataEndIndex:a,updateId:c,graphicalItems:v,stackGroups:y,offset:w}));return Bf({formatedGraphicalItems:A,graphicalItems:v,offset:w,stackGroups:y},k,{},x)}},{key:"addListener",value:function(){Rf.on(Yf,this.handleReceiveSyncEvent),Rf.setMaxListeners&&Rf._maxListeners&&Rf.setMaxListeners(Rf._maxListeners+1)}},{key:"removeListener",value:function(){Rf.removeListener(Yf,this.handleReceiveSyncEvent),Rf.setMaxListeners&&Rf._maxListeners&&Rf.setMaxListeners(Rf._maxListeners-1)}},{key:"calculateOffset",value:function(e){var n=e.props,t=e.graphicalItems,r=e.xAxisMap,o=void 0===r?{}:r,i=e.yAxisMap,a=void 0===i?{}:i,c=n.width,s=n.height,l=n.children,u=n.margin||{},f=Z(l,Rs),d=Z(l,un),p=Object.keys(a).reduce((function(e,n){var t=a[n],r=t.orientation;return t.mirror||t.hide?e:Bf({},e,Uf({},r,e[r]+t.width))}),{left:u.left||0,right:u.right||0}),m=Object.keys(o).reduce((function(e,n){var t=o[n],r=t.orientation;return t.mirror||t.hide?e:Bf({},e,Uf({},r,e[r]+t.height))}),{top:u.top||0,bottom:u.bottom||0}),g=Bf({},m,{},p),b=g.bottom;return f&&(g.bottom+=f.props.height||Rs.defaultProps.height),d&&this.legendInstance&&(g=function(e,n,t,r){var o=t.children,i=t.width,a=t.height,c=t.margin,s=i-(c.left||0)-(c.right||0),l=a-(c.top||0)-(c.bottom||0),u=po({children:o,items:n,legendWidth:s,legendHeight:l}),f=e;if(u){var d=r||{},p=u.align,m=u.verticalAlign,g=u.layout;("vertical"===g||"horizontal"===g&&"center"===m)&&S(e[p])&&(f=co({},e,so({},p,f[p]+(d.width||0)))),("horizontal"===g||"vertical"===g&&"center"===p)&&S(e[m])&&(f=co({},e,so({},m,f[m]+(d.height||0))))}return f}(g,t,n,this.legendInstance.getBBox())),Bf({brushBottom:b},g,{width:c-g.left-g.right,height:s-g.top-g.bottom})}},{key:"triggerSyncEvent",value:function(e){var n=this.props.syncId;f()(n)||Rf.emit(Yf,n,this.uniqueChartId,e)}},{key:"filterFormatItem",value:function(e,n,t){for(var r=this.state.formatedGraphicalItems,o=0,i=r.length;o=0}))},g.getDisplayedData=function(e,n,t){var r=n.graphicalItems,o=n.dataStartIndex,i=n.dataEndIndex,a=(r||[]).reduce((function(e,n){var t=n.props.data;return t&&t.length?[].concat(Vf(e),Vf(t)):e}),[]);if(a&&a.length>0)return a;if(t&&t.props&&t.props.data&&t.props.data.length>0)return t.props.data;var c=e.data;return c&&c.length&&S(o)&&S(i)?c.slice(o,i+1):[]},g},$f=_f({chartName:"LineChart",GraphicalChild:Eu,axisComponents:[{axisType:"xAxis",AxisComp:Ef},{axisType:"yAxis",AxisComp:Pf}],formatAxisMap:Qs}),ed=_f({chartName:"BarChart",GraphicalChild:Zu,axisComponents:[{axisType:"xAxis",AxisComp:Ef},{axisType:"yAxis",AxisComp:Pf}],formatAxisMap:Qs}),nd=_f({chartName:"PieChart",GraphicalChild:_c,eventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Yc},{axisType:"radiusAxis",AxisComp:Mc}],formatAxisMap:Bo,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},propTypes:{layout:c.a.oneOf(["centric"]),startAngle:c.a.number,endAngle:c.a.number,cx:c.a.oneOfType([c.a.number,c.a.string]),cy:c.a.oneOfType([c.a.number,c.a.string]),innerRadius:c.a.oneOfType([c.a.number,c.a.string]),outerRadius:c.a.oneOfType([c.a.number,c.a.string])}}),td=t(324),rd=t.n(td),od=["#1890FF","#66B5FF","#41D9C7","#2FC25B","#6EDB8F","#9AE65C","#FACC14","#E6965C","#57AD71","#223273","#738AE6","#7564CC","#8543E0","#A877ED","#5C8EE6","#13C2C2","#70E0E0","#5CA3E6","#3436C7","#8082FF","#DD81E6","#F04864","#FA7D92","#D598D9"];function id(e){return(id="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ad(){return(ad=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function sd(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ld(e,n){for(var t=0;tt.height)&&(o=t.height);for(var i,a=t.x,c=0,s=e.length;ct.width)&&(o=t.width);for(var i,a=t.y,c=0,s=e.length;c0;)c.push(o=f[0]),c.area+=o.area,(i=hd(c,l,t))<=s?(f.shift(),s=i):(c.area-=c.pop().area,a=vd(c,l,a,!1),l=Math.min(a.width,a.height),c.length=c.area=0,s=1/0);return c.length&&(a=vd(c,l,a,!0),c.length=c.area=0),md({},n,{children:u.map((function(n){return e(n,t)}))})}return n},xd=function(e){function n(){var e,t;sd(this,n);for(var r=arguments.length,o=new Array(r),i=0;i10&&s>10&&n.children&&"nest"===t&&(u=i.a.createElement(Pa,{points:[{x:o+2,y:a+s/2},{x:o+6,y:a+s/2+3},{x:o+2,y:a+s/2+6}]}));var f=null,d=wr(n.name);c>20&&s>20&&d.width2&&!m?null:r.constructor.renderContentItem(e,md({},n,{isAnimationActive:a,isUpdateAnimationActive:!u,width:g,height:b,x:o,y:d}),f,p)))})):i.a.createElement(ge,w,this.constructor.renderContentItem(e,md({},n,{isAnimationActive:!1,isUpdateAnimationActive:!1,width:g,height:b,x:h,y:v}),f,p))}},{key:"renderNode",value:function(e,n,t){var r=this,o=this.props,a=o.content,c=o.type,s=md({},G(this.props),{},n,{root:e}),l=!n.children||!n.children.length;return!(this.state.currentRoot.children||[]).filter((function(e){return e.depth===n.depth&&e.name===n.name})).length&&e.depth&&"nest"===c?null:i.a.createElement(ge,{key:"recharts-treemap-node-".concat(t),className:"recharts-treemap-depth-".concat(n.depth)},this.renderItem(a,s,l),n.children&&n.children.length?n.children.map((function(e,t){return r.renderNode(n,e,t)})):null)}},{key:"renderAllNodes",value:function(){var e=this.state.formatRoot;return e?this.renderNode(e,e,0):null}},{key:"renderTooltip",value:function(){var e=this.props,n=e.children,t=e.nameKey,r=Z(n,Kt);if(!r)return null;var o=this.props,a=o.width,c=o.height,s=o.dataKey,l=this.state,u=l.isTooltipActive,f=l.activeNode,d={x:0,y:0,width:a,height:c},p=f?{x:f.x+f.width/2,y:f.y+f.height/2}:null,m=u&&f?[{payload:f,name:lo(f,t,""),value:lo(f,s)}]:[];return i.a.cloneElement(r,{viewBox:d,active:u,coordinate:p,label:"",payload:m})}},{key:"renderNestIndex",value:function(){var e=this,n=this.props,t=n.nameKey,r=n.nestIndexContent,o=this.state.nestIndex;return i.a.createElement("div",{className:"recharts-treemap-nest-index-wrapper",style:{marginTop:"8px",textAlign:"center"}},o.map((function(n,o){var a=w()(n,t,"root"),c=null;return i.a.isValidElement(r)&&(c=i.a.cloneElement(r,n,o)),c=h()(r)?r(n,o):a,i.a.createElement("div",{onClick:e.handleNestIndex.bind(e,n,o),key:"nest-index-".concat(D()),className:"recharts-treemap-nest-index-box",style:{cursor:"pointer",display:"inline-block",padding:"0 7px",background:"#000",color:"#fff",marginRight:"3px"}},c)})))}},{key:"render",value:function(){if(!$(this))return null;var e=this.props,n=e.width,t=e.height,r=e.className,o=e.style,a=e.children,c=e.type,s=cd(e,["width","height","className","style","children","type"]),u=G(s);return i.a.createElement("div",{className:l()("recharts-wrapper",r),style:md({},o,{position:"relative",cursor:"default",width:n,height:t})},i.a.createElement(ue,ad({},u,{width:n,height:"nest"===c?t-30:t}),this.renderAllNodes(),te(a)),this.renderTooltip(),"nest"===c&&this.renderNestIndex())}}])&&ld(t.prototype,r),o&&ld(t,o),n}(o.PureComponent);xd.displayName="Treemap",xd.propTypes={width:c.a.number,height:c.a.number,data:c.a.array,animationId:c.a.number,style:c.a.object,aspectRatio:c.a.number,content:c.a.oneOfType([c.a.element,c.a.func]),fill:c.a.string,stroke:c.a.string,className:c.a.string,nameKey:c.a.oneOfType([c.a.string,c.a.number,c.a.func]),dataKey:c.a.oneOfType([c.a.string,c.a.number,c.a.func]),children:c.a.oneOfType([c.a.arrayOf(c.a.node),c.a.node]),type:c.a.oneOf(["flat","nest"]),colorPanel:c.a.array,nestIndexContent:c.a.oneOfType([c.a.element,c.a.func]),onAnimationStart:c.a.func,onAnimationEnd:c.a.func,onMouseEnter:c.a.func,onMouseLeave:c.a.func,onClick:c.a.func,isAnimationActive:c.a.bool,isUpdateAnimationActive:c.a.bool,animationBegin:c.a.number,animationDuration:c.a.number,animationEasing:c.a.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"])},xd.defaultProps={dataKey:"value",aspectRatio:.5*(1+Math.sqrt(5)),isAnimationActive:!ee(),isUpdateAnimationActive:!ee(),animationBegin:0,animationDuration:1500,animationEasing:"linear",type:"flat"};var wd=xd,Ed=t(810),kd=t.n(Ed);function Ad(e){return(Ad="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Md(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function Od(){return(Od=Object.assign||function(e){for(var n=1;n0&&(l.y+=u),c=l.y+l.dy+t}c=n+t;for(var f=a-1;f>=0;f--){var d=i[f],p=d.y+d.dy+t-c;if(!(p>0))break;d.y-=p,c=d.y}}},Wd=function(e,n,t,r){for(var o=0,i=n.length;o=0;o--)for(var i=n[o],a=0,c=i.length;a=1)for(var u=(n-t)/l,f=0,d=i.length;f0,from:{upperWidth:0,lowerWidth:0,height:c,x:t,y:r},to:{upperWidth:o,lowerWidth:a,height:c,x:t,y:r},duration:p,animationEasing:d,isActive:g},(function(n){var t=n.upperWidth,r=n.lowerWidth,o=n.height,a=n.x,c=n.y;return i.a.createElement(yt,{canBegin:u>0,from:"0px ".concat(-1===u?1:u,"px"),to:"".concat(u,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:p,easing:d},i.a.createElement("path",tp({},G(e.props),J(e.props),{className:b,d:sp(a,c,t,r,o),ref:function(n){e.node=n}})))})):i.a.createElement("g",null,i.a.createElement("path",tp({},G(this.props),J(this.props),{className:b,d:sp(t,r,o,a,c)})))}}])&&op(t.prototype,r),o&&op(t,o),n}(o.PureComponent);lp.displayName="Trapezoid",lp.propTypes=function(e){for(var n=1;n may have only one child element"),this.unlisten=r.listen((function(){e.setState({match:e.computeMatch(r.location.pathname)})}))},n.prototype.componentWillReceiveProps=function(e){d()(this.props.history===e.history,"You cannot change ")},n.prototype.componentWillUnmount=function(){this.unlisten()},n.prototype.render=function(){var e=this.props.children;return e?a.a.Children.only(e):null},n}(a.a.Component);v.propTypes={history:s.a.object.isRequired,children:s.a.node},v.contextTypes={router:s.a.object},v.childContextTypes={router:s.a.object.isRequired};var y=v,x=y;function w(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function E(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}var k=function(e){function n(){var t,r;w(this,n);for(var o=arguments.length,i=Array(o),a=0;a ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},n.prototype.render=function(){return a.a.createElement(x,{history:this.history,children:this.props.children})},n}(a.a.Component);k.propTypes={basename:s.a.string,forceRefresh:s.a.bool,getUserConfirmation:s.a.func,keyLength:s.a.number,children:s.a.node};var A=k,M=t(798),O=t.n(M);function T(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function S(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}var C=function(e){function n(){var t,r;T(this,n);for(var o=arguments.length,i=Array(o),a=0;a ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},n.prototype.render=function(){return a.a.createElement(x,{history:this.history,children:this.props.children})},n}(a.a.Component);C.propTypes={basename:s.a.string,getUserConfirmation:s.a.func,hashType:s.a.oneOf(["hashbang","noslash","slash"]),children:s.a.node};var P=C,D=Object.assign||function(e){for(var n=1;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}(e,["replace","to","innerRef"]);m()(this.context.router,"You should not use outside a ");var o=this.context.router.history.createHref("string"==typeof n?{pathname:n}:n);return a.a.createElement("a",D({},r,{onClick:this.handleClick,href:o,ref:t}))},n}(a.a.Component);z.propTypes={onClick:s.a.func,target:s.a.string,replace:s.a.bool,to:s.a.oneOfType([s.a.string,s.a.object]).isRequired,innerRef:s.a.oneOfType([s.a.string,s.a.func])},z.defaultProps={replace:!1},z.contextTypes={router:s.a.shape({history:s.a.shape({push:s.a.func.isRequired,replace:s.a.func.isRequired,createHref:s.a.func.isRequired}).isRequired}).isRequired};var I=z;function R(){return(R=Object.assign||function(e){for(var n=1;nn?t.splice(n,t.length-n,r):t.push(r),u({action:"PUSH",location:r,index:n,entries:t})}}))},replace:function(e,n){var r=H(e,n,f(),b.location);l.confirmTransitionTo(r,"REPLACE",t,(function(e){e&&(b.entries[b.index]=r,u({action:"REPLACE",location:r}))}))},go:g,goBack:function(){g(-1)},goForward:function(){g(1)},canGo:function(e){var n=b.index+e;return n>=0&&n ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},n.prototype.render=function(){return a.a.createElement(y,{history:this.history,children:this.props.children})},n}(a.a.Component);Z.propTypes={initialEntries:s.a.array,initialIndex:s.a.number,getUserConfirmation:s.a.func,keyLength:s.a.number,children:s.a.node};var G=Z,K=t(320),J=t.n(K),Q={},_=0,$=function(e,n){var t=""+n.end+n.strict+n.sensitive,r=Q[t]||(Q[t]={});if(r[e])return r[e];var o=[],i={re:J()(e,o,n),keys:o};return _<1e4&&(r[e]=i,_++),i},ee=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments[2];"string"==typeof n&&(n={path:n});var r=n,o=r.path,i=r.exact,a=void 0!==i&&i,c=r.strict,s=void 0!==c&&c,l=r.sensitive,u=void 0!==l&&l;if(null==o)return t;var f=$(o,{end:a,strict:s,sensitive:u}),d=f.re,p=f.keys,m=d.exec(e);if(!m)return null;var g=m[0],b=m.slice(1),h=e===g;return a&&!h?null:{path:o,url:"/"===o&&""===g?"/":g,isExact:h,params:p.reduce((function(e,n,t){return e[n.name]=b[t],e}),{})}},ne=Object.assign||function(e){for(var n=1;n or withRouter() outside a ");var s=n.route,l=(r||s.location).pathname;return ee(l,{path:o,strict:i,exact:a,sensitive:c},s.match)},n.prototype.componentWillMount=function(){d()(!(this.props.component&&this.props.render),"You should not use and