@decooda/ia-plot
Version:
Showing positive/negative impact analysis results
1 lines • 336 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.IAPlot=t(require("react"),require("react-dom")):e.IAPlot=t(e.React,e.ReactDOM)}(window,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=351)}([function(e,t,n){e.exports=n(216)()},function(t,n){t.exports=e},function(e,t,n){"use strict";t.a=function(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){"use strict";var r=n(83);t.a=function(e){return Object(r.b)(e[e.length-1])}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var i=n(218);t.Motion=r(i);var o=n(220);t.StaggeredMotion=r(o);var a=n(221);t.TransitionMotion=r(a);var c=n(223);t.spring=r(c);var u=n(127);t.presets=r(u);var s=n(63);t.stripStyle=r(s);var f=n(224);t.reorderKeys=r(f)},function(e,t,n){"use strict";n.d(t,"a",(function(){return tr})),n.d(t,"b",(function(){return wn})),n.d(t,"c",(function(){return Cn})),n.d(t,"d",(function(){return Hn})),n.d(t,"e",(function(){return Vt})),n.d(t,"f",(function(){return yr})),n.d(t,"g",(function(){return br})),n.d(t,"h",(function(){return Bt})),n.d(t,"i",(function(){return Wn})),n.d(t,"j",(function(){return $t})),n.d(t,"k",(function(){return vn})),n.d(t,"l",(function(){return tn})),n.d(t,"m",(function(){return Jt})),n.d(t,"n",(function(){return pr})),n.d(t,"o",(function(){return nr})),n.d(t,"p",(function(){return ir}));var r=n(1),i=n.n(r),o=n(0),a=n.n(o),c=n(20),u=n(174),s=n.n(u),f=n(17),l=n.n(f),d=n(30),h=n.n(d),p=n(3),b=n.n(p);n(11),n(77),n(377),n(25),n(9);var y=n(46),v=n(379);n(378),n(10),n(179);var m=n(183),g=n(184),_=n(185),x=n(186),O=n(187),w=n(188),j=n(189),S=n(190),k=n(191),M=n(192),T=n(193),E=n(194),R=n(195),P=n(196),C=n(197),q=n(198),A=n(199),D=n(200),z=n(201),W=n(202),I=n(203),N=n(204),L=n(205),F=n(206),U=n(207),Y=n(208),Z=n(209),B=n(352),V=n(353),H=n(354),G=n(355),X=n(356),$=n(357),J=n(358),Q=n(359),K=n(360),ee=n(84),te=n(124),ne=n(361),re=n(362),ie=(n(13),n(115)),oe=n.n(ie);function ae(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ce(e){this._context=e}ce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ae(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ae(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var ue=function(){};function se(e){this._context=e}se.prototype={areaStart:ue,areaEnd:ue,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ae(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fe(e){this._context=e}fe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ae(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function le(e,t){this._basis=new ce(e),this._beta=t}le.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],o=t[0],a=e[n]-i,c=t[n]-o,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*e[u]+(1-this._beta)*(i+r*a),this._beta*t[u]+(1-this._beta)*(o+r*c));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var de=function e(t){function n(e){return 1===t?new ce(e):new le(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function he(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function pe(e,t){this._context=e,this._k=(1-t)/6}pe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:he(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:he(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var be=function e(t){function n(e){return new pe(e,t)}return n.tension=function(t){return e(+t)},n}(0);function ye(e,t){this._context=e,this._k=(1-t)/6}ye.prototype={areaStart:ue,areaEnd:ue,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:he(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ve=function e(t){function n(e){return new ye(e,t)}return n.tension=function(t){return e(+t)},n}(0);function me(e,t){this._context=e,this._k=(1-t)/6}me.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:he(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ge=function e(t){function n(e){return new me(e,t)}return n.tension=function(t){return e(+t)},n}(0);Math.abs,Math.atan2,Math.cos,Math.max,Math.min,Math.sin,Math.sqrt,Math.PI;function _e(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>1e-12){var c=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*c-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*c-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>1e-12){var s=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,f=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*s+e._x1*e._l23_2a-t*e._l12_2a)/f,a=(a*s+e._y1*e._l23_2a-n*e._l12_2a)/f}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function xe(e,t){this._context=e,this._alpha=t}xe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:_e(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Oe=function e(t){function n(e){return t?new xe(e,t):new pe(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function we(e,t){this._context=e,this._alpha=t}we.prototype={areaStart:ue,areaEnd:ue,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:_e(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var je=function e(t){function n(e){return t?new we(e,t):new ye(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Se(e,t){this._context=e,this._alpha=t}Se.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_e(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ke=function e(t){function n(e){return t?new Se(e,t):new me(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Me(e){this._context=e}Me.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function Te(e){this._context=e}Te.prototype={areaStart:ue,areaEnd:ue,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ee(e){return e<0?-1:1}function Re(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),c=(o*i+a*r)/(r+i);return(Ee(o)+Ee(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(c))||0}function Pe(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Ce(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,c=(o-r)/3;e._context.bezierCurveTo(r+c,i+c*t,o-c,a-c*n,o,a)}function qe(e){this._context=e}function Ae(e){this._context=new De(e)}function De(e){this._context=e}function ze(e){this._context=e}function We(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}qe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ce(this,this._t0,Pe(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ce(this,Pe(this,n=Re(this,e,t)),n);break;default:Ce(this,this._t0,n=Re(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Ae.prototype=Object.create(qe.prototype)).point=function(e,t){qe.prototype.point.call(this,t,e)},De.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},ze.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=We(e),i=We(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Ie(e,t){this._context=e,this._t=t}Ie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var Ne=function(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n},Le=function(e){var t=e.map(Fe);return Ne(e).sort((function(e,n){return t[e]-t[n]}))};function Fe(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function Ue(e){for(var t,n=-1,r=0,i=e.length,o=-1/0;++n<i;)(t=+e[n][1])>o&&(o=t,r=n);return r}var Ye=function(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],c=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<c;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]},Ze=function(e,t,n,r,i){for(var o,a=e.children,c=-1,u=a.length,s=e.value&&(r-t)/e.value;++c<u;)(o=a[c]).y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*s},Be=function(e,t,n,r,i){for(var o,a=e.children,c=-1,u=a.length,s=e.value&&(i-n)/e.value;++c<u;)(o=a[c]).x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*s},Ve=(1+Math.sqrt(5))/2;function He(e,t,n,r,i,o){for(var a,c,u,s,f,l,d,h,p,b,y,v=[],m=t.children,g=0,_=0,x=m.length,O=t.value;g<x;){u=i-n,s=o-r;do{f=m[_++].value}while(!f&&_<x);for(l=d=f,y=f*f*(b=Math.max(s/u,u/s)/(O*e)),p=Math.max(d/y,y/l);_<x;++_){if(f+=c=m[_].value,c<l&&(l=c),c>d&&(d=c),y=f*f*b,(h=Math.max(d/y,y/l))>p){f-=c;break}p=h}v.push(a={value:f,dice:u<s,children:m.slice(g,_)}),a.dice?Ze(a,n,r,i,O?r+=s*f/O:o):Be(a,n,r,O?n+=u*f/O:i,o),O-=f,g=_}return v}var Ge=function e(t){function n(e,n,r,i,o){He(t,e,n,r,i,o)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n}(Ve),Xe=function e(t){function n(e,n,r,i,o){if((a=e._squarify)&&a.ratio===t)for(var a,c,u,s,f,l=-1,d=a.length,h=e.value;++l<d;){for(u=(c=a[l]).children,s=c.value=0,f=u.length;s<f;++s)c.value+=u[s].value;c.dice?Ze(c,n,r,i,r+=(o-r)*c.value/h):Be(c,n,r,n+=(i-n)*c.value/h,o),h-=c.value}else e._squarify=a=He(t,e,n,r,i,o),a.ratio=t}return n.ratio=function(t){return e((t=+t)>1?t:1)},n}(Ve);function $e(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Je(e,t){var n,r,i,o,a,c=new tt(e),u=+e.value&&(c.value=e.value),s=[c];for(null==t&&(t=Qe);n=s.pop();)if(u&&(n.value=+n.data.value),(i=t(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)s.push(r=n.children[o]=new tt(i[o])),r.parent=n,r.depth=n.depth+1;return c.eachBefore(et)}function Qe(e){return e.children}function Ke(e){e.data=e.data.data}function et(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function tt(e){this.data=e,this.depth=this.height=0,this.parent=null}tt.prototype=Je.prototype={constructor:tt,count:function(){return this.eachAfter($e)},each:function(e){var t,n,r,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n]);for(;i=a.pop();)e(i);return this},eachBefore:function(e){for(var t,n,r=this,i=[r];r=i.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)i.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Je(this).eachBefore(Ke)}};var nt=n(213),rt=n(373),it=n(5),ot=n(56),at=(n(175),n(116)),ct=n.n(at),ut=n(38),st=n.n(ut),ft=n(57),lt=n.n(ft),dt=n(44),ht=n.n(dt),pt=n(26),bt=n.n(pt),yt=(n(176),n(35),n(177),function(){});function vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(Object(n));"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){mt(e,t,n[t])}))}return e}function mt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gt={fill:a.a.string,fontSize:a.a.number,fontFamily:a.a.string},_t=a.a.shape({domain:a.a.shape({line:a.a.shape({stroke:a.a.string.isRequired,strokeWidth:a.a.number.isRequired,strokeDasharray:a.a.string}).isRequired}).isRequired,ticks:a.a.shape({line:a.a.shape({stroke:a.a.string.isRequired,strokeWidth:a.a.number.isRequired,strokeDasharray:a.a.string}).isRequired,text:a.a.shape(vt({},gt)).isRequired}).isRequired,legend:a.a.shape({text:a.a.shape(vt({},gt)).isRequired}).isRequired}),xt=a.a.shape({line:a.a.shape({stroke:a.a.string.isRequired,strokeWidth:a.a.number.isRequired,strokeDasharray:a.a.string}).isRequired}),Ot=a.a.shape({text:a.a.shape(vt({},gt)).isRequired}),wt=a.a.shape({text:a.a.shape(vt({},gt)).isRequired}),jt=a.a.shape({text:a.a.shape(vt({},gt)).isRequired}),St=a.a.shape({text:a.a.shape(vt({},gt)).isRequired}),kt=a.a.shape({line:a.a.shape({stroke:a.a.string.isRequired,strokeWidth:a.a.number.isRequired,strokeDasharray:a.a.string}).isRequired}),Mt=a.a.shape({text:a.a.shape(vt({},gt,{outlineWidth:a.a.number.isRequired,outlineColor:a.a.string.isRequired})).isRequired,link:a.a.shape({stroke:a.a.string.isRequired,strokeWidth:a.a.number.isRequired,outlineWidth:a.a.number.isRequired,outlineColor:a.a.string.isRequired}).isRequired,outline:a.a.shape({stroke:a.a.string.isRequired,strokeWidth:a.a.number.isRequired,outlineWidth:a.a.number.isRequired,outlineColor:a.a.string.isRequired}).isRequired,symbol:a.a.shape({fill:a.a.string.isRequired,outlineWidth:a.a.number.isRequired,outlineColor:a.a.string.isRequired}).isRequired}),Tt=(a.a.shape({background:a.a.string.isRequired,fontFamily:a.a.string.isRequired,fontSize:a.a.number.isRequired,textColor:a.a.string.isRequired,axis:_t.isRequired,grid:xt.isRequired,legends:Ot.isRequired,labels:wt.isRequired,dots:jt.isRequired,markers:St,crosshair:kt.isRequired,annotations:Mt.isRequired}),{background:"transparent",fontFamily:"sans-serif",fontSize:11,textColor:"#333333",axis:{domain:{line:{stroke:"transparent",strokeWidth:1}},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{}},legend:{text:{fontSize:12}}},grid:{line:{stroke:"#dddddd",strokeWidth:1}},legends:{text:{fill:"#333333"}},labels:{text:{}},markers:{lineColor:"#000000",lineStrokeWidth:1,text:{}},dots:{text:{}},tooltip:{container:{background:"white",color:"inherit",fontSize:"inherit",borderRadius:"2px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.25)",padding:"5px 9px"},basic:{whiteSpace:"pre",display:"flex",alignItems:"center"},chip:{marginRight:7},table:{},tableCell:{padding:"3px 5px"}},crosshair:{line:{stroke:"#000000",strokeWidth:1,strokeOpacity:.75,strokeDasharray:"6 6"}},annotations:{text:{fontSize:13,outlineWidth:2,outlineColor:"#ffffff"},link:{stroke:"#000000",strokeWidth:1,outlineWidth:2,outlineColor:"#ffffff"},outline:{fill:"none",stroke:"#000000",strokeWidth:2,outlineWidth:2,outlineColor:"#ffffff"},symbol:{fill:"#000000",outlineWidth:2,outlineColor:"#ffffff"}}}),Et=["axis.ticks.text","axis.legend.text","legends.text","labels.text","dots.text","markers.text","annotations.text"],Rt=function(e,t){var n=s()({},e,t);return Et.forEach((function(e){void 0===l()(n,"".concat(e,".fontFamily"))&&h()(n,"".concat(e,".fontFamily"),n.fontFamily),void 0===l()(n,"".concat(e,".fontSize"))&&h()(n,"".concat(e,".fontSize"),n.fontSize),void 0===l()(n,"".concat(e,".fill"))&&h()(n,"".concat(e,".fill"),n.textColor)})),n},Pt={nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:b()(m.b),PRGn:b()(g.b),PiYG:b()(_.b),PuOr:b()(x.b),RdBu:b()(O.b),RdGy:b()(w.b),RdYlBu:b()(j.b),RdYlGn:b()(S.b),spectral:b()(k.b),blues:b()(M.b),greens:b()(T.b),greys:b()(E.b),oranges:b()(R.b),purples:b()(P.b),reds:b()(C.b),BuGn:b()(q.b),BuPu:b()(A.b),GnBu:b()(D.b),OrRd:b()(z.b),PuBuGn:b()(W.b),PuBu:b()(I.b),PuRd:b()(N.b),RdPu:b()(L.b),YlGnBu:b()(F.b),YlGn:b()(U.b),YlOrBr:b()(Y.b),YlOrRd:b()(Z.b)},Ct=Object.keys(Pt),qt=(B.a,V.a,H.a,G.a,X.a,$.a,J.a,Q.a,K.a,b()(m.b),b()(g.b),b()(_.b),b()(x.b),b()(O.b),b()(w.b),b()(j.b),b()(S.b),b()(k.b),b()(M.b),b()(T.b),b()(E.b),b()(R.b),b()(P.b),b()(C.b),b()(q.b),b()(A.b),b()(D.b),b()(z.b),b()(W.b),b()(I.b),b()(N.b),b()(L.b),b()(F.b),b()(U.b),b()(Y.b),b()(Z.b),m.a,g.a,_.a,x.a,O.a,w.a,j.a,S.a,k.a,M.a,T.a,E.a,R.a,P.a,C.a,ee.a,ee.b,ee.c,ee.d,te.c,te.a,ne.a,q.a,A.a,D.a,z.a,W.a,I.a,N.a,L.a,F.a,U.a,Y.a,Z.a,te.b,re.a,a.a.oneOfType([a.a.oneOf(Ct),a.a.func,a.a.arrayOf(a.a.string)]),{basis:function(e){return new ce(e)},basisClosed:function(e){return new se(e)},basisOpen:function(e){return new fe(e)},bundle:de,cardinal:be,cardinalClosed:ve,cardinalOpen:ge,catmullRom:Oe,catmullRomClosed:je,catmullRomOpen:ke,linear:function(e){return new Me(e)},linearClosed:function(e){return new Te(e)},monotoneX:function(e){return new qe(e)},monotoneY:function(e){return new Ae(e)},natural:function(e){return new ze(e)},step:function(e){return new Ie(e,.5)},stepAfter:function(e){return new Ie(e,1)},stepBefore:function(e){return new Ie(e,0)}}),At=Object.keys(qt),Dt=(a.a.oneOf(At),At.filter((function(e){return e.endsWith("Closed")}))),zt=(a.a.oneOf(Dt),oe()(At,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed")),Wt=(a.a.oneOf(zt),oe()(At,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed")),It=(a.a.oneOf(Wt),a.a.arrayOf(a.a.shape({id:a.a.string.isRequired})).isRequired,a.a.arrayOf(a.a.shape({id:a.a.string.isRequired,match:a.a.oneOfType([a.a.oneOf(["*"]),a.a.object,a.a.func]).isRequired})).isRequired,{ascending:Le,descending:function(e){return Le(e).reverse()},insideOut:function(e){var t,n,r=e.length,i=e.map(Fe),o=function(e){var t=e.map(Ue);return Ne(e).sort((function(e,n){return t[e]-t[n]}))}(e),a=0,c=0,u=[],s=[];for(t=0;t<r;++t)n=o[t],a<c?(a+=i[n],u.push(n)):(c+=i[n],s.push(n));return s.reverse().concat(u)},none:Ne,reverse:function(e){return Ne(e).reverse()}}),Nt=Object.keys(It),Lt=(a.a.oneOf(Nt),{expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}Ye(e,t)}},diverging:function(e,t){if((c=e.length)>0)for(var n,r,i,o,a,c,u=0,s=e[t[0]].length;u<s;++u)for(o=a=0,n=0;n<c;++n)(i=(r=e[t[n]][u])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},none:Ye,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,c=0;a<n;++a)c+=e[a][r][1]||0;i[r][1]+=i[r][0]=-c/2}Ye(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var c=0,u=0,s=0;c<i;++c){for(var f=e[t[c]],l=f[a][1]||0,d=(l-(f[a-1][1]||0))/2,h=0;h<c;++h){var p=e[t[h]];d+=(p[a][1]||0)-(p[a-1][1]||0)}u+=l,s+=d*l}n[a-1][1]+=n[a-1][0]=o,u&&(o-=s/u)}n[a-1][1]+=n[a-1][0]=o,Ye(e,t)}}}),Ft=Object.keys(Lt),Ut=(a.a.oneOf(Ft),{binary:function(e,t,n,r,i){var o,a,c=e.children,u=c.length,s=new Array(u+1);for(s[0]=a=o=0;o<u;++o)s[o+1]=a+=c[o].value;!function e(t,n,r,i,o,a,u){if(t>=n-1){var f=c[t];return f.x0=i,f.y0=o,f.x1=a,void(f.y1=u)}var l=s[t],d=r/2+l,h=t+1,p=n-1;for(;h<p;){var b=h+p>>>1;s[b]<d?h=b+1:p=b}d-s[h-1]<s[h]-d&&t+1<h&&--h;var y=s[h]-l,v=r-y;if(a-i>u-o){var m=(i*v+a*y)/r;e(t,h,y,i,o,m,u),e(h,n,v,m,o,a,u)}else{var g=(o*v+u*y)/r;e(t,h,y,i,o,a,g),e(h,n,v,i,g,a,u)}}(0,u,e.value,t,n,r,i)},dice:Ze,slice:Be,sliceDice:function(e,t,n,r,i){(1&e.depth?Be:Ze)(e,t,n,r,i)},squarify:Ge,resquarify:Xe}),Yt=Object.keys(Ut),Zt=(a.a.oneOf(Yt),a.a.shape({top:a.a.number,right:a.a.number,bottom:a.a.number,left:a.a.number}).isRequired),Bt={animate:a.a.bool.isRequired,motionStiffness:a.a.number.isRequired,motionDamping:a.a.number.isRequired},Vt=a.a.oneOf(["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]),Ht=(Object(y.a)(K.a),{top:0,right:0,bottom:0,left:0});function Gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(Object(n));"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Xt(e,t,n[t])}))}return e}function Xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $t=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(r.useMemo)((function(){var r=Gt({},Ht,n);return{margin:r,innerWidth:e-r.left-r.right,innerHeight:t-r.top-r.bottom,outerWidth:e,outerHeight:t}}),[e,t,n.top,n.right,n.bottom,n.left])},Jt=function(e){return Object(r.useMemo)((function(){return"function"==typeof(t=e)?t:"string"==typeof t?0===t.indexOf("time:")?Object(rt.a)(t.slice("5")):Object(nt.a)(t):function(e){return e};var t}),[e])},Qt=Object(r.createContext)(),Kt={},en=function(e){var t=e.theme,n=void 0===t?Kt:t,o=e.children,a=function(e){return Object(r.useMemo)((function(){return Rt(Tt,e)}),[e])}(n);return i.a.createElement(Qt.Provider,{value:a},o)};en.propTypes={children:a.a.node.isRequired,theme:a.a.object};var tn=function(){return Object(r.useContext)(Qt)};function nn(e){return(nn="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 rn(){return(rn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function on(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function an(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function un(e,t){return!t||"object"!==nn(t)&&"function"!=typeof t?fn(e):t}function sn(e){return(sn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ln(e,t){return(ln=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hn=function(e,t){return"number"!=typeof e?{value:e,config:t,interpolator:t&&t.interpolator?t.interpolator:v.a}:Object(it.spring)(e,t)},pn=function(e){function t(){var e,n;an(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return dn(fn(n=un(this,(e=sn(t)).call.apply(e,[this].concat(i)))),"oldValues",{}),dn(fn(n),"newInters",{}),dn(fn(n),"currentStepValues",{}),dn(fn(n),"stepValues",{}),dn(fn(n),"stepInterpolators",{}),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ln(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.props,n=t.style,r=t.children,o=on(t,["style","children"]),a=n(hn);for(var c in a)a[c]&&a[c].interpolator&&(this.currentStepValues[c]=this.currentStepValues[c]||0,void 0!==this.newInters[c]&&a[c].value===this.newInters[c].value||(this.newInters[c]=a[c],this.stepValues[c]=this.currentStepValues[c]+1,this.stepInterpolators[c]=this.newInters[c].interpolator(this.oldValues[c],this.newInters[c].value)),a[c]=Object(it.spring)(this.stepValues[c],this.newInters[c].config));return i.a.createElement(it.Motion,rn({},o,{style:a}),(function(t){var n={};for(var i in t)if(e.stepValues[i]){e.currentStepValues[i]=t[i];var o=e.currentStepValues[i]-e.stepValues[i]+1;e.oldValues[i]=n[i]=e.stepInterpolators[i](o)}return r(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(Object(n));"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){dn(e,t,n[t])}))}return e}({},t,n))}))}}])&&cn(n.prototype,r),o&&cn(n,o),t}(r.PureComponent);dn(pn,"propTypes",{children:a.a.func.isRequired,style:a.a.func.isRequired});var bn=Object(r.createContext)(),yn=function(e){var t=e.children,n=e.animate,o=e.stiffness,a=e.damping,c=Object(r.useMemo)((function(){return{animate:n,springConfig:{stiffness:o,damping:a}}}),[n,o,a]);return i.a.createElement(bn.Provider,{value:c},t)};yn.propTypes={children:a.a.node.isRequired,animate:a.a.bool.isRequired,stiffness:a.a.number.isRequired,damping:a.a.number.isRequired},yn.defaultProps={animate:!0,stiffness:90,damping:15};var vn=function(){return Object(r.useContext)(bn)};function mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(Object(n));"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){gn(e,t,n[t])}))}return e}function gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var xn={position:"relative"},On={pointerEvents:"none",position:"absolute",zIndex:10},wn=function(e){var t,n=e.children,o=e.theme,a=e.isInteractive,u=void 0===a||a,s=e.animate,f=e.motionStiffness,l=e.motionDamping,d=Object(r.useRef)(null),h=_n(Object(r.useState)({isTooltipVisible:!1,tooltipContent:null,position:{}}),2),p=h[0],b=h[1],y=Object(r.useCallback)((function(e,t){if(d){var n=d.current.getBoundingClientRect(),r=t.clientX,i=t.clientY,o=r-n.left,a=i-n.top,c={};o<n.width/2?c.left=o+20:c.right=n.width-o+20,a<n.height/2?c.top=a-12:c.bottom=n.height-a-12,b({isTooltipVisible:!0,tooltipContent:e,position:c})}}),[d]),v=Object(r.useCallback)((function(){b({isTooltipVisible:!1,tooltipContent:null})})),m=p.isTooltipVisible,g=p.tooltipContent,_=p.position;return t=!0===u?i.a.createElement("div",{style:xn,ref:d},n({showTooltip:u?y:yt,hideTooltip:u?v:yt}),m&&i.a.createElement("div",{style:mn({},On,_,o.tooltip)},g)):n({showTooltip:u?y:yt,hideTooltip:u?v:yt}),i.a.createElement(Qt.Provider,{value:o},i.a.createElement(yn,{animate:s,stiffness:f,damping:l},i.a.createElement(c.c.Provider,{value:[y,v]},t)))};function jn(e){return(jn="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 Sn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mn(e,t){return!t||"object"!==jn(t)&&"function"!=typeof t?En(e):t}function Tn(e){return(Tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function En(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rn(e,t){return(Rn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}wn.propTypes={children:a.a.func.isRequired,isInteractive:a.a.bool,theme:a.a.object.isRequired,animate:a.a.bool.isRequired,motionStiffness:a.a.number,motionDamping:a.a.number};var Cn=function(e){function t(){var e,n;Sn(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Pn(En(n=Mn(this,(e=Tn(t)).call.apply(e,[this].concat(i)))),"state",{dimensions:{width:-1,height:-1}}),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rn(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this,t=this.state.dimensions,n=t.width,r=t.height,o=n>0&&r>0;return i.a.createElement(ot.a,{bounds:!0,onResize:function(t){e.setState({dimensions:t.bounds})}},(function(t){var a=t.measureRef;return i.a.createElement("div",{ref:a,style:{width:"100%",height:"100%"}},o&&e.props.children({width:n,height:r}))}))}}])&&kn(n.prototype,r),o&&kn(n,o),t}(r.Component);Pn(Cn,"propTypes",{children:a.a.func.isRequired});var qn=function(e){var t=e.id,n=e.colors;return i.a.createElement("linearGradient",{id:t,x1:0,x2:0,y1:0,y2:1},n.map((function(e){var t=e.offset,n=e.color,r=e.opacity;return i.a.createElement("stop",{key:t,offset:"".concat(t,"%"),stopColor:n,stopOpacity:void 0!==r?r:1})})))};qn.propTypes={id:a.a.string.isRequired,colors:a.a.arrayOf(a.a.shape({offset:a.a.number.isRequired,color:a.a.string.isRequired})).isRequired};var An={linearGradient:qn};var Dn=Object(r.memo)((function(e){var t=e.id,n=e.background,r=e.color,o=e.size,a=e.padding,c=e.stagger,u=o+a,s=o/2,f=a/2;return!0===c&&(u=2*o+2*a),i.a.createElement("pattern",{id:t,width:u,height:u,patternUnits:"userSpaceOnUse"},i.a.createElement("rect",{width:u,height:u,fill:n}),i.a.createElement("circle",{cx:f+s,cy:f+s,r:s,fill:r}),c&&i.a.createElement("circle",{cx:1.5*a+o+s,cy:1.5*a+o+s,r:s,fill:r}))}));Dn.displayName="PatternDots",Dn.propTypes={id:a.a.string.isRequired,color:a.a.string.isRequired,background:a.a.string.isRequired,size:a.a.number.isRequired,padding:a.a.number.isRequired,stagger:a.a.bool.isRequired},Dn.defaultProps={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1};Math.PI;var zn=function(e){return e*Math.PI/180},Wn={svg:{align:{left:"start",center:"middle",right:"end"},baseline:{top:"text-before-edge",center:"central",bottom:"alphabetic"}},canvas:{align:{left:"left",center:"center",right:"right"},baseline:{top:"top",center:"middle",bottom:"bottom"}}};var In=Object(r.memo)((function(e){var t=e.id,n=e.spacing,r=e.rotation,o=e.background,a=e.color,c=e.lineWidth,u=Math.round(r)%360,s=Math.abs(n);u>180?u-=360:u>90?u-=180:u<-180?u+=360:u<-90&&(u+=180);var f,l=s,d=s;return 0===u?f="\n M 0 0 L ".concat(l," 0\n M 0 ").concat(d," L ").concat(l," ").concat(d,"\n "):90===u?f="\n M 0 0 L 0 ".concat(d,"\n M ").concat(l," 0 L ").concat(l," ").concat(d,"\n "):(l=Math.abs(s/Math.sin(zn(u))),d=s/Math.sin(zn(90-u)),f=u>0?"\n M 0 ".concat(-d," L ").concat(2*l," ").concat(d,"\n M ").concat(-l," ").concat(-d," L ").concat(l," ").concat(d,"\n M ").concat(-l," 0 L ").concat(l," ").concat(2*d,"\n "):"\n M ".concat(-l," ").concat(d," L ").concat(l," ").concat(-d,"\n M ").concat(-l," ").concat(2*d," L ").concat(2*l," ").concat(-d,"\n M 0 ").concat(2*d," L ").concat(2*l," 0\n ")),i.a.createElement("pattern",{id:t,width:l,height:d,patternUnits:"userSpaceOnUse"},i.a.createElement("rect",{width:l,height:d,fill:o,stroke:"rgba(255, 0, 0, 0.1)",strokeWidth:0}),i.a.createElement("path",{d:f,strokeWidth:c,stroke:a,strokeLinecap:"square"}))}));In.displayName="PatternLines",In.propTypes={id:a.a.string.isRequired,spacing:a.a.number.isRequired,rotation:a.a.number.isRequired,background:a.a.string.isRequired,color:a.a.string.isRequired,lineWidth:a.a.number.isRequired},In.defaultProps={spacing:5,rotation:0,color:"#000000",background:"#ffffff",lineWidth:2};var Nn=Object(r.memo)((function(e){var t=e.id,n=e.background,r=e.color,o=e.size,a=e.padding,c=e.stagger,u=o+a,s=a/2;return!0===c&&(u=2*o+2*a),i.a.createElement("pattern",{id:t,width:u,height:u,patternUnits:"userSpaceOnUse"},i.a.createElement("rect",{width:u,height:u,fill:n}),i.a.createElement("rect",{x:s,y:s,width:o,height:o,fill:r}),c&&i.a.createElement("rect",{x:1.5*a+o,y:1.5*a+o,width:o,height:o,fill:r}))}));Nn.displayName="PatternSquares",Nn.propTypes={id:a.a.string.isRequired,color:a.a.string.isRequired,background:a.a.string.isRequired,size:a.a.number.isRequired,padding:a.a.number.isRequired,stagger:a.a.bool.isRequired},Nn.defaultProps={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1};var Ln={patternDots:Dn,patternLines:In,patternSquares:Nn};function Fn(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(Object(n));"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Yn(e,t,n[t])}))}return e}function Yn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zn=Un({},An,Ln),Bn=function(e){var t=e.defs;return!t||t.length<1?null:i.a.createElement("defs",null,t.map((function(e){var t=e.type,n=Fn(e,["type"]);return Zn[t]?i.a.createElement(Zn[t],Un({key:n.id},n)):null})))};Bn.propTypes={defs:a.a.arrayOf(a.a.shape({type:a.a.oneOf(Object.keys(Zn)).isRequired,id:a.a.string.isRequired}))};var Vn=Object(r.memo)(Bn),Hn=function(e){var t=e.width,n=e.height,r=e.margin,o=e.defs,a=e.children,c=tn();return i.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",role:"img",width:t,height:n},i.a.createElement(Vn,{defs:o}),i.a.createElement("rect",{width:t,height:n,fill:c.background}),i.a.createElement("g",{transform:"translate(".concat(r.left,",").concat(r.top,")")},a))};Hn.propTypes={width:a.a.number.isRequired,height:a.a.number.isRequired,margin:a.a.shape({top:a.a.number.isRequired,left:a.a.number.isRequired}).isRequired,defs:a.a.array,children:a.a.oneOfType([a.a.arrayOf(a.a.node),a.a.node]).isRequired};var Gn=function(e){var t=e.size,n=e.color,r=e.borderWidth,o=e.borderColor;return i.a.createElement("circle",{r:t/2,fill:n,stroke:o,strokeWidth:r,style:{pointerEvents:"none"}})};Gn.propTypes={size:a.a.number.isRequired,color:a.a.string.isRequired,borderWidth:a.a.number.isRequired,borderColor:a.a.string.isRequired};var Xn=Object(r.memo)(Gn),$n=function(e){var t=e.x,n=e.y,r=e.symbol,o=e.size,a=e.datum,c=e.color,u=e.borderWidth,s=e.borderColor,f=e.label,l=e.labelTextAnchor,d=e.labelYOffset,h=e.theme;return i.a.createElement("g",{transform:"translate(".concat(t,", ").concat(n,")"),style:{pointerEvents:"none"}},i.a.createElement(r,{size:o,color:c,datum:a,borderWidth:u,borderColor:s}),f&&i.a.createElement("text",{textAnchor:l,y:d,style:h.dots.text},f))};$n.propTypes={x:a.a.number.isRequired,y:a.a.number.isRequired,datum:a.a.object.isRequired,size:a.a.number.isRequired,color:a.a.string.isRequired,borderWidth:a.a.number.isRequired,borderColor:a.a.string.isRequired,symbol:a.a.oneOfType([a.a.func,a.a.object]),label:a.a.oneOfType([a.a.string,a.a.number]),labelTextAnchor:a.a.oneOf(["start","middle","end"]),labelYOffset:a.a.number.isRequired,theme:a.a.shape({dots:jt.isRequired}).isRequired},$n.defaultProps={symbol:Xn,labelTextAnchor:"middle",labelYOffset:-12};Object(r.memo)($n);var Jn=function(e){var t=e.width,n=e.height,r=e.axis,o=e.scale,a=e.value,c=e.lineStyle,u=e.textStyle,s=e.legend,f=e.legendPosition,l=e.legendOffsetX,d=e.legendOffsetY,h=e.legendOrientation,p=tn(),b=0,y=0,v=0,m=0;"y"===r?(v=o(a),y=t):(b=o(a),m=n);var g=null;if(s){var _=function(e){var t=e.axis,n=e.width,r=e.height,i=e.position,o=e.offsetX,a=e.offsetY,c=e.orientation,u=0,s=0,f="vertical"===c?-90:0,l="start";if("x"===t)switch(i){case"top-left":u=-o,s=a,l="end";break;case"top":s=-a,l="horizontal"===c?"middle":"start";break;case"top-right":u=o,s=a,l="horizontal"===c?"start":"end";break;case"right":u=o,s=r/2,l="horizontal"===c?"start":"middle";break;case"bottom-right":u=o,s=r-a,l="start";break;case"bottom":s=r+a,l="horizontal"===c?"middle":"end";break;case"bottom-left":s=r-a,u=-o,l="horizontal"===c?"end":"start";break;case"left":u=-o,s=r/2,l="horizontal"===c?"end":"middle"}else switch(i){case"top-left":u=o,s=-a,l="start";break;case"top":u=n/2,s=-a,l="horizontal"===c?"middle":"start";break;case"top-right":u=n-o,s=-a,l="horizontal"===c?"end":"start";break;case"right":u=n+o,l="horizontal"===c?"start":"middle";break;case"bottom-right":u=n-o,s=a,l="end";break;case"bottom":u=n/2,s=a,l="horizontal"===c?"middle":"end";break;case"bottom-left":u=o,s=a,l="horizontal"===c?"start":"end";break;case"left":u=-o,l="horizontal"===c?"end":"middle"}return{x:u,y:s,rotation:f,textAnchor:l}}({axis:r,width:t,height:n,position:f,offsetX:l,offsetY:d,orientation:h});g=i.a.createElement("text",{transform:"translate(".concat(_.x,", ").concat(_.y,") rotate(").concat(_.rotation,")"),textAnchor:_.textAnchor,dominantBaseline:"central",style:u},s)}return i.a.createElement("g",{transform:"translate(".concat(b,", ").concat(v,")")},i.a.createElement("line",{x1:0,x2:y,y1:0,y2:m,stroke:p.markers.lineColor,strokeWidth:p.markers.lineStrokeWidth,style:c}),g)};Jn.propTypes={width:a.a.number.isRequired,height:a.a.number.isRequired,axis:a.a.oneOf(["x","y"]).isRequired,scale:a.a.func.isRequired,value:a.a.oneOfType([a.a.number,a.a.string,a.a.instanceOf(Date)]).isRequired,lineStyle:a.a.object,textStyle:a.a.object,legend:a.a.string,legendPosition:a.a.oneOf(["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"]),legendOffsetX:a.a.number.isRequired,legendOffsetY:a.a.number.isRequired,legendOrientation:a.a.oneOf(["horizontal","vertical"]).isRequired},Jn.defaultProps={legendPosition:"top-right",legendOffsetX:14,legendOffsetY:14,legendOrientation:"horizontal"};var Qn=Object(r.memo)(Jn);function Kn(){return(Kn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var er=function(e){var t=e.markers,n=e.width,r=e.height,o=e.xScale,a=e.yScale;return t&&0!==t.length?t.map((function(e,t){return i.a.createElement(Qn,Kn({key:t},e,{width:n,height:r,scale:"y"===e.axis?a:o}))})):null};er.propTypes={width:a.a.number.isRequired,height:a.a.number.isRequired,xScale:a.a.func.isRequired,yScale:a.a.func.isRequired,markers:a.a.arrayOf(a.a.shape({axis:a.a.oneOf(["x","y"]).isRequired,value:a.a.oneOfType([a.a.number,a.a.string,a.a.instanceOf(Date)]).isRequired,lineStyle:a.a.object,textStyle:a.a.object}))};var tr=Object(r.memo)(er);var nr=function(){return st()(ht()({margin:Ht}),lt()({width:a.a.number.isRequired,height:a.a.number.isRequired,margin:Zt}),bt()((function(e,t){return e.width!==t.width||e.height!==t.height||!ct()(e.margin,t.margin)}),(function(e){var t=Object.assign({},Ht,e.margin);return{margin:t,width:e.width-t.left-t.right,height:e.height-t.top-t.bottom,outerWidth:e.width,outerHeight:e.height}})))};function rr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ir=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.srcKey,n=void 0===t?"theme":t,r=e.destKey,i=void 0===r?"theme":r;return st()(lt()(rr({},n,a.a.object)),bt