@spscommerce/ds-react-charts 8.23.18 → 8.24.0

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.
Files changed (3) hide show
  1. package/lib/index.js +2800 -2879
  2. package/lib/index.umd.cjs +13 -13
  3. package/package.json +8 -8
package/lib/index.umd.cjs CHANGED
@@ -1,36 +1,36 @@
1
- (function(ue,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("@spscommerce/ds-colors"),require("@spscommerce/ds-react"),require("@spscommerce/utils"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","@spscommerce/ds-colors","@spscommerce/ds-react","@spscommerce/utils","react-dom"],m):(ue=typeof globalThis<"u"?globalThis:ue||self,m(ue.DSReactCharts={},ue.React,ue.DSColors,ue.dsReact,ue.utils,ue.require$$1))})(this,function(ue,m,Zn,tn,tt,os){"use strict";function ss(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const z=ss(m),pe=ss(Zn);var Qn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pt(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),n}var fi={exports:{}},Jn={exports:{}},re={};/** @license React v16.13.1
1
+ (function(le,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react"),require("@spscommerce/ds-colors"),require("@spscommerce/ds-react"),require("@spscommerce/utils"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","@spscommerce/ds-colors","@spscommerce/ds-react","@spscommerce/utils","react-dom"],v):(le=typeof globalThis<"u"?globalThis:le||self,v(le.DSReactCharts={},le.React,le.DSColors,le.dsReact,le.utils,le.require$$1))})(this,function(le,v,Zn,en,tt,as){"use strict";function os(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const j=os(v),pe=os(Zn);var Qn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pt(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),n}var fi={exports:{}},Jn={exports:{}},re={};/** @license React v16.13.1
2
2
  * react-is.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
5
5
  *
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
- */var ls;function Qh(){if(ls)return re;ls=1;var e=typeof Symbol=="function"&&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,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function _(y){if(typeof y=="object"&&y!==null){var S=y.$$typeof;switch(S){case t:switch(y=y.type,y){case l:case u:case r:case i:case a:case f:return y;default:switch(y=y&&y.$$typeof,y){case o:case c:case d:case p:case s:return y;default:return S}}case n:return S}}}function M(y){return _(y)===u}return re.AsyncMode=l,re.ConcurrentMode=u,re.ContextConsumer=o,re.ContextProvider=s,re.Element=t,re.ForwardRef=c,re.Fragment=r,re.Lazy=d,re.Memo=p,re.Portal=n,re.Profiler=i,re.StrictMode=a,re.Suspense=f,re.isAsyncMode=function(y){return M(y)||_(y)===l},re.isConcurrentMode=M,re.isContextConsumer=function(y){return _(y)===o},re.isContextProvider=function(y){return _(y)===s},re.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},re.isForwardRef=function(y){return _(y)===c},re.isFragment=function(y){return _(y)===r},re.isLazy=function(y){return _(y)===d},re.isMemo=function(y){return _(y)===p},re.isPortal=function(y){return _(y)===n},re.isProfiler=function(y){return _(y)===i},re.isStrictMode=function(y){return _(y)===a},re.isSuspense=function(y){return _(y)===f},re.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===u||y===i||y===a||y===f||y===h||typeof y=="object"&&y!==null&&(y.$$typeof===d||y.$$typeof===p||y.$$typeof===s||y.$$typeof===o||y.$$typeof===c||y.$$typeof===x||y.$$typeof===g||y.$$typeof===b||y.$$typeof===v)},re.typeOf=_,re}var ie={};/** @license React v16.13.1
8
+ */var ss;function Xh(){if(ss)return re;ss=1;var e=typeof Symbol=="function"&&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,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function _(y){if(typeof y=="object"&&y!==null){var S=y.$$typeof;switch(S){case t:switch(y=y.type,y){case u:case l:case r:case i:case a:case f:return y;default:switch(y=y&&y.$$typeof,y){case o:case c:case d:case p:case s:return y;default:return S}}case n:return S}}}function M(y){return _(y)===l}return re.AsyncMode=u,re.ConcurrentMode=l,re.ContextConsumer=o,re.ContextProvider=s,re.Element=t,re.ForwardRef=c,re.Fragment=r,re.Lazy=d,re.Memo=p,re.Portal=n,re.Profiler=i,re.StrictMode=a,re.Suspense=f,re.isAsyncMode=function(y){return M(y)||_(y)===u},re.isConcurrentMode=M,re.isContextConsumer=function(y){return _(y)===o},re.isContextProvider=function(y){return _(y)===s},re.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},re.isForwardRef=function(y){return _(y)===c},re.isFragment=function(y){return _(y)===r},re.isLazy=function(y){return _(y)===d},re.isMemo=function(y){return _(y)===p},re.isPortal=function(y){return _(y)===n},re.isProfiler=function(y){return _(y)===i},re.isStrictMode=function(y){return _(y)===a},re.isSuspense=function(y){return _(y)===f},re.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===l||y===i||y===a||y===f||y===h||typeof y=="object"&&y!==null&&(y.$$typeof===d||y.$$typeof===p||y.$$typeof===s||y.$$typeof===o||y.$$typeof===c||y.$$typeof===b||y.$$typeof===g||y.$$typeof===x||y.$$typeof===m)},re.typeOf=_,re}var ie={};/** @license React v16.13.1
9
9
  * react-is.development.js
10
10
  *
11
11
  * Copyright (c) Facebook, Inc. and its affiliates.
12
12
  *
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
- */var us;function Jh(){return us||(us=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&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,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function _(O){return typeof O=="string"||typeof O=="function"||O===r||O===u||O===i||O===a||O===f||O===h||typeof O=="object"&&O!==null&&(O.$$typeof===d||O.$$typeof===p||O.$$typeof===s||O.$$typeof===o||O.$$typeof===c||O.$$typeof===x||O.$$typeof===g||O.$$typeof===b||O.$$typeof===v)}function M(O){if(typeof O=="object"&&O!==null){var Q=O.$$typeof;switch(Q){case t:var te=O.type;switch(te){case l:case u:case r:case i:case a:case f:return te;default:var le=te&&te.$$typeof;switch(le){case o:case c:case d:case p:case s:return le;default:return Q}}case n:return Q}}}var y=l,S=u,T=o,$=s,k=t,C=c,P=r,N=d,A=p,R=n,X=i,U=a,Z=f,ee=!1;function K(O){return ee||(ee=!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.")),E(O)||M(O)===l}function E(O){return M(O)===u}function D(O){return M(O)===o}function B(O){return M(O)===s}function W(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function F(O){return M(O)===c}function I(O){return M(O)===r}function q(O){return M(O)===d}function Y(O){return M(O)===p}function G(O){return M(O)===n}function L(O){return M(O)===i}function j(O){return M(O)===a}function H(O){return M(O)===f}ie.AsyncMode=y,ie.ConcurrentMode=S,ie.ContextConsumer=T,ie.ContextProvider=$,ie.Element=k,ie.ForwardRef=C,ie.Fragment=P,ie.Lazy=N,ie.Memo=A,ie.Portal=R,ie.Profiler=X,ie.StrictMode=U,ie.Suspense=Z,ie.isAsyncMode=K,ie.isConcurrentMode=E,ie.isContextConsumer=D,ie.isContextProvider=B,ie.isElement=W,ie.isForwardRef=F,ie.isFragment=I,ie.isLazy=q,ie.isMemo=Y,ie.isPortal=G,ie.isProfiler=L,ie.isStrictMode=j,ie.isSuspense=H,ie.isValidElementType=_,ie.typeOf=M}()),ie}var cs;function fs(){return cs||(cs=1,process.env.NODE_ENV==="production"?Jn.exports=Qh():Jn.exports=Jh()),Jn.exports}/*
15
+ */var us;function Zh(){return us||(us=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&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,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function _(O){return typeof O=="string"||typeof O=="function"||O===r||O===l||O===i||O===a||O===f||O===h||typeof O=="object"&&O!==null&&(O.$$typeof===d||O.$$typeof===p||O.$$typeof===s||O.$$typeof===o||O.$$typeof===c||O.$$typeof===b||O.$$typeof===g||O.$$typeof===x||O.$$typeof===m)}function M(O){if(typeof O=="object"&&O!==null){var Q=O.$$typeof;switch(Q){case t:var te=O.type;switch(te){case u:case l:case r:case i:case a:case f:return te;default:var ue=te&&te.$$typeof;switch(ue){case o:case c:case d:case p:case s:return ue;default:return Q}}case n:return Q}}}var y=u,S=l,T=o,E=s,k=t,$=c,P=r,N=d,A=p,R=n,X=i,U=a,Z=f,ee=!1;function K(O){return ee||(ee=!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.")),C(O)||M(O)===u}function C(O){return M(O)===l}function D(O){return M(O)===o}function H(O){return M(O)===s}function W(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function F(O){return M(O)===c}function I(O){return M(O)===r}function q(O){return M(O)===d}function Y(O){return M(O)===p}function G(O){return M(O)===n}function L(O){return M(O)===i}function z(O){return M(O)===a}function B(O){return M(O)===f}ie.AsyncMode=y,ie.ConcurrentMode=S,ie.ContextConsumer=T,ie.ContextProvider=E,ie.Element=k,ie.ForwardRef=$,ie.Fragment=P,ie.Lazy=N,ie.Memo=A,ie.Portal=R,ie.Profiler=X,ie.StrictMode=U,ie.Suspense=Z,ie.isAsyncMode=K,ie.isConcurrentMode=C,ie.isContextConsumer=D,ie.isContextProvider=H,ie.isElement=W,ie.isForwardRef=F,ie.isFragment=I,ie.isLazy=q,ie.isMemo=Y,ie.isPortal=G,ie.isProfiler=L,ie.isStrictMode=z,ie.isSuspense=B,ie.isValidElementType=_,ie.typeOf=M}()),ie}var ls;function cs(){return ls||(ls=1,process.env.NODE_ENV==="production"?Jn.exports=Xh():Jn.exports=Zh()),Jn.exports}/*
16
16
  object-assign
17
17
  (c) Sindre Sorhus
18
18
  @license MIT
19
- */var hi,hs;function ed(){if(hs)return hi;hs=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(s).map(function(c){return s[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return hi=a()?Object.assign:function(i,s){for(var o,l=r(i),u,c=1;c<arguments.length;c++){o=Object(arguments[c]);for(var f in o)t.call(o,f)&&(l[f]=o[f]);if(e){u=e(o);for(var h=0;h<u.length;h++)n.call(o,u[h])&&(l[u[h]]=o[u[h]])}}return l},hi}var di,ds;function pi(){if(ds)return di;ds=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return di=e,di}var vi,ps;function vs(){return ps||(ps=1,vi=Function.call.bind(Object.prototype.hasOwnProperty)),vi}var mi,ms;function td(){if(ms)return mi;ms=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=pi(),n={},r=vs();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function a(i,s,o,l,u){if(process.env.NODE_ENV!=="production"){for(var c in i)if(r(i,c)){var f;try{if(typeof i[c]!="function"){var h=Error((l||"React class")+": "+o+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=i[c](s,c,l,o,null,t)}catch(d){f=d}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+o+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var p=u?u():"";e("Failed "+o+" type: "+f.message+(p??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},mi=a,mi}var gi,gs;function nd(){if(gs)return gi;gs=1;var e=fs(),t=ed(),n=pi(),r=vs(),a=td(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return gi=function(o,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(E){var D=E&&(u&&E[u]||E[c]);if(typeof D=="function")return D}var h="<<anonymous>>",p={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:b(),arrayOf:_,element:M(),elementType:y(),instanceOf:S,node:C(),objectOf:$,oneOf:T,oneOfType:k,shape:N,exact:A};function d(E,D){return E===D?E!==0||1/E===1/D:E!==E&&D!==D}function v(E,D){this.message=E,this.data=D&&typeof D=="object"?D:{},this.stack=""}v.prototype=Error.prototype;function x(E){if(process.env.NODE_ENV!=="production")var D={},B=0;function W(I,q,Y,G,L,j,H){if(G=G||h,j=j||Y,H!==n){if(l){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Q=G+":"+Y;!D[Q]&&B<3&&(i("You are manually calling a React.PropTypes validation function for the `"+j+"` prop on `"+G+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),D[Q]=!0,B++)}}return q[Y]==null?I?q[Y]===null?new v("The "+L+" `"+j+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new v("The "+L+" `"+j+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:E(q,Y,G,L,j)}var F=W.bind(null,!1);return F.isRequired=W.bind(null,!0),F}function g(E){function D(B,W,F,I,q,Y){var G=B[W],L=U(G);if(L!==E){var j=Z(G);return new v("Invalid "+I+" `"+q+"` of type "+("`"+j+"` supplied to `"+F+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return x(D)}function b(){return x(s)}function _(E){function D(B,W,F,I,q){if(typeof E!="function")return new v("Property `"+q+"` of component `"+F+"` has invalid PropType notation inside arrayOf.");var Y=B[W];if(!Array.isArray(Y)){var G=U(Y);return new v("Invalid "+I+" `"+q+"` of type "+("`"+G+"` supplied to `"+F+"`, expected an array."))}for(var L=0;L<Y.length;L++){var j=E(Y,L,F,I,q+"["+L+"]",n);if(j instanceof Error)return j}return null}return x(D)}function M(){function E(D,B,W,F,I){var q=D[B];if(!o(q)){var Y=U(q);return new v("Invalid "+F+" `"+I+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return x(E)}function y(){function E(D,B,W,F,I){var q=D[B];if(!e.isValidElementType(q)){var Y=U(q);return new v("Invalid "+F+" `"+I+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return x(E)}function S(E){function D(B,W,F,I,q){if(!(B[W]instanceof E)){var Y=E.name||h,G=K(B[W]);return new v("Invalid "+I+" `"+q+"` of type "+("`"+G+"` supplied to `"+F+"`, expected ")+("instance of `"+Y+"`."))}return null}return x(D)}function T(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function D(B,W,F,I,q){for(var Y=B[W],G=0;G<E.length;G++)if(d(Y,E[G]))return null;var L=JSON.stringify(E,function(H,O){var Q=Z(O);return Q==="symbol"?String(O):O});return new v("Invalid "+I+" `"+q+"` of value `"+String(Y)+"` "+("supplied to `"+F+"`, expected one of "+L+"."))}return x(D)}function $(E){function D(B,W,F,I,q){if(typeof E!="function")return new v("Property `"+q+"` of component `"+F+"` has invalid PropType notation inside objectOf.");var Y=B[W],G=U(Y);if(G!=="object")return new v("Invalid "+I+" `"+q+"` of type "+("`"+G+"` supplied to `"+F+"`, expected an object."));for(var L in Y)if(r(Y,L)){var j=E(Y,L,F,I,q+"."+L,n);if(j instanceof Error)return j}return null}return x(D)}function k(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var D=0;D<E.length;D++){var B=E[D];if(typeof B!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ee(B)+" at index "+D+"."),s}function W(F,I,q,Y,G){for(var L=[],j=0;j<E.length;j++){var H=E[j],O=H(F,I,q,Y,G,n);if(O==null)return null;O.data&&r(O.data,"expectedType")&&L.push(O.data.expectedType)}var Q=L.length>0?", expected one of type ["+L.join(", ")+"]":"";return new v("Invalid "+Y+" `"+G+"` supplied to "+("`"+q+"`"+Q+"."))}return x(W)}function C(){function E(D,B,W,F,I){return R(D[B])?null:new v("Invalid "+F+" `"+I+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return x(E)}function P(E,D,B,W,F){return new v((E||"React class")+": "+D+" type `"+B+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+F+"`.")}function N(E){function D(B,W,F,I,q){var Y=B[W],G=U(Y);if(G!=="object")return new v("Invalid "+I+" `"+q+"` of type `"+G+"` "+("supplied to `"+F+"`, expected `object`."));for(var L in E){var j=E[L];if(typeof j!="function")return P(F,I,q,L,Z(j));var H=j(Y,L,F,I,q+"."+L,n);if(H)return H}return null}return x(D)}function A(E){function D(B,W,F,I,q){var Y=B[W],G=U(Y);if(G!=="object")return new v("Invalid "+I+" `"+q+"` of type `"+G+"` "+("supplied to `"+F+"`, expected `object`."));var L=t({},B[W],E);for(var j in L){var H=E[j];if(r(E,j)&&typeof H!="function")return P(F,I,q,j,Z(H));if(!H)return new v("Invalid "+I+" `"+q+"` key `"+j+"` supplied to `"+F+"`.\nBad object: "+JSON.stringify(B[W],null," ")+`
20
- Valid keys: `+JSON.stringify(Object.keys(E),null," "));var O=H(Y,j,F,I,q+"."+j,n);if(O)return O}return null}return x(D)}function R(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(R);if(E===null||o(E))return!0;var D=f(E);if(D){var B=D.call(E),W;if(D!==E.entries){for(;!(W=B.next()).done;)if(!R(W.value))return!1}else for(;!(W=B.next()).done;){var F=W.value;if(F&&!R(F[1]))return!1}}else return!1;return!0;default:return!1}}function X(E,D){return E==="symbol"?!0:D?D["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&D instanceof Symbol:!1}function U(E){var D=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":X(D,E)?"symbol":D}function Z(E){if(typeof E>"u"||E===null)return""+E;var D=U(E);if(D==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return D}function ee(E){var D=Z(E);switch(D){case"array":case"object":return"an "+D;case"boolean":case"date":case"regexp":return"a "+D;default:return D}}function K(E){return!E.constructor||!E.constructor.name?h:E.constructor.name}return p.checkPropTypes=a,p.resetWarningCache=a.resetWarningCache,p.PropTypes=p,p},gi}var yi,ys;function rd(){if(ys)return yi;ys=1;var e=pi();function t(){}function n(){}return n.resetWarningCache=t,yi=function(){function r(s,o,l,u,c,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function a(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},yi}if(process.env.NODE_ENV!=="production"){var id=fs(),ad=!0;fi.exports=nd()(id.isElement,ad)}else fi.exports=rd()();var er=fi.exports;const w=Dt(er);var bs={exports:{}};/*!
19
+ */var hi,fs;function Qh(){if(fs)return hi;fs=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var u=Object.getOwnPropertyNames(s).map(function(c){return s[c]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(c){l[c]=c}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return hi=a()?Object.assign:function(i,s){for(var o,u=r(i),l,c=1;c<arguments.length;c++){o=Object(arguments[c]);for(var f in o)t.call(o,f)&&(u[f]=o[f]);if(e){l=e(o);for(var h=0;h<l.length;h++)n.call(o,l[h])&&(u[l[h]]=o[l[h]])}}return u},hi}var di,hs;function pi(){if(hs)return di;hs=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return di=e,di}var mi,ds;function ps(){return ds||(ds=1,mi=Function.call.bind(Object.prototype.hasOwnProperty)),mi}var gi,ms;function Jh(){if(ms)return gi;ms=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=pi(),n={},r=ps();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function a(i,s,o,u,l){if(process.env.NODE_ENV!=="production"){for(var c in i)if(r(i,c)){var f;try{if(typeof i[c]!="function"){var h=Error((u||"React class")+": "+o+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=i[c](s,c,u,o,null,t)}catch(d){f=d}if(f&&!(f instanceof Error)&&e((u||"React class")+": type specification of "+o+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var p=l?l():"";e("Failed "+o+" type: "+f.message+(p??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},gi=a,gi}var vi,gs;function ed(){if(gs)return vi;gs=1;var e=cs(),t=Qh(),n=pi(),r=ps(),a=Jh(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(o){var u="Warning: "+o;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function s(){return null}return vi=function(o,u){var l=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(C){var D=C&&(l&&C[l]||C[c]);if(typeof D=="function")return D}var h="<<anonymous>>",p={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:x(),arrayOf:_,element:M(),elementType:y(),instanceOf:S,node:$(),objectOf:E,oneOf:T,oneOfType:k,shape:N,exact:A};function d(C,D){return C===D?C!==0||1/C===1/D:C!==C&&D!==D}function m(C,D){this.message=C,this.data=D&&typeof D=="object"?D:{},this.stack=""}m.prototype=Error.prototype;function b(C){if(process.env.NODE_ENV!=="production")var D={},H=0;function W(I,q,Y,G,L,z,B){if(G=G||h,z=z||Y,B!==n){if(u){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Q=G+":"+Y;!D[Q]&&H<3&&(i("You are manually calling a React.PropTypes validation function for the `"+z+"` prop on `"+G+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),D[Q]=!0,H++)}}return q[Y]==null?I?q[Y]===null?new m("The "+L+" `"+z+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new m("The "+L+" `"+z+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:C(q,Y,G,L,z)}var F=W.bind(null,!1);return F.isRequired=W.bind(null,!0),F}function g(C){function D(H,W,F,I,q,Y){var G=H[W],L=U(G);if(L!==C){var z=Z(G);return new m("Invalid "+I+" `"+q+"` of type "+("`"+z+"` supplied to `"+F+"`, expected ")+("`"+C+"`."),{expectedType:C})}return null}return b(D)}function x(){return b(s)}function _(C){function D(H,W,F,I,q){if(typeof C!="function")return new m("Property `"+q+"` of component `"+F+"` has invalid PropType notation inside arrayOf.");var Y=H[W];if(!Array.isArray(Y)){var G=U(Y);return new m("Invalid "+I+" `"+q+"` of type "+("`"+G+"` supplied to `"+F+"`, expected an array."))}for(var L=0;L<Y.length;L++){var z=C(Y,L,F,I,q+"["+L+"]",n);if(z instanceof Error)return z}return null}return b(D)}function M(){function C(D,H,W,F,I){var q=D[H];if(!o(q)){var Y=U(q);return new m("Invalid "+F+" `"+I+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return b(C)}function y(){function C(D,H,W,F,I){var q=D[H];if(!e.isValidElementType(q)){var Y=U(q);return new m("Invalid "+F+" `"+I+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return b(C)}function S(C){function D(H,W,F,I,q){if(!(H[W]instanceof C)){var Y=C.name||h,G=K(H[W]);return new m("Invalid "+I+" `"+q+"` of type "+("`"+G+"` supplied to `"+F+"`, expected ")+("instance of `"+Y+"`."))}return null}return b(D)}function T(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function D(H,W,F,I,q){for(var Y=H[W],G=0;G<C.length;G++)if(d(Y,C[G]))return null;var L=JSON.stringify(C,function(B,O){var Q=Z(O);return Q==="symbol"?String(O):O});return new m("Invalid "+I+" `"+q+"` of value `"+String(Y)+"` "+("supplied to `"+F+"`, expected one of "+L+"."))}return b(D)}function E(C){function D(H,W,F,I,q){if(typeof C!="function")return new m("Property `"+q+"` of component `"+F+"` has invalid PropType notation inside objectOf.");var Y=H[W],G=U(Y);if(G!=="object")return new m("Invalid "+I+" `"+q+"` of type "+("`"+G+"` supplied to `"+F+"`, expected an object."));for(var L in Y)if(r(Y,L)){var z=C(Y,L,F,I,q+"."+L,n);if(z instanceof Error)return z}return null}return b(D)}function k(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var D=0;D<C.length;D++){var H=C[D];if(typeof H!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ee(H)+" at index "+D+"."),s}function W(F,I,q,Y,G){for(var L=[],z=0;z<C.length;z++){var B=C[z],O=B(F,I,q,Y,G,n);if(O==null)return null;O.data&&r(O.data,"expectedType")&&L.push(O.data.expectedType)}var Q=L.length>0?", expected one of type ["+L.join(", ")+"]":"";return new m("Invalid "+Y+" `"+G+"` supplied to "+("`"+q+"`"+Q+"."))}return b(W)}function $(){function C(D,H,W,F,I){return R(D[H])?null:new m("Invalid "+F+" `"+I+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return b(C)}function P(C,D,H,W,F){return new m((C||"React class")+": "+D+" type `"+H+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+F+"`.")}function N(C){function D(H,W,F,I,q){var Y=H[W],G=U(Y);if(G!=="object")return new m("Invalid "+I+" `"+q+"` of type `"+G+"` "+("supplied to `"+F+"`, expected `object`."));for(var L in C){var z=C[L];if(typeof z!="function")return P(F,I,q,L,Z(z));var B=z(Y,L,F,I,q+"."+L,n);if(B)return B}return null}return b(D)}function A(C){function D(H,W,F,I,q){var Y=H[W],G=U(Y);if(G!=="object")return new m("Invalid "+I+" `"+q+"` of type `"+G+"` "+("supplied to `"+F+"`, expected `object`."));var L=t({},H[W],C);for(var z in L){var B=C[z];if(r(C,z)&&typeof B!="function")return P(F,I,q,z,Z(B));if(!B)return new m("Invalid "+I+" `"+q+"` key `"+z+"` supplied to `"+F+"`.\nBad object: "+JSON.stringify(H[W],null," ")+`
20
+ Valid keys: `+JSON.stringify(Object.keys(C),null," "));var O=B(Y,z,F,I,q+"."+z,n);if(O)return O}return null}return b(D)}function R(C){switch(typeof C){case"number":case"string":case"undefined":return!0;case"boolean":return!C;case"object":if(Array.isArray(C))return C.every(R);if(C===null||o(C))return!0;var D=f(C);if(D){var H=D.call(C),W;if(D!==C.entries){for(;!(W=H.next()).done;)if(!R(W.value))return!1}else for(;!(W=H.next()).done;){var F=W.value;if(F&&!R(F[1]))return!1}}else return!1;return!0;default:return!1}}function X(C,D){return C==="symbol"?!0:D?D["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&D instanceof Symbol:!1}function U(C){var D=typeof C;return Array.isArray(C)?"array":C instanceof RegExp?"object":X(D,C)?"symbol":D}function Z(C){if(typeof C>"u"||C===null)return""+C;var D=U(C);if(D==="object"){if(C instanceof Date)return"date";if(C instanceof RegExp)return"regexp"}return D}function ee(C){var D=Z(C);switch(D){case"array":case"object":return"an "+D;case"boolean":case"date":case"regexp":return"a "+D;default:return D}}function K(C){return!C.constructor||!C.constructor.name?h:C.constructor.name}return p.checkPropTypes=a,p.resetWarningCache=a.resetWarningCache,p.PropTypes=p,p},vi}var yi,vs;function td(){if(vs)return yi;vs=1;var e=pi();function t(){}function n(){}return n.resetWarningCache=t,yi=function(){function r(s,o,u,l,c,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function a(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},yi}if(process.env.NODE_ENV!=="production"){var nd=cs(),rd=!0;fi.exports=ed()(nd.isElement,rd)}else fi.exports=td()();var er=fi.exports;const w=tn(er);var ys={exports:{}};/*!
21
21
  Copyright (c) 2018 Jed Watson.
22
22
  Licensed under the MIT License (MIT), see
23
23
  http://jedwatson.github.io/classnames
24
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",s=0;s<arguments.length;s++){var o=arguments[s];o&&(i=a(i,r(o)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var s="";for(var o in i)t.call(i,o)&&i[o]&&(s=a(s,o));return s}function a(i,s){return s?i?i+" "+s:i+s:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(bs);var nn=bs.exports;const ve=Dt(nn);var od=["top","left","transform","className","children","innerRef"];function bi(){return bi=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},bi.apply(this,arguments)}function sd(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function rn(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.transform,s=e.className,o=e.children,l=e.innerRef,u=sd(e,od);return m.createElement("g",bi({ref:l,className:ve("visx-group",s),transform:i||"translate("+a+", "+n+")"},u),o)}rn.propTypes={top:w.number,left:w.number,transform:w.string,className:w.string,children:w.node,innerRef:w.oneOfType([w.string,w.func,w.object])};var xi=Math.PI,_i=2*xi,vt=1e-6,ld=_i-vt;function wi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function zt(){return new wi}wi.prototype=zt.prototype={constructor:wi,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,a,i){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+i)},arcTo:function(e,t,n,r,a){e=+e,t=+t,n=+n,r=+r,a=+a;var i=this._x1,s=this._y1,o=n-e,l=r-t,u=i-e,c=s-t,f=u*u+c*c;if(a<0)throw new Error("negative radius: "+a);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>vt)if(!(Math.abs(c*o-l*u)>vt)||!a)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var h=n-i,p=r-s,d=o*o+l*l,v=h*h+p*p,x=Math.sqrt(d),g=Math.sqrt(f),b=a*Math.tan((xi-Math.acos((d+f-v)/(2*x*g)))/2),_=b/g,M=b/x;Math.abs(_-1)>vt&&(this._+="L"+(e+_*u)+","+(t+_*c)),this._+="A"+a+","+a+",0,0,"+ +(c*h>u*p)+","+(this._x1=e+M*o)+","+(this._y1=t+M*l)}},arc:function(e,t,n,r,a,i){e=+e,t=+t,n=+n,i=!!i;var s=n*Math.cos(r),o=n*Math.sin(r),l=e+s,u=t+o,c=1^i,f=i?r-a:a-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>vt||Math.abs(this._y1-u)>vt)&&(this._+="L"+l+","+u),n&&(f<0&&(f=f%_i+_i),f>ld?this._+="A"+n+","+n+",0,1,"+c+","+(e-s)+","+(t-o)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):f>vt&&(this._+="A"+n+","+n+",0,"+ +(f>=xi)+","+c+","+(this._x1=e+n*Math.cos(a))+","+(this._y1=t+n*Math.sin(a))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function J(e){return function(){return e}}var xs=Math.abs,me=Math.atan2,mt=Math.cos,ud=Math.max,Si=Math.min,Ie=Math.sin,jt=Math.sqrt,ge=1e-12,nt=Math.PI,tr=nt/2,rt=2*nt;function cd(e){return e>1?0:e<-1?nt:Math.acos(e)}function _s(e){return e>=1?tr:e<=-1?-tr:Math.asin(e)}function fd(e){return e.innerRadius}function hd(e){return e.outerRadius}function dd(e){return e.startAngle}function pd(e){return e.endAngle}function vd(e){return e&&e.padAngle}function md(e,t,n,r,a,i,s,o){var l=n-e,u=r-t,c=s-a,f=o-i,h=f*l-c*u;if(!(h*h<ge))return h=(c*(t-i)-f*(e-a))/h,[e+h*l,t+h*u]}function nr(e,t,n,r,a,i,s){var o=e-n,l=t-r,u=(s?i:-i)/jt(o*o+l*l),c=u*l,f=-u*o,h=e+c,p=t+f,d=n+c,v=r+f,x=(h+d)/2,g=(p+v)/2,b=d-h,_=v-p,M=b*b+_*_,y=a-i,S=h*v-d*p,T=(_<0?-1:1)*jt(ud(0,y*y*M-S*S)),$=(S*_-b*T)/M,k=(-S*b-_*T)/M,C=(S*_+b*T)/M,P=(-S*b+_*T)/M,N=$-x,A=k-g,R=C-x,X=P-g;return N*N+A*A>R*R+X*X&&($=C,k=P),{cx:$,cy:k,x01:-c,y01:-f,x11:$*(a/y-1),y11:k*(a/y-1)}}function gd(){var e=fd,t=hd,n=J(0),r=null,a=dd,i=pd,s=vd,o=null;function l(){var u,c,f=+e.apply(this,arguments),h=+t.apply(this,arguments),p=a.apply(this,arguments)-tr,d=i.apply(this,arguments)-tr,v=xs(d-p),x=d>p;if(o||(o=u=zt()),h<f&&(c=h,h=f,f=c),!(h>ge))o.moveTo(0,0);else if(v>rt-ge)o.moveTo(h*mt(p),h*Ie(p)),o.arc(0,0,h,p,d,!x),f>ge&&(o.moveTo(f*mt(d),f*Ie(d)),o.arc(0,0,f,d,p,x));else{var g=p,b=d,_=p,M=d,y=v,S=v,T=s.apply(this,arguments)/2,$=T>ge&&(r?+r.apply(this,arguments):jt(f*f+h*h)),k=Si(xs(h-f)/2,+n.apply(this,arguments)),C=k,P=k,N,A;if($>ge){var R=_s($/f*Ie(T)),X=_s($/h*Ie(T));(y-=R*2)>ge?(R*=x?1:-1,_+=R,M-=R):(y=0,_=M=(p+d)/2),(S-=X*2)>ge?(X*=x?1:-1,g+=X,b-=X):(S=0,g=b=(p+d)/2)}var U=h*mt(g),Z=h*Ie(g),ee=f*mt(M),K=f*Ie(M);if(k>ge){var E=h*mt(b),D=h*Ie(b),B=f*mt(_),W=f*Ie(_),F;if(v<nt&&(F=md(U,Z,B,W,E,D,ee,K))){var I=U-F[0],q=Z-F[1],Y=E-F[0],G=D-F[1],L=1/Ie(cd((I*Y+q*G)/(jt(I*I+q*q)*jt(Y*Y+G*G)))/2),j=jt(F[0]*F[0]+F[1]*F[1]);C=Si(k,(f-j)/(L-1)),P=Si(k,(h-j)/(L+1))}}S>ge?P>ge?(N=nr(B,W,U,Z,h,P,x),A=nr(E,D,ee,K,h,P,x),o.moveTo(N.cx+N.x01,N.cy+N.y01),P<k?o.arc(N.cx,N.cy,P,me(N.y01,N.x01),me(A.y01,A.x01),!x):(o.arc(N.cx,N.cy,P,me(N.y01,N.x01),me(N.y11,N.x11),!x),o.arc(0,0,h,me(N.cy+N.y11,N.cx+N.x11),me(A.cy+A.y11,A.cx+A.x11),!x),o.arc(A.cx,A.cy,P,me(A.y11,A.x11),me(A.y01,A.x01),!x))):(o.moveTo(U,Z),o.arc(0,0,h,g,b,!x)):o.moveTo(U,Z),!(f>ge)||!(y>ge)?o.lineTo(ee,K):C>ge?(N=nr(ee,K,E,D,f,-C,x),A=nr(U,Z,B,W,f,-C,x),o.lineTo(N.cx+N.x01,N.cy+N.y01),C<k?o.arc(N.cx,N.cy,C,me(N.y01,N.x01),me(A.y01,A.x01),!x):(o.arc(N.cx,N.cy,C,me(N.y01,N.x01),me(N.y11,N.x11),!x),o.arc(0,0,f,me(N.cy+N.y11,N.cx+N.x11),me(A.cy+A.y11,A.cx+A.x11),x),o.arc(A.cx,A.cy,C,me(A.y11,A.x11),me(A.y01,A.x01),!x))):o.arc(0,0,f,M,_,x)}if(o.closePath(),u)return o=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,c=(+a.apply(this,arguments)+ +i.apply(this,arguments))/2-nt/2;return[mt(c)*u,Ie(c)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:J(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:J(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:J(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:J(+u),l):r},l.startAngle=function(u){return arguments.length?(a=typeof u=="function"?u:J(+u),l):a},l.endAngle=function(u){return arguments.length?(i=typeof u=="function"?u:J(+u),l):i},l.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:J(+u),l):s},l.context=function(u){return arguments.length?(o=u??null,l):o},l}function ws(e){this._context=e}ws.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function rr(e){return new ws(e)}function Ti(e){return e[0]}function Oi(e){return e[1]}function ki(){var e=Ti,t=Oi,n=J(!0),r=null,a=rr,i=null;function s(o){var l,u=o.length,c,f=!1,h;for(r==null&&(i=a(h=zt())),l=0;l<=u;++l)!(l<u&&n(c=o[l],l,o))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(c,l,o),+t(c,l,o));if(h)return i=null,h+""||null}return s.x=function(o){return arguments.length?(e=typeof o=="function"?o:J(+o),s):e},s.y=function(o){return arguments.length?(t=typeof o=="function"?o:J(+o),s):t},s.defined=function(o){return arguments.length?(n=typeof o=="function"?o:J(!!o),s):n},s.curve=function(o){return arguments.length?(a=o,r!=null&&(i=a(r)),s):a},s.context=function(o){return arguments.length?(o==null?r=i=null:i=a(r=o),s):r},s}function Ss(){var e=Ti,t=null,n=J(0),r=Oi,a=J(!0),i=null,s=rr,o=null;function l(c){var f,h,p,d=c.length,v,x=!1,g,b=new Array(d),_=new Array(d);for(i==null&&(o=s(g=zt())),f=0;f<=d;++f){if(!(f<d&&a(v=c[f],f,c))===x)if(x=!x)h=f,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=f-1;p>=h;--p)o.point(b[p],_[p]);o.lineEnd(),o.areaEnd()}x&&(b[f]=+e(v,f,c),_[f]=+n(v,f,c),o.point(t?+t(v,f,c):b[f],r?+r(v,f,c):_[f]))}if(g)return o=null,g+""||null}function u(){return ki().defined(a).curve(s).context(i)}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:J(+c),t=null,l):e},l.x0=function(c){return arguments.length?(e=typeof c=="function"?c:J(+c),l):e},l.x1=function(c){return arguments.length?(t=c==null?null:typeof c=="function"?c:J(+c),l):t},l.y=function(c){return arguments.length?(n=typeof c=="function"?c:J(+c),r=null,l):n},l.y0=function(c){return arguments.length?(n=typeof c=="function"?c:J(+c),l):n},l.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:J(+c),l):r},l.lineX0=l.lineY0=function(){return u().x(e).y(n)},l.lineY1=function(){return u().x(e).y(r)},l.lineX1=function(){return u().x(t).y(n)},l.defined=function(c){return arguments.length?(a=typeof c=="function"?c:J(!!c),l):a},l.curve=function(c){return arguments.length?(s=c,i!=null&&(o=s(i)),l):s},l.context=function(c){return arguments.length?(c==null?i=o=null:o=s(i=c),l):i},l}function yd(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function bd(e){return e}function xd(){var e=bd,t=yd,n=null,r=J(0),a=J(rt),i=J(0);function s(o){var l,u=o.length,c,f,h=0,p=new Array(u),d=new Array(u),v=+r.apply(this,arguments),x=Math.min(rt,Math.max(-rt,a.apply(this,arguments)-v)),g,b=Math.min(Math.abs(x)/u,i.apply(this,arguments)),_=b*(x<0?-1:1),M;for(l=0;l<u;++l)(M=d[p[l]=l]=+e(o[l],l,o))>0&&(h+=M);for(t!=null?p.sort(function(y,S){return t(d[y],d[S])}):n!=null&&p.sort(function(y,S){return n(o[y],o[S])}),l=0,f=h?(x-u*_)/h:0;l<u;++l,v=g)c=p[l],M=d[c],g=v+(M>0?M*f:0)+_,d[c]={data:o[c],index:l,value:M,startAngle:v,endAngle:g,padAngle:b};return d}return s.value=function(o){return arguments.length?(e=typeof o=="function"?o:J(+o),s):e},s.sortValues=function(o){return arguments.length?(t=o,n=null,s):t},s.sort=function(o){return arguments.length?(n=o,t=null,s):n},s.startAngle=function(o){return arguments.length?(r=typeof o=="function"?o:J(+o),s):r},s.endAngle=function(o){return arguments.length?(a=typeof o=="function"?o:J(+o),s):a},s.padAngle=function(o){return arguments.length?(i=typeof o=="function"?o:J(+o),s):i},s}var Ts=Mi(rr);function Os(e){this._curve=e}Os.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Mi(e){function t(n){return new Os(e(n))}return t._curve=e,t}function an(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Mi(n)):t()._curve},e}function ks(){return an(ki().curve(Ts))}function Ms(){var e=Ss().curve(Ts),t=e.curve,n=e.lineX0,r=e.lineX1,a=e.lineY0,i=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return an(n())},delete e.lineX0,e.lineEndAngle=function(){return an(r())},delete e.lineX1,e.lineInnerRadius=function(){return an(a())},delete e.lineY0,e.lineOuterRadius=function(){return an(i())},delete e.lineY1,e.curve=function(s){return arguments.length?t(Mi(s)):t()._curve},e}function on(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var $i=Array.prototype.slice;function _d(e){return e.source}function wd(e){return e.target}function Ci(e){var t=_d,n=wd,r=Ti,a=Oi,i=null;function s(){var o,l=$i.call(arguments),u=t.apply(this,l),c=n.apply(this,l);if(i||(i=o=zt()),e(i,+r.apply(this,(l[0]=u,l)),+a.apply(this,l),+r.apply(this,(l[0]=c,l)),+a.apply(this,l)),o)return i=null,o+""||null}return s.source=function(o){return arguments.length?(t=o,s):t},s.target=function(o){return arguments.length?(n=o,s):n},s.x=function(o){return arguments.length?(r=typeof o=="function"?o:J(+o),s):r},s.y=function(o){return arguments.length?(a=typeof o=="function"?o:J(+o),s):a},s.context=function(o){return arguments.length?(i=o??null,s):i},s}function Sd(e,t,n,r,a){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,a,r,a)}function Td(e,t,n,r,a){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+a)/2,r,n,r,a)}function Od(e,t,n,r,a){var i=on(t,n),s=on(t,n=(n+a)/2),o=on(r,n),l=on(r,a);e.moveTo(i[0],i[1]),e.bezierCurveTo(s[0],s[1],o[0],o[1],l[0],l[1])}function kd(){return Ci(Sd)}function Md(){return Ci(Td)}function $d(){var e=Ci(Od);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const Ei={draw:function(e,t){var n=Math.sqrt(t/nt);e.moveTo(n,0),e.arc(0,0,n,0,rt)}},$s={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};var Cs=Math.sqrt(1/3),Cd=Cs*2;const Es={draw:function(e,t){var n=Math.sqrt(t/Cd),r=n*Cs;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}};var Ed=.8908130915292852,Ps=Math.sin(nt/10)/Math.sin(7*nt/10),Pd=Math.sin(rt/10)*Ps,Nd=-Math.cos(rt/10)*Ps;const Ns={draw:function(e,t){var n=Math.sqrt(t*Ed),r=Pd*n,a=Nd*n;e.moveTo(0,-n),e.lineTo(r,a);for(var i=1;i<5;++i){var s=rt*i/5,o=Math.cos(s),l=Math.sin(s);e.lineTo(l*n,-o*n),e.lineTo(o*r-l*a,l*r+o*a)}e.closePath()}},Ls={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}};var Pi=Math.sqrt(3);const As={draw:function(e,t){var n=-Math.sqrt(t/(Pi*3));e.moveTo(0,n*2),e.lineTo(-Pi*n,-n),e.lineTo(Pi*n,-n),e.closePath()}};var Me=-.5,$e=Math.sqrt(3)/2,Ni=1/Math.sqrt(12),Ld=(Ni/2+1)*3;const Ds={draw:function(e,t){var n=Math.sqrt(t/Ld),r=n/2,a=n*Ni,i=r,s=n*Ni+n,o=-i,l=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(o,l),e.lineTo(Me*r-$e*a,$e*r+Me*a),e.lineTo(Me*i-$e*s,$e*i+Me*s),e.lineTo(Me*o-$e*l,$e*o+Me*l),e.lineTo(Me*r+$e*a,Me*a-$e*r),e.lineTo(Me*i+$e*s,Me*s-$e*i),e.lineTo(Me*o+$e*l,Me*l-$e*o),e.closePath()}};var Ad=[Ei,$s,Es,Ls,Ns,As,Ds];function Dd(){var e=J(Ei),t=J(64),n=null;function r(){var a;if(n||(n=a=zt()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return r.type=function(a){return arguments.length?(e=typeof a=="function"?a:J(a),r):e},r.size=function(a){return arguments.length?(t=typeof a=="function"?a:J(+a),r):t},r.context=function(a){return arguments.length?(n=a??null,r):n},r}function it(){}function ir(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 ar(e){this._context=e}ar.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:ir(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:ir(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zd(e){return new ar(e)}function zs(e){this._context=e}zs.prototype={areaStart:it,areaEnd:it,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);break}}},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:ir(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jd(e){return new zs(e)}function js(e){this._context=e}js.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||this._line!==0&&this._point===3)&&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:ir(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Fd(e){return new js(e)}function Fs(e,t){this._basis=new ar(e),this._beta=t}Fs.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=e[0],a=t[0],i=e[n]-r,s=t[n]-a,o=-1,l;++o<=n;)l=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+l*i),this._beta*t[o]+(1-this._beta)*(a+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Id=function e(t){function n(r){return t===1?new ar(r):new Fs(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function or(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 Li(e,t){this._context=e,this._k=(1-t)/6}Li.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:or(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:or(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Rd=function e(t){function n(r){return new Li(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Ai(e,t){this._context=e,this._k=(1-t)/6}Ai.prototype={areaStart:it,areaEnd:it,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);break}}},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:or(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Wd=function e(t){function n(r){return new Ai(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Di(e,t){this._context=e,this._k=(1-t)/6}Di.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||this._line!==0&&this._point===3)&&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:or(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Bd=function e(t){function n(r){return new Di(r,t)}return n.tension=function(r){return e(+r)},n}(0);function zi(e,t,n){var r=e._x1,a=e._y1,i=e._x2,s=e._y2;if(e._l01_a>ge){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ge){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);i=(i*u+e._x1*e._l23_2a-t*e._l12_2a)/c,s=(s*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,a,i,s,e._x2,e._y2)}function Is(e,t){this._context=e,this._alpha=t}Is.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);break}(this._line||this._line!==0&&this._point===1)&&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:zi(this,e,t);break}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 Hd=function e(t){function n(r){return t?new Is(r,t):new Li(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Rs(e,t){this._context=e,this._alpha=t}Rs.prototype={areaStart:it,areaEnd:it,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);break}}},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:zi(this,e,t);break}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 Ud=function e(t){function n(r){return t?new Rs(r,t):new Ai(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Ws(e,t){this._context=e,this._alpha=t}Ws.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||this._line!==0&&this._point===3)&&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:zi(this,e,t);break}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 qd=function e(t){function n(r){return t?new Ws(r,t):new Di(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Bs(e){this._context=e}Bs.prototype={areaStart:it,areaEnd:it,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Yd(e){return new Bs(e)}function Hs(e){return e<0?-1:1}function Us(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),o=(i*a+s*r)/(r+a);return(Hs(i)+Hs(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function qs(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ji(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,s-o*n,i,s)}function sr(e){this._context=e}sr.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:ji(this,this._t0,qs(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(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,ji(this,qs(this,n=Us(this,e,t)),n);break;default:ji(this,this._t0,n=Us(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Ys(e){this._context=new Vs(e)}(Ys.prototype=Object.create(sr.prototype)).point=function(e,t){sr.prototype.point.call(this,t,e)};function Vs(e){this._context=e}Vs.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,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function Vd(e){return new sr(e)}function Gd(e){return new Ys(e)}function Gs(e){this._context=e}Gs.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]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Ks(e),a=Ks(t),i=0,s=1;s<n;++i,++s)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[s],t[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Ks(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),s=new Array(n);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,s[t]-=r*s[t-1];for(a[n-1]=s[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function Kd(e){return new Gs(e)}function lr(e,t){this._context=e,this._t=t}lr.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&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)}break}}this._x=e,this._y=t}};function Xd(e){return new lr(e,.5)}function Zd(e){return new lr(e,0)}function Qd(e){return new lr(e,1)}function gt(e,t){if((s=e.length)>1)for(var n=1,r,a,i=e[t[0]],s,o=i.length;n<s;++n)for(a=i,i=e[t[n]],r=0;r<o;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function yt(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Jd(e,t){return e[t]}function Xs(){var e=J([]),t=yt,n=gt,r=Jd;function a(i){var s=e.apply(this,arguments),o,l=i.length,u=s.length,c=new Array(u),f;for(o=0;o<u;++o){for(var h=s[o],p=c[o]=new Array(l),d=0,v;d<l;++d)p[d]=v=[0,+r(i[d],h,d,i)],v.data=i[d];p.key=h}for(o=0,f=t(c);o<u;++o)c[f[o]].index=o;return n(c,f),c}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:J($i.call(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:J(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?yt:typeof i=="function"?i:J($i.call(i)),a):t},a.offset=function(i){return arguments.length?(n=i??gt,a):n},a}function Zs(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,s;a<i;++a){for(s=n=0;n<r;++n)s+=e[n][a][1]||0;if(s)for(n=0;n<r;++n)e[n][a][1]/=s}gt(e,t)}}function Qs(e,t){if((l=e.length)>0)for(var n,r=0,a,i,s,o,l,u=e[t[0]].length;r<u;++r)for(s=o=0,n=0;n<l;++n)(i=(a=e[t[n]][r])[1]-a[0])>0?(a[0]=s,a[1]=s+=i):i<0?(a[1]=o,a[0]=o+=i):(a[0]=0,a[1]=i)}function Js(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var s=0,o=0;s<a;++s)o+=e[s][n][1]||0;r[n][1]+=r[n][0]=-o/2}gt(e,t)}}function el(e,t){if(!(!((s=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,s;r<i;++r){for(var o=0,l=0,u=0;o<s;++o){for(var c=e[t[o]],f=c[r][1]||0,h=c[r-1][1]||0,p=(f-h)/2,d=0;d<o;++d){var v=e[t[d]],x=v[r][1]||0,g=v[r-1][1]||0;p+=x-g}l+=f,u+=p*f}a[r-1][1]+=a[r-1][0]=n,l&&(n-=u/l)}a[r-1][1]+=a[r-1][0]=n,gt(e,t)}}function tl(e){var t=e.map(ep);return yt(e).sort(function(n,r){return t[n]-t[r]})}function ep(e){for(var t=-1,n=0,r=e.length,a,i=-1/0;++t<r;)(a=+e[t][1])>i&&(i=a,n=t);return n}function Fi(e){var t=e.map(nl);return yt(e).sort(function(n,r){return t[n]-t[r]})}function nl(e){for(var t=0,n=-1,r=e.length,a;++n<r;)(a=+e[n][1])&&(t+=a);return t}function rl(e){return Fi(e).reverse()}function il(e){var t=e.length,n,r,a=e.map(nl),i=tl(e),s=0,o=0,l=[],u=[];for(n=0;n<t;++n)r=i[n],s<o?(s+=a[r],l.push(r)):(o+=a[r],u.push(r));return u.reverse().concat(l)}function al(e){return yt(e).reverse()}const tp=Object.freeze(Object.defineProperty({__proto__:null,arc:gd,area:Ss,areaRadial:Ms,curveBasis:zd,curveBasisClosed:jd,curveBasisOpen:Fd,curveBundle:Id,curveCardinal:Rd,curveCardinalClosed:Wd,curveCardinalOpen:Bd,curveCatmullRom:Hd,curveCatmullRomClosed:Ud,curveCatmullRomOpen:qd,curveLinear:rr,curveLinearClosed:Yd,curveMonotoneX:Vd,curveMonotoneY:Gd,curveNatural:Kd,curveStep:Xd,curveStepAfter:Qd,curveStepBefore:Zd,line:ki,lineRadial:ks,linkHorizontal:kd,linkRadial:$d,linkVertical:Md,pie:xd,pointRadial:on,radialArea:Ms,radialLine:ks,stack:Xs,stackOffsetDiverging:Qs,stackOffsetExpand:Zs,stackOffsetNone:gt,stackOffsetSilhouette:Js,stackOffsetWiggle:el,stackOrderAppearance:tl,stackOrderAscending:Fi,stackOrderDescending:rl,stackOrderInsideOut:il,stackOrderNone:yt,stackOrderReverse:al,symbol:Dd,symbolCircle:Ei,symbolCross:$s,symbolDiamond:Es,symbolSquare:Ls,symbolStar:Ns,symbolTriangle:As,symbolWye:Ds,symbols:Ad},Symbol.toStringTag,{value:"Module"}));function np(e,t){e(t)}var ol={ascending:Fi,descending:rl,insideout:il,none:yt,reverse:al};function rp(e){return e&&ol[e]||ol.none}var sl={expand:Zs,diverging:Qs,none:gt,silhouette:Js,wiggle:el};function ip(e){return e&&sl[e]||sl.none}var ap=["top","left","transform","className","children","innerRef"];function Ii(){return Ii=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},Ii.apply(this,arguments)}function op(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Ge(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.transform,s=e.className,o=e.children,l=e.innerRef,u=op(e,ap);return m.createElement("g",Ii({ref:l,className:ve("visx-group",s),transform:i||"translate("+a+", "+n+")"},u),o)}Ge.propTypes={top:w.number,left:w.number,transform:w.string,className:w.string,children:w.node,innerRef:w.oneOfType([w.string,w.func,w.object])};const sp=Object.freeze(Object.defineProperty({__proto__:null,Group:Ge},Symbol.toStringTag,{value:"Module"}));var lp=["from","to","fill","className","innerRef"];function Ri(){return Ri=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},Ri.apply(this,arguments)}function up(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function ll(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,a=r===void 0?{x:1,y:1}:r,i=e.fill,s=i===void 0?"transparent":i,o=e.className,l=e.innerRef,u=up(e,lp),c=n.x===a.x||n.y===a.y;return m.createElement("line",Ri({ref:l,className:ve("visx-line",o),x1:n.x,y1:n.y,x2:a.x,y2:a.y,fill:s,shapeRendering:c?"crispEdges":"auto"},u))}var cp=["className","innerRef"];function Wi(){return Wi=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},Wi.apply(this,arguments)}function fp(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function hp(e){var t=e.className,n=e.innerRef,r=fp(e,cp);return m.createElement("rect",Wi({ref:n,className:ve("visx-bar",t)},r))}var dp=["children","className","innerRef","x","y","width","height","radius","all","top","bottom","left","right","topLeft","topRight","bottomLeft","bottomRight"];function Bi(){return Bi=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},Bi.apply(this,arguments)}function pp(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function vp(e){var t=e.all,n=e.bottom,r=e.bottomLeft,a=e.bottomRight,i=e.height,s=e.left,o=e.radius,l=e.right,u=e.top,c=e.topLeft,f=e.topRight,h=e.width,p=e.x,d=e.y;f=t||u||l||f,a=t||n||l||a,r=t||n||s||r,c=t||u||s||c,o=Math.max(1,Math.min(o,Math.min(h,i)/2));var v=2*o,x=("M"+(p+o)+","+d+" h"+(h-v)+`
24
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",s=0;s<arguments.length;s++){var o=arguments[s];o&&(i=a(i,r(o)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var s="";for(var o in i)t.call(i,o)&&i[o]&&(s=a(s,o));return s}function a(i,s){return s?i?i+" "+s:i+s:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ys);var nn=ys.exports;const me=tn(nn);var id=["top","left","transform","className","children","innerRef"];function bi(){return bi=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},bi.apply(this,arguments)}function ad(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function rn(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.transform,s=e.className,o=e.children,u=e.innerRef,l=ad(e,id);return v.createElement("g",bi({ref:u,className:me("visx-group",s),transform:i||"translate("+a+", "+n+")"},l),o)}rn.propTypes={top:w.number,left:w.number,transform:w.string,className:w.string,children:w.node,innerRef:w.oneOfType([w.string,w.func,w.object])};var xi=Math.PI,_i=2*xi,mt=1e-6,od=_i-mt;function wi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Dt(){return new wi}wi.prototype=Dt.prototype={constructor:wi,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,a,i){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+i)},arcTo:function(e,t,n,r,a){e=+e,t=+t,n=+n,r=+r,a=+a;var i=this._x1,s=this._y1,o=n-e,u=r-t,l=i-e,c=s-t,f=l*l+c*c;if(a<0)throw new Error("negative radius: "+a);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>mt)if(!(Math.abs(c*o-u*l)>mt)||!a)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var h=n-i,p=r-s,d=o*o+u*u,m=h*h+p*p,b=Math.sqrt(d),g=Math.sqrt(f),x=a*Math.tan((xi-Math.acos((d+f-m)/(2*b*g)))/2),_=x/g,M=x/b;Math.abs(_-1)>mt&&(this._+="L"+(e+_*l)+","+(t+_*c)),this._+="A"+a+","+a+",0,0,"+ +(c*h>l*p)+","+(this._x1=e+M*o)+","+(this._y1=t+M*u)}},arc:function(e,t,n,r,a,i){e=+e,t=+t,n=+n,i=!!i;var s=n*Math.cos(r),o=n*Math.sin(r),u=e+s,l=t+o,c=1^i,f=i?r-a:a-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+u+","+l:(Math.abs(this._x1-u)>mt||Math.abs(this._y1-l)>mt)&&(this._+="L"+u+","+l),n&&(f<0&&(f=f%_i+_i),f>od?this._+="A"+n+","+n+",0,1,"+c+","+(e-s)+","+(t-o)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):f>mt&&(this._+="A"+n+","+n+",0,"+ +(f>=xi)+","+c+","+(this._x1=e+n*Math.cos(a))+","+(this._y1=t+n*Math.sin(a))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function J(e){return function(){return e}}var bs=Math.abs,ge=Math.atan2,gt=Math.cos,sd=Math.max,Si=Math.min,Ie=Math.sin,jt=Math.sqrt,ve=1e-12,nt=Math.PI,tr=nt/2,rt=2*nt;function ud(e){return e>1?0:e<-1?nt:Math.acos(e)}function xs(e){return e>=1?tr:e<=-1?-tr:Math.asin(e)}function ld(e){return e.innerRadius}function cd(e){return e.outerRadius}function fd(e){return e.startAngle}function hd(e){return e.endAngle}function dd(e){return e&&e.padAngle}function pd(e,t,n,r,a,i,s,o){var u=n-e,l=r-t,c=s-a,f=o-i,h=f*u-c*l;if(!(h*h<ve))return h=(c*(t-i)-f*(e-a))/h,[e+h*u,t+h*l]}function nr(e,t,n,r,a,i,s){var o=e-n,u=t-r,l=(s?i:-i)/jt(o*o+u*u),c=l*u,f=-l*o,h=e+c,p=t+f,d=n+c,m=r+f,b=(h+d)/2,g=(p+m)/2,x=d-h,_=m-p,M=x*x+_*_,y=a-i,S=h*m-d*p,T=(_<0?-1:1)*jt(sd(0,y*y*M-S*S)),E=(S*_-x*T)/M,k=(-S*x-_*T)/M,$=(S*_+x*T)/M,P=(-S*x+_*T)/M,N=E-b,A=k-g,R=$-b,X=P-g;return N*N+A*A>R*R+X*X&&(E=$,k=P),{cx:E,cy:k,x01:-c,y01:-f,x11:E*(a/y-1),y11:k*(a/y-1)}}function md(){var e=ld,t=cd,n=J(0),r=null,a=fd,i=hd,s=dd,o=null;function u(){var l,c,f=+e.apply(this,arguments),h=+t.apply(this,arguments),p=a.apply(this,arguments)-tr,d=i.apply(this,arguments)-tr,m=bs(d-p),b=d>p;if(o||(o=l=Dt()),h<f&&(c=h,h=f,f=c),!(h>ve))o.moveTo(0,0);else if(m>rt-ve)o.moveTo(h*gt(p),h*Ie(p)),o.arc(0,0,h,p,d,!b),f>ve&&(o.moveTo(f*gt(d),f*Ie(d)),o.arc(0,0,f,d,p,b));else{var g=p,x=d,_=p,M=d,y=m,S=m,T=s.apply(this,arguments)/2,E=T>ve&&(r?+r.apply(this,arguments):jt(f*f+h*h)),k=Si(bs(h-f)/2,+n.apply(this,arguments)),$=k,P=k,N,A;if(E>ve){var R=xs(E/f*Ie(T)),X=xs(E/h*Ie(T));(y-=R*2)>ve?(R*=b?1:-1,_+=R,M-=R):(y=0,_=M=(p+d)/2),(S-=X*2)>ve?(X*=b?1:-1,g+=X,x-=X):(S=0,g=x=(p+d)/2)}var U=h*gt(g),Z=h*Ie(g),ee=f*gt(M),K=f*Ie(M);if(k>ve){var C=h*gt(x),D=h*Ie(x),H=f*gt(_),W=f*Ie(_),F;if(m<nt&&(F=pd(U,Z,H,W,C,D,ee,K))){var I=U-F[0],q=Z-F[1],Y=C-F[0],G=D-F[1],L=1/Ie(ud((I*Y+q*G)/(jt(I*I+q*q)*jt(Y*Y+G*G)))/2),z=jt(F[0]*F[0]+F[1]*F[1]);$=Si(k,(f-z)/(L-1)),P=Si(k,(h-z)/(L+1))}}S>ve?P>ve?(N=nr(H,W,U,Z,h,P,b),A=nr(C,D,ee,K,h,P,b),o.moveTo(N.cx+N.x01,N.cy+N.y01),P<k?o.arc(N.cx,N.cy,P,ge(N.y01,N.x01),ge(A.y01,A.x01),!b):(o.arc(N.cx,N.cy,P,ge(N.y01,N.x01),ge(N.y11,N.x11),!b),o.arc(0,0,h,ge(N.cy+N.y11,N.cx+N.x11),ge(A.cy+A.y11,A.cx+A.x11),!b),o.arc(A.cx,A.cy,P,ge(A.y11,A.x11),ge(A.y01,A.x01),!b))):(o.moveTo(U,Z),o.arc(0,0,h,g,x,!b)):o.moveTo(U,Z),!(f>ve)||!(y>ve)?o.lineTo(ee,K):$>ve?(N=nr(ee,K,C,D,f,-$,b),A=nr(U,Z,H,W,f,-$,b),o.lineTo(N.cx+N.x01,N.cy+N.y01),$<k?o.arc(N.cx,N.cy,$,ge(N.y01,N.x01),ge(A.y01,A.x01),!b):(o.arc(N.cx,N.cy,$,ge(N.y01,N.x01),ge(N.y11,N.x11),!b),o.arc(0,0,f,ge(N.cy+N.y11,N.cx+N.x11),ge(A.cy+A.y11,A.cx+A.x11),b),o.arc(A.cx,A.cy,$,ge(A.y11,A.x11),ge(A.y01,A.x01),!b))):o.arc(0,0,f,M,_,b)}if(o.closePath(),l)return o=null,l+""||null}return u.centroid=function(){var l=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,c=(+a.apply(this,arguments)+ +i.apply(this,arguments))/2-nt/2;return[gt(c)*l,Ie(c)*l]},u.innerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:J(+l),u):e},u.outerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:J(+l),u):t},u.cornerRadius=function(l){return arguments.length?(n=typeof l=="function"?l:J(+l),u):n},u.padRadius=function(l){return arguments.length?(r=l==null?null:typeof l=="function"?l:J(+l),u):r},u.startAngle=function(l){return arguments.length?(a=typeof l=="function"?l:J(+l),u):a},u.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:J(+l),u):i},u.padAngle=function(l){return arguments.length?(s=typeof l=="function"?l:J(+l),u):s},u.context=function(l){return arguments.length?(o=l??null,u):o},u}function _s(e){this._context=e}_s.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function rr(e){return new _s(e)}function Ti(e){return e[0]}function Oi(e){return e[1]}function ki(){var e=Ti,t=Oi,n=J(!0),r=null,a=rr,i=null;function s(o){var u,l=o.length,c,f=!1,h;for(r==null&&(i=a(h=Dt())),u=0;u<=l;++u)!(u<l&&n(c=o[u],u,o))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(c,u,o),+t(c,u,o));if(h)return i=null,h+""||null}return s.x=function(o){return arguments.length?(e=typeof o=="function"?o:J(+o),s):e},s.y=function(o){return arguments.length?(t=typeof o=="function"?o:J(+o),s):t},s.defined=function(o){return arguments.length?(n=typeof o=="function"?o:J(!!o),s):n},s.curve=function(o){return arguments.length?(a=o,r!=null&&(i=a(r)),s):a},s.context=function(o){return arguments.length?(o==null?r=i=null:i=a(r=o),s):r},s}function ws(){var e=Ti,t=null,n=J(0),r=Oi,a=J(!0),i=null,s=rr,o=null;function u(c){var f,h,p,d=c.length,m,b=!1,g,x=new Array(d),_=new Array(d);for(i==null&&(o=s(g=Dt())),f=0;f<=d;++f){if(!(f<d&&a(m=c[f],f,c))===b)if(b=!b)h=f,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=f-1;p>=h;--p)o.point(x[p],_[p]);o.lineEnd(),o.areaEnd()}b&&(x[f]=+e(m,f,c),_[f]=+n(m,f,c),o.point(t?+t(m,f,c):x[f],r?+r(m,f,c):_[f]))}if(g)return o=null,g+""||null}function l(){return ki().defined(a).curve(s).context(i)}return u.x=function(c){return arguments.length?(e=typeof c=="function"?c:J(+c),t=null,u):e},u.x0=function(c){return arguments.length?(e=typeof c=="function"?c:J(+c),u):e},u.x1=function(c){return arguments.length?(t=c==null?null:typeof c=="function"?c:J(+c),u):t},u.y=function(c){return arguments.length?(n=typeof c=="function"?c:J(+c),r=null,u):n},u.y0=function(c){return arguments.length?(n=typeof c=="function"?c:J(+c),u):n},u.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:J(+c),u):r},u.lineX0=u.lineY0=function(){return l().x(e).y(n)},u.lineY1=function(){return l().x(e).y(r)},u.lineX1=function(){return l().x(t).y(n)},u.defined=function(c){return arguments.length?(a=typeof c=="function"?c:J(!!c),u):a},u.curve=function(c){return arguments.length?(s=c,i!=null&&(o=s(i)),u):s},u.context=function(c){return arguments.length?(c==null?i=o=null:o=s(i=c),u):i},u}function gd(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function vd(e){return e}function yd(){var e=vd,t=gd,n=null,r=J(0),a=J(rt),i=J(0);function s(o){var u,l=o.length,c,f,h=0,p=new Array(l),d=new Array(l),m=+r.apply(this,arguments),b=Math.min(rt,Math.max(-rt,a.apply(this,arguments)-m)),g,x=Math.min(Math.abs(b)/l,i.apply(this,arguments)),_=x*(b<0?-1:1),M;for(u=0;u<l;++u)(M=d[p[u]=u]=+e(o[u],u,o))>0&&(h+=M);for(t!=null?p.sort(function(y,S){return t(d[y],d[S])}):n!=null&&p.sort(function(y,S){return n(o[y],o[S])}),u=0,f=h?(b-l*_)/h:0;u<l;++u,m=g)c=p[u],M=d[c],g=m+(M>0?M*f:0)+_,d[c]={data:o[c],index:u,value:M,startAngle:m,endAngle:g,padAngle:x};return d}return s.value=function(o){return arguments.length?(e=typeof o=="function"?o:J(+o),s):e},s.sortValues=function(o){return arguments.length?(t=o,n=null,s):t},s.sort=function(o){return arguments.length?(n=o,t=null,s):n},s.startAngle=function(o){return arguments.length?(r=typeof o=="function"?o:J(+o),s):r},s.endAngle=function(o){return arguments.length?(a=typeof o=="function"?o:J(+o),s):a},s.padAngle=function(o){return arguments.length?(i=typeof o=="function"?o:J(+o),s):i},s}var Ss=Mi(rr);function Ts(e){this._curve=e}Ts.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Mi(e){function t(n){return new Ts(e(n))}return t._curve=e,t}function an(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Mi(n)):t()._curve},e}function Os(){return an(ki().curve(Ss))}function ks(){var e=ws().curve(Ss),t=e.curve,n=e.lineX0,r=e.lineX1,a=e.lineY0,i=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return an(n())},delete e.lineX0,e.lineEndAngle=function(){return an(r())},delete e.lineX1,e.lineInnerRadius=function(){return an(a())},delete e.lineY0,e.lineOuterRadius=function(){return an(i())},delete e.lineY1,e.curve=function(s){return arguments.length?t(Mi(s)):t()._curve},e}function on(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var $i=Array.prototype.slice;function bd(e){return e.source}function xd(e){return e.target}function Ei(e){var t=bd,n=xd,r=Ti,a=Oi,i=null;function s(){var o,u=$i.call(arguments),l=t.apply(this,u),c=n.apply(this,u);if(i||(i=o=Dt()),e(i,+r.apply(this,(u[0]=l,u)),+a.apply(this,u),+r.apply(this,(u[0]=c,u)),+a.apply(this,u)),o)return i=null,o+""||null}return s.source=function(o){return arguments.length?(t=o,s):t},s.target=function(o){return arguments.length?(n=o,s):n},s.x=function(o){return arguments.length?(r=typeof o=="function"?o:J(+o),s):r},s.y=function(o){return arguments.length?(a=typeof o=="function"?o:J(+o),s):a},s.context=function(o){return arguments.length?(i=o??null,s):i},s}function _d(e,t,n,r,a){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,a,r,a)}function wd(e,t,n,r,a){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+a)/2,r,n,r,a)}function Sd(e,t,n,r,a){var i=on(t,n),s=on(t,n=(n+a)/2),o=on(r,n),u=on(r,a);e.moveTo(i[0],i[1]),e.bezierCurveTo(s[0],s[1],o[0],o[1],u[0],u[1])}function Td(){return Ei(_d)}function Od(){return Ei(wd)}function kd(){var e=Ei(Sd);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const Ci={draw:function(e,t){var n=Math.sqrt(t/nt);e.moveTo(n,0),e.arc(0,0,n,0,rt)}},Ms={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};var $s=Math.sqrt(1/3),Md=$s*2;const Es={draw:function(e,t){var n=Math.sqrt(t/Md),r=n*$s;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}};var $d=.8908130915292852,Cs=Math.sin(nt/10)/Math.sin(7*nt/10),Ed=Math.sin(rt/10)*Cs,Cd=-Math.cos(rt/10)*Cs;const Ps={draw:function(e,t){var n=Math.sqrt(t*$d),r=Ed*n,a=Cd*n;e.moveTo(0,-n),e.lineTo(r,a);for(var i=1;i<5;++i){var s=rt*i/5,o=Math.cos(s),u=Math.sin(s);e.lineTo(u*n,-o*n),e.lineTo(o*r-u*a,u*r+o*a)}e.closePath()}},Ns={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}};var Pi=Math.sqrt(3);const Ls={draw:function(e,t){var n=-Math.sqrt(t/(Pi*3));e.moveTo(0,n*2),e.lineTo(-Pi*n,-n),e.lineTo(Pi*n,-n),e.closePath()}};var Me=-.5,$e=Math.sqrt(3)/2,Ni=1/Math.sqrt(12),Pd=(Ni/2+1)*3;const As={draw:function(e,t){var n=Math.sqrt(t/Pd),r=n/2,a=n*Ni,i=r,s=n*Ni+n,o=-i,u=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(o,u),e.lineTo(Me*r-$e*a,$e*r+Me*a),e.lineTo(Me*i-$e*s,$e*i+Me*s),e.lineTo(Me*o-$e*u,$e*o+Me*u),e.lineTo(Me*r+$e*a,Me*a-$e*r),e.lineTo(Me*i+$e*s,Me*s-$e*i),e.lineTo(Me*o+$e*u,Me*u-$e*o),e.closePath()}};var Nd=[Ci,Ms,Es,Ns,Ps,Ls,As];function Ld(){var e=J(Ci),t=J(64),n=null;function r(){var a;if(n||(n=a=Dt()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return r.type=function(a){return arguments.length?(e=typeof a=="function"?a:J(a),r):e},r.size=function(a){return arguments.length?(t=typeof a=="function"?a:J(+a),r):t},r.context=function(a){return arguments.length?(n=a??null,r):n},r}function it(){}function ir(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 ar(e){this._context=e}ar.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:ir(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:ir(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ad(e){return new ar(e)}function Ds(e){this._context=e}Ds.prototype={areaStart:it,areaEnd:it,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);break}}},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:ir(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dd(e){return new Ds(e)}function js(e){this._context=e}js.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||this._line!==0&&this._point===3)&&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:ir(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jd(e){return new js(e)}function zs(e,t){this._basis=new ar(e),this._beta=t}zs.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=e[0],a=t[0],i=e[n]-r,s=t[n]-a,o=-1,u;++o<=n;)u=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+u*i),this._beta*t[o]+(1-this._beta)*(a+u*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const zd=function e(t){function n(r){return t===1?new ar(r):new zs(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function or(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 Li(e,t){this._context=e,this._k=(1-t)/6}Li.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:or(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:or(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Fd=function e(t){function n(r){return new Li(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Ai(e,t){this._context=e,this._k=(1-t)/6}Ai.prototype={areaStart:it,areaEnd:it,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);break}}},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:or(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Id=function e(t){function n(r){return new Ai(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Di(e,t){this._context=e,this._k=(1-t)/6}Di.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||this._line!==0&&this._point===3)&&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:or(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Rd=function e(t){function n(r){return new Di(r,t)}return n.tension=function(r){return e(+r)},n}(0);function ji(e,t,n){var r=e._x1,a=e._y1,i=e._x2,s=e._y2;if(e._l01_a>ve){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,a=(a*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>ve){var l=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);i=(i*l+e._x1*e._l23_2a-t*e._l12_2a)/c,s=(s*l+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,a,i,s,e._x2,e._y2)}function Fs(e,t){this._context=e,this._alpha=t}Fs.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);break}(this._line||this._line!==0&&this._point===1)&&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:ji(this,e,t);break}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 Wd=function e(t){function n(r){return t?new Fs(r,t):new Li(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Is(e,t){this._context=e,this._alpha=t}Is.prototype={areaStart:it,areaEnd:it,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);break}}},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:ji(this,e,t);break}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 Hd=function e(t){function n(r){return t?new Is(r,t):new Ai(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Rs(e,t){this._context=e,this._alpha=t}Rs.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||this._line!==0&&this._point===3)&&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:ji(this,e,t);break}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 Bd=function e(t){function n(r){return t?new Rs(r,t):new Di(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Ws(e){this._context=e}Ws.prototype={areaStart:it,areaEnd:it,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Ud(e){return new Ws(e)}function Hs(e){return e<0?-1:1}function Bs(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),o=(i*a+s*r)/(r+a);return(Hs(i)+Hs(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function Us(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function zi(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,s-o*n,i,s)}function sr(e){this._context=e}sr.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:zi(this,this._t0,Us(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(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,zi(this,Us(this,n=Bs(this,e,t)),n);break;default:zi(this,this._t0,n=Bs(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function qs(e){this._context=new Ys(e)}(qs.prototype=Object.create(sr.prototype)).point=function(e,t){sr.prototype.point.call(this,t,e)};function Ys(e){this._context=e}Ys.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,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function qd(e){return new sr(e)}function Yd(e){return new qs(e)}function Vs(e){this._context=e}Vs.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]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Gs(e),a=Gs(t),i=0,s=1;s<n;++i,++s)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[s],t[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Gs(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),s=new Array(n);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,s[t]-=r*s[t-1];for(a[n-1]=s[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function Vd(e){return new Vs(e)}function ur(e,t){this._context=e,this._t=t}ur.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&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&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)}break}}this._x=e,this._y=t}};function Gd(e){return new ur(e,.5)}function Kd(e){return new ur(e,0)}function Xd(e){return new ur(e,1)}function vt(e,t){if((s=e.length)>1)for(var n=1,r,a,i=e[t[0]],s,o=i.length;n<s;++n)for(a=i,i=e[t[n]],r=0;r<o;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function yt(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Zd(e,t){return e[t]}function Ks(){var e=J([]),t=yt,n=vt,r=Zd;function a(i){var s=e.apply(this,arguments),o,u=i.length,l=s.length,c=new Array(l),f;for(o=0;o<l;++o){for(var h=s[o],p=c[o]=new Array(u),d=0,m;d<u;++d)p[d]=m=[0,+r(i[d],h,d,i)],m.data=i[d];p.key=h}for(o=0,f=t(c);o<l;++o)c[f[o]].index=o;return n(c,f),c}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:J($i.call(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:J(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?yt:typeof i=="function"?i:J($i.call(i)),a):t},a.offset=function(i){return arguments.length?(n=i??vt,a):n},a}function Xs(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,s;a<i;++a){for(s=n=0;n<r;++n)s+=e[n][a][1]||0;if(s)for(n=0;n<r;++n)e[n][a][1]/=s}vt(e,t)}}function Zs(e,t){if((u=e.length)>0)for(var n,r=0,a,i,s,o,u,l=e[t[0]].length;r<l;++r)for(s=o=0,n=0;n<u;++n)(i=(a=e[t[n]][r])[1]-a[0])>0?(a[0]=s,a[1]=s+=i):i<0?(a[1]=o,a[0]=o+=i):(a[0]=0,a[1]=i)}function Qs(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var s=0,o=0;s<a;++s)o+=e[s][n][1]||0;r[n][1]+=r[n][0]=-o/2}vt(e,t)}}function Js(e,t){if(!(!((s=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,s;r<i;++r){for(var o=0,u=0,l=0;o<s;++o){for(var c=e[t[o]],f=c[r][1]||0,h=c[r-1][1]||0,p=(f-h)/2,d=0;d<o;++d){var m=e[t[d]],b=m[r][1]||0,g=m[r-1][1]||0;p+=b-g}u+=f,l+=p*f}a[r-1][1]+=a[r-1][0]=n,u&&(n-=l/u)}a[r-1][1]+=a[r-1][0]=n,vt(e,t)}}function eu(e){var t=e.map(Qd);return yt(e).sort(function(n,r){return t[n]-t[r]})}function Qd(e){for(var t=-1,n=0,r=e.length,a,i=-1/0;++t<r;)(a=+e[t][1])>i&&(i=a,n=t);return n}function Fi(e){var t=e.map(tu);return yt(e).sort(function(n,r){return t[n]-t[r]})}function tu(e){for(var t=0,n=-1,r=e.length,a;++n<r;)(a=+e[n][1])&&(t+=a);return t}function nu(e){return Fi(e).reverse()}function ru(e){var t=e.length,n,r,a=e.map(tu),i=eu(e),s=0,o=0,u=[],l=[];for(n=0;n<t;++n)r=i[n],s<o?(s+=a[r],u.push(r)):(o+=a[r],l.push(r));return l.reverse().concat(u)}function iu(e){return yt(e).reverse()}const Jd=Object.freeze(Object.defineProperty({__proto__:null,arc:md,area:ws,areaRadial:ks,curveBasis:Ad,curveBasisClosed:Dd,curveBasisOpen:jd,curveBundle:zd,curveCardinal:Fd,curveCardinalClosed:Id,curveCardinalOpen:Rd,curveCatmullRom:Wd,curveCatmullRomClosed:Hd,curveCatmullRomOpen:Bd,curveLinear:rr,curveLinearClosed:Ud,curveMonotoneX:qd,curveMonotoneY:Yd,curveNatural:Vd,curveStep:Gd,curveStepAfter:Xd,curveStepBefore:Kd,line:ki,lineRadial:Os,linkHorizontal:Td,linkRadial:kd,linkVertical:Od,pie:yd,pointRadial:on,radialArea:ks,radialLine:Os,stack:Ks,stackOffsetDiverging:Zs,stackOffsetExpand:Xs,stackOffsetNone:vt,stackOffsetSilhouette:Qs,stackOffsetWiggle:Js,stackOrderAppearance:eu,stackOrderAscending:Fi,stackOrderDescending:nu,stackOrderInsideOut:ru,stackOrderNone:yt,stackOrderReverse:iu,symbol:Ld,symbolCircle:Ci,symbolCross:Ms,symbolDiamond:Es,symbolSquare:Ns,symbolStar:Ps,symbolTriangle:Ls,symbolWye:As,symbols:Nd},Symbol.toStringTag,{value:"Module"}));function ep(e,t){e(t)}var au={ascending:Fi,descending:nu,insideout:ru,none:yt,reverse:iu};function tp(e){return e&&au[e]||au.none}var ou={expand:Xs,diverging:Zs,none:vt,silhouette:Qs,wiggle:Js};function np(e){return e&&ou[e]||ou.none}var rp=["top","left","transform","className","children","innerRef"];function Ii(){return Ii=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},Ii.apply(this,arguments)}function ip(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Ge(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.transform,s=e.className,o=e.children,u=e.innerRef,l=ip(e,rp);return v.createElement("g",Ii({ref:u,className:me("visx-group",s),transform:i||"translate("+a+", "+n+")"},l),o)}Ge.propTypes={top:w.number,left:w.number,transform:w.string,className:w.string,children:w.node,innerRef:w.oneOfType([w.string,w.func,w.object])};const ap=Object.freeze(Object.defineProperty({__proto__:null,Group:Ge},Symbol.toStringTag,{value:"Module"}));var op=["from","to","fill","className","innerRef"];function Ri(){return Ri=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},Ri.apply(this,arguments)}function sp(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function su(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,a=r===void 0?{x:1,y:1}:r,i=e.fill,s=i===void 0?"transparent":i,o=e.className,u=e.innerRef,l=sp(e,op),c=n.x===a.x||n.y===a.y;return v.createElement("line",Ri({ref:u,className:me("visx-line",o),x1:n.x,y1:n.y,x2:a.x,y2:a.y,fill:s,shapeRendering:c?"crispEdges":"auto"},l))}var up=["className","innerRef"];function Wi(){return Wi=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},Wi.apply(this,arguments)}function lp(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function cp(e){var t=e.className,n=e.innerRef,r=lp(e,up);return v.createElement("rect",Wi({ref:n,className:me("visx-bar",t)},r))}var fp=["children","className","innerRef","x","y","width","height","radius","all","top","bottom","left","right","topLeft","topRight","bottomLeft","bottomRight"];function Hi(){return Hi=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},Hi.apply(this,arguments)}function hp(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function dp(e){var t=e.all,n=e.bottom,r=e.bottomLeft,a=e.bottomRight,i=e.height,s=e.left,o=e.radius,u=e.right,l=e.top,c=e.topLeft,f=e.topRight,h=e.width,p=e.x,d=e.y;f=t||l||u||f,a=t||n||u||a,r=t||n||s||r,c=t||l||s||c,o=Math.max(1,Math.min(o,Math.min(h,i)/2));var m=2*o,b=("M"+(p+o)+","+d+" h"+(h-m)+`
25
25
  `+(f?"a"+o+","+o+" 0 0 1 "+o+","+o:"h"+o+"v"+o)+`
26
- v`+(i-v)+`
26
+ v`+(i-m)+`
27
27
  `+(a?"a"+o+","+o+" 0 0 1 "+-o+","+o:"v"+o+"h"+-o)+`
28
- h`+(v-h)+`
28
+ h`+(m-h)+`
29
29
  `+(r?"a"+o+","+o+" 0 0 1 "+-o+","+-o:"h"+-o+"v"+-o)+`
30
- v`+(v-i)+`
30
+ v`+(m-i)+`
31
31
  `+(c?"a"+o+","+o+" 0 0 1 "+o+","+-o:"v"+-o+"h"+o)+`
32
32
  z`).split(`
33
- `).join("");return x}function ul(e){var t=e.children,n=e.className,r=e.innerRef,a=e.x,i=e.y,s=e.width,o=e.height,l=e.radius,u=e.all,c=u===void 0?!1:u,f=e.top,h=f===void 0?!1:f,p=e.bottom,d=p===void 0?!1:p,v=e.left,x=v===void 0?!1:v,g=e.right,b=g===void 0?!1:g,_=e.topLeft,M=_===void 0?!1:_,y=e.topRight,S=y===void 0?!1:y,T=e.bottomLeft,$=T===void 0?!1:T,k=e.bottomRight,C=k===void 0?!1:k,P=pp(e,dp),N=vp({x:a,y:i,width:s,height:o,radius:l,all:c,top:h,bottom:d,left:x,right:b,topLeft:M,topRight:S,bottomLeft:$,bottomRight:C});return t?m.createElement(m.Fragment,null,t({path:N})):m.createElement("path",Bi({ref:r,className:ve("visx-bar-rounded",n),d:N},P))}function mp(e){if("bandwidth"in e)return e.bandwidth();var t=e.range(),n=e.domain();return Math.abs(t[t.length-1]-t[0])/n.length}function gp(e){return e==null?void 0:e[0]}function yp(e){return e==null?void 0:e[1]}var bp=["data","className","top","left","y","x0","x1","xScale","yScale","color","keys","value","order","offset","children"];function Hi(){return Hi=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},Hi.apply(this,arguments)}function xp(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function _p(e){var t=e.data,n=e.className,r=e.top,a=e.left,i=e.y,s=e.x0,o=s===void 0?gp:s,l=e.x1,u=l===void 0?yp:l,c=e.xScale,f=e.yScale,h=e.color,p=e.keys,d=e.value,v=e.order,x=e.offset,g=e.children,b=xp(e,bp),_=Xs();p&&_.keys(p),d&&np(_.value,d),v&&_.order(rp(v)),x&&_.offset(ip(x));var M=_(t),y=mp(f),S=M.map(function(T,$){var k=T.key;return{index:$,key:k,bars:T.map(function(C,P){var N=(c(u(C))||0)-(c(o(C))||0),A=c(o(C)),R="bandwidth"in f?f(i(C.data)):Math.max((f(i(C.data))||0)-N/2);return{bar:C,key:k,index:P,height:y,width:N,x:A||0,y:R||0,color:h(T.key,P)}})}});return g?m.createElement(m.Fragment,null,g(S)):m.createElement(Ge,{className:ve("visx-bar-stack-horizontal",n),top:r,left:a},S.map(function(T){return T.bars.map(function($){return m.createElement(hp,Hi({key:"bar-stack-"+T.index+"-"+$.index,x:$.x,y:$.y,height:$.height,width:$.width,fill:$.color},b))})}))}function at(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function wp(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ur(e){let t,n,r;e.length!==2?(t=at,n=(o,l)=>at(e(o),l),r=(o,l)=>e(o)-l):(t=e===at||e===wp?e:Sp,n=e,r=e);function a(o,l,u=0,c=o.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(o[f],l)<0?u=f+1:c=f}while(u<c)}return u}function i(o,l,u=0,c=o.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(o[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function s(o,l,u=0,c=o.length){const f=a(o,l,u,c-1);return f>u&&r(o[f-1],l)>-r(o[f],l)?f-1:f}return{left:a,center:s,right:i}}function Sp(){return 0}function cl(e){return e===null?NaN:+e}function*Tp(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const fl=ur(at),sn=fl.right,Op=fl.left;ur(cl).center;function hl(e,t){let n,r;for(const a of e)a!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)));return[n,r]}class dl extends Map{constructor(t,n=$p){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(pl(this,t))}has(t){return super.has(pl(this,t))}set(t,n){return super.set(kp(this,t),n)}delete(t){return super.delete(Mp(this,t))}}function pl({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function kp({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Mp({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function $p(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Cp(e=at){if(e===at)return vl;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function vl(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var Ui=Math.sqrt(50),qi=Math.sqrt(10),Yi=Math.sqrt(2);function Vi(e,t,n){var r,a=-1,i,s,o;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),(o=ml(e,t,n))===0||!isFinite(o))return[];if(o>0){let l=Math.round(e/o),u=Math.round(t/o);for(l*o<e&&++l,u*o>t&&--u,s=new Array(i=u-l+1);++a<i;)s[a]=(l+a)*o}else{o=-o;let l=Math.round(e*o),u=Math.round(t*o);for(l/o<e&&++l,u/o>t&&--u,s=new Array(i=u-l+1);++a<i;)s[a]=(l+a)/o}return r&&s.reverse(),s}function ml(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>=Ui?10:i>=qi?5:i>=Yi?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=Ui?10:i>=qi?5:i>=Yi?2:1)}function Gi(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>=Ui?a*=10:i>=qi?a*=5:i>=Yi&&(a*=2),t<e?-a:a}function gl(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function yl(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function bl(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?vl:Cp(a);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,c=Math.log(l),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),p=Math.max(n,Math.floor(t-u*f/l+h)),d=Math.min(r,Math.floor(t+(l-u)*f/l+h));bl(e,t,p,d,a)}const i=e[t];let s=n,o=r;for(ln(e,n,t),a(e[r],i)>0&&ln(e,n,r);s<o;){for(ln(e,s,o),++s,--o;a(e[s],i)<0;)++s;for(;a(e[o],i)>0;)--o}a(e[n],i)===0?ln(e,n,o):(++o,ln(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function ln(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Ep(e,t,n){if(e=Float64Array.from(Tp(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return yl(e);if(t>=1)return gl(e);var r,a=(r-1)*t,i=Math.floor(a),s=gl(bl(e,i).subarray(0,i+1)),o=yl(e.subarray(i+1));return s+(o-s)*(a-i)}}function Pp(e,t,n=cl){if(!(!(r=e.length)||isNaN(t=+t))){if(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),s=+n(e[i],i,e),o=+n(e[i+1],i+1,e);return s+(o-s)*(a-i)}}function xl(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=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r<a;)i[r]=e+r*n;return i}function Ce(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ke(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Ki=Symbol("implicit");function cr(){var e=new dl,t=[],n=[],r=Ki;function a(i){let s=e.get(i);if(s===void 0){if(r!==Ki)return r;e.set(i,s=t.push(i)-1)}return n[s%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new dl;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return cr(t,n).unknown(r)},Ce.apply(a,arguments),a}function fr(){var e=cr().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,s,o=!1,l=0,u=0,c=.5;delete e.unknown;function f(){var h=t().length,p=a<r,d=p?a:r,v=p?r:a;i=(v-d)/Math.max(1,h-l+u*2),o&&(i=Math.floor(i)),d+=(v-d-i*(h-l))*c,s=i*(1-l),o&&(d=Math.round(d),s=Math.round(s));var x=xl(h).map(function(g){return d+i*g});return n(p?x.reverse():x)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([r,a]=h,r=+r,a=+a,f()):[r,a]},e.rangeRound=function(h){return[r,a]=h,r=+r,a=+a,o=!0,f()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(h){return arguments.length?(o=!!h,f()):o},e.padding=function(h){return arguments.length?(l=Math.min(1,u=+h),f()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},e.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},e.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},e.copy=function(){return fr(t(),[r,a]).round(o).paddingInner(l).paddingOuter(u).align(c)},Ce.apply(f(),arguments)}function _l(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return _l(t())},e}function wl(){return _l(fr.apply(null,arguments).paddingInner(1))}function Ft(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function un(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ot(){}var bt=.7,It=1/bt,Rt="\\s*([+-]?\\d+)\\s*",cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Np=/^#([0-9a-f]{3,8})$/,Lp=new RegExp(`^rgb\\(${Rt},${Rt},${Rt}\\)$`),Ap=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),Dp=new RegExp(`^rgba\\(${Rt},${Rt},${Rt},${cn}\\)$`),zp=new RegExp(`^rgba\\(${Re},${Re},${Re},${cn}\\)$`),jp=new RegExp(`^hsl\\(${cn},${Re},${Re}\\)$`),Fp=new RegExp(`^hsla\\(${cn},${Re},${Re},${cn}\\)$`),Sl={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};Ft(ot,fn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Tl,formatHex:Tl,formatHex8:Ip,formatHsl:Rp,formatRgb:Ol,toString:Ol});function Tl(){return this.rgb().formatHex()}function Ip(){return this.rgb().formatHex8()}function Rp(){return El(this).formatHsl()}function Ol(){return this.rgb().formatRgb()}function fn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Np.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?kl(t):n===3?new ce(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?hr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?hr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Lp.exec(e))?new ce(t[1],t[2],t[3],1):(t=Ap.exec(e))?new ce(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Dp.exec(e))?hr(t[1],t[2],t[3],t[4]):(t=zp.exec(e))?hr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=jp.exec(e))?Cl(t[1],t[2]/100,t[3]/100,1):(t=Fp.exec(e))?Cl(t[1],t[2]/100,t[3]/100,t[4]):Sl.hasOwnProperty(e)?kl(Sl[e]):e==="transparent"?new ce(NaN,NaN,NaN,0):null}function kl(e){return new ce(e>>16&255,e>>8&255,e&255,1)}function hr(e,t,n,r){return r<=0&&(e=t=n=NaN),new ce(e,t,n,r)}function Xi(e){return e instanceof ot||(e=fn(e)),e?(e=e.rgb(),new ce(e.r,e.g,e.b,e.opacity)):new ce}function dr(e,t,n,r){return arguments.length===1?Xi(e):new ce(e,t,n,r??1)}function ce(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ft(ce,dr,un(ot,{brighter(e){return e=e==null?It:Math.pow(It,e),new ce(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?bt:Math.pow(bt,e),new ce(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ce(xt(this.r),xt(this.g),xt(this.b),pr(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:Ml,formatHex:Ml,formatHex8:Wp,formatRgb:$l,toString:$l}));function Ml(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}`}function Wp(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}${_t((isNaN(this.opacity)?1:this.opacity)*255)}`}function $l(){const e=pr(this.opacity);return`${e===1?"rgb(":"rgba("}${xt(this.r)}, ${xt(this.g)}, ${xt(this.b)}${e===1?")":`, ${e})`}`}function pr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _t(e){return e=xt(e),(e<16?"0":"")+e.toString(16)}function Cl(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ne(e,t,n,r)}function El(e){if(e instanceof Ne)return new Ne(e.h,e.s,e.l,e.opacity);if(e instanceof ot||(e=fn(e)),!e)return new Ne;if(e instanceof Ne)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,o=i-a,l=(i+a)/2;return o?(t===i?s=(n-r)/o+(n<r)*6:n===i?s=(r-t)/o+2:s=(t-n)/o+4,o/=l<.5?i+a:2-i-a,s*=60):o=l>0&&l<1?0:s,new Ne(s,o,l,e.opacity)}function Zi(e,t,n,r){return arguments.length===1?El(e):new Ne(e,t,n,r??1)}function Ne(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ft(Ne,Zi,un(ot,{brighter(e){return e=e==null?It:Math.pow(It,e),new Ne(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bt:Math.pow(bt,e),new Ne(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,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 ce(Qi(e>=240?e-240:e+120,a,r),Qi(e,a,r),Qi(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Ne(Pl(this.h),vr(this.s),vr(this.l),pr(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=pr(this.opacity);return`${e===1?"hsl(":"hsla("}${Pl(this.h)}, ${vr(this.s)*100}%, ${vr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Pl(e){return e=(e||0)%360,e<0?e+360:e}function vr(e){return Math.max(0,Math.min(1,e||0))}function Qi(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Nl=Math.PI/180,Ll=180/Math.PI,mr=18,Al=.96422,Dl=1,zl=.82521,jl=4/29,Wt=6/29,Fl=3*Wt*Wt,Bp=Wt*Wt*Wt;function Il(e){if(e instanceof We)return new We(e.l,e.a,e.b,e.opacity);if(e instanceof Xe)return Rl(e);e instanceof ce||(e=Xi(e));var t=ra(e.r),n=ra(e.g),r=ra(e.b),a=ea((.2225045*t+.7168786*n+.0606169*r)/Dl),i,s;return t===n&&n===r?i=s=a:(i=ea((.4360747*t+.3850649*n+.1430804*r)/Al),s=ea((.0139322*t+.0971045*n+.7141733*r)/zl)),new We(116*a-16,500*(i-a),200*(a-s),e.opacity)}function Ji(e,t,n,r){return arguments.length===1?Il(e):new We(e,t,n,r??1)}function We(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}Ft(We,Ji,un(ot,{brighter(e){return new We(this.l+mr*(e??1),this.a,this.b,this.opacity)},darker(e){return new We(this.l-mr*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=Al*ta(t),e=Dl*ta(e),n=zl*ta(n),new ce(na(3.1338561*t-1.6168667*e-.4906146*n),na(-.9787684*t+1.9161415*e+.033454*n),na(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function ea(e){return e>Bp?Math.pow(e,1/3):e/Fl+jl}function ta(e){return e>Wt?e*e*e:Fl*(e-jl)}function na(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ra(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Hp(e){if(e instanceof Xe)return new Xe(e.h,e.c,e.l,e.opacity);if(e instanceof We||(e=Il(e)),e.a===0&&e.b===0)return new Xe(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ll;return new Xe(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function ia(e,t,n,r){return arguments.length===1?Hp(e):new Xe(e,t,n,r??1)}function Xe(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Rl(e){if(isNaN(e.h))return new We(e.l,0,0,e.opacity);var t=e.h*Nl;return new We(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Ft(Xe,ia,un(ot,{brighter(e){return new Xe(this.h,this.c,this.l+mr*(e??1),this.opacity)},darker(e){return new Xe(this.h,this.c,this.l-mr*(e??1),this.opacity)},rgb(){return Rl(this).rgb()}}));var Wl=-.14861,aa=1.78277,oa=-.29227,gr=-.90649,hn=1.97294,Bl=hn*gr,Hl=hn*aa,Ul=aa*oa-gr*Wl;function Up(e){if(e instanceof wt)return new wt(e.h,e.s,e.l,e.opacity);e instanceof ce||(e=Xi(e));var t=e.r/255,n=e.g/255,r=e.b/255,a=(Ul*r+Bl*t-Hl*n)/(Ul+Bl-Hl),i=r-a,s=(hn*(n-a)-oa*i)/gr,o=Math.sqrt(s*s+i*i)/(hn*a*(1-a)),l=o?Math.atan2(s,i)*Ll-120:NaN;return new wt(l<0?l+360:l,o,a,e.opacity)}function sa(e,t,n,r){return arguments.length===1?Up(e):new wt(e,t,n,r??1)}function wt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ft(wt,sa,un(ot,{brighter(e){return e=e==null?It:Math.pow(It,e),new wt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bt:Math.pow(bt,e),new wt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*Nl,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),a=Math.sin(e);return new ce(255*(t+n*(Wl*r+aa*a)),255*(t+n*(oa*r+gr*a)),255*(t+n*(hn*r)),this.opacity)}}));function ql(e,t,n,r,a){var i=e*e,s=i*e;return((1-3*e+3*i-s)*t+(4-6*i+3*s)*n+(1+3*e+3*i-3*s)*r+s*a)/6}function Yl(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),a=e[r],i=e[r+1],s=r>0?e[r-1]:2*a-i,o=r<t-1?e[r+2]:2*i-a;return ql((n-r/t)*t,s,a,i,o)}}function Vl(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),a=e[(r+t-1)%t],i=e[r%t],s=e[(r+1)%t],o=e[(r+2)%t];return ql((n-r/t)*t,a,i,s,o)}}const yr=e=>()=>e;function Gl(e,t){return function(n){return e+n*t}}function qp(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)}}function br(e,t){var n=t-e;return n?Gl(e,n>180||n<-180?n-360*Math.round(n/360):n):yr(isNaN(e)?t:e)}function Yp(e){return(e=+e)==1?fe:function(t,n){return n-t?qp(t,n,e):yr(isNaN(t)?n:t)}}function fe(e,t){var n=t-e;return n?Gl(e,n):yr(isNaN(e)?t:e)}const xr=function e(t){var n=Yp(t);function r(a,i){var s=n((a=dr(a)).r,(i=dr(i)).r),o=n(a.g,i.g),l=n(a.b,i.b),u=fe(a.opacity,i.opacity);return function(c){return a.r=s(c),a.g=o(c),a.b=l(c),a.opacity=u(c),a+""}}return r.gamma=e,r}(1);function Kl(e){return function(t){var n=t.length,r=new Array(n),a=new Array(n),i=new Array(n),s,o;for(s=0;s<n;++s)o=dr(t[s]),r[s]=o.r||0,a[s]=o.g||0,i[s]=o.b||0;return r=e(r),a=e(a),i=e(i),o.opacity=1,function(l){return o.r=r(l),o.g=a(l),o.b=i(l),o+""}}}var Vp=Kl(Yl),Gp=Kl(Vl);function la(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function Xl(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Kp(e,t){return(Xl(t)?la:Zl)(e,t)}function Zl(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)a[s]=St(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(o){for(s=0;s<r;++s)i[s]=a[s](o);return i}}function Ql(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Le(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Jl(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=St(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var ua=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ca=new RegExp(ua.source,"g");function Xp(e){return function(){return e}}function Zp(e){return function(t){return e(t)+""}}function eu(e,t){var n=ua.lastIndex=ca.lastIndex=0,r,a,i,s=-1,o=[],l=[];for(e=e+"",t=t+"";(r=ua.exec(e))&&(a=ca.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),o[s]?o[s]+=i:o[++s]=i),(r=r[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,l.push({i:s,x:Le(r,a)})),n=ca.lastIndex;return n<t.length&&(i=t.slice(n),o[s]?o[s]+=i:o[++s]=i),o.length<2?l[0]?Zp(l[0].x):Xp(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)o[(f=l[c]).i]=f.x(u);return o.join("")})}function St(e,t){var n=typeof t,r;return t==null||n==="boolean"?yr(t):(n==="number"?Le:n==="string"?(r=fn(t))?(t=r,xr):eu:t instanceof fn?xr:t instanceof Date?Ql:Xl(t)?la:Array.isArray(t)?Zl:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Jl:Le)(e,t)}function Qp(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function Jp(e,t){var n=br(+e,+t);return function(r){var a=n(r);return a-360*Math.floor(a/360)}}function dn(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var tu=180/Math.PI,fa={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function nu(e,t,n,r,a,i){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*tu,skewX:Math.atan(l)*tu,scaleX:s,scaleY:o}}var _r;function ev(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?fa:nu(t.a,t.b,t.c,t.d,t.e,t.f)}function tv(e){return e==null||(_r||(_r=document.createElementNS("http://www.w3.org/2000/svg","g")),_r.setAttribute("transform",e),!(e=_r.transform.baseVal.consolidate()))?fa:(e=e.matrix,nu(e.a,e.b,e.c,e.d,e.e,e.f))}function ru(e,t,n,r){function a(u){return u.length?u.pop()+" ":""}function i(u,c,f,h,p,d){if(u!==f||c!==h){var v=p.push("translate(",null,t,null,n);d.push({i:v-4,x:Le(u,f)},{i:v-2,x:Le(c,h)})}else(f||h)&&p.push("translate("+f+t+h+n)}function s(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(a(f)+"rotate(",null,r)-2,x:Le(u,c)})):c&&f.push(a(f)+"rotate("+c+r)}function o(u,c,f,h){u!==c?h.push({i:f.push(a(f)+"skewX(",null,r)-2,x:Le(u,c)}):c&&f.push(a(f)+"skewX("+c+r)}function l(u,c,f,h,p,d){if(u!==f||c!==h){var v=p.push(a(p)+"scale(",null,",",null,")");d.push({i:v-4,x:Le(u,f)},{i:v-2,x:Le(c,h)})}else(f!==1||h!==1)&&p.push(a(p)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,h),s(u.rotate,c.rotate,f,h),o(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(p){for(var d=-1,v=h.length,x;++d<v;)f[(x=h[d]).i]=x.x(p);return f.join("")}}}var nv=ru(ev,"px, ","px)","deg)"),rv=ru(tv,", ",")",")"),iv=1e-12;function iu(e){return((e=Math.exp(e))+1/e)/2}function av(e){return((e=Math.exp(e))-1/e)/2}function ov(e){return((e=Math.exp(2*e))-1)/(e+1)}const sv=function e(t,n,r){function a(i,s){var o=i[0],l=i[1],u=i[2],c=s[0],f=s[1],h=s[2],p=c-o,d=f-l,v=p*p+d*d,x,g;if(v<iv)g=Math.log(h/u)/t,x=function(T){return[o+T*p,l+T*d,u*Math.exp(t*T*g)]};else{var b=Math.sqrt(v),_=(h*h-u*u+r*v)/(2*u*n*b),M=(h*h-u*u-r*v)/(2*h*n*b),y=Math.log(Math.sqrt(_*_+1)-_),S=Math.log(Math.sqrt(M*M+1)-M);g=(S-y)/t,x=function(T){var $=T*g,k=iu(y),C=u/(n*b)*(k*ov(t*$+y)-av(y));return[o+C*p,l+C*d,u*k/iu(t*$+y)]}}return x.duration=g*1e3*t/Math.SQRT2,x}return a.rho=function(i){var s=Math.max(.001,+i),o=s*s,l=o*o;return e(s,o,l)},a}(Math.SQRT2,2,4);function au(e){return function(t,n){var r=e((t=Zi(t)).h,(n=Zi(n)).h),a=fe(t.s,n.s),i=fe(t.l,n.l),s=fe(t.opacity,n.opacity);return function(o){return t.h=r(o),t.s=a(o),t.l=i(o),t.opacity=s(o),t+""}}}const ou=au(br);var su=au(fe);function lu(e,t){var n=fe((e=Ji(e)).l,(t=Ji(t)).l),r=fe(e.a,t.a),a=fe(e.b,t.b),i=fe(e.opacity,t.opacity);return function(s){return e.l=n(s),e.a=r(s),e.b=a(s),e.opacity=i(s),e+""}}function uu(e){return function(t,n){var r=e((t=ia(t)).h,(n=ia(n)).h),a=fe(t.c,n.c),i=fe(t.l,n.l),s=fe(t.opacity,n.opacity);return function(o){return t.h=r(o),t.c=a(o),t.l=i(o),t.opacity=s(o),t+""}}}const cu=uu(br);var fu=uu(fe);function hu(e){return function t(n){n=+n;function r(a,i){var s=e((a=sa(a)).h,(i=sa(i)).h),o=fe(a.s,i.s),l=fe(a.l,i.l),u=fe(a.opacity,i.opacity);return function(c){return a.h=s(c),a.s=o(c),a.l=l(Math.pow(c,n)),a.opacity=u(c),a+""}}return r.gamma=t,r}(1)}const du=hu(br);var pu=hu(fe);function vu(e,t){t===void 0&&(t=e,e=St);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(s){var o=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return i[o](s-o)}}function lv(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}function uv(e){return function(){return e}}function wr(e){return+e}var mu=[0,1];function ye(e){return e}function ha(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:uv(isNaN(t)?NaN:.5)}function cv(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function fv(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a<r?(r=ha(a,r),i=n(s,i)):(r=ha(r,a),i=n(i,s)),function(o){return i(r(o))}}function hv(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)a[s]=ha(e[s],e[s+1]),i[s]=n(t[s],t[s+1]);return function(o){var l=sn(e,o,1,r)-1;return i[l](a[l](o))}}function pn(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Sr(){var e=mu,t=mu,n=St,r,a,i,s=ye,o,l,u;function c(){var h=Math.min(e.length,t.length);return s!==ye&&(s=cv(e[0],e[h-1])),o=h>2?hv:fv,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?i:(l||(l=o(e.map(r),t,n)))(r(s(h)))}return f.invert=function(h){return s(a((u||(u=o(t,e.map(r),Le)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,wr),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=dn,c()},f.clamp=function(h){return arguments.length?(s=h?!0:ye,c()):s!==ye},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,p){return r=h,a=p,c()}}function da(){return Sr()(ye,ye)}function dv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Tr(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 Bt(e){return e=Tr(Math.abs(e)),e?e[1]:NaN}function pv(e,t){return function(n,r){for(var a=n.length,i=[],s=0,o=e[0],l=0;a>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),i.push(n.substring(a-=o,a+o)),!((l+=o+1)>r));)o=e[s=(s+1)%e.length];return i.reverse().join(t)}}function vv(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var mv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vn(e){if(!(t=mv.exec(e)))throw new Error("invalid format: "+e);var t;return new pa({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]})}vn.prototype=pa.prototype;function pa(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}pa.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function gv(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var gu;function yv(e,t){var n=Tr(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(gu=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Tr(e,Math.max(0,t+i-1))[0]}function yu(e,t){var n=Tr(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")}const bu={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:dv,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)=>yu(e*100,t),r:yu,s:yv,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xu(e){return e}var _u=Array.prototype.map,wu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function bv(e){var t=e.grouping===void 0||e.thousands===void 0?xu:pv(_u.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?xu:vv(_u.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=vn(f);var h=f.fill,p=f.align,d=f.sign,v=f.symbol,x=f.zero,g=f.width,b=f.comma,_=f.precision,M=f.trim,y=f.type;y==="n"?(b=!0,y="g"):bu[y]||(_===void 0&&(_=12),M=!0,y="g"),(x||h==="0"&&p==="=")&&(x=!0,h="0",p="=");var S=v==="$"?n:v==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",T=v==="$"?r:/[%p]/.test(y)?s:"",$=bu[y],k=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function C(P){var N=S,A=T,R,X,U;if(y==="c")A=$(P)+A,P="";else{P=+P;var Z=P<0||1/P<0;if(P=isNaN(P)?l:$(Math.abs(P),_),M&&(P=gv(P)),Z&&+P==0&&d!=="+"&&(Z=!1),N=(Z?d==="("?d:o:d==="-"||d==="("?"":d)+N,A=(y==="s"?wu[8+gu/3]:"")+A+(Z&&d==="("?")":""),k){for(R=-1,X=P.length;++R<X;)if(U=P.charCodeAt(R),48>U||U>57){A=(U===46?a+P.slice(R+1):P.slice(R))+A,P=P.slice(0,R);break}}}b&&!x&&(P=t(P,1/0));var ee=N.length+P.length+A.length,K=ee<g?new Array(g-ee+1).join(h):"";switch(b&&x&&(P=t(K+P,K.length?g-A.length:1/0),K=""),p){case"<":P=N+P+A+K;break;case"=":P=N+K+P+A;break;case"^":P=K.slice(0,ee=K.length>>1)+N+P+A+K.slice(ee);break;default:P=K+N+P+A;break}return i(P)}return C.toString=function(){return f+""},C}function c(f,h){var p=u((f=vn(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(Bt(h)/3)))*3,v=Math.pow(10,-d),x=wu[8+d/3];return function(g){return p(v*g)+x}}return{format:u,formatPrefix:c}}var Or,va,Su;xv({thousands:",",grouping:[3],currency:["$",""]});function xv(e){return Or=bv(e),va=Or.format,Su=Or.formatPrefix,Or}function _v(e){return Math.max(0,-Bt(Math.abs(e)))}function wv(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Bt(t)/3)))*3-Bt(Math.abs(e)))}function Sv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Bt(t)-Bt(e))+1}function Tu(e,t,n,r){var a=Gi(e,t,n),i;switch(r=vn(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=wv(a,s))&&(r.precision=i),Su(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Sv(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=_v(a))&&(r.precision=i-(r.type==="%")*2);break}}return va(r)}function st(e){var t=e.domain;return e.ticks=function(n){var r=t();return Vi(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return Tu(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],o=r[i],l,u,c=10;for(o<s&&(u=s,s=o,o=u,u=a,a=i,i=u);c-- >0;){if(u=ml(s,o,n),u===l)return r[a]=s,r[i]=o,t(r);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return e},e}function ma(){var e=da();return e.copy=function(){return pn(e,ma())},Ce.apply(e,arguments),st(e)}function Ou(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,wr),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Ou(e).unknown(t)},e=arguments.length?Array.from(e,wr):[0,1],st(n)}function ku(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return i<a&&(s=n,n=r,r=s,s=a,a=i,i=s),e[n]=t.floor(a),e[r]=t.ceil(i),e}function Mu(e){return Math.log(e)}function $u(e){return Math.exp(e)}function Tv(e){return-Math.log(-e)}function Ov(e){return-Math.exp(-e)}function kv(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Mv(e){return e===10?kv:e===Math.E?Math.exp:t=>Math.pow(e,t)}function $v(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Cu(e){return(t,n)=>-e(-t,n)}function ga(e){const t=e(Mu,$u),n=t.domain;let r=10,a,i;function s(){return a=$v(r),i=Mv(r),n()[0]<0?(a=Cu(a),i=Cu(i),e(Tv,Ov)):e(Mu,$u),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const l=n();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let h=a(u),p=a(c),d,v;const x=o==null?10:+o;let g=[];if(!(r%1)&&p-h<x){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;++h)for(d=1;d<r;++d)if(v=h<0?d/i(-h):d*i(h),!(v<u)){if(v>c)break;g.push(v)}}else for(;h<=p;++h)for(d=r-1;d>=1;--d)if(v=h>0?d/i(-h):d*i(h),!(v<u)){if(v>c)break;g.push(v)}g.length*2<x&&(g=Vi(u,c,x))}else g=Vi(h,p,Math.min(p-h,x)).map(i);return f?g.reverse():g},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=vn(l)).precision==null&&(l.trim=!0),l=va(l)),o===1/0)return l;const u=Math.max(1,r*o/t.ticks().length);return c=>{let f=c/i(Math.round(a(c)));return f*r<r-.5&&(f*=r),f<=u?l(c):""}},t.nice=()=>n(ku(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function ya(){const e=ga(Sr()).domain([1,10]);return e.copy=()=>pn(e,ya()).base(e.base()),Ce.apply(e,arguments),e}function Eu(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Pu(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function ba(e){var t=1,n=e(Eu(t),Pu(t));return n.constant=function(r){return arguments.length?e(Eu(t=+r),Pu(t)):t},st(n)}function xa(){var e=ba(Sr());return e.copy=function(){return pn(e,xa()).constant(e.constant())},Ce.apply(e,arguments)}function Nu(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Cv(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ev(e){return e<0?-e*e:e*e}function _a(e){var t=e(ye,ye),n=1;function r(){return n===1?e(ye,ye):n===.5?e(Cv,Ev):e(Nu(n),Nu(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},st(t)}function kr(){var e=_a(Sr());return e.copy=function(){return pn(e,kr()).exponent(e.exponent())},Ce.apply(e,arguments),e}function Lu(){return kr.apply(null,arguments).exponent(.5)}function Au(e){return Math.sign(e)*e*e}function Pv(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function wa(){var e=da(),t=[0,1],n=!1,r;function a(i){var s=Pv(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(Au(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,wr)).map(Au)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return wa(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Ce.apply(a,arguments),st(a)}function Sa(){var e=[],t=[],n=[],r;function a(){var s=0,o=Math.max(1,t.length);for(n=new Array(o-1);++s<o;)n[s-1]=Pp(e,s/o);return i}function i(s){return s==null||isNaN(s=+s)?r:t[sn(n,s)]}return i.invertExtent=function(s){var o=t.indexOf(s);return o<0?[NaN,NaN]:[o>0?n[o-1]:e[0],o<n.length?n[o]:e[e.length-1]]},i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let o of s)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(at),a()},i.range=function(s){return arguments.length?(t=Array.from(s),a()):t.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return Sa().domain(e).range(t).unknown(r)},Ce.apply(i,arguments)}function Ta(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function s(l){return l!=null&&l<=l?a[sn(r,l,0,n)]:i}function o(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return s}return s.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},s.range=function(l){return arguments.length?(n=(a=Array.from(l)).length-1,o()):a.slice()},s.invertExtent=function(l){var u=a.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},s.unknown=function(l){return arguments.length&&(i=l),s},s.thresholds=function(){return r.slice()},s.copy=function(){return Ta().domain([e,t]).range(a).unknown(i)},Ce.apply(st(s),arguments)}function Oa(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[sn(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return Oa().domain(e).range(t).unknown(n)},Ce.apply(a,arguments)}const ka=new Date,Ma=new Date;function se(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),o=a.ceil(i);return i-s<o-i?s:o},a.offset=(i,s)=>(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,o)=>{const l=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i<s)||!(o>0))return l;let u;do l.push(u=new Date(+i)),t(i,o),e(i);while(u<i&&i<s);return l},a.filter=i=>se(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!i(s););else for(;--o>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(ka.setTime(+i),Ma.setTime(+s),e(ka),e(Ma),Math.floor(n(ka,Ma))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Ht=se(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ht.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?se(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ht);const Du=Ht.range,Ze=1e3,Ee=Ze*60,Qe=Ee*60,Je=Qe*24,$a=Je*7,zu=Je*30,Ca=Je*365,Ae=se(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ze)},(e,t)=>(t-e)/Ze,e=>e.getUTCSeconds()),ju=Ae.range,mn=se(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ze)},(e,t)=>{e.setTime(+e+t*Ee)},(e,t)=>(t-e)/Ee,e=>e.getMinutes()),Nv=mn.range,gn=se(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ee)},(e,t)=>(t-e)/Ee,e=>e.getUTCMinutes()),Lv=gn.range,yn=se(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ze-e.getMinutes()*Ee)},(e,t)=>{e.setTime(+e+t*Qe)},(e,t)=>(t-e)/Qe,e=>e.getHours()),Av=yn.range,bn=se(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Qe)},(e,t)=>(t-e)/Qe,e=>e.getUTCHours()),Dv=bn.range,Tt=se(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ee)/Je,e=>e.getDate()-1),zv=Tt.range,Ut=se(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Je,e=>e.getUTCDate()-1),jv=Ut.range,Ea=se(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Je,e=>Math.floor(e/Je)),Fv=Ea.range;function Ot(e){return se(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ee)/$a)}const kt=Ot(0),xn=Ot(1),Fu=Ot(2),Iu=Ot(3),Mt=Ot(4),Ru=Ot(5),Wu=Ot(6),Bu=kt.range,Iv=xn.range,Rv=Fu.range,Wv=Iu.range,Bv=Mt.range,Hv=Ru.range,Uv=Wu.range;function $t(e){return se(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/$a)}const Ct=$t(0),_n=$t(1),Hu=$t(2),Uu=$t(3),Et=$t(4),qu=$t(5),Yu=$t(6),Vu=Ct.range,qv=_n.range,Yv=Hu.range,Vv=Uu.range,Gv=Et.range,Kv=qu.range,Xv=Yu.range,wn=se(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),Zv=wn.range,Sn=se(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),Qv=Sn.range,De=se(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());De.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:se(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});const Jv=De.range,ze=se(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ze.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:se(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});const em=ze.range;function Gu(e,t,n,r,a,i){const s=[[Ae,1,Ze],[Ae,5,5*Ze],[Ae,15,15*Ze],[Ae,30,30*Ze],[i,1,Ee],[i,5,5*Ee],[i,15,15*Ee],[i,30,30*Ee],[a,1,Qe],[a,3,3*Qe],[a,6,6*Qe],[a,12,12*Qe],[r,1,Je],[r,2,2*Je],[n,1,$a],[t,1,zu],[t,3,3*zu],[e,1,Ca]];function o(u,c,f){const h=c<u;h&&([u,c]=[c,u]);const p=f&&typeof f.range=="function"?f:l(u,c,f),d=p?p.range(u,+c+1):[];return h?d.reverse():d}function l(u,c,f){const h=Math.abs(c-u)/f,p=ur(([,,x])=>x).right(s,h);if(p===s.length)return e.every(Gi(u/Ca,c/Ca,f));if(p===0)return Ht.every(Math.max(Gi(u,c,f),1));const[d,v]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return d.every(v)}return[o,l]}const[Ku,Xu]=Gu(ze,Sn,Ct,Ea,bn,gn),[Zu,Qu]=Gu(De,wn,kt,Tt,yn,mn);function Pa(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 Na(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 Tn(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function tm(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,u=On(a),c=kn(a),f=On(i),h=kn(i),p=On(s),d=kn(s),v=On(o),x=kn(o),g=On(l),b=kn(l),_={a:Z,A:ee,b:K,B:E,c:null,d:ic,e:ic,f:Tm,g:Am,G:zm,H:_m,I:wm,j:Sm,L:ac,m:Om,M:km,p:D,q:B,Q:fc,s:hc,S:Mm,u:$m,U:Cm,V:Em,w:Pm,W:Nm,x:null,X:null,y:Lm,Y:Dm,Z:jm,"%":cc},M={a:W,A:F,b:I,B:q,c:null,d:sc,e:sc,f:Wm,g:Zm,G:Jm,H:Fm,I:Im,j:Rm,L:lc,m:Bm,M:Hm,p:Y,q:G,Q:fc,s:hc,S:Um,u:qm,U:Ym,V:Vm,w:Gm,W:Km,x:null,X:null,y:Xm,Y:Qm,Z:eg,"%":cc},y={a:C,A:P,b:N,B:A,c:R,d:nc,e:nc,f:gm,g:tc,G:ec,H:rc,I:rc,j:dm,L:mm,m:hm,M:pm,p:k,q:fm,Q:bm,s:xm,S:vm,u:om,U:sm,V:lm,w:am,W:um,x:X,X:U,y:tc,Y:ec,Z:cm,"%":ym};_.x=S(n,_),_.X=S(r,_),_.c=S(t,_),M.x=S(n,M),M.X=S(r,M),M.c=S(t,M);function S(L,j){return function(H){var O=[],Q=-1,te=0,le=L.length,de,qe,oi;for(H instanceof Date||(H=new Date(+H));++Q<le;)L.charCodeAt(Q)===37&&(O.push(L.slice(te,Q)),(qe=Ju[de=L.charAt(++Q)])!=null?de=L.charAt(++Q):qe=de==="e"?" ":"0",(oi=j[de])&&(de=oi(H,qe)),O.push(de),te=Q+1);return O.push(L.slice(te,Q)),O.join("")}}function T(L,j){return function(H){var O=Tn(1900,void 0,1),Q=$(O,L,H+="",0),te,le;if(Q!=H.length)return null;if("Q"in O)return new Date(O.Q);if("s"in O)return new Date(O.s*1e3+("L"in O?O.L:0));if(j&&!("Z"in O)&&(O.Z=0),"p"in O&&(O.H=O.H%12+O.p*12),O.m===void 0&&(O.m="q"in O?O.q:0),"V"in O){if(O.V<1||O.V>53)return null;"w"in O||(O.w=1),"Z"in O?(te=Na(Tn(O.y,0,1)),le=te.getUTCDay(),te=le>4||le===0?_n.ceil(te):_n(te),te=Ut.offset(te,(O.V-1)*7),O.y=te.getUTCFullYear(),O.m=te.getUTCMonth(),O.d=te.getUTCDate()+(O.w+6)%7):(te=Pa(Tn(O.y,0,1)),le=te.getDay(),te=le>4||le===0?xn.ceil(te):xn(te),te=Tt.offset(te,(O.V-1)*7),O.y=te.getFullYear(),O.m=te.getMonth(),O.d=te.getDate()+(O.w+6)%7)}else("W"in O||"U"in O)&&("w"in O||(O.w="u"in O?O.u%7:"W"in O?1:0),le="Z"in O?Na(Tn(O.y,0,1)).getUTCDay():Pa(Tn(O.y,0,1)).getDay(),O.m=0,O.d="W"in O?(O.w+6)%7+O.W*7-(le+5)%7:O.w+O.U*7-(le+6)%7);return"Z"in O?(O.H+=O.Z/100|0,O.M+=O.Z%100,Na(O)):Pa(O)}}function $(L,j,H,O){for(var Q=0,te=j.length,le=H.length,de,qe;Q<te;){if(O>=le)return-1;if(de=j.charCodeAt(Q++),de===37){if(de=j.charAt(Q++),qe=y[de in Ju?j.charAt(Q++):de],!qe||(O=qe(L,H,O))<0)return-1}else if(de!=H.charCodeAt(O++))return-1}return O}function k(L,j,H){var O=u.exec(j.slice(H));return O?(L.p=c.get(O[0].toLowerCase()),H+O[0].length):-1}function C(L,j,H){var O=p.exec(j.slice(H));return O?(L.w=d.get(O[0].toLowerCase()),H+O[0].length):-1}function P(L,j,H){var O=f.exec(j.slice(H));return O?(L.w=h.get(O[0].toLowerCase()),H+O[0].length):-1}function N(L,j,H){var O=g.exec(j.slice(H));return O?(L.m=b.get(O[0].toLowerCase()),H+O[0].length):-1}function A(L,j,H){var O=v.exec(j.slice(H));return O?(L.m=x.get(O[0].toLowerCase()),H+O[0].length):-1}function R(L,j,H){return $(L,t,j,H)}function X(L,j,H){return $(L,n,j,H)}function U(L,j,H){return $(L,r,j,H)}function Z(L){return s[L.getDay()]}function ee(L){return i[L.getDay()]}function K(L){return l[L.getMonth()]}function E(L){return o[L.getMonth()]}function D(L){return a[+(L.getHours()>=12)]}function B(L){return 1+~~(L.getMonth()/3)}function W(L){return s[L.getUTCDay()]}function F(L){return i[L.getUTCDay()]}function I(L){return l[L.getUTCMonth()]}function q(L){return o[L.getUTCMonth()]}function Y(L){return a[+(L.getUTCHours()>=12)]}function G(L){return 1+~~(L.getUTCMonth()/3)}return{format:function(L){var j=S(L+="",_);return j.toString=function(){return L},j},parse:function(L){var j=T(L+="",!1);return j.toString=function(){return L},j},utcFormat:function(L){var j=S(L+="",M);return j.toString=function(){return L},j},utcParse:function(L){var j=T(L+="",!0);return j.toString=function(){return L},j}}}var Ju={"-":"",_:" ",0:"0"},he=/^\s*\d+/,nm=/^%/,rm=/[\\^$*+?|[\]().{}]/g;function ne(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 im(e){return e.replace(rm,"\\$&")}function On(e){return new RegExp("^(?:"+e.map(im).join("|")+")","i")}function kn(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function am(e,t,n){var r=he.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function om(e,t,n){var r=he.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function sm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function lm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function um(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ec(e,t,n){var r=he.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function tc(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function cm(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 fm(e,t,n){var r=he.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function hm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function nc(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function dm(e,t,n){var r=he.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function rc(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function pm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function vm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function mm(e,t,n){var r=he.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function gm(e,t,n){var r=he.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ym(e,t,n){var r=nm.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function bm(e,t,n){var r=he.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function xm(e,t,n){var r=he.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ic(e,t){return ne(e.getDate(),t,2)}function _m(e,t){return ne(e.getHours(),t,2)}function wm(e,t){return ne(e.getHours()%12||12,t,2)}function Sm(e,t){return ne(1+Tt.count(De(e),e),t,3)}function ac(e,t){return ne(e.getMilliseconds(),t,3)}function Tm(e,t){return ac(e,t)+"000"}function Om(e,t){return ne(e.getMonth()+1,t,2)}function km(e,t){return ne(e.getMinutes(),t,2)}function Mm(e,t){return ne(e.getSeconds(),t,2)}function $m(e){var t=e.getDay();return t===0?7:t}function Cm(e,t){return ne(kt.count(De(e)-1,e),t,2)}function oc(e){var t=e.getDay();return t>=4||t===0?Mt(e):Mt.ceil(e)}function Em(e,t){return e=oc(e),ne(Mt.count(De(e),e)+(De(e).getDay()===4),t,2)}function Pm(e){return e.getDay()}function Nm(e,t){return ne(xn.count(De(e)-1,e),t,2)}function Lm(e,t){return ne(e.getFullYear()%100,t,2)}function Am(e,t){return e=oc(e),ne(e.getFullYear()%100,t,2)}function Dm(e,t){return ne(e.getFullYear()%1e4,t,4)}function zm(e,t){var n=e.getDay();return e=n>=4||n===0?Mt(e):Mt.ceil(e),ne(e.getFullYear()%1e4,t,4)}function jm(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ne(t/60|0,"0",2)+ne(t%60,"0",2)}function sc(e,t){return ne(e.getUTCDate(),t,2)}function Fm(e,t){return ne(e.getUTCHours(),t,2)}function Im(e,t){return ne(e.getUTCHours()%12||12,t,2)}function Rm(e,t){return ne(1+Ut.count(ze(e),e),t,3)}function lc(e,t){return ne(e.getUTCMilliseconds(),t,3)}function Wm(e,t){return lc(e,t)+"000"}function Bm(e,t){return ne(e.getUTCMonth()+1,t,2)}function Hm(e,t){return ne(e.getUTCMinutes(),t,2)}function Um(e,t){return ne(e.getUTCSeconds(),t,2)}function qm(e){var t=e.getUTCDay();return t===0?7:t}function Ym(e,t){return ne(Ct.count(ze(e)-1,e),t,2)}function uc(e){var t=e.getUTCDay();return t>=4||t===0?Et(e):Et.ceil(e)}function Vm(e,t){return e=uc(e),ne(Et.count(ze(e),e)+(ze(e).getUTCDay()===4),t,2)}function Gm(e){return e.getUTCDay()}function Km(e,t){return ne(_n.count(ze(e)-1,e),t,2)}function Xm(e,t){return ne(e.getUTCFullYear()%100,t,2)}function Zm(e,t){return e=uc(e),ne(e.getUTCFullYear()%100,t,2)}function Qm(e,t){return ne(e.getUTCFullYear()%1e4,t,4)}function Jm(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Et(e):Et.ceil(e),ne(e.getUTCFullYear()%1e4,t,4)}function eg(){return"+0000"}function cc(){return"%"}function fc(e){return+e}function hc(e){return Math.floor(+e/1e3)}var qt,dc,pc;tg({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"]});function tg(e){return qt=tm(e),dc=qt.format,qt.parse,pc=qt.utcFormat,qt.utcParse,qt}function ng(e){return new Date(e)}function rg(e){return e instanceof Date?+e:+new Date(+e)}function La(e,t,n,r,a,i,s,o,l,u){var c=da(),f=c.invert,h=c.domain,p=u(".%L"),d=u(":%S"),v=u("%I:%M"),x=u("%I %p"),g=u("%a %d"),b=u("%b %d"),_=u("%B"),M=u("%Y");function y(S){return(l(S)<S?p:o(S)<S?d:s(S)<S?v:i(S)<S?x:r(S)<S?a(S)<S?g:b:n(S)<S?_:M)(S)}return c.invert=function(S){return new Date(f(S))},c.domain=function(S){return arguments.length?h(Array.from(S,rg)):h().map(ng)},c.ticks=function(S){var T=h();return e(T[0],T[T.length-1],S??10)},c.tickFormat=function(S,T){return T==null?y:u(T)},c.nice=function(S){var T=h();return(!S||typeof S.range!="function")&&(S=t(T[0],T[T.length-1],S??10)),S?h(ku(T,S)):c},c.copy=function(){return pn(c,La(e,t,n,r,a,i,s,o,l,u))},c}function vc(){return Ce.apply(La(Zu,Qu,De,wn,kt,Tt,yn,mn,Ae,dc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function mc(){return Ce.apply(La(Ku,Xu,ze,Sn,Ct,Ut,bn,gn,Ae,pc).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Mr(){var e=0,t=1,n,r,a,i,s=ye,o=!1,l;function u(f){return f==null||isNaN(f=+f)?l:s(a===0?.5:(f=(i(f)-n)*a,o?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(f){return arguments.length?(o=!!f,u):o},u.interpolator=function(f){return arguments.length?(s=f,u):s};function c(f){return function(h){var p,d;return arguments.length?([p,d]=h,s=f(p,d),u):[s(0),s(1)]}}return u.range=c(St),u.rangeRound=c(dn),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return i=f,n=f(e),r=f(t),a=n===r?0:1/(r-n),u}}function lt(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function gc(){var e=st(Mr()(ye));return e.copy=function(){return lt(e,gc())},Ke.apply(e,arguments)}function yc(){var e=ga(Mr()).domain([1,10]);return e.copy=function(){return lt(e,yc()).base(e.base())},Ke.apply(e,arguments)}function bc(){var e=ba(Mr());return e.copy=function(){return lt(e,bc()).constant(e.constant())},Ke.apply(e,arguments)}function Aa(){var e=_a(Mr());return e.copy=function(){return lt(e,Aa()).exponent(e.exponent())},Ke.apply(e,arguments)}function ig(){return Aa.apply(null,arguments).exponent(.5)}function xc(){var e=[],t=ye;function n(r){if(r!=null&&!isNaN(r=+r))return t((sn(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(at),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>Ep(e,i/r))},n.copy=function(){return xc(t).domain(e)},Ke.apply(n,arguments)}function $r(){var e=0,t=.5,n=1,r=1,a,i,s,o,l,u=ye,c,f=!1,h;function p(v){return isNaN(v=+v)?h:(v=.5+((v=+c(v))-i)*(r*v<r*i?o:l),u(f?Math.max(0,Math.min(1,v)):v))}p.domain=function(v){return arguments.length?([e,t,n]=v,a=c(e=+e),i=c(t=+t),s=c(n=+n),o=a===i?0:.5/(i-a),l=i===s?0:.5/(s-i),r=i<a?-1:1,p):[e,t,n]},p.clamp=function(v){return arguments.length?(f=!!v,p):f},p.interpolator=function(v){return arguments.length?(u=v,p):u};function d(v){return function(x){var g,b,_;return arguments.length?([g,b,_]=x,u=vu(v,[g,b,_]),p):[u(0),u(.5),u(1)]}}return p.range=d(St),p.rangeRound=d(dn),p.unknown=function(v){return arguments.length?(h=v,p):h},function(v){return c=v,a=v(e),i=v(t),s=v(n),o=a===i?0:.5/(i-a),l=i===s?0:.5/(s-i),r=i<a?-1:1,p}}function _c(){var e=st($r()(ye));return e.copy=function(){return lt(e,_c())},Ke.apply(e,arguments)}function wc(){var e=ga($r()).domain([.1,1,10]);return e.copy=function(){return lt(e,wc()).base(e.base())},Ke.apply(e,arguments)}function Sc(){var e=ba($r());return e.copy=function(){return lt(e,Sc()).constant(e.constant())},Ke.apply(e,arguments)}function Da(){var e=_a($r());return e.copy=function(){return lt(e,Da()).exponent(e.exponent())},Ke.apply(e,arguments)}function ag(){return Da.apply(null,arguments).exponent(.5)}const og=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:fr,scaleDiverging:_c,scaleDivergingLog:wc,scaleDivergingPow:Da,scaleDivergingSqrt:ag,scaleDivergingSymlog:Sc,scaleIdentity:Ou,scaleImplicit:Ki,scaleLinear:ma,scaleLog:ya,scaleOrdinal:cr,scalePoint:wl,scalePow:kr,scaleQuantile:Sa,scaleQuantize:Ta,scaleRadial:wa,scaleSequential:gc,scaleSequentialLog:yc,scaleSequentialPow:Aa,scaleSequentialQuantile:xc,scaleSequentialSqrt:ig,scaleSequentialSymlog:bc,scaleSqrt:Lu,scaleSymlog:xa,scaleThreshold:Oa,scaleTime:vc,scaleUtc:mc,tickFormat:Tu},Symbol.toStringTag,{value:"Module"}));function sg(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}function lg(e,t){t.range&&("padding"in e,e.range(t.range))}function ug(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}function cg(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}function fg(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}function hg(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}function dg(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}const pg=Object.freeze(Object.defineProperty({__proto__:null,interpolate:St,interpolateArray:Kp,interpolateBasis:Yl,interpolateBasisClosed:Vl,interpolateCubehelix:du,interpolateCubehelixLong:pu,interpolateDate:Ql,interpolateDiscrete:Qp,interpolateHcl:cu,interpolateHclLong:fu,interpolateHsl:ou,interpolateHslLong:su,interpolateHue:Jp,interpolateLab:lu,interpolateNumber:Le,interpolateNumberArray:la,interpolateObject:Jl,interpolateRgb:xr,interpolateRgbBasis:Vp,interpolateRgbBasisClosed:Gp,interpolateRound:dn,interpolateString:eu,interpolateTransformCss:nv,interpolateTransformSvg:rv,interpolateZoom:sv,piecewise:vu,quantize:lv},Symbol.toStringTag,{value:"Module"}));var Tc={lab:lu,hcl:cu,"hcl-long":fu,hsl:ou,"hsl-long":su,cubehelix:du,"cubehelix-long":pu,rgb:xr};function vg(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return Tc[e]}var t=e.type,n=e.gamma,r=Tc[t];return typeof n>"u"?r:r.gamma(n)}function mg(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=vg(t.interpolate);e.interpolate(n)}}const gg=Object.freeze(Object.defineProperty({__proto__:null,timeDay:Tt,timeDays:zv,timeFriday:Ru,timeFridays:Hv,timeHour:yn,timeHours:Av,timeInterval:se,timeMillisecond:Ht,timeMilliseconds:Du,timeMinute:mn,timeMinutes:Nv,timeMonday:xn,timeMondays:Iv,timeMonth:wn,timeMonths:Zv,timeSaturday:Wu,timeSaturdays:Uv,timeSecond:Ae,timeSeconds:ju,timeSunday:kt,timeSundays:Bu,timeThursday:Mt,timeThursdays:Bv,timeTickInterval:Qu,timeTicks:Zu,timeTuesday:Fu,timeTuesdays:Rv,timeWednesday:Iu,timeWednesdays:Wv,timeWeek:kt,timeWeeks:Bu,timeYear:De,timeYears:Jv,unixDay:Ea,unixDays:Fv,utcDay:Ut,utcDays:jv,utcFriday:qu,utcFridays:Kv,utcHour:bn,utcHours:Dv,utcMillisecond:Ht,utcMilliseconds:Du,utcMinute:gn,utcMinutes:Lv,utcMonday:_n,utcMondays:qv,utcMonth:Sn,utcMonths:Qv,utcSaturday:Yu,utcSaturdays:Xv,utcSecond:Ae,utcSeconds:ju,utcSunday:Ct,utcSundays:Vu,utcThursday:Et,utcThursdays:Gv,utcTickInterval:Xu,utcTicks:Ku,utcTuesday:Hu,utcTuesdays:Yv,utcWednesday:Uu,utcWednesdays:Vv,utcWeek:Ct,utcWeeks:Vu,utcYear:ze,utcYears:em},Symbol.toStringTag,{value:"Module"}));var yg=new Date(Date.UTC(2020,1,2,3,4,5)),bg="%Y-%m-%d %H:%M";function Oc(e){var t=e.tickFormat(1,bg)(yg);return t==="2020-02-02 03:04"}var kc={day:Tt,hour:yn,minute:mn,month:wn,second:Ae,week:kt,year:De},Mc={day:Ut,hour:bn,minute:gn,month:Sn,second:Ae,week:Ct,year:ze};function xg(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,a=Oc(r);if(typeof n=="string")r.nice(a?Mc[n]:kc[n]);else{var i=n.interval,s=n.step,o=(a?Mc[i]:kc[i]).every(s);o!=null&&r.nice(o)}}}}function _g(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}function wg(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}function Sg(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(dn))}function Tg(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}function Og(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],a=n[1],i=a<r,s=i?[a,r]:[r,a],o=s[0],l=s[1],u=[Math.min(0,o),Math.max(0,l)];e.domain(i?u.reverse():u)}}var $c=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"],kg={domain:sg,nice:xg,zero:Og,interpolate:mg,round:Sg,align:ug,base:cg,clamp:fg,constant:hg,exponent:dg,padding:_g,range:lg,reverse:wg,unknown:Tg};function be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),a=$c.filter(function(i){return r.has(i)});return function(s,o){return typeof o<"u"&&a.forEach(function(l){kg[l](s,o)}),s}}var Mg=be("domain","range","reverse","align","padding","round");function Mn(e){return Mg(fr(),e)}var $g=be("domain","range","reverse","align","padding","round");function Cc(e){return $g(wl(),e)}var Cg=be("domain","range","reverse","clamp","interpolate","nice","round","zero");function Yt(e){return Cg(ma(),e)}var Eg=be("domain","range","clamp","nice","round","unknown");function Pg(e){return Eg(wa(),e)}var Ng=be("domain","range","reverse","clamp","interpolate","nice","round");function Ec(e){return Ng(vc(),e)}var Lg=be("domain","range","reverse","clamp","interpolate","nice","round");function Pc(e){return Lg(mc(),e)}var Ag=be("domain","range","reverse","base","clamp","interpolate","nice","round");function Nc(e){return Ag(ya(),e)}var Dg=be("domain","range","reverse","clamp","exponent","interpolate","nice","round","zero");function Lc(e){return Dg(kr(),e)}var zg=be("domain","range","reverse","unknown");function Cr(e){return zg(cr(),e)}var jg=be("domain","range","reverse","nice","zero");function Ac(e){return jg(Ta(),e)}var Fg=be("domain","range","reverse");function Dc(e){return Fg(Sa(),e)}var Ig=be("domain","range","reverse","clamp","constant","nice","zero","round");function zc(e){return Ig(xa(),e)}var Rg=be("domain","range","reverse");function jc(e){return Rg(Oa(),e)}var Wg=be("domain","range","reverse","clamp","interpolate","nice","round","zero");function Fc(e){return Wg(Lu(),e)}function $n(e){if(typeof e<"u"&&"type"in e)switch(e.type){case"linear":return Yt(e);case"log":return Nc(e);case"pow":return Lc(e);case"sqrt":return Fc(e);case"symlog":return zc(e);case"time":return Ec(e);case"utc":return Pc(e);case"quantile":return Dc(e);case"quantize":return Ac(e);case"threshold":return jc(e);case"ordinal":return Cr(e);case"point":return Cc(e);case"band":return Mn(e)}return Yt(e)}var Bg=be.apply(void 0,$c);function Hg(e,t){return Bg(e.copy(),t)}function Ug(e){return"paddingInner"in e?"band":"padding"in e?"point":"quantiles"in e?"quantile":"base"in e?"log":"exponent"in e?e.exponent()===.5?"sqrt":"pow":"constant"in e?"symlog":"clamp"in e?e.ticks()[0]instanceof Date?Oc(e)?"utc":"time":"linear":"nice"in e?"quantize":"invertExtent"in e?"threshold":"ordinal"}function Er(e){if((typeof e=="function"||typeof e=="object"&&e)&&"valueOf"in e){var t=e.valueOf();if(typeof t=="number")return t}return e}function Pr(e,t){var n=e;return"ticks"in n?n.ticks(t):n.domain().filter(function(r,a,i){return t==null||i.length<=t||a%Math.round((i.length-1)/t)===0})}function Ic(e){return e==null?void 0:e.toString()}var qg=new Set(["linear","pow","quantize","sqrt","symlog"]);function za(e){return qg.has(e.type)}const Yg=Object.freeze(Object.defineProperty({__proto__:null,coerceNumber:Er,createScale:$n,getTicks:Pr,inferScaleType:Ug,scaleBand:Mn,scaleCanBeZeroed:za,scaleLinear:Yt,scaleLog:Nc,scaleOrdinal:Cr,scalePoint:Cc,scalePower:Lc,scaleQuantile:Dc,scaleQuantize:Ac,scaleRadial:Pg,scaleSqrt:Fc,scaleSymlog:zc,scaleThreshold:jc,scaleTime:Ec,scaleUtc:Pc,toString:Ic,updateScale:Hg},Symbol.toStringTag,{value:"Module"}));var Vg=["children","id","from","to","x1","y1","x2","y2","fromOffset","fromOpacity","toOffset","toOpacity","rotate","transform","vertical"];function ja(){return ja=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},ja.apply(this,arguments)}function Gg(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Cn(e){var t=e.children,n=e.id,r=e.from,a=e.to,i=e.x1,s=e.y1,o=e.x2,l=e.y2,u=e.fromOffset,c=u===void 0?"0%":u,f=e.fromOpacity,h=f===void 0?1:f,p=e.toOffset,d=p===void 0?"100%":p,v=e.toOpacity,x=v===void 0?1:v,g=e.rotate,b=e.transform,_=e.vertical,M=_===void 0?!0:_,y=Gg(e,Vg),S=i,T=o,$=s,k=l;return M&&!S&&!T&&!$&&!k&&(S="0",T="0",$="0",k="1"),m.createElement("defs",null,m.createElement("linearGradient",ja({id:n,x1:S,y1:$,x2:T,y2:k,gradientTransform:g?"rotate("+g+")":b},y),!!t&&t,!t&&m.createElement("stop",{offset:c,stopColor:r,stopOpacity:h}),!t&&m.createElement("stop",{offset:d,stopColor:a,stopOpacity:x})))}Cn.propTypes={id:w.string.isRequired,from:w.string,to:w.string,x1:w.oneOfType([w.string,w.number]),x2:w.oneOfType([w.string,w.number]),y1:w.oneOfType([w.string,w.number]),y2:w.oneOfType([w.string,w.number]),fromOffset:w.oneOfType([w.string,w.number]),fromOpacity:w.oneOfType([w.string,w.number]),toOffset:w.oneOfType([w.string,w.number]),toOpacity:w.oneOfType([w.string,w.number]),rotate:w.oneOfType([w.string,w.number]),transform:w.string,children:w.node,vertical:w.bool};var Kg=Rc;function Rc(e,t,n){e instanceof RegExp&&(e=Wc(e,n)),t instanceof RegExp&&(t=Wc(t,n));var r=Bc(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function Wc(e,t){var n=t.match(e);return n?n[0]:null}Rc.range=Bc;function Bc(e,t,n){var r,a,i,s,o,l=n.indexOf(e),u=n.indexOf(t,l+1),c=l;if(l>=0&&u>0){for(r=[],i=n.length;c>=0&&!o;)c==l?(r.push(c),l=n.indexOf(e,c+1)):r.length==1?o=[r.pop(),u]:(a=r.pop(),a<i&&(i=a,s=u),u=n.indexOf(t,c+1)),c=l<u&&l>=0?l:u;r.length&&(o=[i,s])}return o}var Xg=Hc;function Hc(e,t,n){e instanceof RegExp&&(e=Uc(e,n)),t instanceof RegExp&&(t=Uc(t,n));var r=qc(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function Uc(e,t){var n=t.match(e);return n?n[0]:null}Hc.range=qc;function qc(e,t,n){var r,a,i,s,o,l=n.indexOf(e),u=n.indexOf(t,l+1),c=l;if(l>=0&&u>0){if(e===t)return[l,u];for(r=[],i=n.length;c>=0&&!o;)c==l?(r.push(c),l=n.indexOf(e,c+1)):r.length==1?o=[r.pop(),u]:(a=r.pop(),a<i&&(i=a,s=u),u=n.indexOf(t,c+1)),c=l<u&&l>=0?l:u;r.length&&(o=[i,s])}return o}var Zg=Xg,Qg=Yc;function Yc(e,t,n){var r=e;return Jg(e,t).reduce(function(a,i){return a.replace(i.functionIdentifier+"("+i.matches.body+")",e0(i.matches.body,i.functionIdentifier,n,r,t))},e)}function Jg(e,t){var n=[],r=typeof t=="string"?new RegExp("\\b("+t+")\\("):t;do{var a=r.exec(e);if(!a)return n;if(a[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+t);var i=a[1],s=a.index,o=Zg("(",")",e.substring(s));if(!o||o.start!==a[0].length-1)throw new SyntaxError(i+"(): missing closing ')' in the value '"+e+"'");n.push({matches:o,functionIdentifier:i}),e=o.post}while(r.test(e));return n}function e0(e,t,n,r,a){return n(Yc(e,a,n),t,r)}var xe=function(e){this.value=e};xe.math={isDegree:!0,acos:function(e){return xe.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return xe.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return xe.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,t){var n=1,r=e-t,a=t;a<r&&(a=r,r=t);for(var i=a+1;i<=e;i++)n*=i;return n/xe.math.fact(r)},changeSign:function(e){return-e},cos:function(e){return xe.math.isDegree&&(e=xe.math.toRadian(e)),Math.cos(e)},cosh:function(e){return(Math.pow(Math.E,e)+Math.pow(Math.E,-1*e))/2},div:function(e,t){return e/t},fact:function(e){if(e%1!==0)return"NaN";for(var t=1,n=2;n<=e;n++)t*=n;return t},inverse:function(e){return 1/e},log:function(e){return Math.log(e)/Math.log(10)},mod:function(e,t){return e%t},mul:function(e,t){return e*t},P:function(e,t){for(var n=1,r=Math.floor(e)-Math.floor(t)+1;r<=Math.floor(e);r++)n*=r;return n},Pi:function(e,t,n){for(var r=1,a=e;a<=t;a++)r*=Number(n.postfixEval({n:a}));return r},pow10x:function(e){for(var t=1;e--;)t*=10;return t},sigma:function(e,t,n){for(var r=0,a=e;a<=t;a++)r+=Number(n.postfixEval({n:a}));return r},sin:function(e){return xe.math.isDegree&&(e=xe.math.toRadian(e)),Math.sin(e)},sinh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-1*e))/2},sub:function(e,t){return e-t},tan:function(e){return xe.math.isDegree&&(e=xe.math.toRadian(e)),Math.tan(e)},tanh:function(e){return xe.sinha(e)/xe.cosha(e)},toRadian:function(e){return e*Math.PI/180},and:function(e,t){return e&t}},xe.Exception=function(e){this.message=e};var t0=xe,V=t0;function _e(e,t){for(var n=0;n<e.length;n++)e[n]+=t;return e}for(var ut=[{token:"sin",show:"sin",type:0,value:V.math.sin},{token:"cos",show:"cos",type:0,value:V.math.cos},{token:"tan",show:"tan",type:0,value:V.math.tan},{token:"pi",show:"&pi;",type:3,value:"PI"},{token:"(",show:"(",type:4,value:"("},{token:")",show:")",type:5,value:")"},{token:"P",show:"P",type:10,value:V.math.P},{token:"C",show:"C",type:10,value:V.math.C},{token:" ",show:" ",type:14,value:" ".anchor},{token:"asin",show:"asin",type:0,value:V.math.asin},{token:"acos",show:"acos",type:0,value:V.math.acos},{token:"atan",show:"atan",type:0,value:V.math.atan},{token:"7",show:"7",type:1,value:"7"},{token:"8",show:"8",type:1,value:"8"},{token:"9",show:"9",type:1,value:"9"},{token:"int",show:"Int",type:0,value:Math.floor},{token:"cosh",show:"cosh",type:0,value:V.math.cosh},{token:"acosh",show:"acosh",type:0,value:V.math.acosh},{token:"ln",show:" ln",type:0,value:Math.log},{token:"^",show:"^",type:10,value:Math.pow},{token:"root",show:"root",type:0,value:Math.sqrt},{token:"4",show:"4",type:1,value:"4"},{token:"5",show:"5",type:1,value:"5"},{token:"6",show:"6",type:1,value:"6"},{token:"/",show:"&divide;",type:2,value:V.math.div},{token:"!",show:"!",type:7,value:V.math.fact},{token:"tanh",show:"tanh",type:0,value:V.math.tanh},{token:"atanh",show:"atanh",type:0,value:V.math.atanh},{token:"Mod",show:" Mod ",type:2,value:V.math.mod},{token:"1",show:"1",type:1,value:"1"},{token:"2",show:"2",type:1,value:"2"},{token:"3",show:"3",type:1,value:"3"},{token:"*",show:"&times;",type:2,value:V.math.mul},{token:"sinh",show:"sinh",type:0,value:V.math.sinh},{token:"asinh",show:"asinh",type:0,value:V.math.asinh},{token:"e",show:"e",type:3,value:"E"},{token:"log",show:" log",type:0,value:V.math.log},{token:"0",show:"0",type:1,value:"0"},{token:".",show:".",type:6,value:"."},{token:"+",show:"+",type:9,value:V.math.add},{token:"-",show:"-",type:9,value:V.math.sub},{token:",",show:",",type:11,value:","},{token:"Sigma",show:"&Sigma;",type:12,value:V.math.sigma},{token:"n",show:"n",type:13,value:"n"},{token:"Pi",show:"&Pi;",type:12,value:V.math.Pi},{token:"pow",show:"pow",type:8,value:Math.pow,numberOfArguments:2},{token:"&",show:"&",type:9,value:V.math.and}],Fa={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0,14:-1,15:11},Nr=0;Nr<ut.length;Nr++)ut[Nr].precedence=Fa[ut[Nr].type];var Be={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0,14:!0,15:!0},Vt={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,15:!0},n0={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0,15:!0},je={},En={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0,15:!0},r0={1:!0},we=[[],["1","2","3","7","8","9","4","5","6","+","-","*","/","(",")","^","!","P","C","e","0",".",",","n"," ","&"],["pi","ln","Pi"],["sin","cos","tan","Del","int","Mod","log","pow"],["asin","acos","atan","cosh","root","tanh","sinh"],["acosh","atanh","asinh","Sigma"]];function i0(e,t,n,r){for(var a=0;a<r;a++)if(e[n+a]!==t[a])return!1;return!0}V.tokenTypes={FUNCTION_WITH_ONE_ARG:0,NUMBER:1,BINARY_OPERATOR_HIGH_PRECENDENCE:2,CONSTANT:3,OPENING_PARENTHESIS:4,CLOSING_PARENTHESIS:5,DECIMAL:6,POSTFIX_FUNCTION_WITH_ONE_ARG:7,FUNCTION_WITH_N_ARGS:8,BINARY_OPERATOR_LOW_PRECENDENCE:9,BINARY_OPERATOR_PERMUTATION:10,COMMA:11,EVALUATED_FUNCTION:12,EVALUATED_FUNCTION_PARAMETER:13,SPACE:14},V.addToken=function(e){for(var t=0;t<e.length;t++){var n=e[t].token.length,r=-1;e[t].type===V.tokenTypes.FUNCTION_WITH_N_ARGS&&e[t].numberOfArguments===void 0&&(e[t].numberOfArguments=2),we[n]=we[n]||[];for(var a=0;a<we[n].length;a++)if(e[t].token===we[n][a]){r=Vc(we[n][a],ut);break}r===-1?(ut.push(e[t]),e[t].precedence=Fa[e[t].type],we.length<=e[t].token.length&&(we[e[t].token.length]=[]),we[e[t].token.length].push(e[t].token)):(ut[r]=e[t],e[t].precedence=Fa[e[t].type])}};function Vc(e,t){for(var n=0;n<t.length;n++)if(t[n].token===e)return n;return-1}function a0(e){for(var t=[],n=e.length,r,a,i,s=0;s<n;s++)if(!(s<n-1&&e[s]===" "&&e[s+1]===" ")){for(r="",a=e.length-s>we.length-2?we.length-1:e.length-s;a>0;a--)if(we[a]!==void 0)for(i=0;i<we[a].length;i++)i0(e,we[a][i],s,a)&&(r=we[a][i],i=we[a].length,a=0);if(s+=r.length-1,r==="")throw new V.Exception("Can't understand after "+e.slice(s));t.push(ut[Vc(r,ut)])}return t}var o0={value:V.math.changeSign,type:0,pre:21,show:"-"},Lr={value:")",show:")",type:5,pre:0},Pn={value:"(",type:4,pre:0,show:"("};V.lex=function(e,t){var n=[Pn],r=[],a=e,i=Be,s=0,o=je,l="",u;typeof t<"u"&&V.addToken(t);var c={},f=a0(a);for(u=0;u<f.length;u++){var h=f[u];if(h.type===14){if(u>0&&u<f.length-1&&f[u+1].type===1&&(f[u-1].type===1||f[u-1].type===6))throw new V.Exception("Unexpected Space");continue}var p=h.token,d=h.type,v=h.value,x=h.precedence,g=h.show,b=n[n.length-1],_;for(_=r.length;_--&&r[_]===0;)if([0,2,3,4,5,9,11,12,13].indexOf(d)!==-1){if(i[d]!==!0)throw new V.Exception(p+" is not allowed after "+l);n.push(Lr),i=Vt,o=En,r.pop()}if(i[d]!==!0)throw new V.Exception(p+" is not allowed after "+l);if(o[d]===!0&&(d=2,v=V.math.mul,g="&times;",x=3,u=u-1),c={value:v,type:d,pre:x,show:g,numberOfArguments:h.numberOfArguments},d===0)i=Be,o=je,_e(r,2),n.push(c),f[u+1].type!==4&&(n.push(Pn),r.push(2));else if(d===1)b.type===1?(b.value+=v,_e(r,1)):n.push(c),i=Vt,o=n0;else if(d===2)i=Be,o=je,_e(r,2),n.push(c);else if(d===3)n.push(c),i=Vt,o=En;else if(d===4)_e(r,1),s++,i=Be,o=je,n.push(c);else if(d===5){if(!s)throw new V.Exception("Closing parenthesis are more than opening one, wait What!!!");s--,i=Vt,o=En,n.push(c),_e(r,1)}else if(d===6){if(b.hasDec)throw new V.Exception("Two decimals are not allowed in one number");b.type!==1&&(b={value:0,type:1,pre:0},n.push(b)),i=r0,_e(r,1),o=je,b.value+=v,b.hasDec=!0}else d===7&&(i=Vt,o=En,_e(r,1),n.push(c));d===8?(i=Be,o=je,_e(r,h.numberOfArguments+2),n.push(c),f[u+1].type!==4&&(n.push(Pn),r.push(h.numberOfArguments+2))):d===9?(b.type===9?b.value===V.math.add?(b.value=v,b.show=g,_e(r,1)):b.value===V.math.sub&&g==="-"&&(b.value=V.math.add,b.show="+",_e(r,1)):b.type!==5&&b.type!==7&&b.type!==1&&b.type!==3&&b.type!==13?p==="-"&&(i=Be,o=je,_e(r,2).push(2),n.push(o0),n.push(Pn)):(n.push(c),_e(r,2)),i=Be,o=je):d===10?(i=Be,o=je,_e(r,2),n.push(c)):d===11?(i=Be,o=je,n.push(c)):d===12?(i=Be,o=je,_e(r,6),n.push(c),f[u+1].type!==4&&(n.push(Pn),r.push(6))):d===13&&(i=Vt,o=En,n.push(c)),_e(r,-1),l=p}for(_=r.length;_--;)n.push(Lr);if(i[5]!==!0)throw new V.Exception("complete the expression");for(;s--;)n.push(Lr);return n.push(Lr),new V(n)};var s0=V,Ia=s0;Ia.prototype.toPostfix=function(){for(var e=[],t,n,r,a,i,s=[{value:"(",type:4,pre:0}],o=this.value,l=1;l<o.length;l++)if(o[l].type===1||o[l].type===3||o[l].type===13)o[l].type===1&&(o[l].value=Number(o[l].value)),e.push(o[l]);else if(o[l].type===4)s.push(o[l]);else if(o[l].type===5)for(;(n=s.pop()).type!==4;)e.push(n);else if(o[l].type===11){for(;(n=s.pop()).type!==4;)e.push(n);s.push(n)}else{t=o[l],a=t.pre,i=s[s.length-1],r=i.pre;var u=i.value=="Math.pow"&&t.value=="Math.pow";if(a>r)s.push(t);else{for(;r>=a&&!u||u&&a<r;)n=s.pop(),i=s[s.length-1],e.push(n),r=i.pre,u=t.value=="Math.pow"&&i.value=="Math.pow";s.push(t)}}return new Ia(e)};var l0=Ia,Nn=l0;Nn.prototype.postfixEval=function(e){e=e||{},e.PI=Math.PI,e.E=Math.E;for(var t=[],n,r,a,i=this.value,s=typeof e.n<"u",o=0;o<i.length;o++)if(i[o].type===1)t.push({value:i[o].value,type:1});else if(i[o].type===3)t.push({value:e[i[o].value],type:1});else if(i[o].type===0)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(i[o]):t[t.length-1].value=i[o].value(t[t.length-1].value);else if(i[o].type===7)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(i[o]):t[t.length-1].value=i[o].value(t[t.length-1].value);else if(i[o].type===8){for(var l=[],u=0;u<i[o].numberOfArguments;u++)l.push(t.pop().value);t.push({type:1,value:i[o].value.apply(i[o],l.reverse())})}else i[o].type===10?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r.value=r.concat(n),r.value.push(i[o]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(i[o]),t.push(n)):t.push({type:1,value:i[o].value(r.value,n.value)})):i[o].type===2||i[o].type===9?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(i[o]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(i[o]),t.push(n)):t.push({type:1,value:i[o].value(r.value,n.value)})):i[o].type===12?(n=t.pop(),typeof n.type<"u"&&(n=[n]),r=t.pop(),a=t.pop(),t.push({type:1,value:i[o].value(a.value,r.value,new Nn(n))})):i[o].type===13&&(s?t.push({value:e[i[o].value],type:3}):t.push([i[o]]));if(t.length>1)throw new Nn.Exception("Uncaught Syntax error");return t[0].value>1e15?"Infinity":parseFloat(t[0].value.toFixed(15))},Nn.eval=function(e,t,n){return typeof t>"u"?this.lex(e).toPostfix().postfixEval():typeof n>"u"?typeof t.length<"u"?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t):this.lex(e,t).toPostfix().postfixEval(n)};var u0=Nn,Gc=u0;Gc.prototype.formulaEval=function(){for(var e,t,n,r=[],a=this.value,i=0;i<a.length;i++)a[i].type===1||a[i].type===3?r.push({value:a[i].type===3?a[i].show:a[i].value,type:1}):a[i].type===13?r.push({value:a[i].show,type:1}):a[i].type===0?r[r.length-1]={value:a[i].show+(a[i].show!="-"?"(":"")+r[r.length-1].value+(a[i].show!="-"?")":""),type:0}:a[i].type===7?r[r.length-1]={value:(r[r.length-1].type!=1?"(":"")+r[r.length-1].value+(r[r.length-1].type!=1?")":"")+a[i].show,type:7}:a[i].type===10?(e=r.pop(),t=r.pop(),a[i].show==="P"||a[i].show==="C"?r.push({value:"<sup>"+t.value+"</sup>"+a[i].show+"<sub>"+e.value+"</sub>",type:10}):r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+"<sup>"+e.value+"</sup>",type:1})):a[i].type===2||a[i].type===9?(e=r.pop(),t=r.pop(),r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+a[i].show+(e.type!=1?"(":"")+e.value+(e.type!=1?")":""),type:a[i].type})):a[i].type===12&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:a[i].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value};var c0=Gc,f0=Kg,h0=Qg,d0=c0,p0=100,v0=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,Ra,m0=g0;function g0(e,t){Ra=0,t=Math.pow(10,t===void 0?5:t),e=e.replace(/\n+/g," ");function n(a,i,s){if(Ra++>p0)throw Ra=0,new Error("Call stack overflow for "+s);if(a==="")throw new Error(i+"(): '"+s+"' must contain a non-whitespace string");a=r(a,s);var o=y0(a);if(o.length>1||a.indexOf("var(")>-1)return i+"("+a+")";var l=o[0]||"";l==="%"&&(a=a.replace(/\b[0-9\.]+%/g,function(f){return parseFloat(f.slice(0,-1))*.01}));var u=a.replace(new RegExp(l,"gi"),""),c;try{c=d0.eval(u)}catch{return i+"("+a+")"}return l==="%"&&(c*=100),(i.length||l==="%")&&(c=Math.round(c*t)/t),c+=l,c}function r(a,i){a=a.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var s="",o=a,l;l=v0.exec(o);){l[0].index>0&&(s+=o.substring(0,l[0].index));var u=f0("(",")",o.substring([0].index));if(u.body==="")throw new Error("'"+a+"' must contain a non-whitespace string");var c=n(u.body,"",i);s+=u.pre+c,o=u.post}return s+o}return h0(e,/((?:\-[a-z]+\-)?calc)\(/,n)}function y0(e){for(var t=[],n=[],r=/[\.0-9]([%a-z]+)/gi,a=r.exec(e);a;)!a||!a[1]||(n.indexOf(a[1].toLowerCase())===-1&&(t.push(a[1]),n.push(a[1].toLowerCase())),a=r.exec(e));return t}const Wa=Dt(m0);var b0=typeof Qn=="object"&&Qn&&Qn.Object===Object&&Qn,x0=b0,_0=x0,w0=typeof self=="object"&&self&&self.Object===Object&&self,S0=_0||w0||Function("return this")(),Ar=S0,T0=Ar,O0=T0.Symbol,Kc=O0,Xc=Kc,Zc=Object.prototype,k0=Zc.hasOwnProperty,M0=Zc.toString,Ln=Xc?Xc.toStringTag:void 0;function $0(e){var t=k0.call(e,Ln),n=e[Ln];try{e[Ln]=void 0;var r=!0}catch{}var a=M0.call(e);return r&&(t?e[Ln]=n:delete e[Ln]),a}var C0=$0,E0=Object.prototype,P0=E0.toString;function N0(e){return P0.call(e)}var L0=N0,Qc=Kc,A0=C0,D0=L0,z0="[object Null]",j0="[object Undefined]",Jc=Qc?Qc.toStringTag:void 0;function F0(e){return e==null?e===void 0?j0:z0:Jc&&Jc in Object(e)?A0(e):D0(e)}var ef=F0;function I0(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Dr=I0,R0=ef,W0=Dr,B0="[object AsyncFunction]",H0="[object Function]",U0="[object GeneratorFunction]",q0="[object Proxy]";function Y0(e){if(!W0(e))return!1;var t=R0(e);return t==H0||t==U0||t==B0||t==q0}var V0=Y0,G0=Ar,K0=G0["__core-js_shared__"],X0=K0,Ba=X0,tf=function(){var e=/[^.]+$/.exec(Ba&&Ba.keys&&Ba.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Z0(e){return!!tf&&tf in e}var Q0=Z0,J0=Function.prototype,ey=J0.toString;function ty(e){if(e!=null){try{return ey.call(e)}catch{}try{return e+""}catch{}}return""}var ny=ty,ry=V0,iy=Q0,ay=Dr,oy=ny,sy=/[\\^$.*+?()[\]{}|]/g,ly=/^\[object .+?Constructor\]$/,uy=Function.prototype,cy=Object.prototype,fy=uy.toString,hy=cy.hasOwnProperty,dy=RegExp("^"+fy.call(hy).replace(sy,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function py(e){if(!ay(e)||iy(e))return!1;var t=ry(e)?dy:ly;return t.test(oy(e))}var vy=py;function my(e,t){return e==null?void 0:e[t]}var gy=my,yy=vy,by=gy;function xy(e,t){var n=by(e,t);return yy(n)?n:void 0}var nf=xy,_y=nf,wy=_y(Object,"create"),zr=wy,rf=zr;function Sy(){this.__data__=rf?rf(null):{},this.size=0}var Ty=Sy;function Oy(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ky=Oy,My=zr,$y="__lodash_hash_undefined__",Cy=Object.prototype,Ey=Cy.hasOwnProperty;function Py(e){var t=this.__data__;if(My){var n=t[e];return n===$y?void 0:n}return Ey.call(t,e)?t[e]:void 0}var Ny=Py,Ly=zr,Ay=Object.prototype,Dy=Ay.hasOwnProperty;function zy(e){var t=this.__data__;return Ly?t[e]!==void 0:Dy.call(t,e)}var jy=zy,Fy=zr,Iy="__lodash_hash_undefined__";function Ry(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Fy&&t===void 0?Iy:t,this}var Wy=Ry,By=Ty,Hy=ky,Uy=Ny,qy=jy,Yy=Wy;function Gt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Gt.prototype.clear=By,Gt.prototype.delete=Hy,Gt.prototype.get=Uy,Gt.prototype.has=qy,Gt.prototype.set=Yy;var Vy=Gt;function Gy(){this.__data__=[],this.size=0}var Ky=Gy;function Xy(e,t){return e===t||e!==e&&t!==t}var Zy=Xy,Qy=Zy;function Jy(e,t){for(var n=e.length;n--;)if(Qy(e[n][0],t))return n;return-1}var jr=Jy,eb=jr,tb=Array.prototype,nb=tb.splice;function rb(e){var t=this.__data__,n=eb(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():nb.call(t,n,1),--this.size,!0}var ib=rb,ab=jr;function ob(e){var t=this.__data__,n=ab(t,e);return n<0?void 0:t[n][1]}var sb=ob,lb=jr;function ub(e){return lb(this.__data__,e)>-1}var cb=ub,fb=jr;function hb(e,t){var n=this.__data__,r=fb(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var db=hb,pb=Ky,vb=ib,mb=sb,gb=cb,yb=db;function Kt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Kt.prototype.clear=pb,Kt.prototype.delete=vb,Kt.prototype.get=mb,Kt.prototype.has=gb,Kt.prototype.set=yb;var bb=Kt,xb=nf,_b=Ar,wb=xb(_b,"Map"),Sb=wb,af=Vy,Tb=bb,Ob=Sb;function kb(){this.size=0,this.__data__={hash:new af,map:new(Ob||Tb),string:new af}}var Mb=kb;function $b(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Cb=$b,Eb=Cb;function Pb(e,t){var n=e.__data__;return Eb(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Fr=Pb,Nb=Fr;function Lb(e){var t=Nb(this,e).delete(e);return this.size-=t?1:0,t}var Ab=Lb,Db=Fr;function zb(e){return Db(this,e).get(e)}var jb=zb,Fb=Fr;function Ib(e){return Fb(this,e).has(e)}var Rb=Ib,Wb=Fr;function Bb(e,t){var n=Wb(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Hb=Bb,Ub=Mb,qb=Ab,Yb=jb,Vb=Rb,Gb=Hb;function Xt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Xt.prototype.clear=Ub,Xt.prototype.delete=qb,Xt.prototype.get=Yb,Xt.prototype.has=Vb,Xt.prototype.set=Gb;var Kb=Xt,of=Kb,Xb="Expected a function";function Ha(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Xb);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var s=e.apply(this,r);return n.cache=i.set(a,s)||i,s};return n.cache=new(Ha.Cache||of),n}Ha.Cache=of;var Zb=Ha;const Qb=Dt(Zb);var sf="__react_svg_text_measurement_id";function Jb(e,t){try{var n=document.getElementById(sf);if(!n){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("aria-hidden","true"),r.style.width="0",r.style.height="0",r.style.position="absolute",r.style.top="-100%",r.style.left="-100%",n=document.createElementNS("http://www.w3.org/2000/svg","text"),n.setAttribute("id",sf),r.appendChild(n),document.body.appendChild(r)}return Object.assign(n.style,t),n.textContent=e,n.getComputedTextLength()}catch{return null}}const lf=Qb(Jb,function(e,t){return e+"_"+JSON.stringify(t)});var e1=["verticalAnchor","scaleToFit","angle","width","lineHeight","capHeight","children","style"];function t1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Ua(e){return typeof e=="number"}function uf(e){return typeof e=="number"&&Number.isFinite(e)||typeof e=="string"}function n1(e){var t=e.verticalAnchor,n=t===void 0?"end":t,r=e.scaleToFit,a=r===void 0?!1:r,i=e.angle,s=e.width,o=e.lineHeight,l=o===void 0?"1em":o,u=e.capHeight,c=u===void 0?"0.71em":u,f=e.children,h=e.style,p=t1(e,e1),d=p.x,v=d===void 0?0:d,x=p.y,g=x===void 0?0:x,b=!uf(v)||!uf(g),_=m.useMemo(function(){var k=f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:k.map(function(C){return{word:C,wordWidth:lf(C,h)||0}}),spaceWidth:lf(" ",h)||0}},[f,h]),M=_.wordsWithWidth,y=_.spaceWidth,S=m.useMemo(function(){return b?[]:s||a?M.reduce(function(k,C){var P=C.word,N=C.wordWidth,A=k[k.length-1];if(A&&(s==null||a||(A.width||0)+N+y<s))A.words.push(P),A.width=A.width||0,A.width+=N+y;else{var R={words:[P],width:N};k.push(R)}return k},[]):[{words:f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/)}]},[b,s,a,f,M,y]),T=m.useMemo(function(){var k=b?"":Wa(n==="start"?"calc("+c+")":n==="middle"?"calc("+(S.length-1)/2+" * -"+l+" + ("+c+" / 2))":"calc("+(S.length-1)+" * -"+l+")");return k},[b,n,c,S.length,l]),$=m.useMemo(function(){var k=[];if(b)return"";if(Ua(v)&&Ua(g)&&Ua(s)&&a&&S.length>0){var C=S[0].width||1,P=a==="shrink-only"?Math.min(s/C,1):s/C,N=P,A=v-P*v,R=g-N*g;k.push("matrix("+P+", 0, 0, "+N+", "+A+", "+R+")")}return i&&k.push("rotate("+i+", "+v+", "+g+")"),k.length>0?k.join(" "):""},[b,v,g,s,a,S,i]);return{wordsByLines:S,startDy:T,transform:$}}var r1=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function qa(){return qa=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},qa.apply(this,arguments)}function i1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var a1={overflow:"visible"};function cf(e){var t=e.dx,n=t===void 0?0:t,r=e.dy,a=r===void 0?0:r,i=e.textAnchor,s=i===void 0?"start":i,o=e.innerRef,l=e.innerTextRef;e.verticalAnchor,e.angle;var u=e.lineHeight,c=u===void 0?"1em":u;e.scaleToFit,e.capHeight,e.width;var f=i1(e,r1),h=f.x,p=h===void 0?0:h,d=f.fontSize,v=n1(e),x=v.wordsByLines,g=v.startDy,b=v.transform;return m.createElement("svg",{ref:o,x:n,y:a,fontSize:d,style:a1},x.length>0?m.createElement("text",qa({ref:l,transform:b},f,{textAnchor:s}),x.map(function(_,M){return m.createElement("tspan",{key:M,x:p,dy:M===0?g:c},_.words.join(" "))})):null)}var ke={top:"top",left:"left",right:"right",bottom:"bottom"};function o1(e){var t=e.labelOffset,n=e.labelProps,r=e.orientation,a=e.range,i=e.tickLabelFontSize,s=e.tickLength,o=r===ke.left||r===ke.top?-1:1,l,u,c;if(r===ke.top||r===ke.bottom){var f=r===ke.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(a[0])+Number(a[a.length-1]))/2,u=o*(s+t+i+f)}else l=o*((Number(a[0])+Number(a[a.length-1]))/2),u=-(s+t),c="rotate("+o*90+")";return{x:l,y:u,transform:c}}function An(){return An=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},An.apply(this,arguments)}function s1(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,a=e.tickClassName,i=e.tickComponent,s=e.tickLabelProps,o=e.tickStroke,l=o===void 0?"#222":o,u=e.tickTransform,c=e.ticks,f=e.strokeWidth,h=e.tickLineProps;return c.map(function(p){var d,v=p.value,x=p.index,g=p.from,b=p.to,_=p.formattedValue,M=(d=s[x])!=null?d:{},y=Math.max(10,typeof M.fontSize=="number"&&M.fontSize||0),S=b.y+(n&&r!==ke.top?y:0);return m.createElement(Ge,{key:"visx-tick-"+v+"-"+x,className:ve("visx-axis-tick",a),transform:u},!t&&m.createElement(ll,An({from:g,to:b,stroke:l,strokeWidth:f,strokeLinecap:"square"},h)),i?i(An({},M,{x:b.x,y:S,formattedValue:_})):m.createElement(cf,An({x:b.x,y:S},M),_))})}function Dn(){return Dn=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},Dn.apply(this,arguments)}var ff={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function l1(e){var t=e.axisFromPoint,n=e.axisLineClassName,r=e.axisToPoint,a=e.hideAxisLine,i=e.hideTicks,s=e.horizontal,o=e.label,l=o===void 0?"":o,u=e.labelClassName,c=e.labelOffset,f=c===void 0?14:c,h=e.labelProps,p=e.orientation,d=p===void 0?ke.bottom:p,v=e.scale,x=e.stroke,g=x===void 0?"#222":x,b=e.strokeDasharray,_=e.strokeWidth,M=_===void 0?1:_,y=e.tickClassName,S=e.tickComponent,T=e.tickLineProps,$=e.tickLabelProps,k=e.tickLength,C=k===void 0?8:k,P=e.tickStroke,N=P===void 0?"#222":P,A=e.tickTransform,R=e.ticks,X=e.ticksComponent,U=X===void 0?s1:X,Z=Dn({},ff,h),ee=Dn({},ff,typeof $=="object"?$:null),K=R.map(function(D){var B=D.value,W=D.index;return typeof $=="function"?$(B,W,R):ee}),E=Math.max.apply(Math,[10].concat(K.map(function(D){return typeof D.fontSize=="number"?D.fontSize:0})));return m.createElement(m.Fragment,null,U({hideTicks:i,horizontal:s,orientation:d,scale:v,tickClassName:y,tickComponent:S,tickLabelProps:K,tickStroke:N,tickTransform:A,ticks:R,strokeWidth:M,tickLineProps:T}),!a&&m.createElement(ll,{className:ve("visx-axis-line",n),from:t,to:r,stroke:g,strokeWidth:M,strokeDasharray:b}),l&&m.createElement(cf,Dn({className:ve("visx-axis-label",u)},o1({labelOffset:f,labelProps:Z,orientation:d,range:v.range(),tickLabelFontSize:E,tickLength:C}),Z),l))}function u1(e,t){t===void 0&&(t="center");var n=e;if(t!=="start"&&"bandwidth"in n){var r=n.bandwidth();return t==="center"&&(r/=2),n.round()&&(r=Math.round(r)),function(a){var i=n(a);return typeof i=="number"?i+r:i}}return e}function c1(e){var t=e;return"tickFormat"in t?t.tickFormat():Ic}var He=function(){function e(n){var r=n.x,a=r===void 0?0:r,i=n.y,s=i===void 0?0:i;this.x=0,this.y=0,this.x=a,this.y=s}var t=e.prototype;return t.value=function(){return{x:this.x,y:this.y}},t.toArray=function(){return[this.x,this.y]},e}();function f1(e,t){return new He({x:e.x+t.x,y:e.y+t.y})}function h1(e,t){return new He({x:e.x-t.x,y:e.y-t.y})}const d1=Object.freeze(Object.defineProperty({__proto__:null,Point:He,subtractPoints:h1,sumPoints:f1},Symbol.toStringTag,{value:"Module"}));function Ir(e,t){var n=e.x,r=e.y;return new He(t?{x:n,y:r}:{x:r,y:n})}function Ya(){return Ya=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},Ya.apply(this,arguments)}var Va=0;function p1(e){return e===void 0&&(e=Va),typeof e=="number"?{start:e,end:e}:Ya({start:Va,end:Va},e)}var v1=["children","axisClassName","hideAxisLine","hideTicks","hideZero","innerRef","left","numTicks","orientation","rangePadding","scale","tickFormat","tickLength","tickValues","top"];function Ga(){return Ga=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},Ga.apply(this,arguments)}function m1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Ka(e){var t=e.children,n=t===void 0?l1:t,r=e.axisClassName,a=e.hideAxisLine,i=a===void 0?!1:a,s=e.hideTicks,o=s===void 0?!1:s,l=e.hideZero,u=l===void 0?!1:l,c=e.innerRef,f=e.left,h=f===void 0?0:f,p=e.numTicks,d=p===void 0?10:p,v=e.orientation,x=v===void 0?ke.bottom:v,g=e.rangePadding,b=g===void 0?0:g,_=e.scale,M=e.tickFormat,y=e.tickLength,S=y===void 0?8:y,T=e.tickValues,$=e.top,k=$===void 0?0:$,C=m1(e,v1),P=M??c1(_),N=x===ke.left,A=x===ke.top,R=A||x===ke.bottom,X=u1(_),U=N||A?-1:1,Z=_.range(),ee=p1(b),K=Ir({x:Number(Z[0])+.5-ee.start,y:0},R),E=Ir({x:Number(Z[Z.length-1])+.5+ee.end,y:0},R),D=(T??Pr(_,d)).filter(function(W){return!u||W!==0&&W!=="0"}).map(function(W,F){return{value:W,index:F}}),B=D.map(function(W){var F=W.value,I=W.index,q=Er(X(F));return{value:F,index:I,from:Ir({x:q,y:0},R),to:Ir({x:q,y:S*U},R),formattedValue:P(F,I,D)}});return m.createElement(Ge,{className:ve("visx-axis",r),innerRef:c,top:k,left:h},n(Ga({},C,{axisFromPoint:K,axisToPoint:E,hideAxisLine:i,hideTicks:o,hideZero:u,horizontal:R,numTicks:d,orientation:x,rangePadding:b,scale:_,tickFormat:P,tickLength:S,tickPosition:X,tickSign:U,ticks:B})))}var g1=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Rr(){return Rr=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},Rr.apply(this,arguments)}function y1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var b1={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function hf(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?36:n,a=e.tickLength,i=a===void 0?8:a,s=e.tickLabelProps,o=y1(e,g1),l=typeof s=="function"?s:Rr({},b1,s);return m.createElement(Ka,Rr({axisClassName:ve("visx-axis-left",t),labelOffset:r,orientation:ke.left,tickLabelProps:l,tickLength:i},o))}var x1=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Wr(){return Wr=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},Wr.apply(this,arguments)}function _1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var w1={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function Xa(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?8:n,a=e.tickLength,i=a===void 0?8:a,s=e.tickLabelProps,o=_1(e,x1),l=typeof s=="function"?s:Wr({},w1,s);return m.createElement(Ka,Wr({axisClassName:ve("visx-axis-bottom",t),labelOffset:r,orientation:ke.bottom,tickLabelProps:l,tickLength:i},o))}var Br={};Br.__esModule=!0;var df=Br.default=M1,S1=pf(m),T1=pf(nn),O1=["from","to","fill","className","innerRef"];function pf(e){return e&&e.__esModule?e:{default:e}}function Za(){return Za=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},Za.apply(this,arguments)}function k1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function M1(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,a=r===void 0?{x:1,y:1}:r,i=e.fill,s=i===void 0?"transparent":i,o=e.className,l=e.innerRef,u=k1(e,O1),c=n.x===a.x||n.y===a.y;return S1.default.createElement("line",Za({ref:l,className:(0,T1.default)("visx-line",o),x1:n.x,y1:n.y,x2:a.x,y2:a.y,fill:s,shapeRendering:c?"crispEdges":"auto"},u))}function vf(e){return"bandwidth"in e?e.bandwidth():0}var $1=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function Qa(){return Qa=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},Qa.apply(this,arguments)}function C1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function mf(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.width,o=e.stroke,l=o===void 0?"#eaf0f6":o,u=e.strokeWidth,c=u===void 0?1:u,f=e.strokeDasharray,h=e.className,p=e.children,d=e.numTicks,v=d===void 0?10:d,x=e.lineStyle,g=e.offset,b=e.tickValues,_=C1(e,$1),M=b??Pr(i,v),y=(g??0)+vf(i)/2,S=M.map(function(T,$){var k,C=((k=Er(i(T)))!=null?k:0)+y;return{index:$,from:new He({x:0,y:C}),to:new He({x:s,y:C})}});return m.createElement(Ge,{className:ve("visx-rows",h),top:n,left:a},p?p({lines:S}):S.map(function(T){var $=T.from,k=T.to,C=T.index;return m.createElement(df,Qa({key:"row-line-"+C,from:$,to:k,stroke:l,strokeWidth:c,strokeDasharray:f,style:x},_))}))}mf.propTypes={tickValues:w.array,width:w.number.isRequired};var E1=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function Ja(){return Ja=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},Ja.apply(this,arguments)}function P1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function gf(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.height,o=e.stroke,l=o===void 0?"#eaf0f6":o,u=e.strokeWidth,c=u===void 0?1:u,f=e.strokeDasharray,h=e.className,p=e.numTicks,d=p===void 0?10:p,v=e.lineStyle,x=e.offset,g=e.tickValues,b=e.children,_=P1(e,E1),M=g??Pr(i,d),y=(x??0)+vf(i)/2,S=M.map(function(T,$){var k,C=((k=Er(i(T)))!=null?k:0)+y;return{index:$,from:new He({x:C,y:0}),to:new He({x:C,y:s})}});return m.createElement(Ge,{className:ve("visx-columns",h),top:n,left:a},b?b({lines:S}):S.map(function(T){var $=T.from,k=T.to,C=T.index;return m.createElement(df,Ja({key:"column-line-"+C,from:$,to:k,stroke:l,strokeWidth:c,strokeDasharray:f,style:v},_))}))}gf.propTypes={tickValues:w.array,height:w.number.isRequired};var ct={};const eo=pt(tp);var to={};to.__esModule=!0,to.default=N1;function N1(e,t){e(t)}var Pt={};Pt.__esModule=!0,Pt.STACK_ORDER_NAMES=Pt.STACK_ORDERS=void 0,Pt.default=A1;var zn=eo,Hr={ascending:zn.stackOrderAscending,descending:zn.stackOrderDescending,insideout:zn.stackOrderInsideOut,none:zn.stackOrderNone,reverse:zn.stackOrderReverse};Pt.STACK_ORDERS=Hr;var L1=Object.keys(Hr);Pt.STACK_ORDER_NAMES=L1;function A1(e){return e&&Hr[e]||Hr.none}var Nt={};Nt.__esModule=!0,Nt.STACK_OFFSET_NAMES=Nt.STACK_OFFSETS=void 0,Nt.default=z1;var jn=eo,Ur={expand:jn.stackOffsetExpand,diverging:jn.stackOffsetDiverging,none:jn.stackOffsetNone,silhouette:jn.stackOffsetSilhouette,wiggle:jn.stackOffsetWiggle};Nt.STACK_OFFSETS=Ur;var D1=Object.keys(Ur);Nt.STACK_OFFSET_NAMES=D1;function z1(e){return e&&Ur[e]||Ur.none}ct.__esModule=!0,ct.arc=I1,ct.area=R1,ct.line=W1,ct.pie=B1,ct.radialLine=H1,ct.stack=U1;var Zt=eo,oe=no(to),j1=no(Pt),F1=no(Nt);function no(e){return e&&e.__esModule?e:{default:e}}function I1(e){var t=e===void 0?{}:e,n=t.innerRadius,r=t.outerRadius,a=t.cornerRadius,i=t.startAngle,s=t.endAngle,o=t.padAngle,l=t.padRadius,u=(0,Zt.arc)();return n!=null&&(0,oe.default)(u.innerRadius,n),r!=null&&(0,oe.default)(u.outerRadius,r),a!=null&&(0,oe.default)(u.cornerRadius,a),i!=null&&(0,oe.default)(u.startAngle,i),s!=null&&(0,oe.default)(u.endAngle,s),o!=null&&(0,oe.default)(u.padAngle,o),l!=null&&(0,oe.default)(u.padRadius,l),u}function R1(e){var t=e===void 0?{}:e,n=t.x,r=t.x0,a=t.x1,i=t.y,s=t.y0,o=t.y1,l=t.defined,u=t.curve,c=(0,Zt.area)();return n&&(0,oe.default)(c.x,n),r&&(0,oe.default)(c.x0,r),a&&(0,oe.default)(c.x1,a),i&&(0,oe.default)(c.y,i),s&&(0,oe.default)(c.y0,s),o&&(0,oe.default)(c.y1,o),l&&c.defined(l),u&&c.curve(u),c}function W1(e){var t=e===void 0?{}:e,n=t.x,r=t.y,a=t.defined,i=t.curve,s=(0,Zt.line)();return n&&(0,oe.default)(s.x,n),r&&(0,oe.default)(s.y,r),a&&s.defined(a),i&&s.curve(i),s}function B1(e){var t=e===void 0?{}:e,n=t.startAngle,r=t.endAngle,a=t.padAngle,i=t.value,s=t.sort,o=t.sortValues,l=(0,Zt.pie)();return(s===null||s!=null)&&l.sort(s),(o===null||o!=null)&&l.sortValues(o),i!=null&&l.value(i),a!=null&&(0,oe.default)(l.padAngle,a),n!=null&&(0,oe.default)(l.startAngle,n),r!=null&&(0,oe.default)(l.endAngle,r),l}function H1(e){var t=e===void 0?{}:e,n=t.angle,r=t.radius,a=t.defined,i=t.curve,s=(0,Zt.radialLine)();return n&&(0,oe.default)(s.angle,n),r&&(0,oe.default)(s.radius,r),a&&s.defined(a),i&&s.curve(i),s}function U1(e){var t=e.keys,n=e.value,r=e.order,a=e.offset,i=(0,Zt.stack)();return t&&i.keys(t),n&&(0,oe.default)(i.value,n),r&&i.order((0,j1.default)(r)),a&&i.offset((0,F1.default)(a)),i}let Fn=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const q1={barFillColor1:"string",barFillColor2:"string",barFillColorHover:"string",chartData:"ChartDataObject[]",chartHeight:"number",chartWidth:"number",barSize:"number",yAxis:"ChartAxis",xAxis:"ChartAxis",yMaxValue:"number",yTickFormat:"(i: number) => string"};function ro(e){const{barFillColor1:t=pe.colors.blue200,barFillColor2:n="#007DB880",barFillColorHover:r=pe.colors.blue300,chartData:a=[],chartHeight:i=0,chartWidth:s=0,barSize:o,yAxis:l={tickValues:"value",tickCount:3},xAxis:u={tickValues:"label"},yMaxValue:c,yTickFormat:f}=e,h={top:30,bottom:70,left:50,right:30},p=s-h.left-h.right,d=i-h.top-h.bottom,v=T=>T[u.tickValues],x=T=>T[l.tickValues],g=Mn({range:[0,p],round:!0,domain:a.map(v),padding:.4}),b=Yt({range:[d,0],round:!0,domain:[0,c||Math.max(...a.map(x))]}),_=(T,$)=>k=>T($(k)),M=_(g,v),y=_(b,x),S=Fn();return z.createElement("svg",{width:s,height:i,className:"sps-chart-wrapper"},z.createElement(mf,{scale:b,left:h.left,width:p,numTicks:l.tickCount,stroke:pe.colors.gray400,strokeOpacity:.2}),z.createElement(Cn,{id:S,from:t,to:n}),a.map((T,$)=>{const k=d-y(T),C=Fn();return z.createElement(rn,{key:$},z.createElement(ul,{id:C,top:!0,radius:4,x:M(T)+h.left+(o?(g.bandwidth()-o)/2:0),y:d-k,height:k,width:o||g.bandwidth(),fill:`url(#${S})`,onMouseEnter:P=>{const N=P.target;N.style.fill=r},onMouseLeave:P=>{const N=P.target;N.style.fill=""}}),z.createElement(hf,{scale:b,left:h.left,hideTicks:!0,numTicks:l.tickCount,tickFormat:f||void 0,stroke:pe.colors.gray300,tickLabelProps:()=>({textAnchor:"end",fontSize:"12px",fill:pe.colors.gray400,fontWeight:"200"})}),z.createElement(Xa,{top:d,scale:g,left:h.left,hideTicks:!0,hideAxisLine:!0,stroke:pe.colors.gray300,tickLabelProps:()=>({textAnchor:"middle",fontSize:"12px",fontWeight:"200",fill:pe.colors.gray400,width:g.bandwidth()+g.bandwidth()/2,lineHeight:"15px",verticalAnchor:"start"})}),z.createElement(tn.SpsTooltip,{for:C},T.label))}))}Object.assign(ro,{props:q1,displayName:"SpsBarChart"});const yf={general:{label:"General Usage",description:({NavigateTo:e,Link:t})=>z.createElement(z.Fragment,null,z.createElement("p",null,"Use Bar Charts to visualize the comparison of a dataset across multiple categories or subjects. When using bar charts, the dataset should attempt to provide a clear answer to a clear question (i.e. avoid comparing multiple or unrelated datasets in a single chart)."),z.createElement("p",null,"Bar Charts should not be used when the visualization of the data is too complex or the number of categories too numerous to be easily understood at a glance. In these cases consider the use of more general lists of content such as a"," ",z.createElement(e,{to:"Tables"},"Table"),"."),z.createElement("h5",null,"Color"),z.createElement("p",null,"The number of colors used should be directly related to the number of comparisons being made. When comparing categories across a single data set, only one color should be used. When comparing multiple categories across multiple series of data, use the appropriate number of colors to the number of categories. For more details on color usage visit the"," ",z.createElement(t,{to:"/style-and-layout/colors"},"Colors")," section."),z.createElement("h5",null,"Interaction"),z.createElement("p",null,"Charts should include interactivity on hover to give users insight to specifics of the data. Tooltips can be used to display expanded definitions or additional related data points for the selected category."))},horizontal:{label:"Horizontal Bar Charts",description:tt.code`
33
+ `).join("");return b}function uu(e){var t=e.children,n=e.className,r=e.innerRef,a=e.x,i=e.y,s=e.width,o=e.height,u=e.radius,l=e.all,c=l===void 0?!1:l,f=e.top,h=f===void 0?!1:f,p=e.bottom,d=p===void 0?!1:p,m=e.left,b=m===void 0?!1:m,g=e.right,x=g===void 0?!1:g,_=e.topLeft,M=_===void 0?!1:_,y=e.topRight,S=y===void 0?!1:y,T=e.bottomLeft,E=T===void 0?!1:T,k=e.bottomRight,$=k===void 0?!1:k,P=hp(e,fp),N=dp({x:a,y:i,width:s,height:o,radius:u,all:c,top:h,bottom:d,left:b,right:x,topLeft:M,topRight:S,bottomLeft:E,bottomRight:$});return t?v.createElement(v.Fragment,null,t({path:N})):v.createElement("path",Hi({ref:r,className:me("visx-bar-rounded",n),d:N},P))}function pp(e){if("bandwidth"in e)return e.bandwidth();var t=e.range(),n=e.domain();return Math.abs(t[t.length-1]-t[0])/n.length}function mp(e){return e==null?void 0:e[0]}function gp(e){return e==null?void 0:e[1]}var vp=["data","className","top","left","y","x0","x1","xScale","yScale","color","keys","value","order","offset","children"];function Bi(){return Bi=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},Bi.apply(this,arguments)}function yp(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function bp(e){var t=e.data,n=e.className,r=e.top,a=e.left,i=e.y,s=e.x0,o=s===void 0?mp:s,u=e.x1,l=u===void 0?gp:u,c=e.xScale,f=e.yScale,h=e.color,p=e.keys,d=e.value,m=e.order,b=e.offset,g=e.children,x=yp(e,vp),_=Ks();p&&_.keys(p),d&&ep(_.value,d),m&&_.order(tp(m)),b&&_.offset(np(b));var M=_(t),y=pp(f),S=M.map(function(T,E){var k=T.key;return{index:E,key:k,bars:T.map(function($,P){var N=(c(l($))||0)-(c(o($))||0),A=c(o($)),R="bandwidth"in f?f(i($.data)):Math.max((f(i($.data))||0)-N/2);return{bar:$,key:k,index:P,height:y,width:N,x:A||0,y:R||0,color:h(T.key,P)}})}});return g?v.createElement(v.Fragment,null,g(S)):v.createElement(Ge,{className:me("visx-bar-stack-horizontal",n),top:r,left:a},S.map(function(T){return T.bars.map(function(E){return v.createElement(cp,Bi({key:"bar-stack-"+T.index+"-"+E.index,x:E.x,y:E.y,height:E.height,width:E.width,fill:E.color},x))})}))}function at(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function xp(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function lr(e){let t,n,r;e.length!==2?(t=at,n=(o,u)=>at(e(o),u),r=(o,u)=>e(o)-u):(t=e===at||e===xp?e:_p,n=e,r=e);function a(o,u,l=0,c=o.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;n(o[f],u)<0?l=f+1:c=f}while(l<c)}return l}function i(o,u,l=0,c=o.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;n(o[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function s(o,u,l=0,c=o.length){const f=a(o,u,l,c-1);return f>l&&r(o[f-1],u)>-r(o[f],u)?f-1:f}return{left:a,center:s,right:i}}function _p(){return 0}function lu(e){return e===null?NaN:+e}function*wp(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const cu=lr(at),sn=cu.right,Sp=cu.left;lr(lu).center;function fu(e,t){let n,r;for(const a of e)a!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)));return[n,r]}class hu extends Map{constructor(t,n=kp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(du(this,t))}has(t){return super.has(du(this,t))}set(t,n){return super.set(Tp(this,t),n)}delete(t){return super.delete(Op(this,t))}}function du({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Tp({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Op({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function kp(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Mp(e=at){if(e===at)return pu;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function pu(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var Ui=Math.sqrt(50),qi=Math.sqrt(10),Yi=Math.sqrt(2);function Vi(e,t,n){var r,a=-1,i,s,o;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),(o=mu(e,t,n))===0||!isFinite(o))return[];if(o>0){let u=Math.round(e/o),l=Math.round(t/o);for(u*o<e&&++u,l*o>t&&--l,s=new Array(i=l-u+1);++a<i;)s[a]=(u+a)*o}else{o=-o;let u=Math.round(e*o),l=Math.round(t*o);for(u/o<e&&++u,l/o>t&&--l,s=new Array(i=l-u+1);++a<i;)s[a]=(u+a)/o}return r&&s.reverse(),s}function mu(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>=Ui?10:i>=qi?5:i>=Yi?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=Ui?10:i>=qi?5:i>=Yi?2:1)}function Gi(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>=Ui?a*=10:i>=qi?a*=5:i>=Yi&&(a*=2),t<e?-a:a}function gu(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function vu(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function yu(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?pu:Mp(a);r>n;){if(r-n>600){const u=r-n+1,l=t-n+1,c=Math.log(u),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),p=Math.max(n,Math.floor(t-l*f/u+h)),d=Math.min(r,Math.floor(t+(u-l)*f/u+h));yu(e,t,p,d,a)}const i=e[t];let s=n,o=r;for(un(e,n,t),a(e[r],i)>0&&un(e,n,r);s<o;){for(un(e,s,o),++s,--o;a(e[s],i)<0;)++s;for(;a(e[o],i)>0;)--o}a(e[n],i)===0?un(e,n,o):(++o,un(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function un(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function $p(e,t,n){if(e=Float64Array.from(wp(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return vu(e);if(t>=1)return gu(e);var r,a=(r-1)*t,i=Math.floor(a),s=gu(yu(e,i).subarray(0,i+1)),o=vu(e.subarray(i+1));return s+(o-s)*(a-i)}}function Ep(e,t,n=lu){if(!(!(r=e.length)||isNaN(t=+t))){if(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),s=+n(e[i],i,e),o=+n(e[i+1],i+1,e);return s+(o-s)*(a-i)}}function bu(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=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r<a;)i[r]=e+r*n;return i}function Ee(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ke(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Ki=Symbol("implicit");function cr(){var e=new hu,t=[],n=[],r=Ki;function a(i){let s=e.get(i);if(s===void 0){if(r!==Ki)return r;e.set(i,s=t.push(i)-1)}return n[s%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new hu;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return cr(t,n).unknown(r)},Ee.apply(a,arguments),a}function fr(){var e=cr().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,s,o=!1,u=0,l=0,c=.5;delete e.unknown;function f(){var h=t().length,p=a<r,d=p?a:r,m=p?r:a;i=(m-d)/Math.max(1,h-u+l*2),o&&(i=Math.floor(i)),d+=(m-d-i*(h-u))*c,s=i*(1-u),o&&(d=Math.round(d),s=Math.round(s));var b=bu(h).map(function(g){return d+i*g});return n(p?b.reverse():b)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([r,a]=h,r=+r,a=+a,f()):[r,a]},e.rangeRound=function(h){return[r,a]=h,r=+r,a=+a,o=!0,f()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(h){return arguments.length?(o=!!h,f()):o},e.padding=function(h){return arguments.length?(u=Math.min(1,l=+h),f()):u},e.paddingInner=function(h){return arguments.length?(u=Math.min(1,h),f()):u},e.paddingOuter=function(h){return arguments.length?(l=+h,f()):l},e.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},e.copy=function(){return fr(t(),[r,a]).round(o).paddingInner(u).paddingOuter(l).align(c)},Ee.apply(f(),arguments)}function xu(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return xu(t())},e}function _u(){return xu(fr.apply(null,arguments).paddingInner(1))}function zt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ln(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ot(){}var bt=.7,Ft=1/bt,It="\\s*([+-]?\\d+)\\s*",cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Cp=/^#([0-9a-f]{3,8})$/,Pp=new RegExp(`^rgb\\(${It},${It},${It}\\)$`),Np=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),Lp=new RegExp(`^rgba\\(${It},${It},${It},${cn}\\)$`),Ap=new RegExp(`^rgba\\(${Re},${Re},${Re},${cn}\\)$`),Dp=new RegExp(`^hsl\\(${cn},${Re},${Re}\\)$`),jp=new RegExp(`^hsla\\(${cn},${Re},${Re},${cn}\\)$`),wu={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};zt(ot,fn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Su,formatHex:Su,formatHex8:zp,formatHsl:Fp,formatRgb:Tu,toString:Tu});function Su(){return this.rgb().formatHex()}function zp(){return this.rgb().formatHex8()}function Fp(){return Eu(this).formatHsl()}function Tu(){return this.rgb().formatRgb()}function fn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Cp.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Ou(t):n===3?new ce(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?hr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?hr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Pp.exec(e))?new ce(t[1],t[2],t[3],1):(t=Np.exec(e))?new ce(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Lp.exec(e))?hr(t[1],t[2],t[3],t[4]):(t=Ap.exec(e))?hr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Dp.exec(e))?$u(t[1],t[2]/100,t[3]/100,1):(t=jp.exec(e))?$u(t[1],t[2]/100,t[3]/100,t[4]):wu.hasOwnProperty(e)?Ou(wu[e]):e==="transparent"?new ce(NaN,NaN,NaN,0):null}function Ou(e){return new ce(e>>16&255,e>>8&255,e&255,1)}function hr(e,t,n,r){return r<=0&&(e=t=n=NaN),new ce(e,t,n,r)}function Xi(e){return e instanceof ot||(e=fn(e)),e?(e=e.rgb(),new ce(e.r,e.g,e.b,e.opacity)):new ce}function dr(e,t,n,r){return arguments.length===1?Xi(e):new ce(e,t,n,r??1)}function ce(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}zt(ce,dr,ln(ot,{brighter(e){return e=e==null?Ft:Math.pow(Ft,e),new ce(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?bt:Math.pow(bt,e),new ce(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ce(xt(this.r),xt(this.g),xt(this.b),pr(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:ku,formatHex:ku,formatHex8:Ip,formatRgb:Mu,toString:Mu}));function ku(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}`}function Ip(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}${_t((isNaN(this.opacity)?1:this.opacity)*255)}`}function Mu(){const e=pr(this.opacity);return`${e===1?"rgb(":"rgba("}${xt(this.r)}, ${xt(this.g)}, ${xt(this.b)}${e===1?")":`, ${e})`}`}function pr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _t(e){return e=xt(e),(e<16?"0":"")+e.toString(16)}function $u(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ne(e,t,n,r)}function Eu(e){if(e instanceof Ne)return new Ne(e.h,e.s,e.l,e.opacity);if(e instanceof ot||(e=fn(e)),!e)return new Ne;if(e instanceof Ne)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,o=i-a,u=(i+a)/2;return o?(t===i?s=(n-r)/o+(n<r)*6:n===i?s=(r-t)/o+2:s=(t-n)/o+4,o/=u<.5?i+a:2-i-a,s*=60):o=u>0&&u<1?0:s,new Ne(s,o,u,e.opacity)}function Zi(e,t,n,r){return arguments.length===1?Eu(e):new Ne(e,t,n,r??1)}function Ne(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}zt(Ne,Zi,ln(ot,{brighter(e){return e=e==null?Ft:Math.pow(Ft,e),new Ne(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bt:Math.pow(bt,e),new Ne(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,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 ce(Qi(e>=240?e-240:e+120,a,r),Qi(e,a,r),Qi(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Ne(Cu(this.h),mr(this.s),mr(this.l),pr(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=pr(this.opacity);return`${e===1?"hsl(":"hsla("}${Cu(this.h)}, ${mr(this.s)*100}%, ${mr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Cu(e){return e=(e||0)%360,e<0?e+360:e}function mr(e){return Math.max(0,Math.min(1,e||0))}function Qi(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Pu=Math.PI/180,Nu=180/Math.PI,gr=18,Lu=.96422,Au=1,Du=.82521,ju=4/29,Rt=6/29,zu=3*Rt*Rt,Rp=Rt*Rt*Rt;function Fu(e){if(e instanceof We)return new We(e.l,e.a,e.b,e.opacity);if(e instanceof Xe)return Iu(e);e instanceof ce||(e=Xi(e));var t=ra(e.r),n=ra(e.g),r=ra(e.b),a=ea((.2225045*t+.7168786*n+.0606169*r)/Au),i,s;return t===n&&n===r?i=s=a:(i=ea((.4360747*t+.3850649*n+.1430804*r)/Lu),s=ea((.0139322*t+.0971045*n+.7141733*r)/Du)),new We(116*a-16,500*(i-a),200*(a-s),e.opacity)}function Ji(e,t,n,r){return arguments.length===1?Fu(e):new We(e,t,n,r??1)}function We(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}zt(We,Ji,ln(ot,{brighter(e){return new We(this.l+gr*(e??1),this.a,this.b,this.opacity)},darker(e){return new We(this.l-gr*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=Lu*ta(t),e=Au*ta(e),n=Du*ta(n),new ce(na(3.1338561*t-1.6168667*e-.4906146*n),na(-.9787684*t+1.9161415*e+.033454*n),na(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function ea(e){return e>Rp?Math.pow(e,1/3):e/zu+ju}function ta(e){return e>Rt?e*e*e:zu*(e-ju)}function na(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ra(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Wp(e){if(e instanceof Xe)return new Xe(e.h,e.c,e.l,e.opacity);if(e instanceof We||(e=Fu(e)),e.a===0&&e.b===0)return new Xe(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Nu;return new Xe(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function ia(e,t,n,r){return arguments.length===1?Wp(e):new Xe(e,t,n,r??1)}function Xe(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Iu(e){if(isNaN(e.h))return new We(e.l,0,0,e.opacity);var t=e.h*Pu;return new We(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}zt(Xe,ia,ln(ot,{brighter(e){return new Xe(this.h,this.c,this.l+gr*(e??1),this.opacity)},darker(e){return new Xe(this.h,this.c,this.l-gr*(e??1),this.opacity)},rgb(){return Iu(this).rgb()}}));var Ru=-.14861,aa=1.78277,oa=-.29227,vr=-.90649,hn=1.97294,Wu=hn*vr,Hu=hn*aa,Bu=aa*oa-vr*Ru;function Hp(e){if(e instanceof wt)return new wt(e.h,e.s,e.l,e.opacity);e instanceof ce||(e=Xi(e));var t=e.r/255,n=e.g/255,r=e.b/255,a=(Bu*r+Wu*t-Hu*n)/(Bu+Wu-Hu),i=r-a,s=(hn*(n-a)-oa*i)/vr,o=Math.sqrt(s*s+i*i)/(hn*a*(1-a)),u=o?Math.atan2(s,i)*Nu-120:NaN;return new wt(u<0?u+360:u,o,a,e.opacity)}function sa(e,t,n,r){return arguments.length===1?Hp(e):new wt(e,t,n,r??1)}function wt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}zt(wt,sa,ln(ot,{brighter(e){return e=e==null?Ft:Math.pow(Ft,e),new wt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bt:Math.pow(bt,e),new wt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*Pu,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),a=Math.sin(e);return new ce(255*(t+n*(Ru*r+aa*a)),255*(t+n*(oa*r+vr*a)),255*(t+n*(hn*r)),this.opacity)}}));function Uu(e,t,n,r,a){var i=e*e,s=i*e;return((1-3*e+3*i-s)*t+(4-6*i+3*s)*n+(1+3*e+3*i-3*s)*r+s*a)/6}function qu(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),a=e[r],i=e[r+1],s=r>0?e[r-1]:2*a-i,o=r<t-1?e[r+2]:2*i-a;return Uu((n-r/t)*t,s,a,i,o)}}function Yu(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),a=e[(r+t-1)%t],i=e[r%t],s=e[(r+1)%t],o=e[(r+2)%t];return Uu((n-r/t)*t,a,i,s,o)}}const yr=e=>()=>e;function Vu(e,t){return function(n){return e+n*t}}function Bp(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)}}function br(e,t){var n=t-e;return n?Vu(e,n>180||n<-180?n-360*Math.round(n/360):n):yr(isNaN(e)?t:e)}function Up(e){return(e=+e)==1?fe:function(t,n){return n-t?Bp(t,n,e):yr(isNaN(t)?n:t)}}function fe(e,t){var n=t-e;return n?Vu(e,n):yr(isNaN(e)?t:e)}const xr=function e(t){var n=Up(t);function r(a,i){var s=n((a=dr(a)).r,(i=dr(i)).r),o=n(a.g,i.g),u=n(a.b,i.b),l=fe(a.opacity,i.opacity);return function(c){return a.r=s(c),a.g=o(c),a.b=u(c),a.opacity=l(c),a+""}}return r.gamma=e,r}(1);function Gu(e){return function(t){var n=t.length,r=new Array(n),a=new Array(n),i=new Array(n),s,o;for(s=0;s<n;++s)o=dr(t[s]),r[s]=o.r||0,a[s]=o.g||0,i[s]=o.b||0;return r=e(r),a=e(a),i=e(i),o.opacity=1,function(u){return o.r=r(u),o.g=a(u),o.b=i(u),o+""}}}var qp=Gu(qu),Yp=Gu(Yu);function ua(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function Ku(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Vp(e,t){return(Ku(t)?ua:Xu)(e,t)}function Xu(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)a[s]=St(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(o){for(s=0;s<r;++s)i[s]=a[s](o);return i}}function Zu(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Le(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Qu(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=St(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var la=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ca=new RegExp(la.source,"g");function Gp(e){return function(){return e}}function Kp(e){return function(t){return e(t)+""}}function Ju(e,t){var n=la.lastIndex=ca.lastIndex=0,r,a,i,s=-1,o=[],u=[];for(e=e+"",t=t+"";(r=la.exec(e))&&(a=ca.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),o[s]?o[s]+=i:o[++s]=i),(r=r[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,u.push({i:s,x:Le(r,a)})),n=ca.lastIndex;return n<t.length&&(i=t.slice(n),o[s]?o[s]+=i:o[++s]=i),o.length<2?u[0]?Kp(u[0].x):Gp(t):(t=u.length,function(l){for(var c=0,f;c<t;++c)o[(f=u[c]).i]=f.x(l);return o.join("")})}function St(e,t){var n=typeof t,r;return t==null||n==="boolean"?yr(t):(n==="number"?Le:n==="string"?(r=fn(t))?(t=r,xr):Ju:t instanceof fn?xr:t instanceof Date?Zu:Ku(t)?ua:Array.isArray(t)?Xu:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Qu:Le)(e,t)}function Xp(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function Zp(e,t){var n=br(+e,+t);return function(r){var a=n(r);return a-360*Math.floor(a/360)}}function dn(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var el=180/Math.PI,fa={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tl(e,t,n,r,a,i){var s,o,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,u/=o),e*r<t*n&&(e=-e,t=-t,u=-u,s=-s),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*el,skewX:Math.atan(u)*el,scaleX:s,scaleY:o}}var _r;function Qp(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?fa:tl(t.a,t.b,t.c,t.d,t.e,t.f)}function Jp(e){return e==null||(_r||(_r=document.createElementNS("http://www.w3.org/2000/svg","g")),_r.setAttribute("transform",e),!(e=_r.transform.baseVal.consolidate()))?fa:(e=e.matrix,tl(e.a,e.b,e.c,e.d,e.e,e.f))}function nl(e,t,n,r){function a(l){return l.length?l.pop()+" ":""}function i(l,c,f,h,p,d){if(l!==f||c!==h){var m=p.push("translate(",null,t,null,n);d.push({i:m-4,x:Le(l,f)},{i:m-2,x:Le(c,h)})}else(f||h)&&p.push("translate("+f+t+h+n)}function s(l,c,f,h){l!==c?(l-c>180?c+=360:c-l>180&&(l+=360),h.push({i:f.push(a(f)+"rotate(",null,r)-2,x:Le(l,c)})):c&&f.push(a(f)+"rotate("+c+r)}function o(l,c,f,h){l!==c?h.push({i:f.push(a(f)+"skewX(",null,r)-2,x:Le(l,c)}):c&&f.push(a(f)+"skewX("+c+r)}function u(l,c,f,h,p,d){if(l!==f||c!==h){var m=p.push(a(p)+"scale(",null,",",null,")");d.push({i:m-4,x:Le(l,f)},{i:m-2,x:Le(c,h)})}else(f!==1||h!==1)&&p.push(a(p)+"scale("+f+","+h+")")}return function(l,c){var f=[],h=[];return l=e(l),c=e(c),i(l.translateX,l.translateY,c.translateX,c.translateY,f,h),s(l.rotate,c.rotate,f,h),o(l.skewX,c.skewX,f,h),u(l.scaleX,l.scaleY,c.scaleX,c.scaleY,f,h),l=c=null,function(p){for(var d=-1,m=h.length,b;++d<m;)f[(b=h[d]).i]=b.x(p);return f.join("")}}}var em=nl(Qp,"px, ","px)","deg)"),tm=nl(Jp,", ",")",")"),nm=1e-12;function rl(e){return((e=Math.exp(e))+1/e)/2}function rm(e){return((e=Math.exp(e))-1/e)/2}function im(e){return((e=Math.exp(2*e))-1)/(e+1)}const am=function e(t,n,r){function a(i,s){var o=i[0],u=i[1],l=i[2],c=s[0],f=s[1],h=s[2],p=c-o,d=f-u,m=p*p+d*d,b,g;if(m<nm)g=Math.log(h/l)/t,b=function(T){return[o+T*p,u+T*d,l*Math.exp(t*T*g)]};else{var x=Math.sqrt(m),_=(h*h-l*l+r*m)/(2*l*n*x),M=(h*h-l*l-r*m)/(2*h*n*x),y=Math.log(Math.sqrt(_*_+1)-_),S=Math.log(Math.sqrt(M*M+1)-M);g=(S-y)/t,b=function(T){var E=T*g,k=rl(y),$=l/(n*x)*(k*im(t*E+y)-rm(y));return[o+$*p,u+$*d,l*k/rl(t*E+y)]}}return b.duration=g*1e3*t/Math.SQRT2,b}return a.rho=function(i){var s=Math.max(.001,+i),o=s*s,u=o*o;return e(s,o,u)},a}(Math.SQRT2,2,4);function il(e){return function(t,n){var r=e((t=Zi(t)).h,(n=Zi(n)).h),a=fe(t.s,n.s),i=fe(t.l,n.l),s=fe(t.opacity,n.opacity);return function(o){return t.h=r(o),t.s=a(o),t.l=i(o),t.opacity=s(o),t+""}}}const al=il(br);var ol=il(fe);function sl(e,t){var n=fe((e=Ji(e)).l,(t=Ji(t)).l),r=fe(e.a,t.a),a=fe(e.b,t.b),i=fe(e.opacity,t.opacity);return function(s){return e.l=n(s),e.a=r(s),e.b=a(s),e.opacity=i(s),e+""}}function ul(e){return function(t,n){var r=e((t=ia(t)).h,(n=ia(n)).h),a=fe(t.c,n.c),i=fe(t.l,n.l),s=fe(t.opacity,n.opacity);return function(o){return t.h=r(o),t.c=a(o),t.l=i(o),t.opacity=s(o),t+""}}}const ll=ul(br);var cl=ul(fe);function fl(e){return function t(n){n=+n;function r(a,i){var s=e((a=sa(a)).h,(i=sa(i)).h),o=fe(a.s,i.s),u=fe(a.l,i.l),l=fe(a.opacity,i.opacity);return function(c){return a.h=s(c),a.s=o(c),a.l=u(Math.pow(c,n)),a.opacity=l(c),a+""}}return r.gamma=t,r}(1)}const hl=fl(br);var dl=fl(fe);function pl(e,t){t===void 0&&(t=e,e=St);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(s){var o=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return i[o](s-o)}}function om(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}function sm(e){return function(){return e}}function wr(e){return+e}var ml=[0,1];function ye(e){return e}function ha(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:sm(isNaN(t)?NaN:.5)}function um(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function lm(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a<r?(r=ha(a,r),i=n(s,i)):(r=ha(r,a),i=n(i,s)),function(o){return i(r(o))}}function cm(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)a[s]=ha(e[s],e[s+1]),i[s]=n(t[s],t[s+1]);return function(o){var u=sn(e,o,1,r)-1;return i[u](a[u](o))}}function pn(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Sr(){var e=ml,t=ml,n=St,r,a,i,s=ye,o,u,l;function c(){var h=Math.min(e.length,t.length);return s!==ye&&(s=um(e[0],e[h-1])),o=h>2?cm:lm,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?i:(u||(u=o(e.map(r),t,n)))(r(s(h)))}return f.invert=function(h){return s(a((l||(l=o(t,e.map(r),Le)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,wr),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=dn,c()},f.clamp=function(h){return arguments.length?(s=h?!0:ye,c()):s!==ye},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,p){return r=h,a=p,c()}}function da(){return Sr()(ye,ye)}function fm(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Tr(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 Wt(e){return e=Tr(Math.abs(e)),e?e[1]:NaN}function hm(e,t){return function(n,r){for(var a=n.length,i=[],s=0,o=e[0],u=0;a>0&&o>0&&(u+o+1>r&&(o=Math.max(1,r-u)),i.push(n.substring(a-=o,a+o)),!((u+=o+1)>r));)o=e[s=(s+1)%e.length];return i.reverse().join(t)}}function dm(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var pm=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mn(e){if(!(t=pm.exec(e)))throw new Error("invalid format: "+e);var t;return new pa({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]})}mn.prototype=pa.prototype;function pa(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}pa.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function mm(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var gl;function gm(e,t){var n=Tr(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(gl=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Tr(e,Math.max(0,t+i-1))[0]}function vl(e,t){var n=Tr(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")}const yl={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:fm,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)=>vl(e*100,t),r:vl,s:gm,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function bl(e){return e}var xl=Array.prototype.map,_l=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vm(e){var t=e.grouping===void 0||e.thousands===void 0?bl:hm(xl.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?bl:dm(xl.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f){f=mn(f);var h=f.fill,p=f.align,d=f.sign,m=f.symbol,b=f.zero,g=f.width,x=f.comma,_=f.precision,M=f.trim,y=f.type;y==="n"?(x=!0,y="g"):yl[y]||(_===void 0&&(_=12),M=!0,y="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var S=m==="$"?n:m==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",T=m==="$"?r:/[%p]/.test(y)?s:"",E=yl[y],k=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function $(P){var N=S,A=T,R,X,U;if(y==="c")A=E(P)+A,P="";else{P=+P;var Z=P<0||1/P<0;if(P=isNaN(P)?u:E(Math.abs(P),_),M&&(P=mm(P)),Z&&+P==0&&d!=="+"&&(Z=!1),N=(Z?d==="("?d:o:d==="-"||d==="("?"":d)+N,A=(y==="s"?_l[8+gl/3]:"")+A+(Z&&d==="("?")":""),k){for(R=-1,X=P.length;++R<X;)if(U=P.charCodeAt(R),48>U||U>57){A=(U===46?a+P.slice(R+1):P.slice(R))+A,P=P.slice(0,R);break}}}x&&!b&&(P=t(P,1/0));var ee=N.length+P.length+A.length,K=ee<g?new Array(g-ee+1).join(h):"";switch(x&&b&&(P=t(K+P,K.length?g-A.length:1/0),K=""),p){case"<":P=N+P+A+K;break;case"=":P=N+K+P+A;break;case"^":P=K.slice(0,ee=K.length>>1)+N+P+A+K.slice(ee);break;default:P=K+N+P+A;break}return i(P)}return $.toString=function(){return f+""},$}function c(f,h){var p=l((f=mn(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(Wt(h)/3)))*3,m=Math.pow(10,-d),b=_l[8+d/3];return function(g){return p(m*g)+b}}return{format:l,formatPrefix:c}}var Or,ma,wl;ym({thousands:",",grouping:[3],currency:["$",""]});function ym(e){return Or=vm(e),ma=Or.format,wl=Or.formatPrefix,Or}function bm(e){return Math.max(0,-Wt(Math.abs(e)))}function xm(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Wt(t)/3)))*3-Wt(Math.abs(e)))}function _m(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Wt(t)-Wt(e))+1}function Sl(e,t,n,r){var a=Gi(e,t,n),i;switch(r=mn(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=xm(a,s))&&(r.precision=i),wl(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=_m(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=bm(a))&&(r.precision=i-(r.type==="%")*2);break}}return ma(r)}function st(e){var t=e.domain;return e.ticks=function(n){var r=t();return Vi(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return Sl(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],o=r[i],u,l,c=10;for(o<s&&(l=s,s=o,o=l,l=a,a=i,i=l);c-- >0;){if(l=mu(s,o,n),l===u)return r[a]=s,r[i]=o,t(r);if(l>0)s=Math.floor(s/l)*l,o=Math.ceil(o/l)*l;else if(l<0)s=Math.ceil(s*l)/l,o=Math.floor(o*l)/l;else break;u=l}return e},e}function ga(){var e=da();return e.copy=function(){return pn(e,ga())},Ee.apply(e,arguments),st(e)}function Tl(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,wr),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Tl(e).unknown(t)},e=arguments.length?Array.from(e,wr):[0,1],st(n)}function Ol(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return i<a&&(s=n,n=r,r=s,s=a,a=i,i=s),e[n]=t.floor(a),e[r]=t.ceil(i),e}function kl(e){return Math.log(e)}function Ml(e){return Math.exp(e)}function wm(e){return-Math.log(-e)}function Sm(e){return-Math.exp(-e)}function Tm(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Om(e){return e===10?Tm:e===Math.E?Math.exp:t=>Math.pow(e,t)}function km(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function $l(e){return(t,n)=>-e(-t,n)}function va(e){const t=e(kl,Ml),n=t.domain;let r=10,a,i;function s(){return a=km(r),i=Om(r),n()[0]<0?(a=$l(a),i=$l(i),e(wm,Sm)):e(kl,Ml),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const u=n();let l=u[0],c=u[u.length-1];const f=c<l;f&&([l,c]=[c,l]);let h=a(l),p=a(c),d,m;const b=o==null?10:+o;let g=[];if(!(r%1)&&p-h<b){if(h=Math.floor(h),p=Math.ceil(p),l>0){for(;h<=p;++h)for(d=1;d<r;++d)if(m=h<0?d/i(-h):d*i(h),!(m<l)){if(m>c)break;g.push(m)}}else for(;h<=p;++h)for(d=r-1;d>=1;--d)if(m=h>0?d/i(-h):d*i(h),!(m<l)){if(m>c)break;g.push(m)}g.length*2<b&&(g=Vi(l,c,b))}else g=Vi(h,p,Math.min(p-h,b)).map(i);return f?g.reverse():g},t.tickFormat=(o,u)=>{if(o==null&&(o=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=mn(u)).precision==null&&(u.trim=!0),u=ma(u)),o===1/0)return u;const l=Math.max(1,r*o/t.ticks().length);return c=>{let f=c/i(Math.round(a(c)));return f*r<r-.5&&(f*=r),f<=l?u(c):""}},t.nice=()=>n(Ol(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function ya(){const e=va(Sr()).domain([1,10]);return e.copy=()=>pn(e,ya()).base(e.base()),Ee.apply(e,arguments),e}function El(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Cl(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function ba(e){var t=1,n=e(El(t),Cl(t));return n.constant=function(r){return arguments.length?e(El(t=+r),Cl(t)):t},st(n)}function xa(){var e=ba(Sr());return e.copy=function(){return pn(e,xa()).constant(e.constant())},Ee.apply(e,arguments)}function Pl(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Mm(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function $m(e){return e<0?-e*e:e*e}function _a(e){var t=e(ye,ye),n=1;function r(){return n===1?e(ye,ye):n===.5?e(Mm,$m):e(Pl(n),Pl(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},st(t)}function kr(){var e=_a(Sr());return e.copy=function(){return pn(e,kr()).exponent(e.exponent())},Ee.apply(e,arguments),e}function Nl(){return kr.apply(null,arguments).exponent(.5)}function Ll(e){return Math.sign(e)*e*e}function Em(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function wa(){var e=da(),t=[0,1],n=!1,r;function a(i){var s=Em(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(Ll(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,wr)).map(Ll)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return wa(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Ee.apply(a,arguments),st(a)}function Sa(){var e=[],t=[],n=[],r;function a(){var s=0,o=Math.max(1,t.length);for(n=new Array(o-1);++s<o;)n[s-1]=Ep(e,s/o);return i}function i(s){return s==null||isNaN(s=+s)?r:t[sn(n,s)]}return i.invertExtent=function(s){var o=t.indexOf(s);return o<0?[NaN,NaN]:[o>0?n[o-1]:e[0],o<n.length?n[o]:e[e.length-1]]},i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let o of s)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(at),a()},i.range=function(s){return arguments.length?(t=Array.from(s),a()):t.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return Sa().domain(e).range(t).unknown(r)},Ee.apply(i,arguments)}function Ta(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function s(u){return u!=null&&u<=u?a[sn(r,u,0,n)]:i}function o(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*t-(u-n)*e)/(n+1);return s}return s.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,o()):[e,t]},s.range=function(u){return arguments.length?(n=(a=Array.from(u)).length-1,o()):a.slice()},s.invertExtent=function(u){var l=a.indexOf(u);return l<0?[NaN,NaN]:l<1?[e,r[0]]:l>=n?[r[n-1],t]:[r[l-1],r[l]]},s.unknown=function(u){return arguments.length&&(i=u),s},s.thresholds=function(){return r.slice()},s.copy=function(){return Ta().domain([e,t]).range(a).unknown(i)},Ee.apply(st(s),arguments)}function Oa(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[sn(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return Oa().domain(e).range(t).unknown(n)},Ee.apply(a,arguments)}const ka=new Date,Ma=new Date;function se(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),o=a.ceil(i);return i-s<o-i?s:o},a.offset=(i,s)=>(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,o)=>{const u=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i<s)||!(o>0))return u;let l;do u.push(l=new Date(+i)),t(i,o),e(i);while(l<i&&i<s);return u},a.filter=i=>se(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!i(s););else for(;--o>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(ka.setTime(+i),Ma.setTime(+s),e(ka),e(Ma),Math.floor(n(ka,Ma))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Ht=se(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ht.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?se(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ht);const Al=Ht.range,Ze=1e3,Ce=Ze*60,Qe=Ce*60,Je=Qe*24,$a=Je*7,Dl=Je*30,Ea=Je*365,Ae=se(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ze)},(e,t)=>(t-e)/Ze,e=>e.getUTCSeconds()),jl=Ae.range,gn=se(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ze)},(e,t)=>{e.setTime(+e+t*Ce)},(e,t)=>(t-e)/Ce,e=>e.getMinutes()),Cm=gn.range,vn=se(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ce)},(e,t)=>(t-e)/Ce,e=>e.getUTCMinutes()),Pm=vn.range,yn=se(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ze-e.getMinutes()*Ce)},(e,t)=>{e.setTime(+e+t*Qe)},(e,t)=>(t-e)/Qe,e=>e.getHours()),Nm=yn.range,bn=se(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Qe)},(e,t)=>(t-e)/Qe,e=>e.getUTCHours()),Lm=bn.range,Tt=se(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ce)/Je,e=>e.getDate()-1),Am=Tt.range,Bt=se(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Je,e=>e.getUTCDate()-1),Dm=Bt.range,Ca=se(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Je,e=>Math.floor(e/Je)),jm=Ca.range;function Ot(e){return se(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ce)/$a)}const kt=Ot(0),xn=Ot(1),zl=Ot(2),Fl=Ot(3),Mt=Ot(4),Il=Ot(5),Rl=Ot(6),Wl=kt.range,zm=xn.range,Fm=zl.range,Im=Fl.range,Rm=Mt.range,Wm=Il.range,Hm=Rl.range;function $t(e){return se(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/$a)}const Et=$t(0),_n=$t(1),Hl=$t(2),Bl=$t(3),Ct=$t(4),Ul=$t(5),ql=$t(6),Yl=Et.range,Bm=_n.range,Um=Hl.range,qm=Bl.range,Ym=Ct.range,Vm=Ul.range,Gm=ql.range,wn=se(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),Km=wn.range,Sn=se(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),Xm=Sn.range,De=se(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());De.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:se(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});const Zm=De.range,je=se(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());je.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:se(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});const Qm=je.range;function Vl(e,t,n,r,a,i){const s=[[Ae,1,Ze],[Ae,5,5*Ze],[Ae,15,15*Ze],[Ae,30,30*Ze],[i,1,Ce],[i,5,5*Ce],[i,15,15*Ce],[i,30,30*Ce],[a,1,Qe],[a,3,3*Qe],[a,6,6*Qe],[a,12,12*Qe],[r,1,Je],[r,2,2*Je],[n,1,$a],[t,1,Dl],[t,3,3*Dl],[e,1,Ea]];function o(l,c,f){const h=c<l;h&&([l,c]=[c,l]);const p=f&&typeof f.range=="function"?f:u(l,c,f),d=p?p.range(l,+c+1):[];return h?d.reverse():d}function u(l,c,f){const h=Math.abs(c-l)/f,p=lr(([,,b])=>b).right(s,h);if(p===s.length)return e.every(Gi(l/Ea,c/Ea,f));if(p===0)return Ht.every(Math.max(Gi(l,c,f),1));const[d,m]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return d.every(m)}return[o,u]}const[Gl,Kl]=Vl(je,Sn,Et,Ca,bn,vn),[Xl,Zl]=Vl(De,wn,kt,Tt,yn,gn);function Pa(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 Na(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 Tn(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Jm(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,s=e.shortDays,o=e.months,u=e.shortMonths,l=On(a),c=kn(a),f=On(i),h=kn(i),p=On(s),d=kn(s),m=On(o),b=kn(o),g=On(u),x=kn(u),_={a:Z,A:ee,b:K,B:C,c:null,d:rc,e:rc,f:wg,g:Ng,G:Ag,H:bg,I:xg,j:_g,L:ic,m:Sg,M:Tg,p:D,q:H,Q:cc,s:fc,S:Og,u:kg,U:Mg,V:$g,w:Eg,W:Cg,x:null,X:null,y:Pg,Y:Lg,Z:Dg,"%":lc},M={a:W,A:F,b:I,B:q,c:null,d:oc,e:oc,f:Ig,g:Kg,G:Zg,H:jg,I:zg,j:Fg,L:sc,m:Rg,M:Wg,p:Y,q:G,Q:cc,s:fc,S:Hg,u:Bg,U:Ug,V:qg,w:Yg,W:Vg,x:null,X:null,y:Gg,Y:Xg,Z:Qg,"%":lc},y={a:$,A:P,b:N,B:A,c:R,d:tc,e:tc,f:mg,g:ec,G:Jl,H:nc,I:nc,j:fg,L:pg,m:cg,M:hg,p:k,q:lg,Q:vg,s:yg,S:dg,u:ig,U:ag,V:og,w:rg,W:sg,x:X,X:U,y:ec,Y:Jl,Z:ug,"%":gg};_.x=S(n,_),_.X=S(r,_),_.c=S(t,_),M.x=S(n,M),M.X=S(r,M),M.c=S(t,M);function S(L,z){return function(B){var O=[],Q=-1,te=0,ue=L.length,de,qe,oi;for(B instanceof Date||(B=new Date(+B));++Q<ue;)L.charCodeAt(Q)===37&&(O.push(L.slice(te,Q)),(qe=Ql[de=L.charAt(++Q)])!=null?de=L.charAt(++Q):qe=de==="e"?" ":"0",(oi=z[de])&&(de=oi(B,qe)),O.push(de),te=Q+1);return O.push(L.slice(te,Q)),O.join("")}}function T(L,z){return function(B){var O=Tn(1900,void 0,1),Q=E(O,L,B+="",0),te,ue;if(Q!=B.length)return null;if("Q"in O)return new Date(O.Q);if("s"in O)return new Date(O.s*1e3+("L"in O?O.L:0));if(z&&!("Z"in O)&&(O.Z=0),"p"in O&&(O.H=O.H%12+O.p*12),O.m===void 0&&(O.m="q"in O?O.q:0),"V"in O){if(O.V<1||O.V>53)return null;"w"in O||(O.w=1),"Z"in O?(te=Na(Tn(O.y,0,1)),ue=te.getUTCDay(),te=ue>4||ue===0?_n.ceil(te):_n(te),te=Bt.offset(te,(O.V-1)*7),O.y=te.getUTCFullYear(),O.m=te.getUTCMonth(),O.d=te.getUTCDate()+(O.w+6)%7):(te=Pa(Tn(O.y,0,1)),ue=te.getDay(),te=ue>4||ue===0?xn.ceil(te):xn(te),te=Tt.offset(te,(O.V-1)*7),O.y=te.getFullYear(),O.m=te.getMonth(),O.d=te.getDate()+(O.w+6)%7)}else("W"in O||"U"in O)&&("w"in O||(O.w="u"in O?O.u%7:"W"in O?1:0),ue="Z"in O?Na(Tn(O.y,0,1)).getUTCDay():Pa(Tn(O.y,0,1)).getDay(),O.m=0,O.d="W"in O?(O.w+6)%7+O.W*7-(ue+5)%7:O.w+O.U*7-(ue+6)%7);return"Z"in O?(O.H+=O.Z/100|0,O.M+=O.Z%100,Na(O)):Pa(O)}}function E(L,z,B,O){for(var Q=0,te=z.length,ue=B.length,de,qe;Q<te;){if(O>=ue)return-1;if(de=z.charCodeAt(Q++),de===37){if(de=z.charAt(Q++),qe=y[de in Ql?z.charAt(Q++):de],!qe||(O=qe(L,B,O))<0)return-1}else if(de!=B.charCodeAt(O++))return-1}return O}function k(L,z,B){var O=l.exec(z.slice(B));return O?(L.p=c.get(O[0].toLowerCase()),B+O[0].length):-1}function $(L,z,B){var O=p.exec(z.slice(B));return O?(L.w=d.get(O[0].toLowerCase()),B+O[0].length):-1}function P(L,z,B){var O=f.exec(z.slice(B));return O?(L.w=h.get(O[0].toLowerCase()),B+O[0].length):-1}function N(L,z,B){var O=g.exec(z.slice(B));return O?(L.m=x.get(O[0].toLowerCase()),B+O[0].length):-1}function A(L,z,B){var O=m.exec(z.slice(B));return O?(L.m=b.get(O[0].toLowerCase()),B+O[0].length):-1}function R(L,z,B){return E(L,t,z,B)}function X(L,z,B){return E(L,n,z,B)}function U(L,z,B){return E(L,r,z,B)}function Z(L){return s[L.getDay()]}function ee(L){return i[L.getDay()]}function K(L){return u[L.getMonth()]}function C(L){return o[L.getMonth()]}function D(L){return a[+(L.getHours()>=12)]}function H(L){return 1+~~(L.getMonth()/3)}function W(L){return s[L.getUTCDay()]}function F(L){return i[L.getUTCDay()]}function I(L){return u[L.getUTCMonth()]}function q(L){return o[L.getUTCMonth()]}function Y(L){return a[+(L.getUTCHours()>=12)]}function G(L){return 1+~~(L.getUTCMonth()/3)}return{format:function(L){var z=S(L+="",_);return z.toString=function(){return L},z},parse:function(L){var z=T(L+="",!1);return z.toString=function(){return L},z},utcFormat:function(L){var z=S(L+="",M);return z.toString=function(){return L},z},utcParse:function(L){var z=T(L+="",!0);return z.toString=function(){return L},z}}}var Ql={"-":"",_:" ",0:"0"},he=/^\s*\d+/,eg=/^%/,tg=/[\\^$*+?|[\]().{}]/g;function ne(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 ng(e){return e.replace(tg,"\\$&")}function On(e){return new RegExp("^(?:"+e.map(ng).join("|")+")","i")}function kn(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function rg(e,t,n){var r=he.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ig(e,t,n){var r=he.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ag(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function og(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function sg(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Jl(e,t,n){var r=he.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function ec(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ug(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 lg(e,t,n){var r=he.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function cg(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function tc(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function fg(e,t,n){var r=he.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function nc(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function hg(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function dg(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function pg(e,t,n){var r=he.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function mg(e,t,n){var r=he.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function gg(e,t,n){var r=eg.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function vg(e,t,n){var r=he.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function yg(e,t,n){var r=he.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function rc(e,t){return ne(e.getDate(),t,2)}function bg(e,t){return ne(e.getHours(),t,2)}function xg(e,t){return ne(e.getHours()%12||12,t,2)}function _g(e,t){return ne(1+Tt.count(De(e),e),t,3)}function ic(e,t){return ne(e.getMilliseconds(),t,3)}function wg(e,t){return ic(e,t)+"000"}function Sg(e,t){return ne(e.getMonth()+1,t,2)}function Tg(e,t){return ne(e.getMinutes(),t,2)}function Og(e,t){return ne(e.getSeconds(),t,2)}function kg(e){var t=e.getDay();return t===0?7:t}function Mg(e,t){return ne(kt.count(De(e)-1,e),t,2)}function ac(e){var t=e.getDay();return t>=4||t===0?Mt(e):Mt.ceil(e)}function $g(e,t){return e=ac(e),ne(Mt.count(De(e),e)+(De(e).getDay()===4),t,2)}function Eg(e){return e.getDay()}function Cg(e,t){return ne(xn.count(De(e)-1,e),t,2)}function Pg(e,t){return ne(e.getFullYear()%100,t,2)}function Ng(e,t){return e=ac(e),ne(e.getFullYear()%100,t,2)}function Lg(e,t){return ne(e.getFullYear()%1e4,t,4)}function Ag(e,t){var n=e.getDay();return e=n>=4||n===0?Mt(e):Mt.ceil(e),ne(e.getFullYear()%1e4,t,4)}function Dg(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ne(t/60|0,"0",2)+ne(t%60,"0",2)}function oc(e,t){return ne(e.getUTCDate(),t,2)}function jg(e,t){return ne(e.getUTCHours(),t,2)}function zg(e,t){return ne(e.getUTCHours()%12||12,t,2)}function Fg(e,t){return ne(1+Bt.count(je(e),e),t,3)}function sc(e,t){return ne(e.getUTCMilliseconds(),t,3)}function Ig(e,t){return sc(e,t)+"000"}function Rg(e,t){return ne(e.getUTCMonth()+1,t,2)}function Wg(e,t){return ne(e.getUTCMinutes(),t,2)}function Hg(e,t){return ne(e.getUTCSeconds(),t,2)}function Bg(e){var t=e.getUTCDay();return t===0?7:t}function Ug(e,t){return ne(Et.count(je(e)-1,e),t,2)}function uc(e){var t=e.getUTCDay();return t>=4||t===0?Ct(e):Ct.ceil(e)}function qg(e,t){return e=uc(e),ne(Ct.count(je(e),e)+(je(e).getUTCDay()===4),t,2)}function Yg(e){return e.getUTCDay()}function Vg(e,t){return ne(_n.count(je(e)-1,e),t,2)}function Gg(e,t){return ne(e.getUTCFullYear()%100,t,2)}function Kg(e,t){return e=uc(e),ne(e.getUTCFullYear()%100,t,2)}function Xg(e,t){return ne(e.getUTCFullYear()%1e4,t,4)}function Zg(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ct(e):Ct.ceil(e),ne(e.getUTCFullYear()%1e4,t,4)}function Qg(){return"+0000"}function lc(){return"%"}function cc(e){return+e}function fc(e){return Math.floor(+e/1e3)}var Ut,hc,dc;Jg({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"]});function Jg(e){return Ut=Jm(e),hc=Ut.format,Ut.parse,dc=Ut.utcFormat,Ut.utcParse,Ut}function ev(e){return new Date(e)}function tv(e){return e instanceof Date?+e:+new Date(+e)}function La(e,t,n,r,a,i,s,o,u,l){var c=da(),f=c.invert,h=c.domain,p=l(".%L"),d=l(":%S"),m=l("%I:%M"),b=l("%I %p"),g=l("%a %d"),x=l("%b %d"),_=l("%B"),M=l("%Y");function y(S){return(u(S)<S?p:o(S)<S?d:s(S)<S?m:i(S)<S?b:r(S)<S?a(S)<S?g:x:n(S)<S?_:M)(S)}return c.invert=function(S){return new Date(f(S))},c.domain=function(S){return arguments.length?h(Array.from(S,tv)):h().map(ev)},c.ticks=function(S){var T=h();return e(T[0],T[T.length-1],S??10)},c.tickFormat=function(S,T){return T==null?y:l(T)},c.nice=function(S){var T=h();return(!S||typeof S.range!="function")&&(S=t(T[0],T[T.length-1],S??10)),S?h(Ol(T,S)):c},c.copy=function(){return pn(c,La(e,t,n,r,a,i,s,o,u,l))},c}function pc(){return Ee.apply(La(Xl,Zl,De,wn,kt,Tt,yn,gn,Ae,hc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function mc(){return Ee.apply(La(Gl,Kl,je,Sn,Et,Bt,bn,vn,Ae,dc).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Mr(){var e=0,t=1,n,r,a,i,s=ye,o=!1,u;function l(f){return f==null||isNaN(f=+f)?u:s(a===0?.5:(f=(i(f)-n)*a,o?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([e,t]=f,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(f){return arguments.length?(o=!!f,l):o},l.interpolator=function(f){return arguments.length?(s=f,l):s};function c(f){return function(h){var p,d;return arguments.length?([p,d]=h,s=f(p,d),l):[s(0),s(1)]}}return l.range=c(St),l.rangeRound=c(dn),l.unknown=function(f){return arguments.length?(u=f,l):u},function(f){return i=f,n=f(e),r=f(t),a=n===r?0:1/(r-n),l}}function ut(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function gc(){var e=st(Mr()(ye));return e.copy=function(){return ut(e,gc())},Ke.apply(e,arguments)}function vc(){var e=va(Mr()).domain([1,10]);return e.copy=function(){return ut(e,vc()).base(e.base())},Ke.apply(e,arguments)}function yc(){var e=ba(Mr());return e.copy=function(){return ut(e,yc()).constant(e.constant())},Ke.apply(e,arguments)}function Aa(){var e=_a(Mr());return e.copy=function(){return ut(e,Aa()).exponent(e.exponent())},Ke.apply(e,arguments)}function nv(){return Aa.apply(null,arguments).exponent(.5)}function bc(){var e=[],t=ye;function n(r){if(r!=null&&!isNaN(r=+r))return t((sn(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(at),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>$p(e,i/r))},n.copy=function(){return bc(t).domain(e)},Ke.apply(n,arguments)}function $r(){var e=0,t=.5,n=1,r=1,a,i,s,o,u,l=ye,c,f=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+c(m))-i)*(r*m<r*i?o:u),l(f?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([e,t,n]=m,a=c(e=+e),i=c(t=+t),s=c(n=+n),o=a===i?0:.5/(i-a),u=i===s?0:.5/(s-i),r=i<a?-1:1,p):[e,t,n]},p.clamp=function(m){return arguments.length?(f=!!m,p):f},p.interpolator=function(m){return arguments.length?(l=m,p):l};function d(m){return function(b){var g,x,_;return arguments.length?([g,x,_]=b,l=pl(m,[g,x,_]),p):[l(0),l(.5),l(1)]}}return p.range=d(St),p.rangeRound=d(dn),p.unknown=function(m){return arguments.length?(h=m,p):h},function(m){return c=m,a=m(e),i=m(t),s=m(n),o=a===i?0:.5/(i-a),u=i===s?0:.5/(s-i),r=i<a?-1:1,p}}function xc(){var e=st($r()(ye));return e.copy=function(){return ut(e,xc())},Ke.apply(e,arguments)}function _c(){var e=va($r()).domain([.1,1,10]);return e.copy=function(){return ut(e,_c()).base(e.base())},Ke.apply(e,arguments)}function wc(){var e=ba($r());return e.copy=function(){return ut(e,wc()).constant(e.constant())},Ke.apply(e,arguments)}function Da(){var e=_a($r());return e.copy=function(){return ut(e,Da()).exponent(e.exponent())},Ke.apply(e,arguments)}function rv(){return Da.apply(null,arguments).exponent(.5)}const iv=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:fr,scaleDiverging:xc,scaleDivergingLog:_c,scaleDivergingPow:Da,scaleDivergingSqrt:rv,scaleDivergingSymlog:wc,scaleIdentity:Tl,scaleImplicit:Ki,scaleLinear:ga,scaleLog:ya,scaleOrdinal:cr,scalePoint:_u,scalePow:kr,scaleQuantile:Sa,scaleQuantize:Ta,scaleRadial:wa,scaleSequential:gc,scaleSequentialLog:vc,scaleSequentialPow:Aa,scaleSequentialQuantile:bc,scaleSequentialSqrt:nv,scaleSequentialSymlog:yc,scaleSqrt:Nl,scaleSymlog:xa,scaleThreshold:Oa,scaleTime:pc,scaleUtc:mc,tickFormat:Sl},Symbol.toStringTag,{value:"Module"}));function av(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}function ov(e,t){t.range&&("padding"in e,e.range(t.range))}function sv(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}function uv(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}function lv(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}function cv(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}function fv(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}const hv=Object.freeze(Object.defineProperty({__proto__:null,interpolate:St,interpolateArray:Vp,interpolateBasis:qu,interpolateBasisClosed:Yu,interpolateCubehelix:hl,interpolateCubehelixLong:dl,interpolateDate:Zu,interpolateDiscrete:Xp,interpolateHcl:ll,interpolateHclLong:cl,interpolateHsl:al,interpolateHslLong:ol,interpolateHue:Zp,interpolateLab:sl,interpolateNumber:Le,interpolateNumberArray:ua,interpolateObject:Qu,interpolateRgb:xr,interpolateRgbBasis:qp,interpolateRgbBasisClosed:Yp,interpolateRound:dn,interpolateString:Ju,interpolateTransformCss:em,interpolateTransformSvg:tm,interpolateZoom:am,piecewise:pl,quantize:om},Symbol.toStringTag,{value:"Module"}));var Sc={lab:sl,hcl:ll,"hcl-long":cl,hsl:al,"hsl-long":ol,cubehelix:hl,"cubehelix-long":dl,rgb:xr};function dv(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return Sc[e]}var t=e.type,n=e.gamma,r=Sc[t];return typeof n>"u"?r:r.gamma(n)}function pv(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=dv(t.interpolate);e.interpolate(n)}}const mv=Object.freeze(Object.defineProperty({__proto__:null,timeDay:Tt,timeDays:Am,timeFriday:Il,timeFridays:Wm,timeHour:yn,timeHours:Nm,timeInterval:se,timeMillisecond:Ht,timeMilliseconds:Al,timeMinute:gn,timeMinutes:Cm,timeMonday:xn,timeMondays:zm,timeMonth:wn,timeMonths:Km,timeSaturday:Rl,timeSaturdays:Hm,timeSecond:Ae,timeSeconds:jl,timeSunday:kt,timeSundays:Wl,timeThursday:Mt,timeThursdays:Rm,timeTickInterval:Zl,timeTicks:Xl,timeTuesday:zl,timeTuesdays:Fm,timeWednesday:Fl,timeWednesdays:Im,timeWeek:kt,timeWeeks:Wl,timeYear:De,timeYears:Zm,unixDay:Ca,unixDays:jm,utcDay:Bt,utcDays:Dm,utcFriday:Ul,utcFridays:Vm,utcHour:bn,utcHours:Lm,utcMillisecond:Ht,utcMilliseconds:Al,utcMinute:vn,utcMinutes:Pm,utcMonday:_n,utcMondays:Bm,utcMonth:Sn,utcMonths:Xm,utcSaturday:ql,utcSaturdays:Gm,utcSecond:Ae,utcSeconds:jl,utcSunday:Et,utcSundays:Yl,utcThursday:Ct,utcThursdays:Ym,utcTickInterval:Kl,utcTicks:Gl,utcTuesday:Hl,utcTuesdays:Um,utcWednesday:Bl,utcWednesdays:qm,utcWeek:Et,utcWeeks:Yl,utcYear:je,utcYears:Qm},Symbol.toStringTag,{value:"Module"}));var gv=new Date(Date.UTC(2020,1,2,3,4,5)),vv="%Y-%m-%d %H:%M";function Tc(e){var t=e.tickFormat(1,vv)(gv);return t==="2020-02-02 03:04"}var Oc={day:Tt,hour:yn,minute:gn,month:wn,second:Ae,week:kt,year:De},kc={day:Bt,hour:bn,minute:vn,month:Sn,second:Ae,week:Et,year:je};function yv(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,a=Tc(r);if(typeof n=="string")r.nice(a?kc[n]:Oc[n]);else{var i=n.interval,s=n.step,o=(a?kc[i]:Oc[i]).every(s);o!=null&&r.nice(o)}}}}function bv(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}function xv(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}function _v(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(dn))}function wv(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}function Sv(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],a=n[1],i=a<r,s=i?[a,r]:[r,a],o=s[0],u=s[1],l=[Math.min(0,o),Math.max(0,u)];e.domain(i?l.reverse():l)}}var Mc=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"],Tv={domain:av,nice:yv,zero:Sv,interpolate:pv,round:_v,align:sv,base:uv,clamp:lv,constant:cv,exponent:fv,padding:bv,range:ov,reverse:xv,unknown:wv};function be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),a=Mc.filter(function(i){return r.has(i)});return function(s,o){return typeof o<"u"&&a.forEach(function(u){Tv[u](s,o)}),s}}var Ov=be("domain","range","reverse","align","padding","round");function Mn(e){return Ov(fr(),e)}var kv=be("domain","range","reverse","align","padding","round");function $c(e){return kv(_u(),e)}var Mv=be("domain","range","reverse","clamp","interpolate","nice","round","zero");function qt(e){return Mv(ga(),e)}var $v=be("domain","range","clamp","nice","round","unknown");function Ev(e){return $v(wa(),e)}var Cv=be("domain","range","reverse","clamp","interpolate","nice","round");function Ec(e){return Cv(pc(),e)}var Pv=be("domain","range","reverse","clamp","interpolate","nice","round");function Cc(e){return Pv(mc(),e)}var Nv=be("domain","range","reverse","base","clamp","interpolate","nice","round");function Pc(e){return Nv(ya(),e)}var Lv=be("domain","range","reverse","clamp","exponent","interpolate","nice","round","zero");function Nc(e){return Lv(kr(),e)}var Av=be("domain","range","reverse","unknown");function Er(e){return Av(cr(),e)}var Dv=be("domain","range","reverse","nice","zero");function Lc(e){return Dv(Ta(),e)}var jv=be("domain","range","reverse");function Ac(e){return jv(Sa(),e)}var zv=be("domain","range","reverse","clamp","constant","nice","zero","round");function Dc(e){return zv(xa(),e)}var Fv=be("domain","range","reverse");function jc(e){return Fv(Oa(),e)}var Iv=be("domain","range","reverse","clamp","interpolate","nice","round","zero");function zc(e){return Iv(Nl(),e)}function $n(e){if(typeof e<"u"&&"type"in e)switch(e.type){case"linear":return qt(e);case"log":return Pc(e);case"pow":return Nc(e);case"sqrt":return zc(e);case"symlog":return Dc(e);case"time":return Ec(e);case"utc":return Cc(e);case"quantile":return Ac(e);case"quantize":return Lc(e);case"threshold":return jc(e);case"ordinal":return Er(e);case"point":return $c(e);case"band":return Mn(e)}return qt(e)}var Rv=be.apply(void 0,Mc);function Wv(e,t){return Rv(e.copy(),t)}function Hv(e){return"paddingInner"in e?"band":"padding"in e?"point":"quantiles"in e?"quantile":"base"in e?"log":"exponent"in e?e.exponent()===.5?"sqrt":"pow":"constant"in e?"symlog":"clamp"in e?e.ticks()[0]instanceof Date?Tc(e)?"utc":"time":"linear":"nice"in e?"quantize":"invertExtent"in e?"threshold":"ordinal"}function Cr(e){if((typeof e=="function"||typeof e=="object"&&e)&&"valueOf"in e){var t=e.valueOf();if(typeof t=="number")return t}return e}function Pr(e,t){var n=e;return"ticks"in n?n.ticks(t):n.domain().filter(function(r,a,i){return t==null||i.length<=t||a%Math.round((i.length-1)/t)===0})}function Fc(e){return e==null?void 0:e.toString()}var Bv=new Set(["linear","pow","quantize","sqrt","symlog"]);function ja(e){return Bv.has(e.type)}const Uv=Object.freeze(Object.defineProperty({__proto__:null,coerceNumber:Cr,createScale:$n,getTicks:Pr,inferScaleType:Hv,scaleBand:Mn,scaleCanBeZeroed:ja,scaleLinear:qt,scaleLog:Pc,scaleOrdinal:Er,scalePoint:$c,scalePower:Nc,scaleQuantile:Ac,scaleQuantize:Lc,scaleRadial:Ev,scaleSqrt:zc,scaleSymlog:Dc,scaleThreshold:jc,scaleTime:Ec,scaleUtc:Cc,toString:Fc,updateScale:Wv},Symbol.toStringTag,{value:"Module"}));var qv=["children","id","from","to","x1","y1","x2","y2","fromOffset","fromOpacity","toOffset","toOpacity","rotate","transform","vertical"];function za(){return za=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},za.apply(this,arguments)}function Yv(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function En(e){var t=e.children,n=e.id,r=e.from,a=e.to,i=e.x1,s=e.y1,o=e.x2,u=e.y2,l=e.fromOffset,c=l===void 0?"0%":l,f=e.fromOpacity,h=f===void 0?1:f,p=e.toOffset,d=p===void 0?"100%":p,m=e.toOpacity,b=m===void 0?1:m,g=e.rotate,x=e.transform,_=e.vertical,M=_===void 0?!0:_,y=Yv(e,qv),S=i,T=o,E=s,k=u;return M&&!S&&!T&&!E&&!k&&(S="0",T="0",E="0",k="1"),v.createElement("defs",null,v.createElement("linearGradient",za({id:n,x1:S,y1:E,x2:T,y2:k,gradientTransform:g?"rotate("+g+")":x},y),!!t&&t,!t&&v.createElement("stop",{offset:c,stopColor:r,stopOpacity:h}),!t&&v.createElement("stop",{offset:d,stopColor:a,stopOpacity:b})))}En.propTypes={id:w.string.isRequired,from:w.string,to:w.string,x1:w.oneOfType([w.string,w.number]),x2:w.oneOfType([w.string,w.number]),y1:w.oneOfType([w.string,w.number]),y2:w.oneOfType([w.string,w.number]),fromOffset:w.oneOfType([w.string,w.number]),fromOpacity:w.oneOfType([w.string,w.number]),toOffset:w.oneOfType([w.string,w.number]),toOpacity:w.oneOfType([w.string,w.number]),rotate:w.oneOfType([w.string,w.number]),transform:w.string,children:w.node,vertical:w.bool};var Vv=Ic;function Ic(e,t,n){e instanceof RegExp&&(e=Rc(e,n)),t instanceof RegExp&&(t=Rc(t,n));var r=Wc(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function Rc(e,t){var n=t.match(e);return n?n[0]:null}Ic.range=Wc;function Wc(e,t,n){var r,a,i,s,o,u=n.indexOf(e),l=n.indexOf(t,u+1),c=u;if(u>=0&&l>0){for(r=[],i=n.length;c>=0&&!o;)c==u?(r.push(c),u=n.indexOf(e,c+1)):r.length==1?o=[r.pop(),l]:(a=r.pop(),a<i&&(i=a,s=l),l=n.indexOf(t,c+1)),c=u<l&&u>=0?u:l;r.length&&(o=[i,s])}return o}var Gv=Hc;function Hc(e,t,n){e instanceof RegExp&&(e=Bc(e,n)),t instanceof RegExp&&(t=Bc(t,n));var r=Uc(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function Bc(e,t){var n=t.match(e);return n?n[0]:null}Hc.range=Uc;function Uc(e,t,n){var r,a,i,s,o,u=n.indexOf(e),l=n.indexOf(t,u+1),c=u;if(u>=0&&l>0){if(e===t)return[u,l];for(r=[],i=n.length;c>=0&&!o;)c==u?(r.push(c),u=n.indexOf(e,c+1)):r.length==1?o=[r.pop(),l]:(a=r.pop(),a<i&&(i=a,s=l),l=n.indexOf(t,c+1)),c=u<l&&u>=0?u:l;r.length&&(o=[i,s])}return o}var Kv=Gv,Xv=qc;function qc(e,t,n){var r=e;return Zv(e,t).reduce(function(a,i){return a.replace(i.functionIdentifier+"("+i.matches.body+")",Qv(i.matches.body,i.functionIdentifier,n,r,t))},e)}function Zv(e,t){var n=[],r=typeof t=="string"?new RegExp("\\b("+t+")\\("):t;do{var a=r.exec(e);if(!a)return n;if(a[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+t);var i=a[1],s=a.index,o=Kv("(",")",e.substring(s));if(!o||o.start!==a[0].length-1)throw new SyntaxError(i+"(): missing closing ')' in the value '"+e+"'");n.push({matches:o,functionIdentifier:i}),e=o.post}while(r.test(e));return n}function Qv(e,t,n,r,a){return n(qc(e,a,n),t,r)}var xe=function(e){this.value=e};xe.math={isDegree:!0,acos:function(e){return xe.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return xe.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return xe.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,t){var n=1,r=e-t,a=t;a<r&&(a=r,r=t);for(var i=a+1;i<=e;i++)n*=i;return n/xe.math.fact(r)},changeSign:function(e){return-e},cos:function(e){return xe.math.isDegree&&(e=xe.math.toRadian(e)),Math.cos(e)},cosh:function(e){return(Math.pow(Math.E,e)+Math.pow(Math.E,-1*e))/2},div:function(e,t){return e/t},fact:function(e){if(e%1!==0)return"NaN";for(var t=1,n=2;n<=e;n++)t*=n;return t},inverse:function(e){return 1/e},log:function(e){return Math.log(e)/Math.log(10)},mod:function(e,t){return e%t},mul:function(e,t){return e*t},P:function(e,t){for(var n=1,r=Math.floor(e)-Math.floor(t)+1;r<=Math.floor(e);r++)n*=r;return n},Pi:function(e,t,n){for(var r=1,a=e;a<=t;a++)r*=Number(n.postfixEval({n:a}));return r},pow10x:function(e){for(var t=1;e--;)t*=10;return t},sigma:function(e,t,n){for(var r=0,a=e;a<=t;a++)r+=Number(n.postfixEval({n:a}));return r},sin:function(e){return xe.math.isDegree&&(e=xe.math.toRadian(e)),Math.sin(e)},sinh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-1*e))/2},sub:function(e,t){return e-t},tan:function(e){return xe.math.isDegree&&(e=xe.math.toRadian(e)),Math.tan(e)},tanh:function(e){return xe.sinha(e)/xe.cosha(e)},toRadian:function(e){return e*Math.PI/180},and:function(e,t){return e&t}},xe.Exception=function(e){this.message=e};var Jv=xe,V=Jv;function _e(e,t){for(var n=0;n<e.length;n++)e[n]+=t;return e}for(var lt=[{token:"sin",show:"sin",type:0,value:V.math.sin},{token:"cos",show:"cos",type:0,value:V.math.cos},{token:"tan",show:"tan",type:0,value:V.math.tan},{token:"pi",show:"&pi;",type:3,value:"PI"},{token:"(",show:"(",type:4,value:"("},{token:")",show:")",type:5,value:")"},{token:"P",show:"P",type:10,value:V.math.P},{token:"C",show:"C",type:10,value:V.math.C},{token:" ",show:" ",type:14,value:" ".anchor},{token:"asin",show:"asin",type:0,value:V.math.asin},{token:"acos",show:"acos",type:0,value:V.math.acos},{token:"atan",show:"atan",type:0,value:V.math.atan},{token:"7",show:"7",type:1,value:"7"},{token:"8",show:"8",type:1,value:"8"},{token:"9",show:"9",type:1,value:"9"},{token:"int",show:"Int",type:0,value:Math.floor},{token:"cosh",show:"cosh",type:0,value:V.math.cosh},{token:"acosh",show:"acosh",type:0,value:V.math.acosh},{token:"ln",show:" ln",type:0,value:Math.log},{token:"^",show:"^",type:10,value:Math.pow},{token:"root",show:"root",type:0,value:Math.sqrt},{token:"4",show:"4",type:1,value:"4"},{token:"5",show:"5",type:1,value:"5"},{token:"6",show:"6",type:1,value:"6"},{token:"/",show:"&divide;",type:2,value:V.math.div},{token:"!",show:"!",type:7,value:V.math.fact},{token:"tanh",show:"tanh",type:0,value:V.math.tanh},{token:"atanh",show:"atanh",type:0,value:V.math.atanh},{token:"Mod",show:" Mod ",type:2,value:V.math.mod},{token:"1",show:"1",type:1,value:"1"},{token:"2",show:"2",type:1,value:"2"},{token:"3",show:"3",type:1,value:"3"},{token:"*",show:"&times;",type:2,value:V.math.mul},{token:"sinh",show:"sinh",type:0,value:V.math.sinh},{token:"asinh",show:"asinh",type:0,value:V.math.asinh},{token:"e",show:"e",type:3,value:"E"},{token:"log",show:" log",type:0,value:V.math.log},{token:"0",show:"0",type:1,value:"0"},{token:".",show:".",type:6,value:"."},{token:"+",show:"+",type:9,value:V.math.add},{token:"-",show:"-",type:9,value:V.math.sub},{token:",",show:",",type:11,value:","},{token:"Sigma",show:"&Sigma;",type:12,value:V.math.sigma},{token:"n",show:"n",type:13,value:"n"},{token:"Pi",show:"&Pi;",type:12,value:V.math.Pi},{token:"pow",show:"pow",type:8,value:Math.pow,numberOfArguments:2},{token:"&",show:"&",type:9,value:V.math.and}],Fa={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0,14:-1,15:11},Nr=0;Nr<lt.length;Nr++)lt[Nr].precedence=Fa[lt[Nr].type];var He={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0,14:!0,15:!0},Yt={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,15:!0},ey={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0,15:!0},ze={},Cn={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0,15:!0},ty={1:!0},we=[[],["1","2","3","7","8","9","4","5","6","+","-","*","/","(",")","^","!","P","C","e","0",".",",","n"," ","&"],["pi","ln","Pi"],["sin","cos","tan","Del","int","Mod","log","pow"],["asin","acos","atan","cosh","root","tanh","sinh"],["acosh","atanh","asinh","Sigma"]];function ny(e,t,n,r){for(var a=0;a<r;a++)if(e[n+a]!==t[a])return!1;return!0}V.tokenTypes={FUNCTION_WITH_ONE_ARG:0,NUMBER:1,BINARY_OPERATOR_HIGH_PRECENDENCE:2,CONSTANT:3,OPENING_PARENTHESIS:4,CLOSING_PARENTHESIS:5,DECIMAL:6,POSTFIX_FUNCTION_WITH_ONE_ARG:7,FUNCTION_WITH_N_ARGS:8,BINARY_OPERATOR_LOW_PRECENDENCE:9,BINARY_OPERATOR_PERMUTATION:10,COMMA:11,EVALUATED_FUNCTION:12,EVALUATED_FUNCTION_PARAMETER:13,SPACE:14},V.addToken=function(e){for(var t=0;t<e.length;t++){var n=e[t].token.length,r=-1;e[t].type===V.tokenTypes.FUNCTION_WITH_N_ARGS&&e[t].numberOfArguments===void 0&&(e[t].numberOfArguments=2),we[n]=we[n]||[];for(var a=0;a<we[n].length;a++)if(e[t].token===we[n][a]){r=Yc(we[n][a],lt);break}r===-1?(lt.push(e[t]),e[t].precedence=Fa[e[t].type],we.length<=e[t].token.length&&(we[e[t].token.length]=[]),we[e[t].token.length].push(e[t].token)):(lt[r]=e[t],e[t].precedence=Fa[e[t].type])}};function Yc(e,t){for(var n=0;n<t.length;n++)if(t[n].token===e)return n;return-1}function ry(e){for(var t=[],n=e.length,r,a,i,s=0;s<n;s++)if(!(s<n-1&&e[s]===" "&&e[s+1]===" ")){for(r="",a=e.length-s>we.length-2?we.length-1:e.length-s;a>0;a--)if(we[a]!==void 0)for(i=0;i<we[a].length;i++)ny(e,we[a][i],s,a)&&(r=we[a][i],i=we[a].length,a=0);if(s+=r.length-1,r==="")throw new V.Exception("Can't understand after "+e.slice(s));t.push(lt[Yc(r,lt)])}return t}var iy={value:V.math.changeSign,type:0,pre:21,show:"-"},Lr={value:")",show:")",type:5,pre:0},Pn={value:"(",type:4,pre:0,show:"("};V.lex=function(e,t){var n=[Pn],r=[],a=e,i=He,s=0,o=ze,u="",l;typeof t<"u"&&V.addToken(t);var c={},f=ry(a);for(l=0;l<f.length;l++){var h=f[l];if(h.type===14){if(l>0&&l<f.length-1&&f[l+1].type===1&&(f[l-1].type===1||f[l-1].type===6))throw new V.Exception("Unexpected Space");continue}var p=h.token,d=h.type,m=h.value,b=h.precedence,g=h.show,x=n[n.length-1],_;for(_=r.length;_--&&r[_]===0;)if([0,2,3,4,5,9,11,12,13].indexOf(d)!==-1){if(i[d]!==!0)throw new V.Exception(p+" is not allowed after "+u);n.push(Lr),i=Yt,o=Cn,r.pop()}if(i[d]!==!0)throw new V.Exception(p+" is not allowed after "+u);if(o[d]===!0&&(d=2,m=V.math.mul,g="&times;",b=3,l=l-1),c={value:m,type:d,pre:b,show:g,numberOfArguments:h.numberOfArguments},d===0)i=He,o=ze,_e(r,2),n.push(c),f[l+1].type!==4&&(n.push(Pn),r.push(2));else if(d===1)x.type===1?(x.value+=m,_e(r,1)):n.push(c),i=Yt,o=ey;else if(d===2)i=He,o=ze,_e(r,2),n.push(c);else if(d===3)n.push(c),i=Yt,o=Cn;else if(d===4)_e(r,1),s++,i=He,o=ze,n.push(c);else if(d===5){if(!s)throw new V.Exception("Closing parenthesis are more than opening one, wait What!!!");s--,i=Yt,o=Cn,n.push(c),_e(r,1)}else if(d===6){if(x.hasDec)throw new V.Exception("Two decimals are not allowed in one number");x.type!==1&&(x={value:0,type:1,pre:0},n.push(x)),i=ty,_e(r,1),o=ze,x.value+=m,x.hasDec=!0}else d===7&&(i=Yt,o=Cn,_e(r,1),n.push(c));d===8?(i=He,o=ze,_e(r,h.numberOfArguments+2),n.push(c),f[l+1].type!==4&&(n.push(Pn),r.push(h.numberOfArguments+2))):d===9?(x.type===9?x.value===V.math.add?(x.value=m,x.show=g,_e(r,1)):x.value===V.math.sub&&g==="-"&&(x.value=V.math.add,x.show="+",_e(r,1)):x.type!==5&&x.type!==7&&x.type!==1&&x.type!==3&&x.type!==13?p==="-"&&(i=He,o=ze,_e(r,2).push(2),n.push(iy),n.push(Pn)):(n.push(c),_e(r,2)),i=He,o=ze):d===10?(i=He,o=ze,_e(r,2),n.push(c)):d===11?(i=He,o=ze,n.push(c)):d===12?(i=He,o=ze,_e(r,6),n.push(c),f[l+1].type!==4&&(n.push(Pn),r.push(6))):d===13&&(i=Yt,o=Cn,n.push(c)),_e(r,-1),u=p}for(_=r.length;_--;)n.push(Lr);if(i[5]!==!0)throw new V.Exception("complete the expression");for(;s--;)n.push(Lr);return n.push(Lr),new V(n)};var ay=V,Ia=ay;Ia.prototype.toPostfix=function(){for(var e=[],t,n,r,a,i,s=[{value:"(",type:4,pre:0}],o=this.value,u=1;u<o.length;u++)if(o[u].type===1||o[u].type===3||o[u].type===13)o[u].type===1&&(o[u].value=Number(o[u].value)),e.push(o[u]);else if(o[u].type===4)s.push(o[u]);else if(o[u].type===5)for(;(n=s.pop()).type!==4;)e.push(n);else if(o[u].type===11){for(;(n=s.pop()).type!==4;)e.push(n);s.push(n)}else{t=o[u],a=t.pre,i=s[s.length-1],r=i.pre;var l=i.value=="Math.pow"&&t.value=="Math.pow";if(a>r)s.push(t);else{for(;r>=a&&!l||l&&a<r;)n=s.pop(),i=s[s.length-1],e.push(n),r=i.pre,l=t.value=="Math.pow"&&i.value=="Math.pow";s.push(t)}}return new Ia(e)};var oy=Ia,Nn=oy;Nn.prototype.postfixEval=function(e){e=e||{},e.PI=Math.PI,e.E=Math.E;for(var t=[],n,r,a,i=this.value,s=typeof e.n<"u",o=0;o<i.length;o++)if(i[o].type===1)t.push({value:i[o].value,type:1});else if(i[o].type===3)t.push({value:e[i[o].value],type:1});else if(i[o].type===0)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(i[o]):t[t.length-1].value=i[o].value(t[t.length-1].value);else if(i[o].type===7)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(i[o]):t[t.length-1].value=i[o].value(t[t.length-1].value);else if(i[o].type===8){for(var u=[],l=0;l<i[o].numberOfArguments;l++)u.push(t.pop().value);t.push({type:1,value:i[o].value.apply(i[o],u.reverse())})}else i[o].type===10?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r.value=r.concat(n),r.value.push(i[o]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(i[o]),t.push(n)):t.push({type:1,value:i[o].value(r.value,n.value)})):i[o].type===2||i[o].type===9?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(i[o]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(i[o]),t.push(n)):t.push({type:1,value:i[o].value(r.value,n.value)})):i[o].type===12?(n=t.pop(),typeof n.type<"u"&&(n=[n]),r=t.pop(),a=t.pop(),t.push({type:1,value:i[o].value(a.value,r.value,new Nn(n))})):i[o].type===13&&(s?t.push({value:e[i[o].value],type:3}):t.push([i[o]]));if(t.length>1)throw new Nn.Exception("Uncaught Syntax error");return t[0].value>1e15?"Infinity":parseFloat(t[0].value.toFixed(15))},Nn.eval=function(e,t,n){return typeof t>"u"?this.lex(e).toPostfix().postfixEval():typeof n>"u"?typeof t.length<"u"?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t):this.lex(e,t).toPostfix().postfixEval(n)};var sy=Nn,Vc=sy;Vc.prototype.formulaEval=function(){for(var e,t,n,r=[],a=this.value,i=0;i<a.length;i++)a[i].type===1||a[i].type===3?r.push({value:a[i].type===3?a[i].show:a[i].value,type:1}):a[i].type===13?r.push({value:a[i].show,type:1}):a[i].type===0?r[r.length-1]={value:a[i].show+(a[i].show!="-"?"(":"")+r[r.length-1].value+(a[i].show!="-"?")":""),type:0}:a[i].type===7?r[r.length-1]={value:(r[r.length-1].type!=1?"(":"")+r[r.length-1].value+(r[r.length-1].type!=1?")":"")+a[i].show,type:7}:a[i].type===10?(e=r.pop(),t=r.pop(),a[i].show==="P"||a[i].show==="C"?r.push({value:"<sup>"+t.value+"</sup>"+a[i].show+"<sub>"+e.value+"</sub>",type:10}):r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+"<sup>"+e.value+"</sup>",type:1})):a[i].type===2||a[i].type===9?(e=r.pop(),t=r.pop(),r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+a[i].show+(e.type!=1?"(":"")+e.value+(e.type!=1?")":""),type:a[i].type})):a[i].type===12&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:a[i].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value};var uy=Vc,ly=Vv,cy=Xv,fy=uy,hy=100,dy=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,Ra,py=my;function my(e,t){Ra=0,t=Math.pow(10,t===void 0?5:t),e=e.replace(/\n+/g," ");function n(a,i,s){if(Ra++>hy)throw Ra=0,new Error("Call stack overflow for "+s);if(a==="")throw new Error(i+"(): '"+s+"' must contain a non-whitespace string");a=r(a,s);var o=gy(a);if(o.length>1||a.indexOf("var(")>-1)return i+"("+a+")";var u=o[0]||"";u==="%"&&(a=a.replace(/\b[0-9\.]+%/g,function(f){return parseFloat(f.slice(0,-1))*.01}));var l=a.replace(new RegExp(u,"gi"),""),c;try{c=fy.eval(l)}catch{return i+"("+a+")"}return u==="%"&&(c*=100),(i.length||u==="%")&&(c=Math.round(c*t)/t),c+=u,c}function r(a,i){a=a.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var s="",o=a,u;u=dy.exec(o);){u[0].index>0&&(s+=o.substring(0,u[0].index));var l=ly("(",")",o.substring([0].index));if(l.body==="")throw new Error("'"+a+"' must contain a non-whitespace string");var c=n(l.body,"",i);s+=l.pre+c,o=l.post}return s+o}return cy(e,/((?:\-[a-z]+\-)?calc)\(/,n)}function gy(e){for(var t=[],n=[],r=/[\.0-9]([%a-z]+)/gi,a=r.exec(e);a;)!a||!a[1]||(n.indexOf(a[1].toLowerCase())===-1&&(t.push(a[1]),n.push(a[1].toLowerCase())),a=r.exec(e));return t}const Wa=tn(py);var vy=typeof Qn=="object"&&Qn&&Qn.Object===Object&&Qn,yy=vy,by=yy,xy=typeof self=="object"&&self&&self.Object===Object&&self,_y=by||xy||Function("return this")(),Ar=_y,wy=Ar,Sy=wy.Symbol,Gc=Sy,Kc=Gc,Xc=Object.prototype,Ty=Xc.hasOwnProperty,Oy=Xc.toString,Ln=Kc?Kc.toStringTag:void 0;function ky(e){var t=Ty.call(e,Ln),n=e[Ln];try{e[Ln]=void 0;var r=!0}catch{}var a=Oy.call(e);return r&&(t?e[Ln]=n:delete e[Ln]),a}var My=ky,$y=Object.prototype,Ey=$y.toString;function Cy(e){return Ey.call(e)}var Py=Cy,Zc=Gc,Ny=My,Ly=Py,Ay="[object Null]",Dy="[object Undefined]",Qc=Zc?Zc.toStringTag:void 0;function jy(e){return e==null?e===void 0?Dy:Ay:Qc&&Qc in Object(e)?Ny(e):Ly(e)}var Jc=jy;function zy(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Dr=zy,Fy=Jc,Iy=Dr,Ry="[object AsyncFunction]",Wy="[object Function]",Hy="[object GeneratorFunction]",By="[object Proxy]";function Uy(e){if(!Iy(e))return!1;var t=Fy(e);return t==Wy||t==Hy||t==Ry||t==By}var qy=Uy,Yy=Ar,Vy=Yy["__core-js_shared__"],Gy=Vy,Ha=Gy,ef=function(){var e=/[^.]+$/.exec(Ha&&Ha.keys&&Ha.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ky(e){return!!ef&&ef in e}var Xy=Ky,Zy=Function.prototype,Qy=Zy.toString;function Jy(e){if(e!=null){try{return Qy.call(e)}catch{}try{return e+""}catch{}}return""}var e0=Jy,t0=qy,n0=Xy,r0=Dr,i0=e0,a0=/[\\^$.*+?()[\]{}|]/g,o0=/^\[object .+?Constructor\]$/,s0=Function.prototype,u0=Object.prototype,l0=s0.toString,c0=u0.hasOwnProperty,f0=RegExp("^"+l0.call(c0).replace(a0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h0(e){if(!r0(e)||n0(e))return!1;var t=t0(e)?f0:o0;return t.test(i0(e))}var d0=h0;function p0(e,t){return e==null?void 0:e[t]}var m0=p0,g0=d0,v0=m0;function y0(e,t){var n=v0(e,t);return g0(n)?n:void 0}var tf=y0,b0=tf,x0=b0(Object,"create"),jr=x0,nf=jr;function _0(){this.__data__=nf?nf(null):{},this.size=0}var w0=_0;function S0(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var T0=S0,O0=jr,k0="__lodash_hash_undefined__",M0=Object.prototype,$0=M0.hasOwnProperty;function E0(e){var t=this.__data__;if(O0){var n=t[e];return n===k0?void 0:n}return $0.call(t,e)?t[e]:void 0}var C0=E0,P0=jr,N0=Object.prototype,L0=N0.hasOwnProperty;function A0(e){var t=this.__data__;return P0?t[e]!==void 0:L0.call(t,e)}var D0=A0,j0=jr,z0="__lodash_hash_undefined__";function F0(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=j0&&t===void 0?z0:t,this}var I0=F0,R0=w0,W0=T0,H0=C0,B0=D0,U0=I0;function Vt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Vt.prototype.clear=R0,Vt.prototype.delete=W0,Vt.prototype.get=H0,Vt.prototype.has=B0,Vt.prototype.set=U0;var q0=Vt;function Y0(){this.__data__=[],this.size=0}var V0=Y0;function G0(e,t){return e===t||e!==e&&t!==t}var K0=G0,X0=K0;function Z0(e,t){for(var n=e.length;n--;)if(X0(e[n][0],t))return n;return-1}var zr=Z0,Q0=zr,J0=Array.prototype,eb=J0.splice;function tb(e){var t=this.__data__,n=Q0(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():eb.call(t,n,1),--this.size,!0}var nb=tb,rb=zr;function ib(e){var t=this.__data__,n=rb(t,e);return n<0?void 0:t[n][1]}var ab=ib,ob=zr;function sb(e){return ob(this.__data__,e)>-1}var ub=sb,lb=zr;function cb(e,t){var n=this.__data__,r=lb(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var fb=cb,hb=V0,db=nb,pb=ab,mb=ub,gb=fb;function Gt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Gt.prototype.clear=hb,Gt.prototype.delete=db,Gt.prototype.get=pb,Gt.prototype.has=mb,Gt.prototype.set=gb;var vb=Gt,yb=tf,bb=Ar,xb=yb(bb,"Map"),_b=xb,rf=q0,wb=vb,Sb=_b;function Tb(){this.size=0,this.__data__={hash:new rf,map:new(Sb||wb),string:new rf}}var Ob=Tb;function kb(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Mb=kb,$b=Mb;function Eb(e,t){var n=e.__data__;return $b(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Fr=Eb,Cb=Fr;function Pb(e){var t=Cb(this,e).delete(e);return this.size-=t?1:0,t}var Nb=Pb,Lb=Fr;function Ab(e){return Lb(this,e).get(e)}var Db=Ab,jb=Fr;function zb(e){return jb(this,e).has(e)}var Fb=zb,Ib=Fr;function Rb(e,t){var n=Ib(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Wb=Rb,Hb=Ob,Bb=Nb,Ub=Db,qb=Fb,Yb=Wb;function Kt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Kt.prototype.clear=Hb,Kt.prototype.delete=Bb,Kt.prototype.get=Ub,Kt.prototype.has=qb,Kt.prototype.set=Yb;var Vb=Kt,af=Vb,Gb="Expected a function";function Ba(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Gb);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var s=e.apply(this,r);return n.cache=i.set(a,s)||i,s};return n.cache=new(Ba.Cache||af),n}Ba.Cache=af;var Kb=Ba;const Xb=tn(Kb);var of="__react_svg_text_measurement_id";function Zb(e,t){try{var n=document.getElementById(of);if(!n){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("aria-hidden","true"),r.style.width="0",r.style.height="0",r.style.position="absolute",r.style.top="-100%",r.style.left="-100%",n=document.createElementNS("http://www.w3.org/2000/svg","text"),n.setAttribute("id",of),r.appendChild(n),document.body.appendChild(r)}return Object.assign(n.style,t),n.textContent=e,n.getComputedTextLength()}catch{return null}}const sf=Xb(Zb,function(e,t){return e+"_"+JSON.stringify(t)});var Qb=["verticalAnchor","scaleToFit","angle","width","lineHeight","capHeight","children","style"];function Jb(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Ua(e){return typeof e=="number"}function uf(e){return typeof e=="number"&&Number.isFinite(e)||typeof e=="string"}function e1(e){var t=e.verticalAnchor,n=t===void 0?"end":t,r=e.scaleToFit,a=r===void 0?!1:r,i=e.angle,s=e.width,o=e.lineHeight,u=o===void 0?"1em":o,l=e.capHeight,c=l===void 0?"0.71em":l,f=e.children,h=e.style,p=Jb(e,Qb),d=p.x,m=d===void 0?0:d,b=p.y,g=b===void 0?0:b,x=!uf(m)||!uf(g),_=v.useMemo(function(){var k=f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:k.map(function($){return{word:$,wordWidth:sf($,h)||0}}),spaceWidth:sf(" ",h)||0}},[f,h]),M=_.wordsWithWidth,y=_.spaceWidth,S=v.useMemo(function(){return x?[]:s||a?M.reduce(function(k,$){var P=$.word,N=$.wordWidth,A=k[k.length-1];if(A&&(s==null||a||(A.width||0)+N+y<s))A.words.push(P),A.width=A.width||0,A.width+=N+y;else{var R={words:[P],width:N};k.push(R)}return k},[]):[{words:f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/)}]},[x,s,a,f,M,y]),T=v.useMemo(function(){var k=x?"":Wa(n==="start"?"calc("+c+")":n==="middle"?"calc("+(S.length-1)/2+" * -"+u+" + ("+c+" / 2))":"calc("+(S.length-1)+" * -"+u+")");return k},[x,n,c,S.length,u]),E=v.useMemo(function(){var k=[];if(x)return"";if(Ua(m)&&Ua(g)&&Ua(s)&&a&&S.length>0){var $=S[0].width||1,P=a==="shrink-only"?Math.min(s/$,1):s/$,N=P,A=m-P*m,R=g-N*g;k.push("matrix("+P+", 0, 0, "+N+", "+A+", "+R+")")}return i&&k.push("rotate("+i+", "+m+", "+g+")"),k.length>0?k.join(" "):""},[x,m,g,s,a,S,i]);return{wordsByLines:S,startDy:T,transform:E}}var t1=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function qa(){return qa=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},qa.apply(this,arguments)}function n1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var r1={overflow:"visible"};function lf(e){var t=e.dx,n=t===void 0?0:t,r=e.dy,a=r===void 0?0:r,i=e.textAnchor,s=i===void 0?"start":i,o=e.innerRef,u=e.innerTextRef;e.verticalAnchor,e.angle;var l=e.lineHeight,c=l===void 0?"1em":l;e.scaleToFit,e.capHeight,e.width;var f=n1(e,t1),h=f.x,p=h===void 0?0:h,d=f.fontSize,m=e1(e),b=m.wordsByLines,g=m.startDy,x=m.transform;return v.createElement("svg",{ref:o,x:n,y:a,fontSize:d,style:r1},b.length>0?v.createElement("text",qa({ref:u,transform:x},f,{textAnchor:s}),b.map(function(_,M){return v.createElement("tspan",{key:M,x:p,dy:M===0?g:c},_.words.join(" "))})):null)}var ke={top:"top",left:"left",bottom:"bottom"};function i1(e){var t=e.labelOffset,n=e.labelProps,r=e.orientation,a=e.range,i=e.tickLabelFontSize,s=e.tickLength,o=r===ke.left||r===ke.top?-1:1,u,l,c;if(r===ke.top||r===ke.bottom){var f=r===ke.bottom&&typeof n.fontSize=="number"?n.fontSize:0;u=(Number(a[0])+Number(a[a.length-1]))/2,l=o*(s+t+i+f)}else u=o*((Number(a[0])+Number(a[a.length-1]))/2),l=-(s+t),c="rotate("+o*90+")";return{x:u,y:l,transform:c}}function An(){return An=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},An.apply(this,arguments)}function a1(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,a=e.tickClassName,i=e.tickComponent,s=e.tickLabelProps,o=e.tickStroke,u=o===void 0?"#222":o,l=e.tickTransform,c=e.ticks,f=e.strokeWidth,h=e.tickLineProps;return c.map(function(p){var d,m=p.value,b=p.index,g=p.from,x=p.to,_=p.formattedValue,M=(d=s[b])!=null?d:{},y=Math.max(10,typeof M.fontSize=="number"&&M.fontSize||0),S=x.y+(n&&r!==ke.top?y:0);return v.createElement(Ge,{key:"visx-tick-"+m+"-"+b,className:me("visx-axis-tick",a),transform:l},!t&&v.createElement(su,An({from:g,to:x,stroke:u,strokeWidth:f,strokeLinecap:"square"},h)),i?i(An({},M,{x:x.x,y:S,formattedValue:_})):v.createElement(lf,An({x:x.x,y:S},M),_))})}function Dn(){return Dn=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},Dn.apply(this,arguments)}var cf={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function o1(e){var t=e.axisFromPoint,n=e.axisLineClassName,r=e.axisToPoint,a=e.hideAxisLine,i=e.hideTicks,s=e.horizontal,o=e.label,u=o===void 0?"":o,l=e.labelClassName,c=e.labelOffset,f=c===void 0?14:c,h=e.labelProps,p=e.orientation,d=p===void 0?ke.bottom:p,m=e.scale,b=e.stroke,g=b===void 0?"#222":b,x=e.strokeDasharray,_=e.strokeWidth,M=_===void 0?1:_,y=e.tickClassName,S=e.tickComponent,T=e.tickLineProps,E=e.tickLabelProps,k=e.tickLength,$=k===void 0?8:k,P=e.tickStroke,N=P===void 0?"#222":P,A=e.tickTransform,R=e.ticks,X=e.ticksComponent,U=X===void 0?a1:X,Z=Dn({},cf,h),ee=Dn({},cf,typeof E=="object"?E:null),K=R.map(function(D){var H=D.value,W=D.index;return typeof E=="function"?E(H,W,R):ee}),C=Math.max.apply(Math,[10].concat(K.map(function(D){return typeof D.fontSize=="number"?D.fontSize:0})));return v.createElement(v.Fragment,null,U({hideTicks:i,horizontal:s,orientation:d,scale:m,tickClassName:y,tickComponent:S,tickLabelProps:K,tickStroke:N,tickTransform:A,ticks:R,strokeWidth:M,tickLineProps:T}),!a&&v.createElement(su,{className:me("visx-axis-line",n),from:t,to:r,stroke:g,strokeWidth:M,strokeDasharray:x}),u&&v.createElement(lf,Dn({className:me("visx-axis-label",l)},i1({labelOffset:f,labelProps:Z,orientation:d,range:m.range(),tickLabelFontSize:C,tickLength:$}),Z),u))}function s1(e,t){t===void 0&&(t="center");var n=e;if(t!=="start"&&"bandwidth"in n){var r=n.bandwidth();return t==="center"&&(r/=2),n.round()&&(r=Math.round(r)),function(a){var i=n(a);return typeof i=="number"?i+r:i}}return e}function u1(e){var t=e;return"tickFormat"in t?t.tickFormat():Fc}var Be=function(){function e(n){var r=n.x,a=r===void 0?0:r,i=n.y,s=i===void 0?0:i;this.x=0,this.y=0,this.x=a,this.y=s}var t=e.prototype;return t.value=function(){return{x:this.x,y:this.y}},t.toArray=function(){return[this.x,this.y]},e}();function l1(e,t){return new Be({x:e.x+t.x,y:e.y+t.y})}function c1(e,t){return new Be({x:e.x-t.x,y:e.y-t.y})}const f1=Object.freeze(Object.defineProperty({__proto__:null,Point:Be,subtractPoints:c1,sumPoints:l1},Symbol.toStringTag,{value:"Module"}));function Ir(e,t){var n=e.x,r=e.y;return new Be(t?{x:n,y:r}:{x:r,y:n})}function Ya(){return Ya=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},Ya.apply(this,arguments)}var Va=0;function h1(e){return e===void 0&&(e=Va),typeof e=="number"?{start:e,end:e}:Ya({start:Va,end:Va},e)}var d1=["children","axisClassName","hideAxisLine","hideTicks","hideZero","innerRef","left","numTicks","orientation","rangePadding","scale","tickFormat","tickLength","tickValues","top"];function Ga(){return Ga=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},Ga.apply(this,arguments)}function p1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Ka(e){var t=e.children,n=t===void 0?o1:t,r=e.axisClassName,a=e.hideAxisLine,i=a===void 0?!1:a,s=e.hideTicks,o=s===void 0?!1:s,u=e.hideZero,l=u===void 0?!1:u,c=e.innerRef,f=e.left,h=f===void 0?0:f,p=e.numTicks,d=p===void 0?10:p,m=e.orientation,b=m===void 0?ke.bottom:m,g=e.rangePadding,x=g===void 0?0:g,_=e.scale,M=e.tickFormat,y=e.tickLength,S=y===void 0?8:y,T=e.tickValues,E=e.top,k=E===void 0?0:E,$=p1(e,d1),P=M??u1(_),N=b===ke.left,A=b===ke.top,R=A||b===ke.bottom,X=s1(_),U=N||A?-1:1,Z=_.range(),ee=h1(x),K=Ir({x:Number(Z[0])+.5-ee.start,y:0},R),C=Ir({x:Number(Z[Z.length-1])+.5+ee.end,y:0},R),D=(T??Pr(_,d)).filter(function(W){return!l||W!==0&&W!=="0"}).map(function(W,F){return{value:W,index:F}}),H=D.map(function(W){var F=W.value,I=W.index,q=Cr(X(F));return{value:F,index:I,from:Ir({x:q,y:0},R),to:Ir({x:q,y:S*U},R),formattedValue:P(F,I,D)}});return v.createElement(Ge,{className:me("visx-axis",r),innerRef:c,top:k,left:h},n(Ga({},$,{axisFromPoint:K,axisToPoint:C,hideAxisLine:i,hideTicks:o,hideZero:l,horizontal:R,numTicks:d,orientation:b,rangePadding:x,scale:_,tickFormat:P,tickLength:S,tickPosition:X,tickSign:U,ticks:H})))}var m1=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Rr(){return Rr=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},Rr.apply(this,arguments)}function g1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var v1={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function ff(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?36:n,a=e.tickLength,i=a===void 0?8:a,s=e.tickLabelProps,o=g1(e,m1),u=typeof s=="function"?s:Rr({},v1,s);return v.createElement(Ka,Rr({axisClassName:me("visx-axis-left",t),labelOffset:r,orientation:ke.left,tickLabelProps:u,tickLength:i},o))}var y1=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Wr(){return Wr=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},Wr.apply(this,arguments)}function b1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var x1={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function Xa(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?8:n,a=e.tickLength,i=a===void 0?8:a,s=e.tickLabelProps,o=b1(e,y1),u=typeof s=="function"?s:Wr({},x1,s);return v.createElement(Ka,Wr({axisClassName:me("visx-axis-bottom",t),labelOffset:r,orientation:ke.bottom,tickLabelProps:u,tickLength:i},o))}var Hr={};Hr.__esModule=!0;var hf=Hr.default=O1,_1=df(v),w1=df(nn),S1=["from","to","fill","className","innerRef"];function df(e){return e&&e.__esModule?e:{default:e}}function Za(){return Za=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},Za.apply(this,arguments)}function T1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function O1(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,a=r===void 0?{x:1,y:1}:r,i=e.fill,s=i===void 0?"transparent":i,o=e.className,u=e.innerRef,l=T1(e,S1),c=n.x===a.x||n.y===a.y;return _1.default.createElement("line",Za({ref:u,className:(0,w1.default)("visx-line",o),x1:n.x,y1:n.y,x2:a.x,y2:a.y,fill:s,shapeRendering:c?"crispEdges":"auto"},l))}function pf(e){return"bandwidth"in e?e.bandwidth():0}var k1=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function Qa(){return Qa=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},Qa.apply(this,arguments)}function M1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function mf(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.width,o=e.stroke,u=o===void 0?"#eaf0f6":o,l=e.strokeWidth,c=l===void 0?1:l,f=e.strokeDasharray,h=e.className,p=e.children,d=e.numTicks,m=d===void 0?10:d,b=e.lineStyle,g=e.offset,x=e.tickValues,_=M1(e,k1),M=x??Pr(i,m),y=(g??0)+pf(i)/2,S=M.map(function(T,E){var k,$=((k=Cr(i(T)))!=null?k:0)+y;return{index:E,from:new Be({x:0,y:$}),to:new Be({x:s,y:$})}});return v.createElement(Ge,{className:me("visx-rows",h),top:n,left:a},p?p({lines:S}):S.map(function(T){var E=T.from,k=T.to,$=T.index;return v.createElement(hf,Qa({key:"row-line-"+$,from:E,to:k,stroke:u,strokeWidth:c,strokeDasharray:f,style:b},_))}))}mf.propTypes={tickValues:w.array,width:w.number.isRequired};var $1=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function Ja(){return Ja=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},Ja.apply(this,arguments)}function E1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function gf(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.height,o=e.stroke,u=o===void 0?"#eaf0f6":o,l=e.strokeWidth,c=l===void 0?1:l,f=e.strokeDasharray,h=e.className,p=e.numTicks,d=p===void 0?10:p,m=e.lineStyle,b=e.offset,g=e.tickValues,x=e.children,_=E1(e,$1),M=g??Pr(i,d),y=(b??0)+pf(i)/2,S=M.map(function(T,E){var k,$=((k=Cr(i(T)))!=null?k:0)+y;return{index:E,from:new Be({x:$,y:0}),to:new Be({x:$,y:s})}});return v.createElement(Ge,{className:me("visx-columns",h),top:n,left:a},x?x({lines:S}):S.map(function(T){var E=T.from,k=T.to,$=T.index;return v.createElement(hf,Ja({key:"column-line-"+$,from:E,to:k,stroke:u,strokeWidth:c,strokeDasharray:f,style:m},_))}))}gf.propTypes={tickValues:w.array,height:w.number.isRequired};var ct={};const eo=pt(Jd);var to={};to.__esModule=!0,to.default=C1;function C1(e,t){e(t)}var Pt={};Pt.__esModule=!0,Pt.STACK_ORDER_NAMES=Pt.STACK_ORDERS=void 0,Pt.default=N1;var jn=eo,Br={ascending:jn.stackOrderAscending,descending:jn.stackOrderDescending,insideout:jn.stackOrderInsideOut,none:jn.stackOrderNone,reverse:jn.stackOrderReverse};Pt.STACK_ORDERS=Br;var P1=Object.keys(Br);Pt.STACK_ORDER_NAMES=P1;function N1(e){return e&&Br[e]||Br.none}var Nt={};Nt.__esModule=!0,Nt.STACK_OFFSET_NAMES=Nt.STACK_OFFSETS=void 0,Nt.default=A1;var zn=eo,Ur={expand:zn.stackOffsetExpand,diverging:zn.stackOffsetDiverging,none:zn.stackOffsetNone,silhouette:zn.stackOffsetSilhouette,wiggle:zn.stackOffsetWiggle};Nt.STACK_OFFSETS=Ur;var L1=Object.keys(Ur);Nt.STACK_OFFSET_NAMES=L1;function A1(e){return e&&Ur[e]||Ur.none}ct.__esModule=!0,ct.arc=z1,ct.area=F1,ct.line=I1,ct.pie=R1,ct.radialLine=W1,ct.stack=H1;var Xt=eo,oe=no(to),D1=no(Pt),j1=no(Nt);function no(e){return e&&e.__esModule?e:{default:e}}function z1(e){var t=e===void 0?{}:e,n=t.innerRadius,r=t.outerRadius,a=t.cornerRadius,i=t.startAngle,s=t.endAngle,o=t.padAngle,u=t.padRadius,l=(0,Xt.arc)();return n!=null&&(0,oe.default)(l.innerRadius,n),r!=null&&(0,oe.default)(l.outerRadius,r),a!=null&&(0,oe.default)(l.cornerRadius,a),i!=null&&(0,oe.default)(l.startAngle,i),s!=null&&(0,oe.default)(l.endAngle,s),o!=null&&(0,oe.default)(l.padAngle,o),u!=null&&(0,oe.default)(l.padRadius,u),l}function F1(e){var t=e===void 0?{}:e,n=t.x,r=t.x0,a=t.x1,i=t.y,s=t.y0,o=t.y1,u=t.defined,l=t.curve,c=(0,Xt.area)();return n&&(0,oe.default)(c.x,n),r&&(0,oe.default)(c.x0,r),a&&(0,oe.default)(c.x1,a),i&&(0,oe.default)(c.y,i),s&&(0,oe.default)(c.y0,s),o&&(0,oe.default)(c.y1,o),u&&c.defined(u),l&&c.curve(l),c}function I1(e){var t=e===void 0?{}:e,n=t.x,r=t.y,a=t.defined,i=t.curve,s=(0,Xt.line)();return n&&(0,oe.default)(s.x,n),r&&(0,oe.default)(s.y,r),a&&s.defined(a),i&&s.curve(i),s}function R1(e){var t=e===void 0?{}:e,n=t.startAngle,r=t.endAngle,a=t.padAngle,i=t.value,s=t.sort,o=t.sortValues,u=(0,Xt.pie)();return(s===null||s!=null)&&u.sort(s),(o===null||o!=null)&&u.sortValues(o),i!=null&&u.value(i),a!=null&&(0,oe.default)(u.padAngle,a),n!=null&&(0,oe.default)(u.startAngle,n),r!=null&&(0,oe.default)(u.endAngle,r),u}function W1(e){var t=e===void 0?{}:e,n=t.angle,r=t.radius,a=t.defined,i=t.curve,s=(0,Xt.radialLine)();return n&&(0,oe.default)(s.angle,n),r&&(0,oe.default)(s.radius,r),a&&s.defined(a),i&&s.curve(i),s}function H1(e){var t=e.keys,n=e.value,r=e.order,a=e.offset,i=(0,Xt.stack)();return t&&i.keys(t),n&&(0,oe.default)(i.value,n),r&&i.order((0,D1.default)(r)),a&&i.offset((0,j1.default)(a)),i}let Fn=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const B1={barFillColor1:"string",barFillColor2:"string",barFillColorHover:"string",chartData:"ChartDataObject[]",chartHeight:"number",chartWidth:"number",barSize:"number",yAxis:"ChartAxis",xAxis:"ChartAxis",yMaxValue:"number",yTickFormat:"(i: number) => string"};function ro(e){const{barFillColor1:t=pe.colors.blue200,barFillColor2:n="#007DB880",barFillColorHover:r=pe.colors.blue300,chartData:a=[],chartHeight:i=0,chartWidth:s=0,barSize:o,yAxis:u={tickValues:"value",tickCount:3},xAxis:l={tickValues:"label"},yMaxValue:c,yTickFormat:f}=e,h={top:30,bottom:70,left:50,right:30},p=s-h.left-h.right,d=i-h.top-h.bottom,m=T=>T[l.tickValues],b=T=>T[u.tickValues],g=Mn({range:[0,p],round:!0,domain:a.map(m),padding:.4}),x=qt({range:[d,0],round:!0,domain:[0,c||Math.max(...a.map(b))]}),_=(T,E)=>k=>T(E(k)),M=_(g,m),y=_(x,b),S=Fn();return j.createElement("svg",{width:s,height:i,className:"sps-chart-wrapper"},j.createElement(mf,{scale:x,left:h.left,width:p,numTicks:u.tickCount,stroke:pe.colors.gray400,strokeOpacity:.2}),j.createElement(En,{id:S,from:t,to:n}),a.map((T,E)=>{const k=d-y(T),$=Fn();return j.createElement(rn,{key:E},j.createElement(uu,{id:$,top:!0,radius:4,x:M(T)+h.left+(o?(g.bandwidth()-o)/2:0),y:d-k,height:k,width:o||g.bandwidth(),fill:`url(#${S})`,onMouseEnter:P=>{const N=P.target;N.style.fill=r},onMouseLeave:P=>{const N=P.target;N.style.fill=""}}),j.createElement(ff,{scale:x,left:h.left,hideTicks:!0,numTicks:u.tickCount,tickFormat:f||void 0,stroke:pe.colors.gray300,tickLabelProps:()=>({textAnchor:"end",fontSize:"12px",fill:pe.colors.gray400,fontWeight:"200"})}),j.createElement(Xa,{top:d,scale:g,left:h.left,hideTicks:!0,hideAxisLine:!0,stroke:pe.colors.gray300,tickLabelProps:()=>({textAnchor:"middle",fontSize:"12px",fontWeight:"200",fill:pe.colors.gray400,width:g.bandwidth()+g.bandwidth()/2,lineHeight:"15px",verticalAnchor:"start"})}),j.createElement(en.SpsTooltip,{for:$},T.label))}))}Object.assign(ro,{props:B1,displayName:"SpsBarChart"});const vf={general:{label:"General Usage",description:({NavigateTo:e,Link:t})=>j.createElement(j.Fragment,null,j.createElement("p",null,"Use Bar Charts to visualize the comparison of a dataset across multiple categories or subjects. When using bar charts, the dataset should attempt to provide a clear answer to a clear question (i.e. avoid comparing multiple or unrelated datasets in a single chart)."),j.createElement("p",null,"Bar Charts should not be used when the visualization of the data is too complex or the number of categories too numerous to be easily understood at a glance. In these cases consider the use of more general lists of content such as a"," ",j.createElement(e,{to:"Tables"},"Table"),"."),j.createElement("h5",null,"Color"),j.createElement("p",null,"The number of colors used should be directly related to the number of comparisons being made. When comparing categories across a single data set, only one color should be used. When comparing multiple categories across multiple series of data, use the appropriate number of colors to the number of categories. For more details on color usage visit the"," ",j.createElement(t,{to:"/style-and-layout/colors"},"Colors")," section."),j.createElement("h5",null,"Interaction"),j.createElement("p",null,"Charts should include interactivity on hover to give users insight to specifics of the data. Tooltips can be used to display expanded definitions or additional related data points for the selected category."))},horizontal:{label:"Horizontal Bar Charts",description:tt.code`
34
34
  <p>In Horizontal Bar Charts categories are listed vertically on the Y-axis and with data points are plotted horizontally on the X-axis.</p>
35
35
  `,examples:{vertical:{react:tt.code`
36
36
  import { SpsHorizontalBarChart } from "@spscommerce/ds-react-charts";
@@ -108,7 +108,7 @@ z`).split(`
108
108
  />
109
109
  )
110
110
  }
111
- `}}}},Y1={barFillColor1:"string",barFillColor2:"string",barFillColorHover:"string",chartData:"ChartDataObject[]",chartHeight:"number",chartWidth:"number",barSize:"number",yAxis:"ChartAxis",xAxis:"ChartAxis",marginLeft:"number",xMaxValue:"number",xTickFormat:"(i: number) => string"};function io(e){const{barFillColor1:t=pe.colors.blue200,barFillColor2:n="#007DB880",barFillColorHover:r=pe.colors.blue300,chartData:a=[],chartHeight:i=0,chartWidth:s=0,barSize:o,yAxis:l={tickValues:"label"},xAxis:u={tickValues:"value",tickCount:3},marginLeft:c=30,xMaxValue:f,xTickFormat:h}=e,p={top:30,bottom:30,left:c,right:30},d=s-p.left-p.right,v=i-p.top-p.bottom,x=k=>k[u.tickValues],g=k=>k[l.tickValues],b=Mn({range:[0,v],round:!0,domain:a.map(g),padding:.4}),_=Yt({range:[0,d],round:!0,domain:[0,f||Math.max(...a.map(x))]}),M=(k,C)=>P=>k(C(P)),y=M(_,x),S=M(b,g),T=Fn(),$=Fn();return z.createElement("svg",{width:s,height:i,className:"sps-chart-wrapper"},z.createElement(gf,{scale:_,left:p.left,height:v,stroke:pe.colors.gray400,strokeOpacity:.2}),z.createElement(Cn,{id:$,from:"#D2D4D580",to:"#D2D4D5",vertical:!1}),z.createElement(Cn,{id:T,from:n,to:t,vertical:!1}),a.map((k,C)=>{const P=y(k),N=Fn();return z.createElement(rn,{key:C},z.createElement("rect",{x:p.left,y:S(k)+(o?(b.bandwidth()-o)/2:0),height:o||b.bandwidth(),width:d,fill:`url(#${$})`}),z.createElement(ul,{id:N,right:!0,radius:4,x:p.left,y:S(k)+(o?(b.bandwidth()-o)/2:0),height:o||b.bandwidth(),width:P,fill:`url(#${T})`,onMouseEnter:A=>{const R=A.target;R.style.fill=r},onMouseLeave:A=>{const R=A.target;R.style.fill=""}}),z.createElement(hf,{scale:b,left:p.left,hideTicks:!0,hideAxisLine:!0,stroke:pe.colors.gray300,tickLabelProps:()=>({textAnchor:"end",fontSize:"12px",fill:pe.colors.gray400,fontWeight:"200",width:p.left,verticalAnchor:"middle"})}),z.createElement(Xa,{top:v,scale:_,left:p.left,hideTicks:!0,numTicks:u.tickCount,tickFormat:h||void 0,stroke:pe.colors.gray300,tickLabelProps:()=>({textAnchor:"middle",fontSize:"12px",fontWeight:"200",fill:pe.colors.gray400})}),z.createElement(tn.SpsTooltip,{for:N},k.label))}))}Object.assign(io,{props:Y1,displayName:"SpsHorizontalBarChart"});function bf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=bf(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function xf(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=bf(e))&&(r&&(r+=" "),r+=t);return r}var V1=["flexDirection","alignItems","margin","display","children"];function ao(){return ao=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},ao.apply(this,arguments)}function G1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function _f(e){var t=e.flexDirection,n=t===void 0?"row":t,r=e.alignItems,a=r===void 0?"center":r,i=e.margin,s=i===void 0?"0":i,o=e.display,l=o===void 0?"flex":o,u=e.children,c=G1(e,V1);return m.createElement("div",ao({className:"visx-legend-item",style:{display:l,alignItems:a,flexDirection:n,margin:s}},c),u)}_f.propTypes={alignItems:w.string,margin:w.oneOfType([w.string,w.number]),children:w.node,display:w.string};var K1=["flex","label","margin","align","children"];function oo(){return oo=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},oo.apply(this,arguments)}function X1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function wf(e){var t=e.flex,n=t===void 0?"1":t,r=e.label,a=e.margin,i=a===void 0?"5px 0":a,s=e.align,o=s===void 0?"left":s,l=e.children,u=X1(e,K1);return m.createElement("div",oo({className:"visx-legend-label",style:{justifyContent:o,display:"flex",flex:n,margin:i}},u),l||r)}wf.propTypes={align:w.string,label:w.node,flex:w.oneOfType([w.string,w.number]),margin:w.oneOfType([w.string,w.number]),children:w.node};function so(){return so=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},so.apply(this,arguments)}function lo(e){var t=e.fill,n=e.width,r=e.height,a=e.style;return m.createElement("div",{style:so({width:n,height:r,background:t},a)})}lo.propTypes={fill:w.string,width:w.oneOfType([w.string,w.number]),height:w.oneOfType([w.string,w.number])};function Sf(e){var t=e.fill,n=e.width,r=e.height,a=e.style,i=typeof n=="string"||typeof n>"u"?0:n,s=typeof r=="string"||typeof r>"u"?0:r,o=Math.max(i,s),l=o/2;return m.createElement("svg",{width:o,height:o},m.createElement(Ge,{top:l,left:l},m.createElement("circle",{r:l,fill:t,style:a})))}Sf.propTypes={fill:w.string,width:w.oneOfType([w.string,w.number]),height:w.oneOfType([w.string,w.number])};function Tf(e){var t=e.fill,n=e.width,r=e.height,a=e.style,i=typeof r=="string"||typeof r>"u"?0:r,s=typeof(a==null?void 0:a.strokeWidth)=="number"?a==null?void 0:a.strokeWidth:2;return m.createElement("svg",{width:n,height:r},m.createElement(Ge,{top:i/2-s/2},m.createElement("line",{x1:0,x2:n,y1:0,y2:0,stroke:t,strokeWidth:s,style:a})))}Tf.propTypes={fill:w.string,width:w.oneOfType([w.string,w.number]),height:w.oneOfType([w.string,w.number])};function In(){return In=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},In.apply(this,arguments)}var uo=function(){};function Z1(e){var t=e.shape,n=t===void 0?"rect":t,r=e.fill,a=r===void 0?uo:r,i=e.size,s=i===void 0?uo:i,o=e.width,l=e.height,u=e.label,c=e.item,f=e.itemIndex,h=e.shapeStyle,p=h===void 0?uo:h,d={width:o,height:l,item:c,itemIndex:f,label:u,fill:a(In({},u)),size:s(In({},u)),style:p(In({},u))};return typeof n=="string"?n==="circle"?m.createElement(Sf,d):n==="line"?m.createElement(Tf,d):m.createElement(lo,d):m.isValidElement(n)?m.cloneElement(n,d):n?m.createElement(n,d):null}function qr(){return qr=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},qr.apply(this,arguments)}function Of(e){var t=e.shape,n=t===void 0?lo:t,r=e.width,a=e.height,i=e.margin,s=e.label,o=e.item,l=e.itemIndex,u=e.fill,c=e.size,f=e.shapeStyle;return m.createElement("div",{className:"visx-legend-shape",style:{display:"flex",width:c?c(qr({},s)):r,height:c?c(qr({},s)):a,margin:i}},Z1({shape:n,item:o,itemIndex:l,label:s,width:r,height:a,fill:u,shapeStyle:f}))}Of.propTypes={itemIndex:w.number.isRequired,margin:w.oneOfType([w.string,w.number]),width:w.oneOfType([w.string,w.number]),height:w.oneOfType([w.string,w.number])};function kf(e){return e&&typeof e=="object"&&"value"in e&&typeof e.value<"u"?e.value:e}function Mf(e){return String(kf(e))}function Q1(e){var t=e.scale,n=e.labelFormat;return function(r,a){return{datum:r,index:a,text:""+n(r,a),value:t(r)}}}var J1=["className","style","scale","shape","domain","fill","size","labelFormat","labelTransform","shapeWidth","shapeHeight","shapeMargin","shapeStyle","labelAlign","labelFlex","labelMargin","itemMargin","direction","itemDirection","legendLabelProps","children"];function Rn(){return Rn=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},Rn.apply(this,arguments)}function ex(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var tx={display:"flex"};function $f(e){var t=e.className,n=e.style,r=n===void 0?tx:n,a=e.scale,i=e.shape,s=e.domain,o=e.fill,l=o===void 0?Mf:o,u=e.size,c=u===void 0?Mf:u,f=e.labelFormat,h=f===void 0?kf:f,p=e.labelTransform,d=p===void 0?Q1:p,v=e.shapeWidth,x=v===void 0?15:v,g=e.shapeHeight,b=g===void 0?15:g,_=e.shapeMargin,M=_===void 0?"2px 4px 2px 0":_,y=e.shapeStyle,S=e.labelAlign,T=S===void 0?"left":S,$=e.labelFlex,k=$===void 0?"1":$,C=e.labelMargin,P=C===void 0?"0 4px":C,N=e.itemMargin,A=N===void 0?"0":N,R=e.direction,X=R===void 0?"column":R,U=e.itemDirection,Z=U===void 0?"row":U,ee=e.legendLabelProps,K=e.children,E=ex(e,J1),D=s||("domain"in a?a.domain():[]),B=d({scale:a,labelFormat:h}),W=D.map(B);return K?m.createElement(m.Fragment,null,K(W)):m.createElement("div",{className:ve("visx-legend",t),style:Rn({},r,{flexDirection:X})},W.map(function(F,I){return m.createElement(_f,Rn({key:"legend-"+F.text+"-"+I,margin:A,flexDirection:Z},E),m.createElement(Of,{shape:i,height:b,width:x,margin:M,item:D[I],itemIndex:I,label:F,fill:l,size:c,shapeStyle:y}),m.createElement(wf,Rn({label:F.text,flex:k,margin:P,align:T},ee)))}))}$f.propTypes={children:w.func,className:w.string,domain:w.array,shapeWidth:w.oneOfType([w.string,w.number]),shapeHeight:w.oneOfType([w.string,w.number]),shapeMargin:w.oneOfType([w.string,w.number]),labelAlign:w.string,labelFlex:w.oneOfType([w.string,w.number]),labelMargin:w.oneOfType([w.string,w.number]),itemMargin:w.oneOfType([w.string,w.number]),fill:w.func,size:w.func,shapeStyle:w.func};function Cf(e){return m.createElement($f,e)}const nx={chartData:"ChartDataProps[]",chartHeight:"number",chartWidth:"number",milestones:"MilestonesType[]",useAbsoluteLegend:"boolean",barTooltip:"(props: BarTooltipProps) => JSX.Element"};function co(e){const t=tn.useElementId(),{chartData:n=[],chartHeight:r=0,chartWidth:a=0,milestones:i,barTooltip:s,useAbsoluteLegend:o}=e,l={top:25,bottom:40,left:30,right:30};function u(T,$){const k=parseInt(T.slice(1,3),16),C=parseInt(T.slice(3,5),16),P=parseInt(T.slice(5,7),16);return`rgba(${k}, ${C}, ${P}, ${$})`}const c=n.map(T=>T.color),f=n.map(T=>T.label),h=n.map(T=>T.value),p=h.reduce((T,$)=>T+$,0),d=h.map(T=>Math.round(T/p*100*10)/10),v=Yt({domain:[0,100],nice:!0}),x=[n.reduce((T,$)=>Object.assign(T,{[$.label]:$.value}),{})],g=[n.reduce((T,$,k)=>Object.assign(T,{[$.label]:d[k]}),{})],b=Mn({domain:x,padding:.2}),_=Cr({domain:f.map(T=>`${T}: ${(o?x:g)[0][T]}%`),range:[...c]}),M=a-l.left-l.right,y=r-l.top-l.bottom;v.rangeRound([0,M]),b.rangeRound([y,0]);const S=T=>`${T}%`;return z.createElement("div",{style:{width:a},className:"position-relative"},z.createElement(Cf,{className:"fs-12 lh-18 gray600",scale:_,direction:"row",shape:"rect",shapeWidth:30,shapeHeight:4,shapeMargin:"0 5px 0 0",shapeStyle:()=>({borderRadius:"2px"}),labelMargin:"0",itemMargin:"0 10px 0 10px",style:{display:"flex",justifyContent:"center",fontSize:"16px"}}),i&&!(i!=null&&i.every(T=>T===void 0))&&z.createElement("div",{className:"position-absolute",style:{top:"26px",width:`${a-l.left-l.right}px`,margin:`0 ${l.left}px`,height:"12px"}},i.map(T=>z.createElement("i",{key:`${t.current}_${T.label}`,className:xf("sps-icon sps-icon-chevron-down fs-14 position-absolute",T.color),style:{left:`calc(${T.value}% - 5px)`}}))),z.createElement("svg",{width:a,height:r},z.createElement(rn,{top:l.top,left:l.left},z.createElement(_p,{data:g,keys:f,height:y,y:()=>"",xScale:v,yScale:b,color:_},T=>T.map($=>$.bars.map(k=>{let C=0;k.x===0||T.length-1===$.index?C=k.width-1.5:C=k.width-3,C<0&&(C=0);const P=`${t.current}_${k.key}`,N=k.key?k.key.toUpperCase():"",A=x[0][$.key]?x[0][$.key].toLocaleString():"";return z.createElement(rn,{key:`barstack-horizontal-${$.index}-${k.index}`},z.createElement(Cn,{id:`gradient-${$.index}`,vertical:!1,from:u(k.color,.5),to:k.color}),z.createElement("rect",{id:P,x:k.x!==0?k.x+1.5:k.x,y:k.y,width:C,height:20,fill:`url(#gradient-${$.index})`},s&&z.createElement(tn.SpsTooltip,{for:P},z.createElement(s,{label:N,absoluteValue:A,relativeValue:g[0][$.key]}))))}))),z.createElement(Xa,{top:y+6,tickFormat:S,scale:v,stroke:pe.colors.gray400,tickStroke:pe.colors.gray400,tickLength:4,tickLineProps:{y1:-11,y2:5},tickLabelProps:()=>({fill:pe.colors.gray400,fontSize:12,textAnchor:"middle"})}))),i&&!i.every(T=>T===void 0)&&z.createElement("footer",{className:"fs-12 lh-18 gray600 d-flex justify-content-center"},i.map(T=>z.createElement("span",{key:`${t.current}_${T.label}`,className:"d-flex align-items-center ml-3"},z.createElement("i",{className:xf("sps-icon sps-icon-chevron-down fs-14 mr-1",T.color)}),T.label,":",z.createElement("span",{className:"sps-text-semibold gray600 ml-1"},T.value,"%")))))}Object.assign(co,{props:nx,displayName:"SpsStackedHorizontalBarChart"});const Ef={basic:{label:"Basic",description:tt.code`
111
+ `}}}},U1={barFillColor1:"string",barFillColor2:"string",barFillColorHover:"string",chartData:"ChartDataObject[]",chartHeight:"number",chartWidth:"number",barSize:"number",yAxis:"ChartAxis",xAxis:"ChartAxis",marginLeft:"number",xMaxValue:"number",xTickFormat:"(i: number) => string"};function io(e){const{barFillColor1:t=pe.colors.blue200,barFillColor2:n="#007DB880",barFillColorHover:r=pe.colors.blue300,chartData:a=[],chartHeight:i=0,chartWidth:s=0,barSize:o,yAxis:u={tickValues:"label"},xAxis:l={tickValues:"value",tickCount:3},marginLeft:c=30,xMaxValue:f,xTickFormat:h}=e,p={top:30,bottom:30,left:c,right:30},d=s-p.left-p.right,m=i-p.top-p.bottom,b=k=>k[l.tickValues],g=k=>k[u.tickValues],x=Mn({range:[0,m],round:!0,domain:a.map(g),padding:.4}),_=qt({range:[0,d],round:!0,domain:[0,f||Math.max(...a.map(b))]}),M=(k,$)=>P=>k($(P)),y=M(_,b),S=M(x,g),T=Fn(),E=Fn();return j.createElement("svg",{width:s,height:i,className:"sps-chart-wrapper"},j.createElement(gf,{scale:_,left:p.left,height:m,stroke:pe.colors.gray400,strokeOpacity:.2}),j.createElement(En,{id:E,from:"#D2D4D580",to:"#D2D4D5",vertical:!1}),j.createElement(En,{id:T,from:n,to:t,vertical:!1}),a.map((k,$)=>{const P=y(k),N=Fn();return j.createElement(rn,{key:$},j.createElement("rect",{x:p.left,y:S(k)+(o?(x.bandwidth()-o)/2:0),height:o||x.bandwidth(),width:d,fill:`url(#${E})`}),j.createElement(uu,{id:N,right:!0,radius:4,x:p.left,y:S(k)+(o?(x.bandwidth()-o)/2:0),height:o||x.bandwidth(),width:P,fill:`url(#${T})`,onMouseEnter:A=>{const R=A.target;R.style.fill=r},onMouseLeave:A=>{const R=A.target;R.style.fill=""}}),j.createElement(ff,{scale:x,left:p.left,hideTicks:!0,hideAxisLine:!0,stroke:pe.colors.gray300,tickLabelProps:()=>({textAnchor:"end",fontSize:"12px",fill:pe.colors.gray400,fontWeight:"200",width:p.left,verticalAnchor:"middle"})}),j.createElement(Xa,{top:m,scale:_,left:p.left,hideTicks:!0,numTicks:l.tickCount,tickFormat:h||void 0,stroke:pe.colors.gray300,tickLabelProps:()=>({textAnchor:"middle",fontSize:"12px",fontWeight:"200",fill:pe.colors.gray400})}),j.createElement(en.SpsTooltip,{for:N},k.label))}))}Object.assign(io,{props:U1,displayName:"SpsHorizontalBarChart"});function yf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=yf(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function bf(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=yf(e))&&(r&&(r+=" "),r+=t);return r}var q1=["flexDirection","alignItems","margin","display","children"];function ao(){return ao=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},ao.apply(this,arguments)}function Y1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function xf(e){var t=e.flexDirection,n=t===void 0?"row":t,r=e.alignItems,a=r===void 0?"center":r,i=e.margin,s=i===void 0?"0":i,o=e.display,u=o===void 0?"flex":o,l=e.children,c=Y1(e,q1);return v.createElement("div",ao({className:"visx-legend-item",style:{display:u,alignItems:a,flexDirection:n,margin:s}},c),l)}xf.propTypes={alignItems:w.string,margin:w.oneOfType([w.string,w.number]),children:w.node,display:w.string};var V1=["flex","label","margin","align","children"];function oo(){return oo=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},oo.apply(this,arguments)}function G1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function _f(e){var t=e.flex,n=t===void 0?"1":t,r=e.label,a=e.margin,i=a===void 0?"5px 0":a,s=e.align,o=s===void 0?"left":s,u=e.children,l=G1(e,V1);return v.createElement("div",oo({className:"visx-legend-label",style:{justifyContent:o,display:"flex",flex:n,margin:i}},l),u||r)}_f.propTypes={align:w.string,label:w.node,flex:w.oneOfType([w.string,w.number]),margin:w.oneOfType([w.string,w.number]),children:w.node};function so(){return so=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},so.apply(this,arguments)}function uo(e){var t=e.fill,n=e.width,r=e.height,a=e.style;return v.createElement("div",{style:so({width:n,height:r,background:t},a)})}uo.propTypes={fill:w.string,width:w.oneOfType([w.string,w.number]),height:w.oneOfType([w.string,w.number])};function wf(e){var t=e.fill,n=e.width,r=e.height,a=e.style,i=typeof n=="string"||typeof n>"u"?0:n,s=typeof r=="string"||typeof r>"u"?0:r,o=Math.max(i,s),u=o/2;return v.createElement("svg",{width:o,height:o},v.createElement(Ge,{top:u,left:u},v.createElement("circle",{r:u,fill:t,style:a})))}wf.propTypes={fill:w.string,width:w.oneOfType([w.string,w.number]),height:w.oneOfType([w.string,w.number])};function Sf(e){var t=e.fill,n=e.width,r=e.height,a=e.style,i=typeof r=="string"||typeof r>"u"?0:r,s=typeof(a==null?void 0:a.strokeWidth)=="number"?a==null?void 0:a.strokeWidth:2;return v.createElement("svg",{width:n,height:r},v.createElement(Ge,{top:i/2-s/2},v.createElement("line",{x1:0,x2:n,y1:0,y2:0,stroke:t,strokeWidth:s,style:a})))}Sf.propTypes={fill:w.string,width:w.oneOfType([w.string,w.number]),height:w.oneOfType([w.string,w.number])};function In(){return In=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},In.apply(this,arguments)}var lo=function(){};function K1(e){var t=e.shape,n=t===void 0?"rect":t,r=e.fill,a=r===void 0?lo:r,i=e.size,s=i===void 0?lo:i,o=e.width,u=e.height,l=e.label,c=e.item,f=e.itemIndex,h=e.shapeStyle,p=h===void 0?lo:h,d={width:o,height:u,item:c,itemIndex:f,label:l,fill:a(In({},l)),size:s(In({},l)),style:p(In({},l))};return typeof n=="string"?n==="circle"?v.createElement(wf,d):n==="line"?v.createElement(Sf,d):v.createElement(uo,d):v.isValidElement(n)?v.cloneElement(n,d):n?v.createElement(n,d):null}function qr(){return qr=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},qr.apply(this,arguments)}function Tf(e){var t=e.shape,n=t===void 0?uo:t,r=e.width,a=e.height,i=e.margin,s=e.label,o=e.item,u=e.itemIndex,l=e.fill,c=e.size,f=e.shapeStyle;return v.createElement("div",{className:"visx-legend-shape",style:{display:"flex",width:c?c(qr({},s)):r,height:c?c(qr({},s)):a,margin:i}},K1({shape:n,item:o,itemIndex:u,label:s,width:r,height:a,fill:l,shapeStyle:f}))}Tf.propTypes={itemIndex:w.number.isRequired,margin:w.oneOfType([w.string,w.number]),width:w.oneOfType([w.string,w.number]),height:w.oneOfType([w.string,w.number])};function Of(e){return e&&typeof e=="object"&&"value"in e&&typeof e.value<"u"?e.value:e}function kf(e){return String(Of(e))}function X1(e){var t=e.scale,n=e.labelFormat;return function(r,a){return{datum:r,index:a,text:""+n(r,a),value:t(r)}}}var Z1=["className","style","scale","shape","domain","fill","size","labelFormat","labelTransform","shapeWidth","shapeHeight","shapeMargin","shapeStyle","labelAlign","labelFlex","labelMargin","itemMargin","direction","itemDirection","legendLabelProps","children"];function Rn(){return Rn=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},Rn.apply(this,arguments)}function Q1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var J1={display:"flex"};function Mf(e){var t=e.className,n=e.style,r=n===void 0?J1:n,a=e.scale,i=e.shape,s=e.domain,o=e.fill,u=o===void 0?kf:o,l=e.size,c=l===void 0?kf:l,f=e.labelFormat,h=f===void 0?Of:f,p=e.labelTransform,d=p===void 0?X1:p,m=e.shapeWidth,b=m===void 0?15:m,g=e.shapeHeight,x=g===void 0?15:g,_=e.shapeMargin,M=_===void 0?"2px 4px 2px 0":_,y=e.shapeStyle,S=e.labelAlign,T=S===void 0?"left":S,E=e.labelFlex,k=E===void 0?"1":E,$=e.labelMargin,P=$===void 0?"0 4px":$,N=e.itemMargin,A=N===void 0?"0":N,R=e.direction,X=R===void 0?"column":R,U=e.itemDirection,Z=U===void 0?"row":U,ee=e.legendLabelProps,K=e.children,C=Q1(e,Z1),D=s||("domain"in a?a.domain():[]),H=d({scale:a,labelFormat:h}),W=D.map(H);return K?v.createElement(v.Fragment,null,K(W)):v.createElement("div",{className:me("visx-legend",t),style:Rn({},r,{flexDirection:X})},W.map(function(F,I){return v.createElement(xf,Rn({key:"legend-"+F.text+"-"+I,margin:A,flexDirection:Z},C),v.createElement(Tf,{shape:i,height:x,width:b,margin:M,item:D[I],itemIndex:I,label:F,fill:u,size:c,shapeStyle:y}),v.createElement(_f,Rn({label:F.text,flex:k,margin:P,align:T},ee)))}))}Mf.propTypes={children:w.func,className:w.string,domain:w.array,shapeWidth:w.oneOfType([w.string,w.number]),shapeHeight:w.oneOfType([w.string,w.number]),shapeMargin:w.oneOfType([w.string,w.number]),labelAlign:w.string,labelFlex:w.oneOfType([w.string,w.number]),labelMargin:w.oneOfType([w.string,w.number]),itemMargin:w.oneOfType([w.string,w.number]),fill:w.func,size:w.func,shapeStyle:w.func};function $f(e){return v.createElement(Mf,e)}const ex={chartData:"ChartDataProps[]",chartHeight:"number",chartWidth:"number",milestones:"MilestonesType[]",useAbsoluteLegend:"boolean",barTooltip:"(props: BarTooltipProps) => JSX.Element"};function co(e){const t=en.useElementId(),{chartData:n=[],chartHeight:r=0,chartWidth:a=0,milestones:i,barTooltip:s,useAbsoluteLegend:o}=e,u={top:25,bottom:40,left:30,right:30};function l(T,E){const k=parseInt(T.slice(1,3),16),$=parseInt(T.slice(3,5),16),P=parseInt(T.slice(5,7),16);return`rgba(${k}, ${$}, ${P}, ${E})`}const c=n.map(T=>T.color),f=n.map(T=>T.label),h=n.map(T=>T.value),p=h.reduce((T,E)=>T+E,0),d=h.map(T=>Math.round(T/p*100*10)/10),m=qt({domain:[0,100],nice:!0}),b=[n.reduce((T,E)=>Object.assign(T,{[E.label]:E.value}),{})],g=[n.reduce((T,E,k)=>Object.assign(T,{[E.label]:d[k]}),{})],x=Mn({domain:b,padding:.2}),_=Er({domain:f.map(T=>`${T}: ${(o?b:g)[0][T]}%`),range:[...c]}),M=a-u.left-u.right,y=r-u.top-u.bottom;m.rangeRound([0,M]),x.rangeRound([y,0]);const S=T=>`${T}%`;return j.createElement("div",{style:{width:a},className:"position-relative"},j.createElement($f,{className:"fs-12 lh-18 gray600",scale:_,direction:"row",shape:"rect",shapeWidth:30,shapeHeight:4,shapeMargin:"0 5px 0 0",shapeStyle:()=>({borderRadius:"2px"}),labelMargin:"0",itemMargin:"0 10px 0 10px",style:{display:"flex",justifyContent:"center",fontSize:"16px"}}),i&&!(i!=null&&i.every(T=>T===void 0))&&j.createElement("div",{className:"position-absolute",style:{top:"26px",width:`${a-u.left-u.right}px`,margin:`0 ${u.left}px`,height:"12px"}},i.map(T=>j.createElement("i",{key:`${t.current}_${T.label}`,className:bf("sps-icon sps-icon-chevron-down fs-14 position-absolute",T.color),style:{left:`calc(${T.value}% - 5px)`}}))),j.createElement("svg",{width:a,height:r},j.createElement(rn,{top:u.top,left:u.left},j.createElement(bp,{data:g,keys:f,height:y,y:()=>"",xScale:m,yScale:x,color:_},T=>T.map(E=>E.bars.map(k=>{let $=0;k.x===0||T.length-1===E.index?$=k.width-1.5:$=k.width-3,$<0&&($=0);const P=`${t.current}_${k.key}`,N=k.key?k.key.toUpperCase():"",A=b[0][E.key]?b[0][E.key].toLocaleString():"";return j.createElement(rn,{key:`barstack-horizontal-${E.index}-${k.index}`},j.createElement(En,{id:`gradient-${E.index}`,vertical:!1,from:l(k.color,.5),to:k.color}),j.createElement("rect",{id:P,x:k.x!==0?k.x+1.5:k.x,y:k.y,width:$,height:20,fill:`url(#gradient-${E.index})`},s&&j.createElement(en.SpsTooltip,{for:P},j.createElement(s,{label:N,absoluteValue:A,relativeValue:g[0][E.key]}))))}))),j.createElement(Xa,{top:y+6,tickFormat:S,scale:m,stroke:pe.colors.gray400,tickStroke:pe.colors.gray400,tickLength:4,tickLineProps:{y1:-11,y2:5},tickLabelProps:()=>({fill:pe.colors.gray400,fontSize:12,textAnchor:"middle"})}))),i&&!i.every(T=>T===void 0)&&j.createElement("footer",{className:"fs-12 lh-18 gray600 d-flex justify-content-center"},i.map(T=>j.createElement("span",{key:`${t.current}_${T.label}`,className:"d-flex align-items-center ml-3"},j.createElement("i",{className:bf("sps-icon sps-icon-chevron-down fs-14 mr-1",T.color)}),T.label,":",j.createElement("span",{className:"sps-text-semibold gray600 ml-1"},T.value,"%")))))}Object.assign(co,{props:ex,displayName:"SpsStackedHorizontalBarChart"});const Ef={basic:{label:"Basic",description:tt.code`
112
112
  <p>Stacked horizontal bar chart example.</p>
113
113
  `,examples:{basic:{react:tt.code`
114
114
  import { SpsStackedHorizontalBarChart } from "@spscommerce/ds-react-charts";
@@ -164,7 +164,7 @@ z`).split(`
164
164
  />
165
165
  )
166
166
  }
167
- `}}}};function fo(e,t,n){var r,a,i,s,o;t==null&&(t=100);function l(){var c=Date.now()-s;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(o=e.apply(i,a),i=a=null))}var u=function(){i=this,a=arguments,s=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(o=e.apply(i,a),i=a=null),o};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(o=e.apply(i,a),i=a=null,clearTimeout(r),r=null)},u}fo.debounce=fo;var rx=fo;const Pf=Dt(rx);function ix(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:a}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,o]=m.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=m.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s}),u=t?typeof t=="number"?t:t.scroll:null,c=t?typeof t=="number"?t:t.resize:null,f=m.useRef(!1);m.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[h,p,d]=m.useMemo(()=>{const b=()=>{if(!l.current.element)return;const{left:_,top:M,width:y,height:S,bottom:T,right:$,x:k,y:C}=l.current.element.getBoundingClientRect(),P={left:_,top:M,width:y,height:S,bottom:T,right:$,x:k,y:C};l.current.element instanceof HTMLElement&&a&&(P.height=l.current.element.offsetHeight,P.width=l.current.element.offsetWidth),Object.freeze(P),f.current&&!lx(l.current.lastBounds,P)&&o(l.current.lastBounds=P)};return[b,c?Pf(b,c):b,u?Pf(b,u):b]},[o,a,u,c]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(b=>b.removeEventListener("scroll",d,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function x(){l.current.element&&(l.current.resizeObserver=new i(d),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(b=>b.addEventListener("scroll",d,{capture:!0,passive:!0})))}const g=b=>{!b||b===l.current.element||(v(),l.current.element=b,l.current.scrollContainers=Nf(b),x())};return ox(d,!!n),ax(p),m.useEffect(()=>{v(),x()},[n,d,p]),m.useEffect(()=>v,[]),[g,s,h]}function ax(e){m.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function ox(e,t){m.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function Nf(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:a}=window.getComputedStyle(e);return[n,r,a].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...Nf(e.parentElement)]}const sx=["x","y","top","bottom","left","right","width","height"],lx=(e,t)=>sx.every(n=>e[n]===t[n]),Lf=pt(d1);function ux(e){return!!e&&e instanceof Element}function cx(e){return!!e&&(e instanceof SVGElement||"ownerSVGElement"in e)}function fx(e){return!!e&&"createSVGPoint"in e}function hx(e){return!!e&&"getScreenCTM"in e}function dx(e){return!!e&&"changedTouches"in e}function px(e){return!!e&&"clientX"in e}function vx(e){return!!e&&(e instanceof Event||"nativeEvent"in e&&e.nativeEvent instanceof Event)}function Wn(){return Wn=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},Wn.apply(this,arguments)}var ho={x:0,y:0};function mx(e){if(!e)return Wn({},ho);if(dx(e))return e.changedTouches.length>0?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:Wn({},ho);if(px(e))return{x:e.clientX,y:e.clientY};var t=e==null?void 0:e.target,n=t&&"getBoundingClientRect"in t?t.getBoundingClientRect():null;return n?{x:n.x+n.width/2,y:n.y+n.height/2}:Wn({},ho)}function Af(e,t){if(!e||!t)return null;var n=mx(t),r=cx(e)?e.ownerSVGElement:e,a=hx(r)?r.getScreenCTM():null;if(fx(r)&&a){var i=r.createSVGPoint();return i.x=n.x,i.y=n.y,i=i.matrixTransform(a.inverse()),new He({x:i.x,y:i.y})}var s=e.getBoundingClientRect();return new He({x:n.x-s.left-e.clientLeft,y:n.y-s.top-e.clientTop})}function gx(e,t){if(ux(e)&&t)return Af(e,t);if(vx(e)){var n=e,r=n.target;if(r)return Af(r,n)}return null}var Ue=m.createContext({});function po(e){var t,n=e;return n&&"bandwidth"in n&&(t=n==null?void 0:n.bandwidth())!=null?t:0}function Se(e){return e!=null&&typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e)}const Df=pt(sp),zf=pt(Yg);var yx=["AxisComponent"];function Yr(){return Yr=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},Yr.apply(this,arguments)}function bx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function xx(e){var t,n,r,a,i,s,o,l=e.AxisComponent,u=bx(e,yx),c=m.useContext(Ue),f=c.theme,h=c.xScale,p=c.yScale,d=c.margin,v=c.width,x=c.height,g=u.orientation,b=m.useMemo(function(){var $,k,C,P;return g==="left"||g==="right"?f==null||($=f.axisStyles)==null||(k=$.y)==null?void 0:k[g]:f==null||(C=f.axisStyles)==null||(P=C.x)==null?void 0:P[g]},[f,g]),_=u.tickLabelProps,M=m.useMemo(function(){return _||b?function($,k,C){return Yr({},b==null?void 0:b.tickLabel,{width:g==="left"||g==="right"?d==null?void 0:d[g]:void 0},typeof _=="function"?_($,k,C):_)}:void 0},[_,b,g,d]),y=g==="bottom"?(x??0)-((t=d==null?void 0:d.bottom)!=null?t:0):g==="top"&&(n=d==null?void 0:d.top)!=null?n:0,S=g==="left"?(r=d==null?void 0:d.left)!=null?r:0:g==="right"?(v??0)-((a=d==null?void 0:d.right)!=null?a:0):0,T=g==="left"||g==="right"?p:h;return T?m.createElement(l,Yr({top:y,left:S,labelProps:b==null?void 0:b.axisLabel,stroke:b==null||(i=b.axisLine)==null?void 0:i.stroke,strokeWidth:b==null||(s=b.axisLine)==null?void 0:s.strokeWidth,tickLength:b==null?void 0:b.tickLength,tickStroke:b==null||(o=b.tickLine)==null?void 0:o.stroke},u,{tickLabelProps:M,scale:T})):null}var Vr={};Vr.__esModule=!0,Vr.default=_x;function _x(e){return"bandwidth"in e?e.bandwidth():0}var wx=Wf,jf=Bn(er),Ff=Bn(m),Sx=Bn(nn),Tx=Bn(Br),Ox=Df,If=Lf,Rf=zf,kx=Bn(Vr),Mx=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function Bn(e){return e&&e.__esModule?e:{default:e}}function vo(){return vo=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},vo.apply(this,arguments)}function $x(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Wf(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.width,o=e.stroke,l=o===void 0?"#eaf0f6":o,u=e.strokeWidth,c=u===void 0?1:u,f=e.strokeDasharray,h=e.className,p=e.children,d=e.numTicks,v=d===void 0?10:d,x=e.lineStyle,g=e.offset,b=e.tickValues,_=$x(e,Mx),M=b??(0,Rf.getTicks)(i,v),y=(g??0)+(0,kx.default)(i)/2,S=M.map(function(T,$){var k,C=((k=(0,Rf.coerceNumber)(i(T)))!=null?k:0)+y;return{index:$,from:new If.Point({x:0,y:C}),to:new If.Point({x:s,y:C})}});return Ff.default.createElement(Ox.Group,{className:(0,Sx.default)("visx-rows",h),top:n,left:a},p?p({lines:S}):S.map(function(T){var $=T.from,k=T.to,C=T.index;return Ff.default.createElement(Tx.default,vo({key:"row-line-"+C,from:$,to:k,stroke:l,strokeWidth:c,strokeDasharray:f,style:x},_))}))}Wf.propTypes={tickValues:jf.default.array,width:jf.default.number.isRequired};var Cx=Yf,Bf=Hn(er),Hf=Hn(m),Ex=Hn(nn),Px=Hn(Br),Nx=Df,Uf=Lf,qf=zf,Lx=Hn(Vr),Ax=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function Hn(e){return e&&e.__esModule?e:{default:e}}function mo(){return mo=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},mo.apply(this,arguments)}function Dx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Yf(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.height,o=e.stroke,l=o===void 0?"#eaf0f6":o,u=e.strokeWidth,c=u===void 0?1:u,f=e.strokeDasharray,h=e.className,p=e.numTicks,d=p===void 0?10:p,v=e.lineStyle,x=e.offset,g=e.tickValues,b=e.children,_=Dx(e,Ax),M=g??(0,qf.getTicks)(i,d),y=(x??0)+(0,Lx.default)(i)/2,S=M.map(function(T,$){var k,C=((k=(0,qf.coerceNumber)(i(T)))!=null?k:0)+y;return{index:$,from:new Uf.Point({x:C,y:0}),to:new Uf.Point({x:C,y:s})}});return Hf.default.createElement(Nx.Group,{className:(0,Ex.default)("visx-columns",h),top:n,left:a},b?b({lines:S}):S.map(function(T){var $=T.from,k=T.to,C=T.index;return Hf.default.createElement(Px.default,mo({key:"column-line-"+C,from:$,to:k,stroke:l,strokeWidth:c,strokeDasharray:f,style:v},_))}))}Yf.propTypes={tickValues:Bf.default.array,height:Bf.default.number.isRequired};var zx=["rows","columns","GridRowsComponent","GridColumnsComponent"];function Gr(){return Gr=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},Gr.apply(this,arguments)}function jx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Vf(e){var t=e.rows,n=t===void 0?!0:t,r=e.columns,a=r===void 0?!0:r,i=e.GridRowsComponent,s=e.GridColumnsComponent,o=jx(e,zx),l=m.useContext(Ue),u=l.theme,c=l.xScale,f=l.yScale,h=l.margin,p=l.innerWidth,d=l.innerHeight,v=u==null?void 0:u.gridStyles;return m.createElement(m.Fragment,null,n&&f&&p!=null&&m.createElement(i,Gr({left:h==null?void 0:h.left,lineStyle:v,width:p,scale:f},o)),a&&c&&d!=null&&m.createElement(s,Gr({top:h==null?void 0:h.top,lineStyle:v,height:d,scale:c},o)))}Vf.propTypes={rows:w.bool,columns:w.bool};function go(){return go=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},go.apply(this,arguments)}function Gf(e){return m.createElement(xx,go({AxisComponent:Ka},e))}function yo(){return yo=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},yo.apply(this,arguments)}function Fx(e){return m.createElement(Vf,yo({GridRowsComponent:wx,GridColumnsComponent:Cx},e))}var Ix=["tooltipOpen"];function Rx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Kr(){return Kr=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},Kr.apply(this,arguments)}function Wx(e){var t=m.useState(Kr({tooltipOpen:!1},e)),n=t[0],r=t[1],a=m.useCallback(function(s){return r(typeof s=="function"?function(o){o.tooltipOpen;var l=Rx(o,Ix);return Kr({},s(l),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:s.tooltipLeft,tooltipTop:s.tooltipTop,tooltipData:s.tooltipData})},[r]),i=m.useCallback(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]);return{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:a,hideTooltip:i}}function Bx(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,bo(e,t)}function bo(e,t){return bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},bo(e,t)}var Kf=function(e){Bx(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return!this.node&&typeof document<"u"&&(this.node=document.createElement("div"),this.props.zIndex!=null&&(this.node.style.zIndex=""+this.props.zIndex),document.body.append(this.node)),this.node?os.createPortal(this.props.children,this.node):null},t}(m.PureComponent);Kf.propTypes={zIndex:w.oneOfType([w.number,w.string])};var Hx=["className","top","left","offsetLeft","offsetTop","style","children","unstyled","applyPositionStyle"];function Xr(){return Xr=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},Xr.apply(this,arguments)}function Ux(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var xo={position:"absolute",backgroundColor:"white",color:"#666666",padding:".3rem .5rem",borderRadius:"3px",fontSize:"14px",boxShadow:"0 1px 2px rgba(33,33,33,0.2)",lineHeight:"1em",pointerEvents:"none"},Zr=m.forwardRef(function(e,t){var n=e.className,r=e.top,a=e.left,i=e.offsetLeft,s=i===void 0?10:i,o=e.offsetTop,l=o===void 0?10:o,u=e.style,c=u===void 0?xo:u,f=e.children,h=e.unstyled,p=h===void 0?!1:h,d=e.applyPositionStyle,v=d===void 0?!1:d,x=Ux(e,Hx);return m.createElement("div",Xr({ref:t,className:ve("visx-tooltip",n),style:Xr({top:r==null||l==null?r:r+l,left:a==null||s==null?a:a+s},v&&{position:"absolute"},!p&&c)},x),f)});Zr.propTypes={children:w.node,className:w.string,left:w.number,offsetLeft:w.number,offsetTop:w.number,top:w.number,applyPositionStyle:w.bool,unstyled:w.bool},Zr.displayName="Tooltip";function _o(){return _o=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},_o.apply(this,arguments)}function qx(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yx(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,wo(e,t)}function wo(e,t){return wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},wo(e,t)}var Xf={top:0,right:0,bottom:0,left:0,width:0,height:0};function Vx(e){var t;return t=function(n){Yx(r,n);function r(i){var s;return s=n.call(this,i)||this,s.state={rect:void 0,parentRect:void 0},s.nodeRef=m.createRef(),s.getRects=s.getRects.bind(qx(s)),s}var a=r.prototype;return a.componentDidMount=function(){var s,o=this;this.node=(s=this.nodeRef)!=null&&s.current?this.nodeRef.current:os.findDOMNode(this),this.setState(function(){return o.getRects()})},a.getRects=function(){if(!this.node)return this.state;var s=this.node,o=s.parentNode,l=s.getBoundingClientRect?s.getBoundingClientRect():Xf,u=o!=null&&o.getBoundingClientRect?o.getBoundingClientRect():Xf;return{rect:l,parentRect:u}},a.render=function(){return m.createElement(e,_o({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},r}(m.PureComponent),t.displayName="withBoundingRects("+(e.displayName||"")+")",t}var Zf=m.createContext({isFlippedVertically:!1,isFlippedHorizontally:!1}),Gx=Zf.Provider;Zf.Consumer;var Kx=["children","getRects","left","offsetLeft","offsetTop","parentRect","rect","style","top","unstyled","nodeRef"];function Qr(){return Qr=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},Qr.apply(this,arguments)}function Xx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Qf(e){var t=e.children;e.getRects;var n=e.left,r=n===void 0?0:n,a=e.offsetLeft,i=a===void 0?10:a,s=e.offsetTop,o=s===void 0?10:s,l=e.parentRect,u=e.rect,c=e.style,f=c===void 0?xo:c,h=e.top,p=h===void 0?0:h,d=e.unstyled,v=d===void 0?!1:d,x=e.nodeRef,g=Xx(e,Kx),b,_=!1,M=!1;if(u&&l){var y=r,S=p;if(l.width){var T=y+i+u.width-l.width,$=u.width-y-i;_=T>0&&T>$}else{var k=y+i+u.width-window.innerWidth,C=u.width-y-i;_=k>0&&k>C}if(l.height){var P=S+o+u.height-l.height,N=u.height-S-o;M=P>0&&P>N}else M=S+o+u.height>window.innerHeight;y=_?y-u.width-i:y+i,S=M?S-u.height-o:S+o,y=Math.round(y),S=Math.round(S),b="translate("+y+"px, "+S+"px)"}return m.createElement(Zr,Qr({ref:x,style:Qr({left:0,top:0,transform:b},!v&&f)},g),m.createElement(Gx,{value:{isFlippedVertically:!M,isFlippedHorizontally:!_}},t))}Qf.propTypes={nodeRef:w.oneOfType([w.string,w.func,w.object])};const Zx=Vx(Qf);var Qx=["detectBounds","zIndex"],Jx=["left","top","detectBounds","zIndex"];function So(){return So=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},So.apply(this,arguments)}function Jf(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function e_(e){var t=e===void 0?{}:e,n=t.detectBounds,r=n===void 0?!0:n,a=t.zIndex,i=Jf(t,Qx),s=ix(i),o=s[0],l=s[1],u=s[2],c=m.useState(!1),f=c[0],h=c[1];m.useEffect(function(){h(!1)},[]);var p=m.useMemo(function(){return function(d){var v=d.left,x=v===void 0?0:v,g=d.top,b=g===void 0?0:g,_=d.detectBounds,M=d.zIndex,y=Jf(d,Jx),S=_??r,T=M??a,$=S?Zx:Zr,k=f?0:window.scrollX,C=f?0:window.scrollY,P=x+(l.left||0)+k,N=b+(l.top||0)+C;return m.createElement(Kf,{zIndex:T},m.createElement($,So({left:P,top:N},y)))}},[r,a,l.left,l.top,f]);return{containerRef:o,containerBounds:l,forceRefreshBounds:u,TooltipInPortal:p}}var Un=m.createContext(null),t_=["debounce","detectBounds","horizontalCrosshairStyle","glyphStyle","renderTooltip","renderGlyph","resizeObserverPolyfill","scroll","showDatumGlyph","showHorizontalCrosshair","showSeriesGlyphs","showVerticalCrosshair","snapTooltipToDatumX","snapTooltipToDatumY","verticalCrosshairStyle","zIndex"],n_=["x","y"];function eh(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function et(){return et=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},et.apply(this,arguments)}var To={position:"absolute",pointerEvents:"none",fontSize:0,lineHeight:0},r_={position:"absolute",left:0,top:0,opacity:0,width:0,height:0,pointerEvents:"none"};function th(e){var t=m.useContext(Ue)||{},n=t.theme;return m.createElement("circle",et({cx:e.x,cy:e.y,r:e.size,fill:e.color,stroke:n==null?void 0:n.backgroundColor,strokeWidth:1.5,paintOrder:"fill"},e.glyphStyle))}th.propTypes={isNearestDatum:w.bool.isRequired};function i_(e){return m.createElement(th,e)}function nh(e){var t,n,r,a,i,s,o,l,u,c,f,h,p,d=e.debounce,v=e.detectBounds,x=e.horizontalCrosshairStyle,g=e.glyphStyle,b=e.renderTooltip,_=e.renderGlyph,M=_===void 0?i_:_,y=e.resizeObserverPolyfill,S=e.scroll,T=S===void 0?!0:S,$=e.showDatumGlyph,k=$===void 0?!1:$,C=e.showHorizontalCrosshair,P=C===void 0?!1:C,N=e.showSeriesGlyphs,A=N===void 0?!1:N,R=e.showVerticalCrosshair,X=R===void 0?!1:R,U=e.snapTooltipToDatumX,Z=U===void 0?!1:U,ee=e.snapTooltipToDatumY,K=ee===void 0?!1:ee,E=e.verticalCrosshairStyle,D=e.zIndex,B=eh(e,t_),W=m.useContext(Ue)||{},F=W.colorScale,I=W.theme,q=W.innerHeight,Y=W.innerWidth,G=W.margin,L=W.xScale,j=W.yScale,H=W.dataRegistry,O=W.resizeObserverPolyfill,Q=m.useContext(Un),te=e_({debounce:d,detectBounds:v,polyfill:O||y,scroll:T,zIndex:D}),le=te.containerRef,de=te.TooltipInPortal,qe=te.forceRefreshBounds,oi=m.useCallback(function(Pe){var Ve;le((Ve=Pe==null?void 0:Pe.parentElement)!=null?Ve:null)},[le]),Eh=Q!=null&&Q.tooltipOpen?b(et({},Q,{colorScale:F})):null,en=(Q==null?void 0:Q.tooltipOpen)&&Eh!=null,Ph=m.useRef(!1);m.useEffect(function(){en&&!Ph.current&&qe(),Ph.current=en},[en,qe]);var si=Q==null?void 0:Q.tooltipLeft,li=Q==null?void 0:Q.tooltipTop,Nh=L?po(L):0,Lh=j?po(j):0,rs=m.useCallback(function(Pe,Ve){var Lt,At,Fe=H==null?void 0:H.get(Pe),Xn=Fe==null?void 0:Fe.xAccessor,ui=Fe==null?void 0:Fe.yAccessor,as=L&&Xn?(Lt=Number(L(Xn(Ve)))+Nh/2)!=null?Lt:0:void 0,ci=j&&ui?(At=Number(j(ui(Ve)))+Lh/2)!=null?At:0:void 0;return{left:as,top:ci}},[H,Nh,Lh,L,j]),Ye=Q==null||(t=Q.tooltipData)==null?void 0:t.nearestDatum,Kn=(n=Ye==null?void 0:Ye.key)!=null?n:"";if(en&&Ye&&(Z||K)){var Ah=rs(Kn,Ye.datum),Dh=Ah.left,zh=Ah.top;si=Z&&Se(Dh)?Dh:si,li=K&&Se(zh)?zh:li}var is=[];if(en&&(k||A)){var jh,Fh=Number((jh=g==null?void 0:g.radius)!=null?jh:4);if(A){var Ih,Rh;Object.values((Ih=Q==null||(Rh=Q.tooltipData)==null?void 0:Rh.datumByKey)!=null?Ih:{}).forEach(function(Pe){var Ve,Lt,At,Fe=Pe.key,Xn=Pe.datum,ui=Pe.index,as=(Ve=(Lt=F==null?void 0:F(Fe))!=null?Lt:I==null||(At=I.htmlLabel)==null?void 0:At.color)!=null?Ve:"#222",ci=rs(Fe,Xn),Xh=ci.left,Zh=ci.top;!Se(Xh)||!Se(Zh)||is.push({key:Fe,color:as,datum:Xn,index:ui,size:Fh,x:Xh,y:Zh,glyphStyle:g,isNearestDatum:Ye?Ye.key===Fe:!1})})}else if(Ye){var Wh=rs(Kn,Ye.datum),Bh=Wh.left,Hh=Wh.top;if(Se(Bh)&&Se(Hh)){var Uh,qh,Yh,Vh,Gh,Kh,yS=(Uh=(qh=(Yh=(Vh=Kn&&(F==null?void 0:F(Kn)))!=null?Vh:null)!=null?Yh:I==null||(Gh=I.gridStyles)==null?void 0:Gh.stroke)!=null?qh:I==null||(Kh=I.htmlLabel)==null?void 0:Kh.color)!=null?Uh:"#222";is.push({key:Kn,color:yS,datum:Ye.datum,index:Ye.index,size:Fh,x:Bh,y:Hh,glyphStyle:g,isNearestDatum:!0})}}}return m.createElement(m.Fragment,null,m.createElement("svg",{ref:oi,style:r_}),en&&m.createElement(m.Fragment,null,X&&m.createElement(de,{className:"visx-crosshair visx-crosshair-vertical",left:si,top:G==null?void 0:G.top,offsetLeft:0,offsetTop:0,detectBounds:!1,style:To},m.createElement("svg",{width:"1",height:q,overflow:"visible"},m.createElement("line",et({x1:0,x2:0,y1:0,y2:q,strokeWidth:1.5,stroke:(r=(a=I==null||(i=I.gridStyles)==null?void 0:i.stroke)!=null?a:I==null||(s=I.htmlLabel)==null?void 0:s.color)!=null?r:"#222"},E)))),P&&m.createElement(de,{className:"visx-crosshair visx-crosshair-horizontal",left:G==null?void 0:G.left,top:li,offsetLeft:0,offsetTop:0,detectBounds:!1,style:To},m.createElement("svg",{width:Y,height:"1",overflow:"visible"},m.createElement("line",et({x1:0,x2:Y,y1:0,y2:0,strokeWidth:1.5,stroke:(o=(l=I==null||(u=I.gridStyles)==null?void 0:u.stroke)!=null?l:I==null||(c=I.htmlLabel)==null?void 0:c.color)!=null?o:"#222"},x)))),is.map(function(Pe,Ve){var Lt=Pe.x,At=Pe.y,Fe=eh(Pe,n_);return m.createElement(de,{key:Ve,className:"visx-tooltip-glyph",left:Lt,top:At,offsetLeft:0,offsetTop:0,detectBounds:!1,style:To},m.createElement("svg",{overflow:"visible"},M(et({x:0,y:0},Fe))))}),m.createElement(de,et({left:si,top:li,style:et({},xo,{background:(f=I==null?void 0:I.backgroundColor)!=null?f:"white",boxShadow:"0 1px 2px "+(I!=null&&(h=I.htmlLabel)!=null&&h.color?(I==null||(p=I.htmlLabel)==null?void 0:p.color)+"55":"#22222255")},I==null?void 0:I.htmlLabel)},B),Eh)))}nh.propTypes={renderTooltip:w.func.isRequired,renderGlyph:w.func,snapTooltipToDatumX:w.bool,snapTooltipToDatumY:w.bool,showVerticalCrosshair:w.bool,showHorizontalCrosshair:w.bool,showDatumGlyph:w.bool,showSeriesGlyphs:w.bool};function rh(e){var t=m.useContext(Un);return t!=null&&t.tooltipOpen?m.createElement(nh,e):null}rh.propTypes={renderTooltip:w.func.isRequired,renderGlyph:w.func,snapTooltipToDatumX:w.bool,snapTooltipToDatumY:w.bool,showVerticalCrosshair:w.bool,showHorizontalCrosshair:w.bool,showDatumGlyph:w.bool,showSeriesGlyphs:w.bool};var Oo={},a_=Ar,o_=function(){return a_.Date.now()},s_=o_,l_=/\s/;function u_(e){for(var t=e.length;t--&&l_.test(e.charAt(t)););return t}var c_=u_,f_=c_,h_=/^\s+/;function d_(e){return e&&e.slice(0,f_(e)+1).replace(h_,"")}var p_=d_;function v_(e){return e!=null&&typeof e=="object"}var m_=v_,g_=ef,y_=m_,b_="[object Symbol]";function x_(e){return typeof e=="symbol"||y_(e)&&g_(e)==b_}var __=x_,w_=p_,ih=Dr,S_=__,ah=NaN,T_=/^[-+]0x[0-9a-f]+$/i,O_=/^0b[01]+$/i,k_=/^0o[0-7]+$/i,M_=parseInt;function $_(e){if(typeof e=="number")return e;if(S_(e))return ah;if(ih(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ih(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=w_(e);var n=O_.test(e);return n||k_.test(e)?M_(e.slice(2),n?2:8):T_.test(e)?ah:+e}var C_=$_,E_=Dr,ko=s_,oh=C_,P_="Expected a function",N_=Math.max,L_=Math.min;function A_(e,t,n){var r,a,i,s,o,l,u=0,c=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(P_);t=oh(t)||0,E_(n)&&(c=!!n.leading,f="maxWait"in n,i=f?N_(oh(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(S){var T=r,$=a;return r=a=void 0,u=S,s=e.apply($,T),s}function d(S){return u=S,o=setTimeout(g,t),c?p(S):s}function v(S){var T=S-l,$=S-u,k=t-T;return f?L_(k,i-$):k}function x(S){var T=S-l,$=S-u;return l===void 0||T>=t||T<0||f&&$>=i}function g(){var S=ko();if(x(S))return b(S);o=setTimeout(g,v(S))}function b(S){return o=void 0,h&&r?p(S):(r=a=void 0,s)}function _(){o!==void 0&&clearTimeout(o),u=0,r=l=a=o=void 0}function M(){return o===void 0?s:b(ko())}function y(){var S=ko(),T=x(S);if(r=arguments,a=this,l=S,T){if(o===void 0)return d(l);if(f)return clearTimeout(o),o=setTimeout(g,t),p(l)}return o===void 0&&(o=setTimeout(g,t)),s}return y.cancel=_,y.flush=M,y}var sh=A_;const D_=Dt(sh);Oo.__esModule=!0,Oo.default=I_;var z_=j_(sh),qn=m;function j_(e){return e&&e.__esModule?e:{default:e}}function Jr(){return Jr=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},Jr.apply(this,arguments)}var F_=[],lh={width:0,height:0,top:0,left:0};function I_(e){var t=e===void 0?{}:e,n=t.initialSize,r=n===void 0?lh:n,a=t.debounceTime,i=a===void 0?300:a,s=t.ignoreDimensions,o=s===void 0?F_:s,l=t.enableDebounceLeadingCall,u=l===void 0?!0:l,c=t.resizeObserverPolyfill,f=(0,qn.useRef)(null),h=(0,qn.useRef)(0),p=(0,qn.useState)(Jr({},lh,r)),d=p[0],v=p[1],x=(0,qn.useMemo)(function(){var g=Array.isArray(o)?o:[o];return(0,z_.default)(function(b){v(function(_){var M=Object.keys(_),y=M.filter(function(T){return _[T]!==b[T]}),S=y.every(function(T){return g.includes(T)});return S?_:b})},i,{leading:u})},[i,u,o]);return(0,qn.useEffect)(function(){var g=c||window.ResizeObserver,b=new g(function(_){_.forEach(function(M){var y,S=(y=M==null?void 0:M.contentRect)!=null?y:{},T=S.left,$=S.top,k=S.width,C=S.height;h.current=window.requestAnimationFrame(function(){x({width:k,height:C,top:$,left:T})})})});return f.current&&b.observe(f.current),function(){window.cancelAnimationFrame(h.current),b.disconnect(),x.cancel()}},[x,c]),Jr({parentRef:f,resize:x},d)}var R_=fh,uh=Mo(er),W_=Mo(m),B_=Mo(Oo),H_=["className","children","debounceTime","ignoreDimensions","initialSize","parentSizeStyles","enableDebounceLeadingCall","resizeObserverPolyfill"],U_=["parentRef","resize"];function Mo(e){return e&&e.__esModule?e:{default:e}}function ei(){return ei=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},ei.apply(this,arguments)}function ch(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var q_={width:"100%",height:"100%"};function fh(e){var t=e.className,n=e.children,r=e.debounceTime,a=e.ignoreDimensions,i=e.initialSize,s=e.parentSizeStyles,o=s===void 0?q_:s,l=e.enableDebounceLeadingCall,u=l===void 0?!0:l,c=e.resizeObserverPolyfill,f=ch(e,H_),h=(0,B_.default)({initialSize:i,debounceTime:r,ignoreDimensions:a,enableDebounceLeadingCall:u,resizeObserverPolyfill:c}),p=h.parentRef,d=h.resize,v=ch(h,U_);return W_.default.createElement("div",ei({style:o,ref:p,className:t},f),n(ei({},v,{ref:p.current,resize:d})))}fh.propTypes={className:uh.default.string,children:uh.default.func.isRequired};var hh=m.createContext(null);function ft(e,t,n){var r=m.useContext(hh),a=m.useRef();a.current=n;var i=m.useCallback(function(s,o,l){r&&r.emit(s,{event:o,svgPoint:gx(o),source:l})},[r]);return m.useEffect(function(){if(r&&e&&t){var s=function(l){var u;(!a.current||l!=null&&l.source&&(u=a.current)!=null&&u.includes(l.source))&&t(l)};return r.on(e,s),function(){return r==null?void 0:r.off(e,s)}}},[r,e,t]),r?i:null}function Y_(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}function V_(e){var t=e.children,n=m.useMemo(function(){return Y_()},[]);return m.createElement(hh.Provider,{value:n},t)}function $o(){return $o=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},$o.apply(this,arguments)}function dh(e){var t=e.hideTooltipDebounceMs,n=t===void 0?400:t,r=e.children,a=Wx(void 0),i=a.tooltipOpen,s=a.tooltipLeft,o=a.tooltipTop,l=a.tooltipData,u=a.updateTooltip,c=a.hideTooltip,f=m.useRef(null);function h(){f.current&&(f.current.cancel(),f.current=null)}m.useEffect(function(){return h},[]);var p=m.useRef(function(x){var g=x.svgPoint,b=x.index,_=x.key,M=x.datum,y=x.distanceX,S=x.distanceY;h();var T=Se(y)?y:1/0,$=Se(S)?S:1/0,k=Math.sqrt(Math.pow(T,2)+Math.pow($,2));u(function(C){var P,N,A,R=C.tooltipData,X=R!=null&&R.nearestDatum&&Se(R.nearestDatum.distance)?R.nearestDatum.distance:1/0;return{tooltipOpen:!0,tooltipLeft:g==null?void 0:g.x,tooltipTop:g==null?void 0:g.y,tooltipData:{nearestDatum:((P=R==null||(N=R.nearestDatum)==null?void 0:N.key)!=null?P:"")!==_&&X<k?R==null?void 0:R.nearestDatum:{key:_,index:b,datum:M,distance:k},datumByKey:$o({},R==null?void 0:R.datumByKey,(A={},A[_]={datum:M,index:b,key:_},A))}}})}),d=m.useCallback(function(){f.current=D_(c,n),f.current()},[c,n]),v=m.useMemo(function(){return{tooltipOpen:i,tooltipLeft:s,tooltipTop:o,tooltipData:l,updateTooltip:u,showTooltip:p.current,hideTooltip:d}},[d,l,s,i,o,u]);return m.createElement(Un.Provider,{value:v},r)}dh.propTypes={hideTooltipDebounceMs:w.number,children:w.node.isRequired};const G_=pt(og);var Yn={},Co={};Co.__esModule=!0,Co.default=K_;function K_(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}var Eo={};Eo.__esModule=!0,Eo.default=X_;function X_(e,t){t.range&&("padding"in e,e.range(t.range))}var Po={};Po.__esModule=!0,Po.default=Z_;function Z_(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}var No={};No.__esModule=!0,No.default=Q_;function Q_(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}var Lo={};Lo.__esModule=!0,Lo.default=J_;function J_(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}var Ao={};Ao.__esModule=!0,Ao.default=ew;function ew(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}var Do={};Do.__esModule=!0,Do.default=tw;function tw(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}var zo={},jo={};const ph=pt(pg);jo.__esModule=!0,jo.default=nw;var ht=ph,vh={lab:ht.interpolateLab,hcl:ht.interpolateHcl,"hcl-long":ht.interpolateHclLong,hsl:ht.interpolateHsl,"hsl-long":ht.interpolateHslLong,cubehelix:ht.interpolateCubehelix,"cubehelix-long":ht.interpolateCubehelixLong,rgb:ht.interpolateRgb};function nw(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return vh[e]}var t=e.type,n=e.gamma,r=vh[t];return typeof n>"u"?r:r.gamma(n)}zo.__esModule=!0,zo.default=aw;var rw=iw(jo);function iw(e){return e&&e.__esModule?e:{default:e}}function aw(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=(0,rw.default)(t.interpolate);e.interpolate(n)}}var Fo={};const ow=pt(gg);var Io={};Io.__esModule=!0,Io.default=uw;var sw=new Date(Date.UTC(2020,1,2,3,4,5)),lw="%Y-%m-%d %H:%M";function uw(e){var t=e.tickFormat(1,lw)(sw);return t==="2020-02-02 03:04"}Fo.__esModule=!0,Fo.default=hw;var Te=ow,cw=fw(Io);function fw(e){return e&&e.__esModule?e:{default:e}}var mh={day:Te.timeDay,hour:Te.timeHour,minute:Te.timeMinute,month:Te.timeMonth,second:Te.timeSecond,week:Te.timeWeek,year:Te.timeYear},gh={day:Te.utcDay,hour:Te.utcHour,minute:Te.utcMinute,month:Te.utcMonth,second:Te.utcSecond,week:Te.utcWeek,year:Te.utcYear};function hw(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,a=(0,cw.default)(r);if(typeof n=="string")r.nice(a?gh[n]:mh[n]);else{var i=n.interval,s=n.step,o=(a?gh[i]:mh[i]).every(s);o!=null&&r.nice(o)}}}}var Ro={};Ro.__esModule=!0,Ro.default=dw;function dw(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}var Wo={};Wo.__esModule=!0,Wo.default=pw;function pw(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}var Bo={};Bo.__esModule=!0,Bo.default=mw;var vw=ph;function mw(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(vw.interpolateRound))}var Ho={};Ho.__esModule=!0,Ho.default=gw;function gw(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}var Uo={};Uo.__esModule=!0,Uo.default=yw;function yw(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],a=n[1],i=a<r,s=i?[a,r]:[r,a],o=s[0],l=s[1],u=[Math.min(0,o),Math.max(0,l)];e.domain(i?u.reverse():u)}}Yn.__esModule=!0,Yn.ALL_OPERATORS=void 0,Yn.default=Aw;var bw=Oe(Co),xw=Oe(Eo),_w=Oe(Po),ww=Oe(No),Sw=Oe(Lo),Tw=Oe(Ao),Ow=Oe(Do),kw=Oe(zo),Mw=Oe(Fo),$w=Oe(Ro),Cw=Oe(Wo),Ew=Oe(Bo),Pw=Oe(Ho),Nw=Oe(Uo);function Oe(e){return e&&e.__esModule?e:{default:e}}var yh=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"];Yn.ALL_OPERATORS=yh;var Lw={domain:bw.default,nice:Mw.default,zero:Nw.default,interpolate:kw.default,round:Ew.default,align:_w.default,base:ww.default,clamp:Sw.default,constant:Tw.default,exponent:Ow.default,padding:$w.default,range:xw.default,reverse:Cw.default,unknown:Pw.default};function Aw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),a=yh.filter(function(i){return r.has(i)});return function(s,o){return typeof o<"u"&&a.forEach(function(l){Lw[l](s,o)}),s}}var Dw=Rw,zw=G_,jw=Fw(Yn);function Fw(e){return e&&e.__esModule?e:{default:e}}var Iw=(0,jw.default)("domain","range","reverse","unknown");function Rw(e){return Iw((0,zw.scaleOrdinal)(),e)}var dt={red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e8f7ff","#ccedff","#a3daff","#72c3fc","#4dadf7","#329af0","#228ae6","#1c7cd6","#1b6ec2","#1862ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"]},Vn=dt.gray,qo=Vn[7],Ww=[dt.cyan[9],dt.cyan[3],dt.yellow[5],dt.red[4],dt.grape[8],dt.grape[5],dt.pink[9]];function ae(){return ae=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},ae.apply(this,arguments)}var Yo={fontFamily:"-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif",fontWeight:700,fontSize:12,textAnchor:"middle",pointerEvents:"none",letterSpacing:.4};function Bw(e){var t,n,r,a,i,s,o=ae({},Yo,{fill:qo,stroke:"none"},e.svgLabelBig),l=ae({},Yo,{fontWeight:200,fontSize:11,fill:qo,stroke:"none"},e.svgLabelSmall),u=ae({color:(t=(n=(r=(a=e.htmlLabel)==null?void 0:a.color)!=null?r:(i=e.svgLabelBig)==null?void 0:i.fill)!=null?n:(s=e.svgLabelSmall)==null?void 0:s.fill)!=null?t:qo},Yo,e.htmlLabel);return{backgroundColor:e.backgroundColor,colors:[].concat(e.colors),htmlLabel:ae({},u),svgLabelSmall:ae({},l),svgLabelBig:ae({},o),gridStyles:ae({stroke:e.gridColor,strokeWidth:1},e.gridStyles),axisStyles:{x:{top:{axisLabel:ae({},o,{dy:"-0.25em"}),axisLine:ae({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:ae({},l,{dy:"-0.25em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)},bottom:{axisLabel:ae({},o,{dy:"-0.25em"}),axisLine:ae({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:ae({},l,{dy:"0.125em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)}},y:{left:{axisLabel:ae({},o,{dx:"-1.25em"}),axisLine:ae({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:ae({},l,{textAnchor:"end",dx:"-0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)},right:{axisLabel:ae({},o,{dx:"1.25em"}),axisLine:ae({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:ae({},l,{textAnchor:"start",dx:"0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)}}}}}const Hw=Bw({backgroundColor:"#fff",colors:Ww,tickLength:4,svgLabelSmall:{fill:Vn[7]},svgLabelBig:{fill:Vn[9]},gridColor:Vn[5],gridColorDark:Vn[9]});var Uw=m.createContext(Hw),qw=function(){function e(){this.registry={},this.registryKeys=[]}var t=e.prototype;return t.registerData=function(r){var a=this,i=Array.isArray(r)?r:[r];i.forEach(function(s){s.key in a.registry&&a.registry[s.key]!=null&&console.debug("Overriding data registry key",s.key),a.registry[s.key]=s,a.registryKeys=Object.keys(a.registry)})},t.unregisterData=function(r){var a=this,i=Array.isArray(r)?r:[r];i.forEach(function(s){delete a.registry[s],a.registryKeys=Object.keys(a.registry)})},t.entries=function(){return Object.values(this.registry)},t.get=function(r){return this.registry[r]},t.keys=function(){return this.registryKeys},e}();function Yw(){var e=m.useState(Math.random()),t=e[1],n=m.useMemo(function(){return new qw},[]);return m.useMemo(function(){return{registerData:function(){n.registerData.apply(n,arguments),t(Math.random())},unregisterData:function(){n.unregisterData.apply(n,arguments),t(Math.random())},entries:function(){return n.entries()},get:function(a){return n.get(a)},keys:function(){return n.keys()}}},[n])}var Vo={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};function Vw(e){var t=m.useState({width:(e==null?void 0:e.width)==null?Vo.width:e.width,height:(e==null?void 0:e.height)==null?Vo.height:e.height,margin:(e==null?void 0:e.margin)==null?Vo.margin:e.margin}),n=t[0],r=t[1],a=m.useCallback(function(i){(i.width!==n.width||i.height!==n.height||i.margin.left!==n.margin.left||i.margin.right!==n.margin.right||i.margin.top!==n.margin.top||i.margin.bottom!==n.margin.bottom)&&r(i)},[n.width,n.height,n.margin.left,n.margin.right,n.margin.bottom,n.margin.top]);return[n,a]}function Go(e){return(e==null?void 0:e.type)==="band"||(e==null?void 0:e.type)==="ordinal"||(e==null?void 0:e.type)==="point"}function Qt(){return Qt=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},Qt.apply(this,arguments)}function Gw(e){var t=e.dataRegistry,n=e.xRange,r=e.xScaleConfig,a=e.yRange,i=e.yScaleConfig,s=t.keys(),o=n[0],l=n[1],u=a[0],c=a[1],f=m.useMemo(function(){var p=s.map(function(g){return t.get(g)}),d=p.reduce(function(g,b){return b?g.concat(b.data.map(function(_){return b.xAccessor(_)})):g},[]);if(d.length!==0){var v=Go(r)?d:hl(d),x=za(r)?$n(Qt({range:[o,l],domain:v,zero:!0},r)):$n(Qt({range:[o,l],domain:v},r));return p.forEach(function(g){g!=null&&g.xScale&&(x=g.xScale(x))}),x}},[t,r,s,o,l]),h=m.useMemo(function(){var p=s.map(function(g){return t.get(g)}),d=p.reduce(function(g,b){return b?g.concat(b.data.map(function(_){return b.yAccessor(_)})):g},[]);if(d.length!==0){var v=Go(i)?d:hl(d),x=za(i)?$n(Qt({range:[u,c],domain:v,zero:!0},i)):$n(Qt({range:[u,c],domain:v},i));return p.forEach(function(g){g!=null&&g.yScale&&(x=g.yScale(x))}),x}},[t,i,s,u,c]);return{xScale:f,yScale:h}}function bh(e){var t=e.initialDimensions,n=e.theme,r=e.xScale,a=e.yScale,i=e.children,s=e.horizontal,o=s===void 0?"auto":s,l=e.resizeObserverPolyfill,u=m.useContext(Uw),c=n||u,f=Vw(t),h=f[0],p=h.width,d=h.height,v=h.margin,x=f[1],g=Math.max(0,p-v.left-v.right),b=Math.max(0,d-v.top-v.bottom),_=Yw(),M=Gw({dataRegistry:_,xScaleConfig:r,yScaleConfig:a,xRange:[v.left,Math.max(0,p-v.right)],yRange:[Math.max(0,d-v.bottom),v.top]}),y=M.xScale,S=M.yScale,T=_.keys(),$=m.useMemo(function(){return Dw({domain:T,range:c.colors})},[T,c.colors]),k=o==="auto"?Go(a)||a.type==="time"||a.type==="utc":o,C=m.useMemo(function(){return{dataRegistry:_,registerData:_.registerData,unregisterData:_.unregisterData,xScale:y,yScale:S,colorScale:$,theme:c,width:p,height:d,margin:v,innerWidth:g,innerHeight:b,setDimensions:x,horizontal:k,resizeObserverPolyfill:l}},[$,_,d,k,b,g,v,x,c,p,y,S,l]);return m.createElement(Ue.Provider,{value:C},i)}bh.propTypes={children:w.node.isRequired,horizontal:w.oneOfType([w.bool,w.oneOf(["auto"])])};function xh(e){var t=e.source,n=e.onPointerOut,r=n===void 0?!0:n,a=e.onPointerMove,i=a===void 0?!0:a,s=e.onPointerUp,o=s===void 0?!0:s,l=e.onPointerDown,u=l===void 0?!0:l,c=e.onFocus,f=c===void 0?!1:c,h=e.onBlur,p=h===void 0?!1:h,d=ft(),v=m.useCallback(function(y){return d==null?void 0:d("pointermove",y,t)},[d,t]),x=m.useCallback(function(y){return d==null?void 0:d("pointerout",y,t)},[d,t]),g=m.useCallback(function(y){return d==null?void 0:d("pointerup",y,t)},[d,t]),b=m.useCallback(function(y){return d==null?void 0:d("pointerdown",y,t)},[d,t]),_=m.useCallback(function(y){return d==null?void 0:d("focus",y,t)},[d,t]),M=m.useCallback(function(y){return d==null?void 0:d("blur",y,t)},[d,t]);return{onPointerMove:i?v:void 0,onFocus:f?_:void 0,onBlur:p?M:void 0,onPointerOut:r?x:void 0,onPointerUp:o?g:void 0,onPointerDown:u?b:void 0}}var Kw="GLYPHSERIES_EVENT_SOURCE",Xw="LINESERIES_EVENT_SOURCE",ti="XYCHART_EVENT_SOURCE";function _h(e){return!!e&&("clientX"in e||"changedTouches"in e)}function Zw(e){return!!e&&!_h(e)}function wh(e){var t=e.scale,n=e.accessor,r=e.scaledValue,a=e.data,i=t,s,o;if("invert"in i&&typeof i.invert=="function"){var l=ur(n).left,u=Number(i.invert(r)),c=l(a,u),f=a[c-1],h=a[c];s=!f||Math.abs(u-n(f))>Math.abs(u-n(h))?h:f,o=s===f?c-1:c}else if("step"in i&&typeof i.step<"u"){var p=t.domain(),d=t.range().map(Number),v=[].concat(d).sort(function(S,T){return S-T}),x=xl(v[0],v[1],i.step()),g=Op(x,r),b=d[0]<d[1]?p:p.reverse(),_=b[g-1],M=a.findIndex(function(S){return String(n(S))===String(_)});s=a[M],o=M}else return console.warn("[visx/xychart/findNearestDatum] encountered incompatible scale type, bailing"),null;if(s==null||o==null)return null;var y=Math.abs(Number(i(n(s)))-r);return{datum:s,index:o,distance:y}}function Qw(e){var t=e.xScale,n=e.xAccessor,r=e.yScale,a=e.yAccessor,i=e.point,s=e.data;if(!i)return null;var o=wh({scale:t,accessor:n,scaledValue:i.x,data:s});return o?{datum:o.datum,index:o.index,distanceX:o.distance,distanceY:Math.abs(Number(r(a(o.datum)))-i.y)}:null}function Jw(e){var t=e.yScale,n=e.yAccessor,r=e.xScale,a=e.xAccessor,i=e.point,s=e.data;if(!i)return null;var o=wh({scale:t,accessor:n,scaledValue:i.y,data:s});return o?{datum:o.datum,index:o.index,distanceY:o.distance,distanceX:Math.abs(Number(r(a(o.datum)))-i.x)}:null}function Ko(){return Ko=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},Ko.apply(this,arguments)}var Xo="__POINTER_EVENTS_ALL",ni="__POINTER_EVENTS_NEAREST";function Sh(e){var t=e.dataKey,n=e.findNearestDatum,r=e.onBlur,a=e.onFocus,i=e.onPointerMove,s=e.onPointerOut,o=e.onPointerUp,l=e.onPointerDown,u=e.allowedSources,c=m.useContext(Ue),f=c.width,h=c.height,p=c.horizontal,d=c.dataRegistry,v=c.xScale,x=c.yScale,g=n||(p?Jw:Qw),b=m.useCallback(function(k){var C=k||{},P=C.svgPoint,N=C.event,A={},R=null,X=1/0;if(k&&N&&P&&f&&h&&v&&x){var U,Z=t===ni||t===Xo,ee=Z?(U=d==null?void 0:d.keys())!=null?U:[]:Array.isArray(t)?t:[t];ee.forEach(function(E){var D=d==null?void 0:d.get(E);if(D){var B=g({dataKey:E,data:D.data,height:h,point:P,width:f,xAccessor:D.xAccessor,xScale:v,yAccessor:D.yAccessor,yScale:x});if(B&&(A[E]=Ko({key:E,svgPoint:P,event:N},B),t===ni)){var W,F,I=Math.sqrt(((W=B.distanceX)!=null?W:Math.pow(1/0,2))+((F=B.distanceY)!=null?F:Math.pow(1/0,2)));R=I<X?A[E]:R,X=Math.min(X,I)}}});var K=t===ni?[R]:t===Xo||Array.isArray(t)?Object.values(A):[A[t]];return K.filter(function(E){return E})}return[]},[t,d,v,x,f,h,g]),_=m.useCallback(function(k){i&&b(k).forEach(function(C){return i(C)})},[b,i]),M=m.useCallback(function(k){o&&b(k).forEach(function(C){return o(C)})},[b,o]),y=m.useCallback(function(k){l&&b(k).forEach(function(C){return l(C)})},[b,l]),S=m.useCallback(function(k){a&&b(k).forEach(function(C){return a(C)})},[b,a]),T=m.useCallback(function(k){var C=k==null?void 0:k.event;C&&_h(C)&&s&&s(C)},[s]),$=m.useCallback(function(k){var C=k==null?void 0:k.event;C&&Zw(C)&&r&&r(C)},[r]);ft("pointermove",i?_:void 0,u),ft("pointerout",s?T:void 0,u),ft("pointerup",o?M:void 0,u),ft("pointerdown",l?y:void 0,u),ft("focus",a?S:void 0,u),ft("blur",r?$:void 0,u)}function ri(){return ri=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},ri.apply(this,arguments)}var eS={top:50,right:50,bottom:50,left:50},tS=[ti];function Jt(e){var t=e.accessibilityLabel,n=t===void 0?"XYChart":t,r=e.captureEvents,a=r===void 0?!0:r,i=e.children,s=e.height,o=e.horizontal,l=e.margin,u=l===void 0?eS:l,c=e.onPointerMove,f=e.onPointerOut,h=e.onPointerUp,p=e.onPointerDown,d=e.pointerEventsDataKey,v=d===void 0?"nearest":d,x=e.theme,g=e.width,b=e.xScale,_=e.yScale,M=e.resizeObserverPolyfill,y=m.useContext(Ue),S=y.setDimensions,T=y.resizeObserverPolyfill,$=m.useContext(Un),k=ft();m.useEffect(function(){S&&g!=null&&s!=null&&g>0&&s>0&&S({width:g,height:s,margin:u})},[S,g,s,u]);var C=xh({source:ti});return Sh({dataKey:v==="nearest"?ni:Xo,onPointerMove:c,onPointerOut:f,onPointerUp:h,onPointerDown:p,allowedSources:tS}),S?g==null||s==null?m.createElement(R_,{resizeObserverPolyfill:T},function(P){return m.createElement(Jt,ri({},e,{width:e.width==null?P.width:e.width,height:e.height==null?P.height:e.height}))}):$==null?m.createElement(dh,null,m.createElement(Jt,e)):k==null?m.createElement(V_,null,m.createElement(Jt,e)):g<=0||s<=0?(process.env.NODE_ENV==="development"&&console.info("XYChart has a zero width or height, bailing",{width:g,height:s}),null):m.createElement("svg",{width:g,height:s,"aria-label":n},i,a&&m.createElement("rect",ri({x:u.left,y:u.top,width:g-u.left-u.right,height:s-u.top-u.bottom,fill:"transparent"},C))):!b||!_?(console.warn("[@visx/xychart] XYChart: When no DataProvider is available in context, you must pass xScale & yScale config to XYChart."),null):m.createElement(bh,{xScale:b,yScale:_,theme:x,initialDimensions:{width:g,height:s,margin:u},horizontal:o,resizeObserverPolyfill:M},m.createElement(Jt,e))}Jt.propTypes={accessibilityLabel:w.string,captureEvents:w.bool,width:w.number,height:w.number,children:w.node.isRequired,horizontal:w.oneOfType([w.bool,w.oneOf(["auto"])]),onPointerMove:w.func,onPointerOut:w.func,onPointerUp:w.func,onPointerDown:w.func,pointerEventsDataKey:w.oneOf(["all","nearest"])};var nS=sS,Zo=Th(m),rS=Th(nn),iS=ct,aS=["children","data","x","y","fill","className","curve","innerRef","defined"];function Th(e){return e&&e.__esModule?e:{default:e}}function Qo(){return Qo=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},Qo.apply(this,arguments)}function oS(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function sS(e){var t=e.children,n=e.data,r=n===void 0?[]:n,a=e.x,i=e.y,s=e.fill,o=s===void 0?"transparent":s,l=e.className,u=e.curve,c=e.innerRef,f=e.defined,h=f===void 0?function(){return!0}:f,p=oS(e,aS),d=(0,iS.line)({x:a,y:i,defined:h,curve:u});return t?Zo.default.createElement(Zo.default.Fragment,null,t({path:d})):Zo.default.createElement("path",Qo({ref:c,className:(0,rS.default)("visx-linepath",l),d:d(r)||"",fill:o,strokeLinecap:"round"},p))}function Jo(){return Jo=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},Jo.apply(this,arguments)}function Oh(e){function t(n){var r=n.dataKey,a=n.data,i=n.xAccessor,s=n.yAccessor,o=m.useContext(Ue),l=o.xScale,u=o.yScale,c=o.dataRegistry;m.useEffect(function(){return c&&c.registerData({key:r,data:a,xAccessor:i,yAccessor:s}),function(){return c==null?void 0:c.unregisterData(r)}},[c,r,a,i,s]);var f=c==null?void 0:c.get(r);if(!l||!u||!f)return null;var h=e;return m.createElement(h,Jo({},n,{xScale:l,yScale:u,data:f.data,xAccessor:f.xAccessor,yAccessor:f.yAccessor}))}return t}function ii(e,t,n){return n===void 0&&(n="center"),function(r){var a=e(t(r));if(Se(a)){var i=(n==="start"?0:po(e))/(n==="center"?2:1);return a+i}return NaN}}function kh(e){var t,n=e.dataKey,r=e.enableEvents,a=e.findNearestDatum,i=e.onBlur,s=e.onFocus,o=e.onPointerMove,l=e.onPointerOut,u=e.onPointerUp,c=e.onPointerDown,f=e.source,h=e.allowedSources,p=(t=m.useContext(Un))!=null?t:{},d=p.showTooltip,v=p.hideTooltip,x=m.useCallback(function(y){d(y),o&&o(y)},[d,o]),g=m.useCallback(function(y){d(y),s&&s(y)},[d,s]),b=m.useCallback(function(y){v(),y&&l&&l(y)},[v,l]),_=m.useCallback(function(y){v(),y&&i&&i(y)},[v,i]),M=m.useCallback(function(y){d(y),c&&c(y)},[d,c]);return Sh({dataKey:n,findNearestDatum:a,onBlur:r?_:void 0,onFocus:r?g:void 0,onPointerMove:r?x:void 0,onPointerOut:r?b:void 0,onPointerUp:r?u:void 0,onPointerDown:r?M:void 0,allowedSources:h}),xh({source:f,onBlur:!!i&&r,onFocus:!!s&&r,onPointerMove:!!o&&r,onPointerOut:!!l&&r,onPointerUp:!!u&&r,onPointerDown:!!c&&r})}function es(){return es=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},es.apply(this,arguments)}function ts(e){var t,n,r,a=e.colorAccessor,i=e.data,s=e.dataKey,o=e.onBlur,l=e.onFocus,u=e.onPointerMove,c=e.onPointerOut,f=e.onPointerUp,h=e.onPointerDown,p=e.enableEvents,d=p===void 0?!0:p,v=e.renderGlyphs,x=e.size,g=x===void 0?8:x,b=e.xAccessor,_=e.xScale,M=e.yAccessor,y=e.yScale,S=m.useContext(Ue),T=S.colorScale,$=S.theme,k=S.horizontal,C=m.useMemo(function(){return ii(_,b)},[_,b]),P=m.useMemo(function(){return ii(y,M)},[y,M]),N=(t=(n=T==null?void 0:T(s))!=null?n:$==null||(r=$.colors)==null?void 0:r[0])!=null?t:"#222",A=Kw+"-"+s,R=kh({dataKey:s,enableEvents:d,onBlur:o,onFocus:l,onPointerMove:u,onPointerOut:c,onPointerUp:f,onPointerDown:h,source:A,allowedSources:[ti,A]}),X=m.useMemo(function(){return i.map(function(U,Z){var ee,K=C(U);if(!Se(K))return null;var E=P(U);return Se(E)?{key:""+Z,x:K,y:E,color:(ee=a==null?void 0:a(U,Z))!=null?ee:N,size:typeof g=="function"?g(U):g,datum:U}:null}).filter(function(U){return U})},[N,a,i,C,P,g]);return m.createElement(m.Fragment,null,v(es({glyphs:X,xScale:_,yScale:y,horizontal:k},R)))}ts.propTypes={colorAccessor:w.func,size:w.oneOfType([w.number,w.func]),renderGlyphs:w.func.isRequired};const lS=Oh(ts);function Mh(e){var t=e.key,n=e.color,r=e.x,a=e.y,i=e.size,s=e.onBlur,o=e.onFocus,l=e.onPointerMove,u=e.onPointerOut,c=e.onPointerUp;return m.createElement("circle",{className:"visx-circle-glyph",key:t,tabIndex:s||o?0:void 0,fill:n,r:i/2,cx:r,cy:a,onBlur:s,onFocus:o,onPointerMove:l,onPointerOut:u,onPointerUp:c})}var uS=["renderGlyph"];function ai(){return ai=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},ai.apply(this,arguments)}function cS(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function fS(e){var t=e.renderGlyph,n=t===void 0?Mh:t,r=cS(e,uS),a=m.useCallback(function(i){var s=i.glyphs,o=i.onPointerMove,l=i.onPointerOut,u=i.onPointerUp,c=i.onFocus,f=i.onBlur;return s.map(function(h){return m.createElement(m.Fragment,{key:h.key},n(ai({},h,{onPointerMove:o,onPointerOut:l,onPointerUp:u,onFocus:c,onBlur:f})))})},[n]);return m.createElement(lS,ai({},r,{renderGlyphs:a}))}var hS=["colorAccessor","curve","data","dataKey","onBlur","onFocus","onPointerMove","onPointerOut","onPointerUp","onPointerDown","enableEvents","xAccessor","xScale","yAccessor","yScale","PathComponent"];function Gn(){return Gn=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},Gn.apply(this,arguments)}function dS(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function $h(e){var t,n,r,a=e.colorAccessor,i=e.curve,s=e.data,o=e.dataKey,l=e.onBlur,u=e.onFocus,c=e.onPointerMove,f=e.onPointerOut,h=e.onPointerUp,p=e.onPointerDown,d=e.enableEvents,v=d===void 0?!0:d,x=e.xAccessor,g=e.xScale,b=e.yAccessor,_=e.yScale,M=e.PathComponent,y=M===void 0?"path":M,S=dS(e,hS),T=m.useContext(Ue),$=T.colorScale,k=T.theme,C=m.useMemo(function(){return ii(g,x)},[g,x]),P=m.useMemo(function(){return ii(_,b)},[_,b]),N=m.useCallback(function(ee){return Se(g(x(ee)))&&Se(_(b(ee)))},[g,x,_,b]),A=(t=(n=$==null?void 0:$(o))!=null?n:k==null||(r=k.colors)==null?void 0:r[0])!=null?t:"#222",R=Xw+"-"+o,X=kh({dataKey:o,enableEvents:v,onBlur:l,onFocus:u,onPointerMove:c,onPointerOut:f,onPointerUp:h,onPointerDown:p,source:R,allowedSources:[ti,R]}),U=!!(u||l),Z=m.useCallback(function(ee){var K=ee.glyphs;return U?K.map(function(E){return m.createElement(m.Fragment,{key:E.key},Mh(Gn({},E,{color:"transparent",onFocus:X.onFocus,onBlur:X.onBlur})))}):null},[U,X.onFocus,X.onBlur]);return m.createElement(m.Fragment,null,m.createElement(nS,Gn({x:C,y:P,defined:N,curve:i},S),function(ee){var K,E=ee.path;return m.createElement(y,Gn({stroke:(K=a==null?void 0:a(o))!=null?K:A,strokeWidth:2,fill:"transparent",strokeLinecap:"round"},S,{d:E(s)||""},X))}),U&&m.createElement(ts,{dataKey:o,data:s,xAccessor:x,yAccessor:b,xScale:g,yScale:_,renderGlyphs:Z}))}$h.propTypes={colorAccessor:w.func};const pS=Oh($h);function vS(e){return m.createElement(pS,e)}const mS={lines:"LinesChartProps[]",barTooltip:"(props: LineTooltipProps) => JSX.Element",grid:"GridProps",labels:"Array<string>",xAxis:"CommonProps<AxisScale>",xScale:"ScaleConfig<AxisScaleOutput, any, any>",yAxis:"CommonProps<AxisScale>",yScale:"ScaleConfig<AxisScaleOutput, any, any>"};function ns(e){const t=tn.useElementId(),{lines:n=[],xScale:r,yScale:a,xAxis:i,yAxis:s,grid:o,labels:l,barTooltip:u}=e,c={xAccessor:p=>p.x,yAccessor:p=>p.y},f=p=>l[p],h=Cr({domain:n.map(p=>p.name),range:n.map(p=>Zn.colors[p.color])});return z.createElement(z.Fragment,null,z.createElement(Cf,{className:"fs-12 lh-18 gray600",scale:h,direction:"row",shape:"rect",shapeWidth:30,shapeHeight:4,shapeMargin:"0 5px 0 0",shapeStyle:()=>({borderRadius:"2px"}),labelMargin:"0",itemMargin:"0 10px 0 10px",style:{display:"flex",justifyContent:"center",fontSize:"16px"}}),z.createElement(Jt,{height:300,xScale:r,yScale:a},z.createElement(Gf,{strokeWidth:"1",orientation:"bottom",tickFormat:f,...i}),z.createElement(Gf,{orientation:"left",...s}),z.createElement(Fx,{...o}),n.map((p,d)=>z.createElement(z.Fragment,{key:`${t.current}${d}`},z.createElement(fS,{dataKey:p.name,colorAccessor:()=>Zn.colors[p.color],data:[p.data],...c}),z.createElement(vS,{dataKey:p.name,stroke:Zn.colors[p.color],strokeDasharray:p.strokeDashArray?"4,3":"",data:p.data,...c}))),z.createElement(rh,{snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,className:"bg-dark white",renderTooltip:({tooltipData:p})=>{var d,v,x;return z.createElement(z.Fragment,null,u&&z.createElement(u,{yAxisName:(d=p==null?void 0:p.nearestDatum)==null?void 0:d.key,xLineName:l[c.xAccessor((v=p==null?void 0:p.nearestDatum)==null?void 0:v.datum)],value:c.yAccessor((x=p==null?void 0:p.nearestDatum)==null?void 0:x.datum)}))}})))}Object.assign(ns,{props:mS,displayName:"SpsLineChart"});const Ch={basic:{label:"Basic",description:()=>z.createElement(z.Fragment,null,z.createElement("p",null,"Line chart example."),z.createElement("p",null,z.createElement("code",null,"<grid>")," allows override grid property. Optional. Type of ",z.createElement("code",null,"GridProps")," which comes from",z.createElement("code",null,"@visx/xychart/lib/components/grid/Grid")," package, which is a peer dependency of our React components."),z.createElement("p",null,z.createElement("code",null,"<xAxis>")," and ",z.createElement("code",null,"<yAxis>")," allow override X/Y axes property. Optional. Type of",z.createElement("code",null,"CommonProps<AxisScale>")," which comes from",z.createElement("code",null,"@visx/axis/lib/types")," package, which is a peer dependency of our React components."),z.createElement("p",null,z.createElement("code",null,"<xScale>")," and ",z.createElement("code",null,"<yScale>")," allow override scale configuration for X/Y axes. Type of",z.createElement("code",null,"ScaleConfig<AxisScaleOutput, any, any>")," comes from",z.createElement("code",null,"@visx/scale")," and ",z.createElement("code",null,"@visx/axis")," packages, which is a peer dependency of our React components.")),examples:{basic:{react:tt.code`
167
+ `}}}};function Cf(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function tx({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const a=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!a)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[i,s]=v.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),o=v.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:i,orientationHandler:null}),u=e?typeof e=="number"?e:e.scroll:null,l=e?typeof e=="number"?e:e.resize:null,c=v.useRef(!1);v.useEffect(()=>(c.current=!0,()=>void(c.current=!1)));const[f,h,p]=v.useMemo(()=>{const g=()=>{if(!o.current.element)return;const{left:x,top:_,width:M,height:y,bottom:S,right:T,x:E,y:k}=o.current.element.getBoundingClientRect(),$={left:x,top:_,width:M,height:y,bottom:S,right:T,x:E,y:k};o.current.element instanceof HTMLElement&&r&&($.height=o.current.element.offsetHeight,$.width=o.current.element.offsetWidth),Object.freeze($),c.current&&!ax(o.current.lastBounds,$)&&s(o.current.lastBounds=$)};return[g,l?Cf(g,l):g,u?Cf(g,u):g]},[s,r,u,l]);function d(){o.current.scrollContainers&&(o.current.scrollContainers.forEach(g=>g.removeEventListener("scroll",p,!0)),o.current.scrollContainers=null),o.current.resizeObserver&&(o.current.resizeObserver.disconnect(),o.current.resizeObserver=null),o.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",o.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",o.current.orientationHandler))}function m(){o.current.element&&(o.current.resizeObserver=new a(p),o.current.resizeObserver.observe(o.current.element),t&&o.current.scrollContainers&&o.current.scrollContainers.forEach(g=>g.addEventListener("scroll",p,{capture:!0,passive:!0})),o.current.orientationHandler=()=>{p()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",o.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",o.current.orientationHandler))}const b=g=>{!g||g===o.current.element||(d(),o.current.element=g,o.current.scrollContainers=Pf(g),m())};return rx(p,!!t),nx(h),v.useEffect(()=>{d(),m()},[t,p,h]),v.useEffect(()=>d,[]),[b,i,f]}function nx(e){v.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function rx(e,t){v.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function Pf(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:a}=window.getComputedStyle(e);return[n,r,a].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...Pf(e.parentElement)]}const ix=["x","y","top","bottom","left","right","width","height"],ax=(e,t)=>ix.every(n=>e[n]===t[n]),Nf=pt(f1);function ox(e){return!!e&&(e instanceof SVGElement||"ownerSVGElement"in e)}function sx(e){return!!e&&"createSVGPoint"in e}function ux(e){return!!e&&"getScreenCTM"in e}function lx(e){return!!e&&"changedTouches"in e}function cx(e){return!!e&&"clientX"in e}function fx(e){return!!e&&(e instanceof Event||"nativeEvent"in e&&e.nativeEvent instanceof Event)}function Wn(){return Wn=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},Wn.apply(this,arguments)}var fo={x:0,y:0};function hx(e){if(!e)return Wn({},fo);if(lx(e))return e.changedTouches.length>0?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:Wn({},fo);if(cx(e))return{x:e.clientX,y:e.clientY};var t=e==null?void 0:e.target,n=t&&"getBoundingClientRect"in t?t.getBoundingClientRect():null;return n?{x:n.x+n.width/2,y:n.y+n.height/2}:Wn({},fo)}function dx(e,t){if(!e||!t)return null;var n=hx(t),r=ox(e)?e.ownerSVGElement:e,a=ux(r)?r.getScreenCTM():null;if(sx(r)&&a){var i=r.createSVGPoint();return i.x=n.x,i.y=n.y,i=i.matrixTransform(a.inverse()),new Be({x:i.x,y:i.y})}var s=e.getBoundingClientRect();return new Be({x:n.x-s.left-e.clientLeft,y:n.y-s.top-e.clientTop})}function px(e,t){if(fx(e)){var n=e,r=n.target;if(r)return dx(r,n)}return null}var Ue=v.createContext({});function ho(e){var t,n=e;return n&&"bandwidth"in n&&(t=n==null?void 0:n.bandwidth())!=null?t:0}function Se(e){return e!=null&&typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e)}const Lf=pt(ap),Af=pt(Uv);var mx=["AxisComponent"];function Yr(){return Yr=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},Yr.apply(this,arguments)}function gx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function vx(e){var t,n,r,a,i,s,o,u=e.AxisComponent,l=gx(e,mx),c=v.useContext(Ue),f=c.theme,h=c.xScale,p=c.yScale,d=c.margin,m=c.width,b=c.height,g=l.orientation,x=v.useMemo(function(){var E,k,$,P;return g==="left"||g==="right"?f==null||(E=f.axisStyles)==null||(k=E.y)==null?void 0:k[g]:f==null||($=f.axisStyles)==null||(P=$.x)==null?void 0:P[g]},[f,g]),_=l.tickLabelProps,M=v.useMemo(function(){return _||x?function(E,k,$){return Yr({},x==null?void 0:x.tickLabel,{width:g==="left"||g==="right"?d==null?void 0:d[g]:void 0},typeof _=="function"?_(E,k,$):_)}:void 0},[_,x,g,d]),y=g==="bottom"?(b??0)-((t=d==null?void 0:d.bottom)!=null?t:0):g==="top"&&(n=d==null?void 0:d.top)!=null?n:0,S=g==="left"?(r=d==null?void 0:d.left)!=null?r:0:g==="right"?(m??0)-((a=d==null?void 0:d.right)!=null?a:0):0,T=g==="left"||g==="right"?p:h;return T?v.createElement(u,Yr({top:y,left:S,labelProps:x==null?void 0:x.axisLabel,stroke:x==null||(i=x.axisLine)==null?void 0:i.stroke,strokeWidth:x==null||(s=x.axisLine)==null?void 0:s.strokeWidth,tickLength:x==null?void 0:x.tickLength,tickStroke:x==null||(o=x.tickLine)==null?void 0:o.stroke},l,{tickLabelProps:M,scale:T})):null}var Vr={};Vr.__esModule=!0,Vr.default=yx;function yx(e){return"bandwidth"in e?e.bandwidth():0}var bx=If,Df=Hn(er),jf=Hn(v),xx=Hn(nn),_x=Hn(Hr),wx=Lf,zf=Nf,Ff=Af,Sx=Hn(Vr),Tx=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function Hn(e){return e&&e.__esModule?e:{default:e}}function po(){return po=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},po.apply(this,arguments)}function Ox(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function If(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.width,o=e.stroke,u=o===void 0?"#eaf0f6":o,l=e.strokeWidth,c=l===void 0?1:l,f=e.strokeDasharray,h=e.className,p=e.children,d=e.numTicks,m=d===void 0?10:d,b=e.lineStyle,g=e.offset,x=e.tickValues,_=Ox(e,Tx),M=x??(0,Ff.getTicks)(i,m),y=(g??0)+(0,Sx.default)(i)/2,S=M.map(function(T,E){var k,$=((k=(0,Ff.coerceNumber)(i(T)))!=null?k:0)+y;return{index:E,from:new zf.Point({x:0,y:$}),to:new zf.Point({x:s,y:$})}});return jf.default.createElement(wx.Group,{className:(0,xx.default)("visx-rows",h),top:n,left:a},p?p({lines:S}):S.map(function(T){var E=T.from,k=T.to,$=T.index;return jf.default.createElement(_x.default,po({key:"row-line-"+$,from:E,to:k,stroke:u,strokeWidth:c,strokeDasharray:f,style:b},_))}))}If.propTypes={tickValues:Df.default.array,width:Df.default.number.isRequired};var kx=Uf,Rf=Bn(er),Wf=Bn(v),Mx=Bn(nn),$x=Bn(Hr),Ex=Lf,Hf=Nf,Bf=Af,Cx=Bn(Vr),Px=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function Bn(e){return e&&e.__esModule?e:{default:e}}function mo(){return mo=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},mo.apply(this,arguments)}function Nx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Uf(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.height,o=e.stroke,u=o===void 0?"#eaf0f6":o,l=e.strokeWidth,c=l===void 0?1:l,f=e.strokeDasharray,h=e.className,p=e.numTicks,d=p===void 0?10:p,m=e.lineStyle,b=e.offset,g=e.tickValues,x=e.children,_=Nx(e,Px),M=g??(0,Bf.getTicks)(i,d),y=(b??0)+(0,Cx.default)(i)/2,S=M.map(function(T,E){var k,$=((k=(0,Bf.coerceNumber)(i(T)))!=null?k:0)+y;return{index:E,from:new Hf.Point({x:$,y:0}),to:new Hf.Point({x:$,y:s})}});return Wf.default.createElement(Ex.Group,{className:(0,Mx.default)("visx-columns",h),top:n,left:a},x?x({lines:S}):S.map(function(T){var E=T.from,k=T.to,$=T.index;return Wf.default.createElement($x.default,mo({key:"column-line-"+$,from:E,to:k,stroke:u,strokeWidth:c,strokeDasharray:f,style:m},_))}))}Uf.propTypes={tickValues:Rf.default.array,height:Rf.default.number.isRequired};var Lx=["rows","columns","GridRowsComponent","GridColumnsComponent"];function Gr(){return Gr=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},Gr.apply(this,arguments)}function Ax(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function qf(e){var t=e.rows,n=t===void 0?!0:t,r=e.columns,a=r===void 0?!0:r,i=e.GridRowsComponent,s=e.GridColumnsComponent,o=Ax(e,Lx),u=v.useContext(Ue),l=u.theme,c=u.xScale,f=u.yScale,h=u.margin,p=u.innerWidth,d=u.innerHeight,m=l==null?void 0:l.gridStyles;return v.createElement(v.Fragment,null,n&&f&&p!=null&&v.createElement(i,Gr({left:h==null?void 0:h.left,lineStyle:m,width:p,scale:f},o)),a&&c&&d!=null&&v.createElement(s,Gr({top:h==null?void 0:h.top,lineStyle:m,height:d,scale:c},o)))}qf.propTypes={rows:w.bool,columns:w.bool};function go(){return go=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},go.apply(this,arguments)}function Yf(e){return v.createElement(vx,go({AxisComponent:Ka},e))}function vo(){return vo=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},vo.apply(this,arguments)}function Dx(e){return v.createElement(qf,vo({GridRowsComponent:bx,GridColumnsComponent:kx},e))}var jx=["tooltipOpen"];function zx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Kr(){return Kr=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},Kr.apply(this,arguments)}function Fx(e){var t=v.useState(Kr({tooltipOpen:!1},e)),n=t[0],r=t[1],a=v.useCallback(function(s){return r(typeof s=="function"?function(o){o.tooltipOpen;var u=zx(o,jx);return Kr({},s(u),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:s.tooltipLeft,tooltipTop:s.tooltipTop,tooltipData:s.tooltipData})},[r]),i=v.useCallback(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]);return{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:a,hideTooltip:i}}function Ix(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,yo(e,t)}function yo(e,t){return yo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},yo(e,t)}var Vf=function(e){Ix(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return!this.node&&typeof document<"u"&&(this.node=document.createElement("div"),this.props.zIndex!=null&&(this.node.style.zIndex=""+this.props.zIndex),document.body.append(this.node)),this.node?as.createPortal(this.props.children,this.node):null},t}(v.PureComponent);Vf.propTypes={zIndex:w.oneOfType([w.number,w.string])};var Rx=["className","top","left","offsetLeft","offsetTop","style","children","unstyled","applyPositionStyle"];function Xr(){return Xr=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},Xr.apply(this,arguments)}function Wx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var bo={position:"absolute",backgroundColor:"white",color:"#666666",padding:".3rem .5rem",borderRadius:"3px",fontSize:"14px",boxShadow:"0 1px 2px rgba(33,33,33,0.2)",lineHeight:"1em",pointerEvents:"none"},Zr=v.forwardRef(function(e,t){var n=e.className,r=e.top,a=e.left,i=e.offsetLeft,s=i===void 0?10:i,o=e.offsetTop,u=o===void 0?10:o,l=e.style,c=l===void 0?bo:l,f=e.children,h=e.unstyled,p=h===void 0?!1:h,d=e.applyPositionStyle,m=d===void 0?!1:d,b=Wx(e,Rx);return v.createElement("div",Xr({ref:t,className:me("visx-tooltip",n),style:Xr({top:r==null||u==null?r:r+u,left:a==null||s==null?a:a+s},m&&{position:"absolute"},!p&&c)},b),f)});Zr.propTypes={children:w.node,className:w.string,left:w.number,offsetLeft:w.number,offsetTop:w.number,top:w.number,applyPositionStyle:w.bool,unstyled:w.bool},Zr.displayName="Tooltip";function xo(){return xo=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},xo.apply(this,arguments)}function Hx(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bx(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_o(e,t)}function _o(e,t){return _o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},_o(e,t)}var Gf={top:0,right:0,bottom:0,left:0,width:0,height:0};function Ux(e){var t;return t=function(n){Bx(r,n);function r(i){var s;return s=n.call(this,i)||this,s.state={rect:void 0,parentRect:void 0},s.nodeRef=v.createRef(),s.getRects=s.getRects.bind(Hx(s)),s}var a=r.prototype;return a.componentDidMount=function(){var s,o=this;this.node=(s=this.nodeRef)!=null&&s.current?this.nodeRef.current:as.findDOMNode(this),this.setState(function(){return o.getRects()})},a.getRects=function(){if(!this.node)return this.state;var s=this.node,o=s.parentNode,u=s.getBoundingClientRect?s.getBoundingClientRect():Gf,l=o!=null&&o.getBoundingClientRect?o.getBoundingClientRect():Gf;return{rect:u,parentRect:l}},a.render=function(){return v.createElement(e,xo({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},r}(v.PureComponent),t.displayName="withBoundingRects("+(e.displayName||"")+")",t}var Kf=v.createContext({isFlippedVertically:!1,isFlippedHorizontally:!1}),qx=Kf.Provider;Kf.Consumer;var Yx=["children","getRects","left","offsetLeft","offsetTop","parentRect","rect","style","top","unstyled","nodeRef"];function Qr(){return Qr=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},Qr.apply(this,arguments)}function Vx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Xf(e){var t=e.children;e.getRects;var n=e.left,r=n===void 0?0:n,a=e.offsetLeft,i=a===void 0?10:a,s=e.offsetTop,o=s===void 0?10:s,u=e.parentRect,l=e.rect,c=e.style,f=c===void 0?bo:c,h=e.top,p=h===void 0?0:h,d=e.unstyled,m=d===void 0?!1:d,b=e.nodeRef,g=Vx(e,Yx),x,_=!1,M=!1;if(l&&u){var y=r,S=p;if(u.width){var T=y+i+l.width-u.width,E=l.width-y-i;_=T>0&&T>E}else{var k=y+i+l.width-window.innerWidth,$=l.width-y-i;_=k>0&&k>$}if(u.height){var P=S+o+l.height-u.height,N=l.height-S-o;M=P>0&&P>N}else M=S+o+l.height>window.innerHeight;y=_?y-l.width-i:y+i,S=M?S-l.height-o:S+o,y=Math.round(y),S=Math.round(S),x="translate("+y+"px, "+S+"px)"}return v.createElement(Zr,Qr({ref:b,style:Qr({left:0,top:0,transform:x},!m&&f)},g),v.createElement(qx,{value:{isFlippedVertically:!M,isFlippedHorizontally:!_}},t))}Xf.propTypes={nodeRef:w.oneOfType([w.string,w.func,w.object])};const Gx=Ux(Xf);var Kx=["detectBounds","zIndex"],Xx=["left","top","detectBounds","zIndex"];function wo(){return wo=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},wo.apply(this,arguments)}function Zf(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Zx(e){var t=e===void 0?{}:e,n=t.detectBounds,r=n===void 0?!0:n,a=t.zIndex,i=Zf(t,Kx),s=tx(i),o=s[0],u=s[1],l=s[2],c=v.useState(!1),f=c[0],h=c[1];v.useEffect(function(){h(!1)},[]);var p=v.useMemo(function(){return function(d){var m=d.left,b=m===void 0?0:m,g=d.top,x=g===void 0?0:g,_=d.detectBounds,M=d.zIndex,y=Zf(d,Xx),S=_??r,T=M??a,E=S?Gx:Zr,k=f?0:window.scrollX,$=f?0:window.scrollY,P=b+(u.left||0)+k,N=x+(u.top||0)+$;return v.createElement(Vf,{zIndex:T},v.createElement(E,wo({left:P,top:N},y)))}},[r,a,u.left,u.top,f]);return{containerRef:o,containerBounds:u,forceRefreshBounds:l,TooltipInPortal:p}}var Un=v.createContext(null),Qx=["debounce","detectBounds","horizontalCrosshairStyle","glyphStyle","renderTooltip","renderGlyph","resizeObserverPolyfill","scroll","showDatumGlyph","showHorizontalCrosshair","showSeriesGlyphs","showVerticalCrosshair","snapTooltipToDatumX","snapTooltipToDatumY","verticalCrosshairStyle","zIndex"],Jx=["x","y"];function Qf(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function et(){return et=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},et.apply(this,arguments)}var So={position:"absolute",pointerEvents:"none",fontSize:0,lineHeight:0},e_={position:"absolute",left:0,top:0,opacity:0,width:0,height:0,pointerEvents:"none"};function Jf(e){var t=v.useContext(Ue)||{},n=t.theme;return v.createElement("circle",et({cx:e.x,cy:e.y,r:e.size,fill:e.color,stroke:n==null?void 0:n.backgroundColor,strokeWidth:1.5,paintOrder:"fill"},e.glyphStyle))}Jf.propTypes={isNearestDatum:w.bool.isRequired};function t_(e){return v.createElement(Jf,e)}function eh(e){var t,n,r,a,i,s,o,u,l,c,f,h,p,d=e.debounce,m=e.detectBounds,b=e.horizontalCrosshairStyle,g=e.glyphStyle,x=e.renderTooltip,_=e.renderGlyph,M=_===void 0?t_:_,y=e.resizeObserverPolyfill,S=e.scroll,T=S===void 0?!0:S,E=e.showDatumGlyph,k=E===void 0?!1:E,$=e.showHorizontalCrosshair,P=$===void 0?!1:$,N=e.showSeriesGlyphs,A=N===void 0?!1:N,R=e.showVerticalCrosshair,X=R===void 0?!1:R,U=e.snapTooltipToDatumX,Z=U===void 0?!1:U,ee=e.snapTooltipToDatumY,K=ee===void 0?!1:ee,C=e.verticalCrosshairStyle,D=e.zIndex,H=Qf(e,Qx),W=v.useContext(Ue)||{},F=W.colorScale,I=W.theme,q=W.innerHeight,Y=W.innerWidth,G=W.margin,L=W.xScale,z=W.yScale,B=W.dataRegistry,O=W.resizeObserverPolyfill,Q=v.useContext(Un),te=Zx({debounce:d,detectBounds:m,polyfill:O||y,scroll:T,zIndex:D}),ue=te.containerRef,de=te.TooltipInPortal,qe=te.forceRefreshBounds,oi=v.useCallback(function(Pe){var Ve;ue((Ve=Pe==null?void 0:Pe.parentElement)!=null?Ve:null)},[ue]),$h=Q!=null&&Q.tooltipOpen?x(et({},Q,{colorScale:F})):null,Jt=(Q==null?void 0:Q.tooltipOpen)&&$h!=null,Eh=v.useRef(!1);v.useEffect(function(){Jt&&!Eh.current&&qe(),Eh.current=Jt},[Jt,qe]);var si=Q==null?void 0:Q.tooltipLeft,ui=Q==null?void 0:Q.tooltipTop,Ch=L?ho(L):0,Ph=z?ho(z):0,ns=v.useCallback(function(Pe,Ve){var Lt,At,Fe=B==null?void 0:B.get(Pe),Xn=Fe==null?void 0:Fe.xAccessor,li=Fe==null?void 0:Fe.yAccessor,is=L&&Xn?(Lt=Number(L(Xn(Ve)))+Ch/2)!=null?Lt:0:void 0,ci=z&&li?(At=Number(z(li(Ve)))+Ph/2)!=null?At:0:void 0;return{left:is,top:ci}},[B,Ch,Ph,L,z]),Ye=Q==null||(t=Q.tooltipData)==null?void 0:t.nearestDatum,Kn=(n=Ye==null?void 0:Ye.key)!=null?n:"";if(Jt&&Ye&&(Z||K)){var Nh=ns(Kn,Ye.datum),Lh=Nh.left,Ah=Nh.top;si=Z&&Se(Lh)?Lh:si,ui=K&&Se(Ah)?Ah:ui}var rs=[];if(Jt&&(k||A)){var Dh,jh=Number((Dh=g==null?void 0:g.radius)!=null?Dh:4);if(A){var zh,Fh;Object.values((zh=Q==null||(Fh=Q.tooltipData)==null?void 0:Fh.datumByKey)!=null?zh:{}).forEach(function(Pe){var Ve,Lt,At,Fe=Pe.key,Xn=Pe.datum,li=Pe.index,is=(Ve=(Lt=F==null?void 0:F(Fe))!=null?Lt:I==null||(At=I.htmlLabel)==null?void 0:At.color)!=null?Ve:"#222",ci=ns(Fe,Xn),Gh=ci.left,Kh=ci.top;!Se(Gh)||!Se(Kh)||rs.push({key:Fe,color:is,datum:Xn,index:li,size:jh,x:Gh,y:Kh,glyphStyle:g,isNearestDatum:Ye?Ye.key===Fe:!1})})}else if(Ye){var Ih=ns(Kn,Ye.datum),Rh=Ih.left,Wh=Ih.top;if(Se(Rh)&&Se(Wh)){var Hh,Bh,Uh,qh,Yh,Vh,mS=(Hh=(Bh=(Uh=(qh=Kn&&(F==null?void 0:F(Kn)))!=null?qh:null)!=null?Uh:I==null||(Yh=I.gridStyles)==null?void 0:Yh.stroke)!=null?Bh:I==null||(Vh=I.htmlLabel)==null?void 0:Vh.color)!=null?Hh:"#222";rs.push({key:Kn,color:mS,datum:Ye.datum,index:Ye.index,size:jh,x:Rh,y:Wh,glyphStyle:g,isNearestDatum:!0})}}}return v.createElement(v.Fragment,null,v.createElement("svg",{ref:oi,style:e_}),Jt&&v.createElement(v.Fragment,null,X&&v.createElement(de,{className:"visx-crosshair visx-crosshair-vertical",left:si,top:G==null?void 0:G.top,offsetLeft:0,offsetTop:0,detectBounds:!1,style:So},v.createElement("svg",{width:"1",height:q,overflow:"visible"},v.createElement("line",et({x1:0,x2:0,y1:0,y2:q,strokeWidth:1.5,stroke:(r=(a=I==null||(i=I.gridStyles)==null?void 0:i.stroke)!=null?a:I==null||(s=I.htmlLabel)==null?void 0:s.color)!=null?r:"#222"},C)))),P&&v.createElement(de,{className:"visx-crosshair visx-crosshair-horizontal",left:G==null?void 0:G.left,top:ui,offsetLeft:0,offsetTop:0,detectBounds:!1,style:So},v.createElement("svg",{width:Y,height:"1",overflow:"visible"},v.createElement("line",et({x1:0,x2:Y,y1:0,y2:0,strokeWidth:1.5,stroke:(o=(u=I==null||(l=I.gridStyles)==null?void 0:l.stroke)!=null?u:I==null||(c=I.htmlLabel)==null?void 0:c.color)!=null?o:"#222"},b)))),rs.map(function(Pe,Ve){var Lt=Pe.x,At=Pe.y,Fe=Qf(Pe,Jx);return v.createElement(de,{key:Ve,className:"visx-tooltip-glyph",left:Lt,top:At,offsetLeft:0,offsetTop:0,detectBounds:!1,style:So},v.createElement("svg",{overflow:"visible"},M(et({x:0,y:0},Fe))))}),v.createElement(de,et({left:si,top:ui,style:et({},bo,{background:(f=I==null?void 0:I.backgroundColor)!=null?f:"white",boxShadow:"0 1px 2px "+(I!=null&&(h=I.htmlLabel)!=null&&h.color?(I==null||(p=I.htmlLabel)==null?void 0:p.color)+"55":"#22222255")},I==null?void 0:I.htmlLabel)},H),$h)))}eh.propTypes={renderTooltip:w.func.isRequired,renderGlyph:w.func,snapTooltipToDatumX:w.bool,snapTooltipToDatumY:w.bool,showVerticalCrosshair:w.bool,showHorizontalCrosshair:w.bool,showDatumGlyph:w.bool,showSeriesGlyphs:w.bool};function th(e){var t=v.useContext(Un);return t!=null&&t.tooltipOpen?v.createElement(eh,e):null}th.propTypes={renderTooltip:w.func.isRequired,renderGlyph:w.func,snapTooltipToDatumX:w.bool,snapTooltipToDatumY:w.bool,showVerticalCrosshair:w.bool,showHorizontalCrosshair:w.bool,showDatumGlyph:w.bool,showSeriesGlyphs:w.bool};var To={},n_=Ar,r_=function(){return n_.Date.now()},i_=r_,a_=/\s/;function o_(e){for(var t=e.length;t--&&a_.test(e.charAt(t)););return t}var s_=o_,u_=s_,l_=/^\s+/;function c_(e){return e&&e.slice(0,u_(e)+1).replace(l_,"")}var f_=c_;function h_(e){return e!=null&&typeof e=="object"}var d_=h_,p_=Jc,m_=d_,g_="[object Symbol]";function v_(e){return typeof e=="symbol"||m_(e)&&p_(e)==g_}var y_=v_,b_=f_,nh=Dr,x_=y_,rh=NaN,__=/^[-+]0x[0-9a-f]+$/i,w_=/^0b[01]+$/i,S_=/^0o[0-7]+$/i,T_=parseInt;function O_(e){if(typeof e=="number")return e;if(x_(e))return rh;if(nh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=nh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=b_(e);var n=w_.test(e);return n||S_.test(e)?T_(e.slice(2),n?2:8):__.test(e)?rh:+e}var k_=O_,M_=Dr,Oo=i_,ih=k_,$_="Expected a function",E_=Math.max,C_=Math.min;function P_(e,t,n){var r,a,i,s,o,u,l=0,c=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError($_);t=ih(t)||0,M_(n)&&(c=!!n.leading,f="maxWait"in n,i=f?E_(ih(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(S){var T=r,E=a;return r=a=void 0,l=S,s=e.apply(E,T),s}function d(S){return l=S,o=setTimeout(g,t),c?p(S):s}function m(S){var T=S-u,E=S-l,k=t-T;return f?C_(k,i-E):k}function b(S){var T=S-u,E=S-l;return u===void 0||T>=t||T<0||f&&E>=i}function g(){var S=Oo();if(b(S))return x(S);o=setTimeout(g,m(S))}function x(S){return o=void 0,h&&r?p(S):(r=a=void 0,s)}function _(){o!==void 0&&clearTimeout(o),l=0,r=u=a=o=void 0}function M(){return o===void 0?s:x(Oo())}function y(){var S=Oo(),T=b(S);if(r=arguments,a=this,u=S,T){if(o===void 0)return d(u);if(f)return clearTimeout(o),o=setTimeout(g,t),p(u)}return o===void 0&&(o=setTimeout(g,t)),s}return y.cancel=_,y.flush=M,y}var ah=P_;const N_=tn(ah);To.__esModule=!0,To.default=j_;var L_=A_(ah),qn=v;function A_(e){return e&&e.__esModule?e:{default:e}}function Jr(){return Jr=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},Jr.apply(this,arguments)}var D_=[],oh={width:0,height:0,top:0,left:0};function j_(e){var t=e===void 0?{}:e,n=t.initialSize,r=n===void 0?oh:n,a=t.debounceTime,i=a===void 0?300:a,s=t.ignoreDimensions,o=s===void 0?D_:s,u=t.enableDebounceLeadingCall,l=u===void 0?!0:u,c=t.resizeObserverPolyfill,f=(0,qn.useRef)(null),h=(0,qn.useRef)(0),p=(0,qn.useState)(Jr({},oh,r)),d=p[0],m=p[1],b=(0,qn.useMemo)(function(){var g=Array.isArray(o)?o:[o];return(0,L_.default)(function(x){m(function(_){var M=Object.keys(_),y=M.filter(function(T){return _[T]!==x[T]}),S=y.every(function(T){return g.includes(T)});return S?_:x})},i,{leading:l})},[i,l,o]);return(0,qn.useEffect)(function(){var g=c||window.ResizeObserver,x=new g(function(_){_.forEach(function(M){var y,S=(y=M==null?void 0:M.contentRect)!=null?y:{},T=S.left,E=S.top,k=S.width,$=S.height;h.current=window.requestAnimationFrame(function(){b({width:k,height:$,top:E,left:T})})})});return f.current&&x.observe(f.current),function(){window.cancelAnimationFrame(h.current),x.disconnect(),b.cancel()}},[b,c]),Jr({parentRef:f,resize:b},d)}var z_=lh,sh=ko(er),F_=ko(v),I_=ko(To),R_=["className","children","debounceTime","ignoreDimensions","initialSize","parentSizeStyles","enableDebounceLeadingCall","resizeObserverPolyfill"],W_=["parentRef","resize"];function ko(e){return e&&e.__esModule?e:{default:e}}function ei(){return ei=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},ei.apply(this,arguments)}function uh(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var H_={width:"100%",height:"100%"};function lh(e){var t=e.className,n=e.children,r=e.debounceTime,a=e.ignoreDimensions,i=e.initialSize,s=e.parentSizeStyles,o=s===void 0?H_:s,u=e.enableDebounceLeadingCall,l=u===void 0?!0:u,c=e.resizeObserverPolyfill,f=uh(e,R_),h=(0,I_.default)({initialSize:i,debounceTime:r,ignoreDimensions:a,enableDebounceLeadingCall:l,resizeObserverPolyfill:c}),p=h.parentRef,d=h.resize,m=uh(h,W_);return F_.default.createElement("div",ei({style:o,ref:p,className:t},f),n(ei({},m,{ref:p.current,resize:d})))}lh.propTypes={className:sh.default.string,children:sh.default.func.isRequired};var ch=v.createContext(null);function ft(e,t,n){var r=v.useContext(ch),a=v.useRef();a.current=n;var i=v.useCallback(function(s,o,u){r&&r.emit(s,{event:o,svgPoint:px(o),source:u})},[r]);return v.useEffect(function(){if(r&&e&&t){var s=function(u){var l;(!a.current||u!=null&&u.source&&(l=a.current)!=null&&l.includes(u.source))&&t(u)};return r.on(e,s),function(){return r==null?void 0:r.off(e,s)}}},[r,e,t]),r?i:null}function B_(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}function U_(e){var t=e.children,n=v.useMemo(function(){return B_()},[]);return v.createElement(ch.Provider,{value:n},t)}function Mo(){return Mo=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},Mo.apply(this,arguments)}function fh(e){var t=e.hideTooltipDebounceMs,n=t===void 0?400:t,r=e.children,a=Fx(void 0),i=a.tooltipOpen,s=a.tooltipLeft,o=a.tooltipTop,u=a.tooltipData,l=a.updateTooltip,c=a.hideTooltip,f=v.useRef(null);function h(){f.current&&(f.current.cancel(),f.current=null)}v.useEffect(function(){return h},[]);var p=v.useRef(function(b){var g=b.svgPoint,x=b.index,_=b.key,M=b.datum,y=b.distanceX,S=b.distanceY;h();var T=Se(y)?y:1/0,E=Se(S)?S:1/0,k=Math.sqrt(Math.pow(T,2)+Math.pow(E,2));l(function($){var P,N,A,R=$.tooltipData,X=R!=null&&R.nearestDatum&&Se(R.nearestDatum.distance)?R.nearestDatum.distance:1/0;return{tooltipOpen:!0,tooltipLeft:g==null?void 0:g.x,tooltipTop:g==null?void 0:g.y,tooltipData:{nearestDatum:((P=R==null||(N=R.nearestDatum)==null?void 0:N.key)!=null?P:"")!==_&&X<k?R==null?void 0:R.nearestDatum:{key:_,index:x,datum:M,distance:k},datumByKey:Mo({},R==null?void 0:R.datumByKey,(A={},A[_]={datum:M,index:x,key:_},A))}}})}),d=v.useCallback(function(){f.current=N_(c,n),f.current()},[c,n]),m=v.useMemo(function(){return{tooltipOpen:i,tooltipLeft:s,tooltipTop:o,tooltipData:u,updateTooltip:l,showTooltip:p.current,hideTooltip:d}},[d,u,s,i,o,l]);return v.createElement(Un.Provider,{value:m},r)}fh.propTypes={hideTooltipDebounceMs:w.number,children:w.node.isRequired};const q_=pt(iv);var Yn={},$o={};$o.__esModule=!0,$o.default=Y_;function Y_(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}var Eo={};Eo.__esModule=!0,Eo.default=V_;function V_(e,t){t.range&&("padding"in e,e.range(t.range))}var Co={};Co.__esModule=!0,Co.default=G_;function G_(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}var Po={};Po.__esModule=!0,Po.default=K_;function K_(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}var No={};No.__esModule=!0,No.default=X_;function X_(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}var Lo={};Lo.__esModule=!0,Lo.default=Z_;function Z_(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}var Ao={};Ao.__esModule=!0,Ao.default=Q_;function Q_(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}var Do={},jo={};const hh=pt(hv);jo.__esModule=!0,jo.default=J_;var ht=hh,dh={lab:ht.interpolateLab,hcl:ht.interpolateHcl,"hcl-long":ht.interpolateHclLong,hsl:ht.interpolateHsl,"hsl-long":ht.interpolateHslLong,cubehelix:ht.interpolateCubehelix,"cubehelix-long":ht.interpolateCubehelixLong,rgb:ht.interpolateRgb};function J_(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return dh[e]}var t=e.type,n=e.gamma,r=dh[t];return typeof n>"u"?r:r.gamma(n)}Do.__esModule=!0,Do.default=nw;var ew=tw(jo);function tw(e){return e&&e.__esModule?e:{default:e}}function nw(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=(0,ew.default)(t.interpolate);e.interpolate(n)}}var zo={};const rw=pt(mv);var Fo={};Fo.__esModule=!0,Fo.default=ow;var iw=new Date(Date.UTC(2020,1,2,3,4,5)),aw="%Y-%m-%d %H:%M";function ow(e){var t=e.tickFormat(1,aw)(iw);return t==="2020-02-02 03:04"}zo.__esModule=!0,zo.default=lw;var Te=rw,sw=uw(Fo);function uw(e){return e&&e.__esModule?e:{default:e}}var ph={day:Te.timeDay,hour:Te.timeHour,minute:Te.timeMinute,month:Te.timeMonth,second:Te.timeSecond,week:Te.timeWeek,year:Te.timeYear},mh={day:Te.utcDay,hour:Te.utcHour,minute:Te.utcMinute,month:Te.utcMonth,second:Te.utcSecond,week:Te.utcWeek,year:Te.utcYear};function lw(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,a=(0,sw.default)(r);if(typeof n=="string")r.nice(a?mh[n]:ph[n]);else{var i=n.interval,s=n.step,o=(a?mh[i]:ph[i]).every(s);o!=null&&r.nice(o)}}}}var Io={};Io.__esModule=!0,Io.default=cw;function cw(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}var Ro={};Ro.__esModule=!0,Ro.default=fw;function fw(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}var Wo={};Wo.__esModule=!0,Wo.default=dw;var hw=hh;function dw(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(hw.interpolateRound))}var Ho={};Ho.__esModule=!0,Ho.default=pw;function pw(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}var Bo={};Bo.__esModule=!0,Bo.default=mw;function mw(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],a=n[1],i=a<r,s=i?[a,r]:[r,a],o=s[0],u=s[1],l=[Math.min(0,o),Math.max(0,u)];e.domain(i?l.reverse():l)}}Yn.__esModule=!0,Yn.ALL_OPERATORS=void 0,Yn.default=Pw;var gw=Oe($o),vw=Oe(Eo),yw=Oe(Co),bw=Oe(Po),xw=Oe(No),_w=Oe(Lo),ww=Oe(Ao),Sw=Oe(Do),Tw=Oe(zo),Ow=Oe(Io),kw=Oe(Ro),Mw=Oe(Wo),$w=Oe(Ho),Ew=Oe(Bo);function Oe(e){return e&&e.__esModule?e:{default:e}}var gh=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"];Yn.ALL_OPERATORS=gh;var Cw={domain:gw.default,nice:Tw.default,zero:Ew.default,interpolate:Sw.default,round:Mw.default,align:yw.default,base:bw.default,clamp:xw.default,constant:_w.default,exponent:ww.default,padding:Ow.default,range:vw.default,reverse:kw.default,unknown:$w.default};function Pw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),a=gh.filter(function(i){return r.has(i)});return function(s,o){return typeof o<"u"&&a.forEach(function(u){Cw[u](s,o)}),s}}var Nw=zw,Lw=q_,Aw=Dw(Yn);function Dw(e){return e&&e.__esModule?e:{default:e}}var jw=(0,Aw.default)("domain","range","reverse","unknown");function zw(e){return jw((0,Lw.scaleOrdinal)(),e)}var dt={red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"]},Vn=dt.gray,Uo=Vn[7],Fw=[dt.cyan[9],dt.cyan[3],dt.yellow[5],dt.red[4],dt.grape[8],dt.grape[5],dt.pink[9]];function ae(){return ae=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},ae.apply(this,arguments)}var qo={fontFamily:"-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif",fontWeight:700,fontSize:12,textAnchor:"middle",pointerEvents:"none",letterSpacing:.4};function Iw(e){var t,n,r,a,i,s,o=ae({},qo,{fill:Uo,stroke:"none"},e.svgLabelBig),u=ae({},qo,{fontWeight:200,fontSize:11,fill:Uo,stroke:"none"},e.svgLabelSmall),l=ae({color:(t=(n=(r=(a=e.htmlLabel)==null?void 0:a.color)!=null?r:(i=e.svgLabelBig)==null?void 0:i.fill)!=null?n:(s=e.svgLabelSmall)==null?void 0:s.fill)!=null?t:Uo},qo,e.htmlLabel);return{backgroundColor:e.backgroundColor,colors:[].concat(e.colors),htmlLabel:ae({},l),svgLabelSmall:ae({},u),svgLabelBig:ae({},o),gridStyles:ae({stroke:e.gridColor,strokeWidth:1},e.gridStyles),axisStyles:{x:{top:{axisLabel:ae({},o,{dy:"-0.25em"}),axisLine:ae({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:ae({},u,{dy:"-0.25em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)},bottom:{axisLabel:ae({},o,{dy:"-0.25em"}),axisLine:ae({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:ae({},u,{dy:"0.125em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)}},y:{left:{axisLabel:ae({},o,{dx:"-1.25em"}),axisLine:ae({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:ae({},u,{textAnchor:"end",dx:"-0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)},right:{axisLabel:ae({},o,{dx:"1.25em"}),axisLine:ae({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:ae({},u,{textAnchor:"start",dx:"0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)}}}}}const Rw=Iw({backgroundColor:"#fff",colors:Fw,tickLength:4,svgLabelSmall:{fill:Vn[7]},svgLabelBig:{fill:Vn[9]},gridColor:Vn[5],gridColorDark:Vn[9]});var Ww=v.createContext(Rw),Hw=function(){function e(){this.registry={},this.registryKeys=[]}var t=e.prototype;return t.registerData=function(r){var a=this,i=Array.isArray(r)?r:[r];i.forEach(function(s){s.key in a.registry&&a.registry[s.key]!=null&&console.debug("Overriding data registry key",s.key),a.registry[s.key]=s,a.registryKeys=Object.keys(a.registry)})},t.unregisterData=function(r){var a=this,i=Array.isArray(r)?r:[r];i.forEach(function(s){delete a.registry[s],a.registryKeys=Object.keys(a.registry)})},t.entries=function(){return Object.values(this.registry)},t.get=function(r){return this.registry[r]},t.keys=function(){return this.registryKeys},e}();function Bw(){var e=v.useState(Math.random()),t=e[1],n=v.useMemo(function(){return new Hw},[]);return v.useMemo(function(){return{registerData:function(){n.registerData.apply(n,arguments),t(Math.random())},unregisterData:function(){n.unregisterData.apply(n,arguments),t(Math.random())},entries:function(){return n.entries()},get:function(a){return n.get(a)},keys:function(){return n.keys()}}},[n])}var Yo={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};function Uw(e){var t=v.useState({width:(e==null?void 0:e.width)==null?Yo.width:e.width,height:(e==null?void 0:e.height)==null?Yo.height:e.height,margin:(e==null?void 0:e.margin)==null?Yo.margin:e.margin}),n=t[0],r=t[1],a=v.useCallback(function(i){(i.width!==n.width||i.height!==n.height||i.margin.left!==n.margin.left||i.margin.right!==n.margin.right||i.margin.top!==n.margin.top||i.margin.bottom!==n.margin.bottom)&&r(i)},[n.width,n.height,n.margin.left,n.margin.right,n.margin.bottom,n.margin.top]);return[n,a]}function Vo(e){return(e==null?void 0:e.type)==="band"||(e==null?void 0:e.type)==="ordinal"||(e==null?void 0:e.type)==="point"}function Zt(){return Zt=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},Zt.apply(this,arguments)}function qw(e){var t=e.dataRegistry,n=e.xRange,r=e.xScaleConfig,a=e.yRange,i=e.yScaleConfig,s=t.keys(),o=n[0],u=n[1],l=a[0],c=a[1],f=v.useMemo(function(){var p=s.map(function(g){return t.get(g)}),d=p.reduce(function(g,x){return x?g.concat(x.data.map(function(_){return x.xAccessor(_)})):g},[]);if(d.length!==0){var m=Vo(r)?d:fu(d),b=ja(r)?$n(Zt({range:[o,u],domain:m,zero:!0},r)):$n(Zt({range:[o,u],domain:m},r));return p.forEach(function(g){g!=null&&g.xScale&&(b=g.xScale(b))}),b}},[t,r,s,o,u]),h=v.useMemo(function(){var p=s.map(function(g){return t.get(g)}),d=p.reduce(function(g,x){return x?g.concat(x.data.map(function(_){return x.yAccessor(_)})):g},[]);if(d.length!==0){var m=Vo(i)?d:fu(d),b=ja(i)?$n(Zt({range:[l,c],domain:m,zero:!0},i)):$n(Zt({range:[l,c],domain:m},i));return p.forEach(function(g){g!=null&&g.yScale&&(b=g.yScale(b))}),b}},[t,i,s,l,c]);return{xScale:f,yScale:h}}function vh(e){var t=e.initialDimensions,n=e.theme,r=e.xScale,a=e.yScale,i=e.children,s=e.horizontal,o=s===void 0?"auto":s,u=e.resizeObserverPolyfill,l=v.useContext(Ww),c=n||l,f=Uw(t),h=f[0],p=h.width,d=h.height,m=h.margin,b=f[1],g=Math.max(0,p-m.left-m.right),x=Math.max(0,d-m.top-m.bottom),_=Bw(),M=qw({dataRegistry:_,xScaleConfig:r,yScaleConfig:a,xRange:[m.left,Math.max(0,p-m.right)],yRange:[Math.max(0,d-m.bottom),m.top]}),y=M.xScale,S=M.yScale,T=_.keys(),E=v.useMemo(function(){return Nw({domain:T,range:c.colors})},[T,c.colors]),k=o==="auto"?Vo(a)||a.type==="time"||a.type==="utc":o,$=v.useMemo(function(){return{dataRegistry:_,registerData:_.registerData,unregisterData:_.unregisterData,xScale:y,yScale:S,colorScale:E,theme:c,width:p,height:d,margin:m,innerWidth:g,innerHeight:x,setDimensions:b,horizontal:k,resizeObserverPolyfill:u}},[E,_,d,k,x,g,m,b,c,p,y,S,u]);return v.createElement(Ue.Provider,{value:$},i)}vh.propTypes={children:w.node.isRequired,horizontal:w.oneOfType([w.bool,w.oneOf(["auto"])])};function yh(e){var t=e.source,n=e.onPointerOut,r=n===void 0?!0:n,a=e.onPointerMove,i=a===void 0?!0:a,s=e.onPointerUp,o=s===void 0?!0:s,u=e.onPointerDown,l=u===void 0?!0:u,c=e.onFocus,f=c===void 0?!1:c,h=e.onBlur,p=h===void 0?!1:h,d=ft(),m=v.useCallback(function(y){return d==null?void 0:d("pointermove",y,t)},[d,t]),b=v.useCallback(function(y){return d==null?void 0:d("pointerout",y,t)},[d,t]),g=v.useCallback(function(y){return d==null?void 0:d("pointerup",y,t)},[d,t]),x=v.useCallback(function(y){return d==null?void 0:d("pointerdown",y,t)},[d,t]),_=v.useCallback(function(y){return d==null?void 0:d("focus",y,t)},[d,t]),M=v.useCallback(function(y){return d==null?void 0:d("blur",y,t)},[d,t]);return{onPointerMove:i?m:void 0,onFocus:f?_:void 0,onBlur:p?M:void 0,onPointerOut:r?b:void 0,onPointerUp:o?g:void 0,onPointerDown:l?x:void 0}}var Yw="GLYPHSERIES_EVENT_SOURCE",Vw="LINESERIES_EVENT_SOURCE",ti="XYCHART_EVENT_SOURCE";function bh(e){return!!e&&("clientX"in e||"changedTouches"in e)}function Gw(e){return!!e&&!bh(e)}function xh(e){var t=e.scale,n=e.accessor,r=e.scaledValue,a=e.data,i=t,s,o;if("invert"in i&&typeof i.invert=="function"){var u=lr(n).left,l=Number(i.invert(r)),c=u(a,l),f=a[c-1],h=a[c];s=!f||Math.abs(l-n(f))>Math.abs(l-n(h))?h:f,o=s===f?c-1:c}else if("step"in i&&typeof i.step<"u"){var p=t.domain(),d=t.range().map(Number),m=[].concat(d).sort(function(S,T){return S-T}),b=bu(m[0],m[1],i.step()),g=Sp(b,r),x=d[0]<d[1]?p:p.reverse(),_=x[g-1],M=a.findIndex(function(S){return String(n(S))===String(_)});s=a[M],o=M}else return console.warn("[visx/xychart/findNearestDatum] encountered incompatible scale type, bailing"),null;if(s==null||o==null)return null;var y=Math.abs(Number(i(n(s)))-r);return{datum:s,index:o,distance:y}}function Kw(e){var t=e.xScale,n=e.xAccessor,r=e.yScale,a=e.yAccessor,i=e.point,s=e.data;if(!i)return null;var o=xh({scale:t,accessor:n,scaledValue:i.x,data:s});return o?{datum:o.datum,index:o.index,distanceX:o.distance,distanceY:Math.abs(Number(r(a(o.datum)))-i.y)}:null}function Xw(e){var t=e.yScale,n=e.yAccessor,r=e.xScale,a=e.xAccessor,i=e.point,s=e.data;if(!i)return null;var o=xh({scale:t,accessor:n,scaledValue:i.y,data:s});return o?{datum:o.datum,index:o.index,distanceY:o.distance,distanceX:Math.abs(Number(r(a(o.datum)))-i.x)}:null}function Go(){return Go=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},Go.apply(this,arguments)}var Ko="__POINTER_EVENTS_ALL",ni="__POINTER_EVENTS_NEAREST";function _h(e){var t=e.dataKey,n=e.findNearestDatum,r=e.onBlur,a=e.onFocus,i=e.onPointerMove,s=e.onPointerOut,o=e.onPointerUp,u=e.onPointerDown,l=e.allowedSources,c=v.useContext(Ue),f=c.width,h=c.height,p=c.horizontal,d=c.dataRegistry,m=c.xScale,b=c.yScale,g=n||(p?Xw:Kw),x=v.useCallback(function(k){var $=k||{},P=$.svgPoint,N=$.event,A={},R=null,X=1/0;if(k&&N&&P&&f&&h&&m&&b){var U,Z=t===ni||t===Ko,ee=Z?(U=d==null?void 0:d.keys())!=null?U:[]:Array.isArray(t)?t:[t];ee.forEach(function(C){var D=d==null?void 0:d.get(C);if(D){var H=g({dataKey:C,data:D.data,height:h,point:P,width:f,xAccessor:D.xAccessor,xScale:m,yAccessor:D.yAccessor,yScale:b});if(H&&(A[C]=Go({key:C,svgPoint:P,event:N},H),t===ni)){var W,F,I=Math.sqrt(((W=H.distanceX)!=null?W:Math.pow(1/0,2))+((F=H.distanceY)!=null?F:Math.pow(1/0,2)));R=I<X?A[C]:R,X=Math.min(X,I)}}});var K=t===ni?[R]:t===Ko||Array.isArray(t)?Object.values(A):[A[t]];return K.filter(function(C){return C})}return[]},[t,d,m,b,f,h,g]),_=v.useCallback(function(k){i&&x(k).forEach(function($){return i($)})},[x,i]),M=v.useCallback(function(k){o&&x(k).forEach(function($){return o($)})},[x,o]),y=v.useCallback(function(k){u&&x(k).forEach(function($){return u($)})},[x,u]),S=v.useCallback(function(k){a&&x(k).forEach(function($){return a($)})},[x,a]),T=v.useCallback(function(k){var $=k==null?void 0:k.event;$&&bh($)&&s&&s($)},[s]),E=v.useCallback(function(k){var $=k==null?void 0:k.event;$&&Gw($)&&r&&r($)},[r]);ft("pointermove",i?_:void 0,l),ft("pointerout",s?T:void 0,l),ft("pointerup",o?M:void 0,l),ft("pointerdown",u?y:void 0,l),ft("focus",a?S:void 0,l),ft("blur",r?E:void 0,l)}function ri(){return ri=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},ri.apply(this,arguments)}var Zw={top:50,right:50,bottom:50,left:50},Qw=[ti];function Qt(e){var t=e.accessibilityLabel,n=t===void 0?"XYChart":t,r=e.captureEvents,a=r===void 0?!0:r,i=e.children,s=e.height,o=e.horizontal,u=e.margin,l=u===void 0?Zw:u,c=e.onPointerMove,f=e.onPointerOut,h=e.onPointerUp,p=e.onPointerDown,d=e.pointerEventsDataKey,m=d===void 0?"nearest":d,b=e.theme,g=e.width,x=e.xScale,_=e.yScale,M=e.resizeObserverPolyfill,y=v.useContext(Ue),S=y.setDimensions,T=y.resizeObserverPolyfill,E=v.useContext(Un),k=ft();v.useEffect(function(){S&&g!=null&&s!=null&&g>0&&s>0&&S({width:g,height:s,margin:l})},[S,g,s,l]);var $=yh({source:ti});return _h({dataKey:m==="nearest"?ni:Ko,onPointerMove:c,onPointerOut:f,onPointerUp:h,onPointerDown:p,allowedSources:Qw}),S?g==null||s==null?v.createElement(z_,{resizeObserverPolyfill:T},function(P){return v.createElement(Qt,ri({},e,{width:e.width==null?P.width:e.width,height:e.height==null?P.height:e.height}))}):E==null?v.createElement(fh,null,v.createElement(Qt,e)):k==null?v.createElement(U_,null,v.createElement(Qt,e)):g<=0||s<=0?(process.env.NODE_ENV==="development"&&console.info("XYChart has a zero width or height, bailing",{width:g,height:s}),null):v.createElement("svg",{width:g,height:s,"aria-label":n},i,a&&v.createElement("rect",ri({x:l.left,y:l.top,width:g-l.left-l.right,height:s-l.top-l.bottom,fill:"transparent"},$))):!x||!_?(console.warn("[@visx/xychart] XYChart: When no DataProvider is available in context, you must pass xScale & yScale config to XYChart."),null):v.createElement(vh,{xScale:x,yScale:_,theme:b,initialDimensions:{width:g,height:s,margin:l},horizontal:o,resizeObserverPolyfill:M},v.createElement(Qt,e))}Qt.propTypes={accessibilityLabel:w.string,captureEvents:w.bool,width:w.number,height:w.number,children:w.node.isRequired,horizontal:w.oneOfType([w.bool,w.oneOf(["auto"])]),onPointerMove:w.func,onPointerOut:w.func,onPointerUp:w.func,onPointerDown:w.func,pointerEventsDataKey:w.oneOf(["all","nearest"])};var Jw=iS,Xo=wh(v),eS=wh(nn),tS=ct,nS=["children","data","x","y","fill","className","curve","innerRef","defined"];function wh(e){return e&&e.__esModule?e:{default:e}}function Zo(){return Zo=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},Zo.apply(this,arguments)}function rS(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function iS(e){var t=e.children,n=e.data,r=n===void 0?[]:n,a=e.x,i=e.y,s=e.fill,o=s===void 0?"transparent":s,u=e.className,l=e.curve,c=e.innerRef,f=e.defined,h=f===void 0?function(){return!0}:f,p=rS(e,nS),d=(0,tS.line)({x:a,y:i,defined:h,curve:l});return t?Xo.default.createElement(Xo.default.Fragment,null,t({path:d})):Xo.default.createElement("path",Zo({ref:c,className:(0,eS.default)("visx-linepath",u),d:d(r)||"",fill:o,strokeLinecap:"round"},p))}function Qo(){return Qo=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},Qo.apply(this,arguments)}function Sh(e){function t(n){var r=n.dataKey,a=n.data,i=n.xAccessor,s=n.yAccessor,o=v.useContext(Ue),u=o.xScale,l=o.yScale,c=o.dataRegistry;v.useEffect(function(){return c&&c.registerData({key:r,data:a,xAccessor:i,yAccessor:s}),function(){return c==null?void 0:c.unregisterData(r)}},[c,r,a,i,s]);var f=c==null?void 0:c.get(r);if(!u||!l||!f)return null;var h=e;return v.createElement(h,Qo({},n,{xScale:u,yScale:l,data:f.data,xAccessor:f.xAccessor,yAccessor:f.yAccessor}))}return t}function ii(e,t,n){return n===void 0&&(n="center"),function(r){var a=e(t(r));if(Se(a)){var i=(n==="start"?0:ho(e))/(n==="center"?2:1);return a+i}return NaN}}function Th(e){var t,n=e.dataKey,r=e.enableEvents,a=e.findNearestDatum,i=e.onBlur,s=e.onFocus,o=e.onPointerMove,u=e.onPointerOut,l=e.onPointerUp,c=e.onPointerDown,f=e.source,h=e.allowedSources,p=(t=v.useContext(Un))!=null?t:{},d=p.showTooltip,m=p.hideTooltip,b=v.useCallback(function(y){d(y),o&&o(y)},[d,o]),g=v.useCallback(function(y){d(y),s&&s(y)},[d,s]),x=v.useCallback(function(y){m(),y&&u&&u(y)},[m,u]),_=v.useCallback(function(y){m(),y&&i&&i(y)},[m,i]),M=v.useCallback(function(y){d(y),c&&c(y)},[d,c]);return _h({dataKey:n,findNearestDatum:a,onBlur:r?_:void 0,onFocus:r?g:void 0,onPointerMove:r?b:void 0,onPointerOut:r?x:void 0,onPointerUp:r?l:void 0,onPointerDown:r?M:void 0,allowedSources:h}),yh({source:f,onBlur:!!i&&r,onFocus:!!s&&r,onPointerMove:!!o&&r,onPointerOut:!!u&&r,onPointerUp:!!l&&r,onPointerDown:!!c&&r})}function Jo(){return Jo=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},Jo.apply(this,arguments)}function es(e){var t,n,r,a=e.colorAccessor,i=e.data,s=e.dataKey,o=e.onBlur,u=e.onFocus,l=e.onPointerMove,c=e.onPointerOut,f=e.onPointerUp,h=e.onPointerDown,p=e.enableEvents,d=p===void 0?!0:p,m=e.renderGlyphs,b=e.size,g=b===void 0?8:b,x=e.xAccessor,_=e.xScale,M=e.yAccessor,y=e.yScale,S=v.useContext(Ue),T=S.colorScale,E=S.theme,k=S.horizontal,$=v.useMemo(function(){return ii(_,x)},[_,x]),P=v.useMemo(function(){return ii(y,M)},[y,M]),N=(t=(n=T==null?void 0:T(s))!=null?n:E==null||(r=E.colors)==null?void 0:r[0])!=null?t:"#222",A=Yw+"-"+s,R=Th({dataKey:s,enableEvents:d,onBlur:o,onFocus:u,onPointerMove:l,onPointerOut:c,onPointerUp:f,onPointerDown:h,source:A,allowedSources:[ti,A]}),X=v.useMemo(function(){return i.map(function(U,Z){var ee,K=$(U);if(!Se(K))return null;var C=P(U);return Se(C)?{key:""+Z,x:K,y:C,color:(ee=a==null?void 0:a(U,Z))!=null?ee:N,size:typeof g=="function"?g(U):g,datum:U}:null}).filter(function(U){return U})},[N,a,i,$,P,g]);return v.createElement(v.Fragment,null,m(Jo({glyphs:X,xScale:_,yScale:y,horizontal:k},R)))}es.propTypes={colorAccessor:w.func,size:w.oneOfType([w.number,w.func]),renderGlyphs:w.func.isRequired};const aS=Sh(es);function Oh(e){var t=e.key,n=e.color,r=e.x,a=e.y,i=e.size,s=e.onBlur,o=e.onFocus,u=e.onPointerMove,l=e.onPointerOut,c=e.onPointerUp;return v.createElement("circle",{className:"visx-circle-glyph",key:t,tabIndex:s||o?0:void 0,fill:n,r:i/2,cx:r,cy:a,onBlur:s,onFocus:o,onPointerMove:u,onPointerOut:l,onPointerUp:c})}var oS=["renderGlyph"];function ai(){return ai=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},ai.apply(this,arguments)}function sS(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function uS(e){var t=e.renderGlyph,n=t===void 0?Oh:t,r=sS(e,oS),a=v.useCallback(function(i){var s=i.glyphs,o=i.onPointerMove,u=i.onPointerOut,l=i.onPointerUp,c=i.onFocus,f=i.onBlur;return s.map(function(h){return v.createElement(v.Fragment,{key:h.key},n(ai({},h,{onPointerMove:o,onPointerOut:u,onPointerUp:l,onFocus:c,onBlur:f})))})},[n]);return v.createElement(aS,ai({},r,{renderGlyphs:a}))}var lS=["colorAccessor","curve","data","dataKey","onBlur","onFocus","onPointerMove","onPointerOut","onPointerUp","onPointerDown","enableEvents","xAccessor","xScale","yAccessor","yScale","PathComponent"];function Gn(){return Gn=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},Gn.apply(this,arguments)}function cS(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function kh(e){var t,n,r,a=e.colorAccessor,i=e.curve,s=e.data,o=e.dataKey,u=e.onBlur,l=e.onFocus,c=e.onPointerMove,f=e.onPointerOut,h=e.onPointerUp,p=e.onPointerDown,d=e.enableEvents,m=d===void 0?!0:d,b=e.xAccessor,g=e.xScale,x=e.yAccessor,_=e.yScale,M=e.PathComponent,y=M===void 0?"path":M,S=cS(e,lS),T=v.useContext(Ue),E=T.colorScale,k=T.theme,$=v.useMemo(function(){return ii(g,b)},[g,b]),P=v.useMemo(function(){return ii(_,x)},[_,x]),N=v.useCallback(function(ee){return Se(g(b(ee)))&&Se(_(x(ee)))},[g,b,_,x]),A=(t=(n=E==null?void 0:E(o))!=null?n:k==null||(r=k.colors)==null?void 0:r[0])!=null?t:"#222",R=Vw+"-"+o,X=Th({dataKey:o,enableEvents:m,onBlur:u,onFocus:l,onPointerMove:c,onPointerOut:f,onPointerUp:h,onPointerDown:p,source:R,allowedSources:[ti,R]}),U=!!(l||u),Z=v.useCallback(function(ee){var K=ee.glyphs;return U?K.map(function(C){return v.createElement(v.Fragment,{key:C.key},Oh(Gn({},C,{color:"transparent",onFocus:X.onFocus,onBlur:X.onBlur})))}):null},[U,X.onFocus,X.onBlur]);return v.createElement(v.Fragment,null,v.createElement(Jw,Gn({x:$,y:P,defined:N,curve:i},S),function(ee){var K,C=ee.path;return v.createElement(y,Gn({stroke:(K=a==null?void 0:a(o))!=null?K:A,strokeWidth:2,fill:"transparent",strokeLinecap:"round"},S,{d:C(s)||""},X))}),U&&v.createElement(es,{dataKey:o,data:s,xAccessor:b,yAccessor:x,xScale:g,yScale:_,renderGlyphs:Z}))}kh.propTypes={colorAccessor:w.func};const fS=Sh(kh);function hS(e){return v.createElement(fS,e)}const dS={lines:"LinesChartProps[]",barTooltip:"(props: LineTooltipProps) => JSX.Element",grid:"GridProps",labels:"Array<string>",xAxis:"CommonProps<AxisScale>",xScale:"ScaleConfig<AxisScaleOutput, any, any>",yAxis:"CommonProps<AxisScale>",yScale:"ScaleConfig<AxisScaleOutput, any, any>"};function ts(e){const t=en.useElementId(),{lines:n=[],xScale:r,yScale:a,xAxis:i,yAxis:s,grid:o,labels:u,barTooltip:l}=e,c={xAccessor:p=>p.x,yAccessor:p=>p.y},f=p=>u[p],h=Er({domain:n.map(p=>p.name),range:n.map(p=>Zn.colors[p.color])});return j.createElement(j.Fragment,null,j.createElement($f,{className:"fs-12 lh-18 gray600",scale:h,direction:"row",shape:"rect",shapeWidth:30,shapeHeight:4,shapeMargin:"0 5px 0 0",shapeStyle:()=>({borderRadius:"2px"}),labelMargin:"0",itemMargin:"0 10px 0 10px",style:{display:"flex",justifyContent:"center",fontSize:"16px"}}),j.createElement(Qt,{height:300,xScale:r,yScale:a},j.createElement(Yf,{strokeWidth:"1",orientation:"bottom",tickFormat:f,...i}),j.createElement(Yf,{orientation:"left",...s}),j.createElement(Dx,{...o}),n.map((p,d)=>j.createElement(j.Fragment,{key:`${t.current}${d}`},j.createElement(uS,{dataKey:p.name,colorAccessor:()=>Zn.colors[p.color],data:[p.data],...c}),j.createElement(hS,{dataKey:p.name,stroke:Zn.colors[p.color],strokeDasharray:p.strokeDashArray?"4,3":"",data:p.data,...c}))),j.createElement(th,{snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,className:"bg-dark white",renderTooltip:({tooltipData:p})=>{var d,m,b;return j.createElement(j.Fragment,null,l&&j.createElement(l,{yAxisName:(d=p==null?void 0:p.nearestDatum)==null?void 0:d.key,xLineName:u[c.xAccessor((m=p==null?void 0:p.nearestDatum)==null?void 0:m.datum)],value:c.yAccessor((b=p==null?void 0:p.nearestDatum)==null?void 0:b.datum)}))}})))}Object.assign(ts,{props:dS,displayName:"SpsLineChart"});const Mh={basic:{label:"Basic",description:()=>j.createElement(j.Fragment,null,j.createElement("p",null,"Line chart example."),j.createElement("p",null,j.createElement("code",null,"<grid>")," allows override grid property. Optional. Type of ",j.createElement("code",null,"GridProps")," which comes from",j.createElement("code",null,"@visx/xychart/lib/components/grid/Grid")," package, which is a peer dependency of our React components."),j.createElement("p",null,j.createElement("code",null,"<xAxis>")," and ",j.createElement("code",null,"<yAxis>")," allow override X/Y axes property. Optional. Type of",j.createElement("code",null,"CommonProps<AxisScale>")," which comes from",j.createElement("code",null,"@visx/axis/lib/types")," package, which is a peer dependency of our React components."),j.createElement("p",null,j.createElement("code",null,"<xScale>")," and ",j.createElement("code",null,"<yScale>")," allow override scale configuration for X/Y axes. Type of",j.createElement("code",null,"ScaleConfig<AxisScaleOutput, any, any>")," comes from",j.createElement("code",null,"@visx/scale")," and ",j.createElement("code",null,"@visx/axis")," packages, which is a peer dependency of our React components.")),examples:{basic:{react:tt.code`
168
168
  import { SpsLineChart } from "@spscommerce/ds-react-charts";
169
169
  function DemoComponent() {
170
170
  const lines = [
@@ -236,4 +236,4 @@ z`).split(`
236
236
  />
237
237
  )
238
238
  }
239
- `}}}},gS={"Bar Charts":{description:()=>z.createElement("p",null,"Bar Charts are a data visualization used to compare sets of data to more easily analyze questions or identify gaps oriented toward user goals. ",z.createElement("br",null),"Each chart should focus on answering a single question about the dataset."),components:[ro,io],examples:yf},"Line Charts":{components:[ns],examples:Ch},"Stacked Horizontal Bar Charts":{components:[co],examples:Ef}};ue.MANIFEST=gS,ue.SpsBarChart=ro,ue.SpsBarChartExamples=yf,ue.SpsHorizontalBarChart=io,ue.SpsLineChart=ns,ue.SpsLineChartExamples=Ch,ue.SpsStackedHorizontalBarChart=co,ue.SpsStackedHorizontalBarChartExamples=Ef,Object.defineProperty(ue,Symbol.toStringTag,{value:"Module"})});
239
+ `}}}},pS={"Bar Charts":{description:()=>j.createElement("p",null,"Bar Charts are a data visualization used to compare sets of data to more easily analyze questions or identify gaps oriented toward user goals. ",j.createElement("br",null),"Each chart should focus on answering a single question about the dataset."),components:[ro,io],examples:vf},"Line Charts":{components:[ts],examples:Mh},"Stacked Horizontal Bar Charts":{components:[co],examples:Ef}};le.MANIFEST=pS,le.SpsBarChart=ro,le.SpsBarChartExamples=vf,le.SpsHorizontalBarChart=io,le.SpsLineChart=ts,le.SpsLineChartExamples=Mh,le.SpsStackedHorizontalBarChart=co,le.SpsStackedHorizontalBarChartExamples=Ef,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});