@careevolution/mydatahelps-ui 1.5.3 → 1.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -196,5 +196,5 @@ var a=n[t];a.value*=-1,this.$=a}},table:function(e){for(var t=[],n=e.len,r=e.sym
196
196
  *
197
197
  * This source code is licensed under the MIT license found in the
198
198
  * LICENSE file in the root directory of this source tree.
199
- */function yw(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function gw(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:var m=e.type;switch(m){case s:case u:case r:case i:case a:case f:return m;default:var v=m&&m.$$typeof;switch(v){case c:case l:case h:case p:case o:return v;default:return d}}case n:return d}}}var x=s,w=u,k=c,S=o,O=t,E=l,A=r,M=h,_=p,j=n,P=i,C=a,D=f,T=!1;function N(e){return b(e)===u}vw.AsyncMode=x,vw.ConcurrentMode=w,vw.ContextConsumer=k,vw.ContextProvider=S,vw.Element=O,vw.ForwardRef=E,vw.Fragment=A,vw.Lazy=M,vw.Memo=_,vw.Portal=j,vw.Profiler=P,vw.StrictMode=C,vw.Suspense=D,vw.isAsyncMode=function(e){return T||(T=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(e)||b(e)===s},vw.isConcurrentMode=N,vw.isContextConsumer=function(e){return b(e)===c},vw.isContextProvider=function(e){return b(e)===o},vw.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},vw.isForwardRef=function(e){return b(e)===l},vw.isFragment=function(e){return b(e)===r},vw.isLazy=function(e){return b(e)===h},vw.isMemo=function(e){return b(e)===p},vw.isPortal=function(e){return b(e)===n},vw.isProfiler=function(e){return b(e)===i},vw.isStrictMode=function(e){return b(e)===a},vw.isSuspense=function(e){return b(e)===f},vw.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===i||e===a||e===f||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===o||e.$$typeof===c||e.$$typeof===l||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g||e.$$typeof===m)},vw.typeOf=b}(),"production"===process.env.NODE_ENV?qx.exports=Gx:qx.exports=vw;var bw={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},xw=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},ww=null,kw=null,Sw=function e(t){if(t===ww&&hu(kw))return kw;var n=[];return s.forEach(t,(function(t){Pm(t)||(qx.exports.isFragment(t)?n=n.concat(e(t.props.children)):n.push(t))})),kw=n,ww=t,n},Ow=function(e,t){var n=[],r=[];return r=hu(t)?t.map((function(e){return xw(e)})):[xw(t)],Sw(e).forEach((function(e){var t=Jf(e,"type.displayName")||Jf(e,"type.name");-1!==r.indexOf(t)&&n.push(e)})),n},Ew=function(e,t){var n=Ow(e,t);return n&&n[0]},Aw=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!sm(n)||n<=0||!sm(r)||r<=0)},Mw=["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"],_w=function e(t,n){if(t===n)return!0;var r=s.count(t);if(r!==s.count(n))return!1;if(0===r)return!0;if(1===r)return jw(hu(t)?t[0]:t,hu(n)?n[0]:n);for(var a=0;a<r;a++){var i=t[a],o=n[a];if(hu(i)||hu(o)){if(!e(i,o))return!1}else if(!jw(i,o))return!1}return!0},jw=function(e,t){if(Pm(e)&&Pm(t))return!0;if(!Pm(e)&&!Pm(t)){var n=e.props||{},r=n.children,a=gw(n,["children"]),i=t.props||{},o=i.children,c=gw(i,["children"]);return r&&o?yw(a,c)&&_w(r,o):!r&&!o&&yw(a,c)}return!1},Pw=function(e,t){var n=[],r={};return Sw(e).forEach((function(e,a){if(function(e){return e&&e.type&&im(e.type)&&Mw.indexOf(e.type)>=0}(e))n.push(e);else if(e){var i=xw(e.type),o=t[i]||{},c=o.handler,s=o.once;if(c&&(!s||!r[i])){var u=c(e,i,a);n.push(u),r[i]=!0}}})),n},Cw=nf;var Dw=function(e,t){return Cw(e,t)},Tw=bf;var Nw=function(e,t,n){for(var r=-1,a=e.length;++r<a;){var i=e[r],o=t(i);if(null!=o&&(void 0===c?o==o&&!Tw(o):n(o,c)))var c=o,s=i}return s};var Iw=Nw,Rw=function(e,t){return e>t},Fw=gd;var zw=function(e){return e&&e.length?Iw(e,Fw,Rw):void 0};var Lw=Nw,Hw=function(e,t){return e<t},Bw=gd;var Uw=function(e){return e&&e.length?Lw(e,Bw,Hw):void 0},Vw=Df,Ww=Dd,$w=ay,Yw=hu;var qw=Xv,Gw=function(e,t){return(Yw(e)?Vw:$w)(e,Ww(t))};var Xw,Zw=function(e,t){return qw(Gw(e,t),1)},Kw=!0,Jw="[DecimalError] ",Qw=Jw+"Invalid argument: ",ek=Jw+"Exponent out of range: ",tk=Math.floor,nk=Math.pow,rk=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ak=1e7,ik=tk(1286742750677284.5),ok={};function ck(e,t){var n,r,a,i,o,c,s,u,l=e.constructor,f=l.precision;if(!e.s||!t.s)return t.s||(t=new l(e)),Kw?yk(t,f):t;if(s=e.d,u=t.d,o=e.e,a=t.e,s=s.slice(),i=o-a){for(i<0?(r=s,i=-i,c=u.length):(r=u,a=o,c=s.length),i>(c=(o=Math.ceil(f/7))>c?o+1:c+1)&&(i=c,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((c=s.length)-(i=u.length)<0&&(i=c,r=u,u=s,s=r),n=0;i;)n=(s[--i]=s[i]+u[i]+n)/ak|0,s[i]%=ak;for(n&&(s.unshift(n),++a),c=s.length;0==s[--c];)s.pop();return t.d=s,t.e=a,Kw?yk(t,f):t}function sk(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Qw+e)}function uk(e){var t,n,r,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)(n=7-(r=e[t]+"").length)&&(i+=hk(n)),i+=r;(n=7-(r=(o=e[t])+"").length)&&(i+=hk(n))}else if(0===o)return"0";for(;o%10==0;)o/=10;return i+o}ok.absoluteValue=ok.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},ok.comparedTo=ok.cmp=function(e){var t,n,r,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(t=0,n=(r=i.d.length)<(a=e.d.length)?r:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1},ok.decimalPlaces=ok.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},ok.dividedBy=ok.div=function(e){return lk(this,new this.constructor(e))},ok.dividedToIntegerBy=ok.idiv=function(e){var t=this.constructor;return yk(lk(this,new t(e),0,1),t.precision)},ok.equals=ok.eq=function(e){return!this.cmp(e)},ok.exponent=function(){return dk(this)},ok.greaterThan=ok.gt=function(e){return this.cmp(e)>0},ok.greaterThanOrEqualTo=ok.gte=function(e){return this.cmp(e)>=0},ok.isInteger=ok.isint=function(){return this.e>this.d.length-2},ok.isNegative=ok.isneg=function(){return this.s<0},ok.isPositive=ok.ispos=function(){return this.s>0},ok.isZero=function(){return 0===this.s},ok.lessThan=ok.lt=function(e){return this.cmp(e)<0},ok.lessThanOrEqualTo=ok.lte=function(e){return this.cmp(e)<1},ok.logarithm=ok.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(Xw))throw Error(Jw+"NaN");if(n.s<1)throw Error(Jw+(n.s?"NaN":"-Infinity"));return n.eq(Xw)?new r(0):(Kw=!1,t=lk(mk(n,i),mk(e,i),i),Kw=!0,yk(t,a))},ok.minus=ok.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?gk(t,e):ck(t,(e.s=-e.s,e))},ok.modulo=ok.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(!(e=new r(e)).s)throw Error(Jw+"NaN");return n.s?(Kw=!1,t=lk(n,e,0,1).times(e),Kw=!0,n.minus(t)):yk(new r(n),a)},ok.naturalExponential=ok.exp=function(){return fk(this)},ok.naturalLogarithm=ok.ln=function(){return mk(this)},ok.negated=ok.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},ok.plus=ok.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?ck(t,e):gk(t,(e.s=-e.s,e))},ok.precision=ok.sd=function(e){var t,n,r,a=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(Qw+e);if(t=dk(a)+1,n=7*(r=a.d.length-1)+1,r=a.d[r]){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},ok.squareRoot=ok.sqrt=function(){var e,t,n,r,a,i,o,c=this,s=c.constructor;if(c.s<1){if(!c.s)return new s(0);throw Error(Jw+"NaN")}for(e=dk(c),Kw=!1,0==(a=Math.sqrt(+c))||a==1/0?(((t=uk(c.d)).length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=tk((e+1)/2)-(e<0||e%2),r=new s(t=a==1/0?"5e"+e:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new s(a.toString()),a=o=(n=s.precision)+3;;)if(r=(i=r).plus(lk(c,i,o+2)).times(.5),uk(i.d).slice(0,o)===(t=uk(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&"4999"==t){if(yk(i,n+1,0),i.times(i).eq(c)){r=i;break}}else if("9999"!=t)break;o+=4}return Kw=!0,yk(r,n)},ok.times=ok.mul=function(e){var t,n,r,a,i,o,c,s,u,l=this,f=l.constructor,d=l.d,p=(e=new f(e)).d;if(!l.s||!e.s)return new f(0);for(e.s*=l.s,n=l.e+e.e,(s=d.length)<(u=p.length)&&(i=d,d=p,p=i,o=s,s=u,u=o),i=[],r=o=s+u;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,a=s+r;a>r;)c=i[a]+p[r]*d[a-r-1]+t,i[a--]=c%ak|0,t=c/ak|0;i[a]=(i[a]+t)%ak|0}for(;!i[--o];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Kw?yk(e,f.precision):e},ok.toDecimalPlaces=ok.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(sk(e,0,1e9),void 0===t?t=r.rounding:sk(t,0,8),yk(n,e+dk(n)+1,t))},ok.toExponential=function(e,t){var n,r=this,a=r.constructor;return void 0===e?n=bk(r,!0):(sk(e,0,1e9),void 0===t?t=a.rounding:sk(t,0,8),n=bk(r=yk(new a(r),e+1,t),!0,e+1)),n},ok.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return void 0===e?bk(a):(sk(e,0,1e9),void 0===t?t=i.rounding:sk(t,0,8),n=bk((r=yk(new i(a),e+dk(a)+1,t)).abs(),!1,e+dk(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)},ok.toInteger=ok.toint=function(){var e=this,t=e.constructor;return yk(new t(e),dk(e)+1,t.rounding)},ok.toNumber=function(){return+this},ok.toPower=ok.pow=function(e){var t,n,r,a,i,o,c=this,s=c.constructor,u=+(e=new s(e));if(!e.s)return new s(Xw);if(!(c=new s(c)).s){if(e.s<1)throw Error(Jw+"Infinity");return c}if(c.eq(Xw))return c;if(r=s.precision,e.eq(Xw))return yk(c,r);if(o=(t=e.e)>=(n=e.d.length-1),i=c.s,o){if((n=u<0?-u:u)<=9007199254740991){for(a=new s(Xw),t=Math.ceil(r/7+4),Kw=!1;n%2&&xk((a=a.times(c)).d,t),0!==(n=tk(n/2));)xk((c=c.times(c)).d,t);return Kw=!0,e.s<0?new s(Xw).div(a):yk(a,r)}}else if(i<0)throw Error(Jw+"NaN");return i=i<0&&1&e.d[Math.max(t,n)]?-1:1,c.s=1,Kw=!1,a=e.times(mk(c,r+12)),Kw=!0,(a=fk(a)).s=i,a},ok.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return void 0===e?r=bk(a,(n=dk(a))<=i.toExpNeg||n>=i.toExpPos):(sk(e,1,1e9),void 0===t?t=i.rounding:sk(t,0,8),r=bk(a=yk(new i(a),e,t),e<=(n=dk(a))||n<=i.toExpNeg,e)),r},ok.toSignificantDigits=ok.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(sk(e,1,1e9),void 0===t?t=n.rounding:sk(t,0,8)),yk(new n(this),e,t)},ok.toString=ok.valueOf=ok.val=ok.toJSON=ok[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=dk(e),n=e.constructor;return bk(e,t<=n.toExpNeg||t>=n.toExpPos)};var lk=function(){function e(e,t){var n,r=0,a=e.length;for(e=e.slice();a--;)n=e[a]*t+r,e[a]=n%ak|0,r=n/ak|0;return r&&e.unshift(r),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*ak+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,a,i,o){var c,s,u,l,f,d,p,h,m,v,y,g,b,x,w,k,S,O,E=r.constructor,A=r.s==a.s?1:-1,M=r.d,_=a.d;if(!r.s)return new E(r);if(!a.s)throw Error(Jw+"Division by zero");for(s=r.e-a.e,S=_.length,w=M.length,h=(p=new E(A)).d=[],u=0;_[u]==(M[u]||0);)++u;if(_[u]>(M[u]||0)&&--s,(g=null==i?i=E.precision:o?i+(dk(r)-dk(a))+1:i)<0)return new E(0);if(g=g/7+2|0,u=0,1==S)for(l=0,_=_[0],g++;(u<w||l)&&g--;u++)b=l*ak+(M[u]||0),h[u]=b/_|0,l=b%_|0;else{for((l=ak/(_[0]+1)|0)>1&&(_=e(_,l),M=e(M,l),S=_.length,w=M.length),x=S,v=(m=M.slice(0,S)).length;v<S;)m[v++]=0;(O=_.slice()).unshift(0),k=_[0],_[1]>=ak/2&&++k;do{l=0,(c=t(_,m,S,v))<0?(y=m[0],S!=v&&(y=y*ak+(m[1]||0)),(l=y/k|0)>1?(l>=ak&&(l=ak-1),1==(c=t(f=e(_,l),m,d=f.length,v=m.length))&&(l--,n(f,S<d?O:_,d))):(0==l&&(c=l=1),f=_.slice()),(d=f.length)<v&&f.unshift(0),n(m,f,v),-1==c&&(c=t(_,m,S,v=m.length))<1&&(l++,n(m,S<v?O:_,v)),v=m.length):0===c&&(l++,m=[0]),h[u++]=l,c&&m[0]?m[v++]=M[x]||0:(m=[M[x]],v=1)}while((x++<w||void 0!==m[0])&&g--)}return h[0]||h.shift(),p.e=s,yk(p,o?i+dk(p)+1:i)}}();function fk(e,t){var n,r,a,i,o,c=0,s=0,u=e.constructor,l=u.precision;if(dk(e)>16)throw Error(ek+dk(e));if(!e.s)return new u(Xw);for(null==t?(Kw=!1,o=l):o=t,i=new u(.03125);e.abs().gte(.1);)e=e.times(i),s+=5;for(o+=Math.log(nk(2,s))/Math.LN10*2+5|0,n=r=a=new u(Xw),u.precision=o;;){if(r=yk(r.times(e),o),n=n.times(++c),uk((i=a.plus(lk(r,n,o))).d).slice(0,o)===uk(a.d).slice(0,o)){for(;s--;)a=yk(a.times(a),o);return u.precision=l,null==t?(Kw=!0,yk(a,l)):a}a=i}}function dk(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function pk(e,t,n){if(t>e.LN10.sd())throw Kw=!0,n&&(e.precision=n),Error(Jw+"LN10 precision limit exceeded");return yk(new e(e.LN10),t)}function hk(e){for(var t="";e--;)t+="0";return t}function mk(e,t){var n,r,a,i,o,c,s,u,l,f=1,d=e,p=d.d,h=d.constructor,m=h.precision;if(d.s<1)throw Error(Jw+(d.s?"NaN":"-Infinity"));if(d.eq(Xw))return new h(0);if(null==t?(Kw=!1,u=m):u=t,d.eq(10))return null==t&&(Kw=!0),pk(h,u);if(u+=10,h.precision=u,r=(n=uk(p)).charAt(0),i=dk(d),!(Math.abs(i)<15e14))return s=pk(h,u+2,m).times(i+""),d=mk(new h(r+"."+n.slice(1)),u-10).plus(s),h.precision=m,null==t?(Kw=!0,yk(d,m)):d;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=uk((d=d.times(e)).d)).charAt(0),f++;for(i=dk(d),r>1?(d=new h("0."+n),i++):d=new h(r+"."+n.slice(1)),c=o=d=lk(d.minus(Xw),d.plus(Xw),u),l=yk(d.times(d),u),a=3;;){if(o=yk(o.times(l),u),uk((s=c.plus(lk(o,new h(a),u))).d).slice(0,u)===uk(c.d).slice(0,u))return c=c.times(2),0!==i&&(c=c.plus(pk(h,u+2,m).times(i+""))),c=lk(c,new h(f),u),h.precision=m,null==t?(Kw=!0,yk(c,m)):c;c=s,a+=2}}function vk(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(a=t.length;48===t.charCodeAt(a-1);)--a;if(t=t.slice(r,a)){if(a-=r,n=n-r-1,e.e=tk(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=7;r<a;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),Kw&&(e.e>ik||e.e<-ik))throw Error(ek+n)}else e.s=0,e.e=0,e.d=[0];return e}function yk(e,t,n){var r,a,i,o,c,s,u,l,f=e.d;for(o=1,i=f[0];i>=10;i/=10)o++;if((r=t-o)<0)r+=7,a=t,u=f[l=0];else{if((l=Math.ceil((r+1)/7))>=(i=f.length))return e;for(u=i=f[l],o=1;i>=10;i/=10)o++;a=(r%=7)-7+o}if(void 0!==n&&(c=u/(i=nk(10,o-a-1))%10|0,s=t<0||void 0!==f[l+1]||u%i,s=n<4?(c||s)&&(0==n||n==(e.s<0?3:2)):c>5||5==c&&(4==n||s||6==n&&(r>0?a>0?u/nk(10,o-a):0:f[l-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return s?(i=dk(e),f.length=1,t=t-i-1,f[0]=nk(10,(7-t%7)%7),e.e=tk(-t/7)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(0==r?(f.length=l,i=1,l--):(f.length=l+1,i=nk(10,7-r),f[l]=a>0?(u/nk(10,o-a)%nk(10,a)|0)*i:0),s)for(;;){if(0==l){(f[0]+=i)==ak&&(f[0]=1,++e.e);break}if(f[l]+=i,f[l]!=ak)break;f[l--]=0,i=1}for(r=f.length;0===f[--r];)f.pop();if(Kw&&(e.e>ik||e.e<-ik))throw Error(ek+dk(e));return e}function gk(e,t){var n,r,a,i,o,c,s,u,l,f,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Kw?yk(t,p):t;if(s=e.d,f=t.d,r=t.e,u=e.e,s=s.slice(),o=u-r){for((l=o<0)?(n=s,o=-o,c=f.length):(n=f,r=u,c=s.length),o>(a=Math.max(Math.ceil(p/7),c)+2)&&(o=a,n.length=1),n.reverse(),a=o;a--;)n.push(0);n.reverse()}else{for((l=(a=s.length)<(c=f.length))&&(c=a),a=0;a<c;a++)if(s[a]!=f[a]){l=s[a]<f[a];break}o=0}for(l&&(n=s,s=f,f=n,t.s=-t.s),c=s.length,a=f.length-c;a>0;--a)s[c++]=0;for(a=f.length;a>o;){if(s[--a]<f[a]){for(i=a;i&&0===s[--i];)s[i]=ak-1;--s[i],s[a]+=ak}s[a]-=f[a]}for(;0===s[--c];)s.pop();for(;0===s[0];s.shift())--r;return s[0]?(t.d=s,t.e=r,Kw?yk(t,p):t):new d(0)}function bk(e,t,n){var r,a=dk(e),i=uk(e.d),o=i.length;return t?(n&&(r=n-o)>0?i=i.charAt(0)+"."+i.slice(1)+hk(r):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+hk(-a-1)+i,n&&(r=n-o)>0&&(i+=hk(r))):a>=o?(i+=hk(a+1-o),n&&(r=n-a-1)>0&&(i=i+"."+hk(r))):((r=a+1)<o&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-o)>0&&(a+1===o&&(i+="."),i+=hk(r))),e.s<0?"-"+i:i}function xk(e,t){if(e.length>t)return e.length=t,!0}function wk(e){if(!e||"object"!=typeof e)throw Error(Jw+"Object expected");var t,n,r,a=["precision",1,1e9,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if(void 0!==(r=e[n=a[t]])){if(!(tk(r)===r&&r>=a[t+1]&&r<=a[t+2]))throw Error(Qw+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(Qw+n+": "+r);this[n]=new this(r)}return this}var kk=function e(t){var n,r,a;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(Qw+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):vk(t,e.toString())}if("string"!=typeof e)throw Error(Qw+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!rk.test(e))throw Error(Qw+e);vk(t,e)}if(i.prototype=ok,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=e,i.config=i.set=wk,void 0===t&&(t={}),t)for(a=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<a.length;)t.hasOwnProperty(r=a[n++])||(t[r]=this[r]);return i.config(t),i}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});Xw=new kk(1);var Sk=kk;function Ok(e){return function(e){if(Array.isArray(e))return Ek(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ek(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ek(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ek(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ak=function(e){return e},Mk={"@@functional/placeholder":!0},_k=function(e){return e===Mk},jk=function(e){return function t(){return 0===arguments.length||1===arguments.length&&_k(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},Pk=function e(t,n){return 1===t?n:jk((function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];var o=a.filter((function(e){return e!==Mk})).length;return o>=t?n.apply(void 0,a):e(t-o,jk((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=a.map((function(e){return _k(e)?t.shift():e}));return n.apply(void 0,Ok(i).concat(t))})))}))},Ck=function(e){return Pk(e.length,e)},Dk=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},Tk=Ck((function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map((function(e){return t[e]})).map(e)})),Nk=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},Ik=function(e){var t=null,n=null;return function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return t&&a.every((function(e,n){return e===t[n]}))?n:(t=a,n=e.apply(void 0,a))}};var Rk=Ck((function(e,t,n){var r=+e;return r+n*(+t-r)})),Fk=Ck((function(e,t,n){var r=t-+e;return(n-e)/(r=r||1/0)})),zk=Ck((function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))})),Lk={rangeStep:function(e,t,n){for(var r=new Sk(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i},getDigitCount:function(e){return 0===e?1:Math.floor(new Sk(e).abs().log(10).toNumber())+1},interpolateNumber:Rk,uninterpolateNumber:Fk,uninterpolateTruncation:zk};function Hk(e){return function(e){if(Array.isArray(e))return Vk(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Uk(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bk(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw i}}return n}(e,t)||Uk(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Uk(e,t){if(e){if("string"==typeof e)return Vk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vk(e,t):void 0}}function Vk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wk(e){var t=Bk(e,2),n=t[0],r=t[1],a=n,i=r;return n>r&&(a=r,i=n),[a,i]}function $k(e,t,n){if(e.lte(0))return new Sk(0);var r=Lk.getDigitCount(e.toNumber()),a=new Sk(10).pow(r),i=e.div(a),o=1!==r?.05:.1,c=new Sk(Math.ceil(i.div(o).toNumber())).add(n).mul(o).mul(a);return t?c:new Sk(Math.ceil(c))}function Yk(e,t,n){var r=1,a=new Sk(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new Sk(10).pow(Lk.getDigitCount(e)-1),a=new Sk(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new Sk(Math.floor(e)))}else 0===e?a=new Sk(Math.floor((t-1)/2)):n||(a=new Sk(Math.floor(e)));var o=Math.floor((t-1)/2),c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return Ak;var r=t.reverse(),a=r[0],i=r.slice(1);return function(){return i.reduce((function(e,t){return t(e)}),a.apply(void 0,arguments))}}(Tk((function(e){return a.add(new Sk(e-o).mul(r)).toNumber()})),Dk);return c(0,t)}function qk(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Sk(0),tickMin:new Sk(0),tickMax:new Sk(0)};var i,o=$k(new Sk(t).sub(e).div(n-1),r,a);i=e<=0&&t>=0?new Sk(0):(i=new Sk(e).add(t).div(2)).sub(new Sk(i).mod(o));var c=Math.ceil(i.sub(e).div(o).toNumber()),s=Math.ceil(new Sk(t).sub(i).div(o).toNumber()),u=c+s+1;return u>n?qk(e,t,n,r,a+1):(u<n&&(s=t>0?s+(n-u):s,c=t>0?c:c+(n-u)),{step:o,tickMin:i.sub(new Sk(c).mul(o)),tickMax:i.add(new Sk(s).mul(o))})}var Gk=Ik((function(e){var t=Bk(e,2),n=t[0],r=t[1],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=Math.max(a,2),c=Wk([n,r]),s=Bk(c,2),u=s[0],l=s[1];if(u===-1/0||l===1/0){var f=l===1/0?[u].concat(Hk(Dk(0,a-1).map((function(){return 1/0})))):[].concat(Hk(Dk(0,a-1).map((function(){return-1/0}))),[l]);return n>r?Nk(f):f}if(u===l)return Yk(u,a,i);var d=qk(u,l,o,i),p=d.step,h=d.tickMin,m=d.tickMax,v=Lk.rangeStep(h,m.add(new Sk(.1).mul(p)),p);return n>r?Nk(v):v})),Xk=Ik((function(e,t){var n=Bk(e,2),r=n[0],a=n[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=Wk([r,a]),c=Bk(o,2),s=c[0],u=c[1];if(s===-1/0||u===1/0)return[r,a];if(s===u)return[s];var l=Math.max(t,2),f=$k(new Sk(u).sub(s).div(l-1),i,0),d=[].concat(Hk(Lk.rangeStep(new Sk(s),new Sk(u).sub(new Sk(.99).mul(f)),f)),[u]);return r>a?Nk(d):d}));function Zk(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Kk(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Jk(e){let t,n,r;function a(e,r,a=0,i=e.length){if(a<i){if(0!==t(r,r))return i;do{const t=a+i>>>1;n(e[t],r)<0?a=t+1:i=t}while(a<i)}return a}return 2!==e.length?(t=Zk,n=(t,n)=>Zk(e(t),n),r=(t,n)=>e(t)-n):(t=e===Zk||e===Kk?e:Qk,n=e,r=e),{left:a,center:function(e,t,n=0,i=e.length){const o=a(e,t,n,i-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o},right:function(e,r,a=0,i=e.length){if(a<i){if(0!==t(r,r))return i;do{const t=a+i>>>1;n(e[t],r)<=0?a=t+1:i=t}while(a<i)}return a}}}function Qk(){return 0}function eS(e){return null===e?NaN:+e}const tS=Jk(Zk).right;Jk(eS).center;var nS=tS;class rS extends Map{constructor(e,t=iS){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(aS(this,e))}has(e){return super.has(aS(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function aS({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function iS(e){return null!==e&&"object"==typeof e?e.valueOf():e}function oS(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}var cS=Math.sqrt(50),sS=Math.sqrt(10),uS=Math.sqrt(2);function lS(e,t,n){var r,a,i,o,c=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t<e)&&(a=e,e=t,t=a),0===(o=fS(e,t,n))||!isFinite(o))return[];if(o>0){let n=Math.round(e/o),r=Math.round(t/o);for(n*o<e&&++n,r*o>t&&--r,i=new Array(a=r-n+1);++c<a;)i[c]=(n+c)*o}else{o=-o;let n=Math.round(e*o),r=Math.round(t*o);for(n/o<e&&++n,r/o>t&&--r,i=new Array(a=r-n+1);++c<a;)i[c]=(n+c)/o}return r&&i.reverse(),i}function fS(e,t,n){var r=(t-e)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,a);return a>=0?(i>=cS?10:i>=sS?5:i>=uS?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=cS?10:i>=sS?5:i>=uS?2:1)}function dS(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/a;return i>=cS?a*=10:i>=sS?a*=5:i>=uS&&(a*=2),t<e?-a:a}function pS(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let a of e)null!=(a=t(a,++r,e))&&(n<a||void 0===n&&a>=a)&&(n=a)}return n}function hS(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let a of e)null!=(a=t(a,++r,e))&&(n>a||void 0===n&&a>=a)&&(n=a)}return n}function mS(e,t,n=0,r=e.length-1,a){for(a=void 0===a?oS:function(e=Zk){if(e===Zk)return oS;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(a);r>n;){if(r-n>600){const i=r-n+1,o=t-n+1,c=Math.log(i),s=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*s*(i-s)/i)*(o-i/2<0?-1:1);mS(e,t,Math.max(n,Math.floor(t-o*s/i+u)),Math.min(r,Math.floor(t+(i-o)*s/i+u)),a)}const i=e[t];let o=n,c=r;for(vS(e,n,t),a(e[r],i)>0&&vS(e,n,r);o<c;){for(vS(e,o,c),++o,--c;a(e[o],i)<0;)++o;for(;a(e[c],i)>0;)--c}0===a(e[n],i)?vS(e,n,c):(++c,vS(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function vS(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function yS(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),r=e.length){if((t=+t)<=0||r<2)return hS(e);if(t>=1)return pS(e);var r,a=(r-1)*t,i=Math.floor(a),o=pS(mS(e,i).subarray(0,i+1));return o+(hS(e.subarray(i+1))-o)*(a-i)}}function gS(e,t,n=eS){if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),o=+n(e[i],i,e);return o+(+n(e[i+1],i+1,e)-o)*(a-i)}}function bS(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(a);++r<a;)i[r]=e+r*n;return i}function xS(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function wS(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const kS=Symbol("implicit");function SS(){var e=new rS,t=[],n=[],r=kS;function a(a){let i=e.get(a);if(void 0===i){if(r!==kS)return r;e.set(a,i=t.push(a)-1)}return n[i%n.length]}return a.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new rS;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return a},a.range=function(e){return arguments.length?(n=Array.from(e),a):n.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.copy=function(){return SS(t,n).unknown(r)},xS.apply(a,arguments),a}function OS(){var e,t,n=SS().unknown(void 0),r=n.domain,a=n.range,i=0,o=1,c=!1,s=0,u=0,l=.5;function f(){var n=r().length,f=o<i,d=f?o:i,p=f?i:o;e=(p-d)/Math.max(1,n-s+2*u),c&&(e=Math.floor(e)),d+=(p-d-e*(n-s))*l,t=e*(1-s),c&&(d=Math.round(d),t=Math.round(t));var h=bS(n).map((function(t){return d+e*t}));return a(f?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),f()):r()},n.range=function(e){return arguments.length?([i,o]=e,i=+i,o=+o,f()):[i,o]},n.rangeRound=function(e){return[i,o]=e,i=+i,o=+o,c=!0,f()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(c=!!e,f()):c},n.padding=function(e){return arguments.length?(s=Math.min(1,u=+e),f()):s},n.paddingInner=function(e){return arguments.length?(s=Math.min(1,e),f()):s},n.paddingOuter=function(e){return arguments.length?(u=+e,f()):u},n.align=function(e){return arguments.length?(l=Math.max(0,Math.min(1,e)),f()):l},n.copy=function(){return OS(r(),[i,o]).round(c).paddingInner(s).paddingOuter(u).align(l)},xS.apply(f(),arguments)}function ES(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return ES(t())},e}function AS(){return ES(OS.apply(null,arguments).paddingInner(1))}function MS(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _S(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function jS(){}var PS=1/.7,CS="\\s*([+-]?\\d+)\\s*",DS="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",TS="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",NS=/^#([0-9a-f]{3,8})$/,IS=new RegExp(`^rgb\\(${CS},${CS},${CS}\\)$`),RS=new RegExp(`^rgb\\(${TS},${TS},${TS}\\)$`),FS=new RegExp(`^rgba\\(${CS},${CS},${CS},${DS}\\)$`),zS=new RegExp(`^rgba\\(${TS},${TS},${TS},${DS}\\)$`),LS=new RegExp(`^hsl\\(${DS},${TS},${TS}\\)$`),HS=new RegExp(`^hsla\\(${DS},${TS},${TS},${DS}\\)$`),BS={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function US(){return this.rgb().formatHex()}function VS(){return this.rgb().formatRgb()}function WS(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=NS.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?$S(t):3===n?new XS(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?YS(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?YS(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=IS.exec(e))?new XS(t[1],t[2],t[3],1):(t=RS.exec(e))?new XS(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=FS.exec(e))?YS(t[1],t[2],t[3],t[4]):(t=zS.exec(e))?YS(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=LS.exec(e))?tO(t[1],t[2]/100,t[3]/100,1):(t=HS.exec(e))?tO(t[1],t[2]/100,t[3]/100,t[4]):BS.hasOwnProperty(e)?$S(BS[e]):"transparent"===e?new XS(NaN,NaN,NaN,0):null}function $S(e){return new XS(e>>16&255,e>>8&255,255&e,1)}function YS(e,t,n,r){return r<=0&&(e=t=n=NaN),new XS(e,t,n,r)}function qS(e){return e instanceof jS||(e=WS(e)),e?new XS((e=e.rgb()).r,e.g,e.b,e.opacity):new XS}function GS(e,t,n,r){return 1===arguments.length?qS(e):new XS(e,t,n,null==r?1:r)}function XS(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ZS(){return`#${eO(this.r)}${eO(this.g)}${eO(this.b)}`}function KS(){const e=JS(this.opacity);return`${1===e?"rgb(":"rgba("}${QS(this.r)}, ${QS(this.g)}, ${QS(this.b)}${1===e?")":`, ${e})`}`}function JS(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function QS(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function eO(e){return((e=QS(e))<16?"0":"")+e.toString(16)}function tO(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new rO(e,t,n,r)}function nO(e){if(e instanceof rO)return new rO(e.h,e.s,e.l,e.opacity);if(e instanceof jS||(e=WS(e)),!e)return new rO;if(e instanceof rO)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),o=NaN,c=i-a,s=(i+a)/2;return c?(o=t===i?(n-r)/c+6*(n<r):n===i?(r-t)/c+2:(t-n)/c+4,c/=s<.5?i+a:2-i-a,o*=60):c=s>0&&s<1?0:o,new rO(o,c,s,e.opacity)}function rO(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function aO(e){return(e=(e||0)%360)<0?e+360:e}function iO(e){return Math.max(0,Math.min(1,e||0))}function oO(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}MS(jS,WS,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:US,formatHex:US,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return nO(this).formatHsl()},formatRgb:VS,toString:VS}),MS(XS,GS,_S(jS,{brighter(e){return e=null==e?PS:Math.pow(PS,e),new XS(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new XS(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new XS(QS(this.r),QS(this.g),QS(this.b),JS(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ZS,formatHex:ZS,formatHex8:function(){return`#${eO(this.r)}${eO(this.g)}${eO(this.b)}${eO(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:KS,toString:KS})),MS(rO,(function(e,t,n,r){return 1===arguments.length?nO(e):new rO(e,t,n,null==r?1:r)}),_S(jS,{brighter(e){return e=null==e?PS:Math.pow(PS,e),new rO(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new rO(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new XS(oO(e>=240?e-240:e+120,a,r),oO(e,a,r),oO(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new rO(aO(this.h),iO(this.s),iO(this.l),JS(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=JS(this.opacity);return`${1===e?"hsl(":"hsla("}${aO(this.h)}, ${100*iO(this.s)}%, ${100*iO(this.l)}%${1===e?")":`, ${e})`}`}}));var cO=e=>()=>e;function sO(e){return 1==(e=+e)?uO:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):cO(isNaN(t)?n:t)}}function uO(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):cO(isNaN(e)?t:e)}var lO=function e(t){var n=sO(t);function r(e,t){var r=n((e=GS(e)).r,(t=GS(t)).r),a=n(e.g,t.g),i=n(e.b,t.b),o=uO(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=i(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function fO(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,a=t.slice();return function(i){for(n=0;n<r;++n)a[n]=e[n]*(1-i)+t[n]*i;return a}}function dO(e,t){var n,r=t?t.length:0,a=e?Math.min(r,e.length):0,i=new Array(a),o=new Array(r);for(n=0;n<a;++n)i[n]=bO(e[n],t[n]);for(;n<r;++n)o[n]=t[n];return function(e){for(n=0;n<a;++n)o[n]=i[n](e);return o}}function pO(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function hO(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function mO(e,t){var n,r={},a={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=bO(e[n],t[n]):a[n]=t[n];return function(e){for(n in r)a[n]=r[n](e);return a}}var vO=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,yO=new RegExp(vO.source,"g");function gO(e,t){var n,r,a,i=vO.lastIndex=yO.lastIndex=0,o=-1,c=[],s=[];for(e+="",t+="";(n=vO.exec(e))&&(r=yO.exec(t));)(a=r.index)>i&&(a=t.slice(i,a),c[o]?c[o]+=a:c[++o]=a),(n=n[0])===(r=r[0])?c[o]?c[o]+=r:c[++o]=r:(c[++o]=null,s.push({i:o,x:hO(n,r)})),i=yO.lastIndex;return i<t.length&&(a=t.slice(i),c[o]?c[o]+=a:c[++o]=a),c.length<2?s[0]?function(e){return function(t){return e(t)+""}}(s[0].x):function(e){return function(){return e}}(t):(t=s.length,function(e){for(var n,r=0;r<t;++r)c[(n=s[r]).i]=n.x(e);return c.join("")})}function bO(e,t){var n,r=typeof t;return null==t||"boolean"===r?cO(t):("number"===r?hO:"string"===r?(n=WS(t))?(t=n,lO):gO:t instanceof WS?lO:t instanceof Date?pO:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?fO:Array.isArray(t)?dO:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?mO:hO)(e,t)}function xO(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function wO(e,t){void 0===t&&(t=e,e=bO);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return i[t](e-t)}}function kO(e){return+e}var SO=[0,1];function OO(e){return e}function EO(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function AO(e,t,n){var r=e[0],a=e[1],i=t[0],o=t[1];return a<r?(r=EO(a,r),i=n(o,i)):(r=EO(r,a),i=n(i,o)),function(e){return i(r(e))}}function MO(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)a[o]=EO(e[o],e[o+1]),i[o]=n(t[o],t[o+1]);return function(t){var n=nS(e,t,1,r)-1;return i[n](a[n](t))}}function _O(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function jO(){var e,t,n,r,a,i,o=SO,c=SO,s=bO,u=OO;function l(){var e=Math.min(o.length,c.length);return u!==OO&&(u=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(o[0],o[e-1])),r=e>2?MO:AO,a=i=null,f}function f(t){return null==t||isNaN(t=+t)?n:(a||(a=r(o.map(e),c,s)))(e(u(t)))}return f.invert=function(n){return u(t((i||(i=r(c,o.map(e),hO)))(n)))},f.domain=function(e){return arguments.length?(o=Array.from(e,kO),l()):o.slice()},f.range=function(e){return arguments.length?(c=Array.from(e),l()):c.slice()},f.rangeRound=function(e){return c=Array.from(e),s=xO,l()},f.clamp=function(e){return arguments.length?(u=!!e||OO,l()):u!==OO},f.interpolate=function(e){return arguments.length?(s=e,l()):s},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,l()}}function PO(){return jO()(OO,OO)}function CO(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function DO(e){return(e=CO(Math.abs(e)))?e[1]:NaN}var TO,NO=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function IO(e){if(!(t=NO.exec(e)))throw new Error("invalid format: "+e);var t;return new RO({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function RO(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function FO(e,t){var n=CO(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}IO.prototype=RO.prototype,RO.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var zO={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>FO(100*e,t),r:FO,s:function(e,t){var n=CO(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(TO=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+CO(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function LO(e){return e}var HO,BO,UO,VO=Array.prototype.map,WO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function $O(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?LO:(t=VO.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,i=[],o=0,c=t[0],s=0;a>0&&c>0&&(s+c+1>r&&(c=Math.max(1,r-s)),i.push(e.substring(a-=c,a+c)),!((s+=c+1)>r));)c=t[o=(o+1)%t.length];return i.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",c=void 0===e.numerals?LO:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(VO.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function f(e){var t=(e=IO(e)).fill,n=e.align,f=e.sign,d=e.symbol,p=e.zero,h=e.width,m=e.comma,v=e.precision,y=e.trim,g=e.type;"n"===g?(m=!0,g="g"):zO[g]||(void 0===v&&(v=12),y=!0,g="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var b="$"===d?a:"#"===d&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",x="$"===d?i:/[%p]/.test(g)?s:"",w=zO[g],k=/[defgprs%]/.test(g);function S(e){var a,i,s,d=b,S=x;if("c"===g)S=w(e)+S,e="";else{var O=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:w(Math.abs(e),v),y&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r<n;++r)switch(e[r]){case".":a=t=r;break;case"0":0===a&&(a=r),t=r;break;default:if(!+e[r])break e;a>0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),O&&0==+e&&"+"!==f&&(O=!1),d=(O?"("===f?f:u:"-"===f||"("===f?"":f)+d,S=("s"===g?WO[8+TO/3]:"")+S+(O&&"("===f?")":""),k)for(a=-1,i=e.length;++a<i;)if(48>(s=e.charCodeAt(a))||s>57){S=(46===s?o+e.slice(a+1):e.slice(a))+S,e=e.slice(0,a);break}}m&&!p&&(e=r(e,1/0));var E=d.length+e.length+S.length,A=E<h?new Array(h-E+1).join(t):"";switch(m&&p&&(e=r(A+e,A.length?h-S.length:1/0),A=""),n){case"<":e=d+e+S+A;break;case"=":e=d+A+e+S;break;case"^":e=A.slice(0,E=A.length>>1)+d+e+S+A.slice(E);break;default:e=A+d+e+S}return c(e)}return v=void 0===v?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),S.toString=function(){return e+""},S}return{format:f,formatPrefix:function(e,t){var n=f(((e=IO(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(DO(t)/3))),a=Math.pow(10,-r),i=WO[8+r/3];return function(e){return n(a*e)+i}}}}function YO(e,t,n,r){var a,i=dS(e,t,n);switch((r=IO(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(a=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(DO(t)/3)))-DO(Math.abs(e)))}(i,o))||(r.precision=a),UO(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,DO(t)-DO(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=function(e){return Math.max(0,-DO(Math.abs(e)))}(i))||(r.precision=a-2*("%"===r.type))}return BO(r)}function qO(e){var t=e.domain;return e.ticks=function(e){var n=t();return lS(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return YO(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,a,i=t(),o=0,c=i.length-1,s=i[o],u=i[c],l=10;for(u<s&&(a=s,s=u,u=a,a=o,o=c,c=a);l-- >0;){if((a=fS(s,u,n))===r)return i[o]=s,i[c]=u,t(i);if(a>0)s=Math.floor(s/a)*a,u=Math.ceil(u/a)*a;else{if(!(a<0))break;s=Math.ceil(s*a)/a,u=Math.floor(u*a)/a}r=a}return e},e}function GO(){var e=PO();return e.copy=function(){return _O(e,GO())},xS.apply(e,arguments),qO(e)}function XO(e,t){var n,r=0,a=(e=e.slice()).length-1,i=e[r],o=e[a];return o<i&&(n=r,r=a,a=n,n=i,i=o,o=n),e[r]=t.floor(i),e[a]=t.ceil(o),e}function ZO(e){return Math.log(e)}function KO(e){return Math.exp(e)}function JO(e){return-Math.log(-e)}function QO(e){return-Math.exp(-e)}function eE(e){return isFinite(e)?+("1e"+e):e<0?0:e}function tE(e){return(t,n)=>-e(-t,n)}function nE(e){const t=e(ZO,KO),n=t.domain;let r,a,i=10;function o(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(i),a=function(e){return 10===e?eE:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=tE(r),a=tE(a),e(JO,QO)):e(ZO,KO),t}return t.base=function(e){return arguments.length?(i=+e,o()):i},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{const t=n();let o=t[0],c=t[t.length-1];const s=c<o;s&&([o,c]=[c,o]);let u,l,f=r(o),d=r(c);const p=null==e?10:+e;let h=[];if(!(i%1)&&d-f<p){if(f=Math.floor(f),d=Math.ceil(d),o>0){for(;f<=d;++f)for(u=1;u<i;++u)if(l=f<0?u/a(-f):u*a(f),!(l<o)){if(l>c)break;h.push(l)}}else for(;f<=d;++f)for(u=i-1;u>=1;--u)if(l=f>0?u/a(-f):u*a(f),!(l<o)){if(l>c)break;h.push(l)}2*h.length<p&&(h=lS(o,c,p))}else h=lS(f,d,Math.min(d-f,p)).map(a);return s?h.reverse():h},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===i?"s":","),"function"!=typeof n&&(i%1||null!=(n=IO(n)).precision||(n.trim=!0),n=BO(n)),e===1/0)return n;const o=Math.max(1,i*e/t.ticks().length);return e=>{let t=e/a(Math.round(r(e)));return t*i<i-.5&&(t*=i),t<=o?n(e):""}},t.nice=()=>n(XO(n(),{floor:e=>a(Math.floor(r(e))),ceil:e=>a(Math.ceil(r(e)))})),t}function rE(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function aE(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function iE(e){var t=1,n=e(rE(t),aE(t));return n.constant=function(n){return arguments.length?e(rE(t=+n),aE(t)):t},qO(n)}function oE(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function cE(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function sE(e){return e<0?-e*e:e*e}function uE(e){var t=e(OO,OO),n=1;function r(){return 1===n?e(OO,OO):.5===n?e(cE,sE):e(oE(n),oE(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},qO(t)}function lE(){var e=uE(jO());return e.copy=function(){return _O(e,lE()).exponent(e.exponent())},xS.apply(e,arguments),e}function fE(e){return Math.sign(e)*e*e}function dE(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}HO=$O({thousands:",",grouping:[3],currency:["$",""]}),BO=HO.format,UO=HO.formatPrefix;var pE=new Date,hE=new Date;function mE(e,t,n,r){function a(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return a.floor=function(t){return e(t=new Date(+t)),t},a.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},a.round=function(e){var t=a(e),n=a.ceil(e);return e-t<n-e?t:n},a.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},a.range=function(n,r,i){var o,c=[];if(n=a.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return c;do{c.push(o=new Date(+n)),t(n,i),e(n)}while(o<n&&n<r);return c},a.filter=function(n){return mE((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(a.count=function(t,r){return pE.setTime(+t),hE.setTime(+r),e(pE),e(hE),Math.floor(n(pE,hE))},a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?a.filter(r?function(t){return r(t)%e==0}:function(t){return a.count(0,t)%e==0}):a:null}),a}var vE=mE((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));vE.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?mE((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):vE:null};var yE=vE;vE.range;var gE=mE((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),bE=gE;gE.range;var xE=mE((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),wE=xE;xE.range;var kE=mE((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()})),SE=kE;kE.range;var OE=mE((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5),(e=>e.getDate()-1)),EE=OE;function AE(e){return mE((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}OE.range;var ME=AE(0),_E=AE(1),jE=AE(2),PE=AE(3),CE=AE(4),DE=AE(5),TE=AE(6);ME.range,_E.range,jE.range,PE.range,CE.range,DE.range,TE.range;var NE=mE((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),IE=NE;NE.range;var RE=mE((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));RE.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mE((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var FE=RE;RE.range;var zE=mE((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),LE=zE;zE.range;var HE=mE((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})),BE=HE;HE.range;var UE=mE((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1})),VE=UE;function WE(e){return mE((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}UE.range;var $E=WE(0),YE=WE(1),qE=WE(2),GE=WE(3),XE=WE(4),ZE=WE(5),KE=WE(6);$E.range,YE.range,qE.range,GE.range,XE.range,ZE.range,KE.range;var JE=mE((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),QE=JE;JE.range;var eA=mE((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));eA.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mE((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var tA=eA;function nA(e,t,n,r,a,i){const o=[[bE,1,1e3],[bE,5,5e3],[bE,15,15e3],[bE,30,3e4],[i,1,6e4],[i,5,3e5],[i,15,9e5],[i,30,18e5],[a,1,36e5],[a,3,108e5],[a,6,216e5],[a,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function c(t,n,r){const a=Math.abs(n-t)/r,i=Jk((([,,e])=>e)).right(o,a);if(i===o.length)return e.every(dS(t/31536e6,n/31536e6,r));if(0===i)return yE.every(Math.max(dS(t,n,r),1));const[c,s]=o[a/o[i-1][2]<o[i][2]/a?i-1:i];return c.every(s)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const a=n&&"function"==typeof n.range?n:c(e,t,n),i=a?a.range(e,+t+1):[];return r?i.reverse():i},c]}eA.range;const[rA,aA]=nA(tA,QE,$E,VE,BE,LE),[iA,oA]=nA(FE,IE,ME,EE,SE,wE);function cA(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function sA(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function uA(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var lA,fA,dA,pA={"-":"",_:" ",0:"0"},hA=/^\s*\d+/,mA=/^%/,vA=/[\\^$*+?|[\]().{}]/g;function yA(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function gA(e){return e.replace(vA,"\\$&")}function bA(e){return new RegExp("^(?:"+e.map(gA).join("|")+")","i")}function xA(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function wA(e,t,n){var r=hA.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function kA(e,t,n){var r=hA.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function SA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function OA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function EA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function AA(e,t,n){var r=hA.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function MA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function _A(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function jA(e,t,n){var r=hA.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function PA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function CA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function DA(e,t,n){var r=hA.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function TA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function NA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function IA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function RA(e,t,n){var r=hA.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function FA(e,t,n){var r=hA.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zA(e,t,n){var r=mA.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function LA(e,t,n){var r=hA.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function HA(e,t,n){var r=hA.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function BA(e,t){return yA(e.getDate(),t,2)}function UA(e,t){return yA(e.getHours(),t,2)}function VA(e,t){return yA(e.getHours()%12||12,t,2)}function WA(e,t){return yA(1+EE.count(FE(e),e),t,3)}function $A(e,t){return yA(e.getMilliseconds(),t,3)}function YA(e,t){return $A(e,t)+"000"}function qA(e,t){return yA(e.getMonth()+1,t,2)}function GA(e,t){return yA(e.getMinutes(),t,2)}function XA(e,t){return yA(e.getSeconds(),t,2)}function ZA(e){var t=e.getDay();return 0===t?7:t}function KA(e,t){return yA(ME.count(FE(e)-1,e),t,2)}function JA(e){var t=e.getDay();return t>=4||0===t?CE(e):CE.ceil(e)}function QA(e,t){return e=JA(e),yA(CE.count(FE(e),e)+(4===FE(e).getDay()),t,2)}function eM(e){return e.getDay()}function tM(e,t){return yA(_E.count(FE(e)-1,e),t,2)}function nM(e,t){return yA(e.getFullYear()%100,t,2)}function rM(e,t){return yA((e=JA(e)).getFullYear()%100,t,2)}function aM(e,t){return yA(e.getFullYear()%1e4,t,4)}function iM(e,t){var n=e.getDay();return yA((e=n>=4||0===n?CE(e):CE.ceil(e)).getFullYear()%1e4,t,4)}function oM(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+yA(t/60|0,"0",2)+yA(t%60,"0",2)}function cM(e,t){return yA(e.getUTCDate(),t,2)}function sM(e,t){return yA(e.getUTCHours(),t,2)}function uM(e,t){return yA(e.getUTCHours()%12||12,t,2)}function lM(e,t){return yA(1+VE.count(tA(e),e),t,3)}function fM(e,t){return yA(e.getUTCMilliseconds(),t,3)}function dM(e,t){return fM(e,t)+"000"}function pM(e,t){return yA(e.getUTCMonth()+1,t,2)}function hM(e,t){return yA(e.getUTCMinutes(),t,2)}function mM(e,t){return yA(e.getUTCSeconds(),t,2)}function vM(e){var t=e.getUTCDay();return 0===t?7:t}function yM(e,t){return yA($E.count(tA(e)-1,e),t,2)}function gM(e){var t=e.getUTCDay();return t>=4||0===t?XE(e):XE.ceil(e)}function bM(e,t){return e=gM(e),yA(XE.count(tA(e),e)+(4===tA(e).getUTCDay()),t,2)}function xM(e){return e.getUTCDay()}function wM(e,t){return yA(YE.count(tA(e)-1,e),t,2)}function kM(e,t){return yA(e.getUTCFullYear()%100,t,2)}function SM(e,t){return yA((e=gM(e)).getUTCFullYear()%100,t,2)}function OM(e,t){return yA(e.getUTCFullYear()%1e4,t,4)}function EM(e,t){var n=e.getUTCDay();return yA((e=n>=4||0===n?XE(e):XE.ceil(e)).getUTCFullYear()%1e4,t,4)}function AM(){return"+0000"}function MM(){return"%"}function _M(e){return+e}function jM(e){return Math.floor(+e/1e3)}function PM(e){return new Date(e)}function CM(e){return e instanceof Date?+e:+new Date(+e)}function DM(e,t,n,r,a,i,o,c,s,u){var l=PO(),f=l.invert,d=l.domain,p=u(".%L"),h=u(":%S"),m=u("%I:%M"),v=u("%I %p"),y=u("%a %d"),g=u("%b %d"),b=u("%B"),x=u("%Y");function w(e){return(s(e)<e?p:c(e)<e?h:o(e)<e?m:i(e)<e?v:r(e)<e?a(e)<e?y:g:n(e)<e?b:x)(e)}return l.invert=function(e){return new Date(f(e))},l.domain=function(e){return arguments.length?d(Array.from(e,CM)):d().map(PM)},l.ticks=function(t){var n=d();return e(n[0],n[n.length-1],null==t?10:t)},l.tickFormat=function(e,t){return null==t?w:u(t)},l.nice=function(e){var n=d();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?d(XO(n,e)):l},l.copy=function(){return _O(l,DM(e,t,n,r,a,i,o,c,s,u))},l}function TM(){var e,t,n,r,a,i=0,o=1,c=OO,s=!1;function u(t){return null==t||isNaN(t=+t)?a:c(0===n?.5:(t=(r(t)-e)*n,s?Math.max(0,Math.min(1,t)):t))}function l(e){return function(t){var n,r;return arguments.length?([n,r]=t,c=e(n,r),u):[c(0),c(1)]}}return u.domain=function(a){return arguments.length?([i,o]=a,e=r(i=+i),t=r(o=+o),n=e===t?0:1/(t-e),u):[i,o]},u.clamp=function(e){return arguments.length?(s=!!e,u):s},u.interpolator=function(e){return arguments.length?(c=e,u):c},u.range=l(bO),u.rangeRound=l(xO),u.unknown=function(e){return arguments.length?(a=e,u):a},function(a){return r=a,e=a(i),t=a(o),n=e===t?0:1/(t-e),u}}function NM(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function IM(){var e=uE(TM());return e.copy=function(){return NM(e,IM()).exponent(e.exponent())},wS.apply(e,arguments)}function RM(){var e,t,n,r,a,i,o,c=0,s=.5,u=1,l=1,f=OO,d=!1;function p(e){return isNaN(e=+e)?o:(e=.5+((e=+i(e))-t)*(l*e<l*t?r:a),f(d?Math.max(0,Math.min(1,e)):e))}function h(e){return function(t){var n,r,a;return arguments.length?([n,r,a]=t,f=wO(e,[n,r,a]),p):[f(0),f(.5),f(1)]}}return p.domain=function(o){return arguments.length?([c,s,u]=o,e=i(c=+c),t=i(s=+s),n=i(u=+u),r=e===t?0:.5/(t-e),a=t===n?0:.5/(n-t),l=t<e?-1:1,p):[c,s,u]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(f=e,p):f},p.range=h(bO),p.rangeRound=h(xO),p.unknown=function(e){return arguments.length?(o=e,p):o},function(o){return i=o,e=o(c),t=o(s),n=o(u),r=e===t?0:.5/(t-e),a=t===n?0:.5/(n-t),l=t<e?-1:1,p}}function FM(){var e=uE(RM());return e.copy=function(){return NM(e,FM()).exponent(e.exponent())},wS.apply(e,arguments)}!function(e){lA=function(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,o=e.shortDays,c=e.months,s=e.shortMonths,u=bA(a),l=xA(a),f=bA(i),d=xA(i),p=bA(o),h=xA(o),m=bA(c),v=xA(c),y=bA(s),g=xA(s),b={a:function(e){return o[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return s[e.getMonth()]},B:function(e){return c[e.getMonth()]},c:null,d:BA,e:BA,f:YA,g:rM,G:iM,H:UA,I:VA,j:WA,L:$A,m:qA,M:GA,p:function(e){return a[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:_M,s:jM,S:XA,u:ZA,U:KA,V:QA,w:eM,W:tM,x:null,X:null,y:nM,Y:aM,Z:oM,"%":MM},x={a:function(e){return o[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return s[e.getUTCMonth()]},B:function(e){return c[e.getUTCMonth()]},c:null,d:cM,e:cM,f:dM,g:SM,G:EM,H:sM,I:uM,j:lM,L:fM,m:pM,M:hM,p:function(e){return a[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:_M,s:jM,S:mM,u:vM,U:yM,V:bM,w:xM,W:wM,x:null,X:null,y:kM,Y:OM,Z:AM,"%":MM},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return O(e,t,n,r)},d:CA,e:CA,f:FA,g:MA,G:AA,H:TA,I:TA,j:DA,L:RA,m:PA,M:NA,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:jA,Q:LA,s:HA,S:IA,u:kA,U:SA,V:OA,w:wA,W:EA,x:function(e,t,r){return O(e,n,t,r)},X:function(e,t,n){return O(e,r,t,n)},y:MA,Y:AA,Z:_A,"%":zA};function k(e,t){return function(n){var r,a,i,o=[],c=-1,s=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++c<u;)37===e.charCodeAt(c)&&(o.push(e.slice(s,c)),null!=(a=pA[r=e.charAt(++c)])?r=e.charAt(++c):a="e"===r?" ":"0",(i=t[r])&&(r=i(n,a)),o.push(r),s=c+1);return o.push(e.slice(s,c)),o.join("")}}function S(e,t){return function(n){var r,a,i=uA(1900,void 0,1);if(O(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(a=(r=sA(uA(i.y,0,1))).getUTCDay(),r=a>4||0===a?YE.ceil(r):YE(r),r=VE.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(a=(r=cA(uA(i.y,0,1))).getDay(),r=a>4||0===a?_E.ceil(r):_E(r),r=EE.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),a="Z"in i?sA(uA(i.y,0,1)).getUTCDay():cA(uA(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(a+5)%7:i.w+7*i.U-(a+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,sA(i)):cA(i)}}function O(e,t,n,r){for(var a,i,o=0,c=t.length,s=n.length;o<c;){if(r>=s)return-1;if(37===(a=t.charCodeAt(o++))){if(a=t.charAt(o++),!(i=w[a in pA?t.charAt(o++):a])||(r=i(e,n,r))<0)return-1}else if(a!=n.charCodeAt(r++))return-1}return r}return b.x=k(n,b),b.X=k(r,b),b.c=k(t,b),x.x=k(n,x),x.X=k(r,x),x.c=k(t,x),{format:function(e){var t=k(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=S(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=k(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=S(e+="",!0);return t.toString=function(){return e},t}}}(e),fA=lA.format,lA.parse,dA=lA.utcFormat,lA.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var zM=Object.freeze({__proto__:null,scaleBand:OS,scalePoint:AS,scaleIdentity:function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,kO),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,kO):[0,1],qO(r)},scaleLinear:GO,scaleLog:function e(){const t=nE(jO()).domain([1,10]);return t.copy=()=>_O(t,e()).base(t.base()),xS.apply(t,arguments),t},scaleSymlog:function e(){var t=iE(jO());return t.copy=function(){return _O(t,e()).constant(t.constant())},xS.apply(t,arguments)},scaleOrdinal:SS,scaleImplicit:kS,scalePow:lE,scaleSqrt:function(){return lE.apply(null,arguments).exponent(.5)},scaleRadial:function e(){var t,n=PO(),r=[0,1],a=!1;function i(e){var r=dE(n(e));return isNaN(r)?t:a?Math.round(r):r}return i.invert=function(e){return n.invert(fE(e))},i.domain=function(e){return arguments.length?(n.domain(e),i):n.domain()},i.range=function(e){return arguments.length?(n.range((r=Array.from(e,kO)).map(fE)),i):r.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(a=!!e,i):a},i.clamp=function(e){return arguments.length?(n.clamp(e),i):n.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e(n.domain(),r).round(a).clamp(n.clamp()).unknown(t)},xS.apply(i,arguments),qO(i)},scaleQuantile:function e(){var t,n=[],r=[],a=[];function i(){var e=0,t=Math.max(1,r.length);for(a=new Array(t-1);++e<t;)a[e-1]=gS(n,e/t);return o}function o(e){return null==e||isNaN(e=+e)?t:r[nS(a,e)]}return o.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?a[t-1]:n[0],t<a.length?a[t]:n[n.length-1]]},o.domain=function(e){if(!arguments.length)return n.slice();n=[];for(let t of e)null==t||isNaN(t=+t)||n.push(t);return n.sort(Zk),i()},o.range=function(e){return arguments.length?(r=Array.from(e),i()):r.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return a.slice()},o.copy=function(){return e().domain(n).range(r).unknown(t)},xS.apply(o,arguments)},scaleQuantize:function e(){var t,n=0,r=1,a=1,i=[.5],o=[0,1];function c(e){return null!=e&&e<=e?o[nS(i,e,0,a)]:t}function s(){var e=-1;for(i=new Array(a);++e<a;)i[e]=((e+1)*r-(e-a)*n)/(a+1);return c}return c.domain=function(e){return arguments.length?([n,r]=e,n=+n,r=+r,s()):[n,r]},c.range=function(e){return arguments.length?(a=(o=Array.from(e)).length-1,s()):o.slice()},c.invertExtent=function(e){var t=o.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,i[0]]:t>=a?[i[a-1],r]:[i[t-1],i[t]]},c.unknown=function(e){return arguments.length?(t=e,c):c},c.thresholds=function(){return i.slice()},c.copy=function(){return e().domain([n,r]).range(o).unknown(t)},xS.apply(qO(c),arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],a=1;function i(e){return null!=e&&e<=e?r[nS(n,e,0,a)]:t}return i.domain=function(e){return arguments.length?(n=Array.from(e),a=Math.min(n.length,r.length-1),i):n.slice()},i.range=function(e){return arguments.length?(r=Array.from(e),a=Math.min(n.length,r.length-1),i):r.slice()},i.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e().domain(n).range(r).unknown(t)},xS.apply(i,arguments)},scaleTime:function(){return xS.apply(DM(iA,oA,FE,IE,ME,EE,SE,wE,bE,fA).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return xS.apply(DM(rA,aA,tA,QE,$E,VE,BE,LE,bE,dA).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},scaleSequential:function e(){var t=qO(TM()(OO));return t.copy=function(){return NM(t,e())},wS.apply(t,arguments)},scaleSequentialLog:function e(){var t=nE(TM()).domain([1,10]);return t.copy=function(){return NM(t,e()).base(t.base())},wS.apply(t,arguments)},scaleSequentialPow:IM,scaleSequentialSqrt:function(){return IM.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=iE(TM());return t.copy=function(){return NM(t,e()).constant(t.constant())},wS.apply(t,arguments)},scaleSequentialQuantile:function e(){var t=[],n=OO;function r(e){if(null!=e&&!isNaN(e=+e))return n((nS(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(Zk),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map(((e,r)=>n(r/(t.length-1))))},r.quantiles=function(e){return Array.from({length:e+1},((n,r)=>yS(t,r/e)))},r.copy=function(){return e(n).domain(t)},wS.apply(r,arguments)},scaleDiverging:function e(){var t=qO(RM()(OO));return t.copy=function(){return NM(t,e())},wS.apply(t,arguments)},scaleDivergingLog:function e(){var t=nE(RM()).domain([.1,1,10]);return t.copy=function(){return NM(t,e()).base(t.base())},wS.apply(t,arguments)},scaleDivergingPow:FM,scaleDivergingSqrt:function(){return FM.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=iE(RM());return t.copy=function(){return NM(t,e()).constant(t.constant())},wS.apply(t,arguments)},tickFormat:YO});function LM(e){return function(e){if(Array.isArray(e))return HM(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return HM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return HM(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function HM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function BM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BM(Object(n),!0).forEach((function(t){VM(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function VM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WM(e,t,n){return Pm(e)||Pm(t)?n:um(t)?Jf(e,t,n):hc(t)?t(e):n}function $M(e,t,n,r){var a=Zw(e,(function(e){return WM(e,t)}));if("number"===n){var i=a.filter((function(e){return sm(e)||parseFloat(e)}));return i.length?[Uw(i),zw(i)]:[1/0,-1/0]}return(r?a.filter((function(e){return!Pm(e)})):a).map((function(e){return um(e)||e instanceof Date?e:""}))}var YM=function(e){var t,n=e.type.displayName,r=e.props,a=r.stroke,i=r.fill;switch(n){case"Line":t=a;break;case"Area":case"Radar":t=a&&"none"!==a?a:i;break;default:t=i}return t},qM=function(e){var t,n=e.children,r=e.formattedGraphicalItems,a=e.legendWidth,i=e.legendContent,o=Ew(n,jm.displayName);return o?(t=o.props&&o.props.payload?o.props&&o.props.payload:"children"===i?(r||[]).reduce((function(e,t){var n=t.item,r=t.props,a=r.sectors||r.data||[];return e.concat(a.map((function(e){return{type:o.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}})))}),[]):(r||[]).map((function(e){var t=e.item,n=t.props,r=n.dataKey,a=n.name,i=n.legendType;return{inactive:n.hide,dataKey:r,type:o.props.iconType||i||"square",color:YM(t),value:a||r,payload:t.props}})),UM(UM(UM({},o.props),jm.getWithHeight(o,a)),{},{payload:t,item:o})):null},GM=function(e,t,n,r,a){var i=t.props.children,o=Ow(i,"ErrorBar").filter((function(e){return function(e,t,n){return!!Pm(t)||("horizontal"===e?"yAxis"===t:"vertical"===e||"x"===n?"xAxis"===t:"y"!==n||"yAxis"===t)}(r,a,e.props.direction)}));if(o&&o.length){var c=o.map((function(e){return e.props.dataKey}));return e.reduce((function(e,t){var r=WM(t,n,0),a=hu(r)?[Uw(r),zw(r)]:[r,r],i=c.reduce((function(e,n){var r=WM(t,n,0),i=a[0]-Math.abs(hu(r)?r[0]:r),o=a[1]+Math.abs(hu(r)?r[1]:r);return[Math.min(i,e[0]),Math.max(o,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},XM=function(e,t,n,r,a){var i=t.map((function(t){var i=t.props.dataKey;return"number"===n&&i&&GM(e,t,i,r)||$M(e,i,n,a)}));if("number"===n)return i.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]);var o={};return i.reduce((function(e,t){for(var n=0,r=t.length;n<r;n++)o[t[n]]||(o[t[n]]=!0,e.push(t[n]));return e}),[])},ZM=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},KM=function(e,t,n){var r,a,i=e.map((function(e){return e.coordinate===t&&(r=!0),e.coordinate===n&&(a=!0),e.coordinate}));return r||i.push(t),a||i.push(n),i},JM=function(e,t,n){if(!e)return null;var r=e.scale,a=e.duplicateDomain,i=e.type,o=e.range,c="scaleBand"===e.realScaleType?r.bandwidth()/2:2,s=(t||n)&&"category"===i&&r.bandwidth?r.bandwidth()/c:0;return s="angleAxis"===e.axisType?2*om(o[0]-o[1])*s:s,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map((function(e){var t=a?a.indexOf(e):e;return{coordinate:r(t)+s,value:e,offset:s}})):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map((function(e,t){return{coordinate:r(e)+s,value:e,index:t,offset:s}})):r.ticks&&!n?r.ticks(e.tickCount).map((function(e){return{coordinate:r(e)+s,value:e,offset:s}})):r.domain().map((function(e,t){return{coordinate:r(e)+s,value:a?a[e]:e,index:t,offset:s}}))},QM=function(e,t,n){var r;return hc(n)?r=n:hc(t)&&(r=t),hc(e)||r?function(t,n,a,i){hc(e)&&e(t,n,a,i),hc(r)&&r(t,n,a,i)}:null},e_={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var a=0,i=0,o=0;o<t;++o){var c=tm(e[o][n][1])?e[o][n][0]:e[o][n][1];c>=0?(e[o][n][0]=a,e[o][n][1]=a+c,a=e[o][n][1]):(e[o][n][0]=i,e[o][n][1]=i+c,i=e[o][n][1])}},expand:function(e,t){if((r=e.length)>0){for(var n,r,a,i=0,o=e[0].length;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}Eh(e,t)}},none:Eh,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,a=e[t[0]],i=a.length;r<i;++r){for(var o=0,c=0;o<n;++o)c+=e[o][r][1]||0;a[r][1]+=a[r][0]=-c/2}Eh(e,t)}},wiggle:function(e,t){if((a=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,a,i=0,o=1;o<r;++o){for(var c=0,s=0,u=0;c<a;++c){for(var l=e[t[c]],f=l[o][1]||0,d=(f-(l[o-1][1]||0))/2,p=0;p<c;++p){var h=e[t[p]];d+=(h[o][1]||0)-(h[o-1][1]||0)}s+=f,u+=d*f}n[o-1][1]+=n[o-1][0]=i,s&&(i-=u/s)}n[o-1][1]+=n[o-1][0]=i,Eh(e,t)}},positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var a=0,i=0;i<t;++i){var o=tm(e[i][n][1])?e[i][n][0]:e[i][n][1];o>=0?(e[i][n][0]=a,e[i][n][1]=a+o,a=e[i][n][1]):(e[i][n][0]=0,e[i][n][1]=0)}}},t_=function(e,t,n){var r=t.map((function(e){return e.props.dataKey})),a=function(){var e=Tp([]),t=Ah,n=Eh,r=Mh;function a(a){var i,o,c=Array.from(e.apply(this,arguments),_h),s=c.length,u=-1;for(const e of a)for(i=0,++u;i<s;++i)(c[i][u]=[0,+r(e,c[i].key,u,a)]).data=e;for(i=0,o=Lp(t(c));i<s;++i)c[o[i]].index=i;return n(c,o),c}return a.keys=function(t){return arguments.length?(e="function"==typeof t?t:Tp(Array.from(t)),a):e},a.value=function(e){return arguments.length?(r="function"==typeof e?e:Tp(+e),a):r},a.order=function(e){return arguments.length?(t=null==e?Ah:"function"==typeof e?e:Tp(Array.from(e)),a):t},a.offset=function(e){return arguments.length?(n=null==e?Eh:e,a):n},a}().keys(r).value((function(e,t){return+WM(e,t,0)})).order(Ah).offset(e_[n]);return a(e)},n_=function(e,t){var n=t.realScaleType,r=t.type,a=t.tickCount,i=t.originalDomain,o=t.allowDecimals,c=n||t.scale;if("auto"!==c&&"linear"!==c)return null;if(a&&"number"===r&&i&&("auto"===i[0]||"auto"===i[1])){var s=e.domain();if(!s.length)return null;var u=Gk(s,a,o);return e.domain(function(e,t){return"number"===t?[Uw(e),zw(e)]:e}(u,r)),{niceTicks:u}}if(a&&"number"===r){var l=e.domain();return{niceTicks:Xk(l,a,o)}}return null},r_=function(e){var t=e.axis,n=e.ticks,r=e.bandSize,a=e.entry,i=e.index,o=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!Pm(a[t.dataKey])){var c=mm(n,"value",a[t.dataKey]);if(c)return c.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var s=WM(a,Pm(o)?t.dataKey:o);return Pm(s)?null:t.scale(s)},a_=function(e,t,n){return Object.keys(e).reduce((function(r,a){var i=e[a].stackedData.reduce((function(e,r){var a=r.slice(t,n+1).reduce((function(e,t){return[Uw(t.concat([e[0]]).filter(sm)),zw(t.concat([e[1]]).filter(sm))]}),[1/0,-1/0]);return[Math.min(e[0],a[0]),Math.max(e[1],a[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}))},i_=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,o_=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,c_=function(e,t,n){if(hc(e))return e(t,n);if(!hu(e))return t;var r=[];if(sm(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(i_.test(e[0])){var a=+i_.exec(e[0])[1];r[0]=t[0]-a}else hc(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if(sm(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(o_.test(e[1])){var i=+o_.exec(e[1])[1];r[1]=t[1]+i}else hc(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},s_=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var a=Uy(t,(function(e){return e.coordinate})),i=1/0,o=1,c=a.length;o<c;o++){var s=a[o],u=a[o-1];i=Math.min((s.coordinate||0)-(u.coordinate||0),i)}return i===1/0?0:i}return n?void 0:0},u_=function(e,t,n){return e&&e.length?Dw(e,Jf(n,"type.defaultProps.domain"))?t:e:t},l_=function(e,t){var n=e.props,r=n.dataKey,a=n.name,i=n.unit,o=n.formatter,c=n.tooltipType,s=n.chartType;return UM(UM({},Bo(e)),{},{dataKey:r,unit:i,formatter:o,name:a||r,color:YM(e),value:WM(t,r),type:c,payload:t,chartType:s})};function f_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f_(Object(n),!0).forEach((function(t){p_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h_=Math.PI/180,m_=function(e){return 180*e/Math.PI},v_=function(e,t,n,r){return{x:e+Math.cos(-h_*r)*n,y:t+Math.sin(-h_*r)*n}},y_=function(e,t){var n=e.x,r=e.y,a=t.cx,i=t.cy,o=function(e,t){var n=e.x,r=e.y,a=t.x,i=t.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(r-i,2))}({x:n,y:r},{x:a,y:i});if(o<=0)return{radius:o};var c=(n-a)/o,s=Math.acos(c);return r>i&&(s=2*Math.PI-s),{radius:o,angle:m_(s),angleInRadian:s}},g_=function(e,t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),i=Math.floor(r/360);return e+360*Math.min(a,i)},b_=function(e,t){var n=e.x,r=e.y,a=y_({x:n,y:r},t),i=a.radius,o=a.angle,c=t.innerRadius,s=t.outerRadius;if(i<c||i>s)return!1;if(0===i)return!0;var u,l=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),a=Math.floor(n/360),i=Math.min(r,a);return{startAngle:t-360*i,endAngle:n-360*i}}(t),f=l.startAngle,d=l.endAngle,p=o;if(f<=d){for(;p>d;)p-=360;for(;p<f;)p+=360;u=p>=f&&p<=d}else{for(;p>f;)p-=360;for(;p<d;)p+=360;u=p>=d&&p<=f}return u?d_(d_({},t),{},{radius:i,angle:g_(p,t)}):null};function x_(e){return function(e){if(Array.isArray(e))return w_(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return w_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w_(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k_(Object(n),!0).forEach((function(t){O_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E_(){return E_=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},E_.apply(this,arguments)}var A_=function(e,n,r){var a,i,o=e.position,c=e.viewBox,s=e.offset,u=e.className,l=c,f=l.cx,d=l.cy,p=l.innerRadius,h=l.outerRadius,m=l.startAngle,v=l.endAngle,y=l.clockWise,g=(p+h)/2,b=function(e,t){return om(t-e)*Math.min(Math.abs(t-e),360)}(m,v),x=b>=0?1:-1;"insideStart"===o?(a=m+x*s,i=y):"insideEnd"===o?(a=v-x*s,i=!y):"end"===o&&(a=v+x*s,i=y),i=b<=0?i:!i;var w=v_(f,d,g,a),k=v_(f,d,g,a+359*(i?1:-1)),S="M".concat(w.x,",").concat(w.y,"\n A").concat(g,",").concat(g,",0,1,").concat(i?0:1,",\n ").concat(k.x,",").concat(k.y),O=Pm(e.id)?fm("recharts-radial-line-"):e.id;return t.createElement("text",E_({},r,{dominantBaseline:"central",className:Io("recharts-radial-bar-label",u)}),t.createElement("defs",null,t.createElement("path",{id:O,d:S})),t.createElement("textPath",{xlinkHref:"#".concat(O)},n))};function M_(e){var n,r=e.viewBox,a=e.position,i=e.value,c=e.children,s=e.content,l=e.className,f=void 0===l?"":l,d=e.textBreakAll;if(!r||Pm(i)&&Pm(c)&&!o(s)&&!hc(s))return null;if(o(s))return u(s,e);if(hc(s)){if(o(n=h(s,e)))return n}else n=function(e){var t=e.value,n=e.formatter,r=Pm(e.children)?t:e.children;return hc(n)?n(r):r}(e);var p=function(e){return sm(e.cx)}(r),m=Bo(e,!0);if(p&&("insideStart"===a||"insideEnd"===a||"end"===a))return A_(e,n,m);var v=p?function(e){var t=e.viewBox,n=e.offset,r=e.position,a=t,i=a.cx,o=a.cy,c=a.innerRadius,s=a.outerRadius,u=(a.startAngle+a.endAngle)/2;if("outside"===r){var l=v_(i,o,s+n,u),f=l.x;return{x:f,y:l.y,textAnchor:f>=i?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:i,y:o,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:i,y:o,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:i,y:o,textAnchor:"middle",verticalAnchor:"end"};var d=v_(i,o,(c+s)/2,u);return{x:d.x,y:d.y,textAnchor:"middle",verticalAnchor:"middle"}}(e):function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,a=e.position,i=t,o=i.x,c=i.y,s=i.width,u=i.height,l=u>=0?1:-1,f=l*r,d=l>0?"end":"start",p=l>0?"start":"end",h=s>=0?1:-1,m=h*r,v=h>0?"end":"start",y=h>0?"start":"end";if("top"===a)return S_(S_({},{x:o+s/2,y:c-l*r,textAnchor:"middle",verticalAnchor:d}),n?{height:Math.max(c-n.y,0),width:s}:{});if("bottom"===a)return S_(S_({},{x:o+s/2,y:c+u+f,textAnchor:"middle",verticalAnchor:p}),n?{height:Math.max(n.y+n.height-(c+u),0),width:s}:{});if("left"===a){var g={x:o-m,y:c+u/2,textAnchor:v,verticalAnchor:"middle"};return S_(S_({},g),n?{width:Math.max(g.x-n.x,0),height:u}:{})}if("right"===a){var b={x:o+s+m,y:c+u/2,textAnchor:y,verticalAnchor:"middle"};return S_(S_({},b),n?{width:Math.max(n.x+n.width-b.x,0),height:u}:{})}var x=n?{width:s,height:u}:{};return"insideLeft"===a?S_({x:o+m,y:c+u/2,textAnchor:y,verticalAnchor:"middle"},x):"insideRight"===a?S_({x:o+s-m,y:c+u/2,textAnchor:v,verticalAnchor:"middle"},x):"insideTop"===a?S_({x:o+s/2,y:c+f,textAnchor:"middle",verticalAnchor:p},x):"insideBottom"===a?S_({x:o+s/2,y:c+u-f,textAnchor:"middle",verticalAnchor:d},x):"insideTopLeft"===a?S_({x:o+m,y:c+f,textAnchor:y,verticalAnchor:p},x):"insideTopRight"===a?S_({x:o+s-m,y:c+f,textAnchor:v,verticalAnchor:p},x):"insideBottomLeft"===a?S_({x:o+m,y:c+u-f,textAnchor:y,verticalAnchor:d},x):"insideBottomRight"===a?S_({x:o+s-m,y:c+u-f,textAnchor:v,verticalAnchor:d},x):Ro(a)&&(sm(a.x)||cm(a.x))&&(sm(a.y)||cm(a.y))?S_({x:o+dm(a.x,s),y:c+dm(a.y,u),textAnchor:"end",verticalAnchor:"end"},x):S_({x:o+s/2,y:c+u/2,textAnchor:"middle",verticalAnchor:"middle"},x)}(e);return t.createElement(Yx,E_({className:Io("recharts-label",f)},m,v,{breakAll:d}),n)}M_.displayName="Label",M_.defaultProps={offset:5};var __=function(e){var t=e.cx,n=e.cy,r=e.angle,a=e.startAngle,i=e.endAngle,o=e.r,c=e.radius,s=e.innerRadius,u=e.outerRadius,l=e.x,f=e.y,d=e.top,p=e.left,h=e.width,m=e.height,v=e.clockWise,y=e.labelViewBox;if(y)return y;if(sm(h)&&sm(m)){if(sm(l)&&sm(f))return{x:l,y:f,width:h,height:m};if(sm(d)&&sm(p))return{x:d,y:p,width:h,height:m}}return sm(l)&&sm(f)?{x:l,y:f,width:0,height:0}:sm(t)&&sm(n)?{cx:t,cy:n,startAngle:a||r||0,endAngle:i||r||0,innerRadius:s||0,outerRadius:u||c||o||0,clockWise:v}:e.viewBox?e.viewBox:{}},j_=function(e,n){return e?!0===e?t.createElement(M_,{key:"label-implicit",viewBox:n}):um(e)?t.createElement(M_,{key:"label-implicit",viewBox:n,value:e}):o(e)?e.type===M_?u(e,{key:"label-implicit",viewBox:n}):t.createElement(M_,{key:"label-implicit",content:e,viewBox:n}):hc(e)?t.createElement(M_,{key:"label-implicit",content:e,viewBox:n}):Ro(e)?t.createElement(M_,E_({viewBox:n},e,{key:"label-implicit"})):null:null};M_.parseViewBox=__,M_.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=__(e),i=Ow(r,M_.displayName).map((function(e,n){return u(e,{viewBox:t||a,key:"label-".concat(n)})}));if(!n)return i;var o=j_(e.label,t||a);return[o].concat(x_(i))};var P_=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};function C_(e){return function(e){if(Array.isArray(e))return D_(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return D_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D_(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T_(){return T_=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},T_.apply(this,arguments)}function N_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N_(Object(n),!0).forEach((function(t){R_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F_(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var z_={valueAccessor:function(e){return hu(e.value)?P_(e.value):e.value}};function L_(e){var n=e.data,r=e.valueAccessor,a=e.dataKey,i=e.clockWise,o=e.id,c=e.textBreakAll,s=F_(e,["data","valueAccessor","dataKey","clockWise","id","textBreakAll"]);return n&&n.length?t.createElement(Xo,{className:"recharts-label-list"},n.map((function(e,n){var u=Pm(a)?r(e,n):WM(e&&e.payload,a),l=Pm(o)?{}:{id:"".concat(o,"-").concat(n)};return t.createElement(M_,T_({},Bo(e,!0),s,l,{parentViewBox:e.parentViewBox,index:n,value:u,textBreakAll:c,viewBox:M_.parseViewBox(Pm(i)?e:I_(I_({},e),{},{clockWise:i})),key:"label-".concat(n)}))}))):null}function H_(e,n){return e?!0===e?t.createElement(L_,{key:"labelList-implicit",data:n}):t.isValidElement(e)||hc(e)?t.createElement(L_,{key:"labelList-implicit",data:n,content:e}):Ro(e)?t.createElement(L_,T_({data:n},e,{key:"labelList-implicit"})):null:null}function B_(e){return B_="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},B_(e)}function U_(){return U_=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},U_.apply(this,arguments)}function V_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W_(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 $_(e,t){return $_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},$_(e,t)}function Y_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=G_(e);if(t){var a=G_(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return q_(this,n)}}function q_(e,t){return!t||"object"!==B_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function G_(e){return G_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},G_(e)}L_.displayName="LabelList",L_.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=Ow(r,L_.displayName).map((function(e,n){return u(e,{data:t,key:"labelList-".concat(n)})}));if(!n)return a;var i=H_(e.label,t);return[i].concat(C_(a))},L_.defaultProps=z_;var X_=function(e){var t=e.cx,n=e.cy,r=e.radius,a=e.angle,i=e.sign,o=e.isExternal,c=e.cornerRadius,s=e.cornerIsExternal,u=c*(o?1:-1)+r,l=Math.asin(c/u)/h_,f=s?a:a+i*l,d=s?a-i*l:a;return{center:v_(t,n,u,f),circleTangency:v_(t,n,r,f),lineTangency:v_(t,n,u*Math.cos(l*h_),d),theta:l}},Z_=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,a=e.outerRadius,i=e.startAngle,o=function(e,t){return om(t-e)*Math.min(Math.abs(t-e),359.999)}(i,e.endAngle),c=i+o,s=v_(t,n,a,i),u=v_(t,n,a,c),l="M ".concat(s.x,",").concat(s.y,"\n A ").concat(a,",").concat(a,",0,\n ").concat(+(Math.abs(o)>180),",").concat(+(i>c),",\n ").concat(u.x,",").concat(u.y,"\n ");if(r>0){var f=v_(t,n,r,i),d=v_(t,n,r,c);l+="L ".concat(d.x,",").concat(d.y,"\n A ").concat(r,",").concat(r,",0,\n ").concat(+(Math.abs(o)>180),",").concat(+(i<=c),",\n ").concat(f.x,",").concat(f.y," Z")}else l+="L ".concat(t,",").concat(n," Z");return l},K_=function(e){!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&&$_(e,t)}(o,c);var n,r,a,i=Y_(o);function o(){return V_(this,o),i.apply(this,arguments)}return n=o,r=[{key:"render",value:function(){var e=this.props,n=e.cx,r=e.cy,a=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,c=e.forceCornerRadius,s=e.cornerIsExternal,u=e.startAngle,l=e.endAngle,f=e.className;if(i<a||u===l)return null;var d,p=Io("recharts-sector",f),h=i-a,m=dm(o,h,0,!0);return d=m>0&&Math.abs(u-l)<360?function(e){var t=e.cx,n=e.cy,r=e.innerRadius,a=e.outerRadius,i=e.cornerRadius,o=e.forceCornerRadius,c=e.cornerIsExternal,s=e.startAngle,u=e.endAngle,l=om(u-s),f=X_({cx:t,cy:n,radius:a,angle:s,sign:l,cornerRadius:i,cornerIsExternal:c}),d=f.circleTangency,p=f.lineTangency,h=f.theta,m=X_({cx:t,cy:n,radius:a,angle:u,sign:-l,cornerRadius:i,cornerIsExternal:c}),v=m.circleTangency,y=m.lineTangency,g=m.theta,b=c?Math.abs(s-u):Math.abs(s-u)-h-g;if(b<0)return o?"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 "):Z_({cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:s,endAngle:u});var x="M ".concat(p.x,",").concat(p.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(l<0),",").concat(d.x,",").concat(d.y,"\n A").concat(a,",").concat(a,",0,").concat(+(b>180),",").concat(+(l<0),",").concat(v.x,",").concat(v.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(l<0),",").concat(y.x,",").concat(y.y,"\n ");if(r>0){var w=X_({cx:t,cy:n,radius:r,angle:s,sign:l,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),k=w.circleTangency,S=w.lineTangency,O=w.theta,E=X_({cx:t,cy:n,radius:r,angle:u,sign:-l,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),A=E.circleTangency,M=E.lineTangency,_=E.theta,j=c?Math.abs(s-u):Math.abs(s-u)-O-_;if(j<0&&0===i)return"".concat(x,"L").concat(t,",").concat(n,"Z");x+="L".concat(M.x,",").concat(M.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(l<0),",").concat(A.x,",").concat(A.y,"\n A").concat(r,",").concat(r,",0,").concat(+(j>180),",").concat(+(l>0),",").concat(k.x,",").concat(k.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(l<0),",").concat(S.x,",").concat(S.y,"Z")}else x+="L".concat(t,",").concat(n,"Z");return x}({cx:n,cy:r,innerRadius:a,outerRadius:i,cornerRadius:Math.min(m,h/2),forceCornerRadius:c,cornerIsExternal:s,startAngle:u,endAngle:l}):Z_({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:u,endAngle:l}),t.createElement("path",U_({},Bo(this.props,!0),{className:p,d:d}))}}],r&&W_(n.prototype,r),a&&W_(n,a),o}();function J_(e){return J_="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},J_(e)}function Q_(){return Q_=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},Q_.apply(this,arguments)}function ej(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ej(Object(n),!0).forEach((function(t){nj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ej(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nj(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aj(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 ij(e,t){return ij=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ij(e,t)}function oj(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sj(e);if(t){var a=sj(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cj(this,n)}}function cj(e,t){return!t||"object"!==J_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sj(e){return sj=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},sj(e)}K_.defaultProps={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1};var uj={curveBasisClosed:function(e){return new dh(e)},curveBasisOpen:function(e){return new ph(e)},curveBasis:function(e){return new fh(e)},curveLinearClosed:function(e){return new hh(e)},curveLinear:Bp,curveMonotoneX:function(e){return new bh(e)},curveMonotoneY:function(e){return new xh(e)},curveNatural:function(e){return new kh(e)},curveStep:function(e){return new Oh(e,.5)},curveStepAfter:function(e){return new Oh(e,1)},curveStepBefore:function(e){return new Oh(e,0)}},lj=function(e){return e.x===+e.x&&e.y===+e.y},fj=function(e){return e.x},dj=function(e){return e.y},pj=function(e){!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&&ij(e,t)}(o,c);var n,r,a,i=oj(o);function o(){return rj(this,o),i.apply(this,arguments)}return n=o,r=[{key:"getPath",value:function(){var e,t=this.props,n=t.type,r=t.points,a=t.baseLine,i=t.layout,o=t.connectNulls,c=function(e,t){if(hc(e))return e;var n="curve".concat(Mp(e));return"curveMonotone"===n&&t?uj["".concat(n).concat("vertical"===t?"Y":"X")]:uj[n]||Bp}(n,i),s=o?r.filter((function(e){return lj(e)})):r;if(hu(a)){var u=o?a.filter((function(e){return lj(e)})):a,l=s.map((function(e,t){return tj(tj({},e),{},{base:u[t]})}));return e="vertical"===i?$p().y(dj).x1(fj).x0((function(e){return e.base.x})):$p().x(fj).y1(dj).y0((function(e){return e.base.y})),e.defined(lj).curve(c),e(l)}return(e="vertical"===i&&sm(a)?$p().y(dj).x1(fj).x0(a):sm(a)?$p().x(fj).y1(dj).y0(a):Wp().x(fj).y(dj)).defined(lj).curve(c),e(s)}},{key:"render",value:function(){var e=this.props,n=e.className,r=e.points,a=e.path,i=e.pathRef;if(!(r&&r.length||a))return null;var o=r&&r.length?this.getPath():a;return t.createElement("path",Q_({},Bo(this.props),Uo(this.props),{className:Io("recharts-curve",n),d:o,ref:i}))}}],r&&aj(n.prototype,r),a&&aj(n,a),o}();function hj(e){return hj="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},hj(e)}function mj(){return mj=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},mj.apply(this,arguments)}function vj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yj(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 gj(e,t){return gj=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},gj(e,t)}function bj(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wj(e);if(t){var a=wj(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return xj(this,n)}}function xj(e,t){return!t||"object"!==hj(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wj(e){return wj=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wj(e)}pj.defaultProps={type:"linear",points:[],connectNulls:!1};var kj=function(e,t,n,r,a){var i,o=Math.min(Math.abs(n)/2,Math.abs(r)/2),c=r>=0?1:-1,s=n>=0?1:-1,u=r>=0&&n>=0||r<0&&n<0?1:0;if(o>0&&a instanceof Array){for(var l=[0,0,0,0],f=0;f<4;f++)l[f]=a[f]>o?o:a[f];i="M".concat(e,",").concat(t+c*l[0]),l[0]>0&&(i+="A ".concat(l[0],",").concat(l[0],",0,0,").concat(u,",").concat(e+s*l[0],",").concat(t)),i+="L ".concat(e+n-s*l[1],",").concat(t),l[1]>0&&(i+="A ".concat(l[1],",").concat(l[1],",0,0,").concat(u,",\n ").concat(e+n,",").concat(t+c*l[1])),i+="L ".concat(e+n,",").concat(t+r-c*l[2]),l[2]>0&&(i+="A ".concat(l[2],",").concat(l[2],",0,0,").concat(u,",\n ").concat(e+n-s*l[2],",").concat(t+r)),i+="L ".concat(e+s*l[3],",").concat(t+r),l[3]>0&&(i+="A ".concat(l[3],",").concat(l[3],",0,0,").concat(u,",\n ").concat(e,",").concat(t+r-c*l[3])),i+="Z"}else if(o>0&&a===+a&&a>0){var d=Math.min(o,a);i="M ".concat(e,",").concat(t+c*d,"\n A ").concat(d,",").concat(d,",0,0,").concat(u,",").concat(e+s*d,",").concat(t,"\n L ").concat(e+n-s*d,",").concat(t,"\n A ").concat(d,",").concat(d,",0,0,").concat(u,",").concat(e+n,",").concat(t+c*d,"\n L ").concat(e+n,",").concat(t+r-c*d,"\n A ").concat(d,",").concat(d,",0,0,").concat(u,",").concat(e+n-s*d,",").concat(t+r,"\n L ").concat(e+s*d,",").concat(t+r,"\n A ").concat(d,",").concat(d,",0,0,").concat(u,",").concat(e,",").concat(t+r-c*d," Z")}else i="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return i},Sj=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,a=t.x,i=t.y,o=t.width,c=t.height;if(Math.abs(o)>0&&Math.abs(c)>0){var s=Math.min(a,a+o),u=Math.max(a,a+o),l=Math.min(i,i+c),f=Math.max(i,i+c);return n>=s&&n<=u&&r>=l&&r<=f}return!1},Oj=function(e){!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&&gj(e,t)}(o,c);var n,r,a,i=bj(o);function o(){var e;vj(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=i.call.apply(i,[this].concat(n))).state={totalLength:-1},e.node=void 0,e}return n=o,r=[{key:"componentDidMount",value:function(){if(this.node&&this.node.getTotalLength)try{var e=this.node.getTotalLength();e&&this.setState({totalLength:e})}catch(e){}}},{key:"render",value:function(){var e=this,n=this.props,r=n.x,a=n.y,i=n.width,o=n.height,c=n.radius,s=n.className,u=this.state.totalLength,l=this.props,f=l.animationEasing,d=l.animationDuration,p=l.animationBegin,h=l.isAnimationActive,m=l.isUpdateAnimationActive;if(r!==+r||a!==+a||i!==+i||o!==+o||0===i||0===o)return null;var v=Io("recharts-rectangle",s);return m?t.createElement(Vv,{canBegin:u>0,from:{width:i,height:o,x:r,y:a},to:{width:i,height:o,x:r,y:a},duration:d,animationEasing:f,isActive:m},(function(n){var r=n.width,a=n.height,i=n.x,o=n.y;return t.createElement(Vv,{canBegin:u>0,from:"0px ".concat(-1===u?1:u,"px"),to:"".concat(u,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:d,isActive:h,easing:f},t.createElement("path",mj({},Bo(e.props,!0),{className:v,d:kj(i,o,r,a,c),ref:function(t){e.node=t}})))})):t.createElement("path",mj({},Bo(this.props,!0),{className:v,d:kj(r,a,i,o,c)}))}}],r&&yj(n.prototype,r),a&&yj(n,a),o}();function Ej(e){return Ej="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},Ej(e)}function Aj(){return Aj=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},Aj.apply(this,arguments)}function Mj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _j(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 jj(e,t){return jj=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},jj(e,t)}function Pj(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Dj(e);if(t){var a=Dj(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Cj(this,n)}}function Cj(e,t){return!t||"object"!==Ej(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dj(e){return Dj=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Dj(e)}Oj.defaultProps={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"};var Tj=function(e){!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&&jj(e,t)}(o,c);var n,r,a,i=Pj(o);function o(){return Mj(this,o),i.apply(this,arguments)}return n=o,r=[{key:"render",value:function(){var e=this.props,n=e.cx,r=e.cy,a=e.r,i=e.className,o=Io("recharts-dot",i);return n===+n&&r===+r&&a===+a?t.createElement("circle",Aj({},Bo(this.props),Uo(this.props),{className:o,cx:n,cy:r,r:a})):null}}],r&&_j(n.prototype,r),a&&_j(n,a),o}();function Nj(e){return Nj="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},Nj(e)}function Ij(){return Ij=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},Ij.apply(this,arguments)}function Rj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fj(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 zj(e,t){return zj=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},zj(e,t)}function Lj(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bj(e);if(t){var a=Bj(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Hj(this,n)}}function Hj(e,t){return!t||"object"!==Nj(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bj(e){return Bj=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Bj(e)}var Uj=function(e){!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&&zj(e,t)}(o,c);var n,r,a,i=Lj(o);function o(){return Rj(this,o),i.apply(this,arguments)}return n=o,r=[{key:"render",value:function(){var e=this.props,n=e.x,r=e.y,a=e.width,i=e.height,c=e.top,s=e.left,u=e.className;return sm(n)&&sm(r)&&sm(a)&&sm(i)&&sm(c)&&sm(s)?t.createElement("path",Ij({},Bo(this.props,!0),{className:Io("recharts-cross",u),d:o.getPath(n,r,a,i,c,s)})):null}}],a=[{key:"getPath",value:function(e,t,n,r,a,i){return"M".concat(e,",").concat(a,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n)}}],r&&Fj(n.prototype,r),a&&Fj(n,a),o}();Uj.defaultProps={x:0,y:0,top:0,left:0,width:0,height:0};var Vj=Math.ceil,Wj=Math.max;var $j=function(e,t,n,r){for(var a=-1,i=Wj(Vj((t-e)/(n||1)),0),o=Array(i);i--;)o[r?i:++a]=e,e+=n;return o},Yj=Pg;var qj=function(e){return e?Infinity===(e=Yj(e))||-Infinity===e?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},Gj=$j,Xj=zy,Zj=qj;var Kj=function(e){return function(t,n,r){return r&&"number"!=typeof r&&Xj(t,n,r)&&(n=r=void 0),t=Zj(t),void 0===n?(n=t,t=0):n=Zj(n),r=void 0===r?t<n?1:-1:Zj(r),Gj(t,n,r,e)}},Jj=Kj();function Qj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qj(Object(n),!0).forEach((function(t){tP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nP=["Webkit","Moz","O","ms"];function rP(e){return rP="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},rP(e)}function aP(){return aP=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},aP.apply(this,arguments)}function iP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iP(Object(n),!0).forEach((function(t){cP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sP(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 uP(e,t){return uP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},uP(e,t)}function lP(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pP(e);if(t){var a=pP(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return fP(this,n)}}function fP(e,t){return!t||"object"!==rP(t)&&"function"!=typeof t?dP(e):t}function dP(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pP(e){return pP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pP(e)}var hP=function(e){return e.changedTouches&&!!e.changedTouches.length},mP=function(e){!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&&uP(e,t)}(o,c);var n,r,a,i=lP(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).leaveTimer=void 0,t.travellerDragStartHandlers=void 0,t.handleDrag=function(e){t.leaveTimer&&(clearTimeout(t.leaveTimer),t.leaveTimer=null),t.state.isTravellerMoving?t.handleTravellerMove(e):t.state.isSlideMoving&&t.handleSlideDrag(e)},t.handleTouchMove=function(e){null!=e.changedTouches&&e.changedTouches.length>0&&t.handleDrag(e.changedTouches[0])},t.handleDragEnd=function(){t.setState({isTravellerMoving:!1,isSlideMoving:!1}),t.detachDragEndListener()},t.handleLeaveWrapper=function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=window.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=hP(e)?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:n.pageX}),t.attachDragEndListener()},t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind(dP(t),"startX"),endX:t.handleTravellerDragStart.bind(dP(t),"endX")},t.state={},t}return n=o,r=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var t=e.startX,n=e.endX,r=this.state.scaleValues,a=this.props,i=a.gap,c=a.data.length-1,s=Math.min(t,n),u=Math.max(t,n),l=o.getIndexInRange(r,s),f=o.getIndexInRange(r,u);return{startIndex:l-l%i,endIndex:f===c?c:f-f%i}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,a=t.dataKey,i=WM(n[e],a,e);return hc(r)?r(i,e):i}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,a=t.endX,i=this.props,o=i.x,c=i.width,s=i.travellerWidth,u=i.startIndex,l=i.endIndex,f=i.onChange,d=e.pageX-n;d>0?d=Math.min(d,o+c-s-a,o+c-s-r):d<0&&(d=Math.max(d,o-r,o-a));var p=this.getIndex({startX:r+d,endX:a+d});p.startIndex===u&&p.endIndex===l||!f||f(p),this.setState({startX:r+d,endX:a+d,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=hP(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t,n=this.state,r=n.brushMoveStartX,a=n.movingTravellerId,i=n.endX,o=n.startX,c=this.state[a],s=this.props,u=s.x,l=s.width,f=s.travellerWidth,d=s.onChange,p=s.gap,h=s.data,m={startX:this.state.startX,endX:this.state.endX},v=e.pageX-r;v>0?v=Math.min(v,u+l-f-c):v<0&&(v=Math.max(v,u-c)),m[a]=c+v;var y=this.getIndex(m),g=y.startIndex,b=y.endIndex;this.setState((cP(t={},a,c+v),cP(t,"brushMoveStartX",e.pageX),t),(function(){var e;d&&(e=h.length-1,("startX"===a&&(i>o?g%p==0:b%p==0)||i<o&&b===e||"endX"===a&&(i>o?b%p==0:g%p==0)||i>o&&b===e)&&d(y))}))}},{key:"renderBackground",value:function(){var e=this.props,n=e.x,r=e.y,a=e.width,i=e.height,o=e.fill,c=e.stroke;return t.createElement("rect",{stroke:c,fill:o,x:n,y:r,width:a,height:i})}},{key:"renderPanorama",value:function(){var e=this.props,n=e.x,r=e.y,a=e.width,i=e.height,o=e.data,c=e.children,u=e.padding,l=s.only(c);return l?t.cloneElement(l,{x:n,y:r,width:a,height:i,margin:u,compact:!0,data:o}):null}},{key:"renderTravellerLayer",value:function(e,n){var r=this.props,a=r.y,i=r.travellerWidth,c=r.height,s=r.traveller,u=Math.max(e,this.props.x),l=oP(oP({},Bo(this.props)),{},{x:u,y:a,width:i,height:c});return t.createElement(Xo,{className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[n],onTouchStart:this.travellerDragStartHandlers[n],style:{cursor:"col-resize"}},o.renderTraveller(s,l))}},{key:"renderSlide",value:function(e,n){var r=this.props,a=r.y,i=r.height,o=r.stroke,c=r.travellerWidth,s=Math.min(e,n)+c,u=Math.max(Math.abs(n-e)-c,0);return t.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:o,fillOpacity:.2,x:s,y:a,width:u,height:i})}},{key:"renderText",value:function(){var e=this.props,n=e.startIndex,r=e.endIndex,a=e.y,i=e.height,o=e.travellerWidth,c=e.stroke,s=this.state,u=s.startX,l=s.endX,f={pointerEvents:"none",fill:c};return t.createElement(Xo,{className:"recharts-brush-texts"},t.createElement(Yx,aP({textAnchor:"end",verticalAnchor:"middle",x:Math.min(u,l)-5,y:a+i/2},f),this.getTextOfTick(n)),t.createElement(Yx,aP({textAnchor:"start",verticalAnchor:"middle",x:Math.max(u,l)+o+5,y:a+i/2},f),this.getTextOfTick(r)))}},{key:"render",value:function(){var e=this.props,n=e.data,r=e.className,a=e.children,i=e.x,o=e.y,c=e.width,s=e.height,u=e.alwaysShowText,l=this.state,f=l.startX,d=l.endX,p=l.isTextActive,h=l.isSlideMoving,m=l.isTravellerMoving;if(!n||!n.length||!sm(i)||!sm(o)||!sm(c)||!sm(s)||c<=0||s<=0)return null;var v=Io("recharts-brush",r),y=1===t.Children.count(a),g=function(e,t){if(!e)return null;var n=e.replace(/(\w)/,(function(e){return e.toUpperCase()})),r=nP.reduce((function(e,r){return eP(eP({},e),{},tP({},r+n,t))}),{});return r[e]=t,r}("userSelect","none");return t.createElement(Xo,{className:v,onMouseMove:this.handleDrag,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:g},this.renderBackground(),y&&this.renderPanorama(),this.renderSlide(f,d),this.renderTravellerLayer(f,"startX"),this.renderTravellerLayer(d,"endX"),(p||h||m||u)&&this.renderText())}}],a=[{key:"renderDefaultTraveller",value:function(e){var n=e.x,r=e.y,a=e.width,i=e.height,o=e.stroke,c=Math.floor(r+i/2)-1;return t.createElement(t.Fragment,null,t.createElement("rect",{x:n,y:r,width:a,height:i,fill:o,stroke:"none"}),t.createElement("line",{x1:n+1,y1:c,x2:n+a-1,y2:c,fill:"none",stroke:"#fff"}),t.createElement("line",{x1:n+1,y1:c+2,x2:n+a-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,n){return t.isValidElement(e)?t.cloneElement(e,n):hc(e)?e(n):o.renderDefaultTraveller(n)}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.data,r=e.width,a=e.x,i=e.travellerWidth,o=e.updateId,c=e.startIndex,s=e.endIndex;if(n!==t.prevData||o!==t.prevUpdateId)return oP({prevData:n,prevTravellerWidth:i,prevUpdateId:o,prevX:a,prevWidth:r},n&&n.length?function(e){var t=e.data,n=e.startIndex,r=e.endIndex,a=e.x,i=e.width,o=e.travellerWidth;if(!t||!t.length)return{};var c=t.length,s=AS().domain(Jj(0,c)).range([a,a+i-o]),u=s.domain().map((function(e){return s(e)}));return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,startX:s(n),endX:s(r),scale:s,scaleValues:u}}({data:n,width:r,x:a,travellerWidth:i,startIndex:c,endIndex:s}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||a!==t.prevX||i!==t.prevTravellerWidth)){t.scale.range([a,a+r-i]);var u=t.scale.domain().map((function(e){return t.scale(e)}));return{prevData:n,prevTravellerWidth:i,prevUpdateId:o,prevX:a,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:u}}return null}},{key:"getIndexInRange",value:function(e,t){for(var n=0,r=e.length-1;r-n>1;){var a=Math.floor((n+r)/2);e[a]>t?r=a:n=a}return t>=e[r]?r:n}}],r&&sP(n.prototype,r),a&&sP(n,a),o}();mP.displayName="Brush",mP.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 vP=ty;var yP=Ks,gP=Dd,bP=function(e,t){var n;return vP(e,(function(e,r,a){return!(n=t(e,r,a))})),!!n},xP=hu,wP=zy;var kP=function(e,t,n){var r=xP(e)?yP:bP;return n&&wP(e,t,n)&&(t=void 0),r(e,gP(t))},SP=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t};var OP=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0},EP=ty;var AP=OP,MP=function(e,t){var n=!0;return EP(e,(function(e,r,a){return n=!!t(e,r,a)})),n},_P=Dd,jP=hu,PP=zy;var CP=function(e,t,n){var r=jP(e)?AP:MP;return n&&PP(e,t,n)&&(t=void 0),r(e,_P(t))},DP=Oy;var TP=function(e,t,n){"__proto__"==t&&DP?DP(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},NP=TP,IP=Qv,RP=Dd;var FP=function(e,t){var n={};return t=RP(t),IP(e,(function(e,r,a){NP(n,r,t(e,r,a))})),n};function zP(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 LP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LP(Object(n),!0).forEach((function(t){BP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function BP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var UP=function(e,t){var n=e.x,r=e.y,a=t.x,i=t.y;return{x:Math.min(n,a),y:Math.min(r,i),width:Math.abs(a-n),height:Math.abs(i-r)}},VP=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scale=void 0,this.scale=t}var t,n,r;return t=e,n=[{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}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=t.position;if(void 0!==e){if(r)switch(r){case"start":default:return this.scale(e);case"middle":var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a;case"end":var i=this.bandwidth?this.bandwidth():0;return this.scale(e)+i}if(n){var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],r=[{key:"create",value:function(t){return new e(t)}}],n&&zP(t.prototype,n),r&&zP(t,r),e}();VP.EPS=1e-4;var WP=function(e){var t=Object.keys(e).reduce((function(t,n){return HP(HP({},t),{},BP({},n,VP.create(e[n])))}),{});return HP(HP({},t),{},{apply:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.bandAware,a=n.position;return FP(e,(function(e,n){return t[n].apply(e,{bandAware:r,position:a})}))},isInRange:function(e){return CP(e,(function(e,n){return t[n].isInRange(e)}))}})};function $P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$P(Object(n),!0).forEach((function(t){qP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GP(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return XP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XP(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function XP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ZP(){return ZP=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},ZP.apply(this,arguments)}function KP(e){var n=e.x,r=e.y,a=e.segment,i=e.xAxis,o=e.yAxis,c=e.shape,s=e.className,u=e.alwaysShow,l=e.clipPathId;Pb(void 0===u,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=function(e,t,n,r,a){var i=a.viewBox,o=i.x,c=i.y,s=i.width,u=i.height,l=a.position;if(n){var f=a.y,d=a.yAxis.orientation,p=e.y.apply(f,{position:l});if(SP(a,"discard")&&!e.y.isInRange(p))return null;var h=[{x:o+s,y:p},{x:o,y:p}];return"left"===d?h.reverse():h}if(t){var m=a.x,v=a.xAxis.orientation,y=e.x.apply(m,{position:l});if(SP(a,"discard")&&!e.x.isInRange(y))return null;var g=[{x:y,y:c+u},{x:y,y:c}];return"top"===v?g.reverse():g}if(r){var b=a.segment.map((function(t){return e.apply(t,{position:l})}));return SP(a,"discard")&&kP(b,(function(t){return!e.isInRange(t)}))?null:b}return null}(WP({x:i.scale,y:o.scale}),um(n),um(r),a&&2===a.length,e);if(!f)return null;var d=GP(f,2),p=d[0],h=p.x,m=p.y,v=d[1],y=v.x,g=v.y,b=YP(YP({clipPath:SP(e,"hidden")?"url(#".concat(l,")"):void 0},Bo(e,!0)),{},{x1:h,y1:m,x2:y,y2:g});return t.createElement(Xo,{className:Io("recharts-reference-line",s)},function(e,n){return t.isValidElement(e)?t.cloneElement(e,n):hc(e)?e(n):t.createElement("line",ZP({},n,{className:"recharts-reference-line-line"}))}(c,b),M_.renderCallByParent(e,function(e){var t=e.x1,n=e.y1,r=e.x2,a=e.y2;return UP({x:t,y:n},{x:r,y:a})}({x1:h,y1:m,x2:y,y2:g})))}function JP(){return JP=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},JP.apply(this,arguments)}function QP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QP(Object(n),!0).forEach((function(t){tC(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}KP.displayName="ReferenceLine",KP.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"};function nC(e){var n=e.x,r=e.y,a=e.r,i=e.alwaysShow,o=e.clipPathId,c=um(n),s=um(r);if(Pb(void 0===i,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!s)return null;var u=function(e){var t=e.x,n=e.y,r=e.xAxis,a=e.yAxis,i=WP({x:r.scale,y:a.scale}),o=i.apply({x:t,y:n},{bandAware:!0});return SP(e,"discard")&&!i.isInRange(o)?null:o}(e);if(!u)return null;var l=u.x,f=u.y,d=e.shape,p=e.className,h=eC(eC({clipPath:SP(e,"hidden")?"url(#".concat(o,")"):void 0},Bo(e,!0)),{},{cx:l,cy:f});return t.createElement(Xo,{className:Io("recharts-reference-dot",p)},nC.renderDot(d,h),M_.renderCallByParent(e,{x:l-a,y:f-a,width:2*a,height:2*a}))}function rC(){return rC=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},rC.apply(this,arguments)}function aC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aC(Object(n),!0).forEach((function(t){oC(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}nC.displayName="ReferenceDot",nC.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1},nC.renderDot=function(e,n){return t.isValidElement(e)?t.cloneElement(e,n):hc(e)?e(n):t.createElement(Tj,JP({},n,{cx:n.cx,cy:n.cy,className:"recharts-reference-dot-dot"}))};function cC(e){var n=e.x1,r=e.x2,a=e.y1,i=e.y2,o=e.className,c=e.alwaysShow,s=e.clipPathId;Pb(void 0===c,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var u=um(n),l=um(r),f=um(a),d=um(i),p=e.shape;if(!(u||l||f||d||p))return null;var h=function(e,t,n,r,a){var i=a.x1,o=a.x2,c=a.y1,s=a.y2,u=a.xAxis,l=a.yAxis;if(!u||!l)return null;var f=WP({x:u.scale,y:l.scale}),d={x:e?f.x.apply(i,{position:"start"}):f.x.rangeMin,y:n?f.y.apply(c,{position:"start"}):f.y.rangeMin},p={x:t?f.x.apply(o,{position:"end"}):f.x.rangeMax,y:r?f.y.apply(s,{position:"end"}):f.y.rangeMax};return!SP(a,"discard")||f.isInRange(d)&&f.isInRange(p)?UP(d,p):null}(u,l,f,d,e);if(!h&&!p)return null;var m=SP(e,"hidden")?"url(#".concat(s,")"):void 0;return t.createElement(Xo,{className:Io("recharts-reference-area",o)},cC.renderRect(p,iC(iC({clipPath:m},Bo(e,!0)),h)),M_.renderCallByParent(e,h))}function sC(e){return sC="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},sC(e)}function uC(){return uC=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},uC.apply(this,arguments)}function lC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lC(Object(n),!0).forEach((function(t){dC(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pC(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function hC(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 mC(e,t){return mC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},mC(e,t)}function vC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gC(e);if(t){var a=gC(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return yC(this,n)}}function yC(e,t){return!t||"object"!==sC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gC(e){return gC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},gC(e)}cC.displayName="ReferenceArea",cC.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1},cC.renderRect=function(e,n){return t.isValidElement(e)?t.cloneElement(e,n):hc(e)?e(n):t.createElement(Oj,rC({},n,{className:"recharts-reference-area-rect"}))};var bC=function(e){!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&&mC(e,t)}(o,p);var n,r,a,i=vC(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).layerReference=void 0,t.state={fontSize:"",letterSpacing:""},t}return n=o,r=[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=pC(e,["viewBox"]),a=this.props,i=a.viewBox,o=pC(a,["viewBox"]);return!yw(n,i)||!yw(r,o)||!yw(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,n,r,a,i,o,c=this.props,s=c.x,u=c.y,l=c.width,f=c.height,d=c.orientation,p=c.tickSize,h=c.mirror,m=c.tickMargin,v=h?-1:1,y=e.tickSize||p,g=sm(e.tickCoord)?e.tickCoord:e.coordinate;switch(d){case"top":t=n=e.coordinate,o=(r=(a=u+ +!h*f)-v*y)-v*m,i=g;break;case"left":r=a=e.coordinate,i=(t=(n=s+ +!h*l)-v*y)-v*m,o=g;break;case"right":r=a=e.coordinate,i=(t=(n=s+ +h*l)+v*y)+v*m,o=g;break;default:t=n=e.coordinate,o=(r=(a=u+ +h*f)+v*y)+v*m,i=g}return{line:{x1:t,y1:r,x2:n,y2:a},tick:{x:i,y:o}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,n=t.orientation,r=t.mirror;switch(n){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,t=e.orientation,n=e.mirror,r="end";switch(t){case"left":case"right":r="middle";break;case"top":r=n?"start":"end";break;default:r=n?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var e=this.props,n=e.x,r=e.y,a=e.width,i=e.height,o=e.orientation,c=e.mirror,s=e.axisLine,u=fC(fC(fC({},Bo(this.props)),Bo(s)),{},{fill:"none"});if("top"===o||"bottom"===o){var l=+("top"===o&&!c||"bottom"===o&&c);u=fC(fC({},u),{},{x1:n,y1:r+l*i,x2:n+a,y2:r+l*i})}else{var f=+("left"===o&&!c||"right"===o&&c);u=fC(fC({},u),{},{x1:n+f*a,y1:r,x2:n+f*a,y2:r+i})}return t.createElement("line",uC({},u,{className:Io("recharts-cartesian-axis-line",Jf(s,"className"))}))}},{key:"renderTicks",value:function(e,n,r){var a=this,i=this.props,c=i.tickLine,s=i.stroke,u=i.tick,l=i.tickFormatter,f=i.unit,d=o.getTicks(fC(fC({},this.props),{},{ticks:e}),n,r),p=this.getTickTextAnchor(),h=this.getTickVerticalAnchor(),m=Bo(this.props),v=Bo(u),y=fC(fC({},m),{},{fill:"none"},Bo(c)),g=d.map((function(e,n){var r=a.getTickLineCoord(e),i=r.line,g=r.tick,b=fC(fC(fC(fC({textAnchor:p,verticalAnchor:h},m),{},{stroke:"none",fill:s},v),g),{},{index:n,payload:e,visibleTicksCount:d.length,tickFormatter:l});return t.createElement(Xo,uC({className:"recharts-cartesian-axis-tick",key:"tick-".concat(n)},Vo(a.props,e,n)),c&&t.createElement("line",uC({},y,i,{className:Io("recharts-cartesian-axis-tick-line",Jf(c,"className"))})),u&&o.renderTickItem(u,b,"".concat(hc(l)?l(e.value,n):e.value).concat(f||"")))}));return t.createElement("g",{className:"recharts-cartesian-axis-ticks"},g)}},{key:"render",value:function(){var e=this,n=this.props,r=n.axisLine,a=n.width,i=n.height,o=n.ticksGenerator,c=n.className;if(n.hide)return null;var s=this.props,u=s.ticks,l=pC(s,["ticks"]),f=u;return hc(o)&&(f=u&&u.length>0?o(this.props):o(l)),a<=0||i<=0||!f||!f.length?null:t.createElement(Xo,{className:Io("recharts-cartesian-axis",c),ref:function(t){e.layerReference=t}},r&&this.renderAxisLine(),this.renderTicks(f,this.state.fontSize,this.state.letterSpacing),M_.renderCallByParent(this.props))}}],a=[{key:"getTicks",value:function(e,t,n){var r=e.tick,a=e.ticks,i=e.viewBox,c=e.minTickGap,s=e.orientation,u=e.interval,l=e.tickFormatter,f=e.unit;return a&&a.length&&r?sm(u)||rg.isSsr?o.getNumberIntervalTicks(a,"number"==typeof u&&sm(u)?u:0):"preserveStartEnd"===u?o.getTicksStart({ticks:a,tickFormatter:l,viewBox:i,orientation:s,minTickGap:c,unit:f,fontSize:t,letterSpacing:n},!0):"preserveStart"===u?o.getTicksStart({ticks:a,tickFormatter:l,viewBox:i,orientation:s,minTickGap:c,unit:f,fontSize:t,letterSpacing:n}):o.getTicksEnd({ticks:a,tickFormatter:l,viewBox:i,orientation:s,minTickGap:c,unit:f,fontSize:t,letterSpacing:n}):[]}},{key:"getNumberIntervalTicks",value:function(e,t){return e.filter((function(e,n){return n%(t+1)==0}))}},{key:"getTicksStart",value:function(e,t){var n,r,a=e.ticks,i=e.tickFormatter,o=e.viewBox,c=e.orientation,s=e.minTickGap,u=e.unit,l=e.fontSize,f=e.letterSpacing,d=o.x,p=o.y,h=o.width,m=o.height,v="top"===c||"bottom"===c?"width":"height",y=(a||[]).slice(),g=u&&"width"===v?Mx(u,{fontSize:l,letterSpacing:f})[v]:0,b=y.length,x=b>=2?om(y[1].coordinate-y[0].coordinate):1;if(1===x?(n="width"===v?d:p,r="width"===v?d+h:p+m):(n="width"===v?d+h:p+m,r="width"===v?d:p),t){var w=a[b-1],k=hc(i)?i(w.value,b-1):w.value,S=Mx(k,{fontSize:l,letterSpacing:f})[v]+g,O=x*(w.coordinate+x*S/2-r);y[b-1]=w=fC(fC({},w),{},{tickCoord:O>0?w.coordinate-O*x:w.coordinate}),x*(w.tickCoord-x*S/2-n)>=0&&x*(w.tickCoord+x*S/2-r)<=0&&(r=w.tickCoord-x*(S/2+s),y[b-1]=fC(fC({},w),{},{isShow:!0}))}for(var E=t?b-1:b,A=0;A<E;A++){var M=y[A],_=hc(i)?i(M.value,A):M.value,j=Mx(_,{fontSize:l,letterSpacing:f})[v]+g;if(0===A){var P=x*(M.coordinate-x*j/2-n);y[A]=M=fC(fC({},M),{},{tickCoord:P<0?M.coordinate-P*x:M.coordinate})}else y[A]=M=fC(fC({},M),{},{tickCoord:M.coordinate});x*(M.tickCoord-x*j/2-n)>=0&&x*(M.tickCoord+x*j/2-r)<=0&&(n=M.tickCoord+x*(j/2+s),y[A]=fC(fC({},M),{},{isShow:!0}))}return y.filter((function(e){return e.isShow}))}},{key:"getTicksEnd",value:function(e){var t,n,r=e.ticks,a=e.tickFormatter,i=e.viewBox,o=e.orientation,c=e.minTickGap,s=e.unit,u=e.fontSize,l=e.letterSpacing,f=i.x,d=i.y,p=i.width,h=i.height,m="top"===o||"bottom"===o?"width":"height",v=s&&"width"===m?Mx(s,{fontSize:u,letterSpacing:l})[m]:0,y=(r||[]).slice(),g=y.length,b=g>=2?om(y[1].coordinate-y[0].coordinate):1;1===b?(t="width"===m?f:d,n="width"===m?f+p:d+h):(t="width"===m?f+p:d+h,n="width"===m?f:d);for(var x=g-1;x>=0;x--){var w=y[x],k=hc(a)?a(w.value,g-x-1):w.value,S=Mx(k,{fontSize:u,letterSpacing:l})[m]+v;if(x===g-1){var O=b*(w.coordinate+b*S/2-n);y[x]=w=fC(fC({},w),{},{tickCoord:O>0?w.coordinate-O*b:w.coordinate})}else y[x]=w=fC(fC({},w),{},{tickCoord:w.coordinate});b*(w.tickCoord-b*S/2-t)>=0&&b*(w.tickCoord+b*S/2-n)<=0&&(n=w.tickCoord-b*(S/2+c),y[x]=fC(fC({},w),{},{isShow:!0}))}return y.filter((function(e){return e.isShow}))}},{key:"renderTickItem",value:function(e,n,r){return t.isValidElement(e)?t.cloneElement(e,n):hc(e)?e(n):t.createElement(Yx,uC({},n,{className:"recharts-cartesian-axis-tick-value"}),r)}}],r&&hC(n.prototype,r),a&&hC(n,a),o}();function xC(e){return xC="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},xC(e)}function wC(){return wC=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},wC.apply(this,arguments)}function kC(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function SC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function OC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SC(Object(n),!0).forEach((function(t){EC(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function EC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MC(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 _C(e,t){return _C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_C(e,t)}function jC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CC(e);if(t){var a=CC(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return PC(this,n)}}function PC(e,t){return!t||"object"!==xC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function CC(e){return CC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},CC(e)}bC.displayName="CartesianAxis",bC.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 DC=function(e){!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&&_C(e,t)}(o,c);var n,r,a,i=jC(o);function o(){return AC(this,o),i.apply(this,arguments)}return n=o,r=[{key:"renderHorizontal",value:function(e){var n=this,r=this.props,a=r.x,i=r.width,c=r.horizontal;if(!e||!e.length)return null;var s=e.map((function(e,t){var r=OC(OC({},n.props),{},{x1:a,y1:e,x2:a+i,y2:e,key:"line-".concat(t),index:t});return o.renderLineItem(c,r)}));return t.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}},{key:"renderVertical",value:function(e){var n=this,r=this.props,a=r.y,i=r.height,c=r.vertical;if(!e||!e.length)return null;var s=e.map((function(e,t){var r=OC(OC({},n.props),{},{x1:e,y1:a,x2:e,y2:a+i,key:"line-".concat(t),index:t});return o.renderLineItem(c,r)}));return t.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}},{key:"renderVerticalStripes",value:function(e){var n=this.props.verticalFill;if(!n||!n.length)return null;var r=this.props,a=r.fillOpacity,i=r.x,o=r.y,c=r.width,s=r.height,u=e.slice().sort((function(e,t){return e-t}));i!==u[0]&&u.unshift(0);var l=u.map((function(e,r){var l=u[r+1]?u[r+1]-e:i+c-e;if(l<=0)return null;var f=r%n.length;return t.createElement("rect",{key:"react-".concat(r),x:Math.round(e+i-i),y:o,width:l,height:s,stroke:"none",fill:n[f],fillOpacity:a,className:"recharts-cartesian-grid-bg"})}));return t.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},l)}},{key:"renderHorizontalStripes",value:function(e){var n=this.props.horizontalFill;if(!n||!n.length)return null;var r=this.props,a=r.fillOpacity,i=r.x,o=r.y,c=r.width,s=r.height,u=e.slice().sort((function(e,t){return e-t}));o!==u[0]&&u.unshift(0);var l=u.map((function(e,r){var l=u[r+1]?u[r+1]-e:o+s-e;if(l<=0)return null;var f=r%n.length;return t.createElement("rect",{key:"react-".concat(r),y:Math.round(e+o-o),x:i,height:l,width:c,stroke:"none",fill:n[f],fillOpacity:a,className:"recharts-cartesian-grid-bg"})}));return t.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},l)}},{key:"renderBackground",value:function(){var e=this.props.fill;if(!e||"none"===e)return null;var n=this.props,r=n.fillOpacity,a=n.x,i=n.y,o=n.width,c=n.height;return t.createElement("rect",{x:a,y:i,width:o,height:c,stroke:"none",fill:e,fillOpacity:r,className:"recharts-cartesian-grid-bg"})}},{key:"render",value:function(){var e=this.props,n=e.x,r=e.y,a=e.width,i=e.height,o=e.horizontal,c=e.vertical,s=e.horizontalCoordinatesGenerator,u=e.verticalCoordinatesGenerator,l=e.xAxis,f=e.yAxis,d=e.offset,p=e.chartWidth,h=e.chartHeight;if(!sm(a)||a<=0||!sm(i)||i<=0||!sm(n)||n!==+n||!sm(r)||r!==+r)return null;var m=this.props,v=m.horizontalPoints,y=m.verticalPoints;return v&&v.length||!hc(s)||(v=s({yAxis:f,width:p,height:h,offset:d})),y&&y.length||!hc(u)||(y=u({xAxis:l,width:p,height:h,offset:d})),t.createElement("g",{className:"recharts-cartesian-grid"},this.renderBackground(),o&&this.renderHorizontal(v),c&&this.renderVertical(y),o&&this.renderHorizontalStripes(v),c&&this.renderVerticalStripes(y))}}],a=[{key:"renderLineItem",value:function(e,n){var r;if(t.isValidElement(e))r=t.cloneElement(e,n);else if(hc(e))r=e(n);else{var a=n.x1,i=n.y1,o=n.x2,c=n.y2,s=n.key,u=kC(n,["x1","y1","x2","y2","key"]);r=t.createElement("line",wC({},Bo(u),{x1:a,y1:i,x2:o,y2:c,fill:"none",key:s}))}return r}}],r&&MC(n.prototype,r),a&&MC(n,a),o}();function TC(){return TC=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},TC.apply(this,arguments)}function NC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return IC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IC(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function RC(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function FC(e){var n=e.offset,r=e.layout,a=e.width,i=e.dataKey,o=e.data,c=e.dataPointFormatter,s=e.xAxis,u=e.yAxis,l=RC(e,["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"]),f=Bo(l),d=o.map((function(e,o){var l=c(e,i),d=l.x,p=l.y,h=l.value,m=l.errorVal;if(!m)return null;var v,y,g=[];if(Array.isArray(m)){var b=NC(m,2);v=b[0],y=b[1]}else v=y=m;if("vertical"===r){var x=s.scale,w=p+n,k=w+a,S=w-a,O=x(h-v),E=x(h+y);g.push({x1:E,y1:k,x2:E,y2:S}),g.push({x1:O,y1:w,x2:E,y2:w}),g.push({x1:O,y1:k,x2:O,y2:S})}else if("horizontal"===r){var A=u.scale,M=d+n,_=M-a,j=M+a,P=A(h-v),C=A(h+y);g.push({x1:_,y1:C,x2:j,y2:C}),g.push({x1:M,y1:P,x2:M,y2:C}),g.push({x1:_,y1:P,x2:j,y2:P})}return t.createElement(Xo,TC({className:"recharts-errorBar",key:"bar-".concat(o)},f),g.map((function(e,n){return t.createElement("line",TC({},e,{key:"line-".concat(n)}))})))}));return t.createElement(Xo,{className:"recharts-errorBars"},d)}function zC(e){return zC="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},zC(e)}function LC(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function HC(){return HC=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},HC.apply(this,arguments)}function BC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BC(Object(n),!0).forEach((function(t){VC(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function VC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WC(e){return function(e){if(Array.isArray(e))return $C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return $C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $C(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function YC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qC(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 GC(e,t){return GC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},GC(e,t)}function XC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=KC(e);if(t){var a=KC(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ZC(this,n)}}function ZC(e,t){return!t||"object"!==zC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function KC(e){return KC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},KC(e)}DC.displayName="CartesianGrid",DC.defaultProps={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]},FC.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"},FC.displayName="ErrorBar";var JC=function(e){!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&&GC(e,t)}(o,c);var n,r,a,i=XC(o);function o(){var e;YC(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=i.call.apply(i,[this].concat(n))).mainCurve=void 0,e.state={isAnimationFinished:!0,totalLength:0},e.getStrokeDasharray=function(e,t,n){for(var r=n.reduce((function(e,t){return e+t})),a=Math.floor(e/r),i=e%r,c=t-e,s=[],u=0,l=0;;l+=n[u],++u)if(l+n[u]>i){s=[].concat(WC(n.slice(0,u)),[i-l]);break}var f=s.length%2==0?[0,c]:[c];return[].concat(WC(o.repeat(n,a)),WC(s),f).map((function(e){return"".concat(e,"px")})).join(", ")},e.id=fm("recharts-line-"),e.pathRef=function(t){e.mainCurve=t},e.handleAnimationEnd=function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()},e.handleAnimationStart=function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()},e}return n=o,r=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}},{key:"renderErrorBar",value:function(){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var e=this.props,n=e.points,r=e.xAxis,a=e.yAxis,i=e.layout,o=e.children,c=Ow(o,FC.displayName);if(!c)return null;function s(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:WM(e.payload,t)}}return c.map((function(e,o){return t.cloneElement(e,{key:"bar-".concat(o),data:n,xAxis:r,yAxis:a,layout:i,dataPointFormatter:s})}))}},{key:"renderDots",value:function(e,n){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,a=r.dot,i=r.points,c=r.dataKey,s=Bo(this.props),u=Bo(a,!0),l=i.map((function(e,t){var n=UC(UC(UC({key:"dot-".concat(t),r:3},s),u),{},{value:e.value,dataKey:c,cx:e.x,cy:e.y,index:t,payload:e.payload});return o.renderDotItem(a,n)})),f={clipPath:e?"url(#clipPath-".concat(n,")"):null};return t.createElement(Xo,HC({className:"recharts-line-dots",key:"dots"},f),l)}},{key:"renderCurveStatically",value:function(e,n,r,a){var i=this.props,o=i.type,c=i.layout,s=i.connectNulls;i.ref;var u=LC(i,["type","layout","connectNulls","ref"]),l=UC(UC(UC({},Bo(u,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:n?"url(#clipPath-".concat(r,")"):null,points:e},a),{},{type:o,layout:c,connectNulls:s});return t.createElement(pj,HC({},l,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,n){var r=this,a=this.props,i=a.points,o=a.strokeDasharray,c=a.isAnimationActive,s=a.animationBegin,u=a.animationDuration,l=a.animationEasing,f=a.animationId,d=a.animateNewValues,p=a.width,h=a.height,m=this.state,v=m.prevPoints,y=m.totalLength;return t.createElement(Vv,{begin:s,duration:u,isActive:c,easing:l,from:{t:0},to:{t:1},key:"line-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(t){var a=t.t;if(v){var c=v.length/i.length,s=i.map((function(e,t){var n=Math.floor(t*c);if(v[n]){var r=v[n],i=hm(r.x,e.x),o=hm(r.y,e.y);return UC(UC({},e),{},{x:i(a),y:o(a)})}if(d){var s=hm(2*p,e.x),u=hm(h/2,e.y);return UC(UC({},e),{},{x:s(a),y:u(a)})}return UC(UC({},e),{},{x:e.x,y:e.y})}));return r.renderCurveStatically(s,e,n)}var u,l=hm(0,y)(a);if(o){var f="".concat(o).split(/[,\s]+/gim).map((function(e){return parseFloat(e)}));u=r.getStrokeDasharray(l,y,f)}else u="".concat(l,"px ").concat(y-l,"px");return r.renderCurveStatically(i,e,n,{strokeDasharray:u})}))}},{key:"renderCurve",value:function(e,t){var n=this.props,r=n.points,a=n.isAnimationActive,i=this.state,o=i.prevPoints,c=i.totalLength;return a&&r&&r.length&&(!o&&c>0||!Dw(o,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:"render",value:function(){var e=this.props,n=e.hide,r=e.dot,a=e.points,i=e.className,o=e.xAxis,c=e.yAxis,s=e.top,u=e.left,l=e.width,f=e.height,d=e.isAnimationActive,p=e.id;if(n||!a||!a.length)return null;var h=this.state.isAnimationFinished,m=1===a.length,v=Io("recharts-line",i),y=o&&o.allowDataOverflow||c&&c.allowDataOverflow,g=Pm(p)?this.id:p;return t.createElement(Xo,{className:v},y?t.createElement("defs",null,t.createElement("clipPath",{id:"clipPath-".concat(g)},t.createElement("rect",{x:u,y:s,width:l,height:f}))):null,!m&&this.renderCurve(y,g),this.renderErrorBar(),(m||r)&&this.renderDots(y,g),(!d||h)&&L_.renderCallByParent(this.props,a))}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var n=e.length%2!=0?[].concat(WC(e),[0]):e,r=[],a=0;a<t;++a)r=[].concat(WC(r),WC(n));return r}},{key:"renderDotItem",value:function(e,n){var r;if(t.isValidElement(e))r=t.cloneElement(e,n);else if(hc(e))r=e(n);else{var a=Io("recharts-line-dot",e?e.className:"");r=t.createElement(Tj,HC({},n,{className:a}))}return r}}],r&&qC(n.prototype,r),a&&qC(n,a),o}();JC.displayName="Line",JC.defaultProps={xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!rg.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1},JC.getComposedData=function(e){var t=e.props,n=e.xAxis,r=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,c=e.bandSize,s=e.displayedData,u=e.offset,l=t.layout;return UC({points:s.map((function(e,t){var s=WM(e,o);return"horizontal"===l?{x:r_({axis:n,ticks:a,bandSize:c,entry:e,index:t}),y:Pm(s)?null:r.scale(s),value:s,payload:e}:{x:Pm(s)?null:n.scale(s),y:r_({axis:r,ticks:i,bandSize:c,entry:e,index:t}),value:s,payload:e}})),layout:l},u)};var QC=function(){return null};QC.displayName="XAxis",QC.defaultProps={allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",domain:[0,"auto"],padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0};var eD=function(){return null};eD.displayName="YAxis",eD.defaultProps={allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",domain:[0,"auto"],padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1};var tD=Dd,nD=ml,rD=bl;var aD=function(e){return function(t,n,r){var a=Object(t);if(!nD(t)){var i=tD(n);t=rD(t),n=function(e){return i(a[e],e,a)}}var o=e(t,n,r);return o>-1?a[i?t[o]:o]:void 0}},iD=qj;var oD=Td,cD=Dd,sD=function(e){var t=iD(e),n=t%1;return t==t?n?t-n:t:0},uD=Math.max;var lD=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=null==n?0:sD(n);return a<0&&(a=uD(r+a,0)),oD(e,cD(t),a)},fD=aD(lD),dD=Rg,pD=Ro;var hD=function(e,t,n){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return pD(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),dD(e,t,{leading:r,maxWait:t,trailing:a})},mD=fc,vD=Au;var yD=function(e){return!0===e||!1===e||vD(e)&&"[object Boolean]"==mD(e)},gD=function(e,t,n,r,a){var i=Ow(e,KP.displayName),o=Ow(e,nC.displayName),c=i.concat(o),s=Ow(e,cC.displayName),u="".concat(r,"Id"),l=r[0],f=t;if(c.length&&(f=c.reduce((function(e,t){if(t.props[u]===n&&SP(t.props,"extendDomain")&&sm(t.props[l])){var r=t.props[l];return[Math.min(e[0],r),Math.max(e[1],r)]}return e}),f)),s.length){var d="".concat(l,"1"),p="".concat(l,"2");f=s.reduce((function(e,t){if(t.props[u]===n&&SP(t.props,"extendDomain")&&sm(t.props[d])&&sm(t.props[p])){var r=t.props[d],a=t.props[p];return[Math.min(e[0],r,a),Math.max(e[1],r,a)]}return e}),f)}return a&&a.length&&(f=a.reduce((function(e,t){return sm(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e}),f)),f},bD={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var c=new a(r,i||e,o),s=n?n+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],c]:e._events[s].push(c):(e._events[s]=c,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function c(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),c.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},c.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,i=r.length,o=new Array(i);a<i;a++)o[a]=r[a].fn;return o},c.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},c.prototype.emit=function(e,t,r,a,i,o){var c=n?n+e:e;if(!this._events[c])return!1;var s,u,l=this._events[c],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,a),!0;case 5:return l.fn.call(l.context,t,r,a,i),!0;case 6:return l.fn.call(l.context,t,r,a,i,o),!0}for(u=1,s=new Array(f-1);u<f;u++)s[u-1]=arguments[u];l.fn.apply(l.context,s)}else{var d,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),f){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,a);break;default:if(!s)for(d=1,s=new Array(f-1);d<f;d++)s[d-1]=arguments[d];l[u].fn.apply(l[u].context,s)}}return!0},c.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,r,a){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return o(this,i),this;var c=this._events[i];if(c.fn)c.fn!==t||a&&!c.once||r&&c.context!==r||o(this,i);else{for(var s=0,u=[],l=c.length;s<l;s++)(c[s].fn!==t||a&&!c[s].once||r&&c[s].context!==r)&&u.push(c[s]);u.length?this._events[i]=1===u.length?u[0]:u:o(this,i)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c}(bD);var xD=new(0,bD.exports);xD.setMaxListeners&&xD.setMaxListeners(10);var wD="recharts.syncMouseEvents";function kD(e){return kD="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},kD(e)}function SD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw i}}return n}(e,t)||TD(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function OD(){return OD=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},OD.apply(this,arguments)}function ED(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function AD(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 MD(e,t){return MD=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},MD(e,t)}function _D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CD(e);if(t){var a=CD(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return jD(this,n)}}function jD(e,t){return!t||"object"!==kD(t)&&"function"!=typeof t?PD(e):t}function PD(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CD(e){return CD=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},CD(e)}function DD(e){return function(e){if(Array.isArray(e))return ND(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||TD(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function TD(e,t){if(e){if("string"==typeof e)return ND(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ND(e,t):void 0}}function ND(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ID(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function RD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ID(Object(n),!0).forEach((function(t){FD(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ID(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function FD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zD={xAxis:["bottom","top"],yAxis:["left","right"]},LD={x:0,y:0},HD=Number.isFinite?Number.isFinite:isFinite,BD="function"==typeof requestAnimationFrame?requestAnimationFrame:"function"==typeof setImmediate?setImmediate:setTimeout,UD="function"==typeof cancelAnimationFrame?cancelAnimationFrame:"function"==typeof clearImmediate?clearImmediate:clearTimeout,VD=function(e,t,n){var r=t.graphicalItems,a=t.dataStartIndex,i=t.dataEndIndex,o=(r||[]).reduce((function(e,t){var n=t.props.data;return n&&n.length?[].concat(DD(e),DD(n)):e}),[]);return o&&o.length>0?o:n&&n.props&&n.props.data&&n.props.data.length>0?n.props.data:e&&e.length&&sm(a)&&sm(i)?e.slice(a,i+1):[]},WD=function(e,t,n,r){var a=e.graphicalItems,i=e.tooltipAxis,o=VD(t,e);return n<0||!a||!a.length||n>=o.length?null:a.reduce((function(e,t){if(t.props.hide)return e;var a,c=t.props.data;i.dataKey&&!i.allowDuplicatedCategory?a=mm(void 0===c?o:c,i.dataKey,r):a=c&&c[n]||o[n];return a?[].concat(DD(e),[l_(t,a)]):e}),[])},$D=function(e,t,n,r){var a=r||{x:e.chartX,y:e.chartY},i=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(a,n),o=e.orderedTooltipTicks,c=e.tooltipAxis,s=e.tooltipTicks,u=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,i=-1,o=null!==(t=null==n?void 0:n.length)&&void 0!==t?t:0;if(o>1){if(a&&"angleAxis"===a.axisType&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,s=0;s<o;s++){var u=s>0?r[s-1].coordinate:r[o-1].coordinate,l=r[s].coordinate,f=s>=o-1?r[0].coordinate:r[s+1].coordinate,d=void 0;if(om(l-u)!==om(f-l)){var p=[];if(om(f-l)===om(c[1]-c[0])){d=f;var h=l+c[1]-c[0];p[0]=Math.min(h,(h+u)/2),p[1]=Math.max(h,(h+u)/2)}else{d=u;var m=f+c[1]-c[0];p[0]=Math.min(l,(m+l)/2),p[1]=Math.max(l,(m+l)/2)}var v=[Math.min(l,(d+l)/2),Math.max(l,(d+l)/2)];if(e>v[0]&&e<=v[1]||e>=p[0]&&e<=p[1]){i=r[s].index;break}}else{var y=Math.min(u,f),g=Math.max(u,f);if(e>(y+l)/2&&e<=(g+l)/2){i=r[s].index;break}}}else for(var b=0;b<o;b++)if(0===b&&e<=(n[b].coordinate+n[b+1].coordinate)/2||b>0&&b<o-1&&e>(n[b].coordinate+n[b-1].coordinate)/2&&e<=(n[b].coordinate+n[b+1].coordinate)/2||b===o-1&&e>(n[b].coordinate+n[b-1].coordinate)/2){i=n[b].index;break}}else i=0;return i}(i,o,s,c);if(u>=0&&s){var l=s[u]&&s[u].value,f=WD(e,t,u,l),d=function(e,t,n,r){var a=t.find((function(e){return e&&e.index===n}));if(a){if("horizontal"===e)return{x:a.coordinate,y:r.y};if("vertical"===e)return{x:r.x,y:a.coordinate};if("centric"===e){var i=a.coordinate,o=r.radius;return RD(RD(RD({},r),v_(r.cx,r.cy,o,i)),{},{angle:i,radius:o})}var c=a.coordinate,s=r.angle;return RD(RD(RD({},r),v_(r.cx,r.cy,c,s)),{},{angle:s,radius:c})}return LD}(n,o,u,a);return{activeTooltipIndex:u,activeLabel:l,activePayload:f,activeCoordinate:d}}return null},YD=function(e,t){var n=t.axes,r=t.graphicalItems,a=t.axisType,i=t.axisIdKey,o=t.stackGroups,c=t.dataStartIndex,s=t.dataEndIndex,u=e.layout,l=e.children,f=e.stackOffset,d=ZM(u,a),p=n.reduce((function(t,n){var p=n.props,h=p.type,m=p.dataKey,v=p.allowDataOverflow,y=p.allowDuplicatedCategory,g=p.scale,b=p.ticks,x=n.props[i],w=VD(e.data,{graphicalItems:r.filter((function(e){return e.props[i]===x})),dataStartIndex:c,dataEndIndex:s}),k=w.length;if(!t[x]){var S,O,E;if(m){if(S=$M(w,m,h),"category"===h&&d){var A=function(e){if(!hu(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1}(S);y&&A?(O=S,S=Jj(0,k)):y||(S=u_(n.props.domain,S,n).reduce((function(e,t){return e.indexOf(t)>=0?e:[].concat(DD(e),[t])}),[]))}else if("category"===h)S=y?S.filter((function(e){return""!==e&&!Pm(e)})):u_(n.props.domain,S,n).reduce((function(e,t){return e.indexOf(t)>=0||""===t||Pm(t)?e:[].concat(DD(e),[t])}),[]);else if("number"===h){var M=function(e,t,n,r,a){var i=t.map((function(t){return GM(e,t,n,a,r)})).filter((function(e){return!Pm(e)}));return i&&i.length?i.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]):null}(w,r.filter((function(e){return e.props[i]===x&&!e.props.hide})),m,a,u);M&&(S=M)}!d||"number"!==h&&"auto"===g||(E=$M(w,m,"category"))}else S=d?Jj(0,k):o&&o[x]&&o[x].hasStack&&"number"===h?"expand"===f?[0,1]:a_(o[x].stackGroups,c,s):XM(w,r.filter((function(e){return e.props[i]===x&&!e.props.hide})),h,u,!0);if("number"===h)S=gD(l,S,x,a,b),n.props.domain&&(S=c_(n.props.domain,S,v));else if("category"===h&&n.props.domain){var _=n.props.domain;S.every((function(e){return _.indexOf(e)>=0}))&&(S=_)}return RD(RD({},t),{},FD({},x,RD(RD({},n.props),{},{axisType:a,domain:S,categoricalDomain:E,duplicateDomain:O,originalDomain:n.props.domain,isCategorical:d,layout:u})))}return t}),{});return p},qD=function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,a=t.AxisComp,i=t.graphicalItems,o=t.stackGroups,c=t.dataStartIndex,s=t.dataEndIndex,u=e.children,l="".concat(r,"Id"),f=Ow(u,a),d={};return f&&f.length?d=YD(e,{axes:f,graphicalItems:i,axisType:r,axisIdKey:l,stackGroups:o,dataStartIndex:c,dataEndIndex:s}):i&&i.length&&(d=function(e,t){var n=t.graphicalItems,r=t.Axis,a=t.axisType,i=t.axisIdKey,o=t.stackGroups,c=t.dataStartIndex,s=t.dataEndIndex,u=e.layout,l=e.children,f=VD(e.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:s}),d=f.length,p=ZM(u,a),h=-1;return n.reduce((function(e,t){var m,v=t.props[i];return e[v]?e:(h++,p?m=Jj(0,d):o&&o[v]&&o[v].hasStack?(m=a_(o[v].stackGroups,c,s),m=gD(l,m,v,a)):(m=c_(r.defaultProps.domain,XM(f,n.filter((function(e){return e.props[i]===v&&!e.props.hide})),"number",u),r.defaultProps.allowDataOverflow),m=gD(l,m,v,a)),RD(RD({},e),{},FD({},v,RD(RD({axisType:a},r.defaultProps),{},{hide:!0,orientation:Jf(zD,"".concat(a,".").concat(h%2),null),domain:m,originalDomain:r.defaultProps.domain,isCategorical:p,layout:u}))))}),{})}(e,{Axis:a,graphicalItems:i,axisType:r,axisIdKey:l,stackGroups:o,dataStartIndex:c,dataEndIndex:s})),d},GD=function(e){var t=e.children,n=e.defaultShowTooltip,r=Ew(t,mP.displayName);return{chartX:0,chartY:0,dataStartIndex:r&&r.props&&r.props.startIndex||0,dataEndIndex:r&&r.props&&r.props.endIndex||e.data&&e.data.length-1||0,activeTooltipIndex:-1,isTooltipActive:!Pm(n)&&n}},XD=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"}},ZD=function(e,t){var n=e.props,r=(e.graphicalItems,e.xAxisMap),a=void 0===r?{}:r,i=e.yAxisMap,o=void 0===i?{}:i,c=n.width,s=n.height,u=n.children,l=n.margin||{},f=Ew(u,mP.displayName),d=Ew(u,jm.displayName),p=Object.keys(o).reduce((function(e,t){var n=o[t],r=n.orientation;return n.mirror||n.hide?e:RD(RD({},e),{},FD({},r,e[r]+n.width))}),{left:l.left||0,right:l.right||0}),h=Object.keys(a).reduce((function(e,t){var n=a[t],r=n.orientation;return n.mirror||n.hide?e:RD(RD({},e),{},FD({},r,Jf(e,"".concat(r))+n.height))}),{top:l.top||0,bottom:l.bottom||0}),m=RD(RD({},h),p),v=m.bottom;return f&&(m.bottom+=f.props.height||mP.defaultProps.height),d&&t&&(m=function(e,t,n,r){var a=n.children,i=n.width,o=n.margin,c=i-(o.left||0)-(o.right||0),s=qM({children:a,legendWidth:c}),u=e;if(s){var l=r||{},f=s.align,d=s.verticalAlign,p=s.layout;("vertical"===p||"horizontal"===p&&"center"===d)&&sm(e[f])&&(u=UM(UM({},e),{},VM({},f,u[f]+(l.width||0)))),("horizontal"===p||"vertical"===p&&"center"===f)&&sm(e[d])&&(u=UM(UM({},e),{},VM({},d,u[d]+(l.height||0))))}return u}(m,0,n,t)),RD(RD({brushBottom:v},m),{},{width:c-m.left-m.right,height:s-m.top-m.bottom})},KD=function(e){var n,r,a=e.chartName,i=e.GraphicalChild,c=e.defaultTooltipEventType,s=void 0===c?"axis":c,l=e.validateTooltipEventTypes,f=void 0===l?["axis"]:l,d=e.axisComponents,m=e.legendContent,v=e.formatAxisMap,y=e.defaultProps,g=function(e,t){var n=t.graphicalItems,r=t.stackGroups,a=t.offset,i=t.updateId,o=t.dataStartIndex,c=t.dataEndIndex,s=e.barSize,u=e.layout,l=e.barGap,f=e.barCategoryGap,p=e.maxBarSize,h=XD(u),m=h.numericAxisName,v=h.cateAxisName,y=function(e){return!(!e||!e.length)&&e.some((function(e){var t=xw(e&&e.type);return t&&t.indexOf("Bar")>=0}))}(n),g=y&&function(e){var t=e.barSize,n=e.stackGroups,r=void 0===n?{}:n;if(!r)return{};for(var a={},i=Object.keys(r),o=0,c=i.length;o<c;o++)for(var s=r[i[o]].stackGroups,u=Object.keys(s),l=0,f=u.length;l<f;l++){var d=s[u[l]],p=d.items,h=d.cateAxisId,m=p.filter((function(e){return xw(e.type).indexOf("Bar")>=0}));if(m&&m.length){var v=m[0].props.barSize,y=m[0].props[h];a[y]||(a[y]=[]),a[y].push({item:m[0],stackList:m.slice(1),barSize:Pm(v)?t:v})}}return a}({barSize:s,stackGroups:r}),b=[];return n.forEach((function(n,s){var h=VD(e.data,{dataStartIndex:o,dataEndIndex:c},n),y=n.props,x=y.dataKey,w=y.maxBarSize,k=n.props["".concat(m,"Id")],S=n.props["".concat(v,"Id")],O=d.reduce((function(e,r){var a,i=t["".concat(r.axisType,"Map")],o=n.props["".concat(r.axisType,"Id")],c=i&&i[o];return RD(RD({},e),{},(FD(a={},r.axisType,c),FD(a,"".concat(r.axisType,"Ticks"),JM(c)),a))}),{}),E=O[v],A=O["".concat(v,"Ticks")],M=r&&r[k]&&r[k].hasStack&&function(e,t){var n=e.props.stackId;if(um(n)){var r=t[n];if(r&&r.items.length){for(var a=-1,i=0,o=r.items.length;i<o;i++)if(r.items[i]===e){a=i;break}return a>=0?r.stackedData[a]:null}}return null}(n,r[k].stackGroups),_=xw(n.type).indexOf("Bar")>=0,j=s_(E,A),P=[];if(_){var C,D,T=Pm(w)?p:w,N=null!==(C=null!==(D=s_(E,A,!0))&&void 0!==D?D:T)&&void 0!==C?C:0;P=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,a=e.sizeList,i=void 0===a?[]:a,o=e.maxBarSize,c=i.length;if(c<1)return null;var s,u=dm(t,r,0,!0);if(i[0].barSize===+i[0].barSize){var l=!1,f=r/c,d=i.reduce((function(e,t){return e+t.barSize||0}),0);(d+=(c-1)*u)>=r&&(d-=(c-1)*u,u=0),d>=r&&f>0&&(l=!0,d=c*(f*=.9));var p={offset:((r-d)/2>>0)-u,size:0};s=i.reduce((function(e,t){var n=[].concat(LM(e),[{item:t.item,position:{offset:p.offset+p.size+u,size:l?f:t.barSize}}]);return p=n[n.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){n.push({item:e,position:p})})),n}),[])}else{var h=dm(n,r,0,!0);r-2*h-(c-1)*u<=0&&(u=0);var m=(r-2*h-(c-1)*u)/c;m>1&&(m>>=0);var v=o===+o?Math.min(m,o):m;s=i.reduce((function(e,t,n){var r=[].concat(LM(e),[{item:t.item,position:{offset:h+(m+u)*n+(m-v)/2,size:v}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){r.push({item:e,position:r[r.length-1].position})})),r}),[])}return s}({barGap:l,barCategoryGap:f,bandSize:N!==j?N:j,sizeList:g[S],maxBarSize:T}),N!==j&&(P=P.map((function(e){return RD(RD({},e),{},{position:RD(RD({},e.position),{},{offset:e.position.offset-N/2})})})))}var I,R,F,z=n&&n.type&&n.type.getComposedData;z&&b.push({props:RD(RD({},z(RD(RD({},O),{},{displayedData:h,props:e,dataKey:x,item:n,bandSize:j,barPosition:P,offset:a,stackedData:M,layout:u,dataStartIndex:o,dataEndIndex:c}))),{},(I={key:n.key||"item-".concat(s)},FD(I,m,O[m]),FD(I,v,O[v]),FD(I,"animationId",i),I)),childIndex:(R=n,F=e.children,Sw(F).indexOf(R)),item:n})})),b},b=function(e,t){var n=e.props,r=e.dataStartIndex,o=e.dataEndIndex,c=e.updateId;if(!Aw({props:n}))return null;var s=n.children,u=n.layout,l=n.stackOffset,f=n.data,p=n.reverseStackOrder,h=XD(u),m=h.numericAxisName,y=h.cateAxisName,b=Ow(s,i),x=function(e,t,n,r,a,i){if(!e)return null;var o=(i?t.reverse():t).reduce((function(e,t){var a=t.props,i=a.stackId;if(a.hide)return e;var o=t.props[n],c=e[o]||{hasStack:!1,stackGroups:{}};if(um(i)){var s=c.stackGroups[i]||{numericAxisId:n,cateAxisId:r,items:[]};s.items.push(t),c.hasStack=!0,c.stackGroups[i]=s}else c.stackGroups[fm("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return UM(UM({},e),{},VM({},o,c))}),{});return Object.keys(o).reduce((function(t,i){var c=o[i];return c.hasStack&&(c.stackGroups=Object.keys(c.stackGroups).reduce((function(t,i){var o=c.stackGroups[i];return UM(UM({},t),{},VM({},i,{numericAxisId:n,cateAxisId:r,items:o.items,stackedData:t_(e,o.items,a)}))}),{})),UM(UM({},t),{},VM({},i,c))}),{})}(f,b,"".concat(m,"Id"),"".concat(y,"Id"),l,p),w=d.reduce((function(e,t){var a="".concat(t.axisType,"Map");return RD(RD({},e),{},FD({},a,qD(n,RD(RD({},t),{},{graphicalItems:b,stackGroups:t.axisType===m&&x,dataStartIndex:r,dataEndIndex:o}))))}),{}),k=ZD(RD(RD({},w),{},{props:n,graphicalItems:b}),null==t?void 0:t.legendBBox);Object.keys(w).forEach((function(e){w[e]=v(n,w[e],k,e.replace("Map",""),a)}));var S,O,E=w["".concat(y,"Map")],A=(S=pm(E),{tooltipTicks:O=JM(S,!1,!0),orderedTooltipTicks:Uy(O,(function(e){return e.coordinate})),tooltipAxis:S,tooltipAxisBandSize:s_(S,O)}),M=g(n,RD(RD({},w),{},{dataStartIndex:r,dataEndIndex:o,updateId:c,graphicalItems:b,stackGroups:x,offset:k}));return RD(RD({formattedGraphicalItems:M,graphicalItems:b,offset:k,stackGroups:x},A),w)};return r=n=function(e){!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&&MD(e,t)}(l,p);var n,r,i,c=_D(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=c.call(this,e)).uniqueChartId=void 0,t.clipPathId=void 0,t.legendInstance=void 0,t.deferId=void 0,t.container=void 0,t.clearDeferId=function(){!Pm(t.deferId)&&UD&&UD(t.deferId),t.deferId=null},t.handleLegendBBoxUpdate=function(e){if(e){var n=t.state,r=n.dataStartIndex,a=n.dataEndIndex,i=n.updateId;t.setState(RD({legendBBox:e},b({props:t.props,dataStartIndex:r,dataEndIndex:a,updateId:i},RD(RD({},t.state),{},{legendBBox:e}))))}},t.handleReceiveSyncEvent=function(e,n,r){t.props.syncId===e&&n!==t.uniqueChartId&&(t.clearDeferId(),t.deferId=BD&&BD(t.applySyncEvent.bind(PD(t),r)))},t.handleBrushChange=function(e){var n=e.startIndex,r=e.endIndex;if(n!==t.state.dataStartIndex||r!==t.state.dataEndIndex){var a=t.state.updateId;t.setState((function(){return RD({dataStartIndex:n,dataEndIndex:r},b({props:t.props,dataStartIndex:n,dataEndIndex:r,updateId:a},t.state))})),t.triggerSyncEvent({dataStartIndex:n,dataEndIndex:r})}},t.handleMouseEnter=function(e){var n=t.props.onMouseEnter,r=t.getMouseInfo(e);if(r){var a=RD(RD({},r),{},{isTooltipActive:!0});t.setState(a),t.triggerSyncEvent(a),hc(n)&&n(a,e)}},t.triggeredAfterMouseMove=function(e){var n=t.props.onMouseMove,r=t.getMouseInfo(e),a=r?RD(RD({},r),{},{isTooltipActive:!0}):{isTooltipActive:!1};t.setState(a),t.triggerSyncEvent(a),hc(n)&&n(a,e)},t.handleItemMouseEnter=function(e){t.setState((function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}}))},t.handleItemMouseLeave=function(){t.setState((function(){return{isTooltipActive:!1}}))},t.handleMouseMove=function(e){e&&hc(e.persist)&&e.persist(),t.triggeredAfterMouseMove(e)},t.handleMouseLeave=function(e){var n=t.props.onMouseLeave,r={isTooltipActive:!1};t.setState(r),t.triggerSyncEvent(r),hc(n)&&n(r,e),t.cancelThrottledTriggerAfterMouseMove()},t.handleOuterEvent=function(e){var n=function(e){var t=e&&e.type;return t&&bw[t]?bw[t]:null}(e),r=Jf(t.props,"".concat(n));n&&hc(r)&&r(/.*touch.*/i.test(n)?t.getMouseInfo(e.changedTouches[0]):t.getMouseInfo(e),e)},t.handleClick=function(e){var n=t.props.onClick,r=t.getMouseInfo(e);if(r){var a=RD(RD({},r),{},{isTooltipActive:!0});t.setState(a),t.triggerSyncEvent(a),hc(n)&&n(a,e)}},t.handleMouseDown=function(e){var n=t.props.onMouseDown;hc(n)&&n(t.getMouseInfo(e),e)},t.handleMouseUp=function(e){var n=t.props.onMouseUp;hc(n)&&n(t.getMouseInfo(e),e)},t.handleTouchMove=function(e){null!=e.changedTouches&&e.changedTouches.length>0&&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 t=e.xAxis,n=e.width,r=e.height,a=e.offset;return KM(bC.getTicks(RD(RD(RD({},bC.defaultProps),t),{},{ticks:JM(t,!0),viewBox:{x:0,y:0,width:n,height:r}})),a.left,a.left+a.width)},t.horizontalCoordinatesGenerator=function(e){var t=e.yAxis,n=e.width,r=e.height,a=e.offset;return KM(bC.getTicks(RD(RD(RD({},bC.defaultProps),t),{},{ticks:JM(t,!0),viewBox:{x:0,y:0,width:n,height:r}})),a.top,a.top+a.height)},t.axesTicksGenerator=function(e){return JM(e,!0)},t.renderCursor=function(e){var n=t.state,r=n.isTooltipActive,i=n.activeCoordinate,c=n.activePayload,s=n.offset,l=n.activeTooltipIndex,f=t.getTooltipEventType();if(!e||!e.props.cursor||!r||!i||"ScatterChart"!==a&&"axis"!==f)return null;var d,p=t.props.layout,m=pj;if("ScatterChart"===a)d=i,m=Uj;else if("BarChart"===a)d=t.getCursorRectangle(),m=Oj;else if("radial"===p){var v=t.getCursorPoints(),y=v.cx,g=v.cy,b=v.radius;d={cx:y,cy:g,startAngle:v.startAngle,endAngle:v.endAngle,innerRadius:b,outerRadius:b},m=K_}else d={points:t.getCursorPoints()},m=pj;var x=e.key||"_recharts-cursor",w=RD(RD(RD(RD({stroke:"#ccc",pointerEvents:"none"},s),d),Bo(e.props.cursor)),{},{payload:c,payloadIndex:l,key:x,className:"recharts-tooltip-cursor"});return o(e.props.cursor)?u(e.props.cursor,w):h(m,w)},t.renderPolarAxis=function(e,n,r){var a=Jf(e,"type.axisType"),i=Jf(t.state,"".concat(a,"Map"))[e.props["".concat(a,"Id")]];return u(e,RD(RD({},i),{},{className:a,key:e.key||"".concat(n,"-").concat(r),ticks:JM(i,!0)}))},t.renderXAxis=function(e,n,r){var a=t.state.xAxisMap[e.props.xAxisId];return t.renderAxis(a,e,n,r)},t.renderYAxis=function(e,n,r){var a=t.state.yAxisMap[e.props.yAxisId];return t.renderAxis(a,e,n,r)},t.renderGrid=function(e){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,i=n.offset,o=t.props,c=o.width,s=o.height,l=pm(r),f=fD(a,(function(e){return CP(e.domain,HD)}))||pm(a),d=e.props||{};return u(e,{key:e.key||"grid",x:sm(d.x)?d.x:i.left,y:sm(d.y)?d.y:i.top,width:sm(d.width)?d.width:i.width,height:sm(d.height)?d.height:i.height,xAxis:l,yAxis:f,offset:i,chartWidth:c,chartHeight:s,verticalCoordinatesGenerator:d.verticalCoordinatesGenerator||t.verticalCoordinatesGenerator,horizontalCoordinatesGenerator:d.horizontalCoordinatesGenerator||t.horizontalCoordinatesGenerator})},t.renderPolarGrid=function(e){var n=e.props,r=n.radialLines,a=n.polarAngles,i=n.polarRadius,o=t.state,c=o.radiusAxisMap,s=o.angleAxisMap,l=pm(c),f=pm(s),d=f.cx,p=f.cy,h=f.innerRadius,m=f.outerRadius;return u(e,{polarAngles:hu(a)?a:JM(f,!0).map((function(e){return e.coordinate})),polarRadius:hu(i)?i:JM(l,!0).map((function(e){return e.coordinate})),cx:d,cy:p,innerRadius:h,outerRadius:m,key:e.key||"polar-grid",radialLines:r})},t.renderLegend=function(){var e=t.state.formattedGraphicalItems,n=t.props,r=n.children,a=n.width,i=n.height,o=t.props.margin||{},c=a-(o.left||0)-(o.right||0),s=qM({children:r,formattedGraphicalItems:e,legendWidth:c,legendContent:m});if(!s)return null;var l=s.item,f=ED(s,["item"]);return u(l,RD(RD({},f),{},{chartWidth:a,chartHeight:i,margin:o,ref:function(e){t.legendInstance=e},onBBoxUpdate:t.handleLegendBBoxUpdate}))},t.renderTooltip=function(){var e=t.props.children,n=Ew(e,vg.displayName);if(!n)return null;var r=t.state,a=r.isTooltipActive,i=r.activeCoordinate,o=r.activePayload,c=r.activeLabel,s=r.offset;return u(n,{viewBox:RD(RD({},s),{},{x:s.left,y:s.top}),active:a,label:c,payload:a?o:[],coordinate:i})},t.renderBrush=function(e){var n=t.props,r=n.margin,a=n.data,i=t.state,o=i.offset,c=i.dataStartIndex,s=i.dataEndIndex,l=i.updateId;return u(e,{key:e.key||"_recharts-brush",onChange:QM(t.handleBrushChange,null,e.props.onChange),data:a,x:sm(e.props.x)?e.props.x:o.left,y:sm(e.props.y)?e.props.y:o.top+o.height+o.brushBottom-(r.bottom||0),width:sm(e.props.width)?e.props.width:o.width,startIndex:c,endIndex:s,updateId:"brush-".concat(l)})},t.renderReferenceElement=function(e,n,r){if(!e)return null;var a=PD(t).clipPathId,i=t.state,o=i.xAxisMap,c=i.yAxisMap,s=i.offset,l=e.props,f=l.xAxisId,d=l.yAxisId;return u(e,{key:e.key||"".concat(n,"-").concat(r),xAxis:o[f],yAxis:c[d],viewBox:{x:s.left,y:s.top,width:s.width,height:s.height},clipPathId:a})},t.renderActivePoints=function(e){var t=e.item,n=e.activePoint,r=e.basePoint,a=e.childIndex,i=e.isRange,o=[],c=t.props.key,s=t.item.props,u=s.activeDot,f=RD(RD({index:a,dataKey:s.dataKey,cx:n.x,cy:n.y,r:4,fill:YM(t.item),strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value,key:"".concat(c,"-activePoint-").concat(a)},Bo(u)),Uo(u));return o.push(l.renderActiveDot(u,f)),r?o.push(l.renderActiveDot(u,RD(RD({},f),{},{cx:r.x,cy:r.y,key:"".concat(c,"-basePoint-").concat(a)}))):i&&o.push(null),o},t.renderGraphicChild=function(e,n,r){var a=t.filterFormatItem(e,n,r);if(!a)return null;var i=t.getTooltipEventType(),o=t.state,c=o.isTooltipActive,s=o.tooltipAxis,l=o.activeTooltipIndex,f=o.activeLabel,d=t.props.children,p=Ew(d,vg.displayName),h=a.props,m=h.points,v=h.isRange,y=h.baseLine,g=a.item.props,b=g.activeDot,x=!g.hide&&c&&p&&b&&l>=0,w={};"axis"!==i&&p&&"click"===p.props.trigger?w={onClick:QM(t.handleItemMouseEnter,null,e.props.onCLick)}:"axis"!==i&&(w={onMouseLeave:QM(t.handleItemMouseLeave,null,e.props.onMouseLeave),onMouseEnter:QM(t.handleItemMouseEnter,null,e.props.onMouseEnter)});var k=u(e,RD(RD({},a.props),w));if(x){var S,O;if(s.dataKey&&!s.allowDuplicatedCategory){var E="function"==typeof s.dataKey?function(e){return"function"==typeof s.dataKey?s.dataKey(e.payload):null}:"payload.".concat(s.dataKey.toString());S=mm(m,E,f),O=v&&y&&mm(y,E,f)}else S=m[l],O=v&&y&&y[l];if(!Pm(S))return[k].concat(DD(t.renderActivePoints({item:a,activePoint:S,basePoint:O,childIndex:l,isRange:v})))}return v?[k,null,null]:[k,null]},t.renderCustomized=function(e,n,r){return u(e,RD(RD({key:"recharts-customized-".concat(r)},t.props),t.state))},t.uniqueChartId=Pm(e.id)?fm("recharts"):e.id,t.clipPathId="".concat(t.uniqueChartId,"-clip"),e.throttleDelay&&(t.triggeredAfterMouseMove=hD(t.triggeredAfterMouseMove,e.throttleDelay)),t.state={},t}return n=l,r=[{key:"componentDidMount",value:function(){Pm(this.props.syncId)||this.addListener()}},{key:"componentDidUpdate",value:function(e){Pm(e.syncId)&&!Pm(this.props.syncId)&&this.addListener(),!Pm(e.syncId)&&Pm(this.props.syncId)&&this.removeListener()}},{key:"componentWillUnmount",value:function(){this.clearDeferId(),Pm(this.props.syncId)||this.removeListener(),this.cancelThrottledTriggerAfterMouseMove()}},{key:"cancelThrottledTriggerAfterMouseMove",value:function(){"function"==typeof this.triggeredAfterMouseMove.cancel&&this.triggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=Ew(this.props.children,vg.displayName);if(e&&yD(e.props.shared)){var t=e.props.shared?"axis":"item";return f.indexOf(t)>=0?t:s}return s}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t,n,r,a=function(e,t){return{chartX:Math.round(e.pageX-t.left),chartY:Math.round(e.pageY-t.top)}}(e,(t=this.container,n=t.ownerDocument.documentElement,r={top:0,left:0},void 0!==t.getBoundingClientRect&&(r=t.getBoundingClientRect()),{top:r.top+window.pageYOffset-n.clientTop,left:r.left+window.pageXOffset-n.clientLeft})),i=this.inRange(a.chartX,a.chartY);if(!i)return null;var o=this.state,c=o.xAxisMap,s=o.yAxisMap;if("axis"!==this.getTooltipEventType()&&c&&s){var u=pm(c).scale,l=pm(s).scale,f=u&&u.invert?u.invert(a.chartX):null,d=l&&l.invert?l.invert(a.chartY):null;return RD(RD({},a),{},{xValue:f,yValue:d})}var p=$D(this.state,this.props.data,this.props.layout,i);return p?RD(RD({},a),p):null}},{key:"getCursorRectangle",value:function(){var e=this.props.layout,t=this.state,n=t.activeCoordinate,r=t.offset,a=t.tooltipAxisBandSize,i=a/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?n.x-i:r.left+.5,y:"horizontal"===e?r.top+.5:n.y-i,width:"horizontal"===e?a:r.width-1,height:"horizontal"===e?r.height-1:a}}},{key:"getCursorPoints",value:function(){var e,t,n,r,a=this.props.layout,i=this.state,o=i.activeCoordinate,c=i.offset;if("horizontal"===a)n=e=o.x,t=c.top,r=c.top+c.height;else if("vertical"===a)r=t=o.y,e=c.left,n=c.left+c.width;else if(!Pm(o.cx)||!Pm(o.cy)){if("centric"!==a){var s=o.cx,u=o.cy,l=o.radius,f=o.startAngle,d=o.endAngle;return{points:[v_(s,u,l,f),v_(s,u,l,d)],cx:s,cy:u,radius:l,startAngle:f,endAngle:d}}var p=o.cx,h=o.cy,m=o.innerRadius,v=o.outerRadius,y=o.angle,g=v_(p,h,m,y),b=v_(p,h,v,y);e=g.x,t=g.y,n=b.x,r=b.y}return[{x:e,y:t},{x:n,y:r}]}},{key:"inRange",value:function(e,t){var n=this.props.layout;if("horizontal"===n||"vertical"===n){var r=this.state.offset;return e>=r.left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height?{x:e,y:t}:null}var a=this.state,i=a.angleAxisMap,o=a.radiusAxisMap;if(i&&o){var c=pm(i);return b_({x:e,y:t},c)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=Ew(e,vg.displayName),r={};return n&&"axis"===t&&(r="click"===n.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),RD(RD({},Uo(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){xD.on(wD,this.handleReceiveSyncEvent),xD.setMaxListeners&&xD._maxListeners&&xD.setMaxListeners(xD._maxListeners+1)}},{key:"removeListener",value:function(){xD.removeListener(wD,this.handleReceiveSyncEvent),xD.setMaxListeners&&xD._maxListeners&&xD.setMaxListeners(xD._maxListeners-1)}},{key:"triggerSyncEvent",value:function(e){var t=this.props.syncId;Pm(t)||xD.emit(wD,t,this.uniqueChartId,e)}},{key:"applySyncEvent",value:function(e){var t=this.props,n=t.layout,r=t.syncMethod,a=this.state.updateId,i=e.dataStartIndex,o=e.dataEndIndex;if(Pm(e.dataStartIndex)&&Pm(e.dataEndIndex))if(Pm(e.activeTooltipIndex))this.setState(e);else{var c=e.chartX,s=e.chartY,u=e.activeTooltipIndex,l=this.state,f=l.offset,d=l.tooltipTicks;if(!f)return;if("function"==typeof r)u=r(d,e);else if("value"===r){u=-1;for(var p=0;p<d.length;p++)if(d[p].value===e.activeLabel){u=p;break}}var h=RD(RD({},f),{},{x:f.left,y:f.top}),m=Math.min(c,h.x+h.width),v=Math.min(s,h.y+h.height),y=d[u]&&d[u].value,g=WD(this.state,this.props.data,u),x=d[u]?{x:"horizontal"===n?d[u].coordinate:m,y:"horizontal"===n?v:d[u].coordinate}:LD;this.setState(RD(RD({},e),{},{activeLabel:y,activeCoordinate:x,activePayload:g,activeTooltipIndex:u}))}else this.setState(RD({dataStartIndex:i,dataEndIndex:o},b({props:this.props,dataStartIndex:i,dataEndIndex:o,updateId:a},this.state)))}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,a=0,i=r.length;a<i;a++){var o=r[a];if(o.item===e||o.props.key===e.key||t===xw(o.item.type)&&n===o.childIndex)return o}return null}},{key:"renderAxis",value:function(e,n,r,a){var i=this.props,o=i.width,c=i.height;return t.createElement(bC,OD({},e,{className:"recharts-".concat(e.axisType," ").concat(e.axisType),key:n.key||"".concat(r,"-").concat(a),viewBox:{x:0,y:0,width:o,height:c},ticksGenerator:this.axesTicksGenerator}))}},{key:"renderClipPath",value:function(){var e=this.clipPathId,n=this.state.offset,r=n.left,a=n.top,i=n.height,o=n.width;return t.createElement("defs",null,t.createElement("clipPath",{id:e},t.createElement("rect",{x:r,y:a,height:i,width:o})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce((function(e,t){var n=SD(t,2),r=n[0],a=n[1];return RD(RD({},e),{},FD({},r,a.scale))}),{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce((function(e,t){var n=SD(t,2),r=n[0],a=n[1];return RD(RD({},e),{},FD({},r,a.scale))}),{}):null}},{key:"getXScaleByAxisId",value:function(e){var t,n;return null===(t=this.state.xAxisMap)||void 0===t||null===(n=t[e])||void 0===n?void 0:n.scale}},{key:"getYScaleByAxisId",value:function(e){var t,n;return null===(t=this.state.yAxisMap)||void 0===t||null===(n=t[e])||void 0===n?void 0:n.scale}},{key:"getItemByXY",value:function(e){var t=this.state.formattedGraphicalItems;if(t&&t.length)for(var n=0,r=t.length;n<r;n++){var a=t[n],i=a.props,o=a.item,c=xw(o.type);if("Bar"===c){var s=(i.data||[]).find((function(t){return Sj(e,t)}));if(s)return{graphicalItem:a,payload:s}}else if("RadialBar"===c){var u=(i.data||[]).find((function(t){return b_(e,t)}));if(u)return{graphicalItem:a,payload:u}}}return null}},{key:"render",value:function(){var e=this;if(!Aw(this))return null;var n=this.props,r=n.children,a=n.className,i=n.width,o=n.height,c=n.style,s=n.compact,u=n.title,l=n.desc,f=ED(n,["children","className","width","height","style","compact","title","desc"]),d=Bo(f),p={CartesianGrid:{handler:this.renderGrid,once:!0},ReferenceArea:{handler:this.renderReferenceElement},ReferenceLine:{handler:this.renderReferenceElement},ReferenceDot:{handler:this.renderReferenceElement},XAxis:{handler:this.renderXAxis},YAxis:{handler:this.renderYAxis},Brush:{handler:this.renderBrush,once:!0},Bar:{handler:this.renderGraphicChild},Line:{handler:this.renderGraphicChild},Area:{handler:this.renderGraphicChild},Radar:{handler:this.renderGraphicChild},RadialBar:{handler:this.renderGraphicChild},Scatter:{handler:this.renderGraphicChild},Pie:{handler:this.renderGraphicChild},Funnel:{handler:this.renderGraphicChild},Tooltip:{handler:this.renderCursor,once:!0},PolarGrid:{handler:this.renderPolarGrid,once:!0},PolarAngleAxis:{handler:this.renderPolarAxis},PolarRadiusAxis:{handler:this.renderPolarAxis},Customized:{handler:this.renderCustomized}};if(s)return t.createElement(Yo,OD({},d,{width:i,height:o,title:u,desc:l}),this.renderClipPath(),Pw(r,p));var h=this.parseEventsOfWrapper();return t.createElement("div",OD({className:Io("recharts-wrapper",a),style:RD({position:"relative",cursor:"default",width:i,height:o},c)},h,{ref:function(t){e.container=t}}),t.createElement(Yo,OD({},d,{width:i,height:o,title:u,desc:l}),this.renderClipPath(),Pw(r,p)),this.renderLegend(),this.renderTooltip())}}],r&&AD(n.prototype,r),i&&AD(n,i),l}(),n.displayName=a,n.defaultProps=RD({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},y),n.getDerivedStateFromProps=function(e,t){var n=e.data,r=e.children,a=e.width,i=e.height,o=e.layout,c=e.stackOffset,s=e.margin;if(Pm(t.updateId)){var u=GD(e);return RD(RD(RD({},u),{},{updateId:0},b(RD(RD({props:e},u),{},{updateId:0}),t)),{},{prevData:n,prevWidth:a,prevHeight:i,prevLayout:o,prevStackOffset:c,prevMargin:s,prevChildren:r})}if(n!==t.prevData||a!==t.prevWidth||i!==t.prevHeight||o!==t.prevLayout||c!==t.prevStackOffset||!yw(s,t.prevMargin)){var l=GD(e),f={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},d=RD(RD({},$D(t,n,o)),{},{updateId:t.updateId+1}),p=RD(RD(RD({},l),f),d);return RD(RD(RD({},p),b(RD({props:e},p),t)),{},{prevData:n,prevWidth:a,prevHeight:i,prevLayout:o,prevStackOffset:c,prevMargin:s,prevChildren:r})}if(!_w(r,t.prevChildren)){var h=!Pm(n)?t.updateId:t.updateId+1;return RD(RD({updateId:h},b(RD(RD({props:e},t),{},{updateId:h}),t)),{},{prevChildren:r})}return null},n.renderActiveDot=function(e,n){var r;return r=o(e)?u(e,n):hc(e)?e(n):t.createElement(Tj,n),t.createElement(Xo,{className:"recharts-active-dot",key:n.key},r)},r}({chartName:"LineChart",GraphicalChild:JC,axisComponents:[{axisType:"xAxis",AxisComp:QC},{axisType:"yAxis",AxisComp:eD}],formatAxisMap:function(e,t,n,r,a){var i=e.width,o=e.height,c=e.layout,s=e.children,u=Object.keys(t),l={left:n.left,leftMirror:n.left,right:i-n.right,rightMirror:i-n.right,top:n.top,topMirror:n.top,bottom:o-n.bottom,bottomMirror:o-n.bottom},f=!!Ew(s,"Bar");return u.reduce((function(i,o){var s,u,d,p,h,m=t[o],v=m.orientation,y=m.domain,g=m.padding,b=void 0===g?{}:g,x=m.mirror,w=m.reversed,k="".concat(v).concat(x?"Mirror":"");if("number"===m.type&&("gap"===m.padding||"no-gap"===m.padding)){var S=y[1]-y[0],O=1/0,E=m.categoricalDomain.sort();E.forEach((function(e,t){t>0&&(O=Math.min((e||0)-(E[t-1]||0),O))}));var A=O/S,M="vertical"===m.layout?n.height:n.width;if("gap"===m.padding&&(s=A*M/2),"no-gap"===m.padding){var _=dm(e.barCategoryGap,A*M),j=A*M/2;s=j-_-(j-_)/M*_}}u="xAxis"===r?[n.left+(b.left||0)+(s||0),n.left+n.width-(b.right||0)-(s||0)]:"yAxis"===r?"horizontal"===c?[n.top+n.height-(b.bottom||0),n.top+(b.top||0)]:[n.top+(b.top||0)+(s||0),n.top+n.height-(b.bottom||0)-(s||0)]:m.range,w&&(u=[u[1],u[0]]);var P=function(e,t,n){var r=e.scale,a=e.type,i=e.layout,o=e.axisType;if("auto"===r)return"radial"===i&&"radiusAxis"===o?{scale:OS(),realScaleType:"band"}:"radial"===i&&"angleAxis"===o?{scale:GO(),realScaleType:"linear"}:"category"===a&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!n)?{scale:AS(),realScaleType:"point"}:"category"===a?{scale:OS(),realScaleType:"band"}:{scale:GO(),realScaleType:"linear"};if(im(r)){var c="scale".concat(Mp(r));return{scale:(zM[c]||AS)(),realScaleType:zM[c]?c:"point"}}return hc(r)?{scale:r}:{scale:AS(),realScaleType:"point"}}(m,a,f),C=P.scale,D=P.realScaleType;C.domain(y).range(u),function(e){var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),a=Math.min(r[0],r[1])-1e-4,i=Math.max(r[0],r[1])+1e-4,o=e(t[0]),c=e(t[n-1]);(o<a||o>i||c<a||c>i)&&e.domain([t[0],t[n-1]])}}(C);var T=n_(C,HP(HP({},m),{},{realScaleType:D}));"xAxis"===r?(h="top"===v&&!x||"bottom"===v&&x,d=n.left,p=l[k]-h*m.height):"yAxis"===r&&(h="left"===v&&!x||"right"===v&&x,d=l[k]-h*m.width,p=n.top);var N=HP(HP(HP({},m),T),{},{realScaleType:D,x:d,y:p,scale:C,width:"xAxis"===r?n.width:m.width,height:"yAxis"===r?n.height:m.height});return N.bandSize=s_(N,T),m.hide||"xAxis"!==r?m.hide||(l[k]+=(h?-1:1)*N.width):l[k]+=(h?-1:1)*N.height,HP(HP({},i),{},BP({},o,N))}),{})}});function JD(e){return ji(e).substr(0,10)}function QD(e,t,n){return"FitbitSteps"==e?eT(t,n):"FitbitRestingHeartRates"==e||"AppleHealthSteps"==e?tT(t,n):"AppleHealthDistanceRunningWalking"==e?function(e,t){var n=new Date(e,t,1,0,0,0,0),r=va(n,{months:1}),a={};for(;n<r;)a[JD(n)]=Math.floor(500*Math.random()),n=va(n,{hours:1});return a}(t,n):"GoogleFitSteps"==e?function(e,t){var n=new Date(e,t,1,0,0,0,0),r=va(n,{months:1}),a={};for(;n<r;)a[JD(n)]=Math.floor(500*Math.random()),n=va(n,{hours:1});return a}(t,n):eT(t,n)}function eT(e,t){for(var n=new Date(e,t,1,0,0,0,0),r=va(n,{months:1}),a={};n<r;)a[JD(n)]=3e3+Math.floor(1e4*Math.random()),n=va(n,{days:1});return a}function tT(e,t){for(var n=new Date(e,t,1,0,0,0,0),r=va(n,{months:1}),a={};n<r;)a[JD(n)]=60+Math.floor(5*Math.random()),n=va(n,{days:1});return a}var nT=function(){return nT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},nT.apply(this,arguments)};function rT(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,c)}s((r=r.apply(e,t||[])).next())}))}function aT(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function iT(e){var t=[],n=function(r){var a=nT({},e);return r&&(a.pageID=r),v.queryDeviceData(a).then((function(e){return t=t.concat(e.deviceDataPoints),e.nextPageID?n(e.nextPageID):t}))};return n()}function oT(e,t){var n=e.startDate;t.startDate<n&&(n=t.startDate);var r=e.endDate;return t.endDate>r&&(r=t.endDate),{startDate:n,endDate:r}}function cT(e){e=e.sort((function(e,t){return e.startDate.getTime()-t.startDate.getTime()}));for(var t,n,r=[],a=e[0],i=1;i<e.length;i++)t=a,(n=e[i]).startDate>=t.startDate&&n.startDate<=t.endDate||n.endDate>=t.startDate&&n.endDate<=t.endDate||t.startDate>=n.startDate&&t.startDate<=n.endDate||t.endDate>=n.startDate&&t.endDate<=n.endDate?a=oT(a,e[i]):(r.push(a),a=e[i]);r.push(a);var o=0;return r.forEach((function(e){o+=function(e,t,n){la(2,arguments);var r=_a(e,t)/6e4;return Pa(null==n?void 0:n.roundingMethod)(r)}(e.endDate,e.startDate)})),o}function sT(e,t,n){return iT({namespace:"AppleHealth",type:"SleepAnalysisInterval",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(r){var a={};r.forEach((function(e){if(e.observationDate&&e.startDate&&e.value==n)for(var t=function(e){for(var t=[],n=Ti(e.startDate),r=Ti(e.observationDate),a=va(new Date(n.getFullYear(),n.getMonth(),n.getDate(),18,0,0,0),{days:-1});a<r;){var i=va(a,{days:1});if(i>n){var o=new Date(a),c=new Date(i);n>=a&&n<i&&(o=n),r>=a&&r<i&&(c=r),t.push({startDate:o,endDate:c})}a=i}return t}(e),r=0;r<t.length;r++){var i=ji(va(t[r].startDate,{hours:6})).substring(0,10);a[i]||(a[i]=[]),a[i].push(t[r])}}));for(var i={};e<t;){var o=e.toISOString().substr(0,10),c=a[o];c&&(i[o]=cT(c)),e=va(e,{days:1})}return i}))}function uT(e,t){return iT({namespace:"AppleHealth",type:"HourlySteps",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate){var n=JD(Ti(e.startDate));t[n]||(t[n]=0),t[n]+=parseFloat(e.value)}})),t}))}function lT(e,t,n){return iT({namespace:"Fitbit",type:n,observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate){var n=e.startDate.substr(0,10);t[n]||(t[n]=0),t[n]+=parseInt(e.value)}})),t}))}function fT(e,t,n){return iT({namespace:"Fitbit",type:"HeartRateZone",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if("Out of Range"!=e.value&&(!n||e.value==n)&&e.properties&&e.properties.Minutes&&e.startDate){var r=e.startDate.substr(0,10);t[r]||(t[r]=0),t[r]+=parseInt(e.properties.Minutes)}})),t}))}function dT(e,t,n){return iT({namespace:"Fitbit",type:e,observedAfter:va(t,{days:-1}).toISOString(),observedBefore:va(n,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate&&0!=parseInt(e.value)){var n=e.startDate.substr(0,10);t[n]=Math.round(parseFloat(e.value))}})),t}))}function pT(e,t){return dT("RestingHeartRate",e,t)}function hT(e,t,n){return iT({namespace:"Fitbit",type:n,observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.observationDate){var n=ji(va(Ti(e.observationDate),{hours:6})).substr(0,10);t[n]||(t[n]=0),t[n]+=parseFloat(e.value)}})),t}))}function mT(e,t){return dT("Steps",e,t)}var vT,yT={};function gT(e,t,n){yT[e]={provider:t,availabilityCheck:n}}function bT(e,t){var n=yT[e];if(!n)throw"Unknown data type:"+e;return n.availabilityCheck(t)}function xT(e,t){return function(n){var r={namespace:e,type:t,limit:1};return n&&(r.modifiedAfter=n.toISOString()),v.queryDeviceData(r).then((function(e){return e.deviceDataPoints.length>0})).catch((function(){return!1}))}}function wT(e){var n=e.x,r=e.y;e.stroke;var a=e.payload.value;return t.createElement("text",{x:n,y:r+15,textAnchor:"middle",fontSize:"12"},a)}function kT(e){var r=a(null),o=r[0],c=r[1],s=a(!1),u=s[0],l=s[1],f=a(!1),d=f[0],p=f[1],h=n(),m=new Date(e.year,e.month,1,0,0,0,0),y=va(m,{months:1});function g(){var t,n;if(e.previewState&&(p(!0),e.onDataDetected&&e.onDataDetected()),"Loading"==e.previewState&&l(!0),"WithData"==e.previewState){var r={};e.lines.forEach((function(t){var n=QD(t.dailyDataType,e.year,e.month);r[t.dailyDataType]=n})),c(r)}if("NoData"==e.previewState){r={};e.lines.forEach((function(e){r[e.dailyDataType]={}})),c(r),l(!1)}if(!e.previewState){!function(){if(!d){var t=e.lines.map((function(e){return bT(e.dailyDataType)}));Promise.all(t).then((function(t){t.find((function(e){return e}))&&(p(!0),e.onDataDetected&&e.onDataDetected())}))}}(),h.current=(null!==(t=h.current)&&void 0!==t?t:0)+1;var a=null!==(n=h.current)&&void 0!==n?n:0;l(!0);var i;i=e.lines.map((function(e){return t=e.dailyDataType,n=m,r=y,yT[t].provider(n,r).then((function(e){for(var t={};n<r;){var a=JD(n);e[a]&&(t[a]=e[a]),n=va(n,{days:1})}return t}));var t,n,r})),Promise.all(i).then((function(t){if(a==h.current){for(var n={},r=0;r<e.lines.length;r++)n[e.lines[r].dailyDataType]=t[r];c(n),l(!1)}}))}}i((function(){return g(),v.on("applicationDidBecomeVisible",g),v.on("externalAccountSyncComplete",g),function(){v.off("applicationDidBecomeVisible",g),v.off("externalAccountSyncComplete",g)}}),[e]);for(var b=[],x=m,w=!1;x<y;){var k={day:x.getDate()};b.push(k);var S=JD(x);e.lines.forEach((function(e){o&&(k[e.dailyDataType]=o[e.dailyDataType][S],e.valueConverter&&(k[e.dailyDataType]=e.valueConverter(k[e.dailyDataType])),k[e.dailyDataType]>0&&(w=!0))})),x=va(x,{days:1})}if(!d)return null;var O=function(){var t=e.lines.filter((function(e){return e.showAverage}));if(0==t.length)return null;if(t.length>1)return console.error("Only one line can display an average"),null;var n=t[0],r=b.map((function(e){return e[n.dailyDataType]}));if(r=r.filter((function(e){return!!e})),!r.length)return null;var a=r.reduce((function(e,t){return e+t}))/r.length;return a.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:1})}();return t.createElement("div",{className:"mdhui-device-data-month-chart"},e.title&&t.createElement("div",{className:"title"},e.title),!u&&null!=O&&t.createElement("div",{className:"average"},"Daily Average: ",t.createElement("span",{className:"average-value"},O)),t.createElement("div",{style:{clear:"both"}}),t.createElement("div",{className:"chart-container"},(!w||u)&&t.createElement("div",null,!w&&!u&&t.createElement("div",{className:"no-data-label"},"No Data"),u&&t.createElement(po,null),t.createElement(Nb,{width:"100%",height:150},t.createElement(KD,{width:400,height:400,data:b,syncId:e.syncId},t.createElement(DC,{strokeDasharray:"3 3"}),t.createElement(eD,{axisLine:!1,interval:0,tickLine:!1,width:30,scale:"linear"}),t.createElement(QC,{tick:wT,axisLine:!1,dataKey:"day",tickMargin:0,minTickGap:0,tickLine:!1,interval:1})))),w&&!u&&t.createElement(Nb,{width:"100%",height:150},t.createElement(KD,{width:400,height:400,data:b,syncId:e.syncId},e.lines.map((function(e){return t.createElement(JC,{key:e.dailyDataType,type:"monotone",dataKey:e.dailyDataType,stroke:"var(--color-primary)"})})),t.createElement(vg,{content:t.createElement((function(n){var r=n.active,a=n.payload;if(n.label,r&&a&&a.length){var i=new Date(e.year,e.month,a[0].payload.day),o={};return e.lines.forEach((function(e){o[e.dailyDataType]=e.label})),t.createElement("div",{className:"graph-tooltip"},t.createElement("div",{className:"graph-date"},Oi(i,"MM/dd/yyyy")),t.createElement("table",{className:"payload-values"},t.createElement("tbody",null,a.map((function(e){return t.createElement("tr",{key:e.dataKey},t.createElement("th",null,o[e.dataKey]),t.createElement("td",null,parseFloat(e.value.toFixed(2))))})))))}return null}),null)}),t.createElement(DC,{strokeDasharray:"3 3"}),t.createElement(eD,{tickFormatter:function(e){return e>=1e4?Math.floor(e/1e3)+"K":e},axisLine:!1,interval:0,tickLine:!1,width:30}),t.createElement(QC,{tick:wT,axisLine:!1,dataKey:"day",tickMargin:0,minTickGap:0,tickLine:!1,interval:1})))))}function ST(e){var n=a(!1),r=n[0],i=n[1],o=new Date,c=a(new Date(o.getFullYear(),o.getMonth(),1,0,0,0,0)),s=c[0],u=c[1];function l(){i(!0)}var f=s.getMonth(),d=s.getFullYear();return t.createElement(t.Fragment,null,!r&&t.createElement(Mo,null,vo["device-data-no-data"]),t.createElement("div",{style:{display:r?"block":"none"}},t.createElement(oo,{intervalType:"Month",intervalStart:s,onIntervalChange:function(e){u(e)}}),t.createElement(kT,{onDataDetected:function(){return l()},previewState:"Default"==e.previewState?"WithData":void 0,lines:[{showAverage:!0,dailyDataType:vT.FitbitSteps,label:vo.steps}],title:"Fitbit "+vo.steps,month:f,year:d,syncId:"DeviceDataCharts"}),t.createElement(kT,{onDataDetected:function(){return l()},previewState:"Default"==e.previewState?"WithData":void 0,lines:[{showAverage:!0,dailyDataType:vT.FitbitRestingHeartRate,label:vo["resting-heart-rate"]}],title:"Fitbit "+vo["resting-heart-rate"],month:f,year:d,syncId:"DeviceDataCharts"}),t.createElement(kT,{onDataDetected:function(){return l()},previewState:"Default"==e.previewState?"WithData":void 0,lines:[{showAverage:!0,dailyDataType:vT.AppleHealthSteps,label:vo.steps}],title:"Apple Health "+vo.steps,month:f,year:d,syncId:"DeviceDataCharts"}),t.createElement(kT,{onDataDetected:function(){return l()},previewState:"Default"==e.previewState?"WithData":void 0,lines:[{showAverage:!0,dailyDataType:vT.AppleHealthDistanceWalkingRunning,label:vo["distance-traveled"],valueConverter:function(e){return 621371e-9*e}}],title:"Apple Health "+vo["distance-traveled"]+" (Miles)",month:f,year:d,syncId:"DeviceDataCharts"}),t.createElement(kT,{onDataDetected:function(){return l()},previewState:"Default"==e.previewState?"WithData":void 0,lines:[{showAverage:!0,dailyDataType:vT.GoogleFitSteps,label:vo.steps}],title:"Google Fit "+vo.steps,month:f,year:d,syncId:"DeviceDataCharts"})))}!function(e){e.AppleHealthDistanceWalkingRunning="AppleHealthDistanceWalkingRunning",e.AppleHealthFlightsClimbed="AppleHealthFlightsClimbed",e.AppleHealthHeartRateRange="AppleHealthHeartRateRange",e.AppleHealthHrv="AppleHealthHrv",e.AppleHealthMaxHeartRate="AppleHealthMaxHeartRate",e.AppleHealthRestingHeartRate="AppleHealthRestingHeartRate",e.AppleHealthSleepMinutes="AppleHealthSleepMinutes",e.AppleHealthInBedMinutes="AppleHealthInBedMinutes",e.AppleHealthStandMinutes="AppleHealthStandMinutes",e.AppleHealthSteps="AppleHealthSteps",e.AppleHealthWalkingHeartRateAverage="AppleHealthWalkingHeartRateAverage",e.FitbitActiveMinutes="FitbitActiveMinutes",e.FitbitLightlyActiveMinutes="FitbitLightlyActiveMinutes",e.FitbitFairlyActiveMinutes="FitbitFairlyActiveMinutes",e.FitbitVeryActiveMinutes="FitbitVeryActiveMinutes",e.FitbitBreathingRate="FitbitBreathingRate",e.FitbitCaloriesBurned="FitbitCaloriesBurned",e.FitbitElevatedHeartRateMinutes="FitbitElevatedHeartRateMinutes",e.FitbitFatBurnHeartRateMinutes="FitbitFatBurnHeartRateMinutes",e.FitbitCardioHeartRateMinutes="FitbitCardioHeartRateMinutes",e.FitbitPeakHeartRateMinutes="FitbitPeakHeartRateMinutes",e.FitbitFloors="FitbitFloors",e.FitbitHrv="FitbitHrv",e.FitbitRestingHeartRate="FitbitRestingHeartRate",e.FitbitSleepMinutes="FitbitSleepMinutes",e.FitbitLightSleepMinutes="FitbitLightSleepMinutes",e.FitbitRemSleepMinutes="FitbitRemSleepMinutes",e.FitbitDeepSleepMinutes="FitbitDeepSleepMinutes",e.FitbitSpO2="FitbitSpO2",e.FitbitSteps="FitbitSteps",e.GoogleFitSteps="GoogleFitSteps",e.Steps="Steps",e.RestingHeartRate="RestingHeartRate"}(vT||(vT={})),gT(vT.AppleHealthDistanceWalkingRunning,(function(e,t){return iT({namespace:"AppleHealth",type:"HourlyDistanceWalkingRunning",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate){var n=ji(Ti(e.startDate)).substring(0,10);t[n]||(t[n]=0),t[n]+=parseFloat(e.value)}})),t}))}),xT("AppleHealth",["HourlyDistanceWalkingRunning"])),gT(vT.AppleHealthFlightsClimbed,(function(e,t){return iT({namespace:"AppleHealth",type:"FlightsClimbed",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate){var n=JD(Ti(e.startDate));t[n]||(t[n]=0),t[n]+=parseFloat(e.value)}})),t}))}),xT("AppleHealth",["HourlySteps"])),gT(vT.AppleHealthHeartRateRange,(function(e,t){return iT({namespace:"AppleHealth",type:["HourlyMaximumHeartRate","HourlyMinimumHeartRate"],observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(n){var r={};n.forEach((function(e){if(e.startDate){var t=JD(Ti(e.startDate)),n=parseFloat(e.value);"HourlyMaximumHeartRate"==e.type&&(r[t]?(!r[t].MaxHeartRate||n>r[t].MaxHeartRate)&&(r[t].MaxHeartRate=n):r[t]={MaxHeartRate:n}),"HourlyMinimumHeartRate"==e.type&&(r[t]?(!r[t].MinHeartRate||n<r[t].MinHeartRate)&&(r[t].MinHeartRate=n):r[t]={MinHeartRate:n})}}));for(var a={};e<t;){var i=r[JD(e)];i&&i.MaxHeartRate&&i.MinHeartRate&&(a[JD(e)]=i.MaxHeartRate-i.MinHeartRate),e=va(e,{days:1})}return a}))}),xT("AppleHealth",["HourlyMaximumHeartRate"])),gT(vT.AppleHealthHrv,(function(e,t){return iT({namespace:"AppleHealth",type:"HeartRateVariability",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(n){var r={};n.forEach((function(e){if(e.startDate){var t=ji(Ti(e.startDate)).substring(0,10),n=parseFloat(e.value);r[t]||(r[t]=[]),r[t].push(n)}}));for(var a={};e<t;){var i=e.toISOString().substr(0,10);r[i]&&(a[i]=r[i].reduce((function(e,t){return e+t}))/r[i].length),e=va(e,{days:1})}return a}))}),xT("AppleHealth",["HeartRateVariability"])),gT(vT.AppleHealthMaxHeartRate,(function(e,t){return iT({namespace:"AppleHealth",type:"HourlyMaximumHeartRate",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate){var n=ji(Ti(e.startDate)).substring(0,10),r=parseFloat(e.value);t[n]?r>t[n]&&(t[n]=r):t[n]=r}})),t}))}),xT("AppleHealth",["HourlyMaximumHeartRate"])),gT(vT.AppleHealthRestingHeartRate,(function(e,t){return iT({namespace:"AppleHealth",type:"RestingHeartRate",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(n){var r={};n.forEach((function(e){if(e.startDate){var t=JD(Ti(e.startDate)),n=parseFloat(e.value);r[t]||(r[t]=[]),r[t].push(n)}}));for(var a={};e<t;){var i=e.toISOString().substr(0,10);r[i]&&(a[i]=r[i].reduce((function(e,t){return e+t}))/r[i].length),e=va(e,{days:1})}return a}))}),xT("AppleHealth",["RestingHeartRate"])),gT(vT.AppleHealthSleepMinutes,(function(e,t){return sT(e,t,"Asleep")}),xT("AppleHealth",["SleepAnalysisInterval"])),gT(vT.AppleHealthInBedMinutes,(function(e,t){return sT(e,t,"InBed")}),xT("AppleHealth",["SleepAnalysisInterval"])),gT(vT.AppleHealthStandMinutes,(function(e,t){return iT({namespace:"AppleHealth",type:"AppleStandTime",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate){var n=JD(Ti(e.startDate));t[n]||(t[n]=0),t[n]+=parseFloat(e.value)}})),t}))}),xT("AppleHealth",["AppleStandTime"])),gT(vT.AppleHealthSteps,uT,xT("AppleHealth",["HourlySteps"])),gT(vT.AppleHealthWalkingHeartRateAverage,(function(e,t){return iT({namespace:"AppleHealth",type:"WalkingHeartRateAverage",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(n){var r={};n.forEach((function(e){if(e.startDate){var t=JD(Ti(e.startDate)),n=parseFloat(e.value);r[t]||(r[t]=[]),r[t].push(n)}}));for(var a={};e<t;){var i=e.toISOString().substr(0,10);r[i]&&(a[i]=r[i].reduce((function(e,t){return e+t}))/r[i].length),e=va(e,{days:1})}return a}))}),xT("AppleHealth",["WalkingHeartRateAverage"])),gT(vT.FitbitActiveMinutes,(function(e,t){return lT(e,t,["MinutesVeryActive","MinutesFairlyActive","MinutesLightlyActive"])}),xT("Fitbit",["MinutesVeryActive","MinutesFairlyActive","MinutesLightlyActive"])),gT(vT.FitbitLightlyActiveMinutes,(function(e,t){return lT(e,t,["MinutesLightlyActive"])}),xT("Fitbit",["MinutesLightlyActive"])),gT(vT.FitbitFairlyActiveMinutes,(function(e,t){return lT(e,t,["MinutesFairlyActive"])}),xT("Fitbit",["MinutesFairlyActive"])),gT(vT.FitbitVeryActiveMinutes,(function(e,t){return lT(e,t,["MinutesVeryActive"])}),xT("Fitbit",["MinutesVeryActive"])),gT(vT.FitbitBreathingRate,(function(e,t){return dT("BreathingRate",e,t)}),xT("Fitbit",["BreathingRate"])),gT(vT.FitbitCaloriesBurned,(function(e,t){return dT("Calories",e,t)}),xT("Fitbit",["Calories"])),gT(vT.FitbitElevatedHeartRateMinutes,(function(e,t){return fT(e,t)}),xT("Fitbit",["HeartRateZone"])),gT(vT.FitbitFatBurnHeartRateMinutes,(function(e,t){return fT(e,t,"Fat Burn")}),xT("Fitbit",["HeartRateZone"])),gT(vT.FitbitCardioHeartRateMinutes,(function(e,t){return fT(e,t,"Cardio")}),xT("Fitbit",["HeartRateZone"])),gT(vT.FitbitPeakHeartRateMinutes,(function(e,t){return fT(e,t,"Peak")}),xT("Fitbit",["HeartRateZone"])),gT(vT.FitbitFloors,(function(e,t){return dT("Floors",e,t)}),xT("Fitbit",["HeartRateZone"])),gT(vT.FitbitHrv,(function(e,t){return dT("Hrv",e,t)}),xT("Fitbit",["Floors"])),gT(vT.FitbitRestingHeartRate,pT,xT("Fitbit",["RestingHeartRate"])),gT(vT.FitbitSleepMinutes,(function(e,t){return hT(e,t,["SleepLevelRem","SleepLevelLight","SleepLevelDeep","SleepLevelAsleep"])}),xT("Fitbit",["SleepLevelRem","SleepLevelLight","SleepLevelDeep","SleepLevelAsleep"])),gT(vT.FitbitLightSleepMinutes,(function(e,t){return hT(e,t,["SleepLevelLight"])}),xT("Fitbit",["SleepLevelLight"])),gT(vT.FitbitRemSleepMinutes,(function(e,t){return hT(e,t,["SleepLevelRem"])}),xT("Fitbit",["SleepLevelRem"])),gT(vT.FitbitDeepSleepMinutes,(function(e,t){return hT(e,t,["SleepLevelDeep"])}),xT("Fitbit",["SleepLevelDeep"])),gT(vT.FitbitSpO2,(function(e,t){return dT("SpO2",e,t)}),xT("Fitbit",["SpO2"])),gT(vT.FitbitSteps,mT,xT("Fitbit",["Steps"])),gT(vT.GoogleFitSteps,(function(e,t){return iT({namespace:"GoogleFit",type:"Steps",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate){var n=ji(Ti(e.startDate)).substring(0,10);t[n]||(t[n]=0),t[n]+=parseFloat(e.value)}})),t}))}),xT("GoogleFit",["Steps"])),gT(vT.RestingHeartRate,(function(e,t){return iT({namespace:"AppleHealth",type:"RestingHeartRate",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(n){return pT(e,t).then((function(r){var a={};n.forEach((function(e){if(e.startDate){var t=JD(Ti(e.startDate)),n=parseFloat(e.value);a[t]||(a[t]=[]),a[t].push(n)}}));for(var i={};e<t;){var o=JD(e);r[o]&&(a[o]||(a[o]=[]),a[o].push(r[o])),a[o]&&(i[o]=a[o].reduce((function(e,t){return e+t}))/a[o].length),e=va(e,{days:1})}return i}))}))}),(function(e){return xT("AppleHealth",["RestingHeartRate"])(e).then((function(t){return t||xT("Fitbit",["RestingHeartRate"])(e)}))})),gT(vT.Steps,(function(e,t){var n=mT(e,t),r=uT(e,t);return Promise.all([n,r]).then((function(n){for(var r={};e<t;){var a=JD(e),i=null;n[0][a]&&(i=n[0][a]),n[1][a]&&(null==i||n[1][a]>i)&&(i=n[1][a]),i&&(r[a]=i),e=va(e,{days:1})}return r}))}),(function(e){return xT("AppleHealth",["Steps"])(e).then((function(t){return t||xT("Fitbit",["Steps"])(e)}))}));var OT=[{id:1,lastRefreshDate:va(new Date,{days:-1}).toISOString(),status:"fetchComplete",provider:{id:37,name:"Cedars-Sinai Health System",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/37/logo"}},{id:2,lastRefreshDate:va(new Date,{hours:-8}).toISOString(),status:"unauthorized",provider:{id:1,name:"CareEvolution FHIR",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/1/logo"}}];function ET(e){var n=a(!0),r=n[0],o=n[1],c=a([]),s=c[0],u=c[1];function l(){if("Default"==e.previewState)return o(!1),void d(OT);f()}function f(){v.getExternalAccounts().then((function(t){e.externalAccountProviderCategories&&(t=t.filter((function(t){var n;return-1!=(null===(n=e.externalAccountProviderCategories)||void 0===n?void 0:n.indexOf(t.provider.category))}))),d(t),o(!1)}))}function d(t){u(t),e.onExternalAccountsLoaded&&e.onExternalAccountsLoaded(t)}return i((function(){return l(),v.on("applicationDidBecomeVisible",l),v.on("externalAccountSyncComplete",l),function(){v.off("applicationDidBecomeVisible",l),v.off("externalAccountSyncComplete",l)}}),[]),t.createElement("div",{className:"mdhui-external-account-list"},s&&s.map((function(e){return t.createElement(ao,{key:e.id.toString()+e.lastRefreshDate},t.createElement(xo,{externalAccount:e,onAccountRemoved:function(e){return o(!0),void f()},onReconnectAccount:function(e){return function(e){v.connectExternalAccount(e.provider.id)}(e)}}))})),r&&t.createElement(po,null))}Qr(".mdhui-external-accounts-preview\n{\n}\n\n .mdhui-external-accounts-preview .external-account-title\n {\n font-size:.88em;\n }");var AT=[{id:1,lastRefreshDate:va(new Date,{days:-1}).toISOString(),provider:{id:37,name:"Cedars-Sinai Health System",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/37/logo"},status:"fetchComplete"},{id:2,lastRefreshDate:va(new Date,{days:-4}).toISOString(),provider:{id:20,name:"Anthem",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/37/logo"},status:"fetchComplete"}];function MT(e){var n=a(null),r=n[0],o=n[1];function c(){"Default"!=e.previewState?v.getExternalAccounts().then((function(t){e.excludeDeviceManufacturers&&(t=t.filter((function(e){return"Device Manufacturer"!=e.provider.category}))),o(t)})):o(AT)}if(i((function(){return c(),v.on("applicationDidBecomeVisible",c),function(){v.off("applicationDidBecomeVisible",c)}}),[]),!r||!r.length)return null;var s=e.excludeDeviceManufacturers?"external-accounts-title-without-devices":"external-accounts-title";return t.createElement("div",{className:"mdhui-external-accounts-preview"},t.createElement(ea,{title:vo[s],onClick:function(){"preview"==e.applicationUrl?console.log("PREVIEW: Opening the external accounts application."):v.openApplication(e.applicationUrl)}},r.map((function(e){return t.createElement("div",{key:e.id,className:"external-account-title"},e.provider.name)}))))}function _T(){return _T=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},_T.apply(this,arguments)}function jT(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}Qr(".mdhui-fitbit-devices\n{\n}\n\n .mdhui-fitbit-devices .fitbit-device\n {\n border-bottom: solid 1px var(--color-border);\n padding: 16px;\n position: relative;\n padding-left: 48px;\n }\n\n .mdhui-fitbit-devices .fitbit-device:last-child\n {\n border-bottom: none;\n }\n\n .mdhui-fitbit-devices .fitbit-device .device-icon\n {\n position: absolute;\n left: 16px;\n top: calc(50% - 8px);\n color: var(--color-muted2);\n font-size: 16px;\n }\n\n .mdhui-fitbit-devices .fitbit-device .device-title\n {\n font-weight: bold;\n font-size: .88em;\n }\n\n .mdhui-fitbit-devices .fitbit-device .device-sync\n {\n font-size: .88em;\n color: var(--color-muted);\n }\n\n\n .mdhui-fitbit-devices .fitbit-device .battery-icon\n {\n position: absolute;\n font-size: 21px;\n right: 16px;\n top: calc(50% - 11px);\n }\n\n .mdhui-fitbit-devices .fitbit-device .battery-icon.battery-empty,\n .mdhui-fitbit-devices .fitbit-device .battery-icon.battery-low\n {\n color: var(--color-danger);\n }\n\n .mdhui-fitbit-devices .fitbit-device .battery-icon.battery-medium\n {\n color: var(--color-warning);\n }\n\n .mdhui-fitbit-devices .fitbit-device .battery-icon.battery-high\n {\n color: var(--color-success);\n }\n");var PT=f((function(e,n){var r=e.color,a=void 0===r?"currentColor":r,i=e.size,o=void 0===i?24:i,c=jT(e,["color","size"]);return t.createElement("svg",_T({ref:n,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:a,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},c),t.createElement("circle",{cx:"12",cy:"12",r:"7"}),t.createElement("polyline",{points:"12 9 12 12 13.5 13.5"}),t.createElement("path",{d:"M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"}))}));PT.propTypes={color:yr.string,size:yr.oneOfType([yr.string,yr.number])},PT.displayName="Watch";var CT=PT,DT=[{id:"1109644c-dea3-ec11-aaab-f47bb6835a10",namespace:"Fitbit",insertedDate:"2022-03-14T21:32:51.413Z",modifiedDate:"2022-03-14T21:32:51.413Z",identifier:"806637943",type:"Device",value:"Charge 3",properties:{Battery:"High",Type:"TRACKER",DataLakeUrl:"https://pep-device-data-qa.s3.amazonaws.com/fitbit-devices/d9134fe6-a777-ec11-aaa8-89aad5fbf200/devices.json"},observationDate:"2022-03-14T17:31:24+00:00"},{id:"1009644c-dea3-ec11-aaab-f47bb6835a10",namespace:"Fitbit",insertedDate:"2022-03-14T21:32:51.397Z",modifiedDate:"2022-03-14T21:32:51.397Z",identifier:"F-31-A4C138BBAE04",type:"Device",value:"Aria Air",properties:{Battery:"Low",Type:"SCALE",DataLakeUrl:"https://pep-device-data-qa.s3.amazonaws.com/fitbit-devices/d9134fe6-a777-ec11-aaa8-89aad5fbf200/devices.json"},observationDate:"2022-01-12T18:34:23+00:00"}];function TT(e){var n=a([]),r=n[0],o=n[1];function c(){if("connected"!=e.previewState)if("notEnabled"!=e.previewState&&"notConnected"!=e.previewState){v.queryDeviceData({namespace:"Fitbit",type:"Device"}).then((function(e){o(e.deviceDataPoints)}))}else o([]);else o(DT)}if(i((function(){return c(),v.on("applicationDidBecomeVisible",c),v.on("externalAccountSyncComplete",c),function(){v.off("applicationDidBecomeVisible",c),v.off("externalAccountSyncComplete",c)}}),[]),!r.length)return null;var s="es"==v.getCurrentLanguage()?no:gi;return t.createElement("div",{className:"mdhui-fitbit-devices"},t.createElement(io,{title:"Fitbit "+vo.devices}),r.map((function(e){var n,r,a,i,o,c;return t.createElement("div",{key:e.id.toString(),className:"fitbit-device"},"TRACKER"==(null===(n=e.properties)||void 0===n?void 0:n.Type)&&t.createElement("div",{className:"device-icon"},t.createElement(CT,{size:"16"})),"SCALE"==(null===(r=e.properties)||void 0===r?void 0:r.Type)&&t.createElement("div",{className:"device-icon"},t.createElement(Dr,{icon:Rr})),t.createElement("div",{className:"device-info"},t.createElement("div",{className:"device-title"},e.value),e.observationDate&&t.createElement("div",{className:"device-sync"},vo["last-sync"]," ",Pi(Ti(e.observationDate),new Date,{locale:s}))),"Empty"==(null===(a=e.properties)||void 0===a?void 0:a.Battery)&&t.createElement("div",{className:"battery-icon battery-empty"},t.createElement(Dr,{icon:Wr,transform:{rotate:-90}})),"Low"==(null===(i=e.properties)||void 0===i?void 0:i.Battery)&&t.createElement("div",{className:"battery-icon battery-low"},t.createElement(Dr,{icon:Zr,transform:{rotate:-90}})),"Medium"==(null===(o=e.properties)||void 0===o?void 0:o.Battery)&&t.createElement("div",{className:"battery-icon battery-medium"},t.createElement(Dr,{icon:Vr,transform:{rotate:-90}})),"High"==(null===(c=e.properties)||void 0===c?void 0:c.Battery)&&t.createElement("div",{className:"battery-icon battery-high"},t.createElement(Dr,{icon:Yr,transform:{rotate:-90}})))})))}function NT(e){var n=a(!1),r=n[0],i=n[1],o=new Date,c=a(new Date(o.getFullYear(),o.getMonth(),1,0,0,0,0)),s=c[0],u=c[1];function l(){i(!0)}var f=s.getMonth(),d=s.getFullYear();return t.createElement("div",{style:{display:r?"block":"none"}},t.createElement(oo,{intervalType:"Month",intervalStart:s,onIntervalChange:function(e){u(e)}}),t.createElement(kT,{onDataDetected:function(){return l()},previewState:"connected"==e.previewState?"WithData":"notEnabled"==e.previewState||"notConnected"==e.previewState?"NoData":void 0,lines:[{showAverage:!0,dailyDataType:vT.FitbitSteps,label:vo.steps}],title:vo.steps,syncId:"fitbit",month:f,year:d}),t.createElement(kT,{onDataDetected:function(){return l()},previewState:"connected"==e.previewState?"WithData":"notEnabled"==e.previewState||"notConnected"==e.previewState?"NoData":void 0,lines:[{showAverage:!0,dailyDataType:vT.FitbitRestingHeartRate,label:vo["resting-heart-rate"]}],title:vo["resting-heart-rate"],month:f,year:d,syncId:"DeviceDataCharts"}))}Qr(".mdhui-most-recent-notification\n{\n}\n\n .mdhui-most-recent-notification .mdhui-notification\n {\n border-bottom: solid 1px var(--color-border);\n }\n\n .mdhui-most-recent-notification .mdhui-action .subtitle\n {\n color: var(--color-primary);\n }\n");var IT={id:"1",identifier:"SurveyReminder",sentDate:"2022-03-10T13:37:41.16+00:00",statusCode:"Succeeded",type:"Push",content:{title:"Please Complete Your Surveys",body:"Your latest surveys are due"},recipients:[],contentVersion:0};function RT(e){var n=a(null),r=n[0],o=n[1];function c(){if("Default"!=e.previewState){var t={limit:1,statusCode:"Succeeded"};if(e.hideAfterHours){var n=va(new Date,{hours:-1*e.hideAfterHours});t.sentAfter=n.toISOString()}e.notificationType&&(t.type=e.notificationType),v.queryNotifications(t).then((function(e){e.notifications.length&&o(e.notifications[0])}))}else o(IT)}return i((function(){return c(),v.on("applicationDidBecomeVisible",c),function(){v.off("applicationDidBecomeVisible",c)}}),[]),r?t.createElement("div",{className:"mdhui-most-recent-notification"},t.createElement(wo,{notification:r}),e.onViewMore&&t.createElement(ea,{subtitle:vo["all-notifications"],onClick:e.onViewMore})):null}var FT=[{id:"1",identifier:"SurveyReminder",sentDate:(new Date).toISOString(),statusCode:"Succeeded",type:"Push",content:{body:"Thank you for completing your surveys!"},recipients:[],contentVersion:1},{id:"2",identifier:"SurveyReminder",sentDate:va(new Date,{hours:-1}).toISOString(),statusCode:"Succeeded",type:"Push",content:{title:"Please Complete Your Surveys",body:"Your latest surveys are due"},recipients:[],contentVersion:1},{id:"4",identifier:"SurveyReminder",sentDate:va(new Date,{days:-1}).toISOString(),statusCode:"Succeeded",type:"Push",content:{title:"Have you received your Fitbit? Connect it!"},recipients:[],contentVersion:1},{id:"5",identifier:"SurveyReminder",sentDate:va(new Date,{days:-2}).toISOString(),statusCode:"Succeeded",type:"Push",content:{title:"Consent and get a Fitbit",body:"Are you missing out on a Fitbit device? Complete your consent - you could get a new Fitbit at no cost to you!"},recipients:[],contentVersion:1}];function zT(e,t){var r=n();i((function(){r.current=e}),[e]),i((function(){if(null!==t){var e=setInterval((function(){r.current&&r.current()}),t);return function(){return clearInterval(e)}}}),[t])}function LT(e){var r=n(null);return zT((function(){var t,n,a;!r.current||(t=r.current,n=t.getBoundingClientRect(),a=Math.max(document.documentElement.clientHeight,window.innerHeight),n.bottom<0||n.top-a>=0)||e.onTrigger()}),e.enabled?1e3:null),t.createElement("div",null,e.enabled&&t.createElement("div",{style:{height:"0px"},ref:r}))}function HT(e){var n=a(!1),r=n[0],o=n[1],c=a(void 0),s=c[0],u=c[1],l=a(!1),f=l[0],d=l[1],p=a([]),h=p[0],m=p[1];function y(){if("Default"==e.previewState&&m(FT),e.previewState)return o(!1),void d(!0);if(!r&&!f){o(!0);var t={statusCode:"Succeeded",limit:10};e.notificationType&&(t.type=e.notificationType),s&&(t.pageID=s),v.queryNotifications(t).then((function(e){m(h.concat(e.notifications)),o(!1),e.nextPageID||d(!0),u(e.nextPageID)}))}}return i((function(){y();var e=function(){m([]),u(void 0),d(!1),y()};return v.on("applicationDidBecomeVisible",e),function(){v.off("applicationDidBecomeVisible",e)}}),[]),t.createElement("div",{className:"mdhui-notification-list"},h&&h.map((function(e){return t.createElement(ao,{key:e.id.toString()},t.createElement(wo,{notification:e}))})),r&&!f&&t.createElement(po,null),!r&&f&&0==h.length&&t.createElement(ao,null,t.createElement(Mo,null,vo["no-notifications-received"])),t.createElement(LT,{onTrigger:y,enabled:!r&&!f}))}function BT(e){var n=a(""),r=n[0],o=n[1];return i((function(){v.getDeviceInfo().then((function(e){e&&o(e.platform)}))}),[]),-1==e.platforms.indexOf(r)?null:t.createElement("div",null,e.children)}function UT(e){var n=a(!0),r=n[0],o=n[1],c=a(null),s=c[0],u=c[1];function l(){if("Default"==e.previewState)return u({name:"My Project Name",organization:{name:"My Organization Name",color:"#0076BE",logoUrl:"https://rkstudio.careevolution.com/inv/api/researchkit/organizationbrandingimage/1e1853a2-50d3-4e26-863d-d8546bce63e3"}}),void o(!1);v.getProjectInfo().then((function(e){u(e),o(!1)}))}i((function(){return l(),v.on("applicationDidBecomeVisible",l),function(){v.off("applicationDidBecomeVisible",l)}}),[]);var f=null==s?void 0:s.organization.logoUrl;return f&&!(null==f?void 0:f.startsWith("http"))&&(f=v.baseUrl+(null==s?void 0:s.organization.logoUrl)),t.createElement("div",{className:"mdhui-project-header"},r&&t.createElement(po,null),!r&&s&&t.createElement("div",null,t.createElement("div",{style:{backgroundImage:"url('"+f+"')"},className:"logo"}),t.createElement("div",{className:"project-info"},t.createElement("div",{className:"project-name",style:{color:s.organization.color}},s.name),t.createElement("div",{className:"organization-name"},s.organization.name))))}Qr(".mdhui-project-header\n{\n padding: 16px;\n text-align: center;\n background: #FFF;\n border-bottom: solid 1px #ddd;\n}\n\n .mdhui-project-header .logo\n {\n display: inline-block;\n width: 48px;\n height: 48px;\n background-size: contain;\n background-position: center center;\n background-repeat: no-repeat;\n vertical-align: middle;\n }\n\n .mdhui-project-header .project-info\n {\n display: inline-block;\n text-align: left;\n padding-left: 16px;\n vertical-align: top;\n padding-right: 16px;\n max-width: calc(100% - 80px);\n }\n\n .mdhui-project-header .project-info .project-name\n {\n font-weight: bold;\n font-size: 1.5em;\n max-width: 100%;\n }\n\n .mdhui-project-header .project-info .organization-name\n {\n max-width: 100%;\n }\n");function VT(e){var n=a(!0),r=n[0],o=n[1],c=a(null),s=c[0],u=c[1];function l(){if("Default"==e.previewState)return u({supportEmail:"test@example.com",supportPhone:"555-555-1212",learnMoreLink:"https://mydatahelps.org",learnMoreTitle:"Project Home Page"}),void o(!1);v.getProjectInfo().then((function(e){u(e),o(!1)}))}return i((function(){return l(),v.on("applicationDidBecomeVisible",l),function(){v.off("applicationDidBecomeVisible",l)}}),[]),!s||s.supportEmail||s.supportPhone||s.learnMoreLink&&s.learnMoreTitle?t.createElement("div",{className:"mdhui-project-support"},t.createElement("div",{className:"title"},vo.support),r&&t.createElement(po,null),(null==s?void 0:s.learnMoreLink)&&(null==s?void 0:s.learnMoreTitle)&&t.createElement(ea,{indicatorIcon:Nr,subtitle:s.learnMoreTitle,onClick:function(){return v.openEmbeddedUrl(s.learnMoreLink)}}),(null==s?void 0:s.supportEmail)&&t.createElement(ea,{indicatorIcon:Ur,subtitle:s.supportEmail,onClick:function(){return v.openExternalUrl("mailto:"+s.supportEmail)}}),(null==s?void 0:s.supportPhone)&&t.createElement(ea,{indicatorIcon:Hr,subtitle:s.supportPhone,onClick:function(){return v.openExternalUrl("tel:"+s.supportPhone)}})):null}Qr(".mdhui-project-support\n{\n}\n\n .mdhui-project-support > .title\n {\n font-weight: bold;\n padding: 16px;\n padding-bottom: 0;\n }\n\n .mdhui-project-support .mdhui-action\n {\n color: var(--color-primary);\n border-bottom: solid 1px var(--color-border);\n }\n\n .mdhui-project-support .mdhui-action .subtitle\n {\n color: var(--color-primary);\n }\n");Qr(".mdhui-provider-search\n{\n}\n\n .mdhui-provider-search .title\n {\n font-weight: bold;\n padding: 16px;\n }\n\n .mdhui-provider-search .search-bar-wrapper\n {\n text-align: left;\n box-sizing: border-box;\n font-weight: bold;\n border-bottom: solid 1px #ddd;\n }\n\n .mdhui-provider-search .search-bar-wrapper .search-bar\n {\n position: relative;\n }\n\n .mdhui-provider-search .search-bar-wrapper .search-bar input\n {\n padding: 0;\n margin: 0;\n border: 0;\n width: 100%;\n line-height: 1.5em;\n padding-left: 40px;\n box-sizing: border-box;\n font-size: .88em;\n padding-top: 8px;\n padding-bottom: 8px;\n border: none;\n }\n\n .mdhui-provider-search .search-bar-wrapper .search-bar .fa-magnifying-glass\n {\n position: absolute;\n left: 16px;\n top: 12px;\n color: #bbb;\n font-size: .8em;\n }\n\n .mdhui-provider-search .search-results .provider\n {\n border-bottom: solid 1px #ddd;\n padding: 16px;\n position: relative;\n padding-right: 96px;\n cursor: pointer;\n font-size: .88em;\n line-height: 1.25em;\n }\n\n .mdhui-provider-search .search-results .provider .provider-logo\n {\n height: 37px;\n width: 64px;\n position: absolute;\n right: 16px;\n top: 8px;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n }\n\n .mdhui-provider-search .search-results .provider .provider-info\n {\n }\n\n .mdhui-provider-search .search-results .provider .provider-status\n {\n font-size: .88em;\n font-weight: bold;\n }\n\n .mdhui-provider-search .search-results .provider .provider-status.error-status\n {\n color: #c4291c;\n }\n\n .mdhui-provider-search .search-results .provider .provider-status.connected-status\n {\n color: #5db37e;\n }\n");var WT=[{id:20,name:"1upHealth sandbox",category:"Health Plan",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/20/logo"},{id:13,name:"A Woman's Place, LLC",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/13/logo"},{id:130,name:"Abington Jefferson Health",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/130/logo"},{id:41,name:"Access Community Health Network",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/41/logo"},{id:125,name:"Aurora Health Care - myAurora",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/125/logo"},{id:1,name:"CareEvolution FHIR",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/1/logo"},{id:37,name:"Cedars-Sinai Health System",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/37/logo"},{id:27,name:"Maui Medical Group",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/27/logo"}],$T=0;function YT(e){var r=a({}),o=r[0],c=r[1],s=a([]),u=s[0],l=s[1],f=a(!0),d=f[0],p=f[1],h=a(""),y=h[0],g=h[1],b=a(0),x=b[0],w=b[1],k=a(0),S=k[0],O=k[1],E=n(y);function A(){return rT(this,void 0,void 0,(function(){return aT(this,(function(e){return v.getExternalAccounts().then((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].provider.id]=e[n];c(t)})),[2]}))}))}function M(t){p(!0);var n=++$T;v.getExternalAccountProviders(t,null,100,x).then((function(t){if(n==$T){var r=u.concat(t.externalAccountProviders.filter((function(t){var n;return-1!=(null===(n=e.providerCategories)||void 0===n?void 0:n.indexOf(t.category))})));l(r),O(t.totalExternalAccountProviders),p(!1)}}))}var _=m((function(){return e=M,void 0===(t=300)&&(t=300),function(){for(var r=this,a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];clearTimeout(n),n=setTimeout((function(){return e.apply(r,a)}),t)};var e,t,n}),[]);function j(t){var n;n=t.target.value,E.current=n,g(n),l([]),w(0),e.previewState||_(t.target.value)}function P(){A().then((function(){M(E.current)}))}return i((function(){return function(){if("Default"==e.previewState)return l(WT),void p(!1);A().then((function(){M("")}))}(),v.on("applicationDidBecomeVisible",P),function(){v.off("applicationDidBecomeVisible",P)}}),[]),i((function(){d||M(E.current)}),[x]),t.createElement("div",{className:"mdhui-provider-search"},t.createElement("div",{className:"search-bar-wrapper"},t.createElement("div",{className:"search-bar"},t.createElement("input",{type:"text",value:y,onChange:function(e){return j(e)},placeholder:vo.search,spellCheck:"false",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"}),t.createElement(Dr,{icon:$r}))),t.createElement("div",{className:"search-results"},u&&u.map((function(e){return t.createElement("div",{key:e.id,className:"provider",onClick:function(){return t=e.id,void(o[t]&&"unauthorized"!=o[t].status||v.connectExternalAccount(t));var t}},e.logoUrl&&t.createElement("div",{className:"provider-logo",style:{backgroundImage:"url('"+e.logoUrl+"')"}}),t.createElement("div",{className:"provider-info"},t.createElement("div",{className:"provider-name"},e.name),o[e.id]&&"unauthorized"==o[e.id].status&&t.createElement("div",{className:"provider-status error-status"},vo.reconnect),o[e.id]&&"unauthorized"!=o[e.id].status&&t.createElement("div",{className:"provider-status connected-status"},vo.connected)))})),d&&t.createElement(po,null)),t.createElement(LT,{onTrigger:function(){w(x+1)},enabled:100*(x+1)<S}))}Qr(".mdhui-survey-task-list\n{\n}\n\n .mdhui-survey-task-list .mdhui-single-survey-task\n {\n border-bottom: solid 1px #eee;\n }\n\n .mdhui-survey-task-list .mdhui-single-survey-task:last-child\n {\n border: none;\n }\n\n .mdhui-survey-task-list .title\n {\n font-weight: bold;\n padding: 16px;\n padding-bottom: 0;\n }\n\n .mdhui-survey-task-list .empty-message\n {\n padding: 16px;\n font-size: .88em;\n }\n");var qT=[{id:"ecf8a7df-caa3-ec11-aaab-f47bb6835a10",surveyID:"53ad3e98-9777-ec11-aaa8-89aad5fbf200",surveyName:"Mood Survey",surveyDisplayName:"Mood Survey",surveyDescription:"3 minutes",status:"incomplete",hasSavedProgress:!1,dueDate:va(new Date,{days:-1}).toISOString(),insertedDate:"2022-03-14T19:13:48.283Z",modifiedDate:"2022-03-14T19:13:48.283Z",linkIdentifier:"1"},{id:"e7f8a7df-caa3-ec11-aaab-f47bb6835a10",surveyID:"53ad3e98-9777-ec11-aaa8-89aad5fbf200",surveyName:"Pregnancy (Followup)",surveyDisplayName:"Pregnancy: Followup",surveyDescription:"3 minutes",status:"incomplete",hasSavedProgress:!1,dueDate:va(new Date,{days:0}).toISOString(),insertedDate:"2022-03-14T19:13:48.283Z",modifiedDate:"2022-03-14T19:13:48.283Z",linkIdentifier:"1"},{id:"b1c9bcd2-80a4-ec11-aaab-f47bb6835a10",surveyID:"cd452353-7674-ec11-aaa8-89aad5fbf200",surveyName:"Alcohol and Tobacco",surveyDisplayName:"Alcohol and Tobacco",surveyDescription:"5 minutes",status:"incomplete",hasSavedProgress:!1,dueDate:va(new Date,{days:1}).toISOString(),insertedDate:"2022-03-15T16:56:15.007Z",modifiedDate:"2022-03-15T16:56:15.007Z",linkIdentifier:"1"},{id:"2c9ab4d9-80a4-ec11-aaab-f47bb6835a10",surveyID:"a7f58ba8-9777-ec11-aaa8-89aad5fbf200",surveyName:"SDOH: Followup",surveyDisplayName:"Social Determinants of Health: Followup",surveyDescription:"5 minutes",status:"incomplete",hasSavedProgress:!1,dueDate:va(new Date,{days:10}).toISOString(),insertedDate:"2022-03-15T16:56:26.703Z",modifiedDate:"2022-03-15T16:56:26.703Z",linkIdentifier:"1"}],GT=[{id:"2c9ab4d9-80a4-ec11-aaab-f47bb6835a10",surveyID:"a7f58ba8-9777-ec11-aaa8-89aad5fbf200",surveyName:"SDOH: Followup",surveyDisplayName:"Social Determinants of Health: Followup",surveyDescription:"5 minutes",status:"complete",endDate:(new Date).toISOString(),hasSavedProgress:!1,dueDate:va(new Date,{days:10}).toISOString(),insertedDate:"2022-03-15T16:56:26.703Z",modifiedDate:"2022-03-15T16:56:26.703Z",linkIdentifier:"1"},{id:"b1c9bcd2-80a4-ec11-aaab-f47bb6835a10",surveyID:"cd452353-7674-ec11-aaa8-89aad5fbf200",surveyName:"Alcohol and Tobacco",surveyDisplayName:"Alcohol and Tobacco",surveyDescription:"5 minutes",status:"complete",hasSavedProgress:!1,endDate:va(new Date,{days:-1}).toISOString(),dueDate:va(new Date,{days:10}).toISOString(),insertedDate:"2022-03-15T16:56:15.007Z",modifiedDate:"2022-03-15T16:56:15.007Z",linkIdentifier:"1"},{id:"e7f8a7df-caa3-ec11-aaab-f47bb6835a10",surveyID:"53ad3e98-9777-ec11-aaa8-89aad5fbf200",surveyName:"Pregnancy (Followup)",surveyDisplayName:"Pregnancy: Followup",surveyDescription:"3 minutes",status:"complete",hasSavedProgress:!1,endDate:va(new Date,{days:-2}).toISOString(),dueDate:va(new Date,{days:10}).toISOString(),insertedDate:"2022-03-14T19:13:48.283Z",modifiedDate:"2022-03-14T19:13:48.283Z",linkIdentifier:"1"}];function XT(e){var n,r=a(!0),o=r[0],c=r[1],s=a(null),u=s[0],l=s[1];function f(){if("IncompleteTasks"!=e.previewState)if("CompleteTasks"!=e.previewState){var t,n;t=[],n=function(r){var a={status:e.status};return r&&(a.pageID=r),v.querySurveyTasks(a).then((function(r){t=t.concat(r.surveyTasks),r.nextPageID?n(r.nextPageID):("incomplete"==e.status&&t.sort((function(e,t){return Ti(e.dueDate)>Ti(t.dueDate)?1:Ti(e.dueDate)<Ti(t.dueDate)?-1:0})),"complete"==e.status&&t.sort((function(e,t){return e.endDate&&t.endDate?Ti(e.endDate)>Ti(t.endDate)?-1:Ti(e.endDate)<Ti(t.endDate)?1:0:0})),l(t),c(!1))}))},n(null)}else l(GT);else l(qT)}return i((function(){return f(),v.on("applicationDidBecomeVisible",f),function(){v.off("applicationDidBecomeVisible",f)}}),[]),"complete"!=e.status||(null==u?void 0:u.length)?t.createElement("div",{className:"mdhui-survey-task-list"},e.title&&t.createElement(io,{title:e.title,detailLinkText:e.onDetailLinkClick?vo["view-all"]+" ("+(null!==(n=null==u?void 0:u.length)&&void 0!==n?n:0)+")":void 0,onDetailClick:e.onDetailLinkClick}),o&&!u&&t.createElement(po,null),!(null==u?void 0:u.length)&&!o&&t.createElement("div",{className:"empty-message"},vo["all-tasks-complete"]),null==u?void 0:u.slice(0,e.limit).map((function(n){return t.createElement(So,{key:n.id.toString(),task:n,disableClick:o,hideDueDate:e.hideDueDate})}))):null}function ZT(e){return t.createElement(fo,null,e.presentation&&t.createElement(yo,{title:vo["connect-ehr-title"],showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),!e.presentation&&t.createElement(Ao,{color:"var(--main-bg-color)"}),t.createElement(Mo,null,vo["ehr-intro"]),t.createElement(ao,null,t.createElement(MT,{previewState:e.preview?"Default":void 0,applicationUrl:e.externalAccountsApplicationUrl,excludeDeviceManufacturers:!0})),t.createElement(ao,null,t.createElement(YT,{previewState:e.preview?"Default":void 0,providerCategories:["Provider","Health Plan"]})))}function KT(e){return t.createElement(fo,null,t.createElement(Ao,{color:"var(--main-bg-color)"}),t.createElement(BT,{platforms:["Android"]},t.createElement(ao,null,t.createElement(ea,{title:"Google Fit",subtitle:vo["google-fit-share"],onClick:function(){return v.showGoogleFitSettings()}}))),t.createElement(ao,null,t.createElement(Do,{previewState:e.preview?"notConnected":void 0})),t.createElement(ao,null,t.createElement(TT,{previewState:e.preview?"connected":void 0})),t.createElement(ao,{allowOverflow:!0},t.createElement(ST,{previewState:e.preview?"Default":void 0})))}function JT(e){var n=e.excludeDeviceManufacturers?"external-accounts-title-without-devices":"external-accounts-title";return t.createElement(fo,null,e.presentation&&t.createElement(yo,{title:vo[n],showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),!e.presentation&&t.createElement(Ao,{color:"var(--main-bg-color)"}),t.createElement(ET,{previewState:e.preview?"Default":void 0,externalAccountProviderCategories:["Provider","Health Plan"],onExternalAccountsLoaded:function(t){0===t.length&&("Modal"===e.presentation?v.dismiss():v.back())}}))}function QT(e){return t.createElement(fo,null,t.createElement(Ao,{color:"var(--main-bg-color)"}),t.createElement(ao,null,t.createElement(Do,{previewState:e.connectPreview,disabledBehavior:"displayError"})),t.createElement(ao,null,t.createElement(TT,{previewState:e.devicesPreview})),t.createElement(ao,{allowOverflow:!0},t.createElement(NT,{previewState:e.chartsPreview})))}function eN(e){var n="Push";e.notificationType&&(n=e.notificationType);return t.createElement(fo,null,t.createElement(Ao,null),t.createElement(UT,{previewState:e.preview?"Default":void 0}),t.createElement(ao,null,t.createElement(RT,{notificationType:n,onViewMore:e.notificationsViewUrl?function(){e.notificationsViewUrl&&v.openApplication(e.notificationsViewUrl)}:void 0,previewState:e.preview?"Default":void 0,hideAfterHours:e.notificationHideAfterHours})),t.createElement(ao,null,t.createElement(XT,{status:"incomplete",limit:3,title:vo.tasks,onDetailLinkClick:e.tasksViewUrl?function(){e.tasksViewUrl&&v.openApplication(e.tasksViewUrl)}:void 0,hideDueDate:e.hideTaskDueDate,previewState:e.preview?"IncompleteTasks":void 0})),t.createElement(ao,null,t.createElement(Do,{title:"Fitbit",previewState:e.preview?"notConnected":void 0})),t.createElement(ao,null,e.ehrConnectApplicationUrl&&t.createElement(Co,{previewState:e.preview?"enabled":void 0,applicationUrl:e.ehrConnectApplicationUrl})),t.createElement(ao,null,t.createElement(VT,{previewState:e.preview?"Default":void 0})))}function tN(e){var n="Push";return e.notificationType&&(n=e.notificationType),t.createElement(fo,null,e.presentation&&t.createElement(yo,{title:vo.notifications,showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),!e.presentation&&t.createElement(Ao,{color:"var(--main-bg-color)"}),t.createElement(HT,{notificationType:n,previewState:e.preview?"Default":void 0}))}function nN(e){return t.createElement(fo,null,e.presentation&&t.createElement(yo,{title:vo.tasks,showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),!e.presentation&&t.createElement(Ao,{color:"var(--main-bg-color)"}),!e.hideIncompleteTasks&&t.createElement(ao,null,t.createElement(XT,{title:vo["incomplete-tasks"],status:"incomplete",hideDueDate:e.hideDueDate,previewState:e.preview?"IncompleteTasks":void 0})),!e.hideCompleteTasks&&t.createElement(ao,null,t.createElement(XT,{title:vo["completed-tasks"],status:"complete",hideDueDate:e.hideDueDate,previewState:e.preview?"CompleteTasks":void 0})))}export{ea as Action,ta as ActivityMeter,na as Button,ro as Calendar,ao as Card,io as CardTitle,Co as ConnectEhr,ZT as ConnectEhrView,Do as ConnectFitbit,vT as DailyDataType,oo as DateRangeNavigator,co as DayTrackerSymbol,kT as DeviceDataMonthChart,ST as DeviceDataMonthCharts,KT as DeviceDataView,ET as ExternalAccountList,MT as ExternalAccountsPreview,JT as ExternalAccountsView,so as Face,TT as FitbitDevices,NT as FitbitMonthCharts,QT as FitbitView,lo as Histogram,eN as HomeView,fo as Layout,po as LoadingIndicator,RT as MostRecentNotification,yo as NavigationBar,HT as NotificationList,tN as NotificationsView,BT as PlatformSpecificContent,UT as ProjectHeader,VT as ProjectSupport,YT as ProviderSearch,YT as RestingHeartRateCalendar,go as Section,bo as SegmentedControl,uo as ShinyOverlay,xo as SingleExternalAccount,wo as SingleNotification,So as SingleSurveyTask,Oo as SparkBarChart,Ao as StatusBarBackground,XT as SurveyTaskList,nN as SurveyTasksView,Eo as Switch,Mo as TextBlock,_o as TrackerItem,jo as WeekCalendar,bT as checkDailyDataAvailability,gT as registerDailyDataProvider,zT as useInterval};
199
+ */function yw(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function gw(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:var m=e.type;switch(m){case s:case u:case r:case i:case a:case f:return m;default:var v=m&&m.$$typeof;switch(v){case c:case l:case h:case p:case o:return v;default:return d}}case n:return d}}}var x=s,w=u,k=c,S=o,O=t,E=l,A=r,M=h,_=p,j=n,P=i,C=a,D=f,T=!1;function N(e){return b(e)===u}vw.AsyncMode=x,vw.ConcurrentMode=w,vw.ContextConsumer=k,vw.ContextProvider=S,vw.Element=O,vw.ForwardRef=E,vw.Fragment=A,vw.Lazy=M,vw.Memo=_,vw.Portal=j,vw.Profiler=P,vw.StrictMode=C,vw.Suspense=D,vw.isAsyncMode=function(e){return T||(T=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(e)||b(e)===s},vw.isConcurrentMode=N,vw.isContextConsumer=function(e){return b(e)===c},vw.isContextProvider=function(e){return b(e)===o},vw.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},vw.isForwardRef=function(e){return b(e)===l},vw.isFragment=function(e){return b(e)===r},vw.isLazy=function(e){return b(e)===h},vw.isMemo=function(e){return b(e)===p},vw.isPortal=function(e){return b(e)===n},vw.isProfiler=function(e){return b(e)===i},vw.isStrictMode=function(e){return b(e)===a},vw.isSuspense=function(e){return b(e)===f},vw.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===i||e===a||e===f||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===o||e.$$typeof===c||e.$$typeof===l||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g||e.$$typeof===m)},vw.typeOf=b}(),"production"===process.env.NODE_ENV?qx.exports=Gx:qx.exports=vw;var bw={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},xw=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},ww=null,kw=null,Sw=function e(t){if(t===ww&&hu(kw))return kw;var n=[];return s.forEach(t,(function(t){Pm(t)||(qx.exports.isFragment(t)?n=n.concat(e(t.props.children)):n.push(t))})),kw=n,ww=t,n},Ow=function(e,t){var n=[],r=[];return r=hu(t)?t.map((function(e){return xw(e)})):[xw(t)],Sw(e).forEach((function(e){var t=Jf(e,"type.displayName")||Jf(e,"type.name");-1!==r.indexOf(t)&&n.push(e)})),n},Ew=function(e,t){var n=Ow(e,t);return n&&n[0]},Aw=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!sm(n)||n<=0||!sm(r)||r<=0)},Mw=["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"],_w=function e(t,n){if(t===n)return!0;var r=s.count(t);if(r!==s.count(n))return!1;if(0===r)return!0;if(1===r)return jw(hu(t)?t[0]:t,hu(n)?n[0]:n);for(var a=0;a<r;a++){var i=t[a],o=n[a];if(hu(i)||hu(o)){if(!e(i,o))return!1}else if(!jw(i,o))return!1}return!0},jw=function(e,t){if(Pm(e)&&Pm(t))return!0;if(!Pm(e)&&!Pm(t)){var n=e.props||{},r=n.children,a=gw(n,["children"]),i=t.props||{},o=i.children,c=gw(i,["children"]);return r&&o?yw(a,c)&&_w(r,o):!r&&!o&&yw(a,c)}return!1},Pw=function(e,t){var n=[],r={};return Sw(e).forEach((function(e,a){if(function(e){return e&&e.type&&im(e.type)&&Mw.indexOf(e.type)>=0}(e))n.push(e);else if(e){var i=xw(e.type),o=t[i]||{},c=o.handler,s=o.once;if(c&&(!s||!r[i])){var u=c(e,i,a);n.push(u),r[i]=!0}}})),n},Cw=nf;var Dw=function(e,t){return Cw(e,t)},Tw=bf;var Nw=function(e,t,n){for(var r=-1,a=e.length;++r<a;){var i=e[r],o=t(i);if(null!=o&&(void 0===c?o==o&&!Tw(o):n(o,c)))var c=o,s=i}return s};var Iw=Nw,Rw=function(e,t){return e>t},Fw=gd;var zw=function(e){return e&&e.length?Iw(e,Fw,Rw):void 0};var Lw=Nw,Hw=function(e,t){return e<t},Bw=gd;var Uw=function(e){return e&&e.length?Lw(e,Bw,Hw):void 0},Vw=Df,Ww=Dd,$w=ay,Yw=hu;var qw=Xv,Gw=function(e,t){return(Yw(e)?Vw:$w)(e,Ww(t))};var Xw,Zw=function(e,t){return qw(Gw(e,t),1)},Kw=!0,Jw="[DecimalError] ",Qw=Jw+"Invalid argument: ",ek=Jw+"Exponent out of range: ",tk=Math.floor,nk=Math.pow,rk=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ak=1e7,ik=tk(1286742750677284.5),ok={};function ck(e,t){var n,r,a,i,o,c,s,u,l=e.constructor,f=l.precision;if(!e.s||!t.s)return t.s||(t=new l(e)),Kw?yk(t,f):t;if(s=e.d,u=t.d,o=e.e,a=t.e,s=s.slice(),i=o-a){for(i<0?(r=s,i=-i,c=u.length):(r=u,a=o,c=s.length),i>(c=(o=Math.ceil(f/7))>c?o+1:c+1)&&(i=c,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((c=s.length)-(i=u.length)<0&&(i=c,r=u,u=s,s=r),n=0;i;)n=(s[--i]=s[i]+u[i]+n)/ak|0,s[i]%=ak;for(n&&(s.unshift(n),++a),c=s.length;0==s[--c];)s.pop();return t.d=s,t.e=a,Kw?yk(t,f):t}function sk(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Qw+e)}function uk(e){var t,n,r,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)(n=7-(r=e[t]+"").length)&&(i+=hk(n)),i+=r;(n=7-(r=(o=e[t])+"").length)&&(i+=hk(n))}else if(0===o)return"0";for(;o%10==0;)o/=10;return i+o}ok.absoluteValue=ok.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},ok.comparedTo=ok.cmp=function(e){var t,n,r,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(t=0,n=(r=i.d.length)<(a=e.d.length)?r:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1},ok.decimalPlaces=ok.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},ok.dividedBy=ok.div=function(e){return lk(this,new this.constructor(e))},ok.dividedToIntegerBy=ok.idiv=function(e){var t=this.constructor;return yk(lk(this,new t(e),0,1),t.precision)},ok.equals=ok.eq=function(e){return!this.cmp(e)},ok.exponent=function(){return dk(this)},ok.greaterThan=ok.gt=function(e){return this.cmp(e)>0},ok.greaterThanOrEqualTo=ok.gte=function(e){return this.cmp(e)>=0},ok.isInteger=ok.isint=function(){return this.e>this.d.length-2},ok.isNegative=ok.isneg=function(){return this.s<0},ok.isPositive=ok.ispos=function(){return this.s>0},ok.isZero=function(){return 0===this.s},ok.lessThan=ok.lt=function(e){return this.cmp(e)<0},ok.lessThanOrEqualTo=ok.lte=function(e){return this.cmp(e)<1},ok.logarithm=ok.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(Xw))throw Error(Jw+"NaN");if(n.s<1)throw Error(Jw+(n.s?"NaN":"-Infinity"));return n.eq(Xw)?new r(0):(Kw=!1,t=lk(mk(n,i),mk(e,i),i),Kw=!0,yk(t,a))},ok.minus=ok.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?gk(t,e):ck(t,(e.s=-e.s,e))},ok.modulo=ok.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(!(e=new r(e)).s)throw Error(Jw+"NaN");return n.s?(Kw=!1,t=lk(n,e,0,1).times(e),Kw=!0,n.minus(t)):yk(new r(n),a)},ok.naturalExponential=ok.exp=function(){return fk(this)},ok.naturalLogarithm=ok.ln=function(){return mk(this)},ok.negated=ok.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},ok.plus=ok.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?ck(t,e):gk(t,(e.s=-e.s,e))},ok.precision=ok.sd=function(e){var t,n,r,a=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(Qw+e);if(t=dk(a)+1,n=7*(r=a.d.length-1)+1,r=a.d[r]){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},ok.squareRoot=ok.sqrt=function(){var e,t,n,r,a,i,o,c=this,s=c.constructor;if(c.s<1){if(!c.s)return new s(0);throw Error(Jw+"NaN")}for(e=dk(c),Kw=!1,0==(a=Math.sqrt(+c))||a==1/0?(((t=uk(c.d)).length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=tk((e+1)/2)-(e<0||e%2),r=new s(t=a==1/0?"5e"+e:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new s(a.toString()),a=o=(n=s.precision)+3;;)if(r=(i=r).plus(lk(c,i,o+2)).times(.5),uk(i.d).slice(0,o)===(t=uk(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&"4999"==t){if(yk(i,n+1,0),i.times(i).eq(c)){r=i;break}}else if("9999"!=t)break;o+=4}return Kw=!0,yk(r,n)},ok.times=ok.mul=function(e){var t,n,r,a,i,o,c,s,u,l=this,f=l.constructor,d=l.d,p=(e=new f(e)).d;if(!l.s||!e.s)return new f(0);for(e.s*=l.s,n=l.e+e.e,(s=d.length)<(u=p.length)&&(i=d,d=p,p=i,o=s,s=u,u=o),i=[],r=o=s+u;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,a=s+r;a>r;)c=i[a]+p[r]*d[a-r-1]+t,i[a--]=c%ak|0,t=c/ak|0;i[a]=(i[a]+t)%ak|0}for(;!i[--o];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Kw?yk(e,f.precision):e},ok.toDecimalPlaces=ok.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(sk(e,0,1e9),void 0===t?t=r.rounding:sk(t,0,8),yk(n,e+dk(n)+1,t))},ok.toExponential=function(e,t){var n,r=this,a=r.constructor;return void 0===e?n=bk(r,!0):(sk(e,0,1e9),void 0===t?t=a.rounding:sk(t,0,8),n=bk(r=yk(new a(r),e+1,t),!0,e+1)),n},ok.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return void 0===e?bk(a):(sk(e,0,1e9),void 0===t?t=i.rounding:sk(t,0,8),n=bk((r=yk(new i(a),e+dk(a)+1,t)).abs(),!1,e+dk(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)},ok.toInteger=ok.toint=function(){var e=this,t=e.constructor;return yk(new t(e),dk(e)+1,t.rounding)},ok.toNumber=function(){return+this},ok.toPower=ok.pow=function(e){var t,n,r,a,i,o,c=this,s=c.constructor,u=+(e=new s(e));if(!e.s)return new s(Xw);if(!(c=new s(c)).s){if(e.s<1)throw Error(Jw+"Infinity");return c}if(c.eq(Xw))return c;if(r=s.precision,e.eq(Xw))return yk(c,r);if(o=(t=e.e)>=(n=e.d.length-1),i=c.s,o){if((n=u<0?-u:u)<=9007199254740991){for(a=new s(Xw),t=Math.ceil(r/7+4),Kw=!1;n%2&&xk((a=a.times(c)).d,t),0!==(n=tk(n/2));)xk((c=c.times(c)).d,t);return Kw=!0,e.s<0?new s(Xw).div(a):yk(a,r)}}else if(i<0)throw Error(Jw+"NaN");return i=i<0&&1&e.d[Math.max(t,n)]?-1:1,c.s=1,Kw=!1,a=e.times(mk(c,r+12)),Kw=!0,(a=fk(a)).s=i,a},ok.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return void 0===e?r=bk(a,(n=dk(a))<=i.toExpNeg||n>=i.toExpPos):(sk(e,1,1e9),void 0===t?t=i.rounding:sk(t,0,8),r=bk(a=yk(new i(a),e,t),e<=(n=dk(a))||n<=i.toExpNeg,e)),r},ok.toSignificantDigits=ok.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(sk(e,1,1e9),void 0===t?t=n.rounding:sk(t,0,8)),yk(new n(this),e,t)},ok.toString=ok.valueOf=ok.val=ok.toJSON=ok[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=dk(e),n=e.constructor;return bk(e,t<=n.toExpNeg||t>=n.toExpPos)};var lk=function(){function e(e,t){var n,r=0,a=e.length;for(e=e.slice();a--;)n=e[a]*t+r,e[a]=n%ak|0,r=n/ak|0;return r&&e.unshift(r),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*ak+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,a,i,o){var c,s,u,l,f,d,p,h,m,v,y,g,b,x,w,k,S,O,E=r.constructor,A=r.s==a.s?1:-1,M=r.d,_=a.d;if(!r.s)return new E(r);if(!a.s)throw Error(Jw+"Division by zero");for(s=r.e-a.e,S=_.length,w=M.length,h=(p=new E(A)).d=[],u=0;_[u]==(M[u]||0);)++u;if(_[u]>(M[u]||0)&&--s,(g=null==i?i=E.precision:o?i+(dk(r)-dk(a))+1:i)<0)return new E(0);if(g=g/7+2|0,u=0,1==S)for(l=0,_=_[0],g++;(u<w||l)&&g--;u++)b=l*ak+(M[u]||0),h[u]=b/_|0,l=b%_|0;else{for((l=ak/(_[0]+1)|0)>1&&(_=e(_,l),M=e(M,l),S=_.length,w=M.length),x=S,v=(m=M.slice(0,S)).length;v<S;)m[v++]=0;(O=_.slice()).unshift(0),k=_[0],_[1]>=ak/2&&++k;do{l=0,(c=t(_,m,S,v))<0?(y=m[0],S!=v&&(y=y*ak+(m[1]||0)),(l=y/k|0)>1?(l>=ak&&(l=ak-1),1==(c=t(f=e(_,l),m,d=f.length,v=m.length))&&(l--,n(f,S<d?O:_,d))):(0==l&&(c=l=1),f=_.slice()),(d=f.length)<v&&f.unshift(0),n(m,f,v),-1==c&&(c=t(_,m,S,v=m.length))<1&&(l++,n(m,S<v?O:_,v)),v=m.length):0===c&&(l++,m=[0]),h[u++]=l,c&&m[0]?m[v++]=M[x]||0:(m=[M[x]],v=1)}while((x++<w||void 0!==m[0])&&g--)}return h[0]||h.shift(),p.e=s,yk(p,o?i+dk(p)+1:i)}}();function fk(e,t){var n,r,a,i,o,c=0,s=0,u=e.constructor,l=u.precision;if(dk(e)>16)throw Error(ek+dk(e));if(!e.s)return new u(Xw);for(null==t?(Kw=!1,o=l):o=t,i=new u(.03125);e.abs().gte(.1);)e=e.times(i),s+=5;for(o+=Math.log(nk(2,s))/Math.LN10*2+5|0,n=r=a=new u(Xw),u.precision=o;;){if(r=yk(r.times(e),o),n=n.times(++c),uk((i=a.plus(lk(r,n,o))).d).slice(0,o)===uk(a.d).slice(0,o)){for(;s--;)a=yk(a.times(a),o);return u.precision=l,null==t?(Kw=!0,yk(a,l)):a}a=i}}function dk(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function pk(e,t,n){if(t>e.LN10.sd())throw Kw=!0,n&&(e.precision=n),Error(Jw+"LN10 precision limit exceeded");return yk(new e(e.LN10),t)}function hk(e){for(var t="";e--;)t+="0";return t}function mk(e,t){var n,r,a,i,o,c,s,u,l,f=1,d=e,p=d.d,h=d.constructor,m=h.precision;if(d.s<1)throw Error(Jw+(d.s?"NaN":"-Infinity"));if(d.eq(Xw))return new h(0);if(null==t?(Kw=!1,u=m):u=t,d.eq(10))return null==t&&(Kw=!0),pk(h,u);if(u+=10,h.precision=u,r=(n=uk(p)).charAt(0),i=dk(d),!(Math.abs(i)<15e14))return s=pk(h,u+2,m).times(i+""),d=mk(new h(r+"."+n.slice(1)),u-10).plus(s),h.precision=m,null==t?(Kw=!0,yk(d,m)):d;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=uk((d=d.times(e)).d)).charAt(0),f++;for(i=dk(d),r>1?(d=new h("0."+n),i++):d=new h(r+"."+n.slice(1)),c=o=d=lk(d.minus(Xw),d.plus(Xw),u),l=yk(d.times(d),u),a=3;;){if(o=yk(o.times(l),u),uk((s=c.plus(lk(o,new h(a),u))).d).slice(0,u)===uk(c.d).slice(0,u))return c=c.times(2),0!==i&&(c=c.plus(pk(h,u+2,m).times(i+""))),c=lk(c,new h(f),u),h.precision=m,null==t?(Kw=!0,yk(c,m)):c;c=s,a+=2}}function vk(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(a=t.length;48===t.charCodeAt(a-1);)--a;if(t=t.slice(r,a)){if(a-=r,n=n-r-1,e.e=tk(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=7;r<a;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),Kw&&(e.e>ik||e.e<-ik))throw Error(ek+n)}else e.s=0,e.e=0,e.d=[0];return e}function yk(e,t,n){var r,a,i,o,c,s,u,l,f=e.d;for(o=1,i=f[0];i>=10;i/=10)o++;if((r=t-o)<0)r+=7,a=t,u=f[l=0];else{if((l=Math.ceil((r+1)/7))>=(i=f.length))return e;for(u=i=f[l],o=1;i>=10;i/=10)o++;a=(r%=7)-7+o}if(void 0!==n&&(c=u/(i=nk(10,o-a-1))%10|0,s=t<0||void 0!==f[l+1]||u%i,s=n<4?(c||s)&&(0==n||n==(e.s<0?3:2)):c>5||5==c&&(4==n||s||6==n&&(r>0?a>0?u/nk(10,o-a):0:f[l-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return s?(i=dk(e),f.length=1,t=t-i-1,f[0]=nk(10,(7-t%7)%7),e.e=tk(-t/7)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(0==r?(f.length=l,i=1,l--):(f.length=l+1,i=nk(10,7-r),f[l]=a>0?(u/nk(10,o-a)%nk(10,a)|0)*i:0),s)for(;;){if(0==l){(f[0]+=i)==ak&&(f[0]=1,++e.e);break}if(f[l]+=i,f[l]!=ak)break;f[l--]=0,i=1}for(r=f.length;0===f[--r];)f.pop();if(Kw&&(e.e>ik||e.e<-ik))throw Error(ek+dk(e));return e}function gk(e,t){var n,r,a,i,o,c,s,u,l,f,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),Kw?yk(t,p):t;if(s=e.d,f=t.d,r=t.e,u=e.e,s=s.slice(),o=u-r){for((l=o<0)?(n=s,o=-o,c=f.length):(n=f,r=u,c=s.length),o>(a=Math.max(Math.ceil(p/7),c)+2)&&(o=a,n.length=1),n.reverse(),a=o;a--;)n.push(0);n.reverse()}else{for((l=(a=s.length)<(c=f.length))&&(c=a),a=0;a<c;a++)if(s[a]!=f[a]){l=s[a]<f[a];break}o=0}for(l&&(n=s,s=f,f=n,t.s=-t.s),c=s.length,a=f.length-c;a>0;--a)s[c++]=0;for(a=f.length;a>o;){if(s[--a]<f[a]){for(i=a;i&&0===s[--i];)s[i]=ak-1;--s[i],s[a]+=ak}s[a]-=f[a]}for(;0===s[--c];)s.pop();for(;0===s[0];s.shift())--r;return s[0]?(t.d=s,t.e=r,Kw?yk(t,p):t):new d(0)}function bk(e,t,n){var r,a=dk(e),i=uk(e.d),o=i.length;return t?(n&&(r=n-o)>0?i=i.charAt(0)+"."+i.slice(1)+hk(r):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+hk(-a-1)+i,n&&(r=n-o)>0&&(i+=hk(r))):a>=o?(i+=hk(a+1-o),n&&(r=n-a-1)>0&&(i=i+"."+hk(r))):((r=a+1)<o&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-o)>0&&(a+1===o&&(i+="."),i+=hk(r))),e.s<0?"-"+i:i}function xk(e,t){if(e.length>t)return e.length=t,!0}function wk(e){if(!e||"object"!=typeof e)throw Error(Jw+"Object expected");var t,n,r,a=["precision",1,1e9,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if(void 0!==(r=e[n=a[t]])){if(!(tk(r)===r&&r>=a[t+1]&&r<=a[t+2]))throw Error(Qw+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(Qw+n+": "+r);this[n]=new this(r)}return this}var kk=function e(t){var n,r,a;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(Qw+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):vk(t,e.toString())}if("string"!=typeof e)throw Error(Qw+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!rk.test(e))throw Error(Qw+e);vk(t,e)}if(i.prototype=ok,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=e,i.config=i.set=wk,void 0===t&&(t={}),t)for(a=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<a.length;)t.hasOwnProperty(r=a[n++])||(t[r]=this[r]);return i.config(t),i}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});Xw=new kk(1);var Sk=kk;function Ok(e){return function(e){if(Array.isArray(e))return Ek(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ek(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ek(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ek(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ak=function(e){return e},Mk={"@@functional/placeholder":!0},_k=function(e){return e===Mk},jk=function(e){return function t(){return 0===arguments.length||1===arguments.length&&_k(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},Pk=function e(t,n){return 1===t?n:jk((function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];var o=a.filter((function(e){return e!==Mk})).length;return o>=t?n.apply(void 0,a):e(t-o,jk((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=a.map((function(e){return _k(e)?t.shift():e}));return n.apply(void 0,Ok(i).concat(t))})))}))},Ck=function(e){return Pk(e.length,e)},Dk=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},Tk=Ck((function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map((function(e){return t[e]})).map(e)})),Nk=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},Ik=function(e){var t=null,n=null;return function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return t&&a.every((function(e,n){return e===t[n]}))?n:(t=a,n=e.apply(void 0,a))}};var Rk=Ck((function(e,t,n){var r=+e;return r+n*(+t-r)})),Fk=Ck((function(e,t,n){var r=t-+e;return(n-e)/(r=r||1/0)})),zk=Ck((function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))})),Lk={rangeStep:function(e,t,n){for(var r=new Sk(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i},getDigitCount:function(e){return 0===e?1:Math.floor(new Sk(e).abs().log(10).toNumber())+1},interpolateNumber:Rk,uninterpolateNumber:Fk,uninterpolateTruncation:zk};function Hk(e){return function(e){if(Array.isArray(e))return Vk(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Uk(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bk(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw i}}return n}(e,t)||Uk(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Uk(e,t){if(e){if("string"==typeof e)return Vk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vk(e,t):void 0}}function Vk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wk(e){var t=Bk(e,2),n=t[0],r=t[1],a=n,i=r;return n>r&&(a=r,i=n),[a,i]}function $k(e,t,n){if(e.lte(0))return new Sk(0);var r=Lk.getDigitCount(e.toNumber()),a=new Sk(10).pow(r),i=e.div(a),o=1!==r?.05:.1,c=new Sk(Math.ceil(i.div(o).toNumber())).add(n).mul(o).mul(a);return t?c:new Sk(Math.ceil(c))}function Yk(e,t,n){var r=1,a=new Sk(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new Sk(10).pow(Lk.getDigitCount(e)-1),a=new Sk(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new Sk(Math.floor(e)))}else 0===e?a=new Sk(Math.floor((t-1)/2)):n||(a=new Sk(Math.floor(e)));var o=Math.floor((t-1)/2),c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return Ak;var r=t.reverse(),a=r[0],i=r.slice(1);return function(){return i.reduce((function(e,t){return t(e)}),a.apply(void 0,arguments))}}(Tk((function(e){return a.add(new Sk(e-o).mul(r)).toNumber()})),Dk);return c(0,t)}function qk(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Sk(0),tickMin:new Sk(0),tickMax:new Sk(0)};var i,o=$k(new Sk(t).sub(e).div(n-1),r,a);i=e<=0&&t>=0?new Sk(0):(i=new Sk(e).add(t).div(2)).sub(new Sk(i).mod(o));var c=Math.ceil(i.sub(e).div(o).toNumber()),s=Math.ceil(new Sk(t).sub(i).div(o).toNumber()),u=c+s+1;return u>n?qk(e,t,n,r,a+1):(u<n&&(s=t>0?s+(n-u):s,c=t>0?c:c+(n-u)),{step:o,tickMin:i.sub(new Sk(c).mul(o)),tickMax:i.add(new Sk(s).mul(o))})}var Gk=Ik((function(e){var t=Bk(e,2),n=t[0],r=t[1],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=Math.max(a,2),c=Wk([n,r]),s=Bk(c,2),u=s[0],l=s[1];if(u===-1/0||l===1/0){var f=l===1/0?[u].concat(Hk(Dk(0,a-1).map((function(){return 1/0})))):[].concat(Hk(Dk(0,a-1).map((function(){return-1/0}))),[l]);return n>r?Nk(f):f}if(u===l)return Yk(u,a,i);var d=qk(u,l,o,i),p=d.step,h=d.tickMin,m=d.tickMax,v=Lk.rangeStep(h,m.add(new Sk(.1).mul(p)),p);return n>r?Nk(v):v})),Xk=Ik((function(e,t){var n=Bk(e,2),r=n[0],a=n[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=Wk([r,a]),c=Bk(o,2),s=c[0],u=c[1];if(s===-1/0||u===1/0)return[r,a];if(s===u)return[s];var l=Math.max(t,2),f=$k(new Sk(u).sub(s).div(l-1),i,0),d=[].concat(Hk(Lk.rangeStep(new Sk(s),new Sk(u).sub(new Sk(.99).mul(f)),f)),[u]);return r>a?Nk(d):d}));function Zk(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Kk(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Jk(e){let t,n,r;function a(e,r,a=0,i=e.length){if(a<i){if(0!==t(r,r))return i;do{const t=a+i>>>1;n(e[t],r)<0?a=t+1:i=t}while(a<i)}return a}return 2!==e.length?(t=Zk,n=(t,n)=>Zk(e(t),n),r=(t,n)=>e(t)-n):(t=e===Zk||e===Kk?e:Qk,n=e,r=e),{left:a,center:function(e,t,n=0,i=e.length){const o=a(e,t,n,i-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o},right:function(e,r,a=0,i=e.length){if(a<i){if(0!==t(r,r))return i;do{const t=a+i>>>1;n(e[t],r)<=0?a=t+1:i=t}while(a<i)}return a}}}function Qk(){return 0}function eS(e){return null===e?NaN:+e}const tS=Jk(Zk).right;Jk(eS).center;var nS=tS;class rS extends Map{constructor(e,t=iS){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(aS(this,e))}has(e){return super.has(aS(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function aS({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function iS(e){return null!==e&&"object"==typeof e?e.valueOf():e}function oS(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}var cS=Math.sqrt(50),sS=Math.sqrt(10),uS=Math.sqrt(2);function lS(e,t,n){var r,a,i,o,c=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t<e)&&(a=e,e=t,t=a),0===(o=fS(e,t,n))||!isFinite(o))return[];if(o>0){let n=Math.round(e/o),r=Math.round(t/o);for(n*o<e&&++n,r*o>t&&--r,i=new Array(a=r-n+1);++c<a;)i[c]=(n+c)*o}else{o=-o;let n=Math.round(e*o),r=Math.round(t*o);for(n/o<e&&++n,r/o>t&&--r,i=new Array(a=r-n+1);++c<a;)i[c]=(n+c)/o}return r&&i.reverse(),i}function fS(e,t,n){var r=(t-e)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,a);return a>=0?(i>=cS?10:i>=sS?5:i>=uS?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=cS?10:i>=sS?5:i>=uS?2:1)}function dS(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/a;return i>=cS?a*=10:i>=sS?a*=5:i>=uS&&(a*=2),t<e?-a:a}function pS(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let a of e)null!=(a=t(a,++r,e))&&(n<a||void 0===n&&a>=a)&&(n=a)}return n}function hS(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let a of e)null!=(a=t(a,++r,e))&&(n>a||void 0===n&&a>=a)&&(n=a)}return n}function mS(e,t,n=0,r=e.length-1,a){for(a=void 0===a?oS:function(e=Zk){if(e===Zk)return oS;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(a);r>n;){if(r-n>600){const i=r-n+1,o=t-n+1,c=Math.log(i),s=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*s*(i-s)/i)*(o-i/2<0?-1:1);mS(e,t,Math.max(n,Math.floor(t-o*s/i+u)),Math.min(r,Math.floor(t+(i-o)*s/i+u)),a)}const i=e[t];let o=n,c=r;for(vS(e,n,t),a(e[r],i)>0&&vS(e,n,r);o<c;){for(vS(e,o,c),++o,--c;a(e[o],i)<0;)++o;for(;a(e[c],i)>0;)--c}0===a(e[n],i)?vS(e,n,c):(++c,vS(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function vS(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function yS(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),r=e.length){if((t=+t)<=0||r<2)return hS(e);if(t>=1)return pS(e);var r,a=(r-1)*t,i=Math.floor(a),o=pS(mS(e,i).subarray(0,i+1));return o+(hS(e.subarray(i+1))-o)*(a-i)}}function gS(e,t,n=eS){if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),o=+n(e[i],i,e);return o+(+n(e[i+1],i+1,e)-o)*(a-i)}}function bS(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(a);++r<a;)i[r]=e+r*n;return i}function xS(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function wS(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const kS=Symbol("implicit");function SS(){var e=new rS,t=[],n=[],r=kS;function a(a){let i=e.get(a);if(void 0===i){if(r!==kS)return r;e.set(a,i=t.push(a)-1)}return n[i%n.length]}return a.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new rS;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return a},a.range=function(e){return arguments.length?(n=Array.from(e),a):n.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.copy=function(){return SS(t,n).unknown(r)},xS.apply(a,arguments),a}function OS(){var e,t,n=SS().unknown(void 0),r=n.domain,a=n.range,i=0,o=1,c=!1,s=0,u=0,l=.5;function f(){var n=r().length,f=o<i,d=f?o:i,p=f?i:o;e=(p-d)/Math.max(1,n-s+2*u),c&&(e=Math.floor(e)),d+=(p-d-e*(n-s))*l,t=e*(1-s),c&&(d=Math.round(d),t=Math.round(t));var h=bS(n).map((function(t){return d+e*t}));return a(f?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),f()):r()},n.range=function(e){return arguments.length?([i,o]=e,i=+i,o=+o,f()):[i,o]},n.rangeRound=function(e){return[i,o]=e,i=+i,o=+o,c=!0,f()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(c=!!e,f()):c},n.padding=function(e){return arguments.length?(s=Math.min(1,u=+e),f()):s},n.paddingInner=function(e){return arguments.length?(s=Math.min(1,e),f()):s},n.paddingOuter=function(e){return arguments.length?(u=+e,f()):u},n.align=function(e){return arguments.length?(l=Math.max(0,Math.min(1,e)),f()):l},n.copy=function(){return OS(r(),[i,o]).round(c).paddingInner(s).paddingOuter(u).align(l)},xS.apply(f(),arguments)}function ES(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return ES(t())},e}function AS(){return ES(OS.apply(null,arguments).paddingInner(1))}function MS(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _S(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function jS(){}var PS=1/.7,CS="\\s*([+-]?\\d+)\\s*",DS="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",TS="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",NS=/^#([0-9a-f]{3,8})$/,IS=new RegExp(`^rgb\\(${CS},${CS},${CS}\\)$`),RS=new RegExp(`^rgb\\(${TS},${TS},${TS}\\)$`),FS=new RegExp(`^rgba\\(${CS},${CS},${CS},${DS}\\)$`),zS=new RegExp(`^rgba\\(${TS},${TS},${TS},${DS}\\)$`),LS=new RegExp(`^hsl\\(${DS},${TS},${TS}\\)$`),HS=new RegExp(`^hsla\\(${DS},${TS},${TS},${DS}\\)$`),BS={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function US(){return this.rgb().formatHex()}function VS(){return this.rgb().formatRgb()}function WS(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=NS.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?$S(t):3===n?new XS(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?YS(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?YS(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=IS.exec(e))?new XS(t[1],t[2],t[3],1):(t=RS.exec(e))?new XS(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=FS.exec(e))?YS(t[1],t[2],t[3],t[4]):(t=zS.exec(e))?YS(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=LS.exec(e))?tO(t[1],t[2]/100,t[3]/100,1):(t=HS.exec(e))?tO(t[1],t[2]/100,t[3]/100,t[4]):BS.hasOwnProperty(e)?$S(BS[e]):"transparent"===e?new XS(NaN,NaN,NaN,0):null}function $S(e){return new XS(e>>16&255,e>>8&255,255&e,1)}function YS(e,t,n,r){return r<=0&&(e=t=n=NaN),new XS(e,t,n,r)}function qS(e){return e instanceof jS||(e=WS(e)),e?new XS((e=e.rgb()).r,e.g,e.b,e.opacity):new XS}function GS(e,t,n,r){return 1===arguments.length?qS(e):new XS(e,t,n,null==r?1:r)}function XS(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ZS(){return`#${eO(this.r)}${eO(this.g)}${eO(this.b)}`}function KS(){const e=JS(this.opacity);return`${1===e?"rgb(":"rgba("}${QS(this.r)}, ${QS(this.g)}, ${QS(this.b)}${1===e?")":`, ${e})`}`}function JS(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function QS(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function eO(e){return((e=QS(e))<16?"0":"")+e.toString(16)}function tO(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new rO(e,t,n,r)}function nO(e){if(e instanceof rO)return new rO(e.h,e.s,e.l,e.opacity);if(e instanceof jS||(e=WS(e)),!e)return new rO;if(e instanceof rO)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),o=NaN,c=i-a,s=(i+a)/2;return c?(o=t===i?(n-r)/c+6*(n<r):n===i?(r-t)/c+2:(t-n)/c+4,c/=s<.5?i+a:2-i-a,o*=60):c=s>0&&s<1?0:o,new rO(o,c,s,e.opacity)}function rO(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function aO(e){return(e=(e||0)%360)<0?e+360:e}function iO(e){return Math.max(0,Math.min(1,e||0))}function oO(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}MS(jS,WS,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:US,formatHex:US,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return nO(this).formatHsl()},formatRgb:VS,toString:VS}),MS(XS,GS,_S(jS,{brighter(e){return e=null==e?PS:Math.pow(PS,e),new XS(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new XS(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new XS(QS(this.r),QS(this.g),QS(this.b),JS(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ZS,formatHex:ZS,formatHex8:function(){return`#${eO(this.r)}${eO(this.g)}${eO(this.b)}${eO(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:KS,toString:KS})),MS(rO,(function(e,t,n,r){return 1===arguments.length?nO(e):new rO(e,t,n,null==r?1:r)}),_S(jS,{brighter(e){return e=null==e?PS:Math.pow(PS,e),new rO(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new rO(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new XS(oO(e>=240?e-240:e+120,a,r),oO(e,a,r),oO(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new rO(aO(this.h),iO(this.s),iO(this.l),JS(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=JS(this.opacity);return`${1===e?"hsl(":"hsla("}${aO(this.h)}, ${100*iO(this.s)}%, ${100*iO(this.l)}%${1===e?")":`, ${e})`}`}}));var cO=e=>()=>e;function sO(e){return 1==(e=+e)?uO:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):cO(isNaN(t)?n:t)}}function uO(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):cO(isNaN(e)?t:e)}var lO=function e(t){var n=sO(t);function r(e,t){var r=n((e=GS(e)).r,(t=GS(t)).r),a=n(e.g,t.g),i=n(e.b,t.b),o=uO(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=i(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function fO(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,a=t.slice();return function(i){for(n=0;n<r;++n)a[n]=e[n]*(1-i)+t[n]*i;return a}}function dO(e,t){var n,r=t?t.length:0,a=e?Math.min(r,e.length):0,i=new Array(a),o=new Array(r);for(n=0;n<a;++n)i[n]=bO(e[n],t[n]);for(;n<r;++n)o[n]=t[n];return function(e){for(n=0;n<a;++n)o[n]=i[n](e);return o}}function pO(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function hO(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function mO(e,t){var n,r={},a={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=bO(e[n],t[n]):a[n]=t[n];return function(e){for(n in r)a[n]=r[n](e);return a}}var vO=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,yO=new RegExp(vO.source,"g");function gO(e,t){var n,r,a,i=vO.lastIndex=yO.lastIndex=0,o=-1,c=[],s=[];for(e+="",t+="";(n=vO.exec(e))&&(r=yO.exec(t));)(a=r.index)>i&&(a=t.slice(i,a),c[o]?c[o]+=a:c[++o]=a),(n=n[0])===(r=r[0])?c[o]?c[o]+=r:c[++o]=r:(c[++o]=null,s.push({i:o,x:hO(n,r)})),i=yO.lastIndex;return i<t.length&&(a=t.slice(i),c[o]?c[o]+=a:c[++o]=a),c.length<2?s[0]?function(e){return function(t){return e(t)+""}}(s[0].x):function(e){return function(){return e}}(t):(t=s.length,function(e){for(var n,r=0;r<t;++r)c[(n=s[r]).i]=n.x(e);return c.join("")})}function bO(e,t){var n,r=typeof t;return null==t||"boolean"===r?cO(t):("number"===r?hO:"string"===r?(n=WS(t))?(t=n,lO):gO:t instanceof WS?lO:t instanceof Date?pO:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?fO:Array.isArray(t)?dO:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?mO:hO)(e,t)}function xO(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function wO(e,t){void 0===t&&(t=e,e=bO);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return i[t](e-t)}}function kO(e){return+e}var SO=[0,1];function OO(e){return e}function EO(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function AO(e,t,n){var r=e[0],a=e[1],i=t[0],o=t[1];return a<r?(r=EO(a,r),i=n(o,i)):(r=EO(r,a),i=n(i,o)),function(e){return i(r(e))}}function MO(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)a[o]=EO(e[o],e[o+1]),i[o]=n(t[o],t[o+1]);return function(t){var n=nS(e,t,1,r)-1;return i[n](a[n](t))}}function _O(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function jO(){var e,t,n,r,a,i,o=SO,c=SO,s=bO,u=OO;function l(){var e=Math.min(o.length,c.length);return u!==OO&&(u=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(o[0],o[e-1])),r=e>2?MO:AO,a=i=null,f}function f(t){return null==t||isNaN(t=+t)?n:(a||(a=r(o.map(e),c,s)))(e(u(t)))}return f.invert=function(n){return u(t((i||(i=r(c,o.map(e),hO)))(n)))},f.domain=function(e){return arguments.length?(o=Array.from(e,kO),l()):o.slice()},f.range=function(e){return arguments.length?(c=Array.from(e),l()):c.slice()},f.rangeRound=function(e){return c=Array.from(e),s=xO,l()},f.clamp=function(e){return arguments.length?(u=!!e||OO,l()):u!==OO},f.interpolate=function(e){return arguments.length?(s=e,l()):s},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,l()}}function PO(){return jO()(OO,OO)}function CO(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function DO(e){return(e=CO(Math.abs(e)))?e[1]:NaN}var TO,NO=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function IO(e){if(!(t=NO.exec(e)))throw new Error("invalid format: "+e);var t;return new RO({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function RO(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function FO(e,t){var n=CO(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}IO.prototype=RO.prototype,RO.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var zO={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>FO(100*e,t),r:FO,s:function(e,t){var n=CO(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(TO=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+CO(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function LO(e){return e}var HO,BO,UO,VO=Array.prototype.map,WO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function $O(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?LO:(t=VO.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,i=[],o=0,c=t[0],s=0;a>0&&c>0&&(s+c+1>r&&(c=Math.max(1,r-s)),i.push(e.substring(a-=c,a+c)),!((s+=c+1)>r));)c=t[o=(o+1)%t.length];return i.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",c=void 0===e.numerals?LO:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(VO.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function f(e){var t=(e=IO(e)).fill,n=e.align,f=e.sign,d=e.symbol,p=e.zero,h=e.width,m=e.comma,v=e.precision,y=e.trim,g=e.type;"n"===g?(m=!0,g="g"):zO[g]||(void 0===v&&(v=12),y=!0,g="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var b="$"===d?a:"#"===d&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",x="$"===d?i:/[%p]/.test(g)?s:"",w=zO[g],k=/[defgprs%]/.test(g);function S(e){var a,i,s,d=b,S=x;if("c"===g)S=w(e)+S,e="";else{var O=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:w(Math.abs(e),v),y&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r<n;++r)switch(e[r]){case".":a=t=r;break;case"0":0===a&&(a=r),t=r;break;default:if(!+e[r])break e;a>0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),O&&0==+e&&"+"!==f&&(O=!1),d=(O?"("===f?f:u:"-"===f||"("===f?"":f)+d,S=("s"===g?WO[8+TO/3]:"")+S+(O&&"("===f?")":""),k)for(a=-1,i=e.length;++a<i;)if(48>(s=e.charCodeAt(a))||s>57){S=(46===s?o+e.slice(a+1):e.slice(a))+S,e=e.slice(0,a);break}}m&&!p&&(e=r(e,1/0));var E=d.length+e.length+S.length,A=E<h?new Array(h-E+1).join(t):"";switch(m&&p&&(e=r(A+e,A.length?h-S.length:1/0),A=""),n){case"<":e=d+e+S+A;break;case"=":e=d+A+e+S;break;case"^":e=A.slice(0,E=A.length>>1)+d+e+S+A.slice(E);break;default:e=A+d+e+S}return c(e)}return v=void 0===v?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),S.toString=function(){return e+""},S}return{format:f,formatPrefix:function(e,t){var n=f(((e=IO(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(DO(t)/3))),a=Math.pow(10,-r),i=WO[8+r/3];return function(e){return n(a*e)+i}}}}function YO(e,t,n,r){var a,i=dS(e,t,n);switch((r=IO(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(a=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(DO(t)/3)))-DO(Math.abs(e)))}(i,o))||(r.precision=a),UO(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,DO(t)-DO(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=function(e){return Math.max(0,-DO(Math.abs(e)))}(i))||(r.precision=a-2*("%"===r.type))}return BO(r)}function qO(e){var t=e.domain;return e.ticks=function(e){var n=t();return lS(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return YO(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,a,i=t(),o=0,c=i.length-1,s=i[o],u=i[c],l=10;for(u<s&&(a=s,s=u,u=a,a=o,o=c,c=a);l-- >0;){if((a=fS(s,u,n))===r)return i[o]=s,i[c]=u,t(i);if(a>0)s=Math.floor(s/a)*a,u=Math.ceil(u/a)*a;else{if(!(a<0))break;s=Math.ceil(s*a)/a,u=Math.floor(u*a)/a}r=a}return e},e}function GO(){var e=PO();return e.copy=function(){return _O(e,GO())},xS.apply(e,arguments),qO(e)}function XO(e,t){var n,r=0,a=(e=e.slice()).length-1,i=e[r],o=e[a];return o<i&&(n=r,r=a,a=n,n=i,i=o,o=n),e[r]=t.floor(i),e[a]=t.ceil(o),e}function ZO(e){return Math.log(e)}function KO(e){return Math.exp(e)}function JO(e){return-Math.log(-e)}function QO(e){return-Math.exp(-e)}function eE(e){return isFinite(e)?+("1e"+e):e<0?0:e}function tE(e){return(t,n)=>-e(-t,n)}function nE(e){const t=e(ZO,KO),n=t.domain;let r,a,i=10;function o(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(i),a=function(e){return 10===e?eE:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=tE(r),a=tE(a),e(JO,QO)):e(ZO,KO),t}return t.base=function(e){return arguments.length?(i=+e,o()):i},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{const t=n();let o=t[0],c=t[t.length-1];const s=c<o;s&&([o,c]=[c,o]);let u,l,f=r(o),d=r(c);const p=null==e?10:+e;let h=[];if(!(i%1)&&d-f<p){if(f=Math.floor(f),d=Math.ceil(d),o>0){for(;f<=d;++f)for(u=1;u<i;++u)if(l=f<0?u/a(-f):u*a(f),!(l<o)){if(l>c)break;h.push(l)}}else for(;f<=d;++f)for(u=i-1;u>=1;--u)if(l=f>0?u/a(-f):u*a(f),!(l<o)){if(l>c)break;h.push(l)}2*h.length<p&&(h=lS(o,c,p))}else h=lS(f,d,Math.min(d-f,p)).map(a);return s?h.reverse():h},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===i?"s":","),"function"!=typeof n&&(i%1||null!=(n=IO(n)).precision||(n.trim=!0),n=BO(n)),e===1/0)return n;const o=Math.max(1,i*e/t.ticks().length);return e=>{let t=e/a(Math.round(r(e)));return t*i<i-.5&&(t*=i),t<=o?n(e):""}},t.nice=()=>n(XO(n(),{floor:e=>a(Math.floor(r(e))),ceil:e=>a(Math.ceil(r(e)))})),t}function rE(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function aE(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function iE(e){var t=1,n=e(rE(t),aE(t));return n.constant=function(n){return arguments.length?e(rE(t=+n),aE(t)):t},qO(n)}function oE(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function cE(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function sE(e){return e<0?-e*e:e*e}function uE(e){var t=e(OO,OO),n=1;function r(){return 1===n?e(OO,OO):.5===n?e(cE,sE):e(oE(n),oE(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},qO(t)}function lE(){var e=uE(jO());return e.copy=function(){return _O(e,lE()).exponent(e.exponent())},xS.apply(e,arguments),e}function fE(e){return Math.sign(e)*e*e}function dE(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}HO=$O({thousands:",",grouping:[3],currency:["$",""]}),BO=HO.format,UO=HO.formatPrefix;var pE=new Date,hE=new Date;function mE(e,t,n,r){function a(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return a.floor=function(t){return e(t=new Date(+t)),t},a.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},a.round=function(e){var t=a(e),n=a.ceil(e);return e-t<n-e?t:n},a.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},a.range=function(n,r,i){var o,c=[];if(n=a.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return c;do{c.push(o=new Date(+n)),t(n,i),e(n)}while(o<n&&n<r);return c},a.filter=function(n){return mE((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(a.count=function(t,r){return pE.setTime(+t),hE.setTime(+r),e(pE),e(hE),Math.floor(n(pE,hE))},a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?a.filter(r?function(t){return r(t)%e==0}:function(t){return a.count(0,t)%e==0}):a:null}),a}var vE=mE((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));vE.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?mE((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):vE:null};var yE=vE;vE.range;var gE=mE((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),bE=gE;gE.range;var xE=mE((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),wE=xE;xE.range;var kE=mE((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()})),SE=kE;kE.range;var OE=mE((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5),(e=>e.getDate()-1)),EE=OE;function AE(e){return mE((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}OE.range;var ME=AE(0),_E=AE(1),jE=AE(2),PE=AE(3),CE=AE(4),DE=AE(5),TE=AE(6);ME.range,_E.range,jE.range,PE.range,CE.range,DE.range,TE.range;var NE=mE((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),IE=NE;NE.range;var RE=mE((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));RE.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mE((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var FE=RE;RE.range;var zE=mE((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),LE=zE;zE.range;var HE=mE((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})),BE=HE;HE.range;var UE=mE((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1})),VE=UE;function WE(e){return mE((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}UE.range;var $E=WE(0),YE=WE(1),qE=WE(2),GE=WE(3),XE=WE(4),ZE=WE(5),KE=WE(6);$E.range,YE.range,qE.range,GE.range,XE.range,ZE.range,KE.range;var JE=mE((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),QE=JE;JE.range;var eA=mE((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));eA.every=function(e){return isFinite(e=Math.floor(e))&&e>0?mE((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var tA=eA;function nA(e,t,n,r,a,i){const o=[[bE,1,1e3],[bE,5,5e3],[bE,15,15e3],[bE,30,3e4],[i,1,6e4],[i,5,3e5],[i,15,9e5],[i,30,18e5],[a,1,36e5],[a,3,108e5],[a,6,216e5],[a,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function c(t,n,r){const a=Math.abs(n-t)/r,i=Jk((([,,e])=>e)).right(o,a);if(i===o.length)return e.every(dS(t/31536e6,n/31536e6,r));if(0===i)return yE.every(Math.max(dS(t,n,r),1));const[c,s]=o[a/o[i-1][2]<o[i][2]/a?i-1:i];return c.every(s)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const a=n&&"function"==typeof n.range?n:c(e,t,n),i=a?a.range(e,+t+1):[];return r?i.reverse():i},c]}eA.range;const[rA,aA]=nA(tA,QE,$E,VE,BE,LE),[iA,oA]=nA(FE,IE,ME,EE,SE,wE);function cA(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function sA(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function uA(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var lA,fA,dA,pA={"-":"",_:" ",0:"0"},hA=/^\s*\d+/,mA=/^%/,vA=/[\\^$*+?|[\]().{}]/g;function yA(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function gA(e){return e.replace(vA,"\\$&")}function bA(e){return new RegExp("^(?:"+e.map(gA).join("|")+")","i")}function xA(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function wA(e,t,n){var r=hA.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function kA(e,t,n){var r=hA.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function SA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function OA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function EA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function AA(e,t,n){var r=hA.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function MA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function _A(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function jA(e,t,n){var r=hA.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function PA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function CA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function DA(e,t,n){var r=hA.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function TA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function NA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function IA(e,t,n){var r=hA.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function RA(e,t,n){var r=hA.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function FA(e,t,n){var r=hA.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zA(e,t,n){var r=mA.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function LA(e,t,n){var r=hA.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function HA(e,t,n){var r=hA.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function BA(e,t){return yA(e.getDate(),t,2)}function UA(e,t){return yA(e.getHours(),t,2)}function VA(e,t){return yA(e.getHours()%12||12,t,2)}function WA(e,t){return yA(1+EE.count(FE(e),e),t,3)}function $A(e,t){return yA(e.getMilliseconds(),t,3)}function YA(e,t){return $A(e,t)+"000"}function qA(e,t){return yA(e.getMonth()+1,t,2)}function GA(e,t){return yA(e.getMinutes(),t,2)}function XA(e,t){return yA(e.getSeconds(),t,2)}function ZA(e){var t=e.getDay();return 0===t?7:t}function KA(e,t){return yA(ME.count(FE(e)-1,e),t,2)}function JA(e){var t=e.getDay();return t>=4||0===t?CE(e):CE.ceil(e)}function QA(e,t){return e=JA(e),yA(CE.count(FE(e),e)+(4===FE(e).getDay()),t,2)}function eM(e){return e.getDay()}function tM(e,t){return yA(_E.count(FE(e)-1,e),t,2)}function nM(e,t){return yA(e.getFullYear()%100,t,2)}function rM(e,t){return yA((e=JA(e)).getFullYear()%100,t,2)}function aM(e,t){return yA(e.getFullYear()%1e4,t,4)}function iM(e,t){var n=e.getDay();return yA((e=n>=4||0===n?CE(e):CE.ceil(e)).getFullYear()%1e4,t,4)}function oM(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+yA(t/60|0,"0",2)+yA(t%60,"0",2)}function cM(e,t){return yA(e.getUTCDate(),t,2)}function sM(e,t){return yA(e.getUTCHours(),t,2)}function uM(e,t){return yA(e.getUTCHours()%12||12,t,2)}function lM(e,t){return yA(1+VE.count(tA(e),e),t,3)}function fM(e,t){return yA(e.getUTCMilliseconds(),t,3)}function dM(e,t){return fM(e,t)+"000"}function pM(e,t){return yA(e.getUTCMonth()+1,t,2)}function hM(e,t){return yA(e.getUTCMinutes(),t,2)}function mM(e,t){return yA(e.getUTCSeconds(),t,2)}function vM(e){var t=e.getUTCDay();return 0===t?7:t}function yM(e,t){return yA($E.count(tA(e)-1,e),t,2)}function gM(e){var t=e.getUTCDay();return t>=4||0===t?XE(e):XE.ceil(e)}function bM(e,t){return e=gM(e),yA(XE.count(tA(e),e)+(4===tA(e).getUTCDay()),t,2)}function xM(e){return e.getUTCDay()}function wM(e,t){return yA(YE.count(tA(e)-1,e),t,2)}function kM(e,t){return yA(e.getUTCFullYear()%100,t,2)}function SM(e,t){return yA((e=gM(e)).getUTCFullYear()%100,t,2)}function OM(e,t){return yA(e.getUTCFullYear()%1e4,t,4)}function EM(e,t){var n=e.getUTCDay();return yA((e=n>=4||0===n?XE(e):XE.ceil(e)).getUTCFullYear()%1e4,t,4)}function AM(){return"+0000"}function MM(){return"%"}function _M(e){return+e}function jM(e){return Math.floor(+e/1e3)}function PM(e){return new Date(e)}function CM(e){return e instanceof Date?+e:+new Date(+e)}function DM(e,t,n,r,a,i,o,c,s,u){var l=PO(),f=l.invert,d=l.domain,p=u(".%L"),h=u(":%S"),m=u("%I:%M"),v=u("%I %p"),y=u("%a %d"),g=u("%b %d"),b=u("%B"),x=u("%Y");function w(e){return(s(e)<e?p:c(e)<e?h:o(e)<e?m:i(e)<e?v:r(e)<e?a(e)<e?y:g:n(e)<e?b:x)(e)}return l.invert=function(e){return new Date(f(e))},l.domain=function(e){return arguments.length?d(Array.from(e,CM)):d().map(PM)},l.ticks=function(t){var n=d();return e(n[0],n[n.length-1],null==t?10:t)},l.tickFormat=function(e,t){return null==t?w:u(t)},l.nice=function(e){var n=d();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?d(XO(n,e)):l},l.copy=function(){return _O(l,DM(e,t,n,r,a,i,o,c,s,u))},l}function TM(){var e,t,n,r,a,i=0,o=1,c=OO,s=!1;function u(t){return null==t||isNaN(t=+t)?a:c(0===n?.5:(t=(r(t)-e)*n,s?Math.max(0,Math.min(1,t)):t))}function l(e){return function(t){var n,r;return arguments.length?([n,r]=t,c=e(n,r),u):[c(0),c(1)]}}return u.domain=function(a){return arguments.length?([i,o]=a,e=r(i=+i),t=r(o=+o),n=e===t?0:1/(t-e),u):[i,o]},u.clamp=function(e){return arguments.length?(s=!!e,u):s},u.interpolator=function(e){return arguments.length?(c=e,u):c},u.range=l(bO),u.rangeRound=l(xO),u.unknown=function(e){return arguments.length?(a=e,u):a},function(a){return r=a,e=a(i),t=a(o),n=e===t?0:1/(t-e),u}}function NM(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function IM(){var e=uE(TM());return e.copy=function(){return NM(e,IM()).exponent(e.exponent())},wS.apply(e,arguments)}function RM(){var e,t,n,r,a,i,o,c=0,s=.5,u=1,l=1,f=OO,d=!1;function p(e){return isNaN(e=+e)?o:(e=.5+((e=+i(e))-t)*(l*e<l*t?r:a),f(d?Math.max(0,Math.min(1,e)):e))}function h(e){return function(t){var n,r,a;return arguments.length?([n,r,a]=t,f=wO(e,[n,r,a]),p):[f(0),f(.5),f(1)]}}return p.domain=function(o){return arguments.length?([c,s,u]=o,e=i(c=+c),t=i(s=+s),n=i(u=+u),r=e===t?0:.5/(t-e),a=t===n?0:.5/(n-t),l=t<e?-1:1,p):[c,s,u]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(f=e,p):f},p.range=h(bO),p.rangeRound=h(xO),p.unknown=function(e){return arguments.length?(o=e,p):o},function(o){return i=o,e=o(c),t=o(s),n=o(u),r=e===t?0:.5/(t-e),a=t===n?0:.5/(n-t),l=t<e?-1:1,p}}function FM(){var e=uE(RM());return e.copy=function(){return NM(e,FM()).exponent(e.exponent())},wS.apply(e,arguments)}!function(e){lA=function(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,o=e.shortDays,c=e.months,s=e.shortMonths,u=bA(a),l=xA(a),f=bA(i),d=xA(i),p=bA(o),h=xA(o),m=bA(c),v=xA(c),y=bA(s),g=xA(s),b={a:function(e){return o[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return s[e.getMonth()]},B:function(e){return c[e.getMonth()]},c:null,d:BA,e:BA,f:YA,g:rM,G:iM,H:UA,I:VA,j:WA,L:$A,m:qA,M:GA,p:function(e){return a[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:_M,s:jM,S:XA,u:ZA,U:KA,V:QA,w:eM,W:tM,x:null,X:null,y:nM,Y:aM,Z:oM,"%":MM},x={a:function(e){return o[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return s[e.getUTCMonth()]},B:function(e){return c[e.getUTCMonth()]},c:null,d:cM,e:cM,f:dM,g:SM,G:EM,H:sM,I:uM,j:lM,L:fM,m:pM,M:hM,p:function(e){return a[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:_M,s:jM,S:mM,u:vM,U:yM,V:bM,w:xM,W:wM,x:null,X:null,y:kM,Y:OM,Z:AM,"%":MM},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return O(e,t,n,r)},d:CA,e:CA,f:FA,g:MA,G:AA,H:TA,I:TA,j:DA,L:RA,m:PA,M:NA,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:jA,Q:LA,s:HA,S:IA,u:kA,U:SA,V:OA,w:wA,W:EA,x:function(e,t,r){return O(e,n,t,r)},X:function(e,t,n){return O(e,r,t,n)},y:MA,Y:AA,Z:_A,"%":zA};function k(e,t){return function(n){var r,a,i,o=[],c=-1,s=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++c<u;)37===e.charCodeAt(c)&&(o.push(e.slice(s,c)),null!=(a=pA[r=e.charAt(++c)])?r=e.charAt(++c):a="e"===r?" ":"0",(i=t[r])&&(r=i(n,a)),o.push(r),s=c+1);return o.push(e.slice(s,c)),o.join("")}}function S(e,t){return function(n){var r,a,i=uA(1900,void 0,1);if(O(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(a=(r=sA(uA(i.y,0,1))).getUTCDay(),r=a>4||0===a?YE.ceil(r):YE(r),r=VE.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(a=(r=cA(uA(i.y,0,1))).getDay(),r=a>4||0===a?_E.ceil(r):_E(r),r=EE.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),a="Z"in i?sA(uA(i.y,0,1)).getUTCDay():cA(uA(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(a+5)%7:i.w+7*i.U-(a+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,sA(i)):cA(i)}}function O(e,t,n,r){for(var a,i,o=0,c=t.length,s=n.length;o<c;){if(r>=s)return-1;if(37===(a=t.charCodeAt(o++))){if(a=t.charAt(o++),!(i=w[a in pA?t.charAt(o++):a])||(r=i(e,n,r))<0)return-1}else if(a!=n.charCodeAt(r++))return-1}return r}return b.x=k(n,b),b.X=k(r,b),b.c=k(t,b),x.x=k(n,x),x.X=k(r,x),x.c=k(t,x),{format:function(e){var t=k(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=S(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=k(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=S(e+="",!0);return t.toString=function(){return e},t}}}(e),fA=lA.format,lA.parse,dA=lA.utcFormat,lA.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var zM=Object.freeze({__proto__:null,scaleBand:OS,scalePoint:AS,scaleIdentity:function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,kO),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,kO):[0,1],qO(r)},scaleLinear:GO,scaleLog:function e(){const t=nE(jO()).domain([1,10]);return t.copy=()=>_O(t,e()).base(t.base()),xS.apply(t,arguments),t},scaleSymlog:function e(){var t=iE(jO());return t.copy=function(){return _O(t,e()).constant(t.constant())},xS.apply(t,arguments)},scaleOrdinal:SS,scaleImplicit:kS,scalePow:lE,scaleSqrt:function(){return lE.apply(null,arguments).exponent(.5)},scaleRadial:function e(){var t,n=PO(),r=[0,1],a=!1;function i(e){var r=dE(n(e));return isNaN(r)?t:a?Math.round(r):r}return i.invert=function(e){return n.invert(fE(e))},i.domain=function(e){return arguments.length?(n.domain(e),i):n.domain()},i.range=function(e){return arguments.length?(n.range((r=Array.from(e,kO)).map(fE)),i):r.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(a=!!e,i):a},i.clamp=function(e){return arguments.length?(n.clamp(e),i):n.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e(n.domain(),r).round(a).clamp(n.clamp()).unknown(t)},xS.apply(i,arguments),qO(i)},scaleQuantile:function e(){var t,n=[],r=[],a=[];function i(){var e=0,t=Math.max(1,r.length);for(a=new Array(t-1);++e<t;)a[e-1]=gS(n,e/t);return o}function o(e){return null==e||isNaN(e=+e)?t:r[nS(a,e)]}return o.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?a[t-1]:n[0],t<a.length?a[t]:n[n.length-1]]},o.domain=function(e){if(!arguments.length)return n.slice();n=[];for(let t of e)null==t||isNaN(t=+t)||n.push(t);return n.sort(Zk),i()},o.range=function(e){return arguments.length?(r=Array.from(e),i()):r.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return a.slice()},o.copy=function(){return e().domain(n).range(r).unknown(t)},xS.apply(o,arguments)},scaleQuantize:function e(){var t,n=0,r=1,a=1,i=[.5],o=[0,1];function c(e){return null!=e&&e<=e?o[nS(i,e,0,a)]:t}function s(){var e=-1;for(i=new Array(a);++e<a;)i[e]=((e+1)*r-(e-a)*n)/(a+1);return c}return c.domain=function(e){return arguments.length?([n,r]=e,n=+n,r=+r,s()):[n,r]},c.range=function(e){return arguments.length?(a=(o=Array.from(e)).length-1,s()):o.slice()},c.invertExtent=function(e){var t=o.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,i[0]]:t>=a?[i[a-1],r]:[i[t-1],i[t]]},c.unknown=function(e){return arguments.length?(t=e,c):c},c.thresholds=function(){return i.slice()},c.copy=function(){return e().domain([n,r]).range(o).unknown(t)},xS.apply(qO(c),arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],a=1;function i(e){return null!=e&&e<=e?r[nS(n,e,0,a)]:t}return i.domain=function(e){return arguments.length?(n=Array.from(e),a=Math.min(n.length,r.length-1),i):n.slice()},i.range=function(e){return arguments.length?(r=Array.from(e),a=Math.min(n.length,r.length-1),i):r.slice()},i.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e().domain(n).range(r).unknown(t)},xS.apply(i,arguments)},scaleTime:function(){return xS.apply(DM(iA,oA,FE,IE,ME,EE,SE,wE,bE,fA).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return xS.apply(DM(rA,aA,tA,QE,$E,VE,BE,LE,bE,dA).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},scaleSequential:function e(){var t=qO(TM()(OO));return t.copy=function(){return NM(t,e())},wS.apply(t,arguments)},scaleSequentialLog:function e(){var t=nE(TM()).domain([1,10]);return t.copy=function(){return NM(t,e()).base(t.base())},wS.apply(t,arguments)},scaleSequentialPow:IM,scaleSequentialSqrt:function(){return IM.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=iE(TM());return t.copy=function(){return NM(t,e()).constant(t.constant())},wS.apply(t,arguments)},scaleSequentialQuantile:function e(){var t=[],n=OO;function r(e){if(null!=e&&!isNaN(e=+e))return n((nS(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(Zk),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map(((e,r)=>n(r/(t.length-1))))},r.quantiles=function(e){return Array.from({length:e+1},((n,r)=>yS(t,r/e)))},r.copy=function(){return e(n).domain(t)},wS.apply(r,arguments)},scaleDiverging:function e(){var t=qO(RM()(OO));return t.copy=function(){return NM(t,e())},wS.apply(t,arguments)},scaleDivergingLog:function e(){var t=nE(RM()).domain([.1,1,10]);return t.copy=function(){return NM(t,e()).base(t.base())},wS.apply(t,arguments)},scaleDivergingPow:FM,scaleDivergingSqrt:function(){return FM.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=iE(RM());return t.copy=function(){return NM(t,e()).constant(t.constant())},wS.apply(t,arguments)},tickFormat:YO});function LM(e){return function(e){if(Array.isArray(e))return HM(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return HM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return HM(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function HM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function BM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BM(Object(n),!0).forEach((function(t){VM(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function VM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WM(e,t,n){return Pm(e)||Pm(t)?n:um(t)?Jf(e,t,n):hc(t)?t(e):n}function $M(e,t,n,r){var a=Zw(e,(function(e){return WM(e,t)}));if("number"===n){var i=a.filter((function(e){return sm(e)||parseFloat(e)}));return i.length?[Uw(i),zw(i)]:[1/0,-1/0]}return(r?a.filter((function(e){return!Pm(e)})):a).map((function(e){return um(e)||e instanceof Date?e:""}))}var YM=function(e){var t,n=e.type.displayName,r=e.props,a=r.stroke,i=r.fill;switch(n){case"Line":t=a;break;case"Area":case"Radar":t=a&&"none"!==a?a:i;break;default:t=i}return t},qM=function(e){var t,n=e.children,r=e.formattedGraphicalItems,a=e.legendWidth,i=e.legendContent,o=Ew(n,jm.displayName);return o?(t=o.props&&o.props.payload?o.props&&o.props.payload:"children"===i?(r||[]).reduce((function(e,t){var n=t.item,r=t.props,a=r.sectors||r.data||[];return e.concat(a.map((function(e){return{type:o.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}})))}),[]):(r||[]).map((function(e){var t=e.item,n=t.props,r=n.dataKey,a=n.name,i=n.legendType;return{inactive:n.hide,dataKey:r,type:o.props.iconType||i||"square",color:YM(t),value:a||r,payload:t.props}})),UM(UM(UM({},o.props),jm.getWithHeight(o,a)),{},{payload:t,item:o})):null},GM=function(e,t,n,r,a){var i=t.props.children,o=Ow(i,"ErrorBar").filter((function(e){return function(e,t,n){return!!Pm(t)||("horizontal"===e?"yAxis"===t:"vertical"===e||"x"===n?"xAxis"===t:"y"!==n||"yAxis"===t)}(r,a,e.props.direction)}));if(o&&o.length){var c=o.map((function(e){return e.props.dataKey}));return e.reduce((function(e,t){var r=WM(t,n,0),a=hu(r)?[Uw(r),zw(r)]:[r,r],i=c.reduce((function(e,n){var r=WM(t,n,0),i=a[0]-Math.abs(hu(r)?r[0]:r),o=a[1]+Math.abs(hu(r)?r[1]:r);return[Math.min(i,e[0]),Math.max(o,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},XM=function(e,t,n,r,a){var i=t.map((function(t){var i=t.props.dataKey;return"number"===n&&i&&GM(e,t,i,r)||$M(e,i,n,a)}));if("number"===n)return i.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]);var o={};return i.reduce((function(e,t){for(var n=0,r=t.length;n<r;n++)o[t[n]]||(o[t[n]]=!0,e.push(t[n]));return e}),[])},ZM=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},KM=function(e,t,n){var r,a,i=e.map((function(e){return e.coordinate===t&&(r=!0),e.coordinate===n&&(a=!0),e.coordinate}));return r||i.push(t),a||i.push(n),i},JM=function(e,t,n){if(!e)return null;var r=e.scale,a=e.duplicateDomain,i=e.type,o=e.range,c="scaleBand"===e.realScaleType?r.bandwidth()/2:2,s=(t||n)&&"category"===i&&r.bandwidth?r.bandwidth()/c:0;return s="angleAxis"===e.axisType?2*om(o[0]-o[1])*s:s,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map((function(e){var t=a?a.indexOf(e):e;return{coordinate:r(t)+s,value:e,offset:s}})):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map((function(e,t){return{coordinate:r(e)+s,value:e,index:t,offset:s}})):r.ticks&&!n?r.ticks(e.tickCount).map((function(e){return{coordinate:r(e)+s,value:e,offset:s}})):r.domain().map((function(e,t){return{coordinate:r(e)+s,value:a?a[e]:e,index:t,offset:s}}))},QM=function(e,t,n){var r;return hc(n)?r=n:hc(t)&&(r=t),hc(e)||r?function(t,n,a,i){hc(e)&&e(t,n,a,i),hc(r)&&r(t,n,a,i)}:null},e_={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var a=0,i=0,o=0;o<t;++o){var c=tm(e[o][n][1])?e[o][n][0]:e[o][n][1];c>=0?(e[o][n][0]=a,e[o][n][1]=a+c,a=e[o][n][1]):(e[o][n][0]=i,e[o][n][1]=i+c,i=e[o][n][1])}},expand:function(e,t){if((r=e.length)>0){for(var n,r,a,i=0,o=e[0].length;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}Eh(e,t)}},none:Eh,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,a=e[t[0]],i=a.length;r<i;++r){for(var o=0,c=0;o<n;++o)c+=e[o][r][1]||0;a[r][1]+=a[r][0]=-c/2}Eh(e,t)}},wiggle:function(e,t){if((a=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,a,i=0,o=1;o<r;++o){for(var c=0,s=0,u=0;c<a;++c){for(var l=e[t[c]],f=l[o][1]||0,d=(f-(l[o-1][1]||0))/2,p=0;p<c;++p){var h=e[t[p]];d+=(h[o][1]||0)-(h[o-1][1]||0)}s+=f,u+=d*f}n[o-1][1]+=n[o-1][0]=i,s&&(i-=u/s)}n[o-1][1]+=n[o-1][0]=i,Eh(e,t)}},positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var a=0,i=0;i<t;++i){var o=tm(e[i][n][1])?e[i][n][0]:e[i][n][1];o>=0?(e[i][n][0]=a,e[i][n][1]=a+o,a=e[i][n][1]):(e[i][n][0]=0,e[i][n][1]=0)}}},t_=function(e,t,n){var r=t.map((function(e){return e.props.dataKey})),a=function(){var e=Tp([]),t=Ah,n=Eh,r=Mh;function a(a){var i,o,c=Array.from(e.apply(this,arguments),_h),s=c.length,u=-1;for(const e of a)for(i=0,++u;i<s;++i)(c[i][u]=[0,+r(e,c[i].key,u,a)]).data=e;for(i=0,o=Lp(t(c));i<s;++i)c[o[i]].index=i;return n(c,o),c}return a.keys=function(t){return arguments.length?(e="function"==typeof t?t:Tp(Array.from(t)),a):e},a.value=function(e){return arguments.length?(r="function"==typeof e?e:Tp(+e),a):r},a.order=function(e){return arguments.length?(t=null==e?Ah:"function"==typeof e?e:Tp(Array.from(e)),a):t},a.offset=function(e){return arguments.length?(n=null==e?Eh:e,a):n},a}().keys(r).value((function(e,t){return+WM(e,t,0)})).order(Ah).offset(e_[n]);return a(e)},n_=function(e,t){var n=t.realScaleType,r=t.type,a=t.tickCount,i=t.originalDomain,o=t.allowDecimals,c=n||t.scale;if("auto"!==c&&"linear"!==c)return null;if(a&&"number"===r&&i&&("auto"===i[0]||"auto"===i[1])){var s=e.domain();if(!s.length)return null;var u=Gk(s,a,o);return e.domain(function(e,t){return"number"===t?[Uw(e),zw(e)]:e}(u,r)),{niceTicks:u}}if(a&&"number"===r){var l=e.domain();return{niceTicks:Xk(l,a,o)}}return null},r_=function(e){var t=e.axis,n=e.ticks,r=e.bandSize,a=e.entry,i=e.index,o=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!Pm(a[t.dataKey])){var c=mm(n,"value",a[t.dataKey]);if(c)return c.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var s=WM(a,Pm(o)?t.dataKey:o);return Pm(s)?null:t.scale(s)},a_=function(e,t,n){return Object.keys(e).reduce((function(r,a){var i=e[a].stackedData.reduce((function(e,r){var a=r.slice(t,n+1).reduce((function(e,t){return[Uw(t.concat([e[0]]).filter(sm)),zw(t.concat([e[1]]).filter(sm))]}),[1/0,-1/0]);return[Math.min(e[0],a[0]),Math.max(e[1],a[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}))},i_=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,o_=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,c_=function(e,t,n){if(hc(e))return e(t,n);if(!hu(e))return t;var r=[];if(sm(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(i_.test(e[0])){var a=+i_.exec(e[0])[1];r[0]=t[0]-a}else hc(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if(sm(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(o_.test(e[1])){var i=+o_.exec(e[1])[1];r[1]=t[1]+i}else hc(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},s_=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var a=Uy(t,(function(e){return e.coordinate})),i=1/0,o=1,c=a.length;o<c;o++){var s=a[o],u=a[o-1];i=Math.min((s.coordinate||0)-(u.coordinate||0),i)}return i===1/0?0:i}return n?void 0:0},u_=function(e,t,n){return e&&e.length?Dw(e,Jf(n,"type.defaultProps.domain"))?t:e:t},l_=function(e,t){var n=e.props,r=n.dataKey,a=n.name,i=n.unit,o=n.formatter,c=n.tooltipType,s=n.chartType;return UM(UM({},Bo(e)),{},{dataKey:r,unit:i,formatter:o,name:a||r,color:YM(e),value:WM(t,r),type:c,payload:t,chartType:s})};function f_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f_(Object(n),!0).forEach((function(t){p_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h_=Math.PI/180,m_=function(e){return 180*e/Math.PI},v_=function(e,t,n,r){return{x:e+Math.cos(-h_*r)*n,y:t+Math.sin(-h_*r)*n}},y_=function(e,t){var n=e.x,r=e.y,a=t.cx,i=t.cy,o=function(e,t){var n=e.x,r=e.y,a=t.x,i=t.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(r-i,2))}({x:n,y:r},{x:a,y:i});if(o<=0)return{radius:o};var c=(n-a)/o,s=Math.acos(c);return r>i&&(s=2*Math.PI-s),{radius:o,angle:m_(s),angleInRadian:s}},g_=function(e,t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),i=Math.floor(r/360);return e+360*Math.min(a,i)},b_=function(e,t){var n=e.x,r=e.y,a=y_({x:n,y:r},t),i=a.radius,o=a.angle,c=t.innerRadius,s=t.outerRadius;if(i<c||i>s)return!1;if(0===i)return!0;var u,l=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),a=Math.floor(n/360),i=Math.min(r,a);return{startAngle:t-360*i,endAngle:n-360*i}}(t),f=l.startAngle,d=l.endAngle,p=o;if(f<=d){for(;p>d;)p-=360;for(;p<f;)p+=360;u=p>=f&&p<=d}else{for(;p>f;)p-=360;for(;p<d;)p+=360;u=p>=d&&p<=f}return u?d_(d_({},t),{},{radius:i,angle:g_(p,t)}):null};function x_(e){return function(e){if(Array.isArray(e))return w_(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return w_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w_(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k_(Object(n),!0).forEach((function(t){O_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E_(){return E_=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},E_.apply(this,arguments)}var A_=function(e,n,r){var a,i,o=e.position,c=e.viewBox,s=e.offset,u=e.className,l=c,f=l.cx,d=l.cy,p=l.innerRadius,h=l.outerRadius,m=l.startAngle,v=l.endAngle,y=l.clockWise,g=(p+h)/2,b=function(e,t){return om(t-e)*Math.min(Math.abs(t-e),360)}(m,v),x=b>=0?1:-1;"insideStart"===o?(a=m+x*s,i=y):"insideEnd"===o?(a=v-x*s,i=!y):"end"===o&&(a=v+x*s,i=y),i=b<=0?i:!i;var w=v_(f,d,g,a),k=v_(f,d,g,a+359*(i?1:-1)),S="M".concat(w.x,",").concat(w.y,"\n A").concat(g,",").concat(g,",0,1,").concat(i?0:1,",\n ").concat(k.x,",").concat(k.y),O=Pm(e.id)?fm("recharts-radial-line-"):e.id;return t.createElement("text",E_({},r,{dominantBaseline:"central",className:Io("recharts-radial-bar-label",u)}),t.createElement("defs",null,t.createElement("path",{id:O,d:S})),t.createElement("textPath",{xlinkHref:"#".concat(O)},n))};function M_(e){var n,r=e.viewBox,a=e.position,i=e.value,c=e.children,s=e.content,l=e.className,f=void 0===l?"":l,d=e.textBreakAll;if(!r||Pm(i)&&Pm(c)&&!o(s)&&!hc(s))return null;if(o(s))return u(s,e);if(hc(s)){if(o(n=h(s,e)))return n}else n=function(e){var t=e.value,n=e.formatter,r=Pm(e.children)?t:e.children;return hc(n)?n(r):r}(e);var p=function(e){return sm(e.cx)}(r),m=Bo(e,!0);if(p&&("insideStart"===a||"insideEnd"===a||"end"===a))return A_(e,n,m);var v=p?function(e){var t=e.viewBox,n=e.offset,r=e.position,a=t,i=a.cx,o=a.cy,c=a.innerRadius,s=a.outerRadius,u=(a.startAngle+a.endAngle)/2;if("outside"===r){var l=v_(i,o,s+n,u),f=l.x;return{x:f,y:l.y,textAnchor:f>=i?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:i,y:o,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:i,y:o,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:i,y:o,textAnchor:"middle",verticalAnchor:"end"};var d=v_(i,o,(c+s)/2,u);return{x:d.x,y:d.y,textAnchor:"middle",verticalAnchor:"middle"}}(e):function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,a=e.position,i=t,o=i.x,c=i.y,s=i.width,u=i.height,l=u>=0?1:-1,f=l*r,d=l>0?"end":"start",p=l>0?"start":"end",h=s>=0?1:-1,m=h*r,v=h>0?"end":"start",y=h>0?"start":"end";if("top"===a)return S_(S_({},{x:o+s/2,y:c-l*r,textAnchor:"middle",verticalAnchor:d}),n?{height:Math.max(c-n.y,0),width:s}:{});if("bottom"===a)return S_(S_({},{x:o+s/2,y:c+u+f,textAnchor:"middle",verticalAnchor:p}),n?{height:Math.max(n.y+n.height-(c+u),0),width:s}:{});if("left"===a){var g={x:o-m,y:c+u/2,textAnchor:v,verticalAnchor:"middle"};return S_(S_({},g),n?{width:Math.max(g.x-n.x,0),height:u}:{})}if("right"===a){var b={x:o+s+m,y:c+u/2,textAnchor:y,verticalAnchor:"middle"};return S_(S_({},b),n?{width:Math.max(n.x+n.width-b.x,0),height:u}:{})}var x=n?{width:s,height:u}:{};return"insideLeft"===a?S_({x:o+m,y:c+u/2,textAnchor:y,verticalAnchor:"middle"},x):"insideRight"===a?S_({x:o+s-m,y:c+u/2,textAnchor:v,verticalAnchor:"middle"},x):"insideTop"===a?S_({x:o+s/2,y:c+f,textAnchor:"middle",verticalAnchor:p},x):"insideBottom"===a?S_({x:o+s/2,y:c+u-f,textAnchor:"middle",verticalAnchor:d},x):"insideTopLeft"===a?S_({x:o+m,y:c+f,textAnchor:y,verticalAnchor:p},x):"insideTopRight"===a?S_({x:o+s-m,y:c+f,textAnchor:v,verticalAnchor:p},x):"insideBottomLeft"===a?S_({x:o+m,y:c+u-f,textAnchor:y,verticalAnchor:d},x):"insideBottomRight"===a?S_({x:o+s-m,y:c+u-f,textAnchor:v,verticalAnchor:d},x):Ro(a)&&(sm(a.x)||cm(a.x))&&(sm(a.y)||cm(a.y))?S_({x:o+dm(a.x,s),y:c+dm(a.y,u),textAnchor:"end",verticalAnchor:"end"},x):S_({x:o+s/2,y:c+u/2,textAnchor:"middle",verticalAnchor:"middle"},x)}(e);return t.createElement(Yx,E_({className:Io("recharts-label",f)},m,v,{breakAll:d}),n)}M_.displayName="Label",M_.defaultProps={offset:5};var __=function(e){var t=e.cx,n=e.cy,r=e.angle,a=e.startAngle,i=e.endAngle,o=e.r,c=e.radius,s=e.innerRadius,u=e.outerRadius,l=e.x,f=e.y,d=e.top,p=e.left,h=e.width,m=e.height,v=e.clockWise,y=e.labelViewBox;if(y)return y;if(sm(h)&&sm(m)){if(sm(l)&&sm(f))return{x:l,y:f,width:h,height:m};if(sm(d)&&sm(p))return{x:d,y:p,width:h,height:m}}return sm(l)&&sm(f)?{x:l,y:f,width:0,height:0}:sm(t)&&sm(n)?{cx:t,cy:n,startAngle:a||r||0,endAngle:i||r||0,innerRadius:s||0,outerRadius:u||c||o||0,clockWise:v}:e.viewBox?e.viewBox:{}},j_=function(e,n){return e?!0===e?t.createElement(M_,{key:"label-implicit",viewBox:n}):um(e)?t.createElement(M_,{key:"label-implicit",viewBox:n,value:e}):o(e)?e.type===M_?u(e,{key:"label-implicit",viewBox:n}):t.createElement(M_,{key:"label-implicit",content:e,viewBox:n}):hc(e)?t.createElement(M_,{key:"label-implicit",content:e,viewBox:n}):Ro(e)?t.createElement(M_,E_({viewBox:n},e,{key:"label-implicit"})):null:null};M_.parseViewBox=__,M_.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=__(e),i=Ow(r,M_.displayName).map((function(e,n){return u(e,{viewBox:t||a,key:"label-".concat(n)})}));if(!n)return i;var o=j_(e.label,t||a);return[o].concat(x_(i))};var P_=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};function C_(e){return function(e){if(Array.isArray(e))return D_(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return D_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D_(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T_(){return T_=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},T_.apply(this,arguments)}function N_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N_(Object(n),!0).forEach((function(t){R_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F_(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var z_={valueAccessor:function(e){return hu(e.value)?P_(e.value):e.value}};function L_(e){var n=e.data,r=e.valueAccessor,a=e.dataKey,i=e.clockWise,o=e.id,c=e.textBreakAll,s=F_(e,["data","valueAccessor","dataKey","clockWise","id","textBreakAll"]);return n&&n.length?t.createElement(Xo,{className:"recharts-label-list"},n.map((function(e,n){var u=Pm(a)?r(e,n):WM(e&&e.payload,a),l=Pm(o)?{}:{id:"".concat(o,"-").concat(n)};return t.createElement(M_,T_({},Bo(e,!0),s,l,{parentViewBox:e.parentViewBox,index:n,value:u,textBreakAll:c,viewBox:M_.parseViewBox(Pm(i)?e:I_(I_({},e),{},{clockWise:i})),key:"label-".concat(n)}))}))):null}function H_(e,n){return e?!0===e?t.createElement(L_,{key:"labelList-implicit",data:n}):t.isValidElement(e)||hc(e)?t.createElement(L_,{key:"labelList-implicit",data:n,content:e}):Ro(e)?t.createElement(L_,T_({data:n},e,{key:"labelList-implicit"})):null:null}function B_(e){return B_="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},B_(e)}function U_(){return U_=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},U_.apply(this,arguments)}function V_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W_(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 $_(e,t){return $_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},$_(e,t)}function Y_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=G_(e);if(t){var a=G_(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return q_(this,n)}}function q_(e,t){return!t||"object"!==B_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function G_(e){return G_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},G_(e)}L_.displayName="LabelList",L_.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=Ow(r,L_.displayName).map((function(e,n){return u(e,{data:t,key:"labelList-".concat(n)})}));if(!n)return a;var i=H_(e.label,t);return[i].concat(C_(a))},L_.defaultProps=z_;var X_=function(e){var t=e.cx,n=e.cy,r=e.radius,a=e.angle,i=e.sign,o=e.isExternal,c=e.cornerRadius,s=e.cornerIsExternal,u=c*(o?1:-1)+r,l=Math.asin(c/u)/h_,f=s?a:a+i*l,d=s?a-i*l:a;return{center:v_(t,n,u,f),circleTangency:v_(t,n,r,f),lineTangency:v_(t,n,u*Math.cos(l*h_),d),theta:l}},Z_=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,a=e.outerRadius,i=e.startAngle,o=function(e,t){return om(t-e)*Math.min(Math.abs(t-e),359.999)}(i,e.endAngle),c=i+o,s=v_(t,n,a,i),u=v_(t,n,a,c),l="M ".concat(s.x,",").concat(s.y,"\n A ").concat(a,",").concat(a,",0,\n ").concat(+(Math.abs(o)>180),",").concat(+(i>c),",\n ").concat(u.x,",").concat(u.y,"\n ");if(r>0){var f=v_(t,n,r,i),d=v_(t,n,r,c);l+="L ".concat(d.x,",").concat(d.y,"\n A ").concat(r,",").concat(r,",0,\n ").concat(+(Math.abs(o)>180),",").concat(+(i<=c),",\n ").concat(f.x,",").concat(f.y," Z")}else l+="L ".concat(t,",").concat(n," Z");return l},K_=function(e){!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&&$_(e,t)}(o,c);var n,r,a,i=Y_(o);function o(){return V_(this,o),i.apply(this,arguments)}return n=o,r=[{key:"render",value:function(){var e=this.props,n=e.cx,r=e.cy,a=e.innerRadius,i=e.outerRadius,o=e.cornerRadius,c=e.forceCornerRadius,s=e.cornerIsExternal,u=e.startAngle,l=e.endAngle,f=e.className;if(i<a||u===l)return null;var d,p=Io("recharts-sector",f),h=i-a,m=dm(o,h,0,!0);return d=m>0&&Math.abs(u-l)<360?function(e){var t=e.cx,n=e.cy,r=e.innerRadius,a=e.outerRadius,i=e.cornerRadius,o=e.forceCornerRadius,c=e.cornerIsExternal,s=e.startAngle,u=e.endAngle,l=om(u-s),f=X_({cx:t,cy:n,radius:a,angle:s,sign:l,cornerRadius:i,cornerIsExternal:c}),d=f.circleTangency,p=f.lineTangency,h=f.theta,m=X_({cx:t,cy:n,radius:a,angle:u,sign:-l,cornerRadius:i,cornerIsExternal:c}),v=m.circleTangency,y=m.lineTangency,g=m.theta,b=c?Math.abs(s-u):Math.abs(s-u)-h-g;if(b<0)return o?"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 "):Z_({cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:s,endAngle:u});var x="M ".concat(p.x,",").concat(p.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(l<0),",").concat(d.x,",").concat(d.y,"\n A").concat(a,",").concat(a,",0,").concat(+(b>180),",").concat(+(l<0),",").concat(v.x,",").concat(v.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(l<0),",").concat(y.x,",").concat(y.y,"\n ");if(r>0){var w=X_({cx:t,cy:n,radius:r,angle:s,sign:l,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),k=w.circleTangency,S=w.lineTangency,O=w.theta,E=X_({cx:t,cy:n,radius:r,angle:u,sign:-l,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),A=E.circleTangency,M=E.lineTangency,_=E.theta,j=c?Math.abs(s-u):Math.abs(s-u)-O-_;if(j<0&&0===i)return"".concat(x,"L").concat(t,",").concat(n,"Z");x+="L".concat(M.x,",").concat(M.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(l<0),",").concat(A.x,",").concat(A.y,"\n A").concat(r,",").concat(r,",0,").concat(+(j>180),",").concat(+(l>0),",").concat(k.x,",").concat(k.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(l<0),",").concat(S.x,",").concat(S.y,"Z")}else x+="L".concat(t,",").concat(n,"Z");return x}({cx:n,cy:r,innerRadius:a,outerRadius:i,cornerRadius:Math.min(m,h/2),forceCornerRadius:c,cornerIsExternal:s,startAngle:u,endAngle:l}):Z_({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:u,endAngle:l}),t.createElement("path",U_({},Bo(this.props,!0),{className:p,d:d}))}}],r&&W_(n.prototype,r),a&&W_(n,a),o}();function J_(e){return J_="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},J_(e)}function Q_(){return Q_=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},Q_.apply(this,arguments)}function ej(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ej(Object(n),!0).forEach((function(t){nj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ej(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nj(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aj(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 ij(e,t){return ij=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ij(e,t)}function oj(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sj(e);if(t){var a=sj(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cj(this,n)}}function cj(e,t){return!t||"object"!==J_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sj(e){return sj=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},sj(e)}K_.defaultProps={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1};var uj={curveBasisClosed:function(e){return new dh(e)},curveBasisOpen:function(e){return new ph(e)},curveBasis:function(e){return new fh(e)},curveLinearClosed:function(e){return new hh(e)},curveLinear:Bp,curveMonotoneX:function(e){return new bh(e)},curveMonotoneY:function(e){return new xh(e)},curveNatural:function(e){return new kh(e)},curveStep:function(e){return new Oh(e,.5)},curveStepAfter:function(e){return new Oh(e,1)},curveStepBefore:function(e){return new Oh(e,0)}},lj=function(e){return e.x===+e.x&&e.y===+e.y},fj=function(e){return e.x},dj=function(e){return e.y},pj=function(e){!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&&ij(e,t)}(o,c);var n,r,a,i=oj(o);function o(){return rj(this,o),i.apply(this,arguments)}return n=o,r=[{key:"getPath",value:function(){var e,t=this.props,n=t.type,r=t.points,a=t.baseLine,i=t.layout,o=t.connectNulls,c=function(e,t){if(hc(e))return e;var n="curve".concat(Mp(e));return"curveMonotone"===n&&t?uj["".concat(n).concat("vertical"===t?"Y":"X")]:uj[n]||Bp}(n,i),s=o?r.filter((function(e){return lj(e)})):r;if(hu(a)){var u=o?a.filter((function(e){return lj(e)})):a,l=s.map((function(e,t){return tj(tj({},e),{},{base:u[t]})}));return e="vertical"===i?$p().y(dj).x1(fj).x0((function(e){return e.base.x})):$p().x(fj).y1(dj).y0((function(e){return e.base.y})),e.defined(lj).curve(c),e(l)}return(e="vertical"===i&&sm(a)?$p().y(dj).x1(fj).x0(a):sm(a)?$p().x(fj).y1(dj).y0(a):Wp().x(fj).y(dj)).defined(lj).curve(c),e(s)}},{key:"render",value:function(){var e=this.props,n=e.className,r=e.points,a=e.path,i=e.pathRef;if(!(r&&r.length||a))return null;var o=r&&r.length?this.getPath():a;return t.createElement("path",Q_({},Bo(this.props),Uo(this.props),{className:Io("recharts-curve",n),d:o,ref:i}))}}],r&&aj(n.prototype,r),a&&aj(n,a),o}();function hj(e){return hj="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},hj(e)}function mj(){return mj=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},mj.apply(this,arguments)}function vj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yj(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 gj(e,t){return gj=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},gj(e,t)}function bj(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wj(e);if(t){var a=wj(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return xj(this,n)}}function xj(e,t){return!t||"object"!==hj(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wj(e){return wj=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wj(e)}pj.defaultProps={type:"linear",points:[],connectNulls:!1};var kj=function(e,t,n,r,a){var i,o=Math.min(Math.abs(n)/2,Math.abs(r)/2),c=r>=0?1:-1,s=n>=0?1:-1,u=r>=0&&n>=0||r<0&&n<0?1:0;if(o>0&&a instanceof Array){for(var l=[0,0,0,0],f=0;f<4;f++)l[f]=a[f]>o?o:a[f];i="M".concat(e,",").concat(t+c*l[0]),l[0]>0&&(i+="A ".concat(l[0],",").concat(l[0],",0,0,").concat(u,",").concat(e+s*l[0],",").concat(t)),i+="L ".concat(e+n-s*l[1],",").concat(t),l[1]>0&&(i+="A ".concat(l[1],",").concat(l[1],",0,0,").concat(u,",\n ").concat(e+n,",").concat(t+c*l[1])),i+="L ".concat(e+n,",").concat(t+r-c*l[2]),l[2]>0&&(i+="A ".concat(l[2],",").concat(l[2],",0,0,").concat(u,",\n ").concat(e+n-s*l[2],",").concat(t+r)),i+="L ".concat(e+s*l[3],",").concat(t+r),l[3]>0&&(i+="A ".concat(l[3],",").concat(l[3],",0,0,").concat(u,",\n ").concat(e,",").concat(t+r-c*l[3])),i+="Z"}else if(o>0&&a===+a&&a>0){var d=Math.min(o,a);i="M ".concat(e,",").concat(t+c*d,"\n A ").concat(d,",").concat(d,",0,0,").concat(u,",").concat(e+s*d,",").concat(t,"\n L ").concat(e+n-s*d,",").concat(t,"\n A ").concat(d,",").concat(d,",0,0,").concat(u,",").concat(e+n,",").concat(t+c*d,"\n L ").concat(e+n,",").concat(t+r-c*d,"\n A ").concat(d,",").concat(d,",0,0,").concat(u,",").concat(e+n-s*d,",").concat(t+r,"\n L ").concat(e+s*d,",").concat(t+r,"\n A ").concat(d,",").concat(d,",0,0,").concat(u,",").concat(e,",").concat(t+r-c*d," Z")}else i="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return i},Sj=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,a=t.x,i=t.y,o=t.width,c=t.height;if(Math.abs(o)>0&&Math.abs(c)>0){var s=Math.min(a,a+o),u=Math.max(a,a+o),l=Math.min(i,i+c),f=Math.max(i,i+c);return n>=s&&n<=u&&r>=l&&r<=f}return!1},Oj=function(e){!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&&gj(e,t)}(o,c);var n,r,a,i=bj(o);function o(){var e;vj(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=i.call.apply(i,[this].concat(n))).state={totalLength:-1},e.node=void 0,e}return n=o,r=[{key:"componentDidMount",value:function(){if(this.node&&this.node.getTotalLength)try{var e=this.node.getTotalLength();e&&this.setState({totalLength:e})}catch(e){}}},{key:"render",value:function(){var e=this,n=this.props,r=n.x,a=n.y,i=n.width,o=n.height,c=n.radius,s=n.className,u=this.state.totalLength,l=this.props,f=l.animationEasing,d=l.animationDuration,p=l.animationBegin,h=l.isAnimationActive,m=l.isUpdateAnimationActive;if(r!==+r||a!==+a||i!==+i||o!==+o||0===i||0===o)return null;var v=Io("recharts-rectangle",s);return m?t.createElement(Vv,{canBegin:u>0,from:{width:i,height:o,x:r,y:a},to:{width:i,height:o,x:r,y:a},duration:d,animationEasing:f,isActive:m},(function(n){var r=n.width,a=n.height,i=n.x,o=n.y;return t.createElement(Vv,{canBegin:u>0,from:"0px ".concat(-1===u?1:u,"px"),to:"".concat(u,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:d,isActive:h,easing:f},t.createElement("path",mj({},Bo(e.props,!0),{className:v,d:kj(i,o,r,a,c),ref:function(t){e.node=t}})))})):t.createElement("path",mj({},Bo(this.props,!0),{className:v,d:kj(r,a,i,o,c)}))}}],r&&yj(n.prototype,r),a&&yj(n,a),o}();function Ej(e){return Ej="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},Ej(e)}function Aj(){return Aj=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},Aj.apply(this,arguments)}function Mj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _j(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 jj(e,t){return jj=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},jj(e,t)}function Pj(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Dj(e);if(t){var a=Dj(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Cj(this,n)}}function Cj(e,t){return!t||"object"!==Ej(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dj(e){return Dj=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Dj(e)}Oj.defaultProps={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"};var Tj=function(e){!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&&jj(e,t)}(o,c);var n,r,a,i=Pj(o);function o(){return Mj(this,o),i.apply(this,arguments)}return n=o,r=[{key:"render",value:function(){var e=this.props,n=e.cx,r=e.cy,a=e.r,i=e.className,o=Io("recharts-dot",i);return n===+n&&r===+r&&a===+a?t.createElement("circle",Aj({},Bo(this.props),Uo(this.props),{className:o,cx:n,cy:r,r:a})):null}}],r&&_j(n.prototype,r),a&&_j(n,a),o}();function Nj(e){return Nj="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},Nj(e)}function Ij(){return Ij=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},Ij.apply(this,arguments)}function Rj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fj(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 zj(e,t){return zj=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},zj(e,t)}function Lj(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bj(e);if(t){var a=Bj(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Hj(this,n)}}function Hj(e,t){return!t||"object"!==Nj(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bj(e){return Bj=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Bj(e)}var Uj=function(e){!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&&zj(e,t)}(o,c);var n,r,a,i=Lj(o);function o(){return Rj(this,o),i.apply(this,arguments)}return n=o,r=[{key:"render",value:function(){var e=this.props,n=e.x,r=e.y,a=e.width,i=e.height,c=e.top,s=e.left,u=e.className;return sm(n)&&sm(r)&&sm(a)&&sm(i)&&sm(c)&&sm(s)?t.createElement("path",Ij({},Bo(this.props,!0),{className:Io("recharts-cross",u),d:o.getPath(n,r,a,i,c,s)})):null}}],a=[{key:"getPath",value:function(e,t,n,r,a,i){return"M".concat(e,",").concat(a,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n)}}],r&&Fj(n.prototype,r),a&&Fj(n,a),o}();Uj.defaultProps={x:0,y:0,top:0,left:0,width:0,height:0};var Vj=Math.ceil,Wj=Math.max;var $j=function(e,t,n,r){for(var a=-1,i=Wj(Vj((t-e)/(n||1)),0),o=Array(i);i--;)o[r?i:++a]=e,e+=n;return o},Yj=Pg;var qj=function(e){return e?Infinity===(e=Yj(e))||-Infinity===e?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},Gj=$j,Xj=zy,Zj=qj;var Kj=function(e){return function(t,n,r){return r&&"number"!=typeof r&&Xj(t,n,r)&&(n=r=void 0),t=Zj(t),void 0===n?(n=t,t=0):n=Zj(n),r=void 0===r?t<n?1:-1:Zj(r),Gj(t,n,r,e)}},Jj=Kj();function Qj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qj(Object(n),!0).forEach((function(t){tP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nP=["Webkit","Moz","O","ms"];function rP(e){return rP="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},rP(e)}function aP(){return aP=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},aP.apply(this,arguments)}function iP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iP(Object(n),!0).forEach((function(t){cP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sP(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 uP(e,t){return uP=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},uP(e,t)}function lP(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pP(e);if(t){var a=pP(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return fP(this,n)}}function fP(e,t){return!t||"object"!==rP(t)&&"function"!=typeof t?dP(e):t}function dP(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pP(e){return pP=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pP(e)}var hP=function(e){return e.changedTouches&&!!e.changedTouches.length},mP=function(e){!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&&uP(e,t)}(o,c);var n,r,a,i=lP(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).leaveTimer=void 0,t.travellerDragStartHandlers=void 0,t.handleDrag=function(e){t.leaveTimer&&(clearTimeout(t.leaveTimer),t.leaveTimer=null),t.state.isTravellerMoving?t.handleTravellerMove(e):t.state.isSlideMoving&&t.handleSlideDrag(e)},t.handleTouchMove=function(e){null!=e.changedTouches&&e.changedTouches.length>0&&t.handleDrag(e.changedTouches[0])},t.handleDragEnd=function(){t.setState({isTravellerMoving:!1,isSlideMoving:!1}),t.detachDragEndListener()},t.handleLeaveWrapper=function(){(t.state.isTravellerMoving||t.state.isSlideMoving)&&(t.leaveTimer=window.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=hP(e)?e.changedTouches[0]:e;t.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:n.pageX}),t.attachDragEndListener()},t.travellerDragStartHandlers={startX:t.handleTravellerDragStart.bind(dP(t),"startX"),endX:t.handleTravellerDragStart.bind(dP(t),"endX")},t.state={},t}return n=o,r=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var t=e.startX,n=e.endX,r=this.state.scaleValues,a=this.props,i=a.gap,c=a.data.length-1,s=Math.min(t,n),u=Math.max(t,n),l=o.getIndexInRange(r,s),f=o.getIndexInRange(r,u);return{startIndex:l-l%i,endIndex:f===c?c:f-f%i}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,a=t.dataKey,i=WM(n[e],a,e);return hc(r)?r(i,e):i}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,a=t.endX,i=this.props,o=i.x,c=i.width,s=i.travellerWidth,u=i.startIndex,l=i.endIndex,f=i.onChange,d=e.pageX-n;d>0?d=Math.min(d,o+c-s-a,o+c-s-r):d<0&&(d=Math.max(d,o-r,o-a));var p=this.getIndex({startX:r+d,endX:a+d});p.startIndex===u&&p.endIndex===l||!f||f(p),this.setState({startX:r+d,endX:a+d,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=hP(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t,n=this.state,r=n.brushMoveStartX,a=n.movingTravellerId,i=n.endX,o=n.startX,c=this.state[a],s=this.props,u=s.x,l=s.width,f=s.travellerWidth,d=s.onChange,p=s.gap,h=s.data,m={startX:this.state.startX,endX:this.state.endX},v=e.pageX-r;v>0?v=Math.min(v,u+l-f-c):v<0&&(v=Math.max(v,u-c)),m[a]=c+v;var y=this.getIndex(m),g=y.startIndex,b=y.endIndex;this.setState((cP(t={},a,c+v),cP(t,"brushMoveStartX",e.pageX),t),(function(){var e;d&&(e=h.length-1,("startX"===a&&(i>o?g%p==0:b%p==0)||i<o&&b===e||"endX"===a&&(i>o?b%p==0:g%p==0)||i>o&&b===e)&&d(y))}))}},{key:"renderBackground",value:function(){var e=this.props,n=e.x,r=e.y,a=e.width,i=e.height,o=e.fill,c=e.stroke;return t.createElement("rect",{stroke:c,fill:o,x:n,y:r,width:a,height:i})}},{key:"renderPanorama",value:function(){var e=this.props,n=e.x,r=e.y,a=e.width,i=e.height,o=e.data,c=e.children,u=e.padding,l=s.only(c);return l?t.cloneElement(l,{x:n,y:r,width:a,height:i,margin:u,compact:!0,data:o}):null}},{key:"renderTravellerLayer",value:function(e,n){var r=this.props,a=r.y,i=r.travellerWidth,c=r.height,s=r.traveller,u=Math.max(e,this.props.x),l=oP(oP({},Bo(this.props)),{},{x:u,y:a,width:i,height:c});return t.createElement(Xo,{className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[n],onTouchStart:this.travellerDragStartHandlers[n],style:{cursor:"col-resize"}},o.renderTraveller(s,l))}},{key:"renderSlide",value:function(e,n){var r=this.props,a=r.y,i=r.height,o=r.stroke,c=r.travellerWidth,s=Math.min(e,n)+c,u=Math.max(Math.abs(n-e)-c,0);return t.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:o,fillOpacity:.2,x:s,y:a,width:u,height:i})}},{key:"renderText",value:function(){var e=this.props,n=e.startIndex,r=e.endIndex,a=e.y,i=e.height,o=e.travellerWidth,c=e.stroke,s=this.state,u=s.startX,l=s.endX,f={pointerEvents:"none",fill:c};return t.createElement(Xo,{className:"recharts-brush-texts"},t.createElement(Yx,aP({textAnchor:"end",verticalAnchor:"middle",x:Math.min(u,l)-5,y:a+i/2},f),this.getTextOfTick(n)),t.createElement(Yx,aP({textAnchor:"start",verticalAnchor:"middle",x:Math.max(u,l)+o+5,y:a+i/2},f),this.getTextOfTick(r)))}},{key:"render",value:function(){var e=this.props,n=e.data,r=e.className,a=e.children,i=e.x,o=e.y,c=e.width,s=e.height,u=e.alwaysShowText,l=this.state,f=l.startX,d=l.endX,p=l.isTextActive,h=l.isSlideMoving,m=l.isTravellerMoving;if(!n||!n.length||!sm(i)||!sm(o)||!sm(c)||!sm(s)||c<=0||s<=0)return null;var v=Io("recharts-brush",r),y=1===t.Children.count(a),g=function(e,t){if(!e)return null;var n=e.replace(/(\w)/,(function(e){return e.toUpperCase()})),r=nP.reduce((function(e,r){return eP(eP({},e),{},tP({},r+n,t))}),{});return r[e]=t,r}("userSelect","none");return t.createElement(Xo,{className:v,onMouseMove:this.handleDrag,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:g},this.renderBackground(),y&&this.renderPanorama(),this.renderSlide(f,d),this.renderTravellerLayer(f,"startX"),this.renderTravellerLayer(d,"endX"),(p||h||m||u)&&this.renderText())}}],a=[{key:"renderDefaultTraveller",value:function(e){var n=e.x,r=e.y,a=e.width,i=e.height,o=e.stroke,c=Math.floor(r+i/2)-1;return t.createElement(t.Fragment,null,t.createElement("rect",{x:n,y:r,width:a,height:i,fill:o,stroke:"none"}),t.createElement("line",{x1:n+1,y1:c,x2:n+a-1,y2:c,fill:"none",stroke:"#fff"}),t.createElement("line",{x1:n+1,y1:c+2,x2:n+a-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,n){return t.isValidElement(e)?t.cloneElement(e,n):hc(e)?e(n):o.renderDefaultTraveller(n)}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.data,r=e.width,a=e.x,i=e.travellerWidth,o=e.updateId,c=e.startIndex,s=e.endIndex;if(n!==t.prevData||o!==t.prevUpdateId)return oP({prevData:n,prevTravellerWidth:i,prevUpdateId:o,prevX:a,prevWidth:r},n&&n.length?function(e){var t=e.data,n=e.startIndex,r=e.endIndex,a=e.x,i=e.width,o=e.travellerWidth;if(!t||!t.length)return{};var c=t.length,s=AS().domain(Jj(0,c)).range([a,a+i-o]),u=s.domain().map((function(e){return s(e)}));return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,startX:s(n),endX:s(r),scale:s,scaleValues:u}}({data:n,width:r,x:a,travellerWidth:i,startIndex:c,endIndex:s}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||a!==t.prevX||i!==t.prevTravellerWidth)){t.scale.range([a,a+r-i]);var u=t.scale.domain().map((function(e){return t.scale(e)}));return{prevData:n,prevTravellerWidth:i,prevUpdateId:o,prevX:a,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:u}}return null}},{key:"getIndexInRange",value:function(e,t){for(var n=0,r=e.length-1;r-n>1;){var a=Math.floor((n+r)/2);e[a]>t?r=a:n=a}return t>=e[r]?r:n}}],r&&sP(n.prototype,r),a&&sP(n,a),o}();mP.displayName="Brush",mP.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 vP=ty;var yP=Ks,gP=Dd,bP=function(e,t){var n;return vP(e,(function(e,r,a){return!(n=t(e,r,a))})),!!n},xP=hu,wP=zy;var kP=function(e,t,n){var r=xP(e)?yP:bP;return n&&wP(e,t,n)&&(t=void 0),r(e,gP(t))},SP=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t};var OP=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0},EP=ty;var AP=OP,MP=function(e,t){var n=!0;return EP(e,(function(e,r,a){return n=!!t(e,r,a)})),n},_P=Dd,jP=hu,PP=zy;var CP=function(e,t,n){var r=jP(e)?AP:MP;return n&&PP(e,t,n)&&(t=void 0),r(e,_P(t))},DP=Oy;var TP=function(e,t,n){"__proto__"==t&&DP?DP(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},NP=TP,IP=Qv,RP=Dd;var FP=function(e,t){var n={};return t=RP(t),IP(e,(function(e,r,a){NP(n,r,t(e,r,a))})),n};function zP(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 LP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LP(Object(n),!0).forEach((function(t){BP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function BP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var UP=function(e,t){var n=e.x,r=e.y,a=t.x,i=t.y;return{x:Math.min(n,a),y:Math.min(r,i),width:Math.abs(a-n),height:Math.abs(i-r)}},VP=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scale=void 0,this.scale=t}var t,n,r;return t=e,n=[{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}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=t.position;if(void 0!==e){if(r)switch(r){case"start":default:return this.scale(e);case"middle":var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a;case"end":var i=this.bandwidth?this.bandwidth():0;return this.scale(e)+i}if(n){var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],r=[{key:"create",value:function(t){return new e(t)}}],n&&zP(t.prototype,n),r&&zP(t,r),e}();VP.EPS=1e-4;var WP=function(e){var t=Object.keys(e).reduce((function(t,n){return HP(HP({},t),{},BP({},n,VP.create(e[n])))}),{});return HP(HP({},t),{},{apply:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.bandAware,a=n.position;return FP(e,(function(e,n){return t[n].apply(e,{bandAware:r,position:a})}))},isInRange:function(e){return CP(e,(function(e,n){return t[n].isInRange(e)}))}})};function $P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$P(Object(n),!0).forEach((function(t){qP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GP(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return XP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XP(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function XP(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ZP(){return ZP=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},ZP.apply(this,arguments)}function KP(e){var n=e.x,r=e.y,a=e.segment,i=e.xAxis,o=e.yAxis,c=e.shape,s=e.className,u=e.alwaysShow,l=e.clipPathId;Pb(void 0===u,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=function(e,t,n,r,a){var i=a.viewBox,o=i.x,c=i.y,s=i.width,u=i.height,l=a.position;if(n){var f=a.y,d=a.yAxis.orientation,p=e.y.apply(f,{position:l});if(SP(a,"discard")&&!e.y.isInRange(p))return null;var h=[{x:o+s,y:p},{x:o,y:p}];return"left"===d?h.reverse():h}if(t){var m=a.x,v=a.xAxis.orientation,y=e.x.apply(m,{position:l});if(SP(a,"discard")&&!e.x.isInRange(y))return null;var g=[{x:y,y:c+u},{x:y,y:c}];return"top"===v?g.reverse():g}if(r){var b=a.segment.map((function(t){return e.apply(t,{position:l})}));return SP(a,"discard")&&kP(b,(function(t){return!e.isInRange(t)}))?null:b}return null}(WP({x:i.scale,y:o.scale}),um(n),um(r),a&&2===a.length,e);if(!f)return null;var d=GP(f,2),p=d[0],h=p.x,m=p.y,v=d[1],y=v.x,g=v.y,b=YP(YP({clipPath:SP(e,"hidden")?"url(#".concat(l,")"):void 0},Bo(e,!0)),{},{x1:h,y1:m,x2:y,y2:g});return t.createElement(Xo,{className:Io("recharts-reference-line",s)},function(e,n){return t.isValidElement(e)?t.cloneElement(e,n):hc(e)?e(n):t.createElement("line",ZP({},n,{className:"recharts-reference-line-line"}))}(c,b),M_.renderCallByParent(e,function(e){var t=e.x1,n=e.y1,r=e.x2,a=e.y2;return UP({x:t,y:n},{x:r,y:a})}({x1:h,y1:m,x2:y,y2:g})))}function JP(){return JP=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},JP.apply(this,arguments)}function QP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QP(Object(n),!0).forEach((function(t){tC(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}KP.displayName="ReferenceLine",KP.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"};function nC(e){var n=e.x,r=e.y,a=e.r,i=e.alwaysShow,o=e.clipPathId,c=um(n),s=um(r);if(Pb(void 0===i,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!s)return null;var u=function(e){var t=e.x,n=e.y,r=e.xAxis,a=e.yAxis,i=WP({x:r.scale,y:a.scale}),o=i.apply({x:t,y:n},{bandAware:!0});return SP(e,"discard")&&!i.isInRange(o)?null:o}(e);if(!u)return null;var l=u.x,f=u.y,d=e.shape,p=e.className,h=eC(eC({clipPath:SP(e,"hidden")?"url(#".concat(o,")"):void 0},Bo(e,!0)),{},{cx:l,cy:f});return t.createElement(Xo,{className:Io("recharts-reference-dot",p)},nC.renderDot(d,h),M_.renderCallByParent(e,{x:l-a,y:f-a,width:2*a,height:2*a}))}function rC(){return rC=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},rC.apply(this,arguments)}function aC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aC(Object(n),!0).forEach((function(t){oC(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}nC.displayName="ReferenceDot",nC.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1},nC.renderDot=function(e,n){return t.isValidElement(e)?t.cloneElement(e,n):hc(e)?e(n):t.createElement(Tj,JP({},n,{cx:n.cx,cy:n.cy,className:"recharts-reference-dot-dot"}))};function cC(e){var n=e.x1,r=e.x2,a=e.y1,i=e.y2,o=e.className,c=e.alwaysShow,s=e.clipPathId;Pb(void 0===c,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var u=um(n),l=um(r),f=um(a),d=um(i),p=e.shape;if(!(u||l||f||d||p))return null;var h=function(e,t,n,r,a){var i=a.x1,o=a.x2,c=a.y1,s=a.y2,u=a.xAxis,l=a.yAxis;if(!u||!l)return null;var f=WP({x:u.scale,y:l.scale}),d={x:e?f.x.apply(i,{position:"start"}):f.x.rangeMin,y:n?f.y.apply(c,{position:"start"}):f.y.rangeMin},p={x:t?f.x.apply(o,{position:"end"}):f.x.rangeMax,y:r?f.y.apply(s,{position:"end"}):f.y.rangeMax};return!SP(a,"discard")||f.isInRange(d)&&f.isInRange(p)?UP(d,p):null}(u,l,f,d,e);if(!h&&!p)return null;var m=SP(e,"hidden")?"url(#".concat(s,")"):void 0;return t.createElement(Xo,{className:Io("recharts-reference-area",o)},cC.renderRect(p,iC(iC({clipPath:m},Bo(e,!0)),h)),M_.renderCallByParent(e,h))}function sC(e){return sC="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},sC(e)}function uC(){return uC=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},uC.apply(this,arguments)}function lC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lC(Object(n),!0).forEach((function(t){dC(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pC(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function hC(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 mC(e,t){return mC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},mC(e,t)}function vC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gC(e);if(t){var a=gC(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return yC(this,n)}}function yC(e,t){return!t||"object"!==sC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gC(e){return gC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},gC(e)}cC.displayName="ReferenceArea",cC.defaultProps={isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1},cC.renderRect=function(e,n){return t.isValidElement(e)?t.cloneElement(e,n):hc(e)?e(n):t.createElement(Oj,rC({},n,{className:"recharts-reference-area-rect"}))};var bC=function(e){!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&&mC(e,t)}(o,p);var n,r,a,i=vC(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).layerReference=void 0,t.state={fontSize:"",letterSpacing:""},t}return n=o,r=[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=pC(e,["viewBox"]),a=this.props,i=a.viewBox,o=pC(a,["viewBox"]);return!yw(n,i)||!yw(r,o)||!yw(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,n,r,a,i,o,c=this.props,s=c.x,u=c.y,l=c.width,f=c.height,d=c.orientation,p=c.tickSize,h=c.mirror,m=c.tickMargin,v=h?-1:1,y=e.tickSize||p,g=sm(e.tickCoord)?e.tickCoord:e.coordinate;switch(d){case"top":t=n=e.coordinate,o=(r=(a=u+ +!h*f)-v*y)-v*m,i=g;break;case"left":r=a=e.coordinate,i=(t=(n=s+ +!h*l)-v*y)-v*m,o=g;break;case"right":r=a=e.coordinate,i=(t=(n=s+ +h*l)+v*y)+v*m,o=g;break;default:t=n=e.coordinate,o=(r=(a=u+ +h*f)+v*y)+v*m,i=g}return{line:{x1:t,y1:r,x2:n,y2:a},tick:{x:i,y:o}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,n=t.orientation,r=t.mirror;switch(n){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,t=e.orientation,n=e.mirror,r="end";switch(t){case"left":case"right":r="middle";break;case"top":r=n?"start":"end";break;default:r=n?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var e=this.props,n=e.x,r=e.y,a=e.width,i=e.height,o=e.orientation,c=e.mirror,s=e.axisLine,u=fC(fC(fC({},Bo(this.props)),Bo(s)),{},{fill:"none"});if("top"===o||"bottom"===o){var l=+("top"===o&&!c||"bottom"===o&&c);u=fC(fC({},u),{},{x1:n,y1:r+l*i,x2:n+a,y2:r+l*i})}else{var f=+("left"===o&&!c||"right"===o&&c);u=fC(fC({},u),{},{x1:n+f*a,y1:r,x2:n+f*a,y2:r+i})}return t.createElement("line",uC({},u,{className:Io("recharts-cartesian-axis-line",Jf(s,"className"))}))}},{key:"renderTicks",value:function(e,n,r){var a=this,i=this.props,c=i.tickLine,s=i.stroke,u=i.tick,l=i.tickFormatter,f=i.unit,d=o.getTicks(fC(fC({},this.props),{},{ticks:e}),n,r),p=this.getTickTextAnchor(),h=this.getTickVerticalAnchor(),m=Bo(this.props),v=Bo(u),y=fC(fC({},m),{},{fill:"none"},Bo(c)),g=d.map((function(e,n){var r=a.getTickLineCoord(e),i=r.line,g=r.tick,b=fC(fC(fC(fC({textAnchor:p,verticalAnchor:h},m),{},{stroke:"none",fill:s},v),g),{},{index:n,payload:e,visibleTicksCount:d.length,tickFormatter:l});return t.createElement(Xo,uC({className:"recharts-cartesian-axis-tick",key:"tick-".concat(n)},Vo(a.props,e,n)),c&&t.createElement("line",uC({},y,i,{className:Io("recharts-cartesian-axis-tick-line",Jf(c,"className"))})),u&&o.renderTickItem(u,b,"".concat(hc(l)?l(e.value,n):e.value).concat(f||"")))}));return t.createElement("g",{className:"recharts-cartesian-axis-ticks"},g)}},{key:"render",value:function(){var e=this,n=this.props,r=n.axisLine,a=n.width,i=n.height,o=n.ticksGenerator,c=n.className;if(n.hide)return null;var s=this.props,u=s.ticks,l=pC(s,["ticks"]),f=u;return hc(o)&&(f=u&&u.length>0?o(this.props):o(l)),a<=0||i<=0||!f||!f.length?null:t.createElement(Xo,{className:Io("recharts-cartesian-axis",c),ref:function(t){e.layerReference=t}},r&&this.renderAxisLine(),this.renderTicks(f,this.state.fontSize,this.state.letterSpacing),M_.renderCallByParent(this.props))}}],a=[{key:"getTicks",value:function(e,t,n){var r=e.tick,a=e.ticks,i=e.viewBox,c=e.minTickGap,s=e.orientation,u=e.interval,l=e.tickFormatter,f=e.unit;return a&&a.length&&r?sm(u)||rg.isSsr?o.getNumberIntervalTicks(a,"number"==typeof u&&sm(u)?u:0):"preserveStartEnd"===u?o.getTicksStart({ticks:a,tickFormatter:l,viewBox:i,orientation:s,minTickGap:c,unit:f,fontSize:t,letterSpacing:n},!0):"preserveStart"===u?o.getTicksStart({ticks:a,tickFormatter:l,viewBox:i,orientation:s,minTickGap:c,unit:f,fontSize:t,letterSpacing:n}):o.getTicksEnd({ticks:a,tickFormatter:l,viewBox:i,orientation:s,minTickGap:c,unit:f,fontSize:t,letterSpacing:n}):[]}},{key:"getNumberIntervalTicks",value:function(e,t){return e.filter((function(e,n){return n%(t+1)==0}))}},{key:"getTicksStart",value:function(e,t){var n,r,a=e.ticks,i=e.tickFormatter,o=e.viewBox,c=e.orientation,s=e.minTickGap,u=e.unit,l=e.fontSize,f=e.letterSpacing,d=o.x,p=o.y,h=o.width,m=o.height,v="top"===c||"bottom"===c?"width":"height",y=(a||[]).slice(),g=u&&"width"===v?Mx(u,{fontSize:l,letterSpacing:f})[v]:0,b=y.length,x=b>=2?om(y[1].coordinate-y[0].coordinate):1;if(1===x?(n="width"===v?d:p,r="width"===v?d+h:p+m):(n="width"===v?d+h:p+m,r="width"===v?d:p),t){var w=a[b-1],k=hc(i)?i(w.value,b-1):w.value,S=Mx(k,{fontSize:l,letterSpacing:f})[v]+g,O=x*(w.coordinate+x*S/2-r);y[b-1]=w=fC(fC({},w),{},{tickCoord:O>0?w.coordinate-O*x:w.coordinate}),x*(w.tickCoord-x*S/2-n)>=0&&x*(w.tickCoord+x*S/2-r)<=0&&(r=w.tickCoord-x*(S/2+s),y[b-1]=fC(fC({},w),{},{isShow:!0}))}for(var E=t?b-1:b,A=0;A<E;A++){var M=y[A],_=hc(i)?i(M.value,A):M.value,j=Mx(_,{fontSize:l,letterSpacing:f})[v]+g;if(0===A){var P=x*(M.coordinate-x*j/2-n);y[A]=M=fC(fC({},M),{},{tickCoord:P<0?M.coordinate-P*x:M.coordinate})}else y[A]=M=fC(fC({},M),{},{tickCoord:M.coordinate});x*(M.tickCoord-x*j/2-n)>=0&&x*(M.tickCoord+x*j/2-r)<=0&&(n=M.tickCoord+x*(j/2+s),y[A]=fC(fC({},M),{},{isShow:!0}))}return y.filter((function(e){return e.isShow}))}},{key:"getTicksEnd",value:function(e){var t,n,r=e.ticks,a=e.tickFormatter,i=e.viewBox,o=e.orientation,c=e.minTickGap,s=e.unit,u=e.fontSize,l=e.letterSpacing,f=i.x,d=i.y,p=i.width,h=i.height,m="top"===o||"bottom"===o?"width":"height",v=s&&"width"===m?Mx(s,{fontSize:u,letterSpacing:l})[m]:0,y=(r||[]).slice(),g=y.length,b=g>=2?om(y[1].coordinate-y[0].coordinate):1;1===b?(t="width"===m?f:d,n="width"===m?f+p:d+h):(t="width"===m?f+p:d+h,n="width"===m?f:d);for(var x=g-1;x>=0;x--){var w=y[x],k=hc(a)?a(w.value,g-x-1):w.value,S=Mx(k,{fontSize:u,letterSpacing:l})[m]+v;if(x===g-1){var O=b*(w.coordinate+b*S/2-n);y[x]=w=fC(fC({},w),{},{tickCoord:O>0?w.coordinate-O*b:w.coordinate})}else y[x]=w=fC(fC({},w),{},{tickCoord:w.coordinate});b*(w.tickCoord-b*S/2-t)>=0&&b*(w.tickCoord+b*S/2-n)<=0&&(n=w.tickCoord-b*(S/2+c),y[x]=fC(fC({},w),{},{isShow:!0}))}return y.filter((function(e){return e.isShow}))}},{key:"renderTickItem",value:function(e,n,r){return t.isValidElement(e)?t.cloneElement(e,n):hc(e)?e(n):t.createElement(Yx,uC({},n,{className:"recharts-cartesian-axis-tick-value"}),r)}}],r&&hC(n.prototype,r),a&&hC(n,a),o}();function xC(e){return xC="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},xC(e)}function wC(){return wC=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},wC.apply(this,arguments)}function kC(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function SC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function OC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SC(Object(n),!0).forEach((function(t){EC(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function EC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MC(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 _C(e,t){return _C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_C(e,t)}function jC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CC(e);if(t){var a=CC(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return PC(this,n)}}function PC(e,t){return!t||"object"!==xC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function CC(e){return CC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},CC(e)}bC.displayName="CartesianAxis",bC.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 DC=function(e){!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&&_C(e,t)}(o,c);var n,r,a,i=jC(o);function o(){return AC(this,o),i.apply(this,arguments)}return n=o,r=[{key:"renderHorizontal",value:function(e){var n=this,r=this.props,a=r.x,i=r.width,c=r.horizontal;if(!e||!e.length)return null;var s=e.map((function(e,t){var r=OC(OC({},n.props),{},{x1:a,y1:e,x2:a+i,y2:e,key:"line-".concat(t),index:t});return o.renderLineItem(c,r)}));return t.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}},{key:"renderVertical",value:function(e){var n=this,r=this.props,a=r.y,i=r.height,c=r.vertical;if(!e||!e.length)return null;var s=e.map((function(e,t){var r=OC(OC({},n.props),{},{x1:e,y1:a,x2:e,y2:a+i,key:"line-".concat(t),index:t});return o.renderLineItem(c,r)}));return t.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}},{key:"renderVerticalStripes",value:function(e){var n=this.props.verticalFill;if(!n||!n.length)return null;var r=this.props,a=r.fillOpacity,i=r.x,o=r.y,c=r.width,s=r.height,u=e.slice().sort((function(e,t){return e-t}));i!==u[0]&&u.unshift(0);var l=u.map((function(e,r){var l=u[r+1]?u[r+1]-e:i+c-e;if(l<=0)return null;var f=r%n.length;return t.createElement("rect",{key:"react-".concat(r),x:Math.round(e+i-i),y:o,width:l,height:s,stroke:"none",fill:n[f],fillOpacity:a,className:"recharts-cartesian-grid-bg"})}));return t.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},l)}},{key:"renderHorizontalStripes",value:function(e){var n=this.props.horizontalFill;if(!n||!n.length)return null;var r=this.props,a=r.fillOpacity,i=r.x,o=r.y,c=r.width,s=r.height,u=e.slice().sort((function(e,t){return e-t}));o!==u[0]&&u.unshift(0);var l=u.map((function(e,r){var l=u[r+1]?u[r+1]-e:o+s-e;if(l<=0)return null;var f=r%n.length;return t.createElement("rect",{key:"react-".concat(r),y:Math.round(e+o-o),x:i,height:l,width:c,stroke:"none",fill:n[f],fillOpacity:a,className:"recharts-cartesian-grid-bg"})}));return t.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},l)}},{key:"renderBackground",value:function(){var e=this.props.fill;if(!e||"none"===e)return null;var n=this.props,r=n.fillOpacity,a=n.x,i=n.y,o=n.width,c=n.height;return t.createElement("rect",{x:a,y:i,width:o,height:c,stroke:"none",fill:e,fillOpacity:r,className:"recharts-cartesian-grid-bg"})}},{key:"render",value:function(){var e=this.props,n=e.x,r=e.y,a=e.width,i=e.height,o=e.horizontal,c=e.vertical,s=e.horizontalCoordinatesGenerator,u=e.verticalCoordinatesGenerator,l=e.xAxis,f=e.yAxis,d=e.offset,p=e.chartWidth,h=e.chartHeight;if(!sm(a)||a<=0||!sm(i)||i<=0||!sm(n)||n!==+n||!sm(r)||r!==+r)return null;var m=this.props,v=m.horizontalPoints,y=m.verticalPoints;return v&&v.length||!hc(s)||(v=s({yAxis:f,width:p,height:h,offset:d})),y&&y.length||!hc(u)||(y=u({xAxis:l,width:p,height:h,offset:d})),t.createElement("g",{className:"recharts-cartesian-grid"},this.renderBackground(),o&&this.renderHorizontal(v),c&&this.renderVertical(y),o&&this.renderHorizontalStripes(v),c&&this.renderVerticalStripes(y))}}],a=[{key:"renderLineItem",value:function(e,n){var r;if(t.isValidElement(e))r=t.cloneElement(e,n);else if(hc(e))r=e(n);else{var a=n.x1,i=n.y1,o=n.x2,c=n.y2,s=n.key,u=kC(n,["x1","y1","x2","y2","key"]);r=t.createElement("line",wC({},Bo(u),{x1:a,y1:i,x2:o,y2:c,fill:"none",key:s}))}return r}}],r&&MC(n.prototype,r),a&&MC(n,a),o}();function TC(){return TC=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},TC.apply(this,arguments)}function NC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return IC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IC(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function RC(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function FC(e){var n=e.offset,r=e.layout,a=e.width,i=e.dataKey,o=e.data,c=e.dataPointFormatter,s=e.xAxis,u=e.yAxis,l=RC(e,["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"]),f=Bo(l),d=o.map((function(e,o){var l=c(e,i),d=l.x,p=l.y,h=l.value,m=l.errorVal;if(!m)return null;var v,y,g=[];if(Array.isArray(m)){var b=NC(m,2);v=b[0],y=b[1]}else v=y=m;if("vertical"===r){var x=s.scale,w=p+n,k=w+a,S=w-a,O=x(h-v),E=x(h+y);g.push({x1:E,y1:k,x2:E,y2:S}),g.push({x1:O,y1:w,x2:E,y2:w}),g.push({x1:O,y1:k,x2:O,y2:S})}else if("horizontal"===r){var A=u.scale,M=d+n,_=M-a,j=M+a,P=A(h-v),C=A(h+y);g.push({x1:_,y1:C,x2:j,y2:C}),g.push({x1:M,y1:P,x2:M,y2:C}),g.push({x1:_,y1:P,x2:j,y2:P})}return t.createElement(Xo,TC({className:"recharts-errorBar",key:"bar-".concat(o)},f),g.map((function(e,n){return t.createElement("line",TC({},e,{key:"line-".concat(n)}))})))}));return t.createElement(Xo,{className:"recharts-errorBars"},d)}function zC(e){return zC="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},zC(e)}function LC(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function HC(){return HC=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},HC.apply(this,arguments)}function BC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BC(Object(n),!0).forEach((function(t){VC(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function VC(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WC(e){return function(e){if(Array.isArray(e))return $C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return $C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $C(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function YC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qC(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 GC(e,t){return GC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},GC(e,t)}function XC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=KC(e);if(t){var a=KC(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ZC(this,n)}}function ZC(e,t){return!t||"object"!==zC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function KC(e){return KC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},KC(e)}DC.displayName="CartesianGrid",DC.defaultProps={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]},FC.defaultProps={stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"},FC.displayName="ErrorBar";var JC=function(e){!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&&GC(e,t)}(o,c);var n,r,a,i=XC(o);function o(){var e;YC(this,o);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=i.call.apply(i,[this].concat(n))).mainCurve=void 0,e.state={isAnimationFinished:!0,totalLength:0},e.getStrokeDasharray=function(e,t,n){for(var r=n.reduce((function(e,t){return e+t})),a=Math.floor(e/r),i=e%r,c=t-e,s=[],u=0,l=0;;l+=n[u],++u)if(l+n[u]>i){s=[].concat(WC(n.slice(0,u)),[i-l]);break}var f=s.length%2==0?[0,c]:[c];return[].concat(WC(o.repeat(n,a)),WC(s),f).map((function(e){return"".concat(e,"px")})).join(", ")},e.id=fm("recharts-line-"),e.pathRef=function(t){e.mainCurve=t},e.handleAnimationEnd=function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()},e.handleAnimationStart=function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()},e}return n=o,r=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}},{key:"renderErrorBar",value:function(){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var e=this.props,n=e.points,r=e.xAxis,a=e.yAxis,i=e.layout,o=e.children,c=Ow(o,FC.displayName);if(!c)return null;function s(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:WM(e.payload,t)}}return c.map((function(e,o){return t.cloneElement(e,{key:"bar-".concat(o),data:n,xAxis:r,yAxis:a,layout:i,dataPointFormatter:s})}))}},{key:"renderDots",value:function(e,n){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,a=r.dot,i=r.points,c=r.dataKey,s=Bo(this.props),u=Bo(a,!0),l=i.map((function(e,t){var n=UC(UC(UC({key:"dot-".concat(t),r:3},s),u),{},{value:e.value,dataKey:c,cx:e.x,cy:e.y,index:t,payload:e.payload});return o.renderDotItem(a,n)})),f={clipPath:e?"url(#clipPath-".concat(n,")"):null};return t.createElement(Xo,HC({className:"recharts-line-dots",key:"dots"},f),l)}},{key:"renderCurveStatically",value:function(e,n,r,a){var i=this.props,o=i.type,c=i.layout,s=i.connectNulls;i.ref;var u=LC(i,["type","layout","connectNulls","ref"]),l=UC(UC(UC({},Bo(u,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:n?"url(#clipPath-".concat(r,")"):null,points:e},a),{},{type:o,layout:c,connectNulls:s});return t.createElement(pj,HC({},l,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,n){var r=this,a=this.props,i=a.points,o=a.strokeDasharray,c=a.isAnimationActive,s=a.animationBegin,u=a.animationDuration,l=a.animationEasing,f=a.animationId,d=a.animateNewValues,p=a.width,h=a.height,m=this.state,v=m.prevPoints,y=m.totalLength;return t.createElement(Vv,{begin:s,duration:u,isActive:c,easing:l,from:{t:0},to:{t:1},key:"line-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(t){var a=t.t;if(v){var c=v.length/i.length,s=i.map((function(e,t){var n=Math.floor(t*c);if(v[n]){var r=v[n],i=hm(r.x,e.x),o=hm(r.y,e.y);return UC(UC({},e),{},{x:i(a),y:o(a)})}if(d){var s=hm(2*p,e.x),u=hm(h/2,e.y);return UC(UC({},e),{},{x:s(a),y:u(a)})}return UC(UC({},e),{},{x:e.x,y:e.y})}));return r.renderCurveStatically(s,e,n)}var u,l=hm(0,y)(a);if(o){var f="".concat(o).split(/[,\s]+/gim).map((function(e){return parseFloat(e)}));u=r.getStrokeDasharray(l,y,f)}else u="".concat(l,"px ").concat(y-l,"px");return r.renderCurveStatically(i,e,n,{strokeDasharray:u})}))}},{key:"renderCurve",value:function(e,t){var n=this.props,r=n.points,a=n.isAnimationActive,i=this.state,o=i.prevPoints,c=i.totalLength;return a&&r&&r.length&&(!o&&c>0||!Dw(o,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:"render",value:function(){var e=this.props,n=e.hide,r=e.dot,a=e.points,i=e.className,o=e.xAxis,c=e.yAxis,s=e.top,u=e.left,l=e.width,f=e.height,d=e.isAnimationActive,p=e.id;if(n||!a||!a.length)return null;var h=this.state.isAnimationFinished,m=1===a.length,v=Io("recharts-line",i),y=o&&o.allowDataOverflow||c&&c.allowDataOverflow,g=Pm(p)?this.id:p;return t.createElement(Xo,{className:v},y?t.createElement("defs",null,t.createElement("clipPath",{id:"clipPath-".concat(g)},t.createElement("rect",{x:u,y:s,width:l,height:f}))):null,!m&&this.renderCurve(y,g),this.renderErrorBar(),(m||r)&&this.renderDots(y,g),(!d||h)&&L_.renderCallByParent(this.props,a))}}],a=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var n=e.length%2!=0?[].concat(WC(e),[0]):e,r=[],a=0;a<t;++a)r=[].concat(WC(r),WC(n));return r}},{key:"renderDotItem",value:function(e,n){var r;if(t.isValidElement(e))r=t.cloneElement(e,n);else if(hc(e))r=e(n);else{var a=Io("recharts-line-dot",e?e.className:"");r=t.createElement(Tj,HC({},n,{className:a}))}return r}}],r&&qC(n.prototype,r),a&&qC(n,a),o}();JC.displayName="Line",JC.defaultProps={xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!rg.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1},JC.getComposedData=function(e){var t=e.props,n=e.xAxis,r=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,c=e.bandSize,s=e.displayedData,u=e.offset,l=t.layout;return UC({points:s.map((function(e,t){var s=WM(e,o);return"horizontal"===l?{x:r_({axis:n,ticks:a,bandSize:c,entry:e,index:t}),y:Pm(s)?null:r.scale(s),value:s,payload:e}:{x:Pm(s)?null:n.scale(s),y:r_({axis:r,ticks:i,bandSize:c,entry:e,index:t}),value:s,payload:e}})),layout:l},u)};var QC=function(){return null};QC.displayName="XAxis",QC.defaultProps={allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",domain:[0,"auto"],padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0};var eD=function(){return null};eD.displayName="YAxis",eD.defaultProps={allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",domain:[0,"auto"],padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1};var tD=Dd,nD=ml,rD=bl;var aD=function(e){return function(t,n,r){var a=Object(t);if(!nD(t)){var i=tD(n);t=rD(t),n=function(e){return i(a[e],e,a)}}var o=e(t,n,r);return o>-1?a[i?t[o]:o]:void 0}},iD=qj;var oD=Td,cD=Dd,sD=function(e){var t=iD(e),n=t%1;return t==t?n?t-n:t:0},uD=Math.max;var lD=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=null==n?0:sD(n);return a<0&&(a=uD(r+a,0)),oD(e,cD(t),a)},fD=aD(lD),dD=Rg,pD=Ro;var hD=function(e,t,n){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return pD(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),dD(e,t,{leading:r,maxWait:t,trailing:a})},mD=fc,vD=Au;var yD=function(e){return!0===e||!1===e||vD(e)&&"[object Boolean]"==mD(e)},gD=function(e,t,n,r,a){var i=Ow(e,KP.displayName),o=Ow(e,nC.displayName),c=i.concat(o),s=Ow(e,cC.displayName),u="".concat(r,"Id"),l=r[0],f=t;if(c.length&&(f=c.reduce((function(e,t){if(t.props[u]===n&&SP(t.props,"extendDomain")&&sm(t.props[l])){var r=t.props[l];return[Math.min(e[0],r),Math.max(e[1],r)]}return e}),f)),s.length){var d="".concat(l,"1"),p="".concat(l,"2");f=s.reduce((function(e,t){if(t.props[u]===n&&SP(t.props,"extendDomain")&&sm(t.props[d])&&sm(t.props[p])){var r=t.props[d],a=t.props[p];return[Math.min(e[0],r,a),Math.max(e[1],r,a)]}return e}),f)}return a&&a.length&&(f=a.reduce((function(e,t){return sm(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e}),f)),f},bD={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var c=new a(r,i||e,o),s=n?n+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],c]:e._events[s].push(c):(e._events[s]=c,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function c(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),c.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},c.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,i=r.length,o=new Array(i);a<i;a++)o[a]=r[a].fn;return o},c.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},c.prototype.emit=function(e,t,r,a,i,o){var c=n?n+e:e;if(!this._events[c])return!1;var s,u,l=this._events[c],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,a),!0;case 5:return l.fn.call(l.context,t,r,a,i),!0;case 6:return l.fn.call(l.context,t,r,a,i,o),!0}for(u=1,s=new Array(f-1);u<f;u++)s[u-1]=arguments[u];l.fn.apply(l.context,s)}else{var d,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),f){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,a);break;default:if(!s)for(d=1,s=new Array(f-1);d<f;d++)s[d-1]=arguments[d];l[u].fn.apply(l[u].context,s)}}return!0},c.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,r,a){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return o(this,i),this;var c=this._events[i];if(c.fn)c.fn!==t||a&&!c.once||r&&c.context!==r||o(this,i);else{for(var s=0,u=[],l=c.length;s<l;s++)(c[s].fn!==t||a&&!c[s].once||r&&c[s].context!==r)&&u.push(c[s]);u.length?this._events[i]=1===u.length?u[0]:u:o(this,i)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c}(bD);var xD=new(0,bD.exports);xD.setMaxListeners&&xD.setMaxListeners(10);var wD="recharts.syncMouseEvents";function kD(e){return kD="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},kD(e)}function SD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw i}}return n}(e,t)||TD(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function OD(){return OD=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},OD.apply(this,arguments)}function ED(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function AD(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 MD(e,t){return MD=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},MD(e,t)}function _D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CD(e);if(t){var a=CD(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return jD(this,n)}}function jD(e,t){return!t||"object"!==kD(t)&&"function"!=typeof t?PD(e):t}function PD(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CD(e){return CD=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},CD(e)}function DD(e){return function(e){if(Array.isArray(e))return ND(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||TD(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function TD(e,t){if(e){if("string"==typeof e)return ND(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ND(e,t):void 0}}function ND(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ID(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function RD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ID(Object(n),!0).forEach((function(t){FD(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ID(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function FD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zD={xAxis:["bottom","top"],yAxis:["left","right"]},LD={x:0,y:0},HD=Number.isFinite?Number.isFinite:isFinite,BD="function"==typeof requestAnimationFrame?requestAnimationFrame:"function"==typeof setImmediate?setImmediate:setTimeout,UD="function"==typeof cancelAnimationFrame?cancelAnimationFrame:"function"==typeof clearImmediate?clearImmediate:clearTimeout,VD=function(e,t,n){var r=t.graphicalItems,a=t.dataStartIndex,i=t.dataEndIndex,o=(r||[]).reduce((function(e,t){var n=t.props.data;return n&&n.length?[].concat(DD(e),DD(n)):e}),[]);return o&&o.length>0?o:n&&n.props&&n.props.data&&n.props.data.length>0?n.props.data:e&&e.length&&sm(a)&&sm(i)?e.slice(a,i+1):[]},WD=function(e,t,n,r){var a=e.graphicalItems,i=e.tooltipAxis,o=VD(t,e);return n<0||!a||!a.length||n>=o.length?null:a.reduce((function(e,t){if(t.props.hide)return e;var a,c=t.props.data;i.dataKey&&!i.allowDuplicatedCategory?a=mm(void 0===c?o:c,i.dataKey,r):a=c&&c[n]||o[n];return a?[].concat(DD(e),[l_(t,a)]):e}),[])},$D=function(e,t,n,r){var a=r||{x:e.chartX,y:e.chartY},i=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(a,n),o=e.orderedTooltipTicks,c=e.tooltipAxis,s=e.tooltipTicks,u=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,i=-1,o=null!==(t=null==n?void 0:n.length)&&void 0!==t?t:0;if(o>1){if(a&&"angleAxis"===a.axisType&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,s=0;s<o;s++){var u=s>0?r[s-1].coordinate:r[o-1].coordinate,l=r[s].coordinate,f=s>=o-1?r[0].coordinate:r[s+1].coordinate,d=void 0;if(om(l-u)!==om(f-l)){var p=[];if(om(f-l)===om(c[1]-c[0])){d=f;var h=l+c[1]-c[0];p[0]=Math.min(h,(h+u)/2),p[1]=Math.max(h,(h+u)/2)}else{d=u;var m=f+c[1]-c[0];p[0]=Math.min(l,(m+l)/2),p[1]=Math.max(l,(m+l)/2)}var v=[Math.min(l,(d+l)/2),Math.max(l,(d+l)/2)];if(e>v[0]&&e<=v[1]||e>=p[0]&&e<=p[1]){i=r[s].index;break}}else{var y=Math.min(u,f),g=Math.max(u,f);if(e>(y+l)/2&&e<=(g+l)/2){i=r[s].index;break}}}else for(var b=0;b<o;b++)if(0===b&&e<=(n[b].coordinate+n[b+1].coordinate)/2||b>0&&b<o-1&&e>(n[b].coordinate+n[b-1].coordinate)/2&&e<=(n[b].coordinate+n[b+1].coordinate)/2||b===o-1&&e>(n[b].coordinate+n[b-1].coordinate)/2){i=n[b].index;break}}else i=0;return i}(i,o,s,c);if(u>=0&&s){var l=s[u]&&s[u].value,f=WD(e,t,u,l),d=function(e,t,n,r){var a=t.find((function(e){return e&&e.index===n}));if(a){if("horizontal"===e)return{x:a.coordinate,y:r.y};if("vertical"===e)return{x:r.x,y:a.coordinate};if("centric"===e){var i=a.coordinate,o=r.radius;return RD(RD(RD({},r),v_(r.cx,r.cy,o,i)),{},{angle:i,radius:o})}var c=a.coordinate,s=r.angle;return RD(RD(RD({},r),v_(r.cx,r.cy,c,s)),{},{angle:s,radius:c})}return LD}(n,o,u,a);return{activeTooltipIndex:u,activeLabel:l,activePayload:f,activeCoordinate:d}}return null},YD=function(e,t){var n=t.axes,r=t.graphicalItems,a=t.axisType,i=t.axisIdKey,o=t.stackGroups,c=t.dataStartIndex,s=t.dataEndIndex,u=e.layout,l=e.children,f=e.stackOffset,d=ZM(u,a),p=n.reduce((function(t,n){var p=n.props,h=p.type,m=p.dataKey,v=p.allowDataOverflow,y=p.allowDuplicatedCategory,g=p.scale,b=p.ticks,x=n.props[i],w=VD(e.data,{graphicalItems:r.filter((function(e){return e.props[i]===x})),dataStartIndex:c,dataEndIndex:s}),k=w.length;if(!t[x]){var S,O,E;if(m){if(S=$M(w,m,h),"category"===h&&d){var A=function(e){if(!hu(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1}(S);y&&A?(O=S,S=Jj(0,k)):y||(S=u_(n.props.domain,S,n).reduce((function(e,t){return e.indexOf(t)>=0?e:[].concat(DD(e),[t])}),[]))}else if("category"===h)S=y?S.filter((function(e){return""!==e&&!Pm(e)})):u_(n.props.domain,S,n).reduce((function(e,t){return e.indexOf(t)>=0||""===t||Pm(t)?e:[].concat(DD(e),[t])}),[]);else if("number"===h){var M=function(e,t,n,r,a){var i=t.map((function(t){return GM(e,t,n,a,r)})).filter((function(e){return!Pm(e)}));return i&&i.length?i.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]):null}(w,r.filter((function(e){return e.props[i]===x&&!e.props.hide})),m,a,u);M&&(S=M)}!d||"number"!==h&&"auto"===g||(E=$M(w,m,"category"))}else S=d?Jj(0,k):o&&o[x]&&o[x].hasStack&&"number"===h?"expand"===f?[0,1]:a_(o[x].stackGroups,c,s):XM(w,r.filter((function(e){return e.props[i]===x&&!e.props.hide})),h,u,!0);if("number"===h)S=gD(l,S,x,a,b),n.props.domain&&(S=c_(n.props.domain,S,v));else if("category"===h&&n.props.domain){var _=n.props.domain;S.every((function(e){return _.indexOf(e)>=0}))&&(S=_)}return RD(RD({},t),{},FD({},x,RD(RD({},n.props),{},{axisType:a,domain:S,categoricalDomain:E,duplicateDomain:O,originalDomain:n.props.domain,isCategorical:d,layout:u})))}return t}),{});return p},qD=function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,a=t.AxisComp,i=t.graphicalItems,o=t.stackGroups,c=t.dataStartIndex,s=t.dataEndIndex,u=e.children,l="".concat(r,"Id"),f=Ow(u,a),d={};return f&&f.length?d=YD(e,{axes:f,graphicalItems:i,axisType:r,axisIdKey:l,stackGroups:o,dataStartIndex:c,dataEndIndex:s}):i&&i.length&&(d=function(e,t){var n=t.graphicalItems,r=t.Axis,a=t.axisType,i=t.axisIdKey,o=t.stackGroups,c=t.dataStartIndex,s=t.dataEndIndex,u=e.layout,l=e.children,f=VD(e.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:s}),d=f.length,p=ZM(u,a),h=-1;return n.reduce((function(e,t){var m,v=t.props[i];return e[v]?e:(h++,p?m=Jj(0,d):o&&o[v]&&o[v].hasStack?(m=a_(o[v].stackGroups,c,s),m=gD(l,m,v,a)):(m=c_(r.defaultProps.domain,XM(f,n.filter((function(e){return e.props[i]===v&&!e.props.hide})),"number",u),r.defaultProps.allowDataOverflow),m=gD(l,m,v,a)),RD(RD({},e),{},FD({},v,RD(RD({axisType:a},r.defaultProps),{},{hide:!0,orientation:Jf(zD,"".concat(a,".").concat(h%2),null),domain:m,originalDomain:r.defaultProps.domain,isCategorical:p,layout:u}))))}),{})}(e,{Axis:a,graphicalItems:i,axisType:r,axisIdKey:l,stackGroups:o,dataStartIndex:c,dataEndIndex:s})),d},GD=function(e){var t=e.children,n=e.defaultShowTooltip,r=Ew(t,mP.displayName);return{chartX:0,chartY:0,dataStartIndex:r&&r.props&&r.props.startIndex||0,dataEndIndex:r&&r.props&&r.props.endIndex||e.data&&e.data.length-1||0,activeTooltipIndex:-1,isTooltipActive:!Pm(n)&&n}},XD=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"}},ZD=function(e,t){var n=e.props,r=(e.graphicalItems,e.xAxisMap),a=void 0===r?{}:r,i=e.yAxisMap,o=void 0===i?{}:i,c=n.width,s=n.height,u=n.children,l=n.margin||{},f=Ew(u,mP.displayName),d=Ew(u,jm.displayName),p=Object.keys(o).reduce((function(e,t){var n=o[t],r=n.orientation;return n.mirror||n.hide?e:RD(RD({},e),{},FD({},r,e[r]+n.width))}),{left:l.left||0,right:l.right||0}),h=Object.keys(a).reduce((function(e,t){var n=a[t],r=n.orientation;return n.mirror||n.hide?e:RD(RD({},e),{},FD({},r,Jf(e,"".concat(r))+n.height))}),{top:l.top||0,bottom:l.bottom||0}),m=RD(RD({},h),p),v=m.bottom;return f&&(m.bottom+=f.props.height||mP.defaultProps.height),d&&t&&(m=function(e,t,n,r){var a=n.children,i=n.width,o=n.margin,c=i-(o.left||0)-(o.right||0),s=qM({children:a,legendWidth:c}),u=e;if(s){var l=r||{},f=s.align,d=s.verticalAlign,p=s.layout;("vertical"===p||"horizontal"===p&&"center"===d)&&sm(e[f])&&(u=UM(UM({},e),{},VM({},f,u[f]+(l.width||0)))),("horizontal"===p||"vertical"===p&&"center"===f)&&sm(e[d])&&(u=UM(UM({},e),{},VM({},d,u[d]+(l.height||0))))}return u}(m,0,n,t)),RD(RD({brushBottom:v},m),{},{width:c-m.left-m.right,height:s-m.top-m.bottom})},KD=function(e){var n,r,a=e.chartName,i=e.GraphicalChild,c=e.defaultTooltipEventType,s=void 0===c?"axis":c,l=e.validateTooltipEventTypes,f=void 0===l?["axis"]:l,d=e.axisComponents,m=e.legendContent,v=e.formatAxisMap,y=e.defaultProps,g=function(e,t){var n=t.graphicalItems,r=t.stackGroups,a=t.offset,i=t.updateId,o=t.dataStartIndex,c=t.dataEndIndex,s=e.barSize,u=e.layout,l=e.barGap,f=e.barCategoryGap,p=e.maxBarSize,h=XD(u),m=h.numericAxisName,v=h.cateAxisName,y=function(e){return!(!e||!e.length)&&e.some((function(e){var t=xw(e&&e.type);return t&&t.indexOf("Bar")>=0}))}(n),g=y&&function(e){var t=e.barSize,n=e.stackGroups,r=void 0===n?{}:n;if(!r)return{};for(var a={},i=Object.keys(r),o=0,c=i.length;o<c;o++)for(var s=r[i[o]].stackGroups,u=Object.keys(s),l=0,f=u.length;l<f;l++){var d=s[u[l]],p=d.items,h=d.cateAxisId,m=p.filter((function(e){return xw(e.type).indexOf("Bar")>=0}));if(m&&m.length){var v=m[0].props.barSize,y=m[0].props[h];a[y]||(a[y]=[]),a[y].push({item:m[0],stackList:m.slice(1),barSize:Pm(v)?t:v})}}return a}({barSize:s,stackGroups:r}),b=[];return n.forEach((function(n,s){var h=VD(e.data,{dataStartIndex:o,dataEndIndex:c},n),y=n.props,x=y.dataKey,w=y.maxBarSize,k=n.props["".concat(m,"Id")],S=n.props["".concat(v,"Id")],O=d.reduce((function(e,r){var a,i=t["".concat(r.axisType,"Map")],o=n.props["".concat(r.axisType,"Id")],c=i&&i[o];return RD(RD({},e),{},(FD(a={},r.axisType,c),FD(a,"".concat(r.axisType,"Ticks"),JM(c)),a))}),{}),E=O[v],A=O["".concat(v,"Ticks")],M=r&&r[k]&&r[k].hasStack&&function(e,t){var n=e.props.stackId;if(um(n)){var r=t[n];if(r&&r.items.length){for(var a=-1,i=0,o=r.items.length;i<o;i++)if(r.items[i]===e){a=i;break}return a>=0?r.stackedData[a]:null}}return null}(n,r[k].stackGroups),_=xw(n.type).indexOf("Bar")>=0,j=s_(E,A),P=[];if(_){var C,D,T=Pm(w)?p:w,N=null!==(C=null!==(D=s_(E,A,!0))&&void 0!==D?D:T)&&void 0!==C?C:0;P=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,a=e.sizeList,i=void 0===a?[]:a,o=e.maxBarSize,c=i.length;if(c<1)return null;var s,u=dm(t,r,0,!0);if(i[0].barSize===+i[0].barSize){var l=!1,f=r/c,d=i.reduce((function(e,t){return e+t.barSize||0}),0);(d+=(c-1)*u)>=r&&(d-=(c-1)*u,u=0),d>=r&&f>0&&(l=!0,d=c*(f*=.9));var p={offset:((r-d)/2>>0)-u,size:0};s=i.reduce((function(e,t){var n=[].concat(LM(e),[{item:t.item,position:{offset:p.offset+p.size+u,size:l?f:t.barSize}}]);return p=n[n.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){n.push({item:e,position:p})})),n}),[])}else{var h=dm(n,r,0,!0);r-2*h-(c-1)*u<=0&&(u=0);var m=(r-2*h-(c-1)*u)/c;m>1&&(m>>=0);var v=o===+o?Math.min(m,o):m;s=i.reduce((function(e,t,n){var r=[].concat(LM(e),[{item:t.item,position:{offset:h+(m+u)*n+(m-v)/2,size:v}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){r.push({item:e,position:r[r.length-1].position})})),r}),[])}return s}({barGap:l,barCategoryGap:f,bandSize:N!==j?N:j,sizeList:g[S],maxBarSize:T}),N!==j&&(P=P.map((function(e){return RD(RD({},e),{},{position:RD(RD({},e.position),{},{offset:e.position.offset-N/2})})})))}var I,R,F,z=n&&n.type&&n.type.getComposedData;z&&b.push({props:RD(RD({},z(RD(RD({},O),{},{displayedData:h,props:e,dataKey:x,item:n,bandSize:j,barPosition:P,offset:a,stackedData:M,layout:u,dataStartIndex:o,dataEndIndex:c}))),{},(I={key:n.key||"item-".concat(s)},FD(I,m,O[m]),FD(I,v,O[v]),FD(I,"animationId",i),I)),childIndex:(R=n,F=e.children,Sw(F).indexOf(R)),item:n})})),b},b=function(e,t){var n=e.props,r=e.dataStartIndex,o=e.dataEndIndex,c=e.updateId;if(!Aw({props:n}))return null;var s=n.children,u=n.layout,l=n.stackOffset,f=n.data,p=n.reverseStackOrder,h=XD(u),m=h.numericAxisName,y=h.cateAxisName,b=Ow(s,i),x=function(e,t,n,r,a,i){if(!e)return null;var o=(i?t.reverse():t).reduce((function(e,t){var a=t.props,i=a.stackId;if(a.hide)return e;var o=t.props[n],c=e[o]||{hasStack:!1,stackGroups:{}};if(um(i)){var s=c.stackGroups[i]||{numericAxisId:n,cateAxisId:r,items:[]};s.items.push(t),c.hasStack=!0,c.stackGroups[i]=s}else c.stackGroups[fm("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return UM(UM({},e),{},VM({},o,c))}),{});return Object.keys(o).reduce((function(t,i){var c=o[i];return c.hasStack&&(c.stackGroups=Object.keys(c.stackGroups).reduce((function(t,i){var o=c.stackGroups[i];return UM(UM({},t),{},VM({},i,{numericAxisId:n,cateAxisId:r,items:o.items,stackedData:t_(e,o.items,a)}))}),{})),UM(UM({},t),{},VM({},i,c))}),{})}(f,b,"".concat(m,"Id"),"".concat(y,"Id"),l,p),w=d.reduce((function(e,t){var a="".concat(t.axisType,"Map");return RD(RD({},e),{},FD({},a,qD(n,RD(RD({},t),{},{graphicalItems:b,stackGroups:t.axisType===m&&x,dataStartIndex:r,dataEndIndex:o}))))}),{}),k=ZD(RD(RD({},w),{},{props:n,graphicalItems:b}),null==t?void 0:t.legendBBox);Object.keys(w).forEach((function(e){w[e]=v(n,w[e],k,e.replace("Map",""),a)}));var S,O,E=w["".concat(y,"Map")],A=(S=pm(E),{tooltipTicks:O=JM(S,!1,!0),orderedTooltipTicks:Uy(O,(function(e){return e.coordinate})),tooltipAxis:S,tooltipAxisBandSize:s_(S,O)}),M=g(n,RD(RD({},w),{},{dataStartIndex:r,dataEndIndex:o,updateId:c,graphicalItems:b,stackGroups:x,offset:k}));return RD(RD({formattedGraphicalItems:M,graphicalItems:b,offset:k,stackGroups:x},A),w)};return r=n=function(e){!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&&MD(e,t)}(l,p);var n,r,i,c=_D(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=c.call(this,e)).uniqueChartId=void 0,t.clipPathId=void 0,t.legendInstance=void 0,t.deferId=void 0,t.container=void 0,t.clearDeferId=function(){!Pm(t.deferId)&&UD&&UD(t.deferId),t.deferId=null},t.handleLegendBBoxUpdate=function(e){if(e){var n=t.state,r=n.dataStartIndex,a=n.dataEndIndex,i=n.updateId;t.setState(RD({legendBBox:e},b({props:t.props,dataStartIndex:r,dataEndIndex:a,updateId:i},RD(RD({},t.state),{},{legendBBox:e}))))}},t.handleReceiveSyncEvent=function(e,n,r){t.props.syncId===e&&n!==t.uniqueChartId&&(t.clearDeferId(),t.deferId=BD&&BD(t.applySyncEvent.bind(PD(t),r)))},t.handleBrushChange=function(e){var n=e.startIndex,r=e.endIndex;if(n!==t.state.dataStartIndex||r!==t.state.dataEndIndex){var a=t.state.updateId;t.setState((function(){return RD({dataStartIndex:n,dataEndIndex:r},b({props:t.props,dataStartIndex:n,dataEndIndex:r,updateId:a},t.state))})),t.triggerSyncEvent({dataStartIndex:n,dataEndIndex:r})}},t.handleMouseEnter=function(e){var n=t.props.onMouseEnter,r=t.getMouseInfo(e);if(r){var a=RD(RD({},r),{},{isTooltipActive:!0});t.setState(a),t.triggerSyncEvent(a),hc(n)&&n(a,e)}},t.triggeredAfterMouseMove=function(e){var n=t.props.onMouseMove,r=t.getMouseInfo(e),a=r?RD(RD({},r),{},{isTooltipActive:!0}):{isTooltipActive:!1};t.setState(a),t.triggerSyncEvent(a),hc(n)&&n(a,e)},t.handleItemMouseEnter=function(e){t.setState((function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}}))},t.handleItemMouseLeave=function(){t.setState((function(){return{isTooltipActive:!1}}))},t.handleMouseMove=function(e){e&&hc(e.persist)&&e.persist(),t.triggeredAfterMouseMove(e)},t.handleMouseLeave=function(e){var n=t.props.onMouseLeave,r={isTooltipActive:!1};t.setState(r),t.triggerSyncEvent(r),hc(n)&&n(r,e),t.cancelThrottledTriggerAfterMouseMove()},t.handleOuterEvent=function(e){var n=function(e){var t=e&&e.type;return t&&bw[t]?bw[t]:null}(e),r=Jf(t.props,"".concat(n));n&&hc(r)&&r(/.*touch.*/i.test(n)?t.getMouseInfo(e.changedTouches[0]):t.getMouseInfo(e),e)},t.handleClick=function(e){var n=t.props.onClick,r=t.getMouseInfo(e);if(r){var a=RD(RD({},r),{},{isTooltipActive:!0});t.setState(a),t.triggerSyncEvent(a),hc(n)&&n(a,e)}},t.handleMouseDown=function(e){var n=t.props.onMouseDown;hc(n)&&n(t.getMouseInfo(e),e)},t.handleMouseUp=function(e){var n=t.props.onMouseUp;hc(n)&&n(t.getMouseInfo(e),e)},t.handleTouchMove=function(e){null!=e.changedTouches&&e.changedTouches.length>0&&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 t=e.xAxis,n=e.width,r=e.height,a=e.offset;return KM(bC.getTicks(RD(RD(RD({},bC.defaultProps),t),{},{ticks:JM(t,!0),viewBox:{x:0,y:0,width:n,height:r}})),a.left,a.left+a.width)},t.horizontalCoordinatesGenerator=function(e){var t=e.yAxis,n=e.width,r=e.height,a=e.offset;return KM(bC.getTicks(RD(RD(RD({},bC.defaultProps),t),{},{ticks:JM(t,!0),viewBox:{x:0,y:0,width:n,height:r}})),a.top,a.top+a.height)},t.axesTicksGenerator=function(e){return JM(e,!0)},t.renderCursor=function(e){var n=t.state,r=n.isTooltipActive,i=n.activeCoordinate,c=n.activePayload,s=n.offset,l=n.activeTooltipIndex,f=t.getTooltipEventType();if(!e||!e.props.cursor||!r||!i||"ScatterChart"!==a&&"axis"!==f)return null;var d,p=t.props.layout,m=pj;if("ScatterChart"===a)d=i,m=Uj;else if("BarChart"===a)d=t.getCursorRectangle(),m=Oj;else if("radial"===p){var v=t.getCursorPoints(),y=v.cx,g=v.cy,b=v.radius;d={cx:y,cy:g,startAngle:v.startAngle,endAngle:v.endAngle,innerRadius:b,outerRadius:b},m=K_}else d={points:t.getCursorPoints()},m=pj;var x=e.key||"_recharts-cursor",w=RD(RD(RD(RD({stroke:"#ccc",pointerEvents:"none"},s),d),Bo(e.props.cursor)),{},{payload:c,payloadIndex:l,key:x,className:"recharts-tooltip-cursor"});return o(e.props.cursor)?u(e.props.cursor,w):h(m,w)},t.renderPolarAxis=function(e,n,r){var a=Jf(e,"type.axisType"),i=Jf(t.state,"".concat(a,"Map"))[e.props["".concat(a,"Id")]];return u(e,RD(RD({},i),{},{className:a,key:e.key||"".concat(n,"-").concat(r),ticks:JM(i,!0)}))},t.renderXAxis=function(e,n,r){var a=t.state.xAxisMap[e.props.xAxisId];return t.renderAxis(a,e,n,r)},t.renderYAxis=function(e,n,r){var a=t.state.yAxisMap[e.props.yAxisId];return t.renderAxis(a,e,n,r)},t.renderGrid=function(e){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,i=n.offset,o=t.props,c=o.width,s=o.height,l=pm(r),f=fD(a,(function(e){return CP(e.domain,HD)}))||pm(a),d=e.props||{};return u(e,{key:e.key||"grid",x:sm(d.x)?d.x:i.left,y:sm(d.y)?d.y:i.top,width:sm(d.width)?d.width:i.width,height:sm(d.height)?d.height:i.height,xAxis:l,yAxis:f,offset:i,chartWidth:c,chartHeight:s,verticalCoordinatesGenerator:d.verticalCoordinatesGenerator||t.verticalCoordinatesGenerator,horizontalCoordinatesGenerator:d.horizontalCoordinatesGenerator||t.horizontalCoordinatesGenerator})},t.renderPolarGrid=function(e){var n=e.props,r=n.radialLines,a=n.polarAngles,i=n.polarRadius,o=t.state,c=o.radiusAxisMap,s=o.angleAxisMap,l=pm(c),f=pm(s),d=f.cx,p=f.cy,h=f.innerRadius,m=f.outerRadius;return u(e,{polarAngles:hu(a)?a:JM(f,!0).map((function(e){return e.coordinate})),polarRadius:hu(i)?i:JM(l,!0).map((function(e){return e.coordinate})),cx:d,cy:p,innerRadius:h,outerRadius:m,key:e.key||"polar-grid",radialLines:r})},t.renderLegend=function(){var e=t.state.formattedGraphicalItems,n=t.props,r=n.children,a=n.width,i=n.height,o=t.props.margin||{},c=a-(o.left||0)-(o.right||0),s=qM({children:r,formattedGraphicalItems:e,legendWidth:c,legendContent:m});if(!s)return null;var l=s.item,f=ED(s,["item"]);return u(l,RD(RD({},f),{},{chartWidth:a,chartHeight:i,margin:o,ref:function(e){t.legendInstance=e},onBBoxUpdate:t.handleLegendBBoxUpdate}))},t.renderTooltip=function(){var e=t.props.children,n=Ew(e,vg.displayName);if(!n)return null;var r=t.state,a=r.isTooltipActive,i=r.activeCoordinate,o=r.activePayload,c=r.activeLabel,s=r.offset;return u(n,{viewBox:RD(RD({},s),{},{x:s.left,y:s.top}),active:a,label:c,payload:a?o:[],coordinate:i})},t.renderBrush=function(e){var n=t.props,r=n.margin,a=n.data,i=t.state,o=i.offset,c=i.dataStartIndex,s=i.dataEndIndex,l=i.updateId;return u(e,{key:e.key||"_recharts-brush",onChange:QM(t.handleBrushChange,null,e.props.onChange),data:a,x:sm(e.props.x)?e.props.x:o.left,y:sm(e.props.y)?e.props.y:o.top+o.height+o.brushBottom-(r.bottom||0),width:sm(e.props.width)?e.props.width:o.width,startIndex:c,endIndex:s,updateId:"brush-".concat(l)})},t.renderReferenceElement=function(e,n,r){if(!e)return null;var a=PD(t).clipPathId,i=t.state,o=i.xAxisMap,c=i.yAxisMap,s=i.offset,l=e.props,f=l.xAxisId,d=l.yAxisId;return u(e,{key:e.key||"".concat(n,"-").concat(r),xAxis:o[f],yAxis:c[d],viewBox:{x:s.left,y:s.top,width:s.width,height:s.height},clipPathId:a})},t.renderActivePoints=function(e){var t=e.item,n=e.activePoint,r=e.basePoint,a=e.childIndex,i=e.isRange,o=[],c=t.props.key,s=t.item.props,u=s.activeDot,f=RD(RD({index:a,dataKey:s.dataKey,cx:n.x,cy:n.y,r:4,fill:YM(t.item),strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value,key:"".concat(c,"-activePoint-").concat(a)},Bo(u)),Uo(u));return o.push(l.renderActiveDot(u,f)),r?o.push(l.renderActiveDot(u,RD(RD({},f),{},{cx:r.x,cy:r.y,key:"".concat(c,"-basePoint-").concat(a)}))):i&&o.push(null),o},t.renderGraphicChild=function(e,n,r){var a=t.filterFormatItem(e,n,r);if(!a)return null;var i=t.getTooltipEventType(),o=t.state,c=o.isTooltipActive,s=o.tooltipAxis,l=o.activeTooltipIndex,f=o.activeLabel,d=t.props.children,p=Ew(d,vg.displayName),h=a.props,m=h.points,v=h.isRange,y=h.baseLine,g=a.item.props,b=g.activeDot,x=!g.hide&&c&&p&&b&&l>=0,w={};"axis"!==i&&p&&"click"===p.props.trigger?w={onClick:QM(t.handleItemMouseEnter,null,e.props.onCLick)}:"axis"!==i&&(w={onMouseLeave:QM(t.handleItemMouseLeave,null,e.props.onMouseLeave),onMouseEnter:QM(t.handleItemMouseEnter,null,e.props.onMouseEnter)});var k=u(e,RD(RD({},a.props),w));if(x){var S,O;if(s.dataKey&&!s.allowDuplicatedCategory){var E="function"==typeof s.dataKey?function(e){return"function"==typeof s.dataKey?s.dataKey(e.payload):null}:"payload.".concat(s.dataKey.toString());S=mm(m,E,f),O=v&&y&&mm(y,E,f)}else S=m[l],O=v&&y&&y[l];if(!Pm(S))return[k].concat(DD(t.renderActivePoints({item:a,activePoint:S,basePoint:O,childIndex:l,isRange:v})))}return v?[k,null,null]:[k,null]},t.renderCustomized=function(e,n,r){return u(e,RD(RD({key:"recharts-customized-".concat(r)},t.props),t.state))},t.uniqueChartId=Pm(e.id)?fm("recharts"):e.id,t.clipPathId="".concat(t.uniqueChartId,"-clip"),e.throttleDelay&&(t.triggeredAfterMouseMove=hD(t.triggeredAfterMouseMove,e.throttleDelay)),t.state={},t}return n=l,r=[{key:"componentDidMount",value:function(){Pm(this.props.syncId)||this.addListener()}},{key:"componentDidUpdate",value:function(e){Pm(e.syncId)&&!Pm(this.props.syncId)&&this.addListener(),!Pm(e.syncId)&&Pm(this.props.syncId)&&this.removeListener()}},{key:"componentWillUnmount",value:function(){this.clearDeferId(),Pm(this.props.syncId)||this.removeListener(),this.cancelThrottledTriggerAfterMouseMove()}},{key:"cancelThrottledTriggerAfterMouseMove",value:function(){"function"==typeof this.triggeredAfterMouseMove.cancel&&this.triggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=Ew(this.props.children,vg.displayName);if(e&&yD(e.props.shared)){var t=e.props.shared?"axis":"item";return f.indexOf(t)>=0?t:s}return s}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t,n,r,a=function(e,t){return{chartX:Math.round(e.pageX-t.left),chartY:Math.round(e.pageY-t.top)}}(e,(t=this.container,n=t.ownerDocument.documentElement,r={top:0,left:0},void 0!==t.getBoundingClientRect&&(r=t.getBoundingClientRect()),{top:r.top+window.pageYOffset-n.clientTop,left:r.left+window.pageXOffset-n.clientLeft})),i=this.inRange(a.chartX,a.chartY);if(!i)return null;var o=this.state,c=o.xAxisMap,s=o.yAxisMap;if("axis"!==this.getTooltipEventType()&&c&&s){var u=pm(c).scale,l=pm(s).scale,f=u&&u.invert?u.invert(a.chartX):null,d=l&&l.invert?l.invert(a.chartY):null;return RD(RD({},a),{},{xValue:f,yValue:d})}var p=$D(this.state,this.props.data,this.props.layout,i);return p?RD(RD({},a),p):null}},{key:"getCursorRectangle",value:function(){var e=this.props.layout,t=this.state,n=t.activeCoordinate,r=t.offset,a=t.tooltipAxisBandSize,i=a/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?n.x-i:r.left+.5,y:"horizontal"===e?r.top+.5:n.y-i,width:"horizontal"===e?a:r.width-1,height:"horizontal"===e?r.height-1:a}}},{key:"getCursorPoints",value:function(){var e,t,n,r,a=this.props.layout,i=this.state,o=i.activeCoordinate,c=i.offset;if("horizontal"===a)n=e=o.x,t=c.top,r=c.top+c.height;else if("vertical"===a)r=t=o.y,e=c.left,n=c.left+c.width;else if(!Pm(o.cx)||!Pm(o.cy)){if("centric"!==a){var s=o.cx,u=o.cy,l=o.radius,f=o.startAngle,d=o.endAngle;return{points:[v_(s,u,l,f),v_(s,u,l,d)],cx:s,cy:u,radius:l,startAngle:f,endAngle:d}}var p=o.cx,h=o.cy,m=o.innerRadius,v=o.outerRadius,y=o.angle,g=v_(p,h,m,y),b=v_(p,h,v,y);e=g.x,t=g.y,n=b.x,r=b.y}return[{x:e,y:t},{x:n,y:r}]}},{key:"inRange",value:function(e,t){var n=this.props.layout;if("horizontal"===n||"vertical"===n){var r=this.state.offset;return e>=r.left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height?{x:e,y:t}:null}var a=this.state,i=a.angleAxisMap,o=a.radiusAxisMap;if(i&&o){var c=pm(i);return b_({x:e,y:t},c)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=Ew(e,vg.displayName),r={};return n&&"axis"===t&&(r="click"===n.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),RD(RD({},Uo(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){xD.on(wD,this.handleReceiveSyncEvent),xD.setMaxListeners&&xD._maxListeners&&xD.setMaxListeners(xD._maxListeners+1)}},{key:"removeListener",value:function(){xD.removeListener(wD,this.handleReceiveSyncEvent),xD.setMaxListeners&&xD._maxListeners&&xD.setMaxListeners(xD._maxListeners-1)}},{key:"triggerSyncEvent",value:function(e){var t=this.props.syncId;Pm(t)||xD.emit(wD,t,this.uniqueChartId,e)}},{key:"applySyncEvent",value:function(e){var t=this.props,n=t.layout,r=t.syncMethod,a=this.state.updateId,i=e.dataStartIndex,o=e.dataEndIndex;if(Pm(e.dataStartIndex)&&Pm(e.dataEndIndex))if(Pm(e.activeTooltipIndex))this.setState(e);else{var c=e.chartX,s=e.chartY,u=e.activeTooltipIndex,l=this.state,f=l.offset,d=l.tooltipTicks;if(!f)return;if("function"==typeof r)u=r(d,e);else if("value"===r){u=-1;for(var p=0;p<d.length;p++)if(d[p].value===e.activeLabel){u=p;break}}var h=RD(RD({},f),{},{x:f.left,y:f.top}),m=Math.min(c,h.x+h.width),v=Math.min(s,h.y+h.height),y=d[u]&&d[u].value,g=WD(this.state,this.props.data,u),x=d[u]?{x:"horizontal"===n?d[u].coordinate:m,y:"horizontal"===n?v:d[u].coordinate}:LD;this.setState(RD(RD({},e),{},{activeLabel:y,activeCoordinate:x,activePayload:g,activeTooltipIndex:u}))}else this.setState(RD({dataStartIndex:i,dataEndIndex:o},b({props:this.props,dataStartIndex:i,dataEndIndex:o,updateId:a},this.state)))}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,a=0,i=r.length;a<i;a++){var o=r[a];if(o.item===e||o.props.key===e.key||t===xw(o.item.type)&&n===o.childIndex)return o}return null}},{key:"renderAxis",value:function(e,n,r,a){var i=this.props,o=i.width,c=i.height;return t.createElement(bC,OD({},e,{className:"recharts-".concat(e.axisType," ").concat(e.axisType),key:n.key||"".concat(r,"-").concat(a),viewBox:{x:0,y:0,width:o,height:c},ticksGenerator:this.axesTicksGenerator}))}},{key:"renderClipPath",value:function(){var e=this.clipPathId,n=this.state.offset,r=n.left,a=n.top,i=n.height,o=n.width;return t.createElement("defs",null,t.createElement("clipPath",{id:e},t.createElement("rect",{x:r,y:a,height:i,width:o})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce((function(e,t){var n=SD(t,2),r=n[0],a=n[1];return RD(RD({},e),{},FD({},r,a.scale))}),{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce((function(e,t){var n=SD(t,2),r=n[0],a=n[1];return RD(RD({},e),{},FD({},r,a.scale))}),{}):null}},{key:"getXScaleByAxisId",value:function(e){var t,n;return null===(t=this.state.xAxisMap)||void 0===t||null===(n=t[e])||void 0===n?void 0:n.scale}},{key:"getYScaleByAxisId",value:function(e){var t,n;return null===(t=this.state.yAxisMap)||void 0===t||null===(n=t[e])||void 0===n?void 0:n.scale}},{key:"getItemByXY",value:function(e){var t=this.state.formattedGraphicalItems;if(t&&t.length)for(var n=0,r=t.length;n<r;n++){var a=t[n],i=a.props,o=a.item,c=xw(o.type);if("Bar"===c){var s=(i.data||[]).find((function(t){return Sj(e,t)}));if(s)return{graphicalItem:a,payload:s}}else if("RadialBar"===c){var u=(i.data||[]).find((function(t){return b_(e,t)}));if(u)return{graphicalItem:a,payload:u}}}return null}},{key:"render",value:function(){var e=this;if(!Aw(this))return null;var n=this.props,r=n.children,a=n.className,i=n.width,o=n.height,c=n.style,s=n.compact,u=n.title,l=n.desc,f=ED(n,["children","className","width","height","style","compact","title","desc"]),d=Bo(f),p={CartesianGrid:{handler:this.renderGrid,once:!0},ReferenceArea:{handler:this.renderReferenceElement},ReferenceLine:{handler:this.renderReferenceElement},ReferenceDot:{handler:this.renderReferenceElement},XAxis:{handler:this.renderXAxis},YAxis:{handler:this.renderYAxis},Brush:{handler:this.renderBrush,once:!0},Bar:{handler:this.renderGraphicChild},Line:{handler:this.renderGraphicChild},Area:{handler:this.renderGraphicChild},Radar:{handler:this.renderGraphicChild},RadialBar:{handler:this.renderGraphicChild},Scatter:{handler:this.renderGraphicChild},Pie:{handler:this.renderGraphicChild},Funnel:{handler:this.renderGraphicChild},Tooltip:{handler:this.renderCursor,once:!0},PolarGrid:{handler:this.renderPolarGrid,once:!0},PolarAngleAxis:{handler:this.renderPolarAxis},PolarRadiusAxis:{handler:this.renderPolarAxis},Customized:{handler:this.renderCustomized}};if(s)return t.createElement(Yo,OD({},d,{width:i,height:o,title:u,desc:l}),this.renderClipPath(),Pw(r,p));var h=this.parseEventsOfWrapper();return t.createElement("div",OD({className:Io("recharts-wrapper",a),style:RD({position:"relative",cursor:"default",width:i,height:o},c)},h,{ref:function(t){e.container=t}}),t.createElement(Yo,OD({},d,{width:i,height:o,title:u,desc:l}),this.renderClipPath(),Pw(r,p)),this.renderLegend(),this.renderTooltip())}}],r&&AD(n.prototype,r),i&&AD(n,i),l}(),n.displayName=a,n.defaultProps=RD({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},y),n.getDerivedStateFromProps=function(e,t){var n=e.data,r=e.children,a=e.width,i=e.height,o=e.layout,c=e.stackOffset,s=e.margin;if(Pm(t.updateId)){var u=GD(e);return RD(RD(RD({},u),{},{updateId:0},b(RD(RD({props:e},u),{},{updateId:0}),t)),{},{prevData:n,prevWidth:a,prevHeight:i,prevLayout:o,prevStackOffset:c,prevMargin:s,prevChildren:r})}if(n!==t.prevData||a!==t.prevWidth||i!==t.prevHeight||o!==t.prevLayout||c!==t.prevStackOffset||!yw(s,t.prevMargin)){var l=GD(e),f={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},d=RD(RD({},$D(t,n,o)),{},{updateId:t.updateId+1}),p=RD(RD(RD({},l),f),d);return RD(RD(RD({},p),b(RD({props:e},p),t)),{},{prevData:n,prevWidth:a,prevHeight:i,prevLayout:o,prevStackOffset:c,prevMargin:s,prevChildren:r})}if(!_w(r,t.prevChildren)){var h=!Pm(n)?t.updateId:t.updateId+1;return RD(RD({updateId:h},b(RD(RD({props:e},t),{},{updateId:h}),t)),{},{prevChildren:r})}return null},n.renderActiveDot=function(e,n){var r;return r=o(e)?u(e,n):hc(e)?e(n):t.createElement(Tj,n),t.createElement(Xo,{className:"recharts-active-dot",key:n.key},r)},r}({chartName:"LineChart",GraphicalChild:JC,axisComponents:[{axisType:"xAxis",AxisComp:QC},{axisType:"yAxis",AxisComp:eD}],formatAxisMap:function(e,t,n,r,a){var i=e.width,o=e.height,c=e.layout,s=e.children,u=Object.keys(t),l={left:n.left,leftMirror:n.left,right:i-n.right,rightMirror:i-n.right,top:n.top,topMirror:n.top,bottom:o-n.bottom,bottomMirror:o-n.bottom},f=!!Ew(s,"Bar");return u.reduce((function(i,o){var s,u,d,p,h,m=t[o],v=m.orientation,y=m.domain,g=m.padding,b=void 0===g?{}:g,x=m.mirror,w=m.reversed,k="".concat(v).concat(x?"Mirror":"");if("number"===m.type&&("gap"===m.padding||"no-gap"===m.padding)){var S=y[1]-y[0],O=1/0,E=m.categoricalDomain.sort();E.forEach((function(e,t){t>0&&(O=Math.min((e||0)-(E[t-1]||0),O))}));var A=O/S,M="vertical"===m.layout?n.height:n.width;if("gap"===m.padding&&(s=A*M/2),"no-gap"===m.padding){var _=dm(e.barCategoryGap,A*M),j=A*M/2;s=j-_-(j-_)/M*_}}u="xAxis"===r?[n.left+(b.left||0)+(s||0),n.left+n.width-(b.right||0)-(s||0)]:"yAxis"===r?"horizontal"===c?[n.top+n.height-(b.bottom||0),n.top+(b.top||0)]:[n.top+(b.top||0)+(s||0),n.top+n.height-(b.bottom||0)-(s||0)]:m.range,w&&(u=[u[1],u[0]]);var P=function(e,t,n){var r=e.scale,a=e.type,i=e.layout,o=e.axisType;if("auto"===r)return"radial"===i&&"radiusAxis"===o?{scale:OS(),realScaleType:"band"}:"radial"===i&&"angleAxis"===o?{scale:GO(),realScaleType:"linear"}:"category"===a&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!n)?{scale:AS(),realScaleType:"point"}:"category"===a?{scale:OS(),realScaleType:"band"}:{scale:GO(),realScaleType:"linear"};if(im(r)){var c="scale".concat(Mp(r));return{scale:(zM[c]||AS)(),realScaleType:zM[c]?c:"point"}}return hc(r)?{scale:r}:{scale:AS(),realScaleType:"point"}}(m,a,f),C=P.scale,D=P.realScaleType;C.domain(y).range(u),function(e){var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),a=Math.min(r[0],r[1])-1e-4,i=Math.max(r[0],r[1])+1e-4,o=e(t[0]),c=e(t[n-1]);(o<a||o>i||c<a||c>i)&&e.domain([t[0],t[n-1]])}}(C);var T=n_(C,HP(HP({},m),{},{realScaleType:D}));"xAxis"===r?(h="top"===v&&!x||"bottom"===v&&x,d=n.left,p=l[k]-h*m.height):"yAxis"===r&&(h="left"===v&&!x||"right"===v&&x,d=l[k]-h*m.width,p=n.top);var N=HP(HP(HP({},m),T),{},{realScaleType:D,x:d,y:p,scale:C,width:"xAxis"===r?n.width:m.width,height:"yAxis"===r?n.height:m.height});return N.bandSize=s_(N,T),m.hide||"xAxis"!==r?m.hide||(l[k]+=(h?-1:1)*N.width):l[k]+=(h?-1:1)*N.height,HP(HP({},i),{},BP({},o,N))}),{})}});function JD(e){return ji(e).substr(0,10)}function QD(e,t,n){return"FitbitSteps"==e?eT(t,n):"FitbitRestingHeartRates"==e||"AppleHealthSteps"==e?tT(t,n):"AppleHealthDistanceRunningWalking"==e?function(e,t){var n=new Date(e,t,1,0,0,0,0),r=va(n,{months:1}),a={};for(;n<r;)a[JD(n)]=Math.floor(500*Math.random()),n=va(n,{hours:1});return a}(t,n):"GoogleFitSteps"==e?function(e,t){var n=new Date(e,t,1,0,0,0,0),r=va(n,{months:1}),a={};for(;n<r;)a[JD(n)]=Math.floor(500*Math.random()),n=va(n,{hours:1});return a}(t,n):eT(t,n)}function eT(e,t){for(var n=new Date(e,t,1,0,0,0,0),r=va(n,{months:1}),a={};n<r;)a[JD(n)]=3e3+Math.floor(1e4*Math.random()),n=va(n,{days:1});return a}function tT(e,t){for(var n=new Date(e,t,1,0,0,0,0),r=va(n,{months:1}),a={};n<r;)a[JD(n)]=60+Math.floor(5*Math.random()),n=va(n,{days:1});return a}var nT=function(){return nT=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},nT.apply(this,arguments)};function rT(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,c)}s((r=r.apply(e,t||[])).next())}))}function aT(e,t){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function iT(e){var t=[],n=function(r){var a=nT({},e);return r&&(a.pageID=r),v.queryDeviceData(a).then((function(e){return t=t.concat(e.deviceDataPoints),e.nextPageID?n(e.nextPageID):t}))};return n()}function oT(e,t){var n=e.startDate;t.startDate<n&&(n=t.startDate);var r=e.endDate;return t.endDate>r&&(r=t.endDate),{startDate:n,endDate:r}}function cT(e){e=e.sort((function(e,t){return e.startDate.getTime()-t.startDate.getTime()}));for(var t,n,r=[],a=e[0],i=1;i<e.length;i++)t=a,(n=e[i]).startDate>=t.startDate&&n.startDate<=t.endDate||n.endDate>=t.startDate&&n.endDate<=t.endDate||t.startDate>=n.startDate&&t.startDate<=n.endDate||t.endDate>=n.startDate&&t.endDate<=n.endDate?a=oT(a,e[i]):(r.push(a),a=e[i]);r.push(a);var o=0;return r.forEach((function(e){o+=function(e,t,n){la(2,arguments);var r=_a(e,t)/6e4;return Pa(null==n?void 0:n.roundingMethod)(r)}(e.endDate,e.startDate)})),o}function sT(e,t,n){return iT({namespace:"AppleHealth",type:"SleepAnalysisInterval",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(r){var a={};r.forEach((function(e){if(e.observationDate&&e.startDate&&e.value==n)for(var t=function(e){for(var t=[],n=Ti(e.startDate),r=Ti(e.observationDate),a=va(new Date(n.getFullYear(),n.getMonth(),n.getDate(),18,0,0,0),{days:-1});a<r;){var i=va(a,{days:1});if(i>n){var o=new Date(a),c=new Date(i);n>=a&&n<i&&(o=n),r>=a&&r<i&&(c=r),t.push({startDate:o,endDate:c})}a=i}return t}(e),r=0;r<t.length;r++){var i=ji(va(t[r].startDate,{hours:6})).substring(0,10);a[i]||(a[i]=[]),a[i].push(t[r])}}));for(var i={};e<t;){var o=e.toISOString().substr(0,10),c=a[o];c&&(i[o]=cT(c)),e=va(e,{days:1})}return i}))}function uT(e,t){return iT({namespace:"AppleHealth",type:"HourlySteps",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate){var n=JD(Ti(e.startDate));t[n]||(t[n]=0),t[n]+=parseFloat(e.value)}})),t}))}function lT(e,t,n){return iT({namespace:"Fitbit",type:n,observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate){var n=e.startDate.substr(0,10);t[n]||(t[n]=0),t[n]+=parseInt(e.value)}})),t}))}function fT(e,t,n){return iT({namespace:"Fitbit",type:"HeartRateZone",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if("Out of Range"!=e.value&&(!n||e.value==n)&&e.properties&&e.properties.Minutes&&e.startDate){var r=e.startDate.substr(0,10);t[r]||(t[r]=0),t[r]+=parseInt(e.properties.Minutes)}})),t}))}function dT(e,t,n){return iT({namespace:"Fitbit",type:e,observedAfter:va(t,{days:-1}).toISOString(),observedBefore:va(n,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate&&0!=parseInt(e.value)){var n=e.startDate.substr(0,10);t[n]=Math.round(parseFloat(e.value))}})),t}))}function pT(e,t){return dT("RestingHeartRate",e,t)}function hT(e,t,n){return iT({namespace:"Fitbit",type:n,observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.observationDate){var n=ji(va(Ti(e.observationDate),{hours:6})).substr(0,10);t[n]||(t[n]=0),t[n]+=parseFloat(e.value)}})),t}))}function mT(e,t){return dT("Steps",e,t)}var vT,yT={};function gT(e,t,n){yT[e]={provider:t,availabilityCheck:n}}function bT(e,t){var n=yT[e];if(!n)throw"Unknown data type:"+e;return n.availabilityCheck(t)}function xT(e,t,n){return yT[e].provider(t,n).then((function(e){for(var r={};t<n;){var a=JD(t);e[a]&&(r[a]=e[a]),t=va(t,{days:1})}return r}))}function wT(e,t){return function(n){var r={namespace:e,type:t,limit:1};return n&&(r.modifiedAfter=n.toISOString()),v.queryDeviceData(r).then((function(e){return e.deviceDataPoints.length>0})).catch((function(){return!1}))}}function kT(e){var n=e.x,r=e.y;e.stroke;var a=e.payload.value;return t.createElement("text",{x:n,y:r+15,textAnchor:"middle",fontSize:"12"},a)}function ST(e){var r=a(null),o=r[0],c=r[1],s=a(!1),u=s[0],l=s[1],f=a(!1),d=f[0],p=f[1],h=n(),m=new Date(e.year,e.month,1,0,0,0,0),y=va(m,{months:1});function g(){var t,n;if(e.previewState&&(p(!0),e.onDataDetected&&e.onDataDetected()),"Loading"==e.previewState&&l(!0),"WithData"==e.previewState){var r={};e.lines.forEach((function(t){var n=QD(t.dailyDataType,e.year,e.month);r[t.dailyDataType]=n})),c(r)}if("NoData"==e.previewState){r={};e.lines.forEach((function(e){r[e.dailyDataType]={}})),c(r),l(!1)}if(!e.previewState){!function(){if(!d){var t=e.lines.map((function(e){return bT(e.dailyDataType)}));Promise.all(t).then((function(t){t.find((function(e){return e}))&&(p(!0),e.onDataDetected&&e.onDataDetected())}))}}(),h.current=(null!==(t=h.current)&&void 0!==t?t:0)+1;var a=null!==(n=h.current)&&void 0!==n?n:0;l(!0);var i;i=e.lines.map((function(e){return xT(e.dailyDataType,m,y)})),Promise.all(i).then((function(t){if(a==h.current){for(var n={},r=0;r<e.lines.length;r++)n[e.lines[r].dailyDataType]=t[r];c(n),l(!1)}}))}}i((function(){return g(),v.on("applicationDidBecomeVisible",g),v.on("externalAccountSyncComplete",g),function(){v.off("applicationDidBecomeVisible",g),v.off("externalAccountSyncComplete",g)}}),[e]);for(var b=[],x=m,w=!1;x<y;){var k={day:x.getDate()};b.push(k);var S=JD(x);e.lines.forEach((function(e){o&&(k[e.dailyDataType]=o[e.dailyDataType][S],e.valueConverter&&(k[e.dailyDataType]=e.valueConverter(k[e.dailyDataType])),k[e.dailyDataType]>0&&(w=!0))})),x=va(x,{days:1})}if(!d)return null;var O=function(){var t=e.lines.filter((function(e){return e.showAverage}));if(0==t.length)return null;if(t.length>1)return console.error("Only one line can display an average"),null;var n=t[0],r=b.map((function(e){return e[n.dailyDataType]}));if(r=r.filter((function(e){return!!e})),!r.length)return null;var a=r.reduce((function(e,t){return e+t}))/r.length;return a.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:1})}();return t.createElement("div",{className:"mdhui-device-data-month-chart"},e.title&&t.createElement("div",{className:"title"},e.title),!u&&null!=O&&t.createElement("div",{className:"average"},"Daily Average: ",t.createElement("span",{className:"average-value"},O)),t.createElement("div",{style:{clear:"both"}}),t.createElement("div",{className:"chart-container"},(!w||u)&&t.createElement("div",null,!w&&!u&&t.createElement("div",{className:"no-data-label"},"No Data"),u&&t.createElement(po,null),t.createElement(Nb,{width:"100%",height:150},t.createElement(KD,{width:400,height:400,data:b,syncId:e.syncId},t.createElement(DC,{strokeDasharray:"3 3"}),t.createElement(eD,{axisLine:!1,interval:0,tickLine:!1,width:30,scale:"linear"}),t.createElement(QC,{tick:kT,axisLine:!1,dataKey:"day",tickMargin:0,minTickGap:0,tickLine:!1,interval:1})))),w&&!u&&t.createElement(Nb,{width:"100%",height:150},t.createElement(KD,{width:400,height:400,data:b,syncId:e.syncId},e.lines.map((function(e){return t.createElement(JC,{key:e.dailyDataType,type:"monotone",dataKey:e.dailyDataType,stroke:"var(--color-primary)"})})),t.createElement(vg,{content:t.createElement((function(n){var r=n.active,a=n.payload;if(n.label,r&&a&&a.length){var i=new Date(e.year,e.month,a[0].payload.day),o={};return e.lines.forEach((function(e){o[e.dailyDataType]=e.label})),t.createElement("div",{className:"graph-tooltip"},t.createElement("div",{className:"graph-date"},Oi(i,"MM/dd/yyyy")),t.createElement("table",{className:"payload-values"},t.createElement("tbody",null,a.map((function(e){return t.createElement("tr",{key:e.dataKey},t.createElement("th",null,o[e.dataKey]),t.createElement("td",null,parseFloat(e.value.toFixed(2))))})))))}return null}),null)}),t.createElement(DC,{strokeDasharray:"3 3"}),t.createElement(eD,{tickFormatter:function(e){return e>=1e4?Math.floor(e/1e3)+"K":e},axisLine:!1,interval:0,tickLine:!1,width:30}),t.createElement(QC,{tick:kT,axisLine:!1,dataKey:"day",tickMargin:0,minTickGap:0,tickLine:!1,interval:1})))))}function OT(e){var n=a(!1),r=n[0],i=n[1],o=new Date,c=a(new Date(o.getFullYear(),o.getMonth(),1,0,0,0,0)),s=c[0],u=c[1];function l(){i(!0)}var f=s.getMonth(),d=s.getFullYear();return t.createElement(t.Fragment,null,!r&&t.createElement(Mo,null,vo["device-data-no-data"]),t.createElement("div",{style:{display:r?"block":"none"}},t.createElement(oo,{intervalType:"Month",intervalStart:s,onIntervalChange:function(e){u(e)}}),t.createElement(ST,{onDataDetected:function(){return l()},previewState:"Default"==e.previewState?"WithData":void 0,lines:[{showAverage:!0,dailyDataType:vT.FitbitSteps,label:vo.steps}],title:"Fitbit "+vo.steps,month:f,year:d,syncId:"DeviceDataCharts"}),t.createElement(ST,{onDataDetected:function(){return l()},previewState:"Default"==e.previewState?"WithData":void 0,lines:[{showAverage:!0,dailyDataType:vT.FitbitRestingHeartRate,label:vo["resting-heart-rate"]}],title:"Fitbit "+vo["resting-heart-rate"],month:f,year:d,syncId:"DeviceDataCharts"}),t.createElement(ST,{onDataDetected:function(){return l()},previewState:"Default"==e.previewState?"WithData":void 0,lines:[{showAverage:!0,dailyDataType:vT.AppleHealthSteps,label:vo.steps}],title:"Apple Health "+vo.steps,month:f,year:d,syncId:"DeviceDataCharts"}),t.createElement(ST,{onDataDetected:function(){return l()},previewState:"Default"==e.previewState?"WithData":void 0,lines:[{showAverage:!0,dailyDataType:vT.AppleHealthDistanceWalkingRunning,label:vo["distance-traveled"],valueConverter:function(e){return 621371e-9*e}}],title:"Apple Health "+vo["distance-traveled"]+" (Miles)",month:f,year:d,syncId:"DeviceDataCharts"}),t.createElement(ST,{onDataDetected:function(){return l()},previewState:"Default"==e.previewState?"WithData":void 0,lines:[{showAverage:!0,dailyDataType:vT.GoogleFitSteps,label:vo.steps}],title:"Google Fit "+vo.steps,month:f,year:d,syncId:"DeviceDataCharts"})))}!function(e){e.AppleHealthDistanceWalkingRunning="AppleHealthDistanceWalkingRunning",e.AppleHealthFlightsClimbed="AppleHealthFlightsClimbed",e.AppleHealthHeartRateRange="AppleHealthHeartRateRange",e.AppleHealthHrv="AppleHealthHrv",e.AppleHealthMaxHeartRate="AppleHealthMaxHeartRate",e.AppleHealthRestingHeartRate="AppleHealthRestingHeartRate",e.AppleHealthSleepMinutes="AppleHealthSleepMinutes",e.AppleHealthInBedMinutes="AppleHealthInBedMinutes",e.AppleHealthStandMinutes="AppleHealthStandMinutes",e.AppleHealthSteps="AppleHealthSteps",e.AppleHealthWalkingHeartRateAverage="AppleHealthWalkingHeartRateAverage",e.FitbitActiveMinutes="FitbitActiveMinutes",e.FitbitLightlyActiveMinutes="FitbitLightlyActiveMinutes",e.FitbitFairlyActiveMinutes="FitbitFairlyActiveMinutes",e.FitbitVeryActiveMinutes="FitbitVeryActiveMinutes",e.FitbitBreathingRate="FitbitBreathingRate",e.FitbitCaloriesBurned="FitbitCaloriesBurned",e.FitbitElevatedHeartRateMinutes="FitbitElevatedHeartRateMinutes",e.FitbitFatBurnHeartRateMinutes="FitbitFatBurnHeartRateMinutes",e.FitbitCardioHeartRateMinutes="FitbitCardioHeartRateMinutes",e.FitbitPeakHeartRateMinutes="FitbitPeakHeartRateMinutes",e.FitbitFloors="FitbitFloors",e.FitbitHrv="FitbitHrv",e.FitbitRestingHeartRate="FitbitRestingHeartRate",e.FitbitSleepMinutes="FitbitSleepMinutes",e.FitbitLightSleepMinutes="FitbitLightSleepMinutes",e.FitbitRemSleepMinutes="FitbitRemSleepMinutes",e.FitbitDeepSleepMinutes="FitbitDeepSleepMinutes",e.FitbitSpO2="FitbitSpO2",e.FitbitSteps="FitbitSteps",e.GoogleFitSteps="GoogleFitSteps",e.Steps="Steps",e.RestingHeartRate="RestingHeartRate"}(vT||(vT={})),gT(vT.AppleHealthDistanceWalkingRunning,(function(e,t){return iT({namespace:"AppleHealth",type:"HourlyDistanceWalkingRunning",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate){var n=ji(Ti(e.startDate)).substring(0,10);t[n]||(t[n]=0),t[n]+=parseFloat(e.value)}})),t}))}),wT("AppleHealth",["HourlyDistanceWalkingRunning"])),gT(vT.AppleHealthFlightsClimbed,(function(e,t){return iT({namespace:"AppleHealth",type:"FlightsClimbed",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate){var n=JD(Ti(e.startDate));t[n]||(t[n]=0),t[n]+=parseFloat(e.value)}})),t}))}),wT("AppleHealth",["HourlySteps"])),gT(vT.AppleHealthHeartRateRange,(function(e,t){return iT({namespace:"AppleHealth",type:["HourlyMaximumHeartRate","HourlyMinimumHeartRate"],observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(n){var r={};n.forEach((function(e){if(e.startDate){var t=JD(Ti(e.startDate)),n=parseFloat(e.value);"HourlyMaximumHeartRate"==e.type&&(r[t]?(!r[t].MaxHeartRate||n>r[t].MaxHeartRate)&&(r[t].MaxHeartRate=n):r[t]={MaxHeartRate:n}),"HourlyMinimumHeartRate"==e.type&&(r[t]?(!r[t].MinHeartRate||n<r[t].MinHeartRate)&&(r[t].MinHeartRate=n):r[t]={MinHeartRate:n})}}));for(var a={};e<t;){var i=r[JD(e)];i&&i.MaxHeartRate&&i.MinHeartRate&&(a[JD(e)]=i.MaxHeartRate-i.MinHeartRate),e=va(e,{days:1})}return a}))}),wT("AppleHealth",["HourlyMaximumHeartRate"])),gT(vT.AppleHealthHrv,(function(e,t){return iT({namespace:"AppleHealth",type:"HeartRateVariability",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(n){var r={};n.forEach((function(e){if(e.startDate){var t=ji(Ti(e.startDate)).substring(0,10),n=parseFloat(e.value);r[t]||(r[t]=[]),r[t].push(n)}}));for(var a={};e<t;){var i=e.toISOString().substr(0,10);r[i]&&(a[i]=r[i].reduce((function(e,t){return e+t}))/r[i].length),e=va(e,{days:1})}return a}))}),wT("AppleHealth",["HeartRateVariability"])),gT(vT.AppleHealthMaxHeartRate,(function(e,t){return iT({namespace:"AppleHealth",type:"HourlyMaximumHeartRate",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate){var n=ji(Ti(e.startDate)).substring(0,10),r=parseFloat(e.value);t[n]?r>t[n]&&(t[n]=r):t[n]=r}})),t}))}),wT("AppleHealth",["HourlyMaximumHeartRate"])),gT(vT.AppleHealthRestingHeartRate,(function(e,t){return iT({namespace:"AppleHealth",type:"RestingHeartRate",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(n){var r={};n.forEach((function(e){if(e.startDate){var t=JD(Ti(e.startDate)),n=parseFloat(e.value);r[t]||(r[t]=[]),r[t].push(n)}}));for(var a={};e<t;){var i=e.toISOString().substr(0,10);r[i]&&(a[i]=r[i].reduce((function(e,t){return e+t}))/r[i].length),e=va(e,{days:1})}return a}))}),wT("AppleHealth",["RestingHeartRate"])),gT(vT.AppleHealthSleepMinutes,(function(e,t){return sT(e,t,"Asleep")}),wT("AppleHealth",["SleepAnalysisInterval"])),gT(vT.AppleHealthInBedMinutes,(function(e,t){return sT(e,t,"InBed")}),wT("AppleHealth",["SleepAnalysisInterval"])),gT(vT.AppleHealthStandMinutes,(function(e,t){return iT({namespace:"AppleHealth",type:"AppleStandTime",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate){var n=JD(Ti(e.startDate));t[n]||(t[n]=0),t[n]+=parseFloat(e.value)}})),t}))}),wT("AppleHealth",["AppleStandTime"])),gT(vT.AppleHealthSteps,uT,wT("AppleHealth",["HourlySteps"])),gT(vT.AppleHealthWalkingHeartRateAverage,(function(e,t){return iT({namespace:"AppleHealth",type:"WalkingHeartRateAverage",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(n){var r={};n.forEach((function(e){if(e.startDate){var t=JD(Ti(e.startDate)),n=parseFloat(e.value);r[t]||(r[t]=[]),r[t].push(n)}}));for(var a={};e<t;){var i=e.toISOString().substr(0,10);r[i]&&(a[i]=r[i].reduce((function(e,t){return e+t}))/r[i].length),e=va(e,{days:1})}return a}))}),wT("AppleHealth",["WalkingHeartRateAverage"])),gT(vT.FitbitActiveMinutes,(function(e,t){return lT(e,t,["MinutesVeryActive","MinutesFairlyActive","MinutesLightlyActive"])}),wT("Fitbit",["MinutesVeryActive","MinutesFairlyActive","MinutesLightlyActive"])),gT(vT.FitbitLightlyActiveMinutes,(function(e,t){return lT(e,t,["MinutesLightlyActive"])}),wT("Fitbit",["MinutesLightlyActive"])),gT(vT.FitbitFairlyActiveMinutes,(function(e,t){return lT(e,t,["MinutesFairlyActive"])}),wT("Fitbit",["MinutesFairlyActive"])),gT(vT.FitbitVeryActiveMinutes,(function(e,t){return lT(e,t,["MinutesVeryActive"])}),wT("Fitbit",["MinutesVeryActive"])),gT(vT.FitbitBreathingRate,(function(e,t){return dT("BreathingRate",e,t)}),wT("Fitbit",["BreathingRate"])),gT(vT.FitbitCaloriesBurned,(function(e,t){return dT("Calories",e,t)}),wT("Fitbit",["Calories"])),gT(vT.FitbitElevatedHeartRateMinutes,(function(e,t){return fT(e,t)}),wT("Fitbit",["HeartRateZone"])),gT(vT.FitbitFatBurnHeartRateMinutes,(function(e,t){return fT(e,t,"Fat Burn")}),wT("Fitbit",["HeartRateZone"])),gT(vT.FitbitCardioHeartRateMinutes,(function(e,t){return fT(e,t,"Cardio")}),wT("Fitbit",["HeartRateZone"])),gT(vT.FitbitPeakHeartRateMinutes,(function(e,t){return fT(e,t,"Peak")}),wT("Fitbit",["HeartRateZone"])),gT(vT.FitbitFloors,(function(e,t){return dT("Floors",e,t)}),wT("Fitbit",["HeartRateZone"])),gT(vT.FitbitHrv,(function(e,t){return dT("Hrv",e,t)}),wT("Fitbit",["Floors"])),gT(vT.FitbitRestingHeartRate,pT,wT("Fitbit",["RestingHeartRate"])),gT(vT.FitbitSleepMinutes,(function(e,t){return hT(e,t,["SleepLevelRem","SleepLevelLight","SleepLevelDeep","SleepLevelAsleep"])}),wT("Fitbit",["SleepLevelRem","SleepLevelLight","SleepLevelDeep","SleepLevelAsleep"])),gT(vT.FitbitLightSleepMinutes,(function(e,t){return hT(e,t,["SleepLevelLight"])}),wT("Fitbit",["SleepLevelLight"])),gT(vT.FitbitRemSleepMinutes,(function(e,t){return hT(e,t,["SleepLevelRem"])}),wT("Fitbit",["SleepLevelRem"])),gT(vT.FitbitDeepSleepMinutes,(function(e,t){return hT(e,t,["SleepLevelDeep"])}),wT("Fitbit",["SleepLevelDeep"])),gT(vT.FitbitSpO2,(function(e,t){return dT("SpO2",e,t)}),wT("Fitbit",["SpO2"])),gT(vT.FitbitSteps,mT,wT("Fitbit",["Steps"])),gT(vT.GoogleFitSteps,(function(e,t){return iT({namespace:"GoogleFit",type:"Steps",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(e){var t={};return e.forEach((function(e){if(e.startDate){var n=ji(Ti(e.startDate)).substring(0,10);t[n]||(t[n]=0),t[n]+=parseFloat(e.value)}})),t}))}),wT("GoogleFit",["Steps"])),gT(vT.RestingHeartRate,(function(e,t){return iT({namespace:"AppleHealth",type:"RestingHeartRate",observedAfter:va(e,{days:-1}).toISOString(),observedBefore:va(t,{days:1}).toISOString()}).then((function(n){return pT(e,t).then((function(r){var a={};n.forEach((function(e){if(e.startDate){var t=JD(Ti(e.startDate)),n=parseFloat(e.value);a[t]||(a[t]=[]),a[t].push(n)}}));for(var i={};e<t;){var o=JD(e);r[o]&&(a[o]||(a[o]=[]),a[o].push(r[o])),a[o]&&(i[o]=a[o].reduce((function(e,t){return e+t}))/a[o].length),e=va(e,{days:1})}return i}))}))}),(function(e){return wT("AppleHealth",["RestingHeartRate"])(e).then((function(t){return t||wT("Fitbit",["RestingHeartRate"])(e)}))})),gT(vT.Steps,(function(e,t){var n=mT(e,t),r=uT(e,t);return Promise.all([n,r]).then((function(n){for(var r={};e<t;){var a=JD(e),i=null;n[0][a]&&(i=n[0][a]),n[1][a]&&(null==i||n[1][a]>i)&&(i=n[1][a]),i&&(r[a]=i),e=va(e,{days:1})}return r}))}),(function(e){return wT("AppleHealth",["Steps"])(e).then((function(t){return t||wT("Fitbit",["Steps"])(e)}))}));var ET=[{id:1,lastRefreshDate:va(new Date,{days:-1}).toISOString(),status:"fetchComplete",provider:{id:37,name:"Cedars-Sinai Health System",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/37/logo"}},{id:2,lastRefreshDate:va(new Date,{hours:-8}).toISOString(),status:"unauthorized",provider:{id:1,name:"CareEvolution FHIR",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/1/logo"}}];function AT(e){var n=a(!0),r=n[0],o=n[1],c=a([]),s=c[0],u=c[1];function l(){if("Default"==e.previewState)return o(!1),void d(ET);f()}function f(){v.getExternalAccounts().then((function(t){e.externalAccountProviderCategories&&(t=t.filter((function(t){var n;return-1!=(null===(n=e.externalAccountProviderCategories)||void 0===n?void 0:n.indexOf(t.provider.category))}))),d(t),o(!1)}))}function d(t){u(t),e.onExternalAccountsLoaded&&e.onExternalAccountsLoaded(t)}return i((function(){return l(),v.on("applicationDidBecomeVisible",l),v.on("externalAccountSyncComplete",l),function(){v.off("applicationDidBecomeVisible",l),v.off("externalAccountSyncComplete",l)}}),[]),t.createElement("div",{className:"mdhui-external-account-list"},s&&s.map((function(e){return t.createElement(ao,{key:e.id.toString()+e.lastRefreshDate},t.createElement(xo,{externalAccount:e,onAccountRemoved:function(e){return o(!0),void f()},onReconnectAccount:function(e){return function(e){v.connectExternalAccount(e.provider.id)}(e)}}))})),r&&t.createElement(po,null))}Qr(".mdhui-external-accounts-preview\n{\n}\n\n .mdhui-external-accounts-preview .external-account-title\n {\n font-size:.88em;\n }");var MT=[{id:1,lastRefreshDate:va(new Date,{days:-1}).toISOString(),provider:{id:37,name:"Cedars-Sinai Health System",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/37/logo"},status:"fetchComplete"},{id:2,lastRefreshDate:va(new Date,{days:-4}).toISOString(),provider:{id:20,name:"Anthem",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/37/logo"},status:"fetchComplete"}];function _T(e){var n=a(null),r=n[0],o=n[1];function c(){"Default"!=e.previewState?v.getExternalAccounts().then((function(t){e.excludeDeviceManufacturers&&(t=t.filter((function(e){return"Device Manufacturer"!=e.provider.category}))),o(t)})):o(MT)}if(i((function(){return c(),v.on("applicationDidBecomeVisible",c),function(){v.off("applicationDidBecomeVisible",c)}}),[]),!r||!r.length)return null;var s=e.excludeDeviceManufacturers?"external-accounts-title-without-devices":"external-accounts-title";return t.createElement("div",{className:"mdhui-external-accounts-preview"},t.createElement(ea,{title:vo[s],onClick:function(){"preview"==e.applicationUrl?console.log("PREVIEW: Opening the external accounts application."):v.openApplication(e.applicationUrl)}},r.map((function(e){return t.createElement("div",{key:e.id,className:"external-account-title"},e.provider.name)}))))}function jT(){return jT=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},jT.apply(this,arguments)}function PT(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}Qr(".mdhui-fitbit-devices\n{\n}\n\n .mdhui-fitbit-devices .fitbit-device\n {\n border-bottom: solid 1px var(--color-border);\n padding: 16px;\n position: relative;\n padding-left: 48px;\n }\n\n .mdhui-fitbit-devices .fitbit-device:last-child\n {\n border-bottom: none;\n }\n\n .mdhui-fitbit-devices .fitbit-device .device-icon\n {\n position: absolute;\n left: 16px;\n top: calc(50% - 8px);\n color: var(--color-muted2);\n font-size: 16px;\n }\n\n .mdhui-fitbit-devices .fitbit-device .device-title\n {\n font-weight: bold;\n font-size: .88em;\n }\n\n .mdhui-fitbit-devices .fitbit-device .device-sync\n {\n font-size: .88em;\n color: var(--color-muted);\n }\n\n\n .mdhui-fitbit-devices .fitbit-device .battery-icon\n {\n position: absolute;\n font-size: 21px;\n right: 16px;\n top: calc(50% - 11px);\n }\n\n .mdhui-fitbit-devices .fitbit-device .battery-icon.battery-empty,\n .mdhui-fitbit-devices .fitbit-device .battery-icon.battery-low\n {\n color: var(--color-danger);\n }\n\n .mdhui-fitbit-devices .fitbit-device .battery-icon.battery-medium\n {\n color: var(--color-warning);\n }\n\n .mdhui-fitbit-devices .fitbit-device .battery-icon.battery-high\n {\n color: var(--color-success);\n }\n");var CT=f((function(e,n){var r=e.color,a=void 0===r?"currentColor":r,i=e.size,o=void 0===i?24:i,c=PT(e,["color","size"]);return t.createElement("svg",jT({ref:n,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:a,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},c),t.createElement("circle",{cx:"12",cy:"12",r:"7"}),t.createElement("polyline",{points:"12 9 12 12 13.5 13.5"}),t.createElement("path",{d:"M16.51 17.35l-.35 3.83a2 2 0 0 1-2 1.82H9.83a2 2 0 0 1-2-1.82l-.35-3.83m.01-10.7l.35-3.83A2 2 0 0 1 9.83 1h4.35a2 2 0 0 1 2 1.82l.35 3.83"}))}));CT.propTypes={color:yr.string,size:yr.oneOfType([yr.string,yr.number])},CT.displayName="Watch";var DT=CT,TT=[{id:"1109644c-dea3-ec11-aaab-f47bb6835a10",namespace:"Fitbit",insertedDate:"2022-03-14T21:32:51.413Z",modifiedDate:"2022-03-14T21:32:51.413Z",identifier:"806637943",type:"Device",value:"Charge 3",properties:{Battery:"High",Type:"TRACKER",DataLakeUrl:"https://pep-device-data-qa.s3.amazonaws.com/fitbit-devices/d9134fe6-a777-ec11-aaa8-89aad5fbf200/devices.json"},observationDate:"2022-03-14T17:31:24+00:00"},{id:"1009644c-dea3-ec11-aaab-f47bb6835a10",namespace:"Fitbit",insertedDate:"2022-03-14T21:32:51.397Z",modifiedDate:"2022-03-14T21:32:51.397Z",identifier:"F-31-A4C138BBAE04",type:"Device",value:"Aria Air",properties:{Battery:"Low",Type:"SCALE",DataLakeUrl:"https://pep-device-data-qa.s3.amazonaws.com/fitbit-devices/d9134fe6-a777-ec11-aaa8-89aad5fbf200/devices.json"},observationDate:"2022-01-12T18:34:23+00:00"}];function NT(e){var n=a([]),r=n[0],o=n[1];function c(){if("connected"!=e.previewState)if("notEnabled"!=e.previewState&&"notConnected"!=e.previewState){v.queryDeviceData({namespace:"Fitbit",type:"Device"}).then((function(e){o(e.deviceDataPoints)}))}else o([]);else o(TT)}if(i((function(){return c(),v.on("applicationDidBecomeVisible",c),v.on("externalAccountSyncComplete",c),function(){v.off("applicationDidBecomeVisible",c),v.off("externalAccountSyncComplete",c)}}),[]),!r.length)return null;var s="es"==v.getCurrentLanguage()?no:gi;return t.createElement("div",{className:"mdhui-fitbit-devices"},t.createElement(io,{title:"Fitbit "+vo.devices}),r.map((function(e){var n,r,a,i,o,c;return t.createElement("div",{key:e.id.toString(),className:"fitbit-device"},"TRACKER"==(null===(n=e.properties)||void 0===n?void 0:n.Type)&&t.createElement("div",{className:"device-icon"},t.createElement(DT,{size:"16"})),"SCALE"==(null===(r=e.properties)||void 0===r?void 0:r.Type)&&t.createElement("div",{className:"device-icon"},t.createElement(Dr,{icon:Rr})),t.createElement("div",{className:"device-info"},t.createElement("div",{className:"device-title"},e.value),e.observationDate&&t.createElement("div",{className:"device-sync"},vo["last-sync"]," ",Pi(Ti(e.observationDate),new Date,{locale:s}))),"Empty"==(null===(a=e.properties)||void 0===a?void 0:a.Battery)&&t.createElement("div",{className:"battery-icon battery-empty"},t.createElement(Dr,{icon:Wr,transform:{rotate:-90}})),"Low"==(null===(i=e.properties)||void 0===i?void 0:i.Battery)&&t.createElement("div",{className:"battery-icon battery-low"},t.createElement(Dr,{icon:Zr,transform:{rotate:-90}})),"Medium"==(null===(o=e.properties)||void 0===o?void 0:o.Battery)&&t.createElement("div",{className:"battery-icon battery-medium"},t.createElement(Dr,{icon:Vr,transform:{rotate:-90}})),"High"==(null===(c=e.properties)||void 0===c?void 0:c.Battery)&&t.createElement("div",{className:"battery-icon battery-high"},t.createElement(Dr,{icon:Yr,transform:{rotate:-90}})))})))}function IT(e){var n=a(!1),r=n[0],i=n[1],o=new Date,c=a(new Date(o.getFullYear(),o.getMonth(),1,0,0,0,0)),s=c[0],u=c[1];function l(){i(!0)}var f=s.getMonth(),d=s.getFullYear();return t.createElement("div",{style:{display:r?"block":"none"}},t.createElement(oo,{intervalType:"Month",intervalStart:s,onIntervalChange:function(e){u(e)}}),t.createElement(ST,{onDataDetected:function(){return l()},previewState:"connected"==e.previewState?"WithData":"notEnabled"==e.previewState||"notConnected"==e.previewState?"NoData":void 0,lines:[{showAverage:!0,dailyDataType:vT.FitbitSteps,label:vo.steps}],title:vo.steps,syncId:"fitbit",month:f,year:d}),t.createElement(ST,{onDataDetected:function(){return l()},previewState:"connected"==e.previewState?"WithData":"notEnabled"==e.previewState||"notConnected"==e.previewState?"NoData":void 0,lines:[{showAverage:!0,dailyDataType:vT.FitbitRestingHeartRate,label:vo["resting-heart-rate"]}],title:vo["resting-heart-rate"],month:f,year:d,syncId:"DeviceDataCharts"}))}Qr(".mdhui-most-recent-notification\n{\n}\n\n .mdhui-most-recent-notification .mdhui-notification\n {\n border-bottom: solid 1px var(--color-border);\n }\n\n .mdhui-most-recent-notification .mdhui-action .subtitle\n {\n color: var(--color-primary);\n }\n");var RT={id:"1",identifier:"SurveyReminder",sentDate:"2022-03-10T13:37:41.16+00:00",statusCode:"Succeeded",type:"Push",content:{title:"Please Complete Your Surveys",body:"Your latest surveys are due"},recipients:[],contentVersion:0};function FT(e){var n=a(null),r=n[0],o=n[1];function c(){if("Default"!=e.previewState){var t={limit:1,statusCode:"Succeeded"};if(e.hideAfterHours){var n=va(new Date,{hours:-1*e.hideAfterHours});t.sentAfter=n.toISOString()}e.notificationType&&(t.type=e.notificationType),v.queryNotifications(t).then((function(e){e.notifications.length&&o(e.notifications[0])}))}else o(RT)}return i((function(){return c(),v.on("applicationDidBecomeVisible",c),function(){v.off("applicationDidBecomeVisible",c)}}),[]),r?t.createElement("div",{className:"mdhui-most-recent-notification"},t.createElement(wo,{notification:r}),e.onViewMore&&t.createElement(ea,{subtitle:vo["all-notifications"],onClick:e.onViewMore})):null}var zT=[{id:"1",identifier:"SurveyReminder",sentDate:(new Date).toISOString(),statusCode:"Succeeded",type:"Push",content:{body:"Thank you for completing your surveys!"},recipients:[],contentVersion:1},{id:"2",identifier:"SurveyReminder",sentDate:va(new Date,{hours:-1}).toISOString(),statusCode:"Succeeded",type:"Push",content:{title:"Please Complete Your Surveys",body:"Your latest surveys are due"},recipients:[],contentVersion:1},{id:"4",identifier:"SurveyReminder",sentDate:va(new Date,{days:-1}).toISOString(),statusCode:"Succeeded",type:"Push",content:{title:"Have you received your Fitbit? Connect it!"},recipients:[],contentVersion:1},{id:"5",identifier:"SurveyReminder",sentDate:va(new Date,{days:-2}).toISOString(),statusCode:"Succeeded",type:"Push",content:{title:"Consent and get a Fitbit",body:"Are you missing out on a Fitbit device? Complete your consent - you could get a new Fitbit at no cost to you!"},recipients:[],contentVersion:1}];function LT(e,t){var r=n();i((function(){r.current=e}),[e]),i((function(){if(null!==t){var e=setInterval((function(){r.current&&r.current()}),t);return function(){return clearInterval(e)}}}),[t])}function HT(e){var r=n(null);return LT((function(){var t,n,a;!r.current||(t=r.current,n=t.getBoundingClientRect(),a=Math.max(document.documentElement.clientHeight,window.innerHeight),n.bottom<0||n.top-a>=0)||e.onTrigger()}),e.enabled?1e3:null),t.createElement("div",null,e.enabled&&t.createElement("div",{style:{height:"0px"},ref:r}))}function BT(e){var n=a(!1),r=n[0],o=n[1],c=a(void 0),s=c[0],u=c[1],l=a(!1),f=l[0],d=l[1],p=a([]),h=p[0],m=p[1];function y(){if("Default"==e.previewState&&m(zT),e.previewState)return o(!1),void d(!0);if(!r&&!f){o(!0);var t={statusCode:"Succeeded",limit:10};e.notificationType&&(t.type=e.notificationType),s&&(t.pageID=s),v.queryNotifications(t).then((function(e){m(h.concat(e.notifications)),o(!1),e.nextPageID||d(!0),u(e.nextPageID)}))}}return i((function(){y();var e=function(){m([]),u(void 0),d(!1),y()};return v.on("applicationDidBecomeVisible",e),function(){v.off("applicationDidBecomeVisible",e)}}),[]),t.createElement("div",{className:"mdhui-notification-list"},h&&h.map((function(e){return t.createElement(ao,{key:e.id.toString()},t.createElement(wo,{notification:e}))})),r&&!f&&t.createElement(po,null),!r&&f&&0==h.length&&t.createElement(ao,null,t.createElement(Mo,null,vo["no-notifications-received"])),t.createElement(HT,{onTrigger:y,enabled:!r&&!f}))}function UT(e){var n=a(""),r=n[0],o=n[1];return i((function(){v.getDeviceInfo().then((function(e){e&&o(e.platform)}))}),[]),-1==e.platforms.indexOf(r)?null:t.createElement("div",null,e.children)}function VT(e){var n=a(!0),r=n[0],o=n[1],c=a(null),s=c[0],u=c[1];function l(){if("Default"==e.previewState)return u({name:"My Project Name",organization:{name:"My Organization Name",color:"#0076BE",logoUrl:"https://rkstudio.careevolution.com/inv/api/researchkit/organizationbrandingimage/1e1853a2-50d3-4e26-863d-d8546bce63e3"}}),void o(!1);v.getProjectInfo().then((function(e){u(e),o(!1)}))}i((function(){return l(),v.on("applicationDidBecomeVisible",l),function(){v.off("applicationDidBecomeVisible",l)}}),[]);var f=null==s?void 0:s.organization.logoUrl;return f&&!(null==f?void 0:f.startsWith("http"))&&(f=v.baseUrl+(null==s?void 0:s.organization.logoUrl)),t.createElement("div",{className:"mdhui-project-header"},r&&t.createElement(po,null),!r&&s&&t.createElement("div",null,t.createElement("div",{style:{backgroundImage:"url('"+f+"')"},className:"logo"}),t.createElement("div",{className:"project-info"},t.createElement("div",{className:"project-name",style:{color:s.organization.color}},s.name),t.createElement("div",{className:"organization-name"},s.organization.name))))}Qr(".mdhui-project-header\n{\n padding: 16px;\n text-align: center;\n background: #FFF;\n border-bottom: solid 1px #ddd;\n}\n\n .mdhui-project-header .logo\n {\n display: inline-block;\n width: 48px;\n height: 48px;\n background-size: contain;\n background-position: center center;\n background-repeat: no-repeat;\n vertical-align: middle;\n }\n\n .mdhui-project-header .project-info\n {\n display: inline-block;\n text-align: left;\n padding-left: 16px;\n vertical-align: top;\n padding-right: 16px;\n max-width: calc(100% - 80px);\n }\n\n .mdhui-project-header .project-info .project-name\n {\n font-weight: bold;\n font-size: 1.5em;\n max-width: 100%;\n }\n\n .mdhui-project-header .project-info .organization-name\n {\n max-width: 100%;\n }\n");function WT(e){var n=a(!0),r=n[0],o=n[1],c=a(null),s=c[0],u=c[1];function l(){if("Default"==e.previewState)return u({supportEmail:"test@example.com",supportPhone:"555-555-1212",learnMoreLink:"https://mydatahelps.org",learnMoreTitle:"Project Home Page"}),void o(!1);v.getProjectInfo().then((function(e){u(e),o(!1)}))}return i((function(){return l(),v.on("applicationDidBecomeVisible",l),function(){v.off("applicationDidBecomeVisible",l)}}),[]),!s||s.supportEmail||s.supportPhone||s.learnMoreLink&&s.learnMoreTitle?t.createElement("div",{className:"mdhui-project-support"},t.createElement("div",{className:"title"},vo.support),r&&t.createElement(po,null),(null==s?void 0:s.learnMoreLink)&&(null==s?void 0:s.learnMoreTitle)&&t.createElement(ea,{indicatorIcon:Nr,subtitle:s.learnMoreTitle,onClick:function(){return v.openEmbeddedUrl(s.learnMoreLink)}}),(null==s?void 0:s.supportEmail)&&t.createElement(ea,{indicatorIcon:Ur,subtitle:s.supportEmail,onClick:function(){return v.openExternalUrl("mailto:"+s.supportEmail)}}),(null==s?void 0:s.supportPhone)&&t.createElement(ea,{indicatorIcon:Hr,subtitle:s.supportPhone,onClick:function(){return v.openExternalUrl("tel:"+s.supportPhone)}})):null}Qr(".mdhui-project-support\n{\n}\n\n .mdhui-project-support > .title\n {\n font-weight: bold;\n padding: 16px;\n padding-bottom: 0;\n }\n\n .mdhui-project-support .mdhui-action\n {\n color: var(--color-primary);\n border-bottom: solid 1px var(--color-border);\n }\n\n .mdhui-project-support .mdhui-action .subtitle\n {\n color: var(--color-primary);\n }\n");Qr(".mdhui-provider-search\n{\n}\n\n .mdhui-provider-search .title\n {\n font-weight: bold;\n padding: 16px;\n }\n\n .mdhui-provider-search .search-bar-wrapper\n {\n text-align: left;\n box-sizing: border-box;\n font-weight: bold;\n border-bottom: solid 1px #ddd;\n }\n\n .mdhui-provider-search .search-bar-wrapper .search-bar\n {\n position: relative;\n }\n\n .mdhui-provider-search .search-bar-wrapper .search-bar input\n {\n padding: 0;\n margin: 0;\n border: 0;\n width: 100%;\n line-height: 1.5em;\n padding-left: 40px;\n box-sizing: border-box;\n font-size: .88em;\n padding-top: 8px;\n padding-bottom: 8px;\n border: none;\n }\n\n .mdhui-provider-search .search-bar-wrapper .search-bar .fa-magnifying-glass\n {\n position: absolute;\n left: 16px;\n top: 12px;\n color: #bbb;\n font-size: .8em;\n }\n\n .mdhui-provider-search .search-results .provider\n {\n border-bottom: solid 1px #ddd;\n padding: 16px;\n position: relative;\n padding-right: 96px;\n cursor: pointer;\n font-size: .88em;\n line-height: 1.25em;\n }\n\n .mdhui-provider-search .search-results .provider .provider-logo\n {\n height: 37px;\n width: 64px;\n position: absolute;\n right: 16px;\n top: 8px;\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center center;\n }\n\n .mdhui-provider-search .search-results .provider .provider-info\n {\n }\n\n .mdhui-provider-search .search-results .provider .provider-status\n {\n font-size: .88em;\n font-weight: bold;\n }\n\n .mdhui-provider-search .search-results .provider .provider-status.error-status\n {\n color: #c4291c;\n }\n\n .mdhui-provider-search .search-results .provider .provider-status.connected-status\n {\n color: #5db37e;\n }\n");var $T=[{id:20,name:"1upHealth sandbox",category:"Health Plan",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/20/logo"},{id:13,name:"A Woman's Place, LLC",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/13/logo"},{id:130,name:"Abington Jefferson Health",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/130/logo"},{id:41,name:"Access Community Health Network",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/41/logo"},{id:125,name:"Aurora Health Care - myAurora",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/125/logo"},{id:1,name:"CareEvolution FHIR",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/1/logo"},{id:37,name:"Cedars-Sinai Health System",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/37/logo"},{id:27,name:"Maui Medical Group",category:"Provider",logoUrl:"https://mdhorg.ce.dev/api/v1/delegated/externalaccountproviders/27/logo"}],YT=0;function qT(e){var r=a({}),o=r[0],c=r[1],s=a([]),u=s[0],l=s[1],f=a(!0),d=f[0],p=f[1],h=a(""),y=h[0],g=h[1],b=a(0),x=b[0],w=b[1],k=a(0),S=k[0],O=k[1],E=n(y);function A(){return rT(this,void 0,void 0,(function(){return aT(this,(function(e){return v.getExternalAccounts().then((function(e){for(var t={},n=0;n<e.length;n++)t[e[n].provider.id]=e[n];c(t)})),[2]}))}))}function M(t){p(!0);var n=++YT;v.getExternalAccountProviders(t,null,100,x).then((function(t){if(n==YT){var r=u.concat(t.externalAccountProviders.filter((function(t){var n;return-1!=(null===(n=e.providerCategories)||void 0===n?void 0:n.indexOf(t.category))})));l(r),O(t.totalExternalAccountProviders),p(!1)}}))}var _=m((function(){return e=M,void 0===(t=300)&&(t=300),function(){for(var r=this,a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];clearTimeout(n),n=setTimeout((function(){return e.apply(r,a)}),t)};var e,t,n}),[]);function j(t){var n;n=t.target.value,E.current=n,g(n),l([]),w(0),e.previewState||_(t.target.value)}function P(){A().then((function(){M(E.current)}))}return i((function(){return function(){if("Default"==e.previewState)return l($T),void p(!1);A().then((function(){M("")}))}(),v.on("applicationDidBecomeVisible",P),function(){v.off("applicationDidBecomeVisible",P)}}),[]),i((function(){d||M(E.current)}),[x]),t.createElement("div",{className:"mdhui-provider-search"},t.createElement("div",{className:"search-bar-wrapper"},t.createElement("div",{className:"search-bar"},t.createElement("input",{type:"text",value:y,onChange:function(e){return j(e)},placeholder:vo.search,spellCheck:"false",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"}),t.createElement(Dr,{icon:$r}))),t.createElement("div",{className:"search-results"},u&&u.map((function(e){return t.createElement("div",{key:e.id,className:"provider",onClick:function(){return t=e.id,void(o[t]&&"unauthorized"!=o[t].status||v.connectExternalAccount(t));var t}},e.logoUrl&&t.createElement("div",{className:"provider-logo",style:{backgroundImage:"url('"+e.logoUrl+"')"}}),t.createElement("div",{className:"provider-info"},t.createElement("div",{className:"provider-name"},e.name),o[e.id]&&"unauthorized"==o[e.id].status&&t.createElement("div",{className:"provider-status error-status"},vo.reconnect),o[e.id]&&"unauthorized"!=o[e.id].status&&t.createElement("div",{className:"provider-status connected-status"},vo.connected)))})),d&&t.createElement(po,null)),t.createElement(HT,{onTrigger:function(){w(x+1)},enabled:100*(x+1)<S}))}Qr(".mdhui-survey-task-list\n{\n}\n\n .mdhui-survey-task-list .mdhui-single-survey-task\n {\n border-bottom: solid 1px #eee;\n }\n\n .mdhui-survey-task-list .mdhui-single-survey-task:last-child\n {\n border: none;\n }\n\n .mdhui-survey-task-list .title\n {\n font-weight: bold;\n padding: 16px;\n padding-bottom: 0;\n }\n\n .mdhui-survey-task-list .empty-message\n {\n padding: 16px;\n font-size: .88em;\n }\n");var GT=[{id:"ecf8a7df-caa3-ec11-aaab-f47bb6835a10",surveyID:"53ad3e98-9777-ec11-aaa8-89aad5fbf200",surveyName:"Mood Survey",surveyDisplayName:"Mood Survey",surveyDescription:"3 minutes",status:"incomplete",hasSavedProgress:!1,dueDate:va(new Date,{days:-1}).toISOString(),insertedDate:"2022-03-14T19:13:48.283Z",modifiedDate:"2022-03-14T19:13:48.283Z",linkIdentifier:"1"},{id:"e7f8a7df-caa3-ec11-aaab-f47bb6835a10",surveyID:"53ad3e98-9777-ec11-aaa8-89aad5fbf200",surveyName:"Pregnancy (Followup)",surveyDisplayName:"Pregnancy: Followup",surveyDescription:"3 minutes",status:"incomplete",hasSavedProgress:!1,dueDate:va(new Date,{days:0}).toISOString(),insertedDate:"2022-03-14T19:13:48.283Z",modifiedDate:"2022-03-14T19:13:48.283Z",linkIdentifier:"1"},{id:"b1c9bcd2-80a4-ec11-aaab-f47bb6835a10",surveyID:"cd452353-7674-ec11-aaa8-89aad5fbf200",surveyName:"Alcohol and Tobacco",surveyDisplayName:"Alcohol and Tobacco",surveyDescription:"5 minutes",status:"incomplete",hasSavedProgress:!1,dueDate:va(new Date,{days:1}).toISOString(),insertedDate:"2022-03-15T16:56:15.007Z",modifiedDate:"2022-03-15T16:56:15.007Z",linkIdentifier:"1"},{id:"2c9ab4d9-80a4-ec11-aaab-f47bb6835a10",surveyID:"a7f58ba8-9777-ec11-aaa8-89aad5fbf200",surveyName:"SDOH: Followup",surveyDisplayName:"Social Determinants of Health: Followup",surveyDescription:"5 minutes",status:"incomplete",hasSavedProgress:!1,dueDate:va(new Date,{days:10}).toISOString(),insertedDate:"2022-03-15T16:56:26.703Z",modifiedDate:"2022-03-15T16:56:26.703Z",linkIdentifier:"1"}],XT=[{id:"2c9ab4d9-80a4-ec11-aaab-f47bb6835a10",surveyID:"a7f58ba8-9777-ec11-aaa8-89aad5fbf200",surveyName:"SDOH: Followup",surveyDisplayName:"Social Determinants of Health: Followup",surveyDescription:"5 minutes",status:"complete",endDate:(new Date).toISOString(),hasSavedProgress:!1,dueDate:va(new Date,{days:10}).toISOString(),insertedDate:"2022-03-15T16:56:26.703Z",modifiedDate:"2022-03-15T16:56:26.703Z",linkIdentifier:"1"},{id:"b1c9bcd2-80a4-ec11-aaab-f47bb6835a10",surveyID:"cd452353-7674-ec11-aaa8-89aad5fbf200",surveyName:"Alcohol and Tobacco",surveyDisplayName:"Alcohol and Tobacco",surveyDescription:"5 minutes",status:"complete",hasSavedProgress:!1,endDate:va(new Date,{days:-1}).toISOString(),dueDate:va(new Date,{days:10}).toISOString(),insertedDate:"2022-03-15T16:56:15.007Z",modifiedDate:"2022-03-15T16:56:15.007Z",linkIdentifier:"1"},{id:"e7f8a7df-caa3-ec11-aaab-f47bb6835a10",surveyID:"53ad3e98-9777-ec11-aaa8-89aad5fbf200",surveyName:"Pregnancy (Followup)",surveyDisplayName:"Pregnancy: Followup",surveyDescription:"3 minutes",status:"complete",hasSavedProgress:!1,endDate:va(new Date,{days:-2}).toISOString(),dueDate:va(new Date,{days:10}).toISOString(),insertedDate:"2022-03-14T19:13:48.283Z",modifiedDate:"2022-03-14T19:13:48.283Z",linkIdentifier:"1"}];function ZT(e){var n,r=a(!0),o=r[0],c=r[1],s=a(null),u=s[0],l=s[1];function f(){if("IncompleteTasks"!=e.previewState)if("CompleteTasks"!=e.previewState){var t,n;t=[],n=function(r){var a={status:e.status};return r&&(a.pageID=r),v.querySurveyTasks(a).then((function(r){t=t.concat(r.surveyTasks),r.nextPageID?n(r.nextPageID):("incomplete"==e.status&&t.sort((function(e,t){return Ti(e.dueDate)>Ti(t.dueDate)?1:Ti(e.dueDate)<Ti(t.dueDate)?-1:0})),"complete"==e.status&&t.sort((function(e,t){return e.endDate&&t.endDate?Ti(e.endDate)>Ti(t.endDate)?-1:Ti(e.endDate)<Ti(t.endDate)?1:0:0})),l(t),c(!1))}))},n(null)}else l(XT);else l(GT)}return i((function(){return f(),v.on("applicationDidBecomeVisible",f),function(){v.off("applicationDidBecomeVisible",f)}}),[]),"complete"!=e.status||(null==u?void 0:u.length)?t.createElement("div",{className:"mdhui-survey-task-list"},e.title&&t.createElement(io,{title:e.title,detailLinkText:e.onDetailLinkClick?vo["view-all"]+" ("+(null!==(n=null==u?void 0:u.length)&&void 0!==n?n:0)+")":void 0,onDetailClick:e.onDetailLinkClick}),o&&!u&&t.createElement(po,null),!(null==u?void 0:u.length)&&!o&&t.createElement("div",{className:"empty-message"},vo["all-tasks-complete"]),null==u?void 0:u.slice(0,e.limit).map((function(n){return t.createElement(So,{key:n.id.toString(),task:n,disableClick:o,hideDueDate:e.hideDueDate})}))):null}function KT(e){return t.createElement(fo,null,e.presentation&&t.createElement(yo,{title:vo["connect-ehr-title"],showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),!e.presentation&&t.createElement(Ao,{color:"var(--main-bg-color)"}),t.createElement(Mo,null,vo["ehr-intro"]),t.createElement(ao,null,t.createElement(_T,{previewState:e.preview?"Default":void 0,applicationUrl:e.externalAccountsApplicationUrl,excludeDeviceManufacturers:!0})),t.createElement(ao,null,t.createElement(qT,{previewState:e.preview?"Default":void 0,providerCategories:["Provider","Health Plan"]})))}function JT(e){return t.createElement(fo,null,t.createElement(Ao,{color:"var(--main-bg-color)"}),t.createElement(UT,{platforms:["Android"]},t.createElement(ao,null,t.createElement(ea,{title:"Google Fit",subtitle:vo["google-fit-share"],onClick:function(){return v.showGoogleFitSettings()}}))),t.createElement(ao,null,t.createElement(Do,{previewState:e.preview?"notConnected":void 0})),t.createElement(ao,null,t.createElement(NT,{previewState:e.preview?"connected":void 0})),t.createElement(ao,{allowOverflow:!0},t.createElement(OT,{previewState:e.preview?"Default":void 0})))}function QT(e){var n=e.excludeDeviceManufacturers?"external-accounts-title-without-devices":"external-accounts-title";return t.createElement(fo,null,e.presentation&&t.createElement(yo,{title:vo[n],showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),!e.presentation&&t.createElement(Ao,{color:"var(--main-bg-color)"}),t.createElement(AT,{previewState:e.preview?"Default":void 0,externalAccountProviderCategories:["Provider","Health Plan"],onExternalAccountsLoaded:function(t){0===t.length&&("Modal"===e.presentation?v.dismiss():v.back())}}))}function eN(e){return t.createElement(fo,null,t.createElement(Ao,{color:"var(--main-bg-color)"}),t.createElement(ao,null,t.createElement(Do,{previewState:e.connectPreview,disabledBehavior:"displayError"})),t.createElement(ao,null,t.createElement(NT,{previewState:e.devicesPreview})),t.createElement(ao,{allowOverflow:!0},t.createElement(IT,{previewState:e.chartsPreview})))}function tN(e){var n="Push";e.notificationType&&(n=e.notificationType);return t.createElement(fo,null,t.createElement(Ao,null),t.createElement(VT,{previewState:e.preview?"Default":void 0}),t.createElement(ao,null,t.createElement(FT,{notificationType:n,onViewMore:e.notificationsViewUrl?function(){e.notificationsViewUrl&&v.openApplication(e.notificationsViewUrl)}:void 0,previewState:e.preview?"Default":void 0,hideAfterHours:e.notificationHideAfterHours})),t.createElement(ao,null,t.createElement(ZT,{status:"incomplete",limit:3,title:vo.tasks,onDetailLinkClick:e.tasksViewUrl?function(){e.tasksViewUrl&&v.openApplication(e.tasksViewUrl)}:void 0,hideDueDate:e.hideTaskDueDate,previewState:e.preview?"IncompleteTasks":void 0})),t.createElement(ao,null,t.createElement(Do,{title:"Fitbit",previewState:e.preview?"notConnected":void 0})),t.createElement(ao,null,e.ehrConnectApplicationUrl&&t.createElement(Co,{previewState:e.preview?"enabled":void 0,applicationUrl:e.ehrConnectApplicationUrl})),t.createElement(ao,null,t.createElement(WT,{previewState:e.preview?"Default":void 0})))}function nN(e){var n="Push";return e.notificationType&&(n=e.notificationType),t.createElement(fo,null,e.presentation&&t.createElement(yo,{title:vo.notifications,showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),!e.presentation&&t.createElement(Ao,{color:"var(--main-bg-color)"}),t.createElement(BT,{notificationType:n,previewState:e.preview?"Default":void 0}))}function rN(e){return t.createElement(fo,null,e.presentation&&t.createElement(yo,{title:vo.tasks,showBackButton:"Push"==e.presentation,showCloseButton:"Modal"==e.presentation}),!e.presentation&&t.createElement(Ao,{color:"var(--main-bg-color)"}),!e.hideIncompleteTasks&&t.createElement(ao,null,t.createElement(ZT,{title:vo["incomplete-tasks"],status:"incomplete",hideDueDate:e.hideDueDate,previewState:e.preview?"IncompleteTasks":void 0})),!e.hideCompleteTasks&&t.createElement(ao,null,t.createElement(ZT,{title:vo["completed-tasks"],status:"complete",hideDueDate:e.hideDueDate,previewState:e.preview?"CompleteTasks":void 0})))}export{ea as Action,ta as ActivityMeter,na as Button,ro as Calendar,ao as Card,io as CardTitle,Co as ConnectEhr,KT as ConnectEhrView,Do as ConnectFitbit,vT as DailyDataType,oo as DateRangeNavigator,co as DayTrackerSymbol,ST as DeviceDataMonthChart,OT as DeviceDataMonthCharts,JT as DeviceDataView,AT as ExternalAccountList,_T as ExternalAccountsPreview,QT as ExternalAccountsView,so as Face,NT as FitbitDevices,IT as FitbitMonthCharts,eN as FitbitView,lo as Histogram,tN as HomeView,fo as Layout,po as LoadingIndicator,FT as MostRecentNotification,yo as NavigationBar,BT as NotificationList,nN as NotificationsView,UT as PlatformSpecificContent,VT as ProjectHeader,WT as ProjectSupport,qT as ProviderSearch,qT as RestingHeartRateCalendar,go as Section,bo as SegmentedControl,uo as ShinyOverlay,xo as SingleExternalAccount,wo as SingleNotification,So as SingleSurveyTask,Oo as SparkBarChart,Ao as StatusBarBackground,ZT as SurveyTaskList,rN as SurveyTasksView,Eo as Switch,Mo as TextBlock,_o as TrackerItem,jo as WeekCalendar,bT as checkDailyDataAvailability,xT as queryDailyData,gT as registerDailyDataProvider,LT as useInterval};
200
200
  //# sourceMappingURL=index.js.map