vue-chrts 0.0.79 → 0.0.80

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/dist/index.cjs +93 -72
  2. package/dist/index.js +2885 -2662
  3. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1,57 +1,57 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("vue");var $i="http://www.w3.org/1999/xhtml";const Qr={svg:"http://www.w3.org/2000/svg",xhtml:$i,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Xn(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Qr.hasOwnProperty(e)?{space:Qr[e],local:t}:t}function Wl(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===$i&&e.documentElement.namespaceURI===$i?e.createElement(t):e.createElementNS(n,t)}}function Yl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function $s(t){var e=Xn(t);return(e.local?Yl:Wl)(e)}function Vl(){}function cr(t){return t==null?Vl:function(){return this.querySelector(t)}}function Xl(t){typeof t!="function"&&(t=cr(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=new Array(s),l,c,f=0;f<s;++f)(l=o[f])&&(c=t.call(l,l.__data__,f,o))&&("__data__"in l&&(c.__data__=l.__data__),a[f]=c);return new ot(i,this._parents)}function ql(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Gl(){return[]}function Es(t){return t==null?Gl:function(){return this.querySelectorAll(t)}}function jl(t){return function(){return ql(t.apply(this,arguments))}}function Zl(t){typeof t=="function"?t=jl(t):t=Es(t);for(var e=this._groups,n=e.length,i=[],r=[],o=0;o<n;++o)for(var s=e[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(i.push(t.call(l,l.__data__,c,s)),r.push(l));return new ot(i,r)}function Ns(t){return function(){return this.matches(t)}}function Os(t){return function(e){return e.matches(t)}}var Ql=Array.prototype.find;function Jl(t){return function(){return Ql.call(this.children,t)}}function Kl(){return this.firstElementChild}function tc(t){return this.select(t==null?Kl:Jl(typeof t=="function"?t:Os(t)))}var ec=Array.prototype.filter;function nc(){return Array.from(this.children)}function ic(t){return function(){return ec.call(this.children,t)}}function rc(t){return this.selectAll(t==null?nc:ic(typeof t=="function"?t:Os(t)))}function oc(t){typeof t!="function"&&(t=Ns(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new ot(i,this._parents)}function Ds(t){return new Array(t.length)}function sc(){return new ot(this._enter||this._groups.map(Ds),this._parents)}function bn(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}bn.prototype={constructor:bn,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ac(t){return function(){return t}}function lc(t,e,n,i,r,o){for(var s=0,a,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],i[s]=a):n[s]=new bn(t,o[s]);for(;s<l;++s)(a=e[s])&&(r[s]=a)}function cc(t,e,n,i,r,o,s){var a,l,c=new Map,f=e.length,u=o.length,h=new Array(f),d;for(a=0;a<f;++a)(l=e[a])&&(h[a]=d=s.call(l,l.__data__,a,e)+"",c.has(d)?r[a]=l:c.set(d,l));for(a=0;a<u;++a)d=s.call(t,o[a],a,o)+"",(l=c.get(d))?(i[a]=l,l.__data__=o[a],c.delete(d)):n[a]=new bn(t,o[a]);for(a=0;a<f;++a)(l=e[a])&&c.get(h[a])===l&&(r[a]=l)}function uc(t){return t.__data__}function fc(t,e){if(!arguments.length)return Array.from(this,uc);var n=e?cc:lc,i=this._parents,r=this._groups;typeof t!="function"&&(t=ac(t));for(var o=r.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var f=i[c],u=r[c],h=u.length,d=hc(t.call(f,f&&f.__data__,c,i)),g=d.length,p=a[c]=new Array(g),v=s[c]=new Array(g),_=l[c]=new Array(h);n(f,u,p,v,_,d,e);for(var x=0,y=0,T,k;x<g;++x)if(T=p[x]){for(x>=y&&(y=x+1);!(k=v[y])&&++y<g;);T._next=k||null}}return s=new ot(s,i),s._enter=a,s._exit=l,s}function hc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function dc(){return new ot(this._exit||this._groups.map(Ds),this._parents)}function pc(t,e,n){var i=this.enter(),r=this,o=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?o.remove():n(o),i&&r?i.merge(r).order():r}function gc(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,o=i.length,s=Math.min(r,o),a=new Array(r),l=0;l<s;++l)for(var c=n[l],f=i[l],u=c.length,h=a[l]=new Array(u),d,g=0;g<u;++g)(d=c[g]||f[g])&&(h[g]=d);for(;l<r;++l)a[l]=n[l];return new ot(a,this._parents)}function vc(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,o=i[r],s;--r>=0;)(s=i[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function mc(t){t||(t=_c);function e(u,h){return u&&h?t(u.__data__,h.__data__):!u-!h}for(var n=this._groups,i=n.length,r=new Array(i),o=0;o<i;++o){for(var s=n[o],a=s.length,l=r[o]=new Array(a),c,f=0;f<a;++f)(c=s[f])&&(l[f]=c);l.sort(e)}return new ot(r,this._parents).order()}function _c(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function yc(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function xc(){return Array.from(this)}function bc(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length;r<o;++r){var s=i[r];if(s)return s}return null}function wc(){let t=0;for(const e of this)++t;return t}function kc(){return!this.node()}function Tc(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],o=0,s=r.length,a;o<s;++o)(a=r[o])&&t.call(a,a.__data__,o,r);return this}function Sc(t){return function(){this.removeAttribute(t)}}function Cc(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mc(t,e){return function(){this.setAttribute(t,e)}}function Ac(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function $c(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Ec(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Nc(t,e){var n=Xn(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?Cc:Sc:typeof e=="function"?n.local?Ec:$c:n.local?Ac:Mc)(n,e))}function Rs(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Oc(t){return function(){this.style.removeProperty(t)}}function Dc(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Rc(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Fc(t,e,n){return arguments.length>1?this.each((e==null?Oc:typeof e=="function"?Rc:Dc)(t,e,n??"")):ce(this.node(),t)}function ce(t,e){return t.style.getPropertyValue(e)||Rs(t).getComputedStyle(t,null).getPropertyValue(e)}function Pc(t){return function(){delete this[t]}}function zc(t,e){return function(){this[t]=e}}function Lc(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Ic(t,e){return arguments.length>1?this.each((e==null?Pc:typeof e=="function"?Lc:zc)(t,e)):this.node()[t]}function Fs(t){return t.trim().split(/^|\s+/)}function ur(t){return t.classList||new Ps(t)}function Ps(t){this._node=t,this._names=Fs(t.getAttribute("class")||"")}Ps.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function zs(t,e){for(var n=ur(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function Ls(t,e){for(var n=ur(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function Bc(t){return function(){zs(this,t)}}function Uc(t){return function(){Ls(this,t)}}function Hc(t,e){return function(){(e.apply(this,arguments)?zs:Ls)(this,t)}}function Wc(t,e){var n=Fs(t+"");if(arguments.length<2){for(var i=ur(this.node()),r=-1,o=n.length;++r<o;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?Hc:e?Bc:Uc)(n,e))}function Yc(){this.textContent=""}function Vc(t){return function(){this.textContent=t}}function Xc(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function qc(t){return arguments.length?this.each(t==null?Yc:(typeof t=="function"?Xc:Vc)(t)):this.node().textContent}function Gc(){this.innerHTML=""}function jc(t){return function(){this.innerHTML=t}}function Zc(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Qc(t){return arguments.length?this.each(t==null?Gc:(typeof t=="function"?Zc:jc)(t)):this.node().innerHTML}function Jc(){this.nextSibling&&this.parentNode.appendChild(this)}function Kc(){return this.each(Jc)}function tu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function eu(){return this.each(tu)}function nu(t){var e=typeof t=="function"?t:$s(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function iu(){return null}function ru(t,e){var n=typeof t=="function"?t:$s(t),i=e==null?iu:typeof e=="function"?e:cr(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function ou(){var t=this.parentNode;t&&t.removeChild(this)}function su(){return this.each(ou)}function au(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function lu(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function cu(t){return this.select(t?lu:au)}function uu(t){return arguments.length?this.property("__data__",t):this.node().__data__}function fu(t){return function(e){t.call(this,e,this.__data__)}}function hu(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function du(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,o;n<r;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++i]=o;++i?e.length=i:delete this.__on}}}function pu(t,e,n){return function(){var i=this.__on,r,o=fu(e);if(i){for(var s=0,a=i.length;s<a;++s)if((r=i[s]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),r.value=e;return}}this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function gu(t,e,n){var i=hu(t+""),r,o=i.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,f;l<c;++l)for(r=0,f=a[l];r<o;++r)if((s=i[r]).type===f.type&&s.name===f.name)return f.value}return}for(a=e?pu:du,r=0;r<o;++r)this.each(a(i[r],e,n));return this}function Is(t,e,n){var i=Rs(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function vu(t,e){return function(){return Is(this,t,e)}}function mu(t,e){return function(){return Is(this,t,e.apply(this,arguments))}}function _u(t,e){return this.each((typeof e=="function"?mu:vu)(t,e))}function*yu(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length,s;r<o;++r)(s=i[r])&&(yield s)}var Bs=[null];function ot(t,e){this._groups=t,this._parents=e}function Xe(){return new ot([[document.documentElement]],Bs)}function xu(){return this}ot.prototype=Xe.prototype={constructor:ot,select:Xl,selectAll:Zl,selectChild:tc,selectChildren:rc,filter:oc,data:fc,enter:sc,exit:dc,join:pc,merge:gc,selection:xu,order:vc,sort:mc,call:yc,nodes:xc,node:bc,size:wc,empty:kc,each:Tc,attr:Nc,style:Fc,property:Ic,classed:Wc,text:qc,html:Qc,raise:Kc,lower:eu,append:nu,insert:ru,remove:su,clone:cu,datum:uu,on:gu,dispatch:_u,[Symbol.iterator]:yu};function j(t){return typeof t=="string"?new ot([[document.querySelector(t)]],[document.documentElement]):new ot([[t]],Bs)}function bu(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Jr(t,e){if(t=bu(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}var Oe;(function(t){t[t.SVG=0]="SVG",t[t.HTML=1]="HTML"})(Oe||(Oe={}));var ue;(function(t){t.Fit="fit",t.Extend="extend",t.FitWidth="fit_width"})(ue||(ue={}));function De(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function wu(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function fr(t){let e,n,i;t.length!==2?(e=De,n=(a,l)=>De(t(a),l),i=(a,l)=>t(a)-l):(e=t===De||t===wu?t:ku,n=t,i=t);function r(a,l,c=0,f=a.length){if(c<f){if(e(l,l)!==0)return f;do{const u=c+f>>>1;n(a[u],l)<0?c=u+1:f=u}while(c<f)}return c}function o(a,l,c=0,f=a.length){if(c<f){if(e(l,l)!==0)return f;do{const u=c+f>>>1;n(a[u],l)<=0?c=u+1:f=u}while(c<f)}return c}function s(a,l,c=0,f=a.length){const u=r(a,l,c,f-1);return u>c&&i(a[u-1],l)>-i(a[u],l)?u-1:u}return{left:r,center:s,right:o}}function ku(){return 0}function Us(t){return t===null?NaN:+t}const Tu=fr(De),qn=Tu.right;fr(Us).center;function Su(t,e){let n,i;for(const r of t)r!=null&&(n===void 0?r>=r&&(n=i=r):(n>r&&(n=r),i<r&&(i=r)));return[n,i]}class Kr extends Map{constructor(e,n=Au){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[i,r]of e)this.set(i,r)}get(e){return super.get(to(this,e))}has(e){return super.has(to(this,e))}set(e,n){return super.set(Cu(this,e),n)}delete(e){return super.delete(Mu(this,e))}}function to({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function Cu({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function Mu({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function Au(t){return t!==null&&typeof t=="object"?t.valueOf():t}const $u=Math.sqrt(50),Eu=Math.sqrt(10),Nu=Math.sqrt(2);function wn(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),s=o>=$u?10:o>=Eu?5:o>=Nu?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?wn(t,e,n*2):[a,l,c]}function Ei(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,o,s]=i?wn(e,t,n):wn(t,e,n);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(r+c)/-s;else for(let c=0;c<a;++c)l[c]=(r+c)*s;return l}function Ni(t,e,n){return e=+e,t=+t,n=+n,wn(t,e,n)[2]}function Oi(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?Ni(e,t,n):Ni(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function eo(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function no(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function Ou(t,e,n=Us){if(!(!(i=t.length)||isNaN(e=+e))){if(e<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,o=Math.floor(r),s=+n(t[o],o,t),a=+n(t[o+1],o+1,t);return s+(a-s)*(r-o)}}function Du(t,e){let n=0,i=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&(++n,i+=o)}if(n)return i/n}function*Ru(t){for(const e of t)yield*e}function Fu(t){return Array.from(Ru(t))}function Pu(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(r);++i<r;)o[i]=t+i*n;return o}function zu(t,e){let n=0;if(e===void 0)for(let i of t)(i=+i)&&(n+=i);else{let i=-1;for(let r of t)(r=+e(r,++i,t))&&(n+=r)}return n}function Lu(t,e,n){var i={},r=i.noTrailing,o=r===void 0?!1:r,s=i.noLeading,a=s===void 0?!1:s,l=i.debounceMode,c=l===void 0?void 0:l,f,u=!1,h=0;function d(){f&&clearTimeout(f)}function g(v){var _=v||{},x=_.upcomingOnly,y=x===void 0?!1:x;d(),u=!y}function p(){for(var v=arguments.length,_=new Array(v),x=0;x<v;x++)_[x]=arguments[x];var y=this,T=Date.now()-h;if(u)return;function k(){h=Date.now(),e.apply(y,_)}function w(){f=void 0}!a&&c&&!f&&k(),d(),c===void 0&&T>t?a?(h=Date.now(),o||(f=setTimeout(c?w:k,t))):k():o!==!0&&(f=setTimeout(c?w:k,c===void 0?t-T:t))}return p.cancel=g,p}const Bt=t=>typeof t=="number",Hs=t=>typeof t=="function",fe=t=>Array.isArray(t),Iu=t=>t instanceof Object,kn=t=>t.constructor.name!=="Function"&&t.constructor.name!=="Object",io=t=>Iu(t)&&!fe(t)&&!Hs(t)&&!kn(t),Pe=(t,e,n=[],i=new Set)=>{if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;if(i.has(t))return!0;i.add(t);for(let r=0;r<t.length;r++)if(!Pe(t[r],e[r],n,i))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object")return!1;if(t===e)return!0;const r=Object.keys(t).filter(s=>!n.includes(s)),o=Object.keys(e).filter(s=>!n.includes(s));if(r.length!==o.length)return!1;if(i.has(t))return!0;i.add(t);for(const s of r)if(!Pe(t[s],e[s],n,i))return!1;return!0}return t===e},Di=t=>t.flat(),Tn=(t,e=new Map)=>{if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){const n=[];e.set(t,n);for(const i of t)n.push(e.has(i)?e.get(i):Tn(i,e));return n}if(kn(t))return t;if(t instanceof Object){const n={};e.set(t,n);const i=t;return Object.keys(t).reduce((r,o)=>(r[o]=e.has(i[o])?e.get(i[o]):Tn(i[o],e),r),n),n}return t},qt=(t,e,n=new Map)=>{if(!t||!e||t===e)return t;const i=kn(t)?t:Tn(t);return n.has(e)?n.get(e):(n.set(e,i),Object.keys(e).forEach(r=>{r==="__proto__"||r==="constructor"||(io(t[r])&&io(e[r])?i[r]=qt(t[r],e[r],n):kn(e)?i[r]=e:i[r]=Tn(e[r]))}),i)},Sn=(t,e,n)=>Lu(e,t);function hr(t,e,n){return Hs(e)?e(t,n):e}function Gn(t,e,n){return hr(t,e,n)}function dt(t,e,n){return hr(t,e,n)}function be(t){return t.filter(e=>e&&!Bt(e))}function ie(t,e,n){return Math.min(Math.max(t,e),n)}function Bu(t,...e){if(!t)return[void 0,void 0];if(fe(e)){let n=0,i=0;return t.forEach((r,o)=>{let s=0,a=0;for(const l of e){const c=dt(r,l,o)||0;c>=0?s+=c:a+=c}s>i&&(i=s),a<n&&(n=a)}),[n,i]}}function Uu(t,e,n,i){const r=t.map((a,l)=>dt(a,e,l)||0),o=n.map((a,l)=>{const c=Du(t,(f,u)=>dt(f,a,u)||0);return c===0&&Array.isArray(i)?i[l]:c<0}),s=n.map(()=>[]);return t.forEach((a,l)=>{let c=r[l],f=r[l];n.forEach((u,h)=>{const d=dt(a,u,l)||0;d>=0?s[h].push([c,c+=d]):s[h].push([f,f+=d])})}),s.forEach((a,l)=>{a.isMostlyNegative=o[l]}),s}function Hu(t,...e){return t?no(t,(i,r)=>no(e,o=>dt(i,o,r))):void 0}function Wu(t,...e){return t?eo(t,(i,r)=>eo(e,o=>dt(i,o,r))):void 0}function hi(t,...e){return[Hu(t,...e),Wu(t,...e)]}function Ws(t,e,n){return t.filter((r,o)=>{const s=dt(r,n,o);return s>=e[0]&&s<=e[1]})}var Ut=[],Yu=function(){return Ut.some(function(t){return t.activeTargets.length>0})},Vu=function(){return Ut.some(function(t){return t.skippedTargets.length>0})},ro="ResizeObserver loop completed with undelivered notifications.",Xu=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:ro}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=ro),window.dispatchEvent(t)},ze;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ze||(ze={}));var Ht=function(t){return Object.freeze(t)},qu=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Ht(this)}return t}(),Ys=function(){function t(e,n,i,r){return this.x=e,this.y=n,this.width=i,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Ht(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,i=e.y,r=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,c=e.height;return{x:n,y:i,top:r,right:o,bottom:s,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),dr=function(t){return t instanceof SVGElement&&"getBBox"in t},Vs=function(t){if(dr(t)){var e=t.getBBox(),n=e.width,i=e.height;return!n&&!i}var r=t,o=r.offsetWidth,s=r.offsetHeight;return!(o||s||t.getClientRects().length)},oo=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},Gu=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Re=typeof window<"u"?window:{},Ke=new WeakMap,so=/auto|scroll/,ju=/^tb|vertical/,Zu=/msie|trident/i.test(Re.navigator&&Re.navigator.userAgent),mt=function(t){return parseFloat(t||"0")},re=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new qu((n?e:t)||0,(n?t:e)||0)},ao=Ht({devicePixelContentBoxSize:re(),borderBoxSize:re(),contentBoxSize:re(),contentRect:new Ys(0,0,0,0)}),Xs=function(t,e){if(e===void 0&&(e=!1),Ke.has(t)&&!e)return Ke.get(t);if(Vs(t))return Ke.set(t,ao),ao;var n=getComputedStyle(t),i=dr(t)&&t.ownerSVGElement&&t.getBBox(),r=!Zu&&n.boxSizing==="border-box",o=ju.test(n.writingMode||""),s=!i&&so.test(n.overflowY||""),a=!i&&so.test(n.overflowX||""),l=i?0:mt(n.paddingTop),c=i?0:mt(n.paddingRight),f=i?0:mt(n.paddingBottom),u=i?0:mt(n.paddingLeft),h=i?0:mt(n.borderTopWidth),d=i?0:mt(n.borderRightWidth),g=i?0:mt(n.borderBottomWidth),p=i?0:mt(n.borderLeftWidth),v=u+c,_=l+f,x=p+d,y=h+g,T=a?t.offsetHeight-y-t.clientHeight:0,k=s?t.offsetWidth-x-t.clientWidth:0,w=r?v+x:0,S=r?_+y:0,L=i?i.width:mt(n.width)-w-k,R=i?i.height:mt(n.height)-S-T,tt=L+v+k+x,A=R+_+T+y,U=Ht({devicePixelContentBoxSize:re(Math.round(L*devicePixelRatio),Math.round(R*devicePixelRatio),o),borderBoxSize:re(tt,A,o),contentBoxSize:re(L,R,o),contentRect:new Ys(u,l,L,R)});return Ke.set(t,U),U},qs=function(t,e,n){var i=Xs(t,n),r=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(e){case ze.DEVICE_PIXEL_CONTENT_BOX:return s;case ze.BORDER_BOX:return r;default:return o}},Qu=function(){function t(e){var n=Xs(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Ht([n.borderBoxSize]),this.contentBoxSize=Ht([n.contentBoxSize]),this.devicePixelContentBoxSize=Ht([n.devicePixelContentBoxSize])}return t}(),Gs=function(t){if(Vs(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Ju=function(){var t=1/0,e=[];Ut.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var f=new Qu(c.target),u=Gs(c.target);a.push(f),c.lastReportedSize=qs(c.target,c.observedBox),u<t&&(t=u)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,i=e;n<i.length;n++){var r=i[n];r()}return t},lo=function(t){Ut.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(r){r.isActive()&&(Gs(r.target)>t?n.activeTargets.push(r):n.skippedTargets.push(r))})})},Ku=function(){var t=0;for(lo(t);Yu();)t=Ju(),lo(t);return Vu()&&Xu(),t>0},di,js=[],tf=function(){return js.splice(0).forEach(function(t){return t()})},ef=function(t){if(!di){var e=0,n=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return tf()}).observe(n,i),di=function(){n.textContent="".concat(e?e--:e++)}}js.push(t),di()},nf=function(t){ef(function(){requestAnimationFrame(t)})},ln=0,rf=function(){return!!ln},of=250,sf={attributes:!0,characterData:!0,childList:!0,subtree:!0},co=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],uo=function(t){return t===void 0&&(t=0),Date.now()+t},pi=!1,af=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=of),!pi){pi=!0;var i=uo(e);nf(function(){var r=!1;try{r=Ku()}finally{if(pi=!1,e=i-uo(),!rf())return;r?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,sf)};document.body?n():Re.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),co.forEach(function(n){return Re.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),co.forEach(function(n){return Re.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Ri=new af,fo=function(t){!ln&&t>0&&Ri.start(),ln+=t,!ln&&Ri.stop()},lf=function(t){return!dr(t)&&!Gu(t)&&getComputedStyle(t).display==="inline"},cf=function(){function t(e,n){this.target=e,this.observedBox=n||ze.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=qs(this.target,this.observedBox,!0);return lf(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),uf=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),tn=new WeakMap,ho=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},en=function(){function t(){}return t.connect=function(e,n){var i=new uf(e,n);tn.set(e,i)},t.observe=function(e,n,i){var r=tn.get(e),o=r.observationTargets.length===0;ho(r.observationTargets,n)<0&&(o&&Ut.push(r),r.observationTargets.push(new cf(n,i&&i.box)),fo(1),Ri.schedule())},t.unobserve=function(e,n){var i=tn.get(e),r=ho(i.observationTargets,n),o=i.observationTargets.length===1;r>=0&&(o&&Ut.splice(Ut.indexOf(i),1),i.observationTargets.splice(r,1),fo(-1))},t.disconnect=function(e){var n=this,i=tn.get(e);i.observationTargets.slice().forEach(function(r){return n.unobserve(e,r.target)}),i.activeTargets.splice(0,i.activeTargets.length)},t}(),ff=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");en.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!oo(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");en.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!oo(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");en.unobserve(this,e)},t.prototype.disconnect=function(){en.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const hf=globalThis.ResizeObserver||ff,Zs={duration:void 0,margin:{top:0,bottom:0,left:0,right:0},padding:{top:0,bottom:0,left:0,right:0},sizing:ue.Fit,width:void 0,height:void 0,svgDefs:void 0,ariaLabel:void 0};class Le{constructor(e){this._defaultConfig=Zs,this._isFirstRender=!0,this._renderAnimationFrameId=null,this._container=e;const n=j(this._container);n.attr("role","figure"),this.svg=n.append("svg").style("display","block").attr("xmlns","http://www.w3.org/2000/svg").attr("height",Le.DEFAULT_CONTAINER_HEIGHT).attr("aria-hidden",!0),this._svgDefs=this.svg.append("defs"),this._svgDefsExternal=this.svg.append("defs"),this.element=this.svg.node()}updateContainer(e){var n;this.prevConfig=this.config,this.config=qt(this._defaultConfig,e),(e==null?void 0:e.svgDefs)!==((n=this.prevConfig)===null||n===void 0?void 0:n.svgDefs)&&(this._svgDefsExternal.selectAll("*").remove(),this._svgDefsExternal.html(e.svgDefs))}_preRender(){}_render(e){const{config:n}=this;j(this._container).attr("aria-label",n.ariaLabel),this._isFirstRender=!1}render(e=this.config.duration){const n=this.config.width||this.containerWidth,i=this.config.height||this.containerHeight;this.svg.attr("width",n).attr("height",i),this._resizeObserver||this._setUpResizeObserver(),cancelAnimationFrame(this._renderAnimationFrameId),this._renderAnimationFrameId=requestAnimationFrame(()=>{this._preRender(),this._render(e)})}get containerWidth(){return this.config.width?this.element.clientWidth:this._container.clientWidth||this._container.getBoundingClientRect().width}get containerHeight(){return this.config.height?this.element.clientHeight:this._container.clientHeight||this._container.getBoundingClientRect().height||Le.DEFAULT_CONTAINER_HEIGHT}get width(){return ie(this.containerWidth-this.config.margin.left-this.config.margin.right,0,Number.POSITIVE_INFINITY)}get height(){return ie(this.containerHeight-this.config.margin.top-this.config.margin.bottom,0,Number.POSITIVE_INFINITY)}_removeAllChildren(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}_onResize(){const{config:e}=this;(e.sizing===ue.Fit||e.sizing===ue.FitWidth)&&this.render(0)}_setUpResizeObserver(){if(this._resizeObserver)return;const e=this._container.getBoundingClientRect();this._containerSize={width:e.width,height:e.height},this._resizeObserver=new hf((n,i)=>{cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserverAnimationFrameId=requestAnimationFrame(()=>{const r=this._container.getBoundingClientRect(),o={width:r.width,height:r.height};!Pe(this._containerSize,o)&&o.width&&o.height&&(this._containerSize=o,this._onResize())})}),this._resizeObserver.observe(this._container)}destroy(){var e;cancelAnimationFrame(this._renderAnimationFrameId),cancelAnimationFrame(this._resizeObserverAnimationFrameId),(e=this._resizeObserver)===null||e===void 0||e.disconnect(),this.svg.remove()}}Le.DEFAULT_CONTAINER_HEIGHT=300;function df(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function pf(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var gf=function(){function t(n){var i=this;this._insertTag=function(r){var o;i.tags.length===0?i.insertionPoint?o=i.insertionPoint.nextSibling:i.prepend?o=i.container.firstChild:o=i.before:o=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,o),i.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(pf(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=df(r);try{o.insertRule(i,o.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)}),this.tags=[],this.ctr=0},t}(),G="-ms-",Cn="-moz-",O="-webkit-",Qs="comm",pr="rule",gr="decl",vf="@import",Js="@keyframes",mf="@layer",_f=Math.abs,jn=String.fromCharCode,yf=Object.assign;function xf(t,e){return q(t,0)^45?(((e<<2^q(t,0))<<2^q(t,1))<<2^q(t,2))<<2^q(t,3):0}function Ks(t){return t.trim()}function bf(t,e){return(t=e.exec(t))?t[0]:t}function D(t,e,n){return t.replace(e,n)}function Fi(t,e){return t.indexOf(e)}function q(t,e){return t.charCodeAt(e)|0}function Ie(t,e,n){return t.slice(e,n)}function yt(t){return t.length}function vr(t){return t.length}function nn(t,e){return e.push(t),t}function wf(t,e){return t.map(e).join("")}var Zn=1,he=1,ta=0,K=0,W=0,me="";function Qn(t,e,n,i,r,o,s){return{value:t,root:e,parent:n,type:i,props:r,children:o,line:Zn,column:he,length:s,return:""}}function we(t,e){return yf(Qn("",null,null,"",null,null,0),t,{length:-t.length},e)}function kf(){return W}function Tf(){return W=K>0?q(me,--K):0,he--,W===10&&(he=1,Zn--),W}function rt(){return W=K<ta?q(me,K++):0,he++,W===10&&(he=1,Zn++),W}function xt(){return q(me,K)}function cn(){return K}function qe(t,e){return Ie(me,t,e)}function Be(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ea(t){return Zn=he=1,ta=yt(me=t),K=0,[]}function na(t){return me="",t}function un(t){return Ks(qe(K-1,Pi(t===91?t+2:t===40?t+1:t)))}function Sf(t){for(;(W=xt())&&W<33;)rt();return Be(t)>2||Be(W)>3?"":" "}function Cf(t,e){for(;--e&&rt()&&!(W<48||W>102||W>57&&W<65||W>70&&W<97););return qe(t,cn()+(e<6&&xt()==32&&rt()==32))}function Pi(t){for(;rt();)switch(W){case t:return K;case 34:case 39:t!==34&&t!==39&&Pi(W);break;case 40:t===41&&Pi(t);break;case 92:rt();break}return K}function Mf(t,e){for(;rt()&&t+W!==57;)if(t+W===84&&xt()===47)break;return"/*"+qe(e,K-1)+"*"+jn(t===47?t:rt())}function Af(t){for(;!Be(xt());)rt();return qe(t,K)}function $f(t){return na(fn("",null,null,null,[""],t=ea(t),0,[0],t))}function fn(t,e,n,i,r,o,s,a,l){for(var c=0,f=0,u=s,h=0,d=0,g=0,p=1,v=1,_=1,x=0,y="",T=r,k=o,w=i,S=y;v;)switch(g=x,x=rt()){case 40:if(g!=108&&q(S,u-1)==58){Fi(S+=D(un(x),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:S+=un(x);break;case 9:case 10:case 13:case 32:S+=Sf(g);break;case 92:S+=Cf(cn()-1,7);continue;case 47:switch(xt()){case 42:case 47:nn(Ef(Mf(rt(),cn()),e,n),l);break;default:S+="/"}break;case 123*p:a[c++]=yt(S)*_;case 125*p:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+f:_==-1&&(S=D(S,/\f/g,"")),d>0&&yt(S)-u&&nn(d>32?go(S+";",i,n,u-1):go(D(S," ","")+";",i,n,u-2),l);break;case 59:S+=";";default:if(nn(w=po(S,e,n,c,f,r,a,y,T=[],k=[],u),o),x===123)if(f===0)fn(S,e,w,w,T,o,u,a,k);else switch(h===99&&q(S,3)===110?100:h){case 100:case 108:case 109:case 115:fn(t,w,w,i&&nn(po(t,w,w,0,0,r,a,y,r,T=[],u),k),r,k,u,a,i?T:k);break;default:fn(S,w,w,w,[""],k,0,a,k)}}c=f=d=0,p=_=1,y=S="",u=s;break;case 58:u=1+yt(S),d=g;default:if(p<1){if(x==123)--p;else if(x==125&&p++==0&&Tf()==125)continue}switch(S+=jn(x),x*p){case 38:_=f>0?1:(S+="\f",-1);break;case 44:a[c++]=(yt(S)-1)*_,_=1;break;case 64:xt()===45&&(S+=un(rt())),h=xt(),f=u=yt(y=S+=Af(cn())),x++;break;case 45:g===45&&yt(S)==2&&(p=0)}}return o}function po(t,e,n,i,r,o,s,a,l,c,f){for(var u=r-1,h=r===0?o:[""],d=vr(h),g=0,p=0,v=0;g<i;++g)for(var _=0,x=Ie(t,u+1,u=_f(p=s[g])),y=t;_<d;++_)(y=Ks(p>0?h[_]+" "+x:D(x,/&\f/g,h[_])))&&(l[v++]=y);return Qn(t,e,n,r===0?pr:a,l,c,f)}function Ef(t,e,n){return Qn(t,e,n,Qs,jn(kf()),Ie(t,2,-2),0)}function go(t,e,n,i){return Qn(t,e,n,gr,Ie(t,0,i),Ie(t,i+1,-1),i)}function oe(t,e){for(var n="",i=vr(t),r=0;r<i;r++)n+=e(t[r],r,t,e)||"";return n}function Nf(t,e,n,i){switch(t.type){case mf:if(t.children.length)break;case vf:case gr:return t.return=t.return||t.value;case Qs:return"";case Js:return t.return=t.value+"{"+oe(t.children,i)+"}";case pr:t.value=t.props.join(",")}return yt(n=oe(t.children,i))?t.return=t.value+"{"+n+"}":""}function Of(t){var e=vr(t);return function(n,i,r,o){for(var s="",a=0;a<e;a++)s+=t[a](n,i,r,o)||"";return s}}function Df(t){return function(e){e.root||(e=e.return)&&t(e)}}function Rf(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Ff=function(e,n,i){for(var r=0,o=0;r=o,o=xt(),r===38&&o===12&&(n[i]=1),!Be(o);)rt();return qe(e,K)},Pf=function(e,n){var i=-1,r=44;do switch(Be(r)){case 0:r===38&&xt()===12&&(n[i]=1),e[i]+=Ff(K-1,n,i);break;case 2:e[i]+=un(r);break;case 4:if(r===44){e[++i]=xt()===58?"&\f":"",n[i]=e[i].length;break}default:e[i]+=jn(r)}while(r=rt());return e},zf=function(e,n){return na(Pf(ea(e),n))},vo=new WeakMap,Lf=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,i=e.parent,r=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!vo.get(i))&&!r){vo.set(e,!0);for(var o=[],s=zf(n,o),a=i.props,l=0,c=0;l<s.length;l++)for(var f=0;f<a.length;f++,c++)e.props[c]=o[l]?s[l].replace(/&\f/g,a[f]):a[f]+" "+s[l]}}},If=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function ia(t,e){switch(xf(t,e)){case 5103:return O+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return O+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return O+t+Cn+t+G+t+t;case 6828:case 4268:return O+t+G+t+t;case 6165:return O+t+G+"flex-"+t+t;case 5187:return O+t+D(t,/(\w+).+(:[^]+)/,O+"box-$1$2"+G+"flex-$1$2")+t;case 5443:return O+t+G+"flex-item-"+D(t,/flex-|-self/,"")+t;case 4675:return O+t+G+"flex-line-pack"+D(t,/align-content|flex-|-self/,"")+t;case 5548:return O+t+G+D(t,"shrink","negative")+t;case 5292:return O+t+G+D(t,"basis","preferred-size")+t;case 6060:return O+"box-"+D(t,"-grow","")+O+t+G+D(t,"grow","positive")+t;case 4554:return O+D(t,/([^-])(transform)/g,"$1"+O+"$2")+t;case 6187:return D(D(D(t,/(zoom-|grab)/,O+"$1"),/(image-set)/,O+"$1"),t,"")+t;case 5495:case 3959:return D(t,/(image-set\([^]*)/,O+"$1$`$1");case 4968:return D(D(t,/(.+:)(flex-)?(.*)/,O+"box-pack:$3"+G+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+O+t+t;case 4095:case 3583:case 4068:case 2532:return D(t,/(.+)-inline(.+)/,O+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(yt(t)-1-e>6)switch(q(t,e+1)){case 109:if(q(t,e+4)!==45)break;case 102:return D(t,/(.+:)(.+)-([^]+)/,"$1"+O+"$2-$3$1"+Cn+(q(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Fi(t,"stretch")?ia(D(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(q(t,e+1)!==115)break;case 6444:switch(q(t,yt(t)-3-(~Fi(t,"!important")&&10))){case 107:return D(t,":",":"+O)+t;case 101:return D(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+O+(q(t,14)===45?"inline-":"")+"box$3$1"+O+"$2$3$1"+G+"$2box$3")+t}break;case 5936:switch(q(t,e+11)){case 114:return O+t+G+D(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return O+t+G+D(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return O+t+G+D(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return O+t+G+t+t}return t}var Bf=function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case gr:e.return=ia(e.value,e.length);break;case Js:return oe([we(e,{value:D(e.value,"@","@"+O)})],r);case pr:if(e.length)return wf(e.props,function(o){switch(bf(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return oe([we(e,{props:[D(o,/:(read-\w+)/,":"+Cn+"$1")]})],r);case"::placeholder":return oe([we(e,{props:[D(o,/:(plac\w+)/,":"+O+"input-$1")]}),we(e,{props:[D(o,/:(plac\w+)/,":"+Cn+"$1")]}),we(e,{props:[D(o,/:(plac\w+)/,G+"input-$1")]})],r)}return""})}},Uf=[Bf],Hf=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(p){var v=p.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var r=e.stylisPlugins||Uf,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var v=p.getAttribute("data-emotion").split(" "),_=1;_<v.length;_++)o[v[_]]=!0;a.push(p)});var l,c=[Lf,If];{var f,u=[Nf,Df(function(p){f.insert(p)})],h=Of(c.concat(r,u)),d=function(v){return oe($f(v),h)};l=function(v,_,x,y){f=x,d(v?v+"{"+_.styles+"}":_.styles),y&&(g.inserted[_.name]=!0)}}var g={key:n,sheet:new gf({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return g.sheet.hydrate(a),g};function Wf(t){for(var e=0,n,i=0,r=t.length;r>=4;++i,r-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Yf={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Vf=/[A-Z]|^ms/g,Xf=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ra=function(e){return e.charCodeAt(1)===45},mo=function(e){return e!=null&&typeof e!="boolean"},gi=Rf(function(t){return ra(t)?t:t.replace(Vf,"-$&").toLowerCase()}),_o=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Xf,function(i,r,o){return Rt={name:r,styles:o,next:Rt},r})}return Yf[e]!==1&&!ra(e)&&typeof n=="number"&&n!==0?n+"px":n};function Mn(t,e,n){if(n==null)return"";var i=n;if(i.__emotion_styles!==void 0)return i;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return Rt={name:r.name,styles:r.styles,next:Rt},r.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Rt={name:s.name,styles:s.styles,next:Rt},s=s.next;var a=o.styles+";";return a}return qf(t,e,n)}}var l=n;if(e==null)return l;var c=e[l];return c!==void 0?c:l}function qf(t,e,n){var i="";if(Array.isArray(n))for(var r=0;r<n.length;r++)i+=Mn(t,e,n[r])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;e!=null&&e[a]!==void 0?i+=o+"{"+e[a]+"}":mo(a)&&(i+=gi(o)+":"+_o(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var l=0;l<s.length;l++)mo(s[l])&&(i+=gi(o)+":"+_o(o,s[l])+";");else{var c=Mn(t,e,s);switch(o){case"animation":case"animationName":{i+=gi(o)+":"+c+";";break}default:i+=o+"{"+c+"}"}}}return i}var yo=/label:\s*([^\s;{]+)\s*(;|$)/g,Rt;function vi(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,r="";Rt=void 0;var o=t[0];if(o==null||o.raw===void 0)i=!1,r+=Mn(n,e,o);else{var s=o;r+=s[0]}for(var a=1;a<t.length;a++)if(r+=Mn(n,e,t[a]),i){var l=o;r+=l[a]}yo.lastIndex=0;for(var c="",f;(f=yo.exec(r))!==null;)c+="-"+f[1];var u=Wf(r)+c;return{name:u,styles:r,next:Rt}}function oa(t,e,n){var i="";return n.split(" ").forEach(function(r){t[r]!==void 0?e.push(t[r]+";"):r&&(i+=r+" ")}),i}var Gf=function(e,n,i){var r=e.key+"-"+n.name;e.registered[r]===void 0&&(e.registered[r]=n.styles)},jf=function(e,n,i){Gf(e,n);var r=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+r:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function xo(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function bo(t,e,n){var i=[],r=oa(t,i,n);return i.length<2?n:r+e(i)}var Zf=function(e){var n=Hf(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var i=function(){for(var l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];var u=vi(c,n.registered,void 0);return jf(n,u),n.key+"-"+u.name},r=function(){for(var l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];var u=vi(c,n.registered),h="animation-"+u.name;return xo(n,{name:u.name,styles:"@keyframes "+h+"{"+u.styles+"}"}),h},o=function(){for(var l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];var u=vi(c,n.registered);xo(n,u)},s=function(){for(var l=arguments.length,c=new Array(l),f=0;f<l;f++)c[f]=arguments[f];return bo(n.registered,i,Qf(c))};return{css:i,cx:s,injectGlobal:o,keyframes:r,hydrate:function(l){l.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:oa.bind(null,n.registered),merge:bo.bind(null,n.registered,i)}},Qf=function t(e){for(var n="",i=0;i<e.length;i++){var r=e[i];if(r!=null){var o=void 0;switch(typeof r){case"boolean":break;case"object":{if(Array.isArray(r))o=t(r);else{o="";for(var s in r)r[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=r}o&&(n&&(n+=" "),n+=o)}}return n},sa=Zf({key:"css"}),_e=sa.injectGlobal,P=sa.css;function Jf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var mi,wo;function Kf(){return wo||(wo=1,mi=function(e,n){n||(n=[0,""]),e=String(e);var i=parseFloat(e,10);return n[0]=i,n[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}),mi}var _i,ko;function th(){if(ko)return _i;ko=1;var t=Kf();_i=r;var e=i("in",document.body);function n(o,s){var a=t(getComputedStyle(o).getPropertyValue(s));return a[0]*r(a[1],o)}function i(o,s){var a=document.createElement("div");a.style.height="128"+o,s.appendChild(a);var l=n(a,"height")/128;return s.removeChild(a),l}function r(o,s){if(!o)return null;switch(s=s||document.body,o=(o+""||"px").trim().toLowerCase(),(s===window||s===document)&&(s=document.body),o){case"%":return s.clientHeight/100;case"ch":case"ex":return i(o,s);case"em":return n(s,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return e;case"cm":return e/2.54;case"mm":return e/25.4;case"pt":return e/72;case"pc":return e/6;case"px":return 1}var a=t(o);if(!isNaN(a[0])&&a[1]){var l=r(a[1],s);return typeof l=="number"?a[0]*l:null}return null}return _i}th();function aa(){const t=()=>Math.floor((1+crypto.getRandomValues(new Uint32Array(1))[0])*65536).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`}function eh(t,e){const n=t.substr(4,t.length-5);return getComputedStyle(e).getPropertyValue(n)}function nh(t,e,n=0){const[i,r,o,s]=[t.x+n,t.y+t.height-2*n,t.x+t.width-2*n,t.y+n],[a,l,c,f]=[e.x+n,e.y+e.height-2*n,e.x+e.width-2*n,e.y+n];return!(r<f||l<s||o<a||c<i)}function mr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function la(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Ge(){}var Ue=.7,An=1/Ue,se="\\s*([+-]?\\d+)\\s*",He="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ih=/^#([0-9a-f]{3,8})$/,rh=new RegExp(`^rgb\\(${se},${se},${se}\\)$`),oh=new RegExp(`^rgb\\(${bt},${bt},${bt}\\)$`),sh=new RegExp(`^rgba\\(${se},${se},${se},${He}\\)$`),ah=new RegExp(`^rgba\\(${bt},${bt},${bt},${He}\\)$`),lh=new RegExp(`^hsl\\(${He},${bt},${bt}\\)$`),ch=new RegExp(`^hsla\\(${He},${bt},${bt},${He}\\)$`),To={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};mr(Ge,Gt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:So,formatHex:So,formatHex8:uh,formatHsl:fh,formatRgb:Co,toString:Co});function So(){return this.rgb().formatHex()}function uh(){return this.rgb().formatHex8()}function fh(){return ca(this).formatHsl()}function Co(){return this.rgb().formatRgb()}function Gt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ih.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Mo(e):n===3?new Q(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?rn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?rn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=rh.exec(t))?new Q(e[1],e[2],e[3],1):(e=oh.exec(t))?new Q(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=sh.exec(t))?rn(e[1],e[2],e[3],e[4]):(e=ah.exec(t))?rn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=lh.exec(t))?Eo(e[1],e[2]/100,e[3]/100,1):(e=ch.exec(t))?Eo(e[1],e[2]/100,e[3]/100,e[4]):To.hasOwnProperty(t)?Mo(To[t]):t==="transparent"?new Q(NaN,NaN,NaN,0):null}function Mo(t){return new Q(t>>16&255,t>>8&255,t&255,1)}function rn(t,e,n,i){return i<=0&&(t=e=n=NaN),new Q(t,e,n,i)}function hh(t){return t instanceof Ge||(t=Gt(t)),t?(t=t.rgb(),new Q(t.r,t.g,t.b,t.opacity)):new Q}function zi(t,e,n,i){return arguments.length===1?hh(t):new Q(t,e,n,i??1)}function Q(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}mr(Q,zi,la(Ge,{brighter(t){return t=t==null?An:Math.pow(An,t),new Q(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ue:Math.pow(Ue,t),new Q(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Q(Wt(this.r),Wt(this.g),Wt(this.b),$n(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:Ao,formatHex:Ao,formatHex8:dh,formatRgb:$o,toString:$o}));function Ao(){return`#${Lt(this.r)}${Lt(this.g)}${Lt(this.b)}`}function dh(){return`#${Lt(this.r)}${Lt(this.g)}${Lt(this.b)}${Lt((isNaN(this.opacity)?1:this.opacity)*255)}`}function $o(){const t=$n(this.opacity);return`${t===1?"rgb(":"rgba("}${Wt(this.r)}, ${Wt(this.g)}, ${Wt(this.b)}${t===1?")":`, ${t})`}`}function $n(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Wt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Lt(t){return t=Wt(t),(t<16?"0":"")+t.toString(16)}function Eo(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ht(t,e,n,i)}function ca(t){if(t instanceof ht)return new ht(t.h,t.s,t.l,t.opacity);if(t instanceof Ge||(t=Gt(t)),!t)return new ht;if(t instanceof ht)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(e===o?s=(n-i)/a+(n<i)*6:n===o?s=(i-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new ht(s,a,l,t.opacity)}function _r(t,e,n,i){return arguments.length===1?ca(t):new ht(t,e,n,i??1)}function ht(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}mr(ht,_r,la(Ge,{brighter(t){return t=t==null?An:Math.pow(An,t),new ht(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ue:Math.pow(Ue,t),new ht(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Q(yi(t>=240?t-240:t+120,r,i),yi(t,r,i),yi(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new ht(No(this.h),on(this.s),on(this.l),$n(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 t=$n(this.opacity);return`${t===1?"hsl(":"hsla("}${No(this.h)}, ${on(this.s)*100}%, ${on(this.l)*100}%${t===1?")":`, ${t})`}`}}));function No(t){return t=(t||0)%360,t<0?t+360:t}function on(t){return Math.max(0,Math.min(1,t||0))}function yi(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Me=(globalThis==null?void 0:globalThis.UNOVIS_COLORS)||["#4D8CFD","#FF6B7E","#F4B83E","#A6CC74","#00C19A","#6859BE"],ph=(globalThis==null?void 0:globalThis.UNOVIS_COLORS_DARK)||["#4D8CFD","#FF6B7E","#FFC16D","#A6CC74","#00C19A","#7887E0"],Ot=t=>`--vis-${Bt(t)?`color${t%Me.length}`:t}`;function gh(t,e=.4){const n=_r(t);return n.l=n.l*(1+e),n.formatHex()}function vh(t,e=.4,n=.6){const i=_r(t);return i.s=i.s*(1-n),i.l=i.l*(1-e),i.formatHex()}const We=10,Li=[{id:"stripes-diagonal",svg:'<path d="M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2" stroke="#000"/>'},{id:"dots",svg:'<path d="m0-1.5a1 1 0 010 3m10-3a1 1 0 000 3M5 3.5a1 1 0 010 3 1 1 0 010-3M0 8.5 a1 1 0 010 3m10-3a1 1 0 000 3" fill"#000"/>'},{id:"stripes-vertical",svg:'<path d="M 5,-1 L5,11" stroke="#000"/>'},{id:"crosshatch",svg:'<path d="M0 0L10 10ZM10 0L0 10Z" stroke="#000"/>'},{id:"waves",svg:'<path d="M0 4Q2.5 1 5 4 7.5 7 10 4v2Q7.5 9 5 6 2.5 3 0 6Z" fill="#000"/>'},{id:"circles",svg:'<circle cx="5" cy="5" r="3" stroke="#000" fill="#fff"/>'}],Ii=[{id:"circle",marker:'<circle cx="5" cy="5" r="5"/>',dashArray:[]},{id:"triangle",marker:'<path d="M5,0 L10,9 L0,9Z">',dashArray:[9,1]},{id:"diamond",marker:'<path d="M 0 5 L5 0 L 10 5 L 5 10 L 0 5Z">',dashArray:[2]},{id:"arrow",marker:'<path d="M4 0 0 0 6 5 0 10 4 10 10 5Z">',dashArray:[2,3,8,3]},{id:"square",marker:'<rect x="1" y="1" width="8" height="8"/>',dashArray:[6]},{id:"star",marker:'<path d="m2 9 3-9 3 9L0 3h10Z"/>',dashArray:[1,6]}];function Dt(t){return`vis-${`pattern-${t.svg?"fill":"marker"}`}-${t.id}`}const mh=t=>`<mask id="${Dt(t)}">
2
- <pattern id="${t.id}" viewBox="0 0 10 10" width="${We}" height="${We}" patternUnits="userSpaceOnUse">
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("vue");var Oi="http://www.w3.org/1999/xhtml";const Kr={svg:"http://www.w3.org/2000/svg",xhtml:Oi,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Gn(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Kr.hasOwnProperty(e)?{space:Kr[e],local:t}:t}function Gl(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Oi&&e.documentElement.namespaceURI===Oi?e.createElement(t):e.createElementNS(n,t)}}function jl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ns(t){var e=Gn(t);return(e.local?jl:Gl)(e)}function Zl(){}function fr(t){return t==null?Zl:function(){return this.querySelector(t)}}function Ql(t){typeof t!="function"&&(t=fr(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=new Array(s),l,c,h=0;h<s;++h)(l=o[h])&&(c=t.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new st(i,this._parents)}function Jl(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Kl(){return[]}function Os(t){return t==null?Kl:function(){return this.querySelectorAll(t)}}function tc(t){return function(){return Jl(t.apply(this,arguments))}}function ec(t){typeof t=="function"?t=tc(t):t=Os(t);for(var e=this._groups,n=e.length,i=[],r=[],o=0;o<n;++o)for(var s=e[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(i.push(t.call(l,l.__data__,c,s)),r.push(l));return new st(i,r)}function Ds(t){return function(){return this.matches(t)}}function Rs(t){return function(e){return e.matches(t)}}var nc=Array.prototype.find;function ic(t){return function(){return nc.call(this.children,t)}}function rc(){return this.firstElementChild}function oc(t){return this.select(t==null?rc:ic(typeof t=="function"?t:Rs(t)))}var sc=Array.prototype.filter;function ac(){return Array.from(this.children)}function lc(t){return function(){return sc.call(this.children,t)}}function cc(t){return this.selectAll(t==null?ac:lc(typeof t=="function"?t:Rs(t)))}function uc(t){typeof t!="function"&&(t=Ds(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new st(i,this._parents)}function Fs(t){return new Array(t.length)}function hc(){return new st(this._enter||this._groups.map(Fs),this._parents)}function wn(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}wn.prototype={constructor:wn,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function fc(t){return function(){return t}}function dc(t,e,n,i,r,o){for(var s=0,a,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],i[s]=a):n[s]=new wn(t,o[s]);for(;s<l;++s)(a=e[s])&&(r[s]=a)}function pc(t,e,n,i,r,o,s){var a,l,c=new Map,h=e.length,u=o.length,f=new Array(h),d;for(a=0;a<h;++a)(l=e[a])&&(f[a]=d=s.call(l,l.__data__,a,e)+"",c.has(d)?r[a]=l:c.set(d,l));for(a=0;a<u;++a)d=s.call(t,o[a],a,o)+"",(l=c.get(d))?(i[a]=l,l.__data__=o[a],c.delete(d)):n[a]=new wn(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&c.get(f[a])===l&&(r[a]=l)}function gc(t){return t.__data__}function mc(t,e){if(!arguments.length)return Array.from(this,gc);var n=e?pc:dc,i=this._parents,r=this._groups;typeof t!="function"&&(t=fc(t));for(var o=r.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],u=r[c],f=u.length,d=vc(t.call(h,h&&h.__data__,c,i)),g=d.length,p=a[c]=new Array(g),v=s[c]=new Array(g),_=l[c]=new Array(f);n(h,u,p,v,_,d,e);for(var x=0,y=0,T,k;x<g;++x)if(T=p[x]){for(x>=y&&(y=x+1);!(k=v[y])&&++y<g;);T._next=k||null}}return s=new st(s,i),s._enter=a,s._exit=l,s}function vc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function _c(){return new st(this._exit||this._groups.map(Fs),this._parents)}function yc(t,e,n){var i=this.enter(),r=this,o=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?o.remove():n(o),i&&r?i.merge(r).order():r}function xc(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,o=i.length,s=Math.min(r,o),a=new Array(r),l=0;l<s;++l)for(var c=n[l],h=i[l],u=c.length,f=a[l]=new Array(u),d,g=0;g<u;++g)(d=c[g]||h[g])&&(f[g]=d);for(;l<r;++l)a[l]=n[l];return new st(a,this._parents)}function bc(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,o=i[r],s;--r>=0;)(s=i[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function wc(t){t||(t=kc);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var n=this._groups,i=n.length,r=new Array(i),o=0;o<i;++o){for(var s=n[o],a=s.length,l=r[o]=new Array(a),c,h=0;h<a;++h)(c=s[h])&&(l[h]=c);l.sort(e)}return new st(r,this._parents).order()}function kc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Tc(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Sc(){return Array.from(this)}function Cc(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length;r<o;++r){var s=i[r];if(s)return s}return null}function Mc(){let t=0;for(const e of this)++t;return t}function Ac(){return!this.node()}function $c(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],o=0,s=r.length,a;o<s;++o)(a=r[o])&&t.call(a,a.__data__,o,r);return this}function Ec(t){return function(){this.removeAttribute(t)}}function Nc(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Oc(t,e){return function(){this.setAttribute(t,e)}}function Dc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Rc(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Fc(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Pc(t,e){var n=Gn(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?Nc:Ec:typeof e=="function"?n.local?Fc:Rc:n.local?Dc:Oc)(n,e))}function Ps(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function zc(t){return function(){this.style.removeProperty(t)}}function Bc(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Lc(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Ic(t,e,n){return arguments.length>1?this.each((e==null?zc:typeof e=="function"?Lc:Bc)(t,e,n??"")):fe(this.node(),t)}function fe(t,e){return t.style.getPropertyValue(e)||Ps(t).getComputedStyle(t,null).getPropertyValue(e)}function Uc(t){return function(){delete this[t]}}function Hc(t,e){return function(){this[t]=e}}function Wc(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Vc(t,e){return arguments.length>1?this.each((e==null?Uc:typeof e=="function"?Wc:Hc)(t,e)):this.node()[t]}function zs(t){return t.trim().split(/^|\s+/)}function dr(t){return t.classList||new Bs(t)}function Bs(t){this._node=t,this._names=zs(t.getAttribute("class")||"")}Bs.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ls(t,e){for(var n=dr(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function Is(t,e){for(var n=dr(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function Yc(t){return function(){Ls(this,t)}}function Xc(t){return function(){Is(this,t)}}function qc(t,e){return function(){(e.apply(this,arguments)?Ls:Is)(this,t)}}function Gc(t,e){var n=zs(t+"");if(arguments.length<2){for(var i=dr(this.node()),r=-1,o=n.length;++r<o;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?qc:e?Yc:Xc)(n,e))}function jc(){this.textContent=""}function Zc(t){return function(){this.textContent=t}}function Qc(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Jc(t){return arguments.length?this.each(t==null?jc:(typeof t=="function"?Qc:Zc)(t)):this.node().textContent}function Kc(){this.innerHTML=""}function tu(t){return function(){this.innerHTML=t}}function eu(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function nu(t){return arguments.length?this.each(t==null?Kc:(typeof t=="function"?eu:tu)(t)):this.node().innerHTML}function iu(){this.nextSibling&&this.parentNode.appendChild(this)}function ru(){return this.each(iu)}function ou(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function su(){return this.each(ou)}function au(t){var e=typeof t=="function"?t:Ns(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function lu(){return null}function cu(t,e){var n=typeof t=="function"?t:Ns(t),i=e==null?lu:typeof e=="function"?e:fr(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function uu(){var t=this.parentNode;t&&t.removeChild(this)}function hu(){return this.each(uu)}function fu(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function du(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function pu(t){return this.select(t?du:fu)}function gu(t){return arguments.length?this.property("__data__",t):this.node().__data__}function mu(t){return function(e){t.call(this,e,this.__data__)}}function vu(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function _u(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,o;n<r;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++i]=o;++i?e.length=i:delete this.__on}}}function yu(t,e,n){return function(){var i=this.__on,r,o=mu(e);if(i){for(var s=0,a=i.length;s<a;++s)if((r=i[s]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),r.value=e;return}}this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function xu(t,e,n){var i=vu(t+""),r,o=i.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(r=0,h=a[l];r<o;++r)if((s=i[r]).type===h.type&&s.name===h.name)return h.value}return}for(a=e?yu:_u,r=0;r<o;++r)this.each(a(i[r],e,n));return this}function Us(t,e,n){var i=Ps(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function bu(t,e){return function(){return Us(this,t,e)}}function wu(t,e){return function(){return Us(this,t,e.apply(this,arguments))}}function ku(t,e){return this.each((typeof e=="function"?wu:bu)(t,e))}function*Tu(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length,s;r<o;++r)(s=i[r])&&(yield s)}var Hs=[null];function st(t,e){this._groups=t,this._parents=e}function qe(){return new st([[document.documentElement]],Hs)}function Su(){return this}st.prototype=qe.prototype={constructor:st,select:Ql,selectAll:ec,selectChild:oc,selectChildren:cc,filter:uc,data:mc,enter:hc,exit:_c,join:yc,merge:xc,selection:Su,order:bc,sort:wc,call:Tc,nodes:Sc,node:Cc,size:Mc,empty:Ac,each:$c,attr:Pc,style:Ic,property:Vc,classed:Gc,text:Jc,html:nu,raise:ru,lower:su,append:au,insert:cu,remove:hu,clone:pu,datum:gu,on:xu,dispatch:ku,[Symbol.iterator]:Tu};function Z(t){return typeof t=="string"?new st([[document.querySelector(t)]],[document.documentElement]):new st([[t]],Hs)}function Cu(t){let e;for(;e=t.sourceEvent;)t=e;return t}function kn(t,e){if(t=Cu(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}var De;(function(t){t[t.SVG=0]="SVG",t[t.HTML=1]="HTML"})(De||(De={}));var de;(function(t){t.Fit="fit",t.Extend="extend",t.FitWidth="fit_width"})(de||(de={}));function Re(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Mu(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function jn(t){let e,n,i;t.length!==2?(e=Re,n=(a,l)=>Re(t(a),l),i=(a,l)=>t(a)-l):(e=t===Re||t===Mu?t:Au,n=t,i=t);function r(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<0?c=u+1:h=u}while(c<h)}return c}function o(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<=0?c=u+1:h=u}while(c<h)}return c}function s(a,l,c=0,h=a.length){const u=r(a,l,c,h-1);return u>c&&i(a[u-1],l)>-i(a[u],l)?u-1:u}return{left:r,center:s,right:o}}function Au(){return 0}function Ws(t){return t===null?NaN:+t}const $u=jn(Re),Zn=$u.right;jn(Ws).center;function Eu(t,e){let n,i;for(const r of t)r!=null&&(n===void 0?r>=r&&(n=i=r):(n>r&&(n=r),i<r&&(i=r)));return[n,i]}class to extends Map{constructor(e,n=Du){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[i,r]of e)this.set(i,r)}get(e){return super.get(eo(this,e))}has(e){return super.has(eo(this,e))}set(e,n){return super.set(Nu(this,e),n)}delete(e){return super.delete(Ou(this,e))}}function eo({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function Nu({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function Ou({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function Du(t){return t!==null&&typeof t=="object"?t.valueOf():t}const Ru=Math.sqrt(50),Fu=Math.sqrt(10),Pu=Math.sqrt(2);function Tn(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),s=o>=Ru?10:o>=Fu?5:o>=Pu?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?Tn(t,e,n*2):[a,l,c]}function Di(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,o,s]=i?Tn(e,t,n):Tn(t,e,n);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(r+c)/-s;else for(let c=0;c<a;++c)l[c]=(r+c)*s;return l}function Ri(t,e,n){return e=+e,t=+t,n=+n,Tn(t,e,n)[2]}function Fi(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?Ri(e,t,n):Ri(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function no(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function io(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function zu(t,e,n=Ws){if(!(!(i=t.length)||isNaN(e=+e))){if(e<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,o=Math.floor(r),s=+n(t[o],o,t),a=+n(t[o+1],o+1,t);return s+(a-s)*(r-o)}}function Bu(t,e){let n=0,i=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&(++n,i+=o)}if(n)return i/n}function*Lu(t){for(const e of t)yield*e}function Iu(t){return Array.from(Lu(t))}function Uu(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(r);++i<r;)o[i]=t+i*n;return o}function Hu(t,e){let n=0;if(e===void 0)for(let i of t)(i=+i)&&(n+=i);else{let i=-1;for(let r of t)(r=+e(r,++i,t))&&(n+=r)}return n}function Wu(t,e,n){var i={},r=i.noTrailing,o=r===void 0?!1:r,s=i.noLeading,a=s===void 0?!1:s,l=i.debounceMode,c=l===void 0?void 0:l,h,u=!1,f=0;function d(){h&&clearTimeout(h)}function g(v){var _=v||{},x=_.upcomingOnly,y=x===void 0?!1:x;d(),u=!y}function p(){for(var v=arguments.length,_=new Array(v),x=0;x<v;x++)_[x]=arguments[x];var y=this,T=Date.now()-f;if(u)return;function k(){f=Date.now(),e.apply(y,_)}function w(){h=void 0}!a&&c&&!h&&k(),d(),c===void 0&&T>t?a?(f=Date.now(),o||(h=setTimeout(c?w:k,t))):k():o!==!0&&(h=setTimeout(c?w:k,c===void 0?t-T:t))}return p.cancel=g,p}const wt=t=>typeof t=="number",pr=t=>typeof t=="function",jt=t=>Array.isArray(t),Vu=t=>t instanceof Object,Sn=t=>t.constructor.name!=="Function"&&t.constructor.name!=="Object",ro=t=>Vu(t)&&!jt(t)&&!pr(t)&&!Sn(t),ze=(t,e,n=[],i=new Set)=>{if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;if(i.has(t))return!0;i.add(t);for(let r=0;r<t.length;r++)if(!ze(t[r],e[r],n,i))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object")return!1;if(t===e)return!0;const r=Object.keys(t).filter(s=>!n.includes(s)),o=Object.keys(e).filter(s=>!n.includes(s));if(r.length!==o.length)return!1;if(i.has(t))return!0;i.add(t);for(const s of r)if(!ze(t[s],e[s],n,i))return!1;return!0}return t===e},Pi=t=>t.flat(),Cn=(t,e=new Map)=>{if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){const n=[];e.set(t,n);for(const i of t)n.push(e.has(i)?e.get(i):Cn(i,e));return n}if(Sn(t))return t;if(t instanceof Object){const n={};e.set(t,n);const i=t;return Object.keys(t).reduce((r,o)=>(r[o]=e.has(i[o])?e.get(i[o]):Cn(i[o],e),r),n),n}return t},Zt=(t,e,n=new Map)=>{if(!t||!e||t===e)return t;const i=Sn(t)?t:Cn(t);return n.has(e)?n.get(e):(n.set(e,i),Object.keys(e).forEach(r=>{r==="__proto__"||r==="constructor"||(ro(t[r])&&ro(e[r])?i[r]=Zt(t[r],e[r],n):Sn(e)?i[r]=e:i[r]=Cn(e[r]))}),i)},Mn=(t,e,n)=>Wu(e,t);function gr(t,e,n){return pr(e)?e(t,n):e}function Qn(t,e,n){return gr(t,e,n)}function Y(t,e,n){return gr(t,e,n)}function we(t){return t.filter(e=>e&&!wt(e))}function Pt(t,e,n){return Math.min(Math.max(t,e),n)}function Yu(t,...e){if(!t)return[void 0,void 0];if(jt(e)){let n=0,i=0;return t.forEach((r,o)=>{let s=0,a=0;for(const l of e){const c=Y(r,l,o)||0;c>=0?s+=c:a+=c}s>i&&(i=s),a<n&&(n=a)}),[n,i]}}function Xu(t,e,...n){const i=[];let r=0,o=0;for(const s of n){const a=Y(t,s,e)||0;a>=0?i.push(r+=a):i.push(o+=a)}return i}function qu(t,e,n,i){const r=t.map((a,l)=>Y(a,e,l)||0),o=n.map((a,l)=>{const c=Bu(t,(h,u)=>Y(h,a,u)||0);return c===0&&Array.isArray(i)?i[l]:c<0}),s=n.map(()=>[]);return t.forEach((a,l)=>{let c=r[l],h=r[l];n.forEach((u,f)=>{const d=Y(a,u,l)||0;d>=0?s[f].push([c,c+=d]):s[f].push([h,h+=d])})}),s.forEach((a,l)=>{a.isMostlyNegative=o[l]}),s}function Gu(t,...e){return t?io(t,(i,r)=>io(e,o=>Y(i,o,r))):void 0}function ju(t,...e){return t?no(t,(i,r)=>no(e,o=>Y(i,o,r))):void 0}function gi(t,...e){return[Gu(t,...e),ju(t,...e)]}function Zu(t,e,n){if(t.length<=1)return t[0];const i=t.map((s,a)=>Y(s,n,a));i.sort((s,a)=>s-a);const r=jn(s=>s).left,o=r(i,e,1,t.length-1);return e-i[o-1]>i[o]-e?t[o]:t[o-1]}function Vs(t,e,n){return t.filter((r,o)=>{const s=Y(r,n,o);return s>=e[0]&&s<=e[1]})}var Wt=[],Qu=function(){return Wt.some(function(t){return t.activeTargets.length>0})},Ju=function(){return Wt.some(function(t){return t.skippedTargets.length>0})},oo="ResizeObserver loop completed with undelivered notifications.",Ku=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:oo}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=oo),window.dispatchEvent(t)},Be;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Be||(Be={}));var Vt=function(t){return Object.freeze(t)},th=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Vt(this)}return t}(),Ys=function(){function t(e,n,i,r){return this.x=e,this.y=n,this.width=i,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Vt(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,i=e.y,r=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,c=e.height;return{x:n,y:i,top:r,right:o,bottom:s,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),mr=function(t){return t instanceof SVGElement&&"getBBox"in t},Xs=function(t){if(mr(t)){var e=t.getBBox(),n=e.width,i=e.height;return!n&&!i}var r=t,o=r.offsetWidth,s=r.offsetHeight;return!(o||s||t.getClientRects().length)},so=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},eh=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Fe=typeof window<"u"?window:{},tn=new WeakMap,ao=/auto|scroll/,nh=/^tb|vertical/,ih=/msie|trident/i.test(Fe.navigator&&Fe.navigator.userAgent),_t=function(t){return parseFloat(t||"0")},le=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new th((n?e:t)||0,(n?t:e)||0)},lo=Vt({devicePixelContentBoxSize:le(),borderBoxSize:le(),contentBoxSize:le(),contentRect:new Ys(0,0,0,0)}),qs=function(t,e){if(e===void 0&&(e=!1),tn.has(t)&&!e)return tn.get(t);if(Xs(t))return tn.set(t,lo),lo;var n=getComputedStyle(t),i=mr(t)&&t.ownerSVGElement&&t.getBBox(),r=!ih&&n.boxSizing==="border-box",o=nh.test(n.writingMode||""),s=!i&&ao.test(n.overflowY||""),a=!i&&ao.test(n.overflowX||""),l=i?0:_t(n.paddingTop),c=i?0:_t(n.paddingRight),h=i?0:_t(n.paddingBottom),u=i?0:_t(n.paddingLeft),f=i?0:_t(n.borderTopWidth),d=i?0:_t(n.borderRightWidth),g=i?0:_t(n.borderBottomWidth),p=i?0:_t(n.borderLeftWidth),v=u+c,_=l+h,x=p+d,y=f+g,T=a?t.offsetHeight-y-t.clientHeight:0,k=s?t.offsetWidth-x-t.clientWidth:0,w=r?v+x:0,S=r?_+y:0,B=i?i.width:_t(n.width)-w-k,F=i?i.height:_t(n.height)-S-T,et=B+v+k+x,A=F+_+T+y,U=Vt({devicePixelContentBoxSize:le(Math.round(B*devicePixelRatio),Math.round(F*devicePixelRatio),o),borderBoxSize:le(et,A,o),contentBoxSize:le(B,F,o),contentRect:new Ys(u,l,B,F)});return tn.set(t,U),U},Gs=function(t,e,n){var i=qs(t,n),r=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(e){case Be.DEVICE_PIXEL_CONTENT_BOX:return s;case Be.BORDER_BOX:return r;default:return o}},rh=function(){function t(e){var n=qs(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Vt([n.borderBoxSize]),this.contentBoxSize=Vt([n.contentBoxSize]),this.devicePixelContentBoxSize=Vt([n.devicePixelContentBoxSize])}return t}(),js=function(t){if(Xs(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},oh=function(){var t=1/0,e=[];Wt.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var h=new rh(c.target),u=js(c.target);a.push(h),c.lastReportedSize=Gs(c.target,c.observedBox),u<t&&(t=u)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,i=e;n<i.length;n++){var r=i[n];r()}return t},co=function(t){Wt.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(r){r.isActive()&&(js(r.target)>t?n.activeTargets.push(r):n.skippedTargets.push(r))})})},sh=function(){var t=0;for(co(t);Qu();)t=oh(),co(t);return Ju()&&Ku(),t>0},mi,Zs=[],ah=function(){return Zs.splice(0).forEach(function(t){return t()})},lh=function(t){if(!mi){var e=0,n=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return ah()}).observe(n,i),mi=function(){n.textContent="".concat(e?e--:e++)}}Zs.push(t),mi()},ch=function(t){lh(function(){requestAnimationFrame(t)})},cn=0,uh=function(){return!!cn},hh=250,fh={attributes:!0,characterData:!0,childList:!0,subtree:!0},uo=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],ho=function(t){return t===void 0&&(t=0),Date.now()+t},vi=!1,dh=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=hh),!vi){vi=!0;var i=ho(e);ch(function(){var r=!1;try{r=sh()}finally{if(vi=!1,e=i-ho(),!uh())return;r?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,fh)};document.body?n():Fe.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),uo.forEach(function(n){return Fe.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),uo.forEach(function(n){return Fe.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),zi=new dh,fo=function(t){!cn&&t>0&&zi.start(),cn+=t,!cn&&zi.stop()},ph=function(t){return!mr(t)&&!eh(t)&&getComputedStyle(t).display==="inline"},gh=function(){function t(e,n){this.target=e,this.observedBox=n||Be.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Gs(this.target,this.observedBox,!0);return ph(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),mh=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),en=new WeakMap,po=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},nn=function(){function t(){}return t.connect=function(e,n){var i=new mh(e,n);en.set(e,i)},t.observe=function(e,n,i){var r=en.get(e),o=r.observationTargets.length===0;po(r.observationTargets,n)<0&&(o&&Wt.push(r),r.observationTargets.push(new gh(n,i&&i.box)),fo(1),zi.schedule())},t.unobserve=function(e,n){var i=en.get(e),r=po(i.observationTargets,n),o=i.observationTargets.length===1;r>=0&&(o&&Wt.splice(Wt.indexOf(i),1),i.observationTargets.splice(r,1),fo(-1))},t.disconnect=function(e){var n=this,i=en.get(e);i.observationTargets.slice().forEach(function(r){return n.unobserve(e,r.target)}),i.activeTargets.splice(0,i.activeTargets.length)},t}(),vh=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");nn.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!so(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");nn.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!so(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");nn.unobserve(this,e)},t.prototype.disconnect=function(){nn.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const _h=globalThis.ResizeObserver||vh,Qs={duration:void 0,margin:{top:0,bottom:0,left:0,right:0},padding:{top:0,bottom:0,left:0,right:0},sizing:de.Fit,width:void 0,height:void 0,svgDefs:void 0,ariaLabel:void 0};class Le{constructor(e){this._defaultConfig=Qs,this._isFirstRender=!0,this._renderAnimationFrameId=null,this._container=e;const n=Z(this._container);n.attr("role","figure"),this.svg=n.append("svg").style("display","block").attr("xmlns","http://www.w3.org/2000/svg").attr("height",Le.DEFAULT_CONTAINER_HEIGHT).attr("aria-hidden",!0),this._svgDefs=this.svg.append("defs"),this._svgDefsExternal=this.svg.append("defs"),this.element=this.svg.node()}updateContainer(e){var n;this.prevConfig=this.config,this.config=Zt(this._defaultConfig,e),(e==null?void 0:e.svgDefs)!==((n=this.prevConfig)===null||n===void 0?void 0:n.svgDefs)&&(this._svgDefsExternal.selectAll("*").remove(),this._svgDefsExternal.html(e.svgDefs))}_preRender(){}_render(e){const{config:n}=this;Z(this._container).attr("aria-label",n.ariaLabel),this._isFirstRender=!1}render(e=this.config.duration){const n=this.config.width||this.containerWidth,i=this.config.height||this.containerHeight;this.svg.attr("width",n).attr("height",i),this._resizeObserver||this._setUpResizeObserver(),cancelAnimationFrame(this._renderAnimationFrameId),this._renderAnimationFrameId=requestAnimationFrame(()=>{this._preRender(),this._render(e)})}get containerWidth(){return this.config.width?this.element.clientWidth:this._container.clientWidth||this._container.getBoundingClientRect().width}get containerHeight(){return this.config.height?this.element.clientHeight:this._container.clientHeight||this._container.getBoundingClientRect().height||Le.DEFAULT_CONTAINER_HEIGHT}get width(){return Pt(this.containerWidth-this.config.margin.left-this.config.margin.right,0,Number.POSITIVE_INFINITY)}get height(){return Pt(this.containerHeight-this.config.margin.top-this.config.margin.bottom,0,Number.POSITIVE_INFINITY)}_removeAllChildren(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}_onResize(){const{config:e}=this;(e.sizing===de.Fit||e.sizing===de.FitWidth)&&this.render(0)}_setUpResizeObserver(){if(this._resizeObserver)return;const e=this._container.getBoundingClientRect();this._containerSize={width:e.width,height:e.height},this._resizeObserver=new _h((n,i)=>{cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserverAnimationFrameId=requestAnimationFrame(()=>{const r=this._container.getBoundingClientRect(),o={width:r.width,height:r.height};!ze(this._containerSize,o)&&o.width&&o.height&&(this._containerSize=o,this._onResize())})}),this._resizeObserver.observe(this._container)}destroy(){var e;cancelAnimationFrame(this._renderAnimationFrameId),cancelAnimationFrame(this._resizeObserverAnimationFrameId),(e=this._resizeObserver)===null||e===void 0||e.disconnect(),this.svg.remove()}}Le.DEFAULT_CONTAINER_HEIGHT=300;function yh(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function xh(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var bh=function(){function t(n){var i=this;this._insertTag=function(r){var o;i.tags.length===0?i.insertionPoint?o=i.insertionPoint.nextSibling:i.prepend?o=i.container.firstChild:o=i.before:o=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,o),i.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(xh(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=yh(r);try{o.insertRule(i,o.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)}),this.tags=[],this.ctr=0},t}(),j="-ms-",An="-moz-",D="-webkit-",Js="comm",vr="rule",_r="decl",wh="@import",Ks="@keyframes",kh="@layer",Th=Math.abs,Jn=String.fromCharCode,Sh=Object.assign;function Ch(t,e){return G(t,0)^45?(((e<<2^G(t,0))<<2^G(t,1))<<2^G(t,2))<<2^G(t,3):0}function ta(t){return t.trim()}function Mh(t,e){return(t=e.exec(t))?t[0]:t}function R(t,e,n){return t.replace(e,n)}function Bi(t,e){return t.indexOf(e)}function G(t,e){return t.charCodeAt(e)|0}function Ie(t,e,n){return t.slice(e,n)}function xt(t){return t.length}function yr(t){return t.length}function rn(t,e){return e.push(t),t}function Ah(t,e){return t.map(e).join("")}var Kn=1,pe=1,ea=0,tt=0,W=0,ye="";function ti(t,e,n,i,r,o,s){return{value:t,root:e,parent:n,type:i,props:r,children:o,line:Kn,column:pe,length:s,return:""}}function ke(t,e){return Sh(ti("",null,null,"",null,null,0),t,{length:-t.length},e)}function $h(){return W}function Eh(){return W=tt>0?G(ye,--tt):0,pe--,W===10&&(pe=1,Kn--),W}function ot(){return W=tt<ea?G(ye,tt++):0,pe++,W===10&&(pe=1,Kn++),W}function kt(){return G(ye,tt)}function un(){return tt}function Ge(t,e){return Ie(ye,t,e)}function Ue(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function na(t){return Kn=pe=1,ea=xt(ye=t),tt=0,[]}function ia(t){return ye="",t}function hn(t){return ta(Ge(tt-1,Li(t===91?t+2:t===40?t+1:t)))}function Nh(t){for(;(W=kt())&&W<33;)ot();return Ue(t)>2||Ue(W)>3?"":" "}function Oh(t,e){for(;--e&&ot()&&!(W<48||W>102||W>57&&W<65||W>70&&W<97););return Ge(t,un()+(e<6&&kt()==32&&ot()==32))}function Li(t){for(;ot();)switch(W){case t:return tt;case 34:case 39:t!==34&&t!==39&&Li(W);break;case 40:t===41&&Li(t);break;case 92:ot();break}return tt}function Dh(t,e){for(;ot()&&t+W!==57;)if(t+W===84&&kt()===47)break;return"/*"+Ge(e,tt-1)+"*"+Jn(t===47?t:ot())}function Rh(t){for(;!Ue(kt());)ot();return Ge(t,tt)}function Fh(t){return ia(fn("",null,null,null,[""],t=na(t),0,[0],t))}function fn(t,e,n,i,r,o,s,a,l){for(var c=0,h=0,u=s,f=0,d=0,g=0,p=1,v=1,_=1,x=0,y="",T=r,k=o,w=i,S=y;v;)switch(g=x,x=ot()){case 40:if(g!=108&&G(S,u-1)==58){Bi(S+=R(hn(x),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:S+=hn(x);break;case 9:case 10:case 13:case 32:S+=Nh(g);break;case 92:S+=Oh(un()-1,7);continue;case 47:switch(kt()){case 42:case 47:rn(Ph(Dh(ot(),un()),e,n),l);break;default:S+="/"}break;case 123*p:a[c++]=xt(S)*_;case 125*p:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+h:_==-1&&(S=R(S,/\f/g,"")),d>0&&xt(S)-u&&rn(d>32?mo(S+";",i,n,u-1):mo(R(S," ","")+";",i,n,u-2),l);break;case 59:S+=";";default:if(rn(w=go(S,e,n,c,h,r,a,y,T=[],k=[],u),o),x===123)if(h===0)fn(S,e,w,w,T,o,u,a,k);else switch(f===99&&G(S,3)===110?100:f){case 100:case 108:case 109:case 115:fn(t,w,w,i&&rn(go(t,w,w,0,0,r,a,y,r,T=[],u),k),r,k,u,a,i?T:k);break;default:fn(S,w,w,w,[""],k,0,a,k)}}c=h=d=0,p=_=1,y=S="",u=s;break;case 58:u=1+xt(S),d=g;default:if(p<1){if(x==123)--p;else if(x==125&&p++==0&&Eh()==125)continue}switch(S+=Jn(x),x*p){case 38:_=h>0?1:(S+="\f",-1);break;case 44:a[c++]=(xt(S)-1)*_,_=1;break;case 64:kt()===45&&(S+=hn(ot())),f=kt(),h=u=xt(y=S+=Rh(un())),x++;break;case 45:g===45&&xt(S)==2&&(p=0)}}return o}function go(t,e,n,i,r,o,s,a,l,c,h){for(var u=r-1,f=r===0?o:[""],d=yr(f),g=0,p=0,v=0;g<i;++g)for(var _=0,x=Ie(t,u+1,u=Th(p=s[g])),y=t;_<d;++_)(y=ta(p>0?f[_]+" "+x:R(x,/&\f/g,f[_])))&&(l[v++]=y);return ti(t,e,n,r===0?vr:a,l,c,h)}function Ph(t,e,n){return ti(t,e,n,Js,Jn($h()),Ie(t,2,-2),0)}function mo(t,e,n,i){return ti(t,e,n,_r,Ie(t,0,i),Ie(t,i+1,-1),i)}function ce(t,e){for(var n="",i=yr(t),r=0;r<i;r++)n+=e(t[r],r,t,e)||"";return n}function zh(t,e,n,i){switch(t.type){case kh:if(t.children.length)break;case wh:case _r:return t.return=t.return||t.value;case Js:return"";case Ks:return t.return=t.value+"{"+ce(t.children,i)+"}";case vr:t.value=t.props.join(",")}return xt(n=ce(t.children,i))?t.return=t.value+"{"+n+"}":""}function Bh(t){var e=yr(t);return function(n,i,r,o){for(var s="",a=0;a<e;a++)s+=t[a](n,i,r,o)||"";return s}}function Lh(t){return function(e){e.root||(e=e.return)&&t(e)}}function Ih(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Uh=function(e,n,i){for(var r=0,o=0;r=o,o=kt(),r===38&&o===12&&(n[i]=1),!Ue(o);)ot();return Ge(e,tt)},Hh=function(e,n){var i=-1,r=44;do switch(Ue(r)){case 0:r===38&&kt()===12&&(n[i]=1),e[i]+=Uh(tt-1,n,i);break;case 2:e[i]+=hn(r);break;case 4:if(r===44){e[++i]=kt()===58?"&\f":"",n[i]=e[i].length;break}default:e[i]+=Jn(r)}while(r=ot());return e},Wh=function(e,n){return ia(Hh(na(e),n))},vo=new WeakMap,Vh=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,i=e.parent,r=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!vo.get(i))&&!r){vo.set(e,!0);for(var o=[],s=Wh(n,o),a=i.props,l=0,c=0;l<s.length;l++)for(var h=0;h<a.length;h++,c++)e.props[c]=o[l]?s[l].replace(/&\f/g,a[h]):a[h]+" "+s[l]}}},Yh=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function ra(t,e){switch(Ch(t,e)){case 5103:return D+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return D+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return D+t+An+t+j+t+t;case 6828:case 4268:return D+t+j+t+t;case 6165:return D+t+j+"flex-"+t+t;case 5187:return D+t+R(t,/(\w+).+(:[^]+)/,D+"box-$1$2"+j+"flex-$1$2")+t;case 5443:return D+t+j+"flex-item-"+R(t,/flex-|-self/,"")+t;case 4675:return D+t+j+"flex-line-pack"+R(t,/align-content|flex-|-self/,"")+t;case 5548:return D+t+j+R(t,"shrink","negative")+t;case 5292:return D+t+j+R(t,"basis","preferred-size")+t;case 6060:return D+"box-"+R(t,"-grow","")+D+t+j+R(t,"grow","positive")+t;case 4554:return D+R(t,/([^-])(transform)/g,"$1"+D+"$2")+t;case 6187:return R(R(R(t,/(zoom-|grab)/,D+"$1"),/(image-set)/,D+"$1"),t,"")+t;case 5495:case 3959:return R(t,/(image-set\([^]*)/,D+"$1$`$1");case 4968:return R(R(t,/(.+:)(flex-)?(.*)/,D+"box-pack:$3"+j+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+D+t+t;case 4095:case 3583:case 4068:case 2532:return R(t,/(.+)-inline(.+)/,D+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(xt(t)-1-e>6)switch(G(t,e+1)){case 109:if(G(t,e+4)!==45)break;case 102:return R(t,/(.+:)(.+)-([^]+)/,"$1"+D+"$2-$3$1"+An+(G(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Bi(t,"stretch")?ra(R(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(G(t,e+1)!==115)break;case 6444:switch(G(t,xt(t)-3-(~Bi(t,"!important")&&10))){case 107:return R(t,":",":"+D)+t;case 101:return R(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+D+(G(t,14)===45?"inline-":"")+"box$3$1"+D+"$2$3$1"+j+"$2box$3")+t}break;case 5936:switch(G(t,e+11)){case 114:return D+t+j+R(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return D+t+j+R(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return D+t+j+R(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return D+t+j+t+t}return t}var Xh=function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case _r:e.return=ra(e.value,e.length);break;case Ks:return ce([ke(e,{value:R(e.value,"@","@"+D)})],r);case vr:if(e.length)return Ah(e.props,function(o){switch(Mh(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ce([ke(e,{props:[R(o,/:(read-\w+)/,":"+An+"$1")]})],r);case"::placeholder":return ce([ke(e,{props:[R(o,/:(plac\w+)/,":"+D+"input-$1")]}),ke(e,{props:[R(o,/:(plac\w+)/,":"+An+"$1")]}),ke(e,{props:[R(o,/:(plac\w+)/,j+"input-$1")]})],r)}return""})}},qh=[Xh],Gh=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(p){var v=p.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var r=e.stylisPlugins||qh,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var v=p.getAttribute("data-emotion").split(" "),_=1;_<v.length;_++)o[v[_]]=!0;a.push(p)});var l,c=[Vh,Yh];{var h,u=[zh,Lh(function(p){h.insert(p)})],f=Bh(c.concat(r,u)),d=function(v){return ce(Fh(v),f)};l=function(v,_,x,y){h=x,d(v?v+"{"+_.styles+"}":_.styles),y&&(g.inserted[_.name]=!0)}}var g={key:n,sheet:new bh({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return g.sheet.hydrate(a),g};function jh(t){for(var e=0,n,i=0,r=t.length;r>=4;++i,r-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Zh={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Qh=/[A-Z]|^ms/g,Jh=/_EMO_([^_]+?)_([^]*?)_EMO_/g,oa=function(e){return e.charCodeAt(1)===45},_o=function(e){return e!=null&&typeof e!="boolean"},_i=Ih(function(t){return oa(t)?t:t.replace(Qh,"-$&").toLowerCase()}),yo=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Jh,function(i,r,o){return zt={name:r,styles:o,next:zt},r})}return Zh[e]!==1&&!oa(e)&&typeof n=="number"&&n!==0?n+"px":n};function $n(t,e,n){if(n==null)return"";var i=n;if(i.__emotion_styles!==void 0)return i;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return zt={name:r.name,styles:r.styles,next:zt},r.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)zt={name:s.name,styles:s.styles,next:zt},s=s.next;var a=o.styles+";";return a}return Kh(t,e,n)}}var l=n;if(e==null)return l;var c=e[l];return c!==void 0?c:l}function Kh(t,e,n){var i="";if(Array.isArray(n))for(var r=0;r<n.length;r++)i+=$n(t,e,n[r])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;e!=null&&e[a]!==void 0?i+=o+"{"+e[a]+"}":_o(a)&&(i+=_i(o)+":"+yo(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var l=0;l<s.length;l++)_o(s[l])&&(i+=_i(o)+":"+yo(o,s[l])+";");else{var c=$n(t,e,s);switch(o){case"animation":case"animationName":{i+=_i(o)+":"+c+";";break}default:i+=o+"{"+c+"}"}}}return i}var xo=/label:\s*([^\s;{]+)\s*(;|$)/g,zt;function yi(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,r="";zt=void 0;var o=t[0];if(o==null||o.raw===void 0)i=!1,r+=$n(n,e,o);else{var s=o;r+=s[0]}for(var a=1;a<t.length;a++)if(r+=$n(n,e,t[a]),i){var l=o;r+=l[a]}xo.lastIndex=0;for(var c="",h;(h=xo.exec(r))!==null;)c+="-"+h[1];var u=jh(r)+c;return{name:u,styles:r,next:zt}}function sa(t,e,n){var i="";return n.split(" ").forEach(function(r){t[r]!==void 0?e.push(t[r]+";"):r&&(i+=r+" ")}),i}var tf=function(e,n,i){var r=e.key+"-"+n.name;e.registered[r]===void 0&&(e.registered[r]=n.styles)},ef=function(e,n,i){tf(e,n);var r=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+r:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function bo(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function wo(t,e,n){var i=[],r=sa(t,i,n);return i.length<2?n:r+e(i)}var nf=function(e){var n=Gh(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var i=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=yi(c,n.registered,void 0);return ef(n,u),n.key+"-"+u.name},r=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=yi(c,n.registered),f="animation-"+u.name;return bo(n,{name:u.name,styles:"@keyframes "+f+"{"+u.styles+"}"}),f},o=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=yi(c,n.registered);bo(n,u)},s=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];return wo(n.registered,i,rf(c))};return{css:i,cx:s,injectGlobal:o,keyframes:r,hydrate:function(l){l.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:sa.bind(null,n.registered),merge:wo.bind(null,n.registered,i)}},rf=function t(e){for(var n="",i=0;i<e.length;i++){var r=e[i];if(r!=null){var o=void 0;switch(typeof r){case"boolean":break;case"object":{if(Array.isArray(r))o=t(r);else{o="";for(var s in r)r[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=r}o&&(n&&(n+=" "),n+=o)}}return n},aa=nf({key:"css"}),Kt=aa.injectGlobal,O=aa.css;function of(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xi,ko;function sf(){return ko||(ko=1,xi=function(e,n){n||(n=[0,""]),e=String(e);var i=parseFloat(e,10);return n[0]=i,n[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}),xi}var bi,To;function af(){if(To)return bi;To=1;var t=sf();bi=r;var e=i("in",document.body);function n(o,s){var a=t(getComputedStyle(o).getPropertyValue(s));return a[0]*r(a[1],o)}function i(o,s){var a=document.createElement("div");a.style.height="128"+o,s.appendChild(a);var l=n(a,"height")/128;return s.removeChild(a),l}function r(o,s){if(!o)return null;switch(s=s||document.body,o=(o+""||"px").trim().toLowerCase(),(s===window||s===document)&&(s=document.body),o){case"%":return s.clientHeight/100;case"ch":case"ex":return i(o,s);case"em":return n(s,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return e;case"cm":return e/2.54;case"mm":return e/25.4;case"pt":return e/72;case"pc":return e/6;case"px":return 1}var a=t(o);if(!isNaN(a[0])&&a[1]){var l=r(a[1],s);return typeof l=="number"?a[0]*l:null}return null}return bi}af();function la(){const t=()=>Math.floor((1+crypto.getRandomValues(new Uint32Array(1))[0])*65536).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`}function lf(t,e){const n=t.substr(4,t.length-5);return getComputedStyle(e).getPropertyValue(n)}function cf(t,e,n=0){const[i,r,o,s]=[t.x+n,t.y+t.height-2*n,t.x+t.width-2*n,t.y+n],[a,l,c,h]=[e.x+n,e.y+e.height-2*n,e.x+e.width-2*n,e.y+n];return!(r<h||l<s||o<a||c<i)}function xr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ca(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function je(){}var He=.7,En=1/He,ue="\\s*([+-]?\\d+)\\s*",We="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Tt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",uf=/^#([0-9a-f]{3,8})$/,hf=new RegExp(`^rgb\\(${ue},${ue},${ue}\\)$`),ff=new RegExp(`^rgb\\(${Tt},${Tt},${Tt}\\)$`),df=new RegExp(`^rgba\\(${ue},${ue},${ue},${We}\\)$`),pf=new RegExp(`^rgba\\(${Tt},${Tt},${Tt},${We}\\)$`),gf=new RegExp(`^hsl\\(${We},${Tt},${Tt}\\)$`),mf=new RegExp(`^hsla\\(${We},${Tt},${Tt},${We}\\)$`),So={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};xr(je,Qt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Co,formatHex:Co,formatHex8:vf,formatHsl:_f,formatRgb:Mo,toString:Mo});function Co(){return this.rgb().formatHex()}function vf(){return this.rgb().formatHex8()}function _f(){return ua(this).formatHsl()}function Mo(){return this.rgb().formatRgb()}function Qt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=uf.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Ao(e):n===3?new J(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?on(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?on(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=hf.exec(t))?new J(e[1],e[2],e[3],1):(e=ff.exec(t))?new J(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=df.exec(t))?on(e[1],e[2],e[3],e[4]):(e=pf.exec(t))?on(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=gf.exec(t))?No(e[1],e[2]/100,e[3]/100,1):(e=mf.exec(t))?No(e[1],e[2]/100,e[3]/100,e[4]):So.hasOwnProperty(t)?Ao(So[t]):t==="transparent"?new J(NaN,NaN,NaN,0):null}function Ao(t){return new J(t>>16&255,t>>8&255,t&255,1)}function on(t,e,n,i){return i<=0&&(t=e=n=NaN),new J(t,e,n,i)}function yf(t){return t instanceof je||(t=Qt(t)),t?(t=t.rgb(),new J(t.r,t.g,t.b,t.opacity)):new J}function Ii(t,e,n,i){return arguments.length===1?yf(t):new J(t,e,n,i??1)}function J(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}xr(J,Ii,ca(je,{brighter(t){return t=t==null?En:Math.pow(En,t),new J(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?He:Math.pow(He,t),new J(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new J(Yt(this.r),Yt(this.g),Yt(this.b),Nn(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:$o,formatHex:$o,formatHex8:xf,formatRgb:Eo,toString:Eo}));function $o(){return`#${Ut(this.r)}${Ut(this.g)}${Ut(this.b)}`}function xf(){return`#${Ut(this.r)}${Ut(this.g)}${Ut(this.b)}${Ut((isNaN(this.opacity)?1:this.opacity)*255)}`}function Eo(){const t=Nn(this.opacity);return`${t===1?"rgb(":"rgba("}${Yt(this.r)}, ${Yt(this.g)}, ${Yt(this.b)}${t===1?")":`, ${t})`}`}function Nn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Yt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ut(t){return t=Yt(t),(t<16?"0":"")+t.toString(16)}function No(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new pt(t,e,n,i)}function ua(t){if(t instanceof pt)return new pt(t.h,t.s,t.l,t.opacity);if(t instanceof je||(t=Qt(t)),!t)return new pt;if(t instanceof pt)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(e===o?s=(n-i)/a+(n<i)*6:n===o?s=(i-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new pt(s,a,l,t.opacity)}function br(t,e,n,i){return arguments.length===1?ua(t):new pt(t,e,n,i??1)}function pt(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}xr(pt,br,ca(je,{brighter(t){return t=t==null?En:Math.pow(En,t),new pt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?He:Math.pow(He,t),new pt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new J(wi(t>=240?t-240:t+120,r,i),wi(t,r,i),wi(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new pt(Oo(this.h),sn(this.s),sn(this.l),Nn(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 t=Nn(this.opacity);return`${t===1?"hsl(":"hsla("}${Oo(this.h)}, ${sn(this.s)*100}%, ${sn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Oo(t){return t=(t||0)%360,t<0?t+360:t}function sn(t){return Math.max(0,Math.min(1,t||0))}function wi(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Ae=(globalThis==null?void 0:globalThis.UNOVIS_COLORS)||["#4D8CFD","#FF6B7E","#F4B83E","#A6CC74","#00C19A","#6859BE"],bf=(globalThis==null?void 0:globalThis.UNOVIS_COLORS_DARK)||["#4D8CFD","#FF6B7E","#FFC16D","#A6CC74","#00C19A","#7887E0"],Rt=t=>`--vis-${wt(t)?`color${t%Ae.length}`:t}`;function wf(t,e=.4){const n=br(t);return n.l=n.l*(1+e),n.formatHex()}function kf(t,e=.4,n=.6){const i=br(t);return i.s=i.s*(1-n),i.l=i.l*(1-e),i.formatHex()}const Ve=10,Ui=[{id:"stripes-diagonal",svg:'<path d="M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2" stroke="#000"/>'},{id:"dots",svg:'<path d="m0-1.5a1 1 0 010 3m10-3a1 1 0 000 3M5 3.5a1 1 0 010 3 1 1 0 010-3M0 8.5 a1 1 0 010 3m10-3a1 1 0 000 3" fill"#000"/>'},{id:"stripes-vertical",svg:'<path d="M 5,-1 L5,11" stroke="#000"/>'},{id:"crosshatch",svg:'<path d="M0 0L10 10ZM10 0L0 10Z" stroke="#000"/>'},{id:"waves",svg:'<path d="M0 4Q2.5 1 5 4 7.5 7 10 4v2Q7.5 9 5 6 2.5 3 0 6Z" fill="#000"/>'},{id:"circles",svg:'<circle cx="5" cy="5" r="3" stroke="#000" fill="#fff"/>'}],Hi=[{id:"circle",marker:'<circle cx="5" cy="5" r="5"/>',dashArray:[]},{id:"triangle",marker:'<path d="M5,0 L10,9 L0,9Z">',dashArray:[9,1]},{id:"diamond",marker:'<path d="M 0 5 L5 0 L 10 5 L 5 10 L 0 5Z">',dashArray:[2]},{id:"arrow",marker:'<path d="M4 0 0 0 6 5 0 10 4 10 10 5Z">',dashArray:[2,3,8,3]},{id:"square",marker:'<rect x="1" y="1" width="8" height="8"/>',dashArray:[6]},{id:"star",marker:'<path d="m2 9 3-9 3 9L0 3h10Z"/>',dashArray:[1,6]}];function Ft(t){return`vis-${`pattern-${t.svg?"fill":"marker"}`}-${t.id}`}const Tf=t=>`<mask id="${Ft(t)}">
2
+ <pattern id="${t.id}" viewBox="0 0 10 10" width="${Ve}" height="${Ve}" patternUnits="userSpaceOnUse">
3
3
  <rect width="100%" height="100%" fill="#fff"/>
4
4
  ${t.svg}
5
5
  </pattern>
6
6
  <rect x="-50%" y="-50%" width="200%" height="200%" fill="url(#${t.id})"/>
7
- </mask>`,_h=(t,e)=>`<marker id="${Dt(t)}"
8
- fill="var(${Ot(e)})"
7
+ </mask>`,Sf=(t,e)=>`<marker id="${Ft(t)}"
8
+ fill="var(${Rt(e)})"
9
9
  markerUnits="userSpaceOnUse"
10
10
  refX="5"
11
11
  refY="5"
12
- markerWidth="${We}"
13
- markerHeight="${We}">
12
+ markerWidth="${Ve}"
13
+ markerHeight="${Ve}">
14
14
  ${t.marker}
15
- </marker>`;function yh(){const t=Li.map(mh).concat(Ii.map(_h)).join(""),e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("height","100%"),e.setAttribute("width","100%"),e.style.position="fixed",e.style.zIndex="-99999999",e.innerHTML=`<defs>${t}</defs>`,document.body.appendChild(e)}typeof window<"u"&&yh();const ua=(globalThis==null?void 0:globalThis.UNOVIS_FONT_W2H_RATIO_DEFAULT)||.5,fa=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_SEPARATOR_DEFAULT)||[" ","-",".",","],ha=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_HYPHEN_CHARACTER_DEFAULT)||"-",Oo=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_DEFAULT)||{text:"",fontSize:12,fontFamily:"var(--vis-font-family)",lineHeight:1.25,marginTop:0,marginBottom:0};_e`
15
+ </marker>`;function Cf(){const t=Ui.map(Tf).concat(Hi.map(Sf)).join(""),e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("height","100%"),e.setAttribute("width","100%"),e.style.position="fixed",e.style.zIndex="-99999999",e.innerHTML=`<defs>${t}</defs>`,document.body.appendChild(e)}typeof window<"u"&&Cf();const ha=(globalThis==null?void 0:globalThis.UNOVIS_FONT_W2H_RATIO_DEFAULT)||.5,fa=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_SEPARATOR_DEFAULT)||[" ","-",".",","],da=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_HYPHEN_CHARACTER_DEFAULT)||"-",Do=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_DEFAULT)||{text:"",fontSize:12,fontFamily:"var(--vis-font-family)",lineHeight:1.25,marginTop:0,marginBottom:0};Kt`
16
16
  :root {
17
17
  label: vis-root-styles;
18
18
  --vis-font-family: Inter, Arial, "Helvetica Neue", Helvetica, sans-serif;
19
- --vis-font-wh-ratio: ${ua};
20
- --vis-color-main: var(${Ot(0)});
21
- --vis-color-main-light: ${gh(Me[0])};
22
- --vis-color-main-dark: ${vh(Me[0])};
19
+ --vis-font-wh-ratio: ${ha};
20
+ --vis-color-main: var(${Rt(0)});
21
+ --vis-color-main-light: ${wf(Ae[0])};
22
+ --vis-color-main-dark: ${kf(Ae[0])};
23
23
  --vis-color-grey: #2a2a2a;
24
- ${Me.map((t,e)=>`${Ot(e)}: ${t};`)}
25
- ${ph.map((t,e)=>`--vis-dark-color${e}: ${t};`)}
26
- ${Li.map((t,e)=>`
27
- --${Dt(t)}: url(#${Dt(t)});
28
- --vis-pattern-fill${e}: var(--${Dt(t)});
24
+ ${Ae.map((t,e)=>`${Rt(e)}: ${t};`)}
25
+ ${bf.map((t,e)=>`--vis-dark-color${e}: ${t};`)}
26
+ ${Ui.map((t,e)=>`
27
+ --${Ft(t)}: url(#${Ft(t)});
28
+ --vis-pattern-fill${e}: var(--${Ft(t)});
29
29
  `)}
30
- ${Ii.map((t,e)=>{var n;return`
31
- --${Dt(t)}: url(#${Dt(t)});
32
- --vis-pattern-marker${e}: var(--${Dt(t)});
30
+ ${Hi.map((t,e)=>{var n;return`
31
+ --${Ft(t)}: url(#${Ft(t)});
32
+ --vis-pattern-marker${e}: var(--${Ft(t)});
33
33
  --vis-pattern-dasharray${e}: ${(n=t.dashArray)===null||n===void 0?void 0:n.join(" ")};
34
34
  `})}
35
35
 
36
36
  body.theme-dark {
37
- ${Me.map((t,e)=>`${Ot(e)}: var(--vis-dark-color${e});`)}
37
+ ${Ae.map((t,e)=>`${Rt(e)}: var(--vis-dark-color${e});`)}
38
38
  }
39
39
 
40
40
  body.theme-patterns {
41
- ${Li.map((t,e)=>`path[style*="fill: var(${Ot(e)})"] {
41
+ ${Ui.map((t,e)=>`path[style*="fill: var(${Rt(e)})"] {
42
42
  mask: var(--vis-pattern-fill${e});
43
43
  }`)}
44
- ${Ii.map((t,e)=>`
45
- path[stroke="var(${Ot(e)})"]:not([style*="fill"]),
46
- path[style*="stroke: var(${Ot(e)})"]:not([style*="fill"]) {
44
+ ${Hi.map((t,e)=>`
45
+ path[stroke="var(${Rt(e)})"]:not([style*="fill"]),
46
+ path[style*="stroke: var(${Rt(e)})"]:not([style*="fill"]) {
47
47
  marker: var(--vis-pattern-marker${e});
48
48
  stroke-dasharray: var(--vis-pattern-dasharray${e});
49
49
  }
50
50
  `)}
51
51
  }
52
- `;function xh(t=window==null?void 0:window.document.body){return t?+eh("var(--vis-font-wh-ratio)",t):ua}var bh={value:()=>{}};function da(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new hn(n)}function hn(t){this._=t}function wh(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}hn.prototype=da.prototype={constructor:hn,on:function(t,e){var n=this._,i=wh(t+"",n),r,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((r=(t=i[o]).type)&&(r=kh(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(r=(t=i[o]).type)n[r]=Do(n[r],t.name,e);else if(e==null)for(r in n)n[r]=Do(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new hn(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,o;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,r=o.length;i<r;++i)o[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};function kh(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function Do(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=bh,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var de=0,Ae=0,ke=0,pa=1e3,En,$e,Nn=0,jt=0,Jn=0,Ye=typeof performance=="object"&&performance.now?performance:Date,ga=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function yr(){return jt||(ga(Th),jt=Ye.now()+Jn)}function Th(){jt=0}function On(){this._call=this._time=this._next=null}On.prototype=va.prototype={constructor:On,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?yr():+n)+(e==null?0:+e),!this._next&&$e!==this&&($e?$e._next=this:En=this,$e=this),this._call=t,this._time=n,Bi()},stop:function(){this._call&&(this._call=null,this._time=1/0,Bi())}};function va(t,e,n){var i=new On;return i.restart(t,e,n),i}function Sh(){yr(),++de;for(var t=En,e;t;)(e=jt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--de}function Ro(){jt=(Nn=Ye.now())+Jn,de=Ae=0;try{Sh()}finally{de=0,Mh(),jt=0}}function Ch(){var t=Ye.now(),e=t-Nn;e>pa&&(Jn-=e,Nn=t)}function Mh(){for(var t,e=En,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:En=n);$e=t,Bi(i)}function Bi(t){if(!de){Ae&&(Ae=clearTimeout(Ae));var e=t-jt;e>24?(t<1/0&&(Ae=setTimeout(Ro,t-Ye.now()-Jn)),ke&&(ke=clearInterval(ke))):(ke||(Nn=Ye.now(),ke=setInterval(Ch,pa)),de=1,ga(Ro))}}function Fo(t,e,n){var i=new On;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var Ah=da("start","end","cancel","interrupt"),$h=[],ma=0,Po=1,Ui=2,dn=3,zo=4,Hi=5,pn=6;function Kn(t,e,n,i,r,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;Eh(t,n,{name:e,index:i,group:r,on:Ah,tween:$h,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:ma})}function xr(t,e){var n=pt(t,e);if(n.state>ma)throw new Error("too late; already scheduled");return n}function wt(t,e){var n=pt(t,e);if(n.state>dn)throw new Error("too late; already running");return n}function pt(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Eh(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=va(o,0,n.time);function o(c){n.state=Po,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var f,u,h,d;if(n.state!==Po)return l();for(f in i)if(d=i[f],d.name===n.name){if(d.state===dn)return Fo(s);d.state===zo?(d.state=pn,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[f]):+f<e&&(d.state=pn,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[f])}if(Fo(function(){n.state===dn&&(n.state=zo,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Ui,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Ui){for(n.state=dn,r=new Array(h=n.tween.length),f=0,u=-1;f<h;++f)(d=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+1}}function a(c){for(var f=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Hi,1),u=-1,h=r.length;++u<h;)r[u].call(t,f);n.state===Hi&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=pn,n.timer.stop(),delete i[e];for(var c in i)return;delete t.__transition}}function br(t,e){var n=t.__transition,i,r,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((i=n[s]).name!==e){o=!1;continue}r=i.state>Ui&&i.state<Hi,i.state=pn,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[s]}o&&delete t.__transition}}function Nh(t){return this.each(function(){br(this,t)})}const wr=t=>()=>t;function Oh(t,e){return function(n){return t+n*e}}function Dh(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function Rh(t){return(t=+t)==1?_a:function(e,n){return n-e?Dh(e,n,t):wr(isNaN(e)?n:e)}}function _a(t,e){var n=e-t;return n?Oh(t,n):wr(isNaN(t)?e:t)}const Dn=function t(e){var n=Rh(e);function i(r,o){var s=n((r=zi(r)).r,(o=zi(o)).r),a=n(r.g,o.g),l=n(r.b,o.b),c=_a(r.opacity,o.opacity);return function(f){return r.r=s(f),r.g=a(f),r.b=l(f),r.opacity=c(f),r+""}}return i.gamma=t,i}(1);function Fh(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(o){for(r=0;r<n;++r)i[r]=t[r]*(1-o)+e[r]*o;return i}}function Ph(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function zh(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),o=new Array(n),s;for(s=0;s<i;++s)r[s]=ye(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(a){for(s=0;s<i;++s)o[s]=r[s](a);return o}}function Lh(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function ut(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ih(t,e){var n={},i={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=ye(t[r],e[r]):i[r]=e[r];return function(o){for(r in n)i[r]=n[r](o);return i}}var Wi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xi=new RegExp(Wi.source,"g");function Bh(t){return function(){return t}}function Uh(t){return function(e){return t(e)+""}}function ya(t,e){var n=Wi.lastIndex=xi.lastIndex=0,i,r,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(i=Wi.exec(t))&&(r=xi.exec(e));)(o=r.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:ut(i,r)})),n=xi.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?Uh(l[0].x):Bh(e):(e=l.length,function(c){for(var f=0,u;f<e;++f)a[(u=l[f]).i]=u.x(c);return a.join("")})}function ye(t,e){var n=typeof e,i;return e==null||n==="boolean"?wr(e):(n==="number"?ut:n==="string"?(i=Gt(e))?(e=i,Dn):ya:e instanceof Gt?Dn:e instanceof Date?Lh:Ph(e)?Fh:Array.isArray(e)?zh:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Ih:ut)(t,e)}function kr(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Lo=180/Math.PI,Yi={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function xa(t,e,n,i,r,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:r,translateY:o,rotate:Math.atan2(e,t)*Lo,skewX:Math.atan(l)*Lo,scaleX:s,scaleY:a}}var sn;function Hh(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Yi:xa(e.a,e.b,e.c,e.d,e.e,e.f)}function Wh(t){return t==null||(sn||(sn=document.createElementNS("http://www.w3.org/2000/svg","g")),sn.setAttribute("transform",t),!(t=sn.transform.baseVal.consolidate()))?Yi:(t=t.matrix,xa(t.a,t.b,t.c,t.d,t.e,t.f))}function ba(t,e,n,i){function r(c){return c.length?c.pop()+" ":""}function o(c,f,u,h,d,g){if(c!==u||f!==h){var p=d.push("translate(",null,e,null,n);g.push({i:p-4,x:ut(c,u)},{i:p-2,x:ut(f,h)})}else(u||h)&&d.push("translate("+u+e+h+n)}function s(c,f,u,h){c!==f?(c-f>180?f+=360:f-c>180&&(c+=360),h.push({i:u.push(r(u)+"rotate(",null,i)-2,x:ut(c,f)})):f&&u.push(r(u)+"rotate("+f+i)}function a(c,f,u,h){c!==f?h.push({i:u.push(r(u)+"skewX(",null,i)-2,x:ut(c,f)}):f&&u.push(r(u)+"skewX("+f+i)}function l(c,f,u,h,d,g){if(c!==u||f!==h){var p=d.push(r(d)+"scale(",null,",",null,")");g.push({i:p-4,x:ut(c,u)},{i:p-2,x:ut(f,h)})}else(u!==1||h!==1)&&d.push(r(d)+"scale("+u+","+h+")")}return function(c,f){var u=[],h=[];return c=t(c),f=t(f),o(c.translateX,c.translateY,f.translateX,f.translateY,u,h),s(c.rotate,f.rotate,u,h),a(c.skewX,f.skewX,u,h),l(c.scaleX,c.scaleY,f.scaleX,f.scaleY,u,h),c=f=null,function(d){for(var g=-1,p=h.length,v;++g<p;)u[(v=h[g]).i]=v.x(d);return u.join("")}}}var Yh=ba(Hh,"px, ","px)","deg)"),Vh=ba(Wh,", ",")",")");function Xh(t,e){e===void 0&&(e=t,t=ye);for(var n=0,i=e.length-1,r=e[0],o=new Array(i<0?0:i);n<i;)o[n]=t(r,r=e[++n]);return function(s){var a=Math.max(0,Math.min(i-1,Math.floor(s*=i)));return o[a](s-a)}}function qh(t,e){var n,i;return function(){var r=wt(this,t),o=r.tween;if(o!==n){i=n=o;for(var s=0,a=i.length;s<a;++s)if(i[s].name===e){i=i.slice(),i.splice(s,1);break}}r.tween=i}}function Gh(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var o=wt(this,t),s=o.tween;if(s!==i){r=(i=s).slice();for(var a={name:e,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=a;break}l===c&&r.push(a)}o.tween=r}}function jh(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=pt(this.node(),n).tween,r=0,o=i.length,s;r<o;++r)if((s=i[r]).name===t)return s.value;return null}return this.each((e==null?qh:Gh)(n,t,e))}function Tr(t,e,n){var i=t._id;return t.each(function(){var r=wt(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return pt(r,i).value[e]}}function wa(t,e){var n;return(typeof e=="number"?ut:e instanceof Gt?Dn:(n=Gt(e))?(e=n,Dn):ya)(t,e)}function Zh(t){return function(){this.removeAttribute(t)}}function Qh(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Jh(t,e,n){var i,r=n+"",o;return function(){var s=this.getAttribute(t);return s===r?null:s===i?o:o=e(i=s,n)}}function Kh(t,e,n){var i,r=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===r?null:s===i?o:o=e(i=s,n)}}function td(t,e,n){var i,r,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=a+"",s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a)))}}function ed(t,e,n){var i,r,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=a+"",s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a)))}}function nd(t,e){var n=Xn(t),i=n==="transform"?Vh:wa;return this.attrTween(t,typeof e=="function"?(n.local?ed:td)(n,i,Tr(this,"attr."+t,e)):e==null?(n.local?Qh:Zh)(n):(n.local?Kh:Jh)(n,i,e))}function id(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function rd(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function od(t,e){var n,i;function r(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&rd(t,o)),n}return r._value=e,r}function sd(t,e){var n,i;function r(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&id(t,o)),n}return r._value=e,r}function ad(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var i=Xn(t);return this.tween(n,(i.local?od:sd)(i,e))}function ld(t,e){return function(){xr(this,t).delay=+e.apply(this,arguments)}}function cd(t,e){return e=+e,function(){xr(this,t).delay=e}}function ud(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?ld:cd)(e,t)):pt(this.node(),e).delay}function fd(t,e){return function(){wt(this,t).duration=+e.apply(this,arguments)}}function hd(t,e){return e=+e,function(){wt(this,t).duration=e}}function dd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?fd:hd)(e,t)):pt(this.node(),e).duration}function pd(t,e){if(typeof e!="function")throw new Error;return function(){wt(this,t).ease=e}}function gd(t){var e=this._id;return arguments.length?this.each(pd(e,t)):pt(this.node(),e).ease}function vd(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;wt(this,t).ease=n}}function md(t){if(typeof t!="function")throw new Error;return this.each(vd(this._id,t))}function _d(t){typeof t!="function"&&(t=Ns(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new Mt(i,this._parents,this._name,this._id)}function yd(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,o=Math.min(i,r),s=new Array(i),a=0;a<o;++a)for(var l=e[a],c=n[a],f=l.length,u=s[a]=new Array(f),h,d=0;d<f;++d)(h=l[d]||c[d])&&(u[d]=h);for(;a<i;++a)s[a]=e[a];return new Mt(s,this._parents,this._name,this._id)}function xd(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function bd(t,e,n){var i,r,o=xd(e)?xr:wt;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(e,n),s.on=r}}function wd(t,e){var n=this._id;return arguments.length<2?pt(this.node(),n).on.on(t):this.each(bd(n,t,e))}function kd(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Td(){return this.on("end.remove",kd(this._id))}function Sd(t){var e=this._name,n=this._id;typeof t!="function"&&(t=cr(t));for(var i=this._groups,r=i.length,o=new Array(r),s=0;s<r;++s)for(var a=i[s],l=a.length,c=o[s]=new Array(l),f,u,h=0;h<l;++h)(f=a[h])&&(u=t.call(f,f.__data__,h,a))&&("__data__"in f&&(u.__data__=f.__data__),c[h]=u,Kn(c[h],e,n,h,c,pt(f,n)));return new Mt(o,this._parents,e,n)}function Cd(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Es(t));for(var i=this._groups,r=i.length,o=[],s=[],a=0;a<r;++a)for(var l=i[a],c=l.length,f,u=0;u<c;++u)if(f=l[u]){for(var h=t.call(f,f.__data__,u,l),d,g=pt(f,n),p=0,v=h.length;p<v;++p)(d=h[p])&&Kn(d,e,n,p,h,g);o.push(h),s.push(f)}return new Mt(o,s,e,n)}var Md=Xe.prototype.constructor;function Ad(){return new Md(this._groups,this._parents)}function $d(t,e){var n,i,r;return function(){var o=ce(this,t),s=(this.style.removeProperty(t),ce(this,t));return o===s?null:o===n&&s===i?r:r=e(n=o,i=s)}}function ka(t){return function(){this.style.removeProperty(t)}}function Ed(t,e,n){var i,r=n+"",o;return function(){var s=ce(this,t);return s===r?null:s===i?o:o=e(i=s,n)}}function Nd(t,e,n){var i,r,o;return function(){var s=ce(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),ce(this,t))),s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a))}}function Od(t,e){var n,i,r,o="style."+e,s="end."+o,a;return function(){var l=wt(this,t),c=l.on,f=l.value[o]==null?a||(a=ka(e)):void 0;(c!==n||r!==f)&&(i=(n=c).copy()).on(s,r=f),l.on=i}}function Dd(t,e,n){var i=(t+="")=="transform"?Yh:wa;return e==null?this.styleTween(t,$d(t,i)).on("end.style."+t,ka(t)):typeof e=="function"?this.styleTween(t,Nd(t,i,Tr(this,"style."+t,e))).each(Od(this._id,t)):this.styleTween(t,Ed(t,i,e),n).on("end.style."+t,null)}function Rd(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function Fd(t,e,n){var i,r;function o(){var s=e.apply(this,arguments);return s!==r&&(i=(r=s)&&Rd(t,s,n)),i}return o._value=e,o}function Pd(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,Fd(t,e,n??""))}function zd(t){return function(){this.textContent=t}}function Ld(t){return function(){var e=t(this);this.textContent=e??""}}function Id(t){return this.tween("text",typeof t=="function"?Ld(Tr(this,"text",t)):zd(t==null?"":t+""))}function Bd(t){return function(e){this.textContent=t.call(this,e)}}function Ud(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Bd(r)),e}return i._value=t,i}function Hd(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Ud(t))}function Wd(){for(var t=this._name,e=this._id,n=Ta(),i=this._groups,r=i.length,o=0;o<r;++o)for(var s=i[o],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var f=pt(l,e);Kn(l,t,n,c,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Mt(i,this._parents,t,n)}function Yd(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--r===0&&o()}};n.each(function(){var c=wt(this,i),f=c.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),c.on=e}),r===0&&o()})}var Vd=0;function Mt(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function Ta(){return++Vd}var kt=Xe.prototype;Mt.prototype={constructor:Mt,select:Sd,selectAll:Cd,selectChild:kt.selectChild,selectChildren:kt.selectChildren,filter:_d,merge:yd,selection:Ad,transition:Wd,call:kt.call,nodes:kt.nodes,node:kt.node,size:kt.size,empty:kt.empty,each:kt.each,on:wd,attr:nd,attrTween:ad,style:Dd,styleTween:Pd,text:Id,textTween:Hd,remove:Td,tween:jh,delay:ud,duration:dd,ease:gd,easeVarying:md,end:Yd,[Symbol.iterator]:kt[Symbol.iterator]};function Xd(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var qd={time:null,delay:0,duration:250,ease:Xd};function Gd(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function jd(t){var e,n;t instanceof Mt?(e=t._id,t=t._name):(e=Ta(),(n=qd).time=yr(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var s=i[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&Kn(l,t,e,c,s,n||Gd(l,e));return new Mt(i,this._parents,t,e)}Xe.prototype.interrupt=Nh;Xe.prototype.transition=jd;function Tt(t,e,n){return t.nodes().forEach(i=>br(i)),e?t.transition().duration(e):t}class Sr{constructor(e){this.data=e}get data(){return this._data}set data(e){this._data=e}}var F;(function(t){t.X="x",t.Y="y"})(F||(F={}));function gt(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Sa(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Io=Symbol("implicit");function Cr(){var t=new Kr,e=[],n=[],i=Io;function r(o){let s=t.get(o);if(s===void 0){if(i!==Io)return i;t.set(o,s=e.push(o)-1)}return n[s%n.length]}return r.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Kr;for(const s of o)t.has(s)||t.set(s,e.push(s)-1);return r},r.range=function(o){return arguments.length?(n=Array.from(o),r):n.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return Cr(e,n).unknown(i)},gt.apply(r,arguments),r}function Mr(){var t=Cr().unknown(void 0),e=t.domain,n=t.range,i=0,r=1,o,s,a=!1,l=0,c=0,f=.5;delete t.unknown;function u(){var h=e().length,d=r<i,g=d?r:i,p=d?i:r;o=(p-g)/Math.max(1,h-l+c*2),a&&(o=Math.floor(o)),g+=(p-g-o*(h-l))*f,s=o*(1-l),a&&(g=Math.round(g),s=Math.round(s));var v=Pu(h).map(function(_){return g+o*_});return n(d?v.reverse():v)}return t.domain=function(h){return arguments.length?(e(h),u()):e()},t.range=function(h){return arguments.length?([i,r]=h,i=+i,r=+r,u()):[i,r]},t.rangeRound=function(h){return[i,r]=h,i=+i,r=+r,a=!0,u()},t.bandwidth=function(){return s},t.step=function(){return o},t.round=function(h){return arguments.length?(a=!!h,u()):a},t.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),u()):l},t.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),u()):l},t.paddingOuter=function(h){return arguments.length?(c=+h,u()):c},t.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),u()):f},t.copy=function(){return Mr(e(),[i,r]).round(a).paddingInner(l).paddingOuter(c).align(f)},gt.apply(u(),arguments)}function Ca(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ca(e())},t}function Zd(){return Ca(Mr.apply(null,arguments).paddingInner(1))}function Qd(t){return function(){return t}}function Vi(t){return+t}var Bo=[0,1];function J(t){return t}function Xi(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Qd(isNaN(e)?NaN:.5)}function Jd(t,e){var n;return t>e&&(n=t,t=e,e=n),function(i){return Math.max(t,Math.min(e,i))}}function Kd(t,e,n){var i=t[0],r=t[1],o=e[0],s=e[1];return r<i?(i=Xi(r,i),o=n(s,o)):(i=Xi(i,r),o=n(o,s)),function(a){return o(i(a))}}function tp(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),o=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)r[s]=Xi(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(a){var l=qn(t,a,1,i)-1;return o[l](r[l](a))}}function je(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function ti(){var t=Bo,e=Bo,n=ye,i,r,o,s=J,a,l,c;function f(){var h=Math.min(t.length,e.length);return s!==J&&(s=Jd(t[0],t[h-1])),a=h>2?tp:Kd,l=c=null,u}function u(h){return h==null||isNaN(h=+h)?o:(l||(l=a(t.map(i),e,n)))(i(s(h)))}return u.invert=function(h){return s(r((c||(c=a(e,t.map(i),ut)))(h)))},u.domain=function(h){return arguments.length?(t=Array.from(h,Vi),f()):t.slice()},u.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},u.rangeRound=function(h){return e=Array.from(h),n=kr,f()},u.clamp=function(h){return arguments.length?(s=h?!0:J,f()):s!==J},u.interpolate=function(h){return arguments.length?(n=h,f()):n},u.unknown=function(h){return arguments.length?(o=h,u):o},function(h,d){return i=h,r=d,f()}}function Ma(){return ti()(J,J)}function ep(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Rn(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function pe(t){return t=Rn(Math.abs(t)),t?t[1]:NaN}function np(t,e){return function(n,i){for(var r=n.length,o=[],s=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(n.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function ip(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var rp=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ve(t){if(!(e=rp.exec(t)))throw new Error("invalid format: "+t);var e;return new Ar({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Ve.prototype=Ar.prototype;function Ar(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Ar.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 op(t){t:for(var e=t.length,n=1,i=-1,r;n<e;++n)switch(t[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+t[n])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(r+1):t}var Aa;function sp(t,e){var n=Rn(t,e);if(!n)return t+"";var i=n[0],r=n[1],o=r-(Aa=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Rn(t,Math.max(0,e+o-1))[0]}function Uo(t,e){var n=Rn(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const Ho={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:ep,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Uo(t*100,e),r:Uo,s:sp,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Wo(t){return t}var Yo=Array.prototype.map,Vo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ap(t){var e=t.grouping===void 0||t.thousands===void 0?Wo:np(Yo.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",r=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Wo:ip(Yo.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(u){u=Ve(u);var h=u.fill,d=u.align,g=u.sign,p=u.symbol,v=u.zero,_=u.width,x=u.comma,y=u.precision,T=u.trim,k=u.type;k==="n"?(x=!0,k="g"):Ho[k]||(y===void 0&&(y=12),T=!0,k="g"),(v||h==="0"&&d==="=")&&(v=!0,h="0",d="=");var w=p==="$"?n:p==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",S=p==="$"?i:/[%p]/.test(k)?s:"",L=Ho[k],R=/[defgprs%]/.test(k);y=y===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function tt(A){var U=w,Y=S,Nt,Je,Kt;if(k==="c")Y=L(A)+Y,A="";else{A=+A;var te=A<0||1/A<0;if(A=isNaN(A)?l:L(Math.abs(A),y),T&&(A=op(A)),te&&+A==0&&g!=="+"&&(te=!1),U=(te?g==="("?g:a:g==="-"||g==="("?"":g)+U,Y=(k==="s"?Vo[8+Aa/3]:"")+Y+(te&&g==="("?")":""),R){for(Nt=-1,Je=A.length;++Nt<Je;)if(Kt=A.charCodeAt(Nt),48>Kt||Kt>57){Y=(Kt===46?r+A.slice(Nt+1):A.slice(Nt))+Y,A=A.slice(0,Nt);break}}}x&&!v&&(A=e(A,1/0));var ee=U.length+A.length+Y.length,ct=ee<_?new Array(_-ee+1).join(h):"";switch(x&&v&&(A=e(ct+A,ct.length?_-Y.length:1/0),ct=""),d){case"<":A=U+A+Y+ct;break;case"=":A=U+ct+A+Y;break;case"^":A=ct.slice(0,ee=ct.length>>1)+U+A+Y+ct.slice(ee);break;default:A=ct+U+A+Y;break}return o(A)}return tt.toString=function(){return u+""},tt}function f(u,h){var d=c((u=Ve(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(pe(h)/3)))*3,p=Math.pow(10,-g),v=Vo[8+g/3];return function(_){return d(p*_)+v}}return{format:c,formatPrefix:f}}var an,$r,$a;lp({thousands:",",grouping:[3],currency:["$",""]});function lp(t){return an=ap(t),$r=an.format,$a=an.formatPrefix,an}function cp(t){return Math.max(0,-pe(Math.abs(t)))}function up(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(pe(e)/3)))*3-pe(Math.abs(t)))}function fp(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,pe(e)-pe(t))+1}function hp(t,e,n,i){var r=Oi(t,e,n),o;switch(i=Ve(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(o=up(r,s))&&(i.precision=o),$a(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=fp(r,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=cp(r))&&(i.precision=o-(i.type==="%")*2);break}}return $r(i)}function Zt(t){var e=t.domain;return t.ticks=function(n){var i=e();return Ei(i[0],i[i.length-1],n??10)},t.tickFormat=function(n,i){var r=e();return hp(r[0],r[r.length-1],n??10,i)},t.nice=function(n){n==null&&(n=10);var i=e(),r=0,o=i.length-1,s=i[r],a=i[o],l,c,f=10;for(a<s&&(c=s,s=a,a=c,c=r,r=o,o=c);f-- >0;){if(c=Ni(s,a,n),c===l)return i[r]=s,i[o]=a,e(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function Ea(){var t=Ma();return t.copy=function(){return je(t,Ea())},gt.apply(t,arguments),Zt(t)}function Na(t){var e;function n(i){return i==null||isNaN(i=+i)?e:i}return n.invert=n,n.domain=n.range=function(i){return arguments.length?(t=Array.from(i,Vi),n):t.slice()},n.unknown=function(i){return arguments.length?(e=i,n):e},n.copy=function(){return Na(t).unknown(e)},t=arguments.length?Array.from(t,Vi):[0,1],Zt(n)}function Oa(t,e){t=t.slice();var n=0,i=t.length-1,r=t[n],o=t[i],s;return o<r&&(s=n,n=i,i=s,s=r,r=o,o=s),t[n]=e.floor(r),t[i]=e.ceil(o),t}function Xo(t){return Math.log(t)}function qo(t){return Math.exp(t)}function dp(t){return-Math.log(-t)}function pp(t){return-Math.exp(-t)}function gp(t){return isFinite(t)?+("1e"+t):t<0?0:t}function vp(t){return t===10?gp:t===Math.E?Math.exp:e=>Math.pow(t,e)}function mp(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Go(t){return(e,n)=>-t(-e,n)}function _p(t){const e=t(Xo,qo),n=e.domain;let i=10,r,o;function s(){return r=mp(i),o=vp(i),n()[0]<0?(r=Go(r),o=Go(o),t(dp,pp)):t(Xo,qo),e}return e.base=function(a){return arguments.length?(i=+a,s()):i},e.domain=function(a){return arguments.length?(n(a),s()):n()},e.ticks=a=>{const l=n();let c=l[0],f=l[l.length-1];const u=f<c;u&&([c,f]=[f,c]);let h=r(c),d=r(f),g,p;const v=a==null?10:+a;let _=[];if(!(i%1)&&d-h<v){if(h=Math.floor(h),d=Math.ceil(d),c>0){for(;h<=d;++h)for(g=1;g<i;++g)if(p=h<0?g/o(-h):g*o(h),!(p<c)){if(p>f)break;_.push(p)}}else for(;h<=d;++h)for(g=i-1;g>=1;--g)if(p=h>0?g/o(-h):g*o(h),!(p<c)){if(p>f)break;_.push(p)}_.length*2<v&&(_=Ei(c,f,v))}else _=Ei(h,d,Math.min(d-h,v)).map(o);return u?_.reverse():_},e.tickFormat=(a,l)=>{if(a==null&&(a=10),l==null&&(l=i===10?"s":","),typeof l!="function"&&(!(i%1)&&(l=Ve(l)).precision==null&&(l.trim=!0),l=$r(l)),a===1/0)return l;const c=Math.max(1,i*a/e.ticks().length);return f=>{let u=f/o(Math.round(r(f)));return u*i<i-.5&&(u*=i),u<=c?l(f):""}},e.nice=()=>n(Oa(n(),{floor:a=>o(Math.floor(r(a))),ceil:a=>o(Math.ceil(r(a)))})),e}function Da(){const t=_p(ti()).domain([1,10]);return t.copy=()=>je(t,Da()).base(t.base()),gt.apply(t,arguments),t}function jo(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Zo(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function yp(t){var e=1,n=t(jo(e),Zo(e));return n.constant=function(i){return arguments.length?t(jo(e=+i),Zo(e)):e},Zt(n)}function Ra(){var t=yp(ti());return t.copy=function(){return je(t,Ra()).constant(t.constant())},gt.apply(t,arguments)}function Qo(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function xp(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function bp(t){return t<0?-t*t:t*t}function wp(t){var e=t(J,J),n=1;function i(){return n===1?t(J,J):n===.5?t(xp,bp):t(Qo(n),Qo(1/n))}return e.exponent=function(r){return arguments.length?(n=+r,i()):n},Zt(e)}function Er(){var t=wp(ti());return t.copy=function(){return je(t,Er()).exponent(t.exponent())},gt.apply(t,arguments),t}function kp(){return Er.apply(null,arguments).exponent(.5)}function Fa(){var t=[],e=[],n=[],i;function r(){var s=0,a=Math.max(1,e.length);for(n=new Array(a-1);++s<a;)n[s-1]=Ou(t,s/a);return o}function o(s){return s==null||isNaN(s=+s)?i:e[qn(n,s)]}return o.invertExtent=function(s){var a=e.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},o.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let a of s)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(De),r()},o.range=function(s){return arguments.length?(e=Array.from(s),r()):e.slice()},o.unknown=function(s){return arguments.length?(i=s,o):i},o.quantiles=function(){return n.slice()},o.copy=function(){return Fa().domain(t).range(e).unknown(i)},gt.apply(o,arguments)}function Pa(){var t=0,e=1,n=1,i=[.5],r=[0,1],o;function s(l){return l!=null&&l<=l?r[qn(i,l,0,n)]:o}function a(){var l=-1;for(i=new Array(n);++l<n;)i[l]=((l+1)*e-(l-n)*t)/(n+1);return s}return s.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,a()):[t,e]},s.range=function(l){return arguments.length?(n=(r=Array.from(l)).length-1,a()):r.slice()},s.invertExtent=function(l){var c=r.indexOf(l);return c<0?[NaN,NaN]:c<1?[t,i[0]]:c>=n?[i[n-1],e]:[i[c-1],i[c]]},s.unknown=function(l){return arguments.length&&(o=l),s},s.thresholds=function(){return i.slice()},s.copy=function(){return Pa().domain([t,e]).range(r).unknown(o)},gt.apply(Zt(s),arguments)}function za(){var t=[.5],e=[0,1],n,i=1;function r(o){return o!=null&&o<=o?e[qn(t,o,0,i)]:n}return r.domain=function(o){return arguments.length?(t=Array.from(o),i=Math.min(t.length,e.length-1),r):t.slice()},r.range=function(o){return arguments.length?(e=Array.from(o),i=Math.min(t.length,e.length-1),r):e.slice()},r.invertExtent=function(o){var s=e.indexOf(o);return[t[s-1],t[s]]},r.unknown=function(o){return arguments.length?(n=o,r):n},r.copy=function(){return za().domain(t).range(e).unknown(n)},gt.apply(r,arguments)}const bi=new Date,wi=new Date;function V(t,e,n,i){function r(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return r.floor=o=>(t(o=new Date(+o)),o),r.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),r.round=o=>{const s=r(o),a=r.ceil(o);return o-s<a-o?s:a},r.offset=(o,s)=>(e(o=new Date(+o),s==null?1:Math.floor(s)),o),r.range=(o,s,a)=>{const l=[];if(o=r.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return l;let c;do l.push(c=new Date(+o)),e(o,a),t(o);while(c<o&&o<s);return l},r.filter=o=>V(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),n&&(r.count=(o,s)=>(bi.setTime(+o),wi.setTime(+s),t(bi),t(wi),Math.floor(n(bi,wi))),r.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?r.filter(i?s=>i(s)%o===0:s=>r.count(0,s)%o===0):r)),r}const Fn=V(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Fn.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?V(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Fn);Fn.range;const St=1e3,lt=St*60,Ct=lt*60,At=Ct*24,Nr=At*7,Jo=At*30,ki=At*365,It=V(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*St)},(t,e)=>(e-t)/St,t=>t.getUTCSeconds());It.range;const Or=V(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*St)},(t,e)=>{t.setTime(+t+e*lt)},(t,e)=>(e-t)/lt,t=>t.getMinutes());Or.range;const Dr=V(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*lt)},(t,e)=>(e-t)/lt,t=>t.getUTCMinutes());Dr.range;const Rr=V(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*St-t.getMinutes()*lt)},(t,e)=>{t.setTime(+t+e*Ct)},(t,e)=>(e-t)/Ct,t=>t.getHours());Rr.range;const Fr=V(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Ct)},(t,e)=>(e-t)/Ct,t=>t.getUTCHours());Fr.range;const Ze=V(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*lt)/At,t=>t.getDate()-1);Ze.range;const ei=V(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/At,t=>t.getUTCDate()-1);ei.range;const La=V(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/At,t=>Math.floor(t/At));La.range;function Qt(t){return V(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*lt)/Nr)}const ni=Qt(0),Pn=Qt(1),Tp=Qt(2),Sp=Qt(3),ge=Qt(4),Cp=Qt(5),Mp=Qt(6);ni.range;Pn.range;Tp.range;Sp.range;ge.range;Cp.range;Mp.range;function Jt(t){return V(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Nr)}const ii=Jt(0),zn=Jt(1),Ap=Jt(2),$p=Jt(3),ve=Jt(4),Ep=Jt(5),Np=Jt(6);ii.range;zn.range;Ap.range;$p.range;ve.range;Ep.range;Np.range;const Pr=V(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Pr.range;const zr=V(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());zr.range;const $t=V(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());$t.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:V(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});$t.range;const Et=V(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Et.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:V(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});Et.range;function Ia(t,e,n,i,r,o){const s=[[It,1,St],[It,5,5*St],[It,15,15*St],[It,30,30*St],[o,1,lt],[o,5,5*lt],[o,15,15*lt],[o,30,30*lt],[r,1,Ct],[r,3,3*Ct],[r,6,6*Ct],[r,12,12*Ct],[i,1,At],[i,2,2*At],[n,1,Nr],[e,1,Jo],[e,3,3*Jo],[t,1,ki]];function a(c,f,u){const h=f<c;h&&([c,f]=[f,c]);const d=u&&typeof u.range=="function"?u:l(c,f,u),g=d?d.range(c,+f+1):[];return h?g.reverse():g}function l(c,f,u){const h=Math.abs(f-c)/u,d=fr(([,,v])=>v).right(s,h);if(d===s.length)return t.every(Oi(c/ki,f/ki,u));if(d===0)return Fn.every(Math.max(Oi(c,f,u),1));const[g,p]=s[h/s[d-1][2]<s[d][2]/h?d-1:d];return g.every(p)}return[a,l]}const[Op,Dp]=Ia(Et,zr,ii,La,Fr,Dr),[Rp,Fp]=Ia($t,Pr,ni,Ze,Rr,Or);function Ti(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Si(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Te(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Pp(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Se(r),f=Ce(r),u=Se(o),h=Ce(o),d=Se(s),g=Ce(s),p=Se(a),v=Ce(a),_=Se(l),x=Ce(l),y={a:te,A:ee,b:ct,B:Rl,c:null,d:rs,e:rs,f:og,g:gg,G:mg,H:ng,I:ig,j:rg,L:Ba,m:sg,M:ag,p:Fl,q:Pl,Q:as,s:ls,S:lg,u:cg,U:ug,V:fg,w:hg,W:dg,x:null,X:null,y:pg,Y:vg,Z:_g,"%":ss},T={a:zl,A:Ll,b:Il,B:Bl,c:null,d:os,e:os,f:wg,g:Og,G:Rg,H:yg,I:xg,j:bg,L:Ha,m:kg,M:Tg,p:Ul,q:Hl,Q:as,s:ls,S:Sg,u:Cg,U:Mg,V:Ag,w:$g,W:Eg,x:null,X:null,y:Ng,Y:Dg,Z:Fg,"%":ss},k={a:tt,A,b:U,B:Y,c:Nt,d:ns,e:ns,f:Jp,g:es,G:ts,H:is,I:is,j:Gp,L:Qp,m:qp,M:jp,p:R,q:Xp,Q:tg,s:eg,S:Zp,u:Up,U:Hp,V:Wp,w:Bp,W:Yp,x:Je,X:Kt,y:es,Y:ts,Z:Vp,"%":Kp};y.x=w(n,y),y.X=w(i,y),y.c=w(e,y),T.x=w(n,T),T.X=w(i,T),T.c=w(e,T);function w(C,$){return function(E){var b=[],Z=-1,z=0,et=C.length,nt,Pt,Zr;for(E instanceof Date||(E=new Date(+E));++Z<et;)C.charCodeAt(Z)===37&&(b.push(C.slice(z,Z)),(Pt=Ko[nt=C.charAt(++Z)])!=null?nt=C.charAt(++Z):Pt=nt==="e"?" ":"0",(Zr=$[nt])&&(nt=Zr(E,Pt)),b.push(nt),z=Z+1);return b.push(C.slice(z,Z)),b.join("")}}function S(C,$){return function(E){var b=Te(1900,void 0,1),Z=L(b,C,E+="",0),z,et;if(Z!=E.length)return null;if("Q"in b)return new Date(b.Q);if("s"in b)return new Date(b.s*1e3+("L"in b?b.L:0));if($&&!("Z"in b)&&(b.Z=0),"p"in b&&(b.H=b.H%12+b.p*12),b.m===void 0&&(b.m="q"in b?b.q:0),"V"in b){if(b.V<1||b.V>53)return null;"w"in b||(b.w=1),"Z"in b?(z=Si(Te(b.y,0,1)),et=z.getUTCDay(),z=et>4||et===0?zn.ceil(z):zn(z),z=ei.offset(z,(b.V-1)*7),b.y=z.getUTCFullYear(),b.m=z.getUTCMonth(),b.d=z.getUTCDate()+(b.w+6)%7):(z=Ti(Te(b.y,0,1)),et=z.getDay(),z=et>4||et===0?Pn.ceil(z):Pn(z),z=Ze.offset(z,(b.V-1)*7),b.y=z.getFullYear(),b.m=z.getMonth(),b.d=z.getDate()+(b.w+6)%7)}else("W"in b||"U"in b)&&("w"in b||(b.w="u"in b?b.u%7:"W"in b?1:0),et="Z"in b?Si(Te(b.y,0,1)).getUTCDay():Ti(Te(b.y,0,1)).getDay(),b.m=0,b.d="W"in b?(b.w+6)%7+b.W*7-(et+5)%7:b.w+b.U*7-(et+6)%7);return"Z"in b?(b.H+=b.Z/100|0,b.M+=b.Z%100,Si(b)):Ti(b)}}function L(C,$,E,b){for(var Z=0,z=$.length,et=E.length,nt,Pt;Z<z;){if(b>=et)return-1;if(nt=$.charCodeAt(Z++),nt===37){if(nt=$.charAt(Z++),Pt=k[nt in Ko?$.charAt(Z++):nt],!Pt||(b=Pt(C,E,b))<0)return-1}else if(nt!=E.charCodeAt(b++))return-1}return b}function R(C,$,E){var b=c.exec($.slice(E));return b?(C.p=f.get(b[0].toLowerCase()),E+b[0].length):-1}function tt(C,$,E){var b=d.exec($.slice(E));return b?(C.w=g.get(b[0].toLowerCase()),E+b[0].length):-1}function A(C,$,E){var b=u.exec($.slice(E));return b?(C.w=h.get(b[0].toLowerCase()),E+b[0].length):-1}function U(C,$,E){var b=_.exec($.slice(E));return b?(C.m=x.get(b[0].toLowerCase()),E+b[0].length):-1}function Y(C,$,E){var b=p.exec($.slice(E));return b?(C.m=v.get(b[0].toLowerCase()),E+b[0].length):-1}function Nt(C,$,E){return L(C,e,$,E)}function Je(C,$,E){return L(C,n,$,E)}function Kt(C,$,E){return L(C,i,$,E)}function te(C){return s[C.getDay()]}function ee(C){return o[C.getDay()]}function ct(C){return l[C.getMonth()]}function Rl(C){return a[C.getMonth()]}function Fl(C){return r[+(C.getHours()>=12)]}function Pl(C){return 1+~~(C.getMonth()/3)}function zl(C){return s[C.getUTCDay()]}function Ll(C){return o[C.getUTCDay()]}function Il(C){return l[C.getUTCMonth()]}function Bl(C){return a[C.getUTCMonth()]}function Ul(C){return r[+(C.getUTCHours()>=12)]}function Hl(C){return 1+~~(C.getUTCMonth()/3)}return{format:function(C){var $=w(C+="",y);return $.toString=function(){return C},$},parse:function(C){var $=S(C+="",!1);return $.toString=function(){return C},$},utcFormat:function(C){var $=w(C+="",T);return $.toString=function(){return C},$},utcParse:function(C){var $=S(C+="",!0);return $.toString=function(){return C},$}}}var Ko={"-":"",_:" ",0:"0"},X=/^\s*\d+/,zp=/^%/,Lp=/[\\^$*+?|[\]().{}]/g;function N(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(e)+r:r)}function Ip(t){return t.replace(Lp,"\\$&")}function Se(t){return new RegExp("^(?:"+t.map(Ip).join("|")+")","i")}function Ce(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Bp(t,e,n){var i=X.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Up(t,e,n){var i=X.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function Hp(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function Wp(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function Yp(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function ts(t,e,n){var i=X.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function es(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Vp(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function Xp(t,e,n){var i=X.exec(e.slice(n,n+1));return i?(t.q=i[0]*3-3,n+i[0].length):-1}function qp(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function ns(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Gp(t,e,n){var i=X.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function is(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function jp(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function Zp(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function Qp(t,e,n){var i=X.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function Jp(t,e,n){var i=X.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function Kp(t,e,n){var i=zp.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function tg(t,e,n){var i=X.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function eg(t,e,n){var i=X.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function rs(t,e){return N(t.getDate(),e,2)}function ng(t,e){return N(t.getHours(),e,2)}function ig(t,e){return N(t.getHours()%12||12,e,2)}function rg(t,e){return N(1+Ze.count($t(t),t),e,3)}function Ba(t,e){return N(t.getMilliseconds(),e,3)}function og(t,e){return Ba(t,e)+"000"}function sg(t,e){return N(t.getMonth()+1,e,2)}function ag(t,e){return N(t.getMinutes(),e,2)}function lg(t,e){return N(t.getSeconds(),e,2)}function cg(t){var e=t.getDay();return e===0?7:e}function ug(t,e){return N(ni.count($t(t)-1,t),e,2)}function Ua(t){var e=t.getDay();return e>=4||e===0?ge(t):ge.ceil(t)}function fg(t,e){return t=Ua(t),N(ge.count($t(t),t)+($t(t).getDay()===4),e,2)}function hg(t){return t.getDay()}function dg(t,e){return N(Pn.count($t(t)-1,t),e,2)}function pg(t,e){return N(t.getFullYear()%100,e,2)}function gg(t,e){return t=Ua(t),N(t.getFullYear()%100,e,2)}function vg(t,e){return N(t.getFullYear()%1e4,e,4)}function mg(t,e){var n=t.getDay();return t=n>=4||n===0?ge(t):ge.ceil(t),N(t.getFullYear()%1e4,e,4)}function _g(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+N(e/60|0,"0",2)+N(e%60,"0",2)}function os(t,e){return N(t.getUTCDate(),e,2)}function yg(t,e){return N(t.getUTCHours(),e,2)}function xg(t,e){return N(t.getUTCHours()%12||12,e,2)}function bg(t,e){return N(1+ei.count(Et(t),t),e,3)}function Ha(t,e){return N(t.getUTCMilliseconds(),e,3)}function wg(t,e){return Ha(t,e)+"000"}function kg(t,e){return N(t.getUTCMonth()+1,e,2)}function Tg(t,e){return N(t.getUTCMinutes(),e,2)}function Sg(t,e){return N(t.getUTCSeconds(),e,2)}function Cg(t){var e=t.getUTCDay();return e===0?7:e}function Mg(t,e){return N(ii.count(Et(t)-1,t),e,2)}function Wa(t){var e=t.getUTCDay();return e>=4||e===0?ve(t):ve.ceil(t)}function Ag(t,e){return t=Wa(t),N(ve.count(Et(t),t)+(Et(t).getUTCDay()===4),e,2)}function $g(t){return t.getUTCDay()}function Eg(t,e){return N(zn.count(Et(t)-1,t),e,2)}function Ng(t,e){return N(t.getUTCFullYear()%100,e,2)}function Og(t,e){return t=Wa(t),N(t.getUTCFullYear()%100,e,2)}function Dg(t,e){return N(t.getUTCFullYear()%1e4,e,4)}function Rg(t,e){var n=t.getUTCDay();return t=n>=4||n===0?ve(t):ve.ceil(t),N(t.getUTCFullYear()%1e4,e,4)}function Fg(){return"+0000"}function ss(){return"%"}function as(t){return+t}function ls(t){return Math.floor(+t/1e3)}var ne,Ya,Va;Pg({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 Pg(t){return ne=Pp(t),Ya=ne.format,ne.parse,Va=ne.utcFormat,ne.utcParse,ne}function zg(t){return new Date(t)}function Lg(t){return t instanceof Date?+t:+new Date(+t)}function Lr(t,e,n,i,r,o,s,a,l,c){var f=Ma(),u=f.invert,h=f.domain,d=c(".%L"),g=c(":%S"),p=c("%I:%M"),v=c("%I %p"),_=c("%a %d"),x=c("%b %d"),y=c("%B"),T=c("%Y");function k(w){return(l(w)<w?d:a(w)<w?g:s(w)<w?p:o(w)<w?v:i(w)<w?r(w)<w?_:x:n(w)<w?y:T)(w)}return f.invert=function(w){return new Date(u(w))},f.domain=function(w){return arguments.length?h(Array.from(w,Lg)):h().map(zg)},f.ticks=function(w){var S=h();return t(S[0],S[S.length-1],w??10)},f.tickFormat=function(w,S){return S==null?k:c(S)},f.nice=function(w){var S=h();return(!w||typeof w.range!="function")&&(w=e(S[0],S[S.length-1],w??10)),w?h(Oa(S,w)):f},f.copy=function(){return je(f,Lr(t,e,n,i,r,o,s,a,l,c))},f}function Ig(){return gt.apply(Lr(Rp,Fp,$t,Pr,ni,Ze,Rr,Or,It,Ya).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Bg(){return gt.apply(Lr(Op,Dp,Et,zr,ii,ei,Fr,Dr,It,Va).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ug(){var t=0,e=1,n,i,r,o,s=J,a=!1,l;function c(u){return u==null||isNaN(u=+u)?l:s(r===0?.5:(u=(o(u)-n)*r,a?Math.max(0,Math.min(1,u)):u))}c.domain=function(u){return arguments.length?([t,e]=u,n=o(t=+t),i=o(e=+e),r=n===i?0:1/(i-n),c):[t,e]},c.clamp=function(u){return arguments.length?(a=!!u,c):a},c.interpolator=function(u){return arguments.length?(s=u,c):s};function f(u){return function(h){var d,g;return arguments.length?([d,g]=h,s=u(d,g),c):[s(0),s(1)]}}return c.range=f(ye),c.rangeRound=f(kr),c.unknown=function(u){return arguments.length?(l=u,c):l},function(u){return o=u,n=u(t),i=u(e),r=n===i?0:1/(i-n),c}}function Xa(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function qa(){var t=Zt(Ug()(J));return t.copy=function(){return Xa(t,qa())},Sa.apply(t,arguments)}function Hg(){var t=0,e=.5,n=1,i=1,r,o,s,a,l,c=J,f,u=!1,h;function d(p){return isNaN(p=+p)?h:(p=.5+((p=+f(p))-o)*(i*p<i*o?a:l),c(u?Math.max(0,Math.min(1,p)):p))}d.domain=function(p){return arguments.length?([t,e,n]=p,r=f(t=+t),o=f(e=+e),s=f(n=+n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,d):[t,e,n]},d.clamp=function(p){return arguments.length?(u=!!p,d):u},d.interpolator=function(p){return arguments.length?(c=p,d):c};function g(p){return function(v){var _,x,y;return arguments.length?([_,x,y]=v,c=Xh(p,[_,x,y]),d):[c(0),c(.5),c(1)]}}return d.range=g(ye),d.rangeRound=g(kr),d.unknown=function(p){return arguments.length?(h=p,d):h},function(p){return f=p,r=p(t),o=p(e),s=p(n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,d}}function Ga(){var t=Zt(Hg()(J));return t.copy=function(){return Xa(t,Ga())},Sa.apply(t,arguments)}const cs={scaleLinear:Ea,scalePow:Er,scaleSqrt:kp,scaleLog:Da,scaleSymlog:Ra,scaleIdentity:Na,scaleTime:Ig,scaleUtc:Bg,scaleSequential:qa,scaleDiverging:Ga,scaleQuantize:Pa,scaleQuantile:Fa,scaleThreshold:za,scaleOrdinal:Cr,scaleBand:Mr,scalePoint:Zd};var H;(function(t){t.X="x",t.Y="y"})(H||(H={}));var Yt;(function(t){t.West="west",t.East="east",t.North="north",t.South="south"})(Yt||(Yt={}));const Wg=Object.assign(Object.assign({},Zs),{components:[],tooltip:void 0,crosshair:void 0,annotations:void 0,xAxis:void 0,yAxis:void 0,autoMargin:!0,xScale:void 0,xDomain:void 0,xDomainMinConstraint:void 0,xDomainMaxConstraint:void 0,xRange:void 0,yScale:void 0,yDomain:void 0,yDomainMinConstraint:void 0,yDomainMaxConstraint:void 0,yRange:void 0,yDirection:Yt.North,preventEmptyDomain:null,scaleByDomain:!1});class Yg extends Le{constructor(e,n,i){var r,o;super(e),this._defaultConfig=Wg,this.datamodel=new Sr,this.config=this._defaultConfig,this._clipPathId=aa(),this._axisMargin={top:0,bottom:0,left:0,right:0},this._firstRender=!0,this._clipPath=this.svg.append("clipPath").attr("id",this._clipPathId),this._clipPath.append("rect");const s="saturate",a=window.location.href.replace(window.location.hash,"");this.svg.attr("class",P`
52
+ `;function Mf(t=window==null?void 0:window.document.body){return t?+lf("var(--vis-font-wh-ratio)",t):ha}var Af={value:()=>{}};function pa(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new dn(n)}function dn(t){this._=t}function $f(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}dn.prototype=pa.prototype={constructor:dn,on:function(t,e){var n=this._,i=$f(t+"",n),r,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((r=(t=i[o]).type)&&(r=Ef(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(r=(t=i[o]).type)n[r]=Ro(n[r],t.name,e);else if(e==null)for(r in n)n[r]=Ro(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new dn(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,o;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,r=o.length;i<r;++i)o[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};function Ef(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function Ro(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Af,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var ge=0,$e=0,Te=0,ga=1e3,On,Ee,Dn=0,Jt=0,ei=0,Ye=typeof performance=="object"&&performance.now?performance:Date,ma=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function wr(){return Jt||(ma(Nf),Jt=Ye.now()+ei)}function Nf(){Jt=0}function Rn(){this._call=this._time=this._next=null}Rn.prototype=va.prototype={constructor:Rn,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?wr():+n)+(e==null?0:+e),!this._next&&Ee!==this&&(Ee?Ee._next=this:On=this,Ee=this),this._call=t,this._time=n,Wi()},stop:function(){this._call&&(this._call=null,this._time=1/0,Wi())}};function va(t,e,n){var i=new Rn;return i.restart(t,e,n),i}function Of(){wr(),++ge;for(var t=On,e;t;)(e=Jt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--ge}function Fo(){Jt=(Dn=Ye.now())+ei,ge=$e=0;try{Of()}finally{ge=0,Rf(),Jt=0}}function Df(){var t=Ye.now(),e=t-Dn;e>ga&&(ei-=e,Dn=t)}function Rf(){for(var t,e=On,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:On=n);Ee=t,Wi(i)}function Wi(t){if(!ge){$e&&($e=clearTimeout($e));var e=t-Jt;e>24?(t<1/0&&($e=setTimeout(Fo,t-Ye.now()-ei)),Te&&(Te=clearInterval(Te))):(Te||(Dn=Ye.now(),Te=setInterval(Df,ga)),ge=1,ma(Fo))}}function Po(t,e,n){var i=new Rn;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var Ff=pa("start","end","cancel","interrupt"),Pf=[],_a=0,zo=1,Vi=2,pn=3,Bo=4,Yi=5,gn=6;function ni(t,e,n,i,r,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;zf(t,n,{name:e,index:i,group:r,on:Ff,tween:Pf,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:_a})}function kr(t,e){var n=gt(t,e);if(n.state>_a)throw new Error("too late; already scheduled");return n}function St(t,e){var n=gt(t,e);if(n.state>pn)throw new Error("too late; already running");return n}function gt(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function zf(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=va(o,0,n.time);function o(c){n.state=zo,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var h,u,f,d;if(n.state!==zo)return l();for(h in i)if(d=i[h],d.name===n.name){if(d.state===pn)return Po(s);d.state===Bo?(d.state=gn,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[h]):+h<e&&(d.state=gn,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[h])}if(Po(function(){n.state===pn&&(n.state=Bo,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Vi,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Vi){for(n.state=pn,r=new Array(f=n.tween.length),h=0,u=-1;h<f;++h)(d=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+1}}function a(c){for(var h=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Yi,1),u=-1,f=r.length;++u<f;)r[u].call(t,h);n.state===Yi&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=gn,n.timer.stop(),delete i[e];for(var c in i)return;delete t.__transition}}function Tr(t,e){var n=t.__transition,i,r,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((i=n[s]).name!==e){o=!1;continue}r=i.state>Vi&&i.state<Yi,i.state=gn,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[s]}o&&delete t.__transition}}function Bf(t){return this.each(function(){Tr(this,t)})}const Sr=t=>()=>t;function Lf(t,e){return function(n){return t+n*e}}function If(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function Uf(t){return(t=+t)==1?ya:function(e,n){return n-e?If(e,n,t):Sr(isNaN(e)?n:e)}}function ya(t,e){var n=e-t;return n?Lf(t,n):Sr(isNaN(t)?e:t)}const Fn=function t(e){var n=Uf(e);function i(r,o){var s=n((r=Ii(r)).r,(o=Ii(o)).r),a=n(r.g,o.g),l=n(r.b,o.b),c=ya(r.opacity,o.opacity);return function(h){return r.r=s(h),r.g=a(h),r.b=l(h),r.opacity=c(h),r+""}}return i.gamma=t,i}(1);function Hf(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(o){for(r=0;r<n;++r)i[r]=t[r]*(1-o)+e[r]*o;return i}}function Wf(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Vf(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),o=new Array(n),s;for(s=0;s<i;++s)r[s]=xe(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(a){for(s=0;s<i;++s)o[s]=r[s](a);return o}}function Yf(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function ft(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Xf(t,e){var n={},i={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=xe(t[r],e[r]):i[r]=e[r];return function(o){for(r in n)i[r]=n[r](o);return i}}var Xi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ki=new RegExp(Xi.source,"g");function qf(t){return function(){return t}}function Gf(t){return function(e){return t(e)+""}}function xa(t,e){var n=Xi.lastIndex=ki.lastIndex=0,i,r,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(i=Xi.exec(t))&&(r=ki.exec(e));)(o=r.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:ft(i,r)})),n=ki.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?Gf(l[0].x):qf(e):(e=l.length,function(c){for(var h=0,u;h<e;++h)a[(u=l[h]).i]=u.x(c);return a.join("")})}function xe(t,e){var n=typeof e,i;return e==null||n==="boolean"?Sr(e):(n==="number"?ft:n==="string"?(i=Qt(e))?(e=i,Fn):xa:e instanceof Qt?Fn:e instanceof Date?Yf:Wf(e)?Hf:Array.isArray(e)?Vf:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Xf:ft)(t,e)}function Cr(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Lo=180/Math.PI,qi={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ba(t,e,n,i,r,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:r,translateY:o,rotate:Math.atan2(e,t)*Lo,skewX:Math.atan(l)*Lo,scaleX:s,scaleY:a}}var an;function jf(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?qi:ba(e.a,e.b,e.c,e.d,e.e,e.f)}function Zf(t){return t==null||(an||(an=document.createElementNS("http://www.w3.org/2000/svg","g")),an.setAttribute("transform",t),!(t=an.transform.baseVal.consolidate()))?qi:(t=t.matrix,ba(t.a,t.b,t.c,t.d,t.e,t.f))}function wa(t,e,n,i){function r(c){return c.length?c.pop()+" ":""}function o(c,h,u,f,d,g){if(c!==u||h!==f){var p=d.push("translate(",null,e,null,n);g.push({i:p-4,x:ft(c,u)},{i:p-2,x:ft(h,f)})}else(u||f)&&d.push("translate("+u+e+f+n)}function s(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(r(u)+"rotate(",null,i)-2,x:ft(c,h)})):h&&u.push(r(u)+"rotate("+h+i)}function a(c,h,u,f){c!==h?f.push({i:u.push(r(u)+"skewX(",null,i)-2,x:ft(c,h)}):h&&u.push(r(u)+"skewX("+h+i)}function l(c,h,u,f,d,g){if(c!==u||h!==f){var p=d.push(r(d)+"scale(",null,",",null,")");g.push({i:p-4,x:ft(c,u)},{i:p-2,x:ft(h,f)})}else(u!==1||f!==1)&&d.push(r(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=t(c),h=t(h),o(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),a(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var g=-1,p=f.length,v;++g<p;)u[(v=f[g]).i]=v.x(d);return u.join("")}}}var Qf=wa(jf,"px, ","px)","deg)"),Jf=wa(Zf,", ",")",")");function Kf(t,e){e===void 0&&(e=t,t=xe);for(var n=0,i=e.length-1,r=e[0],o=new Array(i<0?0:i);n<i;)o[n]=t(r,r=e[++n]);return function(s){var a=Math.max(0,Math.min(i-1,Math.floor(s*=i)));return o[a](s-a)}}function td(t,e){var n,i;return function(){var r=St(this,t),o=r.tween;if(o!==n){i=n=o;for(var s=0,a=i.length;s<a;++s)if(i[s].name===e){i=i.slice(),i.splice(s,1);break}}r.tween=i}}function ed(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var o=St(this,t),s=o.tween;if(s!==i){r=(i=s).slice();for(var a={name:e,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=a;break}l===c&&r.push(a)}o.tween=r}}function nd(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=gt(this.node(),n).tween,r=0,o=i.length,s;r<o;++r)if((s=i[r]).name===t)return s.value;return null}return this.each((e==null?td:ed)(n,t,e))}function Mr(t,e,n){var i=t._id;return t.each(function(){var r=St(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return gt(r,i).value[e]}}function ka(t,e){var n;return(typeof e=="number"?ft:e instanceof Qt?Fn:(n=Qt(e))?(e=n,Fn):xa)(t,e)}function id(t){return function(){this.removeAttribute(t)}}function rd(t){return function(){this.removeAttributeNS(t.space,t.local)}}function od(t,e,n){var i,r=n+"",o;return function(){var s=this.getAttribute(t);return s===r?null:s===i?o:o=e(i=s,n)}}function sd(t,e,n){var i,r=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===r?null:s===i?o:o=e(i=s,n)}}function ad(t,e,n){var i,r,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=a+"",s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a)))}}function ld(t,e,n){var i,r,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=a+"",s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a)))}}function cd(t,e){var n=Gn(t),i=n==="transform"?Jf:ka;return this.attrTween(t,typeof e=="function"?(n.local?ld:ad)(n,i,Mr(this,"attr."+t,e)):e==null?(n.local?rd:id)(n):(n.local?sd:od)(n,i,e))}function ud(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function hd(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function fd(t,e){var n,i;function r(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&hd(t,o)),n}return r._value=e,r}function dd(t,e){var n,i;function r(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&ud(t,o)),n}return r._value=e,r}function pd(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var i=Gn(t);return this.tween(n,(i.local?fd:dd)(i,e))}function gd(t,e){return function(){kr(this,t).delay=+e.apply(this,arguments)}}function md(t,e){return e=+e,function(){kr(this,t).delay=e}}function vd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?gd:md)(e,t)):gt(this.node(),e).delay}function _d(t,e){return function(){St(this,t).duration=+e.apply(this,arguments)}}function yd(t,e){return e=+e,function(){St(this,t).duration=e}}function xd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?_d:yd)(e,t)):gt(this.node(),e).duration}function bd(t,e){if(typeof e!="function")throw new Error;return function(){St(this,t).ease=e}}function wd(t){var e=this._id;return arguments.length?this.each(bd(e,t)):gt(this.node(),e).ease}function kd(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;St(this,t).ease=n}}function Td(t){if(typeof t!="function")throw new Error;return this.each(kd(this._id,t))}function Sd(t){typeof t!="function"&&(t=Ds(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new $t(i,this._parents,this._name,this._id)}function Cd(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,o=Math.min(i,r),s=new Array(i),a=0;a<o;++a)for(var l=e[a],c=n[a],h=l.length,u=s[a]=new Array(h),f,d=0;d<h;++d)(f=l[d]||c[d])&&(u[d]=f);for(;a<i;++a)s[a]=e[a];return new $t(s,this._parents,this._name,this._id)}function Md(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Ad(t,e,n){var i,r,o=Md(e)?kr:St;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(e,n),s.on=r}}function $d(t,e){var n=this._id;return arguments.length<2?gt(this.node(),n).on.on(t):this.each(Ad(n,t,e))}function Ed(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Nd(){return this.on("end.remove",Ed(this._id))}function Od(t){var e=this._name,n=this._id;typeof t!="function"&&(t=fr(t));for(var i=this._groups,r=i.length,o=new Array(r),s=0;s<r;++s)for(var a=i[s],l=a.length,c=o[s]=new Array(l),h,u,f=0;f<l;++f)(h=a[f])&&(u=t.call(h,h.__data__,f,a))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,ni(c[f],e,n,f,c,gt(h,n)));return new $t(o,this._parents,e,n)}function Dd(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Os(t));for(var i=this._groups,r=i.length,o=[],s=[],a=0;a<r;++a)for(var l=i[a],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=t.call(h,h.__data__,u,l),d,g=gt(h,n),p=0,v=f.length;p<v;++p)(d=f[p])&&ni(d,e,n,p,f,g);o.push(f),s.push(h)}return new $t(o,s,e,n)}var Rd=qe.prototype.constructor;function Fd(){return new Rd(this._groups,this._parents)}function Pd(t,e){var n,i,r;return function(){var o=fe(this,t),s=(this.style.removeProperty(t),fe(this,t));return o===s?null:o===n&&s===i?r:r=e(n=o,i=s)}}function Ta(t){return function(){this.style.removeProperty(t)}}function zd(t,e,n){var i,r=n+"",o;return function(){var s=fe(this,t);return s===r?null:s===i?o:o=e(i=s,n)}}function Bd(t,e,n){var i,r,o;return function(){var s=fe(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),fe(this,t))),s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a))}}function Ld(t,e){var n,i,r,o="style."+e,s="end."+o,a;return function(){var l=St(this,t),c=l.on,h=l.value[o]==null?a||(a=Ta(e)):void 0;(c!==n||r!==h)&&(i=(n=c).copy()).on(s,r=h),l.on=i}}function Id(t,e,n){var i=(t+="")=="transform"?Qf:ka;return e==null?this.styleTween(t,Pd(t,i)).on("end.style."+t,Ta(t)):typeof e=="function"?this.styleTween(t,Bd(t,i,Mr(this,"style."+t,e))).each(Ld(this._id,t)):this.styleTween(t,zd(t,i,e),n).on("end.style."+t,null)}function Ud(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function Hd(t,e,n){var i,r;function o(){var s=e.apply(this,arguments);return s!==r&&(i=(r=s)&&Ud(t,s,n)),i}return o._value=e,o}function Wd(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,Hd(t,e,n??""))}function Vd(t){return function(){this.textContent=t}}function Yd(t){return function(){var e=t(this);this.textContent=e??""}}function Xd(t){return this.tween("text",typeof t=="function"?Yd(Mr(this,"text",t)):Vd(t==null?"":t+""))}function qd(t){return function(e){this.textContent=t.call(this,e)}}function Gd(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&qd(r)),e}return i._value=t,i}function jd(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Gd(t))}function Zd(){for(var t=this._name,e=this._id,n=Sa(),i=this._groups,r=i.length,o=0;o<r;++o)for(var s=i[o],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var h=gt(l,e);ni(l,t,n,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new $t(i,this._parents,t,n)}function Qd(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--r===0&&o()}};n.each(function(){var c=St(this,i),h=c.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),c.on=e}),r===0&&o()})}var Jd=0;function $t(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function Sa(){return++Jd}var Ct=qe.prototype;$t.prototype={constructor:$t,select:Od,selectAll:Dd,selectChild:Ct.selectChild,selectChildren:Ct.selectChildren,filter:Sd,merge:Cd,selection:Fd,transition:Zd,call:Ct.call,nodes:Ct.nodes,node:Ct.node,size:Ct.size,empty:Ct.empty,each:Ct.each,on:$d,attr:cd,attrTween:pd,style:Id,styleTween:Wd,text:Xd,textTween:jd,remove:Nd,tween:nd,delay:vd,duration:xd,ease:wd,easeVarying:Td,end:Qd,[Symbol.iterator]:Ct[Symbol.iterator]};const Io=t=>+t;function Kd(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var tp={time:null,delay:0,duration:250,ease:Kd};function ep(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function np(t){var e,n;t instanceof $t?(e=t._id,t=t._name):(e=Sa(),(n=tp).time=wr(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var s=i[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&ni(l,t,e,c,s,n||ep(l,e));return new $t(i,this._parents,t,e)}qe.prototype.interrupt=Bf;qe.prototype.transition=np;function ct(t,e,n){if(t.nodes().forEach(i=>Tr(i)),e){const i=t.transition().duration(e);return n&&i.ease(n),i}else return t}class Ar{constructor(e){this.data=e}get data(){return this._data}set data(e){this._data=e}}var P;(function(t){t.X="x",t.Y="y"})(P||(P={}));function mt(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Ca(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Uo=Symbol("implicit");function $r(){var t=new to,e=[],n=[],i=Uo;function r(o){let s=t.get(o);if(s===void 0){if(i!==Uo)return i;t.set(o,s=e.push(o)-1)}return n[s%n.length]}return r.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new to;for(const s of o)t.has(s)||t.set(s,e.push(s)-1);return r},r.range=function(o){return arguments.length?(n=Array.from(o),r):n.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return $r(e,n).unknown(i)},mt.apply(r,arguments),r}function Er(){var t=$r().unknown(void 0),e=t.domain,n=t.range,i=0,r=1,o,s,a=!1,l=0,c=0,h=.5;delete t.unknown;function u(){var f=e().length,d=r<i,g=d?r:i,p=d?i:r;o=(p-g)/Math.max(1,f-l+c*2),a&&(o=Math.floor(o)),g+=(p-g-o*(f-l))*h,s=o*(1-l),a&&(g=Math.round(g),s=Math.round(s));var v=Uu(f).map(function(_){return g+o*_});return n(d?v.reverse():v)}return t.domain=function(f){return arguments.length?(e(f),u()):e()},t.range=function(f){return arguments.length?([i,r]=f,i=+i,r=+r,u()):[i,r]},t.rangeRound=function(f){return[i,r]=f,i=+i,r=+r,a=!0,u()},t.bandwidth=function(){return s},t.step=function(){return o},t.round=function(f){return arguments.length?(a=!!f,u()):a},t.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),u()):l},t.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),u()):l},t.paddingOuter=function(f){return arguments.length?(c=+f,u()):c},t.align=function(f){return arguments.length?(h=Math.max(0,Math.min(1,f)),u()):h},t.copy=function(){return Er(e(),[i,r]).round(a).paddingInner(l).paddingOuter(c).align(h)},mt.apply(u(),arguments)}function Ma(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ma(e())},t}function ip(){return Ma(Er.apply(null,arguments).paddingInner(1))}function rp(t){return function(){return t}}function Gi(t){return+t}var Ho=[0,1];function K(t){return t}function ji(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:rp(isNaN(e)?NaN:.5)}function op(t,e){var n;return t>e&&(n=t,t=e,e=n),function(i){return Math.max(t,Math.min(e,i))}}function sp(t,e,n){var i=t[0],r=t[1],o=e[0],s=e[1];return r<i?(i=ji(r,i),o=n(s,o)):(i=ji(i,r),o=n(o,s)),function(a){return o(i(a))}}function ap(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),o=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)r[s]=ji(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(a){var l=Zn(t,a,1,i)-1;return o[l](r[l](a))}}function Ze(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function ii(){var t=Ho,e=Ho,n=xe,i,r,o,s=K,a,l,c;function h(){var f=Math.min(t.length,e.length);return s!==K&&(s=op(t[0],t[f-1])),a=f>2?ap:sp,l=c=null,u}function u(f){return f==null||isNaN(f=+f)?o:(l||(l=a(t.map(i),e,n)))(i(s(f)))}return u.invert=function(f){return s(r((c||(c=a(e,t.map(i),ft)))(f)))},u.domain=function(f){return arguments.length?(t=Array.from(f,Gi),h()):t.slice()},u.range=function(f){return arguments.length?(e=Array.from(f),h()):e.slice()},u.rangeRound=function(f){return e=Array.from(f),n=Cr,h()},u.clamp=function(f){return arguments.length?(s=f?!0:K,h()):s!==K},u.interpolate=function(f){return arguments.length?(n=f,h()):n},u.unknown=function(f){return arguments.length?(o=f,u):o},function(f,d){return i=f,r=d,h()}}function Aa(){return ii()(K,K)}function lp(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Pn(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function me(t){return t=Pn(Math.abs(t)),t?t[1]:NaN}function cp(t,e){return function(n,i){for(var r=n.length,o=[],s=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(n.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function up(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var hp=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Xe(t){if(!(e=hp.exec(t)))throw new Error("invalid format: "+t);var e;return new Nr({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Xe.prototype=Nr.prototype;function Nr(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Nr.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 fp(t){t:for(var e=t.length,n=1,i=-1,r;n<e;++n)switch(t[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+t[n])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(r+1):t}var $a;function dp(t,e){var n=Pn(t,e);if(!n)return t+"";var i=n[0],r=n[1],o=r-($a=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Pn(t,Math.max(0,e+o-1))[0]}function Wo(t,e){var n=Pn(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const Vo={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:lp,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Wo(t*100,e),r:Wo,s:dp,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Yo(t){return t}var Xo=Array.prototype.map,qo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pp(t){var e=t.grouping===void 0||t.thousands===void 0?Yo:cp(Xo.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",r=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Yo:up(Xo.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(u){u=Xe(u);var f=u.fill,d=u.align,g=u.sign,p=u.symbol,v=u.zero,_=u.width,x=u.comma,y=u.precision,T=u.trim,k=u.type;k==="n"?(x=!0,k="g"):Vo[k]||(y===void 0&&(y=12),T=!0,k="g"),(v||f==="0"&&d==="=")&&(v=!0,f="0",d="=");var w=p==="$"?n:p==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",S=p==="$"?i:/[%p]/.test(k)?s:"",B=Vo[k],F=/[defgprs%]/.test(k);y=y===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function et(A){var U=w,V=S,Dt,Ke,re;if(k==="c")V=B(A)+V,A="";else{A=+A;var oe=A<0||1/A<0;if(A=isNaN(A)?l:B(Math.abs(A),y),T&&(A=fp(A)),oe&&+A==0&&g!=="+"&&(oe=!1),U=(oe?g==="("?g:a:g==="-"||g==="("?"":g)+U,V=(k==="s"?qo[8+$a/3]:"")+V+(oe&&g==="("?")":""),F){for(Dt=-1,Ke=A.length;++Dt<Ke;)if(re=A.charCodeAt(Dt),48>re||re>57){V=(re===46?r+A.slice(Dt+1):A.slice(Dt))+V,A=A.slice(0,Dt);break}}}x&&!v&&(A=e(A,1/0));var se=U.length+A.length+V.length,ht=se<_?new Array(_-se+1).join(f):"";switch(x&&v&&(A=e(ht+A,ht.length?_-V.length:1/0),ht=""),d){case"<":A=U+A+V+ht;break;case"=":A=U+ht+A+V;break;case"^":A=ht.slice(0,se=ht.length>>1)+U+A+V+ht.slice(se);break;default:A=ht+U+A+V;break}return o(A)}return et.toString=function(){return u+""},et}function h(u,f){var d=c((u=Xe(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(me(f)/3)))*3,p=Math.pow(10,-g),v=qo[8+g/3];return function(_){return d(p*_)+v}}return{format:c,formatPrefix:h}}var ln,Or,Ea;gp({thousands:",",grouping:[3],currency:["$",""]});function gp(t){return ln=pp(t),Or=ln.format,Ea=ln.formatPrefix,ln}function mp(t){return Math.max(0,-me(Math.abs(t)))}function vp(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(me(e)/3)))*3-me(Math.abs(t)))}function _p(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,me(e)-me(t))+1}function yp(t,e,n,i){var r=Fi(t,e,n),o;switch(i=Xe(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(o=vp(r,s))&&(i.precision=o),Ea(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=_p(r,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=mp(r))&&(i.precision=o-(i.type==="%")*2);break}}return Or(i)}function te(t){var e=t.domain;return t.ticks=function(n){var i=e();return Di(i[0],i[i.length-1],n??10)},t.tickFormat=function(n,i){var r=e();return yp(r[0],r[r.length-1],n??10,i)},t.nice=function(n){n==null&&(n=10);var i=e(),r=0,o=i.length-1,s=i[r],a=i[o],l,c,h=10;for(a<s&&(c=s,s=a,a=c,c=r,r=o,o=c);h-- >0;){if(c=Ri(s,a,n),c===l)return i[r]=s,i[o]=a,e(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function Na(){var t=Aa();return t.copy=function(){return Ze(t,Na())},mt.apply(t,arguments),te(t)}function Oa(t){var e;function n(i){return i==null||isNaN(i=+i)?e:i}return n.invert=n,n.domain=n.range=function(i){return arguments.length?(t=Array.from(i,Gi),n):t.slice()},n.unknown=function(i){return arguments.length?(e=i,n):e},n.copy=function(){return Oa(t).unknown(e)},t=arguments.length?Array.from(t,Gi):[0,1],te(n)}function Da(t,e){t=t.slice();var n=0,i=t.length-1,r=t[n],o=t[i],s;return o<r&&(s=n,n=i,i=s,s=r,r=o,o=s),t[n]=e.floor(r),t[i]=e.ceil(o),t}function Go(t){return Math.log(t)}function jo(t){return Math.exp(t)}function xp(t){return-Math.log(-t)}function bp(t){return-Math.exp(-t)}function wp(t){return isFinite(t)?+("1e"+t):t<0?0:t}function kp(t){return t===10?wp:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Tp(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Zo(t){return(e,n)=>-t(-e,n)}function Sp(t){const e=t(Go,jo),n=e.domain;let i=10,r,o;function s(){return r=Tp(i),o=kp(i),n()[0]<0?(r=Zo(r),o=Zo(o),t(xp,bp)):t(Go,jo),e}return e.base=function(a){return arguments.length?(i=+a,s()):i},e.domain=function(a){return arguments.length?(n(a),s()):n()},e.ticks=a=>{const l=n();let c=l[0],h=l[l.length-1];const u=h<c;u&&([c,h]=[h,c]);let f=r(c),d=r(h),g,p;const v=a==null?10:+a;let _=[];if(!(i%1)&&d-f<v){if(f=Math.floor(f),d=Math.ceil(d),c>0){for(;f<=d;++f)for(g=1;g<i;++g)if(p=f<0?g/o(-f):g*o(f),!(p<c)){if(p>h)break;_.push(p)}}else for(;f<=d;++f)for(g=i-1;g>=1;--g)if(p=f>0?g/o(-f):g*o(f),!(p<c)){if(p>h)break;_.push(p)}_.length*2<v&&(_=Di(c,h,v))}else _=Di(f,d,Math.min(d-f,v)).map(o);return u?_.reverse():_},e.tickFormat=(a,l)=>{if(a==null&&(a=10),l==null&&(l=i===10?"s":","),typeof l!="function"&&(!(i%1)&&(l=Xe(l)).precision==null&&(l.trim=!0),l=Or(l)),a===1/0)return l;const c=Math.max(1,i*a/e.ticks().length);return h=>{let u=h/o(Math.round(r(h)));return u*i<i-.5&&(u*=i),u<=c?l(h):""}},e.nice=()=>n(Da(n(),{floor:a=>o(Math.floor(r(a))),ceil:a=>o(Math.ceil(r(a)))})),e}function Ra(){const t=Sp(ii()).domain([1,10]);return t.copy=()=>Ze(t,Ra()).base(t.base()),mt.apply(t,arguments),t}function Qo(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Jo(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Cp(t){var e=1,n=t(Qo(e),Jo(e));return n.constant=function(i){return arguments.length?t(Qo(e=+i),Jo(e)):e},te(n)}function Fa(){var t=Cp(ii());return t.copy=function(){return Ze(t,Fa()).constant(t.constant())},mt.apply(t,arguments)}function Ko(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Mp(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Ap(t){return t<0?-t*t:t*t}function $p(t){var e=t(K,K),n=1;function i(){return n===1?t(K,K):n===.5?t(Mp,Ap):t(Ko(n),Ko(1/n))}return e.exponent=function(r){return arguments.length?(n=+r,i()):n},te(e)}function Dr(){var t=$p(ii());return t.copy=function(){return Ze(t,Dr()).exponent(t.exponent())},mt.apply(t,arguments),t}function Ep(){return Dr.apply(null,arguments).exponent(.5)}function Pa(){var t=[],e=[],n=[],i;function r(){var s=0,a=Math.max(1,e.length);for(n=new Array(a-1);++s<a;)n[s-1]=zu(t,s/a);return o}function o(s){return s==null||isNaN(s=+s)?i:e[Zn(n,s)]}return o.invertExtent=function(s){var a=e.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},o.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let a of s)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(Re),r()},o.range=function(s){return arguments.length?(e=Array.from(s),r()):e.slice()},o.unknown=function(s){return arguments.length?(i=s,o):i},o.quantiles=function(){return n.slice()},o.copy=function(){return Pa().domain(t).range(e).unknown(i)},mt.apply(o,arguments)}function za(){var t=0,e=1,n=1,i=[.5],r=[0,1],o;function s(l){return l!=null&&l<=l?r[Zn(i,l,0,n)]:o}function a(){var l=-1;for(i=new Array(n);++l<n;)i[l]=((l+1)*e-(l-n)*t)/(n+1);return s}return s.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,a()):[t,e]},s.range=function(l){return arguments.length?(n=(r=Array.from(l)).length-1,a()):r.slice()},s.invertExtent=function(l){var c=r.indexOf(l);return c<0?[NaN,NaN]:c<1?[t,i[0]]:c>=n?[i[n-1],e]:[i[c-1],i[c]]},s.unknown=function(l){return arguments.length&&(o=l),s},s.thresholds=function(){return i.slice()},s.copy=function(){return za().domain([t,e]).range(r).unknown(o)},mt.apply(te(s),arguments)}function Ba(){var t=[.5],e=[0,1],n,i=1;function r(o){return o!=null&&o<=o?e[Zn(t,o,0,i)]:n}return r.domain=function(o){return arguments.length?(t=Array.from(o),i=Math.min(t.length,e.length-1),r):t.slice()},r.range=function(o){return arguments.length?(e=Array.from(o),i=Math.min(t.length,e.length-1),r):e.slice()},r.invertExtent=function(o){var s=e.indexOf(o);return[t[s-1],t[s]]},r.unknown=function(o){return arguments.length?(n=o,r):n},r.copy=function(){return Ba().domain(t).range(e).unknown(n)},mt.apply(r,arguments)}const Ti=new Date,Si=new Date;function X(t,e,n,i){function r(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return r.floor=o=>(t(o=new Date(+o)),o),r.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),r.round=o=>{const s=r(o),a=r.ceil(o);return o-s<a-o?s:a},r.offset=(o,s)=>(e(o=new Date(+o),s==null?1:Math.floor(s)),o),r.range=(o,s,a)=>{const l=[];if(o=r.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return l;let c;do l.push(c=new Date(+o)),e(o,a),t(o);while(c<o&&o<s);return l},r.filter=o=>X(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),n&&(r.count=(o,s)=>(Ti.setTime(+o),Si.setTime(+s),t(Ti),t(Si),Math.floor(n(Ti,Si))),r.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?r.filter(i?s=>i(s)%o===0:s=>r.count(0,s)%o===0):r)),r}const zn=X(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);zn.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?X(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):zn);zn.range;const Mt=1e3,ut=Mt*60,At=ut*60,Et=At*24,Rr=Et*7,ts=Et*30,Ci=Et*365,Ht=X(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Mt)},(t,e)=>(e-t)/Mt,t=>t.getUTCSeconds());Ht.range;const Fr=X(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Mt)},(t,e)=>{t.setTime(+t+e*ut)},(t,e)=>(e-t)/ut,t=>t.getMinutes());Fr.range;const Pr=X(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ut)},(t,e)=>(e-t)/ut,t=>t.getUTCMinutes());Pr.range;const zr=X(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Mt-t.getMinutes()*ut)},(t,e)=>{t.setTime(+t+e*At)},(t,e)=>(e-t)/At,t=>t.getHours());zr.range;const Br=X(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*At)},(t,e)=>(e-t)/At,t=>t.getUTCHours());Br.range;const Qe=X(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ut)/Et,t=>t.getDate()-1);Qe.range;const ri=X(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Et,t=>t.getUTCDate()-1);ri.range;const La=X(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Et,t=>Math.floor(t/Et));La.range;function ee(t){return X(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ut)/Rr)}const oi=ee(0),Bn=ee(1),Np=ee(2),Op=ee(3),ve=ee(4),Dp=ee(5),Rp=ee(6);oi.range;Bn.range;Np.range;Op.range;ve.range;Dp.range;Rp.range;function ne(t){return X(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Rr)}const si=ne(0),Ln=ne(1),Fp=ne(2),Pp=ne(3),_e=ne(4),zp=ne(5),Bp=ne(6);si.range;Ln.range;Fp.range;Pp.range;_e.range;zp.range;Bp.range;const Lr=X(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Lr.range;const Ir=X(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Ir.range;const Nt=X(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Nt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:X(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});Nt.range;const Ot=X(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ot.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:X(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});Ot.range;function Ia(t,e,n,i,r,o){const s=[[Ht,1,Mt],[Ht,5,5*Mt],[Ht,15,15*Mt],[Ht,30,30*Mt],[o,1,ut],[o,5,5*ut],[o,15,15*ut],[o,30,30*ut],[r,1,At],[r,3,3*At],[r,6,6*At],[r,12,12*At],[i,1,Et],[i,2,2*Et],[n,1,Rr],[e,1,ts],[e,3,3*ts],[t,1,Ci]];function a(c,h,u){const f=h<c;f&&([c,h]=[h,c]);const d=u&&typeof u.range=="function"?u:l(c,h,u),g=d?d.range(c,+h+1):[];return f?g.reverse():g}function l(c,h,u){const f=Math.abs(h-c)/u,d=jn(([,,v])=>v).right(s,f);if(d===s.length)return t.every(Fi(c/Ci,h/Ci,u));if(d===0)return zn.every(Math.max(Fi(c,h,u),1));const[g,p]=s[f/s[d-1][2]<s[d][2]/f?d-1:d];return g.every(p)}return[a,l]}const[Lp,Ip]=Ia(Ot,Ir,si,La,Br,Pr),[Up,Hp]=Ia(Nt,Lr,oi,Qe,zr,Fr);function Mi(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Ai(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Se(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Wp(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Ce(r),h=Me(r),u=Ce(o),f=Me(o),d=Ce(s),g=Me(s),p=Ce(a),v=Me(a),_=Ce(l),x=Me(l),y={a:oe,A:se,b:ht,B:Ll,c:null,d:ss,e:ss,f:fg,g:wg,G:Tg,H:cg,I:ug,j:hg,L:Ua,m:dg,M:pg,p:Il,q:Ul,Q:cs,s:us,S:gg,u:mg,U:vg,V:_g,w:yg,W:xg,x:null,X:null,y:bg,Y:kg,Z:Sg,"%":ls},T={a:Hl,A:Wl,b:Vl,B:Yl,c:null,d:as,e:as,f:$g,g:Lg,G:Ug,H:Cg,I:Mg,j:Ag,L:Wa,m:Eg,M:Ng,p:Xl,q:ql,Q:cs,s:us,S:Og,u:Dg,U:Rg,V:Fg,w:Pg,W:zg,x:null,X:null,y:Bg,Y:Ig,Z:Hg,"%":ls},k={a:et,A,b:U,B:V,c:Dt,d:rs,e:rs,f:og,g:is,G:ns,H:os,I:os,j:eg,L:rg,m:tg,M:ng,p:F,q:Kp,Q:ag,s:lg,S:ig,u:Gp,U:jp,V:Zp,w:qp,W:Qp,x:Ke,X:re,y:is,Y:ns,Z:Jp,"%":sg};y.x=w(n,y),y.X=w(i,y),y.c=w(e,y),T.x=w(n,T),T.X=w(i,T),T.c=w(e,T);function w(M,$){return function(E){var b=[],Q=-1,z=0,nt=M.length,it,Lt,Jr;for(E instanceof Date||(E=new Date(+E));++Q<nt;)M.charCodeAt(Q)===37&&(b.push(M.slice(z,Q)),(Lt=es[it=M.charAt(++Q)])!=null?it=M.charAt(++Q):Lt=it==="e"?" ":"0",(Jr=$[it])&&(it=Jr(E,Lt)),b.push(it),z=Q+1);return b.push(M.slice(z,Q)),b.join("")}}function S(M,$){return function(E){var b=Se(1900,void 0,1),Q=B(b,M,E+="",0),z,nt;if(Q!=E.length)return null;if("Q"in b)return new Date(b.Q);if("s"in b)return new Date(b.s*1e3+("L"in b?b.L:0));if($&&!("Z"in b)&&(b.Z=0),"p"in b&&(b.H=b.H%12+b.p*12),b.m===void 0&&(b.m="q"in b?b.q:0),"V"in b){if(b.V<1||b.V>53)return null;"w"in b||(b.w=1),"Z"in b?(z=Ai(Se(b.y,0,1)),nt=z.getUTCDay(),z=nt>4||nt===0?Ln.ceil(z):Ln(z),z=ri.offset(z,(b.V-1)*7),b.y=z.getUTCFullYear(),b.m=z.getUTCMonth(),b.d=z.getUTCDate()+(b.w+6)%7):(z=Mi(Se(b.y,0,1)),nt=z.getDay(),z=nt>4||nt===0?Bn.ceil(z):Bn(z),z=Qe.offset(z,(b.V-1)*7),b.y=z.getFullYear(),b.m=z.getMonth(),b.d=z.getDate()+(b.w+6)%7)}else("W"in b||"U"in b)&&("w"in b||(b.w="u"in b?b.u%7:"W"in b?1:0),nt="Z"in b?Ai(Se(b.y,0,1)).getUTCDay():Mi(Se(b.y,0,1)).getDay(),b.m=0,b.d="W"in b?(b.w+6)%7+b.W*7-(nt+5)%7:b.w+b.U*7-(nt+6)%7);return"Z"in b?(b.H+=b.Z/100|0,b.M+=b.Z%100,Ai(b)):Mi(b)}}function B(M,$,E,b){for(var Q=0,z=$.length,nt=E.length,it,Lt;Q<z;){if(b>=nt)return-1;if(it=$.charCodeAt(Q++),it===37){if(it=$.charAt(Q++),Lt=k[it in es?$.charAt(Q++):it],!Lt||(b=Lt(M,E,b))<0)return-1}else if(it!=E.charCodeAt(b++))return-1}return b}function F(M,$,E){var b=c.exec($.slice(E));return b?(M.p=h.get(b[0].toLowerCase()),E+b[0].length):-1}function et(M,$,E){var b=d.exec($.slice(E));return b?(M.w=g.get(b[0].toLowerCase()),E+b[0].length):-1}function A(M,$,E){var b=u.exec($.slice(E));return b?(M.w=f.get(b[0].toLowerCase()),E+b[0].length):-1}function U(M,$,E){var b=_.exec($.slice(E));return b?(M.m=x.get(b[0].toLowerCase()),E+b[0].length):-1}function V(M,$,E){var b=p.exec($.slice(E));return b?(M.m=v.get(b[0].toLowerCase()),E+b[0].length):-1}function Dt(M,$,E){return B(M,e,$,E)}function Ke(M,$,E){return B(M,n,$,E)}function re(M,$,E){return B(M,i,$,E)}function oe(M){return s[M.getDay()]}function se(M){return o[M.getDay()]}function ht(M){return l[M.getMonth()]}function Ll(M){return a[M.getMonth()]}function Il(M){return r[+(M.getHours()>=12)]}function Ul(M){return 1+~~(M.getMonth()/3)}function Hl(M){return s[M.getUTCDay()]}function Wl(M){return o[M.getUTCDay()]}function Vl(M){return l[M.getUTCMonth()]}function Yl(M){return a[M.getUTCMonth()]}function Xl(M){return r[+(M.getUTCHours()>=12)]}function ql(M){return 1+~~(M.getUTCMonth()/3)}return{format:function(M){var $=w(M+="",y);return $.toString=function(){return M},$},parse:function(M){var $=S(M+="",!1);return $.toString=function(){return M},$},utcFormat:function(M){var $=w(M+="",T);return $.toString=function(){return M},$},utcParse:function(M){var $=S(M+="",!0);return $.toString=function(){return M},$}}}var es={"-":"",_:" ",0:"0"},q=/^\s*\d+/,Vp=/^%/,Yp=/[\\^$*+?|[\]().{}]/g;function N(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(e)+r:r)}function Xp(t){return t.replace(Yp,"\\$&")}function Ce(t){return new RegExp("^(?:"+t.map(Xp).join("|")+")","i")}function Me(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function qp(t,e,n){var i=q.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Gp(t,e,n){var i=q.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function jp(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function Zp(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function Qp(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function ns(t,e,n){var i=q.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function is(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Jp(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function Kp(t,e,n){var i=q.exec(e.slice(n,n+1));return i?(t.q=i[0]*3-3,n+i[0].length):-1}function tg(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function rs(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function eg(t,e,n){var i=q.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function os(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function ng(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function ig(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function rg(t,e,n){var i=q.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function og(t,e,n){var i=q.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function sg(t,e,n){var i=Vp.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function ag(t,e,n){var i=q.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function lg(t,e,n){var i=q.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function ss(t,e){return N(t.getDate(),e,2)}function cg(t,e){return N(t.getHours(),e,2)}function ug(t,e){return N(t.getHours()%12||12,e,2)}function hg(t,e){return N(1+Qe.count(Nt(t),t),e,3)}function Ua(t,e){return N(t.getMilliseconds(),e,3)}function fg(t,e){return Ua(t,e)+"000"}function dg(t,e){return N(t.getMonth()+1,e,2)}function pg(t,e){return N(t.getMinutes(),e,2)}function gg(t,e){return N(t.getSeconds(),e,2)}function mg(t){var e=t.getDay();return e===0?7:e}function vg(t,e){return N(oi.count(Nt(t)-1,t),e,2)}function Ha(t){var e=t.getDay();return e>=4||e===0?ve(t):ve.ceil(t)}function _g(t,e){return t=Ha(t),N(ve.count(Nt(t),t)+(Nt(t).getDay()===4),e,2)}function yg(t){return t.getDay()}function xg(t,e){return N(Bn.count(Nt(t)-1,t),e,2)}function bg(t,e){return N(t.getFullYear()%100,e,2)}function wg(t,e){return t=Ha(t),N(t.getFullYear()%100,e,2)}function kg(t,e){return N(t.getFullYear()%1e4,e,4)}function Tg(t,e){var n=t.getDay();return t=n>=4||n===0?ve(t):ve.ceil(t),N(t.getFullYear()%1e4,e,4)}function Sg(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+N(e/60|0,"0",2)+N(e%60,"0",2)}function as(t,e){return N(t.getUTCDate(),e,2)}function Cg(t,e){return N(t.getUTCHours(),e,2)}function Mg(t,e){return N(t.getUTCHours()%12||12,e,2)}function Ag(t,e){return N(1+ri.count(Ot(t),t),e,3)}function Wa(t,e){return N(t.getUTCMilliseconds(),e,3)}function $g(t,e){return Wa(t,e)+"000"}function Eg(t,e){return N(t.getUTCMonth()+1,e,2)}function Ng(t,e){return N(t.getUTCMinutes(),e,2)}function Og(t,e){return N(t.getUTCSeconds(),e,2)}function Dg(t){var e=t.getUTCDay();return e===0?7:e}function Rg(t,e){return N(si.count(Ot(t)-1,t),e,2)}function Va(t){var e=t.getUTCDay();return e>=4||e===0?_e(t):_e.ceil(t)}function Fg(t,e){return t=Va(t),N(_e.count(Ot(t),t)+(Ot(t).getUTCDay()===4),e,2)}function Pg(t){return t.getUTCDay()}function zg(t,e){return N(Ln.count(Ot(t)-1,t),e,2)}function Bg(t,e){return N(t.getUTCFullYear()%100,e,2)}function Lg(t,e){return t=Va(t),N(t.getUTCFullYear()%100,e,2)}function Ig(t,e){return N(t.getUTCFullYear()%1e4,e,4)}function Ug(t,e){var n=t.getUTCDay();return t=n>=4||n===0?_e(t):_e.ceil(t),N(t.getUTCFullYear()%1e4,e,4)}function Hg(){return"+0000"}function ls(){return"%"}function cs(t){return+t}function us(t){return Math.floor(+t/1e3)}var ae,Ya,Xa;Wg({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 Wg(t){return ae=Wp(t),Ya=ae.format,ae.parse,Xa=ae.utcFormat,ae.utcParse,ae}function Vg(t){return new Date(t)}function Yg(t){return t instanceof Date?+t:+new Date(+t)}function Ur(t,e,n,i,r,o,s,a,l,c){var h=Aa(),u=h.invert,f=h.domain,d=c(".%L"),g=c(":%S"),p=c("%I:%M"),v=c("%I %p"),_=c("%a %d"),x=c("%b %d"),y=c("%B"),T=c("%Y");function k(w){return(l(w)<w?d:a(w)<w?g:s(w)<w?p:o(w)<w?v:i(w)<w?r(w)<w?_:x:n(w)<w?y:T)(w)}return h.invert=function(w){return new Date(u(w))},h.domain=function(w){return arguments.length?f(Array.from(w,Yg)):f().map(Vg)},h.ticks=function(w){var S=f();return t(S[0],S[S.length-1],w??10)},h.tickFormat=function(w,S){return S==null?k:c(S)},h.nice=function(w){var S=f();return(!w||typeof w.range!="function")&&(w=e(S[0],S[S.length-1],w??10)),w?f(Da(S,w)):h},h.copy=function(){return Ze(h,Ur(t,e,n,i,r,o,s,a,l,c))},h}function Xg(){return mt.apply(Ur(Up,Hp,Nt,Lr,oi,Qe,zr,Fr,Ht,Ya).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function qg(){return mt.apply(Ur(Lp,Ip,Ot,Ir,si,ri,Br,Pr,Ht,Xa).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Gg(){var t=0,e=1,n,i,r,o,s=K,a=!1,l;function c(u){return u==null||isNaN(u=+u)?l:s(r===0?.5:(u=(o(u)-n)*r,a?Math.max(0,Math.min(1,u)):u))}c.domain=function(u){return arguments.length?([t,e]=u,n=o(t=+t),i=o(e=+e),r=n===i?0:1/(i-n),c):[t,e]},c.clamp=function(u){return arguments.length?(a=!!u,c):a},c.interpolator=function(u){return arguments.length?(s=u,c):s};function h(u){return function(f){var d,g;return arguments.length?([d,g]=f,s=u(d,g),c):[s(0),s(1)]}}return c.range=h(xe),c.rangeRound=h(Cr),c.unknown=function(u){return arguments.length?(l=u,c):l},function(u){return o=u,n=u(t),i=u(e),r=n===i?0:1/(i-n),c}}function qa(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Ga(){var t=te(Gg()(K));return t.copy=function(){return qa(t,Ga())},Ca.apply(t,arguments)}function jg(){var t=0,e=.5,n=1,i=1,r,o,s,a,l,c=K,h,u=!1,f;function d(p){return isNaN(p=+p)?f:(p=.5+((p=+h(p))-o)*(i*p<i*o?a:l),c(u?Math.max(0,Math.min(1,p)):p))}d.domain=function(p){return arguments.length?([t,e,n]=p,r=h(t=+t),o=h(e=+e),s=h(n=+n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,d):[t,e,n]},d.clamp=function(p){return arguments.length?(u=!!p,d):u},d.interpolator=function(p){return arguments.length?(c=p,d):c};function g(p){return function(v){var _,x,y;return arguments.length?([_,x,y]=v,c=Kf(p,[_,x,y]),d):[c(0),c(.5),c(1)]}}return d.range=g(xe),d.rangeRound=g(Cr),d.unknown=function(p){return arguments.length?(f=p,d):f},function(p){return h=p,r=p(t),o=p(e),s=p(n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,d}}function ja(){var t=te(jg()(K));return t.copy=function(){return qa(t,ja())},Ca.apply(t,arguments)}const hs={scaleLinear:Na,scalePow:Dr,scaleSqrt:Ep,scaleLog:Ra,scaleSymlog:Fa,scaleIdentity:Oa,scaleTime:Xg,scaleUtc:qg,scaleSequential:Ga,scaleDiverging:ja,scaleQuantize:za,scaleQuantile:Pa,scaleThreshold:Ba,scaleOrdinal:$r,scaleBand:Er,scalePoint:ip};var H;(function(t){t.X="x",t.Y="y"})(H||(H={}));var Xt;(function(t){t.West="west",t.East="east",t.North="north",t.South="south"})(Xt||(Xt={}));const Zg=Object.assign(Object.assign({},Qs),{components:[],tooltip:void 0,crosshair:void 0,annotations:void 0,xAxis:void 0,yAxis:void 0,autoMargin:!0,xScale:void 0,xDomain:void 0,xDomainMinConstraint:void 0,xDomainMaxConstraint:void 0,xRange:void 0,yScale:void 0,yDomain:void 0,yDomainMinConstraint:void 0,yDomainMaxConstraint:void 0,yRange:void 0,yDirection:Xt.North,preventEmptyDomain:null,scaleByDomain:!1});class Qg extends Le{constructor(e,n,i){var r,o;super(e),this._defaultConfig=Zg,this.datamodel=new Ar,this.config=this._defaultConfig,this._clipPathId=la(),this._axisMargin={top:0,bottom:0,left:0,right:0},this._firstRender=!0,this._clipPath=this.svg.append("clipPath").attr("id",this._clipPathId),this._clipPath.append("rect");const s="saturate",a=window.location.href.replace(window.location.hash,"");this.svg.attr("class",O`
53
53
  --highlight-filter-id: url(${a}#${s}); // defining a css variable
54
- `),this._svgDefs.append("filter").attr("id",s).attr("filterUnits","objectBoundingBox").html('<feColorMatrix type="saturate" in="SourceGraphic" values="1.35"/>'),n&&this.updateContainer(n,!0),i&&this.setData(i,!0),(this.config.xAxis||this.config.yAxis||!((r=this.components)===null||r===void 0)&&r.some(l=>l.datamodel.data))&&this.render(),(o=document.fonts)===null||o===void 0||o.ready.then(()=>{this._firstRender||this._renderAxes(0)})}get components(){return this.config.components}get width(){const e=this._getMargin();return ie(this.containerWidth-e.left-e.right,0,Number.POSITIVE_INFINITY)}get height(){const e=this._getMargin();return ie(this.containerHeight-e.top-e.bottom,0,Number.POSITIVE_INFINITY)}setData(e,n){var i,r,o,s;const{components:a,config:l}=this;e&&(this.datamodel.data=e,a.forEach(c=>{c.setData(e)}),(i=l.crosshair)===null||i===void 0||i.setData(e),(r=l.xAxis)===null||r===void 0||r.setData(e),(o=l.yAxis)===null||o===void 0||o.setData(e),(s=l.tooltip)===null||s===void 0||s.hide(),n||this.render())}updateContainer(e,n){super.updateContainer(e),this._removeAllChildren(),this.setData(this.datamodel.data,!0),e.xAxis&&(this.config.xAxis.config.type=F.X,this.element.appendChild(e.xAxis.element)),e.yAxis&&(this.config.yAxis.config.type=F.Y,this.element.appendChild(e.yAxis.element));for(const s of this.components)this.element.appendChild(s.element);const i=e.tooltip;i&&(i.hasContainer()||i.setContainer(this._container),i.setComponents(this.components));const r=e.crosshair;r&&(r.setContainer(this.svg),r.tooltip=i,this.element.appendChild(r.element));const o=e.annotations;o&&this.element.appendChild(o.element),this.element.appendChild(this._clipPath.node()),this.element.appendChild(this._svgDefs.node()),this.element.appendChild(this._svgDefsExternal.node()),n||this.render()}updateComponents(e,n){const{config:i}=this;this.components.forEach((r,o)=>{e[o]&&r.setConfig(e[o])}),this._updateScales(...this.components,i.xAxis,i.yAxis,i.crosshair),n||this.render()}update(e,n,i){i&&(this.datamodel.data=i),e&&this.updateContainer(e,!0),n&&this.updateComponents(n,!0),this.render()}_preRender(){const{config:e}=this;super._preRender(),e.autoMargin&&this._setAutoMargin();const n=be([...this.components,e.xAxis,e.yAxis,e.crosshair,e.annotations]);for(const i of n)i.setSize(this.width,this.height,this.containerWidth,this.containerHeight);this._updateScales(...this.components,e.xAxis,e.yAxis,e.crosshair)}_render(e){var n,i,r,o,s;const{config:a}=this;super._render();const l=this._getMargin();for(const u of this.components)u.g.attr("transform",`translate(${l.left},${l.top})`).style("clip-path",u.clippable?`url(#${this._clipPathId})`:null).style("-webkit-clip-path",u.clippable?`url(#${this._clipPathId})`:null),u.render(e);this._renderAxes(this._firstRender?0:e);const c=2;this._clipPath.select("rect").attr("x",-2).attr("y",-2).attr("width",this.width+2*c).attr("height",this.height+2*c),(n=a.tooltip)===null||n===void 0||n.update();const f=a.crosshair;if(f){const u=this.components.filter(p=>!p.stacked).map(p=>p.config.y),h=this.components.filter(p=>p.stacked).map(p=>p.config.y),d=(i=this.components.find(p=>p.config.baseline))===null||i===void 0?void 0:i.config,g=d==null?void 0:d.baseline;f.accessors={x:(r=this.components[0])===null||r===void 0?void 0:r.config.x,y:Di(u),yStacked:Di(h),baseline:g},f.g.attr("transform",`translate(${l.left},${l.top})`).style("clip-path",`url(#${this._clipPathId})`).style("-webkit-clip-path",`url(#${this._clipPathId})`),f.hide()}(o=a.annotations)===null||o===void 0||o.g.attr("transform",`translate(${l.left},${l.top})`),(s=a.annotations)===null||s===void 0||s.render(),this._firstRender=!1}_updateScales(...e){const n=be(e||this.components);this._setScales(...n),this._updateScalesDomain(...n),this._updateScalesRange(...n)}_setScales(...e){const{config:n}=this;e&&(n.xScale&&e.forEach(i=>i.setScale(H.X,n.xScale)),n.yScale&&e.forEach(i=>i.setScale(H.Y,n.yScale)))}_updateScalesDomain(...e){const{config:n}=this;if(!e)return;const i=e.filter(r=>!r.config.excludeFromDomainCalculation);Object.values(H).forEach(r=>{var o,s,a,l,c,f,u,h;const[d,g]=Su(Fu(i.map(k=>k.getDataExtent(r,n.scaleByDomain)))),p=r===H.Y?n.yDomain:n.xDomain,v=r===H.Y?n.yDomainMinConstraint:n.xDomainMinConstraint,_=r===H.Y?n.yDomainMaxConstraint:n.xDomainMaxConstraint,x=(s=(o=p==null?void 0:p[0])!==null&&o!==void 0?o:d)!==null&&s!==void 0?s:0,y=(l=(a=p==null?void 0:p[1])!==null&&a!==void 0?a:g)!==null&&l!==void 0?l:1,T=[ie(x,(c=v==null?void 0:v[0])!==null&&c!==void 0?c:Number.NEGATIVE_INFINITY,(f=v==null?void 0:v[1])!==null&&f!==void 0?f:Number.POSITIVE_INFINITY),ie(y,(u=_==null?void 0:_[0])!==null&&u!==void 0?u:Number.NEGATIVE_INFINITY,(h=_==null?void 0:_[1])!==null&&h!==void 0?h:Number.POSITIVE_INFINITY)];if(T[0]===T[1]){const k=i.some(w=>{var S;return((S=w.datamodel.data)===null||S===void 0?void 0:S.length)>0});(n.preventEmptyDomain||n.preventEmptyDomain===null&&(!k||r===H.Y))&&(T[1]=T[0]+1)}e.forEach(k=>k.setScaleDomain(r,T))})}_updateScalesRange(...e){var n,i,r,o,s,a;const{config:l}=this;if(!e)return;const c=l.yDirection===Yt.South,f=[(n=l.padding.left)!==null&&n!==void 0?n:0,this.width-((i=l.padding.right)!==null&&i!==void 0?i:0)],u=[this.height-((r=l.padding.bottom)!==null&&r!==void 0?r:0),(o=l.padding.top)!==null&&o!==void 0?o:0];c&&u.reverse();for(const d of e)d.setSize(this.width,this.height,this.containerWidth,this.containerHeight),d.setScaleRange(H.X,(s=l.xRange)!==null&&s!==void 0?s:f),d.setScaleRange(H.Y,(a=l.yRange)!==null&&a!==void 0?a:u);const h=e.map(d=>d.bleed).reduce((d,g)=>{for(const p of Object.keys(d)){const v=p;d[v]<g[v]&&(d[v]=g[v])}return d},{top:0,bottom:0,left:0,right:0});for(const d of e)d.setScaleRange(H.X,[f[0]+h.left,f[1]-h.right]),d.setScaleRange(H.Y,c?[u[0]+h.top,u[1]-h.bottom]:[u[0]-h.bottom,u[1]+h.top])}_renderAxes(e){const{config:{xAxis:n,yAxis:i}}=this,r=this._getMargin();be([n,i]).forEach(s=>{const a=s.getOffset(r);s.g.attr("transform",`translate(${a.left},${a.top})`),s.render(e)})}_setAutoMargin(){const{config:{xAxis:e,yAxis:n}}=this,i=be([...this.components,e,n]);this._setScales(...i),this._updateScalesDomain(...i);const r=this._firstRender?2:1;for(let o=0;o<r;o+=1){const s={top:0,bottom:0,left:0,right:0};this._updateScalesRange(...i),be([e,n]).forEach(l=>{l.preRender();const c=l.getRequiredMargin();s.top<c.top&&(s.top=c.top),s.bottom<c.bottom&&(s.bottom=c.bottom),s.left<c.left&&(s.left=c.left),s.right<c.right&&(s.right=c.right)}),this._axisMargin=s}}_getMargin(){const{config:{margin:e}}=this;return{top:e.top+this._axisMargin.top,bottom:e.bottom+this._axisMargin.bottom,left:e.left+this._axisMargin.left,right:e.right+this._axisMargin.right}}destroy(){const{components:e,config:{tooltip:n,crosshair:i,annotations:r,xAxis:o,yAxis:s}}=this;super.destroy();for(const a of e)a==null||a.destroy();n==null||n.destroy(),i==null||i.destroy(),r==null||r.destroy(),o==null||o.destroy(),s==null||s.destroy()}}const ja={duration:600,events:{},attributes:{}};class Vg{constructor(e=Oe.SVG){var n,i;this.type=Oe.SVG,this.datamodel=new Sr,this.sizing=ue.Fit,this.events={},this._defaultConfig=ja,this._width=400,this._height=200,this._containerWidth=void 0,this._containerHeight=void 0,this._setUpComponentEventsThrottled=Sn(this._setUpComponentEvents,500),this._setCustomAttributesThrottled=Sn(this._setCustomAttributes,500),e===Oe.SVG?this.element=document.createElementNS("http://www.w3.org/2000/svg","g"):this.element=document.createElement("div"),this.uid=aa(),this.g=j(this.element);const r=(i=(n=this.constructor)===null||n===void 0?void 0:n.selectors)===null||i===void 0?void 0:i.root;r&&this.g.attr("class",r)}setConfig(e){this.prevConfig=this.config,this.config=qt(this._defaultConfig,e)}setData(e){this.datamodel.data=e}setSize(e,n,i,r){isFinite(e)&&(this._width=e),isFinite(n)&&(this._height=n),isFinite(i)&&(this._containerWidth=i),isFinite(r)&&(this._containerHeight=r)}render(e=this.config.duration){this._render(e);const n="animating";e&&(this.g.attr(n,""),this.g.transition(n).duration(e).on("end interrupt",()=>{this.g.attr(n,null)})),this._setUpComponentEventsThrottled(),this._setCustomAttributesThrottled()}get bleed(){return{top:0,bottom:0,left:0,right:0}}_render(e=this.config.duration){}_setCustomAttributes(){const e=this.config.attributes;Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(i=>{this.g.selectAll(`.${n}`).attr(i,e[n][i])})})}_setUpComponentEvents(){this._bindEvents(this.events),this._bindEvents(this.config.events,".user")}_bindEvents(e=this.events,n=""){Object.keys(e).forEach(i=>{Object.keys(e[i]).forEach(r=>{const o=this.g.selectAll(`.${i}`);o.on(r+n,(s,a)=>{const l=o.nodes(),c=l.indexOf(s.currentTarget),f=e[i][r];return f==null?void 0:f(a,s,c,l)})})})}destroy(){var e;(e=this.g)===null||e===void 0||e.remove(),this.element=void 0}isDestroyed(){return!this.element}}class Xg extends Sr{constructor(e){super(e)}get data(){var e;return(e=this._data)!==null&&e!==void 0?e:[]}set data(e){Array.isArray(e)&&(this._data=e)}}const ri=Object.assign(Object.assign({},ja),{x:void 0,y:void 0,id:(t,e)=>{var n;return(n=t.id)!==null&&n!==void 0?n:`${e}`},color:t=>t.color,xScale:void 0,yScale:void 0,excludeFromDomainCalculation:!1});class Ir extends Vg{constructor(){super(...arguments),this.datamodel=new Xg,this.clippable=!0,this.stacked=!1,this._defaultConfig=ri,this._xScale=cs.scaleLinear(),this._yScale=cs.scaleLinear()}get xScale(){return this.config.xScale||this._xScale}get yScale(){return this.config.yScale||this._yScale}setConfig(e){var n,i;!((n=this.config)===null||n===void 0)&&n.xScale&&(e.xScale=this.config.xScale),!((i=this.config)===null||i===void 0)&&i.yScale&&(e.yScale=this.config.yScale),super.setConfig(e)}setScaleDomain(e,n){var i,r;e===H.X&&((i=this._xScale)===null||i===void 0||i.domain(n)),e===H.Y&&((r=this._yScale)===null||r===void 0||r.domain(n))}setScaleRange(e,n){var i,r;e===H.X&&((i=this._xScale)===null||i===void 0||i.range(n)),e===H.Y&&((r=this._yScale)===null||r===void 0||r.range(n))}setScale(e,n){n&&e===H.X&&(this._xScale=n),n&&e===H.Y&&(this._yScale=n)}getDataExtent(e,n){const{config:i,datamodel:r}=this;switch(e){case H.X:return this.getXDataExtent();case H.Y:return this.getYDataExtent(n);default:return hi(r.data,i[e])}}getXDataExtent(){const{config:e,datamodel:n}=this;return hi(n.data,e.x)}getYDataExtent(e){const{config:n,datamodel:i}=this,r=e?Ws(i.data,this.xScale.domain(),n.x):i.data,o=fe(n.y)?n.y:[n.y];return hi(r,...o)}}var M;(function(t){t.Top="top",t.Bottom="bottom",t.Left="left",t.Right="right",t.Center="center",t.Auto="auto"})(M||(M={}));var us;(function(t){t.Absolute="absolute",t.Fixed="fixed"})(us||(us={}));var fs;(function(t){t.Inside="inside",t.Outside="outside"})(fs||(fs={}));var hs;(function(t){t.Horizontal="horizontal",t.Vertical="vertical"})(hs||(hs={}));const qg={components:[],container:void 0,followCursor:!0,allowHover:!0,horizontalPlacement:M.Auto,horizontalShift:0,verticalPlacement:M.Top,verticalShift:0,attributes:{},triggers:{},className:void 0},oi=P`
54
+ `),this._svgDefs.append("filter").attr("id",s).attr("filterUnits","objectBoundingBox").html('<feColorMatrix type="saturate" in="SourceGraphic" values="1.35"/>'),n&&this.updateContainer(n,!0),i&&this.setData(i,!0),(this.config.xAxis||this.config.yAxis||!((r=this.components)===null||r===void 0)&&r.some(l=>l.datamodel.data))&&this.render(),(o=document.fonts)===null||o===void 0||o.ready.then(()=>{this._firstRender||this._renderAxes(0)})}get components(){return this.config.components}get width(){const e=this._getMargin();return Pt(this.containerWidth-e.left-e.right,0,Number.POSITIVE_INFINITY)}get height(){const e=this._getMargin();return Pt(this.containerHeight-e.top-e.bottom,0,Number.POSITIVE_INFINITY)}setData(e,n){var i,r,o,s;const{components:a,config:l}=this;e&&(this.datamodel.data=e,a.forEach(c=>{c.setData(e)}),(i=l.crosshair)===null||i===void 0||i.setData(e),(r=l.xAxis)===null||r===void 0||r.setData(e),(o=l.yAxis)===null||o===void 0||o.setData(e),(s=l.tooltip)===null||s===void 0||s.hide(),n||this.render())}updateContainer(e,n){super.updateContainer(e),this._removeAllChildren(),this.setData(this.datamodel.data,!0),e.xAxis&&(this.config.xAxis.config.type=P.X,this.element.appendChild(e.xAxis.element)),e.yAxis&&(this.config.yAxis.config.type=P.Y,this.element.appendChild(e.yAxis.element));for(const s of this.components)this.element.appendChild(s.element);const i=e.tooltip;i&&(i.hasContainer()||i.setContainer(this._container),i.setComponents(this.components));const r=e.crosshair;r&&(r.setContainer(this.svg),r.tooltip=i,this.element.appendChild(r.element));const o=e.annotations;o&&this.element.appendChild(o.element),this.element.appendChild(this._clipPath.node()),this.element.appendChild(this._svgDefs.node()),this.element.appendChild(this._svgDefsExternal.node()),n||this.render()}updateComponents(e,n){const{config:i}=this;this.components.forEach((r,o)=>{e[o]&&r.setConfig(e[o])}),this._updateScales(...this.components,i.xAxis,i.yAxis,i.crosshair),n||this.render()}update(e,n,i){i&&(this.datamodel.data=i),e&&this.updateContainer(e,!0),n&&this.updateComponents(n,!0),this.render()}_preRender(){const{config:e}=this;super._preRender(),e.autoMargin&&this._setAutoMargin();const n=we([...this.components,e.xAxis,e.yAxis,e.crosshair,e.annotations]);for(const i of n)i.setSize(this.width,this.height,this.containerWidth,this.containerHeight);this._updateScales(...this.components,e.xAxis,e.yAxis,e.crosshair)}_render(e){var n,i,r,o,s;const{config:a}=this;super._render();const l=this._getMargin();for(const u of this.components)u.g.attr("transform",`translate(${l.left},${l.top})`).style("clip-path",u.clippable?`url(#${this._clipPathId})`:null).style("-webkit-clip-path",u.clippable?`url(#${this._clipPathId})`:null),u.render(e);this._renderAxes(this._firstRender?0:e);const c=2;this._clipPath.select("rect").attr("x",-2).attr("y",-2).attr("width",this.width+2*c).attr("height",this.height+2*c),(n=a.tooltip)===null||n===void 0||n.update();const h=a.crosshair;if(h){const u=this.components.filter(p=>!p.stacked).map(p=>p.config.y),f=this.components.filter(p=>p.stacked).map(p=>p.config.y),d=(i=this.components.find(p=>p.config.baseline))===null||i===void 0?void 0:i.config,g=d==null?void 0:d.baseline;h.accessors={x:(r=this.components[0])===null||r===void 0?void 0:r.config.x,y:Pi(u),yStacked:Pi(f),baseline:g},h.g.attr("transform",`translate(${l.left},${l.top})`).style("clip-path",`url(#${this._clipPathId})`).style("-webkit-clip-path",`url(#${this._clipPathId})`),h.hide()}(o=a.annotations)===null||o===void 0||o.g.attr("transform",`translate(${l.left},${l.top})`),(s=a.annotations)===null||s===void 0||s.render(),this._firstRender=!1}_updateScales(...e){const n=we(e||this.components);this._setScales(...n),this._updateScalesDomain(...n),this._updateScalesRange(...n)}_setScales(...e){const{config:n}=this;e&&(n.xScale&&e.forEach(i=>i.setScale(H.X,n.xScale)),n.yScale&&e.forEach(i=>i.setScale(H.Y,n.yScale)))}_updateScalesDomain(...e){const{config:n}=this;if(!e)return;const i=e.filter(r=>!r.config.excludeFromDomainCalculation);Object.values(H).forEach(r=>{var o,s,a,l,c,h,u,f;const[d,g]=Eu(Iu(i.map(k=>k.getDataExtent(r,n.scaleByDomain)))),p=r===H.Y?n.yDomain:n.xDomain,v=r===H.Y?n.yDomainMinConstraint:n.xDomainMinConstraint,_=r===H.Y?n.yDomainMaxConstraint:n.xDomainMaxConstraint,x=(s=(o=p==null?void 0:p[0])!==null&&o!==void 0?o:d)!==null&&s!==void 0?s:0,y=(l=(a=p==null?void 0:p[1])!==null&&a!==void 0?a:g)!==null&&l!==void 0?l:1,T=[Pt(x,(c=v==null?void 0:v[0])!==null&&c!==void 0?c:Number.NEGATIVE_INFINITY,(h=v==null?void 0:v[1])!==null&&h!==void 0?h:Number.POSITIVE_INFINITY),Pt(y,(u=_==null?void 0:_[0])!==null&&u!==void 0?u:Number.NEGATIVE_INFINITY,(f=_==null?void 0:_[1])!==null&&f!==void 0?f:Number.POSITIVE_INFINITY)];if(T[0]===T[1]){const k=i.some(w=>{var S;return((S=w.datamodel.data)===null||S===void 0?void 0:S.length)>0});(n.preventEmptyDomain||n.preventEmptyDomain===null&&(!k||r===H.Y))&&(T[1]=T[0]+1)}e.forEach(k=>k.setScaleDomain(r,T))})}_updateScalesRange(...e){var n,i,r,o,s,a;const{config:l}=this;if(!e)return;const c=l.yDirection===Xt.South,h=[(n=l.padding.left)!==null&&n!==void 0?n:0,this.width-((i=l.padding.right)!==null&&i!==void 0?i:0)],u=[this.height-((r=l.padding.bottom)!==null&&r!==void 0?r:0),(o=l.padding.top)!==null&&o!==void 0?o:0];c&&u.reverse();for(const d of e)d.setSize(this.width,this.height,this.containerWidth,this.containerHeight),d.setScaleRange(H.X,(s=l.xRange)!==null&&s!==void 0?s:h),d.setScaleRange(H.Y,(a=l.yRange)!==null&&a!==void 0?a:u);const f=e.map(d=>d.bleed).reduce((d,g)=>{for(const p of Object.keys(d)){const v=p;d[v]<g[v]&&(d[v]=g[v])}return d},{top:0,bottom:0,left:0,right:0});for(const d of e)d.setScaleRange(H.X,[h[0]+f.left,h[1]-f.right]),d.setScaleRange(H.Y,c?[u[0]+f.top,u[1]-f.bottom]:[u[0]-f.bottom,u[1]+f.top])}_renderAxes(e){const{config:{xAxis:n,yAxis:i}}=this,r=this._getMargin();we([n,i]).forEach(s=>{const a=s.getOffset(r);s.g.attr("transform",`translate(${a.left},${a.top})`),s.render(e)})}_setAutoMargin(){const{config:{xAxis:e,yAxis:n}}=this,i=we([...this.components,e,n]);this._setScales(...i),this._updateScalesDomain(...i);const r=this._firstRender?2:1;for(let o=0;o<r;o+=1){const s={top:0,bottom:0,left:0,right:0};this._updateScalesRange(...i),we([e,n]).forEach(l=>{l.preRender();const c=l.getRequiredMargin();s.top<c.top&&(s.top=c.top),s.bottom<c.bottom&&(s.bottom=c.bottom),s.left<c.left&&(s.left=c.left),s.right<c.right&&(s.right=c.right)}),this._axisMargin=s}}_getMargin(){const{config:{margin:e}}=this;return{top:e.top+this._axisMargin.top,bottom:e.bottom+this._axisMargin.bottom,left:e.left+this._axisMargin.left,right:e.right+this._axisMargin.right}}destroy(){const{components:e,config:{tooltip:n,crosshair:i,annotations:r,xAxis:o,yAxis:s}}=this;super.destroy();for(const a of e)a==null||a.destroy();n==null||n.destroy(),i==null||i.destroy(),r==null||r.destroy(),o==null||o.destroy(),s==null||s.destroy()}}const Za={duration:600,events:{},attributes:{}};class Jg{constructor(e=De.SVG){var n,i;this.type=De.SVG,this.datamodel=new Ar,this.sizing=de.Fit,this.events={},this._defaultConfig=Za,this._width=400,this._height=200,this._containerWidth=void 0,this._containerHeight=void 0,this._setUpComponentEventsThrottled=Mn(this._setUpComponentEvents,500),this._setCustomAttributesThrottled=Mn(this._setCustomAttributes,500),e===De.SVG?this.element=document.createElementNS("http://www.w3.org/2000/svg","g"):this.element=document.createElement("div"),this.uid=la(),this.g=Z(this.element);const r=(i=(n=this.constructor)===null||n===void 0?void 0:n.selectors)===null||i===void 0?void 0:i.root;r&&this.g.attr("class",r)}setConfig(e){this.prevConfig=this.config,this.config=Zt(this._defaultConfig,e)}setData(e){this.datamodel.data=e}setSize(e,n,i,r){isFinite(e)&&(this._width=e),isFinite(n)&&(this._height=n),isFinite(i)&&(this._containerWidth=i),isFinite(r)&&(this._containerHeight=r)}render(e=this.config.duration){this._render(e);const n="animating";e&&(this.g.attr(n,""),this.g.transition(n).duration(e).on("end interrupt",()=>{this.g.attr(n,null)})),this._setUpComponentEventsThrottled(),this._setCustomAttributesThrottled()}get bleed(){return{top:0,bottom:0,left:0,right:0}}_render(e=this.config.duration){}_setCustomAttributes(){const e=this.config.attributes;Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(i=>{this.g.selectAll(`.${n}`).attr(i,e[n][i])})})}_setUpComponentEvents(){this._bindEvents(this.events),this._bindEvents(this.config.events,".user")}_bindEvents(e=this.events,n=""){Object.keys(e).forEach(i=>{Object.keys(e[i]).forEach(r=>{const o=this.g.selectAll(`.${i}`);o.on(r+n,(s,a)=>{const l=o.nodes(),c=l.indexOf(s.currentTarget),h=e[i][r];return h==null?void 0:h(a,s,c,l)})})})}destroy(){var e;(e=this.g)===null||e===void 0||e.remove(),this.element=void 0}isDestroyed(){return!this.element}}class Kg extends Ar{constructor(e){super(e)}get data(){var e;return(e=this._data)!==null&&e!==void 0?e:[]}set data(e){Array.isArray(e)&&(this._data=e)}}const Je=Object.assign(Object.assign({},Za),{x:void 0,y:void 0,id:(t,e)=>{var n;return(n=t.id)!==null&&n!==void 0?n:`${e}`},color:t=>t.color,xScale:void 0,yScale:void 0,excludeFromDomainCalculation:!1});class ai extends Jg{constructor(){super(...arguments),this.datamodel=new Kg,this.clippable=!0,this.stacked=!1,this._defaultConfig=Je,this._xScale=hs.scaleLinear(),this._yScale=hs.scaleLinear()}get xScale(){return this.config.xScale||this._xScale}get yScale(){return this.config.yScale||this._yScale}setConfig(e){var n,i;!((n=this.config)===null||n===void 0)&&n.xScale&&(e.xScale=this.config.xScale),!((i=this.config)===null||i===void 0)&&i.yScale&&(e.yScale=this.config.yScale),super.setConfig(e)}setScaleDomain(e,n){var i,r;e===H.X&&((i=this._xScale)===null||i===void 0||i.domain(n)),e===H.Y&&((r=this._yScale)===null||r===void 0||r.domain(n))}setScaleRange(e,n){var i,r;e===H.X&&((i=this._xScale)===null||i===void 0||i.range(n)),e===H.Y&&((r=this._yScale)===null||r===void 0||r.range(n))}setScale(e,n){n&&e===H.X&&(this._xScale=n),n&&e===H.Y&&(this._yScale=n)}getDataExtent(e,n){const{config:i,datamodel:r}=this;switch(e){case H.X:return this.getXDataExtent();case H.Y:return this.getYDataExtent(n);default:return gi(r.data,i[e])}}getXDataExtent(){const{config:e,datamodel:n}=this;return gi(n.data,e.x)}getYDataExtent(e){const{config:n,datamodel:i}=this,r=e?Vs(i.data,this.xScale.domain(),n.x):i.data,o=jt(n.y)?n.y:[n.y];return gi(r,...o)}}var C;(function(t){t.Top="top",t.Bottom="bottom",t.Left="left",t.Right="right",t.Center="center",t.Auto="auto"})(C||(C={}));var fs;(function(t){t.Absolute="absolute",t.Fixed="fixed"})(fs||(fs={}));var ds;(function(t){t.Inside="inside",t.Outside="outside"})(ds||(ds={}));var ps;(function(t){t.Horizontal="horizontal",t.Vertical="vertical"})(ps||(ps={}));const t0={components:[],container:void 0,followCursor:!0,allowHover:!0,horizontalPlacement:C.Auto,horizontalShift:0,verticalPlacement:C.Top,verticalShift:0,attributes:{},triggers:{},className:void 0},li=O`
55
55
  label: tooltip;
56
56
  display: inline-block;
57
57
  left: 0;
@@ -69,7 +69,7 @@
69
69
  border: solid 1px var(--vis-tooltip-border-color);
70
70
  background-color: var(--vis-tooltip-background-color);
71
71
  backdrop-filter: var(--vis-tooltip-backdrop-filter);
72
- `,Gg=oi,jg=_e`
72
+ `,e0=li,n0=Kt`
73
73
  :root {
74
74
  --vis-tooltip-background-color: rgba(255, 255, 255, 0.95);
75
75
  --vis-tooltip-border-color: #e5e9f7;
@@ -87,7 +87,7 @@
87
87
  --vis-dark-tooltip-shadow-color: rgba(0,0,0, 0.95);
88
88
  }
89
89
 
90
- body.theme-dark ${`.${oi}`} {
90
+ body.theme-dark ${`.${li}`} {
91
91
  --vis-tooltip-background-color: var(--vis-dark-tooltip-background-color);
92
92
  --vis-tooltip-text-color: var(--vis-dark-tooltip-text-color);
93
93
  --vis-tooltip-border-color: var(--vis-dark-tooltip-border-color);
@@ -100,19 +100,19 @@
100
100
  --vis-tooltip-border-color: var(--vis-color-grey);
101
101
  --vis-tooltip-shadow-color: rgba(0,0,0, 0.95);
102
102
  }
103
- `,Za=P`
103
+ `,Qa=O`
104
104
  bottom: unset;
105
105
  position: fixed;
106
- `,qi=P`
106
+ `,Zi=O`
107
107
  opacity: 1;
108
- `,Gi=P`
108
+ `,Qi=O`
109
109
  display: none;
110
- `,Qa=P`
110
+ `,Ja=O`
111
111
  label: non-interactive;
112
112
  pointer-events: none;
113
113
  user-select: none;
114
- `,Zg=Object.freeze(Object.defineProperty({__proto__:null,hidden:Gi,nonInteractive:Qa,positionFixed:Za,root:oi,show:qi,tooltip:Gg,variables:jg},Symbol.toStringTag,{value:"Module"}));class Ja{constructor(e={}){this._defaultConfig=qg,this.config=this._defaultConfig,this._setUpEventsThrottled=Sn(this._setUpEvents,500),this._setContainerPositionThrottled=Sn(this._setContainerPosition,500),this._isShown=!1,this.element=document.createElement("div"),this.div=j(this.element).attr("class",oi),this.setConfig(e),this.components=this.config.components,this._mutationObserver=new MutationObserver(()=>{this._isShown&&(!this.config.followCursor&&this._hoveredElement?this.placeByElement(this._hoveredElement):this._position&&this.place({x:this._position[0],y:this._position[1]}))}),this._mutationObserver.observe(this.div.node(),{childList:!0,subtree:!0})}setConfig(e){var n;this.prevConfig=this.config,this.config=qt(this._defaultConfig,e),this.prevConfig.horizontalPlacement!==this.config.horizontalPlacement&&this.overrideHorizontalPlacement(void 0),this.config.container&&this.config.container!==((n=this.prevConfig)===null||n===void 0?void 0:n.container)&&this.setContainer(this.config.container),this._setUpAttributes()}setContainer(e){var n;(n=this.element.parentNode)===null||n===void 0||n.removeChild(this.element),this._container=e,this._container.appendChild(this.element),this._setContainerPositionThrottled()}getContainer(){return this._container}hasContainer(){return!!this._container&&this._container.isConnected}setComponents(e){this.components=e}update(){this._container&&this._setUpEventsThrottled()}show(e,n){this.render(e),this.place(n)}hide(){this.div.classed(qi,!1).on("transitionend",()=>{this.div.classed(Gi,!this._isShown)}),this._isShown=!1}display(){this.div.classed(Gi,!1).classed(qi,!0),this._isShown=!0}place(e){if(this._position=[e.x,e.y],!this.hasContainer()){console.warn("Unovis | Tooltip: Container was not set or is not initialized yet");return}const{config:n}=this,i=this.element.offsetWidth,r=this.element.offsetHeight,o=this._overriddenHorizontalPlacement||(n.horizontalPlacement===M.Auto?M.Center:n.horizontalPlacement),s=n.verticalPlacement===M.Auto?e.y-r<0?M.Bottom:M.Top:n.verticalPlacement,a=5,l=o===M.Left?-i-a-n.horizontalShift:o===M.Center?-i/2:a+n.horizontalShift,c=s===M.Bottom?a+n.verticalShift:s===M.Center?-r/2:-5-n.verticalShift-r,[f,u]=this._constraintPosToContainer(e.x+l,e.y+c,i,r);this._applyPosition(f,u,r)}placeByElement(e){const{config:n}=this;this._hoveredElement=e;const i=5,r=this.element.offsetWidth,o=this.element.offsetHeight,s=this.isContainerBody(),a=s?window.innerWidth:this._container.scrollWidth,l=e.getBoundingClientRect(),c=s?[l.x,l.y]:Jr({clientX:l.x,clientY:l.y,pageX:l.x,pageY:l.y},this._container),f=this._overriddenHorizontalPlacement||(n.horizontalPlacement===M.Auto?c[0]-r<0?M.Right:c[0]+r>a?M.Left:M.Center:n.horizontalPlacement);let u=0;switch(f){case M.Left:u=-r-i-n.horizontalShift;break;case M.Right:u=l.width+i+n.horizontalShift;break;case M.Center:default:u=(-r+l.width)/2;break}const h=n.verticalPlacement===M.Auto?f!==M.Center?M.Center:c[1]-o<0?M.Bottom:M.Top:n.verticalPlacement;let d=-o;switch(h){case M.Center:d+=(o+l.height)/2;break;case M.Bottom:d+=o+l.height+i+n.verticalShift;break;case M.Top:default:d+=-5-n.verticalShift;break}const[g,p]=this._constraintPosToContainer(c[0]+u,c[1]+d,r,o);this._applyPosition(g,p,o)}isContainerBody(){return this._container===document.body}overrideHorizontalPlacement(e){this._overriddenHorizontalPlacement=e}render(e){var n;const{config:i,prevConfig:r}=this;e instanceof HTMLElement?this.div.select(":first-child").node()!==e&&this.div.html("").append(()=>e):e&&this.div.html(e),this.div.classed((n=i.className)!==null&&n!==void 0?n:"",!!i.className).classed(Qa,!i.allowHover||i.followCursor),r!=null&&r.className&&r.className!==i.className&&this.div.classed(r.className,!1),this.display()}_applyPosition(e,n,i){const r=this.isContainerBody(),o=r?window.innerHeight:this._container.scrollHeight;this.div.classed(Za,r).style("top",r?`${n}px`:"unset").style("bottom",r?"unset":`${o-n-i}px`).style("left",`${e}px`)}_constraintPosToContainer(e,n,i,r){const o=this.isContainerBody(),s=o?window.innerHeight:this._container.scrollHeight,a=o?window.innerWidth:this._container.scrollWidth,l=10,c=e>a-i-l,f=e<l,u=c?a-i-l:f?l:e,h=10,d=n>s-r-h,g=n<h,p=d?s-r-h:g?h:n;return[a<i?0:u,s<r?0:p]}_setContainerPosition(){var e;this._container!==document.body&&((e=getComputedStyle(this._container))===null||e===void 0?void 0:e.position)==="static"&&(this._container.style.position="relative")}_setUpEvents(){const{config:e}=this;this.components.forEach(n=>{const i=j(n.element);i.on("mousemove.tooltip",r=>{const o=r.composedPath&&r.composedPath()||r.path||[r.target];for(const s of Object.keys(e.triggers)){const a=e.triggers[s];if(!a)continue;const l=i.selectAll(`.${s}`).nodes();for(const c of o){if(c===i.node())break;if(c.classList.contains(s)){const f=l.indexOf(c),u=j(c).datum(),h=a(u,f,l),[d,g]=this.isContainerBody()?[r.clientX,r.clientY]:Jr(r,this._container);h===null?this.hide():(this.render(h),e.followCursor?this.place({x:d,y:g}):this.placeByElement(c)),r.stopPropagation();return}}}this._isShown&&this.hide()}).on("mouseleave.tooltip",r=>{r.stopPropagation(),this.hide()})}),e.allowHover&&!e.followCursor?this.div.on("mouseenter.tooltip",this.display.bind(this)).on("mouseleave.tooltip",this.hide.bind(this)):this.div.on("mouseenter.tooltip",null).on("mouseleave.tooltip",null)}_setUpAttributes(){const e=this.config.attributes;e&&Object.keys(e).forEach(n=>{this.div.attr(n,e[n])})}destroy(){var e;this._mutationObserver.disconnect(),(e=this.div)===null||e===void 0||e.remove()}}Ja.selectors=Zg;function B(t){return function(){return t}}const Ka=Math.cos,Ln=Math.sin,vt=Math.sqrt,ds=1e-12,In=Math.PI,si=2*In,ji=Math.PI,Zi=2*ji,zt=1e-6,Qg=Zi-zt;function tl(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function Jg(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return tl;const n=10**e;return function(i){this._+=i[0];for(let r=1,o=i.length;r<o;++r)this._+=Math.round(arguments[r]*n)/n+i[r]}}class Kg{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?tl:Jg(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,i,r){this._append`Q${+e},${+n},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(e,n,i,r,o,s){this._append`C${+e},${+n},${+i},${+r},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,i,r,o){if(e=+e,n=+n,i=+i,r=+r,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=i-e,c=r-n,f=s-e,u=a-n,h=f*f+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>zt)if(!(Math.abs(u*l-c*f)>zt)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let d=i-s,g=r-a,p=l*l+c*c,v=d*d+g*g,_=Math.sqrt(p),x=Math.sqrt(h),y=o*Math.tan((ji-Math.acos((p+h-v)/(2*_*x)))/2),T=y/x,k=y/_;Math.abs(T-1)>zt&&this._append`L${e+T*f},${n+T*u}`,this._append`A${o},${o},0,0,${+(u*d>f*g)},${this._x1=e+k*l},${this._y1=n+k*c}`}}arc(e,n,i,r,o,s){if(e=+e,n=+n,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(r),l=i*Math.sin(r),c=e+a,f=n+l,u=1^s,h=s?r-o:o-r;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>zt||Math.abs(this._y1-f)>zt)&&this._append`L${c},${f}`,i&&(h<0&&(h=h%Zi+Zi),h>Qg?this._append`A${i},${i},0,1,${u},${e-a},${n-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=f}`:h>zt&&this._append`A${i},${i},0,${+(h>=ji)},${u},${this._x1=e+i*Math.cos(o)},${this._y1=n+i*Math.sin(o)}`)}rect(e,n,i,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function Br(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);e=i}return t},()=>new Kg(e)}function el(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function nl(t){this._context=t}nl.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Ur(t){return new nl(t)}function il(t){return t[0]}function rl(t){return t[1]}function ol(t,e){var n=B(!0),i=null,r=Ur,o=null,s=Br(a);t=typeof t=="function"?t:t===void 0?il:B(t),e=typeof e=="function"?e:e===void 0?rl:B(e);function a(l){var c,f=(l=el(l)).length,u,h=!1,d;for(i==null&&(o=r(d=s())),c=0;c<=f;++c)!(c<f&&n(u=l[c],c,l))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(u,c,l),+e(u,c,l));if(d)return o=null,d+""||null}return a.x=function(l){return arguments.length?(t=typeof l=="function"?l:B(+l),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:B(+l),a):e},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:B(!!l),a):n},a.curve=function(l){return arguments.length?(r=l,i!=null&&(o=r(i)),a):r},a.context=function(l){return arguments.length?(l==null?i=o=null:o=r(i=l),a):i},a}function t0(t,e,n){var i=null,r=B(!0),o=null,s=Ur,a=null,l=Br(c);t=typeof t=="function"?t:t===void 0?il:B(+t),e=typeof e=="function"?e:B(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?rl:B(+n);function c(u){var h,d,g,p=(u=el(u)).length,v,_=!1,x,y=new Array(p),T=new Array(p);for(o==null&&(a=s(x=l())),h=0;h<=p;++h){if(!(h<p&&r(v=u[h],h,u))===_)if(_=!_)d=h,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),g=h-1;g>=d;--g)a.point(y[g],T[g]);a.lineEnd(),a.areaEnd()}_&&(y[h]=+t(v,h,u),T[h]=+e(v,h,u),a.point(i?+i(v,h,u):y[h],n?+n(v,h,u):T[h]))}if(x)return a=null,x+""||null}function f(){return ol().defined(r).curve(s).context(o)}return c.x=function(u){return arguments.length?(t=typeof u=="function"?u:B(+u),i=null,c):t},c.x0=function(u){return arguments.length?(t=typeof u=="function"?u:B(+u),c):t},c.x1=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:B(+u),c):i},c.y=function(u){return arguments.length?(e=typeof u=="function"?u:B(+u),n=null,c):e},c.y0=function(u){return arguments.length?(e=typeof u=="function"?u:B(+u),c):e},c.y1=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:B(+u),c):n},c.lineX0=c.lineY0=function(){return f().x(t).y(e)},c.lineY1=function(){return f().x(t).y(n)},c.lineX1=function(){return f().x(i).y(e)},c.defined=function(u){return arguments.length?(r=typeof u=="function"?u:B(!!u),c):r},c.curve=function(u){return arguments.length?(s=u,o!=null&&(a=s(o)),c):s},c.context=function(u){return arguments.length?(u==null?o=a=null:a=s(o=u),c):o},c}const sl={draw(t,e){const n=vt(e/In);t.moveTo(n,0),t.arc(0,0,n,0,si)}},e0={draw(t,e){const n=vt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},al=vt(1/3),n0=al*2,i0={draw(t,e){const n=vt(e/n0),i=n*al;t.moveTo(0,-n),t.lineTo(i,0),t.lineTo(0,n),t.lineTo(-i,0),t.closePath()}},r0={draw(t,e){const n=vt(e),i=-n/2;t.rect(i,i,n,n)}},o0=.8908130915292852,ll=Ln(In/10)/Ln(7*In/10),s0=Ln(si/10)*ll,a0=-Ka(si/10)*ll,l0={draw(t,e){const n=vt(e*o0),i=s0*n,r=a0*n;t.moveTo(0,-n),t.lineTo(i,r);for(let o=1;o<5;++o){const s=si*o/5,a=Ka(s),l=Ln(s);t.lineTo(l*n,-a*n),t.lineTo(a*i-l*r,l*i+a*r)}t.closePath()}},Ci=vt(3),c0={draw(t,e){const n=-vt(e/(Ci*3));t.moveTo(0,n*2),t.lineTo(-Ci*n,-n),t.lineTo(Ci*n,-n),t.closePath()}},st=-.5,at=vt(3)/2,Qi=1/vt(12),u0=(Qi/2+1)*3,f0={draw(t,e){const n=vt(e/u0),i=n/2,r=n*Qi,o=i,s=n*Qi+n,a=-o,l=s;t.moveTo(i,r),t.lineTo(o,s),t.lineTo(a,l),t.lineTo(st*i-at*r,at*i+st*r),t.lineTo(st*o-at*s,at*o+st*s),t.lineTo(st*a-at*l,at*a+st*l),t.lineTo(st*i+at*r,st*r-at*i),t.lineTo(st*o+at*s,st*s-at*o),t.lineTo(st*a+at*l,st*l-at*a),t.closePath()}};function h0(t,e){let n=null,i=Br(r);t=typeof t=="function"?t:B(t||sl),e=typeof e=="function"?e:B(e===void 0?64:+e);function r(){let o;if(n||(n=o=i()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return r.type=function(o){return arguments.length?(t=typeof o=="function"?o:B(o),r):t},r.size=function(o){return arguments.length?(e=typeof o=="function"?o:B(+o),r):e},r.context=function(o){return arguments.length?(n=o??null,r):n},r}function Ft(){}function Bn(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function ai(t){this._context=t}ai.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:Bn(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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:Bn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function d0(t){return new ai(t)}function cl(t){this._context=t}cl.prototype={areaStart:Ft,areaEnd:Ft,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Bn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function p0(t){return new cl(t)}function ul(t){this._context=t}ul.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(t,e){switch(t=+t,e=+e,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+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Bn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function g0(t){return new ul(t)}function fl(t,e){this._basis=new ai(t),this._beta=e}fl.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i=t[0],r=e[0],o=t[n]-i,s=e[n]-r,a=-1,l;++a<=n;)l=a/n,this._basis.point(this._beta*t[a]+(1-this._beta)*(i+l*o),this._beta*e[a]+(1-this._beta)*(r+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const v0=function t(e){function n(i){return e===1?new ai(i):new fl(i,e)}return n.beta=function(i){return t(+i)},n}(.85);function Un(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Hr(t,e){this._context=t,this._k=(1-e)/6}Hr.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:Un(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Un(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const m0=function t(e){function n(i){return new Hr(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Wr(t,e){this._context=t,this._k=(1-e)/6}Wr.prototype={areaStart:Ft,areaEnd:Ft,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Un(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const _0=function t(e){function n(i){return new Wr(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Yr(t,e){this._context=t,this._k=(1-e)/6}Yr.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(t,e){switch(t=+t,e=+e,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:Un(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const y0=function t(e){function n(i){return new Yr(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Vr(t,e,n){var i=t._x1,r=t._y1,o=t._x2,s=t._y2;if(t._l01_a>ds){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>ds){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/f,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(i,r,o,s,t._x2,t._y2)}function hl(t,e){this._context=t,this._alpha=e}hl.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(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Vr(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const x0=function t(e){function n(i){return e?new hl(i,e):new Hr(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function dl(t,e){this._context=t,this._alpha=e}dl.prototype={areaStart:Ft,areaEnd:Ft,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(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Vr(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const b0=function t(e){function n(i){return e?new dl(i,e):new Wr(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function pl(t,e){this._context=t,this._alpha=e}pl.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(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:Vr(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const w0=function t(e){function n(i){return e?new pl(i,e):new Yr(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function gl(t){this._context=t}gl.prototype={areaStart:Ft,areaEnd:Ft,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function k0(t){return new gl(t)}function ps(t){return t<0?-1:1}function gs(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(ps(o)+ps(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function vs(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Mi(t,e,n){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,a=(o-i)/3;t._context.bezierCurveTo(i+a,r+a*e,o-a,s-a*n,o,s)}function Hn(t){this._context=t}Hn.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:Mi(this,this._t0,vs(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Mi(this,vs(this,n=gs(this,t,e)),n);break;default:Mi(this,this._t0,n=gs(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function vl(t){this._context=new ml(t)}(vl.prototype=Object.create(Hn.prototype)).point=function(t,e){Hn.prototype.point.call(this,e,t)};function ml(t){this._context=t}ml.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,o){this._context.bezierCurveTo(e,t,i,n,o,r)}};function T0(t){return new Hn(t)}function S0(t){return new vl(t)}function _l(t){this._context=t}_l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var i=ms(t),r=ms(e),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(i[0][o],r[0][o],i[1][o],r[1][o],t[s],e[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function ms(t){var e,n=t.length-1,i,r=new Array(n),o=new Array(n),s=new Array(n);for(r[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<n-1;++e)r[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(r[n-1]=2,o[n-1]=7,s[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)i=r[e]/o[e-1],o[e]-=i,s[e]-=i*s[e-1];for(r[n-1]=s[n-1]/o[n-1],e=n-2;e>=0;--e)r[e]=(s[e]-r[e+1])/o[e];for(o[n-1]=(t[n]+r[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-r[e+1];return[r,o]}function C0(t){return new _l(t)}function li(t,e){this._context=t,this._t=e}li.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function M0(t){return new li(t,.5)}function A0(t){return new li(t,0)}function $0(t){return new li(t,1)}function _s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function E0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_s(Object(n),!0).forEach(function(i){N0(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_s(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Fe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fe=function(e){return typeof e}:Fe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fe(t)}function N0(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wn(){return Wn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Wn.apply(this,arguments)}function O0(t,e){if(t){if(typeof t=="string")return ys(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ys(t,e)}}function ys(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function yl(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=O0(t))||e){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
115
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(t)},n:function(){var l=n.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function D0(t,e){var n=[],i=[];function r(o,s){if(o.length===1)n.push(o[0]),i.push(o[0]);else{for(var a=Array(o.length-1),l=0;l<a.length;l++)l===0&&n.push(o[0]),l===a.length-1&&i.push(o[l+1]),a[l]=[(1-s)*o[l][0]+s*o[l+1][0],(1-s)*o[l][1]+s*o[l+1][1]];r(a,s)}}return t.length&&r(t,e),{left:n,right:i.reverse()}}function R0(t){var e={};return t.length===4&&(e.x2=t[2][0],e.y2=t[2][1]),t.length>=3&&(e.x1=t[1][0],e.y1=t[1][1]),e.x=t[t.length-1][0],e.y=t[t.length-1][1],t.length===4?e.type="C":t.length===3?e.type="Q":e.type="L",e}function F0(t,e){e=e||2;for(var n=[],i=t,r=1/e,o=0;o<e-1;o++){var s=r/(1-r*o),a=D0(i,s);n.push(a.left),i=a.right}return n.push(i),n}function P0(t,e,n){var i=[[t.x,t.y]];return e.x1!=null&&i.push([e.x1,e.y1]),e.x2!=null&&i.push([e.x2,e.y2]),i.push([e.x,e.y]),F0(i,n).map(R0)}var z0=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,ae={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};Object.keys(ae).forEach(function(t){ae[t.toLowerCase()]=ae[t]});function Ji(t,e){for(var n=Array(t),i=0;i<t;i++)n[i]=e;return n}function L0(t){return"".concat(t.type).concat(ae[t.type].map(function(e){return t[e]}).join(","))}function I0(t,e){var n={x1:"x",y1:"y",x2:"x",y2:"y"},i=["xAxisRotation","largeArcFlag","sweepFlag"];if(t.type!==e.type&&e.type.toUpperCase()!=="M"){var r={};Object.keys(e).forEach(function(o){var s=e[o],a=t[o];a===void 0&&(i.includes(o)?a=s:(a===void 0&&n[o]&&(a=t[n[o]]),a===void 0&&(a=0))),r[o]=a}),r.type=e.type,t=r}return t}function B0(t,e,n){var i=[];if(e.type==="L"||e.type==="Q"||e.type==="C")i=i.concat(P0(t,e,n));else{var r=Wn({},t);r.type==="M"&&(r.type="L"),i=i.concat(Ji(n-1).map(function(){return r})),i.push(e)}return i}function xs(t,e,n){var i=t.length-1,r=e.length-1,o=i/r,s=Ji(r).reduce(function(l,c,f){var u=Math.floor(o*f);if(n&&u<t.length-1&&n(t[u],t[u+1])){var h=o*f%1<.5;l[u]&&(h?u>0?u-=1:u<t.length-1&&(u+=1):u<t.length-1?u+=1:u>0&&(u-=1))}return l[u]=(l[u]||0)+1,l},[]),a=s.reduce(function(l,c,f){if(f===t.length-1){var u=Ji(c,Wn({},t[t.length-1]));return u[0].type==="M"&&u.forEach(function(h){h.type="L"}),l.concat(u)}return l.concat(B0(t[f],t[f+1],c))},[]);return a.unshift(t[0]),a}function bs(t){for(var e=(t||"").match(z0)||[],n=[],i,r,o=0;o<e.length;++o)if(i=ae[e[o]],i){r={type:e[o]};for(var s=0;s<i.length;++s)r[i[s]]=+e[o+s+1];o+=i.length,n.push(r)}return n}function U0(t,e,n){var i=t==null?[]:t.slice(),r=e==null?[]:e.slice(),o=Fe(n)==="object"?n:{excludeSegment:n,snapEndsToInput:!0},s=o.excludeSegment,a=o.snapEndsToInput;if(!i.length&&!r.length)return function(){return[]};var l=(i.length===0||i[i.length-1].type==="Z")&&(r.length===0||r[r.length-1].type==="Z");i.length>0&&i[i.length-1].type==="Z"&&i.pop(),r.length>0&&r[r.length-1].type==="Z"&&r.pop(),i.length?r.length||r.push(i[0]):i.push(r[0]);var c=Math.abs(r.length-i.length);c!==0&&(r.length>i.length?i=xs(i,r,s):r.length<i.length&&(r=xs(r,i,s))),i=i.map(function(u,h){return I0(u,r[h])});var f=i.map(function(u){return E0({},u)});return l&&(f.push({type:"Z"}),i.push({type:"Z"})),function(h){if(h===1&&a)return e??[];if(h===0)return i;for(var d=0;d<f.length;++d){var g=i[d],p=r[d],v=f[d],_=yl(ae[v.type]),x;try{for(_.s();!(x=_.n()).done;){var y=x.value;v[y]=(1-h)*g[y]+h*p[y],(y==="largeArcFlag"||y==="sweepFlag")&&(v[y]=Math.round(v[y]))}}catch(T){_.e(T)}finally{_.f()}}return f}}function xl(t,e,n){var i=bs(t),r=bs(e),o=Fe(n)==="object"?n:{excludeSegment:n,snapEndsToInput:!0},s=o.excludeSegment,a=o.snapEndsToInput;if(!i.length&&!r.length)return function(){return""};var l=U0(i,r,{excludeSegment:s,snapEndsToInput:a});return function(f){if(f===1&&a)return e??"";var u=l(f),h="",d=yl(u),g;try{for(d.s();!(g=d.n()).done;){var p=g.value;h+=L0(p)}}catch(v){d.e(v)}finally{d.f()}return h}}function le(t,e,n,i){return Array.isArray(e)&&isFinite(n)?e[n%e.length]:Gn(t,e,n)||(Bt(n)?`var(${Ot(n)})`:null)}var I;(function(t){t.Basis="basis",t.BasisClosed="basisClosed",t.BasisOpen="basisOpen",t.Bundle="bundle",t.Cardinal="cardinal",t.CardinalClosed="cardinalClosed",t.CardinalOpen="cardinalOpen",t.CatmullRom="catmullRom",t.CatmullRomClosed="catmullRomClosed",t.CatmullRomOpen="catmullRomOpen",t.Linear="linear",t.LinearClosed="linearClosed",t.MonotoneX="monotoneX",t.MonotoneY="monotoneY",t.Natural="natural",t.Step="step",t.StepAfter="stepAfter",t.StepBefore="stepBefore"})(I||(I={}));const Ki={[I.Basis]:d0,[I.BasisClosed]:p0,[I.BasisOpen]:g0,[I.Bundle]:v0,[I.Cardinal]:m0,[I.CardinalClosed]:_0,[I.CardinalOpen]:y0,[I.CatmullRom]:x0,[I.CatmullRomClosed]:b0,[I.CatmullRomOpen]:w0,[I.Linear]:Ur,[I.LinearClosed]:k0,[I.MonotoneX]:T0,[I.MonotoneY]:S0,[I.Natural]:C0,[I.Step]:M0,[I.StepAfter]:$0,[I.StepBefore]:A0},H0=Object.assign(Object.assign({},ri),{curveType:I.MonotoneX,lineWidth:2,lineDashArray:void 0,fallbackValue:void 0,highlightOnHover:!1,cursor:null,interpolateMissingData:!1}),W0=_e`
114
+ `,i0=Object.freeze(Object.defineProperty({__proto__:null,hidden:Qi,nonInteractive:Ja,positionFixed:Qa,root:li,show:Zi,tooltip:e0,variables:n0},Symbol.toStringTag,{value:"Module"}));class Ka{constructor(e={}){this._defaultConfig=t0,this.config=this._defaultConfig,this._setUpEventsThrottled=Mn(this._setUpEvents,500),this._setContainerPositionThrottled=Mn(this._setContainerPosition,500),this._isShown=!1,this.element=document.createElement("div"),this.div=Z(this.element).attr("class",li),this.setConfig(e),this.components=this.config.components,this._mutationObserver=new MutationObserver(()=>{this._isShown&&(!this.config.followCursor&&this._hoveredElement?this.placeByElement(this._hoveredElement):this._position&&this.place({x:this._position[0],y:this._position[1]}))}),this._mutationObserver.observe(this.div.node(),{childList:!0,subtree:!0})}setConfig(e){var n;this.prevConfig=this.config,this.config=Zt(this._defaultConfig,e),this.prevConfig.horizontalPlacement!==this.config.horizontalPlacement&&this.overrideHorizontalPlacement(void 0),this.config.container&&this.config.container!==((n=this.prevConfig)===null||n===void 0?void 0:n.container)&&this.setContainer(this.config.container),this._setUpAttributes()}setContainer(e){var n;(n=this.element.parentNode)===null||n===void 0||n.removeChild(this.element),this._container=e,this._container.appendChild(this.element),this._setContainerPositionThrottled()}getContainer(){return this._container}hasContainer(){return!!this._container&&this._container.isConnected}setComponents(e){this.components=e}update(){this._container&&this._setUpEventsThrottled()}show(e,n){this.render(e),this.place(n)}hide(){this.div.classed(Zi,!1).on("transitionend",()=>{this.div.classed(Qi,!this._isShown)}),this._isShown=!1}display(){this.div.classed(Qi,!1).classed(Zi,!0),this._isShown=!0}place(e){if(this._position=[e.x,e.y],!this.hasContainer()){console.warn("Unovis | Tooltip: Container was not set or is not initialized yet");return}const{config:n}=this,i=this.element.offsetWidth,r=this.element.offsetHeight,o=this._overriddenHorizontalPlacement||(n.horizontalPlacement===C.Auto?C.Center:n.horizontalPlacement),s=n.verticalPlacement===C.Auto?e.y-r<0?C.Bottom:C.Top:n.verticalPlacement,a=5,l=o===C.Left?-i-a-n.horizontalShift:o===C.Center?-i/2:a+n.horizontalShift,c=s===C.Bottom?a+n.verticalShift:s===C.Center?-r/2:-5-n.verticalShift-r,[h,u]=this._constraintPosToContainer(e.x+l,e.y+c,i,r);this._applyPosition(h,u,r)}placeByElement(e){const{config:n}=this;this._hoveredElement=e;const i=5,r=this.element.offsetWidth,o=this.element.offsetHeight,s=this.isContainerBody(),a=s?window.innerWidth:this._container.scrollWidth,l=e.getBoundingClientRect(),c=s?[l.x,l.y]:kn({clientX:l.x,clientY:l.y,pageX:l.x,pageY:l.y},this._container),h=this._overriddenHorizontalPlacement||(n.horizontalPlacement===C.Auto?c[0]-r<0?C.Right:c[0]+r>a?C.Left:C.Center:n.horizontalPlacement);let u=0;switch(h){case C.Left:u=-r-i-n.horizontalShift;break;case C.Right:u=l.width+i+n.horizontalShift;break;case C.Center:default:u=(-r+l.width)/2;break}const f=n.verticalPlacement===C.Auto?h!==C.Center?C.Center:c[1]-o<0?C.Bottom:C.Top:n.verticalPlacement;let d=-o;switch(f){case C.Center:d+=(o+l.height)/2;break;case C.Bottom:d+=o+l.height+i+n.verticalShift;break;case C.Top:default:d+=-5-n.verticalShift;break}const[g,p]=this._constraintPosToContainer(c[0]+u,c[1]+d,r,o);this._applyPosition(g,p,o)}isContainerBody(){return this._container===document.body}overrideHorizontalPlacement(e){this._overriddenHorizontalPlacement=e}render(e){var n;const{config:i,prevConfig:r}=this;e instanceof HTMLElement?this.div.select(":first-child").node()!==e&&this.div.html("").append(()=>e):e&&this.div.html(e),this.div.classed((n=i.className)!==null&&n!==void 0?n:"",!!i.className).classed(Ja,!i.allowHover||i.followCursor),r!=null&&r.className&&r.className!==i.className&&this.div.classed(r.className,!1),this.display()}_applyPosition(e,n,i){const r=this.isContainerBody(),o=r?window.innerHeight:this._container.scrollHeight;this.div.classed(Qa,r).style("top",r?`${n}px`:"unset").style("bottom",r?"unset":`${o-n-i}px`).style("left",`${e}px`)}_constraintPosToContainer(e,n,i,r){const o=this.isContainerBody(),s=o?window.innerHeight:this._container.scrollHeight,a=o?window.innerWidth:this._container.scrollWidth,l=10,c=e>a-i-l,h=e<l,u=c?a-i-l:h?l:e,f=10,d=n>s-r-f,g=n<f,p=d?s-r-f:g?f:n;return[a<i?0:u,s<r?0:p]}_setContainerPosition(){var e;this._container!==document.body&&((e=getComputedStyle(this._container))===null||e===void 0?void 0:e.position)==="static"&&(this._container.style.position="relative")}_setUpEvents(){const{config:e}=this;this.components.forEach(n=>{const i=Z(n.element);i.on("mousemove.tooltip",r=>{const o=r.composedPath&&r.composedPath()||r.path||[r.target];for(const s of Object.keys(e.triggers)){const a=e.triggers[s];if(!a)continue;const l=i.selectAll(`.${s}`).nodes();for(const c of o){if(c===i.node())break;if(c.classList.contains(s)){const h=l.indexOf(c),u=Z(c).datum(),f=a(u,h,l),[d,g]=this.isContainerBody()?[r.clientX,r.clientY]:kn(r,this._container);f===null?this.hide():(this.render(f),e.followCursor?this.place({x:d,y:g}):this.placeByElement(c)),r.stopPropagation();return}}}this._isShown&&this.hide()}).on("mouseleave.tooltip",r=>{r.stopPropagation(),this.hide()})}),e.allowHover&&!e.followCursor?this.div.on("mouseenter.tooltip",this.display.bind(this)).on("mouseleave.tooltip",this.hide.bind(this)):this.div.on("mouseenter.tooltip",null).on("mouseleave.tooltip",null)}_setUpAttributes(){const e=this.config.attributes;e&&Object.keys(e).forEach(n=>{this.div.attr(n,e[n])})}destroy(){var e;this._mutationObserver.disconnect(),(e=this.div)===null||e===void 0||e.remove()}}Ka.selectors=i0;function I(t){return function(){return t}}const tl=Math.cos,In=Math.sin,vt=Math.sqrt,gs=1e-12,Un=Math.PI,ci=2*Un,Ji=Math.PI,Ki=2*Ji,It=1e-6,r0=Ki-It;function el(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function o0(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return el;const n=10**e;return function(i){this._+=i[0];for(let r=1,o=i.length;r<o;++r)this._+=Math.round(arguments[r]*n)/n+i[r]}}class s0{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?el:o0(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,i,r){this._append`Q${+e},${+n},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(e,n,i,r,o,s){this._append`C${+e},${+n},${+i},${+r},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,i,r,o){if(e=+e,n=+n,i=+i,r=+r,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=i-e,c=r-n,h=s-e,u=a-n,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>It)if(!(Math.abs(u*l-c*h)>It)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let d=i-s,g=r-a,p=l*l+c*c,v=d*d+g*g,_=Math.sqrt(p),x=Math.sqrt(f),y=o*Math.tan((Ji-Math.acos((p+f-v)/(2*_*x)))/2),T=y/x,k=y/_;Math.abs(T-1)>It&&this._append`L${e+T*h},${n+T*u}`,this._append`A${o},${o},0,0,${+(u*d>h*g)},${this._x1=e+k*l},${this._y1=n+k*c}`}}arc(e,n,i,r,o,s){if(e=+e,n=+n,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(r),l=i*Math.sin(r),c=e+a,h=n+l,u=1^s,f=s?r-o:o-r;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>It||Math.abs(this._y1-h)>It)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Ki+Ki),f>r0?this._append`A${i},${i},0,1,${u},${e-a},${n-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>It&&this._append`A${i},${i},0,${+(f>=Ji)},${u},${this._x1=e+i*Math.cos(o)},${this._y1=n+i*Math.sin(o)}`)}rect(e,n,i,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function Hr(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);e=i}return t},()=>new s0(e)}function nl(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function il(t){this._context=t}il.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Wr(t){return new il(t)}function rl(t){return t[0]}function ol(t){return t[1]}function sl(t,e){var n=I(!0),i=null,r=Wr,o=null,s=Hr(a);t=typeof t=="function"?t:t===void 0?rl:I(t),e=typeof e=="function"?e:e===void 0?ol:I(e);function a(l){var c,h=(l=nl(l)).length,u,f=!1,d;for(i==null&&(o=r(d=s())),c=0;c<=h;++c)!(c<h&&n(u=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,c,l),+e(u,c,l));if(d)return o=null,d+""||null}return a.x=function(l){return arguments.length?(t=typeof l=="function"?l:I(+l),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:I(+l),a):e},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:I(!!l),a):n},a.curve=function(l){return arguments.length?(r=l,i!=null&&(o=r(i)),a):r},a.context=function(l){return arguments.length?(l==null?i=o=null:o=r(i=l),a):i},a}function a0(t,e,n){var i=null,r=I(!0),o=null,s=Wr,a=null,l=Hr(c);t=typeof t=="function"?t:t===void 0?rl:I(+t),e=typeof e=="function"?e:I(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?ol:I(+n);function c(u){var f,d,g,p=(u=nl(u)).length,v,_=!1,x,y=new Array(p),T=new Array(p);for(o==null&&(a=s(x=l())),f=0;f<=p;++f){if(!(f<p&&r(v=u[f],f,u))===_)if(_=!_)d=f,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),g=f-1;g>=d;--g)a.point(y[g],T[g]);a.lineEnd(),a.areaEnd()}_&&(y[f]=+t(v,f,u),T[f]=+e(v,f,u),a.point(i?+i(v,f,u):y[f],n?+n(v,f,u):T[f]))}if(x)return a=null,x+""||null}function h(){return sl().defined(r).curve(s).context(o)}return c.x=function(u){return arguments.length?(t=typeof u=="function"?u:I(+u),i=null,c):t},c.x0=function(u){return arguments.length?(t=typeof u=="function"?u:I(+u),c):t},c.x1=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:I(+u),c):i},c.y=function(u){return arguments.length?(e=typeof u=="function"?u:I(+u),n=null,c):e},c.y0=function(u){return arguments.length?(e=typeof u=="function"?u:I(+u),c):e},c.y1=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:I(+u),c):n},c.lineX0=c.lineY0=function(){return h().x(t).y(e)},c.lineY1=function(){return h().x(t).y(n)},c.lineX1=function(){return h().x(i).y(e)},c.defined=function(u){return arguments.length?(r=typeof u=="function"?u:I(!!u),c):r},c.curve=function(u){return arguments.length?(s=u,o!=null&&(a=s(o)),c):s},c.context=function(u){return arguments.length?(u==null?o=a=null:a=s(o=u),c):o},c}const al={draw(t,e){const n=vt(e/Un);t.moveTo(n,0),t.arc(0,0,n,0,ci)}},l0={draw(t,e){const n=vt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},ll=vt(1/3),c0=ll*2,u0={draw(t,e){const n=vt(e/c0),i=n*ll;t.moveTo(0,-n),t.lineTo(i,0),t.lineTo(0,n),t.lineTo(-i,0),t.closePath()}},h0={draw(t,e){const n=vt(e),i=-n/2;t.rect(i,i,n,n)}},f0=.8908130915292852,cl=In(Un/10)/In(7*Un/10),d0=In(ci/10)*cl,p0=-tl(ci/10)*cl,g0={draw(t,e){const n=vt(e*f0),i=d0*n,r=p0*n;t.moveTo(0,-n),t.lineTo(i,r);for(let o=1;o<5;++o){const s=ci*o/5,a=tl(s),l=In(s);t.lineTo(l*n,-a*n),t.lineTo(a*i-l*r,l*i+a*r)}t.closePath()}},$i=vt(3),m0={draw(t,e){const n=-vt(e/($i*3));t.moveTo(0,n*2),t.lineTo(-$i*n,-n),t.lineTo($i*n,-n),t.closePath()}},at=-.5,lt=vt(3)/2,tr=1/vt(12),v0=(tr/2+1)*3,_0={draw(t,e){const n=vt(e/v0),i=n/2,r=n*tr,o=i,s=n*tr+n,a=-o,l=s;t.moveTo(i,r),t.lineTo(o,s),t.lineTo(a,l),t.lineTo(at*i-lt*r,lt*i+at*r),t.lineTo(at*o-lt*s,lt*o+at*s),t.lineTo(at*a-lt*l,lt*a+at*l),t.lineTo(at*i+lt*r,at*r-lt*i),t.lineTo(at*o+lt*s,at*s-lt*o),t.lineTo(at*a+lt*l,at*l-lt*a),t.closePath()}};function y0(t,e){let n=null,i=Hr(r);t=typeof t=="function"?t:I(t||al),e=typeof e=="function"?e:I(e===void 0?64:+e);function r(){let o;if(n||(n=o=i()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return r.type=function(o){return arguments.length?(t=typeof o=="function"?o:I(o),r):t},r.size=function(o){return arguments.length?(e=typeof o=="function"?o:I(+o),r):e},r.context=function(o){return arguments.length?(n=o??null,r):n},r}function Bt(){}function Hn(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function ui(t){this._context=t}ui.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:Hn(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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:Hn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function x0(t){return new ui(t)}function ul(t){this._context=t}ul.prototype={areaStart:Bt,areaEnd:Bt,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Hn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function b0(t){return new ul(t)}function hl(t){this._context=t}hl.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(t,e){switch(t=+t,e=+e,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+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Hn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function w0(t){return new hl(t)}function fl(t,e){this._basis=new ui(t),this._beta=e}fl.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i=t[0],r=e[0],o=t[n]-i,s=e[n]-r,a=-1,l;++a<=n;)l=a/n,this._basis.point(this._beta*t[a]+(1-this._beta)*(i+l*o),this._beta*e[a]+(1-this._beta)*(r+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const k0=function t(e){function n(i){return e===1?new ui(i):new fl(i,e)}return n.beta=function(i){return t(+i)},n}(.85);function Wn(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Vr(t,e){this._context=t,this._k=(1-e)/6}Vr.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:Wn(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Wn(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const T0=function t(e){function n(i){return new Vr(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Yr(t,e){this._context=t,this._k=(1-e)/6}Yr.prototype={areaStart:Bt,areaEnd:Bt,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Wn(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const S0=function t(e){function n(i){return new Yr(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Xr(t,e){this._context=t,this._k=(1-e)/6}Xr.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(t,e){switch(t=+t,e=+e,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:Wn(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const C0=function t(e){function n(i){return new Xr(i,e)}return n.tension=function(i){return t(+i)},n}(0);function qr(t,e,n){var i=t._x1,r=t._y1,o=t._x2,s=t._y2;if(t._l01_a>gs){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>gs){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(i,r,o,s,t._x2,t._y2)}function dl(t,e){this._context=t,this._alpha=e}dl.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(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:qr(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const M0=function t(e){function n(i){return e?new dl(i,e):new Vr(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function pl(t,e){this._context=t,this._alpha=e}pl.prototype={areaStart:Bt,areaEnd:Bt,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(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:qr(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const A0=function t(e){function n(i){return e?new pl(i,e):new Yr(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function gl(t,e){this._context=t,this._alpha=e}gl.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(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:qr(this,t,e);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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $0=function t(e){function n(i){return e?new gl(i,e):new Xr(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function ml(t){this._context=t}ml.prototype={areaStart:Bt,areaEnd:Bt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function E0(t){return new ml(t)}function ms(t){return t<0?-1:1}function vs(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(ms(o)+ms(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function _s(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ei(t,e,n){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,a=(o-i)/3;t._context.bezierCurveTo(i+a,r+a*e,o-a,s-a*n,o,s)}function Vn(t){this._context=t}Vn.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:Ei(this,this._t0,_s(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ei(this,_s(this,n=vs(this,t,e)),n);break;default:Ei(this,this._t0,n=vs(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function vl(t){this._context=new _l(t)}(vl.prototype=Object.create(Vn.prototype)).point=function(t,e){Vn.prototype.point.call(this,e,t)};function _l(t){this._context=t}_l.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,o){this._context.bezierCurveTo(e,t,i,n,o,r)}};function N0(t){return new Vn(t)}function O0(t){return new vl(t)}function yl(t){this._context=t}yl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var i=ys(t),r=ys(e),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(i[0][o],r[0][o],i[1][o],r[1][o],t[s],e[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function ys(t){var e,n=t.length-1,i,r=new Array(n),o=new Array(n),s=new Array(n);for(r[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<n-1;++e)r[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(r[n-1]=2,o[n-1]=7,s[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)i=r[e]/o[e-1],o[e]-=i,s[e]-=i*s[e-1];for(r[n-1]=s[n-1]/o[n-1],e=n-2;e>=0;--e)r[e]=(s[e]-r[e+1])/o[e];for(o[n-1]=(t[n]+r[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-r[e+1];return[r,o]}function D0(t){return new yl(t)}function hi(t,e){this._context=t,this._t=e}hi.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function R0(t){return new hi(t,.5)}function F0(t){return new hi(t,0)}function P0(t){return new hi(t,1)}function xs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function z0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xs(Object(n),!0).forEach(function(i){B0(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xs(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Pe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pe=function(e){return typeof e}:Pe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(t)}function B0(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yn(){return Yn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Yn.apply(this,arguments)}function L0(t,e){if(t){if(typeof t=="string")return bs(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bs(t,e)}}function bs(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function xl(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=L0(t))||e){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
115
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(t)},n:function(){var l=n.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function I0(t,e){var n=[],i=[];function r(o,s){if(o.length===1)n.push(o[0]),i.push(o[0]);else{for(var a=Array(o.length-1),l=0;l<a.length;l++)l===0&&n.push(o[0]),l===a.length-1&&i.push(o[l+1]),a[l]=[(1-s)*o[l][0]+s*o[l+1][0],(1-s)*o[l][1]+s*o[l+1][1]];r(a,s)}}return t.length&&r(t,e),{left:n,right:i.reverse()}}function U0(t){var e={};return t.length===4&&(e.x2=t[2][0],e.y2=t[2][1]),t.length>=3&&(e.x1=t[1][0],e.y1=t[1][1]),e.x=t[t.length-1][0],e.y=t[t.length-1][1],t.length===4?e.type="C":t.length===3?e.type="Q":e.type="L",e}function H0(t,e){e=e||2;for(var n=[],i=t,r=1/e,o=0;o<e-1;o++){var s=r/(1-r*o),a=I0(i,s);n.push(a.left),i=a.right}return n.push(i),n}function W0(t,e,n){var i=[[t.x,t.y]];return e.x1!=null&&i.push([e.x1,e.y1]),e.x2!=null&&i.push([e.x2,e.y2]),i.push([e.x,e.y]),H0(i,n).map(U0)}var V0=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,he={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};Object.keys(he).forEach(function(t){he[t.toLowerCase()]=he[t]});function er(t,e){for(var n=Array(t),i=0;i<t;i++)n[i]=e;return n}function Y0(t){return"".concat(t.type).concat(he[t.type].map(function(e){return t[e]}).join(","))}function X0(t,e){var n={x1:"x",y1:"y",x2:"x",y2:"y"},i=["xAxisRotation","largeArcFlag","sweepFlag"];if(t.type!==e.type&&e.type.toUpperCase()!=="M"){var r={};Object.keys(e).forEach(function(o){var s=e[o],a=t[o];a===void 0&&(i.includes(o)?a=s:(a===void 0&&n[o]&&(a=t[n[o]]),a===void 0&&(a=0))),r[o]=a}),r.type=e.type,t=r}return t}function q0(t,e,n){var i=[];if(e.type==="L"||e.type==="Q"||e.type==="C")i=i.concat(W0(t,e,n));else{var r=Yn({},t);r.type==="M"&&(r.type="L"),i=i.concat(er(n-1).map(function(){return r})),i.push(e)}return i}function ws(t,e,n){var i=t.length-1,r=e.length-1,o=i/r,s=er(r).reduce(function(l,c,h){var u=Math.floor(o*h);if(n&&u<t.length-1&&n(t[u],t[u+1])){var f=o*h%1<.5;l[u]&&(f?u>0?u-=1:u<t.length-1&&(u+=1):u<t.length-1?u+=1:u>0&&(u-=1))}return l[u]=(l[u]||0)+1,l},[]),a=s.reduce(function(l,c,h){if(h===t.length-1){var u=er(c,Yn({},t[t.length-1]));return u[0].type==="M"&&u.forEach(function(f){f.type="L"}),l.concat(u)}return l.concat(q0(t[h],t[h+1],c))},[]);return a.unshift(t[0]),a}function ks(t){for(var e=(t||"").match(V0)||[],n=[],i,r,o=0;o<e.length;++o)if(i=he[e[o]],i){r={type:e[o]};for(var s=0;s<i.length;++s)r[i[s]]=+e[o+s+1];o+=i.length,n.push(r)}return n}function G0(t,e,n){var i=t==null?[]:t.slice(),r=e==null?[]:e.slice(),o=Pe(n)==="object"?n:{excludeSegment:n,snapEndsToInput:!0},s=o.excludeSegment,a=o.snapEndsToInput;if(!i.length&&!r.length)return function(){return[]};var l=(i.length===0||i[i.length-1].type==="Z")&&(r.length===0||r[r.length-1].type==="Z");i.length>0&&i[i.length-1].type==="Z"&&i.pop(),r.length>0&&r[r.length-1].type==="Z"&&r.pop(),i.length?r.length||r.push(i[0]):i.push(r[0]);var c=Math.abs(r.length-i.length);c!==0&&(r.length>i.length?i=ws(i,r,s):r.length<i.length&&(r=ws(r,i,s))),i=i.map(function(u,f){return X0(u,r[f])});var h=i.map(function(u){return z0({},u)});return l&&(h.push({type:"Z"}),i.push({type:"Z"})),function(f){if(f===1&&a)return e??[];if(f===0)return i;for(var d=0;d<h.length;++d){var g=i[d],p=r[d],v=h[d],_=xl(he[v.type]),x;try{for(_.s();!(x=_.n()).done;){var y=x.value;v[y]=(1-f)*g[y]+f*p[y],(y==="largeArcFlag"||y==="sweepFlag")&&(v[y]=Math.round(v[y]))}}catch(T){_.e(T)}finally{_.f()}}return h}}function bl(t,e,n){var i=ks(t),r=ks(e),o=Pe(n)==="object"?n:{excludeSegment:n,snapEndsToInput:!0},s=o.excludeSegment,a=o.snapEndsToInput;if(!i.length&&!r.length)return function(){return""};var l=G0(i,r,{excludeSegment:s,snapEndsToInput:a});return function(h){if(h===1&&a)return e??"";var u=l(h),f="",d=xl(u),g;try{for(d.s();!(g=d.n()).done;){var p=g.value;f+=Y0(p)}}catch(v){d.e(v)}finally{d.f()}return f}}function bt(t,e,n,i){return Array.isArray(e)&&isFinite(n)?e[n%e.length]:Qn(t,e,n)||(wt(n)?`var(${Rt(n)})`:null)}var L;(function(t){t.Basis="basis",t.BasisClosed="basisClosed",t.BasisOpen="basisOpen",t.Bundle="bundle",t.Cardinal="cardinal",t.CardinalClosed="cardinalClosed",t.CardinalOpen="cardinalOpen",t.CatmullRom="catmullRom",t.CatmullRomClosed="catmullRomClosed",t.CatmullRomOpen="catmullRomOpen",t.Linear="linear",t.LinearClosed="linearClosed",t.MonotoneX="monotoneX",t.MonotoneY="monotoneY",t.Natural="natural",t.Step="step",t.StepAfter="stepAfter",t.StepBefore="stepBefore"})(L||(L={}));const nr={[L.Basis]:x0,[L.BasisClosed]:b0,[L.BasisOpen]:w0,[L.Bundle]:k0,[L.Cardinal]:T0,[L.CardinalClosed]:S0,[L.CardinalOpen]:C0,[L.CatmullRom]:M0,[L.CatmullRomClosed]:A0,[L.CatmullRomOpen]:$0,[L.Linear]:Wr,[L.LinearClosed]:E0,[L.MonotoneX]:N0,[L.MonotoneY]:O0,[L.Natural]:D0,[L.Step]:R0,[L.StepAfter]:P0,[L.StepBefore]:F0},j0=Object.assign(Object.assign({},Je),{curveType:L.MonotoneX,lineWidth:2,lineDashArray:void 0,fallbackValue:void 0,highlightOnHover:!1,cursor:null,interpolateMissingData:!1}),Z0=Kt`
116
116
  :root {
117
117
  --vis-line-cursor: default;
118
118
  --vis-line-stroke-dasharray: none;
@@ -122,35 +122,35 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
122
122
  --vis-line-gapfill-stroke-opacity: 0.8;
123
123
  --vis-line-gapfill-stroke-dashoffset: 0;
124
124
  }
125
- `,Y0=P`
125
+ `,Q0=O`
126
126
  label: line-component;
127
- `,Ee=P`
127
+ `,Ne=O`
128
128
  label: line;
129
129
  transition: opacity 200ms;
130
130
  cursor: var(--vis-line-cursor);
131
- `,tr=P`
131
+ `,ir=O`
132
132
  label: linePath;
133
133
  fill: none;
134
134
  stroke-dasharray: var(--vis-line-stroke-dasharray);
135
135
  stroke-dashoffset: var(--vis-line-stroke-dashoffset);
136
- `,er=P`
136
+ `,rr=O`
137
137
  label: lineSelectionHelper;
138
138
  fill: none;
139
139
  stroke: rgba(0, 0, 0, 0);
140
140
  stroke-width: 8px;
141
- `,nr=P`
141
+ `,or=O`
142
142
  opacity: 0.2;
143
- `,ir=P`
143
+ `,sr=O`
144
144
  label: interpolated-path;
145
145
  fill: none;
146
146
  stroke-dasharray: var(--vis-line-gapfill-stroke-dasharray);
147
147
  stroke-dashoffset: var(--vis-line-gapfill-stroke-dashoffset);
148
148
  stroke-opacity: var(--vis-line-gapfill-stroke-opacity);
149
- `,V0=Object.freeze(Object.defineProperty({__proto__:null,dim:nr,globalStyles:W0,interpolatedPath:ir,line:Ee,linePath:tr,lineSelectionHelper:er,root:Y0},Symbol.toStringTag,{value:"Module"}));class ci extends Ir{constructor(e){super(),this._defaultConfig=H0,this.config=this._defaultConfig,this.curve=Ki[I.MonotoneX],this.events={[ci.selectors.line]:{mouseover:this._highlight.bind(this),mouseleave:this._resetHighlight.bind(this)}},e&&this.setConfig(e)}get bleed(){const{config:{lineWidth:e}}=this,n=this.yScale.domain(),r=(this.yScale.range()[0]>this.yScale.range()[1]?Yt.North:Yt.South)===Yt.South,o=e>3,s=e>=10;return{top:!s&&(!r&&n[1]===0||r&&n[0]===0)?0:e/2,bottom:!s&&(!r&&n[0]===0||r&&n[1]===0)?0:e/2,left:o?e/2:0,right:o?e/2:0}}_render(e){super._render(e);const{config:n,datamodel:{data:i}}=this,r=Bt(e)?e:n.duration;this.curve=Ki[n.curveType],this.lineGen=ol().x(u=>u.x).y(u=>u.y).defined(u=>u.defined).curve(this.curve);const o=fe(n.y)?n.y:[n.y],s=i.map((u,h)=>this.xScale(dt(u,n.x,h))),a=o.map(u=>{const h=i.map((_,x)=>{const y=dt(_,u,x),T=(Bt(y)||y===null)&&isFinite(y)?y:n.fallbackValue,k=n.interpolateMissingData?(Bt(y)||y===null)&&isFinite(y):isFinite(T);return{x:s[x],y:this.yScale(T??0),defined:k,value:T}}),d=h.reduce((_,x)=>x.defined||_,!1);let g=!1;const p=h.reduce((_,x,y)=>{!x.defined&&isFinite(n.fallbackValue)&&_.push(Object.assign(Object.assign({},x),{defined:!0})),!x.defined&&!g&&(g=!0);const T=y>0&&!h[y-1].defined||y<h.length-1&&!h[y+1].defined;return x.defined&&T&&(g||_.push(Object.assign(Object.assign({},x),{defined:!1})),_.push(x),g=!1),_},[]),v=d&&h.some(_=>_.value!==null);return{values:h,defined:d,gaps:p,visible:v}}),l=this.g.selectAll(`.${Ee}`).data(a),c=l.enter().append("g").attr("class",Ee);c.append("path").attr("class",tr).attr("stroke",(u,h)=>le(i,n.color,h)).attr("stroke-opacity",0).attr("stroke-width",n.lineWidth),c.append("path").attr("class",er).attr("d",this._emptyPath()),c.append("path").attr("class",ir).attr("d",this._emptyPath()).style("opacity",0);const f=c.merge(l);f.style("cursor",(u,h)=>Gn(i,n.cursor,h)),f.each((u,h,d)=>{var g;const p=j(d[h]),v=p.select(`.${tr}`),_=p.select(`.${er}`),x=p.select(`.${ir}`),y=u.visible,T=hr(i,n.lineDashArray,h),k=Tt(v,r).attr("stroke",le(i,n.color,h)).attr("stroke-width",n.lineWidth).attr("stroke-opacity",y?1:0).style("stroke-dasharray",(g=T==null?void 0:T.join(" "))!==null&&g!==void 0?g:null),w=u.values.some(L=>!L.defined),S=this.lineGen(u.values);if(r&&!w){const L=v.attr("d")||this._emptyPath(),R=S||this._emptyPath();k.attrTween("d",()=>xl(L,R))}else u.visible&&k.attr("d",S);_.attr("d",S).attr("visibility",y?null:"hidden"),w&&n.interpolateMissingData?Tt(x,r).attr("d",this.lineGen(u.gaps)).attr("stroke",le(i,n.color,h)).attr("stroke-width",n.lineWidth-1).style("opacity",1):x.transition().duration(r).style("opacity",0)}),Tt(l.exit(),r).style("opacity",0).remove()}_emptyPath(){const e=this.xScale.range(),n=this.yScale.range();return`M${e[0]},${n[0]} L${e[1]},${n[0]}`}_highlight(e){const{config:n}=this;n.highlightOnHover&&this.g.selectAll(`.${Ee}`).classed(nr,i=>i!==e)}_resetHighlight(){const{config:e}=this;e.highlightOnHover&&this.g.selectAll(`.${Ee}`).classed(nr,!1)}}ci.selectors=V0;function X0(t){return t}var gn=1,vn=2,rr=3,Ne=4,ws=1e-6;function q0(t){return"translate("+t+",0)"}function G0(t){return"translate(0,"+t+")"}function j0(t){return e=>+t(e)}function Z0(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Q0(){return!this.__axis}function ui(t,e){var n=[],i=null,r=null,o=6,s=6,a=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===gn||t===Ne?-1:1,f=t===Ne||t===vn?"x":"y",u=t===gn||t===rr?q0:G0;function h(d){var g=i??(e.ticks?e.ticks.apply(e,n):e.domain()),p=r??(e.tickFormat?e.tickFormat.apply(e,n):X0),v=Math.max(o,0)+a,_=e.range(),x=+_[0]+l,y=+_[_.length-1]+l,T=(e.bandwidth?Z0:j0)(e.copy(),l),k=d.selection?d.selection():d,w=k.selectAll(".domain").data([null]),S=k.selectAll(".tick").data(g,e).order(),L=S.exit(),R=S.enter().append("g").attr("class","tick"),tt=S.select("line"),A=S.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(R),tt=tt.merge(R.append("line").attr("stroke","currentColor").attr(f+"2",c*o)),A=A.merge(R.append("text").attr("fill","currentColor").attr(f,c*v).attr("dy",t===gn?"0em":t===rr?"0.71em":"0.32em")),d!==k&&(w=w.transition(d),S=S.transition(d),tt=tt.transition(d),A=A.transition(d),L=L.transition(d).attr("opacity",ws).attr("transform",function(U){return isFinite(U=T(U))?u(U+l):this.getAttribute("transform")}),R.attr("opacity",ws).attr("transform",function(U){var Y=this.parentNode.__axis;return u((Y&&isFinite(Y=Y(U))?Y:T(U))+l)})),L.remove(),w.attr("d",t===Ne||t===vn?s?"M"+c*s+","+x+"H"+l+"V"+y+"H"+c*s:"M"+l+","+x+"V"+y:s?"M"+x+","+c*s+"V"+l+"H"+y+"V"+c*s:"M"+x+","+l+"H"+y),S.attr("opacity",1).attr("transform",function(U){return u(T(U)+l)}),tt.attr(f+"2",c*o),A.attr(f,c*v).text(p),k.filter(Q0).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===vn?"start":t===Ne?"end":"middle"),k.each(function(){this.__axis=T})}return h.scale=function(d){return arguments.length?(e=d,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(d){return arguments.length?(n=d==null?[]:Array.from(d),h):n.slice()},h.tickValues=function(d){return arguments.length?(i=d==null?null:Array.from(d),h):i&&i.slice()},h.tickFormat=function(d){return arguments.length?(r=d,h):r},h.tickSize=function(d){return arguments.length?(o=s=+d,h):o},h.tickSizeInner=function(d){return arguments.length?(o=+d,h):o},h.tickSizeOuter=function(d){return arguments.length?(s=+d,h):s},h.tickPadding=function(d){return arguments.length?(a=+d,h):a},h.offset=function(d){return arguments.length?(l=+d,h):l},h}function ks(t){return ui(gn,t)}function Ts(t){return ui(vn,t)}function Ss(t){return ui(rr,t)}function Cs(t){return ui(Ne,t)}var Vt;(function(t){t.Start="start",t.Middle="middle",t.End="end"})(Vt||(Vt={}));var Xt;(function(t){t.Top="top",t.Middle="middle",t.Bottom="bottom"})(Xt||(Xt={}));var Yn;(function(t){t.Wrap="wrap",t.Trim="trim"})(Yn||(Yn={}));var ft;(function(t){t.Left="left",t.Center="center",t.Right="right"})(ft||(ft={}));var mn={exports:{}},J0=mn.exports,Ms;function K0(){return Ms||(Ms=1,function(t){(function(e){if(typeof n!="function"){var n=function(g){return g};n.nonNative=!0}const i=n("plaintext"),r=n("html"),o=n("comment"),s=/<(\w*)>/g,a=/<\/?([^\s\/>]+)/;function l(g,p,v){g=g||"",p=p||[],v=v||"";let _=f(p,v);return u(g,_)}function c(g,p){g=g||[],p=p||"";let v=f(g,p);return function(x){return u(x||"",v)}}l.init_streaming_mode=c;function f(g,p){return g=h(g),{allowable_tags:g,tag_replacement:p,state:i,tag_buffer:"",depth:0,in_quote_char:""}}function u(g,p){if(typeof g!="string")throw new TypeError("'html' parameter must be a string");let v=p.allowable_tags,_=p.tag_replacement,x=p.state,y=p.tag_buffer,T=p.depth,k=p.in_quote_char,w="";for(let S=0,L=g.length;S<L;S++){let R=g[S];if(x===i)switch(R){case"<":x=r,y+=R;break;default:w+=R;break}else if(x===r)switch(R){case"<":if(k)break;T++;break;case">":if(k)break;if(T){T--;break}k="",x=i,y+=">",v.has(d(y))?w+=y:w+=_,y="";break;case'"':case"'":R===k?k="":k=k||R,y+=R;break;case"-":y==="<!-"&&(x=o),y+=R;break;case" ":case`
150
- `:if(y==="<"){x=i,w+="< ",y="";break}y+=R;break;default:y+=R;break}else if(x===o)switch(R){case">":y.slice(-2)=="--"&&(x=i),y="";break;default:y+=R;break}}return p.state=x,p.tag_buffer=y,p.depth=T,p.in_quote_char=k,w}function h(g){let p=new Set;if(typeof g=="string"){let v;for(;v=s.exec(g);)p.add(v[1])}else!n.nonNative&&typeof g[n.iterator]=="function"?p=new Set(g):typeof g.forEach=="function"&&g.forEach(p.add,p);return p}function d(g){let p=a.exec(g);return p?p[1].toLowerCase():null}t.exports?t.exports=l:e.striptags=l})(J0)}(mn)),mn.exports}var tv=K0();const ev=Jf(tv);function nv(t){switch(t){case ft.Center:return"middle";case ft.Right:return"end";case ft.Left:default:return"start"}}function iv(t){var e;return(e=t.match(/[A-Z]{2,}(?=[A-Z][a-z0-9]*|\b)|[A-Z]?[a-z0-9]*|[A-Z]|[0-9]+/g))===null||e===void 0?void 0:e.filter(Boolean).map(n=>n.toLowerCase()).join("-")}function rv(t){return t.replace(/['"]/g,"&#39;").replace(/\u0000/g,"\\0").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\v/g,"\\v").replace(/\t/g,"\\t").replace(/\f/g,"\\f")}function ov(t,e=15){return t?t.length>e?`…${t.substr(t.length-e,e)}`:t:""}function sv(t,e=15){if(!t)return"";const n=Math.floor((e-3)/2);return t.length>e?`${t.substr(0,n)}…${t.substr(-n,n)}`:t}function av(t,e=15){return t?t.length>e?`${t.substr(0,e)}…`:t:""}function lv(t,e=15,n=Vt.Middle){if(!t)return"";let i=av(t,e);return n===Vt.Start?i=ov(t,e):n===Vt.Middle&&(i=sv(t,e)),i}function cv(t,e=[" "]){let n=[t];for(let i=0;i<e.length;i++){const r=e[i];n.forEach((o,s)=>{const a=o.split(r),l=a.map((c,f)=>`${c}${f===a.length-1?"":r}`);n[s]=l}),n=Di(n)}return n}function uv(t,e,n,i,r,o){var s;e===void 0&&(e=50),n===void 0&&(n=Vt.Middle),r===void 0&&(r=+((s=window.getComputedStyle(t.node()))===null||s===void 0?void 0:s.fontSize)||0);const a=t.text(),l=a.length,c=r*l*o,u=Math.ceil(l*e/(1.1*c));return u<l?(t.text(lv(a,u,n)),!0):!1}function _n(t,e,n=xh()){return t.length*e*n||0}function yn(t,e,n){const i="http://www.w3.org/2000/svg",r=document.createElementNS(i,"svg"),o=document.createElementNS(i,"text");o.textContent=t,o.setAttribute("font-size",`${n}`),o.setAttribute("font-family",e),r.appendChild(o),document.body.appendChild(r);const s=o.getComputedTextLength();return document.body.removeChild(r),s}function fv(t,e=void 0,n=!0,i=fa,r=!1){const o=`${t.text}`;if(!o)return[];const s=Array.isArray(i)?i:[i];return o.split(`
151
- `).map(l=>{const c=[];if(!e)return[l];const f=cv(l,s);let u="";for(let h=0;h<f.length;h+=1){(n?_n(u+f[h],t.fontSize,t.fontWidthToHeightRatio):yn(u+f[h],t.fontFamily,t.fontSize))<e||h===0?u+=f[h]:(c.push(u.trim()),u=f[h]);const g=2;if(r)for(;u.trim().length>g&&(n?_n(u,t.fontSize,t.fontWidthToHeightRatio):yn(u,t.fontFamily,t.fontSize))>e;){let v=u.trim().length-g;for(;v>0;){const _=`${u.substring(0,v)}${ha}`;if((n?_n(_,t.fontSize,t.fontWidthToHeightRatio):yn(_,t.fontFamily,t.fontSize))<=e||v===1){c.push(_.trim()),u=u.substring(v);break}v--}}}return u&&c.push(u.trim()),c}).flat()}function hv(t,e=void 0,n=void 0,i=!0,r=fa,o=!1){const s=Array.isArray(t)?t.map(u=>qt(Oo,u)):[qt(Oo,t)],a=s.map(u=>fv(u,e,i,r,o)),l=s[0];let c=-l.fontSize*(l.lineHeight-1);const f=[];return s.forEach((u,h)=>{var d;let g=a[h];const p=h>0?f[h-1]:void 0,v=p?p.marginBottom:0,_=u.marginTop,x=Math.max(v,_);c+=x;const y=u.fontSize*u.lineHeight;let T=0;for(let k=0;k<g.length;k+=1){let w=g[k];c+=y;const S=`${w} …`,L=i?_n(S,u.fontSize,u.fontWidthToHeightRatio):yn(S,u.fontFamily,u.fontSize);if(T=Math.max(L,T),n&&c+y>n&&k!==g.length-1){w.charAt(w.length-1)===ha&&(w=w.substr(0,g[k].length-1)),L<e?g[k]=S:g[k]=`${g[k].substr(0,g[k].length-2)}…`,g=g.slice(0,k+1);break}}f.push(Object.assign(Object.assign({},u),{_lines:g,_estimatedHeight:c-((p==null?void 0:p._estimatedHeight)||0),_maxWidth:Math.max(T,(d=p==null?void 0:p._maxWidth)!==null&&d!==void 0?d:0)}))}),f}function dv(t,e=0,n){return t.map((i,r)=>{const o=r>0?t[r-1]:void 0,s=o?o.marginBottom/o.fontSize:0,a=i.marginTop/i.fontSize,l=Math.max(s,a),c={fontSize:i.fontSize,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fill:i.color,y:r===0&&n};return`<tspan xmlns="http://www.w3.org/2000/svg" ${Object.entries(c).filter(([u,h])=>h).map(([u,h])=>`${iv(u)}="${rv(h.toString())}"`).join(" ")}>${i._lines.map((u,h)=>{let d;return r===0&&h===0?d=.8+l:h===0?d=l+i.lineHeight:d=i.lineHeight,`<tspan x="${e}" dy="${d}em">${u.length?u:" "}</tspan>`}).join("")}</tspan>`})}function pv(t){return zu(t,e=>e._estimatedHeight)}const gv=["text","tspan","textPath","altGlyph","altGlyphDef","altGlyphItem","glyphRef","textRef","textArea"];function vv(t,e,n,i){var r,o;const s=hv(e,n.width,void 0,n.fastMode,n.separator,n.wordBreak),a=(r=n.x)!==null&&r!==void 0?r:+t.getAttribute("x"),l=(o=n.y)!==null&&o!==void 0?o:+t.getAttribute("y"),c=a??0;let f=l??0;if(n.textAlign&&t.setAttribute("text-anchor",nv(n.textAlign)),n.verticalAlign&&n.verticalAlign!==Xt.Top){const u=pv(s),h=n.verticalAlign===Xt.Middle?-u/2:n.verticalAlign===Xt.Bottom?-u:0;f+=h}n.textRotationAngle?t.setAttribute("transform",`rotate(${n.textRotationAngle===0||n.textRotationAngle?n.textRotationAngle:0} ${c} ${f})`):t.removeAttribute("transform");{const u=new DOMParser;t.textContent="",s.forEach(h=>{const d=dv([h],c,f).join(""),g=ev(d,gv),p=u.parseFromString(g,"image/svg+xml").firstChild;t.appendChild(p)})}}const mv=Object.assign(Object.assign({},ri),{position:void 0,type:void 0,label:void 0,labelFontSize:null,gridLine:!0,tickLine:!0,domainLine:!0,numTicks:void 0,minMaxTicksOnly:!1,minMaxTicksOnlyWhenWidthIsLess:250,tickTextWidth:void 0,tickTextSeparator:void 0,tickTextForceWordBreak:!1,tickTextTrimType:Vt.Middle,tickTextFitMode:Yn.Wrap,tickTextFontSize:null,tickTextAlign:void 0,tickTextColor:null,tickTextAngle:void 0,labelMargin:8,labelColor:null,tickFormat:void 0,tickValues:void 0,fullSize:!0,tickPadding:8,tickTextHideOverlapping:void 0}),bl=P`
149
+ `,J0=Object.freeze(Object.defineProperty({__proto__:null,dim:or,globalStyles:Z0,interpolatedPath:sr,line:Ne,linePath:ir,lineSelectionHelper:rr,root:Q0},Symbol.toStringTag,{value:"Module"}));class fi extends ai{constructor(e){super(),this._defaultConfig=j0,this.config=this._defaultConfig,this.curve=nr[L.MonotoneX],this.events={[fi.selectors.line]:{mouseover:this._highlight.bind(this),mouseleave:this._resetHighlight.bind(this)}},e&&this.setConfig(e)}get bleed(){const{config:{lineWidth:e}}=this,n=this.yScale.domain(),r=(this.yScale.range()[0]>this.yScale.range()[1]?Xt.North:Xt.South)===Xt.South,o=e>3,s=e>=10;return{top:!s&&(!r&&n[1]===0||r&&n[0]===0)?0:e/2,bottom:!s&&(!r&&n[0]===0||r&&n[1]===0)?0:e/2,left:o?e/2:0,right:o?e/2:0}}_render(e){super._render(e);const{config:n,datamodel:{data:i}}=this,r=wt(e)?e:n.duration;this.curve=nr[n.curveType],this.lineGen=sl().x(u=>u.x).y(u=>u.y).defined(u=>u.defined).curve(this.curve);const o=jt(n.y)?n.y:[n.y],s=i.map((u,f)=>this.xScale(Y(u,n.x,f))),a=o.map(u=>{const f=i.map((_,x)=>{const y=Y(_,u,x),T=(wt(y)||y===null)&&isFinite(y)?y:n.fallbackValue,k=n.interpolateMissingData?(wt(y)||y===null)&&isFinite(y):isFinite(T);return{x:s[x],y:this.yScale(T??0),defined:k,value:T}}),d=f.reduce((_,x)=>x.defined||_,!1);let g=!1;const p=f.reduce((_,x,y)=>{!x.defined&&isFinite(n.fallbackValue)&&_.push(Object.assign(Object.assign({},x),{defined:!0})),!x.defined&&!g&&(g=!0);const T=y>0&&!f[y-1].defined||y<f.length-1&&!f[y+1].defined;return x.defined&&T&&(g||_.push(Object.assign(Object.assign({},x),{defined:!1})),_.push(x),g=!1),_},[]),v=d&&f.some(_=>_.value!==null);return{values:f,defined:d,gaps:p,visible:v}}),l=this.g.selectAll(`.${Ne}`).data(a),c=l.enter().append("g").attr("class",Ne);c.append("path").attr("class",ir).attr("stroke",(u,f)=>bt(i,n.color,f)).attr("stroke-opacity",0).attr("stroke-width",n.lineWidth),c.append("path").attr("class",rr).attr("d",this._emptyPath()),c.append("path").attr("class",sr).attr("d",this._emptyPath()).style("opacity",0);const h=c.merge(l);h.style("cursor",(u,f)=>Qn(i,n.cursor,f)),h.each((u,f,d)=>{var g;const p=Z(d[f]),v=p.select(`.${ir}`),_=p.select(`.${rr}`),x=p.select(`.${sr}`),y=u.visible,T=gr(i,n.lineDashArray,f),k=ct(v,r).attr("stroke",bt(i,n.color,f)).attr("stroke-width",n.lineWidth).attr("stroke-opacity",y?1:0).style("stroke-dasharray",(g=T==null?void 0:T.join(" "))!==null&&g!==void 0?g:null),w=u.values.some(B=>!B.defined),S=this.lineGen(u.values);if(r&&!w){const B=v.attr("d")||this._emptyPath(),F=S||this._emptyPath();k.attrTween("d",()=>bl(B,F))}else u.visible&&k.attr("d",S);_.attr("d",S).attr("visibility",y?null:"hidden"),w&&n.interpolateMissingData?ct(x,r).attr("d",this.lineGen(u.gaps)).attr("stroke",bt(i,n.color,f)).attr("stroke-width",n.lineWidth-1).style("opacity",1):x.transition().duration(r).style("opacity",0)}),ct(l.exit(),r).style("opacity",0).remove()}_emptyPath(){const e=this.xScale.range(),n=this.yScale.range();return`M${e[0]},${n[0]} L${e[1]},${n[0]}`}_highlight(e){const{config:n}=this;n.highlightOnHover&&this.g.selectAll(`.${Ne}`).classed(or,i=>i!==e)}_resetHighlight(){const{config:e}=this;e.highlightOnHover&&this.g.selectAll(`.${Ne}`).classed(or,!1)}}fi.selectors=J0;function K0(t){return t}var mn=1,vn=2,ar=3,Oe=4,Ts=1e-6;function tm(t){return"translate("+t+",0)"}function em(t){return"translate(0,"+t+")"}function nm(t){return e=>+t(e)}function im(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function rm(){return!this.__axis}function di(t,e){var n=[],i=null,r=null,o=6,s=6,a=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===mn||t===Oe?-1:1,h=t===Oe||t===vn?"x":"y",u=t===mn||t===ar?tm:em;function f(d){var g=i??(e.ticks?e.ticks.apply(e,n):e.domain()),p=r??(e.tickFormat?e.tickFormat.apply(e,n):K0),v=Math.max(o,0)+a,_=e.range(),x=+_[0]+l,y=+_[_.length-1]+l,T=(e.bandwidth?im:nm)(e.copy(),l),k=d.selection?d.selection():d,w=k.selectAll(".domain").data([null]),S=k.selectAll(".tick").data(g,e).order(),B=S.exit(),F=S.enter().append("g").attr("class","tick"),et=S.select("line"),A=S.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(F),et=et.merge(F.append("line").attr("stroke","currentColor").attr(h+"2",c*o)),A=A.merge(F.append("text").attr("fill","currentColor").attr(h,c*v).attr("dy",t===mn?"0em":t===ar?"0.71em":"0.32em")),d!==k&&(w=w.transition(d),S=S.transition(d),et=et.transition(d),A=A.transition(d),B=B.transition(d).attr("opacity",Ts).attr("transform",function(U){return isFinite(U=T(U))?u(U+l):this.getAttribute("transform")}),F.attr("opacity",Ts).attr("transform",function(U){var V=this.parentNode.__axis;return u((V&&isFinite(V=V(U))?V:T(U))+l)})),B.remove(),w.attr("d",t===Oe||t===vn?s?"M"+c*s+","+x+"H"+l+"V"+y+"H"+c*s:"M"+l+","+x+"V"+y:s?"M"+x+","+c*s+"V"+l+"H"+y+"V"+c*s:"M"+x+","+l+"H"+y),S.attr("opacity",1).attr("transform",function(U){return u(T(U)+l)}),et.attr(h+"2",c*o),A.attr(h,c*v).text(p),k.filter(rm).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===vn?"start":t===Oe?"end":"middle"),k.each(function(){this.__axis=T})}return f.scale=function(d){return arguments.length?(e=d,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(d){return arguments.length?(n=d==null?[]:Array.from(d),f):n.slice()},f.tickValues=function(d){return arguments.length?(i=d==null?null:Array.from(d),f):i&&i.slice()},f.tickFormat=function(d){return arguments.length?(r=d,f):r},f.tickSize=function(d){return arguments.length?(o=s=+d,f):o},f.tickSizeInner=function(d){return arguments.length?(o=+d,f):o},f.tickSizeOuter=function(d){return arguments.length?(s=+d,f):s},f.tickPadding=function(d){return arguments.length?(a=+d,f):a},f.offset=function(d){return arguments.length?(l=+d,f):l},f}function Ss(t){return di(mn,t)}function Cs(t){return di(vn,t)}function Ms(t){return di(ar,t)}function As(t){return di(Oe,t)}var qt;(function(t){t.Start="start",t.Middle="middle",t.End="end"})(qt||(qt={}));var Gt;(function(t){t.Top="top",t.Middle="middle",t.Bottom="bottom"})(Gt||(Gt={}));var Xn;(function(t){t.Wrap="wrap",t.Trim="trim"})(Xn||(Xn={}));var dt;(function(t){t.Left="left",t.Center="center",t.Right="right"})(dt||(dt={}));var _n={exports:{}},om=_n.exports,$s;function sm(){return $s||($s=1,function(t){(function(e){if(typeof n!="function"){var n=function(g){return g};n.nonNative=!0}const i=n("plaintext"),r=n("html"),o=n("comment"),s=/<(\w*)>/g,a=/<\/?([^\s\/>]+)/;function l(g,p,v){g=g||"",p=p||[],v=v||"";let _=h(p,v);return u(g,_)}function c(g,p){g=g||[],p=p||"";let v=h(g,p);return function(x){return u(x||"",v)}}l.init_streaming_mode=c;function h(g,p){return g=f(g),{allowable_tags:g,tag_replacement:p,state:i,tag_buffer:"",depth:0,in_quote_char:""}}function u(g,p){if(typeof g!="string")throw new TypeError("'html' parameter must be a string");let v=p.allowable_tags,_=p.tag_replacement,x=p.state,y=p.tag_buffer,T=p.depth,k=p.in_quote_char,w="";for(let S=0,B=g.length;S<B;S++){let F=g[S];if(x===i)switch(F){case"<":x=r,y+=F;break;default:w+=F;break}else if(x===r)switch(F){case"<":if(k)break;T++;break;case">":if(k)break;if(T){T--;break}k="",x=i,y+=">",v.has(d(y))?w+=y:w+=_,y="";break;case'"':case"'":F===k?k="":k=k||F,y+=F;break;case"-":y==="<!-"&&(x=o),y+=F;break;case" ":case`
150
+ `:if(y==="<"){x=i,w+="< ",y="";break}y+=F;break;default:y+=F;break}else if(x===o)switch(F){case">":y.slice(-2)=="--"&&(x=i),y="";break;default:y+=F;break}}return p.state=x,p.tag_buffer=y,p.depth=T,p.in_quote_char=k,w}function f(g){let p=new Set;if(typeof g=="string"){let v;for(;v=s.exec(g);)p.add(v[1])}else!n.nonNative&&typeof g[n.iterator]=="function"?p=new Set(g):typeof g.forEach=="function"&&g.forEach(p.add,p);return p}function d(g){let p=a.exec(g);return p?p[1].toLowerCase():null}t.exports?t.exports=l:e.striptags=l})(om)}(_n)),_n.exports}var am=sm();const lm=of(am);function cm(t){switch(t){case dt.Center:return"middle";case dt.Right:return"end";case dt.Left:default:return"start"}}function um(t){var e;return(e=t.match(/[A-Z]{2,}(?=[A-Z][a-z0-9]*|\b)|[A-Z]?[a-z0-9]*|[A-Z]|[0-9]+/g))===null||e===void 0?void 0:e.filter(Boolean).map(n=>n.toLowerCase()).join("-")}function hm(t){return t.replace(/['"]/g,"&#39;").replace(/\u0000/g,"\\0").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\v/g,"\\v").replace(/\t/g,"\\t").replace(/\f/g,"\\f")}function fm(t,e=15){return t?t.length>e?`…${t.substr(t.length-e,e)}`:t:""}function dm(t,e=15){if(!t)return"";const n=Math.floor((e-3)/2);return t.length>e?`${t.substr(0,n)}…${t.substr(-n,n)}`:t}function pm(t,e=15){return t?t.length>e?`${t.substr(0,e)}…`:t:""}function gm(t,e=15,n=qt.Middle){if(!t)return"";let i=pm(t,e);return n===qt.Start?i=fm(t,e):n===qt.Middle&&(i=dm(t,e)),i}function mm(t,e=[" "]){let n=[t];for(let i=0;i<e.length;i++){const r=e[i];n.forEach((o,s)=>{const a=o.split(r),l=a.map((c,h)=>`${c}${h===a.length-1?"":r}`);n[s]=l}),n=Pi(n)}return n}function vm(t,e,n,i,r,o){var s;e===void 0&&(e=50),n===void 0&&(n=qt.Middle),r===void 0&&(r=+((s=window.getComputedStyle(t.node()))===null||s===void 0?void 0:s.fontSize)||0);const a=t.text(),l=a.length,c=r*l*o,u=Math.ceil(l*e/(1.1*c));return u<l?(t.text(gm(a,u,n)),!0):!1}function yn(t,e,n=Mf()){return t.length*e*n||0}function xn(t,e,n){const i="http://www.w3.org/2000/svg",r=document.createElementNS(i,"svg"),o=document.createElementNS(i,"text");o.textContent=t,o.setAttribute("font-size",`${n}`),o.setAttribute("font-family",e),r.appendChild(o),document.body.appendChild(r);const s=o.getComputedTextLength();return document.body.removeChild(r),s}function _m(t,e=void 0,n=!0,i=fa,r=!1){const o=`${t.text}`;if(!o)return[];const s=Array.isArray(i)?i:[i];return o.split(`
151
+ `).map(l=>{const c=[];if(!e)return[l];const h=mm(l,s);let u="";for(let f=0;f<h.length;f+=1){(n?yn(u+h[f],t.fontSize,t.fontWidthToHeightRatio):xn(u+h[f],t.fontFamily,t.fontSize))<e||f===0?u+=h[f]:(c.push(u.trim()),u=h[f]);const g=2;if(r)for(;u.trim().length>g&&(n?yn(u,t.fontSize,t.fontWidthToHeightRatio):xn(u,t.fontFamily,t.fontSize))>e;){let v=u.trim().length-g;for(;v>0;){const _=`${u.substring(0,v)}${da}`;if((n?yn(_,t.fontSize,t.fontWidthToHeightRatio):xn(_,t.fontFamily,t.fontSize))<=e||v===1){c.push(_.trim()),u=u.substring(v);break}v--}}}return u&&c.push(u.trim()),c}).flat()}function ym(t,e=void 0,n=void 0,i=!0,r=fa,o=!1){const s=Array.isArray(t)?t.map(u=>Zt(Do,u)):[Zt(Do,t)],a=s.map(u=>_m(u,e,i,r,o)),l=s[0];let c=-l.fontSize*(l.lineHeight-1);const h=[];return s.forEach((u,f)=>{var d;let g=a[f];const p=f>0?h[f-1]:void 0,v=p?p.marginBottom:0,_=u.marginTop,x=Math.max(v,_);c+=x;const y=u.fontSize*u.lineHeight;let T=0;for(let k=0;k<g.length;k+=1){let w=g[k];c+=y;const S=`${w} …`,B=i?yn(S,u.fontSize,u.fontWidthToHeightRatio):xn(S,u.fontFamily,u.fontSize);if(T=Math.max(B,T),n&&c+y>n&&k!==g.length-1){w.charAt(w.length-1)===da&&(w=w.substr(0,g[k].length-1)),B<e?g[k]=S:g[k]=`${g[k].substr(0,g[k].length-2)}…`,g=g.slice(0,k+1);break}}h.push(Object.assign(Object.assign({},u),{_lines:g,_estimatedHeight:c-((p==null?void 0:p._estimatedHeight)||0),_maxWidth:Math.max(T,(d=p==null?void 0:p._maxWidth)!==null&&d!==void 0?d:0)}))}),h}function xm(t,e=0,n){return t.map((i,r)=>{const o=r>0?t[r-1]:void 0,s=o?o.marginBottom/o.fontSize:0,a=i.marginTop/i.fontSize,l=Math.max(s,a),c={fontSize:i.fontSize,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fill:i.color,y:r===0&&n};return`<tspan xmlns="http://www.w3.org/2000/svg" ${Object.entries(c).filter(([u,f])=>f).map(([u,f])=>`${um(u)}="${hm(f.toString())}"`).join(" ")}>${i._lines.map((u,f)=>{let d;return r===0&&f===0?d=.8+l:f===0?d=l+i.lineHeight:d=i.lineHeight,`<tspan x="${e}" dy="${d}em">${u.length?u:" "}</tspan>`}).join("")}</tspan>`})}function bm(t){return Hu(t,e=>e._estimatedHeight)}const wm=["text","tspan","textPath","altGlyph","altGlyphDef","altGlyphItem","glyphRef","textRef","textArea"];function km(t,e,n,i){var r,o;const s=ym(e,n.width,void 0,n.fastMode,n.separator,n.wordBreak),a=(r=n.x)!==null&&r!==void 0?r:+t.getAttribute("x"),l=(o=n.y)!==null&&o!==void 0?o:+t.getAttribute("y"),c=a??0;let h=l??0;if(n.textAlign&&t.setAttribute("text-anchor",cm(n.textAlign)),n.verticalAlign&&n.verticalAlign!==Gt.Top){const u=bm(s),f=n.verticalAlign===Gt.Middle?-u/2:n.verticalAlign===Gt.Bottom?-u:0;h+=f}n.textRotationAngle?t.setAttribute("transform",`rotate(${n.textRotationAngle===0||n.textRotationAngle?n.textRotationAngle:0} ${c} ${h})`):t.removeAttribute("transform");{const u=new DOMParser;t.textContent="",s.forEach(f=>{const d=xm([f],c,h).join(""),g=lm(d,wm),p=u.parseFromString(g,"image/svg+xml").firstChild;t.appendChild(p)})}}const Tm=Object.assign(Object.assign({},Je),{position:void 0,type:void 0,label:void 0,labelFontSize:null,gridLine:!0,tickLine:!0,domainLine:!0,numTicks:void 0,minMaxTicksOnly:!1,minMaxTicksOnlyWhenWidthIsLess:250,tickTextWidth:void 0,tickTextSeparator:void 0,tickTextForceWordBreak:!1,tickTextTrimType:qt.Middle,tickTextFitMode:Xn.Wrap,tickTextFontSize:null,tickTextAlign:void 0,tickTextColor:null,tickTextAngle:void 0,labelMargin:8,labelColor:null,tickFormat:void 0,tickValues:void 0,fullSize:!0,tickPadding:8,tickTextHideOverlapping:void 0}),wl=O`
152
152
  label: axis-component;
153
- `,_v=_e`
153
+ `,Sm=Kt`
154
154
  :root {
155
155
  // Undefined by default to allow proper fallback to var(--vis-font-family)
156
156
  /* --vis-axis-font-family: */
@@ -175,18 +175,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
175
175
  --vis-dark-axis-label-color: #fefefe;
176
176
  }
177
177
 
178
- body.theme-dark ${`.${bl}`} {
178
+ body.theme-dark ${`.${wl}`} {
179
179
  --vis-axis-tick-color: var(--vis-dark-axis-tick-color);
180
180
  --vis-axis-domain-color: var(--vis-dark-axis-domain-color);
181
181
  --vis-axis-tick-label-color: var(--vis-dark-axis-tick-label-color);
182
182
  --vis-axis-grid-color: var(--vis-dark-axis-grid-color);
183
183
  --vis-axis-label-color: var(--vis-dark-axis-label-color);
184
184
  }
185
- `,Xr=P`
185
+ `,Gr=O`
186
186
  label: hide-tick-line;
187
- `,qr=P`
187
+ `,jr=O`
188
188
  label: hide-domain;
189
- `,wl=P`
189
+ `,kl=O`
190
190
  label: axis;
191
191
 
192
192
  user-select: none;
@@ -196,18 +196,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
196
196
  stroke-width: var(--vis-axis-domain-line-width, var(--vis-axis-grid-line-width));
197
197
  }
198
198
 
199
- &${`.${Xr}`} {
199
+ &${`.${Gr}`} {
200
200
  .tick > line {
201
201
  opacity: 0;
202
202
  }
203
203
  }
204
204
 
205
- &${`.${qr}`} {
205
+ &${`.${jr}`} {
206
206
  .domain {
207
207
  opacity: 0;
208
208
  }
209
209
  }
210
- `,kl=P`
210
+ `,Tl=O`
211
211
  label: grid;
212
212
 
213
213
  .domain {
@@ -218,7 +218,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
218
218
  stroke: var(--vis-axis-grid-color);
219
219
  stroke-width: var(--vis-axis-grid-line-width);
220
220
  }
221
- `,Tl=P`
221
+ `,Sl=O`
222
222
  label: tick;
223
223
 
224
224
  stroke: none;
@@ -236,21 +236,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
236
236
  text-decoration: var(--vis-axis-tick-label-text-decoration);
237
237
  stroke: none;
238
238
  }
239
- `,or=P`
239
+ `,lr=O`
240
240
  label: label;
241
241
  fill: var(--vis-axis-label-color);
242
242
  font-size: var(--vis-axis-label-font-size);
243
243
  font-family: var(--vis-axis-font-family, var(--vis-font-family));
244
244
  text-anchor: middle;
245
- `,Sl=P`
245
+ `,Cl=O`
246
246
  label: tick-label;
247
- `,Cl=P`
247
+ `,Ml=O`
248
248
  label: tick-label-hideable;
249
249
  opacity: 0;
250
250
  transition: var(--vis-axis-tick-label-hide-transition);
251
- `,yv=Object.freeze(Object.defineProperty({__proto__:null,axis:wl,globalStyles:_v,grid:kl,hideDomain:qr,hideTickLine:Xr,label:or,root:bl,tick:Tl,tickLabel:Sl,tickLabelHideable:Cl},Symbol.toStringTag,{value:"Module"}));class Ml extends Ir{constructor(e){super(),this._defaultConfig=mv,this.config=this._defaultConfig,this._defaultNumTicks=3,this.events={},e&&this.setConfig(e),this.axisGroup=this.g.append("g"),this.gridGroup=this.g.append("g").attr("class",kl)}preRender(){const{config:e}=this,n=this.g.append("g").attr("opacity",0);this._renderAxis(n,0),this._axisRawBBox=n.node().getBBox(),e.tickTextAlign&&this._alignTickLabels(),this._renderAxisLabel(n),this._axisSizeBBox=this._getAxisSize(n),this._requiredMargin=this._getRequiredMargin(this._axisSizeBBox),n.remove()}getPosition(){const{config:{type:e,position:n}}=this;return n??(e===F.X?M.Bottom:M.Left)}_getAxisSize(e){return e.node().getBBox()}_getRequiredMargin(e=this._axisSizeBBox){const{config:{type:n,position:i}}=this;switch(n){case F.X:{const o=this._axisSizeBBox.x+this._axisSizeBBox.width,s=this._axisSizeBBox.x<0?Math.abs(this._axisSizeBBox.x):0,a=o-this._width>1?o-this._width:0;switch(i){case M.Top:return{top:e.height,left:s,right:a};case M.Bottom:default:return{bottom:e.height,left:s,right:a}}}case F.Y:{const r=e.height>this._height?(e.height-this._height)/2:0,o=r,s=r;switch(i){case M.Right:return{right:e.width,top:o,bottom:s};case M.Left:default:return{left:e.width,top:o,bottom:s}}}}}getRequiredMargin(){return this._requiredMargin}getOffset(e){const{config:{type:n,position:i}}=this;switch(n){case F.X:switch(i){case M.Top:return{top:e.top,left:e.left};case M.Bottom:default:return{top:e.top+this._height,left:e.left}}case F.Y:switch(i){case M.Right:return{top:e.top,left:e.left+this._width};case M.Left:default:return{top:e.top,left:e.left}}}}_render(e=this.config.duration,n=this.axisGroup){const{config:i}=this;if(this._renderAxis(n,e),this._renderAxisLabel(n),i.gridLine){const r=this._buildGrid().tickFormat(()=>"");r.tickValues(this._getConfiguredTickValues()),this.gridGroup.selectAll("*").interrupt(),Tt(this.gridGroup,e).call(r).style("opacity",1)}else Tt(this.gridGroup,e).style("opacity",0);i.tickTextAlign&&this._alignTickLabels(),this._resolveTickLabelOverlap(n)}_buildAxis(){const{config:{type:e,position:n,tickPadding:i}}=this,r=this._getNumTicks();switch(e){case F.X:switch(n){case M.Top:return ks(this.xScale).ticks(r).tickPadding(i);case M.Bottom:default:return Ss(this.xScale).ticks(r).tickPadding(i)}case F.Y:switch(n){case M.Right:return Ts(this.yScale).ticks(r).tickPadding(i);case M.Left:default:return Cs(this.yScale).ticks(r).tickPadding(i)}}}_buildGrid(){const{config:{type:e,position:n}}=this,i=this._getNumTicks();switch(e){case F.X:switch(n){case M.Top:return ks(this.xScale).ticks(i*2).tickSize(-this._height).tickSizeOuter(0);case M.Bottom:default:return Ss(this.xScale).ticks(i*2).tickSize(-this._height).tickSizeOuter(0)}case F.Y:switch(n){case M.Right:return Ts(this.yScale).ticks(i*2).tickSize(-this._width).tickSizeOuter(0);case M.Left:default:return Cs(this.yScale).ticks(i*2).tickSize(-this._width).tickSizeOuter(0)}}}_renderAxis(e=this.axisGroup,n=this.config.duration){const{config:i}=this,r=this._buildAxis(),o=this._getConfiguredTickValues()||r.scale().ticks(this._getNumTicks());r.tickValues(o),e.selectAll("*").interrupt(),Tt(e,n).call(r);const s=e.selectAll("g.tick");s.classed(Tl,!0).style("font-size",i.tickTextFontSize);const a=e.selectAll("g.tick > text").filter(l=>o.some(c=>Pe(l,c))).classed(Sl,!0).classed(Cl,!!i.tickTextHideOverlapping).style("fill",i.tickTextColor);if(a.nodes().forEach(l=>br(l)),a.each((l,c,f)=>{var u,h;let d=(h=(u=i.tickFormat)===null||u===void 0?void 0:u.call(i,l,c,o))!==null&&h!==void 0?h:`${l}`;const g=f[c],p=i.tickTextWidth||(i.type===F.X?this._containerWidth/(s.size()+1):this._containerWidth/5),v=getComputedStyle(g),_=Number.parseFloat(v.fontSize),x=v.fontFamily,y={verticalAlign:i.type===F.X?Xt.Top:Xt.Middle,width:p,textRotationAngle:i.tickTextAngle,separator:i.tickTextSeparator,wordBreak:i.tickTextForceWordBreak};if(i.tickTextFitMode===Yn.Trim){const k=j(g).text(d);uv(k,p,i.tickTextTrimType,!0,_,.58),d=j(g).text()}vv(g,{text:d,fontFamily:x,fontSize:_},y)}),e.classed(wl,!0).classed(Xr,!i.tickLine).classed(qr,!i.domainLine),i.fullSize){const l=this._getFullDomainPath(0);Tt(e.select(".domain"),n).attr("d",l)}}_resolveTickLabelOverlap(e=this.axisGroup){const{config:n}=this,i=e.selectAll("g.tick > text");if(!n.tickTextHideOverlapping){i.style("opacity",null);return}cancelAnimationFrame(this._collideTickLabelsAnimFrameId),this._collideTickLabelsAnimFrameId=requestAnimationFrame(()=>{this._collideTickLabels(i)})}_collideTickLabels(e){e.each((i,r,o)=>{const s=o[r];s._visible=!0});const n=3;for(let i=0;i<n;i+=1)e.each((r,o,s)=>{const a=s[o];if(!a._visible)return;const c=a.getBoundingClientRect();for(let f=o+1;f<s.length;f+=1){if(o===f)continue;const u=s[f];if(u._visible){const d=u.getBoundingClientRect();if(nh(c,d,-5)){u._visible=!1;break}}}});e.each((i,r,o)=>{const s=o[r];j(s).style("opacity",s._visible?1:0)})}_getNumTicks(){const{config:{type:e,numTicks:n}}=this;if(n)return n;if(e===F.X){const i=this.xScale.range(),r=i[1]-i[0];return Math.floor(r/175)}if(e===F.Y){const i=this.yScale.range(),r=Math.abs(i[0]-i[1]);return Math.pow(r,.85)/25}return this._defaultNumTicks}_getConfiguredTickValues(){const{config:e}=this,n=e.type===F.X?this.xScale:this.yScale,i=n==null?void 0:n.domain();return e.tickValues?e.tickValues.filter(r=>r>=i[0]&&r<=i[1]):e.minMaxTicksOnly||e.type===F.X&&this._width<e.minMaxTicksOnlyWhenWidthIsLess?i:null}_getFullDomainPath(e=0){const{config:{type:n}}=this;switch(n){case F.X:return`M0.5, ${e} V0.5 H${this._width+.5} V${e}`;case F.Y:return`M${-e}, ${this._height+.5} H0.5 V0.5 H${-e}`}}_renderAxisLabel(e=this.axisGroup){var n;const{type:i,label:r,labelMargin:o,labelFontSize:s}=this.config;e.selectAll(`.${or}`).remove();const a=this.getPosition(),{width:l,height:c}=(n=this._axisRawBBox)!==null&&n!==void 0?n:e.node().getBBox(),f=i===F.X?this._width/2:Math.pow(-1,+(a===M.Left))*l,u=i===F.X?Math.pow(-1,+(a===M.Top))*c:this._height/2,h=i===F.X?0:Math.pow(-1,+(a===M.Left))*o,d=i===F.X?Math.pow(-1,+(a===M.Top))*o:0,g=i===F.Y?-90:0;e.append("text").attr("class",or).text(r).attr("dy",`${this._getLabelDY()}em`).attr("transform",`translate(${f+h},${u+d}) rotate(${g})`).style("font-size",s).style("fill",this.config.labelColor)}_getLabelDY(){const{type:e,position:n}=this.config;switch(e){case F.X:switch(n){case M.Top:return 0;case M.Bottom:default:return .75}case F.Y:switch(n){case M.Right:return .75;case M.Left:default:return-.25}}}_alignTickLabels(){const{config:{type:e,tickTextAlign:n,tickTextAngle:i,position:r}}=this,o=this.g.selectAll("g.tick > text"),s=this._getTickTextAnchor(n),a=e===F.X?0:this._getYTickTextTranslate(n,r),l=i?`translate(${a},0) rotate(${i})`:`translate(${a},0)`;o.attr("transform",l).attr("text-anchor",s)}_getTickTextAnchor(e){switch(e){case ft.Left:return"start";case ft.Right:return"end";case ft.Center:return"middle";default:return null}}_getYTickTextTranslate(e,n=M.Left){const r=this._axisRawBBox.width-9;switch(e){case ft.Left:return n===M.Left?r*-1:0;case ft.Right:return n===M.Left?0:r;case ft.Center:return n===M.Left?r*-.5:r*.5;default:return 0}}}Ml.selectors=yv;var _t;(function(t){t.Circle="circle",t.Cross="cross",t.Diamond="diamond",t.Square="square",t.Star="star",t.Triangle="triangle",t.Wye="wye"})(_t||(_t={}));const xv={[_t.Circle]:sl,[_t.Cross]:e0,[_t.Diamond]:i0,[_t.Square]:r0,[_t.Star]:l0,[_t.Triangle]:c0,[_t.Wye]:f0},it=Object.assign(Object.assign({},_t),{Line:"line"});var Vn;(function(t){t.Horizontal="horizontal",t.Vertical="vertical"})(Vn||(Vn={}));const bv={items:[],labelClassName:"",onLegendItemClick:void 0,labelFontSize:null,labelMaxWidth:null,bulletSize:null,bulletShape:t=>{var e;return(e=t.shape)!==null&&e!==void 0?e:it.Circle},orientation:Vn.Horizontal,renderIntoProvidedDomNode:!1},Ai=We*3,wv={[it.Circle]:Math.PI/4,[it.Cross]:5/9,[it.Diamond]:Math.sqrt(3)/6,[it.Square]:1,[it.Star]:.3,[it.Triangle]:Math.sqrt(3)/4,[it.Wye]:5/11};function kv(t){t.each((e,n,i)=>{j(i[n]).append("svg").attr("width","100%").attr("height","100%").append("path")})}function Tv(t,e,n){t.each((i,r,o)=>{const s=Gn(i,e.bulletShape,r),a=le(i,n,r),l=Ai,c=s===it.Line?Ai/2.5:Ai,u=j(o[r]).select("svg").attr("viewBox",`0 0 ${l} ${c}`).select("path").attr("stroke",a),h=i.inactive?"var(--vis-legend-bullet-inactive-opacity)":1;if(s===it.Line)u.attr("d",`M0,${c/2} L${l/2},${c/2} L${l},${c/2}`).attr("transform",null).style("opacity",h).style("stroke-width","3px").style("fill",null).style("fill-opacity",null).style("marker-start","none").style("marker-end","none");else{const d=h0().type(xv[s]).size(l*c*wv[s]),g=(l-2)/l;let p=c/2;switch(s){case it.Triangle:p+=c/8;break;case it.Star:p+=c/16;break;case it.Wye:p-=c/16;break}u.attr("d",d).attr("transform",`translate(${l/2}, ${Math.round(p)}) scale(${g})`).style("stroke-width","1px").style("opacity",null).style("fill",a).style("fill-opacity",h)}})}const Gr=P`
251
+ `,Cm=Object.freeze(Object.defineProperty({__proto__:null,axis:kl,globalStyles:Sm,grid:Tl,hideDomain:jr,hideTickLine:Gr,label:lr,root:wl,tick:Sl,tickLabel:Cl,tickLabelHideable:Ml},Symbol.toStringTag,{value:"Module"}));class Al extends ai{constructor(e){super(),this._defaultConfig=Tm,this.config=this._defaultConfig,this._defaultNumTicks=3,this.events={},e&&this.setConfig(e),this.axisGroup=this.g.append("g"),this.gridGroup=this.g.append("g").attr("class",Tl)}preRender(){const{config:e}=this,n=this.g.append("g").attr("opacity",0);this._renderAxis(n,0),this._axisRawBBox=n.node().getBBox(),e.tickTextAlign&&this._alignTickLabels(),this._renderAxisLabel(n),this._axisSizeBBox=this._getAxisSize(n),this._requiredMargin=this._getRequiredMargin(this._axisSizeBBox),n.remove()}getPosition(){const{config:{type:e,position:n}}=this;return n??(e===P.X?C.Bottom:C.Left)}_getAxisSize(e){return e.node().getBBox()}_getRequiredMargin(e=this._axisSizeBBox){const{config:{type:n,position:i}}=this;switch(n){case P.X:{const o=this._axisSizeBBox.x+this._axisSizeBBox.width,s=this._axisSizeBBox.x<0?Math.abs(this._axisSizeBBox.x):0,a=o-this._width>1?o-this._width:0;switch(i){case C.Top:return{top:e.height,left:s,right:a};case C.Bottom:default:return{bottom:e.height,left:s,right:a}}}case P.Y:{const r=e.height>this._height?(e.height-this._height)/2:0,o=r,s=r;switch(i){case C.Right:return{right:e.width,top:o,bottom:s};case C.Left:default:return{left:e.width,top:o,bottom:s}}}}}getRequiredMargin(){return this._requiredMargin}getOffset(e){const{config:{type:n,position:i}}=this;switch(n){case P.X:switch(i){case C.Top:return{top:e.top,left:e.left};case C.Bottom:default:return{top:e.top+this._height,left:e.left}}case P.Y:switch(i){case C.Right:return{top:e.top,left:e.left+this._width};case C.Left:default:return{top:e.top,left:e.left}}}}_render(e=this.config.duration,n=this.axisGroup){const{config:i}=this;if(this._renderAxis(n,e),this._renderAxisLabel(n),i.gridLine){const r=this._buildGrid().tickFormat(()=>"");r.tickValues(this._getConfiguredTickValues()),this.gridGroup.selectAll("*").interrupt(),ct(this.gridGroup,e).call(r).style("opacity",1)}else ct(this.gridGroup,e).style("opacity",0);i.tickTextAlign&&this._alignTickLabels(),this._resolveTickLabelOverlap(n)}_buildAxis(){const{config:{type:e,position:n,tickPadding:i}}=this,r=this._getNumTicks();switch(e){case P.X:switch(n){case C.Top:return Ss(this.xScale).ticks(r).tickPadding(i);case C.Bottom:default:return Ms(this.xScale).ticks(r).tickPadding(i)}case P.Y:switch(n){case C.Right:return Cs(this.yScale).ticks(r).tickPadding(i);case C.Left:default:return As(this.yScale).ticks(r).tickPadding(i)}}}_buildGrid(){const{config:{type:e,position:n}}=this,i=this._getNumTicks();switch(e){case P.X:switch(n){case C.Top:return Ss(this.xScale).ticks(i*2).tickSize(-this._height).tickSizeOuter(0);case C.Bottom:default:return Ms(this.xScale).ticks(i*2).tickSize(-this._height).tickSizeOuter(0)}case P.Y:switch(n){case C.Right:return Cs(this.yScale).ticks(i*2).tickSize(-this._width).tickSizeOuter(0);case C.Left:default:return As(this.yScale).ticks(i*2).tickSize(-this._width).tickSizeOuter(0)}}}_renderAxis(e=this.axisGroup,n=this.config.duration){const{config:i}=this,r=this._buildAxis(),o=this._getConfiguredTickValues()||r.scale().ticks(this._getNumTicks());r.tickValues(o),e.selectAll("*").interrupt(),ct(e,n).call(r);const s=e.selectAll("g.tick");s.classed(Sl,!0).style("font-size",i.tickTextFontSize);const a=e.selectAll("g.tick > text").filter(l=>o.some(c=>ze(l,c))).classed(Cl,!0).classed(Ml,!!i.tickTextHideOverlapping).style("fill",i.tickTextColor);if(a.nodes().forEach(l=>Tr(l)),a.each((l,c,h)=>{var u,f;let d=(f=(u=i.tickFormat)===null||u===void 0?void 0:u.call(i,l,c,o))!==null&&f!==void 0?f:`${l}`;const g=h[c],p=i.tickTextWidth||(i.type===P.X?this._containerWidth/(s.size()+1):this._containerWidth/5),v=getComputedStyle(g),_=Number.parseFloat(v.fontSize),x=v.fontFamily,y={verticalAlign:i.type===P.X?Gt.Top:Gt.Middle,width:p,textRotationAngle:i.tickTextAngle,separator:i.tickTextSeparator,wordBreak:i.tickTextForceWordBreak};if(i.tickTextFitMode===Xn.Trim){const k=Z(g).text(d);vm(k,p,i.tickTextTrimType,!0,_,.58),d=Z(g).text()}km(g,{text:d,fontFamily:x,fontSize:_},y)}),e.classed(kl,!0).classed(Gr,!i.tickLine).classed(jr,!i.domainLine),i.fullSize){const l=this._getFullDomainPath(0);ct(e.select(".domain"),n).attr("d",l)}}_resolveTickLabelOverlap(e=this.axisGroup){const{config:n}=this,i=e.selectAll("g.tick > text");if(!n.tickTextHideOverlapping){i.style("opacity",null);return}cancelAnimationFrame(this._collideTickLabelsAnimFrameId),this._collideTickLabelsAnimFrameId=requestAnimationFrame(()=>{this._collideTickLabels(i)})}_collideTickLabels(e){e.each((i,r,o)=>{const s=o[r];s._visible=!0});const n=3;for(let i=0;i<n;i+=1)e.each((r,o,s)=>{const a=s[o];if(!a._visible)return;const c=a.getBoundingClientRect();for(let h=o+1;h<s.length;h+=1){if(o===h)continue;const u=s[h];if(u._visible){const d=u.getBoundingClientRect();if(cf(c,d,-5)){u._visible=!1;break}}}});e.each((i,r,o)=>{const s=o[r];Z(s).style("opacity",s._visible?1:0)})}_getNumTicks(){const{config:{type:e,numTicks:n}}=this;if(n)return n;if(e===P.X){const i=this.xScale.range(),r=i[1]-i[0];return Math.floor(r/175)}if(e===P.Y){const i=this.yScale.range(),r=Math.abs(i[0]-i[1]);return Math.pow(r,.85)/25}return this._defaultNumTicks}_getConfiguredTickValues(){const{config:e}=this,n=e.type===P.X?this.xScale:this.yScale,i=n==null?void 0:n.domain();return e.tickValues?e.tickValues.filter(r=>r>=i[0]&&r<=i[1]):e.minMaxTicksOnly||e.type===P.X&&this._width<e.minMaxTicksOnlyWhenWidthIsLess?i:null}_getFullDomainPath(e=0){const{config:{type:n}}=this;switch(n){case P.X:return`M0.5, ${e} V0.5 H${this._width+.5} V${e}`;case P.Y:return`M${-e}, ${this._height+.5} H0.5 V0.5 H${-e}`}}_renderAxisLabel(e=this.axisGroup){var n;const{type:i,label:r,labelMargin:o,labelFontSize:s}=this.config;e.selectAll(`.${lr}`).remove();const a=this.getPosition(),{width:l,height:c}=(n=this._axisRawBBox)!==null&&n!==void 0?n:e.node().getBBox(),h=i===P.X?this._width/2:Math.pow(-1,+(a===C.Left))*l,u=i===P.X?Math.pow(-1,+(a===C.Top))*c:this._height/2,f=i===P.X?0:Math.pow(-1,+(a===C.Left))*o,d=i===P.X?Math.pow(-1,+(a===C.Top))*o:0,g=i===P.Y?-90:0;e.append("text").attr("class",lr).text(r).attr("dy",`${this._getLabelDY()}em`).attr("transform",`translate(${h+f},${u+d}) rotate(${g})`).style("font-size",s).style("fill",this.config.labelColor)}_getLabelDY(){const{type:e,position:n}=this.config;switch(e){case P.X:switch(n){case C.Top:return 0;case C.Bottom:default:return .75}case P.Y:switch(n){case C.Right:return .75;case C.Left:default:return-.25}}}_alignTickLabels(){const{config:{type:e,tickTextAlign:n,tickTextAngle:i,position:r}}=this,o=this.g.selectAll("g.tick > text"),s=this._getTickTextAnchor(n),a=e===P.X?0:this._getYTickTextTranslate(n,r),l=i?`translate(${a},0) rotate(${i})`:`translate(${a},0)`;o.attr("transform",l).attr("text-anchor",s)}_getTickTextAnchor(e){switch(e){case dt.Left:return"start";case dt.Right:return"end";case dt.Center:return"middle";default:return null}}_getYTickTextTranslate(e,n=C.Left){const r=this._axisRawBBox.width-9;switch(e){case dt.Left:return n===C.Left?r*-1:0;case dt.Right:return n===C.Left?0:r;case dt.Center:return n===C.Left?r*-.5:r*.5;default:return 0}}}Al.selectors=Cm;var yt;(function(t){t.Circle="circle",t.Cross="cross",t.Diamond="diamond",t.Square="square",t.Star="star",t.Triangle="triangle",t.Wye="wye"})(yt||(yt={}));const Mm={[yt.Circle]:al,[yt.Cross]:l0,[yt.Diamond]:u0,[yt.Square]:h0,[yt.Star]:g0,[yt.Triangle]:m0,[yt.Wye]:_0},rt=Object.assign(Object.assign({},yt),{Line:"line"});var qn;(function(t){t.Horizontal="horizontal",t.Vertical="vertical"})(qn||(qn={}));const Am={items:[],labelClassName:"",onLegendItemClick:void 0,labelFontSize:null,labelMaxWidth:null,bulletSize:null,bulletShape:t=>{var e;return(e=t.shape)!==null&&e!==void 0?e:rt.Circle},orientation:qn.Horizontal,renderIntoProvidedDomNode:!1},Ni=Ve*3,$m={[rt.Circle]:Math.PI/4,[rt.Cross]:5/9,[rt.Diamond]:Math.sqrt(3)/6,[rt.Square]:1,[rt.Star]:.3,[rt.Triangle]:Math.sqrt(3)/4,[rt.Wye]:5/11};function Em(t){t.each((e,n,i)=>{Z(i[n]).append("svg").attr("width","100%").attr("height","100%").append("path")})}function Nm(t,e,n){t.each((i,r,o)=>{const s=Qn(i,e.bulletShape,r),a=bt(i,n,r),l=Ni,c=s===rt.Line?Ni/2.5:Ni,u=Z(o[r]).select("svg").attr("viewBox",`0 0 ${l} ${c}`).select("path").attr("stroke",a),f=i.inactive?"var(--vis-legend-bullet-inactive-opacity)":1;if(s===rt.Line)u.attr("d",`M0,${c/2} L${l/2},${c/2} L${l},${c/2}`).attr("transform",null).style("opacity",f).style("stroke-width","3px").style("fill",null).style("fill-opacity",null).style("marker-start","none").style("marker-end","none");else{const d=y0().type(Mm[s]).size(l*c*$m[s]),g=(l-2)/l;let p=c/2;switch(s){case rt.Triangle:p+=c/8;break;case rt.Star:p+=c/16;break;case rt.Wye:p-=c/16;break}u.attr("d",d).attr("transform",`translate(${l/2}, ${Math.round(p)}) scale(${g})`).style("stroke-width","1px").style("opacity",null).style("fill",a).style("fill-opacity",f)}})}const Zr=O`
252
252
  label: bullet-legend-component;
253
- `,Sv=_e`
253
+ `,Om=Kt`
254
254
  :root {
255
255
  // Undefined by default to allow proper fallback to var(--vis-font-family)
256
256
  /* --vis-legend-font-family: */
@@ -267,14 +267,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
267
267
  --vis-dark-legend-label-color: #eee;
268
268
  }
269
269
 
270
- body.theme-dark ${`.${Gr}`} {
270
+ body.theme-dark ${`.${Zr}`} {
271
271
  --vis-legend-label-color: var(--vis-dark-legend-label-color);
272
272
  }
273
273
 
274
274
  body.theme-patterns {
275
275
  --vis-legend-bullet-size: 14px;
276
276
  }
277
- `,xn=P`
277
+ `,bn=O`
278
278
  label: legendItem;
279
279
  display: inline-flex;
280
280
  align-items: center;
@@ -284,13 +284,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
284
284
  cursor: default;
285
285
  user-select: none;
286
286
  max-width: min-content;
287
- `,Al=P`
287
+ `,$l=O`
288
288
  label: legendItemVertical;
289
289
  display: flex;
290
290
  margin-top: var(--vis-legend-vertical-item-spacing);
291
- `,$l=P`
291
+ `,El=O`
292
292
  cursor: pointer;
293
- `,sr=P`
293
+ `,cr=O`
294
294
  label: legendItemLabel;
295
295
  font-size: var(--vis-legend-label-font-size);
296
296
  display: inline-block;
@@ -300,7 +300,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
300
300
  text-overflow: ellipsis;
301
301
  overflow: hidden;
302
302
  white-space: nowrap;
303
- `,ar=P`
303
+ `,ur=O`
304
304
  flex: 0 0 auto;
305
305
  label: legendItemBullet;
306
306
  margin-right: var(--vis-legend-bullet-label-spacing);
@@ -310,9 +310,30 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
310
310
  svg {
311
311
  display: block;
312
312
  }
313
- `,Cv=Object.freeze(Object.defineProperty({__proto__:null,bullet:ar,clickable:$l,item:xn,itemVertical:Al,label:sr,root:Gr,variables:Sv},Symbol.toStringTag,{value:"Module"}));class El{constructor(e,n){this._defaultConfig=bv,this.config=this._defaultConfig,this._colorAccessor=i=>i.color,this._container=e,this.div=n!=null&&n.renderIntoProvidedDomNode?j(this._container):j(this._container).append("div"),this.div.classed(Gr,!0),this.element=this.div.node(),n&&this.update(n)}update(e){this.prevConfig=this.config,this.config=qt(this._defaultConfig,e),this.render()}render(){const{config:e}=this,n=this.div.selectAll(`.${xn}`).data(e.items),i=n.enter().append("div").on("click",this._onItemClick.bind(this)),r=i.merge(n);r.attr("class",o=>{var s;return`${xn} ${(s=o.className)!==null&&s!==void 0?s:""}`}).classed(Al,e.orientation===Vn.Vertical).classed($l,o=>!!e.onLegendItemClick&&this._isItemClickable(o)).attr("title",o=>o.name).style("display",o=>o.hidden?"none":null),i.append("span").attr("class",ar).call(kv),r.select(`.${ar}`).style("width",e.bulletSize).style("height",e.bulletSize).style("box-sizing","content-box").call(Tv,this.config,this._colorAccessor),i.append("span").attr("class",sr).classed(e.labelClassName,!0).style("max-width",e.labelMaxWidth).style("font-size",e.labelFontSize),r.select(`.${sr}`).text(o=>o.name),n.exit().remove()}_isItemClickable(e){return e.pointer===void 0?!0:e.pointer}_onItemClick(e,n){const{config:{onLegendItemClick:i}}=this,o=this.div.selectAll(`.${xn}`).nodes().indexOf(e.currentTarget);i&&i(n,o)}destroy(){this.element!==this._container&&this.div.remove()}}El.selectors=Cv;const Mv=Object.assign(Object.assign({},ri),{color:void 0,curveType:I.MonotoneX,baseline:()=>0,opacity:1,cursor:null,minHeight1Px:!1}),Nl=P`
313
+ `,Dm=Object.freeze(Object.defineProperty({__proto__:null,bullet:ur,clickable:El,item:bn,itemVertical:$l,label:cr,root:Zr,variables:Om},Symbol.toStringTag,{value:"Module"}));class Nl{constructor(e,n){this._defaultConfig=Am,this.config=this._defaultConfig,this._colorAccessor=i=>i.color,this._container=e,this.div=n!=null&&n.renderIntoProvidedDomNode?Z(this._container):Z(this._container).append("div"),this.div.classed(Zr,!0),this.element=this.div.node(),n&&this.update(n)}update(e){this.prevConfig=this.config,this.config=Zt(this._defaultConfig,e),this.render()}render(){const{config:e}=this,n=this.div.selectAll(`.${bn}`).data(e.items),i=n.enter().append("div").on("click",this._onItemClick.bind(this)),r=i.merge(n);r.attr("class",o=>{var s;return`${bn} ${(s=o.className)!==null&&s!==void 0?s:""}`}).classed($l,e.orientation===qn.Vertical).classed(El,o=>!!e.onLegendItemClick&&this._isItemClickable(o)).attr("title",o=>o.name).style("display",o=>o.hidden?"none":null),i.append("span").attr("class",ur).call(Em),r.select(`.${ur}`).style("width",e.bulletSize).style("height",e.bulletSize).style("box-sizing","content-box").call(Nm,this.config,this._colorAccessor),i.append("span").attr("class",cr).classed(e.labelClassName,!0).style("max-width",e.labelMaxWidth).style("font-size",e.labelFontSize),r.select(`.${cr}`).text(o=>o.name),n.exit().remove()}_isItemClickable(e){return e.pointer===void 0?!0:e.pointer}_onItemClick(e,n){const{config:{onLegendItemClick:i}}=this,o=this.div.selectAll(`.${bn}`).nodes().indexOf(e.currentTarget);i&&i(n,o)}destroy(){this.element!==this._container&&this.div.remove()}}Nl.selectors=Dm;const Rm=Object.assign(Object.assign({},Je),{yStacked:void 0,baseline:null,duration:100,tooltip:void 0,template:(t,e)=>"",hideWhenFarFromPointer:!0,hideWhenFarFromPointerDistance:100,snapToData:!0,getCircles:void 0,color:void 0,strokeColor:void 0,strokeWidth:void 0}),Fm=Kt`
314
+ :root {
315
+ --vis-crosshair-line-stroke-color: #888;
316
+ --vis-crosshair-line-stroke-width: 1px;
317
+ --vis-crosshair-line-stroke-opacity: 1;
318
+ --vis-crosshair-circle-stroke-color: #fff;
319
+ --vis-crosshair-circle-stroke-width: 1px;
320
+ --vis-crosshair-circle-stroke-opacity: 0.75;
321
+ }
322
+ `,Pm=O`
323
+ label: crosshair-component;
324
+ `,Ol=O`
325
+ stroke: var(--vis-crosshair-line-stroke-color);
326
+ stroke-width: var(--vis-crosshair-line-stroke-width);
327
+ stroke-opacity: var(--vis-crosshair-line-stroke-opacity);
328
+ pointer-events: none;
329
+ `,Dl=O`
330
+ stroke: var(--vis-crosshair-circle-stroke-color);
331
+ stroke-width: var(--vis-crosshair-circle-stroke-width);
332
+ stroke-opacity: var(--vis-crosshair-circle-stroke-opacity);
333
+ pointer-events: none;
334
+ `,zm=Object.freeze(Object.defineProperty({__proto__:null,circle:Dl,globalStyles:Fm,line:Ol,root:Pm},Symbol.toStringTag,{value:"Module"}));class Rl extends ai{constructor(e){super(),this.clippable=!0,this._defaultConfig=Rm,this.config=this._defaultConfig,this.x=0,this.show=!1,this._animFrameId=null,this._accessors={x:void 0,y:void 0,yStacked:void 0,baseline:void 0},e&&this.setConfig(e),this.g.style("opacity",this.show?1:0),this.line=this.g.append("line").attr("class",Ol)}set accessors(e){this._accessors=e}get accessors(){var e;const{config:n}=this,i=!!(n.x||n.y||n.yStacked),r=i?n.x:this._accessors.x,o=i?n.y:this._accessors.y,s=o?jt(o)?o:[o]:void 0,a=i?n.yStacked:this._accessors.yStacked,l=(e=n.baseline)!==null&&e!==void 0?e:this._accessors.baseline;return{x:r,y:s,yStacked:a,baseline:l}}setContainer(e){this.container=e,this.container.on("mousemove.crosshair",this._onMouseMove.bind(this)),this.container.on("mouseout.crosshair",this._onMouseOut.bind(this))}_render(e){const{config:n}=this;if(n.snapToData&&!this.datum)return;const i=wt(e)?e:n.duration;ct(this.g,i).style("opacity",this.show?1:0),this.line.attr("y1",0).attr("y1",this._height),ct(this.line,i,Io).attr("x1",this.x).attr("x2",this.x);const r=this.getCircleData(),o=this.g.selectAll("circle").data(r,(a,l)=>{var c;return(c=a.id)!==null&&c!==void 0?c:l}),s=o.enter().append("circle").attr("class",Dl).attr("r",0).attr("cx",this.x).attr("cy",a=>a.y).style("fill",a=>a.color).style("stroke",a=>a.strokeColor).style("stroke-width",a=>a.strokeWidth);ct(s.merge(o),i,Io).attr("cx",this.x).attr("cy",a=>a.y).attr("r",4).style("opacity",a=>a.opacity).style("fill",a=>a.color).style("stroke",a=>a.strokeColor).style("stroke-width",a=>a.strokeWidth),o.exit().remove()}hide(){this._onMouseOut()}_onMouseMove(e){var n,i;const{config:r,datamodel:o,element:s}=this;!this.accessors.x&&(!((n=o.data)===null||n===void 0)&&n.length)&&console.warn("Unovis | Crosshair: X accessor function has not been configured. Please check if it's present in the configuration object");const[a]=kn(e,s),l=this.xScale.range();if(r.snapToData){!this.accessors.y&&!this.accessors.yStacked&&(!((i=o.data)===null||i===void 0)&&i.length)&&console.warn("Unovis | Crosshair: Y accessors have not been configured. Please check if they're present in the configuration object");const c=this.xScale,h=c.invert(a);if(this.datum=Zu(o.data,h,this.accessors.x),this.datumIndex=o.data.indexOf(this.datum),!this.datum)return;this.x=Pt(Math.round(c(Y(this.datum,this.accessors.x,this.datumIndex))),0,this._width),this.show=this.x>=0&&this.x<=this._width&&(!r.hideWhenFarFromPointer||Math.abs(this.x-a)<r.hideWhenFarFromPointerDistance)}else this.x=Pt(a,l[0],l[1]),this.show=a>=l[0]-2&&a<=l[1]+2;window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{this._render()}),this.show?this._showTooltip(e):this._hideTooltip()}_onMouseOut(){this.show=!1,window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{this._render()}),this._hideTooltip()}_showTooltip(e){var n;const{config:i}=this,r=(n=i.tooltip)!==null&&n!==void 0?n:this.tooltip;if(!r)return;const o=r.getContainer()||this.container.node(),[s,a]=r.isContainerBody()?[e.clientX,e.clientY]:kn(e,o),l=i.template(this.datum,this.xScale.invert(this.x));if(r.config.followCursor=!0,!r.config.horizontalPlacement||r.config.horizontalPlacement===C.Auto){const c=r.isContainerBody()?s-this.container.node().getBoundingClientRect().left:s;r.overrideHorizontalPlacement(c>this._containerWidth/2?C.Left:C.Right)}l&&r.show(l,{x:s,y:a})}_hideTooltip(){var e;const{config:n}=this,i=(e=n.tooltip)!==null&&e!==void 0?e:this.tooltip;i==null||i.hide()}getYDataExtent(){return[void 0,void 0]}getCircleData(){var e,n;const{config:i,datamodel:{data:r}}=this;if(pr(i.getCircles))return i.getCircles(this.xScale.invert(this.x),r,this.yScale);if(i.snapToData&&this.datum){const o=(e=this.accessors.y)!==null&&e!==void 0?e:[],s=(n=this.accessors.yStacked)!==null&&n!==void 0?n:[],a=Y(this.datum,this.accessors.baseline,this.datumIndex)||0,l=Xu(this.datum,this.datumIndex,...s).map((h,u,f)=>({y:this.yScale(h+a),opacity:wt(Y(this.datum,s[u]))?1:0,color:bt(this.datum,i.color,u),strokeColor:i.strokeColor?bt(this.datum,i.strokeColor,u):void 0,strokeWidth:i.strokeWidth?Y(this.datum,i.strokeWidth,u):void 0})),c=o.map((h,u)=>{const f=Y(this.datum,h);return{y:this.yScale(f),opacity:wt(f)?1:0,color:bt(this.datum,i.color,l.length+u),strokeColor:i.strokeColor?bt(this.datum,i.strokeColor,u):void 0,strokeWidth:i.strokeWidth?Y(this.datum,i.strokeWidth,u):void 0}});return l.concat(c)}return[]}}Rl.selectors=zm;const Bm=Object.assign(Object.assign({},Je),{color:void 0,curveType:L.MonotoneX,baseline:()=>0,opacity:1,cursor:null,minHeight1Px:!1}),Fl=O`
314
335
  label: area-component;
315
- `,Av=_e`
336
+ `,Lm=Kt`
316
337
  :root {
317
338
  --vis-area-cursor: default;
318
339
  --vis-area-fill-opacity: 1;
@@ -327,11 +348,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
327
348
  --vis-dark-area-stroke-color: none;
328
349
  }
329
350
 
330
- body.theme-dark ${`.${Nl}`} {
351
+ body.theme-dark ${`.${Fl}`} {
331
352
  --vis-area-stroke-color: var(--vis-dark-area-stroke-color);
332
353
  }
333
354
 
334
- `,lr=P`
355
+ `,hr=O`
335
356
  label: area;
336
357
  cursor: var(--vis-area-cursor);
337
358
  fill-opacity: var(--vis-area-fill-opacity);
@@ -344,9 +365,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
344
365
  fill-opacity: var(--vis-area-hover-fill-opacity);
345
366
  stroke-width: var(--vis-area-hover-stroke-width);
346
367
  }
347
- `,$v=Object.freeze(Object.defineProperty({__proto__:null,area:lr,globalStyles:Av,root:Nl},Symbol.toStringTag,{value:"Module"}));class fi extends Ir{constructor(e){super(),this._defaultConfig=Mv,this.config=this._defaultConfig,this.stacked=!0,this.events={[fi.selectors.area]:{}},e&&this.setConfig(e),this.stacked=Array.isArray(this.config.y)}_render(e){super._render(e);const{config:n,datamodel:{data:i}}=this,r=Bt(e)?e:n.duration,o=Ki[n.curveType];this._areaGen=t0().x(p=>p.x).y0(p=>p.y0).y1(p=>{const v=Math.abs(p.y1-p.y0)<1;return p.y1-(v&&n.minHeight1Px?1:0)}).curve(o);const s=fe(n.y)?n.y:[n.y],a=i.map((p,v)=>this.xScale(dt(p,n.x,v))),l=Uu(i,n.baseline,s,this._prevNegative);this._prevNegative=l.map(p=>!!p.isMostlyNegative);const c=l.map(p=>p.map((v,_)=>({y0:this.yScale(v[0]),y1:this.yScale(v[1]),x:a[_]}))),f=c.length-1,u=c.reverse(),h=this.g.selectAll(`.${lr}`).data(u),d=h.enter().append("path").attr("class",lr).attr("d",p=>this._areaGen(p)||this._emptyPath()).style("opacity",0).style("fill",(p,v)=>le(i,n.color,f-v)),g=Tt(d.merge(h),r).style("opacity",(p,v)=>p.some(x=>x.y0-x.y1!==0)?dt(i,n.opacity,f-v):0).style("fill",(p,v)=>le(i,n.color,f-v)).style("cursor",(p,v)=>Gn(i,n.cursor,f-v));r?g.attrTween("d",(v,_,x)=>{const y=j(x[_]).attr("d"),T=this._areaGen(v)||this._emptyPath();return xl(y,T)}):g.attr("d",p=>this._areaGen(p)||this._emptyPath()),Tt(h.exit(),r).style("opacity",0).remove()}getYDataExtent(e){const{config:n,datamodel:i}=this,r=fe(n.y)?n.y:[n.y],o=e?Ws(i.data,this.xScale.domain(),n.x):i.data;return Bu(o,n.baseline,...r)}_emptyPath(){const e=this.xScale.range(),n=this.yScale.domain(),i=this.yScale((n[0]+n[1])/2),r=i;return this._areaGen([{y0:i,y1:r,x:e[0]},{y0:i,y1:r,x:e[1]}])}}fi.selectors=$v;const jr=Symbol("componentAccessorKey"),Ol=Symbol("tooltipAccessorKey"),Ev=Symbol("crosshairAccessorKey"),Dl=Symbol("axisAccessorKey"),Nv=Symbol("annotationsAccessorKey");function Qe(t,e){return Pe(t,e)}function xe(t){const e=m.getCurrentInstance(),n=e.attrs;return m.computed(()=>{const i={},r=(e==null?void 0:e.vnode.props)??{};return Object.keys(r).forEach(o=>{i[m.camelize(o)]=t[m.camelize(o)]}),{...i,...n}})}const Ov=m.defineComponent({__name:"index",props:{components:{},xScale:{type:[Object,Function]},xDomain:{},xDomainMinConstraint:{},xDomainMaxConstraint:{},xRange:{},yScale:{type:[Object,Function]},yDomain:{},yDomainMinConstraint:{},yDomainMaxConstraint:{},yRange:{},yDirection:{},xAxis:{},yAxis:{},autoMargin:{type:Boolean},tooltip:{},crosshair:{},preventEmptyDomain:{type:[Boolean,null]},scaleByDomain:{type:Boolean},annotations:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(t,{expose:e}){const n=t,{data:i}=m.toRefs(n),r=xe(n),o=m.ref(),s=m.reactive({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),a=m.ref();return m.watch(i,()=>{o.value&&o.value.setData(i.value,!0)}),m.watchEffect(()=>{var l;s.components.map(c=>c.config),(l=o.value)==null||l.updateContainer({...m.toRaw(r.value),...m.toRaw(s)})}),m.onMounted(()=>{a.value&&(o.value=new Yg(a.value,{...m.toRaw(s)},i.value))}),m.onUnmounted(()=>{var l;return(l=o.value)==null?void 0:l.destroy()}),m.provide(jr,{data:i,update:l=>s.components=[...s.components,l],destroy:()=>{var l;return s.components=(l=s.components)==null?void 0:l.filter(c=>!c.isDestroyed())}}),m.provide(Dl,{data:i,update:l=>s[`${l.config.type}Axis`]=l,destroy:l=>{s[`${l}Axis`]=void 0}}),m.provide(Ev,{data:i,update:l=>s.crosshair=l,destroy:()=>{s.crosshair=void 0}}),m.provide(Ol,{data:i,update:l=>s.tooltip=l,destroy:()=>{s.tooltip=void 0}}),m.provide(Nv,{data:i,update:l=>s.annotations=l,destroy:()=>{s.annotations=void 0}}),e({component:o}),(l,c)=>(m.openBlock(),m.createElementBlock("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:a,class:"unovis-xy-container"},[m.renderSlot(l.$slots,"default")],512))}}),Dv={"data-vis-component":""},Rv=m.defineComponent({__name:"index",props:{color:{},curveType:{},baseline:{},opacity:{},cursor:{},minHeight1Px:{type:Boolean},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=m.inject(jr),i=t,r=m.computed(()=>n.data.value??i.data),o=xe(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new fi(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),m.watch(o,(a,l)=>{var c;Qe(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",Dv))}}),Fv={"data-vis-axis":""},As=m.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},x:{},y:{},id:{type:Function},color:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=m.inject(Dl),i=t,r=m.computed(()=>n.data.value??i.data),o=xe(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new Ml(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy(i.type)}),m.watch(o,(a,l)=>{var c;Qe(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",Fv))}}),Pv={"data-vis-component":""},zv=m.defineComponent({__name:"index",props:{color:{},curveType:{},lineWidth:{},lineDashArray:{},fallbackValue:{},highlightOnHover:{type:Boolean},cursor:{},interpolateMissingData:{type:Boolean},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=m.inject(jr),i=t,r=m.computed(()=>n.data.value??i.data),o=xe(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new ci(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),m.watch(o,(a,l)=>{var c;Qe(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",Pv))}}),Lv={"data-vis-tooltip":""},Iv=m.defineComponent({__name:"index",props:{components:{},container:{},followCursor:{type:Boolean},allowHover:{type:Boolean},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},className:{},data:{}},setup(t,{expose:e}){const n=m.inject(Ol),i=xe(t),r=m.ref();return m.onMounted(()=>{m.nextTick(()=>{r.value=new Ja(i.value),n.update(r.value)})}),m.onUnmounted(()=>{var o;(o=r.value)==null||o.destroy(),n.destroy()}),m.watch(i,(o,s)=>{var a;Qe(o,s)||(a=r.value)==null||a.setConfig(i.value)}),e({component:r}),(o,s)=>(m.openBlock(),m.createElementBlock("div",Lv))}}),Bv=m.defineComponent({__name:"index",props:{items:{},labelClassName:{},onLegendItemClick:{type:Function},labelFontSize:{},labelMaxWidth:{},bulletSize:{},bulletShape:{},orientation:{},renderIntoProvidedDomNode:{type:Boolean},data:{}},setup(t,{expose:e}){const n=t;m.computed(()=>n.data);const i=xe(n),r=m.ref(),o=m.ref();return m.onMounted(()=>{m.nextTick(()=>{o.value&&(r.value=new El(o.value,{...i.value,renderIntoProvidedDomNode:!0}))})}),m.onUnmounted(()=>{var s;(s=r.value)==null||s.destroy()}),m.watch(i,(s,a)=>{var l;Qe(s,a)||(l=r.value)==null||l.update(i.value)}),e({component:r}),(s,a)=>(m.openBlock(),m.createElementBlock("div",{"data-vis-bullet-legend":"",ref_key:"elRef",ref:o},null,512))}});(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".unovis-xy-container,.unovis-single-container{display:block;position:relative;width:100%}[data-vis-leaflet-map],[data-vis-leaflet-flow-map]{display:block;position:relative}[data-vis-bullet-legend]{display:block}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const Uv={class:"space-y-4"},Hv={class:"flex items center justify-end"},Wv=m.defineComponent({__name:"Area",props:{data:{},height:{},xLabel:{},yLabel:{},categories:{},xFormatter:{type:Function},yFormatter:{type:Function},curveType:{},yNumTicks:{},xNumTicks:{}},setup(t){const e=t,n=Object.values(e.categories).map(o=>o.color);function i(o){var s;return{y:a=>Number(a[o]),color:((s=e.categories[o])==null?void 0:s.color)??"#3b82f6"}}const r=n.map((o,s)=>`
348
- <linearGradient id="gradient${s}-${o}" gradientTransform="rotate(90)">
349
- <stop offset="0%" stop-color="${o}" stop-opacity="1" />
350
- <stop offset="100%" stop-color="${o}" stop-opacity="0" />
368
+ `,Im=Object.freeze(Object.defineProperty({__proto__:null,area:hr,globalStyles:Lm,root:Fl},Symbol.toStringTag,{value:"Module"}));class pi extends ai{constructor(e){super(),this._defaultConfig=Bm,this.config=this._defaultConfig,this.stacked=!0,this.events={[pi.selectors.area]:{}},e&&this.setConfig(e),this.stacked=Array.isArray(this.config.y)}_render(e){super._render(e);const{config:n,datamodel:{data:i}}=this,r=wt(e)?e:n.duration,o=nr[n.curveType];this._areaGen=a0().x(p=>p.x).y0(p=>p.y0).y1(p=>{const v=Math.abs(p.y1-p.y0)<1;return p.y1-(v&&n.minHeight1Px?1:0)}).curve(o);const s=jt(n.y)?n.y:[n.y],a=i.map((p,v)=>this.xScale(Y(p,n.x,v))),l=qu(i,n.baseline,s,this._prevNegative);this._prevNegative=l.map(p=>!!p.isMostlyNegative);const c=l.map(p=>p.map((v,_)=>({y0:this.yScale(v[0]),y1:this.yScale(v[1]),x:a[_]}))),h=c.length-1,u=c.reverse(),f=this.g.selectAll(`.${hr}`).data(u),d=f.enter().append("path").attr("class",hr).attr("d",p=>this._areaGen(p)||this._emptyPath()).style("opacity",0).style("fill",(p,v)=>bt(i,n.color,h-v)),g=ct(d.merge(f),r).style("opacity",(p,v)=>p.some(x=>x.y0-x.y1!==0)?Y(i,n.opacity,h-v):0).style("fill",(p,v)=>bt(i,n.color,h-v)).style("cursor",(p,v)=>Qn(i,n.cursor,h-v));r?g.attrTween("d",(v,_,x)=>{const y=Z(x[_]).attr("d"),T=this._areaGen(v)||this._emptyPath();return bl(y,T)}):g.attr("d",p=>this._areaGen(p)||this._emptyPath()),ct(f.exit(),r).style("opacity",0).remove()}getYDataExtent(e){const{config:n,datamodel:i}=this,r=jt(n.y)?n.y:[n.y],o=e?Vs(i.data,this.xScale.domain(),n.x):i.data;return Yu(o,n.baseline,...r)}_emptyPath(){const e=this.xScale.range(),n=this.yScale.domain(),i=this.yScale((n[0]+n[1])/2),r=i;return this._areaGen([{y0:i,y1:r,x:e[0]},{y0:i,y1:r,x:e[1]}])}}pi.selectors=Im;const Qr=Symbol("componentAccessorKey"),Pl=Symbol("tooltipAccessorKey"),zl=Symbol("crosshairAccessorKey"),Bl=Symbol("axisAccessorKey"),Um=Symbol("annotationsAccessorKey");function be(t,e){return ze(t,e)}function ie(t){const e=m.getCurrentInstance(),n=e.attrs;return m.computed(()=>{const i={},r=(e==null?void 0:e.vnode.props)??{};return Object.keys(r).forEach(o=>{i[m.camelize(o)]=t[m.camelize(o)]}),{...i,...n}})}const Hm=m.defineComponent({__name:"index",props:{components:{},xScale:{type:[Object,Function]},xDomain:{},xDomainMinConstraint:{},xDomainMaxConstraint:{},xRange:{},yScale:{type:[Object,Function]},yDomain:{},yDomainMinConstraint:{},yDomainMaxConstraint:{},yRange:{},yDirection:{},xAxis:{},yAxis:{},autoMargin:{type:Boolean},tooltip:{},crosshair:{},preventEmptyDomain:{type:[Boolean,null]},scaleByDomain:{type:Boolean},annotations:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(t,{expose:e}){const n=t,{data:i}=m.toRefs(n),r=ie(n),o=m.ref(),s=m.reactive({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),a=m.ref();return m.watch(i,()=>{o.value&&o.value.setData(i.value,!0)}),m.watchEffect(()=>{var l;s.components.map(c=>c.config),(l=o.value)==null||l.updateContainer({...m.toRaw(r.value),...m.toRaw(s)})}),m.onMounted(()=>{a.value&&(o.value=new Qg(a.value,{...m.toRaw(s)},i.value))}),m.onUnmounted(()=>{var l;return(l=o.value)==null?void 0:l.destroy()}),m.provide(Qr,{data:i,update:l=>s.components=[...s.components,l],destroy:()=>{var l;return s.components=(l=s.components)==null?void 0:l.filter(c=>!c.isDestroyed())}}),m.provide(Bl,{data:i,update:l=>s[`${l.config.type}Axis`]=l,destroy:l=>{s[`${l}Axis`]=void 0}}),m.provide(zl,{data:i,update:l=>s.crosshair=l,destroy:()=>{s.crosshair=void 0}}),m.provide(Pl,{data:i,update:l=>s.tooltip=l,destroy:()=>{s.tooltip=void 0}}),m.provide(Um,{data:i,update:l=>s.annotations=l,destroy:()=>{s.annotations=void 0}}),e({component:o}),(l,c)=>(m.openBlock(),m.createElementBlock("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:a,class:"unovis-xy-container"},[m.renderSlot(l.$slots,"default")],512))}}),Wm={"data-vis-component":""},Vm=m.defineComponent({__name:"index",props:{color:{},curveType:{},baseline:{},opacity:{},cursor:{},minHeight1Px:{type:Boolean},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=m.inject(Qr),i=t,r=m.computed(()=>n.data.value??i.data),o=ie(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new pi(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),m.watch(o,(a,l)=>{var c;be(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",Wm))}}),Ym={"data-vis-axis":""},Es=m.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},x:{},y:{},id:{type:Function},color:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=m.inject(Bl),i=t,r=m.computed(()=>n.data.value??i.data),o=ie(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new Al(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy(i.type)}),m.watch(o,(a,l)=>{var c;be(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",Ym))}}),Xm={"data-vis-crosshair":""},qm=m.defineComponent({__name:"index",props:{data:{}},setup(t,{expose:e}){const n=m.inject(zl),i=t,r=m.computed(()=>n.data.value??i.data),o=ie(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new Rl(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),m.watch(o,(a,l)=>{var c;be(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",Xm))}}),Gm={"data-vis-component":""},jm=m.defineComponent({__name:"index",props:{color:{},curveType:{},lineWidth:{},lineDashArray:{},fallbackValue:{},highlightOnHover:{type:Boolean},cursor:{},interpolateMissingData:{type:Boolean},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=m.inject(Qr),i=t,r=m.computed(()=>n.data.value??i.data),o=ie(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new fi(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),m.watch(o,(a,l)=>{var c;be(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",Gm))}}),Zm={"data-vis-tooltip":""},Qm=m.defineComponent({__name:"index",props:{components:{},container:{},followCursor:{type:Boolean},allowHover:{type:Boolean},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},className:{},data:{}},setup(t,{expose:e}){const n=m.inject(Pl),i=ie(t),r=m.ref();return m.onMounted(()=>{m.nextTick(()=>{r.value=new Ka(i.value),n.update(r.value)})}),m.onUnmounted(()=>{var o;(o=r.value)==null||o.destroy(),n.destroy()}),m.watch(i,(o,s)=>{var a;be(o,s)||(a=r.value)==null||a.setConfig(i.value)}),e({component:r}),(o,s)=>(m.openBlock(),m.createElementBlock("div",Zm))}}),Jm=m.defineComponent({__name:"index",props:{items:{},labelClassName:{},onLegendItemClick:{type:Function},labelFontSize:{},labelMaxWidth:{},bulletSize:{},bulletShape:{},orientation:{},renderIntoProvidedDomNode:{type:Boolean},data:{}},setup(t,{expose:e}){const n=t;m.computed(()=>n.data);const i=ie(n),r=m.ref(),o=m.ref();return m.onMounted(()=>{m.nextTick(()=>{o.value&&(r.value=new Nl(o.value,{...i.value,renderIntoProvidedDomNode:!0}))})}),m.onUnmounted(()=>{var s;(s=r.value)==null||s.destroy()}),m.watch(i,(s,a)=>{var l;be(s,a)||(l=r.value)==null||l.update(i.value)}),e({component:r}),(s,a)=>(m.openBlock(),m.createElementBlock("div",{"data-vis-bullet-legend":"",ref_key:"elRef",ref:o},null,512))}});(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".unovis-xy-container,.unovis-single-container{display:block;position:relative;width:100%}[data-vis-leaflet-map],[data-vis-leaflet-flow-map]{display:block;position:relative}[data-vis-bullet-legend]{display:block}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const Km={class:"flex flex-col"},tv={class:"flex items-center mr-2 mt-2"},ev={class:"font-semibold capitalize text-white/75"},nv={class:"flex items-center gap-2"},iv={class:"font-normal"},rv=m.defineComponent({__name:"Tooltip",props:{data:{},categories:{}},setup(t){function e(i){var r;return((r=n.categories[i])==null?void 0:r.color)??"#f00"}const n=t;return(i,r)=>(m.openBlock(),m.createElementBlock("div",Km,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(Object.entries(i.data),([o,s])=>{var a;return m.openBlock(),m.createElementBlock(m.Fragment,{key:o},[m.createElementVNode("div",tv,[m.createElementVNode("span",ev,m.toDisplayString(o)+":",1)]),m.createElementVNode("div",nv,[(a=n.categories[o])!=null&&a.color?(m.openBlock(),m.createElementBlock("span",{key:0,style:m.normalizeStyle({backgroundColor:e(o)}),class:"w-2 h-2"},null,4)):m.createCommentVNode("",!0),m.createElementVNode("span",iv,m.toDisplayString(s),1)])],64)}),128))]))}}),ov={class:"space-y-4"},sv={class:"flex items center justify-end"},av=m.defineComponent({__name:"Area",props:{data:{},height:{},xLabel:{},yLabel:{},categories:{},xFormatter:{type:Function},yFormatter:{type:Function},curveType:{},yNumTicks:{},xNumTicks:{}},setup(t){const e=t,n=m.computed(()=>s=>{const a=m.createApp(rv,{data:s}),l=document.createElement("div");a.mount(l);const c=l.innerHTML;return a.unmount(),c}),i=Object.values(e.categories).map(s=>s.color);function r(s){var a;return{y:l=>Number(l[s]),color:((a=e.categories[s])==null?void 0:a.color)??"#3b82f6"}}const o=i.map((s,a)=>`
369
+ <linearGradient id="gradient${a}-${s}" gradientTransform="rotate(90)">
370
+ <stop offset="0%" stop-color="${s}" stop-opacity="1" />
371
+ <stop offset="100%" stop-color="${s}" stop-opacity="0" />
351
372
  </linearGradient>
352
- `).join("");return(o,s)=>(m.openBlock(),m.createElementBlock("div",Uv,[m.createVNode(m.unref(Ov),{data:o.data,height:o.height,"svg-defs":m.unref(r)},{default:m.withCtx(()=>[m.createVNode(m.unref(Iv),{"horizontal-placement":m.unref(M).Right,"vertical-placement":m.unref(M).Top},null,8,["horizontal-placement","vertical-placement"]),(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(Object.keys(e.categories),(a,l)=>(m.openBlock(),m.createElementBlock(m.Fragment,{key:l},[m.createVNode(m.unref(Rv),m.mergeProps({x:(c,f)=>f,ref_for:!0},i(a),{color:`url(#gradient${l}-${m.unref(n)[l]})`,opacity:.5,"curve-type":o.curveType??m.unref(I).MonotoneX}),null,16,["x","color","curve-type"]),m.createVNode(m.unref(zv),{x:(c,f)=>f,y:c=>c[a],color:m.unref(n)[l],"curve-type":o.curveType??m.unref(I).MonotoneX},null,8,["x","y","color","curve-type"])],64))),128)),m.createVNode(m.unref(As),{type:"x","tick-format":o.xFormatter,"num-ticks":o.xNumTicks??4,label:o.xLabel,"label-margin":8},null,8,["tick-format","num-ticks","label"]),m.createVNode(m.unref(As),{type:"y","num-ticks":o.yNumTicks??4,"tick-format":o.yFormatter,label:o.yLabel,style:{gridLine:{stroke:"#f00"}}},null,8,["num-ticks","tick-format","label"])]),_:1},8,["data","height","svg-defs"]),m.createElementVNode("div",Hv,[m.createVNode(m.unref(Bv),{items:Object.values(o.categories)},null,8,["items"])])]))}}),Yv=m.defineComponent({__name:"Button",props:{variant:{},size:{}},setup(t){return(e,n)=>(m.openBlock(),m.createElementBlock("button",{class:m.normalizeClass(["button",`button--${e.variant||"primary"}`,`button--${e.size||"medium"}`])},[m.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),Vv=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n},Xv=Vv(Yv,[["__scopeId","data-v-52b6ec0c"]]);exports.Area=Wv;exports.Button=Xv;
373
+ `).join("");return(s,a)=>(m.openBlock(),m.createElementBlock("div",ov,[m.createVNode(m.unref(Hm),{data:s.data,height:s.height,"svg-defs":m.unref(o)},{default:m.withCtx(()=>[m.createVNode(m.unref(Qm),{"horizontal-placement":m.unref(C).Right,"vertical-placement":m.unref(C).Top},null,8,["horizontal-placement","vertical-placement"]),(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(Object.keys(e.categories),(l,c)=>(m.openBlock(),m.createElementBlock(m.Fragment,{key:c},[m.createVNode(m.unref(Vm),m.mergeProps({x:(h,u)=>u,ref_for:!0},r(l),{color:`url(#gradient${c}-${m.unref(i)[c]})`,opacity:.5,"curve-type":s.curveType??m.unref(L).MonotoneX}),null,16,["x","color","curve-type"]),m.createVNode(m.unref(jm),{x:(h,u)=>u,y:h=>h[l],color:m.unref(i)[c],"curve-type":s.curveType??m.unref(L).MonotoneX},null,8,["x","y","color","curve-type"])],64))),128)),m.createVNode(m.unref(Es),{type:"x","tick-format":s.xFormatter,"num-ticks":s.xNumTicks??4,label:s.xLabel,"label-margin":8},null,8,["tick-format","num-ticks","label"]),m.createVNode(m.unref(Es),{type:"y","num-ticks":s.yNumTicks??4,"tick-format":s.yFormatter,label:s.yLabel,style:{gridLine:{stroke:"#f00"}}},null,8,["num-ticks","tick-format","label"]),m.createVNode(m.unref(qm),{color:"#666",template:n.value},null,8,["template"])]),_:1},8,["data","height","svg-defs"]),m.createElementVNode("div",sv,[m.createVNode(m.unref(Jm),{items:Object.values(s.categories)},null,8,["items"])])]))}}),lv=m.defineComponent({__name:"Button",props:{variant:{},size:{}},setup(t){return(e,n)=>(m.openBlock(),m.createElementBlock("button",{class:m.normalizeClass(["button",`button--${e.variant||"primary"}`,`button--${e.size||"medium"}`])},[m.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),cv=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n},uv=cv(lv,[["__scopeId","data-v-52b6ec0c"]]);exports.Area=av;exports.Button=uv;