UNPKG

arbor-dashboard

Version:
2 lines 414 kB
/*! For license information please see lineChart.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.lineChart=t(require("react")):e.lineChart=t(e.react)}(self,(e=>(()=>{var t={3296:(e,t,n)=>{"use strict";n.d(t,{Y5:()=>b,ZY:()=>_,xA:()=>x,xu:()=>w});var r=n(9155),i=n(1644),a=n(2555),o=n(2560),l=n(6906),s=n(5485),u=n(4848);function c(){return c=Object.assign?Object.assign.bind():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},c.apply(this,arguments)}var f=function(e){var t,n=e.axis,r=e.scale,a=e.ticksPosition,o=e.tickValues,l=e.tickSize,u=e.tickPadding,f=e.tickRotation,d=e.truncateTickAt,h=e.engine,p=void 0===h?"svg":h,g=(0,s.fS)(r,o),m=i.ni[p],b="bandwidth"in r?(0,s.ok)(r):r,v={lineX:0,lineY:0},y={textX:0,textY:0},x="object"==typeof document&&"rtl"===document.dir,_=m.align.center,w=m.baseline.center;return"x"===n?(t=function(e){var t;return{x:null!=(t=b(e))?t:0,y:0}},v.lineY=l*("after"===a?1:-1),y.textY=(l+u)*("after"===a?1:-1),w="after"===a?m.baseline.top:m.baseline.bottom,0===f?_=m.align.center:"after"===a&&f<0||"before"===a&&f>0?(_=m.align[x?"left":"right"],w=m.baseline.center):("after"===a&&f>0||"before"===a&&f<0)&&(_=m.align[x?"right":"left"],w=m.baseline.center)):(t=function(e){var t;return{x:0,y:null!=(t=b(e))?t:0}},v.lineX=l*("after"===a?1:-1),y.textX=(l+u)*("after"===a?1:-1),_="after"===a?m.align.left:m.align.right),{ticks:g.map((function(e){var n="string"==typeof e?function(e){var t=String(e).length;return d&&d>0&&t>d?""+String(e).slice(0,d).concat("..."):""+e}(e):e;return c({key:e instanceof Date?""+e.valueOf():""+e,value:n},t(e),v,y)})),textAlign:_,textBaseline:w}},d=function(e,t){if(void 0===e||"function"==typeof e)return e;if("time"===t.type){var n=(0,o.DC)(e);return function(e){return n(e instanceof Date?e:new Date(e))}}return(0,l.GP)(e)},h=function(e){var t,n=e.width,r=e.height,i=e.scale,a=e.axis,o=e.values,l=(t=o,(Array.isArray(t)?o:void 0)||(0,s.fS)(i,o)),u="bandwidth"in i?(0,s.ok)(i):i,c="x"===a?l.map((function(e){var t,n;return{key:e instanceof Date?""+e.valueOf():""+e,x1:null!=(t=u(e))?t:0,x2:null!=(n=u(e))?n:0,y1:0,y2:r}})):l.map((function(e){var t,r;return{key:e instanceof Date?""+e.valueOf():""+e,x1:0,x2:n,y1:null!=(t=u(e))?t:0,y2:null!=(r=u(e))?r:0}}));return c},p=(0,r.memo)((function(e){var t,n=e.value,o=e.format,l=e.lineX,s=e.lineY,f=e.onClick,d=e.textBaseline,h=e.textAnchor,p=e.animatedProps,g=(0,i.DP)(),m=g.axis.ticks.line,b=g.axis.ticks.text,v=null!=(t=null==o?void 0:o(n))?t:n,y=(0,r.useMemo)((function(){var e={opacity:p.opacity};return f?{style:c({},e,{cursor:"pointer"}),onClick:function(e){return f(e,v)}}:{style:e}}),[p.opacity,f,v]);return(0,u.jsxs)(a.CS.g,c({transform:p.transform},y,{children:[(0,u.jsx)("line",{x1:0,x2:l,y1:0,y2:s,style:m}),b.outlineWidth>0&&(0,u.jsx)(a.CS.text,{dominantBaseline:d,textAnchor:h,transform:p.textTransform,style:b,strokeWidth:2*b.outlineWidth,stroke:b.outlineColor,strokeLinejoin:"round",children:""+v}),(0,u.jsx)(a.CS.text,{dominantBaseline:d,textAnchor:h,transform:p.textTransform,style:(0,i.Ou)(b),children:""+v})]}))})),g=(0,r.memo)((function(e){var t=e.axis,n=e.scale,o=e.x,l=void 0===o?0:o,s=e.y,h=void 0===s?0:s,g=e.length,m=e.ticksPosition,b=e.tickValues,v=e.tickSize,y=void 0===v?5:v,x=e.tickPadding,_=void 0===x?5:x,w=e.tickRotation,k=void 0===w?0:w,S=e.format,M=e.renderTick,C=void 0===M?p:M,A=e.truncateTickAt,T=e.legend,E=e.legendPosition,P=void 0===E?"end":E,O=e.legendOffset,j=void 0===O?0:O,z=e.onClick,N=e.ariaHidden,F=(0,i.DP)(),D=F.axis.legend.text,R=(0,r.useMemo)((function(){return d(S,n)}),[S,n]),U=f({axis:t,scale:n,ticksPosition:m,tickValues:b,tickSize:y,tickPadding:_,tickRotation:k,truncateTickAt:A}),L=U.ticks,I=U.textAlign,$=U.textBaseline,W=null;if(void 0!==T){var q,B=0,H=0,Y=0;"y"===t?(Y=-90,B=j,"start"===P?(q="start",H=g):"middle"===P?(q="middle",H=g/2):"end"===P&&(q="end")):(H=j,"start"===P?q="start":"middle"===P?(q="middle",B=g/2):"end"===P&&(q="end",B=g)),W=(0,u.jsxs)(u.Fragment,{children:[D.outlineWidth>0&&(0,u.jsx)("text",{transform:"translate("+B+", "+H+") rotate("+Y+")",textAnchor:q,style:c({dominantBaseline:"central"},D),strokeWidth:2*D.outlineWidth,stroke:D.outlineColor,strokeLinejoin:"round",children:T}),(0,u.jsx)("text",{transform:"translate("+B+", "+H+") rotate("+Y+")",textAnchor:q,style:c({dominantBaseline:"central"},D),children:T})]})}var V=(0,i.mk)(),K=V.animate,Q=V.config,G=(0,a.zh)({transform:"translate("+l+","+h+")",lineX2:"x"===t?g:0,lineY2:"x"===t?0:g,config:Q,immediate:!K}),X=(0,r.useCallback)((function(e){return{opacity:1,transform:"translate("+e.x+","+e.y+")",textTransform:"translate("+e.textX+","+e.textY+") rotate("+k+")"}}),[k]),Z=(0,r.useCallback)((function(e){return{opacity:0,transform:"translate("+e.x+","+e.y+")",textTransform:"translate("+e.textX+","+e.textY+") rotate("+k+")"}}),[k]),J=(0,a.pn)(L,{keys:function(e){return e.key},initial:X,from:Z,enter:X,update:X,leave:{opacity:0},config:Q,immediate:!K});return(0,u.jsxs)(a.CS.g,{transform:G.transform,"aria-hidden":N,children:[J((function(e,t,n,i){return r.createElement(C,c({tickIndex:i,format:R,rotate:k,textBaseline:$,textAnchor:I,truncateTickAt:A,animatedProps:e},t,z?{onClick:z}:{}))})),(0,u.jsx)(a.CS.line,{style:F.axis.domain.line,x1:0,x2:G.lineX2,y1:0,y2:G.lineY2}),W]})})),m=["top","right","bottom","left"],b=(0,r.memo)((function(e){var t=e.xScale,n=e.yScale,r=e.width,i=e.height,a={top:e.top,right:e.right,bottom:e.bottom,left:e.left};return(0,u.jsx)(u.Fragment,{children:m.map((function(e){var o=a[e];if(!o)return null;var l="top"===e||"bottom"===e;return(0,u.jsx)(g,c({},o,{axis:l?"x":"y",x:"right"===e?r:0,y:"bottom"===e?i:0,scale:l?t:n,length:l?r:i,ticksPosition:"top"===e||"left"===e?"before":"after",truncateTickAt:o.truncateTickAt}),e)}))})})),v=(0,r.memo)((function(e){var t=e.animatedProps,n=(0,i.DP)();return(0,u.jsx)(a.CS.line,c({},t,n.grid.line))})),y=(0,r.memo)((function(e){var t=e.lines,n=(0,i.mk)(),o=n.animate,l=n.config,s=(0,a.pn)(t,{keys:function(e){return e.key},initial:function(e){return{opacity:1,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},from:function(e){return{opacity:0,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},enter:function(e){return{opacity:1,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},update:function(e){return{opacity:1,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2}},leave:{opacity:0},config:l,immediate:!o});return(0,u.jsx)("g",{children:s((function(e,t){return(0,r.createElement)(v,c({},t,{key:t.key,animatedProps:e}))}))})})),x=(0,r.memo)((function(e){var t=e.width,n=e.height,i=e.xScale,a=e.yScale,o=e.xValues,l=e.yValues,s=(0,r.useMemo)((function(){return!!i&&h({width:t,height:n,scale:i,axis:"x",values:o})}),[i,o,t,n]),c=(0,r.useMemo)((function(){return!!a&&h({width:t,height:n,scale:a,axis:"y",values:l})}),[n,t,a,l]);return(0,u.jsxs)(u.Fragment,{children:[s&&(0,u.jsx)(y,{lines:s}),c&&(0,u.jsx)(y,{lines:c})]})})),_=function(e,t){var n=t.xScale,r=t.yScale,a=t.width,o=t.height,l=t.top,s=t.right,u=t.bottom,h=t.left,p=t.theme,g={top:l,right:s,bottom:u,left:h};m.forEach((function(t){var l=g[t];if(!l)return null;var s="top"===t||"bottom"===t,u="top"===t||"left"===t?"before":"after",h=s?n:r,m=d(l.format,h);!function(e,t){var n,r=t.axis,a=t.scale,o=t.x,l=void 0===o?0:o,s=t.y,u=void 0===s?0:s,c=t.length,d=t.ticksPosition,h=t.tickValues,p=t.tickSize,g=void 0===p?5:p,m=t.tickPadding,b=void 0===m?5:m,v=t.tickRotation,y=void 0===v?0:v,x=t.format,_=t.legend,w=t.legendPosition,k=void 0===w?"end":w,S=t.legendOffset,M=void 0===S?0:S,C=t.theme,A=f({axis:r,scale:a,ticksPosition:d,tickValues:h,tickSize:g,tickPadding:b,tickRotation:y,engine:"canvas"}),T=A.ticks,E=A.textAlign,P=A.textBaseline;e.save(),e.translate(l,u),e.textAlign=E,e.textBaseline=P;var O=C.axis.ticks.text;e.font=(O.fontWeight?O.fontWeight+" ":"")+O.fontSize+"px "+O.fontFamily,(null!=(n=C.axis.domain.line.strokeWidth)?n:0)>0&&(e.lineWidth=Number(C.axis.domain.line.strokeWidth),e.lineCap="square",C.axis.domain.line.stroke&&(e.strokeStyle=C.axis.domain.line.stroke),e.beginPath(),e.moveTo(0,0),e.lineTo("x"===r?c:0,"x"===r?0:c),e.stroke());var j="function"==typeof x?x:function(e){return""+e};if(T.forEach((function(t){var n;(null!=(n=C.axis.ticks.line.strokeWidth)?n:0)>0&&(e.lineWidth=Number(C.axis.ticks.line.strokeWidth),e.lineCap="square",C.axis.ticks.line.stroke&&(e.strokeStyle=C.axis.ticks.line.stroke),e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(t.x+t.lineX,t.y+t.lineY),e.stroke());var r=j(t.value);e.save(),e.translate(t.x+t.textX,t.y+t.textY),e.rotate((0,i.tR)(y)),O.outlineWidth>0&&(e.strokeStyle=O.outlineColor,e.lineWidth=2*O.outlineWidth,e.lineJoin="round",e.strokeText(""+r,0,0)),C.axis.ticks.text.fill&&(e.fillStyle=O.fill),e.fillText(""+r,0,0),e.restore()})),void 0!==_){var z=0,N=0,F=0,D="center";"y"===r?(F=-90,z=M,"start"===k?(D="start",N=c):"middle"===k?(D="center",N=c/2):"end"===k&&(D="end")):(N=M,"start"===k?D="start":"middle"===k?(D="center",z=c/2):"end"===k&&(D="end",z=c)),e.translate(z,N),e.rotate((0,i.tR)(F)),e.font=(C.axis.legend.text.fontWeight?C.axis.legend.text.fontWeight+" ":"")+C.axis.legend.text.fontSize+"px "+C.axis.legend.text.fontFamily,C.axis.legend.text.fill&&(e.fillStyle=C.axis.legend.text.fill),e.textAlign=D,e.textBaseline="middle",e.fillText(_,0,0)}e.restore()}(e,c({},l,{axis:s?"x":"y",x:"right"===t?a:0,y:"bottom"===t?o:0,scale:h,format:m,length:s?a:o,ticksPosition:u,theme:p}))}))},w=function(e,t){var n=t.width,r=t.height,i=t.scale,a=t.axis,o=t.values;h({width:n,height:r,scale:i,axis:a,values:o}).forEach((function(t){e.beginPath(),e.moveTo(t.x1,t.y1),e.lineTo(t.x2,t.y2),e.stroke()}))}},6502:(e,t,n)=>{"use strict";n.d(t,{nz:()=>de,m1:()=>pe});var r=n(6406),i=n(9573),a=n(4025),o=n(6018),l=n(5167),s=n(6786),u=n(2612),c=n(1021),f=n(5006);const d=(0,n(8557).A)("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");var h=n(9505),p=n(9429),g=n(2389),m=n(7680),b=n(9501),v=n(1060),y=n(4704),x=n(6268),_=n(5874),w=n(6476),k=n(4425),S=n(6417),M=n(7666),C=n(9902),A=n(5813),T=n(1632),E=n(2402),P=n(456),O=n(7971),j=n(1223),z=n(5430),N=n(1077),F=n(5961),D=n(6041),R=n(8732),U=n(7616),L=n(4630),I=n(8710),$=n(5988),W=n(6253),q=n(541),B=n(9155),H=n(8156),Y=n.n(H),V=n(1331),K=n.n(V),Q=n(6957),G=n(5556),X=n.n(G),Z=n(4598);function J(){return J=Object.assign?Object.assign.bind():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},J.apply(this,arguments)}function ee(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 te={nivo:["#e8c1a0","#f47560","#f1e15b","#e8a838","#61cdbb","#97e3d5"],category10:r.A,accent:i.A,dark2:a.A,paired:o.A,pastel1:l.A,pastel2:s.A,set1:u.A,set2:c.A,set3:f.A,tableau10:d},ne=Object.keys(te),re={brown_blueGreen:h.K,purpleRed_green:p.K,pink_yellowGreen:g.K,purple_orange:m.K,red_blue:b.K,red_grey:v.K,red_yellow_blue:y.K,red_yellow_green:x.K,spectral:_.K},ie=Object.keys(re),ae={brown_blueGreen:h.A,purpleRed_green:p.A,pink_yellowGreen:g.A,purple_orange:m.A,red_blue:b.A,red_grey:v.A,red_yellow_blue:y.A,red_yellow_green:x.A,spectral:_.A},oe={blues:w.K,greens:k.K,greys:S.K,oranges:M.K,purples:C.K,reds:A.K,blue_green:T.K,blue_purple:E.K,green_blue:P.K,orange_red:O.K,purple_blue_green:j.K,purple_blue:z.K,purple_red:N.K,red_purple:F.K,yellow_green_blue:D.K,yellow_green:R.K,yellow_orange_brown:U.K,yellow_orange_red:L.K},le=Object.keys(oe),se={blues:w.A,greens:k.A,greys:S.A,oranges:M.A,purples:C.A,reds:A.A,turbo:function(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"},viridis:I.Ay,inferno:I.e0,magma:I.uz,plasma:I.pv,cividis:function(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-2710.57*e)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-67.37*e)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-2475.67*e)))))))+")"},warm:$.Ko,cool:$.Ub,cubehelixDefault:W.A,blue_green:T.A,blue_purple:E.A,green_blue:P.A,orange_red:O.A,purple_blue_green:j.A,purple_blue:z.A,purple_red:N.A,red_purple:F.A,yellow_green_blue:D.A,yellow_green:R.A,yellow_orange_brown:U.A,yellow_orange_red:L.A},ue=J({},te,re,oe),ce=(Object.keys(ue),J({},ae,se,{rainbow:$.Ay,sinebow:q.A})),fe=(Object.keys(ce),function(e,t){if("function"==typeof e)return e;if(K()(e)){if(function(e){return void 0!==e.theme}(e)){if(void 0===t)throw new Error("Unable to use color from theme as no theme was provided");var n=Y()(t,e.theme);if(void 0===n)throw new Error("Color from theme is undefined at path: '"+e.theme+"'");return function(){return n}}if(function(e){return void 0!==e.from}(e)){var r=function(t){return Y()(t,e.from)};if(Array.isArray(e.modifiers)){for(var i,a=[],o=function(){var e=i.value,t=e[0],n=e[1];if("brighter"===t)a.push((function(e){return e.brighter(n)}));else if("darker"===t)a.push((function(e){return e.darker(n)}));else{if("opacity"!==t)throw new Error("Invalid color modifier: '"+t+"', must be one of: 'brighter', 'darker', 'opacity'");a.push((function(e){return e.opacity=n,e}))}},l=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,t){if(e){if("string"==typeof e)return ee(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)?ee(e,t):void 0}}(e))){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e.modifiers);!(i=l()).done;)o();return 0===a.length?r:function(e){return a.reduce((function(e,t){return t(e)}),(0,Q.Qh)(r(e))).toString()}}return r}throw new Error("Invalid color spec, you should either specify 'theme' or 'from' when using a config object")}return function(){return e}}),de=function(e,t){return(0,B.useMemo)((function(){return fe(e,t)}),[e,t])},he=(X().oneOfType([X().string,X().func,X().shape({theme:X().string.isRequired}),X().shape({from:X().string.isRequired,modifiers:X().arrayOf(X().array)})]),function(e,t){if("function"==typeof e)return e;var n="function"==typeof t?t:function(e){return Y()(e,t)};if(Array.isArray(e)){var r=(0,Z.A)(e),i=function(e){return r(n(e))};return i.scale=r,i}if(K()(e)){if(function(e){return void 0!==e.datum}(e))return function(t){return Y()(t,e.datum)};if(function(e){return void 0!==e.scheme}(e)){if(function(e){return ne.includes(e)}(e.scheme)){var a=(0,Z.A)(ue[e.scheme]),o=function(e){return a(n(e))};return o.scale=a,o}if(function(e){return ie.includes(e)}(e.scheme)){if(void 0!==e.size&&(e.size<3||e.size>11))throw new Error("Invalid size '"+e.size+"' for diverging color scheme '"+e.scheme+"', must be between 3~11");var l=(0,Z.A)(ue[e.scheme][e.size||11]),s=function(e){return l(n(e))};return s.scale=l,s}if(function(e){return le.includes(e)}(e.scheme)){if(void 0!==e.size&&(e.size<3||e.size>9))throw new Error("Invalid size '"+e.size+"' for sequential color scheme '"+e.scheme+"', must be between 3~9");var u=(0,Z.A)(ue[e.scheme][e.size||9]),c=function(e){return u(n(e))};return c.scale=u,c}}throw new Error("Invalid colors, when using an object, you should either pass a 'datum' or a 'scheme' property")}return function(){return e}}),pe=function(e,t){return(0,B.useMemo)((function(){return he(e,t)}),[e,t])}},1644:(e,t,n)=>{"use strict";n.d(t,{U9:()=>nn,sg:()=>Zt,KF:()=>Nt,Ge:()=>Kt,kc:()=>dn,Lp:()=>vt,kT:()=>_t,tR:()=>Lt,Yf:()=>ln,gD:()=>on,H9:()=>un,u7:()=>sn,Ou:()=>Pt,ni:()=>It,wA:()=>ht,Xl:()=>wt,W_:()=>kt,mk:()=>dt,DP:()=>Tt,d_:()=>St,Ub:()=>an});var r=n(9155),i=n(5556),a=n.n(i),o=n(956),l=n(5364),s=n.n(l),u=n(8156),c=n.n(u),f=n(3560),d=n.n(f),h=n(7737),p=n(2555),g=n(5015),m=n.n(g),b=n(4848),v=n(8090),y=n.n(v),x=(n(6449),n(4598)),_=n(9505),w=n(9429),k=n(2389),S=n(7680),M=n(9501),C=n(1060),A=n(4704),T=n(6268),E=n(5874),P=n(6476),O=n(4425),j=n(6417),z=n(7666),N=n(9902),F=n(5813),D=n(1632),R=n(2402),U=n(456),L=n(7971),I=n(1223),$=n(5430),W=n(1077),q=n(5961),B=n(6041),H=n(8732),Y=n(7616),V=n(4630),K=n(6406),Q=n(9573),G=n(4025),X=n(6018),Z=n(5167),J=n(6786),ee=n(2612),te=n(1021),ne=n(5006),re=n(8710),ie=n(5988),ae=n(6253),oe=n(541),le=n(1882),se=n.n(le),ue=n(1648),ce=n.n(ue);function fe(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function de(e){this._context=e}function he(){}function pe(e){this._context=e}function ge(e){this._context=e}function me(e,t){this._basis=new de(e),this._beta=t}de.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:fe(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:fe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},pe.prototype={areaStart:he,areaEnd:he,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:fe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ge.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:fe(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},me.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],a=t[0],o=e[n]-i,l=t[n]-a,s=-1;++s<=n;)r=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+r*o),this._beta*t[s]+(1-this._beta)*(a+r*l));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const be=function e(t){function n(e){return 1===t?new de(e):new me(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function ve(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function ye(e,t){this._context=e,this._k=(1-t)/6}ye.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ve(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ve(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const xe=function e(t){function n(e){return new ye(e,t)}return n.tension=function(t){return e(+t)},n}(0);function _e(e,t){this._context=e,this._k=(1-t)/6}_e.prototype={areaStart:he,areaEnd:he,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ve(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const we=function e(t){function n(e){return new _e(e,t)}return n.tension=function(t){return e(+t)},n}(0);function ke(e,t){this._context=e,this._k=(1-t)/6}ke.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ve(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Se=function e(t){function n(e){return new ke(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Me(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var l=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,s=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*l-e._x0*e._l12_2a+e._x2*e._l01_2a)/s,i=(i*l-e._y0*e._l12_2a+e._y2*e._l01_2a)/s}if(e._l23_a>1e-12){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*u+e._x1*e._l23_2a-t*e._l12_2a)/c,o=(o*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Ce(e,t){this._context=e,this._alpha=t}Math.abs,Math.atan2,Math.cos,Math.max,Math.min,Math.sin,Math.sqrt,Math.PI,Ce.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Me(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ae=function e(t){function n(e){return t?new Ce(e,t):new ye(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Te(e,t){this._context=e,this._alpha=t}Te.prototype={areaStart:he,areaEnd:he,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Me(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ee=function e(t){function n(e){return t?new Te(e,t):new _e(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Pe(e,t){this._context=e,this._alpha=t}Pe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Me(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Oe=function e(t){function n(e){return t?new Pe(e,t):new ke(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);var je=n(6343);function ze(e){this._context=e}function Ne(e){return e<0?-1:1}function Fe(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),l=(a*i+o*r)/(r+i);return(Ne(a)+Ne(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function De(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Re(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-r)/3;e._context.bezierCurveTo(r+l,i+l*t,a-l,o-l*n,a,o)}function Ue(e){this._context=e}function Le(e){this._context=new Ie(e)}function Ie(e){this._context=e}function $e(e){this._context=e}function We(e){var t,n,r=e.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function qe(e,t){this._context=e,this._t=t}ze.prototype={areaStart:he,areaEnd:he,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},Ue.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Re(this,this._t0,De(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Re(this,De(this,n=Fe(this,e,t)),n);break;default:Re(this,this._t0,n=Fe(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Le.prototype=Object.create(Ue.prototype)).point=function(e,t){Ue.prototype.point.call(this,t,e)},Ie.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}},$e.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=We(e),i=We(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},qe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var Be=n(4873);function He(e){var t=e.map(Ye);return(0,Be.A)(e).sort((function(e,n){return t[e]-t[n]}))}function Ye(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function Ve(e){for(var t,n=-1,r=0,i=e.length,a=-1/0;++n<i;)(t=+e[n][1])>a&&(a=t,r=n);return r}var Ke=n(3414),Qe=n(8801),Ge=n(6906),Xe=n(2560),Ze=n(1331),Je=n.n(Ze),et=n(4383),tt=n.n(et),nt=n(2404),rt=n.n(nt),it={background:"transparent",text:{fontFamily:"sans-serif",fontSize:11,fill:"#333333",outlineWidth:0,outlineColor:"transparent",outlineOpacity:1},axis:{domain:{line:{stroke:"transparent",strokeWidth:1}},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{}},legend:{text:{fontSize:12}}},grid:{line:{stroke:"#dddddd",strokeWidth:1}},legends:{hidden:{symbol:{fill:"#333333",opacity:.6},text:{fill:"#333333",opacity:.6}},text:{},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{fontSize:10}},title:{text:{}}},labels:{text:{}},markers:{lineColor:"#000000",lineStrokeWidth:1,text:{}},dots:{text:{}},tooltip:{container:{background:"white",color:"inherit",fontSize:"inherit",borderRadius:"2px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.25)",padding:"5px 9px"},basic:{whiteSpace:"pre",display:"flex",alignItems:"center"},chip:{marginRight:7},table:{},tableCell:{padding:"3px 5px"},tableCellValue:{fontWeight:"bold"}},crosshair:{line:{stroke:"#000000",strokeWidth:1,strokeOpacity:.75,strokeDasharray:"6 6"}},annotations:{text:{fontSize:13,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},link:{stroke:"#000000",strokeWidth:1,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},outline:{fill:"none",stroke:"#000000",strokeWidth:2,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},symbol:{fill:"#000000",outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1}}};function at(){return at=Object.assign?Object.assign.bind():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},at.apply(this,arguments)}function ot(e,t){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ot(e,t)}function lt(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var st=["axis.ticks.text","axis.legend.text","legends.title.text","legends.text","legends.ticks.text","legends.title.text","labels.text","dots.text","markers.text","annotations.text"],ut=(0,r.createContext)(),ct=function(e){var t=e.children,n=e.animate,i=void 0===n||n,a=e.config,o=void 0===a?"default":a,l=(0,r.useMemo)((function(){var e=m()(o)?p.$W[o]:o;return{animate:i,config:e}}),[i,o]);return(0,b.jsx)(ut.Provider,{value:l,children:t})},ft={animate:a().bool,motionConfig:a().oneOfType([a().oneOf(Object.keys(p.$W)),a().shape({mass:a().number,tension:a().number,friction:a().number,clamp:a().bool,precision:a().number,velocity:a().number,duration:a().number,easing:a().func})])};ct.propTypes={children:a().node.isRequired,animate:ft.animate,config:ft.motionConfig};var dt=function(){return(0,r.useContext)(ut)},ht=function(e){var t=dt(),n=t.animate,i=t.config,a=function(e){var t=(0,r.useRef)();return(0,r.useEffect)((function(){t.current=e}),[e]),t.current}(e),o=(0,r.useMemo)((function(){return(0,h.A)(a,e)}),[a,e]),l=(0,p.zh)({from:{value:0},to:{value:1},reset:!0,config:i,immediate:!n}).value;return(0,p.to)(l,o)},pt={nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:y()(_.K),PRGn:y()(w.K),PiYG:y()(k.K),PuOr:y()(S.K),RdBu:y()(M.K),RdGy:y()(C.K),RdYlBu:y()(A.K),RdYlGn:y()(T.K),spectral:y()(E.K),blues:y()(P.K),greens:y()(O.K),greys:y()(j.K),oranges:y()(z.K),purples:y()(N.K),reds:y()(F.K),BuGn:y()(D.K),BuPu:y()(R.K),GnBu:y()(U.K),OrRd:y()(L.K),PuBuGn:y()(I.K),PuBu:y()($.K),PuRd:y()(W.K),RdPu:y()(q.K),YlGnBu:y()(B.K),YlGn:y()(H.K),YlOrBr:y()(Y.K),YlOrRd:y()(V.K)},gt=Object.keys(pt),mt=(K.A,Q.A,G.A,X.A,Z.A,J.A,ee.A,te.A,ne.A,y()(_.K),y()(w.K),y()(k.K),y()(S.K),y()(M.K),y()(C.K),y()(A.K),y()(T.K),y()(E.K),y()(P.K),y()(O.K),y()(j.K),y()(z.K),y()(N.K),y()(F.K),y()(D.K),y()(R.K),y()(U.K),y()(L.K),y()(I.K),y()($.K),y()(W.K),y()(q.K),y()(B.K),y()(H.K),y()(Y.K),y()(V.K),_.A,w.A,k.A,S.A,M.A,C.A,A.A,T.A,E.A,P.A,O.A,j.A,z.A,N.A,F.A,re.Ay,re.e0,re.uz,re.pv,ie.Ko,ie.Ub,ae.A,D.A,R.A,U.A,L.A,I.A,$.A,W.A,q.A,B.A,H.A,Y.A,V.A,ie.Ay,oe.A,a().oneOfType([a().oneOf(gt),a().func,a().arrayOf(a().string)]),{basis:function(e){return new de(e)},basisClosed:function(e){return new pe(e)},basisOpen:function(e){return new ge(e)},bundle:be,cardinal:xe,cardinalClosed:we,cardinalOpen:Se,catmullRom:Ae,catmullRomClosed:Ee,catmullRomOpen:Oe,linear:je.A,linearClosed:function(e){return new ze(e)},monotoneX:function(e){return new Ue(e)},monotoneY:function(e){return new Le(e)},natural:function(e){return new $e(e)},step:function(e){return new qe(e,.5)},stepAfter:function(e){return new qe(e,1)},stepBefore:function(e){return new qe(e,0)}}),bt=Object.keys(mt),vt=(bt.filter((function(e){return e.endsWith("Closed")})),ce()(bt,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed"),ce()(bt,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed"),function(e){if(!mt[e])throw new TypeError("'"+e+"', is not a valid curve interpolator identifier.");return mt[e]}),yt={ascending:He,descending:function(e){return He(e).reverse()},insideOut:function(e){var t,n,r=e.length,i=e.map(Ye),a=function(e){var t=e.map(Ve);return(0,Be.A)(e).sort((function(e,n){return t[e]-t[n]}))}(e),o=0,l=0,s=[],u=[];for(t=0;t<r;++t)n=a[t],o<l?(o+=i[n],s.push(n)):(l+=i[n],u.push(n));return u.reverse().concat(s)},none:Be.A,reverse:function(e){return(0,Be.A)(e).reverse()}},xt=(Object.keys(yt),{expand:function(e,t){if((r=e.length)>0){for(var n,r,i,a=0,o=e[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=e[n][a][1]||0;if(i)for(n=0;n<r;++n)e[n][a][1]/=i}(0,Ke.A)(e,t)}},diverging:Qe.A,none:Ke.A,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],a=i.length;r<a;++r){for(var o=0,l=0;o<n;++o)l+=e[o][r][1]||0;i[r][1]+=i[r][0]=-l/2}(0,Ke.A)(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var l=0,s=0,u=0;l<i;++l){for(var c=e[t[l]],f=c[o][1]||0,d=(f-(c[o-1][1]||0))/2,h=0;h<l;++h){var p=e[t[h]];d+=(p[o][1]||0)-(p[o-1][1]||0)}s+=f,u+=d*f}n[o-1][1]+=n[o-1][0]=a,s&&(a-=u/s)}n[o-1][1]+=n[o-1][0]=a,(0,Ke.A)(e,t)}}}),_t=(Object.keys(xt),a().shape({top:a().number,right:a().number,bottom:a().number,left:a().number}).isRequired,a().oneOf(["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]),(0,x.A)(ne.A),{top:0,right:0,bottom:0,left:0}),wt=function(e,t,n){return void 0===n&&(n={}),(0,r.useMemo)((function(){var r=at({},_t,n);return{margin:r,innerWidth:e-r.left-r.right,innerHeight:t-r.top-r.bottom,outerWidth:e,outerHeight:t}}),[e,t,n.top,n.right,n.bottom,n.left])},kt=function(){var e=(0,r.useRef)(null),t=(0,r.useState)({left:0,top:0,width:0,height:0}),n=t[0],i=t[1],a=(0,r.useState)((function(){return"undefined"==typeof ResizeObserver?null:new ResizeObserver((function(e){var t=e[0];return i(t.contentRect)}))}))[0];return(0,r.useEffect)((function(){return e.current&&null!==a&&a.observe(e.current),function(){null!==a&&a.disconnect()}}),[]),[e,n]},St=function(e){return(0,r.useMemo)((function(){return function(e){return"function"==typeof e?e:"string"==typeof e?0===e.indexOf("time:")?(0,Xe.DC)(e.slice("5")):(0,Ge.GP)(e):function(e){return""+e}}(e)}),[e])},Mt=(0,r.createContext)(),Ct={},At=function(e){var t=e.theme,n=void 0===t?Ct:t,i=e.children,a=function(e){return(0,r.useMemo)((function(){return function(e,t){var n=s()({},e,t);return st.forEach((function(e){d()(n,e,function(e,t){return at({},t,e)}(c()(n,e),n.text))})),n}(it,e)}),[e])}(n);return(0,b.jsx)(Mt.Provider,{value:a,children:i})};At.propTypes={children:a().node.isRequired,theme:a().object};var Tt=function(){return(0,r.useContext)(Mt)},Et=["outlineWidth","outlineColor","outlineOpacity"],Pt=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,lt(e,Et)},Ot=function(e){var t=e.children,n=e.condition,i=e.wrapper;return n?(0,r.cloneElement)(i,{},t):t};Ot.propTypes={children:a().node.isRequired,condition:a().bool.isRequired,wrapper:a().element.isRequired};var jt={position:"relative"},zt=function(e){var t=e.children,n=e.theme,i=e.renderWrapper,a=void 0===i||i,l=e.isInteractive,s=void 0===l||l,u=e.animate,c=e.motionConfig,f=(0,r.useRef)(null);return(0,b.jsx)(At,{theme:n,children:(0,b.jsx)(ct,{animate:u,config:c,children:(0,b.jsx)(o.Bc,{container:f,children:(0,b.jsxs)(Ot,{condition:a,wrapper:(0,b.jsx)("div",{style:jt,ref:f}),children:[t,s&&(0,b.jsx)(o.m_,{})]})})})})};zt.propTypes={children:a().element.isRequired,isInteractive:a().bool,renderWrapper:a().bool,theme:a().object,animate:a().bool,motionConfig:a().oneOfType([a().string,ft.motionConfig])},a().func.isRequired,a().bool,a().bool,a().object.isRequired,a().bool.isRequired,a().oneOfType([a().string,ft.motionConfig]);var Nt=function(e){var t=e.children,n=kt(),r=n[0],i=n[1],a=i.width>0&&i.height>0;return(0,b.jsx)("div",{ref:r,style:{width:"100%",height:"100%"},children:a&&t({width:i.width,height:i.height})})};Nt.propTypes={children:a().func.isRequired};var Ft=["id","colors"],Dt=function(e){var t=e.id,n=e.colors,r=lt(e,Ft);return(0,b.jsx)("linearGradient",at({id:t,x1:0,x2:0,y1:0,y2:1},r,{children:n.map((function(e){var t=e.offset,n=e.color,r=e.opacity;return(0,b.jsx)("stop",{offset:t+"%",stopColor:n,stopOpacity:void 0!==r?r:1},t)}))}))};Dt.propTypes={id:a().string.isRequired,colors:a().arrayOf(a().shape({offset:a().number.isRequired,color:a().string.isRequired,opacity:a().number})).isRequired,gradientTransform:a().string};var Rt={linearGradient:Dt},Ut=(0,r.memo)((function(e){var t=e.id,n=e.background,r=void 0===n?"#ffffff":n,i=e.color,a=void 0===i?"#000000":i,o=e.size,l=void 0===o?4:o,s=e.padding,u=void 0===s?4:s,c=e.stagger,f=void 0!==c&&c,d=l+u,h=l/2,p=u/2;return!0===f&&(d=2*l+2*u),(0,b.jsxs)("pattern",{id:t,width:d,height:d,patternUnits:"userSpaceOnUse",children:[(0,b.jsx)("rect",{width:d,height:d,fill:r}),(0,b.jsx)("circle",{cx:p+h,cy:p+h,r:h,fill:a}),f&&(0,b.jsx)("circle",{cx:1.5*u+l+h,cy:1.5*u+l+h,r:h,fill:a})]})}));Ut.displayName="PatternDots",Ut.propTypes={id:a().string.isRequired,color:a().string.isRequired,background:a().string.isRequired,size:a().number.isRequired,padding:a().number.isRequired,stagger:a().bool.isRequired},Math.PI;var Lt=function(e){return e*Math.PI/180},It={svg:{align:{left:"start",center:"middle",right:"end",start:"start",middle:"middle",end:"end"},baseline:{top:"text-before-edge",center:"central",bottom:"alphabetic"}},canvas:{align:{left:"left",center:"center",right:"right",start:"left",middle:"center",end:"right"},baseline:{top:"top",center:"middle",bottom:"bottom"}}},$t=(0,r.memo)((function(e){var t=e.id,n=e.spacing,r=void 0===n?5:n,i=e.rotation,a=void 0===i?0:i,o=e.background,l=void 0===o?"#000000":o,s=e.color,u=void 0===s?"#ffffff":s,c=e.lineWidth,f=void 0===c?2:c,d=Math.round(a)%360,h=Math.abs(r);d>180?d-=360:d>90?d-=180:d<-180?d+=360:d<-90&&(d+=180);var p,g=h,m=h;return 0===d?p="\n M 0 0 L "+g+" 0\n M 0 "+m+" L "+g+" "+m+"\n ":90===d?p="\n M 0 0 L 0 "+m+"\n M "+g+" 0 L "+g+" "+m+"\n ":(g=Math.abs(h/Math.sin(Lt(d))),m=h/Math.sin(Lt(90-d)),p=d>0?"\n M 0 "+-m+" L "+2*g+" "+m+"\n M "+-g+" "+-m+" L "+g+" "+m+"\n M "+-g+" 0 L "+g+" "+2*m+"\n ":"\n M "+-g+" "+m+" L "+g+" "+-m+"\n M "+-g+" "+2*m+" L "+2*g+" "+-m+"\n M 0 "+2*m+" L "+2*g+" 0\n "),(0,b.jsxs)("pattern",{id:t,width:g,height:m,patternUnits:"userSpaceOnUse",children:[(0,b.jsx)("rect",{width:g,height:m,fill:l,stroke:"rgba(255, 0, 0, 0.1)",strokeWidth:0}),(0,b.jsx)("path",{d:p,strokeWidth:f,stroke:u,strokeLinecap:"square"})]})}));$t.displayName="PatternLines",$t.propTypes={id:a().string.isRequired,spacing:a().number.isRequired,rotation:a().number.isRequired,background:a().string.isRequired,color:a().string.isRequired,lineWidth:a().number.isRequired};var Wt=(0,r.memo)((function(e){var t=e.id,n=e.color,r=void 0===n?"#000000":n,i=e.background,a=void 0===i?"#ffffff":i,o=e.size,l=void 0===o?4:o,s=e.padding,u=void 0===s?4:s,c=e.stagger,f=void 0!==c&&c,d=l+u,h=u/2;return!0===f&&(d=2*l+2*u),(0,b.jsxs)("pattern",{id:t,width:d,height:d,patternUnits:"userSpaceOnUse",children:[(0,b.jsx)("rect",{width:d,height:d,fill:a}),(0,b.jsx)("rect",{x:h,y:h,width:l,height:l,fill:r}),f&&(0,b.jsx)("rect",{x:1.5*u+l,y:1.5*u+l,width:l,height:l,fill:r})]})}));Wt.displayName="PatternSquares",Wt.propTypes={id:a().string.isRequired,color:a().string.isRequired,background:a().string.isRequired,size:a().number.isRequired,padding:a().number.isRequired,stagger:a().bool.isRequired};var qt={patternDots:Ut,patternLines:$t,patternSquares:Wt},Bt=["type"],Ht=at({},Rt,qt),Yt=function(e){var t=e.defs;return!t||t.length<1?null:(0,b.jsx)("defs",{"aria-hidden":!0,children:t.map((function(e){var t=e.type,n=lt(e,Bt);return Ht[t]?(0,r.createElement)(Ht[t],at({key:n.id},n)):null}))})};Yt.propTypes={defs:a().arrayOf(a().shape({type:a().oneOf(Object.keys(Ht)).isRequired,id:a().string.isRequired}))};var Vt=(0,r.memo)(Yt),Kt=function(e){var t=e.width,n=e.height,r=e.margin,i=e.defs,a=e.children,o=e.role,l=e.ariaLabel,s=e.ariaLabelledBy,u=e.ariaDescribedBy,c=e.isFocusable,f=Tt();return(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,role:o,"aria-label":l,"aria-labelledby":s,"aria-describedby":u,focusable:c,tabIndex:c?0:void 0,children:[(0,b.jsx)(Vt,{defs:i}),(0,b.jsx)("rect",{width:t,height:n,fill:f.background}),(0,b.jsx)("g",{transform:"translate("+r.left+","+r.top+")",children:a})]})};Kt.propTypes={width:a().number.isRequired,height:a().number.isRequired,margin:a().shape({top:a().number.isRequired,left:a().number.isRequired}).isRequired,defs:a().array,children:a().oneOfType([a().arrayOf(a().node),a().node]).isRequired,role:a().string,isFocusable:a().bool,ariaLabel:a().string,ariaLabelledBy:a().string,ariaDescribedBy:a().string};var Qt=function(e){var t=e.size,n=e.color,r=e.borderWidth,i=e.borderColor;return(0,b.jsx)("circle",{r:t/2,fill:n,stroke:i,strokeWidth:r,style:{pointerEvents:"none"}})};Qt.propTypes={size:a().number.isRequired,color:a().string.isRequired,borderWidth:a().number.isRequired,borderColor:a().string.isRequired};var Gt=(0,r.memo)(Qt),Xt=function(e){var t=e.x,n=e.y,i=e.symbol,a=void 0===i?Gt:i,o=e.size,l=e.datum,s=e.color,u=e.borderWidth,c=e.borderColor,f=e.label,d=e.labelTextAnchor,h=void 0===d?"middle":d,g=e.labelYOffset,m=void 0===g?-12:g,v=Tt(),y=dt(),x=y.animate,_=y.config,w=(0,p.zh)({transform:"translate("+t+", "+n+")",config:_,immediate:!x});return(0,b.jsxs)(p.CS.g,{transform:w.transform,style:{pointerEvents:"none"},children:[(0,r.createElement)(a,{size:o,color:s,datum:l,borderWidth:u,borderColor:c}),f&&(0,b.jsx)("text",{textAnchor:h,y:m,style:Pt(v.dots.text),children:f})]})};Xt.propTypes={x:a().number.isRequired,y:a().number.isRequired,datum:a().object.isRequired,size:a().number.isRequired,color:a().string.isRequired,borderWidth:a().number.isRequired,borderColor:a().string.isRequired,symbol:a().oneOfType([a().func,a().object]),label:a().oneOfType([a().string,a().number]),labelTextAnchor:a().oneOf(["start","middle","end"]),labelYOffset:a().number};var Zt=(0,r.memo)(Xt),Jt=function(e){var t=e.width,n=e.height,r=e.axis,i=e.scale,a=e.value,o=e.lineStyle,l=e.textStyle,s=e.legend,u=e.legendNode,c=e.legendPosition,f=void 0===c?"top-right":c,d=e.legendOffsetX,h=void 0===d?14:d,p=e.legendOffsetY,g=void 0===p?14:p,m=e.legendOrientation,v=void 0===m?"horizontal":m,y=Tt(),x=0,_=0,w=0,k=0;if("y"===r?(w=i(a),_=t):(x=i(a),k=n),s&&!u){var S=function(e){var t=e.width,n=e.height,r=e.position,i=e.offsetX,a=e.offsetY,o=e.orientation,l=0,s=0,u="vertical"===o?-90:0,c="start";if("x"===e.axis)switch(r){case"top-left":l=-i,s=a,c="end";break;case"top":s=-a,c="horizontal"===o?"middle":"start";break;case"top-right":l=i,s=a,c="horizontal"===o?"start":"end";break;case"right":l=i,s=n/2,c="horizontal"===o?"start":"middle";break;case"bottom-right":l=i,s=n-a,c="start";break;case"bottom":s=n+a,c="horizontal"===o?"middle":"end";break;case"bottom-left":s=n-a,l=-i,c="horizontal"===o?"end":"start";break;case"left":l=-i,s=n/2,c="horizontal"===o?"end":"middle"}else switch(r){case"top-left":l=i,s=-a,c="start";break;case"top":l=t/2,s=-a,c="horizontal"===o?"middle":"start";break;case"top-right":l=t-i,s=-a,c="horizontal"===o?"end":"start";break;case"right":l=t+i,c="horizontal"===o?"start":"middle";break;case"bottom-right":l=t-i,s=a,c="end";break;case"bottom":l=t/2,s=a,c="horizontal"===o?"middle":"end";break;case"bottom-left":l=i,s=a,c="horizontal"===o?"start":"end";break;case"left":l=-i,c="horizontal"===o?"end":"middle"}return{x:l,y:s,rotation:u,textAnchor:c}}({axis:r,width:t,height:n,position:f,offsetX:h,offsetY:g,orientation:v});u=(0,b.jsx)("text",{transform:"translate("+S.x+", "+S.y+") rotate("+S.rotation+")",textAnchor:S.textAnchor,dominantBaseline:"central",style:l,children:s})}return(0,b.jsxs)("g",{transform:"translate("+x+", "+w+")",children:[(0,b.jsx)("line",{x1:0,x2:_,y1:0,y2:k,stroke:y.markers.lineColor,strokeWidth:y.markers.lineStrokeWidth,style:o}),u]})};Jt.propTypes={width:a().number.isRequired,height:a().number.isRequired,axis:a().oneOf(["x","y"]).isRequired,scale:a().func.isRequired,value:a().oneOfType([a().number,a().string,a().instanceOf(Date)]).isRequired,lineStyle:a().object,textStyle:a().object,legend:a().string,legendPosition:a().oneOf(["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"]),legendOffsetX:a().number.isRequired,legendOffsetY:a().number.isRequired,legendOrientation:a().oneOf(["horizontal","vertical"]).isRequired};var en=(0,r.memo)(Jt),tn=function(e){var t=e.markers,n=e.width,r=e.height,i=e.xScale,a=e.yScale;return t&&0!==t.length?t.map((function(e,t){return(0,b.jsx)(en,at({},e,{width:n,height:r,scale:"y"===e.axis?a:i}),t)})):null};tn.propTypes={width:a().number.isRequired,height:a().number.isRequired,xScale:a().func.isRequired,yScale:a().func.isRequired,markers:a().arrayOf(a().shape({axis:a().oneOf(["x","y"]).isRequired,value:a().oneOfType([a().number,a().string,a().instanceOf(Date)]).isRequired,lineStyle:a().object,textStyle:a().object}))};var nn=(0,r.memo)(tn),rn=["theme","renderWrapper","animate","motionConfig"],an=function(e){return function(t){var n,r;function i(){return t.apply(this,arguments)||this}return r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,ot(n,r),i.prototype.render=function(){var t=this.props,n=t.theme,r=t.renderWrapper,i=t.animate,a=t.motionConfig,o=lt(t,rn);return(0,b.jsx)(zt,{theme:n,renderWrapper:r,isInteractive:o.isInteractive,animate:i,motionConfig:a,children:(0,b.jsx)(e,at({},o))})},i}(r.Component)},on=function(e,t){var n,r=se()(e)?e:function(t){return c()(t,e)};return t&&(n=se()(t)?t:(0,Ge.GP)(t)),n?function(e){return n(r(e))}:r},ln=function(e,t,n,r){var i=n-e,a=r-t;return i*=i,a*=a,Math.sqrt(i+a)},sn=function(e,t,n,r,i,a){return e<=i&&i<=e+n&&t<=a&&a<=t+r},un=function(e,t){var n,r="touches"in t?t.touches[0]:t,i=r.clientX,a=r.clientY,o=e